PageSourceSearch

https://r.drom.ru/js/bundles/43712.401b0a9134484c53.1.js

js drom.ru collected 2026-09-24 18:00:58 UTC 47,600 bytes, 26 lines download raw bytes

1try{!function(){var e="u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{},t=(new e.Error).stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="fb55ce57-8218-4c8a-940b-c0b3cf5b9ff6",e._sentryDebugIdIdentifier="sentry-dbid-fb55ce57-8218-4c8a-940b-c0b3cf5b9ff6")}()}catch(e){}try{("u">typeof window?window:"u">typeof global?global:"u">typeof globalThis?globalThis:"u">typeof self?self:{}).SENTRY_RELEASE={id:"bcdbdce2870cd45d56228836b05c7d4fefac18d5"}}catch(e){}"use strict";(self.__LOADABLE_LOADED_CHUNKS__=self.__LOADABLE_LOADED_CHUNKS__||[]).push([[43712],{757977:function(e,t,o){o.d(t,{CH:function(){return"gejgad2"},SG:function(){return"gejgad4"},c9:function(){return"gejgad1"},dI:function(){return"gejgad0"},vr:function(){return"gejgad5"},yJ:function(){return"gejgad3"}})},555380:function(e,t,o){e.exports=o.p+"media/photo-processing.41e084247bbfae8d.svg"},334829:function(e,t,o){var r=o(417178);t.A=e=>{let t=`https://api.drom.ru/v1.4/${e.type}/${e.id}/photos`,o=e=>`${t}/${e}`;return{reorder:{url:`${t}/order`,headers:{Authorization:r.k,"Content-Type":"application/json"},method:"PUT"},upload:{url:t,headers:{Authorization:r.k},method:"POST"},deleteAll:{url:t,headers:{Authorization:r.k},method:"DELETE"},check:{url:e=>o(e),headers:{Authorization:r.k},method:"GET"},delete:{url:e=>o(e),headers:{Authorization:r.k},method:"DELETE"},rotate:{url:e=>`${o(e)}/rotate`,headers:{Authorization:r.k},method:"PUT"}}}},627638:function(e,t,o){var r=o(693094),n=o(953599);let i={"1x1":"padding-top: 100%;","3x2":"padding-top: 66.66%;","4x3":"padding-top: 75%;","7x6":"padding-top: 87.1%;","5x2":"padding-top: 40%;","2x1":"padding-top: 50%","16x9":"padding-top: 56.25%"},s=e=>(0,n.AH)(e,"{position:absolute;top:0;left:0;}"),a=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"& > *";return(0,n.AH)("position:relative;&::before{content:'';display:block;",i[e],"}",s(t))};t.Ay=(0,r.A)("div",{target:"e9e4nvu0"})(e=>{let{aspectRatio:t}=e;return t&&a(t)}),o.d(t,{},{DY:s,bn:a})},498375:function(e,t,o){var r=o(898040),n=o(835076),i=o(953599),s=o(693094),a=o(450023),l=o(627638),p=o(457128),c=o(84249),d=o(409168);let u=(0,s.A)(c.A,{target:"e1uutnyc0"})(e=>{let{layer:t,blurValue:o}=e;return(0,i.AH)("z-index:",1===t?2:1,";",2===t&&"transform: scale(1.1);","        filter:blur(",o,");position:absolute;top:0;right:0;bottom:0;left:0;")}),h=(0,s.A)(l.Ay,{target:"e1uutnyc1"})("height:100%;overflow:hidden;tranform:translateZ(0);::after{z-index:2;}",e=>{let{overlayColor:t}=e;return t&&(0,p.W)(t)}," ",e=>{let{radiusLevel:t}=e;return t&&d.Vg[t].radiusStyle});t.A=(0,n.forwardRef)((e,t)=>{let{src:o,src2x:n,blurValue:i,...s}=e,l=n?(0,a.A)(o,n):void 0;return(0,r.jsxs)(h,{...s,children:[(0,r.jsx)(u,{blurValue:i,layer:1,src:o,srcSet:l,ref:t}),(0,r.jsx)(u,{blurValue:i,layer:2,src:o,srcSet:l})]})})},66559:function(e,t,o){var r=o(693094),n=o(953599);t.A=(0,r.A)("div",{target:"ekfpm3y0"})("min-width:0;",e=>{let{grow:t,noShrink:o,flex:r,fillHorizontally:i,cols:s,alignSelf:a}=e;return(0,n.AH)`
2        ${t&&"flex-grow: 1;"}
3        ${o&&"flex-shrink: 0;"}
4        ${r&&`flex: ${r};`}
5        ${i&&"flex: 100% 0 0;"}
6        ${s&&`
7    flex: 0 0 ${(100/s).toFixed(2)}%;
8    max-width: ${(100/s).toFixed(2)}%;
9`}
10        ${a&&`align-self: ${a};`}
11    `})},868303:function(e,t,o){o.d(t,{A:function(){return y},l:function(){return v}});var r=o(898040),n=o(835076),i=o(470678),s=o(377174),a=o(212573),l=o(802580),p=o(953599),c=o(906324),d=o.p+"media/arrow.5046d24ec077d898.svg",u=o.p+"media/close.cac406ba5c48dd7d.svg",h=o.p+"media/zoom-in.195f44471fcf6557.svg",g=o.p+"media/zoom-out.5a1a76e0e1ce519f.svg",w=o.p+"media/fullscreen-in.0829845bab6fd2f1.svg",f=o.p+"media/fullscreen-out.0b4ad55630d955f9.svg";let m="333ms";var b=e=>(0,r.jsx)(p.mL,{styles:[(e=>{let{zIndex:t=1500,extendedCss:o=(0,p.AH)()}=e;return(0,p.AH)(".pswp{--pswp-bg:#000;--pswp-placeholder-bg:#222;--pswp-root-z-index:",t,";--pswp-preloader-color:rgba(79,79,79,0.4);--pswp-preloader-color-secondary:rgba(255,255,255,0.9);--pswp-icon-color:#fff;--pswp-icon-color-secondary:#4f4f4f;--pswp-icon-stroke-color:#4f4f4f;--pswp-icon-stroke-width:2px;--pswp-error-text-color:var(--pswp-icon-color);}.pswp{position:fixed;top:0;left:0;width:100%;height:100%;z-index:var(--pswp-root-z-index);display:none;touch-action:none;outline:0;opacity:0.003;contain:layout style size;-webkit-tap-highlight-color:rgba(0,0,0,0);}.pswp:focus{outline:0;}.pswp *{box-sizing:border-box;}.pswp img{max-width:none;}.pswp--open{display:block;pointer-events:all;}.pswp,.pswp__bg{transform:translateZ(0);will-change:opacity;}.pswp__bg{opacity:0.005;background:var(--pswp-bg);}.pswp,.pswp__scroll-wrap{overflow:hidden;}
11.pswp__scroll-wrap,.pswp__bg,.pswp__container,.pswp__item,.pswp__content,.pswp__img,.pswp__zoom-wrap{position:absolute;top:0;left:0;width:100%;height:100%;}.pswp__img,.pswp__zoom-wrap{width:auto;height:auto;}.pswp--click-to-zoom.pswp--zoom-allowed .pswp__img{cursor:zoom-in;}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img{cursor:move;cursor:grab;}.pswp--click-to-zoom.pswp--zoomed-in .pswp__img:active{cursor:grabbing;}.pswp__container,.pswp__img,.pswp__button,.pswp__counter{user-select:none;}.pswp__item{z-index:1;overflow:hidden;}.pswp__hidden{display:none !important;}.pswp__content{pointer-events:none;}.pswp__content > *{pointer-events:auto;}.pswp__error-msg-container{display:grid;}.pswp__error-msg{margin:auto;font-size:1em;line-height:1;color:var(--pswp-error-text-color);}.pswp .pswp__hide-on-close{opacity:0.005;will-change:opacity;transition:opacity var(--pswp-transition-duration) cubic-bezier(0.4,0,0.22,1);z-index:10;pointer-events:none;}.pswp--ui-visible .pswp__hide-on-close{pointer-events:auto;}.pswp--ui-visible.pswp--touch .pswp__hide-on-close{opacity:1;}.pswp--ui-visible:not(.pswp--touch) .pswp__hide-on-close{opacity:1;transition:opacity ",m," ease-out;}.pswp--ui-visible:not(.pswp--touch):hover .pswp__hide-on-close{opacity:1;&.pswp__button,& .pswp__button{opacity:0.75;transition:opacity ",m," ease-out;&:hover{opacity:1;}}}.pswp__button{position:relative;display:block;width:40px;height:40px;padding:0;margin:0;overflow:hidden;cursor:pointer;background:none;border:0;box-shadow:none;opacity:0.85;appearance:none;-webkit-touch-callout:none;}.pswp__button:hover,.pswp__button:active,.pswp__button:focus{transition:none;padding:0;border:0;box-shadow:none;opacity:1;}.pswp__button:disabled{opacity:0.3;cursor:auto;}.pswp__icn{fill:var(--pswp-icon-color);color:var(--pswp-icon-color-secondary);display:none;}.pswp__icn{position:absolute;top:10px;left:10px;width:20px;height:20px;overflow:hidden;pointer-events:none;}.pswp__icn-shadow{stroke:var(--pswp-icon-stroke-color);stroke-width:var(--pswp-icon-stroke-width);fill:none;}.pswp__icn:focus{outline:0;}div.pswp__img--placeholder,.pswp__img--with-bg{background:var(--pswp-placeholder-bg);}.pswp__top-bar{position:absolute;left:0;right:0;top:0;padding:0 10px;height:40px;display:flex;flex-direction:row;justify-content:flex-end;background-color:rgba(0,0,0,0.5);z-index:11 !important;pointer-events:none !important;}.pswp__top-bar > *{pointer-events:auto;will-change:opacity;}.pswp__button--close::before{content:'';display:block;width:20px;height:20px;background:url(",u,");position:absolute;top:10px;left:10px;}.pswp__button--arrow{position:absolute;top:0;height:100%;width:75px;}.pswp__button--arrow:disabled{display:none;cursor:default;}.pswp__button--arrow::before{content:'';display:block;position:absolute;top:50%;margin-top:-20px;width:23px;height:40px;background:url(",d,");}.pswp--one-slide .pswp__button--arrow{display:none;}.pswp--touch .pswp__button--arrow{visibility:hidden;}.pswp--has_mouse .pswp__button--arrow{visibility:visible;}.pswp__button--arrow--prev{right:auto;left:0px;background:linear-gradient(to right,rgba(0,0,0,0.3) 2%,rgba(0,0,0,0) 73%);}.pswp__button--arrow--prev::before{left:20px;transform:scale(-1,1);}.pswp__button--arrow--next{right:0px;background:linear-gradient(to left,rgba(0,0,0,0.3) 2%,rgba(0,0,0,0) 73%);}.pswp__button--arrow--next::before{left:auto;right:20px;}.pswp__button--zoom{display:none;}.pswp--zoom-allowed .pswp__button--zoom{display:block;&::before{content:'';display:block;position:absolute;top:10px;left:10px;width:20px;height:20px;background:url(",h,");}}.pswp--zoomed-in .pswp__button--zoom::before{background:url(",g,");}.pswp__preloader{position:relative;overflow:hidden;width:50px;height:60px;margin-right:auto;}.pswp__preloader .pswp__icn{opacity:0;transition:opacity 0.2s linear;animation:pswp-clockwise 600ms linear infinite;}.pswp__preloader--active .pswp__icn{opacity:0.85;}@keyframes pswp-clockwise{0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}}.pswp__counter{height:30px;margin:5px 0 0 10px;font-size:14px;line-height:30px;color:var(--pswp-icon-color);text-shadow:1px 1px 3px var(--pswp-icon-color-secondary);opacity:0.85;}.pswp--one-slide .pswp__counter{display:none;}.pswp__button--fs{display:none;}.pswp--supports-fs .pswp__button--fs{display:block;background:url(",w,") no-repeat center;}.pswp--fs .pswp__button--fs{background:url(",f,") no-repeat center;}.pswp__processIndicator{z-index:11 !important;pointer-events:none !important;position:absolute;top:0;right:0;bottom:0;left:0;}.pswp__uploaderControls{display:flex;justify-content:center;position:absolute;bottom:0;left:0;z-index:11 !important;width:100%;padding:10px;box-sizing:border-box;background:rgba(0,0,0,0.5);& > *:not(:last-of-type){margin-right:40px;}",c.Hw,"{justify-content:space-between;& > *{margin-right:0;}}}",o)})(e)]});let x={name:"fullscreen",ariaLabel:"Полноэкранный режим",title:"Полноэкранный режим",order:10,isButton:!0,className:"pswp__button--fs",appendTo:"bar",onInit(e,t){(0,a.A)()&&t.element?.classList.add("pswp--supports-fs")},onClick(e,t,o){e.preventDefault();let r=(0,a.A)();r&&(r.isFullscreen()?(r.exit()??Promise.resolve()).then(()=>{o.element?.classList.remove("pswp--fs")}).catch(console.error):o.element&&(r.request(o.element)??Promise.resolve()).then(()=>{o.element?.classList.add("pswp--fs")}).catch(console.error))}},v="drom-gallery";var y=e=>{let{id:t,children:o,options:a,onOpen:p=s.A,onBeforeOpen:c,galleryStyles:d,uiElements:u=[],dataSource:h,className:g}=e,w=(0,l.A)(),f=(0,n.useMemo)(()=>({showHideOpacity:!0,bgOpacity:1,preload:[1,3],secondaryZoomLevel:e=>w?e.initial<.7?1:1.5:2,imageClickAction:"next",tapAction:"next",getViewportSizeFn:()=>({x:window.innerWidth,y:window.innerHeight}),arrowPrevTitle:"Назад",arrowNextTitle:"Вперед",closeTitle:"Закрыть (Esc)",zoomTitle:"Приблизить/отдалить",errorMsg:"Изображение не загружается, попробуйте перезагрузить страницу.",...a}),[a,w]),m=(0,n.useMemo)(()=>[x].concat(u),[u]);return(0,r.jsxs)("div",{className:g,children:[(0,r.jsx)(b,{...d}),(0,r.jsx)(i.Z2,{id:t,onOpen:p,options:f,uiElements:m,onBeforeOpen:c,dataSource:h,children:o})]})}},726812:function(e,t,o){o.d(t,{A:function(){return ev}});var r=o(898040),n=o(835076),i=o(31285),s=o(543470),a=o(377174),l=o(964682),p=o(672715),c=o(77732),d=o(673643),u=o(771674),h=o(254177),g=o(440817),w=o(592279);let f=0,m=()=>({imageId:f-=1,srcWidth:0,srcHeight:0,src:"",thumb:g.u,sources:{},isProcessing:!0,id:(0,w.A)(),isLocal:!0,showProgress:!0,isDeleting:!1,isEditing:!1}),b=(0,h.A)(e=>`${e} фотографию`,e=>`${e} фотографии`,e=>`${e} фотографий`);var x=o(533606),v=e=>{let t=(0,n.useRef)([]),o=(0,n.useRef)(!1),r=(0,n.useCallback)(()=>
11{if(0===t.current.length){o.current=!1;return}e(t.current.shift()).finally(()=>{setTimeout(r,0)})},[e]);return[(0,n.useCallback)(e=>{t.current.push(e),o.current||(o.current=!0,setTimeout(r,0))},[r]),(0,n.useCallback)(()=>{t.current=[]},[])]},y=o(526727),_=o(868303),A=o(591622),k=o(680849),j=o(558623),P=o(802580),C=o(693094),D=o(953599),z=o(710700),T=o(906324),I=o(463639),S=o(344315),E=o(232507),L=o(874090),H=o(415416),$=o(594754),F=o(397264);let N=(0,C.A)("span",{target:"ei23v2o0"})("position:relative;display:inline-flex;align-items:center;padding:10px;font-size:16px;height:40px;min-width:40px;",e=>{let{disabled:t}=e;return t?(0,D.AH)`
12                  color: rgba(255, 255, 255, 0.3);
13                  cursor: default;
14              `:(0,D.AH)`
15                  color: rgba(255, 255, 255, 0.75);
16                  cursor: pointer;
17                  transition: color 0.2s;
18                  ${z.PT} {
19                      color: ${I.O};
20                  }
21              `},"    svg{width:20px;height:20px;margin-right:10px;}",T.Hw,"{svg{margin-right:0;}}"),M={"data-ga-stats-engine":"va","data-ga-stats-track-view":!0,"data-ga-stats-track-click":!0,"data-ga-stats-infinity-tracking":!0},R=e=>{let{short:t,interactional:o}=e,n=(0,H.A)();return(0,r.jsxs)(N,{onClick:o?n:void 0,disabled:!o,...M,"data-ga-stats-name":"button_make_main_photo_from_gallery",children:[!t&&(0,r.jsx)(S.A,{}),"Сделать главной"]})},O=e=>{let{short:t}=e;return(0,r.jsxs)(N,{disabled:!0,children:[!t&&(0,r.jsx)(S.A,{}),"Главная"]})},U=e=>{let{short:t,interactional:o}=e,n=(0,$.A)();return(0,r.jsxs)(N,{onClick:o?n:void 0,disabled:!o,...M,"data-ga-stats-name":"button_delete_photo_from_gallery",children:[(0,r.jsx)(E.A,{}),!t&&"Удалить"]})},V=e=>{let{short:t,interactional:o}=e,n=(0,F.A)();return(0,r.jsxs)(N,{onClick:o?n:void 0,disabled:!o,...M,"data-ga-stats-name":"button_rotate_photo_from_gallery",children:[(0,r.jsx)(L.A,{}),!t&&"Повернуть"]})};var B=e=>{let{el:t}=e,o=(0,P.A)(),{enableMain:n,enableRotate:i}=(0,y.U)(),[s]=(0,k.A)(),a=(0,A.h_)(s.id),l=o&&(0,r.jsx)(N,{disabled:!0}),{isLocal:p}=s;if(p)return null;let{isProcessing:c,isDeleting:d,isEditing:u}=s,h=!c&&!d,g=!u,w=i&&h?(0,r.jsx)(V,{interactional:g,short:o}):l;return(0,j.createPortal)((0,r.jsxs)(r.Fragment,{children:[o&&w,n&&h?(0,r.jsx)(r.Fragment,{children:a?(0,r.jsx)(O,{interactional:!1,short:o}):(0,r.jsx)(R,{interactional:g,short:o})}):l,!o&&w,(0,r.jsx)(U,{interactional:g,short:o})]}),t)},Q=o(14463);let q=(0,C.A)("div",{target:"e7le4vt0"})("position:absolute;width:40px;height:40px;left:50%;top:50%;transform:translate(-50%,-50%);&::after{content:'';display:inline-block;border-radius:100%;border:3px solid;width:100%;height:100%;border-color:rgba(255,255,255,0.6);border-top-color:transparent;animation:",Q.T," 1s infinite linear;box-sizing:border-box;}");var Z=e=>{let{el:t}=e,[o]=(0,k.A)();return o.isLocal||!o.isEditing?null:(0,j.createPortal)((0,r.jsx)(q,{}),t)};let W=m(),X={zIndex:1002};var G=e=>{let{children:t}=e,o=(0,x.I)(),i=(0,n.useRef)(null),s=(0,n.useRef)(null),[a,l]=(0,n.use
21State)(""),p=(0,A.nX)(),c=(0,n.useMemo)(()=>p.findIndex(e=>e.id===a),[a,p]),d=p[c]??W,u=(0,n.useCallback)(e=>{o((e=>{let{pswp:t,setId:o,uploaderControlsRef:r,processIndicatorRef:n}=e;return(e,i,s)=>{s.photoswipeController.setPhotoswipe(t),o(t.currSlide?.data.pid??""),t.on("change",()=>{o(t.currSlide?.data.pid??"")}),t.on("destroy",()=>{r.current=null,n.current=null,o(""),s.photoswipeController.setPhotoswipe(null)})}})({pswp:e,setId:l,uploaderControlsRef:i,processIndicatorRef:s}))},[o]),h=(0,n.useMemo)(()=>[{name:"uploaderControls",appendTo:"wrapper",onInit(e){i.current=e}},{name:"processIndicator",appendTo:"wrapper",onInit(e){s.current=e}}],[]);return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(_.A,{galleryStyles:X,uiElements:h,onOpen:u,children:t}),(0,r.jsxs)(k.h,{value:[d,c],children:[c>-1&&i.current&&(0,r.jsx)(B,{el:i.current}),s.current&&(0,r.jsx)(Z,{el:s.current})]})]})},J=o(454991),K=o(612776),Y=o(470246),ee=o(419483),et=o(89112),eo=o(759103),er=o(930681),en=o(526002),ei=o(846168);class es{routes;progressEventName;constructor(e,t){this.routes=e,this.progressEventName=t}}let ea=e=>{(0,ee.ZV)({event:e})};class el extends es{#e=async e=>{let{url:t,...o}=e;try{let e=await fetch(t,{...o,credentials:"include"}),r=await e.json();if(403===e.status)return er.Q7.error(new c.TV(r.error.userMessage));if(r.success)return er.Q7.ok(r);return er.Q7.error(new c.Uh)}catch(e){if(e instanceof Error&&"AbortError"===e.name)return er.Q7.error(new c.lc);return er.Q7.error(new c.Uh)}};async reorder(e,t,o){try{let t=e.filter(e=>!e.isLocal).map(e=>e.imageId);return this.#e({...this.routes.reorder,body:JSON.stringify({photoIds:t})})}catch(r){return(0,et.v4)(n=>{n.setTag("module","bull-edit-photos"),n.setContext("reorder-error",{photos:e,oldIndex:t,newIndex:o}),(0,eo.Cp)(r)}),er.Q7.error(new c.Uh)}}delete(e){return this.#e({...this.routes.delete,url:this.routes.delete.url(e)})}deleteAll(){return this.#e({...this.routes.deleteAll})}upload(e){let{file:t,photo:o,createCancelUpload:r,orderNumber:n}=e;return new Promise(e=>{let i=new XMLHttpRequest;i.open(this.routes.upload.method||"POST",this.routes.upload.url),i.withCredentials=!0,this.routes.upload.headers&&(0,ei.A)(this.routes.upload.headers).forEach(e=>{let[t,o]=e;i.setRequestHeader(t,o)});let s=new FormData;s.append("image",t),s.append("orderNumber",n.toString()),window.dispatchEvent(new CustomEvent(this.progressEventName,{detail:{id:o.id,progress:0}})),i.onload=()=>{if(200===i.status){let t=JSON.parse(i.response);t.success?ea("upload_success"):ea("upload_error"),e(er.Q7.ok(t))}else{if(ea("upload_error"),[422,403].includes(i.status)){let t=JSON.parse(i.response);e(er.Q7.error(new c.TV(t.error.userMessage)));return}e(er.Q7.error(new c.Uh))}};let a=e=>{window.dispatchEvent(new CustomEvent(this.progressEventName,{detail:{id:o.id,progress:e.loaded/e.total*100}}))};i.upload.onprogress=(0,en.A)(a,300),i.onabort=()=>{e(er.Q7.error(new c.lc))},i.onerror=()=>{ea("upload_error"),e(er.Q7.error(new c.Uh))},ea("upload_start"),i.send(s),r(i)})}check(e,t){return this.#e({...this.routes.check,signal:t,url:this.routes.check.url(e)})}rotate(e){return this.#e({...this.routes.rotate,url:this.routes.rotate.url(e)})}}var ep=class{photoswipe;constructor(){this.photoswipe=null}setPhotoswipe=e=>{this.photoswipe=e};deletePhoto=e=>{if(!this.photoswipe)return a.A;let{dataSource:t}=this.photoswipe.options;if(!Array.isArray(t))return a.A;if(1===t.length)return this.photoswipe.close(),a.A;let o=t.findIndex(t=>t.pid===e);if(o<0)return a.A;let r=t[o];return t.length-1===o&&this.photoswipe.next(),t.splice(o,1),this.photoswipe.currSlide&&this.photoswipe.refreshSlideContent(this.photoswipe.currSlide.index),()=>{this.photoswipe&&Array.isArray(this.photoswipe.options.dataSource)&&(this.photoswipe.options.dataSource.splice(o,0,r),this.photoswipe.refreshSlideContent(o),this.photoswipe.goTo(o))}};updatePhoto=(e,t)=>{if(!this.photoswipe)return;let{dataSource:o}=this.photoswipe.options;if(!Array.isArray(o))return;let r=o.findIndex(t=>t.pid===e);if(r<0)return;let n=o[r],{src:i,width:s,height:a}=t;n.src=i,n.msrc=i,n.w=s,n.h=a,this.photoswipe.refreshSlideContent(r)}};class ec{currentOrder;constructor(e){this.currentOrder=e}next=()=>(this.currentOrder+=1,this.currentOrder)}class ed{delayedDeletionTask;constructor(){this.delayedDeletionTask=null}setDeletionFunction=e=>{this.delayedDeletionTask=e};
21clearDeletionFunction=()=>{this.delayedDeletionTask=null};executeDeletion=()=>{null!==this.delayedDeletionTask&&this.delayedDeletionTask(),this.delayedDeletionTask=null}}let eu={"image/jpeg":[],"image/pjpeg":[],"image/png":[],"image/x-png":[],"image/webp":[],"image/heic":[],"image/heif":[],"image/avif":[]},eh=(0,Y.createSlice)({name:"uploader/config",initialState:{},reducers:{}});var eg=o(945732);let ew=(0,Y.createSlice)({name:"uploader/notifications",initialState:[],reducers:{setNotifications:(e,t)=>t.payload}}),{setNotifications:ef}=ew.actions;var em=o(128788);let eb=(0,n.forwardRef)((e,t)=>{let[o]=(0,n.useState)(()=>(e=>{let t,o,{images:r}=e,n=e.maxFileSizeInMegabytes||10,i=`uploaderProgress_${(0,w.A)()}`,s=(0,p.PM)(r);e.enableMain&&r.length>0&&(t=Math.max(r.findIndex(e=>e.isMain),0));let a=null,l=(0,Y.configureStore)({reducer:{config:eh.reducer,photos:p.uB.reducer,checkQueue:eg.sB.reducer,notifications:ew.reducer},preloadedState:{config:{routes:e.routes,progressEventName:i,enableMain:e.enableMain||!1,enableRotate:e.enableRotate||!1,maximumPhotos:e.maximumPhotos||108,maxFileSizeInMegabytes:n,thumbnailWidth:e.thumbnailWidth||300,thumbnailHeight:e.thumbnailHeight||225,allowedImageTypes:e.allowedImageTypes||eu,aspectRatio:e.aspectRatio},photos:{photos:s,mainPhotoId:void 0===t?"":s[t].id,timestamp:0,deletingStateCopy:null},notifications:e.initialNotifications||[]},middleware:t=>t({thunk:{extraArgument:{photoswipeController:new ep,photoOrderProvider:new ec(e.initialOrderNumber),delayedDeletion:new ed,get api(){if(!a){let t,r=(t=o,async function(e){for(var o=arguments.length,r=Array(o>1?o-1:0),n=1;n<o;n++)r[n-1]=arguments[n];let i=await e(...r);return i.success&&i.payload?.notifications&&t(ef(i.payload?.notifications)),i});a=function(e,t){let o=Object.getPrototypeOf(e),r=Object.getOwnPropertyNames(o).filter(t=>"constructor"!==t&&"function"==typeof e[t]),n=Object.create(o);for(let o of r){let r=e[o].bind(e);n[o]=function(){for(var e=arguments.length,o=Array(e),n=0;n<e;n++)o[n]=arguments[n];return t(r,...o)}}return n}(new(e.Api||el)(e.routes,i),r)}return a}}},serializableCheck:{ignoredPaths:["config"]}})});o=l.dispatch;{let{photos:e}=l.getState().photos;e.filter(e=>e.isProcessing).forEach(e=>{l.dispatch((0,u.P2)(e))}),window.addEventListener("beforeunload",()=>{l.dispatch((e,t,o)=>{o.delayedDeletion.executeDeletion()})})}return l})(e));return(0,n.useImperativeHandle)(t,()=>({getPhotos:()=>o.getState().photos.photos,subscribe:e=>{let t=o.getState().photos;return o.subscribe(()=>{let r=o.getState().photos;(r.photos!==t.photos||r.timestamp!==t.timestamp)&&(t=r,e(r.photos))})}})),(0,r.jsx)(i.Provider,{store:o,context:em.E,children:e.children})}),ex=e=>{let t=(e=>{let t=(0,n.useRef)(a.A),{maxFileSizeInMegabytes:o,allowedImageTypes:i}=(0,y.U)(),h=(0,x.I)(),[g,w]=v((0,n.useCallback)(e=>{let{file:o,photo:n}=e;return h((e=>{let{file:t,photo:o,cancelUploadRequest:n}=e;return async(e,i,s)=>{let h=s.photoOrderProvider.next(),g=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"Не удалось загрузить изображение";(0,l.z3)((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:t}}),{withCloseIcon:!1}),e((0,p.fs)({photo:o}))},w=await s.api.upload({file:t,photo:o,createCancelUpload:e=>{n.current=()=>{e.abort()}},orderNumber:h});if(w.ok){let{imageData:t}=w.value.payload;e((0,p.yf)({id:o.id,externalPhoto:t})),t.isProcessing&&e((0,u.bE)(o.id))}else w.match().when(c.TV,e=>g(e.message)).when(c.Uh,()=>g(d.VC)).when(c.lc,a.A).run()}})({file:o,photo:n,cancelUploadRequest:t}))},[h])),[f,_]=v((0,n.useCallback)(e=>{let{file:t,id:o}=e;return h((e=>{let{file:t,id:o}=e;return(e,r)=>{let{thumbnailHeight:n,thumbnailWidth:i}=r().config;return new Promise((r,s)=>{let a=new Image;a.onload=()=>{let{width:t,height:s}=a;t>s?t>i&&(s=Math.round(s*i/t),t=i):s>n&&(t=Math.round(t*n/s),s=n);let l=document.createElement("canvas");l.width=t,l.height=s,l.getContext("2d").drawImage(a,0,0,t,s);let c=l.toDataURL("image/jpeg",.8);e((0,p.Zb)({id:o,thumbnail:c})),URL.revokeObjectURL(a.src),r()},a.onerror=()=>{s()},a.src=URL.createObjectURL(t)})}})({file:t,id:o}))},[h])),A=(0,n.useCallback)((t,o)=>{let[n,i]=h((e,n,i)=>
21{i.delayedDeletion.executeDeletion();let s=n(),{photos:a}=s.photos,{maximumPhotos:c,maxFileSizeInMegabytes:d}=s.config,u=new Set;o.length>0&&o.forEach(e=>e.errors.forEach(t=>{"file-too-large"===t.code?u.add(`Размер ${e.file.name} не должен превышать ${d} МБ`):"file-invalid-type"===t.code&&u.add(`Неверный формат ${e.file.name}. Попробуйте загрузить jpg, jpeg, png, webp, heic, heif, avif.`)}));let h=t.length+a.length>c;if((u.size>0||h)&&(0,l.z3)((0,r.jsxs)("div",{children:[h&&(0,r.jsxs)("div",{children:["Вы можете разместить максимум ",b(c)]}),Array.from(u.values()).map((e,t)=>(0,r.jsx)("div",{children:e},t))]})),0===t.length)return[[],[]];let g=h?t.slice(0,c-a.length):t,w=g.map(m);return e((0,p.w0)({photos:[...a,...w]})),[w,g]});i.forEach((e,t)=>{f({file:e,id:n[t].id}),g({file:e,photo:n[t]})}),e?.()},[h,f,g,e]),k=(0,n.useMemo)(()=>({onDrop:A,accept:i,noClick:!0,noKeyboard:!0,maxSize:1024*o*1024,useFsAccessApi:!1}),[i,A,o]),{getInputProps:j,getRootProps:P,open:C,isDragActive:D}=(0,s.V)(k);return{getInputProps:j,getRootProps:P,openFileDialog:C,cancelUploads:(0,n.useCallback)(()=>{t.current(),w(),_()},[_,w]),isDragActive:D}})(e.onDrop);return(0,r.jsx)(G,{children:(0,r.jsx)(J.GM,{value:t,children:(0,r.jsx)(K.W,{children:e.children})})})};var ev=(0,n.forwardRef)((e,t)=>(0,r.jsx)(eb,{...e,ref:t,children:(0,r.jsx)(ex,{...e})}))},77732:function(e,t,o){class r extends Error{type="user-message-error"}class n extends Error{type="default-error"}class i extends Error{type="abort-error"}o.d(t,{TV:function(){return r},Uh:function(){return n},lc:function(){return i}})},326109:function(e,t,o){var r=o(898040),n=o(835076),i=o(396624),s=o(36158),a=o(757977);t.A=(0,n.memo)(()=>(0,r.jsx)(i.A,{size:28,spinnerColor:s.a.whiteAlpha20,border:2,className:a.c9}))},262718:function(e,t,o){var r=o(898040),n=o(36158),i=o(757977);t.A=e=>{let{progress:t}=e,o=16*Math.PI*2,s=o*(100-Math.min(t,95))/100;return(0,r.jsxs)("svg",{viewBox:"0 0 34 34",className:i.dI,children:[(0,r.jsx)("circle",{cx:17,cy:17,r:16,strokeWidth:2,strokeDasharray:o,fill:"none",stroke:n.a.whiteAlpha30}),(0,r.jsx)("circle",{style:{transition:"stroke-dashoffset 0.5s ease"},transform:"rotate(-90 17 17)",cx:17,cy:17,r:16,strokeWidth:2,strokeDasharray:o,strokeDashoffset:s,fill:"none",stroke:n.a.white})]})}},830830:function(e,t,o){o.d(t,{A:function(){return $}});var r=o(898040),n=o(835076),i=o(995165),s=o(470678),a=o(555380),l=o(680849),p=o(802580),c=o(28652),d=o(22372),u=o(526727),h=o(594754),g=o(894486),w=o(232507),f=o(889984),m=e=>{let{balloon:t,onClick:o,statsName:n,Icon:i,ftid:s,balloonPosition:a}=e;return(0,r.jsx)(f.A,{content:t,position:a,children:(0,r.jsx)("button",{className:"da0yyt1",onClick:o,"data-ga-stats-name":n,"data-ga-stats-engine":"va","data-ga-stats-track-click":!0,"data-ga-stats-infinity-tracking":!0,"data-ftid":s,children:(0,r.jsx)(i,{className:"da0yyt2"})})})},b=()=>{let e=(0,h.A)(),[,t]=(0,l.A)();return(0,r.jsx)(m,{onClick:e,balloon:"Удалить",statsName:"button_delete_photo",ftid:"component_uploader_delete-photo",Icon:w.A,balloonPosition:t%4==3?g.yX.UpRight:g.yX.Up})},x=o(415416),v=o(344315),y=()=>{let e=(0,x.A)(),[,t]=(0,l.A)();return(0,r.jsx)(m,{onClick:e,balloon:"Сделать главной",statsName:"button_make_main_photo",ftid:"component_uploader_make-main-photo",Icon:v.A,balloonPosition:t%4==0?g.yX.UpLeft:g.yX.Up})},_=o(397264),A=o(874090),k=()=>{let e=(0,_.A)();return(0,r.jsx)(m,{onClick:e,balloon:"Повернуть",statsName:"button_rotate_photo",ftid:"component_uploader_rotate-photo",Icon:A.A,balloonPosition:g.yX.Up})},j=(0,n.memo)(e=>{let{isMain:t}=e,{enableMain:o,enableRotate:n}=(0,u.U)();return(0,r.jsxs)("div",{className:"da0yyt0",children:[o&&!t&&(0,r.jsx)(y,{}),n&&(0,r.jsx)(k,{}),(0,r.jsx)(b,{})]})}),P=o(591622),C=o(757977),D=(0,n.memo)(()=>(0,r.jsx)("div",{className:C.CH,children:"главная"}));let z=(0,n.forwardRef)((e,t)=>{let{id:o,src:n,onClick:i}=e,s=(0,p.A)(),{aspectRatio:a}=(0,u.U)(),l=(0,P.h_)(o);return(0,r.jsxs)(r.Fragment,{children:[l&&(0,r.jsx)(D,{}),(0,r.jsx)(c.A,{src:n,aspectRatio:a,overlayColor:d.B,ref:t,onClick:i,radiusLevel:"small"}),!s&&(0,r.jsx)(j,{isMain:l})]})});var T=o(498375),I=o(326109),S=o(262718);let E=(0,n.memo)(e=>{let{src:t}=e,{aspectRatio:o}
21=(0,u.U)();return(0,r.jsx)(T.A,{aspectRatio:o,src:t,blurValue:"6px",overlayColor:d.B,radiusLevel:"small"})});var L=e=>{let{src:t,id:o,showProgress:i,showLoadingIndicatior:s}=e,{progressEventName:a}=(0,u.U)(),[l,p]=(0,n.useState)(i?100:void 0);return(0,n.useLayoutEffect)(()=>{let e=e=>{e.detail.id===o&&p(e.detail.progress)};return window.addEventListener(a,e),()=>window.removeEventListener(a,e)},[o,a]),(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(E,{src:t}),s&&(void 0===l?(0,r.jsx)(I.A,{}):(0,r.jsx)(S.A,{progress:l}))]})};let H=(0,i.Zj)(e=>(0,r.jsx)("div",{className:C.SG,...e}));var $=(0,n.memo)(e=>{let{photo:t,position:o}=e,{id:i,isProcessing:p,showProgress:c,isLocal:d,isDeleting:u,isEditing:h,srcWidth:g,srcHeight:w,src:f,thumb:m}=t,b=(0,n.useMemo)(()=>p?{original:a,thumbnail:a,width:440,height:330}:{original:f,thumbnail:m,width:g,height:w},[w,p,f,m,g]),x=[t,o];return d||u?(0,r.jsx)("div",{className:C.yJ,children:(0,r.jsx)(L,{src:m,id:i,showProgress:!d&&c,showLoadingIndicatior:!0})}):(0,r.jsx)(l.h,{value:x,children:(0,r.jsx)("div",{className:C.yJ,"data-ftid":"component_uploader_photo",children:(0,r.jsx)(s.q7,{id:i,...b,children:e=>{let{ref:t,open:n}=e;return(0,r.jsx)(H,{index:o,children:(0,r.jsx)("div",{className:C.vr,children:p||h?(0,r.jsx)("div",{ref:t,onClick:n,children:(0,r.jsx)(L,{src:m,id:i,showProgress:c,showLoadingIndicatior:h})}):(0,r.jsx)(z,{ref:t,src:m,onClick:n,id:i})})})}})})})})},456503:function(e,t,o){o.d(t,{A:function(){return v}});var r=o(898040),n=o(835076),i=o(995165),s=o(456807),a=o(802580),l=o(533606),p=o(166091),c=o(377174),d=o(964682),u=o(672715),h=o(673643),g=o(77732),w="nc8ngj1";let f=e=>"touchstart"===e.type&&e.touches.length>1,m=()=>{document.body.classList.add(w)},b=(0,i.q6)(e=>(0,r.jsx)("div",{...e})),x=(0,s.A)();var v=e=>{let{children:t,className:o}=e,i=(0,a.A)(),s=(0,l.I)(),v=(0,n.useCallback)(e=>{let{oldIndex:t,newIndex:o}=e;document.body.classList.remove(w),t!==o&&s((e=>{let{oldIndex:t,newIndex:o}=e;return async(e,n,i)=>{let{photos:s}=n().photos,a=(0,p.A)(s,t,o);e((0,u.w0)({photos:a}));let l=await i.api.reorder(a);l.ok?e((0,u.$x)()):l.match().when(g.TV,e=>(0,d.z3)((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:e.message}}))).when(g.Uh,()=>(0,d.z3)(h.Ip)).when(g.lc,c.A).run()}})({oldIndex:t,newIndex:o}))},[s]);return(0,r.jsx)(b,{axis:"xy",useWindowAsScrollContainer:!1,onSortEnd:v,transitionDuration:150,pressDelay:i||x?150:0,distance:i||x?0:1,helperClass:"nc8ngj2",shouldCancelStart:f,updateBeforeSortStart:m,className:o||"nc8ngj0",children:t})}},612776:function(e,t,o){let r;o.d(t,{W:function(){return x},j:function(){return b}});var n=o(898040),i=o(835076),s=o(454991),a=o(964682),l=o(36454),p=o(842815),c=o(377174),d=o(672715),u=o(77732),h=o(673643),g=o(771674);let w="delete-all-photos";var f=o(533606);let m=(0,i.createContext)(null),b=()=>(0,i.useContext)(m),x=e=>{let{children:t}=e,o=(()=>{let e=(0,i.useRef)(null),t=(0,f.I)(),{cancelUploads:o}=(0,s.VB)();return{containerRef:e,deletePhotos:()=>{t((t,i,s)=>{let f=()=>{t((0,d.w0)({photos:[]})),e.current&&e.current.getBoundingClientRect().top<0&&window.scrollTo({top:0,left:0,behavior:"smooth"}),o(),r=t((0,g.FF)())},m=()=>{t((0,d.Ng)()),r()},b=async()=>{(0,a.TF)(w);let e=e=>{m(),(0,a.z3)((0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}))},o=await s.api.deleteAll();o.ok?t((0,d.$x)()):o.match().when(u.TV,t=>e(t.message)).when(u.Uh,()=>e(h.pZ)).when(u.lc,c.A).run()};s.delayedDeletion.executeDeletion(),t((0,d.Vx)());let x=setTimeout(()=>{f(),s.delayedDeletion.setDeletionFunction(b);let e=setTimeout(()=>{s.delayedDeletion.executeDeletion()},5e3);(0,a.kX)((0,n.jsxs)("div",{children:["Все фото удалены."," ",(0,n.jsx)(l.A,{purpose:"button",...(0,p.A)({name:"restore-all-deleted-photos",trackClick:!0,trackView:!0}),onClick:()=>{clearTimeout(e),s.delayedDeletion.clearDeletionFunction(),(0,a.TF)(w),m()},children:"Восстановить"})]}),{id:w,timeout:5e3,closeHandler:()=>{clearTimeout(e),(0,a.TF)(w),s.delayedDeletion.executeDeletion()}})},1e3);s.delayedDeletion.setDeletionFunction(()=>{clearTimeout(x),f(),b()})})}}})();return(0,n.jsx)(m.Provider,{value:o,children:t})}},454991:function(e,t,o){var r=o(898040),n=o(835076);let i=(0,n.createContext)(null),s=()=>(0,n.useContext)(i),a=i.Provider;o.d(t,{},{GM:a,VB:s,mf:e=>{let{children:t}=e,{getRootProps:o}=s();return(0,r.jsx)("div",{...o(),children:t})},sC:()=>{let{getInputProps:e}=s();return(0,r.jsx)("input",{...e(),"data-ftid":"component_uploader_input"})}})},673643:function(e,t,o){o.d(t,{},{Ic:"Не удалось сделать фото главным",Ip:"Не удалось сохранить порядок фотографий",VC:"Не удалось загрузить фото",Z9:"Не удалось повернуть фото",pZ:"Не удалось удалить фото"})},526727:function(e,t,o){var r=o(533606);o.d(t,{},{U:()=>(0,r.v)(e=>e.config)})},680849:function(e,t,o){var r=o(835076);let n=(0,r.createContext)([{},-1]),i=n.Provider;t.A=()=>(0,r.useContext)(n),o.d(t,{},{h:i})},594754:function(e,t,o){o.d(t,{A:function(){return w}});var r=o(835076),n=o(898040),i=o(36454),s=o(964682),a=o(842815),l=o(377174),p=o(672715),c=o(673643),d=o(77732);let u="delete-photo";var h=o(533606),g=o(680849),w=()=>{let e=(0,g.A)(),t=(0,h.I)();return(0,r.useCallback)(()=>{t((e=>{let[t,o]=e;return(e,r,h)=>
21{if(t.isDeleting)return;let g=r(),{enableMain:w}=g.config,{mainPhotoId:f}=g.photos;h.delayedDeletion.executeDeletion();let{id:m}=t,b=w&&m===f;e((0,p.Q3)({id:m}));let x=h.photoswipeController.deletePhoto(m),v=()=>{e((0,p.MO)({photo:t,position:o,isMain:b})),x()},y=async()=>{(0,s.TF)(u);let o=e=>{(0,s.z3)((0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:e}}),{id:u,notificationsToRemove:[u]}),v()},r=await h.api.delete(t.imageId);r.ok?e((0,p.$x)()):r.match().when(d.TV,e=>o(e.message)).when(d.Uh,()=>o(c.pZ)).when(d.lc,l.A).run()},_=()=>{e((0,p.fs)({photo:t}))},A=setTimeout(()=>{_(),h.delayedDeletion.setDeletionFunction(y);let e=setTimeout(()=>{h.delayedDeletion.executeDeletion()},5e3);(0,s.kX)((0,n.jsxs)("div",{children:["Фото успешно удалено."," ",(0,n.jsx)(i.A,{purpose:"button",...(0,a.A)({name:"restore-deleted-photo",trackClick:!0,trackView:!0}),onClick:()=>{clearTimeout(e),h.delayedDeletion.clearDeletionFunction(),(0,s.TF)(u),v()},children:"Восстановить"})]}),{id:u,timeout:5e3,closeHandler:()=>{clearTimeout(e),(0,s.TF)(u),h.delayedDeletion.executeDeletion()}})},1e3);h.delayedDeletion.setDeletionFunction(()=>{clearTimeout(A),_(),y()})}})(e))},[t,e])}},415416:function(e,t,o){o.d(t,{A:function(){return u}});var r=o(898040),n=o(964682),i=o(166091),s=o(377174),a=o(672715),l=o(673643),p=o(77732),c=o(533606),d=o(680849),u=()=>{let e=(0,d.A)(),t=(0,c.I)();return()=>{t((e=>{let[t,o]=e;return async(e,t,c)=>{let{photos:d}=t().photos,u=(0,i.A)(d,o,0);e((0,a.w0)({photos:u}));let h=await c.api.reorder(u);h.ok?e((0,a.$x)()):h.match().when(p.TV,e=>(0,n.z3)((0,r.jsx)("div",{dangerouslySetInnerHTML:{__html:e.message}}))).when(p.Uh,()=>(0,n.z3)(l.Ic)).when(p.lc,s.A).run()}})(e))}}},161053:function(e,t,o){var r=o(533606);o.d(t,{},{E:()=>(0,r.v)(e=>e.notifications)})},591622:function(e,t,o){var r=o(533606);let n=()=>(0,r.v)(e=>e.photos.photos),i=()=>(0,r.v)(e=>e.photos.mainPhotoId);o.d(t,{},{h_:e=>i()===e,nX:n,uZ:i,zF:()=>n().length>0})},397264:function(e,t,o){o.d(t,{A:function(){return u}});var r=o(835076),n=o(898040),i=o(964682),s=o(377174),a=o(673643),l=o(672715),p=o(77732),c=o(533606),d=o(680849),u=()=>{let e=(0,c.I)(),[t]=(0,d.A)();return(0,r.useCallback)(()=>{e(async(e,o,r)=>{if(t.isEditing)return;let{id:c}=t;e((0,l.zo)({id:c,status:!0}));let d=t=>{(0,i.z3)((0,n.jsx)("div",{dangerouslySetInnerHTML:{__html:t}})),e((0,l.zo)({id:c,status:!1}))},u=e=>new Promise((t,o)=>{let r=new Image;r.onload=()=>{t()},r.onerror=()=>{o()},r.src=e}),h=await r.api.rotate(t.imageId);if(h.ok){let{payload:{imageData:t}}=h.value;Promise.all([u(t.image.src),u(t.image.thumb)]).catch(s.A).finally(()=>{e((0,l.yf)({id:c,externalPhoto:t})),r.photoswipeController.updatePhoto(c,{src:t.image.src,width:t.image.srcWidth,height:t.image.srcHeight})})}else h.match().when(p.TV,e=>d(e.message)).when(p.Uh,()=>d(a.Z9)).when(p.lc,s.A).run()})},[e,t])}},945732:function(e,t,o){let r=(0,o(470246).createSlice)({name:"uploader/check-queue",initialState:{checkQueue:[],running:!1,abortedPhotoCheck:void 0},reducers:{pushPhoto:(e,t)=>{e.checkQueue.push(t.payload)},setCheckQueueState:(e,t)=>({...e,...t.payload})}}),{setCheckQueueState:n,pushPhoto:i}=r.actions;o.d(t,{},{Zn:i,sB:r,zn:n})},672715:function(e,t,o){var r=o(470246),n=o(592279);let i=(0,r.createSlice)({name:"uploader/photos",initialState:{photos:[],timestamp:0,mainPhotoId:"",deletingStateCopy:null},reducers:{setPhotos:(e,t)=>{let{photos:o}=t.payload;e.photos=o,e.mainPhotoId=o.length>0?o[0].id:""},recieveLocalThumbnail:(e,t)=>{let{id:o,thumbnail:r}=t.payload,n=e.photos.findIndex(e=>e.id===o);n>=0&&(e.photos[n].src=r,e.photos[n].thumb=r)},recieveRealPhoto:(e,t)=>{let{id:o,externalPhoto:r}=t.payload,n=e.photos.findIndex(e=>e.id===o);if(n>=0){let t=e.photos[n],{src:o,thumb:i}=r.isProcessing?t:r.image;e.photos[n]={id:t.id,imageId:r.image.id,srcHeight:r.image.srcHeight,srcWidth:r.image.srcWidth,sources:r.image.sources,isProcessing:r.isProcessing,thumb:i,src:o,isDeleting:!1,isEditing:!1,showProgress:!1,isLocal:!1}}},toggleEditing:(e,t)=>{let{id:o,status:r}=t.payload;e.photos=e.photos.map(e=>e.id===o?{...e,isEditing:r}:e)},addPhotoAtPosition:(e,t)=>{let{photo:o,position:r,isMain:n}=t.payload,i=[...e.photos];i.splice(r,0,o),e.photos=i,n&&(e.mainPhotoId=o.id)},removePhoto:(e,t)=>{let{photo:o}=t.payload,{id:r}=o,n=e.photos.filter(e=>e.id!==r);e.photos=n,e.mainPhotoId===r&&(e.mainPhotoId=n.length>0?n[0].id:"")},markAsDeleting:(e,t)=>
21{let{id:o}=t.payload,r=e.photos.findIndex(e=>e.id===o);r>=0&&(e.photos[r].isDeleting=!0)},markAsProcessing:(e,t)=>{let{id:o,status:r}=t.payload;e.photos=e.photos.map(e=>e.id===o?{...e,check:r}:e)},startDeletingAllPhotos:e=>{e.deletingStateCopy={photos:e.photos,mainPhotoId:e.mainPhotoId},e.photos=e.photos.map(e=>({...e,isDeleting:!0}))},reverseDeletingAllPhotos:e=>{null!==e.deletingStateCopy&&(e.photos=e.deletingStateCopy.photos,e.mainPhotoId=e.deletingStateCopy.mainPhotoId,e.deletingStateCopy=null)},forceUpdate:e=>{e.timestamp=new Date().getTime()}}}),{setPhotos:s,recieveLocalThumbnail:a,recieveRealPhoto:l,toggleEditing:p,addPhotoAtPosition:c,removePhoto:d,markAsDeleting:u,markAsProcessing:h,startDeletingAllPhotos:g,reverseDeletingAllPhotos:w,forceUpdate:f}=i.actions;o.d(t,{},{$x:f,MO:c,Ng:w,PM:e=>e.map(e=>({imageId:e.image.id,srcHeight:e.image.srcHeight,srcWidth:e.image.srcWidth,sources:e.image.sources,thumb:e.image.thumb,src:e.image.src,isProcessing:e.isProcessing,isLocal:!1,showProgress:!1,isDeleting:!1,isEditing:!1,id:(0,n.A)()})),Q3:u,Vx:g,Zb:a,fs:d,uB:i,w0:s,yf:l,zo:p})},128788:function(e,t,o){let r=(0,o(835076).createContext)(null);o.d(t,{},{E:r})},771674:function(e,t,o){var r=o(77732),n=o(945732),i=o(672715);let s=null,a=()=>async(e,t,o)=>{let{checkQueue:l,running:p}=t().checkQueue;if(p)return;let c=l[0];if(void 0===c)return void e((0,n.zn)({running:!1}));s=new AbortController,e((0,n.zn)({running:!0,checkQueue:l.slice(1)}));let d=await o.api.check(c.imageId,s.signal);if(d.ok){e((0,n.zn)({running:!1}));let{imageData:t}=d.value.payload;if(t.isProcessing)e((0,n.Zn)(c)),setTimeout(()=>e(a()),4e3);else{let o=new Image;o.onload=()=>{e((0,i.yf)({id:c.id,externalPhoto:t}))},o.src=t.image.thumb,e(a())}}else d.match().when(r.TV,r.Uh,()=>{e((0,n.zn)({running:!1})),e(a())}).when(r.lc,()=>{e((0,n.zn)({abortedPhotoCheck:c}))}).run()},l=e=>(t,o)=>{t((0,n.Zn)(e));let{running:r}=o().checkQueue;r||setTimeout(()=>t(a()),0)};o.d(t,{},{FF:()=>(e,t)=>{let{checkQueue:o}=t().checkQueue;s&&s.abort();let r=[...o];return e((0,n.zn)({checkQueue:[],running:!1})),()=>{e((e,t)=>{let{checkQueue:o,running:i,abortedPhotoCheck:s}=t().checkQueue,l=[...o,...r];void 0!==s&&l.unshift(s),e((0,n.zn)({checkQueue:l,abortedPhotoCheck:void 0})),i||setTimeout(()=>e(a()),0)})}},P2:l,bE:e=>(t,o)=>{let{photos:r}=o().photos,n=r.find(t=>t.id===e);n&&t(l(n))}})},533606:function(e,t,o){var r=o(31285),n=o(128788);let i=(0,r.createDispatchHook)(n.E),s=(0,r.createSelectorHook)(n.E);o.d(t,{},{I:i,v:s})},396624:function(e,t,o){var r=o(898040),n=o(693094),i=o(14463);let s=(0,n.A)("div",{target:"eh830wp0"})("text-align:center;",e=>{let{asInlineBlock:t}=e;return t&&"display: inline-block;"},"    vertical-align:middle;font-size:0;");t.A=e=>{let{asInlineBlock:t=!1,className:o,size:n=20,...a}=e;return(0,r.jsx)(s,{asInlineBlock:t,className:o,children:(0,r.jsx)(i.A,{size:n,...a})})},o.d(t,{},{r:s})},14463:function(e,t,o){var r=o(693094),n=o(953599),i=o(499599);let s=(0,n.i7)("0%{transform:rotate(0deg);}100%{transform:rotate(360deg);}");t.A=(0,r.A)("div",{target:"e12cqmh60"})("display:inline-block;position:relative;&::after{content:'';display:inline-block;border-radius:100%;",e=>{let{size:t=20,spinnerColor:o=i.T.grayIcon,border:r=2}=e;return(0,n.AH)`
22            border: ${r}px solid;
23            width: ${t}px;
24            height: ${t}px;
25            border-color: ${o};
26        `},"        border-top-color:transparent;animation:",s," 1s infinite linear;will-change:transform;z-index:1;position:relative;}"),o.d(t,{},{T:s})},463639:function(e,t,o){o.d(t,{},{O:"hsl(0, 0%, 100%)"})},440817:function(e,t,o){o.d(t,{},{u:"https://i.rdrom.ru/404/empty.gif"})},212573:function(e,t){t.A=()=>{let e,t,o,r,n,i=null;return void 0!==document.documentElement.requestFullscreen?(e="requestFullscreen",t="exitFullscreen",o="fullscreenElement",r="fullscreenchange",n="fullscreenerror"):void 0!==document.documentElement.webkitRequestFullscreen&&(e="webkitRequestFullscreen",t="webkitExitFullscreen",o="webkitFullscreenElement",r="webkitfullscreenchange",n="webkitfullscreenerror"),e&&(i={request:t=>"webkitRequestFullscreen"===e?t[e](Element.ALLOW_KEYBOARD_INPUT):t[e](),exit:()=>document[t](),isFullscreen:()=>!!document[o],change:r,error:n}),i}},450023:function(e,t){t.A=(e,t)=>
26{let o=`${e} 1x`;return t&&(o+=`, ${t} 2x`),o}},166091:function(e,t){t.A=(e,t,o)=>{if(o>e.length||t>e.length||t===o||t<0||o<0)return e;let r=[...e];return r.splice(o,0,r.splice(t,1)[0]),r}},254177:function(e,t){t.A=(e,t,o)=>function(r){for(var n=arguments.length,i=Array(n>1?n-1:0),s=1;s<n;s++)i[s-1]=arguments[s];let a=r%100,l=r%10;return l>0&&l<5&&(a<11||a>20)?1===l?e(r,...i):t(r,...i):o(r,...i)}},512719:function(e,t,o){var r,n=((r={}).COVER="cover",r.CONTAIN="contain",r.FILL="fill",r.NONE="none",r.SCALEDOWN="scale-down",r);t.A=e=>`object-fit: ${e}; font-family: "object-fit: ${e}";`,o.d(t,{q:function(){return n}})},526002:function(e,t){t.A=function(e,t){let o,r,n=!1;return function i(){if(n){o=arguments,r=this;return}e.apply(this,arguments),n=!0,setTimeout(()=>{n=!1,o&&(i.apply(r,o),o=null,r=null)},t)}}},710700:function(e,t,o){var r=o(972424);let n=`.${r.n5} &:hover`,i=`.${r.gL} &:active`,s=`${n}, ${i}`;o.d(t,{},{Ho:i,PG:n,PT:s})},36158:function(e,t,o){o.d(t,{},{a:{dromLogo:"hsl(353, 100%, 43%)",gray1:"hsl(227, 4%, 56%)",gray2:"hsl(210, 8%, 76%)",gray4:"hsl(0, 0%, 96%)",gray3:"hsl(215, 27%, 91%)",gray5:"hsl(210, 8%, 46%)",gray6:"hsl(215, 13%, 21%)",gray7:"hsl(0, 0%, 44%)",gray8:"hsla(185, 100%, 93%, 0.2)",gray9:"hsla(240, 1%, 26%, 1)",blueDark:"hsl(209, 77%, 45%)",blueLight:"hsl(209, 63%, 51%)",blueButtonLight:"hsl(208, 100%, 92%)",blueButtonDark:"hsl(209, 63%, 18%)",bluePaleLight:"hsl(203, 100%, 97%)",bluePaleDark:"hsla(209, 63%, 51%, 0.24)",electroDark:"hsl(190, 100%, 65%)",electroLight:"hsla(191, 100%, 70%, 0.2)",redBrandDark:"hsl(353, 100%, 43%)",redBrandLight:"hsl(353, 79%, 49%)",redAccent:"hsl(353, 100%, 51%)",red1:"hsl(353, 100%, 96%)",red2:"hsla(353, 79%, 49%, 0.22)",red3:"hsl(355, 36%, 19%)",orangeDark:"hsl(47, 95%, 56%)",orangeLight:"hsl(47, 85%, 44%)",yellowPale:"hsl(51, 100%, 92%)",brown:"hsla(47, 95%, 56%, 0.2)",yellow:"hsl(56, 86%, 83%)",olive:"hsl(56, 13%, 22%)",greenDark:"hsl(85, 49%, 48%)",greenLight:"hsl(85, 46%, 53%)",greenPaleLight:"hsl(96, 89%, 93%)",greenPaleDark:"hsla(85, 46%, 53%, 0.24)",magenta:"hsl(300, 94%, 37%)",violet:"hsl(285, 19%, 61%)",purple:"hsl(285, 30%, 58%)",purpleDark:"hsl(300, 64%, 35%)",dark1:"hsl(0, 0%, 10%)",dark2:"hsl(0, 0%, 17%)",dark3:"hsl(0, 0%, 20%)",dark4:"hsl(0, 0%, 6%)",black:"hsl(0, 0%, 0%)",blackAlpha2:"hsla(0, 0%, 0%, 0.02)",blackAlpha3:"hsla(0, 0%, 0%, 0.03)",blackAlpha5:"hsla(0, 0%, 0%, 0.05)",blackAlpha8:"hsla(0, 0%, 0%, 0.08)",blackAlpha10:"hsla(0, 0%, 0%, 0.10)",blackAlpha20:"hsla(0, 0%, 0%, 0.20)",blackAlpha30:"hsla(0, 0%, 0%, 0.30)",blackAlpha40:"hsla(0, 0%, 0%, 0.40)",blackAlpha50:"hsla(0, 0%, 0%, 0.50)",blackAlpha60:"hsla(0, 0%, 0%, 0.60)",white:"hsl(0, 0%, 100%)",whiteAlpha2:"hsla(0, 0%, 100%, 0.02)",whiteAlpha5:"hsla(0, 0%, 100%, 0.05)",whiteAlpha8:"hsla(0, 0%, 100%, 0.08)",whiteAlpha10:"hsla(0, 0%, 100%, 0.10)",whiteAlpha12:"hsla(0, 0%, 100%, 0.12)",whiteAlpha15:"hsla(0, 0%, 100%, 0.15)",whiteAlpha20:"hsla(0, 0%, 100%, 0.20)",whiteAlpha30:"hsla(0, 0%, 100%, 0.30)",whiteAlpha40:"hsla(0, 0%, 100%, 0.40)",whiteAlpha50:"hsla(0, 0%, 100%, 0.50)",whiteAlpha60:"hsla(0, 0%, 100%, 0.60)",whiteAlpha70:"hsla(0, 0%, 100%, 0.70)",whiteAlpha80:"hsla(0, 0%, 100%, 0.80)"}})},954706:function(e,t,o){var r=o(953599),n=o(846168),i=o(692693);let s=e=>(0,r.AH)(i.bD,"{",e,"}"),a=e=>(0,r.AH)(i.zs,"{",e,"}");o.d(t,{},{KP:e=>{let t={},o={};(0,n.A)(e).forEach(e=>{let[r,n]=e,i=`--${r.split(/(?=[A-Z])/).map(e=>e.toLowerCase()).join("-")}`;n.light&&(t[i]=n.light),n.dark&&(o[i]=n.dark)});let i=s((0,r.AH)(t)),l=a((0,r.AH)(o));return(0,r.AH)(i,l)},_k:s,a5:a})},692693:function(e,t,o){let r=".dark",n=`html${r}`,i=`html:not(${r})`,s=`${n} &`,a=`${i} &`;o.d(t,{},{bD:a,zs:s})},344315:function(e,t,o){var r=o(898040);o(835076),t.A=e=>(0,r.jsx)("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.548.935c1.984 0 2.64 2.658.885 3.582l-4.157 2.188a.1.1 0 0 0-.041.036.1.1 0 0 0-.012.055q.001.035.014.053a.1.1 0 0 0 .043.035l5.732 2.745c1.824.873 1.202 3.614-.82 3.614H4.605L5.86 17.93a.9.9 0 0 1-1.739.466L1.432 8.358a1 1 0 0 1-.068-.178l-.288-1.076C.242 3.992 2.586.935 5.808.935zm-9.74 1.801a3.1 3.1 0 0 0-2.994 3.902l.082.307a1 1 0 0 1 .068.177l1.157 4.32h13.07c.03 0 .046-.005.052-.007l.013-.008a.12.12 0 0 0 .034-.062.12.12 0 0 0-.003-.071l-.01-.013a.2.2 0 0 0-.042-.028l-5.733-2.745c-1.409-.675-1.447-2.668-.064-3.396l4.157-2.187a.1.1 0 0 0 .04-.03l.009-.013a.12.12 0 0 0 0-.07.12.12 0 0 0-.032-.061q-.005-.005-.014-.01a.2.2 0 0 0-.05-.005z",fill:"
26currentColor"})})},874090:function(e,t,o){var r=o(898040);o(835076),t.A=e=>(0,r.jsxs)("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M2.298 9.7a2 2 0 0 0-2 2v6a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6a2 2 0 0 0-2-2zm12 1.801a.2.2 0 0 1 .2.2v6a.2.2 0 0 1-.2.2h-12c-.11 0-.2-.09-.2-.2v-6a.2.2 0 0 1 .2-.2z",fill:"currentColor"}),(0,r.jsx)("path",{d:"M10.935.563a.9.9 0 0 0-1.274 0L7.015 3.21a1.4 1.4 0 0 0 0 1.98L9.66 7.837a.9.9 0 0 0 1.274-1.274L9.472 5.101h3.83a4.6 4.6 0 0 1 4.6 4.6.9.9 0 0 0 1.8 0 6.4 6.4 0 0 0-6.4-6.401h-3.83l1.463-1.463a.9.9 0 0 0 0-1.274",fill:"currentColor"})]})},232507:function(e,t,o){var r=o(898040);o(835076),t.A=e=>(0,r.jsxs)("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e,children:[(0,r.jsx)("path",{d:"M8.01 7.546a.9.9 0 0 1 .9.9v5.49a.9.9 0 0 1-1.8 0v-5.49a.9.9 0 0 1 .9-.9M12.002 7.546a.9.9 0 0 1 .9.9v5.49a.9.9 0 0 1-1.8 0v-5.49a.9.9 0 0 1 .9-.9",fill:"currentColor"}),(0,r.jsx)("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M7.948.971a2.9 2.9 0 0 1 4.101 0l2.112 2.113c.281.281.457.63.526.994h2.712v.013h.571a.9.9 0 0 1 0 1.801H17.4v9.086a4.9 4.9 0 0 1-4.9 4.9h-5a4.9 4.9 0 0 1-4.9-4.9V5.892h-.57a.9.9 0 0 1 0-1.8h.57v-.014h2.71c.07-.364.245-.713.526-.995zm-3.55 14.007a3.1 3.1 0 0 0 3.1 3.1h5a3.1 3.1 0 0 0 3.101-3.1V5.892H4.4zm6.378-12.733a1.1 1.1 0 0 0-1.556 0L7.387 4.078h5.223z",fill:"currentColor"})]})}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.