1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3361],{27050:function(e,n,t){(window.__NEXT_P=window.__NEXT_P||[]).push(["/betacopies/[betaCopyId]/betacopysections/new",function(){return t(52965)}])},64856:function(e,n,t){"use strict";t.d(n,{Z:function(){return h}});var i=t(52676),r=t(24754),a=t(48018),o=t(39893),s=t(63828),d=t(31647),c=t(99089),l=t(89830),u=t(87649);function h(e){let{loading:n,onSave:t,onCancel:h,onEdit:p,readOnly:f=!1,isCreateForm:y,sectionType:b,sectionDividerType:x,...v}=e,g=(0,r.cI)(),{control:C,handleSubmit:m}=g;return(0,i.jsx)(r.RV,{...g,children:(0,i.jsxs)(a.Z,{id:"betaCopySectionForm",size:"large",onSubmit:m(t),noValidate:!0,children:[(0,i.jsx)(u.Z,{name:"sectionType",label:"Section Type",value:b,readOnly:!0,disabled:!0,defaultValue:b}),(0,i.jsx)(u.Z,{name:"title",label:"Content"===b?"".concat(x," Title"):"Questionnaire Title",placeholder:"Title",rules:{required:"Title is required"},defaultValue:v.title,readOnly:f,onEdit:p}),"Content"===b&&(0,i.jsx)(l.Z,{name:"critiqueGuidance",label:"Critique Guidance (2,000 character limit)",description:"At the end of each ".concat(x.toLowerCase(),", what should readers include in their feedback?"),rows:5,placeholder:"How realistic do you find the character's decisions/motivations?",rules:{maxLength:{value:2e3,message:"Maximum of 2,000 characters for your review"}},defaultValue:v.critiqueGuidance,readOnly:f,onEdit:p}),y?"Content"===b?(0,i.jsx)(c.Z,{name:"content",control:C,label:b,rules:{required:"Content is required",validate:e=>!!e&&(!!e.reduce((e,n)=>e+n.children.reduce((e,n)=>e+n.text,""),"")||"Must enter content")}}):(0,i.jsx)(l.Z,{name:"content",label:"Questionnaire",rows:5,placeholder:"1) What did you think of the last 3 chapters? ...",rules:{required:"Questionnaire content is required",maxLength:{value:2e3,message:"Maximum of 2,000 characters for your review"}}}):null,y&&(0,i.jsx)(o.Z,{children:"Additions are aggregated every few hours and beta readers subscribed to updates will be notified of new content"}),f?null:(0,i.jsxs)("div",{style:{display:"flex",justifyContent:"flex-end"},children:[(0,i.jsxs)(s.Z,{type:"button",basic:!0,color:"red",disabled:n,onClick:h,children:[(0,i.jsx)(d.Z,{name:"remove"})," Cancel"]}),(0,i.jsxs)(s.Z,{form:"betaCopySectionForm",type:"submit",color:"green",disabled:n,loading:n,children:[(0,i.jsx)(d.Z,{name:"checkmark"}),y?"Create":"Save Changes"]})]})]})})}},87649:function(e,n,t){"use strict";var i=t(52676),r=t(75271),a=t(24754),o=t(76887),s=t(9029),d=t(24380),c=t(14476),l=t(53655);n.Z=(0,l.K)(function(e){var n,t;let{name:l,control:u,defaultValue:h,rules:p,shouldUnregister:f=!0,onChange:y,onBlur:b,label:x,labelStyle:v,description:g,instructions:C,width:m,readOnly:j=!1,onEdit:Z,setFocus:w,editAriaLabel:q,...S}=e,T="".concat(l,"-").concat((0,r.useId)()),B="".concat(T,"-description"),I="".concat(T,"-instructions"),[A,_]=(0,r.useState)(null!==(t=null==C?void 0:C.defaultOpen)&&void 0!==t&&t),{field:{value:$,onChange:E,ref:V,...D},fieldState:N}=(0,a.bc)({name:l,control:u,defaultValue:h||"",rules:p,shouldUnregister:f}),P=null===(n=N.error)||void 0===n?void 0:n.message,k=P?"".concat(T,"-error-message"):void 0,O=[g?B:null,C&&A?I:null,k].filter(Boolean).join(" ")||void 0;return(0,i.jsxs)(o.Z,{required:!!(null==p?void 0:p.required),error:!!P,width:m,children:[(0,c.b)({label:x,labelStyle:v,inputId:T,name:l,description:g,descriptionId:B,instructions:C,instructionsId:I,instructionsOpen:A,onInstructionsOpenChange:_,onEdit:Z,showEditButton:j&&!!Z,setFocus:w,editAriaLabel:q,required:!!(null==p?void 0:p.required)}),(0,i.jsx)(s.Z,{...D,...S,id:T,name:l,ref:V,readOnly:j,required:!!(null==p?void 0:p.required),value:$,tabIndex:j?-1:S.tabIndex,"aria-describedby":O,"aria-invalid":!!P||void 0,onChange:(e,n)=>{let{value:t}=n;E(y?y(t):t)},onBlur:e=>{j||E(b?b(e.target.value):e.target.value.trim())}}),P?(0,i.jsx)(d.Z,{prompt:!0,pointing:"above",id:k,role:"alert",children:P}):null]})})},35805:function(e,n,t){"use strict";var i=t(14489),r=t(90790);function a(){let e=(0,i._)(["\n mutation CreateBetaCopySection(\n $betaCopyId: ID!\n $title: String!\n $critiqueGuidance: String\n $content: String!\n $sectionType: String!\n ) {\n createBetaCopySection(\n betaCopyId: $betaCopyId\n title: $title\n critiqueGuidance: $critiqueGuidance\n content: $content\n sectionType: $sectionType\n ) {\n id\n databaseId\n betaCopy {\n id\n databaseId\n wordCount\n }\n }\n }\n"]);return a=function(){return e},e}n.Z=(0,r.Ps)(a())},52965:function(e,n,t){"use strict";t.r(n);
1var i=t(52676),r=t(68266),a=t(8934),o=t(2639),s=t(25572),d=t.n(s),c=t(58754),l=t(55907),u=t(52832),h=t(80338),p=t(77576),f=t(68887),y=t(52612),b=t(64843),x=t(39893),v=t(13827),g=t(63828),C=t(64856),m=t(51487),j=t(39620),Z=t(76913),w=t(35805),q=t(69365),S=t(61580),T=t(20462);n.default=(0,m.Z)(function(){let e=(0,c.useRouter)(),{betaCopyId:n,sectionType:t}=e.query,{error:s,data:m}=(0,r.a)(q.Z,{variables:{id:(0,Z.Q)("BetaCopy",n)}}),{error:B,data:I}=(0,r.a)(T.Z),[A,{loading:_}]=(0,a.D)(w.Z);if(B)return"Error! ".concat(B.message);if(s)return"Error! ".concat(s.message);if(!(null==I?void 0:I.viewer)||!(null==m?void 0:m.node))return(0,i.jsx)(u.Z,{active:!0,children:(0,i.jsx)(h.Z,{children:"Loading"})});let $=["BETA","STANDARD-YEARLY-100","STANDARD-MONTHLY-10"],E=I.viewer.stripeBillingPlans.filter(e=>$.includes(e)),{title:V,sectionDividerType:D}=m.node;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("div",{style:{padding:"0 20px",marginBottom:"1rem",width:"100%"},children:(0,i.jsxs)(p.Z,{children:[(0,i.jsx)(f.Z,{}),(0,i.jsx)(y.Z,{children:(0,i.jsx)(d(),{href:"/dashboard",children:"Home"})}),(0,i.jsx)(f.Z,{}),(0,i.jsx)(y.Z,{children:(0,i.jsx)(d(),{href:"/dashboard/betacopies",children:"My Beta Copies"})}),(0,i.jsx)(f.Z,{}),(0,i.jsx)(y.Z,{children:V.length>25?"".concat(V.substring(0,25),"..."):V}),(0,i.jsx)(f.Z,{}),(0,i.jsx)(y.Z,{children:(0,i.jsx)(d(),{href:"/betacopies/".concat(n,"/betacopysections"),children:"Contents & Annotations"})}),(0,i.jsx)(f.Z,{}),(0,i.jsxs)(y.Z,{active:!0,children:["Add ","Content"===t?D:"Questionnaire"]})]})}),(0,i.jsxs)("div",{style:{maxWidth:"600px",margin:"0 auto",padding:"0 20px",width:"100%"},children:[(0,i.jsx)(b.Z,{size:"huge",textAlign:"center",children:"Content"===t?"Add ".concat(D):"Add Questionnaire"}),0===E.length?(0,i.jsxs)(x.Z,{negative:!0,size:"huge",children:[(0,i.jsx)(v.Z,{children:"Upgrade Required"}),(0,i.jsx)("p",{style:{fontSize:"1.2rem"},children:"Your current billing plan does not include the use of this feature."}),(0,i.jsx)("div",{style:{display:"flex",justifyContent:"center"},children:(0,i.jsx)(d(),{passHref:!0,href:"/plans",legacyBehavior:!0,children:(0,i.jsx)(g.Z,{size:"huge",as:"a",color:"green",children:"Upgrade Plan"})})})]}):(0,i.jsx)(C.Z,{isCreateForm:!0,sectionType:t,loading:_,onCancel:()=>e.push("/betacopies/".concat(n,"/betacopysections")),sectionDividerType:D,onSave:async i=>{let{title:r,critiqueGuidance:a,content:s}=i,[d]=await (0,o.Z)(A({variables:{betaCopyId:n,title:r,critiqueGuidance:a,content:"Content"===t?s.map(e=>(0,j.F)(e)).join(""):s,sectionType:t},refetchQueries:[{query:S.Z,variables:{id:(0,Z.Q)("BetaCopy",n)}}]}));if(!d)return e.push("/betacopies/".concat(n,"/betacopysections"));d.errors.map(e=>{let{message:n}=e;return(0,l.Am)(n,{className:"ui negative message"})})}})]})]})})},69365:function(e,n,t){"use strict";var i=t(14489),r=t(90790);function a(){let e=(0,i._)(["\n query BetaCopySectionCreateView($id: ID!) {\n node(id: $id) {\n ... on BetaCopy {\n id\n databaseId\n title\n sectionDividerType\n }\n }\n }\n"]);return a=function(){return e},e}n.Z=(0,r.Ps)(a())},61580:function(e,n,t){"use strict";var i=t(14489),r=t(90790);function a(){let e=(0,i._)(["\n query BetaCopySectionsView($id: ID!) {\n node(id: $id) {\n ... on BetaCopy {\n id\n databaseId\n title\n sectionDividerType\n betaCopySections(first: 1000) {\
1n edges {\n node {\n id\n databaseId\n title\n sectionNumber\n sectionType\n betaCopySectionVersionsArray {\n id\n databaseId\n wordCount\n version\n betaCopySectionVersionCommentsCount\n betaCopySectionVersionResponsesCount\n }\n }\n }\n }\n }\n }\n }\n"]);return a=function(){return e},e}n.Z=(0,r.Ps)(a())},20462:function(e,n,t){"use strict";var i=t(14489),r=t(90790);function a(){let e=(0,i._)(["\n query ViewersBillingPlan {\n viewer {\n ... on UserAccount {\n id\n stripeBillingPlans\n }\n }\n }\n"]);return a=function(){return e},e}n.Z=(0,r.Ps)(a())}},function(e){e.O(0,[532,8359,9029,8018,1913,4754,2403,718,1610,8650,9922,7099,2888,9774,179],function(){return e(e.s=27050)}),_N_E=e.O()}]);
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.