PageSourceSearch

https://kochagronomicservices.com/_next/static/chunks/6475-8dcd66b299f5440c.js

js kochagronomicservices.com collected 2026-09-29 14:20:12 UTC 25,603 bytes, 1 lines download raw bytes

1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[6475],{5461:()=>{},47804:()=>{},58138:(e,l,a)=>{"use strict";a.d(l,{L:()=>i});let i=e=>{let l={id:null,urlval:null,type:null,success:!1};if(e.includes("/shorts/")){let[,a]=e.match(/\/shorts\/([^?&#]+)/)||[];a&&(l.id=a,l.type="youtube",l.success=!0)}else if(e.match(/^(http(s?)?:\/\/)?(www\.)?(youtube\.com\/(embed\/|v\/|.*[?&]v=)|youtu\.be\/)/)){let a="";e.match("embed")?[a]=e.split(/embed\//)[1].split('"'):[a]=e.split(/v\/|v=|youtu\.be\//)[1].split(/[?&]/),l.type="youtube",l.id=a,l.success=!0}else if(e.match("http(s?)://(player.)?vimeo\\.com")){let a=e.split(/video\/|http(s?):\/\/vimeo\.com\//),i=a[a.length-1];i.indexOf("/")>-1?([l.id]=i.split("/"),l.urlval="h=".concat(i.split("/")[1])):l.id=i,l.type="vimeo",l.success=!0}else e.match(/^https?:\/\/(www\.)?(imstagingstorage|blob\.net)/)?(l.type="htmlVideo",l.success=!0):e.match(/^https?:\/\/(www\.)?(imlivestorage|blob\.net)/)&&(l.type="htmlVideo",l.success=!0);return l}},96475:(e,l,a)=>{"use strict";a.d(l,{A:()=>f});var i=a(95155),t=a(12115),o=a(12758),d=a.n(o),n=a(95125),s=a(10113),r=a(15239),c=a(22020);let u={id:0,type:"Image",altText:"",caption:"",photoId:null,isCropped:!1,cropPhotoId:null,cropValues:null,videoId:null,videoSrc:null,videoThumbnailUrl:null,videoType:"Custom",imageFile:null,videoFile:null,SelectedVideoSrc:null,vimeoVideoFileName:null};a(47804),a(5461);let m={unit:"%",x:0,y:0,width:1024,height:576,aspect:16/9};function p(e){let{ShowCrop:l,imageObj:a,setCropImage:o,handleCancelClick:d,cropRatioWidth:n,cropRatioheight:s,cancelClicked:r=!1}=e;if(a&&a.photo){let e=n&&s?{...m,aspect:n/s}:m,[d,u]=(0,t.useState)("cropValues"in a?JSON.parse(a.cropValues):e),p=a.photo.originalFileName.split("."),h=p[p.length-1],v=a.previewsrc.split("/").slice(0,-2).join("/"),g="".concat(v,"/og/").concat(a.photo.fileGuid,".").concat(h);return!r&&(l||a.isCropped)?(0,i.jsx)(c.Ay,{crop:d,onChange:(e,l)=>{u(l),o(l)},aspect:n/s,children:(0,i.jsx)("img",{className:"uploadImage",src:g,alt:a.altText||"Uploaded image for cropping"})}):(0,i.jsx)("div",{className:"uploadImageWrapper",children:(0,i.jsx)("img",{className:"uploadImage",src:g,alt:a.altText||"Uploaded image"})})}d()}function h(e){let{ShowCrop:l,BaseImage:a,CropImage:o,setCropImage:d,cropRatioWidth:n,cropRatioheight:s}=e,r=URL.createObjectURL(a);return((0,t.useEffect)(()=>{if(null!=a){let e=new Image;e.src=URL.createObjectURL(a),e.onload=()=>{let l=e.width/e.height,a=n/s,i=e.width,t=e.height;l>a?i=e.height*a:t=e.width/a;let o=(e.width-i)/2,r=(e.height-t)/2;d({unit:"%",x:o/e.width*100,y:r/e.height*100,width:i/e.width*100,height:t/e.height*100,aspect:n/s})}}},[]),l)?(0,i.jsx)(c.Ay,{crop:o,onChange:(e,l)=>{d(l)},aspect:n/s,children:(0,i.jsx)("img",{className:"",src:r,alt:"react crop"})}):(0,i.jsx)("div",{className:"uploadImageWrapper",children:(0,i.jsx)("img",{className:"uploadImage",src:r,alt:"upload base url"})})}function v(e){let{requireAltText:l,showModal:a,forceCrop:o,uploadImageObj:d,editImageObj:n,onCloseModal:s,onSaveModal:r,onCustomSaveModal:c,cropWidth:v,cropHeight:g}=e,[b,x]=(0,t.useState)(o),[A,j]=(0,t.useState)(m),[y,f]=(0,t.useState)(null!=n?n:u),I=(0,t.useRef)(null),[C,N]=(0,t.useState)(!1);(0,t.useEffect)(()=>{null!=n&&"isCropped"in n&&x(n.isCropped)},[n,a]),(0,t.useEffect)(()=>{n&&n.cropValues?j(JSON.parse(n.cropValues)):j(m)},[n]),(0,t.useEffect)(()=>{n?f(n):f(u)},[n]);let S=async()=>{if(l&&""===y.altText)return void document.getElementById("alt-text").classList.add("input-validation-error");let e=JSON.parse(JSON.stringify(y));e.cropValues=JSON.stringify(A),e.imageFile=d,e.isCropped=b,r(e),x(!1),j(m),s(),f(u)},T=()=>{f(y),b?w():(N(!1),s())},w=()=>{f(u),x(!1),N(!1),s()};return a?(0,i.jsx)("div",{"data-section":"CropImageOverlayPreview",className:"admin-modal-overlay installed-thumbnail-modal",onClick:e=>{I.current.contains(e.target)||w()},children:(0,i.jsx)("div",{className:"admin-modal admin-add-role",ref:I,children:(0,i.jsxs)("div",{className:"admin-modal-scroll",children:[(0,i.jsx)("button",{type:"button",className:"admin-modal-close",onClick:w,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"close"})}),b?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)("p",{className:"admin-modal-heading",children:"Thumbnail Preview "}),b?(0,i.jsx)("p",{className:"admin-modal-heading",children:"Crop Image"}):(0,i.jsx)(i.Fragment,{}),(0,i.jsx)("div",{className:"admin-modal-row",children:(0,i.jsxs)("div",{className:"admin-modal-cell",children:[l?(0,i.jsx)("label",{className:"admin-default-label",htmlFor:"alt-text",children:"Alt Text (Required)"}):(0,i.jsx)("label",{className:"admin-default-label",htmlFor:"alt-text",children:"Alt Text"}),(0,i.jsx)("input",{id:"alt-text",type:"text",className:"admin-default-input-text",value:y.altText,onChange:e=>f({...y,altText:e.target.value})})]})}),(0,i.jsx)("div",{className:"admin-modal-row full",children:(0,i.jsx)("div",{className:"admin-modal-cell full",children:null!==d?(0,i.jsx)(h,{ShowCrop:b,BaseImage:d,CropImage:A,setCropImage:j,cropRatioWidth:v,cropRatioheight:g}
1):(0,i.jsx)(p,{imageObj:n,ShowCrop:b,setCropImage:j,handleCancelClick:T,cancelClicked:C,cropRatioWidth:v,cropRatioheight:g})})}),(0,i.jsxs)("div",{className:"admin-modal-button-wrap",children:[b?(0,i.jsx)("button",{type:"button",className:"admin-modal-button",onClick:T,children:"Cancel"}):(0,i.jsx)(i.Fragment,{}),b?(0,i.jsx)(i.Fragment,{}):(0,i.jsx)("button",{type:"button",className:"admin-modal-button",onClick:()=>{x(!0),N(!1)},children:"Crop Image"}),(0,i.jsxs)("button",{type:"button",className:"admin-modal-button power",onClick:null!=c?c:S,children:["Save",b?" Crop":(0,i.jsx)(i.Fragment,{})]})]})]})})}):(0,i.jsx)(i.Fragment,{})}p.propTypes={ShowCrop:d().bool,imageObj:d().object,setCropImage:d().func,handleCancelClick:d().func,cropRatioWidth:d().number,cropRatioheight:d().number,cancelClicked:d().bool},p.defaultProps={cropRatioWidth:16,cropRatioheight:9},h.propTypes={ShowCrop:d().bool,BaseImage:d().object,CropImage:d().object,setCropImage:d().func,cropRatioWidth:d().number,cropRatioheight:d().number},h.defaultProps={cropRatioWidth:16,cropRatioheight:9},v.propTypes={requireAltText:d().bool,showModal:d().bool,forceCrop:d().bool,uploadImageObj:d().object,editImageObj:d().object,onCloseModal:d().func,onSaveModal:d().func,onCustomSaveModal:d().func,cropWidth:d().number,cropHeight:d().number},v.defaultProps={requireAltText:!1,forceCrop:!1,uploadImageObj:null,editImageObj:null,onCustomSaveModal:null};var g=a(11929),b=a(58138);let x={src:"/_next/static/media/video-processing.6ac77b88.jpg",height:488,width:884,blurDataURL:"data:image/jpeg;base64,/9j/2wBDAAoKCgoKCgsMDAsPEA4QDxYUExMUFiIYGhgaGCIzICUgICUgMy03LCksNy1RQDg4QFFeT0pPXnFlZXGPiI+7u/v/2wBDAQoKCgoKCgsMDAsPEA4QDxYUExMUFiIYGhgaGCIzICUgICUgMy03LCksNy1RQDg4QFFeT0pPXnFlZXGPiI+7u/v/wgARCAAEAAgDASIAAhEBAxEB/8QAFQABAQAAAAAAAAAAAAAAAAAAAAf/xAAUAQEAAAAAAAAAAAAAAAAAAAAA/9oADAMBAAIQAxAAAACjA//EABkQAAIDAQAAAAAAAAAAAAAAABIhAAIRcf/aAAgBAQABPwAWRW5qn//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQIBAT8Af//EABQRAQAAAAAAAAAAAAAAAAAAAAD/2gAIAQMBAT8Af//Z",blurWidth:8,blurHeight:4};function A(e){let{showModal:l,onCloseModal:a,onSaveModal:o,editVideoObj:d,onMediaDelete:s}=e,[c,u]=(0,t.useState)(void 0),[m,p]=(0,t.useState)(!1),[h,A]=(0,t.useState)(null),[j,y]=(0,t.useState)(!1),[f,I]=(0,t.useState)(""),[C,N]=(0,t.useState)("videoLink"),[S,T]=(0,t.useState)(!1),[w,k]=(0,t.useState)(0),[V,F]=(0,t.useState)(""),[U,M]=(0,t.useState)(""),P=(0,t.useRef)(null),[O,R]=(0,t.useState)(!1),E=(0,t.useRef)(null),L=(0,t.useRef)(null),D=()=>{(null==c?void 0:c.id)&&s(null==c?void 0:c.id),u(void 0)};(0,t.useEffect)(()=>{if(N("videoLink"),d){R(!1);let e=null==d?void 0:d.videoSrc;if(null==d?void 0:d.videoSrc){let l=(0,b.L)(null==d?void 0:d.videoSrc);l&&((null==d?void 0:d.videoType)===0?e=null==d?void 0:d.videoSrc:(null==l?void 0:l.type)==="vimeo"?e=(null==d?void 0:d.selectedVideoSrc)!=="videoLink"?"https://player.vimeo.com/video/".concat(l.id,"?title=0&byline=0&portrait=0&").concat(l.urlval?"".concat(l.urlval,"&"):"","autoplay=true&loop=1"):null==d?void 0:d.videoSrc:(null==l?void 0:l.type)==="htmlVideo"&&(e=null==d?void 0:d.videoSrc))}let l={...d,videoSrc:e};u(l),N((null==l?void 0:l.selectedVideoSrc)||null)}},[d]);let Q=async e=>{let l=await G(e.target.value);l&&u({...c,videoId:l.videoId,videoSrc:document.getElementById("video-url").value,videoThumbnailUrl:l.videoThumbnail,videoType:l.videoType,type:"Video",imageFile:null,selectedVideoSrc:C})},B=async e=>{let l=e.target.value;""!==l&&M(""),N(l),u({...c,videoId:null,videoSrc:null,videoThumbnailUrl:null,videoType:null,selectedVideoSrc:l})},W=async()=>{u({...c,videoCustomThumbnailUrl:void 0,isCropped:!1,photoId:void 0,photo:void 0,cropPhotoId:void 0,cropPhoto:void 0,cropValues:void 0})},G=async e=>{let l={videoId:"",videoThumbnail:"",videoType:null};if(!e)return l;if(e.includes("youtu"))return e.includes("/shorts/")?[,l.videoId]=e.match(/\/shorts\/([^?&#]+)/):e.includes("youtu.be")?e.match(/\.be\/([^?&#]+)/)&&([,l.videoId]=e.match(/\.be\/([^?&#]+)/)):e.includes("/embed/")?[,l.videoId]=e.match(/\/embed\/([^&#?]*)/):e.match(/[?&]v=([^?&#]+)/)&&([,l.videoId]=e.match(/[?&]v=([^?&#]+)/)),l.videoThumbnail="https://img.youtube.com/vi/".concat(l.videoId,"/maxresdefault.jpg"),l.videoType="YouTube",l;if(e.includes("vimeo")){[,l.videoId]=e.match(/com\/(\d+)/)||[],l.videoType="Vimeo";try{var a,i;let e=await fetch("https://vimeo.com/api/v2/video/".concat(l.videoId,".json")),t=await e.json();l.videoThumbnail=(null==(a=t[0])?void 0:a.thumbnail_large)||(null==(i=t[0])?void 0:i.thumbnail_medium)||""}catch(e){console.error("Error fetching Vimeo thumbnail:",e)}}return l},_=()=>{u(void 0),R(!1),a()},q=async(e,l,a)=>{F("Processing...");try{var i;let t=await n.A.post("".concat("https://doccenter.kochagronomicservices.com","/api/media/finalizeUpload"),{fileName:e,totalChunks:l,uploadFileName:a});(null==(i=t.data)?void 0:i.success)&&(F("Video uploaded successfully"),R(!1),setTimeout(()=>{u(e=>{var l,a,i,o,d,n,s,r,c,u;return{...e,videoId:null==t||null==(a=t.data)||null==(l=a.data)?void 0:l.videoId,videoSrc:null==t||null==(o=t.data)||null==(i=o.data)?void 0:i.videoSrc,videoThumbnailUrl:null==t||null==(n=t.data)||null==(d=n.data)?void 0:d.videoThumbnailUrl,videoType:null==t||null==(r=t.data)||null==(s=r.data)?void 0:s.videoType,vimeoVideoFileName:null==t||null==(u=t.data)||null==(c=u.data)?void 0:c.vimeoVideoFileName,type:"Video",imageFile:null,selectedVideoSrc:C}}),F(""),k(0),I("")},2e3))}catch(e){console.error("Error finalizing upload",e)}},z=async e=>{(0,n.A)({url:"".concat("https://doccenter.kochagronomicservices.com","/api/media/add"),method:"POST",headers:{"Content-Type":"multipart/form-data"},data:e}).then(e=>{var l,a,i,t,o,d,n,s,r,m,h,v,g;u({...c,videoCustomThumbnailUrl:null==e||null==(l=e.data)?void 0:l.previewsrc,isCropped:null==e||null==(i=e.data)||null==(a=i.data)?void 0:a.isCropped,photoId:null==e||null==(o=e.data)||null==(t=o.data)?void 0:t.photoId,photo:null==e||null==(n=e.data)||null==(d=n.data)?void 0:d.photo,cropPhotoId:null==e||null==(r=e.data)||null==(s=r.data)?void 0:s.cropPhotoId,cropPhoto:null==e||null==(h=e.data)||null==(m
1=h.data)?void 0:m.cropPhoto,cropValues:null==e||null==(g=e.data)||null==(v=g.data)?void 0:v.cropValues}),A(null),p(!1)}).catch(e=>{alert(e)})};return l?(0,i.jsx)(i.Fragment,{children:(0,i.jsx)("div",{"data-section":"CropImageOverlayPreview",className:"admin-modal-overlay installed-add-modal",onClick:e=>{L.current.contains(e.target)||_()},children:(0,i.jsxs)("div",{className:"admin-modal",ref:L,children:[(0,i.jsx)("button",{className:"admin-modal-close",type:"button",onClick:_,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"close"})}),(0,i.jsx)("p",{className:"admin-modal-heading",children:"Add Video"}),(0,i.jsx)("div",{className:"admin-modal-row full",children:(0,i.jsxs)("div",{className:"admin-modal-cell full",children:[(0,i.jsxs)("div",{className:"financial-skill-tile",style:{display:"none"},children:[(0,i.jsxs)("select",{className:"admin-default-select",onChange:B,value:C||null,children:[(0,i.jsx)("option",{value:null,children:"Select Video Source"}),(0,i.jsx)("option",{value:"uploadVideo",children:"Upload Video"}),(0,i.jsx)("option",{value:"videoLink",children:"Enter Link"})]}),""!==U&&(0,i.jsx)("p",{className:"error-messagess",children:U})]}),(null==c?void 0:c.videoSrc)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)("div",{className:"financial-skill-tile",children:[(0,i.jsx)("label",{className:"admin-default-label",htmlFor:"video-url",children:"videoLink"===C?"URL Link":"Video"}),"videoLink"===C&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{children:null==c?void 0:c.videoSrc.replace("https://","")}),(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action",onClick:D,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"delete"})})]}),"uploadVideo"===C&&(0,i.jsx)("div",{className:"video-priew-section",children:(0,i.jsx)("div",{className:"video-priew",children:O?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("iframe",{ref:P,src:c.videoSrc,title:"video",frameBorder:"0",allow:"autoplay;fullscreen"}),(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action",onClick:D,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"close"})})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(r.default,{src:(null==c?void 0:c.videoCustomThumbnailUrl)?c.videoCustomThumbnailUrl:(null==c?void 0:c.videoThumbnailUrl)==="/images/video-processing.jpg"?x:null==c?void 0:c.videoThumbnailUrl,alt:"Video Thumbnail",fill:!0}),(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action",onClick:D,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"close"})}),!O&&(null==c?void 0:c.videoSrc.includes("vimeo.com"))?(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action play-icon",onClick:()=>{R(!O)},children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:O?"pause":"play_arrow"})}):(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action play-icon",children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:O?"pause":"play_arrow"})})]})})})]}),(0,i.jsxs)("div",{className:"admin-modal-cell full video-thumbnail-cell",children:[(0,i.jsx)("label",{className:"admin-default-label",htmlFor:"video-url",children:"Thumbnail"}),(0,i.jsxs)("div",{className:"videoThumbWrap video-thumbnail",children:[(0,i.jsx)(r.default,{className:"videoThumbPreview video-thumbnail-image",src:(null==c?void 0:c.videoCustomThumbnailUrl)?c.videoCustomThumbnailUrl:(null==c?void 0:c.videoThumbnailUrl)==="/images/video-processing.jpg"?x:null==c?void 0:c.videoThumbnailUrl,alt:"Thumbnail",fill:!0}),(0,i.jsxs)("div",{className:"media-thumbnail-action-wrap ".concat(j?" input-validation-error":""),children:[(0,i.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{p(!0),A(e.target.files[0])},style:{display:"none"},ref:E}),(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action red margin-bt-edit-image",onClick:()=>E.current.click(),children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"edit"})}),(null==c?void 0:c.videoCustomThumbnailUrl)&&(0,i.jsx)("button",{type:"button",className:"media-thumbn
1ail-action red",onClick:W,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"delete"})})]})]})]}),(0,i.jsx)(v,{showModal:m,forceCrop:!1,uploadImageObj:h,editImageObj:null,onCloseModal:()=>p(!1),onSaveModal:z})]}):(0,i.jsxs)(i.Fragment,{children:["videoLink"===C&&(0,i.jsxs)("div",{className:"financial-skill-tile",children:[(0,i.jsx)("label",{className:"admin-default-label",htmlFor:"video-url",children:"Enter URL*"}),(0,i.jsx)("input",{id:"video-url","data-imvideosection":"videoUrl",className:"admin-default-input-text ".concat(j?" input-validation-error":""),type:"text",onChange:Q,defaultValue:null==c?void 0:c.videoSrc})]}),"uploadVideo"===C&&(0,i.jsxs)("div",{className:"financial-skill-tile",children:[0===w&&""===V&&(0,i.jsxs)("button",{type:"button",className:"admin-modal-button",children:["Upload Video",(0,i.jsx)("input",{type:"file",accept:"video/*",onChange:e=>{T(!1);let l=e.target.files[0];if(void 0!==l&&null!=l){if(l.size>0x40000000)return void T(!0);(e=>{let l=Math.ceil(e.size/2097152),a=0,i=e.name.split(".").pop(),t=e.name.split(".").slice(0,-1).join("."),o=(0,g.A)(),d="".concat(t,"_").concat(o,".").concat(i),s=0,r=async()=>{let i=2097152*a,t=Math.min(i+2097152,e.size),o=e.slice(i,t),c=new FormData;c.append("videoChunk",o),c.append("chunkNumber",a),c.append("fileName",e.name),c.append("uploadFileName",d);try{await n.A.post("".concat("https://doccenter.kochagronomicservices.com","/api/media/uploadChunk"),c,{headers:{"Content-Type":"multipart/form-data"},onUploadProgress:e=>{let i=e.loaded/e.total*(1/l),t=Math.floor((a+i)/l*100);if(t>s){let e=(l,a)=>{l<=a&&(k(l),requestAnimationFrame(()=>e(l+1,a)))};e(s+1,t),s=t}}}),(a+=1)<l?r():(k(100),q(e.name,l,d))}catch(e){console.error("Error uploading chunk",e)}};r()})(l)}}})]}),(0,i.jsx)("div",{children:(0,i.jsxs)("div",{children:[w>0&&w<100&&(0,i.jsxs)("span",{children:["Uploading file: ",Math.round(w),"%"]}),V&&w>=100&&(0,i.jsx)("span",{children:V})]})}),S&&(0,i.jsx)("p",{className:"error-messagess",children:" File size exceeds the 1GB limit."}),"                                        "]})]}),(0,i.jsx)("div",{className:"upload-video-loader"})]})}),(0,i.jsxs)("div",{className:"admin-modal-button-wrap",children:[(0,i.jsx)("p",{className:"error-messagess",children:f||""}),(0,i.jsx)("button",{type:"button",className:"admin-modal-button","data-action":"closeOverlay",onClick:_,children:"Cancel"}),(0,i.jsx)("button",{type:"button",className:"admin-modal-button power",onClick:()=>(I(""),null===C||"Select Video Source"===C)?(y(!0),M("Please select a video source."),!1):w>0&&w<100||""!==V&&w>=100?(y(!0),I("Video is in process."),!1):(null==c?void 0:c.videoSrc)||"videoLink"!==C?(null==c?void 0:c.videoSrc)||"uploadVideo"!==C?(y(!1),o(c),u(void 0),a(),!0):(y(!0),I("Video is required."),!1):(y(!0),I("URL is required."),!1),children:"Save Changes"})]})]})})}):(0,i.jsx)(i.Fragment,{})}function j(e){let{imageId:l,imageSrc:a,imageAlt:t,children:o}=e,d=!1;return a&&"string"==typeof a.src&&(d=a.src.includes("/video-processing")),(0,i.jsxs)("div",{className:"galleryItem node-selector select-handler videoThumbWrap","data-element":"galleryItem","data-id":l,children:[d?(0,i.jsx)(r.default,{className:"galleryImage",src:x,alt:t,fill:!0}):(0,i.jsx)("img",{className:"galleryImage",src:a,alt:t}),o]})}function y(e){let{mediaItems:l,onMediaDelete:a,onMediaEdit:o,isPlaceHolder:d,allowSorting:n,sortInTable:r,saveMediaItems:c}=e;console.log(d);let u=e=>{o(e.target.closest('[data-element="galleryItem"]').dataset.id)},m=e=>{let l=e.target.closest('[data-element="galleryItem"]').dataset.id;null!=l&&a(l)},[p,h]=(0,t.useState)({});(0,t.useEffect)(()=>{h(l)},[l]);let v=e=>(null==e?void 0:e.videoCustomThumbnailUrl)?e.videoCustomThumbnailUrl:(null==e?void 0:e.previewsrc)&&(null==e?void 0:e.previewsrc)==="/images/video-processing.jpg"?x:null==e?void 0:e.previewsrc;if(l.length>0)return(0,i.jsx)(i.Fragment,{children:!0===n?(0,i.jsx)(s.A,{nodeSelector:".node-selector",handleSelector:".select-handler",allowDragAndDrop:!0,onDragEnd:(e,l)=>{let a=[...p],[i]=a.splice(e,1);a.splice(l,0,i),h(a),console.log(r),c(a)},children:(0,i.jsx)("div",{className:"mediaGallery",children:p.map((e,l)=>(0,i.jsx)(j,{imageId:e.id,imageSrc:v(e),imageAlt:e.altText,children:(0,i.jsxs)("div",{className:"media-thumbn
1ail-action-wrap",children:[(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action red margin-bt-edit-image",onClick:u,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"edit"})}),(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action red",onClick:m,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"delete"})})]})},"mediaItem_".concat(l)))})}):(0,i.jsx)("div",{className:"mediaGallery",children:l.map((e,l)=>(0,i.jsx)(j,{imageId:e.id,imageSrc:v(e),imageAlt:e.altText,children:(0,i.jsxs)("div",{className:"media-thumbnail-action-wrap",children:[(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action red margin-bt-edit-image",onClick:u,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"edit"})}),(0,i.jsx)("button",{type:"button",className:"media-thumbnail-action red",onClick:m,children:(0,i.jsx)("span",{className:"material-symbols-outlined",children:"delete"})})]})},"mediaItem_".concat(l)))})})}function f(e){let{forceCrop:l,allowGallery:a,imageOnly:o,videoOnly:d,requireAltText:s,mediaItems:r,saveMediaItems:c,customImageSave:u,isPlaceHolder:m,allowSorting:p,sortInTable:h,idealSizeText:g,width:b,higth:x,validationOnVideoUpload:j,maxLengthImage:f=0,maxImageText:I}=e,[C,N]=(0,t.useState)(!1),[S,T]=(0,t.useState)(!1),[w,k]=(0,t.useState)(null),[V,F]=(0,t.useState)(null),[U,M]=(0,t.useState)(null!=r?r:[]),P=async e=>{(0,n.A)({url:"".concat("https://doccenter.kochagronomicservices.com","/api/media/add"),method:"POST",headers:{"Content-Type":"multipart/form-data"},data:e}).then(l=>{var a,i,t,o,d,n,s,r,u,m,p,h,v,g,b,x,A,j,y,f,I,C,S,w,V,F,P,O,R,E,L,D,Q,B,W,G,_,q,z,H,J,Y,K,X;let Z={id:null==l||null==(i=l.data)||null==(a=i.data)?void 0:a.id,altText:(null==l||null==(o=l.data)||null==(t=o.data)?void 0:t.altText)&&(null==l||null==(n=l.data)||null==(d=n.data)?void 0:d.altText.trim())!==""?null==l||null==(r=l.data)||null==(s=r.data)?void 0:s.altText:null==l||null==(p=l.data)||null==(m=p.data)||null==(u=m.photo)?void 0:u.originalFileName,previewsrc:null==l||null==(h=l.data)?void 0:h.previewsrc,mediaId:null==l||null==(v=l.data)?void 0:v.data.id,photo:null==l||null==(b=l.data)||null==(g=b.data)?void 0:g.photo,cropValues:null==l||null==(A=l.data)||null==(x=A.data)?void 0:x.cropValues,videoThumbnailUrl:null==l||null==(y=l.data)||null==(j=y.data)?void 0:j.videoThumbnailUrl,videoSrc:null==l||null==(I=l.data)||null==(f=I.data)?void 0:f.videoSrc,type:null==l||null==(S=l.data)||null==(C=S.data)?void 0:C.type,isCropped:null==l||null==(V=l.data)||null==(w=V.data)?void 0:w.isCropped,photoId:null==l||null==(P=l.data)||null==(F=P.data)?void 0:F.photoId,videoId:null==l||null==(R=l.data)||null==(O=R.data)?void 0:O.videoId,videoType:null==l||null==(L=l.data)||null==(E=L.data)?void 0:E.videoType,isVideoThumbnail:!1,cropPhoto:null==l||null==(Q=l.data)||null==(D=Q.data)?void 0:D.cropPhoto,cropPhotoId:null==l||null==(W=l.data)||null==(B=W.data)?void 0:B.cropPhotoId,videoCustomThumbnailUrl:(null==l||null==(_=l.data)||null==(G=_.data)?void 0:G.photoId)&&(null==l||null==(z=l.data)||null==(q=z.data)?void 0:q.videoSrc)?null==l||null==(H=l.data)?void 0:H.previewsrc:"",selectedVideoSrc:null==l||null==(Y=l.data)||null==(J=Y.data)?void 0:J.selectedVideoSrc,vimeoVideoFileName:null==l||null==(X=l.data)||null==(K=X.data)?void 0:K.vimeoVideoFileName};if(k(null),N(!1),T(!1),null!=e&&e.id>0){let l=U.findIndex(l=>l.id===e.id);l>-1?(U.splice(l,1),U.splice(l,0,Z),c([...U])):(M([...U,Z]),c([...U,Z]))}else M([...U,Z]),c([...U,Z])}).catch(e=>{alert(e)})},O=e=>{if(null===e)return;let l=parseInt(e,10);M(U.filter(e=>e.id!==l)),c(U.filter(e=>e.id!==l))};return(0,t.useEffect)(()=>{M(r)},[r]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(y,{mediaItems:U,onMediaDelete:O,onMediaEdit:e=>{if(null===e)return;let l=parseInt(e,10),a=U.filter(e=>e.id===l)[0];F(a),a&&0===a.type&&N(!0),a&&1===a.type&&T(!0)},isPlaceHolder:m,allowSorting:p,sortInTable:h,saveMediaItems:c}),!a&&U.length>0?null:(0,i.jsx)("div",{className:"mediaOptions",children:(0===f||U.length<f)&&(0,i.jsxs)(i.Fragment,{children:[o||!d?(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("label",{className:"mediaAddImage",children:[(0,i.jsx)("input",{type:"file",accept:"image/*",onChange:e=>{N(!0),k(e.target.files[0])}}),(0,i.jsx)("span",{className:"mediaAdd-button",children:"Upload Image "}),(0,i.jsxs)("div",{className:"image-info",children:[I||"ideal image size"," :",(0,i.jsx)("br",{}),g]})]})}):(0,i.jsx)(i.Fragment,{}),d||!o?(0,i.jsx)("button",{type:"button",className:"mediaAddVideo",onClick:()=>void(C&&N(!1),void 0!==j?j()&&T(!0):T(!0),F(null)),children:(0,i.jsx)("span",{className:"mediaAdd-button",children:"Add Video"})}):(0,i.jsx)(i.Fragment,{})]})}),(0,i.jsx)(A,{requireAltText:s,showModal:S,editVideoObj:V,onCloseModal:()=>{F(null),T(!1)},onSaveModal:P,onMediaDelete:O}),(0,i.jsx)(v,{requireAltText:s,showModal:C,forceCrop:l,uploadImageObj:w,editImageObj:V,onCloseModal:()=>{N(!1),F(null)},onSaveModal:P,onCustomImageSave:u,cropWidth:b,cropHeight:x})]})}
1A.propTypes={showModal:d().bool,onCloseModal:d().func,onSaveModal:d().func,editVideoObj:d().object,onMediaDelete:d().func},A.defaultProps={editVideoObj:null},j.propTypes={imageId:d().number,imageSrc:d().string,imageAlt:d().string,children:d().node},y.propTypes={mediaItems:d().array,onMediaDelete:d().func,onMediaEdit:d().func,isPlaceHolder:d().bool,allowSorting:d().bool,sortInTable:d().string,saveMediaItems:d().func},f.propTypes={forceCrop:d().bool,imageOnly:d().bool,videoOnly:d().bool,requireAltText:d().bool,allowGallery:d().bool,mediaItems:d().array,saveMediaItems:d().func,customImageSave:d().func,isPlaceHolder:d().bool,allowSorting:d().bool,sortInTable:d().string,idealSizeText:d().string,maxImageText:d().string,width:d().number,higth:d().number,validationOnVideoUpload:d().func,maxLengthImage:d().number},f.defaultProps={forceCrop:!0,imageOnly:!1,videoOnly:!1,requireAltText:!1,allowGallery:!0,mediaItems:[],saveMediaItems:null,customImageSave:null,allowSorting:!1,sortInTable:null,idealSizeText:"750px x 630px",maxLengthImage:d().number}}}]);

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.