1!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="0842e4fb-d4f0-53b6-93f9-2c50155b628e")}catch(e){}}(); 2(self.webpackChunkclient=self.webpackChunkclient||[]).push([[593],{1462:(e,t,n)=>{"use strict";n.d(t,{Z:()=>k});var a=n(30837),r=n(95779),l=n(29692),i=n(55218),o=n(84193),u=n(72891),c=n(71533),s=n(51781),d=n(36471),h=n(54054),p=n(59496),g=n(82004),f=n(98965),m=n(50266),v=n(28394),y=n(87615),Z=p.createElement,b=(0,y.Z)((function(e){return{input:{marginTop:"20px"}}}));const k=function(e){var t,n,y=b(),k=(0,g.cI)({mode:"onChange",shouldUnregister:!1}),C=k.register,w=k.getValues,I=k.errors,D=(0,m.Ds)(),T=D.enqueueSnackbar,x=(D.closeSnackbar,p.useState(e.model.Category?f.gJ.findIndex((function(t){return t===e.model.Category})):"")),S=(0,r.Z)(x,2),P=S[0],N=S[1];function R(){var t=w();t.Tags=W,t.Category=P,t.PublicID=e.model.PublicID,e.editCB(e.modelIndex,t)}var L=/^[\w\-\s]+$/,E=p.useState(e.model.Tags.map((function(e){return{key:Math.random(),label:e}}))),O=(0,r.Z)(E,2),W=O[0],q=O[1];return p.useEffect((function(){R()}),[W,P]),Z(p.Fragment,null,Z(l.Z,{label:"Title",name:"Title",className:y.input,fullWidth:!0,variant:"outlined",defaultValue:e.model.Title,onChange:R,error:void 0!==I.Title,helperText:null===(t=I.Title)||void 0===t?void 0:t.message,disabled:!e.editable,inputRef:C({required:"Required",maxLength:{value:30,message:"Title is too long"}})}),Z(l.Z,{className:y.input,onChange:R,label:"Description",name:"Description",placeholder:"Describe the model",fullWidth:!0,multiline:!0,variant:"outlined",disabled:!e.editable,defaultValue:e.model.Description,minRows:4,maxRows:12,error:void 0!==I.Description,helperText:null===(n=I.Description)||void 0===n?void 0:n.message,inputRef:C({maxLength:{value:300,message:"Description is too long"}})}),Z(i.Z,{className:y.input,fullWidth:!0},Z(o.Z,null,"Category"),Z(u.Z,{MenuProps:{disableScrollLock:!0},disabled:!e.editable,placeholder:"Category",name:"Category",id:"catInput",label:"Category",onChange:function(e){N(e.target.value)},fullWidth:!0,error:void 0!==I.Category,defaultValue:e.model.Category,value:P},f.gJ.map((function(e,t){return"Other"===e&&(t=999),Z(c.Z,{key:t,value:t},e)})))),e.editable&&Z(l.Z,{className:y.input,label:"Add a search tag",fullWidth:!0,helperText:"Title and tags are used for search, so try to include words that you might use when searching for this model",onKeyPress:function(e){e.key.match(L)||e.preventDefault(),"Enter"===e.key&&W.length<8&&e.target.value.length>=2?(q([].concat((0,a.Z)(W),[{key:Math.random(),label:e.target.value}])),e.target.value=""):"Enter"===e.key&&W.length>=8&&T("Too many tags! Try removing one",{variant:"error",anchorOrigin:{vertical:"bottom",horizontal:"right"}}),e.target.value.length>20&&(e.preventDefault(),e.target.value=e.target.value.slice(0,21))}}),Z(v.Z,{className:y.input,chips:W,setChips:q,disabled:!e.editable}),Z(s.Z,null,Z(d.Z,{control:Z(h.Z,{color:"primary",checked:e.SelectedModel,onClick:function(){return e.ChangeSelected()}}),label:"Featured"})))}},35867:(e,t,n)=>{"use strict";n.r(t),n.d(t,{default:()=>I});var a=n(37913),r=n(21779),l=n(23639),i=n(95779),o=n(59496),u=n(10171),c=n(50591),s=n(85561),d=n(87903),h=n(16320),p=n(96603),g=n(29692),f=n(1770),m=n(56713),v=n(22785),y=n(13781),Z=n(1462),b=n(14224),k=["req","res","match","history","location"],C=o.createElement,w=function(e){var t=o.useState(e.models),n=(0,i.Z)(t,2),a=n[0],k=n[1];function w(e,t){return I.apply(this,arguments)}function I(){return(I=(0,l.Z)((0,r.Z)().m((function e(t,n){var l,i,o,c=arguments;return(0,r.Z)().w((function(e){for(;;)switch(e.n){case 0:if(l=c.length>2&&void 0!==c[2]?c[2]:null,i=c.length>3&&void 0!==c[3]&&c[3],o=a.filter((function(e){return e.PublicID!==n})),k(o),!t){e.n=2;break}return e.n=1,u.Z.post("".concat(b.env.SITE_ROOT,"/api/dookonly/approve"),{publicID:n,featured:i},{withCredentials:!0});case 1:e.n=3;break;case 2:return e.n=3,u.Z.post("".concat(b.env.SITE_ROOT,"/api/dookonly/deny"),{publicI
2D:n,reason:l},{withCredentials:!0});case 3:return e.a(2)}}),e)})))).apply(this,arguments)}var D=o.useRef(),T=function(){var e=(0,l.Z)((0,r.Z)().m((function e(){var t,n;return(0,r.Z)().w((function(e){for(;;)switch(e.n){case 0:t=D.current.value.split("\n"),n=0;case 1:if(!(n<t.length)){e.n=5;break}if(0!==t[n].length){e.n=2;break}return e.a(3,4);case 2:return e.n=3,u.Z.post("/api/dookonly/addUnityAsset/",{URL:t[n]});case 3:return e.n=4,(0,y._v)(250);case 4:n++,e.n=1;break;case 5:return e.a(2)}}),e)})));return function(){return e.apply(this,arguments)}}(),x=function(){var t=(0,l.Z)((0,r.Z)().m((function t(){var n;return(0,r.Z)().w((function(t){for(;;)switch(t.n){case 0:return t.n=1,u.Z.post("/api/posts/new",{Title:"New Post",Content:"# yeyeye!!!"});case 1:n=t.v,e.history.push({pathname:"/posts/".concat(n.data,"/edit")});case 2:return t.a(2)}}),t)})));return function(){return t.apply(this,arguments)}}();return C(o.Fragment,null,C(c.ZP,null),C(d.Z,null,C("title",null,"nice cock")),C(s.Z,{loggedIn:e.isLoggedIn,history:e.history,isLoading:e.isLoading}),C(f.Z,{maxWidth:"xl",style:{paddingTop:"5vh"}},C(h.Z,{variant:"h5",style:{paddingBottom:"1vh"}},a.length," ",1==a.length?"result":"results"),C(v.Z,{container:!0,spacing:6,style:{marginBottom:"8vh"}},a.map((function(e,t){return C(v.Z,{item:!0,key:e.PublicID,xs:12,sm:6,md:4,lg:3},C("a",{href:"/edit/".concat(e.PublicID),target:"blank"},C("img",{src:"https://static.poly.pizza/".concat(e.S3ID,".webp"),className:"w-full"})),C(Z.Z,{model:e,modelIndex:t,editable:!1,SelectedModel:!1,editCB:function(){},ChangeSelected:function(){}}),C("div",{className:"flex flex-col w-full gap-4 mt-4"},C("div",{className:"flex justify-between"},C(m.Z,{onClick:function(){return w(!0,e.PublicID)},variant:"contained",color:"primary"},"Yeah"),C(m.Z,{onClick:function(){return w(!1,e.PublicID)},variant:"contained",color:"secondary"},"Nah (no email)")),C(p.Z,{className:"!my-3"}),C("div",{className:"flex justify-between gap-2"},C(g.Z,{label:"Reject Reason",id:"".concat(e.PublicID,"-reason"),fullWidth:!0,variant:"outlined"}),C(m.Z,{onClick:function(){return w(!1,e.PublicID,document.querySelector("#".concat(e.PublicID,"-reason")).value)},variant:"contained",color:"secondary"},"Nah"))))})))),C(p.Z,null),C(f.Z,{style:{display:"flex",flexDirection:"column"}},C(m.Z,{onClick:T},"Submit"),C(g.Z,{inputRef:D,variant:"filled",multiline:!0}),C(m.Z,{onClick:x},"New blog post")))};w.getInitialProps=function(){var e=(0,l.Z)((0,r.Z)().m((function e(t){var n,l,i,o,c,s;return(0,r.Z)().w((function(e){for(;;)switch(e.p=e.n){case 0:return n=t.req,t.res,t.match,t.history,t.location,l=(0,a.Z)(t,k),i=void 0!==n?l.authed:authed,s="".concat(b.env.SITE_ROOT,"/api/dookonly/approvalList"),o=void 0!==n&&n.headers.cookie?u.Z.get(s,{headers:{cookie:n.headers.cookie}}):u.Z.get(s,{withCredentials:!0}),e.p=1,e.n=2,o;case 2:c=e.v,e.n=4;break;case 3:return e.p=3,e.v,e.a(2,{isLoggedIn:i,statusCode:404});case 4:return e.a(2,{isLoggedIn:i,models:c.data})}}),e,null,[[1,3]])})));return function(t){return e.apply(this,arguments)}}();const I=w}}]); 3//# sourceMappingURL=pages-Approve.c54fa224.chunk.js.map 4//# debugId=0842e4fb-d4f0-53b6-93f9-2c50155b628e
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.