import{j as e,r as t}from"./vendor-react-Dp9pL_Wn.js";import{X as o,o as s,au as n,aw as a,h as i,Z as r,bM as l,eA as c,eH as d}from"./c6eedc03a-CsEFTfjy.js";import{M as m}from"./vendor-intl-D2wGIp4M.js";import{jK as u}from"./index-DhMXk6CR.js";const p=({onClose:t})=>e.jsxs("div",{className:"bg-bg-400 flex h-full flex-col items-center justify-center gap-4",children:[e.jsx("h3",{className:"font-ui-serif text-text-100 max-w-xl text-center text-[1.75rem]",children:e.jsx(m,{defaultMessage:"Artifact reported",id:"kcb2pY5IsN"})}),e.jsx("p",{className:"text-text-300 max-w-xl text-center",children:e.jsx(m,{defaultMessage:"Thank you for reporting the Artifact. We take these matters seriously and will investigate the issue. Your report helps us maintain the integrity of our platform.",id:"krgcu80Qe5"})}),e.jsx(o,{onClick:t,variant:"primary",className:"mt-3",size:"lg",children:e.jsx(m,{defaultMessage:"Show Content",id:"HrYfy0gEA+"})})]}),f=({isOpen:o,onClose:i,publishedArtifactUuid:r})=>{const[l,c]=t.useState(),[d,p]=t.useState(),[f,g]=t.useState(),[k,b]=t.useState(),[h,y]=t.useState(!1),v=s(),{mutateAsync:x}=a(`/api/published_artifacts/${_=r??void 0}/report`,"POST",{enabled:!!_});var _;return e.jsx(n,{modalSize:"md",isOpen:o,onClose:i,hasCloseButton:!0,title:e.jsx("span",{className:"font-claude-response font-medium",children:e.jsx(m,{defaultMessage:"Report Artifact",id:"9W9AYgC9Qk"})}),children:e.jsx(u,{category:l,setCategory:c,notes:d,setNotes:p,reporterEmail:f,setReporterEmail:g,reporterName:k,setReporterName:b,optOutOfTraining:h,setOptOutOfTraining:y,onSubmit:async()=>{await x({notes:d,category:l,reporter_name:k,reporter_email:f,opt_out_of_training:h}),c(void 0),p(void 0),b(void 0),g(void 0),y(!1),i(!0)},onAfterSubmit:()=>v.push("/reported"),onClose:()=>i(!1)})})};function g(e,o={}){const{activeOrganization:s}=i(),n=s?.uuid,a=t.useMemo(()=>{if(!n)return null;const t=new URLSearchParams({query:e,country_code:"USA"});return`/api/organizations/${n}/chalk/verification/schools?${t.toString()}`},[n,e]);return r(a??"",{queryKey:["chalk-schools",n,e],enabled:(o.enabled??!0)&&!!a&&e.trim().length>=2,staleTime:3e4,meta:{noToast:!0}})}function k(){const{activeOrganization:e}=i(),t=e?.uuid;return a(`/api/organizations/${t??""}/chalk/verification/start`,"POST",{enabled:!!t,meta:{noToast:!0}})}const b="chalk-verification-status";function h(e){const{activeOrganization:t}=i(),o=t?.uuid;return r(`/api/organizations/${o??""}/chalk/verification/status`,{queryKey:[b,o],enabled:!!o&&!1!==e?.enabled,staleTime:6e4,meta:{noToast:!0}})}function y(e){return!e.bypass&&e.validation_invite_id&&e.goodstack_publishable_key&&e.goodstack_base_url?{goodstackBaseUrl:e.goodstack_base_url,goodstackPublishableKey:e.goodstack_publishable_key,validationInviteId:e.validation_invite_id}:null}function v(){const{activeOrganization:e}=i(),t=e?.uuid;return a(`/api/organizations/${t??""}/chalk/verification`,"POST",{enabled:!!t,meta:{noToast:!0}})}function x(){const e=l(),{memoryOn:t}=c(),{isAvailable:o}=d();return e?t:o}
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const _=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"//",blockComment:["(*","*)"]},brackets:[["{","}"],["[","]"],["(",")"],["<",">"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:"<",close:">"},{open:"'",close:"'"},{open:'"',close:'"'},{open:"(*",close:"*)"}]},language:{defaultToken:"",tokenPostfix:".cameligo",ignoreCase:!0,brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"},{open:"<",close:">",token:"delimiter.angle"}],keywords:["abs","assert","block","Bytes","case","Crypto","Current","else","failwith","false","for","fun","if","in","let","let%entry","let%init","List","list","Map","map","match","match%nat","mod","not","operation","Operation","of","record","Set","set","sender","skip","source","String","then","to","true","type","with"],typeKeywords:["int","unit","string","tz","nat","bool"],operators:["=",">","<","<=",">=","<>",":",":=","and","mod","or","+","-","*","/","@","&","^","%","->","<-","&&","||"],symbols:/[=><:@\^&|+\-*\/\^%]+/,tokenizer:{root:[[/[a-zA-Z_][\w]*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/[{}()\[\]]/,"@brackets"],[/[<>](?!@symbols)/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/\$[0-9a-fA-F]{1,16}/,"number.hex"],[/\d+/,"number"],[/[;,.]/,"delimiter"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/'/,"string","@string"],[/'[^\\']'/,"string"],[/'/,"string.invalid"],[/\#\d+/,"string"]],comment:[[/[^\(\*]+/,"comment"],[/\*\)/,"comment","@pop"],[/\(\*/,"comment"]],string:[[/[^\\']+/,"string"],[/\\./,"string.escape.invalid"],[/'/,{token:"string.quote",bracket:"@close",next:"@pop"}]],whitespace:[[/[ \t\r\n]+/,"white"],[/\(\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}}},Symbol.toStringTag,{value:"Module"}));
/*!-----------------------------------------------------------------------------
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Version: 0.52.2(404545bded1df6ffa41ea0af4e8ddb219018c6c1)
 * Released under the MIT license
 * https://github.com/microsoft/monaco-editor/blob/main/LICENSE.txt
 *-----------------------------------------------------------------------------*/const w=Object.freeze(Object.defineProperty({__proto__:null,conf:{comments:{lineComment:"--",blockComment:["--[[","]]"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}]},language:{defaultToken:"",tokenPostfix:".lua",keywords:["and","break","do","else","elseif","end","false","for","function","goto","if","in","local","nil","not","or","repeat","return","then","true","until","while"],brackets:[{token:"delimiter.bracket",open:"{",close:"}"},{token:"delimiter.array",open:"[",close:"]"},{token:"delimiter.parenthesis",open:"(",close:")"}],operators:["+","-","*","/","%","^","#","==","~=","<=",">=","<",">","=",";",":",",",".","..","..."],symbols:/[=><!~?:&|+\-*\/\^%]+/,escapes:/\\(?:[abfnrtv\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,tokenizer:{root:[[/[a-zA-Z_]\w*/,{cases:{"@keywords":{token:"keyword.$0"},"@default":"identifier"}}],{include:"@whitespace"},[/(,)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/,["delimiter","","key","","delimiter"]],[/({)(\s*)([a-zA-Z_]\w*)(\s*)(:)(?!:)/,["@brackets","","key","","delimiter"]],[/[{}()\[\]]/,"@brackets"],[/@symbols/,{cases:{"@operators":"delimiter","@default":""}}],[/\d*\.\d+([eE][\-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F_]*[0-9a-fA-F]/,"number.hex"],[/\d+?/,"number"],[/[;,.]/,"delimiter"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,""],[/--\[([=]*)\[/,"comment","@comment.$1"],[/--.*$/,"comment"]],comment:[[/[^\]]+/,"comment"],[/\]([=]*)\]/,{cases:{"$1==$S2":{token:"comment",next:"@pop"},"@default":"comment"}}],[/./,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]]}}},Symbol.toStringTag,{value:"Module"}));export{b as C,p as R,h as a,k as b,v as c,g as d,f as e,_ as f,y as g,w as l,x as u};
