1"use strict";(self.webpackChunksmarty_crm_frontend=self.webpackChunksmarty_crm_frontend||[]).push([[2983],{12695(e,t,i){i.d(t,{h:()=>o});var s,l,a=i(96540);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},n.apply(null,arguments)}const o=e=>a.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:23,height:37,viewBox:"0 0 23 37"},e),s||(s=a.createElement("defs",null,a.createElement("filter",{id:"a",width:"129.2%",height:"129.2%",x:"-10.4%",y:"-14.6%",filterUnits:"objectBoundingBox"},a.createElement("feOffset",{dx:1,in:"SourceAlpha",result:"shadowOffsetOuter1"}),a.createElement("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:1}),a.createElement("feColorMatrix",{in:"shadowBlurOuter1",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"})),a.createElement("path",{id:"b",d:"M9 9h18a2 2 0 1 0 0-4H7c-.552 0-1.052.224-1.414.586A2 2 0 0 0 5 7v20a2 2 0 1 0 4 0z"}))),l||(l=a.createElement("g",{fill:"none",fillRule:"evenodd",transform:"rotate(135 10.793 15.015)"},a.createElement("use",{xlinkHref:"#b",fill:"#000",filter:"url(#a)"}),a.createElement("use",{xlinkHref:"#b",fill:"#FFF"}))));i.p},38432(e,t,i){i.d(t,{h:()=>n});var s,l=i(96540);function a(){return a=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},a.apply(null,arguments)}const n=e=>l.createElement("svg",a({xmlns:"http://www.w3.org/2000/svg",width:14,height:15,viewBox:"0 0 14 15"},e),s||(s=l.createElement("g",{fill:"#FFF",fillRule:"evenodd"},l.createElement("path",{d:"M6 0h2a1 1 0 0 1 1 1v7H5V1a1 1 0 0 1 1-1M1 15h12a1 1 0 0 0 1-1v-1H0v1a1 1 0 0 0 1 1"}),l.createElement("path",{d:"M7.707 10.293 12 6H2l4.293 4.293a1 1 0 0 0 1.414 0"}))));i.p},52983(e,t,i){i.r(t),i.d(t,{default:()=>K});var s=i(64467),l=i(96540),a=i(69733),n=i(82960),o=i(20053),r=i(74927),d=i(53138),c=i(12695),h=i(38432),f=i(51724),u=i(38327),w=i(3157),p=i(98491),m=i(19118),v=i(6365),g=i(86695),b=i(18840),x=i(80429),A=i(44e3),j=i(1596),O=i(79120),B=i(2280),k=i(76686);const F="previewModal--e91cf98d3f569808f30a",V="preview--e0643a93417fadef924f",E="actions--d38756954ac9d976387c",I="title--a9c7985d3524394705f2",C="size--f0482b201ff64c2cfaaf",N="buttons--d9ed9c6e3df4a32ea32f",y="download--d32520e74dc52417163a",M="link--d77acf249520a571bfcd",S="closed--cb99d3a6bb63a417fc72",_="otherVideos--db876c37fc718bd19d4a",L="videosList--df649f3aeab659254502",R="item--f18eeee312ba0b3e15e4",P="videoTitle--a29f075ed496d3178b9f",W="scroll-right-button--ffd10aee6967677ee17e",U="disabled--c93dd6026def03efef83",D="scroll-left-button--d6f81a847edf97acd7da";var H=i(74848);class z extends l.PureComponent{constructor(e){super(e),(0,s.A)(this,"handleSelectItem",e=>{const{otherVideos:t}=this.props,i=t.find(t=>t.id===e);this.setState({selectUrl:null==i?void 0:i.url,selectFile:{title:null==i?void 0:i.title,isIntroduction:!0},allVideos:t.filter(t=>t.id!==e)})}),(0,s.A)(this,"getVisibleButtons",()=>({isVisibleLeftButton:!!this.list&&this.list.scrollWidth-this.list.scrollLeft>this.list.offsetWidth,isVisibleRightButton:!!this.list&&0!==this.list.scrollLeft})),(0,s.A)(this,"handleChangeConditionButtons",()=>{const{isVisibleRightButton:e,isVisibleLeftButton:t}=this.getVisibleButtons();e===this.state.isVisibleRightButton&&t===this.state.isVisibleLeftButton||this.setState({isVisibleRightButton:e,isVisibleLeftButton:t})}),(0,s.A)(this,"handleScrollRight",()=>{this.list&&(this.list.scrollLeft+=204)}),(0,s.A)(this,"handleScrollLeft",()=>{this.list&&(this.list.scrollLeft-=204)}),(0,s.A)(this,"handleSave",async()=>{const{currentCatalogId:e,saveFileFromAttach:t,checkQuotas:i,pushModalWindow:s}=this.props;try{await t(this.state.selectFile._id,e)}catch(e){if(i(e))return;(0,g.k)(e,403)&&s("UNIVERSAL_INFO",{titleKey:"closedAccess",infoKey:"noPermissionAskAdmin"})}}),(0,s.A)(this,"handleDownload",async()=>{const{downloadFiles:e}=this.props,{selectFile:t,selectUrl:i}=this.state;null!=t&&t.isIntroduction?window.open(i):t&&await e([t])}),(0,s.A)(this,"handleOpen",async e=>{const{fetchObject:t,pushModalWindow:i,clearModalWindows:s}=this.props,{isAttach:l,filePathname:a,selectFile:n}=this.state;if(e.preventDefault(),e.stopPropagation(),n){s();try{await t("files",l?n._innerId:n._id),k.A.pushState(a)}catch(e){(0,g.k)(e,403)&&i("UNIVERSAL_INFO",{titleKey:"blockedAccess",infoKey:"noPermissionAskAdmin"}),(0,g.k)(e,404,"files not found")&&i("UNIVERSAL_INFO",{titleKey:"closedAccess",infoKey:"removeForever"})}}}),this.state={selectUrl:e.url,selectFile:e.file,allVideos:e.otherVideos.filter(t=>t.url!==e.url),isAttach:!1,filePathname:null,isVisibleRightButton:!1,isVisibleLeftButton:!1}}componentDidMount(){this.handleChangeConditionButtons()}componentDidUpdate(e){this.props.otherVideos.length!==e.otherVideos.length&&this.handleChangeConditionButtons()}static getDerivedStateFromProps(e){var t;let{file:i}=e;const s=!!i&&(!!i.isAttach||i.hasOwnProperty("_innerId"));return{isAttach:s,filePathname:(0,b.f)(i&&(s?{_id:i._innerId,_wsId:i._wsId||
1(null===(t=i.author)||void 0===t?void 0:t._wsId)}:i))}}render(){const{intl:e,currentWsId:t,popModalWindow:i}=this.props,{isAttach:s,allVideos:l,selectFile:a,selectUrl:n,filePathname:p,isVisibleRightButton:m,isVisibleLeftButton:v}=this.state;return!!a&&(0,H.jsxs)("div",{className:(0,o.A)("box-col scrollable nowrap",F),children:[(0,H.jsx)("video",{className:(0,o.A)(V),src:n,controls:!0}),(0,H.jsxs)("div",{className:(0,o.A)("box-row vertical-align nowrap space-between",E),children:[(0,H.jsxs)("div",{className:(0,o.A)("box-row nowrap auto-width width-overflow vertical-align"),children:[(0,H.jsx)(r.A,{className:(0,o.A)(I),text:a.title}),!!a.size&&(0,H.jsx)("span",{className:(0,o.A)("flex-auto",C),children:(0,x.Y)(a.size,1)||""})]}),(0,H.jsxs)("div",{className:(0,o.A)("box-row nowrap auto-width flex-auto vertical-align",N),children:[!a.overRate&&(!s||a.downloadable)&&!a.isIntroduction&&(0,H.jsx)(w.A,{icon:h.h,className:(0,o.A)("box-row nowrap auto-width vertical-align",y),onClick:this.handleDownload,children:(0,H.jsx)("u",{children:e.formatMessage({id:"download"})})}),s&&(0,H.jsx)(w.A,{icon:f.h,className:(0,o.A)("box-row nowrap auto-width vertical-align",y),onClick:this.handleSave,children:(0,H.jsx)("u",{children:e.formatMessage({id:"save2currentWS"})})}),(!s||!a.author||a.author._wsId===t)&&!a.isIntroduction&&(0,H.jsx)(B.A,{className:(0,o.A)("box-row nowrap auto-width flex-auto vertical-align no-decoration",M),type:"push",to:p,onClick:this.handleOpen,children:(0,H.jsx)("u",{children:e.formatMessage({id:"go2FileCard"})})})]})]}),!!l.length&&(0,H.jsxs)("div",{className:(0,o.A)("box-col nowrap vertical-align relative",_),children:[(0,H.jsx)("b",{children:e.formatMessage({id:"videosOnThisTopic"})}),(0,H.jsx)("div",{className:(0,o.A)("box-row nowrap",L),ref:e=>{this.list=e},onScroll:this.handleChangeConditionButtons,children:l.map(e=>(0,H.jsxs)("div",{className:(0,o.A)("box-col auto-width flex-auto pointer no-overflow",R),onClick:()=>this.handleSelectItem(e.id),children:[(0,H.jsx)("video",{src:e.url,preload:"metadata"}),(0,H.jsx)("div",{className:(0,o.A)(P),children:(0,H.jsx)("span",{children:e.title})})]},e.id))}),(0,H.jsx)(w.A,{icon:c.h,disabled:!v,className:(0,o.A)("box-row align-middle",D,{[U]:!v}),onClick:this.handleScrollRight}),(0,H.jsx)(w.A,{disabled:!m,icon:d.h,className:(0,o.A)("box-row align-middle",W,{[U]:!m}),onClick:this.handleScrollLeft})]}),(0,H.jsx)(w.A,{icon:u.h,className:(0,o.A)(S),onClick:i})]})}}(0,s.A)(z,"defaultProps",{currentWsId:"",currentCatalogId:"",otherVideos:[]});const K=(0,n.Zz)(m.j4,(0,a.Ng)(O.n,{fetchObject:j.ii,saveFileFromAttach:v.DI,checkQuotas:A.sQ,pushModalWindow:p.mt,popModalWindow:p.Vc,clearModalWindows:p.m_,downloadFiles:A.Si,getUrlFunction:A.Qf}))(z)},53138(e,t,i){i.d(t,{h:()=>o});var s,l,a=i(96540);function n(){return n=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var i=arguments[t];for(var s in i)({}).hasOwnProperty.call(i,s)&&(e[s]=i[s])}return e},n.apply(null,arguments)}const o=e=>a.createElement("svg",n({xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:23,height:37,viewBox:"0 0 23 37"},e),s||(s=a.createElement("defs",null,a.createElement("filter",{id:"a",width:"129.2%",height:"129.2%",x:"-10.4%",y:"-14.6%",filterUnits:"objectBoundingBox"},a.createElement("feOffset",{dx:1,in:"SourceAlpha",result:"shadowOffsetOuter1"}),a.createElement("feGaussianBlur",{in:"shadowOffsetOuter1",result:"shadowBlurOuter1",stdDeviation:1}),a.createElement("feColorMatrix",{in:"shadowBlurOuter1",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.3 0"})),a.createElement("path",{id:"b",d:"M9 9h18a2 2 0 1 0 0-4H7c-.552 0-1.052.224-1.414.586A2 2 0 0 0 5 7v20a2 2 0 1 0 4 0z"}))),l||(l=a.createElement("g",{fill:"none",fillRule:"evenodd",transform:"scale(1 -1)rotate(-45 -24.749 -1.707)"},a.createElement("use",{xlinkHref:"#b",fill:"#000",filter:"url(#a)"}),a.createElement("use",{xlinkHref:"#b",fill:"#FFF"}))));i.p},79120(e,t,i){i.d(t,{n:()=>n});var s=i(1081),l=i(39835),a=i(81431);const n=(0,s.Mz)([l.g3,a.Cp],(e,t)=>({currentWsId:e,currentCatalogId:t}))}}]); 2//# sourceMappingURL=2983.6979df9188565e0f8840.js.map
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.