PageSourceSearch

https://zhege.org/_next/static/chunks/8729e7428ff4f8fb.js

js zhege.org collected 2026-10-02 16:07:59 UTC 100,323 bytes, 17 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32578,e=>{"use strict";var t=e.i(30332),a=e.i(96453),n=e.i(75819),i=e.i(9875),s=e.i(13631),r=e.i(83858),o=class extends r.Subscribable{constructor(e={}){super(),this.config=e,this.#e=new Map}#e;build(e,t,a){let s=t.queryKey,r=t.queryHash??(0,n.hashQueryKeyByOptions)(s,t),o=this.get(r);return o||(o=new i.Query({client:e,queryKey:s,queryHash:r,options:e.defaultQueryOptions(t),state:a,defaultOptions:e.getQueryDefaults(s)}),this.add(o)),o}add(e){this.#e.has(e.queryHash)||(this.#e.set(e.queryHash,e),this.notify({type:"added",query:e}))}remove(e){let t=this.#e.get(e.queryHash);t&&(e.destroy(),t===e&&this.#e.delete(e.queryHash),this.notify({type:"removed",query:e}))}clear(){s.notifyManager.batch(()=>{this.getAll().forEach(e=>{this.remove(e)})})}get(e){return this.#e.get(e)}getAll(){return[...this.#e.values()]}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchQuery)(t,e))}findAll(e={}){let t=this.getAll();return Object.keys(e).length>0?t.filter(t=>(0,n.matchQuery)(e,t)):t}notify(e){s.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}onFocus(){s.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onFocus()})})}onOnline(){s.notifyManager.batch(()=>{this.getAll().forEach(e=>{e.onOnline()})})}},l=e.i(41192),c=r,u=class extends c.Subscribable{constructor(e={}){super(),this.config=e,this.#t=new Set,this.#a=new Map,this.#n=0}#t;#a;#n;build(e,t,a){let n=new l.Mutation({client:e,mutationCache:this,mutationId:++this.#n,options:e.defaultMutationOptions(t),state:a});return this.add(n),n}add(e){this.#t.add(e);let t=d(e);if("string"==typeof t){let a=this.#a.get(t);a?a.push(e):this.#a.set(t,[e])}this.notify({type:"added",mutation:e})}remove(e){if(this.#t.delete(e)){let t=d(e);if("string"==typeof t){let a=this.#a.get(t);if(a)if(a.length>1){let t=a.indexOf(e);-1!==t&&a.splice(t,1)}else a[0]===e&&this.#a.delete(t)}}this.notify({type:"removed",mutation:e})}canRun(e){let t=d(e);if("string"!=typeof t)return!0;{let a=this.#a.get(t),n=a?.find(e=>"pending"===e.state.status);return!n||n===e}}runNext(e){let t=d(e);if("string"!=typeof t)return Promise.resolve();{let a=this.#a.get(t)?.find(t=>
1t!==e&&t.state.isPaused);return a?.continue()??Promise.resolve()}}clear(){s.notifyManager.batch(()=>{this.#t.forEach(e=>{this.notify({type:"removed",mutation:e})}),this.#t.clear(),this.#a.clear()})}getAll(){return Array.from(this.#t)}find(e){let t={exact:!0,...e};return this.getAll().find(e=>(0,n.matchMutation)(t,e))}findAll(e={}){return this.getAll().filter(t=>(0,n.matchMutation)(e,t))}notify(e){s.notifyManager.batch(()=>{this.listeners.forEach(t=>{t(e)})})}resumePausedMutations(){let e=this.getAll().filter(e=>e.state.isPaused);return s.notifyManager.batch(()=>Promise.all(e.map(e=>e.continue().catch(n.noop))))}};function d(e){return e.options.scope?.id}var h=e.i(95049),p=e.i(43785),m=e.i(42815),f=class{#i;#s;#r;#o;#l;#c;#u;#d;constructor(e={}){this.#i=e.queryCache||new o,this.#s=e.mutationCache||new u,this.#r=e.defaultOptions||{},this.#o=new Map,this.#l=new Map,this.#c=0}mount(){this.#c++,1===this.#c&&(this.#u=h.focusManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onFocus())}),this.#d=p.onlineManager.subscribe(async e=>{e&&(await this.resumePausedMutations(),this.#i.onOnline())}))}unmount(){this.#c--,0===this.#c&&(this.#u?.(),this.#u=void 0,this.#d?.(),this.#d=void 0)}isFetching(e){return this.#i.findAll({...e,fetchStatus:"fetching"}).length}isMutating(e){return this.#s.findAll({...e,status:"pending"}).length}getQueryData(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state.data}ensureQueryData(e){let t=this.defaultQueryOptions(e),a=this.#i.build(this,t),i=a.state.data;return void 0===i?this.fetchQuery(e):(e.revalidateIfStale&&a.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,a))&&this.prefetchQuery(t),Promise.resolve(i))}getQueriesData(e){return this.#i.findAll(e).map(({queryKey:e,state:t})=>[e,t.data])}setQueryData(e,t,a){let i=this.defaultQueryOptions({queryKey:e}),s=this.#i.get(i.queryHash),r=s?.state.data,o=(0,n.functionalUpdate)(t,r);if(void 0!==o)return this.#i.build(this,i).setData(o,{...a,manual:!0})}setQueriesData(e,t,a){return s.notifyManager.batch(()=>this.#i.findAll(e).map(({queryKey:e})=>[e,this.setQueryData(e,t,a)]))}getQueryState(e){let t=this.defaultQueryOptions({queryKey:e});return this.#i.get(t.queryHash)?.state}removeQueries(e){let t=this.#i;s.notifyManager.batch(()=>{t.findAll(e).forEach(e=>{t.remove(e)})})}resetQueries(e,t){let a=this.#i;return s.notifyManager.batch(()=>(a.findAll(e).forEach(e=>{e.reset()}),this.refetchQueries({type:"active",...e},t)))}cancelQueries(e,t={}){let a={revert:!0,...t};return Promise.all(s.notifyManager.batch(()=>this.#i.findAll(e).map(e=>e.cancel(a)))).then(n.noop).catch(n.noop)}invalidateQueries(e,t={}){return s.notifyManager.batch(()=>(this.#i.findAll(e).forEach(e=>{e.invalidate()}),e?.refetchType==="none")?Promise.resolve():this.refetchQueries({...e,type:e?.refetchType??e?.type??"active"},t))}refetchQueries(e,t={}){let a={...t,cancelRefetch:t.cancelRefetch??!0};return Promise.all(s.notifyManager.batch(()=>this.#i.findAll(e).filter(e=>!e.isDisabled()&&!e.isStatic()).map(e=>{let t=e.fetch(void 0,a);return a.throwOnError||(t=t.catch(n.noop)),"paused"===e.state.fetchStatus?Promise.resolve():t}))).then(n.noop)}fetchQuery(e){let t=this.defaultQueryOptions(e);void 0===t.retry&&(t.retry=!1);let a=this.#i.build(this,t);return a.isStaleByTime((0,n.resolveStaleTime)(t.staleTime,a))?a.fetch(t):Promise.resolve(a.state.data)}prefetchQuery(e){return this.fetchQuery(e).then(n.noop).catch(n.noop)}fetchInfiniteQuery(e){return e.behavior=(0,m.infiniteQueryBehavior)(e.pages),this.fetchQuery(e)}prefetchInfiniteQuery(e){return this.fetchInfiniteQuery(e).then(n.noop).catch(n.noop)}ensureInfiniteQueryData(e){return e.behavior=(0,m.infiniteQueryBehavior)(e.pages),this.ensureQueryData(e)}resumePausedMutations(){return p.onlineManager.isOnline()?this.#s.resumePausedMutations():Promise.resolve()}getQueryCache(){return this.#i}getMutationCache(){return this.#s}getDefaultOptions(){return this.#r}setDefaultOptions(e){this.#r=e}setQueryDefaults(e,t){this.#o.set((0,n.hashKey)(e),{queryKey:e,defaultOptions:t})}getQueryDefaults(e){let t=[...this.#o.values()],a={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.queryKey)&&Object.assign(a,t.defaultOptions)}),a}setMutationDefaults(e,t){this.#l.set((0,n.hashKey)(e),{mutationKey:e,defaultOptions:t})}getMutationDefaults(e){let t=[...this.#l.values()],a={};return t.forEach(t=>{(0,n.partialMatchKey)(e,t.mutationKey)&&Object.assign(a,t.defaultOptions)}),a}defaultQueryOptions(e){if(e._defaulted)return e;let t={...this.#r.queries,...this.getQueryDefaults(e.queryKey),...e,_defaulted:!0};return t.queryHash||(t.queryHash=(0,n.hashQueryKeyByOptions)(t.queryKey,t)),void 0===t.refetchOnReconnect&&(t.refetchOnReconnect="always"!==t.networkMode),void 0===t.throwOnError&&(t.throwOnError=!!t.suspense),!t.networkMode&&t.persister&&(t.networkMode="offlineFirst"),t.queryFn===n.skipToken&&(t.enabled=!1),t}defaultMutationOptions(e){return e?._defaulted?e:{...this.#r.mutations,...e?.mutationKey&&this.getMutationDefaults(e.mutationKey),...e,_defaulted:!0}}clear(){this.#i.clear(),this.#s.clear()}},y=e.i(45578),g=e.i(47472),b=e.i(30249);let w=Symbol.for("__APOLLO_CONTEXT__"),I=({client:e,children:t})=>{let a,n=((0,b.invariant)("createContext"in g,37),(a=g.createContext[w])||(Object.defineProperty(g.createContext,w,{value:a=g.createContext({}
1),enumerable:!1,writable:!1,configurable:!0}),a.displayName="ApolloContext"),a),i=g.useContext(n),s=g.useMemo(()=>({...i,client:e||i.client}),[i,e]);return(0,b.invariant)(s.client,38),g.createElement(n.Provider,{value:s},t)};var v=e.i(10493),x=e.i(11297),E=e.i(31018);function T(e){let n,i,s=(0,a.c)(5),{children:r}=e,[o]=(0,g.useState)(k);return s[0]!==r?(n=(0,t.jsx)(I,{client:v.apolloClient,children:r}),s[0]=r,s[1]=n):n=s[1],s[2]!==o||s[3]!==n?(i=(0,t.jsx)(x.MotionProvider,{children:(0,t.jsx)(E.NavigationProgressProvider,{children:(0,t.jsx)(y.QueryClientProvider,{client:o,children:n})})}),s[2]=o,s[3]=n,s[4]=i):i=s[4],i}function k(){return new f({defaultOptions:{queries:{staleTime:6e4,refetchOnWindowFocus:!1}}})}e.s(["Providers",()=>T],32578)},70584,e=>{"use strict";var t=e.i(96453),a=e.i(47472),n=e.i(45142),i=e.i(45275),s=e.i(70741),r=e.i(28032);let o="zhege.analytics.visitor.v1",l="zhege.analytics.visit.v1";class c extends Error{status;constructor(e){super("Analytics unavailable"),this.status=e}}let u=e=>e.split(/[?#]/)[0].slice(0,240),d=e=>e&&!/@|[\r\n<>]/.test(e)?e.slice(0,120):void 0;function h(e,t){try{return e.getItem(t)}catch{return null}}function p(e,t,a){try{e.setItem(t,a)}catch{}}let m=/\/(workspace-panel|support|admin)(\/|$)/,f=null,y=e=>({getItem:t=>window[e].getItem(t),setItem:(t,a)=>window[e].setItem(t,a),removeItem:t=>window[e].removeItem(t)});function g(){return f||=function(e){let t=0,a=e.accessToken(),n=null,i=null,s=null,m="",f=null,y=null,g=0,b={path:"/",query:"",referrer:"",language:""};try{i=JSON.parse(h(e.session,l)||"null")}catch{}i?.user&&((0,r.analyticsIdentityKey)(a)===`subject:${i.user}`?f=i.user:i=null);let w=()=>{let n=e.accessToken();if(n===a)return;let s=(0,r.analyticsIdentityKey)(n)===(0,r.analyticsIdentityKey)(a);if(a=n,y=null,g=0,!s){t+=1,f=null,i=null,m="",y=null,g=0;try{e.session.removeItem(l)}catch{}}},I=()=>{i&&p(e.session,l,JSON.stringify(i))},v=async(t,a,n)=>{let s=await e.fetcher(`${e.endpoint}/analytics/${t}`,{method:"POST",headers:{"Content-Type":"application/json",...n?{Authorization:`Bearer ${n}`}:{}},body:JSON.stringify(a),keepalive:!0,signal:AbortSignal.timeout(5e3)});if(!s.ok){if(401===s.status&&"identify"!==t&&a.token===i?.token){i=null,m="";try{e.session.removeItem(l)}catch{}}throw new c(s.status)}return s.json()},x=async()=>{let a=e.accessToken();if(!i||!f||!a||i.user===f||a===y||e.now()<g)return;let n=i,s=f,r=t;try{await v("identify",{token:n.token},a),i===n&&r===t&&(i.user=s,y=null,g=0,I())}catch(t){t instanceof c&&[401,403].includes(t.status)?y=a:g=e.now()+15e3}},E=async()=>{let a=t;if(!(i&&e.now()-i.lastSeenAt<18e5&&e.now()-i.startedAt<864e5)){if(i=null,s)return s;s=(async()=>{n||=h(e.local,o)||e.uuid(),p(e.local,o,n);let s=new URLSearchParams(b.query),r="";try{r=new URL(b.referrer).origin}catch{}let l=await v("visits",{visitorId:n,path:u(b.path),referrer:r,language:b.language,source:d(s.get("utm_source")),medium:d(s.get("utm_medium")),campaign:d(s.get("utm_campaign")),content:d(s.get("utm_content")),term:d(s.get("utm_term")),linkSlug:s.get("z_link")?.slice(0,64)||void 0});a===t&&(i={token:l.token,startedAt:e.now(),lastSeenAt:e.now()},m="",await x(),I())})().finally(()=>{s=null}),await s}},T=Promise.resolve(),k=0,N=a=>{w();let n=t;return e.disabled()||k>=20?Promise.resolve():(k+=1,T=T.then(async()=>{n===t&&await a(n)}).catch(()=>void 0).finally(()=>{k-=1}))},A=async(t,a,n)=>{if(!i)return;let s=i,r=e.uuid(),o={token:s.token,eventId:r,name:t,path:u(a),...void 0===n?{}:{value:Math.min(60,Math.max(0,Math.floor(n)))}};try{await v("events",o)}catch(e){if(e instanceof c&&e.status<500||i!==s)throw e;await v("events",o)}i===s&&(i.lastSeenAt=e.now(),I())};return{event:(e,a,n)=>N(async i=>{["page_view","engagement","store_click","translation","analysis","dictionary_search","speech","photo_translation","conversation_turn"].includes(e)&&(await E(),await x(),i===t&&("page_view"===e||m||(await A("page_view",a),m=u(a)),i===t&&await A(e,a,n)))}),page:(e,a,n,i)=>N(async s=>{b={path:u(e),query:a,referrer:n,language:i},await E(),await x(),s!==t||m!==u(e)&&(await A("page_view",e),m=u(e))}),identify(a){if(w(),f!==a&&(t+=1),f=a,i?.user&&i.user!==a){i=null,m="";try{e.session.removeItem(l)}catch{}}return N(async()=>{await x()})}}}({endpoint:s.PUBLIC_API_URL,fetcher:(...e)=>fetch(...e),local:y("localStorage"),session:y("sessionStorage"),now:Date.now,uuid:()=>crypto.randomUUID(),disabled:()=>"1"===navigator.doNotTrack||m.test(window.location.pathname),accessToken:()=>{try{return localStorage.getItem("accessToken")}catch{return null}}})}function b(){let e,s,r,o,l=(0,t.c)(10),c=(0,n.usePathname)(),{user:u,isLoading:d}=(0,i.useAuth)(),h=(0,a.useRef)(0);l[0]!==d||l[1]!==c||l[2]!==u?.id?(e=()=>{if(!c)return;let e=g();(async()=>{d||await e.identify(u?.id??null),await e.page(c,location.search,document.referrer,navigator.language),d||await e.identify(u?.id??null)})()},l[0]=d,l[1]=c,l[2]=u?.id,l[3]=e):e=l[3];let p=u?.id;return l[4]!==d||l[5]!==c||l[6]!==p?(s=[c,p,d],l[4]=d,l[5]=c,l[6]=p,l[7]=s):s=l[7],(0,a.useEffect)(e,s),l[8]===Symbol.for("react.memo_cache_sentinel")?(r=()=>{h.current=Date.now();let e=()=>{h.current=Date.now()},t=["pointerdown","keydown","scroll"];t.forEach(t=>window.addEventListener(t,e,{passive:!0}));let a=window.setInterval(()=>{"visible"===document.visibilityState&&Date.now()-h.current<6e4&&g().event("engagement",location.pathname,15)},15e3);return document.addEventListener("click",v),window.addEventListener("zhege:translation-complete",I),window.addEventListener("zhege:feature",w),()=>{window.removeEventListener("zhege:feature",w),window.removeEventListener("zhege:translation-complete",I),clearInterval(a),t.forEach(t=>window.removeEventListener(t,e)),document.removeEventListener("click",v)}},o=[],l[8]=r,l[9]=o):(r=l[8],o=l[9]),(0,a.useEffect)(r,o),null}function w(e){g().event(e.detail,location.pathname)}function I(){g().event("translation",location.pathname)}function v(e){let t=e.target instanceof Element?e.target.closest("a[href]"):null;if(!t)return;let a=new URL(t.getAttribute("href"),location.origin);(["apps.apple.com","play.google.com","global.app.mi.com"].includes(a.hostname)||/\/go\/(web-appstore|web-googleplay)$/.test(a.pathname))&&g().event("store_click",location.pathname)}e.s(["ZhegeAnalytics",()=>b],70584)},23255,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n={cancelIdleCallback:function(){return r},requestIdleCallback:function(){return s}};for(var i in n)Object.defineProperty(a,i,{enumerable:!0,get:n[i]});let s="u">typeof self&&self.requestIdleCallback&&self.requestIdleCallback.bind(window)||function(e){let t=Date.now();return self.setTimeout(function(){e({didTimeout:!1,timeRemaining:function(){return Math.max(0,50-(Date.now()-t))}})},1)},r="u">typeof self&&self.cancelIdleCallback&&self.cancelIdleCallback.bind(window)||function(e){return clearTimeout(e)};("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esMo
1dule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},293,(e,t,a)=>{"use strict";Object.defineProperty(a,"__esModule",{value:!0});var n={default:function(){return w},handleClientScriptLoad:function(){return y},initScriptLoader:function(){return g}};for(var i in n)Object.defineProperty(a,i,{enumerable:!0,get:n[i]});let s=e.r(38681),r=e.r(60967),o=e.r(30332),l=s._(e.r(74108)),c=r._(e.r(47472)),u=e.r(50965),d=e.r(15702),h=e.r(23255),p=new Map,m=new Set,f=e=>{let{src:t,id:a,onLoad:n=()=>{},onReady:i=null,dangerouslySetInnerHTML:s,children:r="",strategy:o="afterInteractive",onError:c,stylesheets:u}=e,h=a||t;if(h&&m.has(h))return;if(p.has(t)){m.add(h),p.get(t).then(n,c);return}let f=()=>{i&&i(),m.add(h)},y=document.createElement("script"),g=new Promise((e,t)=>{y.addEventListener("load",function(t){e(),n&&n.call(this,t),f()}),y.addEventListener("error",function(e){t(e)})}).catch(function(e){c&&c(e)});s?(y.innerHTML=s.__html||"",f()):r?(y.textContent="string"==typeof r?r:Array.isArray(r)?r.join(""):"",f()):t&&(y.src=t,p.set(t,g)),(0,d.setAttributesFromProps)(y,e),"worker"===o&&y.setAttribute("type","text/partytown"),y.setAttribute("data-nscript",o),u&&(e=>{if(l.default.preinit)return e.forEach(e=>{l.default.preinit(e,{as:"style"})});if("u">typeof window){let t=document.head;e.forEach(e=>{let a=document.createElement("link");a.type="text/css",a.rel="stylesheet",a.href=e,t.appendChild(a)})}})(u),document.body.appendChild(y)};function y(e){let{strategy:t="afterInteractive"}=e;"lazyOnload"===t?window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>f(e))}):f(e)}function g(e){e.forEach(y),[...document.querySelectorAll('[data-nscript="beforeInteractive"]'),...document.querySelectorAll('[data-nscript="beforePageRender"]')].forEach(e=>{let t=e.id||e.getAttribute("src");m.add(t)})}function b(e){let{id:t,src:a="",onLoad:n=()=>{},onReady:i=null,strategy:s="afterInteractive",onError:r,stylesheets:d,...p}=e,{updateScripts:y,scripts:g,getIsSsr:b,appDir:w,nonce:I}=(0,c.useContext)(u.HeadManagerContext);I=p.nonce||I;let v=(0,c.useRef)(!1);(0,c.useEffect)(()=>{let e=t||a;v.current||(i&&e&&m.has(e)&&i(),v.current=!0)},[i,t,a]);let x=(0,c.useRef)(!1);if((0,c.useEffect)(()=>{if(!x.current){if("afterInteractive"===s)f(e);else"lazyOnload"===s&&("complete"===document.readyState?(0,h.requestIdleCallback)(()=>f(e)):window.addEventListener("load",()=>{(0,h.requestIdleCallback)(()=>f(e))}));x.current=!0}},[e,s]),("beforeInteractive"===s||"worker"===s)&&(y?(g[s]=(g[s]||[]).concat([{id:t,src:a,onLoad:n,onReady:i,onError:r,...p,nonce:I}]),y(g)):b&&b()?m.add(t||a):b&&!b()&&f({...e,nonce:I})),w){if(d&&d.forEach(e=>{l.default.preinit(e,{as:"style"})}),"beforeInteractive"===s)if(!a)return p.dangerouslySetInnerHTML&&(p.children=p.dangerouslySetInnerHTML.__html,delete p.dangerouslySetInnerHTML),(0,o.jsx)("script",{nonce:I,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([0,{...p,id:t}])})`}});else return l.default.preload(a,p.integrity?{as:"script",integrity:p.integrity,nonce:I,crossOrigin:p.crossOrigin}:{as:"script",nonce:I,crossOrigin:p.crossOrigin}),(0,o.jsx)("script",{nonce:I,dangerouslySetInnerHTML:{__html:`(self.__next_s=self.__next_s||[]).push(${JSON.stringify([a,{...p,id:t}])})`}});"afterInteractive"===s&&a&&l.default.preload(a,p.integrity?{as:"script",integrity:p.integrity,nonce:I,crossOrigin:p.crossOrigin}:{as:"script",nonce:I,crossOrigin:p.crossOrigin})}return null}Object.defineProperty(b,"__nextScript",{value:!0});let w=b;("function"==typeof a.default||"object"==typeof a.default&&null!==a.default)&&void 0===a.default.__esModule&&(Object.defineProperty(a.default,"__esModule",{value:!0}),Object.assign(a.default,a),t.exports=a.default)},56512,(e,t,a)=>{t.exports=e.r(293)},30484,e=>{"use strict";var t=e.i(30332),a=e.i(96453),n=e.i(56512),i=e.i(667);function s(e){let s,r,o,l,c=(0,a.c)(6),{nonce:u}=e;return c[0]===Symbol.for("react.memo_cache_sentinel")?(s={__html:`
vendor: 479 bytes, lines 1-9
1
2            (function(m,e,t,r,i,k,a){
3              m[i]=m[i]||function(){(m[i].a=m[i].a||[]).push(arguments)};
4              m[i].l=1*new Date();
5              for (var j = 0; j < document.scripts.length; j++) {if (document.scripts[j].src === r) { return; }}
6              k=e.createElement(t),a=e.getElementsByTagName(t)[0],k.async=1,k.src=r,a.parentNode.insertBefore(k,a)
7            })(window, document,'script','https://mc.yandex.ru/metrika/tag.js', 'ym');
8
9            ym(
9105516726
vendor: 233 bytes, lines 9-17
9, 'init', {
10              ssr: true,
11              webvisor: true,
12              clickmap: true,
13              ecommerce: "dataLayer",
14              accurateTrackBounce: true,
15              trackLinks: true
16            });
17          
17`},c[0]=s):s=c[0],c[1]!==u?(r=(0,t.jsx)(n.default,{id:"yandex-metrika",strategy:"afterInteractive",nonce:u,dangerouslySetInnerHTML:s}),c[1]=u,c[2]=r):r=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)("noscript",{children:(0,t.jsx)("div",{children:(0,t.jsx)(i.default,{src:"https://mc.yandex.ru/watch/105516726",width:1,height:1,className:"metrika-offscreen",alt:"",unoptimized:!0})})}),c[3]=o):o=c[3],c[4]!==r?(l=(0,t.jsxs)(t.Fragment,{children:[r,o]}),c[4]=r,c[5]=l):l=c[5],l}e.s(["YandexMetrika",()=>s])},50853,e=>{"use strict";var t=e.i(46482),a=e.i(55086);function n(){let e=(0,t.useLocale)();return(0,a.setDictLangFromLocale)(e),null}e.s(["DictLangSync",()=>n])},21785,e=>{"use strict";var t=e.i(30332),a=e.i(96453),n=e.i(47472),i=e.i(46482),s=e.i(8421),r=e.i(67752),o=e.i(667),l=e.i(65347),c=e.i(69152),u=e.i(43540);let d=(0,u.default)("headphones",[["path",{d:"M3 14h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-7a9 9 0 0 1 18 0v7a2 2 0 0 1-2 2h-1a2 2 0 0 1-2-2v-3a2 2 0 0 1 2-2h3",key:"1xhozi"}]]),h=(0,u.default)("image-plus",[["path",{d:"M16 5h6",key:"1vod17"}],["path",{d:"M19 2v6",key:"4bpg5p"}],["path",{d:"M21 11.5V19a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h7.5",key:"1ue2ih"}],["path",{d:"m21 15-3.086-3.086a2 2 0 0 0-2.828 0L6 21",key:"1xmnt7"}],["circle",{cx:"9",cy:"9",r:"2",key:"af1f0g"}]]);var p=e.i(83332);let m=(0,u.default)("message-circle",[["path",{d:"M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719",key:"1sd12s"}]]),f=(0,u.default)("send",[["path",{d:"M14.536 21.686a.5.5 0 0 0 .937-.024l6.5-19a.496.496 0 0 0-.635-.635l-19 6.5a.5.5 0 0 0-.024.937l7.93 3.18a2 2 0 0 1 1.112 1.11z",key:"1ffxy3"}],["path",{d:"m21.854 2.147-10.94 10.939",key:"12cjpa"}]]);var y=e.i(97527),g=e.i(45275),b=e.i(15672),w=e.i(40861),I=e.i(39326),v=e.i(69912);let x={ACCOUNT_SECURITY:[{id:"reset-password",topicId:"ACCOUNT_SECURITY",question:"Как восстановить пароль?",answer:"Восстановление пароля доступно только на сайте: откройте страницу восстановления и укажите адрес почты, привязанный к аккаунту. Перейдите по ссылке из письма и задайте новый пароль. В приложении такого экрана нет: в него можно войти по одноразовому коду из письма.",locale:"ru",isFallback:!1},{id:"change-email",topicId:"ACCOUNT_SECURITY",question:"Как изменить адрес электронной почты?",answer:"Самостоятельно изменить адрес электронной почты сейчас нельзя. Создайте обращение с текущим и новым адресами; не указывайте в нём пароль или код из письма.",locale:"ru",isFallback:!1},{id:"verify-email",topicId:"ACCOUNT_SECURITY",question:"Почему нужно подтвердить электронную почту?",answer:"Подтверждение помогает защитить аккаунт. Откройте письмо после регистрации и перейдите по ссылке. Если ссылка устарела, на экране подтверждения почты или после сообщения о неподтверждённой почте при входе с паролем можно отправить письмо ещё раз.",locale:"ru",isFallback:!1},{id:"unknown-login",topicId:"ACCOUNT_SECURITY",question:"Я заметил незнакомый вход в аккаунт. Что делать?",answer:"Восстановите пароль на сайте — для этого не нужно знать прежний пароль. Затем выйдите из аккаунта на устройстве, которому не доверяете, и убедитесь, что доступ к почте аккаунта есть только у вас. Если прежний пароль вы помните, сменить его можно и в профиле. Не отправляйте пароль или код из письма в обращении.",locale:"ru",isFallback:!1},{id:"delete-account",topicId:"ACCOUNT_SECURITY",question:"Как удалить аккаунт и данные?",answer:"Откройте профиль, выберите удаление аккаунта и подтвердите действие. Коллекции, сохранённые данные и история входа удаляются без возможности восстановления. Если кнопка недоступна, обратитесь в поддержку с адреса, привязанного к аккаунту.",locale:"ru",isFallback:!1}],BILLING:[{id:"plan-status",topicId:"BILLING",question:"Где посмотреть статус моего тарифа?",answer:"Отдельный статус тарифа в приложении и Ð
17½Ð° сайте не показывается. Доступный остаток запросов виден на экране «Анализ» в приложении и в профиле на сайте. Информацию о вариантах лимитов можно посмотреть на сайте.",locale:"ru",isFallback:!1},{id:"iphone-manage",topicId:"BILLING",question:"Как управлять подпиской на iPhone?",answer:"В ZHEGE нет экрана управления подпиской на iPhone. Если покупка была оформлена через Apple, управление ею выполняется в настройках Apple ID в разделе «Подписки», а не в приложении.",locale:"ru",isFallback:!1},{id:"iphone-refund",topicId:"BILLING",question:"Как запросить возврат за покупку на iPhone?",answer:"Если покупка была оформлена через Apple, запрос на возврат нужно отправить через reportaproblem.apple.com с тем же Apple ID. Решение по такому запросу принимает Apple.",locale:"ru",isFallback:!1},{id:"purchase-not-active",topicId:"BILLING",question:"Покупка есть, но функции не открылись. Что делать?",answer:"Убедитесь, что вы вошли в тот же аккаунт ZHEGE, для которого был получен код. Проверьте остаток запросов: в приложении он показан на экране «Анализ», на сайте — в профиле. Если лимит не изменился, создайте обращение и укажите дату получения кода.",locale:"ru",isFallback:!1},{id:"payment-method",topicId:"BILLING",question:"Почему не проходит оплата?",answer:"Прямой оплаты в приложении нет. Варианты лимитов и контакты для их оформления указаны на сайте. Если при оплате через сторонний сервис возникла ошибка, уточните её у этого сервиса и приложите описание к обращению.",locale:"ru",isFallback:!1}],LIMITS_FEATURES:[{id:"daily-limit",topicId:"LIMITS_FEATURES",question:"Почему я достиг дневного лимита?",answer:"Дневные лимиты помогают сохранять стабильную работу поиска и анализа для всех пользователей. Лимит обновляется автоматически; не нужно переустанавливать приложение или создавать новый аккаунт.",locale:"ru",isFallback:!1},{id:"remaining-requests",topicId:"LIMITS_FEATURES",question:"Где посмотреть, сколько запросов осталось?",answer:"В приложении остаток запросов на сегодня показан на экране «Анализ» рядом с действием. На сайте он показан в профиле. Если счётчик не обновился после действия, обновите соответствующий экран.",locale:"ru",isFallback:!1},{id:"coupon",topicId:"LIMITS_FEATURES",question:"Как применить код на лимиты?",answer:"Код можно активировать только на сайте: откройте профиль, найдите карточку «Ввести купон», введите код и нажмите «Активировать купон». В приложении ввод купона недоступен. После успешной активации новый дневной лимит применяется автоматически.",locale:"ru",isFallback:!1},{id:"collections",topicId:"LIMITS_FEATURES",question:"Как сохранять слова и разборы?",answer:"Откройте карточку слова или результат разбора и выберите сохранение в коллекцию. Для работы с сохранёнными данными откройте раздел «Коллекции»; в приложении это отдельная вкладка. Там можно просматривать, переименовывать и удалять ненужные записи. Для синхронизации сохранённых данных войдите в аккаунт.",locale:"ru",isFallback:!1},{id:"history",topicId:"LIMITS_FEATURES",question:"Где найти историю поиска и переводов?",answer:"Откройте профиль и перейдите в раздел истории. Там можно вернуться к недавним поискам, разборам и диалогам. Если нужной записи нет, проверьте, что вы используете тот же аккаунт и не удаляли историю.",locale:"ru",isFallback:!1}],TRANSLATION_ERROR:[{id:"wrong-meaning",topicId:"TRANSLATION_ERROR",question:"Перевод или значение слова неверные. Как сообщить?",answer:"Откройте результат, скопируйте слово или фразу и создайте обращение с правильным вариантом, если он известен. Укажите язык исходного текста и язык перевода. Скриншот поможет увидеть проблему в контексте.",locale:"ru",isFallback:!1},{id:"wrong-language",topicId:"TRANSLATION_ERROR",question:"Приложение определило не тот язык. Что сделать?",answer:"Проверьте, что в запросе нет лишних символов, и повторите поиск короткой фразой. Если доступен выбор направления перевода, укажите его вручную. При повторении проблемы отправьте пример исходного текста в поддержку.",locale:"ru",isFallback:!1},{id:"no-result",topicId:"TRANSLATION_ERROR",question:"Поиск не нашёл слово или выражение.",answer:"Проверьте написание, тоны пиньиня и пробелы между словами. Для длинной фразы попробуйте сначала выполнить разбор текста, а затем открыть отдельные слова. Если выражение всё равно не находится, отправьте его через обращение.",locale:"ru",isFallback:!1},{id:"context",topicId:"TRANSLATION_ERROR",question:"Как получить перевод фразы с учётом контекста?",answer:"Вставьте полную фразу в разбор текста, а не отдельное слово. Откройте результаты по словам, чтобы сравнить варианты значения. Если контекст важен, добавьте его в обращение вместе с исходной фразой.",locale:"ru",isFallback:!1},{id:"report-example",topicId:"TRANSLATION_ERROR",question:"Что приложить к сообщению об ошибке перевода?",answer:"Укажите исходный текст, полученный результат и язык, с которого выполнялся перевод. Добавьте, где текст встретился: например, в меню, переписке или документе. Не отправляйте личные данные, если они не нужны для понимания ошибки.",locale:"ru",isFallback:!1}],MEDIA_INPUT:[{id:"photo-recognition",topicId:"MEDIA_INPUT",question:"Как распознать текст на фотографии?",answer:"В приложении откройте действие с фото, сделайте снимок или выберите изображение из галереи. После этого дождитесь распознавания и проверьте текст перед вставкой в поиск или разбор. На снимке должен быть хорошо виден текст.",locale:"ru",isFallback:!1},{id:"photo-no-text",topicId:"MEDIA_INPUT",question:"Почему текст на фото не распознался?",answer:"Сделайте новый снимок при хорошем освещении и расположите текст ровно в кадре. При необходимости обрежьте изображение, оставив только нужную надпись. Если проблема повторяется, приложите фото к обращению.",locale:"ru",isFallback:!1},{id:"voice-input",topicId:"MEDIA_INPUT",question:"Как пользоваться голосовым вводом?",answer:"Нажмите кнопку голосового ввода, разрешите доступ к микрофону и произнесите слово или фразу. После остановки записи проверьте распознанный текст и вставьте его в поиск. Для голосового ввода нужен вход в аккаунт и подключение к сети.",locale:"ru",isFallback:!1},{id:"live-conversation",topicId:"MEDIA_INPUT",question:"Как работает живой перевод разговора?",answer:"Откройте режим разговора и говорите по очереди на выбранных языках. Приложение переводит живую речь в реальном времени и сохраняет диалог в истории. Перед началом разрешите доступ к микрофону.",locale:"ru",isFallback:!1},{id:"document-text",topicId:"MEDIA_INPUT",question:"Можно ли разобрать текст из документа или скриншота?",answer:"Сохраните нужную страницу как изображение или сделайте скриншот, затем выберите его в действии с фото. Проверьте распознанный текст и при необходимости исправьте его вручную перед разбором. Если изображение содержит личные данные, закройте их до отправки в поддержку.",locale:"ru",isFallback:!1}],TECHNICAL:[{id:"app-not-open",topicId:"TECHNICAL",question:"Приложение не открывается или сразу закрывается.",answer:"Полностью закройте приложение и откройте его снова. Проверьте, что на устройстве достаточно свободного места и установлена актуальная версия приложения. Если это не помогло, отправьте в поддержку модель устройства, версию системы и описание момента, когда возникает ошибка.",locale:"ru",isFallback:!1}
17,{id:"network-error",topicId:"TECHNICAL",question:"Появляется ошибка подключения.",answer:"Проверьте подключение устройства к сети и попробуйте повторить действие через несколько минут. Переключитесь между Wi-Fi и мобильной сетью, если это возможно. Если ошибка остаётся, приложите скриншот сообщения к обращению.",locale:"ru",isFallback:!1},{id:"update-app",topicId:"TECHNICAL",question:"Как обновить приложение?",answer:"Откройте страницу ZHEGE в App Store или Google Play и нажмите «Обновить», если кнопка доступна. После обновления откройте приложение снова. Если магазин не показывает обновление, проверьте, что вы вошли в правильный аккаунт магазина.",locale:"ru",isFallback:!1},{id:"notifications",topicId:"TECHNICAL",question:"Почему не приходят уведомления?",answer:"Откройте настройки устройства и разрешите уведомления для ZHEGE. Затем откройте в приложении экран «Настройки» и проверьте переключатель уведомлений. Если уведомления по-прежнему не приходят, отправьте обращение с моделью устройства и версией системы.",locale:"ru",isFallback:!1},{id:"send-diagnostics",topicId:"TECHNICAL",question:"Какие данные нужны для обращения о технической ошибке?",answer:"Опишите, что вы нажали и что произошло вместо ожидаемого результата. Добавьте модель устройства, версию системы, версию приложения и скриншот ошибки, если он есть. Не включайте в скриншоты пароли, коды входа или платёжные данные.",locale:"ru",isFallback:!1}],ENTERPRISE:[{id:"business-plan",topicId:"ENTERPRISE",question:"Для кого подходит корпоративный тариф?",answer:"Опишите задачу в обращении: сферу работы, предполагаемое число пользователей и что именно нужно получить. Отдельного тарифа для организаций с самостоятельным подключением сейчас нет — такие запросы обсуждаются индивидуально. Мы ответим с возможными вариантами.",locale:"ru",isFallback:!1},{id:"team-access",topicId:"ENTERPRISE",question:"Можно ли подключить несколько сотрудников?",answer:"Опишите в обращении, сколько сотрудников должны пользоваться сервисом и нужен ли общий доступ к материалам. Это поможет подобрать подходящий вариант работы для команды. Не передавайте один пароль нескольким людям.",locale:"ru",isFallback:!1},{id:"invoice",topicId:"ENTERPRISE",question:"Нужны документы для организации.",answer:"Создайте обращение по корпоративному тарифу и укажите страну регистрации организации и нужный вид документа. Добавьте реквизиты только если поддержка запросит их в защищённом канале. Мы сообщим, какие сведения можно предоставить для вашего случая.",locale:"ru",isFallback:!1},{id:"training",topicId:"ENTERPRISE",question:"Можно ли использовать ZHEGE для обучения?",answer:"Сервис можно использовать как словарь, для разбора текста и практики по уровням HSK. Опишите в обращении формат обучения и языки группы. Поддержка поможет понять, какие текущие функции подойдут вашей задаче.",locale:"ru",isFallback:!1},{id:"business-contact",topicId:"ENTERPRISE",question:"Как связаться по корпоративному вопросу?",answer:"Выберите тему «Корпоративный тариф» и кратко опишите ваш запрос. Оставьте рабочий адрес почты, чтобы получить ответ в переписке обращения. Не отправляйте пароли или данные банковских карт.",locale:"ru",isFallback:!1}],FEEDBACK_OTHER:[{id:"feature-request",topicId:"FEEDBACK_OTHER",question:"Как предложить новую функцию?",answer:"Выберите эту тему и опишите, какую задачу должна решать функция. Приведите пример, как вы используете приложение сейчас. Чем конкретнее сценарий, тем легче передать предложение команде.",locale:"ru",isFallback:!1},{id:"leave-feedback",topicId:"FEEDBACK_OTHER",question:"Где оставить отзыв о приложении?",answer:"Создайте обращение и расскажите, что вам понравилось или что мешает пользоваться сервисом. Можно также оставить оценку и отзыв в магазине приложений. Не добавляйте в публичный отзыв личные данные.",locale:"ru",isFallback:!1},{id:"other-question",topicId:"FEEDBACK_OTHER",question:"Мой вопрос не подходит ни к одной теме.",answer:"Выберите эту тему и кратко опишите ситуацию своими словами. Укажите, в каком разделе приложения возник вопрос, и добавьте скриншот при необходимости. Поддержка направит обращение по нужному направлению.",locale:"ru",isFallback:!1},{id:"contact-support",topicId:"FEEDBACK_OTHER",question:"Как создать обращение в поддержку?",answer:"Откройте раздел поддержки, выберите наиболее близкую тему и сначала посмотрите готовые ответы. Если решение не помогло, заполните сообщение с описанием проблемы. Для ответа укажите доступный адрес электронной почты или войдите в аккаунт.",locale:"ru",isFallback:!1},{id:"privacy-feedback",topicId:"FEEDBACK_OTHER",question:"Можно ли отправить скриншот или запись экрана?",answer:"Да, если они помогают показать проблему. Перед отправкой закройте на изображении личные сообщения, пароли, коды и платёжные данные. Добавьте короткое описание того, что нужно увидеть на скриншоте.",locale:"ru",isFallback:!1}]},E=["ACCOUNT_SECURITY","BILLING","LIMITS_FEATURES","TRANSLATION_ERROR","MEDIA_INPUT","TECHNICAL","ENTERPRISE","FEEDBACK_OTHER"],T={ru:{ACCOUNT_SECURITY:"Аккаунт и безопасность",BILLING:"Подписка и оплата",LIMITS_FEATURES:"Лимиты и функции",TRANSLATION_ERROR:"Ошибка перевода",MEDIA_INPUT:"Фото, голос и доÐ
17ºÑƒÐ¼ÐµÐ½Ñ‚Ñ‹",TECHNICAL:"Техническая проблема",ENTERPRISE:"Корпоративный тариф",FEEDBACK_OTHER:"Предложение, отзыв или другое"},en:{ACCOUNT_SECURITY:"Account and security",BILLING:"Subscription and payment",LIMITS_FEATURES:"Limits and features",TRANSLATION_ERROR:"Translation issue",MEDIA_INPUT:"Photos, voice, and documents",TECHNICAL:"Technical issue",ENTERPRISE:"Business plan",FEEDBACK_OTHER:"Suggestion, feedback, or other"},zh:{ACCOUNT_SECURITY:"账户与安全",BILLING:"订阅与付款",LIMITS_FEATURES:"限额与功能",TRANSLATION_ERROR:"翻译问题",MEDIA_INPUT:"照片、语音和文档",TECHNICAL:"技术问题",ENTERPRISE:"企业方案",FEEDBACK_OTHER:"建议、反馈或其他问题"}};function k(e,t=!1){return E.map(a=>({id:a,name:T[e][a],locale:e,isFallback:t}))}let N={ru:x,en:{ACCOUNT_SECURITY:[{id:"reset-password",topicId:"ACCOUNT_SECURITY",question:"How do I reset my password?",answer:"Password recovery is available only on the website: open the recovery page and enter the email linked to your account. Follow the link in the email and set a new password. There is no such screen in the app; you can sign in there with a one-time code from email.",locale:"en",isFallback:!1},{id:"change-email",topicId:"ACCOUNT_SECURITY",question:"How do I change my email address?",answer:"Changing your email address yourself is not currently available. Create a support request with the current and new addresses; never include a password or email code.",locale:"en",isFallback:!1},{id:"verify-email",topicId:"ACCOUNT_SECURITY",question:"Why do I need to verify my email?",answer:"Verification helps protect your account. Open the email sent after registration and follow the link. If the link has expired, you can resend the email from the email-verification screen or after an unverified-email message when signing in with a password.",locale:"en",isFallback:!1},{id:"unknown-login",topicId:"ACCOUNT_SECURITY",question:"I noticed an unfamiliar sign-in. What should I do?",answer:"Reset your password on the website — this does not require knowing the previous one. Then sign out on the device you do not trust and make sure only you can access the account email. If you do remember the previous password, you can change it in your profile instead. Do not send a password or email code in a support request.",locale:"en",isFallback:!1},{id:"delete-account",topicId:"ACCOUNT_SECURITY",question:"How do I delete my account and data?",answer:"Open your profile, select account deletion, and confirm the action. Collections, saved data, and sign-in history are deleted and cannot be restored. If the button is unavailable, contact support from the email linked to the account.",locale:"en",isFallback:!1}],BILLING:[{id:"plan-status",topicId:"BILLING",question:"Where can I see my plan status?",answer:"The app and website do not show a separate plan-status screen. The remaining request balance appears on the Analyze screen in the app and in the profile on the website. Information about available limit options is on the website.",locale:"en",isFallback:!1},{id:"iphone-manage",topicId:"BILLING",question:"How do I manage a subscription on iPhone?",answer:"ZHEGE has no iPhone subscription-management screen. If a purchase was made through Apple, manage it in the Subscriptions section of Apple ID settings, not in the app.",locale:"en",isFallback:!1},{id:"iphone-refund",topicId:"BILLING",question:"How do I request a refund for an iPhone purchase?",answer:"If a purchase was made through Apple, submit a refund request through reportaproblem.apple.com using the same Apple ID. Apple decides on the request.",locale:"en",isFallback:!1},{id:"purchase-not-active",topicId:"BILLING",question:"I made a purchase, but the features are not available. What do I do?",answer:"Make sure you are signed in to the same ZHEGE account for which the code was received. Check the remaining requests: they appear on the Analyze screen in the app and in the profile on the website. If the limit has not changed, create a support request and state the date you received the code.",locale:"en",isFallback:!1},{id:"payment-method",topicId:"BILLING",question:"Why is my payment not going through?",answer:"There is no direct payment in the app. Available limit options and contacts for arranging them are listed on the website. If an error occurs while paying through a third-party service, check it with that service and include a description in a support request.",locale:"en",isFallback:!1}],LIMITS_FEATURES:[{id:"daily-limit",topicId:"LIMITS_FEATURES",question:"Why have I reached a daily limit?",answer:"Daily limits help keep search and text analysis stable for everyone. The limit renews automatically, so you do not need to reinstall the app or create another account.",locale:"en",isFallback:!1},{id:"remaining-requests",topicId:"LIMITS_FEATURES",question:"Where can I see how many requests are left?",answer:"In the app, the remaining requests for today appear on the Analyze screen next to the action. On the website, they appear in the profile. If the counter has not refreshed after an action, refresh the relevant screen.",locale:"en",isFallback:!1},{id:"coupon",topicId:"LIMITS_FEATURES",question:"How do I apply a code for limits?",answer:"A code can be activated only on the website: open the profile, find the Enter coupon card, enter the code, and select Activate coupon. Coupon entry is unavailable in the app. After successful activation, the new daily limit is applied automatically.",locale:"en",isFallback:!1},{id:"collections",topicId:"LIMITS_FEATURES",question:"How do I save words and analyses?",answer:"Open a word card or an analysis result and select the option to save it to a collection. To work with saved data, open Collections; in the app it is a separate tab. There you can view, rename, or remove entries you no longer need. Sign in to synchronize saved data.",locale:"en",isFallback:!1},{id:"history",topicId:"LIMITS_FEATURES",question:"Where can I find my search and translation history?",answer:"Open your profile and go to History. There you can return to recent searches, analyses, and conversations. If an entry is missing, check that you are using the same account and have not removed the history.",locale:"en",isFallback:!1}],TRANSLATION_ERROR:[{id:"wrong-meaning",topicId:"TRANSLATION_ERROR",question:"A translation or word meaning is wrong. How can I report it?",answer:"Open the result, copy the word or phrase, and contact support with the correct version if you know it. State the source and target languages. A screenshot can help show the issue in context.",locale:"en",isFallback:!1},{id:"wrong-language",topicId:"TRANSLATION_ERROR",question:"The app detected the wrong language. What should I do?",answer:"Make sure the query has no extra characters and try searching a shorter phrase. If you can choose the translation direction, set it manually. If the issue repeats, send an example of the original text to supp
17ort.",locale:"en",isFallback:!1},{id:"no-result",topicId:"TRANSLATION_ERROR",question:"Search did not find a word or expression.",answer:"Check the spelling, pinyin tones, and spaces between words. For a long phrase, try text analysis first and then open the individual words. If the expression is still not found, send it in a support request.",locale:"en",isFallback:!1},{id:"context",topicId:"TRANSLATION_ERROR",question:"How can I translate a phrase with context?",answer:"Paste the full phrase into text analysis instead of searching for a single word. Open the results for each word to compare possible meanings. If context matters, include it in your support request with the original phrase.",locale:"en",isFallback:!1},{id:"report-example",topicId:"TRANSLATION_ERROR",question:"What should I include in a translation-error report?",answer:"Include the original text, the result you received, and the language from which it was translated. Add where the text appeared, such as a menu, chat, or document. Do not send personal data unless it is needed to understand the issue.",locale:"en",isFallback:!1}],MEDIA_INPUT:[{id:"photo-recognition",topicId:"MEDIA_INPUT",question:"How do I recognize text from a photo?",answer:"In the app, open the photo action, take a picture, or choose an image from the gallery. Then wait for recognition and check the text before inserting it into search or analysis. The text should be clearly visible in the image.",locale:"en",isFallback:!1},{id:"photo-no-text",topicId:"MEDIA_INPUT",question:"Why was text not recognized in my photo?",answer:"Take a new picture in good lighting and keep the text straight in the frame. If needed, crop the image so only the required text remains. If the issue repeats, attach the photo to a support request.",locale:"en",isFallback:!1},{id:"voice-input",topicId:"MEDIA_INPUT",question:"How do I use voice input?",answer:"Tap the voice-input button, allow microphone access, and say a word or phrase. After recording stops, check the recognized text and insert it into search. Voice input requires signing in and a network connection.",locale:"en",isFallback:!1},{id:"live-conversation",topicId:"MEDIA_INPUT",question:"How does live conversation translation work?",answer:"Open conversation mode and speak in turn in the selected languages. The app translates live speech in real time and saves the conversation in history. Allow microphone access before starting.",locale:"en",isFallback:!1},{id:"document-text",topicId:"MEDIA_INPUT",question:"Can I analyze text from a document or screenshot?",answer:"Save the needed page as an image or take a screenshot, then select it in the photo action. Check the recognized text and edit it manually if needed before analysis. Hide personal data in the image before sending it to support.",locale:"en",isFallback:!1}],TECHNICAL:[{id:"app-not-open",topicId:"TECHNICAL",question:"The app will not open or closes immediately.",answer:"Fully close the app and open it again. Check that your device has enough free space and the current app version is installed. If this does not help, contact support with your device model, system version, and when the error happens.",locale:"en",isFallback:!1},{id:"network-error",topicId:"TECHNICAL",question:"I see a connection error.",answer:"Check your device network connection and try the action again after a few minutes. Switch between Wi-Fi and mobile data if possible. If the error remains, attach a screenshot of the message to a support request.",locale:"en",isFallback:!1},{id:"update-app",topicId:"TECHNICAL",question:"How do I update the app?",answer:"Open the ZHEGE page in the App Store or Google Play and select Update when it is available. Open the app again after the update. If the store does not show an update, make sure you are signed in to the correct store account.",locale:"en",isFallback:!1},{id:"notifications",topicId:"TECHNICAL",question:"Why am I not receiving notifications?",answer:"Open device settings and allow notifications for ZHEGE. Then open the Settings screen in the app and check the notification switch. If notifications still do not arrive, contact support with your device model and system version.",locale:"en",isFallback:!1},{id:"send-diagnostics",topicId:"TECHNICAL",question:"What information is needed for a technical-error request?",answer:"Describe what you selected and what happened instead of the expected result. Add your device model, system version, app version, and an error screenshot if available. Do not include passwords, sign-in codes, or payment data in screenshots.",locale:"en",isFallback:!1}],ENTERPRISE:[{id:"business-plan",topicId:"ENTERPRISE",question:"Who is the business plan for?",answer:"Describe your case in a support request: your field, the expected number of users, and what exactly you need. There is no self-serve plan for organizations at the moment — such requests are discussed individually. We will reply with the possible options.",locale:"en",isFallback:!1},{id:"team-access",topicId:"ENTERPRISE",question:"Can several employees be connected?",answer:"Describe how many employees need the service and whether shared access to materials is needed. This helps identify a suitable way for the team to work. Do not share one password with several people.",locale:"en",isFallback:!1},{id:"invoice",topicId:"ENTERPRISE",question:"My organization needs documents.",answer:"Contact support about the business plan and state the organization’s country of registration and the type of document needed. Provide details only if support requests them through a secure channel. We will explain what information can be provided for your case.",locale:"en",isFallback:!1},{id:"training",topicId:"ENTERPRISE",question:"Can ZHEGE be used for training?",answer:"The service can be used as a dictionary, for text analysis, and for HSK-level practice. Describe the training format and the group languages in a support request. Support can help determine which current features fit your task.",locale:"en",isFallback:!1},{id:"business-contact",topicId:"ENTERPRISE",question:"How do I contact you about a business question?",answer:"Choose the Business plan topic and briefly describe your request. Leave a work email address so you can receive a reply in the support thread. Do not send passwords or bank-card details.",locale:"en",isFallback:!1}],FEEDBACK_OTHER:[{id:"feature-request",topicId:"FEEDBACK_OTHER",question:"How can I suggest a new feature?",answer:"Choose this topic and describe the task the feature should solve. Give an example of how you use the app today. A specific sce
17nario makes it easier to pass the suggestion to the team.",locale:"en",isFallback:!1},{id:"leave-feedback",topicId:"FEEDBACK_OTHER",question:"Where can I leave feedback about the app?",answer:"Contact support and tell us what you liked or what prevents you from using the service. You can also leave a rating and review in the app store. Do not put personal data in a public review.",locale:"en",isFallback:!1},{id:"other-question",topicId:"FEEDBACK_OTHER",question:"My question does not fit any topic.",answer:"Choose this topic and describe the situation in your own words. State which app section the question concerns and add a screenshot if needed. Support will route the request to the right area.",locale:"en",isFallback:!1},{id:"contact-support",topicId:"FEEDBACK_OTHER",question:"How do I create a support request?",answer:"Open the support section, choose the closest topic, and check the available answers first. If they do not resolve the issue, fill in a message describing the problem. For a reply, provide an accessible email address or sign in to your account.",locale:"en",isFallback:!1},{id:"privacy-feedback",topicId:"FEEDBACK_OTHER",question:"Can I send a screenshot or screen recording?",answer:"Yes, if it helps demonstrate the issue. Before sending, hide personal messages, passwords, codes, and payment details in the image. Add a short note explaining what should be seen in the screenshot.",locale:"en",isFallback:!1}]},zh:{ACCOUNT_SECURITY:[{id:"reset-password",topicId:"ACCOUNT_SECURITY",question:"如何重置密码?",answer:"密码恢复仅可在网站上完成:打开密码恢复页面,输入与账户绑定的邮箱。通过邮件中的链接设置新密码。应用中没有此页面;可使用邮件中的一次性验证码登录应用。",locale:"zh",isFallback:!1},{id:"change-email",topicId:"ACCOUNT_SECURITY",question:"如何更改邮箱地址?",answer:"目前无法自行更改邮箱地址。请提交包含当前和新邮箱地址的支持请求;请勿填写密码或邮件验证码。",locale:"zh",isFallback:!1},{id:"verify-email",topicId:"ACCOUNT_SECURITY",question:"为什么需要验证邮箱?",answer:"验证有助于保护账户。注册后打开收到的邮件并点击验证链接。若链接已过期,可在邮箱验证页面或使用密码登录时收到未验证提示后重新发送邮件。",locale:"zh",isFallback:!1},{id:"unknown-login",topicId:"ACCOUNT_SECURITY",question:"我发现了陌生的登录记录,该怎么办?",answer:"请在网站上重置密码——无需知道原密码。然后在不可信的设备上退出登录,并确认只有您能访问账户邮箱。如果您仍记得原密码,也可以在个人资料中直接更改。请勿在支持请求中发送密码或邮件验证码。",locale:"zh",isFallback:!1},{id:"delete-account",topicId:"ACCOUNT_SECURITY",question:"如何删除账户和数据?",answer:"打开个人资料,选择删除账户并确认操作。收藏、已保存的数据和登录历史会被删除且无法恢复;若按钮不可用,请使用绑定邮箱联系支持团队。",locale:"zh",isFallback:!1}],BILLING:[{id:"plan-status",topicId:"BILLING",question:"在哪里查看我的方案状态?",answer:"应用和网站都没有单独的方案状态页面。应用中可在“分析”页面查看剩余请求次数,网站中可在个人资料查看。可用限额选项的信息在网站上。",locale:"zh",isFallback:!1},{id:"iphone-manage",topicId:"BILLING",question:"如何在 iPhone 上管理订阅?",answer:"ZHEGE 没有 iPhone 订阅管理页面。如果购买是通过 Apple 完成的,请在 Apple ID 设置的“订阅”部分管理,而不是在应用中管理。",locale:"zh",isFallback:!1},{id:"iphone-refund",topicId:"BILLING",question:"如何为 iPhone 购买申请退款?",answer:"如果购买是通过 Apple 完成的,请使用同一 Apple ID 在 reportaproblem.apple.com 提交退款请求。Apple 会决定该请求。",locale:"zh",isFallback:!1},{id:"purchase-not-active",topicId:"BILLING",question:"我已购买,但功能没有开放,怎么办?",answer:"请确认登录的是收到代码时使用的同一 ZHEGE 账户。检查剩余请求次数:应用中显示在“分析”页面,网站中显示在个人资料。若限额没有变化,请提交支持请求并说明收到代码的日期。",locale:"zh",is
17Fallback:!1},{id:"payment-method",topicId:"BILLING",question:"为什么付款无法完成?",answer:"应用中没有直接付款功能。可用限额选项和办理联系方式列在网站上。如果通过第三方服务付款时出现错误,请向该服务确认,并在支持请求中附上说明。",locale:"zh",isFallback:!1}],LIMITS_FEATURES:[{id:"daily-limit",topicId:"LIMITS_FEATURES",question:"为什么我已达到每日限额?",answer:"每日限额有助于让搜索和文本分析对所有用户保持稳定。限额会自动更新,无需重新安装应用或创建另一个账户。",locale:"zh",isFallback:!1},{id:"remaining-requests",topicId:"LIMITS_FEATURES",question:"在哪里查看剩余请求次数?",answer:"在应用中,今天剩余的请求次数显示在“分析”页面的操作旁。在网站中,它显示在个人资料。若操作后计数没有更新,请刷新相应页面。",locale:"zh",isFallback:!1},{id:"coupon",topicId:"LIMITS_FEATURES",question:"如何使用限额代码?",answer:"代码只能在网站上激活:打开个人资料,找到“输入优惠券”卡片,输入代码并点击“激活优惠券”。应用中无法输入优惠券。成功激活后,新的每日限额会自动应用。",locale:"zh",isFallback:!1},{id:"collections",topicId:"LIMITS_FEATURES",question:"如何保存词语和分析结果?",answer:"打开词卡或分析结果,选择保存到收藏夹。要管理已保存的数据,请打开“收藏夹”;在应用中它是单独的标签页。您可在那里查看、重命名或删除不需要的条目;登录账户可同步已保存的数据。",locale:"zh",isFallback:!1},{id:"history",topicId:"LIMITS_FEATURES",question:"在哪里找到搜索和翻译历史?",answer:"打开个人资料并进入历史记录。您可以在那里查看最近的搜索、分析和对话;若某条记录缺失,请确认使用的是同一账户且没有删除历史。",locale:"zh",isFallback:!1}],TRANSLATION_ERROR:[{id:"wrong-meaning",topicId:"TRANSLATION_ERROR",question:"翻译或词义不正确,如何报告?",answer:"打开结果,复制词语或短语,并在知道正确版本时提交给支持团队。请说明源语言和目标语言,截图也有助于展示上下文中的问题。",locale:"zh",isFallback:!1},{id:"wrong-language",topicId:"TRANSLATION_ERROR",question:"应用识别错了语言,该怎么做?",answer:"确认查询中没有多余字符,并尝试搜索更短的短语。如果可以选择翻译方向,请手动设置;若问题反复出现,请向支持团队发送原文示例。",locale:"zh",isFallback:!1},{id:"no-result",topicId:"TRANSLATION_ERROR",question:"搜索没有找到词语或表达。",answer:"请检查拼写、拼音声调和词语之间的空格。对于长句,先尝试文本分析再打开单个词语;若仍然找不到,请在支持请求中发送该表达。",locale:"zh",isFallback:!1},{id:"context",topicId:"TRANSLATION_ERROR",question:"如何结合上下文翻译短语?",answer:"请将完整短语粘贴到文本分析中,而不是只搜索一个词。打开每个词的结果以比较可能的含义;若上下文很重要,请在支持请求中附上原句。",locale:"zh",isFallback:!1},{id:"report-example",topicId:"TRANSLATION_ERROR",question:"报告翻译错误时应提供什么?",answer:"请提供原文、得到的结果和翻译所用的语言。说明文本出现的位置,例如菜单、聊天或文档;除非理解问题所需,否则不要发送个人信息。",locale:"zh",isFallback:!1}],MEDIA_INPUT:[{id:"photo-recognition",topicId:"MEDIA_INPUT",question:"如何从照片中识别文字?",answer:"在应用中打开照片操作,拍摄照片或从相册选择图片。然后等待识别完成,并在插入搜索或分析前检查文字;图片中的文字应清晰可见。",locale:"zh",isFallback:!1},{id:"photo-no-text",topicId:"MEDIA_INPUT",question:"为什么照片中的文字没有被识别?",answer:"请在光线充足时重新拍摄,并让文字在画面中保持平直。必要时裁剪图片,只保留需要的文字;若问题重复,请将照片附在支持请求中。",locale:"zh",is
17Fallback:!1},{id:"voice-input",topicId:"MEDIA_INPUT",question:"如何使用语音输入?",answer:"点击语音输入按钮,允许麦克风访问权限,然后说出一个词或短语。录音停止后检查识别出的文字并插入搜索;语音输入需要登录账户和网络连接。",locale:"zh",isFallback:!1},{id:"live-conversation",topicId:"MEDIA_INPUT",question:"实时对话翻译如何使用?",answer:"打开对话模式,并按顺序使用所选语言说话。应用会实时翻译现场语音并将对话保存在历史记录中;开始前请允许麦克风访问权限。",locale:"zh",isFallback:!1},{id:"document-text",topicId:"MEDIA_INPUT",question:"可以分析文档或截图中的文字吗?",answer:"将需要的页面保存为图片或截屏,然后在照片操作中选择它。识别后请检查文字,并在分析前手动修改需要的部分;发送给支持团队前请遮盖图片中的个人信息。",locale:"zh",isFallback:!1}],TECHNICAL:[{id:"app-not-open",topicId:"TECHNICAL",question:"应用无法打开或立即关闭。",answer:"请完全关闭应用后重新打开。确认设备有足够的可用空间,并已安装当前版本;若仍无效,请向支持团队提供设备型号、系统版本和出错时机。",locale:"zh",isFallback:!1},{id:"network-error",topicId:"TECHNICAL",question:"我看到连接错误。",answer:"检查设备网络连接,并在几分钟后再次尝试操作。如果可以,请在 Wi-Fi 与移动网络之间切换;若错误仍存在,请在支持请求中附上消息截图。",locale:"zh",isFallback:!1},{id:"update-app",topicId:"TECHNICAL",question:"如何更新应用?",answer:"打开 App Store 或 Google Play 中的 ZHEGE 页面,并在有“更新”按钮时点击它。更新后重新打开应用;如果商店没有显示更新,请确认登录了正确的商店账户。",locale:"zh",isFallback:!1},{id:"notifications",topicId:"TECHNICAL",question:"为什么收不到通知?",answer:"打开设备设置并允许 ZHEGE 发送通知,然后在应用中打开“设置”页面并检查通知开关。若仍收不到通知,请联系支持团队并提供设备型号和系统版本。",locale:"zh",isFallback:!1},{id:"send-diagnostics",topicId:"TECHNICAL",question:"技术错误请求需要哪些信息?",answer:"请说明您点击了什么,以及发生了什么而不是预期结果。提供设备型号、系统版本、应用版本和错误截图ï¼
17ˆå¦‚有);截图中不要包含密码、登录验证码或付款信息。",locale:"zh",isFallback:!1}],ENTERPRISE:[{id:"business-plan",topicId:"ENTERPRISE",question:"企业方案适合谁?",answer:"请在支持请求中说明您的需求:所在行业、预计用户数以及具体用途。目前尚无面向组织的自助开通方案,此类需求将单独商议。我们会回复可行的方案。",locale:"zh",isFallback:!1},{id:"team-access",topicId:"ENTERPRISE",question:"可以为多名员工开通吗?",answer:"请说明需要使用服务的员工数量,以及是否需要共享材料访问。这样有助于确定团队合适的使用方式;请不要让多人共用同一个密码。",locale:"zh",isFallback:!1},{id:"invoice",topicId:"ENTERPRISE",question:"我的组织需要文件。",answer:"请就企业方案联系支持团队,并说明组织注册国家和所需文件类型。仅在支持团队通过安全渠道要求时提供详细信息;我们会说明您的情况可以提供哪些资料。",locale:"zh",isFallback:!1},{id:"training",topicId:"ENTERPRISE",question:"ZHEGE 可以用于培训吗?",answer:"该服务可作为词典、文本分析工具以及 HSK 级别练习使用。请在支持请求中说明培训形式和小组语言;支持团队可帮助判断现有功能是否适合您的任务。",locale:"zh",isFallback:!1},{id:"business-contact",topicId:"ENTERPRISE",question:"如何咨询企业问题?",answer:"请选择“企业方案”主题并简要说明请求。留下工作邮箱,以便在支持会话中收到回复;请不要发送密码或银行卡信息。",locale:"zh",isFallback:!1}],FEEDBACK_OTHER:[{id:"feature-request",topicId:"FEEDBACK_OTHER",question:"如何建议新功能?",answer:"请选择此主题并说明该功能应解决的任务。举例说明您目前如何使用应用,具体的使用场景更容易转交给团队。",locale:"zh",isFallback:!1},{id:"leave-feedback",topicId:"FEEDBACK_OTHER",question:"在哪里留下应用反馈?",answer:"请联系支持团队,告诉我们您喜欢什么或哪些问题影响使用。您也可以在应用商店留下评分和评价;请不要在公开评价中写入个人信息。",locale:"zh",isFallback:!1},{id:"other-question",topicId:"FEEDBACK_OTHER",question:"我的问题不属于任何主题。",answer:"请选择此主题并用自己的话描述情况。说明问题涉及应用的哪个部分,必要时添加截图;支持团队会将请求转到合适方向。",locale:"zh",isFallback:!1},{id:"contact-support",topicId:"FEEDBACK_OTHER",question:"如何创建支持请求?",answer:"打开支持部分,选择最接近的主题,并先查看现有答案。如果没有解决问题,请填写描述问题的消息;为获得回复,请提供可用邮箱或登录账户。",locale:"zh",isFallback:!1},{id:"privacy-feedback",topicId:"FEEDBACK_OTHER",question:"可以发送截图或录屏吗?",answer:"可以,如果它有助于展示问题。发送前请在图片中遮盖私人消息、密码、验证码和付款信息;附上一句说明截图中需要看到什么。",locale:"zh",isFallback:!1}]}};function A(e){return"ru"===e||"en"===e||"zh"===e}function C(e,t,a){return e.map(e=>({...e,locale:t,isFallback:a}))}var R=e.i(3309),S=e.i(40404),q=e.i(74108),_=e.i(62058);let O=(0,u.default)("zoom-in",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"11",x2:"11",y1:"8",y2:"14",key:"1vmskp"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]),F=(0,u.default)("zoom-out",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["line",{x1:"21",x2:"16.65",y1:"21",y2:"16.65",key:"13gj7c"}],["line",{x1:"8",x2:"14",y1:"11",y2:"11",key:"durymu"}]]);function j(e){let i,s,r,o,l,c,u,d,h,p,m,f,g,b,w,I,v,x,E,T,k,N,A=(0,a.c)(48),{url:C,name:R,onClose:S,closeLabel:j,zoomInLabel:U,zoomOutLabel:z,downloadLabel:H}=e,[B,K]=(0,n.useState)(!1),[G,Q]=(0,n.useState)(!1),Y=(0,n.useRef)(null),W=(0,n.useRef)(null);A[0]===Symbol.for("react.memo_cache_sentinel")?(i=()=>{let e=requestAnimationFrame(()=>K(!0));return()=>cancelAnimationFrame(e)},s=[],A[0]=i,A[1]=s):(i=A[0],s=A[1]),(0,n.useEffect)(i,s),A[2]!==S?(r=()=>{K(!1),window.setTimeout(S,150)},A[2]=S,A[3]=r):r=A[3];let $=r;if(A[4]===Symbol.for("react.memo_cache_sentinel")?(o=()=>(W.current=document.activeElement,Y.current?.focus(),()=>W.current?.focus?.()),l=[],A[4]=o,A[5]=l):(o=A[4],l=A[5]),(0,n.useEffect)(o,l),A[6]!==$?(c=()=>{let e=e=>{if("Escape"===e.key){e.preventDefault(),e.stopPropagation(),$();return}"Tab"===e.key&&(e.preventDefault(),Y.current?.focus())};return document.addEventListener("keydown",e,!0),()=>document.removeEventListener("keydown",e,!0)},u=[$],A[6]=$,A[7]=c,A[8]=u):(c=A[7],u=A[8]),(0,n.useEffect)(c,u),A[9]===Symbol.for("react.memo_cache_sentinel")?(d=[],A[9]=d):d=A[9],(0,n.useEffect)(P,d),"u"<typeof document)return null;let Z=R||j,V=`fixed inset-0 z-[100] flex flex-col bg-black/90 transition-opacity duration-150 ${B?"opacity-100":"opacity-0"}`;A[10]!==R?(h=(0,t.jsx)("span",{className:"truncate text-sm text-white/70",children:R}),A[10]=R,A[11]=h):h=A[11],A[12]===Symbol.for("react.memo_cache_sentinel")?(p=()=>Q(D),A[12]=p):p=A[12];let J=G?z:U;A[13]!==G?(m=G?(0,t.jsx)(F,{className:"size-5"}):(0,t.jsx)(O,{className:"size-5"}),A[13]=G,A[14]=m):m=A[14],A[15]!==J||A[16]!==m?(f=(0,t.jsx)("button",{type:"button",onClick:p,"aria-label":J,className:"grid size-10 place-items-center rounded-full text-white/80 transition-colors hover:bg-white/10 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60",children:m}),A[15]=J,A[16]=m,A[17]=f):f=A[17];let X=R||"attachment";A[18]===Symbol.for("react.memo_cache_sentinel")?(g=(0,t.jsx)(_.Download,{className:"size-5"}),A[18]=g):g=A[18],A[19]!==H||A[20]!==X||A[21]!==C?(b=(0,t.jsx)("a",{href:C,download:X,"aria-label":H,className:"grid size-10 place-items-center rounded-full text-white/80 transition-colors hover:bg-white/10 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60",children:g}),A[19]=H,A[20]=X,A[21]=C,A[22]=b):b=A[22],A[23]===Symbol.for("react.memo_cache_sentinel")?(w=(0,t.jsx)(y.X,{className:"size-5"}),A[23]=w):w=A[23],A[24]!==j||A[25]!==$?(I=(0,t.jsx)("button",{ref:Y,type:"button",onClick:$,"aria-label":j,className:"grid size-10 place-items-center rounded-full text-white/80 transition-colors hover:bg-white/10 hover:text-white focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/60",children:w}),A[24]=j,A[25]=$,A[26]=I):I=A[26],A[27]!==f||A[28]!==b||A[29]!==I?(v=(0,t.jsxs)("div",{className:"flex shrink-0 items-center gap-1",children:[f,b,I]}),A[27]=f,A[28]=b,A[29]=I,A[30]=v):v=A[30],A[31]!==h||A[32]!==v?(x=(0,t.jsxs)("div",{className:"flex shrink-0 items-center justify-between gap-2 p-3 text-white",onClick:M,children:[h,v]}),A[31]=h,A[32]=v,A[33]=x):x=A[33];let ee=`flex min-h-0 flex-1 items-center justify-center p-4 pt-0 ${G?"overflow-auto":""}`,et=R||"";A[34]===Symbol.for("react.memo_cache_sentinel")?(E=e=>{e.stopPropagation(),Q(L)},A[34]=E):E=A[34];let ea=`transition-transform duration-150 ${B?"scale-100":"scale-95"} ${G?"max-w-none cursor-zoom-out":"max-h-full max-w-full cursor-zoom-in object-contain"}`;return A[35]!==et||A[36]!==ea||A[37]!==C?(T=(0,t.jsx)("img",{src:C,alt:et,onClick:E,className:ea}),A[35]=et,A[36]=ea,A[37]=C,A[38]=T):T=A[38],A[39]!==ee||A[40]!==T?(k=(0,t.jsx)("div",{className:ee,children:T}),A[39]=ee,A[40]=T,A[41]=k):k=A[41],A[42]!==$||A[43]!==V||A[44]!==x||A[45]!==k||A[46]!==
17Z?(N=(0,q.createPortal)((0,t.jsxs)("div",{"data-support-image-viewer":"",role:"dialog","aria-modal":"true","aria-label":Z,onClick:$,className:V,children:[x,k]}),document.body),A[42]=$,A[43]=V,A[44]=x,A[45]=k,A[46]=Z,A[47]=N):N=A[47],N}function L(e){return!e}function D(e){return!e}function M(e){return e.stopPropagation()}function P(){let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}}var U=e.i(63967),z=e.i(54985),H=e.i(71134);let B=new Set(["TRANSLATION","PINYIN","EXAMPLE","OTHER"]);function K(e){let n,i,r,o,l,c,u,d,h,p,m,f=(0,a.c)(28),{data:y}=e,g=(0,s.useTranslations)("support");if(f[0]!==y)n=y&&"object"==typeof y&&("character"===y.entryType||"phrase"===y.entryType)&&"string"==typeof y.entryId&&y.entryId.trim()&&"string"==typeof y.headword&&y.headword.trim()&&"string"==typeof y.issueKind&&B.has(y.issueKind)?{entryType:y.entryType,entryId:y.entryId.trim(),headword:y.headword.trim(),pinyin:"string"==typeof y.pinyin&&y.pinyin.trim()?y.pinyin.trim():null,gloss:"string"==typeof y.gloss&&y.gloss.trim()?y.gloss.trim():null,issueKind:y.issueKind}:null,f[0]=y,f[1]=n;else n=f[1];let b=n;if(!b)return null;let w="character"===b.entryType?`/character/${b.entryId}`:`/phrase/${b.entryId}`,I=`entryCard.issues.${b.issueKind}`;f[2]!==g||f[3]!==I?(i=g(I),f[2]=g,f[3]=I,f[4]=i):i=f[4];let v=i;return f[5]!==g?(r=g("entryCard.openEntry"),f[5]=g,f[6]=r):r=f[6],f[7]!==g?(o=g("entryCard.openEntry"),f[7]=g,f[8]=o):o=f[8],f[9]!==b.headword?(l=(0,t.jsx)("span",{className:"shrink-0 truncate text-2xl leading-none",title:b.headword,children:b.headword}),f[9]=b.headword,f[10]=l):l=f[10],f[11]!==b.pinyin?(c=b.pinyin&&(0,t.jsx)("span",{className:"max-w-full truncate text-xs text-muted-foreground",children:b.pinyin}),f[11]=b.pinyin,f[12]=c):c=f[12],f[13]!==b.gloss?(u=b.gloss&&(0,t.jsx)("span",{className:"max-w-full truncate text-sm",children:b.gloss}),f[13]=b.gloss,f[14]=u):u=f[14],f[15]!==v?(d=(0,t.jsx)(z.Badge,{variant:"secondary",children:v}),f[15]=v,f[16]=d):d=f[16],f[17]!==c||f[18]!==u||f[19]!==d?(h=(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col items-start gap-0.5",children:[c,u,d]}),f[17]=c,f[18]=u,f[19]=d,f[20]=h):h=f[20],f[21]===Symbol.for("react.memo_cache_sentinel")?(p=(0,t.jsx)(U.ChevronRight,{className:"size-4 shrink-0 text-muted-foreground","aria-hidden":"true"}),f[21]=p):p=f[21],f[22]!==w||f[23]!==h||f[24]!==r||f[25]!==o||f[26]!==l?(m=(0,t.jsxs)(H.Link,{href:w,title:r,"aria-label":o,className:"mb-1 flex w-full min-w-0 items-center gap-3 rounded-xl border bg-background/80 px-3 py-2 text-foreground no-underline transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2",children:[l,h,p]}),f[22]=w,f[23]=h,f[24]=r,f[25]=o,f[26]=l,f[27]=m):m=f[27],m}let G=new Set(["TRANSLATION_ERROR","BILLING","ACCOUNT_SECURITY"]),Q=new Set(["image/jpeg","image/png","image/webp","image/heic"]),Y=new Set(["MODERATOR","AI","SYSTEM"]),W={OPEN:"open",WAITING_STAFF:"waitingStaff",WAITING_USER:"waitingUser",RESOLVED:"resolved",CLOSED:"closed"};function $(e){return e.isSupport||"SUPPORT"===e.senderRole||Y.has(String(e.authorType))}function Z(e){return"STATUS_CHANGE"===e.cardType}function V(e,t){let a=e??[];if(!t?.length)return a;let n=new Set(a.map(e=>e.id)),i=t.filter(e=>!n.has(e.id)&&(n.add(e.id),!0));return i.length?[...a,...i]:a}function J(e){if(e.hasUnread||(e.unreadCount??0)>0)return!0;let t=e.messages?.[0];return!!(t&&$(t)&&!t.readByUserAt)}function X(e){return e.originalName||e.name||e.filename||e.id}function ee(e){let i,s,r,l,c,u,d,h,p=(0,a.c)(22),{attachment:m,onOpen:f}=e,[y,g]=(0,n.useState)(m.url),b=(0,n.useRef)(void 0);if(p[0]!==m.id||p[1]!==m.url?(i=()=>{if(m.url)return;let e=!0;return R.supportApi.attachmentUrl(m.id).then(t=>{e?(b.current=t,g(t)):URL.revokeObjectURL(t)}).catch(et),()=>{e=!1}},s=[m.id,m.url],p[0]=m.id,p[1]=m.url,p[2]=i,p[3]=s):(i=p[2],s=p[3]),(0,n.useEffect)(i,s),p[4]===Symbol.for("react.memo_cache_sentinel")?(r=()=>()=>{b.current&&URL.revokeObjectURL(b.current)},l=[],p[4]=r,p[5]=l):(r=p[4],l=p[5]),(0,n.useEffect)(r,l),!y){let e,a;return p[6]!==m?(e=X(m),p[6]=m,p[7]=e):e=p[7],p[8]!==e?(a=(0,t.jsx)("div",{className:"h-16 w-16 animate-pulse rounded-md bg-muted","aria-label":e}),p[8]=e,p[9]=a):a=p[9],a}return p[10]!==m||p[11]!==f||p[12]!==y?(c=()=>f({url:y,name:X(m)}),p[10]=m,p[11]=f,p[12]=y,p[13]=c):c=p[13],p[14]!==m?(u=X(m),p[14]=m,p[15]=u):u=p[15],p[16]!==u||p[17]!==y?(d=(0,t.jsx)(o.default,{src:y,alt:u,width:64,height:64,unoptimized:!0,className:"h-full w-full object-cover"}),p[16]=u,p[17]=y,p[18]=d):d=p[18],p[19]!==c||p[20]!==d?(h=(0,t.jsx)("button",{type:"button",onClick:c,className:"h-16 w-16 overflow-hidden rounded-md border border-border transition-opacity hover:opacity-80 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:d}),p[19]=c,p[20]=d,p[21]=h):h=p[21],h}function et(){}function ea(){let e=(0,s.useTranslations)("support"),a=(0,i.useLocale)(),{isAuthenticated:o}
17=(0,g.useAuth)(),[u,E]=(0,n.useState)(!1),[T,q]=(0,n.useState)("chats"),[_,O]=(0,n.useState)(null),[F,L]=(0,n.useState)(null),[D,M]=(0,n.useState)([]),[P,U]=(0,n.useState)(null),[z,H]=(0,n.useState)(""),[B,Y]=(0,n.useState)(""),[X,et]=(0,n.useState)(()=>R.supportApi.hasGuestSession()),[ea,ei]=(0,n.useState)(!1),[es,er]=(0,n.useState)(""),[eo,el]=(0,n.useState)(""),[ec,eu]=(0,n.useState)([]),[ed,eh]=(0,n.useState)(!1),[ep,em]=(0,n.useState)(""),[ef,ey]=(0,n.useState)(null),[eg,eb]=(0,n.useState)(!1),[ew,eI]=(0,n.useState)(!1),[ev,ex]=(0,n.useState)(!1),eE=(0,n.useRef)(null),eT=(0,n.useRef)(null),ek=(0,n.useMemo)(()=>(function(e="ru"){return A(e)?k(e):k("ru",!0)})(a),[a]),eN=(0,n.useMemo)(()=>_?function(e,t="ru"){if(!A(t))return C(x[e],"ru",!0);let a=N[t][e];return a?.length?C(a,t,!1):C(x[e],"ru",!0)}(_,a):[],[a,_]),eA=D.filter(J).length,eC=o||X,eR=P?.id;(0,n.useEffect)(()=>{if(!u||!eC||"u"<typeof document)return;let e=!0,t=0,a=async()=>{let a=++t;try{let n=await R.supportApi.listTickets();e&&a===t&&M(n)}catch{}};a();let n=window.setInterval(()=>{document.hidden||a()},3e4),i=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",i),()=>{e=!1,window.clearInterval(n),document.removeEventListener("visibilitychange",i)}},[u,eC]),(0,n.useEffect)(()=>{if(!u||!P||"u"<typeof document)return;let e=!0,t=0,a=async()=>{let a=++t,n=P.messages?.at(-1);try{let i=await R.supportApi.getMessages(P.id,n?.createdAt);e&&a===t&&i.length&&U(e=>e?.id===P.id?{...e,messages:V(e.messages,i)}:e)}catch{}},n=window.setInterval(()=>{document.hidden||a()},eg?2e3:"conversation"===T?5e3:3e4),i=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",i),()=>{e=!1,window.clearInterval(n),document.removeEventListener("visibilitychange",i)}},[u,P,eg,T]),(0,n.useEffect)(()=>{if(!u||!eR||"u"<typeof document)return;let e=!0,t=0,a=async()=>{let a=++t;try{let n=await R.supportApi.getTicket(eR);e&&a===t&&n&&U(e=>e?.id===eR?{...e,...n,messages:V(e.messages,n.messages)}:e)}catch{}};a();let n=window.setInterval(()=>{document.hidden||a()},15e3),i=()=>{document.hidden||a()};return document.addEventListener("visibilitychange",i),()=>{e=!1,window.clearInterval(n),document.removeEventListener("visibilitychange",i)}},[u,eR]),(0,n.useEffect)(()=>{if(!eg)return;let e=P?.messages?.at(-1);e&&$(e)&&(eb(!1),eI(!1))},[eg,P?.messages]),(0,n.useEffect)(()=>{if(!eg)return;let e=window.setTimeout(()=>{eb(!1),eI(!0)},25e3);return()=>window.clearTimeout(e)},[eg]),(0,n.useEffect)(()=>{"conversation"===T&&eT.current?.scrollIntoView({block:"end"})},[T,P?.id,P?.messages?.length,eg,ew]),(0,n.useEffect)(()=>(0,S.subscribeSupportOpenTicket)(({ticketId:e,reused:t})=>{E(!0),em(""),eL(e,{reused:t})}),[]),(0,n.useEffect)(()=>(0,S.subscribeSupportOpenForm)(({topicId:e,subject:t})=>{E(!0),em(""),eS(),O(e),L(null),q("form"),er(t??"")}),[]);let eS=()=>{el(""),er(""),eu([]),em("")},eq=async()=>Promise.all(ec.map(e=>R.supportApi.uploadAttachment(e))),e_=t=>{let a=Array.from(t??[]);if(a.length){if(ec.length+a.length>5)return void em(e("fileCountError",{count:5}));if(a.some(e=>!Q.has(e.type)))return void em(e("imageOnlyError"));if(a.some(e=>e.size>0xa00000))return void em(e("fileSizeError",{size:10}));em(""),eu(e=>[...e,...a])}},eO=async()=>{if(em(""),!z.includes("@"))return void em(e("emailError"));eh(!0);try{await R.supportApi.requestGuestCode(z),ei(!0)}catch{em(e("requestCodeError"))}finally{eh(!1)}},eF=async()=>{if(em(""),!B.trim())return void em(e("codeError"));eh(!0);try{await R.supportApi.verifyGuestCode(z,B.trim()),et(!0)}catch{em(e("verifyCodeError"))}finally{eh(!1)}},ej=async()=>{if(!_||!eo.trim())return void em(e("messageError"));eh(!0),em("");try{let t=await R.supportApi.createTicket({topic:_,subject:es.trim()||e("defaultSubject"),body:eo.trim(),attachmentIds:await eq(),context:{locale:a,platform:"web"}});if(eS(),t){U(t),q("conversation");let e=G.has(_);eI(e),eb(!e)}M(await R.supportApi.listTickets())}catch{em(e("sendError"))}finally{eh(!1)}},eL=async(t,a)=>{eh(!0),em("");try{let e=await R.supportApi.getTicket(t);if(e){U(e),q("conversation"),ex(!!a?.reused);let n=new Date().toISOString();M(e=>e.map(e=>e.id===t?{...e,hasUnread:!1,unreadCount:0,messages:e.messages?.map(e=>({...e,readByUserAt:e.readByUserAt??n}))}:e))}}catch{em(e("loadError"))}finally{eh(!1)}},eD=async()=>
17{if(!P||!eo.trim())return void em(e("messageError"));eh(!0),em("");try{let e=await R.supportApi.sendMessage(P.id,eo.trim(),await eq());U(t=>t?{...t,messages:[...t.messages??[],e]}:t),eS();let t=G.has(String(P.topic))||(P.messages??[]).some(e=>"MODERATOR"===String(e.authorType));eI(t),eb(!t),M(await R.supportApi.listTickets())}catch{em(e("sendError"))}finally{eh(!1)}},eM=t=>({OPEN:e("status.open"),WAITING_USER:e("status.waitingUser"),WAITING_STAFF:e("status.waitingStaff"),RESOLVED:e("status.resolved"),CLOSED:e("status.closed")})[t]??e("status.open"),eP=t=>{let a=function(e){if(!Z(e)||!e.cardData||"object"!=typeof e.cardData)return;let t=e.cardData.to;return"string"==typeof t&&t in W?W[t]:void 0}(t);return a?e(`statusEvent.${a}`):t.body},eU="chats"!==T,ez="conversation"===T&&P?P.subject||e("title"):"form"===T?e("newTicket"):"topics"===T?_?ek.find(e=>e.id===_)?.name??e("newRequest"):e("newRequest"):e("title"),eH="conversation"===T&&P?eM(P.status):"chats"===T?e("chatsIntro"):"";return(0,t.jsxs)(t.Fragment,{children:[!u&&(0,t.jsxs)("button",{type:"button",onClick:()=>{E(!0),em("")},"aria-label":e("openPanel"),"aria-expanded":u,className:"fixed bottom-4 right-4 z-40 flex size-12 items-center justify-center rounded-full bg-primary text-primary-foreground shadow-lg transition-transform hover:scale-105 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 sm:bottom-6 sm:right-6",children:[(0,t.jsx)(m,{className:"size-5"}),eA>0&&(0,t.jsx)("span",{"aria-label":e("unreadCount",{count:eA}),className:"absolute -right-1 -top-1 flex min-h-5 min-w-5 items-center justify-center rounded-full bg-destructive px-1 text-xs font-semibold text-destructive-foreground",children:eA})]}),u&&(0,t.jsx)(r.Root,{open:u,onOpenChange:E,children:(0,t.jsxs)(r.Portal,{children:[(0,t.jsx)(r.Overlay,{className:"fixed inset-0 z-40 bg-black/20 sm:bg-transparent"}),(0,t.jsxs)(r.Content,{onInteractOutside:e=>{e.target?.closest("[data-support-image-viewer]")&&e.preventDefault()},onEscapeKeyDown:e=>{ef&&e.preventDefault()},className:"fixed inset-0 z-50 flex flex-col bg-background focus:outline-none sm:inset-auto sm:bottom-6 sm:right-6 sm:h-[min(720px,calc(100vh-3rem))] sm:w-[420px] sm:overflow-hidden sm:rounded-3xl sm:border sm:border-border sm:shadow-2xl",children:[(0,t.jsxs)("header",{className:"flex shrink-0 items-center gap-2 border-b border-border px-3 py-2.5",children:[eU?(0,t.jsx)("button",{type:"button",onClick:()=>{if(em(""),"conversation"===T){U(null),eb(!1),eI(!1),ex(!1),q("chats");return}"form"===T?q("topics"):"topics"===T&&_?O(null):q("chats")}
17,"aria-label":e("back"),className:"grid size-9 shrink-0 place-items-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(c.ChevronLeft,{className:"size-5"})}):(0,t.jsx)("span",{className:"grid size-9 shrink-0 place-items-center rounded-full bg-primary/10 text-primary",children:(0,t.jsx)(d,{className:"size-5"})}),(0,t.jsxs)("div",{className:"min-w-0 flex-1",children:[(0,t.jsx)(r.Title,{className:"truncate text-[15px] font-semibold leading-tight",children:ez}),eH&&(0,t.jsx)("p",{className:"truncate text-xs text-muted-foreground",children:eH})]}),(0,t.jsx)("button",{type:"button",onClick:()=>{E(!1),ex(!1)},"aria-label":e("closePanel"),className:"grid size-9 shrink-0 place-items-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(y.X,{className:"size-5"})})]}),(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto px-3 py-3",children:[ep&&"conversation"!==T&&(0,t.jsx)("p",{role:"alert",className:"mb-3 rounded-2xl bg-destructive/10 px-4 py-3 text-sm text-destructive",children:ep}),"chats"===T&&(0,t.jsxs)("div",{className:"space-y-2",children:[0===D.length&&(0,t.jsx)("p",{className:"px-1 py-6 text-center text-sm text-muted-foreground",children:e("noTickets")}),D.map(n=>{let i=n.messages?.[0],s=i&&(Z(i)?eP(i):i.body);return(0,t.jsxs)("button",{type:"button",onClick:()=>eL(n.id),className:"flex w-full items-center gap-2.5 rounded-2xl border border-border/70 bg-card px-3 py-2.5 text-left transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)("span",{className:(0,v.cn)("grid size-8 shrink-0 place-items-center rounded-full",J(n)?"bg-primary/15 text-primary":"bg-muted text-muted-foreground"),children:(0,t.jsx)(m,{className:"size-4"})}),(0,t.jsxs)("span",{className:"flex min-w-0 flex-1 flex-col",children:[(0,t.jsxs)("span",{className:"flex items-center gap-2",children:[(0,t.jsx)("span",{className:"min-w-0 flex-1 truncate text-sm font-medium",children:n.subject||n.topic}),J(n)&&(0,t.jsx)("span",{className:"size-2 shrink-0 rounded-full bg-primary","aria-label":e("unread")})]}),s&&(0,t.jsx)("span",{className:"mt-0.5 truncate text-xs text-muted-foreground",children:s}),(0,t.jsxs)("span",{className:"mt-1 flex items-center gap-2 text-[10px] text-muted-foreground",children:[(0,t.jsx)("span",{className:"shrink-0 rounded-full bg-muted px-1.5 py-0.5",children:eM(n.status)}),(0,t.jsx)("span",{children:new Intl.DateTimeFormat(a,{dateStyle:"short"}).format(new Date(n.updatedAt))})]})]})]},n.id)}),(0,t.jsx)(b.Button,{type:"button",className:"mt-2 h-11 w-full rounded-full",onClick:()=>{eS(),O(null),q("topics")},children:e("newRequest")})]}),"topics"===T&&(0,t.jsx)("div",{className:"space-y-2",children:_?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"px-1 pb-1 text-sm text-muted-foreground",children:e("topicIntro")}),eN.map(e=>(0,t.jsxs)("div",{className:"overflow-hidden rounded-2xl border border-border/70 bg-card",children:[(0,t.jsxs)("button",{type:"button",onClick:()=>L(F===e.id?null:e.id),className:"flex w-full items-center justify-between gap-3 px-4 py-3 text-left text-sm font-medium",children:[(0,t.jsx)("span",{children:e.question}),(0,t.jsx)(l.ChevronDown,{className:(0,v.cn)("size-4 shrink-0 text-muted-foreground transition-transform",F===e.id&&"rotate-180")})]}),F===e.id&&(0,t.jsx)("p",{className:"border-t border-border/70 px-4 py-3 text-sm leading-6 text-muted-foreground",children:e.answer})]},e.id)),(0,t.jsx)(b.Button,{type:"button",variant:"outline",className:"mt-3 h-11 w-full rounded-full",onClick:()=>{eS(),q("form")},children:e("notHelped")})]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("p",{className:"px-1 pb-1 text-sm text-muted-foreground",children:e("pickTopic")}),ek.map(e=>(0,t.jsxs)("button",{type:"button",onClick:()=>{O(e.id),L(null),q("topics"),er(""),em("")},className:"flex w-full items-center justify-between gap-3 rounded-2xl border border-border/70 bg-card px-4 py-3 text-left text-sm font-medium transition-colors hover:bg-accent focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:[(0,t.jsx)("span",{children:e.name}),(0,t.jsx)(l.ChevronDown,{className:"size-4 shrink-0 -rotate-90 text-muted-foreground"})]},e.id))]})}),"form"===T&&(0,t.jsxs)("div",{className:"space-y-3",children:[!eC&&(0,t.jsxs)("div",{className:"space-y-3 rounded-2xl bg-muted/60 p-4",children:[(0,t.jsx)("p",{className:"text-sm",children:e("guestIntro")}),(0,t.jsx)(w.Input,{value:z,onChange:e=>H(e.target.value),type:"email",placeholder:e("emailPlaceholder"),disabled:ea,className:"rounded-full"}),ea?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(w.Input,{value:B,onChange:e=>Y(e.target.value),inputMode:"numeric",placeholder:e("codePlaceholder"),className:"rounded-full"}),(0,t.jsx)(b.Button,{type:"button",className:"h-11 w-full rounded-full",onClick:eF,disabled:ed,children:e("verifyCode")})]}):(0,t.jsx)(b.Button,{type:"button",className:"h-11 w-full rounded-full",onClick:eO,disabled:ed,children:e("requestCode")})]}),(0,t.jsx)(w.Input,{value:es,onChange:e=>er(e.target.value),placeholder:e("subjectPlaceholder"),className:"rounded-full"}),(0,t.jsx)(I.Textarea,{value:eo,onChange:e=>el(e.target.value),placeholder:e("messagePlaceholder"),className:"min-h-28 rounded-2xl"}),(0,t.jsx)(en,{files:ec,inputRef:eE,onSelect:e_,onRemove:e=>eu(t=>t.filter((t,a)=>a!==e)),label:e("attachImage")}),(0,t.jsx)(b.Button,{type:"button",className:"h-11 w-full rounded-full",onClick:ej,disabled:!eC||ed,children:ed?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(p.Loader2,{className:"animate-spin"}),e("sendingTicket")]}):e("sendTicket")})]}),"conversation"===T&&P&&(0,t.jsxs)("div",{className:"space-y-2.5",children:[P.messages?.map(e=>{if(Z(e))return(0,t.jsx)("div",{className:"my-2 flex w-full justify-center",children:(0,t.jsx)("p",{title:new Intl.DateTimeFormat(a,{dateStyle:"short",timeStyle:"short"}).format(new Date(e.createdAt)),className:"rounded-full bg-muted px-3 py-1 text-xs text-muted-foreground",children:eP(e)})},e.id);let n=$(e);return(0,t.jsx)("div",{className:(0,v.cn)("flex",n?"justify-start":"justify-end"),children:(0,t.jsxs)("div",{className:(0,v.cn)("max-w-[85%] px-3.5 py-2.5 text-sm",n?"rounded-[18px] rounded-bl-md bg-muted":"rounded-[18px] rounded-br-md bg-primary text-primary-foreground"),children:["DICTIONARY_ENTRY"===e.cardType&&(0,t.jsx)(K,{data:e.cardData}),(0,t.jsx)("p",{className:"whitespace-pre-wrap break-words",children:e.body}),e.attachments&&e.attachments.length>0&&(0,t.jsx)("div",{className:"mt-2 flex flex-wrap gap-2",children:e.attachments.map(e=>(0,t.jsx)(ee,{attachment:e,onOpen:ey},e.id))}),(0,t.jsx)("p",{className:(0,v.cn)("mt-1 text-right text-[11px]",n?"text-muted-foreground":"text-primary-foreground
17/70"),children:new Intl.DateTimeFormat(a,{timeStyle:"short"}).format(new Date(e.createdAt))})]})},e.id)}),ew&&!eg&&(0,t.jsx)("div",{className:"flex justify-start","aria-live":"polite",children:(0,t.jsx)("p",{className:"rounded-[18px] rounded-bl-md bg-muted px-3.5 py-2.5 text-xs text-muted-foreground",children:e("handedToHuman")})}),eg&&(0,t.jsx)("div",{className:"flex justify-start","aria-live":"polite",children:(0,t.jsxs)("div",{className:"flex items-center gap-2 rounded-[18px] rounded-bl-md bg-muted px-3.5 py-3",children:[(0,t.jsx)("span",{className:"sr-only",children:e("assistantTyping")}),(0,t.jsx)("span",{"aria-hidden":"true",className:"size-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.3s]"}),(0,t.jsx)("span",{"aria-hidden":"true",className:"size-2 animate-bounce rounded-full bg-muted-foreground/60 [animation-delay:-0.15s]"}),(0,t.jsx)("span",{"aria-hidden":"true",className:"size-2 animate-bounce rounded-full bg-muted-foreground/60"})]})}),(0,t.jsx)("div",{ref:eT})]})]}),"conversation"===T&&P&&(0,t.jsxs)("div",{className:"shrink-0 border-t border-border bg-background px-3 py-2.5",children:[ev&&(0,t.jsx)("p",{className:"mb-2 rounded-2xl bg-muted px-3 py-2 text-xs text-muted-foreground",children:e("reportInaccuracy.reusedNotice")}),ep&&(0,t.jsx)("p",{role:"alert",className:"mb-2 rounded-2xl bg-destructive/10 px-4 py-2.5 text-sm text-destructive",children:ep}),ec.length>0&&(0,t.jsx)("div",{className:"mb-2 flex flex-wrap gap-2",children:ec.map((a,n)=>(0,t.jsxs)("button",{type:"button",onClick:()=>eu(e=>e.filter((e,t)=>t!==n)),className:"max-w-40 truncate rounded-full bg-muted px-3 py-1 text-xs","aria-label":`${e("attachImage")}: ${a.name}`,children:[a.name," ×"]},`${a.name}-${n}`))}),(0,t.jsxs)("div",{className:"flex items-end gap-2",children:[(0,t.jsx)("input",{ref:eE,type:"file",accept:"image/*",multiple:!0,className:"sr-only",onChange:e=>{e_(e.target.files),e.currentTarget.value=""}}),(0,t.jsx)("button",{type:"button",onClick:()=>eE.current?.click(),"aria-label":e("attachImage"),className:"grid size-10 shrink-0 place-items-center rounded-full text-muted-foreground transition-colors hover:bg-accent hover:text-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",children:(0,t.jsx)(h,{className:"size-5"})}),(0,t.jsx)("textarea",{value:eo,onChange:e=>el(e.target.value),onKeyDown:e=>{"Enter"!==e.key||e.shiftKey||(e.preventDefault(),eD())},rows:1,placeholder:e("replyPlaceholder"),className:"max-h-32 min-h-10 flex-1 resize-none rounded-[20px] border border-border bg-muted/50 px-4 py-2.5 text-sm leading-5 outline-none transition-colors placeholder:text-muted-foreground focus:border-primary focus:bg-background"}),(0,t.jsx)("button",{type:"button",onClick:eD,disabled:ed||!eo.trim(),"aria-label":e("sendReply"),className:"grid size-10 shrink-0 place-items-center rounded-full bg-primary text-primary-foreground transition-opacity hover:opacity-90 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-40",children:(0,t.jsx)(f,{className:"size-4"})})]})]})]})]})}),ef&&(0,t.jsx)(j,{url:ef.url,name:ef.name,onClose:()=>ey(null),closeLabel:e("closeImage"),zoomInLabel:e("zoomIn"),zoomOutLabel:e("zoomOut"),downloadLabel:e("downloadImage")})]})}function en(e){let n,i,s,r,o,l,c,u,d=(0,a.c)(25),{files:p,inputRef:m,onSelect:f,onRemove:y,label:g,compact:w}=e,I=!(void 0!==w&&w)&&"rounded-lg border border-dashed border-border p-2";if(d[0]!==I?(n=(0,v.cn)("flex flex-wrap items-center gap-2",I),d[0]=I,d[1]=n):n=d[1],d[2]!==f?(i=e=>{f(e.target.files),e.currentTarget.value=""},d[2]=f,d[3]=i):i=d[3],d[4]!==m||d[5]!==i?(s=(0,t.jsx)("input",{ref:m,type:"file",accept:"image/*",multiple:!0,className:"sr-only",onChange:i}),d[4]=m,d[5]=i,d[6]=s):s=d[6],d[7]!==m?(r=()=>m.current?.click(),d[7]=m,d[8]=r):r=d[8],d[9]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsx)(h,{}),d[9]=o):o=d[9],d[10]!==g||d[11]!==r?(l=(0,t.jsxs)(b.Button,{type:"button",variant:"ghost",size:"sm",onClick:r,children:[o,g]}),d[10]=g,d[11]=r,d[12]=l):l=d[12],d[13]!==p||d[14]!==g||d[15]!==y){let e;d[17]!==g||d[18]!==y?(e=(e,a)=>(0,t.jsx)("button",{type:"button",onClick:()=>y(a),className:"max-w-32 truncate rounded bg-muted px-2 py-1 text-xs","aria-label":`${g}: ${e.name}`,children:e.name},`${e.name}-${a}`),d[17]=g,d[18]=y,d[19]=e):e=d[19],c=p.map(e),d[13]=p,d[14]=g,d[15]=y,d[16]=c}else c=d[16];return d[20]!==n||d[21]!==s||d[22]!==l||d[23]!==c?(u=(0,t.jsxs)("div",{className:n,children:[s,l,c]}),d[20]=n,d[21]=s,d[22]=l,d[23]=c,d[24]=u):u=d[24],u}
17e.s(["SupportWidget",()=>ea],21785)},47494,e=>{"use strict";var t=e.i(46482),a=e.i(30332);function n({locale:e,...n}){if(!e)throw Error(void 0);return(0,a.jsx)(t.IntlProvider,{locale:e,...n})}e.s(["default",()=>n])}]);

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.