PageSourceSearch

https://plero.ai/_next/static/immutable/chunks/2lkzy-7xgoikb.js

js plero.ai collected 2026-10-05 14:10:25 UTC 58,177 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,968553,e=>{"use strict";let t=(0,e.i(475254).default)("camera",[["path",{d:"M13.997 4a2 2 0 0 1 1.76 1.05l.486.9A2 2 0 0 0 18.003 7H20a2 2 0 0 1 2 2v9a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2h1.997a2 2 0 0 0 1.759-1.048l.489-.904A2 2 0 0 1 10.004 4z",key:"18u6gg"}],["circle",{cx:"12",cy:"13",r:"3",key:"1vg3eu"}]]);e.s(["Camera",0,t],968553)},803108,197753,922143,374969,e=>{"use strict";function t(e,t,r){function a(r,a){var s;for(let i in Object.defineProperty(r,"_zod",{value:r._zod??{},enumerable:!1}),(s=r._zod).traits??(s.traits=new Set),r._zod.traits.add(e),t(r,a),n.prototype)i in r||Object.defineProperty(r,i,{value:n.prototype[i].bind(r)});r._zod.constr=n,r._zod.def=a}let s=r?.Parent??Object;class i extends s{}function n(e){var t;let s=r?.Parent?new i:this;for(let r of(a(s,e),(t=s._zod).deferred??(t.deferred=[]),s._zod.deferred))r();return s}return Object.defineProperty(i,"name",{value:e}),Object.defineProperty(n,"init",{value:a}),Object.defineProperty(n,Symbol.hasInstance,{value:t=>!!r?.Parent&&t instanceof r.Parent||t?._zod?.traits?.has(e)}),Object.defineProperty(n,"name",{value:e}),n}Object.freeze({status:"aborted"}),Symbol("zod_brand");class r extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}}let a={};function s(e){return e&&Object.assign(a,e),a}function i(e,t){return"bigint"==typeof t?t.toString():t}function n(e){return{get value(){{let t=e();return Object.defineProperty(this,"value",{value:t}),t}}}}function l(e,t,r){Object.defineProperty(e,t,{value:r,writable:!0,enumerable:!0,configurable:!0})}e.s(["$ZodAsyncError",0,r,"$constructor",0,t,"config",0,s,"globalConfig",0,a],197753);let o=Error.captureStackTrace?Error.captureStackTrace:(...e)=>{};function c(e){return"object"==typeof e&&null!==e&&!Array.isArray(e)}let d=n(()=>{if("u">typeof navigator&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch(e){return!1}});function u(e){if(!1===c(e))return!1;let t=e.constructor;if(void 0===t)return!0;let r=t.prototype;return!1!==c(r)&&!1!==Object.prototype.hasOwnProperty.call(r,"isPrototypeOf")}let f=new Set(["string","number","symbol"]),m=new Set(["string","number","bigint","boolean","symbol","undefined"]);function p(e,t,r){let a=new e._zod.constr(t??e._zod.def);return(!t||r?.parent)&&(a._zod.parent=e),a}function h(e){return"bigint"==typeof e?e.toString()+"n":"string"==typeof e?`"${e}"`:`${e}`}let y={safeint:[Number.MIN_SAFE_INTEGER,Number.MAX_SAFE_INTEGER],int32:[-0x80000000,0x7fffffff],uint32:[0,0xffffffff],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},g={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function b(e){return"string"==typeof e?e:e?.message}function v(e,t,r){let a={...e,path:e.path??[]};return e.message||(a.message=b(e.inst?._zod.def?.error?.(e))??b(t?.error?.(e))??b(r.customError?.(e))??b(r.localeError?.(e))??"Invalid input"),delete a.inst,delete a.continue,t?.reportInput||delete a.input,a}e.s(["BIGINT_FORMAT_RANGES",0,g,"Class",0,class{constructor(...e){}},"NUMBER_FORMAT_RANGES",0,y,"aborted",0,function(e,t=0){for(let r=t;r<e.issues.length;r++)if(e.issues[r]?.continue!==!0)return!0;return!1},"allowsEval",0,d,"assert",0,function(e){},"assertEqual",0,function(e){return e},"assertIs",0,function(e){},"assertNever",0,function(e){throw Error()},"assertNotEqual",0,function(e){return e},"assignProp",0,l,"cached",0,n,"captureStackTrace",0,o,"cleanEnum",0,function(e){return Object.entries(e).filter(([e,t])=>Number.isNaN(Number.parseInt(e,10))).map(e=>e[1])},"cleanRegex",0,function(e){let t=+!!e.startsWith("^"),r=e.endsWith("$")?e.length-1:e.length;return e.slice(t,r)},"clone",0,p,"createTransparentProxy",0,function(e){let t;return new Proxy({},{get:(r,a,s)=>(t??(t=e()),Reflect.get(t,a,s)),set:(r,a,s,i)=>(t??(t=e()),Reflect.set(t,a,s,i)),has:(r,a)=>(t??(t=e()),Reflect.has(t,a)),deleteProperty:(r,a)=>(t??(t=e()),Reflect.deleteProperty(t,a)),ownKeys:r=>(t??(t=e()),Reflect.ownKeys(t)),getOwnPropertyDescriptor:(r,a)=>(t??(t=e()),Reflect.getOwnPropertyDescriptor(t,a)),defineProperty:(r,a,s)=>(t??(t=e()),Reflect.defineProperty(t,a,s))})},"defineLazy",0,function(e,t,r){Object.defineProperty(e,t,{get(){{let a=r();return e[t]=a,a}},set(r){Object.defineProperty(e,t,{value:r})},configurable:!0})},"esc",0,function(e){return JSON.stringify(e)},"escapeRegex",0,function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")},"extend",0,function(e,t){if(!u(t))throw Error("Invalid input to extend: expected a plain object");let r={...e._zod.def,get shape(){let r={...e._zod.def.shape,...t};return l(this,"shape",r),r},checks:[]};return p(e,r)},"finalizeIssue",0,v,"floatSafeRemainder",0,function(e,t){let r=(e.toString().split(".")[1]||"").length,a=(t.toString().split(".")[1]||"").length,s=r>a?r:a;return Number.parseInt(e.toFixed(s).replace(".",""))%Number.parseInt(t.toFixed(s).replace(".",""))/10**s},"getElementAtPath",0,function(e,t){return t?t.reduce((e,t)=>
1e?.[t],e):e},"getEnumValues",0,function(e){let t=Object.values(e).filter(e=>"number"==typeof e);return Object.entries(e).filter(([e,r])=>-1===t.indexOf(+e)).map(([e,t])=>t)},"getLengthableOrigin",0,function(e){return Array.isArray(e)?"array":"string"==typeof e?"string":"unknown"},"getParsedType",0,e=>{let t=typeof e;switch(t){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":if(Array.isArray(e))return"array";if(null===e)return"null";if(e.then&&"function"==typeof e.then&&e.catch&&"function"==typeof e.catch)return"promise";if("u">typeof Map&&e instanceof Map)return"map";if("u">typeof Set&&e instanceof Set)return"set";if("u">typeof Date&&e instanceof Date)return"date";if("u">typeof File&&e instanceof File)return"file";return"object";default:throw Error(`Unknown data type: ${t}`)}},"getSizableOrigin",0,function(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"},"isObject",0,c,"isPlainObject",0,u,"issue",0,function(...e){let[t,r,a]=e;return"string"==typeof t?{message:t,code:"custom",input:r,inst:a}:{...t}},"joinValues",0,function(e,t="|"){return e.map(e=>h(e)).join(t)},"jsonStringifyReplacer",0,i,"merge",0,function(e,t){return p(e,{...e._zod.def,get shape(){let r={...e._zod.def.shape,...t._zod.def.shape};return l(this,"shape",r),r},catchall:t._zod.def.catchall,checks:[]})},"normalizeParams",0,function(e){if(!e)return{};if("string"==typeof e)return{error:()=>e};if(e?.message!==void 0){if(e?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");e.error=e.message}return(delete e.message,"string"==typeof e.error)?{...e,error:()=>e.error}:e},"nullish",0,function(e){return null==e},"numKeys",0,function(e){let t=0;for(let r in e)Object.prototype.hasOwnProperty.call(e,r)&&t++;return t},"omit",0,function(e,t){let r={...e._zod.def.shape},a=e._zod.def;for(let e in t){if(!(e in a.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&delete r[e]}return p(e,{...e._zod.def,shape:r,checks:[]})},"optionalKeys",0,function(e){return Object.keys(e).filter(t=>"optional"===e[t]._zod.optin&&"optional"===e[t]._zod.optout)},"partial",0,function(e,t,r){let a=t._zod.def.shape,s={...a};if(r)for(let t in r){if(!(t in a))throw Error(`Unrecognized key: "${t}"`);r[t]&&(s[t]=e?new e({type:"optional",innerType:a[t]}):a[t])}else for(let t in a)s[t]=e?new e({type:"optional",innerType:a[t]}):a[t];return p(t,{...t._zod.def,shape:s,checks:[]})},"pick",0,function(e,t){let r={},a=e._zod.def;for(let e in t){if(!(e in a.shape))throw Error(`Unrecognized key: "${e}"`);t[e]&&(r[e]=a.shape[e])}return p(e,{...e._zod.def,shape:r,checks:[]})},"prefixIssues",0,function(e,t){return t.map(t=>(t.path??(t.path=[]),t.path.unshift(e),t))},"primitiveTypes",0,m,"promiseAllObject",0,function(e){let t=Object.keys(e);return Promise.all(t.map(t=>e[t])).then(e=>{let r={};for(let a=0;a<t.length;a++)r[t[a]]=e[a];return r})},"propertyKeyTypes",0,f,"randomString",0,function(e=10){let t="abcdefghijklmnopqrstuvwxyz",r="";for(let a=0;a<e;a++)r+=t[Math.floor(Math.random()*t.length)];return r},"required",0,function(e,t,r){let a=t._zod.def.shape,s={...a};if(r)for(let t in r){if(!(t in s))throw Error(`Unrecognized key: "${t}"`);r[t]&&(s[t]=new e({type:"nonoptional",innerType:a[t]}))}else for(let t in a)s[t]=new e({type:"nonoptional",innerType:a[t]});return p(t,{...t._zod.def,shape:s,checks:[]})},"stringifyPrimitive",0,h,"unwrapMessage",0,b],922143);let x=(e,t)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t,enumerable:!1}),Object.defineProperty(e,"message",{get:()=>JSON.stringify(t,i,2),enumerable:!0}),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},_=t("$ZodError",x),j=t("$ZodError",x,{Parent:Error});e.s(["$ZodError",0,_,"$ZodRealError",0,j,"prettifyError",0,function(e){let t=[];for(let r of[...e.issues].sort((e,t)=>e.path.length-t.path.length))t.push(`✖ ${r.message}`),r.path?.length&&t.push(`  → at ${function(e){let t=[];
1for(let r of e)"number"==typeof r?t.push(`[${r}]`):"symbol"==typeof r?t.push(`[${JSON.stringify(String(r))}]`):/[^\w$]/.test(r)?t.push(`[${JSON.stringify(r)}]`):(t.length&&t.push("."),t.push(r));return t.join("")}(r.path)}`);return t.join("\n")}],374969);let w=(e,t,a,i)=>{let n=a?Object.assign(a,{async:!1}):{async:!1},l=e._zod.run({value:t,issues:[]},n);if(l instanceof Promise)throw new r;if(l.issues.length){let e=new(i?.Err??j)(l.issues.map(e=>v(e,n,s())));throw o(e,i?.callee),e}return l.value},N=async(e,t,r,a)=>{let i=r?Object.assign(r,{async:!0}):{async:!0},n=e._zod.run({value:t,issues:[]},i);if(n instanceof Promise&&(n=await n),n.issues.length){let e=new(a?.Err??j)(n.issues.map(e=>v(e,i,s())));throw o(e,a?.callee),e}return n.value},S=(e,t,a)=>{let i=a?{...a,async:!1}:{async:!1},n=e._zod.run({value:t,issues:[]},i);if(n instanceof Promise)throw new r;return n.issues.length?{success:!1,error:new(j??_)(n.issues.map(e=>v(e,i,s())))}:{success:!0,data:n.value}},k=async(e,t,r)=>{let a=r?Object.assign(r,{async:!0}):{async:!0},i=e._zod.run({value:t,issues:[]},a);return i instanceof Promise&&(i=await i),i.issues.length?{success:!1,error:new j(i.issues.map(e=>v(e,a,s())))}:{success:!0,data:i.value}};e.s(["parse",0,w,"parseAsync",0,N,"safeParse",0,S,"safeParseAsync",0,k],803108)},460142,e=>{"use strict";var t=e.i(843476),r=e.i(271645),a=e.i(618566),s=e=>e instanceof Date,i=e=>null==e,n=e=>!i(e)&&!Array.isArray(e)&&"object"==typeof e&&!s(e),l="u">typeof window&&void 0!==window.HTMLElement&&"u">typeof document;function o(e){let t;if(e instanceof Date)return new Date(e);let r="u">typeof FileList&&e instanceof FileList;if(l&&(e instanceof Blob||r))return e;let a=Array.isArray(e);if(!a&&!(n(e)&&n(t=e.constructor&&e.constructor.prototype)&&t.hasOwnProperty("isPrototypeOf")))return e;let s=a?[]:Object.create(Object.getPrototypeOf(e));for(let t in e)Object.prototype.hasOwnProperty.call(e,t)&&(s[t]=o(e[t]));return s}var c=e=>void 0===e,d=e=>Array.isArray(e)?e.filter(Boolean):[],u=e=>d(e.replace(/["|']|\]/g,"").split(/\.|\[/)),f=(e,t,r)=>{if(!t||!n(e))return r;let a=(/^\w*$/.test(t)?[t]:u(t)).reduce((e,t)=>i(e)?e:e[t],e);return c(a)||a===e?c(e[t])?r:e[t]:a},m=e=>"function"==typeof e,p=(e,t,r)=>{let a=-1,s=/^\w*$/.test(t)?[t]:u(t),i=s.length,l=i-1;for(;++a<i;){let t=s[a],i=r;if(a!==l){let r=e[t];i=n(r)||Array.isArray(r)?r:isNaN(+s[a+1])?{}:[]}if("__proto__"===t||"constructor"===t||"prototype"===t)return;e[t]=i,e=e[t]}};let h="onChange",y="onSubmit",g="maxLength",b="minLength",v="pattern",x="required";r.default.createContext(null).displayName="HookFormContext";let _="u">typeof window?r.default.useLayoutEffect:r.default.useEffect;var j=e=>"string"==typeof e,w=e=>i(e)||"object"!=typeof e;function N(e,t,r=new WeakSet){if(w(e)||w(t))return Object.is(e,t);if(s(e)&&s(t))return e.getTime()===t.getTime();let a=Object.keys(e),i=Object.keys(t);if(a.length!==i.length)return!1;if(r.has(e)||r.has(t))return!0;for(let l of(r.add(e),r.add(t),a)){let a=e[l];if(!i.includes(l))return!1;if("ref"!==l){let e=t[l];if(s(a)&&s(e)||n(a)&&n(e)||Array.isArray(a)&&Array.isArray(e)?!N(a,e,r):!Object.is(a,e))return!1}}return!0}var S=(e,t,r,a,s)=>t?{...r[e],types:{...r[e]&&r[e].types?r[e].types:{},[a]:s||!0}}:{},k=e=>Array.isArray(e)?e:[e],A=()=>{let e=[];return{get observers(){return e},next:t=>{for(let r of e)r.next&&r.next(t)},subscribe:t=>(e.push(t),{unsubscribe:()=>{e=e.filter(e=>e!==t)}}),unsubscribe:()=>{e=[]}}},F=e=>n(e)&&!Object.keys(e).length,E=e=>{if(!l)return!1;let t=e?e.ownerDocument:0;return e instanceof(t&&t.defaultView?t.defaultView.HTMLElement:HTMLElement)},V=e=>E(e)&&e.isConnected;function O(e,t){let r=Array.isArray(t)?t:/^\w*$/.test(t)?[t]:u(t),a=1===r.length?e:function(e,t){let r=t.slice(0,-1).length,a=0;for(;a<r;)e=c(e)?a++:e[t[a++]];return e}(e,r),s=r.length-1,i=r[s];return a&&delete a[i],0!==s&&(n(a)&&F(a)||Array.isArray(a)&&function(e){for(let t in e)if(e.hasOwnProperty(t)&&!c(e[t]))return!1;return!0}(a))&&O(e,r.slice(0,-1)),e}function C(e){return Array.isArray(e)||n(e)&&!(e=>{for(let t in e)if(m(e[t]))return!0;return!1})(e)}function z(e,t={}){for(let r in e){let a=e[r];C(a)?(t[r]=Array.isArray(a)?[]:{}
1,z(a,t[r])):c(a)||(t[r]=!0)}return t}function P(e,t,r){for(let a in r||(r=z(t)),e){let s=e[a];if(C(s))c(t)||w(r[a])?r[a]=z(s,Array.isArray(s)?[]:{}):P(s,i(t)?{}:t[a],r[a]);else{let e=t[a];r[a]=!N(s,e)}}return r}let D={value:!1,isValid:!1},T={value:!0,isValid:!0};var $=e=>{if(Array.isArray(e)){if(e.length>1){let t=e.filter(e=>e&&e.checked&&!e.disabled).map(e=>e.value);return{value:t,isValid:!!t.length}}return e[0].checked&&!e[0].disabled?e[0].attributes&&!c(e[0].attributes.value)?c(e[0].value)||""===e[0].value?T:{value:e[0].value,isValid:!0}:T:D}return D},R=(e,{valueAsNumber:t,valueAsDate:r,setValueAs:a})=>c(e)?e:t?""===e?NaN:e?+e:e:r&&j(e)?new Date(e):a?a(e):e;let I={isValid:!1,value:null};var U=e=>Array.isArray(e)?e.reduce((e,t)=>t&&t.checked&&!t.disabled?{isValid:!0,value:t.value}:e,I):I;function M(e){let t=e.ref;return"file"===t.type?t.files:"radio"===t.type?U(e.refs).value:"select-multiple"===t.type?[...t.selectedOptions].map(({value:e})=>e):"checkbox"===t.type?$(e.refs).value:R(c(t.value)?e.ref.value:t.value,e)}var L=e=>c(e)?e:e instanceof RegExp?e.source:n(e)?e.value instanceof RegExp?e.value.source:e.value:e,B=e=>({isOnSubmit:!e||e===y,isOnBlur:"onBlur"===e,isOnChange:e===h,isOnAll:"all"===e,isOnTouch:"onTouched"===e});let H="AsyncFunction";var K=e=>!!e&&!!e.validate&&!!(m(e.validate)&&e.validate.constructor.name===H||n(e.validate)&&Object.values(e.validate).find(e=>e.constructor.name===H)),q=(e,t,r)=>!r&&(t.watchAll||t.watch.has(e)||[...t.watch].some(t=>e.startsWith(t)&&/^\.\w+/.test(e.slice(t.length))));let G=(e,t,r,a)=>{for(let s of r||Object.keys(e)){let r=f(e,s);if(r){let{_f:e,...i}=r;if(e){if(e.refs&&e.refs[0]&&t(e.refs[0],s)&&!a)return!0;else if(e.ref&&t(e.ref,e.name)&&!a)return!0;else if(G(i,t))break}else if(n(i)&&G(i,t))break}}};function Z(e,t,r){let a=f(e,r);if(a||/^\w*$/.test(r))return{error:a,name:r};let s=r.split(".");for(;s.length;){let a=s.join("."),i=f(t,a),n=f(e,a);if(i&&!Array.isArray(i)&&r!==a)break;if(n&&n.type)return{name:a,error:n};if(n&&n.root&&n.root.type)return{name:`${a}.root`,error:n.root};s.pop()}return{name:r}}var W=(e,t,r)=>{let a=k(f(e,r));return p(a,"root",t[r]),p(e,r,a),e};function J(e,t,r="validate"){if(j(e)||Array.isArray(e)&&e.every(j)||"boolean"==typeof e&&!e)return{type:r,message:j(e)?e:"",ref:t}}var X=e=>!n(e)||e instanceof RegExp?{value:e,message:""}:e,Y=async(e,t,r,a,s,l)=>{let{ref:o,refs:d,required:u,maxLength:p,minLength:h,min:y,max:_,pattern:w,validate:N,name:k,valueAsNumber:A,mount:V}=e._f,O=f(r,k);if(!V||t.has(k))return{};let C=d?d[0]:o,z=e=>{s&&C.reportValidity&&(C.setCustomValidity("boolean"==typeof e?"":e||""),C.reportValidity())},P={},D="radio"===o.type,T="checkbox"===o.type,R=(A||"file"===o.type)&&c(o.value)&&c(O)||E(o)&&""===o.value||""===O||Array.isArray(O)&&!O.length,I=S.bind(null,k,a,P),M=(e,t,r,a=g,s=b)=>{let i=e?t:r;P[k]={type:e?a:s,message:i,ref:o,...I(e?a:s,i)}};if(l?!Array.isArray(O)||!O.length:u&&(!(D||T)&&(R||i(O))||"boolean"==typeof O&&!O||T&&!$(d).isValid||D&&!U(d).isValid)){let{value:e,message:t}=j(u)?{value:!!u,message:u}:X(u);if(e&&(P[k]={type:x,message:t,ref:C,...I(x,t)},!a))return z(t),P}if(!R&&(!i(y)||!i(_))){let e,t,r=X(_),s=X(y);if(i(O)||isNaN(O)){let a=o.valueAsDate||new Date(O),i=e=>new Date(new Date().toDateString()+" "+e),n="time"==o.type,l="week"==o.type;j(r.value)&&O&&(e=n?i(O)>i(r.value):l?O>r.value:a>new Date(r.value)),j(s.value)&&O&&(t=n?i(O)<i(s.value):l?O<s.value:a<new Date(s.value))}else{let a=o.valueAsNumber||(O?+O:O);i(r.value)||(e=a>r.value),i(s.value)||(t=a<s.value)}if((e||t)&&(M(!!e,r.message,s.message,"max","min"),!a))return z(P[k].message),P}if((p||h)&&!R&&(j(O)||l&&Array.isArray(O))){let e=X(p),t=X(h),r=!i(e.value)&&O.length>+e.value,s=!i(t.value)&&O.length<+t.value;if((r||s)&&(M(r,e.message,t.message),!a))return z(P[k].message),P}if(w&&!R&&j(O)){let{value:e,message:t}=X(w);if(e instanceof RegExp&&!O.match(e)&&(P[k]={type:v,message:t,ref:o,...I(v,t)},!a))return z(t),P}if(N){if(m(N)){let e=J(await N(O,r),C);if(e&&(P[k]={...e,...I("validate",e.message)},!a))return z(e.message),P}else if(n(N)){let e={};for(let t in N){if(!F(e)&&!a)break;let s=J(await N[t](O,r),C,t);s&&(e={...s,...I(t,s.message)},z(s.message),a&&(P[k]=e))}if(!F(e)&&(P[k]={ref:C,...e},!a))return P}}return z(!0),P};let Q={mode:y,reValidateMode:h,shouldFocusError:!0},ee=(e,t,r)=>{if(e&&"reportValidity"in e){let a=f(r,t);e.setCustomValidity(a&&a.message||""),e.reportValidity()}},et=(e,t)=>{for(let r in t.fields){let a=t.fields[r];a&&a.ref&&"reportValidity"in a.ref?ee(a.ref,r,e):a&&a.refs&&a.refs.forEac
1h(t=>ee(t,r,e))}},er=(e,t)=>{t.shouldUseNativeValidation&&et(e,t);let r={};for(let a in e){let s=f(t.fields,a),i=Object.assign(e[a]||{},{ref:s&&s.ref});if(ea(t.names||Object.keys(e),a)){let e=Object.assign({},f(r,a));p(e,"root",i),p(r,a,e)}else p(r,a,i)}return r},ea=(e,t)=>{let r=es(t);return e.some(e=>es(e).match(`^${r}\\.\\d+`))};function es(e){return e.replace(/\]|\[/g,"")}var ei=e.i(374969),en=e.i(803108);function el(e,t){try{var r=e()}catch(e){return t(e)}return r&&r.then?r.then(void 0,t):r}var eo=e.i(50270),ec=e.i(846932),ed=e.i(522016),eu=e.i(753536),ef=e.i(720994),em=e.i(726775),ep=e.i(871689),eh=e.i(356909),ey=e.i(531278),eg=e.i(968553),eb=e.i(37727),ev=e.i(522706);e.i(970104);var ex=e.i(564814),e_=e.i(296003),ej=e.i(846696);let ew=eo.z.object({name:eo.z.string().min(1,"Name is required").max(200,"Name must be 200 characters or less"),email:eo.z.string().min(1,"Email is required").email("Invalid email address"),phone:eo.z.string().max(50).optional().or(eo.z.literal("")),company_name:eo.z.string().max(200).optional().or(eo.z.literal("")),specialty:eo.z.string().optional().or(eo.z.literal("")),hourly_rate:eo.z.string().optional().or(eo.z.literal("")),w9_on_file:eo.z.boolean(),status:eo.z.string(),start_date:eo.z.string().optional().or(eo.z.literal("")),notes:eo.z.string().max(5e3,"Notes must be 5000 characters or less").optional().or(eo.z.literal("")),is_international:eo.z.boolean(),country_code:eo.z.string().optional().or(eo.z.literal("")),entity_type:eo.z.enum(["individual","business"]),manager_id:eo.z.string().optional().or(eo.z.literal("")),onboarding_template_id:eo.z.string().optional().or(eo.z.literal(""))}),eN=[{value:"onboarding",label:"Onboarding"},{value:"active",label:"Active"},{value:"inactive",label:"Inactive"},{value:"offboarded",label:"Offboarded"}],eS=[{value:"domestic",label:"Domestic (US)"},{value:"international",label:"International"}],ek=[{value:"individual",label:"Individual"},{value:"business",label:"Business / Entity"}],eA=[{value:"US",label:"United States"},{value:"CA",label:"Canada"},{value:"GB",label:"United Kingdom"},{value:"AU",label:"Australia"},{value:"DE",label:"Germany"},{value:"FR",label:"France"},{value:"JP",label:"Japan"},{value:"IN",label:"India"},{value:"BR",label:"Brazil"},{value:"MX",label:"Mexico"},{value:"NL",label:"Netherlands"},{value:"SE",label:"Sweden"},{value:"NO",label:"Norway"},{value:"DK",label:"Denmark"},{value:"FI",label:"Finland"},{value:"CH",label:"Switzerland"},{value:"AT",label:"Austria"},{value:"BE",label:"Belgium"},{value:"IT",label:"Italy"},{value:"ES",label:"Spain"},{value:"PT",label:"Portugal"},{value:"IE",label:"Ireland"},{value:"NZ",label:"New Zealand"},{value:"SG",label:"Singapore"},{value:"KR",label:"South Korea"},{value:"TW",label:"Taiwan"},{value:"HK",label:"Hong Kong"},{value:"IL",label:"Israel"},{value:"AE",label:"United Arab Emirates"},{value:"ZA",label:"South Africa"},{value:"NG",label:"Nigeria"},{value:"KE",label:"Kenya"},{value:"GH",label:"Ghana"},{value:"CO",label:"Colombia"},{value:"AR",label:"Argentina"},{value:"CL",label:"Chile"},{value:"PH",label:"Philippines"},{value:"PK",label:"Pakistan"},{value:"BD",label:"Bangladesh"},{value:"VN",label:"Vietnam"},{value:"TH",label:"Thailand"},{value:"MY",label:"Malaysia"},{value:"ID",label:"Indonesia"},{value:"PL",label:"Poland"},{value:"CZ",label:"Czech Republic"},{value:"RO",label:"Romania"},{value:"UA",label:"Ukraine"},{value:"RU",label:"Russia"},{value:"TR",label:"Turkey"},{value:"EG",label:"Egypt"}];e.s(["ContractorForm",0,function(e){let u,h,{contractor:y,isEdit:g=!1,embedded:b=!1,onSuccess:v,onClose:x}=e,w=(0,a.useRouter)(),{getPageColors:C}=(0,ex.useStudioTheme)(),z=C("contractors"),D=!b,{register:T,handleSubmit:$,watch:I,setValue:U,formState:{errors:H,isSubmitting:J}}=function(e={}){let t=r.default.useRef(void 0),a=r.default.useRef(void 0),[u,h]=r.default.useState({isDirty:!1,isValidating:!1,isLoading:m(e.defaultValues),isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,submitCount:0,dirtyFields:{},touchedFields:{},validatingFields:{},errors:e.errors||{},disabled:e.disabled||!1,isReady:!1,defaultValues:m(e.defaultValues)?void 0:e.defaultValues});if(!t.current)if(e.formControl)t.current={...e.formControl,formState:u},e.defaultValues&&!m(e.defaultValues)&&e.formControl.reset(e.defaultValues,e.resetOptions);else{let{formControl:r,...a}=function(e={}){let t,r={...Q,...e},a={submitCount:0,isDirty:!1,isReady:!1,isLoading:m(r.defaultValues),isValidating:!1,isSubmitted:!1,isSubmitting:!1,isSubmitSuccessful:!1,isValid:!1,touchedFields:{},dirtyFields:{},validatingFields:{},errors:r.errors||{},disabled:r.disabled||!1},u={},h=(n(r.defaultValues)||n(r.values))&&o(r.defaultValues||r.values)||{},y=r.shouldUnregister?{}:o(h),g={action:!1,mount:!1,watch:!1,keepIsValid:!1},b={mount:new Set,disabled:new Set,unMount:new Set,array:new Set,watch:new Set},v=0,x={isDirty:!1,dirtyFields:!1,validatingFields:!1,touchedFields:!1,isValidating:!1,isValid:!1,errors:!1},_={...x},w={..._},S={array:A(),state:A()},C="all"===r.criteriaMode,z=async e=>{if(!g.keepIsValid&&!r.disabled&&(_.isValid||w.isValid||e)){let e;r.resolver?(e=F((await I()).errors),D()):e=await H(u,!0),e!==a.isValid&&S.state.next({isValid:e})}},D=(e,t)=>{!r.disabled&&(_.isValidating||_.validatingFields||w.isValidating||w.validatingFields)&&((e||Array.from(b.mount)).forEac
1h(e=>{e&&(t?p(a.validatingFields,e,t):O(a.validatingFields,e))}),S.state.next({validatingFields:a.validatingFields,isValidating:!F(a.validatingFields)}))},T=(e,t,r,a)=>{let s=f(u,e);if(s){let i=f(y,e,c(r)?f(h,e):r);c(i)||a&&a.defaultChecked||t?p(y,e,t?i:M(s._f)):ee(e,i),g.mount&&!g.action&&z()}},$=(e,t,s,i,n)=>{let l=!1,o=!1,c={name:e};if(!r.disabled){if(!s||i){(_.isDirty||w.isDirty)&&(o=a.isDirty,a.isDirty=c.isDirty=J(),l=o!==c.isDirty);let r=N(f(h,e),t);o=!!f(a.dirtyFields,e),r?O(a.dirtyFields,e):p(a.dirtyFields,e,!0),c.dirtyFields=a.dirtyFields,l=l||(_.dirtyFields||w.dirtyFields)&&!r!==o}if(s){let t=f(a.touchedFields,e);t||(p(a.touchedFields,e,s),c.touchedFields=a.touchedFields,l=l||(_.touchedFields||w.touchedFields)&&t!==s)}l&&n&&S.state.next(c)}return l?c:{}},I=async e=>(D(e,!0),await r.resolver(y,r.context,((e,t,r,a)=>{let s={};for(let r of e){let e=f(t,r);e&&p(s,r,e._f)}return{criteriaMode:r,names:[...e],fields:s,shouldUseNativeValidation:a}})(e||b.mount,u,r.criteriaMode,r.shouldUseNativeValidation))),U=async e=>{let{errors:t}=await I(e);if(D(e),e)for(let r of e){let e=f(t,r);e?p(a.errors,r,e):O(a.errors,r)}else a.errors=t;return t},H=async(e,t,s={valid:!0})=>{for(let i in e){let n=e[i];if(n){let{_f:e,...i}=n;if(e){let i=b.array.has(e.name),l=n._f&&K(n._f);l&&_.validatingFields&&D([e.name],!0);let o=await Y(n,b.disabled,y,C,r.shouldUseNativeValidation&&!t,i);if(l&&_.validatingFields&&D([e.name]),o[e.name]&&(s.valid=!1,t))break;t||(f(o,e.name)?i?W(a.errors,o,e.name):p(a.errors,e.name,o[e.name]):O(a.errors,e.name))}F(i)||await H(i,t,s)}}return s.valid},J=(e,t)=>!r.disabled&&(e&&t&&p(y,e,t),!N(en(),h)),X=(e,t,r)=>{var a,s;return a=b,s={...g.mount?y:c(t)?h:j(e)?{[e]:t}:t},j(e)?(r&&a.watch.add(e),f(s,e,t)):Array.isArray(e)?e.map(e=>(r&&a.watch.add(e),f(s,e))):(r&&(a.watchAll=!0),s)},ee=(e,t,r={})=>{let a=f(u,e),s=t;if(a){let r=a._f;r&&(r.disabled||p(y,e,R(t,r)),s=E(r.ref)&&i(t)?"":t,"select-multiple"===r.ref.type?[...r.ref.options].forEach(e=>e.selected=s.includes(e.value)):r.refs?"checkbox"===r.ref.type?r.refs.forEach(e=>{e.defaultChecked&&e.disabled||(Array.isArray(s)?e.checked=!!s.find(t=>t===e.value):e.checked=s===e.value||!!s)}):r.refs.forEach(e=>e.checked=e.value===s):"file"===r.ref.type?r.ref.value="":(r.ref.value=s,r.ref.type||S.state.next({name:e,values:o(y)})))}(r.shouldDirty||r.shouldTouch)&&$(e,s,r.shouldTouch,r.shouldDirty,!0),r.shouldValidate&&ei(e)},et=(e,t,r)=>{for(let a in t){if(!t.hasOwnProperty(a))return;let i=t[a],l=e+"."+a,o=f(u,l);(b.array.has(e)||n(i)||o&&!o._f)&&!s(i)?et(l,i,r):ee(l,i,r)}},er=(e,t,r={})=>{let s=f(u,e),n=b.array.has(e),l=o(t);p(y,e,l),n?(S.array.next({name:e,values:o(y)}),(_.isDirty||_.dirtyFields||w.isDirty||w.dirtyFields)&&r.shouldDirty&&S.state.next({name:e,dirtyFields:P(h,y),isDirty:J(e,l)})):!s||s._f||i(l)?ee(e,l,r):et(e,l,r),q(e,b)&&S.state.next({...a,name:e}),S.state.next({name:g.mount?e:void 0,values:o(y)})},ea=async e=>{g.mount=!0;let i=e.target,l=i.name,c=!0,d=f(u,l),m=e=>{c=Number.isNaN(e)||s(e)&&isNaN(e.getTime())||N(e,f(y,l,e))},h=B(r.mode),x=B(r.reValidateMode);if(d){let s,g,U,L,B=i.type?M(d._f):n(s=e)&&s.target?"checkbox"===s.target.type?s.target.checked:s.target.value:s,K="blur"===e.type||"focusout"===e.type,G=!((L=d._f).mount&&(L.required||L.min||L.max||L.maxLength||L.minLength||L.pattern||L.validate))&&!r.resolver&&!f(a.errors,l)&&!d._f.deps||(j=K,k=f(a.touchedFields,l),A=a.isSubmitted,E=x,!(V=h).isOnAll&&(!A&&V.isOnTouch?!(k||j):(A?E.isOnBlur:V.isOnBlur)?!j:(A?!E.isOnChange:!V.isOnChange)||j)),W=q(l,b,K);p(y,l,B),K?i&&i.readOnly||(d._f.onBlur&&d._f.onBlur(e),t&&t(0)):d._f.onChange&&d._f.onChange(e);let J=$(l,B,K),X=!F(J)||W;if(K||S.state.next({name:l,type:e.type,values:o(y)}),G)return(_.isValid||w.isValid)&&("onBlur"===r.mode?K&&z():K||z()),X&&S.state.next({name:l,...W?{}:J});if(!K&&W&&S.state.next({...a}),r.resolver){let{errors:e}=await I([l]);if(D([l]),m(B),c){let t=Z(a.errors,u,l),r=Z(e,u,t.name||l);g=r.error,l=r.name,U=F(e)}}else D([l],!0),g=(await Y(d,b.disabled,y,C,r.shouldUseNativeValidation))[l],D([l]),m(B),c&&(g?U=!1:(_.isValid||w.isValid)&&(U=await H(u,!0))
1);if(c){d._f.deps&&(!Array.isArray(d._f.deps)||d._f.deps.length>0)&&ei(d._f.deps);var j,k,A,E,V,P=l,T=U,R=g;let e=f(a.errors,P),s=(_.isValid||w.isValid)&&"boolean"==typeof T&&a.isValid!==T;if(r.delayError&&R){let e;e=()=>{p(a.errors,P,R),S.state.next({errors:a.errors})},(t=t=>{clearTimeout(v),v=setTimeout(e,t)})(r.delayError)}else clearTimeout(v),t=null,R?p(a.errors,P,R):O(a.errors,P);if((R?!N(e,R):e)||!F(J)||s){let e={...J,...s&&"boolean"==typeof T?{isValid:T}:{},errors:a.errors,name:P};a={...a,...e},S.state.next(e)}}}},es=(e,t)=>{if(f(a.errors,t)&&e.focus)return e.focus(),1},ei=async(e,t={})=>{let s,i,n=k(e);if(r.resolver){let t=await U(c(e)?e:n);s=F(t),i=e?!n.some(e=>f(t,e)):s}else e?((i=(await Promise.all(n.map(async e=>{let t=f(u,e);return await H(t&&t._f?{[e]:t}:t)}))).every(Boolean))||a.isValid)&&z():i=s=await H(u);return S.state.next({...!j(e)||(_.isValid||w.isValid)&&s!==a.isValid?{}:{name:e},...r.resolver||!e?{isValid:s}:{},errors:a.errors}),t.shouldFocus&&!i&&G(u,es,e?n:b.mount),i},en=(e,t)=>{let r={...g.mount?y:h};return t&&(r=function e(t,r){let a={};for(let s in t)if(t.hasOwnProperty(s)){let i=t[s],l=r[s];if(i&&n(i)&&l){let t=e(i,l);n(t)&&(a[s]=t)}else t[s]&&(a[s]=l)}return a}(t.dirtyFields?a.dirtyFields:a.touchedFields,r)),c(e)?r:j(e)?f(r,e):e.map(e=>f(r,e))},el=(e,t)=>({invalid:!!f((t||a).errors,e),isDirty:!!f((t||a).dirtyFields,e),error:f((t||a).errors,e),isValidating:!!f(a.validatingFields,e),isTouched:!!f((t||a).touchedFields,e)}),eo=(e,t,r)=>{let s=(f(u,e,{_f:{}})._f||{}).ref,{ref:i,message:n,type:l,...o}=f(a.errors,e)||{};p(a.errors,e,{...o,...t,ref:s}),S.state.next({name:e,errors:a.errors,isValid:!1}),r&&r.shouldFocus&&s&&s.focus&&s.focus()},ec=e=>S.state.subscribe({next:t=>{let r,s,i;r=e.name,s=t.name,i=e.exact,(!r||!s||r===s||k(r).some(e=>e&&(i?e===s:e.startsWith(s)||s.startsWith(e))))&&((e,t,r,a)=>{r(e);let{name:s,...i}=e;return F(i)||Object.keys(i).length>=Object.keys(t).length||Object.keys(i).find(e=>t[e]===(!a||"all"))})(t,e.formState||_,eg,e.reRenderRoot)&&e.callback({values:{...y},...a,...t,defaultValues:h})}}).unsubscribe,ed=(e,t={})=>{for(let s of e?k(e):b.mount)b.mount.delete(s),b.array.delete(s),t.keepValue||(O(u,s),O(y,s)),t.keepError||O(a.errors,s),t.keepDirty||O(a.dirtyFields,s),t.keepTouched||O(a.touchedFields,s),t.keepIsValidating||O(a.validatingFields,s),r.shouldUnregister||t.keepDefaultValue||O(h,s);S.state.next({values:o(y)}),S.state.next({...a,...!t.keepDirty?{}:{isDirty:J()}}),t.keepIsValid||z()},eu=({disabled:e,name:t})=>{("boolean"==typeof e&&g.mount||e||b.disabled.has(t))&&(e?b.disabled.add(t):b.disabled.delete(t))},ef=(e,t={})=>{let a=f(u,e),s="boolean"==typeof t.disabled||"boolean"==typeof r.disabled;return(p(u,e,{...a||{},_f:{...a&&a._f?a._f:{ref:{name:e}},name:e,mount:!0,...t}}),b.mount.add(e),a)?eu({disabled:"boolean"==typeof t.disabled?t.disabled:r.disabled,name:e}):T(e,!0,t.value),{...s?{disabled:t.disabled||r.disabled}:{},...r.progressive?{required:!!t.required,min:L(t.min),max:L(t.max),minLength:L(t.minLength),maxLength:L(t.maxLength),pattern:L(t.pattern)}:{},name:e,onChange:ea,onBlur:ea,ref:s=>{if(s){let r;ef(e,t),a=f(u,e);let i=c(s.value)&&s.querySelectorAll&&s.querySelectorAll("input,select,textarea")[0]||s,n="radio"===(r=i).type||"checkbox"===r.type,l=a._f.refs||[];(n?l.find(e=>e===i):i===a._f.ref)||(p(u,e,{_f:{...a._f,...n?{refs:[...l.filter(V),i,...Array.isArray(f(h,e))?[{}]:[]],ref:{type:i.type,name:e}}:{ref:i}}}),T(e,!1,void 0,i))}else{var i;(a=f(u,e,{}))._f&&(a._f.mount=!1),(r.shouldUnregister||t.shouldUnregister)&&(i=b.array,!i.has(e.substring(0,e.search(/\.\d+(\.|$)/))||e)||!g.action)&&b.unMount.add(e)}}}},em=()=>r.shouldFocusError&&G(u,es,b.mount),ep=(e,t)=>async s=>{let i;s&&(s.preventDefault&&s.preventDefault(),s.persist&&s.persist());let n=o(y);if(S.state.next({isSubmitting:!0}),r.resolver){let{errors:e,values:t}=await I();D(),a.errors=e,n=o(t)}else await H(u);if(b.disabled.size)for(let e of b.disabled)O(n,e);if(O(a.errors,"root"),F(a.errors)){S.state.next({errors:{}});try{await e(n,s)}catch(e){i=e}}else t&&await t({...a.errors},s),em(),setTimeout(em);if(S.state.next({isSubmitted:!0,isSubmitting:!1,isSubmitSuccessful:F(a.errors)&&!i,submitCount:a.submitCount+1,errors:a.errors}),i)throw i},eh=(e,t={})=>{let s=e?o(e):h,i=o(s),n=F(e),d=n?h:i;if(t.keepDefaultValues||(h=s),!t.keepValues){if(t.keepDirtyValues)for(let e of Array.from(new Set([...b.mount,...Object.keys(P(h,y))])))f(a.dirtyFields,e)?p(d,e,f(y,e)):er(e,f(d,e));else{if(l&&c(e))for(let e of b.mount){let t=f(u,e);if(t&&t._f){let e=Array.isArray(t._f.refs)?t._f.refs[0]:t._f.ref;if(E(e)){let t=e.closest("form");if(t){t.reset();break}}}}if(t.keepFieldsRef)for(let e of b.mount)er(e,f(d,e));else u={}}y=r.shouldUnregister?t.keepDefaultValues?o(h):{}:o(d),S.array.next({values:{...d}}),S.state.next({values:{...d}})}b={mount:t.keepDirtyValues?b.mount:new Set,unMount:new Set,array:new Set,disabled:new Set,watch:new Set,watchAll:!1,focus:""},g.mount=!_.isValid||!!t.keepIsValid||!!t.keepDirtyValues||!r.shouldUnregister&&!F(d),g.watch=!!r.shouldUnregister,g.keepIsValid=!!t.keepIsValid,g.action=!1,t.keepErrors||(a.errors={}),S.state.next({submitCount:t.keepSubmitCount?a.submitCount:0,isDirty:!n&&(t.keepDirty?a.isDirty:!!(t.keepDefaultValues&&!N(e,h))),isSubmitted:!!t.keepIsSubmitted&&a.isSubmitted,dirtyFields:n?{}:t.keepDirtyValues?t.keepDefaultValues&&y?P(h,y):a.dirtyFields:t.keepDefaultValues&&e?P(h,e):t.keepDirty?a.dirtyFields:{},touchedFields:t.keepTouched?a.touchedFields:{},errors:t.keepErrors?a.errors:{},isSubmitSuccessful:!!t.keepIsSubmitSuccessful&&a.isSubmitSuccessful,isSubmitting:!1,defaultValues:h})},ey=(e,t)=>eh(m(e)?e(y):e,{...r.resetOptions,...t}),eg=e=>{a={...a,...e}},eb={control:{register:ef,unregister:ed,getFieldState:el,handleSubmit:ep,setError:eo,_subscribe:ec,_runSchema:I,_updateIsValidating:D,_focusError:em,_getWatch:X,_getDirty:J,_setValid:z,_setFieldArray:(e,t=[],s,i,n=!0,l=!0)=>
1{if(i&&s&&!r.disabled){if(g.action=!0,l&&Array.isArray(f(u,e))){let t=s(f(u,e),i.argA,i.argB);n&&p(u,e,t)}if(l&&Array.isArray(f(a.errors,e))){let t,r=s(f(a.errors,e),i.argA,i.argB);n&&p(a.errors,e,r),d(f(t=a.errors,e)).length||O(t,e)}if((_.touchedFields||w.touchedFields)&&l&&Array.isArray(f(a.touchedFields,e))){let t=s(f(a.touchedFields,e),i.argA,i.argB);n&&p(a.touchedFields,e,t)}(_.dirtyFields||w.dirtyFields)&&(a.dirtyFields=P(h,y)),S.state.next({name:e,isDirty:J(e,t),dirtyFields:a.dirtyFields,errors:a.errors,isValid:a.isValid})}else p(y,e,t)},_setDisabledField:eu,_setErrors:e=>{a.errors=e,S.state.next({errors:a.errors,isValid:!1})},_getFieldArray:e=>d(f(g.mount?y:h,e,r.shouldUnregister?f(h,e,[]):[])),_reset:eh,_resetDefaultValues:()=>m(r.defaultValues)&&r.defaultValues().then(e=>{ey(e,r.resetOptions),S.state.next({isLoading:!1})}),_removeUnmounted:()=>{for(let e of b.unMount){let t=f(u,e);t&&(t._f.refs?t._f.refs.every(e=>!V(e)):!V(t._f.ref))&&ed(e)}b.unMount=new Set},_disableForm:e=>{"boolean"==typeof e&&(S.state.next({disabled:e}),G(u,(t,r)=>{let a=f(u,r);a&&(t.disabled=a._f.disabled||e,Array.isArray(a._f.refs)&&a._f.refs.forEach(t=>{t.disabled=a._f.disabled||e}))},0,!1))},_subjects:S,_proxyFormState:_,get _fields(){return u},get _formValues(){return y},get _state(){return g},set _state(value){g=value},get _defaultValues(){return h},get _names(){return b},set _names(value){b=value},get _formState(){return a},get _options(){return r},set _options(value){r={...r,...value}}},subscribe:e=>(g.mount=!0,w={...w,...e.formState},ec({...e,formState:{...x,...e.formState}})),trigger:ei,register:ef,handleSubmit:ep,watch:(e,t)=>m(e)?S.state.subscribe({next:r=>"values"in r&&e(X(void 0,t),r)}):X(e,t,!0),setValue:er,getValues:en,reset:ey,resetField:(e,t={})=>{f(u,e)&&(c(t.defaultValue)?er(e,o(f(h,e))):(er(e,t.defaultValue),p(h,e,o(t.defaultValue))),t.keepTouched||O(a.touchedFields,e),t.keepDirty||(O(a.dirtyFields,e),a.isDirty=t.defaultValue?J(e,o(f(h,e))):J()),!t.keepError&&(O(a.errors,e),_.isValid&&z()),S.state.next({...a}))},clearErrors:e=>{e&&k(e).forEach(e=>O(a.errors,e)),S.state.next({errors:e?a.errors:{}})},unregister:ed,setError:eo,setFocus:(e,t={})=>{let r=f(u,e),a=r&&r._f;if(a){let e=a.refs?a.refs[0]:a.ref;e.focus&&setTimeout(()=>{e.focus(),t.shouldSelect&&m(e.select)&&e.select()})}},getFieldState:el};return{...eb,formControl:eb}}(e);t.current={...a,formState:u}}let y=t.current.control;return y._options=e,_(()=>{let e=y._subscribe({formState:y._proxyFormState,callback:()=>h({...y._formState}),reRenderRoot:!0});return h(e=>({...e,isReady:!0})),y._formState.isReady=!0,e},[y]),r.default.useEffect(()=>y._disableForm(e.disabled),[y,e.disabled]),r.default.useEffect(()=>{e.mode&&(y._options.mode=e.mode),e.reValidateMode&&(y._options.reValidateMode=e.reValidateMode)},[y,e.mode,e.reValidateMode]),r.default.useEffect(()=>{e.errors&&(y._setErrors(e.errors),y._focusError())},[y,e.errors]),r.default.useEffect(()=>{e.shouldUnregister&&y._subjects.state.next({values:y._getWatch()})},[y,e.shouldUnregister]),r.default.useEffect(()=>{if(y._proxyFormState.isDirty){let e=y._getDirty();e!==u.isDirty&&y._subjects.state.next({isDirty:e})}},[y,u.isDirty]),r.default.useEffect(()=>{var t;e.values&&!N(e.values,a.current)?(y._reset(e.values,{keepFieldsRef:!0,...y._options.resetOptions}),(null==(t=y._options.resetOptions)?void 0:t.keepIsValid)||y._setValid(),a.current=e.values,h(e=>({...e}))):y._resetDefaultValues()},[y,e.values]),r.default.useEffect(()=>{y._state.mount||(y._setValid(),y._state.mount=!0),y._state.watch&&(y._state.watch=!1,y._subjects.state.next({...y._formState})),y._removeUnmounted()}),t.current.formState=((e,t,r=!0)=>{let a={defaultValues:t._defaultValues};for(let s in e)Object.defineProperty(a,s,{get:()=>("all"!==t._proxyFormState[s]&&(t._proxyFormState[s]=!r||"all"),e[s])});return a})(u,y),t.current}({resolver:function(e,t){if(void 0===t&&(t={}),"_def"in e&&"object"==typeof e._def&&"typeName"in e._def)return function(r,a,s){try{return Promise.resolve(el(function(){return Promise.resolve(e["sync"===t.mode?"parse":"parseAsync"](r,void 0)).then(function(e){return s.shouldUseNativeValidation&&et({},s),{errors:{},values:t.raw?Object.assign({},r):e}})},function(e){if(Array.isArray(null==e?void 0:e.issues))return{values:{},errors:er(function(e,t){for(var r={};e.length;){var a=e[0],s=a.code,i=a.message,n=a.path.join(".");if(!r[n])if("unionErrors"in a){var l=a.unionErrors[0].errors[0];r[n]={message:l.message,type:l.code}}else r[n]={message:i,type:s};
1if("unionErrors"in a&&a.unionErrors.forEach(function(t){return t.errors.forEach(function(t){return e.push(t)})}),t){var o=r[n].types,c=o&&o[a.code];r[n]=S(n,t,r,s,c?[].concat(c,a.message):a.message)}e.shift()}return r}(e.errors,!s.shouldUseNativeValidation&&"all"===s.criteriaMode),s)};throw e}))}catch(e){return Promise.reject(e)}};if("_zod"in e&&"object"==typeof e._zod)return function(r,a,s){try{return Promise.resolve(el(function(){return Promise.resolve(("sync"===t.mode?en.parse:en.parseAsync)(e,r,void 0)).then(function(e){return s.shouldUseNativeValidation&&et({},s),{errors:{},values:t.raw?Object.assign({},r):e}})},function(e){if(e instanceof ei.$ZodError)return{values:{},errors:er(function(e,t){for(var r={};e.length;){var a=e[0],s=a.code,i=a.message,n=a.path.join(".");if(!r[n])if("invalid_union"===a.code&&a.errors.length>0){var l=a.errors[0][0];r[n]={message:l.message,type:l.code}}else r[n]={message:i,type:s};if("invalid_union"===a.code&&a.errors.forEach(function(t){return t.forEach(function(t){return e.push(t)})}),t){var o=r[n].types,c=o&&o[a.code];r[n]=S(n,t,r,s,c?[].concat(c,a.message):a.message)}e.shift()}return r}(e.issues,!s.shouldUseNativeValidation&&"all"===s.criteriaMode),s)};throw e}))}catch(e){return Promise.reject(e)}};throw Error("Invalid input: not a Zod schema")}(ew),defaultValues:{name:y?.name||"",email:y?.email||"",phone:y?.phone||"",company_name:y?.company_name||"",specialty:y?.specialty||"",hourly_rate:y?.hourly_rate?(y.hourly_rate/100).toString():"",w9_on_file:y?.w9_on_file||!1,status:y?.status||"onboarding",start_date:y?.start_date||"",notes:y?.notes||"",is_international:y?.is_international||!1,country_code:y?.country_code||"US",entity_type:y?.entity_type||"individual",manager_id:y?.manager_id||"",onboarding_template_id:y?.onboarding_template_id||""}}),[X,ee]=(0,r.useState)(y?.avatar_url||null),[ea,es]=(0,r.useState)(!1),[eo,eF]=(0,r.useState)([]),[eE,eV]=(0,r.useState)([]),[eO,eC]=(0,r.useState)([]),[ez,eP]=(0,r.useState)(!!y?.onboarding_template_id);(0,r.useEffect)(()=>{fetch("/api/settings/specialties").then(e=>e.json()).then(e=>{e.specialties&&eF(e.specialties.map(e=>({value:e.name,label:e.name})))}).catch(()=>{eF([])})},[]),(0,r.useEffect)(()=>{let e=!0;return(async()=>{try{let[t,r]=await Promise.all([fetch("/api/team"),fetch("/api/onboarding/templates")]);if(!e)return;if(t.ok){let e=await t.json();eV(Array.isArray(e.members)?e.members:[])}if(r.ok){let e=await r.json(),t=Array.isArray(e.templates)?e.templates:[];eC(t)}}catch{}})(),()=>{e=!1}},[]);let eD=I("is_international"),eT=I("entity_type"),e$=I("onboarding_template_id"),eR=I("manager_id");(0,r.useEffect)(()=>{let e,t,r;if(0===eO.length||y?.onboarding_template_id||ez&&e$)return;let a=(r=(t=(e=eO.filter(e=>e.is_international===eD)).length>0?e:eO).find(e=>e.is_default&&"studio"===e.scope)||t.find(e=>e.is_default)||t.find(e=>"studio"===e.scope)||t[0],r?.id||"");a&&e$!==a&&U("onboarding_template_id",a)},[y?.onboarding_template_id,U,ez,eO,eD,e$]);let eI=async e=>{let t=e.target.files?.[0];if(t&&y?.id){es(!0);try{let e=new FormData;e.append("file",t);let r=await fetch(`/api/contractors/${y.id}/avatar`,{method:"POST",body:e});if(r.ok){let e=await r.json();ee(e.avatar_url),ej.toast.success("Avatar uploaded")}else{let e=await r.json().catch(()=>({}));ej.toast.error(e.error||"Failed to upload avatar")}}catch{ej.toast.error("Failed to upload avatar")}finally{es(!1)}}},eU=async()=>{if(y?.id){es(!0);try{(await fetch(`/api/contractors/${y.id}/avatar`,{method:"DELETE"})).ok&&(ee(null),ej.toast.success("Avatar removed"))}catch{ej.toast.error("Failed to remove avatar")}finally{es(!1)}}},eM=async e=>{try{var t,r;let a={name:e.name,email:e.email,phone:e.phone||null,company_name:e.company_name||null,specialty:e.specialty||null,hourly_rate:e.hourly_rate?Math.round(100*parseFloat(e.hourly_rate)):null,w9_on_file:e.w9_on_file,status:e.status,start_date:e.start_date||null,notes:e.notes||null,is_international:e.is_international,country_code:e.is_international?e.country_code||null:"US",entity_type:e.entity_type,tax_form_type:(t=e.is_international,r=e.entity_type,t?"business"===r?"w8bene":"w8ben":"w9"),manager_id:e.manager_id||null,onboarding_template_id:e.onboarding_template_id||null};if(g&&y?.slug&&(a.slug=y.slug),g&&y){(e.onboarding_template_id||null)!==(y.onboarding_template_id||null)&&(a.apply_onboarding_template=!0);let t=await fetch(`/api/contractors/${y.id}`,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!t.ok){let e=await t.json();throw Error(e.error||"Failed to update talent")}if(ej.toast.success("Talent updated"),v)return void v({id:y.id,name:e.name,slug:y.slug||y.id});w.push(`/roster/${y.slug||y.id}`)}else{let e=await fetch("/api/contractors",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(a)});if(!e.ok){let t=await e.json();throw Error(t.error||"Failed to create talent")}let t=await e.json();if(ej.toast.success("Talent added"),v)return void v({id:t.id,name:t.name,slug:t.slug||t.id});w.push(`/roster/${t.slug||t.id}`)}w.refresh()}catch(e){console.error("Error saving contractor:",e),ej.toast.error(e instanceof Error?e.message:"Failed to save talent")}},eL="flex items-center gap-2.5 border bg-[var(--page-bg-card)] px-3 py-2.5 transition-colors focus-within:bg-[var(--page-bg-hover)]",eB={borderColor:z.border},eH="w-full min-w-0 bg-transparent border-none outline-none text-[15px] text-[var(--theme-text)] placeholder:text-[var(--theme-text)]/40",eK="mb-3.5 block text-xs font-medium uppercase tracking-[0.1em] text-[var(--theme-text-muted)]",eq="block text-xs font-medium tracking-[0.02em] text-[var(--theme-text-muted)] mb-2",eG=eD?"business"===eT?{label:"W-8BEN-E",desc:"International entity — foreign business tax form."}
1:{label:"W-8BEN",desc:"International individual — foreign person tax form."}:{label:"W-9",desc:"Domestic contractor — standard US tax form."},eZ=eE.map(e=>({value:e.id,label:`${e.full_name} (${e.email})`})),eW=eO.map(e=>({value:e.id,label:`${e.name}${"studio"===e.scope?" — Studio":" — Global"}`})),eJ=eO.find(e=>e.id===e$)||null,eX=I("status"),eY=(u=eN.find(e=>e.value===eX)?.label||"Onboarding",h="active"===eX?null:70,{label:u,bg:`color-mix(in srgb, var(--theme-${"active"===eX?"accent":"text"}) ${"active"===eX?15:8}%, transparent)`,color:h?`color-mix(in srgb, var(--theme-text) ${h}%, transparent)`:"var(--theme-accent)"}),eQ=(0,t.jsxs)("form",{onSubmit:$(eM),noValidate:!0,className:`${b?"":"max-w-[980px]"} ${D?"pb-28 sm:pb-32":""}`,"data-form":"contractor","data-entity-type":"contractor","aria-label":g?"Edit talent form":"Add new talent form",children:[g&&y&&(0,t.jsxs)("div",{className:"mb-7 flex items-center gap-4","data-testid":"contractor-avatar-row",children:[(0,t.jsxs)("div",{className:"relative group",children:[X?(0,t.jsx)("img",{src:X,alt:y.name,className:"w-[72px] h-[72px] object-cover",style:{border:`1px solid ${z.border}`}}):(0,t.jsx)("div",{className:"w-[72px] h-[72px] flex items-center justify-center font-display text-[28px]",style:{backgroundColor:"color-mix(in srgb, var(--theme-accent) 12%, transparent)",color:z.accent,border:`1px solid ${z.border}`},children:y.name.charAt(0).toUpperCase()}),ea&&(0,t.jsx)("div",{className:"absolute inset-0 flex items-center justify-center",style:{backgroundColor:"color-mix(in srgb, var(--theme-text) 50%, transparent)"},children:(0,t.jsx)(ey.Loader2,{className:"w-5 h-5 animate-spin text-[var(--theme-accent-contrast)]"})})]}),(0,t.jsxs)("div",{className:"flex flex-col gap-2",children:[(0,t.jsxs)("label",{className:"inline-flex items-center gap-1.5 text-sm cursor-pointer transition-opacity hover:opacity-80",style:{color:z.accent},"data-testid":"contractor-avatar-upload",children:[(0,t.jsx)(eg.Camera,{className:"w-3.5 h-3.5"}),X?"Change photo":"Upload photo",(0,t.jsx)("input",{type:"file",accept:"image/jpeg,image/png,image/webp,image/gif",onChange:eI,className:"sr-only"})]}),X&&(0,t.jsxs)("button",{type:"button",onClick:eU,className:"inline-flex items-center gap-1 text-sm transition-opacity hover:opacity-80",style:{color:z.textMuted},"data-testid":"contractor-avatar-remove",children:[(0,t.jsx)(eb.X,{className:"w-3 h-3"}),"Remove"]})]})]}),(0,t.jsxs)("section",{className:"mb-8","data-testid":"section-identity",children:[(0,t.jsx)("span",{className:eK,children:"Identity"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-[18px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"contractor-name",className:eq,children:["Full name ",(0,t.jsx)("span",{className:"text-[var(--theme-accent)]",children:"*"})]}),(0,t.jsx)("div",{className:eL,style:H.name?{borderColor:"var(--error)"}:eB,children:(0,t.jsx)("input",{id:"contractor-name",type:"text",...T("name"),placeholder:"e.g. Sarah Johnson",spellCheck:!1,className:eH,"data-field":"name","aria-required":"true","aria-invalid":!!H.name,"aria-describedby":H.name?"contractor-name-error":void 0})}),H.name&&(0,t.jsx)("p",{id:"contractor-name-error",className:"text-[var(--error)] text-sm mt-1.5",children:H.name.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-phone",className:eq,children:"Phone"}),(0,t.jsx)("div",{className:eL,style:eB,children:(0,t.jsx)("input",{id:"contractor-phone",type:"tel",...T("phone"),placeholder:"(555) 123-4567",className:eH,"data-field":"phone"})})]})]}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4 sm:gap-[18px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsxs)("label",{htmlFor:"contractor-email",className:eq,children:["Email ",(0,t.jsx)("span",{className:"text-[var(--theme-accent)]",children:"*"})]}),(0,t.jsx)("div",{className:eL,style:H.email?{borderColor:"var(--error)"}:eB,children:(0,t.jsx)("input",{id:"contractor-email",type:"email",...T("email"),placeholder:"[email protected]",spellCheck:!1,className:eH,"data-field":"email","aria-required":"true","aria-invalid":!!H.email,"aria-describedby":H.email?"contractor-email-error":void 0})}),H.email&&(0,t.jsx)("p",{id:"contractor-email-error",className:"text-[var(--error)] text-sm mt-1.5",children:H.email.message})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-company",className:eq,children:"Company / LLC name"}),(0,t.jsx)("div",{className:eL,style:eB,children:(0,t.jsx)("input",{id:"contractor-company",type:"text",...T("company_name"),placeholder:"e.g. Sarah Johnson Design LLC",className:eH,"data-field":"company_name"})})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-8","data-testid":"section-role-ownership",children:[(0,t.jsx)("span",{className:eK,children:"Role & ownership"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 sm:gap-[18px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-specialty",className:eq,children:"Specialty"}
1),(0,t.jsx)(ef.Select,{id:"contractor-specialty",value:I("specialty")||"",onChange:e=>U("specialty",e),placeholder:"Select specialty...",options:eo})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-status",className:eq,children:"Status"}),(0,t.jsx)(ef.Select,{id:"contractor-status",value:I("status"),onChange:e=>U("status",e),options:eN})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-manager",className:eq,children:"Talent manager"}),(0,t.jsx)(ef.Select,{id:"contractor-manager",value:eR||"",onChange:e=>U("manager_id",e),options:eZ,placeholder:"Select a manager...",searchPlaceholder:"Search studio team..."})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-onboarding-template",className:eq,children:"Onboarding template"}),(0,t.jsx)(ef.Select,{id:"contractor-onboarding-template",value:e$||"",onChange:e=>{eP(!0),U("onboarding_template_id",e)},options:eW,placeholder:"Select onboarding template..."}),(0,t.jsx)("p",{className:"text-[var(--theme-text-muted)] text-xs mt-2","data-testid":"contractor-template-hint",children:eJ?`${eJ.tasks.length} template-managed ${1===eJ.tasks.length?"step":"steps"}${eJ.description?` — ${eJ.description}`:""}`:"Choose the default onboarding plan this contractor should follow. The manager becomes the contractor’s named internal owner in the portal."})]})]})]}),(0,t.jsxs)("section",{className:"mb-8","data-testid":"section-classification-tax",children:[(0,t.jsx)("span",{className:eK,children:"Classification & tax"}),(0,t.jsxs)("div",{className:"flex flex-col gap-4",children:[(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 sm:gap-[18px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-classification",className:eq,children:"Classification"}),(0,t.jsx)(ef.Select,{id:"contractor-classification",value:eD?"international":"domestic",onChange:e=>{let t="international"===e;U("is_international",t),t?"US"===I("country_code")&&U("country_code",""):U("country_code","US")},options:eS})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-entity-type",className:eq,children:"Entity type"}),(0,t.jsx)(ef.Select,{id:"contractor-entity-type",value:eT,onChange:e=>U("entity_type",e),options:ek})]}),eD&&(0,t.jsxs)("div",{"data-testid":"contractor-country-field",children:[(0,t.jsx)("label",{htmlFor:"contractor-country",className:eq,children:"Tax country"}),(0,t.jsx)(ef.Select,{id:"contractor-country",value:I("country_code")||"",onChange:e=>U("country_code",e),placeholder:"Select country...",options:eA.filter(e=>"US"!==e.value),searchPlaceholder:"Search countries..."})]})]}),(0,t.jsxs)("div",{className:"flex items-center gap-2.5 px-3.5 py-3 text-sm text-[var(--theme-text-muted)]",style:{backgroundColor:"color-mix(in srgb, var(--theme-accent) 6%, transparent)",border:"1px solid var(--theme-hairline)"},"data-testid":"contractor-tax-note",children:[(0,t.jsx)("b",{className:"font-body text-xs tracking-normal text-[var(--theme-accent)] shrink-0","data-testid":"contractor-tax-label",children:eG.label}),(0,t.jsx)("span",{"data-testid":"contractor-tax-desc",children:eG.desc})]})]})]}),(0,t.jsxs)("section",{className:"mb-8","data-testid":"section-engagement",children:[(0,t.jsx)("span",{className:eK,children:"Engagement"}),(0,t.jsxs)("div",{className:"grid grid-cols-1 sm:grid-cols-3 gap-4 sm:gap-[18px]",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-rate",className:eq,children:"Hourly rate"}),(0,t.jsxs)("div",{className:eL,style:eB,children:[(0,t.jsx)("span",{className:"font-body text-sm sm:text-base text-[var(--theme-text-muted)] shrink-0",children:"$"}),(0,t.jsx)("input",{id:"contractor-rate",type:"number",step:"0.01",min:"0",...T("hourly_rate"),placeholder:"0.00",className:`${eH} font-body text-sm sm:text-base text-right`,"data-field":"hourly_rate"}),(0,t.jsx)("span",{className:"font-body text-sm sm:text-base text-[var(--theme-text-muted)] shrink-0",children:"/hr"})]})]}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-start-date",className:eq,children:"Start date"}),(0,t.jsx)("div",{className:eL,style:eB,children:(0,t.jsx)("input",{id:"contractor-start-date",type:"date",...T("start_date"),className:eH,"data-field":"start_date"})})]}),(0,t.jsxs)("div",{children:[(0,t.jsxs)("span",{className:eq,"data-testid":"contractor-w9-label",children:[eG.label," status"]}),(0,t.jsxs)("label",{htmlFor:"contractor-w9",className:"flex items-center gap-3 border bg-[var(--page-bg-card)] px-3 py-2.5 cursor-pointer transition-colors hover:bg-[var(--page-bg-hover)]",style:eB,children:[(0,t.jsx)("input",{id:"contractor-w9",type:"checkbox",...T("w9_on_file"),className:"w-4 h-4 shrink-0 accent-[var(--theme-accent)]","data-field":"w9_on_file"}),(0,t.jsxs)("span",{className:"text-[var(--theme-text)] text-sm","data-testid":"contractor-w9-text",children:[eG.label," on file"]})]})]})]})]}),(0,t.jsxs)("section",{className:"mb-9 sm:mb-12","data-testid":"section-notes",children:[(0,t.jsx)("span",{className:eK,children:"Notes"}),(0,t.jsxs)("div",{children:[(0,t.jsx)("label",{htmlFor:"contractor-notes",className:eq,children:"Internal notes"}),(0,t.jsx)("div",{className:`${eL} items-start`,style:eB,children:(0,t.jsx)("textarea",{id:"contractor-notes",...T("notes"),placeholder:"Internal 
1context — not shared with the contractor…",rows:4,spellCheck:!1,className:`${eH} resize-y min-h-[88px] leading-relaxed`,"data-field":"notes"})}),H.notes&&(0,t.jsx)("p",{className:"text-[var(--error)] text-sm mt-1.5",children:H.notes.message})]})]}),!D&&(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4",children:[(0,t.jsx)("button",{type:"submit",disabled:J,className:"inline-flex items-center justify-center gap-3 bg-[var(--theme-accent)] px-6 sm:px-8 py-3 sm:py-4 text-sm font-medium hover:bg-[var(--theme-accent-hover)] transition-[background-color,opacity] duration-300 disabled:opacity-50 disabled:cursor-not-allowed w-full sm:w-auto text-[var(--theme-accent-contrast)]","data-action":g?"save-contractor":"create-contractor","aria-label":g?"Save talent changes":"Add new talent",children:J?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(ey.Loader2,{className:"w-4 h-4 animate-spin"}),"Saving..."]}):(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(eh.Save,{className:"w-4 h-4"}),g?"Save Changes":"Add talent"]})}),b&&x?(0,t.jsx)("button",{type:"button",onClick:x,className:"px-6 sm:px-8 py-3 sm:py-4 text-sm text-[var(--theme-text-muted)] hover:text-[var(--theme-text)] transition-colors text-center sm:text-left",children:"Cancel"}):(0,t.jsx)(ed.default,{href:"/roster",className:"px-6 sm:px-8 py-3 sm:py-4 text-sm text-[var(--theme-text-muted)] hover:text-[var(--theme-text)] transition-colors text-center sm:text-left",children:"Cancel"})]}),D&&(0,t.jsx)(em.EditorActionBar,{theme:z,saveLabel:g?"Save Changes":"Add talent",savingLabel:"Saving...",isSaving:J,disabled:J,statusLabel:g?"Talent changes stay ready to save":"Ready to add talent",cancelHref:y?`/roster/${y.slug||y.id}`:"/roster"})]});return b?(0,t.jsx)("div",{style:{...(0,e_.getThemeCssVars)(z)},children:eQ}):(0,t.jsxs)("div",{className:"min-h-screen","data-fullbleed":!0,style:{backgroundColor:"var(--theme-body)",...(0,e_.getThemeCssVars)(z)},"data-testid":"contractor-form-page",children:[(0,t.jsx)(ev.PageHeader,{rail:"form",breadcrumb:(0,t.jsxs)("div",{className:"flex items-center gap-2 font-mono text-[11px] uppercase tracking-[0.06em] text-[var(--theme-text-muted)]","data-testid":"contractor-crumb",children:[(0,t.jsx)(ed.default,{href:"/roster",className:"hover:text-[var(--theme-accent)] transition-colors",children:"Roster"}),(0,t.jsx)("span",{children:"/"}),(0,t.jsx)("span",{className:"text-[var(--theme-text-strong)]",children:g?"Edit":"New"})]}),backLink:(0,t.jsxs)(ed.default,{href:y?`/roster/${y.slug||y.id}`:"/roster",className:"inline-flex items-center gap-2 text-[var(--theme-text-muted)] hover:text-[var(--theme-accent)] text-sm transition-colors","data-testid":"contractor-back-link",children:[(0,t.jsx)(ep.ArrowLeft,{className:"w-4 h-4"}),g?"Back to talent":"Back to Talent"]}),eyebrow:(0,t.jsx)("span",{"data-testid":"contractor-eyebrow",children:g?"Editing contractor":"New contractor"}),title:(0,t.jsx)("span",{"data-testid":"contractor-title",children:g&&y?`Edit — ${y.name}`:"Add contractor"}),description:(0,t.jsx)("span",{"data-testid":"contractor-subtitle",children:g&&y?(0,t.jsxs)(t.Fragment,{children:["Editing ",(0,t.jsx)("span",{className:"text-[var(--theme-text-strong)]",children:y.name})," · changing the onboarding template re-applies the plan to their portal."]}):"Add a contractor to your talent roster. They’ll get a portal invite and an onboarding plan once classification and tax details are set."}),actions:(0,t.jsxs)("span",{className:"hidden sm:inline-flex items-center gap-2 px-3 py-1.5 text-xs font-medium shrink-0",style:{backgroundColor:eY.bg,color:eY.color},"data-testid":"contractor-status-badge",children:[(0,t.jsx)("span",{className:"w-1.5 h-1.5",style:{backgroundColor:"currentColor"}}),eY.label]})}),(0,t.jsx)(ec.motion.div,{className:"max-w-[980px] mx-auto px-4 sm:px-8 py-6 sm:py-8 lg:py-10",initial:{opacity:0,y:24},animate:{opacity:1,y:0},transition:{duration:eu.duration.slower,ease:eu.easeOutExpo,delay:.2},children:eQ})]})}],460142)}]);

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.