bb-plugin-manifest 0.17.0 → 0.17.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/app.js CHANGED
@@ -1,3 +1,3 @@
1
- var ps=Object.defineProperty;var fs=(t,n)=>{for(var a in n)ps(t,a,{get:n[a],enumerable:!0})};var On=globalThis.__bbPluginRuntime;if(On==null||On.pluginSdkApp==null)throw new Error('Cannot load "@get-bb/plugin-sdk/app": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Et=On.pluginSdkApp,e5="default"in Et?Et.default:Et,{Markdown:t5,ThreadChat:n5,ThreadTitle:a5,UrlLink:r5,definePluginApp:Va,experimental_BranchPicker:s5,experimental_Diff:o5,experimental_FileLink:L5,experimental_Icon:Wa,experimental_NewThreadComposer:At,experimental_PermissionModePicker:l5,experimental_ProviderIcon:i5,experimental_ProviderModelPicker:c5,experimental_SourceCode:d5,experimental_THREAD_ACTION_GROUPS:u5,experimental_ThreadActionsContextMenu:m5,experimental_ThreadActionsMenu:p5,experimental_ThreadStatusGlyph:f5,experimental_VoiceInputTextarea:g5,experimental_copyToClipboard:b5,experimental_saveFile:x5,experimental_useAppPanel:h5,experimental_useArchiveEnvironmentThreads:v5,experimental_useBranches:y5,experimental_useCheckoutState:_5,experimental_useCodeTheme:N5,experimental_useFixedTabTarget:w5,experimental_usePluginId:k5,experimental_useProviders:C5,experimental_useQuestionFormHost:S5,experimental_useSidebarThreadActions:M5,experimental_useSidebarThreadPullRequest:T5,experimental_useSidebarThreadSplit:R5,experimental_useSidebarThreads:E5,experimental_useThreadActionRegistrations:A5,experimental_useThreadActions:P5,useBbContext:B5,useBbNavigate:ae,useComposer:Ya,useComposerView:I5,useComposers:O5,useEnvironmentProviders:$5,useRealtime:se,useRealtimeConnectionState:D5,useRpc:ee,useSdk:Oe,useSettings:Z5,useSidebarSplitLayout:F5,useSidebarThreadDraft:H5,useSidebarThreadDraftIds:z5,useSidebarThreadRowStatus:j5,useSidebarThreadRowStatuses:U5,useSidebarThreadShortcut:K5}=Et;var Ge={};fs(Ge,{Activity:()=>bs,Children:()=>Bt,Component:()=>Dn,Fragment:()=>ot,Profiler:()=>xs,PureComponent:()=>hs,StrictMode:()=>vs,Suspense:()=>ys,act:()=>_s,cache:()=>Ns,cacheSignal:()=>ws,captureOwnerStack:()=>ks,cloneElement:()=>Lt,createContext:()=>Cs,createElement:()=>Ss,createRef:()=>Ms,default:()=>gs,forwardRef:()=>$e,isValidElement:()=>Ke,lazy:()=>Ts,memo:()=>Rs,startTransition:()=>Es,unstable_useCacheRefresh:()=>As,use:()=>Ps,useActionState:()=>Bs,useCallback:()=>R,useContext:()=>Is,useDebugValue:()=>Os,useDeferredValue:()=>$s,useEffect:()=>w,useEffectEvent:()=>Ds,useId:()=>Zs,useImperativeHandle:()=>Fs,useInsertionEffect:()=>Hs,useLayoutEffect:()=>lt,useMemo:()=>re,useOptimistic:()=>zs,useReducer:()=>js,useRef:()=>j,useState:()=>f,useSyncExternalStore:()=>it,useTransition:()=>Us,version:()=>Ks});var $n=globalThis.__bbPluginRuntime;if($n==null||$n.react==null)throw new Error('Cannot load "react": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Pt=$n.react,gs="default"in Pt?Pt.default:Pt,{Activity:bs,Children:Bt,Component:Dn,Fragment:ot,Profiler:xs,PureComponent:hs,StrictMode:vs,Suspense:ys,act:_s,cache:Ns,cacheSignal:ws,captureOwnerStack:ks,cloneElement:Lt,createContext:Cs,createElement:Ss,createRef:Ms,forwardRef:$e,isValidElement:Ke,lazy:Ts,memo:Rs,startTransition:Es,unstable_useCacheRefresh:As,use:Ps,useActionState:Bs,useCallback:R,useContext:Is,useDebugValue:Os,useDeferredValue:$s,useEffect:w,useEffectEvent:Ds,useId:Zs,useImperativeHandle:Fs,useInsertionEffect:Hs,useLayoutEffect:lt,useMemo:re,useOptimistic:zs,useReducer:js,useRef:j,useState:f,useSyncExternalStore:it,useTransition:Us,version:Ks}=Pt;var Gs=Object.defineProperty,Fn=(t,n)=>Gs(t,"name",{value:n,configurable:!0});function Zn(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}Fn(Zn,"setRef");function Ja(...t){return n=>{let a=!1,o=t.map(r=>{let L=Zn(r,n);return!a&&typeof L=="function"&&(a=!0),L});if(a)return()=>{for(let r=0;r<o.length;r++){let L=o[r];typeof L=="function"?L():Zn(t[r],null)}}}}Fn(Ja,"composeRefs");function Hn(...t){return R(Ja(...t),t)}Fn(Hn,"useComposedRefs");var qs=Object.defineProperty,me=(t,n)=>qs(t,"name",{value:n,configurable:!0});function Qa(t){let n=$e((a,o)=>{let{children:r,...L}=a,l=null,i=!1,m=[];r=s2(r),Bt.forEach(r,b=>{if(a2(b)){i=!0;let c=b,h="child"in c.props?c.props.child:c.props.children;for(;zn(h)&&typeof It=="function";)h=It(h._payload);l=Ws(c,h),m.push(l?.props?.children)}else m.push(b)}),l?l=Lt(l,void 0,m):!i&&Bt.count(r)===1&&Ke(r)&&(l=r);let u=l?n2(l):void 0,p=Hn(o,u);if(!l){if(r||r===0)throw new Error(i?Qs(t):Js(t));return r}let g=t2(L,l.props??{});return l.type!==ot&&(g.ref=o?p:u),Lt(l,g)});return n.displayName=`${t}.Slot`,n}me(Qa,"createSlot");var Xa=Qa("Slot"),e2=Symbol.for("radix.slottable");function Vs(t){let n=me(a=>"child"in a?a.children(a.child):a.children,"Slottable");return n.displayName=`${t}.Slottable`,n.__radixId=e2,n}me(Vs,"createSlottable");var Ws=me((t,n)=>"child"in t.props?Ke(n)?Lt(n,void 0,t.props.children(n.props.children)):null:Ke(n)?n:null,"getSlottableElementFromSlottable");function t2(t,n){let a={...n};for(let o in n){let r=t[o],L=n[o];/^on[A-Z]/.test(o)?r&&L?a[o]=(...i)=>{let m=L(...i);return r(...i),m}:r&&(a[o]=r):o==="style"?a[o]={...r,...L}:o==="className"?a[o]=[r,L].filter(Boolean).join(" "):o==="aria-describedby"&&(a[o]=o2(L,r))}return{...t,...a}}me(t2,"mergeProps");function n2(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}me(n2,"getElementRef");function a2(t){return Ke(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===e2}me(a2,"isSlottable");var Ys=Symbol.for("react.lazy");function zn(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Ys&&"_payload"in t&&r2(t._payload)}me(zn,"isLazyComponent");function r2(t){return typeof t=="object"&&t!==null&&"then"in t}me(r2,"isPromiseLike");function s2(t){let n=t;for(;zn(n)&&typeof It=="function";)n=It(n._payload);return n}me(s2,"useUnwrappedLazy");function o2(...t){let n=new Set;for(let a of t)if(typeof a=="string")for(let o of String(a).trim().split(/\s+/))o&&n.add(o);return n.size>0?Array.from(n).join(" "):void 0}me(o2,"concatAriaDescribedby");var Js=me(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Qs=me(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),It=Ge[" use ".trim().toString()];var jn=globalThis.__bbPluginRuntime;if(jn==null||jn.classVarianceAuthority==null)throw new Error('Cannot load "class-variance-authority": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ot=jn.classVarianceAuthority,Y5="default"in Ot?Ot.default:Ot,{cva:L2,cx:J5}=Ot;var Un=globalThis.__bbPluginRuntime;if(Un==null||Un.clsx==null)throw new Error('Cannot load "clsx": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var $t=Un.clsx,X5="default"in $t?$t.default:$t,{clsx:l2}=$t;var Kn=globalThis.__bbPluginRuntime;if(Kn==null||Kn.tailwindMerge==null)throw new Error('Cannot load "tailwind-merge": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Dt=Kn.tailwindMerge,tL="default"in Dt?Dt.default:Dt,{createTailwindMerge:nL,extendTailwindMerge:aL,fromTheme:rL,getDefaultConfig:sL,mergeConfigs:oL,twJoin:LL,twMerge:i2,validators:lL}=Dt;function k(...t){return i2(l2(t))}var Zt="transition-colors duration-150 hover:duration-0";var Gn=globalThis.__bbPluginRuntime;if(Gn==null||Gn.jsxRuntime==null)throw new Error('Cannot load "react/jsx-runtime": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ft=Gn.jsxRuntime,pL="default"in Ft?Ft.default:Ft,{Fragment:P,jsx:e,jsxs:s}=Ft;var Xs=L2(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${Zt} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-transparent hover:bg-state-hover hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),S=$e(({className:t,variant:n,size:a,asChild:o=!1,...r},L)=>e(o?Xa:"button",{className:k(Xs({variant:n,size:a,className:t})),ref:L,...r}));S.displayName="Button";var c2="text-sm max-md:pointer-coarse:text-base";var d2="h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]",_L=`${d2} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`,NL=`${d2} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;var u2="h-9 max-md:pointer-coarse:h-10";var G=$e(({className:t,type:n,...a},o)=>e("input",{type:n,autoComplete:"off",className:k(`flex w-full rounded-md border border-input bg-transparent pl-3 pr-3 py-1 ${Zt} file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,u2,c2,t),ref:o,...a}));G.displayName="Input";var Wn="outreach",m2="outreach",eo="manifest-company-changed",p2="manifest-mailing-changed",to="manifest-status-changed";function C(t){return t instanceof Error?t.message:String(t)}function E(){let t=ee();return R(async(n,a={})=>{let o=Object.fromEntries(Object.entries(a).filter(([,L])=>L!==void 0)),{result:r}=await t.call("tool",{name:n,args:o});return r},[t])}function H(){let t=ee(),[n,a]=f(null),[o,r]=f(null),L=R(()=>{t.call("status",null).then(l=>{a(l),r(null)},l=>r(C(l)))},[t]);return w(L,[L]),se(to,L),{status:n,error:o,reload:L,rpc:t}}var no=50,de={filters:{q:"",region:"",country:"",priority:"",status:"",role:"",sort:""},scope:"",selections:{},dismissed:{},items:[],total:0,loading:!1,error:null,selectedId:null},Vn=new Set,Ce=t=>{de={...de,...t},Vn.forEach(n=>n())},ao=t=>(Vn.add(t),()=>Vn.delete(t)),qn=0;function De(t=de){let n=t.selections[t.scope];return n&&t.dismissed[t.scope]!==n.key?n:null}function Yn(t,n){let a=de.selections[t];if(n?a?.key===n.key&&a.label===n.label:!a)return!1;let o=De()?.key,r={...de.selections};return n?r[t]=n:delete r[t],Ce({selections:r}),De()?.key!==o}function Jn(){let t=E();return R(async(n=!1)=>{let a=++qn,o=de.filters,r=De();Ce({loading:!0,error:null});try{let L={limit:no,offset:n?de.items.length:0},l=await t("outreach_list_companies",r?{...r.filter,...L}:{q:o.q||void 0,region:o.region||void 0,country:o.country||void 0,priorities:o.priority?[Number(o.priority)]:void 0,status:o.status||void 0,role:o.role||void 0,sort:o.sort||void 0,desc:o.sort==="coverage"?!0:void 0,...L});if(a!==qn)return;Ce({items:n?[...de.items,...l.items]:l.items,total:l.total,loading:!1})}catch(L){if(a!==qn)return;Ce({loading:!1,error:C(L)})}},[t])}function ct(){let t=it(ao,()=>de,()=>de),n=Jn(),a=R((l,i)=>{Ce({filters:{...de.filters,[l]:i}}),n()},[n]),o=R(l=>Ce({selectedId:l}),[]),r=R(l=>{if(de.scope===l)return;let i=De()?.key;Ce({scope:l}),De()?.key!==i&&n()},[n]),L=R(()=>{let l=De();l&&(Ce({dismissed:{...de.dismissed,[de.scope]:l.key}}),n())},[n]);return{...t,selection:De(t),load:n,setFilter:a,select:o,setScope:r,unlink:L}}function fe(t){se(eo,n=>{let a=n?.companyId;typeof a=="string"&&t(a)})}function f2(){let{status:t,error:n,rpc:a}=H(),[o,r]=f(""),[L,l]=f(""),[i,m]=f(""),[u,p]=f(!1),[g,b]=f(null),c=async()=>{p(!0),b(null);try{let v=await a.call("login",{url:o||t?.url||"",email:L||t?.email||"",password:i});m(""),b(v.connected?`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A\u0430\u043A ${v.email}`:v.message)}catch(v){b(C(v))}finally{p(!1)}},h=async()=>{p(!0);try{await a.call("logout",null),b("\u0412\u044B \u0432\u044B\u0448\u043B\u0438: \u0442\u043E\u043A\u0435\u043D \u043E\u0442\u043E\u0437\u0432\u0430\u043D \u0432 Manifest.")}catch(v){b(C(v))}finally{p(!1)}};return s("div",{className:"flex max-w-xl flex-col gap-3 text-sm",children:[e("p",{className:"text-muted-foreground",children:"\u041F\u0430\u0440\u043E\u043B\u044C \u0434\u043B\u044F \u043F\u043B\u0430\u0433\u0438\u043D\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044F \u0432 Manifest: \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u2014 \u0432 \xAB\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438 \u0438 \u043F\u0440\u0430\u0432\u0430\xBB, \u0438\u043B\u0438 \u0432\u044B \u0441\u0430\u043C\u0438 \u2014 \u043A\u043B\u0438\u043A\u043E\u043C \u043F\u043E \u0441\u0432\u043E\u0435\u043C\u0443 \u0438\u043C\u0435\u043D\u0438 \u0432\u043D\u0438\u0437\u0443 \u043C\u0435\u043D\u044E Manifest. \u041F\u043B\u0430\u0433\u0438\u043D \u043D\u0435 \u0445\u0440\u0430\u043D\u0438\u0442 \u043F\u0430\u0440\u043E\u043B\u044C: \u043E\u043D \u043E\u0434\u0438\u043D \u0440\u0430\u0437 \u043E\u0431\u043C\u0435\u043D\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043D\u0430 \u0442\u043E\u043A\u0435\u043D."}),n&&e("p",{className:"text-destructive",children:n}),t&&e("p",{children:t.connected?s(P,{children:["\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A ",e("b",{children:t.url})," \u043A\u0430\u043A ",e("b",{children:t.email}),t.canManage?" \xB7 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438 \u043F\u0440\u0430\u0432\u043A\u0430":t.canView?" \xB7 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440":" \xB7 \u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443"]}):e("span",{className:"text-muted-foreground",children:t.message})}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-xs text-muted-foreground",children:"\u0410\u0434\u0440\u0435\u0441 Manifest"}),e(G,{value:o,placeholder:t?.url||"https://manifest.example.com",onChange:v=>r(v.target.value)})]}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-xs text-muted-foreground",children:"Email"}),e(G,{value:L,placeholder:t?.email||"name@company.com",autoComplete:"username",onChange:v=>l(v.target.value)})]}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-xs text-muted-foreground",children:"\u041F\u0430\u0440\u043E\u043B\u044C \u0434\u043B\u044F \u043F\u043B\u0430\u0433\u0438\u043D\u0430"}),e(G,{type:"password",value:i,autoComplete:"current-password",onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i&&c()}})]}),s("div",{className:"flex gap-2",children:[e(S,{disabled:u||!i||!(o||t?.url)||!(L||t?.email),onClick:()=>{c()},children:u?"\u0412\u0445\u043E\u0434\u0438\u043C\u2026":"\u0412\u043E\u0439\u0442\u0438"}),t?.connected&&e(S,{variant:"outline",disabled:u,onClick:()=>{h()},children:"\u0412\u044B\u0439\u0442\u0438"})]}),g&&e("p",{role:"status",children:g})]})}var dt=Wa;var Qn=globalThis.__bbPluginRuntime;if(Qn==null||Qn.radixPopover==null)throw new Error('Cannot load "@radix-ui/react-popover": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ht=Qn.radixPopover,HL="default"in Ht?Ht.default:Ht,{Anchor:g2,Arrow:zL,Close:jL,Content:b2,Popover:UL,PopoverAnchor:KL,PopoverArrow:GL,PopoverClose:qL,PopoverContent:VL,PopoverPortal:WL,PopoverTrigger:YL,Portal:x2,Root:h2,Trigger:JL,createPopoverScope:QL}=Ht;function v2(){let t="manifest";return{"data-bb-portaled-overlay":"","data-bb-plugin-root":"",...t!==void 0?{"data-bb-plugin":t}:{}}}var oe={new:"\u041D\u043E\u0432\u044B\u0439",to_qualify:"\u041D\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0435",ready:"\u0413\u043E\u0442\u043E\u0432 \u043A \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u0443",contacted:"\u041D\u0430\u043F\u0438\u0441\u0430\u043B\u0438",replied:"\u041E\u0442\u0432\u0435\u0442\u0438\u043B",qualified:"\u041F\u043E\u0434\u0445\u043E\u0434\u0438\u0442",handed_over:"\u041F\u0435\u0440\u0435\u0434\u0430\u043D \u0432 \u0437\u0430\u043A\u0443\u043F\u043A\u0438",rejected:"\u041D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442",do_not_contact:"\u041D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F"},zt=Object.keys(oe),ut={potential_supplier:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A",supplier:"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A"},jt=Object.keys(ut),y2=["rejected","do_not_contact"],_2={brand_subsidiary:"\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u0431\u0440\u0435\u043D\u0434\u0430",importer:"\u0418\u043C\u043F\u043E\u0440\u0442\u0451\u0440 / \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u044C\u044E\u0442\u043E\u0440",dealer:"\u0414\u0438\u043B\u0435\u0440",service_center:"\u0421\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0446\u0435\u043D\u0442\u0440",unknown:"\u041D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D"},so={africa:"\u0410\u0444\u0440\u0438\u043A\u0430",asia:"\u0410\u0437\u0438\u044F","australia-pacific":"\u0410\u0432\u0441\u0442\u0440\u0430\u043B\u0438\u044F \u0438 \u041E\u043A\u0435\u0430\u043D\u0438\u044F",europe:"\u0415\u0432\u0440\u043E\u043F\u0430","middle-east":"\u0411\u043B\u0438\u0436\u043D\u0438\u0439 \u0412\u043E\u0441\u0442\u043E\u043A","north-central-america":"\u0421\u0435\u0432. \u0438 \u0426\u0435\u043D\u0442\u0440. \u0410\u043C\u0435\u0440\u0438\u043A\u0430","south-america":"\u042E\u0436\u043D\u0430\u044F \u0410\u043C\u0435\u0440\u0438\u043A\u0430"},ve=t=>so[t]??(t||"\u2014"),Xn={phone_and_email:"\u0435\u0441\u0442\u044C \u0442\u0435\u043B\u0435\u0444\u043E\u043D \u0438 email",phone_only:"\u0442\u043E\u043B\u044C\u043A\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D",email_only:"\u0442\u043E\u043B\u044C\u043A\u043E email",website_only:"\u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0430\u0439\u0442",brand_domain:"\u0432\u0441\u0435 email \u043D\u0430 \u0434\u043E\u043C\u0435\u043D\u0435 \u0431\u0440\u0435\u043D\u0434\u0430",no_contacts:"\u043D\u0435\u0442 \u043A\u0430\u043D\u0430\u043B\u043E\u0432 \u0441\u0432\u044F\u0437\u0438"},Ut={phone:"\u0422\u0435\u043B\u0435\u0444\u043E\u043D",mobile:"\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439",whatsapp:"WhatsApp",telegram:"Telegram",fax:"\u0424\u0430\u043A\u0441",email:"Email",website:"\u0421\u0430\u0439\u0442",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},N2=Object.keys(Ut),oo=(()=>{try{return new Intl.DisplayNames(["ru"],{type:"region"})}catch{return null}})();function F(t){if(!t)return"\u2014";if(t==="XK")return"\u041A\u043E\u0441\u043E\u0432\u043E";try{return oo?.of(t)??t}catch{return t}}function q(t){if(!t)return"\u2014";let n=new Date(t);return Number.isNaN(n.getTime())?t:n.toLocaleString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}function mt(t){return t.startsWith("import:")?"\u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430":t}var Kt={waiting_reply:"\u0416\u0434\u0443\u0442 \u043D\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430",overdue:"\u041F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E",due_today:"\u041D\u0430 \u0441\u0435\u0433\u043E\u0434\u043D\u044F",ready_untouched:"\u0413\u043E\u0442\u043E\u0432\u044B, \u043D\u0435 \u0442\u0440\u043E\u043D\u0443\u0442\u044B",no_next_action:"\u0411\u0435\u0437 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0448\u0430\u0433\u0430"},pt={email:"Email",whatsapp:"WhatsApp",telegram:"Telegram",phone:"\u0422\u0435\u043B\u0435\u0444\u043E\u043D",meeting:"\u0412\u0441\u0442\u0440\u0435\u0447\u0430",linkedin:"LinkedIn",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},ft={sent:"\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E",no_answer:"\u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B\u0438",replied:"\u043E\u0442\u0432\u0435\u0442\u0438\u043B\u0438",interested:"\u0438\u043D\u0442\u0435\u0440\u0435\u0441",terms_received:"\u043F\u0440\u0438\u0441\u043B\u0430\u043B\u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F",declined:"\u043E\u0442\u043A\u0430\u0437",territory:"\u0442\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u0435\u0442",referral:"\u043F\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u043E\u0432\u0430\u043B\u0438",wrong_contact:"\u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0430\u043A\u0442",out_of_office:"\u0432 \u043E\u0442\u043F\u0443\u0441\u043A\u0435",bounced:"\u043D\u0435 \u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E"},Gt={follow_up:"\u041D\u0430\u043F\u043E\u043C\u043D\u0438\u0442\u044C",call:"\u041F\u043E\u0437\u0432\u043E\u043D\u0438\u0442\u044C",send_offer:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441",wait_reply:"\u0416\u0434\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u0430",recycle:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043F\u043E\u0437\u0436\u0435",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},ea={not_profile:"\u041D\u0435 \u043D\u0430\u0448 \u043F\u0440\u043E\u0444\u0438\u043B\u044C",territory:"\u0422\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u0435\u0442",no_assortment:"\u041D\u0435\u0442 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0430",no_response:"\u041D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442",asked_not_to_contact:"\u041F\u0440\u043E\u0441\u0438\u043B\u0438 \u043D\u0435 \u043F\u0438\u0441\u0430\u0442\u044C",other:"\u0414\u0440\u0443\u0433\u043E\u0435","":"\u0411\u0435\u0437 \u043F\u0440\u0438\u0447\u0438\u043D\u044B"},w2={never:"\u043D\u0435 \u0431\u044B\u043B\u043E",d0_7:"\u2264 7 \u0434\u043D",d8_14:"8\u201314 \u0434\u043D",d15_30:"15\u201330 \u0434\u043D",d30p:"> 30 \u0434\u043D"},qt=["never","d0_7","d8_14","d15_30","d30p"],Vt={status:"\u0421\u0442\u0430\u0442\u0443\u0441",status_reason:"\u041F\u0440\u0438\u0447\u0438\u043D\u0430",status_reason_code:"\u041F\u0440\u0438\u0447\u0438\u043D\u0430",owner:"\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439",tags:"\u041C\u0435\u0442\u043A\u0438",next_action:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0448\u0430\u0433",touch:"\u041A\u0430\u0441\u0430\u043D\u0438\u0435",done:"\u0428\u0430\u0433",due_on:"\u0421\u0440\u043E\u043A \u0448\u0430\u0433\u0430",verification:"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043A\u0430\u043D\u0430\u043B\u0430",priority_manual:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E",do_not_contact:"\u041D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F",mail_sender:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C",mail_legal_entity:"\u042E\u0440\u043B\u0438\u0446\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F"};function qe(t,n){return n?t==="status"?oe[n]??n:t==="status_reason_code"?ea[n]??n:n:"\u2014"}function Ve(t){let[n,a,o]=t.split("-").map(Number),r=new Date(n,(a??1)-1,o??1),L=new Date,l=new Date(L.getFullYear(),L.getMonth(),L.getDate());return Math.round((r.getTime()-l.getTime())/864e5)}function ye(t){if(!t)return"\u2014";let[n,a,o]=t.slice(0,10).split("-");return o&&a&&n?`${o}.${a}.${n}`:t}function Wt(t,n){return n<=0?"\u2014":n>=20?`${t} \u0438\u0437 ${n} \xB7 ${Math.round(t/n*100)}%`:`${t} \u0438\u0437 ${n}`}function ge({tone:t,title:n,className:a}){return e("span",{className:k("mf-dot",`mf-dot--${t}`,a),title:n,"aria-hidden":n?void 0:!0})}function J({tone:t,children:n,className:a,title:o}){return s("span",{className:k("inline-flex min-w-0 items-center gap-1.5",a),title:o,children:[e(ge,{tone:t}),e("span",{className:"min-w-0",children:n})]})}function V({tone:t,children:n,className:a,title:o}){return e("span",{className:k("mf-badge",`mf-badge--${t}`,a),title:o,children:n})}function ce({sandbox:t}){return t?e(V,{tone:"sandbox",title:"\u041F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430: \u043F\u0438\u0441\u044C\u043C\u0430 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C \u043D\u0435 \u0443\u0445\u043E\u0434\u044F\u0442",children:"\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430"}):null}function k2({title:t,actions:n,children:a,className:o}){return s("section",{className:k("mf-card flex flex-col gap-2 p-3",o),children:[t||n?s("div",{className:"flex items-center gap-2",children:[t?e("h4",{className:"m-0 min-w-0 flex-1 text-[13px] font-bold",children:t}):e("span",{className:"flex-1"}),n]}):null,a]})}function Ze({className:t}){return e("svg",{viewBox:"0 0 180 180",className:k("size-4 flex-none",t),"aria-hidden":"true",focusable:"false",children:s("g",{transform:"translate(14 18)",children:[e("path",{d:"M8 136V10h31l16 16H26v110H8Z",fill:"#2E3433"}),e("path",{d:"M24 136V24h28l39 42-16 17-27-30v83H24Z",fill:"#111315"}),e("path",{d:"M124 136V54L98 84 82 67l42-43h28v112h-28Z",fill:"#111315"}),e("path",{d:"M83 67l42-43h28L99 83 83 67Z",fill:"#D7FF3F"})]})})}function Le({children:t,className:n}){return s("span",{className:k("inline-flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",n),children:[e(Ze,{className:"size-3.5"}),t]})}function C2({sandbox:t,children:n,className:a}){return e("span",{className:k("mf-island mf-chip my-1 flex max-w-full flex-col gap-1.5 px-2.5 py-2 text-xs",t&&"mf-chip--sandbox",a),children:n})}function be({title:t,children:n,actions:a,className:o}){return s("div",{className:k("mf-confirm flex flex-col gap-1.5 px-2.5 py-2 text-xs",o),role:"group",children:[e("b",{className:"text-[12px]",children:t}),n,e("div",{className:"flex flex-wrap items-center gap-2",children:a})]})}function Yt({parts:t,className:n}){let a=t.reduce((o,r)=>o+Math.max(0,r.value),0);return a<=0?e("div",{className:k("mf-progress",n)}):e("div",{className:k("mf-progress",n),"aria-hidden":"true",children:t.map((o,r)=>o.value>0?e("i",{className:o.tone,style:{width:`${o.value/a*100}%`}},r):null)})}var Jt={new:"muted",to_qualify:"warn",ready:"ok",contacted:"info",replied:"volt",qualified:"ok",handed_over:"ok",rejected:"muted",do_not_contact:"err"};var Lo=450,lo=220,io=3,ta=new Map,co=()=>typeof window<"u"&&!!window.matchMedia?.("(hover: hover)").matches;function S2(){let[t,n]=f(null),a=j(void 0),o=j(!1);w(()=>()=>clearTimeout(a.current),[]);let r=R((m,u)=>{if(!co())return;clearTimeout(a.current);let p=u.getBoundingClientRect();a.current=setTimeout(()=>{o.current=!0,n({item:m,box:p})},o.current?0:Lo)},[]),L=R(()=>{clearTimeout(a.current),a.current=setTimeout(()=>{o.current=!1,n(null)},lo)},[]),l=R(()=>clearTimeout(a.current),[]),i=R(()=>{clearTimeout(a.current),o.current=!1,n(null)},[]);return{peek:t,enter:r,leave:L,keep:l,close:i}}function uo(t){let n=E(),a=`${t.id}:${t.updated_at}`,[o,r]=f(()=>{let L=ta.get(t.id);return L?.key===a?L:null});return w(()=>{let L=ta.get(t.id);if(L?.key===a){r(L);return}r(null);let l=!0;return n("outreach_get_company",{id:t.id}).then(i=>{let m={key:a,touches:(i?.interactions??[]).slice(0,io),sandbox:!!i?.sandbox_traces,error:null};ta.set(t.id,m),l&&r(m)},i=>l&&r({key:a,touches:[],sandbox:!1,error:C(i)})),()=>{l=!1}},[t.id,a,n]),o}function gt({label:t,children:n,className:a}){return s("div",{className:k("flex min-w-0 gap-2",a),children:[e("span",{className:"w-20 flex-none text-muted-foreground",children:t}),e("span",{className:"min-w-0 flex-1",children:n})]})}function mo({item:t}){let n=t.next_action;if(!n){let r=["rejected","do_not_contact","handed_over"].includes(t.status);return e("span",{className:r?"text-muted-foreground":"text-[var(--mf-amber)]",children:r?"\u2014":"\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D"})}let a=n.due_on?Ve(n.due_on):null,o=a===null?"":a<0?`\u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E \u043D\u0430 ${-a} \u0434\u043D`:a===0?"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":`\u0434\u043E ${ye(n.due_on)}`;return s("span",{children:[Gt[n.action]??n.action,o?s("span",{className:k(a!==null&&a<0&&"font-medium text-destructive"),children:[" \xB7 ",o]}):null,n.note?e("span",{className:"block truncate text-muted-foreground",children:n.note}):null]})}function po({item:t}){let n=t.touches_count??0;if(!n)return e("span",{className:"text-muted-foreground",children:"\u0435\u0449\u0451 \u043D\u0435 \u0431\u044B\u043B\u043E"});let a=t.last_inbound_at&&(!t.last_outbound_at||t.last_inbound_at>t.last_outbound_at);return s("span",{className:"flex flex-wrap items-center gap-1",children:[n," \xB7 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 ",ye(t.last_touch_at),a?s(V,{tone:"volt",children:["\u043E\u0442\u0432\u0435\u0442 ",ye(t.last_inbound_at)]}):null]})}function fo({item:t}){let n=uo(t);if(!(t.touches_count??0))return null;if(!n)return s("div",{className:"flex flex-col gap-1","aria-label":"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026",children:[e("span",{className:"h-3 w-4/5 animate-pulse rounded bg-muted"}),e("span",{className:"h-3 w-3/5 animate-pulse rounded bg-muted"})]});if(n.error)return s("p",{className:"text-destructive",children:["\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: ",n.error]});let a=(t.touches_count??0)-n.touches.length;return s("ul",{className:"flex flex-col gap-1 border-l-2 border-border pl-2",children:[n.touches.map(o=>s("li",{className:"min-w-0",children:[s("span",{className:"flex flex-wrap items-center gap-1",children:[s("span",{className:k(o.direction==="in"&&"font-medium"),children:[o.direction==="in"?"\u2190":"\u2192"," ",pt[o.channel]??o.channel]}),s("span",{className:"text-muted-foreground",children:["\xB7 ",ye(o.occurred_at),o.outcome?` \xB7 ${ft[o.outcome]??o.outcome}`:""]}),o.sandbox?e(V,{tone:"sandbox",children:"\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430"}):null]}),o.summary?e("span",{className:"block truncate text-muted-foreground",children:o.summary}):null]},o.id)),a>0?s("li",{className:"text-muted-foreground",children:["\u0438 \u0435\u0449\u0451 ",a," \u2014 \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435"]}):null,n.sandbox&&!n.touches.some(o=>o.sandbox)?e("li",{className:"text-muted-foreground",children:"\u0435\u0441\u0442\u044C \u0441\u043B\u0435\u0434\u044B \u0442\u0435\u0441\u0442\u0430 \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B"}):null]})}var na="inline-flex h-6 min-w-6 items-center justify-center gap-1 rounded-md px-1.5 text-[11px] text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring";function M2({peek:t,onKeep:n,onLeave:a,onClose:o,onBeside:r,onChat:L}){let l=v2(),{item:i,box:m}=t,u=`${F(i.country_code)}${i.countries.length>1?` +${i.countries.length-1}`:""}`;return s(h2,{open:!0,onOpenChange:p=>!p&&o(),children:[e(g2,{asChild:!0,children:e("span",{"aria-hidden":!0,style:{position:"fixed",left:m.right,top:m.top,width:1,height:m.height}})}),e(x2,{children:e(b2,{...l,side:"right",align:"start",sideOffset:8,collisionPadding:8,role:"dialog","aria-label":`\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F: ${i.display_name}`,onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onMouseEnter:n,onMouseLeave:a,className:"z-50 outline-none",children:s("div",{className:"mf-island flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-1.5 rounded-lg border border-border bg-background p-3 text-xs shadow-xl",children:[s("div",{className:"flex items-start gap-1.5",children:[e("span",{className:"min-w-0 flex-1",children:s("span",{className:"flex items-center gap-1.5",children:[s("span",{className:"flex-none rounded-full border border-border px-1.5 text-[11px] font-semibold",children:["P",i.priority]}),e("span",{className:"truncate text-sm font-semibold",children:i.display_name})]})}),s("span",{className:"flex flex-none items-center",role:"toolbar","aria-label":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0435\u0439",children:[s("button",{type:"button",className:na,title:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0440\u044F\u0434\u043E\u043C \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438",onClick:()=>r(i),children:[e(dt,{name:"PanelRight",fallback:"Columns2",className:"size-3.5"}),"\u0420\u044F\u0434\u043E\u043C"]}),s("button",{type:"button",className:na,title:"\u0427\u0430\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",onClick:()=>L(i),children:[e(dt,{name:"MessageSquare",fallback:"MessageCircle",className:"size-3.5"}),"\u0427\u0430\u0442"]}),e("button",{type:"button",className:na,"aria-label":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",title:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",onClick:o,children:"\xD7"})]})]}),s("div",{className:"flex flex-wrap items-center gap-1",children:[e(V,{tone:Jt[i.status]??"muted",children:oe[i.status]??i.status}),i.do_not_contact&&i.status!=="do_not_contact"?e(V,{tone:"err",children:"\u043D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F"}):null,i.roles?.includes("supplier")?e(V,{tone:"ok",children:"\u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A"}):null,s("span",{className:"text-muted-foreground",children:[u," \xB7 ",ve(i.region)]})]}),e(gt,{label:"\u0428\u0430\u0433",children:e(mo,{item:i})}),e(gt,{label:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435",children:i.coverage?s("span",{children:[s("b",{className:"tabular-nums",children:[i.coverage.by_volume,"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7 ",i.coverage.by_positions,"% \u043F\u043E\u0437\u0438\u0446\u0438\u0439",s("span",{className:"text-muted-foreground",children:[" \xB7 ",i.coverage.by==="pricelist"?"\u043F\u0440\u0430\u0439\u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":i.coverage.by==="distributor_site"?"\u0441\u0430\u0439\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":`\u0441\u0430\u0439\u0442 STIHL ${F(i.coverage.country)}`,i.coverage.draft?" (\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A, \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D)":""]}),i.coverage.unchecked?s("span",{className:"text-[var(--mf-amber)]",children:[" \xB7 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C ",i.coverage.unchecked]}):null]}):e("span",{className:"text-muted-foreground",children:"\u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u043F\u043E \u0441\u0442\u0440\u0430\u043D\u0435"})}),i.owner?e(gt,{label:"\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432.",children:i.owner}):null,i.tags?.length?e(gt,{label:"\u041C\u0435\u0442\u043A\u0438",children:i.tags.join(", ")}):null,e(gt,{label:"\u041A\u0430\u0441\u0430\u043D\u0438\u044F",children:e(po,{item:i})}),e(fo,{item:i})]})})})]})}var go=12;function Fe({label:t,value:n,options:a,onChange:o}){let[r,L]=f(!1),[l,i]=f(""),m=j(null),u=j(null),p=a.length>go,g=a.find(d=>d.value===n);w(()=>{if(!r)return;i(""),p&&setTimeout(()=>u.current?.focus(),0);let d=_=>{m.current?.contains(_.target)||L(!1)},x=_=>{_.key==="Escape"&&L(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",x)}},[r,p]);let b=l.trim().toLowerCase(),c=b?a.filter(d=>d.value===""||d.label.toLowerCase().includes(b)):a,h=c.find(d=>d.value!==""),v=d=>{o(d),L(!1)};return s("div",{ref:m,className:"relative",children:[s("button",{type:"button","aria-haspopup":"listbox","aria-expanded":r,"aria-label":`\u0424\u0438\u043B\u044C\u0442\u0440: ${t}`,onClick:()=>L(d=>!d),className:k("inline-flex h-7 max-w-[11rem] items-center gap-1 rounded-md border border-border px-2 text-xs",n?"bg-state-active text-foreground":"text-muted-foreground hover:bg-state-hover"),children:[e("span",{className:"truncate",children:n?g?.label??n:t}),e("span",{"aria-hidden":!0,children:"\u25BE"})]}),r&&s("div",{role:"listbox","aria-label":t,className:"absolute left-0 top-8 z-50 flex max-h-72 w-60 flex-col overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",children:[p&&e("input",{ref:u,type:"search",value:l,placeholder:"\u041D\u0430\u0439\u0442\u0438\u2026","aria-label":`\u041F\u043E\u0438\u0441\u043A: ${t}`,onChange:d=>i(d.target.value),onKeyDown:d=>{d.key==="Enter"&&b&&h&&v(h.value)},className:"sticky top-0 z-10 mb-1 h-7 flex-none rounded border border-input bg-background px-2 text-xs outline-none focus-visible:ring-1 focus-visible:ring-ring"}),b&&!h&&e("span",{className:"px-2 py-1 text-xs text-muted-foreground",children:"\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E"}),c.map(d=>e("button",{type:"button",role:"option","aria-selected":d.value===n,onClick:()=>v(d.value),className:k("flex-none truncate rounded px-2 py-1 text-left text-xs hover:bg-state-hover",d.value===n&&"font-semibold"),children:d.label},d.value))]})]})}function Se({priority:t,manual:n}){return s("span",{className:k("inline-flex h-5 min-w-7 flex-none items-center justify-center rounded-full border px-1.5 text-[11px] font-semibold",t===1&&"mf-prio-1 border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",t===2&&"border-border",t===3&&"border-border",t>=4&&"border-dashed border-border text-muted-foreground"),title:n?"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0430\u0434\u0430\u043D \u0432\u0440\u0443\u0447\u043D\u0443\u044E":"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u043F\u043E \u043A\u0430\u043D\u0430\u043B\u0430\u043C \u0441\u0432\u044F\u0437\u0438",children:["P",t,n?"\u270E":""]})}function bo({it:t}){let n=[[t.has_phone,"Phone","\u0442\u0435\u043B\u0435\u0444\u043E\u043D"],[t.has_whatsapp,"MessageCircle","WhatsApp"],[t.has_email,"Mail","email"],[t.has_website,"Globe","\u0441\u0430\u0439\u0442"]];return e("span",{className:"flex items-center gap-1","aria-label":"\u041A\u0430\u043D\u0430\u043B\u044B \u0441\u0432\u044F\u0437\u0438",children:n.map(([a,o,r])=>e("span",{title:`${r}: ${a?"\u0435\u0441\u0442\u044C":"\u043D\u0435\u0442"}`,className:a?"text-foreground":"text-muted-foreground/30",children:e(dt,{name:o,className:"size-3"})},r))})}function Qt({onNavigate:t,activeThreadId:n=null}){let{status:a,error:o}=H(),r=ct(),L=E(),l=Xt(),i=_e(),m=j(null),u=N=>{i({kind:"company",id:N.id,title:N.display_name},n)||$(N)},p=S2(),[g,b]=f(null),[c,h]=f(r.filters.q),v=a?.connected&&a.canView;w(()=>r.setScope(n??""),[n,r.setScope]),w(()=>{v&&(r.load(),L("outreach_facets").then(b,()=>b(null)))},[v]),w(()=>{let N=setTimeout(()=>{c.trim()!==r.filters.q&&r.setFilter("q",c.trim())},300);return()=>clearTimeout(N)},[c]),fe(N=>{r.items.some(z=>z.id===N)&&r.load()});let d=re(()=>[{value:"",label:"\u0412\u0441\u0435 \u0440\u0435\u0433\u0438\u043E\u043D\u044B"},...(g?.regions??[]).map(N=>({value:N.value,label:`${ve(N.value)} (${N.count})`}))],[g]),x=re(()=>[{value:"",label:"\u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043D\u044B"},...(g?.countries??[]).map(N=>({value:N.value,label:`${F(N.value)} (${N.count})`})).sort((N,z)=>N.label.localeCompare(z.label,"ru"))],[g]),_=[{value:"",label:"\u0412\u0441\u0435 \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B"},...[1,2,3,4,5].map(N=>({value:String(N),label:`P${N}`}))],y=[{value:"",label:"\u0412\u0441\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},...zt.map(N=>({value:N,label:oe[N]}))],I=[{value:"",label:"\u0412\u0441\u0435 \u0440\u043E\u043B\u0438"},...jt.map(N=>({value:N,label:ut[N]}))],T=[{value:"",label:"\u041F\u043E \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u0443"},{value:"coverage",label:"\u041F\u043E \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044E \u043B\u0438\u0441\u0442\u0430"}];if(o)return s(D,{children:["\u041F\u043B\u0430\u0433\u0438\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D: ",o]});if(!a)return e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"});if(!a.connected)return s(D,{children:[a.message||"\u041F\u043B\u0430\u0433\u0438\u043D \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D."," \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u043F\u043B\u0430\u0433\u0438\u043D\u044B \u2192 Manifest."]});if(!a.canView)return e(D,{children:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443: \u043D\u0443\u0436\u043D\u043E \u043F\u0440\u0430\u0432\u043E outreach.view \u0432 Manifest."});function $(N){r.select(N.id),t?.(),l(N.id,N.display_name)}let M=r.selection,W=(N,z)=>{p.close(),M&&!z?(r.select(N.id),u(N)):z&&!M?u(N):$(N)};return s("div",{className:"flex h-full min-h-0 flex-col",children:[s("div",{className:"flex flex-col gap-1.5 px-2 pb-2 pt-1",children:[M?s("div",{role:"status",className:"flex items-start gap-1 rounded-md border border-border bg-muted/50 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1",children:["\u0412\u044B\u0431\u043E\u0440\u043A\u0430 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430: ",e("b",{className:"font-medium",children:M.label})]}),e("button",{type:"button","aria-label":"\u041E\u0442\u0432\u044F\u0437\u0430\u0442\u044C \u043E\u0442 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430",title:"\u041E\u0442\u0432\u044F\u0437\u0430\u0442\u044C \u043E\u0442 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430 \u2014 \u0441\u0432\u043E\u0439 \u0444\u0438\u043B\u044C\u0442\u0440 \u0441\u043F\u0438\u0441\u043A\u0430",className:"rounded px-1 text-muted-foreground hover:bg-state-hover hover:text-foreground",onClick:r.unlink,children:"\xD7"})]}):s(P,{children:[e("input",{type:"search",value:c,onChange:N=>h(N.target.value),placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435, \u043A\u043E\u043D\u0442\u0430\u043A\u0442, \u0433\u043E\u0440\u043E\u0434\u2026","aria-label":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0440\u0435\u0435\u0441\u0442\u0440\u0443",className:"h-7 rounded-md border border-input bg-background px-2 text-xs outline-none focus-visible:ring-1 focus-visible:ring-ring"}),s("div",{className:"flex flex-wrap gap-1",children:[e(Fe,{label:"\u0420\u0435\u0433\u0438\u043E\u043D",value:r.filters.region,options:d,onChange:N=>r.setFilter("region",N)}),e(Fe,{label:"\u0421\u0442\u0440\u0430\u043D\u0430",value:r.filters.country,options:x,onChange:N=>r.setFilter("country",N)}),e(Fe,{label:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442",value:r.filters.priority,options:_,onChange:N=>r.setFilter("priority",N)}),e(Fe,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",value:r.filters.status,options:y,onChange:N=>r.setFilter("status",N)}),e(Fe,{label:"\u0420\u043E\u043B\u044C",value:r.filters.role,options:I,onChange:N=>r.setFilter("role",N)}),e(Fe,{label:"\u041F\u043E\u0440\u044F\u0434\u043E\u043A",value:r.filters.sort,options:T,onChange:N=>r.setFilter("sort",N)})]})]}),e("span",{className:"text-[11px] text-muted-foreground",children:r.loading&&r.items.length===0?"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026":`\u041D\u0430\u0439\u0434\u0435\u043D\u043E: ${r.total}`})]}),r.error&&s(D,{children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ",r.error]}),s("ul",{ref:m,onScroll:p.close,className:"min-h-0 flex-1 overflow-y-auto px-1",children:[r.items.map(N=>e("li",{children:s("button",{type:"button",draggable:!0,onMouseEnter:z=>p.enter(N,z.currentTarget),onMouseLeave:p.leave,onDragStart:z=>{p.close(),z.dataTransfer.effectAllowed="copy",z.dataTransfer.setData("text/plain",N.display_name)},onDragEnd:z=>{let Q=m.current?.getBoundingClientRect();Q&&z.clientX>Q.right+24&&u(N)},onAuxClick:z=>{z.button===1&&u(N)},onClick:z=>W(N,z.metaKey||z.ctrlKey),className:k("flex w-full flex-col gap-0.5 rounded-md px-2 py-1.5 text-left hover:bg-state-hover",r.selectedId===N.id&&"bg-state-active"),children:[s("span",{className:"flex items-center gap-1.5",children:[e(Se,{priority:N.priority,manual:N.priority_manual}),e("span",{className:"truncate text-sm font-medium",children:N.display_name}),N.roles?.includes("supplier")?e("span",{className:"flex-none rounded-full border border-emerald-500/40 px-1.5 text-[10px] text-emerald-700 dark:text-emerald-300",title:"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0437\u0430\u043A\u0443\u043F\u043E\u043A",children:"\u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A"}):null]}),s("span",{className:"flex items-center justify-between gap-2 text-[11px] text-muted-foreground",children:[s("span",{className:"truncate",children:[F(N.country_code),N.countries.length>1?` +${N.countries.length-1}`:""," \xB7 ",oe[N.status]??N.status]}),s("span",{className:"flex flex-none items-center gap-1.5",children:[N.coverage?s("span",{className:N.coverage.draft?"rounded border border-dashed border-[var(--mf-amber)] px-1 font-medium tabular-nums text-foreground":"rounded bg-[color-mix(in_oklab,var(--diff-added,#16a34a)_14%,transparent)] px-1 font-medium tabular-nums text-foreground",title:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u043E\u0433\u043E \u043B\u0438\u0441\u0442\u0430: ${N.coverage.by_volume}% \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443, ${N.coverage.by_positions}% \u043F\u043E \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C (${N.coverage.by==="pricelist"?"\u043F\u0440\u0430\u0439\u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":N.coverage.by==="distributor_site"?"\u0441\u0430\u0439\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":`\u0441\u0430\u0439\u0442 STIHL ${N.coverage.country}`}${N.coverage.draft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u2014 \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D":""})${N.coverage.unchecked?` \xB7 ${N.coverage.unchecked} \u0432\u044B\u0431\u043E\u0440\u043E\u0432 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C`:""}`,children:[Math.round(N.coverage.by_volume),"%"]}):null,e(bo,{it:N})]})]})]})},N.id)),r.items.length<r.total&&e("li",{className:"px-2 py-2",children:e("button",{type:"button",disabled:r.loading,onClick:()=>{r.load(!0).catch(N=>console.error(C(N)))},className:"w-full rounded-md border border-border py-1 text-xs hover:bg-state-hover disabled:opacity-50",children:r.loading?"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026":`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 (${r.total-r.items.length})`})})]}),p.peek?e(M2,{peek:p.peek,onKeep:p.keep,onLeave:p.leave,onClose:p.close,onBeside:N=>{p.close(),r.select(N.id),u(N)},onChat:N=>{p.close(),$(N)}}):null]})}function D({children:t}){return e("div",{role:"status",className:"px-3 py-2 text-xs text-muted-foreground",children:t})}var T2="manifest",bt=`${T2}/suppliers`,sa="sidebar.threadListProvider",xo="thread-list/thread-list",R2="__automatic__",ho="sidebar-tabs/tabs",E2="\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",A2="manifest:sidebar-previous-list",en="manifest:suppliers-list";async function P2(t){let{preferences:n}=await t.system.uiPreferences.list(),a=n[sa];return{value:typeof a.value=="string"?a.value:R2,revision:a.revision}}async function B2(t){let n=null;try{n=window.localStorage.getItem(A2)}catch{n=null}if(n&&n!==R2&&n!==bt)return n;try{let{plugins:a}=await t.plugins.list();if(a.some(o=>o.id==="sidebar-tabs"&&o.enabled))return ho}catch{}return xo}async function vo(t,n){for(let a=0;a<2;a++){let o=await P2(t),r=o.value===bt,L=n==="toggle"?!r:n==="on";if(L===r)return;let l;if(L){try{window.localStorage.setItem(A2,o.value)}catch{}l=bt}else l=await B2(t);try{await t.system.uiPreferences.set({key:sa,value:l,expectedRevision:o.revision});return}catch(i){if(a===1)throw i}}}var I2=()=>{window.dispatchEvent(new CustomEvent(en,{cancelable:!0,detail:"toggle"}))},tn=()=>{window.dispatchEvent(new CustomEvent(en,{cancelable:!0,detail:"on"}))},aa=!1;function O2(){let t=Oe();return w(()=>{let n=a=>{if(a.defaultPrevented||(a.preventDefault(),aa))return;aa=!0;let o=a.detail??"toggle";vo(t,o).catch(r=>console.warn("[manifest] \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432 \u043D\u0435 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u043B\u0441\u044F",r)).finally(()=>{aa=!1})};return window.addEventListener(en,n),()=>window.removeEventListener(en,n)},[t]),null}function $2({onNavigate:t,activeThreadId:n}){let a=Oe();return lt(()=>(document.documentElement.dataset.manifestSuppliers="on",()=>{delete document.documentElement.dataset.manifestSuppliers}),[]),w(()=>{let o=!0;return P2(a).then(async r=>{if(!o||r.value===bt)return;let L=await B2(a);L!==bt&&await a.system.uiPreferences.set({key:sa,value:L,expectedRevision:r.revision})}).catch(()=>{}),()=>{o=!1}},[a]),e("div",{"data-bb-plugin":T2,className:"h-full",children:e(ra,{children:e(Qt,{onNavigate:t,activeThreadId:n})})})}var ra=class extends Dn{state={error:null};static getDerivedStateFromError(n){return{error:n}}render(){return this.state.error?s("div",{role:"alert",className:"flex flex-col gap-2 px-3 py-2 text-sm text-muted-foreground",children:[s("span",{children:["\u0420\u0435\u0435\u0441\u0442\u0440 \u043D\u0435 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u0430\u043B\u0441\u044F: ",this.state.error.message]}),e("button",{type:"button",onClick:()=>this.setState({error:null}),className:"self-start rounded-md border border-border px-2 py-1 text-xs text-foreground hover:bg-state-hover",children:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C"})]}):this.props.children}};var xt="dashboard",D2="dashboard",We="manifest-registry-changed",yo="manifest-topic-filter";function Me(t){let n={};for(let[a,o]of Object.entries(t))o==null||o===""||Array.isArray(o)&&o.length===0||(n[a]=o);return n}function Z2(t){let n=ee(),[a,o]=f({}),[r,L]=f(null);w(()=>{if(o({}),L(null),!t)return;let i=!0;return n.call("topic_filter_get",{threadId:t}).then(m=>i&&o(m.filter),m=>i&&L(C(m))),()=>{i=!1}},[n,t]),se(yo,i=>{let m=i;t&&m?.threadId===t&&m.filter&&typeof m.filter=="object"&&o(m.filter)});let l=R(async i=>{let m=Me(i);if(o(m),!!t)try{await n.call("topic_filter_set",{threadId:t,filter:m})}catch(u){L(C(u))}},[n,t]);return{filter:a,setFilter:l,error:r}}var oa=new Set;function F2(t,n,a){let o=Jn(),r=Me(n),L=JSON.stringify(r);w(()=>{let l=L==="{}",i=Yn(t,l?null:{filter:JSON.parse(L),label:a,key:L});!l&&!oa.has(t)&&(oa.add(t),tn()),i&&o()},[L,a,o,t]),w(()=>()=>{t===""&&(oa.delete(t),Yn(t,null)&&o())},[o,t])}function H2(t){let n=E(),a=ee(),{status:o}=H(),[r,L]=f({metrics:null,queue:null,feed:[],seenAt:null,loading:!0,error:null}),l=j(0),i=j(void 0),m=JSON.stringify(t),u=!!o?.connected&&o.canView&&o.canWork,p=R(async()=>{if(!u)return;let b=++l.current;L(c=>({...c,loading:!0}));try{i.current===void 0&&(i.current=(await a.call("seen_get",null)).at,a.call("seen_set",{at:new Date().toISOString()}));let c=JSON.parse(m),h=i.current??new Date(Date.now()-7*864e5).toISOString(),[v,d,x]=await Promise.all([n("outreach_metrics",{filter:c}),n("outreach_queue",{filter:c,per_group:15}),n("outreach_feed",{filter:c,since:h,limit:30})]);if(b!==l.current)return;L({metrics:v,queue:d,feed:x.items,seenAt:i.current??null,loading:!1,error:null})}catch(c){if(b!==l.current)return;L(h=>({...h,loading:!1,error:C(c)}))}},[m,u,a,n]);w(()=>{p()},[p]);let g=j(null);return se(We,()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{p()},400)}),{...r,reload:p,ready:u}}function z2(){let t=E(),[n,a]=f([]),o=R(()=>{t("outreach_segments",{}).then(r=>a(r.items),()=>a([]))},[t]);return w(o,[o]),se(We,o),{segments:n,reload:o}}var nn=null,ca=new Set,La=null,an=null,la=!1,ia=0,_o=t=>(ca.add(t),()=>ca.delete(t));function j2(){let t=it(_o,()=>nn,()=>nn),n=E(),{status:a}=H(),o=!!a?.connected&&a.canView&&a.canWork,r=R(async()=>{if(o&&!(la||Date.now()-ia<5e3)){la=!0;try{let L=await n("outreach_metrics",{filter:{}});nn=L.checks.waiting_reply+L.checks.overdue}catch{nn=null}finally{la=!1,ia=Date.now()}ca.forEach(L=>L())}},[o,n]);return w(()=>{an=r,r();let L=setInterval(()=>{r()},10*6e4);return()=>{clearInterval(L),an===r&&(an=null)}},[r]),se(We,()=>{La&&clearTimeout(La),La=setTimeout(()=>{ia=0,an?.()},1500)}),t}var da="manifest:compose-intent";var ht="manifest:compose-intent";function rn(t,n,a){try{window.sessionStorage.setItem(da,JSON.stringify({kind:t,id:n,title:a,at:Date.now()}))}catch{}window.dispatchEvent(new Event(ht))}function ua(){try{let t=JSON.parse(window.sessionStorage.getItem(da)??"null");return t&&["company","mailing","template","topic","inbound","mail","needs"].includes(t.kind)&&Date.now()-t.at<18e5?t:null}catch{return null}}function ma(){try{window.sessionStorage.removeItem(da)}catch{}window.dispatchEvent(new Event(ht))}var pa="manifest:last-thread",fa="manifest:last-dashboard-thread",U2="manifest:rail-redirect-at",ga="manifest:last-mail-hub-thread",ba="manifest:last-needs-thread";function K2(t,n=!1,a=!1,o=!1){try{window.sessionStorage.setItem(pa,t),n&&window.sessionStorage.setItem(fa,t),a&&window.sessionStorage.setItem(ga,t),o&&window.sessionStorage.setItem(ba,t)}catch{}}function G2(t="outreach"){try{let n=Number(window.sessionStorage.getItem(U2)??0);if(Date.now()-n<3e3)return;window.sessionStorage.setItem(U2,String(Date.now()));let a={outreach:pa,dashboard:fa,mail:ga,needs:ba}[t];return window.sessionStorage.getItem(a)}catch{return null}}function q2(t){try{for(let n of[pa,fa,ga,ba])window.sessionStorage.getItem(n)===t&&window.sessionStorage.removeItem(n)}catch{}}var Te="mail",V2="mail",Ye={potential_supplier:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",supplier:"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",potential_client:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043A\u043B\u0438\u0435\u043D\u0442\u044B",client:"\u041A\u043B\u0438\u0435\u043D\u0442\u044B"},sn={first:"\u041F\u0435\u0440\u0432\u043E\u0435 \u043F\u0438\u0441\u044C\u043C\u043E",follow_up:"\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0435",reply:"\u041E\u0442\u0432\u0435\u0442",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},on={reply:"\u041E\u0442\u0432\u0435\u0442",auto_reply:"\u0410\u0432\u0442\u043E\u043E\u0442\u0432\u0435\u0442",bounce:"\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430",unsubscribe:"\u041E\u0442\u043F\u0438\u0441\u043A\u0430",other:"\u041F\u0440\u043E\u0447\u0435\u0435"};function Re({label:t,children:n,hint:a}){return s("label",{className:"flex flex-col gap-1 text-xs",children:[e("span",{className:"text-muted-foreground",children:t}),n,a?e("span",{className:"text-[11px] text-muted-foreground",children:a}):null]})}var Ne="h-8 rounded-md border border-input bg-transparent px-2 text-xs",W2="min-h-24 rounded-md border border-input bg-transparent px-2 py-1.5 text-xs font-mono";function Ln({html:t,className:n,style:a}){return e("iframe",{title:"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u043F\u0438\u0441\u044C\u043C\u0430",sandbox:"",srcDoc:t,style:a,className:k("w-full rounded-md border border-border bg-white",n)})}function Je({value:t,onChange:n,placeholder:a}){let o=E(),[r,L]=f(""),[l,i]=f([]),[m,u]=f(null);return w(()=>{if(r.trim().length<2){i([]);return}let p=setTimeout(()=>{o("outreach_list_companies",{q:r.trim(),limit:8}).then(g=>i(g.items),g=>u(C(g)))},250);return()=>clearTimeout(p)},[r,o]),t?s("span",{className:"flex items-center gap-2 text-xs",children:[e("span",{className:"font-medium",children:t.name}),e("button",{type:"button",className:"text-muted-foreground underline-offset-2 hover:underline",onClick:()=>n(null),children:"\u0441\u043C\u0435\u043D\u0438\u0442\u044C"})]}):s("div",{className:"relative",children:[e(G,{className:"h-8 text-xs",placeholder:a??"\u041D\u0430\u0439\u0442\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E\u2026",value:r,onChange:p=>L(p.target.value)}),m?e("p",{className:"text-[11px] text-destructive",children:m}):null,l.length>0?e("ul",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-y-auto rounded-md border border-border bg-popover text-xs shadow",children:l.map(p=>e("li",{children:s("button",{type:"button",className:"flex w-full justify-between gap-2 px-2 py-1 text-left hover:bg-state-hover",onClick:()=>{n({id:p.id,name:p.display_name}),L(""),i([])},children:[e("span",{className:"truncate",children:p.display_name}),e("span",{className:"text-muted-foreground",children:F(p.country_code)})]})},p.id))}):null]})}var xa="needs",Y2="needs",vt={kind:"needs",id:"sheet",title:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442"},cn="manifest:open-source",ln=null;function J2(t){ln=t;let n=new CustomEvent(cn,{cancelable:!0,detail:t});return window.dispatchEvent(n),n.defaultPrevented&&(ln=null),n.defaultPrevented}function Q2(){let t=ln;return ln=null,t}var va="manifest-focus-changed",ya="object",yt="object-beside",_t="company-beside",X={company:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F",mailing:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430",template:"\u0428\u0430\u0431\u043B\u043E\u043D",topic:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",inbound:"\u0412\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E",mail:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",needs:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442"},No={company:"\u0410\u0443\u0442\u0440\u0438\u0447",mailing:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430",template:"\u0428\u0430\u0431\u043B\u043E\u043D",topic:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434",inbound:"\u041F\u0438\u0441\u044C\u043C\u043E",mail:"\u041F\u043E\u0447\u0442\u0430",needs:"\u0417\u0430\u043A\u0443\u043F\u043A\u0438"};function dn(t){let n=ee(),[a,o]=f(void 0),[r,L]=f([]),[l,i]=f(null),m=j(0),u=R(()=>{let c=++m.current;n.call("focus_get",{threadId:t}).then(h=>{c===m.current&&(o(h.focus),L(h.trail),i(null))},h=>c===m.current&&i(C(h)))},[n,t]);w(()=>{o(void 0),u()},[u]),se(va,c=>{let h=c;h?.threadId===t&&(m.current++,o(h.focus??null),L(Array.isArray(h.trail)?h.trail:[]))});let p=R(async c=>{let h=await n.call("focus_set",{threadId:t,focus:c});o(h.focus),L(h.trail)},[n,t]),g=R(async c=>{let h=await n.call("focus_back",{threadId:t,kind:c.kind,id:c.id});o(h.focus),L(h.trail)},[n,t]),b=R(async c=>{let h=await n.call("focus_forget",{threadId:t,kind:c.kind,id:c.id});o(h.focus),L(h.trail)},[n,t]);return{focus:a,trail:r,error:l,setFocus:p,back:g,forget:b,reload:u}}function Qe(){let t=ae();return R(n=>t.openThreadPanel({actionId:ya,title:n?n.slice(0,60):"Manifest",params:{v:1}}),[t])}function X2(){let t=Oe(),n=ee(),a=ae();return R(async(o,r)=>{let{sectionId:L}=await n.call("section_ensure",null).catch(()=>({sectionId:null})),l={focus:{...o}};o.kind==="company"&&Object.assign(l,{companyId:o.id,companyName:o.title});let i=await t.threads.spawn({...r,title:`${No[o.kind]}: ${o.title||X[o.kind]}`.slice(0,120),pluginMetadata:l,...L?{sectionId:L}:{}});return await n.call("focus_set",{threadId:i.id,focus:o}),o.kind==="company"&&await n.call("chat_link",{companyId:o.id,threadId:i.id}),a.toThread(i.id),i.id},[a,n,t])}function le(){let t=ee(),n=ae();return R(async a=>{let{chats:o}=a.id?await t.call("chats_list",{kind:a.kind,id:a.id}).catch(()=>({chats:[]})):{chats:[]},r=o[0];if(r){await t.call("focus_set",{threadId:r.threadId,focus:{...a,title:a.title.slice(0,200)}}),n.toThread(r.threadId);return}rn(a.kind,a.id,a.title);let{sectionId:L}=await t.call("section_ensure",null).catch(()=>({sectionId:null}));n.toCompose({focusPrompt:!0,...L?{placement:{sectionId:L,pinned:!1}}:{}})},[n,t])}function Xt(){let t=le(),n=E();return R((a,o="")=>{(async()=>{let r=o;r||(r=await n("outreach_get_company",{id:a}).then(L=>L?.company?.display_name??"",()=>"")),await t({kind:"company",id:a,title:r})})()},[t,n])}var ha="manifest:open-beside";function er(t,n,a){let o={v:1,pin:{kind:n.kind,id:n.id,title:n.title.slice(0,200)}},r=(n.title||X[n.kind]).slice(0,60);for(let L of a)if(t.openThreadPanel({actionId:L,title:r,params:o}))return!0;return!1}function un(t){let n=ae();w(()=>{let a=o=>{let r=o.detail;o.defaultPrevented||!r||r.threadId!==t||er(n,r.ref,t?[yt]:[_t])&&o.preventDefault()};return window.addEventListener(ha,a),()=>window.removeEventListener(ha,a)},[n,t])}function _e(){let t=ae();return R((n,a)=>{if(a!==void 0){let o=new CustomEvent(ha,{cancelable:!0,detail:{ref:n,threadId:a}});if(window.dispatchEvent(o),o.defaultPrevented)return!0}return er(t,n,a===null?[_t,yt]:[yt,_t])},[t])}function Ee(){let t=ee(),n=ae();return R(async a=>{let o=G2(a);if(o===void 0)return"stay";if(!o)return"none";let{alive:r}=await t.call("thread_alive",{threadId:o}).catch(()=>({alive:!1}));return r?(n.toThread(o),"thread"):(q2(o),"none")},[n,t])}function Xe(t){return new Promise((n,a)=>{let o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>a(o.error??new Error("\u0444\u0430\u0439\u043B \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D")),o.readAsArrayBuffer(t)})}function et(t){let n="",a=new Uint8Array(t);for(let o=0;o<a.length;o+=32768)n+=String.fromCharCode(...a.subarray(o,o+32768));return btoa(n)}function wo(t){return t.source_kind?t.source_kind==="stihl_country"?`\u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0439: \u0441\u0430\u0439\u0442 STIHL ${F(t.country??"")}`:`\u043B\u0438\u0447\u043D\u044B\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433${t.draft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A":""}`:""}function ko(t){if(t.kind==="file")return`\u0444\u0430\u0439\u043B \xB7 ${tr(t.size??0)}`;let n=wo(t),a;t.scope==="catalog"?a=t.catalog?`\u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 (${n})`:"\u0432\u0435\u0441\u044C \u043B\u0438\u0441\u0442 \u2014 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u043D\u0435\u0442":a=n?`\u0432\u0435\u0441\u044C \u043B\u0438\u0441\u0442, \u0441 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430\u043C\u0438 (${n})`:"\u0432\u0435\u0441\u044C \u043B\u0438\u0441\u0442";let o=[`${t.rows} \u043F\u043E\u0437.`,a];return t.fallback&&t.source!=="auto"&&o.push(t.source==="own"?"\u043B\u0438\u0447\u043D\u043E\u0433\u043E \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u043D\u0435\u0442":"\u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u043D\u0435\u0442"),t.no_qty&&o.push("\u0431\u0435\u0437 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430"),o.join(" \xB7 ")}function tr(t){return t<1024*1024?`${Math.max(1,Math.round(t/1024))} \u041A\u0411`:`${(t/1024/1024).toFixed(1).replace(".",",")} \u041C\u0411`}function Co(t,n,a){let o=atob(a),r=new Uint8Array(o.length);for(let i=0;i<o.length;i++)r[i]=o.charCodeAt(i);let L=URL.createObjectURL(new Blob([r],{type:n})),l=document.createElement("a");l.href=L,l.download=t,document.body.appendChild(l),l.click(),l.remove(),setTimeout(()=>URL.revokeObjectURL(L),1e4)}function mn({sheets:t,companyId:n,messageId:a}){let o=E(),[r,L]=f(null);if(!t.length)return null;let l=async i=>{L(null);try{let m=await o("mail_file",{...a?{message_id:a}:{company_id:n},position:i});Co(m.filename,m.content_type,m.content_base64)}catch(m){L(C(m))}};return s("ul",{className:"flex flex-col gap-1","aria-label":"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F",children:[t.map((i,m)=>s("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 rounded-md border border-[var(--mf-line-300)] bg-[var(--mf-surface)] px-2 py-1 text-xs",children:[e("span",{"aria-hidden":!0,children:"\u{1F4CE}"}),e("span",{className:"font-medium",children:i.filename}),e("span",{className:"text-muted-foreground",children:ko(i)}),e("button",{type:"button",className:"ml-auto text-[11px] underline",onClick:()=>{l(m)},children:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C"})]},m)),r?e("li",{role:"alert",className:"text-[11px] text-destructive",children:r}):null]})}var Nt=t=>t?.find(n=>n.kind!=="file")?.available;function tt({specs:t,busy:n,onChange:a,available:o,inherit:r}){let L=E(),l=j(null),[i,m]=f(!1),[u,p]=f(null),g=t.find($=>$.kind==="procurement_sheet"),b=t.filter($=>$.kind==="file"),c=r?"inherit":g?.scope??"",h=g?.source??"auto",v=$=>({kind:"file",file_id:$.file_id}),d=($,M)=>[...$?[$]:[],...M.map(v)],x=$=>{let M={kind:"procurement_sheet",scope:g?.scope??"catalog",source:h,...$};$.no_qty??g?.no_qty?M.no_qty=!0:delete M.no_qty,a(d(M,b))},_=async $=>{if(p(null),$.size>7*1024*1024){p("\u0444\u0430\u0439\u043B \u0431\u043E\u043B\u044C\u0448\u0435 7 \u041C\u0411 \u2014 \u0448\u043B\u044E\u0437 \u043D\u0435 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0435\u0433\u043E \u0432 \u043F\u0438\u0441\u044C\u043C\u043E");return}m(!0);try{let M=et(await Xe($)),W=await L("mail_file_upload",{filename:$.name,content_base64:M,...$.type?{content_type:$.type}:{}});a(d(g??null,[...b.filter(N=>N.file_id!==W.id),{kind:"file",file_id:W.id}]))}catch(M){p(C(M))}finally{m(!1)}},y=$=>!o||o.includes($),I="h-7 rounded-md border border-input bg-background px-2 text-xs disabled:opacity-60",T=n||i;return s("div",{className:"flex flex-col gap-1 text-xs",role:"group","aria-label":"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435",children:[s("div",{className:"flex flex-wrap items-center gap-1.5",children:[e("span",{className:"text-muted-foreground",children:"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435:"}),s("select",{className:I,value:c,disabled:T,"aria-label":"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0438\u0441\u044C\u043C\u0430",onChange:$=>{let M=$.target.value;M==="inherit"?a(null):M?x({scope:M}):a(d(null,b))},children:[r!==void 0?e("option",{value:"inherit",children:"\u043A\u0430\u043A \u0443 \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0438"}):null,e("option",{value:"",children:b.length?"\u0431\u0435\u0437 RFQ":"\u0431\u0435\u0437 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F"}),e("option",{value:"catalog",children:"RFQ \u2014 \u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435"}),e("option",{value:"all",children:"RFQ \u2014 \u0432\u0435\u0441\u044C \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442"})]}),g&&!r?s(P,{children:[s("select",{className:I,value:h,disabled:T,"aria-label":"\u041A\u0430\u0442\u0430\u043B\u043E\u0433",onChange:$=>x({source:$.target.value}),children:[e("option",{value:"auto",children:"\u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u043A\u0430\u043A \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435"}),s("option",{value:"country",children:["\u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0439 (\u0441\u0430\u0439\u0442 STIHL \u0441\u0442\u0440\u0430\u043D\u044B)",y("country")?"":" \u2014 \u043D\u0435\u0442"]}),s("option",{value:"own",children:["\u043B\u0438\u0447\u043D\u044B\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",y("own")?"":" \u2014 \u043D\u0435\u0442"]})]}),s("select",{className:I,value:g.no_qty?"no":"yes",disabled:T,"aria-label":"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E",onChange:$=>x({no_qty:$.target.value==="no"}),children:[e("option",{value:"yes",children:"\u0441 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\u043C"}),e("option",{value:"no",children:"\u0431\u0435\u0437 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430"})]})]}):null,e("input",{ref:l,type:"file",className:"hidden","aria-label":"\u0424\u0430\u0439\u043B \u0432\u043E \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435",onChange:$=>{let M=$.target.files?.[0];$.target.value="",M&&_(M)}}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:T||t.length>=5,onClick:()=>l.current?.click(),children:i?"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026":"+ \u0424\u0430\u0439\u043B"})]}),b.length?e("ul",{className:"flex flex-wrap gap-1","aria-label":"\u0424\u0430\u0439\u043B\u044B \u0432\u043E \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0438",children:b.map($=>s("li",{className:"flex items-center gap-1 rounded-md border border-[var(--mf-line-300)] bg-[var(--mf-surface)] px-1.5 py-0.5",children:[e("span",{"aria-hidden":!0,children:"\u{1F4CE}"}),e("span",{className:"max-w-[14rem] truncate",title:$.filename,children:$.filename??"\u0444\u0430\u0439\u043B"}),$.size?e("span",{className:"text-muted-foreground",children:tr($.size)}):null,e("button",{type:"button",className:"px-0.5 text-muted-foreground hover:text-destructive disabled:opacity-50",disabled:T,"aria-label":`\u0423\u0431\u0440\u0430\u0442\u044C ${$.filename??"\u0444\u0430\u0439\u043B"}`,onClick:()=>a(d(g??null,b.filter(M=>M.file_id!==$.file_id))),children:"\u2715"})]},$.file_id))}):null,u?e("span",{role:"alert",className:"text-[11px] text-destructive",children:u}):null]})}function nr({companyId:t,specs:n,available:a,onSaved:o}){let r=E(),[L,l]=f(!1),[i,m]=f(null);return s("div",{className:"flex flex-col gap-1",children:[e(tt,{specs:n,busy:L,available:a,onChange:async u=>{l(!0),m(null);try{o(await r("mail_draft_attachments",{company_id:t,attachments:u??[]}))}catch(p){m(C(p))}finally{l(!1)}}}),i?e("span",{role:"alert",className:"text-[11px] text-destructive",children:i}):null]})}var He=t=>t??[];var So="\u043D\u0435\u0442 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430";function pn(t){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(!1),[i,m]=f(null),u=j(0),p=R(()=>{if(!t||!a?.connected)return;let g=++u.current;n("mail_draft_get",{company_id:t}).then(b=>{g===u.current&&(r(b),l(!1),m(null))},b=>{if(g!==u.current)return;let c=C(b);c.includes(So)?(r(null),l(!0),m(null)):m(c)})},[t,a?.connected,n]);return w(()=>{r(null),l(!1),m(null)},[t]),w(p,[p]),fe(g=>{g===t&&p()}),{letter:o,none:L,error:i,reload:p,setLetter:r}}function ar(t){let n=t.split(`
2
- `).reduce((a,o)=>a+Math.max(1,Math.ceil(o.length/90)),0);return Math.min(900,80+n*21)}function rr({letter:t,compact:n}){let a=t.draft,o=`${a.template_name?`\u041F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443 \xAB${a.template_name}\xBB${a.template_version?` v${a.template_version}`:""}`:"\u0411\u0435\u0437 \u0448\u0430\u0431\u043B\u043E\u043D\u0430"}${a.edited?" \xB7 \u0438\u0437\u043C\u0435\u043D\u0451\u043D":""} \xB7 ${a.updated_by} \xB7 ${q(a.updated_at)}`;return e(_a,{preview:t.preview,caption:o,compact:n,companyId:a.company_id})}function _a({preview:t,caption:n,compact:a,companyId:o}){let[r,L]=f("html");return s("div",{className:"mf-island mf-card flex flex-col gap-2 overflow-hidden p-0 text-xs",children:[s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 border-b border-[var(--mf-line-200)] bg-[#fbfcfb] px-3 py-2",children:[e("dt",{className:"text-muted-foreground",children:"\u041E\u0442"}),e("dd",{className:"truncate",children:t.from?`${t.from_name} <${t.from}>`:e("span",{className:"text-destructive",children:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D"})}),e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u043C\u0443"}),e("dd",{className:"truncate",children:t.to||e("span",{className:"text-destructive",children:"\u043D\u0435\u0442 email"})}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:t.subject})]}),s("div",{className:"flex flex-col gap-2 px-3 pb-3",children:[n?e("p",{className:"text-[11px] text-muted-foreground",children:n}):null,t.problems.length>0?e("ul",{className:"flex flex-col gap-0.5 rounded-md border border-[rgba(240,165,26,0.45)] bg-[rgba(240,165,26,0.08)] px-2 py-1",children:t.problems.map(l=>e("li",{children:s(J,{tone:"warning",children:["\u041D\u0435 \u0443\u0439\u0434\u0451\u0442: ",l]})},l))}):e(J,{tone:"ok",children:"\u0413\u043E\u0442\u043E\u0432\u043E \u043A \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435: \u0442\u0430\u043A \u043F\u0438\u0441\u044C\u043C\u043E \u0438 \u0443\u0439\u0434\u0451\u0442."}),t.attachments?.length?e(mn,{sheets:t.attachments,companyId:o}):null,e("div",{className:"flex gap-1",children:["html","text"].map(l=>e("button",{type:"button",onClick:()=>L(l),className:k("rounded-md px-2 py-0.5",r===l?"bg-state-active font-medium":"text-muted-foreground hover:bg-state-hover"),children:l==="html"?"\u041F\u0438\u0441\u044C\u043C\u043E":"\u0422\u0435\u043A\u0441\u0442\u043E\u0432\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F"},l))}),r==="html"?e(Ln,{html:t.html,className:"w-full",style:{height:a?Math.min(420,ar(t.text)):ar(t.text)}}):e("pre",{className:"max-h-[480px] overflow-y-auto whitespace-pre-wrap rounded-md bg-muted/40 p-2 font-sans",children:t.text})]})]})}var Mo="manifest-letter-changed",To="manifest-inbound-changed";function sr(t){se(Mo,n=>{let a=n;typeof a?.id=="string"&&t(a.id,typeof a.companyId=="string"?a.companyId:null)})}function Na(t){let n=E(),[a,o]=f(null),[r,L]=f(null),l=R(()=>{t&&n("mail_message_get",{id:t}).then(i=>{o(i),L(null)},i=>L(C(i)))},[t,n]);return w(l,[l]),sr(i=>{i===t&&l()}),se(To,()=>l()),{letter:a,error:r,reload:l,setLetter:o}}function Ro(t){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(null),i=j(0),m=R(()=>{if(!t||!a?.connected||!a.canMail)return;let u=++i.current;n("mail_messages",{company_id:t,limit:50}).then(p=>{u===i.current&&(r(p?.items??[]),l(null))},p=>u===i.current&&l(C(p)))},[t,a?.canMail,a?.connected,n]);return w(m,[m]),fe(u=>{u===t&&m()}),sr((u,p)=>{p===t&&m()}),{items:o,error:L,reload:m}}function pe({primary:t,danger:n,disabled:a,onClick:o,children:r,title:L}){return e("button",{type:"button",title:L,disabled:a,onClick:o,className:k("h-7 rounded-md px-2.5 font-semibold disabled:cursor-not-allowed disabled:opacity-45 [@media(pointer:coarse)]:h-10",t?"bg-foreground text-background":n?"border border-[rgba(255,79,58,0.5)] bg-background text-destructive":"hover:bg-state-hover"),children:r})}function wa(){let{status:t}=H();return t?.connected?t.canSend?null:"\u043D\u0435\u0442 \u043F\u0440\u0430\u0432\u0430 \xAB\u0410\u0443\u0442\u0440\u0438\u0447: \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043F\u0438\u0441\u0435\u043C\xBB (outreach.send)":"\u043D\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043A Manifest"}function fn({letter:t,companyId:n,onSent:a,compact:o}){let r=E(),L=wa(),[l,i]=f(null),m=l!==null,u=I=>i(I?t:null),[p,g]=f(!1),[b,c]=f(null);w(()=>{l&&!p&&l.fingerprint!==t.fingerprint&&(i(null),c("\u041F\u0438\u0441\u044C\u043C\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \u2014 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0435\u0433\u043E \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435."))},[p,l,t.fingerprint]);let v=(l??t).preview,d=t.preview.problems.length===0,x=!!v.sender?.legal_entity?.sandbox,_=async()=>{if(l){g(!0),c(null);try{let I=await r("mail_send",{company_id:n,expect_updated_at:l.draft.updated_at,fingerprint:l.fingerprint??""});u(!1),a?.(I)}catch(I){c(C(I))}finally{g(!1)}}},y=L??(d?null:`\u043D\u0435 \u0443\u0439\u0434\u0451\u0442: ${t.preview.problems[0]}`);return s("div",{className:"flex flex-col gap-1.5",children:[m?e(be,{title:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E?",actions:s(P,{children:[e(pe,{primary:!0,disabled:p,onClick:()=>{_()},children:p?"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C\u2026":"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C"}),e(pe,{disabled:p,onClick:()=>u(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u043C\u0443"}),e("dd",{className:"break-all",children:v.to}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:v.subject}),e("dt",{className:"text-muted-foreground",children:"\u041E\u0442 \u043A\u043E\u0433\u043E"}),s("dd",{className:"break-all",children:[v.from_name," \xB7 ",v.from]}),e("dt",{className:"text-muted-foreground",children:"\u041A\u0443\u0434\u0430"}),e("dd",{children:x?s(P,{children:[e(ce,{sandbox:!0})," \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u043C\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043D\u0435 \u0443\u0439\u0434\u0451\u0442"]}):"\u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u043C\u0443 \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0443"}),e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u0433\u0434\u0430"}),e("dd",{children:"\u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u044E\u0440\u043B\u0438\u0446\u0430"})]})}):s("div",{className:"flex flex-wrap items-center gap-2",children:[e(pe,{primary:!0,disabled:!!y,title:y??void 0,onClick:()=>u(!0),children:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C"}),x?e(ce,{sandbox:!0}):null,y&&!o?e("span",{className:"text-[11px] text-muted-foreground",children:y}):null]}),b?e("p",{className:"text-[11px] text-destructive",children:b}):null]})}function ka({letter:t,onDone:n}){let a=E(),o=wa(),[r,L]=f(!1),[l,i]=f(!1),[m,u]=f(null);if(!t.cancellable)return null;let p=async()=>{i(!0),u(null);try{let g=await a("mail_message_cancel",{id:t.id});n?.(g),L(!1)}catch(g){u(C(g))}finally{i(!1)}};return s("div",{className:"flex flex-col gap-1.5",children:[r?e(be,{title:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E?",actions:s(P,{children:[e(pe,{danger:!0,disabled:l,onClick:()=>{p()},children:l?"\u041E\u0442\u043C\u0435\u043D\u044F\u0435\u043C\u2026":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E"}),e(pe,{disabled:l,onClick:()=>L(!1),children:"\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C"})]}),children:s("span",{children:[t.to," \u2014 \u043F\u0438\u0441\u044C\u043C\u043E \u0441\u043D\u0438\u043C\u0435\u0442\u0441\u044F \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438. \u0415\u0441\u043B\u0438 \u043E\u043D\u043E \u0443\u0436\u0435 \u0443\u0445\u043E\u0434\u0438\u0442, \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0441\u044F."]})}):e(pe,{disabled:!!o,title:o??void 0,onClick:()=>L(!0),children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"}),m?e("p",{className:"text-[11px] text-destructive",children:m}):null]})}function gn({letter:t,className:n}){let a=t.sent_at?` ${q(t.sent_at)}`:t.scheduled_at&&!t.final?` \xB7 \u0443\u0439\u0434\u0451\u0442 ~${q(t.scheduled_at)}`:"";return s("span",{className:k("inline-flex flex-wrap items-center gap-1.5",n),children:[s(J,{tone:t.tone,children:[t.status_text,a]}),t.replies.length>0?s(V,{tone:"volt",children:["\u043E\u0442\u0432\u0435\u0442",t.replies.length>1?`\u043E\u0432 ${t.replies.length}`:""]}):null,t.sandbox?e(ce,{sandbox:!0}):null]})}function Eo({id:t,onReply:n}){let{letter:a,error:o,setLetter:r}=Na(t);if(o)return e("p",{className:"text-destructive",children:o});if(!a)return e("p",{className:"text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"});let L=a.replies.filter(l=>l.kind==="reply").at(-1);return s("div",{className:"mf-card flex flex-col gap-2 overflow-hidden p-0 text-xs",children:[s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 border-b border-[var(--mf-line-200)] bg-[#fbfcfb] px-3 py-2",children:[e("dt",{className:"text-muted-foreground",children:"\u041E\u0442"}),s("dd",{className:"truncate",children:[a.from_name," <",a.from,"> \xB7 ",a.legal_entity]}),e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u043C\u0443"}),e("dd",{className:"truncate",children:a.to}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:a.subject}),e("dt",{className:"text-muted-foreground",children:"\u0421\u0442\u0430\u0442\u0443\u0441"}),e("dd",{children:e(gn,{letter:a})})]}),s("div",{className:"flex flex-col gap-2 px-3 pb-3",children:[s("p",{className:"text-[11px] text-muted-foreground",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u043B ",a.created_by," \xB7 ",q(a.created_at),a.mailing_name?` \xB7 \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \xAB${a.mailing_name}\xBB`:""]}),e(ka,{letter:a,onDone:r}),e(mn,{sheets:a.attachments??[],messageId:a.id}),a.replies.map(l=>s("div",{title:"\u0422\u0435\u043A\u0441\u0442 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430 \u043A\u0430\u043A \u043F\u0440\u0438\u0448\u0451\u043B",className:"flex flex-col gap-1 rounded-md border border-[var(--mf-line-300)] bg-background p-2",children:[s("span",{className:"flex flex-wrap items-center gap-1.5",children:[e(V,{tone:l.kind==="reply"?"volt":"muted",children:l.kind==="reply"?"\u043E\u0442\u0432\u0435\u0442":l.kind==="auto_reply"?"\u0430\u0432\u0442\u043E\u043E\u0442\u0432\u0435\u0442":l.kind}),s("span",{className:"text-muted-foreground",children:[q(l.received_at)," \xB7 ",l.from_name||l.from]})]}),e("span",{className:"whitespace-pre-wrap",children:l.snippet})]},l.id)),L&&n?e("div",{children:e(pe,{primary:!0,onClick:()=>n(L.id),children:"\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C"})}):null,e("pre",{className:"max-h-[360px] overflow-y-auto whitespace-pre-wrap rounded-md bg-muted/40 p-2 font-sans",children:a.text})]})]})}function or({companyId:t,onReply:n,focusId:a}){let{items:o,error:r}=Ro(t),[L,l]=f(a??null);return w(()=>{a&&l(a)},[a]),r?e("p",{className:"text-destructive",children:r}):o?o.length===0?e("p",{className:"text-muted-foreground",children:"\u041F\u0438\u0441\u0435\u043C \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u043B\u0438."}):e("ul",{className:"flex flex-col gap-1",children:o.map(i=>s("li",{className:"flex flex-col gap-1",children:[s("button",{type:"button",onClick:()=>l(L===i.id?null:i.id),className:k("flex min-w-0 flex-col gap-0.5 rounded-md border border-[var(--mf-line-300)] bg-background px-2 py-1.5 text-left hover:bg-state-hover",L===i.id&&"shadow-[inset_2px_0_0_var(--foreground)]"),children:[e("span",{className:"truncate font-medium",children:i.subject}),e(gn,{letter:i,className:"text-[11px]"})]}),L===i.id?e(Eo,{id:i.id,onReply:n}):null]},i.id))}):null}function bn(t){let n=t.progress;if(t.state==="draft"||!n)return{tone:t.skipped?"warning":t.ready?"ok":"muted",text:`\u0443\u0439\u0434\u0451\u0442 ${t.ready} \u0438\u0437 ${t.total}${t.skipped?` \xB7 \u043D\u0435 \u0443\u0439\u0434\u0451\u0442 ${t.skipped}`:""}`};let a=[`\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E ${n.sent} \u0438\u0437 ${n.letters}`];return n.in_channel&&a.push(`\u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 ${n.in_channel}`),n.failed&&a.push(`\u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430 ${n.failed}`),n.cancelled&&a.push(`\u0441\u043D\u044F\u0442\u043E ${n.cancelled}`),n.unsubscribes&&a.push(`\u043E\u0442\u043F\u0438\u0441\u043A\u0430 ${n.unsubscribes}`),t.state==="sending"&&n.estimated_done_at&&a.push(`\u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F ~${q(n.estimated_done_at)}`),t.state==="stopped"&&a.push("\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430"),{tone:t.state==="sending"?"info":n.failed?"warning":"ok",text:a.join(" \xB7 ")}}function Ca({m:t,className:n}){let a=t.progress;return a?e(Yt,{className:n,parts:[{tone:"ok",value:a.sent},{tone:"info",value:a.in_channel},{tone:"error",value:a.failed},{tone:"warning",value:a.cancelled+a.suppressed}]}):null}function xn({mailing:t,onChanged:n}){let a=E(),o=wa(),[r,L]=f(null),[l,i]=f(null),m=x=>{L(x),i(x==="send"?t:null)},[u,p]=f(!1),[g,b]=f(null);w(()=>{l&&!u&&(l.fingerprint!==t.fingerprint||l.ready!==t.ready||t.state!=="draft")&&(L(null),i(null),t.state==="draft"&&b("\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C \u2014 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0435\u0451 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435."))},[u,l,t.fingerprint,t.ready,t.state]);let c=l??t,h=async(x,_)=>{p(!0),b(null);try{let y=await a(x,_);n?.(y),m(null)}catch(y){b(C(y))}finally{p(!1)}},v=c.mode==="sandbox";if(c.state==="draft"){let x=o??(c.ready===0?"\u043D\u0438 \u043E\u0434\u043D\u043E \u043F\u0438\u0441\u044C\u043C\u043E \u043D\u0435 \u0443\u0439\u0434\u0451\u0442":null);return s("div",{className:"flex flex-col gap-1.5",children:[r==="send"?e(be,{title:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C ${c.ready} ${Ao(c.ready,"\u043F\u0438\u0441\u044C\u043C\u043E","\u043F\u0438\u0441\u044C\u043C\u0430","\u043F\u0438\u0441\u0435\u043C")}?`,actions:s(P,{children:[e(pe,{primary:!0,disabled:u,onClick:()=>{h("mail_mailing_send",{id:c.id,expect:c.ready,fingerprint:c.fingerprint??""})},children:u?"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C\u2026":`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C ${c.ready}`}),e(pe,{disabled:u,onClick:()=>m(null),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:c.subject}),e("dt",{className:"text-muted-foreground",children:"\u041A\u0443\u0434\u0430"}),e("dd",{children:c.mode==="mixed"?s(P,{children:["\u0447\u0430\u0441\u0442\u044C \u043F\u0438\u0441\u0435\u043C \u2014 ",e(ce,{sandbox:!0}),", \u0447\u0430\u0441\u0442\u044C \u2014 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C (\u0440\u0430\u0437\u043D\u044B\u0435 \u044E\u0440\u043B\u0438\u0446\u0430)"]}):e(P,{children:v?s(P,{children:[e(ce,{sandbox:!0})," \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C \u043D\u0435 \u0443\u0439\u0434\u0451\u0442"]}):"\u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C"})}),e("dt",{className:"text-muted-foreground",children:"\u041E\u0442 \u043A\u043E\u0433\u043E"}),e("dd",{children:(c.senders??[]).map(_=>`${_.from_name||_.from} \u2014 ${_.letters}`).join(" \xB7 ")||"\u2014"}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u043F"}),e("dd",{children:v?"\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430: \u0441\u0435\u043A\u0443\u043D\u0434\u044B":"\u043F\u043E \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u044E\u0440\u043B\u0438\u0446\u0430, \u0434\u043E 20 \u043F\u0438\u0441\u0435\u043C \u0432 \u0434\u0435\u043D\u044C \u043D\u0430 \u0441\u0442\u0430\u0440\u0442\u0435"}),c.skipped?s(P,{children:[e("dt",{className:"text-muted-foreground",children:"\u041D\u0435 \u0443\u0439\u0434\u0443\u0442"}),e("dd",{children:e(J,{tone:"warning",children:c.skipped})})]}):null]})}):s("div",{className:"flex flex-wrap items-center gap-2",children:[s(pe,{primary:!0,disabled:!!x,title:x??void 0,onClick:()=>m("send"),children:["\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C ",c.ready]}),c.mode?e(ce,{sandbox:v||c.mode==="mixed"}):null]}),g?e("p",{className:"text-[11px] text-destructive",children:g}):null]})}let d=c.progress;return s("div",{className:"flex flex-col gap-1.5",children:[e(Ca,{m:c}),d?s("span",{className:"text-[11px] text-muted-foreground",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u043B ",d.sent_by," \xB7 ",d.sent_at?q(d.sent_at):"",d.stopped_at?` \xB7 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B ${d.stopped_by} ${q(d.stopped_at)}`:"",(d.senders??[]).length?` \xB7 ${d.senders.map(x=>`${x.from_name||x.from} \u2014 ${x.letters}`).join(", ")}`:""]}):null,c.state==="sending"?r==="stop"?e(be,{title:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443?",actions:s(P,{children:[e(pe,{danger:!0,disabled:u,onClick:()=>{h("mail_mailing_stop",{id:c.id})},children:u?"\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C\u2026":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C"}),e(pe,{disabled:u,onClick:()=>m(null),children:"\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C"})]}),children:s("span",{children:["\u041F\u0438\u0441\u044C\u043C\u0430, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0435\u0449\u0451 \u043D\u0435 \u0443\u0448\u043B\u0438 (",d?.in_channel??0,"), \u0441\u043D\u0438\u043C\u0443\u0442\u0441\u044F. \u0423\u0448\u0435\u0434\u0448\u0438\u0435 \u043D\u0435 \u0432\u0435\u0440\u043D\u0443\u0442\u044C."]})}):e("div",{children:e(pe,{disabled:!!o,title:o??void 0,onClick:()=>m("stop"),children:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C"})}):null,g?e("p",{className:"text-[11px] text-destructive",children:g}):null]})}function Ao(t,n,a,o){let r=t%10,L=t%100;return r===1&&L!==11?n:r>=2&&r<=4&&(L<12||L>14)?a:o}var Po={company:"\u0437\u0430\u0434\u0430\u043D \u0434\u043B\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",default_audience:"\u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u0430\u0443\u0434\u0438\u0442\u043E\u0440\u0438\u0438",default:"\u043E\u0431\u0449\u0438\u0439 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",none:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D"};function Lr({companyId:t}){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(null),[i,m]=f(null),[u,p]=f(!1),g=!!a?.canManage,b=R(()=>{n("mail_company_sender",{company_id:t}).then(d=>{r(d),m(null)},d=>m(C(d)))},[t,n]);w(b,[b]),fe(d=>{d===t&&b()}),w(()=>{g&&n("mail_entities",{}).then(d=>l(d.items),()=>{})},[g,n]);let c=async d=>{let x=L?.flatMap(_=>_.senders).find(_=>_.id===d);p(!0);try{r(await n("mail_company_sender_set",{company_id:t,legal_entity_id:x?.legal_entity_id??"",sender_id:x?.id??""})),m(null)}catch(_){m(C(_))}finally{p(!1)}};if(!o)return e("p",{className:"text-xs text-muted-foreground",children:i??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let h=o.legal_entity&&"sandbox"in o.legal_entity?e(ce,{sandbox:o.legal_entity.sandbox}):null,v=o.sender?`${o.sender.display_name} <${o.sender.address}>${o.legal_entity?` \xB7 ${o.legal_entity.name}`:""}`:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D";return s("div",{className:"flex flex-col gap-1 text-xs",children:[s("div",{className:"flex min-w-0 items-center gap-2",title:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C ${Po[o.source]??o.source}`,children:[e("span",{className:"flex-none text-muted-foreground",children:"\u041F\u0438\u0448\u0435\u0442"}),g&&L?s("select",{className:`${Ne} min-w-0 flex-1`,disabled:u,value:o.source==="company"?o.sender?.id??"":"",onChange:d=>{c(d.target.value)},children:[e("option",{value:"",children:o.source==="company"?"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E":`\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E: ${v}`}),L.flatMap(d=>d.senders.map(x=>s("option",{value:x.id,children:[x.display_name," <",x.address,"> \xB7 ",d.name]},x.id)))]}):e("span",{className:"min-w-0 flex-1 truncate",children:v}),h]}),o.problem?s(J,{tone:"error",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430: ",o.problem]}):null,i?e("p",{className:"text-destructive",children:i}):null,e(Io,{companyId:t,canEdit:g}),e(Bo,{companyId:t,canEdit:g})]})}function Bo({companyId:t,canEdit:n}){let a=E(),[o,r]=f(null),L=async l=>{r(null);try{await a("mail_reply_draft_create",{inbound_id:l})}catch(i){r(C(i))}};return s("div",{className:"mt-2 flex flex-col gap-2 border-t border-[var(--mf-line-200)] pt-2",children:[e("p",{className:"font-semibold",children:"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435"}),o?e("p",{className:"text-destructive",children:o}):null,e(or,{companyId:t,onReply:n?l=>{L(l)}:void 0})]})}function Io({companyId:t,canEdit:n}){let a=E(),o=ae(),{letter:r,none:L,error:l,setLetter:i,reload:m}=pn(t),[u,p]=f(null),[g,b]=f(""),[c,h]=f(!1),[v,d]=f(null);w(()=>{!L||!n||a("mail_templates",{}).then(_=>{p(_.items),b(y=>y||_.items[0]?.id||"")},()=>p([]))},[n,L,a]);let x=async(_,y)=>{h(!0),d(null);try{let I=await a(_,y);_==="mail_draft_discard"?m():i(I)}catch(I){d(C(I))}finally{h(!1)}};return s("div",{className:"mt-2 flex flex-col gap-2 border-t border-[var(--mf-line-200)] pt-2",children:[e("p",{className:"font-semibold",children:"\u041F\u0438\u0441\u044C\u043C\u043E"}),l?e("p",{className:"text-destructive",children:l}):null,v?e("p",{className:"text-destructive",children:v}):null,r?s(P,{children:[e(rr,{letter:r,compact:!0}),n?e(nr,{companyId:t,specs:He(r.draft.attachments),available:Nt(r.preview.attachments),onSaved:_=>i(_)}):null,e(fn,{letter:r,companyId:t,onSent:()=>m()}),n?s("div",{className:"flex flex-wrap items-center gap-2",children:[e(S,{size:"sm",variant:"outline",className:"h-7",disabled:c,onClick:async()=>{h(!0),d(null);try{let _=await a("mail_mailing_create",{from_company:t});o.toPluginPanel(Te,{subPath:`mailing/${_.id}`})}catch(_){d(C(_))}finally{h(!1)}},children:"\u0420\u0430\u0437\u043E\u0441\u043B\u0430\u0442\u044C \u0438 \u0434\u0440\u0443\u0433\u0438\u043C"}),e("span",{className:"flex-1"}),e(S,{size:"sm",variant:"outline",className:"h-7 border-destructive/50 text-destructive",disabled:c,onClick:()=>{x("mail_draft_discard",{company_id:t})},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"})]}):null]}):L?n?u&&u.length===0?e("p",{className:"text-muted-foreground",children:"\u0428\u0430\u0431\u043B\u043E\u043D\u043E\u0432 \u043D\u0435\u0442."}):s("div",{className:"flex flex-wrap items-center gap-2",children:[e("select",{className:Ne,value:g,disabled:c||!u,onChange:_=>b(_.target.value),children:(u??[]).map(_=>s("option",{value:_.id,children:[_.name," \xB7 ",_.language]},_.id))}),e(S,{size:"sm",className:"h-7",disabled:c||!g,onClick:()=>{x("mail_draft_create",{company_id:t,template_id:g})},children:"\u041F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E"})]}):e("p",{className:"text-muted-foreground",children:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430 \u043D\u0435\u0442."}):e("p",{className:"text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"})]})}function nt(){let t=_e(),n=le();return R(a=>{J2(a)||t(vt)||n(vt)},[t,n])}var Sa={pricelist:"\u043F\u0440\u0430\u0439\u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",distributor_site:"\u0441\u0430\u0439\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"};function Oo(t,n){return t==="stihl_country"||!t?`\u043F\u043E \u0441\u0430\u0439\u0442\u0443 STIHL \u0441\u0442\u0440\u0430\u043D\u044B ${F(n)}`:`\u043F\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0443: ${Sa[t]??t}`}function lr({companyId:t,website:n,canEdit:a}){let{status:o}=H(),r=E(),[L,l]=f(null),[i,m]=f([]),u=nt(),[p,g]=f(null),[b,c]=f(!1),h=j(null),v=R(async()=>{try{let y=await r("assortment_company",{company_id:t});l(y);let I=(y.sources??[]).map(T=>T.current).filter(T=>!!T&&!T.confirmed_at);m(await Promise.all(I.map(T=>r("assortment_preview",{id:T.id})))),g(null)}catch(y){g(C(y))}},[t,r]);w(()=>{v()},[v]),fe(y=>{y===t&&v()});let d=async(y,I)=>{c(!0),g(null);try{await r(y,I),await v()}catch(T){g(C(T))}finally{c(!1)}},x=async y=>{await d("assortment_company_file",{company_id:t,filename:y.name,content_base64:et(await Xe(y))})};if(!o?.canAssortment)return null;if(!L)return e("p",{className:"text-xs text-muted-foreground",children:p??"\u2026"});let _=(L.sources??[]).filter(y=>y.current?.confirmed_at);return s("div",{className:"flex flex-col gap-2 text-xs",children:[L.coverage?s("p",{children:["\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430: ",s("b",{className:"tabular-nums",children:[Math.round(L.coverage.by_volume),"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7"," ",s("b",{className:"tabular-nums",children:[Math.round(L.coverage.by_positions),"%"]})," \u043F\u043E\u0437\u0438\u0446\u0438\u0439",s("span",{className:"text-muted-foreground",children:[" \u2014 ",Oo(L.by,L.country)]}),L.draft?e(V,{tone:"warn",className:"ml-1.5",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null]}):e("p",{className:"text-muted-foreground",children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430: \u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u2014 \u0441\u0430\u0439\u0442\u0430 STIHL \u0443 \u0435\u0451 \u0441\u0442\u0440\u0430\u043D \u043D\u0435\u0442, \u0441\u0432\u043E\u0435\u0433\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u0442\u043E\u0436\u0435."}),_.map(y=>s("p",{className:"text-muted-foreground",children:[Sa[y.kind]??y.kind,": ",y.current.products," \u0442\u043E\u0432., \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D ",q(y.current.confirmed_at),y.base_url?s(P,{children:[" \xB7 ",e("a",{href:y.base_url,target:"_blank",rel:"noreferrer",className:"hover:underline",children:y.base_url.replace(/^https?:\/\//,"")})]}):null," \xB7 ",e("button",{type:"button",className:"text-foreground underline-offset-2 hover:underline",onClick:()=>u(y.id),children:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})]},y.id)),i.map(y=>s("div",{className:"rounded-md border border-[var(--mf-amber)] bg-[color-mix(in_oklab,var(--mf-amber)_8%,white)] p-2",role:"group","aria-label":"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0430",children:[s("div",{className:"flex flex-wrap items-center gap-1.5",children:[e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}),s("span",{children:[Sa[y.kind]??y.kind,": ",y.snapshot.products," \u0442\u043E\u0432., \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E \u0434\u043B\u044F \u043B\u0438\u0441\u0442\u0430 ",y.recognized]})]}),e("p",{className:"mt-1 text-[11px] text-muted-foreground",children:"\u0423\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043D\u0430 \u043A\u0430\u0440\u0442\u0435. \u0421\u043E\u0441\u0442\u0430\u0432, \xAB\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\xBB \u0438 \xAB\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C\xBB \u2014 \u0432 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445\xBB."}),s("p",{className:"mt-1",children:["\u041F\u043E \u043D\u0435\u043C\u0443 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 ",s("b",{className:"tabular-nums",children:[Math.round(y.coverage.by_volume),"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7"," ",s("b",{className:"tabular-nums",children:[Math.round(y.coverage.by_positions),"%"]})," \u043F\u043E\u0437\u0438\u0446\u0438\u0439",y.current?s("span",{className:"text-muted-foreground",children:[" (\u0431\u0435\u0437 \u043D\u0435\u0433\u043E \u2014 ",Math.round(y.current.by_volume),"% \u043F\u043E \u0441\u0442\u0440\u0430\u043D\u0435)"]}):e("span",{className:"text-muted-foreground",children:" (\u0431\u0435\u0437 \u043D\u0435\u0433\u043E \u2014 \u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445)"})]}),s("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[y.origin?`${y.origin} \xB7 `:"",y.snapshot.created_by," \xB7 ",q(y.snapshot.finished_at)]}),y.unknown?.length?s("p",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",title:y.unknown.join(`
3
- `),children:["\u0411\u0435\u0437 \u043C\u043E\u0434\u0435\u043B\u0438: ",y.unknown.slice(0,3).join("; "),y.unknown.length>3?"\u2026":""]}):null,e("div",{className:"mt-1.5",children:e(S,{size:"sm",variant:"outline",className:"h-7 border-[var(--mf-amber)] px-2",onClick:()=>u(y.source_id),children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})})]},y.snapshot.id)),p?e("p",{role:"alert",className:"text-destructive",children:p}):null,a?s("div",{className:"flex flex-wrap items-center gap-1.5",children:[e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:b,onClick:()=>h.current?.click(),children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043F\u0440\u0430\u0439\u0441"}),e("input",{ref:h,type:"file",accept:".xlsx,.csv",className:"hidden","aria-label":"\u0424\u0430\u0439\u043B \u043F\u0440\u0430\u0439\u0441\u0430",onChange:y=>{let I=y.target.files?.[0];y.target.value="",I&&x(I)}}),s("span",{className:"text-[11px] text-muted-foreground",children:["\u0438\u043B\u0438 \u043F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0432 \u0447\u0430\u0442\u0435: \xAB\u043D\u0430\u0439\u0434\u0438 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 STIHL \u043D\u0430 ",n?`\u0441\u0430\u0439\u0442\u0435 ${n.replace(/^https?:\/\//,"")}`:"\u0441\u0430\u0439\u0442\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"," \u0438 \u0441\u0434\u0435\u043B\u0430\u0439 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\xBB"]})]}):null]})}function wt({companyId:t,header:n,embedded:a}){let{status:o}=H(),r=E(),[L,l]=f(null),[i,m]=f(null),[u,p]=f(!1),g=R(async()=>{if(t)try{l(await r("outreach_get_company",{id:t})),m(null)}catch(d){m(C(d))}},[t,r]);w(()=>{l(null),o?.connected&&o.canView&&g()},[g,o?.connected,o?.canView]),fe(d=>{d===t&&g()});let b=R(async(d,x)=>{p(!0),m(null);try{return l(await r(d,x)),!0}catch(_){return m(C(_)),!1}finally{p(!1)}},[r]);if(!t)return e(D,{children:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u0441\u043B\u0435\u0432\u0430."});if(o&&!o.connected)return e(D,{children:o.message});if(o&&!o.canView)return e(D,{children:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443 (outreach.view)."});if(!L)return e(D,{children:i?`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ${i}`:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443\u2026"});let c=L.company,h=!!o?.canManage,v=new Map(L.persons.map(d=>[d.id,d.full_name]));return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col gap-2 overflow-y-auto px-3 py-3 text-sm",children:[n,s("div",{className:"flex flex-col gap-1",children:[a?null:s(P,{children:[e(Le,{children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("h2",{className:"m-0 text-base font-bold leading-snug",children:c.display_name})]}),s("div",{className:"flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[e(V,{tone:Jt[c.status]??"muted",children:oe[c.status]??c.status}),c.roles?.includes("supplier")?s(V,{tone:c.supplier_active===!1?"muted":"ok",children:["\u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A",c.supplier_active===!1?" \xB7 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D":""]}):null,s("span",{children:[_2[c.kind]??c.kind," \xB7 ",F(c.country_code)," \xB7 ",ve(c.region)]})]})]}),i&&e("p",{role:"alert",className:"rounded-md border border-destructive/40 bg-background px-2 py-1 text-xs text-destructive",children:i}),s(we,{title:"\u0420\u0430\u0431\u043E\u0442\u0430",children:[h?e("div",{className:"@container",children:s("div",{className:"grid gap-2 @[26rem]:grid-cols-2",children:[e(vn,{label:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442",children:s("span",{className:"flex items-center gap-1.5",title:`\u0430\u0432\u0442\u043E P${c.priority_auto}: ${Xn[c.priority_reason]??c.priority_reason}`,children:[e(Se,{priority:c.priority,manual:c.priority_manual!=null}),s("select",{className:`${ze} min-w-0 flex-1`,value:c.priority_manual??"",disabled:u,onChange:d=>{b("outreach_update_company",d.target.value?{id:c.id,priority_manual:Number(d.target.value),expected_updated_at:c.updated_at}:{id:c.id,clear_priority_manual:!0,expected_updated_at:c.updated_at})},children:[s("option",{value:"",children:["\u0410\u0432\u0442\u043E \xB7 P",c.priority_auto]}),[1,2,3,4,5].map(d=>s("option",{value:d,children:["P",d," \u0432\u0440\u0443\u0447\u043D\u0443\u044E"]},d))]})]})}),e(Fo,{status:c.status,reason:c.status_reason,busy:u,onSave:(d,x)=>b("outreach_update_company",{id:c.id,status:d,status_reason:x,expected_updated_at:c.updated_at})})]})}):s("p",{className:"flex items-center gap-2",title:`\u0430\u0432\u0442\u043E P${c.priority_auto}: ${Xn[c.priority_reason]??c.priority_reason}`,children:[e(Se,{priority:c.priority,manual:c.priority_manual!=null}),oe[c.status]??c.status]}),h&&c.roles?e($o,{roles:c.roles,currency:c.supplier_currency??"INR",active:c.supplier_active!==!1,busy:u,onSave:d=>b("outreach_update_company",{id:c.id,...d,expected_updated_at:c.updated_at})}):null,c.status_reason&&s("p",{className:"text-xs text-muted-foreground",children:["\u041F\u0440\u0438\u0447\u0438\u043D\u0430: ",c.status_reason]}),c.do_not_contact&&s("p",{className:"text-xs text-destructive",children:["\u041D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F",c.do_not_contact_reason?`: ${c.do_not_contact_reason}`:""]})]}),L.interactions!==void 0?e(we,{title:"\u0428\u0430\u0433 \u0438 \u043A\u0430\u0441\u0430\u043D\u0438\u044F",children:e(Do,{card:L,canEdit:h,busy:u,run:b})}):null,o?.canMail?e(we,{title:"\u041F\u043E\u0447\u0442\u0430",children:e(Lr,{companyId:c.id},c.id)}):null,o?.canAssortment?e(we,{title:"\u0410\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442",children:e(lr,{companyId:c.id,canEdit:h,website:L.contacts.find(d=>d.type==="website")?.value_raw},c.id)}):null,e(we,{title:"\u0420\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B",children:e(Ho,{card:L,canEdit:h,busy:u,run:b})}),e(we,{title:`\u0421\u0442\u0440\u0430\u043D\u044B (${L.countries.length})`,children:e("ul",{className:"text-xs",children:L.countries.map(d=>s("li",{children:[F(d.country_code),d.is_primary?" \xB7 \u043E\u0441\u043D\u043E\u0432\u043D\u0430\u044F":"",s("span",{className:"text-muted-foreground",children:[" \xB7 \xAB",d.country_title,"\xBB",d.section_label?` / ${d.section_label}`:""]})]},d.id))})}),s(we,{title:`\u041A\u0430\u043D\u0430\u043B\u044B \u0441\u0432\u044F\u0437\u0438 (${L.contacts.length})`,children:[e("ul",{className:"flex flex-col gap-1",children:L.contacts.map(d=>s("li",{className:"flex items-start justify-between gap-2",children:[s("span",{className:"min-w-0",children:[s("span",{className:"text-xs text-muted-foreground",children:[Ut[d.type]??d.type," "]}),e("span",{className:"break-all",children:d.value_raw}),d.is_brand_domain&&e("span",{className:"text-xs text-muted-foreground",children:" \xB7 \u0434\u043E\u043C\u0435\u043D \u0431\u0440\u0435\u043D\u0434\u0430"}),d.person_id&&s("span",{className:"text-xs text-muted-foreground",children:[" \xB7 ",v.get(d.person_id)]})]}),h&&e(Ko,{busy:u,label:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u0430\u043D\u0430\u043B",onConfirm:()=>b("outreach_delete_contact",{company_id:c.id,contact_id:d.id})})]},d.id))}),h&&e(zo,{busy:u,onAdd:(d,x)=>b("outreach_save_contact",{company_id:c.id,type:d,value_raw:x})})]}),s(we,{title:`\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0435 \u043B\u0438\u0446\u0430 (${L.persons.length})`,children:[e("ul",{className:"flex flex-col gap-1",children:L.persons.map(d=>s("li",{children:[e("span",{className:"font-medium",children:[d.salutation,d.full_name].filter(Boolean).join(" ")}),d.position&&s("span",{className:"text-xs text-muted-foreground",children:[" \xB7 ",d.position]})]},d.id))}),h&&e(jo,{busy:u,onAdd:(d,x)=>b("outreach_save_person",{company_id:c.id,full_name:d,position:x})})]}),s(we,{title:`\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 (${L.comments.length})`,children:[h&&e(Uo,{busy:u,onAdd:d=>b("outreach_add_comment",{company_id:c.id,body:d})}),e("ul",{className:"mt-2 flex flex-col gap-2",children:L.comments.map(d=>s("li",{children:[s("div",{className:"text-[11px] text-muted-foreground",children:[d.pinned?"\u{1F4CC} ":"",d.author," \xB7 ",q(d.created_at)]}),e("div",{className:"whitespace-pre-wrap",children:d.body})]},d.id))})]}),s("details",{className:"mt-3",children:[s("summary",{className:"cursor-pointer text-sm font-semibold",children:["\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043F\u0440\u0430\u0432\u043E\u043A (",L.changes.length,")"]}),e("ul",{className:"mt-2 flex flex-col gap-1 text-xs",children:L.changes.map(d=>s("li",{children:[s("span",{className:"text-muted-foreground",children:[q(d.at)," \xB7 ",mt(d.actor)]}),s("div",{children:[d.field,": ",d.old_value||"\u2014"," \u2192 ",d.new_value||"\u2014"]})]},d.id))})]}),s("details",{className:"mt-2",children:[e("summary",{className:"cursor-pointer text-sm font-semibold",children:"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}),L.sources.map(d=>e("pre",{className:"mt-2 whitespace-pre-wrap rounded bg-muted p-2 text-[11px]",children:d.raw_text},d.id))]})]})}var ze="h-8 rounded-md border border-input bg-background px-2 text-xs";function $o({roles:t,currency:n,active:a,busy:o,onSave:r}){let L=l=>{let i=t.includes(l)?t.filter(m=>m!==l):[...t,l];i.length>0&&r({roles:i})};return s("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs","aria-label":"\u0420\u043E\u043B\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",children:[jt.map(l=>s("label",{className:"flex items-center gap-1.5",children:[e("input",{type:"checkbox",checked:t.includes(l),disabled:o||t.length===1&&t.includes(l),onChange:()=>L(l)}),ut[l]]},l)),t.includes("supplier")?s(P,{children:[s("label",{className:"flex items-center gap-1.5",children:["\u0412\u0430\u043B\u044E\u0442\u0430",e("select",{className:ze,value:n,disabled:o,onChange:l=>{r({supplier_currency:l.target.value})},children:["INR","USD","EUR","AED","CNY","KZT","RUB"].map(l=>e("option",{value:l,children:l},l))})]}),s("label",{className:"flex items-center gap-1.5",title:"\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442 \u043D\u043E\u0432\u044B\u0445 \u043F\u043E\u0437\u0438\u0446\u0438\u0439; \u0435\u0433\u043E \u0441\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B \u043E\u0442\u043A\u043B\u044E\u0447\u0430\u044E\u0442\u0441\u044F",children:[e("input",{type:"checkbox",checked:a,disabled:o,onChange:()=>{r({supplier_active:!a})}}),"\u0430\u043A\u0442\u0438\u0432\u0435\u043D"]})]}):null]})}function Do({card:t,canEdit:n,busy:a,run:o}){let r=t.company,L=t.next_action??null,[l,i]=f(null),m=L?Ve(L.due_on):0;return s("div",{className:"flex flex-col gap-1.5 text-xs",children:[s("div",{children:[e("span",{className:"text-muted-foreground",children:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0448\u0430\u0433: "}),L?s("span",{className:m<0?"text-destructive":void 0,children:[Gt[L.action]??L.action,L.note?` \xB7 ${L.note}`:""," \xB7 \u0434\u043E ",ye(L.due_on),m<0?` (\u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E \u043D\u0430 ${-m} \u0434\u043D)`:"",L.auto?e("span",{className:"text-muted-foreground",children:" \xB7 \u043F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443"}):null]}):e("span",{className:"text-muted-foreground",children:"\u043D\u0435\u0442"}),L&&n?e("button",{type:"button",disabled:a,className:"ml-2 underline-offset-2 hover:underline",onClick:()=>{o("outreach_complete_next_action",{company_id:r.id,note:"\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E"})},children:"\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E"}):null]}),s("div",{children:[e("span",{className:"text-muted-foreground",children:"\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439: "}),r.owner||e("span",{className:"text-muted-foreground",children:"\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D"}),n?e("button",{type:"button",disabled:a,className:"ml-2 underline-offset-2 hover:underline",onClick:()=>{o("outreach_update_company",{id:r.id,owner:"me",expected_updated_at:r.updated_at})},children:"\u043D\u0430\u0437\u043D\u0430\u0447\u0438\u0442\u044C \u043D\u0430 \u043C\u0435\u043D\u044F"}):null]}),n&&l===null?e(S,{size:"sm",variant:"outline",className:"mt-1 h-7 self-start",onClick:()=>i({channel:"email",direction:"out",outcome:"",summary:""}),children:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u043A\u0430\u0441\u0430\u043D\u0438\u0435"}):null,l?s("div",{className:"mt-1 grid gap-1.5 rounded-md border border-border p-2",children:[s("div",{className:"flex gap-1.5",children:[s("select",{className:ze,value:l.direction,onChange:u=>i({...l,direction:u.target.value}),children:[e("option",{value:"out",children:"\u041C\u044B \u2192 \u0438\u043C"}),e("option",{value:"in",children:"\u041E\u043D\u0438 \u2192 \u043D\u0430\u043C"})]}),e("select",{className:ze,value:l.channel,onChange:u=>i({...l,channel:u.target.value}),children:Object.entries(pt).map(([u,p])=>e("option",{value:u,children:p},u))}),s("select",{className:ze,value:l.outcome,onChange:u=>i({...l,outcome:u.target.value}),children:[e("option",{value:"",children:"\u0418\u0441\u0445\u043E\u0434\u2026"}),Object.entries(ft).map(([u,p])=>e("option",{value:u,children:p},u))]})]}),e(G,{className:"h-7 text-xs",placeholder:"\u041A\u0440\u0430\u0442\u043A\u043E \u043E \u0447\u0451\u043C",value:l.summary,onChange:u=>i({...l,summary:u.target.value})}),s("div",{className:"flex gap-1.5",children:[e(S,{size:"sm",className:"h-7",disabled:a,onClick:async()=>{await o("outreach_log_touch",{company_id:r.id,...l,outcome:l.outcome||void 0,summary:l.summary||void 0})&&i(null)},children:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>i(null),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]})]}):null,t.sandbox_traces?e(Zo,{companyId:r.id,canEdit:n,busy:a,run:o}):null,(t.interactions??[]).length>0?e("ul",{className:"mt-1 flex flex-col gap-1",children:(t.interactions??[]).slice(0,10).map(u=>s("li",{className:"rounded-md bg-muted/40 px-2 py-1",children:[s("div",{className:"flex justify-between gap-2",children:[s("span",{children:[u.direction==="out"?"\u2192":"\u2190"," ",pt[u.channel]??u.channel,u.outcome?` \xB7 ${ft[u.outcome]??u.outcome}`:"",u.sandbox?s(P,{children:[" ",e(ce,{sandbox:!0})]}):null]}),e("span",{className:"text-muted-foreground",children:q(u.occurred_at)})]}),u.summary?e("div",{className:"text-muted-foreground",children:u.summary}):null,e("div",{className:"text-[11px] text-muted-foreground",children:mt(u.created_by)})]},u.id))}):e("p",{className:"text-muted-foreground",children:"\u041A\u0430\u0441\u0430\u043D\u0438\u0439 \u0435\u0449\u0451 \u043D\u0435 \u0431\u044B\u043B\u043E."})]})}function Zo({companyId:t,canEdit:n,busy:a,run:o}){let[r,L]=f(!1);return s("div",{className:"mt-1 flex flex-wrap items-center gap-2 rounded-md border border-[rgba(0,168,162,0.35)] bg-[rgba(0,168,162,0.06)] px-2 py-1",children:[s("span",{title:"\u041A\u0430\u0441\u0430\u043D\u0438\u044F, \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0448\u0430\u0433 \u043C\u0435\u043D\u044F\u043B\u0438\u0441\u044C \u043A\u0430\u043A \u0432 \u0431\u043E\u044E, \u043D\u043E \u043F\u0438\u0441\u044C\u043C\u0430 \u043D\u0438\u043A\u0443\u0434\u0430 \u043D\u0435 \u0443\u0445\u043E\u0434\u0438\u043B\u0438; \u0432 \u043C\u0435\u0442\u0440\u0438\u043A\u0438 \u043D\u0435 \u0432\u0445\u043E\u0434\u044F\u0442",children:[e(ce,{sandbox:!0})," \u0441\u043B\u0435\u0434\u044B \u0442\u0435\u0441\u0442\u0430"]}),n?r?e(be,{title:"\u0423\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u044B \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B?",actions:s(P,{children:[e(S,{size:"sm",className:"h-7",disabled:a,onClick:async()=>{await o("outreach_sandbox_rollback",{id:t})&&L(!1)},children:"\u0423\u0431\u0440\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:a,onClick:()=>L(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:e("span",{children:"\u041A\u0430\u0441\u0430\u043D\u0438\u044F \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B \u0443\u0434\u0430\u043B\u044F\u0442\u0441\u044F; \u0441\u0442\u0430\u0442\u0443\u0441, \u0448\u0430\u0433 \u0438 \u043E\u0442\u043C\u0435\u0442\u043A\u0438 \u0430\u0434\u0440\u0435\u0441\u043E\u0432 \u0432\u0435\u0440\u043D\u0443\u0442\u0441\u044F, \u043A\u0430\u043A\u0438\u043C\u0438 \u0431\u044B\u043B\u0438 \u0434\u043E \u0442\u0435\u0441\u0442\u0430."})}):e(S,{size:"sm",variant:"outline",className:"h-7",onClick:()=>L(!0),children:"\u0423\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u044B"}):null]})}function we({title:t,children:n}){return s("section",{className:"mf-card px-3 py-2",children:[e("h3",{className:"mb-1.5 text-[13px] font-bold",children:t}),n]})}function vn({label:t,children:n}){return s("label",{className:"flex flex-col gap-1 text-xs",children:[e("span",{className:"text-muted-foreground",children:t}),n]})}function Fo({status:t,busy:n,onSave:a}){let[o,r]=f(t),[L,l]=f("");w(()=>r(t),[t]);let i=y2.includes(o),m=o!==t;return s("div",{className:"flex flex-col gap-1",children:[e(vn,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:e("select",{className:ze,value:o,disabled:n,onChange:u=>r(u.target.value),children:zt.map(u=>e("option",{value:u,children:oe[u]},u))})}),m&&s(P,{children:[e(G,{value:L,onChange:u=>l(u.target.value),placeholder:i?"\u041F\u0440\u0438\u0447\u0438\u043D\u0430 (\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)":"\u041F\u0440\u0438\u0447\u0438\u043D\u0430 (\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)",className:"h-8 text-xs"}),s("div",{className:"flex gap-2",children:[e(S,{size:"sm",disabled:n||i&&!L.trim(),onClick:()=>{a(o,L.trim()).then(u=>u&&l(""))},children:"\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"}),e(S,{size:"sm",variant:"ghost",onClick:()=>r(t),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]})]})]})}function Ho({card:t,canEdit:n,busy:a,run:o}){let r=t.company,[L,l]=f(!1),[i,m]=f({display_name:"",legal_name:"",city:"",address_raw:"",tags:""}),u=()=>{m({display_name:r.display_name,legal_name:r.legal_name,city:r.city,address_raw:r.address_raw,tags:r.tags.join(", ")}),l(!0)};if(!L)return s("div",{className:"flex flex-col gap-1",children:[e(hn,{k:"\u042E\u0440. \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",v:r.legal_name}),e(hn,{k:"\u0413\u043E\u0440\u043E\u0434",v:r.city}),e(hn,{k:"\u0410\u0434\u0440\u0435\u0441",v:r.address_raw,pre:!0}),e(hn,{k:"\u041C\u0435\u0442\u043A\u0438",v:r.tags.join(", ")}),n&&e(S,{size:"sm",variant:"outline",className:"mt-1 self-start",onClick:u,children:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C"})]});let p=async()=>{let g={id:r.id,expected_updated_at:r.updated_at};i.display_name!==r.display_name&&(g.display_name=i.display_name),i.legal_name!==r.legal_name&&(g.legal_name=i.legal_name),i.city!==r.city&&(g.city=i.city),i.address_raw!==r.address_raw&&(g.address_raw=i.address_raw);let b=i.tags.split(",").map(c=>c.trim()).filter(Boolean);b.join(",")!==r.tags.join(",")&&(g.tags=b),(Object.keys(g).length===2||await o("outreach_update_company",g))&&l(!1)};return s("div",{className:"flex flex-col gap-2",children:[["display_name","legal_name","city","tags"].map(g=>e(vn,{label:{display_name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",legal_name:"\u042E\u0440. \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",city:"\u0413\u043E\u0440\u043E\u0434",tags:"\u041C\u0435\u0442\u043A\u0438 (\u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043F\u044F\u0442\u0443\u044E)"}[g],children:e(G,{value:i[g],onChange:b=>m({...i,[g]:b.target.value}),className:"h-8 text-xs"})},g)),e(vn,{label:"\u0410\u0434\u0440\u0435\u0441",children:e("textarea",{value:i.address_raw,rows:3,onChange:g=>m({...i,address_raw:g.target.value}),className:"rounded-md border border-input bg-background px-2 py-1 text-xs"})}),s("div",{className:"flex gap-2",children:[e(S,{size:"sm",disabled:a,onClick:()=>{p()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",onClick:()=>l(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]})]})}function hn({k:t,v:n,pre:a}){return s("div",{className:"grid grid-cols-[6.5rem_1fr] gap-2 text-xs",children:[e("span",{className:"text-muted-foreground",children:t}),e("span",{className:a?"whitespace-pre-wrap break-words":"break-words",children:n||"\u2014"})]})}function zo({busy:t,onAdd:n}){let[a,o]=f("email"),[r,L]=f("");return s("div",{className:"mt-2 flex gap-1",children:[e("select",{className:ze,value:a,onChange:l=>o(l.target.value),"aria-label":"\u0422\u0438\u043F \u043A\u0430\u043D\u0430\u043B\u0430",children:N2.map(l=>e("option",{value:l,children:Ut[l]},l))}),e(G,{value:r,onChange:l=>L(l.target.value),placeholder:"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",className:"h-8 text-xs","aria-label":"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043A\u0430\u043D\u0430\u043B\u0430"}),e(S,{size:"sm",disabled:t||!r.trim(),onClick:()=>{n(a,r.trim()).then(l=>l&&L(""))},children:"+"})]})}function jo({busy:t,onAdd:n}){let[a,o]=f(""),[r,L]=f("");return s("div",{className:"mt-2 flex gap-1",children:[e(G,{value:a,onChange:l=>o(l.target.value),placeholder:"\u0418\u043C\u044F",className:"h-8 text-xs","aria-label":"\u0418\u043C\u044F"}),e(G,{value:r,onChange:l=>L(l.target.value),placeholder:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",className:"h-8 text-xs","aria-label":"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C"}),e(S,{size:"sm",disabled:t||!a.trim(),onClick:()=>{n(a.trim(),r.trim()).then(l=>{l&&(o(""),L(""))})},children:"+"})]})}function Uo({busy:t,onAdd:n}){let[a,o]=f("");return s("div",{className:"flex flex-col gap-1",children:[e("textarea",{value:a,rows:2,onChange:r=>o(r.target.value),placeholder:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439","aria-label":"\u041D\u043E\u0432\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439",className:"rounded-md border border-input bg-background px-2 py-1 text-xs"}),e(S,{size:"sm",className:"self-end",disabled:t||!a.trim(),onClick:()=>{n(a.trim()).then(r=>r&&o(""))},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C"})]})}function Ko({busy:t,label:n,onConfirm:a}){let[o,r]=f(!1);return w(()=>{if(!o)return;let L=setTimeout(()=>r(!1),4e3);return()=>clearTimeout(L)},[o]),o?e(S,{variant:"destructive",size:"sm",disabled:t,onClick:()=>{a().then(()=>r(!1))},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C?"}):e(S,{variant:"ghost",size:"sm",disabled:t,"aria-label":n,onClick:()=>r(!0),children:"\u2715"})}function ir(t,n,a){let o=r=>Array.isArray(r)?r.map(String):[];switch(t){case"q":return`\u041F\u043E\u0438\u0441\u043A: ${String(n)}`;case"region":return ve(String(n));case"country":return F(String(n));case"priorities":return o(n).map(r=>`P${r}`).join(", ");case"statuses":return o(n).map(r=>oe[r]??r).join(", ");case"tags":return`\u041C\u0435\u0442\u043A\u0438: ${o(n).join(", ")}`;case"owner":return n==="none"?"\u0411\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E":`\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439: ${String(n)}`;case"attention":return Kt[String(n)]??String(n);case"stale_days":return`\u0411\u0435\u0437 \u043A\u0430\u0441\u0430\u043D\u0438\u0439 \u2265 ${String(n)} \u0434\u043D`;case"never_touched":return n?"\u0411\u0435\u0437 \u043A\u0430\u0441\u0430\u043D\u0438\u0439":"\u0411\u044B\u043B\u0438 \u043A\u0430\u0441\u0430\u043D\u0438\u044F";case"has_person":return n?"\u0415\u0441\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E":"\u041D\u0435\u0442 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430";case"has_phone":return n?"\u0415\u0441\u0442\u044C \u0442\u0435\u043B\u0435\u0444\u043E\u043D":"\u041D\u0435\u0442 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430";case"has_email":return n?"\u0415\u0441\u0442\u044C email":"\u041D\u0435\u0442 email";case"brand":return n==="only"?"\u0422\u043E\u043B\u044C\u043A\u043E email \u0431\u0440\u0435\u043D\u0434\u0430":"\u0411\u0435\u0437 email \u0431\u0440\u0435\u043D\u0434\u0430";case"segment_id":return`\u0421\u0435\u0433\u043C\u0435\u043D\u0442: ${a.find(r=>r.id===n)?.name??"\u2026"}`;case"ids":return`\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ${o(n).length}`}return`${t}: ${String(n)}`}function cr(t,n){return Object.entries(Me(t)).map(([a,o])=>ir(a,o,n)).join(" \xB7 ")}function dr({filter:t,onChange:n,segments:a,onSegmentsChanged:o,canSave:r}){let L=E(),[l,i]=f(null),[m,u]=f(null),p=Object.entries(Me(t)),g=async()=>{if(l?.trim())try{await L("outreach_save_segment",{name:l.trim(),filter:Me(t)}),i(null),u(null),o()}catch(b){u(C(b))}};return s("div",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[e("span",{className:"text-muted-foreground",children:"\u0424\u0438\u043B\u044C\u0442\u0440 \u0442\u0435\u043C\u044B:"}),p.length===0?e("span",{className:"text-muted-foreground",children:"\u0432\u0441\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"}):null,p.map(([b,c])=>s("span",{className:"inline-flex items-center gap-1 rounded-full border border-border bg-muted/50 py-0.5 pl-2 pr-1",children:[ir(b,c,a),e("button",{type:"button","aria-label":"\u0423\u0431\u0440\u0430\u0442\u044C \u0443\u0441\u043B\u043E\u0432\u0438\u0435",className:"rounded-full px-1 text-muted-foreground hover:bg-state-hover hover:text-foreground",onClick:()=>n({...t,[b]:void 0}),children:"\xD7"})]},b)),p.length>0?e("button",{type:"button",className:"text-muted-foreground underline-offset-2 hover:underline",onClick:()=>n({}),children:"\u0441\u0431\u0440\u043E\u0441\u0438\u0442\u044C"}):null,e("span",{className:"flex-1"}),a.length>0?s("select",{"aria-label":"\u0421\u0435\u0433\u043C\u0435\u043D\u0442",className:"h-7 rounded-md border border-input bg-transparent px-1.5 text-xs",value:"",onChange:b=>b.target.value&&n({segment_id:b.target.value}),children:[e("option",{value:"",children:"\u0421\u0435\u0433\u043C\u0435\u043D\u0442\u044B\u2026"}),a.map(b=>s("option",{value:b.id,children:[b.name,typeof b.count=="number"?` \xB7 ${b.count}`:""]},b.id))]}):null,r&&p.length>0&&l===null?e(S,{size:"sm",variant:"outline",className:"h-7",onClick:()=>i(""),children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043A\u0430\u043A \u0441\u0435\u0433\u043C\u0435\u043D\u0442"}):null,l!==null?s("span",{className:"flex items-center gap-1",children:[e(G,{autoFocus:!0,className:"h-7 w-48 text-xs",placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u0430",value:l,onChange:b=>i(b.target.value),onKeyDown:b=>{b.key==="Enter"&&g(),b.key==="Escape"&&i(null)}}),e(S,{size:"sm",className:"h-7",onClick:()=>{g()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"})]}):null,m?e("span",{className:"w-full text-destructive",children:m}):null]})}function je({title:t,hint:n,children:a,className:o}){return s("section",{className:k("mf-card p-3",o),children:[s("header",{className:"mb-2 flex items-baseline justify-between gap-2",children:[e("h3",{className:"text-[13px] font-bold",children:t}),n?e("span",{className:"text-[11px] text-muted-foreground",children:n}):null]}),a]})}var Go=["waiting_reply","overdue","no_next_action","due_today","ready_untouched"],qo=new Set(["waiting_reply","overdue","no_next_action"]);function fr({metrics:t,active:n,onPick:a}){let o=t.activity;return s("div",{className:"grid grid-cols-2 gap-2 @md:grid-cols-3 @3xl:grid-cols-6",children:[Go.map(r=>{let L=t.checks[r],l=qo.has(r)&&L>0;return s("button",{type:"button",onClick:()=>a(n===r?"":r),"aria-pressed":n===r,className:k("flex flex-col items-start rounded-md border bg-card px-3 py-2 text-left transition-colors hover:bg-state-hover",l?"border-destructive/50 shadow-[inset_3px_0_0_var(--mf-coral)]":"border-border",n===r&&"ring-1 ring-ring"),children:[e("span",{className:k("text-2xl font-bold tabular-nums",l&&"text-destructive"),children:L}),e("span",{className:"text-xs text-muted-foreground",children:Kt[r]})]},r)}),s("div",{className:"mf-kpi--volt flex flex-col items-start rounded-md border bg-card px-3 py-2",children:[e("span",{className:"text-2xl font-bold tabular-nums",children:o.positive_30d}),e("span",{className:"text-xs text-muted-foreground",title:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043E\u0442\u0432\u0435\u0442\u043E\u043C \xAB\u0438\u043D\u0442\u0435\u0440\u0435\u0441\xBB \u0438\u043B\u0438 \xAB\u043F\u0440\u0438\u0441\u043B\u0430\u043B\u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F\xBB \u0437\u0430 30 \u0434\u043D\u0435\u0439",children:"\u041F\u043E\u0437\u0438\u0442\u0438\u0432\u043D\u044B\u0445 \u043E\u0442\u0432\u0435\u0442\u043E\u0432, 30 \u0434\u043D"})]})]})}function gr({queue:t,onOpen:n}){let a=t.groups.filter(o=>o.total>0);return a.length===0?e("p",{className:"text-sm text-muted-foreground",children:"\u041E\u0447\u0435\u0440\u0435\u0434\u044C \u043F\u0443\u0441\u0442\u0430: \u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u0438 \u043E\u0442\u0432\u0435\u0442\u043E\u0432 \u0431\u0435\u0437 \u0440\u0435\u0430\u043A\u0446\u0438\u0438 \u043D\u0435\u0442."}):e("div",{className:"flex flex-col gap-3",children:a.map(o=>s("div",{children:[s("div",{className:"mb-1 flex items-baseline justify-between text-xs",children:[e("span",{className:k("font-semibold",(o.key==="waiting_reply"||o.key==="overdue")&&"text-destructive"),children:o.title}),e("span",{className:"text-muted-foreground",children:o.items.length<o.total?`${o.items.length} \u0438\u0437 ${o.total}`:o.total})]}),e("ul",{className:"flex flex-col",children:o.items.map(r=>e("li",{children:s("button",{type:"button",onClick:()=>n(r.id),className:"flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm hover:bg-state-hover",children:[e(Se,{priority:r.priority}),e("span",{className:"min-w-0 flex-1 truncate",children:r.display_name}),e("span",{className:"hidden flex-none text-xs text-muted-foreground @md:inline",children:F(r.country_code)}),e("span",{className:"max-w-[45%] flex-none truncate text-xs text-muted-foreground",title:r.reason,children:r.reason})]})},r.id))})]},o.key))})}function br({metrics:t,active:n,onPick:a}){let o=Math.max(1,...t.funnel.map(L=>L.count)),r=t.dropoff;return s("div",{className:"flex flex-col gap-1",children:[t.funnel.map(L=>s("button",{type:"button",onClick:()=>a(L.status),className:k("group flex items-center gap-2 rounded px-1 text-left text-xs hover:bg-state-hover",n.includes(L.status)&&"bg-state-active"),title:L.count?`\u041C\u0435\u0434\u0438\u0430\u043D\u0430 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435: ${L.median_days_in_status} \u0434\u043D`:void 0,children:[e("span",{className:"w-32 flex-none truncate text-muted-foreground",children:oe[L.status]??L.status}),e("span",{className:"relative h-4 flex-1 rounded-sm bg-muted",children:e("span",{className:"absolute inset-y-0 left-0 rounded-sm bg-[var(--mf-teal)]",style:{width:`${L.count/o*100}%`}})}),e("span",{className:"w-8 flex-none text-right tabular-nums",children:L.count})]},L.status)),r.length>0?s("div",{className:"mt-2 border-t border-border pt-2",children:[e("div",{className:"mb-1 text-[11px] text-muted-foreground",children:"\u041E\u0442\u0442\u043E\u043A \u043F\u043E \u043F\u0440\u0438\u0447\u0438\u043D\u0430\u043C"}),r.map(L=>s("button",{type:"button",onClick:()=>a(L.status),className:"flex w-full items-center gap-2 rounded px-1 text-left text-xs hover:bg-state-hover",children:[s("span",{className:"flex-1 truncate",children:[oe[L.status]," \xB7 ",ea[L.reason_code]??L.reason_code]}),e("span",{className:"tabular-nums",children:L.count})]},`${L.status}-${L.reason_code}`))]}):null]})}var ur=[{key:"early",label:"\u0434\u043E \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u0430",statuses:["new","to_qualify","ready"],cls:"bg-muted-foreground/30"},{key:"work",label:"\u0432 \u0440\u0430\u0431\u043E\u0442\u0435",statuses:["contacted","replied","qualified"],cls:"bg-[var(--mf-teal)]"},{key:"done",label:"\u043F\u0435\u0440\u0435\u0434\u0430\u043D",statuses:["handed_over"],cls:"bg-[var(--mf-green)]"},{key:"out",label:"\u043E\u0442\u043A\u0430\u0437 / \u043D\u0435 \u043F\u0438\u0441\u0430\u0442\u044C",statuses:["rejected","do_not_contact"],cls:"bg-[var(--mf-coral)]"}];function xr({metrics:t,active:n,onPick:a}){let o=Math.max(1,...t.regions.map(r=>r.total));return s("div",{className:"flex flex-col gap-1",children:[t.regions.map(r=>s("button",{type:"button",onClick:()=>a(n===r.region?"":r.region),className:k("flex items-center gap-2 rounded px-1 text-left text-xs hover:bg-state-hover",n===r.region&&"bg-state-active"),children:[e("span",{className:"w-32 flex-none truncate text-muted-foreground",children:ve(r.region)}),e("span",{className:"flex h-4 flex-1 overflow-hidden rounded-sm bg-muted",style:{maxWidth:`${r.total/o*100}%`},children:ur.map(L=>{let l=L.statuses.reduce((i,m)=>i+(r.by_status[m]??0),0);return l?e("span",{className:L.cls,style:{width:`${l/r.total*100}%`},title:`${L.label}: ${l}`},L.key):null})}),e("span",{className:"w-8 flex-none text-right tabular-nums",children:r.total})]},r.region)),e("div",{className:"mt-1 flex flex-wrap gap-3 text-[11px] text-muted-foreground",children:ur.map(r=>s("span",{className:"flex items-center gap-1",children:[e("span",{className:k("inline-block size-2 rounded-sm",r.cls)}),r.label]},r.key))})]})}function hr(t){switch(t){case"never":return{never_touched:!0};case"d8_14":return{stale_days:8,never_touched:!1};case"d15_30":return{stale_days:15,never_touched:!1};case"d30p":return{stale_days:31,never_touched:!1}}return{never_touched:!1}}function vr({metrics:t,onPick:n}){let a=t.aging.filter(r=>!["rejected","do_not_contact","handed_over"].includes(r.status)),o=Math.max(1,...a.flatMap(r=>qt.map(L=>r.buckets[L]??0)));return a.length===0?e("p",{className:"text-sm text-muted-foreground",children:"\u041D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439."}):e("div",{className:"overflow-x-auto",children:s("table",{className:"w-full min-w-[30rem] table-fixed text-xs",children:[e("thead",{children:s("tr",{className:"text-muted-foreground",children:[e("th",{className:"w-32 text-left font-normal",children:"\u0421\u0442\u0430\u0442\u0443\u0441"}),qt.map(r=>e("th",{className:"font-normal",children:w2[r]},r))]})}),e("tbody",{children:a.map(r=>s("tr",{children:[e("td",{className:"truncate pr-1 text-muted-foreground",children:oe[r.status]}),qt.map(L=>{let l=r.buckets[L]??0,i=(L==="d15_30"||L==="d30p")&&l>0&&r.status!=="new";return e("td",{className:"p-0.5",children:e("button",{type:"button",disabled:!l,onClick:()=>n(r.status,L),className:k("h-7 w-full rounded-sm text-center tabular-nums disabled:cursor-default",l?"hover:ring-1 hover:ring-ring":"text-muted-foreground/40",i&&"text-destructive"),style:l?{backgroundColor:`color-mix(in oklab, var(--primary) ${Math.round(8+l/o*40)}%, transparent)`}:void 0,children:l||"\xB7"})},L)})]},r.status))})]})})}function yr({metrics:t,onPick:n}){let a=t.quality,o=t.activity,r=(L,l,i,m=!1)=>s("button",{type:"button",disabled:!i,onClick:()=>i&&n(i),className:"flex w-full items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-xs hover:bg-state-hover disabled:hover:bg-transparent",children:[e("span",{className:"text-muted-foreground",children:L}),e("span",{className:k("tabular-nums",m&&"text-destructive"),children:l})]});return s("div",{className:"grid gap-3 @md:grid-cols-2",children:[s("div",{children:[e("div",{className:"mb-1 flex gap-1",children:["1","2","3","4","5"].map(L=>s("button",{type:"button",onClick:()=>n({priorities:[Number(L)]}),className:"flex flex-1 flex-col items-center rounded-md border border-border py-1 text-xs hover:bg-state-hover",children:[s("span",{className:"font-semibold",children:["P",L]}),e("span",{className:"tabular-nums text-muted-foreground",children:a.by_priority[L]??0})]},L))}),r("\u0421 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u043C \u043B\u0438\u0446\u043E\u043C",Wt(a.with_person,t.total),{has_person:!0}),r("\u0411\u0435\u0437 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430",t.total-a.with_person,{has_person:!1}),r("\u0422\u043E\u043B\u044C\u043A\u043E email \u0431\u0440\u0435\u043D\u0434\u0430",a.brand_only,{brand:"only"}),r("\u0411\u0435\u0437 \u043A\u0430\u043D\u0430\u043B\u043E\u0432 \u0441\u0432\u044F\u0437\u0438",a.no_channels,void 0,a.no_channels>0),r("\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 / \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043A\u0430\u043D\u0430\u043B\u044B",a.invalid_contacts,void 0,a.invalid_contacts>0),r("\u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0431\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E",a.unassigned,{owner:"none"})]}),s("div",{children:[r("\u041A\u0430\u0441\u0430\u043D\u0438\u0439 \u0437\u0430 7 \u0434\u043D\u0435\u0439: \u043C\u044B \u2192 \u043E\u043D\u0438",o.touches_out_7d),r("\u041A\u0430\u0441\u0430\u043D\u0438\u0439 \u0437\u0430 7 \u0434\u043D\u0435\u0439: \u043E\u043D\u0438 \u2192 \u043C\u044B",o.touches_in_7d),r("\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043F\u0438\u0441\u0430\u043B\u0438",o.touched,{never_touched:!1}),r("\u041E\u0442\u0432\u0435\u0442\u0438\u043B\u0438",Wt(o.replied,o.touched)),r("\u041F\u043E\u0437\u0438\u0442\u0438\u0432\u043D\u044B\u0435 \u043E\u0442\u0432\u0435\u0442\u044B, 30 \u0434\u043D",Wt(o.positive_30d,o.touched)),r("\u0414\u043E \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u043A\u0430\u0441\u0430\u043D\u0438\u044F (\u043C\u0435\u0434\u0438\u0430\u043D\u0430)",o.median_days_to_first>=0?`${o.median_days_to_first} \u0434\u043D`:"\u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445")]})]})}function Vo(t){return t.entity==="interaction"?t.new_value?`\u043A\u0430\u0441\u0430\u043D\u0438\u0435: ${t.new_value}`:"\u043A\u0430\u0441\u0430\u043D\u0438\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u043E":t.entity==="next_action"?t.field==="done"?`\u0448\u0430\u0433 \u0437\u0430\u043A\u0440\u044B\u0442: ${t.new_value}`:`\u0448\u0430\u0433: ${t.new_value||"\u2014"}`:t.field==="mail_sent"?`\u043F\u0438\u0441\u044C\u043C\u043E: ${t.new_value}`:t.field==="mail_draft"?t.new_value?`\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043F\u0438\u0441\u044C\u043C\u0430: ${t.new_value}`:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043F\u0438\u0441\u044C\u043C\u0430 \u0443\u0434\u0430\u043B\u0451\u043D":t.field==="sandbox_rollback"?`\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430: ${t.new_value}`:`${Vt[t.field]??t.field}: ${qe(t.field,t.old_value)} \u2192 ${qe(t.field,t.new_value)}`}var mr=8;function _r({items:t,seenAt:n,onOpen:a}){let[o,r]=f(!1);return t.length===0?e("p",{className:"text-sm text-muted-foreground",children:n?"\u0421 \u043F\u0440\u043E\u0448\u043B\u043E\u0433\u043E \u0432\u0438\u0437\u0438\u0442\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435\u0442.":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0437\u0430 \u043D\u0435\u0434\u0435\u043B\u044E \u043D\u0435\u0442."}):s(P,{children:[e(pr,{items:t.slice(0,mr),onOpen:a}),t.length>mr?s("button",{type:"button",className:"self-start rounded-md px-1.5 py-1 text-xs font-semibold hover:bg-state-hover",onClick:()=>r(!0),children:["\u0412\u0441\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \xB7 ",t.length," \u2192"]}):null,o?e("div",{role:"dialog","aria-modal":"true","aria-label":"\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C",className:"fixed inset-0 z-50 flex items-start justify-center bg-[rgba(17,19,21,0.35)] p-4",onClick:()=>r(!1),onKeyDown:L=>L.key==="Escape"&&r(!1),children:s("div",{className:"mf-island mf-card flex max-h-full w-full max-w-2xl flex-col gap-2 p-3",onClick:L=>L.stopPropagation(),children:[s("div",{className:"flex items-center gap-2",children:[s("h4",{className:"m-0 flex-1 text-[13px] font-bold",children:["\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \xB7 ",t.length]}),e("button",{type:"button","aria-label":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",autoFocus:!0,className:"rounded-md px-2 py-1 hover:bg-state-hover",onClick:()=>r(!1),children:"\xD7"})]}),e("div",{className:"min-h-0 overflow-y-auto",children:e(pr,{items:t,onOpen:L=>{r(!1),a(L)}})})]})}):null]})}function pr({items:t,onOpen:n}){return e("ul",{className:"flex flex-col",children:t.map(a=>e("li",{children:s("button",{type:"button",onClick:()=>n(a.company_id),className:"flex w-full flex-col rounded-md px-1.5 py-1 text-left text-xs hover:bg-state-hover",children:[s("span",{className:"flex items-baseline justify-between gap-2",children:[e("span",{className:"truncate font-medium",children:a.company_name}),e("span",{className:"flex-none text-muted-foreground",children:q(a.at)})]}),s("span",{className:"truncate text-muted-foreground",children:[Vo(a)," \xB7 ",mt(a.actor),a.batch_id?" \xB7 \u043F\u0430\u0447\u043A\u0430":""]})]})},a.id))})}var Wo="new";function Yo(){return Xt()}function Nr({subPath:t}){let{status:n}=H(),a=t.split("/")[0]||null;return n?n.connected?n.canView?n.canWork?e(Jo,{topicId:a===Wo?null:a}):e(D,{children:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest: \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0435\u0449\u0451 \u043D\u0435\u0442 \u0441\u043B\u043E\u044F \u0440\u0430\u0431\u043E\u0442\u044B \u0430\u0443\u0442\u0440\u0438\u0447\u0430 (\u043A\u0430\u0441\u0430\u043D\u0438\u044F, \u043E\u0447\u0435\u0440\u0435\u0434\u044C, \u043C\u0435\u0442\u0440\u0438\u043A\u0438)."}):e(D,{children:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443 (outreach.view)."}):e(D,{children:n.message}):e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"})}function wr(){let t=ee(),n=ae();return R(async()=>{rn("topic","","");let{sectionId:a}=await t.call("section_ensure",null).catch(()=>({sectionId:null}));n.toCompose({focusPrompt:!0,...a?{placement:{sectionId:a,pinned:!1}}:{}})},[n,t])}function Jo({topicId:t}){let n=ae(),a=wr(),o=Ee(),r=ee(),[L,l]=f(!1);return w(()=>{if(t){r.call("thread_alive",{threadId:t}).then(({alive:i})=>i?n.toThread(t):l(!0),()=>l(!0));return}o("dashboard").then(i=>{i==="stay"?l(!0):i==="none"&&a()})},[n,a,o,r,t]),L?e(Qo,{topicId:null}):e(D,{children:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u2026"})}function Qo({topicId:t}){let n=ae(),a=wr(),o=ee(),r=Yo(),L=async()=>{t&&(await o.call("focus_get",{threadId:t}).catch(()=>null),n.toThread(t))};return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[s("div",{className:"mf-surface flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-xs",children:[e("span",{className:"flex-1 text-muted-foreground",children:"\u0412\u0435\u0441\u044C \u0440\u0435\u0435\u0441\u0442\u0440"}),t?e(S,{size:"sm",className:"h-8",onClick:()=>{L()},children:"\u0427\u0430\u0442"}):e(S,{size:"sm",className:"h-8",onClick:()=>{a()},children:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442 \u043F\u043E \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0443"})]}),e("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e(Ma,{topicId:t,onOpenCompany:r})})]})}function Ma({topicId:t,threadId:n,onOpenCompany:a}){let{status:o}=H(),{filter:r,setFilter:L,error:l}=Z2(t),i=H2(r),{segments:m,reload:u}=z2();F2(n??"",r,cr(r,m));let p=i.metrics,g=r.statuses??[],b=c=>{L({...r,...c})};return s("div",{className:"@container mf-island mf-paper flex min-w-0 flex-col gap-3 p-3",children:[e(dr,{filter:r,onChange:c=>{L(c)},segments:m,onSegmentsChanged:u,canSave:!!o?.canManage}),l||i.error?e("p",{role:"alert",className:"rounded-md border border-destructive/40 bg-background px-2 py-1 text-xs text-destructive",children:l??i.error}):null,p?s(P,{children:[s("div",{className:"flex flex-wrap items-baseline justify-between gap-1 text-xs text-muted-foreground",children:[s("span",{children:["\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439: ",p.total," \xB7 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445: ",p.active]}),s("span",{children:["\u043D\u0430 ",q(p.as_of)]})]}),e(fr,{metrics:p,active:r.attention,onPick:c=>b({attention:c||void 0})}),s("div",{className:"grid gap-3 @3xl:grid-cols-2",children:[e(je,{title:"\u041E\u0447\u0435\u0440\u0435\u0434\u044C \xAB\u0421\u0435\u0433\u043E\u0434\u043D\u044F\xBB",hint:"\u043F\u043E \u043F\u043E\u0440\u044F\u0434\u043A\u0443 \u0432\u0430\u0436\u043D\u043E\u0441\u0442\u0438",children:i.queue?e(gr,{queue:i.queue,onOpen:a}):null}),e(je,{title:"\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C",hint:i.seenAt?`\u0441 ${q(i.seenAt)}`:"\u0437\u0430 \u043D\u0435\u0434\u0435\u043B\u044E",children:e(_r,{items:i.feed,seenAt:i.seenAt,onOpen:a})}),e(je,{title:"\u0412\u043E\u0440\u043E\u043D\u043A\u0430",children:e(br,{metrics:p,active:g,onPick:c=>b({statuses:g.includes(c)?g.filter(h=>h!==c):[...g,c]})})}),e(je,{title:"\u0420\u0435\u0433\u0438\u043E\u043D\u044B",children:e(xr,{metrics:p,active:r.region??"",onPick:c=>b({region:c||void 0})})}),e(je,{title:"\u0417\u0430\u0441\u0442\u043E\u0439: \u0441\u0442\u0430\u0442\u0443\u0441 \xD7 \u0434\u0430\u0432\u043D\u043E\u0441\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u043A\u0430\u0441\u0430\u043D\u0438\u044F",className:"@3xl:col-span-2",children:e(vr,{metrics:p,onPick:(c,h)=>{L({...r,statuses:[c],stale_days:void 0,never_touched:void 0,...hr(h)})}})}),e(je,{title:"\u041A\u0430\u0447\u0435\u0441\u0442\u0432\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C",className:"@3xl:col-span-2",children:e(yr,{metrics:p,onPick:c=>b(c)})})]})]}):e(D,{children:i.loading?"\u0421\u0447\u0438\u0442\u0430\u0435\u043C\u2026":"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})]})}function Ta(t){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(null),i=j(0),m=R(()=>{if(!t||!a?.connected)return;let u=++i.current;n("mail_mailing_get",{id:t,full:!0}).then(p=>{u===i.current&&(r(p),l(null))},p=>u===i.current&&l(C(p)))},[t,a?.connected,n]);return w(()=>{r(null),l(null)},[t]),w(m,[m]),se(p2,u=>{let p=u;if(p?.id===t){if(p.deleted===!0){i.current++,r(null),l("\u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0430");return}m()}}),{mailing:o,error:L,reload:m}}function kr({id:t,onOpenCompany:n,onDeleted:a,embedded:o}){let r=E(),{status:L}=H(),{mailing:l,error:i,reload:m}=Ta(t),[u,p]=f(null),g=u&&l&&u.updated_at>=l.updated_at?u:l,[b,c]=f(null),[h,v]=f(null),[d,x]=f(null),[_,y]=f(!1),[I,T]=f(!1),[$,M]=f(!1),W=!!L?.canManage,N=async()=>{T(!0);try{await r("mail_mailing_discard",{id:t}),a?.()}catch(Z){x(C(Z))}finally{T(!1),M(!1)}},z=g?.recipients??[],Q=!!g&&g.state!=="draft",te=_?z.filter(Z=>Q?Z.replied:!Z.ready):z,U=b&&te.some(Z=>Z.company_id===b)?b:te[0]?.company_id??null,ue=g?.updated_at??"";w(()=>{if(!U){v(null);return}let Z=!0;return x(null),r("mail_mailing_letter",{id:t,company_id:U}).then(A=>{Z&&(v(A),x(null))},A=>Z&&x(C(A))),()=>{Z=!1}},[t,U,ue,r]);let xe=async Z=>{T(!0);try{await r("mail_mailing_remove",{id:t,company_ids:[Z]}),m()}catch(A){x(C(A))}finally{T(!1)}};if(i)return s("p",{className:"text-xs text-destructive",children:["\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430: ",i]});if(!g)return e("p",{className:"text-xs text-muted-foreground",children:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443\u2026"});let he=te.findIndex(Z=>Z.company_id===U),ke=Z=>{let A=te[he+Z];A&&c(A.company_id)};return s("div",{className:"@container mf-root mf-island mf-card flex flex-col gap-3 p-3 text-xs",children:[s("header",{className:"flex flex-col gap-0.5",children:[o?null:s(P,{children:[e(Le,{children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430"}),e("h3",{className:"m-0 text-base font-bold leading-snug",children:g.name})]}),s("span",{className:"text-muted-foreground",children:[g.template_name?`\u043F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443 \xAB${g.template_name}\xBB${g.edited?" \xB7 \u0438\u0437\u043C\u0435\u043D\u0451\u043D":""}`:"\u0431\u0435\u0437 \u0448\u0430\u0431\u043B\u043E\u043D\u0430"," \xB7"," ",q(g.updated_at)]})]}),Q&&g.progress?s("div",{className:"flex flex-wrap gap-2",children:[s(J,{tone:"ok",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E: ",g.progress.sent]}),g.progress.in_channel?s(J,{tone:"info",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438: ",g.progress.in_channel]}):null,g.progress.failed?s(J,{tone:"error",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430: ",g.progress.failed]}):null,g.progress.cancelled?s(J,{tone:"muted",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u0421\u043D\u044F\u0442\u043E: ",g.progress.cancelled]}):null,s(V,{tone:"volt",className:"self-center",children:["\u043E\u0442\u0432\u0435\u0442\u043E\u0432: ",g.progress.replies]}),g.progress.unsubscribes?s(V,{tone:"muted",className:"self-center",children:["\u043E\u0442\u043F\u0438\u0441\u043E\u043A: ",g.progress.unsubscribes]}):null]}):s("div",{className:"flex flex-wrap gap-2",children:[s(J,{tone:"ok",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u0423\u0439\u0434\u0451\u0442: ",g.ready]}),s(J,{tone:g.skipped?"warning":"muted",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u041D\u0435 \u0443\u0439\u0434\u0451\u0442: ",g.skipped]}),s(V,{tone:"muted",className:"self-center",children:["\u0412\u0441\u0435\u0433\u043E: ",g.total]})]}),!Q&&W?e(tt,{specs:He(g.attachments),busy:I,onChange:async Z=>{T(!0);try{p(await r("mail_mailing_update",{id:t,attachments:Z??[]}))}catch(A){x(C(A))}finally{T(!1)}}}):null,e(xn,{mailing:g,onChanged:Z=>p(Z)}),!Q&&Object.keys(g.reasons).length>0?e("ul",{className:"flex flex-col gap-0.5 text-foreground",children:Object.entries(g.reasons).map(([Z,A])=>e("li",{children:s(J,{tone:"warning",children:[Z," \u2014 ",A]})},Z))}):null,z.length===0?e("p",{className:"text-muted-foreground",children:"\u041F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u0435\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0443 \u0442\u0435\u043C\u044B."}):s("div",{className:"grid gap-3 @2xl:grid-cols-[minmax(12rem,16rem)_1fr]",children:[s("div",{className:"flex min-w-0 flex-col gap-1",children:[s("label",{className:"flex items-center gap-1 text-muted-foreground",children:[e("input",{type:"checkbox",checked:_,onChange:Z=>y(Z.target.checked)}),Q?"\u0422\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u0432\u0435\u0442\u0438\u0432\u0448\u0438\u0435":"\u0422\u043E\u043B\u044C\u043A\u043E \u0441 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430\u043C\u0438"]}),e("ul",{className:"max-h-[520px] overflow-y-auto rounded-md border border-border bg-background",children:te.map(Z=>s("li",{className:k("flex items-center gap-1 border-b border-border last:border-0",Z.company_id===U&&"bg-muted shadow-[inset_2px_0_0_var(--foreground)]"),children:[s("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left",onClick:()=>c(Z.company_id),children:[e(ge,{tone:Q?Z.tone??"muted":Z.ready?"ok":"warning",title:Q?Z.status_text??Z.problems.join("; "):Z.ready?"\u0443\u0439\u0434\u0451\u0442":Z.problems.join("; ")}),e("span",{className:"min-w-0 flex-1 truncate",children:Z.company_name}),Z.replied?e(V,{tone:"volt",children:"\u043E\u0442\u0432\u0435\u0442"}):null,e("span",{className:"flex-none text-muted-foreground",children:Q?Z.status_text??"\u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u043B\u043E\u0441\u044C":F(Z.country_code)})]}),W&&!Q?e("button",{type:"button",disabled:I,title:"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0438",className:"px-1.5 text-muted-foreground hover:text-destructive",onClick:()=>{xe(Z.company_id)},children:"\xD7"}):null]},Z.company_id))})]}),s("div",{className:"flex min-w-0 flex-col gap-2",children:[s("div",{className:"flex items-center gap-2",children:[e(S,{size:"sm",variant:"outline",className:"h-7",disabled:he<=0,onClick:()=>ke(-1),children:"\u2190"}),s("span",{className:"text-muted-foreground",children:[he+1," \u0438\u0437 ",te.length]}),e(S,{size:"sm",variant:"outline",className:"h-7",disabled:he<0||he>=te.length-1,onClick:()=>ke(1),children:"\u2192"}),e("span",{className:"flex-1"}),U&&n?e("button",{type:"button",className:"text-muted-foreground hover:underline",onClick:()=>n(U),children:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430"}):null]}),d?e("p",{className:"text-destructive",children:d}):null,h&&h.recipient.company_id===U?s(P,{children:[W&&!Q?e(tt,{specs:He(h.recipient.attachment_specs),inherit:!h.recipient.own_attachments,available:Nt(h.preview.attachments)??Nt(h.recipient.attachments),busy:I,onChange:async Z=>{T(!0);try{let A={id:t,company_id:U};Z&&(A.attachments=Z),p(await r("mail_mailing_recipient_attachments",A))}catch(A){x(C(A))}finally{T(!1)}}}):null,e(_a,{preview:h.preview,caption:h.recipient.company_name})]}):e("p",{className:"text-muted-foreground",children:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"})]})]}),W&&!Q?e("div",{className:"flex flex-wrap items-center justify-end gap-2",children:$?s("span",{className:"flex items-center gap-1",children:[e("span",{className:"text-destructive",children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0446\u0435\u043B\u0438\u043A\u043E\u043C?"}),e(S,{size:"sm",variant:"destructive",className:"h-7",disabled:I,onClick:()=>{N()},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:I,onClick:()=>M(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}):e(S,{size:"sm",variant:"outline",className:"h-7 border-destructive/50 text-destructive",onClick:()=>M(!0),children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443"})}):null]})}var yn={kind:"mail",id:"hub",title:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430"},_n="manifest:open-mail-tab",Ra=null;function Xo(t){Ra=t,window.dispatchEvent(new CustomEvent(_n,{detail:t}))}function Ea(){let t=Ra;return Ra=null,t}function kt(){let t=le();return R(n=>{Xo(n),t(yn)},[t])}var e1=At,t1="manifest-template-draft",Cr={name:"",audience:"potential_supplier",language:"en",kind:"first",subject:"",body:""};function Sr({text:t}){let n=t.split(/(\{\{[^}]*\}\})/g);return e("pre",{className:"whitespace-pre-wrap break-words rounded-md border border-border bg-muted/30 p-2 font-sans text-xs",children:n.map((a,o)=>a.startsWith("{{")?e("span",{className:"rounded bg-primary/15 px-0.5 text-primary",children:a},o):e("span",{children:a},o))})}function Mr({templateId:t,threadId:n,embedded:a}){let o=E(),r=ee(),L=Oe(),l=ae(),{status:i}=H(),m=kt(),[u,p]=f(null),[g,b]=f([]);w(()=>b(He(u?.attachments)),[u]);let[c,h]=f(Cr),[v,d]=f(void 0),[x,_]=f([]),[y,I]=f("template"),[T,$]=f(null),[M,W]=f(null),[N,z]=f(null),[Q,te]=f(!1),[U,ue]=f(null),xe=j(null),he=!!i?.canManage;w(()=>{let O=!0;if(z(null),o("mail_fields",{}).then(B=>O&&_(B.fields),()=>{}),!t){p(null),h(Cr),d(n??null),n&&r.call("draft_get",{threadId:n}).then(B=>O&&h(ne=>({...ne,...B.draft})),()=>{});return}return(async()=>{try{let B=await o("mail_template_get",{id:t});if(!O)return;p(B),h({name:B.name,audience:B.audience,language:B.language,kind:B.kind,subject:B.subject,body:B.body});let{threadId:ne}=n?{threadId:n}:await r.call("template_thread_get",{templateId:t}).catch(()=>({threadId:null}));if(!O||(d(ne),!ne))return;let ie=await r.call("draft_get",{threadId:ne}).catch(()=>null),Rt=!ie?.templateId||ie.templateId===t;O&&ie&&Rt&&(ie.draft.subject!==void 0||ie.draft.body!==void 0)&&h(In=>({...In,...ie.draft}))}catch(B){O&&z(C(B))}})(),()=>{O=!1}},[r,t,o]);let ke=re(()=>`ed-${Math.random().toString(36).slice(2,10)}`,[]),Z=j({});se(t1,O=>{let B=O;if(!v||B?.threadId!==v||B.source===ke||!B.patch||typeof B.patch!="object")return;let ne=B.patch;for(let ie of Object.keys(ne))delete Z.current[ie];h(ie=>({...ie,...ne}))});let A=j(null),Y=R(O=>{h(B=>({...B,...O})),ue(null),v&&(Z.current={...Z.current,...O},A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{let B=Z.current;Z.current={},Object.keys(B).length&&r.call("draft_set",{threadId:v,draft:B,source:ke})},600))},[ke,r,v]);w(()=>{if(y!=="letter")return;let O=setTimeout(()=>{o("mail_preview",{subject:c.subject??"",body:c.body??"",company_id:T?.id}).then(B=>W(B),B=>z(C(B)))},400);return()=>clearTimeout(O)},[T?.id,c.body,c.subject,y,o]);let Pn=O=>{let B=xe.current,ne=`{{${O}}}`,ie=c.body??"";if(!B)return Y({body:ie+ne});let Rt=B.selectionStart??ie.length,In=B.selectionEnd??ie.length;Y({body:ie.slice(0,Rt)+ne+ie.slice(In)}),requestAnimationFrame(()=>{B.focus(),B.selectionStart=B.selectionEnd=Rt+ne.length})},Tt=async O=>{te(!0),z(null);try{let B=O&&u&&c.name===u.name?`${c.name} (\u043A\u043E\u043F\u0438\u044F)`:c.name,ne=await o("mail_template_save",{...O||!u?{}:{id:u.id},...c,name:B,attachments:g});p(ne),h(ie=>({...ie,name:ne.name})),ue(`\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E: \u0432\u0435\u0440\u0441\u0438\u044F ${ne.current_version}`),v&&(O||!t)&&await r.call("template_thread_link",{templateId:ne.id,threadId:v}),!a&&ne.id!==t&&l.toPluginPanel(Te,{subPath:`tpl/${ne.id}`,replace:!0})}catch(B){z(C(B))}finally{te(!1)}},Bn=R(async O=>{try{let{sectionId:B}=await r.call("section_ensure",null),ne=await L.threads.spawn({...O,title:`\u0428\u0430\u0431\u043B\u043E\u043D: ${c.name||"\u043D\u043E\u0432\u044B\u0439"}`.slice(0,120),pluginMetadata:{kind:"template",templateId:t??null,draft:c},...B?{sectionId:B}:{}});t&&await r.call("template_thread_link",{templateId:t,threadId:ne.id}),await r.call("focus_set",{threadId:ne.id,focus:{kind:"template",id:t??`new-${ne.id}`.slice(0,64),title:(c.name??"").slice(0,200)}}),l.toThread(ne.id)}catch(B){z(C(B))}},[c,r,L,t]);return t&&!u&&!N?e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0448\u0430\u0431\u043B\u043E\u043D\u2026"}):s("div",{className:k("@container mf-island mf-paper flex flex-col gap-2 p-2",!a&&"h-full min-h-0 overflow-y-auto @4xl:flex-row @4xl:overflow-hidden"),children:[s("div",{className:k("mf-card flex min-w-0 flex-1 flex-col gap-3 p-3 text-sm",!a&&"@4xl:overflow-y-auto"),children:[s("div",{className:"flex flex-wrap items-center gap-2",children:[a?null:e("button",{type:"button",className:"text-xs text-muted-foreground hover:underline",onClick:()=>l.toPluginPanel(Te,{subPath:"templates"}),children:"\u2190 \u0428\u0430\u0431\u043B\u043E\u043D\u044B"}),e("span",{className:"flex-1"}),U?e("span",{className:"text-xs text-muted-foreground",children:U}):null,he?e(tt,{specs:g,busy:Q,onChange:O=>b(O??[])}):null,he?s(P,{children:[e(S,{size:"sm",className:"h-8",disabled:Q||!c.name||!c.subject||!c.body,onClick:()=>{Tt(!1)},children:u?"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D"}),u?e(S,{size:"sm",variant:"outline",className:"h-8",disabled:Q,onClick:()=>{Tt(!0)},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043A\u0430\u043A \u043D\u043E\u0432\u044B\u0439"}):null]}):null]}),N?e("p",{className:"rounded-md border border-destructive/40 px-2 py-1 text-xs text-destructive",children:N}):null,s("div",{className:"grid gap-2 @lg:grid-cols-4",children:[e("div",{className:"@lg:col-span-4",children:e(Re,{label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",children:e(G,{className:"h-8 text-xs",value:c.name??"",onChange:O=>Y({name:O.target.value})})})}),e(Re,{label:"\u0410\u0443\u0434\u0438\u0442\u043E\u0440\u0438\u044F",children:e("select",{className:Ne,value:c.audience,onChange:O=>Y({audience:O.target.value}),children:Object.entries(Ye).map(([O,B])=>e("option",{value:O,children:B},O))})}),e(Re,{label:"\u0412\u0438\u0434",children:e("select",{className:Ne,value:c.kind,onChange:O=>Y({kind:O.target.value}),children:Object.entries(sn).map(([O,B])=>e("option",{value:O,children:B},O))})}),e(Re,{label:"\u042F\u0437\u044B\u043A",children:e(G,{className:"h-8 text-xs",value:c.language??"",onChange:O=>Y({language:O.target.value})})}),e(Re,{label:"\u0412\u0435\u0440\u0441\u0438\u044F",children:e("span",{className:"h-8 py-1.5 text-xs text-muted-foreground",children:u?`v${u.current_version} \xB7 ${u.updated_by}`:"\u043D\u043E\u0432\u044B\u0439"})})]}),e(Re,{label:"\u0422\u0435\u043C\u0430",children:e(G,{className:"h-8 text-xs",value:c.subject??"",onChange:O=>Y({subject:O.target.value})})}),e(Re,{label:"\u0422\u0435\u043A\u0441\u0442",hint:'\u0410\u0431\u0437\u0430\u0446\u044B \u2014 \u043F\u0443\u0441\u0442\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439, \u0441\u043F\u0438\u0441\u043A\u0438 \xAB- \xBB, **\u0436\u0438\u0440\u043D\u044B\u0439**, [\u0442\u0435\u043A\u0441\u0442](https://\u2026). \u041F\u043E\u0434\u0432\u0430\u043B \u0441 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u0430\u043C\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u0441\u044F \u0441\u0430\u043C. \u0427\u0435\u0433\u043E \u043C\u043E\u0436\u0435\u0442 \u043D\u0435 \u0431\u044B\u0442\u044C \u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F \u2014 \u0432\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442: [[ in {{company.city}}]] \u0438\u0441\u0447\u0435\u0437\u043D\u0435\u0442 \u0431\u0435\u0437 \u0433\u043E\u0440\u043E\u0434\u0430; \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B: [[Dear {{person.name}}, || Dear Sir or Madam,]]; \u0437\u0430\u043F\u0430\u0441\u043D\u043E\u0435: {{person.name | "Sir or Madam"}}.',children:e("textarea",{ref:xe,className:k(W2,"min-h-56"),value:c.body??"",onChange:O=>Y({body:O.target.value})})}),s("p",{className:"text-[11px] text-muted-foreground",children:["{{signature}}"," \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u0437\u0430\u0434\u0430\u044E\u0442\u0441\u044F \u0443 \u044E\u0440\u043B\u0438\u0446\u0430 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F \u2014 \u043E\u0434\u043D\u0438 \u043D\u0430 \u0432\u0441\u0435 \u0435\u0433\u043E \u043F\u0438\u0441\u044C\u043C\u0430."," ",e("button",{type:"button",className:"text-foreground underline-offset-2 hover:underline",onClick:()=>m("entities"),children:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u2192"})]}),e("div",{className:"flex flex-wrap gap-1",children:x.map(O=>e("button",{type:"button",title:O.title,onClick:()=>Pn(O.path),className:"rounded-full border border-border bg-muted px-2 py-0.5 font-mono text-[11px] hover:bg-state-hover",children:`{{${O.path}}}`},O.path))}),e("div",{className:"flex gap-1 border-b border-border",children:["template","letter"].map(O=>e("button",{type:"button",onClick:()=>I(O),className:k("px-3 py-1.5 text-xs",y===O?"border-b-2 border-foreground font-semibold":"text-muted-foreground"),children:O==="template"?"\u0428\u0430\u0431\u043B\u043E\u043D":`\u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F ${T?.name??"\u2026"}`},O))}),y==="template"?s("div",{className:"flex flex-col gap-2",children:[e(Sr,{text:`\u0422\u0435\u043C\u0430: ${c.subject??""}`}),e(Sr,{text:c.body??""})]}):s("div",{className:"flex flex-col gap-2",children:[e(Je,{value:T,onChange:$,placeholder:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 (\u0431\u0435\u0437 \u043D\u0435\u0451 \u2014 \u043E\u0431\u0440\u0430\u0437\u0435\u0446)"}),M?s(P,{children:[s("div",{className:"text-xs text-muted-foreground",children:["\u041E\u0442: ",M.from_name?`${M.from_name} <${M.from}>`:"\u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C \u043D\u0435 \u0437\u0430\u0434\u0430\u043D"," \xB7 \u041A\u043E\u043C\u0443: ",M.to||"\u2014",M.sample?" \xB7 \u043E\u0431\u0440\u0430\u0437\u0435\u0446":""]}),e("div",{className:"text-sm font-medium",children:M.subject}),M.problems.length?e("ul",{className:"text-xs text-destructive",children:M.problems.map(O=>s("li",{children:["\u2022 ",O]},O))}):null,e(Ln,{html:M.html,className:"h-80"})]}):e(D,{children:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"})]}),u?.versions&&u.versions.length>1?s("details",{className:"text-xs",children:[s("summary",{className:"cursor-pointer text-muted-foreground",children:["\u0412\u0435\u0440\u0441\u0438\u0438 (",u.versions.length,")"]}),e("ul",{className:"mt-1 flex flex-col gap-1",children:u.versions.map(O=>s("li",{className:"flex items-center gap-2",children:[s("span",{children:["v",O.version]}),e("span",{className:"text-muted-foreground",children:O.created_by}),e("button",{type:"button",className:"underline-offset-2 hover:underline",onClick:()=>Y({subject:O.subject,body:O.body}),children:"\u0432\u0437\u044F\u0442\u044C \u0432 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"})]},O.version))})]}):null]}),a?null:s("aside",{className:"mf-card flex w-full flex-col gap-2 self-start p-3 @4xl:w-96 @4xl:flex-none",children:[e("h3",{className:"text-[13px] font-bold",children:"\u0427\u0430\u0442\u044B \u043F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443"}),t?e(at,{focus:{kind:"template",id:t,title:c.name??""}}):e(P,{children:e(e1,{draftKey:"manifest-template-new",placeholder:"\u0427\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0441 \u0448\u0430\u0431\u043B\u043E\u043D\u043E\u043C?",onSubmit:O=>Bn(O)})})]})]})}function Tr({id:t,onLinked:n,embedded:a}){let o=E(),{status:r}=H(),[L,l]=f(null),[i,m]=f(null),[u,p]=f(null),[g,b]=f(!1),c=R(()=>{o("mail_inbound_get",{id:t}).then(v=>{l(v),p(null)},v=>p(C(v)))},[t,o]);w(c,[c]);let h=async(v,d)=>{b(!0);try{l(await o(v,d)),p(null),v==="mail_inbound_link"&&i&&n?.(i)}catch(x){p(C(x))}finally{b(!1)}};return L?s("div",{className:"@container mf-island flex flex-col gap-2 p-2 text-xs",children:[s(k2,{children:[s("div",{className:"flex flex-wrap items-center gap-2",children:[a?null:e(Le,{children:"\u0412\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E"}),L.kind==="reply"?e(V,{tone:"volt",children:"\u043E\u0442\u0432\u0435\u0442"}):null]}),s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[e("dt",{className:"text-muted-foreground",children:"\u041E\u0442"}),e("dd",{className:"break-all",children:L.from_name?`${L.from_name} <${L.from_address}>`:L.from_address}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:L.subject}),e("dt",{className:"text-muted-foreground",children:"\u041F\u043E\u043B\u0443\u0447\u0435\u043D\u043E"}),s("dd",{children:[q(L.received_at)," \xB7 ",on[L.kind]??L.kind]}),e("dt",{className:"text-muted-foreground",children:"\u0420\u0430\u0437\u0431\u043E\u0440"}),e("dd",{children:L.company_id?s(J,{tone:"ok",children:["\u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043E: ",L.company_name]}):L.triage==="spam"?e(J,{tone:"muted",children:"\u0441\u043F\u0430\u043C"}):L.triage==="ignored"?e(J,{tone:"muted",children:"\u0438\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044F"}):e(J,{tone:"warning",children:"\u043D\u0435 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043E"})})]})]}),e("pre",{title:"\u0412\u043D\u0435\u0448\u043D\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E: \u0442\u0435\u043A\u0441\u0442 \u043A\u0430\u043A \u0435\u0441\u0442\u044C, \u0441\u0441\u044B\u043B\u043A\u0438 \u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",className:"mf-card max-h-[60vh] overflow-y-auto whitespace-pre-wrap p-3 font-sans",children:L.reply_text||L.body_text}),L.attachments.length?s("p",{className:"text-muted-foreground",children:["\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F: ",L.attachments.map(v=>v.filename).join(", ")]}):null,u?e("p",{className:"text-destructive",children:u}):null,L.company_id&&(L.answers??[]).length>0?s(J,{tone:"ok",children:["\u041E\u0442\u0432\u0435\u0442 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D: ",(L.answers??[]).map(v=>v.status_text).join(", ")]}):null,r?.canManage&&L.company_id&&(L.kind==="reply"||L.kind==="other")?e("div",{className:"flex",title:`\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A \xABRe: \u2026\xBB \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435 \xAB${L.company_name}\xBB`,children:e(S,{size:"sm",className:"h-9",disabled:g,onClick:async()=>{b(!0);try{await o("mail_reply_draft_create",{inbound_id:t}),p(null),n?.({id:L.company_id,name:L.company_name})}catch(v){p(C(v))}finally{b(!1)}},children:"\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C"})}):null,r?.canManage&&!L.company_id?s("div",{className:"mf-card flex flex-col gap-2 p-3 @md:flex-row @md:items-center",children:[e("div",{className:"min-w-0 flex-1",children:e(Je,{value:i,onChange:m,placeholder:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u043A \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\u2026"})}),s("div",{className:"flex gap-2",children:[e(S,{size:"sm",className:"h-9",disabled:g||!i,onClick:()=>{h("mail_inbound_link",{id:t,company_id:i?.id})},children:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-9",disabled:g,onClick:()=>{h("mail_inbound_mark",{id:t,triage:"spam"})},children:"\u0421\u043F\u0430\u043C"}),e(S,{size:"sm",variant:"ghost",className:"h-9",disabled:g,onClick:()=>{h("mail_inbound_mark",{id:t,triage:"ignored"})},children:"\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C"})]})]}):null]}):e("p",{className:"p-3 text-xs text-muted-foreground",children:u??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"})}function rt({tabs:t,active:n,onSelect:a,label:o}){return e("nav",{className:"mf-surface flex flex-none gap-1 overflow-x-auto border-b border-border px-1.5 @[24rem]:px-3","aria-label":o,children:t.map(([r,L])=>e("button",{type:"button",onClick:()=>a(r),"aria-current":n===r?"page":void 0,className:k("-mb-px flex-none whitespace-nowrap border-b-2 px-2 py-2 text-xs @[24rem]:px-3",n===r?"border-foreground font-semibold":"border-transparent text-muted-foreground hover:text-foreground"),children:L},r))})}function Nn({back:t,onBack:n,title:a,kind:o,meta:r,actions:L,className:l}){return s("div",{className:k("mf-surface flex flex-col gap-0.5 border-b border-border px-3 py-1.5 text-xs",l),children:[s("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[s("button",{type:"button",className:"-ml-1 flex-none rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:bg-state-hover hover:text-foreground",onClick:n,title:`\u041D\u0430\u0437\u0430\u0434: ${t}`,children:["\u2190 ",t]}),e("span",{"aria-hidden":!0,className:"text-muted-foreground/60",children:"\xB7"}),s("span",{className:"flex min-w-[8rem] flex-1 items-center gap-1.5",children:[o?e("span",{className:"flex-none text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:o}):null,e("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] font-bold leading-snug",children:a})]}),L?e("span",{className:"flex flex-none flex-wrap items-center gap-1.5",children:L}):null]}),r?e("div",{className:"text-[11px] text-muted-foreground",children:r}):null]})}var st=[["templates","\u0428\u0430\u0431\u043B\u043E\u043D\u044B"],["mailings","\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0438"],["entities","\u042E\u0440\u043B\u0438\u0446\u0430 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u0438"],["inbound","\u041D\u0435\u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435"]];function Aa({initial:t="mailings"}){let{status:n}=H(),[a,o]=f(()=>{let r=Ea();return r&&st.some(([L])=>L===r)?r:t});return w(()=>{let r=L=>{let l=L.detail;st.some(([i])=>i===l)&&(o(l),Ea())};return window.addEventListener(_n,r),()=>window.removeEventListener(_n,r)},[]),n?n.connected?n.canMail?s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[e(rt,{tabs:st,active:a,onSelect:o,label:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430"}),e("div",{className:"min-h-0 flex-1 overflow-y-auto p-3",children:a==="entities"?e(s1,{}):a==="inbound"?e(L1,{}):a==="mailings"?e(a1,{}):e(n1,{})})]}):e(D,{children:"\u041F\u043E\u0447\u0442\u0430 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest: \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0435\u0449\u0451 \u043D\u0435\u0442 \u043F\u043E\u0447\u0442\u043E\u0432\u043E\u0433\u043E \u0441\u043B\u043E\u044F."}):e(D,{children:n.message}):e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"})}function Er({subPath:t}){let n=le(),a=Ee(),[o,r]=f(!1),[L,l]=[t.split("/")[0]||"",t.split("/")[1]??""];return w(()=>{if(L==="mailing"&&l)return void n({kind:"mailing",id:l,title:""});if(L==="inbound"&&l)return void n({kind:"inbound",id:l,title:""});if(L==="tpl")return void n({kind:"template",id:l&&l!=="new"?l:"",title:""});a("mail").then(i=>{i==="stay"?r(!0):i==="none"&&n(yn)})},[L,n,a,l]),o?e(Aa,{initial:st.some(([i])=>i===L)?L:"mailings"}):e(D,{children:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u043F\u043E\u0447\u0442\u0443\u2026"})}function n1(){let t=E(),n=le(),{status:a}=H(),[o,r]=f(""),[L,l]=f(null),[i,m]=f(null);return w(()=>{t("mail_templates",{audience:o||void 0}).then(u=>l(u.items),u=>m(C(u)))},[o,t]),s("div",{className:"flex flex-col gap-3 text-sm",children:[s("div",{className:"flex items-center gap-2",children:[s("select",{className:Ne,value:o,onChange:u=>r(u.target.value),children:[e("option",{value:"",children:"\u0412\u0441\u0435 \u0430\u0443\u0434\u0438\u0442\u043E\u0440\u0438\u0438"}),Object.entries(Ye).map(([u,p])=>e("option",{value:u,children:p},u))]}),e("span",{className:"flex-1"}),a?.canManage?e(S,{size:"sm",className:"h-8",onClick:()=>{n({kind:"template",id:"",title:""})},children:"\u041D\u043E\u0432\u044B\u0439 \u0448\u0430\u0431\u043B\u043E\u043D"}):null]}),i?e("p",{className:"text-xs text-destructive",children:i}):null,L?L.length===0?e(D,{children:"\u0428\u0430\u0431\u043B\u043E\u043D\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043F\u0435\u0440\u0432\u044B\u0439 \u2014 \u0430\u0433\u0435\u043D\u0442 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C."}):e("ul",{className:"@container flex flex-col divide-y divide-border mf-card overflow-hidden",children:L.map(u=>e("li",{children:s("button",{type:"button",onClick:()=>{n({kind:"template",id:u.id,title:u.name})},className:"flex w-full flex-col gap-0.5 px-3 py-2 text-left hover:bg-state-hover",children:[s("span",{className:"flex flex-wrap items-baseline justify-between gap-x-2",children:[e("span",{className:"min-w-0 font-medium",children:u.name}),s("span",{className:"text-[11px] text-muted-foreground",children:[Ye[u.audience]??u.audience," \xB7 ",sn[u.kind]??u.kind," \xB7 ",u.language," \xB7 v",u.current_version]})]}),e("span",{className:"truncate text-xs text-muted-foreground",children:u.subject})]})},u.id))}):e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"})]})}var Rr={draft:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A",sending:"\u0418\u0434\u0451\u0442",done:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",stopped:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430",sent:"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430"};function a1(){let t=E(),n=le(),[a,o]=f(null),[r,L]=f(null);if(w(()=>{t("mail_mailings",{}).then(i=>o(i.items),i=>L(C(i)))},[t]),!a)return e(D,{children:r??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});if(a.length===0)return e(D,{children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043E\u043A \u043D\u0435\u0442."});let l=i=>i||e("span",{className:"text-muted-foreground",children:"\u2014"});return e("div",{className:"@container mf-card overflow-hidden",children:s("table",{className:"w-full text-xs",children:[e("thead",{className:"bg-[var(--mf-surface-strong,#eef3f1)] text-left text-muted-foreground",children:s("tr",{children:[e("th",{className:"px-3 py-2 font-semibold",children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430"}),e("th",{className:"hidden px-2 py-2 font-semibold @[30rem]:table-cell",children:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[40rem]:table-cell",title:"\u041F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u0435\u0439 / \u0433\u043E\u0442\u043E\u0432\u044B\u0445 \u043F\u0438\u0441\u0435\u043C",children:"\u041F\u043E\u043B\u0443\u0447."}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[40rem]:table-cell",children:"\u0423\u0448\u043B\u043E"}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[48rem]:table-cell",title:"\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u0448\u043B\u044E\u0437\u0430",children:"\u041E\u0447\u0435\u0440\u0435\u0434\u044C"}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[48rem]:table-cell",title:"\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430, \u043E\u0448\u0438\u0431\u043A\u0430, \u0434\u0443\u0431\u043B\u044C",children:"\u041D\u0435\u0434\u043E\u0441\u0442."}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[40rem]:table-cell",children:"\u041E\u0442\u0432\u0435\u0442\u044B"}),e("th",{className:"hidden px-3 py-2 font-semibold @[56rem]:table-cell",children:"\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0430"})]})}),e("tbody",{children:a.map(i=>{let m=i.progress,u=bn(i);return s("tr",{className:"cursor-pointer border-t border-border hover:bg-state-hover",onClick:()=>{n({kind:"mailing",id:i.id,title:i.name})},children:[s("td",{className:"max-w-0 px-3 py-2",children:[e("div",{className:"truncate font-medium",children:i.name}),e("div",{className:"truncate text-[11px] text-muted-foreground",children:i.template_name||"\u0431\u0435\u0437 \u0448\u0430\u0431\u043B\u043E\u043D\u0430"}),s("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-[11px] text-muted-foreground @[40rem]:hidden",children:[e("span",{className:"@[30rem]:hidden",children:e(J,{tone:u.tone,children:Rr[i.state]??i.state})}),s("span",{children:["\u043F\u0438\u0441\u0435\u043C ",m?m.letters:i.total]}),s("span",{children:["\u0443\u0448\u043B\u043E ",m?.sent??0]}),m?.failed?s("span",{className:"text-destructive",children:["\u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430 ",m.failed]}):null,s("span",{children:["\u043E\u0442\u0432\u0435\u0442\u043E\u0432 ",m?.replies??0]})]})]}),e("td",{className:"hidden whitespace-nowrap px-2 py-2 @[30rem]:table-cell",children:s("span",{className:"inline-flex items-center gap-1.5",children:[e(J,{tone:u.tone,children:Rr[i.state]??i.state}),e(ce,{sandbox:i.mode==="sandbox"||i.mode==="mixed"})]})}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[40rem]:table-cell",children:m?m.letters:i.total}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[40rem]:table-cell",children:l(m?.sent)}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[48rem]:table-cell",children:l(m?.in_channel)}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[48rem]:table-cell",children:m?.failed?s("span",{className:"inline-flex items-center gap-1",children:[e(ge,{tone:"error"}),m.failed]}):l(0)}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[40rem]:table-cell",children:m?.replies?e("span",{className:"mf-badge mf-badge--volt",children:m.replies}):l(0)}),e("td",{className:"hidden whitespace-nowrap px-3 py-2 text-muted-foreground @[56rem]:table-cell",children:q(i.updated_at)})]},i.id)})})]})})}function r1({entity:t,canEdit:n,onSaved:a}){let o=E(),[r,L]=f(t.signature),[l,i]=f(t.footer),[m,u]=f(!1),[p,g]=f(null),[b,c]=f(!1);w(()=>{L(t.signature),i(t.footer)},[t.signature,t.footer]);let h=r!==t.signature||l!==t.footer,v=async()=>{u(!0),g(null),c(!1);try{let{id:x,code:_,name:y,full_name:I,details:T,address:$,website:M,phone:W,subdomain:N,sandbox:z,language:Q}=t;await o("mail_entity_save",{id:x,code:_,name:y,full_name:I,details:T,address:$,website:M,phone:W,subdomain:N,language:Q,...z?{sandbox:z}:{},signature:r,footer:l}),c(!0),a()}catch(x){g(C(x))}finally{u(!1)}},d="min-h-[5.5rem] w-full rounded-md border border-input bg-background px-2 py-1.5 font-mono text-xs disabled:opacity-70";return s("details",{className:"mt-2 rounded-md border border-[var(--mf-line-300)] bg-[var(--mf-surface)] px-2 py-1.5 text-xs",open:h||void 0,children:[e("summary",{className:"cursor-pointer select-none font-medium",children:"\u041F\u043E\u0434\u043F\u0438\u0441\u044C \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u043F\u0438\u0441\u0435\u043C"}),s("div",{className:"mt-2 flex flex-col gap-2",children:[s("label",{className:"flex flex-col gap-1",children:[s("span",{className:"text-muted-foreground",children:["\u041F\u043E\u0434\u043F\u0438\u0441\u044C \u2014 \u0432\u043C\u0435\u0441\u0442\u043E ","{{signature}}"," \u0432 \u0442\u0435\u043A\u0441\u0442\u0435 \u043F\u0438\u0441\u044C\u043C\u0430"]}),e("textarea",{className:d,value:r,maxLength:2e3,disabled:!n||m,onChange:x=>L(x.target.value),"aria-label":"\u041F\u043E\u0434\u043F\u0438\u0441\u044C"})]}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground",children:"\u041F\u043E\u0434\u0432\u0430\u043B \u2014 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u043E\u0434 \u043A\u0430\u0436\u0434\u044B\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u043C (\u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B, \u043E\u0442\u043F\u0438\u0441\u043A\u0430)"}),e("textarea",{className:d,value:l,maxLength:4e3,disabled:!n||m,onChange:x=>i(x.target.value),"aria-label":"\u041F\u043E\u0434\u0432\u0430\u043B"})]}),s("p",{className:"text-[11px] text-muted-foreground",children:["\u041F\u043E\u0434\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438: ","{{sender.name}}",", ","{{sender.email}}",", ","{{legal.name}}",", ","{{legal.address}}",", ","{{legal.website}}",", ","{{legal.phone}}","; \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u2014 \u043A\u0430\u043A \u0432 \u0448\u0430\u0431\u043B\u043E\u043D\u0435 (**\u0436\u0438\u0440\u043D\u044B\u0439**, [\u0442\u0435\u043A\u0441\u0442](https://\u2026)). \u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u043F\u0438\u0441\u0435\u043C \u044D\u0442\u043E\u0433\u043E \u044E\u0440\u043B\u0438\u0446\u0430."]}),p?e("p",{role:"alert",className:"text-destructive",children:p}):null,n?s("div",{className:"flex items-center gap-2",children:[e(S,{size:"sm",className:"h-7",disabled:m||!h,onClick:()=>{v()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"}),h?e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:m,onClick:()=>{L(t.signature),i(t.footer)},children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"}):b?e("span",{className:"text-[var(--mf-green)]",children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E"}):null]}):e("p",{className:"text-[11px] text-muted-foreground",children:"\u041C\u0435\u043D\u044F\u0442\u044C \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A \u0441 \u043F\u0440\u0430\u0432\u043E\u043C \xAB\u041F\u043E\u0447\u0442\u0430: \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\xBB."})]})]})}function s1(){let t=E(),{status:n}=H(),[a,o]=f(null),[r,L]=f(null),[l,i]=f(null),[m,u]=f(!1),p=!!n?.canMailSettings,g=R(()=>{t("mail_entities",{}).then(d=>o(d.items),d=>i(C(d))),t("mail_defaults",{}).then(d=>L(d),()=>{})},[t]);w(g,[g]);let b=async(d,x)=>{u(!0),i(null);try{await t(d,x),g()}catch(_){i(C(_))}finally{u(!1)}};if(!a)return e(D,{children:l??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let c=a.flatMap(d=>d.senders.map(x=>({...x,entity:d}))),h=d=>{let x=c.find(_=>_.id===d);return x?{legal_entity_id:x.legal_entity_id,sender_id:x.id}:{legal_entity_id:"",sender_id:""}},v=(d,x)=>s("select",{className:Ne,disabled:!p||m,value:d,onChange:_=>x(_.target.value),children:[e("option",{value:"",children:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D"}),c.map(_=>s("option",{value:_.id,children:[_.display_name," <",_.address,">"]},_.id))]});return s("div",{className:"flex flex-col gap-3 text-sm",children:[l?e("p",{className:"rounded-md border border-destructive/40 px-2 py-1 text-xs text-destructive",children:l}):null,a.length===0?e(D,{children:"\u042E\u0440\u043B\u0438\u0446 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u0418\u0445 \u0437\u0430\u0432\u043E\u0434\u0438\u0442 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u0432 \u0432\u0435\u0431\u0435 Manifest (\xAB\u0410\u0443\u0442\u0440\u0438\u0447 \u2192 \u041F\u043E\u0447\u0442\u0430\xBB)."}):null,a.map(d=>s("section",{className:"mf-card overflow-hidden p-3",children:[s("header",{className:"flex flex-wrap items-baseline gap-2",children:[e("h3",{className:"font-semibold",children:d.name}),e("span",{className:"text-xs text-muted-foreground",children:d.subdomain}),e(ce,{sandbox:d.sandbox}),e("span",{className:"flex-1"}),e(J,{tone:d.health_ok==null?"muted":d.health_ok?"ok":"error",className:"text-xs",children:d.health_ok==null?"\u043A\u0430\u043D\u0430\u043B \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0441\u044F":d.health_ok?"\u043A\u0430\u043D\u0430\u043B \u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435":`\u043A\u0430\u043D\u0430\u043B: ${d.health_error||"\u043E\u0448\u0438\u0431\u043A\u0430"}`}),e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:m||!p,onClick:()=>{b("mail_entity_health",{id:d.id})},children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"})]}),d.ready?null:s(J,{tone:"error",className:"mt-1 text-xs",children:["\u041D\u0435 \u0433\u043E\u0442\u043E\u0432\u043E \u043A \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435: ",d.ready_problems.join(", ")]}),d.quota?s("p",{className:"mt-1 text-xs text-muted-foreground",children:["\u0421\u0435\u0433\u043E\u0434\u043D\u044F ",d.quota.sent_today," \u0438\u0437 ",d.quota.daily_limit," (\u043F\u0440\u043E\u0433\u0440\u0435\u0432 ",d.quota.warmup_stage,") \xB7 \u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 ",d.quota.queue_depth,d.quota.estimated_drain_at?` \xB7 \u043E\u0447\u0435\u0440\u0435\u0434\u044C \u0443\u0439\u0434\u0451\u0442 \u043A ${q(d.quota.estimated_drain_at)}`:"",d.quota.paused?` \xB7 \u043F\u0430\u0443\u0437\u0430: ${d.quota.pause_reason}`:""]}):null,e("ul",{className:"mt-2 flex flex-col gap-1 text-xs",children:d.senders.map(x=>s("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[e("span",{className:"font-medium",children:x.display_name}),s("span",{className:"text-muted-foreground",children:["<",x.address,">"]}),x.registered_at?e(J,{tone:"ok",children:"\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D"}):e(J,{tone:"error",title:x.register_error,children:"\u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D"})]},x.id))}),p?e(o1,{entity:d,busy:m,onAdd:(x,_)=>{b("mail_sender_save",{legal_entity_id:d.id,local_part:x,display_name:_})}}):null,e(r1,{entity:d,canEdit:p,onSaved:g})]},d.id)),r?s("section",{className:"mf-card overflow-hidden p-3",children:[e("h3",{className:"mb-2 font-semibold",children:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E"}),e("p",{className:"mb-2 text-xs text-muted-foreground",children:"\u041F\u043E\u0434\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u0440\u0438 \u043F\u0435\u0440\u0432\u043E\u043C \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u0437\u0430\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u0435\u0451 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443."}),s("div",{className:"grid gap-2 text-xs @md:grid-cols-2",children:[s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground",children:"\u041E\u0431\u0449\u0438\u0439"}),v(r.general.sender_id,d=>{b("mail_defaults_set",{...r,general:h(d)})})]}),Object.entries(Ye).map(([d,x])=>s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground",children:x}),v(r.audiences[d]?.sender_id??"",_=>{b("mail_defaults_set",{...r,audiences:{...r.audiences,[d]:h(_)}})})]},d))]})]}):null,e("p",{className:"text-xs text-muted-foreground",children:"\u0422\u043E\u043A\u0435\u043D\u044B \u0448\u043B\u044E\u0437\u0430, \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u044E\u0440\u043B\u0438\u0446\u0430 \u0437\u0430\u0434\u0430\u044E\u0442\u0441\u044F \u0432 \u0432\u0435\u0431\u0435 Manifest."})]})}function o1({entity:t,busy:n,onAdd:a}){let[o,r]=f(""),[L,l]=f("");return s("div",{className:"mt-2 flex flex-wrap items-center gap-1 text-xs",children:[e(G,{className:"h-7 w-32 text-xs",placeholder:"evgenii",value:o,onChange:i=>r(i.target.value)}),s("span",{className:"text-muted-foreground",children:["@",t.subdomain]}),e(G,{className:"h-7 w-44 text-xs",placeholder:"Evgenii | MSG",value:L,onChange:i=>l(i.target.value)}),e(S,{size:"sm",variant:"outline",className:"h-7",disabled:n||!o||!L,onClick:()=>{a(o,L),r(""),l("")},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0430\u0434\u0440\u0435\u0441"})]})}function L1(){let t=E(),{status:n}=H(),[a,o]=f(null),[r,L]=f(null),[l,i]=f(null),[m,u]=f(null),p=R(()=>{t("mail_inbound_list",{triage:"unlinked",limit:100}).then(b=>o(b.items),b=>u(C(b)))},[t]);w(p,[p]);let g=async(b,c)=>{try{await t(b,c),L(null),i(null),p()}catch(h){u(C(h))}};return a?a.length===0?e(D,{children:"\u041D\u0435\u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u043F\u0438\u0441\u0435\u043C \u043D\u0435\u0442: \u0432\u0441\u0435 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B \u043A \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F\u043C."}):s("ul",{className:"flex flex-col divide-y divide-border mf-card overflow-hidden text-sm",children:[m?e("li",{className:"px-3 py-1 text-xs text-destructive",children:m}):null,a.map(b=>s("li",{className:"px-3 py-2",children:[s("button",{type:"button",className:"flex w-full flex-col text-left",onClick:()=>L(r===b.id?null:b.id),children:[s("span",{className:"flex justify-between gap-2 text-xs",children:[e(J,{tone:"warning",className:"truncate font-medium",children:b.from_name?`${b.from_name} <${b.from_address}>`:b.from_address}),s("span",{className:"flex-none text-muted-foreground",children:[on[b.kind]??b.kind," \xB7 ",q(b.received_at)]})]}),e("span",{className:"truncate text-xs",children:b.subject})]}),r===b.id?s("div",{className:"mt-2 flex flex-col gap-2",children:[e("pre",{title:"\u0412\u043D\u0435\u0448\u043D\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E: \u0442\u0435\u043A\u0441\u0442 \u043A\u0430\u043A \u0435\u0441\u0442\u044C, \u0441\u0441\u044B\u043B\u043A\u0438 \u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",className:"max-h-64 overflow-y-auto whitespace-pre-wrap rounded-md bg-muted/40 p-2 font-sans text-xs",children:b.reply_text||b.body_text}),b.attachments.length?s("p",{className:"text-xs text-muted-foreground",children:["\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F: ",b.attachments.map(c=>c.filename).join(", ")]}):null,n?.canManage?s("div",{className:"flex flex-wrap items-center gap-2",children:[e("div",{className:"w-64",children:e(Je,{value:l,onChange:i,placeholder:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u043A \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\u2026"})}),e(S,{size:"sm",className:"h-7",disabled:!l,onClick:()=>{g("mail_inbound_link",{id:b.id,company_id:l?.id})},children:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>{g("mail_inbound_mark",{id:b.id,triage:"spam"})},children:"\u0421\u043F\u0430\u043C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>{g("mail_inbound_mark",{id:b.id,triage:"ignored"})},children:"\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C"})]}):null]}):null]},b.id))]}):e(D,{children:m??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"})}var K="py-1.5 px-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",l1={KZT:"\u20B8",INR:"\u20B9",USD:"$",RUB:"\u20BD",EUR:"\u20AC",GBP:"\xA3",AED:"AED",CNY:"\xA5"},Ae=(t,n)=>t==null?"\u2014":`${Math.round(t).toLocaleString("ru-RU")} ${l1[n]??n}`.trim();function Pe(){return e("span",{className:"flex-none rounded bg-[color-mix(in_oklab,var(--mf-blue)_12%,white)] px-1 text-[10px] font-medium text-[var(--mf-blue)]",title:"\u041D\u0430\u0431\u043E\u0440 \u0441 \u0430\u043A\u043A\u0443\u043C\u0443\u043B\u044F\u0442\u043E\u0440\u043E\u043C \u0438 \u0437\u0430\u0440\u044F\u0434\u043D\u044B\u043C",children:"\u043D\u0430\u0431\u043E\u0440"})}function wn({colSpan:t,title:n,note:a}){return e("tr",{className:"bg-[var(--mf-surface-strong)]",children:s("td",{colSpan:t,className:"px-3 py-1 text-[11px] font-semibold",children:[n,e("span",{className:"ml-1.5 font-normal text-muted-foreground",children:a})]})})}var kn="data-mf-scroll",Ct=t=>t?.closest(`[${kn}]`)??null;function Pa({back:t,onBack:n,title:a,meta:o,actions:r,children:L}){return e(Ba,{bar:e(Nn,{back:t,onBack:n,title:a,meta:o,actions:r,className:"shadow-[0_1px_0_var(--mf-line-300)]"}),children:L})}function Ba({bar:t,children:n}){let a=j(null),[o,r]=f(0);return lt(()=>{let L=a.current;if(!L||(r(L.offsetHeight),typeof ResizeObserver>"u"))return;let l=new ResizeObserver(()=>r(L.offsetHeight));return l.observe(L),()=>l.disconnect()},[]),s("div",{className:"flex flex-col",style:{"--mf-sticky":`${o}px`},children:[e("div",{ref:a,className:"sticky top-0 z-20",children:t}),n]})}function Ar(t){let[n,a]=f(null),o=j(0),r=R(L=>{let l=Ct(t.current);L!==null?(l&&n===null&&(o.current=l.scrollTop),a(L),requestAnimationFrame(()=>{let i=Ct(t.current);i&&(i.scrollTop=0)})):(a(null),requestAnimationFrame(()=>{let i=Ct(t.current);i&&(i.scrollTop=o.current)}))},[t,n]);return[n,r]}var Cn="manifest:assortment-changed",St=()=>window.dispatchEvent(new Event(Cn)),i1={kit:"\u043D\u0430\u0431\u043E\u0440 \u2194 \u0431\u0435\u0437 \u0410\u041A\u0411",generation:"\u0434\u0440\u0443\u0433\u043E\u0435 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435",mains:"\u0437\u0430\u0440\u044F\u0434\u043D\u043E\u0435 \u043D\u0435 \u0434\u043B\u044F \u0441\u0435\u0442\u0438 \u0415\u0421",trim:"\u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E"};function Ia(t){return t.level>=1?{tone:"ok",text:t.reason==="trim"?"\u0435\u0441\u0442\u044C \xB7 \u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E":"\u0435\u0441\u0442\u044C"}:t.level>0?{tone:"warning",text:`\u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E \xB7 ${i1[t.reason??""]??t.reason??""}`}:{tone:"muted",text:"\u043D\u0435\u0442"}}function Be(t){return t?t.source_kind==="stihl_country"?`${F(t.country)} \xB7 \u0441\u0430\u0439\u0442 STIHL`:`${t.company_name||t.title} \xB7 ${t.source_kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442"}`:""}function c1(t,n){return t.global_id?{key_kind:"global_id",key:t.global_id}:t.sku?{key_kind:"sku",key:t.sku}:{key_kind:"name",key:t.name??"",source_id:n?.source_id}}function Sn({rows:t,canDecide:n,showSource:a=!1,productLabel:o="\u0422\u043E\u0432\u0430\u0440 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430"}){let r=E(),[L,l]=f(null),[i,m]=f(!1),[u,p]=f(null),g=async(c,h)=>{m(!0),p(null);try{await r(c,h),St()}catch(v){p(C(v))}finally{m(!1)}},b=(c,h,v)=>g("assortment_decide",{need_id:c.need_id,level:h,reason:h===.5?c.reason??"":"",...c1(v??c,c.source)});return s(P,{children:[u?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:u}):null,s("table",{className:"w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-[var(--mf-sticky,0px)] z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"w-10 pl-3 text-right"),children:"\u2116"}),e("th",{className:k(K,"text-left @[34rem]:w-[32%]"),children:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F"}),e("th",{className:k(K,"hidden text-left @[34rem]:table-cell"),children:o}),e("th",{className:k(K,"w-[8.5rem] pr-3 text-left @[34rem]:w-[13.5rem]"),children:"\u0418\u0442\u043E\u0433"})]})}),e("tbody",{children:t.map(c=>{let h=`${c.source?.source_id??c.country}|${c.need_id}|${c.global_id??c.sku??c.name??""}`,v=L===h,d=Ia(c);return e(d1,{isOpen:v,onToggle:()=>l(v?null:h),cells:s(P,{children:[e("td",{className:"py-1 pl-3 pr-2 text-right tabular-nums text-muted-foreground",children:c.position_no}),s("td",{className:"max-w-0 px-2 py-1",children:[s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"truncate font-medium",children:c.model_key}),c.kit?e(Pe,{}):null]}),c.name?s("span",{className:"block truncate text-[11px] text-muted-foreground @[34rem]:hidden",title:c.name,children:[c.name,a&&c.source?` \xB7 ${Be(c.source)}`:""]}):null]}),s("td",{className:"hidden max-w-0 px-2 py-1 @[34rem]:table-cell",title:c.name,children:[e("span",{className:"block truncate",children:c.name??"\u2014"}),a&&c.source?e("span",{className:"block truncate text-[10px] text-muted-foreground",children:Be(c.source)}):null]}),e("td",{className:"py-1 pl-2 pr-3",children:s("span",{className:"flex min-w-0 items-start gap-1.5",children:[e(ge,{tone:d.tone,className:"mt-1 flex-none"}),e("span",{className:"min-w-0 leading-snug",children:d.text}),c.review&&!c.decided?e("span",{className:"text-[var(--mf-amber)]",title:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C",children:"\u25CF"}):null,c.decided?e("span",{className:"text-[10px] text-muted-foreground",title:"\u0420\u0435\u0448\u0435\u043D\u0438\u0435 \u0447\u0435\u043B\u043E\u0432\u0435\u043A\u0430",children:"\u2713"}):null]})})]}),detail:s("div",{className:"flex flex-col gap-2 text-xs",children:[e("div",{children:c.name?s(P,{children:["\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ",e("b",{children:c.name}),c.sku?s("span",{className:"font-mono",children:[" \xB7 ",c.sku]}):null,c.url?e("a",{className:"ml-1 underline",href:c.url,target:"_blank",rel:"noreferrer",children:"\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"}):null,c.decided?" \xB7 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0447\u0435\u043B\u043E\u0432\u0435\u043A\u0430":c.via==="article"?" \xB7 \u043F\u043E \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0443":c.via==="model"?" \xB7 \u043F\u043E \u043C\u043E\u0434\u0435\u043B\u0438":" \xB7 \u043F\u043E \u0441\u0435\u043C\u0435\u0439\u0441\u0442\u0432\u0443",c.source?s("span",{className:"text-muted-foreground",children:[" \xB7 ",Be(c.source)]}):null]}):e("span",{className:"text-muted-foreground",children:"\u0412 \u044D\u0442\u043E\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430 \u043D\u0435 \u043D\u0430\u0448\u043B\u043E\u0441\u044C."})}),n&&c.name?s("div",{className:"flex flex-wrap gap-1.5",children:[e(S,{size:"sm",className:"h-7 px-2",disabled:i,onClick:()=>{b(c,1)},children:"\u0422\u043E\u0442 \u0436\u0435 \u0442\u043E\u0432\u0430\u0440"}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:i,onClick:()=>{b(c,.5)},children:"\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E"}),e(S,{size:"sm",variant:"ghost",className:"h-7 px-2 text-destructive",disabled:i,onClick:()=>{b(c,0)},children:"\u041D\u0435 \u0442\u043E"}),c.decided&&c.decision_id?e(S,{size:"sm",variant:"ghost",className:"h-7 px-2",disabled:i,onClick:()=>{g("assortment_decision_revoke",{id:c.decision_id})},children:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439"}):null]}):null,n&&c.alternatives?.length?s("div",{className:"flex flex-col gap-0.5",children:[e("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u044B \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438"}),c.alternatives.map(x=>s("div",{className:"flex items-center gap-2",children:[s("span",{className:"min-w-0 flex-1 truncate",title:x.name,children:[x.name," ",e("span",{className:"font-mono text-muted-foreground",children:x.sku}),x.kit?" \xB7 \u043D\u0430\u0431\u043E\u0440":""]}),e(S,{size:"sm",variant:"outline",className:"h-6 px-2 text-[11px]",disabled:i,onClick:()=>{b(c,1,x)},children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C"})]},`${x.global_id}|${x.sku}|${x.name}`))]}):null]})},h)})})]})]})}function d1({isOpen:t,onToggle:n,cells:a,detail:o}){return s(P,{children:[e("tr",{className:k("cursor-pointer border-b border-[var(--mf-line-200)] hover:bg-state-hover",t&&"bg-state-active"),onClick:n,"aria-expanded":t,children:a}),t?e("tr",{className:"border-b border-[var(--mf-line-300)]",children:e("td",{colSpan:4,className:"bg-[var(--mf-paper)] p-2.5",children:o})}):null]})}var Pr={FJ:"M949.9,341.9L950.7,341.4L951.4,342.3L950.5,344.0L948.8,344.4L947.4,344.0L947.5,342.6L948.8,341.6ZM955.6,339.0L953.7,339.8L951.9,340.4L951.8,339.3L953.3,338.6L954.2,338.4L956,337.5L956,337.5L955.6,339.0ZM4,337.5L4,337.5L4,337.5L4.5,337.3L4.5,338.8L4.3,339.0L4.3,339.0L4,337.5Z",TZ:"M570.7,290.6L571.1,291.0L580.8,297.3L581.0,299.1L584.8,302.1L583.5,306.0L583.6,307.7L585.3,308.9L585.3,309.7L584.6,311.5L584.7,312.5L584.5,314.0L585.4,315.9L586.4,319.0L587.3,319.6L585.1,321.4L582.2,322.6L580.6,322.6L579.6,323.5L577.8,323.6L577.1,324.0L573.9,323.1L571.9,323.4L571.3,319.1L570.4,317.7L569.9,316.8L567.3,316.3L565.8,315.3L564.1,314.8L563.1,314.3L562.0,313.5L560.6,309.6L559.1,307.9L558.6,306.1L558.9,304.5L558.4,301.6L559.5,301.5L560.5,300.3L561.6,298.7L562.2,298.1L562.2,297.1L561.6,296.4L561.5,295.1L562.3,294.8L562.4,292.9L561.4,291.2L562.3,290.8L565.2,290.8Z",EH:"M457.6,201.8L457.6,202.0L457.5,202.6L457.4,207.3L448.9,207.2L448.8,215.1L446.4,215.4L445.7,217.0L446.1,221.5L435.8,221.5L435.2,222.5L435.4,221.2L435.4,221.2L441.3,221.0L441.7,219.8L442.8,218.4L443.8,214.1L447.5,210.8L448.8,206.9L449.6,206.6L450.5,204.2L452.7,203.9L453.6,204.3L454.8,204.3L455.6,203.6L457.2,203.5L457.2,201.8Z",CA:"M190.2,135.9L189.9,135.8L187.0,132.9L186.1,131.6L182.6,130.4L182.9,127.7L184.4,125.9L182.2,124.6L183.4,122.3L182.0,120.1L183.0,118.6L185.2,117.2L186.4,115.4L183.9,113.5L184.0,110.3L184.2,108.2L183.1,106.9L182.5,105.8L182.5,104.3L179.6,105.2L176.2,106.8L175.7,104.9L175.2,103.7L173.7,102.9L171.6,102.8L185.5,87.1L195.1,77.3L198.2,77.9L200.2,79.1L202.1,79.4L204.9,78.3L208.2,77.5L210.9,77.8L215.0,76.6L218.9,76.0L219.3,77.1L221.3,76.5L222.9,75.2L224.0,75.5L225.3,77.9L229.6,76.1L228.1,78.1L231.0,77.6L232.4,76.9L234.7,77.0L236.9,78.1L240.8,79.1L243.3,79.5L245.4,79.4L247.1,80.7L243.1,82.0L246.4,82.6L252.2,82.3L254.3,81.8L255.3,83.4L258.5,82.1L257.3,80.9L259.3,80.0L261.9,79.9L263.7,79.6L264.9,80.3L265.9,81.7L268.3,81.5L271.1,82.7L274.6,82.3L277.6,82.3L278.4,80.7L280.6,80.2L283.1,81.1L281.5,83.6L284.2,81.5L285.8,81.6L288.4,78.9L287.3,77.3L285.7,76.3L287.9,73.4L291.6,71.5L293.9,72.0L295.1,73.1L295.9,76.0L293.2,77.3L296.6,77.8L294.9,80.5L298.9,78.4L300.3,80.1L298.5,82.1L299.4,83.9L302.7,82.0L305.6,79.7L307.4,76.8L310.2,77.0L312.9,77.4L314.9,78.7L314.3,80.0L312.0,81.4L312.6,82.8L311.6,84.1L306.5,86.0L303.4,86.4L301.7,85.6L300.3,87.0L297.0,89.2L295.7,90.4L292.2,92.3L289.1,92.5L286.7,93.6L285.6,95.4L282.9,95.8L278.9,98.0L274.8,101.2L272.7,103.4L270.8,106.7L273.8,107.1L273.3,109.8L273.3,112.0L276.7,111.4L280.2,112.7L281.9,113.8L282.9,115.1L285.4,115.9L287.2,117.2L290.9,117.3L293.2,117.6L291.8,120.1L291.2,123.1L291.5,126.4L293.9,129.2L296.1,128.3L298.5,125.2L299.1,120.6L298.2,119.0L302.4,117.7L305.8,115.6L307.9,113.6L308.5,111.7L308.0,109.2L306.3,107.1L310.2,104.1L310.5,101.6L311.8,97.2L313.6,96.5L316.9,97.3L319.0,97.6L321.2,96.8L322.7,97.8L324.7,99.4L324.9,100.5L328.7,100.7L327.6,103.1L326.9,106.6L328.7,107.1L329.7,108.8L333.5,107.2L336.8,104.1L338.8,102.7L339.5,105.3L341.1,108.9L342.3,112.3L340.8,114.2L343.3,115.8L344.8,117.5L348.2,118.2L349.4,119.1L349.5,121.6L351.2,122.0L351.8,123.1L351.1,126.4L349.1,127.6L347.1,128.6L343.0,129.7L339.4,132.1L335.3,132.6L330.4,132.0L326.9,132.0L324.4,132.2L321.8,134.3L318.4,135.6L313.7,139.6L310.2,142.4L312.3,141.9L317.4,138.0L323.1,135.4L326.7,135.2L328.3,136.6L325.5,138.7L325.4,141.9L325.5,144.2L328.2,145.7L332.3,145.3L335.6,141.9L335.2,144.1L336.5,145.2L333.0,147.2L327.2,149.0L324.5,150.2L321.2,152.4L319.4,152.2L320.0,149.6L324.9,147.1L321.0,147.2L318.2,147.6L317.1,145.8L318.3,141.7L317.5,140.8L315.7,141.3L315.2,140.5L312.7,142.8L311.3,145.2L310.0,146.6L308.8,147.1L308.0,147.2L307.6,148.0L303.1,148.0L299.4,148.0L298.2,148.6L295.0,150.8L294.6,151.0L293.5,152.2L291.2,152.2L288.8,152.2L287.6,152.7L287.8,153.3L287.7,154.2L287.6,154.5L283.9,156.1L281.3,156.5L277.9,158.2L277.3,158.2L276.6,157.7L276.5,157.3L276.6,156.9L277.5,155.9L279.2,154.2L280.5,152.4L280.9,149.7L281.3,146.9L279.3,145.5L279.7,145.0L279.5,144.6L278.9,144.6L278.6,144.1L278.7,143.4L278.1,143.7L277.5,143.6L277.8,143.3L277.3,143.0L277.4,142.2L275.9,141.2L274.3,140.2L272.4,139.0L270.6,138.0L268.2,138.8L267.4,138.8L264.8,138.1L262.7,138.4L260.8,137.5L258.6,137.0L257.0,136.8L256.5,136.3L256.8,134.7L256.0,134.7L255.5,135.9L250.6,135.9L242.5,135.9L234.5,135.9L227.4,135.9L220.3,135.9L213.4,135.9L206.2,135.9L203.9,135.9L196.9,135.9ZM299.3,96.8L301.6,95.5L304.5,95.6L304.2,96.1L300.9,97.6L299.4,97.6ZM323.5,69.3L322.1,68.0L322.8,67.1L323.8,66.9L328.1,67.2L330.6,68.6L330.4,69.2L328.4,69.2L326.3,69.1L323.9,69.5ZM306.7,97.8L308.0,97.0L308.8,97.1L309.1,97.6L307.5,99.1L306.7,98.9L306.5,98.0ZM300.3,63.9L298.6,64.8L295.9,64.7L294.1,64.0L296.0,62.9L299.2,62.3L300.2,63.1ZM304.9,57.8L303.9,57.9L300.6,57.7L300.7,57.1L304.4,57.1L305.3,57.5ZM302.1,54.9L303.5,55.7L302.3,56.5L299.1,57.0L298.1,56.5L298.1,55.6L298.8,54.7L301.1,54.8ZM309.8,65.3L306.9,65.0L302.4,64.2L302.7,62.9L303.4,61.7L302.4,60.6L298.7,60.3L297.1,59.6L298.7,58.6L302.4,58.8L303.9,59.5L307.6,59.5L308.6,60.3L307.4,61.2L309.2,61.8L310.0,62.3L312.5,62.5L315.1,62.7L318.5,62.1L322.5,61.9L325.5,62.1L326.9,63.0L326.7,64.0L325.1,64.7L321.8,65.2L319.6,64.9L313.8,65.3ZM273.9,56.3L276.1,56.7L274.8,57.4L270.6,58.1L268.6,57.3L270.9,56.6ZM276.0,54.8L277.9,55.3L275.2,55.7L272.1,55.7L272.5,55.4L275.2,54.7ZM350.6,128.9L348.8,130.8L346.6,133.4L348.4,132.4L349.8,133.0L348.7,134.1L350.6,134.9L351.9,134.2L354.0,135.1L352.7,137.3L354.5,136.8L354.4,138.4L354.7,140.3L353.1,142.9L352.0,143.1L350.6,142.5L351.7,140.0L351.1,139.6L347.7,142.2L346.3,142.1L348.3,140.7L346.2,140.0L343.6,140.2L339.0,140.1L338.9,139.2L340.7,138.1L339.8,137.3L342.3,135.5L346.0,130.7L347.9,129.0L350.2,128.0L351.3,128.1ZM303.5,89.5L305.3,90.5L307.2,91.3L306.7,92.6L308.4,92.4L309.5,93.3L307.1,94.2L304.2,93.5L303.6,92.3L300.7,93.7L296.9,95.2L297.1,93.5L294.0,93.8L296.6,92.5L298.1,90.3L300.2,87.8L301.6,88.0L301.3,89.2L302.6,88.8ZM324.7,70.4L327.2,69.4L330.8,70.7L332.9,71.9L332.5,73.1L336.5,72.5L337.7,74.1L342.0,75.1L343.3,76.2L344.0,78.6L339.7,79.9L343.7,81.6L346.7,82.2L348.6,84.6L351.8,84.8L350.3,86.7L345.3,89.8L343.2,88.7L341.1,86.1L338.2,86.4L337.3,87.9L338.8,89.5L341.1,90.8L341.7,91.5L341.9,94.2L340.4,96.2L338.0,95.5L333.6,93.3L335.6,95.6L337.1,97.3L337.1,98.3L331.7,97.2L327.8,95.5L325.8,94.2L326.9,93.4L324.4,92.0L321.9,90.7L321.6,91.5L315.2,91.9L313.9,91.0L316.3,89.0L320.3,88.9L324.8,88.6L324.6,87.6L325.9,86.3L329.9,83.7L329.9,82.5L329.6,81.6L327.1,80.3L323.5,79.4L325.1,78.7L323.9,77.1L322.2,77.0L321.1,76.1L319.6,76.8L315.7,77.2L308.7,76.6L304.9,75.8L301.9,75.4L300.9,74.5L303.7,73.3L300.9,73.3L302.0,70.7L305.1,68.5L307.8,67.5L313.3,66.8L310.7,68.4L311.2,70.0L314.4,68.0L320.0,66.9L321.7,69.5L320.4,71.2ZM297.0,66.0L301.0,66.1L304.3,66.7L299.8,68.9L297.1,69.4L293.6,71.3L291.4,71.2L291.8,69.0L292.8,67.7L294.6,66.6ZM247.1,61.1L252.2,59.3L257.7,57.8L260.5,57.8L263.4,57.5L261.3,59.3L259.0,60.1L257.1,60.3L252.5,61.3L249.1,61.6ZM176.5,120.9L178.9,120.6L175.9,124.0L176.4,126.3L175.5,126.3L174.9,125.0L175.0,123.6L174.4,122.7L174.9,121.4L175.7,120.5ZM287.3,53.7L290.5,54.0L294.7,54.8L295.0,55.9L294.8,56.9L292.0,56.6L289.7,55.9L285.7,55.8L288.1,55.1L286.5,54.6ZM187.8,137.3L186.3,137.7L183.2,136.4L183.1,135.3L181.6,134.3L181.7,133.4L179.6,132.9L179.7,131.2L180.3,130.5L182.4,131.2L183.5,131.6L185.5,132.0L185.7,133.0L186.1,134.4L187.7,135.7ZM245.5,65.2L247.7,65.7L252.5,65.8L253.7,66.6L254.9,67.6L251.8,68.2L245.4,70.0L241.4,71.8L240.4,72.9L234.0,74.2L234.0,73.0L230.6,71.7L232.5,70.6L235.6,68.8L238.9,67.1L238.5,65.6ZM275.0,61.8L277.0,61.4L278.9,61.5L278.2,62.7L276.0,63.8L269.2,64.2L263.4,65.3L260.4,65.3L260.9,64.5L265.9,63.4L256.9,63.7L254.7,63.3L259.6,60.9L262.1,60.3L266.6,61.1L268.6,62.5L271.8,62.7L271.2,60.4L273.8,59.5L275.5,59.8L275.0,60.9ZM271.5,68.6L272.9,69.6L272.2,72.1L271.4,73.9L273.8,75.2L276.5,76.4L275.5,77.6L272.0,77.8L272.6,78.8L271.2,79.8L267.8,79.4L264.8,78.6L262.3,78.8L257.8,79.7L252.4,80.1L248.5,80.3L248.4,79.1L246.2,78.4L244.2,78.7L243.4,76.6L245.0,76.3L248.5,75.9L251.2,76.0L254.2,75.5L250.8,74.9L246.4,75.1L243.6,75.1L243.3,74.1L248.8,73.1L245.7,73.2L242.9,72.5L246.2,70.6L248.5,69.6L255.1,68.0L256.7,68.5L254.7,69.7L259.7,68.9L261.3,70.2L264.7,68.9L265.8,69.7L265.3,72.2L267.2,71.2L267.9,68.6L269.9,68.2ZM282.7,69.6L281.9,67.9L285.1,66.7L287.0,67.2L290.7,66.9L290.7,67.6L288.0,68.8L290.1,69.9L288.1,72.2L284.1,73.2L282.4,73.0L281.7,72.0L278.3,70.0L279.0,69.2ZM272.5,67.3L275.2,67.2L276.2,67.8L273.1,69.4L271.5,67.7ZM294.5,59.7L295.0,60.8L294.0,62.0L291.6,63.8L288.3,64.1L286.5,63.7L287.8,62.3L284.5,62.5L286.0,60.6L288.0,60.7L291.5,59.9L294.1,60.0ZM307.5,50.9L309.5,50.2L311.5,50.1L311.2,49.6L315.5,49.5L316.6,50.6L319.1,51.1L321.7,51.5L321.7,52.9L323.3,53.6L320.2,54.3L315.3,56.0L311.9,56.2L308.3,55.9L307.2,55.0L308.0,54.1L310.0,53.5L306.6,53.6L305.4,52.8L305.2,51.8ZM318.4,48.2L321.5,47.8L323.6,47.7L327.5,47.4L330.9,46.7L332.9,46.8L334.2,47.3L336.7,46.3L339.4,46.0L342.7,45.8L348.1,45.7L348.8,45.9L354.1,45.6L357.8,45.7L361.4,45.8L365.9,46.0L369.4,46.2L372.1,46.7L371.6,47.3L366.6,48.1L361.9,48.5L360.0,49.0L363.8,49.0L358.6,50.2L355.2,50.8L350.8,52.6L346.7,53.0L345.2,53.4L339.5,53.7L341.8,54L340.2,54.3L340.9,55.5L338.6,56.3L335.3,56.9L333.7,57.8L330.6,58.5L330.5,59.1L333.7,59.0L333.4,59.5L327.4,61.0L322.9,60.3L317.1,60.7L314.5,60.4L311.0,60.3L311.6,59.1L315.5,58.6L316.0,56.9L317.3,56.7L321.4,57.7L320.1,56.3L317.5,55.8L319.7,54.9L323.4,54.4L324.6,53.6L322.8,52.8L323.1,51.6L327.9,51.7L329.2,52.0L332.7,51.2L328.9,50.9L322.5,51.1L320.0,50.3L319.4,49.5L318.0,48.9ZM324.8,83.2L323.1,84.0L320.7,84.2L320.9,82.9L322.5,81.4L324.6,81.0L325.8,81.7L325.3,82.9ZM285.1,77.8L285.6,78.8L283.7,79.8L281.5,79.0L279.7,79.2L277.7,78.1L280.1,77.3L282.3,76.1L283.9,76.9L284.8,77.3ZM328.5,133.2L329.4,133.0L332.3,133.7L334.3,135.0L334.2,135.5L333.1,135.6L330.3,134.6ZM327.3,141.8L327.7,143.3L329.3,143.7L331.6,143.6L330.1,144.8L329.1,145.0L326.4,143.7L326.1,142.7Z",US:"M190.2,135.9L196.9,135.9L203.9,135.9L206.2,135.9L213.4,135.9L220.3,135.9L227.4,135.9L234.5,135.9L242.5,135.9L250.6,135.9L255.5,135.9L256.0,134.7L256.8,134.7L256.5,136.3L257.0,136.8L258.6,137.0L260.8,137.5L262.7,138.4L264.8,138.1L267.4,138.8L268.2,138.8L270.6,138.0L272.4,139.0L274.3,140.2L275.9,141.2L277.4,142.2L277.3,143.0L277.8,143.3L277.5,143.6L278.1,143.7L278.7,143.4L278.6,144.1L278.9,144.6L279.5,144.6L279.7,145.0L279.3,145.5L281.3,146.9L280.9,149.7L280.5,152.4L279.2,154.2L277.5,155.9L276.6,156.9L276.5,157.3L276.6,157.7L277.3,158.2L277.9,158.2L281.3,156.5L283.9,156.1L287.6,154.5L287.7,154.2L287.8,153.3L287.6,152.7L288.8,152.2L291.2,152.2L293.5,152.2L294.6,151.0L295.0,150.8L298.2,148.6L299.4,148.0L303.1,148.0L307.6,148.0L308.0,147.2L308.8,147.1L310.0,146.6L311.3,145.2L312.7,142.8L315.2,140.5L315.7,141.3L317.5,140.8L318.3,141.7L317.1,145.8L318.2,147.6L318.3,148.6L315.4,150.1L312.6,151.1L309.8,152.0L308.0,153.8L307.4,154.5L306.9,156.2L307.3,157.8L308.3,157.9L308.3,156.7L308.9,157.4L308.5,158.3L306.7,158.8L305.5,158.8L303.6,159.3L302.5,159.4L301.0,159.6L298.7,160.5L302.5,159.9L303.0,160.5L299.4,161.4L297.8,161.4L298.0,161.0L297.0,161.9L297.7,162.0L296.6,164.3L294.2,166.6L294.2,165.9L293.7,165.7L293.1,164.9L293.1,166.6L293.6,167.1L293.4,168.3L292.3,169.5L290.2,172.0L290.1,171.9L291.3,169.8L290.4,168.6L290.7,166.0L289.9,167.3L289.9,169.3L288.4,168.8L289.9,169.8L289.3,172.8L289.9,173.0L289.9,174.1L289.6,177.2L287.4,179.5L284.6,180.4L282.5,182.2L281.2,182.4L279.7,183.6L279.1,184.6L275.9,186.6L274.1,188.1L272.5,190.0L271.6,192.2L271.6,194.4L271.9,197.0L272.7,199.2L272.4,200.6L273.0,204.2L272.5,206.3L272.2,207.5L271.2,209.4L270.4,209.8L269.2,209.4L269.0,208.1L268.2,207.4L267.2,204.7L266.5,202.3L266.3,201.1L267.3,199.0L266.9,197.3L265.4,194.7L264.5,194.2L261.6,195.6L261.2,195.4L260.3,194.0L258.9,193.2L255.9,193.6L253.7,193.3L251.7,193.5L250.5,194.0L250.8,194.8L250.5,196.1L250.9,196.7L250.3,197.1L249.4,196.6L248.3,197.2L246.5,197.1L245.0,195.5L242.6,195.9L240.9,195.1L239.3,195.4L237.0,196.1L234.1,198.4L231.2,199.8L229.5,201.2L228.6,202.6L228.1,204.8L227.9,206.3L228.1,207.4L227.1,207.4L225.4,206.8L223.6,205.8L223.2,204.3L223.1,202.1L222.0,200.4L221.6,198.5L220.8,196.4L219.3,195.2L217.2,195.2L214.9,197.7L213.1,196.7L212.0,195.8L211.8,194.1L211.4,192.5L210.2,191.1L209.2,190.1L208.6,189.0L204.2,189.0L203.8,190.3L201.8,190.3L196.7,190.3L191.5,188.1L188.1,186.6L188.6,186.0L185.2,186.3L182.3,186.6L182.4,185.0L181.3,183.2L180.3,182.8L180.3,181.9L178.9,181.8L178.3,180.9L176.1,180.6L175.6,180.1L175.9,178.4L174.6,175.3L174.2,171.0L174.6,170.2L173.9,169.2L173.1,166.6L173.8,164.1L173.2,162.4L174.9,159.8L176.0,157.2L176.3,154.8L178.7,151.9L180.3,149.2L182.0,146.4L183.7,142.3L184.4,139.7L184.4,138.3L185.0,137.7L187.9,138.7L187.7,141.6L188.7,140.8L189.6,138.3ZM71.8,225.4L72.2,225.7L72.6,226.1L73.0,227.2L72.9,227.3L71.7,228.0L70.7,228.5L70.2,229.0L69.6,228.6L69.9,227.7L69.8,226.6L70.0,226.2L70.6,225.7L70.6,225.1L70.8,224.8L71.0,224.9ZM70.8,223.3L70.5,223.6L69.6,223.9L69.3,223.2L69.1,222.9L69.1,222.7L69.4,222.5L70.3,222.8ZM69.2,222.0L69.0,222.3L67.6,222.2L67.9,221.8ZM66.3,220.3L66.5,220.5L67.0,221.5L66.8,221.7L66.6,221.7L65.7,221.5L65.6,220.8L65.5,220.7ZM63.3,218.7L63.1,219.5L62.7,219.8L62.0,219.2L62.2,219.0L62.7,218.7ZM116.1,102.6L117.6,102.9L116.8,103.9L115.0,104.4L114.1,103.9L113.5,103.1ZM139.0,109.5L140.3,109.7L140.5,110.5L137.4,111.9L134.2,113.0L133.7,112.3L134.5,110.9L137.4,109.9ZM195.1,77.3L185.5,87.1L171.6,102.8L173.7,102.9L175.2,103.7L175.7,104.9L176.2,106.8L179.6,105.2L182.5,104.3L182.5,105.8L183.1,106.9L184.2,108.2L184.0,110.3L183.9,113.5L186.4,115.4L185.2,117.2L183.0,118.6L182.5,117.5L181.1,116.6L182.3,114.1L181.1,111.7L181.9,109.0L179.9,108.8L176.5,108.8L174.5,107.9L172.3,105.0L170.6,104.5L167.6,103.4L164.4,103.7L161.2,102.4L159.7,101.2L156.7,101.8L155.5,103.7L154.1,103.9L151.0,104.5L148.3,105.5L145.3,106.1L146.4,104.4L149.9,101.6L153.0,100.8L153.1,100.1L148.9,101.6L145.7,103.5L140.7,105.5L141.1,106.9L137.2,109.0L133.8,110.2L130.8,111.0L129.1,112.3L124.3,113.8L122.4,115.2L118.7,116.4L117.4,116.2L114.6,117.0L111.4,118.0L108.7,119.0L104.1,119.8L104.1,119.3L107.8,117.9L110.8,117.0L114.6,115.4L117.7,115.1L119.8,113.9L124.4,112.2L125.4,111.6L128.0,110.6L130.3,108.4L132.9,106.8L129.6,107.6L129.3,107.1L127.2,108.2L127.1,106.7L125.5,107.7L126.0,106.3L122.7,107.5L121.4,107.5L122.8,105.8L124.2,104.7L123.7,103.7L120.3,104.3L119.8,102.9L118.9,102.3L120.5,100.7L120.0,99.5L122.5,97.9L125.8,96.3L128.0,94.9L130.0,94.7L131.0,95.1L134.1,93.8L135.4,94.0L137.9,93.2L138.8,91.9L138.1,91.5L140.8,90.4L139.4,90.4L136.6,91.0L135.3,91.6L134.3,91.0L130.9,91.3L128.5,90.7L128.8,89.6L127.9,88.0L132.1,86.9L138.2,85.6L139.9,85.6L138.2,86.9L142.7,86.8L142.8,85.1L141.4,84.1L141.4,82.8L140.7,81.6L138.9,80.8L141.6,79.4L145.3,79.3L149.2,78.1L151.2,76.9L154.7,75.6L157.0,75.3L162.1,74.2L163.8,74.4L168.4,73.0L170.8,73.5L171.0,74.7L172.4,74.2L175.6,74.3L174.8,74.9L177.4,75.4L179.7,75.1L183.1,75.9L186.7,76.2L187.9,76.5L191.0,76.1L193.3,76.9ZM114.6,93.1L115.4,93.7L117.0,93.4L117.9,94.1L119.7,94.5L119.2,94.8L116.9,95.4L115.9,94.8L115.7,94.3L113.6,94.4L113.4,94.2Z",KZ:"M685.8,135.2L684.8,137.2L682.9,137.5L683.9,140.5L683.1,141.9L678.0,140.9L678.2,146.3L677.2,147.0L672.8,148.2L676.7,153.6L675.3,154.4L676.0,156.1L674.4,155.7L672.8,154.6L669.1,154.2L665.0,154.2L664.3,154.5L660.4,153.2L659.2,153.8L659.3,155.7L655.0,154.6L653.5,155.0L653.4,156.4L652.1,156.9L649.4,159.1L648.9,161.3L648.0,161.3L647.0,159.9L643.8,159.8L642.7,157.2L641.5,157.2L640.9,154.1L637.4,151.9L633.3,152.1L630.6,152.6L627.6,149.8L625.4,148.6L621.1,146.5L620.6,146.2L614.8,148.0L617.3,159.3L616.1,159.5L613.9,157.1L612.1,156.2L609.4,156.8L608.5,157.9L608.3,157.1L608.6,155.8L607.9,154.8L604.9,153.7L603.3,151.0L601.8,150.2L601.5,149.2L603.9,149.5L603.5,147.2L605.5,146.7L607.7,147.2L607.4,144.2L606.6,142.3L604.2,142.5L602.0,141.8L599.6,143.1L597.5,143.7L596.1,143.2L596.1,141.7L594.1,139.6L592.4,139.7L589.9,137.7L590.8,135.4L590.0,134.8L591.2,131.5L594.0,133.2L593.8,131.0L597.8,127.8L601.4,127.7L607.1,129.8L610.1,131.0L612.3,129.7L616,129.7L619.4,131.2L619.8,130.3L623.1,130.5L623.3,129.0L618.9,127.0L620.7,125.6L620.0,124.7L622.0,124.0L619.7,122.0L620.5,121.0L628.7,119.9L629.5,119.2L634.9,118.1L636.5,116.9L640.8,117.6L642.6,120.6L644.7,119.9L648.0,120.9L648.5,122.5L650.6,122.3L655.2,119.5L654.8,120.5L658.6,122.7L666.7,130.3L667.3,128.7L671.2,130.4L674.2,129.7L675.8,130.2L677.6,131.9L679.4,132.5L680.9,133.8L683.8,133.4Z",UZ:"M617.3,159.3L614.8,148.0L620.6,146.2L621.1,146.5L625.4,148.6L627.6,149.8L630.6,152.6L633.3,152.1L637.4,151.9L640.9,154.1L641.5,157.2L642.7,157.2L643.8,159.8L647.0,159.9L648.0,161.3L648.9,161.3L649.4,159.1L652.1,156.9L653.4,156.4L654.2,156.7L652.6,158.7L654.7,159.8L656.3,159.1L659.6,160.7L657.1,162.9L655.1,162.6L654.1,162.7L653.5,161.8L653.7,160.4L650.6,161.1L650.3,163.1L649.5,164.8L647.4,164.7L647.1,166.0L649.1,166.8L650.1,169.1L649.4,172.2L647.4,171.6L646.0,171.5L645.7,169.6L642.1,168.3L639.1,166.8L637.2,165.3L633.9,163.2L632.0,160.0L631.1,159.5L628.4,159.6L627.4,159.0L626.5,156.5L622.9,154.9L621.2,156.7L619.4,157.7L620.1,159.3Z",PG:"M857.2,295.7L861.8,297.9L866.7,299.6L868.4,301.2L869.8,302.8L870.2,304.6L874.5,306.5L875.0,308.2L872.5,308.5L872.9,310.5L875.1,312.6L876.5,315.9L878.1,315.8L877.8,317.1L879.8,317.7L878.9,318.3L881.6,319.6L881.2,320.5L879.4,320.7L878.9,319.9L876.6,319.5L874.0,319.1L872.1,317.1L870.8,315.4L869.7,312.7L866.3,311.3L864.0,312.2L862.3,313.2L862.4,315.5L860.2,316.6L858.7,316.0L856.0,315.9L856.8,305.8ZM888.3,299.0L889.2,300.0L889.5,301.6L888.6,302.4L888.2,300.6L887.6,299.4L886.4,298.4L885.0,297.1L883.1,296.2L883.8,295.4L885.3,296.3L886.1,297.0L887.2,297.7ZM884.3,305.8L882.8,306.5L881.3,307.2L879.9,307.2L877.8,306.3L876.3,305.5L876.6,304.5L879.0,305.0L880.5,304.7L881.0,303.2L881.4,303.2L881.5,304.8L883.0,304.6L883.9,303.5L885.4,302.4L885.2,300.6L886.8,300.5L887.3,301.0L887.2,302.7L886.2,304.6L884.8,304.9ZM893.6,304.2L894.4,304.9L895.6,306.9L896.7,307.9L896.3,308.8L895.5,309.1L894.5,307.9L893.4,305.9L893.0,303.6L893.4,303.3Z",ID:"M857.2,295.7L856.8,305.8L856.0,315.9L853.9,313.4L851.2,312.7L850.5,313.6L847.1,313.7L848.4,311.2L850.2,310.3L849.8,307.0L848.6,304.4L843.6,301.8L841.4,301.5L837.5,298.6L836.7,300.1L835.6,300.4L835.1,299.3L835.1,297.9L833.1,296.4L836.0,295.3L837.9,295.3L837.7,294.5L833.8,294.5L832.8,292.7L830.4,292.1L829.3,290.6L832.9,289.8L834.3,288.8L838.6,290.1L839.0,291.2L839.6,296.2L842.3,298.1L844.7,294.8L847.8,292.9L850.2,292.9L852.4,294.0L854.4,295.1ZM813.2,315.2L813.4,315.8L813.4,316.8L811.4,319.1L809.1,319.8L808.8,319.4L809.1,318.3L810.5,316.4ZM838.4,309.0L838.3,306.7L838.8,305.6L839.5,304.5L840.0,305.4L839.9,306.9ZM795.2,274.9L793.8,277.7L795.8,280.6L795.4,282.0L798.4,284.9L795.3,285.2L794.4,287.4L794.5,290.2L791.9,292.3L791.8,295.4L790.6,300.1L790.3,299.0L787.2,300.4L786.2,298.5L784.3,298.3L783.0,297.3L779.7,298.4L778.8,296.9L777.1,297.1L774.9,296.8L774.5,292.6L773.2,291.7L771.9,289.1L771.6,286.4L771.9,283.5L773.4,281.5L773.9,283.5L775.7,285.3L777.5,284.6L779.2,284.9L780.7,283.3L782.0,283.0L784.5,283.9L786.7,283.2L788.0,278.9L789.0,277.9L789.8,274.3L792.9,274.3ZM826.1,296.3L829.0,297.2L829.9,299.6L827.7,298.3L825.5,298.1L824.0,298.3L822.1,298.2L822.8,296.5ZM819.3,299.4L817.5,298.8L817.0,297.5L819.7,297.4L820.4,298.4ZM822.3,280.9L822.5,282.6L824.1,282.9L824.4,284.2L824.3,286.9L822.9,286.6L822.5,288.4L823.6,290.1L822.8,290.5L821.7,288.5L820.9,284.5L821.4,282.1ZM809.0,285.0L812.0,284.8L814.7,282.6L815.1,283.3L813.0,286.3L811.0,286.9L808.4,286.3L804.0,286.5L801.6,286.9L801.3,289.3L803.6,292.0L805.1,290.6L810.1,289.6L809.9,291.0L808.7,290.6L807.5,292.4L805.1,293.6L807.6,297.5L807.0,298.6L809.3,302.2L809.2,304.2L807.7,305.1L806.7,304.0L808.1,301.5L805.4,302.7L804.8,301.8L805.2,300.6L803.4,298.8L803.6,295.8L801.8,296.7L801.9,300.4L801.8,304.8L800.1,305.2L799.0,304.3L799.9,301.5L799.6,298.5L798.5,298.5L797.7,296.3L798.9,294.3L799.3,291.9L800.7,287.2L801.2,285.9L803.5,283.6L805.6,284.5ZM800.4,319.4L797.0,317.3L799.6,316.7L800.9,317.6L801.7,318.6L801.5,319.4ZM803.6,314.1L805.4,313.9L807.9,312.7L807.4,314.5L803.3,315.3L799.8,315.0L799.9,313.8L802.0,313.2ZM795.5,313.6L797.1,313.3L797.7,314.6L794.6,315.3L792.7,315.7L791.2,315.6L792.3,313.9L793.8,313.8L794.6,312.7ZM769.8,307.6L770.1,308.7L775.2,309.0L775.8,307.7L780.7,309.2L781.5,311.2L785.5,311.8L788.6,313.6L785.5,314.8L782.7,313.5L780.3,313.6L777.5,313.4L775.0,312.8L772.0,311.6L770.1,311.3L769.0,311.7L764.2,310.5L763.8,309.1L761.4,308.9L763.4,305.9L766.6,306.1L768.7,307.3ZM759.3,291.0L759.7,293.2L760.6,294.9L762.6,295.2L763.8,297.1L763.0,301.0L762.7,305.8L759.8,305.9L757.6,303.3L754.3,300.7L753.2,298.9L751.3,296.3L750.0,294.0L748.0,289.7L745.6,287.1L744.8,284.4L743.8,282.0L741.4,280.1L739.9,277.4L737.9,275.7L735.0,272.3L734.7,270.7L736.4,270.8L740.5,271.4L743.0,274.5L745.2,276.6L746.7,277.8L749.3,281.2L752.0,281.2L754.3,283.3L755.8,285.9L757.9,287.3L756.8,289.9L758.3,290.9Z",AR:"M321.6,450.3L322.9,451.7L324.8,453.9L328.4,455.7L331.9,456.4L331.3,457.9L329.2,458.0L327.7,457.0L326.3,456.9L323.9,456.9ZM332.4,381.5L332.1,384.0L331.9,387.2L332.5,390.3L332.0,391.0L332.2,393.1L332.3,394.7L335.9,397.3L336.0,399.5L337.8,400.8L337.9,402.4L336.3,406.3L332.9,408.0L328.0,408.7L325.3,408.3L326.2,410.2L326.2,412.5L327.0,414.1L325.7,415.2L323.3,415.6L320.7,414.5L319.9,415.3L321.0,418.3L322.9,419.3L324.0,418.3L325.1,419.9L323.1,420.8L321.6,422.7L322.0,425.8L321.9,427.5L319.6,427.5L318.2,429.0L318.1,431.3L321.1,433.5L323.6,434.2L323.5,436.9L321.2,438.6L320.8,442.1L319.0,443.3L318.5,444.7L320.3,447.8L322.4,449.5L321.4,449.3L319.1,448.9L313.3,448.5L311.8,446.8L311.1,444.5L309.6,444.7L308.4,443.6L307.1,440.4L308.5,439.1L308.6,437.2L307.8,435.7L308.3,433.1L307.9,429.1L307.2,427.3L308.0,426.7L307.5,425.5L306.2,424.9L306.6,423.6L305.2,422.5L303.6,418.9L304.4,418.3L303.0,414.5L302.8,411.4L302.8,408.6L304.0,407.5L302.6,404.5L301.9,401.6L303.3,399.6L302.7,397.0L303.5,393.9L303.0,391.1L302.2,390.5L300.0,385.1L301.0,381.9L300.2,378.9L300.7,376.1L301.9,373.1L303.4,371.2L302.4,370.0L302.8,369.0L302.0,363.8L304.6,362.2L305.1,359.0L304.7,358.2L306.5,355.4L310.0,356.2L311.8,358.4L312.6,355.9L315.6,356.0L316.1,356.7L321.5,361.8L323.6,362.3L327.1,364.6L329.9,365.8L330.5,367.2L328.5,371.9L331.2,372.7L334.2,373.2L336.2,372.7L338.2,370.3L338.3,367.6L339.5,367.0L341.0,368.8L341.3,371.3L339.3,373.0L337.7,374.3L335.2,377.3Z",CL:"M321.6,450.3L323.9,456.9L326.3,456.9L327.7,457.0L327.4,458.2L325.8,459.1L324.6,459.0L323.2,458.7L321.2,457.9L318.7,457.4L315.2,455.8L312.3,454.2L307.9,450.9L310.0,451.6L314.0,453.5L317.4,454.6L318.1,453.2L318.1,451.2L319.8,450.0ZM296.4,342.2L297.9,344.3L298.5,346.5L300.0,347.9L299.5,350.9L301.3,354.4L302.9,358.6L304.7,358.2L305.1,359.0L304.6,362.2L302.0,363.8L302.8,369.0L302.4,370.0L303.4,371.2L301.9,373.1L300.7,376.1L300.2,378.9L301.0,381.9L300.0,385.1L302.2,390.5L303.0,391.1L303.5,393.9L302.7,397.0L303.3,399.6L301.9,401.6L302.6,404.5L304.0,407.5L302.8,408.6L302.8,411.4L303.0,414.5L304.4,418.3L303.6,418.9L305.2,422.5L306.6,423.6L306.2,424.9L307.5,425.5L308.0,426.7L307.2,427.3L307.9,429.1L308.3,433.1L307.8,435.7L308.6,437.2L308.5,439.1L307.1,440.4L308.4,443.6L309.6,444.7L311.1,444.5L311.8,446.8L313.3,448.5L319.1,448.9L321.4,449.3L319.3,449.3L318.5,450.1L316.8,451.1L317.4,453.9L316.4,453.9L313.5,453.0L310.1,450.9L306.6,449.2L305.2,447.4L305.2,445.6L303.3,443.6L301.3,438.5L301.3,435.6L303.1,433.3L299.1,432.4L300.6,429.7L299.9,424.6L302.9,425.7L302.3,419.3L300.5,418.5L300.8,422.3L299.1,421.9L298.7,417.5L298.0,411.8L298.6,409.7L297.1,406.7L296.1,403.2L297.1,403.1L297.5,398.0L298.2,393.1L298.3,388.4L296.8,383.7L297.1,381.2L296.1,377.3L297.0,373.5L296.5,367.5L296.5,361.0L296.4,354.0L295.6,348.9L294.6,344.6L295.8,343.8Z",CD:"M558.4,301.6L558.9,304.5L558.6,306.1L559.1,307.9L560.6,309.6L562.0,313.5L560.9,313.2L557.3,313.7L556.6,314.1L555.8,316.1L556.4,317.4L555.8,321.1L555.4,324.2L556.1,324.8L557.9,326.0L558.7,325.4L558.8,328.8L556.8,328.7L555.7,327.0L554.8,325.7L552.8,325.3L552.2,323.6L550.6,324.6L548.4,324.2L547.6,322.8L545.9,322.5L544.6,322.6L544.5,321.6L543.6,321.5L542.4,321.3L540.7,321.8L539.6,321.7L538.9,322.0L539.1,318.3L538.3,317.2L538.1,315.3L538.5,313.4L538.0,312.2L538.0,310.3L534.7,310.3L535.0,309.2L533.6,309.2L533.5,309.7L531.8,309.8L531.1,311.6L530.7,312.4L529.2,312.0L528.3,312.4L526.6,312.7L525.6,311.0L525.0,310.0L524.2,308.2L523.6,305.9L515.7,305.8L514.8,306.2L514.0,306.1L512.9,306.6L512.5,305.6L513.2,305.3L513.3,303.9L513.7,303.1L514.7,302.5L515.4,302.8L516.3,301.6L517.8,301.6L517.9,302.5L518.9,303.1L520.5,301.1L522.1,299.6L522.8,298.6L522.7,296.1L523.9,293.1L525.1,291.5L526.9,290.0L527.2,289.0L527.2,287.9L527.7,286.8L527.5,285.0L527.8,282.3L528.4,280.3L529.2,278.7L529.3,276.8L529.5,274.7L530.6,273.1L532.0,272.1L534.2,273.1L535.9,274.3L537.9,274.6L539.9,275.2L540.7,273.3L541.0,273.1L542.2,273.4L545.2,271.9L546.3,272.5L547.1,272.4L547.5,271.7L548.5,271.4L550.5,271.7L552.3,271.8L553.1,271.5L554.8,274.0L556.0,274.4L556.7,273.9L557.9,274.1L559.4,273.4L560.1,274.7L562.4,276.8L562.3,280.4L563.4,280.8L562.5,281.9L561.5,282.8L560.5,284.4L559.9,285.8L559.8,288.3L559.1,289.5L559.1,291.8L558.3,292.7L558.2,294.5L557.9,294.8L557.6,296.5L558.3,297.9Z",SO:"M591.2,292.9L589.7,290.3L589.6,279.0L591.9,275.5L592.6,274.6L594.3,274.5L596.7,272.3L600.2,272.2L607.5,262.9L609.3,260.3L610.4,258.4L610.3,256.8L610.2,253.6L610.2,252.4L610.2,252.3L611.0,252.3L612.2,251.8L613.6,251.5L614.8,250.4L615.8,250.4L615.9,251.3L615.8,253.1L615.9,254.7L615.3,255.8L614.7,259.2L613.6,262.6L612.0,266.6L609.8,271.1L607.6,274.6L604.5,278.8L601.9,281.3L597.9,284.4L595.4,286.8L592.5,290.5L591.9,292.1ZM610.2,252.3L610.2,252.4L610.2,253.6L610.3,256.8L610.4,258.4L609.3,260.3L607.5,262.9L605.2,262.9L596.4,259.2L595.3,258.1L594.3,256.6L593.3,254.9L593.8,253.8L594.7,252.2L595.6,252.7L596.2,254.0L597.4,255.3L598.8,255.3L601.2,254.5L604.1,254.2L606.4,253.2L607.7,253.0L608.7,252.4Z",KE:"M584.8,302.1L581.0,299.1L580.8,297.3L571.1,291.0L570.7,290.6L570.7,287.3L571.4,286.1L572.8,284.0L573.7,281.8L572.5,278.2L572.2,276.7L570.9,274.5L572.5,272.7L574.3,270.6L575.7,271.1L575.7,272.9L576.6,273.9L578.5,273.9L581.9,276.5L582.8,276.6L583.4,276.5L584.0,276.8L585.8,277.1L586.6,275.8L589.0,274.5L590.1,275.5L591.9,275.5L589.6,279.0L589.7,290.3L591.2,292.9L589.4,294.1L588.7,295.4L587.7,295.6L587.3,297.8L586.4,299.1L585.9,301.1Z",SD:"M545.5,262.2L543.4,260.8L542.5,259.9L542.3,259.0L542.7,257.7L542.7,256.4L541.1,254.5L540.8,253.1L540.8,252.4L539.8,251.5L539.8,249.7L539.2,248.5L538.2,248.7L538.5,247.5L539.1,246.2L538.8,244.9L539.7,244.0L539.1,243.3L539.7,241.4L540.9,239.1L543.2,239.3L542.6,226.9L542.6,225.6L545.6,225.6L545.3,219.4L555.9,219.4L566.0,219.4L576.4,219.4L577.4,222.5L576.9,223.0L577.5,226.2L578.7,229.9L579.7,230.7L581.2,231.9L580.0,233.6L578.1,234.1L577.3,235.1L577.1,237.2L576.2,241.7L576.5,243.0L576.2,245.6L575.2,248.7L573.7,250.2L572.6,252.6L572.4,253.9L571.2,254.7L570.5,258.0L570.6,260.8L570.5,258.4L570.1,258.3L570.1,256.8L569.8,255.7L568.4,254.5L568.0,252.2L568.2,249.9L567.0,249.7L566.8,250.4L565.2,250.6L565.9,251.5L566.2,253.3L564.8,255.0L563.5,257.3L562.1,257.6L559.8,255.8L558.9,256.4L558.6,257.3L557.2,257.9L557.2,258.6L554.5,258.6L554.1,257.9L552.2,257.8L551.3,258.3L550.5,258.1L549.1,256.3L548.6,255.4L546.7,255.8L546.0,257.3L545.4,260.1L544.5,260.6L543.7,261.0Z",TD:"M542.6,226.9L543.2,239.3L540.9,239.1L539.7,241.4L539.1,243.3L539.7,244.0L538.8,244.9L539.1,246.2L538.5,247.5L538.2,248.7L539.2,248.5L539.8,249.7L539.8,251.5L540.8,252.4L540.8,253.1L539.1,253.7L537.8,254.9L535.9,258.3L533.4,259.8L530.9,259.6L530.1,259.8L530.4,260.9L529.0,262.0L527.9,263.2L524.5,264.4L523.9,263.7L523.4,263.7L522.9,264.5L520.7,264.7L521.2,263.8L520.3,261.7L519.9,260.4L518.7,259.9L517.1,258.1L517.7,256.6L518.9,256.9L519.7,256.7L521.2,256.8L519.7,253.9L519.7,251.9L519.5,249.8L518.5,247.8L518.7,246.4L517.0,246.3L517.0,244.3L515.8,243.1L516.9,239.1L520.2,236.1L520.3,232.1L521.2,225.8L521.7,224.4L520.6,223.4L520.5,222.4L519.5,221.6L518.7,216.7L521.3,215.0L531.9,221.0Z",HT:"M291.5,226.5L291.5,228.2L291.2,229.4L290.5,229.9L291.1,230.9L290.9,231.7L289.2,231.2L288.0,231.4L286.4,231.2L285.1,231.8L283.8,230.8L284.1,229.8L286.5,230.2L288.5,230.5L289.5,229.8L288.4,228.4L288.6,227.2L287.0,226.8L287.7,225.9L289.3,226.0Z",DO:"M290.9,231.7L291.1,230.9L290.5,229.9L291.2,229.4L291.5,228.2L291.5,226.5L291.9,226.0L293.9,226.0L295.4,226.8L296.1,226.7L296.5,227.8L297.9,227.8L297.7,228.7L298.9,228.8L300.0,230.0L298.9,231.2L297.8,230.5L296.5,230.7L295.7,230.5L295.1,231.1L294.1,231.3L293.8,230.5L292.9,231.0L291.6,233.1L291.0,232.6Z",RU:"M647.4,50.0L650.7,49.5L655.4,50.6L661.8,52.7L663.4,54.7L659.7,54.9L654.0,54.3L650.1,53.4L647.2,51.9L644.3,51.4ZM667.8,53.8L673.8,55.0L674.2,56.0L664.6,56.9L665.1,53.9L666.3,53.6ZM743.0,61.1L748.2,61.2L756.6,62.5L757.3,64.3L750.1,64.2L747.6,64.8L742.0,63.2L741.1,61.5ZM763.2,63.0L768.8,63.6L767.8,64.6L764.5,64.4L759.7,63.4L759.2,62.6ZM752.8,67.9L753.5,66.9L755.7,66.7L759.5,67.6L760.5,68.3L757.6,68.3L753.3,68.0ZM560.5,50.9L563.8,50.5L566.5,50.5L567.2,51.1L567.9,50.6L569.4,50.2L572.4,50.7L571.9,51.0L569.6,51.3L568.1,51.4L568.0,51.8L566.1,52.2L563.9,51.6L564.5,51.0ZM531.8,120.0L527.6,120.1L524.8,119.7L525.2,118.4L528.2,117.5L530.6,118.0L531.7,118.5L531.6,119.3ZM583.9,66.9L587.6,64.8L586.6,63.6L590.2,62.3L595.7,60.8L601.8,60.4L604.5,59.5L608.0,59.2L609.8,60.1L609.0,60.8L603.0,62.0L597.8,63.2L592.9,65.5L591.2,68.0L589.1,70.4L590.4,72.5L595.1,74.6L594.0,74.9L587.3,74.5L586.4,73.4L582.5,72.7L581.7,71.3L583.5,70.8L582.9,69.4L585.8,67.2ZM807.5,121.8L810.3,124.7L812.3,127.6L815.3,130.6L821.2,135.9L817.1,134.9L818.4,139.3L822.7,142.4L823.9,144.5L821.0,142.7L820.8,145.0L818.9,142.5L817.3,139.5L815.0,136.3L814.1,134.0L811.5,130.0L808.1,127.1L805.5,123.0L806.6,121.7L804.7,120.3L805.4,119.9ZM113.8,79.2L113.8,79.2L116.3,81.2L118.5,83.9L116.3,85.5L116.9,86.2L118.7,84.3L123.9,84.7L125.1,87.2L121.7,88.4L117.9,88.6L114.9,91.3L113.4,91.9L111.5,91.8L111.0,90.8L109.1,90.0L110.0,88.9L108.4,88.4L105.6,88.8L105.5,87.8L107.2,86.8L103.9,87.4L103.4,88.7L100.8,89.9L100.8,89.9L113.8,79.2ZM859.1,89.9L859.1,89.9L857.8,91.1L854.8,90.9L858.4,92.3L862.2,94.6L864.0,95.4L865.6,96.5L865.8,97.2L861.1,96.6L857.4,98.7L855.8,99.0L854.5,101.0L853.1,102.7L853.6,104.0L848.5,102.1L845.0,104.3L843.0,103.2L842.1,104.4L838.8,104.1L839.8,105.9L839.8,108.7L840.9,109.8L844.0,110.5L847.5,114.7L845.5,114.8L846.6,117.2L848.6,118.5L845.9,120.0L847.9,123.3L845.0,124.0L846.7,127.1L845.4,129.8L843.0,127.8L838.7,123.5L832.2,116.9L829.9,112.9L830.3,111.2L829.2,109.9L832.1,109.2L832.8,105.6L833.8,102.7L835.6,100.5L833.4,96.5L831.0,96.8L832.0,99.1L829.5,102.2L824.4,98.7L819.7,99.7L818.6,104.4L822.0,106.1L817.7,106.9L814.5,107.1L812.9,105.1L809.1,104.7L807.6,106.1L800.4,105.6L793.9,106.4L791.1,112.0L787.5,118.8L791.4,119.2L793.8,121.0L796.5,121.7L796.9,120.2L799.5,120.4L805.2,123.7L807.0,126.2L807.2,129.1L809.4,132.7L811.4,137.5L810.5,141.9L810.9,144.0L809.7,147.6L808.4,151.1L807.8,152.9L805.4,154.7L803.9,154.7L801.6,153.2L799.5,155.5L799.6,156.5L799.6,156.5L799.0,156.0L798.2,154.4L799.4,154.3L797.9,150.7L795.9,148.1L797.4,147.0L800.6,147.5L800.6,144.6L799.5,141.3L799.8,140.1L799.4,137.4L796.1,138.3L794.7,139.5L791.1,139.5L788.5,136.7L784.4,134.5L779.8,133.6L777.2,130.6L775.2,128.8L773.6,127.5L770.3,124.5L767.6,123.4L763.6,122.6L760.6,122.7L758.1,123.2L757.1,124.6L758.7,125.4L759.7,127.0L759.0,127.9L758.7,131.1L759.5,132.4L757.2,134.3L753.8,133.2L751.1,133.4L749.3,132.4L747.8,132.1L745.4,134.2L742.6,134.7L740.8,135.5L737.6,135.0L735.4,135.0L733.2,133.5L730.2,132.0L727.7,131.6L724.9,132.0L723.0,132.6L719.0,131.3L717.5,129.1L714.4,128.3L712.1,128.0L708.9,126.7L708.0,129.8L709.8,131.6L708.4,133.7L704.7,132.9L702.3,132.8L700.1,131.4L697.7,131.4L695.2,130.4L692.3,131.9L688.9,134.4L686.6,135.0L685.8,135.2L683.8,133.4L680.9,133.8L679.4,132.5L677.6,131.9L675.8,130.2L674.2,129.7L671.2,130.4L667.3,128.7L666.7,130.3L658.6,122.7L654.8,120.5L655.2,119.5L650.6,122.3L648.5,122.5L648.0,120.9L644.7,119.9L642.6,120.6L640.8,117.6L636.5,116.9L634.9,118.1L629.5,119.2L628.7,119.9L620.5,121.0L619.7,122.0L622.0,124.0L620.0,124.7L620.7,125.6L618.9,127.0L623.3,129.0L623.1,130.5L619.8,130.3L619.4,131.2L616,129.7L612.3,129.7L610.1,131.0L607.1,129.8L601.4,127.7L597.8,127.8L593.8,131.0L594.0,133.2L591.2,131.5L590.0,134.8L590.8,135.4L589.9,137.7L592.4,139.7L594.1,139.6L596.1,141.7L596.1,143.2L597.5,143.7L596.7,145.5L594.5,146.0L592.7,149.2L595.5,152.1L595.6,154.2L598.9,157.8L597.7,159.0L597.4,159.8L596.3,159.6L594.3,157.7L593.6,157.6L591.9,156.9L590.9,155.6L588.6,155.0L587.2,155.5L586.6,154.9L583.1,153.4L579.4,152.9L577.3,152.4L577.0,152.8L573.6,150.2L570.6,149.0L568.3,147.2L569.9,146.8L571.5,144.2L570.0,143.0L573.3,141.8L573.1,141.1L571.1,141.6L570.9,140.2L572.0,139.4L574.3,139.2L574.5,138.2L573.7,136.5L574.3,134.9L574.1,134.0L570.5,133.1L569.1,133.1L567.4,131.7L565.7,132.2L562.6,131.1L562.5,130.5L561.5,129.2L559.6,129.1L559.3,128.2L559.7,127.6L558.0,125.9L555.6,126.2L554.9,126.0L554.4,126.7L553.5,126.6L552.7,124.7L552.0,123.7L552.4,123.4L554.3,123.5L555.0,122.9L554.3,122.1L552.6,121.6L552.7,121.1L551.7,120.5L549.9,118.6L550.3,117.8L549.8,116.4L547.5,115.8L546.4,116.1L545.9,115.4L543.5,114.6L542.5,112.9L542.1,111.5L540.9,110.9L541.7,110.0L540.6,107.3L541.9,105.7L541.5,105.2L543.8,103.6L541.2,102.3L545.3,98.7L547.0,97.1L547.5,95.7L544.0,93.8L544.5,92.0L542.2,90.0L543.2,87.6L540.1,84.6L541.6,82.6L538.1,80.8L538.1,78.9L539.7,78.7L542.9,77.7L544.8,76.7L548.4,78.3L554.2,79L562.7,81.9L564.6,83.2L565.2,85.0L563.3,86.4L560.1,87.1L550.3,85.1L548.9,85.4L552.7,87.4L553.1,88.6L553.9,91.4L556.8,92.3L558.6,93.0L558.6,91.6L557.1,90.5L558.1,89.4L563.7,91.1L565.3,90.5L563.3,88.5L567.5,85.8L569.5,86.0L571.7,86.9L572.3,85.1L570.1,83.5L570.7,81.9L568.7,80.2L574.6,81.1L576.3,82.6L573.8,82.9L574.3,84.4L576.2,85.3L579.2,84.7L579.1,83.0L583.0,81.8L589.3,79.5L590.9,79.6L589.5,81.2L592.2,81.5L593.3,80.6L597.1,80.5L599.7,79.4L602.6,81.0L604.2,79.3L601.4,77.8L602.1,76.9L608.4,77.7L611.6,78.5L620.4,81.5L621.1,80.1L618.4,78.7L618.1,78.2L615.5,77.9L615.6,76.7L613.5,74.7L613.1,73.8L615.6,71.5L615.6,69.2L616.8,68.7L622.4,69.4L623.6,70.8L622.8,72.9L624.5,73.7L626.1,75.5L627.5,79.1L630.6,80.7L630.6,82.4L628.4,86.2L631.0,86.6L631.3,85.7L633.3,85.0L633.2,83.7L634.3,82.4L632.3,80.9L632.4,79.1L630.0,78.9L628.8,77.5L629.0,74.9L625.3,72.8L627.8,71.0L626.4,69.2L627.3,69.2L629.2,70.6L629.8,73.0L632.2,73.5L630.2,71.7L632.9,70.7L636.9,70.5L641.5,72.0L638.4,69.9L636.6,67.2L639.6,66.7L644.4,66.8L648.3,66.5L645.9,65.2L647.0,63.6L649.1,63.5L651.9,62.3L656.7,62.0L656.8,61.3L661.6,61.1L663.6,61.6L666.8,60.3L670.3,60.4L669.9,59.3L670.8,58.3L674.3,57.4L678.2,58.1L676.2,58.7L680.8,59.1L682.4,60.3L683.6,59.7L689.1,59.7L694.5,60.9L696.9,61.8L697.7,63.0L696.2,63.8L692.4,65.1L691.6,65.9L694.3,66.2L697.7,66.8L699.1,66.4L701.5,68.0L701.8,67.3L704.5,66.9L711.1,67.3L712.7,68.5L721.2,68.9L719.5,67.0L724.1,67.4L727.1,67.4L731.6,68.7L734.1,70.3L734.0,71.4L738.4,73.4L742.6,74.5L741.9,71.8L746.2,72.9L748.9,72.2L753.5,73.0L754.2,72.3L757.9,72.7L754.0,70.3L755.4,69.2L775.0,70.8L778.4,72.4L785.8,74.3L793.3,73.8L797.7,74.3L800.7,75.3L802.6,77.2L805.9,78.0L808.0,77.4L811.5,77.4L816.0,77.9L819.4,77.6L825.8,79.9L827.3,79.1L823.6,77.4L823.1,76.3L830.4,77.0L834.4,76.8L841.8,78.1L846.1,79.2L859.1,89.9ZM839.8,74.3L837.8,74.5L836.4,73.7L837.5,72.6L839.8,74.3ZM122.4,72.6L122.4,72.6L122.4,72.6L122.8,72.5L124.5,72.5L126.4,73.2L125.7,73.6L122.9,74.2L120.1,74.3L120.1,74.3L122.4,72.6ZM560.2,145.0L560.7,144.3L562.5,144.9L563.3,145.0L563.7,145.6L564.0,145.7L564.1,146.0L565.4,146.7L567.8,146.6L567.5,147.6L564.9,148.2L561.9,149.9L560.5,149.3L560.8,147.9L558.1,147.0L558.4,146.4L560.6,145.4Z",BS:"M275.7,204.5L277.0,204.2L278.7,204.3L278.6,205.1L275.7,205.6ZM278.9,203.7L280.7,205.1L279.9,207.3L279.5,206.9L279.8,205.3L278.9,204.1ZM276.9,209.4L277.7,209.5L278.2,212.1L277.9,213.9L277.3,214.1L276.9,212.3L276.0,211.4Z",FK:"M338.0,448.0L340.3,446.2L342.5,447.0L343.5,445.8L345.8,447.1L345.4,448.2L342.5,449.0L341.2,448.0L339.6,449.3Z",NO:"M507.5,52.9L508.0,52.1L510.7,52.1L513.1,52.8L519.5,54.5L515.0,55.4L514.3,57.1L512.7,57.5L512.2,59.5L509.9,59.6L505.7,58.1L507.3,57.3L504.4,56.6L500.6,54.7L498.9,52.9L503.8,52.2L504.9,52.9ZM542.9,77.7L539.7,78.7L538.1,78.9L538.5,77.1L535.7,76.1L532.8,77.0L532.1,78.9L530.4,80.0L528.1,79.4L525.5,79.5L523.0,78.1L521.9,78.8L520.6,78.9L520.6,80.7L516.7,80.3L516.3,81.7L514.4,81.7L513.2,83.6L511.4,86.6L508.6,90.4L509.4,91.3L508.8,92.4L506.7,92.4L505.5,95.0L505.9,98.6L507.4,100.1L506.9,103.4L505.2,105.3L504.3,106.9L502.7,105.2L498.6,108.5L495.6,109.2L492.5,107.7L491.6,104.6L490.7,98.2L492.6,96.4L498.2,94.1L502.2,91.2L505.8,87.4L510.3,82.3L513.5,80.3L518.7,77.0L522.9,75.8L526.3,76.0L528.9,73.8L532.6,73.9L536.1,73.4L542.7,75.3L540.3,76.0ZM529.5,52.1L527.2,53.2L522,53.5L516.5,53.1L516.0,52.5L513.4,52.5L511.3,51.5L516.7,50.9L519.4,51.4L521.1,50.8L525.8,51.3ZM525.9,57.0L522.0,58.0L518.6,57.4L519.7,56.8L518.5,56.1L522.2,55.6L523.1,56.5Z",GL:"M398.4,46.7L405.0,45.6L411.0,45.7L413.6,45.0L419.8,44.8L433.4,45.1L443.6,46.5L440.2,47.3L433.5,47.4L423.9,47.6L424.7,47.9L431.0,47.7L436.1,48.4L439.7,47.8L440.9,48.5L438.7,49.7L443.4,48.9L452.1,48.2L457.4,48.5L458.2,49.4L450.7,50.9L449.6,51.4L443.7,51.8L447.9,51.9L445.5,53.5L443.7,55.0L443.3,57.5L445.3,59.1L442.3,59.1L439.1,59.9L442.3,61.2L442.4,63.2L440.4,63.5L442.5,65.6L438.2,65.7L440.3,66.8L439.5,67.6L436.7,68.0L433.9,68.0L436.1,69.7L435.9,70.9L432.2,69.8L431.1,70.5L433.6,71.1L436.0,72.7L436.4,74.8L432.7,75.3L431.4,74.3L429.2,72.8L429.5,74.5L426.9,75.9L432.2,76.0L435.0,76.2L429.2,78.4L423.3,80.5L417.1,81.4L414.8,81.4L412.5,82.5L408.9,85.3L404.0,87.2L402.6,87.3L399.6,87.9L396.4,88.6L394.2,90.3L393.7,92.2L392.1,94.0L388.0,96.2L388.3,98.4L386.8,100.7L384.9,103.4L381.8,103.6L379.2,101.3L374.9,101.3L373.2,99.7L372.6,97.0L370.0,93.6L369.5,91.8L370.0,89.3L368.0,86.8L369.5,84.9L368.4,83.9L371.6,80.8L375.0,79.8L376.2,78.7L377.4,76.7L374.7,77.6L373.5,78.0L371.5,78.4L369.4,77.5L369.9,75.7L371.3,74.4L373.1,74.3L376.9,75.0L374.1,73.4L372.7,72.5L370.6,72.9L369.2,72.2L372.4,69.9L371.6,68.9L370.8,67.2L369.6,64.5L367.7,63.6L368.2,62.6L363.8,61.2L359.9,61.0L354.7,61.1L350.0,61.3L348.3,60.5L345.9,59.0L351.3,58.3L355.2,58.1L347.6,57.5L344.0,56.6L344.9,55.7L352.6,54.6L360.1,53.5L361.3,52.7L357.0,51.9L359.2,51.1L366.5,49.6L369.3,49.4L369.3,48.4L373.9,47.9L379.5,47.6L384.9,47.6L386.4,48.2L391.8,47.1L395.5,47.8L397.9,48.0L401.2,48.7L397.6,47.6Z",TF:"M642.9,438.4L644.1,439.3L646.3,439.7L646.2,440.3L645.1,441.6L641.4,441.8L641.8,440.2L642.6,439.0Z",TL:"M813.2,315.2L813.6,314.5L815.9,313.8L817.8,313.7L818.7,313.3L819.7,313.7L818.6,314.5L815.7,315.9L813.4,316.8L813.4,315.8Z",ZA:"M522.0,376.4L523.3,374.9L524.3,375.7L524.7,377.1L525.8,377.3L527.4,377.9L528.8,377.7L531.2,376.1L531.7,364.6L532.3,365.0L533.8,368.0L533.4,369.9L534.0,371.0L535.8,370.7L537.2,369.3L538.5,368.3L539.2,366.8L540.5,366.1L541.5,366.5L542.7,367.4L544.8,367.5L546.5,366.8L546.9,365.8L547.4,364.3L548.8,364.1L549.7,362.9L550.6,360.8L553.1,358.5L556.9,356.2L558.0,356.2L559.2,356.8L560.1,356.4L561.5,356.7L562.5,361.1L563.0,363.3L562.3,366.8L562.5,367.9L561.2,367.3L560.5,367.6L560.1,368.5L559.4,369.6L559.3,370.7L560.7,372.4L562.3,372.1L562.9,370.7L564.9,370.7L564.0,373.0L563.5,375.6L562.8,377.0L560.9,378.6L560.4,379.0L559.1,380.6L558.3,382.2L556.7,384.4L553.5,387.6L551.6,389.5L549.6,390.9L546.8,392.1L545.5,392.3L545.2,393.2L543.6,392.7L542.3,393.3L539.6,392.7L538.1,393.1L537.1,392.9L534.4,394.1L532.2,394.6L530.6,395.8L529.4,395.9L528.4,394.8L527.6,394.7L526.5,393.3L526.4,393.8L526.1,392.9L526.2,391.1L525.5,389.0L526.3,388.4L526.4,386.1L524.9,383.1L523.7,380.5L523.7,380.5ZM554.4,377.6L553.4,376.7L552.1,377.3L550.7,378.5L549.2,380.5L550.9,382.9L551.8,382.6L552.4,381.6L553.9,381.1L554.4,380.1L555.3,378.6Z",LS:"M554.4,377.6L555.3,378.6L554.4,380.1L553.9,381.1L552.4,381.6L551.8,382.6L550.9,382.9L549.2,380.5L550.7,378.5L552.1,377.3L553.4,376.7Z",MX:"M182.3,186.6L185.2,186.3L188.6,186.0L188.1,186.6L191.5,188.1L196.7,190.3L201.8,190.3L203.8,190.3L204.2,189.0L208.6,189.0L209.2,190.1L210.2,191.1L211.4,192.5L211.8,194.1L212.0,195.8L213.1,196.7L214.9,197.7L217.2,195.2L219.3,195.2L220.8,196.4L221.6,198.5L222.0,200.4L223.1,202.1L223.2,204.3L223.6,205.8L225.4,206.8L227.1,207.4L228.1,207.4L226.6,210.1L225.7,212.3L224.7,216.5L224.2,218.0L224.3,219.7L224.9,221.2L225.0,223.7L226.4,226.0L226.7,227.7L227.5,229.3L230.2,230.1L231.1,231.4L233.5,230.5L235.6,230.2L237.6,229.7L239.4,229.1L241.2,227.9L242.1,226.0L242.7,223.4L243.3,222.5L245.2,221.7L248.1,221.0L250.4,221.1L252.0,220.8L252.5,221.5L252.2,223.0L250.6,224.8L249.7,226.7L250.1,227.3L249.5,228.6L248.5,231.0L247.9,230.2L247.4,230.3L246.9,230.3L245.7,232.2L245.3,231.9L244.9,232.0L244.9,232.5L242.4,232.4L240.0,232.4L239.7,234.2L238.6,234.2L239.4,235.2L240.3,235.9L240.5,236.6L240.9,236.8L240.7,237.9L237.3,237.9L235.8,240.4L236.1,241.0L235.7,241.7L235.5,242.6L232.9,239.3L231.7,238.3L229.6,237.4L228.1,237.7L225.8,238.8L224.4,239.1L222.7,238.3L220.8,237.7L218.5,236.3L216.6,235.9L213.8,234.4L211.8,232.9L211.2,232.1L209.8,231.9L207.2,230.9L206.4,229.5L203.8,227.8L202.8,225.8L202.5,224.3L203.4,224.0L203.3,223.1L204.0,222.3L204.2,221.2L203.6,219.8L203.6,218.6L203.1,217.0L201.4,213.9L199.3,211.5L198.5,209.5L196.5,208.3L196.2,207.5L197.1,205.6L195.9,204.8L194.8,203.3L194.7,201.1L193.4,200.9L192.3,199.2L191.5,197.7L191.6,196.8L190.9,194.4L190.7,192.0L191.1,190.8L189.6,189.6L188.7,189.7L187.5,188.9L186.7,190.1L186.7,191.6L186.3,194.0L186.8,195.2L188.1,197.4L188.3,198.1L188.6,198.4L188.7,199.4L189.2,199.4L189.1,201.4L189.7,202.2L190.0,203.3L191.2,204.9L191.4,207.8L191.8,209.1L192.2,210.6L192.0,212.2L193.2,212.4L194.0,213.8L194.6,215.2L194.4,215.7L193.1,216.9L192.6,216.8L192.3,215.0L191.0,213.2L189.5,211.7L188.3,210.9L188.9,208.6L189.0,206.9L188.0,205.9L186.5,204.5L186.1,205L185.6,204.1L184.2,203.4L183.2,201.6L183.4,201.3L184.5,201.5L185.7,200.3L186.2,198.9L184.8,196.7L183.6,195.9L183.2,193.9L182.8,191.9L182.4,189.4Z",UY:"M332.4,381.5L334.0,381.2L336.9,383.6L337.9,383.5L340.8,385.5L343.0,387.3L344.8,389.4L343.9,390.9L344.9,392.6L344.1,394.6L341.5,396.3L339.6,395.7L338.2,396.0L335.7,394.7L334.0,394.8L332.2,393.1L332.0,391.0L332.5,390.3L331.9,387.2L332.1,384.0Z",BR:"M344.9,392.6L343.9,390.9L344.8,389.4L343.0,387.3L340.8,385.5L337.9,383.5L336.9,383.6L334.0,381.2L332.4,381.5L335.2,377.3L337.7,374.3L339.3,373.0L341.3,371.3L341.0,368.8L339.5,367.0L338.3,367.6L338.6,365.8L338.8,363.9L338.6,362.2L337.6,361.7L336.7,362.2L335.7,362.0L335.2,360.8L334.7,358.0L334.1,357.0L332.3,356.2L331.2,356.8L328.4,356.2L328.2,352.0L327.2,350.3L328.0,349.6L327.6,347.8L328.2,346.5L328.4,344.0L327.6,342.1L326.1,341.2L325.7,340.0L326.0,338.2L320.9,338.1L319.6,334.5L320.4,334.4L320.3,333.1L319.7,332.2L319.4,330.4L317.8,329.4L316.2,329.5L315.0,328.6L313.2,328.0L312.0,326.8L309.0,326.3L306.0,323.5L306.1,321.4L305.7,320.2L305.8,317.9L302.4,318.4L301.0,319.6L298.8,320.9L298.2,321.8L296.9,321.9L294.9,321.6L293.4,322.1L292.2,321.8L292.1,317.1L290.0,318.9L287.6,318.8L286.5,317.2L284.8,317.0L285.3,315.6L283.7,313.8L282.4,311.0L283.1,310.4L283.1,309.1L284.6,308.2L284.3,306.5L285.0,305.4L285.1,304.0L288.1,301.9L290.3,301.3L290.6,300.8L293.0,301.0L294.1,292.5L294.1,291.1L293.7,289.4L292.5,288.2L292.5,286.0L294.1,285.5L294.6,285.8L294.7,284.6L293.1,284.3L293.1,282.4L298.3,282.4L299.2,281.4L299.9,282.3L300.5,284.2L301.0,283.8L302.4,285.4L304.5,285.2L305.0,284.3L307.0,283.6L308.1,283.0L308.5,281.7L310.4,280.9L310.2,280.2L308.0,279.9L307.6,278.0L307.8,275.9L306.6,275.1L307.1,274.8L309.1,275.2L311.2,276.0L312.0,275.3L313.9,274.8L316.9,273.6L317.9,272.4L317.6,271.6L319.0,271.4L319.6,272.1L319.2,273.5L320.1,274.0L320.7,275.4L319.9,276.5L319.5,279.1L320.1,280.7L320.3,282.1L322.0,283.6L323.3,283.7L323.6,283.1L324.4,283.0L325.6,282.5L326.5,281.6L328.0,281.9L328.6,281.8L330.1,282.0L330.3,281.4L329.9,280.8L330.2,279.9L331.3,280.2L332.5,279.9L334.0,280.5L335.2,281.1L336.0,280.3L336.6,280.4L337.0,281.3L338.3,281.1L339.3,279.9L340.2,277.6L341.8,274.8L342.7,274.7L343.3,276.4L344.8,281.8L346.2,282.3L346.3,284.4L344.3,287.0L345.1,287.9L349.8,288.4L349.9,291.5L351.9,289.5L355.3,290.6L359.8,292.5L361.1,294.3L360.7,296.0L363.8,295.0L369.0,296.7L373.0,296.6L377.0,299.1L380.4,302.6L382.5,303.5L384.8,303.6L385.8,304.6L386.7,308.5L387.2,310.4L386.3,315.5L385.0,317.6L381.4,321.9L379.8,325.4L377.9,328.1L377.3,328.1L376.6,330.4L377.1,336.2L376.6,341.0L376.4,343.1L375.6,344.3L375.4,348.5L373.0,352.5L372.8,355.7L370.8,357.1L370.3,359.0L367.5,358.9L363.5,360.1L361.8,361.5L359.0,362.4L356.1,364.9L354.2,368.0L354.1,370.3L354.7,372.1L354.6,375.2L354.2,376.7L352.6,378.5L350.5,383.9L348.5,386.4L347.0,387.9L346.3,390.8Z",BO:"M294.9,321.6L296.9,321.9L298.2,321.8L298.8,320.9L301.0,319.6L302.4,318.4L305.8,317.9L305.7,320.2L306.1,321.4L306.0,323.5L309.0,326.3L312.0,326.8L313.2,328.0L315.0,328.6L316.2,329.5L317.8,329.4L319.4,330.4L319.7,332.2L320.3,333.1L320.4,334.4L319.6,334.5L320.9,338.1L326.0,338.2L325.7,340.0L326.1,341.2L327.6,342.1L328.4,344.0L328.2,346.5L327.6,347.8L328.0,349.6L327.2,350.3L327.1,349.3L324.5,347.7L322.0,347.7L317.6,348.6L316.6,351.3L316.7,353.0L316.1,356.7L315.6,356.0L312.6,355.9L311.8,358.4L310.0,356.2L306.5,355.4L304.7,358.2L302.9,358.6L301.3,354.4L299.5,350.9L300.0,347.9L298.5,346.5L297.9,344.3L296.4,342.2L297.7,338.8L296.3,336.2L296.9,335.2L296.3,334.0L297.2,332.5L297.0,329.8L297.0,327.6L297.5,326.6Z",PE:"M293.0,301.0L290.6,300.8L290.3,301.3L288.1,301.9L285.1,304.0L285.0,305.4L284.3,306.5L284.6,308.2L283.1,309.1L283.1,310.4L282.4,311.0L283.7,313.8L285.3,315.6L284.8,317.0L286.5,317.2L287.6,318.8L290.0,318.9L292.1,317.1L292.2,321.8L293.4,322.1L294.9,321.6L297.5,326.6L297.0,327.6L297.0,329.8L297.2,332.5L296.3,334.0L296.9,335.2L296.3,336.2L297.7,338.8L296.4,342.2L295.8,343.8L294.6,344.6L291.7,342.8L291.4,341.5L285.8,338.4L280.7,335.0L278.5,333.1L277.2,330.5L277.6,329.6L275.0,325.5L272.0,319.8L269.1,313.6L267.9,312.2L267.0,310.0L264.8,307.9L262.9,306.7L263.7,305.3L262.3,302.3L263.0,300.2L265.1,298.2L265.5,299.5L264.7,300.2L264.8,301.4L265.9,301.1L267.0,301.5L268.2,303.0L269.7,301.8L270.1,299.7L271.7,297.0L274.9,295.7L277.8,292.5L278.6,290.5L278.2,288.1L278.9,287.8L280.7,289.3L281.6,290.8L282.8,291.6L284.4,294.8L286.4,295.2L287.9,294.4L288.9,294.9L290.5,294.7L292.5,296.1L290.9,299.3L291.7,299.3Z",CO:"M301.0,283.8L300.5,284.2L299.9,282.3L299.2,281.4L298.3,282.4L293.1,282.4L293.1,284.3L294.7,284.6L294.6,285.8L294.1,285.5L292.5,286.0L292.5,288.2L293.7,289.4L294.1,291.1L294.1,292.5L293.0,301.0L291.7,299.3L290.9,299.3L292.5,296.1L290.5,294.7L288.9,294.9L287.9,294.4L286.4,295.2L284.4,294.8L282.8,291.6L281.6,290.8L280.7,289.3L278.9,287.8L278.2,288.1L277.1,287.4L275.7,286.4L275.0,286.9L272.7,286.4L272.1,285.1L271.6,285.2L268.9,283.4L268.6,282.4L269.5,282.2L269.5,280.7L270.1,279.5L271.4,279.3L272.6,277.4L273.6,275.8L272.7,275.0L273.2,273.2L272.7,270.4L273.3,269.6L273.0,266.9L272.0,265.3L272.4,263.8L273.3,264.0L273.8,263.1L273.3,261.3L273.6,260.8L275.0,260.9L277.1,258.7L278.2,258.4L278.3,257.4L279.0,254.8L280.6,253.3L282.3,253.3L282.5,252.6L284.6,252.9L286.8,251.3L287.9,250.6L289.3,249.1L290.2,249.3L290.8,250.1L290.2,251.2L288.5,251.7L287.7,253.3L286.6,254.1L285.8,255.3L285.3,257.5L284.5,259.3L285.9,259.5L286.1,261.0L286.7,261.6L286.8,262.9L286.5,264.0L286.5,264.7L287.2,264.9L287.8,266.0L291.2,265.7L292.8,266.1L294.5,268.8L295.6,268.4L297.5,268.6L299.1,268.3L300.0,268.8L299.5,270.5L298.9,271.5L298.6,273.7L299.1,275.8L299.8,276.7L299.9,277.4L298.5,278.9L299.5,279.6L300.2,280.7Z",PA:"M273.6,260.8L273.3,261.3L273.8,263.1L273.3,264.0L272.4,263.8L272.0,265.3L271.1,264.4L270.7,262.7L271.4,261.9L270.7,261.7L270.2,260.7L269.0,259.8L267.8,260.0L267.2,261.1L266.1,261.9L265.5,262.0L265.2,262.6L266.4,264.3L265.6,264.7L265.2,265.1L264.0,265.3L263.6,263.5L263.2,264.0L262.4,263.8L261.9,262.6L260.8,262.3L260.1,262.0L259.0,262.0L258.9,262.7L258.6,262.2L258.8,261.6L259.0,261.0L258.9,260.4L259.4,260.0L258.8,259.6L258.9,258.3L259.9,258.0L260.8,259.1L260.7,259.8L261.8,259.9L262.1,259.7L262.8,260.5L264.1,260.2L265.3,259.4L266.9,258.8L267.9,257.9L269.3,258.1L269.2,258.4L270.7,258.5L271.9,259.0L272.7,260.0Z",CR:"M259.9,258.0L258.9,258.3L258.8,259.6L259.4,260.0L258.9,260.4L259.0,261.0L258.8,261.6L258.6,262.2L257.2,261.5L256.7,260.9L257.0,260.3L256.9,259.6L256.2,258.9L255.2,258.3L254.4,257.9L254.2,257.0L253.6,256.4L253.7,257.3L253.1,258.1L252.6,257.2L251.7,256.9L251.4,256.3L251.5,255.3L251.9,254.4L251.2,253.9L251.8,253.3L252.3,252.9L254.0,253.7L254.6,253.3L255.4,253.6L255.8,254.2L256.6,254.4L257.3,253.8L257.8,255.5L258.8,256.7Z",NI:"M257.3,253.8L256.6,254.4L255.8,254.2L255.4,253.6L254.6,253.3L254.0,253.7L252.3,252.9L251.8,253.3L251.0,252.3L249.9,251.1L249.4,250.0L248.3,249.1L247.1,247.7L247.4,247.2L247.8,247.7L248.1,247.4L248.9,247.3L249.3,246.6L249.7,246.6L249.8,245.0L250.4,245.0L251.0,245.0L251.6,244.2L252.3,244.8L252.6,244.4L253.2,244.0L254.2,243.2L254.3,242.5L254.5,242.6L255.0,241.8L255.2,241.7L255.6,242.2L256.2,242.4L256.8,242.0L257.5,242.0L258.4,241.6L258.8,241.1L259.7,241.2L259.5,241.5L259.3,242.2L259.4,243.3L258.7,244.4L258.3,245.6L258.1,247.0L258.2,247.8L258.1,249.2L257.7,249.5L257.3,250.8L257.5,251.6L256.9,252.4L256.9,253.3Z",HN:"M259.7,241.2L258.8,241.1L258.4,241.6L257.5,242.0L256.8,242.0L256.2,242.4L255.6,242.2L255.2,241.7L255.0,241.8L254.5,242.6L254.3,242.5L254.2,243.2L253.2,244.0L252.6,244.4L252.3,244.8L251.6,244.2L251.0,245.0L250.4,245.0L249.8,245.0L249.7,246.6L249.3,246.6L248.9,247.3L248.1,247.4L247.7,246.5L246.9,246.2L247.2,245.0L246.9,244.6L246.4,244.4L245.2,244.8L245.1,244.3L244.4,243.8L243.9,243.2L243.1,243.0L243.7,242.2L243.6,241.6L243.8,241.0L245.2,240.1L246.5,238.9L246.8,239.0L247.4,238.5L248.2,238.5L248.4,238.7L248.8,238.5L250.0,238.8L251.3,238.7L252.2,238.4L252.5,238.1L253.3,238.2L253.9,238.4L254.6,238.4L255.2,238.1L256.4,238.5L256.8,238.6L257.5,239.2L258.2,239.9L259.1,240.3Z",SV:"M243.1,243.0L243.9,243.2L244.4,243.8L245.1,244.3L245.2,244.8L246.4,244.4L246.9,244.6L247.2,245.0L246.9,246.2L246.6,246.9L245.0,246.9L244.1,246.6L243.1,246.0L241.6,245.8L240.9,245.1L241.0,244.7L242.0,243.9L242.6,243.5L242.5,243.2Z",GT:"M235.5,242.6L235.7,241.7L236.1,241.0L235.8,240.4L237.3,237.9L240.7,237.9L240.9,236.8L240.5,236.6L240.3,235.9L239.4,235.2L238.6,234.2L239.7,234.2L240.0,232.4L242.4,232.4L244.9,232.5L244.6,234.9L243.9,238.4L244.7,238.4L245.5,239.0L245.8,238.5L246.5,238.9L245.2,240.1L243.8,241.0L243.6,241.6L243.7,242.2L243.1,243.0L242.5,243.2L242.6,243.5L242.0,243.9L241.0,244.7L240.9,245.1L239.6,244.6L238.0,244.5L236.8,243.9Z",BZ:"M244.9,232.5L244.9,232.0L245.3,231.9L245.7,232.2L246.9,230.3L247.4,230.3L247.3,230.8L247.8,230.8L247.7,231.6L247.1,233.0L247.2,233.4L246.8,234.6L247.0,234.9L246.5,236.4L245.9,237.2L245.4,237.3L244.7,238.4L243.9,238.4L244.6,234.9Z",VE:"M317.6,271.6L317.9,272.4L316.9,273.6L313.9,274.8L312.0,275.3L311.2,276.0L309.1,275.2L307.1,274.8L306.6,275.1L307.8,275.9L307.6,278.0L308.0,279.9L310.2,280.2L310.4,280.9L308.5,281.7L308.1,283.0L307.0,283.6L305.0,284.3L304.5,285.2L302.4,285.4L301.0,283.8L300.2,280.7L299.5,279.6L298.5,278.9L299.9,277.4L299.8,276.7L299.1,275.8L298.6,273.7L298.9,271.5L299.5,270.5L300.0,268.8L299.1,268.3L297.5,268.6L295.6,268.4L294.5,268.8L292.8,266.1L291.2,265.7L287.8,266.0L287.2,264.9L286.5,264.7L286.5,264.0L286.8,262.9L286.7,261.6L286.1,261.0L285.9,259.5L284.5,259.3L285.3,257.5L285.8,255.3L286.6,254.1L287.7,253.3L288.5,251.7L290.2,251.2L290.1,251.9L288.5,252.3L289.3,253.7L289.2,255.3L287.9,257.1L288.8,259.6L289.9,259.4L290.7,257.1L289.9,256.0L289.9,253.7L293.3,252.4L293.0,251.0L294.0,250.0L294.8,252.2L296.7,252.2L298.3,253.9L298.4,255.0L300.8,255.0L303.6,254.7L305.1,256.1L307.1,256.5L308.6,255.5L308.7,254.7L312.0,254.5L315.2,254.5L312.9,255.4L313.7,256.9L315.8,257.1L317.8,258.6L318.1,261.1L319.5,261.0L320.5,261.8L318.3,263.6L318.1,264.7L318.9,265.9L318.3,266.4L316.6,266.9L316.6,268.4L315.8,269.2Z",GY:"M328.6,281.8L328.0,281.9L326.5,281.6L325.6,282.5L324.4,283.0L323.6,283.1L323.3,283.7L322.0,283.6L320.3,282.1L320.1,280.7L319.5,279.1L319.9,276.5L320.7,275.4L320.1,274.0L319.2,273.5L319.6,272.1L319.0,271.4L317.6,271.6L315.8,269.2L316.6,268.4L316.6,266.9L318.3,266.4L318.9,265.9L318.1,264.7L318.3,263.6L320.5,261.8L322.2,262.9L323.8,264.9L323.8,266.5L324.8,266.6L326.2,268.1L327.2,269.2L326.7,272.0L325.1,272.8L325.2,273.5L324.7,275.1L325.9,277.3L326.7,277.3L327.0,279.1Z",SR:"M334.0,280.5L332.5,279.9L331.3,280.2L330.2,279.9L329.9,280.8L330.3,281.4L330.1,282.0L328.6,281.8L327.0,279.1L326.7,277.3L325.9,277.3L324.7,275.1L325.2,273.5L325.1,272.8L326.7,272.0L327.2,269.2L330.4,269.8L330.7,269.2L332.9,269.0L335.7,269.8L334.3,272.5L334.5,274.6L335.5,276.5L335.0,277.8L334.7,279.2Z",FR:"M341.8,274.8L340.2,277.6L339.3,279.9L338.3,281.1L337.0,281.3L336.6,280.4L336.0,280.3L335.2,281.1L334.0,280.5L334.7,279.2L335.0,277.8L335.5,276.5L334.5,274.6L334.3,272.5L335.7,269.8L336.6,270.2L338.6,270.9L341.4,273.5ZM494.5,134.5L495.6,135.2L499.1,135.8L497.9,137.9L497.7,140.0L497.1,140.5L496.0,140.3L496.1,141.0L494.4,142.7L494.4,144.1L495.5,143.6L496.4,145.0L496.3,145.8L497.0,147.0L496.2,147.9L496.9,150.3L498.2,150.7L498.0,152.0L495.8,153.7L491.0,152.9L487.5,153.9L487.2,155.7L484.4,156.1L481.7,154.7L480.8,155.4L476.3,154.0L475.3,152.8L476.6,151.0L477.1,144.9L474.6,141.7L472.9,140.2L469.3,139.0L469.1,136.8L472.2,136.1L476.1,136.9L475.4,133.5L477.6,134.8L483.1,132.5L483.8,130.0L485.8,129.4L486.2,130.5L487.2,130.5L488.3,131.7L490.0,133.1L491.2,132.9L493.3,134.3L493.8,134.5ZM501.3,155.3L502.8,154.1L503.3,156.7L502.6,159.1L501.5,158.5L500.8,156.4Z",EC:"M278.2,288.1L278.6,290.5L277.8,292.5L274.9,295.7L271.7,297.0L270.1,299.7L269.7,301.8L268.2,303.0L267.0,301.5L265.9,301.1L264.8,301.4L264.7,300.2L265.5,299.5L265.1,298.2L266.5,295.9L265.9,294.5L264.9,296.0L263.3,294.6L263.8,293.8L263.3,290.9L264.3,290.5L264.8,288.5L265.8,286.6L265.6,285.3L267.1,284.6L268.9,283.4L271.6,285.2L272.1,285.1L272.7,286.4L275.0,286.9L275.7,286.4L277.1,287.4Z",PR:"M305.4,230.3L306.7,230.5L307.1,231.1L306.4,231.9L304.4,231.9L302.8,232.0L302.8,230.7L303.2,230.2Z",JM:"M275.6,230.3L277.4,230.6L278.7,231.4L279.0,232.2L277.2,232.3L276.3,232.8L274.9,232.3L273.5,231.2L273.9,230.4L275.0,230.2Z",CU:"M265.3,215.7L267.5,215.9L269.6,216.0L271.9,217.0L272.7,218.2L275.2,217.8L276.1,218.5L278.0,220.5L279.4,221.9L280.3,221.8L281.8,222.5L281.5,223.4L283.4,223.5L285.2,224.8L284.8,225.5L283.0,225.9L281.2,226.0L279.5,225.8L275.7,226.1L277.6,224.4L276.7,223.5L275.0,223.3L274.2,222.4L273.9,220.7L272.4,220.8L270.0,219.9L269.3,219.3L266.0,218.8L265.2,218.2L266.3,217.4L263.7,217.3L261.6,218.9L260.5,218.9L260.0,219.7L258.7,220.0L257.6,219.7L259.1,218.8L259.9,217.6L261.2,217.0L262.6,216.3L264.6,216.1Z",ZW:"M561.5,356.7L560.1,356.4L559.2,356.8L558.0,356.2L556.9,356.2L555.3,354.8L553.3,354.3L552.7,352.4L552.7,351.3L551.6,350.9L548.8,347.5L548.0,345.7L547.5,345.2L546.6,342.7L549.5,343.0L550.4,343.4L551.3,343.3L552.8,341.3L555.2,338.7L556.1,338.5L556.5,337.4L558.1,336.2L560.1,335.7L560.2,336.9L562.4,336.8L563.6,337.5L564.1,338.3L565.4,338.5L566.7,339.5L566.5,343.4L565.9,345.6L565.7,347.9L566.1,348.8L565.7,350.7L565.3,350.9L564.5,353.2Z",BW:"M556.9,356.2L553.1,358.5L550.6,360.8L549.7,362.9L548.8,364.1L547.4,364.3L546.9,365.8L546.5,366.8L544.8,367.5L542.7,367.4L541.5,366.5L540.5,366.1L539.2,366.8L538.5,368.3L537.2,369.3L535.8,370.7L534.0,371.0L533.4,369.9L533.8,368.0L532.3,365.0L531.7,364.6L532.0,355.5L534.6,355.4L535.1,344.3L537.0,344.2L541.1,343.1L542.1,344.4L543.8,343.1L544.6,343.1L546.1,342.4L546.6,342.7L547.5,345.2L548.0,345.7L548.8,347.5L551.6,350.9L552.7,351.3L552.7,352.4L553.3,354.3L555.3,354.8Z",NA:"M531.7,364.6L531.2,376.1L528.8,377.7L527.4,377.9L525.8,377.3L524.7,377.1L524.3,375.7L523.3,374.9L522.0,376.4L520.2,374.1L519.3,371.8L518.8,368.8L518.2,366.5L517.5,361.7L517.5,358.0L517.2,356.3L516.3,355.0L515.0,352.4L513.7,348.7L513.1,346.7L511.0,343.7L510.9,341.3L512.2,340.7L513.8,340.2L515.5,340.3L517.1,341.7L517.5,341.5L528.2,341.3L529.9,342.8L536.3,343.3L541.2,342.0L543.4,341.3L545.1,341.5L546.1,342.2L546.1,342.4L544.6,343.1L543.8,343.1L542.1,344.4L541.1,343.1L537.0,344.2L535.1,344.3L534.6,355.4L532.0,355.5Z",SN:"M435.6,245.5L434.5,243.1L433.3,242.0L434.4,241.4L435.8,239.2L436.4,237.7L437.3,236.7L438.7,236.9L440.0,236.2L441.4,236.2L442.7,237.1L444.4,238L446.0,240.2L447.7,242.4L447.8,244.3L448.3,246.1L449.3,246.9L449.5,248.2L449.4,249.1L449.0,249.3L447.5,249.0L447.3,249.4L446.7,249.5L444.8,248.7L443.6,248.7L438.6,248.5L437.9,248.9L437.0,248.8L435.6,249.3L435.2,246.9L437.6,247.0L438.3,246.5L438.8,246.5L439.8,245.8L440.9,246.5L442.1,246.5L443.2,245.8L442.7,244.9L441.8,245.4L441.0,245.4L439.9,244.7L439.1,244.7L438.5,245.5Z",ML:"M449.4,249.1L449.5,248.2L449.3,246.9L448.3,246.1L447.8,244.3L447.7,242.4L448.6,241.8L449.1,240.0L449.9,239.9L451.7,240.8L453.3,240.2L454.3,240.4L454.7,239.7L465.3,239.6L465.9,237.4L465.4,237.1L464.3,223.6L463.2,210.2L467.2,210.1L475.9,216.9L484.7,223.7L485.4,225.2L487.0,226.1L488.2,226.6L488.3,228.6L491.2,228.3L491.2,235.4L489.8,237.5L489.6,239.4L487.2,239.9L483.6,240.2L482.6,241.3L480.9,241.4L479.2,241.4L478.6,240.8L477.1,241.3L474.7,242.6L474.1,243.5L472.1,244.9L471.7,245.7L470.6,246.3L469.3,245.9L468.6,246.7L468.2,248.8L466.1,251.4L466.1,252.4L465.4,253.7L465.6,255.5L464.5,256.0L463.8,256.4L463.4,255.1L462.7,255.4L462.2,255.4L461.7,256.3L459.6,256.2L458.9,255.8L458.6,256.1L457.8,255.2L457.9,254.2L457.6,253.9L457.0,254.2L457.1,253.2L457.7,252.4L456.6,251.1L456.3,250.2L455.7,249.5L455.2,249.5L454.5,249.9L453.7,250.3L452.9,251.0L451.8,250.7L451.1,249.9L450.6,249.8L449.9,250.2L449.5,250.3Z",MR:"M435.2,222.5L435.8,221.5L446.1,221.5L445.7,217.0L446.4,215.4L448.8,215.1L448.9,207.2L457.4,207.3L457.5,202.6L467.2,210.1L463.2,210.2L464.3,223.6L465.4,237.1L465.9,237.4L465.3,239.6L454.7,239.7L454.3,240.4L453.3,240.2L451.7,240.8L449.9,239.9L449.1,240.0L448.6,241.8L447.7,242.4L446.0,240.2L444.4,238L442.7,237.1L441.4,236.2L440.0,236.2L438.7,236.9L437.3,236.7L436.4,237.7L436.2,236.0L437.0,234.4L437.4,231.5L437.2,228.4L436.9,226.9L437.2,225.3L436.6,223.9Z",BJ:"M487.1,268.3L484.9,268.6L484.3,266.5L484.4,259.4L483.9,258.8L483.7,257.2L482.8,256.1L482.0,255.2L482.3,253.6L483.3,253.2L483.8,251.9L485.1,251.6L485.7,250.7L486.6,249.8L487.5,249.8L489.6,251.5L489.5,252.6L490.1,254.4L489.5,255.7L489.8,256.5L488.5,258.4L487.7,259.4L487.2,261.3L487.3,263.3Z",NE:"M518.7,216.7L519.5,221.6L520.5,222.4L520.6,223.4L521.7,224.4L521.2,225.8L520.3,232.1L520.2,236.1L516.9,239.1L515.8,243.1L517.0,244.3L517.0,246.3L518.7,246.4L518.5,247.8L517.7,248.0L517.6,249.0L517.1,249.1L515.3,245.7L514.7,245.5L512.6,247.3L510.6,246.4L509.1,246.2L508.4,246.6L506.8,246.5L505.2,247.9L503.9,247.9L500.7,246.3L499.4,247.1L498.1,247.0L497.1,245.9L494.4,244.7L491.5,245.1L490.9,245.7L490.5,247.5L489.7,248.8L489.6,251.5L487.5,249.8L486.6,249.8L485.7,250.7L485.7,248.5L482.7,247.8L482.6,246.3L481.1,244.3L480.7,242.9L480.9,241.4L482.6,241.3L483.6,240.2L487.2,239.9L489.6,239.4L489.8,237.5L491.2,235.4L491.2,228.3L494.9,226.9L502.4,220.8L511.2,214.8L515.4,216.2L516.9,217.9Z",NG:"M487.1,268.3L487.3,263.3L487.2,261.3L487.7,259.4L488.5,258.4L489.8,256.5L489.5,255.7L490.1,254.4L489.5,252.6L489.6,251.5L489.7,248.8L490.5,247.5L490.9,245.7L491.5,245.1L494.4,244.7L497.1,245.9L498.1,247.0L499.4,247.1L500.7,246.3L503.9,247.9L505.2,247.9L506.8,246.5L508.4,246.6L509.1,246.2L510.6,246.4L512.6,247.3L514.7,245.5L515.3,245.7L517.1,249.1L517.6,249.0L518.7,250.2L518.4,250.8L518.3,251.8L516.1,254.2L515.4,256.2L515.0,257.8L514.5,258.5L514.0,260.7L512.6,261.9L512.2,263.5L511.6,264.8L511.3,266.1L509.5,267.1L508.0,265.8L507.0,265.9L505.4,267.7L504.6,267.7L503.4,270.7L502.7,272.9L499.9,274.0L498.9,273.8L497.9,274.5L495.7,274.5L494.3,272.5L493.4,270.3L491.5,268.3L489.5,268.3Z",CM:"M518.5,247.8L519.5,249.8L519.7,251.9L519.7,253.9L521.2,256.8L519.7,256.7L518.9,256.9L517.7,256.6L517.1,258.1L518.7,259.9L519.9,260.4L520.3,261.7L521.2,263.8L520.7,264.7L519.4,267.8L518.8,268.4L518.6,270.8L518.9,272.1L518.7,273.0L519.9,274.6L520.2,275.7L521.2,277.3L522.4,278.3L522.5,279.7L522.8,280.7L522.6,282.3L520.5,281.6L518.3,280.8L514.9,280.7L514.6,280.5L513.0,280.9L511.4,280.5L510.1,280.7L505.8,280.6L506.2,278.2L505.1,276.1L503.9,275.6L503.3,274.2L502.6,273.7L502.7,272.9L503.4,270.7L504.6,267.7L505.4,267.7L507.0,265.9L508.0,265.8L509.5,267.1L511.3,266.1L511.6,264.8L512.2,263.5L512.6,261.9L514.0,260.7L514.5,258.5L515.0,257.8L515.4,256.2L516.1,254.2L518.3,251.8L518.4,250.8L518.7,250.2L517.6,249.0L517.7,248.0Z",TG:"M482.3,253.6L482.0,255.2L482.8,256.1L483.7,257.2L483.9,258.8L484.4,259.4L484.3,266.5L484.9,268.6L482.8,269.3L482.2,268.2L481.5,266.3L481.3,264.7L481.8,261.9L481.2,260.8L480.9,258.4L480.9,256.1L479.8,254.5L480.0,253.5Z",GH:"M480.0,253.5L479.8,254.5L480.9,256.1L480.9,258.4L481.2,260.8L481.8,261.9L481.3,264.7L481.5,266.3L482.2,268.2L482.8,269.3L478.6,271.1L477.1,272.2L474.7,273.1L472.3,272.2L472.4,271.0L471.3,268.3L472.0,264.8L473.1,262.2L472.4,257.8L472.1,255.5L472.1,253.7L476.7,253.6L477.9,253.8L478.8,253.3Z",CI:"M458.6,256.1L458.9,255.8L459.6,256.2L461.7,256.3L462.2,255.4L462.7,255.4L463.4,255.1L463.8,256.4L464.5,256.0L465.6,255.5L466.8,256.2L467.2,257.2L468.4,257.9L469.3,257.1L470.6,257.0L472.4,257.8L473.1,262.2L472.0,264.8L471.3,268.3L472.4,271.0L472.3,272.2L471.1,272.2L469.2,271.6L467.5,271.7L464.4,272.2L462.5,273.1L459.8,274.2L459.3,274.2L459.5,271.6L459.8,271.2L459.7,270.0L458.6,268.7L457.7,268.5L457.0,267.6L457.6,266.3L457.3,264.8L457.4,263.9L457.8,263.9L458.0,262.5L457.8,261.9L458.1,261.5L459.1,261.1L458.4,258.6L457.8,257.3L458.0,256.3Z",GN:"M443.6,248.7L444.8,248.7L446.7,249.5L447.3,249.4L447.5,249.0L449.0,249.3L449.4,249.1L449.5,250.3L449.9,250.2L450.6,249.8L451.1,249.9L451.8,250.7L452.9,251.0L453.7,250.3L454.5,249.9L455.2,249.5L455.7,249.5L456.3,250.2L456.6,251.1L457.7,252.4L457.1,253.2L457.0,254.2L457.6,253.9L457.9,254.2L457.8,255.2L458.6,256.1L458.0,256.3L457.8,257.3L458.4,258.6L459.1,261.1L458.1,261.5L457.8,261.9L458.0,262.5L457.8,263.9L457.4,263.9L456.7,263.8L456.1,265.0L455.4,265.0L454.8,264.4L455.0,263.1L453.9,261.2L453.2,261.6L452.7,261.6L451.9,261.8L452.0,260.7L451.5,259.9L451.6,259.0L451.1,257.7L450.3,256.6L448.2,256.5L447.6,257.1L446.8,257.2L446.4,257.9L446.1,258.7L444.6,260.1L443.5,258.3L442.4,257.0L441.8,256.6L441.1,256.0L440.8,254.7L440.4,254.0L439.7,253.5L440.9,252.0L441.7,252.0L442.4,251.5L443.0,251.5L443.4,251.1L443.2,250.0L443.5,249.7Z",GW:"M435.6,249.3L437.0,248.8L437.9,248.9L438.6,248.5L443.6,248.7L443.5,249.7L443.2,250.0L443.4,251.1L443.0,251.5L442.4,251.5L441.7,252.0L440.9,252.0L439.7,253.5L438.3,252.2L437.2,252.0L436.6,251.1L436.6,250.6L435.8,250.0Z",LR:"M457.4,263.9L457.3,264.8L457.6,266.3L457.0,267.6L457.7,268.5L458.6,268.7L459.7,270.0L459.8,271.2L459.5,271.6L459.3,274.2L458.6,274.2L455.9,272.7L453.5,270.4L451.2,268.7L449.4,266.7L450.0,265.7L450.2,264.8L451.4,263.1L452.7,261.6L453.2,261.6L453.9,261.2L455.0,263.1L454.8,264.4L455.4,265.0L456.1,265.0L456.7,263.8Z",SL:"M444.6,260.1L446.1,258.7L446.4,257.9L446.8,257.2L447.6,257.1L448.2,256.5L450.3,256.6L451.1,257.7L451.6,259.0L451.5,259.9L452.0,260.7L451.9,261.8L452.7,261.6L451.4,263.1L450.2,264.8L450.0,265.7L449.4,266.7L448.7,266.4L446.8,265.2L445.4,263.5L444.9,262.4Z",BF:"M465.6,255.5L465.4,253.7L466.1,252.4L466.1,251.4L468.2,248.8L468.6,246.7L469.3,245.9L470.6,246.3L471.7,245.7L472.1,244.9L474.1,243.5L474.7,242.6L477.1,241.3L478.6,240.8L479.2,241.4L480.9,241.4L480.7,242.9L481.1,244.3L482.6,246.3L482.7,247.8L485.7,248.5L485.7,250.7L485.1,251.6L483.8,251.9L483.3,253.2L482.3,253.6L480.0,253.5L478.8,253.3L477.9,253.8L476.7,253.6L472.1,253.7L472.1,255.5L472.4,257.8L470.6,257.0L469.3,257.1L468.4,257.9L467.2,257.2L466.8,256.2Z",CF:"M553.1,271.5L552.3,271.8L550.5,271.7L548.5,271.4L547.5,271.7L547.1,272.4L546.3,272.5L545.2,271.9L542.2,273.4L541.0,273.1L540.7,273.3L539.9,275.2L537.9,274.6L535.9,274.3L534.2,273.1L532.0,272.1L530.6,273.1L529.5,274.7L529.3,276.8L527.6,276.6L525.8,276.1L524.2,277.8L522.8,280.7L522.5,279.7L522.4,278.3L521.2,277.3L520.2,275.7L519.9,274.6L518.7,273.0L518.9,272.1L518.6,270.8L518.8,268.4L519.4,267.8L520.7,264.7L522.9,264.5L523.4,263.7L523.9,263.7L524.5,264.4L527.9,263.2L529.0,262.0L530.4,260.9L530.1,259.8L530.9,259.6L533.4,259.8L535.9,258.3L537.8,254.9L539.1,253.7L540.8,253.1L541.1,254.5L542.7,256.4L542.7,257.7L542.3,259.0L542.5,259.9L543.4,260.8L545.5,262.2L547.0,263.4L547.0,264.4L548.8,266.1L550.0,267.4L550.7,269.3L552.7,270.5Z",CG:"M529.3,276.8L529.2,278.7L528.4,280.3L527.8,282.3L527.5,285.0L527.7,286.8L527.2,287.9L527.2,289.0L526.9,290.0L525.1,291.5L523.9,293.1L522.7,296.1L522.8,298.6L522.1,299.6L520.5,301.1L518.9,303.1L517.9,302.5L517.8,301.6L516.3,301.6L515.4,302.8L514.7,302.5L513.7,301.4L512.9,301.9L511.8,303.3L509.6,300.0L511.7,298.3L510.7,296.2L511.6,295.5L513.4,295.1L513.6,293.7L515.0,295.2L517.4,295.3L518.2,293.9L518.6,291.8L518.3,289.4L517.0,287.5L518.2,284.0L517.5,283.4L515.5,283.6L514.7,282.0L514.9,280.7L518.3,280.8L520.5,281.6L522.6,282.3L522.8,280.7L524.2,277.8L525.8,276.1L527.6,276.6Z",GA:"M510.1,280.7L511.4,280.5L513.0,280.9L514.6,280.5L514.9,280.7L514.7,282.0L515.5,283.6L517.5,283.4L518.2,284.0L517.0,287.5L518.3,289.4L518.6,291.8L518.2,293.9L517.4,295.3L515.0,295.2L513.6,293.7L513.4,295.1L511.6,295.5L510.7,296.2L511.7,298.3L509.6,300.0L506.9,296.9L505.1,294.3L503.5,291.1L503.6,290.1L504.2,289.1L504.8,286.8L505.4,284.5L506.3,284.4L510.2,284.4Z",GQ:"M505.8,280.6L510.1,280.7L510.2,284.4L506.3,284.4L505.4,284.5L504.9,284.1Z",ZM:"M562.0,313.5L563.1,314.3L564.1,314.8L565.8,315.3L567.3,316.3L568.5,317.6L569.1,320.3L568.6,321.1L568.0,323.6L568.5,326.2L567.6,327.3L566.7,330.2L568.0,331.0L559.9,333.5L560.1,335.7L558.1,336.2L556.5,337.4L556.1,338.5L555.2,338.7L552.8,341.3L551.3,343.3L550.4,343.4L549.5,343.0L546.6,342.7L546.1,342.4L546.1,342.2L545.1,341.5L543.4,341.3L541.2,342.0L539.5,340.1L537.8,337.5L538.2,327.6L543.7,327.7L543.5,326.6L544.0,325.4L543.5,324.0L543.9,322.5L543.6,321.5L544.5,321.6L544.6,322.6L545.9,322.5L547.6,322.8L548.4,324.2L550.6,324.6L552.2,323.6L552.8,325.3L554.8,325.7L555.7,327.0L556.8,328.7L558.8,328.8L558.7,325.4L557.9,326.0L556.1,324.8L555.4,324.2L555.8,321.1L556.4,317.4L555.8,316.1L556.6,314.1L557.3,313.7L560.9,313.2Z",MW:"M567.3,316.3L569.9,316.8L570.4,317.7L571.3,319.1L571.9,323.4L571.1,325.7L571.7,329.8L572.6,329.7L573.5,330.7L574.5,333.0L574.6,336.9L573.4,337.6L572.5,339.8L570.9,337.8L570.8,335.6L571.4,334.2L571.3,333.0L570.3,332.2L569.5,332.5L568.0,331.0L566.7,330.2L567.6,327.3L568.5,326.2L568.0,323.6L568.6,321.1L569.1,320.3L568.5,317.6Z",MZ:"M571.9,323.4L573.9,323.1L577.1,324.0L577.8,323.6L579.6,323.5L580.6,322.6L582.2,322.6L585.1,321.4L587.3,319.6L587.7,321.0L587.5,324.1L587.7,326.8L587.6,331.7L588.0,333.2L587.1,335.4L586.0,337.6L584.2,339.5L581.7,340.7L578.6,342.2L575.5,345.5L574.4,346.1L572.5,348.3L571.4,349.0L571.0,351.2L572.1,353.6L572.5,355.4L572.5,356.4L573.0,356.2L572.7,359.3L572.2,360.7L572.7,361.2L572.3,362.5L571.1,363.7L568.9,364.7L565.6,366.4L564.4,367.5L564.6,368.9L565.2,369.1L564.9,370.7L562.9,370.7L562.8,369.3L562.5,367.9L562.3,366.8L563.0,363.3L562.5,361.1L561.5,356.7L564.5,353.2L565.3,350.9L565.7,350.7L566.1,348.8L565.7,347.9L565.9,345.6L566.5,343.4L566.7,339.5L565.4,338.5L564.1,338.3L563.6,337.5L562.4,336.8L560.2,336.9L560.1,335.7L559.9,333.5L568.0,331.0L569.5,332.5L570.3,332.2L571.3,333.0L571.4,334.2L570.8,335.6L570.9,337.8L572.5,339.8L573.4,337.6L574.6,336.9L574.5,333.0L573.5,330.7L572.6,329.7L571.7,329.8L571.1,325.7Z",SZ:"M562.9,370.7L562.3,372.1L560.7,372.4L559.3,370.7L559.4,369.6L560.1,368.5L560.5,367.6L561.2,367.3L562.5,367.9L562.8,369.3Z",AO:"M514.7,302.5L513.7,303.1L513.3,303.9L513.2,305.3L512.5,305.6L511.8,303.3L512.9,301.9L513.7,301.4ZM512.9,306.6L514.0,306.1L514.8,306.2L515.7,305.8L523.6,305.9L524.2,308.2L525.0,310.0L525.6,311.0L526.6,312.7L528.3,312.4L529.2,312.0L530.7,312.4L531.1,311.6L531.8,309.8L533.5,309.7L533.6,309.2L535.0,309.2L534.7,310.3L538.0,310.3L538.0,312.2L538.5,313.4L538.1,315.3L538.3,317.2L539.1,318.3L538.9,322.0L539.6,321.7L540.7,321.8L542.4,321.3L543.6,321.5L543.9,322.5L543.5,324.0L544.0,325.4L543.5,326.6L543.7,327.7L538.2,327.6L537.8,337.5L539.5,340.1L541.2,342.0L536.3,343.3L529.9,342.8L528.2,341.3L517.5,341.5L517.1,341.7L515.5,340.3L513.8,340.2L512.2,340.7L510.9,341.3L510.7,339.4L511.1,336.6L512.1,333.8L512.2,332.5L513.1,329.7L513.8,328.4L515.3,326.4L516.2,325.0L516.5,322.7L516.4,320.9L515.6,319.8L514.9,317.9L514.3,316.1L514.4,315.4L515.3,314.2L514.5,311.2L513.9,309.1L512.6,307.2Z",BI:"M561.5,295.1L561.6,296.4L562.2,297.1L562.2,298.1L561.6,298.7L560.5,300.3L559.5,301.5L558.4,301.6L558.3,297.9L557.6,296.5L559.2,296.7L560.1,294.9Z",IL:"M570.7,186.0L570.3,187.0L569.4,186.6L569.0,188.6L569.7,189.0L569.1,189.4L569.1,190.2L570.2,189.8L570.4,191.0L569.6,196.0L569.2,195.2L567.4,190.7L568.1,189.6L567.9,189.5L568.4,188.0L568.7,185.7L569.0,184.9L569.1,184.8L569.9,184.8L570.1,184.3L570.8,184.2L570.9,185.5L570.6,186.0Z",LB:"M570.8,184.2L570.1,184.3L569.9,184.8L569.1,184.8L569.7,182.3L570.7,180.1L570.8,180.0L571.9,180.2L572.5,181.4L571.2,182.5Z",MG:"M611.6,326.3L612.2,327.6L612.8,329.7L613.0,333.4L613.6,334.9L613.2,336.4L612.7,337.3L611.9,335.4L611.4,336.4L611.7,338.7L611.4,340.0L610.6,340.7L610.3,343.3L609.0,347.0L607.3,351.2L605.2,357.2L603.8,361.5L602.3,365.1L600.1,365.8L597.7,367.2L596.3,366.4L594.4,365.2L593.8,363.6L593.9,360.8L593.1,358.3L593.1,356.1L593.7,353.9L595.0,353.3L595.1,352.3L596.5,349.9L596.9,347.9L596.4,346.5L596.0,344.5L596.0,341.7L597.0,339.9L597.5,337.9L598.8,337.8L600.3,337.2L601.3,336.6L602.5,336.6L604.1,334.8L606.4,332.9L607.3,331.3L607.0,330.0L608.1,330.4L609.6,328.2L609.8,326.4L610.7,325.0Z",PS:"M570.2,189.8L569.1,190.2L569.1,189.4L569.7,189.0L569.0,188.6L569.4,186.6L570.3,187.0L570.5,188.9Z",GM:"M435.6,245.5L438.5,245.5L439.1,244.7L439.9,244.7L441.0,245.4L441.8,245.4L442.7,244.9L443.2,245.8L442.1,246.5L440.9,246.5L439.8,245.8L438.8,246.5L438.3,246.5L437.6,247.0L435.2,246.9Z",TN:"M504.2,193.5L503.0,187.9L501.4,186.7L501.4,185.9L499.2,184.0L499.0,181.7L500.5,180.0L501.0,177.4L500.5,174.4L501.0,172.8L503.7,171.6L505.5,172.0L505.4,173.5L507.5,172.4L507.7,173.0L506.5,174.5L506.5,175.9L507.4,176.7L507.2,179.4L505.6,181.0L506.1,182.7L507.4,182.7L508.1,184.2L509.1,184.7L509.0,187.1L507.8,188.0L507.1,189.0L505.3,190.2L505.6,191.5L505.5,192.8Z",DZ:"M457.5,202.6L457.6,202.0L457.6,201.8L457.6,198.1L461.8,195.8L464.4,195.3L466.5,194.5L467.5,192.9L470.5,191.7L470.7,189.4L472.1,189.1L473.3,187.9L476.6,187.4L477.1,186.2L476.4,185.5L475.6,182.3L475.4,180.4L474.5,178.4L476.9,176.7L479.6,176.1L481.2,174.8L483.6,173.9L487.9,173.3L492.0,173.1L493.3,173.5L495.6,172.3L498.3,172.3L499.3,173.0L501.0,172.8L500.5,174.4L501.0,177.4L500.5,180.0L499.0,181.7L499.2,184.0L501.4,185.9L501.4,186.7L503.0,187.9L504.2,193.5L505.1,196.3L505.3,197.7L504.9,200.3L505.1,201.7L504.8,203.4L505.1,205.3L504.1,206.6L505.7,208.9L505.8,210.3L506.8,212.0L508.0,211.4L510.1,212.9L511.2,214.8L502.4,220.8L494.9,226.9L491.2,228.3L488.3,228.6L488.2,226.6L487.0,226.1L485.4,225.2L484.7,223.7L475.9,216.9L467.2,210.1Z",JO:"M570.3,187.0L570.7,186.0L573.6,187.3L578.3,183.9L579.7,187.7L579.3,188.2L574.3,189.8L577.2,192.9L576.4,193.4L576.0,194.5L574.1,194.9L573.6,196.0L572.6,197.0L569.7,196.5L569.6,196.0L570.4,191.0L570.2,189.8L570.5,188.9Z",AE:"M614.2,212.4L614.6,212.3L614.8,213.1L616.8,212.6L619.0,212.7L620.6,212.8L622.1,210.7L623.8,208.7L625.2,206.8L625.8,207.8L626.5,210.3L625.2,210.3L625.2,212.3L625.7,212.8L624.6,213.4L624.7,214.7L624.1,216L624.1,217.2L623.7,217.9L615.7,216.3L614.4,213.1Z",QA:"M612.0,210.8L611.6,208.6L612.1,206.9L612.8,206.6L613.7,207.6L613.9,209.4L613.6,211.2L612.9,211.4Z",KW:"M602.9,194.5L603.6,195.9L603.4,196.6L604.5,199.0L602.7,199.1L601.9,197.6L599.6,197.3L601.1,194.3Z",IQ:"M579.7,187.7L578.3,183.9L583.5,180.7L584.0,176.9L583.4,174.7L584.7,173.9L585.7,172.0L586.7,171.5L589.7,171.9L590.7,172.7L591.8,172.1L594.0,175.8L595.7,176.8L596.2,178.6L595.1,179.7L594.8,182.1L596.9,185.1L600.3,186.8L601.9,189.1L601.8,191.4L602.6,191.4L602.8,193.1L604.4,194.7L602.9,194.5L601.1,194.3L599.6,197.3L594.8,197.0L586.9,190.8L582.8,188.6Z",OM:"M624.1,217.2L624.1,216L624.7,214.7L624.6,213.4L625.7,212.8L625.2,212.3L625.2,210.3L626.5,210.3L627.9,212.4L629.5,213.6L631.4,214.0L633.0,214.5L634.4,216.3L635.2,217.4L636.2,217.7L636.3,218.4L635.5,220.3L635.2,221.2L634.2,222.2L633.4,224.3L632.2,224.1L631.8,224.9L631.5,226.5L632.0,228.5L631.8,228.9L630.6,228.9L629.0,230.1L628.9,231.6L628.4,232.2L626.7,232.2L625.7,233.0L625.8,234.3L624.6,235.1L623.2,234.8L621.5,235.9L620.3,236.1L619.2,233.9L616.8,228.7L624.4,225.6L625.6,219.4ZM625.8,207.8L625.2,206.8L625.8,205.7L626.2,206.0L626.1,207.3Z",VU:"M922.3,336.9L923.5,338.7L922.6,339.1L922.0,337.8ZM921.3,336.2L921.1,335.4L921.5,333.0L922.6,334.0L922.5,336.5L921.9,336.1Z",KH:"M752.6,249.9L751.6,246.2L753.0,243.6L756.4,243.0L758.9,243.4L761.2,244.7L762.2,242.5L764.7,243.7L765.5,245.7L765.6,249.4L761.4,251.8L762.8,253.7L760.0,253.9L757.8,255.2L755.5,254.7L754.3,253.1Z",TH:"M758.9,243.4L756.4,243.0L753.0,243.6L751.6,246.2L752.6,249.9L750.1,248.5L747.8,248.5L748.0,246.1L745.6,246.1L745.8,249.5L744.8,254.1L744.1,256.8L744.5,259.1L746.2,259.1L747.5,262.0L748.2,264.7L749.8,266.4L751.4,266.8L752.9,268.4L752.0,269.7L750.3,270.0L750.0,268.5L747.8,267.1L747.3,267.7L746.2,266.5L745.7,264.9L744.1,263.2L742.7,261.7L742.4,263.5L741.8,261.8L742.0,259.9L742.5,256.9L743.6,253.7L744.8,250.8L743.4,248.0L743.3,246.6L742.8,244.8L740.8,242.4L740.0,240.8L740.8,240.2L741.4,237.5L740.1,235.5L738.1,233.2L736.4,230.5L737.5,229.9L738.2,226.5L740.0,226.4L741.3,225.1L742.7,224.3L744.0,225.3L744.4,227.2L746.2,227.3L746.1,230.6L746.6,233.4L749.1,231.5L750.0,232.1L751.5,232.0L751.9,230.9L753.9,231.1L756.3,233.6L756.9,236.7L759.4,239.4L759.6,242.0Z",LA:"M764.7,243.7L762.2,242.5L761.2,244.7L758.9,243.4L759.6,242.0L759.4,239.4L756.9,236.7L756.3,233.6L753.9,231.1L751.9,230.9L751.5,232.0L750.0,232.1L749.1,231.5L746.6,233.4L746.1,230.6L746.2,227.3L744.4,227.2L744.0,225.3L742.7,224.3L743.1,223.2L744.9,221.2L745.3,221.9L746.7,222.0L745.7,218.4L746.9,218.0L748.9,220.4L750.6,223.2L753.8,223.3L755.3,226.0L753.8,226.8L753.2,227.9L756.7,229.8L759.4,233.5L761.5,236.2L763.8,238.4L764.8,240.6Z",MM:"M742.7,224.3L741.3,225.1L740.0,226.4L738.2,226.5L737.5,229.9L736.4,230.5L738.1,233.2L740.1,235.5L741.4,237.5L740.8,240.2L740.0,240.8L740.8,242.4L742.8,244.8L743.3,246.6L743.4,248.0L744.8,250.8L743.6,253.7L742.5,256.9L742.1,254.6L742.7,252.2L741.6,250.4L741.5,247.0L740.3,245.4L739.0,241.7L738.0,237.8L736.5,235.2L735.0,236.7L732.3,239.0L730.8,238.7L729.0,238.0L729.5,234.1L728.5,231.2L725.9,227.6L726.1,226.5L724.5,226.1L722.2,223.6L721.7,221.0L722.7,221.5L722.4,219.3L723.5,218.5L723.0,217.2L723.4,216.2L722.9,212.9L725.1,213.6L725.8,211.1L725.6,209.6L726.5,206.9L726.1,205.2L729.0,203.0L730.9,203.6L730.3,201.6L731.1,201.1L730.6,199.9L732.1,199.7L733.3,201.5L734.6,202.2L735.2,204.6L735.7,207.2L733.8,209.8L734.2,213.5L736.8,213.0L738.0,215.8L739.8,216.5L739.5,219.0L741.6,220.2L742.9,220.8L744.6,219.9L744.9,221.2L743.1,223.2Z",VN:"M757.8,255.2L760.0,253.9L762.8,253.7L761.4,251.8L765.6,249.4L765.5,245.7L764.7,243.7L764.8,240.6L763.8,238.4L761.5,236.2L759.4,233.5L756.7,229.8L753.2,227.9L753.8,226.8L755.3,226.0L753.8,223.3L750.6,223.2L748.9,220.4L746.9,218.0L748.2,217.2L750.3,217.2L752.8,216.9L754.7,215.2L756.1,216.4L758.6,216.9L758.6,218.7L760.1,220.0L762.9,220.8L759.9,223.5L758.2,226.4L758.0,228.6L760.5,231.8L763.6,235.9L766.3,237.8L768.2,240.3L770.1,246.1L770.4,251.5L768.4,253.6L765.5,255.6L763.6,258.1L760.5,261.0L759.3,259.0L759.9,256.9Z",KP:"M799.6,156.5L799.6,156.5L799.6,156.5ZM799.0,156.0L799.6,156.5L798.6,156.3L798.0,157.4L797.8,158.4L798.9,160.6L798.0,161.3L797.8,161.9L797.3,162.8L795.9,163.3L795.2,164.1L795.7,165.5L795.5,165.8L796.8,166.3L798.7,167.7L798.7,168.4L797.7,168.6L796.0,168.8L795.7,170.2L794.5,170.1L794.5,170.3L793.0,169.8L792.9,170.3L792.3,170.6L792.0,170.0L791.2,169.7L790.4,169.2L790.5,167.9L790.9,167.5L790.4,166.9L790.4,165.3L790.0,164.8L788.4,164.4L786.9,163.6L788.0,161.6L790.0,159.9L790.6,157.8L792.2,158.7L794.4,158.8L793.3,157.2L796.4,155.9L796.5,154.2Z",KR:"M794.5,170.3L794.5,170.1L795.7,170.2L796.0,168.8L797.7,168.6L798.7,168.4L798.7,167.7L802.5,171.3L803.9,173.3L805.4,176.9L805.1,178.6L803.0,179.2L801.5,180.5L799.3,180.8L798.4,179.1L798.0,176.8L795.6,173.5L797.3,173.0Z",MN:"M686.6,135.0L688.9,134.4L692.3,131.9L695.2,130.4L697.7,131.4L700.1,131.4L702.3,132.8L704.7,132.9L708.4,133.7L709.8,131.6L708.0,129.8L708.9,126.7L712.1,128.0L714.4,128.3L717.5,129.1L719.0,131.3L723.0,132.6L724.9,132.0L727.7,131.6L730.2,132.0L733.2,133.5L735.4,135.0L737.6,135.0L740.8,135.5L742.6,134.7L745.4,134.2L747.8,132.1L749.3,132.4L751.1,133.4L753.8,133.2L753.8,135.4L753.7,138.5L755.0,139.7L756.1,139.3L758.7,139.8L760.0,138.7L762.4,139.6L765.6,141.8L765.9,142.8L763.8,142.5L760.6,142.9L759.3,143.8L758.5,145.8L755.4,147.0L753.8,148.6L751.0,148L749.5,147.7L749.2,149.6L750.5,150.8L751.3,151.8L750.0,152.9L749.0,154.5L746.6,155.6L743.0,155.7L739.5,156.8L737.3,158.4L735.8,157.5L732.8,157.5L728.5,155.6L725.9,155.2L722.8,155.6L717.5,154.9L714.9,155.0L712.8,153.1L710.6,150.3L709.0,150.0L705.4,148.1L702.0,147.6L698.9,147.1L697.5,145.8L697.1,142.2L694.5,139.8L690.7,138.7L688.1,137.1Z",IN:"M730.6,199.9L731.1,201.1L730.3,201.6L730.9,203.6L729.0,203.0L726.1,205.2L726.5,206.9L725.6,209.6L725.8,211.1L725.1,213.6L722.9,212.9L723.4,216.2L723.0,217.2L723.5,218.5L722.4,219.3L720.1,214.3L719.4,214.4L719.3,216.3L717.6,214.7L718.1,213.0L719.2,212.8L719.9,210.1L718.3,209.6L715.9,209.6L713.4,209.2L712.8,207.1L711.5,206.9L709.2,205.6L708.7,207.7L710.8,209.3L709.4,210.5L709.1,211.6L710.8,212.5L710.7,214.3L712.0,216.7L712.8,219.2L712.6,220.4L710.8,220.3L707.7,221.0L708.2,223.3L707.1,225.2L703.6,227.3L701.1,230.9L699.4,232.9L697.0,234.9L697.1,236.3L695.9,237.1L693.6,238.2L692.4,238.4L691.9,240.8L692.8,244.8L693.2,247.4L692.3,250.3L692.6,255.6L691.3,255.7L690.2,258.1L691.1,259.1L688.7,260.0L687.9,262.1L686.9,263.0L684.2,260.1L682.7,255.8L681.5,252.6L680.5,251.2L678.8,248.2L677.9,244.3L677.2,242.4L674.4,238.1L672.7,232.1L671.5,228.1L671.1,224.3L670.2,221.4L666.6,223.3L664.7,222.9L660.8,219.1L662.0,218.0L661.0,216.8L657.6,214.1L659.1,212.1L664.8,212.1L663.9,209.4L662.2,207.8L661.5,205.4L659.6,204.0L662.0,200.7L665.0,201.0L667.1,197.7L668.2,194.5L670.1,191.4L669.6,189.2L671.4,187.4L669.0,185.8L667.7,183.7L666.2,181.0L667.2,179.7L671.2,180.4L673.9,180.0L675.7,177.4L679.3,181.0L679.6,183.5L680.9,185.1L681.2,186.7L679.3,186.3L680.7,189.7L683.7,191.7L687.7,193.9L686.3,195.3L685.9,198.2L688.6,199.4L691.3,200.9L695.0,202.7L698.6,203.1L700.4,204.7L702.5,205.0L705.7,205.7L707.9,205.7L707.9,204.4L707.2,202.4L707.1,201.1L708.6,200.4L709.3,202.9L709.5,203.5L712.1,204.7L713.6,204.2L715.8,204.4L717.9,204.3L717.7,202.4L716.4,201.4L718.4,201.0L720.3,198.7L722.8,196.7L725.1,197.5L726.6,196.2L728.3,198.1L727.7,199.4Z",BD:"M722.4,219.3L722.7,221.5L721.7,221.0L722.2,223.6L721.2,221.9L720.8,220.3L720.1,218.8L718.7,217.0L716.3,216.9L716.7,218.2L716.2,219.9L715.0,219.3L714.7,219.9L713.9,219.5L712.8,219.2L712.0,216.7L710.7,214.3L710.8,212.5L709.1,211.6L709.4,210.5L710.8,209.3L708.7,207.7L709.2,205.6L711.5,206.9L712.8,207.1L713.4,209.2L715.9,209.6L718.3,209.6L719.9,210.1L719.2,212.8L718.1,213.0L717.6,214.7L719.3,216.3L719.4,214.4L720.1,214.3Z",BT:"M716.4,201.4L717.7,202.4L717.9,204.3L715.8,204.4L713.6,204.2L712.1,204.7L709.5,203.5L709.3,202.9L710.5,200.6L711.8,199.8L713.7,200.5L715.1,200.6Z",NP:"M707.1,201.1L707.2,202.4L707.9,204.4L707.9,205.7L705.7,205.7L702.5,205.0L700.4,204.7L698.6,203.1L695.0,202.7L691.3,200.9L688.6,199.4L685.9,198.2L686.3,195.3L687.7,193.9L688.6,193.2L690.8,194.1L693.8,196.1L695.4,196.6L696.5,198.1L698.7,198.7L701.0,200.1L704.1,200.8Z",PK:"M675.7,177.4L673.9,180.0L671.2,180.4L667.2,179.7L666.2,181.0L667.7,183.7L669.0,185.8L671.4,187.4L669.6,189.2L670.1,191.4L668.2,194.5L667.1,197.7L665.0,201.0L662.0,200.7L659.6,204.0L661.5,205.4L662.2,207.8L663.9,209.4L664.8,212.1L659.1,212.1L657.6,214.1L655.6,213.4L654.5,211.1L652.2,208.7L647.5,209.3L643.3,209.4L639.7,209.8L640.2,206.2L643.7,204.6L643.3,203.2L642.0,202.6L641.5,199.9L638.8,198.5L637.5,196.6L636.0,195.0L640.5,196.6L643.0,196.1L644.6,196.5L645.0,195.8L646.9,196.1L650.0,194.8L649.6,192.2L650.8,190.4L652.7,190.4L652.8,189.5L654.7,189.1L655.7,189.4L656.5,188.5L656.0,186.7L656.7,184.8L658.2,184.0L656.8,181.9L659.2,182.0L659.6,180.9L659.3,179.7L660.3,178.4L659.6,176.9L658.8,175.5L659.9,174.2L662.5,173.5L665.3,173.2L666.4,172.6L667.8,172.3L670.0,173.7L671.3,176.1Z",AF:"M646.0,171.5L647.4,171.6L649.4,172.2L650.3,172.6L651.9,171.6L652.8,172.2L653.3,170.8L654.8,170.8L655.1,170.4L655.1,169.1L655.9,168.1L657.4,168.8L657.4,169.7L658.2,169.9L658.5,172.5L659.8,173.5L660.5,172.8L661.5,172.5L662.7,171.1L664.5,171.4L667.1,171.4L667.8,172.3L666.4,172.6L665.3,173.2L662.5,173.5L659.9,174.2L658.8,175.5L659.6,176.9L660.3,178.4L659.3,179.7L659.6,180.9L659.2,182.0L656.8,181.9L658.2,184.0L656.7,184.8L656.0,186.7L656.5,188.5L655.7,189.4L654.7,189.1L652.8,189.5L652.7,190.4L650.8,190.4L649.6,192.2L650.0,194.8L646.9,196.1L645.0,195.8L644.6,196.5L643.0,196.1L640.5,196.6L636.0,195.0L637.9,192.2L637.4,190.2L635.3,189.6L634.8,187.7L633.6,185.2L634.4,183.5L633.2,183.0L633.5,180.7L633.8,176.9L636.6,178.0L638.4,177.6L638.6,176.2L640.5,175.8L641.8,174.8L641.8,172.3L643.7,171.7L643.9,170.6L645.2,171.4Z",TJ:"M649.4,172.2L650.1,169.1L649.1,166.8L647.1,166.0L647.4,164.7L649.5,164.8L650.3,163.1L650.6,161.1L653.7,160.4L653.5,161.8L654.1,162.7L655.1,162.6L654.4,163.6L651.6,163.1L651.8,164.8L654.4,164.6L657.7,165.6L662.3,165.1L663.7,168.0L664.4,167.7L666.1,168.4L666.3,169.6L667.1,171.4L664.5,171.4L662.7,171.1L661.5,172.5L660.5,172.8L659.8,173.5L658.5,172.5L658.2,169.9L657.4,169.7L657.4,168.8L655.9,168.1L655.1,169.1L655.1,170.4L654.8,170.8L653.3,170.8L652.8,172.2L651.9,171.6L650.3,172.6Z",KG:"M653.4,156.4L653.5,155.0L655.0,154.6L659.3,155.7L659.2,153.8L660.4,153.2L664.3,154.5L665.0,154.2L669.1,154.2L672.8,154.6L674.4,155.7L676.0,156.1L675.9,156.8L672.5,158.5L672.0,159.7L668.9,160.1L668.5,162.0L665.8,161.6L664.3,162.2L662.3,163.7L662.8,164.4L662.3,165.1L657.7,165.6L654.4,164.6L651.8,164.8L651.6,163.1L654.4,163.6L655.1,162.6L657.1,162.9L659.6,160.7L656.3,159.1L654.7,159.8L652.6,158.7L654.2,156.7Z",TM:"M608.5,157.9L609.4,156.8L612.1,156.2L613.9,157.1L616.1,159.5L617.3,159.3L620.1,159.3L619.4,157.7L621.2,156.7L622.9,154.9L626.5,156.5L627.4,159.0L628.4,159.6L631.1,159.5L632.0,160.0L633.9,163.2L637.2,165.3L639.1,166.8L642.1,168.3L645.7,169.6L646.0,171.5L645.2,171.4L643.9,170.6L643.7,171.7L641.8,172.3L641.8,174.8L640.5,175.8L638.6,176.2L638.4,177.6L636.6,178.0L633.8,176.9L633.1,174.2L631.2,174.1L627.8,171.4L625.7,171.0L622.7,169.5L620.9,169.2L619.9,169.8L618.2,169.7L616.7,171.4L614.7,172.0L613.8,169.9L613.6,166.6L611.5,165.6L611.7,163.4L610.0,163.3L610.1,160.7L612.6,161.4L614.5,160.4L612.4,158.6L611.3,156.8L609.5,157.6L609.7,159.9Z",IR:"M604.4,194.7L602.8,193.1L602.6,191.4L601.8,191.4L601.9,189.1L600.3,186.8L596.9,185.1L594.8,182.1L595.1,179.7L596.2,178.6L595.7,176.8L594.0,175.8L591.8,172.1L590.1,169.7L590.4,168.7L589.1,165.1L590.7,164.3L591.3,165.4L592.7,166.9L594.5,167.3L595.4,167.2L597.9,164.9L598.8,164.7L599.7,165.6L599.1,167.1L600.9,168.7L601.5,168.6L602.7,170.9L605.1,171.5L607.1,173.1L610.8,173.6L614.5,172.8L614.7,172.0L616.7,171.4L618.2,169.7L619.9,169.8L620.9,169.2L622.7,169.5L625.7,171.0L627.8,171.4L631.2,174.1L633.1,174.2L633.8,176.9L633.5,180.7L633.2,183.0L634.4,183.5L633.6,185.2L634.8,187.7L635.3,189.6L637.4,190.2L637.9,192.2L636.0,195.0L637.5,196.6L638.8,198.5L641.5,199.9L642.0,202.6L643.3,203.2L643.7,204.6L640.2,206.2L639.7,209.8L634.7,208.9L631.8,208.2L628.8,207.8L627.2,203.9L625.9,203.4L624.0,203.9L621.6,205.4L618.3,204.4L615.4,202.0L612.8,201.1L610.7,198.2L608.3,194.0L607.0,194.5L605.2,193.5Z",SY:"M570.7,186.0L570.6,186.0L570.9,185.5L570.8,184.2L571.2,182.5L572.5,181.4L571.9,180.2L570.8,180.0L570.3,177.6L570.7,176.3L571.3,175.7L571.9,175.0L571.9,173.2L572.8,173.8L575.4,173.0L576.8,173.6L578.9,173.6L581.6,172.4L583.0,172.4L585.7,172.0L584.7,173.9L583.4,174.7L584.0,176.9L583.5,180.7L578.3,183.9L573.6,187.3Z",AM:"M595.4,167.2L594.5,167.3L593.2,165.5L593.1,165.0L592.1,165.0L591.2,164.2L590.7,164.3L589.6,163.4L587.6,162.6L587.6,161.1L587.0,160.0L590.4,159.5L591.0,160.3L592.0,160.9L591.7,161.6L593.2,162.7L592.6,163.7L593.8,164.5L595.0,165.0Z",SE:"M504.3,106.9L505.2,105.3L506.9,103.4L507.4,100.1L505.9,98.6L505.5,95.0L506.7,92.4L508.8,92.4L509.4,91.3L508.6,90.4L511.4,86.6L513.2,83.6L514.4,81.7L516.3,81.7L516.7,80.3L520.6,80.7L520.6,78.9L521.9,78.8L524.8,80.1L528.3,81.9L529.0,86.0L529.9,87.1L526.4,87.9L524.6,89.8L525.2,91.4L522.1,93.6L518.2,96.0L517.1,99.9L518.8,101.9L521.1,103.5L519.4,106.7L517.2,107.3L516.8,112.1L515.8,114.8L513.0,114.6L511.9,116.9L509.3,117.0L508.4,114.3L506.3,111.0Z",BY:"M543.5,114.6L545.9,115.4L546.4,116.1L547.5,115.8L549.8,116.4L550.3,117.8L549.9,118.6L551.7,120.5L552.7,121.1L552.6,121.6L554.3,122.1L555.0,122.9L554.3,123.5L552.4,123.4L552.0,123.7L552.7,124.7L553.5,126.6L551.6,126.8L551.0,127.4L551.0,128.9L550.1,128.6L548.0,128.8L547.3,128.1L546.5,128.6L545.6,128.2L543.7,128.1L541.0,127.4L538.7,127.1L536.9,127.2L535.7,128.0L534.6,128.1L534.4,126.8L533.5,125.4L534.8,124.8L534.7,123.7L534.0,122.5L533.7,121.2L535.9,121.3L538.2,120.1L538.6,118.5L540.3,117.6L539.9,116.3L541.2,115.8Z",UA:"M553.5,126.6L554.4,126.7L554.9,126.0L555.6,126.2L558.0,125.9L559.7,127.6L559.3,128.2L559.6,129.1L561.5,129.2L562.5,130.5L562.6,131.1L565.7,132.2L567.4,131.7L569.1,133.1L570.5,133.1L574.1,134.0L574.3,134.9L573.7,136.5L574.5,138.2L574.3,139.2L572.0,139.4L570.9,140.2L571.1,141.6L569.2,141.8L567.8,142.8L565.6,143.0L563.7,144.1L564.0,145.7L563.7,145.6L563.3,145.0L562.5,144.9L560.7,144.3L560.2,145.0L559.8,144.7L556.0,143.9L555.6,142.8L553.5,143.2L552.8,144.8L551.2,147.1L550.1,146.6L549.0,147.1L547.9,146.5L548.4,146.2L548.7,145.1L549.3,144.2L549.0,143.6L549.5,143.4L549.8,143.8L551.2,143.9L551.8,143.6L551.3,143.3L551.4,142.9L550.5,142.1L550.0,140.8L549.1,140.3L549.1,139.3L547.9,138.5L546.9,138.4L545.1,137.5L543.5,137.8L543.0,138.2L542.0,138.2L541.5,138.9L539.8,139.2L539.0,139.7L537.9,138.9L536.3,138.9L534.8,138.6L533.9,139.2L533.6,138.4L532.2,137.6L532.6,136.4L533.1,135.6L533.7,135.8L532.9,134.4L534.8,131.9L535.9,131.6L536.1,130.7L534.6,128.1L535.7,128.0L536.9,127.2L538.7,127.1L541.0,127.4L543.7,128.1L545.6,128.2L546.5,128.6L547.3,128.1L548.0,128.8L550.1,128.6L551.0,128.9L551.0,127.4L551.6,126.8Z",PL:"M533.7,121.2L534.0,122.5L534.7,123.7L534.8,124.8L533.5,125.4L534.4,126.8L534.6,128.1L536.1,130.7L535.9,131.6L534.8,131.9L532.9,134.4L533.7,135.8L533.1,135.6L530.8,134.4L529.1,134.9L528.0,134.6L526.7,135.2L525.4,134.1L524.4,134.5L524.3,134.4L523.1,132.9L521.3,132.7L521.0,131.8L519.4,131.4L519.1,132.2L517.8,131.6L517.9,130.8L516.1,130.5L514.9,129.5L513.8,127.6L514.0,126.6L513.3,125.0L512.4,124.0L512.9,123.2L512.3,121.7L513.8,120.8L517.3,119.5L520.0,118.5L522.3,119.0L522.6,119.7L524.8,119.7L527.6,120.1L531.8,120.0L533.0,120.3Z",AT:"M520.2,138.5L520.1,139.7L518.8,139.7L519.3,140.4L518.6,142.3L518.2,142.9L516.1,142.9L515.0,143.6L513.0,143.4L509.5,142.6L508.9,141.6L506.6,142.1L506.3,142.7L504.9,142.2L503.7,142.1L502.6,141.6L502.9,140.8L502.8,140.3L503.5,140.1L504.7,141.0L505.0,140.2L507.1,140.3L508.8,139.8L509.9,139.9L510.7,140.5L510.9,140.0L510.5,138.0L511.3,137.6L512.0,136.2L513.9,137.2L515.1,136.0L515.9,135.7L517.8,136.7L518.9,136.5L520.1,137.1L519.9,137.4Z",HU:"M532.2,137.6L533.6,138.4L533.9,139.2L532.5,139.9L531.5,141.9L530.3,144.0L528.4,144.5L526.9,144.4L525.1,145.2L524.3,145.7L522.2,145.1L520.4,143.8L519.6,143.4L519.0,142.4L518.6,142.3L519.3,140.4L518.8,139.7L520.1,139.7L520.2,138.5L521.5,139.3L522.4,139.6L524.3,139.2L524.5,138.6L525.4,138.5L526.5,138.1L526.8,138.3L527.9,137.9L528.4,137.2L529.1,137.0L531.7,137.9Z",MD:"M543.0,138.2L543.5,137.8L545.1,137.5L546.9,138.4L547.9,138.5L549.1,139.3L549.1,140.3L550.0,140.8L550.5,142.1L551.4,142.9L551.3,143.3L551.8,143.6L551.2,143.9L549.8,143.8L549.5,143.4L549.0,143.6L549.3,144.2L548.7,145.1L548.4,146.2L547.9,146.5L547.3,145.1L547.4,143.8L547.1,142.5L545.5,140.7L544.6,139.4L543.8,138.5Z",RO:"M547.9,146.5L549.0,147.1L550.1,146.6L551.2,147.1L551.4,147.9L550.3,148.5L549.5,148.3L549.3,151.9L547.8,151.6L545.9,150.5L543.1,151.2L542.0,152.0L538.4,151.8L536.5,151.4L535.6,151.6L534.8,150.3L534.3,149.8L534.8,149.3L534.2,148.9L533.5,149.6L532.0,148.7L531.7,147.4L530.2,146.7L529.8,145.7L528.4,144.5L530.3,144.0L531.5,141.9L532.5,139.9L533.9,139.2L534.8,138.6L536.3,138.9L537.9,138.9L539.0,139.7L539.8,139.2L541.5,138.9L542.0,138.2L543.0,138.2L543.8,138.5L544.6,139.4L545.5,140.7L547.1,142.5L547.4,143.8L547.3,145.1Z",LT:"M539.9,116.3L540.3,117.6L538.6,118.5L538.2,120.1L535.9,121.3L533.7,121.2L533.0,120.3L531.8,120.0L531.6,119.3L531.7,118.5L530.6,118.0L528.2,117.5L527.5,115.1L529.9,114.2L533.7,114.4L535.9,114.1L536.3,114.7L537.5,114.9Z",LV:"M540.9,110.9L542.1,111.5L542.5,112.9L543.5,114.6L541.2,115.8L539.9,116.3L537.5,114.9L536.3,114.7L535.9,114.1L533.7,114.4L529.9,114.2L527.5,115.1L527.3,112.9L528.2,111.1L530.1,110.1L532.2,112.2L534.0,112.2L534.1,110.0L535.9,109.5L537.0,109.8L539.0,110.9Z",EE:"M541.5,105.2L541.9,105.7L540.6,107.3L541.7,110.0L540.9,110.9L539.0,110.9L537.0,109.8L535.9,109.5L534.1,110.0L534.1,108.3L533.4,108.6L531.8,107.6L531.4,106.0L534.1,105.2L536.8,104.8L539.3,105.3Z",DE:"M512.3,121.7L512.9,123.2L512.4,124.0L513.3,125.0L514.0,126.6L513.8,127.6L514.9,129.5L513.9,129.9L513.3,129.5L512.7,130.1L511.1,130.7L510.3,131.4L508.6,132.1L509.1,132.9L509.4,134.2L510.6,134.9L512.0,136.2L511.3,137.6L510.5,138.0L510.9,140.0L510.7,140.5L509.9,139.9L508.8,139.8L507.1,140.3L505.0,140.2L504.7,141.0L503.5,140.1L502.8,140.3L500.2,139.4L499.7,140.0L497.7,140.0L497.9,137.9L499.1,135.8L495.6,135.2L494.5,134.5L494.6,133.1L494.1,132.5L494.3,130.4L493.8,127.3L495.2,127.3L495.8,126.2L496.3,123.5L495.8,122.5L496.2,121.9L498.1,121.7L498.6,122.4L500.1,120.9L499.5,119.8L499.3,118.2L501.1,118.5L502.5,118.1L502.6,119.2L504.9,119.9L505.0,121.0L507.3,120.4L508.5,119.6L511.1,120.8Z",BG:"M534.8,150.3L535.6,151.6L536.5,151.4L538.4,151.8L542.0,152.0L543.1,151.2L545.9,150.5L547.8,151.6L549.3,151.9L548.1,153.2L547.5,155.4L548.4,157.2L546.3,156.8L543.9,157.7L544.0,159.3L541.8,159.6L540.0,158.5L538.1,159.3L536.3,159.2L535.9,157.2L534.6,156.2L535.0,155.8L534.7,155.4L535.0,154.4L535.9,153.5L534.6,152.1L534.3,151.0Z",GR:"M546.1,178.0L545.9,178.9L542.3,179.1L542.2,178.6L539.1,178.0L539.5,176.7L541.0,177.7L542.9,177.6L544.8,177.8L544.8,178.3ZM536.3,159.2L538.1,159.3L540.0,158.5L541.8,159.6L544.0,159.3L543.9,157.7L545.2,158.5L544.6,160.5L544.0,160.8L542.5,160.7L541.2,160.4L538.3,161.2L540.2,163.0L539.0,163.5L537.6,163.5L536.2,161.9L535.8,162.6L536.5,164.4L537.8,165.9L536.9,166.5L538.4,168.0L539.7,168.9L539.9,170.6L537.5,169.8L538.4,171.4L536.8,171.7L538.0,174.5L536.3,174.5L534.2,173.2L533.1,170.7L532.5,168.6L531.4,167.2L530.0,165.4L529.8,164.5L530.8,163.0L530.9,162.0L531.7,161.6L531.7,160.8L533.2,160.5L534.1,159.8L535.5,159.9L535.8,159.3Z",TR:"M591.8,172.1L590.7,172.7L589.7,171.9L586.7,171.5L585.7,172.0L583.0,172.4L581.6,172.4L578.9,173.6L576.8,173.6L575.4,173.0L572.8,173.8L571.9,173.2L571.9,175.0L571.3,175.7L570.7,176.3L569.7,174.9L570.5,173.8L569.0,174.0L566.8,173.3L565.3,175.1L561.5,175.4L559.3,173.8L556.6,173.7L556.1,175.0L554.5,175.3L551.9,173.7L549.2,173.7L547.4,170.6L545.4,168.9L546.4,166.5L544.7,165.0L547.2,162.1L551.0,161.9L551.8,159.6L556.5,160.0L559.2,158.0L561.9,157.1L566.0,157.1L570.5,159.2L574.2,160.4L577.0,160.0L579.2,160.2L581.8,158.6L584.4,158.5L587.0,160.0L587.6,161.1L587.6,162.6L589.6,163.4L590.7,164.3L589.1,165.1L590.4,168.7L590.1,169.7ZM543.9,157.7L546.3,156.8L548.4,157.2L548.9,158.4L551.1,159.3L550.7,160.1L547.8,160.3L546.9,161.2L545.0,162.9L544.1,161.5L544.0,160.8L544.6,160.5L545.2,158.5Z",AL:"M531.7,160.8L531.7,161.6L530.9,162.0L530.8,163.0L529.8,164.5L529.3,164.3L529.3,163.6L527.8,162.6L527.5,161.1L527.6,159.0L527.8,158.1L527.4,157.6L527.1,156.6L528.1,155.1L528.3,155.7L528.9,155.4L529.5,156.2L530.1,156.5L530.4,157.6L530.1,158.7L530.6,160.0Z",HR:"M519.6,143.4L520.4,143.8L522.2,145.1L524.3,145.7L525.1,145.2L525.8,146.4L526.6,147.3L525.8,148.4L524.7,147.7L523.0,147.8L520.9,147.3L519.8,147.3L519.3,148.0L518.4,147.3L518.0,148.5L519.2,150.0L519.8,150.9L521.0,152.1L522.0,152.7L523.0,154.0L525.2,155.2L525.0,155.7L522.6,154.6L521.1,153.5L518.9,152.6L516.7,150.3L517.2,150.1L516.0,148.8L515.9,147.8L514.3,147.3L513.6,148.6L512.9,147.6L512.8,146.5L512.9,146.5L514.6,146.6L515.0,146.0L515.9,146.5L516.8,146.6L516.8,145.8L517.6,145.4L517.7,144.2Z",CH:"M502.8,140.3L502.9,140.8L502.6,141.6L503.7,142.1L504.9,142.2L504.7,143.5L503.7,144.0L501.9,143.6L501.5,144.8L500.3,144.9L499.9,144.4L498.6,145.5L497.4,145.6L496.4,145.0L495.5,143.6L494.4,144.1L494.4,142.7L496.1,141.0L496.0,140.3L497.1,140.5L497.7,140.0L499.7,140.0L500.2,139.4Z",LU:"M494.1,132.5L494.6,133.1L494.5,134.5L493.8,134.5L493.3,134.3L493.5,132.6Z",BE:"M494.3,130.4L494.1,132.5L493.5,132.6L493.3,134.3L491.2,132.9L490.0,133.1L488.3,131.7L487.2,130.5L486.2,130.5L485.8,129.4L487.7,128.8L489.4,129.1L491.5,128.4L493.0,129.7Z",NL:"M495.8,122.5L496.3,123.5L495.8,126.2L495.2,127.3L493.8,127.3L494.3,130.4L493.0,129.7L491.5,128.4L489.4,129.1L487.7,128.8L488.8,128.0L490.8,123.7L493.9,122.4Z",PT:"M457.8,157.6L458.7,156.8L459.8,156.3L460.3,157.8L461.8,157.8L462.2,157.4L463.6,157.6L464.3,159.1L463.1,159.9L463.0,162.3L462.6,162.8L462.5,164.3L461.4,164.5L462.4,166.4L461.6,168.4L462.5,169.3L462.1,170.2L461.1,171.3L461.3,172.4L460.3,173.2L459.0,172.7L457.7,173.1L458.1,170.6L458.0,168.7L456.9,168.4L456.3,167.3L456.6,165.2L457.6,164.1L457.8,162.9L458.4,161.0L458.4,159.7L457.9,158.6Z",ES:"M461.3,172.4L461.1,171.3L462.1,170.2L462.5,169.3L461.6,168.4L462.4,166.4L461.4,164.5L462.5,164.3L462.6,162.8L463.0,162.3L463.1,159.9L464.3,159.1L463.6,157.6L462.2,157.4L461.8,157.8L460.3,157.8L459.8,156.3L458.7,156.8L457.8,157.6L458.0,155.4L457.1,154.0L460.6,151.8L463.5,152.4L466.8,152.4L469.4,152.9L471.4,152.7L475.3,152.8L476.3,154.0L480.8,155.4L481.7,154.7L484.4,156.1L487.2,155.7L487.4,157.5L485.1,159.6L481.9,160.2L481.7,161.3L480.2,163.0L479.3,165.5L480.2,167.3L478.8,168.7L478.2,170.7L476.4,171.3L474.6,173.7L471.4,173.7L469.0,173.7L467.4,174.8L466.5,175.9L465.2,175.7L464.3,174.6L463.6,172.8Z",IE:"M465.8,121.4L466.1,123.5L464.2,126.1L460.1,127.9L456.8,127.4L458.8,124.3L457.8,121.3L461.0,119.0L462.8,117.7L463.2,119.2L462.6,120.8L464.1,120.8Z",NC:"M914.4,353.1L916.0,355.0L917.0,356.4L915.7,357.2L914.6,356.3L913.1,354.9L911.9,353.3L910.8,351.1L910.7,350.0L911.8,350.1L913.0,351.1L913.9,352.2Z",SB:"M911.7,320.1L912.3,321.2L910.4,321.2L909.7,319.3L911.1,320.0ZM910.9,317.4L910.4,318.0L908.7,315.3L908.4,313.4L909.3,313.4L910.0,315.9ZM908.5,318.3L907.5,318.3L905.9,318.0L905.4,317.5L905.7,316.3L907.4,316.8L908.2,317.4ZM906.0,312.5L906.5,313.5L906.5,314.1L904.6,312.8L903.2,311.7L902.3,310.7L902.8,310.3L903.9,311.1ZM899.6,309.4L900.6,310.4L900.0,310.6L898.9,309.9L897.9,308.6L898.1,308.1Z",NZ:"M916.6,412.2L914.6,413.8L912.0,416.0L909.4,417.2L909.4,416.4L908.7,415.9L911.7,413.4L912.0,411.7L910.0,410.5L910.8,409.3L913.2,408.3L915.0,405.9L916.1,403.9L916.2,401.8L916.6,401.2L916.1,399.9L915.6,397.2L915.6,395.0L916.7,394.7L917.2,396.5L918.7,397.3L917.9,400.0L918.0,403.3L919.2,401.2L919.9,402.0L918.9,404.4L920.3,405.4L921.9,405.7L924.0,404.5L925.0,404.8L922.8,407.6L921.0,409.4L919.1,409.3L917.9,410.3L917.3,411.6ZM892.0,422.9L895.1,421.3L897.6,419.7L900.2,417.4L901.6,416.7L903.1,414.9L905.7,413.5L905.4,414.8L905.2,416.1L907.7,414.8L907.6,416.1L906.8,417.4L904.9,418.9L901.8,421.1L899.8,422.4L899.7,423.8L897.8,423.9L894.9,425.0L892.9,427.0L889.4,430.1L886.5,431.5L884.7,432.4L882.6,432.3L881.7,431.3L879.3,431.1L879.6,430.0L882.5,427.7L887.5,424.7L889.5,424.1Z",AU:"M843.3,414.5L844.7,414.7L842.8,418.3L841.4,419.4L839.8,421.9L839.4,421.0L836.5,423.2L836.1,423.0L834.7,422.9L834.6,420.3L835.4,418.3L835.4,415.6L836.2,414.1L837.7,414.4L839.5,415.5L841.1,415.1ZM800.9,387.8L797.6,389.4L795.2,390.1L794.1,391.7L792.8,393.0L790.6,393.1L788.9,393.3L786.9,392.8L784.9,393.1L783.1,393.3L781.1,394.9L780.4,394.8L778.8,395.7L777.2,396.7L775.4,396.5L773.7,396.5L771.8,394.5L770.6,393.9L771.2,392.2L772.6,391.7L773.3,391.0L773.6,389.9L774.6,387.7L774.9,385.9L774.5,382.7L774.6,381.0L775.2,379.2L774.7,377.2L774.9,376.2L774.1,375.0L774.4,372.6L773.6,370.1L773.6,368.8L774.4,370.1L774.2,367.2L775.3,368.1L775.7,369.3L776.1,367.7L775.4,365.3L775.4,364.3L775.0,363.4L775.7,361.6L776.4,360.8L777.1,359.2L777.2,357.4L778.7,355.2L778.4,357.5L780.0,355.4L782.3,354.4L783.8,353.0L786.1,351.9L787.3,351.6L788.0,352.0L790.3,350.9L791.9,350.5L792.4,349.8L793.2,349.6L794.6,349.6L797.6,348.7L799.3,347.3L800.3,345.7L802.1,344.1L802.4,342.9L802.8,341.2L805.1,338.5L805.7,341.2L807.0,340.6L806.3,339.1L807.4,337.6L808.4,338.3L809.1,335.9L810.8,334.4L811.6,333.2L813.0,332.6L813.2,331.8L814.3,332.1L814.5,331.4L815.7,330.9L817.0,330.5L818.8,331.9L820.0,333.8L821.6,333.8L823.3,334.1L823.0,332.4L824.6,329.9L825.9,329.1L825.6,328.3L827.0,326.5L828.8,325.4L830.1,325.8L832.4,325.2L832.5,323.6L830.7,322.6L832.2,322.1L833.9,322.9L835.1,324.2L837.3,325.0L838.1,324.7L839.6,325.6L841.2,324.7L842.2,325.0L842.9,324.4L843.9,325.9L843.0,327.6L841.8,328.9L840.9,329.0L841.0,330.2L840.0,331.8L838.8,333.3L838.8,334.2L840.7,335.9L842.5,336.9L843.7,337.9L845.3,339.8L846.0,339.8L847.2,340.6L847.5,341.5L849.8,342.6L851.7,341.5L852.6,339.9L853.4,338.5L854.0,336.8L855.2,334.3L855.1,332.8L855.5,331.9L855.4,330.1L856.1,327.8L856.7,327.1L856.5,326.1L857.4,324.5L858.1,322.8L858.3,321.9L859.4,320.7L860.0,322.2L859.9,324.2L860.5,324.6L860.4,325.9L861.2,327.4L861.1,329.2L860.8,330.3L861.4,332.8L863.3,331.6L863.9,332.9L865.0,334.1L864.5,335.5L864.6,338.2L864.6,339.7L865.2,340.1L865.4,342.7L864.8,344.4L865.2,346.5L867.7,348.1L869.2,349.6L870.6,350.9L870.1,351.7L871.1,353.6L871.2,357.0L872.4,356.3L873.1,357.7L873.9,357.2L873.4,360.5L874.7,362.4L875.5,363.6L876.8,366.1L876.7,368.6L876.2,370.4L875.3,372.3L875.6,375.0L874.5,377.7L873.5,379.2L871.7,382.0L871.1,383.8L869.7,386.0L867.4,388.8L864.8,390.4L862.9,392.8L861.4,394.3L859.4,397.0L857.7,398.5L856.0,400.9L854.7,403.0L854.3,404.0L852.4,405.1L849.5,405.2L846.6,406.5L844.9,407.7L842.7,409.0L841.3,407.6L840.1,407.1L841.3,405.5L839.6,406.0L836.4,408.3L834.6,407.4L833.4,407.0L832.1,406.7L830.1,405.8L829.4,403.9L830.0,401.6L830.1,400.0L829.4,398.7L827.1,398.4L828.6,396.8L828.9,394.5L826.8,396.7L824.3,397.3L826.4,395.5L827.5,393.7L829.1,392.2L829.8,389.9L826.7,392.6L824.7,393.6L822.7,396.1L821.2,394.8L822.0,393.2L821.3,390.9L820.4,389.8L821.1,389.0L818.5,387.1L816.8,387.1L814.9,385.5L810.2,385.8L806.5,386.9L803.2,388.0Z",LK:"M698.3,264.4L698.0,267.6L697.0,268.5L694.7,269.2L693.3,266.7L692.6,262.3L693.5,257.2L695.5,259.0L696.8,261.1Z",CN:"M768.4,231.2L766.1,230.3L765.6,227.6L766.7,226.2L769.4,225.3L770.9,225.4L771.7,226.6L770.8,228.0L770.5,229.7ZM676.0,156.1L675.3,154.4L676.7,153.6L672.8,148.2L677.2,147.0L678.2,146.3L678.0,140.9L683.1,141.9L683.9,140.5L682.9,137.5L684.8,137.2L685.8,135.2L686.6,135.0L688.1,137.1L690.7,138.7L694.5,139.8L697.1,142.2L697.5,145.8L698.9,147.1L702.0,147.6L705.4,148.1L709.0,150.0L710.6,150.3L712.8,153.1L714.9,155.0L717.5,154.9L722.8,155.6L725.9,155.2L728.5,155.6L732.8,157.5L735.8,157.5L737.3,158.4L739.5,156.8L743.0,155.7L746.6,155.6L749.0,154.5L750.0,152.9L751.3,151.8L750.5,150.8L749.2,149.6L749.5,147.7L751.0,148L753.8,148.6L755.4,147.0L758.5,145.8L759.3,143.8L760.6,142.9L763.8,142.5L765.9,142.8L765.6,141.8L762.4,139.6L760.0,138.7L758.7,139.8L756.1,139.3L755.0,139.7L753.7,138.5L753.8,135.4L753.8,133.2L757.2,134.3L759.5,132.4L758.7,131.1L759.0,127.9L759.7,127.0L758.7,125.4L757.1,124.6L758.1,123.2L760.6,122.7L763.6,122.6L767.6,123.4L770.3,124.5L773.6,127.5L775.2,128.8L777.2,130.6L779.8,133.6L784.4,134.5L788.5,136.7L791.1,139.5L794.7,139.5L796.1,138.3L799.4,137.4L799.8,140.1L799.5,141.3L800.6,144.6L800.6,147.5L797.4,147.0L795.9,148.1L797.9,150.7L799.4,154.3L798.2,154.4L799.0,156.0L796.5,154.2L796.4,155.9L793.3,157.2L794.4,158.8L792.2,158.7L790.6,157.8L790.0,159.9L788.0,161.6L786.9,163.6L783.8,164.5L782.6,165.9L780.3,166.8L781.0,165.3L780.0,164.1L781.0,162.1L779.0,160.4L777.4,161.5L775.5,163.7L774.8,165.7L772.4,165.8L771.7,167.3L773.9,169.4L776.1,169.9L776.7,171.3L779.0,172.2L781.0,170.0L783.7,171.2L785.3,171.3L786.4,172.9L783.1,173.8L782.6,175.4L780.7,177.0L780.2,179.2L783.6,180.9L785.6,183.9L788.1,186.8L790.6,189.2L791.3,191.5L790.0,192.4L791.1,194.0L792.9,195.0L793.3,197.5L793.4,200.0L792.0,200.3L791.1,203.7L790.0,207.8L788.5,211.5L785.6,214.3L782.6,217.0L779.7,217.3L778.4,218.7L777.3,217.7L776.1,219.3L772.8,220.8L770.1,221.3L769.8,224.6L768.4,224.8L767.3,222.5L767.7,221.3L764.0,220.3L762.9,220.8L760.1,220.0L758.6,218.7L758.6,216.9L756.1,216.4L754.7,215.2L752.8,216.9L750.3,217.2L748.2,217.2L746.9,218.0L745.7,218.4L746.7,222.0L745.3,221.9L744.9,221.2L744.6,219.9L742.9,220.8L741.6,220.2L739.5,219.0L739.8,216.5L738.0,215.8L736.8,213.0L734.2,213.5L733.8,209.8L735.7,207.2L735.2,204.6L734.6,202.2L733.3,201.5L732.1,199.7L730.6,199.9L727.7,199.4L728.3,198.1L726.6,196.2L725.1,197.5L722.8,196.7L720.3,198.7L718.4,201.0L716.4,201.4L715.1,200.6L713.7,200.5L711.8,199.8L710.5,200.6L709.3,202.9L708.6,200.4L707.1,201.1L704.1,200.8L701.0,200.1L698.7,198.7L696.5,198.1L695.4,196.6L693.8,196.1L690.8,194.1L688.6,193.2L687.7,193.9L683.7,191.7L680.7,189.7L679.3,186.3L681.2,186.7L680.9,185.1L679.6,183.5L679.3,181.0L675.7,177.4L671.3,176.1L670.0,173.7L667.8,172.3L667.1,171.4L666.3,169.6L666.1,168.4L664.4,167.7L663.7,168.0L662.3,165.1L662.8,164.4L662.3,163.7L664.3,162.2L665.8,161.6L668.5,162.0L668.9,160.1L672.0,159.7L672.5,158.5L675.9,156.8Z",TW:"M796.8,212.0L796.4,216.9L795.8,219.5L793.9,216.9L793.0,214.6L793.8,211.5L795.3,209.1L796.8,210.1Z",IT:"M504.9,142.2L506.3,142.7L506.6,142.1L508.9,141.6L509.5,142.6L513.0,143.4L512.8,144.9L513.5,146.2L511.5,145.7L509.6,146.8L509.8,148.3L509.6,149.2L510.4,150.8L512.8,152.3L514.2,154.9L517.0,157.3L518.9,157.3L519.6,158.0L518.9,158.6L521.2,159.7L523.0,160.7L525.3,162.3L525.5,162.8L525.2,164L523.7,162.5L521.5,162.0L520.6,164.0L522.5,165.1L522.3,166.8L521.2,166.9L520.0,169.6L519.0,169.8L519.0,168.9L519.4,167.2L519.9,166.6L518.8,164.8L518.0,163.2L517.0,162.8L516.2,161.5L514.5,160.9L513.4,159.7L511.6,159.5L509.6,158.1L507.3,156.1L505.6,154.3L504.7,151.3L503.5,150.9L501.5,149.9L500.4,150.3L499.0,151.8L498.0,152.0L498.2,150.7L496.9,150.3L496.2,147.9L497.0,147.0L496.3,145.8L496.4,145.0L497.4,145.6L498.6,145.5L499.9,144.4L500.3,144.9L501.5,144.8L501.9,143.6L503.7,144.0L504.7,143.5ZM516.7,169.1L518.6,168.8L517.8,171.3L518.2,172.3L517.8,173.8L515.8,172.7L514.5,172.3L511.0,170.8L511.2,169.2L514.2,169.5ZM501.4,160.6L502.6,159.6L504.1,161.8L503.9,165.9L502.8,165.7L501.8,166.7L500.8,165.9L500.6,162.2L500.0,160.4Z",DK:"M502.5,118.1L501.1,118.5L499.3,118.2L498.3,116.5L498.1,113.6L498.5,112.8L499.1,111.9L501.0,111.8L501.8,111.0L503.5,110.1L503.5,111.6L502.9,112.6L503.3,113.4L504.5,113.8L504.0,114.9L503.3,114.6L501.8,116.7ZM507.8,114.8L508.7,116.3L507.5,118.6L505.0,117.0L504.6,115.8Z",GB:"M465.8,121.4L464.1,120.8L462.6,120.8L463.2,119.2L462.8,117.7L464.7,117.5L467.1,119.4ZM472.8,122.7L472.9,122.7L473.2,121.0L471.7,119.2L471.7,119.2L468.9,118.7L468.4,117.9L469.3,116.6L468.5,115.8L467.3,117.1L467.2,114.3L466.1,112.9L467.1,109.9L468.9,107.6L470.6,107.8L473.3,107.6L470.9,110.7L473.1,110.3L475.6,110.3L475.0,112.6L472.9,115.2L475.2,115.4L475.4,115.7L477.4,119.1L479.0,119.6L480.4,123.0L481.0,124.1L483.8,124.7L483.6,126.6L482.4,127.5L483.3,129.0L481.2,130.6L478.1,130.5L474.1,131.4L473.0,130.8L471.5,132.2L469.3,131.8L467.7,133.0L466.4,132.4L469.9,129.2L472.0,128.6L472.0,128.6L468.4,128.1L467.7,126.9L470.2,126.0L469.0,124.4L469.4,122.5Z",IS:"M449.8,85.9L449.1,87.6L451.3,89.5L448.4,91.6L442.1,93.4L440.2,93.9L437.4,93.5L431.6,92.7L433.9,91.5L429.5,90.1L433.3,89.6L433.3,88.8L429.0,88.2L430.7,86.4L433.9,86.0L436.9,87.8L440.3,86.4L442.8,87.1L446.3,85.7Z",AZ:"M593.6,157.6L594.3,157.7L596.3,159.6L597.4,159.8L597.7,159.0L598.9,157.8L600.5,159.4L602.1,161.6L603.3,161.7L604.2,162.6L602.2,162.8L602.2,165.2L602.0,166.3L601.2,167.0L601.5,168.6L600.9,168.7L599.1,167.1L599.7,165.6L598.8,164.7L597.9,164.9L595.4,167.2L595.0,165.0L593.8,164.5L592.6,163.7L593.2,162.7L591.7,161.6L592.0,160.9L591.0,160.3L590.4,159.5L590.9,159.0L592.9,159.9L594.2,160.1L594.5,159.7L593.0,158.0ZM594.5,167.3L592.7,166.9L591.3,165.4L590.7,164.3L591.2,164.2L592.1,165.0L593.1,165.0L593.2,165.5Z",GE:"M577.0,152.8L577.3,152.4L579.4,152.9L583.1,153.4L586.6,154.9L587.2,155.5L588.6,155.0L590.9,155.6L591.9,156.9L593.6,157.6L593.0,158.0L594.5,159.7L594.2,160.1L592.9,159.9L590.9,159.0L590.4,159.5L587.0,160.0L584.4,158.5L581.8,158.6L582.0,157.3L581.1,155.2L579.5,154.1L578.1,153.7Z",PH:"M801.0,248.3L799.3,245.9L801.6,246.1L802.7,247.2L802.3,249.9ZM806.6,256.8L807.1,255.9L807.2,254.0L808.7,253.8L808.5,255.9L810.1,252.9L810.2,255.8L809.3,256.8L808.7,258.8L807.9,259.7L806.1,257.6ZM817.1,261.6L817.5,263.7L817.8,265.4L817.1,268.2L815.9,265.1L814.8,266.7L815.8,268.9L815.1,270.4L811.9,268.6L811.0,266.3L811.7,264.9L809.9,263.4L809.1,264.7L807.9,264.6L806.0,266.3L805.5,265.4L806.4,262.8L808.0,261.9L809.3,260.7L810.4,262.1L812.3,261.3L812.7,259.9L814.5,259.8L814.2,257.4L816.5,258.9L816.8,260.5ZM795.9,258.8L792.6,261.8L793.7,259.6L795.4,257.7L796.8,255.5L797.9,252.4L798.7,255.0L797.1,256.7ZM802.3,231.2L802.1,232.4L803.4,234.7L803.1,237.3L801.7,238.3L801.7,240.8L802.7,243.3L804.1,243.6L805.2,243.2L808.8,245.0L808.8,246.6L809.7,247.4L809.6,248.8L807.4,247.3L806.2,245.7L805.6,246.8L803.7,245.0L801.4,245.4L799.9,244.7L799.9,243.4L800.6,242.7L799.7,241.9L799.5,243.1L798.0,241.3L797.4,239.9L796.8,236.9L798.1,238.0L797.5,233.1L797.9,230.3L799.5,230.3L801.3,231.2L801.9,230.4ZM804.6,252.3L804.0,250.8L805.7,251.8L807.4,251.8L807.5,253.1L806.4,254.4L804.9,255.3L804.6,253.9ZM813.6,250.0L814.7,253.4L812.6,252.6L812.7,253.7L813.6,255.6L812.4,256.3L812.1,254.1L811.2,253.9L810.6,252.1L812.2,252.3L812.0,251.1L810.1,248.8L812.7,248.8Z",MY:"M747.3,267.7L747.8,267.1L750.0,268.5L750.3,270.0L752.0,269.7L752.9,268.4L753.5,268.7L755.2,270.6L756.4,272.6L756.6,274.7L756.4,276.1L756.6,277.2L756.9,279.0L757.9,279.9L758.9,282.6L758.9,283.7L757.0,283.9L754.5,281.6L751.2,279.1L750.9,277.5L749.3,275.5L748.8,272.9L747.8,271.2L748.0,269.0ZM795.2,274.9L792.9,274.3L789.8,274.3L789.0,277.9L788.0,278.9L786.7,283.2L784.5,283.9L782.0,283.0L780.7,283.3L779.2,284.9L777.5,284.6L775.7,285.3L773.9,283.5L773.4,281.5L775.4,282.5L777.5,281.9L777.9,279.3L779.1,278.7L782.3,278.1L784.1,275.6L785.3,273.7L786.6,275.3L787.1,274.2L788.4,274.3L788.5,272.3L788.5,270.8L790.5,268.6L791.7,266.2L792.8,266.2L794.2,267.8L794.4,269.1L796.2,270.0L798.5,270.9L798.4,272.1L796.6,272.3L797.2,273.8Z",BN:"M788.5,270.8L788.5,272.3L788.4,274.3L787.1,274.2L786.6,275.3L785.3,273.7L786.4,272.5Z",SI:"M513.0,143.4L515.0,143.6L516.1,142.9L518.2,142.9L518.6,142.3L519.0,142.4L519.6,143.4L517.7,144.2L517.6,145.4L516.8,145.8L516.8,146.6L515.9,146.5L515.0,146.0L514.6,146.6L512.9,146.5L513.5,146.2L512.8,144.9Z",FI:"M538.1,78.9L538.1,80.8L541.6,82.6L540.1,84.6L543.2,87.6L542.2,90.0L544.5,92.0L544.0,93.8L547.5,95.7L547.0,97.1L545.3,98.7L541.2,102.3L537.3,102.5L533.6,103.5L530.1,104.1L528.7,102.6L526.4,101.7L526.6,98.9L525.2,96.4L526.0,94.8L527.7,93.1L532.1,90.1L533.4,89.5L533.0,88.4L529.9,87.1L529.0,86.0L528.3,81.9L524.8,80.1L521.9,78.8L523.0,78.1L525.5,79.5L528.1,79.4L530.4,80.0L532.1,78.9L532.8,77.0L535.7,76.1L538.5,77.1Z",SK:"M533.1,135.6L532.6,136.4L532.2,137.6L531.7,137.9L529.1,137.0L528.4,137.2L527.9,137.9L526.8,138.3L526.5,138.1L525.4,138.5L524.5,138.6L524.3,139.2L522.4,139.6L521.5,139.3L520.2,138.5L519.9,137.4L520.1,137.1L520.3,136.4L521.4,136.5L522.2,136.1L522.2,135.9L522.7,135.7L522.7,135.0L523.3,134.9L523.6,134.4L524.3,134.4L524.4,134.5L525.4,134.1L526.7,135.2L528.0,134.6L529.1,134.9L530.8,134.4Z",CZ:"M514.9,129.5L516.1,130.5L517.9,130.8L517.8,131.6L519.1,132.2L519.4,131.4L521.0,131.8L521.3,132.7L523.1,132.9L524.3,134.4L523.6,134.4L523.3,134.9L522.7,135.0L522.7,135.7L522.2,135.9L522.2,136.1L521.4,136.5L520.3,136.4L520.1,137.1L518.9,136.5L517.8,136.7L515.9,135.7L515.1,136.0L513.9,137.2L512.0,136.2L510.6,134.9L509.4,134.2L509.1,132.9L508.6,132.1L510.3,131.4L511.1,130.7L512.7,130.1L513.3,129.5L513.9,129.9Z",ER:"M576.5,243.0L576.2,241.7L577.1,237.2L577.3,235.1L578.1,234.1L580.0,233.6L581.2,231.9L582.9,235.5L583.8,238.3L585.3,239.8L589.1,242.8L590.6,244.5L592.2,246.3L593.1,247.4L594.4,248.3L593.6,249.1L592.5,248.8L591.5,247.8L590.4,246.0L589.1,245.0L588.4,243.9L586.0,242.7L584.2,242.6L583.5,242.0L582.0,242.7L580.4,241.3L579.6,243.6Z",JP:"M831.5,165.9L830.7,169.0L832.2,172.2L832.4,174.7L833.5,176.3L833.1,178.5L830.5,179.9L826.2,180.1L824.0,183.7L821.8,182.5L820.8,180.1L816.7,180.8L814.2,182.3L811.3,182.4L814.7,184.7L814.9,189.9L813.7,191.3L812.1,190.0L811.7,187.2L809.8,186.3L808.0,184.2L810.0,183.2L810.6,181.3L812.5,179.7L813.5,177.5L818.2,176.6L821.1,177.2L821.4,171.7L823.7,173.2L826.0,170.1L826.8,168.9L826.6,165.1L824.5,161.6L824.5,159.7L826.8,159.1L830.4,163.4ZM830.5,151.2L831.4,149.9L833.9,153.3L830.8,154.2L830.3,157.2L825.3,155.1L825.8,158.5L823.1,158.5L821.1,155.5L821.1,153.1L823.6,152.9L821.9,148.7L821.3,146.3L825.9,149.5L828.4,150.5ZM815.3,183.7L816.0,181.8L817.6,182.2L818.1,180.9L820.2,181.5L820.9,182.6L820.2,184.5L818.8,183.5L817.8,184.2L817.8,186.0L815.8,185.2Z",PY:"M327.2,350.3L328.2,352.0L328.4,356.2L331.2,356.8L332.3,356.2L334.1,357.0L334.7,358.0L335.2,360.8L335.7,362.0L336.7,362.2L337.6,361.7L338.6,362.2L338.8,363.9L338.6,365.8L338.3,367.6L338.2,370.3L336.2,372.7L334.2,373.2L331.2,372.7L328.5,371.9L330.5,367.2L329.9,365.8L327.1,364.6L323.6,362.3L321.5,361.8L316.1,356.7L316.7,353.0L316.6,351.3L317.6,348.6L322.0,347.7L324.5,347.7L327.1,349.3Z",YE:"M616.8,228.7L619.2,233.9L620.3,236.1L618.4,236.9L618.0,238.3L618.0,239.3L615.5,240.6L611.3,242.1L609.1,244.3L607.9,244.4L607.1,244.3L605.6,245.6L603.9,246.1L601.7,246.3L601.1,246.5L600.5,247.3L599.8,247.5L599.5,248.3L598.2,248.3L597.3,248.7L595.5,248.5L594.7,246.7L594.7,245.0L594.2,244.1L593.6,241.8L592.8,240.5L593.3,240.4L592.9,238.9L593.2,238.3L593.0,237.0L594.1,236.0L593.8,234.7L594.4,233.2L595.5,234.0L596.2,233.7L599.3,233.6L599.8,233.9L602.3,234.2L603.3,234.1L604.1,235.1L605.3,234.6L606.9,231.3L609.3,229.9Z",SA:"M569.7,196.5L572.6,197.0L573.6,196.0L574.1,194.9L576.0,194.5L576.4,193.4L577.2,192.9L574.3,189.8L579.3,188.2L579.7,187.7L582.8,188.6L586.9,190.8L594.8,197.0L599.6,197.3L601.9,197.6L602.7,199.1L604.5,199.0L605.9,201.7L607.2,202.4L607.8,203.5L609.7,204.8L610.0,206.1L609.8,207.1L610.3,208.2L611.1,209.0L611.6,210.1L612.0,210.8L612.9,211.4L613.6,211.2L614.2,212.4L614.4,213.1L615.7,216.3L623.7,217.9L624.1,217.2L625.6,219.4L624.4,225.6L616.8,228.7L609.3,229.9L606.9,231.3L605.3,234.6L604.1,235.1L603.3,234.1L602.3,234.2L599.8,233.9L599.3,233.6L596.2,233.7L595.5,234.0L594.4,233.2L593.8,234.7L594.1,236.0L593.0,237.0L592.6,235.7L591.8,234.7L591.5,233.5L590.1,232.4L588.5,229.8L587.6,227.2L585.6,225.1L584.4,224.6L582.5,221.6L582.0,219.5L582.0,217.6L580.3,214.2L579.0,212.9L577.5,212.3L576.5,210.5L576.6,209.8L575.7,208.2L574.9,207.5L573.7,205.2L572.0,202.7L570.5,200.5L569.2,200.5L569.5,198.8L569.5,197.7Z",CY:"M562.4,178.5L562.5,178.4L562.8,177.7L564.6,177.7L566.8,176.8L565.3,178.1L565.5,178.7L565.2,178.6L564.8,178.8L564.4,178.8L564.3,178.9L564.2,178.6L564.0,178.4L563.5,178.3L562.9,178.6ZM562.4,178.5L562.9,178.6L563.5,178.3L564.0,178.4L564.2,178.6L564.3,178.9L564.4,178.8L564.8,178.8L565.2,178.6L565.5,178.7L565.6,179.0L563.2,180.2L561.9,179.8L561.2,178.6Z",MA:"M474.5,178.4L475.4,180.4L475.6,182.3L476.4,185.5L477.1,186.2L476.6,187.4L473.3,187.9L472.1,189.1L470.7,189.4L470.5,191.7L467.5,192.9L466.5,194.5L464.4,195.3L461.8,195.8L457.6,198.1L457.6,201.8L457.2,201.8L457.2,203.5L455.6,203.6L454.8,204.3L453.6,204.3L452.7,203.9L450.5,204.2L449.6,206.6L448.8,206.9L447.5,210.8L443.8,214.1L442.8,218.4L441.7,219.8L441.3,221.0L435.4,221.2L435.4,221.2L435.5,219.8L436.6,218.9L437.5,217.3L437.3,216.2L438.3,214.0L439.8,212.1L440.7,211.6L441.5,209.7L441.6,208.1L442.6,206.2L444.3,205.0L446.1,201.8L446.1,201.8L447.4,200.6L449.8,200.2L451.9,198.1L453.2,197.3L455.4,194.7L454.9,190.8L455.9,188.1L456.3,186.5L458.0,184.4L460.6,182.9L462.5,181.7L464.2,178.4L465.1,176.5L466.9,176.5L468.4,177.9L470.8,177.6L473.4,178.3Z",EG:"M576.4,219.4L566.0,219.4L555.9,219.4L545.3,219.4L544.8,207.9L544.2,196.8L543.2,194.3L543.8,192.4L543.3,191.1L544.1,189.6L547.5,189.5L550.0,190.3L552.6,191.3L553.8,191.8L555.7,190.8L556.7,189.9L558.9,189.6L560.8,190.0L561.6,191.6L562.1,190.5L564.2,191.3L566.2,191.5L567.4,190.7L569.2,195.2L569.6,196.0L568.9,197.3L568.6,199.6L568.0,201.3L567.5,201.8L566.5,200.8L565.3,199.4L563.1,194.9L562.8,195.2L564.1,198.5L566.0,201.6L568.3,206.5L569.4,208.2L570.3,210.0L572.9,213.4L572.4,214.0L572.7,216.0L575.9,218.8Z",LY:"M545.3,219.4L545.6,225.6L542.6,225.6L542.6,226.9L531.9,221.0L521.3,215.0L518.7,216.7L516.9,217.9L515.4,216.2L511.2,214.8L510.1,212.9L508.0,211.4L506.8,212.0L505.8,210.3L505.7,208.9L504.1,206.6L505.1,205.3L504.8,203.4L505.1,201.7L504.9,200.3L505.3,197.7L505.1,196.3L504.2,193.5L505.5,192.8L505.6,191.5L505.3,190.2L507.1,189.0L507.8,188.0L509.0,187.1L509.1,184.7L512.1,185.8L513.2,185.5L515.3,186.0L518.7,187.4L520.0,190.2L522.4,190.8L526.0,192.1L528.8,193.6L530.0,192.8L531.2,191.4L530.5,189.0L531.2,187.5L532.9,186.0L534.6,185.6L538.1,186.2L539.1,187.6L540.0,187.6L540.9,188.2L543.4,188.5L544.1,189.6L543.3,191.1L543.8,192.4L543.2,194.3L544.2,196.8L544.8,207.9Z",ET:"M607.5,262.9L600.2,272.2L596.7,272.3L594.3,274.5L592.6,274.6L591.9,275.5L590.1,275.5L589.0,274.5L586.6,275.8L585.8,277.1L584.0,276.8L583.4,276.5L582.8,276.6L581.9,276.5L578.5,273.9L576.6,273.9L575.7,272.9L575.7,271.1L574.3,270.6L572.7,267.2L571.4,266.5L570.9,265.3L569.6,263.8L567.9,263.6L568.8,261.8L570.2,261.7L570.6,260.8L570.5,258.0L571.2,254.7L572.4,253.9L572.6,252.6L573.7,250.2L575.2,248.7L576.2,245.6L576.5,243.0L579.6,243.6L580.4,241.3L582.0,242.7L583.5,242.0L584.2,242.6L586.0,242.7L588.4,243.9L589.1,245.0L590.4,246.0L591.5,247.8L592.5,248.8L591.6,250.2L590.8,251.6L591.0,252.5L591.1,253.4L592.6,253.5L593.2,253.3L593.8,253.8L593.3,254.9L594.3,256.6L595.3,258.1L596.4,259.2L605.2,262.9Z",DJ:"M592.5,248.8L593.6,249.1L594.4,248.3L595.1,249.3L595.0,250.6L593.6,251.3L594.7,252.2L593.8,253.8L593.2,253.3L592.6,253.5L591.1,253.4L591.0,252.5L590.8,251.6L591.6,250.2Z",UG:"M570.7,290.6L565.2,290.8L562.3,290.8L561.4,291.2L559.8,292.1L559.1,291.8L559.1,289.5L559.8,288.3L559.9,285.8L560.5,284.4L561.5,282.8L562.5,281.9L563.4,280.8L562.3,280.4L562.4,276.8L563.5,276.0L565.2,276.7L567.4,275.9L569.3,275.9L570.9,274.5L572.2,276.7L572.5,278.2L573.7,281.8L572.8,284.0L571.4,286.1L570.7,287.3Z",RW:"M561.4,291.2L562.4,292.9L562.3,294.8L561.5,295.1L560.1,294.9L559.2,296.7L557.6,296.5L557.9,294.8L558.2,294.5L558.3,292.7L559.1,291.8L559.8,292.1Z",BA:"M525.2,155.2L523.0,154.0L522.0,152.7L521.0,152.1L519.8,150.9L519.2,150.0L518.0,148.5L518.4,147.3L519.3,148.0L519.8,147.3L520.9,147.3L523.0,147.8L524.7,147.7L525.8,148.4L526.7,148.4L526.2,149.8L527.4,150.9L527.2,152.4L526.6,152.5L526.2,152.8L525.5,153.5Z",MK:"M534.6,156.2L535.9,157.2L536.3,159.2L535.8,159.3L535.5,159.9L534.1,159.8L533.2,160.5L531.7,160.8L530.6,160.0L530.1,158.7L530.4,157.6L530.7,157.7L530.7,157.0L532.1,156.6L532.7,156.4L533.5,156.3Z",RS:"M525.1,145.2L526.9,144.4L528.4,144.5L529.8,145.7L530.2,146.7L531.7,147.4L532.0,148.7L533.5,149.6L534.2,148.9L534.8,149.3L534.3,149.8L534.8,150.3L534.3,151.0L534.6,152.1L535.9,153.5L535.0,154.4L534.7,155.4L535.0,155.8L534.6,156.2L533.5,156.3L532.7,156.4L532.6,156.2L532.8,155.8L533.1,155.1L532.7,155.1L532.2,154.5L531.8,154.4L531.4,153.9L531.0,153.7L530.6,153.3L530.1,153.5L529.9,154.5L529.3,154.7L529.5,154.4L528.5,153.8L527.7,153.5L527.3,153.0L526.6,152.5L527.2,152.4L527.4,150.9L526.2,149.8L526.7,148.4L525.8,148.4L526.6,147.3L525.8,146.4Z",ME:"M528.9,155.4L528.3,155.7L528.1,155.1L527.1,156.6L527.4,157.6L526.8,157.3L526.1,156.3L525.0,155.7L525.2,155.2L525.5,153.5L526.2,152.8L526.6,152.5L527.3,153.0L527.7,153.5L528.5,153.8L529.5,154.4L529.3,154.7Z",XK:"M530.4,157.6L530.1,156.5L529.5,156.2L528.9,155.4L529.3,154.7L529.9,154.5L530.1,153.5L530.6,153.3L531.0,153.7L531.4,153.9L531.8,154.4L532.2,154.5L532.7,155.1L533.1,155.1L532.8,155.8L532.6,156.2L532.7,156.4L532.1,156.6L530.7,157.0L530.7,157.7Z",TT:"M315.7,254.3L317.3,253.9L317.8,254.0L317.6,256.4L315.4,256.7L314.9,256.4L315.7,255.6Z",SS:"M562.4,276.8L560.1,274.7L559.4,273.4L557.9,274.1L556.7,273.9L556.0,274.4L554.8,274.0L553.1,271.5L552.7,270.5L550.7,269.3L550.0,267.4L548.8,266.1L547.0,264.4L547.0,263.4L545.5,262.2L543.7,261.0L544.5,260.6L545.4,260.1L546.0,257.3L546.7,255.8L548.6,255.4L549.1,256.3L550.5,258.1L551.3,258.3L552.2,257.8L554.1,257.9L554.5,258.6L557.2,258.6L557.2,257.9L558.6,257.3L558.9,256.4L559.8,255.8L562.1,257.6L563.5,257.3L564.8,255.0L566.2,253.3L565.9,251.5L565.2,250.6L566.8,250.4L567.0,249.7L568.2,249.9L568.0,252.2L568.4,254.5L569.8,255.7L570.1,256.8L570.1,258.3L570.5,258.4L570.6,260.8L570.2,261.7L568.8,261.8L567.9,263.6L569.6,263.8L570.9,265.3L571.4,266.5L572.7,267.2L574.3,270.6L572.5,272.7L570.9,274.5L569.3,275.9L567.4,275.9L565.2,276.7L563.5,276.0Z"},Mt={ZW:[559,347],ZM:[554,329],YE:[606,238],VN:[761,236],VE:[303,266],VA:[510,158],VU:[922,335],UZ:[635,158],UY:[338,390],FM:[903,266],MH:[937,266],MP:[866,241],VI:[309,233],GU:[864,246],AS:[27,332],PR:[305,231],US:[236,164],GS:[396,455],IO:[673,310],SH:[465,337],PN:[146,363],AI:[314,231],FK:[344,448],KY:[266,228],BM:[315,187],VG:[310,231],TC:[292,220],MS:[316,236],JE:[475,135],GG:[474,134],IM:[470,120],GB:[474,122],AE:[621,214],UA:[554,135],UG:[567,284],TM:[627,166],TR:[568,166],TN:[504,182],TT:[317,255],TO:[21,353],TG:[483,261],TL:[816,315],TH:[747,241],TZ:[573,307],TJ:[656,168],TW:[795,214],SY:[577,179],CH:[500,143],SE:[515,97],SZ:[561,370],SR:[330,275],SS:[561,265],SD:[559,238],LK:[695,264],ES:[471,162],KR:[800,174],ZA:[545,378],SO:[602,273],SB:[907,318],SK:[526,137],SI:[515,145],SG:[758,284],SL:[449,261],SC:[628,302],RS:[530,150],SN:[442,243],SA:[596,213],ST:[498,287],SM:[510,151],WS:[22,330],VC:[318,247],LC:[318,245],KN:[314,234],RW:[560,294],RU:[680,87],RO:[540,145],QA:[613,209],PT:[460,164],PL:[525,127],PH:[801,238],PE:[282,316],PY:[328,360],PG:[865,308],PA:[266,261],PW:[839,264],PK:[657,195],OM:[627,224],NO:[506,93],KP:[794,163],NG:[502,258],NE:[505,234],NI:[254,248],NZ:[894,424],NU:[33,347],CK:[61,354],NL:[493,126],AW:[294,249],CW:[297,250],NP:[696,200],NR:[927,289],NA:[525,356],MZ:[574,341],MA:[458,195],EH:[448,213],ME:[527,155],MN:[726,142],MD:[548,141],MC:[498,152],MX:[214,213],MU:[631,351],MR:[453,225],MT:[516,176],ML:[471,234],MV:[677,275],MY:[787,277],MW:[571,329],MG:[603,348],MK:[533,158],LU:[494,134],LT:[534,117],LI:[503,142],LY:[527,204],LR:[455,268],LS:[552,380],LB:[571,182],LV:[536,113],LA:[753,230],KG:[663,159],KW:[602,197],XK:[531,155],KI:[59,282],KE:[581,286],KZ:[639,138],JO:[574,191],JP:[825,174],JM:[276,231],IT:[510,153],IL:[569,190],PS:[570,188],IE:[461,123],IQ:[591,185],IR:[618,187],ID:[785,288],IN:[688,217],IS:[441,90],HU:[526,141],HN:[251,242],HT:[289,229],GY:[322,273],GW:[440,250],GN:[451,255],GT:[241,239],GD:[316,250],GR:[536,165],GH:[477,263],DE:[504,130],GE:[586,157],GM:[439,246],GA:[512,290],FR:[486,143],PM:[346,142],WF:[8,332],MF:[314,232],BL:[314,232],PF:[86,342],NC:[913,354],TF:[644,440],AX:[524,103],FI:[536,92],FJ:[949,343],ET:[586,261],EE:[537,107],ER:[583,240],GQ:[508,283],SV:[244,245],EG:[557,206],EC:[270,292],DO:[294,229],DM:[318,240],DJ:[593,251],GL:[398,69],FO:[465,98],DK:[501,115],CZ:[516,134],CY:[564,178],CU:[273,221],HR:[520,148],CI:[465,264],CR:[256,257],CD:[543,297],CG:[521,290],KM:[595,324],CO:[285,276],CN:[739,173],MO:[777,219],HK:[778,218],CL:[301,395],TD:[529,240],CF:[535,267],CV:[417,241],CA:[261,108],CM:[514,270],KH:[759,248],MM:[733,222],BI:[560,298],BF:[475,250],BG:[541,155],BN:[786,274],BR:[338,321],BW:[542,356],BA:[523,151],BO:[309,339],BT:[713,203],BJ:[486,258],BZ:[246,234],BE:[491,131],BY:[544,122],BB:[322,247],BD:[715,214],BH:[611,207],BS:[277,211],AZ:[598,162],AT:[514,140],AU:[828,367],HM:[649,452],NF:[912,378],AM:[591,163],AR:[317,395],AG:[317,235],AO:[527,326],AD:[484,156],DZ:[487,201],AL:[529,160],AF:[647,183],SX:[314,232],GP:[317,237],MQ:[318,242],RE:[625,353],GF:[338,276],YT:[600,327]};var Ir=[{key:"world",label:"\u041C\u0438\u0440",codes:[]},{key:"europe",label:"\u0415\u0432\u0440\u043E\u043F\u0430",codes:["PT","IS","NO","FI","CY","GR","UA","IE"]},{key:"asia",label:"\u0410\u0437\u0438\u044F",codes:["TR","KZ","JP","ID","IN","AE","MN","PH"]},{key:"africa",label:"\u0410\u0444\u0440\u0438\u043A\u0430",codes:["MA","EG","ZA","SN","SO","MG"]},{key:"americas",label:"\u0410\u043C\u0435\u0440\u0438\u043A\u0430",codes:["CA","MX","CU","BR","AR","CL","GL"]},{key:"oceania",label:"\u041E\u043A\u0435\u0430\u043D\u0438\u044F",codes:["AU","NZ","FJ","PG","NC"]}];function u1(t){if(!t.codes.length)return[0,0,960,440];let n=t.codes.map(p=>Mt[p]).filter(Boolean),a=n.map(p=>p[0]),o=n.map(p=>p[1]),r=18,[L,l,i,m]=[Math.min(...a)-r,Math.max(...a)+r,Math.min(...o)-r,Math.max(...o)+r],u=960/440;if((l-L)/(m-i)<u){let p=(m-i)*u,g=(L+l)/2;[L,l]=[g-p/2,g+p/2]}else{let p=(l-L)/u,g=(i+m)/2;[i,m]=[g-p/2,g+p/2]}return[L,i,l-L,m-i]}var $a=t=>`color-mix(in oklab, var(--mf-green) ${Math.round(18+Math.min(100,Math.max(0,t))*.72)}%, white)`;function Or({countries:t,selected:n,cluster:a={},onSelect:o}){let r=re(()=>new Map(t.map(d=>[d.code,d])),[t]),[L,l]=f(Ir[0]),[i,m]=f(null),u=j(null),p=u1(L),g=p[2]/960,b=d=>x=>{let _=u.current?.getBoundingClientRect();_&&m({code:d,x:x.clientX-_.left,y:x.clientY-_.top})},c=d=>!!d&&(d.coverage!==null||d.site||d.suppliers>0),h=t.filter(d=>d.suppliers>0&&Mt[d.code]).sort((d,x)=>x.suppliers-d.suppliers),v=i?r.get(i.code):void 0;return s("div",{className:"flex flex-col",children:[s("div",{ref:u,className:"relative mx-auto w-full max-w-[46rem] overflow-hidden bg-[var(--mf-paper)]",onMouseLeave:()=>m(null),children:[s("svg",{viewBox:p.join(" "),className:"block h-auto w-full",role:"img","aria-label":"\u041A\u0430\u0440\u0442\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u043E\u0433\u043E \u043B\u0438\u0441\u0442\u0430",children:[e("defs",{children:s("pattern",{id:"mf-site-hatch",width:"4",height:"4",patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)",children:[e("rect",{width:"4",height:"4",fill:"var(--mf-line-200)"}),e("line",{x1:"0",y1:"0",x2:"0",y2:"4",stroke:"color-mix(in oklab, var(--mf-green) 55%, white)",strokeWidth:"1.6"})]})}),Object.entries(Pr).map(([d,x])=>{let _=r.get(d),y=_?.coverage!=null?$a(_.coverage):_?.site?"url(#mf-site-hatch)":"var(--mf-line-200)";return e("path",{d:x,fill:y,stroke:n===d?"var(--mf-ink-900)":_?.coverageDraft?"var(--mf-amber)":_?.coverageBy==="via"?"var(--mf-ink-700)":"white",strokeWidth:(n===d?1.4:_?.coverageDraft||_?.coverageBy==="via"?.9:.5)*g,strokeDasharray:n===d?void 0:_?.coverageDraft?`${2*g} ${1.5*g}`:_?.coverageBy==="via"?`${.6*g} ${1.4*g}`:void 0,"data-via":_?.coverageBy==="via"?"1":void 0,"data-draft":_?.coverageDraft?"1":void 0,className:k(c(_)&&"cursor-pointer hover:brightness-95"),onMouseMove:_?b(d):void 0,onClick:c(_)?()=>o(d):void 0},d)}),h.filter(d=>a[d.code]).map(d=>{let[x,_]=Mt[d.code],y=Math.max(g,.35),I=(2.2+Math.sqrt(d.suppliers)*1.1)*y,T=a[d.code].full;return e("circle",{cx:x,cy:_,r:I+3.2*y,fill:"color-mix(in oklab, var(--mf-blue) 22%, transparent)",stroke:"var(--mf-blue)",strokeWidth:(T?1.3:1)*y,strokeDasharray:T?void 0:`${2*y} ${1.4*y}`,pointerEvents:"none","data-testid":`map-halo-${d.code}`,"data-full":T?"1":"0"},`halo-${d.code}`)}),h.map(d=>{let[x,_]=Mt[d.code],y=(2.2+Math.sqrt(d.suppliers)*1.1)*Math.max(g,.35),I=n===d.code;return e("circle",{cx:x,cy:_,r:y,fill:d.refined>0?"var(--mf-amber)":d.drafts?"color-mix(in oklab, var(--mf-amber) 35%, white)":"white",stroke:I?"var(--mf-ink-900)":!d.refined&&d.drafts?"var(--mf-amber)":"var(--mf-ink-700)",strokeDasharray:!I&&!d.refined&&d.drafts?`${1.6*Math.max(g,.35)} ${1*Math.max(g,.35)}`:void 0,strokeWidth:(I?1.6:.9)*Math.max(g,.35),className:"cursor-pointer",onMouseMove:b(d.code),onClick:()=>o(d.code),"data-testid":`map-marker-${d.code}`},d.code)})]}),i&&v?s("div",{className:"pointer-events-none absolute z-10 min-w-[10rem] rounded-md border border-border bg-[var(--mf-surface)] px-2 py-1.5 text-[11px] shadow-md",style:m1(i,u.current),children:[e("div",{className:"font-semibold",children:F(v.code)}),e("div",{className:"text-muted-foreground",children:Da(v)}),a[v.code]&&v.code!==n?e("div",{className:"mt-0.5 text-[var(--mf-blue)]",children:a[v.code].full?`\u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 ${F(n)} (${a[v.code].n})`:`\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 ${F(n)}: ${a[v.code].n} \u0438\u0437 ${v.suppliers}`}):null]}):null,e("div",{className:"absolute left-2 top-2 flex flex-wrap gap-0.5 rounded-md border border-border bg-[var(--mf-surface)]/90 p-0.5 text-[10px]",children:Ir.map(d=>e("button",{type:"button",onClick:()=>l(d),className:k("rounded px-1.5 py-0.5",L.key===d.key?"bg-foreground text-background":"hover:bg-state-hover"),children:d.label},d.key))})]}),e(p1,{cluster:Object.keys(a).length>1})]})}function m1(t,n){let a=n?.clientWidth??300,o=n?.clientHeight??200,r={};return t.x>a-190?r.right=Math.max(4,a-t.x+12):r.left=t.x+12,t.y>o/2?r.bottom=Math.max(4,o-t.y+12):r.top=t.y+12,r}function Da(t){let n=[];return t.coverage!=null?n.push(`\u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 ${Math.round(t.coverage)}% \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443`+(t.coverageBy==="own"?` (\u043A\u0430\u0442\u0430\u043B\u043E\u0433 ${t.coverageOrg??"\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"}${t.coverageDraft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A":""})`:t.coverageBy==="via"?` (\u0447\u0435\u0440\u0435\u0437 ${t.coverageOrg??"\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E"} \u2014 ${t.coverageVia??""})`:"")):t.site?n.push("\u0441\u0430\u0439\u0442 STIHL \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D"):n.push("\u043D\u0435\u0442 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0430"),t.suppliers&&n.push(`${t.suppliers} \u043E\u0440\u0433.${t.refined?`, \u0441\u0432\u043E\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u2014 ${t.refined}`:""}${t.drafts?`, \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u2014 ${t.drafts}`:""}`),n.join(" \xB7 ")}function p1({cluster:t}){return s("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-border px-3 py-1.5 text-[10px] text-muted-foreground",children:[s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-12 rounded-sm",style:{background:`linear-gradient(90deg, ${$a(0)}, ${$a(100)})`}}),"\u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430 0\u2013100%"]}),s("span",{className:"flex items-center gap-1",children:[e("svg",{width:"12",height:"8","aria-hidden":!0,children:e("rect",{width:"12",height:"8",fill:"url(#mf-site-hatch)"})}),"\u0441\u0430\u0439\u0442 STIHL \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-2 rounded-full border border-[var(--mf-ink-700)] bg-white"}),"\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u0435\u0441\u0442\u0440\u0430"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-2 rounded-full border border-[var(--mf-ink-700)] bg-[var(--mf-amber)]"}),"\u0435\u0441\u0442\u044C \u0441\u0432\u043E\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-2 rounded-full border border-dashed border-[var(--mf-amber)] bg-[color-mix(in_oklab,var(--mf-amber)_35%,white)]"}),"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 (\u0443 \u0441\u0442\u0440\u0430\u043D\u044B \u2014 \u043F\u0443\u043D\u043A\u0442\u0438\u0440\u043D\u0430\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430)"]}),s("span",{className:"flex items-center gap-1",children:[e("svg",{width:"12",height:"8","aria-hidden":!0,children:e("rect",{x:"0.5",y:"0.5",width:"11",height:"7",fill:"none",stroke:"var(--mf-ink-700)",strokeDasharray:"0.8 1.6"})}),"\u0447\u0435\u0440\u0435\u0437 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E \u0438\u0437 \u0434\u0440\u0443\u0433\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u044B"]}),t?s(P,{children:[s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2.5 w-2.5 rounded-full border border-[var(--mf-blue)] bg-[color-mix(in_oklab,var(--mf-blue)_22%,transparent)]"}),"\u0442\u0435 \u0436\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0430\u043C \u043D\u0435\u0442"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2.5 w-2.5 rounded-full border border-dashed border-[var(--mf-blue)] bg-[color-mix(in_oklab,var(--mf-blue)_22%,transparent)]"}),"\u0435\u0441\u0442\u044C \u0438 \u0434\u0440\u0443\u0433\u0438\u0435"]})]}):null]})}function $r({countries:t,selected:n,onSelect:a}){let[o,r]=f(""),[L,l]=f(!1),i=re(()=>{let m=o.trim().toLowerCase();return t.filter(u=>!m||F(u.code).toLowerCase().includes(m)||u.code.toLowerCase()===m).sort((u,p)=>(p.coverage??-1)-(u.coverage??-1)||p.suppliers-u.suppliers||F(u.code).localeCompare(F(p.code),"ru")).slice(0,12)},[t,o]);return s("div",{className:"relative min-w-[10rem] flex-1",children:[e(G,{value:L?o:n?F(n):"",onChange:m=>r(m.target.value),onFocus:()=>{r(""),l(!0)},onBlur:()=>setTimeout(()=>l(!1),150),placeholder:"\u0421\u0442\u0440\u0430\u043D\u0430\u2026","aria-label":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0443",className:"h-7 text-xs"}),L&&i.length?e("ul",{role:"listbox",className:"absolute left-0 right-0 top-8 z-20 max-h-64 overflow-y-auto rounded-md border border-border bg-[var(--mf-surface)] py-1 text-xs shadow-md",children:i.map(m=>e("li",{children:s("button",{type:"button",role:"option","aria-selected":m.code===n,onMouseDown:u=>u.preventDefault(),onClick:()=>{a(m.code),l(!1)},className:"flex w-full items-baseline gap-2 px-2 py-1 text-left hover:bg-state-hover",children:[e("span",{className:"font-medium",children:F(m.code)}),s("span",{className:"ml-auto whitespace-nowrap text-[11px] text-muted-foreground",children:[m.coverage!=null?`${Math.round(m.coverage)}%`:m.site?"\u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D":"\u2014",m.suppliers?` \xB7 ${m.suppliers} \u043E\u0440\u0433.`:""]})]})},m.code))}):null]})}function Ie(t){w(()=>(window.addEventListener(Cn,t),()=>window.removeEventListener(Cn,t)),[t])}function Dr(){let{status:t}=H(),n=E(),[a,o]=f(null),[r,L]=f([]),[l,i]=f([]),[m,u]=f(""),[p,g]=f(""),[b,c]=f(null),[h,v]=f(null),[d,x]=f([]),[_,y]=f({});w(()=>{n("assortment_sources",{}).then(A=>x(A.items??[]),()=>x([])),n("outreach_facets",{}).then(y,()=>y({}))},[n]);let I=R(()=>{n("assortment_coverage",{}).then(A=>{o(A.items??[]),L(A.sources??[]),i(A.served??[]),u(Y=>Y||A.items?.[0]?.country||""),v(null)},A=>v(C(A)))},[n]);w(I,[I]);let[T,$]=f(null),[M,W]=f(null),[N,z]=f(0);w(()=>{if($(null),W(null),!m)return;let A=!0;return n("outreach_list_companies",{country:m,limit:50}).then(Y=>A&&$({items:Y.items??[],total:Y.total??0}),Y=>A&&W(C(Y))),()=>{A=!1}},[m,n,N]);let Q=re(()=>{let A=T?.items??[],Y=new Set(A.map(B=>B.id)),Pn=new Set(A.filter(B=>B.coverage&&(B.coverage.by??"stihl_country")==="stihl_country").map(B=>B.coverage.country)),Tt=r.filter(B=>B.source_kind==="stihl_country"&&B.country===m),Bn=r.filter(B=>B.source_kind!=="stihl_country"&&(B.country===m||B.company_id&&Y.has(B.company_id))),O=r.filter(B=>B.source_kind==="stihl_country"&&B.country!==m&&Pn.has(B.country));return[...Tt,...Bn,...O]},[r,T,m]);w(()=>{g(A=>Q.some(Y=>Y.source_id===A)?A:Q[0]?.source_id??"")},[Q]);let te=R(()=>{c(null),p&&n("assortment_source_choices",{source_id:p}).then(A=>c(A.items??[]),A=>v(C(A)))},[p,n]);w(te,[te]);let U=R(()=>{I(),te()},[I,te]);Ie(U);let ue=re(()=>g1(a??[],r,l,d,_),[a,r,l,d,_]),xe=re(()=>b1(m,T?.items??[],ue),[m,T,ue]),he=re(()=>{let A=new Map;for(let Y of r)Y.company_id&&(!A.has(Y.company_id)||Y.by_volume>A.get(Y.company_id).by_volume)&&A.set(Y.company_id,Y);return A},[r]);if(!t?.canAssortment)return e(D,{children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest."});if(a&&a.length===0&&r.length===0)return e(D,{children:"\u041D\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438\xBB."});let ke=!!t.canManage,Z=Q.find(A=>A.source_id===p);return s("div",{className:"flex flex-col",children:[e(Or,{countries:ue,selected:m,cluster:xe,onSelect:u}),s("div",{className:"mf-surface flex flex-wrap items-start gap-2 border-y border-border px-3 py-2",children:[e("div",{className:"w-full flex-none @[30rem]:w-44",children:e($r,{countries:ue,selected:m,onSelect:u})}),m?M?s("span",{className:"flex-1 py-1 text-[11px] text-destructive",children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438: ",M," ",e("button",{type:"button",className:"underline",onClick:()=>z(A=>A+1),children:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C"})]}):e(x1,{country:m,orgs:T,own:he,onMatch:A=>g(A)}):e("span",{className:"flex-1"})]}),h?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:h}):null,Q.length?s(Ba,{bar:s("div",{className:"mf-surface flex flex-wrap items-center gap-1.5 border-b border-border px-3 py-2 text-xs",role:"tablist","aria-label":"\u0421\u0432\u0435\u0440\u043A\u0430 \u043F\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0443",children:[e("b",{className:"whitespace-nowrap",children:F(m)}),e("span",{className:"text-muted-foreground",children:"\xB7 \u0441\u0432\u0435\u0440\u043A\u0430 \u043F\u043E:"}),Q.map(A=>s("button",{type:"button",role:"tab","aria-selected":A.source_id===p,onClick:()=>g(A.source_id),className:k("flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px]",A.source_id===p?"border-foreground bg-foreground text-background":"border-border hover:bg-state-hover",A.draft&&"border-dashed"),children:[A.source_kind==="stihl_country"?A.country===m?"\u0421\u0430\u0439\u0442 STIHL \u0441\u0442\u0440\u0430\u043D\u044B":`\u0421\u0430\u0439\u0442 STIHL ${F(A.country)}`:Be(A),s("b",{className:"tabular-nums",children:[Math.round(A.by_volume),"%"]}),A.draft?e("span",{className:"text-[10px] opacity-80",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null]},A.source_id)),e("button",{type:"button",className:"ml-auto whitespace-nowrap text-[11px] text-muted-foreground hover:text-foreground hover:underline",onClick:A=>{let Y=Ct(A.currentTarget);Y?.scrollTo?Y.scrollTo({top:0,behavior:"smooth"}):Y&&(Y.scrollTop=0)},children:"\u2191 \u041A\u0430\u0440\u0442\u0430"})]}),children:[Z?e(f1,{c:Z}):null,b?e(Sn,{rows:b,canDecide:ke}):e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u0432\u0435\u0440\u043A\u0443\u2026"})]}):m?e(v1,{c:ue.find(A=>A.code===m)}):null]})}function f1({c:t}){let n=nt(),a=t.source_kind!=="stihl_country";return s("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-xs",children:[s("span",{children:[s("b",{className:"tabular-nums",children:[t.by_volume,"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7 ",s("b",{className:"tabular-nums",children:[t.by_positions,"%"]})," \u043F\u043E\u0437\u0438\u0446\u0438\u0439"]}),s("span",{className:"text-muted-foreground",children:["\u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E ",t.full," \xB7 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E ",t.partial," \xB7 \u043D\u0435\u0442 ",t.none,t.unchecked?s("span",{className:"text-[var(--mf-amber)]",children:[" \xB7 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C ",t.unchecked]}):null]}),a&&t.draft?s("span",{className:"flex items-center gap-1.5",children:[e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}),e("span",{className:"text-[11px] text-muted-foreground",children:"\u0443\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435"}),e(S,{size:"sm",variant:"outline",className:"h-6 border-[var(--mf-amber)] px-2 text-[11px]",onClick:()=>n(t.source_id),children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})]}):a?e("button",{type:"button",className:"text-[11px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",onClick:()=>n(t.source_id),children:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"}):null]})}function g1(t,n,a,o,r){let L=new Map,l=i=>{let m=L.get(i);return m||L.set(i,m={code:i,coverage:null,byPositions:null,site:!1,suppliers:0,refined:0,drafts:0}),m};for(let i of r.countries??[])i.value&&(l(i.value).suppliers=i.count);for(let i of o)i.country_code&&(i.kind==="stihl_country"?l(i.country_code).site=!0:i.company_id&&i.current&&(i.current.confirmed_at?l(i.country_code).refined+=1:l(i.country_code).drafts=(l(i.country_code).drafts??0)+1));for(let i of t)Object.assign(l(i.country),{coverage:i.by_volume,byPositions:i.by_positions,coverageBy:"site",coverageDraft:!1});for(let i of n){if(i.source_kind==="stihl_country"||!i.country)continue;let m=l(i.country);(m.coverage==null||i.by_volume>m.coverage)&&Object.assign(m,{coverage:i.by_volume,byPositions:i.by_positions,coverageBy:"own",coverageDraft:i.draft,coverageOrg:i.company_name})}for(let i of a){let m=l(i.country);if(m.coverage!=null&&i.by_volume<=m.coverage)continue;let u=i.source_country!==i.country;Object.assign(m,{coverage:i.by_volume,byPositions:i.by_positions,coverageBy:u?"via":i.source_kind==="stihl_country"?"site":"own",coverageDraft:i.draft,coverageOrg:i.company_name,coverageVia:i.source_kind==="stihl_country"?`\u0441\u0430\u0439\u0442 STIHL ${F(i.source_country)}`:`\u043A\u0430\u0442\u0430\u043B\u043E\u0433${i.draft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A":""}`})}return[...L.values()]}var Zr=t=>[...new Set([t.country_code,...t.countries??[]].filter(Boolean))];function b1(t,n,a){if(!t||!n.length)return{};let o=new Map(a.map(L=>[L.code,L.suppliers])),r={};for(let L of n)for(let l of Zr(L)){let i=r[l]??={n:0,full:!1};i.n+=1}for(let[L,l]of Object.entries(r))l.full=l.n>=(o.get(L)??0);return r}function x1({country:t,orgs:n,own:a,onMatch:o}){let r=_e(),L=le(),[l,i]=f(!1),m=n?l?n.items:n.items.slice(0,6):null,u=n?.total??0;if(!m)return e("span",{className:"flex-1 py-1 text-[11px] text-muted-foreground",children:"\u2026"});if(!m.length)return e("span",{className:"flex-1 py-1 text-[11px] text-muted-foreground",children:"\u0412 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u043D\u0435\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u044B."});let p="h-6 rounded-md px-1.5 text-[11px] text-muted-foreground hover:bg-state-hover hover:text-foreground";return s("ul",{className:"flex min-w-[12rem] flex-1 flex-col gap-0.5","aria-label":"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u043D\u044B",children:[m.map(g=>{let b={kind:"company",id:g.id,title:g.display_name};return s("li",{className:"flex items-center gap-1.5 text-xs",children:[s("span",{className:"flex-none rounded-full border border-border px-1 text-[10px] font-semibold",children:["P",g.priority]}),e("span",{className:"min-w-0 truncate font-medium",title:g.display_name,children:g.display_name}),e(h1,{codes:Zr(g).filter(c=>c!==t)}),g.coverage?s("span",{className:"flex-none text-[11px] tabular-nums text-muted-foreground",title:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430: \u043B\u0443\u0447\u0448\u0430\u044F \u0438\u0437 \u0441\u0442\u0440\u0430\u043D \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 (${F(g.coverage.country)})`,children:[Math.round(g.coverage.by_volume),"%"]}):null,s("span",{className:"ml-auto flex flex-none",children:[a.get(g.id)?e("button",{type:"button",className:p,title:"\u0421\u0432\u0435\u0440\u043A\u0430 \u043B\u0438\u0441\u0442\u0430 \u0441 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u043C \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",onClick:()=>o(a.get(g.id).source_id),children:"\u0421\u0432\u0435\u0440\u043A\u0430"}):null,e("button",{type:"button",className:p,title:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0440\u044F\u0434\u043E\u043C \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438",onClick:()=>{r(b)||L(b)},children:"\u0420\u044F\u0434\u043E\u043C"}),e("button",{type:"button",className:p,title:"\u0427\u0430\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",onClick:()=>{L(b)},children:"\u0427\u0430\u0442"})]})]},g.id)}),n&&!l&&n.items.length>m.length?e("li",{children:s("button",{type:"button",className:"text-[11px] text-muted-foreground hover:underline",onClick:()=>i(!0),children:["\u0438 \u0435\u0449\u0451 ",n.items.length-m.length]})}):null,u>(n?.items.length??0)?s("li",{className:"text-[11px] text-muted-foreground",children:["\u0432\u0441\u0435\u0433\u043E ",u," \u2014 \u0444\u0438\u043B\u044C\u0442\u0440 \xAB\u0421\u0442\u0440\u0430\u043D\u0430\xBB \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0441\u043B\u0435\u0432\u0430"]}):null]})}function h1({codes:t}){if(!t.length)return null;let n=t.map(F);return s("span",{className:"min-w-0 flex-none truncate text-[10px] text-muted-foreground",title:`\u0422\u0430\u043A\u0436\u0435: ${n.join(", ")}`,children:["+ ",n.slice(0,2).join(", "),n.length>2?` +${n.length-2}`:""]})}function v1({c:t}){return t?s("div",{className:"px-3 py-2 text-xs",children:[e("b",{children:F(t.code)})," ",s("span",{className:"text-muted-foreground",children:["\xB7 ",Da(t)]}),e("p",{className:"mt-1 text-[11px] text-muted-foreground",children:t.site?"\u0421\u0430\u0439\u0442 STIHL \u0441\u0442\u0440\u0430\u043D\u044B \u0435\u0441\u0442\u044C \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043E \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438\xBB, \u0438 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u043E\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F.":"\u0421\u0430\u0439\u0442\u0430 STIHL \u043D\u0430 \u043E\u0431\u0449\u0435\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0435 \u0443 \u0441\u0442\u0440\u0430\u043D\u044B \u043D\u0435\u0442: \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0434\u0430\u0441\u0442 \u043F\u0440\u0430\u0439\u0441, \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u0441\u0430\u0439\u0442 \u0441\u0430\u043C\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438."})]}):null}function Fr({d:t,canDecide:n}){let a=E(),[o,r]=f(null),[L,l]=f(null),[i,m]=f(null),u=R(()=>{Promise.all([a("assortment_source_choices",{source_id:t.source_id}),a("assortment_snapshot_items",{id:t.snapshot_id,limit:3e3})]).then(([c,h])=>{r(c.items??[]),l(h.items??[])},c=>m(C(c)))},[t.source_id,t.snapshot_id,a]);if(w(u,[u]),Ie(u),i&&!o)return s(D,{children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ",i]});if(!o||!L)return e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u2026"});let p=o.filter(c=>c.level>0||c.decided),g=new Set(p.map(c=>(c.name??"").toLowerCase())),b=L.filter(c=>!g.has((c.variant_name||c.product_name).toLowerCase()));return s("div",{className:"flex flex-col",children:[s("div",{className:"flex items-baseline gap-2 px-3 pt-2 text-xs",children:[e("b",{children:"\u0421\u043E\u0432\u043F\u0430\u043B\u043E \u0441 \u043B\u0438\u0441\u0442\u043E\u043C"}),e("span",{className:"tabular-nums text-muted-foreground",children:p.length})]}),p.length?e(Sn,{rows:p,canDecide:n,productLabel:"\u0422\u043E\u0432\u0430\u0440 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430"}):e("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"\u041D\u0438 \u043E\u0434\u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u044F \u043B\u0438\u0441\u0442\u0430 \u043D\u0435 \u043D\u0430\u0448\u043B\u0430\u0441\u044C \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435."}),s("div",{className:"flex items-baseline gap-2 px-3 pt-3 text-xs",children:[e("b",{children:"\u041D\u0435\u0442 \u0432 \u043B\u0438\u0441\u0442\u0435"}),e("span",{className:"tabular-nums text-muted-foreground",children:b.length}),e("span",{className:"text-[11px] text-muted-foreground",children:"\u0442\u043E\u0432\u0430\u0440\u044B \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043B\u0438\u0441\u0442\u0443 \u043D\u0435 \u043D\u0443\u0436\u043D\u044B \u0438\u043B\u0438 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u044B"})]}),b.length?s("table",{className:"mb-2 w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-[var(--mf-sticky,0px)] z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u0422\u043E\u0432\u0430\u0440"}),e("th",{className:k(K,"hidden w-[7.5rem] text-left @[26rem]:table-cell"),children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e("th",{className:k(K,"w-24 pr-3 text-right"),children:"\u0426\u0435\u043D\u0430"})]})}),e("tbody",{children:b.map((c,h)=>{let v=c.variant_name||c.product_name;return s("tr",{className:"border-t border-[var(--mf-line-200)]",children:[e("td",{className:"max-w-0 py-1 pl-3 pr-2",children:c.url?e("a",{href:c.url,target:"_blank",rel:"noreferrer",className:"block truncate hover:underline",title:v,children:v}):e("span",{className:"block truncate",title:v,children:v})}),e("td",{className:"hidden truncate px-2 py-1 text-muted-foreground @[26rem]:table-cell",children:c.model_key||"\u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u0430"}),e("td",{className:"py-1 pl-2 pr-3 text-right tabular-nums text-muted-foreground",children:Ae(c.price,c.currency)})]},`${v}-${h}`)})})]}):null]})}var zr=(t,n,a,o)=>{let r=t%100,L=t%10;return r>=11&&r<=14?o:L===1?n:L>=2&&L<=4?a:o};function jr({focus:t=null}){let{status:n}=H(),a=E(),[o,r]=f(null),[L,l]=f("countries"),i=re(()=>o?o.filter(M=>M.kind==="stihl_country"):null,[o]),[m,u]=f(null),[p,g]=f(null),b=j(null),[c,h]=Ar(b),v=R(()=>{a("assortment_sources",{}).then(M=>{r(M.items??[]),u(null)},M=>u(C(M)))},[a]);w(v,[v]),Ie(v),w(()=>{let M=t&&o?.find(W=>W.id===t);M&&(l(M.company_id?"orgs":"countries"),h({kind:M.company_id?"org":"country",id:M.id}))},[t,o!==null]);let d=i?.some(M=>M.latest?.status==="running");w(()=>{if(!d)return;let M=setInterval(v,3e3);return()=>clearInterval(M)},[v,d]);let x=async(M,W,N)=>{g(N),u(null);try{await a(M,W),v()}catch(z){u(C(z))}finally{g(null)}};if(!n?.canAssortment)return e(D,{children:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest."});let _=!!n.canManage,y=(o??[]).filter(M=>M.company_id&&(M.current||M.latest)),I=c?(o??[]).find(M=>M.id===c.id):void 0,T=m?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:m}):null;if(c)return I?e("div",{ref:b,children:c.kind==="country"?e(y1,{source:I,action:_?e(Hr,{source:I,busy:p,act:x}):null,onBack:()=>h(null),children:T}):e(N1,{source:I,canManage:_,onBack:()=>h(null)})}):e("div",{ref:b,children:e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u2026"})});let $=(M,W)=>e("button",{type:"button",role:"tab","aria-selected":L===M,onClick:()=>l(M),className:k("whitespace-nowrap rounded-md border px-2 py-0.5 text-[11px]",L===M?"border-foreground bg-foreground text-background":"border-border hover:bg-state-hover"),children:W});return s("div",{ref:b,className:"flex flex-col",children:[s("div",{className:"mf-surface flex flex-wrap items-center gap-1.5 border-b border-border px-3 py-2",role:"tablist","aria-label":"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438",children:[$("countries",`\u0421\u0430\u0439\u0442\u044B STIHL \u0441\u0442\u0440\u0430\u043D${i?` (${i.filter(M=>M.current).length})`:""}`),$("orgs",`\u041A\u0430\u0442\u0430\u043B\u043E\u0433\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 (${y.length})`)]}),T,L==="orgs"?e(_1,{sources:y,onOpen:M=>h({kind:"org",id:M})}):s(P,{children:[s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u0421\u0442\u0440\u0430\u043D\u0430"}),e("th",{className:k(K,"text-right"),title:"\u041C\u043E\u0434\u0435\u043B\u0435\u0439 \u0438 \u0442\u043E\u0432\u0430\u0440\u043E\u0432 (\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u043C \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u043E\u043C) \u043D\u0430 \u0441\u0430\u0439\u0442\u0435 STIHL \u0441\u0442\u0440\u0430\u043D\u044B",children:"\u041D\u0430 \u0441\u0430\u0439\u0442\u0435"}),e("th",{className:k(K,"hidden text-left @[34rem]:table-cell"),children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E"}),e("th",{className:k(K,"pr-3 text-right")})]})}),e("tbody",{children:(i??[]).map(M=>{let W=M.current,N=M.latest,z=Za(M);return s("tr",{className:"cursor-pointer border-b border-[var(--mf-line-200)] align-top hover:bg-state-hover",onClick:()=>h({kind:"country",id:M.id}),title:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0441\u0442\u0440\u0430\u043D\u044B",children:[s("td",{className:"py-1.5 pl-3 pr-2",children:[e("span",{className:"font-medium",children:F(M.country_code)}),e("span",{className:"ml-1 text-muted-foreground",children:"\u203A"}),N?.status==="running"?s("span",{className:"mt-1 flex items-center gap-2 text-[11px] text-muted-foreground",children:[e(Yt,{className:"w-20",parts:[{tone:"info",value:N.pages_done},{tone:"warning",value:Math.max(0,N.pages_total-N.pages_done)}]}),N.pages_total?`${N.pages_done} \u0438\u0437 ${N.pages_total}`:"\u043A\u0430\u0440\u0442\u0430 \u0441\u0430\u0439\u0442\u0430\u2026"]}):null,N?.status==="failed"?e("span",{className:"block text-[11px] text-destructive",children:N.error}):null,z?s("span",{className:"block text-[11px] text-[var(--mf-amber)]",children:["\u0433\u043E\u0442\u043E\u0432 \u043D\u043E\u0432\u044B\u0439 \u0441\u043D\u0438\u043C\u043E\u043A: ",z.models," \u043C\u043E\u0434\u0435\u043B\u0435\u0439, ",z.variants," \u0432\u0430\u0440.",z.pages_failed?`, \u043E\u0448\u0438\u0431\u043E\u043A ${z.pages_failed}`:""]}):null]}),e("td",{className:"whitespace-nowrap px-2 py-1.5 text-right tabular-nums",children:W?s(P,{children:[s("span",{className:"@[30rem]:hidden",children:[W.models," \u043C\u043E\u0434."]}),s("span",{className:"hidden @[30rem]:inline",children:[W.models," ",zr(W.models,"\u043C\u043E\u0434\u0435\u043B\u044C","\u043C\u043E\u0434\u0435\u043B\u0438","\u043C\u043E\u0434\u0435\u043B\u0435\u0439"),s("span",{className:"text-muted-foreground",children:[" \xB7 ",W.variants," \u0442\u043E\u0432."]})]})]}):e("span",{className:"text-muted-foreground",children:"\u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})}),e("td",{className:"hidden px-2 py-1.5 text-muted-foreground @[34rem]:table-cell",children:W?.applied_at?q(W.applied_at):"\u2014"}),e("td",{className:"py-1.5 pl-2 pr-3 text-right",onClick:Q=>Q.stopPropagation(),children:_?e(Hr,{source:M,busy:p,act:x}):null})]},M.id)})})]}),e("p",{className:"px-3 py-2 text-[11px] text-muted-foreground",children:"\u0421\u0430\u0439\u0442 STIHL \u043D\u0430 \u043E\u0431\u0449\u0435\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0435 \u0435\u0441\u0442\u044C \u043D\u0435 \u0432\u043E \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043D\u0430\u0445: \u0434\u043B\u044F \u043E\u0441\u0442\u0430\u043B\u044C\u043D\u044B\u0445 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0434\u0430\u0441\u0442 \u043F\u0440\u0430\u0439\u0441 \u0438\u043B\u0438 \u0441\u0430\u0439\u0442 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u044C\u044E\u0442\u043E\u0440\u0430."})]})]})}var Za=t=>t.latest&&t.latest.status==="ready"&&t.latest.id!==t.current?.id?t.latest:null;function Hr({source:t,busy:n,act:a}){let o=Za(t);return o?e(S,{size:"sm",className:"h-7 px-2",disabled:n!==null,onClick:()=>{a("assortment_apply",{id:o.id},t.id)},children:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"}):t.latest?.status==="running"?null:e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:n!==null,onClick:()=>{a("assortment_refresh",{country:t.country_code},t.id)},children:t.current?"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C"})}function y1({source:t,action:n,onBack:a,children:o}){let r=t.current,L=t.latest;return s(Pa,{back:"\u0421\u0430\u0439\u0442\u044B STIHL \u0441\u0442\u0440\u0430\u043D",onBack:a,title:F(t.country_code),meta:s(P,{children:[r?`\u0441\u0430\u0439\u0442 STIHL \xB7 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E ${q(r.applied_at)}`:"\u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D",L?.status==="running"?` \xB7 \u0438\u0434\u0451\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430 ${L.pages_done} \u0438\u0437 ${L.pages_total||"\u2026"}`:"",Za(t)?" \xB7 \u0433\u043E\u0442\u043E\u0432 \u043D\u043E\u0432\u044B\u0439 \u0441\u043D\u0438\u043C\u043E\u043A":""]}),actions:n,children:[o,r?e(k1,{country:t.country_code}):e(D,{children:"\u0410\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0441\u0442\u0440\u0430\u043D\u044B \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D."})]})}function _1({sources:t,onOpen:n}){let a=_e(),o=le(),r=Kr();if(!t.length)return e(D,{children:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u0432 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u0440\u0430\u0439\u0441 \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u043F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0432 \u0435\u0451 \u0447\u0430\u0442\u0435 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u0442\u044C \u0435\u0451 \u0441\u0430\u0439\u0442."});let L=[...t].sort((l,i)=>(r.get(i.id)?.by_volume??-1)-(r.get(l.id)?.by_volume??-1));return s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("th",{className:k(K,"hidden text-left @[34rem]:table-cell"),children:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A"}),e("th",{className:k(K,"text-right"),children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435"}),e("th",{className:k(K,"pr-3 text-right")})]})}),e("tbody",{children:L.map(l=>{let i=l.current,m=!!i&&!i.confirmed_at,u=r.get(l.id),p=Ur(l),g=l.company_id?{kind:"company",id:l.company_id,title:p}:null;return s("tr",{className:k("border-b border-[var(--mf-line-200)] align-top",i&&"cursor-pointer hover:bg-state-hover"),onClick:()=>i&&n(l.id),children:[s("td",{className:"max-w-0 py-1.5 pl-3 pr-2",children:[e("span",{className:"block truncate font-medium",title:p,children:p}),s("span",{className:"flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground",children:[m?e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null,F(l.country_code)," \xB7 ",i?`${i.products} \u0442\u043E\u0432.`:"\u043D\u0435\u0442 \u0441\u043D\u0438\u043C\u043A\u0430"]})]}),s("td",{className:"hidden max-w-0 truncate px-2 py-1.5 text-muted-foreground @[34rem]:table-cell",title:l.base_url,children:[l.kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442",l.base_url?` \xB7 ${l.base_url.replace(/^https?:\/\//,"")}`:""]}),e("td",{className:"whitespace-nowrap px-2 py-1.5 text-right tabular-nums",children:u?`${Math.round(u.by_volume)}%`:"\u2014"}),e("td",{className:"py-1.5 pl-2 pr-3 text-right",onClick:b=>b.stopPropagation(),children:s("span",{className:"flex flex-wrap justify-end gap-1",children:[g?e(S,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>{a(g)||o(g)},children:"\u0420\u044F\u0434\u043E\u043C"}):null,i?e(S,{size:"sm",variant:"outline",className:k("h-7 px-2",m&&"border-[var(--mf-amber)]"),onClick:()=>n(l.id),children:m?"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C":"\u0421\u043E\u0441\u0442\u0430\u0432"}):null]})})]},l.id)})})]})}var Ur=t=>t.title.replace(/^(Сайт|Прайс) · /,"");function Kr(){let t=E(),[n,a]=f(new Map),o=R(()=>{t("assortment_coverage",{}).then(r=>a(new Map((r.sources??[]).map(L=>[L.source_id,L]))),()=>a(new Map))},[t]);return w(o,[o]),Ie(o),n}function N1({source:t,canManage:n,onBack:a}){let o=E(),r=_e(),L=le(),l=Kr(),[i,m]=f(!1),[u,p]=f(null),g=t.current,b=!!g&&!g.confirmed_at,c=l.get(t.id),h=Ur(t),v=t.company_id?{kind:"company",id:t.company_id,title:h}:null,d=async x=>{if(g){m(!0),p(null);try{await o(x,{id:g.id}),St(),x==="assortment_discard"&&a()}catch(_){p(C(_))}finally{m(!1)}}};return e(Pa,{back:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439",onBack:a,title:s(P,{children:[e("span",{className:"min-w-0 truncate",title:h,children:h}),b?e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null]}),meta:s(P,{children:[F(t.country_code)," \xB7 ",t.kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442",t.base_url?s(P,{children:[" \xB7 ",e("a",{href:t.base_url,target:"_blank",rel:"noreferrer",className:"hover:underline",children:t.base_url.replace(/^https?:\/\//,"")})]}):null,g?` \xB7 ${g.products} \u0442\u043E\u0432.`:"",c?` \xB7 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 ${Math.round(c.by_volume)}%`:"",b?e("span",{className:"hidden @[30rem]:block",children:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u0443\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435: \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u043E\u0441\u0442\u0430\u0432 \u0438 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u0435."}):null,u?e("span",{role:"alert",className:"block text-destructive",children:u}):null]}),actions:s(P,{children:[v?e(S,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>{r(v)||L(v)},children:"\u0420\u044F\u0434\u043E\u043C"}):null,b&&n?s(P,{children:[e(S,{size:"sm",className:"h-7 px-2",disabled:i,onClick:()=>{d("assortment_confirm")},children:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:i,onClick:()=>{d("assortment_discard")},children:"\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C"})]}):null]}),children:g?e(Fr,{d:{source_id:t.id,snapshot_id:g.id},canDecide:n}):e(D,{children:"\u0423 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u043D\u0435\u0442 \u0441\u043D\u0438\u043C\u043A\u0430."})})}function w1(t){if(!t.some(o=>o.category))return null;let n=new Map;for(let o of t){let r=o.category||"\u041F\u0440\u0438\u043D\u0430\u0434\u043B\u0435\u0436\u043D\u043E\u0441\u0442\u0438";n.set(r,[...n.get(r)??[],o])}let a=o=>o==="\u041F\u0440\u0438\u043D\u0430\u0434\u043B\u0435\u0436\u043D\u043E\u0441\u0442\u0438"?1:0;return[...n.entries()].sort(([o],[r])=>a(o)-a(r)||o.localeCompare(r,"ru")).map(([o,r])=>({category:o,items:r}))}function k1({country:t,snapshotId:n}){let a=E(),[o,r]=f(""),[L,l]=f(null);w(()=>{let p=setTimeout(()=>{(n?a("assortment_snapshot_items",{id:n,q:o||void 0,limit:3e3}):a("assortment_items",{country:t,q:o||void 0,limit:1e3})).then(b=>l(b.items??[]),()=>l([]))},250);return()=>clearTimeout(p)},[t,n,o,a]);let i=re(()=>L?w1(L):null,[L]),m=re(()=>new Set((L??[]).map(p=>p.model_key).filter(Boolean)).size,[L]),u=p=>{let g=p.variant_name||p.product_name;return s("tr",{className:"border-b border-[var(--mf-line-200)] hover:bg-state-hover",children:[e("td",{className:"max-w-0 py-1 pl-3 pr-2",children:s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"truncate font-medium",title:g,children:p.model_key||e("span",{className:"font-normal",children:g})}),p.kit?e(Pe,{}):null]})}),e("td",{className:"hidden max-w-0 px-2 py-1 @[30rem]:table-cell",children:e("a",{href:p.url,target:"_blank",rel:"noreferrer",className:"block truncate text-muted-foreground hover:text-foreground hover:underline",title:g,children:g})}),e("td",{className:"hidden whitespace-nowrap px-2 py-1 font-mono text-[11px] text-muted-foreground @[22rem]:table-cell",children:p.sku||"\u2014"}),e("td",{className:"whitespace-nowrap py-1 pl-2 pr-3 text-right tabular-nums text-muted-foreground",children:Ae(p.price,p.currency)})]},`${p.global_id}-${p.sku}`)};return s("div",{className:"flex flex-col",children:[s("div",{className:"flex flex-wrap items-center gap-2 px-3 py-2 text-xs",children:[e(G,{value:o,onChange:p=>r(p.target.value),placeholder:"\u041C\u043E\u0434\u0435\u043B\u044C, \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435, \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u2026","aria-label":`\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0443 ${t}`,className:"h-7 min-w-[9rem] flex-1 text-xs"}),e("span",{className:"text-muted-foreground",children:L?`${m} ${zr(m,"\u043C\u043E\u0434\u0435\u043B\u044C","\u043C\u043E\u0434\u0435\u043B\u0438","\u043C\u043E\u0434\u0435\u043B\u0435\u0439")} \xB7 ${L.length} \u0442\u043E\u0432.`:"\u2026"})]}),L&&L.length?s("table",{className:"w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-[var(--mf-sticky,0px)] z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e("th",{className:k(K,"hidden text-left @[30rem]:table-cell"),children:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043D\u0430 \u0441\u0430\u0439\u0442\u0435"}),e("th",{className:k(K,"hidden w-[7.5rem] text-left @[22rem]:table-cell"),children:"\u0410\u0440\u0442\u0438\u043A\u0443\u043B"}),e("th",{className:k(K,"w-24 pr-3 text-right"),children:"\u0426\u0435\u043D\u0430"})]})}),e("tbody",{children:i?i.map(p=>e(C1,{title:p.category,count:p.items.length,children:p.items.map(u)},p.category)):L.map(u)})]}):null,L&&L.length===0?e(D,{children:"\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E."}):null]})}function C1({title:t,count:n,children:a}){return s(P,{children:[e(wn,{colSpan:4,title:t,note:`${n} \u0442\u043E\u0432.`}),a]})}function Fa(){let t=E(),[n,a]=f(null),[o,r]=f(null),L=R(()=>{Promise.all([t("assortment_coverage",{}),t("assortment_queue",{})]).then(([l,i])=>{a({drafts:(l.sources??[]).filter(m=>m.draft),queue:i.items??[]}),r(null)},l=>r(C(l)))},[t]);return w(L,[L]),Ie(L),{data:n,error:o,reload:L}}function S1(t){return t.global_id?`g:${t.global_id}`:t.sku?`s:${t.sku}`:`n:${t.source?.source_id}:${(t.name??"").toLowerCase().replace(/\s+/g," ")}`}function M1(t,n){return t.global_id?{key_kind:"global_id",key:t.global_id}:t.sku?{key_kind:"sku",key:t.sku}:{key_kind:"name",key:t.name??"",source_id:n?.source_id}}var T1={trim:"\u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E",generation:"\u0434\u0440\u0443\u0433\u043E\u0435 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435",kit:"\u043D\u0430\u0431\u043E\u0440 \u2194 \u0431\u0435\u0437 \u0410\u041A\u0411",mains:"\u0437\u0430\u0440\u044F\u0434\u043D\u043E\u0435 \u043D\u0435 \u0434\u043B\u044F \u0441\u0435\u0442\u0438 \u0415\u0421"};function R1(t){let n=new Map;for(let a of t){let o=n.get(a.need_id);o||n.set(a.need_id,o={needId:a.need_id,first:a,candidates:[]});let r=S1(a),L=o.candidates.find(l=>l.key===r);L?L.rows.push(a):o.candidates.push({key:r,rows:[a]})}return[...n.values()].sort((a,o)=>a.first.position_no-o.first.position_no)}function Vr(){let{status:t}=H(),n=E(),{data:a,error:o}=Fa(),[r,L]=f(new Map);w(()=>{n("procurement_needs",{}).then(u=>L(new Map((u.items??[]).map(p=>[p.id,p]))),()=>L(new Map))},[n]);let l=re(()=>a?R1(a.queue):[],[a]);if(!t?.canAssortment)return e(D,{children:"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest."});if(o)return s(D,{children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ",o]});if(!a)return e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let i=!!t.canManage,m=l.reduce((u,p)=>u+p.candidates.length,0);return s("div",{className:"@container flex flex-col",children:[e(Gr,{title:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0438 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u0432",count:a.drafts.length,hint:"\u0423\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439. \u0421\u043E\u0441\u0442\u0430\u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430, \xAB\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\xBB \u0438 \xAB\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C\xBB \u2014 \u0432 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445\xBB.",children:a.drafts.length?e(P1,{drafts:a.drafts}):e(qr,{children:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u043E\u0432 \u043D\u0435\u0442."})}),e(Gr,{title:"\u0421\u043E\u043C\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u0431\u043E\u0440\u044B",count:m,hint:l.length?`${l.length} \u043F\u043E\u0437. \u043B\u0438\u0441\u0442\u0430. \u0420\u0435\u0448\u0435\u043D\u0438\u0435 \u043F\u043E \u0442\u043E\u0432\u0430\u0440\u0443 STIHL \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043E \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043D\u0430\u0445, \u043F\u043E \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0443 \u2014 \u0432\u043E \u0432\u0441\u0435\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445, \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E \u2014 \u0432 \u0441\u0432\u043E\u0451\u043C \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435.`:"",children:l.length?s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u0422\u043E\u0432\u0430\u0440 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430"}),e("th",{className:k(K,"hidden w-[24%] text-left @[36rem]:table-cell"),children:"\u0413\u0434\u0435"}),e("th",{className:k(K,"hidden w-[11rem] text-left @[44rem]:table-cell"),children:"\u0421\u043E\u043C\u043D\u0435\u043D\u0438\u0435"}),e("th",{className:k(K,"hidden w-[10rem] pr-3 text-right @[30rem]:table-cell"),children:"\u0420\u0435\u0448\u0435\u043D\u0438\u0435"})]})}),e("tbody",{children:l.map(u=>s(ot,{children:[e(E1,{row:u.first,need:r.get(u.needId)}),u.candidates.map(p=>e(A1,{c:p,canDecide:i},p.key))]},u.needId))})]}):e(qr,{children:"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E: \u0432\u0441\u0435 \u0441\u043E\u043C\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u0431\u043E\u0440\u044B \u0440\u0435\u0448\u0435\u043D\u044B."})})]})}function Gr({title:t,count:n,hint:a,children:o}){return s("section",{className:"border-b border-border",children:[s("div",{className:"mf-surface flex flex-wrap items-baseline gap-x-2 gap-y-0.5 px-3 py-2",children:[s("h3",{className:"text-[13px] font-bold",children:[t," ",e("span",{className:"font-normal tabular-nums text-muted-foreground",children:n})]}),a?e("span",{className:"text-[11px] text-muted-foreground",children:a}):null]}),o]})}function qr({children:t}){return e("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:t})}function E1({row:t,need:n}){let a=n?.article_aliases??[];return e("tr",{className:"border-t border-[var(--mf-line-300)] bg-[var(--mf-surface-strong)]",children:s("td",{colSpan:4,className:"px-3 py-1.5",children:[s("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5",children:[s("span",{className:"tabular-nums text-muted-foreground",children:["\u2116",t.position_no]}),e("span",{className:"font-semibold",children:t.model_key}),t.kit?e(Pe,{}):null,e("span",{className:"text-[11px] text-muted-foreground",children:[t.category,`${t.qty} \u0448\u0442`,a.length?`\u0430\u0440\u0442. ${a.slice(0,2).join(", ")}${a.length>2?` +${a.length-2}`:""}`:"",n?.ref_price?`\u043E\u0440\u0438\u0435\u043D\u0442\u0438\u0440 ${Ae(n.ref_price,n.ref_currency)}`:""].filter(Boolean).join(" \xB7 ")})]}),n?.description_en&&n.description_en!==t.model_key?s("div",{className:"truncate text-[11px] text-muted-foreground",title:n.description_en,children:["\u0412 \u043B\u0438\u0441\u0442\u0435: ",n.description_en]}):null]})})}function A1({c:t,canDecide:n}){let a=E(),[o,r]=f(!1),[L,l]=f(!1),[i,m]=f(null),u=t.rows[0],p=Ia(u),g=T1[u.reason??""]??p.text,b=t.rows.map(d=>d.source?.source_kind==="stihl_country"?F(d.source.country):Be(d.source)),c=async(d,x)=>{l(!0),m(null);try{await a("assortment_decide",{need_id:u.need_id,level:d,reason:d===.5?u.reason??"":"",...M1(x??u,u.source)}),St()}catch(_){m(C(_))}finally{l(!1)}},h="h-6 whitespace-nowrap rounded-md border px-1.5 text-[11px] disabled:opacity-50",v=e(P,{children:n?s("span",{className:"inline-flex flex-nowrap gap-1",role:"group","aria-label":`\u0420\u0435\u0448\u0435\u043D\u0438\u0435: ${u.name}`,children:[e("button",{type:"button",className:k(h,"border-foreground bg-foreground text-background"),disabled:L,onClick:()=>{c(1)},title:"\u0422\u043E\u0442 \u0436\u0435 \u0442\u043E\u0432\u0430\u0440, \u0447\u0442\u043E \u043D\u0443\u0436\u0435\u043D \u043B\u0438\u0441\u0442\u0443",children:"\u0422\u043E\u0442 \u0436\u0435"}),e("button",{type:"button",className:k(h,"border-border hover:bg-state-hover"),disabled:L,onClick:()=>{c(.5)},title:"\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E: \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442 \u0441 \u043E\u0433\u043E\u0432\u043E\u0440\u043A\u043E\u0439",children:"\xBD"}),e("button",{type:"button",className:k(h,"border-border text-destructive hover:bg-state-hover"),disabled:L,onClick:()=>{c(0)},title:"\u041D\u0435 \u0442\u043E\u0442 \u0442\u043E\u0432\u0430\u0440",children:"\u041D\u0435 \u0442\u043E"})]}):null});return s(P,{children:[s("tr",{className:"border-t border-[var(--mf-line-200)] align-top",children:[e("td",{className:"py-1.5 pl-3 pr-2",children:e("div",{className:"flex min-w-0 items-start gap-1.5",children:s("div",{className:"min-w-0",children:[e("div",{className:"break-words font-medium leading-snug",children:u.name}),s("div",{className:"flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground",children:[u.sku?e("span",{className:"font-mono",children:u.sku}):null,u.url?e("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"underline",children:"\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"}):null,s("span",{className:"@[36rem]:hidden",children:["\xB7 ",b.slice(0,2).join(", "),b.length>2?` +${b.length-2}`:""]}),u.alternatives?.length?s("button",{type:"button",className:"underline",onClick:()=>r(!o),"aria-expanded":o,children:["\u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u044B \u043C\u043E\u0434\u0435\u043B\u0438 (",u.alternatives.length,")"]}):null]}),s("div",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] @[44rem]:hidden",children:[e(ge,{tone:p.tone}),e("span",{children:g})]}),s("div",{className:"mt-1 @[30rem]:hidden",children:[v,i?e("div",{role:"alert",className:"mt-0.5 text-[11px] text-destructive",children:i}):null]})]})})}),e("td",{className:"hidden w-[24%] px-2 py-1.5 text-[11px] text-muted-foreground @[36rem]:table-cell",title:b.join(", "),children:s("span",{className:"line-clamp-2",children:[b.slice(0,4).join(", "),b.length>4?` \u0438 \u0435\u0449\u0451 ${b.length-4}`:""]})}),e("td",{className:"hidden px-2 py-1.5 @[44rem]:table-cell",children:s("span",{className:"flex min-w-0 items-start gap-1.5",children:[e(ge,{tone:p.tone,className:"mt-1"}),e("span",{title:p.text,children:g})]})}),s("td",{className:"hidden py-1.5 pl-2 pr-3 text-right @[30rem]:table-cell",children:[v,i?e("div",{role:"alert",className:"mt-0.5 text-[11px] text-destructive",children:i}):null]})]}),o&&u.alternatives?.length?e("tr",{className:"bg-[var(--mf-paper)]",children:s("td",{colSpan:4,className:"px-3 py-1.5",children:[s("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:["\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u044B \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 \xB7 ",Be(u.source)]}),u.alternatives.map(d=>s("div",{className:"flex items-center gap-2 py-0.5 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:d.name,children:[d.name," ",e("span",{className:"font-mono text-muted-foreground",children:d.sku}),d.kit?" \xB7 \u043D\u0430\u0431\u043E\u0440":""]}),n?e(S,{size:"sm",variant:"outline",className:"h-6 px-2 text-[11px]",disabled:L,onClick:()=>{c(1,d)},children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C"}):null]},`${d.global_id}|${d.sku}|${d.name}`))]})}):null]})}function P1({drafts:t}){let n=nt();return s("table",{className:"w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("th",{className:k(K,"w-20 text-right"),children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435"}),e("th",{className:k(K,"hidden w-24 text-right @[30rem]:table-cell"),children:"\u041F\u043E\u0437\u0438\u0446\u0438\u0439"}),e("th",{className:k(K,"w-[6.5rem] pr-3 text-right @[30rem]:w-[11rem]")})]})}),e("tbody",{children:t.map(a=>s("tr",{className:"border-t border-[var(--mf-line-200)]",children:[s("td",{className:"max-w-0 py-1.5 pl-3 pr-2",children:[e("div",{className:"truncate font-medium",title:a.company_name||a.title,children:a.company_name||a.title}),s("div",{className:"truncate text-[11px] text-muted-foreground",children:[F(a.country)," \xB7 ",a.source_kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442"]})]}),s("td",{className:"px-2 py-1.5 text-right tabular-nums",children:[Math.round(a.by_volume),"%"]}),s("td",{className:"hidden px-2 py-1.5 text-right tabular-nums text-muted-foreground @[30rem]:table-cell",children:[a.full+a.partial," \u0438\u0437 ",a.positions]}),e("td",{className:"py-1.5 pl-2 pr-3 text-right",children:s(S,{size:"sm",variant:"outline",className:"h-7 whitespace-nowrap border-[var(--mf-amber)] px-2 text-[11px]","aria-label":"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445",onClick:()=>n(a.source_id),children:[e("span",{className:"@[30rem]:hidden",children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"}),e("span",{className:"hidden @[30rem]:inline",children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})]})})]},a.source_id))})]})}function B1(t){let n=new Map;for(let a of t){let o=a.category||"\u0411\u0435\u0437 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438";n.set(o,[...n.get(o)??[],a])}return[...n.entries()].sort(([a],[o])=>a.localeCompare(o,"ru")).map(([a,o])=>({category:a,items:o,qty:o.reduce((r,L)=>r+L.target_qty,0)}))}function Jr(t){let n=le(),a=Ee(),[o,r]=f(!1);return w(()=>{a("needs").then(L=>{L==="stay"?r(!0):L==="none"&&n(vt)})},[n,a]),o?e(Ha,{}):e(D,{children:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442\u2026"})}function Ha(){let{status:t}=H(),[n,a]=f(()=>Q2()),[o,r]=f(()=>n?"countries":"sheet"),L=Fa();return w(()=>{let l=i=>{let m=i.detail;m&&(i.preventDefault(),r("countries"),a(null),setTimeout(()=>a(m),0))};return window.addEventListener(cn,l),()=>window.removeEventListener(cn,l)},[]),t?.canAssortment?s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[e(rt,{label:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442",active:o,onSelect:l=>r(l),tabs:[["sheet","\u041B\u0438\u0441\u0442"],["matching","\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435"],["countries","\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438"],["review",L.data?`\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C ${L.data.queue.length+L.data.drafts.length}`:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"]]}),e("div",{className:"min-h-0 flex-1",children:o==="sheet"?e(Wr,{}):e("div",{className:"h-full overflow-y-auto",[kn]:"",children:o==="matching"?e(Dr,{}):o==="review"?e(Vr,{}):e(jr,{focus:n})})})]}):e(Wr,{})}function Wr(){let{status:t}=H(),n=E(),[a,o]=f(null),[r,L]=f(null),[l,i]=f(""),[m,u]=f(null),[p,g]=f(!1),b=R(()=>{n("procurement_needs",{}).then(d=>{o(d.items??[]),L(null)},d=>L(C(d)))},[n]);w(()=>{t?.canProcurement&&b()},[b,t?.canProcurement]);let c=re(()=>{let d=l.trim().toLowerCase();return a?d?a.filter(x=>[x.model_key,x.category,x.description_en,x.part_no,...x.article_aliases].some(_=>_.toLowerCase().includes(d))):a:[]},[a,l]);if(!t)return e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"});if(!t.connected)return e(D,{children:t.message});if(!t.canProcurement)return e(D,{children:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D: \u043D\u0443\u0436\u043D\u043E \u043F\u0440\u0430\u0432\u043E \xAB\u0417\u0430\u043A\u0443\u043F\u043A\u0438: \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\xBB \u0432 Manifest \u0438\u043B\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 Manifest."});let h=t.canProcurementManage,v=a?.reduce((d,x)=>d+x.target_qty,0)??0;return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[s("div",{className:"mf-surface flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-xs",children:[e(G,{value:l,onChange:d=>i(d.target.value),placeholder:"\u041C\u043E\u0434\u0435\u043B\u044C, \u0430\u0440\u0442\u0438\u043A\u0443\u043B, \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F\u2026","aria-label":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043B\u0438\u0441\u0442\u0443",className:"h-7 min-w-[9rem] flex-1 text-xs"}),e("span",{className:"text-muted-foreground",children:a?`${a.length} \u043F\u043E\u0437. \xB7 ${v.toLocaleString("ru-RU")} \u0448\u0442`:"\u2026"}),h?s(P,{children:[e(S,{size:"sm",variant:"outline",className:"h-7 px-2",onClick:()=>g(!p),children:"+ \u041F\u043E\u0437\u0438\u0446\u0438\u044F"}),e($1,{onApplied:b})]}):null]}),r?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:r}):null,s("div",{className:"min-h-0 flex-1 overflow-y-auto",[kn]:"",children:[p?e("div",{className:"border-b border-border bg-[var(--mf-surface)] p-3",children:e(Qr,{onDone:d=>{g(!1),d&&b()}})}):null,a&&a.length===0?e(D,{children:"\u041B\u0438\u0441\u0442 \u043F\u0443\u0441\u0442. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0441 \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C\u0438 (CSV \u0438\u043B\u0438 XLSX)."}):null,c.length?s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"w-9 pl-3 text-right"),children:"\u2116"}),e("th",{className:k(K,"text-left"),children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e("th",{className:k(K,"hidden text-left @[30rem]:table-cell"),children:"\u0410\u0440\u0442\u0438\u043A\u0443\u043B\u044B"}),e("th",{className:k(K,"w-14 text-right"),children:"\u041A\u043E\u043B-\u0432\u043E"}),e("th",{className:k(K,"hidden w-24 pr-3 text-right @[22rem]:table-cell"),children:"\u041E\u0440\u0438\u0435\u043D\u0442\u0438\u0440"})]})}),e("tbody",{children:B1(c).map(d=>e(I1,{group:d,open:m,setOpen:u,canEdit:h,onChanged:b},d.category))})]}):null]})]})}function I1({group:t,open:n,setOpen:a,canEdit:o,onChanged:r}){return s(P,{children:[e(wn,{colSpan:5,title:t.category,note:`${t.items.length} \u043F\u043E\u0437. \xB7 ${t.qty.toLocaleString("ru-RU")} \u0448\u0442`}),t.items.map(L=>{let l=n===L.id,i=L.article_aliases;return s(O1,{children:[s("tr",{className:k("cursor-pointer border-b border-[var(--mf-line-200)] hover:bg-state-hover",l&&"bg-state-active"),onClick:()=>a(l?null:L.id),"aria-expanded":l,children:[e("td",{className:"py-1 pl-3 pr-2 text-right tabular-nums text-muted-foreground",children:L.position_no}),e("td",{className:"max-w-0 px-2 py-1",children:s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"truncate font-medium",children:L.model_key||L.description_en||L.part_no}),L.kit?e(Pe,{}):null]})}),s("td",{className:"hidden max-w-0 truncate px-2 py-1 font-mono text-[11px] text-muted-foreground @[30rem]:table-cell",title:i.join(" "),children:[i[0]??"\u2014",i.length>1?` +${i.length-1}`:""]}),e("td",{className:"px-2 py-1 text-right tabular-nums",children:L.target_qty}),e("td",{className:"hidden py-1 pl-2 pr-3 text-right tabular-nums text-muted-foreground @[22rem]:table-cell",children:Ae(L.ref_price,L.ref_currency)})]}),l?e("tr",{className:"border-b border-[var(--mf-line-300)]",children:e("td",{colSpan:5,className:"bg-[var(--mf-paper)] p-2.5",children:e(Qr,{need:L,readOnly:!o,onDone:m=>{m?r():a(null)}})})}):null]},L.id)})]})}function O1({children:t}){return e(P,{children:t})}var Ue="h-8 text-xs";function Qr({need:t,readOnly:n,onDone:a}){let o=E(),[r,L]=f(t?.model_key??""),[l,i]=f(t?.kit??!1),[m,u]=f(t?.category??""),[p,g]=f(t?.description_en??""),[b,c]=f((t?.article_aliases??[]).join(" ")),[h,v]=f(String(t?.target_qty??"")),[d,x]=f(t?.ref_price===null||t?.ref_price===void 0?"":String(t.ref_price)),[_,y]=f(t?.ref_currency??""),[I,T]=f(!1),[$,M]=f(null),[W,N]=f(!1),z=async()=>{T(!0),M(null);try{let U=b.split(/[\s,;]+/).filter(Boolean),ue=d.trim()===""?null:Number(d.replace(",",".")),xe={id:t?.id,position_no:t?.position_no,brand:t?.brand??(r?"STIHL":""),part_no:t?.part_no||U[0]||"",description_en:p||(r?`STIHL ${r}${l?" set (with battery and charger)":""}`:""),target_qty:Number(h),unit:"pcs",response_deadline:t?.response_deadline??void 0,commercial_terms:t?.commercial_terms,specification_en:t?.specification_en,internal_comment:t?.internal_comment,model_key:r,kit:l,category:m,article_aliases:U,ref_currency:_};ue===null?xe.clear_ref_price=!0:xe.ref_price=ue,await o("procurement_need_save",xe),a(!0)}catch(U){M(C(U))}finally{T(!1)}},Q=async()=>{if(t){T(!0);try{await o("procurement_need_cancel",{id:t.id}),a(!0)}catch(U){M(C(U))}finally{T(!1),N(!1)}}},te=n||I;return s("div",{className:"flex flex-col gap-2 text-xs",children:[s("div",{className:"grid gap-2 @md:grid-cols-2",children:[s("label",{className:"flex flex-col gap-0.5",children:[e(Le,{children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e(G,{className:Ue,value:r,onChange:U=>L(U.target.value),disabled:te,placeholder:"MSA 220 C-B"})]}),s("label",{className:"flex flex-col gap-0.5",children:[e(Le,{children:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F"}),e(G,{className:Ue,value:m,onChange:U=>u(U.target.value),disabled:te})]}),s("label",{className:"flex flex-col gap-0.5 @md:col-span-2",children:[e(Le,{children:"\u0410\u0440\u0442\u0438\u043A\u0443\u043B\u044B (\u0432\u0441\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435, \u0447\u0435\u0440\u0435\u0437 \u043F\u0440\u043E\u0431\u0435\u043B)"}),e(G,{className:Ue,value:b,onChange:U=>c(U.target.value),disabled:te})]}),s("label",{className:"flex flex-col gap-0.5",children:[e(Le,{children:"\u041A\u043E\u043B-\u0432\u043E, \u0448\u0442"}),e(G,{className:Ue,inputMode:"numeric",value:h,onChange:U=>v(U.target.value),disabled:te})]}),s("div",{className:"flex gap-2",children:[s("label",{className:"flex flex-1 flex-col gap-0.5",children:[e(Le,{children:"\u041E\u0440\u0438\u0435\u043D\u0442\u0438\u0440 \u0446\u0435\u043D\u044B"}),e(G,{className:Ue,inputMode:"decimal",value:d,onChange:U=>x(U.target.value),disabled:te})]}),s("label",{className:"flex w-20 flex-col gap-0.5",children:[e(Le,{children:"\u0412\u0430\u043B\u044E\u0442\u0430"}),e(G,{className:Ue,value:_,onChange:U=>y(U.target.value.toUpperCase()),disabled:te,placeholder:"KZT"})]})]}),s("label",{className:"flex flex-col gap-0.5 @md:col-span-2",children:[e(Le,{children:"\u0414\u043B\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430 (\u0430\u043D\u0433\u043B.)"}),e(G,{className:Ue,value:p,onChange:U=>g(U.target.value),disabled:te})]})]}),s("label",{className:"flex items-center gap-2",children:[e("input",{type:"checkbox",checked:l,onChange:U=>i(U.target.checked),disabled:te}),"\u041D\u0430\u0431\u043E\u0440 \u0441 \u0430\u043A\u043A\u0443\u043C\u0443\u043B\u044F\u0442\u043E\u0440\u043E\u043C \u0438 \u0437\u0430\u0440\u044F\u0434\u043D\u044B\u043C"]}),$?e("p",{role:"alert",className:"text-destructive",children:$}):null,n?null:s("div",{className:"flex flex-wrap items-center gap-2",children:[e(S,{size:"sm",className:"h-8",disabled:I||!h,onClick:()=>{z()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-8",disabled:I,onClick:()=>a(!1),children:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"}),e("span",{className:"flex-1"}),t?e(S,{size:"sm",variant:"ghost",className:"h-8 text-destructive",disabled:I,onClick:()=>N(!0),children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0438\u0446\u0438\u044E"}):null]}),W?e(be,{title:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0438\u0446\u0438\u044E ${t?.position_no}?`,actions:s(P,{children:[e(S,{size:"sm",variant:"destructive",className:"h-8",disabled:I,onClick:()=>{Q()},children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0438\u0446\u0438\u044E"}),e(S,{size:"sm",variant:"ghost",className:"h-8",onClick:()=>N(!1),children:"\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C"})]}),children:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0443\u0439\u0434\u0451\u0442 \u0438\u0437 \u043B\u0438\u0441\u0442\u0430 \u0438 \u0438\u0437 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0430 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432; \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430\u043C \u0441\u043D\u0438\u043C\u0443\u0442\u0441\u044F."}):null]})}var Yr={create:"\u043D\u043E\u0432\u0430\u044F",update:"\u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F",same:"\u0431\u0435\u0437 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",error:"\u043E\u0448\u0438\u0431\u043A\u0430"};function $1({onApplied:t}){let n=E(),a=j(null),[o,r]=f(null),[L,l]=f(null),[i,m]=f(!1),[u,p]=f(null),[g,b]=f(null),c=async x=>{p(null),b(null),m(!0);try{let _=et(await Xe(x)),y=await n("procurement_import_preview",{filename:x.name,content_base64:_});r({name:x.name,b64:_}),l(y)}catch(_){p(C(_))}finally{m(!1)}},h=async()=>{if(!(!o||!L)){m(!0),p(null);try{await n("procurement_import_apply",{filename:o.name,content_base64:o.b64,fingerprint:L.fingerprint}),b(`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E: \u043D\u043E\u0432\u044B\u0445 ${L.counts.create??0}, \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E ${L.counts.update??0}.`),l(null),r(null),t()}catch(x){p(C(x))}finally{m(!1)}}},v=L?.actions.filter(x=>x.kind!=="same")??[],d=(L?.counts.create??0)+(L?.counts.update??0);return s(P,{children:[e("input",{ref:a,type:"file",accept:".csv,.xlsx,.tsv,text/csv",className:"hidden","aria-label":"\u0424\u0430\u0439\u043B \u0441 \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C\u0438",onChange:x=>{let _=x.target.files?.[0];x.target.value="",_&&c(_)}}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:i,onClick:()=>a.current?.click(),children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0444\u0430\u0439\u043B"}),g?e("span",{className:"w-full text-[var(--mf-green)]",children:g}):null,u?e("span",{role:"alert",className:"w-full text-destructive",children:u}):null,L?e("div",{className:"w-full",children:s(be,{title:`${o?.name}: ${L.rows} \u0441\u0442\u0440\u043E\u043A`,actions:s(P,{children:[s(S,{size:"sm",className:"h-8",disabled:i||d===0,onClick:()=>{h()},children:["\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C: \u043D\u043E\u0432\u044B\u0445 ",L.counts.create??0,", \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ",L.counts.update??0]}),e(S,{size:"sm",variant:"ghost",className:"h-8",onClick:()=>l(null),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:[e("div",{className:"flex flex-wrap gap-1",children:["create","update","same","error"].map(x=>L.counts[x]?s(V,{tone:x==="error"?"err":x==="same"?"muted":x==="update"?"warn":"ok",children:[Yr[x],": ",L.counts[x]]},x):null)}),v.length?e("ul",{className:"mt-2 max-h-56 overflow-y-auto",children:v.map(x=>s("li",{className:k("flex gap-2 py-0.5",x.kind==="error"&&"text-destructive"),children:[e("span",{className:"w-16 flex-none text-muted-foreground",children:Yr[x.kind]}),s("span",{className:"min-w-0 flex-1 truncate",children:[x.key.startsWith("art:")||x.key.startsWith("name:")?x.name:x.key,x.kit?" \xB7 \u043D\u0430\u0431\u043E\u0440":""," \xB7 ",x.qty," \u0448\u0442",x.changes?.length?` \xB7 ${x.changes.join(", ")}`:"",x.error?` \xB7 ${x.error} (\u0441\u0442\u0440. ${x.lines.join(", ")})`:""]})]},`${x.key}|${x.kit}|${x.lines[0]}`))}):null]})}):null]})}var Mn={template:["templates","\u0428\u0430\u0431\u043B\u043E\u043D\u044B"],mailing:["mailings","\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0438"],inbound:["inbound","\u041D\u0435\u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435"]},Tn={title:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",hub:"mail",tabs:st},D1={title:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442",hub:"needs",tabs:[]},Z1={mail:Tn,template:Tn,mailing:Tn,inbound:Tn,needs:D1},F1=At;function za({threadId:t,params:n}){let a=ja(n);return a?e(Ua,{pin:a,threadId:t}):e(z1,{threadId:t})}var H1=["company","mailing","template","topic","inbound","mail"];function ja(t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t.pin:null;if(!n||typeof n!="object")return null;let a=n;return typeof a.kind!="string"||!H1.includes(a.kind)||typeof a.id!="string"?null:{kind:a.kind,id:a.id,title:typeof a.title=="string"?a.title:""}}function Ua({pin:t,threadId:n,mainTitle:a}){let{focus:o}=dn(n??""),r=le(),L=n?o?o.title||X[o.kind]:null:a??null;return s("div",{className:"@container mf-root mf-island mf-paper mf-beside flex h-full min-h-0 flex-col",children:[s("div",{className:"mf-beside-bar flex items-center gap-2 px-3 py-1.5 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:L?`\u0427\u0430\u0442 \u0441\u043B\u0435\u0432\u0430 \u2014 \u043E \xAB${L}\xBB, \u044D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430 \u0440\u044F\u0434\u043E\u043C`:"\u0427\u0430\u0442 \u0441\u043B\u0435\u0432\u0430 \u2014 \u043D\u0435 \u043E\u0431 \u044D\u0442\u043E\u0439 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435",children:[e("b",{children:"\u0420\u044F\u0434\u043E\u043C"})," \xB7 \u0447\u0430\u0442 ",L?s(P,{children:["\u043E \xAB",L,"\xBB"]}):"\u043D\u0435 \u043E \u043D\u0435\u0439"]}),e(S,{size:"sm",className:"h-7 flex-none","aria-label":"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439: \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0435\u0451 \u0447\u0430\u0442",onClick:()=>{r(t)},children:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u2192"})]}),e("header",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:s("div",{className:"min-w-0 flex-1",children:[e(Le,{children:X[t.kind]}),e("div",{className:"truncate text-base font-bold leading-snug",children:t.title||X[t.kind]})]})}),e("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e(Ka,{focus:t,threadId:n})})]})}function z1({threadId:t}){let{focus:n,trail:a,error:o,setFocus:r,back:L,forget:l}=dn(t),[i,m]=f(!1),u=kt();if(n===void 0)return e(Xr,{children:o??"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C\u2026"});if(!n)return e(Xr,{children:"\u042D\u0442\u043E\u0442 \u0447\u0430\u0442 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043E\u0431\u044A\u0435\u043A\u0442\u0443 Manifest. \u041E\u0431\u044A\u0435\u043A\u0442\u044B \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043B\u043E\u0432 \xAB\u0410\u0443\u0442\u0440\u0438\u0447\xBB, \xAB\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0430\u0443\u0442\u0440\u0438\u0447\u0430\xBB, \xAB\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430\xBB."});let p=g=>{r(g)};return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[(()=>{let g=Z1[n.kind],b=e(S,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>m(!i),"aria-expanded":i,children:"\u0427\u0430\u0442\u044B"}),c=a.at(-1),h=c?{label:c.title||X[c.kind],go:()=>{L(c)}}:Mn[n.kind]?{label:Mn[n.kind][1],go:()=>u(Mn[n.kind][0])}:null,v=n.title||X[n.kind];return s("header",{className:"flex-none",children:[g?s("div",{className:"mf-surface flex items-center gap-2 border-b border-border px-3 py-1.5",children:[e("span",{className:"min-w-0 flex-1 truncate text-[13px] font-bold",children:g.title}),n.kind===g.hub?b:null]}):null,g&&n.kind!==g.hub?e(rt,{tabs:g.tabs,active:Mn[n.kind]?.[0]??"",onSelect:d=>u(d),label:g.title}):null,g&&n.kind===g.hub?null:h?e(Nn,{back:h.label,onBack:h.go,kind:X[n.kind],title:e("span",{className:"truncate",children:v}),actions:b}):s("div",{className:"mf-surface flex items-center gap-2 border-b border-border px-3 py-1.5",children:[s("div",{className:"min-w-0 flex-1",children:[e(Le,{children:X[n.kind]}),e("div",{className:"truncate text-[13px] font-bold leading-snug",children:v})]}),b]}),i?e("div",{className:"mf-surface border-b border-border px-3",children:e(at,{focus:n,currentThreadId:t})}):null]})})(),e("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e(ts,{focus:n,threadId:t,onOpen:p,onBack:()=>{l(n)}})})]})}function Xr({children:t}){return e("div",{className:"mf-island mf-paper h-full",children:e(D,{children:t})})}function Ka({focus:t,threadId:n}){let a=le();return e(ts,{focus:t,threadId:n,onOpen:o=>{a(o)},onBack:()=>{}})}function ts({focus:t,threadId:n,onOpen:a,onBack:o}){switch(t.kind){case"mail":return e(Aa,{});case"needs":return e(Ha,{});case"company":return e(wt,{companyId:t.id,embedded:!0},t.id);case"mailing":return e("div",{className:"p-2",children:e(kr,{id:t.id,onOpenCompany:r=>a({kind:"company",id:r,title:""}),onDeleted:o,embedded:!0},t.id)});case"template":return e(Mr,{templateId:t.id.startsWith("new-")?null:t.id,threadId:n,embedded:!0},t.id);case"topic":return e(Ma,{topicId:t.id||n||null,threadId:n,onOpenCompany:r=>a({kind:"company",id:r,title:""})});case"inbound":return e(Tr,{id:t.id,embedded:!0,onLinked:r=>a({kind:"company",id:r.id,title:r.name})},t.id)}}function at({focus:t,currentThreadId:n}){let a=ee(),o=ae(),r=X2(),[L,l]=f(null),[i,m]=f(null);return w(()=>{a.call("chats_list",{kind:t.kind,id:t.id}).then(u=>l(u.chats),u=>m(C(u)))},[t.id,t.kind,a]),s("div",{className:"flex flex-col gap-2 py-1 text-xs",children:[i?e("p",{className:"text-destructive",children:i}):null,L===null?e("p",{className:"text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"}):L.length===0?e("p",{className:"text-muted-foreground",children:"\u0427\u0430\u0442\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442."}):e("ul",{className:"flex flex-col",children:L.map(u=>e("li",{children:s("button",{type:"button",disabled:u.threadId===n,onClick:()=>o.toThread(u.threadId),className:k("w-full truncate rounded px-2 py-1.5 text-left hover:bg-state-hover",u.threadId===n&&"font-semibold"),children:[u.title,u.threadId===n?" \xB7 \u044D\u0442\u043E\u0442":""]})},u.threadId))}),e(F1,{draftKey:`manifest-new-${t.kind}-${t.id}`,placeholder:`\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442: ${t.title||X[t.kind]}`,onSubmit:u=>{r(t,u).catch(p=>m(C(p)))}})]})}var es="manifest:panel-opened:";function ns({threadId:t,isCompactViewport:n}){let{focus:a}=dn(t);un(t);let o=Qe();return w(()=>K2(t,a?.kind==="topic",a?.kind==="mail",a?.kind==="needs"),[t,a]),w(()=>{if(!a||n)return;let r=!1;try{r=window.sessionStorage.getItem(es+t)==="1"}catch{r=!1}if(!r&&o(a.title||X[a.kind]))try{window.sessionStorage.setItem(es+t,"1")}catch{}},[a?.kind,a?.id,t]),se(va,r=>{let L=r;L?.threadId!==t||L.open!==!0||!L.focus||n||o(L.focus.title||X[L.focus.kind])}),a?s(S,{size:"sm",variant:"ghost",className:"mf-focus-button h-8 max-w-[16rem] gap-1 px-2 text-xs","aria-label":`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430: ${X[a.kind]} ${a.title}`,onClick:()=>o(a.title||X[a.kind]),children:[e("span",{className:"text-muted-foreground",children:n?"\u25E7":`${X[a.kind]}:`}),n?null:e("span",{className:"truncate",children:a.title||"\u2014"})]}):null}function as({subPath:t}){let n=t.split("/")[0]??"",a=ae(),o=Ee();return w(()=>{tn(),!n&&o("outreach").then(r=>{r==="none"&&a.toCompose()})},[n,a,o]),n?t.split("/")[1]==="full"?e(U1,{companyId:n},n):e(j1,{companyId:n},n):e("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:e("div",{className:"mf-card mx-auto my-3 min-h-0 w-full max-w-3xl flex-1 overflow-hidden",children:e(Qt,{})})})}function j1({companyId:t}){let{status:n}=H(),a=ct(),o=E(),[r,L]=f("");return w(()=>{a.select(t)},[t]),w(()=>{n?.connected&&o("outreach_get_company",{id:t}).then(l=>L(l.company?.display_name??""),()=>{})},[t,n?.connected,o]),n&&!n.connected?e(D,{children:n.message}):e("div",{className:"@container mf-island mf-paper h-full min-h-0",children:s("div",{className:"flex h-full min-h-0 flex-col @4xl:flex-row",children:[e("main",{className:"flex min-h-0 flex-1 flex-col justify-end overflow-y-auto p-4",children:s("div",{className:"mx-auto flex w-full max-w-2xl flex-col gap-2",children:[e(Le,{children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("h2",{className:"m-0 text-lg font-bold leading-snug",children:r||"\u2026"}),e(at,{focus:{kind:"company",id:t,title:r.slice(0,200)}})]})}),e("aside",{className:"min-h-0 border-t border-border @4xl:w-[400px] @4xl:flex-none @4xl:border-l @4xl:border-t-0",children:e(wt,{companyId:t,embedded:!0})})]})})}function U1({companyId:t}){let{status:n}=H(),a=ct();return w(()=>{a.select(t)},[t]),n&&!n.connected?e(D,{children:n.message}):e("div",{className:"@container mf-island mf-paper h-full min-h-0 overflow-y-auto",children:s("div",{className:"mx-auto flex max-w-6xl flex-col gap-4 p-3 @4xl:flex-row",children:[e("div",{className:"min-w-0 flex-1",children:e(wt,{companyId:t})}),s("aside",{className:"mf-card flex w-full flex-col gap-2 self-start p-3 @4xl:w-96 @4xl:flex-none",children:[e("h3",{className:"text-[13px] font-bold",children:"\u0427\u0430\u0442\u044B \u043F\u043E \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"}),e(at,{focus:{kind:"company",id:t,title:""}})]})]})})}function rs(){let t=j2();return t?e("span",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive/15 px-1 text-[10px] font-semibold text-destructive",title:"\u0416\u0434\u0443\u0442 \u043D\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430 \u0438 \u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E",children:t}):null}function ss(t,n){let a=j(null);w(()=>()=>{a.current&&clearTimeout(a.current)},[]),se(t,()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(n,600+Math.random()*600)})}var K1=new Set(["priorities","statuses","tags","ids"]),G1=new Set(["stale_days"]),q1=new Set(["never_touched","has_phone","has_email","has_person"]),V1=new Set(["q","region","country","owner","attention","brand","segment_id"]);function W1(t){let n={};for(let[a,o]of Object.entries(t)){let r=String(o).trim().slice(0,2e3);if(r)if(K1.has(a)){let L=r.split(",").map(l=>l.trim()).filter(Boolean).slice(0,200);n[a]=a==="priorities"?L.map(Number).filter(l=>Number.isInteger(l)&&l>=1&&l<=5):L}else if(G1.has(a)){let L=Number(r);Number.isFinite(L)&&L>0&&(n[a]=Math.floor(L))}else q1.has(a)?n[a]=r==="true"||r==="1":V1.has(a)&&(n[a]=r)}return Me(n)}function Rn({title:t,children:n,actions:a}){return s("div",{"data-bb-plugin":"manifest",className:"mf-island mf-chip my-2 text-sm",children:[s("div",{className:"flex items-center justify-between gap-2 border-b border-[var(--mf-line-200)] px-3 py-1.5",children:[s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e(Ze,{}),e("span",{className:"truncate text-[13px] font-semibold",children:t})]}),e("span",{className:"flex flex-none gap-1",children:a})]}),e("div",{className:"px-3 py-2",children:n})]})}function os({attributes:t,message:n}){let a=E(),o=ee(),r=ae(),L=Qe(),l=(y,I)=>{o.call("focus_set",{threadId:n.threadId,focus:{kind:"company",id:y,title:I.slice(0,200)}}).then(()=>L(I||X.company)).catch(T=>g(C(T)))},{status:i}=H(),[m,u]=f(null),[p,g]=f(null),b=W1(t),c=JSON.stringify(b),h=(t.title??"").slice(0,120)||"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",v=R(()=>{i?.connected&&a("outreach_list_companies",{...JSON.parse(c),sort:t.sort||void 0,limit:25}).then(y=>{u(y),g(null)},y=>g(C(y)))},[t.sort,c,i?.connected,a]);w(v,[v]),ss(We,v);let[d,x]=f(!1);w(()=>{let y=!0;return o.call("topic_filter_get",{threadId:n.threadId}).then(()=>y&&x(!0),()=>y&&x(!1)),()=>{y=!1}},[n.threadId,o]);let _=async()=>{try{await o.call("topic_filter_set",{threadId:n.threadId,filter:JSON.parse(c)}),r.toPluginPanel(xt,{subPath:n.threadId})}catch(y){g(C(y))}};return s(Rn,{title:m?`${h} \xB7 ${m.total}`:h,actions:d?e(S,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:()=>{_()},children:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0430 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0435"}):null,children:[p?e("p",{className:"text-xs text-destructive",children:p}):null,m?m.items.length===0?e("p",{className:"text-xs text-muted-foreground",children:"\u041D\u0438\u043A\u043E\u0433\u043E \u043F\u043E \u044D\u0442\u043E\u043C\u0443 \u0444\u0438\u043B\u044C\u0442\u0440\u0443."}):e("ul",{className:"flex flex-col",children:m.items.map(y=>{let I=y.next_action,T=I?Ve(I.due_on)<0:!1;return e("li",{children:s("button",{type:"button",onClick:()=>l(y.id,y.display_name),className:"flex w-full items-center gap-2 rounded-md px-1 py-0.5 text-left text-xs hover:bg-state-hover",children:[e(Se,{priority:y.priority}),e("span",{className:"min-w-0 flex-1 truncate",children:y.display_name}),e("span",{className:"flex-none text-muted-foreground",children:F(y.country_code)}),e("span",{className:"w-28 flex-none truncate text-muted-foreground",children:oe[y.status]??y.status}),s("span",{className:k("inline-flex w-24 flex-none items-center justify-end gap-1 truncate text-right",T?"text-destructive":"text-muted-foreground"),children:[T?e(ge,{tone:"error"}):null,I?`\u0448\u0430\u0433 ${ye(I.due_on)}`:y.last_touch_at?`\u043A\u0430\u0441\u0430\u043D\u0438\u0435 ${ye(y.last_touch_at)}`:"\u0431\u0435\u0437 \u043A\u0430\u0441\u0430\u043D\u0438\u0439"]})]})},y.id)})}):e("p",{className:"text-xs text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"}),m&&m.total>m.items.length?s("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B ",m.items.length," \u0438\u0437 ",m.total,". \u041F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u2014 \u043D\u0430 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0435."]}):null]})}var Y1={preview:"\u0436\u0434\u0451\u0442 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F",applying:"\u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F\u2026",applied:"\u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0430",reverted:"\u043E\u0442\u043A\u0430\u0447\u0435\u043D\u0430",expired:"\u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0443\u0441\u0442\u0430\u0440\u0435\u043B"};function Ls({attributes:t}){let n=E(),{status:a}=H(),o=(t.id??"").trim().slice(0,64),[r,L]=f(null),[l,i]=f(null),[m,u]=f(!1),[p,g]=f(!1),[b,c]=f(!1),h=R(()=>{!o||!a?.connected||n("outreach_batch_get",{id:o}).then(T=>{L(T),i(null)},T=>i(C(T)))},[o,a?.connected,n]);w(h,[h]),ss(We,h);let v=async T=>{u(!0);try{L(await n(T,{id:o})),i(null)}catch($){i(C($))}finally{u(!1),g(!1)}};if(!o)return e(Rn,{title:"\u041F\u0430\u0447\u043A\u0430",children:"\u041D\u0435\u0442 id \u043F\u0430\u0447\u043A\u0438."});if(!r)return e(Rn,{title:"\u041F\u0430\u0447\u043A\u0430",children:l??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let d=r.items.filter(T=>!T.skip),x=r.items.filter(T=>T.skip),_=b?d:d.slice(0,8),y=r.result.filter(T=>!T.ok),I=!!a?.canManage;return s(Rn,{title:`\u041F\u0430\u0447\u043A\u0430: ${r.summary}`,actions:e("span",{className:"text-[11px] text-muted-foreground",children:Y1[r.state]}),children:[s("p",{className:"text-xs",children:["\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439: ",e("b",{children:r.count}),r.skipped?` \xB7 \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E: ${r.skipped}`:""]}),e("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs",children:_.map(T=>s("li",{className:"rounded bg-muted/40 px-2 py-0.5",children:[e("span",{className:"font-medium",children:T.name}),T.changes.map(($,M)=>s("span",{className:"text-muted-foreground",children:[" \xB7 ",Vt[$.field]??$.field,": ",qe($.field,$.old)," \u2192 ",qe($.field,$.new)]},M))]},T.company_id))}),d.length>_.length?s("button",{type:"button",className:"mt-1 text-[11px] text-muted-foreground underline-offset-2 hover:underline",onClick:()=>c(!0),children:["\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 ",d.length]}):null,x.length>0?s("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u044B: ",x.slice(0,5).map(T=>`${T.name||T.company_id} (${T.skip})`).join("; "),x.length>5?` \u0438 \u0435\u0449\u0451 ${x.length-5}`:""]}):null,y.length>0?s("p",{className:"mt-1 text-xs text-destructive",children:["\u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C: ",y.map(T=>`${T.name||T.company_id}: ${T.error}`).join("; ")]}):null,l?e("p",{className:"mt-1 text-xs text-destructive",children:l}):null,s("div",{className:"mt-2 flex items-center gap-2",children:[r.state==="preview"&&I?s(P,{children:[s(S,{size:"sm",className:"h-7",disabled:m||r.count===0,onClick:()=>{v("outreach_batch_apply")},children:["\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043A ",r.count]}),s("span",{className:"text-[11px] text-muted-foreground",children:["\u0434\u043E ",q(r.expires_at)]})]}):null,r.state==="applied"&&I?p?s(P,{children:[e(S,{size:"sm",variant:"destructive",className:"h-7",disabled:m,onClick:()=>{v("outreach_batch_revert")},children:"\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u043F\u0430\u0447\u043A\u0443"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>g(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}):e(S,{size:"sm",variant:"outline",className:"h-7",onClick:()=>g(!0),children:"\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C\u2026"}):null,r.state==="applied"?s("span",{className:"text-[11px] text-muted-foreground",children:["\u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B ",r.applied_by," \xB7 ",q(r.applied_at)]}):null]})]})}var An=/^[0-9a-f-]{36}$/i;function En({title:t,detail:n,tone:a,threadId:o,focus:r,sandbox:L,badge:l,extra:i,actions:m}){let u=ee(),p=Qe(),[g,b]=f(null),[c,h]=f(!1),v=async()=>{try{await u.call("focus_set",{threadId:o,focus:r}),p(r.title||X[r.kind]),b(null),h(!1)}catch(x){b(C(x))}},d=async()=>{try{let x=await u.call("focus_get",{threadId:o});[...x.trail,...x.focus?[x.focus]:[]].some(y=>y.kind===r.kind&&y.id===r.id)?await v():h(!0)}catch(x){b(C(x))}};return s(C2,{sandbox:L,className:"w-[min(100%,34rem)]",children:[s("button",{type:"button",onClick:()=>{d()},className:"flex w-full min-w-0 items-center gap-2 rounded text-left hover:bg-state-hover",children:[e(Ze,{}),s("span",{className:"min-w-0 flex-1",children:[s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"min-w-0 flex-1 truncate text-[13px] font-semibold",children:t}),l]}),e(J,{tone:a,className:"max-w-full truncate text-xs text-[var(--mf-ink-700)]",children:n})]}),e("span",{className:"flex-none self-end text-muted-foreground",children:"\u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430 \u2192"})]}),i,m,c?e(be,{title:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430 ${X[r.kind].toLowerCase()} \xAB${r.title||t}\xBB?`,actions:s(P,{children:[e("button",{type:"button",className:"h-7 rounded-md bg-foreground px-2.5 font-semibold text-background",onClick:()=>{v()},children:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C"}),e("button",{type:"button",className:"h-7 rounded-md px-2.5 hover:bg-state-hover",onClick:()=>h(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:e("span",{children:"\u0412 \u044D\u0442\u043E\u043C \u0447\u0430\u0442\u0435 \u0430\u0433\u0435\u043D\u0442 \u0441\u043C\u043E\u0436\u0435\u0442 \u0435\u0451 \u043C\u0435\u043D\u044F\u0442\u044C."})}):null,g?e("span",{className:"text-[11px] text-destructive",children:g}):null]})}function J1(t){let n=E(),[a,o]=f("");return w(()=>{An.test(t)&&n("outreach_get_company",{id:t}).then(r=>o(r.company?.display_name??""),()=>{})},[t,n]),a}function ls(t){let n=(t.attributes.id??"").trim();return An.test(n)?e(is,{id:n,threadId:t.message.threadId}):e(Q1,{...t})}function Q1({attributes:t,message:n}){let a=(t.company??"").trim(),o=An.test(a),{letter:r,none:L,error:l,reload:i}=pn(o?a:""),m=J1(o?a:""),[u,p]=f(null);if(!o)return e("span",{className:"text-xs text-muted-foreground",children:"\u041F\u0438\u0441\u044C\u043C\u043E: \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u0430 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F."});if(u)return e(is,{id:u,threadId:n.threadId});let g=l||(L?"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430 \u043D\u0435\u0442":r?r.preview.problems.length?`\u043D\u0435 \u0443\u0439\u0434\u0451\u0442: ${r.preview.problems[0]}`:`\u0433\u043E\u0442\u043E\u0432\u043E \xB7 ${r.preview.to} \xB7 \u043E\u0442 ${r.preview.from_name||r.preview.from}`:"\u0441\u043E\u0431\u0438\u0440\u0430\u0435\u043C\u2026");return e(En,{title:`\u041F\u0438\u0441\u044C\u043C\u043E${m?` \u0434\u043B\u044F \xAB${m}\xBB`:""}${r?`: ${r.preview.subject}`:""}`,detail:g,tone:l?"error":r&&!r.preview.problems.length?"ok":r?"warning":"muted",threadId:n.threadId,focus:{kind:"company",id:a,title:m.slice(0,200)},sandbox:!!r?.preview.sender?.legal_entity?.sandbox,actions:r&&!r.preview.problems.length?e(fn,{letter:r,companyId:a,compact:!0,onSent:b=>{p(b.id),i()}}):null})}function is({id:t,threadId:n}){let{letter:a,error:o,setLetter:r}=Na(t);return a?e(En,{title:`\u041F\u0438\u0441\u044C\u043C\u043E${a.company_name?` \u0434\u043B\u044F \xAB${a.company_name}\xBB`:""}: ${a.subject}`,detail:e(gn,{letter:a}),tone:a.tone,threadId:n,focus:{kind:"company",id:a.company_id??"",title:a.company_name.slice(0,200)},sandbox:a.sandbox,badge:a.replies.length?e(V,{tone:"volt",children:"\u043E\u0442\u0432\u0435\u0442"}):null,actions:a.cancellable?e(ka,{letter:a,onDone:r}):null}):e(En,{title:"\u041F\u0438\u0441\u044C\u043C\u043E",detail:o??"\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026",tone:o?"error":"muted",threadId:n,focus:{kind:"company",id:"",title:""}})}function cs({attributes:t,message:n}){let a=(t.id??"").trim(),o=An.test(a),{mailing:r,error:L}=Ta(o?a:"");if(!o)return e("span",{className:"text-xs text-muted-foreground",children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430: \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D id."});let l=r?bn(r):null;return e(En,{title:r?`\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \xAB${r.name}\xBB`:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430",detail:L??l?.text??"\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026",tone:L?"error":l?.tone??"muted",threadId:n.threadId,focus:{kind:"mailing",id:a,title:r?.name??""},sandbox:r?.mode==="sandbox"||!!r?.progress?.sandbox,badge:r?.progress?.replies?s(V,{tone:"volt",children:["\u043E\u0442\u0432\u0435\u0442\u043E\u0432 ",r.progress.replies]}):null,extra:r&&(r.state==="done"||r.state==="stopped")?e(Ca,{m:r}):null,actions:r&&(r.state==="draft"||r.state==="sending")?e(xn,{mailing:r}):null})}var Ga="company-new";function ds(){let[t,n]=f(()=>ua());return w(()=>{let a=()=>n(ua());return window.addEventListener(ht,a),()=>window.removeEventListener(ht,a)},[]),[t,n]}function us(t){return(t.kind==="topic"||t.kind==="mail"||t.kind==="needs"?X[t.kind]:t.title||X[t.kind]).slice(0,60)}function ms(){let t=ee(),n=ae(),a=Ya(),[o,r]=ds();un(null);let L=j("");if(w(()=>{if(!o)return;let i=`${o.kind}:${o.id}`;L.current!==i&&(L.current=i,n.openThreadPanel({actionId:Ga,title:us(o),params:{v:1}}))},[o,n]),w(()=>{if(o)return a.onSubmitted(()=>{ma(),t.call("compose_submitted",{kind:o.kind,id:o.id,title:o.title.slice(0,200)}),r(null)})},[a,o,t,r]),!o)return null;let l=o.kind==="topic"||o.kind==="mail"||o.kind==="needs"?X[o.kind].toLowerCase():o.title||X[o.kind].toLowerCase();return s("div",{className:"mf-island flex items-center gap-2 px-2 py-1 text-xs",children:[e(Ze,{}),s("span",{className:"min-w-0 flex-1 truncate",children:["\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442: ",e("b",{children:l})]}),e("button",{type:"button","aria-label":"\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C \u0447\u0430\u0442",title:"\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C \u0447\u0430\u0442",className:"rounded px-1.5 hover:bg-state-hover",onClick:()=>ma(),children:"\xD7"})]})}function qa({params:t}){let[n]=ds(),a=ja(t);return a?e(Ua,{pin:a,mainTitle:n?us(n):null}):n?e("div",{className:"h-full min-h-0 overflow-y-auto",children:e(Ka,{focus:{kind:n.kind,id:n.id,title:n.title}},`${n.kind}:${n.id}`)}):e("p",{className:"p-3 text-xs text-muted-foreground",children:"\u0427\u0430\u0442 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043E\u0431\u044A\u0435\u043A\u0442\u0443 Manifest."})}var Wc=Va(t=>{t.slots.navPanel({id:m2,title:"\u0410\u0443\u0442\u0440\u0438\u0447",icon:"Globe",path:Wn,component:as}),t.slots.navPanel({id:D2,title:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",icon:"manifest/dashboard",path:xt,component:Nr,experimental_sidebarAccessory:rs}),t.slots.navPanel({id:V2,title:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",icon:"Mail",path:Te,component:Er}),t.slots.navPanel({id:Y2,title:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442",icon:"manifest/procurement",path:xa,component:Jr}),t.slots.messageDirective({id:"manifest-companies",component:os}),t.slots.messageDirective({id:"manifest-batch",component:Ls}),t.slots.messageDirective({id:"manifest-letter",component:ls}),t.slots.messageDirective({id:"manifest-mailing",component:cs}),t.slots.experimental_threadList({id:"suppliers",title:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",description:"\u0420\u0435\u0435\u0441\u0442\u0440 Manifest \u0432\u043C\u0435\u0441\u0442\u043E \u0441\u043F\u0438\u0441\u043A\u0430 \u0442\u0440\u0435\u0434\u043E\u0432; \u043A\u043D\u043E\u043F\u043A\u0430 \u0432 \u043F\u043E\u0434\u0432\u0430\u043B\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043F\u0440\u0435\u0436\u043D\u0438\u0439 \u0441\u043F\u0438\u0441\u043E\u043A.",component:$2}),t.slots.experimental_appOverlay({id:"suppliers-switch",component:O2}),t.experimental_sidebarFooter.register({kind:"action",id:"suppliers",label:E2,icon:"manifest/suppliers",onActivate:I2}),t.slots.threadPanelAction({id:ya,title:"Manifest",icon:"manifest/id-card",layout:"flush",component:za}),t.slots.experimental_threadHeaderAction({id:"focus",title:"\u041E\u0431\u044A\u0435\u043A\u0442 Manifest",component:ns}),t.slots.experimental_newThreadPanelAction({id:Ga,title:"Manifest",icon:"manifest/id-card",layout:"flush",component:qa}),t.slots.threadPanelAction({id:yt,title:"Manifest \xB7 \u0440\u044F\u0434\u043E\u043C",icon:"manifest/id-card",layout:"flush",component:za}),t.slots.experimental_newThreadPanelAction({id:_t,title:"Manifest \xB7 \u0440\u044F\u0434\u043E\u043C",icon:"manifest/id-card",layout:"flush",component:qa}),t.composer.customize({id:"company-intent",scopes:["new-thread"],banners:[{id:"company",chrome:"bare",component:ms}]}),t.slots.settingsSection({id:"connect",title:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043A Manifest",description:"\u0412\u0445\u043E\u0434 \u043F\u043E email \u0438 \u043F\u0430\u0440\u043E\u043B\u044E \u0434\u043B\u044F \u043F\u043B\u0430\u0433\u0438\u043D\u0430; \u0434\u0430\u043D\u043D\u044B\u0435 \u0438 \u043F\u0440\u0430\u0432\u0430 \u2014 \u0432 Manifest.",component:f2})});export{Wc as default};
1
+ var ps=Object.defineProperty;var fs=(t,n)=>{for(var a in n)ps(t,a,{get:n[a],enumerable:!0})};var On=globalThis.__bbPluginRuntime;if(On==null||On.pluginSdkApp==null)throw new Error('Cannot load "@get-bb/plugin-sdk/app": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Et=On.pluginSdkApp,e5="default"in Et?Et.default:Et,{Markdown:t5,ThreadChat:n5,ThreadTitle:a5,UrlLink:r5,definePluginApp:qa,experimental_BranchPicker:s5,experimental_Diff:o5,experimental_FileLink:L5,experimental_Icon:Va,experimental_NewThreadComposer:At,experimental_PermissionModePicker:l5,experimental_ProviderIcon:i5,experimental_ProviderModelPicker:c5,experimental_SourceCode:d5,experimental_THREAD_ACTION_GROUPS:u5,experimental_ThreadActionsContextMenu:m5,experimental_ThreadActionsMenu:p5,experimental_ThreadStatusGlyph:f5,experimental_VoiceInputTextarea:g5,experimental_copyToClipboard:b5,experimental_saveFile:x5,experimental_useAppPanel:h5,experimental_useArchiveEnvironmentThreads:v5,experimental_useBranches:y5,experimental_useCheckoutState:_5,experimental_useCodeTheme:N5,experimental_useFixedTabTarget:w5,experimental_usePluginId:k5,experimental_useProviders:C5,experimental_useQuestionFormHost:S5,experimental_useSidebarThreadActions:M5,experimental_useSidebarThreadPullRequest:T5,experimental_useSidebarThreadSplit:R5,experimental_useSidebarThreads:E5,experimental_useThreadActionRegistrations:A5,experimental_useThreadActions:P5,useBbContext:B5,useBbNavigate:ae,useComposer:Wa,useComposerView:I5,useComposers:O5,useEnvironmentProviders:$5,useRealtime:se,useRealtimeConnectionState:D5,useRpc:ee,useSdk:Ie,useSettings:Z5,useSidebarSplitLayout:F5,useSidebarThreadDraft:H5,useSidebarThreadDraftIds:z5,useSidebarThreadRowStatus:j5,useSidebarThreadRowStatuses:U5,useSidebarThreadShortcut:K5}=Et;var Ke={};fs(Ke,{Activity:()=>bs,Children:()=>Bt,Component:()=>Dn,Fragment:()=>ot,Profiler:()=>xs,PureComponent:()=>hs,StrictMode:()=>vs,Suspense:()=>ys,act:()=>_s,cache:()=>Ns,cacheSignal:()=>ws,captureOwnerStack:()=>ks,cloneElement:()=>Lt,createContext:()=>Cs,createElement:()=>Ss,createRef:()=>Ms,default:()=>gs,forwardRef:()=>Oe,isValidElement:()=>Ue,lazy:()=>Ts,memo:()=>Rs,startTransition:()=>Es,unstable_useCacheRefresh:()=>As,use:()=>Ps,useActionState:()=>Bs,useCallback:()=>R,useContext:()=>Is,useDebugValue:()=>Os,useDeferredValue:()=>$s,useEffect:()=>w,useEffectEvent:()=>Ds,useId:()=>Zs,useImperativeHandle:()=>Fs,useInsertionEffect:()=>Hs,useLayoutEffect:()=>lt,useMemo:()=>re,useOptimistic:()=>zs,useReducer:()=>js,useRef:()=>j,useState:()=>f,useSyncExternalStore:()=>it,useTransition:()=>Us,version:()=>Ks});var $n=globalThis.__bbPluginRuntime;if($n==null||$n.react==null)throw new Error('Cannot load "react": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Pt=$n.react,gs="default"in Pt?Pt.default:Pt,{Activity:bs,Children:Bt,Component:Dn,Fragment:ot,Profiler:xs,PureComponent:hs,StrictMode:vs,Suspense:ys,act:_s,cache:Ns,cacheSignal:ws,captureOwnerStack:ks,cloneElement:Lt,createContext:Cs,createElement:Ss,createRef:Ms,forwardRef:Oe,isValidElement:Ue,lazy:Ts,memo:Rs,startTransition:Es,unstable_useCacheRefresh:As,use:Ps,useActionState:Bs,useCallback:R,useContext:Is,useDebugValue:Os,useDeferredValue:$s,useEffect:w,useEffectEvent:Ds,useId:Zs,useImperativeHandle:Fs,useInsertionEffect:Hs,useLayoutEffect:lt,useMemo:re,useOptimistic:zs,useReducer:js,useRef:j,useState:f,useSyncExternalStore:it,useTransition:Us,version:Ks}=Pt;var Gs=Object.defineProperty,Fn=(t,n)=>Gs(t,"name",{value:n,configurable:!0});function Zn(t,n){if(typeof t=="function")return t(n);t!=null&&(t.current=n)}Fn(Zn,"setRef");function Ya(...t){return n=>{let a=!1,o=t.map(r=>{let L=Zn(r,n);return!a&&typeof L=="function"&&(a=!0),L});if(a)return()=>{for(let r=0;r<o.length;r++){let L=o[r];typeof L=="function"?L():Zn(t[r],null)}}}}Fn(Ya,"composeRefs");function Hn(...t){return R(Ya(...t),t)}Fn(Hn,"useComposedRefs");var qs=Object.defineProperty,me=(t,n)=>qs(t,"name",{value:n,configurable:!0});function Ja(t){let n=Oe((a,o)=>{let{children:r,...L}=a,l=null,i=!1,m=[];r=r2(r),Bt.forEach(r,b=>{if(n2(b)){i=!0;let c=b,h="child"in c.props?c.props.child:c.props.children;for(;zn(h)&&typeof It=="function";)h=It(h._payload);l=Ws(c,h),m.push(l?.props?.children)}else m.push(b)}),l?l=Lt(l,void 0,m):!i&&Bt.count(r)===1&&Ue(r)&&(l=r);let u=l?t2(l):void 0,p=Hn(o,u);if(!l){if(r||r===0)throw new Error(i?Qs(t):Js(t));return r}let g=e2(L,l.props??{});return l.type!==ot&&(g.ref=o?p:u),Lt(l,g)});return n.displayName=`${t}.Slot`,n}me(Ja,"createSlot");var Qa=Ja("Slot"),Xa=Symbol.for("radix.slottable");function Vs(t){let n=me(a=>"child"in a?a.children(a.child):a.children,"Slottable");return n.displayName=`${t}.Slottable`,n.__radixId=Xa,n}me(Vs,"createSlottable");var Ws=me((t,n)=>"child"in t.props?Ue(n)?Lt(n,void 0,t.props.children(n.props.children)):null:Ue(n)?n:null,"getSlottableElementFromSlottable");function e2(t,n){let a={...n};for(let o in n){let r=t[o],L=n[o];/^on[A-Z]/.test(o)?r&&L?a[o]=(...i)=>{let m=L(...i);return r(...i),m}:r&&(a[o]=r):o==="style"?a[o]={...r,...L}:o==="className"?a[o]=[r,L].filter(Boolean).join(" "):o==="aria-describedby"&&(a[o]=s2(L,r))}return{...t,...a}}me(e2,"mergeProps");function t2(t){let n=Object.getOwnPropertyDescriptor(t.props,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning;return a?t.ref:(n=Object.getOwnPropertyDescriptor(t,"ref")?.get,a=n&&"isReactWarning"in n&&n.isReactWarning,a?t.props.ref:t.props.ref||t.ref)}me(t2,"getElementRef");function n2(t){return Ue(t)&&typeof t.type=="function"&&"__radixId"in t.type&&t.type.__radixId===Xa}me(n2,"isSlottable");var Ys=Symbol.for("react.lazy");function zn(t){return t!=null&&typeof t=="object"&&"$$typeof"in t&&t.$$typeof===Ys&&"_payload"in t&&a2(t._payload)}me(zn,"isLazyComponent");function a2(t){return typeof t=="object"&&t!==null&&"then"in t}me(a2,"isPromiseLike");function r2(t){let n=t;for(;zn(n)&&typeof It=="function";)n=It(n._payload);return n}me(r2,"useUnwrappedLazy");function s2(...t){let n=new Set;for(let a of t)if(typeof a=="string")for(let o of String(a).trim().split(/\s+/))o&&n.add(o);return n.size>0?Array.from(n).join(" "):void 0}me(s2,"concatAriaDescribedby");var Js=me(t=>`${t} failed to slot onto its children. Expected a single React element child or \`Slottable\`.`,"createSlotError"),Qs=me(t=>`${t} failed to slot onto its \`Slottable\`. Expected \`Slottable\` to receive a single React element child.`,"createSlottableError"),It=Ke[" use ".trim().toString()];var jn=globalThis.__bbPluginRuntime;if(jn==null||jn.classVarianceAuthority==null)throw new Error('Cannot load "class-variance-authority": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ot=jn.classVarianceAuthority,Y5="default"in Ot?Ot.default:Ot,{cva:o2,cx:J5}=Ot;var Un=globalThis.__bbPluginRuntime;if(Un==null||Un.clsx==null)throw new Error('Cannot load "clsx": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var $t=Un.clsx,X5="default"in $t?$t.default:$t,{clsx:L2}=$t;var Kn=globalThis.__bbPluginRuntime;if(Kn==null||Kn.tailwindMerge==null)throw new Error('Cannot load "tailwind-merge": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Dt=Kn.tailwindMerge,tL="default"in Dt?Dt.default:Dt,{createTailwindMerge:nL,extendTailwindMerge:aL,fromTheme:rL,getDefaultConfig:sL,mergeConfigs:oL,twJoin:LL,twMerge:l2,validators:lL}=Dt;function k(...t){return l2(L2(t))}var Zt="transition-colors duration-150 hover:duration-0";var Gn=globalThis.__bbPluginRuntime;if(Gn==null||Gn.jsxRuntime==null)throw new Error('Cannot load "react/jsx-runtime": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ft=Gn.jsxRuntime,pL="default"in Ft?Ft.default:Ft,{Fragment:P,jsx:e,jsxs:s}=Ft;var Xs=o2(`inline-flex cursor-pointer items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium ${Zt} focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50 [&_[data-icon-root]]:pointer-events-none [&_[data-icon-root]]:size-4 [&_[data-icon-root]]:shrink-0`,{variants:{variant:{default:"bg-foreground text-background hover:bg-foreground/90",destructive:"bg-destructive text-destructive-foreground hover:bg-destructive/90",outline:"border border-input bg-transparent hover:bg-state-hover hover:text-foreground",secondary:"bg-secondary text-secondary-foreground hover:bg-secondary/80",ghost:"hover:bg-state-hover hover:text-foreground aria-pressed:bg-state-active aria-pressed:text-foreground aria-pressed:hover:bg-state-active data-[state=open]:bg-state-active data-[state=open]:text-foreground data-[state=open]:hover:bg-state-active",link:"text-primary underline-offset-4 hover:underline"},size:{default:"h-9 px-4 py-2",sm:"h-8 rounded-md px-3 text-xs",lg:"h-10 rounded-md px-8",icon:"h-9 w-9"}},defaultVariants:{variant:"default",size:"default"}}),S=Oe(({className:t,variant:n,size:a,asChild:o=!1,...r},L)=>e(o?Qa:"button",{className:k(Xs({variant:n,size:a,className:t})),ref:L,...r}));S.displayName="Button";var i2="text-sm max-md:pointer-coarse:text-base";var c2="h-[28px] w-[28px] rounded-md p-0 max-md:pointer-coarse:h-[36px] max-md:pointer-coarse:w-[36px]",_L=`${c2} [&_[data-icon-root]]:size-[16px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[20px]`,NL=`${c2} [&_[data-icon-root]]:size-[13px] max-md:pointer-coarse:[&_[data-icon-root]]:size-[16px]`;var d2="h-9 max-md:pointer-coarse:h-10";var G=Oe(({className:t,type:n,...a},o)=>e("input",{type:n,autoComplete:"off",className:k(`flex w-full rounded-md border border-input bg-transparent pl-3 pr-3 py-1 ${Zt} file:border-0 file:bg-transparent file:text-sm file:font-medium file:text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring disabled:cursor-not-allowed disabled:opacity-50`,d2,i2,t),ref:o,...a}));G.displayName="Input";var Wn="outreach",u2="outreach",eo="manifest-company-changed",m2="manifest-mailing-changed",to="manifest-status-changed";function C(t){return t instanceof Error?t.message:String(t)}function E(){let t=ee();return R(async(n,a={})=>{let o=Object.fromEntries(Object.entries(a).filter(([,L])=>L!==void 0)),{result:r}=await t.call("tool",{name:n,args:o});return r},[t])}function H(){let t=ee(),[n,a]=f(null),[o,r]=f(null),L=R(()=>{t.call("status",null).then(l=>{a(l),r(null)},l=>r(C(l)))},[t]);return w(L,[L]),se(to,L),{status:n,error:o,reload:L,rpc:t}}var no=50,de={filters:{q:"",region:"",country:"",priority:"",status:"",role:"",sort:""},scope:"",selections:{},dismissed:{},items:[],total:0,loading:!1,error:null,selectedId:null},Vn=new Set,Ce=t=>{de={...de,...t},Vn.forEach(n=>n())},ao=t=>(Vn.add(t),()=>Vn.delete(t)),qn=0;function $e(t=de){let n=t.selections[t.scope];return n&&t.dismissed[t.scope]!==n.key?n:null}function Yn(t,n){let a=de.selections[t];if(n?a?.key===n.key&&a.label===n.label:!a)return!1;let o=$e()?.key,r={...de.selections};return n?r[t]=n:delete r[t],Ce({selections:r}),$e()?.key!==o}function Jn(){let t=E();return R(async(n=!1)=>{let a=++qn,o=de.filters,r=$e();Ce({loading:!0,error:null});try{let L={limit:no,offset:n?de.items.length:0},l=await t("outreach_list_companies",r?{...r.filter,...L}:{q:o.q||void 0,region:o.region||void 0,country:o.country||void 0,priorities:o.priority?[Number(o.priority)]:void 0,status:o.status||void 0,role:o.role||void 0,sort:o.sort||void 0,desc:o.sort==="coverage"?!0:void 0,...L});if(a!==qn)return;Ce({items:n?[...de.items,...l.items]:l.items,total:l.total,loading:!1})}catch(L){if(a!==qn)return;Ce({loading:!1,error:C(L)})}},[t])}function ct(){let t=it(ao,()=>de,()=>de),n=Jn(),a=R((l,i)=>{Ce({filters:{...de.filters,[l]:i}}),n()},[n]),o=R(l=>Ce({selectedId:l}),[]),r=R(l=>{if(de.scope===l)return;let i=$e()?.key;Ce({scope:l}),$e()?.key!==i&&n()},[n]),L=R(()=>{let l=$e();l&&(Ce({dismissed:{...de.dismissed,[de.scope]:l.key}}),n())},[n]);return{...t,selection:$e(t),load:n,setFilter:a,select:o,setScope:r,unlink:L}}function fe(t){se(eo,n=>{let a=n?.companyId;typeof a=="string"&&t(a)})}function p2(){let{status:t,error:n,rpc:a}=H(),[o,r]=f(""),[L,l]=f(""),[i,m]=f(""),[u,p]=f(!1),[g,b]=f(null),c=async()=>{p(!0),b(null);try{let v=await a.call("login",{url:o||t?.url||"",email:L||t?.email||"",password:i});m(""),b(v.connected?`\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A\u0430\u043A ${v.email}`:v.message)}catch(v){b(C(v))}finally{p(!1)}},h=async()=>{p(!0);try{await a.call("logout",null),b("\u0412\u044B \u0432\u044B\u0448\u043B\u0438: \u0442\u043E\u043A\u0435\u043D \u043E\u0442\u043E\u0437\u0432\u0430\u043D \u0432 Manifest.")}catch(v){b(C(v))}finally{p(!1)}};return s("div",{className:"flex max-w-xl flex-col gap-3 text-sm",children:[e("p",{className:"text-muted-foreground",children:"\u041F\u0430\u0440\u043E\u043B\u044C \u0434\u043B\u044F \u043F\u043B\u0430\u0433\u0438\u043D\u0430 \u0437\u0430\u0434\u0430\u0451\u0442\u0441\u044F \u0432 Manifest: \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u2014 \u0432 \xAB\u041F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u0435\u043B\u0438 \u0438 \u043F\u0440\u0430\u0432\u0430\xBB, \u0438\u043B\u0438 \u0432\u044B \u0441\u0430\u043C\u0438 \u2014 \u043A\u043B\u0438\u043A\u043E\u043C \u043F\u043E \u0441\u0432\u043E\u0435\u043C\u0443 \u0438\u043C\u0435\u043D\u0438 \u0432\u043D\u0438\u0437\u0443 \u043C\u0435\u043D\u044E Manifest. \u041F\u043B\u0430\u0433\u0438\u043D \u043D\u0435 \u0445\u0440\u0430\u043D\u0438\u0442 \u043F\u0430\u0440\u043E\u043B\u044C: \u043E\u043D \u043E\u0434\u0438\u043D \u0440\u0430\u0437 \u043E\u0431\u043C\u0435\u043D\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u043D\u0430 \u0442\u043E\u043A\u0435\u043D."}),n&&e("p",{className:"text-destructive",children:n}),t&&e("p",{children:t.connected?s(P,{children:["\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u043E \u043A ",e("b",{children:t.url})," \u043A\u0430\u043A ",e("b",{children:t.email}),t.canManage?" \xB7 \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0438 \u043F\u0440\u0430\u0432\u043A\u0430":t.canView?" \xB7 \u0442\u043E\u043B\u044C\u043A\u043E \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440":" \xB7 \u043D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443"]}):e("span",{className:"text-muted-foreground",children:t.message})}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-xs text-muted-foreground",children:"\u0410\u0434\u0440\u0435\u0441 Manifest"}),e(G,{value:o,placeholder:t?.url||"https://manifest.example.com",onChange:v=>r(v.target.value)})]}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-xs text-muted-foreground",children:"Email"}),e(G,{value:L,placeholder:t?.email||"name@company.com",autoComplete:"username",onChange:v=>l(v.target.value)})]}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-xs text-muted-foreground",children:"\u041F\u0430\u0440\u043E\u043B\u044C \u0434\u043B\u044F \u043F\u043B\u0430\u0433\u0438\u043D\u0430"}),e(G,{type:"password",value:i,autoComplete:"current-password",onChange:v=>m(v.target.value),onKeyDown:v=>{v.key==="Enter"&&i&&c()}})]}),s("div",{className:"flex gap-2",children:[e(S,{disabled:u||!i||!(o||t?.url)||!(L||t?.email),onClick:()=>{c()},children:u?"\u0412\u0445\u043E\u0434\u0438\u043C\u2026":"\u0412\u043E\u0439\u0442\u0438"}),t?.connected&&e(S,{variant:"outline",disabled:u,onClick:()=>{h()},children:"\u0412\u044B\u0439\u0442\u0438"})]}),g&&e("p",{role:"status",children:g})]})}var dt=Va;var Qn=globalThis.__bbPluginRuntime;if(Qn==null||Qn.radixPopover==null)throw new Error('Cannot load "@radix-ui/react-popover": this bundle must be loaded by the BB app, which provides the shared plugin runtime (globalThis.__bbPluginRuntime).');var Ht=Qn.radixPopover,HL="default"in Ht?Ht.default:Ht,{Anchor:f2,Arrow:zL,Close:jL,Content:g2,Popover:UL,PopoverAnchor:KL,PopoverArrow:GL,PopoverClose:qL,PopoverContent:VL,PopoverPortal:WL,PopoverTrigger:YL,Portal:b2,Root:x2,Trigger:JL,createPopoverScope:QL}=Ht;function h2(){let t="manifest";return{"data-bb-portaled-overlay":"","data-bb-plugin-root":"",...t!==void 0?{"data-bb-plugin":t}:{}}}var oe={new:"\u041D\u043E\u0432\u044B\u0439",to_qualify:"\u041D\u0430 \u043F\u0440\u043E\u0432\u0435\u0440\u043A\u0435",ready:"\u0413\u043E\u0442\u043E\u0432 \u043A \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u0443",contacted:"\u041D\u0430\u043F\u0438\u0441\u0430\u043B\u0438",replied:"\u041E\u0442\u0432\u0435\u0442\u0438\u043B",qualified:"\u041F\u043E\u0434\u0445\u043E\u0434\u0438\u0442",handed_over:"\u041F\u0435\u0440\u0435\u0434\u0430\u043D \u0432 \u0437\u0430\u043A\u0443\u043F\u043A\u0438",rejected:"\u041D\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442",do_not_contact:"\u041D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F"},zt=Object.keys(oe),ut={potential_supplier:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A",supplier:"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A"},jt=Object.keys(ut),v2=["rejected","do_not_contact"],y2={brand_subsidiary:"\u041A\u043E\u043C\u043F\u0430\u043D\u0438\u044F \u0431\u0440\u0435\u043D\u0434\u0430",importer:"\u0418\u043C\u043F\u043E\u0440\u0442\u0451\u0440 / \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u044C\u044E\u0442\u043E\u0440",dealer:"\u0414\u0438\u043B\u0435\u0440",service_center:"\u0421\u0435\u0440\u0432\u0438\u0441\u043D\u044B\u0439 \u0446\u0435\u043D\u0442\u0440",unknown:"\u041D\u0435 \u043E\u043F\u0440\u0435\u0434\u0435\u043B\u0451\u043D"},so={africa:"\u0410\u0444\u0440\u0438\u043A\u0430",asia:"\u0410\u0437\u0438\u044F","australia-pacific":"\u0410\u0432\u0441\u0442\u0440\u0430\u043B\u0438\u044F \u0438 \u041E\u043A\u0435\u0430\u043D\u0438\u044F",europe:"\u0415\u0432\u0440\u043E\u043F\u0430","middle-east":"\u0411\u043B\u0438\u0436\u043D\u0438\u0439 \u0412\u043E\u0441\u0442\u043E\u043A","north-central-america":"\u0421\u0435\u0432. \u0438 \u0426\u0435\u043D\u0442\u0440. \u0410\u043C\u0435\u0440\u0438\u043A\u0430","south-america":"\u042E\u0436\u043D\u0430\u044F \u0410\u043C\u0435\u0440\u0438\u043A\u0430"},ve=t=>so[t]??(t||"\u2014"),Xn={phone_and_email:"\u0435\u0441\u0442\u044C \u0442\u0435\u043B\u0435\u0444\u043E\u043D \u0438 email",phone_only:"\u0442\u043E\u043B\u044C\u043A\u043E \u0442\u0435\u043B\u0435\u0444\u043E\u043D",email_only:"\u0442\u043E\u043B\u044C\u043A\u043E email",website_only:"\u0442\u043E\u043B\u044C\u043A\u043E \u0441\u0430\u0439\u0442",brand_domain:"\u0432\u0441\u0435 email \u043D\u0430 \u0434\u043E\u043C\u0435\u043D\u0435 \u0431\u0440\u0435\u043D\u0434\u0430",no_contacts:"\u043D\u0435\u0442 \u043A\u0430\u043D\u0430\u043B\u043E\u0432 \u0441\u0432\u044F\u0437\u0438"},Ut={phone:"\u0422\u0435\u043B\u0435\u0444\u043E\u043D",mobile:"\u041C\u043E\u0431\u0438\u043B\u044C\u043D\u044B\u0439",whatsapp:"WhatsApp",telegram:"Telegram",fax:"\u0424\u0430\u043A\u0441",email:"Email",website:"\u0421\u0430\u0439\u0442",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},_2=Object.keys(Ut),oo=(()=>{try{return new Intl.DisplayNames(["ru"],{type:"region"})}catch{return null}})();function F(t){if(!t)return"\u2014";if(t==="XK")return"\u041A\u043E\u0441\u043E\u0432\u043E";try{return oo?.of(t)??t}catch{return t}}function q(t){if(!t)return"\u2014";let n=new Date(t);return Number.isNaN(n.getTime())?t:n.toLocaleString("ru-RU",{day:"2-digit",month:"2-digit",year:"numeric",hour:"2-digit",minute:"2-digit"})}function mt(t){return t.startsWith("import:")?"\u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430":t}var Kt={waiting_reply:"\u0416\u0434\u0443\u0442 \u043D\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430",overdue:"\u041F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E",due_today:"\u041D\u0430 \u0441\u0435\u0433\u043E\u0434\u043D\u044F",ready_untouched:"\u0413\u043E\u0442\u043E\u0432\u044B, \u043D\u0435 \u0442\u0440\u043E\u043D\u0443\u0442\u044B",no_next_action:"\u0411\u0435\u0437 \u0441\u043B\u0435\u0434\u0443\u044E\u0449\u0435\u0433\u043E \u0448\u0430\u0433\u0430"},pt={email:"Email",whatsapp:"WhatsApp",telegram:"Telegram",phone:"\u0422\u0435\u043B\u0435\u0444\u043E\u043D",meeting:"\u0412\u0441\u0442\u0440\u0435\u0447\u0430",linkedin:"LinkedIn",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},ft={sent:"\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E",no_answer:"\u043D\u0435 \u043E\u0442\u0432\u0435\u0442\u0438\u043B\u0438",replied:"\u043E\u0442\u0432\u0435\u0442\u0438\u043B\u0438",interested:"\u0438\u043D\u0442\u0435\u0440\u0435\u0441",terms_received:"\u043F\u0440\u0438\u0441\u043B\u0430\u043B\u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F",declined:"\u043E\u0442\u043A\u0430\u0437",territory:"\u0442\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u0435\u0442",referral:"\u043F\u0435\u0440\u0435\u0430\u0434\u0440\u0435\u0441\u043E\u0432\u0430\u043B\u0438",wrong_contact:"\u043D\u0435\u0432\u0435\u0440\u043D\u044B\u0439 \u043A\u043E\u043D\u0442\u0430\u043A\u0442",out_of_office:"\u0432 \u043E\u0442\u043F\u0443\u0441\u043A\u0435",bounced:"\u043D\u0435 \u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043E"},Gt={follow_up:"\u041D\u0430\u043F\u043E\u043C\u043D\u0438\u0442\u044C",call:"\u041F\u043E\u0437\u0432\u043E\u043D\u0438\u0442\u044C",send_offer:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0437\u0430\u043F\u0440\u043E\u0441",wait_reply:"\u0416\u0434\u0430\u0442\u044C \u043E\u0442\u0432\u0435\u0442\u0430",recycle:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C\u0441\u044F \u043F\u043E\u0437\u0436\u0435",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},ea={not_profile:"\u041D\u0435 \u043D\u0430\u0448 \u043F\u0440\u043E\u0444\u0438\u043B\u044C",territory:"\u0422\u0435\u0440\u0440\u0438\u0442\u043E\u0440\u0438\u0430\u043B\u044C\u043D\u044B\u0439 \u0437\u0430\u043F\u0440\u0435\u0442",no_assortment:"\u041D\u0435\u0442 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0430",no_response:"\u041D\u0435 \u043E\u0442\u0432\u0435\u0447\u0430\u0435\u0442",asked_not_to_contact:"\u041F\u0440\u043E\u0441\u0438\u043B\u0438 \u043D\u0435 \u043F\u0438\u0441\u0430\u0442\u044C",other:"\u0414\u0440\u0443\u0433\u043E\u0435","":"\u0411\u0435\u0437 \u043F\u0440\u0438\u0447\u0438\u043D\u044B"},N2={never:"\u043D\u0435 \u0431\u044B\u043B\u043E",d0_7:"\u2264 7 \u0434\u043D",d8_14:"8\u201314 \u0434\u043D",d15_30:"15\u201330 \u0434\u043D",d30p:"> 30 \u0434\u043D"},qt=["never","d0_7","d8_14","d15_30","d30p"],Vt={status:"\u0421\u0442\u0430\u0442\u0443\u0441",status_reason:"\u041F\u0440\u0438\u0447\u0438\u043D\u0430",status_reason_code:"\u041F\u0440\u0438\u0447\u0438\u043D\u0430",owner:"\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439",tags:"\u041C\u0435\u0442\u043A\u0438",next_action:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0448\u0430\u0433",touch:"\u041A\u0430\u0441\u0430\u043D\u0438\u0435",done:"\u0428\u0430\u0433",due_on:"\u0421\u0440\u043E\u043A \u0448\u0430\u0433\u0430",verification:"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043A\u0430\u043D\u0430\u043B\u0430",priority_manual:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0432\u0440\u0443\u0447\u043D\u0443\u044E",do_not_contact:"\u041D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F",mail_sender:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C",mail_legal_entity:"\u042E\u0440\u043B\u0438\u0446\u043E \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F"};function Ge(t,n){return n?t==="status"?oe[n]??n:t==="status_reason_code"?ea[n]??n:n:"\u2014"}function qe(t){let[n,a,o]=t.split("-").map(Number),r=new Date(n,(a??1)-1,o??1),L=new Date,l=new Date(L.getFullYear(),L.getMonth(),L.getDate());return Math.round((r.getTime()-l.getTime())/864e5)}function ye(t){if(!t)return"\u2014";let[n,a,o]=t.slice(0,10).split("-");return o&&a&&n?`${o}.${a}.${n}`:t}function Wt(t,n){return n<=0?"\u2014":n>=20?`${t} \u0438\u0437 ${n} \xB7 ${Math.round(t/n*100)}%`:`${t} \u0438\u0437 ${n}`}function ge({tone:t,title:n,className:a}){return e("span",{className:k("mf-dot",`mf-dot--${t}`,a),title:n,"aria-hidden":n?void 0:!0})}function J({tone:t,children:n,className:a,title:o}){return s("span",{className:k("inline-flex min-w-0 items-center gap-1.5",a),title:o,children:[e(ge,{tone:t}),e("span",{className:"min-w-0",children:n})]})}function V({tone:t,children:n,className:a,title:o}){return e("span",{className:k("mf-badge",`mf-badge--${t}`,a),title:o,children:n})}function ce({sandbox:t}){return t?e(V,{tone:"sandbox",title:"\u041F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430: \u043F\u0438\u0441\u044C\u043C\u0430 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C \u043D\u0435 \u0443\u0445\u043E\u0434\u044F\u0442",children:"\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430"}):null}function w2({title:t,actions:n,children:a,className:o}){return s("section",{className:k("mf-card flex flex-col gap-2 p-3",o),children:[t||n?s("div",{className:"flex items-center gap-2",children:[t?e("h4",{className:"m-0 min-w-0 flex-1 text-[13px] font-bold",children:t}):e("span",{className:"flex-1"}),n]}):null,a]})}function De({className:t}){return e("svg",{viewBox:"0 0 180 180",className:k("size-4 flex-none",t),"aria-hidden":"true",focusable:"false",children:s("g",{transform:"translate(14 18)",children:[e("path",{d:"M8 136V10h31l16 16H26v110H8Z",fill:"#2E3433"}),e("path",{d:"M24 136V24h28l39 42-16 17-27-30v83H24Z",fill:"#111315"}),e("path",{d:"M124 136V54L98 84 82 67l42-43h28v112h-28Z",fill:"#111315"}),e("path",{d:"M83 67l42-43h28L99 83 83 67Z",fill:"#D7FF3F"})]})})}function Le({children:t,className:n}){return s("span",{className:k("inline-flex items-center gap-1.5 text-[11px] font-semibold text-muted-foreground",n),children:[e(De,{className:"size-3.5"}),t]})}function k2({sandbox:t,children:n,className:a}){return e("span",{className:k("mf-island mf-chip my-1 flex max-w-full flex-col gap-1.5 px-2.5 py-2 text-xs",t&&"mf-chip--sandbox",a),children:n})}function be({title:t,children:n,actions:a,className:o}){return s("div",{className:k("mf-confirm flex flex-col gap-1.5 px-2.5 py-2 text-xs",o),role:"group",children:[e("b",{className:"text-[12px]",children:t}),n,e("div",{className:"flex flex-wrap items-center gap-2",children:a})]})}function Yt({parts:t,className:n}){let a=t.reduce((o,r)=>o+Math.max(0,r.value),0);return a<=0?e("div",{className:k("mf-progress",n)}):e("div",{className:k("mf-progress",n),"aria-hidden":"true",children:t.map((o,r)=>o.value>0?e("i",{className:o.tone,style:{width:`${o.value/a*100}%`}},r):null)})}var Jt={new:"muted",to_qualify:"warn",ready:"ok",contacted:"info",replied:"volt",qualified:"ok",handed_over:"ok",rejected:"muted",do_not_contact:"err"};var Lo=450,lo=220,io=3,ta=new Map,co=()=>typeof window<"u"&&!!window.matchMedia?.("(hover: hover)").matches;function C2(){let[t,n]=f(null),a=j(void 0),o=j(!1);w(()=>()=>clearTimeout(a.current),[]);let r=R((m,u)=>{if(!co())return;clearTimeout(a.current);let p=u.getBoundingClientRect();a.current=setTimeout(()=>{o.current=!0,n({item:m,box:p})},o.current?0:Lo)},[]),L=R(()=>{clearTimeout(a.current),a.current=setTimeout(()=>{o.current=!1,n(null)},lo)},[]),l=R(()=>clearTimeout(a.current),[]),i=R(()=>{clearTimeout(a.current),o.current=!1,n(null)},[]);return{peek:t,enter:r,leave:L,keep:l,close:i}}function uo(t){let n=E(),a=`${t.id}:${t.updated_at}`,[o,r]=f(()=>{let L=ta.get(t.id);return L?.key===a?L:null});return w(()=>{let L=ta.get(t.id);if(L?.key===a){r(L);return}r(null);let l=!0;return n("outreach_get_company",{id:t.id}).then(i=>{let m={key:a,touches:(i?.interactions??[]).slice(0,io),sandbox:!!i?.sandbox_traces,error:null};ta.set(t.id,m),l&&r(m)},i=>l&&r({key:a,touches:[],sandbox:!1,error:C(i)})),()=>{l=!1}},[t.id,a,n]),o}function gt({label:t,children:n,className:a}){return s("div",{className:k("flex min-w-0 gap-2",a),children:[e("span",{className:"w-20 flex-none text-muted-foreground",children:t}),e("span",{className:"min-w-0 flex-1",children:n})]})}function mo({item:t}){let n=t.next_action;if(!n){let r=["rejected","do_not_contact","handed_over"].includes(t.status);return e("span",{className:r?"text-muted-foreground":"text-[var(--mf-amber)]",children:r?"\u2014":"\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D"})}let a=n.due_on?qe(n.due_on):null,o=a===null?"":a<0?`\u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E \u043D\u0430 ${-a} \u0434\u043D`:a===0?"\u0441\u0435\u0433\u043E\u0434\u043D\u044F":`\u0434\u043E ${ye(n.due_on)}`;return s("span",{children:[Gt[n.action]??n.action,o?s("span",{className:k(a!==null&&a<0&&"font-medium text-destructive"),children:[" \xB7 ",o]}):null,n.note?e("span",{className:"block truncate text-muted-foreground",children:n.note}):null]})}function po({item:t}){let n=t.touches_count??0;if(!n)return e("span",{className:"text-muted-foreground",children:"\u0435\u0449\u0451 \u043D\u0435 \u0431\u044B\u043B\u043E"});let a=t.last_inbound_at&&(!t.last_outbound_at||t.last_inbound_at>t.last_outbound_at);return s("span",{className:"flex flex-wrap items-center gap-1",children:[n," \xB7 \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0435 ",ye(t.last_touch_at),a?s(V,{tone:"volt",children:["\u043E\u0442\u0432\u0435\u0442 ",ye(t.last_inbound_at)]}):null]})}function fo({item:t}){let n=uo(t);if(!(t.touches_count??0))return null;if(!n)return s("div",{className:"flex flex-col gap-1","aria-label":"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026",children:[e("span",{className:"h-3 w-4/5 animate-pulse rounded bg-muted"}),e("span",{className:"h-3 w-3/5 animate-pulse rounded bg-muted"})]});if(n.error)return s("p",{className:"text-destructive",children:["\u041D\u0435 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u043B\u043E\u0441\u044C: ",n.error]});let a=(t.touches_count??0)-n.touches.length;return s("ul",{className:"flex flex-col gap-1 border-l-2 border-border pl-2",children:[n.touches.map(o=>s("li",{className:"min-w-0",children:[s("span",{className:"flex flex-wrap items-center gap-1",children:[s("span",{className:k(o.direction==="in"&&"font-medium"),children:[o.direction==="in"?"\u2190":"\u2192"," ",pt[o.channel]??o.channel]}),s("span",{className:"text-muted-foreground",children:["\xB7 ",ye(o.occurred_at),o.outcome?` \xB7 ${ft[o.outcome]??o.outcome}`:""]}),o.sandbox?e(V,{tone:"sandbox",children:"\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430"}):null]}),o.summary?e("span",{className:"block truncate text-muted-foreground",children:o.summary}):null]},o.id)),a>0?s("li",{className:"text-muted-foreground",children:["\u0438 \u0435\u0449\u0451 ",a," \u2014 \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435"]}):null,n.sandbox&&!n.touches.some(o=>o.sandbox)?e("li",{className:"text-muted-foreground",children:"\u0435\u0441\u0442\u044C \u0441\u043B\u0435\u0434\u044B \u0442\u0435\u0441\u0442\u0430 \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B"}):null]})}var na="inline-flex h-6 min-w-6 items-center justify-center gap-1 rounded-md px-1.5 text-[11px] text-muted-foreground hover:bg-state-hover hover:text-foreground focus-visible:outline focus-visible:outline-2 focus-visible:outline-ring";function S2({peek:t,onKeep:n,onLeave:a,onClose:o,onBeside:r,onChat:L}){let l=h2(),{item:i,box:m}=t,u=`${F(i.country_code)}${i.countries.length>1?` +${i.countries.length-1}`:""}`;return s(x2,{open:!0,onOpenChange:p=>!p&&o(),children:[e(f2,{asChild:!0,children:e("span",{"aria-hidden":!0,style:{position:"fixed",left:m.right,top:m.top,width:1,height:m.height}})}),e(b2,{children:e(g2,{...l,side:"right",align:"start",sideOffset:8,collisionPadding:8,role:"dialog","aria-label":`\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F: ${i.display_name}`,onOpenAutoFocus:p=>p.preventDefault(),onCloseAutoFocus:p=>p.preventDefault(),onMouseEnter:n,onMouseLeave:a,className:"z-50 outline-none",children:s("div",{className:"mf-island flex w-80 max-w-[calc(100vw-2rem)] flex-col gap-1.5 rounded-lg border border-border bg-background p-3 text-xs shadow-xl",children:[s("div",{className:"flex items-start gap-1.5",children:[e("span",{className:"min-w-0 flex-1",children:s("span",{className:"flex items-center gap-1.5",children:[s("span",{className:"flex-none rounded-full border border-border px-1.5 text-[11px] font-semibold",children:["P",i.priority]}),e("span",{className:"truncate text-sm font-semibold",children:i.display_name})]})}),s("span",{className:"flex flex-none items-center",role:"toolbar","aria-label":"\u0414\u0435\u0439\u0441\u0442\u0432\u0438\u044F \u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0435\u0439",children:[s("button",{type:"button",className:na,title:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0440\u044F\u0434\u043E\u043C \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438",onClick:()=>r(i),children:[e(dt,{name:"PanelRight",fallback:"Columns2",className:"size-3.5"}),"\u0420\u044F\u0434\u043E\u043C"]}),s("button",{type:"button",className:na,title:"\u0427\u0430\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",onClick:()=>L(i),children:[e(dt,{name:"MessageSquare",fallback:"MessageCircle",className:"size-3.5"}),"\u0427\u0430\u0442"]}),e("button",{type:"button",className:na,"aria-label":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",title:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",onClick:o,children:"\xD7"})]})]}),s("div",{className:"flex flex-wrap items-center gap-1",children:[e(V,{tone:Jt[i.status]??"muted",children:oe[i.status]??i.status}),i.do_not_contact&&i.status!=="do_not_contact"?e(V,{tone:"err",children:"\u043D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F"}):null,i.roles?.includes("supplier")?e(V,{tone:"ok",children:"\u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A"}):null,s("span",{className:"text-muted-foreground",children:[u," \xB7 ",ve(i.region)]})]}),e(gt,{label:"\u0428\u0430\u0433",children:e(mo,{item:i})}),e(gt,{label:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435",children:i.coverage?s("span",{children:[s("b",{className:"tabular-nums",children:[i.coverage.by_volume,"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7 ",i.coverage.by_positions,"% \u043F\u043E\u0437\u0438\u0446\u0438\u0439",s("span",{className:"text-muted-foreground",children:[" \xB7 ",i.coverage.by==="pricelist"?"\u043F\u0440\u0430\u0439\u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":i.coverage.by==="distributor_site"?"\u0441\u0430\u0439\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":`\u0441\u0430\u0439\u0442 STIHL ${F(i.coverage.country)}`,i.coverage.draft?" (\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A, \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D)":""]}),i.coverage.unchecked?s("span",{className:"text-[var(--mf-amber)]",children:[" \xB7 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C ",i.coverage.unchecked]}):null]}):e("span",{className:"text-muted-foreground",children:"\u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u043F\u043E \u0441\u0442\u0440\u0430\u043D\u0435"})}),i.owner?e(gt,{label:"\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432.",children:i.owner}):null,i.tags?.length?e(gt,{label:"\u041C\u0435\u0442\u043A\u0438",children:i.tags.join(", ")}):null,e(gt,{label:"\u041A\u0430\u0441\u0430\u043D\u0438\u044F",children:e(po,{item:i})}),e(fo,{item:i})]})})})]})}var go=12;function Ze({label:t,value:n,options:a,onChange:o}){let[r,L]=f(!1),[l,i]=f(""),m=j(null),u=j(null),p=a.length>go,g=a.find(d=>d.value===n);w(()=>{if(!r)return;i(""),p&&setTimeout(()=>u.current?.focus(),0);let d=_=>{m.current?.contains(_.target)||L(!1)},x=_=>{_.key==="Escape"&&L(!1)};return document.addEventListener("mousedown",d),document.addEventListener("keydown",x),()=>{document.removeEventListener("mousedown",d),document.removeEventListener("keydown",x)}},[r,p]);let b=l.trim().toLowerCase(),c=b?a.filter(d=>d.value===""||d.label.toLowerCase().includes(b)):a,h=c.find(d=>d.value!==""),v=d=>{o(d),L(!1)};return s("div",{ref:m,className:"relative",children:[s("button",{type:"button","aria-haspopup":"listbox","aria-expanded":r,"aria-label":`\u0424\u0438\u043B\u044C\u0442\u0440: ${t}`,onClick:()=>L(d=>!d),className:k("inline-flex h-7 max-w-[11rem] items-center gap-1 rounded-md border border-border px-2 text-xs",n?"bg-state-active text-foreground":"text-muted-foreground hover:bg-state-hover"),children:[e("span",{className:"truncate",children:n?g?.label??n:t}),e("span",{"aria-hidden":!0,children:"\u25BE"})]}),r&&s("div",{role:"listbox","aria-label":t,className:"absolute left-0 top-8 z-50 flex max-h-72 w-60 flex-col overflow-y-auto rounded-md border border-border bg-popover p-1 text-popover-foreground shadow-md",children:[p&&e("input",{ref:u,type:"search",value:l,placeholder:"\u041D\u0430\u0439\u0442\u0438\u2026","aria-label":`\u041F\u043E\u0438\u0441\u043A: ${t}`,onChange:d=>i(d.target.value),onKeyDown:d=>{d.key==="Enter"&&b&&h&&v(h.value)},className:"sticky top-0 z-10 mb-1 h-7 flex-none rounded border border-input bg-background px-2 text-xs outline-none focus-visible:ring-1 focus-visible:ring-ring"}),b&&!h&&e("span",{className:"px-2 py-1 text-xs text-muted-foreground",children:"\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E"}),c.map(d=>e("button",{type:"button",role:"option","aria-selected":d.value===n,onClick:()=>v(d.value),className:k("flex-none truncate rounded px-2 py-1 text-left text-xs hover:bg-state-hover",d.value===n&&"font-semibold"),children:d.label},d.value))]})]})}function Se({priority:t,manual:n}){return s("span",{className:k("inline-flex h-5 min-w-7 flex-none items-center justify-center rounded-full border px-1.5 text-[11px] font-semibold",t===1&&"mf-prio-1 border-emerald-500/40 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300",t===2&&"border-border",t===3&&"border-border",t>=4&&"border-dashed border-border text-muted-foreground"),title:n?"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u0437\u0430\u0434\u0430\u043D \u0432\u0440\u0443\u0447\u043D\u0443\u044E":"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442 \u043F\u043E \u043A\u0430\u043D\u0430\u043B\u0430\u043C \u0441\u0432\u044F\u0437\u0438",children:["P",t,n?"\u270E":""]})}function bo({it:t}){let n=[[t.has_phone,"Phone","\u0442\u0435\u043B\u0435\u0444\u043E\u043D"],[t.has_whatsapp,"MessageCircle","WhatsApp"],[t.has_email,"Mail","email"],[t.has_website,"Globe","\u0441\u0430\u0439\u0442"]];return e("span",{className:"flex items-center gap-1","aria-label":"\u041A\u0430\u043D\u0430\u043B\u044B \u0441\u0432\u044F\u0437\u0438",children:n.map(([a,o,r])=>e("span",{title:`${r}: ${a?"\u0435\u0441\u0442\u044C":"\u043D\u0435\u0442"}`,className:a?"text-foreground":"text-muted-foreground/30",children:e(dt,{name:o,className:"size-3"})},r))})}function Qt({onNavigate:t,activeThreadId:n=null}){let{status:a,error:o}=H(),r=ct(),L=E(),l=Xt(),i=_e(),m=j(null),u=N=>{i({kind:"company",id:N.id,title:N.display_name},n)||$(N)},p=C2(),[g,b]=f(null),[c,h]=f(r.filters.q),v=a?.connected&&a.canView;w(()=>r.setScope(n??""),[n,r.setScope]),w(()=>{v&&(r.load(),L("outreach_facets").then(b,()=>b(null)))},[v]),w(()=>{let N=setTimeout(()=>{c.trim()!==r.filters.q&&r.setFilter("q",c.trim())},300);return()=>clearTimeout(N)},[c]),fe(N=>{r.items.some(z=>z.id===N)&&r.load()});let d=re(()=>[{value:"",label:"\u0412\u0441\u0435 \u0440\u0435\u0433\u0438\u043E\u043D\u044B"},...(g?.regions??[]).map(N=>({value:N.value,label:`${ve(N.value)} (${N.count})`}))],[g]),x=re(()=>[{value:"",label:"\u0412\u0441\u0435 \u0441\u0442\u0440\u0430\u043D\u044B"},...(g?.countries??[]).map(N=>({value:N.value,label:`${F(N.value)} (${N.count})`})).sort((N,z)=>N.label.localeCompare(z.label,"ru"))],[g]),_=[{value:"",label:"\u0412\u0441\u0435 \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u044B"},...[1,2,3,4,5].map(N=>({value:String(N),label:`P${N}`}))],y=[{value:"",label:"\u0412\u0441\u0435 \u0441\u0442\u0430\u0442\u0443\u0441\u044B"},...zt.map(N=>({value:N,label:oe[N]}))],I=[{value:"",label:"\u0412\u0441\u0435 \u0440\u043E\u043B\u0438"},...jt.map(N=>({value:N,label:ut[N]}))],T=[{value:"",label:"\u041F\u043E \u043F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442\u0443"},{value:"coverage",label:"\u041F\u043E \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044E \u043B\u0438\u0441\u0442\u0430"}];if(o)return s(D,{children:["\u041F\u043B\u0430\u0433\u0438\u043D \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D: ",o]});if(!a)return e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"});if(!a.connected)return s(D,{children:[a.message||"\u041F\u043B\u0430\u0433\u0438\u043D \u043D\u0435 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0451\u043D."," \u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 \u2192 \u043F\u043B\u0430\u0433\u0438\u043D\u044B \u2192 Manifest."]});if(!a.canView)return e(D,{children:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443: \u043D\u0443\u0436\u043D\u043E \u043F\u0440\u0430\u0432\u043E outreach.view \u0432 Manifest."});function $(N){r.select(N.id),t?.(),l(N.id,N.display_name)}let M=r.selection,W=(N,z)=>{p.close(),M&&!z?(r.select(N.id),u(N)):z&&!M?u(N):$(N)};return s("div",{className:"flex h-full min-h-0 flex-col",children:[s("div",{className:"flex flex-col gap-1.5 px-2 pb-2 pt-1",children:[M?s("div",{role:"status",className:"flex items-start gap-1 rounded-md border border-border bg-muted/50 px-2 py-1 text-xs",children:[s("span",{className:"min-w-0 flex-1",children:["\u0412\u044B\u0431\u043E\u0440\u043A\u0430 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430: ",e("b",{className:"font-medium",children:M.label})]}),e("button",{type:"button","aria-label":"\u041E\u0442\u0432\u044F\u0437\u0430\u0442\u044C \u043E\u0442 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430",title:"\u041E\u0442\u0432\u044F\u0437\u0430\u0442\u044C \u043E\u0442 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0430 \u2014 \u0441\u0432\u043E\u0439 \u0444\u0438\u043B\u044C\u0442\u0440 \u0441\u043F\u0438\u0441\u043A\u0430",className:"rounded px-1 text-muted-foreground hover:bg-state-hover hover:text-foreground",onClick:r.unlink,children:"\xD7"})]}):s(P,{children:[e("input",{type:"search",value:c,onChange:N=>h(N.target.value),placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435, \u043A\u043E\u043D\u0442\u0430\u043A\u0442, \u0433\u043E\u0440\u043E\u0434\u2026","aria-label":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0440\u0435\u0435\u0441\u0442\u0440\u0443",className:"h-7 rounded-md border border-input bg-background px-2 text-xs outline-none focus-visible:ring-1 focus-visible:ring-ring"}),s("div",{className:"flex flex-wrap gap-1",children:[e(Ze,{label:"\u0420\u0435\u0433\u0438\u043E\u043D",value:r.filters.region,options:d,onChange:N=>r.setFilter("region",N)}),e(Ze,{label:"\u0421\u0442\u0440\u0430\u043D\u0430",value:r.filters.country,options:x,onChange:N=>r.setFilter("country",N)}),e(Ze,{label:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442",value:r.filters.priority,options:_,onChange:N=>r.setFilter("priority",N)}),e(Ze,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",value:r.filters.status,options:y,onChange:N=>r.setFilter("status",N)}),e(Ze,{label:"\u0420\u043E\u043B\u044C",value:r.filters.role,options:I,onChange:N=>r.setFilter("role",N)}),e(Ze,{label:"\u041F\u043E\u0440\u044F\u0434\u043E\u043A",value:r.filters.sort,options:T,onChange:N=>r.setFilter("sort",N)})]})]}),e("span",{className:"text-[11px] text-muted-foreground",children:r.loading&&r.items.length===0?"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026":`\u041D\u0430\u0439\u0434\u0435\u043D\u043E: ${r.total}`})]}),r.error&&s(D,{children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ",r.error]}),s("ul",{ref:m,onScroll:p.close,className:"min-h-0 flex-1 overflow-y-auto px-1",children:[r.items.map(N=>e("li",{children:s("button",{type:"button",draggable:!0,onMouseEnter:z=>p.enter(N,z.currentTarget),onMouseLeave:p.leave,onDragStart:z=>{p.close(),z.dataTransfer.effectAllowed="copy",z.dataTransfer.setData("text/plain",N.display_name)},onDragEnd:z=>{let Q=m.current?.getBoundingClientRect();Q&&z.clientX>Q.right+24&&u(N)},onAuxClick:z=>{z.button===1&&u(N)},onClick:z=>W(N,z.metaKey||z.ctrlKey),className:k("flex w-full flex-col gap-0.5 rounded-md px-2 py-1.5 text-left hover:bg-state-hover",r.selectedId===N.id&&"bg-state-active"),children:[s("span",{className:"flex items-center gap-1.5",children:[e(Se,{priority:N.priority,manual:N.priority_manual}),e("span",{className:"truncate text-sm font-medium",children:N.display_name}),N.roles?.includes("supplier")?e("span",{className:"flex-none rounded-full border border-emerald-500/40 px-1.5 text-[10px] text-emerald-700 dark:text-emerald-300",title:"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u0437\u0430\u043A\u0443\u043F\u043E\u043A",children:"\u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A"}):null]}),s("span",{className:"flex items-center justify-between gap-2 text-[11px] text-muted-foreground",children:[s("span",{className:"truncate",children:[F(N.country_code),N.countries.length>1?` +${N.countries.length-1}`:""," \xB7 ",oe[N.status]??N.status]}),s("span",{className:"flex flex-none items-center gap-1.5",children:[N.coverage?s("span",{className:N.coverage.draft?"rounded border border-dashed border-[var(--mf-amber)] px-1 font-medium tabular-nums text-foreground":"rounded bg-[color-mix(in_oklab,var(--diff-added,#16a34a)_14%,transparent)] px-1 font-medium tabular-nums text-foreground",title:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u043E\u0433\u043E \u043B\u0438\u0441\u0442\u0430: ${N.coverage.by_volume}% \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443, ${N.coverage.by_positions}% \u043F\u043E \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C (${N.coverage.by==="pricelist"?"\u043F\u0440\u0430\u0439\u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":N.coverage.by==="distributor_site"?"\u0441\u0430\u0439\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438":`\u0441\u0430\u0439\u0442 STIHL ${N.coverage.country}`}${N.coverage.draft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u2014 \u043D\u0435 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D":""})${N.coverage.unchecked?` \xB7 ${N.coverage.unchecked} \u0432\u044B\u0431\u043E\u0440\u043E\u0432 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C`:""}`,children:[Math.round(N.coverage.by_volume),"%"]}):null,e(bo,{it:N})]})]})]})},N.id)),r.items.length<r.total&&e("li",{className:"px-2 py-2",children:e("button",{type:"button",disabled:r.loading,onClick:()=>{r.load(!0).catch(N=>console.error(C(N)))},className:"w-full rounded-md border border-border py-1 text-xs hover:bg-state-hover disabled:opacity-50",children:r.loading?"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026":`\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0435\u0449\u0451 (${r.total-r.items.length})`})})]}),p.peek?e(S2,{peek:p.peek,onKeep:p.keep,onLeave:p.leave,onClose:p.close,onBeside:N=>{p.close(),r.select(N.id),u(N)},onChat:N=>{p.close(),$(N)}}):null]})}function D({children:t}){return e("div",{role:"status",className:"px-3 py-2 text-xs text-muted-foreground",children:t})}var M2="manifest",bt=`${M2}/suppliers`,sa="sidebar.threadListProvider",xo="thread-list/thread-list",T2="__automatic__",ho="sidebar-tabs/tabs",R2="\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",E2="manifest:sidebar-previous-list",en="manifest:suppliers-list";async function A2(t){let{preferences:n}=await t.system.uiPreferences.list(),a=n[sa];return{value:typeof a.value=="string"?a.value:T2,revision:a.revision}}async function P2(t){let n=null;try{n=window.localStorage.getItem(E2)}catch{n=null}if(n&&n!==T2&&n!==bt)return n;try{let{plugins:a}=await t.plugins.list();if(a.some(o=>o.id==="sidebar-tabs"&&o.enabled))return ho}catch{}return xo}async function vo(t,n){for(let a=0;a<2;a++){let o=await A2(t),r=o.value===bt,L=n==="toggle"?!r:n==="on";if(L===r)return;let l;if(L){try{window.localStorage.setItem(E2,o.value)}catch{}l=bt}else l=await P2(t);try{await t.system.uiPreferences.set({key:sa,value:l,expectedRevision:o.revision});return}catch(i){if(a===1)throw i}}}var B2=()=>{window.dispatchEvent(new CustomEvent(en,{cancelable:!0,detail:"toggle"}))},tn=()=>{window.dispatchEvent(new CustomEvent(en,{cancelable:!0,detail:"on"}))},aa=!1;function I2(){let t=Ie();return w(()=>{let n=a=>{if(a.defaultPrevented||(a.preventDefault(),aa))return;aa=!0;let o=a.detail??"toggle";vo(t,o).catch(r=>console.warn("[manifest] \u0441\u043F\u0438\u0441\u043E\u043A \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432 \u043D\u0435 \u043F\u0435\u0440\u0435\u043A\u043B\u044E\u0447\u0438\u043B\u0441\u044F",r)).finally(()=>{aa=!1})};return window.addEventListener(en,n),()=>window.removeEventListener(en,n)},[t]),null}function O2({onNavigate:t,activeThreadId:n}){let a=Ie();return lt(()=>(document.documentElement.dataset.manifestSuppliers="on",()=>{delete document.documentElement.dataset.manifestSuppliers}),[]),w(()=>{let o=!0;return A2(a).then(async r=>{if(!o||r.value===bt)return;let L=await P2(a);L!==bt&&await a.system.uiPreferences.set({key:sa,value:L,expectedRevision:r.revision})}).catch(()=>{}),()=>{o=!1}},[a]),e("div",{"data-bb-plugin":M2,className:"h-full",children:e(ra,{children:e(Qt,{onNavigate:t,activeThreadId:n})})})}var ra=class extends Dn{state={error:null};static getDerivedStateFromError(n){return{error:n}}render(){return this.state.error?s("div",{role:"alert",className:"flex flex-col gap-2 px-3 py-2 text-sm text-muted-foreground",children:[s("span",{children:["\u0420\u0435\u0435\u0441\u0442\u0440 \u043D\u0435 \u043E\u0442\u0440\u0438\u0441\u043E\u0432\u0430\u043B\u0441\u044F: ",this.state.error.message]}),e("button",{type:"button",onClick:()=>this.setState({error:null}),className:"self-start rounded-md border border-border px-2 py-1 text-xs text-foreground hover:bg-state-hover",children:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C"})]}):this.props.children}};var xt="dashboard",$2="dashboard",Ve="manifest-registry-changed",yo="manifest-topic-filter";function Me(t){let n={};for(let[a,o]of Object.entries(t))o==null||o===""||Array.isArray(o)&&o.length===0||(n[a]=o);return n}function D2(t){let n=ee(),[a,o]=f({}),[r,L]=f(null);w(()=>{if(o({}),L(null),!t)return;let i=!0;return n.call("topic_filter_get",{threadId:t}).then(m=>i&&o(m.filter),m=>i&&L(C(m))),()=>{i=!1}},[n,t]),se(yo,i=>{let m=i;t&&m?.threadId===t&&m.filter&&typeof m.filter=="object"&&o(m.filter)});let l=R(async i=>{let m=Me(i);if(o(m),!!t)try{await n.call("topic_filter_set",{threadId:t,filter:m})}catch(u){L(C(u))}},[n,t]);return{filter:a,setFilter:l,error:r}}var oa=new Set;function Z2(t,n,a){let o=Jn(),r=Me(n),L=JSON.stringify(r);w(()=>{let l=L==="{}",i=Yn(t,l?null:{filter:JSON.parse(L),label:a,key:L});!l&&!oa.has(t)&&(oa.add(t),tn()),i&&o()},[L,a,o,t]),w(()=>()=>{t===""&&(oa.delete(t),Yn(t,null)&&o())},[o,t])}function F2(t){let n=E(),a=ee(),{status:o}=H(),[r,L]=f({metrics:null,queue:null,feed:[],seenAt:null,loading:!0,error:null}),l=j(0),i=j(void 0),m=JSON.stringify(t),u=!!o?.connected&&o.canView&&o.canWork,p=R(async()=>{if(!u)return;let b=++l.current;L(c=>({...c,loading:!0}));try{i.current===void 0&&(i.current=(await a.call("seen_get",null)).at,a.call("seen_set",{at:new Date().toISOString()}));let c=JSON.parse(m),h=i.current??new Date(Date.now()-7*864e5).toISOString(),[v,d,x]=await Promise.all([n("outreach_metrics",{filter:c}),n("outreach_queue",{filter:c,per_group:15}),n("outreach_feed",{filter:c,since:h,limit:30})]);if(b!==l.current)return;L({metrics:v,queue:d,feed:x.items,seenAt:i.current??null,loading:!1,error:null})}catch(c){if(b!==l.current)return;L(h=>({...h,loading:!1,error:C(c)}))}},[m,u,a,n]);w(()=>{p()},[p]);let g=j(null);return se(Ve,()=>{g.current&&clearTimeout(g.current),g.current=setTimeout(()=>{p()},400)}),{...r,reload:p,ready:u}}function H2(){let t=E(),[n,a]=f([]),o=R(()=>{t("outreach_segments",{}).then(r=>a(r.items),()=>a([]))},[t]);return w(o,[o]),se(Ve,o),{segments:n,reload:o}}var nn=null,ca=new Set,La=null,an=null,la=!1,ia=0,_o=t=>(ca.add(t),()=>ca.delete(t));function z2(){let t=it(_o,()=>nn,()=>nn),n=E(),{status:a}=H(),o=!!a?.connected&&a.canView&&a.canWork,r=R(async()=>{if(o&&!(la||Date.now()-ia<5e3)){la=!0;try{let L=await n("outreach_metrics",{filter:{}});nn=L.checks.waiting_reply+L.checks.overdue}catch{nn=null}finally{la=!1,ia=Date.now()}ca.forEach(L=>L())}},[o,n]);return w(()=>{an=r,r();let L=setInterval(()=>{r()},10*6e4);return()=>{clearInterval(L),an===r&&(an=null)}},[r]),se(Ve,()=>{La&&clearTimeout(La),La=setTimeout(()=>{ia=0,an?.()},1500)}),t}var da="manifest:compose-intent";var ht="manifest:compose-intent";function rn(t,n,a){try{window.sessionStorage.setItem(da,JSON.stringify({kind:t,id:n,title:a,at:Date.now()}))}catch{}window.dispatchEvent(new Event(ht))}function ua(){try{let t=JSON.parse(window.sessionStorage.getItem(da)??"null");return t&&["company","mailing","template","topic","inbound","mail","needs"].includes(t.kind)&&Date.now()-t.at<18e5?t:null}catch{return null}}function ma(){try{window.sessionStorage.removeItem(da)}catch{}window.dispatchEvent(new Event(ht))}var pa="manifest:last-thread",fa="manifest:last-dashboard-thread",j2="manifest:rail-redirect-at",ga="manifest:last-mail-hub-thread",ba="manifest:last-needs-thread";function U2(t,n=!1,a=!1,o=!1){try{window.sessionStorage.setItem(pa,t),n&&window.sessionStorage.setItem(fa,t),a&&window.sessionStorage.setItem(ga,t),o&&window.sessionStorage.setItem(ba,t)}catch{}}function K2(t="outreach"){try{let n=Number(window.sessionStorage.getItem(j2)??0);if(Date.now()-n<3e3)return;window.sessionStorage.setItem(j2,String(Date.now()));let a={outreach:pa,dashboard:fa,mail:ga,needs:ba}[t];return window.sessionStorage.getItem(a)}catch{return null}}function G2(t){try{for(let n of[pa,fa,ga,ba])window.sessionStorage.getItem(n)===t&&window.sessionStorage.removeItem(n)}catch{}}var Te="mail",q2="mail",We={potential_supplier:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",supplier:"\u041F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",potential_client:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043A\u043B\u0438\u0435\u043D\u0442\u044B",client:"\u041A\u043B\u0438\u0435\u043D\u0442\u044B"},sn={first:"\u041F\u0435\u0440\u0432\u043E\u0435 \u043F\u0438\u0441\u044C\u043C\u043E",follow_up:"\u041F\u043E\u0432\u0442\u043E\u0440\u043D\u043E\u0435",reply:"\u041E\u0442\u0432\u0435\u0442",other:"\u0414\u0440\u0443\u0433\u043E\u0435"},on={reply:"\u041E\u0442\u0432\u0435\u0442",auto_reply:"\u0410\u0432\u0442\u043E\u043E\u0442\u0432\u0435\u0442",bounce:"\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430",unsubscribe:"\u041E\u0442\u043F\u0438\u0441\u043A\u0430",other:"\u041F\u0440\u043E\u0447\u0435\u0435"};function Re({label:t,children:n,hint:a}){return s("label",{className:"flex flex-col gap-1 text-xs",children:[e("span",{className:"text-muted-foreground",children:t}),n,a?e("span",{className:"text-[11px] text-muted-foreground",children:a}):null]})}var Ne="h-8 rounded-md border border-input bg-transparent px-2 text-xs",V2="min-h-24 rounded-md border border-input bg-transparent px-2 py-1.5 text-xs font-mono";function Ln({html:t,className:n,style:a}){return e("iframe",{title:"\u041F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u043F\u0438\u0441\u044C\u043C\u0430",sandbox:"",srcDoc:t,style:a,className:k("w-full rounded-md border border-border bg-white",n)})}function Ye({value:t,onChange:n,placeholder:a}){let o=E(),[r,L]=f(""),[l,i]=f([]),[m,u]=f(null);return w(()=>{if(r.trim().length<2){i([]);return}let p=setTimeout(()=>{o("outreach_list_companies",{q:r.trim(),limit:8}).then(g=>i(g.items),g=>u(C(g)))},250);return()=>clearTimeout(p)},[r,o]),t?s("span",{className:"flex items-center gap-2 text-xs",children:[e("span",{className:"font-medium",children:t.name}),e("button",{type:"button",className:"text-muted-foreground underline-offset-2 hover:underline",onClick:()=>n(null),children:"\u0441\u043C\u0435\u043D\u0438\u0442\u044C"})]}):s("div",{className:"relative",children:[e(G,{className:"h-8 text-xs",placeholder:a??"\u041D\u0430\u0439\u0442\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E\u2026",value:r,onChange:p=>L(p.target.value)}),m?e("p",{className:"text-[11px] text-destructive",children:m}):null,l.length>0?e("ul",{className:"absolute z-10 mt-1 max-h-60 w-full overflow-y-auto rounded-md border border-border bg-popover text-xs shadow",children:l.map(p=>e("li",{children:s("button",{type:"button",className:"flex w-full justify-between gap-2 px-2 py-1 text-left hover:bg-state-hover",onClick:()=>{n({id:p.id,name:p.display_name}),L(""),i([])},children:[e("span",{className:"truncate",children:p.display_name}),e("span",{className:"text-muted-foreground",children:F(p.country_code)})]})},p.id))}):null]})}var xa="needs",W2="needs",vt={kind:"needs",id:"sheet",title:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442"},cn="manifest:open-source",ln=null;function Y2(t){ln=t;let n=new CustomEvent(cn,{cancelable:!0,detail:t});return window.dispatchEvent(n),n.defaultPrevented&&(ln=null),n.defaultPrevented}function J2(){let t=ln;return ln=null,t}var va="manifest-focus-changed",ya="object",yt="object-beside",_t="company-beside",X={company:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F",mailing:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430",template:"\u0428\u0430\u0431\u043B\u043E\u043D",topic:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",inbound:"\u0412\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E",mail:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",needs:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442"},No={company:"\u0410\u0443\u0442\u0440\u0438\u0447",mailing:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430",template:"\u0428\u0430\u0431\u043B\u043E\u043D",topic:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434",inbound:"\u041F\u0438\u0441\u044C\u043C\u043E",mail:"\u041F\u043E\u0447\u0442\u0430",needs:"\u0417\u0430\u043A\u0443\u043F\u043A\u0438"};function dn(t){let n=ee(),[a,o]=f(void 0),[r,L]=f([]),[l,i]=f(null),m=j(0),u=R(()=>{let c=++m.current;n.call("focus_get",{threadId:t}).then(h=>{c===m.current&&(o(h.focus),L(h.trail),i(null))},h=>c===m.current&&i(C(h)))},[n,t]);w(()=>{o(void 0),u()},[u]),se(va,c=>{let h=c;h?.threadId===t&&(m.current++,o(h.focus??null),L(Array.isArray(h.trail)?h.trail:[]))});let p=R(async c=>{let h=await n.call("focus_set",{threadId:t,focus:c});o(h.focus),L(h.trail)},[n,t]),g=R(async c=>{let h=await n.call("focus_back",{threadId:t,kind:c.kind,id:c.id});o(h.focus),L(h.trail)},[n,t]),b=R(async c=>{let h=await n.call("focus_forget",{threadId:t,kind:c.kind,id:c.id});o(h.focus),L(h.trail)},[n,t]);return{focus:a,trail:r,error:l,setFocus:p,back:g,forget:b,reload:u}}function Je(){let t=ae();return R(n=>t.openThreadPanel({actionId:ya,title:n?n.slice(0,60):"Manifest",params:{v:1}}),[t])}function Q2(){let t=Ie(),n=ee(),a=ae();return R(async(o,r)=>{let{sectionId:L}=await n.call("section_ensure",null).catch(()=>({sectionId:null})),l={focus:{...o}};o.kind==="company"&&Object.assign(l,{companyId:o.id,companyName:o.title});let i=await t.threads.spawn({...r,title:`${No[o.kind]}: ${o.title||X[o.kind]}`.slice(0,120),pluginMetadata:l,...L?{sectionId:L}:{}});return await n.call("focus_set",{threadId:i.id,focus:o}),o.kind==="company"&&await n.call("chat_link",{companyId:o.id,threadId:i.id}),a.toThread(i.id),i.id},[a,n,t])}function le(){let t=ee(),n=ae();return R(async a=>{let{chats:o}=a.id?await t.call("chats_list",{kind:a.kind,id:a.id}).catch(()=>({chats:[]})):{chats:[]},r=o[0];if(r){await t.call("focus_set",{threadId:r.threadId,focus:{...a,title:a.title.slice(0,200)}}),n.toThread(r.threadId);return}rn(a.kind,a.id,a.title);let{sectionId:L}=await t.call("section_ensure",null).catch(()=>({sectionId:null}));n.toCompose({focusPrompt:!0,...L?{placement:{sectionId:L,pinned:!1}}:{}})},[n,t])}function Xt(){let t=le(),n=E();return R((a,o="")=>{(async()=>{let r=o;r||(r=await n("outreach_get_company",{id:a}).then(L=>L?.company?.display_name??"",()=>"")),await t({kind:"company",id:a,title:r})})()},[t,n])}var ha="manifest:open-beside";function X2(t,n,a){let o={v:1,pin:{kind:n.kind,id:n.id,title:n.title.slice(0,200)}},r=(n.title||X[n.kind]).slice(0,60);for(let L of a)if(t.openThreadPanel({actionId:L,title:r,params:o}))return!0;return!1}function un(t){let n=ae();w(()=>{let a=o=>{let r=o.detail;o.defaultPrevented||!r||r.threadId!==t||X2(n,r.ref,t?[yt]:[_t])&&o.preventDefault()};return window.addEventListener(ha,a),()=>window.removeEventListener(ha,a)},[n,t])}function _e(){let t=ae();return R((n,a)=>{if(a!==void 0){let o=new CustomEvent(ha,{cancelable:!0,detail:{ref:n,threadId:a}});if(window.dispatchEvent(o),o.defaultPrevented)return!0}return X2(t,n,a===null?[_t,yt]:[yt,_t])},[t])}function Qe(){let t=ee(),n=ae();return R(async a=>{let o=K2(a);if(o===void 0)return"stay";if(!o)return"none";let{alive:r}=await t.call("thread_alive",{threadId:o}).catch(()=>({alive:!1}));return r?(n.toThread(o),"thread"):(G2(o),"none")},[n,t])}function Xe(t){return new Promise((n,a)=>{let o=new FileReader;o.onload=()=>n(o.result),o.onerror=()=>a(o.error??new Error("\u0444\u0430\u0439\u043B \u043D\u0435 \u043F\u0440\u043E\u0447\u0438\u0442\u0430\u043D")),o.readAsArrayBuffer(t)})}function et(t){let n="",a=new Uint8Array(t);for(let o=0;o<a.length;o+=32768)n+=String.fromCharCode(...a.subarray(o,o+32768));return btoa(n)}function wo(t){return t.source_kind?t.source_kind==="stihl_country"?`\u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0439: \u0441\u0430\u0439\u0442 STIHL ${F(t.country??"")}`:`\u043B\u0438\u0447\u043D\u044B\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433${t.draft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A":""}`:""}function ko(t){if(t.kind==="file")return`\u0444\u0430\u0439\u043B \xB7 ${er(t.size??0)}`;let n=wo(t),a;t.scope==="catalog"?a=t.catalog?`\u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435 (${n})`:"\u0432\u0435\u0441\u044C \u043B\u0438\u0441\u0442 \u2014 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u043D\u0435\u0442":a=n?`\u0432\u0435\u0441\u044C \u043B\u0438\u0441\u0442, \u0441 \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0430\u043C\u0438 (${n})`:"\u0432\u0435\u0441\u044C \u043B\u0438\u0441\u0442";let o=[`${t.rows} \u043F\u043E\u0437.`,a];return t.fallback&&t.source!=="auto"&&o.push(t.source==="own"?"\u043B\u0438\u0447\u043D\u043E\u0433\u043E \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u043D\u0435\u0442":"\u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u043E\u0433\u043E \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u043D\u0435\u0442"),t.no_qty&&o.push("\u0431\u0435\u0437 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430"),o.join(" \xB7 ")}function er(t){return t<1024*1024?`${Math.max(1,Math.round(t/1024))} \u041A\u0411`:`${(t/1024/1024).toFixed(1).replace(".",",")} \u041C\u0411`}function Co(t,n,a){let o=atob(a),r=new Uint8Array(o.length);for(let i=0;i<o.length;i++)r[i]=o.charCodeAt(i);let L=URL.createObjectURL(new Blob([r],{type:n})),l=document.createElement("a");l.href=L,l.download=t,document.body.appendChild(l),l.click(),l.remove(),setTimeout(()=>URL.revokeObjectURL(L),1e4)}function mn({sheets:t,companyId:n,messageId:a}){let o=E(),[r,L]=f(null);if(!t.length)return null;let l=async i=>{L(null);try{let m=await o("mail_file",{...a?{message_id:a}:{company_id:n},position:i});Co(m.filename,m.content_type,m.content_base64)}catch(m){L(C(m))}};return s("ul",{className:"flex flex-col gap-1","aria-label":"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F",children:[t.map((i,m)=>s("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5 rounded-md border border-[var(--mf-line-300)] bg-[var(--mf-surface)] px-2 py-1 text-xs",children:[e("span",{"aria-hidden":!0,children:"\u{1F4CE}"}),e("span",{className:"font-medium",children:i.filename}),e("span",{className:"text-muted-foreground",children:ko(i)}),e("button",{type:"button",className:"ml-auto text-[11px] underline",onClick:()=>{l(m)},children:"\u0421\u043A\u0430\u0447\u0430\u0442\u044C"})]},m)),r?e("li",{role:"alert",className:"text-[11px] text-destructive",children:r}):null]})}var Nt=t=>t?.find(n=>n.kind!=="file")?.available;function tt({specs:t,busy:n,onChange:a,available:o,inherit:r}){let L=E(),l=j(null),[i,m]=f(!1),[u,p]=f(null),g=t.find($=>$.kind==="procurement_sheet"),b=t.filter($=>$.kind==="file"),c=r?"inherit":g?.scope??"",h=g?.source??"auto",v=$=>({kind:"file",file_id:$.file_id}),d=($,M)=>[...$?[$]:[],...M.map(v)],x=$=>{let M={kind:"procurement_sheet",scope:g?.scope??"catalog",source:h,...$};$.no_qty??g?.no_qty?M.no_qty=!0:delete M.no_qty,a(d(M,b))},_=async $=>{if(p(null),$.size>7*1024*1024){p("\u0444\u0430\u0439\u043B \u0431\u043E\u043B\u044C\u0448\u0435 7 \u041C\u0411 \u2014 \u0448\u043B\u044E\u0437 \u043D\u0435 \u0432\u043E\u0437\u044C\u043C\u0451\u0442 \u0435\u0433\u043E \u0432 \u043F\u0438\u0441\u044C\u043C\u043E");return}m(!0);try{let M=et(await Xe($)),W=await L("mail_file_upload",{filename:$.name,content_base64:M,...$.type?{content_type:$.type}:{}});a(d(g??null,[...b.filter(N=>N.file_id!==W.id),{kind:"file",file_id:W.id}]))}catch(M){p(C(M))}finally{m(!1)}},y=$=>!o||o.includes($),I="h-7 rounded-md border border-input bg-background px-2 text-xs disabled:opacity-60",T=n||i;return s("div",{className:"flex flex-col gap-1 text-xs",role:"group","aria-label":"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435",children:[s("div",{className:"flex flex-wrap items-center gap-1.5",children:[e("span",{className:"text-muted-foreground",children:"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435:"}),s("select",{className:I,value:c,disabled:T,"aria-label":"\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u0435 \u043F\u0438\u0441\u044C\u043C\u0430",onChange:$=>{let M=$.target.value;M==="inherit"?a(null):M?x({scope:M}):a(d(null,b))},children:[r!==void 0?e("option",{value:"inherit",children:"\u043A\u0430\u043A \u0443 \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0438"}):null,e("option",{value:"",children:b.length?"\u0431\u0435\u0437 RFQ":"\u0431\u0435\u0437 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F"}),e("option",{value:"catalog",children:"RFQ \u2014 \u0447\u0442\u043E \u0435\u0441\u0442\u044C \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435"}),e("option",{value:"all",children:"RFQ \u2014 \u0432\u0435\u0441\u044C \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442"})]}),g&&!r?s(P,{children:[s("select",{className:I,value:h,disabled:T,"aria-label":"\u041A\u0430\u0442\u0430\u043B\u043E\u0433",onChange:$=>x({source:$.target.value}),children:[e("option",{value:"auto",children:"\u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u043A\u0430\u043A \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435"}),s("option",{value:"country",children:["\u0440\u0435\u0433\u0438\u043E\u043D\u0430\u043B\u044C\u043D\u044B\u0439 (\u0441\u0430\u0439\u0442 STIHL \u0441\u0442\u0440\u0430\u043D\u044B)",y("country")?"":" \u2014 \u043D\u0435\u0442"]}),s("option",{value:"own",children:["\u043B\u0438\u0447\u043D\u044B\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",y("own")?"":" \u2014 \u043D\u0435\u0442"]})]}),s("select",{className:I,value:g.no_qty?"no":"yes",disabled:T,"aria-label":"\u041A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E",onChange:$=>x({no_qty:$.target.value==="no"}),children:[e("option",{value:"yes",children:"\u0441 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u043E\u043C"}),e("option",{value:"no",children:"\u0431\u0435\u0437 \u043A\u043E\u043B\u0438\u0447\u0435\u0441\u0442\u0432\u0430"})]})]}):null,e("input",{ref:l,type:"file",className:"hidden","aria-label":"\u0424\u0430\u0439\u043B \u0432\u043E \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0435",onChange:$=>{let M=$.target.files?.[0];$.target.value="",M&&_(M)}}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:T||t.length>=5,onClick:()=>l.current?.click(),children:i?"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026":"+ \u0424\u0430\u0439\u043B"})]}),b.length?e("ul",{className:"flex flex-wrap gap-1","aria-label":"\u0424\u0430\u0439\u043B\u044B \u0432\u043E \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u0438",children:b.map($=>s("li",{className:"flex items-center gap-1 rounded-md border border-[var(--mf-line-300)] bg-[var(--mf-surface)] px-1.5 py-0.5",children:[e("span",{"aria-hidden":!0,children:"\u{1F4CE}"}),e("span",{className:"max-w-[14rem] truncate",title:$.filename,children:$.filename??"\u0444\u0430\u0439\u043B"}),$.size?e("span",{className:"text-muted-foreground",children:er($.size)}):null,e("button",{type:"button",className:"px-0.5 text-muted-foreground hover:text-destructive disabled:opacity-50",disabled:T,"aria-label":`\u0423\u0431\u0440\u0430\u0442\u044C ${$.filename??"\u0444\u0430\u0439\u043B"}`,onClick:()=>a(d(g??null,b.filter(M=>M.file_id!==$.file_id))),children:"\u2715"})]},$.file_id))}):null,u?e("span",{role:"alert",className:"text-[11px] text-destructive",children:u}):null]})}function tr({companyId:t,specs:n,available:a,onSaved:o}){let r=E(),[L,l]=f(!1),[i,m]=f(null);return s("div",{className:"flex flex-col gap-1",children:[e(tt,{specs:n,busy:L,available:a,onChange:async u=>{l(!0),m(null);try{o(await r("mail_draft_attachments",{company_id:t,attachments:u??[]}))}catch(p){m(C(p))}finally{l(!1)}}}),i?e("span",{role:"alert",className:"text-[11px] text-destructive",children:i}):null]})}var Fe=t=>t??[];var So="\u043D\u0435\u0442 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430";function pn(t){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(!1),[i,m]=f(null),u=j(0),p=R(()=>{if(!t||!a?.connected)return;let g=++u.current;n("mail_draft_get",{company_id:t}).then(b=>{g===u.current&&(r(b),l(!1),m(null))},b=>{if(g!==u.current)return;let c=C(b);c.includes(So)?(r(null),l(!0),m(null)):m(c)})},[t,a?.connected,n]);return w(()=>{r(null),l(!1),m(null)},[t]),w(p,[p]),fe(g=>{g===t&&p()}),{letter:o,none:L,error:i,reload:p,setLetter:r}}function nr(t){let n=t.split(`
2
+ `).reduce((a,o)=>a+Math.max(1,Math.ceil(o.length/90)),0);return Math.min(900,80+n*21)}function ar({letter:t,compact:n}){let a=t.draft,o=`${a.template_name?`\u041F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443 \xAB${a.template_name}\xBB${a.template_version?` v${a.template_version}`:""}`:"\u0411\u0435\u0437 \u0448\u0430\u0431\u043B\u043E\u043D\u0430"}${a.edited?" \xB7 \u0438\u0437\u043C\u0435\u043D\u0451\u043D":""} \xB7 ${a.updated_by} \xB7 ${q(a.updated_at)}`;return e(_a,{preview:t.preview,caption:o,compact:n,companyId:a.company_id})}function _a({preview:t,caption:n,compact:a,companyId:o}){let[r,L]=f("html");return s("div",{className:"mf-island mf-card flex flex-col gap-2 overflow-hidden p-0 text-xs",children:[s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 border-b border-[var(--mf-line-200)] bg-[#fbfcfb] px-3 py-2",children:[e("dt",{className:"text-muted-foreground",children:"\u041E\u0442"}),e("dd",{className:"truncate",children:t.from?`${t.from_name} <${t.from}>`:e("span",{className:"text-destructive",children:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D"})}),e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u043C\u0443"}),e("dd",{className:"truncate",children:t.to||e("span",{className:"text-destructive",children:"\u043D\u0435\u0442 email"})}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:t.subject})]}),s("div",{className:"flex flex-col gap-2 px-3 pb-3",children:[n?e("p",{className:"text-[11px] text-muted-foreground",children:n}):null,t.problems.length>0?e("ul",{className:"flex flex-col gap-0.5 rounded-md border border-[rgba(240,165,26,0.45)] bg-[rgba(240,165,26,0.08)] px-2 py-1",children:t.problems.map(l=>e("li",{children:s(J,{tone:"warning",children:["\u041D\u0435 \u0443\u0439\u0434\u0451\u0442: ",l]})},l))}):e(J,{tone:"ok",children:"\u0413\u043E\u0442\u043E\u0432\u043E \u043A \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435: \u0442\u0430\u043A \u043F\u0438\u0441\u044C\u043C\u043E \u0438 \u0443\u0439\u0434\u0451\u0442."}),t.attachments?.length?e(mn,{sheets:t.attachments,companyId:o}):null,e("div",{className:"flex gap-1",children:["html","text"].map(l=>e("button",{type:"button",onClick:()=>L(l),className:k("rounded-md px-2 py-0.5",r===l?"bg-state-active font-medium":"text-muted-foreground hover:bg-state-hover"),children:l==="html"?"\u041F\u0438\u0441\u044C\u043C\u043E":"\u0422\u0435\u043A\u0441\u0442\u043E\u0432\u0430\u044F \u0432\u0435\u0440\u0441\u0438\u044F"},l))}),r==="html"?e(Ln,{html:t.html,className:"w-full",style:{height:a?Math.min(420,nr(t.text)):nr(t.text)}}):e("pre",{className:"max-h-[480px] overflow-y-auto whitespace-pre-wrap rounded-md bg-muted/40 p-2 font-sans",children:t.text})]})]})}var Mo="manifest-letter-changed",To="manifest-inbound-changed";function rr(t){se(Mo,n=>{let a=n;typeof a?.id=="string"&&t(a.id,typeof a.companyId=="string"?a.companyId:null)})}function Na(t){let n=E(),[a,o]=f(null),[r,L]=f(null),l=R(()=>{t&&n("mail_message_get",{id:t}).then(i=>{o(i),L(null)},i=>L(C(i)))},[t,n]);return w(l,[l]),rr(i=>{i===t&&l()}),se(To,()=>l()),{letter:a,error:r,reload:l,setLetter:o}}function Ro(t){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(null),i=j(0),m=R(()=>{if(!t||!a?.connected||!a.canMail)return;let u=++i.current;n("mail_messages",{company_id:t,limit:50}).then(p=>{u===i.current&&(r(p?.items??[]),l(null))},p=>u===i.current&&l(C(p)))},[t,a?.canMail,a?.connected,n]);return w(m,[m]),fe(u=>{u===t&&m()}),rr((u,p)=>{p===t&&m()}),{items:o,error:L,reload:m}}function pe({primary:t,danger:n,disabled:a,onClick:o,children:r,title:L}){return e("button",{type:"button",title:L,disabled:a,onClick:o,className:k("h-7 rounded-md px-2.5 font-semibold disabled:cursor-not-allowed disabled:opacity-45 [@media(pointer:coarse)]:h-10",t?"bg-foreground text-background":n?"border border-[rgba(255,79,58,0.5)] bg-background text-destructive":"hover:bg-state-hover"),children:r})}function wa(){let{status:t}=H();return t?.connected?t.canSend?null:"\u043D\u0435\u0442 \u043F\u0440\u0430\u0432\u0430 \xAB\u0410\u0443\u0442\u0440\u0438\u0447: \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043F\u0438\u0441\u0435\u043C\xBB (outreach.send)":"\u043D\u0435\u0442 \u043F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u044F \u043A Manifest"}function fn({letter:t,companyId:n,onSent:a,compact:o}){let r=E(),L=wa(),[l,i]=f(null),m=l!==null,u=I=>i(I?t:null),[p,g]=f(!1),[b,c]=f(null);w(()=>{l&&!p&&l.fingerprint!==t.fingerprint&&(i(null),c("\u041F\u0438\u0441\u044C\u043C\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \u2014 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0435\u0433\u043E \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435."))},[p,l,t.fingerprint]);let v=(l??t).preview,d=t.preview.problems.length===0,x=!!v.sender?.legal_entity?.sandbox,_=async()=>{if(l){g(!0),c(null);try{let I=await r("mail_send",{company_id:n,expect_updated_at:l.draft.updated_at,fingerprint:l.fingerprint??""});u(!1),a?.(I)}catch(I){c(C(I))}finally{g(!1)}}},y=L??(d?null:`\u043D\u0435 \u0443\u0439\u0434\u0451\u0442: ${t.preview.problems[0]}`);return s("div",{className:"flex flex-col gap-1.5",children:[m?e(be,{title:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E?",actions:s(P,{children:[e(pe,{primary:!0,disabled:p,onClick:()=>{_()},children:p?"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C\u2026":"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C"}),e(pe,{disabled:p,onClick:()=>u(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u043C\u0443"}),e("dd",{className:"break-all",children:v.to}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:v.subject}),e("dt",{className:"text-muted-foreground",children:"\u041E\u0442 \u043A\u043E\u0433\u043E"}),s("dd",{className:"break-all",children:[v.from_name," \xB7 ",v.from]}),e("dt",{className:"text-muted-foreground",children:"\u041A\u0443\u0434\u0430"}),e("dd",{children:x?s(P,{children:[e(ce,{sandbox:!0})," \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u043C\u0443 \u0430\u0434\u0440\u0435\u0441\u0443 \u043D\u0435 \u0443\u0439\u0434\u0451\u0442"]}):"\u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0435\u043C\u0443 \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0443"}),e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u0433\u0434\u0430"}),e("dd",{children:"\u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u044E\u0440\u043B\u0438\u0446\u0430"})]})}):s("div",{className:"flex flex-wrap items-center gap-2",children:[e(pe,{primary:!0,disabled:!!y,title:y??void 0,onClick:()=>u(!0),children:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C"}),x?e(ce,{sandbox:!0}):null,y&&!o?e("span",{className:"text-[11px] text-muted-foreground",children:y}):null]}),b?e("p",{className:"text-[11px] text-destructive",children:b}):null]})}function ka({letter:t,onDone:n}){let a=E(),o=wa(),[r,L]=f(!1),[l,i]=f(!1),[m,u]=f(null);if(!t.cancellable)return null;let p=async()=>{i(!0),u(null);try{let g=await a("mail_message_cancel",{id:t.id});n?.(g),L(!1)}catch(g){u(C(g))}finally{i(!1)}};return s("div",{className:"flex flex-col gap-1.5",children:[r?e(be,{title:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E?",actions:s(P,{children:[e(pe,{danger:!0,disabled:l,onClick:()=>{p()},children:l?"\u041E\u0442\u043C\u0435\u043D\u044F\u0435\u043C\u2026":"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E"}),e(pe,{disabled:l,onClick:()=>L(!1),children:"\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C"})]}),children:s("span",{children:[t.to," \u2014 \u043F\u0438\u0441\u044C\u043C\u043E \u0441\u043D\u0438\u043C\u0435\u0442\u0441\u044F \u0438\u0437 \u043E\u0447\u0435\u0440\u0435\u0434\u0438. \u0415\u0441\u043B\u0438 \u043E\u043D\u043E \u0443\u0436\u0435 \u0443\u0445\u043E\u0434\u0438\u0442, \u043E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0438\u0442\u0441\u044F."]})}):e(pe,{disabled:!!o,title:o??void 0,onClick:()=>L(!0),children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"}),m?e("p",{className:"text-[11px] text-destructive",children:m}):null]})}function gn({letter:t,className:n}){let a=t.sent_at?` ${q(t.sent_at)}`:t.scheduled_at&&!t.final?` \xB7 \u0443\u0439\u0434\u0451\u0442 ~${q(t.scheduled_at)}`:"";return s("span",{className:k("inline-flex flex-wrap items-center gap-1.5",n),children:[s(J,{tone:t.tone,children:[t.status_text,a]}),t.replies.length>0?s(V,{tone:"volt",children:["\u043E\u0442\u0432\u0435\u0442",t.replies.length>1?`\u043E\u0432 ${t.replies.length}`:""]}):null,t.sandbox?e(ce,{sandbox:!0}):null]})}function Eo({id:t,onReply:n}){let{letter:a,error:o,setLetter:r}=Na(t);if(o)return e("p",{className:"text-destructive",children:o});if(!a)return e("p",{className:"text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"});let L=a.replies.filter(l=>l.kind==="reply").at(-1);return s("div",{className:"mf-card flex flex-col gap-2 overflow-hidden p-0 text-xs",children:[s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5 border-b border-[var(--mf-line-200)] bg-[#fbfcfb] px-3 py-2",children:[e("dt",{className:"text-muted-foreground",children:"\u041E\u0442"}),s("dd",{className:"truncate",children:[a.from_name," <",a.from,"> \xB7 ",a.legal_entity]}),e("dt",{className:"text-muted-foreground",children:"\u041A\u043E\u043C\u0443"}),e("dd",{className:"truncate",children:a.to}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:a.subject}),e("dt",{className:"text-muted-foreground",children:"\u0421\u0442\u0430\u0442\u0443\u0441"}),e("dd",{children:e(gn,{letter:a})})]}),s("div",{className:"flex flex-col gap-2 px-3 pb-3",children:[s("p",{className:"text-[11px] text-muted-foreground",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u043B ",a.created_by," \xB7 ",q(a.created_at),a.mailing_name?` \xB7 \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \xAB${a.mailing_name}\xBB`:""]}),e(ka,{letter:a,onDone:r}),e(mn,{sheets:a.attachments??[],messageId:a.id}),a.replies.map(l=>s("div",{title:"\u0422\u0435\u043A\u0441\u0442 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430 \u043A\u0430\u043A \u043F\u0440\u0438\u0448\u0451\u043B",className:"flex flex-col gap-1 rounded-md border border-[var(--mf-line-300)] bg-background p-2",children:[s("span",{className:"flex flex-wrap items-center gap-1.5",children:[e(V,{tone:l.kind==="reply"?"volt":"muted",children:l.kind==="reply"?"\u043E\u0442\u0432\u0435\u0442":l.kind==="auto_reply"?"\u0430\u0432\u0442\u043E\u043E\u0442\u0432\u0435\u0442":l.kind}),s("span",{className:"text-muted-foreground",children:[q(l.received_at)," \xB7 ",l.from_name||l.from]})]}),e("span",{className:"whitespace-pre-wrap",children:l.snippet})]},l.id)),L&&n?e("div",{children:e(pe,{primary:!0,onClick:()=>n(L.id),children:"\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C"})}):null,e("pre",{className:"max-h-[360px] overflow-y-auto whitespace-pre-wrap rounded-md bg-muted/40 p-2 font-sans",children:a.text})]})]})}function sr({companyId:t,onReply:n,focusId:a}){let{items:o,error:r}=Ro(t),[L,l]=f(a??null);return w(()=>{a&&l(a)},[a]),r?e("p",{className:"text-destructive",children:r}):o?o.length===0?e("p",{className:"text-muted-foreground",children:"\u041F\u0438\u0441\u0435\u043C \u0435\u0449\u0451 \u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u043B\u0438."}):e("ul",{className:"flex flex-col gap-1",children:o.map(i=>s("li",{className:"flex flex-col gap-1",children:[s("button",{type:"button",onClick:()=>l(L===i.id?null:i.id),className:k("flex min-w-0 flex-col gap-0.5 rounded-md border border-[var(--mf-line-300)] bg-background px-2 py-1.5 text-left hover:bg-state-hover",L===i.id&&"shadow-[inset_2px_0_0_var(--foreground)]"),children:[e("span",{className:"truncate font-medium",children:i.subject}),e(gn,{letter:i,className:"text-[11px]"})]}),L===i.id?e(Eo,{id:i.id,onReply:n}):null]},i.id))}):null}function bn(t){let n=t.progress;if(t.state==="draft"||!n)return{tone:t.skipped?"warning":t.ready?"ok":"muted",text:`\u0443\u0439\u0434\u0451\u0442 ${t.ready} \u0438\u0437 ${t.total}${t.skipped?` \xB7 \u043D\u0435 \u0443\u0439\u0434\u0451\u0442 ${t.skipped}`:""}`};let a=[`\u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E ${n.sent} \u0438\u0437 ${n.letters}`];return n.in_channel&&a.push(`\u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 ${n.in_channel}`),n.failed&&a.push(`\u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430 ${n.failed}`),n.cancelled&&a.push(`\u0441\u043D\u044F\u0442\u043E ${n.cancelled}`),n.unsubscribes&&a.push(`\u043E\u0442\u043F\u0438\u0441\u043A\u0430 ${n.unsubscribes}`),t.state==="sending"&&n.estimated_done_at&&a.push(`\u0437\u0430\u043A\u043E\u043D\u0447\u0438\u0442\u0441\u044F ~${q(n.estimated_done_at)}`),t.state==="stopped"&&a.push("\u043E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430"),{tone:t.state==="sending"?"info":n.failed?"warning":"ok",text:a.join(" \xB7 ")}}function Ca({m:t,className:n}){let a=t.progress;return a?e(Yt,{className:n,parts:[{tone:"ok",value:a.sent},{tone:"info",value:a.in_channel},{tone:"error",value:a.failed},{tone:"warning",value:a.cancelled+a.suppressed}]}):null}function xn({mailing:t,onChanged:n}){let a=E(),o=wa(),[r,L]=f(null),[l,i]=f(null),m=x=>{L(x),i(x==="send"?t:null)},[u,p]=f(!1),[g,b]=f(null);w(()=>{l&&!u&&(l.fingerprint!==t.fingerprint||l.ready!==t.ready||t.state!=="draft")&&(L(null),i(null),t.state==="draft"&&b("\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u0430\u0441\u044C \u2014 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0438\u0442\u0435 \u0435\u0451 \u0435\u0449\u0451 \u0440\u0430\u0437 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u044C\u0442\u0435."))},[u,l,t.fingerprint,t.ready,t.state]);let c=l??t,h=async(x,_)=>{p(!0),b(null);try{let y=await a(x,_);n?.(y),m(null)}catch(y){b(C(y))}finally{p(!1)}},v=c.mode==="sandbox";if(c.state==="draft"){let x=o??(c.ready===0?"\u043D\u0438 \u043E\u0434\u043D\u043E \u043F\u0438\u0441\u044C\u043C\u043E \u043D\u0435 \u0443\u0439\u0434\u0451\u0442":null);return s("div",{className:"flex flex-col gap-1.5",children:[r==="send"?e(be,{title:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C ${c.ready} ${Ao(c.ready,"\u043F\u0438\u0441\u044C\u043C\u043E","\u043F\u0438\u0441\u044C\u043C\u0430","\u043F\u0438\u0441\u0435\u043C")}?`,actions:s(P,{children:[e(pe,{primary:!0,disabled:u,onClick:()=>{h("mail_mailing_send",{id:c.id,expect:c.ready,fingerprint:c.fingerprint??""})},children:u?"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u0435\u043C\u2026":`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C ${c.ready}`}),e(pe,{disabled:u,onClick:()=>m(null),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:c.subject}),e("dt",{className:"text-muted-foreground",children:"\u041A\u0443\u0434\u0430"}),e("dd",{children:c.mode==="mixed"?s(P,{children:["\u0447\u0430\u0441\u0442\u044C \u043F\u0438\u0441\u0435\u043C \u2014 ",e(ce,{sandbox:!0}),", \u0447\u0430\u0441\u0442\u044C \u2014 \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C (\u0440\u0430\u0437\u043D\u044B\u0435 \u044E\u0440\u043B\u0438\u0446\u0430)"]}):e(P,{children:v?s(P,{children:[e(ce,{sandbox:!0})," \u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C \u043D\u0435 \u0443\u0439\u0434\u0451\u0442"]}):"\u043D\u0430\u0441\u0442\u043E\u044F\u0449\u0438\u043C \u0430\u0434\u0440\u0435\u0441\u0430\u0442\u0430\u043C"})}),e("dt",{className:"text-muted-foreground",children:"\u041E\u0442 \u043A\u043E\u0433\u043E"}),e("dd",{children:(c.senders??[]).map(_=>`${_.from_name||_.from} \u2014 ${_.letters}`).join(" \xB7 ")||"\u2014"}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u043F"}),e("dd",{children:v?"\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430: \u0441\u0435\u043A\u0443\u043D\u0434\u044B":"\u043F\u043E \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u044E\u0440\u043B\u0438\u0446\u0430, \u0434\u043E 20 \u043F\u0438\u0441\u0435\u043C \u0432 \u0434\u0435\u043D\u044C \u043D\u0430 \u0441\u0442\u0430\u0440\u0442\u0435"}),c.skipped?s(P,{children:[e("dt",{className:"text-muted-foreground",children:"\u041D\u0435 \u0443\u0439\u0434\u0443\u0442"}),e("dd",{children:e(J,{tone:"warning",children:c.skipped})})]}):null]})}):s("div",{className:"flex flex-wrap items-center gap-2",children:[s(pe,{primary:!0,disabled:!!x,title:x??void 0,onClick:()=>m("send"),children:["\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C ",c.ready]}),c.mode?e(ce,{sandbox:v||c.mode==="mixed"}):null]}),g?e("p",{className:"text-[11px] text-destructive",children:g}):null]})}let d=c.progress;return s("div",{className:"flex flex-col gap-1.5",children:[e(Ca,{m:c}),d?s("span",{className:"text-[11px] text-muted-foreground",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u043B ",d.sent_by," \xB7 ",d.sent_at?q(d.sent_at):"",d.stopped_at?` \xB7 \u043E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u043B ${d.stopped_by} ${q(d.stopped_at)}`:"",(d.senders??[]).length?` \xB7 ${d.senders.map(x=>`${x.from_name||x.from} \u2014 ${x.letters}`).join(", ")}`:""]}):null,c.state==="sending"?r==="stop"?e(be,{title:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443?",actions:s(P,{children:[e(pe,{danger:!0,disabled:u,onClick:()=>{h("mail_mailing_stop",{id:c.id})},children:u?"\u041E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0435\u043C\u2026":"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C"}),e(pe,{disabled:u,onClick:()=>m(null),children:"\u041D\u0435 \u043E\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C"})]}),children:s("span",{children:["\u041F\u0438\u0441\u044C\u043C\u0430, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u0435\u0449\u0451 \u043D\u0435 \u0443\u0448\u043B\u0438 (",d?.in_channel??0,"), \u0441\u043D\u0438\u043C\u0443\u0442\u0441\u044F. \u0423\u0448\u0435\u0434\u0448\u0438\u0435 \u043D\u0435 \u0432\u0435\u0440\u043D\u0443\u0442\u044C."]})}):e("div",{children:e(pe,{disabled:!!o,title:o??void 0,onClick:()=>m("stop"),children:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u0438\u0442\u044C"})}):null,g?e("p",{className:"text-[11px] text-destructive",children:g}):null]})}function Ao(t,n,a,o){let r=t%10,L=t%100;return r===1&&L!==11?n:r>=2&&r<=4&&(L<12||L>14)?a:o}var Po={company:"\u0437\u0430\u0434\u0430\u043D \u0434\u043B\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",default_audience:"\u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E \u0434\u043B\u044F \u0430\u0443\u0434\u0438\u0442\u043E\u0440\u0438\u0438",default:"\u043E\u0431\u0449\u0438\u0439 \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E",none:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D"};function or({companyId:t}){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(null),[i,m]=f(null),[u,p]=f(!1),g=!!a?.canManage,b=R(()=>{n("mail_company_sender",{company_id:t}).then(d=>{r(d),m(null)},d=>m(C(d)))},[t,n]);w(b,[b]),fe(d=>{d===t&&b()}),w(()=>{g&&n("mail_entities",{}).then(d=>l(d.items),()=>{})},[g,n]);let c=async d=>{let x=L?.flatMap(_=>_.senders).find(_=>_.id===d);p(!0);try{r(await n("mail_company_sender_set",{company_id:t,legal_entity_id:x?.legal_entity_id??"",sender_id:x?.id??""})),m(null)}catch(_){m(C(_))}finally{p(!1)}};if(!o)return e("p",{className:"text-xs text-muted-foreground",children:i??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let h=o.legal_entity&&"sandbox"in o.legal_entity?e(ce,{sandbox:o.legal_entity.sandbox}):null,v=o.sender?`${o.sender.display_name} <${o.sender.address}>${o.legal_entity?` \xB7 ${o.legal_entity.name}`:""}`:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D";return s("div",{className:"flex flex-col gap-1 text-xs",children:[s("div",{className:"flex min-w-0 items-center gap-2",title:`\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C ${Po[o.source]??o.source}`,children:[e("span",{className:"flex-none text-muted-foreground",children:"\u041F\u0438\u0448\u0435\u0442"}),g&&L?s("select",{className:`${Ne} min-w-0 flex-1`,disabled:u,value:o.source==="company"?o.sender?.id??"":"",onChange:d=>{c(d.target.value)},children:[e("option",{value:"",children:o.source==="company"?"\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E":`\u041F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E: ${v}`}),L.flatMap(d=>d.senders.map(x=>s("option",{value:x.id,children:[x.display_name," <",x.address,"> \xB7 ",d.name]},x.id)))]}):e("span",{className:"min-w-0 flex-1 truncate",children:v}),h]}),o.problem?s(J,{tone:"error",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u043A\u0430 \u043D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D\u0430: ",o.problem]}):null,i?e("p",{className:"text-destructive",children:i}):null,e(Io,{companyId:t,canEdit:g}),e(Bo,{companyId:t,canEdit:g})]})}function Bo({companyId:t,canEdit:n}){let a=E(),[o,r]=f(null),L=async l=>{r(null);try{await a("mail_reply_draft_create",{inbound_id:l})}catch(i){r(C(i))}};return s("div",{className:"mt-2 flex flex-col gap-2 border-t border-[var(--mf-line-200)] pt-2",children:[e("p",{className:"font-semibold",children:"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435"}),o?e("p",{className:"text-destructive",children:o}):null,e(sr,{companyId:t,onReply:n?l=>{L(l)}:void 0})]})}function Io({companyId:t,canEdit:n}){let a=E(),o=ae(),{letter:r,none:L,error:l,setLetter:i,reload:m}=pn(t),[u,p]=f(null),[g,b]=f(""),[c,h]=f(!1),[v,d]=f(null);w(()=>{!L||!n||a("mail_templates",{}).then(_=>{p(_.items),b(y=>y||_.items[0]?.id||"")},()=>p([]))},[n,L,a]);let x=async(_,y)=>{h(!0),d(null);try{let I=await a(_,y);_==="mail_draft_discard"?m():i(I)}catch(I){d(C(I))}finally{h(!1)}};return s("div",{className:"mt-2 flex flex-col gap-2 border-t border-[var(--mf-line-200)] pt-2",children:[e("p",{className:"font-semibold",children:"\u041F\u0438\u0441\u044C\u043C\u043E"}),l?e("p",{className:"text-destructive",children:l}):null,v?e("p",{className:"text-destructive",children:v}):null,r?s(P,{children:[e(ar,{letter:r,compact:!0}),n?e(tr,{companyId:t,specs:Fe(r.draft.attachments),available:Nt(r.preview.attachments),onSaved:_=>i(_)}):null,e(fn,{letter:r,companyId:t,onSent:()=>m()}),n?s("div",{className:"flex flex-wrap items-center gap-2",children:[e(S,{size:"sm",variant:"outline",className:"h-7",disabled:c,onClick:async()=>{h(!0),d(null);try{let _=await a("mail_mailing_create",{from_company:t});o.toPluginPanel(Te,{subPath:`mailing/${_.id}`})}catch(_){d(C(_))}finally{h(!1)}},children:"\u0420\u0430\u0437\u043E\u0441\u043B\u0430\u0442\u044C \u0438 \u0434\u0440\u0443\u0433\u0438\u043C"}),e("span",{className:"flex-1"}),e(S,{size:"sm",variant:"outline",className:"h-7 border-destructive/50 text-destructive",disabled:c,onClick:()=>{x("mail_draft_discard",{company_id:t})},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"})]}):null]}):L?n?u&&u.length===0?e("p",{className:"text-muted-foreground",children:"\u0428\u0430\u0431\u043B\u043E\u043D\u043E\u0432 \u043D\u0435\u0442."}):s("div",{className:"flex flex-wrap items-center gap-2",children:[e("select",{className:Ne,value:g,disabled:c||!u,onChange:_=>b(_.target.value),children:(u??[]).map(_=>s("option",{value:_.id,children:[_.name," \xB7 ",_.language]},_.id))}),e(S,{size:"sm",className:"h-7",disabled:c||!g,onClick:()=>{x("mail_draft_create",{company_id:t,template_id:g})},children:"\u041F\u043E\u0434\u0433\u043E\u0442\u043E\u0432\u0438\u0442\u044C \u043F\u0438\u0441\u044C\u043C\u043E"})]}):e("p",{className:"text-muted-foreground",children:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430 \u043D\u0435\u0442."}):e("p",{className:"text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"})]})}function nt(){let t=_e(),n=le();return R(a=>{Y2(a)||t(vt)||n(vt)},[t,n])}var Sa={pricelist:"\u043F\u0440\u0430\u0439\u0441 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",distributor_site:"\u0441\u0430\u0439\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"};function Oo(t,n){return t==="stihl_country"||!t?`\u043F\u043E \u0441\u0430\u0439\u0442\u0443 STIHL \u0441\u0442\u0440\u0430\u043D\u044B ${F(n)}`:`\u043F\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0443: ${Sa[t]??t}`}function Lr({companyId:t,website:n,canEdit:a}){let{status:o}=H(),r=E(),[L,l]=f(null),[i,m]=f([]),u=nt(),[p,g]=f(null),[b,c]=f(!1),h=j(null),v=R(async()=>{try{let y=await r("assortment_company",{company_id:t});l(y);let I=(y.sources??[]).map(T=>T.current).filter(T=>!!T&&!T.confirmed_at);m(await Promise.all(I.map(T=>r("assortment_preview",{id:T.id})))),g(null)}catch(y){g(C(y))}},[t,r]);w(()=>{v()},[v]),fe(y=>{y===t&&v()});let d=async(y,I)=>{c(!0),g(null);try{await r(y,I),await v()}catch(T){g(C(T))}finally{c(!1)}},x=async y=>{await d("assortment_company_file",{company_id:t,filename:y.name,content_base64:et(await Xe(y))})};if(!o?.canAssortment)return null;if(!L)return e("p",{className:"text-xs text-muted-foreground",children:p??"\u2026"});let _=(L.sources??[]).filter(y=>y.current?.confirmed_at);return s("div",{className:"flex flex-col gap-2 text-xs",children:[L.coverage?s("p",{children:["\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430: ",s("b",{className:"tabular-nums",children:[Math.round(L.coverage.by_volume),"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7"," ",s("b",{className:"tabular-nums",children:[Math.round(L.coverage.by_positions),"%"]})," \u043F\u043E\u0437\u0438\u0446\u0438\u0439",s("span",{className:"text-muted-foreground",children:[" \u2014 ",Oo(L.by,L.country)]}),L.draft?e(V,{tone:"warn",className:"ml-1.5",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null]}):e("p",{className:"text-muted-foreground",children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430: \u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445 \u2014 \u0441\u0430\u0439\u0442\u0430 STIHL \u0443 \u0435\u0451 \u0441\u0442\u0440\u0430\u043D \u043D\u0435\u0442, \u0441\u0432\u043E\u0435\u0433\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u0442\u043E\u0436\u0435."}),_.map(y=>s("p",{className:"text-muted-foreground",children:[Sa[y.kind]??y.kind,": ",y.current.products," \u0442\u043E\u0432., \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0451\u043D ",q(y.current.confirmed_at),y.base_url?s(P,{children:[" \xB7 ",e("a",{href:y.base_url,target:"_blank",rel:"noreferrer",className:"hover:underline",children:y.base_url.replace(/^https?:\/\//,"")})]}):null," \xB7 ",e("button",{type:"button",className:"text-foreground underline-offset-2 hover:underline",onClick:()=>u(y.id),children:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})]},y.id)),i.map(y=>s("div",{className:"rounded-md border border-[var(--mf-amber)] bg-[color-mix(in_oklab,var(--mf-amber)_8%,white)] p-2",role:"group","aria-label":"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0430",children:[s("div",{className:"flex flex-wrap items-center gap-1.5",children:[e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}),s("span",{children:[Sa[y.kind]??y.kind,": ",y.snapshot.products," \u0442\u043E\u0432., \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u043E \u0434\u043B\u044F \u043B\u0438\u0441\u0442\u0430 ",y.recognized]})]}),e("p",{className:"mt-1 text-[11px] text-muted-foreground",children:"\u0423\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438 \u043D\u0430 \u043A\u0430\u0440\u0442\u0435. \u0421\u043E\u0441\u0442\u0430\u0432, \xAB\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\xBB \u0438 \xAB\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C\xBB \u2014 \u0432 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445\xBB."}),s("p",{className:"mt-1",children:["\u041F\u043E \u043D\u0435\u043C\u0443 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 ",s("b",{className:"tabular-nums",children:[Math.round(y.coverage.by_volume),"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7"," ",s("b",{className:"tabular-nums",children:[Math.round(y.coverage.by_positions),"%"]})," \u043F\u043E\u0437\u0438\u0446\u0438\u0439",y.current?s("span",{className:"text-muted-foreground",children:[" (\u0431\u0435\u0437 \u043D\u0435\u0433\u043E \u2014 ",Math.round(y.current.by_volume),"% \u043F\u043E \u0441\u0442\u0440\u0430\u043D\u0435)"]}):e("span",{className:"text-muted-foreground",children:" (\u0431\u0435\u0437 \u043D\u0435\u0433\u043E \u2014 \u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445)"})]}),s("p",{className:"mt-0.5 text-[11px] text-muted-foreground",children:[y.origin?`${y.origin} \xB7 `:"",y.snapshot.created_by," \xB7 ",q(y.snapshot.finished_at)]}),y.unknown?.length?s("p",{className:"mt-0.5 truncate text-[11px] text-muted-foreground",title:y.unknown.join(`
3
+ `),children:["\u0411\u0435\u0437 \u043C\u043E\u0434\u0435\u043B\u0438: ",y.unknown.slice(0,3).join("; "),y.unknown.length>3?"\u2026":""]}):null,e("div",{className:"mt-1.5",children:e(S,{size:"sm",variant:"outline",className:"h-7 border-[var(--mf-amber)] px-2",onClick:()=>u(y.source_id),children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})})]},y.snapshot.id)),p?e("p",{role:"alert",className:"text-destructive",children:p}):null,a?s("div",{className:"flex flex-wrap items-center gap-1.5",children:[e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:b,onClick:()=>h.current?.click(),children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043F\u0440\u0430\u0439\u0441"}),e("input",{ref:h,type:"file",accept:".xlsx,.csv",className:"hidden","aria-label":"\u0424\u0430\u0439\u043B \u043F\u0440\u0430\u0439\u0441\u0430",onChange:y=>{let I=y.target.files?.[0];y.target.value="",I&&x(I)}}),s("span",{className:"text-[11px] text-muted-foreground",children:["\u0438\u043B\u0438 \u043F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0432 \u0447\u0430\u0442\u0435: \xAB\u043D\u0430\u0439\u0434\u0438 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 STIHL \u043D\u0430 ",n?`\u0441\u0430\u0439\u0442\u0435 ${n.replace(/^https?:\/\//,"")}`:"\u0441\u0430\u0439\u0442\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"," \u0438 \u0441\u0434\u0435\u043B\u0430\u0439 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\xBB"]})]}):null]})}function wt({companyId:t,header:n,embedded:a}){let{status:o}=H(),r=E(),[L,l]=f(null),[i,m]=f(null),[u,p]=f(!1),g=R(async()=>{if(t)try{l(await r("outreach_get_company",{id:t})),m(null)}catch(d){m(C(d))}},[t,r]);w(()=>{l(null),o?.connected&&o.canView&&g()},[g,o?.connected,o?.canView]),fe(d=>{d===t&&g()});let b=R(async(d,x)=>{p(!0),m(null);try{return l(await r(d,x)),!0}catch(_){return m(C(_)),!1}finally{p(!1)}},[r]);if(!t)return e(D,{children:"\u0412\u044B\u0431\u0435\u0440\u0438\u0442\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E \u0432 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u0441\u043B\u0435\u0432\u0430."});if(o&&!o.connected)return e(D,{children:o.message});if(o&&!o.canView)return e(D,{children:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443 (outreach.view)."});if(!L)return e(D,{children:i?`\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ${i}`:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443\u2026"});let c=L.company,h=!!o?.canManage,v=new Map(L.persons.map(d=>[d.id,d.full_name]));return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col gap-2 overflow-y-auto px-3 py-3 text-sm",children:[n,s("div",{className:"flex flex-col gap-1",children:[a?null:s(P,{children:[e(Le,{children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("h2",{className:"m-0 text-base font-bold leading-snug",children:c.display_name})]}),s("div",{className:"flex flex-wrap items-center gap-1.5 text-xs text-muted-foreground",children:[e(V,{tone:Jt[c.status]??"muted",children:oe[c.status]??c.status}),c.roles?.includes("supplier")?s(V,{tone:c.supplier_active===!1?"muted":"ok",children:["\u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A",c.supplier_active===!1?" \xB7 \u043D\u0435\u0430\u043A\u0442\u0438\u0432\u0435\u043D":""]}):null,s("span",{children:[y2[c.kind]??c.kind," \xB7 ",F(c.country_code)," \xB7 ",ve(c.region)]})]})]}),i&&e("p",{role:"alert",className:"rounded-md border border-destructive/40 bg-background px-2 py-1 text-xs text-destructive",children:i}),s(we,{title:"\u0420\u0430\u0431\u043E\u0442\u0430",children:[h?e("div",{className:"@container",children:s("div",{className:"grid gap-2 @[26rem]:grid-cols-2",children:[e(vn,{label:"\u041F\u0440\u0438\u043E\u0440\u0438\u0442\u0435\u0442",children:s("span",{className:"flex items-center gap-1.5",title:`\u0430\u0432\u0442\u043E P${c.priority_auto}: ${Xn[c.priority_reason]??c.priority_reason}`,children:[e(Se,{priority:c.priority,manual:c.priority_manual!=null}),s("select",{className:`${He} min-w-0 flex-1`,value:c.priority_manual??"",disabled:u,onChange:d=>{b("outreach_update_company",d.target.value?{id:c.id,priority_manual:Number(d.target.value),expected_updated_at:c.updated_at}:{id:c.id,clear_priority_manual:!0,expected_updated_at:c.updated_at})},children:[s("option",{value:"",children:["\u0410\u0432\u0442\u043E \xB7 P",c.priority_auto]}),[1,2,3,4,5].map(d=>s("option",{value:d,children:["P",d," \u0432\u0440\u0443\u0447\u043D\u0443\u044E"]},d))]})]})}),e(Fo,{status:c.status,reason:c.status_reason,busy:u,onSave:(d,x)=>b("outreach_update_company",{id:c.id,status:d,status_reason:x,expected_updated_at:c.updated_at})})]})}):s("p",{className:"flex items-center gap-2",title:`\u0430\u0432\u0442\u043E P${c.priority_auto}: ${Xn[c.priority_reason]??c.priority_reason}`,children:[e(Se,{priority:c.priority,manual:c.priority_manual!=null}),oe[c.status]??c.status]}),h&&c.roles?e($o,{roles:c.roles,currency:c.supplier_currency??"INR",active:c.supplier_active!==!1,busy:u,onSave:d=>b("outreach_update_company",{id:c.id,...d,expected_updated_at:c.updated_at})}):null,c.status_reason&&s("p",{className:"text-xs text-muted-foreground",children:["\u041F\u0440\u0438\u0447\u0438\u043D\u0430: ",c.status_reason]}),c.do_not_contact&&s("p",{className:"text-xs text-destructive",children:["\u041D\u0435 \u0441\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C\u0441\u044F",c.do_not_contact_reason?`: ${c.do_not_contact_reason}`:""]})]}),L.interactions!==void 0?e(we,{title:"\u0428\u0430\u0433 \u0438 \u043A\u0430\u0441\u0430\u043D\u0438\u044F",children:e(Do,{card:L,canEdit:h,busy:u,run:b})}):null,o?.canMail?e(we,{title:"\u041F\u043E\u0447\u0442\u0430",children:e(or,{companyId:c.id},c.id)}):null,o?.canAssortment?e(we,{title:"\u0410\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442",children:e(Lr,{companyId:c.id,canEdit:h,website:L.contacts.find(d=>d.type==="website")?.value_raw},c.id)}):null,e(we,{title:"\u0420\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B",children:e(Ho,{card:L,canEdit:h,busy:u,run:b})}),e(we,{title:`\u0421\u0442\u0440\u0430\u043D\u044B (${L.countries.length})`,children:e("ul",{className:"text-xs",children:L.countries.map(d=>s("li",{children:[F(d.country_code),d.is_primary?" \xB7 \u043E\u0441\u043D\u043E\u0432\u043D\u0430\u044F":"",s("span",{className:"text-muted-foreground",children:[" \xB7 \xAB",d.country_title,"\xBB",d.section_label?` / ${d.section_label}`:""]})]},d.id))})}),s(we,{title:`\u041A\u0430\u043D\u0430\u043B\u044B \u0441\u0432\u044F\u0437\u0438 (${L.contacts.length})`,children:[e("ul",{className:"flex flex-col gap-1",children:L.contacts.map(d=>s("li",{className:"flex items-start justify-between gap-2",children:[s("span",{className:"min-w-0",children:[s("span",{className:"text-xs text-muted-foreground",children:[Ut[d.type]??d.type," "]}),e("span",{className:"break-all",children:d.value_raw}),d.is_brand_domain&&e("span",{className:"text-xs text-muted-foreground",children:" \xB7 \u0434\u043E\u043C\u0435\u043D \u0431\u0440\u0435\u043D\u0434\u0430"}),d.person_id&&s("span",{className:"text-xs text-muted-foreground",children:[" \xB7 ",v.get(d.person_id)]})]}),h&&e(Ko,{busy:u,label:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u043A\u0430\u043D\u0430\u043B",onConfirm:()=>b("outreach_delete_contact",{company_id:c.id,contact_id:d.id})})]},d.id))}),h&&e(zo,{busy:u,onAdd:(d,x)=>b("outreach_save_contact",{company_id:c.id,type:d,value_raw:x})})]}),s(we,{title:`\u041A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u0435 \u043B\u0438\u0446\u0430 (${L.persons.length})`,children:[e("ul",{className:"flex flex-col gap-1",children:L.persons.map(d=>s("li",{children:[e("span",{className:"font-medium",children:[d.salutation,d.full_name].filter(Boolean).join(" ")}),d.position&&s("span",{className:"text-xs text-muted-foreground",children:[" \xB7 ",d.position]})]},d.id))}),h&&e(jo,{busy:u,onAdd:(d,x)=>b("outreach_save_person",{company_id:c.id,full_name:d,position:x})})]}),s(we,{title:`\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0438 (${L.comments.length})`,children:[h&&e(Uo,{busy:u,onAdd:d=>b("outreach_add_comment",{company_id:c.id,body:d})}),e("ul",{className:"mt-2 flex flex-col gap-2",children:L.comments.map(d=>s("li",{children:[s("div",{className:"text-[11px] text-muted-foreground",children:[d.pinned?"\u{1F4CC} ":"",d.author," \xB7 ",q(d.created_at)]}),e("div",{className:"whitespace-pre-wrap",children:d.body})]},d.id))})]}),s("details",{className:"mt-3",children:[s("summary",{className:"cursor-pointer text-sm font-semibold",children:["\u0418\u0441\u0442\u043E\u0440\u0438\u044F \u043F\u0440\u0430\u0432\u043E\u043A (",L.changes.length,")"]}),e("ul",{className:"mt-2 flex flex-col gap-1 text-xs",children:L.changes.map(d=>s("li",{children:[s("span",{className:"text-muted-foreground",children:[q(d.at)," \xB7 ",mt(d.actor)]}),s("div",{children:[d.field,": ",d.old_value||"\u2014"," \u2192 ",d.new_value||"\u2014"]})]},d.id))})]}),s("details",{className:"mt-2",children:[e("summary",{className:"cursor-pointer text-sm font-semibold",children:"\u0418\u0441\u0445\u043E\u0434\u043D\u044B\u0435 \u0434\u0430\u043D\u043D\u044B\u0435"}),L.sources.map(d=>e("pre",{className:"mt-2 whitespace-pre-wrap rounded bg-muted p-2 text-[11px]",children:d.raw_text},d.id))]})]})}var He="h-8 rounded-md border border-input bg-background px-2 text-xs";function $o({roles:t,currency:n,active:a,busy:o,onSave:r}){let L=l=>{let i=t.includes(l)?t.filter(m=>m!==l):[...t,l];i.length>0&&r({roles:i})};return s("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs","aria-label":"\u0420\u043E\u043B\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",children:[jt.map(l=>s("label",{className:"flex items-center gap-1.5",children:[e("input",{type:"checkbox",checked:t.includes(l),disabled:o||t.length===1&&t.includes(l),onChange:()=>L(l)}),ut[l]]},l)),t.includes("supplier")?s(P,{children:[s("label",{className:"flex items-center gap-1.5",children:["\u0412\u0430\u043B\u044E\u0442\u0430",e("select",{className:He,value:n,disabled:o,onChange:l=>{r({supplier_currency:l.target.value})},children:["INR","USD","EUR","AED","CNY","KZT","RUB"].map(l=>e("option",{value:l,children:l},l))})]}),s("label",{className:"flex items-center gap-1.5",title:"\u041D\u0435\u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0439 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A \u043D\u0435 \u043F\u043E\u043B\u0443\u0447\u0430\u0435\u0442 \u043D\u043E\u0432\u044B\u0445 \u043F\u043E\u0437\u0438\u0446\u0438\u0439; \u0435\u0433\u043E \u0441\u0441\u044B\u043B\u043A\u0438 \u043D\u0430 \u043F\u043E\u0440\u0442\u0430\u043B \u043E\u0442\u043A\u043B\u044E\u0447\u0430\u044E\u0442\u0441\u044F",children:[e("input",{type:"checkbox",checked:a,disabled:o,onChange:()=>{r({supplier_active:!a})}}),"\u0430\u043A\u0442\u0438\u0432\u0435\u043D"]})]}):null]})}function Do({card:t,canEdit:n,busy:a,run:o}){let r=t.company,L=t.next_action??null,[l,i]=f(null),m=L?qe(L.due_on):0;return s("div",{className:"flex flex-col gap-1.5 text-xs",children:[s("div",{children:[e("span",{className:"text-muted-foreground",children:"\u0421\u043B\u0435\u0434\u0443\u044E\u0449\u0438\u0439 \u0448\u0430\u0433: "}),L?s("span",{className:m<0?"text-destructive":void 0,children:[Gt[L.action]??L.action,L.note?` \xB7 ${L.note}`:""," \xB7 \u0434\u043E ",ye(L.due_on),m<0?` (\u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E \u043D\u0430 ${-m} \u0434\u043D)`:"",L.auto?e("span",{className:"text-muted-foreground",children:" \xB7 \u043F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443"}):null]}):e("span",{className:"text-muted-foreground",children:"\u043D\u0435\u0442"}),L&&n?e("button",{type:"button",disabled:a,className:"ml-2 underline-offset-2 hover:underline",onClick:()=>{o("outreach_complete_next_action",{company_id:r.id,note:"\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E"})},children:"\u0432\u044B\u043F\u043E\u043B\u043D\u0435\u043D\u043E"}):null]}),s("div",{children:[e("span",{className:"text-muted-foreground",children:"\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439: "}),r.owner||e("span",{className:"text-muted-foreground",children:"\u043D\u0435 \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D"}),n?e("button",{type:"button",disabled:a,className:"ml-2 underline-offset-2 hover:underline",onClick:()=>{o("outreach_update_company",{id:r.id,owner:"me",expected_updated_at:r.updated_at})},children:"\u043D\u0430\u0437\u043D\u0430\u0447\u0438\u0442\u044C \u043D\u0430 \u043C\u0435\u043D\u044F"}):null]}),n&&l===null?e(S,{size:"sm",variant:"outline",className:"mt-1 h-7 self-start",onClick:()=>i({channel:"email",direction:"out",outcome:"",summary:""}),children:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C \u043A\u0430\u0441\u0430\u043D\u0438\u0435"}):null,l?s("div",{className:"mt-1 grid gap-1.5 rounded-md border border-border p-2",children:[s("div",{className:"flex gap-1.5",children:[s("select",{className:He,value:l.direction,onChange:u=>i({...l,direction:u.target.value}),children:[e("option",{value:"out",children:"\u041C\u044B \u2192 \u0438\u043C"}),e("option",{value:"in",children:"\u041E\u043D\u0438 \u2192 \u043D\u0430\u043C"})]}),e("select",{className:He,value:l.channel,onChange:u=>i({...l,channel:u.target.value}),children:Object.entries(pt).map(([u,p])=>e("option",{value:u,children:p},u))}),s("select",{className:He,value:l.outcome,onChange:u=>i({...l,outcome:u.target.value}),children:[e("option",{value:"",children:"\u0418\u0441\u0445\u043E\u0434\u2026"}),Object.entries(ft).map(([u,p])=>e("option",{value:u,children:p},u))]})]}),e(G,{className:"h-7 text-xs",placeholder:"\u041A\u0440\u0430\u0442\u043A\u043E \u043E \u0447\u0451\u043C",value:l.summary,onChange:u=>i({...l,summary:u.target.value})}),s("div",{className:"flex gap-1.5",children:[e(S,{size:"sm",className:"h-7",disabled:a,onClick:async()=>{await o("outreach_log_touch",{company_id:r.id,...l,outcome:l.outcome||void 0,summary:l.summary||void 0})&&i(null)},children:"\u0417\u0430\u043F\u0438\u0441\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>i(null),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]})]}):null,t.sandbox_traces?e(Zo,{companyId:r.id,canEdit:n,busy:a,run:o}):null,(t.interactions??[]).length>0?e("ul",{className:"mt-1 flex flex-col gap-1",children:(t.interactions??[]).slice(0,10).map(u=>s("li",{className:"rounded-md bg-muted/40 px-2 py-1",children:[s("div",{className:"flex justify-between gap-2",children:[s("span",{children:[u.direction==="out"?"\u2192":"\u2190"," ",pt[u.channel]??u.channel,u.outcome?` \xB7 ${ft[u.outcome]??u.outcome}`:"",u.sandbox?s(P,{children:[" ",e(ce,{sandbox:!0})]}):null]}),e("span",{className:"text-muted-foreground",children:q(u.occurred_at)})]}),u.summary?e("div",{className:"text-muted-foreground",children:u.summary}):null,e("div",{className:"text-[11px] text-muted-foreground",children:mt(u.created_by)})]},u.id))}):e("p",{className:"text-muted-foreground",children:"\u041A\u0430\u0441\u0430\u043D\u0438\u0439 \u0435\u0449\u0451 \u043D\u0435 \u0431\u044B\u043B\u043E."})]})}function Zo({companyId:t,canEdit:n,busy:a,run:o}){let[r,L]=f(!1);return s("div",{className:"mt-1 flex flex-wrap items-center gap-2 rounded-md border border-[rgba(0,168,162,0.35)] bg-[rgba(0,168,162,0.06)] px-2 py-1",children:[s("span",{title:"\u041A\u0430\u0441\u0430\u043D\u0438\u044F, \u0441\u0442\u0430\u0442\u0443\u0441 \u0438 \u0448\u0430\u0433 \u043C\u0435\u043D\u044F\u043B\u0438\u0441\u044C \u043A\u0430\u043A \u0432 \u0431\u043E\u044E, \u043D\u043E \u043F\u0438\u0441\u044C\u043C\u0430 \u043D\u0438\u043A\u0443\u0434\u0430 \u043D\u0435 \u0443\u0445\u043E\u0434\u0438\u043B\u0438; \u0432 \u043C\u0435\u0442\u0440\u0438\u043A\u0438 \u043D\u0435 \u0432\u0445\u043E\u0434\u044F\u0442",children:[e(ce,{sandbox:!0})," \u0441\u043B\u0435\u0434\u044B \u0442\u0435\u0441\u0442\u0430"]}),n?r?e(be,{title:"\u0423\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u044B \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B?",actions:s(P,{children:[e(S,{size:"sm",className:"h-7",disabled:a,onClick:async()=>{await o("outreach_sandbox_rollback",{id:t})&&L(!1)},children:"\u0423\u0431\u0440\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:a,onClick:()=>L(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:e("span",{children:"\u041A\u0430\u0441\u0430\u043D\u0438\u044F \u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u044B \u0443\u0434\u0430\u043B\u044F\u0442\u0441\u044F; \u0441\u0442\u0430\u0442\u0443\u0441, \u0448\u0430\u0433 \u0438 \u043E\u0442\u043C\u0435\u0442\u043A\u0438 \u0430\u0434\u0440\u0435\u0441\u043E\u0432 \u0432\u0435\u0440\u043D\u0443\u0442\u0441\u044F, \u043A\u0430\u043A\u0438\u043C\u0438 \u0431\u044B\u043B\u0438 \u0434\u043E \u0442\u0435\u0441\u0442\u0430."})}):e(S,{size:"sm",variant:"outline",className:"h-7",onClick:()=>L(!0),children:"\u0423\u0431\u0440\u0430\u0442\u044C \u0441\u043B\u0435\u0434\u044B"}):null]})}function we({title:t,children:n}){return s("section",{className:"mf-card px-3 py-2",children:[e("h3",{className:"mb-1.5 text-[13px] font-bold",children:t}),n]})}function vn({label:t,children:n}){return s("label",{className:"flex flex-col gap-1 text-xs",children:[e("span",{className:"text-muted-foreground",children:t}),n]})}function Fo({status:t,busy:n,onSave:a}){let[o,r]=f(t),[L,l]=f("");w(()=>r(t),[t]);let i=v2.includes(o),m=o!==t;return s("div",{className:"flex flex-col gap-1",children:[e(vn,{label:"\u0421\u0442\u0430\u0442\u0443\u0441",children:e("select",{className:He,value:o,disabled:n,onChange:u=>r(u.target.value),children:zt.map(u=>e("option",{value:u,children:oe[u]},u))})}),m&&s(P,{children:[e(G,{value:L,onChange:u=>l(u.target.value),placeholder:i?"\u041F\u0440\u0438\u0447\u0438\u043D\u0430 (\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)":"\u041F\u0440\u0438\u0447\u0438\u043D\u0430 (\u043D\u0435\u043E\u0431\u044F\u0437\u0430\u0442\u0435\u043B\u044C\u043D\u043E)",className:"h-8 text-xs"}),s("div",{className:"flex gap-2",children:[e(S,{size:"sm",disabled:n||i&&!L.trim(),onClick:()=>{a(o,L.trim()).then(u=>u&&l(""))},children:"\u0421\u043C\u0435\u043D\u0438\u0442\u044C \u0441\u0442\u0430\u0442\u0443\u0441"}),e(S,{size:"sm",variant:"ghost",onClick:()=>r(t),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]})]})]})}function Ho({card:t,canEdit:n,busy:a,run:o}){let r=t.company,[L,l]=f(!1),[i,m]=f({display_name:"",legal_name:"",city:"",address_raw:"",tags:""}),u=()=>{m({display_name:r.display_name,legal_name:r.legal_name,city:r.city,address_raw:r.address_raw,tags:r.tags.join(", ")}),l(!0)};if(!L)return s("div",{className:"flex flex-col gap-1",children:[e(hn,{k:"\u042E\u0440. \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",v:r.legal_name}),e(hn,{k:"\u0413\u043E\u0440\u043E\u0434",v:r.city}),e(hn,{k:"\u0410\u0434\u0440\u0435\u0441",v:r.address_raw,pre:!0}),e(hn,{k:"\u041C\u0435\u0442\u043A\u0438",v:r.tags.join(", ")}),n&&e(S,{size:"sm",variant:"outline",className:"mt-1 self-start",onClick:u,children:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C"})]});let p=async()=>{let g={id:r.id,expected_updated_at:r.updated_at};i.display_name!==r.display_name&&(g.display_name=i.display_name),i.legal_name!==r.legal_name&&(g.legal_name=i.legal_name),i.city!==r.city&&(g.city=i.city),i.address_raw!==r.address_raw&&(g.address_raw=i.address_raw);let b=i.tags.split(",").map(c=>c.trim()).filter(Boolean);b.join(",")!==r.tags.join(",")&&(g.tags=b),(Object.keys(g).length===2||await o("outreach_update_company",g))&&l(!1)};return s("div",{className:"flex flex-col gap-2",children:[["display_name","legal_name","city","tags"].map(g=>e(vn,{label:{display_name:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",legal_name:"\u042E\u0440. \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",city:"\u0413\u043E\u0440\u043E\u0434",tags:"\u041C\u0435\u0442\u043A\u0438 (\u0447\u0435\u0440\u0435\u0437 \u0437\u0430\u043F\u044F\u0442\u0443\u044E)"}[g],children:e(G,{value:i[g],onChange:b=>m({...i,[g]:b.target.value}),className:"h-8 text-xs"})},g)),e(vn,{label:"\u0410\u0434\u0440\u0435\u0441",children:e("textarea",{value:i.address_raw,rows:3,onChange:g=>m({...i,address_raw:g.target.value}),className:"rounded-md border border-input bg-background px-2 py-1 text-xs"})}),s("div",{className:"flex gap-2",children:[e(S,{size:"sm",disabled:a,onClick:()=>{p()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",onClick:()=>l(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]})]})}function hn({k:t,v:n,pre:a}){return s("div",{className:"grid grid-cols-[6.5rem_1fr] gap-2 text-xs",children:[e("span",{className:"text-muted-foreground",children:t}),e("span",{className:a?"whitespace-pre-wrap break-words":"break-words",children:n||"\u2014"})]})}function zo({busy:t,onAdd:n}){let[a,o]=f("email"),[r,L]=f("");return s("div",{className:"mt-2 flex gap-1",children:[e("select",{className:He,value:a,onChange:l=>o(l.target.value),"aria-label":"\u0422\u0438\u043F \u043A\u0430\u043D\u0430\u043B\u0430",children:_2.map(l=>e("option",{value:l,children:Ut[l]},l))}),e(G,{value:r,onChange:l=>L(l.target.value),placeholder:"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435",className:"h-8 text-xs","aria-label":"\u0417\u043D\u0430\u0447\u0435\u043D\u0438\u0435 \u043A\u0430\u043D\u0430\u043B\u0430"}),e(S,{size:"sm",disabled:t||!r.trim(),onClick:()=>{n(a,r.trim()).then(l=>l&&L(""))},children:"+"})]})}function jo({busy:t,onAdd:n}){let[a,o]=f(""),[r,L]=f("");return s("div",{className:"mt-2 flex gap-1",children:[e(G,{value:a,onChange:l=>o(l.target.value),placeholder:"\u0418\u043C\u044F",className:"h-8 text-xs","aria-label":"\u0418\u043C\u044F"}),e(G,{value:r,onChange:l=>L(l.target.value),placeholder:"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C",className:"h-8 text-xs","aria-label":"\u0414\u043E\u043B\u0436\u043D\u043E\u0441\u0442\u044C"}),e(S,{size:"sm",disabled:t||!a.trim(),onClick:()=>{n(a.trim(),r.trim()).then(l=>{l&&(o(""),L(""))})},children:"+"})]})}function Uo({busy:t,onAdd:n}){let[a,o]=f("");return s("div",{className:"flex flex-col gap-1",children:[e("textarea",{value:a,rows:2,onChange:r=>o(r.target.value),placeholder:"\u041A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439","aria-label":"\u041D\u043E\u0432\u044B\u0439 \u043A\u043E\u043C\u043C\u0435\u043D\u0442\u0430\u0440\u0438\u0439",className:"rounded-md border border-input bg-background px-2 py-1 text-xs"}),e(S,{size:"sm",className:"self-end",disabled:t||!a.trim(),onClick:()=>{n(a.trim()).then(r=>r&&o(""))},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C"})]})}function Ko({busy:t,label:n,onConfirm:a}){let[o,r]=f(!1);return w(()=>{if(!o)return;let L=setTimeout(()=>r(!1),4e3);return()=>clearTimeout(L)},[o]),o?e(S,{variant:"destructive",size:"sm",disabled:t,onClick:()=>{a().then(()=>r(!1))},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C?"}):e(S,{variant:"ghost",size:"sm",disabled:t,"aria-label":n,onClick:()=>r(!0),children:"\u2715"})}function lr(t,n,a){let o=r=>Array.isArray(r)?r.map(String):[];switch(t){case"q":return`\u041F\u043E\u0438\u0441\u043A: ${String(n)}`;case"region":return ve(String(n));case"country":return F(String(n));case"priorities":return o(n).map(r=>`P${r}`).join(", ");case"statuses":return o(n).map(r=>oe[r]??r).join(", ");case"tags":return`\u041C\u0435\u0442\u043A\u0438: ${o(n).join(", ")}`;case"owner":return n==="none"?"\u0411\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E":`\u041E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u044B\u0439: ${String(n)}`;case"attention":return Kt[String(n)]??String(n);case"stale_days":return`\u0411\u0435\u0437 \u043A\u0430\u0441\u0430\u043D\u0438\u0439 \u2265 ${String(n)} \u0434\u043D`;case"never_touched":return n?"\u0411\u0435\u0437 \u043A\u0430\u0441\u0430\u043D\u0438\u0439":"\u0411\u044B\u043B\u0438 \u043A\u0430\u0441\u0430\u043D\u0438\u044F";case"has_person":return n?"\u0415\u0441\u0442\u044C \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0435 \u043B\u0438\u0446\u043E":"\u041D\u0435\u0442 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430";case"has_phone":return n?"\u0415\u0441\u0442\u044C \u0442\u0435\u043B\u0435\u0444\u043E\u043D":"\u041D\u0435\u0442 \u0442\u0435\u043B\u0435\u0444\u043E\u043D\u0430";case"has_email":return n?"\u0415\u0441\u0442\u044C email":"\u041D\u0435\u0442 email";case"brand":return n==="only"?"\u0422\u043E\u043B\u044C\u043A\u043E email \u0431\u0440\u0435\u043D\u0434\u0430":"\u0411\u0435\u0437 email \u0431\u0440\u0435\u043D\u0434\u0430";case"segment_id":return`\u0421\u0435\u0433\u043C\u0435\u043D\u0442: ${a.find(r=>r.id===n)?.name??"\u2026"}`;case"ids":return`\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ${o(n).length}`}return`${t}: ${String(n)}`}function ir(t,n){return Object.entries(Me(t)).map(([a,o])=>lr(a,o,n)).join(" \xB7 ")}function cr({filter:t,onChange:n,segments:a,onSegmentsChanged:o,canSave:r}){let L=E(),[l,i]=f(null),[m,u]=f(null),p=Object.entries(Me(t)),g=async()=>{if(l?.trim())try{await L("outreach_save_segment",{name:l.trim(),filter:Me(t)}),i(null),u(null),o()}catch(b){u(C(b))}};return s("div",{className:"flex flex-wrap items-center gap-1.5 text-xs",children:[e("span",{className:"text-muted-foreground",children:"\u0424\u0438\u043B\u044C\u0442\u0440 \u0442\u0435\u043C\u044B:"}),p.length===0?e("span",{className:"text-muted-foreground",children:"\u0432\u0441\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"}):null,p.map(([b,c])=>s("span",{className:"inline-flex items-center gap-1 rounded-full border border-border bg-muted/50 py-0.5 pl-2 pr-1",children:[lr(b,c,a),e("button",{type:"button","aria-label":"\u0423\u0431\u0440\u0430\u0442\u044C \u0443\u0441\u043B\u043E\u0432\u0438\u0435",className:"rounded-full px-1 text-muted-foreground hover:bg-state-hover hover:text-foreground",onClick:()=>n({...t,[b]:void 0}),children:"\xD7"})]},b)),p.length>0?e("button",{type:"button",className:"text-muted-foreground underline-offset-2 hover:underline",onClick:()=>n({}),children:"\u0441\u0431\u0440\u043E\u0441\u0438\u0442\u044C"}):null,e("span",{className:"flex-1"}),a.length>0?s("select",{"aria-label":"\u0421\u0435\u0433\u043C\u0435\u043D\u0442",className:"h-7 rounded-md border border-input bg-transparent px-1.5 text-xs",value:"",onChange:b=>b.target.value&&n({segment_id:b.target.value}),children:[e("option",{value:"",children:"\u0421\u0435\u0433\u043C\u0435\u043D\u0442\u044B\u2026"}),a.map(b=>s("option",{value:b.id,children:[b.name,typeof b.count=="number"?` \xB7 ${b.count}`:""]},b.id))]}):null,r&&p.length>0&&l===null?e(S,{size:"sm",variant:"outline",className:"h-7",onClick:()=>i(""),children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043A\u0430\u043A \u0441\u0435\u0433\u043C\u0435\u043D\u0442"}):null,l!==null?s("span",{className:"flex items-center gap-1",children:[e(G,{autoFocus:!0,className:"h-7 w-48 text-xs",placeholder:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u0441\u0435\u0433\u043C\u0435\u043D\u0442\u0430",value:l,onChange:b=>i(b.target.value),onKeyDown:b=>{b.key==="Enter"&&g(),b.key==="Escape"&&i(null)}}),e(S,{size:"sm",className:"h-7",onClick:()=>{g()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"})]}):null,m?e("span",{className:"w-full text-destructive",children:m}):null]})}function ze({title:t,hint:n,children:a,className:o}){return s("section",{className:k("mf-card p-3",o),children:[s("header",{className:"mb-2 flex items-baseline justify-between gap-2",children:[e("h3",{className:"text-[13px] font-bold",children:t}),n?e("span",{className:"text-[11px] text-muted-foreground",children:n}):null]}),a]})}var Go=["waiting_reply","overdue","no_next_action","due_today","ready_untouched"],qo=new Set(["waiting_reply","overdue","no_next_action"]);function pr({metrics:t,active:n,onPick:a}){let o=t.activity;return s("div",{className:"grid grid-cols-2 gap-2 @md:grid-cols-3 @3xl:grid-cols-6",children:[Go.map(r=>{let L=t.checks[r],l=qo.has(r)&&L>0;return s("button",{type:"button",onClick:()=>a(n===r?"":r),"aria-pressed":n===r,className:k("flex flex-col items-start rounded-md border bg-card px-3 py-2 text-left transition-colors hover:bg-state-hover",l?"border-destructive/50 shadow-[inset_3px_0_0_var(--mf-coral)]":"border-border",n===r&&"ring-1 ring-ring"),children:[e("span",{className:k("text-2xl font-bold tabular-nums",l&&"text-destructive"),children:L}),e("span",{className:"text-xs text-muted-foreground",children:Kt[r]})]},r)}),s("div",{className:"mf-kpi--volt flex flex-col items-start rounded-md border bg-card px-3 py-2",children:[e("span",{className:"text-2xl font-bold tabular-nums",children:o.positive_30d}),e("span",{className:"text-xs text-muted-foreground",title:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441 \u043E\u0442\u0432\u0435\u0442\u043E\u043C \xAB\u0438\u043D\u0442\u0435\u0440\u0435\u0441\xBB \u0438\u043B\u0438 \xAB\u043F\u0440\u0438\u0441\u043B\u0430\u043B\u0438 \u0443\u0441\u043B\u043E\u0432\u0438\u044F\xBB \u0437\u0430 30 \u0434\u043D\u0435\u0439",children:"\u041F\u043E\u0437\u0438\u0442\u0438\u0432\u043D\u044B\u0445 \u043E\u0442\u0432\u0435\u0442\u043E\u0432, 30 \u0434\u043D"})]})]})}function fr({queue:t,onOpen:n}){let a=t.groups.filter(o=>o.total>0);return a.length===0?e("p",{className:"text-sm text-muted-foreground",children:"\u041E\u0447\u0435\u0440\u0435\u0434\u044C \u043F\u0443\u0441\u0442\u0430: \u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043D\u044B\u0445 \u0448\u0430\u0433\u043E\u0432 \u0438 \u043E\u0442\u0432\u0435\u0442\u043E\u0432 \u0431\u0435\u0437 \u0440\u0435\u0430\u043A\u0446\u0438\u0438 \u043D\u0435\u0442."}):e("div",{className:"flex flex-col gap-3",children:a.map(o=>s("div",{children:[s("div",{className:"mb-1 flex items-baseline justify-between text-xs",children:[e("span",{className:k("font-semibold",(o.key==="waiting_reply"||o.key==="overdue")&&"text-destructive"),children:o.title}),e("span",{className:"text-muted-foreground",children:o.items.length<o.total?`${o.items.length} \u0438\u0437 ${o.total}`:o.total})]}),e("ul",{className:"flex flex-col",children:o.items.map(r=>e("li",{children:s("button",{type:"button",onClick:()=>n(r.id),className:"flex w-full items-center gap-2 rounded-md px-1.5 py-1 text-left text-sm hover:bg-state-hover",children:[e(Se,{priority:r.priority}),e("span",{className:"min-w-0 flex-1 truncate",children:r.display_name}),e("span",{className:"hidden flex-none text-xs text-muted-foreground @md:inline",children:F(r.country_code)}),e("span",{className:"max-w-[45%] flex-none truncate text-xs text-muted-foreground",title:r.reason,children:r.reason})]})},r.id))})]},o.key))})}function gr({metrics:t,active:n,onPick:a}){let o=Math.max(1,...t.funnel.map(L=>L.count)),r=t.dropoff;return s("div",{className:"flex flex-col gap-1",children:[t.funnel.map(L=>s("button",{type:"button",onClick:()=>a(L.status),className:k("group flex items-center gap-2 rounded px-1 text-left text-xs hover:bg-state-hover",n.includes(L.status)&&"bg-state-active"),title:L.count?`\u041C\u0435\u0434\u0438\u0430\u043D\u0430 \u0432 \u0441\u0442\u0430\u0442\u0443\u0441\u0435: ${L.median_days_in_status} \u0434\u043D`:void 0,children:[e("span",{className:"w-32 flex-none truncate text-muted-foreground",children:oe[L.status]??L.status}),e("span",{className:"relative h-4 flex-1 rounded-sm bg-muted",children:e("span",{className:"absolute inset-y-0 left-0 rounded-sm bg-[var(--mf-teal)]",style:{width:`${L.count/o*100}%`}})}),e("span",{className:"w-8 flex-none text-right tabular-nums",children:L.count})]},L.status)),r.length>0?s("div",{className:"mt-2 border-t border-border pt-2",children:[e("div",{className:"mb-1 text-[11px] text-muted-foreground",children:"\u041E\u0442\u0442\u043E\u043A \u043F\u043E \u043F\u0440\u0438\u0447\u0438\u043D\u0430\u043C"}),r.map(L=>s("button",{type:"button",onClick:()=>a(L.status),className:"flex w-full items-center gap-2 rounded px-1 text-left text-xs hover:bg-state-hover",children:[s("span",{className:"flex-1 truncate",children:[oe[L.status]," \xB7 ",ea[L.reason_code]??L.reason_code]}),e("span",{className:"tabular-nums",children:L.count})]},`${L.status}-${L.reason_code}`))]}):null]})}var dr=[{key:"early",label:"\u0434\u043E \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u0430",statuses:["new","to_qualify","ready"],cls:"bg-muted-foreground/30"},{key:"work",label:"\u0432 \u0440\u0430\u0431\u043E\u0442\u0435",statuses:["contacted","replied","qualified"],cls:"bg-[var(--mf-teal)]"},{key:"done",label:"\u043F\u0435\u0440\u0435\u0434\u0430\u043D",statuses:["handed_over"],cls:"bg-[var(--mf-green)]"},{key:"out",label:"\u043E\u0442\u043A\u0430\u0437 / \u043D\u0435 \u043F\u0438\u0441\u0430\u0442\u044C",statuses:["rejected","do_not_contact"],cls:"bg-[var(--mf-coral)]"}];function br({metrics:t,active:n,onPick:a}){let o=Math.max(1,...t.regions.map(r=>r.total));return s("div",{className:"flex flex-col gap-1",children:[t.regions.map(r=>s("button",{type:"button",onClick:()=>a(n===r.region?"":r.region),className:k("flex items-center gap-2 rounded px-1 text-left text-xs hover:bg-state-hover",n===r.region&&"bg-state-active"),children:[e("span",{className:"w-32 flex-none truncate text-muted-foreground",children:ve(r.region)}),e("span",{className:"flex h-4 flex-1 overflow-hidden rounded-sm bg-muted",style:{maxWidth:`${r.total/o*100}%`},children:dr.map(L=>{let l=L.statuses.reduce((i,m)=>i+(r.by_status[m]??0),0);return l?e("span",{className:L.cls,style:{width:`${l/r.total*100}%`},title:`${L.label}: ${l}`},L.key):null})}),e("span",{className:"w-8 flex-none text-right tabular-nums",children:r.total})]},r.region)),e("div",{className:"mt-1 flex flex-wrap gap-3 text-[11px] text-muted-foreground",children:dr.map(r=>s("span",{className:"flex items-center gap-1",children:[e("span",{className:k("inline-block size-2 rounded-sm",r.cls)}),r.label]},r.key))})]})}function xr(t){switch(t){case"never":return{never_touched:!0};case"d8_14":return{stale_days:8,never_touched:!1};case"d15_30":return{stale_days:15,never_touched:!1};case"d30p":return{stale_days:31,never_touched:!1}}return{never_touched:!1}}function hr({metrics:t,onPick:n}){let a=t.aging.filter(r=>!["rejected","do_not_contact","handed_over"].includes(r.status)),o=Math.max(1,...a.flatMap(r=>qt.map(L=>r.buckets[L]??0)));return a.length===0?e("p",{className:"text-sm text-muted-foreground",children:"\u041D\u0435\u0442 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439."}):e("div",{className:"overflow-x-auto",children:s("table",{className:"w-full min-w-[30rem] table-fixed text-xs",children:[e("thead",{children:s("tr",{className:"text-muted-foreground",children:[e("th",{className:"w-32 text-left font-normal",children:"\u0421\u0442\u0430\u0442\u0443\u0441"}),qt.map(r=>e("th",{className:"font-normal",children:N2[r]},r))]})}),e("tbody",{children:a.map(r=>s("tr",{children:[e("td",{className:"truncate pr-1 text-muted-foreground",children:oe[r.status]}),qt.map(L=>{let l=r.buckets[L]??0,i=(L==="d15_30"||L==="d30p")&&l>0&&r.status!=="new";return e("td",{className:"p-0.5",children:e("button",{type:"button",disabled:!l,onClick:()=>n(r.status,L),className:k("h-7 w-full rounded-sm text-center tabular-nums disabled:cursor-default",l?"hover:ring-1 hover:ring-ring":"text-muted-foreground/40",i&&"text-destructive"),style:l?{backgroundColor:`color-mix(in oklab, var(--primary) ${Math.round(8+l/o*40)}%, transparent)`}:void 0,children:l||"\xB7"})},L)})]},r.status))})]})})}function vr({metrics:t,onPick:n}){let a=t.quality,o=t.activity,r=(L,l,i,m=!1)=>s("button",{type:"button",disabled:!i,onClick:()=>i&&n(i),className:"flex w-full items-center justify-between gap-2 rounded px-1 py-0.5 text-left text-xs hover:bg-state-hover disabled:hover:bg-transparent",children:[e("span",{className:"text-muted-foreground",children:L}),e("span",{className:k("tabular-nums",m&&"text-destructive"),children:l})]});return s("div",{className:"grid gap-3 @md:grid-cols-2",children:[s("div",{children:[e("div",{className:"mb-1 flex gap-1",children:["1","2","3","4","5"].map(L=>s("button",{type:"button",onClick:()=>n({priorities:[Number(L)]}),className:"flex flex-1 flex-col items-center rounded-md border border-border py-1 text-xs hover:bg-state-hover",children:[s("span",{className:"font-semibold",children:["P",L]}),e("span",{className:"tabular-nums text-muted-foreground",children:a.by_priority[L]??0})]},L))}),r("\u0421 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u044B\u043C \u043B\u0438\u0446\u043E\u043C",Wt(a.with_person,t.total),{has_person:!0}),r("\u0411\u0435\u0437 \u043A\u043E\u043D\u0442\u0430\u043A\u0442\u043D\u043E\u0433\u043E \u043B\u0438\u0446\u0430",t.total-a.with_person,{has_person:!1}),r("\u0422\u043E\u043B\u044C\u043A\u043E email \u0431\u0440\u0435\u043D\u0434\u0430",a.brand_only,{brand:"only"}),r("\u0411\u0435\u0437 \u043A\u0430\u043D\u0430\u043B\u043E\u0432 \u0441\u0432\u044F\u0437\u0438",a.no_channels,void 0,a.no_channels>0),r("\u041D\u0435\u0432\u0435\u0440\u043D\u044B\u0435 / \u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043B\u0435\u043D\u043D\u044B\u0435 \u043A\u0430\u043D\u0430\u043B\u044B",a.invalid_contacts,void 0,a.invalid_contacts>0),r("\u0410\u043A\u0442\u0438\u0432\u043D\u044B\u0435 \u0431\u0435\u0437 \u043E\u0442\u0432\u0435\u0442\u0441\u0442\u0432\u0435\u043D\u043D\u043E\u0433\u043E",a.unassigned,{owner:"none"})]}),s("div",{children:[r("\u041A\u0430\u0441\u0430\u043D\u0438\u0439 \u0437\u0430 7 \u0434\u043D\u0435\u0439: \u043C\u044B \u2192 \u043E\u043D\u0438",o.touches_out_7d),r("\u041A\u0430\u0441\u0430\u043D\u0438\u0439 \u0437\u0430 7 \u0434\u043D\u0435\u0439: \u043E\u043D\u0438 \u2192 \u043C\u044B",o.touches_in_7d),r("\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439, \u043A\u043E\u0442\u043E\u0440\u044B\u043C \u043F\u0438\u0441\u0430\u043B\u0438",o.touched,{never_touched:!1}),r("\u041E\u0442\u0432\u0435\u0442\u0438\u043B\u0438",Wt(o.replied,o.touched)),r("\u041F\u043E\u0437\u0438\u0442\u0438\u0432\u043D\u044B\u0435 \u043E\u0442\u0432\u0435\u0442\u044B, 30 \u0434\u043D",Wt(o.positive_30d,o.touched)),r("\u0414\u043E \u043F\u0435\u0440\u0432\u043E\u0433\u043E \u043A\u0430\u0441\u0430\u043D\u0438\u044F (\u043C\u0435\u0434\u0438\u0430\u043D\u0430)",o.median_days_to_first>=0?`${o.median_days_to_first} \u0434\u043D`:"\u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445")]})]})}function Vo(t){return t.entity==="interaction"?t.new_value?`\u043A\u0430\u0441\u0430\u043D\u0438\u0435: ${t.new_value}`:"\u043A\u0430\u0441\u0430\u043D\u0438\u0435 \u0443\u0434\u0430\u043B\u0435\u043D\u043E":t.entity==="next_action"?t.field==="done"?`\u0448\u0430\u0433 \u0437\u0430\u043A\u0440\u044B\u0442: ${t.new_value}`:`\u0448\u0430\u0433: ${t.new_value||"\u2014"}`:t.field==="mail_sent"?`\u043F\u0438\u0441\u044C\u043C\u043E: ${t.new_value}`:t.field==="mail_draft"?t.new_value?`\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043F\u0438\u0441\u044C\u043C\u0430: ${t.new_value}`:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043F\u0438\u0441\u044C\u043C\u0430 \u0443\u0434\u0430\u043B\u0451\u043D":t.field==="sandbox_rollback"?`\u043F\u0435\u0441\u043E\u0447\u043D\u0438\u0446\u0430: ${t.new_value}`:`${Vt[t.field]??t.field}: ${Ge(t.field,t.old_value)} \u2192 ${Ge(t.field,t.new_value)}`}var ur=8;function yr({items:t,seenAt:n,onOpen:a}){let[o,r]=f(!1);return t.length===0?e("p",{className:"text-sm text-muted-foreground",children:n?"\u0421 \u043F\u0440\u043E\u0448\u043B\u043E\u0433\u043E \u0432\u0438\u0437\u0438\u0442\u0430 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u043D\u0435\u0442.":"\u0418\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 \u0437\u0430 \u043D\u0435\u0434\u0435\u043B\u044E \u043D\u0435\u0442."}):s(P,{children:[e(mr,{items:t.slice(0,ur),onOpen:a}),t.length>ur?s("button",{type:"button",className:"self-start rounded-md px-1.5 py-1 text-xs font-semibold hover:bg-state-hover",onClick:()=>r(!0),children:["\u0412\u0441\u0435 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u044F \xB7 ",t.length," \u2192"]}):null,o?e("div",{role:"dialog","aria-modal":"true","aria-label":"\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C",className:"fixed inset-0 z-50 flex items-start justify-center bg-[rgba(17,19,21,0.35)] p-4",onClick:()=>r(!1),onKeyDown:L=>L.key==="Escape"&&r(!1),children:s("div",{className:"mf-island mf-card flex max-h-full w-full max-w-2xl flex-col gap-2 p-3",onClick:L=>L.stopPropagation(),children:[s("div",{className:"flex items-center gap-2",children:[s("h4",{className:"m-0 flex-1 text-[13px] font-bold",children:["\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C \xB7 ",t.length]}),e("button",{type:"button","aria-label":"\u0417\u0430\u043A\u0440\u044B\u0442\u044C",autoFocus:!0,className:"rounded-md px-2 py-1 hover:bg-state-hover",onClick:()=>r(!1),children:"\xD7"})]}),e("div",{className:"min-h-0 overflow-y-auto",children:e(mr,{items:t,onOpen:L=>{r(!1),a(L)}})})]})}):null]})}function mr({items:t,onOpen:n}){return e("ul",{className:"flex flex-col",children:t.map(a=>e("li",{children:s("button",{type:"button",onClick:()=>n(a.company_id),className:"flex w-full flex-col rounded-md px-1.5 py-1 text-left text-xs hover:bg-state-hover",children:[s("span",{className:"flex items-baseline justify-between gap-2",children:[e("span",{className:"truncate font-medium",children:a.company_name}),e("span",{className:"flex-none text-muted-foreground",children:q(a.at)})]}),s("span",{className:"truncate text-muted-foreground",children:[Vo(a)," \xB7 ",mt(a.actor),a.batch_id?" \xB7 \u043F\u0430\u0447\u043A\u0430":""]})]})},a.id))})}var Wo="new";function Yo(){return Xt()}function _r({subPath:t}){let{status:n}=H(),a=t.split("/")[0]||null;return n?n.connected?n.canView?n.canWork?e(Jo,{topicId:a===Wo?null:a}):e(D,{children:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest: \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0435\u0449\u0451 \u043D\u0435\u0442 \u0441\u043B\u043E\u044F \u0440\u0430\u0431\u043E\u0442\u044B \u0430\u0443\u0442\u0440\u0438\u0447\u0430 (\u043A\u0430\u0441\u0430\u043D\u0438\u044F, \u043E\u0447\u0435\u0440\u0435\u0434\u044C, \u043C\u0435\u0442\u0440\u0438\u043A\u0438)."}):e(D,{children:"\u041D\u0435\u0442 \u0434\u043E\u0441\u0442\u0443\u043F\u0430 \u043A \u0440\u0435\u0435\u0441\u0442\u0440\u0443 (outreach.view)."}):e(D,{children:n.message}):e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"})}function Nr(){let t=ee(),n=ae();return R(async()=>{rn("topic","","");let{sectionId:a}=await t.call("section_ensure",null).catch(()=>({sectionId:null}));n.toCompose({focusPrompt:!0,...a?{placement:{sectionId:a,pinned:!1}}:{}})},[n,t])}function Jo({topicId:t}){let n=ae(),a=Nr(),o=Qe(),r=ee(),[L,l]=f(!1);return w(()=>{if(t){r.call("thread_alive",{threadId:t}).then(({alive:i})=>i?n.toThread(t):l(!0),()=>l(!0));return}o("dashboard").then(i=>{i==="stay"?l(!0):i==="none"&&a()})},[n,a,o,r,t]),L?e(Qo,{topicId:null}):e(D,{children:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u2026"})}function Qo({topicId:t}){let n=ae(),a=Nr(),o=ee(),r=Yo(),L=async()=>{t&&(await o.call("focus_get",{threadId:t}).catch(()=>null),n.toThread(t))};return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[s("div",{className:"mf-surface flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-xs",children:[e("span",{className:"flex-1 text-muted-foreground",children:"\u0412\u0435\u0441\u044C \u0440\u0435\u0435\u0441\u0442\u0440"}),t?e(S,{size:"sm",className:"h-8",onClick:()=>{L()},children:"\u0427\u0430\u0442"}):e(S,{size:"sm",className:"h-8",onClick:()=>{a()},children:"\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442 \u043F\u043E \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0443"})]}),e("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e(Ma,{topicId:t,onOpenCompany:r})})]})}function Ma({topicId:t,threadId:n,onOpenCompany:a}){let{status:o}=H(),{filter:r,setFilter:L,error:l}=D2(t),i=F2(r),{segments:m,reload:u}=H2();Z2(n??"",r,ir(r,m));let p=i.metrics,g=r.statuses??[],b=c=>{L({...r,...c})};return s("div",{className:"@container mf-island mf-paper flex min-w-0 flex-col gap-3 p-3",children:[e(cr,{filter:r,onChange:c=>{L(c)},segments:m,onSegmentsChanged:u,canSave:!!o?.canManage}),l||i.error?e("p",{role:"alert",className:"rounded-md border border-destructive/40 bg-background px-2 py-1 text-xs text-destructive",children:l??i.error}):null,p?s(P,{children:[s("div",{className:"flex flex-wrap items-baseline justify-between gap-1 text-xs text-muted-foreground",children:[s("span",{children:["\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439: ",p.total," \xB7 \u0430\u043A\u0442\u0438\u0432\u043D\u044B\u0445: ",p.active]}),s("span",{children:["\u043D\u0430 ",q(p.as_of)]})]}),e(pr,{metrics:p,active:r.attention,onPick:c=>b({attention:c||void 0})}),s("div",{className:"grid gap-3 @3xl:grid-cols-2",children:[e(ze,{title:"\u041E\u0447\u0435\u0440\u0435\u0434\u044C \xAB\u0421\u0435\u0433\u043E\u0434\u043D\u044F\xBB",hint:"\u043F\u043E \u043F\u043E\u0440\u044F\u0434\u043A\u0443 \u0432\u0430\u0436\u043D\u043E\u0441\u0442\u0438",children:i.queue?e(fr,{queue:i.queue,onOpen:a}):null}),e(ze,{title:"\u0427\u0442\u043E \u0438\u0437\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C",hint:i.seenAt?`\u0441 ${q(i.seenAt)}`:"\u0437\u0430 \u043D\u0435\u0434\u0435\u043B\u044E",children:e(yr,{items:i.feed,seenAt:i.seenAt,onOpen:a})}),e(ze,{title:"\u0412\u043E\u0440\u043E\u043D\u043A\u0430",children:e(gr,{metrics:p,active:g,onPick:c=>b({statuses:g.includes(c)?g.filter(h=>h!==c):[...g,c]})})}),e(ze,{title:"\u0420\u0435\u0433\u0438\u043E\u043D\u044B",children:e(br,{metrics:p,active:r.region??"",onPick:c=>b({region:c||void 0})})}),e(ze,{title:"\u0417\u0430\u0441\u0442\u043E\u0439: \u0441\u0442\u0430\u0442\u0443\u0441 \xD7 \u0434\u0430\u0432\u043D\u043E\u0441\u0442\u044C \u043F\u043E\u0441\u043B\u0435\u0434\u043D\u0435\u0433\u043E \u043A\u0430\u0441\u0430\u043D\u0438\u044F",className:"@3xl:col-span-2",children:e(hr,{metrics:p,onPick:(c,h)=>{L({...r,statuses:[c],stale_days:void 0,never_touched:void 0,...xr(h)})}})}),e(ze,{title:"\u041A\u0430\u0447\u0435\u0441\u0442\u0432\u043E \u0434\u0430\u043D\u043D\u044B\u0445 \u0438 \u0430\u043A\u0442\u0438\u0432\u043D\u043E\u0441\u0442\u044C",className:"@3xl:col-span-2",children:e(vr,{metrics:p,onPick:c=>b(c)})})]})]}):e(D,{children:i.loading?"\u0421\u0447\u0438\u0442\u0430\u0435\u043C\u2026":"\u041D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})]})}function Ta(t){let n=E(),{status:a}=H(),[o,r]=f(null),[L,l]=f(null),i=j(0),m=R(()=>{if(!t||!a?.connected)return;let u=++i.current;n("mail_mailing_get",{id:t,full:!0}).then(p=>{u===i.current&&(r(p),l(null))},p=>u===i.current&&l(C(p)))},[t,a?.connected,n]);return w(()=>{r(null),l(null)},[t]),w(m,[m]),se(m2,u=>{let p=u;if(p?.id===t){if(p.deleted===!0){i.current++,r(null),l("\u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \u0443\u0434\u0430\u043B\u0435\u043D\u0430");return}m()}}),{mailing:o,error:L,reload:m}}function wr({id:t,onOpenCompany:n,onDeleted:a,embedded:o}){let r=E(),{status:L}=H(),{mailing:l,error:i,reload:m}=Ta(t),[u,p]=f(null),g=u&&l&&u.updated_at>=l.updated_at?u:l,[b,c]=f(null),[h,v]=f(null),[d,x]=f(null),[_,y]=f(!1),[I,T]=f(!1),[$,M]=f(!1),W=!!L?.canManage,N=async()=>{T(!0);try{await r("mail_mailing_discard",{id:t}),a?.()}catch(Z){x(C(Z))}finally{T(!1),M(!1)}},z=g?.recipients??[],Q=!!g&&g.state!=="draft",te=_?z.filter(Z=>Q?Z.replied:!Z.ready):z,U=b&&te.some(Z=>Z.company_id===b)?b:te[0]?.company_id??null,ue=g?.updated_at??"";w(()=>{if(!U){v(null);return}let Z=!0;return x(null),r("mail_mailing_letter",{id:t,company_id:U}).then(A=>{Z&&(v(A),x(null))},A=>Z&&x(C(A))),()=>{Z=!1}},[t,U,ue,r]);let xe=async Z=>{T(!0);try{await r("mail_mailing_remove",{id:t,company_ids:[Z]}),m()}catch(A){x(C(A))}finally{T(!1)}};if(i)return s("p",{className:"text-xs text-destructive",children:["\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430: ",i]});if(!g)return e("p",{className:"text-xs text-muted-foreground",children:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443\u2026"});let he=te.findIndex(Z=>Z.company_id===U),ke=Z=>{let A=te[he+Z];A&&c(A.company_id)};return s("div",{className:"@container mf-root mf-island mf-card flex flex-col gap-3 p-3 text-xs",children:[s("header",{className:"flex flex-col gap-0.5",children:[o?null:s(P,{children:[e(Le,{children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430"}),e("h3",{className:"m-0 text-base font-bold leading-snug",children:g.name})]}),s("span",{className:"text-muted-foreground",children:[g.template_name?`\u043F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443 \xAB${g.template_name}\xBB${g.edited?" \xB7 \u0438\u0437\u043C\u0435\u043D\u0451\u043D":""}`:"\u0431\u0435\u0437 \u0448\u0430\u0431\u043B\u043E\u043D\u0430"," \xB7"," ",q(g.updated_at)]})]}),Q&&g.progress?s("div",{className:"flex flex-wrap gap-2",children:[s(J,{tone:"ok",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u043E: ",g.progress.sent]}),g.progress.in_channel?s(J,{tone:"info",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438: ",g.progress.in_channel]}):null,g.progress.failed?s(J,{tone:"error",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430: ",g.progress.failed]}):null,g.progress.cancelled?s(J,{tone:"muted",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u0421\u043D\u044F\u0442\u043E: ",g.progress.cancelled]}):null,s(V,{tone:"volt",className:"self-center",children:["\u043E\u0442\u0432\u0435\u0442\u043E\u0432: ",g.progress.replies]}),g.progress.unsubscribes?s(V,{tone:"muted",className:"self-center",children:["\u043E\u0442\u043F\u0438\u0441\u043E\u043A: ",g.progress.unsubscribes]}):null]}):s("div",{className:"flex flex-wrap gap-2",children:[s(J,{tone:"ok",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u0423\u0439\u0434\u0451\u0442: ",g.ready]}),s(J,{tone:g.skipped?"warning":"muted",className:"rounded-md border border-border bg-background px-2 py-1 font-semibold",children:["\u041D\u0435 \u0443\u0439\u0434\u0451\u0442: ",g.skipped]}),s(V,{tone:"muted",className:"self-center",children:["\u0412\u0441\u0435\u0433\u043E: ",g.total]})]}),!Q&&W?e(tt,{specs:Fe(g.attachments),busy:I,onChange:async Z=>{T(!0);try{p(await r("mail_mailing_update",{id:t,attachments:Z??[]}))}catch(A){x(C(A))}finally{T(!1)}}}):null,e(xn,{mailing:g,onChanged:Z=>p(Z)}),!Q&&Object.keys(g.reasons).length>0?e("ul",{className:"flex flex-col gap-0.5 text-foreground",children:Object.entries(g.reasons).map(([Z,A])=>e("li",{children:s(J,{tone:"warning",children:[Z," \u2014 ",A]})},Z))}):null,z.length===0?e("p",{className:"text-muted-foreground",children:"\u041F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u0435\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u041F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u043D\u0430\u043F\u0440\u0438\u043C\u0435\u0440, \u043F\u043E \u0444\u0438\u043B\u044C\u0442\u0440\u0443 \u0442\u0435\u043C\u044B."}):s("div",{className:"grid gap-3 @2xl:grid-cols-[minmax(12rem,16rem)_1fr]",children:[s("div",{className:"flex min-w-0 flex-col gap-1",children:[s("label",{className:"flex items-center gap-1 text-muted-foreground",children:[e("input",{type:"checkbox",checked:_,onChange:Z=>y(Z.target.checked)}),Q?"\u0422\u043E\u043B\u044C\u043A\u043E \u043E\u0442\u0432\u0435\u0442\u0438\u0432\u0448\u0438\u0435":"\u0422\u043E\u043B\u044C\u043A\u043E \u0441 \u043F\u0440\u043E\u0431\u043B\u0435\u043C\u0430\u043C\u0438"]}),e("ul",{className:"max-h-[520px] overflow-y-auto rounded-md border border-border bg-background",children:te.map(Z=>s("li",{className:k("flex items-center gap-1 border-b border-border last:border-0",Z.company_id===U&&"bg-muted shadow-[inset_2px_0_0_var(--foreground)]"),children:[s("button",{type:"button",className:"flex min-w-0 flex-1 items-center gap-2 px-2 py-1 text-left",onClick:()=>c(Z.company_id),children:[e(ge,{tone:Q?Z.tone??"muted":Z.ready?"ok":"warning",title:Q?Z.status_text??Z.problems.join("; "):Z.ready?"\u0443\u0439\u0434\u0451\u0442":Z.problems.join("; ")}),e("span",{className:"min-w-0 flex-1 truncate",children:Z.company_name}),Z.replied?e(V,{tone:"volt",children:"\u043E\u0442\u0432\u0435\u0442"}):null,e("span",{className:"flex-none text-muted-foreground",children:Q?Z.status_text??"\u043D\u0435 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u044F\u043B\u043E\u0441\u044C":F(Z.country_code)})]}),W&&!Q?e("button",{type:"button",disabled:I,title:"\u0423\u0431\u0440\u0430\u0442\u044C \u0438\u0437 \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0438",className:"px-1.5 text-muted-foreground hover:text-destructive",onClick:()=>{xe(Z.company_id)},children:"\xD7"}):null]},Z.company_id))})]}),s("div",{className:"flex min-w-0 flex-col gap-2",children:[s("div",{className:"flex items-center gap-2",children:[e(S,{size:"sm",variant:"outline",className:"h-7",disabled:he<=0,onClick:()=>ke(-1),children:"\u2190"}),s("span",{className:"text-muted-foreground",children:[he+1," \u0438\u0437 ",te.length]}),e(S,{size:"sm",variant:"outline",className:"h-7",disabled:he<0||he>=te.length-1,onClick:()=>ke(1),children:"\u2192"}),e("span",{className:"flex-1"}),U&&n?e("button",{type:"button",className:"text-muted-foreground hover:underline",onClick:()=>n(U),children:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430"}):null]}),d?e("p",{className:"text-destructive",children:d}):null,h&&h.recipient.company_id===U?s(P,{children:[W&&!Q?e(tt,{specs:Fe(h.recipient.attachment_specs),inherit:!h.recipient.own_attachments,available:Nt(h.preview.attachments)??Nt(h.recipient.attachments),busy:I,onChange:async Z=>{T(!0);try{let A={id:t,company_id:U};Z&&(A.attachments=Z),p(await r("mail_mailing_recipient_attachments",A))}catch(A){x(C(A))}finally{T(!1)}}}):null,e(_a,{preview:h.preview,caption:h.recipient.company_name})]}):e("p",{className:"text-muted-foreground",children:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"})]})]}),W&&!Q?e("div",{className:"flex flex-wrap items-center justify-end gap-2",children:$?s("span",{className:"flex items-center gap-1",children:[e("span",{className:"text-destructive",children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443 \u0446\u0435\u043B\u0438\u043A\u043E\u043C?"}),e(S,{size:"sm",variant:"destructive",className:"h-7",disabled:I,onClick:()=>{N()},children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:I,onClick:()=>M(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}):e(S,{size:"sm",variant:"outline",className:"h-7 border-destructive/50 text-destructive",onClick:()=>M(!0),children:"\u0423\u0434\u0430\u043B\u0438\u0442\u044C \u0440\u0430\u0441\u0441\u044B\u043B\u043A\u0443"})}):null]})}var yn={kind:"mail",id:"hub",title:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430"},_n="manifest:open-mail-tab",Ra=null;function Xo(t){Ra=t,window.dispatchEvent(new CustomEvent(_n,{detail:t}))}function Ea(){let t=Ra;return Ra=null,t}function kt(){let t=le();return R(n=>{Xo(n),t(yn)},[t])}var e1=At,t1="manifest-template-draft",kr={name:"",audience:"potential_supplier",language:"en",kind:"first",subject:"",body:""};function Cr({text:t}){let n=t.split(/(\{\{[^}]*\}\})/g);return e("pre",{className:"whitespace-pre-wrap break-words rounded-md border border-border bg-muted/30 p-2 font-sans text-xs",children:n.map((a,o)=>a.startsWith("{{")?e("span",{className:"rounded bg-primary/15 px-0.5 text-primary",children:a},o):e("span",{children:a},o))})}function Sr({templateId:t,threadId:n,embedded:a}){let o=E(),r=ee(),L=Ie(),l=ae(),{status:i}=H(),m=kt(),[u,p]=f(null),[g,b]=f([]);w(()=>b(Fe(u?.attachments)),[u]);let[c,h]=f(kr),[v,d]=f(void 0),[x,_]=f([]),[y,I]=f("template"),[T,$]=f(null),[M,W]=f(null),[N,z]=f(null),[Q,te]=f(!1),[U,ue]=f(null),xe=j(null),he=!!i?.canManage;w(()=>{let O=!0;if(z(null),o("mail_fields",{}).then(B=>O&&_(B.fields),()=>{}),!t){p(null),h(kr),d(n??null),n&&r.call("draft_get",{threadId:n}).then(B=>O&&h(ne=>({...ne,...B.draft})),()=>{});return}return(async()=>{try{let B=await o("mail_template_get",{id:t});if(!O)return;p(B),h({name:B.name,audience:B.audience,language:B.language,kind:B.kind,subject:B.subject,body:B.body});let{threadId:ne}=n?{threadId:n}:await r.call("template_thread_get",{templateId:t}).catch(()=>({threadId:null}));if(!O||(d(ne),!ne))return;let ie=await r.call("draft_get",{threadId:ne}).catch(()=>null),Rt=!ie?.templateId||ie.templateId===t;O&&ie&&Rt&&(ie.draft.subject!==void 0||ie.draft.body!==void 0)&&h(In=>({...In,...ie.draft}))}catch(B){O&&z(C(B))}})(),()=>{O=!1}},[r,t,o]);let ke=re(()=>`ed-${Math.random().toString(36).slice(2,10)}`,[]),Z=j({});se(t1,O=>{let B=O;if(!v||B?.threadId!==v||B.source===ke||!B.patch||typeof B.patch!="object")return;let ne=B.patch;for(let ie of Object.keys(ne))delete Z.current[ie];h(ie=>({...ie,...ne}))});let A=j(null),Y=R(O=>{h(B=>({...B,...O})),ue(null),v&&(Z.current={...Z.current,...O},A.current&&clearTimeout(A.current),A.current=setTimeout(()=>{let B=Z.current;Z.current={},Object.keys(B).length&&r.call("draft_set",{threadId:v,draft:B,source:ke})},600))},[ke,r,v]);w(()=>{if(y!=="letter")return;let O=setTimeout(()=>{o("mail_preview",{subject:c.subject??"",body:c.body??"",company_id:T?.id}).then(B=>W(B),B=>z(C(B)))},400);return()=>clearTimeout(O)},[T?.id,c.body,c.subject,y,o]);let Pn=O=>{let B=xe.current,ne=`{{${O}}}`,ie=c.body??"";if(!B)return Y({body:ie+ne});let Rt=B.selectionStart??ie.length,In=B.selectionEnd??ie.length;Y({body:ie.slice(0,Rt)+ne+ie.slice(In)}),requestAnimationFrame(()=>{B.focus(),B.selectionStart=B.selectionEnd=Rt+ne.length})},Tt=async O=>{te(!0),z(null);try{let B=O&&u&&c.name===u.name?`${c.name} (\u043A\u043E\u043F\u0438\u044F)`:c.name,ne=await o("mail_template_save",{...O||!u?{}:{id:u.id},...c,name:B,attachments:g});p(ne),h(ie=>({...ie,name:ne.name})),ue(`\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E: \u0432\u0435\u0440\u0441\u0438\u044F ${ne.current_version}`),v&&(O||!t)&&await r.call("template_thread_link",{templateId:ne.id,threadId:v}),!a&&ne.id!==t&&l.toPluginPanel(Te,{subPath:`tpl/${ne.id}`,replace:!0})}catch(B){z(C(B))}finally{te(!1)}},Bn=R(async O=>{try{let{sectionId:B}=await r.call("section_ensure",null),ne=await L.threads.spawn({...O,title:`\u0428\u0430\u0431\u043B\u043E\u043D: ${c.name||"\u043D\u043E\u0432\u044B\u0439"}`.slice(0,120),pluginMetadata:{kind:"template",templateId:t??null,draft:c},...B?{sectionId:B}:{}});t&&await r.call("template_thread_link",{templateId:t,threadId:ne.id}),await r.call("focus_set",{threadId:ne.id,focus:{kind:"template",id:t??`new-${ne.id}`.slice(0,64),title:(c.name??"").slice(0,200)}}),l.toThread(ne.id)}catch(B){z(C(B))}},[c,r,L,t]);return t&&!u&&!N?e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0448\u0430\u0431\u043B\u043E\u043D\u2026"}):s("div",{className:k("@container mf-island mf-paper flex flex-col gap-2 p-2",!a&&"h-full min-h-0 overflow-y-auto @4xl:flex-row @4xl:overflow-hidden"),children:[s("div",{className:k("mf-card flex min-w-0 flex-1 flex-col gap-3 p-3 text-sm",!a&&"@4xl:overflow-y-auto"),children:[s("div",{className:"flex flex-wrap items-center gap-2",children:[a?null:e("button",{type:"button",className:"text-xs text-muted-foreground hover:underline",onClick:()=>l.toPluginPanel(Te,{subPath:"templates"}),children:"\u2190 \u0428\u0430\u0431\u043B\u043E\u043D\u044B"}),e("span",{className:"flex-1"}),U?e("span",{className:"text-xs text-muted-foreground",children:U}):null,he?e(tt,{specs:g,busy:Q,onChange:O=>b(O??[])}):null,he?s(P,{children:[e(S,{size:"sm",className:"h-8",disabled:Q||!c.name||!c.subject||!c.body,onClick:()=>{Tt(!1)},children:u?"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C":"\u0421\u043E\u0437\u0434\u0430\u0442\u044C \u0448\u0430\u0431\u043B\u043E\u043D"}),u?e(S,{size:"sm",variant:"outline",className:"h-8",disabled:Q,onClick:()=>{Tt(!0)},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043A\u0430\u043A \u043D\u043E\u0432\u044B\u0439"}):null]}):null]}),N?e("p",{className:"rounded-md border border-destructive/40 px-2 py-1 text-xs text-destructive",children:N}):null,s("div",{className:"grid gap-2 @lg:grid-cols-4",children:[e("div",{className:"@lg:col-span-4",children:e(Re,{label:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435",children:e(G,{className:"h-8 text-xs",value:c.name??"",onChange:O=>Y({name:O.target.value})})})}),e(Re,{label:"\u0410\u0443\u0434\u0438\u0442\u043E\u0440\u0438\u044F",children:e("select",{className:Ne,value:c.audience,onChange:O=>Y({audience:O.target.value}),children:Object.entries(We).map(([O,B])=>e("option",{value:O,children:B},O))})}),e(Re,{label:"\u0412\u0438\u0434",children:e("select",{className:Ne,value:c.kind,onChange:O=>Y({kind:O.target.value}),children:Object.entries(sn).map(([O,B])=>e("option",{value:O,children:B},O))})}),e(Re,{label:"\u042F\u0437\u044B\u043A",children:e(G,{className:"h-8 text-xs",value:c.language??"",onChange:O=>Y({language:O.target.value})})}),e(Re,{label:"\u0412\u0435\u0440\u0441\u0438\u044F",children:e("span",{className:"h-8 py-1.5 text-xs text-muted-foreground",children:u?`v${u.current_version} \xB7 ${u.updated_by}`:"\u043D\u043E\u0432\u044B\u0439"})})]}),e(Re,{label:"\u0422\u0435\u043C\u0430",children:e(G,{className:"h-8 text-xs",value:c.subject??"",onChange:O=>Y({subject:O.target.value})})}),e(Re,{label:"\u0422\u0435\u043A\u0441\u0442",hint:'\u0410\u0431\u0437\u0430\u0446\u044B \u2014 \u043F\u0443\u0441\u0442\u043E\u0439 \u0441\u0442\u0440\u043E\u043A\u043E\u0439, \u0441\u043F\u0438\u0441\u043A\u0438 \xAB- \xBB, **\u0436\u0438\u0440\u043D\u044B\u0439**, [\u0442\u0435\u043A\u0441\u0442](https://\u2026). \u041F\u043E\u0434\u0432\u0430\u043B \u0441 \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u0430\u043C\u0438 \u0434\u043E\u0431\u0430\u0432\u0438\u0442\u0441\u044F \u0441\u0430\u043C. \u0427\u0435\u0433\u043E \u043C\u043E\u0436\u0435\u0442 \u043D\u0435 \u0431\u044B\u0442\u044C \u0443 \u043F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u044F \u2014 \u0432\u043E \u0444\u0440\u0430\u0433\u043C\u0435\u043D\u0442: [[ in {{company.city}}]] \u0438\u0441\u0447\u0435\u0437\u043D\u0435\u0442 \u0431\u0435\u0437 \u0433\u043E\u0440\u043E\u0434\u0430; \u0432\u0430\u0440\u0438\u0430\u043D\u0442\u044B: [[Dear {{person.name}}, || Dear Sir or Madam,]]; \u0437\u0430\u043F\u0430\u0441\u043D\u043E\u0435: {{person.name | "Sir or Madam"}}.',children:e("textarea",{ref:xe,className:k(V2,"min-h-56"),value:c.body??"",onChange:O=>Y({body:O.target.value})})}),s("p",{className:"text-[11px] text-muted-foreground",children:["{{signature}}"," \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u0437\u0430\u0434\u0430\u044E\u0442\u0441\u044F \u0443 \u044E\u0440\u043B\u0438\u0446\u0430 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044F \u2014 \u043E\u0434\u043D\u0438 \u043D\u0430 \u0432\u0441\u0435 \u0435\u0433\u043E \u043F\u0438\u0441\u044C\u043C\u0430."," ",e("button",{type:"button",className:"text-foreground underline-offset-2 hover:underline",onClick:()=>m("entities"),children:"\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0434\u043F\u0438\u0441\u044C \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u2192"})]}),e("div",{className:"flex flex-wrap gap-1",children:x.map(O=>e("button",{type:"button",title:O.title,onClick:()=>Pn(O.path),className:"rounded-full border border-border bg-muted px-2 py-0.5 font-mono text-[11px] hover:bg-state-hover",children:`{{${O.path}}}`},O.path))}),e("div",{className:"flex gap-1 border-b border-border",children:["template","letter"].map(O=>e("button",{type:"button",onClick:()=>I(O),className:k("px-3 py-1.5 text-xs",y===O?"border-b-2 border-foreground font-semibold":"text-muted-foreground"),children:O==="template"?"\u0428\u0430\u0431\u043B\u043E\u043D":`\u041F\u0438\u0441\u044C\u043C\u043E \u0434\u043B\u044F ${T?.name??"\u2026"}`},O))}),y==="template"?s("div",{className:"flex flex-col gap-2",children:[e(Cr,{text:`\u0422\u0435\u043C\u0430: ${c.subject??""}`}),e(Cr,{text:c.body??""})]}):s("div",{className:"flex flex-col gap-2",children:[e(Ye,{value:T,onChange:$,placeholder:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F \u0434\u043B\u044F \u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\u0430 (\u0431\u0435\u0437 \u043D\u0435\u0451 \u2014 \u043E\u0431\u0440\u0430\u0437\u0435\u0446)"}),M?s(P,{children:[s("div",{className:"text-xs text-muted-foreground",children:["\u041E\u0442: ",M.from_name?`${M.from_name} <${M.from}>`:"\u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C \u043D\u0435 \u0437\u0430\u0434\u0430\u043D"," \xB7 \u041A\u043E\u043C\u0443: ",M.to||"\u2014",M.sample?" \xB7 \u043E\u0431\u0440\u0430\u0437\u0435\u0446":""]}),e("div",{className:"text-sm font-medium",children:M.subject}),M.problems.length?e("ul",{className:"text-xs text-destructive",children:M.problems.map(O=>s("li",{children:["\u2022 ",O]},O))}):null,e(Ln,{html:M.html,className:"h-80"})]}):e(D,{children:"\u0421\u043E\u0431\u0438\u0440\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"})]}),u?.versions&&u.versions.length>1?s("details",{className:"text-xs",children:[s("summary",{className:"cursor-pointer text-muted-foreground",children:["\u0412\u0435\u0440\u0441\u0438\u0438 (",u.versions.length,")"]}),e("ul",{className:"mt-1 flex flex-col gap-1",children:u.versions.map(O=>s("li",{className:"flex items-center gap-2",children:[s("span",{children:["v",O.version]}),e("span",{className:"text-muted-foreground",children:O.created_by}),e("button",{type:"button",className:"underline-offset-2 hover:underline",onClick:()=>Y({subject:O.subject,body:O.body}),children:"\u0432\u0437\u044F\u0442\u044C \u0432 \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"})]},O.version))})]}):null]}),a?null:s("aside",{className:"mf-card flex w-full flex-col gap-2 self-start p-3 @4xl:w-96 @4xl:flex-none",children:[e("h3",{className:"text-[13px] font-bold",children:"\u0427\u0430\u0442\u044B \u043F\u043E \u0448\u0430\u0431\u043B\u043E\u043D\u0443"}),t?e(at,{focus:{kind:"template",id:t,title:c.name??""}}):e(P,{children:e(e1,{draftKey:"manifest-template-new",placeholder:"\u0427\u0442\u043E \u0441\u0434\u0435\u043B\u0430\u0442\u044C \u0441 \u0448\u0430\u0431\u043B\u043E\u043D\u043E\u043C?",onSubmit:O=>Bn(O)})})]})]})}function Mr({id:t,onLinked:n,embedded:a}){let o=E(),{status:r}=H(),[L,l]=f(null),[i,m]=f(null),[u,p]=f(null),[g,b]=f(!1),c=R(()=>{o("mail_inbound_get",{id:t}).then(v=>{l(v),p(null)},v=>p(C(v)))},[t,o]);w(c,[c]);let h=async(v,d)=>{b(!0);try{l(await o(v,d)),p(null),v==="mail_inbound_link"&&i&&n?.(i)}catch(x){p(C(x))}finally{b(!1)}};return L?s("div",{className:"@container mf-island flex flex-col gap-2 p-2 text-xs",children:[s(w2,{children:[s("div",{className:"flex flex-wrap items-center gap-2",children:[a?null:e(Le,{children:"\u0412\u0445\u043E\u0434\u044F\u0449\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E"}),L.kind==="reply"?e(V,{tone:"volt",children:"\u043E\u0442\u0432\u0435\u0442"}):null]}),s("dl",{className:"m-0 grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5",children:[e("dt",{className:"text-muted-foreground",children:"\u041E\u0442"}),e("dd",{className:"break-all",children:L.from_name?`${L.from_name} <${L.from_address}>`:L.from_address}),e("dt",{className:"text-muted-foreground",children:"\u0422\u0435\u043C\u0430"}),e("dd",{className:"font-medium",children:L.subject}),e("dt",{className:"text-muted-foreground",children:"\u041F\u043E\u043B\u0443\u0447\u0435\u043D\u043E"}),s("dd",{children:[q(L.received_at)," \xB7 ",on[L.kind]??L.kind]}),e("dt",{className:"text-muted-foreground",children:"\u0420\u0430\u0437\u0431\u043E\u0440"}),e("dd",{children:L.company_id?s(J,{tone:"ok",children:["\u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u043E: ",L.company_name]}):L.triage==="spam"?e(J,{tone:"muted",children:"\u0441\u043F\u0430\u043C"}):L.triage==="ignored"?e(J,{tone:"muted",children:"\u0438\u0433\u043D\u043E\u0440\u0438\u0440\u0443\u0435\u0442\u0441\u044F"}):e(J,{tone:"warning",children:"\u043D\u0435 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043E"})})]})]}),e("pre",{title:"\u0412\u043D\u0435\u0448\u043D\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E: \u0442\u0435\u043A\u0441\u0442 \u043A\u0430\u043A \u0435\u0441\u0442\u044C, \u0441\u0441\u044B\u043B\u043A\u0438 \u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",className:"mf-card max-h-[60vh] overflow-y-auto whitespace-pre-wrap p-3 font-sans",children:L.reply_text||L.body_text}),L.attachments.length?s("p",{className:"text-muted-foreground",children:["\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F: ",L.attachments.map(v=>v.filename).join(", ")]}):null,u?e("p",{className:"text-destructive",children:u}):null,L.company_id&&(L.answers??[]).length>0?s(J,{tone:"ok",children:["\u041E\u0442\u0432\u0435\u0442 \u043E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D: ",(L.answers??[]).map(v=>v.status_text).join(", ")]}):null,r?.canManage&&L.company_id&&(L.kind==="reply"||L.kind==="other")?e("div",{className:"flex",title:`\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A \xABRe: \u2026\xBB \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435 \xAB${L.company_name}\xBB`,children:e(S,{size:"sm",className:"h-9",disabled:g,onClick:async()=>{b(!0);try{await o("mail_reply_draft_create",{inbound_id:t}),p(null),n?.({id:L.company_id,name:L.company_name})}catch(v){p(C(v))}finally{b(!1)}},children:"\u041E\u0442\u0432\u0435\u0442\u0438\u0442\u044C"})}):null,r?.canManage&&!L.company_id?s("div",{className:"mf-card flex flex-col gap-2 p-3 @md:flex-row @md:items-center",children:[e("div",{className:"min-w-0 flex-1",children:e(Ye,{value:i,onChange:m,placeholder:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u043A \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\u2026"})}),s("div",{className:"flex gap-2",children:[e(S,{size:"sm",className:"h-9",disabled:g||!i,onClick:()=>{h("mail_inbound_link",{id:t,company_id:i?.id})},children:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-9",disabled:g,onClick:()=>{h("mail_inbound_mark",{id:t,triage:"spam"})},children:"\u0421\u043F\u0430\u043C"}),e(S,{size:"sm",variant:"ghost",className:"h-9",disabled:g,onClick:()=>{h("mail_inbound_mark",{id:t,triage:"ignored"})},children:"\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C"})]})]}):null]}):e("p",{className:"p-3 text-xs text-muted-foreground",children:u??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u2026"})}function rt({tabs:t,active:n,onSelect:a,label:o}){return e("nav",{className:"mf-surface flex flex-none gap-1 overflow-x-auto border-b border-border px-1.5 @[24rem]:px-3","aria-label":o,children:t.map(([r,L])=>e("button",{type:"button",onClick:()=>a(r),"aria-current":n===r?"page":void 0,className:k("-mb-px flex-none whitespace-nowrap border-b-2 px-2 py-2 text-xs @[24rem]:px-3",n===r?"border-foreground font-semibold":"border-transparent text-muted-foreground hover:text-foreground"),children:L},r))})}function Nn({back:t,onBack:n,title:a,kind:o,meta:r,actions:L,className:l}){return s("div",{className:k("mf-surface flex flex-col gap-0.5 border-b border-border px-3 py-1.5 text-xs",l),children:[s("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-1",children:[s("button",{type:"button",className:"-ml-1 flex-none rounded px-1 py-0.5 text-[11px] text-muted-foreground hover:bg-state-hover hover:text-foreground",onClick:n,title:`\u041D\u0430\u0437\u0430\u0434: ${t}`,children:["\u2190 ",t]}),e("span",{"aria-hidden":!0,className:"text-muted-foreground/60",children:"\xB7"}),s("span",{className:"flex min-w-[8rem] flex-1 items-center gap-1.5",children:[o?e("span",{className:"flex-none text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",children:o}):null,e("span",{className:"flex min-w-0 items-center gap-1.5 text-[13px] font-bold leading-snug",children:a})]}),L?e("span",{className:"flex flex-none flex-wrap items-center gap-1.5",children:L}):null]}),r?e("div",{className:"text-[11px] text-muted-foreground",children:r}):null]})}var st=[["templates","\u0428\u0430\u0431\u043B\u043E\u043D\u044B"],["mailings","\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0438"],["entities","\u042E\u0440\u043B\u0438\u0446\u0430 \u0438 \u043E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u0438"],["inbound","\u041D\u0435\u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435"]];function Aa({initial:t="mailings"}){let{status:n}=H(),[a,o]=f(()=>{let r=Ea();return r&&st.some(([L])=>L===r)?r:t});return w(()=>{let r=L=>{let l=L.detail;st.some(([i])=>i===l)&&(o(l),Ea())};return window.addEventListener(_n,r),()=>window.removeEventListener(_n,r)},[]),n?n.connected?n.canMail?s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[e(rt,{tabs:st,active:a,onSelect:o,label:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430"}),e("div",{className:"min-h-0 flex-1 overflow-y-auto p-3",children:a==="entities"?e(s1,{}):a==="inbound"?e(L1,{}):a==="mailings"?e(a1,{}):e(n1,{})})]}):e(D,{children:"\u041F\u043E\u0447\u0442\u0430 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest: \u043D\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 \u0435\u0449\u0451 \u043D\u0435\u0442 \u043F\u043E\u0447\u0442\u043E\u0432\u043E\u0433\u043E \u0441\u043B\u043E\u044F."}):e(D,{children:n.message}):e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"})}function Rr({subPath:t}){let n=le(),a=Qe(),[o,r]=f(!1),[L,l]=[t.split("/")[0]||"",t.split("/")[1]??""];return w(()=>{if(L==="mailing"&&l)return void n({kind:"mailing",id:l,title:""});if(L==="inbound"&&l)return void n({kind:"inbound",id:l,title:""});if(L==="tpl")return void n({kind:"template",id:l&&l!=="new"?l:"",title:""});a("mail").then(i=>{i==="stay"?r(!0):i==="none"&&n(yn)})},[L,n,a,l]),o?e(Aa,{initial:st.some(([i])=>i===L)?L:"mailings"}):e(D,{children:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u043F\u043E\u0447\u0442\u0443\u2026"})}function n1(){let t=E(),n=le(),{status:a}=H(),[o,r]=f(""),[L,l]=f(null),[i,m]=f(null);return w(()=>{t("mail_templates",{audience:o||void 0}).then(u=>l(u.items),u=>m(C(u)))},[o,t]),s("div",{className:"flex flex-col gap-3 text-sm",children:[s("div",{className:"flex items-center gap-2",children:[s("select",{className:Ne,value:o,onChange:u=>r(u.target.value),children:[e("option",{value:"",children:"\u0412\u0441\u0435 \u0430\u0443\u0434\u0438\u0442\u043E\u0440\u0438\u0438"}),Object.entries(We).map(([u,p])=>e("option",{value:u,children:p},u))]}),e("span",{className:"flex-1"}),a?.canManage?e(S,{size:"sm",className:"h-8",onClick:()=>{n({kind:"template",id:"",title:""})},children:"\u041D\u043E\u0432\u044B\u0439 \u0448\u0430\u0431\u043B\u043E\u043D"}):null]}),i?e("p",{className:"text-xs text-destructive",children:i}):null,L?L.length===0?e(D,{children:"\u0428\u0430\u0431\u043B\u043E\u043D\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u0421\u043E\u0437\u0434\u0430\u0439\u0442\u0435 \u043F\u0435\u0440\u0432\u044B\u0439 \u2014 \u0430\u0433\u0435\u043D\u0442 \u043F\u043E\u043C\u043E\u0436\u0435\u0442 \u0441 \u0442\u0435\u043A\u0441\u0442\u043E\u043C."}):e("ul",{className:"@container flex flex-col divide-y divide-border mf-card overflow-hidden",children:L.map(u=>e("li",{children:s("button",{type:"button",onClick:()=>{n({kind:"template",id:u.id,title:u.name})},className:"flex w-full flex-col gap-0.5 px-3 py-2 text-left hover:bg-state-hover",children:[s("span",{className:"flex flex-wrap items-baseline justify-between gap-x-2",children:[e("span",{className:"min-w-0 font-medium",children:u.name}),s("span",{className:"text-[11px] text-muted-foreground",children:[We[u.audience]??u.audience," \xB7 ",sn[u.kind]??u.kind," \xB7 ",u.language," \xB7 v",u.current_version]})]}),e("span",{className:"truncate text-xs text-muted-foreground",children:u.subject})]})},u.id))}):e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"})]})}var Tr={draft:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A",sending:"\u0418\u0434\u0451\u0442",done:"\u0417\u0430\u0432\u0435\u0440\u0448\u0435\u043D\u0430",stopped:"\u041E\u0441\u0442\u0430\u043D\u043E\u0432\u043B\u0435\u043D\u0430",sent:"\u041E\u0442\u043F\u0440\u0430\u0432\u043B\u0435\u043D\u0430"};function a1(){let t=E(),n=le(),[a,o]=f(null),[r,L]=f(null);if(w(()=>{t("mail_mailings",{}).then(i=>o(i.items),i=>L(C(i)))},[t]),!a)return e(D,{children:r??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});if(a.length===0)return e(D,{children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043E\u043A \u043D\u0435\u0442."});let l=i=>i||e("span",{className:"text-muted-foreground",children:"\u2014"});return e("div",{className:"@container mf-card overflow-hidden",children:s("table",{className:"w-full text-xs",children:[e("thead",{className:"bg-[var(--mf-surface-strong,#eef3f1)] text-left text-muted-foreground",children:s("tr",{children:[e("th",{className:"px-3 py-2 font-semibold",children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430"}),e("th",{className:"hidden px-2 py-2 font-semibold @[30rem]:table-cell",children:"\u0421\u043E\u0441\u0442\u043E\u044F\u043D\u0438\u0435"}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[40rem]:table-cell",title:"\u041F\u043E\u043B\u0443\u0447\u0430\u0442\u0435\u043B\u0435\u0439 / \u0433\u043E\u0442\u043E\u0432\u044B\u0445 \u043F\u0438\u0441\u0435\u043C",children:"\u041F\u043E\u043B\u0443\u0447."}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[40rem]:table-cell",children:"\u0423\u0448\u043B\u043E"}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[48rem]:table-cell",title:"\u0412 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 \u0448\u043B\u044E\u0437\u0430",children:"\u041E\u0447\u0435\u0440\u0435\u0434\u044C"}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[48rem]:table-cell",title:"\u041D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430, \u043E\u0448\u0438\u0431\u043A\u0430, \u0434\u0443\u0431\u043B\u044C",children:"\u041D\u0435\u0434\u043E\u0441\u0442."}),e("th",{className:"hidden px-2 py-2 text-right font-semibold @[40rem]:table-cell",children:"\u041E\u0442\u0432\u0435\u0442\u044B"}),e("th",{className:"hidden px-3 py-2 font-semibold @[56rem]:table-cell",children:"\u041E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0430"})]})}),e("tbody",{children:a.map(i=>{let m=i.progress,u=bn(i);return s("tr",{className:"cursor-pointer border-t border-border hover:bg-state-hover",onClick:()=>{n({kind:"mailing",id:i.id,title:i.name})},children:[s("td",{className:"max-w-0 px-3 py-2",children:[e("div",{className:"truncate font-medium",children:i.name}),e("div",{className:"truncate text-[11px] text-muted-foreground",children:i.template_name||"\u0431\u0435\u0437 \u0448\u0430\u0431\u043B\u043E\u043D\u0430"}),s("div",{className:"mt-0.5 flex flex-wrap items-center gap-x-2 text-[11px] text-muted-foreground @[40rem]:hidden",children:[e("span",{className:"@[30rem]:hidden",children:e(J,{tone:u.tone,children:Tr[i.state]??i.state})}),s("span",{children:["\u043F\u0438\u0441\u0435\u043C ",m?m.letters:i.total]}),s("span",{children:["\u0443\u0448\u043B\u043E ",m?.sent??0]}),m?.failed?s("span",{className:"text-destructive",children:["\u043D\u0435\u0434\u043E\u0441\u0442\u0430\u0432\u043A\u0430 ",m.failed]}):null,s("span",{children:["\u043E\u0442\u0432\u0435\u0442\u043E\u0432 ",m?.replies??0]})]})]}),e("td",{className:"hidden whitespace-nowrap px-2 py-2 @[30rem]:table-cell",children:s("span",{className:"inline-flex items-center gap-1.5",children:[e(J,{tone:u.tone,children:Tr[i.state]??i.state}),e(ce,{sandbox:i.mode==="sandbox"||i.mode==="mixed"})]})}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[40rem]:table-cell",children:m?m.letters:i.total}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[40rem]:table-cell",children:l(m?.sent)}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[48rem]:table-cell",children:l(m?.in_channel)}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[48rem]:table-cell",children:m?.failed?s("span",{className:"inline-flex items-center gap-1",children:[e(ge,{tone:"error"}),m.failed]}):l(0)}),e("td",{className:"hidden px-2 py-2 text-right tabular-nums @[40rem]:table-cell",children:m?.replies?e("span",{className:"mf-badge mf-badge--volt",children:m.replies}):l(0)}),e("td",{className:"hidden whitespace-nowrap px-3 py-2 text-muted-foreground @[56rem]:table-cell",children:q(i.updated_at)})]},i.id)})})]})})}function r1({entity:t,canEdit:n,onSaved:a}){let o=E(),[r,L]=f(t.signature),[l,i]=f(t.footer),[m,u]=f(!1),[p,g]=f(null),[b,c]=f(!1);w(()=>{L(t.signature),i(t.footer)},[t.signature,t.footer]);let h=r!==t.signature||l!==t.footer,v=async()=>{u(!0),g(null),c(!1);try{let{id:x,code:_,name:y,full_name:I,details:T,address:$,website:M,phone:W,subdomain:N,sandbox:z,language:Q}=t;await o("mail_entity_save",{id:x,code:_,name:y,full_name:I,details:T,address:$,website:M,phone:W,subdomain:N,language:Q,...z?{sandbox:z}:{},signature:r,footer:l}),c(!0),a()}catch(x){g(C(x))}finally{u(!1)}},d="min-h-[5.5rem] w-full rounded-md border border-input bg-background px-2 py-1.5 font-mono text-xs disabled:opacity-70";return s("details",{className:"mt-2 rounded-md border border-[var(--mf-line-300)] bg-[var(--mf-surface)] px-2 py-1.5 text-xs",open:h||void 0,children:[e("summary",{className:"cursor-pointer select-none font-medium",children:"\u041F\u043E\u0434\u043F\u0438\u0441\u044C \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u043F\u0438\u0441\u0435\u043C"}),s("div",{className:"mt-2 flex flex-col gap-2",children:[s("label",{className:"flex flex-col gap-1",children:[s("span",{className:"text-muted-foreground",children:["\u041F\u043E\u0434\u043F\u0438\u0441\u044C \u2014 \u0432\u043C\u0435\u0441\u0442\u043E ","{{signature}}"," \u0432 \u0442\u0435\u043A\u0441\u0442\u0435 \u043F\u0438\u0441\u044C\u043C\u0430"]}),e("textarea",{className:d,value:r,maxLength:2e3,disabled:!n||m,onChange:x=>L(x.target.value),"aria-label":"\u041F\u043E\u0434\u043F\u0438\u0441\u044C"})]}),s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground",children:"\u041F\u043E\u0434\u0432\u0430\u043B \u2014 \u0434\u043E\u0431\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043F\u043E\u0434 \u043A\u0430\u0436\u0434\u044B\u043C \u043F\u0438\u0441\u044C\u043C\u043E\u043C (\u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B, \u043E\u0442\u043F\u0438\u0441\u043A\u0430)"}),e("textarea",{className:d,value:l,maxLength:4e3,disabled:!n||m,onChange:x=>i(x.target.value),"aria-label":"\u041F\u043E\u0434\u0432\u0430\u043B"})]}),s("p",{className:"text-[11px] text-muted-foreground",children:["\u041F\u043E\u0434\u0441\u0442\u0430\u043D\u043E\u0432\u043A\u0438: ","{{sender.name}}",", ","{{sender.email}}",", ","{{legal.name}}",", ","{{legal.address}}",", ","{{legal.website}}",", ","{{legal.phone}}","; \u0440\u0430\u0437\u043C\u0435\u0442\u043A\u0430 \u2014 \u043A\u0430\u043A \u0432 \u0448\u0430\u0431\u043B\u043E\u043D\u0435 (**\u0436\u0438\u0440\u043D\u044B\u0439**, [\u0442\u0435\u043A\u0441\u0442](https://\u2026)). \u0414\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0434\u043B\u044F \u0432\u0441\u0435\u0445 \u043F\u0438\u0441\u0435\u043C \u044D\u0442\u043E\u0433\u043E \u044E\u0440\u043B\u0438\u0446\u0430."]}),p?e("p",{role:"alert",className:"text-destructive",children:p}):null,n?s("div",{className:"flex items-center gap-2",children:[e(S,{size:"sm",className:"h-7",disabled:m||!h,onClick:()=>{v()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"}),h?e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:m,onClick:()=>{L(t.signature),i(t.footer)},children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C"}):b?e("span",{className:"text-[var(--mf-green)]",children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0435\u043D\u043E"}):null]}):e("p",{className:"text-[11px] text-muted-foreground",children:"\u041C\u0435\u043D\u044F\u0442\u044C \u043C\u043E\u0436\u0435\u0442 \u0441\u043E\u0442\u0440\u0443\u0434\u043D\u0438\u043A \u0441 \u043F\u0440\u0430\u0432\u043E\u043C \xAB\u041F\u043E\u0447\u0442\u0430: \u043D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438\xBB."})]})]})}function s1(){let t=E(),{status:n}=H(),[a,o]=f(null),[r,L]=f(null),[l,i]=f(null),[m,u]=f(!1),p=!!n?.canMailSettings,g=R(()=>{t("mail_entities",{}).then(d=>o(d.items),d=>i(C(d))),t("mail_defaults",{}).then(d=>L(d),()=>{})},[t]);w(g,[g]);let b=async(d,x)=>{u(!0),i(null);try{await t(d,x),g()}catch(_){i(C(_))}finally{u(!1)}};if(!a)return e(D,{children:l??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let c=a.flatMap(d=>d.senders.map(x=>({...x,entity:d}))),h=d=>{let x=c.find(_=>_.id===d);return x?{legal_entity_id:x.legal_entity_id,sender_id:x.id}:{legal_entity_id:"",sender_id:""}},v=(d,x)=>s("select",{className:Ne,disabled:!p||m,value:d,onChange:_=>x(_.target.value),children:[e("option",{value:"",children:"\u043D\u0435 \u0437\u0430\u0434\u0430\u043D"}),c.map(_=>s("option",{value:_.id,children:[_.display_name," <",_.address,">"]},_.id))]});return s("div",{className:"flex flex-col gap-3 text-sm",children:[l?e("p",{className:"rounded-md border border-destructive/40 px-2 py-1 text-xs text-destructive",children:l}):null,a.length===0?e(D,{children:"\u042E\u0440\u043B\u0438\u0446 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442. \u0418\u0445 \u0437\u0430\u0432\u043E\u0434\u0438\u0442 \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440 \u0432 \u0432\u0435\u0431\u0435 Manifest (\xAB\u0410\u0443\u0442\u0440\u0438\u0447 \u2192 \u041F\u043E\u0447\u0442\u0430\xBB)."}):null,a.map(d=>s("section",{className:"mf-card overflow-hidden p-3",children:[s("header",{className:"flex flex-wrap items-baseline gap-2",children:[e("h3",{className:"font-semibold",children:d.name}),e("span",{className:"text-xs text-muted-foreground",children:d.subdomain}),e(ce,{sandbox:d.sandbox}),e("span",{className:"flex-1"}),e(J,{tone:d.health_ok==null?"muted":d.health_ok?"ok":"error",className:"text-xs",children:d.health_ok==null?"\u043A\u0430\u043D\u0430\u043B \u043D\u0435 \u043F\u0440\u043E\u0432\u0435\u0440\u044F\u043B\u0441\u044F":d.health_ok?"\u043A\u0430\u043D\u0430\u043B \u0432 \u043F\u043E\u0440\u044F\u0434\u043A\u0435":`\u043A\u0430\u043D\u0430\u043B: ${d.health_error||"\u043E\u0448\u0438\u0431\u043A\u0430"}`}),e(S,{size:"sm",variant:"ghost",className:"h-7",disabled:m||!p,onClick:()=>{b("mail_entity_health",{id:d.id})},children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"})]}),d.ready?null:s(J,{tone:"error",className:"mt-1 text-xs",children:["\u041D\u0435 \u0433\u043E\u0442\u043E\u0432\u043E \u043A \u043E\u0442\u043F\u0440\u0430\u0432\u043A\u0435: ",d.ready_problems.join(", ")]}),d.quota?s("p",{className:"mt-1 text-xs text-muted-foreground",children:["\u0421\u0435\u0433\u043E\u0434\u043D\u044F ",d.quota.sent_today," \u0438\u0437 ",d.quota.daily_limit," (\u043F\u0440\u043E\u0433\u0440\u0435\u0432 ",d.quota.warmup_stage,") \xB7 \u0432 \u043E\u0447\u0435\u0440\u0435\u0434\u0438 ",d.quota.queue_depth,d.quota.estimated_drain_at?` \xB7 \u043E\u0447\u0435\u0440\u0435\u0434\u044C \u0443\u0439\u0434\u0451\u0442 \u043A ${q(d.quota.estimated_drain_at)}`:"",d.quota.paused?` \xB7 \u043F\u0430\u0443\u0437\u0430: ${d.quota.pause_reason}`:""]}):null,e("ul",{className:"mt-2 flex flex-col gap-1 text-xs",children:d.senders.map(x=>s("li",{className:"flex flex-wrap items-center gap-x-2 gap-y-0.5",children:[e("span",{className:"font-medium",children:x.display_name}),s("span",{className:"text-muted-foreground",children:["<",x.address,">"]}),x.registered_at?e(J,{tone:"ok",children:"\u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D"}):e(J,{tone:"error",title:x.register_error,children:"\u043D\u0435 \u0437\u0430\u0440\u0435\u0433\u0438\u0441\u0442\u0440\u0438\u0440\u043E\u0432\u0430\u043D"})]},x.id))}),p?e(o1,{entity:d,busy:m,onAdd:(x,_)=>{b("mail_sender_save",{legal_entity_id:d.id,local_part:x,display_name:_})}}):null,e(r1,{entity:d,canEdit:p,onSaved:g})]},d.id)),r?s("section",{className:"mf-card overflow-hidden p-3",children:[e("h3",{className:"mb-2 font-semibold",children:"\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u0435\u043B\u044C \u043F\u043E \u0443\u043C\u043E\u043B\u0447\u0430\u043D\u0438\u044E"}),e("p",{className:"mb-2 text-xs text-muted-foreground",children:"\u041F\u043E\u0434\u0441\u0442\u0430\u0432\u043B\u044F\u0435\u0442\u0441\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u043F\u0440\u0438 \u043F\u0435\u0440\u0432\u043E\u043C \u043F\u0438\u0441\u044C\u043C\u0435 \u0438 \u0437\u0430\u043F\u0438\u0441\u044B\u0432\u0430\u0435\u0442\u0441\u044F \u0432 \u0435\u0451 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0443."}),s("div",{className:"grid gap-2 text-xs @md:grid-cols-2",children:[s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground",children:"\u041E\u0431\u0449\u0438\u0439"}),v(r.general.sender_id,d=>{b("mail_defaults_set",{...r,general:h(d)})})]}),Object.entries(We).map(([d,x])=>s("label",{className:"flex flex-col gap-1",children:[e("span",{className:"text-muted-foreground",children:x}),v(r.audiences[d]?.sender_id??"",_=>{b("mail_defaults_set",{...r,audiences:{...r.audiences,[d]:h(_)}})})]},d))]})]}):null,e("p",{className:"text-xs text-muted-foreground",children:"\u0422\u043E\u043A\u0435\u043D\u044B \u0448\u043B\u044E\u0437\u0430, \u0440\u0435\u043A\u0432\u0438\u0437\u0438\u0442\u044B \u0438 \u043F\u043E\u0434\u0432\u0430\u043B \u044E\u0440\u043B\u0438\u0446\u0430 \u0437\u0430\u0434\u0430\u044E\u0442\u0441\u044F \u0432 \u0432\u0435\u0431\u0435 Manifest."})]})}function o1({entity:t,busy:n,onAdd:a}){let[o,r]=f(""),[L,l]=f("");return s("div",{className:"mt-2 flex flex-wrap items-center gap-1 text-xs",children:[e(G,{className:"h-7 w-32 text-xs",placeholder:"evgenii",value:o,onChange:i=>r(i.target.value)}),s("span",{className:"text-muted-foreground",children:["@",t.subdomain]}),e(G,{className:"h-7 w-44 text-xs",placeholder:"Evgenii | MSG",value:L,onChange:i=>l(i.target.value)}),e(S,{size:"sm",variant:"outline",className:"h-7",disabled:n||!o||!L,onClick:()=>{a(o,L),r(""),l("")},children:"\u0414\u043E\u0431\u0430\u0432\u0438\u0442\u044C \u0430\u0434\u0440\u0435\u0441"})]})}function L1(){let t=E(),{status:n}=H(),[a,o]=f(null),[r,L]=f(null),[l,i]=f(null),[m,u]=f(null),p=R(()=>{t("mail_inbound_list",{triage:"unlinked",limit:100}).then(b=>o(b.items),b=>u(C(b)))},[t]);w(p,[p]);let g=async(b,c)=>{try{await t(b,c),L(null),i(null),p()}catch(h){u(C(h))}};return a?a.length===0?e(D,{children:"\u041D\u0435\u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0445 \u043F\u0438\u0441\u0435\u043C \u043D\u0435\u0442: \u0432\u0441\u0435 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D\u044B \u043A \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F\u043C."}):s("ul",{className:"flex flex-col divide-y divide-border mf-card overflow-hidden text-sm",children:[m?e("li",{className:"px-3 py-1 text-xs text-destructive",children:m}):null,a.map(b=>s("li",{className:"px-3 py-2",children:[s("button",{type:"button",className:"flex w-full flex-col text-left",onClick:()=>L(r===b.id?null:b.id),children:[s("span",{className:"flex justify-between gap-2 text-xs",children:[e(J,{tone:"warning",className:"truncate font-medium",children:b.from_name?`${b.from_name} <${b.from_address}>`:b.from_address}),s("span",{className:"flex-none text-muted-foreground",children:[on[b.kind]??b.kind," \xB7 ",q(b.received_at)]})]}),e("span",{className:"truncate text-xs",children:b.subject})]}),r===b.id?s("div",{className:"mt-2 flex flex-col gap-2",children:[e("pre",{title:"\u0412\u043D\u0435\u0448\u043D\u0435\u0435 \u043F\u0438\u0441\u044C\u043C\u043E: \u0442\u0435\u043A\u0441\u0442 \u043A\u0430\u043A \u0435\u0441\u0442\u044C, \u0441\u0441\u044B\u043B\u043A\u0438 \u0438 \u0432\u043B\u043E\u0436\u0435\u043D\u0438\u044F \u043D\u0435 \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438",className:"max-h-64 overflow-y-auto whitespace-pre-wrap rounded-md bg-muted/40 p-2 font-sans text-xs",children:b.reply_text||b.body_text}),b.attachments.length?s("p",{className:"text-xs text-muted-foreground",children:["\u0412\u043B\u043E\u0436\u0435\u043D\u0438\u044F: ",b.attachments.map(c=>c.filename).join(", ")]}):null,n?.canManage?s("div",{className:"flex flex-wrap items-center gap-2",children:[e("div",{className:"w-64",children:e(Ye,{value:l,onChange:i,placeholder:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C \u043A \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438\u2026"})}),e(S,{size:"sm",className:"h-7",disabled:!l,onClick:()=>{g("mail_inbound_link",{id:b.id,company_id:l?.id})},children:"\u041F\u0440\u0438\u0432\u044F\u0437\u0430\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>{g("mail_inbound_mark",{id:b.id,triage:"spam"})},children:"\u0421\u043F\u0430\u043C"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>{g("mail_inbound_mark",{id:b.id,triage:"ignored"})},children:"\u0418\u0433\u043D\u043E\u0440\u0438\u0440\u043E\u0432\u0430\u0442\u044C"})]}):null]}):null]},b.id))]}):e(D,{children:m??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"})}var K="py-1.5 px-2 text-[10px] font-semibold uppercase tracking-wide text-muted-foreground",l1={KZT:"\u20B8",INR:"\u20B9",USD:"$",RUB:"\u20BD",EUR:"\u20AC",GBP:"\xA3",AED:"AED",CNY:"\xA5"},Ee=(t,n)=>t==null?"\u2014":`${Math.round(t).toLocaleString("ru-RU")} ${l1[n]??n}`.trim();function Ae(){return e("span",{className:"flex-none rounded bg-[color-mix(in_oklab,var(--mf-blue)_12%,white)] px-1 text-[10px] font-medium text-[var(--mf-blue)]",title:"\u041D\u0430\u0431\u043E\u0440 \u0441 \u0430\u043A\u043A\u0443\u043C\u0443\u043B\u044F\u0442\u043E\u0440\u043E\u043C \u0438 \u0437\u0430\u0440\u044F\u0434\u043D\u044B\u043C",children:"\u043D\u0430\u0431\u043E\u0440"})}function wn({colSpan:t,title:n,note:a}){return e("tr",{className:"bg-[var(--mf-surface-strong)]",children:s("td",{colSpan:t,className:"px-3 py-1 text-[11px] font-semibold",children:[n,e("span",{className:"ml-1.5 font-normal text-muted-foreground",children:a})]})})}var kn="data-mf-scroll",Ct=t=>t?.closest(`[${kn}]`)??null;function Pa({back:t,onBack:n,title:a,meta:o,actions:r,children:L}){return e(Ba,{bar:e(Nn,{back:t,onBack:n,title:a,meta:o,actions:r,className:"shadow-[0_1px_0_var(--mf-line-300)]"}),children:L})}function Ba({bar:t,children:n}){let a=j(null),[o,r]=f(0);return lt(()=>{let L=a.current;if(!L||(r(L.offsetHeight),typeof ResizeObserver>"u"))return;let l=new ResizeObserver(()=>r(L.offsetHeight));return l.observe(L),()=>l.disconnect()},[]),s("div",{className:"flex flex-col",style:{"--mf-sticky":`${o}px`},children:[e("div",{ref:a,className:"sticky top-0 z-20",children:t}),n]})}function Er(t){let[n,a]=f(null),o=j(0),r=R(L=>{let l=Ct(t.current);L!==null?(l&&n===null&&(o.current=l.scrollTop),a(L),requestAnimationFrame(()=>{let i=Ct(t.current);i&&(i.scrollTop=0)})):(a(null),requestAnimationFrame(()=>{let i=Ct(t.current);i&&(i.scrollTop=o.current)}))},[t,n]);return[n,r]}var Cn="manifest:assortment-changed",St=()=>window.dispatchEvent(new Event(Cn)),i1={kit:"\u043D\u0430\u0431\u043E\u0440 \u2194 \u0431\u0435\u0437 \u0410\u041A\u0411",generation:"\u0434\u0440\u0443\u0433\u043E\u0435 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435",mains:"\u0437\u0430\u0440\u044F\u0434\u043D\u043E\u0435 \u043D\u0435 \u0434\u043B\u044F \u0441\u0435\u0442\u0438 \u0415\u0421",trim:"\u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E"};function Ia(t){return t.level>=1?{tone:"ok",text:t.reason==="trim"?"\u0435\u0441\u0442\u044C \xB7 \u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E":"\u0435\u0441\u0442\u044C"}:t.level>0?{tone:"warning",text:`\u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E \xB7 ${i1[t.reason??""]??t.reason??""}`}:{tone:"muted",text:"\u043D\u0435\u0442"}}function Pe(t){return t?t.source_kind==="stihl_country"?`${F(t.country)} \xB7 \u0441\u0430\u0439\u0442 STIHL`:`${t.company_name||t.title} \xB7 ${t.source_kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442"}`:""}function c1(t,n){return t.global_id?{key_kind:"global_id",key:t.global_id}:t.sku?{key_kind:"sku",key:t.sku}:{key_kind:"name",key:t.name??"",source_id:n?.source_id}}function Sn({rows:t,canDecide:n,showSource:a=!1,productLabel:o="\u0422\u043E\u0432\u0430\u0440 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430"}){let r=E(),[L,l]=f(null),[i,m]=f(!1),[u,p]=f(null),g=async(c,h)=>{m(!0),p(null);try{await r(c,h),St()}catch(v){p(C(v))}finally{m(!1)}},b=(c,h,v)=>g("assortment_decide",{need_id:c.need_id,level:h,reason:h===.5?c.reason??"":"",...c1(v??c,c.source)});return s(P,{children:[u?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:u}):null,s("table",{className:"w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-[var(--mf-sticky,0px)] z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"w-10 pl-3 text-right"),children:"\u2116"}),e("th",{className:k(K,"text-left @[34rem]:w-[32%]"),children:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F"}),e("th",{className:k(K,"hidden text-left @[34rem]:table-cell"),children:o}),e("th",{className:k(K,"w-[8.5rem] pr-3 text-left @[34rem]:w-[13.5rem]"),children:"\u0418\u0442\u043E\u0433"})]})}),e("tbody",{children:t.map(c=>{let h=`${c.source?.source_id??c.country}|${c.need_id}|${c.global_id??c.sku??c.name??""}`,v=L===h,d=Ia(c);return e(d1,{isOpen:v,onToggle:()=>l(v?null:h),cells:s(P,{children:[e("td",{className:"py-1 pl-3 pr-2 text-right tabular-nums text-muted-foreground",children:c.position_no}),s("td",{className:"max-w-0 px-2 py-1",children:[s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"truncate font-medium",children:c.model_key}),c.kit?e(Ae,{}):null]}),c.name?s("span",{className:"block truncate text-[11px] text-muted-foreground @[34rem]:hidden",title:c.name,children:[c.name,a&&c.source?` \xB7 ${Pe(c.source)}`:""]}):null]}),s("td",{className:"hidden max-w-0 px-2 py-1 @[34rem]:table-cell",title:c.name,children:[e("span",{className:"block truncate",children:c.name??"\u2014"}),a&&c.source?e("span",{className:"block truncate text-[10px] text-muted-foreground",children:Pe(c.source)}):null]}),e("td",{className:"py-1 pl-2 pr-3",children:s("span",{className:"flex min-w-0 items-start gap-1.5",children:[e(ge,{tone:d.tone,className:"mt-1 flex-none"}),e("span",{className:"min-w-0 leading-snug",children:d.text}),c.review&&!c.decided?e("span",{className:"text-[var(--mf-amber)]",title:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C",children:"\u25CF"}):null,c.decided?e("span",{className:"text-[10px] text-muted-foreground",title:"\u0420\u0435\u0448\u0435\u043D\u0438\u0435 \u0447\u0435\u043B\u043E\u0432\u0435\u043A\u0430",children:"\u2713"}):null]})})]}),detail:s("div",{className:"flex flex-col gap-2 text-xs",children:[e("div",{children:c.name?s(P,{children:["\u0412\u044B\u0431\u0440\u0430\u043D\u043E: ",e("b",{children:c.name}),c.sku?s("span",{className:"font-mono",children:[" \xB7 ",c.sku]}):null,c.url?e("a",{className:"ml-1 underline",href:c.url,target:"_blank",rel:"noreferrer",children:"\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"}):null,c.decided?" \xB7 \u0440\u0435\u0448\u0435\u043D\u0438\u0435 \u0447\u0435\u043B\u043E\u0432\u0435\u043A\u0430":c.via==="article"?" \xB7 \u043F\u043E \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0443":c.via==="model"?" \xB7 \u043F\u043E \u043C\u043E\u0434\u0435\u043B\u0438":" \xB7 \u043F\u043E \u0441\u0435\u043C\u0435\u0439\u0441\u0442\u0432\u0443",c.source?s("span",{className:"text-muted-foreground",children:[" \xB7 ",Pe(c.source)]}):null]}):e("span",{className:"text-muted-foreground",children:"\u0412 \u044D\u0442\u043E\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0435 \u043F\u043E\u0434\u0445\u043E\u0434\u044F\u0449\u0435\u0433\u043E \u0442\u043E\u0432\u0430\u0440\u0430 \u043D\u0435 \u043D\u0430\u0448\u043B\u043E\u0441\u044C."})}),n&&c.name?s("div",{className:"flex flex-wrap gap-1.5",children:[e(S,{size:"sm",className:"h-7 px-2",disabled:i,onClick:()=>{b(c,1)},children:"\u0422\u043E\u0442 \u0436\u0435 \u0442\u043E\u0432\u0430\u0440"}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:i,onClick:()=>{b(c,.5)},children:"\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E"}),e(S,{size:"sm",variant:"ghost",className:"h-7 px-2 text-destructive",disabled:i,onClick:()=>{b(c,0)},children:"\u041D\u0435 \u0442\u043E"}),c.decided&&c.decision_id?e(S,{size:"sm",variant:"ghost",className:"h-7 px-2",disabled:i,onClick:()=>{g("assortment_decision_revoke",{id:c.decision_id})},children:"\u0412\u0435\u0440\u043D\u0443\u0442\u044C \u0430\u0432\u0442\u043E\u043C\u0430\u0442\u0438\u0447\u0435\u0441\u043A\u0438\u0439"}):null]}):null,n&&c.alternatives?.length?s("div",{className:"flex flex-col gap-0.5",children:[e("span",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:"\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u044B \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438"}),c.alternatives.map(x=>s("div",{className:"flex items-center gap-2",children:[s("span",{className:"min-w-0 flex-1 truncate",title:x.name,children:[x.name," ",e("span",{className:"font-mono text-muted-foreground",children:x.sku}),x.kit?" \xB7 \u043D\u0430\u0431\u043E\u0440":""]}),e(S,{size:"sm",variant:"outline",className:"h-6 px-2 text-[11px]",disabled:i,onClick:()=>{b(c,1,x)},children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C"})]},`${x.global_id}|${x.sku}|${x.name}`))]}):null]})},h)})})]})]})}function d1({isOpen:t,onToggle:n,cells:a,detail:o}){return s(P,{children:[e("tr",{className:k("cursor-pointer border-b border-[var(--mf-line-200)] hover:bg-state-hover",t&&"bg-state-active"),onClick:n,"aria-expanded":t,children:a}),t?e("tr",{className:"border-b border-[var(--mf-line-300)]",children:e("td",{colSpan:4,className:"bg-[var(--mf-paper)] p-2.5",children:o})}):null]})}var Ar={FJ:"M949.9,341.9L950.7,341.4L951.4,342.3L950.5,344.0L948.8,344.4L947.4,344.0L947.5,342.6L948.8,341.6ZM955.6,339.0L953.7,339.8L951.9,340.4L951.8,339.3L953.3,338.6L954.2,338.4L956,337.5L956,337.5L955.6,339.0ZM4,337.5L4,337.5L4,337.5L4.5,337.3L4.5,338.8L4.3,339.0L4.3,339.0L4,337.5Z",TZ:"M570.7,290.6L571.1,291.0L580.8,297.3L581.0,299.1L584.8,302.1L583.5,306.0L583.6,307.7L585.3,308.9L585.3,309.7L584.6,311.5L584.7,312.5L584.5,314.0L585.4,315.9L586.4,319.0L587.3,319.6L585.1,321.4L582.2,322.6L580.6,322.6L579.6,323.5L577.8,323.6L577.1,324.0L573.9,323.1L571.9,323.4L571.3,319.1L570.4,317.7L569.9,316.8L567.3,316.3L565.8,315.3L564.1,314.8L563.1,314.3L562.0,313.5L560.6,309.6L559.1,307.9L558.6,306.1L558.9,304.5L558.4,301.6L559.5,301.5L560.5,300.3L561.6,298.7L562.2,298.1L562.2,297.1L561.6,296.4L561.5,295.1L562.3,294.8L562.4,292.9L561.4,291.2L562.3,290.8L565.2,290.8Z",EH:"M457.6,201.8L457.6,202.0L457.5,202.6L457.4,207.3L448.9,207.2L448.8,215.1L446.4,215.4L445.7,217.0L446.1,221.5L435.8,221.5L435.2,222.5L435.4,221.2L435.4,221.2L441.3,221.0L441.7,219.8L442.8,218.4L443.8,214.1L447.5,210.8L448.8,206.9L449.6,206.6L450.5,204.2L452.7,203.9L453.6,204.3L454.8,204.3L455.6,203.6L457.2,203.5L457.2,201.8Z",CA:"M190.2,135.9L189.9,135.8L187.0,132.9L186.1,131.6L182.6,130.4L182.9,127.7L184.4,125.9L182.2,124.6L183.4,122.3L182.0,120.1L183.0,118.6L185.2,117.2L186.4,115.4L183.9,113.5L184.0,110.3L184.2,108.2L183.1,106.9L182.5,105.8L182.5,104.3L179.6,105.2L176.2,106.8L175.7,104.9L175.2,103.7L173.7,102.9L171.6,102.8L185.5,87.1L195.1,77.3L198.2,77.9L200.2,79.1L202.1,79.4L204.9,78.3L208.2,77.5L210.9,77.8L215.0,76.6L218.9,76.0L219.3,77.1L221.3,76.5L222.9,75.2L224.0,75.5L225.3,77.9L229.6,76.1L228.1,78.1L231.0,77.6L232.4,76.9L234.7,77.0L236.9,78.1L240.8,79.1L243.3,79.5L245.4,79.4L247.1,80.7L243.1,82.0L246.4,82.6L252.2,82.3L254.3,81.8L255.3,83.4L258.5,82.1L257.3,80.9L259.3,80.0L261.9,79.9L263.7,79.6L264.9,80.3L265.9,81.7L268.3,81.5L271.1,82.7L274.6,82.3L277.6,82.3L278.4,80.7L280.6,80.2L283.1,81.1L281.5,83.6L284.2,81.5L285.8,81.6L288.4,78.9L287.3,77.3L285.7,76.3L287.9,73.4L291.6,71.5L293.9,72.0L295.1,73.1L295.9,76.0L293.2,77.3L296.6,77.8L294.9,80.5L298.9,78.4L300.3,80.1L298.5,82.1L299.4,83.9L302.7,82.0L305.6,79.7L307.4,76.8L310.2,77.0L312.9,77.4L314.9,78.7L314.3,80.0L312.0,81.4L312.6,82.8L311.6,84.1L306.5,86.0L303.4,86.4L301.7,85.6L300.3,87.0L297.0,89.2L295.7,90.4L292.2,92.3L289.1,92.5L286.7,93.6L285.6,95.4L282.9,95.8L278.9,98.0L274.8,101.2L272.7,103.4L270.8,106.7L273.8,107.1L273.3,109.8L273.3,112.0L276.7,111.4L280.2,112.7L281.9,113.8L282.9,115.1L285.4,115.9L287.2,117.2L290.9,117.3L293.2,117.6L291.8,120.1L291.2,123.1L291.5,126.4L293.9,129.2L296.1,128.3L298.5,125.2L299.1,120.6L298.2,119.0L302.4,117.7L305.8,115.6L307.9,113.6L308.5,111.7L308.0,109.2L306.3,107.1L310.2,104.1L310.5,101.6L311.8,97.2L313.6,96.5L316.9,97.3L319.0,97.6L321.2,96.8L322.7,97.8L324.7,99.4L324.9,100.5L328.7,100.7L327.6,103.1L326.9,106.6L328.7,107.1L329.7,108.8L333.5,107.2L336.8,104.1L338.8,102.7L339.5,105.3L341.1,108.9L342.3,112.3L340.8,114.2L343.3,115.8L344.8,117.5L348.2,118.2L349.4,119.1L349.5,121.6L351.2,122.0L351.8,123.1L351.1,126.4L349.1,127.6L347.1,128.6L343.0,129.7L339.4,132.1L335.3,132.6L330.4,132.0L326.9,132.0L324.4,132.2L321.8,134.3L318.4,135.6L313.7,139.6L310.2,142.4L312.3,141.9L317.4,138.0L323.1,135.4L326.7,135.2L328.3,136.6L325.5,138.7L325.4,141.9L325.5,144.2L328.2,145.7L332.3,145.3L335.6,141.9L335.2,144.1L336.5,145.2L333.0,147.2L327.2,149.0L324.5,150.2L321.2,152.4L319.4,152.2L320.0,149.6L324.9,147.1L321.0,147.2L318.2,147.6L317.1,145.8L318.3,141.7L317.5,140.8L315.7,141.3L315.2,140.5L312.7,142.8L311.3,145.2L310.0,146.6L308.8,147.1L308.0,147.2L307.6,148.0L303.1,148.0L299.4,148.0L298.2,148.6L295.0,150.8L294.6,151.0L293.5,152.2L291.2,152.2L288.8,152.2L287.6,152.7L287.8,153.3L287.7,154.2L287.6,154.5L283.9,156.1L281.3,156.5L277.9,158.2L277.3,158.2L276.6,157.7L276.5,157.3L276.6,156.9L277.5,155.9L279.2,154.2L280.5,152.4L280.9,149.7L281.3,146.9L279.3,145.5L279.7,145.0L279.5,144.6L278.9,144.6L278.6,144.1L278.7,143.4L278.1,143.7L277.5,143.6L277.8,143.3L277.3,143.0L277.4,142.2L275.9,141.2L274.3,140.2L272.4,139.0L270.6,138.0L268.2,138.8L267.4,138.8L264.8,138.1L262.7,138.4L260.8,137.5L258.6,137.0L257.0,136.8L256.5,136.3L256.8,134.7L256.0,134.7L255.5,135.9L250.6,135.9L242.5,135.9L234.5,135.9L227.4,135.9L220.3,135.9L213.4,135.9L206.2,135.9L203.9,135.9L196.9,135.9ZM299.3,96.8L301.6,95.5L304.5,95.6L304.2,96.1L300.9,97.6L299.4,97.6ZM323.5,69.3L322.1,68.0L322.8,67.1L323.8,66.9L328.1,67.2L330.6,68.6L330.4,69.2L328.4,69.2L326.3,69.1L323.9,69.5ZM306.7,97.8L308.0,97.0L308.8,97.1L309.1,97.6L307.5,99.1L306.7,98.9L306.5,98.0ZM300.3,63.9L298.6,64.8L295.9,64.7L294.1,64.0L296.0,62.9L299.2,62.3L300.2,63.1ZM304.9,57.8L303.9,57.9L300.6,57.7L300.7,57.1L304.4,57.1L305.3,57.5ZM302.1,54.9L303.5,55.7L302.3,56.5L299.1,57.0L298.1,56.5L298.1,55.6L298.8,54.7L301.1,54.8ZM309.8,65.3L306.9,65.0L302.4,64.2L302.7,62.9L303.4,61.7L302.4,60.6L298.7,60.3L297.1,59.6L298.7,58.6L302.4,58.8L303.9,59.5L307.6,59.5L308.6,60.3L307.4,61.2L309.2,61.8L310.0,62.3L312.5,62.5L315.1,62.7L318.5,62.1L322.5,61.9L325.5,62.1L326.9,63.0L326.7,64.0L325.1,64.7L321.8,65.2L319.6,64.9L313.8,65.3ZM273.9,56.3L276.1,56.7L274.8,57.4L270.6,58.1L268.6,57.3L270.9,56.6ZM276.0,54.8L277.9,55.3L275.2,55.7L272.1,55.7L272.5,55.4L275.2,54.7ZM350.6,128.9L348.8,130.8L346.6,133.4L348.4,132.4L349.8,133.0L348.7,134.1L350.6,134.9L351.9,134.2L354.0,135.1L352.7,137.3L354.5,136.8L354.4,138.4L354.7,140.3L353.1,142.9L352.0,143.1L350.6,142.5L351.7,140.0L351.1,139.6L347.7,142.2L346.3,142.1L348.3,140.7L346.2,140.0L343.6,140.2L339.0,140.1L338.9,139.2L340.7,138.1L339.8,137.3L342.3,135.5L346.0,130.7L347.9,129.0L350.2,128.0L351.3,128.1ZM303.5,89.5L305.3,90.5L307.2,91.3L306.7,92.6L308.4,92.4L309.5,93.3L307.1,94.2L304.2,93.5L303.6,92.3L300.7,93.7L296.9,95.2L297.1,93.5L294.0,93.8L296.6,92.5L298.1,90.3L300.2,87.8L301.6,88.0L301.3,89.2L302.6,88.8ZM324.7,70.4L327.2,69.4L330.8,70.7L332.9,71.9L332.5,73.1L336.5,72.5L337.7,74.1L342.0,75.1L343.3,76.2L344.0,78.6L339.7,79.9L343.7,81.6L346.7,82.2L348.6,84.6L351.8,84.8L350.3,86.7L345.3,89.8L343.2,88.7L341.1,86.1L338.2,86.4L337.3,87.9L338.8,89.5L341.1,90.8L341.7,91.5L341.9,94.2L340.4,96.2L338.0,95.5L333.6,93.3L335.6,95.6L337.1,97.3L337.1,98.3L331.7,97.2L327.8,95.5L325.8,94.2L326.9,93.4L324.4,92.0L321.9,90.7L321.6,91.5L315.2,91.9L313.9,91.0L316.3,89.0L320.3,88.9L324.8,88.6L324.6,87.6L325.9,86.3L329.9,83.7L329.9,82.5L329.6,81.6L327.1,80.3L323.5,79.4L325.1,78.7L323.9,77.1L322.2,77.0L321.1,76.1L319.6,76.8L315.7,77.2L308.7,76.6L304.9,75.8L301.9,75.4L300.9,74.5L303.7,73.3L300.9,73.3L302.0,70.7L305.1,68.5L307.8,67.5L313.3,66.8L310.7,68.4L311.2,70.0L314.4,68.0L320.0,66.9L321.7,69.5L320.4,71.2ZM297.0,66.0L301.0,66.1L304.3,66.7L299.8,68.9L297.1,69.4L293.6,71.3L291.4,71.2L291.8,69.0L292.8,67.7L294.6,66.6ZM247.1,61.1L252.2,59.3L257.7,57.8L260.5,57.8L263.4,57.5L261.3,59.3L259.0,60.1L257.1,60.3L252.5,61.3L249.1,61.6ZM176.5,120.9L178.9,120.6L175.9,124.0L176.4,126.3L175.5,126.3L174.9,125.0L175.0,123.6L174.4,122.7L174.9,121.4L175.7,120.5ZM287.3,53.7L290.5,54.0L294.7,54.8L295.0,55.9L294.8,56.9L292.0,56.6L289.7,55.9L285.7,55.8L288.1,55.1L286.5,54.6ZM187.8,137.3L186.3,137.7L183.2,136.4L183.1,135.3L181.6,134.3L181.7,133.4L179.6,132.9L179.7,131.2L180.3,130.5L182.4,131.2L183.5,131.6L185.5,132.0L185.7,133.0L186.1,134.4L187.7,135.7ZM245.5,65.2L247.7,65.7L252.5,65.8L253.7,66.6L254.9,67.6L251.8,68.2L245.4,70.0L241.4,71.8L240.4,72.9L234.0,74.2L234.0,73.0L230.6,71.7L232.5,70.6L235.6,68.8L238.9,67.1L238.5,65.6ZM275.0,61.8L277.0,61.4L278.9,61.5L278.2,62.7L276.0,63.8L269.2,64.2L263.4,65.3L260.4,65.3L260.9,64.5L265.9,63.4L256.9,63.7L254.7,63.3L259.6,60.9L262.1,60.3L266.6,61.1L268.6,62.5L271.8,62.7L271.2,60.4L273.8,59.5L275.5,59.8L275.0,60.9ZM271.5,68.6L272.9,69.6L272.2,72.1L271.4,73.9L273.8,75.2L276.5,76.4L275.5,77.6L272.0,77.8L272.6,78.8L271.2,79.8L267.8,79.4L264.8,78.6L262.3,78.8L257.8,79.7L252.4,80.1L248.5,80.3L248.4,79.1L246.2,78.4L244.2,78.7L243.4,76.6L245.0,76.3L248.5,75.9L251.2,76.0L254.2,75.5L250.8,74.9L246.4,75.1L243.6,75.1L243.3,74.1L248.8,73.1L245.7,73.2L242.9,72.5L246.2,70.6L248.5,69.6L255.1,68.0L256.7,68.5L254.7,69.7L259.7,68.9L261.3,70.2L264.7,68.9L265.8,69.7L265.3,72.2L267.2,71.2L267.9,68.6L269.9,68.2ZM282.7,69.6L281.9,67.9L285.1,66.7L287.0,67.2L290.7,66.9L290.7,67.6L288.0,68.8L290.1,69.9L288.1,72.2L284.1,73.2L282.4,73.0L281.7,72.0L278.3,70.0L279.0,69.2ZM272.5,67.3L275.2,67.2L276.2,67.8L273.1,69.4L271.5,67.7ZM294.5,59.7L295.0,60.8L294.0,62.0L291.6,63.8L288.3,64.1L286.5,63.7L287.8,62.3L284.5,62.5L286.0,60.6L288.0,60.7L291.5,59.9L294.1,60.0ZM307.5,50.9L309.5,50.2L311.5,50.1L311.2,49.6L315.5,49.5L316.6,50.6L319.1,51.1L321.7,51.5L321.7,52.9L323.3,53.6L320.2,54.3L315.3,56.0L311.9,56.2L308.3,55.9L307.2,55.0L308.0,54.1L310.0,53.5L306.6,53.6L305.4,52.8L305.2,51.8ZM318.4,48.2L321.5,47.8L323.6,47.7L327.5,47.4L330.9,46.7L332.9,46.8L334.2,47.3L336.7,46.3L339.4,46.0L342.7,45.8L348.1,45.7L348.8,45.9L354.1,45.6L357.8,45.7L361.4,45.8L365.9,46.0L369.4,46.2L372.1,46.7L371.6,47.3L366.6,48.1L361.9,48.5L360.0,49.0L363.8,49.0L358.6,50.2L355.2,50.8L350.8,52.6L346.7,53.0L345.2,53.4L339.5,53.7L341.8,54L340.2,54.3L340.9,55.5L338.6,56.3L335.3,56.9L333.7,57.8L330.6,58.5L330.5,59.1L333.7,59.0L333.4,59.5L327.4,61.0L322.9,60.3L317.1,60.7L314.5,60.4L311.0,60.3L311.6,59.1L315.5,58.6L316.0,56.9L317.3,56.7L321.4,57.7L320.1,56.3L317.5,55.8L319.7,54.9L323.4,54.4L324.6,53.6L322.8,52.8L323.1,51.6L327.9,51.7L329.2,52.0L332.7,51.2L328.9,50.9L322.5,51.1L320.0,50.3L319.4,49.5L318.0,48.9ZM324.8,83.2L323.1,84.0L320.7,84.2L320.9,82.9L322.5,81.4L324.6,81.0L325.8,81.7L325.3,82.9ZM285.1,77.8L285.6,78.8L283.7,79.8L281.5,79.0L279.7,79.2L277.7,78.1L280.1,77.3L282.3,76.1L283.9,76.9L284.8,77.3ZM328.5,133.2L329.4,133.0L332.3,133.7L334.3,135.0L334.2,135.5L333.1,135.6L330.3,134.6ZM327.3,141.8L327.7,143.3L329.3,143.7L331.6,143.6L330.1,144.8L329.1,145.0L326.4,143.7L326.1,142.7Z",US:"M190.2,135.9L196.9,135.9L203.9,135.9L206.2,135.9L213.4,135.9L220.3,135.9L227.4,135.9L234.5,135.9L242.5,135.9L250.6,135.9L255.5,135.9L256.0,134.7L256.8,134.7L256.5,136.3L257.0,136.8L258.6,137.0L260.8,137.5L262.7,138.4L264.8,138.1L267.4,138.8L268.2,138.8L270.6,138.0L272.4,139.0L274.3,140.2L275.9,141.2L277.4,142.2L277.3,143.0L277.8,143.3L277.5,143.6L278.1,143.7L278.7,143.4L278.6,144.1L278.9,144.6L279.5,144.6L279.7,145.0L279.3,145.5L281.3,146.9L280.9,149.7L280.5,152.4L279.2,154.2L277.5,155.9L276.6,156.9L276.5,157.3L276.6,157.7L277.3,158.2L277.9,158.2L281.3,156.5L283.9,156.1L287.6,154.5L287.7,154.2L287.8,153.3L287.6,152.7L288.8,152.2L291.2,152.2L293.5,152.2L294.6,151.0L295.0,150.8L298.2,148.6L299.4,148.0L303.1,148.0L307.6,148.0L308.0,147.2L308.8,147.1L310.0,146.6L311.3,145.2L312.7,142.8L315.2,140.5L315.7,141.3L317.5,140.8L318.3,141.7L317.1,145.8L318.2,147.6L318.3,148.6L315.4,150.1L312.6,151.1L309.8,152.0L308.0,153.8L307.4,154.5L306.9,156.2L307.3,157.8L308.3,157.9L308.3,156.7L308.9,157.4L308.5,158.3L306.7,158.8L305.5,158.8L303.6,159.3L302.5,159.4L301.0,159.6L298.7,160.5L302.5,159.9L303.0,160.5L299.4,161.4L297.8,161.4L298.0,161.0L297.0,161.9L297.7,162.0L296.6,164.3L294.2,166.6L294.2,165.9L293.7,165.7L293.1,164.9L293.1,166.6L293.6,167.1L293.4,168.3L292.3,169.5L290.2,172.0L290.1,171.9L291.3,169.8L290.4,168.6L290.7,166.0L289.9,167.3L289.9,169.3L288.4,168.8L289.9,169.8L289.3,172.8L289.9,173.0L289.9,174.1L289.6,177.2L287.4,179.5L284.6,180.4L282.5,182.2L281.2,182.4L279.7,183.6L279.1,184.6L275.9,186.6L274.1,188.1L272.5,190.0L271.6,192.2L271.6,194.4L271.9,197.0L272.7,199.2L272.4,200.6L273.0,204.2L272.5,206.3L272.2,207.5L271.2,209.4L270.4,209.8L269.2,209.4L269.0,208.1L268.2,207.4L267.2,204.7L266.5,202.3L266.3,201.1L267.3,199.0L266.9,197.3L265.4,194.7L264.5,194.2L261.6,195.6L261.2,195.4L260.3,194.0L258.9,193.2L255.9,193.6L253.7,193.3L251.7,193.5L250.5,194.0L250.8,194.8L250.5,196.1L250.9,196.7L250.3,197.1L249.4,196.6L248.3,197.2L246.5,197.1L245.0,195.5L242.6,195.9L240.9,195.1L239.3,195.4L237.0,196.1L234.1,198.4L231.2,199.8L229.5,201.2L228.6,202.6L228.1,204.8L227.9,206.3L228.1,207.4L227.1,207.4L225.4,206.8L223.6,205.8L223.2,204.3L223.1,202.1L222.0,200.4L221.6,198.5L220.8,196.4L219.3,195.2L217.2,195.2L214.9,197.7L213.1,196.7L212.0,195.8L211.8,194.1L211.4,192.5L210.2,191.1L209.2,190.1L208.6,189.0L204.2,189.0L203.8,190.3L201.8,190.3L196.7,190.3L191.5,188.1L188.1,186.6L188.6,186.0L185.2,186.3L182.3,186.6L182.4,185.0L181.3,183.2L180.3,182.8L180.3,181.9L178.9,181.8L178.3,180.9L176.1,180.6L175.6,180.1L175.9,178.4L174.6,175.3L174.2,171.0L174.6,170.2L173.9,169.2L173.1,166.6L173.8,164.1L173.2,162.4L174.9,159.8L176.0,157.2L176.3,154.8L178.7,151.9L180.3,149.2L182.0,146.4L183.7,142.3L184.4,139.7L184.4,138.3L185.0,137.7L187.9,138.7L187.7,141.6L188.7,140.8L189.6,138.3ZM71.8,225.4L72.2,225.7L72.6,226.1L73.0,227.2L72.9,227.3L71.7,228.0L70.7,228.5L70.2,229.0L69.6,228.6L69.9,227.7L69.8,226.6L70.0,226.2L70.6,225.7L70.6,225.1L70.8,224.8L71.0,224.9ZM70.8,223.3L70.5,223.6L69.6,223.9L69.3,223.2L69.1,222.9L69.1,222.7L69.4,222.5L70.3,222.8ZM69.2,222.0L69.0,222.3L67.6,222.2L67.9,221.8ZM66.3,220.3L66.5,220.5L67.0,221.5L66.8,221.7L66.6,221.7L65.7,221.5L65.6,220.8L65.5,220.7ZM63.3,218.7L63.1,219.5L62.7,219.8L62.0,219.2L62.2,219.0L62.7,218.7ZM116.1,102.6L117.6,102.9L116.8,103.9L115.0,104.4L114.1,103.9L113.5,103.1ZM139.0,109.5L140.3,109.7L140.5,110.5L137.4,111.9L134.2,113.0L133.7,112.3L134.5,110.9L137.4,109.9ZM195.1,77.3L185.5,87.1L171.6,102.8L173.7,102.9L175.2,103.7L175.7,104.9L176.2,106.8L179.6,105.2L182.5,104.3L182.5,105.8L183.1,106.9L184.2,108.2L184.0,110.3L183.9,113.5L186.4,115.4L185.2,117.2L183.0,118.6L182.5,117.5L181.1,116.6L182.3,114.1L181.1,111.7L181.9,109.0L179.9,108.8L176.5,108.8L174.5,107.9L172.3,105.0L170.6,104.5L167.6,103.4L164.4,103.7L161.2,102.4L159.7,101.2L156.7,101.8L155.5,103.7L154.1,103.9L151.0,104.5L148.3,105.5L145.3,106.1L146.4,104.4L149.9,101.6L153.0,100.8L153.1,100.1L148.9,101.6L145.7,103.5L140.7,105.5L141.1,106.9L137.2,109.0L133.8,110.2L130.8,111.0L129.1,112.3L124.3,113.8L122.4,115.2L118.7,116.4L117.4,116.2L114.6,117.0L111.4,118.0L108.7,119.0L104.1,119.8L104.1,119.3L107.8,117.9L110.8,117.0L114.6,115.4L117.7,115.1L119.8,113.9L124.4,112.2L125.4,111.6L128.0,110.6L130.3,108.4L132.9,106.8L129.6,107.6L129.3,107.1L127.2,108.2L127.1,106.7L125.5,107.7L126.0,106.3L122.7,107.5L121.4,107.5L122.8,105.8L124.2,104.7L123.7,103.7L120.3,104.3L119.8,102.9L118.9,102.3L120.5,100.7L120.0,99.5L122.5,97.9L125.8,96.3L128.0,94.9L130.0,94.7L131.0,95.1L134.1,93.8L135.4,94.0L137.9,93.2L138.8,91.9L138.1,91.5L140.8,90.4L139.4,90.4L136.6,91.0L135.3,91.6L134.3,91.0L130.9,91.3L128.5,90.7L128.8,89.6L127.9,88.0L132.1,86.9L138.2,85.6L139.9,85.6L138.2,86.9L142.7,86.8L142.8,85.1L141.4,84.1L141.4,82.8L140.7,81.6L138.9,80.8L141.6,79.4L145.3,79.3L149.2,78.1L151.2,76.9L154.7,75.6L157.0,75.3L162.1,74.2L163.8,74.4L168.4,73.0L170.8,73.5L171.0,74.7L172.4,74.2L175.6,74.3L174.8,74.9L177.4,75.4L179.7,75.1L183.1,75.9L186.7,76.2L187.9,76.5L191.0,76.1L193.3,76.9ZM114.6,93.1L115.4,93.7L117.0,93.4L117.9,94.1L119.7,94.5L119.2,94.8L116.9,95.4L115.9,94.8L115.7,94.3L113.6,94.4L113.4,94.2Z",KZ:"M685.8,135.2L684.8,137.2L682.9,137.5L683.9,140.5L683.1,141.9L678.0,140.9L678.2,146.3L677.2,147.0L672.8,148.2L676.7,153.6L675.3,154.4L676.0,156.1L674.4,155.7L672.8,154.6L669.1,154.2L665.0,154.2L664.3,154.5L660.4,153.2L659.2,153.8L659.3,155.7L655.0,154.6L653.5,155.0L653.4,156.4L652.1,156.9L649.4,159.1L648.9,161.3L648.0,161.3L647.0,159.9L643.8,159.8L642.7,157.2L641.5,157.2L640.9,154.1L637.4,151.9L633.3,152.1L630.6,152.6L627.6,149.8L625.4,148.6L621.1,146.5L620.6,146.2L614.8,148.0L617.3,159.3L616.1,159.5L613.9,157.1L612.1,156.2L609.4,156.8L608.5,157.9L608.3,157.1L608.6,155.8L607.9,154.8L604.9,153.7L603.3,151.0L601.8,150.2L601.5,149.2L603.9,149.5L603.5,147.2L605.5,146.7L607.7,147.2L607.4,144.2L606.6,142.3L604.2,142.5L602.0,141.8L599.6,143.1L597.5,143.7L596.1,143.2L596.1,141.7L594.1,139.6L592.4,139.7L589.9,137.7L590.8,135.4L590.0,134.8L591.2,131.5L594.0,133.2L593.8,131.0L597.8,127.8L601.4,127.7L607.1,129.8L610.1,131.0L612.3,129.7L616,129.7L619.4,131.2L619.8,130.3L623.1,130.5L623.3,129.0L618.9,127.0L620.7,125.6L620.0,124.7L622.0,124.0L619.7,122.0L620.5,121.0L628.7,119.9L629.5,119.2L634.9,118.1L636.5,116.9L640.8,117.6L642.6,120.6L644.7,119.9L648.0,120.9L648.5,122.5L650.6,122.3L655.2,119.5L654.8,120.5L658.6,122.7L666.7,130.3L667.3,128.7L671.2,130.4L674.2,129.7L675.8,130.2L677.6,131.9L679.4,132.5L680.9,133.8L683.8,133.4Z",UZ:"M617.3,159.3L614.8,148.0L620.6,146.2L621.1,146.5L625.4,148.6L627.6,149.8L630.6,152.6L633.3,152.1L637.4,151.9L640.9,154.1L641.5,157.2L642.7,157.2L643.8,159.8L647.0,159.9L648.0,161.3L648.9,161.3L649.4,159.1L652.1,156.9L653.4,156.4L654.2,156.7L652.6,158.7L654.7,159.8L656.3,159.1L659.6,160.7L657.1,162.9L655.1,162.6L654.1,162.7L653.5,161.8L653.7,160.4L650.6,161.1L650.3,163.1L649.5,164.8L647.4,164.7L647.1,166.0L649.1,166.8L650.1,169.1L649.4,172.2L647.4,171.6L646.0,171.5L645.7,169.6L642.1,168.3L639.1,166.8L637.2,165.3L633.9,163.2L632.0,160.0L631.1,159.5L628.4,159.6L627.4,159.0L626.5,156.5L622.9,154.9L621.2,156.7L619.4,157.7L620.1,159.3Z",PG:"M857.2,295.7L861.8,297.9L866.7,299.6L868.4,301.2L869.8,302.8L870.2,304.6L874.5,306.5L875.0,308.2L872.5,308.5L872.9,310.5L875.1,312.6L876.5,315.9L878.1,315.8L877.8,317.1L879.8,317.7L878.9,318.3L881.6,319.6L881.2,320.5L879.4,320.7L878.9,319.9L876.6,319.5L874.0,319.1L872.1,317.1L870.8,315.4L869.7,312.7L866.3,311.3L864.0,312.2L862.3,313.2L862.4,315.5L860.2,316.6L858.7,316.0L856.0,315.9L856.8,305.8ZM888.3,299.0L889.2,300.0L889.5,301.6L888.6,302.4L888.2,300.6L887.6,299.4L886.4,298.4L885.0,297.1L883.1,296.2L883.8,295.4L885.3,296.3L886.1,297.0L887.2,297.7ZM884.3,305.8L882.8,306.5L881.3,307.2L879.9,307.2L877.8,306.3L876.3,305.5L876.6,304.5L879.0,305.0L880.5,304.7L881.0,303.2L881.4,303.2L881.5,304.8L883.0,304.6L883.9,303.5L885.4,302.4L885.2,300.6L886.8,300.5L887.3,301.0L887.2,302.7L886.2,304.6L884.8,304.9ZM893.6,304.2L894.4,304.9L895.6,306.9L896.7,307.9L896.3,308.8L895.5,309.1L894.5,307.9L893.4,305.9L893.0,303.6L893.4,303.3Z",ID:"M857.2,295.7L856.8,305.8L856.0,315.9L853.9,313.4L851.2,312.7L850.5,313.6L847.1,313.7L848.4,311.2L850.2,310.3L849.8,307.0L848.6,304.4L843.6,301.8L841.4,301.5L837.5,298.6L836.7,300.1L835.6,300.4L835.1,299.3L835.1,297.9L833.1,296.4L836.0,295.3L837.9,295.3L837.7,294.5L833.8,294.5L832.8,292.7L830.4,292.1L829.3,290.6L832.9,289.8L834.3,288.8L838.6,290.1L839.0,291.2L839.6,296.2L842.3,298.1L844.7,294.8L847.8,292.9L850.2,292.9L852.4,294.0L854.4,295.1ZM813.2,315.2L813.4,315.8L813.4,316.8L811.4,319.1L809.1,319.8L808.8,319.4L809.1,318.3L810.5,316.4ZM838.4,309.0L838.3,306.7L838.8,305.6L839.5,304.5L840.0,305.4L839.9,306.9ZM795.2,274.9L793.8,277.7L795.8,280.6L795.4,282.0L798.4,284.9L795.3,285.2L794.4,287.4L794.5,290.2L791.9,292.3L791.8,295.4L790.6,300.1L790.3,299.0L787.2,300.4L786.2,298.5L784.3,298.3L783.0,297.3L779.7,298.4L778.8,296.9L777.1,297.1L774.9,296.8L774.5,292.6L773.2,291.7L771.9,289.1L771.6,286.4L771.9,283.5L773.4,281.5L773.9,283.5L775.7,285.3L777.5,284.6L779.2,284.9L780.7,283.3L782.0,283.0L784.5,283.9L786.7,283.2L788.0,278.9L789.0,277.9L789.8,274.3L792.9,274.3ZM826.1,296.3L829.0,297.2L829.9,299.6L827.7,298.3L825.5,298.1L824.0,298.3L822.1,298.2L822.8,296.5ZM819.3,299.4L817.5,298.8L817.0,297.5L819.7,297.4L820.4,298.4ZM822.3,280.9L822.5,282.6L824.1,282.9L824.4,284.2L824.3,286.9L822.9,286.6L822.5,288.4L823.6,290.1L822.8,290.5L821.7,288.5L820.9,284.5L821.4,282.1ZM809.0,285.0L812.0,284.8L814.7,282.6L815.1,283.3L813.0,286.3L811.0,286.9L808.4,286.3L804.0,286.5L801.6,286.9L801.3,289.3L803.6,292.0L805.1,290.6L810.1,289.6L809.9,291.0L808.7,290.6L807.5,292.4L805.1,293.6L807.6,297.5L807.0,298.6L809.3,302.2L809.2,304.2L807.7,305.1L806.7,304.0L808.1,301.5L805.4,302.7L804.8,301.8L805.2,300.6L803.4,298.8L803.6,295.8L801.8,296.7L801.9,300.4L801.8,304.8L800.1,305.2L799.0,304.3L799.9,301.5L799.6,298.5L798.5,298.5L797.7,296.3L798.9,294.3L799.3,291.9L800.7,287.2L801.2,285.9L803.5,283.6L805.6,284.5ZM800.4,319.4L797.0,317.3L799.6,316.7L800.9,317.6L801.7,318.6L801.5,319.4ZM803.6,314.1L805.4,313.9L807.9,312.7L807.4,314.5L803.3,315.3L799.8,315.0L799.9,313.8L802.0,313.2ZM795.5,313.6L797.1,313.3L797.7,314.6L794.6,315.3L792.7,315.7L791.2,315.6L792.3,313.9L793.8,313.8L794.6,312.7ZM769.8,307.6L770.1,308.7L775.2,309.0L775.8,307.7L780.7,309.2L781.5,311.2L785.5,311.8L788.6,313.6L785.5,314.8L782.7,313.5L780.3,313.6L777.5,313.4L775.0,312.8L772.0,311.6L770.1,311.3L769.0,311.7L764.2,310.5L763.8,309.1L761.4,308.9L763.4,305.9L766.6,306.1L768.7,307.3ZM759.3,291.0L759.7,293.2L760.6,294.9L762.6,295.2L763.8,297.1L763.0,301.0L762.7,305.8L759.8,305.9L757.6,303.3L754.3,300.7L753.2,298.9L751.3,296.3L750.0,294.0L748.0,289.7L745.6,287.1L744.8,284.4L743.8,282.0L741.4,280.1L739.9,277.4L737.9,275.7L735.0,272.3L734.7,270.7L736.4,270.8L740.5,271.4L743.0,274.5L745.2,276.6L746.7,277.8L749.3,281.2L752.0,281.2L754.3,283.3L755.8,285.9L757.9,287.3L756.8,289.9L758.3,290.9Z",AR:"M321.6,450.3L322.9,451.7L324.8,453.9L328.4,455.7L331.9,456.4L331.3,457.9L329.2,458.0L327.7,457.0L326.3,456.9L323.9,456.9ZM332.4,381.5L332.1,384.0L331.9,387.2L332.5,390.3L332.0,391.0L332.2,393.1L332.3,394.7L335.9,397.3L336.0,399.5L337.8,400.8L337.9,402.4L336.3,406.3L332.9,408.0L328.0,408.7L325.3,408.3L326.2,410.2L326.2,412.5L327.0,414.1L325.7,415.2L323.3,415.6L320.7,414.5L319.9,415.3L321.0,418.3L322.9,419.3L324.0,418.3L325.1,419.9L323.1,420.8L321.6,422.7L322.0,425.8L321.9,427.5L319.6,427.5L318.2,429.0L318.1,431.3L321.1,433.5L323.6,434.2L323.5,436.9L321.2,438.6L320.8,442.1L319.0,443.3L318.5,444.7L320.3,447.8L322.4,449.5L321.4,449.3L319.1,448.9L313.3,448.5L311.8,446.8L311.1,444.5L309.6,444.7L308.4,443.6L307.1,440.4L308.5,439.1L308.6,437.2L307.8,435.7L308.3,433.1L307.9,429.1L307.2,427.3L308.0,426.7L307.5,425.5L306.2,424.9L306.6,423.6L305.2,422.5L303.6,418.9L304.4,418.3L303.0,414.5L302.8,411.4L302.8,408.6L304.0,407.5L302.6,404.5L301.9,401.6L303.3,399.6L302.7,397.0L303.5,393.9L303.0,391.1L302.2,390.5L300.0,385.1L301.0,381.9L300.2,378.9L300.7,376.1L301.9,373.1L303.4,371.2L302.4,370.0L302.8,369.0L302.0,363.8L304.6,362.2L305.1,359.0L304.7,358.2L306.5,355.4L310.0,356.2L311.8,358.4L312.6,355.9L315.6,356.0L316.1,356.7L321.5,361.8L323.6,362.3L327.1,364.6L329.9,365.8L330.5,367.2L328.5,371.9L331.2,372.7L334.2,373.2L336.2,372.7L338.2,370.3L338.3,367.6L339.5,367.0L341.0,368.8L341.3,371.3L339.3,373.0L337.7,374.3L335.2,377.3Z",CL:"M321.6,450.3L323.9,456.9L326.3,456.9L327.7,457.0L327.4,458.2L325.8,459.1L324.6,459.0L323.2,458.7L321.2,457.9L318.7,457.4L315.2,455.8L312.3,454.2L307.9,450.9L310.0,451.6L314.0,453.5L317.4,454.6L318.1,453.2L318.1,451.2L319.8,450.0ZM296.4,342.2L297.9,344.3L298.5,346.5L300.0,347.9L299.5,350.9L301.3,354.4L302.9,358.6L304.7,358.2L305.1,359.0L304.6,362.2L302.0,363.8L302.8,369.0L302.4,370.0L303.4,371.2L301.9,373.1L300.7,376.1L300.2,378.9L301.0,381.9L300.0,385.1L302.2,390.5L303.0,391.1L303.5,393.9L302.7,397.0L303.3,399.6L301.9,401.6L302.6,404.5L304.0,407.5L302.8,408.6L302.8,411.4L303.0,414.5L304.4,418.3L303.6,418.9L305.2,422.5L306.6,423.6L306.2,424.9L307.5,425.5L308.0,426.7L307.2,427.3L307.9,429.1L308.3,433.1L307.8,435.7L308.6,437.2L308.5,439.1L307.1,440.4L308.4,443.6L309.6,444.7L311.1,444.5L311.8,446.8L313.3,448.5L319.1,448.9L321.4,449.3L319.3,449.3L318.5,450.1L316.8,451.1L317.4,453.9L316.4,453.9L313.5,453.0L310.1,450.9L306.6,449.2L305.2,447.4L305.2,445.6L303.3,443.6L301.3,438.5L301.3,435.6L303.1,433.3L299.1,432.4L300.6,429.7L299.9,424.6L302.9,425.7L302.3,419.3L300.5,418.5L300.8,422.3L299.1,421.9L298.7,417.5L298.0,411.8L298.6,409.7L297.1,406.7L296.1,403.2L297.1,403.1L297.5,398.0L298.2,393.1L298.3,388.4L296.8,383.7L297.1,381.2L296.1,377.3L297.0,373.5L296.5,367.5L296.5,361.0L296.4,354.0L295.6,348.9L294.6,344.6L295.8,343.8Z",CD:"M558.4,301.6L558.9,304.5L558.6,306.1L559.1,307.9L560.6,309.6L562.0,313.5L560.9,313.2L557.3,313.7L556.6,314.1L555.8,316.1L556.4,317.4L555.8,321.1L555.4,324.2L556.1,324.8L557.9,326.0L558.7,325.4L558.8,328.8L556.8,328.7L555.7,327.0L554.8,325.7L552.8,325.3L552.2,323.6L550.6,324.6L548.4,324.2L547.6,322.8L545.9,322.5L544.6,322.6L544.5,321.6L543.6,321.5L542.4,321.3L540.7,321.8L539.6,321.7L538.9,322.0L539.1,318.3L538.3,317.2L538.1,315.3L538.5,313.4L538.0,312.2L538.0,310.3L534.7,310.3L535.0,309.2L533.6,309.2L533.5,309.7L531.8,309.8L531.1,311.6L530.7,312.4L529.2,312.0L528.3,312.4L526.6,312.7L525.6,311.0L525.0,310.0L524.2,308.2L523.6,305.9L515.7,305.8L514.8,306.2L514.0,306.1L512.9,306.6L512.5,305.6L513.2,305.3L513.3,303.9L513.7,303.1L514.7,302.5L515.4,302.8L516.3,301.6L517.8,301.6L517.9,302.5L518.9,303.1L520.5,301.1L522.1,299.6L522.8,298.6L522.7,296.1L523.9,293.1L525.1,291.5L526.9,290.0L527.2,289.0L527.2,287.9L527.7,286.8L527.5,285.0L527.8,282.3L528.4,280.3L529.2,278.7L529.3,276.8L529.5,274.7L530.6,273.1L532.0,272.1L534.2,273.1L535.9,274.3L537.9,274.6L539.9,275.2L540.7,273.3L541.0,273.1L542.2,273.4L545.2,271.9L546.3,272.5L547.1,272.4L547.5,271.7L548.5,271.4L550.5,271.7L552.3,271.8L553.1,271.5L554.8,274.0L556.0,274.4L556.7,273.9L557.9,274.1L559.4,273.4L560.1,274.7L562.4,276.8L562.3,280.4L563.4,280.8L562.5,281.9L561.5,282.8L560.5,284.4L559.9,285.8L559.8,288.3L559.1,289.5L559.1,291.8L558.3,292.7L558.2,294.5L557.9,294.8L557.6,296.5L558.3,297.9Z",SO:"M591.2,292.9L589.7,290.3L589.6,279.0L591.9,275.5L592.6,274.6L594.3,274.5L596.7,272.3L600.2,272.2L607.5,262.9L609.3,260.3L610.4,258.4L610.3,256.8L610.2,253.6L610.2,252.4L610.2,252.3L611.0,252.3L612.2,251.8L613.6,251.5L614.8,250.4L615.8,250.4L615.9,251.3L615.8,253.1L615.9,254.7L615.3,255.8L614.7,259.2L613.6,262.6L612.0,266.6L609.8,271.1L607.6,274.6L604.5,278.8L601.9,281.3L597.9,284.4L595.4,286.8L592.5,290.5L591.9,292.1ZM610.2,252.3L610.2,252.4L610.2,253.6L610.3,256.8L610.4,258.4L609.3,260.3L607.5,262.9L605.2,262.9L596.4,259.2L595.3,258.1L594.3,256.6L593.3,254.9L593.8,253.8L594.7,252.2L595.6,252.7L596.2,254.0L597.4,255.3L598.8,255.3L601.2,254.5L604.1,254.2L606.4,253.2L607.7,253.0L608.7,252.4Z",KE:"M584.8,302.1L581.0,299.1L580.8,297.3L571.1,291.0L570.7,290.6L570.7,287.3L571.4,286.1L572.8,284.0L573.7,281.8L572.5,278.2L572.2,276.7L570.9,274.5L572.5,272.7L574.3,270.6L575.7,271.1L575.7,272.9L576.6,273.9L578.5,273.9L581.9,276.5L582.8,276.6L583.4,276.5L584.0,276.8L585.8,277.1L586.6,275.8L589.0,274.5L590.1,275.5L591.9,275.5L589.6,279.0L589.7,290.3L591.2,292.9L589.4,294.1L588.7,295.4L587.7,295.6L587.3,297.8L586.4,299.1L585.9,301.1Z",SD:"M545.5,262.2L543.4,260.8L542.5,259.9L542.3,259.0L542.7,257.7L542.7,256.4L541.1,254.5L540.8,253.1L540.8,252.4L539.8,251.5L539.8,249.7L539.2,248.5L538.2,248.7L538.5,247.5L539.1,246.2L538.8,244.9L539.7,244.0L539.1,243.3L539.7,241.4L540.9,239.1L543.2,239.3L542.6,226.9L542.6,225.6L545.6,225.6L545.3,219.4L555.9,219.4L566.0,219.4L576.4,219.4L577.4,222.5L576.9,223.0L577.5,226.2L578.7,229.9L579.7,230.7L581.2,231.9L580.0,233.6L578.1,234.1L577.3,235.1L577.1,237.2L576.2,241.7L576.5,243.0L576.2,245.6L575.2,248.7L573.7,250.2L572.6,252.6L572.4,253.9L571.2,254.7L570.5,258.0L570.6,260.8L570.5,258.4L570.1,258.3L570.1,256.8L569.8,255.7L568.4,254.5L568.0,252.2L568.2,249.9L567.0,249.7L566.8,250.4L565.2,250.6L565.9,251.5L566.2,253.3L564.8,255.0L563.5,257.3L562.1,257.6L559.8,255.8L558.9,256.4L558.6,257.3L557.2,257.9L557.2,258.6L554.5,258.6L554.1,257.9L552.2,257.8L551.3,258.3L550.5,258.1L549.1,256.3L548.6,255.4L546.7,255.8L546.0,257.3L545.4,260.1L544.5,260.6L543.7,261.0Z",TD:"M542.6,226.9L543.2,239.3L540.9,239.1L539.7,241.4L539.1,243.3L539.7,244.0L538.8,244.9L539.1,246.2L538.5,247.5L538.2,248.7L539.2,248.5L539.8,249.7L539.8,251.5L540.8,252.4L540.8,253.1L539.1,253.7L537.8,254.9L535.9,258.3L533.4,259.8L530.9,259.6L530.1,259.8L530.4,260.9L529.0,262.0L527.9,263.2L524.5,264.4L523.9,263.7L523.4,263.7L522.9,264.5L520.7,264.7L521.2,263.8L520.3,261.7L519.9,260.4L518.7,259.9L517.1,258.1L517.7,256.6L518.9,256.9L519.7,256.7L521.2,256.8L519.7,253.9L519.7,251.9L519.5,249.8L518.5,247.8L518.7,246.4L517.0,246.3L517.0,244.3L515.8,243.1L516.9,239.1L520.2,236.1L520.3,232.1L521.2,225.8L521.7,224.4L520.6,223.4L520.5,222.4L519.5,221.6L518.7,216.7L521.3,215.0L531.9,221.0Z",HT:"M291.5,226.5L291.5,228.2L291.2,229.4L290.5,229.9L291.1,230.9L290.9,231.7L289.2,231.2L288.0,231.4L286.4,231.2L285.1,231.8L283.8,230.8L284.1,229.8L286.5,230.2L288.5,230.5L289.5,229.8L288.4,228.4L288.6,227.2L287.0,226.8L287.7,225.9L289.3,226.0Z",DO:"M290.9,231.7L291.1,230.9L290.5,229.9L291.2,229.4L291.5,228.2L291.5,226.5L291.9,226.0L293.9,226.0L295.4,226.8L296.1,226.7L296.5,227.8L297.9,227.8L297.7,228.7L298.9,228.8L300.0,230.0L298.9,231.2L297.8,230.5L296.5,230.7L295.7,230.5L295.1,231.1L294.1,231.3L293.8,230.5L292.9,231.0L291.6,233.1L291.0,232.6Z",RU:"M647.4,50.0L650.7,49.5L655.4,50.6L661.8,52.7L663.4,54.7L659.7,54.9L654.0,54.3L650.1,53.4L647.2,51.9L644.3,51.4ZM667.8,53.8L673.8,55.0L674.2,56.0L664.6,56.9L665.1,53.9L666.3,53.6ZM743.0,61.1L748.2,61.2L756.6,62.5L757.3,64.3L750.1,64.2L747.6,64.8L742.0,63.2L741.1,61.5ZM763.2,63.0L768.8,63.6L767.8,64.6L764.5,64.4L759.7,63.4L759.2,62.6ZM752.8,67.9L753.5,66.9L755.7,66.7L759.5,67.6L760.5,68.3L757.6,68.3L753.3,68.0ZM560.5,50.9L563.8,50.5L566.5,50.5L567.2,51.1L567.9,50.6L569.4,50.2L572.4,50.7L571.9,51.0L569.6,51.3L568.1,51.4L568.0,51.8L566.1,52.2L563.9,51.6L564.5,51.0ZM531.8,120.0L527.6,120.1L524.8,119.7L525.2,118.4L528.2,117.5L530.6,118.0L531.7,118.5L531.6,119.3ZM583.9,66.9L587.6,64.8L586.6,63.6L590.2,62.3L595.7,60.8L601.8,60.4L604.5,59.5L608.0,59.2L609.8,60.1L609.0,60.8L603.0,62.0L597.8,63.2L592.9,65.5L591.2,68.0L589.1,70.4L590.4,72.5L595.1,74.6L594.0,74.9L587.3,74.5L586.4,73.4L582.5,72.7L581.7,71.3L583.5,70.8L582.9,69.4L585.8,67.2ZM807.5,121.8L810.3,124.7L812.3,127.6L815.3,130.6L821.2,135.9L817.1,134.9L818.4,139.3L822.7,142.4L823.9,144.5L821.0,142.7L820.8,145.0L818.9,142.5L817.3,139.5L815.0,136.3L814.1,134.0L811.5,130.0L808.1,127.1L805.5,123.0L806.6,121.7L804.7,120.3L805.4,119.9ZM113.8,79.2L113.8,79.2L116.3,81.2L118.5,83.9L116.3,85.5L116.9,86.2L118.7,84.3L123.9,84.7L125.1,87.2L121.7,88.4L117.9,88.6L114.9,91.3L113.4,91.9L111.5,91.8L111.0,90.8L109.1,90.0L110.0,88.9L108.4,88.4L105.6,88.8L105.5,87.8L107.2,86.8L103.9,87.4L103.4,88.7L100.8,89.9L100.8,89.9L113.8,79.2ZM859.1,89.9L859.1,89.9L857.8,91.1L854.8,90.9L858.4,92.3L862.2,94.6L864.0,95.4L865.6,96.5L865.8,97.2L861.1,96.6L857.4,98.7L855.8,99.0L854.5,101.0L853.1,102.7L853.6,104.0L848.5,102.1L845.0,104.3L843.0,103.2L842.1,104.4L838.8,104.1L839.8,105.9L839.8,108.7L840.9,109.8L844.0,110.5L847.5,114.7L845.5,114.8L846.6,117.2L848.6,118.5L845.9,120.0L847.9,123.3L845.0,124.0L846.7,127.1L845.4,129.8L843.0,127.8L838.7,123.5L832.2,116.9L829.9,112.9L830.3,111.2L829.2,109.9L832.1,109.2L832.8,105.6L833.8,102.7L835.6,100.5L833.4,96.5L831.0,96.8L832.0,99.1L829.5,102.2L824.4,98.7L819.7,99.7L818.6,104.4L822.0,106.1L817.7,106.9L814.5,107.1L812.9,105.1L809.1,104.7L807.6,106.1L800.4,105.6L793.9,106.4L791.1,112.0L787.5,118.8L791.4,119.2L793.8,121.0L796.5,121.7L796.9,120.2L799.5,120.4L805.2,123.7L807.0,126.2L807.2,129.1L809.4,132.7L811.4,137.5L810.5,141.9L810.9,144.0L809.7,147.6L808.4,151.1L807.8,152.9L805.4,154.7L803.9,154.7L801.6,153.2L799.5,155.5L799.6,156.5L799.6,156.5L799.0,156.0L798.2,154.4L799.4,154.3L797.9,150.7L795.9,148.1L797.4,147.0L800.6,147.5L800.6,144.6L799.5,141.3L799.8,140.1L799.4,137.4L796.1,138.3L794.7,139.5L791.1,139.5L788.5,136.7L784.4,134.5L779.8,133.6L777.2,130.6L775.2,128.8L773.6,127.5L770.3,124.5L767.6,123.4L763.6,122.6L760.6,122.7L758.1,123.2L757.1,124.6L758.7,125.4L759.7,127.0L759.0,127.9L758.7,131.1L759.5,132.4L757.2,134.3L753.8,133.2L751.1,133.4L749.3,132.4L747.8,132.1L745.4,134.2L742.6,134.7L740.8,135.5L737.6,135.0L735.4,135.0L733.2,133.5L730.2,132.0L727.7,131.6L724.9,132.0L723.0,132.6L719.0,131.3L717.5,129.1L714.4,128.3L712.1,128.0L708.9,126.7L708.0,129.8L709.8,131.6L708.4,133.7L704.7,132.9L702.3,132.8L700.1,131.4L697.7,131.4L695.2,130.4L692.3,131.9L688.9,134.4L686.6,135.0L685.8,135.2L683.8,133.4L680.9,133.8L679.4,132.5L677.6,131.9L675.8,130.2L674.2,129.7L671.2,130.4L667.3,128.7L666.7,130.3L658.6,122.7L654.8,120.5L655.2,119.5L650.6,122.3L648.5,122.5L648.0,120.9L644.7,119.9L642.6,120.6L640.8,117.6L636.5,116.9L634.9,118.1L629.5,119.2L628.7,119.9L620.5,121.0L619.7,122.0L622.0,124.0L620.0,124.7L620.7,125.6L618.9,127.0L623.3,129.0L623.1,130.5L619.8,130.3L619.4,131.2L616,129.7L612.3,129.7L610.1,131.0L607.1,129.8L601.4,127.7L597.8,127.8L593.8,131.0L594.0,133.2L591.2,131.5L590.0,134.8L590.8,135.4L589.9,137.7L592.4,139.7L594.1,139.6L596.1,141.7L596.1,143.2L597.5,143.7L596.7,145.5L594.5,146.0L592.7,149.2L595.5,152.1L595.6,154.2L598.9,157.8L597.7,159.0L597.4,159.8L596.3,159.6L594.3,157.7L593.6,157.6L591.9,156.9L590.9,155.6L588.6,155.0L587.2,155.5L586.6,154.9L583.1,153.4L579.4,152.9L577.3,152.4L577.0,152.8L573.6,150.2L570.6,149.0L568.3,147.2L569.9,146.8L571.5,144.2L570.0,143.0L573.3,141.8L573.1,141.1L571.1,141.6L570.9,140.2L572.0,139.4L574.3,139.2L574.5,138.2L573.7,136.5L574.3,134.9L574.1,134.0L570.5,133.1L569.1,133.1L567.4,131.7L565.7,132.2L562.6,131.1L562.5,130.5L561.5,129.2L559.6,129.1L559.3,128.2L559.7,127.6L558.0,125.9L555.6,126.2L554.9,126.0L554.4,126.7L553.5,126.6L552.7,124.7L552.0,123.7L552.4,123.4L554.3,123.5L555.0,122.9L554.3,122.1L552.6,121.6L552.7,121.1L551.7,120.5L549.9,118.6L550.3,117.8L549.8,116.4L547.5,115.8L546.4,116.1L545.9,115.4L543.5,114.6L542.5,112.9L542.1,111.5L540.9,110.9L541.7,110.0L540.6,107.3L541.9,105.7L541.5,105.2L543.8,103.6L541.2,102.3L545.3,98.7L547.0,97.1L547.5,95.7L544.0,93.8L544.5,92.0L542.2,90.0L543.2,87.6L540.1,84.6L541.6,82.6L538.1,80.8L538.1,78.9L539.7,78.7L542.9,77.7L544.8,76.7L548.4,78.3L554.2,79L562.7,81.9L564.6,83.2L565.2,85.0L563.3,86.4L560.1,87.1L550.3,85.1L548.9,85.4L552.7,87.4L553.1,88.6L553.9,91.4L556.8,92.3L558.6,93.0L558.6,91.6L557.1,90.5L558.1,89.4L563.7,91.1L565.3,90.5L563.3,88.5L567.5,85.8L569.5,86.0L571.7,86.9L572.3,85.1L570.1,83.5L570.7,81.9L568.7,80.2L574.6,81.1L576.3,82.6L573.8,82.9L574.3,84.4L576.2,85.3L579.2,84.7L579.1,83.0L583.0,81.8L589.3,79.5L590.9,79.6L589.5,81.2L592.2,81.5L593.3,80.6L597.1,80.5L599.7,79.4L602.6,81.0L604.2,79.3L601.4,77.8L602.1,76.9L608.4,77.7L611.6,78.5L620.4,81.5L621.1,80.1L618.4,78.7L618.1,78.2L615.5,77.9L615.6,76.7L613.5,74.7L613.1,73.8L615.6,71.5L615.6,69.2L616.8,68.7L622.4,69.4L623.6,70.8L622.8,72.9L624.5,73.7L626.1,75.5L627.5,79.1L630.6,80.7L630.6,82.4L628.4,86.2L631.0,86.6L631.3,85.7L633.3,85.0L633.2,83.7L634.3,82.4L632.3,80.9L632.4,79.1L630.0,78.9L628.8,77.5L629.0,74.9L625.3,72.8L627.8,71.0L626.4,69.2L627.3,69.2L629.2,70.6L629.8,73.0L632.2,73.5L630.2,71.7L632.9,70.7L636.9,70.5L641.5,72.0L638.4,69.9L636.6,67.2L639.6,66.7L644.4,66.8L648.3,66.5L645.9,65.2L647.0,63.6L649.1,63.5L651.9,62.3L656.7,62.0L656.8,61.3L661.6,61.1L663.6,61.6L666.8,60.3L670.3,60.4L669.9,59.3L670.8,58.3L674.3,57.4L678.2,58.1L676.2,58.7L680.8,59.1L682.4,60.3L683.6,59.7L689.1,59.7L694.5,60.9L696.9,61.8L697.7,63.0L696.2,63.8L692.4,65.1L691.6,65.9L694.3,66.2L697.7,66.8L699.1,66.4L701.5,68.0L701.8,67.3L704.5,66.9L711.1,67.3L712.7,68.5L721.2,68.9L719.5,67.0L724.1,67.4L727.1,67.4L731.6,68.7L734.1,70.3L734.0,71.4L738.4,73.4L742.6,74.5L741.9,71.8L746.2,72.9L748.9,72.2L753.5,73.0L754.2,72.3L757.9,72.7L754.0,70.3L755.4,69.2L775.0,70.8L778.4,72.4L785.8,74.3L793.3,73.8L797.7,74.3L800.7,75.3L802.6,77.2L805.9,78.0L808.0,77.4L811.5,77.4L816.0,77.9L819.4,77.6L825.8,79.9L827.3,79.1L823.6,77.4L823.1,76.3L830.4,77.0L834.4,76.8L841.8,78.1L846.1,79.2L859.1,89.9ZM839.8,74.3L837.8,74.5L836.4,73.7L837.5,72.6L839.8,74.3ZM122.4,72.6L122.4,72.6L122.4,72.6L122.8,72.5L124.5,72.5L126.4,73.2L125.7,73.6L122.9,74.2L120.1,74.3L120.1,74.3L122.4,72.6ZM560.2,145.0L560.7,144.3L562.5,144.9L563.3,145.0L563.7,145.6L564.0,145.7L564.1,146.0L565.4,146.7L567.8,146.6L567.5,147.6L564.9,148.2L561.9,149.9L560.5,149.3L560.8,147.9L558.1,147.0L558.4,146.4L560.6,145.4Z",BS:"M275.7,204.5L277.0,204.2L278.7,204.3L278.6,205.1L275.7,205.6ZM278.9,203.7L280.7,205.1L279.9,207.3L279.5,206.9L279.8,205.3L278.9,204.1ZM276.9,209.4L277.7,209.5L278.2,212.1L277.9,213.9L277.3,214.1L276.9,212.3L276.0,211.4Z",FK:"M338.0,448.0L340.3,446.2L342.5,447.0L343.5,445.8L345.8,447.1L345.4,448.2L342.5,449.0L341.2,448.0L339.6,449.3Z",NO:"M507.5,52.9L508.0,52.1L510.7,52.1L513.1,52.8L519.5,54.5L515.0,55.4L514.3,57.1L512.7,57.5L512.2,59.5L509.9,59.6L505.7,58.1L507.3,57.3L504.4,56.6L500.6,54.7L498.9,52.9L503.8,52.2L504.9,52.9ZM542.9,77.7L539.7,78.7L538.1,78.9L538.5,77.1L535.7,76.1L532.8,77.0L532.1,78.9L530.4,80.0L528.1,79.4L525.5,79.5L523.0,78.1L521.9,78.8L520.6,78.9L520.6,80.7L516.7,80.3L516.3,81.7L514.4,81.7L513.2,83.6L511.4,86.6L508.6,90.4L509.4,91.3L508.8,92.4L506.7,92.4L505.5,95.0L505.9,98.6L507.4,100.1L506.9,103.4L505.2,105.3L504.3,106.9L502.7,105.2L498.6,108.5L495.6,109.2L492.5,107.7L491.6,104.6L490.7,98.2L492.6,96.4L498.2,94.1L502.2,91.2L505.8,87.4L510.3,82.3L513.5,80.3L518.7,77.0L522.9,75.8L526.3,76.0L528.9,73.8L532.6,73.9L536.1,73.4L542.7,75.3L540.3,76.0ZM529.5,52.1L527.2,53.2L522,53.5L516.5,53.1L516.0,52.5L513.4,52.5L511.3,51.5L516.7,50.9L519.4,51.4L521.1,50.8L525.8,51.3ZM525.9,57.0L522.0,58.0L518.6,57.4L519.7,56.8L518.5,56.1L522.2,55.6L523.1,56.5Z",GL:"M398.4,46.7L405.0,45.6L411.0,45.7L413.6,45.0L419.8,44.8L433.4,45.1L443.6,46.5L440.2,47.3L433.5,47.4L423.9,47.6L424.7,47.9L431.0,47.7L436.1,48.4L439.7,47.8L440.9,48.5L438.7,49.7L443.4,48.9L452.1,48.2L457.4,48.5L458.2,49.4L450.7,50.9L449.6,51.4L443.7,51.8L447.9,51.9L445.5,53.5L443.7,55.0L443.3,57.5L445.3,59.1L442.3,59.1L439.1,59.9L442.3,61.2L442.4,63.2L440.4,63.5L442.5,65.6L438.2,65.7L440.3,66.8L439.5,67.6L436.7,68.0L433.9,68.0L436.1,69.7L435.9,70.9L432.2,69.8L431.1,70.5L433.6,71.1L436.0,72.7L436.4,74.8L432.7,75.3L431.4,74.3L429.2,72.8L429.5,74.5L426.9,75.9L432.2,76.0L435.0,76.2L429.2,78.4L423.3,80.5L417.1,81.4L414.8,81.4L412.5,82.5L408.9,85.3L404.0,87.2L402.6,87.3L399.6,87.9L396.4,88.6L394.2,90.3L393.7,92.2L392.1,94.0L388.0,96.2L388.3,98.4L386.8,100.7L384.9,103.4L381.8,103.6L379.2,101.3L374.9,101.3L373.2,99.7L372.6,97.0L370.0,93.6L369.5,91.8L370.0,89.3L368.0,86.8L369.5,84.9L368.4,83.9L371.6,80.8L375.0,79.8L376.2,78.7L377.4,76.7L374.7,77.6L373.5,78.0L371.5,78.4L369.4,77.5L369.9,75.7L371.3,74.4L373.1,74.3L376.9,75.0L374.1,73.4L372.7,72.5L370.6,72.9L369.2,72.2L372.4,69.9L371.6,68.9L370.8,67.2L369.6,64.5L367.7,63.6L368.2,62.6L363.8,61.2L359.9,61.0L354.7,61.1L350.0,61.3L348.3,60.5L345.9,59.0L351.3,58.3L355.2,58.1L347.6,57.5L344.0,56.6L344.9,55.7L352.6,54.6L360.1,53.5L361.3,52.7L357.0,51.9L359.2,51.1L366.5,49.6L369.3,49.4L369.3,48.4L373.9,47.9L379.5,47.6L384.9,47.6L386.4,48.2L391.8,47.1L395.5,47.8L397.9,48.0L401.2,48.7L397.6,47.6Z",TF:"M642.9,438.4L644.1,439.3L646.3,439.7L646.2,440.3L645.1,441.6L641.4,441.8L641.8,440.2L642.6,439.0Z",TL:"M813.2,315.2L813.6,314.5L815.9,313.8L817.8,313.7L818.7,313.3L819.7,313.7L818.6,314.5L815.7,315.9L813.4,316.8L813.4,315.8Z",ZA:"M522.0,376.4L523.3,374.9L524.3,375.7L524.7,377.1L525.8,377.3L527.4,377.9L528.8,377.7L531.2,376.1L531.7,364.6L532.3,365.0L533.8,368.0L533.4,369.9L534.0,371.0L535.8,370.7L537.2,369.3L538.5,368.3L539.2,366.8L540.5,366.1L541.5,366.5L542.7,367.4L544.8,367.5L546.5,366.8L546.9,365.8L547.4,364.3L548.8,364.1L549.7,362.9L550.6,360.8L553.1,358.5L556.9,356.2L558.0,356.2L559.2,356.8L560.1,356.4L561.5,356.7L562.5,361.1L563.0,363.3L562.3,366.8L562.5,367.9L561.2,367.3L560.5,367.6L560.1,368.5L559.4,369.6L559.3,370.7L560.7,372.4L562.3,372.1L562.9,370.7L564.9,370.7L564.0,373.0L563.5,375.6L562.8,377.0L560.9,378.6L560.4,379.0L559.1,380.6L558.3,382.2L556.7,384.4L553.5,387.6L551.6,389.5L549.6,390.9L546.8,392.1L545.5,392.3L545.2,393.2L543.6,392.7L542.3,393.3L539.6,392.7L538.1,393.1L537.1,392.9L534.4,394.1L532.2,394.6L530.6,395.8L529.4,395.9L528.4,394.8L527.6,394.7L526.5,393.3L526.4,393.8L526.1,392.9L526.2,391.1L525.5,389.0L526.3,388.4L526.4,386.1L524.9,383.1L523.7,380.5L523.7,380.5ZM554.4,377.6L553.4,376.7L552.1,377.3L550.7,378.5L549.2,380.5L550.9,382.9L551.8,382.6L552.4,381.6L553.9,381.1L554.4,380.1L555.3,378.6Z",LS:"M554.4,377.6L555.3,378.6L554.4,380.1L553.9,381.1L552.4,381.6L551.8,382.6L550.9,382.9L549.2,380.5L550.7,378.5L552.1,377.3L553.4,376.7Z",MX:"M182.3,186.6L185.2,186.3L188.6,186.0L188.1,186.6L191.5,188.1L196.7,190.3L201.8,190.3L203.8,190.3L204.2,189.0L208.6,189.0L209.2,190.1L210.2,191.1L211.4,192.5L211.8,194.1L212.0,195.8L213.1,196.7L214.9,197.7L217.2,195.2L219.3,195.2L220.8,196.4L221.6,198.5L222.0,200.4L223.1,202.1L223.2,204.3L223.6,205.8L225.4,206.8L227.1,207.4L228.1,207.4L226.6,210.1L225.7,212.3L224.7,216.5L224.2,218.0L224.3,219.7L224.9,221.2L225.0,223.7L226.4,226.0L226.7,227.7L227.5,229.3L230.2,230.1L231.1,231.4L233.5,230.5L235.6,230.2L237.6,229.7L239.4,229.1L241.2,227.9L242.1,226.0L242.7,223.4L243.3,222.5L245.2,221.7L248.1,221.0L250.4,221.1L252.0,220.8L252.5,221.5L252.2,223.0L250.6,224.8L249.7,226.7L250.1,227.3L249.5,228.6L248.5,231.0L247.9,230.2L247.4,230.3L246.9,230.3L245.7,232.2L245.3,231.9L244.9,232.0L244.9,232.5L242.4,232.4L240.0,232.4L239.7,234.2L238.6,234.2L239.4,235.2L240.3,235.9L240.5,236.6L240.9,236.8L240.7,237.9L237.3,237.9L235.8,240.4L236.1,241.0L235.7,241.7L235.5,242.6L232.9,239.3L231.7,238.3L229.6,237.4L228.1,237.7L225.8,238.8L224.4,239.1L222.7,238.3L220.8,237.7L218.5,236.3L216.6,235.9L213.8,234.4L211.8,232.9L211.2,232.1L209.8,231.9L207.2,230.9L206.4,229.5L203.8,227.8L202.8,225.8L202.5,224.3L203.4,224.0L203.3,223.1L204.0,222.3L204.2,221.2L203.6,219.8L203.6,218.6L203.1,217.0L201.4,213.9L199.3,211.5L198.5,209.5L196.5,208.3L196.2,207.5L197.1,205.6L195.9,204.8L194.8,203.3L194.7,201.1L193.4,200.9L192.3,199.2L191.5,197.7L191.6,196.8L190.9,194.4L190.7,192.0L191.1,190.8L189.6,189.6L188.7,189.7L187.5,188.9L186.7,190.1L186.7,191.6L186.3,194.0L186.8,195.2L188.1,197.4L188.3,198.1L188.6,198.4L188.7,199.4L189.2,199.4L189.1,201.4L189.7,202.2L190.0,203.3L191.2,204.9L191.4,207.8L191.8,209.1L192.2,210.6L192.0,212.2L193.2,212.4L194.0,213.8L194.6,215.2L194.4,215.7L193.1,216.9L192.6,216.8L192.3,215.0L191.0,213.2L189.5,211.7L188.3,210.9L188.9,208.6L189.0,206.9L188.0,205.9L186.5,204.5L186.1,205L185.6,204.1L184.2,203.4L183.2,201.6L183.4,201.3L184.5,201.5L185.7,200.3L186.2,198.9L184.8,196.7L183.6,195.9L183.2,193.9L182.8,191.9L182.4,189.4Z",UY:"M332.4,381.5L334.0,381.2L336.9,383.6L337.9,383.5L340.8,385.5L343.0,387.3L344.8,389.4L343.9,390.9L344.9,392.6L344.1,394.6L341.5,396.3L339.6,395.7L338.2,396.0L335.7,394.7L334.0,394.8L332.2,393.1L332.0,391.0L332.5,390.3L331.9,387.2L332.1,384.0Z",BR:"M344.9,392.6L343.9,390.9L344.8,389.4L343.0,387.3L340.8,385.5L337.9,383.5L336.9,383.6L334.0,381.2L332.4,381.5L335.2,377.3L337.7,374.3L339.3,373.0L341.3,371.3L341.0,368.8L339.5,367.0L338.3,367.6L338.6,365.8L338.8,363.9L338.6,362.2L337.6,361.7L336.7,362.2L335.7,362.0L335.2,360.8L334.7,358.0L334.1,357.0L332.3,356.2L331.2,356.8L328.4,356.2L328.2,352.0L327.2,350.3L328.0,349.6L327.6,347.8L328.2,346.5L328.4,344.0L327.6,342.1L326.1,341.2L325.7,340.0L326.0,338.2L320.9,338.1L319.6,334.5L320.4,334.4L320.3,333.1L319.7,332.2L319.4,330.4L317.8,329.4L316.2,329.5L315.0,328.6L313.2,328.0L312.0,326.8L309.0,326.3L306.0,323.5L306.1,321.4L305.7,320.2L305.8,317.9L302.4,318.4L301.0,319.6L298.8,320.9L298.2,321.8L296.9,321.9L294.9,321.6L293.4,322.1L292.2,321.8L292.1,317.1L290.0,318.9L287.6,318.8L286.5,317.2L284.8,317.0L285.3,315.6L283.7,313.8L282.4,311.0L283.1,310.4L283.1,309.1L284.6,308.2L284.3,306.5L285.0,305.4L285.1,304.0L288.1,301.9L290.3,301.3L290.6,300.8L293.0,301.0L294.1,292.5L294.1,291.1L293.7,289.4L292.5,288.2L292.5,286.0L294.1,285.5L294.6,285.8L294.7,284.6L293.1,284.3L293.1,282.4L298.3,282.4L299.2,281.4L299.9,282.3L300.5,284.2L301.0,283.8L302.4,285.4L304.5,285.2L305.0,284.3L307.0,283.6L308.1,283.0L308.5,281.7L310.4,280.9L310.2,280.2L308.0,279.9L307.6,278.0L307.8,275.9L306.6,275.1L307.1,274.8L309.1,275.2L311.2,276.0L312.0,275.3L313.9,274.8L316.9,273.6L317.9,272.4L317.6,271.6L319.0,271.4L319.6,272.1L319.2,273.5L320.1,274.0L320.7,275.4L319.9,276.5L319.5,279.1L320.1,280.7L320.3,282.1L322.0,283.6L323.3,283.7L323.6,283.1L324.4,283.0L325.6,282.5L326.5,281.6L328.0,281.9L328.6,281.8L330.1,282.0L330.3,281.4L329.9,280.8L330.2,279.9L331.3,280.2L332.5,279.9L334.0,280.5L335.2,281.1L336.0,280.3L336.6,280.4L337.0,281.3L338.3,281.1L339.3,279.9L340.2,277.6L341.8,274.8L342.7,274.7L343.3,276.4L344.8,281.8L346.2,282.3L346.3,284.4L344.3,287.0L345.1,287.9L349.8,288.4L349.9,291.5L351.9,289.5L355.3,290.6L359.8,292.5L361.1,294.3L360.7,296.0L363.8,295.0L369.0,296.7L373.0,296.6L377.0,299.1L380.4,302.6L382.5,303.5L384.8,303.6L385.8,304.6L386.7,308.5L387.2,310.4L386.3,315.5L385.0,317.6L381.4,321.9L379.8,325.4L377.9,328.1L377.3,328.1L376.6,330.4L377.1,336.2L376.6,341.0L376.4,343.1L375.6,344.3L375.4,348.5L373.0,352.5L372.8,355.7L370.8,357.1L370.3,359.0L367.5,358.9L363.5,360.1L361.8,361.5L359.0,362.4L356.1,364.9L354.2,368.0L354.1,370.3L354.7,372.1L354.6,375.2L354.2,376.7L352.6,378.5L350.5,383.9L348.5,386.4L347.0,387.9L346.3,390.8Z",BO:"M294.9,321.6L296.9,321.9L298.2,321.8L298.8,320.9L301.0,319.6L302.4,318.4L305.8,317.9L305.7,320.2L306.1,321.4L306.0,323.5L309.0,326.3L312.0,326.8L313.2,328.0L315.0,328.6L316.2,329.5L317.8,329.4L319.4,330.4L319.7,332.2L320.3,333.1L320.4,334.4L319.6,334.5L320.9,338.1L326.0,338.2L325.7,340.0L326.1,341.2L327.6,342.1L328.4,344.0L328.2,346.5L327.6,347.8L328.0,349.6L327.2,350.3L327.1,349.3L324.5,347.7L322.0,347.7L317.6,348.6L316.6,351.3L316.7,353.0L316.1,356.7L315.6,356.0L312.6,355.9L311.8,358.4L310.0,356.2L306.5,355.4L304.7,358.2L302.9,358.6L301.3,354.4L299.5,350.9L300.0,347.9L298.5,346.5L297.9,344.3L296.4,342.2L297.7,338.8L296.3,336.2L296.9,335.2L296.3,334.0L297.2,332.5L297.0,329.8L297.0,327.6L297.5,326.6Z",PE:"M293.0,301.0L290.6,300.8L290.3,301.3L288.1,301.9L285.1,304.0L285.0,305.4L284.3,306.5L284.6,308.2L283.1,309.1L283.1,310.4L282.4,311.0L283.7,313.8L285.3,315.6L284.8,317.0L286.5,317.2L287.6,318.8L290.0,318.9L292.1,317.1L292.2,321.8L293.4,322.1L294.9,321.6L297.5,326.6L297.0,327.6L297.0,329.8L297.2,332.5L296.3,334.0L296.9,335.2L296.3,336.2L297.7,338.8L296.4,342.2L295.8,343.8L294.6,344.6L291.7,342.8L291.4,341.5L285.8,338.4L280.7,335.0L278.5,333.1L277.2,330.5L277.6,329.6L275.0,325.5L272.0,319.8L269.1,313.6L267.9,312.2L267.0,310.0L264.8,307.9L262.9,306.7L263.7,305.3L262.3,302.3L263.0,300.2L265.1,298.2L265.5,299.5L264.7,300.2L264.8,301.4L265.9,301.1L267.0,301.5L268.2,303.0L269.7,301.8L270.1,299.7L271.7,297.0L274.9,295.7L277.8,292.5L278.6,290.5L278.2,288.1L278.9,287.8L280.7,289.3L281.6,290.8L282.8,291.6L284.4,294.8L286.4,295.2L287.9,294.4L288.9,294.9L290.5,294.7L292.5,296.1L290.9,299.3L291.7,299.3Z",CO:"M301.0,283.8L300.5,284.2L299.9,282.3L299.2,281.4L298.3,282.4L293.1,282.4L293.1,284.3L294.7,284.6L294.6,285.8L294.1,285.5L292.5,286.0L292.5,288.2L293.7,289.4L294.1,291.1L294.1,292.5L293.0,301.0L291.7,299.3L290.9,299.3L292.5,296.1L290.5,294.7L288.9,294.9L287.9,294.4L286.4,295.2L284.4,294.8L282.8,291.6L281.6,290.8L280.7,289.3L278.9,287.8L278.2,288.1L277.1,287.4L275.7,286.4L275.0,286.9L272.7,286.4L272.1,285.1L271.6,285.2L268.9,283.4L268.6,282.4L269.5,282.2L269.5,280.7L270.1,279.5L271.4,279.3L272.6,277.4L273.6,275.8L272.7,275.0L273.2,273.2L272.7,270.4L273.3,269.6L273.0,266.9L272.0,265.3L272.4,263.8L273.3,264.0L273.8,263.1L273.3,261.3L273.6,260.8L275.0,260.9L277.1,258.7L278.2,258.4L278.3,257.4L279.0,254.8L280.6,253.3L282.3,253.3L282.5,252.6L284.6,252.9L286.8,251.3L287.9,250.6L289.3,249.1L290.2,249.3L290.8,250.1L290.2,251.2L288.5,251.7L287.7,253.3L286.6,254.1L285.8,255.3L285.3,257.5L284.5,259.3L285.9,259.5L286.1,261.0L286.7,261.6L286.8,262.9L286.5,264.0L286.5,264.7L287.2,264.9L287.8,266.0L291.2,265.7L292.8,266.1L294.5,268.8L295.6,268.4L297.5,268.6L299.1,268.3L300.0,268.8L299.5,270.5L298.9,271.5L298.6,273.7L299.1,275.8L299.8,276.7L299.9,277.4L298.5,278.9L299.5,279.6L300.2,280.7Z",PA:"M273.6,260.8L273.3,261.3L273.8,263.1L273.3,264.0L272.4,263.8L272.0,265.3L271.1,264.4L270.7,262.7L271.4,261.9L270.7,261.7L270.2,260.7L269.0,259.8L267.8,260.0L267.2,261.1L266.1,261.9L265.5,262.0L265.2,262.6L266.4,264.3L265.6,264.7L265.2,265.1L264.0,265.3L263.6,263.5L263.2,264.0L262.4,263.8L261.9,262.6L260.8,262.3L260.1,262.0L259.0,262.0L258.9,262.7L258.6,262.2L258.8,261.6L259.0,261.0L258.9,260.4L259.4,260.0L258.8,259.6L258.9,258.3L259.9,258.0L260.8,259.1L260.7,259.8L261.8,259.9L262.1,259.7L262.8,260.5L264.1,260.2L265.3,259.4L266.9,258.8L267.9,257.9L269.3,258.1L269.2,258.4L270.7,258.5L271.9,259.0L272.7,260.0Z",CR:"M259.9,258.0L258.9,258.3L258.8,259.6L259.4,260.0L258.9,260.4L259.0,261.0L258.8,261.6L258.6,262.2L257.2,261.5L256.7,260.9L257.0,260.3L256.9,259.6L256.2,258.9L255.2,258.3L254.4,257.9L254.2,257.0L253.6,256.4L253.7,257.3L253.1,258.1L252.6,257.2L251.7,256.9L251.4,256.3L251.5,255.3L251.9,254.4L251.2,253.9L251.8,253.3L252.3,252.9L254.0,253.7L254.6,253.3L255.4,253.6L255.8,254.2L256.6,254.4L257.3,253.8L257.8,255.5L258.8,256.7Z",NI:"M257.3,253.8L256.6,254.4L255.8,254.2L255.4,253.6L254.6,253.3L254.0,253.7L252.3,252.9L251.8,253.3L251.0,252.3L249.9,251.1L249.4,250.0L248.3,249.1L247.1,247.7L247.4,247.2L247.8,247.7L248.1,247.4L248.9,247.3L249.3,246.6L249.7,246.6L249.8,245.0L250.4,245.0L251.0,245.0L251.6,244.2L252.3,244.8L252.6,244.4L253.2,244.0L254.2,243.2L254.3,242.5L254.5,242.6L255.0,241.8L255.2,241.7L255.6,242.2L256.2,242.4L256.8,242.0L257.5,242.0L258.4,241.6L258.8,241.1L259.7,241.2L259.5,241.5L259.3,242.2L259.4,243.3L258.7,244.4L258.3,245.6L258.1,247.0L258.2,247.8L258.1,249.2L257.7,249.5L257.3,250.8L257.5,251.6L256.9,252.4L256.9,253.3Z",HN:"M259.7,241.2L258.8,241.1L258.4,241.6L257.5,242.0L256.8,242.0L256.2,242.4L255.6,242.2L255.2,241.7L255.0,241.8L254.5,242.6L254.3,242.5L254.2,243.2L253.2,244.0L252.6,244.4L252.3,244.8L251.6,244.2L251.0,245.0L250.4,245.0L249.8,245.0L249.7,246.6L249.3,246.6L248.9,247.3L248.1,247.4L247.7,246.5L246.9,246.2L247.2,245.0L246.9,244.6L246.4,244.4L245.2,244.8L245.1,244.3L244.4,243.8L243.9,243.2L243.1,243.0L243.7,242.2L243.6,241.6L243.8,241.0L245.2,240.1L246.5,238.9L246.8,239.0L247.4,238.5L248.2,238.5L248.4,238.7L248.8,238.5L250.0,238.8L251.3,238.7L252.2,238.4L252.5,238.1L253.3,238.2L253.9,238.4L254.6,238.4L255.2,238.1L256.4,238.5L256.8,238.6L257.5,239.2L258.2,239.9L259.1,240.3Z",SV:"M243.1,243.0L243.9,243.2L244.4,243.8L245.1,244.3L245.2,244.8L246.4,244.4L246.9,244.6L247.2,245.0L246.9,246.2L246.6,246.9L245.0,246.9L244.1,246.6L243.1,246.0L241.6,245.8L240.9,245.1L241.0,244.7L242.0,243.9L242.6,243.5L242.5,243.2Z",GT:"M235.5,242.6L235.7,241.7L236.1,241.0L235.8,240.4L237.3,237.9L240.7,237.9L240.9,236.8L240.5,236.6L240.3,235.9L239.4,235.2L238.6,234.2L239.7,234.2L240.0,232.4L242.4,232.4L244.9,232.5L244.6,234.9L243.9,238.4L244.7,238.4L245.5,239.0L245.8,238.5L246.5,238.9L245.2,240.1L243.8,241.0L243.6,241.6L243.7,242.2L243.1,243.0L242.5,243.2L242.6,243.5L242.0,243.9L241.0,244.7L240.9,245.1L239.6,244.6L238.0,244.5L236.8,243.9Z",BZ:"M244.9,232.5L244.9,232.0L245.3,231.9L245.7,232.2L246.9,230.3L247.4,230.3L247.3,230.8L247.8,230.8L247.7,231.6L247.1,233.0L247.2,233.4L246.8,234.6L247.0,234.9L246.5,236.4L245.9,237.2L245.4,237.3L244.7,238.4L243.9,238.4L244.6,234.9Z",VE:"M317.6,271.6L317.9,272.4L316.9,273.6L313.9,274.8L312.0,275.3L311.2,276.0L309.1,275.2L307.1,274.8L306.6,275.1L307.8,275.9L307.6,278.0L308.0,279.9L310.2,280.2L310.4,280.9L308.5,281.7L308.1,283.0L307.0,283.6L305.0,284.3L304.5,285.2L302.4,285.4L301.0,283.8L300.2,280.7L299.5,279.6L298.5,278.9L299.9,277.4L299.8,276.7L299.1,275.8L298.6,273.7L298.9,271.5L299.5,270.5L300.0,268.8L299.1,268.3L297.5,268.6L295.6,268.4L294.5,268.8L292.8,266.1L291.2,265.7L287.8,266.0L287.2,264.9L286.5,264.7L286.5,264.0L286.8,262.9L286.7,261.6L286.1,261.0L285.9,259.5L284.5,259.3L285.3,257.5L285.8,255.3L286.6,254.1L287.7,253.3L288.5,251.7L290.2,251.2L290.1,251.9L288.5,252.3L289.3,253.7L289.2,255.3L287.9,257.1L288.8,259.6L289.9,259.4L290.7,257.1L289.9,256.0L289.9,253.7L293.3,252.4L293.0,251.0L294.0,250.0L294.8,252.2L296.7,252.2L298.3,253.9L298.4,255.0L300.8,255.0L303.6,254.7L305.1,256.1L307.1,256.5L308.6,255.5L308.7,254.7L312.0,254.5L315.2,254.5L312.9,255.4L313.7,256.9L315.8,257.1L317.8,258.6L318.1,261.1L319.5,261.0L320.5,261.8L318.3,263.6L318.1,264.7L318.9,265.9L318.3,266.4L316.6,266.9L316.6,268.4L315.8,269.2Z",GY:"M328.6,281.8L328.0,281.9L326.5,281.6L325.6,282.5L324.4,283.0L323.6,283.1L323.3,283.7L322.0,283.6L320.3,282.1L320.1,280.7L319.5,279.1L319.9,276.5L320.7,275.4L320.1,274.0L319.2,273.5L319.6,272.1L319.0,271.4L317.6,271.6L315.8,269.2L316.6,268.4L316.6,266.9L318.3,266.4L318.9,265.9L318.1,264.7L318.3,263.6L320.5,261.8L322.2,262.9L323.8,264.9L323.8,266.5L324.8,266.6L326.2,268.1L327.2,269.2L326.7,272.0L325.1,272.8L325.2,273.5L324.7,275.1L325.9,277.3L326.7,277.3L327.0,279.1Z",SR:"M334.0,280.5L332.5,279.9L331.3,280.2L330.2,279.9L329.9,280.8L330.3,281.4L330.1,282.0L328.6,281.8L327.0,279.1L326.7,277.3L325.9,277.3L324.7,275.1L325.2,273.5L325.1,272.8L326.7,272.0L327.2,269.2L330.4,269.8L330.7,269.2L332.9,269.0L335.7,269.8L334.3,272.5L334.5,274.6L335.5,276.5L335.0,277.8L334.7,279.2Z",FR:"M341.8,274.8L340.2,277.6L339.3,279.9L338.3,281.1L337.0,281.3L336.6,280.4L336.0,280.3L335.2,281.1L334.0,280.5L334.7,279.2L335.0,277.8L335.5,276.5L334.5,274.6L334.3,272.5L335.7,269.8L336.6,270.2L338.6,270.9L341.4,273.5ZM494.5,134.5L495.6,135.2L499.1,135.8L497.9,137.9L497.7,140.0L497.1,140.5L496.0,140.3L496.1,141.0L494.4,142.7L494.4,144.1L495.5,143.6L496.4,145.0L496.3,145.8L497.0,147.0L496.2,147.9L496.9,150.3L498.2,150.7L498.0,152.0L495.8,153.7L491.0,152.9L487.5,153.9L487.2,155.7L484.4,156.1L481.7,154.7L480.8,155.4L476.3,154.0L475.3,152.8L476.6,151.0L477.1,144.9L474.6,141.7L472.9,140.2L469.3,139.0L469.1,136.8L472.2,136.1L476.1,136.9L475.4,133.5L477.6,134.8L483.1,132.5L483.8,130.0L485.8,129.4L486.2,130.5L487.2,130.5L488.3,131.7L490.0,133.1L491.2,132.9L493.3,134.3L493.8,134.5ZM501.3,155.3L502.8,154.1L503.3,156.7L502.6,159.1L501.5,158.5L500.8,156.4Z",EC:"M278.2,288.1L278.6,290.5L277.8,292.5L274.9,295.7L271.7,297.0L270.1,299.7L269.7,301.8L268.2,303.0L267.0,301.5L265.9,301.1L264.8,301.4L264.7,300.2L265.5,299.5L265.1,298.2L266.5,295.9L265.9,294.5L264.9,296.0L263.3,294.6L263.8,293.8L263.3,290.9L264.3,290.5L264.8,288.5L265.8,286.6L265.6,285.3L267.1,284.6L268.9,283.4L271.6,285.2L272.1,285.1L272.7,286.4L275.0,286.9L275.7,286.4L277.1,287.4Z",PR:"M305.4,230.3L306.7,230.5L307.1,231.1L306.4,231.9L304.4,231.9L302.8,232.0L302.8,230.7L303.2,230.2Z",JM:"M275.6,230.3L277.4,230.6L278.7,231.4L279.0,232.2L277.2,232.3L276.3,232.8L274.9,232.3L273.5,231.2L273.9,230.4L275.0,230.2Z",CU:"M265.3,215.7L267.5,215.9L269.6,216.0L271.9,217.0L272.7,218.2L275.2,217.8L276.1,218.5L278.0,220.5L279.4,221.9L280.3,221.8L281.8,222.5L281.5,223.4L283.4,223.5L285.2,224.8L284.8,225.5L283.0,225.9L281.2,226.0L279.5,225.8L275.7,226.1L277.6,224.4L276.7,223.5L275.0,223.3L274.2,222.4L273.9,220.7L272.4,220.8L270.0,219.9L269.3,219.3L266.0,218.8L265.2,218.2L266.3,217.4L263.7,217.3L261.6,218.9L260.5,218.9L260.0,219.7L258.7,220.0L257.6,219.7L259.1,218.8L259.9,217.6L261.2,217.0L262.6,216.3L264.6,216.1Z",ZW:"M561.5,356.7L560.1,356.4L559.2,356.8L558.0,356.2L556.9,356.2L555.3,354.8L553.3,354.3L552.7,352.4L552.7,351.3L551.6,350.9L548.8,347.5L548.0,345.7L547.5,345.2L546.6,342.7L549.5,343.0L550.4,343.4L551.3,343.3L552.8,341.3L555.2,338.7L556.1,338.5L556.5,337.4L558.1,336.2L560.1,335.7L560.2,336.9L562.4,336.8L563.6,337.5L564.1,338.3L565.4,338.5L566.7,339.5L566.5,343.4L565.9,345.6L565.7,347.9L566.1,348.8L565.7,350.7L565.3,350.9L564.5,353.2Z",BW:"M556.9,356.2L553.1,358.5L550.6,360.8L549.7,362.9L548.8,364.1L547.4,364.3L546.9,365.8L546.5,366.8L544.8,367.5L542.7,367.4L541.5,366.5L540.5,366.1L539.2,366.8L538.5,368.3L537.2,369.3L535.8,370.7L534.0,371.0L533.4,369.9L533.8,368.0L532.3,365.0L531.7,364.6L532.0,355.5L534.6,355.4L535.1,344.3L537.0,344.2L541.1,343.1L542.1,344.4L543.8,343.1L544.6,343.1L546.1,342.4L546.6,342.7L547.5,345.2L548.0,345.7L548.8,347.5L551.6,350.9L552.7,351.3L552.7,352.4L553.3,354.3L555.3,354.8Z",NA:"M531.7,364.6L531.2,376.1L528.8,377.7L527.4,377.9L525.8,377.3L524.7,377.1L524.3,375.7L523.3,374.9L522.0,376.4L520.2,374.1L519.3,371.8L518.8,368.8L518.2,366.5L517.5,361.7L517.5,358.0L517.2,356.3L516.3,355.0L515.0,352.4L513.7,348.7L513.1,346.7L511.0,343.7L510.9,341.3L512.2,340.7L513.8,340.2L515.5,340.3L517.1,341.7L517.5,341.5L528.2,341.3L529.9,342.8L536.3,343.3L541.2,342.0L543.4,341.3L545.1,341.5L546.1,342.2L546.1,342.4L544.6,343.1L543.8,343.1L542.1,344.4L541.1,343.1L537.0,344.2L535.1,344.3L534.6,355.4L532.0,355.5Z",SN:"M435.6,245.5L434.5,243.1L433.3,242.0L434.4,241.4L435.8,239.2L436.4,237.7L437.3,236.7L438.7,236.9L440.0,236.2L441.4,236.2L442.7,237.1L444.4,238L446.0,240.2L447.7,242.4L447.8,244.3L448.3,246.1L449.3,246.9L449.5,248.2L449.4,249.1L449.0,249.3L447.5,249.0L447.3,249.4L446.7,249.5L444.8,248.7L443.6,248.7L438.6,248.5L437.9,248.9L437.0,248.8L435.6,249.3L435.2,246.9L437.6,247.0L438.3,246.5L438.8,246.5L439.8,245.8L440.9,246.5L442.1,246.5L443.2,245.8L442.7,244.9L441.8,245.4L441.0,245.4L439.9,244.7L439.1,244.7L438.5,245.5Z",ML:"M449.4,249.1L449.5,248.2L449.3,246.9L448.3,246.1L447.8,244.3L447.7,242.4L448.6,241.8L449.1,240.0L449.9,239.9L451.7,240.8L453.3,240.2L454.3,240.4L454.7,239.7L465.3,239.6L465.9,237.4L465.4,237.1L464.3,223.6L463.2,210.2L467.2,210.1L475.9,216.9L484.7,223.7L485.4,225.2L487.0,226.1L488.2,226.6L488.3,228.6L491.2,228.3L491.2,235.4L489.8,237.5L489.6,239.4L487.2,239.9L483.6,240.2L482.6,241.3L480.9,241.4L479.2,241.4L478.6,240.8L477.1,241.3L474.7,242.6L474.1,243.5L472.1,244.9L471.7,245.7L470.6,246.3L469.3,245.9L468.6,246.7L468.2,248.8L466.1,251.4L466.1,252.4L465.4,253.7L465.6,255.5L464.5,256.0L463.8,256.4L463.4,255.1L462.7,255.4L462.2,255.4L461.7,256.3L459.6,256.2L458.9,255.8L458.6,256.1L457.8,255.2L457.9,254.2L457.6,253.9L457.0,254.2L457.1,253.2L457.7,252.4L456.6,251.1L456.3,250.2L455.7,249.5L455.2,249.5L454.5,249.9L453.7,250.3L452.9,251.0L451.8,250.7L451.1,249.9L450.6,249.8L449.9,250.2L449.5,250.3Z",MR:"M435.2,222.5L435.8,221.5L446.1,221.5L445.7,217.0L446.4,215.4L448.8,215.1L448.9,207.2L457.4,207.3L457.5,202.6L467.2,210.1L463.2,210.2L464.3,223.6L465.4,237.1L465.9,237.4L465.3,239.6L454.7,239.7L454.3,240.4L453.3,240.2L451.7,240.8L449.9,239.9L449.1,240.0L448.6,241.8L447.7,242.4L446.0,240.2L444.4,238L442.7,237.1L441.4,236.2L440.0,236.2L438.7,236.9L437.3,236.7L436.4,237.7L436.2,236.0L437.0,234.4L437.4,231.5L437.2,228.4L436.9,226.9L437.2,225.3L436.6,223.9Z",BJ:"M487.1,268.3L484.9,268.6L484.3,266.5L484.4,259.4L483.9,258.8L483.7,257.2L482.8,256.1L482.0,255.2L482.3,253.6L483.3,253.2L483.8,251.9L485.1,251.6L485.7,250.7L486.6,249.8L487.5,249.8L489.6,251.5L489.5,252.6L490.1,254.4L489.5,255.7L489.8,256.5L488.5,258.4L487.7,259.4L487.2,261.3L487.3,263.3Z",NE:"M518.7,216.7L519.5,221.6L520.5,222.4L520.6,223.4L521.7,224.4L521.2,225.8L520.3,232.1L520.2,236.1L516.9,239.1L515.8,243.1L517.0,244.3L517.0,246.3L518.7,246.4L518.5,247.8L517.7,248.0L517.6,249.0L517.1,249.1L515.3,245.7L514.7,245.5L512.6,247.3L510.6,246.4L509.1,246.2L508.4,246.6L506.8,246.5L505.2,247.9L503.9,247.9L500.7,246.3L499.4,247.1L498.1,247.0L497.1,245.9L494.4,244.7L491.5,245.1L490.9,245.7L490.5,247.5L489.7,248.8L489.6,251.5L487.5,249.8L486.6,249.8L485.7,250.7L485.7,248.5L482.7,247.8L482.6,246.3L481.1,244.3L480.7,242.9L480.9,241.4L482.6,241.3L483.6,240.2L487.2,239.9L489.6,239.4L489.8,237.5L491.2,235.4L491.2,228.3L494.9,226.9L502.4,220.8L511.2,214.8L515.4,216.2L516.9,217.9Z",NG:"M487.1,268.3L487.3,263.3L487.2,261.3L487.7,259.4L488.5,258.4L489.8,256.5L489.5,255.7L490.1,254.4L489.5,252.6L489.6,251.5L489.7,248.8L490.5,247.5L490.9,245.7L491.5,245.1L494.4,244.7L497.1,245.9L498.1,247.0L499.4,247.1L500.7,246.3L503.9,247.9L505.2,247.9L506.8,246.5L508.4,246.6L509.1,246.2L510.6,246.4L512.6,247.3L514.7,245.5L515.3,245.7L517.1,249.1L517.6,249.0L518.7,250.2L518.4,250.8L518.3,251.8L516.1,254.2L515.4,256.2L515.0,257.8L514.5,258.5L514.0,260.7L512.6,261.9L512.2,263.5L511.6,264.8L511.3,266.1L509.5,267.1L508.0,265.8L507.0,265.9L505.4,267.7L504.6,267.7L503.4,270.7L502.7,272.9L499.9,274.0L498.9,273.8L497.9,274.5L495.7,274.5L494.3,272.5L493.4,270.3L491.5,268.3L489.5,268.3Z",CM:"M518.5,247.8L519.5,249.8L519.7,251.9L519.7,253.9L521.2,256.8L519.7,256.7L518.9,256.9L517.7,256.6L517.1,258.1L518.7,259.9L519.9,260.4L520.3,261.7L521.2,263.8L520.7,264.7L519.4,267.8L518.8,268.4L518.6,270.8L518.9,272.1L518.7,273.0L519.9,274.6L520.2,275.7L521.2,277.3L522.4,278.3L522.5,279.7L522.8,280.7L522.6,282.3L520.5,281.6L518.3,280.8L514.9,280.7L514.6,280.5L513.0,280.9L511.4,280.5L510.1,280.7L505.8,280.6L506.2,278.2L505.1,276.1L503.9,275.6L503.3,274.2L502.6,273.7L502.7,272.9L503.4,270.7L504.6,267.7L505.4,267.7L507.0,265.9L508.0,265.8L509.5,267.1L511.3,266.1L511.6,264.8L512.2,263.5L512.6,261.9L514.0,260.7L514.5,258.5L515.0,257.8L515.4,256.2L516.1,254.2L518.3,251.8L518.4,250.8L518.7,250.2L517.6,249.0L517.7,248.0Z",TG:"M482.3,253.6L482.0,255.2L482.8,256.1L483.7,257.2L483.9,258.8L484.4,259.4L484.3,266.5L484.9,268.6L482.8,269.3L482.2,268.2L481.5,266.3L481.3,264.7L481.8,261.9L481.2,260.8L480.9,258.4L480.9,256.1L479.8,254.5L480.0,253.5Z",GH:"M480.0,253.5L479.8,254.5L480.9,256.1L480.9,258.4L481.2,260.8L481.8,261.9L481.3,264.7L481.5,266.3L482.2,268.2L482.8,269.3L478.6,271.1L477.1,272.2L474.7,273.1L472.3,272.2L472.4,271.0L471.3,268.3L472.0,264.8L473.1,262.2L472.4,257.8L472.1,255.5L472.1,253.7L476.7,253.6L477.9,253.8L478.8,253.3Z",CI:"M458.6,256.1L458.9,255.8L459.6,256.2L461.7,256.3L462.2,255.4L462.7,255.4L463.4,255.1L463.8,256.4L464.5,256.0L465.6,255.5L466.8,256.2L467.2,257.2L468.4,257.9L469.3,257.1L470.6,257.0L472.4,257.8L473.1,262.2L472.0,264.8L471.3,268.3L472.4,271.0L472.3,272.2L471.1,272.2L469.2,271.6L467.5,271.7L464.4,272.2L462.5,273.1L459.8,274.2L459.3,274.2L459.5,271.6L459.8,271.2L459.7,270.0L458.6,268.7L457.7,268.5L457.0,267.6L457.6,266.3L457.3,264.8L457.4,263.9L457.8,263.9L458.0,262.5L457.8,261.9L458.1,261.5L459.1,261.1L458.4,258.6L457.8,257.3L458.0,256.3Z",GN:"M443.6,248.7L444.8,248.7L446.7,249.5L447.3,249.4L447.5,249.0L449.0,249.3L449.4,249.1L449.5,250.3L449.9,250.2L450.6,249.8L451.1,249.9L451.8,250.7L452.9,251.0L453.7,250.3L454.5,249.9L455.2,249.5L455.7,249.5L456.3,250.2L456.6,251.1L457.7,252.4L457.1,253.2L457.0,254.2L457.6,253.9L457.9,254.2L457.8,255.2L458.6,256.1L458.0,256.3L457.8,257.3L458.4,258.6L459.1,261.1L458.1,261.5L457.8,261.9L458.0,262.5L457.8,263.9L457.4,263.9L456.7,263.8L456.1,265.0L455.4,265.0L454.8,264.4L455.0,263.1L453.9,261.2L453.2,261.6L452.7,261.6L451.9,261.8L452.0,260.7L451.5,259.9L451.6,259.0L451.1,257.7L450.3,256.6L448.2,256.5L447.6,257.1L446.8,257.2L446.4,257.9L446.1,258.7L444.6,260.1L443.5,258.3L442.4,257.0L441.8,256.6L441.1,256.0L440.8,254.7L440.4,254.0L439.7,253.5L440.9,252.0L441.7,252.0L442.4,251.5L443.0,251.5L443.4,251.1L443.2,250.0L443.5,249.7Z",GW:"M435.6,249.3L437.0,248.8L437.9,248.9L438.6,248.5L443.6,248.7L443.5,249.7L443.2,250.0L443.4,251.1L443.0,251.5L442.4,251.5L441.7,252.0L440.9,252.0L439.7,253.5L438.3,252.2L437.2,252.0L436.6,251.1L436.6,250.6L435.8,250.0Z",LR:"M457.4,263.9L457.3,264.8L457.6,266.3L457.0,267.6L457.7,268.5L458.6,268.7L459.7,270.0L459.8,271.2L459.5,271.6L459.3,274.2L458.6,274.2L455.9,272.7L453.5,270.4L451.2,268.7L449.4,266.7L450.0,265.7L450.2,264.8L451.4,263.1L452.7,261.6L453.2,261.6L453.9,261.2L455.0,263.1L454.8,264.4L455.4,265.0L456.1,265.0L456.7,263.8Z",SL:"M444.6,260.1L446.1,258.7L446.4,257.9L446.8,257.2L447.6,257.1L448.2,256.5L450.3,256.6L451.1,257.7L451.6,259.0L451.5,259.9L452.0,260.7L451.9,261.8L452.7,261.6L451.4,263.1L450.2,264.8L450.0,265.7L449.4,266.7L448.7,266.4L446.8,265.2L445.4,263.5L444.9,262.4Z",BF:"M465.6,255.5L465.4,253.7L466.1,252.4L466.1,251.4L468.2,248.8L468.6,246.7L469.3,245.9L470.6,246.3L471.7,245.7L472.1,244.9L474.1,243.5L474.7,242.6L477.1,241.3L478.6,240.8L479.2,241.4L480.9,241.4L480.7,242.9L481.1,244.3L482.6,246.3L482.7,247.8L485.7,248.5L485.7,250.7L485.1,251.6L483.8,251.9L483.3,253.2L482.3,253.6L480.0,253.5L478.8,253.3L477.9,253.8L476.7,253.6L472.1,253.7L472.1,255.5L472.4,257.8L470.6,257.0L469.3,257.1L468.4,257.9L467.2,257.2L466.8,256.2Z",CF:"M553.1,271.5L552.3,271.8L550.5,271.7L548.5,271.4L547.5,271.7L547.1,272.4L546.3,272.5L545.2,271.9L542.2,273.4L541.0,273.1L540.7,273.3L539.9,275.2L537.9,274.6L535.9,274.3L534.2,273.1L532.0,272.1L530.6,273.1L529.5,274.7L529.3,276.8L527.6,276.6L525.8,276.1L524.2,277.8L522.8,280.7L522.5,279.7L522.4,278.3L521.2,277.3L520.2,275.7L519.9,274.6L518.7,273.0L518.9,272.1L518.6,270.8L518.8,268.4L519.4,267.8L520.7,264.7L522.9,264.5L523.4,263.7L523.9,263.7L524.5,264.4L527.9,263.2L529.0,262.0L530.4,260.9L530.1,259.8L530.9,259.6L533.4,259.8L535.9,258.3L537.8,254.9L539.1,253.7L540.8,253.1L541.1,254.5L542.7,256.4L542.7,257.7L542.3,259.0L542.5,259.9L543.4,260.8L545.5,262.2L547.0,263.4L547.0,264.4L548.8,266.1L550.0,267.4L550.7,269.3L552.7,270.5Z",CG:"M529.3,276.8L529.2,278.7L528.4,280.3L527.8,282.3L527.5,285.0L527.7,286.8L527.2,287.9L527.2,289.0L526.9,290.0L525.1,291.5L523.9,293.1L522.7,296.1L522.8,298.6L522.1,299.6L520.5,301.1L518.9,303.1L517.9,302.5L517.8,301.6L516.3,301.6L515.4,302.8L514.7,302.5L513.7,301.4L512.9,301.9L511.8,303.3L509.6,300.0L511.7,298.3L510.7,296.2L511.6,295.5L513.4,295.1L513.6,293.7L515.0,295.2L517.4,295.3L518.2,293.9L518.6,291.8L518.3,289.4L517.0,287.5L518.2,284.0L517.5,283.4L515.5,283.6L514.7,282.0L514.9,280.7L518.3,280.8L520.5,281.6L522.6,282.3L522.8,280.7L524.2,277.8L525.8,276.1L527.6,276.6Z",GA:"M510.1,280.7L511.4,280.5L513.0,280.9L514.6,280.5L514.9,280.7L514.7,282.0L515.5,283.6L517.5,283.4L518.2,284.0L517.0,287.5L518.3,289.4L518.6,291.8L518.2,293.9L517.4,295.3L515.0,295.2L513.6,293.7L513.4,295.1L511.6,295.5L510.7,296.2L511.7,298.3L509.6,300.0L506.9,296.9L505.1,294.3L503.5,291.1L503.6,290.1L504.2,289.1L504.8,286.8L505.4,284.5L506.3,284.4L510.2,284.4Z",GQ:"M505.8,280.6L510.1,280.7L510.2,284.4L506.3,284.4L505.4,284.5L504.9,284.1Z",ZM:"M562.0,313.5L563.1,314.3L564.1,314.8L565.8,315.3L567.3,316.3L568.5,317.6L569.1,320.3L568.6,321.1L568.0,323.6L568.5,326.2L567.6,327.3L566.7,330.2L568.0,331.0L559.9,333.5L560.1,335.7L558.1,336.2L556.5,337.4L556.1,338.5L555.2,338.7L552.8,341.3L551.3,343.3L550.4,343.4L549.5,343.0L546.6,342.7L546.1,342.4L546.1,342.2L545.1,341.5L543.4,341.3L541.2,342.0L539.5,340.1L537.8,337.5L538.2,327.6L543.7,327.7L543.5,326.6L544.0,325.4L543.5,324.0L543.9,322.5L543.6,321.5L544.5,321.6L544.6,322.6L545.9,322.5L547.6,322.8L548.4,324.2L550.6,324.6L552.2,323.6L552.8,325.3L554.8,325.7L555.7,327.0L556.8,328.7L558.8,328.8L558.7,325.4L557.9,326.0L556.1,324.8L555.4,324.2L555.8,321.1L556.4,317.4L555.8,316.1L556.6,314.1L557.3,313.7L560.9,313.2Z",MW:"M567.3,316.3L569.9,316.8L570.4,317.7L571.3,319.1L571.9,323.4L571.1,325.7L571.7,329.8L572.6,329.7L573.5,330.7L574.5,333.0L574.6,336.9L573.4,337.6L572.5,339.8L570.9,337.8L570.8,335.6L571.4,334.2L571.3,333.0L570.3,332.2L569.5,332.5L568.0,331.0L566.7,330.2L567.6,327.3L568.5,326.2L568.0,323.6L568.6,321.1L569.1,320.3L568.5,317.6Z",MZ:"M571.9,323.4L573.9,323.1L577.1,324.0L577.8,323.6L579.6,323.5L580.6,322.6L582.2,322.6L585.1,321.4L587.3,319.6L587.7,321.0L587.5,324.1L587.7,326.8L587.6,331.7L588.0,333.2L587.1,335.4L586.0,337.6L584.2,339.5L581.7,340.7L578.6,342.2L575.5,345.5L574.4,346.1L572.5,348.3L571.4,349.0L571.0,351.2L572.1,353.6L572.5,355.4L572.5,356.4L573.0,356.2L572.7,359.3L572.2,360.7L572.7,361.2L572.3,362.5L571.1,363.7L568.9,364.7L565.6,366.4L564.4,367.5L564.6,368.9L565.2,369.1L564.9,370.7L562.9,370.7L562.8,369.3L562.5,367.9L562.3,366.8L563.0,363.3L562.5,361.1L561.5,356.7L564.5,353.2L565.3,350.9L565.7,350.7L566.1,348.8L565.7,347.9L565.9,345.6L566.5,343.4L566.7,339.5L565.4,338.5L564.1,338.3L563.6,337.5L562.4,336.8L560.2,336.9L560.1,335.7L559.9,333.5L568.0,331.0L569.5,332.5L570.3,332.2L571.3,333.0L571.4,334.2L570.8,335.6L570.9,337.8L572.5,339.8L573.4,337.6L574.6,336.9L574.5,333.0L573.5,330.7L572.6,329.7L571.7,329.8L571.1,325.7Z",SZ:"M562.9,370.7L562.3,372.1L560.7,372.4L559.3,370.7L559.4,369.6L560.1,368.5L560.5,367.6L561.2,367.3L562.5,367.9L562.8,369.3Z",AO:"M514.7,302.5L513.7,303.1L513.3,303.9L513.2,305.3L512.5,305.6L511.8,303.3L512.9,301.9L513.7,301.4ZM512.9,306.6L514.0,306.1L514.8,306.2L515.7,305.8L523.6,305.9L524.2,308.2L525.0,310.0L525.6,311.0L526.6,312.7L528.3,312.4L529.2,312.0L530.7,312.4L531.1,311.6L531.8,309.8L533.5,309.7L533.6,309.2L535.0,309.2L534.7,310.3L538.0,310.3L538.0,312.2L538.5,313.4L538.1,315.3L538.3,317.2L539.1,318.3L538.9,322.0L539.6,321.7L540.7,321.8L542.4,321.3L543.6,321.5L543.9,322.5L543.5,324.0L544.0,325.4L543.5,326.6L543.7,327.7L538.2,327.6L537.8,337.5L539.5,340.1L541.2,342.0L536.3,343.3L529.9,342.8L528.2,341.3L517.5,341.5L517.1,341.7L515.5,340.3L513.8,340.2L512.2,340.7L510.9,341.3L510.7,339.4L511.1,336.6L512.1,333.8L512.2,332.5L513.1,329.7L513.8,328.4L515.3,326.4L516.2,325.0L516.5,322.7L516.4,320.9L515.6,319.8L514.9,317.9L514.3,316.1L514.4,315.4L515.3,314.2L514.5,311.2L513.9,309.1L512.6,307.2Z",BI:"M561.5,295.1L561.6,296.4L562.2,297.1L562.2,298.1L561.6,298.7L560.5,300.3L559.5,301.5L558.4,301.6L558.3,297.9L557.6,296.5L559.2,296.7L560.1,294.9Z",IL:"M570.7,186.0L570.3,187.0L569.4,186.6L569.0,188.6L569.7,189.0L569.1,189.4L569.1,190.2L570.2,189.8L570.4,191.0L569.6,196.0L569.2,195.2L567.4,190.7L568.1,189.6L567.9,189.5L568.4,188.0L568.7,185.7L569.0,184.9L569.1,184.8L569.9,184.8L570.1,184.3L570.8,184.2L570.9,185.5L570.6,186.0Z",LB:"M570.8,184.2L570.1,184.3L569.9,184.8L569.1,184.8L569.7,182.3L570.7,180.1L570.8,180.0L571.9,180.2L572.5,181.4L571.2,182.5Z",MG:"M611.6,326.3L612.2,327.6L612.8,329.7L613.0,333.4L613.6,334.9L613.2,336.4L612.7,337.3L611.9,335.4L611.4,336.4L611.7,338.7L611.4,340.0L610.6,340.7L610.3,343.3L609.0,347.0L607.3,351.2L605.2,357.2L603.8,361.5L602.3,365.1L600.1,365.8L597.7,367.2L596.3,366.4L594.4,365.2L593.8,363.6L593.9,360.8L593.1,358.3L593.1,356.1L593.7,353.9L595.0,353.3L595.1,352.3L596.5,349.9L596.9,347.9L596.4,346.5L596.0,344.5L596.0,341.7L597.0,339.9L597.5,337.9L598.8,337.8L600.3,337.2L601.3,336.6L602.5,336.6L604.1,334.8L606.4,332.9L607.3,331.3L607.0,330.0L608.1,330.4L609.6,328.2L609.8,326.4L610.7,325.0Z",PS:"M570.2,189.8L569.1,190.2L569.1,189.4L569.7,189.0L569.0,188.6L569.4,186.6L570.3,187.0L570.5,188.9Z",GM:"M435.6,245.5L438.5,245.5L439.1,244.7L439.9,244.7L441.0,245.4L441.8,245.4L442.7,244.9L443.2,245.8L442.1,246.5L440.9,246.5L439.8,245.8L438.8,246.5L438.3,246.5L437.6,247.0L435.2,246.9Z",TN:"M504.2,193.5L503.0,187.9L501.4,186.7L501.4,185.9L499.2,184.0L499.0,181.7L500.5,180.0L501.0,177.4L500.5,174.4L501.0,172.8L503.7,171.6L505.5,172.0L505.4,173.5L507.5,172.4L507.7,173.0L506.5,174.5L506.5,175.9L507.4,176.7L507.2,179.4L505.6,181.0L506.1,182.7L507.4,182.7L508.1,184.2L509.1,184.7L509.0,187.1L507.8,188.0L507.1,189.0L505.3,190.2L505.6,191.5L505.5,192.8Z",DZ:"M457.5,202.6L457.6,202.0L457.6,201.8L457.6,198.1L461.8,195.8L464.4,195.3L466.5,194.5L467.5,192.9L470.5,191.7L470.7,189.4L472.1,189.1L473.3,187.9L476.6,187.4L477.1,186.2L476.4,185.5L475.6,182.3L475.4,180.4L474.5,178.4L476.9,176.7L479.6,176.1L481.2,174.8L483.6,173.9L487.9,173.3L492.0,173.1L493.3,173.5L495.6,172.3L498.3,172.3L499.3,173.0L501.0,172.8L500.5,174.4L501.0,177.4L500.5,180.0L499.0,181.7L499.2,184.0L501.4,185.9L501.4,186.7L503.0,187.9L504.2,193.5L505.1,196.3L505.3,197.7L504.9,200.3L505.1,201.7L504.8,203.4L505.1,205.3L504.1,206.6L505.7,208.9L505.8,210.3L506.8,212.0L508.0,211.4L510.1,212.9L511.2,214.8L502.4,220.8L494.9,226.9L491.2,228.3L488.3,228.6L488.2,226.6L487.0,226.1L485.4,225.2L484.7,223.7L475.9,216.9L467.2,210.1Z",JO:"M570.3,187.0L570.7,186.0L573.6,187.3L578.3,183.9L579.7,187.7L579.3,188.2L574.3,189.8L577.2,192.9L576.4,193.4L576.0,194.5L574.1,194.9L573.6,196.0L572.6,197.0L569.7,196.5L569.6,196.0L570.4,191.0L570.2,189.8L570.5,188.9Z",AE:"M614.2,212.4L614.6,212.3L614.8,213.1L616.8,212.6L619.0,212.7L620.6,212.8L622.1,210.7L623.8,208.7L625.2,206.8L625.8,207.8L626.5,210.3L625.2,210.3L625.2,212.3L625.7,212.8L624.6,213.4L624.7,214.7L624.1,216L624.1,217.2L623.7,217.9L615.7,216.3L614.4,213.1Z",QA:"M612.0,210.8L611.6,208.6L612.1,206.9L612.8,206.6L613.7,207.6L613.9,209.4L613.6,211.2L612.9,211.4Z",KW:"M602.9,194.5L603.6,195.9L603.4,196.6L604.5,199.0L602.7,199.1L601.9,197.6L599.6,197.3L601.1,194.3Z",IQ:"M579.7,187.7L578.3,183.9L583.5,180.7L584.0,176.9L583.4,174.7L584.7,173.9L585.7,172.0L586.7,171.5L589.7,171.9L590.7,172.7L591.8,172.1L594.0,175.8L595.7,176.8L596.2,178.6L595.1,179.7L594.8,182.1L596.9,185.1L600.3,186.8L601.9,189.1L601.8,191.4L602.6,191.4L602.8,193.1L604.4,194.7L602.9,194.5L601.1,194.3L599.6,197.3L594.8,197.0L586.9,190.8L582.8,188.6Z",OM:"M624.1,217.2L624.1,216L624.7,214.7L624.6,213.4L625.7,212.8L625.2,212.3L625.2,210.3L626.5,210.3L627.9,212.4L629.5,213.6L631.4,214.0L633.0,214.5L634.4,216.3L635.2,217.4L636.2,217.7L636.3,218.4L635.5,220.3L635.2,221.2L634.2,222.2L633.4,224.3L632.2,224.1L631.8,224.9L631.5,226.5L632.0,228.5L631.8,228.9L630.6,228.9L629.0,230.1L628.9,231.6L628.4,232.2L626.7,232.2L625.7,233.0L625.8,234.3L624.6,235.1L623.2,234.8L621.5,235.9L620.3,236.1L619.2,233.9L616.8,228.7L624.4,225.6L625.6,219.4ZM625.8,207.8L625.2,206.8L625.8,205.7L626.2,206.0L626.1,207.3Z",VU:"M922.3,336.9L923.5,338.7L922.6,339.1L922.0,337.8ZM921.3,336.2L921.1,335.4L921.5,333.0L922.6,334.0L922.5,336.5L921.9,336.1Z",KH:"M752.6,249.9L751.6,246.2L753.0,243.6L756.4,243.0L758.9,243.4L761.2,244.7L762.2,242.5L764.7,243.7L765.5,245.7L765.6,249.4L761.4,251.8L762.8,253.7L760.0,253.9L757.8,255.2L755.5,254.7L754.3,253.1Z",TH:"M758.9,243.4L756.4,243.0L753.0,243.6L751.6,246.2L752.6,249.9L750.1,248.5L747.8,248.5L748.0,246.1L745.6,246.1L745.8,249.5L744.8,254.1L744.1,256.8L744.5,259.1L746.2,259.1L747.5,262.0L748.2,264.7L749.8,266.4L751.4,266.8L752.9,268.4L752.0,269.7L750.3,270.0L750.0,268.5L747.8,267.1L747.3,267.7L746.2,266.5L745.7,264.9L744.1,263.2L742.7,261.7L742.4,263.5L741.8,261.8L742.0,259.9L742.5,256.9L743.6,253.7L744.8,250.8L743.4,248.0L743.3,246.6L742.8,244.8L740.8,242.4L740.0,240.8L740.8,240.2L741.4,237.5L740.1,235.5L738.1,233.2L736.4,230.5L737.5,229.9L738.2,226.5L740.0,226.4L741.3,225.1L742.7,224.3L744.0,225.3L744.4,227.2L746.2,227.3L746.1,230.6L746.6,233.4L749.1,231.5L750.0,232.1L751.5,232.0L751.9,230.9L753.9,231.1L756.3,233.6L756.9,236.7L759.4,239.4L759.6,242.0Z",LA:"M764.7,243.7L762.2,242.5L761.2,244.7L758.9,243.4L759.6,242.0L759.4,239.4L756.9,236.7L756.3,233.6L753.9,231.1L751.9,230.9L751.5,232.0L750.0,232.1L749.1,231.5L746.6,233.4L746.1,230.6L746.2,227.3L744.4,227.2L744.0,225.3L742.7,224.3L743.1,223.2L744.9,221.2L745.3,221.9L746.7,222.0L745.7,218.4L746.9,218.0L748.9,220.4L750.6,223.2L753.8,223.3L755.3,226.0L753.8,226.8L753.2,227.9L756.7,229.8L759.4,233.5L761.5,236.2L763.8,238.4L764.8,240.6Z",MM:"M742.7,224.3L741.3,225.1L740.0,226.4L738.2,226.5L737.5,229.9L736.4,230.5L738.1,233.2L740.1,235.5L741.4,237.5L740.8,240.2L740.0,240.8L740.8,242.4L742.8,244.8L743.3,246.6L743.4,248.0L744.8,250.8L743.6,253.7L742.5,256.9L742.1,254.6L742.7,252.2L741.6,250.4L741.5,247.0L740.3,245.4L739.0,241.7L738.0,237.8L736.5,235.2L735.0,236.7L732.3,239.0L730.8,238.7L729.0,238.0L729.5,234.1L728.5,231.2L725.9,227.6L726.1,226.5L724.5,226.1L722.2,223.6L721.7,221.0L722.7,221.5L722.4,219.3L723.5,218.5L723.0,217.2L723.4,216.2L722.9,212.9L725.1,213.6L725.8,211.1L725.6,209.6L726.5,206.9L726.1,205.2L729.0,203.0L730.9,203.6L730.3,201.6L731.1,201.1L730.6,199.9L732.1,199.7L733.3,201.5L734.6,202.2L735.2,204.6L735.7,207.2L733.8,209.8L734.2,213.5L736.8,213.0L738.0,215.8L739.8,216.5L739.5,219.0L741.6,220.2L742.9,220.8L744.6,219.9L744.9,221.2L743.1,223.2Z",VN:"M757.8,255.2L760.0,253.9L762.8,253.7L761.4,251.8L765.6,249.4L765.5,245.7L764.7,243.7L764.8,240.6L763.8,238.4L761.5,236.2L759.4,233.5L756.7,229.8L753.2,227.9L753.8,226.8L755.3,226.0L753.8,223.3L750.6,223.2L748.9,220.4L746.9,218.0L748.2,217.2L750.3,217.2L752.8,216.9L754.7,215.2L756.1,216.4L758.6,216.9L758.6,218.7L760.1,220.0L762.9,220.8L759.9,223.5L758.2,226.4L758.0,228.6L760.5,231.8L763.6,235.9L766.3,237.8L768.2,240.3L770.1,246.1L770.4,251.5L768.4,253.6L765.5,255.6L763.6,258.1L760.5,261.0L759.3,259.0L759.9,256.9Z",KP:"M799.6,156.5L799.6,156.5L799.6,156.5ZM799.0,156.0L799.6,156.5L798.6,156.3L798.0,157.4L797.8,158.4L798.9,160.6L798.0,161.3L797.8,161.9L797.3,162.8L795.9,163.3L795.2,164.1L795.7,165.5L795.5,165.8L796.8,166.3L798.7,167.7L798.7,168.4L797.7,168.6L796.0,168.8L795.7,170.2L794.5,170.1L794.5,170.3L793.0,169.8L792.9,170.3L792.3,170.6L792.0,170.0L791.2,169.7L790.4,169.2L790.5,167.9L790.9,167.5L790.4,166.9L790.4,165.3L790.0,164.8L788.4,164.4L786.9,163.6L788.0,161.6L790.0,159.9L790.6,157.8L792.2,158.7L794.4,158.8L793.3,157.2L796.4,155.9L796.5,154.2Z",KR:"M794.5,170.3L794.5,170.1L795.7,170.2L796.0,168.8L797.7,168.6L798.7,168.4L798.7,167.7L802.5,171.3L803.9,173.3L805.4,176.9L805.1,178.6L803.0,179.2L801.5,180.5L799.3,180.8L798.4,179.1L798.0,176.8L795.6,173.5L797.3,173.0Z",MN:"M686.6,135.0L688.9,134.4L692.3,131.9L695.2,130.4L697.7,131.4L700.1,131.4L702.3,132.8L704.7,132.9L708.4,133.7L709.8,131.6L708.0,129.8L708.9,126.7L712.1,128.0L714.4,128.3L717.5,129.1L719.0,131.3L723.0,132.6L724.9,132.0L727.7,131.6L730.2,132.0L733.2,133.5L735.4,135.0L737.6,135.0L740.8,135.5L742.6,134.7L745.4,134.2L747.8,132.1L749.3,132.4L751.1,133.4L753.8,133.2L753.8,135.4L753.7,138.5L755.0,139.7L756.1,139.3L758.7,139.8L760.0,138.7L762.4,139.6L765.6,141.8L765.9,142.8L763.8,142.5L760.6,142.9L759.3,143.8L758.5,145.8L755.4,147.0L753.8,148.6L751.0,148L749.5,147.7L749.2,149.6L750.5,150.8L751.3,151.8L750.0,152.9L749.0,154.5L746.6,155.6L743.0,155.7L739.5,156.8L737.3,158.4L735.8,157.5L732.8,157.5L728.5,155.6L725.9,155.2L722.8,155.6L717.5,154.9L714.9,155.0L712.8,153.1L710.6,150.3L709.0,150.0L705.4,148.1L702.0,147.6L698.9,147.1L697.5,145.8L697.1,142.2L694.5,139.8L690.7,138.7L688.1,137.1Z",IN:"M730.6,199.9L731.1,201.1L730.3,201.6L730.9,203.6L729.0,203.0L726.1,205.2L726.5,206.9L725.6,209.6L725.8,211.1L725.1,213.6L722.9,212.9L723.4,216.2L723.0,217.2L723.5,218.5L722.4,219.3L720.1,214.3L719.4,214.4L719.3,216.3L717.6,214.7L718.1,213.0L719.2,212.8L719.9,210.1L718.3,209.6L715.9,209.6L713.4,209.2L712.8,207.1L711.5,206.9L709.2,205.6L708.7,207.7L710.8,209.3L709.4,210.5L709.1,211.6L710.8,212.5L710.7,214.3L712.0,216.7L712.8,219.2L712.6,220.4L710.8,220.3L707.7,221.0L708.2,223.3L707.1,225.2L703.6,227.3L701.1,230.9L699.4,232.9L697.0,234.9L697.1,236.3L695.9,237.1L693.6,238.2L692.4,238.4L691.9,240.8L692.8,244.8L693.2,247.4L692.3,250.3L692.6,255.6L691.3,255.7L690.2,258.1L691.1,259.1L688.7,260.0L687.9,262.1L686.9,263.0L684.2,260.1L682.7,255.8L681.5,252.6L680.5,251.2L678.8,248.2L677.9,244.3L677.2,242.4L674.4,238.1L672.7,232.1L671.5,228.1L671.1,224.3L670.2,221.4L666.6,223.3L664.7,222.9L660.8,219.1L662.0,218.0L661.0,216.8L657.6,214.1L659.1,212.1L664.8,212.1L663.9,209.4L662.2,207.8L661.5,205.4L659.6,204.0L662.0,200.7L665.0,201.0L667.1,197.7L668.2,194.5L670.1,191.4L669.6,189.2L671.4,187.4L669.0,185.8L667.7,183.7L666.2,181.0L667.2,179.7L671.2,180.4L673.9,180.0L675.7,177.4L679.3,181.0L679.6,183.5L680.9,185.1L681.2,186.7L679.3,186.3L680.7,189.7L683.7,191.7L687.7,193.9L686.3,195.3L685.9,198.2L688.6,199.4L691.3,200.9L695.0,202.7L698.6,203.1L700.4,204.7L702.5,205.0L705.7,205.7L707.9,205.7L707.9,204.4L707.2,202.4L707.1,201.1L708.6,200.4L709.3,202.9L709.5,203.5L712.1,204.7L713.6,204.2L715.8,204.4L717.9,204.3L717.7,202.4L716.4,201.4L718.4,201.0L720.3,198.7L722.8,196.7L725.1,197.5L726.6,196.2L728.3,198.1L727.7,199.4Z",BD:"M722.4,219.3L722.7,221.5L721.7,221.0L722.2,223.6L721.2,221.9L720.8,220.3L720.1,218.8L718.7,217.0L716.3,216.9L716.7,218.2L716.2,219.9L715.0,219.3L714.7,219.9L713.9,219.5L712.8,219.2L712.0,216.7L710.7,214.3L710.8,212.5L709.1,211.6L709.4,210.5L710.8,209.3L708.7,207.7L709.2,205.6L711.5,206.9L712.8,207.1L713.4,209.2L715.9,209.6L718.3,209.6L719.9,210.1L719.2,212.8L718.1,213.0L717.6,214.7L719.3,216.3L719.4,214.4L720.1,214.3Z",BT:"M716.4,201.4L717.7,202.4L717.9,204.3L715.8,204.4L713.6,204.2L712.1,204.7L709.5,203.5L709.3,202.9L710.5,200.6L711.8,199.8L713.7,200.5L715.1,200.6Z",NP:"M707.1,201.1L707.2,202.4L707.9,204.4L707.9,205.7L705.7,205.7L702.5,205.0L700.4,204.7L698.6,203.1L695.0,202.7L691.3,200.9L688.6,199.4L685.9,198.2L686.3,195.3L687.7,193.9L688.6,193.2L690.8,194.1L693.8,196.1L695.4,196.6L696.5,198.1L698.7,198.7L701.0,200.1L704.1,200.8Z",PK:"M675.7,177.4L673.9,180.0L671.2,180.4L667.2,179.7L666.2,181.0L667.7,183.7L669.0,185.8L671.4,187.4L669.6,189.2L670.1,191.4L668.2,194.5L667.1,197.7L665.0,201.0L662.0,200.7L659.6,204.0L661.5,205.4L662.2,207.8L663.9,209.4L664.8,212.1L659.1,212.1L657.6,214.1L655.6,213.4L654.5,211.1L652.2,208.7L647.5,209.3L643.3,209.4L639.7,209.8L640.2,206.2L643.7,204.6L643.3,203.2L642.0,202.6L641.5,199.9L638.8,198.5L637.5,196.6L636.0,195.0L640.5,196.6L643.0,196.1L644.6,196.5L645.0,195.8L646.9,196.1L650.0,194.8L649.6,192.2L650.8,190.4L652.7,190.4L652.8,189.5L654.7,189.1L655.7,189.4L656.5,188.5L656.0,186.7L656.7,184.8L658.2,184.0L656.8,181.9L659.2,182.0L659.6,180.9L659.3,179.7L660.3,178.4L659.6,176.9L658.8,175.5L659.9,174.2L662.5,173.5L665.3,173.2L666.4,172.6L667.8,172.3L670.0,173.7L671.3,176.1Z",AF:"M646.0,171.5L647.4,171.6L649.4,172.2L650.3,172.6L651.9,171.6L652.8,172.2L653.3,170.8L654.8,170.8L655.1,170.4L655.1,169.1L655.9,168.1L657.4,168.8L657.4,169.7L658.2,169.9L658.5,172.5L659.8,173.5L660.5,172.8L661.5,172.5L662.7,171.1L664.5,171.4L667.1,171.4L667.8,172.3L666.4,172.6L665.3,173.2L662.5,173.5L659.9,174.2L658.8,175.5L659.6,176.9L660.3,178.4L659.3,179.7L659.6,180.9L659.2,182.0L656.8,181.9L658.2,184.0L656.7,184.8L656.0,186.7L656.5,188.5L655.7,189.4L654.7,189.1L652.8,189.5L652.7,190.4L650.8,190.4L649.6,192.2L650.0,194.8L646.9,196.1L645.0,195.8L644.6,196.5L643.0,196.1L640.5,196.6L636.0,195.0L637.9,192.2L637.4,190.2L635.3,189.6L634.8,187.7L633.6,185.2L634.4,183.5L633.2,183.0L633.5,180.7L633.8,176.9L636.6,178.0L638.4,177.6L638.6,176.2L640.5,175.8L641.8,174.8L641.8,172.3L643.7,171.7L643.9,170.6L645.2,171.4Z",TJ:"M649.4,172.2L650.1,169.1L649.1,166.8L647.1,166.0L647.4,164.7L649.5,164.8L650.3,163.1L650.6,161.1L653.7,160.4L653.5,161.8L654.1,162.7L655.1,162.6L654.4,163.6L651.6,163.1L651.8,164.8L654.4,164.6L657.7,165.6L662.3,165.1L663.7,168.0L664.4,167.7L666.1,168.4L666.3,169.6L667.1,171.4L664.5,171.4L662.7,171.1L661.5,172.5L660.5,172.8L659.8,173.5L658.5,172.5L658.2,169.9L657.4,169.7L657.4,168.8L655.9,168.1L655.1,169.1L655.1,170.4L654.8,170.8L653.3,170.8L652.8,172.2L651.9,171.6L650.3,172.6Z",KG:"M653.4,156.4L653.5,155.0L655.0,154.6L659.3,155.7L659.2,153.8L660.4,153.2L664.3,154.5L665.0,154.2L669.1,154.2L672.8,154.6L674.4,155.7L676.0,156.1L675.9,156.8L672.5,158.5L672.0,159.7L668.9,160.1L668.5,162.0L665.8,161.6L664.3,162.2L662.3,163.7L662.8,164.4L662.3,165.1L657.7,165.6L654.4,164.6L651.8,164.8L651.6,163.1L654.4,163.6L655.1,162.6L657.1,162.9L659.6,160.7L656.3,159.1L654.7,159.8L652.6,158.7L654.2,156.7Z",TM:"M608.5,157.9L609.4,156.8L612.1,156.2L613.9,157.1L616.1,159.5L617.3,159.3L620.1,159.3L619.4,157.7L621.2,156.7L622.9,154.9L626.5,156.5L627.4,159.0L628.4,159.6L631.1,159.5L632.0,160.0L633.9,163.2L637.2,165.3L639.1,166.8L642.1,168.3L645.7,169.6L646.0,171.5L645.2,171.4L643.9,170.6L643.7,171.7L641.8,172.3L641.8,174.8L640.5,175.8L638.6,176.2L638.4,177.6L636.6,178.0L633.8,176.9L633.1,174.2L631.2,174.1L627.8,171.4L625.7,171.0L622.7,169.5L620.9,169.2L619.9,169.8L618.2,169.7L616.7,171.4L614.7,172.0L613.8,169.9L613.6,166.6L611.5,165.6L611.7,163.4L610.0,163.3L610.1,160.7L612.6,161.4L614.5,160.4L612.4,158.6L611.3,156.8L609.5,157.6L609.7,159.9Z",IR:"M604.4,194.7L602.8,193.1L602.6,191.4L601.8,191.4L601.9,189.1L600.3,186.8L596.9,185.1L594.8,182.1L595.1,179.7L596.2,178.6L595.7,176.8L594.0,175.8L591.8,172.1L590.1,169.7L590.4,168.7L589.1,165.1L590.7,164.3L591.3,165.4L592.7,166.9L594.5,167.3L595.4,167.2L597.9,164.9L598.8,164.7L599.7,165.6L599.1,167.1L600.9,168.7L601.5,168.6L602.7,170.9L605.1,171.5L607.1,173.1L610.8,173.6L614.5,172.8L614.7,172.0L616.7,171.4L618.2,169.7L619.9,169.8L620.9,169.2L622.7,169.5L625.7,171.0L627.8,171.4L631.2,174.1L633.1,174.2L633.8,176.9L633.5,180.7L633.2,183.0L634.4,183.5L633.6,185.2L634.8,187.7L635.3,189.6L637.4,190.2L637.9,192.2L636.0,195.0L637.5,196.6L638.8,198.5L641.5,199.9L642.0,202.6L643.3,203.2L643.7,204.6L640.2,206.2L639.7,209.8L634.7,208.9L631.8,208.2L628.8,207.8L627.2,203.9L625.9,203.4L624.0,203.9L621.6,205.4L618.3,204.4L615.4,202.0L612.8,201.1L610.7,198.2L608.3,194.0L607.0,194.5L605.2,193.5Z",SY:"M570.7,186.0L570.6,186.0L570.9,185.5L570.8,184.2L571.2,182.5L572.5,181.4L571.9,180.2L570.8,180.0L570.3,177.6L570.7,176.3L571.3,175.7L571.9,175.0L571.9,173.2L572.8,173.8L575.4,173.0L576.8,173.6L578.9,173.6L581.6,172.4L583.0,172.4L585.7,172.0L584.7,173.9L583.4,174.7L584.0,176.9L583.5,180.7L578.3,183.9L573.6,187.3Z",AM:"M595.4,167.2L594.5,167.3L593.2,165.5L593.1,165.0L592.1,165.0L591.2,164.2L590.7,164.3L589.6,163.4L587.6,162.6L587.6,161.1L587.0,160.0L590.4,159.5L591.0,160.3L592.0,160.9L591.7,161.6L593.2,162.7L592.6,163.7L593.8,164.5L595.0,165.0Z",SE:"M504.3,106.9L505.2,105.3L506.9,103.4L507.4,100.1L505.9,98.6L505.5,95.0L506.7,92.4L508.8,92.4L509.4,91.3L508.6,90.4L511.4,86.6L513.2,83.6L514.4,81.7L516.3,81.7L516.7,80.3L520.6,80.7L520.6,78.9L521.9,78.8L524.8,80.1L528.3,81.9L529.0,86.0L529.9,87.1L526.4,87.9L524.6,89.8L525.2,91.4L522.1,93.6L518.2,96.0L517.1,99.9L518.8,101.9L521.1,103.5L519.4,106.7L517.2,107.3L516.8,112.1L515.8,114.8L513.0,114.6L511.9,116.9L509.3,117.0L508.4,114.3L506.3,111.0Z",BY:"M543.5,114.6L545.9,115.4L546.4,116.1L547.5,115.8L549.8,116.4L550.3,117.8L549.9,118.6L551.7,120.5L552.7,121.1L552.6,121.6L554.3,122.1L555.0,122.9L554.3,123.5L552.4,123.4L552.0,123.7L552.7,124.7L553.5,126.6L551.6,126.8L551.0,127.4L551.0,128.9L550.1,128.6L548.0,128.8L547.3,128.1L546.5,128.6L545.6,128.2L543.7,128.1L541.0,127.4L538.7,127.1L536.9,127.2L535.7,128.0L534.6,128.1L534.4,126.8L533.5,125.4L534.8,124.8L534.7,123.7L534.0,122.5L533.7,121.2L535.9,121.3L538.2,120.1L538.6,118.5L540.3,117.6L539.9,116.3L541.2,115.8Z",UA:"M553.5,126.6L554.4,126.7L554.9,126.0L555.6,126.2L558.0,125.9L559.7,127.6L559.3,128.2L559.6,129.1L561.5,129.2L562.5,130.5L562.6,131.1L565.7,132.2L567.4,131.7L569.1,133.1L570.5,133.1L574.1,134.0L574.3,134.9L573.7,136.5L574.5,138.2L574.3,139.2L572.0,139.4L570.9,140.2L571.1,141.6L569.2,141.8L567.8,142.8L565.6,143.0L563.7,144.1L564.0,145.7L563.7,145.6L563.3,145.0L562.5,144.9L560.7,144.3L560.2,145.0L559.8,144.7L556.0,143.9L555.6,142.8L553.5,143.2L552.8,144.8L551.2,147.1L550.1,146.6L549.0,147.1L547.9,146.5L548.4,146.2L548.7,145.1L549.3,144.2L549.0,143.6L549.5,143.4L549.8,143.8L551.2,143.9L551.8,143.6L551.3,143.3L551.4,142.9L550.5,142.1L550.0,140.8L549.1,140.3L549.1,139.3L547.9,138.5L546.9,138.4L545.1,137.5L543.5,137.8L543.0,138.2L542.0,138.2L541.5,138.9L539.8,139.2L539.0,139.7L537.9,138.9L536.3,138.9L534.8,138.6L533.9,139.2L533.6,138.4L532.2,137.6L532.6,136.4L533.1,135.6L533.7,135.8L532.9,134.4L534.8,131.9L535.9,131.6L536.1,130.7L534.6,128.1L535.7,128.0L536.9,127.2L538.7,127.1L541.0,127.4L543.7,128.1L545.6,128.2L546.5,128.6L547.3,128.1L548.0,128.8L550.1,128.6L551.0,128.9L551.0,127.4L551.6,126.8Z",PL:"M533.7,121.2L534.0,122.5L534.7,123.7L534.8,124.8L533.5,125.4L534.4,126.8L534.6,128.1L536.1,130.7L535.9,131.6L534.8,131.9L532.9,134.4L533.7,135.8L533.1,135.6L530.8,134.4L529.1,134.9L528.0,134.6L526.7,135.2L525.4,134.1L524.4,134.5L524.3,134.4L523.1,132.9L521.3,132.7L521.0,131.8L519.4,131.4L519.1,132.2L517.8,131.6L517.9,130.8L516.1,130.5L514.9,129.5L513.8,127.6L514.0,126.6L513.3,125.0L512.4,124.0L512.9,123.2L512.3,121.7L513.8,120.8L517.3,119.5L520.0,118.5L522.3,119.0L522.6,119.7L524.8,119.7L527.6,120.1L531.8,120.0L533.0,120.3Z",AT:"M520.2,138.5L520.1,139.7L518.8,139.7L519.3,140.4L518.6,142.3L518.2,142.9L516.1,142.9L515.0,143.6L513.0,143.4L509.5,142.6L508.9,141.6L506.6,142.1L506.3,142.7L504.9,142.2L503.7,142.1L502.6,141.6L502.9,140.8L502.8,140.3L503.5,140.1L504.7,141.0L505.0,140.2L507.1,140.3L508.8,139.8L509.9,139.9L510.7,140.5L510.9,140.0L510.5,138.0L511.3,137.6L512.0,136.2L513.9,137.2L515.1,136.0L515.9,135.7L517.8,136.7L518.9,136.5L520.1,137.1L519.9,137.4Z",HU:"M532.2,137.6L533.6,138.4L533.9,139.2L532.5,139.9L531.5,141.9L530.3,144.0L528.4,144.5L526.9,144.4L525.1,145.2L524.3,145.7L522.2,145.1L520.4,143.8L519.6,143.4L519.0,142.4L518.6,142.3L519.3,140.4L518.8,139.7L520.1,139.7L520.2,138.5L521.5,139.3L522.4,139.6L524.3,139.2L524.5,138.6L525.4,138.5L526.5,138.1L526.8,138.3L527.9,137.9L528.4,137.2L529.1,137.0L531.7,137.9Z",MD:"M543.0,138.2L543.5,137.8L545.1,137.5L546.9,138.4L547.9,138.5L549.1,139.3L549.1,140.3L550.0,140.8L550.5,142.1L551.4,142.9L551.3,143.3L551.8,143.6L551.2,143.9L549.8,143.8L549.5,143.4L549.0,143.6L549.3,144.2L548.7,145.1L548.4,146.2L547.9,146.5L547.3,145.1L547.4,143.8L547.1,142.5L545.5,140.7L544.6,139.4L543.8,138.5Z",RO:"M547.9,146.5L549.0,147.1L550.1,146.6L551.2,147.1L551.4,147.9L550.3,148.5L549.5,148.3L549.3,151.9L547.8,151.6L545.9,150.5L543.1,151.2L542.0,152.0L538.4,151.8L536.5,151.4L535.6,151.6L534.8,150.3L534.3,149.8L534.8,149.3L534.2,148.9L533.5,149.6L532.0,148.7L531.7,147.4L530.2,146.7L529.8,145.7L528.4,144.5L530.3,144.0L531.5,141.9L532.5,139.9L533.9,139.2L534.8,138.6L536.3,138.9L537.9,138.9L539.0,139.7L539.8,139.2L541.5,138.9L542.0,138.2L543.0,138.2L543.8,138.5L544.6,139.4L545.5,140.7L547.1,142.5L547.4,143.8L547.3,145.1Z",LT:"M539.9,116.3L540.3,117.6L538.6,118.5L538.2,120.1L535.9,121.3L533.7,121.2L533.0,120.3L531.8,120.0L531.6,119.3L531.7,118.5L530.6,118.0L528.2,117.5L527.5,115.1L529.9,114.2L533.7,114.4L535.9,114.1L536.3,114.7L537.5,114.9Z",LV:"M540.9,110.9L542.1,111.5L542.5,112.9L543.5,114.6L541.2,115.8L539.9,116.3L537.5,114.9L536.3,114.7L535.9,114.1L533.7,114.4L529.9,114.2L527.5,115.1L527.3,112.9L528.2,111.1L530.1,110.1L532.2,112.2L534.0,112.2L534.1,110.0L535.9,109.5L537.0,109.8L539.0,110.9Z",EE:"M541.5,105.2L541.9,105.7L540.6,107.3L541.7,110.0L540.9,110.9L539.0,110.9L537.0,109.8L535.9,109.5L534.1,110.0L534.1,108.3L533.4,108.6L531.8,107.6L531.4,106.0L534.1,105.2L536.8,104.8L539.3,105.3Z",DE:"M512.3,121.7L512.9,123.2L512.4,124.0L513.3,125.0L514.0,126.6L513.8,127.6L514.9,129.5L513.9,129.9L513.3,129.5L512.7,130.1L511.1,130.7L510.3,131.4L508.6,132.1L509.1,132.9L509.4,134.2L510.6,134.9L512.0,136.2L511.3,137.6L510.5,138.0L510.9,140.0L510.7,140.5L509.9,139.9L508.8,139.8L507.1,140.3L505.0,140.2L504.7,141.0L503.5,140.1L502.8,140.3L500.2,139.4L499.7,140.0L497.7,140.0L497.9,137.9L499.1,135.8L495.6,135.2L494.5,134.5L494.6,133.1L494.1,132.5L494.3,130.4L493.8,127.3L495.2,127.3L495.8,126.2L496.3,123.5L495.8,122.5L496.2,121.9L498.1,121.7L498.6,122.4L500.1,120.9L499.5,119.8L499.3,118.2L501.1,118.5L502.5,118.1L502.6,119.2L504.9,119.9L505.0,121.0L507.3,120.4L508.5,119.6L511.1,120.8Z",BG:"M534.8,150.3L535.6,151.6L536.5,151.4L538.4,151.8L542.0,152.0L543.1,151.2L545.9,150.5L547.8,151.6L549.3,151.9L548.1,153.2L547.5,155.4L548.4,157.2L546.3,156.8L543.9,157.7L544.0,159.3L541.8,159.6L540.0,158.5L538.1,159.3L536.3,159.2L535.9,157.2L534.6,156.2L535.0,155.8L534.7,155.4L535.0,154.4L535.9,153.5L534.6,152.1L534.3,151.0Z",GR:"M546.1,178.0L545.9,178.9L542.3,179.1L542.2,178.6L539.1,178.0L539.5,176.7L541.0,177.7L542.9,177.6L544.8,177.8L544.8,178.3ZM536.3,159.2L538.1,159.3L540.0,158.5L541.8,159.6L544.0,159.3L543.9,157.7L545.2,158.5L544.6,160.5L544.0,160.8L542.5,160.7L541.2,160.4L538.3,161.2L540.2,163.0L539.0,163.5L537.6,163.5L536.2,161.9L535.8,162.6L536.5,164.4L537.8,165.9L536.9,166.5L538.4,168.0L539.7,168.9L539.9,170.6L537.5,169.8L538.4,171.4L536.8,171.7L538.0,174.5L536.3,174.5L534.2,173.2L533.1,170.7L532.5,168.6L531.4,167.2L530.0,165.4L529.8,164.5L530.8,163.0L530.9,162.0L531.7,161.6L531.7,160.8L533.2,160.5L534.1,159.8L535.5,159.9L535.8,159.3Z",TR:"M591.8,172.1L590.7,172.7L589.7,171.9L586.7,171.5L585.7,172.0L583.0,172.4L581.6,172.4L578.9,173.6L576.8,173.6L575.4,173.0L572.8,173.8L571.9,173.2L571.9,175.0L571.3,175.7L570.7,176.3L569.7,174.9L570.5,173.8L569.0,174.0L566.8,173.3L565.3,175.1L561.5,175.4L559.3,173.8L556.6,173.7L556.1,175.0L554.5,175.3L551.9,173.7L549.2,173.7L547.4,170.6L545.4,168.9L546.4,166.5L544.7,165.0L547.2,162.1L551.0,161.9L551.8,159.6L556.5,160.0L559.2,158.0L561.9,157.1L566.0,157.1L570.5,159.2L574.2,160.4L577.0,160.0L579.2,160.2L581.8,158.6L584.4,158.5L587.0,160.0L587.6,161.1L587.6,162.6L589.6,163.4L590.7,164.3L589.1,165.1L590.4,168.7L590.1,169.7ZM543.9,157.7L546.3,156.8L548.4,157.2L548.9,158.4L551.1,159.3L550.7,160.1L547.8,160.3L546.9,161.2L545.0,162.9L544.1,161.5L544.0,160.8L544.6,160.5L545.2,158.5Z",AL:"M531.7,160.8L531.7,161.6L530.9,162.0L530.8,163.0L529.8,164.5L529.3,164.3L529.3,163.6L527.8,162.6L527.5,161.1L527.6,159.0L527.8,158.1L527.4,157.6L527.1,156.6L528.1,155.1L528.3,155.7L528.9,155.4L529.5,156.2L530.1,156.5L530.4,157.6L530.1,158.7L530.6,160.0Z",HR:"M519.6,143.4L520.4,143.8L522.2,145.1L524.3,145.7L525.1,145.2L525.8,146.4L526.6,147.3L525.8,148.4L524.7,147.7L523.0,147.8L520.9,147.3L519.8,147.3L519.3,148.0L518.4,147.3L518.0,148.5L519.2,150.0L519.8,150.9L521.0,152.1L522.0,152.7L523.0,154.0L525.2,155.2L525.0,155.7L522.6,154.6L521.1,153.5L518.9,152.6L516.7,150.3L517.2,150.1L516.0,148.8L515.9,147.8L514.3,147.3L513.6,148.6L512.9,147.6L512.8,146.5L512.9,146.5L514.6,146.6L515.0,146.0L515.9,146.5L516.8,146.6L516.8,145.8L517.6,145.4L517.7,144.2Z",CH:"M502.8,140.3L502.9,140.8L502.6,141.6L503.7,142.1L504.9,142.2L504.7,143.5L503.7,144.0L501.9,143.6L501.5,144.8L500.3,144.9L499.9,144.4L498.6,145.5L497.4,145.6L496.4,145.0L495.5,143.6L494.4,144.1L494.4,142.7L496.1,141.0L496.0,140.3L497.1,140.5L497.7,140.0L499.7,140.0L500.2,139.4Z",LU:"M494.1,132.5L494.6,133.1L494.5,134.5L493.8,134.5L493.3,134.3L493.5,132.6Z",BE:"M494.3,130.4L494.1,132.5L493.5,132.6L493.3,134.3L491.2,132.9L490.0,133.1L488.3,131.7L487.2,130.5L486.2,130.5L485.8,129.4L487.7,128.8L489.4,129.1L491.5,128.4L493.0,129.7Z",NL:"M495.8,122.5L496.3,123.5L495.8,126.2L495.2,127.3L493.8,127.3L494.3,130.4L493.0,129.7L491.5,128.4L489.4,129.1L487.7,128.8L488.8,128.0L490.8,123.7L493.9,122.4Z",PT:"M457.8,157.6L458.7,156.8L459.8,156.3L460.3,157.8L461.8,157.8L462.2,157.4L463.6,157.6L464.3,159.1L463.1,159.9L463.0,162.3L462.6,162.8L462.5,164.3L461.4,164.5L462.4,166.4L461.6,168.4L462.5,169.3L462.1,170.2L461.1,171.3L461.3,172.4L460.3,173.2L459.0,172.7L457.7,173.1L458.1,170.6L458.0,168.7L456.9,168.4L456.3,167.3L456.6,165.2L457.6,164.1L457.8,162.9L458.4,161.0L458.4,159.7L457.9,158.6Z",ES:"M461.3,172.4L461.1,171.3L462.1,170.2L462.5,169.3L461.6,168.4L462.4,166.4L461.4,164.5L462.5,164.3L462.6,162.8L463.0,162.3L463.1,159.9L464.3,159.1L463.6,157.6L462.2,157.4L461.8,157.8L460.3,157.8L459.8,156.3L458.7,156.8L457.8,157.6L458.0,155.4L457.1,154.0L460.6,151.8L463.5,152.4L466.8,152.4L469.4,152.9L471.4,152.7L475.3,152.8L476.3,154.0L480.8,155.4L481.7,154.7L484.4,156.1L487.2,155.7L487.4,157.5L485.1,159.6L481.9,160.2L481.7,161.3L480.2,163.0L479.3,165.5L480.2,167.3L478.8,168.7L478.2,170.7L476.4,171.3L474.6,173.7L471.4,173.7L469.0,173.7L467.4,174.8L466.5,175.9L465.2,175.7L464.3,174.6L463.6,172.8Z",IE:"M465.8,121.4L466.1,123.5L464.2,126.1L460.1,127.9L456.8,127.4L458.8,124.3L457.8,121.3L461.0,119.0L462.8,117.7L463.2,119.2L462.6,120.8L464.1,120.8Z",NC:"M914.4,353.1L916.0,355.0L917.0,356.4L915.7,357.2L914.6,356.3L913.1,354.9L911.9,353.3L910.8,351.1L910.7,350.0L911.8,350.1L913.0,351.1L913.9,352.2Z",SB:"M911.7,320.1L912.3,321.2L910.4,321.2L909.7,319.3L911.1,320.0ZM910.9,317.4L910.4,318.0L908.7,315.3L908.4,313.4L909.3,313.4L910.0,315.9ZM908.5,318.3L907.5,318.3L905.9,318.0L905.4,317.5L905.7,316.3L907.4,316.8L908.2,317.4ZM906.0,312.5L906.5,313.5L906.5,314.1L904.6,312.8L903.2,311.7L902.3,310.7L902.8,310.3L903.9,311.1ZM899.6,309.4L900.6,310.4L900.0,310.6L898.9,309.9L897.9,308.6L898.1,308.1Z",NZ:"M916.6,412.2L914.6,413.8L912.0,416.0L909.4,417.2L909.4,416.4L908.7,415.9L911.7,413.4L912.0,411.7L910.0,410.5L910.8,409.3L913.2,408.3L915.0,405.9L916.1,403.9L916.2,401.8L916.6,401.2L916.1,399.9L915.6,397.2L915.6,395.0L916.7,394.7L917.2,396.5L918.7,397.3L917.9,400.0L918.0,403.3L919.2,401.2L919.9,402.0L918.9,404.4L920.3,405.4L921.9,405.7L924.0,404.5L925.0,404.8L922.8,407.6L921.0,409.4L919.1,409.3L917.9,410.3L917.3,411.6ZM892.0,422.9L895.1,421.3L897.6,419.7L900.2,417.4L901.6,416.7L903.1,414.9L905.7,413.5L905.4,414.8L905.2,416.1L907.7,414.8L907.6,416.1L906.8,417.4L904.9,418.9L901.8,421.1L899.8,422.4L899.7,423.8L897.8,423.9L894.9,425.0L892.9,427.0L889.4,430.1L886.5,431.5L884.7,432.4L882.6,432.3L881.7,431.3L879.3,431.1L879.6,430.0L882.5,427.7L887.5,424.7L889.5,424.1Z",AU:"M843.3,414.5L844.7,414.7L842.8,418.3L841.4,419.4L839.8,421.9L839.4,421.0L836.5,423.2L836.1,423.0L834.7,422.9L834.6,420.3L835.4,418.3L835.4,415.6L836.2,414.1L837.7,414.4L839.5,415.5L841.1,415.1ZM800.9,387.8L797.6,389.4L795.2,390.1L794.1,391.7L792.8,393.0L790.6,393.1L788.9,393.3L786.9,392.8L784.9,393.1L783.1,393.3L781.1,394.9L780.4,394.8L778.8,395.7L777.2,396.7L775.4,396.5L773.7,396.5L771.8,394.5L770.6,393.9L771.2,392.2L772.6,391.7L773.3,391.0L773.6,389.9L774.6,387.7L774.9,385.9L774.5,382.7L774.6,381.0L775.2,379.2L774.7,377.2L774.9,376.2L774.1,375.0L774.4,372.6L773.6,370.1L773.6,368.8L774.4,370.1L774.2,367.2L775.3,368.1L775.7,369.3L776.1,367.7L775.4,365.3L775.4,364.3L775.0,363.4L775.7,361.6L776.4,360.8L777.1,359.2L777.2,357.4L778.7,355.2L778.4,357.5L780.0,355.4L782.3,354.4L783.8,353.0L786.1,351.9L787.3,351.6L788.0,352.0L790.3,350.9L791.9,350.5L792.4,349.8L793.2,349.6L794.6,349.6L797.6,348.7L799.3,347.3L800.3,345.7L802.1,344.1L802.4,342.9L802.8,341.2L805.1,338.5L805.7,341.2L807.0,340.6L806.3,339.1L807.4,337.6L808.4,338.3L809.1,335.9L810.8,334.4L811.6,333.2L813.0,332.6L813.2,331.8L814.3,332.1L814.5,331.4L815.7,330.9L817.0,330.5L818.8,331.9L820.0,333.8L821.6,333.8L823.3,334.1L823.0,332.4L824.6,329.9L825.9,329.1L825.6,328.3L827.0,326.5L828.8,325.4L830.1,325.8L832.4,325.2L832.5,323.6L830.7,322.6L832.2,322.1L833.9,322.9L835.1,324.2L837.3,325.0L838.1,324.7L839.6,325.6L841.2,324.7L842.2,325.0L842.9,324.4L843.9,325.9L843.0,327.6L841.8,328.9L840.9,329.0L841.0,330.2L840.0,331.8L838.8,333.3L838.8,334.2L840.7,335.9L842.5,336.9L843.7,337.9L845.3,339.8L846.0,339.8L847.2,340.6L847.5,341.5L849.8,342.6L851.7,341.5L852.6,339.9L853.4,338.5L854.0,336.8L855.2,334.3L855.1,332.8L855.5,331.9L855.4,330.1L856.1,327.8L856.7,327.1L856.5,326.1L857.4,324.5L858.1,322.8L858.3,321.9L859.4,320.7L860.0,322.2L859.9,324.2L860.5,324.6L860.4,325.9L861.2,327.4L861.1,329.2L860.8,330.3L861.4,332.8L863.3,331.6L863.9,332.9L865.0,334.1L864.5,335.5L864.6,338.2L864.6,339.7L865.2,340.1L865.4,342.7L864.8,344.4L865.2,346.5L867.7,348.1L869.2,349.6L870.6,350.9L870.1,351.7L871.1,353.6L871.2,357.0L872.4,356.3L873.1,357.7L873.9,357.2L873.4,360.5L874.7,362.4L875.5,363.6L876.8,366.1L876.7,368.6L876.2,370.4L875.3,372.3L875.6,375.0L874.5,377.7L873.5,379.2L871.7,382.0L871.1,383.8L869.7,386.0L867.4,388.8L864.8,390.4L862.9,392.8L861.4,394.3L859.4,397.0L857.7,398.5L856.0,400.9L854.7,403.0L854.3,404.0L852.4,405.1L849.5,405.2L846.6,406.5L844.9,407.7L842.7,409.0L841.3,407.6L840.1,407.1L841.3,405.5L839.6,406.0L836.4,408.3L834.6,407.4L833.4,407.0L832.1,406.7L830.1,405.8L829.4,403.9L830.0,401.6L830.1,400.0L829.4,398.7L827.1,398.4L828.6,396.8L828.9,394.5L826.8,396.7L824.3,397.3L826.4,395.5L827.5,393.7L829.1,392.2L829.8,389.9L826.7,392.6L824.7,393.6L822.7,396.1L821.2,394.8L822.0,393.2L821.3,390.9L820.4,389.8L821.1,389.0L818.5,387.1L816.8,387.1L814.9,385.5L810.2,385.8L806.5,386.9L803.2,388.0Z",LK:"M698.3,264.4L698.0,267.6L697.0,268.5L694.7,269.2L693.3,266.7L692.6,262.3L693.5,257.2L695.5,259.0L696.8,261.1Z",CN:"M768.4,231.2L766.1,230.3L765.6,227.6L766.7,226.2L769.4,225.3L770.9,225.4L771.7,226.6L770.8,228.0L770.5,229.7ZM676.0,156.1L675.3,154.4L676.7,153.6L672.8,148.2L677.2,147.0L678.2,146.3L678.0,140.9L683.1,141.9L683.9,140.5L682.9,137.5L684.8,137.2L685.8,135.2L686.6,135.0L688.1,137.1L690.7,138.7L694.5,139.8L697.1,142.2L697.5,145.8L698.9,147.1L702.0,147.6L705.4,148.1L709.0,150.0L710.6,150.3L712.8,153.1L714.9,155.0L717.5,154.9L722.8,155.6L725.9,155.2L728.5,155.6L732.8,157.5L735.8,157.5L737.3,158.4L739.5,156.8L743.0,155.7L746.6,155.6L749.0,154.5L750.0,152.9L751.3,151.8L750.5,150.8L749.2,149.6L749.5,147.7L751.0,148L753.8,148.6L755.4,147.0L758.5,145.8L759.3,143.8L760.6,142.9L763.8,142.5L765.9,142.8L765.6,141.8L762.4,139.6L760.0,138.7L758.7,139.8L756.1,139.3L755.0,139.7L753.7,138.5L753.8,135.4L753.8,133.2L757.2,134.3L759.5,132.4L758.7,131.1L759.0,127.9L759.7,127.0L758.7,125.4L757.1,124.6L758.1,123.2L760.6,122.7L763.6,122.6L767.6,123.4L770.3,124.5L773.6,127.5L775.2,128.8L777.2,130.6L779.8,133.6L784.4,134.5L788.5,136.7L791.1,139.5L794.7,139.5L796.1,138.3L799.4,137.4L799.8,140.1L799.5,141.3L800.6,144.6L800.6,147.5L797.4,147.0L795.9,148.1L797.9,150.7L799.4,154.3L798.2,154.4L799.0,156.0L796.5,154.2L796.4,155.9L793.3,157.2L794.4,158.8L792.2,158.7L790.6,157.8L790.0,159.9L788.0,161.6L786.9,163.6L783.8,164.5L782.6,165.9L780.3,166.8L781.0,165.3L780.0,164.1L781.0,162.1L779.0,160.4L777.4,161.5L775.5,163.7L774.8,165.7L772.4,165.8L771.7,167.3L773.9,169.4L776.1,169.9L776.7,171.3L779.0,172.2L781.0,170.0L783.7,171.2L785.3,171.3L786.4,172.9L783.1,173.8L782.6,175.4L780.7,177.0L780.2,179.2L783.6,180.9L785.6,183.9L788.1,186.8L790.6,189.2L791.3,191.5L790.0,192.4L791.1,194.0L792.9,195.0L793.3,197.5L793.4,200.0L792.0,200.3L791.1,203.7L790.0,207.8L788.5,211.5L785.6,214.3L782.6,217.0L779.7,217.3L778.4,218.7L777.3,217.7L776.1,219.3L772.8,220.8L770.1,221.3L769.8,224.6L768.4,224.8L767.3,222.5L767.7,221.3L764.0,220.3L762.9,220.8L760.1,220.0L758.6,218.7L758.6,216.9L756.1,216.4L754.7,215.2L752.8,216.9L750.3,217.2L748.2,217.2L746.9,218.0L745.7,218.4L746.7,222.0L745.3,221.9L744.9,221.2L744.6,219.9L742.9,220.8L741.6,220.2L739.5,219.0L739.8,216.5L738.0,215.8L736.8,213.0L734.2,213.5L733.8,209.8L735.7,207.2L735.2,204.6L734.6,202.2L733.3,201.5L732.1,199.7L730.6,199.9L727.7,199.4L728.3,198.1L726.6,196.2L725.1,197.5L722.8,196.7L720.3,198.7L718.4,201.0L716.4,201.4L715.1,200.6L713.7,200.5L711.8,199.8L710.5,200.6L709.3,202.9L708.6,200.4L707.1,201.1L704.1,200.8L701.0,200.1L698.7,198.7L696.5,198.1L695.4,196.6L693.8,196.1L690.8,194.1L688.6,193.2L687.7,193.9L683.7,191.7L680.7,189.7L679.3,186.3L681.2,186.7L680.9,185.1L679.6,183.5L679.3,181.0L675.7,177.4L671.3,176.1L670.0,173.7L667.8,172.3L667.1,171.4L666.3,169.6L666.1,168.4L664.4,167.7L663.7,168.0L662.3,165.1L662.8,164.4L662.3,163.7L664.3,162.2L665.8,161.6L668.5,162.0L668.9,160.1L672.0,159.7L672.5,158.5L675.9,156.8Z",TW:"M796.8,212.0L796.4,216.9L795.8,219.5L793.9,216.9L793.0,214.6L793.8,211.5L795.3,209.1L796.8,210.1Z",IT:"M504.9,142.2L506.3,142.7L506.6,142.1L508.9,141.6L509.5,142.6L513.0,143.4L512.8,144.9L513.5,146.2L511.5,145.7L509.6,146.8L509.8,148.3L509.6,149.2L510.4,150.8L512.8,152.3L514.2,154.9L517.0,157.3L518.9,157.3L519.6,158.0L518.9,158.6L521.2,159.7L523.0,160.7L525.3,162.3L525.5,162.8L525.2,164L523.7,162.5L521.5,162.0L520.6,164.0L522.5,165.1L522.3,166.8L521.2,166.9L520.0,169.6L519.0,169.8L519.0,168.9L519.4,167.2L519.9,166.6L518.8,164.8L518.0,163.2L517.0,162.8L516.2,161.5L514.5,160.9L513.4,159.7L511.6,159.5L509.6,158.1L507.3,156.1L505.6,154.3L504.7,151.3L503.5,150.9L501.5,149.9L500.4,150.3L499.0,151.8L498.0,152.0L498.2,150.7L496.9,150.3L496.2,147.9L497.0,147.0L496.3,145.8L496.4,145.0L497.4,145.6L498.6,145.5L499.9,144.4L500.3,144.9L501.5,144.8L501.9,143.6L503.7,144.0L504.7,143.5ZM516.7,169.1L518.6,168.8L517.8,171.3L518.2,172.3L517.8,173.8L515.8,172.7L514.5,172.3L511.0,170.8L511.2,169.2L514.2,169.5ZM501.4,160.6L502.6,159.6L504.1,161.8L503.9,165.9L502.8,165.7L501.8,166.7L500.8,165.9L500.6,162.2L500.0,160.4Z",DK:"M502.5,118.1L501.1,118.5L499.3,118.2L498.3,116.5L498.1,113.6L498.5,112.8L499.1,111.9L501.0,111.8L501.8,111.0L503.5,110.1L503.5,111.6L502.9,112.6L503.3,113.4L504.5,113.8L504.0,114.9L503.3,114.6L501.8,116.7ZM507.8,114.8L508.7,116.3L507.5,118.6L505.0,117.0L504.6,115.8Z",GB:"M465.8,121.4L464.1,120.8L462.6,120.8L463.2,119.2L462.8,117.7L464.7,117.5L467.1,119.4ZM472.8,122.7L472.9,122.7L473.2,121.0L471.7,119.2L471.7,119.2L468.9,118.7L468.4,117.9L469.3,116.6L468.5,115.8L467.3,117.1L467.2,114.3L466.1,112.9L467.1,109.9L468.9,107.6L470.6,107.8L473.3,107.6L470.9,110.7L473.1,110.3L475.6,110.3L475.0,112.6L472.9,115.2L475.2,115.4L475.4,115.7L477.4,119.1L479.0,119.6L480.4,123.0L481.0,124.1L483.8,124.7L483.6,126.6L482.4,127.5L483.3,129.0L481.2,130.6L478.1,130.5L474.1,131.4L473.0,130.8L471.5,132.2L469.3,131.8L467.7,133.0L466.4,132.4L469.9,129.2L472.0,128.6L472.0,128.6L468.4,128.1L467.7,126.9L470.2,126.0L469.0,124.4L469.4,122.5Z",IS:"M449.8,85.9L449.1,87.6L451.3,89.5L448.4,91.6L442.1,93.4L440.2,93.9L437.4,93.5L431.6,92.7L433.9,91.5L429.5,90.1L433.3,89.6L433.3,88.8L429.0,88.2L430.7,86.4L433.9,86.0L436.9,87.8L440.3,86.4L442.8,87.1L446.3,85.7Z",AZ:"M593.6,157.6L594.3,157.7L596.3,159.6L597.4,159.8L597.7,159.0L598.9,157.8L600.5,159.4L602.1,161.6L603.3,161.7L604.2,162.6L602.2,162.8L602.2,165.2L602.0,166.3L601.2,167.0L601.5,168.6L600.9,168.7L599.1,167.1L599.7,165.6L598.8,164.7L597.9,164.9L595.4,167.2L595.0,165.0L593.8,164.5L592.6,163.7L593.2,162.7L591.7,161.6L592.0,160.9L591.0,160.3L590.4,159.5L590.9,159.0L592.9,159.9L594.2,160.1L594.5,159.7L593.0,158.0ZM594.5,167.3L592.7,166.9L591.3,165.4L590.7,164.3L591.2,164.2L592.1,165.0L593.1,165.0L593.2,165.5Z",GE:"M577.0,152.8L577.3,152.4L579.4,152.9L583.1,153.4L586.6,154.9L587.2,155.5L588.6,155.0L590.9,155.6L591.9,156.9L593.6,157.6L593.0,158.0L594.5,159.7L594.2,160.1L592.9,159.9L590.9,159.0L590.4,159.5L587.0,160.0L584.4,158.5L581.8,158.6L582.0,157.3L581.1,155.2L579.5,154.1L578.1,153.7Z",PH:"M801.0,248.3L799.3,245.9L801.6,246.1L802.7,247.2L802.3,249.9ZM806.6,256.8L807.1,255.9L807.2,254.0L808.7,253.8L808.5,255.9L810.1,252.9L810.2,255.8L809.3,256.8L808.7,258.8L807.9,259.7L806.1,257.6ZM817.1,261.6L817.5,263.7L817.8,265.4L817.1,268.2L815.9,265.1L814.8,266.7L815.8,268.9L815.1,270.4L811.9,268.6L811.0,266.3L811.7,264.9L809.9,263.4L809.1,264.7L807.9,264.6L806.0,266.3L805.5,265.4L806.4,262.8L808.0,261.9L809.3,260.7L810.4,262.1L812.3,261.3L812.7,259.9L814.5,259.8L814.2,257.4L816.5,258.9L816.8,260.5ZM795.9,258.8L792.6,261.8L793.7,259.6L795.4,257.7L796.8,255.5L797.9,252.4L798.7,255.0L797.1,256.7ZM802.3,231.2L802.1,232.4L803.4,234.7L803.1,237.3L801.7,238.3L801.7,240.8L802.7,243.3L804.1,243.6L805.2,243.2L808.8,245.0L808.8,246.6L809.7,247.4L809.6,248.8L807.4,247.3L806.2,245.7L805.6,246.8L803.7,245.0L801.4,245.4L799.9,244.7L799.9,243.4L800.6,242.7L799.7,241.9L799.5,243.1L798.0,241.3L797.4,239.9L796.8,236.9L798.1,238.0L797.5,233.1L797.9,230.3L799.5,230.3L801.3,231.2L801.9,230.4ZM804.6,252.3L804.0,250.8L805.7,251.8L807.4,251.8L807.5,253.1L806.4,254.4L804.9,255.3L804.6,253.9ZM813.6,250.0L814.7,253.4L812.6,252.6L812.7,253.7L813.6,255.6L812.4,256.3L812.1,254.1L811.2,253.9L810.6,252.1L812.2,252.3L812.0,251.1L810.1,248.8L812.7,248.8Z",MY:"M747.3,267.7L747.8,267.1L750.0,268.5L750.3,270.0L752.0,269.7L752.9,268.4L753.5,268.7L755.2,270.6L756.4,272.6L756.6,274.7L756.4,276.1L756.6,277.2L756.9,279.0L757.9,279.9L758.9,282.6L758.9,283.7L757.0,283.9L754.5,281.6L751.2,279.1L750.9,277.5L749.3,275.5L748.8,272.9L747.8,271.2L748.0,269.0ZM795.2,274.9L792.9,274.3L789.8,274.3L789.0,277.9L788.0,278.9L786.7,283.2L784.5,283.9L782.0,283.0L780.7,283.3L779.2,284.9L777.5,284.6L775.7,285.3L773.9,283.5L773.4,281.5L775.4,282.5L777.5,281.9L777.9,279.3L779.1,278.7L782.3,278.1L784.1,275.6L785.3,273.7L786.6,275.3L787.1,274.2L788.4,274.3L788.5,272.3L788.5,270.8L790.5,268.6L791.7,266.2L792.8,266.2L794.2,267.8L794.4,269.1L796.2,270.0L798.5,270.9L798.4,272.1L796.6,272.3L797.2,273.8Z",BN:"M788.5,270.8L788.5,272.3L788.4,274.3L787.1,274.2L786.6,275.3L785.3,273.7L786.4,272.5Z",SI:"M513.0,143.4L515.0,143.6L516.1,142.9L518.2,142.9L518.6,142.3L519.0,142.4L519.6,143.4L517.7,144.2L517.6,145.4L516.8,145.8L516.8,146.6L515.9,146.5L515.0,146.0L514.6,146.6L512.9,146.5L513.5,146.2L512.8,144.9Z",FI:"M538.1,78.9L538.1,80.8L541.6,82.6L540.1,84.6L543.2,87.6L542.2,90.0L544.5,92.0L544.0,93.8L547.5,95.7L547.0,97.1L545.3,98.7L541.2,102.3L537.3,102.5L533.6,103.5L530.1,104.1L528.7,102.6L526.4,101.7L526.6,98.9L525.2,96.4L526.0,94.8L527.7,93.1L532.1,90.1L533.4,89.5L533.0,88.4L529.9,87.1L529.0,86.0L528.3,81.9L524.8,80.1L521.9,78.8L523.0,78.1L525.5,79.5L528.1,79.4L530.4,80.0L532.1,78.9L532.8,77.0L535.7,76.1L538.5,77.1Z",SK:"M533.1,135.6L532.6,136.4L532.2,137.6L531.7,137.9L529.1,137.0L528.4,137.2L527.9,137.9L526.8,138.3L526.5,138.1L525.4,138.5L524.5,138.6L524.3,139.2L522.4,139.6L521.5,139.3L520.2,138.5L519.9,137.4L520.1,137.1L520.3,136.4L521.4,136.5L522.2,136.1L522.2,135.9L522.7,135.7L522.7,135.0L523.3,134.9L523.6,134.4L524.3,134.4L524.4,134.5L525.4,134.1L526.7,135.2L528.0,134.6L529.1,134.9L530.8,134.4Z",CZ:"M514.9,129.5L516.1,130.5L517.9,130.8L517.8,131.6L519.1,132.2L519.4,131.4L521.0,131.8L521.3,132.7L523.1,132.9L524.3,134.4L523.6,134.4L523.3,134.9L522.7,135.0L522.7,135.7L522.2,135.9L522.2,136.1L521.4,136.5L520.3,136.4L520.1,137.1L518.9,136.5L517.8,136.7L515.9,135.7L515.1,136.0L513.9,137.2L512.0,136.2L510.6,134.9L509.4,134.2L509.1,132.9L508.6,132.1L510.3,131.4L511.1,130.7L512.7,130.1L513.3,129.5L513.9,129.9Z",ER:"M576.5,243.0L576.2,241.7L577.1,237.2L577.3,235.1L578.1,234.1L580.0,233.6L581.2,231.9L582.9,235.5L583.8,238.3L585.3,239.8L589.1,242.8L590.6,244.5L592.2,246.3L593.1,247.4L594.4,248.3L593.6,249.1L592.5,248.8L591.5,247.8L590.4,246.0L589.1,245.0L588.4,243.9L586.0,242.7L584.2,242.6L583.5,242.0L582.0,242.7L580.4,241.3L579.6,243.6Z",JP:"M831.5,165.9L830.7,169.0L832.2,172.2L832.4,174.7L833.5,176.3L833.1,178.5L830.5,179.9L826.2,180.1L824.0,183.7L821.8,182.5L820.8,180.1L816.7,180.8L814.2,182.3L811.3,182.4L814.7,184.7L814.9,189.9L813.7,191.3L812.1,190.0L811.7,187.2L809.8,186.3L808.0,184.2L810.0,183.2L810.6,181.3L812.5,179.7L813.5,177.5L818.2,176.6L821.1,177.2L821.4,171.7L823.7,173.2L826.0,170.1L826.8,168.9L826.6,165.1L824.5,161.6L824.5,159.7L826.8,159.1L830.4,163.4ZM830.5,151.2L831.4,149.9L833.9,153.3L830.8,154.2L830.3,157.2L825.3,155.1L825.8,158.5L823.1,158.5L821.1,155.5L821.1,153.1L823.6,152.9L821.9,148.7L821.3,146.3L825.9,149.5L828.4,150.5ZM815.3,183.7L816.0,181.8L817.6,182.2L818.1,180.9L820.2,181.5L820.9,182.6L820.2,184.5L818.8,183.5L817.8,184.2L817.8,186.0L815.8,185.2Z",PY:"M327.2,350.3L328.2,352.0L328.4,356.2L331.2,356.8L332.3,356.2L334.1,357.0L334.7,358.0L335.2,360.8L335.7,362.0L336.7,362.2L337.6,361.7L338.6,362.2L338.8,363.9L338.6,365.8L338.3,367.6L338.2,370.3L336.2,372.7L334.2,373.2L331.2,372.7L328.5,371.9L330.5,367.2L329.9,365.8L327.1,364.6L323.6,362.3L321.5,361.8L316.1,356.7L316.7,353.0L316.6,351.3L317.6,348.6L322.0,347.7L324.5,347.7L327.1,349.3Z",YE:"M616.8,228.7L619.2,233.9L620.3,236.1L618.4,236.9L618.0,238.3L618.0,239.3L615.5,240.6L611.3,242.1L609.1,244.3L607.9,244.4L607.1,244.3L605.6,245.6L603.9,246.1L601.7,246.3L601.1,246.5L600.5,247.3L599.8,247.5L599.5,248.3L598.2,248.3L597.3,248.7L595.5,248.5L594.7,246.7L594.7,245.0L594.2,244.1L593.6,241.8L592.8,240.5L593.3,240.4L592.9,238.9L593.2,238.3L593.0,237.0L594.1,236.0L593.8,234.7L594.4,233.2L595.5,234.0L596.2,233.7L599.3,233.6L599.8,233.9L602.3,234.2L603.3,234.1L604.1,235.1L605.3,234.6L606.9,231.3L609.3,229.9Z",SA:"M569.7,196.5L572.6,197.0L573.6,196.0L574.1,194.9L576.0,194.5L576.4,193.4L577.2,192.9L574.3,189.8L579.3,188.2L579.7,187.7L582.8,188.6L586.9,190.8L594.8,197.0L599.6,197.3L601.9,197.6L602.7,199.1L604.5,199.0L605.9,201.7L607.2,202.4L607.8,203.5L609.7,204.8L610.0,206.1L609.8,207.1L610.3,208.2L611.1,209.0L611.6,210.1L612.0,210.8L612.9,211.4L613.6,211.2L614.2,212.4L614.4,213.1L615.7,216.3L623.7,217.9L624.1,217.2L625.6,219.4L624.4,225.6L616.8,228.7L609.3,229.9L606.9,231.3L605.3,234.6L604.1,235.1L603.3,234.1L602.3,234.2L599.8,233.9L599.3,233.6L596.2,233.7L595.5,234.0L594.4,233.2L593.8,234.7L594.1,236.0L593.0,237.0L592.6,235.7L591.8,234.7L591.5,233.5L590.1,232.4L588.5,229.8L587.6,227.2L585.6,225.1L584.4,224.6L582.5,221.6L582.0,219.5L582.0,217.6L580.3,214.2L579.0,212.9L577.5,212.3L576.5,210.5L576.6,209.8L575.7,208.2L574.9,207.5L573.7,205.2L572.0,202.7L570.5,200.5L569.2,200.5L569.5,198.8L569.5,197.7Z",CY:"M562.4,178.5L562.5,178.4L562.8,177.7L564.6,177.7L566.8,176.8L565.3,178.1L565.5,178.7L565.2,178.6L564.8,178.8L564.4,178.8L564.3,178.9L564.2,178.6L564.0,178.4L563.5,178.3L562.9,178.6ZM562.4,178.5L562.9,178.6L563.5,178.3L564.0,178.4L564.2,178.6L564.3,178.9L564.4,178.8L564.8,178.8L565.2,178.6L565.5,178.7L565.6,179.0L563.2,180.2L561.9,179.8L561.2,178.6Z",MA:"M474.5,178.4L475.4,180.4L475.6,182.3L476.4,185.5L477.1,186.2L476.6,187.4L473.3,187.9L472.1,189.1L470.7,189.4L470.5,191.7L467.5,192.9L466.5,194.5L464.4,195.3L461.8,195.8L457.6,198.1L457.6,201.8L457.2,201.8L457.2,203.5L455.6,203.6L454.8,204.3L453.6,204.3L452.7,203.9L450.5,204.2L449.6,206.6L448.8,206.9L447.5,210.8L443.8,214.1L442.8,218.4L441.7,219.8L441.3,221.0L435.4,221.2L435.4,221.2L435.5,219.8L436.6,218.9L437.5,217.3L437.3,216.2L438.3,214.0L439.8,212.1L440.7,211.6L441.5,209.7L441.6,208.1L442.6,206.2L444.3,205.0L446.1,201.8L446.1,201.8L447.4,200.6L449.8,200.2L451.9,198.1L453.2,197.3L455.4,194.7L454.9,190.8L455.9,188.1L456.3,186.5L458.0,184.4L460.6,182.9L462.5,181.7L464.2,178.4L465.1,176.5L466.9,176.5L468.4,177.9L470.8,177.6L473.4,178.3Z",EG:"M576.4,219.4L566.0,219.4L555.9,219.4L545.3,219.4L544.8,207.9L544.2,196.8L543.2,194.3L543.8,192.4L543.3,191.1L544.1,189.6L547.5,189.5L550.0,190.3L552.6,191.3L553.8,191.8L555.7,190.8L556.7,189.9L558.9,189.6L560.8,190.0L561.6,191.6L562.1,190.5L564.2,191.3L566.2,191.5L567.4,190.7L569.2,195.2L569.6,196.0L568.9,197.3L568.6,199.6L568.0,201.3L567.5,201.8L566.5,200.8L565.3,199.4L563.1,194.9L562.8,195.2L564.1,198.5L566.0,201.6L568.3,206.5L569.4,208.2L570.3,210.0L572.9,213.4L572.4,214.0L572.7,216.0L575.9,218.8Z",LY:"M545.3,219.4L545.6,225.6L542.6,225.6L542.6,226.9L531.9,221.0L521.3,215.0L518.7,216.7L516.9,217.9L515.4,216.2L511.2,214.8L510.1,212.9L508.0,211.4L506.8,212.0L505.8,210.3L505.7,208.9L504.1,206.6L505.1,205.3L504.8,203.4L505.1,201.7L504.9,200.3L505.3,197.7L505.1,196.3L504.2,193.5L505.5,192.8L505.6,191.5L505.3,190.2L507.1,189.0L507.8,188.0L509.0,187.1L509.1,184.7L512.1,185.8L513.2,185.5L515.3,186.0L518.7,187.4L520.0,190.2L522.4,190.8L526.0,192.1L528.8,193.6L530.0,192.8L531.2,191.4L530.5,189.0L531.2,187.5L532.9,186.0L534.6,185.6L538.1,186.2L539.1,187.6L540.0,187.6L540.9,188.2L543.4,188.5L544.1,189.6L543.3,191.1L543.8,192.4L543.2,194.3L544.2,196.8L544.8,207.9Z",ET:"M607.5,262.9L600.2,272.2L596.7,272.3L594.3,274.5L592.6,274.6L591.9,275.5L590.1,275.5L589.0,274.5L586.6,275.8L585.8,277.1L584.0,276.8L583.4,276.5L582.8,276.6L581.9,276.5L578.5,273.9L576.6,273.9L575.7,272.9L575.7,271.1L574.3,270.6L572.7,267.2L571.4,266.5L570.9,265.3L569.6,263.8L567.9,263.6L568.8,261.8L570.2,261.7L570.6,260.8L570.5,258.0L571.2,254.7L572.4,253.9L572.6,252.6L573.7,250.2L575.2,248.7L576.2,245.6L576.5,243.0L579.6,243.6L580.4,241.3L582.0,242.7L583.5,242.0L584.2,242.6L586.0,242.7L588.4,243.9L589.1,245.0L590.4,246.0L591.5,247.8L592.5,248.8L591.6,250.2L590.8,251.6L591.0,252.5L591.1,253.4L592.6,253.5L593.2,253.3L593.8,253.8L593.3,254.9L594.3,256.6L595.3,258.1L596.4,259.2L605.2,262.9Z",DJ:"M592.5,248.8L593.6,249.1L594.4,248.3L595.1,249.3L595.0,250.6L593.6,251.3L594.7,252.2L593.8,253.8L593.2,253.3L592.6,253.5L591.1,253.4L591.0,252.5L590.8,251.6L591.6,250.2Z",UG:"M570.7,290.6L565.2,290.8L562.3,290.8L561.4,291.2L559.8,292.1L559.1,291.8L559.1,289.5L559.8,288.3L559.9,285.8L560.5,284.4L561.5,282.8L562.5,281.9L563.4,280.8L562.3,280.4L562.4,276.8L563.5,276.0L565.2,276.7L567.4,275.9L569.3,275.9L570.9,274.5L572.2,276.7L572.5,278.2L573.7,281.8L572.8,284.0L571.4,286.1L570.7,287.3Z",RW:"M561.4,291.2L562.4,292.9L562.3,294.8L561.5,295.1L560.1,294.9L559.2,296.7L557.6,296.5L557.9,294.8L558.2,294.5L558.3,292.7L559.1,291.8L559.8,292.1Z",BA:"M525.2,155.2L523.0,154.0L522.0,152.7L521.0,152.1L519.8,150.9L519.2,150.0L518.0,148.5L518.4,147.3L519.3,148.0L519.8,147.3L520.9,147.3L523.0,147.8L524.7,147.7L525.8,148.4L526.7,148.4L526.2,149.8L527.4,150.9L527.2,152.4L526.6,152.5L526.2,152.8L525.5,153.5Z",MK:"M534.6,156.2L535.9,157.2L536.3,159.2L535.8,159.3L535.5,159.9L534.1,159.8L533.2,160.5L531.7,160.8L530.6,160.0L530.1,158.7L530.4,157.6L530.7,157.7L530.7,157.0L532.1,156.6L532.7,156.4L533.5,156.3Z",RS:"M525.1,145.2L526.9,144.4L528.4,144.5L529.8,145.7L530.2,146.7L531.7,147.4L532.0,148.7L533.5,149.6L534.2,148.9L534.8,149.3L534.3,149.8L534.8,150.3L534.3,151.0L534.6,152.1L535.9,153.5L535.0,154.4L534.7,155.4L535.0,155.8L534.6,156.2L533.5,156.3L532.7,156.4L532.6,156.2L532.8,155.8L533.1,155.1L532.7,155.1L532.2,154.5L531.8,154.4L531.4,153.9L531.0,153.7L530.6,153.3L530.1,153.5L529.9,154.5L529.3,154.7L529.5,154.4L528.5,153.8L527.7,153.5L527.3,153.0L526.6,152.5L527.2,152.4L527.4,150.9L526.2,149.8L526.7,148.4L525.8,148.4L526.6,147.3L525.8,146.4Z",ME:"M528.9,155.4L528.3,155.7L528.1,155.1L527.1,156.6L527.4,157.6L526.8,157.3L526.1,156.3L525.0,155.7L525.2,155.2L525.5,153.5L526.2,152.8L526.6,152.5L527.3,153.0L527.7,153.5L528.5,153.8L529.5,154.4L529.3,154.7Z",XK:"M530.4,157.6L530.1,156.5L529.5,156.2L528.9,155.4L529.3,154.7L529.9,154.5L530.1,153.5L530.6,153.3L531.0,153.7L531.4,153.9L531.8,154.4L532.2,154.5L532.7,155.1L533.1,155.1L532.8,155.8L532.6,156.2L532.7,156.4L532.1,156.6L530.7,157.0L530.7,157.7Z",TT:"M315.7,254.3L317.3,253.9L317.8,254.0L317.6,256.4L315.4,256.7L314.9,256.4L315.7,255.6Z",SS:"M562.4,276.8L560.1,274.7L559.4,273.4L557.9,274.1L556.7,273.9L556.0,274.4L554.8,274.0L553.1,271.5L552.7,270.5L550.7,269.3L550.0,267.4L548.8,266.1L547.0,264.4L547.0,263.4L545.5,262.2L543.7,261.0L544.5,260.6L545.4,260.1L546.0,257.3L546.7,255.8L548.6,255.4L549.1,256.3L550.5,258.1L551.3,258.3L552.2,257.8L554.1,257.9L554.5,258.6L557.2,258.6L557.2,257.9L558.6,257.3L558.9,256.4L559.8,255.8L562.1,257.6L563.5,257.3L564.8,255.0L566.2,253.3L565.9,251.5L565.2,250.6L566.8,250.4L567.0,249.7L568.2,249.9L568.0,252.2L568.4,254.5L569.8,255.7L570.1,256.8L570.1,258.3L570.5,258.4L570.6,260.8L570.2,261.7L568.8,261.8L567.9,263.6L569.6,263.8L570.9,265.3L571.4,266.5L572.7,267.2L574.3,270.6L572.5,272.7L570.9,274.5L569.3,275.9L567.4,275.9L565.2,276.7L563.5,276.0Z"},Mt={ZW:[559,347],ZM:[554,329],YE:[606,238],VN:[761,236],VE:[303,266],VA:[510,158],VU:[922,335],UZ:[635,158],UY:[338,390],FM:[903,266],MH:[937,266],MP:[866,241],VI:[309,233],GU:[864,246],AS:[27,332],PR:[305,231],US:[236,164],GS:[396,455],IO:[673,310],SH:[465,337],PN:[146,363],AI:[314,231],FK:[344,448],KY:[266,228],BM:[315,187],VG:[310,231],TC:[292,220],MS:[316,236],JE:[475,135],GG:[474,134],IM:[470,120],GB:[474,122],AE:[621,214],UA:[554,135],UG:[567,284],TM:[627,166],TR:[568,166],TN:[504,182],TT:[317,255],TO:[21,353],TG:[483,261],TL:[816,315],TH:[747,241],TZ:[573,307],TJ:[656,168],TW:[795,214],SY:[577,179],CH:[500,143],SE:[515,97],SZ:[561,370],SR:[330,275],SS:[561,265],SD:[559,238],LK:[695,264],ES:[471,162],KR:[800,174],ZA:[545,378],SO:[602,273],SB:[907,318],SK:[526,137],SI:[515,145],SG:[758,284],SL:[449,261],SC:[628,302],RS:[530,150],SN:[442,243],SA:[596,213],ST:[498,287],SM:[510,151],WS:[22,330],VC:[318,247],LC:[318,245],KN:[314,234],RW:[560,294],RU:[680,87],RO:[540,145],QA:[613,209],PT:[460,164],PL:[525,127],PH:[801,238],PE:[282,316],PY:[328,360],PG:[865,308],PA:[266,261],PW:[839,264],PK:[657,195],OM:[627,224],NO:[506,93],KP:[794,163],NG:[502,258],NE:[505,234],NI:[254,248],NZ:[894,424],NU:[33,347],CK:[61,354],NL:[493,126],AW:[294,249],CW:[297,250],NP:[696,200],NR:[927,289],NA:[525,356],MZ:[574,341],MA:[458,195],EH:[448,213],ME:[527,155],MN:[726,142],MD:[548,141],MC:[498,152],MX:[214,213],MU:[631,351],MR:[453,225],MT:[516,176],ML:[471,234],MV:[677,275],MY:[787,277],MW:[571,329],MG:[603,348],MK:[533,158],LU:[494,134],LT:[534,117],LI:[503,142],LY:[527,204],LR:[455,268],LS:[552,380],LB:[571,182],LV:[536,113],LA:[753,230],KG:[663,159],KW:[602,197],XK:[531,155],KI:[59,282],KE:[581,286],KZ:[639,138],JO:[574,191],JP:[825,174],JM:[276,231],IT:[510,153],IL:[569,190],PS:[570,188],IE:[461,123],IQ:[591,185],IR:[618,187],ID:[785,288],IN:[688,217],IS:[441,90],HU:[526,141],HN:[251,242],HT:[289,229],GY:[322,273],GW:[440,250],GN:[451,255],GT:[241,239],GD:[316,250],GR:[536,165],GH:[477,263],DE:[504,130],GE:[586,157],GM:[439,246],GA:[512,290],FR:[486,143],PM:[346,142],WF:[8,332],MF:[314,232],BL:[314,232],PF:[86,342],NC:[913,354],TF:[644,440],AX:[524,103],FI:[536,92],FJ:[949,343],ET:[586,261],EE:[537,107],ER:[583,240],GQ:[508,283],SV:[244,245],EG:[557,206],EC:[270,292],DO:[294,229],DM:[318,240],DJ:[593,251],GL:[398,69],FO:[465,98],DK:[501,115],CZ:[516,134],CY:[564,178],CU:[273,221],HR:[520,148],CI:[465,264],CR:[256,257],CD:[543,297],CG:[521,290],KM:[595,324],CO:[285,276],CN:[739,173],MO:[777,219],HK:[778,218],CL:[301,395],TD:[529,240],CF:[535,267],CV:[417,241],CA:[261,108],CM:[514,270],KH:[759,248],MM:[733,222],BI:[560,298],BF:[475,250],BG:[541,155],BN:[786,274],BR:[338,321],BW:[542,356],BA:[523,151],BO:[309,339],BT:[713,203],BJ:[486,258],BZ:[246,234],BE:[491,131],BY:[544,122],BB:[322,247],BD:[715,214],BH:[611,207],BS:[277,211],AZ:[598,162],AT:[514,140],AU:[828,367],HM:[649,452],NF:[912,378],AM:[591,163],AR:[317,395],AG:[317,235],AO:[527,326],AD:[484,156],DZ:[487,201],AL:[529,160],AF:[647,183],SX:[314,232],GP:[317,237],MQ:[318,242],RE:[625,353],GF:[338,276],YT:[600,327]};var Br=[{key:"world",label:"\u041C\u0438\u0440",codes:[]},{key:"europe",label:"\u0415\u0432\u0440\u043E\u043F\u0430",codes:["PT","IS","NO","FI","CY","GR","UA","IE"]},{key:"asia",label:"\u0410\u0437\u0438\u044F",codes:["TR","KZ","JP","ID","IN","AE","MN","PH"]},{key:"africa",label:"\u0410\u0444\u0440\u0438\u043A\u0430",codes:["MA","EG","ZA","SN","SO","MG"]},{key:"americas",label:"\u0410\u043C\u0435\u0440\u0438\u043A\u0430",codes:["CA","MX","CU","BR","AR","CL","GL"]},{key:"oceania",label:"\u041E\u043A\u0435\u0430\u043D\u0438\u044F",codes:["AU","NZ","FJ","PG","NC"]}];function u1(t){if(!t.codes.length)return[0,0,960,440];let n=t.codes.map(p=>Mt[p]).filter(Boolean),a=n.map(p=>p[0]),o=n.map(p=>p[1]),r=18,[L,l,i,m]=[Math.min(...a)-r,Math.max(...a)+r,Math.min(...o)-r,Math.max(...o)+r],u=960/440;if((l-L)/(m-i)<u){let p=(m-i)*u,g=(L+l)/2;[L,l]=[g-p/2,g+p/2]}else{let p=(l-L)/u,g=(i+m)/2;[i,m]=[g-p/2,g+p/2]}return[L,i,l-L,m-i]}var $a=t=>`color-mix(in oklab, var(--mf-green) ${Math.round(18+Math.min(100,Math.max(0,t))*.72)}%, white)`;function Ir({countries:t,selected:n,cluster:a={},onSelect:o}){let r=re(()=>new Map(t.map(d=>[d.code,d])),[t]),[L,l]=f(Br[0]),[i,m]=f(null),u=j(null),p=u1(L),g=p[2]/960,b=d=>x=>{let _=u.current?.getBoundingClientRect();_&&m({code:d,x:x.clientX-_.left,y:x.clientY-_.top})},c=d=>!!d&&(d.coverage!==null||d.site||d.suppliers>0),h=t.filter(d=>d.suppliers>0&&Mt[d.code]).sort((d,x)=>x.suppliers-d.suppliers),v=i?r.get(i.code):void 0;return s("div",{className:"flex flex-col",children:[s("div",{ref:u,className:"relative mx-auto w-full max-w-[46rem] overflow-hidden bg-[var(--mf-paper)]",onMouseLeave:()=>m(null),children:[s("svg",{viewBox:p.join(" "),className:"block h-auto w-full",role:"img","aria-label":"\u041A\u0430\u0440\u0442\u0430 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u044F \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u043E\u0433\u043E \u043B\u0438\u0441\u0442\u0430",children:[e("defs",{children:s("pattern",{id:"mf-site-hatch",width:"4",height:"4",patternUnits:"userSpaceOnUse",patternTransform:"rotate(45)",children:[e("rect",{width:"4",height:"4",fill:"var(--mf-line-200)"}),e("line",{x1:"0",y1:"0",x2:"0",y2:"4",stroke:"color-mix(in oklab, var(--mf-green) 55%, white)",strokeWidth:"1.6"})]})}),Object.entries(Ar).map(([d,x])=>{let _=r.get(d),y=_?.coverage!=null?$a(_.coverage):_?.site?"url(#mf-site-hatch)":"var(--mf-line-200)";return e("path",{d:x,fill:y,stroke:n===d?"var(--mf-ink-900)":_?.coverageDraft?"var(--mf-amber)":_?.coverageBy==="via"?"var(--mf-ink-700)":"white",strokeWidth:(n===d?1.4:_?.coverageDraft||_?.coverageBy==="via"?.9:.5)*g,strokeDasharray:n===d?void 0:_?.coverageDraft?`${2*g} ${1.5*g}`:_?.coverageBy==="via"?`${.6*g} ${1.4*g}`:void 0,"data-via":_?.coverageBy==="via"?"1":void 0,"data-draft":_?.coverageDraft?"1":void 0,className:k(c(_)&&"cursor-pointer hover:brightness-95"),onMouseMove:_?b(d):void 0,onClick:c(_)?()=>o(d):void 0},d)}),h.filter(d=>a[d.code]).map(d=>{let[x,_]=Mt[d.code],y=Math.max(g,.35),I=(2.2+Math.sqrt(d.suppliers)*1.1)*y,T=a[d.code].full;return e("circle",{cx:x,cy:_,r:I+3.2*y,fill:"color-mix(in oklab, var(--mf-blue) 22%, transparent)",stroke:"var(--mf-blue)",strokeWidth:(T?1.3:1)*y,strokeDasharray:T?void 0:`${2*y} ${1.4*y}`,pointerEvents:"none","data-testid":`map-halo-${d.code}`,"data-full":T?"1":"0"},`halo-${d.code}`)}),h.map(d=>{let[x,_]=Mt[d.code],y=(2.2+Math.sqrt(d.suppliers)*1.1)*Math.max(g,.35),I=n===d.code;return e("circle",{cx:x,cy:_,r:y,fill:d.refined>0?"var(--mf-amber)":d.drafts?"color-mix(in oklab, var(--mf-amber) 35%, white)":"white",stroke:I?"var(--mf-ink-900)":!d.refined&&d.drafts?"var(--mf-amber)":"var(--mf-ink-700)",strokeDasharray:!I&&!d.refined&&d.drafts?`${1.6*Math.max(g,.35)} ${1*Math.max(g,.35)}`:void 0,strokeWidth:(I?1.6:.9)*Math.max(g,.35),className:"cursor-pointer",onMouseMove:b(d.code),onClick:()=>o(d.code),"data-testid":`map-marker-${d.code}`},d.code)})]}),i&&v?s("div",{className:"pointer-events-none absolute z-10 min-w-[10rem] rounded-md border border-border bg-[var(--mf-surface)] px-2 py-1.5 text-[11px] shadow-md",style:m1(i,u.current),children:[e("div",{className:"font-semibold",children:F(v.code)}),e("div",{className:"text-muted-foreground",children:Da(v)}),a[v.code]&&v.code!==n?e("div",{className:"mt-0.5 text-[var(--mf-blue)]",children:a[v.code].full?`\u0442\u043E\u043B\u044C\u043A\u043E \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 ${F(n)} (${a[v.code].n})`:`\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 ${F(n)}: ${a[v.code].n} \u0438\u0437 ${v.suppliers}`}):null]}):null,e("div",{className:"absolute left-2 top-2 flex flex-wrap gap-0.5 rounded-md border border-border bg-[var(--mf-surface)]/90 p-0.5 text-[10px]",children:Br.map(d=>e("button",{type:"button",onClick:()=>l(d),className:k("rounded px-1.5 py-0.5",L.key===d.key?"bg-foreground text-background":"hover:bg-state-hover"),children:d.label},d.key))})]}),e(p1,{cluster:Object.keys(a).length>1})]})}function m1(t,n){let a=n?.clientWidth??300,o=n?.clientHeight??200,r={};return t.x>a-190?r.right=Math.max(4,a-t.x+12):r.left=t.x+12,t.y>o/2?r.bottom=Math.max(4,o-t.y+12):r.top=t.y+12,r}function Da(t){let n=[];return t.coverage!=null?n.push(`\u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 ${Math.round(t.coverage)}% \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443`+(t.coverageBy==="own"?` (\u043A\u0430\u0442\u0430\u043B\u043E\u0433 ${t.coverageOrg??"\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"}${t.coverageDraft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A":""})`:t.coverageBy==="via"?` (\u0447\u0435\u0440\u0435\u0437 ${t.coverageOrg??"\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E"} \u2014 ${t.coverageVia??""})`:"")):t.site?n.push("\u0441\u0430\u0439\u0442 STIHL \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D"):n.push("\u043D\u0435\u0442 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0430"),t.suppliers&&n.push(`${t.suppliers} \u043E\u0440\u0433.${t.refined?`, \u0441\u0432\u043E\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u2014 ${t.refined}`:""}${t.drafts?`, \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 \u2014 ${t.drafts}`:""}`),n.join(" \xB7 ")}function p1({cluster:t}){return s("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-border px-3 py-1.5 text-[10px] text-muted-foreground",children:[s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-12 rounded-sm",style:{background:`linear-gradient(90deg, ${$a(0)}, ${$a(100)})`}}),"\u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430 0\u2013100%"]}),s("span",{className:"flex items-center gap-1",children:[e("svg",{width:"12",height:"8","aria-hidden":!0,children:e("rect",{width:"12",height:"8",fill:"url(#mf-site-hatch)"})}),"\u0441\u0430\u0439\u0442 STIHL \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-2 rounded-full border border-[var(--mf-ink-700)] bg-white"}),"\u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0440\u0435\u0435\u0441\u0442\u0440\u0430"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-2 rounded-full border border-[var(--mf-ink-700)] bg-[var(--mf-amber)]"}),"\u0435\u0441\u0442\u044C \u0441\u0432\u043E\u0439 \u043A\u0430\u0442\u0430\u043B\u043E\u0433"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2 w-2 rounded-full border border-dashed border-[var(--mf-amber)] bg-[color-mix(in_oklab,var(--mf-amber)_35%,white)]"}),"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430 (\u0443 \u0441\u0442\u0440\u0430\u043D\u044B \u2014 \u043F\u0443\u043D\u043A\u0442\u0438\u0440\u043D\u0430\u044F \u0433\u0440\u0430\u043D\u0438\u0446\u0430)"]}),s("span",{className:"flex items-center gap-1",children:[e("svg",{width:"12",height:"8","aria-hidden":!0,children:e("rect",{x:"0.5",y:"0.5",width:"11",height:"7",fill:"none",stroke:"var(--mf-ink-700)",strokeDasharray:"0.8 1.6"})}),"\u0447\u0435\u0440\u0435\u0437 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044E \u0438\u0437 \u0434\u0440\u0443\u0433\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u044B"]}),t?s(P,{children:[s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2.5 w-2.5 rounded-full border border-[var(--mf-blue)] bg-[color-mix(in_oklab,var(--mf-blue)_22%,transparent)]"}),"\u0442\u0435 \u0436\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u2014 \u0434\u0440\u0443\u0433\u0438\u0445 \u0442\u0430\u043C \u043D\u0435\u0442"]}),s("span",{className:"flex items-center gap-1",children:[e("span",{className:"h-2.5 w-2.5 rounded-full border border-dashed border-[var(--mf-blue)] bg-[color-mix(in_oklab,var(--mf-blue)_22%,transparent)]"}),"\u0435\u0441\u0442\u044C \u0438 \u0434\u0440\u0443\u0433\u0438\u0435"]})]}):null]})}function Or({countries:t,selected:n,onSelect:a}){let[o,r]=f(""),[L,l]=f(!1),i=re(()=>{let m=o.trim().toLowerCase();return t.filter(u=>!m||F(u.code).toLowerCase().includes(m)||u.code.toLowerCase()===m).sort((u,p)=>(p.coverage??-1)-(u.coverage??-1)||p.suppliers-u.suppliers||F(u.code).localeCompare(F(p.code),"ru")).slice(0,12)},[t,o]);return s("div",{className:"relative min-w-[10rem] flex-1",children:[e(G,{value:L?o:n?F(n):"",onChange:m=>r(m.target.value),onFocus:()=>{r(""),l(!0)},onBlur:()=>setTimeout(()=>l(!1),150),placeholder:"\u0421\u0442\u0440\u0430\u043D\u0430\u2026","aria-label":"\u0412\u044B\u0431\u0440\u0430\u0442\u044C \u0441\u0442\u0440\u0430\u043D\u0443",className:"h-7 text-xs"}),L&&i.length?e("ul",{role:"listbox",className:"absolute left-0 right-0 top-8 z-20 max-h-64 overflow-y-auto rounded-md border border-border bg-[var(--mf-surface)] py-1 text-xs shadow-md",children:i.map(m=>e("li",{children:s("button",{type:"button",role:"option","aria-selected":m.code===n,onMouseDown:u=>u.preventDefault(),onClick:()=>{a(m.code),l(!1)},className:"flex w-full items-baseline gap-2 px-2 py-1 text-left hover:bg-state-hover",children:[e("span",{className:"font-medium",children:F(m.code)}),s("span",{className:"ml-auto whitespace-nowrap text-[11px] text-muted-foreground",children:[m.coverage!=null?`${Math.round(m.coverage)}%`:m.site?"\u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D":"\u2014",m.suppliers?` \xB7 ${m.suppliers} \u043E\u0440\u0433.`:""]})]})},m.code))}):null]})}function Be(t){w(()=>(window.addEventListener(Cn,t),()=>window.removeEventListener(Cn,t)),[t])}function $r(){let{status:t}=H(),n=E(),[a,o]=f(null),[r,L]=f([]),[l,i]=f([]),[m,u]=f(""),[p,g]=f(""),[b,c]=f(null),[h,v]=f(null),[d,x]=f([]),[_,y]=f({});w(()=>{n("assortment_sources",{}).then(A=>x(A.items??[]),()=>x([])),n("outreach_facets",{}).then(y,()=>y({}))},[n]);let I=R(()=>{n("assortment_coverage",{}).then(A=>{o(A.items??[]),L(A.sources??[]),i(A.served??[]),u(Y=>Y||A.items?.[0]?.country||""),v(null)},A=>v(C(A)))},[n]);w(I,[I]);let[T,$]=f(null),[M,W]=f(null),[N,z]=f(0);w(()=>{if($(null),W(null),!m)return;let A=!0;return n("outreach_list_companies",{country:m,limit:50}).then(Y=>A&&$({items:Y.items??[],total:Y.total??0}),Y=>A&&W(C(Y))),()=>{A=!1}},[m,n,N]);let Q=re(()=>{let A=T?.items??[],Y=new Set(A.map(B=>B.id)),Pn=new Set(A.filter(B=>B.coverage&&(B.coverage.by??"stihl_country")==="stihl_country").map(B=>B.coverage.country)),Tt=r.filter(B=>B.source_kind==="stihl_country"&&B.country===m),Bn=r.filter(B=>B.source_kind!=="stihl_country"&&(B.country===m||B.company_id&&Y.has(B.company_id))),O=r.filter(B=>B.source_kind==="stihl_country"&&B.country!==m&&Pn.has(B.country));return[...Tt,...Bn,...O]},[r,T,m]);w(()=>{g(A=>Q.some(Y=>Y.source_id===A)?A:Q[0]?.source_id??"")},[Q]);let te=R(()=>{c(null),p&&n("assortment_source_choices",{source_id:p}).then(A=>c(A.items??[]),A=>v(C(A)))},[p,n]);w(te,[te]);let U=R(()=>{I(),te()},[I,te]);Be(U);let ue=re(()=>g1(a??[],r,l,d,_),[a,r,l,d,_]),xe=re(()=>b1(m,T?.items??[],ue),[m,T,ue]),he=re(()=>{let A=new Map;for(let Y of r)Y.company_id&&(!A.has(Y.company_id)||Y.by_volume>A.get(Y.company_id).by_volume)&&A.set(Y.company_id,Y);return A},[r]);if(!t?.canAssortment)return e(D,{children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest."});if(a&&a.length===0&&r.length===0)return e(D,{children:"\u041D\u0435\u0442 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043D\u044B\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u043E\u0432: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438\xBB."});let ke=!!t.canManage,Z=Q.find(A=>A.source_id===p);return s("div",{className:"flex flex-col",children:[e(Ir,{countries:ue,selected:m,cluster:xe,onSelect:u}),s("div",{className:"mf-surface flex flex-wrap items-start gap-2 border-y border-border px-3 py-2",children:[e("div",{className:"w-full flex-none @[30rem]:w-44",children:e(Or,{countries:ue,selected:m,onSelect:u})}),m?M?s("span",{className:"flex-1 py-1 text-[11px] text-destructive",children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438: ",M," ",e("button",{type:"button",className:"underline",onClick:()=>z(A=>A+1),children:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C"})]}):e(x1,{country:m,orgs:T,own:he,onMatch:A=>g(A)}):e("span",{className:"flex-1"})]}),h?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:h}):null,Q.length?s(Ba,{bar:s("div",{className:"mf-surface flex flex-wrap items-center gap-1.5 border-b border-border px-3 py-2 text-xs",role:"tablist","aria-label":"\u0421\u0432\u0435\u0440\u043A\u0430 \u043F\u043E \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0443",children:[e("b",{className:"whitespace-nowrap",children:F(m)}),e("span",{className:"text-muted-foreground",children:"\xB7 \u0441\u0432\u0435\u0440\u043A\u0430 \u043F\u043E:"}),Q.map(A=>s("button",{type:"button",role:"tab","aria-selected":A.source_id===p,onClick:()=>g(A.source_id),className:k("flex items-center gap-1 rounded-md border px-2 py-0.5 text-[11px]",A.source_id===p?"border-foreground bg-foreground text-background":"border-border hover:bg-state-hover",A.draft&&"border-dashed"),children:[A.source_kind==="stihl_country"?A.country===m?"\u0421\u0430\u0439\u0442 STIHL \u0441\u0442\u0440\u0430\u043D\u044B":`\u0421\u0430\u0439\u0442 STIHL ${F(A.country)}`:Pe(A),s("b",{className:"tabular-nums",children:[Math.round(A.by_volume),"%"]}),A.draft?e("span",{className:"text-[10px] opacity-80",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null]},A.source_id)),e("button",{type:"button",className:"ml-auto whitespace-nowrap text-[11px] text-muted-foreground hover:text-foreground hover:underline",onClick:A=>{let Y=Ct(A.currentTarget);Y?.scrollTo?Y.scrollTo({top:0,behavior:"smooth"}):Y&&(Y.scrollTop=0)},children:"\u2191 \u041A\u0430\u0440\u0442\u0430"})]}),children:[Z?e(f1,{c:Z}):null,b?e(Sn,{rows:b,canDecide:ke}):e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0441\u0432\u0435\u0440\u043A\u0443\u2026"})]}):m?e(v1,{c:ue.find(A=>A.code===m)}):null]})}function f1({c:t}){let n=nt(),a=t.source_kind!=="stihl_country";return s("div",{className:"flex flex-wrap items-center gap-x-3 gap-y-1 px-3 py-2 text-xs",children:[s("span",{children:[s("b",{className:"tabular-nums",children:[t.by_volume,"%"]})," \u043F\u043E \u043E\u0431\u044A\u0451\u043C\u0443 \xB7 ",s("b",{className:"tabular-nums",children:[t.by_positions,"%"]})," \u043F\u043E\u0437\u0438\u0446\u0438\u0439"]}),s("span",{className:"text-muted-foreground",children:["\u043F\u043E\u043B\u043D\u043E\u0441\u0442\u044C\u044E ",t.full," \xB7 \u0447\u0430\u0441\u0442\u0438\u0447\u043D\u043E ",t.partial," \xB7 \u043D\u0435\u0442 ",t.none,t.unchecked?s("span",{className:"text-[var(--mf-amber)]",children:[" \xB7 \u043F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C ",t.unchecked]}):null]}),a&&t.draft?s("span",{className:"flex items-center gap-1.5",children:[e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}),e("span",{className:"text-[11px] text-muted-foreground",children:"\u0443\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435"}),e(S,{size:"sm",variant:"outline",className:"h-6 border-[var(--mf-amber)] px-2 text-[11px]",onClick:()=>n(t.source_id),children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})]}):a?e("button",{type:"button",className:"text-[11px] text-muted-foreground underline-offset-2 hover:text-foreground hover:underline",onClick:()=>n(t.source_id),children:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433 \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"}):null]})}function g1(t,n,a,o,r){let L=new Map,l=i=>{let m=L.get(i);return m||L.set(i,m={code:i,coverage:null,byPositions:null,site:!1,suppliers:0,refined:0,drafts:0}),m};for(let i of r.countries??[])i.value&&(l(i.value).suppliers=i.count);for(let i of o)i.country_code&&(i.kind==="stihl_country"?l(i.country_code).site=!0:i.company_id&&i.current&&(i.current.confirmed_at?l(i.country_code).refined+=1:l(i.country_code).drafts=(l(i.country_code).drafts??0)+1));for(let i of t)Object.assign(l(i.country),{coverage:i.by_volume,byPositions:i.by_positions,coverageBy:"site",coverageDraft:!1});for(let i of n){if(i.source_kind==="stihl_country"||!i.country)continue;let m=l(i.country);(m.coverage==null||i.by_volume>m.coverage)&&Object.assign(m,{coverage:i.by_volume,byPositions:i.by_positions,coverageBy:"own",coverageDraft:i.draft,coverageOrg:i.company_name})}for(let i of a){let m=l(i.country);if(m.coverage!=null&&i.by_volume<=m.coverage)continue;let u=i.source_country!==i.country;Object.assign(m,{coverage:i.by_volume,byPositions:i.by_positions,coverageBy:u?"via":i.source_kind==="stihl_country"?"site":"own",coverageDraft:i.draft,coverageOrg:i.company_name,coverageVia:i.source_kind==="stihl_country"?`\u0441\u0430\u0439\u0442 STIHL ${F(i.source_country)}`:`\u043A\u0430\u0442\u0430\u043B\u043E\u0433${i.draft?", \u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A":""}`})}return[...L.values()]}var Dr=t=>[...new Set([t.country_code,...t.countries??[]].filter(Boolean))];function b1(t,n,a){if(!t||!n.length)return{};let o=new Map(a.map(L=>[L.code,L.suppliers])),r={};for(let L of n)for(let l of Dr(L)){let i=r[l]??={n:0,full:!1};i.n+=1}for(let[L,l]of Object.entries(r))l.full=l.n>=(o.get(L)??0);return r}function x1({country:t,orgs:n,own:a,onMatch:o}){let r=_e(),L=le(),[l,i]=f(!1),m=n?l?n.items:n.items.slice(0,6):null,u=n?.total??0;if(!m)return e("span",{className:"flex-1 py-1 text-[11px] text-muted-foreground",children:"\u2026"});if(!m.length)return e("span",{className:"flex-1 py-1 text-[11px] text-muted-foreground",children:"\u0412 \u0440\u0435\u0435\u0441\u0442\u0440\u0435 \u043D\u0435\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 \u044D\u0442\u043E\u0439 \u0441\u0442\u0440\u0430\u043D\u044B."});let p="h-6 rounded-md px-1.5 text-[11px] text-muted-foreground hover:bg-state-hover hover:text-foreground";return s("ul",{className:"flex min-w-[12rem] flex-1 flex-col gap-0.5","aria-label":"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0441\u0442\u0440\u0430\u043D\u044B",children:[m.map(g=>{let b={kind:"company",id:g.id,title:g.display_name};return s("li",{className:"flex items-center gap-1.5 text-xs",children:[s("span",{className:"flex-none rounded-full border border-border px-1 text-[10px] font-semibold",children:["P",g.priority]}),e("span",{className:"min-w-0 truncate font-medium",title:g.display_name,children:g.display_name}),e(h1,{codes:Dr(g).filter(c=>c!==t)}),g.coverage?s("span",{className:"flex-none text-[11px] tabular-nums text-muted-foreground",title:`\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043B\u0438\u0441\u0442\u0430: \u043B\u0443\u0447\u0448\u0430\u044F \u0438\u0437 \u0441\u0442\u0440\u0430\u043D \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 (${F(g.coverage.country)})`,children:[Math.round(g.coverage.by_volume),"%"]}):null,s("span",{className:"ml-auto flex flex-none",children:[a.get(g.id)?e("button",{type:"button",className:p,title:"\u0421\u0432\u0435\u0440\u043A\u0430 \u043B\u0438\u0441\u0442\u0430 \u0441 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u043C \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",onClick:()=>o(a.get(g.id).source_id),children:"\u0421\u0432\u0435\u0440\u043A\u0430"}):null,e("button",{type:"button",className:p,title:"\u041A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u0440\u044F\u0434\u043E\u043C \u2014 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u043E\u0439 \u0432\u043A\u043B\u0430\u0434\u043A\u043E\u0439 \u043F\u0430\u043D\u0435\u043B\u0438",onClick:()=>{r(b)||L(b)},children:"\u0420\u044F\u0434\u043E\u043C"}),e("button",{type:"button",className:p,title:"\u0427\u0430\u0442 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",onClick:()=>{L(b)},children:"\u0427\u0430\u0442"})]})]},g.id)}),n&&!l&&n.items.length>m.length?e("li",{children:s("button",{type:"button",className:"text-[11px] text-muted-foreground hover:underline",onClick:()=>i(!0),children:["\u0438 \u0435\u0449\u0451 ",n.items.length-m.length]})}):null,u>(n?.items.length??0)?s("li",{className:"text-[11px] text-muted-foreground",children:["\u0432\u0441\u0435\u0433\u043E ",u," \u2014 \u0444\u0438\u043B\u044C\u0442\u0440 \xAB\u0421\u0442\u0440\u0430\u043D\u0430\xBB \u0432 \u0441\u043F\u0438\u0441\u043A\u0435 \u0441\u043B\u0435\u0432\u0430"]}):null]})}function h1({codes:t}){if(!t.length)return null;let n=t.map(F);return s("span",{className:"min-w-0 flex-none truncate text-[10px] text-muted-foreground",title:`\u0422\u0430\u043A\u0436\u0435: ${n.join(", ")}`,children:["+ ",n.slice(0,2).join(", "),n.length>2?` +${n.length-2}`:""]})}function v1({c:t}){return t?s("div",{className:"px-3 py-2 text-xs",children:[e("b",{children:F(t.code)})," ",s("span",{className:"text-muted-foreground",children:["\xB7 ",Da(t)]}),e("p",{className:"mt-1 text-[11px] text-muted-foreground",children:t.site?"\u0421\u0430\u0439\u0442 STIHL \u0441\u0442\u0440\u0430\u043D\u044B \u0435\u0441\u0442\u044C \u2014 \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0435\u0433\u043E \u0432\u043E \u0432\u043A\u043B\u0430\u0434\u043A\u0435 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438\xBB, \u0438 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u043F\u043E\u0441\u0447\u0438\u0442\u0430\u0435\u0442\u0441\u044F.":"\u0421\u0430\u0439\u0442\u0430 STIHL \u043D\u0430 \u043E\u0431\u0449\u0435\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0435 \u0443 \u0441\u0442\u0440\u0430\u043D\u044B \u043D\u0435\u0442: \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 \u0434\u0430\u0441\u0442 \u043F\u0440\u0430\u0439\u0441, \u043A\u0430\u0442\u0430\u043B\u043E\u0433 \u0438\u043B\u0438 \u0441\u0430\u0439\u0442 \u0441\u0430\u043C\u043E\u0439 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438."})]}):null}function Zr({d:t,canDecide:n}){let a=E(),[o,r]=f(null),[L,l]=f(null),[i,m]=f(null),u=R(()=>{Promise.all([a("assortment_source_choices",{source_id:t.source_id}),a("assortment_snapshot_items",{id:t.snapshot_id,limit:3e3})]).then(([c,h])=>{r(c.items??[]),l(h.items??[])},c=>m(C(c)))},[t.source_id,t.snapshot_id,a]);if(w(u,[u]),Be(u),i&&!o)return s(D,{children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ",i]});if(!o||!L)return e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u2026"});let p=o.filter(c=>c.level>0||c.decided),g=new Set(p.map(c=>(c.name??"").toLowerCase())),b=L.filter(c=>!g.has((c.variant_name||c.product_name).toLowerCase()));return s("div",{className:"flex flex-col",children:[s("div",{className:"flex items-baseline gap-2 px-3 pt-2 text-xs",children:[e("b",{children:"\u0421\u043E\u0432\u043F\u0430\u043B\u043E \u0441 \u043B\u0438\u0441\u0442\u043E\u043C"}),e("span",{className:"tabular-nums text-muted-foreground",children:p.length})]}),p.length?e(Sn,{rows:p,canDecide:n,productLabel:"\u0422\u043E\u0432\u0430\u0440 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430"}):e("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:"\u041D\u0438 \u043E\u0434\u043D\u0430 \u043F\u043E\u0437\u0438\u0446\u0438\u044F \u043B\u0438\u0441\u0442\u0430 \u043D\u0435 \u043D\u0430\u0448\u043B\u0430\u0441\u044C \u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435."}),s("div",{className:"flex items-baseline gap-2 px-3 pt-3 text-xs",children:[e("b",{children:"\u041D\u0435\u0442 \u0432 \u043B\u0438\u0441\u0442\u0435"}),e("span",{className:"tabular-nums text-muted-foreground",children:b.length}),e("span",{className:"text-[11px] text-muted-foreground",children:"\u0442\u043E\u0432\u0430\u0440\u044B \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430, \u043A\u043E\u0442\u043E\u0440\u044B\u0435 \u043B\u0438\u0441\u0442\u0443 \u043D\u0435 \u043D\u0443\u0436\u043D\u044B \u0438\u043B\u0438 \u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u044B"})]}),b.length?s("table",{className:"mb-2 w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-[var(--mf-sticky,0px)] z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u0422\u043E\u0432\u0430\u0440"}),e("th",{className:k(K,"hidden w-[7.5rem] text-left @[26rem]:table-cell"),children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e("th",{className:k(K,"w-24 pr-3 text-right"),children:"\u0426\u0435\u043D\u0430"})]})}),e("tbody",{children:b.map((c,h)=>{let v=c.variant_name||c.product_name;return s("tr",{className:"border-t border-[var(--mf-line-200)]",children:[e("td",{className:"max-w-0 py-1 pl-3 pr-2",children:c.url?e("a",{href:c.url,target:"_blank",rel:"noreferrer",className:"block truncate hover:underline",title:v,children:v}):e("span",{className:"block truncate",title:v,children:v})}),e("td",{className:"hidden truncate px-2 py-1 text-muted-foreground @[26rem]:table-cell",children:c.model_key||"\u043D\u0435 \u0440\u0430\u0441\u043F\u043E\u0437\u043D\u0430\u043D\u0430"}),e("td",{className:"py-1 pl-2 pr-3 text-right tabular-nums text-muted-foreground",children:Ee(c.price,c.currency)})]},`${v}-${h}`)})})]}):null]})}var Hr=(t,n,a,o)=>{let r=t%100,L=t%10;return r>=11&&r<=14?o:L===1?n:L>=2&&L<=4?a:o};function zr({focus:t=null}){let{status:n}=H(),a=E(),[o,r]=f(null),[L,l]=f("countries"),i=re(()=>o?o.filter(M=>M.kind==="stihl_country"):null,[o]),[m,u]=f(null),[p,g]=f(null),b=j(null),[c,h]=Er(b),v=R(()=>{a("assortment_sources",{}).then(M=>{r(M.items??[]),u(null)},M=>u(C(M)))},[a]);w(v,[v]),Be(v),w(()=>{let M=t&&o?.find(W=>W.id===t);M&&(l(M.company_id?"orgs":"countries"),h({kind:M.company_id?"org":"country",id:M.id}))},[t,o!==null]);let d=i?.some(M=>M.latest?.status==="running");w(()=>{if(!d)return;let M=setInterval(v,3e3);return()=>clearInterval(M)},[v,d]);let x=async(M,W,N)=>{g(N),u(null);try{await a(M,W),v()}catch(z){u(C(z))}finally{g(null)}};if(!n?.canAssortment)return e(D,{children:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438 \u043F\u043E\u044F\u0432\u044F\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest."});let _=!!n.canManage,y=(o??[]).filter(M=>M.company_id&&(M.current||M.latest)),I=c?(o??[]).find(M=>M.id===c.id):void 0,T=m?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:m}):null;if(c)return I?e("div",{ref:b,children:c.kind==="country"?e(y1,{source:I,action:_?e(Fr,{source:I,busy:p,act:x}):null,onBack:()=>h(null),children:T}):e(N1,{source:I,canManage:_,onBack:()=>h(null)})}):e("div",{ref:b,children:e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u2026"})});let $=(M,W)=>e("button",{type:"button",role:"tab","aria-selected":L===M,onClick:()=>l(M),className:k("whitespace-nowrap rounded-md border px-2 py-0.5 text-[11px]",L===M?"border-foreground bg-foreground text-background":"border-border hover:bg-state-hover"),children:W});return s("div",{ref:b,className:"flex flex-col",children:[s("div",{className:"mf-surface flex flex-wrap items-center gap-1.5 border-b border-border px-3 py-2",role:"tablist","aria-label":"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438",children:[$("countries",`\u0421\u0430\u0439\u0442\u044B STIHL \u0441\u0442\u0440\u0430\u043D${i?` (${i.filter(M=>M.current).length})`:""}`),$("orgs",`\u041A\u0430\u0442\u0430\u043B\u043E\u0433\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 (${y.length})`)]}),T,L==="orgs"?e(_1,{sources:y,onOpen:M=>h({kind:"org",id:M})}):s(P,{children:[s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u0421\u0442\u0440\u0430\u043D\u0430"}),e("th",{className:k(K,"text-right"),title:"\u041C\u043E\u0434\u0435\u043B\u0435\u0439 \u0438 \u0442\u043E\u0432\u0430\u0440\u043E\u0432 (\u0432\u0430\u0440\u0438\u0430\u043D\u0442\u043E\u0432 \u0441 \u043E\u0442\u0434\u0435\u043B\u044C\u043D\u044B\u043C \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u043E\u043C) \u043D\u0430 \u0441\u0430\u0439\u0442\u0435 STIHL \u0441\u0442\u0440\u0430\u043D\u044B",children:"\u041D\u0430 \u0441\u0430\u0439\u0442\u0435"}),e("th",{className:k(K,"hidden text-left @[34rem]:table-cell"),children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E"}),e("th",{className:k(K,"pr-3 text-right")})]})}),e("tbody",{children:(i??[]).map(M=>{let W=M.current,N=M.latest,z=Za(M);return s("tr",{className:"cursor-pointer border-b border-[var(--mf-line-200)] align-top hover:bg-state-hover",onClick:()=>h({kind:"country",id:M.id}),title:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0441\u0442\u0440\u0430\u043D\u044B",children:[s("td",{className:"py-1.5 pl-3 pr-2",children:[e("span",{className:"font-medium",children:F(M.country_code)}),e("span",{className:"ml-1 text-muted-foreground",children:"\u203A"}),N?.status==="running"?s("span",{className:"mt-1 flex items-center gap-2 text-[11px] text-muted-foreground",children:[e(Yt,{className:"w-20",parts:[{tone:"info",value:N.pages_done},{tone:"warning",value:Math.max(0,N.pages_total-N.pages_done)}]}),N.pages_total?`${N.pages_done} \u0438\u0437 ${N.pages_total}`:"\u043A\u0430\u0440\u0442\u0430 \u0441\u0430\u0439\u0442\u0430\u2026"]}):null,N?.status==="failed"?e("span",{className:"block text-[11px] text-destructive",children:N.error}):null,z?s("span",{className:"block text-[11px] text-[var(--mf-amber)]",children:["\u0433\u043E\u0442\u043E\u0432 \u043D\u043E\u0432\u044B\u0439 \u0441\u043D\u0438\u043C\u043E\u043A: ",z.models," \u043C\u043E\u0434\u0435\u043B\u0435\u0439, ",z.variants," \u0432\u0430\u0440.",z.pages_failed?`, \u043E\u0448\u0438\u0431\u043E\u043A ${z.pages_failed}`:""]}):null]}),e("td",{className:"whitespace-nowrap px-2 py-1.5 text-right tabular-nums",children:W?s(P,{children:[s("span",{className:"@[30rem]:hidden",children:[W.models," \u043C\u043E\u0434."]}),s("span",{className:"hidden @[30rem]:inline",children:[W.models," ",Hr(W.models,"\u043C\u043E\u0434\u0435\u043B\u044C","\u043C\u043E\u0434\u0435\u043B\u0438","\u043C\u043E\u0434\u0435\u043B\u0435\u0439"),s("span",{className:"text-muted-foreground",children:[" \xB7 ",W.variants," \u0442\u043E\u0432."]})]})]}):e("span",{className:"text-muted-foreground",children:"\u043D\u0435\u0442 \u0434\u0430\u043D\u043D\u044B\u0445"})}),e("td",{className:"hidden px-2 py-1.5 text-muted-foreground @[34rem]:table-cell",children:W?.applied_at?q(W.applied_at):"\u2014"}),e("td",{className:"py-1.5 pl-2 pr-3 text-right",onClick:Q=>Q.stopPropagation(),children:_?e(Fr,{source:M,busy:p,act:x}):null})]},M.id)})})]}),e("p",{className:"px-3 py-2 text-[11px] text-muted-foreground",children:"\u0421\u0430\u0439\u0442 STIHL \u043D\u0430 \u043E\u0431\u0449\u0435\u0439 \u043F\u043B\u0430\u0442\u0444\u043E\u0440\u043C\u0435 \u0435\u0441\u0442\u044C \u043D\u0435 \u0432\u043E \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043D\u0430\u0445: \u0434\u043B\u044F \u043E\u0441\u0442\u0430\u043B\u044C\u043D\u044B\u0445 \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0434\u0430\u0441\u0442 \u043F\u0440\u0430\u0439\u0441 \u0438\u043B\u0438 \u0441\u0430\u0439\u0442 \u0434\u0438\u0441\u0442\u0440\u0438\u0431\u044C\u044E\u0442\u043E\u0440\u0430."})]})]})}var Za=t=>t.latest&&t.latest.status==="ready"&&t.latest.id!==t.current?.id?t.latest:null;function Fr({source:t,busy:n,act:a}){let o=Za(t);return o?e(S,{size:"sm",className:"h-7 px-2",disabled:n!==null,onClick:()=>{a("assortment_apply",{id:o.id},t.id)},children:"\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C"}):t.latest?.status==="running"?null:e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:n!==null,onClick:()=>{a("assortment_refresh",{country:t.country_code},t.id)},children:t.current?"\u041E\u0431\u043D\u043E\u0432\u0438\u0442\u044C":"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C"})}function y1({source:t,action:n,onBack:a,children:o}){let r=t.current,L=t.latest;return s(Pa,{back:"\u0421\u0430\u0439\u0442\u044B STIHL \u0441\u0442\u0440\u0430\u043D",onBack:a,title:F(t.country_code),meta:s(P,{children:[r?`\u0441\u0430\u0439\u0442 STIHL \xB7 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E ${q(r.applied_at)}`:"\u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D",L?.status==="running"?` \xB7 \u0438\u0434\u0451\u0442 \u0437\u0430\u0433\u0440\u0443\u0437\u043A\u0430 ${L.pages_done} \u0438\u0437 ${L.pages_total||"\u2026"}`:"",Za(t)?" \xB7 \u0433\u043E\u0442\u043E\u0432 \u043D\u043E\u0432\u044B\u0439 \u0441\u043D\u0438\u043C\u043E\u043A":""]}),actions:n,children:[o,r?e(k1,{country:t.country_code}):e(D,{children:"\u0410\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442 \u0441\u0442\u0440\u0430\u043D\u044B \u0435\u0449\u0451 \u043D\u0435 \u0437\u0430\u0433\u0440\u0443\u0436\u0435\u043D."})]})}function _1({sources:t,onOpen:n}){let a=_e(),o=le(),r=Ur();if(!t.length)return e(D,{children:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u0432 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442: \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u043F\u0440\u0430\u0439\u0441 \u0432 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438 \u0438\u043B\u0438 \u043F\u043E\u043F\u0440\u043E\u0441\u0438\u0442\u0435 \u0430\u0433\u0435\u043D\u0442\u0430 \u0432 \u0435\u0451 \u0447\u0430\u0442\u0435 \u0440\u0430\u0437\u043E\u0431\u0440\u0430\u0442\u044C \u0435\u0451 \u0441\u0430\u0439\u0442."});let L=[...t].sort((l,i)=>(r.get(i.id)?.by_volume??-1)-(r.get(l.id)?.by_volume??-1));return s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("th",{className:k(K,"hidden text-left @[34rem]:table-cell"),children:"\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A"}),e("th",{className:k(K,"text-right"),children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435"}),e("th",{className:k(K,"pr-3 text-right")})]})}),e("tbody",{children:L.map(l=>{let i=l.current,m=!!i&&!i.confirmed_at,u=r.get(l.id),p=jr(l),g=l.company_id?{kind:"company",id:l.company_id,title:p}:null;return s("tr",{className:k("border-b border-[var(--mf-line-200)] align-top",i&&"cursor-pointer hover:bg-state-hover"),onClick:()=>i&&n(l.id),children:[s("td",{className:"max-w-0 py-1.5 pl-3 pr-2",children:[e("span",{className:"block truncate font-medium",title:p,children:p}),s("span",{className:"flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground",children:[m?e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null,F(l.country_code)," \xB7 ",i?`${i.products} \u0442\u043E\u0432.`:"\u043D\u0435\u0442 \u0441\u043D\u0438\u043C\u043A\u0430"]})]}),s("td",{className:"hidden max-w-0 truncate px-2 py-1.5 text-muted-foreground @[34rem]:table-cell",title:l.base_url,children:[l.kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442",l.base_url?` \xB7 ${l.base_url.replace(/^https?:\/\//,"")}`:""]}),e("td",{className:"whitespace-nowrap px-2 py-1.5 text-right tabular-nums",children:u?`${Math.round(u.by_volume)}%`:"\u2014"}),e("td",{className:"py-1.5 pl-2 pr-3 text-right",onClick:b=>b.stopPropagation(),children:s("span",{className:"flex flex-wrap justify-end gap-1",children:[g?e(S,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>{a(g)||o(g)},children:"\u0420\u044F\u0434\u043E\u043C"}):null,i?e(S,{size:"sm",variant:"outline",className:k("h-7 px-2",m&&"border-[var(--mf-amber)]"),onClick:()=>n(l.id),children:m?"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C":"\u0421\u043E\u0441\u0442\u0430\u0432"}):null]})})]},l.id)})})]})}var jr=t=>t.title.replace(/^(Сайт|Прайс) · /,"");function Ur(){let t=E(),[n,a]=f(new Map),o=R(()=>{t("assortment_coverage",{}).then(r=>a(new Map((r.sources??[]).map(L=>[L.source_id,L]))),()=>a(new Map))},[t]);return w(o,[o]),Be(o),n}function N1({source:t,canManage:n,onBack:a}){let o=E(),r=_e(),L=le(),l=Ur(),[i,m]=f(!1),[u,p]=f(null),g=t.current,b=!!g&&!g.confirmed_at,c=l.get(t.id),h=jr(t),v=t.company_id?{kind:"company",id:t.company_id,title:h}:null,d=async x=>{if(g){m(!0),p(null);try{await o(x,{id:g.id}),St(),x==="assortment_discard"&&a()}catch(_){p(C(_))}finally{m(!1)}}};return e(Pa,{back:"\u041A\u0430\u0442\u0430\u043B\u043E\u0433\u0438 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439",onBack:a,title:s(P,{children:[e("span",{className:"min-w-0 truncate",title:h,children:h}),b?e(V,{tone:"warn",children:"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A"}):null]}),meta:s(P,{children:[F(t.country_code)," \xB7 ",t.kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442",t.base_url?s(P,{children:[" \xB7 ",e("a",{href:t.base_url,target:"_blank",rel:"noreferrer",className:"hover:underline",children:t.base_url.replace(/^https?:\/\//,"")})]}):null,g?` \xB7 ${g.products} \u0442\u043E\u0432.`:"",c?` \xB7 \u043F\u043E\u043A\u0440\u044B\u0442\u0438\u0435 ${Math.round(c.by_volume)}%`:"",b?e("span",{className:"hidden @[30rem]:block",children:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A \u0443\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435: \u043F\u0440\u043E\u0432\u0435\u0440\u044C\u0442\u0435 \u0441\u043E\u0441\u0442\u0430\u0432 \u0438 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u0435 \u0438\u043B\u0438 \u043E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u0435."}):null,u?e("span",{role:"alert",className:"block text-destructive",children:u}):null]}),actions:s(P,{children:[v?e(S,{size:"sm",variant:"ghost",className:"h-7 px-2",onClick:()=>{r(v)||L(v)},children:"\u0420\u044F\u0434\u043E\u043C"}):null,b&&n?s(P,{children:[e(S,{size:"sm",className:"h-7 px-2",disabled:i,onClick:()=>{d("assortment_confirm")},children:"\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:i,onClick:()=>{d("assortment_discard")},children:"\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C"})]}):null]}),children:g?e(Zr,{d:{source_id:t.id,snapshot_id:g.id},canDecide:n}):e(D,{children:"\u0423 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430 \u043D\u0435\u0442 \u0441\u043D\u0438\u043C\u043A\u0430."})})}function w1(t){if(!t.some(o=>o.category))return null;let n=new Map;for(let o of t){let r=o.category||"\u041F\u0440\u0438\u043D\u0430\u0434\u043B\u0435\u0436\u043D\u043E\u0441\u0442\u0438";n.set(r,[...n.get(r)??[],o])}let a=o=>o==="\u041F\u0440\u0438\u043D\u0430\u0434\u043B\u0435\u0436\u043D\u043E\u0441\u0442\u0438"?1:0;return[...n.entries()].sort(([o],[r])=>a(o)-a(r)||o.localeCompare(r,"ru")).map(([o,r])=>({category:o,items:r}))}function k1({country:t,snapshotId:n}){let a=E(),[o,r]=f(""),[L,l]=f(null);w(()=>{let p=setTimeout(()=>{(n?a("assortment_snapshot_items",{id:n,q:o||void 0,limit:3e3}):a("assortment_items",{country:t,q:o||void 0,limit:1e3})).then(b=>l(b.items??[]),()=>l([]))},250);return()=>clearTimeout(p)},[t,n,o,a]);let i=re(()=>L?w1(L):null,[L]),m=re(()=>new Set((L??[]).map(p=>p.model_key).filter(Boolean)).size,[L]),u=p=>{let g=p.variant_name||p.product_name;return s("tr",{className:"border-b border-[var(--mf-line-200)] hover:bg-state-hover",children:[e("td",{className:"max-w-0 py-1 pl-3 pr-2",children:s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"truncate font-medium",title:g,children:p.model_key||e("span",{className:"font-normal",children:g})}),p.kit?e(Ae,{}):null]})}),e("td",{className:"hidden max-w-0 px-2 py-1 @[30rem]:table-cell",children:e("a",{href:p.url,target:"_blank",rel:"noreferrer",className:"block truncate text-muted-foreground hover:text-foreground hover:underline",title:g,children:g})}),e("td",{className:"hidden whitespace-nowrap px-2 py-1 font-mono text-[11px] text-muted-foreground @[22rem]:table-cell",children:p.sku||"\u2014"}),e("td",{className:"whitespace-nowrap py-1 pl-2 pr-3 text-right tabular-nums text-muted-foreground",children:Ee(p.price,p.currency)})]},`${p.global_id}-${p.sku}`)};return s("div",{className:"flex flex-col",children:[s("div",{className:"flex flex-wrap items-center gap-2 px-3 py-2 text-xs",children:[e(G,{value:o,onChange:p=>r(p.target.value),placeholder:"\u041C\u043E\u0434\u0435\u043B\u044C, \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u0435, \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u2026","aria-label":`\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u0430\u0441\u0441\u043E\u0440\u0442\u0438\u043C\u0435\u043D\u0442\u0443 ${t}`,className:"h-7 min-w-[9rem] flex-1 text-xs"}),e("span",{className:"text-muted-foreground",children:L?`${m} ${Hr(m,"\u043C\u043E\u0434\u0435\u043B\u044C","\u043C\u043E\u0434\u0435\u043B\u0438","\u043C\u043E\u0434\u0435\u043B\u0435\u0439")} \xB7 ${L.length} \u0442\u043E\u0432.`:"\u2026"})]}),L&&L.length?s("table",{className:"w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-[var(--mf-sticky,0px)] z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e("th",{className:k(K,"hidden text-left @[30rem]:table-cell"),children:"\u041D\u0430\u0437\u0432\u0430\u043D\u0438\u0435 \u043D\u0430 \u0441\u0430\u0439\u0442\u0435"}),e("th",{className:k(K,"hidden w-[7.5rem] text-left @[22rem]:table-cell"),children:"\u0410\u0440\u0442\u0438\u043A\u0443\u043B"}),e("th",{className:k(K,"w-24 pr-3 text-right"),children:"\u0426\u0435\u043D\u0430"})]})}),e("tbody",{children:i?i.map(p=>e(C1,{title:p.category,count:p.items.length,children:p.items.map(u)},p.category)):L.map(u)})]}):null,L&&L.length===0?e(D,{children:"\u041D\u0438\u0447\u0435\u0433\u043E \u043D\u0435 \u043D\u0430\u0439\u0434\u0435\u043D\u043E."}):null]})}function C1({title:t,count:n,children:a}){return s(P,{children:[e(wn,{colSpan:4,title:t,note:`${n} \u0442\u043E\u0432.`}),a]})}function Fa(){let t=E(),[n,a]=f(null),[o,r]=f(null),L=R(()=>{Promise.all([t("assortment_coverage",{}),t("assortment_queue",{})]).then(([l,i])=>{a({drafts:(l.sources??[]).filter(m=>m.draft),queue:i.items??[]}),r(null)},l=>r(C(l)))},[t]);return w(L,[L]),Be(L),{data:n,error:o,reload:L}}function S1(t){return t.global_id?`g:${t.global_id}`:t.sku?`s:${t.sku}`:`n:${t.source?.source_id}:${(t.name??"").toLowerCase().replace(/\s+/g," ")}`}function M1(t,n){return t.global_id?{key_kind:"global_id",key:t.global_id}:t.sku?{key_kind:"sku",key:t.sku}:{key_kind:"name",key:t.name??"",source_id:n?.source_id}}var T1={trim:"\u0438\u0441\u043F\u043E\u043B\u043D\u0435\u043D\u0438\u0435 \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u043E",generation:"\u0434\u0440\u0443\u0433\u043E\u0435 \u043F\u043E\u043A\u043E\u043B\u0435\u043D\u0438\u0435",kit:"\u043D\u0430\u0431\u043E\u0440 \u2194 \u0431\u0435\u0437 \u0410\u041A\u0411",mains:"\u0437\u0430\u0440\u044F\u0434\u043D\u043E\u0435 \u043D\u0435 \u0434\u043B\u044F \u0441\u0435\u0442\u0438 \u0415\u0421"};function R1(t){let n=new Map;for(let a of t){let o=n.get(a.need_id);o||n.set(a.need_id,o={needId:a.need_id,first:a,candidates:[]});let r=S1(a),L=o.candidates.find(l=>l.key===r);L?L.rows.push(a):o.candidates.push({key:r,rows:[a]})}return[...n.values()].sort((a,o)=>a.first.position_no-o.first.position_no)}function qr(){let{status:t}=H(),n=E(),{data:a,error:o}=Fa(),[r,L]=f(new Map);w(()=>{n("procurement_needs",{}).then(u=>L(new Map((u.items??[]).map(p=>[p.id,p]))),()=>L(new Map))},[n]);let l=re(()=>a?R1(a.queue):[],[a]);if(!t?.canAssortment)return e(D,{children:"\u041F\u0440\u043E\u0432\u0435\u0440\u043A\u0430 \u043F\u043E\u044F\u0432\u0438\u0442\u0441\u044F \u043F\u043E\u0441\u043B\u0435 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u044F Manifest."});if(o)return s(D,{children:["\u041D\u0435 \u0443\u0434\u0430\u043B\u043E\u0441\u044C \u0437\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C: ",o]});if(!a)return e(D,{children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let i=!!t.canManage,m=l.reduce((u,p)=>u+p.candidates.length,0);return s("div",{className:"@container flex flex-col",children:[e(Kr,{title:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0438 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u043E\u0432",count:a.drafts.length,hint:"\u0423\u0436\u0435 \u0432 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0435 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439. \u0421\u043E\u0441\u0442\u0430\u0432 \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0430, \xAB\u041F\u043E\u0434\u0442\u0432\u0435\u0440\u0434\u0438\u0442\u044C\xBB \u0438 \xAB\u041E\u0442\u043A\u043B\u043E\u043D\u0438\u0442\u044C\xBB \u2014 \u0432 \xAB\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445\xBB.",children:a.drafts.length?e(P1,{drafts:a.drafts}):e(Gr,{children:"\u0427\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u043E\u0432 \u043D\u0435\u0442."})}),e(Kr,{title:"\u0421\u043E\u043C\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u0431\u043E\u0440\u044B",count:m,hint:l.length?`${l.length} \u043F\u043E\u0437. \u043B\u0438\u0441\u0442\u0430. \u0420\u0435\u0448\u0435\u043D\u0438\u0435 \u043F\u043E \u0442\u043E\u0432\u0430\u0440\u0443 STIHL \u0434\u0435\u0439\u0441\u0442\u0432\u0443\u0435\u0442 \u0432\u043E \u0432\u0441\u0435\u0445 \u0441\u0442\u0440\u0430\u043D\u0430\u0445, \u043F\u043E \u0430\u0440\u0442\u0438\u043A\u0443\u043B\u0443 \u2014 \u0432\u043E \u0432\u0441\u0435\u0445 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445, \u043F\u043E \u043D\u0430\u0437\u0432\u0430\u043D\u0438\u044E \u2014 \u0432 \u0441\u0432\u043E\u0451\u043C \u043A\u0430\u0442\u0430\u043B\u043E\u0433\u0435.`:"",children:l.length?s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u0422\u043E\u0432\u0430\u0440 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430"}),e("th",{className:k(K,"hidden w-[24%] text-left @[36rem]:table-cell"),children:"\u0413\u0434\u0435"}),e("th",{className:k(K,"hidden w-[11rem] text-left @[44rem]:table-cell"),children:"\u0421\u043E\u043C\u043D\u0435\u043D\u0438\u0435"}),e("th",{className:k(K,"hidden w-[10rem] pr-3 text-right @[30rem]:table-cell"),children:"\u0420\u0435\u0448\u0435\u043D\u0438\u0435"})]})}),e("tbody",{children:l.map(u=>s(ot,{children:[e(E1,{row:u.first,need:r.get(u.needId)}),u.candidates.map(p=>e(A1,{c:p,canDecide:i},p.key))]},u.needId))})]}):e(Gr,{children:"\u041F\u0440\u043E\u0432\u0435\u0440\u044F\u0442\u044C \u043D\u0435\u0447\u0435\u0433\u043E: \u0432\u0441\u0435 \u0441\u043E\u043C\u043D\u0438\u0442\u0435\u043B\u044C\u043D\u044B\u0435 \u0432\u044B\u0431\u043E\u0440\u044B \u0440\u0435\u0448\u0435\u043D\u044B."})})]})}function Kr({title:t,count:n,hint:a,children:o}){return s("section",{className:"border-b border-border",children:[s("div",{className:"mf-surface flex flex-wrap items-baseline gap-x-2 gap-y-0.5 px-3 py-2",children:[s("h3",{className:"text-[13px] font-bold",children:[t," ",e("span",{className:"font-normal tabular-nums text-muted-foreground",children:n})]}),a?e("span",{className:"text-[11px] text-muted-foreground",children:a}):null]}),o]})}function Gr({children:t}){return e("p",{className:"px-3 py-2 text-xs text-muted-foreground",children:t})}function E1({row:t,need:n}){let a=n?.article_aliases??[];return e("tr",{className:"border-t border-[var(--mf-line-300)] bg-[var(--mf-surface-strong)]",children:s("td",{colSpan:4,className:"px-3 py-1.5",children:[s("div",{className:"flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5",children:[s("span",{className:"tabular-nums text-muted-foreground",children:["\u2116",t.position_no]}),e("span",{className:"font-semibold",children:t.model_key}),t.kit?e(Ae,{}):null,e("span",{className:"text-[11px] text-muted-foreground",children:[t.category,`${t.qty} \u0448\u0442`,a.length?`\u0430\u0440\u0442. ${a.slice(0,2).join(", ")}${a.length>2?` +${a.length-2}`:""}`:"",n?.ref_price?`\u043E\u0440\u0438\u0435\u043D\u0442\u0438\u0440 ${Ee(n.ref_price,n.ref_currency)}`:""].filter(Boolean).join(" \xB7 ")})]}),n?.description_en&&n.description_en!==t.model_key?s("div",{className:"truncate text-[11px] text-muted-foreground",title:n.description_en,children:["\u0412 \u043B\u0438\u0441\u0442\u0435: ",n.description_en]}):null]})})}function A1({c:t,canDecide:n}){let a=E(),[o,r]=f(!1),[L,l]=f(!1),[i,m]=f(null),u=t.rows[0],p=Ia(u),g=T1[u.reason??""]??p.text,b=t.rows.map(d=>d.source?.source_kind==="stihl_country"?F(d.source.country):Pe(d.source)),c=async(d,x)=>{l(!0),m(null);try{await a("assortment_decide",{need_id:u.need_id,level:d,reason:d===.5?u.reason??"":"",...M1(x??u,u.source)}),St()}catch(_){m(C(_))}finally{l(!1)}},h="h-6 whitespace-nowrap rounded-md border px-1.5 text-[11px] disabled:opacity-50",v=e(P,{children:n?s("span",{className:"inline-flex flex-nowrap gap-1",role:"group","aria-label":`\u0420\u0435\u0448\u0435\u043D\u0438\u0435: ${u.name}`,children:[e("button",{type:"button",className:k(h,"border-foreground bg-foreground text-background"),disabled:L,onClick:()=>{c(1)},title:"\u0422\u043E\u0442 \u0436\u0435 \u0442\u043E\u0432\u0430\u0440, \u0447\u0442\u043E \u043D\u0443\u0436\u0435\u043D \u043B\u0438\u0441\u0442\u0443",children:"\u0422\u043E\u0442 \u0436\u0435"}),e("button",{type:"button",className:k(h,"border-border hover:bg-state-hover"),disabled:L,onClick:()=>{c(.5)},title:"\u0427\u0430\u0441\u0442\u0438\u0447\u043D\u043E: \u043F\u043E\u0434\u0445\u043E\u0434\u0438\u0442 \u0441 \u043E\u0433\u043E\u0432\u043E\u0440\u043A\u043E\u0439",children:"\xBD"}),e("button",{type:"button",className:k(h,"border-border text-destructive hover:bg-state-hover"),disabled:L,onClick:()=>{c(0)},title:"\u041D\u0435 \u0442\u043E\u0442 \u0442\u043E\u0432\u0430\u0440",children:"\u041D\u0435 \u0442\u043E"})]}):null});return s(P,{children:[s("tr",{className:"border-t border-[var(--mf-line-200)] align-top",children:[e("td",{className:"py-1.5 pl-3 pr-2",children:e("div",{className:"flex min-w-0 items-start gap-1.5",children:s("div",{className:"min-w-0",children:[e("div",{className:"break-words font-medium leading-snug",children:u.name}),s("div",{className:"flex flex-wrap items-center gap-x-1.5 text-[11px] text-muted-foreground",children:[u.sku?e("span",{className:"font-mono",children:u.sku}):null,u.url?e("a",{href:u.url,target:"_blank",rel:"noreferrer",className:"underline",children:"\u0441\u0442\u0440\u0430\u043D\u0438\u0446\u0430"}):null,s("span",{className:"@[36rem]:hidden",children:["\xB7 ",b.slice(0,2).join(", "),b.length>2?` +${b.length-2}`:""]}),u.alternatives?.length?s("button",{type:"button",className:"underline",onClick:()=>r(!o),"aria-expanded":o,children:["\u0434\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u044B \u043C\u043E\u0434\u0435\u043B\u0438 (",u.alternatives.length,")"]}):null]}),s("div",{className:"mt-0.5 flex items-center gap-1.5 text-[11px] @[44rem]:hidden",children:[e(ge,{tone:p.tone}),e("span",{children:g})]}),s("div",{className:"mt-1 @[30rem]:hidden",children:[v,i?e("div",{role:"alert",className:"mt-0.5 text-[11px] text-destructive",children:i}):null]})]})})}),e("td",{className:"hidden w-[24%] px-2 py-1.5 text-[11px] text-muted-foreground @[36rem]:table-cell",title:b.join(", "),children:s("span",{className:"line-clamp-2",children:[b.slice(0,4).join(", "),b.length>4?` \u0438 \u0435\u0449\u0451 ${b.length-4}`:""]})}),e("td",{className:"hidden px-2 py-1.5 @[44rem]:table-cell",children:s("span",{className:"flex min-w-0 items-start gap-1.5",children:[e(ge,{tone:p.tone,className:"mt-1"}),e("span",{title:p.text,children:g})]})}),s("td",{className:"hidden py-1.5 pl-2 pr-3 text-right @[30rem]:table-cell",children:[v,i?e("div",{role:"alert",className:"mt-0.5 text-[11px] text-destructive",children:i}):null]})]}),o&&u.alternatives?.length?e("tr",{className:"bg-[var(--mf-paper)]",children:s("td",{colSpan:4,className:"px-3 py-1.5",children:[s("div",{className:"text-[10px] uppercase tracking-wide text-muted-foreground",children:["\u0414\u0440\u0443\u0433\u0438\u0435 \u0442\u043E\u0432\u0430\u0440\u044B \u044D\u0442\u043E\u0439 \u043C\u043E\u0434\u0435\u043B\u0438 \xB7 ",Pe(u.source)]}),u.alternatives.map(d=>s("div",{className:"flex items-center gap-2 py-0.5 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:d.name,children:[d.name," ",e("span",{className:"font-mono text-muted-foreground",children:d.sku}),d.kit?" \xB7 \u043D\u0430\u0431\u043E\u0440":""]}),n?e(S,{size:"sm",variant:"outline",className:"h-6 px-2 text-[11px]",disabled:L,onClick:()=>{c(1,d)},children:"\u0412\u044B\u0431\u0440\u0430\u0442\u044C"}):null]},`${d.global_id}|${d.sku}|${d.name}`))]})}):null]})}function P1({drafts:t}){let n=nt();return s("table",{className:"w-full table-fixed border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"pl-3 text-left"),children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("th",{className:k(K,"w-20 text-right"),children:"\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435"}),e("th",{className:k(K,"hidden w-24 text-right @[30rem]:table-cell"),children:"\u041F\u043E\u0437\u0438\u0446\u0438\u0439"}),e("th",{className:k(K,"w-[6.5rem] pr-3 text-right @[30rem]:w-[11rem]")})]})}),e("tbody",{children:t.map(a=>s("tr",{className:"border-t border-[var(--mf-line-200)]",children:[s("td",{className:"max-w-0 py-1.5 pl-3 pr-2",children:[e("div",{className:"truncate font-medium",title:a.company_name||a.title,children:a.company_name||a.title}),s("div",{className:"truncate text-[11px] text-muted-foreground",children:[F(a.country)," \xB7 ",a.source_kind==="pricelist"?"\u043F\u0440\u0430\u0439\u0441":"\u0441\u0430\u0439\u0442"]})]}),s("td",{className:"px-2 py-1.5 text-right tabular-nums",children:[Math.round(a.by_volume),"%"]}),s("td",{className:"hidden px-2 py-1.5 text-right tabular-nums text-muted-foreground @[30rem]:table-cell",children:[a.full+a.partial," \u0438\u0437 ",a.positions]}),e("td",{className:"py-1.5 pl-2 pr-3 text-right",children:s(S,{size:"sm",variant:"outline",className:"h-7 whitespace-nowrap border-[var(--mf-amber)] px-2 text-[11px]","aria-label":"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445",onClick:()=>n(a.source_id),children:[e("span",{className:"@[30rem]:hidden",children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"}),e("span",{className:"hidden @[30rem]:inline",children:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C \u0432 \u0438\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0430\u0445"})]})})]},a.source_id))})]})}function B1(t){let n=new Map;for(let a of t){let o=a.category||"\u0411\u0435\u0437 \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u0438";n.set(o,[...n.get(o)??[],a])}return[...n.entries()].sort(([a],[o])=>a.localeCompare(o,"ru")).map(([a,o])=>({category:a,items:o,qty:o.reduce((r,L)=>r+L.target_qty,0)}))}function Yr(t){let n=le(),[a,o]=f(null),[r,L]=f(0);return w(()=>{o(null),n(vt).catch(l=>o(C(l)))},[r,n]),a?s("div",{className:"p-3",children:[e("p",{role:"alert",className:"text-xs text-destructive",children:a}),e(S,{size:"sm",variant:"outline",className:"mt-2",onClick:()=>L(l=>l+1),children:"\u041F\u043E\u0432\u0442\u043E\u0440\u0438\u0442\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u0438\u0435"})]}):e(D,{children:"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C \u0437\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442\u2026"})}function Jr(){let{status:t}=H(),[n,a]=f(()=>J2()),[o,r]=f(()=>n?"countries":"sheet"),L=Fa();return w(()=>{let l=i=>{let m=i.detail;m&&(i.preventDefault(),r("countries"),a(null),setTimeout(()=>a(m),0))};return window.addEventListener(cn,l),()=>window.removeEventListener(cn,l)},[]),t?.canAssortment?s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[e(rt,{label:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442",active:o,onSelect:l=>r(l),tabs:[["sheet","\u041B\u0438\u0441\u0442"],["matching","\u041F\u043E\u043A\u0440\u044B\u0442\u0438\u0435"],["countries","\u0418\u0441\u0442\u043E\u0447\u043D\u0438\u043A\u0438"],["review",L.data?`\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C ${L.data.queue.length+L.data.drafts.length}`:"\u041F\u0440\u043E\u0432\u0435\u0440\u0438\u0442\u044C"]]}),e("div",{className:"min-h-0 flex-1",children:o==="sheet"?e(Vr,{}):e("div",{className:"h-full overflow-y-auto",[kn]:"",children:o==="matching"?e($r,{}):o==="review"?e(qr,{}):e(zr,{focus:n})})})]}):e(Vr,{})}function Vr(){let{status:t}=H(),n=E(),[a,o]=f(null),[r,L]=f(null),[l,i]=f(""),[m,u]=f(null),[p,g]=f(!1),b=R(()=>{n("procurement_needs",{}).then(d=>{o(d.items??[]),L(null)},d=>L(C(d)))},[n]);w(()=>{t?.canProcurement&&b()},[b,t?.canProcurement]);let c=re(()=>{let d=l.trim().toLowerCase();return a?d?a.filter(x=>[x.model_key,x.category,x.description_en,x.part_no,...x.article_aliases].some(_=>_.toLowerCase().includes(d))):a:[]},[a,l]);if(!t)return e(D,{children:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0430\u0435\u043C\u0441\u044F \u043A Manifest\u2026"});if(!t.connected)return e(D,{children:t.message});if(!t.canProcurement)return e(D,{children:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442 \u043D\u0435\u0434\u043E\u0441\u0442\u0443\u043F\u0435\u043D: \u043D\u0443\u0436\u043D\u043E \u043F\u0440\u0430\u0432\u043E \xAB\u0417\u0430\u043A\u0443\u043F\u043A\u0438: \u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440\xBB \u0432 Manifest \u0438\u043B\u0438 \u043E\u0431\u043D\u043E\u0432\u043B\u0435\u043D\u0438\u0435 Manifest."});let h=t.canProcurementManage,v=a?.reduce((d,x)=>d+x.target_qty,0)??0;return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[s("div",{className:"mf-surface flex flex-wrap items-center gap-2 border-b border-border px-3 py-2 text-xs",children:[e(G,{value:l,onChange:d=>i(d.target.value),placeholder:"\u041C\u043E\u0434\u0435\u043B\u044C, \u0430\u0440\u0442\u0438\u043A\u0443\u043B, \u043A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F\u2026","aria-label":"\u041F\u043E\u0438\u0441\u043A \u043F\u043E \u043B\u0438\u0441\u0442\u0443",className:"h-7 min-w-[9rem] flex-1 text-xs"}),e("span",{className:"text-muted-foreground",children:a?`${a.length} \u043F\u043E\u0437. \xB7 ${v.toLocaleString("ru-RU")} \u0448\u0442`:"\u2026"}),h?s(P,{children:[e(S,{size:"sm",variant:"outline",className:"h-7 px-2",onClick:()=>g(!p),children:"+ \u041F\u043E\u0437\u0438\u0446\u0438\u044F"}),e($1,{onApplied:b})]}):null]}),r?e("p",{role:"alert",className:"px-3 py-2 text-xs text-destructive",children:r}):null,s("div",{className:"min-h-0 flex-1 overflow-y-auto",[kn]:"",children:[p?e("div",{className:"border-b border-border bg-[var(--mf-surface)] p-3",children:e(Qr,{onDone:d=>{g(!1),d&&b()}})}):null,a&&a.length===0?e(D,{children:"\u041B\u0438\u0441\u0442 \u043F\u0443\u0441\u0442. \u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u0435 \u0444\u0430\u0439\u043B \u0441 \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C\u0438 (CSV \u0438\u043B\u0438 XLSX)."}):null,c.length?s("table",{className:"w-full border-collapse bg-[var(--mf-surface)] text-xs",children:[e("thead",{className:"sticky top-0 z-10 bg-[var(--mf-surface)] shadow-[inset_0_-1px_0_var(--mf-line-300)]",children:s("tr",{children:[e("th",{className:k(K,"w-9 pl-3 text-right"),children:"\u2116"}),e("th",{className:k(K,"text-left"),children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e("th",{className:k(K,"hidden text-left @[30rem]:table-cell"),children:"\u0410\u0440\u0442\u0438\u043A\u0443\u043B\u044B"}),e("th",{className:k(K,"w-14 text-right"),children:"\u041A\u043E\u043B-\u0432\u043E"}),e("th",{className:k(K,"hidden w-24 pr-3 text-right @[22rem]:table-cell"),children:"\u041E\u0440\u0438\u0435\u043D\u0442\u0438\u0440"})]})}),e("tbody",{children:B1(c).map(d=>e(I1,{group:d,open:m,setOpen:u,canEdit:h,onChanged:b},d.category))})]}):null]})]})}function I1({group:t,open:n,setOpen:a,canEdit:o,onChanged:r}){return s(P,{children:[e(wn,{colSpan:5,title:t.category,note:`${t.items.length} \u043F\u043E\u0437. \xB7 ${t.qty.toLocaleString("ru-RU")} \u0448\u0442`}),t.items.map(L=>{let l=n===L.id,i=L.article_aliases;return s(O1,{children:[s("tr",{className:k("cursor-pointer border-b border-[var(--mf-line-200)] hover:bg-state-hover",l&&"bg-state-active"),onClick:()=>a(l?null:L.id),"aria-expanded":l,children:[e("td",{className:"py-1 pl-3 pr-2 text-right tabular-nums text-muted-foreground",children:L.position_no}),e("td",{className:"max-w-0 px-2 py-1",children:s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"truncate font-medium",children:L.model_key||L.description_en||L.part_no}),L.kit?e(Ae,{}):null]})}),s("td",{className:"hidden max-w-0 truncate px-2 py-1 font-mono text-[11px] text-muted-foreground @[30rem]:table-cell",title:i.join(" "),children:[i[0]??"\u2014",i.length>1?` +${i.length-1}`:""]}),e("td",{className:"px-2 py-1 text-right tabular-nums",children:L.target_qty}),e("td",{className:"hidden py-1 pl-2 pr-3 text-right tabular-nums text-muted-foreground @[22rem]:table-cell",children:Ee(L.ref_price,L.ref_currency)})]}),l?e("tr",{className:"border-b border-[var(--mf-line-300)]",children:e("td",{colSpan:5,className:"bg-[var(--mf-paper)] p-2.5",children:e(Qr,{need:L,readOnly:!o,onDone:m=>{m?r():a(null)}})})}):null]},L.id)})]})}function O1({children:t}){return e(P,{children:t})}var je="h-8 text-xs";function Qr({need:t,readOnly:n,onDone:a}){let o=E(),[r,L]=f(t?.model_key??""),[l,i]=f(t?.kit??!1),[m,u]=f(t?.category??""),[p,g]=f(t?.description_en??""),[b,c]=f((t?.article_aliases??[]).join(" ")),[h,v]=f(String(t?.target_qty??"")),[d,x]=f(t?.ref_price===null||t?.ref_price===void 0?"":String(t.ref_price)),[_,y]=f(t?.ref_currency??""),[I,T]=f(!1),[$,M]=f(null),[W,N]=f(!1),z=async()=>{T(!0),M(null);try{let U=b.split(/[\s,;]+/).filter(Boolean),ue=d.trim()===""?null:Number(d.replace(",",".")),xe={id:t?.id,position_no:t?.position_no,brand:t?.brand??(r?"STIHL":""),part_no:t?.part_no||U[0]||"",description_en:p||(r?`STIHL ${r}${l?" set (with battery and charger)":""}`:""),target_qty:Number(h),unit:"pcs",response_deadline:t?.response_deadline??void 0,commercial_terms:t?.commercial_terms,specification_en:t?.specification_en,internal_comment:t?.internal_comment,model_key:r,kit:l,category:m,article_aliases:U,ref_currency:_};ue===null?xe.clear_ref_price=!0:xe.ref_price=ue,await o("procurement_need_save",xe),a(!0)}catch(U){M(C(U))}finally{T(!1)}},Q=async()=>{if(t){T(!0);try{await o("procurement_need_cancel",{id:t.id}),a(!0)}catch(U){M(C(U))}finally{T(!1),N(!1)}}},te=n||I;return s("div",{className:"flex flex-col gap-2 text-xs",children:[s("div",{className:"grid gap-2 @md:grid-cols-2",children:[s("label",{className:"flex flex-col gap-0.5",children:[e(Le,{children:"\u041C\u043E\u0434\u0435\u043B\u044C"}),e(G,{className:je,value:r,onChange:U=>L(U.target.value),disabled:te,placeholder:"MSA 220 C-B"})]}),s("label",{className:"flex flex-col gap-0.5",children:[e(Le,{children:"\u041A\u0430\u0442\u0435\u0433\u043E\u0440\u0438\u044F"}),e(G,{className:je,value:m,onChange:U=>u(U.target.value),disabled:te})]}),s("label",{className:"flex flex-col gap-0.5 @md:col-span-2",children:[e(Le,{children:"\u0410\u0440\u0442\u0438\u043A\u0443\u043B\u044B (\u0432\u0441\u0435 \u0438\u0437\u0432\u0435\u0441\u0442\u043D\u044B\u0435, \u0447\u0435\u0440\u0435\u0437 \u043F\u0440\u043E\u0431\u0435\u043B)"}),e(G,{className:je,value:b,onChange:U=>c(U.target.value),disabled:te})]}),s("label",{className:"flex flex-col gap-0.5",children:[e(Le,{children:"\u041A\u043E\u043B-\u0432\u043E, \u0448\u0442"}),e(G,{className:je,inputMode:"numeric",value:h,onChange:U=>v(U.target.value),disabled:te})]}),s("div",{className:"flex gap-2",children:[s("label",{className:"flex flex-1 flex-col gap-0.5",children:[e(Le,{children:"\u041E\u0440\u0438\u0435\u043D\u0442\u0438\u0440 \u0446\u0435\u043D\u044B"}),e(G,{className:je,inputMode:"decimal",value:d,onChange:U=>x(U.target.value),disabled:te})]}),s("label",{className:"flex w-20 flex-col gap-0.5",children:[e(Le,{children:"\u0412\u0430\u043B\u044E\u0442\u0430"}),e(G,{className:je,value:_,onChange:U=>y(U.target.value.toUpperCase()),disabled:te,placeholder:"KZT"})]})]}),s("label",{className:"flex flex-col gap-0.5 @md:col-span-2",children:[e(Le,{children:"\u0414\u043B\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430 (\u0430\u043D\u0433\u043B.)"}),e(G,{className:je,value:p,onChange:U=>g(U.target.value),disabled:te})]})]}),s("label",{className:"flex items-center gap-2",children:[e("input",{type:"checkbox",checked:l,onChange:U=>i(U.target.checked),disabled:te}),"\u041D\u0430\u0431\u043E\u0440 \u0441 \u0430\u043A\u043A\u0443\u043C\u0443\u043B\u044F\u0442\u043E\u0440\u043E\u043C \u0438 \u0437\u0430\u0440\u044F\u0434\u043D\u044B\u043C"]}),$?e("p",{role:"alert",className:"text-destructive",children:$}):null,n?null:s("div",{className:"flex flex-wrap items-center gap-2",children:[e(S,{size:"sm",className:"h-8",disabled:I||!h,onClick:()=>{z()},children:"\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C"}),e(S,{size:"sm",variant:"ghost",className:"h-8",disabled:I,onClick:()=>a(!1),children:"\u0417\u0430\u043A\u0440\u044B\u0442\u044C"}),e("span",{className:"flex-1"}),t?e(S,{size:"sm",variant:"ghost",className:"h-8 text-destructive",disabled:I,onClick:()=>N(!0),children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0438\u0446\u0438\u044E"}):null]}),W?e(be,{title:`\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0438\u0446\u0438\u044E ${t?.position_no}?`,actions:s(P,{children:[e(S,{size:"sm",variant:"destructive",className:"h-8",disabled:I,onClick:()=>{Q()},children:"\u041E\u0442\u043C\u0435\u043D\u0438\u0442\u044C \u043F\u043E\u0437\u0438\u0446\u0438\u044E"}),e(S,{size:"sm",variant:"ghost",className:"h-8",onClick:()=>N(!1),children:"\u041D\u0435 \u043E\u0442\u043C\u0435\u043D\u044F\u0442\u044C"})]}),children:"\u041F\u043E\u0437\u0438\u0446\u0438\u044F \u0443\u0439\u0434\u0451\u0442 \u0438\u0437 \u043B\u0438\u0441\u0442\u0430 \u0438 \u0438\u0437 \u0440\u0435\u0439\u0442\u0438\u043D\u0433\u0430 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u043E\u0432; \u043D\u0430\u0437\u043D\u0430\u0447\u0435\u043D\u0438\u044F \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0430\u043C \u0441\u043D\u0438\u043C\u0443\u0442\u0441\u044F."}):null]})}var Wr={create:"\u043D\u043E\u0432\u0430\u044F",update:"\u0438\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F",same:"\u0431\u0435\u0437 \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439",error:"\u043E\u0448\u0438\u0431\u043A\u0430"};function $1({onApplied:t}){let n=E(),a=j(null),[o,r]=f(null),[L,l]=f(null),[i,m]=f(!1),[u,p]=f(null),[g,b]=f(null),c=async x=>{p(null),b(null),m(!0);try{let _=et(await Xe(x)),y=await n("procurement_import_preview",{filename:x.name,content_base64:_});r({name:x.name,b64:_}),l(y)}catch(_){p(C(_))}finally{m(!1)}},h=async()=>{if(!(!o||!L)){m(!0),p(null);try{await n("procurement_import_apply",{filename:o.name,content_base64:o.b64,fingerprint:L.fingerprint}),b(`\u0417\u0430\u0433\u0440\u0443\u0436\u0435\u043D\u043E: \u043D\u043E\u0432\u044B\u0445 ${L.counts.create??0}, \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u043E ${L.counts.update??0}.`),l(null),r(null),t()}catch(x){p(C(x))}finally{m(!1)}}},v=L?.actions.filter(x=>x.kind!=="same")??[],d=(L?.counts.create??0)+(L?.counts.update??0);return s(P,{children:[e("input",{ref:a,type:"file",accept:".csv,.xlsx,.tsv,text/csv",className:"hidden","aria-label":"\u0424\u0430\u0439\u043B \u0441 \u043F\u043E\u0437\u0438\u0446\u0438\u044F\u043C\u0438",onChange:x=>{let _=x.target.files?.[0];x.target.value="",_&&c(_)}}),e(S,{size:"sm",variant:"outline",className:"h-7 px-2",disabled:i,onClick:()=>a.current?.click(),children:"\u0417\u0430\u0433\u0440\u0443\u0437\u0438\u0442\u044C \u0444\u0430\u0439\u043B"}),g?e("span",{className:"w-full text-[var(--mf-green)]",children:g}):null,u?e("span",{role:"alert",className:"w-full text-destructive",children:u}):null,L?e("div",{className:"w-full",children:s(be,{title:`${o?.name}: ${L.rows} \u0441\u0442\u0440\u043E\u043A`,actions:s(P,{children:[s(S,{size:"sm",className:"h-8",disabled:i||d===0,onClick:()=>{h()},children:["\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C: \u043D\u043E\u0432\u044B\u0445 ",L.counts.create??0,", \u0438\u0437\u043C\u0435\u043D\u0435\u043D\u0438\u0439 ",L.counts.update??0]}),e(S,{size:"sm",variant:"ghost",className:"h-8",onClick:()=>l(null),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:[e("div",{className:"flex flex-wrap gap-1",children:["create","update","same","error"].map(x=>L.counts[x]?s(V,{tone:x==="error"?"err":x==="same"?"muted":x==="update"?"warn":"ok",children:[Wr[x],": ",L.counts[x]]},x):null)}),v.length?e("ul",{className:"mt-2 max-h-56 overflow-y-auto",children:v.map(x=>s("li",{className:k("flex gap-2 py-0.5",x.kind==="error"&&"text-destructive"),children:[e("span",{className:"w-16 flex-none text-muted-foreground",children:Wr[x.kind]}),s("span",{className:"min-w-0 flex-1 truncate",children:[x.key.startsWith("art:")||x.key.startsWith("name:")?x.name:x.key,x.kit?" \xB7 \u043D\u0430\u0431\u043E\u0440":""," \xB7 ",x.qty," \u0448\u0442",x.changes?.length?` \xB7 ${x.changes.join(", ")}`:"",x.error?` \xB7 ${x.error} (\u0441\u0442\u0440. ${x.lines.join(", ")})`:""]})]},`${x.key}|${x.kit}|${x.lines[0]}`))}):null]})}):null]})}var Mn={template:["templates","\u0428\u0430\u0431\u043B\u043E\u043D\u044B"],mailing:["mailings","\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0438"],inbound:["inbound","\u041D\u0435\u0440\u0430\u0437\u043E\u0431\u0440\u0430\u043D\u043D\u044B\u0435 \u0432\u0445\u043E\u0434\u044F\u0449\u0438\u0435"]},Tn={title:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",hub:"mail",tabs:st},D1={title:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442",hub:"needs",tabs:[]},Z1={mail:Tn,template:Tn,mailing:Tn,inbound:Tn,needs:D1},F1=At;function Ha({threadId:t,params:n}){let a=za(n);return a?e(ja,{pin:a,threadId:t}):e(z1,{threadId:t})}var H1=["company","mailing","template","topic","inbound","mail"];function za(t){let n=t&&typeof t=="object"&&!Array.isArray(t)?t.pin:null;if(!n||typeof n!="object")return null;let a=n;return typeof a.kind!="string"||!H1.includes(a.kind)||typeof a.id!="string"?null:{kind:a.kind,id:a.id,title:typeof a.title=="string"?a.title:""}}function ja({pin:t,threadId:n,mainTitle:a}){let{focus:o}=dn(n??""),r=le(),L=n?o?o.title||X[o.kind]:null:a??null;return s("div",{className:"@container mf-root mf-island mf-paper mf-beside flex h-full min-h-0 flex-col",children:[s("div",{className:"mf-beside-bar flex items-center gap-2 px-3 py-1.5 text-xs",children:[s("span",{className:"min-w-0 flex-1 truncate",title:L?`\u0427\u0430\u0442 \u0441\u043B\u0435\u0432\u0430 \u2014 \u043E \xAB${L}\xBB, \u044D\u0442\u0430 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0430 \u043E\u0442\u043A\u0440\u044B\u0442\u0430 \u0440\u044F\u0434\u043E\u043C`:"\u0427\u0430\u0442 \u0441\u043B\u0435\u0432\u0430 \u2014 \u043D\u0435 \u043E\u0431 \u044D\u0442\u043E\u0439 \u043A\u0430\u0440\u0442\u043E\u0447\u043A\u0435",children:[e("b",{children:"\u0420\u044F\u0434\u043E\u043C"})," \xB7 \u0447\u0430\u0442 ",L?s(P,{children:["\u043E \xAB",L,"\xBB"]}):"\u043D\u0435 \u043E \u043D\u0435\u0439"]}),e(S,{size:"sm",className:"h-7 flex-none","aria-label":"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439: \u043F\u0435\u0440\u0435\u0439\u0442\u0438 \u0432 \u0435\u0451 \u0447\u0430\u0442",onClick:()=>{r(t)},children:"\u0421\u0434\u0435\u043B\u0430\u0442\u044C \u043E\u0441\u043D\u043E\u0432\u043D\u043E\u0439 \u2192"})]}),e("header",{className:"flex items-center gap-2 border-b border-border px-3 py-2",children:s("div",{className:"min-w-0 flex-1",children:[e(Le,{children:X[t.kind]}),e("div",{className:"truncate text-base font-bold leading-snug",children:t.title||X[t.kind]})]})}),e("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e(Ua,{focus:t,threadId:n})})]})}function z1({threadId:t}){let{focus:n,trail:a,error:o,setFocus:r,back:L,forget:l}=dn(t),[i,m]=f(!1),u=kt();if(n===void 0)return e(Xr,{children:o??"\u041E\u0442\u043A\u0440\u044B\u0432\u0430\u0435\u043C\u2026"});if(!n)return e(Xr,{children:"\u042D\u0442\u043E\u0442 \u0447\u0430\u0442 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043E\u0431\u044A\u0435\u043A\u0442\u0443 Manifest. \u041E\u0431\u044A\u0435\u043A\u0442\u044B \u043E\u0442\u043A\u0440\u044B\u0432\u0430\u044E\u0442\u0441\u044F \u0438\u0437 \u0440\u0430\u0437\u0434\u0435\u043B\u043E\u0432 \xAB\u0410\u0443\u0442\u0440\u0438\u0447\xBB, \xAB\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0430\u0443\u0442\u0440\u0438\u0447\u0430\xBB, \xAB\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430\xBB."});let p=g=>{r(g)};return s("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:[(()=>{let g=Z1[n.kind],b=e(S,{size:"sm",variant:"ghost",className:"h-7 px-2 text-xs",onClick:()=>m(!i),"aria-expanded":i,children:"\u0427\u0430\u0442\u044B"}),c=a.at(-1),h=c?{label:c.title||X[c.kind],go:()=>{L(c)}}:Mn[n.kind]?{label:Mn[n.kind][1],go:()=>u(Mn[n.kind][0])}:null,v=n.title||X[n.kind];return s("header",{className:"flex-none",children:[g?s("div",{className:"mf-surface flex items-center gap-2 border-b border-border px-3 py-1.5",children:[e("span",{className:"min-w-0 flex-1 truncate text-[13px] font-bold",children:g.title}),n.kind===g.hub?b:null]}):null,g&&n.kind!==g.hub?e(rt,{tabs:g.tabs,active:Mn[n.kind]?.[0]??"",onSelect:d=>u(d),label:g.title}):null,g&&n.kind===g.hub?null:h?e(Nn,{back:h.label,onBack:h.go,kind:X[n.kind],title:e("span",{className:"truncate",children:v}),actions:b}):s("div",{className:"mf-surface flex items-center gap-2 border-b border-border px-3 py-1.5",children:[s("div",{className:"min-w-0 flex-1",children:[e(Le,{children:X[n.kind]}),e("div",{className:"truncate text-[13px] font-bold leading-snug",children:v})]}),b]}),i?e("div",{className:"mf-surface border-b border-border px-3",children:e(at,{focus:n,currentThreadId:t})}):null]})})(),e("div",{className:"min-h-0 flex-1 overflow-y-auto",children:e(ts,{focus:n,threadId:t,onOpen:p,onBack:()=>{l(n)}})})]})}function Xr({children:t}){return e("div",{className:"mf-island mf-paper h-full",children:e(D,{children:t})})}function Ua({focus:t,threadId:n}){let a=le();return e(ts,{focus:t,threadId:n,onOpen:o=>{a(o)},onBack:()=>{}})}function ts({focus:t,threadId:n,onOpen:a,onBack:o}){switch(t.kind){case"mail":return e(Aa,{});case"needs":return e(Jr,{});case"company":return e(wt,{companyId:t.id,embedded:!0},t.id);case"mailing":return e("div",{className:"p-2",children:e(wr,{id:t.id,onOpenCompany:r=>a({kind:"company",id:r,title:""}),onDeleted:o,embedded:!0},t.id)});case"template":return e(Sr,{templateId:t.id.startsWith("new-")?null:t.id,threadId:n,embedded:!0},t.id);case"topic":return e(Ma,{topicId:t.id||n||null,threadId:n,onOpenCompany:r=>a({kind:"company",id:r,title:""})});case"inbound":return e(Mr,{id:t.id,embedded:!0,onLinked:r=>a({kind:"company",id:r.id,title:r.name})},t.id)}}function at({focus:t,currentThreadId:n}){let a=ee(),o=ae(),r=Q2(),[L,l]=f(null),[i,m]=f(null);return w(()=>{a.call("chats_list",{kind:t.kind,id:t.id}).then(u=>l(u.chats),u=>m(C(u)))},[t.id,t.kind,a]),s("div",{className:"flex flex-col gap-2 py-1 text-xs",children:[i?e("p",{className:"text-destructive",children:i}):null,L===null?e("p",{className:"text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"}):L.length===0?e("p",{className:"text-muted-foreground",children:"\u0427\u0430\u0442\u043E\u0432 \u043F\u043E\u043A\u0430 \u043D\u0435\u0442."}):e("ul",{className:"flex flex-col",children:L.map(u=>e("li",{children:s("button",{type:"button",disabled:u.threadId===n,onClick:()=>o.toThread(u.threadId),className:k("w-full truncate rounded px-2 py-1.5 text-left hover:bg-state-hover",u.threadId===n&&"font-semibold"),children:[u.title,u.threadId===n?" \xB7 \u044D\u0442\u043E\u0442":""]})},u.threadId))}),e(F1,{draftKey:`manifest-new-${t.kind}-${t.id}`,placeholder:`\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442: ${t.title||X[t.kind]}`,onSubmit:u=>{r(t,u).catch(p=>m(C(p)))}})]})}var es="manifest:panel-opened:";function ns({threadId:t,isCompactViewport:n}){let{focus:a}=dn(t);un(t);let o=Je();return w(()=>U2(t,a?.kind==="topic",a?.kind==="mail",a?.kind==="needs"),[t,a]),w(()=>{if(!a||n)return;let r=!1;try{r=window.sessionStorage.getItem(es+t)==="1"}catch{r=!1}if(!r&&o(a.title||X[a.kind]))try{window.sessionStorage.setItem(es+t,"1")}catch{}},[a?.kind,a?.id,t]),se(va,r=>{let L=r;L?.threadId!==t||L.open!==!0||!L.focus||n||o(L.focus.title||X[L.focus.kind])}),a?s(S,{size:"sm",variant:"ghost",className:"mf-focus-button h-8 max-w-[16rem] gap-1 px-2 text-xs","aria-label":`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430: ${X[a.kind]} ${a.title}`,onClick:()=>o(a.title||X[a.kind]),children:[e("span",{className:"text-muted-foreground",children:n?"\u25E7":`${X[a.kind]}:`}),n?null:e("span",{className:"truncate",children:a.title||"\u2014"})]}):null}function as({subPath:t}){let n=t.split("/")[0]??"",a=ae(),o=Qe();return w(()=>{tn(),!n&&o("outreach").then(r=>{r==="none"&&a.toCompose()})},[n,a,o]),n?t.split("/")[1]==="full"?e(U1,{companyId:n},n):e(j1,{companyId:n},n):e("div",{className:"@container mf-root mf-island mf-paper flex h-full min-h-0 flex-col",children:e("div",{className:"mf-card mx-auto my-3 min-h-0 w-full max-w-3xl flex-1 overflow-hidden",children:e(Qt,{})})})}function j1({companyId:t}){let{status:n}=H(),a=ct(),o=E(),[r,L]=f("");return w(()=>{a.select(t)},[t]),w(()=>{n?.connected&&o("outreach_get_company",{id:t}).then(l=>L(l.company?.display_name??""),()=>{})},[t,n?.connected,o]),n&&!n.connected?e(D,{children:n.message}):e("div",{className:"@container mf-island mf-paper h-full min-h-0",children:s("div",{className:"flex h-full min-h-0 flex-col @4xl:flex-row",children:[e("main",{className:"flex min-h-0 flex-1 flex-col justify-end overflow-y-auto p-4",children:s("div",{className:"mx-auto flex w-full max-w-2xl flex-col gap-2",children:[e(Le,{children:"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F"}),e("h2",{className:"m-0 text-lg font-bold leading-snug",children:r||"\u2026"}),e(at,{focus:{kind:"company",id:t,title:r.slice(0,200)}})]})}),e("aside",{className:"min-h-0 border-t border-border @4xl:w-[400px] @4xl:flex-none @4xl:border-l @4xl:border-t-0",children:e(wt,{companyId:t,embedded:!0})})]})})}function U1({companyId:t}){let{status:n}=H(),a=ct();return w(()=>{a.select(t)},[t]),n&&!n.connected?e(D,{children:n.message}):e("div",{className:"@container mf-island mf-paper h-full min-h-0 overflow-y-auto",children:s("div",{className:"mx-auto flex max-w-6xl flex-col gap-4 p-3 @4xl:flex-row",children:[e("div",{className:"min-w-0 flex-1",children:e(wt,{companyId:t})}),s("aside",{className:"mf-card flex w-full flex-col gap-2 self-start p-3 @4xl:w-96 @4xl:flex-none",children:[e("h3",{className:"text-[13px] font-bold",children:"\u0427\u0430\u0442\u044B \u043F\u043E \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438"}),e(at,{focus:{kind:"company",id:t,title:""}})]})]})})}function rs(){let t=z2();return t?e("span",{className:"inline-flex h-4 min-w-4 items-center justify-center rounded-full bg-destructive/15 px-1 text-[10px] font-semibold text-destructive",title:"\u0416\u0434\u0443\u0442 \u043D\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0432\u0435\u0442\u0430 \u0438 \u043F\u0440\u043E\u0441\u0440\u043E\u0447\u0435\u043D\u043E",children:t}):null}function ss(t,n){let a=j(null);w(()=>()=>{a.current&&clearTimeout(a.current)},[]),se(t,()=>{a.current&&clearTimeout(a.current),a.current=setTimeout(n,600+Math.random()*600)})}var K1=new Set(["priorities","statuses","tags","ids"]),G1=new Set(["stale_days"]),q1=new Set(["never_touched","has_phone","has_email","has_person"]),V1=new Set(["q","region","country","owner","attention","brand","segment_id"]);function W1(t){let n={};for(let[a,o]of Object.entries(t)){let r=String(o).trim().slice(0,2e3);if(r)if(K1.has(a)){let L=r.split(",").map(l=>l.trim()).filter(Boolean).slice(0,200);n[a]=a==="priorities"?L.map(Number).filter(l=>Number.isInteger(l)&&l>=1&&l<=5):L}else if(G1.has(a)){let L=Number(r);Number.isFinite(L)&&L>0&&(n[a]=Math.floor(L))}else q1.has(a)?n[a]=r==="true"||r==="1":V1.has(a)&&(n[a]=r)}return Me(n)}function Rn({title:t,children:n,actions:a}){return s("div",{"data-bb-plugin":"manifest",className:"mf-island mf-chip my-2 text-sm",children:[s("div",{className:"flex items-center justify-between gap-2 border-b border-[var(--mf-line-200)] px-3 py-1.5",children:[s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e(De,{}),e("span",{className:"truncate text-[13px] font-semibold",children:t})]}),e("span",{className:"flex flex-none gap-1",children:a})]}),e("div",{className:"px-3 py-2",children:n})]})}function os({attributes:t,message:n}){let a=E(),o=ee(),r=ae(),L=Je(),l=(y,I)=>{o.call("focus_set",{threadId:n.threadId,focus:{kind:"company",id:y,title:I.slice(0,200)}}).then(()=>L(I||X.company)).catch(T=>g(C(T)))},{status:i}=H(),[m,u]=f(null),[p,g]=f(null),b=W1(t),c=JSON.stringify(b),h=(t.title??"").slice(0,120)||"\u041E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0438",v=R(()=>{i?.connected&&a("outreach_list_companies",{...JSON.parse(c),sort:t.sort||void 0,limit:25}).then(y=>{u(y),g(null)},y=>g(C(y)))},[t.sort,c,i?.connected,a]);w(v,[v]),ss(Ve,v);let[d,x]=f(!1);w(()=>{let y=!0;return o.call("topic_filter_get",{threadId:n.threadId}).then(()=>y&&x(!0),()=>y&&x(!1)),()=>{y=!1}},[n.threadId,o]);let _=async()=>{try{await o.call("topic_filter_set",{threadId:n.threadId,filter:JSON.parse(c)}),r.toPluginPanel(xt,{subPath:n.threadId})}catch(y){g(C(y))}};return s(Rn,{title:m?`${h} \xB7 ${m.total}`:h,actions:d?e(S,{size:"sm",variant:"ghost",className:"h-6 px-2 text-xs",onClick:()=>{_()},children:"\u041F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u043D\u0430 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0435"}):null,children:[p?e("p",{className:"text-xs text-destructive",children:p}):null,m?m.items.length===0?e("p",{className:"text-xs text-muted-foreground",children:"\u041D\u0438\u043A\u043E\u0433\u043E \u043F\u043E \u044D\u0442\u043E\u043C\u0443 \u0444\u0438\u043B\u044C\u0442\u0440\u0443."}):e("ul",{className:"flex flex-col",children:m.items.map(y=>{let I=y.next_action,T=I?qe(I.due_on)<0:!1;return e("li",{children:s("button",{type:"button",onClick:()=>l(y.id,y.display_name),className:"flex w-full items-center gap-2 rounded-md px-1 py-0.5 text-left text-xs hover:bg-state-hover",children:[e(Se,{priority:y.priority}),e("span",{className:"min-w-0 flex-1 truncate",children:y.display_name}),e("span",{className:"flex-none text-muted-foreground",children:F(y.country_code)}),e("span",{className:"w-28 flex-none truncate text-muted-foreground",children:oe[y.status]??y.status}),s("span",{className:k("inline-flex w-24 flex-none items-center justify-end gap-1 truncate text-right",T?"text-destructive":"text-muted-foreground"),children:[T?e(ge,{tone:"error"}):null,I?`\u0448\u0430\u0433 ${ye(I.due_on)}`:y.last_touch_at?`\u043A\u0430\u0441\u0430\u043D\u0438\u0435 ${ye(y.last_touch_at)}`:"\u0431\u0435\u0437 \u043A\u0430\u0441\u0430\u043D\u0438\u0439"]})]})},y.id)})}):e("p",{className:"text-xs text-muted-foreground",children:"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"}),m&&m.total>m.items.length?s("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["\u041F\u043E\u043A\u0430\u0437\u0430\u043D\u044B ",m.items.length," \u0438\u0437 ",m.total,". \u041F\u043E\u043B\u043D\u044B\u0439 \u0441\u043F\u0438\u0441\u043E\u043A \u2014 \u043D\u0430 \u0434\u0430\u0448\u0431\u043E\u0440\u0434\u0435."]}):null]})}var Y1={preview:"\u0436\u0434\u0451\u0442 \u043F\u043E\u0434\u0442\u0432\u0435\u0440\u0436\u0434\u0435\u043D\u0438\u044F",applying:"\u043F\u0440\u0438\u043C\u0435\u043D\u044F\u0435\u0442\u0441\u044F\u2026",applied:"\u043F\u0440\u0438\u043C\u0435\u043D\u0435\u043D\u0430",reverted:"\u043E\u0442\u043A\u0430\u0447\u0435\u043D\u0430",expired:"\u043F\u0440\u0435\u0434\u043F\u0440\u043E\u0441\u043C\u043E\u0442\u0440 \u0443\u0441\u0442\u0430\u0440\u0435\u043B"};function Ls({attributes:t}){let n=E(),{status:a}=H(),o=(t.id??"").trim().slice(0,64),[r,L]=f(null),[l,i]=f(null),[m,u]=f(!1),[p,g]=f(!1),[b,c]=f(!1),h=R(()=>{!o||!a?.connected||n("outreach_batch_get",{id:o}).then(T=>{L(T),i(null)},T=>i(C(T)))},[o,a?.connected,n]);w(h,[h]),ss(Ve,h);let v=async T=>{u(!0);try{L(await n(T,{id:o})),i(null)}catch($){i(C($))}finally{u(!1),g(!1)}};if(!o)return e(Rn,{title:"\u041F\u0430\u0447\u043A\u0430",children:"\u041D\u0435\u0442 id \u043F\u0430\u0447\u043A\u0438."});if(!r)return e(Rn,{title:"\u041F\u0430\u0447\u043A\u0430",children:l??"\u0417\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026"});let d=r.items.filter(T=>!T.skip),x=r.items.filter(T=>T.skip),_=b?d:d.slice(0,8),y=r.result.filter(T=>!T.ok),I=!!a?.canManage;return s(Rn,{title:`\u041F\u0430\u0447\u043A\u0430: ${r.summary}`,actions:e("span",{className:"text-[11px] text-muted-foreground",children:Y1[r.state]}),children:[s("p",{className:"text-xs",children:["\u0418\u0437\u043C\u0435\u043D\u0438\u0442\u0441\u044F \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u0439: ",e("b",{children:r.count}),r.skipped?` \xB7 \u043F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u043E: ${r.skipped}`:""]}),e("ul",{className:"mt-1 flex flex-col gap-0.5 text-xs",children:_.map(T=>s("li",{className:"rounded bg-muted/40 px-2 py-0.5",children:[e("span",{className:"font-medium",children:T.name}),T.changes.map(($,M)=>s("span",{className:"text-muted-foreground",children:[" \xB7 ",Vt[$.field]??$.field,": ",Ge($.field,$.old)," \u2192 ",Ge($.field,$.new)]},M))]},T.company_id))}),d.length>_.length?s("button",{type:"button",className:"mt-1 text-[11px] text-muted-foreground underline-offset-2 hover:underline",onClick:()=>c(!0),children:["\u043F\u043E\u043A\u0430\u0437\u0430\u0442\u044C \u0432\u0441\u0435 ",d.length]}):null,x.length>0?s("p",{className:"mt-1 text-[11px] text-muted-foreground",children:["\u041F\u0440\u043E\u043F\u0443\u0449\u0435\u043D\u044B: ",x.slice(0,5).map(T=>`${T.name||T.company_id} (${T.skip})`).join("; "),x.length>5?` \u0438 \u0435\u0449\u0451 ${x.length-5}`:""]}):null,y.length>0?s("p",{className:"mt-1 text-xs text-destructive",children:["\u041D\u0435 \u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B\u043E\u0441\u044C: ",y.map(T=>`${T.name||T.company_id}: ${T.error}`).join("; ")]}):null,l?e("p",{className:"mt-1 text-xs text-destructive",children:l}):null,s("div",{className:"mt-2 flex items-center gap-2",children:[r.state==="preview"&&I?s(P,{children:[s(S,{size:"sm",className:"h-7",disabled:m||r.count===0,onClick:()=>{v("outreach_batch_apply")},children:["\u041F\u0440\u0438\u043C\u0435\u043D\u0438\u0442\u044C \u043A ",r.count]}),s("span",{className:"text-[11px] text-muted-foreground",children:["\u0434\u043E ",q(r.expires_at)]})]}):null,r.state==="applied"&&I?p?s(P,{children:[e(S,{size:"sm",variant:"destructive",className:"h-7",disabled:m,onClick:()=>{v("outreach_batch_revert")},children:"\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C \u043F\u0430\u0447\u043A\u0443"}),e(S,{size:"sm",variant:"ghost",className:"h-7",onClick:()=>g(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}):e(S,{size:"sm",variant:"outline",className:"h-7",onClick:()=>g(!0),children:"\u041E\u0442\u043A\u0430\u0442\u0438\u0442\u044C\u2026"}):null,r.state==="applied"?s("span",{className:"text-[11px] text-muted-foreground",children:["\u043F\u0440\u0438\u043C\u0435\u043D\u0438\u043B ",r.applied_by," \xB7 ",q(r.applied_at)]}):null]})]})}var An=/^[0-9a-f-]{36}$/i;function En({title:t,detail:n,tone:a,threadId:o,focus:r,sandbox:L,badge:l,extra:i,actions:m}){let u=ee(),p=Je(),[g,b]=f(null),[c,h]=f(!1),v=async()=>{try{await u.call("focus_set",{threadId:o,focus:r}),p(r.title||X[r.kind]),b(null),h(!1)}catch(x){b(C(x))}},d=async()=>{try{let x=await u.call("focus_get",{threadId:o});[...x.trail,...x.focus?[x.focus]:[]].some(y=>y.kind===r.kind&&y.id===r.id)?await v():h(!0)}catch(x){b(C(x))}};return s(k2,{sandbox:L,className:"w-[min(100%,34rem)]",children:[s("button",{type:"button",onClick:()=>{d()},className:"flex w-full min-w-0 items-center gap-2 rounded text-left hover:bg-state-hover",children:[e(De,{}),s("span",{className:"min-w-0 flex-1",children:[s("span",{className:"flex min-w-0 items-center gap-1.5",children:[e("span",{className:"min-w-0 flex-1 truncate text-[13px] font-semibold",children:t}),l]}),e(J,{tone:a,className:"max-w-full truncate text-xs text-[var(--mf-ink-700)]",children:n})]}),e("span",{className:"flex-none self-end text-muted-foreground",children:"\u043E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430 \u2192"})]}),i,m,c?e(be,{title:`\u041E\u0442\u043A\u0440\u044B\u0442\u044C \u0441\u043F\u0440\u0430\u0432\u0430 ${X[r.kind].toLowerCase()} \xAB${r.title||t}\xBB?`,actions:s(P,{children:[e("button",{type:"button",className:"h-7 rounded-md bg-foreground px-2.5 font-semibold text-background",onClick:()=>{v()},children:"\u041E\u0442\u043A\u0440\u044B\u0442\u044C"}),e("button",{type:"button",className:"h-7 rounded-md px-2.5 hover:bg-state-hover",onClick:()=>h(!1),children:"\u041E\u0442\u043C\u0435\u043D\u0430"})]}),children:e("span",{children:"\u0412 \u044D\u0442\u043E\u043C \u0447\u0430\u0442\u0435 \u0430\u0433\u0435\u043D\u0442 \u0441\u043C\u043E\u0436\u0435\u0442 \u0435\u0451 \u043C\u0435\u043D\u044F\u0442\u044C."})}):null,g?e("span",{className:"text-[11px] text-destructive",children:g}):null]})}function J1(t){let n=E(),[a,o]=f("");return w(()=>{An.test(t)&&n("outreach_get_company",{id:t}).then(r=>o(r.company?.display_name??""),()=>{})},[t,n]),a}function ls(t){let n=(t.attributes.id??"").trim();return An.test(n)?e(is,{id:n,threadId:t.message.threadId}):e(Q1,{...t})}function Q1({attributes:t,message:n}){let a=(t.company??"").trim(),o=An.test(a),{letter:r,none:L,error:l,reload:i}=pn(o?a:""),m=J1(o?a:""),[u,p]=f(null);if(!o)return e("span",{className:"text-xs text-muted-foreground",children:"\u041F\u0438\u0441\u044C\u043C\u043E: \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D\u0430 \u043E\u0440\u0433\u0430\u043D\u0438\u0437\u0430\u0446\u0438\u044F."});if(u)return e(is,{id:u,threadId:n.threadId});let g=l||(L?"\u0447\u0435\u0440\u043D\u043E\u0432\u0438\u043A\u0430 \u043D\u0435\u0442":r?r.preview.problems.length?`\u043D\u0435 \u0443\u0439\u0434\u0451\u0442: ${r.preview.problems[0]}`:`\u0433\u043E\u0442\u043E\u0432\u043E \xB7 ${r.preview.to} \xB7 \u043E\u0442 ${r.preview.from_name||r.preview.from}`:"\u0441\u043E\u0431\u0438\u0440\u0430\u0435\u043C\u2026");return e(En,{title:`\u041F\u0438\u0441\u044C\u043C\u043E${m?` \u0434\u043B\u044F \xAB${m}\xBB`:""}${r?`: ${r.preview.subject}`:""}`,detail:g,tone:l?"error":r&&!r.preview.problems.length?"ok":r?"warning":"muted",threadId:n.threadId,focus:{kind:"company",id:a,title:m.slice(0,200)},sandbox:!!r?.preview.sender?.legal_entity?.sandbox,actions:r&&!r.preview.problems.length?e(fn,{letter:r,companyId:a,compact:!0,onSent:b=>{p(b.id),i()}}):null})}function is({id:t,threadId:n}){let{letter:a,error:o,setLetter:r}=Na(t);return a?e(En,{title:`\u041F\u0438\u0441\u044C\u043C\u043E${a.company_name?` \u0434\u043B\u044F \xAB${a.company_name}\xBB`:""}: ${a.subject}`,detail:e(gn,{letter:a}),tone:a.tone,threadId:n,focus:{kind:"company",id:a.company_id??"",title:a.company_name.slice(0,200)},sandbox:a.sandbox,badge:a.replies.length?e(V,{tone:"volt",children:"\u043E\u0442\u0432\u0435\u0442"}):null,actions:a.cancellable?e(ka,{letter:a,onDone:r}):null}):e(En,{title:"\u041F\u0438\u0441\u044C\u043C\u043E",detail:o??"\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026",tone:o?"error":"muted",threadId:n,focus:{kind:"company",id:"",title:""}})}function cs({attributes:t,message:n}){let a=(t.id??"").trim(),o=An.test(a),{mailing:r,error:L}=Ta(o?a:"");if(!o)return e("span",{className:"text-xs text-muted-foreground",children:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430: \u043D\u0435 \u0443\u043A\u0430\u0437\u0430\u043D id."});let l=r?bn(r):null;return e(En,{title:r?`\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430 \xAB${r.name}\xBB`:"\u0420\u0430\u0441\u0441\u044B\u043B\u043A\u0430",detail:L??l?.text??"\u0437\u0430\u0433\u0440\u0443\u0436\u0430\u0435\u043C\u2026",tone:L?"error":l?.tone??"muted",threadId:n.threadId,focus:{kind:"mailing",id:a,title:r?.name??""},sandbox:r?.mode==="sandbox"||!!r?.progress?.sandbox,badge:r?.progress?.replies?s(V,{tone:"volt",children:["\u043E\u0442\u0432\u0435\u0442\u043E\u0432 ",r.progress.replies]}):null,extra:r&&(r.state==="done"||r.state==="stopped")?e(Ca,{m:r}):null,actions:r&&(r.state==="draft"||r.state==="sending")?e(xn,{mailing:r}):null})}var Ka="company-new";function ds(){let[t,n]=f(()=>ua());return w(()=>{let a=()=>n(ua());return window.addEventListener(ht,a),()=>window.removeEventListener(ht,a)},[]),[t,n]}function us(t){return(t.kind==="topic"||t.kind==="mail"||t.kind==="needs"?X[t.kind]:t.title||X[t.kind]).slice(0,60)}function ms(){let t=ee(),n=ae(),a=Wa(),[o,r]=ds();un(null);let L=j("");if(w(()=>{if(!o)return;let i=`${o.kind}:${o.id}`;L.current!==i&&(L.current=i,n.openThreadPanel({actionId:Ka,title:us(o),params:{v:1}}))},[o,n]),w(()=>{if(o)return a.onSubmitted(()=>{ma(),t.call("compose_submitted",{kind:o.kind,id:o.id,title:o.title.slice(0,200)}),r(null)})},[a,o,t,r]),!o)return null;let l=o.kind==="topic"||o.kind==="mail"||o.kind==="needs"?X[o.kind].toLowerCase():o.title||X[o.kind].toLowerCase();return s("div",{className:"mf-island flex items-center gap-2 px-2 py-1 text-xs",children:[e(De,{}),s("span",{className:"min-w-0 flex-1 truncate",children:["\u041D\u043E\u0432\u044B\u0439 \u0447\u0430\u0442: ",e("b",{children:l})]}),e("button",{type:"button","aria-label":"\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C \u0447\u0430\u0442",title:"\u041D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u044B\u0432\u0430\u0442\u044C \u0447\u0430\u0442",className:"rounded px-1.5 hover:bg-state-hover",onClick:()=>ma(),children:"\xD7"})]})}function Ga({params:t}){let[n]=ds(),a=za(t);return a?e(ja,{pin:a,mainTitle:n?us(n):null}):n?e("div",{className:"h-full min-h-0 overflow-y-auto",children:e(Ua,{focus:{kind:n.kind,id:n.id,title:n.title}},`${n.kind}:${n.id}`)}):e("p",{className:"p-3 text-xs text-muted-foreground",children:"\u0427\u0430\u0442 \u043D\u0435 \u043F\u0440\u0438\u0432\u044F\u0437\u0430\u043D \u043A \u043E\u0431\u044A\u0435\u043A\u0442\u0443 Manifest."})}var Wc=qa(t=>{t.slots.navPanel({id:u2,title:"\u0410\u0443\u0442\u0440\u0438\u0447",icon:"Globe",path:Wn,component:as}),t.slots.navPanel({id:$2,title:"\u0414\u0430\u0448\u0431\u043E\u0440\u0434 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",icon:"manifest/dashboard",path:xt,component:_r,experimental_sidebarAccessory:rs}),t.slots.navPanel({id:q2,title:"\u041F\u043E\u0447\u0442\u0430 \u0430\u0443\u0442\u0440\u0438\u0447\u0430",icon:"Mail",path:Te,component:Rr}),t.slots.navPanel({id:W2,title:"\u0417\u0430\u043A\u0443\u043F\u043E\u0447\u043D\u044B\u0439 \u043B\u0438\u0441\u0442",icon:"manifest/procurement",path:xa,component:Yr}),t.slots.messageDirective({id:"manifest-companies",component:os}),t.slots.messageDirective({id:"manifest-batch",component:Ls}),t.slots.messageDirective({id:"manifest-letter",component:ls}),t.slots.messageDirective({id:"manifest-mailing",component:cs}),t.slots.experimental_threadList({id:"suppliers",title:"\u041F\u043E\u0442\u0435\u043D\u0446\u0438\u0430\u043B\u044C\u043D\u044B\u0435 \u043F\u043E\u0441\u0442\u0430\u0432\u0449\u0438\u043A\u0438",description:"\u0420\u0435\u0435\u0441\u0442\u0440 Manifest \u0432\u043C\u0435\u0441\u0442\u043E \u0441\u043F\u0438\u0441\u043A\u0430 \u0442\u0440\u0435\u0434\u043E\u0432; \u043A\u043D\u043E\u043F\u043A\u0430 \u0432 \u043F\u043E\u0434\u0432\u0430\u043B\u0435 \u0432\u043E\u0437\u0432\u0440\u0430\u0449\u0430\u0435\u0442 \u043F\u0440\u0435\u0436\u043D\u0438\u0439 \u0441\u043F\u0438\u0441\u043E\u043A.",component:O2}),t.slots.experimental_appOverlay({id:"suppliers-switch",component:I2}),t.experimental_sidebarFooter.register({kind:"action",id:"suppliers",label:R2,icon:"manifest/suppliers",onActivate:B2}),t.slots.threadPanelAction({id:ya,title:"Manifest",icon:"manifest/id-card",layout:"flush",component:Ha}),t.slots.experimental_threadHeaderAction({id:"focus",title:"\u041E\u0431\u044A\u0435\u043A\u0442 Manifest",component:ns}),t.slots.experimental_newThreadPanelAction({id:Ka,title:"Manifest",icon:"manifest/id-card",layout:"flush",component:Ga}),t.slots.threadPanelAction({id:yt,title:"Manifest \xB7 \u0440\u044F\u0434\u043E\u043C",icon:"manifest/id-card",layout:"flush",component:Ha}),t.slots.experimental_newThreadPanelAction({id:_t,title:"Manifest \xB7 \u0440\u044F\u0434\u043E\u043C",icon:"manifest/id-card",layout:"flush",component:Ga}),t.composer.customize({id:"company-intent",scopes:["new-thread"],banners:[{id:"company",chrome:"bare",component:ms}]}),t.slots.settingsSection({id:"connect",title:"\u041F\u043E\u0434\u043A\u043B\u044E\u0447\u0435\u043D\u0438\u0435 \u043A Manifest",description:"\u0412\u0445\u043E\u0434 \u043F\u043E email \u0438 \u043F\u0430\u0440\u043E\u043B\u044E \u0434\u043B\u044F \u043F\u043B\u0430\u0433\u0438\u043D\u0430; \u0434\u0430\u043D\u043D\u044B\u0435 \u0438 \u043F\u0440\u0430\u0432\u0430 \u2014 \u0432 Manifest.",component:p2})});export{Wc as default};