PageSourceSearch

https://netgain.se/_next/static/chunks/9089.cc1ea5a399da4c96.js

js netgain.se collected 2026-10-04 12:23:29 UTC 3,714 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[9089],{19089:(e,l,a)=>{a.r(l),a.d(l,{UploadComponent:()=>b});var t=a(2866),o=a(47347),n=a(95992),i=a(3700),s=a(71882),c=a(92995),d=a(88363),r=a(73639),u=a(53154),m=a(2303),h=a(25661),p=a(95),g=a(5554),v=a(49602),_={depth:0},b=e=>{var l,a,b,f;let{className:w,data:{fields:x,relationTo:j,value:N},format:D,nodeKey:C}=e;if("object"==typeof N)throw Error("Upload value should be a string or number. The Lexical Upload component should not receive the populated value object.");let{config:{routes:{api:S},serverURL:y},getEntityConfig:k}=(0,u.c)(),P=(0,v.useRef)(null),{uuid:U}=(0,i.b)(),E=(0,m.useEditDepth)(),[T]=(0,c.DF)(),{editorConfig:z,fieldProps:{schemaPath:B}}=(0,i.b)(),L=(0,d.a)(),{i18n:R,t:F}=(0,h.d)(),[K,I]=(0,v.useReducer)(e=>e+1,0),[A]=(0,v.useState)(()=>k({collectionSlug:j})),M=(0,v.useId)(),O=(0,m.formatDrawerSlug)({slug:"lexical-upload-drawer-"+U+M,depth:E}),{toggleDrawer:q}=(0,o.a)(O,!0),{closeDocumentDrawer:G,DocumentDrawer:H,DocumentDrawerToggler:J}=(0,n.a)({id:N,collectionSlug:A.slug}),[{data:Q},{setParams:V}]=(0,m.usePayloadAPI)("".concat(y).concat(S,"/").concat(A.slug,"/").concat(N),{initialParams:_}),W=(null==Q?void 0:Q.thumbnailURL)||(null==Q?void 0:Q.url),X=(0,v.useCallback)(()=>{T.update(()=>{var e;null==(e=(0,p.nsf)(C))||e.remove()})},[T,C]),Y=(0,v.useCallback)(e=>{V({..._,cacheBust:K}),I(),G()},[V,K,G]),Z=null==z||null==(f=z.resolvedFeatureMap)||null==(b=f.get("upload"))||null==(a=b.sanitizedClientFeatureProps.collections)||null==(l=a[A.slug])?void 0:l.hasExtraFields,$=(0,v.useCallback)((e,l)=>{T.update(()=>{let e=(0,p.nsf)(C);if(e){let a={...e.getData(),fields:l};e.setData(a)}})},[T,C]),ee=W&&(null==Q?void 0:Q.width)&&(null==Q?void 0:Q.height)?Q.width>Q.height?"landscape":"portrait":"landscape";return(0,s.jsxs)("div",{className:"".concat(w,"__contents ").concat(w,"__contents--").concat(ee),"data-align":D||void 0,"data-filename":null==Q?void 0:Q.filename,ref:P,children:[(0,s.jsxs)("div",{className:"".concat(w,"__card"),children:[(0,s.jsxs)("div",{className:"".concat(w,"__media"),children:[(0,s.jsx)(m.Thumbnail,{collectionSlug:j,fileSrc:(0,g.w)(null==Q?void 0:Q.mimeType)?W:null,height:null==Q?void 0:Q.height,size:"none",width:null==Q?void 0:Q.width}),L&&(0,s.jsx)("div",{className:"".concat(w,"__overlay ").concat(w,"__floater"),children:(0,s.jsxs)("div",{className:"".concat(w,"__actions"),role:"toolbar",children:[Z?(0,s.jsx)(m.Button,{buttonStyle:"icon-label",className:"".concat(w,"__upload-drawer-toggler"),disabled:!L,el:"button",icon:"edit",onClick:q,round:!0,size:"medium",tooltip:F("fields:editRelationship")}):null,(0,s.jsx)(m.Button,{buttonStyle:"icon-label",className:"".concat(w,"__swap-drawer-toggler"),disabled:!L,el:"button",icon:"swap",onClick:()=>{T.dispatchCommand(t.b,{replace:{nodeKey:C}})},round:!0,size:"medium",tooltip:F("fields:swapUpload")}),(0,s.jsx)(m.Button,{buttonStyle:"icon-label",className:"".concat(w,"__removeButton"),disabled:!L,icon:"x",onClick:e=>{e.preventDefault(),X()},round:!0,size:"medium",tooltip:F("fields:removeUpload")})]})})]}),(0,s.jsxs)("div",{className:"".concat(w,"__metaOverlay ").concat(w,"__floater"),children:[(0,s.jsx)(J,{className:"".concat(w,"__doc-drawer-toggler"),children:(0,s.jsx)("strong",{className:"".concat(w,"__filename"),children:(null==Q?void 0:Q.filename)||F("general:untitled")})}),(0,s.jsx)("div",{className:"".concat(w,"__collectionLabel"),children:(0,r.s)(A.labels.singular,R)})]})]}),N?(0,s.jsx)(H,{onSave:Y}):null,Z?(0,s.jsx)(t.a,{data:x,drawerSlug:O,drawerTitle:F("general:editLabel",{label:(0,r.s)(A.labels.singular,R)}),featureKey:"upload",handleDrawerSubmit:$,schemaPath:B,schemaPathSuffix:A.slug}):null]})}}}]);

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.