@redneckz/wildless-cms-uni-blocks 0.14.588 → 0.14.590
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/bundle/api/RetailApi/RetailApi.d.ts +3 -1
- package/bundle/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/bundle/blocks.schema.json +1 -1
- package/bundle/bundle.umd.js +187 -59
- package/bundle/bundle.umd.min.js +1 -1
- package/bundle/hooks/useElementSpace.d.ts +2 -0
- package/bundle/icons/IconName.d.ts +4 -2
- package/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/bundle/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/cosmos-static/icons/RefreshIcon.svg +1 -0
- package/cosmos-static/icons/sprites.svg +1 -0
- package/dist/api/RetailApi/RetailApi.d.ts +3 -1
- package/dist/api/RetailApi/RetailApi.js +15 -1
- package/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/dist/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/dist/hooks/useElementSpace.d.ts +2 -0
- package/dist/hooks/useElementSpace.js +21 -0
- package/dist/hooks/useElementSpace.js.map +1 -0
- package/dist/icons/IconName.d.ts +4 -2
- package/dist/icons/IconName.js +3 -1
- package/dist/icons/IconName.js.map +1 -1
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +22 -0
- package/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/dist/ui-kit/CaptchaDialog/checkCaptcha.js +16 -0
- package/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/dist/ui-kit/CaptchaDialog/createCaptcha.js +9 -0
- package/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +15 -0
- package/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/dist/ui-kit/DatePicker/DatePicker.js +5 -1
- package/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -29
- package/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +21 -0
- package/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +59 -0
- package/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/lib/api/RetailApi/RetailApi.d.ts +3 -1
- package/lib/api/RetailApi/RetailApi.js +15 -1
- package/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/lib/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/lib/common.css +1 -1
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/lib/components/OfficesAtmsMap/OfficesAtmsMapLayout.d.ts +1 -1
- package/lib/hooks/useElementSpace.d.ts +2 -0
- package/lib/hooks/useElementSpace.js +18 -0
- package/lib/hooks/useElementSpace.js.map +1 -0
- package/lib/icons/IconName.d.ts +4 -2
- package/lib/icons/IconName.js +3 -1
- package/lib/icons/IconName.js.map +1 -1
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.fixture.d.ts +6 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +20 -0
- package/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/lib/ui-kit/CaptchaDialog/checkCaptcha.js +13 -0
- package/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/lib/ui-kit/CaptchaDialog/createCaptcha.js +6 -0
- package/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +12 -0
- package/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/lib/ui-kit/DatePicker/DatePicker.js +5 -1
- package/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +21 -30
- package/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +18 -0
- package/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +56 -0
- package/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/mobile/bundle/api/RetailApi/RetailApi.d.ts +3 -1
- package/mobile/bundle/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/mobile/bundle/bundle.umd.js +187 -59
- package/mobile/bundle/bundle.umd.min.js +1 -1
- package/mobile/bundle/hooks/useElementSpace.d.ts +2 -0
- package/mobile/bundle/icons/IconName.d.ts +4 -2
- package/mobile/bundle/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/mobile/bundle/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/mobile/bundle/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/mobile/dist/api/RetailApi/RetailApi.d.ts +3 -1
- package/mobile/dist/api/RetailApi/RetailApi.js +15 -1
- package/mobile/dist/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/dist/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/mobile/dist/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/dist/hooks/useElementSpace.d.ts +2 -0
- package/mobile/dist/hooks/useElementSpace.js +21 -0
- package/mobile/dist/hooks/useElementSpace.js.map +1 -0
- package/mobile/dist/icons/IconName.d.ts +4 -2
- package/mobile/dist/icons/IconName.js +3 -1
- package/mobile/dist/icons/IconName.js.map +1 -1
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js +22 -0
- package/mobile/dist/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js +16 -0
- package/mobile/dist/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js +9 -0
- package/mobile/dist/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js +15 -0
- package/mobile/dist/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js +5 -1
- package/mobile/dist/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/mobile/dist/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +20 -29
- package/mobile/dist/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js +21 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +59 -0
- package/mobile/dist/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/mobile/lib/api/RetailApi/RetailApi.d.ts +3 -1
- package/mobile/lib/api/RetailApi/RetailApi.js +15 -1
- package/mobile/lib/api/RetailApi/RetailApi.js.map +1 -1
- package/mobile/lib/api/RetailApi/RetailApiTypes.d.ts +3 -0
- package/mobile/lib/common.css +1 -1
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js +3 -4
- package/mobile/lib/components/ApplicationLeadForm/useApplicationLeadApi.js.map +1 -1
- package/mobile/lib/hooks/useElementSpace.d.ts +2 -0
- package/mobile/lib/hooks/useElementSpace.js +18 -0
- package/mobile/lib/hooks/useElementSpace.js.map +1 -0
- package/mobile/lib/icons/IconName.d.ts +4 -2
- package/mobile/lib/icons/IconName.js +3 -1
- package/mobile/lib/icons/IconName.js.map +1 -1
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.d.ts +7 -0
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js +20 -0
- package/mobile/lib/ui-kit/CaptchaDialog/CaptchaDialog.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.d.ts +8 -0
- package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js +13 -0
- package/mobile/lib/ui-kit/CaptchaDialog/checkCaptcha.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.d.ts +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js +6 -0
- package/mobile/lib/ui-kit/CaptchaDialog/createCaptcha.js.map +1 -0
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.d.ts +6 -0
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js +12 -0
- package/mobile/lib/ui-kit/CaptchaDialog/useCaptchaDialog.js.map +1 -0
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js +5 -1
- package/mobile/lib/ui-kit/DatePicker/DatePicker.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.d.ts +1 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js +2 -2
- package/mobile/lib/ui-kit/VerifyPhoneDialog/InputCode.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.d.ts +3 -3
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js +21 -30
- package/mobile/lib/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.d.ts +15 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js +18 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/handleSendCode.js.map +1 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.js.map +1 -1
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.d.ts +16 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js +56 -0
- package/mobile/lib/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.js.map +1 -0
- package/mobile/src/api/RetailApi/RetailApi.ts +18 -1
- package/mobile/src/api/RetailApi/RetailApiTypes.ts +4 -0
- package/mobile/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -4
- package/mobile/src/hooks/useElementSpace.ts +25 -0
- package/mobile/src/icons/IconName.ts +5 -5
- package/mobile/src/icons/RefreshIcon.svg +3 -0
- package/mobile/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +68 -0
- package/mobile/src/ui-kit/CaptchaDialog/checkCaptcha.ts +25 -0
- package/mobile/src/ui-kit/CaptchaDialog/createCaptcha.ts +6 -0
- package/mobile/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +12 -0
- package/mobile/src/ui-kit/DatePicker/DatePicker.tsx +9 -1
- package/mobile/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +3 -2
- package/mobile/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +66 -51
- package/mobile/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +37 -0
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +2 -1
- package/mobile/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +71 -0
- package/package.json +2 -2
- package/src/api/RetailApi/RetailApi.ts +18 -1
- package/src/api/RetailApi/RetailApiTypes.ts +4 -0
- package/src/components/ApplicationLeadForm/useApplicationLeadApi.ts +3 -4
- package/src/hooks/useElementSpace.ts +25 -0
- package/src/icons/IconName.ts +353 -6
- package/src/icons/RefreshIcon.svg +3 -0
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.fixture.tsx +11 -0
- package/src/ui-kit/CaptchaDialog/CaptchaDialog.tsx +68 -0
- package/src/ui-kit/CaptchaDialog/checkCaptcha.ts +25 -0
- package/src/ui-kit/CaptchaDialog/createCaptcha.ts +6 -0
- package/src/ui-kit/CaptchaDialog/useCaptchaDialog.tsx +12 -0
- package/src/ui-kit/DatePicker/DatePicker.tsx +9 -1
- package/src/ui-kit/VerifyPhoneDialog/InputCode.tsx +3 -2
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.fixture.tsx +11 -8
- package/src/ui-kit/VerifyPhoneDialog/VerifyPhoneDialog.tsx +66 -51
- package/src/ui-kit/VerifyPhoneDialog/handleSendCode.ts +37 -0
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialog.tsx +2 -1
- package/src/ui-kit/VerifyPhoneDialog/useVerifyPhoneDialogSubmit.tsx +71 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:u("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),_=e=>Boolean(e?.includes(":")),A=(e,t)=>Boolean(e&&!_(e)&&(!t||"_self"===t)),F=e=>Boolean(e?.startsWith("#")),O=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:_,isLocalURL:A,isHash:F,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:O,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,_(t),F(t),[z.CDN,L].some((e=>E(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${$}/${t}/attachment`;const l=t?.startsWith("/");return O(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(O(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!_(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function ue(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&A(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=fe(e)&&"hidden lg:block";return c("div",{className:u(ge(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,fe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:u(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=ue()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=V(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>u(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),_e=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),Ae=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),Fe=d((({isTabularBenefits:e,...t})=>o(e?Ae:_e,{...t}))),Oe=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(je(n))}):null,je=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Le(a,r),d=Le(i,r);return l||a?.icon?o(be,{className:u("basis-full @lg:basis-auto",e),appendLeft:$e({...a,iconVersion:c}),appendRight:$e({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Le=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},$e=e=>Oe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(We)}):null)),We=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(Fe,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ke[i]}):null,T,f?.length?o(qe,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ut(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ht=ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ht,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Mt(this),[()=>!0,e]])}}const Mt=e=>[...e?.parent?Mt(e.parent):[],e.entry],Rt=e=>{const t=e.target?.closest("a");if(_(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Ct();if(!_(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Vt(t?.target)?.(n)}}},Vt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Dt(){return Dt._impl()}Dt._impl=()=>({forwardQuery:Rt}),Dt.setup=e=>{Dt._impl=e};const zt=e=>e,_t=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return At(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},At=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ft=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ot=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Et=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jt=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Lt="/api/v1/outservice/outserviceregions",$t=e=>"OUTSERVICE"===e?Lt:void 0,Ut=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),qt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Wt="appearance-none w-5 h-5 border-solid flex-none",Ht=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Yt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(qt,{paths:Ht,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:u("flex items-center relative group/box",Xt(l)),onClick:s,children:[o("div",{className:u(Wt,"m-0",a?"rounded-full border-2":Jt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Gt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Kt(n)]})})})),Kt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Xt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Gt=(e=!1)=>e?"radio":"checkbox",Jt=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Zt=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Yt,{text:t,value:n,disabled:a,onChange:r},l),Ut(i)]})));function Qt(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function en(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function tn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return en(globalThis.document,"click",n),t}const nn=()=>{},ln="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",an=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,rn=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{f&&f(e.target?.value||"")}),[f]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=sn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[an(d),N?o("textarea",{className:u("block resize-y min-h-24",S,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b},e):o("input",{type:r,className:u("h-14",S,C,T),ref:w,id:n,name:l||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b,pattern:y},e)]}),g]})})),sn=e=>e?ln:"border-error",on=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),cn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},dn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),mn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function un({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[u,h]=l([]),p=dn(),g=cn[n],f=i((()=>{m.current=t,p.close()}),[t]),x=i((e=>{f(),m.current=e,c&&c(e)}),[f,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(on)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&h(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void f();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(mn,{options:u,value:t,onChange:x}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,u,t,x]),b}const hn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=nn,onBlur:s,isTextarea:d,type:m,name:h="",dadata:p=!1})=>{const[g,{setFalse:f,setTrue:x}]=Qt(),b=tn(f),y=un({isOpen:g&&p,name:h,value:n,onChange:r});return c("div",{className:u("shrink-0 w-full",e),ref:b,onBlur:f,onFocus:x,children:[o("div",{ref:y,children:o(rn,{type:m||"text","aria-label":t,label:pn(i,t),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:gn(l,i,t)})}),Ut(a)]})})),pn=(e,t)=>t&&e?`${t}*`:t,gn=(e,t,n)=>t&&!n?`${e}*`:e,fn=e=>e?.text||e?.key||"",xn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,bn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:xn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:fn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const yn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x})=>{const[b,{setFalse:y,setTrue:v}]=Qt(),[N,w]=l(""),k=x||0===n.length,S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=dn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=tn(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(bn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[an(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Nn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:fn(r)||h}),vn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(rn,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),vn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Nn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),wn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(yn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),Ut(n)]}))),kn=e=>!e?.length,Sn=e=>t=>n=>e(n)?[]:[t],Cn=Sn((e=>null!=e&&""!==e)),Tn="Некорректно заполненное поле",In=Cn(Tn),Bn=Sn((e=>e?.key&&""!==e?.key))(Tn),Pn=Sn((e=>"string"==typeof e&&e.length>1))(Tn),Mn=e=>Sn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(Tn),Rn=Sn((e=>"string"==typeof e&&4===e.length))(Tn),Vn=Sn((e=>"string"==typeof e&&6===e.length))(Tn),Dn=Sn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Tn),zn=(_n=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Sn((e=>"string"==typeof e&&_n.test(e))))(Tn);var _n;const An=Sn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),Fn=Sn((e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1}))(Tn),On={typeForm:In,surname:Pn,name:Pn,region:Bn,addressBranch:Bn,phone:zn,secondaryPhone:zn,birthday:In,education:In,housing:In,employment:In,organization:In,amountWorkers:In,employerActivities:In,employerOrganization:In,positionOrganization:In,email:Sn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2}$/.test(e)))(Tn),dulSerie:Rn,dulNumber:Vn,dulIssueDateField:In,dulSubdivisionCode:Vn,dulIssuedBy:In,fullName:Pn,inn:Dn,legalForm:In,organizationName:In,generalSeniority:In,lastJobExperience:In,experience5Years:In,jobsNumber:In,beginDate:In,fullAddress:In,partnerComments:In,collectionCount:In,comment:In,acquiringType:Bn,feedbackMethod:Bn,serviceType:Bn,serviceDirection:Bn,meetingDay:In,product:In,localities:In,consentDataProcessing:An,annualRevenue:In,consentToReceiveMaterials:An,processPersonalDataLeadFlg:An,consentProviderFlg:An,consentPhotoFlg:An,consentPfrFlg:An,consentAssignmentClaimsFlg:An,consentCollectionFlg:An,consentInformFlg:An,familyStatus:In,children:Mn(2),familyMembers:Mn(2),dependents:Mn(2),totalIncome:Mn(19),expenses:Mn(10),snils:Fn,conscription:In,armyIdFlg:An},En=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,On?.[e]])))},jn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Ln=(e,t,n=!1)=>n?jn(e,t):e,$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Un=d((({field:e,input:t})=>o(wn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...Ln(e("acquiringType"),On.acquiringType,t?.required)}))),qn=(e="")=>Boolean("trade"===e||"all"===e),Wn=e=>null!=e,Hn=new Map,Yn=e=>Boolean(e?.every((e=>Array.isArray(e)?Yn(e):!e||"string"==typeof e))),Kn=e=>Yn(e)?e.toString():"";function Xn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Gn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Wn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Hn)=>n=>{const l=Kn(n),a=t.get(l);if(l&&Wn(a))return a;const i=e(...n);return l&&Wn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Gn(e){return Array.isArray(e)?e:e instanceof Function?Gn(e()):[e]}const Jn=[];const Zn=async e=>await it(e,{method:"GET"})||Jn;function Qn(e=!1){const{data:t}=Xn(e?"/api/v1/premiumBranchesByRegions":"/api/v1/branchesByRegions",rt);return Array.isArray(t)?t:[]}const el=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?Qn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Xn(e?`/api/v1/branches?regionCode=${e}`:null,Zn);return t||Jn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(wn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Ln(e("addressBranch"),On.addressBranch,t?.required),isSearch:!0})})),tl=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},nl=(e,t,n)=>Math.max(t,Math.min(e,n));function ll(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function al({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=ll(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const il=1,rl=100,sl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:il),max:s=(a.length?a.length-1:rl),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=tl(e,{normalize:(e=0)=>a.length?ol(a)(e):nl(e,r,s),format:Ue()}),f=i((e=>{p&&p(ll(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ln,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),al({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),cl(l)]})})),ol=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),cl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),dl=["От 1 000 ₽","До 1 000 000 000 ₽"],ml=d((({field:e})=>o(sl,{title:"Сумма, ₽",items:dl,min:1e3,max:1e9,...e("amount")}))),ul=e=>{const{data:t,error:n}=Xn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,hl);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},hl=async e=>await it(e,{method:"POST"})||[],pl=ut((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(wn,{placeholder:"Выберите из списка",label:n,options:gl(i),...Ln(e(l),On[l],a?.required)})})),gl=e=>(e??[]).map((e=>({key:e,value:e}))),fl=d((({field:e,input:t})=>{const{data:n}=ul("EMPLOYEES_NUMBER");return o(pl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),xl=d((({field:e,input:t})=>o(hn,{label:"Годовая выручка, ₽",...Ln(e("annualRevenue"),On.annualRevenue,t?.required)}))),bl=d((({field:e})=>o(Zt,{text:"Наличие военного билета",...Ln(e("armyIdFlg"),On.armyIdFlg)}))),yl=d((({field:e})=>o(hn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),vl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=Nl(t,e),c=wl(t,i,r);u.push(o("td",{children:o("div",{className:kl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},Nl=(e,t)=>t&&e.toDateString()===t.toDateString(),wl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),kl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Sl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Cl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=nn,setValue:d=nn})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Sl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:vl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Tl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Il=Tl.map((e=>({key:e}))),Bl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Pl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ml={className:"min-w-32",iconVersion:"black",isBorder:!1},Rl=d((({className:e="",label:t="",value:n,valid:a=!0,minDate:r,maxDate:s,onChange:d})=>{const[m,{setValue:h}]=Qt(!1),[p,g]=l(n?.getMonth()||(new Date).getMonth()),[f,x]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:b,handleNextMonth:y,handleSelectMonth:v,handleSelectYear:N,monthsOptions:w,yearsOptions:k,handleChangeVisibleCalendar:S,ref:C}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=tn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Tl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Il,yearsOptions:Bl,ref:s}})({onYearSelect:x,onMonthSelect:g,onShowCalendar:h,selectedYear:f,selectedMonth:p,showCalendar:m});return c("div",{className:u("space-y-xs",e),ref:C,children:[an(t),c("div",{className:"relative",children:[Vl(S,n,a),m?c("div",{className:"absolute bg-white z-20 select-none bottom-full",children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:b,children:o(W,{...Pl,className:"-rotate-90 cursor-pointer"})}),o(yn,{onChange:v,value:{key:Tl[p]},options:w,...Ml}),o(yn,{onChange:N,value:{key:String(f)},options:k,...Ml}),o("div",{className:"my-auto",onClick:y,children:o(W,{...Pl,className:"rotate-90 cursor-pointer"})})]}),o(Cl,{today:n,currentMonth:p,currentYear:f,onDateSelect:d,min:r,max:s})]}):null]})]})})),Vl=(e,t,n)=>c("div",{onClick:e,className:u("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(k,{children:t&&ft(t)}),o(W,{...Pl,name:"CalendarIcon"})]}),Dl=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Rl,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),Ut(n)]}))),zl=d((({field:e,input:t})=>o(Dl,{label:"Дата начала работы на текущем месте",...Ln(e("beginDate"),On.beginDate,t?.required),...t}))),_l=d((({field:e,input:t})=>o(Dl,{label:"Дата рождения",...Ln(e("birthday"),On.birthday,t?.required)}))),Al=d((({field:e,input:t})=>o(hn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...Ln(e("children"),On.children,t?.required),...t}))),Fl=d((({field:e,input:t})=>o(hn,{label:"Количество объектов инкассации",type:"number",...Ln(e("collectionCount"),On.collectionCount,t?.required)}))),Ol=d((({field:e,input:t})=>o(hn,{className:"col-span-2",...Ln(e("comment"),On.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),El=d((({field:e,input:t})=>{const{data:n}=ul("MILITARY_STATUS");return o(pl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),jl=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на уступку прав требований)",...Ln(e("consentAssignmentClaimsFlg"),On.consentAssignmentClaimsFlg,t?.required)}))),Ll=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...Ln(e("consentCollectionFlg"),On.consentCollectionFlg,t?.required)}))),$l=d((({field:e,input:t})=>o(Zt,{text:"Согласие на информирование о продуктах и услугах Банка",...Ln(e("consentInformFlg"),On.consentInformFlg,t?.required)}))),Ul=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на фотографирование)",...Ln(e("consentPhotoFlg"),On.consentPhotoFlg,t?.required)}))),ql=d((({field:e,input:t})=>o(Zt,{text:"Согласие об использовании простой электронной подписи",...Ln(e("consentProviderFlg"),On.consentProviderFlg,t?.required)}))),Wl=d((({field:e,input:t})=>o(Zt,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...Ln(e("consentToReceiveMaterials"),On.consentToReceiveMaterials,t?.required)}))),Hl=d((({field:e,input:t})=>o(hn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...Ln(e("dependents"),On.dependents,t?.required),...t}))),Yl=d((({field:e,input:t})=>o(Dl,{label:"Желаемая дата встречи",...Ln(e("desiredMeetingDate"),On.meetingDay,t?.required)}))),Kl=d((({field:e,input:t})=>o(Dl,{label:"Дата выдачи",...Ln(e("dulIssueDateField"),On.dulIssueDateField,t?.required)}))),Xl=d((({field:e,input:t})=>o(hn,{label:"Кем выдан",...Ln(e("dulIssuedBy"),On.dulIssuedBy,t?.required)}))),Gl=d((({field:e,input:t})=>o(hn,{label:"Номер документа",type:"number",...Ln(e("dulNumber"),On.dulNumber,t?.required)}))),Jl=d((({field:e,input:t})=>o(hn,{label:"Серия документа",type:"number",...Ln(e("dulSerie"),On.dulSerie,t?.required)}))),Zl=d((({field:e,input:t})=>o(hn,{label:"Код подразделения",type:"number",...Ln(e("dulSubdivisionCode"),On.dulSubdivisionCode,t?.required)}))),Ql=d((({field:e,input:t})=>{const{data:n}=ul("EDUCATION_LEVEL");return o(pl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ea=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(hn,{label:"Электронная почта",...Ln(e("email"),On.email,n),...l})})),ta=d((({field:e,input:t})=>{const{data:n}=ul("ORGANIZATION_ACTIVITY_TYPE");return o(pl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),na=d((({field:e,input:t})=>{const{data:n}=ul("ORGANIZATION_KIND");return o(pl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),la=d((({field:e,input:t})=>{const{data:n}=ul("EMPLOYMENT_TYPE");return o(pl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),aa=d((({field:e,input:t})=>o(hn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...Ln(e("expenses"),On.expenses,t?.required),...t}))),ia=d((({field:e,input:t})=>o(hn,{label:"Стаж",placeholder:"За последние 5 лет",...Ln(e("experience5Years"),On.experience5Years,t?.required),...t}))),ra=d((({field:e,input:t})=>o(hn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...Ln(e("familyMembers"),On.familyMembers,t?.required),...t}))),sa=d((({field:e,input:t})=>{const{data:n}=ul("MARITAL_STATUS");return o(pl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),oa=d((({field:e,input:t})=>o(wn,{label:"Способ получения ответа",options:jt,...Ln(e("feedbackMethod"),On.feedbackMethod,t?.required)}))),ca=d((({field:e,input:t})=>o(hn,{label:"Адрес",...Ln(e("fullAddress"),On.fullAddress,t?.required),...t}))),da=d((({field:e,input:t})=>o(hn,{label:"ФИО",...Ln(e("fullName"),On.fullName,t?.required),...t}))),ma=d((({field:e,input:t})=>o(hn,{label:"Общий стаж",placeholder:"Количество лет",...Ln(e("generalSeniority"),On.generalSeniority,t?.required),...t}))),ua=d((({field:e,input:t})=>{const{data:n}=ul("HOUSE_TYPE");return o(pl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),ha=d((({field:e,input:t})=>o(hn,{label:"ИНН",type:"number",...Ln(e("inn"),On.inn,t?.required)}))),pa=d((({field:e})=>o(Zt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ga=d((({field:e,input:t})=>o(hn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...Ln(e("jobsNumber"),On.jobsNumber,t?.required),...t}))),fa=d((({field:e,input:t})=>o(hn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...Ln(e("lastJobExperience"),On.lastJobExperience,t?.required),...t}))),xa=d((({field:e,input:t})=>o(hn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...Ln(e("legalForm"),On.legalForm,t?.required),...t})));function ba(e="/api/v1/regions"){const{data:t}=Xn(e,rt);return Array.isArray(t)?t:[]}const ya=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=ba(Lt)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(wn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...Ln(e("localities"),On.localities,t?.required),isSearch:!0})})),va=d((({field:e,input:t})=>o(hn,{label:"Отчество (Обязательно, при наличии)",...e("middleName"),...t}))),Na=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(hn,{label:"Имя",...Ln(e("name"),On.name,n),...l})})),wa=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ka=d((({field:e})=>qn(e("acquiringType")?.value?.key)?o(wa,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Sa=d((({field:e,input:t})=>{const{data:n}=ul("ORGANIZATION_TYPE");return o(pl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Ca=d((({field:e,input:t})=>o(hn,{label:"Наименование организации",...Ln(e("organizationName"),On.organizationName,t?.required),...t}))),Ta=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(hn,{...Ln(e("partnerComments"),On.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Ia=e=>"_"===e,Ba=e=>/\d/.test(e),Pa=e=>Ia(e)||Ba(e),Ma=[..."+7 (___) ___-__-__"],Ra=Ma.findIndex(Ia),Va=Ma.map(((e,t)=>Pa(e)?Ma.slice(0,t).filter(Pa).length:-1));const Da=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Ma.map(((e,n)=>Ba(e)?e:t.charAt(Va[n])||e)),l=Va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(Ra,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(rn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),za=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Da,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ut(l)]}))),_a=d((({field:e,input:t})=>o(za,{label:"Телефон",...Ln(e("phone"),On.phone,t?.required)}))),Aa=d((({field:e,input:t})=>{const{data:n}=ul("POSITION");return o(pl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Fa=d((({field:e})=>qn(e("acquiringType")?.value?.key)?o(wa,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Oa=d((({field:e,input:t})=>o(Zt,{text:"Согласие на обработку персональных данных",...Ln(e("processPersonalDataLeadFlg"),On.processPersonalDataLeadFlg,t?.required)}))),Ea=ut((({field:e,source:t})=>o(wn,{placeholder:"Выберите продукт",label:"Продукт",options:ja(t?.productList),...jn(e("product"),On.product)}))),ja=e=>(e??[]).map((e=>({key:e,value:e}))),La=d((({field:e,input:t,url:n})=>{const l=ba(n);return o(wn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Ln(e("region"),On.region,t?.required)})})),$a=d((({field:e,input:t})=>{const n=Qn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(wn,{label:"Регион",placeholder:"Выберите регион",options:l,...Ln(e("region"),On.region,t?.required)})})),Ua=d((({field:e})=>{const t=e("secondaryPhone");return o(za,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?jn(t,On.secondaryPhone):t})})),qa=d((({field:e,input:t})=>o(wn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Et,...Ln(e("serviceDirection"),On.serviceDirection,t?.required)}))),Wa=e=>"_"===e,Ha=e=>/\d/.test(e),Ya=e=>Wa(e)||Ha(e),Ka=[..."___-___-___ __"],Xa=Ka.findIndex(Wa),Ga=Ka.map(((e,t)=>Ya(e)?Ka.slice(0,t).filter(Ya).length:-1));const Ja=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Ka.map(((e,n)=>Ha(e)?e:t.charAt(Ga[n])||e)),l=Ga.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(Xa,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(rn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Za=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ja,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),Ut(l)]}))),Qa=d((({field:e,input:t})=>o(Za,{label:"СНИЛС",...Ln(e("snils"),On.snils,t?.required),...t}))),ei=d((({field:e,input:t})=>o(hn,{label:"Фамилия",...Ln(e("surname"),On.surname,t?.required),...t}))),ti=["От 1 мес","До 15 лет"],ni=d((({field:e})=>o(sl,{title:"Срок, месяцев",items:ti,min:1,max:180,...e("term")}))),li=d((({field:e,input:t})=>o(hn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Ln(e("totalIncome"),On.totalIncome,t?.required),...t}))),ai=d((({field:e,input:t})=>o(wn,{label:"Тип обслуживания",options:Ot,...Ln(e("serviceType"),On.serviceType,t?.required)}))),ii=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(ln.split(" ").filter((e=>"rounded"!==e)),Wt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),ri=["currencyControl","documentOperations","conversionTransactions","otherIssues"],si=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(ii,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(ii,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(ii,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(ii,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const oi={$ref:"/wcms-resources/outservice-productlist.json"},ci=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(ei,{field:e,input:n}),name:o(Na,{field:e,input:n}),middleName:o(va,{field:e,input:n}),phone:o(_a,{field:e,input:n}),email:o(ea,{field:e,input:n}),fullName:o(da,{field:e,input:n}),inn:o(ha,{field:e,input:n}),legalForm:o(xa,{field:e,input:n}),organizationName:o(Ca,{field:e,input:n}),generalSeniority:o(ma,{field:e,input:n}),lastJobExperience:o(fa,{field:e,input:n}),experience5Years:o(ia,{field:e,input:n}),jobsNumber:o(ga,{field:e,input:n}),beginDate:o(zl,{field:e,input:n}),fullAddress:o(ca,{field:e,input:n}),comment:o(Ol,{field:e,input:n}),addressBranch:o(el,{field:e,input:n,isPremium:a}),birthday:o(_l,{field:e,input:n}),desiredMeetingDate:o(Yl,{field:e,input:n}),product:o(Ea,{field:e,source:oi}),localities:o(ya,{field:e,input:n}),isClient:o(pa,{field:e}),partnerComments:o(Ta,{field:e,input:n}),collectionCount:o(Fl,{field:e,input:n}),acquiringType:o(Un,{field:e,input:n}),onlineCheckout:o(ka,{field:e}),posTerminal:o(Fa,{field:e}),serviceType:o(ai,{field:e,input:n}),term:o(ni,{field:e}),amount:o(ml,{field:e}),annualRevenue:o(xl,{field:e,input:n}),vedTypes:o(si,{field:e}),feedbackMethod:o(oa,{field:e,input:n}),serviceDirection:o(qa,{field:e,input:n}),bankEmpolee:o(yl,{field:e}),secondaryPhone:o(Ua,{field:e}),consentToReceiveMaterials:o(Wl,{field:e,input:n}),processPersonalDataLeadFlg:o(Oa,{field:e,input:n}),consentProviderFlg:o(ql,{field:e,input:n}),consentPhotoFlg:o(Ul,{field:e,input:n}),consentAssignmentClaimsFlg:o(jl,{field:e,input:n}),consentCollectionFlg:o(Ll,{field:e,input:n}),consentInformFlg:o($l,{field:e,input:n}),applicationDate:o(hn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(Zt,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o($a,{field:e}):o(La,{field:e,input:n,url:$t(t)}),education:o(Ql,{field:e,input:n}),housing:o(ua,{field:e,input:n}),employment:o(la,{field:e,input:n}),organization:o(Sa,{field:e,input:n}),amountWorkers:o(fl,{field:e,input:n}),employerActivities:o(ta,{field:e,input:n}),employerOrganization:o(na,{field:e,input:n}),positionOrganization:o(Aa,{field:e,input:n}),familyStatus:o(sa,{field:e,input:n}),children:o(Al,{field:e,input:n}),familyMembers:o(ra,{field:e,input:n}),dependents:o(Hl,{field:e,input:n}),totalIncome:o(li,{field:e,input:n}),expenses:o(aa,{field:e,input:n}),snils:o(Qa,{field:e,input:n}),conscription:o(El,{field:e,input:n}),armyIdFlg:o(bl,{field:e,input:n}),dulSerie:o(Jl,{field:e,input:n}),dulNumber:o(Gl,{field:e,input:n}),dulIssueDateField:o(Kl,{field:e,input:n}),dulSubdivisionCode:o(Zl,{field:e,input:n}),dulIssuedBy:o(Xl,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},di=e=>2===e?"@xl:grid-cols-2":"",mi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function ui({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const hi={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},pi={primary:u("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},gi=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(ui(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(hi[a],pi[a]),l),type:s,role:d,onClick:m,children:e})})),fi=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),xi=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(fi,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),bi=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(xi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gi,{type:"button",onClick:r,children:"Хорошо"})]})})})),yi=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(bi,{...e}),n),close:n}},vi=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ni=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${qn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...ki(o),...wi(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},wi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ki=e=>e?{vedTypes:Object.fromEntries(ri.map((t=>[t,t===e])))}:{},Si={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Ot[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:ri[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Ci=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),Ti=(e,t)=>o(gi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ii=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Yt,{...e}),o(Ci,{link:t})]}),Ut(jn(e,An).error)]}):o(Ci,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ti(n)]}),Bi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Pi=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Si[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Ot[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=Mi(x,e),a=vi(En(l));if(!kn(a(e)))return"Fail";const i=Ni({...e,...h}),r=await Bi.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){yi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Dt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=_t(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Ft,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(di(e.columns),"grid gap-x-m"),children:[mi(e.title),(e?.inputs||[])?.map(ci(k,n))]},`section-${t}`))),Ii(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Mi=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),Ri=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],Vi={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Ot[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:ri[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1},Di=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Vi[e.name]]))),typeForm:{key:t,text:""}}),zi=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const _i=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),Ai=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(jn(n(e?.name),On[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(zi,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(_i,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(ci(n,t))}),renderFoldButton:Fi(c("div",{children:[o(Yt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Ut(i?"Отметьте все обязательные соглашения":"")]}))})})})),Fi=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Oi=(e,t)=>o(gi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ei=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ji=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...Ei()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>(e=>"application/json"===e.headers.get("Content-Type"))(e)?e.json():e)),Li=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},$i=async e=>await ji("/public-data/createUserProfile","POST",e),Ui=async e=>await ji("/user-data/updateUserProfile","PUT",e),qi=async e=>await ji("/user-data/createDraftTask","POST",e),Wi=async e=>await ji("/user-data/updateUserTask","PUT",e),Hi=async e=>await ji("/sms/sendCode","POST",e),Yi=async e=>await ji("/sms/checkCode","POST",e).then(Li),Ki=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),Xi=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:Gi(e)})))),Gi=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,Ji=d((({values:e,setValues:t,hasError:n})=>{const[r,d]=l(0),m=s([]);a((()=>{m.current?.[r]?.focus()}),[r]);const u=i((n=>l=>{const{value:a}=l.currentTarget,i=n===e.length-1,r=a.length>1;i&&r||(t(e.map(((e,t)=>t===n?a:e))),d(n+1))}),[e]),h=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),d(l)}}),[e]),p=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),d(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:u(l),onPaste:p,ref:e=>{m.current||(m.current=[]),m.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:h(l),className:Zi(l,e,n)},l)))}),n?o("div",{className:"text-error",children:"Неверный код"}):null]})})),Zi=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},Qi=d((({isDisabled:e,onClick:t,text:n})=>o(gi,{type:"button",onClick:t,disabled:e,children:o(Re,{font:"font-medium",children:n})}))),er=d((({title:e,phone:t,description:n,__html:s,code:d=!0,codeLength:m=4,textButton:u="",onClose:h,href:p=""})=>{const{close:g}=de(),[f,x]=l(Array(m).fill("")),[b,y]=l(!1),[v,N]=l(!1),[w,k]=l(180),S=r((()=>f.every(Boolean)),[f]);a((()=>{Hi({phoneNumber:t,smsCodesSetName:{key:"AUTHENTICATION"}})}),[]);const T=i((async()=>{try{N(!0),await Yi({smsText:f.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),globalThis.location.href=p,g(),h&&h()}catch{N(!1),y(!0)}}),[f]);return o(xi,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:e,description:n,headlineVersion:"S",isEmbedded:!0}),d?o(Ji,{values:f,setValues:x,hasError:b}):null,w?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(Xi,{className:"text-primary-main ml-1",time:w,setTime:k})]}):o(be,{className:"text-primary-main",children:"Получить новый код"}),o(Pe,{itemSize:"list-s",__html:s}),u?o(Qi,{isDisabled:!S,onClick:T,text:u}):null,v?o(Ki,{blur:!1}):null]})})})),tr=(e,t)=>{const[n,a]=l("");return{handleSubmit:i((async n=>{const l=vi(En(e));if(!kn(l(n)))return"Fail";try{const{profile:e}=await $i({profile:{phone:xt(n.phone)}}),l=e?.id;if(l&&n?.phone){const e=async()=>{try{await Ui(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(l,n));const{taskId:e,participantId:i}=await qi({profileId:l,programId:t});await Wi(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(i,e,l,n)),a("OK")}catch{a("Fail")}};(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(er,{...e}),n),close:n}})({onClose:e,...nr(n?.phone)}).open()}}catch{a("Fail")}}),[]),responseStatus:n}},nr=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phone:xt(e),textButton:"Оформить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>соглашение о порядке использования простой электронной подписи,\n </li><li>согласие на обработку персональных данных,\n </li><li>предоставление и подписание прочих согласий Банка,\n </li><li>согласие на запрос в ПФР</li></ul>",href:"/credit-lead"}),lr=d((({className:e,title:t,programId:n,typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],h=Di(m,i),[p,g]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const{handleSubmit:f,responseStatus:x}=tr(m,n||"");if(x){yi({responseType:x,typeForm:i}).open()}const[,{field:b,onSubmit:y,reset:v}]=_t(h,{onSubmit:f});return a((()=>{"OK"===p&&(g(""),v())}),[p]),o(Ft,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(di(e.columns),"grid gap-x-m"),children:[mi(e.title),ar({field:b,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),Oi(s)]})})})),ar=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=ir(n||[]);return l.length>2?c("div",{children:[a.map(ci(e,t)),o(Ai,{inputs:l,field:e})]}):(n||[])?.map(ci(e,t))},ir=e=>({consentInputs:e?.filter((e=>Ri.includes(e.name)))||[],restInputs:e?.filter((e=>!Ri.includes(e.name)))||[]}),rr=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),sr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",or=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function cr(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const dr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:cr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:h,role:"listitem",children:d})})),mr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],ur=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(pr(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?hr(c,v):{},...N?or(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(dr,{className:u(m,a?mr[a-1]:"",{"h-full":N},t),style:w?hr(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),hr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),pr=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),gr={"horizontal-list":"w-6","vertical-list":"h-6"},fr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?gr[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),xr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},br=e=>e,yr=(e=br)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),vr=yr(),Nr=(e=br)=>yr((t=>-e(t))),wr=Nr(),kr=e=>t=>e.scrollWidth/t,Sr=e=>(t,n)=>{e.scrollBy({left:n*kr(e)(t),behavior:"smooth"})},Cr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[Nr()(a),yr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Sr(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Sr(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Tr={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},Ir=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[h,p]=Cr({itemCount:s.length}),g=Br(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(ur,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(xr({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Tr[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(fr({activeIndex:t,onClick:f,listType:l}))}):null})),Br=(e=!1)=>({behavior:e?"auto":"smooth"}),Pr=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:u("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Mr=d((e=>o(Pr,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),Rr=d((e=>o(Pr,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Vr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Dr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?zr(t):null,i?o(Mr,{className:u(_r(a),m?"left-1":"left-0"),onClick:s}):null,r?o(Rr,{className:u(_r(a),m?"right-1":"right-0"),onClick:d}):null]})})),zr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(Vr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(Vr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),_r=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Ar=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Cr({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(ur,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(Dr,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(Ir,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),Fr=({blocksToRender:e,...t})=>o(Ar,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",sr(!0)),children:B(e,t)},String(n))})}),Or=e=>e%2!=0,Er=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),jr=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(Er,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),Lr=({isUnfolded:e,onToggle:t})=>o(jr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),$r=["ArrowDownIcon","ArrowUpIcon"],Ur="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",qr=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(Ur),children:[M(i,{...a.options,parent:n}),Or(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(zi,{renderFoldableSection:({isUnfolded:e})=>c(_i,{className:u(Ur),isUnfolded:e,children:[M(r,{...a.options,parent:n}),Or(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(jr,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:$r[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},Wr=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[Hr(n,t),qr({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[Hr(n,t),Fr({...l,blocksToRender:t})]});default:return null}})),Hr=(e,t)=>e&&!t.length?o(rr,{...e}):null,Yr=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),Kr=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(wa,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),Xr=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,Yr(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(Gr(l)).filter(Boolean))]}),n?o("div",{children:o(gi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),Gr=e=>([t,n])=>{const l=n?.type;return"array"===l?Jr(t,e)(n):null},Jr=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(Kr,{items:l,multiple:!n?.single,...t(e)})]},e)};function Zr(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const Qr=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,es=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>Qr(t[e])||Qr(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>Qr(t[e])||Qr(n[e])||ts(t[e])<=ts(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>Qr(t[e])||Qr(n[e])||ts(t[e]?.min)>=ts(n[e]?.min)&&ts(t[e]?.min)<=ts(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>Qr(t[e])||Qr(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>Qr(t[e])||Qr(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),ts=e=>Number(e||0),ns=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=_t(e),d=r((()=>Zr(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>es(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},ls={},as={},is=ut((({className:e,filtrationSchema:t=ls,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=ns(as,{block:a.block,page:a.options?.page}),d=o(yn,{className:"w-64",label:n?.title,options:rs(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>rs(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Xr,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(gi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(Wr,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),rs=e=>Zr(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),ss=(e=!1)=>e?"text-left":"text-center",os={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},cs=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",os[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),ds=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:ss(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(ms)}):null]})})),ms=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(cs,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),us=(e,t,n)=>{return o(Ar,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Re,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},hs=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?us(e,0,t):null]}))),ps={start:"justify-start",center:"justify-center",end:"justify-end"},gs=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",ps[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),fs=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),xs="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",bs="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",ys="flex flex-col gap-y-xl min-w-52",vs=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),Ns=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(vs,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),ws=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,ks=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Ss=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Cs=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Ss,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(ks,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(Ns,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Ts=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(sl,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),Is={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Bs={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ps=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=Is.prefMonthsNum,prefTravelBonusRate:i=Is.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Bs,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},Ms=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=_t({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=Ps(r,n);return o(fs,{className:e,title:t,...i,children:c("section",{className:u(xs,e),children:[c("div",{className:bs,children:[Ts({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Ts({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Cs({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:ys,children:[f>=0?o(Ns,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),ws(a)]})]})})})),Rs=Math.round(29.5),Vs=(e,t=0)=>e?.sum?e.sum:t,Ds=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,zs=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,_s={horizontal:"gap-5xl",vertical:"flex-col gap-s"},As=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:u(`flex ${_s[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Yt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),Fs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(As,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Os=e=>Fs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Es=" (c капитализацией)",js=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:ys,children:[o(Ns,{title:`Доход в конце срока${i?Es:""}`,value:e,postfix:n,prefix:"+"}),o(Ns,{title:`Сумма в конце срока${i?Es:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(ws)]}),Ls=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:$s([e,t],l),$s=([e,t],n=[])=>({[e]:n.length?wr(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?vr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),Us=(e,[t,n],l)=>e>=l[t]&&e<=l[n],qs={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const Ws={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},Hs=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?qs[e?.rateType]:"",{data:n}=Xn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...Ws,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&Ys(s,e)&&Us(l,["minSum","maxSum"],e)&&Us(n,["minDays","maxDays"],e)))||Ws,{rate:m}=d,u=Ks(m,e),h=l+u,p=c||[Ws];return{...d,...$s(["minSum","maxSum"],p),...$s(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},Ys=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,Ks=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},Xs=ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=_t({moneyValue:Vs(r,1e5),daysValue:Ds(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=Hs(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(fs,{className:e,title:t,...d,children:c("section",{className:u(xs,e),children:[c("div",{className:bs,children:[Ts({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(sl,{items:[`От ${zs(v.min||0)}`,`До ${zs(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[Gs(p,h),Os({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Cs({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),js({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),Gs=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Yt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Yt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),Js=(e=[],t=!1)=>Zs([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),Zs=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},Qs=({min:e=0,max:t=0,availableMonths:n,...l})=>o(sl,{items:[`От ${eo(e)}`,`До ${eo(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),eo=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,to=e=>Fs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),no=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(nl(t?.[a],n.minMonths,n.maxMonths))},lo=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},ao={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},io=e=>ro({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&ro({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&ro({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&ro({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),ro=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],so=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[ao],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>io({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=Ls(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=Ls(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>io({row:e,userInputParams:t,paramsViewSettings:n})&&Us(l,["minSum","maxSum"],e)&&Us(a,["minMonths","maxMonths"],e)))||ao)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=lo(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},oo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),co={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},mo=ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,Zs([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=_t({moneyValue:Vs(s,2e5),monthsValue:Ds(s,Rs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=so(p,n,r),x=to({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(nl(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(nl(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!oo(s)&&m&&no({field:g,defParams:m,calcParams:f,map:co,monthsValue:"minMonths"})}),[n,s]),o(fs,{className:e,title:t,...d,children:c("section",{className:u(xs,e),children:[c("div",{className:bs,children:[Ts({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),Qs({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),uo({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u(ys,"@4xl:w-1/2"),children:[o(Ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ns,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(Ns,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),Ee(l,{isVertical:!0}),ws(i)]})]})})})),uo=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Yt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Yt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Yt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Yt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),ho=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},po={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},go=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?bo(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[xo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),xo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),xo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),xo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,Us(l,["minSum","maxSum"],t),Us(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||po,{rate:u}=m,h=fo(u,e),p=l+h,g=t||[po];return{...m,...$s(["minSum","maxSum"],g),...$s(["minMonths","maxMonths"],g),availableMonths:ho(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},fo=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},xo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],bo=(e,t)=>e+Math.round((t-e)/2),yo=(e="rub")=>"rub"===e,vo=(e,t)=>{const{minMonths:n,maxMonths:l}=$s(["minMonths","maxMonths"],So(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:nl(a,n,l)}},No=(e,t)=>{const{minSum:n,maxSum:l}=$s(["minSum","maxSum"],So(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:nl(a,n,l)}},wo=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),ko=e=>{const t=yo(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},So=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Co=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Fs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Fs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),To(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Os({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Fs({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),To(e.isShowNewClient),e.isShowNewClient?o(Yt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},To=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,Io={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Bo={text:"₽",key:"rub"},Po=ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[Bo],g=i((e=>t=>e?{...t,...ko(t),...No(t,e),...vo(t,e),...wo(t,e)}:t)(h),[h]),[f,{field:x}]=_t({moneyValue:Vs(d,2e4),monthsValue:Ds(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Bo},{normalize:g}),b=x?.("currency")?.value??Bo,y=x?.("isNewClient")?.value,v=So(h,b),N=go(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{no({field:x,defParams:Js(v,y),calcParams:N,monthsValue:"minMonths",map:Io})}),[x,h]);a((()=>{!oo(d)&&v&&T()}),[d,h]);const I=w===Js(v,y)?.rate;return o(fs,{className:e,title:t,...m,children:c("section",{className:u(xs,e),children:[c("div",{className:bs,children:[c("div",{className:"flex gap-m",children:[Ts({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Mo(b?.key)}),h&&h?.length>1?o(wn,{label:"Валюта",options:p,...x("currency")}):null]}),Qs({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Co({...N,...s},x)]}),Cs({rate:w,children:Vo(T,I)}),js({income:k,finalSum:S,buttons:[...l,Ro(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Mo=(e="")=>yo(e)?1e3:100,Ro=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Vo=(e,t=!1)=>t?null:o(gi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Do=e=>zo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&zo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),zo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],_o={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Ao=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[_o],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Do({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=Ls(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=Ls(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Do({row:e,userInputParams:t,paramsViewSettings:n})&&Us(l+r,["minSum","maxSum"],e)&&Us(i,["minSumOld","maxSumOld"],e)&&Us(r,["minSumExtra","maxSumExtra"],e)&&Us(a,["minMonths","maxMonths"],e)))||_o)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=lo(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},Fo=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=_t({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Ao(s,n,i),h=to({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(fs,{className:e,title:t,...r,children:c("section",{className:u(xs,e),children:[c("div",{className:bs,children:[Ts({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Ts({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),Qs({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Oo({...m,...i},d),m.isExtraMoney?Ts({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(ys,"@4xl:w-1/2"),children:[o(Ns,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(Ns,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(Ns,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(Ns,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ee(l,{isVertical:!0}),ws(a)]})]})})})),Oo=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Yt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Yt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Yt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Eo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=tl(e,{normalize:(e=a)=>n&&l?String(nl(Number(jo(e)),n,l)):jo(e),format:Ue(r)}),d=i((e=>t&&t(jo(e))),[t]);return o(rn,{onChange:d,...s,...c})})),jo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),Lo=d((e=>o(Eo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),$o={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},Uo={amount:1500},qo=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=_t(Uo),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:$o[r],children:[o(Lo,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(gi,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),Wo=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),Ho="relative h-full",Yo={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},Ko=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(Jo),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:Xo(n,{someCardsHighlighted:i}),children:[B(n,l,{className:Go(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),Jo(n)?Wo({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},Xo=(e,{someCardsHighlighted:t})=>u(Ho,t&&(Jo(e)?"pt-3xl":"pt-3xl sm:pt-16")),Go=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(Ho,"min-w-80",Yo[l],t&&(Jo(e)?"pt-3xl sm:pt-16":"pt-3xl"),sr(n),n&&"h-full"),Jo=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,Zo=ut((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(Ar,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?Qo(s?.block?.blocks):[],hasBlur:!0,children:Ko({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),Qo=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],ec="z-10 border border-solid w-full h-full",tc=u(ec,"absolute hidden @xl:block border-transparent"),nc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(tc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(tc,"top-6 right-8 bg-green")}),o("div",{className:u(tc,"top-3 right-4 bg-green-light")}),c("div",{className:u(ec,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),lc={black:"bg-black",white:"bg-white"},ac=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(ic)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),ic=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${lc[e]}`},String(t)),rc=d((({icon:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),sc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?oc(l):null]})}))),oc=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(rc,{...e},String(t))))}),cc=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),dc=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ue()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),mc=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],uc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>mc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Oe(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},hc(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:pc(s??!1,a??!1,n),buttonClassName:h})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),hc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",pc=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),gc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(dc,{href:a,target:m,className:"h-full",data:cc(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Oe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(uc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Fe,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,fc(l,p)]})})}))),fc=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,xc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},bc=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(xc),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Oe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(zi,{renderFoldableSection:()=>c("div",{children:[x,o(_i,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?yc(m?.parent,h,y):null}):o("div",{children:x})]})})),yc=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?he(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),vc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,Nc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),wc=1e9,kc={sum:{min:1e4,max:wc},period:3},Sc=ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=ns(kc,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Cc(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),p=Tc(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(Xr,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(Lo,{label:l?.title,min:500,max:wc,...d("sum",{parse:e=>({min:Number(e),max:wc}),format:({min:e})=>String(e)})}),o(sl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(Wr,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Cc=e=>st((e?.paramsSource?.rateRows||[]).filter(vc).flatMap((e=>Nc(e.minMonths,e.maxMonths)))),Tc=e=>st(e.flatMap((e=>e||[])).filter(vc).flatMap((e=>Nc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],Ic=[{key:"10"},{key:"50"},{key:"100"}],Bc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(yn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:Ic,iconVersion:"black"})]})},Pc="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Mc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:Pc,"aria-label":`Страница ${i}`,children:i},String(t)):null},Rc={width:"24",height:"24"},Vc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Dc(1===e),...Rc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:Pc,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(Mc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:Pc,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Dc(e===n),...Rc})})]})},Dc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",zc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Vc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Bc,{itemCount:l,onItemCountChange:a}):null]}),_c=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",ln),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Ac=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(_c,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Rl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Rl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Fc=(e,t)=>o(cs,{...e,iconBgVersion:t,className:"shrink-0"}),Oc=({title:e,timestamp:t,publicId:n})=>{const l=ue(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[Fc({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Ec="/api/v1/depository",jc={startDate:void 0,endDate:void 0,query:""},Lc=ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=_t(jc),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(Ec);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Xn(Ec+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Ac,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Oc,{...e},String(e.publicId)))):o(rr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(zc,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),$c=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,Uc=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:$c(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),qc="location";function Wc(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",Yc()??{name:e}),r=i((e=>{Kc(e),n(e)}),[]),{data:s}=Xn(Hc()?null:"/api/v1/region",rt);return a((()=>{s&&!Hc()&&n(s)}),[s]),[t??{name:e},r]}const Hc=()=>Boolean(globalThis.localStorage?.getItem(qc)),Yc=()=>{try{const e=globalThis.localStorage?.getItem(qc);return e&&JSON.parse(e)}catch(e){return null}},Kc=e=>{try{globalThis.localStorage?.setItem(qc,JSON.stringify(e))}catch(e){}};var Xc;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(Xc||(Xc={}));const Gc=new Intl.NumberFormat("ru",{style:"currency",currency:Xc.RUB}),Jc=e=>e?Gc.format(e):"",Zc="text-m font-light text-secondary-text ",Qc=`${Zc} text-left`,ed=`${Zc} pl-5xl text-center`,td=`${Zc} pl-5xl text-right`,nd={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},ld=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:Qc,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:ed,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:td,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(ad)})]}))),ad=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:nd[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:Jc(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:Jc(e?.buyExchangeRate)})})]},t)},id={icon:"GpsIcon"},rd=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(cs,{...id,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),sd=(e,t,n)=>{const l=Number(od(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},od=e=>e.replace(/[^\d.,]/g,"").replace(",","."),cd=e=>Bt([[e=>e.value!==Xc.RUB&&e.oppositeValue!==Xc.RUB,()=>e.handleConvert(e.value,Xc.RUB)],[e=>e.value===Xc.RUB&&e.oppositeValue===Xc.RUB,()=>e.handleConvert(e.value,Xc.USD)],[e=>e.value===Xc.RUB&&e.oppositeValue===Xc.RUB,()=>e.handleConvert(e.value,Xc.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function dd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(rn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(yn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const md=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||Xc.RUB,selectBuy:n?.[0]?.currency?.currency||Xc.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[dd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:ud(r,d,n),value:r.inputSell,setValue:e=>pd(d,n)(e,r.selectSell,r.selectBuy)}),dd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:hd(r,d,t),value:r.inputBuy,setValue:e=>gd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),ud=(e,t,n)=>l=>{t({selectSell:l}),cd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{pd(t,n)(e.inputSell,l,a)}})},hd=(e,t,n)=>l=>{t({selectBuy:l}),cd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>gd(t,n)(e.inputBuy,l,a)})},pd=(e,t)=>(n,l,a)=>{e({inputSell:od(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(sd(n,i,l===Xc.RUB)||"")})},gd=(e,t)=>(n,l,a)=>{e({inputBuy:od(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(sd(n,i,l===Xc.RUB)||"")})};const fd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=Wc(),i=function(e){const t=e?.code||"000",{data:n}=Xn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=xd(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:Xc.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:Xc.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(ld,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(rd,{address:i?.address})]}),o(md,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),xd=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],bd=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(yd(n))})})),yd=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...he(t),children:a||null})},String(l)):null},vd=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(Er,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Fc(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),Nd=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",wd=(e=!1)=>e?"MinusIcon":"PlusIcon",kd=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Sd=ut((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(zi,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(_i,{className:u("gap-lg",Nd(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Cd({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Cd=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?kd(e):wd(e))(a,r);return"accordion"===e?o(vd,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(jr,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Td=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:Id(e)}))),Id=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Sd,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(bd,{items:e.items}):null},String(t)))),Bd=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map(Pd)}):null)),Pd=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Md)})]},String(t)),Md=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:Rd(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),Rd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Vd(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Vd=e=>e.replaceAll(/\D/g,""),Dd=d((({className:e="",index:t,text:n,...l})=>{const a=ue(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),zd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Dd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),_d=d((({className:e="",index:t,...n})=>{const l=ue(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Ad=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(_d,{index:t,...e},String(t))))}):null]}))),Fd=ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Td,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Bd,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(uc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(zd,{title:d,links:i}),o(Ad,{links:a,license:h})]})})),Od=ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(wn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:cc(i,s?.key),children:f})}):null]})})})),Ed={width:"103",height:"21"},jd={"bg-white":"color",transparent:"white"},Ld={"bg-white":"text-primary-main",transparent:"text-white"},$d=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:jd[e]},className:Ld[e],width:n?.width,height:n?.height}),Ud={"bg-white":"text-primary-text",transparent:"text-white"},qd=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...he(s),children:[$d(i,n?.image,Ed),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:Ud[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),Wd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},Hd=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:u("py-s px-lg font-light whitespace-nowrap",Wd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),Yd=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(qd,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):Kd(p,r),o(Hd,{version:a,...l})]})})),Kd=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,Xd={"bg-white":"primary",transparent:"transparent"},Gd=ut((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=Xd[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(Yd,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),Jd=(e=!1)=>e?{}:{padding:"p-0"},Zd={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},Qd=ut((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:u("relative flex flex-col",Zd[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:u("w-full",sr(r)),...Jd(l)}})})}),{childrenTypes:[]}),em=ut((e=>o(Qd,{...e})),{childrenTypes:[]}),tm=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",ps[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),nm=["байт","Кб","Мб","Гб","Тб","Пб"],lm=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...he(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",am(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),am=(e,t)=>e||t?o("span",{children:", "}):"",im=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${nm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?sm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(lm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:rm(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},rm=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,sm=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},om=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(xi,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(gi,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),cm=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(om,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[rm(a),o(Re,{font:"font-light",children:e})]})})),dm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},mm=ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",dm[r]),role:"list",children:a.map(um(d,i))}):null]})})),um=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?hm(t)(n,l):im(e,t)(n,l)},hm=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(cm,{...l,icon:e,href:pm(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},pm=e=>"href"in e,gm=ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),fm=(e,t)=>e&&"underlined"!==t?"primary":"secondary",xm=(e=[],t={})=>e.filter((({content:e={}})=>es(t,e))).length,bm=(e,t)=>e===t;const ym=(vm=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(bm,((e=bm)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>vm(n,t[e])))));var vm;const Nm=[],wm={},km={primary:"bg-white/30",secondary:"bg-main-divider"},Sm={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Cm=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":km[t],a=Sm[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Tm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},Im={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Bm={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},Pm={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Mm={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Rm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",Im[l],n?Mm[l]:Pm[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Bm[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Tm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Cm,{count:m,version:fm(n,l)})}):null]})})})),Vm=d((e=>o(e?.item?.href?Dm:zm,{...e}))),Dm=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Rm,{...e,tag:"a",item:a,onClick:l})})),zm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Rm,{item:e,onClick:l,...n})})),_m=(e,t,n)=>(l,a)=>o(Vm,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Am=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map(_m(l,a,t))}))),Fm={categories:[],extraOptions:[],propertyType:[],stage:[]},Om=ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=ns(Fm,{block:a.block,page:a.options?.page}),f=i(((e=Fm)=>p(e)),[]),x=(({hotFilters:e=Nm,filtrationState:t=wm,blocks:n=Nm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>ym(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:xm(n,t.filter),version:fm(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Am,{...x}),o(Xr,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(Wr,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Em=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),jm=d((({children:e})=>Em?e:null)),Lm="/icons/MapMarkerClusterIcon.svg",$m="/icons/MapMarkerClusterYellowIcon.svg";function Um({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=qm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=qm("workplaces",e,a),r=Wm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Wm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=Wm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const qm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Lm:$m,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Wm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Lm:$m,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Hm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},Ym={...Hm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},Km=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(Ym).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),Xm=e=>globalThis[e];function Gm(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=Xm(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(Xm(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(Xm(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const Jm={...Hm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},Zm=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(Jm).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),Qm=[55.753995,37.614069],eu=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=Gm("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?Um({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:tu(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Um({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[l?o(Ki,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(Zm,{yandexMaps:i}),o(Zm,{yandexMaps:i,direction:"out"})]}),Km(i,r,u("right-2 top-80",d))]})})),tu=e=>{const t=[lu(nu(e,0)),lu(nu(e,1))];return t.every((e=>e))?t:Qm},nu=(e,t)=>e.map((e=>e.coords?.[t])),lu=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,au={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},iu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},ru={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},su=(e,t,n)=>{const l=fm("all"===t),a=fm("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(gi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},ou=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,cu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",du=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Yt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(zi,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:cu,children:s}),o(_i,{className:cu,isUnfolded:e,children:d})]}),renderFoldButton:mu(n,l)})}):null})},mu=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:uu()})]}),uu=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),hu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),pu=()=>{},gu=e=>"all"===e?"block":"hidden",fu=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=pu,renderRemoteWorkplaceCard:s=pu,getBalloon:d=pu,getBalloonRemoteWorkplaces:m=pu,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=_t(au),[y,v,N,w]=r((()=>{const e=xu(t,f),n=xu(a,f),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,f]),[k,S]=l("all"),C={filters:bu([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:iu};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[hu(p,w),h?ou(h):null,g&&su(t,k,S),o("div",{className:u("pb-3xl",gu(k)),children:du(C)})]}),o("div",{className:"h-[600px]",children:o(jm,{children:o(eu,{points:v,isLoad:n,className:"h-full"})})})]}),c(jm,{children:[y.map(i),N.map(s)]})]})})),xu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>ru[t](e)))))},bu=e=>Object.keys(au).filter((t=>e.filter((e=>ru[t](e))).length)),yu={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},vu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",yu[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:yu[n].text,children:t})]}))),Nu=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:wu({textItems:i,subText:t,children:n,isPhone:l,...a})})),wu=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||ku(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),ku=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${Su(e)}`,children:e.trim()}):e.trim()},String(n)))),Su=e=>e.replace(/\D/g,""),Cu=d((({className:e,children:t})=>o("div",{className:u("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Tu=["ArrowDownIcon","ArrowUpIcon"],Iu=["Подробнее","Скрыть"],Bu=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:Iu[Number(e)]}),o(W,{className:"text-primary-text",name:Tu[Number(e)],width:"16",height:"16"})]}),Pu=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Vu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:Vu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(vu,{color:"green",children:Vu(s)})})]}),o("div",{className:"hidden sm:block",children:o(Cu,{className:"flex-wrap",children:m?.map(Ru)})}),o(zi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_i,{isUnfolded:e,children:o(Cu,{className:"flex-wrap",children:m?.map(Ru)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bu({isUnfolded:e,onToggle:t})})]},String(d))},Mu=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Vu(t)} №${n}`,body:e.toUpperCase()}),Ru=(e,t)=>o(Nu,{...e},String(t)),Vu=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",Du=[];const zu=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:Du},_u={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Au={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},Fu=d((({descriptionData:e,className:t})=>{const[n]=Wc(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Xn(`/api/v1/atms?regionCode=${e}`,zu);return{data:t||Du,isLoad:!t&&!n}}(l);return o(fu,{className:t,filterItems:Ou,data:a,isLoad:i,initFilterState:_u,renderCard:Pu,getBalloon:Mu,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Ou=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Au[t](e))),n=!l.length||l.some((t=>Au[t](e)));return t&&n}))},Eu=e=>{const t=Lu(e);return o(Nu,{label:"Режим работы",value:t,className:"max-w-none"})},ju=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Lu=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[ju({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),ju({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},$u=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Uu=e=>$u.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),qu=e=>{if(!e)return null;const t=Wu(e);return c(Cu,{className:"border-none",children:[o(Nu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Hu)})}),o(Nu,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},Wu=e=>{const t=$u.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Hu=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),Yu=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Nu,{label:"Валюта",value:e.currency}):null,t?o(Nu,{label:"Купить",value:String(t)}):null,n?o(Nu,{label:"Продать",value:String(n)}):null]},String(l)),Ku=(new Date).getDay(),Xu=e=>{const[t]=e?.slice(Ku-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(vu,{color:"green",children:a}):null,n&&i?o(vu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(vu,{color:"red",children:"Выходной"})},Gu=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",Ju=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Nu,{label:e,value:t&&n?n:"",subText:Gu({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),Zu=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,Qu=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,eh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,th=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=Uu(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),Xu(h)]}),o("div",{className:"hidden sm:block",children:nh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(zi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_i,{isUnfolded:e,children:nh({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bu({isUnfolded:e,onToggle:t})})]},String(u))},nh=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Uu(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Cu,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Nu,{label:"Факс",value:t,isPhone:!0}),o(Nu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Nu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Nu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Nu,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Nu,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Cu,{children:o(Nu,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(Ju)})})}):c(Cu,{children:[o(Nu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Hu)})}),Eu(d)]}),r?.businessScheduleVisibleTag?qu(r?.businessScheduleDescription):null,s?.currencies?.length?o(Cu,{className:"flex-wrap",children:s?.currencies?.map(Yu)}):null]})},lh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Uu(e),n=e?Lu(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?Zu(n):eh(n,l):Qu(n):null})(n)}`;return{header:l,body:i}},ah=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:ih({workScheduleDescription:t})}),o(zi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(_i,{isUnfolded:e,children:ih({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Bu({isUnfolded:e,onToggle:t})})]},String(n)):null,ih=({workScheduleDescription:e})=>c("div",{children:[c(Cu,{className:"flex",children:[o(Nu,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Nu,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Nu,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Nu,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Nu,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),rh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),sh={branches:[],remoteWorkplaces:[]};const oh=async e=>await it(e,{method:"GET"})||sh,ch=d((({className:e})=>{const[t]=Wc(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Xn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,oh);return{data:t||sh,isLoad:!t&&!n}}(n);return o(fu,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:th,renderRemoteWorkplaceCard:ah,getBalloon:lh,getBalloonRemoteWorkplaces:rh,title:`Офисы филиала ${t?.name}`})})),dh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(ch,{}):o(Fu,{descriptionData:e})})})),mh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),uh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...l,children:o(Ar,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),hh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Oe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?ph({__html:i,richVersion:r}):null,gh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),gh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),gh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),ph=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),gh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,fh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),xh=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(ii,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(ii,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),bh=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(yn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),yh=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(bh,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(bh,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),vh=["От 1 дня","До 365 дней"],Nh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(sl,{min:1,max:365,value:e,items:vh,onChange:t})]}))),wh=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(bh,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(bh,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),kh=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(yh,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Sh(m)}),o(Nh,{days:a,setDays:e=>m({days:e})}),o(wh,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Ch(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(xh,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Sh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Ch=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Th=d((({days:e,tariffs:t=[]})=>{const n=Bh(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[Ih("Аренда за",e),Ih("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),Ih=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Bh=(e,t)=>{const n=Ph(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},Ph=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Mh=(e,t)=>e.find((e=>e.branchCode===t)),Rh=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Mh(l,n.selectedBranch),d=Vh(s?.safeBoxCaseVolumes),m=Dh(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=zh(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(kh,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Th,{days:n.days,tariffs:u})]})})),Vh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],Dh=(e,t)=>e?.find((e=>e.volume===t)),zh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,_h=[];const Ah=async e=>await it(e,{method:"GET"})||_h,Fh=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=ba(),p=Oh(m.selectedRegion,h),f=function(e){const{data:t}=Xn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Ah);return t||_h}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Mh(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Rh,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(eu,{points:b,className:"h-[640px]"}):null]})})),Oh=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Eh={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},jh=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Lh(e,n)(l,a)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[$h(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Lh=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Uh(e,i),s=i?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:qh({step:n,iconVersion:a,i:l,stepVersion:t})})})},$h=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",Eh.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),Uh=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",qh=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Oe(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===l?Eh.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},Wh=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(jh(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),Hh=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),Yh=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(fi,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),Kh=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(Yh,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function Xh(e){throw new Error(e)}const Gh=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:Xh(e)}}))),[c,d]),n},Jh=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const Zh=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(Qh,{...e},String(t))))})]}):null,Qh=d((({icon:e,...t})=>{const n=ue(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),ep=(e,t)=>n=>n.name?o(dc,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:cc(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,tp=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(ln,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),np=d((({foreignOffices:e,branches:t})=>{const[n,a]=Wc(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),u=ap(ba()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(u,lp),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(xi,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(dc,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(tp,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&Jh(e.toLowerCase())(d.toLowerCase())>=.8)).map(ep(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(ep(x,f))]},e)))}),Zh(e)]});var f,x})),lp=e=>e.name?.charAt(0)||"",ap=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),ip=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(np,{...e}),n),close:n}})(n||{}),[{name:r}]=Wc(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(Yh,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),rp="burgerMenuDialog",sp=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=Gh(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(rp,i);return[r,{toggle:()=>{r?n():l(o(ip,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:rp})}}]},op=[],cp=ut((({sticky:e,...t})=>{const{menuItems:n=op}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),x(""),y()}),[y]),N=tn(v),w=s(null),[k,{toggle:S}]=sp({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=Kh({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:u}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(dp(I,"left",{activeIndex:h,currentItemPosition:f})),o(Hh,{item:a,isActive:k,onClick:e=>T(e)}),u.map(dp(I,"right",{activeIndex:h,currentItemPosition:f}))]})})})),dp=(e,t,n)=>(l,a,i)=>o(Hh,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),mp="hidden sm:flex absolute z-40",up={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},hp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Cr({itemCount:t?.length||0});return a((()=>pp(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(ur,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:up[i].item,gap:up[i].gap,children:t.map(_m(n,l,i))}),s.canScrollLeft?o(Mr,{className:u("left-6",mp,up[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(Rr,{className:u("right-6",mp,up[i].buttonTop),onClick:s.scrollRight}):null]})})),pp=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},gp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},fp=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(gp[t].wrapper,e),children:o(hp,{className:gp[t].component,tabsType:t,...n})}):null,xp=ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=bp(n??{}),p=V(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Np(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=vp(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[fp({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:yp(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(vp)?.filter(Boolean)||[]}),bp=({__id:e,anchor:t})=>t??e??"tabs",yp=(e,t)=>t?.length?t:e,vp=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Np=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),wp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},kp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:wp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Sp=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Cp={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Sp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Tp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return Ip({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),Ip=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Cp))return null;return o(Cp[n],{...t,...l})},Bp=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Tp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),Pp=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Mp=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Rp=d((({rows:e})=>{return o(ur,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${Pp(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?Mp(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Vp=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Rp,{rows:t.rowsData})})})]},l)}))}))),Dp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),zp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:Dp(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),_p=ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(zp,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Vp,{activeTabIndex:r,items:m}),o(Sp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Sp,{onClick:n,isOpen:!0})]})})),Ap=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o(_p,{...t,onClick:n})}):null]}))),Fp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(Ap,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(kp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Bp,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Op({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o(Pr,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o(Pr,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const Ep=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Op({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),jp=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(Fp,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(zi,{renderFoldableSection:({isUnfolded:e})=>c(Ep,{controls:x,children:[y,o(_i,{isUnfolded:e,children:v})]}),renderFoldButton:Lr}):o(Ep,{controls:x,children:b})})]})})),Lp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?$p():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Up(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),$p=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Up=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),qp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),Wp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(qp,{prefix:t,unit:n,suffix:l})})})),Hp={AdTile:pt,ApplicationForm:Pi,ApplicationLeadForm:lr,BankAccountFiltration:is,BenefitsBlock:ds,BonusBenefitsBlock:hs,ButtonsBlock:gs,CalculatorBonus:Ms,CalculatorBusinessDeposit:Xs,CalculatorCredit:mo,CalculatorDeposit:Po,CalculatorRefinancing:Fo,CardTransfer:qo,Carousel:Zo,CarouselCard:nc,CarouselCatalogCard:ac,CarouselLinks:sc,CarouselRecommendationCard:gc,CarouselTariffsCard:bc,DepositFiltration:Sc,Depository:Lc,ErrorBlock:Uc,ExchangeRateTile:fd,Footer:Fd,GrantSupport:Od,Header:Gd,Headline:C,HorizontalLayout:em,ImgBlock:tm,LinkDocs:mm,MobileAppTile:gm,MortgageFiltration:Om,OfficesAtmsMap:dh,Placeholder:mh,ProductBlock:ht,ProductGallery:uh,RepresentativeOfficeInfo:hh,RichTextBlock:fh,RollupItem:Sd,SafeDepositRental:Fh,StepsBlock:Wh,StickyBottomMenu:cp,TabsLayout:xp,TariffsTable:jp,TextBlock:Lp,UnitBlock:Wp,VerticalLayout:Qd},Yp=me((()=>{a((()=>{Ct()}),[]);const e=Dt();en(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const Kp="cookie",Xp=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=Qt();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(Kp)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(Kp,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(fi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),Gp=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=Gh({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return en(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),Jp=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:Xh(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return en(globalThis.document,"keydown",r),e?o("div",{className:u("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),Zp="header",Qp="footer",eg="sticky-footer",tg={},ng=d((({className:e,data:t=tg,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);Yp();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:Zp})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:Qp})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:eg})}):null,o(Gp,{}),o(Jp,{}),o(Xp,{__html:d?.cookieContent?.__html})]})}));Object.assign(ng,{childrenTypes:[],slots:()=>[Zp,Qp,eg]});e.Blocks=Hp,e.ContentPage=ng,e.handlerDecorator=me,e.joinList=Yr,e.packageVersion="0.14.587",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).UniMobileBlocks={})}(this,(function(e){"use strict";let t;const n=e=>(...n)=>t[e](...n),l=n("useState"),a=n("useEffect"),i=n("useCallback"),r=n("useMemo"),s=n("useRef"),o=(...e)=>globalThis._uni._jsx(...e),c=(...e)=>globalThis._uni._jsxs(...e),d=e=>{const t=e;return t._tmpl||(t._tmpl=globalThis.__UNI_REACT__?e:m(e)),t._tmpl},m=e=>{function t(t,n){const{children:l,...a}=t||{},i=n?.slots?.default,r=l||i&&i();return e(Object.assign(a,r&&{children:r}),n)}return t.inheritAttrs=!1,t},u=(...e)=>e.map((e=>h(e)?Object.entries(e).filter((([,e])=>e)).map((([e])=>e)):e)).flatMap((e=>e)).filter(Boolean).join(" "),h=e=>Boolean(e&&"object"==typeof e&&!Array.isArray(e)),p={primary:"bg-white text-primary-text",secondary:"bg-primary-main text-white",gray:"bg-main-divider text-primary-text",transparent:"bg-transparent text-primary-text","":""},g=d((({className:e,version:t="primary",isTheme:n=!0,defaultPadding:l="p-xl",padding:a,block:i,tag:r="section",role:s,children:c,style:d})=>{const m=t&&n;return o(r,{className:u("@container font-sans",{group:m},p[t],a||l,e),...m?{"data-ver":t}:{},...i?.anchor?{id:i.anchor}:{},role:s,style:d,children:c})})),f=d((({className:e,size:t})=>o("figure",{className:u("m-0 mt-xl min-w-[80%]",e),children:x(t)}))),x=(e=3)=>y(100,e).map((e=>Math.floor(e))).map(b),b=(e,t)=>o("div",{style:{width:`${e||100}%`},className:"h-4 mt-xs bg-secondary-dark relative overflow-hidden animate-pulse"},String(t)),y=(e,t)=>[e].concat(t>0?y(e/1.618,t-1):[]),v={h1:"h1",h2:"h1",h3:"h2",h4:"h2",h5:"h3",h6:"h3"},N={h0:"text-h0",h1:"text-h1",h2:"text-h2",h3:"text-h3",h4:"text-h4",h5:"text-h5",h6:"text-h6"},w=d((({className:e="",headingType:t="h3",as:n="h3",title:l,children:a})=>{const i=v[n]||"h3";return o(i,{role:"heading",className:u("font-sans m-0",N[t],e),children:l||a})})),k=d((({children:e,...t})=>o("p",{className:u("font-sans",Object.values(t)),children:e}))),S={XXL:{title:{headingType:"h0",as:"h1"},descriptionSize:"text-h5",descriptionWeight:"font-normal",descriptionStyle:"mt-xl"},XL:{title:{headingType:"h1",as:"h1"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},L:{title:{headingType:"h2",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-m"},M:{title:{headingType:"h3",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-s"},S:{title:{headingType:"h4",as:"h2"},descriptionSize:"text-xl",descriptionWeight:"font-light",descriptionStyle:"mt-xs"},XS:{title:{headingType:"h5",as:"h2"},descriptionSize:"text-m",descriptionWeight:"font-light",descriptionStyle:"mt-xs"}},C=d((({className:e,version:t="",headlineVersion:n="XL",title:l,description:a,align:i="text-center",as:r,isEmbedded:s=!1,isTheme:d=!1,...m})=>{const h=S[n],p={marginTop:h.descriptionStyle};return c(g,{className:u({"@container-normal":s},e),defaultPadding:s?"":"p-6xl",version:t,isTheme:d,...m,children:[l?o(w,{className:u("whitespace-pre-wrap",i),...h?.title,as:r||h?.title.as,title:l}):null,a?o(k,{size:h.descriptionSize,font:h.descriptionWeight,align:i,...p,children:a}):null]})})),T=({blockClassName:e,block:t,render:n})=>n({blockClassName:e,block:t}),I=[];function B(e,t,{className:n,...l}={}){const{key:a,blockDecorator:i=T,blocksRegistry:r={},ancestors:s=I}=t,{type:c}=e;c&&c in r||console.warn(`No block with "${c}" is registered`);const d=c&&r[c];return i({blockClassName:u(e.style?.length?e.style:"col-span-12",n),block:e,ancestors:s,render:({block:n,blockClassName:i})=>{const{content:r}=n;return d?o(d,{className:i,block:e,options:t,...r,...l},a):null}},a)}const P=[],M=(e,{key:t,ancestors:n=P,slotName:l=null,extraProps:a,renderProps:i=B,...r})=>{const s=a?(e,t)=>B(e,t,a):i;return(e||[]).map(((e,a)=>s(e,{...r,key:`${t||e.type}-${a}`,ancestors:r.parent?[...n||P,[r.parent,l]]:n},a)))};function R({block:e,options:t,children:n,extraProps:l,renderProps:a}){return n||(e&&t?M(e.blocks,{...t,parent:e,extraProps:l,renderProps:a}):null)}function V(){return V._impl()}V._impl=()=>({isReady:!1,href:globalThis.location?.href||"/",pathname:globalThis.location?.pathname||"/",query:{},push:()=>{},replace:()=>{},back:()=>{}}),V.setup=e=>{V._impl=e};const D=["CDN","BASE_PATH"],z=new Proxy({_:{},setup(e){this._=e}},{get(e,t){const n=e._[t]||e[t];return D.includes(t)?(e=>e&&!e.endsWith("/")?`${e}/`:e)(n):n}}),A=e=>Boolean(e?.includes(":")),_=(e,t)=>Boolean(e&&!A(e)&&(!t||"_self"===t)),O=e=>Boolean(e?.startsWith("#")),F=(...e)=>e.filter(Boolean).join("/").replace(/\/+/g,"/").replace(/^(.+):\//,"$1://").replace(/^file:/,"file:/").replace(/\/(\?|&|#[^!])/g,"$1").replace(/\?/g,"&").replace("&","?"),E=(e,t)=>Boolean(t&&e&&e.startsWith(t)&&["/"===t,e===t,"/"===e[t.length]].some(Boolean));var j=Object.freeze({__proto__:null,isURL:A,isLocalURL:_,isHash:O,withoutQuery:e=>(e||"").replace(/\?.*/,"").replace(/\/$/,""),joinPath:F,hasPrefix:E});const L="/api/",$=`${L}v1/storage`,U=e=>(t,n)=>{if([!t,A(t),O(t),[z.CDN,L].some((e=>E(t,e)))].some(Boolean))return t;if(((e="")=>/^[a-f0-9]{8}-[a-f0-9]{4}-4[a-f0-9]{3}-[89aAbB][a-f0-9]{3}-[a-f0-9]{12}(\/revs\/[0-9]{1,20})?$/.test(e))(t))return`${$}/${t}/attachment`;const l=t?.startsWith("/");return F(E(t,n)?"":n,l?"/":e.pathname?.split("/").slice(0,-1).join("/"),t)},q={"":"",normal:"",color:"text-primary-main",black:"text-black",white:"text-black",gray:"text-gray"},W=d((({className:e="",imageClassName:t="",name:n="",alt:l=`Иконка ${n}`,title:a=l,iconVersion:i="color",width:r,height:s})=>{const d=V(),m="normal"===i?`${n}.svg`:`sprites.svg#${n}`,h=U(d)(F(z.CDN,"/icons/",m));return"normal"===i?o("img",{className:e,src:h,alt:l,title:a,"aria-hidden":"true",width:r,height:s,style:H(e,s)}):o(K,{className:e,children:c("svg",{className:u(Y(r),q[i],{invert:"white"===i},t),width:r,height:s,"aria-hidden":"true",children:[a?o("title",{children:a}):null,l?o("desc",{children:l}):null,o("use",{href:h,xlinkHref:h})]})})})),H=(e,t)=>{return e?.includes("h-")?{}:{height:(n=t,n&&!/\D/.test(n)?`${t}px`:t),width:"auto"};var n},Y=e=>e?"":"w-full h-full",K=d((({className:e,children:t})=>e?o("div",{role:"img",className:e,children:t}):t)),X=new Proxy({_:{},setup(e){this._=e}},{get:(e,t)=>e._[t]||e[t]});function G(e=""){try{const[,...t]=new URL(e).pathname.split("/");return`/${t.filter(Boolean).join("/")}`}catch(e){return""}}const J=e=>t=>{const n=t?.startsWith("/wcms-resources")?"":G(X.SITE_URL);return t&&!A(t)?U(e)(t,n):t},Z=(e,t)=>e?.media&&t?.media?e.media-t.media:0,Q=d((({className:e="",image:t,imageClassName:n=""})=>{const l=V();return c("picture",{className:e,children:[t?.sources?.length?t.sources.filter((e=>e?.src)).sort(Z).map((({src:e,format:n,media:a},i)=>o("source",{srcSet:J(l)(e),type:te(n),media:a?`(max-width: ${a}px)`:"",width:t?.size?.width,height:t?.size?.height},`${i}_${e}`))):null,t?.src?ee({...t,src:J(l)(t.src)},n):null]})})),ee=(e,t="")=>o("img",{src:e.src,className:u("object-contain",t),alt:e?.alt||e?.title||"",title:e?.title||"",style:{width:e?.size?.width?`${e.size?.width}px`:"100%",height:e?.size?.height?`${e.size?.height}px`:"auto"},width:e?.size?.width,height:e?.size?.height}),te=e=>e?`image/${String(e)}`:void 0,ne=d((({className:e="",image:t,imageClassName:n="",...l})=>t?.src||t?.icon?t.icon?o(W,{className:e,imageClassName:n,iconVersion:t?.iconVersion,name:t.icon,...l}):o(Q,{className:e,imageClassName:n,image:t}):null)),le={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active",white:"text-primary-main bg-white hover:text-white hover:bg-primary-hover active:bg-white active:text-primary-main",link:"text-primary-main",transparent:"",gray:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active","":""},ae="bg-main-divider text-main-disabled",ie={primary:ae,secondary:ae,white:ae,link:"",transparent:"",gray:ae,"":""},re="text-center font-sans select-none",se={primary:"group-hover/btn:brightness-0 group-hover/btn:invert",secondary:"group-hover/btn:brightness-0 group-hover/btn:invert",white:"group-hover/btn:brightness-0 group-hover/btn:invert",link:"text-primary-main",transparent:"",gray:"group-hover/btn:brightness-0 group-hover/btn:invert","":""},oe=({className:e,rounded:t,version:n})=>[re,"border border-transparent inline-block cursor-pointer no-underline focus:border-primary-text focus:border h-fit",n?le[n]:"",t?"rounded-full":"rounded-md",e].join(" ");const ce=new class{subscribers={};subjectsStateMap={};subscribe(e,t){this.subscribers[e]=(this.subscribers[e]||[]).concat(t);const n=this.subjectsStateMap[e];return n&&t(n),()=>{this.unsubscribe(e,t)}}unsubscribe(e,t){this.subscribers[e]=this.subscribers[e]?.filter((e=>e!==t))}fire(e,t){e in this.subjectsStateMap&&(this.subjectsStateMap[e]=t),this.subscribers[e]?.forEach((e=>e(t)))}subject(e,t){this.subjectsStateMap[e]=t}},de=()=>({open:(e,t={})=>ce.fire("dialog",{type:"open",dialog:e,...t}),close:()=>ce.fire("dialog",{type:"close"}),closeAll:()=>ce.fire("dialog",{type:"close",all:!0})}),me=e=>me._impl(e);function ue(){const e=G(X.SITE_URL),t=V(),{closeAll:n}=de();return e=>{const n=U(t)(e.href);return{...e,href:n,"aria-label":e.text,onClick:me(l({...e,href:n}))}};function l({href:l,target:a,onClick:i}){return r=>{i&&i(r);const s=!E(l,e||"/");l&&!s&&_(l,a)&&(n(),r?.preventDefault(),t.push(((e,t="")=>e.replace(t,"")||"/")(l,e)))}}}me._impl=e=>e,me.setup=e=>{me._impl=e};const he=e=>{if(!Array.isArray(e)||!e.length)return{};try{return{"data-aspects":JSON.stringify(e)}}catch(e){return{}}},pe=d((e=>{const{text:t,aboveText:n,appendLeft:l,appendRight:a,version:i="primary"}=e,r=fe(e)&&"hidden lg:block";return c("div",{className:u(ge(e),"flex gap-xs"),children:[l?o("div",{className:u(r,se[i]),children:l}):null,fe(e)?c("div",{className:"whitespace-pre",children:[n?o("div",{className:"text-xs font-light text-left",children:n}):null,o("div",{className:"text-left "+(n?"text-s -mt-3xs":"text-l"),children:t})]}):null,a?o("div",{className:u(r,se[i]),children:a}):null]})})),ge=e=>{const{version:t,aboveText:n,rounded:l}=e;if("link"===t)return"";const a=""+(n?"py-2.5 px-9":"py-4 px-9");return u("group/btn items-center justify-center",fe(e)?a:"h-12 w-12 m-auto",{"rounded-full":l})},fe=({text:e,aboveText:t,appendLeft:n})=>Boolean(e||t||!n),xe=({className:e,rounded:t,version:n})=>["inline-block",re,n?ie[n]:"",t?"rounded-full":"rounded-md",e].join(" "),be=d((({disabled:e,children:t,method:n="LINK",href:l,...a})=>{const r=(({method:e,href:t})=>i((n=>{if("POST"!==e||!t)return;n.preventDefault(),n.stopPropagation();const{origin:l,pathname:a,searchParams:i}=new URL(t||""),r=document.createElement("form");r.setAttribute("method","POST"),r.setAttribute("action",[l,a].join(""));for(const[e,t]of i.entries()){const n=document.createElement("input");n.setAttribute("type","hidden"),n.setAttribute("name",e),n.setAttribute("value",t),r.appendChild(n)}document.body.appendChild(r),r.submit()}),[]))({method:n,href:l}),s=ue()({onClick:r,href:l,...a}),c=t??o(pe,{...s});return o(e?ve:ye,{...s,children:c})})),ye=d((({className:e="",href:t,rel:n,target:l,ariaLabel:a,version:i,rounded:r,onClick:s,type:c,data:d,children:m,text:u})=>o("a",{className:oe({className:e,version:i,rounded:r}),href:t,rel:n,target:l,"aria-label":a||`Ссылка на ${u}`,role:t?"link":"button",onClick:s,type:c,...he(d),children:m}))),ve=d((({className:e,ariaLabel:t,version:n,rounded:l,children:a})=>o("button",{type:"button","aria-disabled":"true","aria-label":t,tabIndex:-1,className:xe({className:e,rounded:l,version:n}),children:a})));function Ne({version:e,handleClick:t,text:n="Вернуться назад",alwaysVisible:l=!1}){if(!n)return null;const a="primary"===e?"white":"black",i="primary"===e?"bg-primary-main":"bg-white";return c("div",{className:u(l?"flex":"hidden sm:flex","items-center gap-s"),children:[o("div",{className:u(oe({className:"w-12 h-12 min-h-12 min-w-12 flex items-center justify-center",rounded:!0}),i),onClick:t,children:o(ne,{className:"w-4 h-4",image:{icon:"ArrowLeftIcon",iconVersion:a}})}),o(be,{version:"link",className:"group-data-secondary:text-white",text:n,ariaLabel:n,onClick:t,type:"button"})]})}const we=()=>{const[e,t]=l(true);return a((()=>{const e=globalThis.matchMedia?.("(max-width: 1024px)"),n=()=>{t(Boolean(e?.matches))};return e?.addEventListener("change",n),e?.matches&&t(Boolean(e.matches)),()=>{e?.removeEventListener("change",n)}}),[]),e},ke={start:"@xl:self-start",center:"@xl:self-center",end:"@xl:self-end"},Se=(e,{className:t,imageAlign:n})=>e?o("div",{className:u("shrink-1/2 justify-self-center",n&&ke[n],t),children:e}):null,Ce=d((({className:e,version:t="primary",defaultPadding:n,padding:l="",title:a,buttons:r,leftImage:s,rightImage:d,imageAlign:m,insetTitle:h,isImageAlwaysOnRight:p=!1,isImageSecondary:g=!1,backwardButton:f,children:x,...b})=>{const y=we(),v=V(),N=i((()=>v.back()),[]),w=b.options?.page?.common?.backwardButton,k=f&&!y;return c("div",{className:u("relative flex flex-col gap-3xl overflow-hidden",l||n,e),children:[k&&Ne({version:t,handleClick:N,text:w}),a?o("div",{className:"relative h-full",children:a}):null,c("div",{className:u("grow relative flex flex-col @xl:flex-row gap-3xl w-full",{"self-start @xl:w-auto":s}),children:[Se(s,{imageAlign:m,className:"mx-auto"}),c("div",{className:u("grid gap-3xl items-center md:items-stretch",{"@xl:grid-cols-2 auto-cols-fr":d,grow:!s},"h-full","auto-rows-[max-content_1fr]"),children:[c("div",{className:"grow space-y-lg min-w-fit",children:[h,x]}),Ie(R({...b,extraProps:{className:"@container-normal"}})),Se(d,{className:u("@xl:justify-self-end @xl:col-start-2",{[Te(p)]:r,"col-start-2 self-center":p,"hidden @xl:block":g}),imageAlign:m}),r?o("div",{className:"self-end",children:r}):null]})]})]})})),Te=e=>u(e?"row-span-2":"@xl:row-span-2"),Ie=e=>e?.length?o("div",{className:"flex items-start justify-end",children:e}):null,Be=(e,t="normal")=>e?.icon||e?.src?o("div",{className:u("sm:w-12 sm:h-12 sm:min-w-12 w-11 h-11 min-w-11 box-border flex items-center justify-center rounded-icon","normal"===t?"bg-secondary-light text-primary-main":"bg-primary-main text-black group-data-secondary:bg-white/30 group-data-secondary:text-black"),children:o(ne,{className:"w-6 h-6",image:{...e,iconVersion:e.iconVersion||t}})}):null,Pe=d((e=>{const{__html:t="",richVersion:n="",itemSize:l="list-m",isDotted:a=!0}=e,i=a?"":"without-dots";return t&&"<p><br></p>"!==t.replace(/<\/?[^>]+\/?>/g,"").trim()?o("div",{"data-component":"rich-text-container",children:o("div",{className:u(n,l,"md-container group-data-secondary:text-white group-data-gray:text-secondary-text",i),dangerouslySetInnerHTML:{__html:t}})}):null})),Me=(e,t)=>e?o(k,{font:"font-light",size:"text-m",color:"text-secondary-text group-data-secondary:text-white",children:e},`description-${t}`):null,Re=d((({children:e,...t})=>o("span",{className:u("font-sans",Object.values(t)),children:e}))),Ve=(e,t)=>e?o(Re,{color:"text-primary-text group-data-secondary:text-white",size:"text-h6",children:e},`label-${t}`):null,De=(e,t)=>["label"in e?Ve(e.label,t):null,"description"in e?o("span",{className:e.descriptionClassName,children:Me(e.description,t)},String(t)):null,"__html"in e?o(Pe,{...e},`rte-${t}`):null],ze=d((({className:e,benefitsVersion:t,...n})=>c("div",{className:u("flex gap-m min-w-56 items-center",e),role:"listitem",children:["icon"in n?Be(n.icon,t):null,o("div",{children:De(n)})]}))),Ae=d((({className:e,benefitsVersion:t="normal",benefits:n})=>n?.length?o("div",{className:u("flex gap-x-m gap-y-s flex-col",e),role:"list",children:n.map(((e,n)=>o(ze,{benefitsVersion:t,...e},String(n))))}):null)),_e=d((({className:e,benefits:t})=>t?.length?o("div",{className:u("grid grid-cols-[max-content_1fr] auto-rows-auto items-baseline gap-x-m gap-y-xs",e),role:"list",children:t.flatMap(De)}):null)),Oe=d((({isTabularBenefits:e,...t})=>o(e?_e:Ae,{...t}))),Fe=e=>Boolean(e?.src||e?.icon),Ee=(e,{className:t,buttonClassName:n,isVertical:l}={})=>e?.length&&e.some((e=>e?.text||e?.icon?.icon))?o("div",{className:u("flex",l?"flex-col gap-xs justify-items-stretch":"flex-wrap @xl:flex-nowrap gap-lg sm:gap-m w-full @lg:w-auto",t),role:"group",children:e.map(je(n))}):null,je=(e="")=>(t,n)=>{const{text:l,icon:a,iconRight:i,version:r,...s}=t||{},c=Le(a,r),d=Le(i,r);return l||a?.icon?o(be,{className:u("basis-full @lg:basis-auto",e),appendLeft:$e({...a,iconVersion:c}),appendRight:$e({...i,iconVersion:d}),version:r,text:l,...s},n?String(n):""):null},Le=(e,t="secondary")=>{const n="secondary"===t?"color":"white";return e?.iconVersion||n},$e=e=>Fe(e)&&o(ne,{image:e,width:String(e?.size?.width||24),height:String(24)}),Ue=(e=0,{fixed:t}={})=>(n=0)=>new Intl.NumberFormat("ru-RU",{minimumFractionDigits:t?e:0,maximumFractionDigits:e}).format(Number(n)||0),qe=d((({priceList:e})=>e?.length?o("div",{className:"flex flex-wrap xl:flex-nowrap xl:bg-main-divider xl:rounded-md p-xs gap-xl",role:"list",children:e.map(We)}):null)),We=({label:e,amount:t,unit:n},l)=>c("div",{className:"basis-full flex flex-col-reverse sm:flex-row sm:justify-between sm:bg-main-divider sm:py-m sm:px-lg sm:rounded-md items-baseline whitespace-pre",role:"listitem",children:[o(Re,{font:"font-light",size:"text-l",color:"text-secondary-text",children:e}),t?c("span",{className:"font-sans text-h6 sm:text-primary-main text-primary-text",children:[Ue(2)(t)," ",n||"₽"]}):null]},String(l)),He=d((({className:e,tags:t})=>t?.length?o("div",{className:u("flex flex-wrap gap-xs",e),role:"list",children:t.map(Ye)}):null)),Ye=(e,t)=>o("div",{className:"p-xs border-solid border rounded-md border-gray",role:"listitem",children:o(Re,{size:"text-m",font:"font-light",children:e})},String(t)),Ke={XXL:"list-l",XL:"list-l",L:"list-m",M:"list-m",S:"list-s",XS:"list-s"},Xe=d((({className:e,padding:t,defaultPadding:n,title:l,description:a,headlineVersion:i="L",align:r="text-left",benefitsVersion:s,isTabularBenefits:d,isDotted:m=!0,benefits:u,__html:h,richVersion:p,isFullWidthTitle:g,priceList:f=[],tags:x=[],buttons:b,image:y,imageOptions:{imageAlign:v="center",directionRight:N=!0,isImageAlwaysOnRight:w,isImageSecondary:k=!1}={},backwardButton:S,children:T,...I})=>{const B=y?.src?o(ne,{image:y}):null,P=o(C,{title:l,description:a,headlineVersion:i,align:r,isEmbedded:!0}),M=u?.filter((e=>"__html"in e||"label"in e||"description"in e));return o(Ce,{className:e,padding:t,defaultPadding:n,...g?{title:P}:{insetTitle:P},...Ge(B,N),isImageSecondary:k,imageAlign:v,isImageAlwaysOnRight:w,buttons:Ee(b),backwardButton:S,...I,children:c("div",{className:"flex flex-col sm:gap-xl gap-4xl",children:[M?.length?o(Oe,{benefitsVersion:s,isTabularBenefits:d,benefits:M}):null,h?o(Pe,{richVersion:p,__html:h,isDotted:m,itemSize:Ke[i]}):null,T,f?.length?o(qe,{priceList:f}):null,Je(x)]})})})),Ge=(e,t)=>t?{rightImage:e}:{leftImage:e},Je=e=>e?.length?o(He,{tags:e}):null,Ze=e=>Boolean(e&&Array.isArray(e)),Qe=e=>Boolean(e&&!Array.isArray(e)&&"object"==typeof e),et=(e,t)=>{return n=e,Boolean(Qe(n)&&"string"==typeof n.$ref)?t.ref(e):Qe(e)?t.record(e):Ze(e)?t.array(e):t.scalar?t.scalar(e):e;var n},tt=(e,t)=>(e=>e.includes("#")?e.substring(e.indexOf("#")+1).split("/").filter(Boolean):[])(t).reduce(nt,e),nt=(e,t)=>e&&t?Qe(e)?e[t]:Ze(e)?e[parseInt(t,10)]:e:e,lt=(e,t)=>et(e,{ref:({$ref:e,...n})=>lt(e?tt(t(e),e):n,t),record:e=>Object.entries(e).map((([e,n])=>({[e]:lt(n,t)}))).reduce(((e,t)=>Object.assign(e,t)),{}),array:e=>e.map((e=>lt(e,t)))}),at=(e,t,n=[])=>{et(e,{ref:e=>t(e.$ref,n),record:e=>{for(const l in e)at(e[l],t,[...n,l])},array:e=>{for(let l=0;l<e.length;l++)at(e[l],t,[...n,l])}})};async function it(e,t){try{return e?await rt(e,t):null}catch(e){console.error(e)}return null}const rt=async(e,t)=>(await fetch(e,{...t,headers:{...t?.headers,"Content-Type":"application/json"}})).json(),st=e=>[...new Set(e)],ot={},ct=["/portal-resources"],dt=(e,t)=>lt(e,(e=>t?.[e])),mt=(e,t)=>{const n=(e=>{const t=[];return at(e,(e=>t.push(e))),t})(e),[i,r]=l({});return a((()=>{n.length&&(async e=>Object.fromEntries((await Promise.allSettled(st(e).filter((e=>!ct.some((t=>e.startsWith(t))))).map((async e=>[e,ot[e]||=await rt(e)])))).filter((e=>"fulfilled"===e.status)).map((({value:e})=>e))))(n).then(r)}),[n.join()]),n.length?dt(e,{...t,...i}):e};function ut(e,t={}){const n=d((t=>{const n=mt((({block:e,options:t,className:n,defaultPadding:l,padding:a,isTheme:i,version:r,children:s,...o})=>o)(t),t.options?.page?.fallback);return o(e,{...t,...n})}));return Object.assign(n,t),n}const ht=ut((({className:e,padding:t,defaultPadding:n,...l})=>o(g,{className:u("overflow-hidden flex flex-col gap-3xl box-border",e),padding:"p-0",...l,children:o(Xe,{defaultPadding:n||"p-6xl",padding:t,className:"grow h-full",...l})})),{childrenTypes:["UnitBlock"]}),pt=d((e=>{const{items:t}=e.options?.page?.adSourceBook??{},n=r((()=>gt(0,t?.length)),[t]),l=t?.[n];return l?o(ht,{suppressHydrationWarning:!0,...l,...e}):o(g,{...e,children:o(f,{})})})),gt=(e=0,t=0)=>Math.floor(Math.random()*(t-e)+e),ft=(e,t=!1)=>{if("string"==typeof e)return e.split("-").reverse().join(".");{const n=String(e.getDate()).padStart(2,"0"),l=String(e.getMonth()+1).padStart(2,"0"),a=String(e.getFullYear());return t?`${a}-${l}-${n}`:`${n}.${l}.${a}`}},xt=e=>e?.replace(/[^+\d]/g,"");const bt=e=>e?{phone:xt(e)}:{},yt=(e,t="birthday")=>e?{[t]:ft(e)}:{},vt=(e,t=!0)=>({[t?"regionBranch":"region"]:e}),Nt=(e,t=!0)=>({[t?"email":"mail"]:e}),wt=(e="")=>e&&"+7 ("!==e?{secondaryPhoneNumber:xt(e)}:{},kt=({aspectsAttributes:e,aspects:t,ev:n})=>{for(const{aspectName:l,params:a}of e)t[l??""]?.(n,a)},St="rshb-query-params";function Ct(){const e=globalThis.location?.search||globalThis.sessionStorage?.getItem(St)||"";return e&&globalThis.sessionStorage?.setItem(St,e),e}function Tt(e){if(!e)throw new Error("Value should be fulfilled");return e}const It=e=>t=>{const[,n]=Tt(e.find((([e])=>e(t))));return n(t)},Bt=e=>It(e.map((([e,t])=>[e,()=>t])));Bt.if=e=>new Pt(void 0,e);class Pt{parent;predicate;unit;get entry(){return[Tt(this.predicate),Tt(this.unit)]}constructor(e,t,n){this.parent=e,this.predicate=t,this.unit=n}if(e){return new Pt(this,e)}then(e){return new Pt(this.parent,this.predicate,e)}else(e){return It([...Mt(this),[()=>!0,e]])}}const Mt=e=>[...e?.parent?Mt(e.parent):[],e.entry],Rt=e=>{const t=e.target?.closest("a");if(A(t?.href)&&!t?.href?.startsWith(globalThis.location?.origin)){e.preventDefault(),e.stopPropagation();const n=(e=>{const t=Ct();if(!A(e)||!t)return e;const n=new URL(e);for(const[e,l]of new URLSearchParams(t))n.searchParams.set(e,l);return n.toString()})(t?.href)||t?.href;if(n){Vt(t?.target)?.(n)}}},Vt=Bt([[e=>"_blank"===e,e=>globalThis.open(e,"_blank")],[e=>"_parent"===e,e=>globalThis.parent&&(globalThis.parent.location.href=e)],[e=>"_top"===e,e=>{globalThis.top&&(globalThis.top.location.href=e)}],[()=>!0,e=>globalThis.location&&(globalThis.location.href=e)]]);function Dt(){return Dt._impl()}Dt._impl=()=>({forwardQuery:Rt}),Dt.setup=e=>{Dt._impl=e};const zt=e=>e,At=(e,{resetOnSubmit:t,onSubmit:n,normalize:r}={})=>{const[s,o]=l(e),c=i(r?e=>o(e instanceof Function?t=>{const n=r(e(t));return _t(t,n)?t:n}:r(e)):o,[r]);a((()=>{r&&o(r)}),[r]);const[d,m]=l(!1),[u,h]=l({}),p=i(((e,t)=>{const{parse:n=zt,format:l=zt}=t||{};return{value:l(s[e]),isDirty:d||u[e],onChange:t=>{c((l=>({...l,[e]:n(t)}))),h((t=>({...t,[e]:!0})))}}}),[c,d,u]),g=i((e=>{c(e),h(e)}),[]),f=i((()=>{c(e),m(!1),h({})}),[e]),x=i((e=>{e.preventDefault(),t?f():m(!0),n&&n(s,e)}),[n,s]);return[s,{isDirty:d||Object.values(u).some(Boolean),field:p,update:g,reset:f,onSubmit:x}]},_t=(e,t)=>e&&t&&Object.keys({...e,...t}).every((n=>e[n]===t[n])),Ot=d((e=>{const{className:t,title:n,children:l,...a}=e;return o(g,{className:t,defaultPadding:"p-6xl",...a,children:c("div",{className:"container max-w-[978px] space-y-lg",children:[n?o(w,{headingType:"h3",title:n,className:"@xl:text-center"}):null,l]})})})),Ft=[{key:"ULTRASERVICE",text:"Ультра"},{key:"PREMIUMSERVICE",text:"Премиум"}],Et=[{key:"Физическое лицо"},{key:"Юридическое лицо / ИП"}],jt=[{key:"phone",text:"Телефонный звонок"},{key:"email",text:"Электронное сообщение"}],Lt="/api/v1/outservice/outserviceregions",$t=e=>"OUTSERVICE"===e?Lt:void 0,Ut=e=>o("div",{className:"h-6",children:e?o(Re,{size:"text-xs",font:"font-light",color:"text-error",children:e}):null}),qt=d((({className:e,viewBox:t,fill:n="none",width:l,height:a,paths:i,...r})=>o("svg",{xmlns:"http://www.w3.org/2000/svg",className:e,viewBox:t,fill:n,width:l,height:a,children:i.map((({d:e,fill:t,...n},l)=>{const a={...r,...n};return o("path",{d:e,fill:t||"currentColor",stroke:a.stroke,strokeLinecap:a.strokeLinecap,strokeLinejoin:a.strokeLinejoin,strokeWidth:a.strokeWidth,strokeMiterlimit:a.strokeMiterlimit},l)}))}))),Wt="appearance-none w-5 h-5 border-solid flex-none",Ht=[{d:"M10.207.793a1 1 0 0 1 0 1.414l-6 6a1 1 0 0 1-1.414 0l-2.5-2.5a1 1 0 0 1 1.414-1.414L3.5 6.086 8.793.793a1 1 0 0 1 1.414 0Z",fillRule:"evenodd",clipRule:"evenodd",fill:"white"}],Yt=d((({className:e,value:t,text:n,disabled:l,isRadio:a,onChange:r})=>{const s=i((e=>{l||(e.preventDefault(),r&&r(!t))}),[r,l,t]),d=a?o("div",{className:"absolute left-1 w-3 h-3 rounded-full bg-primary-main"}):o(qt,{paths:Ht,className:"absolute left-1 ml-px block",width:"11",height:"9",fill:"white",viewBox:"0 0 11 9"});return o("div",{className:e,children:c("label",{className:u("flex items-center relative group/box",Xt(l)),onClick:s,children:[o("div",{className:u(Wt,"m-0",a?"rounded-full border-2":Jt(t),!l&&t?"border-primary-main":"border-gray",l?"bg-main-disabled":"group-hover/box:border-primary-hover"),role:Gt(a),"aria-checked":Boolean(t),"aria-disabled":Boolean(l),"aria-label":n}),t?d:null,Kt(n)]})})})),Kt=e=>e?o("div",{className:"ml-s",children:o(Re,{size:"text-l",font:"font-light",children:e})}):null,Xt=(e=!1)=>e?"cursor-not-allowed":"cursor-pointer",Gt=(e=!1)=>e?"radio":"checkbox",Jt=(e=!1)=>u("rounded border",{"bg-primary-main":e}),Zt=d((({className:e,text:t,value:n,key:l,disabled:a,error:i,onChange:r})=>c("div",{className:u("shrink-0",e),children:[o(Yt,{text:t,value:n,disabled:a,onChange:r},l),Ut(i)]})));function Qt(e=!1){const[t,n]=l(e),a=i((()=>n(!0)),[]),r=i((()=>n(!1)),[]),s=i((()=>n((e=>!e))),[]);return[t,{setValue:n,setTrue:a,setFalse:r,toggle:s}]}function en(e,t,n,l){a((()=>{if(e&&n)return e.addEventListener(t,n,l),()=>{e.removeEventListener(t,n,l)}}),[e,t,n])}function tn(e){const t=s(null),n=i((n=>{t&&t.current&&n.target instanceof Node&&!t.current.contains(n.target)&&e()}),[e]);return en(globalThis.document,"click",n),t}const nn=()=>{},ln="border border-solid outline-none border-gray hover:border-primary-hover active:border-primary-text focus:border-primary-text rounded",an=e=>e?o(Re,{size:"text-m",color:"text-primary-text",font:"font-light",children:e}):null,rn=d((({key:e,className:t="",id:n,name:l,type:r="text",label:d,placeholder:m,value:h="",valid:p=!0,children:g,onChange:f,onFocus:x,onBlur:b,pattern:y,autoFocus:v=!1,isTextarea:N=!1})=>{const w=s(null),k=i((e=>{f&&f(e.target?.value||"")}),[f]);a((()=>{v&&w.current?.focus()}),[v,w]);const S="w-full border rounded-md text-primary-text outline-none p-m",C=g?"pr-3xl":"",T=sn(p);return c("div",{className:u("relative",t),children:[c("label",{className:"space-y-xs",children:[an(d),N?o("textarea",{className:u("block resize-y min-h-24",S,T),id:u("textarea",n),name:l||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b},e):o("input",{type:r,className:u("h-14",S,C,T),ref:w,id:n,name:l||n,placeholder:m,value:h,onChange:k,onFocus:x,onBlur:b,pattern:y},e)]}),g]})})),sn=e=>e?ln:"border-error",on=e=>(e?.suggestions||[]).map((e=>({...e,processedValue:e?.value}))),cn={name:{url:"suggest/fio",requestData:{parts:["NAME"],gender:"UNKNOWN"}},surname:{url:"suggest/fio",requestData:{parts:["SURNAME"],gender:"UNKNOWN"}},middleName:{url:"suggest/fio",requestData:{parts:["PATRONYMIC"],gender:"UNKNOWN"}},email:{url:"suggest/email"}},dn=()=>({open:(e,t)=>ce.fire("popup",{type:"open",popup:e,...t}),update:(e,t)=>ce.fire("popup",{type:"update",popup:e,...t}),close:()=>ce.fire("popup",{type:"close"})}),mn=d((({options:e,onChange:t})=>o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",children:e?.map(((e,n)=>o("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem",onMouseDown:()=>t(e.processedValue),children:o("span",{className:"min-h-6",children:e.processedValue})},n.toString())))})));function un({isOpen:e,value:t,name:n,onChange:c}){const d=s(t),m=s(t),[u,h]=l([]),p=dn(),g=cn[n],f=i((()=>{m.current=t,p.close()}),[t]),x=i((e=>{f(),m.current=e,c&&c(e)}),[f,c]),b=s(null),y=r((()=>async e=>{if(!g)return;const t=await(e=>{const{url:t,query:n,requestData:l={}}=e;return fetch(`/api/v1/suggestions/${t}`,{method:"POST",mode:"cors",headers:{"Content-Type":"application/json"},body:JSON.stringify({count:10,...l,query:n})}).then((e=>e.json())).then(on)})({url:g.url,requestData:{...g?.requestData},query:e});t?.length&&h(t)}),[]),v=r((()=>((e,t=600)=>{let n;const l=(...a)=>{l.dispose(),n=setTimeout((()=>{e(...a)}),t)};return l.dispose=()=>{n&&clearTimeout(n)},l})(y,300)),[y]);return a((()=>{if(!e||!b.current||m.current===t)return void f();const n=b.current,{top:l,left:a,width:i,height:r}=n.getBoundingClientRect();t&&d.current!==t&&(v(t),d.current=t),p.update(o(mn,{options:u,value:t,onChange:x}),{top:l+globalThis.scrollY+r,left:a,width:i})}),[e,u,t,x]),b}const hn=d((({className:e,label:t,value:n="",placeholder:l,error:a,errors:i,onChange:r=nn,onBlur:s,isTextarea:d,type:m,name:h="",dadata:p=!1})=>{const[g,{setFalse:f,setTrue:x}]=Qt(),b=tn(f),y=un({isOpen:g&&p,name:h,value:n,onChange:r});return c("div",{className:u("shrink-0 w-full",e),ref:b,onBlur:f,onFocus:x,children:[o("div",{ref:y,children:o(rn,{type:m||"text","aria-label":t,label:pn(i,t),valid:Boolean(!a),value:n,onChange:r,onBlur:s,isTextarea:d,placeholder:gn(l,i,t)})}),Ut(a)]})})),pn=(e,t)=>t&&e?`${t}*`:t,gn=(e,t,n)=>t&&!n?`${e}*`:e,fn=e=>e?.text||e?.key||"",xn=(e,t)=>e?.length&&t?.trim()?e.filter((e=>e.text?.toLocaleLowerCase().includes(t?.trim().toLocaleLowerCase()))):e,bn=d((({popupRef:e,options:t,value:n,query:l,onChange:a,iconVersion:i})=>t?.length?o("div",{className:"bg-white text-l max-h-64 overflow-y-auto overflow-x-hidden rounded-md shadow-2xl",role:"list",ref:e,children:xn(t,l).map((e=>c("div",{className:"flex px-m py-s cursor-pointer hover:bg-main-divider pr-5xl relative",role:"listitem","aria-selected":e.key===n?.key,onClick:t=>{t.stopPropagation(),a&&a(e)},children:[o("span",{className:"min-h-6",children:fn(e)}),o(W,{name:"DoneSimpleIcon",width:"16",height:"16",iconVersion:i,className:u("absolute right-4 pt-3xs",{hidden:e.key!==n?.key})})]},e.key)))}):null));const yn=d((({className:e,label:t,options:n=[],value:r,valid:d=!0,isBorder:m=!0,placeholder:h="",isSearch:p=!1,iconVersion:g="black",onChange:f,disabled:x})=>{const[b,{setFalse:y,setTrue:v}]=Qt(),[N,w]=l(""),k=x||0===n.length,S=b&&!k,C=i((()=>{w(""),y()}),[]),T=function({isOpen:e,options:t,value:n,query:l,onChange:r,onClose:c,iconVersion:d}){const m=dn(),u=i((()=>{m.close(),c&&c()}),[c]),h=i((e=>{u(),r&&r(e)}),[u,r]),p=s(null),g=tn(u);return a((()=>{if(!e||!p.current)return;const a=p.current,{top:i,left:r,width:s,height:c}=a.getBoundingClientRect();m.update(o(bn,{popupRef:g,options:t,value:n,query:l,onChange:h,iconVersion:d}),{top:i+window.scrollY+c,left:r,width:s})}),[e,t,n,l,h]),p}({isOpen:b,options:n,value:r,query:N,onChange:f,onClose:C,iconVersion:g});return c("div",{className:u("space-y-xs",e),children:[an(t),c("div",{className:u("relative",S?"z-20":"z-10"),ref:T,children:[c("div",{className:u("h-14 [&>*]:p-m pr-6 text-l flex items-center justify-between text-primary-text relative z-10 overflow-hidden",Nn(m,d,k)),onClick:S?C:v,children:[o("p",{className:"line-clamp-2 text-ellipsis",children:fn(r)||h}),vn(S,g)]}),p&&S?o("div",{className:u("absolute top-0 w-full z-20"),children:o(rn,{type:"text",autoFocus:!0,value:N,onChange:w})}):null]})]})})),vn=(e,t)=>o(W,{className:u("absolute right-0 flex self-center",{"rotate-180":!e}),iconVersion:t,name:"ArrowUpIcon",width:"16",height:"16"}),Nn=(e,t,n)=>u(e?"border rounded-md ":"",e&&!n?"hover:border-primary-hover":"",n?"bg-main-divider":"cursor-pointer ",t?"border-gray":"border-error"),wn=d((({className:e="",label:t,error:n,...l})=>c("div",{className:e,children:[o(yn,{...l,valid:!n,label:l?.errors?`${t}*`:t}),Ut(n)]}))),kn=e=>!e?.length,Sn=e=>t=>n=>e(n)?[]:[t],Cn=Sn((e=>null!=e&&""!==e)),Tn="Некорректно заполненное поле",In=Cn(Tn),Bn=Sn((e=>e?.key&&""!==e?.key))(Tn),Pn=Sn((e=>"string"==typeof e&&e.length>1))(Tn),Mn=e=>Sn((t=>"string"==typeof t&&t.length>=1&&t.length<=e))(Tn),Rn=Sn((e=>"string"==typeof e&&4===e.length))(Tn),Vn=Sn((e=>"string"==typeof e&&6===e.length))(Tn),Dn=Sn((e=>"string"==typeof e&&(10===e.length||12===e.length)))(Tn),zn=(An=/^(\+7)?[\s-]?\(?[0-9]{3}\)?[\s-]?[0-9]{3}[\s-]?[0-9]{2}[\s-]?[0-9]{2}$/,Sn((e=>"string"==typeof e&&An.test(e))))(Tn);var An;const _n=Sn((e=>"boolean"==typeof e&&e))("Согласие обязательно"),On=Sn((e=>{const t=String(e).replace(/[^0-9]+/g,"");if(11===t.length){let e=0;for(let n=0;n<9;n++)e+=parseInt(t.charAt(n))*(9-n);return e>101&&(e%=101),100!==e&&101!==e||(e=0),e===parseInt(t.substr(9))}return!1}))(Tn),Fn={typeForm:In,surname:Pn,name:Pn,region:Bn,addressBranch:Bn,phone:zn,secondaryPhone:zn,birthday:In,education:In,housing:In,employment:In,organization:In,amountWorkers:In,employerActivities:In,employerOrganization:In,positionOrganization:In,email:Sn((e=>/^[^\s@]+@[^\s@]+\.[a-zA-Z]{2}$/.test(e)))(Tn),dulSerie:Rn,dulNumber:Vn,dulIssueDateField:In,dulSubdivisionCode:Vn,dulIssuedBy:In,fullName:Pn,inn:Dn,legalForm:In,organizationName:In,generalSeniority:In,lastJobExperience:In,experience5Years:In,jobsNumber:In,beginDate:In,fullAddress:In,partnerComments:In,collectionCount:In,comment:In,acquiringType:Bn,feedbackMethod:Bn,serviceType:Bn,serviceDirection:Bn,meetingDay:In,product:In,localities:In,consentDataProcessing:_n,annualRevenue:In,consentToReceiveMaterials:_n,processPersonalDataLeadFlg:_n,consentProviderFlg:_n,consentPhotoFlg:_n,consentPfrFlg:_n,consentAssignmentClaimsFlg:_n,consentCollectionFlg:_n,consentInformFlg:_n,familyStatus:In,children:Mn(2),familyMembers:Mn(2),dependents:Mn(2),totalIncome:Mn(19),expenses:Mn(10),snils:On,conscription:In,armyIdFlg:_n},En=e=>{const t=(e=>Object.values(e.filter((e=>e)))?.map((e=>e.name)))(e.filter((e=>"required"in e&&e.required)));return Object.fromEntries(t.map((e=>[e,Fn?.[e]])))},jn=(e,t)=>{const{value:n,isDirty:l}=e,a=l?t(n):[];return{...e,errors:a,error:a[0]}},Ln=(e,t,n=!1)=>n?jn(e,t):e,$n=[{text:"Торговый эквайринг",key:"trade"},{text:"СБП-эквайринг",key:"sbp"},{text:"Интернет-эквайринг",key:"internet"},{text:"Все виды эквайринга",key:"all"}],Un=d((({field:e,input:t})=>o(wn,{label:"Вид эквайринга",placeholder:"Выберите эквайринг",options:$n,...Ln(e("acquiringType"),Fn.acquiringType,t?.required)}))),qn=(e="")=>Boolean("trade"===e||"all"===e),Wn=e=>null!=e,Hn=new Map,Yn=e=>Boolean(e?.every((e=>Array.isArray(e)?Yn(e):!e||"string"==typeof e))),Kn=e=>Yn(e)?e.toString():"";function Xn(e,t,{fallback:n,cache:i}={}){const s=r((()=>Gn(e)),[e]),[o,c]=l(void 0),[d,m]=l(void 0);a((()=>{if(!s.some(Wn))return;let e=!1;const n=(t,n)=>{e||(c(t),m(n))};return(async()=>{try{n(await((e,t=Hn)=>n=>{const l=Kn(n),a=t.get(l);if(l&&Wn(a))return a;const i=e(...n);return l&&Wn(i)&&t.set(l,Promise.resolve(i)),i})(t,i)(s))}catch(e){n(void 0,e)}})(),()=>{e=!0}}),[t,i,s]);const u=n&&(e=>Boolean(e&&Array.isArray(e)&&1===e.length&&"string"==typeof e[0]))(s)&&n[s[0]];return{data:!o&&u?u:o,error:d,mutate:()=>Promise.resolve(void 0)}}function Gn(e){return Array.isArray(e)?e:e instanceof Function?Gn(e()):[e]}const Jn=[];const Zn=async e=>await it(e,{method:"GET"})||Jn;function Qn(e=!1){const{data:t}=Xn(e?"/api/v1/premiumBranchesByRegions":"/api/v1/branchesByRegions",rt);return Array.isArray(t)?t:[]}const el=d((({field:e,input:t,isPremium:n=!1})=>{const l=e("region"),i=l?.value?.key,r=l?.value?.text,s=n?Qn(n)?.find((e=>e?.region===r))?.branches:function(e){const{data:t}=Xn(e?`/api/v1/branches?regionCode=${e}`:null,Zn);return t||Jn}(i)?.filter((e=>e?.address));return a((()=>{""!==l?.value?.key&&e?.("addressBranch")?.onChange?.("")}),[l?.value]),o(wn,{label:"Отделение",placeholder:"Выберите отделение",options:(s||[]).map((({address:e=""})=>({key:e,text:e}))),...Ln(e("addressBranch"),Fn.addressBranch,t?.required),isSearch:!0})})),tl=(e,{normalize:t,format:n})=>{const{value:a,onFocus:r,onBlur:s,onChange:o}=e,[c,d]=l(!1),m=i((e=>{d(!0),r&&r(e)}),[]),u=i((()=>{d(!1),o&&o(t(a)),s&&s()}),[o,a]);return{value:c||!n?a:n(a),onFocus:m,onBlur:u}},nl=(e,t,n)=>Math.max(t,Math.min(e,n));function ll(e){const t=(e||"").replace(/\D/g,""),n=parseInt(t,10);return Number.isNaN(n)?0:n}function al({list:e=[],min:t,max:n,step:l,value:a=e[0]||t,disabled:i,onChange:r}){const s=e.length?e.indexOf(a):a,d={backgroundSize:`${(100*(s>t?s-t:0)/(n-t)).toFixed(2)}% 100%`};return c("div",{children:[e.length?o("div",{className:"absolute w-full flex justify-between -bottom-[3px] px-m",children:e.map(((e,t)=>o("div",{className:u("w-2 h-2 rounded-full",s<=t||i?"bg-gray":"bg-primary-main")},String(t))))}):null,o("div",{className:"absolute inset-x-0 -bottom-1 px-m leading-[18px]",children:o("input",{className:"box-border w-full m-0 cursor-pointer slider relative z-10",style:d,type:"range",min:t,max:n,step:l,value:s,disabled:i,onChange:t=>{const n=ll(t.target?.value),l=e.length?e[n]:n;r&&r(l||0)}})})]})}const il=1,rl=100,sl=d((e=>{const{className:t,title:n,items:l=[],list:a=[],min:r=(a.length?0:il),max:s=(a.length?a.length-1:rl),step:d=1,value:m=a[0]||r,disabled:h=!1,onChange:p}=e,g=tl(e,{normalize:(e=0)=>a.length?ol(a)(e):nl(e,r,s),format:Ue()}),f=i((e=>{p&&p(ll(e.target?.value))}),[p]);return c("div",{className:t,children:[c("label",{className:"block relative",children:[n?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:n}):null,o("input",{className:u("text-h3 w-full h-14","pl-m mt-xs box-border","text-primary-text",ln,"disabled:border-gray disabled:bg-main-divider"),disabled:h,onChange:f,...g}),al({list:a,min:r,max:s,step:d,disabled:h,value:m,onChange:p})]}),cl(l)]})})),ol=e=>t=>e.reduce(((e,n)=>Math.abs(n-t)<Math.abs(e-t)?n:e)),cl=e=>o("div",{className:"flex justify-between my-xs",children:e.map(((e,t)=>o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e},String(t))))}),dl=["От 1 000 ₽","До 1 000 000 000 ₽"],ml=d((({field:e})=>o(sl,{title:"Сумма, ₽",items:dl,min:1e3,max:1e9,...e("amount")}))),ul=e=>{const{data:t,error:n}=Xn(`https://portal-ui-cc.cprb.dev.rshbdev.ru/light-api-cash/v1/dictionary?dictionaryType=${e}`,hl);return t&&"errorMessage"in t?{error:n}:{data:t,error:n}},hl=async e=>await it(e,{method:"POST"})||[],pl=ut((({field:e,source:t,label:n,fieldName:l,input:a})=>{const i=t&&t?.map((e=>e.description))||[];return o(wn,{placeholder:"Выберите из списка",label:n,options:gl(i),...Ln(e(l),Fn[l],a?.required)})})),gl=e=>(e??[]).map((e=>({key:e,value:e}))),fl=d((({field:e,input:t})=>{const{data:n}=ul("EMPLOYEES_NUMBER");return o(pl,{field:e,source:n,label:"Количество работающих в организации",fieldName:"amountWorkers",input:t})})),xl=d((({field:e,input:t})=>o(hn,{label:"Годовая выручка, ₽",...Ln(e("annualRevenue"),Fn.annualRevenue,t?.required)}))),bl=d((({field:e})=>o(Zt,{text:"Наличие военного билета",...Ln(e("armyIdFlg"),Fn.armyIdFlg)}))),yl=d((({field:e})=>o(hn,{label:"ФИО или должность обслуживавшего Вас сотрудника Банка",...e("bankEmpolee")}))),vl=({today:e,firstDayOfWeek:t,totalDays:n,currentMonth:l,currentYear:a,min:i,max:r,onDateClick:s})=>{const c=[];let d=1;for(let m=0;m<6;m++){const u=[];for(let c=0;c<7;c++)if(0===m&&c<t)u.push(o("td",{},`empty-${c}`));else if(d>n)u.push(o("td",{},`empty-${c}`));else{const t=new Date(a,l,d),n=Nl(t,e),c=wl(t,i,r);u.push(o("td",{children:o("div",{className:kl(n,c),onClick:()=>!c&&s(t),children:d})},`day-${d}`)),d++}c.push(o("tr",{children:u},`row-${m}`))}return c},Nl=(e,t)=>t&&e.toDateString()===t.toDateString(),wl=(e,t,n)=>t&&e.getTime()<t.getTime()||n&&e.getTime()>n.getTime(),kl=(e=!1,t=!1)=>u("p-s text-center rounded-md border",{"border-transparent hover:bg-gray":!e},t?"text-gray hover:bg-transparent":"cursor-pointer"),Sl=["Пн","Вт","Ср","Чт","Пт","Сб","Вс"],Cl=d((({today:e,currentMonth:t,currentYear:n,min:l,max:a,onDateSelect:s=nn,setValue:d=nn})=>{const m=i((e=>{s(e),d(!1)}),[]),{firstDayOfWeek:u,totalDays:h}=r((()=>({firstDayOfWeek:new Date(n,t,1).getDay()-1,totalDays:new Date(n,t+1,0).getDate()})),[n,t]);return c("table",{className:"mx-auto",children:[o("thead",{className:"text-gray font-light",children:o("tr",{children:Sl.map(((e,t)=>o("th",{className:"p-s",children:e},String(t))))})}),o("tbody",{children:vl({firstDayOfWeek:u,today:e,totalDays:h,currentYear:n,currentMonth:t,min:l,max:a,onDateClick:m})})]})})),Tl=["Январь","Февраль","Март","Апрель","Май","Июнь","Июль","Август","Сентябрь","Октябрь","Ноябрь","Декабрь"],Il=Tl.map((e=>({key:e}))),Bl=Array.from({length:(new Date).getFullYear()-1940+1},((e,t)=>1940+t)).reverse().map((e=>({key:String(e)}))),Pl={name:"ArrowUpIcon",iconVersion:"black",width:"24",height:"24"},Ml={className:"min-w-32",iconVersion:"black",isBorder:!1},Rl=d((({className:e="",label:t="",value:n,valid:r=!0,minDate:s,maxDate:d,onChange:m})=>{const[h,{setValue:p}]=Qt(!1),[g,f]=l(n?.getMonth()||(new Date).getMonth()),[x,b]=l(n?.getFullYear()||(new Date).getFullYear()),{handlePrevMonth:y,handleNextMonth:v,handleSelectMonth:N,handleSelectYear:w,monthsOptions:k,yearsOptions:S,handleChangeVisibleCalendar:C,ref:T}=(({onShowCalendar:e,showCalendar:t,selectedMonth:n,onMonthSelect:l,onYearSelect:a,selectedYear:r})=>{const s=tn(i((()=>t&&e(!1)),[t]));return{handleChangeVisibleCalendar:i((()=>e(!t)),[t]),handleNextMonth:i((()=>{n+1<=11?l(n+1):(l(0),a(r+1))}),[n]),handlePrevMonth:i((()=>{n-1>=0?l(n-1):(l(11),a(r-1))}),[n]),handleSelectMonth:i((({key:e})=>l(Tl.indexOf(e))),[]),handleSelectYear:i((({key:e})=>a(Number(e))),[]),monthsOptions:Il,yearsOptions:Bl,ref:s}})({onYearSelect:b,onMonthSelect:f,onShowCalendar:p,selectedYear:x,selectedMonth:g,showCalendar:h}),I=((e,t)=>{const[n,i]=l(!1);return a((()=>{const n=()=>{if(e?.current){const{top:n}=e.current.getBoundingClientRect();i(n>t)}};return n(),window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)}),[e]),n})(T,370);return c("div",{className:u("space-y-xs",e),ref:T,children:[an(t),c("div",{className:"relative",children:[Vl(C,n,r),h?c("div",{className:u("absolute bg-white z-20 select-none",{"bottom-full":I}),children:[c("div",{className:"flex gap-s",children:[o("div",{className:"my-auto",onClick:y,children:o(W,{...Pl,className:"-rotate-90 cursor-pointer"})}),o(yn,{onChange:N,value:{key:Tl[g]},options:k,...Ml}),o(yn,{onChange:w,value:{key:String(x)},options:S,...Ml}),o("div",{className:"my-auto",onClick:v,children:o(W,{...Pl,className:"rotate-90 cursor-pointer"})})]}),o(Cl,{today:n,currentMonth:g,currentYear:x,onDateSelect:m,min:s,max:d,setValue:p})]}):null]})]})})),Vl=(e,t,n)=>c("div",{onClick:e,className:u("flex justify-between items-center h-14 px-m py-s border rounded-md cursor-pointer hover:border-black active:border-black focus:border-black",n?"border-gray":"border-error"),children:[o(k,{children:t&&ft(t)}),o(W,{...Pl,name:"CalendarIcon"})]}),Dl=d((({className:e,label:t,error:n,...l})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Rl,{label:t&&l?.errors?`${t}*`:t,valid:Boolean(!n),...l}),Ut(n)]}))),zl=d((({field:e,input:t})=>o(Dl,{label:"Дата начала работы на текущем месте",...Ln(e("beginDate"),Fn.beginDate,t?.required),...t}))),Al=d((({field:e,input:t})=>o(Dl,{label:"Дата рождения",...Ln(e("birthday"),Fn.birthday,t?.required)}))),_l=d((({field:e,input:t})=>o(hn,{label:"Количество детей до 18 лет",placeholder:"Введите значение",type:"number",...Ln(e("children"),Fn.children,t?.required),...t}))),Ol=d((({field:e,input:t})=>o(hn,{label:"Количество объектов инкассации",type:"number",...Ln(e("collectionCount"),Fn.collectionCount,t?.required)}))),Fl=d((({field:e,input:t})=>o(hn,{className:"col-span-2",...Ln(e("comment"),Fn.comment,t?.required),placeholder:"Ваше сообщение",isTextarea:!0}))),El=d((({field:e,input:t})=>{const{data:n}=ul("MILITARY_STATUS");return o(pl,{field:e,source:n,label:"Статус военнообязанного",fieldName:"conscription",input:t})})),jl=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на уступку прав требований)",...Ln(e("consentAssignmentClaimsFlg"),Fn.consentAssignmentClaimsFlg,t?.required)}))),Ll=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на взыскание по исполнительной надписи нотариуса)",...Ln(e("consentCollectionFlg"),Fn.consentCollectionFlg,t?.required)}))),$l=d((({field:e,input:t})=>o(Zt,{text:"Согласие на информирование о продуктах и услугах Банка",...Ln(e("consentInformFlg"),Fn.consentInformFlg,t?.required)}))),Ul=d((({field:e,input:t})=>o(Zt,{text:"Прочие согласия (согласие на фотографирование)",...Ln(e("consentPhotoFlg"),Fn.consentPhotoFlg,t?.required)}))),ql=d((({field:e,input:t})=>o(Zt,{text:"Согласие об использовании простой электронной подписи",...Ln(e("consentProviderFlg"),Fn.consentProviderFlg,t?.required)}))),Wl=d((({field:e,input:t})=>o(Zt,{text:"Согласен на получение информационных и аналитических материалов по электронной почте",...Ln(e("consentToReceiveMaterials"),Fn.consentToReceiveMaterials,t?.required)}))),Hl=d((({field:e,input:t})=>o(hn,{label:"Количество иждивенцев",placeholder:"За исключение детей до 18 лет",type:"number",...Ln(e("dependents"),Fn.dependents,t?.required),...t}))),Yl=d((({field:e,input:t})=>o(Dl,{label:"Желаемая дата встречи",...Ln(e("desiredMeetingDate"),Fn.meetingDay,t?.required)}))),Kl=d((({field:e,input:t})=>o(Dl,{label:"Дата выдачи",...Ln(e("dulIssueDateField"),Fn.dulIssueDateField,t?.required)}))),Xl=d((({field:e,input:t})=>o(hn,{label:"Кем выдан",...Ln(e("dulIssuedBy"),Fn.dulIssuedBy,t?.required)}))),Gl=d((({field:e,input:t})=>o(hn,{label:"Номер документа",type:"number",...Ln(e("dulNumber"),Fn.dulNumber,t?.required)}))),Jl=d((({field:e,input:t})=>o(hn,{label:"Серия документа",type:"number",...Ln(e("dulSerie"),Fn.dulSerie,t?.required)}))),Zl=d((({field:e,input:t})=>o(hn,{label:"Код подразделения",type:"number",...Ln(e("dulSubdivisionCode"),Fn.dulSubdivisionCode,t?.required)}))),Ql=d((({field:e,input:t})=>{const{data:n}=ul("EDUCATION_LEVEL");return o(pl,{field:e,source:n,label:"Образование",fieldName:"education",input:t})})),ea=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(hn,{label:"Электронная почта",...Ln(e("email"),Fn.email,n),...l})})),ta=d((({field:e,input:t})=>{const{data:n}=ul("ORGANIZATION_ACTIVITY_TYPE");return o(pl,{field:e,source:n,label:"Вид деятельности организации-работодателя",fieldName:"employerActivities",input:t})})),na=d((({field:e,input:t})=>{const{data:n}=ul("ORGANIZATION_KIND");return o(pl,{field:e,source:n,label:"Вид организации работодателя",fieldName:"employerOrganization",input:t})})),la=d((({field:e,input:t})=>{const{data:n}=ul("EMPLOYMENT_TYPE");return o(pl,{field:e,source:n,label:"Информация о трудоустройстве",fieldName:"employment",input:t})})),aa=d((({field:e,input:t})=>o(hn,{label:"Обязательные расходы в месяц",placeholder:"Введите значение",type:"number",...Ln(e("expenses"),Fn.expenses,t?.required),...t}))),ia=d((({field:e,input:t})=>o(hn,{label:"Стаж",placeholder:"За последние 5 лет",...Ln(e("experience5Years"),Fn.experience5Years,t?.required),...t}))),ra=d((({field:e,input:t})=>o(hn,{label:"Количество членов семьи",placeholder:"Введите значение",type:"number",...Ln(e("familyMembers"),Fn.familyMembers,t?.required),...t}))),sa=d((({field:e,input:t})=>{const{data:n}=ul("MARITAL_STATUS");return o(pl,{field:e,source:n,label:"Семейное положение",fieldName:"familyStatus",input:t})})),oa=d((({field:e,input:t})=>o(wn,{label:"Способ получения ответа",options:jt,...Ln(e("feedbackMethod"),Fn.feedbackMethod,t?.required)}))),ca=d((({field:e,input:t})=>o(hn,{label:"Адрес",...Ln(e("fullAddress"),Fn.fullAddress,t?.required),...t}))),da=d((({field:e,input:t})=>o(hn,{label:"ФИО",...Ln(e("fullName"),Fn.fullName,t?.required),...t}))),ma=d((({field:e,input:t})=>o(hn,{label:"Общий стаж",placeholder:"Количество лет",...Ln(e("generalSeniority"),Fn.generalSeniority,t?.required),...t}))),ua=d((({field:e,input:t})=>{const{data:n}=ul("HOUSE_TYPE");return o(pl,{field:e,source:n,label:"Тип жилья",fieldName:"housing",input:t})})),ha=d((({field:e,input:t})=>o(hn,{label:"ИНН",type:"number",...Ln(e("inn"),Fn.inn,t?.required)}))),pa=d((({field:e})=>o(Zt,{...e("isClient"),text:'Являюсь клиентом банка АО "Россельхозбанк"'}))),ga=d((({field:e,input:t})=>o(hn,{label:"Общий стаж",placeholder:"Количество лет",type:"number",...Ln(e("jobsNumber"),Fn.jobsNumber,t?.required),...t}))),fa=d((({field:e,input:t})=>o(hn,{label:"Стаж на последнем рабочем месте",placeholder:"Количество лет",...Ln(e("lastJobExperience"),Fn.lastJobExperience,t?.required),...t}))),xa=d((({field:e,input:t})=>o(hn,{label:"ОПФ",placeholder:"ООО, ПАО и др.",...Ln(e("legalForm"),Fn.legalForm,t?.required),...t})));function ba(e="/api/v1/regions"){const{data:t}=Xn(e,rt);return Array.isArray(t)?t:[]}const ya=d((({field:e,input:t})=>{const n=e("region")?.value?.key,l=ba(Lt)?.find((e=>e.code===n))?.localities?.map((e=>({key:e,text:e})));return a((()=>{""!==n&&e?.("localities")?.onChange?.("")}),[n]),o(wn,{label:"Населенный пункт",placeholder:"Выберите город, где доступен сервис",options:l,...Ln(e("localities"),Fn.localities,t?.required),isSearch:!0})})),va=d((({field:e,input:t})=>o(hn,{label:"Отчество (Обязательно, при наличии)",...e("middleName"),...t}))),Na=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(hn,{label:"Имя",...Ln(e("name"),Fn.name,n),...l})})),wa=d((({value:e=!1,text:t,type:n="checkbox",onChange:l})=>c("div",{role:n,"aria-checked":e,className:"flex justify-start items-center w-full cursor-pointer mb-s",onClick:()=>l&&l(!e),children:[o("div",{className:u("relative flex-shrink-0 duration-300 w-9 h-5 mr-s rounded-2xl",e?"bg-primary-main":"bg-main-divider"),children:o("div",{className:u("absolute opacity-80 duration-500 top-0.5 w-4 h-4 bg-white rounded-full",e?"left-1/2":"left-[5%]")})}),t?o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:t}):null]}))),ka=d((({field:e})=>qn(e("acquiringType")?.value?.key)?o(wa,{type:"radio",text:"Хочу онлайн-кассу",...e("onlineCheckout")}):null)),Sa=d((({field:e,input:t})=>{const{data:n}=ul("ORGANIZATION_TYPE");return o(pl,{field:e,source:n,label:"Тип организации",fieldName:"organization",input:t})})),Ca=d((({field:e,input:t})=>o(hn,{label:"Наименование организации",...Ln(e("organizationName"),Fn.organizationName,t?.required),...t}))),Ta=d((({field:e,input:t})=>{const{required:n,...l}=t;return o(hn,{...Ln(e("partnerComments"),Fn.partnerComments,n),placeholder:"Укажите интересующий вас вопрос",isTextarea:!0,...l})})),Ia=e=>"_"===e,Ba=e=>/\d/.test(e),Pa=e=>Ia(e)||Ba(e),Ma=[..."+7 (___) ___-__-__"],Ra=Ma.findIndex(Ia),Va=Ma.map(((e,t)=>Pa(e)?Ma.slice(0,t).filter(Pa).length:-1));const Da=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Ma.map(((e,n)=>Ba(e)?e:t.charAt(Va[n])||e)),l=Va.indexOf(t.length-1)+1;return(l?n.slice(0,Math.max(Ra,l)):n).join("")}(e))),[t]),a=i((e=>{"+7 ("===e&&t&&t("")}),[]);return o(rn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),za=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Da,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"+7 (___) ___-__-__"}),Ut(l)]}))),Aa=d((({field:e,input:t})=>o(za,{label:"Телефон",...Ln(e("phone"),Fn.phone,t?.required)}))),_a=d((({field:e,input:t})=>{const{data:n}=ul("POSITION");return o(pl,{field:e,source:n,label:"Должность в организации",fieldName:"positionOrganization",input:t})})),Oa=d((({field:e})=>qn(e("acquiringType")?.value?.key)?o(wa,{type:"radio",text:"Хочу POS-терминал",...e("posTerminal")}):null)),Fa=d((({field:e,input:t})=>o(Zt,{text:"Согласие на обработку персональных данных",...Ln(e("processPersonalDataLeadFlg"),Fn.processPersonalDataLeadFlg,t?.required)}))),Ea=ut((({field:e,source:t})=>o(wn,{placeholder:"Выберите продукт",label:"Продукт",options:ja(t?.productList),...jn(e("product"),Fn.product)}))),ja=e=>(e??[]).map((e=>({key:e,value:e}))),La=d((({field:e,input:t,url:n})=>{const l=ba(n);return o(wn,{label:"Филиал",placeholder:"Выберите филиал",isSearch:!0,options:r((()=>l?.map((({code:e="",name:t=""})=>({key:e,text:t})))),[l]),...Ln(e("region"),Fn.region,t?.required)})})),$a=d((({field:e,input:t})=>{const n=Qn(!0),l=r((()=>n?.map((({region:e})=>({key:e,text:e})))),[n]);return o(wn,{label:"Регион",placeholder:"Выберите регион",options:l,...Ln(e("region"),Fn.region,t?.required)})})),Ua=d((({field:e})=>{const t=e("secondaryPhone");return o(za,{label:"Дополнительный телефон",...t.value&&"+7 ("!==t.value?jn(t,Fn.secondaryPhone):t})})),qa=d((({field:e,input:t})=>o(wn,{label:"Направление обслуживания",placeholder:"Выберите направление",options:Et,...Ln(e("serviceDirection"),Fn.serviceDirection,t?.required)}))),Wa=e=>"_"===e,Ha=e=>/\d/.test(e),Ya=e=>Wa(e)||Ha(e),Ka=[..."___-___-___ __"],Xa=Ka.findIndex(Wa),Ga=Ka.map(((e,t)=>Ya(e)?Ka.slice(0,t).filter(Ya).length:-1));const Ja=d((({children:e,onChange:t,...n})=>{const l=i((e=>t&&t(function(e){const t=e.replace(/\D/g,""),n=Ka.map(((e,n)=>Ha(e)?e:t.charAt(Ga[n])||e)),l=Ga.indexOf(t.length-1)+1;return 0===t.length?"":(l?n.slice(0,Math.max(Xa,l)):n).join("")}(e))),[t]),a=i((e=>{"___-___-___ __"===e&&t&&t("")}),[]);return o(rn,{...n,onChange:l,onFocus:e=>l(e?.target?.value||""),onBlur:e=>a(e?.target?.value||""),children:e})})),Za=d((({className:e,label:t,value:n,error:l,onChange:a,onBlur:i,...r})=>c("div",{className:u("shrink-0 w-full",e),children:[o(Ja,{"aria-label":t,label:r?.errors?`${t}*`:t,valid:Boolean(!l),value:n,onChange:a,onBlur:i,placeholder:"___-___-___ __"}),Ut(l)]}))),Qa=d((({field:e,input:t})=>o(Za,{label:"СНИЛС",...Ln(e("snils"),Fn.snils,t?.required),...t}))),ei=d((({field:e,input:t})=>o(hn,{label:"Фамилия",...Ln(e("surname"),Fn.surname,t?.required),...t}))),ti=["От 1 мес","До 15 лет"],ni=d((({field:e})=>o(sl,{title:"Срок, месяцев",items:ti,min:1,max:180,...e("term")}))),li=d((({field:e,input:t})=>o(hn,{label:"Совокупный официальный доход в месяц после вычета налогов (зарплата, премии)",placeholder:"Введите значение",type:"number",...Ln(e("totalIncome"),Fn.totalIncome,t?.required),...t}))),ai=d((({field:e,input:t})=>o(wn,{label:"Тип обслуживания",options:Ft,...Ln(e("serviceType"),Fn.serviceType,t?.required)}))),ii=d((({name:e,text:t,value:n,checked:l,onChange:a,className:i})=>o("div",{className:i,children:c("label",{className:"font-sans flex gap-s items-center relative cursor-pointer",children:[o("input",{className:u(ln.split(" ").filter((e=>"rounded"!==e)),Wt,"flex justify-center items-center after:block after:w-2.5 after:h-2.5 after:rounded-full rounded-full","checked:border-2 checked:!border-primary-main focus:checked:border-primary-main checked:after:bg-primary-main"),type:"radio",value:n,name:e,checked:l,onChange:e=>a?.(e.target.value),role:"radio"}),t?o(Re,{color:"text-primary-text",children:t}):null]})}))),ri=["currencyControl","documentOperations","conversionTransactions","otherIssues"],si=d((({field:e})=>{const{value:t,onChange:n}=e("vedTypes");return a((()=>{"currencyControl"!==t&&(e?.("inn")?.onChange?.(""),e?.("region")?.onChange?.(""))}),[t]),c("div",{className:"py-m gap-m grid @xl:flex @xl:items-center",children:[o(ii,{name:"vedTypes",text:"Валютный контроль",value:"currencyControl",checked:"currencyControl"===t,onChange:n}),o(ii,{name:"vedTypes",text:"Документарные операции",value:"documentOperations",checked:"documentOperations"===t,onChange:n}),o(ii,{name:"vedTypes",text:"Конверсионные операции",value:"conversionTransactions",checked:"conversionTransactions"===t,onChange:n}),o(ii,{name:"vedTypes",text:"Иные вопросы ВЭД",value:"otherIssues",checked:"otherIssues"===t,onChange:n})]})}));const oi={$ref:"/wcms-resources/outservice-productlist.json"},ci=(e,t)=>(n,l)=>{const a="ULTRASERVICE"===t||"PREMIUMSERVICE"===t,i={surname:o(ei,{field:e,input:n}),name:o(Na,{field:e,input:n}),middleName:o(va,{field:e,input:n}),phone:o(Aa,{field:e,input:n}),email:o(ea,{field:e,input:n}),fullName:o(da,{field:e,input:n}),inn:o(ha,{field:e,input:n}),legalForm:o(xa,{field:e,input:n}),organizationName:o(Ca,{field:e,input:n}),generalSeniority:o(ma,{field:e,input:n}),lastJobExperience:o(fa,{field:e,input:n}),experience5Years:o(ia,{field:e,input:n}),jobsNumber:o(ga,{field:e,input:n}),beginDate:o(zl,{field:e,input:n}),fullAddress:o(ca,{field:e,input:n}),comment:o(Fl,{field:e,input:n}),addressBranch:o(el,{field:e,input:n,isPremium:a}),birthday:o(Al,{field:e,input:n}),desiredMeetingDate:o(Yl,{field:e,input:n}),product:o(Ea,{field:e,source:oi}),localities:o(ya,{field:e,input:n}),isClient:o(pa,{field:e}),partnerComments:o(Ta,{field:e,input:n}),collectionCount:o(Ol,{field:e,input:n}),acquiringType:o(Un,{field:e,input:n}),onlineCheckout:o(ka,{field:e}),posTerminal:o(Oa,{field:e}),serviceType:o(ai,{field:e,input:n}),term:o(ni,{field:e}),amount:o(ml,{field:e}),annualRevenue:o(xl,{field:e,input:n}),vedTypes:o(si,{field:e}),feedbackMethod:o(oa,{field:e,input:n}),serviceDirection:o(qa,{field:e,input:n}),bankEmpolee:o(yl,{field:e}),secondaryPhone:o(Ua,{field:e}),consentToReceiveMaterials:o(Wl,{field:e,input:n}),processPersonalDataLeadFlg:o(Fa,{field:e,input:n}),consentProviderFlg:o(ql,{field:e,input:n}),consentPhotoFlg:o(Ul,{field:e,input:n}),consentAssignmentClaimsFlg:o(jl,{field:e,input:n}),consentCollectionFlg:o(Ll,{field:e,input:n}),consentInformFlg:o($l,{field:e,input:n}),applicationDate:o(hn,{label:"Дата и время обращения в Банк",...e("applicationDate")}),consentPfrFlg:o(Zt,{text:"Согласие на запрос в ПФР",...e("consentPfrFlg")}),region:a?o($a,{field:e}):o(La,{field:e,input:n,url:$t(t)}),education:o(Ql,{field:e,input:n}),housing:o(ua,{field:e,input:n}),employment:o(la,{field:e,input:n}),organization:o(Sa,{field:e,input:n}),amountWorkers:o(fl,{field:e,input:n}),employerActivities:o(ta,{field:e,input:n}),employerOrganization:o(na,{field:e,input:n}),positionOrganization:o(_a,{field:e,input:n}),familyStatus:o(sa,{field:e,input:n}),children:o(_l,{field:e,input:n}),familyMembers:o(ra,{field:e,input:n}),dependents:o(Hl,{field:e,input:n}),totalIncome:o(li,{field:e,input:n}),expenses:o(aa,{field:e,input:n}),snils:o(Qa,{field:e,input:n}),conscription:o(El,{field:e,input:n}),armyIdFlg:o(bl,{field:e,input:n}),dulSerie:o(Jl,{field:e,input:n}),dulNumber:o(Gl,{field:e,input:n}),dulIssueDateField:o(Kl,{field:e,input:n}),dulSubdivisionCode:o(Zl,{field:e,input:n}),dulIssuedBy:o(Xl,{field:e,input:n})};return function({input:e,field:t}){const{condition:n}=e,{value:l}=t(n?.name||"");return!n||n?.values?.find((e=>e===(l?.key??l)))}({input:n,field:e})?o("div",{children:i[n?.name]},String(l)):null},di=e=>2===e?"@xl:grid-cols-2":"",mi=e=>e?o("div",{className:"@xl:text-center @xl:col-span-2 mb-m",children:o(Re,{size:"text-h6",children:e})}):null;function ui({disabled:e,onClick:t}){return n=>{!e&&t&&t(n)}}const hi={primary:"text-white bg-primary-main hover:bg-primary-hover active:bg-primary-active",secondary:"text-primary-main bg-main-divider hover:text-white hover:bg-primary-hover active:bg-primary-active"},pi={primary:u("group-data-secondary:text-primary-main group-data-secondary:bg-white","group-data-secondary:hover:text-white group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active"),secondary:u("group-data-secondary:text-white group-data-secondary:bg-white/20","group-data-secondary:hover:bg-primary-hover","group-data-secondary:active:bg-primary-active")},gi=d((({children:e,...t})=>{const n=e=>({...e,onClick:me(ui(e))}),{className:l,version:a="primary",active:i,disabled:r,type:s="button",rounded:c=!0,role:d,onClick:m}=n(t);return o("button",{className:u("font-sans px-9 py-4","flex justify-center items-center gap-xs",{"text-white bg-primary-active":i,"bg-main-gray text-main-disabled cursor-not-allowed":r,"rounded-md":c},i||r?"":u(hi[a],pi[a]),l),type:s,role:d,onClick:m,children:e})})),fi=d((({className:e,onClose:t})=>o("button",{className:u("flex justify-center items-center w-12 h-12 p-2xs bg-transparent border-none",e),onClick:t,title:"Закрыть",type:"button",children:o(W,{name:"CloseIcon",width:"20",height:"20",iconVersion:"gray"})}))),xi=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white pt-0 p-lg",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 bg-white z-10",children:[o(fi,{className:"absolute top-0 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),bi=d((function({responseType:e,typeForm:t}){const n="OK"===e,l=n?"ResponseOKIcon":"ResponseFailIcon",{close:a}=de(),r=i((()=>{a()}),[]),s="ANTIFRAUD"===t?"Сообщение отправлено. Для уточнения информации с Вами могут связаться работники Банка либо Вы\n можете самостоятельно позвонить по номеру контакт-центра +78001000100. Будьте внимательны, работники Банка\n не звонят с использованием мессенджеров.":"Совсем скоро мы с вами свяжемся";return o(xi,{className:"my-6xl max-w-lg w-full min-h-fit mx-auto ",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md space-x-m",children:[o(ne,{image:{icon:l,iconVersion:"normal"},width:"136",height:"136"}),o(C,{className:"w-full",title:n?"Ваша заявка отправлена":"Не удалось отправить заявку",description:n?s:"Пожалуйста, повторите позднее",headlineVersion:"XS",isEmbedded:!0}),o(gi,{type:"button",onClick:r,children:"Хорошо"})]})})})),yi=e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(bi,{...e}),n),close:n}},vi=e=>t=>t&&Object.entries(e).flatMap((([e,n])=>n(t[e])))||[],Ni=e=>{const{acquiringType:t,onlineCheckout:n,posTerminal:l,amount:a,term:i,annualRevenue:r,serviceType:s,vedTypes:o,region:c,...d}=e,m=t||r?(e=>{const{acquiringType:t,onlineCheckout:n=!1,posTerminal:l=!1,term:a,amount:i,annualRevenue:r}=e;return t?`Вид эквайринга=${t?.text||""}${qn(t?.key)?`/Онлайн касса=${n}/POS-терминал=${l}`:"/Онлайн касса=false/POS-терминал=false"}`:`Сумма=${i}/Срок=${a}/Выручка=${r}`})(e):null,u={...d,...ki(o),...wi(c),...m?{partnerComments:m}:{},...s?{typeForm:s}:{}};return Object.fromEntries(Object.entries(u)?.map((([e,t])=>[e,t?.key||t])))},wi=e=>e?.key||e?.text?{region:e?.text||e?.key}:{},ki=e=>e?{vedTypes:Object.fromEntries(ri.map((t=>[t,t===e])))}:{},Si={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Ft[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:ri[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1},Ci=d((({text:e,link:t})=>c(k,{size:"text-l",font:"font-light",color:"text-secondary-text",children:[e?o(Re,{children:e}):null,t?o(be,{href:t.href,ariaLabel:"условия передачи данных",target:t.target||"",className:"!text-left text-primary-main",children:o(Re,{children:t.text})}):null]}))),Ti=(e,t)=>o(gi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ii=(e,t,n)=>c("div",{className:"flex col-span-2 gap-xs flex-col w-full items-baseline",children:[e?c("div",{children:[c("div",{className:"flex gap-3 items-center",children:[o(Yt,{...e}),o(Ci,{link:t})]}),Ut(jn(e,_n).error)]}):o(Ci,{text:"Нажимая кнопку, вы подтверждаете согласие с ",link:t}),Ti(n)]}),Bi={send:async function(e,t=!1){const{typeForm:n,region:l,phone:a="",email:i,birthday:r,desiredMeetingDate:s,inn:o,addressBranch:c,secondaryPhone:d="",bankEmpolee:m,applicationDate:u,serviceDirection:h,...p}=e,g=t&&"Юридическое лицо / ИП"!==h,f=g?"/api/v1/lead":"/api/v1/sendcorporatelead",x={typeForm:n,...vt(l,g),...Nt(i,g),...bt(a),...yt(s,"desiredMeetingDate"),...g?yt(r):{inn:o},..."FEEDBACK"===n?{}:{addressBranch:c,bankEmpolee:m,applicationDate:u,...wt(d)},...p};try{const e=await fetch(f,{method:"POST",headers:{"Content-Type":"application/json"},mode:"cors",body:JSON.stringify(x)});return e?.ok?await e.json():null}catch(e){return null}}},Pi=d((({className:e,title:t,typeForm:n="",sections:r=[],button:s,link:d,endpoint:m,additionalParams:h,isContacts:p,data:g,...f})=>{const x=r?.flatMap((e=>e?.inputs))||[],b=((e,t="")=>{const n=Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Si[e.name]])));return n?.serviceType&&"PREMIUMSERVICE"===t&&(n.serviceType=Ft[1]),{...n,typeForm:{key:t,text:""}}})(x,n),[y,v]=l(""),N=i((async(e,t)=>{const l=Mi(x,e),a=vi(En(l));if(!kn(a(e)))return"Fail";const i=Ni({...e,...h}),r=await Bi.send(i,"lead"===m)?"OK":"Fail";if(v(r),r){yi({responseType:r,typeForm:n}).open()}if("OK"===r&&g){const e=Dt();kt({aspectsAttributes:g,aspects:e,ev:t})}return r}),[]),[,{field:k,onSubmit:S,reset:C}]=At(b,{onSubmit:N}),T=(e=>e?.find((e=>"consentDataProcessing"===e?.name)))(x)?.name;return a((()=>{"OK"===y&&(v(""),C())}),[y]),c(Ot,{className:u("container space-y-m",e),title:t,...f,children:[c("form",{onSubmit:S,children:[r.map(((e,t)=>c("div",{className:u(di(e.columns),"grid gap-x-m"),children:[mi(e.title),(e?.inputs||[])?.map(ci(k,n))]},`section-${t}`))),Ii(T?k("consentDataProcessing"):void 0,d,s)]}),p?c("div",{className:"space-y-m",children:[o(w,{headingType:"h6",title:"Или свяжитесь с нами удобным способом",className:"@xl:text-center"}),c("div",{className:"flex sm:justify-center gap-xl",children:[c("a",{className:"flex gap-s items-center text-primary-text no-underline",href:"tel:8 (800) 200-78-70","aria-label":"телефон 8 (800) 200-78-70",children:[o(ne,{image:{icon:"PhoneIcon"},width:"24",height:"24"}),o("span",{children:"8 (800) 200-78-70"})]}),c("a",{className:"flex gap-s items-center text-primary-text no-underline","aria-label":"почта ved@rshb.ru",href:"mailto:ved@rshb.ru",children:[o(ne,{image:{icon:"MailIcon"},width:"24",height:"24"}),o("span",{children:"ved@rshb.ru"})]})]})]}):null]})})),Mi=(e,t)=>e.filter((e=>e)).filter((e=>!e?.condition||e?.condition.values.find((n=>{const l=t?.[e?.condition?.name??""];return"secondaryPhone"===e.name?Boolean(t.secondaryPhone):n===(l?.key??l)})))),Ri=["processPersonalDataLeadFlg","consentProviderFlg","consentPfrFlg","consentPhotoFlg","consentAssignmentClaimsFlg","consentCollectionFlg","consentInformFlg","consentToReceiveMaterials"],Vi={typeForm:"",region:{key:"",text:""},addressBranch:{key:"",text:""},surname:"",name:"",phone:"",secondaryPhone:"",comment:"",product:"",partnerComments:"",annualRevenue:"",term:12,amount:1e5,acquiringType:$n[0],serviceType:Ft[0],feedbackMethod:jt[0],serviceDirection:Et[0],vedTypes:ri[0],birthday:void 0,isClient:!1,onlineCheckout:!1,posTerminal:!1,consentToReceiveMaterials:!1,consentDataProcessing:!1,processPersonalDataLeadFlg:!1,consentProviderFlg:!1,consentPhotoFlg:!1,consentAssignmentClaimsFlg:!1,consentCollectionFlg:!1,consentInformFlg:!1},Di=(e,t="")=>({...Object.fromEntries(e.map((e=>[e.name,"ved"===e.fieldType&&e?.defaultValue||Vi[e.name]]))),typeForm:{key:t,text:""}}),zi=d((({className:e="",isFoldButtonOnTop:t=!1,unfoldedByDefault:n=!1,renderFoldableSection:a,renderFoldButton:r})=>{const[s,o]=l(n),d=i((()=>{o((e=>!e))}),[]),m=a({isUnfolded:s,onToggle:d}),u=r?r({isUnfolded:s,onToggle:d}):null;return c("div",t?{className:e,role:"group",children:[u,m]}:{className:e,role:"group",children:[m,u]})}));const Ai=d((({className:e="",isUnfolded:t,children:n})=>{const l=s(null),i=function(e,t){const n=s(null);return a((()=>{const t=n?.current;if(!t)return;const l=new ResizeObserver((n=>{e(t,n[0])}));return l.observe(t),()=>{l.disconnect()}}),[e,...t]),n}((e=>{l.current&&(l.current.style.maxHeight=t?`${e.scrollHeight}px`:"")}),[t]);return o("div",{ref:l,className:`transition-max-h duration-300 overflow-hidden ${l.current||!t?"max-h-0":""} `,children:o("div",{className:e,ref:i,children:n})})})),_i=d((({inputs:e=[],typeForm:t="",field:n,key:l})=>{const a=e.every((e=>Boolean(n(e.name).value))),i=r((()=>e?.filter((e=>e.required))?.some((e=>Boolean(jn(n(e?.name),Fn[e?.name]).error)))),[e]);return o("div",{className:"w-fit",children:o(zi,{isFoldButtonOnTop:!0,renderFoldableSection:({isUnfolded:l})=>o(Ai,{isUnfolded:l,className:"flex flex-col pl-2xl",children:e.map(ci(n,t))}),renderFoldButton:Oi(c("div",{children:[o(Yt,{value:a,onChange:t=>{for(const l of e){const e=n(l.name);e?.onChange&&e.onChange(t)}},text:"Согласие на все документы"},l),Ut(i?"Отметьте все обязательные соглашения":"")]}))})})})),Oi=e=>t=>c("div",{className:"flex items-start",children:[e,o("button",{onClick:t.onToggle,className:"px-m py-2xs",children:o(W,{className:"text-primary-text",name:t.isUnfolded?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})})]}),Fi=(e,t)=>o(gi,{className:u("w-full @xl:w-auto",t),type:"submit",children:e?.text?e.text:"Отправить заявку"}),Ei=()=>{const e=sessionStorage.getItem("accessToken");return e?{Authorization:`Bearer ${e}`}:null},ji=e=>"application/json"===e.headers.get("Content-Type"),Li=async(e,t,n)=>await fetch("https://retail-light-api.cprb.dev.rshbdev.ru/api/v1"+e,{method:t,headers:{"Content-Type":"application/json",...Ei()},credentials:"include",body:n?JSON.stringify(n):null}).then((e=>{if(e.ok)return(e=>ji(e)?e.json():e)(e);throw e})).catch((e=>{throw e})),$i=e=>{sessionStorage.setItem("accessToken",e.access_token),sessionStorage.setItem("refreshToken",e.refresh_token)},Ui=async e=>await Li("/public-data/createUserProfile","POST",e),qi=async e=>await Li("/user-data/updateUserProfile","PUT",e),Wi=async e=>await Li("/user-data/createDraftTask","POST",e),Hi=async e=>await Li("/user-data/updateUserTask","PUT",e),Yi=async e=>await Li("/sms/sendCode","POST",e),Ki=async e=>await Li("/sms/checkCode","POST",e).then($i),Xi=async e=>await Li(`/sms/createCaptcha?phoneNumber=${e}`,"GET"),Gi=async e=>await Li("/sms/checkCaptcha","POST",e),Ji={width:"103",height:"21"},Zi={"bg-white":"color",transparent:"white"},Qi={"bg-white":"text-primary-main",transparent:"text-white"},er=(e,t,n)=>o(ne,{image:t?.src?t:{icon:t?.icon||"LogoIcon",iconVersion:Zi[e]},className:Qi[e],width:n?.width,height:n?.height}),tr={"bg-white":"text-primary-text",transparent:"text-white"},nr=d((({className:e,href:t="/",logo:n,children:l,targetBlank:a,bgColor:i="bg-white",showTitle:r=!0,data:s})=>c("a",{className:u("inline-flex items-center font-sans no-underline",e),href:n?.href??t,target:a?"_blank":"_self","aria-label":n?.title??"Россельхозбанк",...he(s),children:[er(i,n?.image,Ji),r?l??o("div",{className:"ml-s",children:o(Re,{font:"font-medium",color:tr[i],size:"text-s",children:n?.title??"Россельхозбанк"})}):null]}))),lr=async(e,t)=>{const n=await Xi(t);e(URL.createObjectURL(await n.blob()))},ar=d((({phoneNumber:e,close:t,sendCode:n,onClose:i})=>{const[r,s]=l(""),[d,m]=l(""),[u,h]=l(!1);return a((()=>{lr(s,e)}),[]),o(xi,{head:o(nr,{}),onClose:i,className:"my-6xl max-w-lg w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[c("div",{className:"flex h-[140px] w-[300px]",children:[o("img",{className:"grow",src:r}),o("div",{onClick:()=>lr(s,e),className:"flex w-8 items-center justify-center cursor-pointer",children:o(W,{iconVersion:"normal",name:"RefreshIcon"})})]}),o(rn,{className:"w-[300px]",onChange:m,value:d,placeholder:"Введите код с картинки"}),u?o("div",{className:"text-error",children:"Неверный код"}):null,c("div",{className:"flex w-[310px] justify-between",children:[o(gi,{onClick:t,version:"secondary",children:"Вернуться"}),o(gi,{type:"submit",disabled:!d,onClick:()=>(async({code:e,setHasError:t,close:n,sendCode:l=nn})=>{const a=await Gi({captchaText:e});"ERROR"===await a.text()?t(!0):(l(),n?.())})({code:d,setHasError:h,close:t,sendCode:n}),version:"secondary",children:"Отправить"})]})]})})})),ir=d((({color:e="text-primary-main",position:t="absolute",blur:n=!0})=>o("div",{className:u("flex justify-center items-center h-full w-full z-50",t,{"backdrop-blur":n}),children:o("div",{className:u("inline-block h-28 w-28","animate-spin rounded-full","border-8 border-solid border-current","border-r-transparent",e),role:"status"})}))),rr=d((({time:e,setTime:t,className:n})=>(a((()=>{const n=setInterval((()=>{t(e-1)}),1e3);return 0===e&&clearInterval(n),()=>{clearInterval(n)}}),[e]),o("span",{className:n,children:sr(e)})))),sr=e=>`${`${Math.floor(e/60)}`.padStart(2,"0")}:${(""+e%60).padStart(2,"0")}`,or=d((({values:e,setValues:t,hasError:n,errorText:r})=>{const[d,m]=l(0),u=s([]);a((()=>{u.current?.[d]?.focus()}),[d]);const h=i((n=>l=>{const{value:a}=l.currentTarget,i=n===e.length-1,r=a.length>1;i&&r||(t(e.map(((e,t)=>t===n?a:e))),m(n+1))}),[e]),p=i((n=>l=>{const{key:a}=l;if("Backspace"===a&&!e[n]){const l=n>0?n-1:e.length-1,a=e.map(((e,t)=>t===l?"":e));t(a),m(l)}}),[e]),g=i((n=>{n.preventDefault();const l=n.clipboardData.getData("text"),a=e.map(((e,t)=>t<l.length?l[t]:e));t(a),m(a.length-1)}),[e]);return c("div",{className:"flex flex-col gap-2 text-center",children:[o("div",{children:e.map(((t,l)=>o("input",{type:"number",maxLength:1,value:t,onChange:h(l),onPaste:g,ref:e=>{u.current||(u.current=[]),u.current[l]=e},onFocus:e=>e.target.select(),onKeyDown:p(l),className:cr(l,e,n)},l)))}),n?o("div",{className:"text-error",children:r}):null]})})),cr=(e,t,n=!1)=>{const l=!t[e];return`w-16 h-20 text-3xl text-center p-2 m-2 border ${n&&l?"border-error":"border-gray"} rounded-md caret-transparent outline-none`},dr=d((({isDisabled:e,onClick:t,text:n})=>o(gi,{type:"button",onClick:t,disabled:e,children:o(Re,{font:"font-medium",children:n})}))),mr=d((({close:e=nn,onClose:t=nn,title:n,description:s,__html:d,code:m=!0,codeLength:u=4,textButton:h="",phoneNumber:p="+79999999999"})=>{const[g,f]=l(Array(u).fill("")),{handleSubmit:x,hasError:b,errorText:y,isLoading:v,timeNextReq:N,isSubmitButtonDisabled:w,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T}=(({close:e,values:t})=>{const[n,s]=l(!1),[o,c]=l(""),[d,m]=l(!1),[u,h]=l(0),[p,g]=l(!1),[f,x]=l(0),b=i((()=>{s(!1),c("")}),[]),y=r((()=>0===u&&p),[u,p]),v=r((()=>f>2||!t.every(Boolean)||y),[t]),N=i((async()=>{try{g(!1),h(0),x(f+1),m(!0),await Ki({smsText:t.join(""),smsCodesSetName:{key:"AUTHENTICATION"}}),b(),e&&e()}catch{m(!1),c(f>1?"Исчерпан лимит ввода смс-кода":"Неверный код"),s(!0)}}),[t,f]);return a((()=>{y?(s(!0),c("Код просрочен")):s(!1)}),[y]),{handleSubmit:N,hasError:n,errorText:o,isLoading:d,timeNextReq:u,isSubmitButtonDisabled:v,setTimeNextReq:h,setIsTimerStarted:g,setAttemps:x}})({values:g,close:e}),I=i((()=>{(async({phoneNumber:e,captchaDialog:t,setTimeNextReq:n,setIsTimerStarted:l,setAttemps:a})=>{try{await Yi({phoneNumber:e,smsCodesSetName:{key:"AUTHENTICATION"}}),a(0),n(180),l(!0)}catch(e){429===e?.status&&t.open()}})({phoneNumber:p,captchaDialog:B,setTimeNextReq:k,setIsTimerStarted:S,setAttemps:T})}),[]),B=((e,t)=>{const{open:n,close:l,closeAll:a}=de();return{open:()=>n(o(ar,{close:l,onClose:t,...e})),close:l,closeAll:a}})({phoneNumber:p,sendCode:I},t);return a((()=>{I()}),[]),o(xi,{className:"my-6xl max-w-3xl w-full min-h-fit mx-auto rounded-lg",children:c("div",{className:"flex flex-col gap-lg items-center rounded-md",children:[o(C,{className:"w-full",title:n,description:s,headlineVersion:"S",isEmbedded:!0}),m?o(or,{values:g,setValues:f,errorText:y,hasError:b}):null,hr(N,k,I),o(Pe,{itemSize:"list-s",__html:d}),ur(h,w,x),v?o(ir,{blur:!1}):null]})})})),ur=(e,t,n)=>e?o(dr,{isDisabled:t,onClick:n,text:e}):null,hr=(e,t,n)=>e?c("div",{className:"flex flex-row text-l font-light text-primary-main",children:["Получить новый код можно через",o(rr,{className:"text-primary-main ml-1",time:e,setTime:t})]}):o(be,{onClick:n,className:"text-primary-main",children:"Получить новый код"}),pr=(e,t)=>{const[n,a]=l("");return{handleSubmit:i((async n=>{const l=vi(En(e));if(!kn(l(n)))return"Fail";try{const{profile:e}=await Ui({profile:{phone:xt(n.phone)}}),l=e?.id;if(l&&n?.phone){const e=async()=>{try{await qi(((e,t)=>{const{name:n="",surname:l="",middleName:a="",birthday:i="",phone:r="",email:s="",processPersonalDataLeadFlg:o,consentProviderFlg:c,consentPfrFlg:d,consentPhotoFlg:m,consentAssignmentClaimsFlg:u,consentCollectionFlg:h,consentInformFlg:p}=t;return{profile:{id:e,name:n,surname:l,midname:a,birthDate:i&&ft(i,!0),email:s,phone:xt(r),processPersonalDataLeadFlg:Boolean(o),consentProviderFlg:Boolean(c),consentPfrFlg:Boolean(d),consentPhotoFlg:Boolean(m),consentAssignmentClaimsFlg:Boolean(u),consentCollectionFlg:Boolean(h),consentInformFlg:Boolean(p)}}})(l,n));const{taskId:e,participantId:a}=await Wi({profileId:l,programId:t});await Hi(((e,t,n,l)=>({sendToBank:!0,taskKind:"SHORT",task:{taskSource:globalThis.location.origin,id:t,participants:[{birthDate:l?.birthDate,id:e,midname:l?.midname,name:l?.name,surname:l?.surname,profile:{id:n},participantContacts:[{contactTypeCd:{key:"EMAIL"},value:l?.email},{contactTypeCd:{key:"MAIN_PHONE"},value:l?.phone}],roleCd:{key:"BORROWER",value:"Заемщик"}}]}}))(a,e,l,n)),globalThis.location.href="/credit-lead"}catch{a("Fail")}};(e=>{const{open:t,close:n}=de();return{open:(l={})=>t(o(mr,{onClose:n,...e}),l),close:n}})({close:e,...gr(n?.phone)}).open()}}catch{a("Fail")}}),[]),responseStatus:n}},gr=e=>({title:"Подтвердите номер телефона",description:`Мы отправили код на ${e}`,phoneNumber:xt(e),textButton:"Оформить",__html:"<span>Вводя код, я подтверждаю, что ознакомлен и подписываю:</span>\n <ul><li>соглашение о порядке использования простой электронной подписи,\n </li><li>согласие на обработку персональных данных,\n </li><li>предоставление и подписание прочих согласий Банка,\n </li><li>согласие на запрос в ПФР</li></ul>"}),fr=d((({className:e,title:t,programId:n,typeForm:i="",sections:r=[],button:s,...d})=>{const m=r?.flatMap((e=>e?.inputs))||[],h=Di(m,i),[p,g]=l("");a((()=>{sessionStorage.removeItem("accessToken"),sessionStorage.removeItem("refreshToken")}),[]);const{handleSubmit:f,responseStatus:x}=pr(m,n||"");if(x){yi({responseType:x,typeForm:i}).open()}const[,{field:b,onSubmit:y,reset:v}]=At(h,{onSubmit:f});return a((()=>{"OK"===p&&(g(""),v())}),[p]),o(Ot,{className:u("container space-y-m",e),title:t,...d,children:c("form",{onSubmit:y,className:"space-y-m",children:[r.map(((e,t)=>c("div",{className:u(di(e.columns),"grid gap-x-m"),children:[mi(e.title),xr({field:b,typeForm:i,inputs:e?.inputs})]},`section-${t}`))),Fi(s)]})})})),xr=({field:e,typeForm:t="",inputs:n})=>{const{consentInputs:l,restInputs:a}=br(n||[]);return l.length>2?c("div",{children:[a.map(ci(e,t)),o(_i,{inputs:l,field:e})]}):(n||[])?.map(ci(e,t))},br=e=>({consentInputs:e?.filter((e=>Ri.includes(e.name)))||[],restInputs:e?.filter((e=>!Ri.includes(e.name)))||[]}),yr=d((({title:e,description:t})=>{const n=we();return c("div",{className:"bg-white p-6xl py-20 flex gap-s flex-col @xl:items-center",children:[o(ne,{image:{icon:"MagnifierIcon",iconVersion:"normal"},width:"120",height:"120"}),o(C,{title:e,description:t,headlineVersion:n?"L":"S",isEmbedded:!0,className:"space-y-s"})]})})),vr=(e=!1)=>e?"border border-solid border-gray group-data-secondary:border-white/50 group-data-gray:border-main-divider":"",Nr=e=>({height:"calc(100vh - 242px)",minHeight:`${e||866}px`});function wr(e=0){const t=Math.round(10*e);return Array.from({length:t}).fill(0).map(((e,n)=>Math.min(n/t)),1).concat(1)}const kr=d((({className:e,style:t,idx:n,activeIndex:l,observerOptions:c,children:d,onIntersection:m})=>{const h=function(e,{sensitivity:t,rootRef:n}={}){const l=s(null),i=r((()=>({threshold:wr(t),root:n?.current})),[t,n?.current]);return a((()=>{if(!l.current)return;const t=new IntersectionObserver(e,i);return t.observe(l.current),()=>{t.disconnect()}}),[e,i]),l}(i((e=>{e.length&&m&&m(n||0,e[e.length-1])}),[m,n]),c);return o("div",{className:u("inline-block snap-always box-border",e),style:t,"aria-current":Boolean(n===l),ref:h,role:"listitem",children:d})})),Sr=["min-w-full","lg:min-w-[50%]","lg:min-w-[33.3%]","lg:min-w-[25%]"],Cr=d((({className:e,itemClassName:t,containerRef:n,activeIndex:l,visibleItemCount:a=0,gap:r=0,padding:c=0,listType:d="horizontal-list",snapAlign:m="snap-center",minHeight:h,children:p,onVisibleItemsChange:g,onVisibleIndicesChange:f})=>{const x={sensitivity:1,rootRef:n},b=s([]),y=i(((e,t)=>{const n=[...b.current||[]];n[e]=t,b.current=n,g&&g(n),f&&f(Ir(n))}),[g,f]),v=a>0?r*Number(a)-1:0,N="vertical-list"===d,w="horizontal-list"===d,k={...w?Tr(c,v):{},...N?Nr(h):{},gap:`${r}px`};return o("div",{className:u("box-border overflow-auto no-scrollbar",d,e),style:k,ref:n,role:"list",children:(S=(e,n)=>o(kr,{className:u(m,a?Sr[a-1]:"",{"h-full":N},t),style:w?Tr(c/4):{},activeIndex:l,idx:n,observerOptions:x,onIntersection:y,children:e},String(n)),e=>null==e?e:Array.isArray(e)?e.map(S):S(e,0))(p)});var S})),Tr=(e,t=0)=>({marginLeft:-e+"px",marginRight:-e+"px",paddingLeft:`${e}px`,paddingRight:`${e+t}px`}),Ir=e=>e.map(((e,t)=>[e,t])).filter((([e])=>e&&e.intersectionRatio>=.9)).map((([,e])=>e)),Br={"horizontal-list":"w-6","vertical-list":"h-6"},Pr=({activeIndex:e,onClick:t,listType:n="horizontal-list"})=>(l,a)=>o("div",{className:u("cursor-pointer rounded-full transition-width duration-300 bg-primary-main group-data-secondary:bg-white",a===e?Br[n]:"w-2 h-2 opacity-30"),role:"button","aria-hidden":!0,onClick:()=>t(a)},String(a)),Mr=({activeIndex:e,onClick:t})=>(n,l)=>{const a=l===e,i=a?"min-w-[350px] bg-white shadow-dark-blue border-none p-6":"min-w-72 ease-in duration-300 bg-white/10 px-xl py-lg hover:backdrop-blur",r=a?"text-primary-text text-h6 py-xs":"text-l pb-2xs text-secondary-text group-data-secondary:text-white",s=a?"text-l":"text-m group-data-secondary:text-white/80";return c("button",{type:"button",onClick:()=>t(l),"aria-label":n?.title,className:u("max-h-28 mt-xs ml-xs relative px-xl box-border overflow-hidden text-left grow basis-0 border border-gray group-data-secondary:border-white/50 whitespace-nowrap",i),children:[o("div",{className:r,children:n?.title}),o("div",{className:u("text-secondary-text font-light",s),children:n?.description})]},String(l))},Rr=e=>e,Vr=(e=Rr)=>t=>t.reduceRight(((t,n)=>e(t)>e(n)?t:n)),Dr=Vr(),zr=(e=Rr)=>Vr((t=>-e(t))),Ar=zr(),_r=e=>t=>e.scrollWidth/t,Or=e=>(t,n)=>{e.scrollBy({left:n*_r(e)(t),behavior:"smooth"})},Fr=({itemCount:e,onVisibleIndicesChange:t})=>{const n=s(null),[a,r]=l([]),o=i((e=>{r((t=>{return(n=t)===(l=e)||Boolean(n&&l&&n?.length===l?.length&&n.every(((e,t)=>e===l[t])))?t:e;var n,l})),t&&t(e)}),[t]),[c,d]=a.length?[zr()(a),Vr()(a)]:[-1,-1],m=c>0,u=d<e-1,h=i((()=>{var t;n.current&&(m?Or(n.current)(e,-1):(t=n.current).scrollTo({left:t.scrollWidth,behavior:"smooth"}))}),[e,m]),p=i((()=>{n.current&&(u?Or(n.current)(e,1):n.current.scrollTo({left:0,behavior:"smooth"}))}),[e,u]),g=i(((e,t={behavior:"smooth",block:"nearest",inline:"center"})=>{n?.current&&n.current.children[e]?.scrollIntoView(t)}),[n]);return[n,{scrollLeft:h,scrollRight:p,scrollTo:g,canScrollLeft:m,canScrollRight:u,visibleIndicesRange:[c,d],handleVisibleIndicesChange:o}]},Er={"horizontal-list":"mx-auto mt-lg w-fit","vertical-list":"absolute flex-col justify-center h-full top-0 left-4"},jr=d((({className:e="",activeIndex:t=0,dotCount:n=0,listType:l="horizontal-list",version:r,navButtons:s=[],containerRef:c,containerScroll:d})=>{const m=we(),[h,p]=Fr({itemCount:s.length}),g=Lr(Boolean(s?.length));a((()=>{s?.length&&t>=0&&h?.current&&p.scrollTo(t,g)}),[t]);const f=i((e=>{e!==t&&c?.current&&d?.scrollTo(e,g)}),[c?.current]);return s?.length&&!m?o(Cr,{containerRef:h,snapAlign:"snap-start",itemClassName:"h-36 flex items-stretch w-screen",gap:8,children:s.map(Mr({activeIndex:t,onClick:f}))}):n?o("div",{className:u("flex gap-xs",Er[l],r?"group":"",e,{"pb-xl":s?.length&&m}),"data-ver":r,children:Array.from({length:n}).fill(null).map(Pr({activeIndex:t,onClick:f,listType:l}))}):null})),Lr=(e=!1)=>({behavior:e?"auto":"smooth"}),$r=d((({className:e,disabled:t,...n})=>o(be,{rounded:!0,className:u("group/btn w-12 h-12 min-h-12 max-h-12 flex items-center justify-center shadow-main-black",t?"bg-secondary-light text-secondary-text":"bg-white text-primary-text hover:text-primary-main",e),disabled:t,...n,children:o(ne,{className:"w-4 h-4 min-w-4 min-h-4 rounded-full box-border",image:{icon:"ArrowLeftIcon",iconVersion:"black"},imageClassName:"group-hover/btn:text-primary-main",width:"16",height:"16"})}))),Ur=d((e=>o($r,{...e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left"}))),qr=d((e=>o($r,{...e,className:`${e.className||""} rotate-180`,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right"}))),Wr="absolute top-0 bottom-0 z-40 hidden @lg:block w-20 pointer-events-none",Hr=d((({className:e,scroll:t,hasBlur:n,arrowsPadded:l,isBottom:a})=>{const{canScrollLeft:i,canScrollRight:r,scrollLeft:s,scrollRight:d}=t,m=l&&!a;return c("div",{className:e,children:[n?Yr(t):null,i?o(Ur,{className:u(Kr(a),m?"left-1":"left-0"),onClick:s}):null,r?o(qr,{className:u(Kr(a),m?"right-1":"right-0"),onClick:d}):null]})})),Yr=e=>c("div",{children:[e.canScrollLeft?o("div",{className:u(Wr,"left-0 bg-opacity-from-white group-data-secondary:bg-none")}):null,e.canScrollRight?o("div",{className:u(Wr,"right-0 bg-opacity-to-white group-data-secondary:bg-none")}):null]}),Kr=(e=!1)=>u("absolute z-40",e?"bottom-[56px]":"top-[calc(50%-24px)]"),Xr=d((({className:e,version:t,gap:n=14,padding:l=16,visibleItemCount:a=1,listType:i="horizontal-list",snapAlign:r,minHeight:s,showArrows:d,hasBlur:m,arrowsPadded:h,showDots:p,children:g,onVisibleIndicesChange:f,navButtons:x})=>{const b=Array.isArray(g)?g.length:0,[y,v]=Fr({itemCount:b,onVisibleIndicesChange:f}),[N]=v.visibleIndicesRange;return c("div",{className:u(e,"vertical-list"===i?"relative h-full":""),children:[o(Cr,{containerRef:y,activeIndex:N,visibleItemCount:a,gap:n,padding:l,listType:i,snapAlign:r,minHeight:s,onVisibleIndicesChange:v.handleVisibleIndicesChange,children:g}),o(Hr,{className:u(!d&&"hidden lg:block"),scroll:v,hasBlur:m,arrowsPadded:h,isBottom:Boolean(x?.length)}),o(jr,{className:u(!p&&"lg:hidden"),activeIndex:N,dotCount:b,listType:i,version:t,navButtons:x,containerRef:y,containerScroll:v})]})})),Gr=({blocksToRender:e,...t})=>o(Xr,{visibleItemCount:0,gap:0,arrowsPadded:!0,children:M(e,{...t.options,parent:t.block,renderProps:(e,t,n)=>o("div",{className:u("relative min-w-80",vr(!0)),children:B(e,t)},String(n))})}),Jr=e=>e%2!=0,Zr=d((({textNode:e,iconNode:t,tag:n,onClick:l,justifyContent:a="between",className:i,role:r,...s})=>c(n,{tag:n,className:u("flex items-center w-full gap-1","between"===a?"justify-between":"justify-center",i),onClick:l,role:r,...s,children:[e?o("div",{children:e}):null,t?o("div",{children:t}):null]}))),Qr=d((({className:e="",label:t,icon:n,dataTheme:l="pc",disabled:a=!1,onClick:i})=>o(Zr,{tag:"button",onClick:i,disabled:a,"data-theme":l,justifyContent:"center",role:"button",className:u("py-4 border border-transparent outline-none focus:border-primary-text space-x-s",a?"bg-main-divider text-main-disabled hover:bg-main-divider":"bg-primary-main text-white hover:bg-primary-hove",e),textNode:o(Re,{size:"text-h4",children:t}),iconNode:n?o(ne,{image:{icon:n,iconVersion:"white"},className:"my-auto",width:"20",height:"20"}):null}))),es=({isUnfolded:e,onToggle:t})=>o(Qr,{icon:["ArrowDownIcon","ArrowUpIcon"][Number(e)],label:["Развернуть","Скрыть"][Number(e)],onClick:t}),ts=["ArrowDownIcon","ArrowUpIcon"],ns="space-y-px lg:space-y-0 lg:grid lg:grid-cols-12 gap-2xs",ls=({topItemsCount:e=0,label:t="",block:n,blocksToRender:l=[],...a})=>{const[i,r]=e>0?[l.slice(0,e),l.slice(e)]:[l,[]];return c("div",{className:u("space-y-2xs",{hidden:!l.length}),children:[c("div",{className:u(ns),children:[M(i,{...a.options,parent:n}),Jr(i.length)?o(pt,{className:"col-span-6",...a}):null]}),o(zi,{renderFoldableSection:({isUnfolded:e})=>c(Ai,{className:u(ns),isUnfolded:e,children:[M(r,{...a.options,parent:n}),Jr(r.length)?o(pt,{className:"col-span-6",...a}):null]}),renderFoldButton:({isUnfolded:n,onToggle:l})=>o(Qr,{className:u({hidden:e<1}),disabled:!r?.length,label:t,icon:ts[Number(n)],dataTheme:a.options?.page?.colorPalette,onClick:l})})]})},as=d((({blocksSection:e,blocksToRender:t=[],notFound:n,...l})=>{switch(e?.view){case"grid":return c("div",{children:[is(n,t),ls({...e,...l,blocksToRender:t})]});case"carousel":return c("div",{className:"relative",children:[is(n,t),Gr({...l,blocksToRender:t})]});default:return null}})),is=(e,t)=>e&&!t.length?o(yr,{...e}):null,rs=e=>t=>t.reduce(((t,n,l)=>t.length?t.concat({...e,key:`sep-${l}`},n):[n]),[]),ss=d((({value:e,onChange:t,items:n=[],multiple:l})=>n.map((n=>o(wa,{text:n?.title,value:[e].flatMap((e=>e)).includes(n.value),onChange:()=>(n=>{if(!t)return;const a=e?.includes(n);t(l?a?(e||[]).filter((e=>e!==n)):[...e||[],n]:a?[]:[n])})(n.value),type:l?"checkbox":"radio"},n.value))))),os=d((({children:e,filtrationSchema:t,resetButton:n,field:l,reset:a})=>c("form",{className:"flex flex-col @4xl:flex-row justify-between bg-white p-4xl gap-s @4xl:gap-0",children:[c("div",{className:"flex flex-col @4xl:flex-row gap-xl",children:[e,rs(o("div",{className:"h-full w-px bg-gray hidden @4xl:block"}))(Object.entries(t).map(cs(l)).filter(Boolean))]}),n?o("div",{children:o(gi,{type:"reset",className:"w-full @4xl:w-56 @4xl:ml-s",onClick:a,children:n?.text})}):null]}))),cs=e=>([t,n])=>{const l=n?.type;return"array"===l?ds(t,e)(n):null},ds=(e,t)=>n=>{const l=n?.items?.enum?.map(((e,t)=>({value:e,title:n?.items?.enumNames?.[t]||""})))||[];return c("div",{className:"flex-1",children:[n?.title?o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-medium",color:"text-primary-text",children:n.title})}):null,o(ss,{items:l,multiple:!n?.single,...t(e)})]},e)};function ms(e,...t){return e.map(((e,n)=>[e,...t.map((e=>e[n]))]))}const us=e=>null==e||""===e||Array.isArray(e)&&0===e.length||"object"==typeof e&&0===Object.keys(e).length,hs=(e,t)=>Object.entries(e).map((([n,l])=>"number"==typeof l?Array.isArray(t[n])?((e,t)=>n=>us(t[e])||us(n[e])||n[e]?.includes(t[e]))(n,e):((e,t)=>n=>us(t[e])||us(n[e])||ps(t[e])<=ps(n[e]))(n,e):"object"==typeof l&&"min"in l&&"max"in l?((e,t)=>n=>us(t[e])||us(n[e])||ps(t[e]?.min)>=ps(n[e]?.min)&&ps(t[e]?.min)<=ps(n[e]?.max))(n,e):Array.isArray(l)?((e,t)=>n=>us(t[e])||us(n[e])||t[e]?.every((t=>n[e]?.includes(t))))(n,e):((e,t)=>n=>us(t[e])||us(n[e])||t[e]===n[e])(n,e))).every((e=>e(t))),ps=e=>Number(e||0),gs=(e,{block:t,page:n,normalize:l=zt})=>{const a=t?.blocks||[],[i,{field:s,reset:o,update:c}]=At(e),d=r((()=>ms(a,a.map((e=>dt(e.content,n?.fallback))))),[a,n?.fallback]),m=i===e?a:((e,t)=>(n=zt)=>e?.filter((([,e])=>hs(t,n(e)||{}))).map((([e])=>e)))(d,i)(l);return[i,{blocksToRender:m,blocksWithProps:d},{field:s,reset:o,update:c}]},fs={},xs={},bs=ut((({className:e,filtrationSchema:t=fs,consumerField:n={},resetButton:l,...a})=>{const[,{blocksToRender:i},{field:r,reset:s}]=gs(xs,{block:a.block,page:a.options?.page}),d=o(yn,{className:"w-64",label:n?.title,options:ys(n),...r("consumer",{parse:({key:e})=>[e],format:([e]=[])=>ys(n).find((t=>t.key===e))||{key:""}})});return c(g,{className:u(e),defaultPadding:"p-0",version:"transparent",...a,children:[o(os,{filtrationSchema:t,field:r,reset:s,children:c("div",{children:[d,o("div",{children:o(gi,{type:"reset",className:"mt-lg w-64",onClick:s,version:l?.version,children:l?.text})})]})}),o(as,{blocksToRender:i,...a})]})}),{childrenTypes:["CarouselTariffsCard"],childSchema:e=>({...e?.filtrationSchema,...e?.consumerField?{consumer:e?.consumerField}:{}})}),ys=e=>ms(e.items?.enum||[],e.items?.enumNames||[]).map((([e,t])=>({key:e,text:t}))),vs=(e=!1)=>e?"text-left":"text-center",Ns={"":"bg-main-divider group-data-secondary:bg-white/30",primary:"bg-main-divider",secondary:"bg-secondary-light",opacity:"bg-white/30"},ws=d((({className:e,defaultIconSize:t=44,iconBgVersion:n="primary",size:l,icon:a,...i})=>{const r=String(l?.width||t);return a?o("div",{style:{width:`${r}px`,height:`${r}px`},className:u("rounded-icon object-fit flex justify-center items-center",Ns[n],e),children:o(W,{...i,width:"54%",height:"54%",name:a})}):null})),ks=d((({className:e="",title:t,benefitList:n,...l})=>{const a=we();return c(g,{className:e,defaultPadding:"p-6xl",...l,children:[t?o(w,{headingType:"h3",as:"h2",className:vs(a),title:t}):null,n?.length?o("div",{className:"flex flex-col @md:flex-row flex-wrap w-full @md:justify-center mt-xl gap-5xl",role:"list",children:n.map(Ss)}):null]})})),Ss=({label:e,description:t,__html:n,icon:l,isDotted:a=!1,iconBgVersion:i},r)=>c("div",{className:"flex gap-m items-center @md:basis-1/2 @md:max-w-[500px]",role:"listitem",children:[l?.icon?o(ws,{className:"shrink-0",iconBgVersion:i,...l}):null,l?.src?o(ne,{className:"shrink-0",image:l}):null,e?c("div",{className:"@sm:h-full space-y-xs",children:[o(w,{headingType:"h6",children:e}),o(Re,{size:"text-l",color:"text-secondary-text group-data-secondary:text-white/80",font:"font-light",children:t}),n?o(Pe,{__html:n,isDotted:a,itemSize:"list-s"}):null]}):null]},String(r)),Cs=(e,t,n)=>{return o(Xr,{children:e.map((l=n,({icon:e,title:t,description:n},a)=>c("div",{className:u("flex flex-col gap-1","justify-between p-m h-full border border-gray",{"justify-center":!n&&!t}),children:[t?o(Re,{size:"text-h6",font:"font-normal",align:l,children:t}):null,e?o(ne,{image:e,height:"180",className:"w-auto mx-auto"}):null,n?o(Re,{size:"text-h6",font:"font-normal",align:l,children:n}):null]},String(a))))});var l},Ts=d((({bonusBenefits:e,cardTextAlign:t="text-center",className:n="",columnsCount:l="4",subtitle:a,title:i,...r})=>c(g,{className:u("space-y-3xl",n),defaultPadding:"p-6xl",...r,children:[o(C,{defaultPadding:"",title:i,description:a,headlineVersion:"M"}),e?.length?Cs(e,0,t):null]}))),Is={start:"justify-start",center:"justify-center",end:"justify-end"},Bs=d((({buttons:e,className:t="",align:n,...l})=>{const a=n&&u("flex",Is[n]);return o(g,{className:u("!bg-transparent",a,t),defaultPadding:"p-0",...l,children:Ee(e)})})),Ps=d((({className:e,title:t,children:n,...l})=>c(g,{className:u("space-y-xl",e),defaultPadding:"p-4xl",...l,children:[t?o(w,{className:"text-center",title:t}):null,n]}))),Ms="flex flex-col justify-between @4xl:flex-row gap-x-4xl gap-y-7 @xl:gap-y-4xl",Rs="flex flex-col lg:max-w-80 lg:w-1/2 gap-2xl",Vs="flex flex-col gap-y-xl min-w-52",Ds=d((({value:e,fractionDigits:t,fixed:n,prefix:l,postfix:a})=>o(Re,{size:"text-h3",children:"number"==typeof e?[l,Ue(t,{fixed:n})(e),a].filter(Boolean).join(" "):e}))),zs=d((({className:e,title:t,value:n,color:l="text-secondary-text",...a})=>c("div",{className:u("flex justify-between @xl:flex-col",e),children:[t?o(Re,{size:"text-l",font:"font-light",color:l,children:t}):null,n?o(Ds,{value:n,...a}):o(Re,{size:"text-h3",children:"-"})]}))),As=(e,t)=>e?o(k,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:e},String(t)):null,_s=d((({rate:e=0,title:t="Ставка",unit:n,fractionDigits:l=2,depositeName:a,isShowDepositeName:i,color:r="text-secondary-text"})=>c("div",{children:[o(Re,{size:"text-l",font:"font-light",color:r,children:t}),c("div",{className:"relative",children:[c("div",{className:"flex @xl:justify-center gradient-color-text",children:[o("span",{className:"font-mohave text-title-huge -mt-m tracking-[-15px]",children:Ue(l,{fixed:!0})(e)}),n?o("span",{className:"text-7xl mt-5",children:n}):null]}),a&&i?o("div",{className:"absolute bottom-2 w-full text-left whitespace-nowrap",children:a}):null]})]}))),Os=d((({title:e="Ставка",isUnavailableByTerm:t=!1})=>c("div",{className:"space-y-s min-w-96",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o(W,{className:"w-10 h-10 @5xl:h-auto @5xl:w-40",name:"PercentIcon"}),o("div",{className:"w-64",children:t?c(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:["Процентная ставка для срока ",o("strong",{children:"1-30 дней"})," устанавливается при обращении в Банк"]}):o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:"Выберите другую сумму или срок"})})]}))),Fs=({title:e="Ставка",rate:t=0,unit:n="%",fractionDigits:l=2,isUnknownRateShown:a=!0,color:i="text-secondary-text",children:r,...s})=>a&&0===t?o(Os,{title:e,...s}):c("div",{className:"flex flex-col",children:[o("div",{className:"hidden @xl:block min-w-96",children:o(_s,{title:e,rate:t,unit:n,fractionDigits:l,color:i,...s})}),o(zs,{className:"@xl:hidden",title:e,value:t,postfix:n,fractionDigits:l,fixed:!0,color:i,...s}),r]}),Es=({isShowItems:e=!0,step:t=1e3,postfix:n="₽",...l})=>o(sl,{items:e?[`От ${Ue(1)(l.min||0)} ${n}`,`До ${Ue(1)(l.max||0)} ${n}`]:[],step:t,...l}),js={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},Ls={minSumTravel:6e3,maxSumTravel:2e5,minSumOther:6e3,maxSumOther:2e5,maxBonus:5e3,prefMonthsNum:2,prefTravelBonusRate:.015,prefRestBonusRate:.01,travelBonusRate:.015,restBonusRate:.01},$s=(e,t)=>{const{travelExpenseValue:n,restExpenseValue:l}=e,[a,i]=((e,t,n)=>{const{maxBonus:l=5e3,prefMonthsNum:a=js.prefMonthsNum,prefTravelBonusRate:i=js.prefTravelBonusRate,prefRestBonusRate:r=.01,travelBonusRate:s=.015,restBonusRate:o=.01}=e,c=Math.min(Math.round(i*t)+Math.round(r*n),l);return[c,c*a+Math.min(Math.round(s*t)+Math.round(o*n),l)*(12-a)]})(t||Ls,n,l);return{...t,...e,monthBonus:a,yearBonus:i}},Us=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,...i})=>{const[r,{field:s}]=At({travelExpenseValue:6e3,restExpenseValue:6e3}),{minSumTravel:d,maxSumTravel:m,minSumOther:h,maxSumOther:p,monthBonus:g,yearBonus:f}=$s(r,n);return o(Ps,{className:e,title:t,...i,children:c("section",{className:u(Ms,e),children:[c("div",{className:Rs,children:[Es({title:"Сумма покупок в категории путешествия, ₽",min:d,max:m,step:500,isShowItems:!1,...s("travelExpenseValue")}),Es({title:"Сумма покупок в остальных категориях, ₽",min:h,max:p,step:500,isShowItems:!1,...s("restExpenseValue")})]}),o("div",{className:"mb-s",children:g>=0?Fs({title:"Баллов за месяц",rate:g,fractionDigits:0,isUnknownRateShown:!1,unit:"",color:"text-primary-text"}):null}),c("div",{className:Vs,children:[f>=0?o(zs,{title:"Баллов за год",value:f,color:"text-primary-text"}):null,Ee(l,{isVertical:!0}),As(a)]})]})})})),qs=Math.round(29.5),Ws=(e,t=0)=>e?.sum?e.sum:t,Hs=(e,t=0)=>e?.period&&e.period>=1&&e.period<=60?e.period:t,Ys=e=>`${e} ${Number(e)%10==1?"дня":"дней"}`,Ks={horizontal:"gap-5xl",vertical:"flex-col gap-s"},Xs=d((({items:e,checkedItem:t,className:n,onChange:l,disabled:a=!1,orientation:i="horizontal"})=>o("div",{className:u(`flex ${Ks[i]}`,n),role:"radiogroup","aria-label":"Группа кнопок",children:e?.map((({id:e,text:n})=>o(Yt,{isRadio:!0,text:n,value:t===e,onChange:()=>l&&l(e),disabled:a},String(e))))}))),Gs=({items:e,title:t,mobileTitle:n=t,orientation:l="horizontal",value:a,onChange:i,...r})=>c("div",{className:"grid gap-s whitespace-nowrap",children:[t?o("div",{className:"hidden @5xl:block",role:"radiogroup","aria-label":t,children:o(Re,{color:"text-secondary-text",font:"font-light",children:t})}):null,n?o("div",{className:"@5xl:hidden",role:"radiogroup","aria-label":n,children:o(Re,{color:"text-secondary-text",font:"font-light",children:n})}):null,o(Xs,{orientation:l,items:e,checkedItem:e[a?0:1].id,onChange:t=>i&&i(t===e[0].id),...r})]}),Js=e=>Gs({...e,items:[{id:"everyMonth",text:"Ежемесячно"},{id:"atEndTerm",text:"В конце срока"}]}),Zs=" (c капитализацией)",Qs=({income:e,finalSum:t,postfix:n="₽",buttons:l=[],footnotes:a=[],isCapitalization:i=!1})=>c("div",{className:Vs,children:[o(zs,{title:`Доход в конце срока${i?Zs:""}`,value:e,postfix:n,prefix:"+"}),o(zs,{title:`Сумма в конце срока${i?Zs:""}`,value:t,postfix:n}),Ee(l,{isVertical:!0}),a?.map(As)]}),eo=([e,t],n,l=[])=>n&&n[e]&&n[t]?{[e]:n[e],[t]:n[t]}:to([e,t],l),to=([e,t],n=[])=>({[e]:n.length?Ar(n.filter((t=>"number"==typeof t[e])).map((t=>t[e]))):0,[t]:n.length?Dr(n.filter((t=>"number"==typeof t[e])).map((e=>e[t]))):0}),no=(e,[t,n],l)=>e>=l[t]&&e<=l[n],lo={UL:"businessdepositrates",IP:"selfemployeddepositrates"};const ao={minSum:1e3,maxSum:100000001,minDays:1,maxDays:1095,rate:0,isMonthlyInterestPayment:!0,isReplenished:!1,isPartialWithdrawal:!1,depositeName:"Депозит 'Стабильный'"},io=(e,t)=>{const{daysValue:n,moneyValue:l,isPartialWithdrawal:a,isReplenished:i,isMonthlyInterestPayment:r}=e,s=i||a,o=n<90||n>730,c=function(e){const t=e?.rateType?lo[e?.rateType]:"",{data:n}=Xn(t?`/api/v1/depositrates/${t}`:null,rt);return Array.isArray(n)?n:[]}(t);if(n<=30)return{...ao,...e,isDisabledOperatingDeposit:o,isUnavailableByTerm:!0};const d=c?.find((e=>r===e.isMonthlyInterestPayment&&ro(s,e)&&no(l,["minSum","maxSum"],e)&&no(n,["minDays","maxDays"],e)))||ao,{rate:m}=d,u=so(m,e),h=l+u,p=c||[ao];return{...d,...to(["minSum","maxSum"],p),...to(["minDays","maxDays"],p),...e,isDisabledOperatingDeposit:o,income:u,finalSum:h}},ro=(e,t)=>e?t.isReplenished&&t.isPartialWithdrawal:!t.isReplenished&&!t.isPartialWithdrawal,so=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,daysValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a/30)-l):Math.round(l*e*a/365/100)},oo=ut((({className:e="",title:t,buttons:n,footnote:l,bottomFootnote:a,isShowDepositeName:i,defaultParams:r,rateParams:s,...d})=>{const[m,{field:h}]=At({moneyValue:Ws(r,1e5),daysValue:Hs(r,60),isReplenished:Boolean(r?.isReplenished),isPartialWithdrawal:Boolean(r?.isPartialWithdrawal),isMonthlyInterestPayment:Boolean(r?.isMonthlyInterestPayment)}),p=io(m,s),{income:g,finalSum:f,rate:x,isUnavailableByTerm:b,depositeName:y}=p;return o(Ps,{className:e,title:t,...d,children:c("section",{className:u(Ms,e),children:[c("div",{className:Rs,children:[Es({title:"Сумма, ₽",min:p.minSum,max:p.maxSum,...h("moneyValue"),value:p.moneyValue}),(v={title:"Срок, дней",min:p.minDays,max:p.maxDays,...h("daysValue"),value:p.daysValue},o(sl,{items:[`От ${Ys(v.min||0)}`,`До ${Ys(v.max||0)}`],step:1,...v})),c("div",{className:"flex flex-col sm:flex-row gap-y-m gap-x-5xl",children:[co(p,h),Js({title:"Выплата процентов",orientation:"vertical",...h("isMonthlyInterestPayment"),className:"sm:flex-col"})]})]}),Fs({rate:x,depositeName:y,isShowDepositeName:i,isUnavailableByTerm:b}),Qs({income:g,finalSum:f,buttons:n,footnotes:[l,a]})]})});var v})),co=(e,t)=>c("div",{className:"space-y-s",children:[o(Re,{color:"text-secondary-text",font:"font-light",children:"Параметры"}),c("div",{className:"flex flex-col gap-y-lg sm:gap-y-s",children:[o(Yt,{text:"Пополнение",disabled:e.isDisabledOperatingDeposit,...t("isReplenished"),value:e.isReplenished}),o(Yt,{disabled:e.isDisabledOperatingDeposit,text:"Частичное снятие",...t("isPartialWithdrawal"),value:e.isPartialWithdrawal})]})]}),mo=(e=[],t=!1)=>uo([(e,t)=>e>t,(e,t)=>e?.minSum<t?.minSum],e?.filter((e=>t===Boolean(e?.isNewClient)))),uo=(e,t)=>{if(!t?.length)return;const n=t?.reduce(((t,n)=>e[0](n.rate,t[0].rate)?[n]:n.rate===t[0].rate?[...t,n]:t),[t[0]]);return n.length>1?n.reduce(((t,n)=>e[1](n,t)?n:t),n[0]):n[0]},ho=({min:e=0,max:t=0,availableMonths:n,...l})=>o(sl,{items:[`От ${po(e)}`,`До ${po(t)}`],step:1,...n?.length?{list:n}:{min:e,max:t},...l}),po=e=>`${e} ${Number(e)%10==1?"месяца":"месяцев"}`,go=e=>Gs({...e,className:"sm:flex-col",items:[{id:"annuity",text:"Аннуитетный"},{id:"differential",text:"Дифференцированный"}]}),fo=({field:e,defParams:t,calcParams:n,map:l,monthsValue:a="maxMonths"})=>{Object.entries(l).forEach((([n,l])=>{e?.(n)?.onChange?.(t?.[l])})),e?.("monthsValue")?.onChange?.(nl(t?.[a],n.minMonths,n.maxMonths))},xo=(e,t)=>{const{isAnnuity:n,moneyValue:l,monthsValue:a,moneyExtra:i}=t;if(0===e)return 0;if(n){const t=e/1200;return i?(l+i)*(t+t/(Math.pow(1+t,a)-1)):l*(t+t/(Math.pow(1+t,a)-1))}return Math.round(l/a)+l*(e/1200)},bo={minSum:1e4,maxSum:5e6,minMonths:1,maxMonths:60,rate:0,isSalaryClient:!1,isPensionClient:!1,isStateEmployee:!1,isInsurance:!0},yo=e=>vo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&vo({...e,fieldKey:"isStateEmployee",viewSettingFieldKey:"isShowStateEmployee"})&&vo({...e,fieldKey:"isPensionClient",viewSettingFieldKey:"isShowPensionClient"})&&vo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),vo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],No=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.rateRows||[bo],r=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>yo({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:s,maxSum:o}=eo(["minSum","maxSum"],r,i),{minMonths:c,maxMonths:d}=eo(["minMonths","maxMonths"],r,i),m=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a})=>e?.find((e=>yo({row:e,userInputParams:t,paramsViewSettings:n})&&no(l,["minSum","maxSum"],e)&&no(a,["minMonths","maxMonths"],e)))||bo)({rateRows:i,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a}),{rate:u}=m,h=xo(u,e);return{...m,...e,minSum:s,maxSum:o,minMonths:c,maxMonths:d,moneyValue:l,monthsValue:a,monthlyPayment:h}},wo=(e={})=>Boolean(Object.values(e).filter((e=>e)).length),ko={isSalaryClient:"isSalaryClient",isStateEmployee:"isStateEmployee",isPensionClient:"isPensionClient",isInsurance:"isInsurance",moneyValue:"maxSum"},So=ut((({className:e,title:t,calcSource:n,buttons:l,footnote:i,paramsViewSettings:r,defaultParams:s,...d})=>{const m=(h=n?.rateRows,uo([(e,t)=>e<t,(e,t)=>e?.maxSum>t?.maxSum],h));var h;const[p,{field:g}]=At({moneyValue:Ws(s,2e5),monthsValue:Hs(s,qs),isAnnuity:Boolean(s?.isAnnuity),isInsurance:Boolean(s?.isEnableInsurance),isSalaryClient:Boolean(s?.isEnableSalaryClient),isPensionClient:Boolean(s?.isEnablePensionClient),isStateEmployee:Boolean(s?.isEnableStateEmployee)}),f=No(p,n,r),x=go({title:"Тип платежа",orientation:"vertical",...g("isAnnuity")}),{onChange:b}=g("moneyValue"),{onChange:y}=g("monthsValue");return a((()=>{b&&b(nl(p.moneyValue,f.minSum,f.maxSum))}),[f.minSum,f.maxSum]),a((()=>{y&&y(nl(p.monthsValue,f.minMonths,f.maxMonths))}),[f.minMonths,f.maxMonths]),a((()=>{!wo(s)&&m&&fo({field:g,defParams:m,calcParams:f,map:ko,monthsValue:"minMonths"})}),[n,s]),o(Ps,{className:e,title:t,...d,children:c("section",{className:u(Ms,e),children:[c("div",{className:Rs,children:[Es({title:"Сумма кредита, ₽",step:500,min:f.minSum,max:f.maxSum,...g("moneyValue"),value:f.moneyValue}),ho({title:"Срок кредита, месяцев",min:f.minMonths,max:f.maxMonths,...g("monthsValue"),value:f.monthsValue}),Co({...f,...r},g),o("div",{className:"sm:hidden",children:x})]}),c("div",{className:u(Vs,"@4xl:w-1/2"),children:[o(zs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(zs,{title:"Ставка",value:f?.rate,fractionDigits:2,postfix:"%"}),o(zs,{title:"Ежемесячный платёж",value:f.monthlyPayment,postfix:"₽"}),o("div",{className:"hidden sm:block mb-lg",children:x}),Ee(l,{isVertical:!0}),As(i)]})]})})})),Co=(e,t)=>c("div",{className:"flex flex-col gap-y-2xl",children:[e.isShowSalaryClient?o(Yt,{text:"Получаю зарплату на счёт\nв Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient,className:"whitespace-pre-line sm:whitespace-normal"}):null,e.isShowStateEmployee?o(Yt,{text:"Работаю в бюджетной организации",...t("isStateEmployee"),value:e.isStateEmployee}):null,e.isShowPensionClient?o(Yt,{text:"Получаю пенсию на карту Россельхозбанка",...t("isPensionClient"),value:e.isPensionClient}):null,e.isShowInsurance?o(Yt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null]}),To=e=>{const t=[...e];t.sort((([e],[t])=>e-t));let n=1;for(;n<t.length;){const[e,l]=t[n-1],[a,i]=t[n];l>=a?t.splice(n-1,2,[e,Math.max(l,i)]):n++}return t},Io={minSum:5e4,maxSum:100000001,minMonths:2,maxMonths:10,rate:0,isMonthlyInterestPayment:!0,isRemoteRegistration:!0,isReplenish:!1,isWithdrawn:!1,type:""},Bo=(e,t,n)=>{const{moneyValue:l,monthsValue:a}=e,i=t?.[0]?Ro(t[0].minMonths,t[0].maxMonths):0,r=!n?.isShowMonthlyInterestPayment,s=!n?.isShowRemoteRegistration,o=!n?.isShowReplenish,c=!n?.isShowWithdrawn,d=!n?.isShowNewClient,m=t?.find((t=>[Mo({row:t,userInputParams:e,paramKey:"isReplenish",isExclude:o}),Mo({row:t,userInputParams:e,paramKey:"isWithdrawn",isExclude:c}),Mo({row:t,userInputParams:e,paramKey:"isMonthlyInterestPayment",isExclude:r}),Mo({row:t,userInputParams:e,paramKey:"isRemoteRegistration",isExclude:s}),d||e?.isNewClient===t?.isNewClient,no(l,["minSum","maxSum"],t),no(a||i,["minMonths","maxMonths"],t)].every(Boolean)))||Io,{rate:u}=m,h=Po(u,e),p=l+h,g=t||[Io];return{...m,...to(["minSum","maxSum"],g),...to(["minMonths","maxMonths"],g),availableMonths:To(g.map((e=>[e.minMonths,e.maxMonths]))).flatMap((([e,t])=>((e,t,n=1)=>Array.from({length:Math.abs(t-e)/n+1},((l,a)=>t>=e?e+a*n:e-a*n)))(e,t))),...e,defaultMonth:i,income:h,finalSum:p}},Po=(e,t)=>{const{isMonthlyInterestPayment:n,moneyValue:l,monthsValue:a}=t;return n?Math.round(l*Math.pow((1200+e)/1200,a)-l):Math.round(l*e*30*a/365/100)},Mo=({row:e,userInputParams:t,paramKey:n,isExclude:l})=>l||t[n]===e[n],Ro=(e,t)=>e+Math.round((t-e)/2),Vo=(e="rub")=>"rub"===e,Do=(e,t)=>{const{minMonths:n,maxMonths:l}=to(["minMonths","maxMonths"],Oo(t,e?.currency)),a=e.monthsValue||Math.round((n+l)/2);return{monthsValue:nl(a,n,l)}},zo=(e,t)=>{const{minSum:n,maxSum:l}=to(["minSum","maxSum"],Oo(t,e?.currency)),a=e.moneyValue||n;return{moneyValue:nl(a,n,l)}},Ao=(e,t)=>({currency:e?.currency??t?.map((e=>e.currency))?.[0]}),_o=e=>{const t=Vo(e?.currency?.key);return{isReplenish:t&&e?.isReplenish,isWithdrawn:t&&e?.isWithdrawn}},Oo=(e,t)=>{const{rates:n}=e?.find((e=>e?.currency.key===t?.key))??{};return n??e?.[0]?.rates},Fo=(e,t)=>{const n="rub"!==e?.currency?.key;return c("div",{className:"grid gap-lg",children:[c("div",{className:"flex gap-lg",children:[e.isShowReplenish?Gs({title:"Пополнение",...t("isReplenish"),value:e.isReplenish,orientation:"vertical",items:[{id:"withReplenish",text:"С пополнением"},{id:"withoutReplenish",text:"Без пополнения"}],disabled:n}):null,e.isShowWithdrawn?Gs({title:"Снятие",...t("isWithdrawn"),value:e.isWithdrawn,orientation:"vertical",items:[{id:"wthDrawn",text:"Со снятием"},{id:"noWithdrawn",text:"Без снятия"}],disabled:n}):null]}),Eo(e.isShowReplenish||e.isShowWithdrawn),c("div",{className:"flex gap-lg",children:[e.isShowMonthlyInterestPayment?Js({title:"Выплата процентов",...t("isMonthlyInterestPayment"),value:e.isMonthlyInterestPayment,orientation:"vertical"}):null,e.isShowRemoteRegistration?(l={title:"Оформление",...t("isRemoteRegistration"),value:e.isRemoteRegistration,orientation:"vertical"},Gs({...l,items:[{id:"remote",text:"Дистанционно"},{id:"office",text:"Офис Банка"}]})):null]}),Eo(e.isShowNewClient),e.isShowNewClient?o(Yt,{text:"Новый вкладчик",...t("isNewClient")}):null]});var l},Eo=(e=!1)=>e?o("div",{className:"border-b border-main-divider w-full"}):null,jo={isMonthlyInterestPayment:"isMonthlyInterestPayment",isRemoteRegistration:"isRemoteRegistration",isReplenish:"isReplenish",isWithdrawn:"isWithdrawn",moneyValue:"minSum"},Lo={text:"₽",key:"rub"},$o=ut((({className:e,title:t,calcSource:n,buttons:l=[],footnote:r="",paramsViewSettings:s,defaultParams:d,...m})=>{const{rows:h}=n??{},p=h?.map((e=>e.currency))??[Lo],g=i((e=>t=>e?{...t,..._o(t),...zo(t,e),...Do(t,e),...Ao(t,e)}:t)(h),[h]),[f,{field:x}]=At({moneyValue:Ws(d,2e4),monthsValue:Hs(d,1),isMonthlyInterestPayment:Boolean(d?.isMonthlyInterestPayment),isRemoteRegistration:Boolean(d?.isRemoteRegistration),isReplenish:Boolean(d?.isReplenish),isWithdrawn:Boolean(d?.isWithdrawn),isNewClient:Boolean(d?.isNewClient),currency:Lo},{normalize:g}),b=x?.("currency")?.value??Lo,y=x?.("isNewClient")?.value,v=Oo(h,b),N=Bo(f,v,s),{rate:w,income:k,finalSum:S,type:C=""}=N,T=i((()=>{fo({field:x,defParams:mo(v,y),calcParams:N,monthsValue:"minMonths",map:jo})}),[x,h]);a((()=>{!wo(d)&&v&&T()}),[d,h]);const I=w===mo(v,y)?.rate;return o(Ps,{className:e,title:t,...m,children:c("section",{className:u(Ms,e),children:[c("div",{className:Rs,children:[c("div",{className:"flex gap-m",children:[Es({className:"w-full",title:`Сумма, ${b?.text}`,min:N.minSum,max:N.maxSum,...x("moneyValue"),value:N.moneyValue,postfix:b?.text,step:Uo(b?.key)}),h&&h?.length>1?o(wn,{label:"Валюта",options:p,...x("currency")}):null]}),ho({title:"Срок, месяцев",min:N.minMonths,max:N.maxMonths,availableMonths:N.availableMonths,...x("monthsValue"),value:N.monthsValue}),Fo({...N,...s},x)]}),Fs({rate:w,children:Wo(T,I)}),Qs({income:k,finalSum:S,buttons:[...l,qo(n?.buttons,C)],footnotes:[r],postfix:b?.text,isCapitalization:x("isMonthlyInterestPayment").value})]})})})),Uo=(e="")=>Vo(e)?1e3:100,qo=(e=[],t="")=>{const{type:n,...l}=e.find((e=>e.type===t))??{};return l},Wo=(e,t=!1)=>t?null:o(gi,{type:"button",version:"secondary",onClick:e,children:"Показать максимальную ставку"}),Ho=e=>Yo({...e,fieldKey:"isSalaryClient",viewSettingFieldKey:"isShowSalaryClient"})&&Yo({...e,fieldKey:"isInsurance",viewSettingFieldKey:"isShowInsurance"}),Yo=({row:e,userInputParams:t,paramsViewSettings:n,fieldKey:l,viewSettingFieldKey:a})=>!!n&&!n[a]||t[l]===e[l],Ko={minSum:1e4,maxSum:3e6,minSumOld:0,maxSumOld:25e5,minSumExtra:0,maxSumExtra:5e5,minMonths:13,maxMonths:60,rate:0,isExtraMoney:!1,isSalaryClient:!1,isInsurance:!0},Xo=(e,t,n)=>{const{moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}=e,s=t?.rateRows||[Ko],o=(({limitRows:e,userInputParams:t,paramsViewSettings:n})=>e?.find((e=>Ho({row:e,userInputParams:t,paramsViewSettings:n}))))({limitRows:t?.limitRows||[],userInputParams:e,paramsViewSettings:n}),{minSum:c,maxSum:d}=eo(["minSum","maxSum"],o,s),{minMonths:m,maxMonths:u}=eo(["minMonths","maxMonths"],o,s),h=(({rateRows:e=[],userInputParams:t,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r})=>e?.find((e=>Ho({row:e,userInputParams:t,paramsViewSettings:n})&&no(l+r,["minSum","maxSum"],e)&&no(i,["minSumOld","maxSumOld"],e)&&no(r,["minSumExtra","maxSumExtra"],e)&&no(a,["minMonths","maxMonths"],e)))||Ko)({rateRows:s,userInputParams:e,paramsViewSettings:n,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r}),{rate:p}=h,g=xo(p,e),f=e.oldMonthlyPayment-g;return{...h,...e,minSum:c,maxSum:d,minMonths:m,maxMonths:u,moneyValue:l,monthsValue:a,oldMonthlyPayment:i,moneyExtra:r,monthlyPayment:g,benefit:f}},Go=ut((({className:e="",title:t,calcSource:n,buttons:l,footnote:a,paramsViewSettings:i,...r})=>{const[s,{field:d}]=At({isAnnuity:!0,isInsurance:!0,isSalaryClient:!1,isExtraMoney:!1,moneyValue:7e5,oldMonthlyPayment:0,monthsValue:48,moneyExtra:0}),m=Xo(s,n,i),h=go({title:"",mobileTitle:"Тип платежа",orientation:"vertical",...d("isAnnuity")});return o(Ps,{className:e,title:t,...r,children:c("section",{className:u(Ms,e),children:[c("div",{className:Rs,children:[Es({title:"Остаток долга в других банках, ₽ ",step:500,min:m.minSum,max:m.maxSum-m.maxSumExtra,...d("moneyValue"),value:m.moneyValue}),Es({title:"Ежемесячный платёж в других банках, ₽",step:500,min:m.minSumOld,max:m.maxSumOld,...d("oldMonthlyPayment"),value:m.oldMonthlyPayment}),ho({title:"Новый срок кредита, месяцев",min:m.minMonths,max:m.maxMonths,...d("monthsValue"),value:m.monthsValue}),Jo({...m,...i},d),m.isExtraMoney?Es({title:"Дополнительная сумма, ₽ ",step:500,min:m.minSumExtra,max:m.maxSumExtra,...d("moneyExtra"),value:m.moneyExtra}):null,o("div",{className:"sm:hidden pt-1 pb-4 border-b border-main-divider",children:h})]}),c("div",{className:u(Vs,"@4xl:w-1/2"),children:[o(zs,{title:"Полная стоимость кредита",value:n?.totalLoanCost}),o(zs,{title:"Ставка",value:m?.rate,fractionDigits:2,postfix:"%"}),o(zs,{title:"Ежемесячный платёж",value:m.monthlyPayment,postfix:"₽"}),m.benefit>0?o(zs,{title:"Выгода в месяц",value:m.benefit,postfix:"₽"}):null,o("div",{className:"hidden sm:block mb-lg",children:h}),Ee(l,{isVertical:!0}),As(a)]})]})})})),Jo=(e,t)=>c("div",{className:"space-y-lg sm:space-y-s",children:[e.isShowSalaryClient?o(Yt,{text:"Получаю зарплату на счёт в Россельхозбанке",...t("isSalaryClient"),value:e.isSalaryClient}):null,e.isShowInsurance?o(Yt,{text:"Комплексная страховая защита",...t("isInsurance"),value:e.isInsurance}):null,o(Yt,{text:"Получить дополнительную сумму",...t("isExtraMoney"),value:e.isExtraMoney})]}),Zo=d((e=>{const{onChange:t,min:n,max:l,defaultValue:a="0",fractionDigits:r=0,...s}=e,c=tl(e,{normalize:(e=a)=>n&&l?String(nl(Number(Qo(e)),n,l)):Qo(e),format:Ue(r)}),d=i((e=>t&&t(Qo(e))),[t]);return o(rn,{onChange:d,...s,...c})})),Qo=(e="")=>e.replaceAll(",",".").replace(/[^\d.]/g,"").replace(/([^.]*\.[^.]*)\./,"$1"),ec=d((e=>o(Zo,{...e,fractionDigits:2,children:o("div",{className:"absolute right-4 bottom-4",children:o(Re,{size:"text-xl",font:"font-light",children:"₽"})})}))),tc={private:"https://old.rshb.ru/p2p/",business:"https://old.rshb.ru/smallbusiness/p2p/"},nc={amount:1500},lc=d((({className:e="",title:t="Укажите сумму перевода",label:n="Сумма перевода",button:i,formType:r="private",...s})=>{const[{amount:d},{field:m}]=At(nc),[h,p]=l(!1);return a((()=>{p(d<=0)}),[d]),c(g,{className:u("flex flex-col items-center",e),defaultPadding:"p-6xl",...s,children:[t?o(w,{className:"pb-lg xl:pb-4xl self-start xl:self-center",headingType:"h3",title:t}):null,c("form",{className:"w-full xl:max-w-[468px]",method:"POST",action:tc[r],children:[o(ec,{valid:!h,label:n,max:3e5,min:1,...m("amount",{parse:Number,format:String})}),o("input",{type:"hidden",name:"amount",value:d}),i?.text?o(gi,{className:"w-full mt-lg",type:"submit",disabled:h,children:i.text}):null]})]})})),ac=({className:e,text:t="ХИТ"}={})=>c("div",{className:u("w-14 h-14 bg-white flex flex-col items-center justify-center rounded-md shadow-main-black",e),children:[o(W,{iconVersion:"black",name:"HeartIcon",width:"24",height:"24"}),o(k,{size:"text-s",font:"font-normal",align:"text-center",color:"text-primary-text",children:t})]}),ic="relative h-full",rc={small:"lg:min-w-64",normal:"lg:min-w-80 xl:min-w-96",big:"lg:min-w-[515px]"},sc=({noCardBorder:e,cardSize:t="normal",isNavButtons:n=!1,...l})=>{const{blocks:a}=l.block||{},i=a?.some(dc),r=n?{defaultPadding:"p-6xl pb-m"}:{};return R({...l,renderProps:(n,l,a)=>c("div",{className:oc(n,{someCardsHighlighted:i}),children:[B(n,l,{className:cc(n,{someCardsHighlighted:i,showBorder:!e,cardSize:t}),...r,blockIndex:a}),dc(n)?ac({className:"absolute top-0 -right-4 z-40"}):null]},String(a))})},oc=(e,{someCardsHighlighted:t})=>u(ic,t&&(dc(e)?"pt-3xl":"pt-3xl sm:pt-16")),cc=(e,{someCardsHighlighted:t,showBorder:n,cardSize:l="normal"})=>u(ic,"min-w-80",rc[l],t&&(dc(e)?"pt-3xl sm:pt-16":"pt-3xl"),vr(n),n&&"h-full"),dc=e=>e?.content&&"isHighlighting"in e.content&&e.content.isHighlighting,mc=ut((({className:e,visibleItemCount:t=0,noCardBorder:n,arrowsPadded:l=!0,isGap:a=!0,cardSize:i="normal",isNavButtons:r=!1,...s})=>o(g,{className:u(e),defaultPadding:"p-6xl",...s,children:o(Xr,{className:u("relative max-w-full"),visibleItemCount:t,snapAlign:"snap-start",gap:a?16:0,padding:0,arrowsPadded:l,navButtons:r?uc(s?.block?.blocks):[],hasBlur:!0,children:sc({noCardBorder:n,cardSize:i,isNavButtons:r,...s})})})),{childrenTypes:["CarouselCard","CarouselCatalogCard","CarouselRecommendationCard","CarouselTariffsCard","RichTextBlock","ProductBlock"],childSchema:()=>({isHighlighting:{title:"Выделить карточку",type:"boolean"}})}),uc=e=>e?.map((e=>{const t=e?.content;return{title:t?.title,description:t?.additionalDescription||t?.description}}))??[],hc="z-10 border border-solid w-full h-full",pc=u(hc,"absolute hidden @xl:block border-transparent"),gc=d((({className:e,title:t,description:n,button:l,...a})=>o(g,{className:u("sm:pl-6xl sm:pb-4xl @container-normal",e),defaultPadding:"p-0",...a,children:c("div",{className:"relative h-full",children:[o("div",{className:u(pc,"top-9 right-12 bg-green-dark")}),o("div",{className:u(pc,"top-6 right-8 bg-green")}),o("div",{className:u(pc,"top-3 right-4 bg-green-light")}),c("div",{className:u(hc,"relative p-xl sm:p-5xl bg-white border-transparent sm:border-green-more-light"),children:[o(C,{title:t,description:n,headlineVersion:"XS",align:"text-left",isEmbedded:!0}),Ee([l],{className:"mt-m sm:mt-6xl sm:justify-center",isVertical:!0})]})]})}))),fc={black:"bg-black",white:"bg-white"},xc=d((({className:e="",title:t,description:n,image:l,price:a,button:i,colors:r=[],align:s="text-left",padding:d,...m})=>o(g,{className:u("flex flex-col justify-left",e),defaultPadding:"p-2xl",...m,children:c(Ce,{className:"h-full",padding:d,title:o(C,{title:t,description:n,headlineVersion:"XS",isEmbedded:!0,align:s}),rightImage:l?.src?o(ne,{className:"flex justify-center align-center mb-xl",image:l}):null,buttons:Ee([i],{buttonClassName:"w-full self-end"}),children:[r?.length?c("div",{className:"flex text-secondary-text mb-m",children:[o("div",{className:"mr-xs",children:o(Re,{size:"text-s",align:"text-left",font:"font-light",children:"Цвета:"})}),r.map(bc)]}):null,a?c(Re,{size:"text-h3",align:"text-left",children:[a," ₽"]}):null]})}))),bc=(e,t)=>o("figure",{className:`w-6 h-6 ml-s border border-solid border-main-divider rounded-full ${fc[e]}`},String(t)),yc=d((({icon:e,...t})=>{const n=ue(),{text:l,href:a,target:i,onClick:r}=n(t);return l?o("div",{className:u("p-3 rounded-lg bg-white text-secondary-text flex justify-center"),children:o("a",{role:"link",href:a,target:i,onClick:r,children:c("div",{className:"flex flex-col items-center gap-3 break-words max-w-[150px]",children:[e?o(ne,{className:"w-7 h-7 md:w-12 md:h-12",image:{...e,iconVersion:e?.iconVersion},alt:l}):null,o("div",{className:"font-light md:font-normal text-primary-text text-center text-xs md:text-sm whitespace-wrap",children:l})]})})}):null})),vc=d((({className:e,additionalDescription:t,description:n,links:l,title:a,...i})=>o(g,{defaultPadding:"p-5xl",className:u("overflow-hidden",e),...i,children:c("div",{className:"flex flex-col lg:flex-row gap-5 justify-between",children:[c("div",{className:"flex-1",children:[o(C,{isEmbedded:!0,title:a,description:n,as:"h1",align:"text-left",headlineVersion:"XL"}),o(C,{className:"pt-m",description:t,align:"text-left",isEmbedded:!0})]}),l?.length?Nc(l):null]})}))),Nc=e=>o("div",{className:u("lg:grid-cols-9 lg:[&>*]:col-span-2 lg:[&>*:nth-child(14n+2)]:col-span-3 lg:[&>*:nth-child(7n+5)]:col-span-3","lg:[&>*:nth-child(7n+6)]:col-span-3 lg:[&>*:nth-child(7n+7)]:col-span-3 lg:[&>*:nth-child(14n+10)]:col-span-3 lg:w-3/6","grid-cols-3 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+3)]:col-span-2 max-lg:[&>*:not(:nth-child(-n+3)):nth-child(4n+4)]:col-span-2","grid gap-3 lg:gap-5"),children:e.map(((e,t)=>o(yc,{...e},String(t))))}),wc=(e,t)=>e?.map((({aspectName:e,params:n})=>({aspectName:e,params:"mindboxEvent"===e?{...n,eventJson:t}:n}))),kc=d((({className:e="",href:t,target:n,onClick:l,data:a,children:i})=>{const r=ue()({href:t,target:n,onClick:l});return o(t?"a":"div",{className:u("block",e),...t?r:{},role:t?"link":"none",...he(a),children:i})})),Sc=[{origins:["t.me","telegram.org"],iconMapped:{icon:"TelegramIcon"}},{origins:["vk.com"],iconMapped:{icon:"VKIcon"}},{origins:["ok.ru"],iconMapped:{icon:"OkIcon"}},{origins:["apps.apple.com"],iconMapped:{icon:"AppleIcon"}},{origins:["play.google.com"],iconMapped:{icon:"PlayMarketIcon"}},{origins:["appgallery.huawei.com"],iconMapped:{icon:"HuaweiIcon"}},{origins:["youtube.com"],iconMapped:{icon:"YoutubeIcon"}},{origins:["rutube.ru"],iconMapped:{icon:"RutubeIcon"}},{origins:["dzen.ru"],iconMapped:{icon:"DzenIcon"}},{origins:["rustore.ru"],iconMapped:{icon:"RustoreIcon"}}],Cc=d((({className:e="",media:t,showButtonText:n,stretched:a,version:i="white",children:r})=>{if(!t?.length)return null;const[s,d]=l(),m=t?.map((e=>{const{href:t,icon:l,text:a}=e,{iconMapped:r}=(e=>Sc.find((({origins:t})=>t?.some((t=>e?.includes(t)))))||{})(t),o=Fe(l)?l:r,c=n?{text:a}:{text:""},m=e?.icon?.iconVersion||"color";return!s&&a&&d(!0),{...e,...c,icon:{...o,iconVersion:m},version:e?.version??i}})),h=u("border border-solid hover:border-transparent border-main-divider","group-data-primary:border-main-divider group-data-gray:border-green group/media",{"basis-auto":!n&&!s},Tc(a));return c("div",{className:u("flex flex-col gap-m xl:gap-xs",e),"aria-label":"Социальные сети",children:[o("div",{className:"flex gap-xs",children:Ee(m,{className:Ic(s??!1,a??!1,n),buttonClassName:h})}),r?o(Re,{size:"text-s",font:"font-light",color:"text-secondary-text",children:r}):null]})})),Tc=(e=!1)=>e?"flex-1 @lg:flex-initial justify-center":"",Ic=(e,t,n=!1)=>u(e||t?"basis-full":"",t&&(!n||!e)?"flex-nowrap":""),Bc=d((({className:e,padding:t,description:n,additionalDescription:l,href:a,icon:i,isDotted:r,__html:s,socialMedia:d=[],target:m,title:h,align:p="text-left",benefits:f,imageOptions:{directionRight:x=!0,isImageAlwaysOnRight:b=false,isImageSecondary:y=!1}={},data:v,...N})=>o(g,{className:u("relative min-h-28 group-data-gray:bg-main-divider/50",e),defaultPadding:"p-0",...N,children:o(kc,{href:a,target:m,className:"h-full",data:wc(v),children:c(Ce,{className:"h-full",defaultPadding:"p-2xl",padding:t,insetTitle:o(C,{title:h,description:n,headlineVersion:"XS",isEmbedded:!0,align:p}),...Ge(Fe(i)?o(ne,{image:i}):null,x),buttons:d.length?o(Cc,{media:d,stretched:!0,showButtonText:!0,version:N?.version}):null,isImageAlwaysOnRight:b,isImageSecondary:y,imageAlign:"center",children:[o(Oe,{benefits:f}),s?o(Pe,{__html:s,isDotted:r,itemSize:"list-s"}):null,Pc(l,p)]})})}))),Pc=(e,t)=>e?o(k,{size:"text-m",font:"font-light",color:"text-secondary-text group-data-secondary:text-white/80",align:t,children:e}):null,Mc=(e,t)=>{const{title:n,description:l,buttons:a}=e;return c("div",{className:"py-lg border-b border-main-divider",children:[n?o("div",{className:"opacity-80",children:o(Re,{size:"text-m",color:"text-secondary-text",children:n})}):null,l?o("div",{className:"mt-2xs",children:o(Re,{size:"text-xl",color:"text-primary-text",children:l})}):null,a?.length?o("div",{className:"text-primary-main",children:Ee(a)}):null]},String(t))},Rc=d((({className:e="",title:t,align:n="text-center",icon:i,button:r,visibleCellsCount:s=1,cardCells:d=[],options:m,data:h,...p})=>{const f=d.map(Mc),[x,b]=s>0?[f.slice(0,s),f.slice(s)]:[f,[]],[y,v]=l(!1);return a((()=>ce.subscribe("fold",(e=>{void 0!==m?.parent&&e.parent===m?.parent&&v(e.isUnfolded)}))),[m?.parent]),c(g,{className:u("flex flex-col",e),defaultPadding:"p-2xl",...p,children:[Fe(i)?o("div",{className:"self-center",children:o(ne,{image:i})}):null,t?o(w,{className:u("pt-xs",n),headingType:"h5",title:t}):null,r?.text?o(be,{className:"w-full mt-m mb-lg",...r}):null,b.length?o(zi,{renderFoldableSection:()=>c("div",{children:[x,o(Ai,{isUnfolded:y,children:b})]}),renderFoldButton:d.length>=s?Vc(m?.parent,h,y):null}):o("div",{children:x})]})})),Vc=(e,t,n=!1)=>()=>c("button",{className:"w-full cursor-pointer text-primary-main pt-lg flex justify-between items-center",onClick:()=>{void 0!==e&&ce.fire("fold",{type:"fold",isUnfolded:!n,parent:e})},type:"button",...n?he(t):{},children:[o("div",{children:n?"Скрыть":"Подробнее о тарифе"}),o(W,{className:"text-primary-text",name:n?"ArrowUpIcon":"ArrowDownIcon",width:"16",height:"16"})]}),Dc=e=>"number"==typeof e?.minMonths&&"number"==typeof e?.maxMonths,zc=(e,t)=>Array.from({length:t-e+1},((t,n)=>e+n)),Ac=1e9,_c={sum:{min:1e4,max:Ac},period:3},Oc=ut((({className:e,filtrationSchema:t={},resetButton:n,sumInput:l,periodInput:a,...i})=>{const[,{blocksToRender:r,blocksWithProps:s},{field:d,reset:m}]=gs(_c,{block:i.block,page:i.options?.page,normalize:e=>({...e,period:Fc(e)})}),h=s.map((([,e])=>e?.paramsSource?.rateRows)),p=Ec(h);return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...i,children:[o(os,{filtrationSchema:t,resetButton:n,field:d,reset:m,children:c("div",{className:"@4xl:max-w-xs space-y-lg",children:[o(ec,{label:l?.title,min:500,max:Ac,...d("sum",{parse:e=>({min:Number(e),max:Ac}),format:({min:e})=>String(e)})}),o(sl,{title:a?.title,items:["От 3 мес","До 5 лет"],list:p,...d("period")})]})}),o(as,{blocksToRender:r,...i})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>({...e?.filtrationSchema||{},paramsSource:{type:"object",title:"Адрес справочника"}})}),Fc=e=>st((e?.paramsSource?.rateRows||[]).filter(Dc).flatMap((e=>zc(e.minMonths,e.maxMonths)))),Ec=e=>st(e.flatMap((e=>e||[])).filter(Dc).flatMap((e=>zc(e.minMonths,e.maxMonths)))).sort(((e,t)=>e-t))||[],jc=[{key:"10"},{key:"50"},{key:"100"}],Lc=({itemCount:e,onItemCountChange:t})=>{const n=i((({key:e})=>t(Number(e))),[]);return c("div",{className:"mt-2 @lg:mt-0 items-center gap-s hidden @lg:flex",children:[o("span",{children:"Показать по"}),o(yn,{className:"min-w-20",onChange:n,value:{key:String(e)},options:jc,iconVersion:"black"})]})},$c="py-m @lg:px-lg px-m rounded-md cursor-pointer text-center min-w-10 @lg:min-w-0 hover:bg-primary-hover hover:text-white",Uc=(e,t)=>{const{currentPage:n,onPageChange:l,totalPages:a}=e,i=t+1;return i===n?o("div",{"aria-current":"true",className:"py-m @lg:px-lg px-m bg-primary-main text-center min-w-10 @lg:min-w-0 text-white rounded-md",children:i},String(t)):1!==i&&i!==a&&((e,t,n)=>e<t&&e>=t-1||e<=t+1&&e>t||((e,t,n)=>t<=2&&e<=t+2||t>=n-1&&e>=n-3)(e,t,n))(i,n,a)?o("div",{onClick:()=>l(i),className:$c,"aria-label":`Страница ${i}`,children:i},String(t)):null},qc={width:"24",height:"24"},Wc=({currentPage:e,onPageChange:t,totalPages:n})=>{const l=r((()=>Array.from({length:n}).fill({currentPage:e,onPageChange:t,totalPages:n})),[n,e]),a=i((()=>{e>1&&t(e-1)}),[e]),s=i((()=>{e<n&&t(e+1)}),[e,n]),d=i((()=>t(1)),[]),m=i((()=>t(n)),[n]);return c("div",{className:"flex gap-m items-center",children:[o("div",{onClick:a,children:o(W,{name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Hc(1===e),...qc})}),c("div",{className:"flex @lg:gap-2xs",children:[e>1?o("div",{onClick:d,className:$c,"aria-label":"Страница 1",children:"1"}):null,e>3?o("div",{className:"py-m @lg:px-s",children:"..."}):null,l.map(Uc),e<n-2?o("div",{className:"py-m @lg:px-s",children:"..."}):null,e<n?o("div",{onClick:m,className:$c,"aria-label":`Страница ${n}`,children:n}):null]}),o("div",{onClick:s,children:o(W,{className:"rotate-180",name:"ArrowLeftIcon",iconVersion:"black",imageClassName:Hc(e===n),...qc})})]})},Hc=e=>e?"opacity-20":"cursor-pointer hover:opacity-60",Yc=({currentPage:e,onPageChange:t,totalPages:n,itemCount:l,onItemCountChange:a})=>c("div",{className:"mt-3xl flex justify-between flex-col @lg:flex-row items-center select-none",role:"navigation","aria-label":"Пагинация",children:[o(Wc,{currentPage:e,onPageChange:t,totalPages:n}),l&&a?o(Lc,{itemCount:l,onItemCountChange:a}):null]}),Kc=d((({className:e,value:t,autoFocus:n,onChange:l,onFocus:a,placeholder:r="Поиск по сайту"})=>{const s=i((e=>{l&&l(e.target?.value||"")}),[l]);return c("div",{className:u("relative",e),role:"form",children:[o("div",{className:"absolute h-full flex items-center pl-m pointer-events-none",children:o(ne,{image:{icon:"LoupeIcon",iconVersion:"black"},width:"24",height:"24"})}),o("input",{className:u("h-14 w-full px-10 text-l text-black box-border rounded-md",ln),value:t,type:"text",name:"search-bar-input",placeholder:r,autoFocus:n,onChange:s,onFocus:a})]})})),Xc=d((({field:e,onClearFilter:t,filtrationState:n})=>c("div",{className:"grid grid-cols-12 mb-3xl @lg:space-x-xl",children:[o(Kc,{className:"col-span-12 @lg:col-span-4 mt-auto",placeholder:"Поиск",...e("query")}),o(Rl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период от",maxDate:n.endDate,...e("startDate")}),o(Rl,{className:"col-span-12 @lg:col-span-3 mt-4 @lg:mt-0",label:"Период до",minDate:n.startDate,...e("endDate")}),o("div",{className:"col-span-12 @lg:col-span-2 mt-8 @lg:mt-auto",children:o(gi,{type:"reset",className:"w-full",version:"secondary",onClick:t,children:"Очистить"})})]}))),Gc=(e,t)=>o(ws,{...e,iconBgVersion:t,className:"shrink-0"}),Jc=({title:e,timestamp:t,publicId:n})=>{const l=ue(),{href:a}=l({href:`/api/v1/depository/${n}/file`});return c("div",{className:"flex gap-3 items-center py-lg border-gray border-opacity-50 border-b",children:[Gc({icon:"DocDownloadIcon",iconVersion:"black"}),c("div",{className:"flex flex-col gap-x-6xl lg:flex-row lg:items-center",children:[t?o(Re,{size:"text-m","font-weight":"font-light",children:ft(t)}):null,o("a",{className:"text-h6 hover:text-primary-active",href:a,download:!0,"aria-label":"Скачать",children:e})]})]},n)},Zc="/api/v1/depository",Qc={startDate:void 0,endDate:void 0,query:""},ed=ut((({className:e,...t})=>{const[n,a]=l(0),[r,s]=l(10),[d,{field:m,reset:h}]=At(Qc),{totalPages:p=0,items:f=[]}=(({size:e,page:t,query:n,startDate:l,endDate:a})=>{const i=l?ft(l,!0):"",r=a?ft(a,!0):"",s=new URLSearchParams(Zc);s.set("page",String(t)),s.set("size",String(e)),s.set("query",n),s.set("timestampStart",i),s.set("timestampEnd",r);const o=`?${s.toString()}`,{data:c}=Xn(Zc+o,rt);return{items:c?.content,totalPages:c?.totalPages}})({size:r,page:n,...d}),x=i((e=>a(e-1)),[]),b=i((e=>{r!==e?(s(e),a(0)):s(e)}),[]);return c(g,{className:u(e,"container p-6xl"),...t,children:[o(Xc,{filtrationState:d,field:m,onClearFilter:h}),c("div",{className:"flex flex-col",children:[c("div",{className:"grid grid-cols-12 pb-lg border-gray border-opacity-50 border-b",children:[o("div",{className:"col-span-4 @lg:col-span-2 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Дата"})}),o("span",{className:"col-span-8 @lg:col-span-10 hidden @lg:block",children:o(Re,{size:"text-m",color:"text-secondary-text",children:"Тема"})})]}),f.length?f.map((e=>o(Jc,{...e},String(e.publicId)))):o(yr,{title:"Ничего не найдено",description:"Попробуйте очистить фильтры"}),o(Yc,{currentPage:n+1,onPageChange:x,totalPages:p,itemCount:r,onItemCountChange:b})]})]})})),td=e=>"Image"===e?.contentType&&e?.image?o(ne,{image:e.image}):"Code"===e?.contentType&&e.code?o("div",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:e.code}):null,nd=d((({className:e="",title:t,description:n,error:l,button:a,...i})=>c(g,{className:u("flex flex-col justify-center items-center",e),defaultPadding:u("p-6xl"),version:"transparent",...i,children:[o("div",{className:"flex justify-center",children:td(l)}),o(C,{title:t,description:n,headlineVersion:"XL",isEmbedded:!0,className:"mb-2xl last:mb-0"}),a?.text?o(be,{version:a?.version,text:a?.text,...a}):null]}))),ld="location";function ad(e="Москва"){const[t,n]=((e,t,n)=>{const[r,s]=l(n||null);return a((()=>e.subscribe(t,(e=>s(e)))),[e,t]),[r,i((n=>e.fire(t,n)),[e,t])]})(ce,"location",rd()??{name:e}),r=i((e=>{sd(e),n(e)}),[]),{data:s}=Xn(id()?null:"/api/v1/region",rt);return a((()=>{s&&!id()&&n(s)}),[s]),[t??{name:e},r]}const id=()=>Boolean(globalThis.localStorage?.getItem(ld)),rd=()=>{try{const e=globalThis.localStorage?.getItem(ld);return e&&JSON.parse(e)}catch(e){return null}},sd=e=>{try{globalThis.localStorage?.setItem(ld,JSON.stringify(e))}catch(e){}};var od;!function(e){e.RUB="RUB",e.EUR="EUR",e.USD="USD",e.CNY="CNY"}(od||(od={}));const cd=new Intl.NumberFormat("ru",{style:"currency",currency:od.RUB}),dd=e=>e?cd.format(e):"",md="text-m font-light text-secondary-text ",ud=`${md} text-left`,hd=`${md} pl-5xl text-center`,pd=`${md} pl-5xl text-right`,gd={USD:"DollarIcon",EUR:"EuroIcon",CNY:"ChineseYuanRenminbiIcon"},fd=d((({className:e,exchangeCurrencyItems:t})=>c("table",{className:u("h-fit w-full",e),children:[o("thead",{children:c("tr",{children:[o("th",{className:ud,children:o(Re,{size:"text-m",children:"Валюта"})}),o("th",{className:hd,children:o(Re,{size:"text-m",children:"Купить"})}),o("th",{className:pd,children:o(Re,{size:"text-m",children:"Продать"})})]})}),o("tbody",{children:t.map(xd)})]}))),xd=e=>{const t=e?.currency?.currency;return c("tr",{className:"pb-2xs text-h6",children:[o("td",{className:"pt-m m-auto flex text-left",children:c("div",{className:"flex items-center gap-xs",children:[t?o(ne,{image:{icon:gd[t]},width:"24",height:"24"}):null,o(Re,{size:"text-h6",children:t})]})}),o("td",{className:"pt-m pl-5xl text-center",children:o(Re,{size:"text-h6",children:dd(e?.saleExchangeRate)})}),o("td",{className:"pt-m pl-5xl text-right",children:o(Re,{size:"text-h6",children:dd(e?.buyExchangeRate)})})]},t)},bd={icon:"GpsIcon"},yd=d((({className:e="",address:t})=>c("div",{className:u("flex gap-s w-full justify-between @sm:justify-center",e),children:[o(ws,{...bd,iconBgVersion:"primary",className:"shrink-0"}),c("div",{className:"space-y-2xs whitespace-pre-wrap",children:[t?o(k,{size:"text-l",color:"text-primary-main",children:t}):null,o(k,{size:"text-m",color:"text-secondary-text",children:"Курс указан для заданного офиса"})]})]}))),vd=(e,t,n)=>{const l=Number(Nd(e))*Math.pow(t,n?-1:1);return Number.isInteger(l)?l:((e,t=2)=>{const n=10**t;return Math.round(parseFloat(String(e))*n)/n})(l)},Nd=e=>e.replace(/[^\d.,]/g,"").replace(",","."),wd=e=>Bt([[e=>e.value!==od.RUB&&e.oppositeValue!==od.RUB,()=>e.handleConvert(e.value,od.RUB)],[e=>e.value===od.RUB&&e.oppositeValue===od.RUB,()=>e.handleConvert(e.value,od.USD)],[e=>e.value===od.RUB&&e.oppositeValue===od.RUB,()=>e.handleConvert(e.value,od.CNY)],[()=>!0,()=>e.handleConvert(e.value)]])(e)?.();function kd(e){const{placeholder:t,rates:n,selected:l,value:a,setValue:i,setSelected:r}=e,s=n.map((e=>({key:e?.currency?.currency??"",text:e?.currency?.currency??""}))),d={key:l,text:l};return c("div",{className:"relative flex",children:[o(rn,{className:"shrink-0 text-l w-full appearance-none -mr-20",placeholder:t,type:"text",value:a,onChange:i}),s.length?o(yn,{className:"absolute right-0",isBorder:!1,onChange:e=>r(e.key),options:s,value:d}):null]})}const Sd=d((({className:e="",currencyRatesBuy:t,currencyRatesSell:n,button:a})=>{const[r,s]=l({inputSell:"",inputBuy:"",selectSell:t?.[0]?.currency?.currency||od.RUB,selectBuy:n?.[0]?.currency?.currency||od.USD}),d=i((e=>s((t=>({...t,...e})))),[]);return c("div",{className:`flex flex-col gap-m pt-2xl ${e}`,children:[t&&n?c("div",{className:"grid gap-m",children:[kd({placeholder:"Хочу продать",rates:n,selected:r.selectSell,setSelected:Cd(r,d,n),value:r.inputSell,setValue:e=>Id(d,n)(e,r.selectSell,r.selectBuy)}),kd({placeholder:"Получу",rates:t,selected:r.selectBuy,setSelected:Td(r,d,t),value:r.inputBuy,setValue:e=>Bd(d,t)(e,r.selectBuy,r.selectSell)})]}):null,a?.text?o(be,{text:a.text,version:a?.version,...a}):null]})})),Cd=(e,t,n)=>l=>{t({selectSell:l}),wd({value:l,oppositeValue:e.selectBuy,handleConvert:(l=e.selectSell,a=e.selectBuy)=>{Id(t,n)(e.inputSell,l,a)}})},Td=(e,t,n)=>l=>{t({selectBuy:l}),wd({value:l,oppositeValue:e.selectSell,handleConvert:(l=e.selectBuy,a=e.selectSell)=>Bd(t,n)(e.inputBuy,l,a)})},Id=(e,t)=>(n,l,a)=>{e({inputSell:Nd(n),selectBuy:a});const i=t.find((e=>e.currency?.currency===a))?.buyExchangeRate||t.find((e=>e.currency?.currency===l))?.buyExchangeRate;i&&e({inputBuy:String(vd(n,i,l===od.RUB)||"")})},Bd=(e,t)=>(n,l,a)=>{e({inputBuy:Nd(n),selectSell:a});const i=t.find((e=>e.currency?.currency===a))?.saleExchangeRate||t.find((e=>e.currency?.currency===l))?.saleExchangeRate;i&&e({inputSell:String(vd(n,i,l===od.RUB)||"")})};const Pd=d((({className:e="",title:t="Курсы обмена валют",button:n,...l})=>{const[a]=ad(),i=function(e){const t=e?.code||"000",{data:n}=Xn(`/api/v1/exchangerates?regionCode=${t}`,rt);return n||{}}(a),r=Md(i?.exchangeRate?.currencies),s=r.filter((e=>e.buyExchangeRate));s.unshift({currency:{currency:od.RUB}});const d=r.filter((e=>e.saleExchangeRate));return d.push({currency:{currency:od.RUB}}),o(g,{className:u("box-border min-h-80",e),...l,children:o(Ce,{className:"h-full",title:o(w,{headingType:"h4",title:t,className:"whitespace-pre-wrap"}),children:c("div",{className:"flex w-full gap-6xl flex-wrap @lg:flex-nowrap",children:[c("div",{className:"w-full @2xl:w-auto @5xl:w-1/2",children:[r?o(fd,{className:"mb-xl",exchangeCurrencyItems:r}):null,o(yd,{address:i?.address})]}),o(Sd,{className:"grow w-1/2",currencyRatesBuy:s,currencyRatesSell:d,button:n})]})})})})),Md=e=>e?.filter((e=>[1,2,3].includes(e?.currency?.id)))||[],Rd=d((({className:e="",items:t})=>{const n=ue();return o("ul",{className:u("flex flex-col gap-s w-full",e),children:t?.map(Vd(n))})})),Vd=e=>({dataFooter:t,...n},l)=>{const{text:a,href:i,target:r,onClick:s}=e(n);return a?o("li",{className:"list-none",children:o("a",{className:"hover:text-primary-main font-light",role:"link",href:i,target:r||"_self",onClick:s,...he(t),children:a||null})},String(l)):null},Dd=d((({label:e,labelIconBgVersion:t,icon:n,onToggle:l,labelIcon:a})=>o(Zr,{tag:"button",className:u("border-none bg-transparent items-center group/button",a?.icon?"py-xs":"py-lg"),onClick:l,textNode:c("div",{className:"flex items-center text-start group-hover/button:text-primary-main gap-s",children:[Gc(a,t),e?o(Re,{size:"text-h6",font:"font-normal",children:e}):null]}),iconNode:n?o(W,{name:n,iconVersion:"color",width:"24",height:"24"}):null}))),zd=(e=!1)=>e?"flex flex-wrap group-last:last:pb-0":"grid grid-cols-12 [&>*]:pb-m",Ad=(e=!1)=>e?"MinusIcon":"PlusIcon",_d=(e=!1)=>e?"ArrowUpSolidIcon":"ArrowDownSolidIcon",Od=ut((({className:e="",isExpanded:t,isFoldButtonOnTop:n=!0,label:l="Развернуть",labelIcon:a,labelIconBgVersion:i,foldButtonVersion:r="default",version:s,role:c,...d})=>{const m=we();return o(g,{className:u("w-full border-0 border-b border-solid border-main-divider last:border-b-0",e),defaultPadding:"p-0",tag:"div",version:"transparent",role:c,...d,children:o(zi,{isFoldButtonOnTop:n,unfoldedByDefault:t,renderFoldableSection:({isUnfolded:e})=>o(Ai,{className:u("gap-lg",zd(m)),isUnfolded:e,children:R({...d,extraProps:{className:"w-full",padding:"p-0"}})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Fd({foldButtonVersion:r,label:l,labelIcon:a,labelIconBgVersion:i,isUnfolded:e,onToggle:t,isMobile:m})})})}),{childrenTypes:{exclude:["RollupItem"]}}),Fd=({foldButtonVersion:e,label:t,labelIcon:n,labelIconBgVersion:l,isUnfolded:a,onToggle:i,isMobile:r=!1})=>{const s=t||(a?"Скрыть":"Развернуть"),c=((e=!1,t=!1)=>t?_d(e):Ad(e))(a,r);return"accordion"===e?o(Dd,{label:s,labelIcon:n,labelIconBgVersion:l,icon:c,onToggle:i}):o(Qr,{label:s,icon:a?"ArrowUpIcon":"ArrowDownIcon",onClick:i})},Ed=d((({navigationItems:e})=>o("div",{className:"w-full",role:"menu",children:jd(e)}))),jd=e=>e?.filter((e=>e.icon?.icon)).map(((e,t)=>o(Od,{foldButtonVersion:"accordion",label:e?.text,labelIcon:e?.icon,role:"menuitem",children:e.items?o(Rd,{items:e.items}):null},String(t)))),Ld=d((({className:e="",items:t=[]})=>t?.length?o("div",{className:u("space-y-m",e),children:t.map($d)}):null)),$d=(e,t)=>c("div",{className:"space-y-m",children:[o("div",{children:o(Re,{size:"text-l",font:"font-medium",children:e?.title})}),o("div",{className:"space-y-m",children:e.items?.map(Ud)})]},String(t)),Ud=(e,t)=>c("div",{className:"space-y-2xs",children:[o("div",{children:qd(e.type,e.text)}),o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:e.description})]},String(t)),qd=(e,t="")=>{switch(e){case"tel":return o("a",{className:"text-primary-text hover:text-primary-main no-underline",href:`tel:${Wd(t)}`,children:o(Re,{size:"text-h6",children:t})});case"email":return o("a",{className:"no-underline",href:`mailto:${t}`,children:o(k,{size:"text-xl",font:"font-light",color:"text-primary-text",children:t})});default:return o("span",{children:t})}},Wd=e=>e.replaceAll(/\D/g,""),Hd=d((({className:e="",index:t,text:n,...l})=>{const a=ue(),{href:i,target:r,onClick:s}=a(l);return o("a",{className:u("text-secondary-text",e),href:i,target:r,onClick:s,children:n||`Документ ${t}`})})),Yd=d((({className:e="",title:t,links:n})=>o("div",{className:e,children:n?.length?c("div",{className:"flex justify-between lg:items-center flex-col lg:flex-row gap-lg py-lg border-y border-y-main-divider",children:[o("div",{className:"lg:hidden",children:o(Re,{size:"text-l",font:"font-normal",children:t})}),n.map(((e,t)=>o(Hd,{index:t,className:"text-l font-light lg:max-w-[292px]",...e},String(t))))]}):null}))),Kd=d((({className:e="",index:t,...n})=>{const l=ue(),{href:a,target:i,text:r,onClick:s}=l(n);return o("a",{className:u("text-xs font-light text-secondary-text visited:text-secondary-text hover:text-primary-main inline-block no-underline max-w-[292px]",e),href:a,target:i,onClick:s,children:r||`Документ ${t}`})})),Xd=d((({className:e="",links:t,license:n})=>c("div",{className:u("@container space-y-lg",e),children:[n?o("div",{children:o(Re,{size:"text-xs",font:"font-light",color:"text-secondary-text",children:`© 2000-${(new Date).getFullYear()} ${n}`})}):null,t?.length?o("div",{className:"flex flex-col @5xl:flex-row justify-start items-start gap-x-lg gap-y-xs",children:t.map(((e,t)=>o(Kd,{index:t,...e},String(t))))}):null]}))),Gd=ut((({className:e,footer:t,...n})=>{const{navigationItems:l}=n.options?.page?.navigation??{};n.options?.page?.common;const{documents:a,relatedEnterprises:i,contacts:r,mediaLinks:s=[],horizontalNavigationTitle:d,feedbackButton:m,license:h,otherLinks:p=[]}=t??{};return c(g,{tag:"footer",className:u("grid gap-y-xl p-4xl pb-24 lg:p-xl",e),...n,children:[null,c("div",{className:"flex flex-col lg:flex-row items-center @lg:items-stretch gap-lg lg:gap-6xl ",children:[o(Ed,{navigationItems:l}),o("div",{className:"border-t border-main-divider lg:hidden w-full"}),c("div",{className:u("w-full lg:w-52","flex flex-col shrink-0 overflow-hidden space-y-xl"),children:[o(Ld,{items:r}),m?o(be,{className:"w-full",version:"primary",...m}):null,s.map(((e,t)=>o(Cc,{media:e?.links??[],showButtonText:!1,stretched:!0,children:e?.title},String(t)))),p.map(((e,t)=>o(be,{className:"!text-left text-s font-light",version:"link",...e,children:e?.text},String(t))))]})]}),o(Yd,{title:d,links:i}),o(Xd,{links:a,license:h})]})})),Jd=ut((({className:e,title:t,button:n,regionSource:a,data:i,...r})=>{const[s,d]=l({key:""}),m=a?.regions??[],h=oe({className:"text-white",version:n?.version||"primary"}),p=m?.find((e=>e.name===s.key))?.href,f=n?.text?n.text:"Перейти";return o(g,{className:e,defaultPadding:"p-6xl",...r,children:c("div",{className:"container max-w-[978px] space-y-m",children:[t?o(w,{headingType:"h3",title:t,className:"@xl:text-center"}):null,m?o(wn,{label:"Ваш регион",placeholder:"Выберите регион",isSearch:!0,options:m.map((({name:e=""})=>({key:e,text:e}))),value:s,onChange:d}):null,p?o("div",{className:"text-center",children:o(be,{href:p,target:"_blank",className:u("p-m w-full @xl:w-auto",h),data:wc(i,s?.key),children:f})}):null]})})})),Zd={default:"bg-main-divider text-primary-main rounded hover:text-primary-main",transparent:"backdrop-opacity-30 bg-white/30 hover:text-primary-hover text-white"},Qd=d((({version:e,text:t,mobileText:n,...l})=>{const a=we()?n:t;return a?o(be,{className:u("py-s px-lg font-light whitespace-nowrap",Zd["transparent"===e?"transparent":"default"]),...l,children:a}):null})),em=d((({bgColor:e,logo:t,alwaysShowLogo:n,internetBankButton:l,version:a,backwardButton:r})=>{const s=V(),d="/"===s.pathname,{dataFooter:m,dataHeader:u,...h}=t??{},p=i((()=>{s.back()}),[s]);return c("div",{className:"flex items-center justify-between w-full",children:[n||d?o("div",{children:o(nr,{className:"my-2xs",bgColor:e,logo:h,data:u,showTitle:!1})}):tm(p,r),o(Qd,{version:a,...l})]})})),tm=(e,t)=>t?c("button",{className:"flex items-center text-l my-2xs",onClick:e,type:"button","aria-label":"Кнопка назад",children:[o(W,{name:"ChevronLeftIcon",iconVersion:"black",width:"24",height:"24"}),t]}):null,nm={"bg-white":"primary",transparent:"transparent"},lm=ut((({bgColor:e="bg-white",alwaysShowLogo:t=!1,version:n=nm[e],portal:l,logo:a={},...i})=>{const{backwardButton:r,logo:s={}}=i.options?.page?.common??{},{internetBankButton:c}=l||{},d=a.image?.icon||a.image?.src?a:s;return o(g,{tag:"header",defaultPadding:"",version:n,...i,children:o("div",{className:"container px-lg py-2xs box-border",children:o(em,{bgColor:e,logo:d,alwaysShowLogo:t,internetBankButton:c,version:n,backwardButton:r,...i})})})})),am=(e=!1)=>e?{}:{padding:"p-0"},im={XXL:"gap-6xl",XL:"gap-5xl",L:"gap-3xl",M:"gap-m",S:"gap-xs",XS:"gap-2xs","":""},rm=ut((({className:e="",padding:t="p-0",gap:n="",isInnerPadding:l=!0,version:a="transparent",isTheme:i=!1,isCardBorder:r=!1,image:s,...c})=>{const d=V();return o(g,{className:u("relative flex flex-col",im[n],s?.src?"bg-right-bottom bg-no-repeat":"",e),...s?.src?{style:{backgroundImage:`url(${J(d)(s?.src)})`}}:{},padding:t,version:a,isTheme:i,...c,children:R({...c,extraProps:{className:u("w-full",vr(r)),...am(l)}})})}),{childrenTypes:[]}),sm=ut((e=>o(rm,{...e})),{childrenTypes:[]}),om=d((e=>{const{className:t,align:n,image:l,...a}=e,i=n?u("flex",Is[n]):"";return o(g,{className:u(i,t),defaultPadding:"p-0",...a,children:o(ne,{image:l})})})),cm=["байт","Кб","Мб","Гб","Тб","Пб"],dm=d((({icon:e,text:t,href:n,target:l,fileFormat:a,data:i,fileSize:r})=>{const s=r&&a?",":"",d=r??"",m=a?String(a):"";return c("a",{className:"flex box-border gap-s group/item h-fit w-fit text-primary-text no-underline hover:text-primary-main",href:n,target:l,...he(i),children:[e,t?c(Re,{size:"text-l",font:"font-light",children:[t," ",mm(d,m),o(Re,{color:"text-secondary-text",children:n&&`${d+s+m}`})]}):null]})})),mm=(e,t)=>e||t?o("span",{children:", "}):"",um=(e,t)=>(n,l)=>{const a=U(e)("Attachment"===n?.docType?n?.attachment?.src:n?.href),i="Attachment"===n?.docType?((e,t=2)=>{if(0===e)return"";const n=Math.floor(Math.log(e)/Math.log(1024));return`${parseFloat((e/Math.pow(1024,n)).toFixed(t))} ${cm[n]}`})(n?.attachment?.fileSize||0):n?.fileSize,r="Attachment"===n?.docType?pm(a):n?.fileFormat;return c("div",{role:"listitem",children:[o(dm,{text:n?.text,target:n?.target,href:a,fileFormat:r,fileSize:i,icon:hm(t),data:n?.data}),o(Pe,{__html:n?.__html})]},String(l))},hm=e=>e?o(ne,{className:"min-w-11 min-h-11 h-fit p-2.5 bg-main-divider rounded-md",image:e,width:"24",height:"24"}):null,pm=e=>{if(!e)return"";const t=e.lastIndexOf("."),n=new RegExp(/\/(.*)/),l=-1!==t?e.substring(t+1):"";return l.includes("/")?l.replace(n,""):l},gm=d((({href:e,__html:t,target:n})=>{const{close:l}=de(),a=V(),r=U(a)(e),s=i((()=>{l()}),[]);return c(xi,{className:"my-6xl min-h-fit w-fit mx-auto",children:[t?o(Pe,{__html:t}):null,c("div",{className:"flex flex-row mx-auto w-fit gap-lg py-lg",children:[o(be,{text:"Я согласен",version:"primary",target:n,href:r,onClick:s}),o(gi,{type:"button",version:"secondary",onClick:s,children:"Я не согласен"})]}),o("div",{children:"Нажимая кнопку «Я СОГЛАСЕН» ниже Вы принимаете данные условия. Распространение или раскрытие любой части данного Заключения или любой информации, или рекомендации в нем запрещено.»"})]})})),fm=d((({text:e,href:t,target:n,__html:l,icon:a})=>{if(!e&&!l)return null;const r=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(gm,{...e}),n),close:n}})({__html:l,href:t,target:n}),s=i((()=>r.open()),[r]);return c("button",{className:"flex gap-s text-primary-text no-underline hover:text-primary-main",onClick:s,children:[hm(a),o(Re,{font:"font-light",children:e})]})})),xm={double:"sm:flex-wrap sm:flex-row",single:"sm:flex-col"},bm=ut((({className:e="",title:t,description:n,align:l="text-center",documents:a,icon:i={icon:"DocIcon"},columnsMode:r="double",...s})=>{const d=V();return c(g,{className:u("space-y-lg",e),defaultPadding:"p-6xl",...s,children:[o(C,{title:t,description:n,align:l,headlineVersion:"M",as:"h2",isEmbedded:!0}),a?.length?o("div",{className:u("grid gap-xl","double"===r?"@md:grid-cols-2":"grid-cols-1",xm[r]),role:"list",children:a.map(ym(d,i))}):null]})})),ym=(e,t)=>(n,l)=>{const a=n?.docType;return""===a?null:"reportSource"in n&&n?.reportSource?.__html?vm(t)(n,l):um(e,t)(n,l)},vm=e=>(t,n)=>{const l={text:t.text,target:t.target,__html:t.reportSource?.__html};return t.reportSource?.__html&&t.text?c("div",{role:"listitem",children:[o(fm,{...l,icon:e,href:Nm(t)?t?.href:t?.attachment?.src}),o(Pe,{__html:t?.__html})]},String(n)):null},Nm=e=>"href"in e,wm=ut((({className:e,padding:t,align:n="text-left",buttons:l=[],description:a,image:i,__html:r,headingType:s,qr:d,additionalDescription:m="",title:h="Мобильное приложение",version:p="primary",...f})=>{const x="secondary"===p?"p-m min-w-32":"min-w-24",b=i?.src?o(ne,{className:"hidden lg:block",image:i}):null;return o(g,{className:u("min-h-80",e),padding:"p-0",version:p,...f,children:c(Ce,{className:"h-full",padding:t,defaultPadding:"p-6xl",title:o(w,{headingType:s,title:h,className:u("whitespace-pre-wrap",n)}),rightImage:b,buttons:Ee(l,{className:"flex-wrap"}),children:[a?o(Re,{size:"text-xl","font-weight":"font-light",children:a}):null,c("div",{className:u("gap-m","flex flex-1 flex-col","flex-col items-start @xl:flex-row @xl:items-center"),children:[r?o(Pe,{__html:r,itemSize:"list-m"}):null,o(Re,{size:"text-m","font-weight":"font-light",color:"text-secondary-text",children:m}),d?.src?o("div",{className:u("flex justify-center bg-white rounded-md @xl:-order-1",x),children:o(ne,{className:"w-fit",image:d})}):null,i?.src?o(ne,{className:"lg:hidden",image:i}):null]})]})})})),km=(e,t)=>e&&"underlined"!==t?"primary":"secondary",Sm=(e=[],t={})=>e.filter((({content:e={}})=>hs(t,e))).length,Cm=(e,t)=>e===t;const Tm=(Im=function(...e){return(t,n)=>e.some((e=>e(t,n)))}(Cm,((e=Cm)=>(t,n)=>t===n||Boolean(t&&n&&t.length===n.length&&t.every(((t,l)=>e(t,n[l])))))()),(e,t)=>e===t||Boolean(e&&t&&Object.keys(e).length===Object.keys(t).length&&Object.entries(e).every((([e,n])=>Im(n,t[e])))));var Im;const Bm=[],Pm={},Mm={primary:"bg-white/30",secondary:"bg-main-divider"},Rm={primary:{desktop:"text-white",mobile:"text-primary-text"},secondary:{desktop:"text-secondary-text",mobile:"text-secondary-text"}},Vm=d((({count:e,version:t="secondary"})=>{const n=we(),l=n?"bg-main-divider":Mm[t],a=Rm[t][n?"mobile":"desktop"];return o("div",{className:u("w-6 h-6 rounded-full flex items-center justify-center",l),role:"status","aria-label":`Количество ${e} доступных программ и сервисов`,children:o(Re,{size:"text-xs",color:a,children:e})})})),Dm=({text:e,description:t,icon:n,isActive:l,type:a})=>{const i=(e=>({btn:"w-96 "+(e?"p-m border-none bg-primary-main text-white":"p-s ease-in duration-300 bg-white"),text:e?"mb-xs text-xl":"mb-2xs text-l text-primary-text",desc:"font-light "+(e?"text-l text-white":"text-m text-secondary-text"),icon:e?"":"text-primary-main",iconVersion:e?"white":"normal",oldText:"text-m text-center",oldDesc:"text-m-light"}))(l);return c("div",{className:u("cursor-pointer text-left border-b-0 flex gap-2xs"),"aria-label":e,"aria-labelledby":`${e}-label`,children:[n?o(ne,{className:u("h-6 w-6 min-w-6 min-h-6",i.icon),image:{...n,iconVersion:n?.iconVersion??i.iconVersion},width:"24",height:"24",alt:e}):null,c("div",{className:"border-0",children:[o("div",{className:"animated"===a?i.text:i.oldText,children:e}),o("div",{className:"animated"===a?i.desc:i.oldDesc,children:t})]})]})},zm={default:"px-xs",underlined:"px-m",animated:"px-m border border-gray cursor-pointer text-left border-b-0 mt-auto flex gap-2xs"},Am={default:"text-black sm:text-white",underlined:"text-primary-main border-b-2",animated:"text-white sm:text-white"},_m={default:"bg-white",underlined:"bg-white",animated:"p-1 ease-in duration-300 bg-white text-primary-text h-[70px] w-96"},Om={default:"bg-white sm:bg-primary-main",underlined:"bg-white",animated:"p-2 border-none bg-primary-main text-white h-20 w-96"},Fm=d((({tag:e="div",item:t={},isActive:n=!1,type:l="default",onClick:a})=>{const i=e,{text:r,description:s,icon:d,count:m,tabName:h,...p}=t;return o(i,{className:u("h-12","block flex-1","cursor-pointer",zm[l],n?Om[l]:_m[l]),role:"tablist","aria-label":"Список табов",onClick:a,...p,children:c("div",{className:u("h-full","flex justify-center items-center","text-center whitespace-nowrap",n?Am[l]:"text-secondary-text hover:text-primary-main"),role:"tab","aria-label":`Таб ${r}`,children:[Dm({text:r,description:s,icon:d,isActive:n,type:l}),Number.isInteger(m)?o("div",{className:"ml-xs",role:"status","aria-label":`Количество программ и сервисов ${m}`,children:o(Vm,{count:m,version:km(n,l)})}):null]})})})),Em=d((e=>o(e?.item?.href?jm:Lm,{...e}))),jm=d((e=>{const t=ue(),n=i((()=>{e.onClick&&e.onClick(e.item||{})}),[e.onClick,e.item]),{onClick:l,...a}=t({...e.item,onClick:n});return o(Fm,{...e,tag:"a",item:a,onClick:l})})),Lm=d((({item:e={},onClick:t,...n})=>{const l=i((()=>{t&&t(e)}),[t,e]);return o(Fm,{item:e,onClick:l,...n})})),$m=(e,t,n)=>(l,a)=>o(Em,{isActive:l===e,onClick:t,type:n,item:l},String(a)),Um=d((({className:e,tabsType:t="default",items:n=[],activeItem:l,onChange:a})=>o("div",{className:u("flex gap-x-2xs overflow-x-auto no-scrollbar",e),role:"tabpanel","aria-label":"Панель управления табами",children:n.map($m(l,a,t))}))),qm={categories:[],extraOptions:[],propertyType:[],stage:[]},Wm=ut((({className:e,hotFilters:t,filtrationSchema:n={},resetButton:l,...a})=>{const[s,{blocksToRender:d},{field:m,reset:h,update:p}]=gs(qm,{block:a.block,page:a.options?.page}),f=i(((e=qm)=>p(e)),[]),x=(({hotFilters:e=Bm,filtrationState:t=Pm,blocks:n=Bm,onFiltrationStateChange:l})=>{const a=r((()=>Math.max(0,e.findIndex((e=>Tm(e.filter,t))))),[e,t]),s=r((()=>e.map((t=>({text:t.text,count:Sm(n,t.filter),version:km(t===e[a])})))),[e,n,a]),o=i((t=>{l(e[s.indexOf(t)].filter)}),[e,s]);return{activeItem:s[a],items:s,onChange:o}})({hotFilters:t,filtrationState:s,blocks:a.block?.blocks,onFiltrationStateChange:f});return c(g,{className:u("space-y-2xs",e),defaultPadding:"p-0",version:"transparent",...a,children:[o(Um,{...x}),o(os,{filtrationSchema:n,resetButton:l,field:m,reset:h}),o(as,{blocksToRender:d,...a})]})}),{childrenTypes:["ProductBlock"],childSchema:e=>e?.filtrationSchema||{}}),Hm=!Boolean("object"==typeof globalThis.process&&globalThis.process&&globalThis.process.version),Ym=d((({children:e})=>Hm?e:null)),Km="/icons/MapMarkerClusterIcon.svg",Xm="/icons/MapMarkerClusterYellowIcon.svg";function Gm({yandexMaps:e,map:t,points:n,isLoad:l}){if(l||!n)return;if(t.geoObjects.removeAll(),!n.length)return;const a=e.templateLayoutFactory.createClass('<div style="margin-top: -3px;">{{properties.geoObjects.length}}</div>'),i=Jm("offices",e,a);if(n.length&&n.every((e=>"type"in e))){const l=Jm("workplaces",e,a),r=Zm(n.filter((e=>"workplaces"===e.type)),"workplaces",e),s=Zm(n.filter((e=>"offices"===e.type)),"offices",e);i.add(s),l.add(r),t.geoObjects.add(l),t.geoObjects.add(i)}else{const l=Zm(n,"offices",e);i.add(l),t.geoObjects.add(i)}t.setBounds(e.util.bounds.fromPoints(n.map((e=>e.coords)))).then((()=>{t.getZoom()>10&&t.setZoom(10)}))}const Jm=(e,t,n)=>new t.Clusterer({clusterIcons:[{href:"offices"===e?Km:Xm,size:[78,84],offset:[-35,-50]}],clusterIconContentLayout:n,clusterHideIconOnBalloonOpen:!1,geoObjectHideIconOnBalloonOpen:!1}),Zm=(e,t,n)=>e.map((({coords:e,content:l})=>new n.Placemark(e,{balloonContentHeader:l?.header,balloonContentBody:l?.body,balloonContentFooter:l?.footer,hintContent:l?.hint},{iconLayout:"default#image",iconImageHref:"offices"===t?Km:Xm,iconImageSize:[78,84],iconImageOffset:[-35,-50]}))),Qm={focus:"focus:border-primary-text focus:border",hover:"hover:bg-primary-hover",active:"active:bg-primary-active",font:"text-center font-sans"},eu={...Qm,border:"border border-transparent rounded-md",position:"absolute flex items-center justify-center"},tu=(e,t,n)=>o("div",{className:`select-none cursor-pointer py-m w-12 bg-white ${Object.values(eu).join(" ")} ${n}`,onClick:()=>{t.geolocation.get({provider:"yandex",autoReverseGeocode:!0,mapStateAutoApply:!0}).then((function(t){e.current.geoObjects.add(t.geoObjects)}))},children:o(W,{name:"UserGeoLocationIcon",width:"20",height:"16"})}),nu=e=>globalThis[e];function lu(e,t,n=!0){const[i,r]=l(void 0);return a((()=>{let l=!0;return((e,t)=>{const n=document.getElementById(t);if(n){const t=nu(e);return t?Promise.resolve(t):new Promise((t=>{n.addEventListener("load",(()=>{t(nu(e))}))}))}return new Promise(((n,l)=>{const a=document.createElement("script");a.src=t,a.async=!0,a.id=t,a.addEventListener("load",(()=>{n(nu(e))})),a.addEventListener("error",(e=>{l(e)})),document.head.appendChild(a)}))})(e,t).then((e=>{l&&r(e)})).catch((e=>{console.error(`Failed to initialize external namespace: ${e}`)})),()=>{if(l=!1,n){const e=document.getElementById(t);e&&document.head.removeChild(e),r(void 0)}}}),[e,t,n]),i}const au={...Qm,border:"border-b border-b-2 border-gray last:border-0",position:"relative flex items-center justify-center"},iu=d((({yandexMaps:e,direction:t="in"})=>{const n="in"===t?"PlusIcon":"MinusIcon";return o("div",{onClick:()=>{const n=e.current.getZoom(),l="in"===t?n+1:n-1;e.current.setZoom(l,{checkZoomRange:!0})},className:`${Object.values(au).join(" ")} bg-white select-none cursor-pointer w-12 h-12`,children:o(W,{name:n,width:"20",height:"16"})})})),ru=[55.753995,37.614069],su=d((({points:e,className:t="",zoom:n=5,isLoad:l})=>{const i=s(null),r=lu("ymaps",`https://api-maps.yandex.ru/2.1/?apikey=${z.YANDEX_MAP_API_KEY||""}&lang=ru_RU`,!1);if(a((()=>{i.current?Gm({yandexMaps:r,map:i.current,points:e,isLoad:l}):r?.ready((()=>{i.current||(i.current=new r.Map("map",{center:ou(e),zoom:n,controls:[],suppressMapOpenBlock:!0})),Gm({yandexMaps:r,map:i.current,points:e,isLoad:l})}))}),[r,e,n,l]),!r)return null;const d="z-10";return c("div",{id:"map",className:u("relative","w-full",t),children:[l?o(ir,{}):null,c("div",{className:u("absolute right-2 top-52 z-10 w-12 overflow-hidden border border-transparent rounded-md",d),children:[o(iu,{yandexMaps:i}),o(iu,{yandexMaps:i,direction:"out"})]}),tu(i,r,u("right-2 top-80",d))]})})),ou=e=>{const t=[du(cu(e,0)),du(cu(e,1))];return t.every((e=>e))?t:ru},cu=(e,t)=>e.map((e=>e.coords?.[t])),du=e=>e.length&&e.reduce(((e,t)=>e+t))/e.length,mu={workingSaturday:!1,premiumService:!1,privateBanking:!1,remoteWorkplace:!1,serviceDisabledPeople:!1,sellingCoins:!1,buyingCoins:!1,bullionOperations:!1,preciousMetalsOperations:!1,transferringDataToBiometricSystem:!1},uu={safeBoxCaseVolumes:"Аренда индивидуальных сейфовых ячеек",workingSaturday:"Открыты по субботам",terminalTypeAtms:"Банкоматы",terminalTypeTerm:"Терминалы",workAllTime:"Круглосуточно",billAcceptorEnable:"Прием наличных",premiumService:"Премиальное обслуживание",privateBanking:"Услуга Private banking",sellingCoins:"Продажа монет из драгоценных металлов",buyingCoins:"Покупка монет из драгоценных металлов",bullionOperations:"Операции со слитками",preciousMetalsOperations:"Операции с драгоценными металлами",transferringDataToBiometricSystem:"Передача фото и голоса в Единую биометрическую систему",locationDisabledPeople:"Для маломобильных",designDisabledPeople:"Для слабовидящих",remoteWorkplace:"Удаленное рабочее место",serviceDisabledPeople:"Для маломобильных граждан"},hu={workingSaturday:e=>Boolean("workSchedule"in e&&e.workSchedule?.workingSaturday),premiumService:e=>Boolean("premiumService"in e&&e.premiumService),privateBanking:e=>Boolean("privateBanking"in e&&e.privateBanking),remoteWorkplace:e=>Boolean("workScheduleDescription"in e),serviceDisabledPeople:e=>Boolean("serviceDisabledPeople"in e&&e.serviceDisabledPeople),sellingCoins:e=>Boolean("sellingCoins"in e&&e.sellingCoins),buyingCoins:e=>Boolean("buyingCoins"in e&&e.buyingCoins),bullionOperations:e=>Boolean("bullionOperations"in e&&e.bullionOperations),preciousMetalsOperations:e=>Boolean("preciousMetalsOperations"in e&&e.preciousMetalsOperations),transferringDataToBiometricSystem:e=>Boolean("transferringDataToBiometricSystem"in e&&e.transferringDataToBiometricSystem)},pu=(e,t,n)=>{const l=km("all"===t),a=km("business"===t),i=(e,t,l)=>{const a=e.currentTarget===e.target&&"business"===t?r(l):l;return n(t),a},r=e=>e.filter((e=>e.workSchedule&&e.workSchedule.businessScheduleVisibleTag&&!e.workSchedule.businessScheduleDescription));return c("div",{className:"flex gap-lg flex-col sm:flex-row pb-lg",children:[o(gi,{"data-id":"all",onClick:t=>i(t,"all",e),version:l,children:"Для физических лиц"}),o(gi,{"data-id":"business",onClick:t=>i(t,"business",e),version:a,children:"Для юридических лиц"})]})},gu=({__html:e,list:t,richVersion:n})=>e||t?.length?c("div",{className:"mb-2xl border-b sm:border border-main-divider sm:rounded-md",children:[e?o("div",{className:"mb-2xl",children:o(Pe,{__html:e,richVersion:n})}):null,t?.length?o("div",{className:"flex flex-col sm:flex-row gap-2xl sm:flex-wrap pb-2xl sm:pb-xl",children:t.map(((e,t)=>c("div",{className:"flex gap-xs items-center",children:[e?.image?o(ne,{image:e.image}):null,e?.text?o(Re,{size:"text-m",font:"font-light",children:e.text}):null]},String(t))))}):null]}):null,fu="flex flex-col sm:flex-row sm:flex-wrap gap-3xl pb-2xl",xu=({filters:e,field:{field:t,reset:n},onlyOffice:l,labels:a})=>{const i=l?5:6,r=(e||[]).map((e=>o(Yt,{text:a[e],...t(e)},e))),[s,d]=i>0?[r.slice(0,i),r.slice(i)]:[r,[]];return o("div",{children:e?.length?o("div",{children:o(zi,{renderFoldableSection:({isUnfolded:e})=>c("div",{children:[o("div",{className:fu,children:s}),o(Ai,{className:fu,isUnfolded:e,children:d})]}),renderFoldButton:bu(n,l)})}):null})},bu=(e,t=!1)=>({isUnfolded:n,onToggle:l})=>c("div",{className:"flex space-x-lg",children:[t?o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",appendRight:o(W,{name:["ArrowDownIcon","ArrowUpIcon"][Number(n)],width:"16",height:"16"}),text:["Больше фильтров","Меньше фильтров"][Number(n)],onClick:l}):null,o(be,{version:"transparent",className:"text-secondary-text [&>*]:p-0",onClick:e,children:yu()})]}),yu=()=>c("div",{className:"flex items-center",children:["Очистить фильтр",o(W,{name:"CloseIcon",width:"16",height:"16",className:"ml-2xs"})]}),vu=(e,t)=>o("div",{className:"flex flex-col sm:flex-row gap-xs mb-2xl",children:c(w,{headingType:"h3",children:[o("span",{suppressHydrationWarning:!0,children:e}),t?o(Re,{size:"text-h2",color:"text-secondary-text",children:o("span",{suppressHydrationWarning:!0,children:` (${t})`})}):null]})}),Nu=()=>{},wu=e=>"all"===e?"block":"hidden",ku=d((({className:e,data:t=[],isLoad:n,remoteWorkplaces:a=[],renderCard:i=Nu,renderRemoteWorkplaceCard:s=Nu,getBalloon:d=Nu,getBalloonRemoteWorkplaces:m=Nu,descriptionData:h,title:p})=>{const g=p?.includes("Офис"),[f,{field:x,reset:b}]=At(mu),[y,v,N,w]=r((()=>{const e=Su(t,f),n=Su(a,f),l=[...e.map((e=>({type:"offices",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:d(e)}))),...n.map((e=>({type:"workplaces",coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)]?.filter(Boolean),content:m({address:e.address,workScheduleDescription:e.workScheduleDescription})})))].filter((e=>e.coords&&2===e.coords.length));return[e,l,n,e.length+n?.length]}),[t,a,f]),[k,S]=l("all"),C={filters:Cu([...t,...a]),field:{field:x,reset:b},onlyOffice:g,labels:uu};return c("div",{className:u("space-y-1",e),children:[c("div",{className:"bg-white",children:[c("div",{className:"p-3xl pb-0",children:[vu(p,w),h?gu(h):null,g&&pu(t,k,S),o("div",{className:u("pb-3xl",wu(k)),children:xu(C)})]}),o("div",{className:"h-[600px]",children:o(Ym,{children:o(su,{points:v,isLoad:n,className:"h-full"})})})]}),c(Ym,{children:[y.map(i),N.map(s)]})]})})),Su=(e,t)=>{const n=Object.keys(t).filter((e=>t[e]));return e.filter((e=>n.every((t=>hu[t](e)))))},Cu=e=>Object.keys(mu).filter((t=>e.filter((e=>hu[t](e))).length)),Tu={yellow:{border:"border-yellow-light",text:"text-yellow"},green:{border:"border-green-more-light",text:"text-green-dark"},gray:{border:"border-gray",text:"text-secondary-text"},red:{border:"border-error/30",text:"text-error"}},Iu=d((({className:e,children:t,color:n="gray"})=>c("div",{className:u("sm:p-s sm:border sm:border-green rounded-md flex items-center h-fit",Tu[n].border,e),children:[o("div",{className:"block pr-m sm:pr-0 sm:hidden",children:o(ne,{image:{icon:"SmallClockIcon"},width:"24",height:"24"})}),o(Re,{size:"text-m",color:Tu[n].text,children:t})]}))),Bu=d((({value:e,subText:t,children:n,isPhone:l,...a})=>{const i=(Array.isArray(e)?e:e?.split(",")??[]).filter(Boolean);return[i.length,n,t].every((e=>!e))?null:Pu({textItems:i,subText:t,children:n,isPhone:l,...a})})),Pu=({label:e,labelSize:t="text-m",textItems:n,subColor:l,subText:a,className:i,children:r,isPhone:s=!1})=>c("div",{className:u("flex gap-2xs flex-col h-full max-w-[300px]",i),children:[e?o(Re,{color:"text-secondary-text",font:"font-light",size:t,children:e}):null,r||Mu(n,s),a?o(Re,{color:l,size:"text-m",children:a}):null]}),Mu=(e,t)=>e.filter(Boolean).map(((e,n)=>o(Re,{size:"text-l",children:t?o("a",{href:`tel:${Ru(e)}`,children:e.trim()}):e.trim()},String(n)))),Ru=e=>e.replace(/\D/g,""),Vu=d((({className:e,children:t})=>o("div",{className:u("flex flex-col sm:flex-row sm:border-t sm:border-solid sm:border-main-divider py-xl gap-x-6xl gap-y-xl",e),children:t}))),Du=["ArrowDownIcon","ArrowUpIcon"],zu=["Подробнее","Скрыть"],Au=({isUnfolded:e,onToggle:t})=>c("button",{className:"w-full py-2xl cursor-pointer text-primary-main flex items-center border-b border-solid border-main-divider",onClick:t,type:"button",children:[o("div",{className:"pr-m",children:zu[Number(e)]}),o(W,{className:"text-primary-text",name:Du[Number(e)],width:"16",height:"16"})]}),_u=({location:e,address:t,billAcceptorType:n,terminalType:l,billAcceptorEnable:a,atmCode:i="",atmAccess:r="",workTime:s},d)=>{const m=[{label:"Устройство",value:Eu(l)},{label:"Модуль приема наличных",value:a?"Да":"Нет"},{label:"Прием наличных пачкой",value:"банкомат принимает пачками"===n?"Да":"Нет"},{label:"Доступность",value:["внешняя установка","территория банка"].includes(r)?"Общедоступный":""},{label:"Регистрационный номер",value:i}];return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:Eu(e)}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),o("div",{className:"whitespace-nowrap",children:o(Iu,{color:"green",children:Eu(s)})})]}),o("div",{className:"hidden sm:block",children:o(Vu,{className:"flex-wrap",children:m?.map(Fu)})}),o(zi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ai,{isUnfolded:e,children:o(Vu,{className:"flex-wrap",children:m?.map(Fu)})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Au({isUnfolded:e,onToggle:t})})]},String(d))},Ou=({address:e="",terminalType:t,atmCode:n=""})=>({header:`${Eu(t)} №${n}`,body:e.toUpperCase()}),Fu=(e,t)=>o(Bu,{...e},String(t)),Eu=e=>e?`${e?.charAt(0)?.toUpperCase()}${e?.slice(1)}`:"",ju=[];const Lu=async e=>{const t=await it(e,{method:"GET"});return Array.isArray(t)?t:ju},$u={terminalTypeAtms:!0,terminalTypeTerm:!1,workAllTime:!1,billAcceptorEnable:!1,locationDisabledPeople:!1,designDisabledPeople:!1},Uu={terminalTypeAtms:e=>"банкомат"===e.terminalType?.toLowerCase(),terminalTypeTerm:e=>"терминал"===e.terminalType?.toLowerCase(),workAllTime:e=>"круглосуточно"===e.workTime?.toLowerCase(),billAcceptorEnable:e=>Boolean(e.billAcceptorEnable),locationDisabledPeople:e=>Boolean(e.locationDisabledPeople),designDisabledPeople:e=>Boolean(e.designDisabledPeople)},qu=d((({descriptionData:e,className:t})=>{const[n]=ad(),l=n?.code??"000",{data:a,isLoad:i}=function(e){const{data:t,error:n}=Xn(`/api/v1/atms?regionCode=${e}`,Lu);return{data:t||ju,isLoad:!t&&!n}}(l);return o(ku,{className:t,filterItems:Wu,data:a,isLoad:i,initFilterState:$u,renderCard:_u,getBalloon:Ou,title:`Банкоматы филиала ${n?.name}`,descriptionData:e})})),Wu=(e,t)=>{const n=Object.keys(t).filter((e=>t[e])),l=n.filter((e=>e.startsWith("terminalType"))),a=n.filter((e=>!l.includes(e)));return e.filter((e=>{const t=a.every((t=>Uu[t](e))),n=!l.length||l.some((t=>Uu[t](e)));return t&&n}))},Hu=e=>{const t=Ku(e);return o(Bu,{label:"Режим работы",value:t,className:"max-w-none"})},Yu=({workTime:e="",lunchHour:t="",daysOff:n=""},l=!1)=>e?[`${l?"Суббота":"Будние дни"}: ${e}`,t?`перерыв: ${t}`:"",n?`не работает: ${n}`:""].filter(Boolean).join("; "):"",Ku=e=>{const t=e.find((e=>"workingSaturday"!==e.key&&Boolean(e.status)&&Boolean(e.workTime))),n=e.find((e=>"workingSaturday"===e.key&&Boolean(e.status)&&Boolean(e.workTime))),l=e.filter((e=>!e.status)).map((e=>e.short?.toLowerCase())).join(", ");return[Yu({workTime:t?.workTime,lunchHour:t?.lunchHour,daysOff:n?"":l}),Yu({workTime:n?.workTime,lunchHour:n?.lunchHour,daysOff:l},!0)].filter(Boolean)},Xu=[["workingMonday","Пн","Понедельник"],["workingTuesday","Вт","Вторник"],["workingWednesday","Ср","Среда"],["workingThursday","Чт","Четверг"],["workingFriday","Пт","Пятница"],["workingSaturday","Сб","Суббота"],["workingSunday","Вс","Воскресенье"]],Gu=e=>Xu.map((([t,n,l])=>({key:t,title:l,short:n,status:Boolean(e?.[t]),get workTime(){return"workingSaturday"===t?e?.workTimeSaturday:e?.workTime},get lunchHour(){return"workingSaturday"===t?e?.lunchHourSaturday:e?.lunchHour},get hasLunch(){return/\d+/.test(this.lunchHour??"")}}))),Ju=e=>{if(!e)return null;const t=Zu(e);return c(Vu,{className:"border-none",children:[o(Bu,{label:"Для юридических лиц",labelSize:"text-l",children:o("div",{className:"flex gap-1",children:t.map(Qu)})}),o(Bu,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]})},Zu=e=>{const t=Xu.map((([,e])=>({short:e,status:!0}))),n=e.split("/")??[],l=n[n.length-1]?.toLowerCase();return l?.includes("выходной")?t.map((e=>({...e,status:!l?.includes(e.short.toLowerCase())}))):t},Qu=({short:e,status:t},n)=>o("div",{className:u("w-9 h-9 rounded-md flex items-center justify-center",t?"bg-green-more-light text-green-dark":"bg-error/30 text-error"),children:o(Re,{size:"text-xs",children:e})},String(n)),eh=({currency:e,buyExchangeRate:t,saleExchangeRate:n},l)=>c("div",{className:"flex gap-lg h-full",children:[e?.currency?o(Bu,{label:"Валюта",value:e.currency}):null,t?o(Bu,{label:"Купить",value:String(t)}):null,n?o(Bu,{label:"Продать",value:String(n)}):null]},String(l)),th=(new Date).getDay(),nh=e=>{const[t]=e?.slice(th-1)??[];if(!t)return null;const{lunchHour:n,status:l,workTime:a,hasLunch:i}=t;return l?c("div",{className:"flex gap-s items-start whitespace-nowrap",children:[a?o(Iu,{color:"green",children:a}):null,n&&i?o(Iu,{color:"yellow",children:`перерыв: ${n}`}):null]}):o(Iu,{color:"red",children:"Выходной"})},lh=({lunchHour:e,hasLunch:t=!1,status:n=!1})=>n?e&&t?`Перерыв ${e}`:e:"Не работает",ah=({title:e,status:t,workTime:n,lunchHour:l,hasLunch:a},i)=>o(Bu,{label:e,value:t&&n?n:"",subText:lh({lunchHour:l,hasLunch:a,status:t}),subColor:!t||a?"text-error":"text-green-dark"},String(i)),ih=e=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p>`,rh=e=>`<p><b>Режим обслуживания физ. и юр. лиц:<br/></b> ${e}</p>`,sh=(e,t)=>`<p><b>Режим обслуживания физ.лиц:<br/></b>${e}</p> <p><b>Режим обслуживания юр.лиц:<br/></b>${t}</p>`,oh=({name:e,address:t,phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m},u)=>{if(!d)return null;const h=Gu(d);return c("div",{className:"bg-white col-span-12 p-3xl sm:border-green sm:border",children:[c("div",{className:"sm:flex sm:justify-between",children:[c("div",{children:[o(Re,{size:"text-h4",children:e}),t?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:t})]}):null]}),nh(h)]}),o("div",{className:"hidden sm:block",children:ch({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),o(zi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ai,{isUnfolded:e,children:ch({phone:n,fax:l,phoneBusiness:a,phoneNatural:i,phoneCallCentre:r,phoneCurrencyControl:s,workSchedule:d,exchangeRate:m})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Au({isUnfolded:e,onToggle:t})})]},String(u))},ch=({phone:e,fax:t,phoneBusiness:n,phoneNatural:l,phoneCallCentre:a,phoneCurrencyControl:i,workSchedule:r,exchangeRate:s})=>{const d=Gu(r),m=r?.businessScheduleVisibleTag?"Для физических лиц":"Для физических и юридических лиц";return c("div",{children:[c(Vu,{className:"flex-wrap border-b border-solid border-main-divider",children:[o(Bu,{label:"Факс",value:t,isPhone:!0}),o(Bu,{label:"Телефон филиала",value:e,isPhone:!0}),o(Bu,{label:"Для обращений юридических лиц",value:n,isPhone:!0}),o(Bu,{label:"Обслуживание физических лиц",value:l,isPhone:!0}),o(Bu,{label:"Для консультаций по валютному контролю",value:i,isPhone:!0}),o(Bu,{label:"Контакт-центр",value:a,isPhone:!0})]}),r?.isMatchesPattern?o(Vu,{children:o(Bu,{label:m,labelSize:"text-l",className:"w-full max-w-none",children:o("div",{className:"flex flex-wrap gap-xs sm:justify-between pt-xs",children:d?.map(ah)})})}):c(Vu,{children:[o(Bu,{label:m,labelSize:"text-l",children:o("div",{className:"flex gap-1",children:d?.map(Qu)})}),Hu(d)]}),r?.businessScheduleVisibleTag?Ju(r?.businessScheduleDescription):null,s?.currencies?.length?o(Vu,{className:"flex-wrap",children:s?.currencies?.map(eh)}):null]})},dh=({name:e="",address:t="",workSchedule:n})=>{const l=(a=e)?`${a?.charAt(0)?.toUpperCase()}${a?.slice(1)}`:"";var a;const i=`${t} ${(e=>{const t=Gu(e),n=e?Ku(t):"",l=e?e.businessScheduleDescription:"";return e?e.businessScheduleVisibleTag?e.businessScheduleVisibleTag&&null===e.businessScheduleDescription?ih(n):sh(n,l):rh(n):null})(n)}`;return{header:l,body:i}},mh=({address:e,workScheduleDescription:t},n)=>t?c("div",{className:"bg-white col-span-12 p-3xl sm:border-yellow sm:border",children:[o("div",{className:"sm:flex sm:justify-between",children:c("div",{children:[o(Re,{size:"text-h4",children:"Удаленное рабочее место"}),e?c("div",{className:"flex pb-xl pt-xs gap-2xs",children:[o(W,{name:"GeolocationIcon",width:"24",height:"24"}),o(Re,{size:"text-l",children:e})]}):null]})}),o("div",{className:"hidden sm:block",children:uh({workScheduleDescription:t})}),o(zi,{className:"block sm:hidden",renderFoldableSection:({isUnfolded:e})=>o(Ai,{isUnfolded:e,children:uh({workScheduleDescription:t})}),renderFoldButton:({isUnfolded:e,onToggle:t})=>Au({isUnfolded:e,onToggle:t})})]},String(n)):null,uh=({workScheduleDescription:e})=>c("div",{children:[c(Vu,{className:"flex",children:[o(Bu,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание кредитов, счетов, вкладов"})}),o(Bu,{label:"Операции для физических лиц",children:o(Re,{children:"Оформление и обслуживание банковских карт"})}),o(Bu,{label:"Операции для физических лиц",children:o(Re,{children:"Инвестиционное и накопительное страхование"})}),o(Bu,{label:"Операции для физических лиц",children:o(Re,{children:"Безналичные операции в рублях, переводы без открытия счёта"})})]}),o("hr",{className:"text-main-divider pb-xl"}),o(Bu,{label:"Режим работы",className:"max-w-none",children:o(Re,{children:e})})]}),hh=({address:e="",workScheduleDescription:t})=>({header:"Удаленное рабочее место",body:`${e} ${t}`}),ph={branches:[],remoteWorkplaces:[]};const gh=async e=>await it(e,{method:"GET"})||ph,fh=d((({className:e})=>{const[t]=ad(),n=t?.code??"000",{data:l,isLoad:a}=function(e){const{data:t,error:n}=Xn(`/api/v1/branchesAndRemoteWorkplaces?regionCode=${e}`,gh);return{data:t||ph,isLoad:!t&&!n}}(n);return o(ku,{className:e,data:l?.branches,isLoad:a,remoteWorkplaces:l?.remoteWorkplaces,renderCard:oh,renderRemoteWorkplaceCard:mh,getBalloon:dh,getBalloonRemoteWorkplaces:hh,title:`Офисы филиала ${t?.name}`})})),xh=d((({data:e,className:t,...n})=>{const l=e?.dataType??"offices";return o(g,{version:"transparent",className:u(t),defaultPadding:"p-0",...n,children:"offices"===l?o(fh,{}):o(qu,{descriptionData:e})})})),bh=d((({className:e,title:t,description:n="Блок в разработке...",...l})=>c(g,{className:u("box-border",e),...l,children:[o(C,{className:"max-w-[600px]",title:t,description:n,headlineVersion:"L",align:"text-left",isEmbedded:!0}),o(f,{})]}))),yh=d((({className:e,padding:t,slides:n=[],...l})=>o(g,{className:u("overflow-hidden relative",e),padding:t,...l,children:o(Xr,{gap:0,padding:0,children:n.map((e=>e.productBlock)).map(((e,t)=>o("div",{className:"box-border h-full",children:o(Xe,{className:"px-5 h-full",headlineVersion:"L",...e,...l})},String(t))))})}))),vh=d((({address:e,email:t,telephone:n,button:l,className:a="",__html:i,richVersion:r,icon:s,title:d,version:m="primary",...h})=>c(g,{className:u("box-border text-left space-y-s",a),version:m,...h,children:[c("div",{className:"w-full flex justify-between flex-row-reverse",children:[Fe(s)?o("div",{className:"w-10 h-7 sm:w-24 sm:h-16",children:o(ne,{image:s})}):null,d?o(w,{headingType:"h3",as:"h3",title:d}):null]}),c("div",{className:"w-full space-y-m",children:[i?Nh({__html:i,richVersion:r}):null,wh({label:"Адрес",data:e,iconName:"GeolocationIcon"}),wh({label:"Телефон(факс)",data:n,iconName:"PhoneIcon"}),wh({label:"E-mail",data:t,iconName:"MailIcon",dataColor:"text-primary-main"}),l?.text?Ee([l]):null]})]}))),Nh=e=>o("div",{className:"border-b border-main-divider pb-lg",children:o(Pe,{...e,itemSize:"list-s"})}),wh=({label:e,data:t,iconName:n,dataColor:l=""})=>t?c("div",{className:"flex gap-s",children:[o(W,{iconVersion:"black",name:n,width:"24",height:"24"}),c("div",{className:"flex flex-col gap-2xs",children:[o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:e}),o(Re,{size:"text-xl",color:l,children:t})]})]}):null,kh=d((e=>{const{__html:t,richVersion:n="",...l}=e;return o(g,{defaultPadding:"p-0",...l,children:o(Pe,{__html:t,richVersion:n})})})),Sh=d((({className:e=""})=>{const[t,n]=l("option2"),a=i((e=>n(e)),[]);return c("div",{className:u("order-4",e),role:"radiogroup",children:[o(ii,{className:"mb-xs",name:"contractType",text:"Простое хранение",value:"option1",checked:"option1"===t,onChange:a}),o(ii,{name:"contractType",text:"Сделка с недвижимостью",value:"option2",checked:"option2"===t,onChange:a})]})})),Ch=d((({data:e,fieldLabel:t,fieldValue:n,selected:l,placeholder:a="",setSelected:i,label:r})=>{const s=e.filter(Boolean).map((e=>({key:e?.[n||t],text:e?.[t]}))),c=s.find((e=>e.key===l));return o(yn,{options:s,label:r,placeholder:a||l,onChange:e=>i(e.key),value:c})})),Th=d((({regions:e=[],selectedRegion:t,onSelectedRegion:n,branches:l=[],selectedBranch:a,onSelectedBranch:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Ch,{data:e,fieldValue:"code",fieldLabel:"name",selected:t,setSelected:n,label:"Регион"})}),o("div",{className:"flex-1 min-w-0",children:o(Ch,{data:l,fieldValue:"branchCode",fieldLabel:"address",selected:a,setSelected:i,label:"Отделение",placeholder:"Выберите отделение"})})]}))),Ih=["От 1 дня","До 365 дней"],Bh=d((({days:e,setDays:t})=>c("div",{className:"order-1",children:[o(Re,{size:"text-m",font:"font-light",children:"Срок аренды"}),o(sl,{min:1,max:365,value:e,items:Ih,onChange:t})]}))),Ph=d((({caseVolumes:e=[],selectedCaseVolume:t,onSelectedCaseVolume:n,safeBoxCases:l=[],selectedBoxSize:a,onSelectedBoxSize:i})=>c("div",{className:"flex flex-col @xl:flex-row gap-m order-1",children:[o("div",{className:"flex-1 min-w-0",children:o(Ch,{data:e,fieldLabel:"volume",selected:t,setSelected:n,label:"Размер",placeholder:"Выберите размер"})}),o("div",{className:"flex-1 min-w-0",children:o(Ch,{data:l,fieldLabel:"safeBoxCasesSize",selected:a,setSelected:i,label:"Параметры ячейки, мм (ВхШхД)",placeholder:"Выберите параметр ячейки"})})]}))),Mh=d((({regions:e,selectedRegion:t,branches:n,selectedBranch:l,days:a,selectedCaseVolume:i,selectedBoxSize:r,safeBoxCases:s,caseVolumes:d,onChange:m,onClick:u})=>c("div",{className:"contents @xl:block flex-1 space-y-xl",children:[o(Th,{regions:e,selectedRegion:t,onSelectedRegion:e=>m({selectedRegion:e}),branches:n,selectedBranch:l,onSelectedBranch:Rh(m)}),o(Bh,{days:a,setDays:e=>m({days:e})}),o(Ph,{caseVolumes:d,selectedCaseVolume:i,onSelectedCaseVolume:Vh(m),safeBoxCases:s,selectedBoxSize:r,onSelectedBoxSize:e=>m({selectedBoxSize:e})}),o("div",{className:"order-4",children:o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:"Тип договора"})}),c("div",{className:"contents @md:flex justify-between items-center gap-m",children:[o(Sh,{}),o(be,{text:"Офисы на карте",version:"primary",onClick:u,className:"order-6"})]})]}))),Rh=e=>t=>{e({selectedBranch:t,selectedCaseVolume:"",selectedBoxSize:""})},Vh=e=>t=>{e({selectedCaseVolume:t,selectedBoxSize:""})},Dh=d((({days:e,tariffs:t=[]})=>{const n=Ah(e,t),l="На рисунке изображена пачка листов\nформата А4";return c("div",{className:"contents @xl:flex flex-col justify-between gap-xl order-2",children:[c("div",{className:"flex flex-col @xl:flex-row gap-x-6xl gap-y-2xl order-5 @xl:order-none py-2xl @xl:py-0 border-t border-main-divider @xl:border-none",children:[zh("Аренда за",e),zh("Цена",n+" ₽")]}),o("div",{className:"@xl:hidden order-3 mb-xs",children:o(k,{size:"text-s",font:"font-light",color:"text-secondary-text",children:l})}),c("div",{className:"flex flex-col items-center gap-s order-3 @xl:order-none mb-xl @xl:mb-0 bg-primary-main py-s @xl:p-3xl text-center",children:[o(ne,{image:{icon:"PackA4Icon"},className:"@xl:h-60"}),o("div",{className:"hidden @xl:inline opacity-80 whitespace-pre-line",children:o(k,{size:"text-s",font:"font-light",color:"text-white",children:l})})]})]})})),zh=(e,t)=>c("div",{className:"flex justify-between items-center gap-y-xs @xl:flex-col @xl:items-start",children:[o(Re,{size:"text-l",font:"font-light",color:"text-secondary-text",children:e}),o("span",{className:"text-l @xl:text-h3 text-primary-text",children:t})]}),Ah=(e,t)=>{const n=_h(e);return e*(t?.find((e=>e.tariffType===String(n)))?.tariffValue||0)},_h=e=>{let t=1;switch(!0){case e>30&&e<=90:t=2;break;case e>90&&e<=180:t=3;break;case e>180&&e<=365:t=4}return t},Oh=(e,t)=>e.find((e=>e.branchCode===t)),Fh=d((e=>{const{regions:t,data:n,branches:l,onChange:i,onClick:r}=e;a((()=>{i({selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:""})}),[n.selectedRegion,i]);const s=Oh(l,n.selectedBranch),d=Eh(s?.safeBoxCaseVolumes),m=jh(s?.safeBoxCaseVolumes,n.selectedCaseVolume)?.safeBoxCases,u=Lh(m,n.selectedBoxSize);return c("div",{className:"flex flex-col @4xl:flex-row gap-4xl align-top",children:[o(Mh,{...n,regions:t,onClick:r,branches:l,caseVolumes:d,safeBoxCases:m,onChange:i}),o(Dh,{days:n.days,tariffs:u})]})})),Eh=e=>e?.length?e?.filter((e=>e?.safeBoxCases?.length)):[],jh=(e,t)=>e?.find((e=>e.volume===t)),Lh=(e,t)=>e?.find((e=>e.safeBoxCasesSize===t))?.tariffs,$h=[];const Uh=async e=>await it(e,{method:"GET"})||$h,qh=d((({title:e,footnote:t,className:n="",...a})=>{const[r,s]=l(!1),d=i((()=>s((e=>!e))),[]),[m,u]=l({selectedRegion:"",selectedBranch:"",selectedCaseVolume:"",selectedBoxSize:"",days:26}),h=ba(),p=Wh(m.selectedRegion,h),f=function(e){const{data:t}=Xn(e?`/api/v1/safeboxes?regionCode=${e}`:null,Uh);return t||$h}(p),x=i((e=>u((t=>({...t,...e})))),[u]),b=(y=Oh(f,m.selectedBranch)||f,Array.isArray(y)?y.map((e=>({coords:[Number(e.gpsLatitude),Number(e.gpsLongitude)].filter(Boolean),content:void 0}))).filter((e=>e.coords&&2===e.coords.length)):y?.gpsLatitude&&y?.gpsLongitude?[{coords:[y.gpsLatitude,y.gpsLongitude]}]:[]);var y;return c(g,{className:n,defaultPadding:"",...a,children:[c("div",{className:"p-4xl space-y-xl",children:[e?o(w,{title:e,headingType:"h3",as:"h2",className:"text-primary-text mb-s text-center"}):null,o(Fh,{regions:h,branches:f,data:{...m,selectedRegion:p},onClick:d,onChange:x}),t?o(k,{size:"text-s",font:"font-light",children:t}):null]}),b.length&&r?o(su,{points:b,className:"h-[640px]"}):null]})})),Wh=(e,t)=>!e&&t?.length&&t[0]?.code?t[0].code:e,Hh={description:"text-white/80 text-l font-light group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconText:"text-white group-data-primary:text-secondary-text group-data-gray:text-secondary-text",iconBackground:"bg-white/30 group-data-primary:bg-main-divider",iconConnector:"bg-white group-data-primary:bg-secondary-light",dot:"bg-white/80 group-data-primary:bg-secondary-text"},Yh=(e,t,n)=>(l,a)=>{const{button:i}=l;return o("div",{className:"contents",children:c("div",{className:"flex items-center relative flex-row",children:[o("div",{className:"overflow-hidden flex flex-shrink-0 items-center",children:Kh(e,n)(l,a)}),c("div",{className:u("flex flex-col justify-center h-fit w-full",{"min-h-6xl":e}),children:[Xh(l),i?.text?o(be,{className:"box-border py-s w-full max-w-60 mt-lg",version:t,...i,children:i?.text}):null]})]})},String(a))},Kh=(e,t)=>(n,l)=>{const a="secondary"===t?"white":"color",i=Boolean(n?.icon?.src),r=Gh(e,i),s=i?"transparent"===t:t;return o(g,{className:u("z-10 mr-s flex justify-center content-center rounded-md",r),defaultPadding:"",version:s,children:o("div",{className:"flex max-w-full max-h-full items-center justify-center",children:Jh({step:n,iconVersion:a,i:l,stepVersion:t})})})},Xh=e=>c("div",{children:[e?.label?o(k,{size:"text-l",align:"text-left",children:e.label}):null,e?.description?o("div",{className:u("text-s font-light text-left",Hh.description),children:e.description}):null,o(Pe,{__html:e.__html})]}),Gh=(e,t)=>e&&t?"h-14 w-14":"h-11 w-11",Jh=({step:e,iconVersion:t,i:n,stepVersion:l})=>{return Fe(e?.icon)?o(ne,{image:{...e.icon,iconVersion:e.icon?.iconVersion||t},imageClassName:"max-w-full max-h-full",width:"24",height:"24"}):o("span",{className:u("text-h4","transparent"===l?Hh.iconText:(a=l,"secondary"===a?"group-data-primary:text-white":"text-secondary-text")),children:n+1});var a},Zh=d((({className:e="",title:t,description:n,steps:l=[],buttons:a,stepVersion:i="gray",version:r="primary",...s})=>{const d=l.length>3;return c(g,{className:u("box-border flex flex-col gap-xl",e),defaultPadding:"p-6xl",version:r,...s,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-left"}),l?.length?o("div",{className:"flex flex-col gap-6xl justify-between box-border",children:l.map(Yh(d,r,i))}):null,Ee(a,{isVertical:!0})]})})),Qh=d((({isActive:e,item:t,onClick:n})=>c("div",{className:u(e?"text-primary-main":"text-primary-text","w-10 m-4 flex justify-center items-center flex-col text-xs cursor-pointer"),title:t?.title||"",onClick:n,children:[o(W,{className:"w-6 h-6",name:t?.icon?.icon,iconVersion:e?"color":"black"}),t?.title||""]}))),ep=d((({className:e,head:t,children:n,onClose:l,onClick:a})=>{const{close:r}=de(),s=i((()=>{r(),l&&l()}),[l]);return c("div",{onClick:a,className:u("relative min-h-full bg-white p-0 rounded-xl top-32",e),role:"dialog",children:[c("div",{className:"sticky py-xl top-0 rounded-xl bg-white z-10",children:[o(fi,{className:"absolute top-1.5 right-0",onClose:s}),o("div",{className:"container",children:t})]}),o("div",{className:"container pb-6xl",children:n})]})})),tp=({menuRef:e,dialogRef:t,closeDialog:n,openDialog:l,leftItems:a,rightItems:i})=>[{openBottomMenuItemDialog:(r,s)=>{const c="left"===s?a:i,d=e?.current?.getBoundingClientRect();l(o(ep,{onClick:e=>e.stopPropagation(),onClose:n,className:"mt-[20%] border-t border-current",head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:c[r].description||c[r].title})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",ref:t,children:o("iframe",{id:"iframe-dialog",onLoad:()=>(()=>{const e=document.getElementsByTagName("iframe")["iframe-dialog"];e.style.height=String(e?.contentWindow?.document.body.offsetHeight)+"px"})(),src:c[r]?.src,width:d?.width||0})})}),{id:"left"===s?a[r].title:i[r].title})}}];function np(e){throw new Error(e)}const lp=({onCloseAll:e,onClose:t}={})=>{const[n,{push:r,pop:s,clear:o}]=function(e=[]){const[t,n]=l(e),a=i((e=>n((t=>[...t,e]))),[]),r=i((()=>n((e=>e.slice(0,-1)))),[]),s=i((e=>n((t=>t.filter((t=>t!==e))))),[]),o=i((()=>n([])),[]);return[t,{setList:n,push:a,pop:r,remove:s,clear:o}]}(),c=i((()=>{e&&e(n),o()}),[n,e]),d=i((()=>{t&&t(n[n.length-1]),s()}),[n,t]);return a((()=>ce.subscribe("dialog",(e=>{switch(e.type){case"open":r(e);break;case"close":e.all?c():d();break;default:np(e)}}))),[c,d]),n},ap=e=>t=>{if(e===t)return 1;if(!e||!t)return 0;const{m:n,s1Matches:l,s2Matches:a}=function(e,t){const n=Math.max(0,Math.floor(Math.max(e.length,t.length)/2)-1),l=Array.from({length:e.length}),a=Array.from({length:t.length});let i=0;for(let r=0;r<e.length;r++){const s=Math.max(0,r-n),o=Math.min(r+n,t.length-1);for(let n=s;n<=o;n++)l[r]||a[n]||e[r]!==t[n]||(i++,l[r]=!0,a[n]=!0)}return{m:i,s1Matches:l,s2Matches:a}}(e,t);if(0===n)return 0;const i=function(e,t,{s1Matches:n,s2Matches:l}){let a=0;for(let i=0,r=0;i<e.length;i++){if(!n[i])continue;let s=r;for(;s<t.length;s++)if(l[s]){r=s+1;break}e[i]!==t[s]&&a++}return a}(e,t,{s1Matches:l,s2Matches:a}),r=(n/e.length+n/t.length+(n-i/2)/n)/3,s=r>.7?.1*function(e,t){let n=0;for(;e[n]===t[n]&&n<4;)n++;return n}(e,t):0;return r+s*(1-r)};const ip=e=>e?.length?c("div",{className:"sm:border-t sm:border-main-divider mt-2xs pt-2xs",children:[o("div",{className:"mb-m",children:o(Re,{size:"text-m",font:"font-light",color:"text-secondary-text",children:"Представительства за рубежом:"})}),o("div",{className:"flex flex-col sm:flex-row gap-5xl",children:e.map(((e,t)=>o(rp,{...e},String(t))))})]}):null,rp=d((({icon:e,...t})=>{const n=ue(),{text:l,target:a,href:i,onClick:r}=n(t);return c("div",{className:"flex gap-s items-center",children:[e?o(ne,{image:e}):null,l?o("a",{className:"hover:text-primary-hover",href:i,target:a,onClick:r,children:o(Re,{size:"text-l",font:"font-light",color:"text-primary-text",children:l})}):null]})})),sp=(e,t)=>n=>n.name?o(kc,{href:`/branches/${n.slug}`,className:"mb-xs sm:mb-2xs hover:text-primary-hover",onClick:()=>t?.(n),data:wc(e,n.name),children:o(Re,{size:"text-l",font:"font-light",children:n.name})},String(n.id)):null,op=d((({className:e,searchTerm:t,onSearch:n})=>c("form",{className:`font-sans relative ${e}`,children:[o("div",{className:"absolute rounded h-full flex items-center justify-center pl-m max-w-44 gap-s pointer-events-none",children:t?null:o("label",{htmlFor:"search-bar-input",className:"text-secondary-text ",children:"Поиск по филиалам"})}),o("input",{id:"search-bar-input",className:u(ln,"h-12 pl-m w-full peer text-l text-black rounded-md box-border"),value:t,onChange:e=>n(e.target.value.toLowerCase()),type:"text",name:"location-search-bar-input"})]}))),cp=d((({foreignOffices:e,branches:t})=>{const[n,a]=ad(t?.default),r=ue(),{href:s}=r({href:`/branches/${n.slug}`}),[d,m]=l(""),u=mp(ba()).sort(((e,t)=>e.name.localeCompare(t.name))),h=((e,t)=>{const n=new Map;for(const l of e){const e=t(l),a=n.get(e)||[];n.set(e,[...a,l])}return n})(u,dp),{close:p}=de(),g=i((e=>{a(e),p()}),[]);return c(xi,{className:"pb-20",head:c("div",{children:[o(Re,{size:"text-h4",color:"text-primary-text",children:"Выберите филиал"}),n?o("div",{className:"mb-s",children:c(k,{size:"text-l",color:"text-primary-text",children:["Сейчас выбран:",o(kc,{href:s,className:"inline mx-2xs text-primary-main",children:n.name})]})}):null,o(op,{onSearch:m,searchTerm:d})]}),children:[d&&d.length>=3?o("div",{children:u.filter((({name:e})=>e&&ap(e.toLowerCase())(d.toLowerCase())>=.8)).map(sp(t?.dataSelect,g))}):o("div",{className:"columns-1 sm:columns-3 md:columns-4 lg:columns-5",children:Array.from(h.entries()).map((f=g,x=t?.dataSelect,([e,t])=>c("div",{className:"break-inside-avoid mb-2xl w-56",children:[o("div",{className:"mb-s",children:o(Re,{size:"text-h6",children:e})}),t.map(sp(x,f))]},e)))}),ip(e)]});var f,x})),dp=e=>e.name?.charAt(0)||"",mp=e=>e.map((e=>({...e,name:e.name?.replace(/республика|область|край'/gi,"").trim()||""}))),up=d((({menuRef:e,menuItem:t,locationDialogProps:n,closeAll:l})=>{const i=(e=>{const{open:t,close:n}=de();return{open:(n={})=>t(o(cp,{...e}),n),close:n}})(n||{}),[{name:r}]=ad(),s=e?.current?.getBoundingClientRect(),c=G(X.SITE_URL);return a((()=>{globalThis.frames["burger-menu-iframe"].postMessage({type:"currentLocation",data:r},"*")}),[r]),a((()=>{const e=e=>{if("location"===e.data.type&&i.open(),"reload"===e.data.type&&l(),"resize"===e.data.type){const t=document.getElementsByTagName("iframe")["iframe-dialog"];t&&t.style&&(t.style.height=String(e.data.data)+"px")}};return globalThis.addEventListener("message",e),()=>{globalThis.removeEventListener("message",e)}}),[]),o(ep,{onClick:e=>e.stopPropagation(),head:o("div",{className:"flex items-center justify-center px-xl",children:o(w,{as:"h4",title:t?.title,className:"font-medium"})}),children:o("div",{className:"bg-white pb-20 pt-1 text-l",children:o("iframe",{id:"iframe-dialog",name:"burger-menu-iframe",onLoad:()=>(()=>{const e=globalThis.frames["burger-menu-iframe"],t=document.getElementsByTagName("iframe")["iframe-dialog"];t.style.height=String(t?.contentWindow?.document.body.offsetHeight)+"px",e.postMessage({type:"currentTab",data:c?.slice(1)},"*"),e.postMessage({type:"currentLocation",data:r},"*")})(),src:t?.src,width:s?.width||0})})})})),hp="burgerMenuDialog",pp=({menuRef:e,centralMenuItem:t,closeAll:n,openDialog:l,locationDialogProps:a})=>{const i=lp(),r=((e,t)=>Boolean(t.find((t=>t.id===e),e)))(hp,i);return[r,{toggle:()=>{r?n():l(o(up,{locationDialogProps:a,menuRef:e,menuItem:t,closeAll:n}),{id:hp})}}]},gp=[],fp=ut((({sticky:e,...t})=>{const{menuItems:n=gp}=e??{},a=n.find((e=>"Меню"===e.title)),r=n.filter((e=>"Меню"!==e.title)),d=Math.floor(r.length/2),m=r.slice(0,d),u=r.slice(d),[h,p]=l(-1),[f,x]=l(""),{open:b,closeAll:y}=de(),v=i((()=>{p(-1),x(""),y()}),[y]),N=tn(v),w=s(null),[k,{toggle:S}]=pp({menuRef:w,centralMenuItem:a,closeAll:y,openDialog:b,locationDialogProps:t.header}),[{openBottomMenuItemDialog:C}]=tp({menuRef:w,dialogRef:N,closeDialog:v,openDialog:b,leftItems:m,rightItems:u}),T=i((e=>{v(),e.stopPropagation(),S()}),[v,S]),I=i(((e,t)=>{x(t),p(e),y(),C(e,t)}),[y,C]);return o(g,{className:"h-[74px] z-[100] relative",defaultPadding:"p-0",...t,children:c("div",{ref:w,className:"ml-auto container bg-white flex justify-center shadow-blue-gray",children:[m.map(xp(I,"left",{activeIndex:h,currentItemPosition:f})),o(Qh,{item:a,isActive:k,onClick:e=>T(e)}),u.map(xp(I,"right",{activeIndex:h,currentItemPosition:f}))]})})})),xp=(e,t,n)=>(l,a,i)=>o(Qh,{item:l,isActive:i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t,onClick:r=>{i[n.activeIndex]?.title===l?.title&&n.currentItemPosition===t||r.stopPropagation(),e(a,t)}},l.title||String(a)),bp="hidden sm:flex absolute z-40",yp={default:{item:"flex-1",gap:0,buttonTop:"top-0"},animated:{item:"flex",gap:8,buttonTop:"top-5"},underlined:{item:"",gap:0,buttonTop:"top-0"}},vp=d((({className:e,items:t=[],activeItem:n,onChange:l,tabsType:i="default"})=>{const[r,s]=Fr({itemCount:t?.length||0});return a((()=>Np(r.current,t,n)),[]),c("div",{className:u("relative overflow-x-auto no-scrollbar",e),children:[o(Cr,{containerRef:r,snapAlign:"snap-start",onVisibleIndicesChange:s.handleVisibleIndicesChange,itemClassName:yp[i].item,gap:yp[i].gap,children:t.map($m(n,l,i))}),s.canScrollLeft?o(Ur,{className:u("left-6",bp,yp[i].buttonTop),onClick:s.scrollLeft}):null,s.canScrollRight?o(qr,{className:u("right-6",bp,yp[i].buttonTop),onClick:s.scrollRight}):null]})})),Np=(e,t,n)=>{const l=t.findIndex((e=>e===n));e&&l>0&&e.scrollTo({left:e?.children[l]?.offsetLeft,behavior:"smooth"})},wp={default:{wrapper:"",component:""},animated:{wrapper:"border-b-8 border-primary-main bg-white",component:"m-auto"},underlined:{wrapper:"flex",component:"m-auto"}},kp=({className:e="",tabsType:t="animated",...n})=>t?o("div",{className:u(wp[t].wrapper,e),children:o(vp,{className:wp[t].component,tabsType:t,...n})}):null,Sp=ut((({className:e="",tabs:t=[],block:n,tabsType:r,showCounter:s=!1,isSticky:d=!1,...m})=>{const h=Cp(n??{}),p=V(),f=t.every((e=>"link"===e?.type)),x=s?t.map((e=>({...e,count:"group"===e?.type?n?.slots?.[e?.tabName??""]?.length??0:0}))):t,{isReady:b}=p,[y,v]=l(Bp(x,((e="")=>{const t=globalThis?.location?.href;return t?new URL(t).searchParams.get(e):null})(h))),N=x[y],w=x.findIndex((e=>Boolean(e.selected)));a((()=>{const e=p.query[h]?x.findIndex(((e,t)=>"group"===e.type&&(e?.tabName??String(t))===p.query[h])):w;v(-1===e?0:e)}),[b,w,h]);const k=Ip(x[y],y),S=i((e=>{const t=x.indexOf(e),n=x[t];v(t),"group"===n.type&&((e,t)=>{const n=new URLSearchParams(p.query);e.text?n.set(h,e?.tabName??String(t)):n.delete(h),p.replace(`${p.pathname}?${n}`,"",{scroll:!1})})(e,t)}),[x]);return c(g,{className:u({"sticky top-1 z-20":d&&f},e),defaultPadding:"p-0",block:n,...m,children:[kp({className:u({"pb-1":n?.slots&&"default"===r,"sticky top-1 z-20":d&&!f}),items:Tp(t,x),activeItem:N,tabsType:r,onChange:S}),o("div",{className:"space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:Object.entries(n?.slots??{}).map((([e,t])=>M(t,{...m?.options,slotName:k,parent:n,extraProps:{className:e===k?"":"hidden"}})))})]})}),{slots:({tabs:e})=>e?.map(Ip)?.filter(Boolean)||[]}),Cp=({__id:e,anchor:t})=>t??e??"tabs",Tp=(e,t)=>t?.length?t:e,Ip=(e,t)=>"group"===e?.type?e?.tabName||`Слот №${t+1}`:"",Bp=(e,t)=>t?Number(t):e.reduce(((e,t,n)=>t.selected?n:e),0),Pp={comparison:"flex gap-m duration-1000",tariff:"flex gap-5xl flex-grow duration-1000"},Mp=d((({children:e,activeIndex:t,columnWidth:n,version:l="comparison"})=>o("div",{className:"flex flex-1 overflow-hidden",children:o("div",{className:Pp[l],style:{transform:`translateX(-${t*n}px)`},children:e})}))),Rp=d((({className:e="",isOpen:t,onClick:n})=>o(be,{className:e,appendRight:o(ne,{image:{icon:t?"ArrowUpIcon":"ArrowDownIcon"},width:"24",height:"24"}),text:t?"Скрыть":"Показать",version:"gray",onClick:n}))),Vp={Buttons:({buttons:e})=>Ee(e,{buttonClassName:"basis-0"}),Img:({image:e})=>e?.src?o(ne,{image:e}):null,RichText:({__html:e,isDotted:t=!0})=>o("div",{className:"flex flex-col justify-between items-start text-h6",children:o(Pe,{__html:e,isDotted:t,itemSize:"list-m"})}),LabelDescription:({label:e,description:t})=>c("div",{className:"space-y-2xs",children:[e?o("div",{children:o(Re,{size:"text-h6",children:e})}):null,t?o("div",{className:"lg:text-l font-light text-xs",children:o(Re,{color:"text-secondary-text",children:t})}):null]}),Table:({isVisible:e,displayTable:t,tableSource:n,pdfUrl:l,isOpen:a})=>e?o(Rp,{className:"w-fit",isOpen:a,onClick:()=>{t({tableSource:n,pdfUrl:l})}}):null},Dp=d((({cell:e,fieldIdx:t,rowIdx:n,cellIdx:i,setTableInner:r,tableInner:s,openTableInnerIdx:o,setOpenTableInnerIdx:c})=>{const[d,m]=l(!0);a((()=>{i===o&&s||m(!0)}),[s,o]);return zp({cell:e,cellProps:{rowIdx:n,cellIdx:i,fieldIdx:t,displayTable:e=>{m(!1),c(i),r(e)},isVisible:d}})})),zp=({cell:e,cellProps:t})=>{if(!e)return null;const{tableCellType:n,...l}=e;if(!n||!(n in Vp))return null;return o(Vp[n],{...t,...l})},Ap=d((({cells:e,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r})=>o("div",{className:"w-80 flex-grow flex flex-col gap-m @4xl:gap-lg",role:"cell",children:e?.length?e.map(((e,s)=>o(Dp,{cell:e,fieldIdx:s,rowIdx:t,cellIdx:n,setTableInner:l,tableInner:a,openTableInnerIdx:i,setOpenTableInnerIdx:r},String(s)))):null}))),_p=(e,t)=>140*((e=[])=>e.reduce(((e,t)=>e+t),0))(e.slice(0,t).map((e=>e?.cols?.length??1))),Op=(e,t)=>e?.length>0?o("div",{className:u("flex",{"text-secondary-text":0===t}),children:e.map(((e,t)=>o("div",{className:"w-20 mx-lg",children:o(Re,{size:"text-h6",font:"font-light",children:e})},String(t))))}):null,Fp=d((({rows:e})=>{return o(Cr,{visibleItemCount:0,snapAlign:"snap-start",children:o("div",{children:e?.map((t=0,(e,n)=>{if(!e?.length)return null;const[l,...a]=e,i=u("flex duration-1000 text-center",0!==n?"font-normal":"font-light");return c("div",{className:"flex border-main-divider border-b border-solid h-full",children:[l?.data?o("div",{className:"whitespace-pre-wrap sm:whitespace-normal w-48 sm:w-56 sm:min-w-56 py-lg pr-lg sm:pr-0",children:o(Re,{size:"text-xl",font:"font-light",children:l.data})}):null,o("div",{className:"flex flex-grow overflow-hidden",children:o("div",{className:i,style:{transform:`translateX(-${_p(a,t)}px)`},children:a?.map(((e,n)=>c("div",{className:"flex flex-col flex-grow gap-s justify-center py-xl odd:bg-main-divider",children:[e?.data?o(Re,{size:"text-xl",children:e.data}):null,e?.cols?Op(e.cols,t):null]},`row${n}`)))})})]},String(n))}))})});var t})),Ep=d((({activeTabIndex:e,items:t})=>o("div",{children:t.map(((t,n)=>{const l=`activeTabIdx:${e}-tableIdx:${n}`;return c("div",{className:"w-full @container",children:[o("div",{className:"flex py-m sm:px-m bg-white @4xl:bg-gray relative",children:o(Re,{size:"text-xl",align:"text-left",children:t.title})}),o("div",{className:"w-full sm:pl-xs overflow-hidden transition-height duration-500 ease-in-out",children:o("div",{className:"relative",children:o(Fp,{rows:t.rowsData})})})]},l)}))}))),jp=(e=!1)=>""+(e?"text-white":"text-secondary-text"),Lp=d((({currencies:e,linkToPDF:t,activeTabIndex:n,setActiveTabIndex:l})=>c("div",{className:"flex justify-between items-center w-full py-lg",children:[e&&e.length>1?o("div",{className:"flex bg-secondary-light p-2xs rounded-md",children:e.map(((e,t)=>o("div",{className:u("rounded-md px-4 py-3 cursor-pointer",{"bg-primary-main":t===n}),onClick:()=>l(t),children:o(Re,{size:"text-xl",font:"font-light",color:jp(t===n),children:e||t+1})},e)))}):null,t?o(be,{className:"text-primary-main",href:t,version:"link",target:"_blank",appendLeft:o(W,{name:"DocDownloadIcon",iconVersion:"color",className:"mr-3xs",width:"20",height:"20"}),text:"Скачать в PDF"}):null]}))),$p=ut((({tableSource:e,pdfUrl:t,onClick:n})=>{const a=e?.tableData,[r,s]=l(0),d=i((e=>s(e)),[]),m=a?.[r]?.items??[],u=a?.map((e=>e.currency??""));return c("div",a?{className:"bg-white z-10",children:[o(Lp,{currencies:u,activeTabIndex:r,setActiveTabIndex:d,linkToPDF:t}),o(Ep,{activeTabIndex:r,items:m}),o(Rp,{className:"mt-xl",onClick:n,isOpen:!0})]}:{className:"my-lg space-y-m text-center",children:[o(Re,{size:"text-h6",children:"Данных нет"}),o(Rp,{onClick:n,isOpen:!0})]})})),Up=d((({children:e,tableInner:t,onHideContentClick:n})=>c("div",{className:"self-start flex flex-col",role:"row",children:[o("div",{className:u("@4xl:border-main-divider @4xl:border-b","flex flex-col @4xl:flex-row gap-y-xs gap-x-5xl pb-lg @4xl:pt-lg"),children:e}),t?o("div",{className:"origin-top animate-expansion",children:o($p,{...t,onClick:n})}):null]}))),qp=d((({row:{header:e,data:t},activeIndex:n,rowIdx:a,...r})=>{const[s,d]=l(void 0),m=i((e=>d(e)),[]),[h,p]=l(void 0),g=i((e=>p(e)),[]);return c(Up,{onHideContentClick:()=>d(void 0),tableInner:s,...r,children:[o("div",{className:u("text-s","w-80 flex-shrink-0"),children:c("div",{className:"flex gap-m items-center",role:"cell",children:[e?.icon?o(ne,{className:"hidden @4xl:block max-w-6 shrink-0",image:e.icon,width:"24",height:"24"}):null,e?.title?o(Re,{size:"text-m",font:"font-light",color:"text-primary-text",children:e?.title}):null]})}),t?.length?o(Mp,{activeIndex:n,columnWidth:360,version:"tariff",children:t.map(((e,t)=>o(Ap,{cells:e,rowIdx:a,cellIdx:t,setTableInner:m,tableInner:s,openTableInnerIdx:h,setOpenTableInnerIdx:g,...r},String(t))))}):null]})}));function Wp({dec:e,inc:t,canDec:n,canInc:l,btnClass:a,className:i=""}){return n||l?c("div",{children:[n?o($r,{className:u("absolute z-40",a[0],i),onClick:e,ariaLabel:"Пролистать влево","data-block-control":"scroll-left",disabled:!n}):null,l?o($r,{className:u("absolute z-40 rotate-180",a[1],i),onClick:t,ariaLabel:"Пролистать вправо","data-block-control":"scroll-right",disabled:!l}):null]}):null}const Hp=d((({children:e,controls:t})=>{const{isScrollAvailable:n}=t;return c("div",{role:"table",className:"overflow-x-auto w-auto grid md:block",children:[c("div",{className:"relative space-y-xs",children:[e,Wp({...t,btnClass:["top-28","top-11"],className:"right-7"})]}),n?o("div",{className:"absolute top-0 right-0 bottom-0 w-20 bg-opacity-to-white"}):null]})})),Yp=d((({className:e="",title:t,description:n,rowHeaders:a,tariffsColumns:r,hiddenRowsNum:s=0,...d})=>{const m=r?.map((({data:e})=>e))||[],h=a?.map(((e,t)=>({header:e,data:m.map((e=>e?.[t]||[]))}))),p=m.length,[f,x]=((e,t=0)=>{const{itemCount:n,visibleItemCount:a}=e,[r,s]=l(t),o=i((()=>s((e=>Math.min(e+1,n-1)))),[n]),c=i((()=>s((e=>Math.max(e-1,0)))),[n]),d=a?n>a&&r<n-a:r<n-1,m=r>0;return[r,{inc:o,dec:c,canInc:d,canDec:m,isScrollAvailable:m||d}]})({itemCount:p,visibleItemCount:2}),b=(h||[]).map(((e,t)=>o(qp,{row:e,activeIndex:f,rowIdx:t,...d},String(t)))),[y,v]=s>0?[b.slice(0,-s),b.slice(-s)]:[b,[]];return c(g,{className:u("relative space-y-6xl @4xl:space-y-xl",e),defaultPadding:"p-6xl",...d,children:[o(C,{title:t,description:n,headlineVersion:"M",isEmbedded:!0,align:"text-center"}),o("div",{className:"space-y-m overflow-hidden",children:s>0?o(zi,{renderFoldableSection:({isUnfolded:e})=>c(Hp,{controls:x,children:[y,o(Ai,{isUnfolded:e,children:v})]}),renderFoldButton:es}):o(Hp,{controls:x,children:b})})]})})),Kp=d((({className:e="",title:t,description:n,iconVersion:l,__html:a,richVersion:i,...r})=>c(g,{className:u("flex gap-s sm:gap-m bg-white group-data-secondary:bg-primary-main/10",e),...r,children:["small"===l?Xp():null,c("div",{className:"flex flex-col w-fit gap-2xs sm:gap-xs",children:[t?o(Re,{size:"text-l",font:"font-normal",color:"text-primary-text group-data-secondary:text-white",children:t}):null,n?Gp(n):null,a?o(Pe,{richVersion:i,__html:a}):null]})]}))),Xp=()=>o("div",{className:"rounded-full h-4 w-4 text-center text-xs font-light bg-primary-main text-white group-data-secondary:bg-white group-data-secondary:text-primary-main",children:"i"}),Gp=e=>o(k,{size:"text-s",font:"font-light",color:"text-secondary-text group-data-secondary:text-white",children:e}),Jp=d((({prefix:e,unit:t,suffix:n})=>c("div",{className:"w-full flex items-end",children:[e?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:e})}):null,t?o("div",{className:"-mb-6 @xl:-mb-4",children:o("span",{className:"font-mohave text-title-large sm:text-title-extra gradient-color-text",children:t})}):null,n?o("div",{className:"gradient-color-text",children:o(Re,{size:"text-h2",children:n})}):null]}))),Zp=d((e=>{const{prefix:t,unit:n,suffix:l,...a}=e;return o(g,{defaultPadding:"p-0",...a,children:o(Jp,{prefix:t,unit:n,suffix:l})})})),Qp={AdTile:pt,ApplicationForm:Pi,ApplicationLeadForm:fr,BankAccountFiltration:bs,BenefitsBlock:ks,BonusBenefitsBlock:Ts,ButtonsBlock:Bs,CalculatorBonus:Us,CalculatorBusinessDeposit:oo,CalculatorCredit:So,CalculatorDeposit:$o,CalculatorRefinancing:Go,CardTransfer:lc,Carousel:mc,CarouselCard:gc,CarouselCatalogCard:xc,CarouselLinks:vc,CarouselRecommendationCard:Bc,CarouselTariffsCard:Rc,DepositFiltration:Oc,Depository:ed,ErrorBlock:nd,ExchangeRateTile:Pd,Footer:Gd,GrantSupport:Jd,Header:lm,Headline:C,HorizontalLayout:sm,ImgBlock:om,LinkDocs:bm,MobileAppTile:wm,MortgageFiltration:Wm,OfficesAtmsMap:xh,Placeholder:bh,ProductBlock:ht,ProductGallery:yh,RepresentativeOfficeInfo:vh,RichTextBlock:kh,RollupItem:Od,SafeDepositRental:qh,StepsBlock:Zh,StickyBottomMenu:fp,TabsLayout:Sp,TariffsTable:Yp,TextBlock:Kp,UnitBlock:Zp,VerticalLayout:rm},eg=me((()=>{a((()=>{Ct()}),[]);const e=Dt();en(globalThis,"click",(e=>t=>{const n=t.target?.closest("[data-aspects]");try{const l=JSON.parse(n?.dataset?.aspects??"[]");kt({aspectsAttributes:l,aspects:e,ev:t})}catch(e){}e.forwardQuery?.(t)})(e))}));const tg="cookie",ng=d((({__html:e})=>{const[t,{setTrue:n,setFalse:l}]=Qt();!function(e,t,n=300){a((()=>{const t=globalThis.setTimeout(e,n);return()=>{globalThis.clearTimeout(t)}}),t)}((()=>{globalThis.localStorage?.getItem(tg)||n()}),[],3e3);const r=i((()=>{globalThis.localStorage?.setItem(tg,"true"),l()}),[]);return t&&e?o("div",{className:"container fixed left-0 right-0 bottom-0 z-50",role:"dialog",children:c("div",{className:"bg-white m-xl p-xl rounded-md flex sm:items-center shadow-main-black",children:[o("div",{className:"sm:flex-1",children:o(Pe,{__html:e})}),o("div",{className:"ml-s sm:ml-0 w-36 flex justify-end",children:o(fi,{className:"bg-main-gray rounded-md w-11 h-11",onClose:r})})]})}):null})),lg=d((()=>{const e=i((e=>{for(const t of e)t?.onClose&&t.onClose()}),[]),t=i((e=>{e?.onClose&&e.onClose()}),[]),n=lp({onCloseAll:e,onClose:t}),{close:l}=de(),r=i((({key:e})=>{"Escape"===e&&l()}),[]);return en(globalThis.document,"keydown",r),a((()=>{n.length?(globalThis.document?.body.classList.add("no-scrollbar"),globalThis.document?.body.classList.add("overflow-hidden")):(globalThis.document?.body.classList.remove("no-scrollbar"),globalThis.document?.body.classList.remove("overflow-hidden"))}),[n]),n.length?o("div",{className:"fixed inset-0 z-50",role:"dialog",children:n.map((({dialog:e,id:t},l)=>o("div",{className:u("absolute inset-0 overflow-x-hidden overflow-y-scroll no-scrollbar bg-black/50",{hidden:l!==n.length-1}),children:e},String(t||l))))}):null})),ag=d((()=>{const[e,t]=l(null),n=i((()=>{t(null)}),[]);a((()=>ce.subscribe("popup",(e=>{switch(e.type){case"open":case"update":t(e);break;case"close":n();break;default:np(e)}}))),[]);const r=i((({key:e})=>{"Escape"===e&&n()}),[n]);return en(globalThis.document,"keydown",r),e?o("div",{className:u("z-50",e.fixed?"fixed":"absolute"),style:{left:`${e.left}px`,top:`${e.top}px`,...e.width?{width:`${e.width}px`}:{}},role:"dialog",children:e.popup}):null})),ig="header",rg="footer",sg="sticky-footer",og={},cg=d((({className:e,data:t=og,blocksRegistry:n,blockDecorator:l})=>{const{slots:a,blocks:i,fallback:r,...s}=t,d=mt(s,r);eg();const m={key:"",page:{slots:a,blocks:i,fallback:r,...d},blocksRegistry:n,blockDecorator:l,parent:t};return c("div",{"data-theme":t.colorPalette||"pc",children:[c("section",{className:u("@container relative",t.style,e),children:[a?.header?.length?o("div",{className:"relative z-10 mb-lg shadow-[0_8px_32px_0px_#00000014]",children:M(a?.header,{...m,slotName:ig})}):null,c("div",{className:"container space-y-px @5xl:space-y-0 @5xl:grid @5xl:grid-cols-12 @5xl:gap-2xs",children:[R({block:t,options:m,extraProps:{className:"scroll-mt-12"}}),M(a?.footer,{...m,slotName:rg})]})]}),a?.["sticky-footer"]?.length?o("div",{className:"fixed w-full bottom-0 left-0 z-[100]",children:M(a?.["sticky-footer"],{...m,slotName:sg})}):null,o(lg,{}),o(ag,{}),o(ng,{__html:d?.cookieContent?.__html})]})}));Object.assign(cg,{childrenTypes:[],slots:()=>[ig,rg,sg]});e.Blocks=Qp,e.ContentPage=cg,e.handlerDecorator=me,e.joinList=rs,e.packageVersion="0.14.589",e.projectSettings=z,e.setup=(e,t)=>{globalThis._uni={_jsx:e,_jsxs:t||e}},e.setupHooks=e=>{t=e},e.url=j,e.useRouter=V,Object.defineProperty(e,"__esModule",{value:!0})}));
|