PageSourceSearch

https://freezoni.com/assets/js/index-C6R5iHTk.js

js freezoni.com collected 2026-10-09 22:53:59 UTC 405,483 bytes, 2 lines download raw bytes

1const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/js/HomePage-Bfe4HR34.js","assets/js/vendor-react-rVzPP0Xx.js","assets/js/ListingsPage-Cse9Actu.js","assets/js/FzCard-D_Ti3BNw.js","assets/js/translationTargetLang-CeJs68B7.js","assets/js/vendor-i18n-Bcz9YpTC.js","assets/js/locationTranslation-CZjhgAjQ.js","assets/js/priceModes-ChfWGC9V.js","assets/js/vendor-icons-DMPRbIiR.js","assets/css/FzCard-B53C69tt.css","assets/js/vendor-axios-CTNHTGv4.js","assets/css/listings-DdeA5p8X.css","assets/js/categorySvgIcons-DhE5GQu1.js","assets/js/fixGermanText-tZVrwwcP.js","assets/css/HomePage-1Wi4i1wt.css","assets/js/AdDetailPage-q65d9aqj.js","assets/js/MapComponent-D0Aw2miY.js","assets/js/filterTranslation-CTjwGndV.js","assets/js/PromotionModal-D45jSm-1.js","assets/css/PromotionModal-DtSnWulp.css","assets/js/ShareButton-QJGsc1VT.js","assets/js/TrustBadge-BFSguSsi.js","assets/js/SellerHandlePill-BVch26Q7.js","assets/css/SellerHandlePill-BhuZVCNc.css","assets/js/vendor-charts-9QP5pyj1.js","assets/js/planFeatures-CwC6LKBg.js","assets/css/AdDetailPage-Dh540Zsn.css","assets/js/CreateAdPage-CMUSD2Zl.js","assets/js/useFormFields-UH6wgiRl.js","assets/css/useFormFields-DXDF7Y6h.css","assets/js/EditAdPage-dCFgmF2U.js","assets/js/FavoritesPage-BXDC6dGn.js","assets/js/HistoryPage-CW-fXD2h.js","assets/css/HistoryPage-39b9HJjt.css","assets/js/ProfilePage-CVaqMGIi.js","assets/js/useComplaintWebSocket-MrxpRfgg.js","assets/js/sellerReadiness-ZtZJ7how.js","assets/js/SellerPickupAddressGate-DXr-iSP4.js","assets/css/SellerPickupAddressGate-5Xt23R-y.css","assets/js/MyPromotionsPage-CZOK7gbH.js","assets/css/MyPromotionsPage-ZiMGKSFg.css","assets/js/PromotionPage-BoovimJR.js","assets/css/PromotionPage-s1emSIAR.css","assets/js/BalancePage-EAtAv4li.js","assets/js/SellerDashboardPage-DYlT3n7j.js","assets/css/SellerDashboardPage-hCxQBupc.css","assets/css/ProfilePage-DXuleDmG.css","assets/js/UsernameProfileRedirectPage-DHgUCqHD.js","assets/js/NotFoundPage-C7gDqp7t.js","assets/js/MessagesPage-C41jrLsw.js","assets/js/LoginPage-tIxWsiRM.js","assets/css/LoginPage-Cuy1PYe2.css","assets/css/LoginPage-CMFGh9pi.css","assets/js/RegisterPage-DOtjnS7d.js","assets/js/phoneCountries-HEFA7-D7.js","assets/css/RegisterPage-ClCK0ylX.css","assets/js/PhoneVerificationPage-Br1eXzUX.js","assets/js/CartPage-BwUhh7ka.js","assets/js/ShippingPage-CuWhMNj9.js","assets/css/ShippingPage-BNKH9Jxo.css","assets/css/CartPage-ClFLu9GZ.css","assets/js/ChatsPage-CDCe4dLb.js","assets/js/AllCategoriesPage-DK6Ecx4J.js","assets/js/SellerTypeFilter-DpujTNpo.js","assets/css/SellerTypeFilter-ATiP6F4S.css","assets/css/AllCategoriesPage-CDhHRcs_.css","assets/js/SellerAdsPage-W-bxx0vF.js","assets/css/SellerAdsPage-DW2TdpA2.css","assets/js/CategoryPage-CSyQOi6D.js","assets/css/CategoryPage-CLhs3y4j.css","assets/js/AdminPage-YmRJjywJ.js","assets/js/AdminAdvertisingPrices-DJ3mkZ0H.js","assets/js/AdminAuctionsPage-DEQOkpSU.js","assets/js/AdminAuctionCategoriesPage-BuuTwtDh.js","assets/js/staffClient-BGoUh9iJ.js","assets/js/CategorySpecsEditor-Dwyepe-5.js","assets/js/BannerModerationPage-Bnp_QlUX.js","assets/css/BannerModerationPage-CjDqsd06.css","assets/js/AdminSellersPage-D__gyLxL.js","assets/js/AdminBannerAds-Bs0pdnEC.js","assets/js/AdminCurrencySelector-DhRlKqj3.js","assets/js/ReferrersPage-BL5Iz-55.js","assets/css/ReferrersPage-N1utEO5B.css","assets/js/ReferralAntifraudPage-iR6mnXU9.js","assets/js/BackupManagerPage-p-XCJ3bl.js","assets/js/AdminForumPage-DeDOIlDB.js","assets/js/AdminStaffStatsPage-D0esCsND.js","assets/js/AdminSupportThreadsPage-vor1c3sO.js","assets/js/AdminDealDisputesPage-DHf_KVZh.js","assets/js/AdminSellerPayoutPanel-CmaRrhoL.js","assets/css/AdminDealDisputesPage-DMzwtU3C.css","assets/js/AdminDealReadinessPage-BjvvR7Jl.js","assets/css/AdminDealReadinessPage-CrvgWy5Q.css","assets/js/AdminKeepzReadinessPage-BSElENJr.js","assets/css/AdminKeepzReadinessPage-CNifsZAH.css","assets/js/AdminDeliveryPilotPage-B-dklTMp.js","assets/css/AdminDeliveryPilotPage-CWUmzNrg.css","assets/js/AdminOnboardingAnalyticsPage-BXBt5DN4.js","assets/css/AdminOnboardingAnalyticsPage-ROusG5r1.css","assets/js/AdminPickupPointsPage-D6yYMhyw.js","assets/css/AdminPickupPointsPage-BvsaoUYw.css","assets/js/AdminPickupOperatorPage-lOtS2i3n.js","assets/css/AdminPickupOperatorPage-3gPFTvcF.css","assets/js/AdminStaffChatPage-XWqCtkgx.js","assets/js/ProjectProgressPage-ZviLV9Nz.js","assets/js/StaffManagementPage-DWuMiyN4.js","assets/js/AuditLogPage-CPIwavy4.js","assets/css/AdminPage-BD9gEoh6.css","assets/js/CategoryManagerPage-IGHtqR6R.js","assets/js/WorldMapPage-6pIjPcej.js","assets/js/zoom-CMkpMZmU.js","assets/css/WorldMapPage-DdlxPzt6.css","assets/js/InvestigationPage-CA56px0d.js","assets/js/AdminAboutPage-B81x3JU5.js","assets/js/AdminTermsPage-B_mkp9s7.js","assets/js/AdminPrivacyPage-n124V_Vn.js","assets/js/AdminLegalPage-
1D-HQKBWA.js","assets/js/AdminPolicyPage-gLxO0vOW.js","assets/js/policyPages-YJwnwLlA.js","assets/js/compliancePolicies-B6EQKBTN.js","assets/js/AdminVacanciesPage-DIXYLtkz.js","assets/js/AdminContactsPage-CWR7L4or.js","assets/js/AdminSafeDealPage-DJ5iHwPo.js","assets/js/AdminHelpPage-BjwGTaPu.js","assets/js/AdminHowToOrderPage-Du6V8OjV.js","assets/js/AdminShippingPage-CFBZS4nX.js","assets/js/AdminPvzPage-B0jDzo5V.js","assets/js/PricingPage-B64jwcDL.js","assets/css/PricingPage-BJg8jTiQ.css","assets/js/DealsPage-C_yqnfYz.js","assets/css/DealsPage-D1ed_Ba-.css","assets/js/DealPage-BFP4cn03.js","assets/css/DealPage-ItIIWo_6.css","assets/js/CheckoutPage-DCAb8mdB.js","assets/css/CheckoutPage-CwA1Mo5w.css","assets/js/PaymentSuccessPage-UqKkshNC.js","assets/css/PaymentResultPage-C5VoYyBO.css","assets/js/PaymentCancelPage-DHwzN1VV.js","assets/js/ShopPage-BsDwz4m5.js","assets/css/ShopPage-B_6TKcfg.css","assets/js/MyShopPage-BfRpdaoD.js","assets/css/MyShopPage-mLbOAyjJ.css","assets/js/ShopMembersPage-C2oFC3X5.js","assets/css/ShopMembersPage-B77LAxH9.css","assets/js/AcceptInvitePage-Beyo0FOJ.js","assets/css/AcceptInvitePage-Bn6gjf4Q.css","assets/js/ShopAnalyticsPage-B9U47WFE.js","assets/css/ShopAnalyticsPage-MyedK1Qr.css","assets/js/BulkUploadPage-BNR_ZYYU.js","assets/css/BulkUploadPage-DwQhz_Ga.css","assets/js/ApiKeysPage-Cl63TZ97.js","assets/css/ApiKeysPage-CwiSTtPz.css","assets/js/EmployeeShopPage-C-Xf0EW2.js","assets/css/EmployeeShopPage-CJweT_Qe.css","assets/js/PromotionSuccessPage-9Vcx60_-.js","assets/css/PromotionResultPages-B7gC5RaX.css","assets/js/PromotionCancelPage-Cl_bkRZe.js","assets/js/AdvertisingPage-Cj7OyVvF.js","assets/js/AuctionsListPage-B2O1Eieg.js","assets/js/useAuctionWebSocket-Byvg9OWV.js","assets/css/AuctionsListPage-CMHBfKB6.css","assets/js/AuctionPage-CVJy8CJU.js","assets/js/CreateAuctionPage-B6o1Xrc3.js","assets/css/CreateAuctionPage-Ba5ImQZz.css","assets/js/AuctionHelpPage-5LpxHO8Y.js","assets/js/AuctionPaymentPage-bpSRLmed.js","assets/js/MyAuctionsPage-CHSGKBoG.js","assets/js/WatchlistPage-CYx9FgrO.js","assets/css/WatchlistPage-BLpTiwMX.css","assets/js/ComparePage-BQvhlnu1.js","assets/css/ComparePage-iuPl26Is.css","assets/js/index-CI4cuahO.js","assets/css/index-BNRs-8cv.css","assets/js/ForumPage-DvhxsnM_.js","assets/js/ForumTopicPage-lqRWHHSo.js","assets/js/TermsPage-Hecv9118.js","assets/js/LegalEntityCard-gu2sR640.js","assets/css/LegalEntityCard-BvaKpfUC.css","assets/js/PrivacyPage-XuGgTDIi.js","assets/js/staticPageDefaults-Cpze82Ag.js","assets/css/PrivacyPage-DAX1pqKZ.css","assets/js/RefundPolicyPage-CtkzaL7f.js","assets/js/CompliancePolicyPage-CubiMIsV.js","assets/js/LegalPage-XiHiEXJS.js","assets/css/LegalPage-jF3WzQKi.css","assets/js/VerificationPolicyPage-3vKMpKyx.js","assets/js/VacanciesPage-BszimTus.js","assets/css/VacanciesPage-CkSWC5Wz.css","assets/js/ContactsPage-Do-HG9Cx.js","assets/css/ContactsPage-DAJjorEh.css","assets/js/SafeDealPage-B7GWqqJt.js","assets/css/SafeDealPage-BcU7VgBa.css","assets/js/HelpPage-DcW5hlPl.js","assets/css/HelpPage-BoVHEnwx.css","assets/js/HowToOrderPage-mPeTEuOB.js","assets/css/HowToOrderPage-B1ExYJIc.css","assets/js/ShippingPage-8y6H60R-.js","assets/js/PvzPage-DK7IZ-_d.js","assets/css/PvzPage-CRIIuq_9.css","assets/js/CookiePolicyPage-CVbRBkZ5.js","assets/js/AuctionRulesPage-BUvf34_H.js","assets/js/AboutPage-BZeYU1bE.js","assets/css/AboutPage-CUd-osCD.css","assets/js/FAQPage-5C0PfvCL.js","assets/js/AccountSettingsPage-dQJWArXm.js","assets/css/AccountSettingsPage-DbcvMu-4.css","assets/js/StaffLoginPage-gx-E0fmG.js","assets/js/StaffInvitePage-DzGCsyW7.js","assets/js/StaffAcceptInvitePage-CEBUqyOt.js","assets/js/StaffDashboardPage-nGsa3VQR.js","assets/js/StaffChangePasswordPage-5qdcFZNF.js"])))=>i.map(i=>d[i]);
2var e,t,n=Object.defineProperty,a=(e,t,a)=>((e,t,a)=>t in e?n(e,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):e[t]=a)(e,"symbol"!=typeof t?t+"":t,a);import{a as r,c as i,g as o,r as s,d as l,u as c,e as d,L as u,O as p,N as m,b as f,f as h,h as g,i as b,B as x}from"./vendor-react-rVzPP0Xx.js";import{i as y,B as _,a as w,u as v,w as j}from"./vendor-i18n-Bcz9YpTC.js";import{a as k}from"./vendor-axios-CTNHTGv4.js";import{S as z,C as S,H as E,L as C,P as A,a as I,U as T,b as N,c as P,W as L,R as $,M as R,A as D,d as B,e as O,X as F,f as M,g as V,h as U}from"./vendor-icons-DMPRbIiR.js";!function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const e of document.querySelectorAll('link[rel="modulepreload"]'))t(e);new MutationObserver(e=>{for(const n of e)if("childList"===n.type)for(const e of n.addedNodes)"LINK"===e.tagName&&"modulepreload"===e.rel&&t(e)}).observe(document,{childList:!0,subtree:!0})}function t(e){if(e.ep)return;e.ep=!0;const t=function(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),"use-credentials"===e.crossOrigin?t.credentials="include":"anonymous"===e.crossOrigin?t.credentials="omit":t.credentials="same-origin",t}(e);fetch(e.href,t)}}();
2var W,H,K={exports:{}},q={};var G,J=(H||(H=1,K.exports=function(){if(W)return q;W=1;var e=r(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),a=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,o={key:!0,ref:!0,__self:!0,__source:!0};function s(e,n,r){var s,l={},c=null,d=null;for(s in void 0!==r&&(c=""+r),void 0!==n.key&&(c=""+n.key),void 0!==n.ref&&(d=n.ref),n)a.call(n,s)&&!o.hasOwnProperty(s)&&(l[s]=n[s]);if(e&&e.defaultProps)for(s in n=e.defaultProps)void 0===l[s]&&(l[s]=n[s]);return{$$typeof:t,type:e,key:c,ref:d,props:l,_owner:i.current}}return q.Fragment=n,q.jsx=s,q.jsxs=s,q}()),K.exports),Y={};const Z=o(function(){if(G)return Y;G=1;var e=i();return Y.createRoot=e.createRoot,Y.hydrateRoot=e.hydrateRoot,Y}());var Q,X;const ee=o(function(){if(X)return Q;X=1;var e="undefined"!=typeof Element,t="function"==typeof Map,n="function"==typeof Set,a="function"==typeof ArrayBuffer&&!!ArrayBuffer.isView;function r(i,o){if(i===o)return!0;if(i&&o&&"object"==typeof i&&"object"==typeof o){if(i.constructor!==o.constructor)return!1;var s,l,c,d;if(Array.isArray(i)){if((s=i.length)!=o.length)return!1;for(l=s;0!==l--;)if(!r(i[l],o[l]))return!1;return!0}if(t&&i instanceof Map&&o instanceof Map){if(i.size!==o.size)return!1;for(d=i.entries();!(l=d.next()).done;)if(!o.has(l.value[0]))return!1;for(d=i.entries();!(l=d.next()).done;)if(!r(l.value[1],o.get(l.value[0])))return!1;return!0}if(n&&i instanceof Set&&o instanceof Set){if(i.size!==o.size)return!1;for(d=i.entries();!(l=d.next()).done;)if(!o.has(l.value[0]))return!1;return!0}if(a&&ArrayBuffer.isView(i)&&ArrayBuffer.isView(o)){if((s=i.length)!=o.length)return!1;for(l=s;0!==l--;)if(i[l]!==o[l])return!1;return!0}if(i.constructor===RegExp)return i.source===o.source&&i.flags===o.flags;if(i.valueOf!==Object.prototype.valueOf&&"function"==typeof i.valueOf&&"function"==typeof o.valueOf)return i.valueOf()===o.valueOf();if(i.toString!==Object.prototype.toString&&"function"==typeof i.toString&&"function"==typeof o.toString)return i.toString()===o.toString();if((s=(c=Object.keys(i)).length)!==Object.keys(o).length)return!1;for(l=s;0!==l--;)if(!Object.prototype.hasOwnProperty.call(o,c[l]))return!1;if(e&&i instanceof Element)return!1;for(l=s;0!==l--;)if(("_owner"!==c[l]&&"__v"!==c[l]&&"__o"!==c[l]||!i.$$typeof)&&!r(i[c[l]],o[c[l]]))return!1;return!0}return i!=i&&o!=o}return Q=function(e,t){try{return r(e,t)}catch(n){if((n.message||"").match(/stack|recursion/i))return!1;throw n}}}());var te,ne;const ae=o(ne?te:(ne=1,te=function(e,t,n,a,r,i,o,s){if(!e){var l;if(void 0===t)l=new Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[n,a,r,i,o,s],d=0;(l=new Error(t.replace(/%s/g,function(){return c[d++]}))).name="Invariant Violation"}throw l.framesToPop=1,l}}));var re,ie;const oe=o(ie?re:(ie=1,re=function(e,t,n,a){var r=n?n.call(a,e,t):void 0;if(void 0!==r)return!!r;if(e===t)return!0;if("object"!=typeof e||!e||"object"!=typeof t||!t)return!1;var i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return!1;for(var s=Object.prototype.hasOwnProperty.bind(t),l=0;l<i.length;l++){var c=i[l];if(!s(c))return!1;var d=e[c],u=t[c];if(!1===(r=n?n.call(a,d,u,c):void 0)||void 0===r&&d!==u)return!1}return!0}));var se=(e=>(e.BASE="base",e.BODY="body",e.HEAD="head",e.HTML="html",e.LINK="link",e.META="meta",e.NOSCRIPT="noscript",e.SCRIPT="script",e.STYLE="style",e.TITLE="title",e.FRAGMENT="Symbol(react.fragment)",e))(se||{}),le={rel:["amphtml","canonical","alternate"]},ce={type:["application/ld+json"]},de={charset:"",name:["generator","robots","description"],property:["og:type","og:title","og:url","og:image","og:image:alt","og:description","twitter:url","twitter:title","twitter:description","twitter:image","twitter:image:alt","twitter:card","twitter:site"]},ue=Object.values(se),pe={accesskey:"accessKey",charset:"charSet",class:"className",contenteditable:"contentEditable",contextmenu:"contextMenu","http-equiv":"httpEquiv",itemprop:"itemProp",tabindex:"tabIndex"},me=Object.entries(pe).reduce((e,[t,n])=>(e[n]=t,e),{}),fe="data-rh",he="defaultTitle",ge="defer",be="encodeSpecialCharacters",xe="onChangeClientState",ye="titleTemplate",_e="prioritizeSeoTags",we=(e,t)=>{for(let n=e.length-1;n>=0;n-=1){const a=e[n];if(Object.prototype.hasOwnProperty.call(a,t))return a[t]}return null},ve=e=>{let t=we(e,"title");const n=we(e,ye);
2if(Array.isArray(t)&&(t=t.join("")),n&&t)return n.replace(/%s/g,()=>t);const a=we(e,he);return t||a||void 0},je=e=>we(e,xe)||(()=>{}),ke=(e,t)=>t.filter(t=>void 0!==t[e]).map(t=>t[e]).reduce((e,t)=>({...e,...t}),{}),ze=(e,t)=>t.filter(e=>void 0!==e.base).map(e=>e.base).reverse().reduce((t,n)=>{if(!t.length){const a=Object.keys(n);for(let r=0;r<a.length;r+=1){const i=a[r].toLowerCase();if(-1!==e.indexOf(i)&&n[i])return t.concat(n)}}return t},[]),Se=(e,t,n)=>{const a={};return n.filter(t=>!!Array.isArray(t[e])||(void 0!==t[e]&&(t[e],console&&console.warn),!1)).map(t=>t[e]).reverse().reduce((e,n)=>{const r={};n.filter(e=>{let n;const i=Object.keys(e);for(let a=0;a<i.length;a+=1){const r=i[a],o=r.toLowerCase();-1===t.indexOf(o)||"rel"===n&&"canonical"===e[n].toLowerCase()||"rel"===o&&"stylesheet"===e[o].toLowerCase()||(n=o),-1===t.indexOf(r)||"innerHTML"!==r&&"cssText"!==r&&"itemprop"!==r||(n=r)}if(!n||!e[n])return!1;const o=e[n].toLowerCase();return a[n]||(a[n]={}),r[n]||(r[n]={}),!a[n][o]&&(r[n][o]=!0,!0)}).reverse().forEach(t=>e.push(t));const i=Object.keys(r);for(let t=0;t<i.length;t+=1){const e=i[t],n={...a[e],...r[e]};a[e]=n}return e},[]).reverse()},Ee=(e,t)=>{if(Array.isArray(e)&&e.length)for(let n=0;n<e.length;n+=1){if(e[n][t])return!0}return!1},Ce=e=>Array.isArray(e)?e.join(""):e,Ae=(e,t)=>Array.isArray(e)?e.reduce((e,n)=>(((e,t)=>{const n=Object.keys(e);for(let a=0;a<n.length;a+=1)if(t[n[a]]&&t[n[a]].includes(e[n[a]]))return!0;return!1})(n,t)?e.priority.push(n):e.default.push(n),e),{priority:[],default:[]}):{default:e,priority:[]},Ie=(e,t)=>({...e,[t]:void 0}),Te=["noscript","script","style"],Ne=(e,t=!0)=>!1===t?String(e):String(e).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#x27;"),Pe=e=>Object.keys(e).reduce((t,n)=>{const a=void 0!==e[n]?`${n}="${e[n]}"`:`${n}`;return t?`${t} ${a}`:a},""),Le=(e,t={})=>Object.keys(e).reduce((t,n)=>(t[pe[n]||n]=e[n],t),t),$e=(e,t)=>t.map((t,n)=>{const a={key:n,[fe]:!0};return Object.keys(t).forEach(e=>{const n=pe[e]||e;if("innerHTML"===n||"cssText"===n){const e=t.innerHTML||t.cssText;a.dangerouslySetInnerHTML={__html:e}}else a[n]=t[e]}),l.createElement(e,a)}),Re=(e,t,n=!0)=>{switch(e){case"title":return{toComponent:()=>((e,t,n)=>{const a=Le(n,{key:t,[fe]:!0});return[l.createElement("title",a,t)]})(0,t.title,t.titleAttributes),toString:()=>((e,t,n,a)=>{const r=Pe(n),i=Ce(t);return r?`<${e} ${fe}="true" ${r}>${Ne(i,a)}</${e}>`:`<${e} ${fe}="true">${Ne(i,a)}</${e}>`})(e,t.title,t.titleAttributes,n)};case"bodyAttributes":case"htmlAttributes":return{toComponent:()=>Le(t),toString:()=>Pe(t)};default:return{toComponent:()=>$e(e,t),toString:()=>((e,t,n=!0)=>t.reduce((t,a)=>{const r=a,i=Object.keys(r).filter(e=>!("innerHTML"===e||"cssText"===e)).reduce((e,t)=>{const a=void 0===r[t]?t:`${t}="${Ne(r[t],n)}"`;return e?`${e} ${a}`:a},""),o=r.innerHTML||r.cssText||"",s=-1===Te.indexOf(e);return`${t}<${e} ${fe}="true" ${i}${s?"/>":`>${o}</${e}>`}`},""))(e,t,n)}}},De=e=>{const{baseTag:t,bodyAttributes:n,encode:a=!0,htmlAttributes:r,noscriptTags:i,styleTags:o,title:s="",titleAttributes:l,prioritizeSeoTags:c}=e;let{linkTags:d,metaTags:u,scriptTags:p}=e,m={toComponent:()=>[],toString:()=>""};return c&&({priorityMethods:m,linkTags:d,metaTags:u,scriptTags:p}=(({metaTags:e,linkTags:t,scriptTags:n,encode:a})=>{const r=Ae(e,de),i=Ae(t,le),o=Ae(n,ce);return{priorityMethods:{toComponent:()=>[...$e("meta",r.priority),...$e("link",i.priority),...$e("script",o.priority)],toString:()=>`${Re("meta",r.priority,a)} ${Re("link",i.priority,a)} ${Re("script",o.priority,a)}`},metaTags:r.default,linkTags:i.default,scriptTags:o.default}})(e)),{priority:m,base:Re("base",t,a),bodyAttributes:Re("bodyAttributes",n,a),htmlAttributes:Re("htmlAttributes",r,a),link:Re("link",d,a),meta:Re("meta",u,a),noscript:Re("noscript",i,a),script:Re("script",p,a),style:Re("style",o,a),title:Re("title",{title:s,titleAttributes:l},a)}},Be=[],Oe=!("undefined"==typeof window||!window.document||!window.document.createElement),Fe=class{constructor(e,t){a(this,"instances",[]),a(this,"canUseDOM",Oe),a(this,"context"),a(this,"value",{setHelmet:e=>{this.context.helmet=e},helmetInstances:{get:()=>this.canUseDOM?Be:this.instances,add:e=>{(this.canUseDOM?Be:this.instances).push(e)},remove:e=>{const t=(this.canUseDOM?Be:this.instances).indexOf(e);(this.canUseDOM?Be:this.instances).splice(t,1)}}}),this.context=e,this.canUseDOM=t||!1,t||(e.helmet=De({baseTag:[],bodyAttributes:{},htmlAttributes:{},linkTags:[],metaTags:[],noscriptTags:[],scriptTags:[],styleTags:[],title:"",titleAttributes:{}}))}},Me=parseInt(l.version.split(".")[0],10)>=19,Ve=l.createContext({}),Ue=(e=class extends s.Component{constructor(t){super(t),a(this,"helmetData"),this.helmetData=Me?null:new Fe(this.props.context||{},e.canUseDOM)}render(){return Me?l.createElement(l.Fragment,null,this.props.children):l.createElement(Ve.Provider,{value:this.helmetData.value},this.props.children)}},a(e,"canUseDOM",Oe),e),We=(e,t)=>
2{const n=document.head||document.querySelector("head"),a=n.querySelectorAll(`${e}[${fe}]`),r=[].slice.call(a),i=[];let o;return t&&t.length&&t.forEach(t=>{const n=document.createElement(e);for(const e in t)if(Object.prototype.hasOwnProperty.call(t,e))if("innerHTML"===e)n.innerHTML=t.innerHTML;else if("cssText"===e){const e=t.cssText;n.appendChild(document.createTextNode(e))}else{const a=e,r=void 0===t[a]?"":t[a];n.setAttribute(e,r)}n.setAttribute(fe,"true"),r.some((e,t)=>(o=t,n.isEqualNode(e)))?r.splice(o,1):i.push(n)}),r.forEach(e=>e.parentNode?.removeChild(e)),i.forEach(e=>n.appendChild(e)),{oldTags:r,newTags:i}},He=(e,t)=>{const n=document.getElementsByTagName(e)[0];if(!n)return;const a=n.getAttribute(fe),r=a?a.split(","):[],i=[...r],o=Object.keys(t);for(const s of o){const e=t[s]||"";n.getAttribute(s)!==e&&n.setAttribute(s,e),-1===r.indexOf(s)&&r.push(s);const a=i.indexOf(s);-1!==a&&i.splice(a,1)}for(let s=i.length-1;s>=0;s-=1)n.removeAttribute(i[s]);r.length===i.length?n.removeAttribute(fe):n.getAttribute(fe)!==o.join(",")&&n.setAttribute(fe,o.join(","))},Ke=(e,t)=>{const{baseTag:n,bodyAttributes:a,htmlAttributes:r,linkTags:i,metaTags:o,noscriptTags:s,onChangeClientState:l,scriptTags:c,styleTags:d,title:u,titleAttributes:p}=e;He("body",a),He("html",r),((e,t)=>{void 0!==e&&document.title!==e&&(document.title=Ce(e)),He("title",t)})(u,p);const m={baseTag:We("base",n),linkTags:We("link",i),metaTags:We("meta",o),noscriptTags:We("noscript",s),scriptTags:We("script",c),styleTags:We("style",d)},f={},h={};Object.keys(m).forEach(e=>{const{newTags:t,oldTags:n}=m[e];t.length&&(f[e]=t),n.length&&(h[e]=m[e].oldTags)}),t&&t(),l(e,f,h)},qe=null,Ge=e=>{qe&&cancelAnimationFrame(qe),e.defer?qe=requestAnimationFrame(()=>{Ke(e,()=>{qe=null})}):(Ke(e),qe=null)},Je=class extends s.Component{constructor(){super(...arguments),a(this,"rendered",!1)}shouldComponentUpdate(e){return!oe(e,this.props)}componentDidUpdate(){this.emitChange()}componentWillUnmount(){const{helmetInstances:e}=this.props.context;e.remove(this),this.emitChange()}emitChange(){const{helmetInstances:e,setHelmet:t}=this.props.context;let n=null;const a=(r=e.get().map(e=>{const{context:t,...n}=e.props;return n}),{baseTag:ze(["href"],r),bodyAttributes:ke("bodyAttributes",r),defer:we(r,ge),encode:we(r,be),htmlAttributes:ke("htmlAttributes",r),linkTags:Se("link",["rel","href"],r),metaTags:Se("meta",["name","charset","http-equiv","property","itemprop"],r),noscriptTags:Se("noscript",["innerHTML"],r),onChangeClientState:je(r),scriptTags:Se("script",["src","innerHTML"],r),styleTags:Se("style",["cssText"],r),title:ve(r),titleAttributes:ke("titleAttributes",r),prioritizeSeoTags:Ee(r,_e)});var r;Ue.canUseDOM?Ge(a):De&&(n=De(a)),t(n)}init(){if(this.rendered)return;this.rendered=!0;const{helmetInstances:e}=this.props.context;e.add(this),this.emitChange()}render(){return this.init(),null}},Ye=[],Ze=e=>{const t={};for(const n of Object.keys(e))t[me[n]||n]=e[n];return t},Qe=e=>{const t={};for(const n of Object.keys(e)){t[pe[n]||n]=e[n]}return t},Xe=(e,t)=>{if(!Oe)return;const n=document.getElementsByTagName(e)[0];if(!n)return;const a="data-rh-managed",r=n.getAttribute(a),i=r?r.split(","):[],o=Object.keys(t);for(const s of i)o.includes(s)||n.removeAttribute(s);for(const s of o){const e=t[s];null==e||!1===e?n.removeAttribute(s):!0===e?n.setAttribute(s,""):n.setAttribute(s,String(e))}o.length>0?n.setAttribute(a,o.join(",")):n.removeAttribute(a)},et=()=>{const e={},t={};for(const n of Ye){const{htmlAttributes:a,bodyAttributes:r}=n.props;a&&Object.assign(e,Ze(a)),r&&Object.assign(t,Ze(r))}Xe("html",e),Xe("body",t)},tt=class extends s.Component{componentDidMount(){Ye.push(this),et()}componentDidUpdate(){et()}componentWillUnmount(){const e=Ye.indexOf(this);-1!==e&&Ye.splice(e,1),et()}resolveTitle(){const{title:e,titleTemplate:t,defaultTitle:n}=this.props;return e&&t?t.replace(/%s/g,()=>Array.isArray(e)?e.join(""):e):e||n||void 0}renderTitle(){const e=this.resolveTitle();if(void 0===e)return null;const t=this.props.titleAttributes||{};return l.createElement("title",Qe(t),e)}renderBase(){const{base:e}=this.props;return e?l.createElement("base",Qe(e)):null}renderMeta(){const{meta:e}=this.props;return e&&Array.isArray(e)?e.map((e,t)=>l.createElement("meta",{key:t,...Qe(e)})):null}renderLink(){const{link:e}=this.props;return e&&Array.isArray(e)?e.map((e,t)=>l.createElement("link",{key:t,...Qe(e)})):null}renderScript(){const{script:e}=this.props;return e&&Array.isArray(e)?e.map((e,t)=>{const{innerHTML:n,...a}=e,r=Qe(a);return n&&(r.dangerouslySetInnerHTML={__html:n}),l.createElement("script",{key:t,...r})}):null}renderStyle(){const{style:e}=this.props;return e&&Array.isArray(e)?e.map((e,t)=>{const{cssText:n,...a}=e,r=Qe(a);return n&&(r.dangerouslySetInnerHTML={__html:n}),l.createElement("style",{key:t,...r})}):null}renderNoscript(){const{noscript:e}=this.props;return e&&Array.isArray(e)?e.map((e,t)=>{const{innerHTML:n,...a}=e,r=Qe(a);return n&&(r.dangerouslySetInnerHTML={__html:n}),l.createElement("noscript",{key:t,...r})}):null}render(){return l.createElement(l.Fragment,null,this.renderTitle(),this.renderBase(),this.renderMeta(),this.renderLink(),this.renderScript(),this.renderStyle(),this.renderNoscript())}},nt=(t=class extends s.Component{shouldComponentUpdate(e){return!ee(Ie(this.props,"helmetData"),Ie(e,"helmetData"))}mapNestedChildrenToProps(e,t){if(!t)return null;switch(e.type){case"script":case"noscript":return{innerHTML:t};case"style":return{cssText:t};default:throw new Error(`<${e.type} /> elements are self-closing and can not contain children. Refer to our API for more information.`)}}flattenArrayTypeChildren(e,t,n,a){return{...t,[e.type]:[...t[e.type]||[],{...n,...this.mapNestedChildrenToProps(e,a)}]}}mapObjectTypeChildren(e,t,n,a){switch(e.type){case"title":return{...t,[e.type]:a,titleAttributes:{...n}};case"body":return{...t,bodyAttributes:{...n}};case"html":return{...t,htmlAttributes:{...n}};default:return{...t,[e.type]:{...n}}}}mapArrayTypeChildrenToProps(e,t){let n={...t};return Object.keys(e).forEach(t=>{n={...n,[t]:e[t]}}),n}
2warnOnInvalidChildren(e,t){return ae(ue.some(t=>e.type===t),"function"==typeof e.type?"You may be attempting to nest <Helmet> components within each other, which is not allowed. Refer to our API for more information.":`Only elements types ${ue.join(", ")} are allowed. Helmet does not support rendering <${e.type}> elements. Refer to our API for more information.`),ae(!t||"string"==typeof t||Array.isArray(t)&&!t.some(e=>"string"!=typeof e),`Helmet expects a string as a child of <${e.type}>. Did you forget to wrap your children in braces? ( <${e.type}>{\`\`}</${e.type}> ) Refer to our API for more information.`),!0}mapChildrenToProps(e,t){let n={};return l.Children.forEach(e,e=>{if(!e||!e.props)return;const{children:a,...r}=e.props,i=Object.keys(r).reduce((e,t)=>(e[me[t]||t]=r[t],e),{});let{type:o}=e;switch("symbol"==typeof o?o=o.toString():this.warnOnInvalidChildren(e,a),o){case"Symbol(react.fragment)":t=this.mapChildrenToProps(a,t);break;case"link":case"meta":case"noscript":case"script":case"style":n=this.flattenArrayTypeChildren(e,n,i,a);break;default:t=this.mapObjectTypeChildren(e,t,i,a)}}),this.mapArrayTypeChildrenToProps(n,t)}render(){const{children:e,...t}=this.props;let n={...t},{helmetData:a}=t;if(e&&(n=this.mapChildrenToProps(e,n)),a&&!(a instanceof Fe)){a=new Fe(a.context,!0),delete n.helmetData}return Me?l.createElement(tt,{...n}):a?l.createElement(Je,{...n,context:a.value}):l.createElement(Ve.Consumer,null,e=>l.createElement(Je,{...n,context:e}))}},a(t,"defaultProps",{defer:!0,encodeSpecialCharacters:!0,prioritizeSeoTags:!1}),t);const at={},rt=function(e,t,n){let a=Promise.resolve();if(t&&t.length>0){let e=function(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:"fulfilled",value:e}),e=>({status:"rejected",reason:e}))))};document.getElementsByTagName("link");const n=document.querySelector("meta[property=csp-nonce]"),r=n?.nonce||n?.getAttribute("nonce");a=e(t.map(e=>{if((e=function(e){return"/"+e}(e))in at)return;at[e]=!0;const t=e.endsWith(".css"),n=t?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${e}"]${n}`))return;const a=document.createElement("link");return a.rel=t?"stylesheet":"modulepreload",t||(a.as="script"),a.crossOrigin="",a.href=e,r&&a.setAttribute("nonce",r),document.head.appendChild(a),t?new Promise((t,n)=>{a.addEventListener("load",t),a.addEventListener("error",()=>n(new Error(`Unable to preload CSS for ${e}`)))}):void 0}))}function r(e){const t=new Event("vite:preloadError",{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return a.then(t=>{for(const e of t||[])"rejected"===e.status&&r(e.reason);return e().catch(r)})},it=["ru","en","ka","es","ar","zh","de","fr","tr"],ot=new Set(it),st="freezoni_language",lt="freezoni_lang",ct="i18nextLng",dt="freezoni_language_user_selected_at",ut=()=>"undefined"!=typeof window&&Boolean(window.localStorage),pt=e=>{const t=String(e||"").trim().toLowerCase().split("-")[0];return ot.has(t)?t:null},mt=()=>{if("undefined"==typeof window||void 0===window.navigator)return null;const e=[...Array.isArray(window.navigator.languages)?window.navigator.languages:[],window.navigator.language,window.navigator.userLanguage].filter(Boolean);for(const t of e){const e=pt(t);if(e)return e}return null},ft=({includeI18next:e=!0}={})=>{if(!ut())return null;try{const t=[window.localStorage.getItem(st),window.localStorage.getItem(lt)];e&&t.push(window.localStorage.getItem(ct));for(const e of t){const t=pt(e);if(t)return t}}catch{return null}return null},ht=(e,{explicit:t=!0}={})=>{const n=pt(e)||"en";if(!ut())return n;try{window.localStorage.setItem(st,n),window.localStorage.setItem(ct,n),window.localStorage.removeItem(lt),t&&window.localStorage.setItem(dt,String(Date.now()))}catch{}return n},gt=()=>{if(!ut())return!1;try{return Boolean(pt(window.localStorage.getItem(st))||pt(window.localStorage.getItem(lt))||window.localStorage.getItem(dt))}catch{return!1}},bt="ru",xt=Object.freeze({ru:"ru",en:"en",ka:"ka",es:"es",ar:"ar",zh:"zh-CN",de:"de",fr:"fr",tr:"tr"}),yt=Object.freeze({ru:"ru_RU",en:"en_US",ka:"ka_GE",es:"es_ES",ar:"ar_AE",zh:"zh_CN",de:"de_DE",fr:"fr_FR",tr:"tr_TR"}),_t=/^\/fz-[0-9a-f]{24}(\/|$)/i,wt=["/admin","/staff","/api","/ws"],vt=(e="/")=>{const t=String(e||"/").match(/^([^?#]*)(.*)$/);return{pathname:t?.[1]||"/",suffix:t?.[2]||""}},jt=(e="/")=>e?e.startsWith("/")?e:`/${e}`:"/",kt=(e="")=>
2{const t=vt(e).pathname,n=jt(t).split("/").filter(Boolean)[0];return pt(n)},zt=(e="/")=>{const t=jt(vt(e).pathname),n=t.split("/");if(pt(n[1])){const e=n.slice(2).join("/");return e?`/${e}`:"/"}return t||"/"},St=(e="/")=>{const{pathname:t,suffix:n}=vt(e);return`${zt(t)}${n}`},Et=(e="/")=>{const t=zt(e).toLowerCase();return!_t.test(t)&&!wt.some(e=>t===e||t.startsWith(`${e}/`))},Ct=(e,t="/")=>{const n=pt(e)||bt,{pathname:a,suffix:r}=vt(t),i=zt(a);return`${"/"===i?`/${n}/`:`/${n}${i}`}${r}`},At=(e="/",t="")=>{if(/^https?:\/\//i.test(e))return e;return`${String(t||"").replace(/\/+$/,"")}${jt(e)}`},It=(e="/",t="")=>it.map(n=>({language:n,hreflang:xt[n]||n,href:At(Ct(n,e),t)})),Tt=e=>{const t=pt(e)||bt;return yt[t]||yt[bt]},Nt=bt,Pt=["ar"],Lt=Object.assign({
2"./locales/ar.json":()=>rt(()=>import("./ar-vN3pk9Ub.js"),[]),
2"./locales/de.json":()=>rt(()=>import("./de-pV_QJ20-.js"),[]),
2"./locales/en.json":()=>rt(()=>import("./en-Crb8fLcj.js"),[]),
2"./locales/es.json":()=>rt(()=>import("./es-BSU77jTN.js"),[]),
2"./locales/fr.json":()=>rt(()=>import("./fr-CbjeLz1G.js"),[]),
2"./locales/ka.json":()=>rt(()=>import("./ka-CpXt-X9a.js"),[]),
2"./locales/ru.json":()=>rt(()=>import("./ru-TThZvrMn.js"),[]),
2"./locales/tr.json":()=>rt(()=>import("./tr-CDpIyn9n.js"),[]),
2"./locales/zh.json":()=>rt(()=>import("./zh-DXiH5RzW.js"),[])
2}),$t=async e=>{const t=pt(e)||Nt,n=(e=>Lt[`./locales/${e}.json`])(t);if(!n)throw new Error(`Missing locale bundle for language: ${t}`);const a=await n();return a.default||a},Rt=async(e,{explicit:t=!0}={})=>{const n=ht(e,{explicit:t}),a=pt(y.language);try{await(async e=>{const t=pt(e)||Nt;if(!y.hasResourceBundle(t,"translation")){const e=await $t(t);y.addResourceBundle(t,"translation",e,!0,!0)}return t})(n)}catch(r){}return await y.changeLanguage(n),a===n&&y.emit("languageChanged",n),n},Dt={type:"backend",read(e,t,n){$t(e).then(e=>n(null,e)).catch(e=>n(e,!1))}},Bt=e=>{const t=pt(e)||Nt,n=Pt.includes(t)?"rtl":"ltr";document.documentElement.setAttribute("dir",n),document.documentElement.setAttribute("lang",t),document.body.style.direction=n},Ot=(()=>{const e="undefined"!=typeof window?kt(window.location.pathname):null;if(e)return ht(e,{explicit:!1}),e;const t=ft();return t?(ht(t,{explicit:!1}),t):mt()||Nt})(),Ft=(async e=>{const t=Array.from(new Set([Nt,pt(e)||Nt])),n=await Promise.all(t.map(async e=>[e,{translation:await $t(e)}]));return Object.fromEntries(n)})(Ot).then(e=>y.use(_).use(Dt).use(w).init({resources:{...e},fallbackLng:Nt,supportedLngs:it,nonExplicitSupportedLngs:!0,load:"languageOnly",lng:Ot,ns:["translation"],defaultNS:"translation",interpolation:{escapeValue:!1},detection:{order:["localStorage"],caches:["localStorage"],lookupLocalStorage:"freezoni_language"}}).then(()=>(Bt(y.language),y.on("languageChanged",e=>{ht(e,{explicit:!1}),Bt(e)}),y))),Mt="/admin",Vt="/staff",Ut=(e=>{const t=String(e).trim();if(!t)return Mt;const n=(t.startsWith("/")?t:`/${t}`).replace(/\/+/g,"/").replace(/\/$/,"");return n&&"/"!==n?n.startsWith("/api")||n.startsWith("/ws")||n.startsWith("/uploads")?Mt:n:Mt})("/fz-587966978b06d8f2c2fb5783"),Wt=`${Ut}/login`,Ht=`${Ut}/invite`,Kt=`${Ut}/accept-invite`,qt=`${Ut}/dashboard`,Gt=`${Ut}/change-password`,Jt=`${Ut}/pickup-operator`,Yt=(e="")=>{const t=String(e||"").trim();return t&&"/"!==t?`${Ut}/${t.replace(/^\/+/,"")}`:Ut},Zt=(e="")=>e===Vt||e.startsWith(`${Vt}/`),Qt=(e="")=>((e="")=>e===Ut||e.startsWith(`${Ut}/`))(e)||Zt(e),Xt=e=>{if(((e="")=>e===Mt||e.startsWith(`${Mt}/`))(e)){const t=e.slice(6);return Yt(t)}return e===`${Vt}/login`?Wt:e===`${Vt}/accept-invite`?Kt:e===`${Vt}/dashboard`?qt:e===`${Vt}/change-password`?Gt:e===`${Vt}/pickup-operator`?Jt:e.startsWith(`${Vt}/invite/`)||e.startsWith(`${Vt}/mfa`)?Yt(e.slice(6)):e},en=e=>{if(Ut===Mt||!e)return e;try{const t=new URL(String(e),window.location.origin);if(t.origin!==window.location.origin)return e;const n=Xt(t.pathname);return n===t.pathname?e:(t.pathname=n,`${t.pathname}${t.search}${t.hash}`)}catch{return e}},tn="/api",nn=tn.replace(/\/api\/?$/,""),an="freezoni_view_history",rn=/\.(jpe?g|png|gif|webp)$/i,on=/^https?:\/\/(?:localhost:5000|(?:www\.)?freezoni\.(?:com|ge|info))(?=\/(?:uploads|images|icons|assets)\/)/i,sn=/_(?:thumb|card|placeholder)\.webp$/i,ln=new Set(["ventservice.com.ge"]),cn=e=>e?String(e).replace(on,""):"",dn=e=>{const t=cn(e);if(!t)return"";if(t.startsWith("http://")||t.startsWith("https://")){try{const e=new URL(t);if("https:"===e.protocol&&ln.has(e.hostname.toLowerCase())){const t=new URLSearchParams({url:e.toString(),variant:"original"});return`${nn}/uploads/external-image?${t.toString()}`}}catch{return""}return t}return t.startsWith("/uploads/")||t.startsWith("/")?`${nn}${t}`:`${nn}/uploads/${t}`},un=(e,t="card")=>{const n=cn(e);if(!n)return"";if(n.startsWith("http://")||n.startsWith("https://")){try{const e=new URL(n);if("https:"===e.protocol&&ln.has(e.hostname.toLowerCase())){if("placeholder"===t)return"";const n=new URLSearchParams({url:e.toString(),variant:t});return`${nn}/uploads/external-image?${n.toString()}`}}catch{return""}return dn(n)}const a=n.indexOf("?"),r=a>=0?n.slice(0,a):n,i=a>=0?n.slice(a):"";return rn.test(r)?sn.test(r)?dn(n):dn(`${r.replace(/\.[^./?#]+$/i,`_${t}.webp`)}${i}`):dn(n)},pn=e=>un(e,"card"),mn=e=>un(e,"thumb"),fn=e=>un(e,"placeholder"),hn=/^[A-Za-z0-9_-]{11}$/,gn=e=>{if(!e)return"";try{const t=new URL((e=>{const t=String(e||"").trim();return t?/^https?:\/\//i.test(t)?t:`https://${t}`:""})(e)),n=t.hostname.replace(/^www\./i,"").toLowerCase();
2if("youtu.be"===n){const e=t.pathname.split("/").filter(Boolean)[0];return hn.test(e)?`https://www.youtube.com/embed/${e}`:""}if("youtube.com"===n||"m.youtube.com"===n||"youtube-nocookie.com"===n){const e=t.searchParams.get("v");if(hn.test(e||""))return`https://www.youtube.com/embed/${e}`;const n=t.pathname.match(/\/(?:embed|shorts|live)\/([A-Za-z0-9_-]{11})/);return n?.[1]?`https://www.youtube.com/embed/${n[1]}`:""}if("rutube.ru"===n){const e=t.pathname.match(/\/video\/([a-f0-9]+)/i);return e?.[1]?`https://rutube.ru/play/embed/${e[1]}`:""}}catch{return""}return""},bn=e=>gn(e),xn=e=>Boolean(gn(e)),yn=e=>(e||(e=window.location.pathname),Qt(e)),_n=()=>!!localStorage.getItem("staff_token"),wn=()=>{const e=localStorage.getItem("staff_user");if(e)try{return JSON.parse(e)}catch(t){return null}return null},vn=()=>{localStorage.removeItem("staff_token"),localStorage.removeItem("staff_user"),localStorage.removeItem("staff_mfa_pending"),localStorage.removeItem("staff_last_activity_at"),localStorage.removeItem("impersonating"),localStorage.removeItem("impersonated_staff"),localStorage.removeItem("admin_original_token"),localStorage.removeItem("impersonation_session_id"),localStorage.removeItem("impersonation_active"),localStorage.removeItem("impersonation_original_token"),localStorage.removeItem("impersonation_original_user"),localStorage.removeItem("impersonator_info")},jn=vn,kn=()=>{localStorage.removeItem("freezoni_token"),localStorage.removeItem("token"),localStorage.removeItem("user")},zn=k.create({baseURL:tn,withCredentials:!0});let Sn=null;const En=e=>{const t=e?.config||{};if(t.__skipAuthRefresh||t.__retryAfterRefresh)return!1;if("staff"===t.__authScope)return!1;const n=((e="")=>{try{return new URL(String(e),tn).pathname.replace(/^\/api\/?/,"").replace(/^\/+/,"")}catch{return String(e).replace(/^\/?api\/?/,"").replace(/^\/+/,"")}})(t.url);return!(!n||(e=>/^auth\/(?:login|register|refresh|session|logout|forgot-password|verify-reset-code|verify-reset-2fa|reset-password|lockout-status)(?:\/|$|\?)/.test(e))(n))&&!n.includes("analytics")};zn.interceptors.request.use(e=>{if(e.headers=e.headers||{},e.headers["Accept-Language"]=y.language||"ru",e.__skipAuthHeader)return delete e.headers.Authorization,e.__authScope="none",e;if(e.headers.Authorization){const t=e.headers.Authorization;return t.includes(localStorage.getItem("staff_token"))?e.__authScope="staff":t.includes(localStorage.getItem("freezoni_token")||localStorage.getItem("token"))?e.__authScope="user":e.__authScope="custom",e}const t=(()=>{if(yn())return localStorage.getItem("staff_token")?"staff":"none";return localStorage.getItem("freezoni_token")||localStorage.getItem("token")?"user":"none"})(),n=yn(),a=String(e.url||""),r=n&&/^\/?auth\/me(?:\?|$)/.test(a);if(n&&!r){const t=localStorage.getItem("staff_token");t&&(e.headers.Authorization=`Bearer ${t}`)}return e.__authScope=r?"none":t,e}),zn.interceptors.response.use(e=>{try{const{config:t,data:n}=e,a="get"===(t?.method||"get").toLowerCase(),r=t?.url||"";a&&"string"==typeof r&&/^\/?ads\/\d+/.test(r)&&n?.ad&&(e=>{if(e&&e.id)try{const n=localStorage.getItem(an);let a=[];if(n)try{const e=JSON.parse(n);Array.isArray(e)&&(a=e)}catch(t){}const r={id:e.id,title:e.title||"",price:e.price,price_mode:e.price_mode||"price",currency:e.currency||"₾",location:e.location||e.city||"",main_image:e.main_image||(e.images?.length>0?e.images[0]?.image_path:null),viewed_at:(new Date).toISOString()};a=a.filter(e=>e.id!==r.id),a.unshift(r),a.length>50&&(a=a.slice(0,50)),localStorage.setItem(an,JSON.stringify(a))}catch(n){}})(n.ad)}catch(t){}return e},async e=>{if((e?.config?.url||"").includes("/analytics"))return Promise.reject(e);const t=e.response,n=t?.status,a=t?.data,r=e.config?.__authScope,i=e.config?.url||"",o=(e=>{if(e)return e.code?e.code:"object"==typeof e.error&&e.error?.code?e.error.code:"string"==typeof e.error?e.error:void 0})(a);if(401===n){if(En(e))try{const t=await(async()=>(Sn||(Sn=zn.post("/auth/refresh",{},{__skipAuthRefresh:!0}).finally(()=>{Sn=null})),Sn))(),n=t?.data?.user;return n&&window.dispatchEvent(new CustomEvent("freezoni_user_refreshed",{detail:n})),e.config.__retryAfterRefresh=!0,zn(e.config)}catch(s){kn(),window.dispatchEvent(new CustomEvent("freezoni_user_logout"))}if("staff"===r){const e="STAFF_SESSION_IDLE_TIMEOUT"===o?"idle_timeout":"session_expired";try{sessionStorage.setItem("staff_logout_reason",e)}catch(l){}vn(),window.dispatchEvent(new CustomEvent("freezoni_staff_logout",{detail:{reason:e,code:o}})),yn()&&(window.location.href=`${Wt}?reason=${e}`)}else if("user"===r){if(["/analytics","/analytics/my","/api/analytics"].some(e=>i.includes(e)))return Promise.reject(e);
2if(["/analytics"].some(e=>(i||"").includes(e)))return Promise.reject(e);kn(),window.dispatchEvent(new CustomEvent("freezoni_user_logout")),"SESSION_TERMINATED"!==o&&"TOKEN_EXPIRED"!==o||setTimeout(()=>{window.location.pathname.includes("/login")||(window.location.href="/login?reason=session_expired")},100)}}if(a?.error){let e,r,i;"string"==typeof a.error?(r=a.error||a.message,e=a.code,i=a.details):a.error&&"object"==typeof a.error&&({code:e,message:r,details:i}=a.error);const o=new Error(r||"API error");return o.code=e,o.status=n,o.details=i||[],o.isApiError=!0,o.response=t,o.data=a,Promise.reject(o)}if(a?.message){const e=new Error(a.message);return e.status=n,e.isApiError=!0,e.response=t,e.data=a,Promise.reject(e)}if(!t){const e=new Error(y.t("apiErrors.networkError"));return e.isNetworkError=!0,Promise.reject(e)}return Promise.reject(e)});const Cn="freezoni_referrer_visit_tracked",An="freezoni_referrer_registration_tracked",In="freezoni_initial_referrer",Tn="freezoni_referrer_session_id",Nn="freezoni_referrer_visitor_id";let Pn=!1,Ln=!1;const $n=()=>"undefined"!=typeof window&&"undefined"!=typeof sessionStorage,Rn=()=>"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,Dn=()=>{if(!$n())return Rn();const e=sessionStorage.getItem(Tn);if(e)return e;const t=Rn();return sessionStorage.setItem(Tn,t),t},Bn=()=>{if("undefined"==typeof window||"undefined"==typeof localStorage)return Dn();try{const e=localStorage.getItem(Nn);if(e)return e;const t=Rn();return localStorage.setItem(Nn,t),t}catch{return Dn()}},On={telegram:"https://t.me",tg:"https://t.me",whatsapp:"https://whatsapp.com",wa:"https://whatsapp.com",instagram:"https://instagram.com",ig:"https://instagram.com",facebook:"https://facebook.com",fb:"https://facebook.com",messenger:"https://messenger.com",tiktok:"https://tiktok.com",vk:"https://vk.com"},Fn=()=>{const e=new URLSearchParams(window.location.search||"");return(e=>{const t=String(e||"").trim().toLowerCase();return t?On[t]?On[t]:/^https?:\/\//i.test(t)?t:`https://${t.replace(/^@/,"")}`:null})(["utm_source","source","ref","referrer","from","fz_source"].map(t=>e.get(t)).find(Boolean))},Mn=()=>{const e=Fn();if(e)return e;const t=document.referrer||"";return t&&!(e=>{if(!e)return!1;try{return new URL(e).origin===window.location.origin}catch{return!1}})(t)?t:(()=>{const e=navigator.userAgent||"";return/Instagram/i.test(e)?On.instagram:/WhatsApp/i.test(e)?On.whatsapp:/Telegram|TelegramBot/i.test(e)?On.telegram:/FBAN|FBAV|FB_IAB|FBIOS|FB4A/i.test(e)?On.facebook:/Messenger/i.test(e)?On.messenger:/TikTok/i.test(e)?On.tiktok:null})()||"direct"},Vn=()=>{if(!$n())return"direct";const e=Fn();if(e)return sessionStorage.setItem(In,e),e;const t=sessionStorage.getItem(In),n=Mn();return t&&"direct"!==t||"direct"===t&&"direct"===n?t:(sessionStorage.setItem(In,n),n)},Un=()=>({visitor_id:Bn(),timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",browser_language:navigator.language||"",screen_width:window.screen?.width||window.innerWidth||null,screen_height:window.screen?.height||window.innerHeight||null}),Wn=async()=>{var e;if($n()&&!(e=window.location.pathname,Qt(e)||"1"===sessionStorage.getItem(Cn)||Pn)){Pn=!0;try{(await fetch("/api/referrers/track",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({referrer:Vn(),landing_page:`${window.location.pathname}${window.location.search}`,session_id:Dn(),...Un()})})).ok&&sessionStorage.setItem(Cn,"1")}catch(t){}finally{Pn=!1}}},Hn="freezoni_online_session_id",Kn="freezoni_referrer_visitor_id",qn="freezoni_precise_location_snapshot",Gn="freezoni_precise_location_prompted",Jn="freezoni_precise_location_denied",Yn="freezoni_precise_location_last_attempt";let Zn=null,Qn=!1,Xn=!1;const ea=()=>"undefined"!=typeof window&&"undefined"!=typeof sessionStorage,ta=()=>"undefined"!=typeof crypto&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,na=()=>{const e=(()=>{if("undefined"==typeof localStorage)return"";try{return localStorage.getItem("freezoni_token")||localStorage.getItem("token")||""}catch{return""}})();return e?{"Content-Type":"application/json",Authorization:`Bearer ${e}`}:{"Content-Type":"application/json"}},aa=()=>
2{if(!ea())return ta();const e=sessionStorage.getItem(Hn);if(e)return e;const t=ta();return sessionStorage.setItem(Hn,t),t},ra=()=>{if("undefined"==typeof window||"undefined"==typeof localStorage)return aa();try{const e=localStorage.getItem(Kn);if(e)return e;const t=ta();return localStorage.setItem(Kn,t),t}catch{return aa()}},ia=()=>ea()?{visitor_id:ra(),session_id:aa()}:{},oa=e=>Qt(e)||"true"===localStorage.getItem("impersonation_active"),sa=()=>{const e=(()=>{if(!ea())return null;try{const e=sessionStorage.getItem(qn)||localStorage.getItem(qn);if(!e)return null;const t=JSON.parse(e),n=Date.parse(t?.captured_at||"");return!Number.isFinite(n)||Date.now()-n>864e5?(sessionStorage.removeItem(qn),localStorage.removeItem(qn),null):t}catch{return null}})();return{visitor_id:ra(),session_id:aa(),current_path:`${window.location.pathname}${window.location.search}`,landing_page:`${window.location.pathname}${window.location.search}`,referrer:document.referrer||"direct",timezone:Intl.DateTimeFormat().resolvedOptions().timeZone||"",browser_language:navigator.language||"",screen_width:window.screen?.width||window.innerWidth||null,screen_height:window.screen?.height||window.innerHeight||null,precise_location:e}},la=async({force:e=!1}={})=>{if(ea()&&!oa(window.location.pathname)&&("hidden"!==document.visibilityState||e)&&(!Qn||e)){Qn=!0;try{await fetch("/api/referrers/online/heartbeat",{method:"POST",credentials:"include",headers:na(),body:JSON.stringify(sa())})}catch(t){}finally{Qn=!1}}},ca=async({keepalive:e=!0,identifiers:t=null}={})=>{if(ea())try{const n=t||ia();await fetch("/api/referrers/online/logout",{method:"POST",credentials:"include",keepalive:e,headers:na(),body:JSON.stringify(n)})}catch(n){}},da=async({force:e=!1}={})=>{if(!ea())return null;if(oa(window.location.pathname))return null;if(!("geolocation"in navigator))return null;if("hidden"===document.visibilityState&&!e)return null;if(Xn)return null;try{const t=navigator.permissions?.query?await navigator.permissions.query({name:"geolocation"}):null;if("denied"===t?.state)return localStorage.setItem(Jn,"1"),null;if("granted"===t?.state)localStorage.removeItem(Jn),localStorage.removeItem(Gn);else if(!t){if("1"===localStorage.getItem(Jn)&&!e)return null}const n=Number(localStorage.getItem(Yn)||0);if("prompt"===t?.state&&n&&Date.now()-n<36e5&&!e)return null;Xn=!0,localStorage.setItem(Gn,"1"),localStorage.setItem(Yn,Date.now().toString());const a=(e=>{if(!ea()||!e?.coords)return null;const t={latitude:e.coords.latitude,longitude:e.coords.longitude,accuracy_m:e.coords.accuracy??null,altitude_m:e.coords.altitude??null,heading:e.coords.heading??null,speed_mps:e.coords.speed??null,captured_at:new Date(e.timestamp||Date.now()).toISOString(),source:"browser_geolocation"};try{const e=JSON.stringify(t);sessionStorage.setItem(qn,e),localStorage.setItem(qn,e)}catch{}return t})(await new Promise((e,t)=>{navigator.geolocation.getCurrentPosition(e,t,{enableHighAccuracy:!0,timeout:12e3,maximumAge:3e5})}));return a&&(localStorage.removeItem(Jn),localStorage.removeItem(Yn),await(async e=>{if(!e)return!1;try{return(await fetch("/api/referrers/precise-location",{method:"POST",credentials:"include",headers:na(),body:JSON.stringify({visitor_id:ra(),session_id:aa(),precise_location:e})})).ok}catch(t){return!1}})(a),await la({force:!0})),a}catch(t){if(1===t?.code)try{localStorage.setItem(Jn,"1")}catch{}return null}finally{Xn=!1}},ua=s.createContext(null),pa=()=>{window.dispatchEvent(new CustomEvent("freezoni_user_login"))},ma=()=>{const e=ft({includeI18next:!1});return e?{hasLocal:!0,language:e}:{hasLocal:gt(),language:ft()}},fa=async e=>await Rt(e,{explicit:!1}),ha=async()=>{const e=ma();try{const t=await zn.get("/profile/settings"),n=pt(t.data?.settings?.locale?.language),a=ma(),r=a.language||e.language;if((a.hasLocal||e.hasLocal)&&r)return await fa(r),void(n!==r&&await zn.put("/profile/locale",{language:r}));if(t.data?.meta?.localePersisted&&n)return void(await fa(n));const i=pt(y.language);i&&await zn.put("/profile/locale",{language:i})}catch{}},ga=({children:e})=>{const[t,n]=s.useState(null),[a,r]=s.useState(null),[i,o]=s.useState(!0),[l,c]=s.useState(null),[d,u]=s.useState(null),[p,m]=s.useState(!1),[f,h]=s.useState(null),g=s.useCallback(async()=>{const e=ia();try{await ca({keepalive:!1,identifiers:e}),await zn.post("/auth/logout",e,{__skipAuthHeader:!0,__skipAuthRefresh:!0})}catch(t){}finally{kn(),n(null),r(null),c(null),u(null),localStorage.removeItem("freezoni_cart"),window.dispatchEvent(new CustomEvent("freezoni_cart_updated")),window.dispatchEvent(new CustomEvent("freezoni_user_logout"))}},[]),b=s.useCallback(()=>{vn(),m(!1),h(null)},[]),x=s.useCallback(async()=>{await g(),b(),localStorage.removeItem("admin_original_token"),localStorage.removeItem("impersonation_session_id")},[g,b]),y=g;s.useEffect(()=>{(async()=>{o(!0);if(localStorage.getItem("staff_token")){const e=wn();e&&(m(!0),h(e))}if(!Qt(window.location.pathname))try{const e=(await zn.get("/auth/session",{__skipAuthRefresh:!0})).data.user;
2if(!e?.id)return r(null),n(null),c(null),u(null),void o(!1);r("cookie"),n(e),c(e.account_type||"individual"),pa(),ha(),"business"===e.account_type&&u({business_name:e.business_name,business_description:e.business_description,business_logo:e.business_logo,business_address:e.business_address,business_inn:e.business_inn,business_verified:e.business_verified})}catch(e){kn(),r(null),n(null),c(null),u(null)}o(!1)})();const e=()=>{n(null),r(null),c(null),u(null)},t=e=>{const t=e.detail;t?.id&&(localStorage.removeItem("token"),localStorage.removeItem("freezoni_token"),r("cookie"),n(t),c(t.account_type||"individual"),"business"===t.account_type&&u({business_name:t.business_name,business_description:t.business_description,business_logo:t.business_logo,business_address:t.business_address,business_inn:t.business_inn,business_verified:t.business_verified}))};return window.addEventListener("freezoni_user_logout",e),window.addEventListener("freezoni_user_refreshed",t),()=>{window.removeEventListener("freezoni_user_logout",e),window.removeEventListener("freezoni_user_refreshed",t)}},[]);const _=!!t,w="business"===l,v="individual"===l,j=p&&f&&(f.is_superuser||"admin"===f.role_name||"owner_superuser"===f.role_name),k={user:t,token:a,loading:i,isAuthenticated:_,login:async(e,t)=>{const a=await zn.post("/auth/login",{email:e,password:t}),{user:i}=a.data;return localStorage.removeItem("token"),localStorage.removeItem("freezoni_token"),r("cookie"),n(i),c(i.account_type||"individual"),pa(),ha(),"business"===i.account_type&&u({business_name:i.business_name,business_description:i.business_description,business_logo:i.business_logo,business_address:i.business_address,business_inn:i.business_inn,business_verified:i.business_verified}),a.data},register:async e=>{const t=await zn.post("/auth/register",e),{user:a}=t.data;return localStorage.removeItem("token"),localStorage.removeItem("freezoni_token"),r("cookie"),n(a),c(a.account_type||"individual"),pa(),ha(),"business"===a.account_type&&u({business_name:a.business_name,business_description:a.business_description,business_logo:a.business_logo,business_address:a.business_address,business_inn:a.business_inn,business_verified:a.business_verified}),(async()=>{if($n()&&"1"!==sessionStorage.getItem(An)&&!Ln){Ln=!0;try{(await fetch("/api/referrers/register",{method:"POST",credentials:"include",headers:{"Content-Type":"application/json"},body:JSON.stringify({referrer:Vn(),landing_page:`${window.location.pathname}${window.location.search}`,session_id:Dn(),...Un()})})).ok&&sessionStorage.setItem(An,"1")}catch(e){}finally{Ln=!1}}})(),t.data},logout:y,setUser:n,accountType:l,businessInfo:d,isBusiness:w,isIndividual:v,updateBusinessProfile:async e=>{const t=await zn.put("/auth/business-profile",e);return t.data.user&&(n(t.data.user),u({business_name:t.data.user.business_name,business_description:t.data.user.business_description,business_logo:t.data.user.business_logo,business_address:t.data.user.business_address,business_inn:t.data.user.business_inn,business_verified:t.data.user.business_verified})),t.data},isStaff:p,staffUser:f,isAdmin:j,logoutUser:g,logoutStaff:b,logoutAll:x};return J.jsx(ua.Provider,{value:k,children:e})},ba=()=>{const e=s.useContext(ua);if(!e)throw new Error("useAuth must be used within AuthProvider");return e},xa=s.createContext(null),ya=()=>[{name:y.t("fallbackCategories.electronics"),icon:"📱",slug:"electronics",path:"/category/electronics",color:"var(--c-blue-600)"},{name:y.t("fallbackCategories.clothing"),icon:"👗",slug:"clothing",path:"/category/clothing",color:"#f093fb"},{name:y.t("fallbackCategories.home"),icon:"🏡",slug:"home",path:"/category/home",color:"#11998e"},{name:y.t("fallbackCategories.kids"),icon:"🧸",slug:"kids",path:"/category/kids",color:"#f5576c"},{name:y.t("fallbackCategories.beauty"),icon:"💄",slug:"beauty",path:"/category/beauty",color:"#a18cd1"},{name:y.t("fallbackCategories.appliances"),icon:"🔧",slug:"appliances",path:"/category/appliances",color:"#4facfe"},{name:y.t("fallbackCategories.sport"),icon:"⚽",slug:"sport",path:"/category/sport",color:"#f857a6"},{name:y.t("fallbackCategories.transport"),icon:"🚗",slug:"transport",path:"/category/transport",color:"#16213e"},{name:y.t("fallbackCategories.realestate"),icon:"🏠",slug:"realestate",path:"/category/realestate",color:"#3498db"},{name:y.t("fallbackCategories.jobs"),icon:"💼",slug:"jobs",path:"/category/jobs",color:"#4364f7"},{name:y.t("fallbackCategories.services"),icon:"🛠️",slug:"services",path:"/category/services",color:"#11998e"},{name:y.t("fallbackCategories.animals"),icon:"🐕",slug:"animals",path:"/category/animals",color:"#f12711"}],_a=e=>{try{return localStorage.getItem(e)}catch(t){return null}},wa=(e,t)=>{try{return localStorage.setItem(e,t),!0}catch(n){try{return localStorage.removeItem("freezoni_categories"),localStorage.removeItem("freezoni_categories_tree"),localStorage.setItem(e,t),!0}catch(a){return!1}}},va=e=>{try{localStorage.removeItem(e)}catch(t){}},ja=({children:e})=>{const[t,n]=s.useState([]),[a,r]=s.useState([]),[i,o]=s.useState(!0),[l,c]=s.useState(null),[d,u]=s.useState(null),p=512e3,m=s.useCallback(async(e=!1)=>
2{if(!(!e&&d&&Date.now()-d<3e5&&t.length>0))try{o(!0);const e=await zn.get("/categories",{params:{lang:y.language||"ru",_fresh:Date.now()},headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}});if(e.data.success&&e.data.categories){const t=e.data.categories.map(e=>({...e,path:`/category/${e.slug}`}));n(t),u(Date.now()),c(null);const a=JSON.stringify({data:t,timestamp:Date.now(),lang:y.language||"ru"});a.length<p&&wa("freezoni_categories",a)}}catch(a){c(a.message);const e=_a("freezoni_categories");if(e)try{const{data:t}=JSON.parse(e);n(t)}catch{n(ya())}else n(ya())}finally{o(!1)}},[t.length,d]),f=s.useCallback(async(e=!1)=>{const n="freezoni_categories_tree";if(e||!(a.length>0))try{const e=await zn.get("/categories/tree",{params:{lang:y.language||"ru",_fresh:Date.now()},headers:{"Cache-Control":"no-cache",Pragma:"no-cache"}}),t=e.data.tree||e.data.categories||[];if(e.data.success&&t.length>0){const e=t=>t.map(t=>({...t,path:`/category/${t.slug}`,children:t.children?.length>0?e(t.children):[]})),a=e(t);r(a);const i=JSON.stringify({data:a,timestamp:Date.now(),lang:y.language||"ru"});i.length<p&&wa(n,i)}}catch(i){const e=_a(n);if(e)try{const{data:t}=JSON.parse(e);if(Array.isArray(t)&&t.length>0)return void r(t)}catch{}r(t.map(e=>({...e,subcategories:[]})))}},[a.length,t]),h=s.useCallback(async e=>{try{const t=await zn.get(`/categories/${e}`);return t.data.success?t.data.category:null}catch(t){return null}},[]),g=s.useCallback(async e=>{try{const t=await zn.get(`/categories/${e}/specs`);return t.data.success?t.data.specs:[]}catch(t){return[]}},[]),b=s.useCallback(e=>t.find(t=>t.name.toLowerCase()===e.toLowerCase()||t.category_param?.toLowerCase()===e.toLowerCase()),[t]),x=s.useCallback(()=>t.map(e=>e.category_param||e.name),[t]),_=s.useCallback(()=>{u(null),va("freezoni_categories"),va("freezoni_categories_tree"),m(!0),f(!0)},[m,f]);s.useEffect(()=>{m()},[]),s.useEffect(()=>{const e=()=>{_()};return y.on("languageChanged",e),()=>y.off("languageChanged",e)},[_]),s.useEffect(()=>{const e=()=>{_()},t=e=>{"freezoni_categories_updated_at"===e.key&&_()};return window.addEventListener("freezoni_categories_updated",e),window.addEventListener("storage",t),()=>{window.removeEventListener("freezoni_categories_updated",e),window.removeEventListener("storage",t)}},[_]);const w={categories:t,categoriesTree:a,loading:i,error:l,fetchCategories:m,fetchCategoriesTree:f,getCategoryBySlug:h,getCategorySpecs:g,findCategoryByName:b,getCategoryNames:x,invalidateCache:_,hasCategories:t.length>0,isReady:!i&&t.length>0};return J.jsx(xa.Provider,{value:w,children:e})},ka=()=>{const e=s.useContext(xa);if(!e)throw new Error("useCategories must be used within CategoriesProvider");return e},za=s.createContext(null),Sa="freezoni_compare",Ea=e=>{if(!e||"object"!=typeof e)return null;const t=Array.isArray(e.images)?e.images[0]:null;return"string"==typeof t?t:t?.image_path?t.image_path:t?.url?t.url:"string"==typeof e.image?e.image:e.image?.image_path?e.image.image_path:e.image?.url?e.image.url:e.main_image||e.image_path||e.thumbnail||null},Ca=e=>Array.isArray(e)?e.map(e=>String(e||"").trim()).filter(Boolean):String(e||"").split(/\s*>\s*/).map(e=>e.trim()).filter(Boolean),Aa=e=>String(e||"other").trim().toLowerCase().replace(/\s+/g," "),Ia=e=>{if(e&&"object"==typeof e){const t=e.category_id??e.categoryId??e.leaf_category_id,n=e.category_path||e.categoryPath||e.category_name_path||e.category||e.category_slug||"",a=Ca(n),r=a[a.length-1]||String(n||"").trim()||"other";return{key:null!=t&&""!==String(t).trim()?`id:${t}`:Aa(r),label:r,path:a.length>0?a.join(" > "):r}}const t=Ca(e),n=t[t.length-1]||String(e||"").trim()||"other";return{key:Aa(n),label:n,path:t.length>0?t.join(" > "):n}},Ta=({children:e})=>{const[t,n]=s.useState([]),[a,r]=s.useState(null),[i,o]=s.useState(null),[l,c]=s.useState(!1);s.useEffect(()=>{try{const e=localStorage.getItem(Sa);if(e){const t=JSON.parse(e);2!==t.version?localStorage.removeItem(Sa):(n(t.items||[]),r(t.category||null),o(t.categoryKey||null))}}catch(e){localStorage.removeItem(Sa)}c(!0)},[]),s.useEffect(()=>{if(l)try{localStorage.setItem(Sa,JSON.stringify({version:2,items:t,category:a,categoryKey:i})),window.dispatchEvent(new CustomEvent("freezoni_compare_updated",{detail:{items:t,category:a,categoryKey:i}}))}catch(e){}},[t,a,i,l]),s.useEffect(()=>{if(!l||0===t.length)return;const e=t.filter(e=>!Ea(e));if(0===e.length)return;let a=!1;return(async()=>{try{const t=await Promise.all(e.map(e=>zn.get(`/ads/${e.id}`).then(t=>({id:e.id,ad:t.data?.ad||t.data}
2)).catch(e=>null)));if(a)return;const r=new Map;if(t.forEach(e=>{const t=Ea(e?.ad);e?.id&&t&&r.set(e.id,t)}),0===r.size)return;n(e=>e.map(e=>{const t=r.get(e.id);return t?{...e,image:t,main_image:e.main_image||t}:e}))}catch(t){}})(),()=>{a=!0}},[t,l]),s.useEffect(()=>{const e=e=>{if(e.key===Sa)try{if(!e.newValue)return n([]),r(null),void o(null);const t=JSON.parse(e.newValue);if(2!==t.version)return n([]),r(null),o(null),void localStorage.removeItem(Sa);n(t.items||[]),r(t.category||null),o(t.categoryKey||null)}catch(t){}};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);const d=s.useCallback(e=>t.some(t=>t.id===e),[t]),u=s.useCallback(e=>{if(!e||!e.id)return{success:!1,message:y.t("compare.invalidProduct")};if(d(e.id))return{success:!1,message:y.t("compare.alreadyInCompare")};if(t.length>=4)return{success:!1,message:y.t("compare.maxItems",{max:4})};const s=Ia(e);if(t.length>0&&i!==s.key)return{success:!1,message:y.t("compare.categoryMismatch",{category:a})};let l=null;if(e.specs&&"object"==typeof e.specs){const t=Object.keys(e.specs);t.length>50?(l={},t.slice(0,50).forEach(t=>{l[t]=e.specs[t]})):l=e.specs}const c=Ea(e),u={id:e.id,title:e.title,price:e.price,currency:e.currency||"GEL",image:c,main_image:e.main_image||c,category:s.label,category_key:s.key,category_path:e.category_path||s.path,specs:l,condition:e.condition,created_at:e.created_at};return n(e=>[...e,u]),0===t.length&&(r(s.label),o(s.key)),{success:!0,message:y.t("compare.added")}},[t,a,i,d]),p=s.useCallback(e=>(n(t=>{const n=t.filter(t=>t.id!==e);return 0===n.length&&(r(null),o(null)),n}),{success:!0,message:y.t("compare.removed")}),[]),m=s.useCallback(e=>d(e.id)?p(e.id):u(e),[d,u,p]),f=s.useCallback(()=>(n([]),r(null),o(null),{success:!0,message:y.t("compare.cleared")}),[]),h=t.length,g=s.useCallback(e=>{if(t.length>=4)return!1;if(0===t.length)return!0;const n=Ia(e);return i===n.key},[t.length,i]),b={compareItems:t,compareCategory:a,compareCategoryKey:i,compareCount:h,addToCompare:u,removeFromCompare:p,toggleCompare:m,clearCompare:f,isInCompare:d,canAddCategory:g,maxItems:4};return J.jsx(za.Provider,{value:b,children:e})},Na=()=>{const e=s.useContext(za);return e||{compareItems:[],compareCategory:null,compareCategoryKey:null,compareCount:0,addToCompare:()=>({success:!1,message:"Compare not available"}),removeFromCompare:()=>({success:!1,message:"Compare not available"}),toggleCompare:()=>({success:!1,message:"Compare not available"}),clearCompare:()=>({success:!1,message:"Compare not available"}),isInCompare:()=>!1,canAddCategory:()=>!1,maxItems:4}},Pa=({onSearch:e,placeholder:t,showImageSearch:n=!0,compact:a=!1})=>{const r=c(),i=d(),{t:o}=v(),l=t||o("smartSearch.searchPlaceholder"),[u,p]=s.useState(""),[m,f]=s.useState([]),[h,g]=s.useState(!1),[b,x]=s.useState(!1),[y,_]=s.useState(!1),[w,j]=s.useState(!1),[k,E]=s.useState(null),[C,A]=s.useState(null),I=s.useRef(null),T=s.useRef(null),N=s.useRef(null),P=s.useRef(null),[L,$]=s.useState({top:70,right:16}),R=s.useRef(null),D=s.useRef(null),B="undefined"!=typeof window&&window.innerWidth<=768;s.useEffect(()=>{const e=new URLSearchParams(i.search),t=String(e.get("search")||"").trim(),n="/ads"===i.pathname&&t;p(n?t:""),g(!1),f([]),_(!1)},[i.pathname,i.search]);const O=s.useCallback(e=>{const t=[e?.text,e?.title,e?.name,e?.label,e?.value,e?.query,e?.query_text,e?.search,e?.search_query,e?.term,e?.keyword,e?.suggestion,e?.phrase,e?.word,e?.matched_text,e?.display_text,e?.original,e?.translated,e?.source_text];for(const n of t){const e=String(n||"").replace(/[\u200B-\u200D\uFEFF]/g,"").trim();if(e)return e}return""},[]),F=s.useCallback(e=>{const t=e?.main_image||e?.image||e?.image_path||e?.thumbnail||e?.thumbnail_url;return t?mn(t):""},[]),M=s.useCallback(async e=>{if(e.length<2)f([]);else try{const t=((await zn.get(`/search/suggestions?q=${encodeURIComponent(e)}&limit=8`)).data.suggestions||[]).map(e=>({...e,text:O(e)})).filter(e=>e.text.length>0);f(t)}catch(t){f([])}},[O]);s.useEffect(()=>(D.current&&clearTimeout(D.current),D.current=setTimeout(()=>{M(u)},200),()=>clearTimeout(D.current)),[u,M]),s.useEffect(()=>{const e=e=>{R.current&&!R.current.contains(e.target)&&g(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),s.useEffect(()=>{if(!y)return;const e=e=>{"Escape"===e.key&&_(!1)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[y]);const V=(t=u)=>{const n=String(t||"").trim();n&&(g(!1),e?e({query:n,results:[],meta:{search_type:"live_catalog"}}):r(`/ads?search=${encodeURIComponent(n)}`))},U=async t=>{if(t){x(!0),E(URL.createObjectURL(t));try{const n=new FormData;n.append("image",t),n.append("limit","20");const a=await zn.post("/search/image",n);if(A(a.data.detected),e)e(a.data);else{const e=a.data?.query||a.data?.detected?.description||o("smartSearch.searchByPhoto");try{sessionStorage.setItem("smartSearchResults",JSON.stringify({...a.data,__searchQuery:e,__searchType:"image",__storedAt:Date.now()}))}catch{}r(`/ads?search=${encodeURIComponent(e)}&type=image`)}}catch(n){alert(o("smartSearch.imageAnalysisError"))}finally{x(!1)}}},W=e=>{const t=e.target.files[0];t&&U(t)},H=e=>{_(!1),g(!1);const t=e?.current;t&&(t.value="",t.click())},K=()=>{E(null),A(null),_(!1),T.current&&(T.current.value=""),N.current&&(N.current.value="")},q={container:{position:"relative",width:"100%"}
2,searchBox:{display:"flex",alignItems:"center",background:"#fff",borderRadius:a?"12px":"16px",border:"2px solid #e5e7eb",padding:a?"8px 12px":"12px 16px",transition:"all 0.2s",boxShadow:"0 2px 8px rgba(0,0,0,0.04)",boxSizing:"border-box",...a?{height:42,padding:0,overflow:"hidden"}:{}},searchBoxFocused:{borderColor:"var(--c-blue-600)",boxShadow:"0 4px 12px rgba(24, 95, 165, 0.15)"},input:{flex:1,border:"none",outline:"none",fontSize:a?"14px":"16px",color:"#1a1a2e",background:"transparent",padding:"0 12px",minWidth:0},searchIcon:{width:a?"34px":"38px",height:"100%",minHeight:a?"40px":"44px",display:"flex",alignItems:"center",justifyContent:"center",color:"#374151",lineHeight:1,opacity:1,flexShrink:0},iconBtn:{background:"none",border:"none",cursor:"pointer",padding:a?"0 8px":"0 10px",borderRadius:"8px",display:"flex",alignItems:"center",justifyContent:"center",transition:"all 0.15s",color:"#374151",flexShrink:0,alignSelf:"stretch",height:"100%",minHeight:a?"40px":"44px",width:a?"44px":"48px",lineHeight:1},iconBtnActive:{background:"none",color:"inherit"},searchBtn:{background:"var(--gradient-brand)",border:"none",borderRadius:a?"0 12px 12px 0":"10px",padding:a?"0 12px":"10px 20px",color:"#fff",fontWeight:"600",cursor:"pointer",marginLeft:a?0:"8px",fontSize:a?"13px":"14px",display:"flex",alignItems:"center",justifyContent:"center",gap:"6px",flexShrink:0,whiteSpace:"nowrap",boxSizing:"border-box",...a?{alignSelf:"stretch",width:76,maxWidth:76,minHeight:42,height:"100%",lineHeight:1}:{}},suggestions:{position:"absolute",top:"100%",left:0,right:0,background:"#fff",borderRadius:"12px",boxShadow:"0 8px 24px rgba(0,0,0,0.12)",marginTop:"8px",zIndex:1e4,overflow:"hidden",border:"1px solid #e5e7eb",color:"#0f172a",WebkitTextFillColor:"#0f172a",isolation:"isolate"},suggestionItem:{padding:"12px 16px",cursor:"pointer",display:"flex",alignItems:"center",gap:"12px",minHeight:"56px",borderBottom:"1px solid #f0f0f0",transition:"background 0.15s",color:"#0f172a",WebkitTextFillColor:"#0f172a",background:"#fff"},suggestionThumb:{width:"36px",height:"36px",borderRadius:"8px",objectFit:"cover",flexShrink:0,background:"#f1f5f9",border:"1px solid #e5e7eb"},suggestionText:{flex:1,width:"100%",fontFamily:'Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',fontSize:"14px",fontWeight:"600",lineHeight:"18px",color:"#0f172a",WebkitTextFillColor:"#0f172a",opacity:1,visibility:"visible",minWidth:0,display:"block",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",textAlign:"left",background:"transparent",textShadow:"none",mixBlendMode:"normal",position:"relative",zIndex:1},suggestionLabel:{display:"block",color:"#0f172a",WebkitTextFillColor:"#0f172a",opacity:1,visibility:"visible",font:'600 14px/18px Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif',overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},suggestionMeta:{fontSize:"12px",color:"#64748b",WebkitTextFillColor:"#64748b",flexShrink:0},cameraBtnWrap:{position:"relative",display:"flex",alignItems:"stretch",alignSelf:"stretch",height:"100%",flexShrink:0},imageDropzone:{position:"fixed",top:`${L.top}px`,...B?{left:12,right:12,width:"auto",maxWidth:"calc(100vw - 24px)",padding:"16px 14px"}:{right:`${L.right}px`,width:"min(320px, calc(100vw - 24px))",padding:20},minWidth:0,border:"2px dashed var(--c-blue-600)",borderRadius:12,textAlign:"center",background:w?"rgba(24, 95, 165, 0.08)":"#fff",cursor:"pointer",transition:"all 0.2s",zIndex:9999,boxShadow:"0 4px 20px rgba(0,0,0,0.15)"},uploadedPreview:{position:"fixed",top:`${L.top}px`,...B?{left:12,right:12,width:"auto",maxWidth:"calc(100vw - 24px)"}:{right:`${L.right}px`,width:"min(320px, calc(100vw - 24px))"},minWidth:0,display:"flex",alignItems:"center",gap:"16px",padding:"16px",background:"#fff",borderRadius:12,zIndex:10020,boxShadow:"0 4px 20px rgba(0,0,0,0.15)"},popupCloseBtn:{position:"absolute",top:8,right:8,fontSize:20,cursor:"pointer",background:"none",border:"none",color:"#999",lineHeight:1},previewImage:{width:"80px",height:"80px",borderRadius:"12px",objectFit:"cover"},analysisText:{flex:1,fontSize:"14px",color:"#1a1a2e",lineHeight:"1.5"},clearBtn:{background:"#fee2e2",border:"none",borderRadius:"8px",padding:"8px 12px",color:"#dc2626",cursor:"pointer",fontSize:"13px"},loader:{display:"inline-block",width:"16px",height:"16px",border:"2px s
2olid #fff",borderTopColor:"transparent",borderRadius:"50%",animation:"spin 0.8s linear infinite"}};return J.jsxs("div",{className:"fz-smart-search"+(a?" fz-smart-search--compact":""),style:q.container,ref:R,children:[J.jsxs("div",{className:"fz-smart-search-box",style:{...q.searchBox,...h&&m.length>0?q.searchBoxFocused:{}},children:[J.jsx("span",{className:"fz-smart-search-icon",style:q.searchIcon,"aria-hidden":"true",children:J.jsx(z,{size:20,strokeWidth:2.2})}),J.jsx("input",{ref:I,type:"text",value:u,onChange:e=>p(e.target.value),onFocus:()=>g(!0),onKeyDown:e=>"Enter"===e.key&&V(),placeholder:l,style:q.input,disabled:b}),n&&J.jsxs("div",{className:"fz-smart-search-camera-wrap",style:q.cameraBtnWrap,children:[J.jsx("button",{type:"button",ref:P,className:"fz-smart-search-camera-btn",style:{...q.iconBtn,...y?q.iconBtnActive:{}},onClick:()=>{if(B)H(T);else{if(P.current){const e=P.current.getBoundingClientRect();$({top:e.bottom+(B?12:16),right:window.innerWidth-e.right})}g(!1),_(e=>!e)}},title:o("smartSearch.searchByPhoto"),"aria-label":o("smartSearch.searchByPhoto"),"aria-expanded":y?"true":"false",children:J.jsx(S,{size:19,strokeWidth:2.2,"aria-hidden":"true"})}),y&&!k&&!B&&J.jsxs("div",{style:q.imageDropzone,onDragOver:e=>{e.preventDefault(),j(!0)},onDragLeave:()=>{j(!1)},onDrop:e=>{e.preventDefault(),j(!1);const t=e.dataTransfer.files[0];t&&t.type.startsWith("image/")&&U(t)},onClick:()=>H(T),children:[J.jsx("button",{style:q.popupCloseBtn,onClick:e=>{e.stopPropagation(),_(!1)},title:o("common.close"),children:"×"}),J.jsx("div",{style:{fontSize:"48px",marginBottom:"12px"},children:"📸"}),J.jsx("div",{style:{fontSize:"16px",fontWeight:"500",color:"#1a1a2e",marginBottom:"8px"},children:o("smartSearch.searchByPhoto")}),J.jsx("div",{style:{fontSize:"14px",color:"#666"},children:o("smartSearch.dragImageOrClick")}),J.jsx("div",{style:{fontSize:"12px",color:"#999",marginTop:"8px"},children:o("smartSearch.aiWillFindSimilar")})]}),J.jsx("input",{ref:T,type:"file",accept:"image/*",onChange:W,"aria-label":o("smartSearch.searchByPhoto"),className:"fz-smart-search-native-file-input",style:{display:"none"}}),J.jsx("input",{ref:N,type:"file",accept:"image/*",capture:"environment",onChange:W,style:{display:"none"}}),k&&J.jsxs("div",{style:q.uploadedPreview,children:[J.jsx("button",{style:q.popupCloseBtn,onClick:e=>{e.stopPropagation(),K()},title:o("common.close"),children:"×"}),J.jsx("img",{loading:"lazy",src:k,alt:"Uploaded",style:q.previewImage}),J.jsx("div",{style:q.analysisText,children:b?J.jsx("span",{style:{color:"#666"},children:o("smartSearch.analyzingImage")}):C?J.jsxs(J.Fragment,{children:[J.jsx("div",{style:{fontWeight:"500",marginBottom:"4px"},children:o("smartSearch.aiRecognized")}),J.jsx("div",{children:C.description})]}):J.jsx("span",{style:{color:"#666"},children:o("smartSearch.readyToSearch")})}),J.jsx("button",{style:q.clearBtn,onClick:K,children:o("common.clear")})]})]}),J.jsx("button",{type:"button",className:"fz-smart-search-submit",style:q.searchBtn,onClick:()=>V(),disabled:b||!u.trim(),children:b?J.jsx("span",{style:q.loader}):J.jsxs(J.Fragment,{children:[J.jsx("span",{children:o("smartSearch.find")}),!a&&J.jsx("span",{children:"✨"})]})})]}),h&&m.length>0&&!y&&J.jsx("div",{className:"fz-smart-search-suggestions",style:q.suggestions,children:m.map((e,t)=>{const n=O(e)||u.trim(),a="product"===e.type?F(e):"";return J.jsxs("div",{className:"fz-smart-search-suggestion-item",style:q.suggestionItem,onClick:()=>(e=>{const t=O(e);t&&(p(t),g(!1),V(t))})(e),onMouseEnter:e=>e.currentTarget.style.background="#f9fafb",onMouseLeave:e=>e.currentTarget.style.background="#fff",children:[a&&J.jsx("img",{loading:"lazy",className:"fz-smart-search-suggestion-thumb",src:a,alt:"",style:q.suggestionThumb,onError:e=>{e.currentTarget.style.display="none"}}),J.jsx("span",{className:"fz-smart-search-suggestion-text","data-label":n,style:q.suggestionText,title:n,children:J.jsx("span",{className:"fz-smart-search-suggestion-label",style:q.suggestionLabel,children:n})}),e.count&&J.jsx("span",{className:"fz-smart-search-suggestion-meta",style:q.suggestionMeta,children:o("smartSearch.queriesCount",{count:e.count})})]},`${e.type||"suggestion"}-${n}-${t}`)})}),J.jsx("style",{children:'\n        @keyframes spin {\n          to { transform: rotate(360deg); }\n        }\n\n        @media (max-width: 767.98px) {\n          .fz-smart-search-native-file-input {\n            min-width: 0;\n            max-width: 100%;\n            overflow: hidden;\n            color: transparent;\n            font-size: 0;\n            -webkit-tap-highlight-color: transparent;\n          }\n\n          .fz-smart-search-native-file-input::file-selector-button {\n            display: none;\n          }\n        }\n\n        .fz-smart-search-suggestions,\n        .fz-smart-search-suggestions * {\n          opacity: 1 !important;\n          visibility: visible !important;\n          text-shadow: none !important;\n          mix-blend-mode: normal !important;\n        }\n\n        .fz-smart-search-suggestions {\n          color: #0f172a !important;\n          -webkit-text-fill-color: #0f172a !important;\n          background: #ffffff !important;\n          z-index: 10000 !important;\n        }\n\n        .fz-smart-search-suggestion-item {\n          color: #0f172a !important;\n          -webkit-text-fill-color: #0f172a !important;\n          background: #ffffff !important;\n        }\n\n        .fz-smart-search-suggestion-text {\n          display: block !important;\n          color: #0f172a !important;\n          -webkit-text-fill-color: #0f172a !important;\n          font-size: 14px !important;\n          font-weight: 700 !important;\n          line-height: 18px !important;\n          min-width: 0 !important;\n          flex: 1 1 auto !important;\n          background: transparent !important;\n        }\n\n        .fz-smart-search-suggestion-label {\n          display: block !important;\n          color: #0f172a !important;\n          -webkit-text-fill-color: #0f172a !important;\n          font: 700 14px/18px Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif !important;\n          opacity: 1 !important;\n          visibility: visible !important;\n          overflow: hidden !important;\n          text-overflow: ellipsis !important;\n          white-space: nowrap !important;\n        }\n\n        .fz-smart-search-suggestion-text::before {\n          content: attr(data-label);\n          display: none;\n        }\n\n        .fz-smart-search-suggestion-thumb {\n          flex: 0 0 36px !important;\n        }\n\n        .fz-smart-search-suggestion-meta {\n          color: #64748b !important;\n          -webkit-text-fill-color: #64748b !important;\n        }\n      '})]})},La={"Тбилиси":"თბილისი","Батуми":"ბათუმი","Кутаиси":"ქუთაისი","Рустави":"რუსთავი","Зугдиди":"ზუგდიდი","Гори":"გორი","Поти":"ფოთი","Телави":"თელავი","Мцхета":"მცხეთა","Кобулети":"ქობულეთი","Борджоми":"ბორჯომი","Хашури":"ხაშური","Озургети":"ოზურგეთი","Марнеули":"მარნეული","Самтредиа":"სამტრედია","Сенаки":"სენაკი","Цхалтубо":"წყალტუბო","Каспи":"კასპი","Чиатура":"ჭიათურა","Ахалцихе":"ახალციხე","Москва":"მოსკოვი","Анкара":"ანკარა","Киев":"კიევი","Ташкент":"ტაშკენტი","Баку":"ბაქუ","Минск":"მინსკი","Астана":"ასტანა","Ереван":"ერევანი","Бишкек":"ბიშკეკი","Ашхабад":"აშხაბადი","Душанбе":"დუშანბე","Кишинёв":"კიშინიოვი","Санкт-Петербург":"სანქტ-პეტერბურგი","Стамбул":"სტამბული","Алматы":"ალმათი","Одесса":"ოდესა","Харьков":"ხარკოვი"},$a={"Грузия":"საქართველო","Россия":"რუსეთი","Турция":"თურქეთი","Армения":"სომხეთი","Азербайджан":"აზერბაიჯანი","Украина":"უკრაინა","Беларусь":"ბელარუსი","Казахстан":"ყაზახეთი","Узбекистан":"უზბეკეთი","Кыргызстан":"ყირგიზეთი","Таджикистан":"ტაჯიკეთი","Туркменистан":"თურქმენეთი","Молдова":"მოლდოვა"},Ra={"Россия":"Russland","Грузия":"Georgien","Турция":"Türkei","Армения":"Armenien","Азербайджан":"Aserbaidschan","Украина":"Ukraine","Беларусь":"Belarus","Казахстан":"Kasachstan","Узбекистан":"Usbekistan","Кыргызстан":"Kirgisistan","Таджикистан":"Tadschikistan","Туркменистан":"Turkmenistan","Молдова":"Moldawien","Австралия":"Australien","Австрия":"Österreich","Германия":"Deutschland","Франция":"Frankreich","Италия":"Italien","Испания":"Spanien","Великобритания":"Vereinigtes Königreich","Япония":"Japan","Южная Корея":"Südkorea","Китай":"China","Индия":"Indien","Бразилия":"Brasilien","Канада":"Kanada","США":"USA","Польша":"Polen","ОАЭ":"VAE","Израиль":"Israel","Таиланд":"Thailand","Вьетнам":"Vietnam","Египет":"Ägypten","Швейцария":"Schweiz","Швеция":"Schweden","Норвегия":"Norwegen","Дания":"Dänemark","Финляндия":"Finnland","НидерÐ
2»Ð°Ð½Ð´Ñ‹":"Niederlande","Бельгия":"Belgien","Чехия":"Tschechien","Румыния":"Rumänien","Венгрия":"Ungarn","Греция":"Griechenland","Португалия":"Portugal"},Da={"Тбилиси":"Tiflis","Батуми":"Batumi","Кутаиси":"Kutaissi","Рустави":"Rustawi","Поти":"Poti","Зугдиди":"Zugdidi","Гори":"Gori","Телави":"Telawi","Москва":"Moskau","Санкт-Петербург":"Sankt Petersburg","Киев":"Kiew","Минск":"Minsk","Алматы":"Almaty","Астана":"Astana","Баку":"Baku","Ереван":"Jerewan","Ташкент":"Taschkent","Бишкек":"Bischkek","Ашхабад":"Aschgabat","Душанбе":"Duschanbe","Анкара":"Ankara","Стамбул":"Istanbul","Одесса":"Odessa","Харьков":"Charkiw","Новосибирск":"Nowosibirsk","Екатеринбург":"Jekaterinburg","Казань":"Kasan","Нижний Новгород":"Nischni Nowgorod"};function Ba(e,t,n="name",a="city"){if(!e)return"";if("ka"===t){const t="country"===a||n.includes("country")?$a:La;if(t[e[n]])return t[e[n]];if(e[`${n}_ka`])return e[`${n}_ka`];if(e[`${n}_en`])return e[`${n}_en`]}if("de"===t){const t="country"===a||n.includes("country")?Ra:Da;return t[e[n]]?t[e[n]]:e[`${n}_de`]?e[`${n}_de`]:e[`${n}_en`]?e[`${n}_en`]:e[n]||""}return"ar"===t&&e[`${n}_ar`]?e[`${n}_ar`]:"es"===t&&e[`${n}_es`]?e[`${n}_es`]:"zh"===t&&e[`${n}_zh`]?e[`${n}_zh`]:"tr"===t&&e[`${n}_tr`]?e[`${n}_tr`]:"fr"===t&&e[`${n}_fr`]?e[`${n}_fr`]:"en"===t&&e[`${n}_en`]?e[`${n}_en`]:e[n]||""}const Oa=s.createContext(null),Fa="freezoni_user_location",Ma=({children:e})=>{const[t,n]=s.useState(null),[a,r]=s.useState(null),[i,o]=s.useState(null),[l,c]=s.useState(!0),[d,u]=s.useState(!1),[p,m]=s.useState([]),[f,h]=s.useState([]);s.useEffect(()=>{g(),b(),x()},[]);const g=async()=>{try{const t=localStorage.getItem(Fa);if(t)return n(JSON.parse(t)),void c(!1);try{const e=await k.get("/api/geo/detect");if(e.data.detected&&e.data.matched_city){const t=e.data.matched_city,a={city_id:t.id,city_name:t.name,city_name_en:t.name_en||t.name,city_name_es:t.name_es||t.name_en||t.name,city_name_ka:La[t.name]||t.name_en||t.name,city_name_ar:t.name_ar||t.name_en||t.name,city_name_zh:t.name_zh||t.name_en||t.name,city_name_tr:t.name_tr||t.name_en||t.name,city_name_fr:t.name_fr||t.name_en||t.name,city_name_de:t.name_de||t.name_en||t.name,region_id:t.region_id,region_name:t.region_name,region_name_en:t.regi
2on_name_en||t.region_name,region_name_es:t.region_name_es||t.region_name_en||t.region_name,region_name_ar:t.region_name_ar||t.region_name_en||t.region_name,region_name_zh:t.region_name_zh||t.region_name_en||t.region_name,region_name_tr:t.region_name_tr||t.region_name_en||t.region_name,region_name_fr:t.region_name_fr||t.region_name_en||t.region_name,region_name_de:t.region_name_de||t.region_name_en||t.region_name,country_id:t.country_id,country_code:t.country_code,country_name:t.country_name,country_name_en:t.country_name_en||t.country_name,country_name_es:t.country_name_es||t.country_name_en||t.country_name,country_name_ka:$a[t.country_name]||t.country_name_en||t.country_name,country_name_ar:t.country_name_ar||t.country_name_en||t.country_name,country_name_zh:t.country_name_zh||t.country_name_en||t.country_name,country_name_tr:t.country_name_tr||t.country_name_en||t.country_name,country_name_fr:t.country_name_fr||t.country_name_en||t.country_name,country_name_de:t.country_name_de||t.country_name_en||t.country_name,flag_emoji:t.flag_emoji,latitude:t.latitude,longitude:t.longitude,is_from_ip:!0};return n(a),localStorage.setItem(Fa,JSON.stringify(a)),void c(!1)}}catch(e){}c(!1),localStorage.getItem("freezoni_preferences")||u(!0)}catch(t){c(!1)}},b=async()=>{try{const e=await k.get("/api/geo/countries?priority=true");m(e.data.countries||[])}catch(e){}},x=async()=>{try{const e=await k.get("/api/geo/cities/popular?limit=20");h(e.data.cities||[])}catch(e){}},y=s.useCallback(async e=>{n(e),localStorage.setItem(Fa,JSON.stringify(e)),u(!1);const t=localStorage.getItem("token");if(t&&e.city_id)try{await k.post("/api/geo/my-location",{city_id:e.city_id,latitude:e.latitude,longitude:e.longitude},{headers:{Authorization:`Bearer ${t}`}})}catch(a){}},[]),_=s.useCallback(async(e,t=null)=>{if(!e||e.length<2)return[];try{let n=`/api/geo/search?q=${encodeURIComponent(e)}&limit=10`;t&&(n+=`&country=${t}`);return(await k.get(n)).data.results||[]}catch(n){return[]}},[]),w=s.useCallback(async e=>{try{return(await k.get(`/api/geo/cities?country=${e}&limit=50`)).data.cities||[]}catch(t){return[]}},[]);return J.jsx(Oa.Provider,{value:{location:t,isLoading:l,showCityModal:d,setShowCityModal:u,countries:p,popularCities:f,updateLocation:y,searchCities:_,getCitiesByCountry:w,selectedDistrict:a,setSelectedDistrict:r,selectedMetro:i,setSelectedMetro:o},children:e})},Va=()=>{const e=s.useContext(Oa);if(!e)throw new Error("useLocation must be used within LocationProvider");return e},Ua=()=>{const{t:e,i18n:t}=v(),{location:n,isLoading:a,setShowCityModal:r}=Va();if(a)return J.jsx("div",{className:"city-selector city-selector--loading",children:"📍 ..."});const i=n?Ba(n,t.language,"city_name"):null;return J.jsxs("button",{className:"city-selector",onClick:()=>r(!0),children:[J.jsx("span",{className:"city-selector__icon",children:"📍"}),n?J.jsxs(J.Fragment,{children:[n.country_code&&J.jsx("span",{className:`fi fi-${n.country_code.toLowerCase()}`,style:{width:18,height:13,borderRadius:2,display:"inline-block"}}),J.jsx("span",{className:"city-selector__city",children:i})]}):J.jsxs("span",{className:"city-selector__placeholder",children:[J.jsx("span",{className:"city-selector__placeholder-full",children:e("citySelector.select_city")}),J.jsx("span",{className:"city-selector__placeholder-short",children:e("citySelector.city_short","City")})]}),J.jsx("span",{className:"city-selector__arrow",children:"▼"})]})},Wa=new Map,Ha=new Map,Ka={allowed:!1,loading:!1,reason:"not_authenticated",entitlement:null},qa=e=>{const t=Wa.get(e);return!t||Date.now()-t.at>6e4?null:t.state},Ga=(e,t)=>{Wa.set(e,{at:Date.now(),state:t})},Ja=async e=>{const t=qa(e);return t||(Ha.has(e)||Ha.set(e,zn.get("/support/ai-entitlement").then(t=>{const n=(a=t.data,{allowed:Boolean(a?.allowed||a?.hasPaidAiAccess),loading:!1,reason:a?.reason||(a?.allowed||a?.hasPaidAiAccess?"paid_subscription":"paid_subscription_required"),entitlement:a||null});var a;return Ga(e,n),n}).catch(t=>{const n={allowed:!1,loading:!1,reason:t?.response?.data?.reason||t?.data?.reason||"check_failed",entitlement:t?.response?.data||t?.data||null};return Ga(e,n),n}).finally(()=>{Ha.delete(e)})),Ha.get(e))};function Ya({enabled:e=!0}={}){const{user:t,loading:n}=ba(),a=t?.id||null,[r,i]=s.useState(()=>a?{...Ka,loading:!0}:Ka);return s.useEffect(()=>{let t=!1;if(!e||n||!a)return i(n?{...Ka,loading:!0,reason:"auth_loading"}:Ka),()=>{t=!0};const r=qa(a);return r?(i(r),()=>{t=!0}):(i(e=>({...e,loading:!0})),Ja(a).then(e=>{t||i(e)}
2),()=>{t=!0})},[n,e,a]),r}const Za="freezoni_cart",Qa="freezoni_pending_cart_item",Xa=new Set(["trans-cars","trans-motorcycles","trans-moto","trans-trucks","trans-truck","trans-buses","trans-bus","trans-special","trans-spec","trans-trailers","trans-trail","trans-water","trans-air","trans-bicycles","trans-bike","trans-electric","trans-elec"]),er=new Set(["trans-parts","trans-tires","trans-audio","trans-tuning","trans-chemicals","trans-chem","trans-tools","trans-tool","trans-docs","trans-doc","trans-moto-parts","trans-moto-accessories","trans-moto-gear","trans-moto-helmets","trans-moto-jackets","trans-moto-pants","trans-moto-boots","trans-moto-gloves","trans-moto-protection","trans-water-parts","trans-water-accessories","trans-water-outboard","trans-water-inboard","trans-water-electric-motor","trans-bike-clothing","trans-bike-helmets","trans-bike-locks","trans-bike-bags","trans-bike-lights","trans-bike-computers","trans-bike-frames","trans-bike-wheels","trans-bike-forks","trans-bike-brakes","trans-bike-drivetrain","trans-bike-saddles","trans-bike-handlebars","trans-elec-parts","trans-elec-batteries","trans-elec-chargers"]),tr=new Set(["легковые автомобили","автомобили","мотоциклы","грузовые автомобили","автобусы","спецтехника","прицепы и полуприцепы","водный транспорт","воздушный транспорт","велосипеды","электротранспорт"]),nr="vehicle_cart_disabled",ar=(e,t=1)=>{const n=Number.parseInt(e,10);return Number.isFinite(n)&&n>0?n:t},rr=(e,t)=>t.has(e)||[...t].some(t=>e.startsWith(t+"-")),ir=e=>{const t=(e=>String(e||"").split(/[>/|,;]+/).map(e=>e.trim().toLowerCase()).filter(Boolean))(e);return!!t.length&&(!t.some(e=>rr(e,er))&&(!!t.some(e=>rr(e,Xa)||tr.has(e))||1===t.length&&("transport"===t[0]||"транспорт"===t[0])))},or=(e={})=>ir(e.category||e.category_slug||e.categorySlug),sr=(e={})=>((e,t=1)=>{const n=Number.parseInt(e,10);return Number.isFinite(n)&&n>=0?n:t})(e.stock_quantity??e.stockQuantity??e.available_quantity??e.availableQuantity,1),lr=(e={})=>{const t=sr(e),n=!0===e.cart_item||!0===e.is_cart_item||Boolean(e.updated_at),a=e.cart_quantity??e.cartQuantity??e.selected_quantity??e.selectedQuantity??(n?e.quantity:1),r=ar(a,1);return t>0?Math.min(r,t):r},cr=(e=[])=>Array.isArray(e)?e.reduce((e,t)=>e+lr(t),0):0,dr=(e={},t=void 0)=>{if(void 0===t&&"string"==typeof e&&e.trim())return e.trim();const n=e&&"object"==typeof e?e:{},a=n.cart_key||n.cartKey;if(a)return String(a);const r=Number(n.id||n.ad_id||e);if(!Number.isFinite(r)||r<=0)return"";const i=void 0!==t?t:n.cart_variant_id??n.selected_variant_id??n.variant_id,o=String(i??"").trim();return o?`${r}:${o}`:String(r)},ur=(e={})=>{const t=e.availability_reason||e.availabilityReason||e.unavailable_reason||"";return t&&"available"!==t?String(t):or(e)?nr:!0===e.cart_unavailable||!1===e.cart_available||!1===e.available?"unavailable":sr(e)<=0?"sold_out":""},pr=(e={})=>!1!==e.cart_available&&!1!==e.cartAvailable&&(!0!==e.cart_unavailable&&!0!==e.cartUnavailable&&("unavailable"!==String(e.availability_status||e.availabilityStatus||"").toLowerCase()&&!ur(e))),mr=(e={})=>{const t=sr(e),n=lr({...e,stock_quantity:t}),a=e.selected_variant_id||e.variant_id||null,r=e.cart_key||e.cartKey||dr(e.id||e.ad_id,a),i=ur({...e,stock_quantity:t}),o=!i&&!1!==e.cart_available&&!1!==e.cartAvailable&&!1!==e.available&&!0!==e.cart_unavailable&&!0!==e.cartUnavailable&&"unavailable"!==String(e.availability_status||e.availabilityStatus||"").toLowerCase();return{id:Number(e.id||e.ad_id),cart_key:r,cart_item:!0,quantity:n,stock_quantity:t,title:e.title||"",category:e.category||e.category_slug||e.categorySlug||"",category_id:e.category_id||e.categoryId||null,price:e.price??null,currency:e.currency||"GEL",main_image:e.main_image||e.image||e.image_path||null,image:e.image||e.main_image||e.image_path||null,shop_id:e.shop_id||null,user_id:e.user_id||null,seller_id:e.seller_id||e.sellerId||e.user_id||null,seller_name:e.seller_name||e.shop_name||e.username||"",seller_username:e.seller_username||e.username||"",delivery_city:Boolean(e.delivery_city),delivery_country:Boolean(e.delivery_country),delivery_world:Boolean(e.delivery_world),delivery_pickup:Boolean(e.delivery_pickup),delivery_custom:e.delivery_custom||"",deal_available:Boolean(e.deal_available),deal_enabled:Boolean(e.deal_enabled),deal_delivery_company:e.deal_delivery_company||"",deal_delivery_note:e.deal_delivery_note||"",deal_disabled_reason:e.deal_disabled_reason||"",cart_available:o,cart_unavailable:!o,availability_status:o?"available":"unavailable",availability_reason:i,availability_message:e.availability_message||e.availabilityMessage||(i===nr?"Транспорт оформляется напрямую с продавцом. Через корзин
2у такие объявления не продаются.":""),selected_variant_id:a,selected_variant_title:e.selected_variant_title||e.variant_title||"",selected_variant_color:e.selected_variant_color||e.variant_color||"",selected_variant_color_name:e.selected_variant_color_name||e.variant_color_name||"",selected_variant_sku:e.selected_variant_sku||e.variant_sku||"",location:e.location||e.city||""}},fr=()=>{if("undefined"==typeof localStorage)return[];try{const e=localStorage.getItem(Za);if(!e)return[];const t=JSON.parse(e);return Array.isArray(t)?t.map(mr).filter(e=>Number.isFinite(e.id)&&e.id>0):[]}catch{return[]}},hr=(e,t={})=>{const n=Array.isArray(e)?e.map(mr).filter(e=>Number.isFinite(e.id)&&e.id>0):[];try{localStorage.setItem(Za,JSON.stringify(n))}catch{}return((e,t={})=>{"undefined"!=typeof window&&window.dispatchEvent(new CustomEvent("freezoni_cart_updated",{detail:{items:e,count:cr(e),...t}}))})(n,t),n},gr=e=>{if(!e||"object"!=typeof e){const t=Number(e);return Number.isFinite(t)&&fr().some(e=>Number(e.id)===t)}const t=dr(e);return Boolean(t)&&fr().some(e=>dr(e)===t)},br=(e,t="/")=>{const n=String(e||t||"/");return!n.startsWith("/")||n.startsWith("//")||Qt(n)?t:n},xr=()=>"undefined"==typeof window?"/":br(`${window.location.pathname}${window.location.search}${window.location.hash}`),yr=e=>`/login?next=${encodeURIComponent(br(e||xr()))}`,_r=(e,t)=>{if("undefined"==typeof localStorage)return null;const n=mr(e);if(!Number.isFinite(n.id)||n.id<=0||!pr(n))return null;const a={item:n,returnTo:br(t||xr()),createdAt:Date.now()};return localStorage.setItem(Qa,JSON.stringify(a)),hr([],{source:"auth_required",adId:n.id,isInCart:!1}),a},wr=async({mergeLocalWhenEmpty:e=!0}={})=>{const t=fr();try{let n=await zn.get("/cart"),a=Array.isArray(n.data?.items)?n.data.items:[];const r=(()=>{if("undefined"==typeof localStorage)return null;try{const e=localStorage.getItem(Qa);if(!e)return null;const t=JSON.parse(e),n=Number(t?.createdAt);if(!Number.isFinite(n)||Date.now()-n>864e5)return localStorage.removeItem(Qa),null;const a=mr(t?.item);return!Number.isFinite(a.id)||a.id<=0?(localStorage.removeItem(Qa),null):{...t,item:a}}catch{return localStorage.removeItem(Qa),null}})();r?.item&&(n=await zn.post(`/cart/${r.item.id}`,{item:r.item}),a=Array.isArray(n.data?.items)?n.data.items:a,"undefined"!=typeof localStorage&&localStorage.removeItem(Qa));const i=new Set(a.map(dr)),o=t.filter(e=>{const t=dr(e);return t&&!i.has(t)});return e&&o.length>0&&(n=await zn.put("/cart/sync",{items:[...a,...o]}),a=Array.isArray(n.data?.items)?n.data.items:t),hr(a,{source:"server"})}catch{return t}},vr=async e=>{const t=mr(e);if(!Number.isFinite(t.id)||t.id<=0)return{items:fr(),isInCart:!1};const n=fr(),a=dr(t),r=n.some(e=>dr(e)===a);if(!r&&!pr(t))return{items:n,isInCart:!1};const i=r?n.filter(e=>dr(e)!==a):[...n,t];hr(i,{source:"local",adId:t.id,isInCart:!r});try{const e=r?await zn.delete(`/cart/${t.id}`,{params:{cart_key:a}}):await zn.post(`/cart/${t.id}`,{item:t}),n=Array.isArray(e.data?.items)?e.data.items:i;return{items:hr(n,{source:"server",adId:t.id,isInCart:!r}),isInCart:!r}}catch{if(!r){return{items:hr(n,{source:"server_rejected",adId:t.
2id,isInCart:!1}),isInCart:!1}}return{items:i,isInCart:!r}}},jr=async e=>{const t=e&&"object"==typeof e?e:{},n=Number(t.id||t.ad_id||String(e).split(":")[0]),a=dr(e),r=hr(fr().filter(e=>dr(e)!==a),{source:"local",adId:n,cartKey:a,isInCart:!1});try{const e=await zn.delete(`/cart/${n}`,{params:{cart_key:a}});return hr(Array.isArray(e.data?.items)?e.data.items:r,{source:"server",adId:n,cartKey:a,isInCart:!1})}catch{return r}},kr=async(e,t)=>{const n=e&&"object"==typeof e?e:{},a=Number(n.id||n.ad_id||String(e).split(":")[0]),r=dr(e);if(!Number.isFinite(a)||a<=0)return fr();const i=fr(),o=i.find(e=>dr(e)===r);if(!o)return i;const s=Math.min(ar(t,1),Math.max(sr(o),1)),l=i.map(e=>dr(e)===r?mr({...e,quantity:s}):e),c=hr(l,{source:"local",adId:a,quantity:s});try{const e=await zn.put(`/cart/${a}`,{quantity:s,item:o,cart_key:r});return hr(Array.isArray(e.data?.items)?e.data.items:c,{source:"server",adId:a,quantity:s})}catch{return c}},zr="freezoni_pending_auth_action",Sr=new Set(["favorite","compare","waitlist","recommendations_refresh"]),Er=e=>{const t=Number("object"==typeof e?e?.id||e?.ad_id:e);return Number.isFinite(t)&&t>0?t:null},Cr=e=>`/login?next=${encodeURIComponent(br(e||xr()))}`,Ar=({type:e,adId:t,returnTo:n})=>{if("undefined"==typeof localStorage||!Sr.has(e))return null;const a={type:e,returnTo:br(n||xr()),createdAt:Date.now()},r=Er(t);if("recommendations_refresh"!==e){if(!r)return null;a.adId=r}return localStorage.setItem(zr,JSON.stringify(a)),a},Ir=(e,t)=>Ar({type:"favorite",adId:Er(e),returnTo:t}),Tr=(e,t)=>Ar({type:"waitlist",adId:Er(e),returnTo:t}),Nr=(e,t)=>Ar({type:"compare",adId:Er(e),returnTo:t}),Pr=e=>Ar({type:"recommendations_refresh",returnTo:e}),Lr=()=>{if("undefined"==typeof localStorage)return null;try{const e=localStorage.getItem(zr);if(!e)return null;const t=JSON.parse(e),n=Number(t?.createdAt);if(!Sr.has(t?.type)||!Number.isFinite(n))return localStorage.removeItem(zr),null;if(Date.now()-n>864e5)return localStorage.removeItem(zr),null;const a=Er(t?.adId);return"recommendations_refresh"===t.type||a?{...t,adId:a}:(localStorage.removeItem(zr),null)}catch{return localStorage.removeItem(zr),null}},$r=(e,t=null)=>{const n=Lr();if(!n||n.type!==e)return null;const a=Er(t);return"recommendations_refresh"!==e&&a!==n.adId?null:("undefined"!=typeof localStorage&&localStorage.removeItem(zr),n)},Rr=({style:e})=>J.jsxs("svg",{viewBox:"0 0 366.795 424.567","aria-hidden":"true",focusable:"false",style:e,children:[J.jsx("defs",{children:J.jsxs("linearGradient",{id:"freezoniHeaderMarkGradient",x1:"0",y1:"0",x2:"1",y2:"1",children:[J.jsx("stop",{offset:"0",stopColor:"#01B3FF"}),J.jsx("stop",{offset:"1",stopColor:"#019FFF"})]})}),J.jsx("path",{fill:"url(#freezoniHeaderMarkGradient)",d:"M129.653,0.11c2.11-0.003,4.221-0.006,6.331-0.01c5.702-0.009,11.405-0.011,17.107-0.012 c3.568-0.001,7.136-0.003,10.704-0.005c12.463-0.009,24.926-0.013,37.389-0.013c11.595,0.001,23.19-0.01,34.784-0.026 c9.977-0.013,19.955-0.018,29.932-0.018c5.949,0,11.899-0.003,17.848-0.013c5.595-0.01,11.189-0.01,16.784-0.002 c2.046,0.001,4.092-0.001,6.138-0.007c18.749-0.052,35.805,0.393,49.982,14.252c7.563,9.267,10.895,19.078,10,31 c-1.867,12.01-7.227,22.531-17,30c-9.962,5.901-19.32,9.313-30.912,9.265c-1.293,0.007-1.293,0.007-2.612,0.013 c-2.87,0.012-5.74,0.011-8.61,0.009c-2.065,0.006-4.131,0.013-6.196,0.021c-4.439,0.015-8.878,0.024-13.316,0.028 c-7.022,0.007-14.045,0.028-21.067,0.053c-14.908,0.049-29.816,0.081-44.723,0.112c-16.092,0.033-32.183,0.069-48.275,0.124 c-6.977,0.023-13.954,0.037-20.932,0.043c-4.345,0.006-8.689,0.02-13.034,0.036c-2.01,0.006-4.021,0.008-6.031,0.007 c-2.751-0.001-5.502,0.01-8.253,0.024c-0.789-0.003-1.579-0.007-2.392-0.01c-10.875,0.091-20.775,2.963-28.983,10.388 c-9.435,10.154-11.973,20.642-11.935,34.233c-0.008,1.49-0.008,1.49-0.016,3.01c-0.01,2.143-0.016,4.285-0.018,6.428 c-0.004,3.403-0.02,6.806-0.041,10.209c-0.055,9.671-0.086,19.341-0.111,29.012c-0.016,5.93-0.046,11.86-0.085,17.791 c-0.012,2.246-0.018,4.493-0.018,6.739c-0.002,35.243-0.002,35.243-12.566,49.278c-9.403,8.71-20.497,10.691-32.793,10.465 c-10.015-0.466-19.515-5.337-26.277-12.652c-8.14-10.333-10.413-21.61-10.338-34.549c-0.009-1.22-0.017-2.44-0.026-3.696 c-0.019-3.306-0.02-6.612-0.011-9.919c0.005-2.782-0.002-5.565-0.009-8.347c-0.017-6.579-0.
2014-13.159,0.003-19.738 c0.017-6.733,0.001-13.466-0.031-20.199c-0.027-5.827-0.034-11.654-0.025-17.482c0.005-3.46,0.003-6.919-0.018-10.379 C-0.155,91.101,9.154,61.89,32.653,36.255c0.779-0.873,1.557-1.745,2.359-2.645C60.506,6.449,94.105,0.1,129.653,0.11z"}),J.jsx("path",{fill:"url(#freezoniHeaderMarkGradient)",d:"M251.153,134.919c1.486-0.006,2.973-0.013,4.459-0.02c3.1-0.012,6.199-0.016,9.299-0.014 c3.947,0,7.894-0.027,11.841-0.062c3.065-0.022,6.129-0.026,9.194-0.025c1.454-0.002,2.909-0.011,4.363-0.027 c9.464-0.092,18.084,0.319,25.782,6.414c5.703,7.1,7.431,12.973,6.563,22.07c-2.299,11.517-10.26,19.704-18.321,27.715 c-0.94,0.945-1.88,1.891-2.819,2.838c-2.564,2.58-5.137,5.151-7.711,7.72c-2.783,2.78-5.557,5.569-8.332,8.356 c-5.432,5.453-10.872,10.897-16.315,16.338c-4.428,4.426-8.853,8.855-13.276,13.286c-1.277,1.279-2.553,2.557-3.83,3.836 c-0.636,0.637-1.271,1.273-1.926,1.929c-12.008,12.027-24.026,24.044-36.047,36.058c-10.978,10.972-21.943,21.958-32.901,32.95 c-11.271,11.304-22.55,22.599-33.84,33.884c-6.331,6.329-12.658,12.661-18.975,19.003c-5.38,5.401-10.768,10.793-16.168,16.173 c-2.75,2.741-5.497,5.486-8.232,8.242c-32.244,32.473-32.244,32.473-55.87,32.983c-13.169-0.124-24.466-5.518-34.125-14.313 C3.842,399.647,0.113,386.45,0.34,372.134c2.025-25.13,22.588-41.305,39.201-57.929c1.789-1.793,3.577-3.586,5.365-5.38 c4.826-4.839,9.655-9.675,14.485-14.509c3.022-3.025,6.043-6.05,9.065-9.076c8.386-8.398,16.772-16.795,25.162-25.188 c0.802-0.802,0.802-0.802,1.62-1.621c0.804-0.804,0.804-0.804,1.624-1.624c1.086-1.086,2.171-2.172,3.257-3.258 c0.808-0.808,0.808-0.808,1.632-1.632c8.738-8.742,17.468-17.49,26.196-26.241c8.987-9.011,17.98-18.017,26.979-27.016 c5.042-5.043,10.081-10.088,15.115-15.139c4.73-4.747,9.468-9.486,14.211-14.22c1.735-1.734,3.468-3.471,5.198-5.211 c2.369-2.382,4.747-4.754,7.128-7.124c0.675-0.683,1.351-1.367,2.047-2.071c6.291-6.227,13.407-11.813,21.529-15.45 c0.815-0.378,1.629-0.755,2.469-1.145C231.981,135.078,241.356,134.929,251.153,134.919z"})]}),Dr=()=>{const e=c(),t=d(),{t:n,i18n:a}=v(),{user:r,logout:i}=ba(),{categoriesTree:o,fetchCategoriesTree:l}=ka(),{compareCount:p=0}=Na(),{allowed:m}=Ya({enabled:Boolean(r?.id)}),[f,h]=s.useState(!1),g=s.useRef(null),b=[{code:"ru",label:"RU"},{code:"en",label:"EN"},{code:"es",label:"ES"},{code:"ka",label:"GE"},{code:"ar",label:"AR"},{code:"zh",label:"中文"},{code:"tr",label:"TR"},{code:"fr",label:"FR"},{code:"de",label:"DE"}],x=kt(t.pathname)||pt(a.resolvedLanguage||a.language)||"ru",y=b.find(e=>e.code===x)?.label||"RU",_=e=>Ct(x,e),w=(t,n)=>e(_(t),n);s.useEffect(()=>{const e=e=>{g.current&&!g.current.contains(e.target)&&h(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]);const[j,k]=s.useState(0),[z,S]=s.useState(0),[E,C]=s.useState(0),[A,I]=s.useState(n("header.detectingRegion")),[T,N]=s.useState(!1),[P,L]=s.useState(null),[$,R]=s.useState(0);s.useEffect(()=>{if(!r)return void k(0);const e=e=>{const t=Number(e?.detail?.count);Number.isFinite(t)&&t>=0?k(t):k(cr(fr()))};return e(),wr().then(e=>k(cr(e))),window.addEventListener("freezoni_cart_updated",e),window.addEventListener("storage",e),()=>{window.removeEventListener("freezoni_cart_updated",e),window.removeEventListener("storage",e)}},[r]),s.useEffect(()=>{let e=null;const t=async()=>{if(r)try{const e=await zn.get("/favorites"),t=e.data?.ads||e.data?.favorites||e.data||[];S(Array.isArray(t)?t.length:0)}catch{S(0)}else S(0)};t();const n=n=>{e&&window.clearTimeout(e);const a=n?.detail?.ids,r=Number(n?.detail?.count);if(Array.isArray(a))S(a.length),e=window.setTimeout(t,1200);else if(Number.isFinite(r)&&r>=0)S(r),e=window.setTimeout(t,1200);else{const n=(()=>{try{const e=localStorage.getItem("freezoni_favorites");if(!e)return!1;const t=JSON.parse(e);return!!Array.isArray(t)&&(S(t.length),!0)}catch{return!1}})();e=window.setTimeout(t,n?800:0)}};return window.addEventListener("freezoni_favorites_updated",n),()=>{e&&window.clearTimeout(e),window.removeEventListener("freezoni_favorites_updated",n)}},[r]),s.useEffect(()=>{const e=async()=>{if(r)try{const e=await zn.get("/chats/unread-count");C(e.data.unread||0)}catch{C(0)}else C(0)};e();const t=setInterval(e,3e4);return window.addEventListener("freezoni_messages_updated",e),()=>{clearInterval(t),window.removeEventListener("freezoni_messages_updated",e)}},[r]),s.useEffect(()=>{const e=async()=>
2{if(r)try{const e=await zn.get("/notifications/unread-count");R(e.data.count||0)}catch{R(0)}else R(0)};e();const t=setInterval(e,3e4);return()=>clearInterval(t)},[r]),s.useEffect(()=>{if(!r)return;let e=null,t=null,n=!1;const a=async()=>{if(n)return;let r;try{const e=await fetch("/api/auth/ws-token",{credentials:"include"});if(!e.ok)throw new Error("ws-token mint failed");if(r=(await e.json()).wsToken,!r)throw new Error("empty wsToken")}catch{return void(n||(t=setTimeout(a,3e3)))}const i=`${"https:"===window.location.protocol?"wss:":"ws:"}//${window.location.host}/ws/user-notifications?wsToken=${encodeURIComponent(r)}`;try{e=new WebSocket(i)}catch{return void(n||(t=setTimeout(a,3e3)))}e.addEventListener("message",e=>{let t;try{t=JSON.parse(e.data)}catch{return}"notification_created"===t.type&&((async()=>{try{const e=await zn.get("/notifications/unread-count");R(e.data.count||0)}catch{}})(),window.dispatchEvent(new CustomEvent("freezoni_notifications_updated",{detail:t}))),"chat_unread_changed"===t.type&&((async()=>{try{const e=await zn.get("/chats/unread-count");C(e.data.unread||e.data.count||0)}catch{}})(),window.dispatchEvent(new CustomEvent("freezoni_messages_updated",{detail:t})))}),e.addEventListener("close",()=>{e=null,n||(t=setTimeout(a,3e3))}),e.addEventListener("error",()=>{try{e&&e.close()}catch{}})};return a(),()=>{if(n=!0,t&&clearTimeout(t),e)try{e.close()}catch{}}},[r]);s.useEffect(()=>{(async()=>{try{const e=await zn.get("/geo/detect");if(e.data?.success&&e.data?.detected){const t=e.data.matched_city||e.data.raw||e.data.geo,n=t?.name||t?.city||t?.region||t?.country;if(n)return void I(n)}}catch(e){}try{const e=await fetch("https://ipwho.is/");if(e.ok){const t=await e.json(),n=t.city||t.region||t.country;if(n)return void I(n)}}catch{}I(n("header.regionUnknown"))})()},[]),s.useEffect(()=>{l()},[l]);const D=o.length>0?o:[],B=({items:e,level:t=0,onClose:r})=>{const[i,o]=s.useState(!1);if(!e||0===e.length)return null;const l=t>0&&e.length>10&&!i,c=l?e.slice(0,10):e,d=e.length-10;return J.jsxs(J.Fragment,{children:[c.map((e,n)=>J.jsxs("div",{style:{marginBottom:0===t?20:2},children:[J.jsxs(u,{to:_(`/category/${e.slug}`),className:0===t?"subcategory-group-title":"subcategory-item",onClick:r,children:[0===t&&J.jsx("span",{className:"subcategory-icon",children:e.icon||"📁"}),"ru"===a.language?e.name:e[`name_${a.language}`]||e.name_en||e.name]}),e.children&&e.children.length>0&&J.jsx("div",{style:{marginTop:4},children:J.jsx(B,{items:e.children,level:t+1,onClose:r})})]},n)),l&&J.jsx("button",{type:"button",className:"subcategory-more-btn",onClick:e=>{e.stopPropagation(),o(!0)},children:n("header.more_items",{count:d})})]})},O=()=>{N(!1),L(null)},[F,M]=s.useState(!1),V=s.useRef(null),U=s.useRef(null);s.useEffect(()=>{const e=e=>{V.current&&!V.current.contains(e.target)&&M(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),s.useEffect(()=>{if(!r)return;const e=()=>{const e=U.current;e&&window.matchMedia("(max-width: 768px)").matches&&(e.scrollLeft=e.scrollWidth)},t=window.requestAnimationFrame(e),n=window.setTimeout(e,120);return window.addEventListener("resize",e),()=>{window.cancelAnimationFrame(t),window.clearTimeout(n),window.removeEventListener("resize",e)}},[r,a.language]);const W=_(r?"/compare":Cr("/compare")),H=_(r?"/favorites":Cr("/favorites"));return J.jsxs("header",{style:Br.headerWrap,className:"fz-site-header",children:[J.jsx("div",{style:Br.mainBar,className:"fz-main-bar",children:J.jsxs("div",{style:Br.mainBarInner,className:"fz-main-bar-inner",children:[J.jsxs(u,{to:_("/"),style:Br.logo,className:"fz-logo","data-onboarding":"home",children:[J.jsx(Rr,{style:Br.logoImg}),J.jsxs("span",{style:Br.logoText,children:["Free",J.jsx("span",{style:Br.logoAccent,className:"fz-logo-accent",children:"zoni"})]})]}),J.jsxs("div",{style:Br.catalogWrapper,className:"fz-catalog-wrap",children:[J.jsxs("button",{type:"button",style:Br.catalogBtn,className:"fz-catalog-btn","data-onboarding":"catalog",onClick:()=>N(e=>!e),children:[J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("line",{x1:"3",y1:"6",x2:"21",y2:"6"}),J.jsx("line",{x1:"3",y1:"12",x2:"21",y2:"12"}),J.jsx("line",{x1:"3",y1:"18",x2:"21",y2:"18"})]}),J.jsx("span",{children:n("header.catalog")})]}),T&&J.jsxs(J.Fragment,{children:[J.jsx("div",{style:Br.overlay,onClick:O}),J.jsxs("div",{style:Br.catalogMenu,className:"fz-catalog-menu",children:[J.jsx("style",{children:"\n                    .catalog-item { display: flex; align-items: center; gap: 10px; padding: 10px 16px; color: #e5e7eb; text-decoration: none; font-size: 14px; transition: background 0.15s ease, color 0.15s ease; border-radius: 6px; margin: 2px 8px; cursor: pointer; }\n                    .catalog-item:hover, .catalog-item.active { background: linear-gradient(90deg, #1a3f8b, #2563eb); color: #ffffff; }\n                    .subcategory-group-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: #ffffff; text-decoration: none; padding: 6px 10px; margin: 0 -10px; border-radius: 6px; transition: all 0.15s ease; }\n                    .subcategory-group-title:hover { background: linear-gradient(90deg, #1a3f8b, #2563eb); }\n                    .subcategory-icon { flex-shrink: 0; }\n                    .subcategory-item { display: block; font-size: 13px; color: #9ca3af; text-decoration: none; padding: 5px 10px; margin: 0 -10px; border-radius: 6px; transition: all 0.15s ease; }\n                    .subcategory-item:hover { background: linear-gradient(90deg, #1a3f8b, #2563eb); color: #ffffff; }\n                    .subcategory-more-btn { display: inline-block; margin-top: 6px; padding: 4px 10px; background: none; border: none; color: #60a5fa; font-size: 12px; cursor: pointer; }\n                    .subcategory-more-btn:hover { color: #7dd3fc; }\n                  "}),J.jsx("div",{style:Br.catalogLeft,className:"fz-catalog-left",children:[...D].sort((e,t)=>
2{const n=a.language,r=("ru"===n?e.name:e[`name_${n}`]||e.name_en||e.name)||"",i=("ru"===n?t.name:t[`name_${n}`]||t.name_en||t.name)||"";return r.localeCompare(i,n,{sensitivity:"base"})}).map((e,t)=>J.jsx("div",{className:"catalog-item "+(P===e.slug?"active":""),onMouseEnter:()=>L(e.slug),onClick:()=>{w(`/category/${e.slug}`),O()},children:J.jsx("span",{children:"ru"===a.language?e.name:e[`name_${a.language}`]||e.name_en||e.name})},t))}),P&&J.jsx("div",{style:Br.catalogRight,className:"fz-catalog-right",children:(()=>{const e=D.find(e=>e.slug===P);return e?.children?.length?J.jsx("div",{style:Br.subcategoriesGrid,children:J.jsx(B,{items:e.children,onClose:O})}):J.jsx("div",{style:{color:"#9ca3af",padding:20},children:n("header.no_subcategories")})})()})]})]})]}),J.jsx("div",{style:Br.searchWrapper,className:"fz-search-wrap","data-onboarding":"search",children:J.jsx(Pa,{placeholder:n("header.searchPlaceholder"),compact:!0,showImageSearch:!0,onSearch:e=>{const t=e.query||e.detected?.description||"",n=String(e.meta?.search_type||"").includes("image")?"image":"semantic";e.results?.length>0?(sessionStorage.setItem("smartSearchResults",JSON.stringify({...e,__searchQuery:t,__searchType:n,__storedAt:Date.now()})),w(`/ads?search=${encodeURIComponent(t)}&type=${n}`)):w(`/ads?search=${encodeURIComponent(t)}`)}})}),r?.id&&m&&J.jsxs("button",{type:"button",className:"fz-mobile-ai-btn","aria-label":n("supportChat.open","Открыть AI"),title:n("supportChat.open","Открыть AI"),onClick:()=>{window.dispatchEvent(new CustomEvent("freezoni:open-support-chat"))},children:[J.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.25",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[J.jsx("path",{d:"M12 3l1.9 5.1L19 10l-5.1 1.9L12 17l-1.9-5.1L5 10l5.1-1.9L12 3Z"}),J.jsx("path",{d:"M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8L19 15Z"})]}),J.jsx("span",{className:"fz-mobile-ai-btn__text",children:"AI"})]}),J.jsx(Ua,{}),J.jsxs("div",{ref:g,style:Br.langWrap,className:"fz-lang-wrap",children:[J.jsxs("button",{type:"button",style:Br.langBtn,className:"fz-lang-btn",onClick:()=>h(e=>!e),title:n("header.language"),children:[y," ",J.jsx("span",{style:{fontSize:10,opacity:.7},children:"▾"})]}),f&&J.jsx("div",{style:Br.langDropdown,children:b.map(n=>J.jsx("button",{type:"button",className:"fz-lang-item"+(x===n.code?" active":""),onClick:()=>(async n=>{h(!1);try{const a=await Rt(n,{explicit:!0});r?.id&&zn.put("/profile/locale",{language:a}).catch(()=>{});const i=`${St(t.pathname||"/")}${t.search||""}${t.hash||""}`;e(Ct(a,i))}catch(a){}})(n.code),children:n.label},n.code))})]}),J.jsxs("div",{className:"fz-mhdr-actions",children:[J.jsxs(u,{to:W,className:"fz-mhdr-btn","data-onboarding":"compare","aria-label":n("mobileHeader.compare",n("header.compare","Сравнить")),children:[J.jsxs("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[J.jsx("path",{d:"M7 7h11"}),J.jsx("path",{d:"M15 3l4 4-4 4"}),J.jsx("path",{d:"M17 17H6"}),J.jsx("path",{d:"M9 13l-4 4 4 4"})]}),p>0&&J.jsx("span",{className:"fz-mhdr-badge","aria-label":n("compare.count",{count:p,defaultValue:"{{count}} в сравнении"}),children:p>99?"99+":p})]}),J.jsxs(u,{to:H,className:"fz-mhdr-btn","data-onboarding":"favorites","aria-label":n("mobileHeader.favorites","Избранное"),children:[J.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:J.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),z>0&&J.jsx("span",{className:"fz-mhdr-badge","aria-label":n("favorites.count",{count:z,defaultValue:"{{count}} в избранном"}),children:z>99?"99+":z})]}),J.jsxs(u,{to:_("/chats"),className:"fz-mhdr-btn","data-onboarding":"chats","aria-label":n("mobileHeader.chats","Чаты"),children:[J.jsx("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:J.jsx("path",{d:"M21 11.5C21 16 16.97 19.5 12 19.5C10.62 19.5 9.32 19.27 8.16 18.85L3 20L4.4 15.5C3.52 14.3 3 12.95 3 11.5C3 7 7.03 3.5 12 3.5C16.97 3.5 21 7 21 11.5Z"})}),E>0&&J.jsx("span",{className:"fz-mhdr-badge","aria-label":n("mobileHeader.unreadCount",{count:E,defaultValue:"{{count}} непрочитанных"}),children:E>99?"99+":E})]})]}),r?J.jsx("button",{type:"button",style:Br.ctaBtn,className:"fz-cta-btn","data-onboarding":"create",onClick:()=>w("/ads/create"),children:n("header.post_ad")}):J.jsxs(u,{to:_("/login"),style:Br.loginBtn,className:"fz-login-btn",children:[J.jsxs("svg",{width:"16",height:"16",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",style:{marginRight:6},children:[J.jsx("path",{d:"M15 3h4a2 2 0 0 1 2 2v14a2 2 0 0 1-2 2h-4"}),J.jsx("polyline",{points:"10 17 15 12 10 7"}),J.jsx("line",{x1:"15",y1:"12",x2:"3",y2:"12"})]}),n("header.login")]})]})}),r&&J.jsx("div",{style:Br.iconStrip,className:"fz-icon-strip",children:J.jsxs("div",{style:Br.iconStripInner,className:"fz-icon-strip-inner",ref:U,children:[J.jsxs(u,{to:_("/profile?tab=notifications"),style:Br.iconItem,className:"fz-icon-item",onClick:()=>{0!==$&&(R(0),zn.put("/notifications/read-all").catch(e=>{}))},children:[J.jsxs("div",{style:Br.iconBox,children:[J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("path",{d:"M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"}),J.jsx("path",{d:"M13.73 21a2 2 0 0 1-3.46 0"})]}),$>0&&J.jsx("span",{style:Br.iconBadge,children:$})]}),J.jsx("span",{style:Br.iconLabel,children:n("header.notifications","Уведомления")})]}),J.jsxs(u,{to:_("/favorites"),style:Br.iconItem,className:"fz-icon-item","data-onboarding":"favorites",children:[J.jsxs("div",{style:Br.iconBox,children:[J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M20.84 4.61a5.5 5.5 0 0 0-7.78 0L12 5.67l-1.06-1.06a5.5 5.5 0 0 0-7.78 7.78l1.06 1.06L12 21.23l7.78-7.78 1.06-1.06a5.5 5.5 0 0 0 0-7.78z"})}),z>0&&J.jsx("span",{style:Br.iconBadge,children:z})]}),J.jsx("span",{style:Br.iconLabel,children:n("header.favorites")})]}),J.jsxs(u,{to:_("/compare"),style:Br.iconItem,className:"fz-icon-item","data-onboarding":"compare",children:[J.jsxs("div",{style:Br.iconBox,children:[J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.8",children:J.jsx("path",{d:"M16 3h5v5M4 20L21 3M21 16v5h-5M15 15l6 6M4 4l5 5"})}),p>0&&J.jsx("span",{style:Br.iconBadge,children:p})]}),J.jsx("span",{style:Br.iconLabel,children:n("header.compare")})]}),J.jsxs(u,{to:_("/auctions"),style:Br.iconItem,className:"fz-icon-item",children:[J.jsx("div",{style:Br.iconBox,children:J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("path",{d:"M14.5 5.5L18.5 9.5M3 21L7.5 16.5M8.5 11.5L12.5 15.5"}),J.jsx("path",{d:"M15.5 4.5L19.5 8.5L21 7L17 3L15.5 4.5Z"})]})}),J.jsx("span",{style:Br.iconLabel,children:n("header.auctions")})]}),J.jsxs(u,{to:_("/map"),style:Br.iconItem,className:"fz-icon-item",title:n("header.mapTitle"),children:[J.jsx("div",{style:Br.iconBox,children:J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("polygon",{points:"1 6 1 22 8 18 16 22 23 18 23 2 16 6 8 2 1 6"}),J.jsx("line",{x1:"8",y1:"2",x2:"8",y2:"18"}),J.jsx("line",{x1:"16",y1:"6",x2:"16",y2:"22"})]})}),J.jsx("span",{style:Br.iconLabel,children:n("header.map")})]}),J.jsxs(u,{to:_("/cart"),style:Br.iconItem,className:"fz-icon-item","data-onboarding":"cart",children:[J.jsxs("div",{style:Br.iconBox,children:[J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("circle",{cx:"9",cy:"21",r:"1"}),J.jsx("circle",{cx:"20",cy:"21",r:"1"}),J.jsx("path",{d:"M1 1h4l2.68 13.39a2 2 0 0 0 2 1.61h9.72a2 2 0 0 0 2-1.61L23 6H6"})]}),j>0&&J.jsx("span",{style:Br.iconBadge,children:j})]}),J.jsx("span",{style:Br.iconLabel,children:n("header.cart")})]}),J.jsxs(u,{to:_("/chats"),style:Br.iconItem,className:"fz-icon-item","data-onboarding":"chats",children:[J.jsxs("div",{style:Br.iconBox,children:[J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"})}),E>0&&J.jsx("span",{style:Br.iconBadge,children:E})]}),J.jsx("span",{style:Br.iconLabel,children:n("header.chats")})]}),J.jsxs("div",{style:{position:"relative"},ref:V,children:[J.jsxs("button",{type:"button",className:"fz-icon-item fz-header-profile","data-onboarding":"profile",style:{cursor:"pointer"},onClick:()=>
2{if(window.matchMedia("(max-width: 900px)").matches)return M(!1),void w("/profile");M(e=>!e)},children:[J.jsx("div",{style:Br.avatar,children:(()=>{if(!r?.username)return"?";const e=r.username.trim().split(/\s+/);return e.length>=2?(e[0][0]+e[1][0]).toUpperCase():e[0].slice(0,2).toUpperCase()})()}),J.jsx("span",{style:Br.iconLabel,children:n("header.profile")})]}),F&&J.jsxs("div",{className:"fz-profile-dropdown",children:[J.jsxs(u,{to:_("/profile"),className:"fz-profile-dropdown-item",onClick:()=>M(!1),children:[J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),J.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),n("header.profile")]}),J.jsxs(u,{to:_("/help"),className:"fz-profile-dropdown-item",onClick:()=>M(!1),children:[J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[J.jsx("circle",{cx:"12",cy:"12",r:"9"}),J.jsx("path",{d:"M9.8 9a2.4 2.4 0 0 1 4.6 1c0 1.8-2.4 2-2.4 3.6"}),J.jsx("path",{d:"M12 17h.01"})]}),n("help.title","Центр помощи")]}),J.jsx("div",{className:"fz-profile-dropdown-divider"}),J.jsxs("button",{type:"button",className:"fz-profile-dropdown-item fz-profile-dropdown-logout",onClick:()=>{M(!1),(async()=>{try{await i(),w("/")}catch(e){}})()},children:[J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("path",{d:"M9 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h4"}),J.jsx("polyline",{points:"16 17 21 12 16 7"}),J.jsx("line",{x1:"21",y1:"12",x2:"9",y2:"12"})]}),n("header.logout")]})]})]})]})}),J.jsx("style",{children:"\n        /* Main gradient bar */\n        .fz-main-bar {\n          background: linear-gradient(135deg, #0c1e4a, #1a3f8b, #2563eb) !important;\n          height: 68px !important;\n          display: flex !important;\n          align-items: center !important;\n          width: 100% !important;\n          max-width: 100vw !important;\n          overflow-x: hidden !important;\n          overflow-x: clip !important;\n        }\n        .fz-main-bar > div {\n          min-width: 0 !important;\n        }\n        .fz-main-bar > .fz-main-bar-inner,\n        .fz-icon-strip > .fz-icon-strip-inner {\n          width: 100% !important;\n          max-width: 1200px !important;\n          margin-left: auto !important;\n          margin-right: auto !important;\n        }\n\n        @media (min-width: 769px) {\n          .fz-main-bar > .fz-main-bar-inner {\n            display: grid !important;\n            grid-template-columns: auto auto minmax(0, 1fr) auto auto auto !important;\n            align-items: center !important;\n            grid-auto-flow: column !important;\n            grid-auto-columns: max-content !important;\n          }\n\n          .fz-main-bar .fz-search-wrap {\n            width: 100% !important;\n            min-width: 0 !important;\n            max-width: 100% !important;\n            align-self: center !important;\n          }\n        }\n\n        /* Force white text for all links/spans inside main bar */\n        .fz-main-bar,\n        .fz-main-bar a,\n        .fz-main-bar span,\n        .fz-main-bar button {\n          color: #ffffff !important;\n        }\n\n        /* Reset all buttons inside header (override any global button styles) */\n        .fz-main-bar button,\n        .fz-icon-strip button {\n          background: transparent !important;\n          border: none !important;\n          border-radius: 0 !important;\n          padding: 0 !important;\n          box-shadow: none !important;\n        }\n\n        /* Logo accent (\"zoni\" in sky blue) */\n        .fz-main-bar .fz-logo-accent {\n          color: #7dd3fc !important;\n        }\n\n        /* Catalog button (parent selector for specificity > .fz-main-bar button) */\n        .fz-main-bar button.fz-catalog-btn {\n          display: flex !important;\n          align-items: center !important;\n          gap: 6px !important;\n          padding: 8px 16px !important;\n          border-radius: 8px !important;\n          background: rgba(255,255,255,0.12) !important;\n          border: 1px solid rgba(255,255,255,0.18) !important;\n          color: #ffffff !important;\n          font-size: 14px !important;\n          font-weight: 500 !important;\n          cursor: pointer !important;\n          backdrop-filter: blur(4px);\n          transition: background 0.2s;\n        }\n        .fz-main-bar button.fz-catalog-btn:hover {\n          background: rgba(255,255,255,0.22) !important;\n        }\n\n        /* Language button */\n        .fz-main-bar button.fz-lang-btn {\n          background: transparent !important;\n          border: 1px solid rgba(255,255,255,0.18) !important;\n          color: rgba(255,255,255,0.6) !important;\n          padding: 5px 10px !important;\n          border-radius: 6px !important;\n          font-size: 13px !important;\n          font-weight: 600 !important;\n          letter-spacing: 0.5px;\n          cursor: pointer;\n          display: flex !important;\n          align-items: center !important;\n          gap: 4px !important;\n        }\n        .fz-main-bar button.fz-lang-btn:hover {\n          border-color: rgba(255,255,255,0.4) !important;\n          color: rgba(255,255,255,0.9) !important;\n        }\n\n        /* CTA button (+ Разместить) — white bg, blue text */\n        .fz-main-bar .fz-cta-btn {\n          display: flex !important;\n          align-items: center !important;\n          padding: 8px 18px !important;\n          border-radius: 8px !important;\n          border: none !important;\n          background: #ffffff !important;\n          color: #2563eb !important;\n          font-size: 14px !important;\n          font-weight: 600 !important;\n          cursor: pointer !important;\n          white-space: nowrap !important;\n          box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;\n          transition: transform 0.15s, box-shadow 0.15s;\n        }\n        .fz-main-bar .fz-cta-btn:hover {\n          transform: translateY(-1px);\n          box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;\n        }\n\n        /* Login button — white bg, blue text */\n        .fz-main-bar .fz-login-btn {\n          display: flex !important;\n          align-items: center !important;\n          padding: 8px 18px !important;\n          border-radius: 8px !important;\n          background: #ffffff !important;\n          color: #2563eb !important;\n          font-size: 14px !important;\n          font-weight: 600 !important;\n          text-decoration: none !important;\n          white-space: nowrap !important;\n          box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;\n          transition: transform 0.15s;\n        }\n        .fz-main-bar .fz-login-btn:hover {\n          transform: translateY(-1px);\n          box-shadow: 0 4px 12px rgba(0,0,0,0.2) !important;\n        }\n        /* SVG inside login button */\n        .fz-main-bar .fz-login-btn svg {\n          color: #2563eb !important;\n          stroke: #2563eb !important;\n        }\n\n        /* Icon strip (dark bar) */\n        .fz-icon-strip {\n          background: #0c1e4a !important;\n          border-top: 1px solid rgba(255,255,255,0.06);\n          box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);\n        }\n        .fz-icon-strip > div {\n          justify-content: flex-end !important;\n          height: 54px !important;\n          gap: 2px !important;\n          align-items: center !important;\n          overflow: visible !important;\n        }\n\n        /* Icon items */\n        .fz-icon-item {\n          position: relative !important;\n          display: flex !important;\n          flex-direction: column !important;\n          align-items: center !important;\n          justify-content: center !important;\n          color: rgba(226,232,240,0.82) !important;\n          border-radius: 10px;\n          min-height: 48px !important;\n          padding: 5px 4px !important;\n          box-sizing: border-box !important;\n          transform: none !important;\n          transition: color 0.2s ease, background 0.2s ease;\n          text-decoration: none !important;\n        }\n        .fz-icon-item:not(.fz-header-profile) > div:first-child {\n          flex: 0 0 22px !important;\n          width: 22px !important;\n          height: 22px !important;\n          display: flex !important;\n          align-items: center !important;\n          justify-content: center !important;\n        }
2\n        .fz-icon-item svg {\n          width: 20px !important;\n          height: 20px !important;\n          stroke-width: 2.2;\n          filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));\n        }\n        .fz-icon-item > span {\n          color: inherit !important;\n          text-shadow: 0 1px 2px rgba(0,0,0,0.28);\n        }\n        .fz-icon-item:hover {\n          color: #ffffff !important;\n          background: rgba(125,211,252,0.1) !important;\n          transform: none !important;\n        }\n\n        .fz-mhdr-actions {\n          display: none;\n        }\n\n        .fz-mobile-ai-btn {\n          display: none;\n        }\n\n        /* Profile dropdown container */\n        @keyframes fzDropdownIn {\n          from { opacity: 0; transform: translateY(-8px) scale(0.96); }\n          to   { opacity: 1; transform: translateY(0) scale(1); }\n        }\n        .fz-profile-dropdown {\n          position: absolute;\n          top: calc(100% + 8px);\n          right: 0;\n          min-width: 200px;\n          background: linear-gradient(160deg, #0f2352 0%, #132d6b 100%);\n          border: 1px solid rgba(255,255,255,0.14);\n          border-radius: 12px;\n          padding: 6px 0;\n          z-index: 1100;\n          box-shadow: 0 12px 40px rgba(0,0,0,0.45), 0 0 0 1px rgba(255,255,255,0.06);\n          animation: fzDropdownIn 0.18s cubic-bezier(0.16, 1, 0.3, 1) forwards;\n          overflow: hidden;\n        }\n\n        /* Dropdown item */\n        .fz-profile-dropdown-item {\n          display: flex !important; align-items: center !important; justify-content: flex-start !important; gap: 12px !important;\n          padding: 11px 18px !important;\n          color: #e2e8f0 !important; text-decoration: none !important;\n          font-size: 14px !important; font-weight: 500 !important;\n          cursor: pointer !important; width: 100% !important; text-align: left !important;\n          background: transparent !important; border: none !important; border-radius: 0 !important;\n          transition: background 0.15s, color 0.15s !important;\n          box-shadow: none !important;\n        }\n        .fz-icon-strip .fz-profile-dropdown .fz-profile-dropdown-item {\n          padding: 11px 18px !important;\n          justify-content: flex-start !important;\n          box-sizing: border-box !important;\n        }\n        .fz-profile-dropdown-item svg {\n          opacity: 0.7;\n          width: 18px;\n          height: 18px;\n          flex: 0 0 18px;\n          transition: opacity 0.15s;\n        }\n        .fz-profile-dropdown-item:hover {\n          background: rgba(255,255,255,0.1) !important;\n          color: #ffffff !important;\n        }\n        .fz-profile-dropdown-item:hover svg {\n          opacity: 1;\n        }\n\n        /* Logout item (red accent on hover) */\n        .fz-profile-dropdown-logout:hover {\n          background: rgba(239,68,68,0.15) !important;\n          color: #fca5a5 !important;\n        }\n        .fz-profile-dropdown-logout:hover svg {\n          stroke: #fca5a5;\n        }\n\n        /* Divider */\n        .fz-profile-dropdown-divider {\n          height: 1px;\n          margin: 4px 12px;\n          background: rgba(255,255,255,0.1);\n        }\n\n        /* Legacy — keep for any other fz-more-item usage */\n        .fz-more-item {\n          display: flex; align-items: center; gap: 10px; padding: 10px 16px;\n          color: #e5e7eb; text-decoration: none; font-size: 13px; cursor: pointer;\n          background: none !important; border: none !important; width: 100%; text-align: left;\n          transition: background 0.15s;\n        }\n        .fz-more-item:hover {\n          background: rgba(255,255,255,0.08) !important;\n        }\n\n        /* Language dropdown items */\n        .fz-main-bar button.fz-lang-item {\n          display: block !important; width: 100% !important;\n          background: transparent !important; border: none !important;\n          color: #e5e7eb !important; padding: 8px 14px !important;\n          font-size: 13px !important; font-weight: 600 !important;\n          cursor: pointer !important; text-align: center !important;\n          transition: background 0.15s; border-radius: 0 !important;\n        }\n        .fz-main-bar button.fz-lang-item:hover { background: rgba(255,255,255,0.1) !important; }\n        .fz-main-bar button.fz-lang-item.active { background: #2563eb !important; color: #fff !important; }\n\n        /* Notification read-all button */\n        .fz-icon-strip button.fz-read-all-btn {\n          background: transparent !important; border: none !important; color: #60a5fa !important;\n          font-size: 12px !important; cursor: pointer !important; font-weight: 500 !important;\n          padding: 0 !important; border-radius: 0 !important;\n        }\n\n        /* Profile button in icon strip */\n        .fz-header-profile {\n          display: flex !important;\n          flex-direction: column !important;\n          align-items: center !important;\n          padding: 5px 3px !important;\n          background: transparent !important;\n          border: none !important;\n        }\n\n        /* SmartSearch overrides inside header */\n        .fz-main-bar .fz-smart-search,\n        .fz-main-bar .fz-search-wrap > div[style] {\n          width: 100% !important;\n          min-width: 0 !important;\n          max-width: 100% !important;\n          border: none !important;\n          padding: 0 !important;\n          border-radius: 12px !important;\n          overflow: visible !important;\n          box-sizing: border-box !important;\n        }\n        /* Inner flex search box — explicit height so Найти button can fill 100% */\n        .fz-main-bar .fz-smart-search-box,\n        .fz-main-bar .fz-search-wrap > div > div[style*=\"flex\"] {\n          display: grid !important;\n          grid-template-columns: 34px minmax(0, 1fr) minmax(38px, 44px) minmax(60px, 76px) !important;\n          column-gap: 0 !important;\n          width: 100% !important;\n          min-width: 0 !important;\n          border: none !important;\n          padding: 0 !important;\n          border-radius: 12px !important;\n          overflow: hidden !important;\n          box-shadow: none !important;\n          height: 42px !important;\n          align-items: stretch !important;\n          box-sizing: border-box !important;\n        }\n        .fz-main-bar .fz-search-wrap input {\n          width: 100% !important;\n          min-width: 0 !important;\n          height: 100% !important;\n          padding: 10px 12px 10px 6px !important;\n          font-size: 14px !important;\n          box-sizing: border-box !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-icon {\n          display: flex !important;\n          align-items: center !important;\n          justify-content: center !important;\n          height: 100% !important;\n          min-height: 42px !important;\n          line-height: 1 !important;\n          color: #374151 !important;\n          transform: translateY(0) !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-icon svg {\n          width: 20p
2x !important;\n          height: 20px !important;\n          stroke-width: 2.2 !important;\n        }\n        /* AI photo button inside search — spacing from Найти */\n        .fz-main-bar .fz-smart-search-camera-wrap {\n          width: 100% !important;\n          min-width: 0 !important;\n          max-width: 44px !important;\n          height: 100% !important;\n          min-height: 42px !important;\n          overflow: hidden !important;\n          box-sizing: border-box !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-camera-btn {\n          display: flex !important;\n          align-items: center !important;\n          justify-content: center !important;\n          align-self: stretch !important;\n          height: 100% !important;\n          min-height: 42px !important;\n          width: 100% !important;\n          min-width: 0 !important;\n          padding: 0 8px !important;\n          line-height: 1 !important;\n          margin-right: 8px !important;\n          color: #374151 !important;\n          position: relative !important;\n          transform: none !important;\n          box-sizing: border-box !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-camera-btn svg {\n          width: 19px !important;\n          height: 19px !important;\n          stroke-width: 2.2 !important;\n        }\n        /* \"Найти\" button — override purple gradient to blue, fill full height */\n        .fz-main-bar .fz-search-wrap .fz-smart-search-submit {\n          background: #2563eb !important;\n          color: #fff !important;\n          display: flex !important;\n          align-items: center !important;\n          padding: 0 12px !important;\n          width: 100% !important;\n          min-width: 0 !important;\n          max-width: 76px !important;\n          font-weight: 600 !important;\n          border-radius: 0 !important;\n          border: none !important;\n          font-size: 14px !important;\n          margin: 0 !important;\n          flex-shrink: 0 !important;\n          height: 100% !important;\n          min-height: 42px !important;\n          align-self: stretch !important;\n          justify-content: center !important;\n          line-height: 1 !important;\n          transform: none !important;\n          position: relative !important;\n          inset: auto !important;\n          box-sizing: border-box !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-submit:disabled {\n          opacity: 1 !important;\n          cursor: pointer !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-submit span {\n          background: transparent !important;\n          padding: 0 !important;\n          border-radius: 0 !important;\n          margin: 0 !important;\n          white-space: nowrap !important;\n        }\n        .fz-main-bar .fz-search-wrap .fz-smart-search-submit:hover {\n          background: #1d4ed8 !important;\n          transform: none !important;\n        }\n\n        /* === CitySelector override inside header === */\n        .fz-main-bar button.city-selector {\n          background: transparent !important;\n          border: 1px solid rgba(255,255,255,0.2) !important;\n          color: rgba(255,255,255,0.8) !important;\n          box-shadow: none !important;\n          padding: 6px 12px !important;\n          border-radius: 8px !important;\n          font-size: 13px !important;\n        }\n        .fz-main-bar button.city-selector:hover {\n          border-color: rgba(255,255,255,0.4) !important;\n          background: rgba(255,255,255,0.08) !important;\n          color: #ffffff !important;\n          box-shadow: none !important;\n        }\n        .fz-main-bar .city-selector__city {\n          color: rgba(255,255,255,0.9) !important;\n          font-weight: 500 !important;\n        }\n        .fz-main-bar .city-selector__arrow {\n          color: rgba(255,255,255,0.5) !important;\n        }\n        .fz-main-bar .city-selector__placeholder {\n          color: rgba(255,255,255,0.5) !important;\n        }\n\n        /* Mobile header layout */\n        @media (max-width: 768px) {\n          .fz-main-bar {\n            height: auto !important;\n            min-height: 0 !important;\n            align-items: stretch !important;\n          }\n          .fz-main-bar > div {\n            display: grid !important;\n            grid-template-columns: minmax(0, 1fr) auto auto auto !important;\n            grid-template-areas:\n              \"catalog lang logo city\"\n              \"search search search search\"\n              \"action action action action\" !important;\n            align-items: center !important;\n            align-content: start !important;\n            height: auto !important;\n            padding: 8px max(8px, env(safe-area-inset-left)) 8px max(8px, env(safe-area-inset-right)) !important;\n            gap: 7px !important;\n            width: 100% !important;\n            max-width: 100% !important;\n          }\n          .fz-logo,\n          .fz-catalog-wrap,\n          .fz-lang-wrap,\n          .fz-search-wrap,\n          .fz-main-bar .city-selector,\n          .fz-main-bar .fz-cta-btn,\n          .fz-main-bar .fz-login-btn {\n            min-width: 0 !important;\n          }\n          .fz-main-bar .fz-logo {\n            grid-area: logo;\n            justify-self: center;\n            flex: 0 0 auto !important;\n          }\n          .fz-main-bar .fz-logo svg {\n            height: 32px !important;\n          }\n          .fz-main-bar .fz-logo span {\n            display: none !important;\n          }\n          .fz-catalog-wrap {\n            grid-area: catalog;\n          }\n          .fz-main-bar button.fz-catalog-btn {\n            width: 100% !important;\n            min-height: 38px !important;\n            padding: 8px 9px !important;\n            justify-content: center !important;\n          }\n          .fz-main-bar .city-selector {\n            grid-area: city;\n            justify-self: end;\n            width: 78px !important;\n            max-width: 78px !important;\n            min-height: 38px !important;\n            padding: 6px 8px !important;\n            justify-content: center !important;\n            overflow: hidden !important;\n          }\n          .fz-main-bar .city-selector__city,\n          .fz-main-bar .city-selector__placeholder-full,\n          .fz-main-bar .city-selector__arrow {\n            display: none !important;\n          }\n          .fz-main-bar .city-selector__placeholder {\n            display: inline-flex !important;\n            min-width: 0 !important;\n          }\n          .fz-main-bar .city-selector__placeholder-short {\n            display: inline !important;\n            color: rgba(255,255,255,0.85) !important;\n            font-size: 12px !important;\n            font-weight: 600 !important;\n            line-height: 1 !important;\n            white-space: nowrap !important;\n          }\n          .fz-lang-wrap {\n            grid-area: lang;\n          }\n          .fz-mhdr-actions {\n            grid-area: mobile-actions;\n          }\n          .fz-main-bar button.fz-lang-btn {\n            min-height: 38px !important;\n            padding: 6px 9px !important;\n          }\n          .fz-search-wrap {\n            grid-area: search;\n            flex: 1 0 100% !important;\n            width: 100% !important;\n            max-width: 100% !important;\n          }\n          .fz-main-bar .fz-search-wrap > div[style] {\n            width: 100% !important;\n            max-width: 100% !important;\n          }\n          .fz-main-bar .fz-search-wrap > div > div[style*=\"flex\"] {\n            height: 40px !important;\n            width: 100% !important;\n            min-width: 0 !important;\n          }\n          .fz-main-bar .fz-search-wrap input {\n            font-size: 16px !important;\n            min-width: 0 !important;\n            padding-left: 5px !important;\n            padding-right: 6px !important;\n          }\n          .fz-main-bar .fz-search-wrap .fz-smart-search-icon {\n            min-height: 40px !important;\n            width: 34px !important;\n          }\n          .fz-main-bar .fz-search-wrap .fz-smart-search-camera-btn {\n            min-height: 40px !important;\n            width: 42px !important;\n            padding: 0 6px !important;\n            margin-right: 2px !important;\n          }\n          .fz-main-bar .fz-search-wrap .fz-smart-search-submit {\n            padding: 0 12px !important;\n            min-width: 56px !important;\n          }\n          .fz-main-bar .fz-cta-btn,\n          .fz-main-bar .fz-login-btn {\n            grid-area: action;\n            width: 100% !important;\n            flex: 1 1 100% !important;\n            min-width: 0 !important;\n            justify-content: center !important;\n            min-height: 38px !important;\n            padding: 8px 10px !important;\n          }\n          .fz-icon-strip {\n            overflow-x: auto;\n            scrollbar-width: none;\n          }\n          .fz-icon-strip::-webkit-scrollbar {\n            display: none;\n          }\n          .fz-icon-strip > div {\n            justify-content: flex-start !important;\n            height: 50px !important;\n            padding: 0 8px !important;\n            gap: 2px !important;\n            overflow-x: auto;\n            scrollbar-width: none;\n          }\n          .fz-icon-strip > div::-webkit-scrollbar {\n            display: none;\n          }\n          .fz-icon-item {\n            min-width: 50px !important;\n            padding: 4px 6px !important;\n          }\n          .fz-icon-item span {\n            max-width: 48px;\n            overflow: hidden;\n            text-overflow: ellipsis;\n            font-size: 8px !important;\n          }\n          .fz-catalog-menu {\n            position: fixed !important;\n            left: 8px !important;\n            right: 8px !important;\n            top: 118px !important;\n            width: auto !important;\n            max-height: calc(100vh - 128px) !important;\n            flex-direction: column !important;\n            overflow: hidden !important;\n          }\n          .fz-catalog-left,\n          .fz-catalog-right {\n            width: 100% !important;\n            max-height: 38vh !important;\n            overflow-y: auto !important;\n          }\n          .fz-catalog-left {\n            border-right: 0 !important;\n            border-bottom: 1px solid rgba(255,255,255,0.1) !important;\n          }\n          .fz-catalog-right {\n            padding: 14px 16px !important;\n          }\n          .fz-catalog-right > div {\n            grid-template-columns: 1fr !important;\n            gap: 10px !important;\n          }\n        }\n\n        @media (max-width: 420px) {\n          .fz-main-bar .fz-logo {\n            max-width: 94px !important;\n          }\n          .fz-main-bar .fz-logo span {\n            font-size: 17px !important;\n          }\n          .fz-main-bar button.city-selector {\n            width: 72px !important;\n            max-width: 72px !important;\n            padding: 6px 7px !important;\n          }\n          .fz-mhdr-actions {\n            gap: 4px !important;\n          }\n        }\n\n        @media (max-width: 340px) {\n          .fz-main-bar > div {\n            grid-template-columns: minmax(0, 1fr) auto auto auto !important;\n            gap: 6px !important;\n          }\n          .fz-main-bar button.fz-catalog-btn span {\n            max-width: 58px;\n            overflow: hidden;\n            text-overflow: ellipsis;\n          }\n          .fz-main-bar button.city-selector {\n            width: 52px !important;\n            max-width: 52px !important;\n          }\n          .fz-main-bar .fz-logo {\n            max-width: 70px !important;\n          }\n          .fz-mhdr-btn {\n            width: 30px !important;\n            height: 30px !important;\n            flex-basis: 30px !important;\n          }\n          .fz-main-bar .city-selector__placeholder-short {\n            display: none !important;\n          }\n        }\n\n        /* App-like mobile shell: keep the top light, move navigation to bottom tabs */\n        @media (max-width: 768px) {\n          .fz-main-bar {\n            height: auto !important;\n            min-height: 106px !important;\n            align-items: stretch !important;\n            background: linear-gradient(135deg, #0c1e4a 0%, #1565d8 55%, #2196f3 100%) !important;\n            box-shadow: 0 10px 26px rgba(6, 45, 114, 0.18) !important;\n          }\n\n          .fz-main-bar > .fz-main-bar-inner {\n            grid-template-columns: minmax(96px, 1fr) repeat(5, 44px) !important;\n            grid-template-areas:\n              \"logo city lang mobile-actions mobile-actions mobile-actions\"\n              \"search search search search search mobile-ai\" !important;\n            column-gap: 6px !important;\n            row-gap: 8px !important;\n            padding: 9px max(10px, env(safe-area-inset-left)) 11px max(10px, env(safe-area-inset-right)) !important;\n            height: auto !important;\n            min-height: 106px !important;\n            align-content: center !important;\n          }\n\n          .fz-catalog-wrap,\n          .fz-main-bar .fz-cta-btn,\n          .fz-main-bar .fz-login-btn,\n          .fz-icon-strip {\n            display: none !important;\n          }\n\n          .fz-main-bar .fz-logo {\n            justify-self: start !important;\n            gap: 7px !important;\n            width: 100% !important;\n            min-height: 44px !important;\n            min-width: 96px !important;\n            max-width: 120px !important;\n            overflow: visible !important;\n          }\n\n          .fz-main-bar .fz-logo svg {\n            height: 30px !important;\n            width: auto !important;\n            flex: 0 0 auto !important;\n          }\n\n          .fz-main-bar .fz-logo span {\n            display: inline !important;\n            min-width: 0 !important;\n            overflow: visible !important;\n            text-overflow: clip !important;\n            white-space: nowrap !important;\n            font-size: 16px !important;\n            line-height: 1 !important;\n          }\n\n          .fz-lang-wrap {\n            justify-self: end !important;\n          }\n\n          .fz-main-bar button.city-selector {\n            width: 44px !important;\n            max-width: 44px !important;\n            min-height: 44px !important;\n            min-width: 0 !important;\n            padding: 0 !important;\n            gap: 0 !important;\n          }\n\n          .fz-main-bar button.fz-lang-btn {\n            width: 44px !important;\n            min-width: 44px !important;\n            max-width: 44px !important;\n            min-height: 44px !important;\n            padding: 0 !important;\n            justify-content: center !important;\n          }\n\n          .fz-mhdr-actions {\n            display: grid !important;\n            grid-template-columns: repeat(3, minmax(0, 1fr)) !important;\n            align-items: center !important;\n            justify-content: stretch !important;\n            gap: 6px !important;\n            justify-self: end !important;\n            width: 100% !important;\n            min-width: 0 !important;\n          }\n\n          .fz-mhdr-btn {\n            position: relative !important;\n            width: 100% !important;\n            min-width: 0 !important;\n            height: 44px !important;\n            flex: none !important;\n            display: grid !important;\n            place-items: center !important;\n            border-radius: 12px !important;\n            border: 1px solid rgba(255,255,255,0.26) !important;\n            background:\n              linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.11)) !important;\n            color: #ffffff !important;\n            text-decoration: none !important;\n            box-shadow:\n              inset 0 1px 0 rgba(255,255,255,0.26),\n              0 5px 14px rgba(3, 31, 92, 0.14) !important;\n            backdrop-filter: blur(12px) saturate(1.12) !important;\n            -webkit-backdrop-filter: blur(12px) saturate(1.12) !important;\n            -we
2bkit-tap-highlight-color: transparent !important;\n            transition: transform 0.18s ease, background 0.18s ease !important;\n          }\n\n          .fz-mhdr-btn:active {\n            transform: scale(0.96) !important;\n            background: rgba(255,255,255,0.22) !important;\n          }\n\n          .fz-mhdr-btn svg {\n            width: 16px !important;\n            height: 16px !important;\n            stroke: #ffffff !important;\n            fill: none !important;\n            stroke-width: 2.05 !important;\n          }\n\n          .fz-mhdr-badge {\n            position: absolute !important;\n            top: -5px !important;\n            right: -5px !important;\n            min-width: 17px !important;\n            height: 17px !important;\n            padding: 0 4px !important;\n            display: grid !important;\n            place-items: center !important;\n            border-radius: 999px !important;\n            border: 2px solid #0f2858 !important;\n            background: #ef4444 !important;\n            color: #ffffff !important;\n            font-size: 9px !important;\n            line-height: 1 !important;\n            font-weight: 800 !important;\n            letter-spacing: 0 !important;\n            pointer-events: none !important;\n          }\n\n          .fz-mobile-ai-btn {\n            grid-area: mobile-ai !important;\n            display: inline-flex !important;\n            align-items: center !important;\n            justify-content: center !important;\n            gap: 4px !important;\n            min-width: 0 !important;\n            width: 100% !important;\n            height: 44px !important;\n            padding: 0 !important;\n            border: 1px solid rgba(255,255,255,0.72) !important;\n            border-radius: 14px !important;\n            background:\n              linear-gradient(180deg, rgba(255,255,255,0.98), rgba(239,247,255,0.94)) !important;\n            color: #0f5fb9 !important;\n            box-shadow:\n              0 8px 18px rgba(0,42,120,0.18),\n              inset 0 1px 0 rgba(255,255,255,0.9) !important;\n            font-size: 12px !important;\n            line-height: 1 !important;\n            font-weight: 900 !important;\n            letter-spacing: 0 !important;\n            cursor: pointer !important;\n            -webkit-tap-highlight-color: transparent !important;\n            transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease !important;\n          }\n\n          .fz-mobile-ai-btn:active {\n            transform: scale(0.97) !important;\n            background: #dbeafe !important;\n            color: #0b4d99 !important;\n          }\n\n          .fz-mobile-ai-btn svg {\n            width: 14px !important;\n            height: 14px !important;\n            stroke: currentColor !important;\n            flex: 0 0 auto !important;\n          }\n\n          .fz-mobile-ai-btn__text {\n            display: block !important;\n            min-width: 0 !important;\n            overflow: hidden !important;\n            text-overflow: ellipsis !important;\n            white-space: nowrap !important;\n          }\n\n          .fz-main-bar button.fz-lang-btn {\n            width: 44px !important;\n            min-width: 44px !important;\n            max-width: 44px !important;\n            height: 44px !important;\n            min-height: 44px !important;\n            padding: 0 !important;\n            border-radius: 12px !important;\n            border: 1px solid rgba(255,255,255,0.26) !important;\n            background:\n              linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.11)) !important;\n            color: rgba(255,255,255,0.95) !important;\n            box-shadow:\n              inset 0 1px 0 rgba(255,255,255,0.26),\n              0 5px 14px rgba(3, 31, 92, 0.14) !important;\n            backdrop-filter: blur(12px) saturate(1.12) !important;\n            -webkit-backdrop-filter: blur(12px) saturate(1.12) !important;\n            font-size: 12px !important;\n            font-weight: 800 !important;\n            letter-spacing: 0 !important;\n          }\n\n          .fz-main-bar .city-selector {\n            justify-self: end !important;\n            width: 44px !important;\n            max-width: 44px !important;\n            height: 44px !important;\n            min-height: 44px !important;\n            padding: 0 !important;\n            border-radius: 12px !important;\n            border: 1px solid rgba(255,255,255,0.26) !important;\n            background:\n              linear-gradient(180deg, rgba(255,255,255,0.24), rgba(255,255,255,0.11)) !important;\n            box-shadow:\n              inset 0 1px 0 rgba(255,255,255,0.26),\n              0 5px 14px rgba(3, 31, 92, 0.14) !important;\n            backdrop-filter: blur(12px) saturate(1.12) !important;\n            -webkit-backdrop-filter: blur(12px) saturate(1.12) !important;\n          }\n\n          .fz-main-bar .city-selector__city {\n            display: none !important;\n          }\n\n          .fz-main-bar .city-selector__placeholder,\n          .fz-main-bar .city-selector__placeholder-full,\n          .fz-main-bar .city-selector__placeholder-short {\n            display: none !important;\n          }\n\n          .fz-main-bar .city-selector .fi {\n            width: 15px !important;\n            height: 11px !important;\n            flex: 0 0 auto !important;\n            border-radius: 2px !important;\n            box-shadow: 0 0 0 1px rgba(255,255,255,0.18) !important;\n          }\n\n          .fz-main-bar .city-selector__icon {\n            flex: 0 0 15px !important;\n            width: 15px !important;\n            height: 15px !important;\n          }\n\n          .fz-main-bar .city-selector__city {\n            max-width: 0 !important;\n            overflow: hidden !important;\n            text-overflow: ellipsis !important;\n            white-space: nowrap !important;\n            color: #ffffff !important;\n            font-size: 12px !important;\n            line-height: 1 !important;\n          }\n\n          .fz-main-bar .city-selector__arrow {\n            display: none !important;\n            color: rgba(255,255,255,0.68) !important;\n            font-size: 9px !important;\n          }\n\n          .fz-main-bar .fz-smart-search-box,\n          .fz-main-bar .fz-search-wrap > div > div[style*=\"flex\"] {\n            height: 44px !important;\n            grid-template-columns: 44px minmax(0, 1fr) 44px !important;\n            border-radius: 16px !important;\n            background: rgba(255,255,255,0.96) !important;\n            box-shadow: 0 8px 22px rgba(15, 23, 42, 0.16) !important;\n          }\n\n          .fz-main-bar .fz-smart-search-camera-wrap {\n            justify-self: end !important;\n            width: 44px !important;\n            max-width: 44px !important;\n          }\n\n          .fz-main-bar .fz-search-wrap .fz-smart-search-camera-btn {\n            width: 44px !important;\n            margin-right: 0 !important;\n            padding: 0 11px 0 7px !important;\n          }\n\n          .fz-main-bar .fz-search-wrap .fz-smart-search-submit {\n            display: none !important;\n          }\n        }\n\n        @media (max-width: 390px) {\n          .fz-main-bar > .fz-main-bar-inner {\n            grid-template-columns: minmax(96px, 1fr) repeat(5, 44px) !important;\n            column-gap: 5px !important;\n          }\n\n          .fz-main-bar .fz-logo {\n            min-width: 110px !important;\n            max-width: 120px !important;\n            gap: 6px !important;\n          }\n\n          .fz-main-bar .fz-logo span {\n            font-size: 16px !important;\n          }\n\n          .fz-main-bar .city-selector {\n            width: 44px !important;\n            max-width: 44px !important;\n            height: 44px !important;\n            min-height: 44px !important;\n          }\n\n          .fz-main-bar button.fz-lang-btn {\n            width: 44px !important;\n            min-width: 44px !important;\n            max-width: 44px !important;\n          }\n\n          .fz-mhdr-actions {\n            width: 100% !important;\n            gap: 5px !important;\n          }\n\n          .fz-mhdr-btn {\n            width: 100% !important;\n            height: 44px !important;\n          }\n\n          .fz-main-bar .city-selector__city {\n            display: none !important;\n          }\n\n          .fz-mobile-ai-btn {\n            padding: 0 !important;\n            font-size: 11.5px !important;\n          }\n        }\n\n        @media (max-width: 340px) {\n          .fz-main-bar > .fz-main-bar-inner {\n            grid-template-columns: minmax(82px, 1fr) repeat(5, 40px) !important;\n            column-gap: 4px !important;\n            padding-left: max(8px, env(safe-area-inset-left)) !important;\n            padding-right: max(8px, env(safe-area-inset-right)) !important;\n          }\n\n          .fz-main-bar .fz-logo {\n            min-width: 82px !important;\n            max-width: 96px !important;\n            gap: 5px !important;\n          }\n\n          .fz-main-bar .fz-logo svg {\n            height: 28px !important;\n          }\n\n          .fz-main-bar .fz-logo span {\n            font-size: 12.5px !important;\n          }\n\n          .fz-main-bar button.city-selector {\n            width: 40px !important;\n            max-width: 40px !important;\n            height: 40px !important;\n            min-height: 40px !important;\n          }\n\n          .fz-main-bar button.fz-lang-btn {\n            width: 40px !important;\n            min-width: 40px !important;\n            max-width: 40px !important;\n            height: 40px !important;\n            min-height: 40px !important;\n          }\n\n          .fz-mhdr-actions {\n            width: 100% !important;\n            gap: 4px !important;\n          }\n\n          .fz-mhdr-btn {\n            width: 100% !important;\n            height: 40px !important;\n          }\n\n          .fz-mobile-ai-btn {\n            gap: 0 !important;\n            padding: 0 !important;\n            font-size: 11px !important;\n          }\n\n          .fz-mobile-ai-btn__text {\n            display: none !important;\n          }\n        }\n        /* Yellow pin icon — hide emoji, replace with SVG via CSS */\n        .fz-main-bar .city-selector__icon {\n          font-size: 0 !important;\n          width: 16px; height: 16px;\n          display: inline-block;\n          background: url(\"data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewB
2ox='0 0 24 24' fill='%23fbbf24' stroke='%23fbbf24' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 10c0 7-9 13-9 13s-9-6-9-13a9 9 0 0 1 18 0z'/%3E%3Ccircle cx='12' cy='10' r='3' fill='%230c1e4a'/%3E%3C/svg%3E\") no-repeat center / contain;\n        }\n      "})]})},Br={headerWrap:{position:"sticky",top:0,zIndex:1e3,fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},mainBar:{background:"linear-gradient(135deg, #0c1e4a, #1a3f8b, #2563eb)",height:68,display:"flex",alignItems:"center"},mainBarInner:{maxWidth:1200,margin:"0 auto",padding:"0 32px",display:"flex",alignItems:"center",gap:14,width:"100%",height:"100%",boxSizing:"border-box"},logo:{display:"flex",alignItems:"center",textDecoration:"none",flexShrink:0,gap:8},logoImg:{height:36,width:31,display:"block",background:"transparent",filter:"drop-shadow(0 0 8px rgba(1,179,255,0.28))"},logoText:{fontSize:20,fontWeight:700,color:"#ffffff",letterSpacing:"-0.3px"},logoAccent:{color:"#7dd3fc"},catalogWrapper:{position:"relative",flexShrink:0},catalogBtn:{display:"flex",alignItems:"center",gap:6,padding:"8px 16px",borderRadius:8,border:"none",background:"rgba(255,255,255,0.12)",color:"#ffffff",fontSize:14,fontWeight:500,cursor:"pointer",transition:"background 0.2s",backdropFilter:"blur(4px)"},overlay:{position:"fixed",inset:0,zIndex:998},catalogMenu:{position:"absolute",top:"100%",left:0,marginTop:8,background:"#0c1e4a",borderRadius:12,boxShadow:"0 18px 40px rgba(0,0,0,0.5)",zIndex:999,border:"1px solid rgba(255,255,255,0.1)",display:"flex",maxHeight:"80vh"},catalogLeft:{width:260,padding:"8px 0",borderRight:"1px solid rgba(255,255,255,0.1)",overflowY:"auto",maxHeight:"80vh"},catalogRight:{width:700,padding:"20px 24px",overflowY:"auto",maxHeight:"80vh",background:"#0a1635"},subcategoriesGrid:{display:"grid",gridTemplateColumns:"repeat(3, 1fr)",gap:"16px"},searchWrapper:{flex:1,minWidth:0},langWrap:{position:"relative",flexShrink:0},langBtn:{background:"none",border:"1px solid rgba(255,255,255,0.25)",color:"#ffffff",padding:"5px 10px",borderRadius:6,cursor:"pointer",fontSize:13,fontWeight:600,letterSpacing:"0.5px",transition:"all 0.2s",display:"flex",alignItems:"center",gap:4},langDropdown:{position:"absolute",top:"calc(100% + 4px)",right:0,background:"#0c1e4a",border:"1px solid rgba(255,255,255,0.15)",borderRadius:8,overflow:"hidden",zIndex:1100,minWidth:56,boxShadow:"0 8px 24px rgba(0,0,0,0.4)"},ctaBtn:{display:"flex",alignItems:"center",padding:"8px 18px",borderRadius:8,border:"none",background:"#ffffff",color:"#2563eb",fontSize:14,fontWeight:600,cursor:"pointer",flexShrink:0,whiteSpace:"nowrap",transition:"transform 0.15s, box-shadow 0.15s",boxShadow:"0 2px 8px rgba(0,0,0,0.15)"},loginBtn:{display:"flex",alignItems:"center",padding:"8px 18px",borderRadius:8,background:"#ffffff",color:"#2563eb",fontSize:14,fontWeight:600,textDecoration:"none",flexShrink:0,whiteSpace:"nowrap",boxShadow:"0 2px 8px rgba(0,0,0,0.15)",transition:"transform 0.15s"},iconStrip:{background:"#0c1e4a",borderTop:"1px solid rgba(255,255,255,0.06)"},iconStripInner:{maxWidth:1200,margin:"0 auto",padding:"0 32px",display:"flex",alignItems:"center",justifyContent:"flex-end",gap:2,height:54,boxSizing:"border-box"},iconItem:{display:"flex",flexDirection:"column",alignItems:"center",justifyContent:"center",gap:3,padding:"5px 3px",textDecoration:"none",minWidth:48,flexShrink:0,color:"rgba(226,232,240,0.82)",borderRadius:10},iconBox:{position:"relative",display:"flex",alignItems:"center",justifyContent:"center",width:22,height:22},iconLabel:{fontSize:10.5,lineHeight:"12px",marginTop:0,whiteSpace:"nowrap",textAlign:"center",fontWeight:700,letterSpacing:0,opacity:1},iconBadge:{position:"absolute",top:-7,right:-9,background:"#ef4444",color:"#fff",fontSize:10,fontWeight:700,padding:"1px 4px",borderRadius:10,minWidth:16,textAlign:"center",lineHeight:"16px",border:"2px solid #0c1e4a"},avatar:{width:32,height:32,borderRadius:"50%",background:"linear-gradient(135deg, #3b82f6, #60a5fa)",color:"#ffffff",display:"flex",alignItems:"center",justifyContent:"center",fontSize:12,fontWeight:700,letterSpacing:"0.5px",border:"2px s
2olid rgba(255,255,255,0.32)",boxShadow:"0 3px 10px rgba(37,99,235,0.28)"}},Or={amp:"&",lt:"<",gt:">",quot:'"',apos:"'",nbsp:" "};function Fr(e){return"string"==typeof e?function(e){return"string"==typeof e&&e.includes("&")?e.replace(/&(#(\d+)|#x([0-9a-fA-F]+)|[a-zA-Z]+);/g,(e,t,n,a)=>{if(n){const t=Number(n);if(Number.isFinite(t)&&t>0)try{return String.fromCodePoint(t)}catch{return e}}if(a){const t=Number.parseInt(a,16);if(Number.isFinite(t)&&t>0)try{return String.fromCodePoint(t)}catch{return e}}return Or[String(t||"").toLowerCase()]??e}):e}(e):Array.isArray(e)?e.map(e=>Fr(e)):e&&"object"==typeof e?Object.fromEntries(Object.entries(e).map(([e,t])=>[e,Fr(t)])):e}const Mr={telegram:J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M21 5L2 12.5l7 1.5M21 5l-11.5 9M21 5l-3 16-8.5-7.5M9 19v-5.5"})}),facebook:J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M18 2h-3a5 5 0 00-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 011-1h3z"})}),instagram:J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("rect",{x:"2",y:"2",width:"20",height:"20",rx:"5"}),J.jsx("circle",{cx:"12",cy:"12",r:"5"}),J.jsx("circle",{cx:"17.5",cy:"6.5",r:"1.5"})]}),youtube:J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("rect",{x:"2",y:"4",width:"20",height:"16",rx:"3"}),J.jsx("polygon",{points:"10 15 15.19 12 10 9 10 15"})]}),twitter:J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M4 4l11.733 16h4.267l-11.733-16zM4 20l6.768-6.768M13.232 10.232L20 4"})}),tiktok:J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M9 12a4 4 0 104 4V4a5 5 0 005 5"})}),vk:J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:J.jsx("path",{d:"M2 7h4l2 8 2-8h4M14 7v10M18 7c2 0 4 1 4 5s-2 5-4 5"})}),linkedin:J.jsxs("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[J.jsx("path",{d:"M16 8a6 6 0 016 6v7h-4v-7a2 2 0 00-2-2 2 2 0 00-2 2v7h-4v-7a6 6 0 016-6z"}),J.jsx("rect",{x:"2",y:"9",width:"4",height:"12"}),J.jsx("circle",{cx:"4",cy:"4",r:"2"})]})},Vr="footer_settings_cache",Ur=[{label:{ru:"Условия использования",en:"Terms of Service",ka:"გამოყენების პირობები",zh:"服务条款"},url:"/terms",enabled:!0},{label:{ru:"Конфиденциальность",en:"Privacy Policy",ka:"კონფიდენციალურობა",zh:"隐私政策"},url:"/privacy",enabled:!0},{label:{ru:"Политика возвратов",en:"Refund Policy",ka:"დაბრუნების პოლიტიკა",zh:"退款政策"},url:"/refund-policy",enabled:!0},{label:{ru:"AML / KYC",en:"AML / KYC",ka:"AML / KYC",zh:"AML / KYC"},url:"/aml-policy",enabled:!0},{label:{ru:"Запрещённые категории",en:"Prohibited Activities",ka:"აკრძალული საქმიანობები",zh:"禁止活动"},url:"/prohibited-activities",enabled:!0},{label:{ru:"Модель мерчантов",en:"Merchant Model",ka:"მერჩანტების მოდელი",zh:"商户模式"},url:"/merchant-model",enabled:!0},{label:{ru:"Платёжный flow",en:"Payment Flow",ka:"გადახდის პროცესი",zh:"支付流程"},url:"/payment-flow",enabled:!0},{label:{ru:"Политика верификации",en:"Verification Policy",ka:"ვერიფიკაციის პოლიტიკა",zh:"认证政策"},url:"/verification-policy",enabled:!0}
2,{label:{ru:"Cookies",en:"Cookies",ka:"Cookies",zh:"Cookie 政策"},url:"/cookies",enabled:!0},{label:{ru:"Правила аукционов",en:"Auction Rules",ka:"აუქციონის წესები",zh:"拍卖规则"},url:"/auction-rules",enabled:!0}];const Wr=()=>{const{t:e,i18n:t}=v(),n=(new Date).getFullYear(),[a,r]=s.useState(null),i=t.language?.substring(0,2)||"ru",o=e=>"string"==typeof e&&e.startsWith("/")&&Et(e)?Ct(i,e):e,c=e=>e&&"object"==typeof e?e[i]||e.en||e.ru||"":e||"",d=a?.nav_columns?.some(e=>e?.title&&e.title[i]),p=a?.nav_columns?.some(e=>(e?.links||[]).some(e=>"/help"===e?.url&&!1!==e?.enabled));s.useEffect(()=>{const e=function(){try{const e=localStorage.getItem(Vr);if(!e)return null;const{data:t,timestamp:n}=JSON.parse(e);return Date.now()-n>3e5?(localStorage.removeItem(Vr),null):t}catch{return null}}();if(e)return void r(Fr(e));(async()=>{try{const e=await fetch("/api/footer-settings"),t=await e.json();if(t.success&&t.settings){const e=Fr(t.settings);r(e),function(e){try{localStorage.setItem(Vr,JSON.stringify({data:e,timestamp:Date.now()}))}catch{}}(e)}}catch(e){}})()},[]);const m=a?.bottom_links?.some(e=>e?.label&&e.label[i]),f=a?.copyright_text&&a.copyright_text[i]?c(a.copyright_text):e("footer.copyright",{defaultValue:"Freezoni Group LLC"}),h=a?.company_description&&a.company_description[i]?c(a.company_description):e("footer.description");return J.jsxs("footer",{className:"fz-footer",children:[J.jsxs("div",{className:"fz-footer-inner",children:[J.jsxs("div",{className:"fz-footer-col fz-footer-brand",children:[J.jsxs(u,{to:o("/"),className:"fz-footer-logo",children:[J.jsx("img",{loading:"lazy",src:"/freezoni-logo.svg?v=transparent",alt:"Freezoni",className:"fz-footer-logo-img"}),J.jsxs("span",{className:"fz-footer-logo-text",children:["Free",J.jsx("span",{className:"fz-footer-logo-accent",children:"zoni"})]})]}),J.jsx("p",{className:"fz-footer-desc",children:h}),J.jsx("div",{className:"fz-footer-socials",children:(()=>{if(a?.social_links){const e=a.social_links.filter(e=>e&&e.enabled);if(e.length>0)return e.map((e,t)=>J.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"fz-footer-social","aria-label":e.icon,children:Mr[e.icon]||Mr.telegram},t))}return J.jsxs(J.Fragment,{children:[J.jsx("a",{href:"https://t.me/freezoni",target:"_blank",rel:"noopener noreferrer",className:"fz-footer-social","aria-label":"Telegram",children:Mr.telegram}),J.jsx("a",{href:"https://facebook.com/freezoni",target:"_blank",rel:"noopener noreferrer",className:"fz-footer-social","aria-label":"Facebook",children:Mr.facebook}),J.jsx("a",{href:"https://instagram.com/freezoni",target:"_blank",rel:"noopener noreferrer",className:"fz-footer-social","aria-label":"Instagram",children:Mr.instagram}),J.jsx("a",{href:"https://youtube.com/@freezoni",target:"_blank",rel:"noopener noreferrer",className:"fz-footer-social","aria-label":"YouTube",children:Mr.youtube})]})})()})]}),a?.nav_columns&&a.nav_columns.length>0&&d?a.nav_columns.map((t,n)=>J.jsxs("div",{className:"fz-footer-col",children:[J.jsx("h4",{className:"fz-footer-title",children:c(t.title)}),(t.links||[]).filter(e=>e&&e.enabled).map((e,t)=>{const n=c(e.label);return e.url&&!e.isExternal?J.jsx(u,{to:o(e.url),className:"fz-footer-link",children:n},t):e.url&&e.isExternal?J.jsx("a",{href:e.url,target:"_blank",rel:"noopener noreferrer",className:"fz-footer-link",children:n},t):J.jsx("button",{type:"button",className:"fz-footer-link",children:n},t)}),n===a.nav_columns.length-1&&!p&&J.jsx(u,{to:o("/help"),className:"fz-footer-link",children:e("help.title","Центр помощи")})]},n)):J.jsxs(J.Fragment,{children:[J.jsxs("div",{className:"fz-footer-col",children:[J.jsx("h4",{className:"fz-footer-title",children:e("footer.buyers")}),J.jsx(u,{to:o("/how-to-order"),className:"fz-footer-link",children:e("footer.howToOrder")}),J.jsx(u,{to:o("/safe-deal"),className:"fz-footer-link",children:e("footer.safeDeal")}),J.jsx(u,{to:o("/shipping"),className:"fz-footer-link",children:e("footer.deliveryAndReturn")}),J.jsx(u,{to:o("/help"),className:"fz-footer-link",children:e("help.title","Центр помощи")})]}),J.jsxs("div",{className:"fz-footer-col",children:[J.jsx("h4",{className:"fz-footer-title",children:e("footer.sellers")}),J.jsx(u,{to:o("/profile"),className:"fz-footer-link",children:e("footer.sellerAccount")}
2),J.jsx(u,{to:o("/pricing"),className:"fz-footer-link",children:e("footer.pricingPlans")}),J.jsx(u,{to:o("/advertising"),className:"fz-footer-link",children:e("footer.advertising")}),J.jsx("button",{type:"button",className:"fz-footer-link",children:e("footer.openPickupPoint")})]}),J.jsxs("div",{className:"fz-footer-col",children:[J.jsx("h4",{className:"fz-footer-title",children:e("footer.company")}),J.jsx(u,{to:o("/about"),className:"fz-footer-link",children:e("footer.about")}),J.jsx(u,{to:o("/faq"),className:"fz-footer-link",children:e("footer.faq")}),J.jsx(u,{to:o("/legal"),className:"fz-footer-link",children:e("footer.legalInfo")}),J.jsx(u,{to:o("/contacts"),className:"fz-footer-link",children:e("footer.contact")})]})]})]}),J.jsx("div",{className:"fz-footer-bottom",children:J.jsxs("div",{className:"fz-footer-bottom-inner",children:[J.jsxs("span",{className:"fz-footer-copy",children:["© ",n," ",f]}),J.jsx("div",{className:"fz-footer-legal",children:(()=>{if(a?.bottom_links&&a.bottom_links.length>0&&m){return((e=[])=>{const t=(Array.isArray(e)?e.filter(Boolean):[]).map(e=>{const t=Ur.find(t=>t.url===e.url);return t?{...t,...e,label:{...t.label,...e.label||{}},enabled:!1!==e.enabled}:e});return Ur.forEach(e=>{t.some(t=>t.url===e.url)||t.push(e)}),t})(a.bottom_links).filter(e=>e&&e.enabled).map((e,t)=>{const n=c(e.label),a=e.url&&e.url.startsWith("/");return J.jsxs(l.Fragment,{children:[t>0&&J.jsx("span",{className:"fz-footer-dot",children:"·"}),a?J.jsx(u,{to:o(e.url),className:"fz-footer-legal-link",children:n}):e.url?J.jsx("a",{href:e.url,className:"fz-footer-legal-link",target:"_blank",rel:"noopener noreferrer",children:n}):J.jsx("button",{type:"button",className:"fz-footer-legal-link",children:n})]},t)})}
2return J.jsxs(J.Fragment,{children:[J.jsx(u,{to:o("/terms"),className:"fz-footer-legal-link",children:e("footer.terms")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/privacy"),className:"fz-footer-legal-link",children:e("footer.privacy")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/refund-policy"),className:"fz-footer-legal-link",children:e("footer.refundPolicy","Refund Policy")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/aml-policy"),className:"fz-footer-legal-link",children:"AML / KYC"}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/prohibited-activities"),className:"fz-footer-legal-link",children:e("footer.prohibitedActivities","Prohibited Activities")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/merchant-model"),className:"fz-footer-legal-link",children:e("footer.merchantModel","Merchant Model")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/payment-flow"),className:"fz-footer-legal-link",children:e("footer.paymentFlow","Payment Flow")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/verification-policy"),className:"fz-footer-legal-link",children:e("footer.verificationPolicy","Verification Policy")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/cookies"),className:"fz-footer-legal-link",children:e("footer.cookies")}),J.jsx("span",{className:"fz-footer-dot",children:"·"}),J.jsx(u,{to:o("/auction-rules"),className:"fz-footer-legal-link",children:e("footer.auctionRules")})]})})()})]})})]})},Hr="freezoni:ai-action",Kr=[{value:"ru",label:"RU"},{value:"en",label:"EN"},{value:"de",label:"DE"},{value:"ka",label:"KA"},{value:"es",label:"ES"},{value:"ar",label:"AR"},{value:"zh",label:"ZH"},{value:"tr",label:"TR"},{value:"fr",label:"FR"}],qr=e=>{const t=(e||"ru").split("-")[0].toLowerCase();return Kr.some(e=>e.value===t)?t:"ru"},Gr={"/contacts":{icon:"💬",labels:{ru:"Связаться с поддержкой",en:"Contact support",ka:"მხარდაჭერასთან დაკავშირება",de:"Support kontaktieren",es:"Contactar soporte",fr:"Contacter le support",tr:"Destekle iletişim",zh:"联系支持",ar:"تواصل مع الدعم"}},"/help":{icon:"❓",labels:{ru:"Открыть помощь",en:"Open help",ka:"დახმარების გახსნა",de:"Hilfe öffnen",es:"Abrir ayuda",fr:"Ouvrir l’aide",tr:"Yardımı aç",zh:"打开帮助",ar:"افتح المساعدة"}},"/safe-deal":{icon:"🛡️",labels:{ru:"Безопасная сделка",en:"Safe deal",ka:"უსაფრთხო გარიგება",de:"Sichere Abwicklung",es:"Trato seguro",fr:"Transaction sécurisée",tr:"Güvenli işlem",zh:"安全交易",ar:"صفقة آمنة"}},"/shipping":{icon:"🚚",labels:{ru:"Доставка",en:"Shipping"}},"/pvz":{icon:"📍",labels:{ru:"Пункты выдачи",en:"Pickup points"}},"/how-to-order":{icon:"🧾",labels:{ru:"Как сделать заказ",en:"How to order"}},"/pricing":{icon:"⚡",labels:{ru:"Тарифы",en:"Pricing"}},"/auctions":{icon:"🔨",labels:{ru:"Аукционы",en:"Auctions"}},"/map":{icon:"🗺️",labels:{ru:"Карта",en:"Map"}},"/forum":{icon:"💬",labels:{ru:"Форум",en:"Forum"}},"/profile?tab=notifications":{icon:"🔔",labels:{ru:"Написать в поддержку",en:"Message support",ka:"მხარდაჭერასთან მიწერა",de:"Support anschreiben",es:"Escribir a soporte",fr:"Écrire au support",tr:"Desteğe yaz",zh:"联系支持",ar:"راسل الدعم"}},"/profile":{icon:"👤",labels:{ru:"Профиль",en:"Profile"}}
2,"/messages":{icon:"✉️",labels:{ru:"Сообщения",en:"Messages"}},"/favorites":{icon:"♡",labels:{ru:"Избранное",en:"Favorites"}},"/compare":{icon:"↔️",labels:{ru:"Сравнение",en:"Compare"}},"/cart":{icon:"🛒",labels:{ru:"Корзина",en:"Cart"}},"/my/ads":{icon:"📦",labels:{ru:"Мои объявления",en:"My ads"}},"/settings/account":{icon:"⚙️",labels:{ru:"Настройки аккаунта",en:"Account settings"}},"/login":{icon:"🔐",labels:{ru:"Войти",en:"Log in"}},"/register":{icon:"✨",labels:{ru:"Регистрация",en:"Register"}}},Jr=/(\/(?:ads\/create|ads?\/\d+|seller\/\d+|contacts|help|safe-deal|shipping|pvz|how-to-order|pricing|auctions|map|forum|profile|messages|favorites|compare|cart|my\/ads|settings\/account|login|register)(?:[/?#][^\s)\]]*)?)/g,Yr="freezoni_support_voice_profile",Zr=["female","male"],Qr=/^(?:стоп|stop|stopp|alto|para|arrete|arrête|dur|iptal|отмена|cancel|pause|enough|остановись|хватит|прекрати|замолчи|молчи|停止|停|توقف|قف|გაჩერდი|შეჩერდი)[\s.!?؟。!]*$/iu,Xr=/(?:^|\s)(?:стоп|stop|stopp|alto|para|arrete|arrête|dur|iptal|остановись|хватит|прекрати|замолчи|توقف|قف|გაჩერდი|შეჩერდი)(?:\s|[.!?؟。!]|$)/iu,ei={ru:"ru-RU",en:"en-US",de:"de-DE",ka:"ka-GE",es:"es-ES",ar:"ar-SA",zh:"zh-CN",tr:"tr-TR",fr:"fr-FR"},ti=/(?:^|\s)(?:открой|открыть|перейди|перейти|покажи|зайди|зайти|веди|перемести|переместись|go\s+to|open|navigate|show)(?:\s|$)/iu,ni="впиши|заполни|заполним|заполнить|укажи|поставь|поменяй|измени|замени|выбери|отметь|включи|отключи|сними|убери|проставь|напиши|написать|установи|введи|внеси|внести|fill|set|enter|select|choose",ai=new RegExp(`(?:^|\\s)(?:${ni})(?:\\s|$)`,"iu"),ri=new RegExp(`(?:^|\\s)(?:продиктую|диктую|запиши|записать|${ni})(?:\\s|$)`,"iu"),ii=/(можешь|умеешь|может|способен|можно|как|почему).*(заполн|впис|введ|пол[ея]|форм|голос)|(не\s+может|не\s+получается).*(заполн|впис|введ|пол[ея]|форм|голос)/iu,oi=/(?:^|\s)(?:найди|найти|поищи|искать|подбери|подобрать|покажи\s+(?:мне\s+)?(?:товары|услуги|объявления|варианты|предложения)?|search|find|look\s+for)(?:\s|$)/iu,si=[{href:"/",label:"главную страницу",matches:["главная","главную","домой","home","main"]},{href:"/catalog",label:"каталог",matches:["каталог","категории","catalog","categories"]},{href:"/auctions",label:"аукционы",matches:["аукцион","аукционы","торги","auction","auctions"]},{href:"/ads/create",label:"создание объявления",matches:["создание объявления","создать объявление","разместить объявление","добавить объявление","подать объявление","create ad","post ad","new ad"]},{href:"/cart",label:"корзину",matches:["корзина","корзину","cart"]},{href:"/profile",label:"профиль",matches:["профиль","личный кабинет","кабинет","profile","account"]},{href:"/chats",label:"чаты",matches:["чаты","чат","сообщения","messages","chat","chats"]},{href:"/favorites",label:"избранное",matches:["избранное","favorite","favorites","wishlist"]},{href:"/compare",label:"сравнение",matches:["сравнение","сравнить","compare"]},{href:"/map",label:"карту",matches:["карта","карту","map"]},{href:"/forum",label:"форум",matches:["форум","forum"]},{href:"/pricing",label:"тарифы",matches:["тарифы","цены","pricing","plans"]},{href:"/safe-deal",label:"безопасную сделку",matches:["безопасная сделка","сейф сделка","safe deal"]},{href:"/shipping",label:"доставку",matches:["доставка","доставку","shipping"]},{href:"/pvz",label:"пункты выдачи",matches:["пвз","пункт выдачи","пункты выдачи","pickup"]},{href:"/how-to-order",label:"как сделать заказ",matches:["как заказать","как сделать заказ","оформить заказ","how to order"]},{href:"/help",label:"помощь",matches:["помощь","help","faq"]},{href:"/contacts",label:"контакты",matches:["контакты","поддержка","contacts","supp
2ort"]},{href:"/my/ads",label:"мои объявления",matches:["мои объявления","мои товары","my ads","my listings"]},{href:"/settings/account",label:"настройки аккаунта",matches:["настройки аккаунта","настройки","account settings","settings"]}],li={title:{label:"название",aliases:["название","заголовок","название объявления","title","name","subject"]},description:{label:"описание",aliases:["описание","текст","подробности","description","details"]},price:{label:"цена",aliases:["цена","цене","цену","сумма","сумму","стоимость","стоимость товара","price","cost"]},currency:{label:"валюта",aliases:["валюта","валюту","currency"]},email:{label:"почта",aliases:["почта","email","e-mail","электронная почта","mail"]},phone:{label:"телефон",aliases:["телефон","номер телефона","номер","phone","mobile"]},address:{label:"адрес",aliases:["адрес","улица","местоположение","локация","address","location"]},city:{label:"город",aliases:["город","city"]},country:{label:"страна",aliases:["страна","country"]},brand:{label:"бренд",aliases:["бренд","марка","производитель","brand","make"]},model:{label:"модель",aliases:["модель","model"]},firstName:{label:"имя",aliases:["имя","first name","firstname"]},lastName:{label:"фамилия",aliases:["фамилия","last name","lastname"]},article:{label:"артикул",aliases:["артикул","sku","article"]},year:{label:"год",aliases:["год","год выпуска","year"]},mileage:{label:"пробег",aliases:["пробег","mileage"]},bodyType:{label:"тип кузова",aliases:["тип кузова","кузов","body type"]},carColor:{label:"цвет кузова",aliases:["цвет кузова","цвет","color"]},carCondition:{label:"состояние",aliases:["состояние","состояние автомобиля","car condition"]},transmission:{label:"коробка передач",aliases:["коробка передач","коробка","трансмиссия","transmission"]},driveType:{label:"привод",aliases:["привод","drive"]},steeringWheel:{label:"руль",aliases:["руль","сторона руля","steering wheel"]},ownersCount:{label:"количество владельцев",aliases:["количество владельцев","владельцев","число владельцев","owners"]},ptsType:{label:"ПТС",aliases:["птс","паспорт транспортного средства","pts"]},vinCheck:{label:"проверка VIN",aliases:["проверка vin-номера","проверка vin номера","проверка vin","vin-номер","vin номер","vin","проверка вин-номера","проверка вин номера","вин-номер","вин номер","вин"]},customsCleared:{label:"растаможен",aliases:["растаможен","растаможка","таможня","customs"]},originCountry:{label:"страна ввоза",aliases:["страна ввоза","страна импорта","откуда ввезен","origin country"]},warranty:{label:"гарантия",aliases:["гарантия","warranty"]},serviceBook:{label:"сервисная книжка",aliases:["сервисная книжка","сервисная книга","service book"]},accidents:{label:"ДТП",aliases:["дтп","аварии","авария","accidents"]},tireCondition:{label:"состояние шин",aliases:["состояние шин","шины","резина","tires"]},paintCondition:{label:"состояние ЛКП",aliases:["состояние лкп","лкп","краска","paint"]},damageDescription:{label:"описание повреждений",aliases:["описание повреждений","повреждения","дефекты кузова","damage description"]},headlights:{label:"фары",aliases:["фары","headlights"]},climate:{label:"климат",aliases:["климат","климат контроль","кондиционер","climate"]},seatsMaterial:{label:"материал салона",aliases:["материал салона","салон материал","seats material"]}
2,interiorColor:{label:"цвет салона",aliases:["цвет салона","interior color"]},seatsCount:{label:"количество мест",aliases:["количество мест","мест","seats count"]},suspension:{label:"подвеска",aliases:["подвеска","suspension"]},cruiseControl:{label:"круиз-контроль",aliases:["круиз-контроль","круиз контроль","cruise control"]},parkingSensors:{label:"парктроник",aliases:["парктроник","парковочные датчики","parking sensors"]},camera:{label:"камера",aliases:["камера","camera"]},mirrors:{label:"зеркала",aliases:["зеркала","mirrors"]},heatedSeats:{label:"подогрев сидений",aliases:["подогрев сидений","heated seats"]},ventilatedSeats:{label:"вентиляция сидений",aliases:["вентиляция сидений","ventilated seats"]},seatMemory:{label:"память сидений",aliases:["память сидений","seat memory"]},powerWindows:{label:"электростеклоподъёмники",aliases:["электростеклоподъемники","электростеклоподъёмники","стеклоподъемники","стеклоподъёмники","power windows"]},trunkVolume:{label:"объём багажника",aliases:["объем багажника","объём багажника","багажник","trunk volume"]},clearance:{label:"клиренс",aliases:["клиренс","clearance"]},curbWeight:{label:"масса",aliases:["масса","вес","curb weight"]},wheelSize:{label:"размер дисков",aliases:["размер дисков","диски","радиус дисков","wheel size"]},wheelType:{label:"тип дисков",aliases:["тип дисков","wheel type"]},sunroof:{label:"люк / панорамная крыша",aliases:["люк","панорамная крыша","крыша","sunroof"]},startSystem:{label:"запуск двигателя",aliases:["запуск двигателя","старт двигателя","start system"]},airbags:{label:"подушки безопасности",aliases:["подушки безопасности","подушки","airbags"]},multimedia:{label:"мультимедиа система",aliases:["мультимедиа система","мультимедиа","магнитола","multimedia"]},displaySize:{label:"размер экрана",aliases:["размер экрана","экран","display size"]},speakersCount:{label:"количество динамиков",aliases:["количество динамиков","динамики","speakers"]},usbPorts:{label:"USB-порты",aliases:["usb-порты","usb порты","usb","юсб"]}},ci=/(размест|размещ|созда.*объяв|добав.*объяв|продать|продаю|продам|вылож|выстав|post.*ad|create.*ad|sell|list.*item)/i,di=/\/ads\/create(?:[/?#][^\s)\]]*)?/,ui=/(автомоб|машин|легков|внедорожник|кроссовер|\bauto\b|\bcar\b|\bcars\b|\bvehicle\b|jeep|чероки|cherokee|bmw|mercedes|audi|toyota|honda|kia|hyundai|volkswagen|nissan|ford|chevrolet|tesla|пробег|диск[иоа]?|кузов|двигател)/i,pi=e=>String(e||"").toLowerCase().replace(/ё/g,"е").replace(/[^\p{L}\p{N}@+.#/:\s-]/gu," ").replace(/\s+/g," ").trim(),mi=e=>{const t=pi(e);if(!oi.test(t))return null;const n=(e=>String(e||"").replace(/^(?:пожалуйста\s+)?(?:найди|найти|поищи|искать|подбери|подобрать|search|find|look\s+for)\s+/iu,"").replace(/^(?:пожалуйста\s+)?покажи\s+(?:мне\s+)?/iu,"").replace(/^(?:товары|услуги|объявления|варианты|предложения)\s+(?:по|про|с|для)?\s*/iu,"").replace(/\b(?:на\s+freezoni|на\s+сайте|в\s+каталоге|пожалуйста|please)\b/giu," ").replace(/[?!.\s]+$/g,"").replace(/\s+/g," ").trim())(e);return n.length<2||/^(?:на\s+)?карт[аеуы]?$/iu.test(n)?null:{href:`/ads?search=${encodeURIComponent(n)}`,label:n}},fi=e=>{const t=pi(e);if(!t)return null;for(const[n,a]of Object.entries(li))if(a.aliases.some(e=>t===pi(e)))return n;for(const[n,a]of Object.entries(li))if(a.aliases.some(e=>t.includes(pi(e))))return n;return null},hi=Object.values(li).flatMap(e=>e.aliases).sort((e,t)=>
2t.length-e.length).map(e=>e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")).join("|"),gi={"ноль":0,"один":1,"одна":1,"одно":1,"два":2,"две":2,"три":3,"четыре":4,"пять":5,"шесть":6,"семь":7,"восемь":8,"девять":9,"десять":10,"одиннадцать":11,"двенадцать":12,"тринадцать":13,"четырнадцать":14,"пятнадцать":15,"шестнадцать":16,"семнадцать":17,"восемнадцать":18,"восемнадцатый":18,"восемнадцатого":18,"девятнадцать":19,"девятнадцатый":19,"девятнадцатого":19,"двадцать":20,"двадцатый":20,"двадцатого":20,"тридцать":30,"тридцатый":30,"тридцатого":30,"сорок":40,"сороковой":40,"сорокового":40,"пятьдесят":50,"шестьдесят":60,"семьдесят":70,"восемьдесят":80,"девяносто":90,"сто":100,"двести":200,"триста":300,"четыреста":400,"пятьсот":500,"шестьсот":600,"семьсот":700,"восемьсот":800,"девятьсот":900};Object.assign(gi,{"первый":1,"первого":1,"второй":2,"второго":2,"третий":3,"третьего":3,"четвертый":4,"четвертого":4,"четвертая":4,"пятый":5,"пятого":5,"шестой":6,"шестого":6,"седьмой":7,"седьмого":7,"восьмой":8,"восьмого":8,"девятый":9,"девятого":9,"десятый":10,"десятого":10,"одиннадцатый":11,"одиннадцатого":11,"двенадцатый":12,"двенадцатого":12,"тринадцатый":13,"тринадцатого":13,"четырнадцатый":14,"четырнадцатого":14,"пятнадцатый":15,"пятнадцатого":15,"шестнадцатый":16,"шестнадцатого":16,"семнадцатый":17,"семнадцатого":17});const bi={"тысяча":1e3,"тысячи":1e3,"тысяч":1e3,"миллион":1e6,"миллиона":1e6,"миллионов":1e6},xi=e=>{const t=String(e||"").toLowerCase();return/\$|usd|доллар/.test(t)?"$":/₾|gel|lari|лари/.test(t)?"₾":/€|eur|евро/.test(t)?"€":/₽|rub|rur|рубл|руб\b/.test(t)?"₽":""},yi=e=>{const t=String(e||"").trim(),n=t.match(/\d[\d\s.,]*/);return n?n[0].replace(/\s+/g,"").replace(",",".").replace(/(\.\d*?)0+$/,"$1").replace(/\.$/,""):(e=>{const t=pi(e).replace(/\b(?:доллар(?:ов|а)?|usd|лари|gel|евро|eur|рубл(?:ей|я|ь)?|rub|rur)\b/giu," ").split(/\s+/).filter(Boolean);let n=0,a=0,r=!1;for(const o of t)Object.prototype.hasOwnProperty.call(gi,o)?(a+=gi[o],r=!0):Object.prototype.hasOwnProperty.call(bi,o)&&(n+=(a||1)*bi[o],a=0,r=!0);const i=n+a;return r&&i>0?String(i):""})(t)},_i=new Set(["price","year","mileage","trunkVolume","clearance","curbWeight"]),wi=(e,t)=>{if("currency"===e)return(e=>xi(e)||String(e||"").trim())(t);if(!_i.has(e))return t;return yi(t)||t},vi=e=>String(e||"").replace(/^[\s:=-]+/,"").replace(/\b(?:пожалуйста|please)\b/giu,"").replace(/\b(?:внеси|внести|добавь|добавить|запиши|записать)\s+(?:эту\s+)?(?:информацию|это|значение)\s+(?:на\s+)?(?:сайт|страницу)\b.*$/iu,"").replace(/[?!.\s]+$/g,"").trim(),ji=(e,t)=>{const n=(e=>String(e||"").replace(/^[\s:=-]+/,"").replace(/^(?:и\s+)?(?:поле|параметр|характеристик[ауи]?|значение)\s+/iu,"").replace(/^(?:что\s+)?(?:у\s+него\s+|у\s+нее\s+|он\s+|она\s+|оно\s+|автомобиль\s+|машина\s+)?/iu,"").replace(/[?!.\s]+$/g,"").trim())(e);let a=vi(t);if(!n||!a)return null;const r=fi(n)||"__generic__",i=pi(a);return/^(?:сайт|страница|страницу|на сайт|на страницу)$/iu.test(i)?null:("customsCleared"===r&&(/\bне\s+растаможен\b|не\s+требуется/u.test(i)?a=i.includes("требуется")?"Не требуется":"Нет":/\bрастаможен\b|\bда\b|\byes\b/u.test(i)&&(a="Да")),a=wi(r,a),{fieldKey:r,rawField:n,value:a})},ki=e=>{const t=String(e||"").trim(),n=pi(t),a=ai.test(n),r=/[:=]|\s[-–—]\s/u.test(t),i=new RegExp(`(?:^|[,;\\n])\\s*(?:${hi})(?=$|\\s|[,;
2:.!?-])`,"iu").test(t);if(!a&&!r&&!i)return[];const o=[],s=[new RegExp(`(?:${ni})\\s+(?:в\\s+поле\\s+|поле\\s+)?(.+?)\\s+(?:на|как|значение|равно)\\s+(.+)$`,"iu"),/(?:в\s+поле\s+|поле\s+)?(.+?)\s*(?:[:=])\s*(.+)$/iu];for(const p of s){const e=t.match(p);if(!e)continue;const n=ji(e[1],e[2]);n&&o.push(n)}let l=(e=>String(e||"").replace(new RegExp(`^(?:пожалуйста\\s+)?(?:давай\\s+)?(?:${ni})\\s+`,"iu"),"").replace(/^(?:поля|поле|параметры|характеристики|значение)\s*,?\s*/iu,"").replace(/^(?:что\s+)/iu,"").trim())(t);const c=l.match(/(?:^|[\s,;])(?:он\s+|автомобиль\s+|машина\s+)?(не\s+)?растаможен(?:\s|[,;.!?]|$)/iu);c&&(o.push({fieldKey:"customsCleared",rawField:"растаможен",value:c[1]?"Нет":"Да"}),l=l.replace(/^(?:что\s+)?(?:он\s+|автомобиль\s+|машина\s+)?(?:не\s+)?растаможен\s*(?:[-–—,;]\s*)?/iu,""));const d=t.match(/^(?:пожалуйста\s+)?(?:отметь|включи|выбери|сними|отключи|убери)\s+(.+)$/iu);if(d&&!/[,:=]|\s[-–—]\s/u.test(d[1])){const e=/(?:сними|отключи|убери)/iu.test(t),n=ji(d[1],e?"Нет":"Да");n&&o.push(n)}const u=l.split(/[,;\n]+/u).map(e=>e.trim()).filter(Boolean);for(const p of u){const e=p.match(/^(?:и\s+)?(.+?)\s*(?:[:=]|\s[-–—]\s)\s*(.+)$/u),t=e?null:p.match(new RegExp(`^(?:и\\s+)?(${hi})(?=$|\\s|[,;:.!?-])\\s+(.+)$`,"iu")),n=e?ji(e[1],e[2]):t?ji(t[1],t[2]):null;n&&o.push(n)}return(e=>{const t=new Set;return e.filter(e=>{const n=`${e.fieldKey}|${pi(e.rawField)}|${pi(e.value)}`;return!t.has(n)&&(t.add(n),!0)})})(o)},zi=e=>{const t=String(e||"").trim(),n=(e=>{const t=String(e||"").trim();if(!t)return[];const n="(?:цен[аеуы]|сумм[аеуы]|стоимость|price|cost)",a=`(?:${ni})`,r=[new RegExp(`(?:в\\s+)?${n}\\s*(?:[:=-]|${a}|будет|должна\\s+быть|должен\\s+быть|равна|равно)?\\s*(.+)$`,"iu"),new RegExp(`${a}\\s+(?:в\\s+)?${n}\\s+(.+)$`,"iu"),new RegExp(`${n}\\s+(?:будет|должна\\s+быть|должен\\s+быть|равна|равно)\\s+(.+)$`,"iu")];let i="";for(const c of r){const e=t.match(c);if(e?.[1]){i=vi(e[1]);break}}const o=yi(i);if(!o)return[];const s=xi(i)||xi(t),l=[{fieldKey:"price",rawField:"цена",value:o}];return s&&l.push({fieldKey:"currency",rawField:"валюта",value:s}),l})(t);if(n.length>0)return n;const a=ki(t);if(a.length>0)return a;const r=(e=>{const t=String(e||"").trim();if(!t)return[];const n=t.match(/(?:год\s+выпуска|года\s+выпуска|выпуска)\D{0,24}(\d{4})|(\d{4})\s*(?:-?\s*(?:й|ый|ого))?\s*(?:год[ау]?|г\.)?\s*(?:выпуска)?/iu),a=n?.[1]||n?.[2];return!a||Number(a)<1900||Number(a)>2100?[]:[{fieldKey:"year",rawField:"год выпуска",value:a}]})(t);if(r.length>0)return r;if(!ai.test(pi(t))&&!/[:=]|\s[-–—]\s/u.test(t))return[];const i=[],o=new RegExp(`(${hi})\\s*[:=-]\\s*([^,;\\n]+)`,"giu");let s;for(;null!==(s=o.exec(t));){const e=fi(s[1]),t=String(s[2]||"").trim();e&&t&&i.push({fieldKey:e,rawField:s[1],value:t})}if(i.length>0)return i;const l=hi,c=[new RegExp(`(?:${ni})\\s+(?:в\\s+поле\\s+|в\\s+)?(${l})\\s*(?:значение|текст|как|:|-)?\\s*(.+)$`,"iu"),new RegExp(`(?:в\\s+поле\\s+|в\\s+)(${l})\\s+(?:${ni})\\s+(.+)$`,"iu"),new RegExp(`(?:${ni})\\s+["«]?(.+?)["»]?\\s+(?:в|для)\\s+(?:поле\\s+)?(${l})\\s*$`,"iu")];for(const u of c){const e=t.match(u);if(!e)continue;const n=u===c[2]?e[2]:e[1],a=String(u===c[2]?e[1]:e[2]).trim(),r=fi(n);if(r&&a)return[{fieldKey:r,rawField:n,value:a}]}const d=t.match(new RegExp(`(?:${ni})\\s+(.+)$`,"iu"));return d?[{fieldKey:"__active__",rawField:"текущее поле",value:d[1].trim()}]:[]},Si=(e,t={})=>{const n=(e=>{const t=pi(e);return ti.test(t)&&si.find(e=>e.matches.some(e=>t.includes(pi(e))))||null})(e),a=n?null:mi(e),r=zi(e);if(0===r.length&&"voice"===t.source&&t.targetElement&&!n){const n=(e=>{const t=String(e||"").trim();if(!t)return"";const n=pi(t);return ri.test(n)||/^(?:текст|значение|сюда|в это поле|в текущее поле)\s*[:=-]/iu.test(t)?t.replace(new RegExp(`^(?:пожалуйста\\s+)?(?:продиктую|диктую|запиши|записать|${ni})\\s*`,"iu"),"").replace(/^(?:сюда|в\s+это\s+поле|в\s+текущее\s+поле|в\s+активное\s+поле|текст|значение|следующий\s+текст)\s*[:=-]?\s*/iu,"").trim():t})(e);n&&r.push({fieldKey:"__target__",rawField:"текущее поле",value:n,targetElement:t.targetElement})}return n||a||0!==r.length?{navigationTarget:n,searchTarget:a,fills:r}:null},Ei=e=>
2{if(!e||e.closest?.(".support-widget"))return!1;if(e.disabled||e.readOnly)return!1;if("INPUT"===e.tagName){const t=String(e.type||"").toLowerCase();if(["hidden","file","submit","button","reset","image"].includes(t))return!1}const t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return t.width>0&&t.height>0&&"hidden"!==n.visibility&&"none"!==n.display},Ci=e=>"undefined"!=typeof CSS&&"function"==typeof CSS.escape?CSS.escape(e):String(e).replace(/["\\]/g,"\\$&"),Ai=(e,t)=>{try{e.dispatchEvent(new InputEvent("input",{bubbles:!0,inputType:"insertText",data:t}))}catch{e.dispatchEvent(new Event("input",{bubbles:!0}))}e.dispatchEvent(new Event("change",{bubbles:!0}))},Ii=e=>{const t=[e.getAttribute("name"),e.getAttribute("id"),e.getAttribute("aria-label"),e.getAttribute("placeholder"),e.getAttribute("title"),e.getAttribute("data-ai-field"),e.getAttribute("data-ai-label"),e.getAttribute("data-ai-value"),e.getAttribute("data-field"),e.getAttribute("data-testid")];if(e.id&&"undefined"!=typeof document){const n=document.querySelector(`label[for="${Ci(e.id)}"]`);n&&t.push(n.textContent)}const n=e.closest("label");n&&t.push(n.textContent);const a=e.closest(".fz-transport-dropdown-item, .fz-realty-group, .form-group, .field, .input-group, .form-control-wrap, .form-row")||e.closest("div"),r=a?.querySelector?.("label, .label, .form-label, .fz-realty-label, .fz-realty-group-title");return r&&t.push(r.textContent),e.previousElementSibling&&t.push(e.previousElementSibling.textContent),a?.textContent&&a.textContent.length<280&&t.push(a.textContent),pi(t.filter(Boolean).join(" "))},Ti=e=>pi(e).replace(/-/g," ").replace(/\s+/g," ").trim(),Ni=(e,t)=>{const n=Ti(e),a=Ti(t);if(!n||!a)return 0;if(n===a)return 100;if(n.includes(a))return 70;if(a.includes(n)&&n.length>2)return 45;const r=a.split(/\s+/).filter(e=>e.length>1);if(0===r.length)return 0;const i=r.filter(e=>n.includes(e)).length;return Math.round(i/r.length*60)},Pi=e=>{const t=li[e.fieldKey];return[e.rawField,t?.label,...t?.aliases||[]].filter(Boolean)},Li=e=>{const t=[e.getAttribute?.("aria-label"),e.getAttribute?.("data-ai-field"),e.getAttribute?.("data-ai-label"),e.getAttribute?.("data-ai-value"),e.getAttribute?.("data-field"),e.getAttribute?.("data-testid")],n=[":scope > label",":scope > .label",":scope > .form-label",":scope > .fz-realty-label",":scope > .fz-realty-group-title"];for(const r of n)try{e.querySelectorAll?.(r).forEach(e=>t.push(e.textContent))}catch{}const a=e.querySelector?.("label, .label, .form-label, .fz-realty-label, .fz-realty-group-title");return a&&t.push(a.textContent),t.filter(Boolean).length<=1&&e.textContent&&e.textContent.length<220&&t.push(e.textContent),t.filter(Boolean).join(" ")},$i=e=>/^(?:нет|не|no|false|off|выкл|выключи|отключи|сними|убери)$/iu.test(Ti(e)),Ri=e=>/^(?:да|есть|yes|true|on|вкл|включи|отметь|выбери)$/iu.test(Ti(e)),Di=e=>Ti([e.getAttribute?.("aria-label"),e.getAttribute?.("title"),e.getAttribute?.("data-value"),e.getAttribute?.("value"),e.textContent].filter(
2Boolean).join(" ")),Bi=(e,t,n={})=>{const a=(e=>{const t=String(e.className||"");return e.matches?.('[aria-checked="true"], [aria-pressed="true"]')||t.includes("active")||t.includes("selected")||t.includes("checked")||Boolean(e.querySelector?.("input:checked, .fz-realty-checkbox-box--checked, .active, .selected"))})(e);if(!n.toggleBoolean)return void(a||e.click?.());const r=$i(t.value),i=Ri(t.value);a&&!r||r&&!a||i&&a||e.click?.()},Oi=e=>{if(e.targetElement||["__active__","__target__"].includes(e.fieldKey))return null;const t=(e=>{if("undefined"==typeof document)return null;const t=Pi(e),n=Array.from(document.querySelectorAll('.fz-realty-checkbox, label, [role="checkbox"], input[type="checkbox"], [data-ai-field]')).filter(Ei);let a=null,r=0;for(const i of n){const e="INPUT"===i.tagName?document.querySelector(`label[for="${Ci(i.id)}"]`):i,n=Di(e||i),o=Math.max(...t.map(e=>Ni(n,e)));o>r&&(a=e||i,r=o)}return r>=55?a:null})(e);if(t&&(Ri(e.value)||$i(e.value)))return Bi(t,e,{toggleBoolean:!0}),Fi(t)||e.rawField;const n=(e=>{if("undefined"==typeof document)return null;const t=Pi(e),n=Array.from(document.querySelectorAll("[data-ai-field], .fz-transport-dropdown-item, .fz-realty-group, .form-group, .field, .input-group, .form-control-wrap, .form-row, label")).filter(Ei);let a=null,r=0;for(const i of n){const e=Li(i),n=Math.max(...t.map(t=>Ni(e,t)));n>r&&(a=i,r=n)}return r>=45?a:null})(e),a=((e,t)=>{if(!e)return null;const n=t.value,a=Ri(n)||$i(n)?[n,t.rawField]:[n],r=Array.from(e.querySelectorAll('button, [role="button"], label, .fz-realty-pill, .fz-realty-checkbox')).filter(e=>{if(!Ei(e))return!1;const t=Di(e);return t&&!/^(?:далее|назад|разместить|отмена|найти на карте)$/iu.test(t)});let i=null,o=0;for(const s of r){const e=Di(s),t=Math.max(...a.map(t=>Ni(e,t)));t>o&&(i=s,o=t)}return o>=45?i:null})(n,e);return a?(Bi(a,e),Li(n)||e.rawField):null},Fi=e=>{if(!e)return"текущее поле";const t=[e.getAttribute("aria-label"),e.getAttribute("placeholder"),e.getAttribute("name"),e.getAttribute("id")];if(e.id&&"undefined"!=typeof document){const n=document.querySelector(`label[for="${Ci(e.id)}"]`);n&&t.unshift(n.textContent)}const n=e.closest?.("label");return n&&t.unshift(n.textContent),String(t.find(Boolean)||"текущее поле").replace(/\s+/g," ").trim().slice(0,60)},Mi=()=>{if("undefined"==typeof document)return null;const e=document.activeElement;return Ei(e)?e:null},Vi=(e,t)=>{if(e.isContentEditable)return e.textContent=t,void Ai(e,t);if("SELECT"===e.tagName){const n=String(t||"").trim().toLowerCase(),a=pi(t),r=Array.from(e.options||[]).find(e=>{const t=String(e.textContent||"").trim().toLowerCase(),r=String(e.value||"").trim().toLowerCase(),i=pi(e.textContent),o=pi(e.value);return!(!n||t!==n&&r!==n)||!!a&&(i===a||o===a||i.includes(a))});return e.value=r?r.value:t,void e.dispatchEvent(new Event("change",{bubbles:!0}))}const n=Object.getPrototypeOf(e),a=Object.getOwnPropertyDescriptor(e,"value")?.set,r=Object.getOwnPropertyDescriptor(n,"value")?.set;r&&a!==r?r.call(e,t):a?a.call(e,t):e.value=t,Ai(e,t)},Ui=e=>{if("undefined"==typeof document)return null;if(e.targetElement&&document.contains(e.targetElement))return Ei(e.targetElement)?e.targetElement:null;if("__active__"===e.fieldKey)return Mi();const t=Pi(e);if(0===t.length)return null;const n=Array.from(document.querySelectorAll('input, textarea, select, [contenteditable="true"]')).filter(Ei);let a=null,r=0;for(const i of n){const e=Ii(i);let n=0;for(const a of t){const t=pi(a);if(!t)continue;const r=pi([i.getAttribute("name"),i.getAttribute("id"),i.getAttribute("aria-label"),i.getAttribute("placeholder"),i.getAttribute("data-ai-field"),i.getAttribute("data-ai-label")].filter(Boolean).join(" "));r===t&&(n+=12),r.includes(t)&&(n+=8),e.includes(t)&&(n+=5),n+=Math.round(Ni(e,a)/10)}n>r&&(a=i,r=n)}return r>0?a:null},Wi=e=>{const t=[],n=[];for(const a of e){const e=Ui(a),r=li[a.fieldKey]?.label||Fi(a.targetElement)||a.rawField;if(!e){const e=Oi(a);e?t.push(r||e):n.push(r);continue}Vi(e,a.value),e.focus?.({preventScroll:!0}),e.scrollIntoView?.({block:"center",behavior:"smooth"}),t.push(r)}return{filled:t,missing:n}},Hi=async e=>
2{const t=(e||[]).filter(Boolean);if(0===t.length)return{filled:[],missing:[]};const n=await((e,t={})=>{if("undefined"==typeof window||!e?.type)return Promise.resolve({handled:!1,reason:"UNAVAILABLE"});const n=Number.isFinite(t.timeoutMs)?t.timeoutMs:900;return new Promise(t=>{let a=!1;const r=window.setTimeout(()=>{a||(a=!0,t({handled:!1,reason:"NO_LISTENER"}))},n);window.dispatchEvent(new CustomEvent(Hr,{detail:{action:e,respond:(e={})=>{a||(a=!0,window.clearTimeout(r),t({handled:!0,...e}))}}}))})})({type:"set_ad_form_fields",source:"support_chat",fields:t.map(({fieldKey:e,rawField:t,value:n})=>({fieldKey:e,rawField:t,value:n}))});if(!n?.handled)return Wi(t);const a=Array.isArray(n.filled)?[...n.filled]:[],r=new Set(Array.isArray(n.filledKeys)?n.filledKeys:[]),i=t.filter(e=>!r.has(e.fieldKey)),o=i.length>0?Wi(i):{filled:[],missing:[]};return{filled:Array.from(new Set([...a,...o.filled])),missing:Array.from(new Set(o.missing))}},Ki=(e,t=!1)=>{const n=String(e||"").trim().toLowerCase();if(!n)return!1;if(Qr.test(n))return!0;if(!t)return!1;return n.split(/\s+/).filter(Boolean).length<=6&&Xr.test(n)},qi=e=>ui.test(String(e||""))?"/ads/create?category=transport&subcategory=trans-cars":"/ads/create",Gi=()=>J.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 14 14",fill:"none",children:[J.jsx("line",{x1:"2",y1:"2",x2:"12",y2:"12",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"}),J.jsx("line",{x1:"12",y1:"2",x2:"2",y2:"12",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})]}),Ji=()=>J.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[J.jsx("line",{x1:"22",y1:"2",x2:"11",y2:"13"}),J.jsx("polygon",{points:"22 2 15 22 11 13 2 9 22 2"})]}),Yi=()=>J.jsxs("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[J.jsx("path",{d:"M12 2a3 3 0 0 0-3 3v7a3 3 0 0 0 6 0V5a3 3 0 0 0-3-3Z"}),J.jsx("path",{d:"M19 10v2a7 7 0 0 1-14 0v-2"}),J.jsx("line",{x1:"12",y1:"19",x2:"12",y2:"22"}),J.jsx("line",{x1:"8",y1:"22",x2:"16",y2:"22"})]}),Zi=()=>J.jsx("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"currentColor",children:J.jsx("rect",{x:"6",y:"6",width:"12",height:"12",rx:"2"})}),Qi=()=>J.jsx("svg",{width:"24",height:"24",viewBox:"0 0 14 14",fill:"none",children:J.jsx("line",{x1:"2",y1:"7",x2:"12",y2:"7",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round"})}),Xi=()=>J.jsxs("svg",{width:"36",height:"36",viewBox:"0 0 36 36",fill:"none",children:[J.jsx("rect",{x:"4",y:"8",width:"28",height:"24",rx:"5",fill:"var(--c-blue-600)"}),J.jsx("circle",{cx:"18",cy:"4",r:"3",fill:"#f59e0b"}),J.jsx("rect",{x:"16",y:"4",width:"4",height:"6",fill:"var(--c-blue-600)"}),J.jsx("ellipse",{cx:"11",cy:"18",rx:"4",ry:"4.5",fill:"white"}),J.jsx("ellipse",{cx:"25",cy:"18",rx:"4",ry:"4.5",fill:"white"}),J.jsx("circle",{cx:"12",cy:"18",r:"2",fill:"#1a1a2e"}),J.jsx("circle",{cx:"26",cy:"18",r:"2",fill:"#1a1a2e"}),J.jsx("circle",{cx:"10",cy:"16.5",r:"1",fill:"white",opacity:"0.8"}),J.jsx("circle",{cx:"24",cy:"16.5",r:"1",fill:"white",opacity:"0.8"}),J.jsx("rect",{x:"11",y:"26",width:"14",height:"3",rx:"1.5",fill:"#1a1a2e"}),J.jsx("circle",{cx:"6",cy:"20",r:"2",fill:"#ff6b9d",opacity:"0.6"}),J.jsx("circle",{cx:"30",cy:"20",r:"2",fill:"#ff6b9d",opacity:"0.6"})]}),eo=()=>J.jsxs("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",children:[J.jsx("path",{d:"M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"}),J.jsx("circle",{cx:"12",cy:"7",r:"4"})]}),to=({filled:e})=>J.jsx("svg",{width:"24",height:"24",viewBox:"0 0 24 24",fill:e?"#FFD700":"none",stroke:"#FFD700",strokeWidth:"2",children:J.jsx("polygon",{points:"12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"})}),no=(e,t,n)=>`${e}_${t?`user_${t}`:"guest"}_${n}`,ao=()=>{const e=d(),t=c(),{t:n,i18n:a}=v(),r=qr(a.resolvedLanguage||a.language);if(Qt(e.pathname))return null;const{user:i,token:o}=ba(),u=i?.id||null,p=s.useRef(u),m=s.useCallback((e,t,n=!1)=>{try{const a=no(e,u,r),i=localStorage.getItem(a);return i?n?JSON.parse(i):i:t}catch{return t}},[u,r]),f=s.useCallback((e,t,n=!1)=>{const a=no(e,u,r);null==t?localStorage.removeItem(a):localStorage.setItem(a,n?JSON.stringify(t):t)},[u,r]),h=s.useCallback(e=>{const t=no(e,u,r);localStorage.removeItem(t)},[u,r]),[g,b]=s.useState(()=>"true"===localStorage.getItem("support_chat_open")),[x,y]=s.useState(!1),[_,w]=s.useState([]),[j,k]=s.useState(""),[z,S]=s.useState(!1),[E,C]=s.useState(null),[A,I]=s.useState(null),[T,N]=s.useState("offline"),[P,L]=s.useState(!1),[$,R]=s.useState(0),[D,B]=s.useState(!1),[O,F]=s.useState(0),[M,V]=s.useState(!0),[U,W]=s.useState(!1),[H,K]=s.useState(null),[q,G]=s.useState("idle"),[Y,Z]=s.useState(""),[Q,
2X]=s.useState(()=>{try{return e=localStorage.getItem(Yr),Zr.includes(e)?e:"female"}catch{return"female"}var e}),ee=s.useRef(null),te=s.useRef(null),ne=s.useRef(null),ae=s.useRef(r),re=s.useRef(null),ie=s.useRef(null),oe=s.useRef([]),se=s.useRef(null),le=s.useRef(null),ce=s.useRef(null),de=s.useRef(null),ue=s.useRef(null),pe=s.useRef(null),me=s.useRef(0),fe=s.useRef(null),he=s.useCallback(async(e=r)=>{try{N("connecting");const t=o?{Authorization:`Bearer ${o}`}:{},n=await zn.post("/support/conversations",{language:qr(e)},{headers:t});if(n.data.success)return C(n.data.conversation.id),I(n.data.conversation.sessionId),N("online"),n.data.welcome&&w([{id:Date.now(),type:"bot",content:n.data.welcome.content,suggestions:n.data.welcome.suggestions,timestamp:new Date}]),n.data.conversation}catch(t){N("error")}return null},[r,u,o]);s.useEffect(()=>{(()=>{const e=m("support_chat_conversation_id",null),t=m("support_chat_messages",[],!0);C(e),w(t),V(0===t.length),W(!0)})()},[u,r,m]),s.useEffect(()=>{if(p.current!==u&&U){const e=m("support_chat_conversation_id",null),t=m("support_chat_messages",[],!0);C(e),w(t),I(null),L(!1),B(!1),R(0),V(0===t.length),N("offline"),g&&!e&&he(r)}p.current=u},[r,u,U,g,m,he]),s.useEffect(()=>{localStorage.setItem("support_chat_open",g.toString())},[g]),s.useEffect(()=>{try{localStorage.setItem(Yr,Q)}catch{}},[Q]),s.useEffect(()=>{if("undefined"==typeof document)return;const e=e=>{const t=e.target;Ei(t)&&(pe.current=t,me.current=Date.now())};return document.addEventListener("focusin",e,!0),()=>document.removeEventListener("focusin",e,!0)},[]),s.useEffect(()=>{U&&E&&f("support_chat_conversation_id",E)},[E,U,f]),s.useEffect(()=>{U&&_.length>0&&f("support_chat_messages",_.slice(-50),!0)},[_,U,f]);const ge=s.useCallback((e="smooth")=>{const t=ee.current;if(t){const n=t.scrollHeight;try{t.scrollTo({top:n,behavior:e})}catch{t.scrollTop=n}return}te.current?.scrollIntoView({behavior:e})},[]);s.useEffect(()=>{g&&!x&&ge()},[_,g,x,ge]),s.useEffect(()=>{if(g&&!x){ge("auto");const e=window.requestAnimationFrame(()=>ge("auto")),t=window.setTimeout(()=>ge("auto"),150);return()=>{window.cancelAnimationFrame(e),window.clearTimeout(t)}}},[g,x,e.pathname,ge]),s.useEffect(()=>{g&&F(0)},[g]),s.useEffect(()=>{U&&ae.current!==r&&(ae.current=r,w([]),C(null),I(null),L(!1),B(!1),R(0),V(!0),h("support_chat_messages"),h("support_chat_conversation_id"),g&&he(r))},[r,U,g,h,he]),s.useEffect(()=>{U&&g&&!E&&"offline"===T&&he(r)},[r,E,U,g,he,T]);const be=s.useCallback(async()=>{w([]),C(null),I(null),L(!1),B(!1),R(0),V(!0),h("support_chat_messages"),h("support_chat_conversation_id"),await he(r)},[r,h,he]),xe=s.useCallback(()=>{b(!0),y(!1),E||he(r)},[r,E,he]);s.useEffect(()=>(window.addEventListener("freezoni:open-support-chat",xe),()=>window.removeEventListener("freezoni:open-support-chat",xe)),[xe]);const ye=s.useCallback(e=>{"undefined"!=typeof window&&"function"==typeof window.matchMedia&&window.matchMedia("(max-width: 768px), (pointer: coarse)").matches&&(b(!1),y(!1),localStorage.setItem("support_chat_open","false")),t(e)},[t]),_e=s.useCallback(()=>{const e=se.current;if(e){const t=e.onended;e.onended=null,e.onerror=null,e.pause(),e.src="",se.current=null,"function"==typeof t&&t(new Event("ended"))}},[]),we=s.useCallback(()=>{ie.current&&(ie.current.getTracks().forEach(e=>e.stop()),ie.current=null)},[]),ve=s.useCallback(()=>{ce.current&&(window.cancelAnimationFrame(ce.current),ce.current=null),de.current&&(window.clearTimeout(de.current),de.current=null);const e=le.current;e&&"closed"!==e.state&&e.close().catch(()=>{}),le.current=null},[]),je=s.useCallback(()=>{const e=ue.current;if(ue.current=null,e){e.onresult=null,e.onerror=null,e.onend=null;try{"function"==typeof e.abort?e.abort():e.stop()}catch{}}},[]),ke=s.useCallback(()=>{je(),_e(),ve(),we(),G("idle"),Z(n("supportChat.voiceStopped",{defaultValue:"Остановил голосовой ответ."}))},[je,ve,_e,we,n]);s.useEffect(()=>()=>{"recording"===re.current?.state&&re.current.stop(),je(),ve(),_e(),we()},[je,ve,_e,we]);const ze=s.useCallback(async({messageId:e,href:t,sourceText:n})=>{const a=((e,t,n)=>{try{const[a,r=""]=String(e||"/ads/create").split("#"),[i,o=""]=a.split("?"),s=new URLSearchParams(o);s.set(t,n);const l=s.toString();return`${i}${l?`?${l}`:""}${r?`#${r}`:""}`}catch{return"/ads/create?ai_draft=1"}})(t||"/ads/create","ai_draft","1");K(e);try{let e={sourceText:n,parsed:null,status:"raw"};
2if(o&&n&&n.trim().length>=30)try{const t=await zn.post("/ai/parse-ad-text",{text:n},{headers:{Authorization:`Bearer ${o}`}});t.data?.success&&t.data?.parsed&&(e={sourceText:n,parsed:t.data.parsed,status:"parsed"})}catch(r){}(e=>{localStorage.setItem("freezoni_ai_navigator_ad_draft",JSON.stringify({...e,source:"support_chat",createdAt:(new Date).toISOString()}))})(e),ye(a)}finally{K(null)}},[ye,o]),Se=s.useCallback(async e=>{const a=[],r=[];if(e.navigationTarget&&(t(e.navigationTarget.href),a.push(n("supportChat.navigatorOpenedPage",{defaultValue:"Открыл страницу: {{page}}.",page:e.navigationTarget.label})),e.fills.length>0&&await new Promise(e=>window.setTimeout(e,650))),e.searchTarget&&(t(e.searchTarget.href),a.push(n("supportChat.navigatorSearchOpened",{defaultValue:"Ищу объявления по запросу: {{query}}.",query:e.searchTarget.label}))),e.fills.length>0){const t=await Hi(e.fills);t.filled.length>0&&a.push(n("supportChat.navigatorFilledFields",{defaultValue:"Заполнил поля: {{fields}}.",fields:t.filled.join(", ")})),t.missing.length>0&&r.push(n("supportChat.navigatorMissingFields",{defaultValue:"Не нашёл видимые поля: {{fields}}.",fields:t.missing.join(", ")}))}return 0===a.length&&0===r.length&&r.push(n("supportChat.navigatorCommandNotUnderstood",{defaultValue:"Я пока не понял команду для страницы. Попробуйте сказать: «открой аукционы» или «впиши в поле цена 12000»."})),[...a,...r].join("\n")},[t,n]),Ee=async(e=j,t={})=>{if(!e.trim()||z)return null;const a=e.trim(),i=ci.test(a),s=i?null:Si(a,t),l=!s&&(e=>{const t=pi(e);return!!t&&ii.test(t)})(a)?(e=>e("supportChat.navigatorVoiceFillHelp",{defaultValue:"Да, я могу заполнять поля по вашему голосу. Кликните нужное поле на странице, нажмите микрофон у помощника и продиктуйте текст. Также можно сказать: «впиши в поле цена 12000» или «открой аукционы»."}))(n):"";if(i){k(""),V(!1);const e={id:Date.now(),type:"user",content:a,timestamp:new Date};w(t=>[...t,e]),S(!0),N("typing");try{const e={id:Date.now()+1,type:"bot",content:n("supportChat.navigatorCreateAdReady",{defaultValue:"Понял. Я могу открыть мастер и подготовить черновик объявления по всей информации из вашего сообщения. Фото и публикацию вы подтвердите сами."}),navigatorAction:{type:"create_ad_draft",href:qi(a),sourceText:a},timestamp:new Date};return w(t=>[...t,e]),x&&F(e=>e+1),e}finally{S(!1),N("online")}}if(s||l){k(""),V(!1);const e={id:Date.now(),type:"user",content:a,timestamp:new Date};w(t=>[...t,e]),S(!0),N("typing");try{const e=l||await Se(s),t={id:Date.now()+1,type:"bot",content:e,timestamp:new Date};return w(e=>[...e,t]),x&&F(e=>e+1),t}finally{S(!1),N("online")}}let c=E,d=A;if(!c){const e=await he(r);c=e?.id,d=e?.sessionId}if(!c)return null;k(""),V(!1);const u={id:Date.now(),type:"user",content:a,timestamp:new Date};w(e=>[...e,u]),S(!0),N("typing");try{const e=o?{Authorization:`Bearer ${o}`}:{},t=await zn.post(`/support/conversations/${c}/messages`,{message:a,sessionId:d},{headers:e});if(S(!1),N("online"),t.data.success&&t.data.response){const e=t.data.response,n=(e=>{const t=String(e||"").match(di);return t?t[0].replace(/[.,!?;:]+$/g,""):""})(e.content),r=n&&ci.test(a)?{type:"create_ad_draft",href:n,sourceText:a}:null,i={id:Date.now()+1,type:"bot",content:e.content,suggestions:e.relatedQuestions?.map(e=>e.question),navigatorAction:r,timestamp:new Date};return w(e=>[...e,i]),x&&F(e=>e+1),"resolved"!==t.data.status&&"closed"!==e.type||L(!0),i}return null}catch(p){return S(!1),403===p.response?.status?(w(e=>e.filter(e=>e.id!==u.id)),await be(),setTimeout(()=>{a&&Ee(a)},500),null):(N("error"),w(e=>[...e,{id:Date.now()+1,type:"system",content:n("supportChat.error"),timestamp:new Date}]),null)}},Ce=s.useCallback(()=>
2{if("undefined"==typeof window)return;const e=window.SpeechRecognition||window.webkitSpeechRecognition;if(!e)return;je();const t=new e;let n=!1;t.lang=ei[r]||"ru-RU",t.continuous=!0,t.interimResults=!0,t.maxAlternatives=1,t.onresult=e=>{const t=Array.from(e.results||[]).slice(e.resultIndex||0).map(e=>e?.[0]?.transcript||"").join(" ");Ki(t,!0)&&(n=!0,ke())},t.onerror=()=>{},t.onend=()=>{n||!se.current||se.current.paused||window.setTimeout(()=>{if(ue.current&&!se.current?.paused)try{ue.current.start()}catch{}},180)},ue.current=t;try{t.start()}catch{ue.current=null}},[r,ke,je]),Ae=async e=>{if(!e||e.size<600)return G("idle"),void Z(n("supportChat.voiceTooShort",{defaultValue:"Голосовое сообщение слишком короткое. Попробуйте ещё раз."}));try{Z(""),G("transcribing");const t=new FormData,a=e.type.includes("mp4")?"m4a":e.type.includes("mpeg")?"mp3":"webm";t.append("audio",e,`freezoni-voice.${a}`),t.append("language",r);const i=o?{Authorization:`Bearer ${o}`}:{},s=await zn.post("/support/voice/transcribe",t,{headers:i}),l=String(s.data?.text||"").trim();if(!s.data?.success||!l)return G("idle"),void Z(n("supportChat.voiceNoSpeech",{defaultValue:"Я не расслышал сообщение. Попробуйте сказать ещё раз."}));if(Ki(l,!0))return void ke();G("thinking");const c=fe.current;fe.current=null;const d=await Ee(l,{source:"voice",targetElement:c});d?.content?await(async e=>{const t=String(e||"").trim();if(!t)return;let a=null;try{G("speaking");const e=o?{Authorization:`Bearer ${o}`}:{},n=await zn.post("/support/voice/speak",{text:t,language:r,voiceProfile:Q},{headers:e}),i=n.data?.audio;if(!n.data?.success||!i)return;_e(),a=new Audio(`data:${n.data.mimeType||"audio/mpeg"};base64,${i}`),se.current=a,Ce(),await new Promise((e,t)=>{a.onended=e,a.onerror=t,a.play().catch(t)})}catch(i){Z(n("supportChat.voicePlaybackError",{defaultValue:"Ответ показан в чате. Браузер не дал включить звук автоматически."}))}finally{je(),a&&se.current===a&&(se.current=null),G(e=>"speaking"===e?"idle":e)}})(d.content):G("idle")}catch(t){G("idle"),Z(t.response?.data?.error||n("supportChat.voiceError",{defaultValue:"Голосовой режим временно недоступен. Напишите сообщение текстом."}))}},Ie=async()=>{if(!z&&!P&&"idle"===q)try{if(!navigator.mediaDevices?.getUserMedia||!window.MediaRecorder)return void Z(n("supportChat.voiceUnsupported",{defaultValue:"Ваш браузер не поддерживает запись голоса."}));_e(),fe.current=(()=>{const e=Mi();if(e)return e;const t=pe.current;return t&&"undefined"!=typeof document&&document.contains(t)?Date.now()-me.current>3e4?null:Ei(t)?t:null:null})(),Z("");const e=await navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0,autoGainControl:!0}}),t="undefined"!=typeof window&&window.MediaRecorder?.isTypeSupported&&["audio/webm;codecs=opus","audio/webm","audio/mp4","audio/mpeg"].find(e=>window.MediaRecorder.isTypeSupported(e))||"",a=new window.MediaRecorder(e,t?{mimeType:t}:void 0);ie.current=e,oe.current=[],re.current=a,a.ondataavailable=e=>{e.data?.size>0&&oe.current.push(e.data)},a.onstop=()=>{const e=a.mimeType||t||"audio/webm",n=new Blob(oe.current,{type:e});oe.current=[],re.current=null,ve(),we(),Ae(n)},a.onerror=()=>{ve(),we(),G("idle"),Z(n("supportChat.voiceRecordError",{defaultValue:"Не удалось записать голос. Проверьте доступ к микрофону."}))},a.start(),((e,t)=>{const n=window.AudioContext||window.webkitAudioContext;if(n)try{ve();const a=new n,r=a.createMediaStreamSource(e),i=a.createAnalyser();i.fftSize=1024,r.connect(i);const o=new Uint8Array(i.fftSize),s={startedAt:performance.now(),speechHeard:!1,silenceStartedAt:null},l=()=>{if("recording"!==t.state)return;i.getByteTimeDomainData(o);let e=0;for(let t=0;t<o.length;t+=1){const n=(o[t]-128)/128;e+=n*n}const n=Math.sqrt(e/o.length),a=performance.now();if(n>.035)s.speechHeard=!0,s.silenceStartedAt=null;else if(s.speechHeard&&(s.silenceStartedAt=s.silenceStartedAt||a,a-s.silenceStartedAt>1400&&a-s.startedAt>1800))return void t.stop();ce.current=window.requestAnimationFrame(l)};le.current=a,ce.current=window.requestAnimationFrame(l),de.current=window.setTimeout(()=>{"recording"===t.state&&t.stop()},9e4)}catch(a){ve()}})(e,a),G("listening")}
2catch(e){ve(),we(),G("idle"),Z(n("supportChat.voicePermissionError",{defaultValue:"Разрешите доступ к микрофону и попробуйте ещё раз."}))}},Te=e=>{Ee(e)},Ne=s.useCallback(()=>{V(!1)},[]),Pe=s.useCallback(()=>{V(!1),window.setTimeout(()=>ne.current?.focus(),0)},[]),Le=Array.isArray(n("supportChat.suggestions",{returnObjects:!0}))?n("supportChat.suggestions",{returnObjects:!0}):[],$e=e=>{if(!e)return null;const t=/📱\s*\*?\*?([^*\n]+)\*?\*?\s*-\s*(\d+(?:\.\d+)?)\s*₾[^\n]*(?:\n[^\n]*)*?🔗\s*\/ads?\/(\d+)/g,n=[];let a;for(;null!==(a=t.exec(e));)n.push({fullMatch:a[0],title:a[1].trim(),price:a[2],adId:a[3],index:a.index});if(n.length>0){const t=[];let a=0;if(n.forEach((n,r)=>{if(n.index>a){const i=e.slice(a,n.index);i.trim()&&t.push(J.jsx("span",{children:Re(i)},`text-${r}`))}t.push(J.jsxs("a",{href:`/ads/${n.adId}`,className:"support-ad-card",onClick:e=>{e.preventDefault(),ye(`/ads/${n.adId}`)},children:[J.jsx("div",{className:"support-ad-card-icon",children:"📱"}),J.jsxs("div",{className:"support-ad-card-info",children:[J.jsx("div",{className:"support-ad-card-title",children:n.title}),J.jsxs("div",{className:"support-ad-card-price",children:[n.price," ₾"]})]}),J.jsx("div",{className:"support-ad-card-arrow",children:"→"})]},`ad-${n.adId}`)),a=n.index+n.fullMatch.length}),a<e.length){const n=e.slice(a);n.trim()&&t.push(J.jsx("span",{children:Re(n)},"text-end"))}return J.jsx(J.Fragment,{children:t})}return Re(e)},Re=e=>{if(!e)return null;let t=e.replace(/\[([^\]]+)\]\((https?:\/\/[^\s)]+)\)/g,(e,t,n)=>{try{const e=new URL(n);return/freezoni\.(com|info)$/i.test(e.hostname.replace(/^www\./i,""))?e.pathname+e.search+e.hash:n}catch{return n}});t=t.replace(/\[([^\]]+)\]\((\/[^\s)]+)\)/g,"$2"),t=t.replace(/https?:\/\/(www\.)?freezoni\.(com|info)(\/[^\s)]*)/g,"$3");return t.split(Jr).map((e,t)=>{const{href:a,suffix:i}=(e=>{const t=e.replace(/[.,!?;:]+$/g,"");return{href:t,suffix:e.slice(t.length)}})(e),o=a.match(/^\/ads?\/(\d+)/);if(o){const e=o[1];return J.jsxs(l.Fragment,{children:[J.jsxs("a",{href:`/ads/${e}`,className:"support-ad-link",onClick:t=>{t.preventDefault(),ye(`/ads/${e}`)},children:["📦 ",n("supportChat.adLink")," #",e]}),i]},t)}const s=a.match(/^\/seller\/(\d+)/);if(s){const e=s[1];return J.jsxs(l.Fragment,{children:[J.jsxs("a",{href:`/seller/${e}`,className:"support-seller-link",onClick:t=>{t.preventDefault(),ye(`/seller/${e}`)},children:["👤 ",n("supportChat.sellerProfile")]}),i]},t)}if(a.match(/^\/ads\/create/))return J.jsxs(l.Fragment,{children:[J.jsxs("a",{href:a,className:"support-create-ad-link",onClick:e=>{e.preventDefault(),ye(a)},children:["➕ ",n("supportChat.createAd")]}),i]},t);const c=(e=>{if(e.startsWith("/profile?")){const t=e.split("?")[1]?.split("#")[0]||"";if("notifications"===new URLSearchParams(t).get("tab")){const t=Gr["/profile?tab=notifications"];return{icon:t.icon,label:t.labels[r]||t.labels.en||t.labels.ru||e}}}const t=e.split(/[?#]/)[0].replace(/\/$/,"")||"/",n=Gr[t];return n?{icon:n.icon,label:n.labels[r]||n.labels.en||n.labels.ru||e}:null})(a);return c?J.jsxs(l.Fragment,{children:[J.jsxs("a",{href:a,className:"support-internal-link",onClick:e=>{e.preventDefault(),ye(a)},children:[J.jsx("span",{className:"support-internal-link-icon",children:c.icon}),J.jsx("span",{children:c.label})]}),i]},t):J.jsx("span",{children:e},t)})},De=e=>{const t=e.navigatorAction;if(!t||"create_ad_draft"!==t.type)return null;const a=H===e.id;return J.jsxs("div",{className:"support-navigator-actions",children:[J.jsx("div",{className:"support-navigator-note",children:n("supportChat.navigatorDraftHint",{defaultValue:"Я могу открыть мастер и подготовить черновик по вашему описанию. Публикация будет только после вашего подтверждения."})}),J.jsx("button",{type:"button",className:"support-navigator-btn",disabled:a,onClick:()=>ze({messageId:e.id,href:t.href,sourceText:t.sourceText}),children:a?n("supportChat.navigatorPreparing",{defaultValue:"Готовлю черновик..."}):n("supportChat.navigatorPrepareDraft",{defaultValue:"Подготовить объявление"})})]})};
2return J.jsxs(J.Fragment,{children:[!g&&J.jsxs("button",{className:"support-fab",onClick:xe,"aria-label":"Open support chat",children:[J.jsx(Xi,{}),O>0&&J.jsx("span",{className:"support-fab-badge",children:O})]}),g&&J.jsxs("div",{className:"support-widget "+(x?"minimized":""),children:[J.jsxs("div",{className:"support-header",children:[J.jsxs("div",{className:"support-header-info",children:[J.jsxs("div",{className:"support-header-avatar",children:[J.jsx(Xi,{}),J.jsx("span",{className:`support-status-dot ${"offline"===T?"online":T}`})]}),J.jsxs("div",{className:"support-header-text",children:[J.jsx("div",{className:"support-header-title",children:n("supportChat.title")}),J.jsx("div",{className:"support-header-subtitle",children:"typing"===T?n("supportChat.typing"):"connecting"===T?n("supportChat.connecting"):"error"===T?n("supportChat.error"):n("supportChat.aiOnline",{defaultValue:"AI онлайн"})})]})]}),J.jsxs("div",{className:"support-header-actions",children:[J.jsx("select",{className:"support-lang-select",value:r,onChange:e=>{Rt(qr(e.target.value),{explicit:!0})},"aria-label":n("supportChat.language"),children:Kr.map(e=>J.jsx("option",{value:e.value,children:e.label},e.value))}),J.jsx("button",{className:"support-header-btn",onClick:()=>{y(!0)},"aria-label":"Minimize",title:n("supportChat.minimize"),children:J.jsx(Qi,{})}),J.jsx("button",{className:"support-header-btn",onClick:()=>{b(!1)},"aria-label":"Close",title:n("supportChat.close"),children:J.jsx(Gi,{})})]})]}),!x&&J.jsxs(J.Fragment,{children:[J.jsxs("div",{className:"support-body",children:[J.jsxs("div",{className:"support-messages",ref:ee,children:[_.map(e=>{const t="user"===e.type,n="system"===e.type;return J.jsxs("div",{className:"support-message "+(t?"user":n?"system":"bot"),children:[!t&&!n&&J.jsx("div",{className:"support-message-avatar bot",children:J.jsx(Xi,{})}),J.jsxs("div",{className:"support-message-content",children:[J.jsx("div",{className:"support-message-bubble",children:$e(e.content)}),!t&&!n&&De(e),e.suggestions&&e.suggestions.length>0&&J.jsx("div",{className:"support-suggestions",children:e.suggestions.map((e,t)=>J.jsx("button",{className:"support-suggestion-btn",onClick:()=>Te(e),children:e},t))}),J.jsx("div",{className:"support-message-time",children:new Date(e.timestamp).toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})})]}),t&&J.jsx("div",{className:"support-message-avatar user",children:J.jsx(eo,{})})]},e.id)}),z&&J.jsxs("div",{className:"support-message bot",children:[J.jsx("div",{className:"support-message-avatar bot",children:J.jsx(Xi,{})}),J.jsx("div",{className:"support-message-content",children:J.jsxs("div",{className:"support-typing-indicator",children:[J.jsx("span",{}),J.jsx("span",{}),J.jsx("span",{})]})})]}),P&&J.jsxs("div",{className:"support-rating",children:[J.jsx("div",{className:"support-rating-title",children:n(D?"supportChat.rateThank":"supportChat.rateTitle")}),!D&&J.jsx("div",{className:"support-rating-stars",children:[1,2,3,4,5].map(e=>J.jsx("button",{className:"support-rating-star",onClick:()=>(async e=>{R(e);try{const t=o?{Authorization:`Bearer ${o}`}:{};await zn.post(`/support/conversations/${E}/rate`,{rating:e,sessionId:A},{headers:t}),B(!0),setTimeout(()=>{L(!1)},2e3)}catch(t){}})(e),children:J.jsx(to,{filled:e<=$})},e))})]}),J.jsx("div",{ref:te})]}),M&&_.length<=1&&J.jsxs("div",{className:"support-quick-suggestions",children:[Le.map((e,t)=>J.jsx("button",{className:"support-quick-btn",onClick:()=>Te(e),children:e},t)),J.jsx("button",{className:"support-quick-btn support-quick-btn-other",onClick:()=>{Pe()},children:n("supportChat.otherQuestion")})]})]}),J.jsxs("div",{className:"support-footer",children:[J.jsxs("div",{className:"support-input-wrapper",children:[J.jsx("button",{type:"button",className:`support-voice-btn ${"listening"===q?"listening":""} ${"speaking"===q?"speaking":""}`,onClick:e=>{e?.stopPropagation(),"listening"!==q?"speaking"!==q?Ie():ke():"recording"===re.current?.state&&re.current.stop()},disabled:P||"idle"!==q&&"listening"!==q&&"speaking"!==q||z&&"listening"!==q&&"speaking"!==q,"aria-label":"listening"===q?n("supportChat.stopVoice",{defaultValue:"Остановить запись"}):"speaking"===q?n("supportChat.stopVoiceAnswer",{defaultValue:"Остановить голосовой ответ"}):n("supportChat.startVoice",{defaultValue:"Говорить с AI"}),title:"listening"===q?n("supportChat.stopVoice",{defaultValue:"Остановить запись"}):"speaking"===q?n("supportChat.stopVoiceAnswer",{defaultValue:"Остановить голосовой ответ"}):n("supportChat.startVoice",{defaultValue:"Говорить с AI"}),children:"listening"===q||"speaking"===q?J.jsx(Zi,{}):J.jsx(Yi,{})}),J.jsx("input",{ref:ne,type:"text",inputMode:"text",className:"support-input",placeholder:n("supportChat.placeholder"),value:j,onChange:e=>k(e.target.value),onKeyPress:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),Ee())},disabled:z||P,onFocus:Ne,onClick:Ne}),J.jsx("button",{className:"support-send-btn",onClick:e=>{e.stopPropagation(),Ee()},disabled:!j.trim()||z||P,children:J.jsx(Ji,{})})]}),("idle"!==q||Y)&&J.jsx("div",{className:`support-voice-status ${Y?"error":q}`,children:Y||("listening"===q?n("supportChat.voiceListening",{defaultValue:"Слушаю вас. Остановлюсь после паузы, кнопку стоп можно нажать вручную."}):"transcribing"===q?n("supportChat.voiceTranscribing",{defaultValue:"Понимаю вашу речь..."}):"thinking"===q?n("supportChat.voiceThinking",{defaultValue:"Думаю над ответом..."}):"speaking"===q?n("supportChat.voiceSpeaking",{defaultValue:"Отвечаю голосом. Скажите «стоп» или нажмите кнопку, чтобы прервать."}):"")}),J.jsxs("div",{className:"support-voice-picker",role:"group","aria-label":n("supportChat.voicePickerLabel",{defaultValue:"Выбор голоса AI"}),children:[J.jsx("button",{type:"button",className:"support-voice-choice "+("female"===Q?"active":""),onClick:()=>X("female"),children:n("supportChat.voiceFemale",{defaultValue:"Женский"})}),J.jsx("button",{type:"button",className:"support-voice-choice "+("male"===Q?"active":""),onClick:()=>X("male"),children:n("supportChat.voiceMale",{defaultValue:"Мужской"})})]}),J.jsx("div",{className:"support-footer-actions",children:J.jsx("button",{className:"support-action-btn",onClick:()=>{w([]),C(null),I(null),L(!1),B(!1),R(0),V(!0),h("support_chat_messages"),h("support_chat_conversation_id"),he(r)},children:n("supportChat.newChat")})})]})]}),x&&J.jsxs("div",{className:"support-minimized-body",onClick:()=>y(!1),children:[J.jsx("span",{children:n("supportChat.clickToExpand")}),O>0&&J.jsxs("span",{className:"support-unread-badge",children:[O," ",n("supportChat.newMessages")]})]})]})]})},ro=()=>{const e=d(),{user:t,loading:n}=ba(),{allowed:a,loading:r}=Ya({enabled:Boolean(t?.id)});return Qt(e.pathname)||n||r?null:t?.id&&a?J.jsx(ao,{}):null}
2,io=["/login","/register","/verify-phone"],oo=()=>{const{t:e}=v(),t=d(),{user:n}=ba(),a=t.pathname,r=St(a||"/"),i=/^\/chats\/[^/]+/.test(r),o=Qt(r),l=io.some(e=>r===e),c=i||o||l;s.useEffect(()=>(document.body.classList.toggle("fz-mobile-bottom-nav-visible",!c),document.body.classList.toggle("fz-mobile-bottom-nav-hidden",c),()=>{document.body.classList.remove("fz-mobile-bottom-nav-visible"),document.body.classList.remove("fz-mobile-bottom-nav-hidden")}),[c]);const p=s.useMemo(()=>{const t=e=>n?e:`/login?next=${encodeURIComponent(e)}`,a="/ads"===r||r.startsWith("/ads/")&&"/ads/create"!==r&&!r.endsWith("/edit");return[{key:"home",label:e("mobileNav.home","Главная"),to:"/",icon:E,active:"/"===r},{key:"catalog",label:e("mobileNav.catalog","Каталог"),to:"/categories",icon:C,active:r.startsWith("/categories")||r.startsWith("/category")||r.startsWith("/catalog")||a},{key:"create",label:e("mobileNav.create","Разместить"),to:t("/ads/create"),icon:A,active:"/ads/create"===r||"/auctions/create"===r},{key:"cart",label:e("mobileNav.cart","Корзина"),to:"/cart",icon:I,active:r.startsWith("/cart")||r.startsWith("/checkout")},{key:"profile",label:e("mobileNav.profile","Профиль"),to:t("/profile"),icon:T,active:r.startsWith("/profile")||r.startsWith("/my/")||r.startsWith("/settings")||r.startsWith("/balance")}]},[r,e,n]);return c?null:J.jsx("nav",{className:"mobile-app-nav","aria-label":e("mobileNav.ariaLabel","Мобильная навигация"),children:J.jsx("div",{className:"mobile-app-nav__inner",children:p.map(e=>{const t=e.icon,n=["mobile-app-nav__item",e.active?"mobile-app-nav__item--active":"",e.primary?"mobile-app-nav__item--primary":""].filter(Boolean).join(" "),a=J.jsxs(J.Fragment,{children:[J.jsxs("span",{className:"mobile-app-nav__icon-wrap",children:[e.active&&J.jsxs(J.Fragment,{children:[J.jsx("span",{className:"mobile-app-nav__aurora mobile-app-nav__aurora--outer","aria-hidden":"true"}),J.jsx("span",{className:"mobile-app-nav__aurora mobile-app-nav__aurora--inner","aria-hidden":"true"}),J.jsx("span",{className:"mobile-app-nav__core","aria-hidden":"true"})]}),J.jsx("span",{className:"mobile-app-nav__icon","aria-hidden":"true",children:J.jsx(t,{size:e.primary?20:22,strokeWidth:e.active?2.35:2.05})})]}),J.jsx("span",{className:"mobile-app-nav__label",children:e.label})]});return J.jsx(u,{to:e.to,className:n,"data-onboarding":e.key,"aria-current":e.active?"page":void 0,"aria-label":e.label,children:a},e.key)})})})},so="freezoni:start-onboarding",lo="freezoni:start-profile-guide",co="freezoni_onboarding_pending",uo="freezoni_profile_guide_prompt_v1",po="freezoni_profile_guide_v1",mo={ru:{eyebrow:"Быстрый старт",welcomeTitle:"Добро пожаловать в Freezoni",welcomeText:"За минуту покажем главное. Выберите, с чего хотите начать — покупать или продавать.",duration:"3 шага · около минуты",buyer:"Хочу покупать",buyerDescription:"Найти товар, открыть каталог и оформить заказ.",seller:"Хочу продавать",sellerDescription:"Разместить объявление и подготовиться к сделке.",skip:"Пропустить",close:"Закрыть знакомство",back:"Назад",next:"Далее",finish:"Готово",progress:"{{current}} из {{total}}",helpKicker:"Быстрый старт",helpTitle:"Впервые на Freezoni?",helpText:"Запустите короткое знакомство с основными возможностями сайта. Его всегда можно пропустить.",helpButton:"Показать подсказки",buyerSteps:[{target:"search",title:"Найдите нужное",text:"Введите название товара или услуги. Можно искать и по фотографии с помощью значка камеры."},{target:"catalog",title:"Исследуйте каталог",text:"Категории помогут быстро сузить выбор, если вы пока не знаете точное название."},{target:"cart",title:"Оформите покупку",text:"В корзине находятся выбранные товары. Здесь можно перейти Ð
2º безопасной сделке и доставке."}],sellerSteps:[{target:"create",title:"Разместите товар",text:"Нажмите «Разместить», добавьте фотографии, описание, цену и укажите способы доставки."},{target:"profile",title:"Подготовьтесь к продаже",text:"В профиле находятся сделки, адрес забора и счёт IBAN для выплат. Заполните их до подтверждения заказа."},{target:"chats",title:"Оставайтесь на связи",text:"В чатах покупатели задают вопросы, а вы можете быстро уточнить детали до сделки."}]},en:{eyebrow:"Quick start",welcomeTitle:"Welcome to Freezoni",welcomeText:"We will show you the essentials in about a minute. Choose whether you want to start by buying or selling.",duration:"3 steps · about a minute",buyer:"I want to buy",buyerDescription:"Find an item, browse the catalog, and place an order.",seller:"I want to sell",sellerDescription:"Post a listing and get ready for a deal.",skip:"I will explore on my own",close:"Close introduction",back:"Back",next:"Next",finish:"Done",progress:"{{current}} of {{total}}",helpKicker:"Quick start",helpTitle:"New to Freezoni?",helpText:"Take a short tour of the site’s main features. You can skip it at any time.",helpButton:"Show me around",buyerSteps:[{target:"search",title:"Find what you need",text:"Enter a product or service name. You can also search by photo with the camera icon."},{target:"catalog",title:"Browse the catalog",text:"Categories help narrow your options when you do not know the exact name yet."},{target:"cart",title:"Complete your purchase",text:"Your selected items are kept in the cart. Continue from here to a secure deal and delivery."}],sellerSteps:[{target:"create",title:"Post your item",text:"Choose “Post”, then add photos, a description, a price, and delivery methods."},{target:"profile",title:"Get ready to sell",text:"Your profile contains deals, the pickup address, and the IBAN account for payouts. Complete them before confirming an order."},{target:"chats",title:"Stay in touch",text:"Buyers can ask questions in chats, and you can quickly clarify details before a deal."}]},ka:{eyebrow:"სწრაფი დაწყება",welcomeTitle:"კეთილი იყოს თქვენი მობრძანება Freezoni-ზე",welcomeText:"დაახლოებით ერთ წუთში მთავარ შესაძლებლობებს გაჩვენებთ. აირჩიეთ, ყიდვით გსურთ დაწყება თუ გაყიდვით.",duration:"3 ნაბიჯი · დაახლოებით ერთი წუთი",buyer:"მსურს ყიდვა",buyerDescription:"იპოვეთ ნივთი, დაათვალიერეთ კატალოგი და გააფორმეთ შეკვეთა.",seller:"მსურს გაყიდვა",sellerDescription:"განათავსეთ განცხადება და მოემზადეთ გარიგებისთვის.",skip:"თავად გავეცნობი",close:"გაცნობის დახურვა",back:"უკან",next:"შემდეგი",finish:"მზადაა",progress:"{{current}} / {{total}}",helpKicker:"სწრაფი დაწყება",helpTitle:"პირველად ხართ Freezoni-ზე?",helpText:"გაეცანით საიტის მთავარ შესაძლებლობებს მოკლე ტურის მეშვეობით. მისი გამოტოვება ნებისმიერ დროს შეგიძლიათ.",helpButton:"მაჩვენეთ მინიშნებები",buyerSteps:[{target:"search",title:"იპოვეთ სასურველი",text:"შეიყვანეთ ნივთის ან მომსახურების სახელი. კამერის ნიშნით ფოტოთი ძებნაც შეგიძლიათ."},{target:"catalog",title:"დაათვალიერეთ კატალოგი",text:"კატეგორიები არჩევანის შემცირებაში დაგეხმარებათ, თუ ზუსტი დასახელება ჯერ არ იცით."},{target:"cart",title:"გააფორმეთ შეძენა",text:"არჩეული ნივთები კალათაში ინახება. აქედან გადადით უსაფრთხო გარიგებასა და მიწოდებაზე."}],sellerSteps:[{target:"create",title:"განათავსეთ ნივთი",text:"დააჭირეთ „განთავსებას“, დაამატეთ ფოტოები, აღწერა, ფასი და მიწოდების გზები."},{target:"profile",title:"მოემზადეთ გაყიდვისთვის",text:"პროფილშია გარიგებები, წაღების მისამართი და IBAN ანგარიში ჩარიცხვებისთვის. შეავსეთ ისინი შეკვეთის დადასტურებამდე."},{target:"chats",title:"დარჩით კავშირზე",text:"ჩატში მყიდველები კითხვებს სვამენ, თქვენ კი გარიგებამდე დეტალების სწრაფად დაზუსტება შეგიძლიათ."}]},de:{eyebrow:"Schnellstart",welcomeTitle:"Willkommen bei Freezoni",welcomeText:"In etwa einer Minute zeigen wir Ihnen das Wichtigste. Wählen Sie, ob Sie mit Kaufen oder Verkaufen beginnen möchten.",duration:"3 Schritte · etwa eine Minute",buyer:"Ich möchte kaufen",buyerDescription:"Artikel finden, Katalog öffnen und Bestellung abschließen.",seller:"Ich möchte verkaufen",sellerDescription:"Anzeige erstellen und auf den Verkauf vorbereiten.",skip:"Selbst erkunden",close:"Einführung schließen",back:"Zurück",next:"Weiter",finish:"Fertig",progress:"{{current}} von {{total}}",helpKicker:"Schnellstart",helpTitle:"Neu bei Freezoni?",helpText:"Starten Sie eine kurze Einführung in die wichtigsten Funktionen. Sie können sie jederzeit überspringen.",helpButton:"Hinweise anzeigen",buyerSteps:[{target:"search",title:"Finden Sie das Richtige",text:"Geben Sie einen Produkt- oder Dienstleistungsnamen ein. Über das Kamerasymbol können Sie auch per Foto suchen."},{target:"catalog",title:"Katalog entdecken",text:"Kategorien helfen Ihnen, die Auswahl einzugrenzen, wenn Sie den genauen Namen noch nicht kennen."},{target:"cart",title:"Kauf abschließen",text:"Ausgewählte Artikel liegen im Warenkorb. Von hier gelangen Sie zur sicheren Abwicklung und Lieferung."}],sellerSteps:[{target:"create",title:"Artikel einstellen",text:"Klicken Sie auf „Anzeige erstellen“ und ergänzen Sie Fotos, Beschreibung, Preis und Lieferarten."},{target:"profile",title:"Verkauf vorbereiten",text:"Im Profil finden Sie Verkäufe, Abholadresse und IBAN für Auszahlungen. Vervollständigen 
2Sie alles vor der Bestätigung."},{target:"chats",title:"In Kontakt bleiben",text:"Käufer stellen Fragen im Chat; dort können Sie Details vor dem Verkauf schnell klären."}]},fr:{eyebrow:"Démarrage rapide",welcomeTitle:"Bienvenue sur Freezoni",welcomeText:"Nous vous montrons l’essentiel en une minute. Choisissez si vous souhaitez commencer par acheter ou vendre.",duration:"3 étapes · environ une minute",buyer:"Je veux acheter",buyerDescription:"Trouver un article, parcourir le catalogue et commander.",seller:"Je veux vendre",sellerDescription:"Publier une annonce et préparer la vente.",skip:"Explorer par moi-même",close:"Fermer la présentation",back:"Retour",next:"Suivant",finish:"Terminé",progress:"{{current}} sur {{total}}",helpKicker:"Démarrage rapide",helpTitle:"Nouveau sur Freezoni ?",helpText:"Lancez une courte présentation des fonctions principales. Vous pouvez l’ignorer à tout moment.",helpButton:"Afficher les conseils",buyerSteps:[{target:"search",title:"Trouvez ce qu’il vous faut",text:"Saisissez le nom d’un produit ou d’un service. L’icône appareil photo permet aussi une recherche par image."},{target:"catalog",title:"Explorez le catalogue",text:"Les catégories réduisent rapidement le choix lorsque vous ne connaissez pas encore le nom exact."},{target:"cart",title:"Finalisez votre achat",text:"Les articles choisis sont dans le panier. Passez ensuite à la transaction sécurisée et à la livraison."}],sellerSteps:[{target:"create",title:"Publiez votre article",text:"Choisissez « Publier », puis ajoutez photos, description, prix et modes de livraison."},{target:"profile",title:"Préparez la vente",text:"Le profil regroupe vos transactions, l’adresse de collecte et l’IBAN de versement. Complétez-les avant de confirmer."},{target:"chats",title:"Restez en contact",text:"Les acheteurs posent leurs questions dans les chats et vous pouvez y préciser les détails avant la vente."}]},es:{eyebrow:"Inicio rápido",welcomeTitle:"Te damos la bienvenida a Freezoni",welcomeText:"En aproximadamente un minuto te mostraremos lo esencial. Elige si quieres empezar comprando o vendiendo.",duration:"3 pasos · cerca de un minuto",buyer:"Quiero comprar",buyerDescription:"Encontrar un artículo, explorar el catálogo y hacer un pedido.",seller:"Quiero vender",sellerDescription:"Publicar un anuncio y prepararse para la venta.",skip:"Explorar por mi cuenta",close:"Cerrar introducción",back:"Atrás",
2next:"Siguiente",finish:"Listo",progress:"{{current}} de {{total}}",helpKicker:"Inicio rápido",helpTitle:"¿Primera vez en Freezoni?",helpText:"Haz un recorrido corto por las funciones principales. Puedes omitirlo cuando quieras.",helpButton:"Mostrar consejos",buyerSteps:[{target:"search",title:"Encuentra lo que necesitas",text:"Escribe el nombre de un producto o servicio. También puedes buscar por foto con el icono de la cámara."},{target:"catalog",title:"Explora el catálogo",text:"Las categorías te ayudan a reducir opciones si todavía no sabes el nombre exacto."},{target:"cart",title:"Completa tu compra",text:"Los artículos elegidos se guardan en el carrito. Desde aquí puedes pasar al trato seguro y la entrega."}],sellerSteps:[{target:"create",title:"Publica tu artículo",text:"Pulsa «Publicar» y añade fotos, descripción, precio y métodos de entrega."},{target:"profile",title:"Prepárate para vender",text:"En el perfil están tus tratos, la dirección de recogida y el IBAN para cobros. Complétalos antes de confirmar."},{target:"chats",title:"Mantente en contacto",text:"Los compradores preguntan en los chats y puedes aclarar los detalles antes del trato."}]},ar:{eyebrow:"بدء سريع",welcomeTitle:"مرحبًا بك في Freezoni",welcomeText:"سنعرّفك على الأساسيات في نحو دقيقة. اختر ما إذا كنت تريد البدء بالشراء أو البيع.",duration:"3 خطوات · نحو دقيقة",buyer:"أريد الشراء",buyerDescription:"العثور على منتج وتصفح الدليل وإتمام الطلب.",seller:"أريد البيع",sellerDescription:"نشر إعلان والاستعداد للصفقة.",skip:"سأستكشف بنفسي",close:"إغلاق المقدمة",back:"السابق",next:"التالي",finish:"تم",progress:"{{current}} من {{total}}",helpKicker:"بدء سريع",helpTitle:"هل هذه زيارتك الأولى إلى Freezoni؟",helpText:"ابدأ جولة قصيرة لأهم ميزات الموقع. يمكنك تخطيها في أي وقت.",helpButton:"عرض الإرشادات",buyerSteps:[{target:"search",title:"اعثر على ما تحتاجه",text:"أدخل اسم المنتج أو الخدمة. ويمكنك أيضًا البحث بصورة عبر رمز الكاميرا."},{target:"catalog",title:"تصفح الدليل",text:"تساعدك الفئات على تضييق الخيارات عندما لا تعرف الاسم الدقيق بعد."},{target:"cart",title:"أكمل عملية الشراء",text:"تُحفظ المنتجات المختارة في السلة. ومن هنا تنتقل إلى الصفقة الآمنة والتوصيل."}],sellerSteps:[{target:"create",title:"انشر منتجك",text:"اضغط «نشر» ثم أضف الصور والوصف والسعر وطرق التوصيل."},{target:"profile",title:"استعد للبيع",text:"يتضمن الملف الشخصي الصفقات وعنوان الاستلام وحساب IBAN للدفعات. أكملها قبل تأكيد الطلب."},{target:"chats",title:"ابقَ على تواصل",text:"يمكن للمشترين طرح الأسئلة في الدردشة ويمكنك توضيح التفاصيل قبل الصفقة."}]},zh:{eyebrow:"快速开始",welcomeTitle:"欢迎来到 Freezoni",welcomeText:"我们会用大约一分钟介绍主要功能。请选择从购买还是出售开始。",duration:"3 æ­¥ · 约一分钟",buyer:"我要购买",buyerDescription:"查找商品、浏览目录并完成下单。",seller:"我要出售",sellerDescription:"发布广告并为交易做好准备。",skip:"我自己看看",close:"关闭介绍",back:"返回",next:"下一步",finish:"完成",progress:"第 {{current}} / {{total}} æ­¥",helpKicker:"快速开始",helpTitle:"第一次使用 Freezoni?",helpText:"通过简短导览了解网站的主要功能,随时可以跳过。",helpButton:"显示使用提示",buyerSteps:[{target:"search",title:"找到所需内容",text:"输入商品或服务名称,也可以点击相机图标使用图片搜索。"},{target:"catalog",title:"浏览目录",text:"如果还不知道准确名称,分类可以帮助ä
2½ å¿«é€Ÿç¼©å°é€‰æ‹©èŒƒå›´ã€‚"},{target:"cart",title:"完成购买",text:"已选择的商品会保存在购物车中,可从这里进入安全交易和配送流程。"}],sellerSteps:[{target:"create",title:"发布商品",text:"点击“发布”,添加照片、说明、价格和配送方式。"},{target:"profile",title:"做好出售准备",text:"个人资料中包含交易、取件地址和收款 IBAN。请在确认订单前填写完整。"},{target:"chats",title:"保持沟通",text:"买家可在聊天中提问,你也可以在交易前快速确认细节。"}]},tr:{eyebrow:"Hızlı başlangıç",welcomeTitle:"Freezoni’ye hoş geldiniz",welcomeText:"Yaklaşık bir dakikada temel özellikleri göstereceğiz. Alışverişle mi satışla mı başlamak istediğinizi seçin.",duration:"3 adım · yaklaşık bir dakika",buyer:"Satın almak istiyorum",buyerDescription:"Ürün bulun, kataloğa göz atın ve sipariş verin.",seller:"Satmak istiyorum",sellerDescription:"İlan yayınlayın ve satışa hazırlanın.",skip:"Kendim keşfedeceğim",close:"Tanıtımı kapat",back:"Geri",next:"İleri",finish:"Bitti",progress:"{{current}} / {{total}}",helpKicker:"Hızlı başlangıç",helpTitle:"Freezoni’de yeni misiniz?",helpText:"Sitenin temel özelliklerini kısa bir turla keşfedin. İstediğiniz zaman atlayabilirsiniz.",helpButton:"İpuçlarını göster",buyerSteps:[{target:"search",title:"İhtiyacınızı bulun",text:"Ürün veya hizmet adını yazın. Kamera simgesiyle fotoğraftan da arama yapabilirsiniz."},{target:"catalog",title:"Kataloğu keşfedin",text:"Tam adı henüz bilmiyorsanız kategoriler seçenekleri hızla daraltır."},{target:"cart",title:"Satın almayı tamamlayın",text:"Seçtiğiniz ürünler sepette tutulur. Güvenli işlem ve teslimata buradan geçebilirsiniz."}],sellerSteps:[{target:"create",title:"Ürününüzü yayınlayın",text:"“İlan ver”e basın; fotoğraf, açıklama, fiyat ve teslimat yöntemlerini ekleyin."},{target:"profile",title:"Satışa hazırlanın",text:"Profilinizde işlemler, teslim alma adresi ve ödeme IBAN’ı bulunur. Siparişi onaylamadan önce tamamlayın."},{target:"chats",title:"İletişimde kalın",text:"Alıcılar sohbetlerde soru sorar; satıştan önce ayrıntıları hızla netleştirebilirsiniz."}]}},fo={ru:{duration:"7 шагов · около 2 минут",welcomeText:"Покажем основные разделы сайта и проведём по навигации. Выберите маршрут покупателя или продавца.",helpText:"Пройдите расширенное знакомство с навигацией и основными возможностями сайта. Его всегда можно пропустить.",helpButton:"Пройти обучение",buyerFavorites:{target:"favorites",title:"Сохраняйте интересное",text:"Нажмите сердце в объявлении, чтобы вернуться к нему позже. Все сохранённые товары находятся в «Избранном»."},buyerCompare:{target:"compare",title:"Сравнивайте варианты",text:"Добавьте несколько объявлений в сравнение, чтобы сопоставить цену и характеристики в одном месте."},buyerChats:{target:"chats",title:"Уточняйте детали",text:"В чатах можно задать продавцу вопрос о состоянии товара, комплекте или способе передачи."},buyerProfile:{target:"profile",title:"Управляйте покупками",text:"В профиле находятся ваши сделки, уведомления, адрес доставки, баланс и настройки аккаунта."},sellerHome:{target:"home",title:"Возвращайтесь на главную",text:"Логотип на компьютере и кнопка «Главная» на телефоне всегда возвращают к основной ленте объявлений."},sellerFavorites:{target:"favorites",title:"Следите за рынком",text:"Сохраняйте похожие объявления, чтобы изучать цены и улучшать собственные предложения."}},en:{duration:"7 steps · about 2 minutes",welcomeText:"We will show you the main areas of the site and guide you through navigation. Choose the buyer or seller route.",helpText:"Take an extended tour of the site navigation and core features. You can skip it at any time.",helpButton:"Start the full tour",buyerFavorites:{target:"favorites",title:"Save what you like",text:"Tap the heart on a listing to return to it later. All saved items are kept in Favorites."},buyerCompare:{target:"compare",title:"Compare your options",text:"Add several listings to compare their prices and specifications in one place."},buyerChats:{target:"chats",title:"Clarify the details",text:"Use chats to ask the seller about condition, what is included, or how the item can be handed over."},buyerProfile:{target:"profile",title:"Manage your purchases",text:"Your profile contains deals, notifications, delivery address, balance, and account settings."},sellerHome:{target:"home",title:"Return to the home page",text:"The desktop logo and the mobile Home button always take you back to the main listings feed."},sellerFavorites:{target:"favorites",title:"Follow the market",text:"Save similar listings to study prices and improve your own offers."}},ka:{duration:"7 ნაბიჯი · დაახლოებით 2 წუთი",wel
2comeText:"გაჩვენებთ საიტის მთავარ განყოფილებებს და ნავიგაციას. აირჩიეთ მყიდველის ან გამყიდველის გზა.",helpText:"გაიარეთ საიტის ნავიგაციისა და ძირითადი შესაძლებლობების გაფართოებული ტური. მისი გამოტოვება ნებისმიერ დროს შეგიძლიათ.",helpButton:"სრული ტურის დაწყება",buyerFavorites:{target:"favorites",title:"შეინახეთ საინტერესო",text:"დააჭირეთ გულს განცხადებაზე, რათა მოგვიანებით დაუბრუნდეთ. ყველა შენახული ნივთი „რჩეულებშია“."},buyerCompare:{target:"compare",title:"შეადარეთ ვარიანტები",text:"დაამატეთ რამდენიმე განცხადება შედარებაში, რათა ფასი და მახასიათებლები ერთ ადგილას ნახოთ."},buyerChats:{target:"chats",title:"დააზუსტეთ დეტალები",text:"ჩატში ჰკითხეთ გამყიდველს ნივთის მდგომარეობის, კომპლექტაციის ან გადაცემის შესახებ."},buyerProfile:{target:"profile",title:"მართეთ შესყიდვები",text:"პროფილშია თქვენი გარიგებები, შეტყობინებები, მიწოდების მისამართი, ბალანსი და პარამეტრები."},sellerHome:{target:"home",title:"დაბრუნდით მთავარ გვერდზე",text:"ლოგო კომპიუტერზე და „მთავარი“ ტელეფონზე ყოველთვის განცხადებების ძირითად ლენტაზე გაბრუნებთ."},sellerFavorites:{target:"favorites",title:"დააკვირდით ბაზარს",text:"შეინახეთ მსგავსი განცხადებები ფასების შესასწავლად და საკუთარი შეთავაზების გასაუმჯობესებლად."}},de:{duration:"7 Schritte · etwa 2 Minuten",welcomeText:"Wir zeigen Ihnen die wichtigsten Bereiche und führen Sie durch die Navigation. Wählen Sie den Käufer- oder Verkäuferweg.",helpText:"Starten Sie eine ausführlichere Tour durch Navigation und Hauptfunktionen. Sie können sie jederzeit überspringen.",helpButton:"Ausführliche Tour starten",buyerFavorites:{target:"favorites",title:"Interessantes speichern",text:"Markieren Sie eine Anzeige mit dem Herz, um sie später wiederzufinden. Alles Gespeicherte liegt in den Favoriten."},buyerCompare:{target:"compare",title:"Angebote vergleichen",text:"Fügen Sie mehrere Anzeigen zum Vergleich hinzu, um Preise und Eigenschaften gemeinsam zu betrachten."},buyerChats:{target:"chats",title:"Details klären",text:"Fragen Sie den Verkäufer im Chat nach Zustand, Lieferumfang oder Übergabe."},buyerProfile:{target:"profile",title:"Käufe verwalten",text:"Im Profil finden Sie Verkäufe, Benachrichtigungen, Lieferadresse, Guthaben und Kontoeinstellungen."},sellerHome:{target:"home",title:"Zur Startseite zurückkehren",text:"Das Logo am Computer und „Start“ auf dem Handy führen immer zur Hauptübersicht der Anzeigen."},sellerFavorites:{target:"favorites",title:"Den Markt beobachten",text:"Speichern Sie ähnliche Anzeigen, um Preise zu prüfen und Ihre eigenen Angebote zu verbessern."}},fr:{duration:"7 étapes · environ 2 minutes",welcomeText:"Nous vous présentons les principales sections et la navigation. Choisissez le parcours acheteur ou vendeur.",helpText:"Suivez une visite détaillée de la navigation et des fonctions principales. Vous pouvez l’ignorer à tout moment.",helpButton:"Lancer la visite complète",buyerFavorites:{target:"favorites",title:"Enregistrez vos trouvailles",text:"Touchez le cœur d’une annonce pour la retrouver plus tard. Tous les articles enregistrés sont dans les Favoris."},buyerCompare:{target:"compare",title:"Comparez les options",text:"Ajoutez plusieurs annonces au comparateur pour examiner prix et caractéristiques au même endroit."},buyerChats:{target:"chats",title:"Précisez les détails",text:"Dans les chats, interrogez le vendeur sur l’état, les accessoires inclus ou la remise du produit."},buyerProfile:{target:"profile",title:"Gérez vos achats",text:"Votre profil regroupe transactions, notifications, adresse de livraison, solde et paramètres du compte."},sellerHome:{target:"home",title:"Revenez à l’accueil",text:"Le logo sur ordinateur et le bouton Accueil sur mobile ramènent toujours au flux principal des annonces."},sellerFavorites:{target:"favorites",title:"Suivez le marché",text:"Enregistrez des annonces similaires pour étudier les prix et améliorer vos propres offres."}},es:{duration:"7 pasos · unos 2 minutos",welcomeText:"Te mostraremos las secciones principales y cómo navegar por el sitio. Elige el recorrido de comprador o vendedor.",helpText:"Haz un recorrido ampliado por la navegación y las funciones principales. Puedes omitirlo en cualquier momento.",helpButton:"Iniciar recorrido completo",buyerFavorites:{target:"favorites",title:"Guarda lo que te interesa",text:"Pulsa el corazón de un anuncio para volver más tarde. Todo lo guardado aparece en Favoritos."},buyerCompare:{target:"compare",title:"Compara opciones",text:"Añade varios anuncios al comparador para revisar precios y características en un solo lugar."},buyerChats:{target:"chats",title:"Aclara los detalles",text:"Usa los chats para preguntar al vendedor por el estado, lo que incluye o la forma de entrega."},buyerProfile:{target:"profile",title:"Gestiona tus compras",text:"En el perfil están tus tratos, notificaciones, dirección de entrega, saldo y ajustes de cuenta."},sellerHome:{target:"home",title:"Vuelve a la página principal",text:"El logotipo en ordenador y el botón Inicio en móvil siempre llevan al listado principal."},sellerFavorites:{target:"favorites",title:"Sigue el mercado",text:"Guarda anuncios similares para estudiar precios y mejorar tus propias ofertas."}},ar:{duration:"7 خطوات · نحو دقيقتين",welcomeText:"سنعرض لك أقسام الموقع الرئيسية وطريقة التنقل. اختر مسار المشتري أو البائع.",helpText:"ابدأ جولة موسعة في التنقل والميزات الرئيسية. يمكنك تخطيها في أي وقت.",helpButton:"بدء الجولة الكاملة",buyerFavorites:{target:"favorites",title:"احفظ ما يعجبك",text:"اضغط على القلب في الإعلان للعودة إليه لاحقًا. ستجد كل ما حفظته في المفضلة."},buyerCompare:{target:"compare",title:"قارن بين الخيارات",text:"أضف عدة إعلانات إلى المقارنة لمراجعة الأسعار والمواصفات في مكان واحد."},buyerChats:{target:"chats",title:"استوضح التفاصيل",text:"استخدم الدردشة لسؤال البائع عن حالة المنتج أو محتوياته أو طريقة التسليم."},buyerProfile:{target:"profile",title:"أدر مشترياتك",text:"يضم ملفك الصفقات والإشعارات وعنوان التوصيل والرصيد وإعدادات الحساب."},sellerHome:{target:"home",title:"ارجع إلى الرئيسية",text:"يعيدك الشعار على الكمبيوتر وزر الرئيسية على الهاتف دائمًا إلى قائمة الإعلانات الأساسية."},sellerFavorites:{target:"favorites",title:"تابع السوق",text:"احفظ الإعلانات المشابهة لدراسة الأسعار وتحسين عروضك."}},zh:{duration:"7 步 · 约 2 分钟",welcomeText:"我们将介绍网站主要区域和导航方式。请选择买家或卖家路线。",helpText:"通过扩展导览了解网站导航和主要功能,随时可以跳过。",helpButton:"开始完整导览",buyerFavorites:{target:"favorites",title:"收藏感兴趣的内容",text:"点击广告上的爱心即可稍后返回查看,所有收藏内容都保存在“收藏”中。"},buyerCompare:{target:"compare",title:"比较不同选择",text:"把多个广告加入比较,即可在同一处查看价格和规格。"},buyerChats:{target:"chats",title:"确认商品细节",text:"通过聊天向卖家询问商品状况、配件或交付方式。"},buyerProfile:{target:"profile",title:"管理购买记录",text:"个人资料中包含交易、通知、配送地址、余额和账户设置。"},sellerHome:{target:"home",title:"返回主页",text:"电脑上的标志和手机上的“主页”按钮都可返回主要广告列表。"},sellerFavorites:{target:"favorites",title:"了解市场",text:"收藏类似广告,研究价格并改进自己的商品信息。"}},tr:{duration:"7 adım · yaklaşık 2 dakika",welcomeText:"Sitenin ana bölümlerini ve gezinmeyi göstereceğiz. Alıcı veya satıcı yolunu seçin.",helpText:"Site gezintisi ve temel özellikler için genişletilmiş turu başlatın. İstediğiniz zaman atlayabilirsiniz.",helpButton:"Tam turu başlat",buyerFavorites:{target:"favorites",title:"Beğendiklerinizi kaydedin",text:"Daha sonra dönmek için ilandaki kalbe dokunun. Kaydettikleriniz Favoriler bölümünde tutulur."},buyerCompare:{target:"compare",title:"Seçenekleri karşılaştırın",text:"Fiyatları ve özellikleri tek yerde görmek için birkaç ilanı karşılaştırmaya ekleyin."},buyerChats:{target:"chats",title:"Ayrıntıları netleştirin",text:"Ürünün durumu, içeriği veya teslim şekli hakkında satıcıya sohbetten sorun."},buyerProfile:{target:"profile",title:"Alışverişlerinizi yönetin",text:"Profilde işlemleriniz, bildirimler, teslimat adresi, bakiye ve hesap ayarları bulunur."},sellerHome:{target:"home",title:"Ana sayfaya dönün",text:"Bilgisayardaki logo ve telefondaki Ana Sayfa düğmesi sizi her zaman ana ilan akışına götürür."},sellerFavorites:{target:"favorites",title:"Piyasayı takip edin",text:"Fiyatları inceleme
2k ve kendi tekliflerinizi geliştirmek için benzer ilanları kaydedin."}}},ho={ru:{kicker:"Обучение на телефоне",title:"Что вы хотите сделать?",text:"Выберите задачу — покажем только нужные кнопки на настоящем экране.",duration:"3–4 коротких шага · можно выйти в любой момент",buyTitle:"Найти и купить",buyText:"Поиск, каталог и корзина",sellTitle:"Разместить и продать",sellText:"Объявление, заказы и подготовка к продаже",accountTitle:"Управлять аккаунтом",accountText:"Заказы, баланс, адреса и безопасность",chooseAnother:"Другой маршрут",routeLabels:{buy:"Покупка",sell:"Продажа",account:"Профиль"},accountStart:{target:"profile",title:"Профиль всегда внизу",text:"Нижнее меню остаётся на экране. Через «Профиль» вы в любой момент вернётесь к заказам, балансу и настройкам."}},en:{kicker:"Mobile guide",title:"What do you want to do?",text:"Choose a task and we will point out only the buttons you need on the real screen.",duration:"3–4 short steps · leave at any time",buyTitle:"Find and buy",buyText:"Search, catalog, and cart",sellTitle:"Post and sell",sellText:"Listing, orders, and selling setup",accountTitle:"Manage my account",accountText:"Orders, balance, addresses, and security",chooseAnother:"Choose another",routeLabels:{buy:"Buying",sell:"Selling",account:"Profile"},accountStart:{target:"profile",title:"Profile is always at the bottom",text:"The bottom menu stays on screen. Use Profile to return to orders, balance, and settings at any time."}},ka:{kicker:"მობილური გზამკვლევი",title:"რის გაკეთება გსურთ?",text:"აირჩიეთ ამოცანა და რეალურ ეკრანზე მხოლოდ საჭირო ღილაკებს გაჩვენებთ.",duration:"3–4 მოკლე ნაბიჯი · გასვლა ნებისმიერ დროს შეგიძლიათ",buyTitle:"მოძებნა და ყიდვა",buyText:"ძიება, კატალოგი და კალათა",sellTitle:"განთავსება და გაყიდვა",sellText:"განცხადება, შეკვეთები და გაყიდვის მომზადება",accountTitle:"ანგარიშის მართვა",accountText:"შეკვეთები, ბალანსი, მისამართები და უსაფრთხოება",chooseAnother:"სხვა მარშრუტი",routeLabels:{buy:"ყიდვა",sell:"გაყიდვა",account:"პროფილი"},accountStart:{target:"profile",title:"პროფილი ყოველთვის ქვემოთაა",text:"ქვედა მენიუ ეკრანზე რჩება. პროფილიდან ნებისმიერ დროს დაბრუნდებით შეკვეთებზე, ბალანსსა და პარამეტრებზე."}},de:{kicker:"Mobile Anleitung",title:"Was möchten Sie tun?",text:"Wählen Sie eine Aufgabe. Wir zeigen nur die nötigen Schaltflächen direkt in der Oberfläche.",duration:"3–4 kurze Schritte · jederzeit beendbar",buyTitle:"Suchen und kaufen",buyText:"Suche, Katalog und Warenkorb",sellTitle:"Einstellen und verkaufen",sellText:"Anzeige, Bestellungen und Verkaufsvorbereitung",accountTitle:"Konto verwalten",accountText:"Bestellungen, Guthaben, Adressen und Sicherheit",chooseAnother:"Anderen Weg wählen",routeLabels:{buy:"Kaufen",sell:"Verkaufen",account:"Profil"},accountStart:{target:"profile",title:"Das Profil bleibt unten erreichbar",text:"Das untere Menü bleibt sichtbar. Über Profil gelangen Sie jederzeit zu Bestellungen, Guthaben und Einstellungen."}},fr:{kicker:"Guide mobile",title:"Que souhaitez-vous faire ?",text:"Choisissez une tâche : nous indiquons uniquement les boutons utiles sur l’écran réel.",duration:"3 à 4 étapes courtes · arrêt possible à tout moment",buyTitle:"Chercher et acheter",buyText:"Recherche, catalogue et panier",sellTitle:"Publier et vendre",sellText:"Annonce, commandes et préparation à la vente",accountTitle:"Gérer mon compte",accountText:"Commandes, solde, adresses et sécurité",chooseAnother:"Autre parcours",routeLabels:{buy:"Achat",sell:"Vente",account:"Profil"},accountStart:{target:"profile",title:"Le profil reste accessible en bas",text:"Le menu inférieur reste visible. Ouvrez Profil pour retrouver commandes, solde et réglages à tout moment."}},es:{kicker:"Guía móvil",title:"¿Qué quieres hacer?",text:"Elige una tarea y te mostraremos solo los botones necesarios en la pantalla real.",duration:"3–4 pasos breves · puedes salir cuando quieras",buyTitle:"Buscar y comprar",buyText:"Búsqueda, catálogo y carrito",sellTitle:"Publicar y vender",sellText:"Anuncio, pedidos y preparación de venta",accountTitle:"Gestionar mi cuenta",accountText:"Pedidos, saldo, direcciones y seguridad",chooseAnother:"Elegir otra ruta",routeLabels:{buy:"Compra",sell:"Venta",account:"Perfil"},accountStart:{target:"profile",title:"El perfil siempre está abajo",text:"El menú inferior permanece visible. Desde Perfil puedes volver a pedidos, saldo y ajustes en cualquier momento."}},ar:{kicker:"دليل الهاتف",title:"ماذا تريد أن تفعل؟",text:"اختر مهمة وسنعرض فقط الأزرار اللازمة على الشاشة الفعلية.",duration:"3–4 خطÙ
2ˆØ§Øª قصيرة · يمكنك الخروج في أي وقت",buyTitle:"البحث والشراء",buyText:"البحث والدليل والسلة",sellTitle:"النشر والبيع",sellText:"الإعلان والطلبات والاستعداد للبيع",accountTitle:"إدارة الحساب",accountText:"الطلبات والرصيد والعناوين والأمان",chooseAnother:"اختيار مسار آخر",routeLabels:{buy:"الشراء",sell:"البيع",account:"الملف الشخصي"},accountStart:{target:"profile",title:"الملف الشخصي موجود دائمًا في الأسفل",text:"تبقى القائمة السفلية ظاهرة. استخدم الملف الشخصي للعودة إلى الطلبات والرصيد والإعدادات في أي وقت."}},zh:{kicker:"手机使用指南",title:"你想完成什么?",text:"选择一项任务,我们只在真实页面上指出所需按钮。",duration:"3–4 个简短步骤 · 可随时退出",buyTitle:"查找并购买",buyText:"搜索、目录和购物车",sellTitle:"发布并出售",sellText:"广告、订单和销售准备",accountTitle:"管理账户",accountText:"订单、余额、地址和安全",chooseAnother:"选择其他路线",routeLabels:{buy:"è´­ä¹°",sell:"出售",account:"个人资料"},accountStart:{target:"profile",title:"个人资料始终位于底部",text:"底部菜单会一直显示。你可以随时通过“个人资料”返回订单、余额和设置。"}},tr:{kicker:"Mobil rehber",title:"Ne yapmak istiyorsunuz?",text:"Bir görev seçin; gerçek ekranda yalnızca gereken düğmeleri gösterelim.",duration:"3–4 kısa adım · istediğiniz zaman çıkın",buyTitle:"Bul ve satın al",buyText:"Arama, katalog ve sepet",sellTitle:"Yayınla ve sat",sellText:"İlan, siparişler ve satış hazırlığı",accountTitle:"Hesabımı yönet",accountText:"Siparişler, bakiye, adresler ve güvenlik",chooseAnother:"Başka rota",routeLabels:{buy:"Satın alma",sell:"Satış",account:"Profil"},accountStart:{target:"profile",title:"Profil her zaman altta",text:"Alt menü ekranda kalır. Siparişlere, bakiyeye ve ayarlara istediğiniz zaman Profil üzerinden dönün."}}},go={ru:{profileEyebrow:"Помощь по профилю",profilePromptTitle:"Познакомиться с профилем?",profilePromptText:"Покажем, где управлять объявлениями, заказами, выплатами и адресами.",profilePromptStart:"Показать подсказки",profilePromptDismiss:"Не сейчас",profileHelpButton:"Как пользоваться меню",profileSteps:[{target:"profile-overview",title:"Ваш профиль",text:"Имя, баланс, объявления и сообщения."},{target:"profile-sections",title:"Разделы профиля",text:"На телефоне нужный раздел открывается через список «Раздел профиля»."},{target:"profile-orders",title:"Заказы",text:"Подтверждайте продажи и следите за доставкой."},{target:"profile-balance",title:"Баланс",text:"Операции и IBAN для получения выплат."},{target:"profile-settings",title:"Настройки",text:"Адреса доставки и забора, безопасность аккаунта."},{target:"profile-help",title:"Помощь всегда рядом",text:"Эта кнопка снова запускает подсказки. Остальные ответы находятся в Центре помощи."}]},en:{profileEyebrow:"Profile help",profilePromptTitle:"Take a tour of your profile?",profilePromptText:"See where to manage listings, orders, payouts, and addresses.",profilePromptStart:"Show profile tips",profilePromptDismiss:"Not now",profileHelpButton:"How to use the menu",profileSteps:[{target:"profile-overview",title:"Your account overview",text:"Find your account details and quick indicators here: balance, active listings, and unread messages."},{target:"profile-sections",title:"All profile sections",text:"Switch between listings, analytics, notifications, favorites, archive, and security. On mobile, use the Profile section list."},{target:"profile-orders",title:"Purchases, sales, and deals",text:"Orders contains purchases, sales, and Deal orders. Sellers confirm new requests and follow their status here."},{target:"profile-balance",title:"Balance and payouts",text:"Open Balance to review money movements, top-ups, and payouts. Sellers also add their payout IBAN here."},{target:"profile-settings",title:"Addresses and selling readiness",text:"Settings contains the buyer delivery address, seller pickup address, delivery methods, profile details, and security."},{target:"profile-help",title:"Help is always available",text:"Use this button to replay the profile tips. The Help Center next to it covers other Freezoni features."}]},ka:{profileEyebrow:"პროფილის დახმარება",profilePromptTitle:"გაეცნოთ თქვენს პროფილს?",profilePromptText:"ნახეთ, სად მართოთ განცხადებები, შეკვეთები, გადახდები და მისამართები.",profilePromptStart:"მინიშნებების ჩვენება",profilePromptDismiss:"ახლა არა",profileHelpButton:"მენიუს გამოყენება",profileSteps:[{target:"profile-overview",title:"თქვენი ანგარიშის მიმოხილვა",text:"აქ არის ანგარიშის მონაცემები და სწრაფი მაჩვენებლები: ბალანსი, აქტიური განცხადებები და წაუკითხავი შეტყობინებები."},{target:"profile-sections",title:"პროფილის ყველა განყოფილება",text:"გადაერთეთ განცხადებებს, ანალიტიკას, შეტყობინებებს, რჩეულებს, არქივსა და უსაფრთხოებას შáƒ
2áƒ áƒ˜áƒ¡. ტელეფონზე გამოიყენეთ პროფილის განყოფილებების სია."},{target:"profile-orders",title:"შესყიდვები, გაყიდვები და გარიგებები",text:"შეკვეთებშია შესყიდვები, გაყიდვები და Deal-შეკვეთები. აქ გამყიდველი ადასტურებს ახალ მოთხოვნებს და აკვირდება სტატუსს."},{target:"profile-balance",title:"ბალანსი და ჩარიცხვები",text:"ბალანსში ნახავთ თანხის მოძრაობას, შევსებებსა და ჩარიცხვებს. გამყიდველი აქვე ამატებს IBAN-ს."},{target:"profile-settings",title:"მისამართები და გაყიდვისთვის მზადყოფნა",text:"პარამეტრებში ივსება მყიდველის მიწოდების მისამართი, გამყიდველის გატანის მისამართი, მიწოდების გზები და უსაფრთხოება."},{target:"profile-help",title:"დახმარება ყოველთვის ხელმისაწვდომია",text:"ამ ღილაკით პროფილის მინიშნებებს ხელახლა გაუშვებთ. გვერდით მდებარე დახმარების ცენტრი Freezoni-ს სხვა ფუნქციებს ხსნის."}]},de:{profileEyebrow:"Profilhilfe",profilePromptTitle:"Möchten Sie Ihr Profil kennenlernen?",profilePromptText:"Sehen Sie, wo Sie Anzeigen, Bestellungen, Auszahlungen und Adressen verwalten.",profilePromptStart:"Profilhinweise zeigen",profilePromptDismiss:"Nicht jetzt",profileHelpButton:"Menü-Anleitung",profileSteps:[{target:"profile-overview",title:"Ihre Übersicht",text:"Hier finden Sie Kontodaten und Schnellwerte: Guthaben, aktive Anzeigen und ungelesene Nachrichten."},{target:"profile-sections",title:"Alle Profilbereiche",text:"Wechseln Sie zwischen Anzeigen, Statistiken, Benachrichtigungen, Favoriten, Archiv und Sicherheit. Mobil nutzen Sie die Bereichsliste."},{target:"profile-orders",title:"Käufe, Verkäufe und Geschäfte",text:"Bestellungen bündelt Käufe, Verkäufe und Deal-Aufträge. Verkäufer bestätigen hier neue Anfragen und verfolgen den Status."},{target:"profile-balance",title:"Guthaben und Auszahlungen",text:"Unter Guthaben sehen Sie Geldbewegungen, Aufladungen und Auszahlungen. Verkäufer hinterlegen hier auch ihre IBAN."},{target:"profile-settings",title:"Adressen und Verkaufsbereitschaft",text:"In den Einstellungen pflegen Sie Lieferadresse, Abholadresse, Versandarten, Profildaten und Sicherheit."},{target:"profile-help",title:"Hilfe bleibt erreichbar",text:"Mit dieser Schaltfläche starten Sie die Profilhinweise erneut. Das Hilfe-Center daneben erklärt weitere Freezoni-Funktionen."}]},fr:{profileEyebrow:"Aide du profil",profilePromptTitle:"Découvrir votre profil ?",profilePromptText:"Repérez où gérer les annonces, commandes, versements et adresses.",profilePromptStart:"Afficher les conseils",profilePromptDismiss:"Pas maintenant",profileHelpButton:"Guide du menu",profileSteps:[{target:"profile-overview",title:"Votre aperçu",text:"Retrouvez ici les données du compte et les indicateurs rapides : solde, annonces actives et messages non lus."},{target:"profile-sections",title:"Toutes les sections",text:"Passez des annonces aux statistiques, notifications, favoris, archives et à la sécurité. Sur mobile, utilisez la liste des sections."},{target:"profile-orders",title:"Achats, ventes et transactions",text:"Les commandes regroupent achats, ventes et commandes Deal. Les vendeurs y confirment les demandes et suivent leur statut."},{target:"profile-balance",title:"Solde et versements",text:"Ouvrez le solde pour consulter mouvements, recharges et versements. Les vendeurs y ajoutent aussi leur IBAN."},{target:"profile-settings",title:"Adresses et préparation à la vente",text:"Les réglages contiennent adresse de livraison, adresse de collecte, modes de livraison, profil et sécurité."},{target:"profile-help",title:"Une aide toujours accessible",text:"Ce bouton relance les conseils du profil. Le Centre d’aide voisin explique les autres fonctions de Freezoni."}]},es:{profileEyebrow:"Ayuda del perfil",profilePromptTitle:"¿Quieres conocer tu perfil?",profilePromptText:"Descubre dónde gestionar anuncios, pedidos, pagos y direcciones.",profilePromptStart:"Mostrar c
2onsejos",profilePromptDismiss:"Ahora no",profileHelpButton:"Guía del menú",profileSteps:[{target:"profile-overview",title:"Resumen de tu cuenta",text:"Aquí están los datos de la cuenta y los indicadores rápidos: saldo, anuncios activos y mensajes sin leer."},{target:"profile-sections",title:"Todas las secciones",text:"Cambia entre anuncios, estadísticas, notificaciones, favoritos, archivo y seguridad. En el móvil usa la lista de secciones."},{target:"profile-orders",title:"Compras, ventas y tratos",text:"Pedidos reúne compras, ventas y pedidos Deal. Los vendedores confirman solicitudes nuevas y siguen su estado aquí."},{target:"profile-balance",title:"Saldo y pagos",text:"Abre Saldo para revisar movimientos, recargas y pagos. Los vendedores también añaden aquí su IBAN."},{target:"profile-settings",title:"Direcciones y preparación para vender",text:"En Ajustes están la dirección de entrega, la recogida del vendedor, los métodos de envío, el perfil y la seguridad."},{target:"profile-help",title:"La ayuda siempre está disponible",text:"Este botón vuelve a iniciar los consejos del perfil. El Centro de ayuda contiguo explica otras funciones de Freezoni."}]},ar:{profileEyebrow:"مساعدة الملف الشخصي",profilePromptTitle:"هل تريد التعرف على ملفك الشخصي؟",profilePromptText:"تعرّف على أماكن إدارة الإعلانات والطلبات والمدفوعات والعناوين.",profilePromptStart:"عرض الإرشادات",profilePromptDismiss:"ليس الآن",profileHelpButton:"دليل القائمة",profileSteps:[{target:"profile-overview",title:"ملخص حسابك",text:"ستجد هنا بيانات الحساب والمؤشرات السريعة: الرصيد والإعلانات النشطة والرسائل غير المقروءة."},{target:"profile-sections",title:"جميع أقسام الملف",text:"تنقل بين الإعلانات والإحصاءات والإشعارات والمفضلة والأرشيف والأمان. على الهاتف استخدم قائمة أقسام الملف."},{target:"profile-orders",title:"المشتريات والمبيعات والصفقات",text:"يجمع قسم الطلبات المشتريات والمبيعات وطلبات Deal. يؤكد البائع الطلبات الجديدة ويتابع حالتها هنا."},{target:"profile-balance",title:"الرصيد والمدفوعات",text:"افتح الرصيد لمراجعة حركة الأموال وعمليات الشحن والمدفوعات. يضيف البائع أيضًا رقم IBAN هنا."},{target:"profile-settings",title:"العناوين والاستعداد للبيع",text:"تحتوي الإعدادات على عنوان توصيل المشتري وعنوان استلام البائع وطرق التوصيل وبيانات الملف والأمان."},{target:"profile-help",title:"المساعدة متاحة دائمًا",text:"يعيد هذا الزر تشغيل إرشادات الملف. يشرح مركز المساعدة المجاور بقية ميزات Freezoni."}]},zh:{profileEyebrow:"个人资料帮助",profilePromptTitle:"了解你的个人资料?",profilePromptText:"了解在哪里管理广告、订单、收款和地址。",profilePromptStart:"显示个人资料提示",profilePromptDismiss:"暂时不要",profileHelpButton:"菜单使用指南",profileSteps:[{target:"profile-overview",title:"账户概览",text:"这里显示账户资料和快捷数据:余额、有效广告及未读消息。"},{target:"profile-sections",title:"全部个人资料栏目",text:"可切换广告、统计、通知、收藏、归档和安全设置。手机端请使用“个人资料栏目”列表。"},{target:"profile-orders",title:"购买、销售和交易",text:"“订单”集中显示购买、销售和 Deal 订单。卖家在这里确认新请求并跟踪状态。"},{target:"profile-balance",title:"余额与收款",text:"打开余额可查看资金变动、充值和收款。卖家也在这里添加用于收款的 IBAN。"},{target:"profile-settings",title:"地址和销售准备",text:"设置中包含买家配送地址、卖家取件地址、配送方式、个人资料和安全选项。"},{target:"profile-help",title:"随时获得帮助",text:"使用此按钮可重新播放个人资料提示。旁边的帮助中心介绍 Freezoni 的其他功能。"}]},tr:{profileEyebrow:"Profil yardımı",profilePromptTitle:"Profilinizi tanımak ister misiniz?",profilePromptText:"İlanları, siparişleri, ödemeleri ve adresleri nereden yöneteceğinizi görün.",profilePromptStart:"Profil ipuçlarını göster",profilePromptDismiss:"Şimdi değil",profileHelpButton:"Menü rehberi",profileSteps:[{target:"profile-overview",title:"Hesap özetiniz",text:"Hesap bilgileri ve hızlı göstergeler burada: bakiye, aktif ilanlar ve okunmamış mesajlar."},{target:"profile-sections",title:"Tüm profil bölümleri",text:"İlanlar, istatistikler, bildirimler, favoriler, arşiv ve güvenlik arasında geçiş yapın. Telefonda profil bölümü listesini kullanın."},{target:"profile-orders",title:"Alışlar, satışlar ve işlemler",text:"Siparişler; alışları, satışları ve Deal siparişlerini toplar. Satıcılar yeni talepleri burada onaylar ve durumlarını izler."},{target:"profile-balance",title:"Bakiye ve ödemeler",text:"Para hareketlerini, yüklemeleri ve ödemeleri görmek için Bakiyeyi açın. Satıcılar ödeme IBAN’ını da buraya ekler."},{target:"profile-settings",title:"Adresler ve satışa hazırlık",text:"Ayarlar; alıcı teslimat adresini, satıcı teslim alma adresini, teslimat yöntemlerini, profil ve güvenliği içerir."},{target:"profile-help",title:"Yardım her zaman yakın",text:"Bu düğme profil ipuçlarını yeniden başlatır. Yanındaki Yardım Merkezi diğer Freezoni özelliklerini açıklar."}]}},bo=()=>"undefined"!=typeof window,xo=(e,t)=>`${e}:${String(t||"anonymous")}`,yo=e=>{const t=String(e||"ru").split("-")[0].toLowerCase(),n=mo[t]||mo.en,a=fo[t]||fo.en,r=go[t]||go.en,i=ho[t]||ho.en;return{...n,...r,mobileMenu:i,mobileBuyerSteps:n.buyerSteps,mobileSellerSteps:n.sellerSteps,mobileProfileRoutes:{buy:n.buyerSteps,sell:[n.sellerSteps[0],r.profileSteps[2],r.profileSteps[4],r.profileSteps[3]],account:[i.accountStart,r.profileSteps[2],r.profileSteps[3],r.profileSteps[4]]},duration:a.duration,welcomeText:a.welcomeText,helpText:a.helpText,helpButton:a.helpButton,buyerSteps:[n.buyerSteps[0],n.buyerSteps[1],a.buyerFavorites,a.buyerCompare,n.buyerSteps[2],a.buyerChats,a.buyerProfile],sellerSteps:[a.sellerHome,n.buyerSteps[1],n.buyerSteps[0],n.sellerSteps[0],n.sellerSteps[1],n.sellerSteps[2],a.sellerFavorites]}},_o=(e={})=>
2{if(bo())try{window.sessionStorage.setItem(co,JSON.stringify({source:"registration",createdAt:(new Date).toISOString(),...e}))}catch{}},wo=e=>{if(!bo())return!1;try{return!window.localStorage.getItem(xo(uo,e))&&!window.localStorage.getItem(xo(po,e))}catch{return!1}},vo=({userId:e,status:t="dismissed"}={})=>{if(bo())try{window.localStorage.setItem(xo(uo,e),JSON.stringify({status:t,updatedAt:(new Date).toISOString()}))}catch{}},jo=e=>"undefined"!=typeof crypto&&"function"==typeof crypto.randomUUID?`${e}:${crypto.randomUUID()}`:`${e}:${Date.now().toString(36)}-${Math.random().toString(36).slice(2,12)}`,ko=()=>jo("session"),zo=e=>"profile-admin"===e?"profile_admin":"profile"===e?"profile":"site",So=(e={})=>{const t={event_id:jo("event"),session_id:e.session_id||ko(),device_type:"undefined"==typeof window?"desktop":window.innerWidth<=767?"mobile":window.innerWidth<=1024?"tablet":"desktop",...e,metadata:{...e.metadata||{},pathname:"undefined"!=typeof window?window.location.pathname:void 0}};zn.post("/onboarding/events",t).catch(()=>{})},Eo={home:E,search:z,catalog:C,favorites:B,compare:D,cart:I,create:A,profile:T,chats:R,"profile-overview":T,"profile-sections":C,"profile-orders":$,"profile-balance":L,"profile-settings":P,"profile-help":N},Co="(max-width: 768px)",Ao=new Set(["profile-overview","profile-orders","profile-balance","profile-settings"]),Io=e=>{if(!e)return!1;const t=e.getBoundingClientRect(),n=window.getComputedStyle(e);return t.width>0&&t.height>0&&"none"!==n.display&&"hidden"!==n.visibility},To=e=>{if(!e)return 12;const t=document.querySelector(".fz-site-header");if(!Io(t))return 12;const n=t.getBoundingClientRect();return n.top<=12&&n.bottom>0?n.bottom+12:12},No=()=>{const{user:e,loading:t}=ba(),n=d(),{i18n:a}=v(),r=s.useMemo(()=>String(a.resolvedLanguage||a.language||"ru").split("-")[0].toLowerCase(),[a.resolvedLanguage,a.language]),i=s.useMemo(()=>yo(r),[r]),[o,l]=s.useState("closed"),[c,u]=s.useState("site"),[p,m]=s.useState(null),[f,h]=s.useState(null),[g,b]=s.useState(0),[x,y]=s.useState(null),[_,w]=s.useState(()=>"undefined"!=typeof window&&window.matchMedia(Co).matches),j=s.useRef(null),k=s.useRef(null),z=s.useRef(null),S=s.useRef(null),E=i.profileSteps||[],C=_?E.filter(e=>Ao.has(e.target)):E,N=i.mobileProfileRoutes?.[f]||[],P="profile"===c?_?N:C:"profile-admin"===c?_?N.filter(e=>!["profile-orders","profile-balance"].includes(e.target)):C.filter(e=>!["profile-orders","profile-balance"].includes(e.target)):"seller"===p?_?i.mobileSellerSteps:i.sellerSteps:_?i.mobileBuyerSteps:i.buyerSteps,L="tour"===o?P[g]:null,$=L&&Eo[L.target]||O;s.useEffect(()=>{const e=window.matchMedia(Co),t=e=>w(e.matches);return w(e.matches),e.addEventListener?.("change",t),()=>e.removeEventListener?.("change",t)},[]),s.useEffect(()=>{b(e=>Math.min(e,Math.max(0,P.length-1)))},[P.length]);const R=s.useCallback((t="site",n="manual")=>{if(!e?.id)return;const a=["profile","profile-admin"].includes(t)?t:"site";if(document.body.classList.contains("fz-welcome-active"))return window.clearTimeout(j.current),void(j.current=window.setTimeout(()=>R(a,n),450));z.current=document.activeElement,S.current=ko(),So({session_id:S.current,guide_key:zo(a),event_type:"opened",language:r,metadata:{source:n,replayed:"registration"!==n}}),u(a),m(null);const i=a.startsWith("profile")&&window.matchMedia(Co).matches,o="profile-admin"===a&&i?"account":null;h(o),b(0),y(null),l("site"===a?"intro":i&&!o?"mobile-menu":"tour")},[e?.id,r]),D=s.useCallback((t="skipped")=>{So({session_id:S.current||ko(),guide_key:zo(c),event_type:"completed"===t?"completed":"skipped",role:p,step_index:"tour"===o?g:null,step_key:"tour"===o?L?.target:null,language:r,metadata:{total_steps:P.length}}),c.startsWith("profile")?(({userId:e,status:t="completed"}={})=>{if(bo())try{const n=JSON.stringify({status:t,completedAt:(new Date).toISOString()});window.localStorage.setItem(xo(po,e),n),window.localStorage.setItem(xo(uo,e),n)}catch{}})({userId:e?.id,status:t}):(({role:e=null,status:t="completed"}={})=>{if(bo())try{window.localStorage.setItem("freezoni_onboarding_v1",JSON.stringify({version:1,role:e,status:t,completedAt:(new Date).toISOString()})),window.sessionStorage.removeItem(co)}catch{}})({role:p,status:t}),l("closed"),u("site"),m(null),h(null),b(0),y(null),S.current=null;const n=z.current;window.requestAnimationFrame(()=>n?.focus?.())},[c,p,e?.id,o,g,L?.target,P.length,r]);if(s.useEffect(()=>{!t&&e?.id&&"closed"===o&&(()=>{if(!bo())return!1;try{return Boolean(window.sessionStorage.getItem(co))}catch{return!1}})()&&R("site","registration")},[t,e?.id,o,n.pathname,R]),s.useEffect(()=>{const e=()=>R("site","replay"),t=e=>R(e.detail?.admin?"profile-admin":"profile","profile_help");return window.addEventListener(so,e),window.addEventListener(lo,t),()=>{window.removeEventListener(so,e),window.removeEventListener(lo,t),window.clearTimeout(j.current)}},[R]),s.useEffect(()=>{e?.id||"closed"===o||(l("closed"),u("site"),m(null),h(null),y(null))},[e?.id,o]),s.useEffect(()=>(document.body.classList.toggle("fz-first-run-guide-active","closed"!==o),document.body.classList.toggle("fz-first-run-guide-dialog-open","intro"===o),document.body.classList.toggle("fz-profile-first-run-guide-active","closed"!==o&&c.startsWith("profile")),()=>{document.body.classList.remove("fz-first-run-guide-active"),document.body.classList.remove("fz-first-run-guide-dialog-open"),document.body.classList.remove("fz-profile-first-run-guide-active")}),[o,c]),s.useEffect(()=>{if("closed"===o)return;const e=e=>{if("Escape"===e.key)return e.preventDefault(),void D("skipped");if("Tab"!==e.key)return;const t=k.current,n=t?Array.from(t.querySelectorAll('button:not([disabled]), a[href], input
2:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(Io):[];if(0===n.length)return e.preventDefault(),void t?.focus();const a=n[0],r=n[n.length-1];e.shiftKey&&document.activeElement===a?(e.preventDefault(),r.focus()):e.shiftKey||document.activeElement!==r||(e.preventDefault(),a.focus())};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[o,D]),s.useEffect(()=>{if("closed"===o)return;const e=window.requestAnimationFrame(()=>{const e=k.current,t=e?.querySelector("button:not([disabled])");(t||e)?.focus?.()});return()=>window.cancelAnimationFrame(e)},[o]),s.useEffect(()=>()=>z.current?.focus?.(),[]),s.useEffect(()=>{"tour"===o&&L&&So({session_id:S.current||ko(),guide_key:zo(c),event_type:"step_viewed",role:p,step_index:g,step_key:L.target,language:r,metadata:{total_steps:P.length}})},[o,c,p,g,L?.target,P.length,r]),s.useEffect(()=>{if("tour"!==o||!L)return;let e=0,t=0,n=!1,a=null,r="",i="",s=0;const l=()=>{a&&(a.style.scrollMarginTop=r,a.style.scrollMarginBottom=i,a=null)},d=()=>{window.cancelAnimationFrame(s),s=window.requestAnimationFrame(()=>{if(n)return;const o=(e=>{const t=Array.from(document.querySelectorAll(`[data-onboarding="${e}"]`)),n=window.matchMedia("(max-width: 768px)").matches,a=t.filter(Io);return n?a.find(e=>e.closest(".mobile-app-nav"))||a.find(e=>e.closest(".profile-mobile-hub"))||a.find(e=>e.closest(".profile-mobile-section-picker"))||a[0]||null:a.find(e=>!e.closest(".mobile-app-nav"))||a[0]||null})(L.target);if(!o)return void y(null);const s=o.getBoundingClientRect(),u=k.current?.getBoundingClientRect(),p=To(_),m=_&&u?u.top-16:window.innerHeight-12,f=_&&Boolean(o.closest(".mobile-app-nav")||o.closest(".fz-site-header"))?s.top<0||s.bottom>window.innerHeight:s.top<p||s.bottom>m;if(c.startsWith("profile")&&f&&t<2){t+=1,n=!0,y(null);const c=window.matchMedia("(prefers-reduced-motion: reduce)").matches,u=s.top+s.height/2,f=p+(m-p)/2;if(_){a!==o&&(l(),a=o,r=o.style.scrollMarginTop,i=o.style.scrollMarginBottom);const e=p+8,n=m-8,c=s.top<e?s.top-e:s.bottom>n?s.bottom-n:0,d="undefined"==typeof document?null:[document.scrollingElement,document.body,document.documentElement].find(e=>e&&e.scrollHeight>e.clientHeight+1)||document.scrollingElement||document.documentElement,u=Math.max(0,d.scrollTop+c);o.style.scrollMarginTop=`${Math.max(0,e)}px`,o.style.scrollMarginBottom=`${Math.max(0,window.innerHeight-n)}px`,Math.abs(c)>1?(d.scrollTop=u,Math.abs(d.scrollTop-u)>1&&window.scrollTo({top:u,behavior:"auto"})):o.scrollIntoView({block:1===t?"nearest":"start",inline:"nearest",behavior:"auto"})}else window.scrollBy({top:u-f,behavior:c?"auto":"smooth"});return void(e=window.setTimeout(()=>{n=!1,d()},c||_?120:360))}c.startsWith("profile")&&f?y(null):y({top:s.top,left:s.left,right:s.right,bottom:s.bottom,width:s.width,height:s.height})})};d();const u=window.setTimeout(d,180);return window.addEventListener("resize",d),window.addEventListener("scroll",d,!0),window.visualViewport?.addEventListener("resize",d),window.visualViewport?.addEventListener("scroll",d),()=>{window.cancelAnimationFrame(s),window.clearTimeout(e),window.clearTimeout(u),l(),window.removeEventListener("resize",d),window.removeEventListener("scroll",d,!0),window.visualViewport?.removeEventListener("resize",d),window.visualViewport?.removeEventListener("scroll",d)}},[o,L,c,_]),"closed"===o)return null;const B=e=>{So({session_id:S.current||ko(),guide_key:"site",event_type:"role_selected",role:e,language:r,metadata:{total_steps:"seller"===e?i.sellerSteps.length:i.buyerSteps.length}}),u("site"),m(e),b(0),l("tour")},W=_?(()=>{if("undefined"==typeof window||"undefined"==typeof document)return null;const e=document.querySelector(".mobile-app-nav"),t=Io(e)?e.getBoundingClientRect():null,n=t?.top??window.innerHeight,a=To(!0);return{"--fz-mobile-coach-bottom":`${Math.max(8,window.innerHeight-n+8)}px`,"--fz-mobile-coach-max-height":`${Math.max(180,Math.min(250,n-a-24))}px`}})():(e=>{if(!e||"undefined"==typeof window)return null;const t=Math.min(372,window.innerWidth-32);return{left:Math.max(16,Math.min(e.left+e.width/2-t/2,window.innerWidth-t-16)),top:e.bottom+16+290<=window.innerHeight-16?e.bottom+16:Math.max(16,e.top-290-16),width:t}})(x),H=(K=i.progress,q=g+1,G=P.length,String(K||"").replace("{{current}}",String(q)).replace("{{total}}",String(G)));var K,q,G;const Y=P.length>0?(g+1)/P.length*100:0,Z=x?{top:Math.max(4,x.top-6),left:Math.max(4,x.left-6),width:Math.min(window.innerWidth-Math.max(4,x.left-6)-4,x.width+12),height:Math.min(window.innerHeight-Math.max(4,x.top-6)-4,x.height+12)}:void 0;if("mobile-menu"===o){const e=i.mobileMenu,t=[{key:"buy",icon:I,title:e.buyTitle,text:e.buyText},{key:"sell",icon:A,title:e.sellTitle,text:e.sellText},{key:"account",icon:T,title:e.accountTitle,text:e.accountText}];
2return J.jsx("div",{className:"fz-first-run fz-first-run--mobile-menu",role:"presentation",children:J.jsxs("section",{ref:k,tabIndex:-1,className:"fz-first-run__mobile-menu",role:"dialog","aria-modal":"true","aria-labelledby":"fz-mobile-guide-title","aria-describedby":"fz-mobile-guide-description",children:[J.jsx("button",{type:"button",className:"fz-first-run__close",onClick:()=>D("skipped"),"aria-label":i.close,children:J.jsx(F,{size:20,"aria-hidden":"true"})}),J.jsxs("div",{className:"fz-first-run__mobile-menu-heading",children:[J.jsx("span",{className:"fz-first-run__mobile-menu-icon","aria-hidden":"true",children:J.jsx(O,{size:22})}),J.jsxs("div",{children:[J.jsx("span",{children:e.kicker}),J.jsx("h2",{id:"fz-mobile-guide-title",children:e.title})]})]}),J.jsx("p",{id:"fz-mobile-guide-description",className:"fz-first-run__mobile-menu-text",children:e.text}),J.jsx("div",{className:"fz-first-run__mobile-paths",children:t.map(({key:e,icon:t,title:n,text:a})=>J.jsxs("button",{type:"button",className:"fz-first-run__mobile-path","data-mobile-guide-path":e,onClick:()=>(e=>{const t=i.mobileProfileRoutes?.[e]||[];So({session_id:S.current||ko(),guide_key:zo(c),event_type:"role_selected",role:e,language:r,metadata:{total_steps:t.length,mobile_path:e}}),h(e),m("buy"===e?"buyer":"sell"===e?"seller":"account"),b(0),y(null),l("tour")})(e),children:[J.jsx("span",{className:"fz-first-run__mobile-path-icon","aria-hidden":"true",children:J.jsx(t,{size:21})}),J.jsxs("span",{children:[J.jsx("strong",{children:n}),J.jsx("small",{children:a})]}),J.jsx(M,{size:18,"aria-hidden":"true"})]},e))}),J.jsxs("div",{className:"fz-first-run__mobile-menu-duration",children:[J.jsx(V,{size:15,"aria-hidden":"true"})," ",e.duration]})]})})}return"intro"===o?J.jsx("div",{className:"fz-first-run fz-first-run--intro",role:"presentation",children:J.jsxs("div",{ref:k,tabIndex:-1,className:"fz-first-run__dialog",role:"dialog","aria-modal":"true","aria-labelledby":"fz-first-run-title",children:[J.jsx("button",{type:"button",className:"fz-first-run__close",onClick:()=>D("skipped"),"aria-label":i.close,children:J.jsx(F,{size:20,"aria-hidden":"true"})}),J.jsx("div",{className:"fz-first-run__mark","aria-hidden":"true",children:J.jsx(O,{size:25})}),J.jsx("div",{className:"fz-first-run__eyebrow",children:i.eyebrow}),J.jsx("h2",{id:"fz-first-run-title",className:"fz-first-run__title",children:i.welcomeTitle}),J.jsx("p",{className:"fz-first-run__text",children:i.welcomeText}),J.jsxs("div",{className:"fz-first-run__duration",children:[J.jsx(V,{size:15,"aria-hidden":"true"})," ",i.duration]}),J.jsxs("div",{className:"fz-first-run__roles",children:[J.jsxs("button",{type:"button",className:"fz-first-run__role",onClick:()=>B("buyer"),children:[J.jsx("span",{className:"fz-first-run__role-icon","aria-hidden":"true",children:J.jsx(I,{size:22})}),J.jsxs("span",{children:[J.jsx("strong",{children:i.buyer}),J.jsx("small",{children:i.buyerDescription})]}),J.jsx(M,{size:19,"aria-hidden":"true"})]}),J.jsxs("button",{type:"button",className:"fz-first-run__role",onClick:()=>B("seller"),children:[J.jsx("span",{className:"fz-first-run__role-icon","aria-hidden":"true",children:J.jsx(A,{size:22})}),J.jsxs("span",{children:[J.jsx("strong",{children:i.seller}),J.jsx("small",{children:i.sellerDescription})]}),J.jsx(M,{size:19,"aria-hidden":"true"})]})]}),J.jsx("button",{type:"button",className:"fz-first-run__skip",onClick:()=>D("skipped"),children:i.skip})]})}):J.jsxs("div",{className:`fz-first-run fz-first-run--tour${_?" fz-first-run--mobile":""}${c.startsWith("profile")?" fz-first-run--profile":""}`,"aria-live":"polite",children:[J.jsx("div",{className:"fz-first-run__backdrop","aria-hidden":"true"}),x&&J.jsx("div",{className:"fz-first-run__spotlight","data-target":L.target,style:Z,"aria-hidden":"true"}),J.jsxs("section",{ref:k,tabIndex:-1,className:"fz-first-run__coach"+(x?"":" fz-first-run__coach--centered"),style:W||void 0,role:"dialog","aria-modal":"true","aria-labelledby":"fz-first-run-step-title","aria-describedby":"fz-first-run-step-description",children:[J.jsx("button",{type:"button",className:"fz-first-run__close",onClick:()=>D("skipped"),"aria-label":i.close,children:J.jsx(F,{size:19,"aria-hidden":"true"})}),J.jsxs("div",{className:"fz-first-run__coach-heading",children:[J.jsx("span",{className:"fz-first-run__step-icon","aria-hidden":"true",children:J.jsx($,{size:20})}),J.jsxs("div",{children:[_&&f&&J.jsx("span",{className:"fz-first-run__route-label",children:i.mobileMenu.routeLabels[f]}),J.jsx("span",{className:"fz-first-run__progress",children:H}),J.jsx("h2",{id:"fz-first-run-step-title",className:"fz-first-run__coach-title",children:L.title})]})]}),J.jsx("p",{id:"fz-first-run-step-description",className:"fz-first-run__coach-text",children:L.text}),J.jsx("div",{className:"fz-first-run__progressbar",role:"progressbar","aria-label":H,"aria-valuemin":"1","aria-valuemax":P.length,"aria-valuenow":g+1,"aria-valuetext":H,children:J.jsx("span",{style:{width:`${Y}%`}})}),J.jsxs("div",{className:"fz-first-run__actions",children:[g>0?J.jsxs("button",{type:"button",className:"fz-first-run__button fz-first-run__button--secondary",onClick:()=>{So({session_id:S.current||ko(),guide_key:zo(c),event_type:"back",role:p,step_index:g,step_key:L?.target,language:r,metadata:{total_steps:P.length}}),y(null),b(e=>Math.max(0,e-1))},children:[J.jsx(U,{size:17,"aria-hidden":"true"})," ",i.back]}):J.jsx("button",{type:"button",className:"fz-first-run__button fz-first-run__button--secondary",onClick:_&&c.startsWith("profile")?()=>{l("mobile-menu"),h(null),b(0),y(null)}:()=>D("skipped"),children:_&&c.startsWith("profile")?i.mobileMenu.chooseAnother:i.skip}),J.jsxs("button",{type:"button",className:"fz-first-run__button fz-first-run__button--primary",onClick:()=>{So({session_id:S.current||ko(),guide_key:zo(c),event_type:"next",role:p,step_index:g,step_key:L?.target,language:r,metadata:{total_steps:P.length}}),g>=P.length-1?D("completed"):(y(null),b(e=>e+1))},children:[g===P.length-1?i.finish:i.next,g===P.length-1?J.jsx(V,{size:17,"aria-hidden":"true"}):J.jsx(M,{size:17,"aria-hidden":"true"})]})]})]})]})}
2,Po={ru:"Перейти к основному содержимому",en:"Skip to main content",ka:"მთავარ შინაარსზე გადასვლა",de:"Zum Hauptinhalt springen",fr:"Aller au contenu principal",es:"Ir al contenido principal",ar:"الانتقال إلى المحتوى الرئيسي",zh:"跳到主要内容",tr:"Ana içeriğe geç"},Lo=({children:e})=>{const t=d(),{i18n:n}=v(),a=s.useRef(null),r=s.useRef(t.pathname),i=String(n.resolvedLanguage||n.language||"ru").split("-")[0],o=Po[i]||Po.en;return s.useEffect(()=>{if(r.current===t.pathname)return;r.current=t.pathname;const e=window.requestAnimationFrame(()=>{a.current?.focus({preventScroll:!0})});return()=>window.cancelAnimationFrame(e)},[t.pathname]),J.jsxs(J.Fragment,{children:[J.jsx("a",{className:"fz-skip-link",href:"#main-content",children:o}),J.jsx(Dr,{}),J.jsx("main",{id:"main-content",ref:a,className:"app-main",tabIndex:-1,children:J.jsx("div",{className:"app-container",children:e||J.jsx(p,{})})}),J.jsx(Wr,{}),J.jsx(ro,{}),J.jsx(oo,{}),J.jsx(No,{})]})},$o=({children:e})=>{const{t:t}=v(),{user:n,loading:a}=ba(),r=d();if(a)return J.jsx("div",{style:{padding:"24px"},children:t("auth.loading")});if(!n){if(r.pathname.startsWith("/checkout/")&&(()=>{const e=wn(),t=Number(e?.role_level||0);return _n()&&(e?.is_superuser||t>=100||["owner","owner_superuser","superadmin"].includes(e?.role_name))})())return e;const t=encodeURIComponent(`${r.pathname}${r.search||""}`);return J.jsx(m,{to:`/login?next=${t}`,replace:!0,state:{from:r}})}if(("google"===n.auth_provider||Boolean(n.google_id))&&!0===n.requires_phone_verification&&"/verify-phone"!==r.pathname){const e=encodeURIComponent(`${r.pathname}${r.search||""}`);return J.jsx(m,{to:`/verify-phone?next=${e}`,replace:!0})}return e},Ro={siteName:"Freezoni",siteUrl:"undefined"!=typeof window&&"localhost"===window.location.hostname?"undefined"!=typeof window?window.location.origin:"http://localhost:5173":"https://freezoni.com",defaultTitle:"Freezoni — объявления в Грузии: авто, недвижимость, работа и услуги",siteDescription:"На Freezoni можно купить и продать товары, авто и недвижимость, найти услуги, работу, магазины и аукционы в Грузии.",defaultImage:"/og-image.png",twitterHandle:"@freezoni",apiUrl:"/api"},Do=new Set(["freezoni.com","www.freezoni.com"]),Bo="freezoni:seo-indexing-change",Oo="freezoni_seo_indexing_enabled",Fo=()=>{if("undefined"!=typeof window&&window.location?.hostname)return Do.has(window.location.hostname.toLowerCase());try{const e=new URL("https://freezoni.com").hostname;return Do.has(e.toLowerCase())}catch{return!1}},Mo=e=>!0===e||"true"===e||"1"===e,Vo=(e=!1,t=(()=>{const e=Fo();if("undefined"==typeof window)return e;if(void 0!==window.__FREEZONI_SEO_INDEXING_ENABLED__)return Mo(window.__FREEZONI_SEO_INDEXING_ENABLED__);try{const t=window.localStorage.getItem(Oo);return null===t?e:Mo(t)}catch{return e}})())=>e?"noindex, follow":Fo()&&t?"index, follow":"noindex, nofollow, noarchive",Uo=(e=!1)=>{const[t,n]=s.useState(()=>Vo(e));return s.useEffect(()=>{const t=()=>n(Vo(e));return t(),window.addEventListener(Bo,t),window.addEventListener("storage",t),()=>{window.removeEventListener(Bo,t),window.removeEventListener("storage",t)}},[e]),t},Wo={ru:["Каталог объявлений","Категории","Аукционы","Карта","Тарифы","Помощь"],en:["Listings","Categories","Auctions","Map","Pricing","Help"],ka:["განცხადებები","კატეგორიები","აუქციონები","რუკა","ტარიფები","დახმარება"]},Ho=["/ads","/categories","/auctions","/map","/pricing","/help"],Ko=({canonicalUrl:e,imageUrl:t,language:n,pageDescription:a,pageTitle:r})=>{const i=(e=>{const t=pt(e)||bt;return"zh"===t?"zh-CN":t})(n),o=(e=>Wo[e]||Wo.en||Wo.ru)(n);return[{"@context":"https://schema.org","@type":"Organization","@id":`${Ro.siteUrl}/#organization`,name:Ro.siteName,url:Ro.siteUrl,logo:`${Ro.siteUrl}/freezoni-logo.png`,image:t,email:"[email protected]",areaServed:{"@type":"Country",name:"Georgia"},contactPoint:{"@type":"ContactPoint",contactType:"customer support",email:"[email protected]",availableLanguage:it}},{"@context":"https://schema.org","@type":"WebSite","@id":`${Ro.siteUrl}/#website`,name:Ro.siteName,alternateName:["Freezoni Marketplace","Фризони"],url:Ro.siteUrl,publisher:{"@id":`${Ro.siteUrl}/#organization`},inLanguage:i,potentialAction:{"@type":"SearchAction",target:{"@type":"EntryPoint",urlTemplate:`${Ro.siteUrl}${Ct(n,"/ads")}?search={search_term_string}`},"query-input":"required name=search_term_string"}},{"@context":"https://schema.org","@type":"WebPage","@id":`${e}#webpage`,url:e,name:r,description:a,inLanguage:i,isPartOf:{"@id":`${Ro.siteUrl}/#website`},about:{"@id":`${Ro.siteUrl}/#organization`}
2,primaryImageOfPage:{"@type":"ImageObject",url:t,width:1200,height:630}},{"@context":"https://schema.org","@type":"ItemList","@id":`${Ro.siteUrl}/#site-navigation-${n}`,name:`${Ro.siteName} navigation`,itemListElement:Ho.map((e,t)=>({"@type":"SiteNavigationElement",position:t+1,name:o[t],url:`${Ro.siteUrl}${Ct(n,e)}`}))}]},qo=({title:e,description:t,image:n,path:a,type:r="website",noIndex:i=!1,jsonLd:o})=>{const s=d(),{i18n:l}=v(),c=kt(s.pathname)||pt(l.resolvedLanguage||l.language)||bt,u=/^https?:\/\//i.test(a||"")?St(s.pathname||"/"):St(a||s.pathname||"/"),p=(e=>e?e.includes(Ro.siteName)?e:`${e} — ${Ro.siteName}`:Ro.defaultTitle)(e),m=/^https?:\/\//i.test(a||"")?a:At(Ct(c,u),Ro.siteUrl),f=At(u,Ro.siteUrl),h=It(u,Ro.siteUrl),g=(e=>e?.startsWith("http")?e:`${Ro.siteUrl}${e||Ro.defaultImage}`)(n),b=(t||Ro.siteDescription).slice(0,160),x=Uo(i),y=Tt(c),_=it.filter(e=>e!==c).map(Tt),w=[...Ko({canonicalUrl:m,imageUrl:g,language:c,pageDescription:b,pageTitle:p}),...Array.isArray(o)?o:o?[o]:[]];return J.jsxs(nt,{htmlAttributes:{lang:c,dir:"ar"===c?"rtl":"ltr"},children:[J.jsx("title",{"data-freezoni-seo":"page",children:p}),J.jsx("meta",{name:"description",content:b,"data-freezoni-seo":"page"}),J.jsx("meta",{name:"robots",content:x,"data-freezoni-seo":"page"}),J.jsx("meta",{name:"author",content:Ro.siteName,"data-freezoni-seo":"page"}),J.jsx("link",{rel:"canonical",href:m,"data-freezoni-seo":"page"}),!i&&J.jsx("link",{rel:"alternate",hrefLang:"x-default",href:f,"data-freezoni-seo":"page"}),!i&&h.map(({hreflang:e,href:t})=>J.jsx("link",{rel:"alternate",hrefLang:e,href:t,"data-freezoni-seo":"page"},e)),J.jsx("meta",{property:"og:title",content:p}),J.jsx("meta",{property:"og:description",content:b}),J.jsx("meta",{property:"og:image",content:g}),J.jsx("meta",{property:"og:url",content:m}),J.jsx("meta",{property:"og:type",content:r}),J.jsx("meta",{property:"og:site_name",content:Ro.siteName}),J.jsx("meta",{property:"og:locale",content:y}),_.map(e=>J.jsx("meta",{property:"og:locale:alternate",content:e},e)),J.jsx("meta",{property:"og:image:width",content:"1200"}),J.jsx("meta",{property:"og:image:height",content:"630"}),J.jsx("meta",{name:"twitter:card",content:"summary_large_image"}),J.jsx("meta",{name:"twitter:site",content:Ro.twitterHandle}),J.jsx("meta",{name:"twitter:title",content:p}),J.jsx("meta",{name:"twitter:description",content:b}),J.jsx("meta",{name:"twitter:image",content:g}),J.jsx("script",{type:"application/ld+json",children:JSON.stringify(w)})]})},Go=Object.freeze({"/ads":{titleKey:"ads.all_ads",defaultTitle:"Listings in Georgia",defaultDescription:"Browse products, vehicles, real estate, jobs and services listed on Freezoni in Georgia."},"/catalog":{canonicalPath:"/ads",titleKey:"ads.all_ads",defaultTitle:"Listings in Georgia",defaultDescription:"Browse products, vehicles, real estate, jobs and services listed on Freezoni in Georgia."},"/categories":{titleKey:"allCategories.title",defaultTitle:"Marketplace categories",defaultDescription:"Explore every Freezoni category for goods, vehicles, property, jobs and services in Georgia."},"/auctions":{titleKey:"auction.auctions",defaultTitle:"Online auctions",defaultDescription:"Discover active online auctions and bid for goods on Freezoni."},"/pricing":{titleKey:"pricing.title",defaultTitle:"Freezoni plans and pricing",defaultDescription:"Compare Freezoni plans for private sellers and shops."},"/terms":{titleKey:"terms.title",defaultTitle:"Terms of use",defaultDescription:"Read the current terms governing use of the Freezoni marketplace."},"/privacy":{titleKey:"privacy.title",descriptionKey:"privacy.subtitle",defaultTitle:"Privacy policy",defaultDescription:"Learn how Freezoni collects, uses and protects personal data."},"/refund-policy":{defaultTitle:"Refund and chargeback policy",defaultDescription:"Read how Freezoni handles refunds, payment cancellations and chargebacks."},"/refund":{canonicalPath:"/refund-policy",defaultTitle:"Refund and chargeback policy",defaultDescription:"Read how Freezoni handles refunds, payment cancellations and chargebacks."},"/about":{defaultTitle:"About Freezoni",defaultDescription:"Learn about Freezoni, a multilingual marketplace built for Georgia."},"/contacts":{titleKey:"contacts.title",defaultTitle:"Contact Freezoni",defaultDescription:"Contact Freezoni support and find official marketplace contact information."},"/advertising":{titleKey:"advertising.heroTitle",defaultTitle:"Advertising on Freezoni",defaultDescription:"Promote a business or listing with advertising placements on Freezoni."},"/vacancies":{titleKey:"vacancies.title",defaultTitle:"Careers at Freezoni",defaultDescription:"View current vacancies and opportunities to work with Freezoni."},"/forum":{titleKey:"forum.title",defaultTitle:"Freezoni community forum",defaultDescription:"Ask questions and discuss marketplace topics with the Freezoni community."},"/map":{defaultTitle:"Listings map",defaultDescription:"Explore Freezoni listings by location on an interactive map."},"/help":{titleKey:"help.title",defaultTitle:"Freezoni help centre",defaultDescription:"Find answers about listings, accounts, payments and marketplace use."},"/legal":{defaultTitle:"Freezoni legal information",defaultDescription:"Review Freezoni legal documents and marketplace policies."},"/auctions/help":{defaultTitle:"How Freezoni auctions work",defaultDescription:"Learn how to participate safely in Freezoni auctions."}}),Jo=new Set(["/safe-deal","/shipping","/pvz","/how-to-order","/seller/dashboard"]),Yo=["/admin","/staff","/fz-","/login","/register","/ver
2ify-phone","/cart","/compare","/watchlist","/favorites","/history","/messages","/chats","/profile","/deals","/balance","/settings","/checkout","/payment","/promotions","/promote","/my","/invite","/employee","/auction"];function Zo(e,t,n){if(!t)return n;const a=e(t,{defaultValue:n});return"string"==typeof a&&a.trim()?a:n}function Qo(){const e=d(),{t:t}=v(),n=function(e="/"){const t=String(e||"/").split(/[?#]/,1)[0]||"/",n=Go[t];return n?{...n,canonicalPath:n.canonicalPath||t,noIndex:!1}:Jo.has(t)||Yo.some(e=>function(e,t){return"/fz-"===t?e.startsWith(t):e===t||e.startsWith(`${t}/`)}(t,e))?{canonicalPath:t,defaultTitle:"Freezoni account page",defaultDescription:"Private or transactional Freezoni page.",noIndex:!0}:/^\/ads\/create(?:\/|$)/.test(t)||/^\/ads\/[^/]+\/edit(?:\/|$)/.test(t)?{canonicalPath:t,defaultTitle:"Manage listing",defaultDescription:"Private listing management page.",noIndex:!0}:/^\/auctions\/(?:create|[^/]+\/(?:edit|payment))(?:\/|$)/.test(t)?{canonicalPath:t,defaultTitle:"Manage auction",defaultDescription:"Private auction management page.",noIndex:!0}:/^\/seller\/[^/]+$/.test(t)?{canonicalPath:t,defaultTitle:"Seller listings",defaultDescription:"Browse this seller’s active listings on Freezoni.",noIndex:!1}:/^\/shop\/[^/]+$/.test(t)?{canonicalPath:t,defaultTitle:"Shop on Freezoni",defaultDescription:"Browse products from this Freezoni shop.",noIndex:!1}:/^\/forum\/(?:search|topic\/[^/]+|[^/]+)$/.test(t)?{...Go["/forum"],canonicalPath:t,noIndex:!1}:null}(zt(e.pathname||"/"));if(!n)return null;const a=Zo(t,n.titleKey,n.defaultTitle),r=Zo(t,n.descriptionKey,n.defaultDescription);return J.jsx(qo,{title:a,description:r,path:n.canonicalPath,noIndex:n.noIndex})}const Xo=()=>{const{pathname:e,search:t,hash:n,state:a}=d(),r=Boolean(a?.skipScrollToTop);return s.useEffect(()=>{if(!("scrollRestoration"in window.history))return;const e=window.history.scrollRestoration;return window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration=e}},[]),s.useLayoutEffect(()=>{if(n)return;if(r)return;const e=()=>{window.scrollTo({top:0,left:0,behavior:"auto"}),document.documentElement.scrollTop=0,document.body.scrollTop=0};e();const t=window.requestAnimationFrame(e),a=window.setTimeout(e,80);return()=>{window.cancelAnimationFrame(t),window.clearTimeout(a)}},[e,t,n,r]),null},es=()=>(s.useEffect(()=>{(async()=>{try{const e=await zn.get("/settings/public"),t=e.data?.settings?.seo||{},n={meta_title:t.site_title||t.site_title||t["seo.site_name"],meta_description:t.site_description||t.site_description||t["seo.site_description"],meta_keywords:t.site_keywords||t.site_keywords};Object.prototype.hasOwnProperty.call(t,"seo.indexing_enabled")&&(e=>{if("undefined"==typeof window)return;const t=Boolean(e);window.__FREEZONI_SEO_INDEXING_ENABLED__=t;try{window.localStorage.setItem(Oo,String(t))}catch{}window.dispatchEvent(new CustomEvent(Bo,{detail:{enabled:t}}))})(Mo(t["seo.indexing_enabled"]));const a=Boolean(document.querySelector('[data-freezoni-seo="page"]'));if(!a&&n.meta_title&&(document.title=n.meta_title),!a&&n.meta_description){let e=document.querySelector('meta[name="description"]');e?e.setAttribute("content",n.meta_description):(e=document.createElement("meta"),e.name="description",e.content=n.meta_description,document.head.appendChild(e))}if(n.meta_keywords){let e=document.querySelector('meta[name="keywords"]');e?e.setAttribute("content",n.meta_keywords):(e=document.createElement("meta"),e.name="keywords",e.content=n.meta_keywords,document.head.appendChild(e))}}catch(e){}})()},[]),null),ts="freezoni_build_asset_recovery_reload",ns="freezoni-build-update-overlay",as=["freezoni-cache-","freezoni-runtime-"],rs=e=>{const t="undefined"!=typeof window?window.location.origin:"",n=String(e?.message||e?.reason?.message||e?.target?.src||e||"");return n.includes("Failed to fetch dynamically imported module")||n.includes("Importing a module script failed")||n.includes("Loading chunk")||n.includes("ChunkLoadError")||n.includes("error loading dynamically imported module")||/\/assets\/.+\.js(\?|$)/.test(n)&&(!t||n.includes(t))},is=async()=>
2{if("undefined"==typeof window||!("caches"in window))return;const e=await caches.keys();await Promise.all(e.filter(e=>as.some(t=>e.startsWith(t))).map(e=>caches.delete(e)))},os=async()=>{(()=>{if("undefined"==typeof document)return;if(document.getElementById(ns))return;const e=document.createElement("div");e.id=ns,e.setAttribute("role","status"),e.setAttribute("aria-live","polite"),e.innerHTML=`\n    <style>\n      #${ns} {\n        position: fixed;\n        inset: 0;\n        z-index: 2147483647;\n        display: grid;\n        place-items: center;\n        padding: 24px;\n        background:\n          radial-gradient(circle at top left, rgba(37, 99, 235, 0.14), transparent 32%),\n          linear-gradient(135deg, #f8fbff 0%, #eef6ff 48%, #ffffff 100%);\n        color: #0f172a;\n        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;\n      }\n\n      #${ns} .fz-update-card {\n        width: min(460px, 100%);\n        border: 1px solid rgba(37, 99, 235, 0.16);\n        border-radius: 18px;\n        background: rgba(255, 255, 255, 0.94);\n        box-shadow: 0 24px 80px rgba(15, 23, 42, 0.18);\n        padding: 32px;\n        text-align: center;\n      }\n\n      #${ns} .fz-update-mark {\n        width: 58px;\n        height: 58px;\n        margin: 0 auto 20px;\n        border-radius: 18px;\n        display: grid;\n        place-items: center;\n        background: linear-gradient(135deg, #1d4ed8, #38bdf8);\n        color: #ffffff;\n        font-size: 28px;\n        font-weight: 800;\n        letter-spacing: 0;\n      }\n\n      #${ns} .fz-update-title {\n        margin: 0 0 10px;\n        color: #020617;\n        font-size: 24px;\n        line-height: 1.2;\n        font-weight: 800;\n        letter-spacing: 0;\n      }\n\n      #${ns} .fz-update-message {\n        margin: 0;\n        color: #334155;\n        font-size: 16px;\n        line-height: 1.55;\n      }\n\n      #${ns} .fz-update-progress {\n        position: relative;\n        height: 8px;\n        margin: 24px 0 16px;\n        overflow: hidden;\n        border-radius: 999px;\n        background: #dbeafe;\n      }\n\n      #${ns} .fz-update-progress::after {\n        content: "";\n        position: absolute;\n        inset: 0 auto 0 0;\n        width: 42%;\n        border-radius: inherit;\n        background: linear-gradient(90deg, #2563eb, #06b6d4);\n        animation: fzUpdateProgress 1.15s ease-in-out infinite;\n      }\n\n      #${ns} .fz-update-hint {\n        margin: 0 0 20px;\n        color: #64748b;\n        font-size: 13px;\n        line-height: 1.45;\n      }\n\n      #${ns} .fz-update-actions {\n        display: flex;\n        justify-content: center;\n        gap: 10px;\n        flex-wrap: wrap;\n      }\n\n      #${ns} button {\n        min-height: 42px;\n        border-radius: 10px;\n        border: 1px solid #bfdbfe;\n        padding: 0 16px;\n        cursor: pointer;\n        font: inherit;\n        font-size: 14px;\n        font-weight: 700;\n      }\n\n      #${ns} .fz-update-refresh {\n        background: #2563eb;\n        border-color: #2563eb;\n        color: #ffffff;\n      }\n\n      #${ns} .fz-update-home {\n        background: #eff6ff;\n        color: #1e3a8a;\n      }\n\n      @keyframes fzUpdateProgress {\n        0% { transform: translateX(-110%); }\n        100% { transform: translateX(260%); }\n      }\n\n      :root[data-theme="dark"] #${ns},\n      :root[data-admin-theme="dark"] #${ns} {\n        background:\n          radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 32%),\n          linear-gradient(135deg, #020617 0%, #0f172a 58%, #111827 100%);\n        color: #e5e7eb;\n      }\n\n      :root[data-theme="dark"] #${ns} .fz-update-card,\n      :root[data-admin-theme="dark"] #${ns} .fz-update-card {\n        border-color: rgba(148, 163, 184, 0.22);\n        background: rgba(15, 23, 42, 0.94);\n        box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);\n      }\n\n      :root[data-theme="dark"] #${ns} .fz-update-title,\n      :root[data-admin-theme="dark"] #${ns} .fz-update-title {\n        color: #ffffff;\n      }\n\n      :root[data-theme="dark"] #${ns} .fz-update-message,\n      :root[data-admin-theme="dark"] #${ns} .fz-update-message {\n        color: #cbd5e1;\n      }\n\n      :root[data-theme="dark"] #${ns} .fz-update-hint,\n      :root[data-admin-theme="dark"] #${ns} .fz-update-hint {\n        color: #94a3b8;\n      }\n\n      :root[data-theme="dark"] #${ns} .fz-update-progress,\n      :root[data-admin-theme="dark"] #${ns} .fz-update-progress {\n        background: rgba(59, 130, 246, 0.2);\n      }\n\n      :root[data-theme="dark"] #${ns} .fz-update-home,\n      :root[data-admin-theme="dark"] #${ns} .fz-update-home {\n        background: rgba(37, 99, 235, 0.16);\n        color: #bfdbfe;\n      }\n\n      @media (prefers-color-scheme: dark) {\n        #${ns} {\n          background:\n            radial-gradient(circle at top left, rgba(56, 189, 248, 0.18), transparent 32%),\n            linear-gradient(135deg, #020617 0%, #0f172a 58%, #111827 100%);\n          color: #e5e7eb;\n        }\n\n        #${ns}
2 .fz-update-card {\n          border-color: rgba(148, 163, 184, 0.22);\n          background: rgba(15, 23, 42, 0.94);\n          box-shadow: 0 24px 80px rgba(0, 0, 0, 0.45);\n        }\n\n        #${ns} .fz-update-title {\n          color: #ffffff;\n        }\n\n        #${ns} .fz-update-message {\n          color: #cbd5e1;\n        }\n\n        #${ns} .fz-update-hint {\n          color: #94a3b8;\n        }\n\n        #${ns} .fz-update-progress {\n          background: rgba(59, 130, 246, 0.2);\n        }\n\n        #${ns} .fz-update-home {\n          background: rgba(37, 99, 235, 0.16);\n          color: #bfdbfe;\n        }\n      }\n    </style>\n    <div class="fz-update-card">\n      <div class="fz-update-mark">F</div>\n      <h1 class="fz-update-title">Сайт обновился</h1>\n      <p class="fz-update-message">Загружаем свежую версию Freezoni. Через пару секунд страница откроется заново.</p>\n      <div class="fz-update-progress" aria-hidden="true"></div>\n      <p class="fz-update-hint">Если обновление не началось автоматически, нажмите кнопку ниже.</p>\n      <div class="fz-update-actions">\n        <button class="fz-update-refresh" type="button" data-fz-refresh>Обновить сейчас</button>\n        <button class="fz-update-home" type="button" data-fz-home>На главную</button>\n      </div>\n    </div>\n  `;const t=()=>{document.body.appendChild(e),e.querySelector("[data-fz-refresh]")?.addEventListener("click",()=>{is().finally(()=>{window.location.reload()})}),e.querySelector("[data-fz-home]")?.addEventListener("click",()=>{is().finally(()=>{window.location.href="/"})})};document.body?t():window.addEventListener("DOMContentLoaded",t,{once:!0})})();let e=0;try{if(e=Number(sessionStorage.getItem(ts)||0),e&&Date.now()-e<6e4)return!1;sessionStorage.setItem(ts,Date.now().toString())}catch{}try{await is()}catch(n){}const t=new URL(window.location.href);return t.searchParams.set("_fz_reload",Date.now().toString()),window.location.replace(t.toString()),!0};class ss extends l.Component{constructor(e){super(e),a(this,"handleReload",()=>{is().catch(()=>{}).finally(()=>{const e=new URL(window.location.href);e.searchParams.set("_fz_reload",Date.now().toString()),window.location.replace(e.toString())})}),a(this,"handleRetry",()=>{this.setState({hasError:!1,error:null,errorInfo:null,isRecoveringBuildAsset:!1})}),a(this,"handleGoHome",()=>{window.location.href="/"}),this.state={hasError:!1,error:null,errorInfo:null,isRecoveringBuildAsset:!1}}static getDerivedStateFromError(e){return{hasError:!0,error:e,isRecoveringBuildAsset:rs(e)}}componentDidCatch(e,t){this.setState({errorInfo:t}),rs(e)&&os().catch(()=>{})}render(){const{t:e}=this.props;return this.state.hasError?this.state.isRecoveringBuildAsset?J.jsx("div",{style:ls.updateContainer,children:J.jsxs("div",{style:ls.updateCard,children:[J.jsx("div",{style:ls.updateMark,children:"F"}),J.jsx("h2",{style:ls.updateTitle,children:"Сайт обновился"}),J.jsx("p",{style:ls.updateMessage,children:"Загружаем свежую версию Freezoni. Через пару секунд страница откроется заново."}),J.jsx("div",{style:ls.updateProgress,children:J.jsx("div",{style:ls.updateProgressBar})}),J.jsx("p",{style:ls.updateHint,children:"Если обновление не началось автоматически, нажмите кнопку ниже."}),J.jsx("button",{onClick:this.handleReload,style:{...ls.button,...ls.primaryButton},children:"Обновить сейчас"}),J.jsx("style",{children:"@keyframes fzUpdateBoundaryProgress { 0% { transform: translateX(-110%); } 100% { transform: translateX(260%); } }"})]})}):this.props.fallback?this.props.fallback:J.jsx("div",{style:ls.container,children:J.jsxs("div",{style:ls.content,children:[J.jsx("div",{style:ls.icon,children:"⚠️"}),J.jsx("h2",{style:ls.title,children:e("errors.something_went_wrong")}),J.jsx("p",{style:ls.message,children:e("errorBoundary.unexpected_error_message")}),J.jsxs("div",{style:ls.buttons,children:[J.jsx("button",{onClick:this.handleRetry,style:{...ls.button,...ls.primaryButton},children:e("errorBoundary.try_again")}),J.jsx("button",{onClick:this.handleReload,style:{...ls.button,...ls.secondaryButton},children:e("errorBoundary.reload_page")}),J.jsx("button",{onClick:this.handleGoHome,style:{...ls.button,...ls.linkButton},children:e("errorBoundary.go_home")})]}),!1]})}):this.props.children}}const ls={container:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",padding:"40px 20px",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},content:{textAlign:"center",maxWidth:"500px"},updateContainer:{minHeight:"100vh",display:"grid",placeItems:"center",padding:"24px",background:"linear-gradient(135deg, #f8fbff 0%, #eef6ff 48%, #ffffff 100%)",fontFamily:'-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'},updateCard:{width:"min(460px, 100%)",textAlign:"center",border:"1px solid rgba(37, 99, 235, 0.16)",borderRadius:"18px",background:"rgba(255, 255, 255, 0.94)",boxShadow:"0 24px 80px rgba(15, 23, 42, 0.18)",padding:"32px"},updateMark:{width:"58px",height:"58px",margin:"0 auto 20px",borderRadius:"18px",display:"grid",placeItems:"center",background:"linear-gradient(135deg, #1d4ed8, #38bdf8)",color:"#ffffff",fontSize:"28px",fontWeight:"800",letterSpacing:0},updateTitle:{margin:"0 0 10px",color:"#020617",fontSize:"24px",lineHeight:"1.2",fontWeight:"800",letterSpacing:0},updateMessage:{margin:0,color:"#334155",fontSize:"16px",lineHeight:"1.55"},updateProgress:{height:"8px",margin:"24px 0 16px",overflow:"hidden",borderRadius:"999px",background:"#dbeafe"},updateProgressBar:{width:"42%",height:"100%",borderRadius:"999px",background:"linear-gradient(90deg, #2563eb, #06b6d4)",animation:"fzUpdateBoundaryProgress 1.15s ease-in-out infinite"},updateHint:{margin:"0 0 20px",color:"#64748b",fontSize:"13px",lineHeight:"1.45"},icon:{fontSize:"64px",marginBottom:"20px"},title:{fontSize:"24px",fontWeight:"600",color:"#1a1a1a",marginBottom:"12px"},message:{fontSize:"16px",color:"#666",marginBottom:"24px",lineHeight:"1.5"},buttons:{display:"flex",flexDirection:"column",gap:"12px",alignItems:"center"},button:{padding:"12px 24px",fontSize:"14px",fontWeight:"500",borderRadius:"8px",cursor:"pointer",border:"none",transition:"all 0.2s ease",minWidth:"200px"},primaryButton:{backgroundColor:"#2563eb",color:"white"},secondaryButton:{backgroundColor:"#f3f4f6",color:"#374151"},linkButton:{backgroundColor:"transparent",color:"#2563eb",textDecoration:"underline"}},cs=j()(ss),ds=e=>s.lazy(()=>e().catch(e=>{if(rs(e))return os().catch(()=>{}),new Promise(()=>{});throw e})),us="freezoni_banner_referral",ps=e=>{const t=parseInt(e,10);return Number.isFinite(t)&&t>0?t:null},ms=(e="")=>{if("undefined"==typeof window)return null;try{const t=new URLSearchParams(e||window.location.search),n=ps(t.get("fz_banner_id")||t.get("banner_placement_id"));if(!n)return fs();const a={bannerPlacementId:n,source:"banner_ad",createdAt:Date.now()};return sessionStorage.setItem(us,JSON.stringify(a)),a}catch{return null}},fs=()=>
2{if("undefined"==typeof window)return null;try{const e=sessionStorage.getItem(us);if(!e)return null;const t=JSON.parse(e),n=ps(t?.bannerPlacementId),a=parseInt(t?.createdAt,10)||0;return!n||Date.now()-a>18e5?(sessionStorage.removeItem(us),null):{bannerPlacementId:n,source:"banner_ad",createdAt:a}}catch{return sessionStorage.removeItem(us),null}},hs=Object.freeze({$:"USD","€":"EUR","£":"GBP","₾":"GEL","₺":"TRY","₽":"RUB","₸":"KZT","₴":"UAH",Br:"BYN"}),gs=Object.freeze({USD:"$",EUR:"€",GBP:"£",GEL:"₾",TRY:"₺",RUB:"₽",KZT:"₸",UAH:"₴",BYN:"Br"}),bs=/\b[A-Z]{3}\b/,xs=/^[A-Z]{3}$/,ys=new Set(Object.keys(gs)),_s=(e,t)=>{if(!e)return!1;return(t&&t.size>0?t:ys).has(e)},ws=(e,t={})=>{if(!e)return null;const n=t.supportedCodes?new Set(Array.from(t.supportedCodes).map(e=>String(e).toUpperCase())):null,a={...hs,...t.symbolToCode||{}},r=String(e).trim();if(!r)return null;const i=r.toUpperCase();if(xs.test(i)&&_s(i,n))return i;const o=i.match(bs);if(o&&_s(o[0],n))return o[0];if(a[r]&&_s(a[r],n))return a[r];for(const[s,l]of Object.entries(a))if(r.includes(s)&&_s(l,n))return l;return null},vs=(e,t="₾")=>{const n=ws(e);if(n&&gs[n])return gs[n];const a=String(e||"").trim();return Object.values(gs).includes(a)?a:t},js=e=>{const t=e&&"object"==typeof e?e.value??e.label:e,n=ws(t),a=n?gs[n]||n:String(t||"");return{value:a,label:e&&"object"==typeof e?e.label??(n?`${a} ${n}`:a):n?`${a} ${n}`:String(t||"")}},ks=s.createContext(null),zs={USD:{code:"USD",name:"US Dollar",symbol:"$",flag_emoji:"🇺🇸",symbol_position:"before",decimal_places:2,thousand_separator:",",decimal_separator:"."},EUR:{code:"EUR",name:"Euro",symbol:"€",flag_emoji:"🇪🇺",symbol_position:"before",decimal_places:2,thousand_separator:" ",decimal_separator:","},GEL:{code:"GEL",name:"Georgian Lari",symbol:"₾",flag_emoji:"🇬🇪",symbol_position:"after",decimal_places:2,thousand_separator:" ",decimal_separator:"."},RUB:{code:"RUB",name:"Russian Ruble",symbol:"₽",flag_emoji:"🇷🇺",symbol_position:"after",decimal_places:2,thousand_separator:" ",decimal_separator:","},GBP:{code:"GBP",name:"British Pound",symbol:"£",flag_emoji:"🇬🇧",symbol_position:"before",decimal_places:2,thousand_separator:",",decimal_separator:"."},TRY:{code:"TRY",name:"Turkish Lira",symbol:"₺",flag_emoji:"🇹🇷",symbol_position:"after",decimal_places:2,thousand_separator:".",decimal_separator:","}},Ss={"₾":"GEL","₽":"RUB",$:"USD","€":"EUR","£":"GBP","₺":"TRY"},Es="preferredCurrency",Cs="preferredCurrencySource",As="manual",Is="account",Ts="geo",Ns=new Set(["AD","AL","AT","BA","BE","BG","CY","DE","EE","ES","FI","FR","GR","HR","IE","IT","XK","LT","LU","LV","MC","ME","MK","MT","NL","PL","PT","RO","RS","SI","SK","SM","VA"]),Ps={GE:"GEL",RU:"RUB",AM:"AMD",AZ:"AZN",BY:"BYN",KZ:"KZT",UA:"UAH",TR:"TRY",GB:"GBP",CH:"CHF",US:"USD",CA:"CAD",MX:"MXN",BR:"BRL",CN:"CNY",JP:"JPY",KR:"KRW",IN:"INR",AE:"AED",IL:"ILS",AU:"AUD",NZ:"NZD",ZA:"ZAR"};function Ls(e){const t=String(e||"").trim().toUpperCase();return/^[A-Z]{2}$/.test(t)?Ps[t]?Ps[t]:Ns.has(t)?"EUR":null:null}function $s({children:e}){const t=s.useRef(zs),n=s.useRef(Ss),[a,r]=s.useState(Object.values(zs)),[i,o]=s.useState({EUR:{fromUsd:.92,toUsd:1.09},GEL:{fromUsd:2.74,toUsd:.36},RUB:{fromUsd:92.5,toUsd:.011},UAH:{fromUsd:41.5,toUsd:.024},BYN:{fromUsd:3.25,toUsd:.31},KZT:{fromUsd:450,toUsd:.0022},GBP:{fromUsd:.79,toUsd:1.27},TRY:{fromUsd:32.5,toUsd:.031}}),[l,c]=s.useState(()=>{const e=localStorage.getItem(Es);return e&&zs[e]?zs[e]:zs.USD}),[d,u]=s.useState(!0),[p,m]=s.useState(!1),f=s.useCallback(e=>ws(e,{supportedCodes:Object.keys(t.current),symbolToCode:n.current}),[]),h=s.useCallback((e,n=As)=>{const a=f(e)||String(e||"").trim().toUpperCase(),r=t.current[a];return r?(c(r),localStorage.setItem(Es,r.code),n&&localStorage.setItem(Cs,n),r.code):null},[f]),g=s.useCallback((e=[])=>{for(const n of e){const e=f(n);if(e&&t.current[e])return e}return null},[f]);s.useEffect(()=>{(async()=>{try{const e=await zn.get("/currency");if(e.data.success&&e.data.currencies?.length>0){const a={};e.data.currencies.forEach(e=>
2{a[e.code]={code:e.code,name:e.name,name_ru:e.name_ru,symbol:e.symbol,flag_emoji:e.flag_emoji||"",symbol_position:e.symbol_position||"before",decimal_places:e.decimal_places??2,thousand_separator:e.thousand_separator||" ",decimal_separator:e.decimal_separator||"."}}),t.current=a,n.current=function(e){const t={...Ss};return Object.values(e).forEach(e=>{!e.symbol||["kr"].includes(e.symbol)||t[e.symbol]||(t[e.symbol]=e.code)}),t}(a),r(Object.values(a));const i=localStorage.getItem(Es);i&&a[i]?c(a[i]):a.USD&&c(e=>a[e.code]||a.USD)}}catch(e){}try{const e=await zn.get("/currency/rates");if(e.data.success&&e.data.rates&&Object.keys(e.data.rates).length>0){const t=e.data.rates,n={};for(const[e,a]of Object.entries(t))"number"==typeof a?n[e]={fromUsd:a,toUsd:a>0?1/a:0}:a&&"object"==typeof a&&(n[e]={fromUsd:"number"==typeof a.fromUsd?a.fromUsd:"number"==typeof a.rate?a.rate:1,toUsd:"number"==typeof a.toUsd?a.toUsd:a.fromUsd>0?1/a.fromUsd:1});o(e=>({...e,...n}))}}catch(e){}u(!1)})()},[]),s.useEffect(()=>{if(d)return;let e=!1;const t=(t,n)=>e?null:h(t,n);return(async()=>{try{const e=localStorage.getItem(Es),a=localStorage.getItem(Cs);try{const e=await zn.get("/auth/session",{__skipAuthRefresh:!0}),n=e.data.user?.preferred_currency;if(n&&t(n,Is))return void m(!0)}catch(n){}if(e&&(a===As||a===Is)&&t(e,a||As))return void m(!0);try{const e=await zn.get("/geo/detect"),a=e.data.currency||e.data.geo?.currency,r=e.data.country_code||e.data.country||e.data.geo?.country||e.data.geo?.country_code||e.data.matched_country?.code,i=g([Ls(r),a]);if(i&&t(i,Ts))return void m(!0);if(r)try{const e=await zn.get(`/currency/by-country/${r}`),n=e.data.currency?.code;if(n&&t(n,Ts))return void m(!0)}catch(n){}}catch(n){}if(e&&t(e,a||Ts))return void m(!0);t("USD",Ts)}catch(a){}finally{e||m(!0)}})(),()=>{e=!0}},[d,h,g]);const b=s.useCallback(async e=>{const t=h(e,As);if(t)try{await zn.put("/profile/currency",{currency:t})}catch(n){try{await zn.put("/currency/preference",{currency:t})}catch(a){}}},[h]),x=s.useCallback(e=>{if(!e||isNaN(parseFloat(e)))return 0;const t=parseFloat(e),n=l.code;if("USD"===n)return t;const a=i[n];return a&&"number"==typeof a.fromUsd&&!isNaN(a.fromUsd)?t*a.fromUsd:a&&"number"==typeof a&&!isNaN(a)?t*a:t},[l,i]),y=s.useCallback(e=>{if(!e||isNaN(parseFloat(e)))return 0;const t=parseFloat(e),n=l.code;if("USD"===n)return t;const a=i[n];return a&&"number"==typeof a.toUsd&&!isNaN(a.toUsd)?t*a.toUsd:a&&"number"==typeof a&&!isNaN(a)?t/a:t},[l,i]),_=s.useCallback((e,t,n,a)=>{const r=e.toFixed(t).split(".");return r[0]=r[0].replace(/\B(?=(\d{3})+(?!\d))/g,n),r.join(a)},[]),w=s.useCallback(e=>{if("USD"===e)return 1;const t=i[e];return t&&"number"==typeof t.toUsd&&!isNaN(t.toUsd)?t.toUsd:t&&"number"==typeof t&&!isNaN(t)&&t>0?1/t:null},[i]),v=s.useCallback(e=>{if("USD"===e)return 1;const t=i[e];return t&&"number"==typeof t.fromUsd&&!isNaN(t.fromUsd)?t.fromUsd:t&&"number"==typeof t&&!isNaN(t)?t:null},[i]),j=s.useCallback((e,n={})=>{if(null==e)return"—";const{showSymbol:a=!0,forceDecimals:r=null,forceCurrency:i=null,sourceCurrency:o=null}=n,s=i?f(i):null,c=s&&t.current[s]||l,d=parseFloat(e);if(isNaN(d))return"—";const u=o?f(o):null;let p;if(u&&u===c.code)p=d;else if(u&&"USD"!==u){const e=w(u);if(null!==e){const t=d*e;if("USD"===c.code)p=t;else{const e=v(c.code);p=null!==e?t*e:t}}else p=d}else if("USD"===c.code)p=d;else{const e=v(c.code);p=null!==e?d*e:d}isNaN(p)&&(p=d);const{symbol:m,symbol_position:h,decimal_places:g,thousand_separator:b,decimal_separator:x}=c,y=_(p,null!==r?r:g,b,x);return a?"before"===h?`${m}${y}`:`${y} ${m}`:y},[l,i,_,w,v,f]),k=s.useCallback((e,t={})=>{if(null==e)return"—";const{showSymbol:n=!0,forceDecimals:a=2}=t,r=parseFloat(e),i=_(r,a,",",".");return n?`$${i}`:i},[_]),z=s.useCallback(()=>l.symbol,[l]),S=s.useCallback(()=>l.code,[l]),E={currency:l,currencies:a,rates:i,loading:d,userLoaded:p,setCurrency:b,formatPrice:j,formatUsd:k,convertFromUsd:x,convertToUsd:y,getCurrencySymbol:z,getCurrencyCode:S,SUPPORTED_CURRENCIES:t.current,normalizeCurrencyCode:f};return J.jsx(ks.Provider,{value:E,children:e})}function Rs(){const e=s.useContext(ks);if(!e)throw new Error("useCurrency must be used within a CurrencyProvider");return e}const Ds="/api",Bs=s.createContext(null),Os=()=>{const e=s.useContext(Bs);if(!e)throw new Error("useWatchlist must be used within WatchlistProvider");return e},Fs=({children:e})=>{const{user:t,token:n}=ba(),[a,r]=s.useState([]),[i,o]=s.useState([]),[l,c]=s.useState({total:0,active:0,ending_soon:0,ending_critical:0,ended:0,winning:0}),[d,u]=s.useState(!1),[p,m]=s.useState(null),f=s.useCallback(()=>{const e=n||localStorage.getItem("token");return e?{Authorization:`Bearer ${e}`}:{}},[n]),h=s.useCallback(async()=>
2{if(!t)return r([]),o([]),void c({total:0,active:0,ending_soon:0,ending_critical:0,ended:0,winning:0});u(!0),m(null);try{const e=await k.get(`${Ds}/auctions/my/watching`,{headers:f()});if(e.data.success){const n=e.data.auctions||[];r(n.map(e=>e.id)),o(n);const a={total:n.length,active:0,ending_soon:0,ending_critical:0,ended:0,winning:0};n.forEach(e=>{const n=["active","finishing"].includes(e.status),r=["sold","ended","completed"].includes(e.status),i=e.seconds_remaining||0;n&&(a.active++,i>0&&i<3600&&a.ending_soon++,i>0&&i<900&&a.ending_critical++),r&&a.ended++,e.current_bidder_id===t.id&&a.winning++}),c(a)}}catch(e){m(y.t("watchlist.loadError"))}finally{u(!1)}},[t,f]);s.useEffect(()=>{h()},[h]);const g=s.useCallback(e=>a.includes(parseInt(e)),[a]),b=s.useCallback(async(e,n={})=>{if(!t)return window.dispatchEvent(new CustomEvent("show-login-modal")),!1;try{return await k.post(`${Ds}/auctions/${e}/watch`,{settings:n},{headers:f()}),r(t=>[...t,parseInt(e)]),await h(),window.dispatchEvent(new CustomEvent("watchlist-updated",{detail:{action:"add",auctionId:e}})),!0}catch(a){return!1}},[t,f,h]),x=s.useCallback(async e=>{if(!t)return!1;try{return await k.delete(`${Ds}/auctions/${e}/watch`,{headers:f()}),r(t=>t.filter(t=>t!==parseInt(e))),o(t=>t.filter(t=>t.id!==parseInt(e))),c(e=>({...e,total:Math.max(0,e.total-1)})),window.dispatchEvent(new CustomEvent("watchlist-updated",{detail:{action:"remove",auctionId:e}})),!0}catch(n){return!1}},[t,f]),_=s.useCallback(async e=>g(e)?await x(e):await b(e),[g,b,x]),w=s.useCallback(async(e,n)=>{if(!t)return!1;try{return await k.put(`${Ds}/auctions/${e}/watch/settings`,{settings:n},{headers:f()}),!0}catch(a){return!1}},[t,f]),v=s.useCallback(async e=>{if(!t||!e.length)return!1;try{return await Promise.all(e.map(e=>k.delete(`${Ds}/auctions/${e}/watch`,{headers:f()}))),r(t=>t.filter(t=>!e.includes(t))),o(t=>t.filter(t=>!e.includes(t.id))),await h(),!0}catch(n){return!1}},[t,f,h]),j={watchlistIds:a,watchlistData:i,stats:l,loading:d,error:p,isInWatchlist:g,addToWatchlist:b,removeFromWatchlist:x,toggleWatchlist:_,updateWatchSettings:w,bulkRemove:v,refresh:h};return J.jsx(Bs.Provider,{value:j,children:e})},Ms=()=>{const{t:e,i18n:t}=v(),{showCityModal:n,setShowCityModal:a,location:r,countries:i,popularCities:o,updateLocation:c,setSelectedDistrict:d,setSelectedMetro:u}=Va(),p=e=>{if(!e)return"";const n=t.language;return"en"===n&&e.name_en?e.name_en:"ka"===n&&e.name_ka?e.name_ka:e.name||e.name_en||""},[m,h]=s.useState(""),[g,b]=s.useState([]),[x,y]=s.useState(!1),[_,w]=s.useState(null),[j,k]=s.useState([]),[z,S]=s.useState(null),[E,C]=s.useState([]),[A,I]=s.useState(null),[T,N]=s.useState([]),[P,L]=s.useState(null),[$,R]=s.useState([]),[D,B]=s.useState([]),[O,F]=s.useState(null),[M,V]=s.useState(!1),[U,W]=s.useState(!1),[H,K]=s.useState(!1),q=s.useRef(null),G=s.useRef(null),Y=s.useRef(null);s.useEffect(()=>
2{if(n){if(h(""),b([]),r?.city_id&&(S({id:r.city_id,name:r.city_name,name_en:r.city_name_en}),Q(r.city_id)),r?.country_code){const e=i.find(e=>e.code===r.country_code);e&&(w(e),Z(e.code))}setTimeout(()=>q.current?.focus(),80)}},[n]),s.useEffect(()=>{if(clearTimeout(Y.current),m.trim()&&!(m.length<1))return Y.current=setTimeout(async()=>{y(!0);try{const e=await zn.get(`/geo/search?q=${encodeURIComponent(m)}&limit=10`),t=e.data?.results||[],n=new Set,a=t.filter(e=>{const t=`${e.type}|${e.name}|${e.parent_name||""}`;return!n.has(t)&&(n.add(t),!0)});b(a)}catch{b([])}finally{y(!1)}},250),()=>clearTimeout(Y.current);b([])},[m]);const Z=async(e,t=null)=>{V(!0);try{const n=(await zn.get(`/geo/cities?country=${e}&limit=200`)).data;let a=Array.isArray(n)?n:n?.cities||[];t&&!a.some(e=>e.id===t.id)&&(a=[t,...a]),k(a)}catch{k(t?[t]:[])}finally{V(!1)}},Q=async e=>{W(!0),C([]),R([]),B([]),N([]),I(null),L(null);try{const t=await zn.get(`/geo/districts?city_id=${e}`).catch(()=>({data:{districts:[]}}));C(t.data?.districts||[]);const n=await zn.get(`/geo/metro?city_id=${e}`).catch(()=>({data:{lines:[]}})),a=n.data?.lines||[];R(a),B(a)}finally{W(!1)}},X=e=>{w(e),S(null),I(null),L(null),F(null),C([]),N([]),R([]),B([]),Z(e.code)},ee=e=>{S(e),I(null),L(null),F(null),e.is_settlement||e.is_region?(C([]),N([]),R([]),B([])):Q(e.id)},te=(e,t=null)=>{if(e.country_code){const n=i.find(t=>t.code===e.country_code);n&&(_?.code!==n.code?(w(n),Z(n.code,t)):t&&k(e=>e.some(e=>e.id===t.id)?e:[t,...e]))}},ne=()=>{z&&(z.is_region?c({city_id:null,city_name:z.name,city_name_en:z.name_en||z.name,region_id:z.id,region_name:z.name,country_id:_?.id,country_code:_?.code,country_name:_?.name,country_name_en:_?.name_en,flag_emoji:_?.flag_emoji,is_from_ip:!1,is_region:!0}):z.is_settlement?c({city_id:null,city_name:z.name,city_name_en:z.name_en||z.name,country_id:_?.id,country_code:_?.code,country_name:_?.name,country_name_en:_?.name_en,flag_emoji:_?.flag_emoji,is_from_ip:!1,is_settlement:!0,settlement_id:z.id}):c({city_id:z.id,city_name:z.name,city_name_en:z.name_en||z.name,city_name_ka:z.name_ka||z.name_en||z.name,region_id:z.region_id,region_name:z.region_name,country_id:z.country_id||_?.id,country_code:z.country_code||_?.code,country_name:z.country_name||_?.name,country_name_en:z.country_name_en||_?.name_en,flag_emoji:z.flag_emoji||_?.flag_emoji,latitude:z.latitude,longitude:z.longitude,is_from_ip:!1})),d(A||null),u(O||null),a(!1)},ae=()=>{r&&a(!1)};if(s.useEffect(()=>{const e=e=>{"Escape"===e.key&&ae()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[r]),s.useEffect(()=>{if(z&&!M&&G.current){const e=G.current.querySelector(".cm-item.active");e&&e.scrollIntoView({block:"center",behavior:"smooth"})}},[z,M]),!n)return null;const re=m.trim().length>=1,ie=_||j.length>0?j:o,oe={country:e("cityModal.badge_country","Страна"),region:e("cityModal.badge_region","Область"),city:e("cityModal.badge_city","Город"),metro:e("cityModal.badge_metro","Метро"),district:e("cityModal.badge_district","Район"),settlement:e("cityModal.badge_settlement","Нас. пункт")};return f.createPortal(J.jsx("div",{className:"cm-overlay",onClick:ae,children:J.jsxs("div",{className:"cm-menu",onClick:e=>e.stopPropagation(),children:[J.jsxs("div",{className:"cm-search",children:[J.jsx("span",{className:"cm-search-ico",children:"🔍"}),J.jsx("input",{ref:q,className:"cm-search-inp",type:"text",value:m,onChange:e=>h(e.target.value),placeholder:e("cityModal.search_placeholder","Страна, город, район, метро..."),autoComplete:"off"}),m?J.jsx("button",{className:"cm-search-clr",onClick:()=>h(""),children:"✕"}):r&&J.jsx("button",{className:"cm-search-clr",onClick:ne,children:"✕"})]}),re&&J.jsxs("div",{className:"cm-search-body",children:[x&&J.jsx("div",{className:"cm-spin-wrap",children:J.jsx("div",{className:"cm-spin"})}),!x&&0===g.length&&J.jsx("div",{className:"cm-empty",children:e("cityModal.not_found","Ничего не найдено — попробуйте на английском")}),!x&&g.map(e=>J.jsxs("button",{className:"cm-result",onClick:()=>(e=>{if("city"===e.type)te(e),ee({id:e.id,name:e.name,name_en:e.name_en}),h("");else if("country"===e.type){const t=i.find(t=>
2t.id===e.id)||{id:e.id,name:e.name,name_en:e.name_en};X(t),h("")}else if("region"===e.type)te(e),ee({id:e.id,name:e.name,name_en:e.name_en,is_region:!0}),h("");else if("metro"===e.type)te(e),F({id:e.id,name:e.name,name_en:e.name_en}),h("");else if("district"===e.type)te(e),e.parent_id&&ee({id:e.parent_id,name:e.parent_name,name_en:e.parent_name}),I({id:e.id,name:e.name,name_en:e.name_en}),h("");else if("settlement"===e.type){const t={id:e.id,name:e.name,name_en:e.name_en,is_settlement:!0,parent_name:e.parent_name};te(e,t),ee(t),h("")}})(e),children:[J.jsx("span",{className:"cm-result-ico",children:e.icon||("metro"===e.type?"🚇":"district"===e.type?"📍":"country"===e.type?"🌍":"🏙️")}),J.jsxs("span",{className:"cm-result-main",children:[J.jsx("span",{className:"cm-result-name",children:p(e)}),e.parent_name&&J.jsx("span",{className:"cm-result-sub",children:e.parent_name})]}),J.jsx("span",{className:`cm-badge cm-badge--${e.type}`,children:oe[e.type]||e.type})]},`${e.type}-${e.id}`))]}),!re&&J.jsxs("div",{className:"cm-cols",children:[J.jsxs("div",{className:"cm-col",children:[J.jsxs("div",{className:"cm-col-head",children:["🌍 ",e("cityModal.col_country","Страна")]}),J.jsx("div",{className:"cm-col-body",children:i.map(e=>J.jsxs("button",{className:"cm-item"+(_?.code===e.code?" active":""),onClick:()=>X(e),children:[J.jsx("span",{className:`fi fi-${e.code.toLowerCase()}`,style:{width:20,height:15,borderRadius:2,display:"inline-block",flexShrink:0,marginRight:6}}),J.jsx("span",{children:Ba(e,t.language,"name","country")}),_?.code===e.code&&J.jsx("span",{className:"cm-check",children:"✓"})]},e.code))})]}),J.jsxs("div",{className:"cm-col cm-col--sep",children:[J.jsxs("div",{className:"cm-col-head",children:["🏙️ ",e("cityModal.col_city","Город")]}),J.jsxs("div",{className:"cm-col-body",ref:G,children:[M&&J.jsx("div",{className:"cm-spin-wrap",children:J.jsx("div",{className:"cm-spin"})}),!M&&ie.slice(0,100).map(e=>J.jsxs("button",{className:"cm-item"+(z?.id===e.id?" active":""),onClick:()=>ee(e),children:[e.is_region&&J.jsx("span",{style:{fontSize:12,marginRight:4},children:"🗺️"}),e.is_settlement&&J.jsx("span",{style:{fontSize:12,marginRight:4},children:"🏘️"}),J.jsx("span",{children:p(e)}),e.is_settlement&&e.parent_name&&J.jsx("span",{style:{fontSize:11,color:"#999",marginLeft:4},children:e.parent_name}),e.is_capital&&J.jsx("span",{style:{fontSize:10,marginLeft:2},children:"⭐"}),z?.id===e.id&&J.jsx("span",{className:"cm-check",children:"✓"})]},e.id)),!M&&0===ie.length&&J.jsx("div",{className:"cm-hint",children:_?e("cityModal.no_data","Нет данных"):e("cityModal.select_country","Выберите страну")})]})]}),J.jsxs("div",{className:"cm-col cm-col--sep",children:[J.jsxs("div",{className:"cm-col-head",children:["📍 ",e("cityModal.col_district","Район")]}),J.jsxs("div",{className:"cm-col-body",children:[U&&J.jsx("div",{className:"cm-spin-wrap",children:J.jsx("div",{className:"cm-spin"})}),!U&&0===E.length&&J.jsx("div",{className:"cm-hint",children:z?e("cityModal.no_data","Нет данных"):e("cityModal.select_city_hint2","Выберите город")}),!U&&E.map(e=>J.jsxs(l.Fragment,{children:[J.jsxs("button",{className:"cm-item"+(A?.id===e.id?" active":""),onClick:()=>(async e=>{if(A?.id===e.id)I(null),L(null),N([]),F(null),R(D);else{I(e),L(null),F(null),K(!0);try{const t=await zn.get(`/geo/districts?city_id=${z.id}&parent_id=${e.id}`).catch(()=>({data:{districts:[]}}));N(t.data?.districts||[])}finally{K(!1)}try{const t=await zn.get(`/geo/metro?city_id=${z.id}&district_id=${e.id}`).catch(()=>({data:{lines:[]}})),n=t.data?.lines||[];R(n.length>0?n:D)}catch{R(D)}}})(e),children:[J.jsx("span",{children:p(e)}),A?.id===e.id?J.jsx("span",{className:"cm-check",children:"▾"}):0===T.length&&J.jsx("span",{className:"cm-arr",children:"›"})]}),A?.id===e.id&&J.jsxs(J.Fragment,{children:[H&&J.jsx("div",{style:{paddingLeft:16,paddingTop:4},children:J.jsx("div",{className:"cm-spin",style:{width:14,height:14}})}),!H&&T.map(e=>
2J.jsxs("button",{className:"cm-item cm-item--sub"+(P?.id===e.id?" active":""),onClick:()=>L(t=>t?.id===e.id?null:e),children:[J.jsx("span",{className:"cm-sub-dot",children:"·"}),J.jsx("span",{children:p(e)}),P?.id===e.id&&J.jsx("span",{className:"cm-check",children:"✓"})]},e.id))]})]},e.id))]})]}),J.jsxs("div",{className:"cm-col cm-col--sep",children:[J.jsxs("div",{className:"cm-col-head",children:["🚇 ",e("cityModal.col_metro","Метро"),A&&$.length>0&&J.jsxs("span",{className:"cm-col-filter",children:["· ",p(A)]})]}),J.jsxs("div",{className:"cm-col-body",children:[U&&J.jsx("div",{className:"cm-spin-wrap",children:J.jsx("div",{className:"cm-spin"})}),!U&&0===$.length&&J.jsx("div",{className:"cm-hint",children:z?e("cityModal.no_metro","Нет метро"):e("cityModal.select_city_hint2","Выберите город")}),!U&&$.map(e=>J.jsxs("div",{children:[J.jsxs("div",{className:"cm-metro-line",children:[J.jsx("span",{className:"cm-metro-dot",style:{background:e.color}}),J.jsx("span",{className:"cm-metro-line-name",children:p(e)})]}),e.stations.map(t=>J.jsxs("button",{className:"cm-item cm-item--metro"+(O?.id===t.id?" active":""),onClick:()=>F(n=>n?.id===t.id?null:{...t,line_color:e.color}),children:[J.jsx("span",{className:"cm-metro-sdot",style:{background:e.color}}),J.jsx("span",{children:p(t)}),O?.id===t.id&&J.jsx("span",{className:"cm-check",children:"✓"})]},t.id))]},e.id))]})]})]}),!re&&J.jsxs("div",{className:"cm-footer",children:[J.jsxs("div",{className:"cm-chips",children:[z&&J.jsxs("span",{className:"cm-chip cm-chip--city",children:["🏙️ ",p(z)," ",J.jsx("button",{onClick:()=>{S(null),C([]),R([]),N([])},children:"✕"})]}),A&&J.jsxs("span",{className:"cm-chip cm-chip--district",children:["📍 ",p(A)," ",J.jsx("button",{onClick:()=>{I(null),L(null),N([]),R(D)},children:"✕"})]}),P&&J.jsxs("span",{className:"cm-chip cm-chip--district",style:{background:"#FFF3E0",color:"#E65100"},children:["🏘️ ",p(P)," ",J.jsx("button",{onClick:()=>L(null),children:"✕"})]}),O&&J.jsxs("span",{className:"cm-chip cm-chip--metro",children:["🚇 ",p(O)," ",J.jsx("button",{onClick:()=>F(null),children:"✕"})]})]}),J.jsx("button",{className:"cm-apply",onClick:ne,children:e("cityModal.done","Готово")})]})]})}),document.body)},Vs="freezoni_preferences",Us=[{code:"en",flag:"🇬🇧",name:"English",native:"English"},{code:"ru",flag:"🇷🇺",name:"Russian",native:"Русский"},{code:"ka",flag:"🇬🇪",name:"Georgian",native:"ქართული"},{code:"es",flag:"🇪🇸",name:"Spanish",native:"Español"},{code:"ar",flag:"🇸🇦",name:"Arabic",native:"العربية"},{code:"zh",flag:"🇨🇳",name:"Chinese",native:"中文"},{code:"tr",flag:"🇹🇷",name:"Turkish",native:"Türkçe"},{code:"fr",flag:"🇫🇷",name:"French",native:"Français"},{code:"de",flag:"🇩🇪",name:"German",native:"Deutsch"}],Ws=({onComplete:e})=>{const{t:t,i18n:n}=v(),{countries:a,getCitiesByCountry:r,updateLocation:i}=Va(),{isAuthenticated:o}=ba(),[l,c]=s.useState(1),[d,u]=s.useState("en"),[p,m]=s.useState(null),[f,h]=s.useState(null),[g,b]=s.useState([]),[x,y]=s.useState(!1),_=(e,t="name",a="city")=>Ba(e,n.language,t,a),w=async(e,{explicit:t=!0,syncServer:n=!0}={})=>{const a=await Rt(e||"en",{explicit:t});return u(a),n&&o&&zn.put("/profile/locale",{language:a}).catch(()=>{}),a};s.useEffect(()=>{let e=!1;return(async()=>{const t=ft(),n=mt(),a=await w(t||n||"en",{explicit:!1,syncServer:!1});e||u(a)})(),()=>{e=!0}},[]);const j=async e=>{if(!e)return[];y(!0);try{const t=await r(e.code);return b(t),h(((e,t=[])=>{if(!Array.isArray(t)||0===t.length)return null;if("GE"===e?.code){const e=t.find(e=>[e.name,e.name_en,e.name_ka,e.name_local].filter(Boolean).map(e=>String(e).trim().toLowerCase()).some(e=>"тбилиси"===e||"tbilisi"===e||"თბილისი"===e||e.includes("tbilisi")||e.includes("тбилиси")||e.includes("თბილის")));if(e)return e}return t.find(e=>e.is_capital)||t[0]||null})(e,t)),t}finally{y(!1)}},k=async()=>{const t=await w(d||"en");localStorage.setItem(Vs,JSON.stringify({language:t,country:p?.code||null,city:f?.id||null,firstVisit:(new Date).toISOString()})),f&&p&&i({city_id:f.id,city_name:f.name,city_name_en:f.name_en||f.name,city_name_es:f.name_es||f.name_en||f.name,city_name_ka:La[f.name]||f.name_ka||f.name_en||f.name,city_name_ar:f.name_ar||f.name_en||f.name,city_name_zh:f.name_zh||f.name_en||f.name,city_name_tr:f.name_tr||f.name_en||f.name,city_name_fr:f.name_fr||f.name_en||f.name,city_name_de:f.name_de||f.name_en||f.name,region_id:f.region_id,region_name:f.region_name,region_name_en:f.region_name_en||f.region_name,region_name_ar:f.region_name_ar||f.region_name_en||f.region_name,region_name_zh:f.regi
2on_name_zh||f.region_name_en||f.region_name,region_name_tr:f.region_name_tr||f.region_name_en||f.region_name,region_name_fr:f.region_name_fr||f.region_name_en||f.region_name,region_name_de:f.region_name_de||f.region_name_en||f.region_name,country_id:f.country_id||p.id,country_code:f.country_code||p.code,country_name:p.name,country_name_en:p.name_en||p.name,country_name_ka:$a[p.name]||p.name_ka||p.name_en||p.name,country_name_ar:p.name_ar||p.name_en||p.name,country_name_zh:p.name_zh||p.name_en||p.name,country_name_tr:p.name_tr||p.name_en||p.name,country_name_fr:p.name_fr||p.name_en||p.name,country_name_de:p.name_de||p.name_en||p.name,flag_emoji:f.flag_emoji||p.flag_emoji,latitude:f.latitude,longitude:f.longitude,is_from_ip:!1}),e()};return J.jsx("div",{className:"welcome-modal-overlay",children:J.jsxs("div",{className:"welcome-modal",children:[J.jsxs("div",{className:"welcome-modal__header",children:[l>1&&J.jsxs("button",{type:"button",className:"welcome-modal__back",onClick:()=>{if(3===l)return c(2),void h(null);2===l&&c(1)},"aria-label":t("common.back","Назад"),children:[J.jsx("span",{"aria-hidden":"true",children:"←"}),t("common.back","Назад")]}),J.jsx("h2",{children:t("welcomeModal.title")}),J.jsx("p",{children:t(1===l?"welcomeModal.choose_language":2===l?"welcomeModal.choose_country":"welcomeModal.choose_city")})]}),J.jsxs("div",{className:"welcome-modal__steps",children:[J.jsx("div",{className:"welcome-modal__step-dot "+(1===l?"welcome-modal__step-dot--active":l>1?"welcome-modal__step-dot--done":"")}),J.jsx("div",{className:"welcome-modal__step-dot "+(2===l?"welcome-modal__step-dot--active":l>2?"welcome-modal__step-dot--done":"")}),J.jsx("div",{className:"welcome-modal__step-dot "+(3===l?"welcome-modal__step-dot--active":"")})]}),J.jsxs("div",{className:"welcome-modal__content",children:[1===l&&J.jsx("div",{className:"welcome-modal__langs",children:Us.map(e=>J.jsxs("button",{className:"welcome-modal__lang-card "+(d===e.code?"welcome-modal__lang-card--selected":""),onClick:()=>(e=>{u(e.code),w(e.code)})(e),children:[J.jsx("span",{className:"welcome-modal__lang-flag",children:e.flag}),J.jsxs("span",{className:"welcome-modal__lang-info",children:[J.jsx("span",{className:"welcome-modal__lang-name",children:e.native}),J.jsx("span",{className:"welcome-modal__lang-native",children:e.name})]})]},e.code))}),2===l&&J.jsx("div",{className:"welcome-modal__countries",children:a.map(e=>J.jsxs("button",{className:"welcome-modal__country-card "+(p?.code===e.code?"welcome-modal__country-card--selected":""),onClick:()=>(m(e),h(null),void b([])),children:[J.jsx("span",{className:`fi fi-${e.code.toLowerCase()}`,style:{width:24,height:18,borderRadius:2,display:"inline-block",flexShrink:0}}),J.jsx("span",{children:_(e,"name","country")})]},e.code))}),3===l&&J.jsxs(J.Fragment,{children:[p&&J.jsxs("button",{className:"welcome-modal__country-card welcome-modal__country-card--selected",onClick:()=>{c(2),h(null)},style:{marginBottom:12,display:"inline-flex"},children:[J.jsx("span",{className:`fi fi-${p.code.toLowerCase()}`,style:{width:24,height:18,borderRadius:2,display:"inline-block",flexShrink:0}}),J.jsx("span",{children:_(p,"name","country")}),J.jsx("span",{style:{marginLeft:"auto",color:"#999",fontSize:12},children:t("welcomeModal.change")})]}),x?J.jsx("div",{className:"welcome-modal__loading",children:t("common.loading")}):J.jsx("div",{className:"welcome-modal__cities",children:g.map(e=>J.jsxs("button",{className:"welcome-modal__city-btn "+(f?.id===e.id?"welcome-modal__city-btn--selected":""),onClick:()=>(e=>{h(e)})(e),children:[J.jsx("span",{className:"welcome-modal__city-name",children:_(e)}),e.is_capital&&J.jsx("span",{className:"welcome-modal__city-capital",children:"★"}),J.jsx("span",{className:"welcome-modal__city-region",children:_(e,"region_name")})]},e.id))})]})]},l),J.jsxs("div",{className:"welcome-modal__footer",children:[J.jsx("button",{className:"welcome-modal__continue-btn",disabled:!(1===l?d:2===l?p&&!x:3===l&&!x),onClick:async()=>{l<3?await(async()=>{1===l&&d?(await w(d),c(2)):2===l&&p&&(await j(p),c(3))})():await k()},children:t(1===l||2===l?"welcomeModal.next":"welcomeModal.continue")}),J.jsx("button",{className:"welcome-modal__skip",onClick:async()=>{const t=await w(d||"en");localStorage.setItem(Vs,JSON.stringify({language:t,country:null,city:null,firstVisit:(new Date).toISOString()})),e()},children:t("welcomeModal.skip")})]})]})})},Hs=()=>{const{t:e}=v(),t=d(),[n,a]=s.useState(!1);s.useEffect(()=>{const e="true"===localStorage.getItem("impersonation_active"),t=localStorage.getItem("admin_original_token");a(e||!!t)},[]);const r=async()=>{const e=localStorage.getItem("impersonation_session_id"),t=localStorage.getItem("staff_token");try{e&&t&&await zn.post("/admin/end-impersonation",{sessionId:e},{headers:{Authorization:`Bearer ${t}`},__skipAuthRefresh:!0})}catch(n){}try{await zn.post("/auth/logout",{},{__skipAuthRefresh:!0,__skipAuthHeader:!0})}catch(n){}localStorage.removeItem("token"),localStorage.removeItem("freezoni_token"),localStorage.removeItem("admin_original_token"),localStorage.removeItem("impersonation_active"),localStorage.removeItem("impersonation_session_id"),localStorage.removeItem("impersonator_info"),window.location.href=Ut};
2if(!n)return null;const i=Qt(t.pathname),o=!!localStorage.getItem("staff_token");return i||o?i?J.jsxs("div",{style:{position:"fixed",bottom:"20px",right:"20px",background:"linear-gradient(135deg, #dc2626 0%, #991b1b 100%)",padding:"12px 20px",borderRadius:"12px",boxShadow:"0 4px 20px rgba(220, 38, 38, 0.4)",zIndex:9999,display:"flex",alignItems:"center",gap:"12px",animation:"pulse 2s infinite"},children:[J.jsx("style",{children:"\n        @keyframes pulse {\n          0%, 100% { transform: scale(1); }\n          50% { transform: scale(1.02); }\n        }\n      "}),J.jsxs("span",{style:{color:"#fff",fontSize:"14px",fontWeight:"500"},children:["🎭 ",e("impersonationBanner.mode")]}),J.jsx("button",{onClick:r,style:{padding:"8px 16px",background:"#fff",border:"none",borderRadius:"8px",color:"#dc2626",fontSize:"13px",fontWeight:"600",cursor:"pointer"},children:e("impersonationBanner.returnToAdmin")})]}):J.jsx("button",{onClick:r,"aria-label":e("impersonationBanner.returnToAdmin"),title:e("impersonationBanner.returnToAdmin"),style:{position:"fixed",right:"18px",bottom:"86px",zIndex:9999,padding:"10px 14px",border:"1px solid rgba(255, 255, 255, 0.22)",borderRadius:"10px",background:"linear-gradient(135deg, #ef4444 0%, #b91c1c 100%)",color:"#fff",fontSize:"12px",fontWeight:700,cursor:"pointer",boxShadow:"0 10px 24px rgba(185, 28, 28, 0.36)"},children:"← Админ"}):null},Ks="cookie_consent",qs=({disabled:e=!1})=>{const{t:t}=v(),[n,a]=s.useState(!1);s.useEffect(()=>{if(e)return void a(!1);if(!localStorage.getItem(Ks)){const e=setTimeout(()=>a(!0),1500);return()=>clearTimeout(e)}},[e]);return n?J.jsx("div",{className:"cookie-consent",children:J.jsxs("div",{className:"cookie-consent__content",children:[J.jsxs("p",{className:"cookie-consent__text",children:[t("cookie.message")," ",J.jsx(u,{to:"/cookies",className:"cookie-consent__link",children:t("cookie.learnMore")})]}),J.jsxs("div",{className:"cookie-consent__buttons",children:[J.jsx("button",{className:"cookie-consent__btn cookie-consent__btn--secondary",onClick:()=>{localStorage.setItem(Ks,JSON.stringify({essential:!0,functional:!1,analytics:!1,timestamp:(new Date).toISOString()})),a(!1)},children:t("cookie.onlyEssential")}),J.jsx("button",{className:"cookie-consent__btn cookie-consent__btn--primary",onClick:()=>{localStorage.setItem(Ks,JSON.stringify({essential:!0,functional:!0,analytics:!0,timestamp:(new Date).toISOString()})),a(!1)},children:t("cookie.acceptAll")})]})]})}):null},Gs=()=>{const e=d(),{user:t,logoutUser:n}=ba(),a=s.useRef(!1);return s.useEffect(()=>{if(!Qt(e.pathname))return void(a.current=!1);const r=e.pathname===Wt,i=!!localStorage.getItem("staff_token");if((r||i)&&!a.current){(localStorage.getItem("freezoni_token")||localStorage.getItem("token")||t)&&(n(),a.current=!0)}},[e.pathname,t,n]),J.jsx(p,{})},Js=18e5,Ys="staff_idle_logout_at",Zs="staff_last_activity_at",Qs=()=>{const e=c(),t=s.useRef(null),n=s.useRef(0),a=s.useRef(Date.now()),r=s.useRef(!1),i=s.useCallback((e=a.current)=>{try{const e=Number(localStorage.getItem(Zs));if(Number.isFinite(e)&&e>0)return e}catch(t){}return e},[]),o=s.useCallback(e=>{a.current=e;try{localStorage.setItem(Zs,String(e))}catch(t){}},[]),l=s.useCallback(()=>{const e=i(null),t=Number.isFinite(e)&&e>0?e:a.current;return a.current=t,Date.now()-t},[i]),d=s.useCallback(()=>{try{sessionStorage.setItem("staff_logout_reason","idle_timeout")}catch(t){}e(`${Wt}?reason=idle_timeout`,{replace:!0,state:{reason:"idle_timeout"}})},[e]),u=s.useCallback(()=>{if(!r.current){r.current=!0,t.current&&(window.clearTimeout(t.current),t.current=null);try{zn.post("/admin/auth/logout").catch(()=>{})}catch(e){}try{localStorage.setItem(Ys,String(Date.now()))}catch(e){}vn(),window.dispatchEvent(new CustomEvent("freezoni_staff_idle_logout")),d()}},[d]),p=s.useCallback(()=>{if(r.current)return;t.current&&window.clearTimeout(t.current);const e=Js-l();t.current=window.setTimeout(()=>{l()>=Js?u():p()},Math.max(e,0)+50)},[l,u]),m=s.useCallback(()=>{const e=Date.now();l()>=Js?u():e-n.current<1e3||(n.current=e,o(e),p())},[l,u,p,o]);return s.useEffect(()=>{const e=i(null);if(Number.isFinite(e)&&e>0){if(a.current=e,Date.now()-e>=Js)return void u()}else o(Date.now());p();const n=["mousemove","mousedown","pointermove","keydown","scroll","touchstart","wheel"];
2n.forEach(e=>{window.addEventListener(e,m,{passive:!0})});const s=()=>{document.hidden||m()},l=e=>{if(e.key===Zs&&e.newValue){const t=Number(e.newValue);return void(Number.isFinite(t)&&t>0&&(a.current=Math.max(a.current,t),p()))}e.key===Ys&&e.newValue&&(r.current=!0,vn(),d())};return document.addEventListener("visibilitychange",s),window.addEventListener("storage",l),()=>{t.current&&window.clearTimeout(t.current),n.forEach(e=>{window.removeEventListener(e,m,{passive:!0})}),document.removeEventListener("visibilitychange",s),window.removeEventListener("storage",l)}},[l,i,m,u,d,p,o]),null},Xs="freezoni_admin_theme",el="dark",tl="light",nl=el,al=e=>e===tl?tl:el,rl=()=>{if("undefined"==typeof window)return nl;try{return al(window.localStorage.getItem(Xs))}catch{return nl}},il=e=>{if("undefined"==typeof document)return al(e);const t=al(e);return document.documentElement.dataset.adminTheme=t,document.documentElement.style.colorScheme="light",t},ol=()=>{const[e,t]=s.useState(()=>rl());s.useEffect(()=>{il(e)},[e]),s.useEffect(()=>{const e=e=>{e.key===Xs&&t(rl())};return window.addEventListener("storage",e),()=>window.removeEventListener("storage",e)},[]);const n=e===tl;return J.jsxs("button",{type:"button",className:"fz-admin-theme-toggle","aria-label":n?"Переключить админку на тёмную тему":"Переключить админку на светлую тему","aria-pressed":n,title:n?"Светлая тема включена":"Тёмная тема включена",onClick:()=>{t((e=>{const t=il(e);if("undefined"!=typeof window)try{window.localStorage.setItem(Xs,t)}catch{}return t})(n?el:tl))},children:[J.jsx("span",{className:"fz-admin-theme-toggle__track","aria-hidden":"true",children:J.jsx("span",{className:"fz-admin-theme-toggle__thumb"})}),J.jsx("span",{className:"fz-admin-theme-toggle__text",children:n?"Светлая":"Тёмная"})]})},sl="staff_logout_reason",ll=({children:e})=>{const{t:t}=v(),n=d(),{user:a,logoutUser:r}=ba(),i=s.useRef(!1),[o,l]=s.useState(!1);if(s.useEffect(()=>{if(!Qt(n.pathname))return i.current=!1,void l(!0);(!!(localStorage.getItem("freezoni_token")||localStorage.getItem("token"))||!!a)&&!i.current?(r(),i.current=!0,setTimeout(()=>l(!0),10)):l(!0)},[n.pathname,a,r]),!o)return J.jsxs("div",{className:"fz-admin-theme-scope",style:{display:"flex",justifyContent:"center",alignItems:"center",height:"100vh",background:"linear-gradient(135deg, var(--fz-admin-bg-soft) 0%, var(--fz-admin-bg) 100%)",color:"var(--fz-admin-muted)"},children:[J.jsx(ol,{}),J.jsxs("div",{style:{textAlign:"center"},children:[J.jsx("div",{style:{fontSize:"32px",marginBottom:"16px"},children:"⏳"}),J.jsx("div",{children:t("auth.checkingAuthorization")})]})]});const c=_n(),u=wn();if(!c||!u)return J.jsx(m,{to:Wt,replace:!0,state:{from:n}});if(!(()=>{try{const e=localStorage.getItem("staff_token"),t=e?.split(".")?.[1];if(!t)return!1;const n=t.replace(/-/g,"+").replace(/_/g,"/"),a=JSON.parse(window.atob(n.padEnd(4*Math.ceil(n.length/4),"=")));return Boolean(a.session_id||a.sid||a.staff_session_id)}catch(e){return!1}})()){try{sessionStorage.setItem(sl,"session_expired")}catch(f){}return vn(),J.jsx(m,{to:`${Wt}?reason=session_expired`,replace:!0,state:{reason:"session_expired"}})}if((()=>{try{const e=Number(localStorage.getItem("staff_last_activity_at"));return Number.isFinite(e)&&e>0&&Date.now()-e>=Js}catch(f){return!1}})()){try{sessionStorage.setItem(sl,"idle_timeout")}catch(f){}return vn(),J.jsx(m,{to:`${Wt}?reason=idle_timeout`,replace:!0,state:{reason:"idle_timeout"}})}
2return J.jsxs("div",{className:"fz-admin-theme-scope",children:[J.jsx(Qs,{}),J.jsx(ol,{}),e||J.jsx(p,{})]})},cl=ds(()=>rt(()=>import("./HomePage-Bfe4HR34.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14]))),dl=ds(()=>rt(()=>import("./ListingsPage-Cse9Actu.js"),__vite__mapDeps([2,1,3,4,5,6,7,8,9,10,11]))),ul=ds(()=>rt(()=>import("./AdDetailPage-q65d9aqj.js"),__vite__mapDeps([15,1,6,16,5,17,18,10,19,4,8,3,7,9,20,21,22,23,24,25,26]))),pl=ds(()=>rt(()=>import("./CreateAdPage-CMUSD2Zl.js"),__vite__mapDeps([27,1,16,5,28,17,10,29,7,8]))),ml=ds(()=>rt(()=>import("./EditAdPage-dCFgmF2U.js"),__vite__mapDeps([30,1,16,5,28,17,10,29,7,8]))),fl=ds(()=>rt(()=>import("./FavoritesPage-BXDC6dGn.js"),__vite__mapDeps([31,1,3,4,5,6,7,8,9,10,11]))),hl=ds(()=>rt(()=>import("./HistoryPage-CW-fXD2h.js"),__vite__mapDeps([32,1,3,4,5,6,7,8,9,10,33]))),gl=ds(()=>rt(()=>import("./ProfilePage-CVaqMGIi.js"),__vite__mapDeps([34,1,35,5,18,10,19,22,8,23,36,37,38,39,40,7,41,42,43,44,45,46]))),bl=ds(()=>rt(()=>import("./UsernameProfileRedirectPage-DHgUCqHD.js"),__vite__mapDeps([47,1,48,5,10,8]))),xl=ds(()=>rt(()=>import("./MessagesPage-C41jrLsw.js"),__vite__mapDeps([49,1,5,10,8]))),yl=ds(()=>rt(()=>import("./LoginPage-tIxWsiRM.js"),__vite__mapDeps([50,1,10,5,8,51,52]))),_l=ds(()=>rt(()=>import("./RegisterPage-DOtjnS7d.js"),__vite__mapDeps([53,1,54,10,5,8,55]))),wl=ds(()=>rt(()=>import("./PhoneVerificationPage-Br1eXzUX.js"),__vite__mapDeps([56,1,54,5,10,8,52]))),vl=ds(()=>rt(()=>import("./NotFoundPage-C7gDqp7t.js"),__vite__mapDeps([48,1,5,10,8]))),jl=ds(()=>rt(()=>import("./CartPage-BwUhh7ka.js"),__vite__mapDeps([57,1,58,59,5,10,8,60]))),kl=ds(()=>rt(()=>import("./ChatsPage-CDCe4dLb.js"),__vite__mapDeps([61,1,4,5,10,8]))),zl=ds(()=>rt(()=>import("./AllCategoriesPage-DK6Ecx4J.js"),__vite__mapDeps([62,1,63,5,64,12,10,8,65]))),Sl=ds(()=>rt(()=>import("./SellerAdsPage-W-bxx0vF.js"),__vite__mapDeps([66,1,3,4,5,6,7,8,9,22,23,10,67]))),El=ds(()=>rt(()=>import("./CategoryPage-CSyQOi6D.js"),__vite__mapDeps([68,1,63,5,64,17,10,3,4,6,7,8,9,69]))),Cl=ds(()=>rt(()=>import("./AdminPage-YmRJjywJ.js"),__vite__mapDeps([70,1,5,35,10,71,8,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,24,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107]))),Al=ds(()=>rt(()=>import("./AdminSellersPage-D__gyLxL.js").then(e=>e.b),__vite__mapDeps([78,1,5]))),Il=ds(()=>rt(()=>import("./CategoryManagerPage-IGHtqR6R.js"),__vite__mapDeps([108,1,10,75,5,7,8]))),Tl=ds(()=>rt(()=>import("./AdminBannerAds-Bs0pdnEC.js"),__vite__mapDeps([79,1,10,80,5,8]))),Nl=ds(()=>rt(()=>import("./BannerModerationPage-Bnp_QlUX.js"),__vite__mapDeps([76,1,10,5,8,77]))),Pl=ds(()=>rt(()=>import("./WorldMapPage-6pIjPcej.js"),__vite__mapDeps([109,1,110,24,5,10,8,111]))),Ll=ds(()=>rt(()=>import("./ReferrersPage-BL5Iz-55.js"),__vite__mapDeps([81,1,5,10,8,82]))),$l=ds(()=>rt(()=>import("./AdminAuctionsPage-DEQOkpSU.js"),__vite__mapDeps([72,1,10,5,8]))),Rl=ds(()=>rt(()=>import("./AdminAuctionCategoriesPage-BuuTwtDh.js"),__vite__mapDeps([73,1,74,10,75,5,8]))),Dl=ds(()=>rt(()=>import("./AdminAdvertisingPrices-DJ3mkZ0H.js"),__vite__mapDeps([71,1,5,10,8]))),Bl=ds(()=>rt(()=>import("./ReferralAntifraudPage-iR6mnXU9.js"),__vite__mapDeps([83,1,74,10,80,5,8]))),Ol=ds(()=>rt(()=>import("./AdminStaffChatPage-XWqCtkgx.js").then(e=>e.a),__vite__mapDeps([103,1,74,10,5,8]))),Fl=ds(()=>rt(()=>import("./AdminStaffStatsPage-D0esCsND.js"),__vite__mapDeps([86,1,74,10,5,24,8]))),Ml=ds(()=>rt(()=>import("./AdminSupportThreadsPage-vor1c3sO.js"),__vite__mapDeps([87,1,74,10,5,8]))),Vl=ds(()=>rt(()=>import("./AdminDealDisputesPage-DHf_KVZh.js"),__vite__mapDeps([88,1,74,10,80,89,8,5,90]))),Ul=ds(()=>rt(()=>import("./AdminDealReadinessPage-BjvvR7Jl.js"),__vite__mapDeps([91,1,74,10,8,5,92]))),Wl=ds(()=>rt(()=>import("./AdminKeepzReadinessPage-BSElENJr.js"),__vite__mapDeps([93,1,74,10,8,5,94]))),Hl=ds(()=>rt(()=>import("./AdminDeliveryPilotPage-B-dklTMp.js"),__vite__mapDeps([95,1,74,10,89,8,5,96]))),Kl=ds(()=>rt(()=>import("./AdminOnboardingAnalyticsPage-BXBt5DN4.js"),__vite__mapDeps([97,1,74,10,8,5,98]))),ql=ds(()=>rt(()=>import("./AdminPickupPointsPage-D6yYMhyw.js"),__vite__mapDeps([99,1,74,10,8,5,100]))),Gl=ds(()=>rt(()=>import("./AdminPickupOperatorPage-lOtS2i3n.js"),__vite__mapDeps([101,1,74,10,8,5,102]))),Jl=ds(()=>rt(()=>import("./BackupManagerPage-p-XCJ3bl.js"),__vite__mapDeps([84,1,74,10,5,8]))),Yl=ds(()=>rt(()=>import("./InvestigationPage-CA56px0d.js"),__vite__mapDeps([112,1,74,10,5,110,24,8]))),Zl=ds(()=>rt(()=>import("./AdminAboutPage-B81x3JU5.js"),__vite__mapDeps([113,1,10,5,8]))),Ql=ds(()=>rt(()=>import("./AdminTermsPage-B_mkp9s7.js"),__vite__mapDeps([114,1,10,5,8]))),Xl=ds(()=>rt(()=>import("./AdminPrivacyPage-n124V_Vn.js"),__vite__mapDeps([115,1,5,10,8]))),ec=ds(()=>rt(()=>
2import("./AdminLegalPage-D-HQKBWA.js"),__vite__mapDeps([116,1,5,10,8]))),tc=ds(()=>rt(()=>import("./AdminPolicyPage-gLxO0vOW.js"),__vite__mapDeps([117,1,118,119,5,10,8]))),nc=ds(()=>rt(()=>import("./AdminVacanciesPage-DIXYLtkz.js"),__vite__mapDeps([120,1,10,5,8]))),ac=ds(()=>rt(()=>import("./AdminContactsPage-CWR7L4or.js"),__vite__mapDeps([121,1,10,5,8]))),rc=ds(()=>rt(()=>import("./AdminSafeDealPage-DJ5iHwPo.js"),__vite__mapDeps([122,1,10,5,8]))),ic=ds(()=>rt(()=>import("./AdminHelpPage-BjwGTaPu.js"),__vite__mapDeps([123,1,10,5,8]))),oc=ds(()=>rt(()=>import("./AdminHowToOrderPage-Du6V8OjV.js"),__vite__mapDeps([124,1,10,5,8]))),sc=ds(()=>rt(()=>import("./AdminShippingPage-CFBZS4nX.js"),__vite__mapDeps([125,1,10,5,8]))),lc=ds(()=>rt(()=>import("./AdminPvzPage-B0jDzo5V.js"),__vite__mapDeps([126,1,10,5,8]))),cc=ds(()=>rt(()=>import("./AdminForumPage-DeDOIlDB.js"),__vite__mapDeps([85,1,5,10,8]))),dc=ds(()=>rt(()=>import("./ProjectProgressPage-ZviLV9Nz.js"),__vite__mapDeps([104,1,74,10,5,8]))),uc=ds(()=>rt(()=>import("./SellerDashboardPage-DYlT3n7j.js"),__vite__mapDeps([44,1,5,10,8,45]))),pc=ds(()=>rt(()=>import("./PricingPage-B64jwcDL.js"),__vite__mapDeps([127,1,25,5,10,8,128]))),mc=ds(()=>rt(()=>import("./DealsPage-C_yqnfYz.js"),__vite__mapDeps([129,1,5,10,8,130]))),fc=ds(()=>rt(()=>import("./DealPage-BFP4cn03.js"),__vite__mapDeps([131,1,36,5,8,37,38,10,132]))),hc=ds(()=>rt(()=>import("./CheckoutPage-DCAb8mdB.js"),__vite__mapDeps([133,1,5,10,8,134]))),gc=ds(()=>rt(()=>import("./PaymentSuccessPage-UqKkshNC.js"),__vite__mapDeps([135,1,5,10,8,136]))),bc=ds(()=>rt(()=>import("./PaymentCancelPage-DHwzN1VV.js"),__vite__mapDeps([137,1,5,10,8,136]))),xc=ds(()=>rt(()=>import("./ShopPage-BsDwz4m5.js"),__vite__mapDeps([138,1,3,4,5,6,7,8,9,21,22,23,10,139,11]))),yc=ds(()=>rt(()=>import("./MyShopPage-BfRpdaoD.js"),__vite__mapDeps([140,1,5,10,8,141]))),_c=ds(()=>rt(()=>import("./ShopMembersPage-C2oFC3X5.js"),__vite__mapDeps([142,1,5,10,8,143]))),wc=ds(()=>rt(()=>import("./AcceptInvitePage-Beyo0FOJ.js"),__vite__mapDeps([144,1,5,10,8,145]))),vc=ds(()=>rt(()=>import("./ShopAnalyticsPage-B9U47WFE.js"),__vite__mapDeps([146,1,5,10,8,147]))),jc=ds(()=>rt(()=>import("./BulkUploadPage-BNR_ZYYU.js"),__vite__mapDeps([148,1,5,10,8,149]))),kc=ds(()=>rt(()=>import("./ApiKeysPage-Cl63TZ97.js"),__vite__mapDeps([150,1,5,10,8,151]))),zc=ds(()=>rt(()=>import("./EmployeeShopPage-C-Xf0EW2.js"),__vite__mapDeps([152,1,5,10,8,153]))),Sc=ds(()=>rt(()=>import("./PromotionPage-BoovimJR.js"),__vite__mapDeps([41,1,10,5,8,42]))),Ec=ds(()=>rt(()=>import("./PromotionSuccessPage-9Vcx60_-.js"),__vite__mapDeps([154,1,10,5,8,155]))),Cc=ds(()=>rt(()=>import("./PromotionCancelPage-Cl_bkRZe.js"),__vite__mapDeps([156,1,10,5,8,155]))),Ac=ds(()=>rt(()=>import("./MyPromotionsPage-CZOK7gbH.js"),__vite__mapDeps([39,1,10,5,8,40]))),Ic=ds(()=>rt(()=>import("./AdvertisingPage-Cj7OyVvF.js"),__vite__mapDeps([157,1,5,10,8]))),Tc=ds(()=>rt(()=>import("./AuctionsListPage-B2O1Eieg.js"),__vite__mapDeps([158,1,10,159,5,6,13,8,160]))),Nc=ds(()=>rt(()=>import("./AuctionPage-CVJy8CJU.js"),__vite__mapDeps([161,1,159,5,10,22,8,23,20]))),Pc=ds(()=>rt(()=>import("./CreateAuctionPage-B6o1Xrc3.js"),__vite__mapDeps([162,1,10,5,8,163]))),Lc=ds(()=>rt(()=>import("./AuctionHelpPage-5LpxHO8Y.js"),__vite__mapDeps([164,1,5,10,8]))),$c=ds(()=>rt(()=>import("./AuctionPaymentPage-bpSRLmed.js"),__vite__mapDeps([165,1,5,10,8]))),Rc=ds(()=>rt(()=>import("./MyAuctionsPage-CHSGKBoG.js"),__vite__mapDeps([166,1,5,10,8]))),Dc=ds(()=>rt(()=>import("./WatchlistPage-CYx9FgrO.js"),__vite__mapDeps([167,1,5,10,8,168]))),Bc=ds(()=>rt(()=>import("./ComparePage-BQvhlnu1.js"),__vite__mapDeps([169,1,17,5,10,8,170]))),Oc=ds(()=>rt(()=>import("./index-CI4cuahO.js"),__vite__mapDeps([171,1,10,6,7,5,8,172]))),Fc=ds(()=>rt(()=>import("./ForumPage-DvhxsnM_.js"),__vite__mapDeps([173,1,5,10,8]))),Mc=ds(()=>rt(()=>import("./ForumTopicPage-lqRWHHSo.js"),__vite__mapDeps([174,1,5,10,8]))),Vc=ds(()=>rt(()=>import("./TermsPage-Hecv9118.js"),__vite__mapDeps([175,1,176,5,177,10,8]))),Uc=ds(()=>rt(()=>import("./PrivacyPage-XuGgTDIi.js"),__vite__mapDeps([178,1,176,5,177,179,10,8,180]))),Wc=ds(()=>rt(()=>import("./RefundPolicyPage-CtkzaL7f.js"),__vite__mapDeps([181,1,118,5,10,8]))),Hc=ds(()=>rt(()=>import("./CompliancePolicyPage-CubiMIsV.js"),__vite__mapDeps([182,1,118,119,5,10,8]))),Kc=ds(()=>rt(()=>import("./LegalPage-XiHiEXJS.js"),__vite__mapDeps([183,1,176,5,177,179,10,8,184]))),qc=ds(()=>rt(()=>import("./VerificationPolicyPage-3vKMpKyx.js"),__vite__mapDeps([185,1,118,5,10,8,184]))),Gc=ds(()=>rt(()=>import("./VacanciesPage-BszimTus.js"),__vite__mapDeps([186,1,179,5,10,8,187]
2))),Jc=ds(()=>rt(()=>import("./ContactsPage-Do-HG9Cx.js"),__vite__mapDeps([188,1,179,5,10,8,189]))),Yc=ds(()=>rt(()=>import("./SafeDealPage-B7GWqqJt.js"),__vite__mapDeps([190,1,179,5,10,8,191]))),Zc=ds(()=>rt(()=>import("./HelpPage-DcW5hlPl.js"),__vite__mapDeps([192,1,179,5,8,10,193]))),Qc=ds(()=>rt(()=>import("./HowToOrderPage-mPeTEuOB.js"),__vite__mapDeps([194,1,179,5,10,8,195]))),Xc=ds(()=>rt(()=>import("./ShippingPage-8y6H60R-.js"),__vite__mapDeps([196,1,179,58,59,5,10,8]))),ed=ds(()=>rt(()=>import("./PvzPage-DK7IZ-_d.js"),__vite__mapDeps([197,1,179,5,10,8,198]))),td=ds(()=>rt(()=>import("./CookiePolicyPage-CVbRBkZ5.js"),__vite__mapDeps([199,1,118,5,10,8]))),nd=ds(()=>rt(()=>import("./AuctionRulesPage-BUvf34_H.js"),__vite__mapDeps([200,1,118,5,10,8]))),ad=ds(()=>rt(()=>import("./AboutPage-BZeYU1bE.js"),__vite__mapDeps([201,1,5,10,8,202]))),rd=ds(()=>rt(()=>import("./FAQPage-5C0PfvCL.js"),__vite__mapDeps([203,1,5,10,8]))),id=ds(()=>rt(()=>import("./AccountSettingsPage-dQJWArXm.js"),__vite__mapDeps([204,1,5,10,8,205]))),od=ds(()=>rt(()=>import("./BalancePage-EAtAv4li.js"),__vite__mapDeps([43,1,36,5,10,8]))),sd=ds(()=>rt(()=>import("./StaffManagementPage-DWuMiyN4.js"),__vite__mapDeps([105,1,5,10,8]))),ld=ds(()=>rt(()=>import("./AuditLogPage-CPIwavy4.js"),__vite__mapDeps([106,1,5,10,8]))),cd=ds(()=>rt(()=>import("./StaffLoginPage-gx-E0fmG.js"),__vite__mapDeps([206,1,10,5,8]))),dd=ds(()=>rt(()=>import("./StaffInvitePage-DzGCsyW7.js"),__vite__mapDeps([207,1,5,10,8]))),ud=ds(()=>rt(()=>import("./StaffAcceptInvitePage-CEBUqyOt.js"),__vite__mapDeps([208,1,5,10,8]))),pd=ds(()=>rt(()=>import("./StaffDashboardPage-nGsa3VQR.js"),__vite__mapDeps([209,1,5,10,8]))),md=ds(()=>rt(()=>import("./StaffChangePasswordPage-5qdcFZNF.js"),__vite__mapDeps([210,1,10,5,8]))),fd=()=>{const{t:e}=v();return J.jsxs("div",{role:"status","aria-live":"polite","aria-busy":"true",style:{display:"flex",justifyContent:"center",alignItems:"center",minHeight:"60vh",flexDirection:"column",gap:"16px"},children:[J.jsx("div",{className:"fz-page-loader__spinner","aria-hidden":"true",style:{width:"40px",height:"40px",border:"3px solid #f3f4f6",borderTop:"3px solid #2563eb",borderRadius:"50%",animation:"spin 1s linear infinite"}}),J.jsx("style",{children:"@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .fz-page-loader__spinner { animation: none !important; } }"}),J.jsx("span",{style:{color:"#6b7280",fontSize:"14px"},children:e("common.loading")})]})},hd=({suffix:e=""})=>{const{id:t}=b(),n=d();return J.jsx(m,{to:`/auctions/${t}${e}${n.search||""}`,replace:!0})},gd=()=>{const e=d(),{i18n:t}=v(),{isAuthenticated:n,loading:a}=ba(),[r,i]=s.useState(!localStorage.getItem("freezoni_preferences")),o=kt(e.pathname),l=Boolean(o&&Et(e.pathname)),c=l?zt(e.pathname):e.pathname,u=s.useMemo(()=>l?{...e,pathname:c}:e,[l,e,c]);return s.useEffect(()=>{if(!o||!l)return;String(t.resolvedLanguage||t.language||"").split("-")[0]!==o&&Rt(o,{explicit:!1}
2).catch(e=>{})},[t.language,t.resolvedLanguage,l,o]),s.useEffect(()=>{ms(e.search),Wn(),la()},[e.pathname,e.search]),s.useEffect(()=>{if(c.startsWith("/chats"))return;const t=`${e.pathname}${e.search||""}${e.hash||""}`;try{sessionStorage.setItem("freezoni_last_non_chat_path",t)}catch{}},[e.pathname,e.search,e.hash,c]),s.useEffect(()=>(()=>{if(Zn||!ea())return()=>{};la({force:!0}),Zn=window.setInterval(()=>{la()},3e4);const e=()=>{"visible"===document.visibilityState&&la({force:!0})},t=()=>{la({force:!0})},n=()=>{ca()};return document.addEventListener("visibilitychange",e),window.addEventListener("pagehide",t),window.addEventListener("freezoni_user_logout",n),()=>{Zn&&(window.clearInterval(Zn),Zn=null),document.removeEventListener("visibilitychange",e),window.removeEventListener("pagehide",t),window.removeEventListener("freezoni_user_logout",n)}})(),[]),s.useEffect(()=>{if(!a)return(()=>{if(!ea()||oa(window.location.pathname))return()=>{};window.setTimeout(()=>{da()},1500);const e=window.setInterval(()=>{da()},6e5),t=()=>{"visible"===document.visibilityState&&da()};return document.addEventListener("visibilitychange",t),()=>{window.clearInterval(e),document.removeEventListener("visibilitychange",t)}})()},[a,n]),s.useEffect(()=>(document.body.classList.toggle("fz-welcome-active",r),()=>document.body.classList.remove("fz-welcome-active")),[r]),J.jsx($s,{children:J.jsx(ja,{children:J.jsx(Ma,{children:J.jsxs(Fs,{children:[J.jsx(Xo,{}),J.jsx(es,{}),J.jsx(Qo,{}),J.jsx(cs,{children:J.jsx(s.Suspense,{fallback:J.jsx(fd,{}),children:J.jsxs(h,{location:u,children:[J.jsxs(g,{element:J.jsx(Gs,{}),children:[J.jsx(g,{path:Wt,element:J.jsx(cd,{})}),J.jsx(g,{path:`${Ht}/:token`,element:J.jsx(dd,{})}),J.jsx(g,{path:Kt,element:J.jsx(ud,{})}),J.jsxs(g,{element:J.jsx(ll,{}),children:[J.jsx(g,{path:qt,element:J.jsx(pd,{})}),J.jsx(g,{path:Gt,element:J.jsx(md,{})}),J.jsx(g,{path:Ut,element:J.jsx(Cl,{})}),J.jsx(g,{path:Yt("/sellers"),element:J.jsx(Al,{})}),J.jsx(g,{path:Yt("/categories"),element:J.jsx(Il,{})}),J.jsx(g,{path:Yt("/banner-ads"),element:J.jsx(Tl,{})}),J.jsx(g,{path:Yt("/banner-moderation"),element:J.jsx(Nl,{})}),J.jsx(g,{path:Yt("/world-map"),element:J.jsx(Pl,{})}),J.jsx(g,{path:Yt("/referrers"),element:J.jsx(Ll,{})}),J.jsx(g,{path:Yt("/staff"),element:J.jsx(sd,{})}),J.jsx(g,{path:Yt("/audit"),element:J.jsx(ld,{})}),J.jsx(g,{path:Yt("/auctions"),element:J.jsx($l,{})}),J.jsx(g,{path:Yt("/auction-categories"),element:J.jsx(Rl,{})}),J.jsx(g,{path:Yt("/advertising-prices"),element:J.jsx(Dl,{})}),J.jsx(g,{path:Yt("/referral-antifraud"),element:J.jsx(Bl,{})}),J.jsx(g,{path:Yt("/team-stats"),element:J.jsx(Fl,{})}),J.jsx(g,{path:Yt("/support-threads"),element:J.jsx(Ml,{})}),J.jsx(g,{path:Yt("/deal-disputes"),element:J.jsx(Vl,{})}),J.jsx(g,{path:Yt("/deal-readiness"),element:J.jsx(Ul,{})}),J.jsx(g,{path:Yt("/keepz-readiness"),element:J.jsx(Wl,{})}),J.jsx(g,{path:Yt("/delivery-pilot"),element:J.jsx(Hl,{})}),J.jsx(g,{path:Yt("/onboarding-analytics"),element:J.jsx(Kl,{})}),J.jsx(g,{path:Yt("/pickup-points"),element:J.jsx(ql,{})}),J.jsx(g,{path:Yt("/pickup-operator"),element:J.jsx(Gl,{})}),J.jsx(g,{path:Yt("/staff-chat"),element:J.jsx(Ol,{})}),J.jsx(g,{path:Yt("/backups"),element:J.jsx(Jl,{})}),J.jsx(g,{path:Yt("/investigation/:userId"),element:J.jsx(Yl,{})}),J.jsx(g,{path:Yt("/about"),element:J.jsx(Zl,{})}),J.jsx(g,{path:Yt("/terms"),element:J.jsx(Ql,{})}),J.jsx(g,{path:Yt("/privacy"),element:J.jsx(Xl,{})}),J.jsx(g,{path:Yt("/legal"),element:J.jsx(ec,{})}),J.jsx(g,{path:Yt("/policy-pages/:slug"),element:J.jsx(tc,{})}),J.jsx(g,{path:Yt("/vacancies"),element:J.jsx(nc,{})}),J.jsx(g,{path:Yt("/contacts"),element:J.jsx(ac,{})}),J.jsx(g,{path:Yt("/safe-deal"),element:J.jsx(rc,{})}),J.jsx(g,{path:Yt("/help"),element:J.jsx(ic,{})}),J.jsx(g,{path:Yt("/how-to-order"),element:J.jsx(oc,{})}),J.jsx(g,{path:Yt("/shipping"),element:J.jsx(sc,{})}),J.jsx(g,{path:Yt("/pvz"),element:J.jsx(lc,{})}),J.jsx(g,{path:Yt("/forum"),element:J.jsx(cc,{})}),J.jsx(g,{path:Yt("/project-progress"),element:J.jsx(dc,{})})]})]}),"/admin"!==Ut&&J.jsxs(J.Fragment,{children:[J.jsx(g,{path:"/admin",element:J.jsx(vl,{})}),J.jsx(g,{path:"/admin/*",element:J.jsx(vl,{})}),J.jsx(g,{path:"/staff/*",element:J.jsx(vl,{})})]}),J.jsxs(g,{element:J.jsx(Lo,{}),children:[J.jsx(g,{path:"/",element:J.jsx(cl,{})}),J.jsx(g,{path:"/catalog",element:J.jsx(dl,{})}),J.jsx(g,{path:"/ads",element:J.jsx(dl,{})}),J.jsx(g,{path:"/ads/:id",element:J.jsx(ul,{})}),J.jsx(g,{path:"/seller/:userId",element:J.jsx(Sl,{})}),J.jsx(g,{path:"/category/:categoryId",element:J.jsx(El,{})}),J.jsx(g,{path:"/categories",element:J.jsx(zl,{})}),J.jsx(g,{path:"/compare",element:J.jsx($o,{children:J.jsx(Bc,{})})}),J.jsx(g,{path:"/map",element:J.jsx(Oc,{})}),J.jsx(g,{path:"/forum",element:J.jsx(Fc,{})}),J.jsx(g,{path:"/forum/search",element:J.jsx(Fc,{})}),J.jsx(g,{path:"/forum/:sectionSlug",element:J.jsx(Fc,{})}),J.jsx(g,{path:"/forum/topic/:topicId",element:J.jsx(Mc,{})}),J.jsx(g,{path:"/auctions",element:J.jsx(Tc,{})}),J.jsx(g,{path:"/auctions/help",element:J.jsx(Lc,{})}),J.jsx(g,{path:"/auctions/:id",element:J.jsx(Nc,{})}),J.jsx(g,{path:"/auction/:id",element:J.jsx(hd,{})}),J.jsx(g,{path:"/pricing",element:J.jsx(pc,{})}),J.jsx(g,{path:"/shop/:slug",element:J.jsx(xc,{})}),J.jsx(g,{path:"/invite/:token",element:J.jsx(wc,{})}),J.jsx(g,{path:"/payment/success",element:J.jsx(gc,{})}),J.jsx(g,{path:"/payment/cancel",element:J.jsx(bc,{})}),J.jsx(g,{path:"/advertising",element:J.jsx(Ic,{})}),J.jsx(g,{path:"/promotions/success",element:J.jsx(Ec,{})}),J.jsx(g,{path:"/promotions/cancel",element:J.jsx(Cc,{})}),J.jsx(g,{path:"/terms",element:J.jsx(Vc,{})}),J.jsx(g,{path:"/privacy",element:J.jsx(Uc,{})}),J.jsx(g,{path:"/refund-policy",element:J.jsx(Wc,{})}),J.jsx(g,{path:"/refund",element:J.jsx(Wc,{})}),J.jsx(g,{path:"/aml-policy",element:J.jsx(Hc,{slug:"aml-policy"})}),J.jsx(g,{path:"/prohibited-activities",element:J.jsx(Hc,{slug:"prohibited-activities"})}),J.jsx(g,{path:"/merchant-model",element:J.jsx(Hc,{slug:"merchant-model"})}),J.jsx(g,{path:"/payment-flow",element:J.jsx(Hc,{slug:"payment-flow"})}),J.jsx(g,{path:"/legal",element:J.jsx(Kc,{})}),J.jsx(g,{path:"/verification-policy",element:J.jsx(qc,{})}),J.jsx(g,{path:"/vacancies",element:J.jsx(Gc,{})}),J.jsx(g,{path:"/contacts",element:J.jsx(Jc,{})}),J.jsx(g,{path:"/safe-deal",element:J.jsx(Yc,{})}),J.jsx(g,{path:"/help",element:J.jsx(Zc,{})}),J.jsx(g,{path:"/how-to-order",element:J.jsx(Qc,{})}),J.jsx(g,{path:"/shipping",element:J.jsx(Xc,{})}),J.jsx(g,{path:"/pvz",element:J.jsx(ed,{})}),J.jsx(g,{path:"/cookies",element:J.jsx(td,{})}),J.jsx(g,{path:"/auction-rules",element:J.jsx(nd,{})}),J.jsx(g,{path:"/about",element:J.jsx(ad,{})}),J.jsx(g,{path:"/faq",element:J.jsx(rd,{})}),J.jsx(g,{path:"/cart",element:J.jsx(jl,{})}),J.jsx(g,{path:"/login",element:J.jsx(yl,{})}),J.jsx(g,{path:"/register",element:J.jsx(_l,{})}),J.jsx(g,{path:"/verify-phone",element:J.jsx(wl,{})}),J.jsx(g,{path:"/watchlist",element:J.jsx($o,{children:J.jsx(Dc,{})})}),J.jsx(g,{path:"/auctions/create",element:J.jsx($o,{children:J.jsx(Pc,{})})}),J.jsx(g,{path:"/auctions/:id/edit",element:J.jsx($o,{children:J.jsx(Pc,{})})}),J.jsx(g,{path:"/auctions/:id/payment",element:J.jsx($o,{children:J.jsx($c,{})})}),J.jsx(g,{path:"/auction/:id/payment",element:J.jsx(hd,{suffix:"/payment"})}),J.jsx(g,{path:"/my/auctions",element:J.jsx($o,{children:J.jsx(Rc,{})})}),J.jsx(g,{path:"/my/shop",element:J.jsx($o,{children:J.jsx(yc,{})})}),J.jsx(g,{path:"/my/shop/members",element:J.jsx($o,{children:J.jsx(_c,{})})}),J.jsx(g,{path:"/my/shop/analytics",element:J.jsx($o,{children:J.jsx(vc,{})})}),J.jsx(g,{path:"/my/shop/bulk-upload",element:J.jsx($o,{children:J.jsx(jc,{})})}),J.jsx(g,{path:"/my/shop/api-keys",element:J.jsx($o,{children:J.jsx(kc,{})})}),J.jsx(g,{path:"/employee/shop/:slug",element:J.jsx($o,{children:J.jsx(zc,{})})}
2),J.jsx(g,{path:"/checkout/:planId",element:J.jsx($o,{children:J.jsx(hc,{})})}),J.jsx(g,{path:"/seller/dashboard",element:J.jsx($o,{children:J.jsx(uc,{})})}),J.jsx(g,{path:"/promote/:adId",element:J.jsx($o,{children:J.jsx(Sc,{})})}),J.jsx(g,{path:"/my-promotions",element:J.jsx($o,{children:J.jsx(Ac,{})})}),J.jsx(g,{path:"/ads/create",element:J.jsx($o,{children:J.jsx(pl,{})})}),J.jsx(g,{path:"/ads/:id/edit",element:J.jsx($o,{children:J.jsx(ml,{})})}),J.jsx(g,{path:"/my/ads",element:J.jsx($o,{children:J.jsx(m,{to:"/profile?tab=promotions",replace:!0})})}),J.jsx(g,{path:"/favorites",element:J.jsx($o,{children:J.jsx(fl,{})})}),J.jsx(g,{path:"/history",element:J.jsx($o,{children:J.jsx(hl,{})})}),J.jsx(g,{path:"/messages",element:J.jsx($o,{children:J.jsx(xl,{})})}),J.jsx(g,{path:"/chats",element:J.jsx($o,{children:J.jsx(kl,{})})}),J.jsx(g,{path:"/chats/:chatId",element:J.jsx($o,{children:J.jsx(kl,{})})}),J.jsx(g,{path:"/profile",element:J.jsx($o,{children:J.jsx(gl,{})})}),J.jsx(g,{path:"/deals",element:J.jsx($o,{children:J.jsx(mc,{})})}),J.jsx(g,{path:"/deals/:id",element:J.jsx($o,{children:J.jsx(fc,{})})}),J.jsx(g,{path:"/balance",element:J.jsx($o,{children:J.jsx(od,{})})}),J.jsx(g,{path:"/settings/account",element:J.jsx($o,{children:J.jsx(id,{})})}),J.jsx(g,{path:"/:username",element:J.jsx(bl,{})}),J.jsx(g,{path:"*",element:J.jsx(vl,{})})]})]})})}),r&&J.jsx(Ws,{onComplete:()=>i(!1)}),!r&&J.jsx(Ms,{}),J.jsx(qs,{disabled:r}),J.jsx(Hs,{})]})})})})},bd=s.createContext(null),xd="freezoni_favorites",yd=e=>{if(null==e)return null;const t="object"==typeof e?e.id??e.ad_id:e;return String(t||"").trim()||null},_d=e=>{const t=Array.isArray(e)?e:[];return[...new Set(t.map(yd).filter(Boolean))]},wd=({children:e})=>{const{user:t}=ba(),[n,a]=s.useState([]);s.useEffect(()=>{try{const e=localStorage.getItem(xd);if(e){const t=JSON.parse(e);Array.isArray(t)&&a(_d(t))}}catch(e){}},[]);const r=(e,t={})=>{const n=_d(e);a(n);try{localStorage.setItem(xd,JSON.stringify(n)),window.dispatchEvent(new CustomEvent("freezoni_favorites_updated",{detail:{ids:n,count:n.length,...t}}))}catch(r){}};s.useEffect(()=>{let e=!1;return(async()=>{if(t)try{const t=await zn.get("/favorites"),n=t.data?.ads||t.data?.favorites||t.data||[];e||r(n,{source:"server_sync"})}catch(n){}else r([],{source:"auth_reset"})})(),()=>{e=!0}},[t?.id]);const i=e=>n.includes(yd(e)),o={favoriteIds:n,favoritesCount:n.length,isFavorite:i,toggleFavorite:async e=>{const t=yd(e);if(!t)return;const a=i(t),o=a?n.filter(e=>e!==t):[...n,t];r(o,{adId:t,isFavorite:!a,delta:a?-1:1});try{a?await zn.delete(`/favorites/${t}`):await zn.post(`/favorites/${t}`)}catch(s){r(a?[...n,t]:n.filter(e=>e!==t),{adId:t,isFavorite:a,delta:a?1:-1})}},addFavorite:e=>{const t=yd(e);t&&!i(t)&&r([...n,t],{adId:t,isFavorite:!0,delta:1})},removeFavorite:e=>{const t=yd(e);t&&i(t)&&r(n.filter(e=>e!==t),{adId:t,isFavorite:!1,delta:-1})},clearFavorites:()=>{r([],{count:0})},syncWithServer:e=>{if(Array.isArray(e)){const n=_d(e);a(n);try{localStorage.setItem(xd,JSON.stringify(n))}catch(t){}}}};return J.jsx(bd.Provider,{value:o,children:e})},vd=()=>{const e=s.useContext(bd);if(!e)throw new Error("useFavorites must be used within FavoritesProvider");return e};(()=>{if("undefined"==typeof window||Ut===Mt)return;if(window.__freezoniAdminRouteRewriteInstalled)return;window.__freezoniAdminRouteRewriteInstalled=!0;const e=window.history.pushState.bind(window.history),t=window.history.replaceState.bind(window.history);window.history.pushState=(t,n,a)=>e(t,n,a?en(a):a),window.history.replaceState=(e,n,a)=>t(e,n,a?en(a):a),window.addEventListener("click",t=>{if(t.defaultPrevented||0!==t.button||t.metaKey||t.ctrlKey||t.shiftKey||t.altKey)return;const n=t.target?.closest?.("a[href]");if(!n||n.target||n.hasAttribute("download"))return;const a=en(n.getAttribute("href"));a&&a!==n.getAttribute("href")&&(t.preventDefault(),e({},"",a),window.dispatchEvent(new PopStateEvent("popstate")))},!0)})(),il(rl());const jd=Z.createRoot(document.getElementById("root"));window.addEventListener("error",e=>{rs(e.error||e.target?.src||e.message)&&os()}),window.addEventListener("unhandledrejection",e=>{rs(e.reason)&&os()}),window.addEventListener("vite:preloadError",e=>{e.preventDefault(),os()}),window.addEventListener("load",()=>{((e=3e4)=>{window.setTimeout(()=>{try{sessionStorage.removeItem(ts)}catch{}},e)})()}),Ft.catch(e=>{}).finally(()=>{jd.render(J.jsx(l.StrictMode,{children:J.jsx(Ue,{children:J.jsx(x,{future:{v7_startTransition:!0,v7_relativeSplatPath:!0},children:J.jsx(ga,{children:J.jsx(wd,{children:J.jsx(Ta,{children:J.jsx(gd,{})})})})})})}))});const kd=(()=>
2{if("undefined"==typeof window)return!1;const e=window.location.hostname;return"localhost"===e||"127.0.0.1"===e||"::1"===e||"[::1]"===e||e.endsWith(".localhost")})();if("serviceWorker"in navigator)if(kd)window.addEventListener("load",()=>{(async()=>{const e=await navigator.serviceWorker.getRegistrations();if(await Promise.all(e.map(e=>e.unregister())),"caches"in window){const e=await caches.keys();await Promise.all(e.filter(e=>e.startsWith("freezoni-cache-")||e.startsWith("freezoni-runtime-")).map(e=>caches.delete(e)))}})().then(()=>{navigator.serviceWorker.controller&&window.location.reload()}).catch(e=>{})});else{const e=Boolean(navigator.serviceWorker.controller),t=`/sw.js?v=${"20260613-pwa-offline-1"}`;window.addEventListener("load",()=>{navigator.serviceWorker.register(t,{updateViaCache:"none",scope:"/"}).then(e=>{e.waiting&&e.waiting.postMessage({type:"SKIP_WAITING"}),e.addEventListener("updatefound",()=>{const t=e.installing;t&&t.addEventListener("statechange",()=>{"installed"===t.state&&navigator.serviceWorker.controller&&t.postMessage({type:"SKIP_WAITING"})})})}).catch(e=>{})});let n=!1;navigator.serviceWorker.addEventListener("controllerchange",()=>{e&&!n&&(n=!0,window.location.reload())})}export{ur as $,vr as A,Ya as B,Va as C,xn as D,js as E,Hr as F,vs as G,vd as H,yo as I,wo as J,Ut as K,cs as L,vo as M,lo as N,Rt as O,qo as P,St as Q,Qt as R,Kt as S,br as T,_o as U,wr as V,dr as W,cr as X,lr as Y,mr as Z,pr as _,dn as a,jr as a0,sr as a1,kr as a2,nn as a3,Yt as a4,Fr as a5,_n as a6,wn as a7,Wt as a8,qt as a9,jn as aa,tn as ab,ir as ac,fn as ad,rt as ae,Zt as af,Ba as ag,pt as ah,bt as ai,It as aj,Tt as ak,it as al,Uo as am,nt as an,Os as ao,ka as ap,Lr as aq,so as ar,ol as as,vn as at,Gt as au,zn as b,Na as c,Cr as d,$r as e,Pr as f,mn as g,ms as h,Et as i,J as j,fs as k,Rs as l,bn as m,or as n,kt as o,Ro as p,pn as q,gr as r,Nr as s,At as t,ba as u,Ir as v,Ct as w,Tr as x,_r as y,yr as z};

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.