Validation_Suite/validation-suite/frontend/atlas/.next/static/chunks/0ti1a2yw9pft4.js

1 line
No EOL
17 KiB
JavaScript

(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,54858,e=>{"use strict";let t="/api/v1";async function r(e,t){let r=await e.text();if(!r)return t;try{let e=JSON.parse(r);return e.detail??e.message??r}catch{return r}}async function s(e,t){let r=await fetch("/api/login",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({email:e,password:t}),credentials:"include"});if(!r.ok){let e=Error(await r.text()||`HTTP ${r.status}`);throw e.status=r.status,e}return r.json()}async function i(e,r){let s=await fetch(`${t}${e}`,{cache:"no-store",credentials:"include"});if(!s.ok)throw Error(`API request failed: ${s.status}`);return s.json()}async function n(e,s,i,n){let a=await fetch(`${t}${e}`,{method:i,headers:{"Content-Type":"application/json"},body:JSON.stringify(n),credentials:"include"});if(!a.ok)throw Error(await r(a,`API request failed: ${a.status}`));return a.json()}async function a(e,s){let i=await fetch(`${t}${e}`,{method:"DELETE",credentials:"include"});if(!i.ok)throw Error(await r(i,`API request failed: ${i.status}`))}async function u(e,s,i){let n=await fetch(`${t}${e}`,{...i,headers:{"Content-Type":"application/json",...i?.headers??{}},credentials:"include"});if(!n.ok)throw Error(await r(n,`API request failed: ${n.status}`));return n.json()}e.s(["API_BASE",0,t,"apiDelete",0,a,"apiFetch",0,u,"apiGet",0,i,"apiSend",0,n,"login",0,s,"normalizeValidationPayload",0,function(e){return{...e,...Object.fromEntries(["contact_id","examiner_id"].map(t=>[t,e[t]||null]))}}])},66027,e=>{"use strict";let t;var r=e.i(75555),s=e.i(73911),i=e.i(40143),n=e.i(86491),a=e.i(15823),u=e.i(93803),o=e.i(19273),l=e.i(80166),c=class extends a.Subscribable{constructor(e,t){super(),this.options=t,this.#e=e,this.#t=null,this.#r=(0,u.pendingThenable)(),this.bindMethods(),this.setOptions(t)}#e;#s=void 0;#i=void 0;#n=void 0;#a;#u;#r;#t;#o;#l;#c;#h;#d;#p;#y=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){1===this.listeners.size&&(this.#s.addObserver(this),h(this.#s,this.options)?this.#f():this.updateResult(),this.#b())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return d(this.#s,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return d(this.#s,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#m(),this.#v(),this.#s.removeObserver(this)}setOptions(e){let t=this.options,r=this.#s;if(this.options=this.#e.defaultQueryOptions(e),void 0!==this.options.enabled&&"boolean"!=typeof this.options.enabled&&"function"!=typeof this.options.enabled&&"boolean"!=typeof(0,o.resolveQueryBoolean)(this.options.enabled,this.#s))throw Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#g(),this.#s.setOptions(this.options),t._defaulted&&!(0,o.shallowEqualObjects)(this.options,t)&&this.#e.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#s,observer:this});let s=this.hasListeners();s&&p(this.#s,r,this.options,t)&&this.#f(),this.updateResult(),s&&(this.#s!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#s)!==(0,o.resolveQueryBoolean)(t.enabled,this.#s)||(0,o.resolveStaleTime)(this.options.staleTime,this.#s)!==(0,o.resolveStaleTime)(t.staleTime,this.#s))&&this.#E();let i=this.#R();s&&(this.#s!==r||(0,o.resolveQueryBoolean)(this.options.enabled,this.#s)!==(0,o.resolveQueryBoolean)(t.enabled,this.#s)||i!==this.#p)&&this.#T(i)}getOptimisticResult(e){var t,r;let s=this.#e.getQueryCache().build(this.#e,e),i=this.createResult(s,e);return t=this,r=i,(0,o.shallowEqualObjects)(t.getCurrentResult(),r)||(this.#n=i,this.#u=this.options,this.#a=this.#s.state),i}getCurrentResult(){return this.#n}trackResult(e,t){return new Proxy(e,{get:(e,r)=>(this.trackProp(r),t?.(r),"promise"===r&&(this.trackProp("data"),this.options.experimental_prefetchInRender||"pending"!==this.#r.status||this.#r.reject(Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(e,r))})}trackProp(e){this.#y.add(e)}getCurrentQuery(){return this.#s}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=this.#e.defaultQueryOptions(e),r=this.#e.getQueryCache().build(this.#e,t);return r.fetch().then(()=>this.createResult(r,t))}fetch(e){return this.#f({...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#n))}#f(e){this.#g();let t=this.#s.fetch(this.options,e);return e?.throwOnError||(t=t.catch(o.noop)),t}#E(){this.#m();let e=(0,o.resolveStaleTime)(this.options.staleTime,this.#s);if(s.environmentManager.isServer()||this.#n.isStale||!(0,o.isValidTimeout)(e))return;let t=(0,o.timeUntilStale)(this.#n.dataUpdatedAt,e);this.#h=l.timeoutManager.setTimeout(()=>{this.#n.isStale||this.updateResult()},t+1)}#R(){return("function"==typeof this.options.refetchInterval?this.options.refetchInterval(this.#s):this.options.refetchInterval)??!1}#T(e){this.#v(),this.#p=e,!s.environmentManager.isServer()&&!1!==(0,o.resolveQueryBoolean)(this.options.enabled,this.#s)&&(0,o.isValidTimeout)(this.#p)&&0!==this.#p&&(this.#d=l.timeoutManager.setInterval(()=>{(this.options.refetchIntervalInBackground||r.focusManager.isFocused())&&this.#f()},this.#p))}#b(){this.#E(),this.#T(this.#R())}#m(){void 0!==this.#h&&(l.timeoutManager.clearTimeout(this.#h),this.#h=void 0)}#v(){void 0!==this.#d&&(l.timeoutManager.clearInterval(this.#d),this.#d=void 0)}createResult(e,t){let r,s=this.#s,i=this.options,a=this.#n,l=this.#a,c=this.#u,d=e!==s?e.state:this.#i,{state:f}=e,b={...f},m=!1;if(t._optimisticResults){let r=this.hasListeners(),a=!r&&h(e,t),u=r&&p(e,s,t,i);(a||u)&&(b={...b,...(0,n.fetchState)(f.data,e.options)}),"isRestoring"===t._optimisticResults&&(b.fetchStatus="idle")}let{error:v,errorUpdatedAt:g,status:E}=b;r=b.data;let R=!1;if(void 0!==t.placeholderData&&void 0===r&&"pending"===E){let e;a?.isPlaceholderData&&t.placeholderData===c?.placeholderData?(e=a.data,R=!0):e="function"==typeof t.placeholderData?t.placeholderData(this.#c?.state.data,this.#c):t.placeholderData,void 0!==e&&(E="success",r=(0,o.replaceData)(a?.data,e,t),m=!0)}if(t.select&&void 0!==r&&!R)if(a&&r===l?.data&&t.select===this.#o)r=this.#l;else try{this.#o=t.select,r=t.select(r),r=(0,o.replaceData)(a?.data,r,t),this.#l=r,this.#t=null}catch(e){this.#t=e}this.#t&&(v=this.#t,r=this.#l,g=Date.now(),E="error");let T="fetching"===b.fetchStatus,S="pending"===E,O="error"===E,C=S&&T,N=void 0!==r,Q={status:E,fetchStatus:b.fetchStatus,isPending:S,isSuccess:"success"===E,isError:O,isInitialLoading:C,isLoading:C,data:r,dataUpdatedAt:b.dataUpdatedAt,error:v,errorUpdatedAt:g,failureCount:b.fetchFailureCount,failureReason:b.fetchFailureReason,errorUpdateCount:b.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:b.dataUpdateCount>d.dataUpdateCount||b.errorUpdateCount>d.errorUpdateCount,isFetching:T,isRefetching:T&&!S,isLoadingError:O&&!N,isPaused:"paused"===b.fetchStatus,isPlaceholderData:m,isRefetchError:O&&N,isStale:y(e,t),refetch:this.refetch,promise:this.#r,isEnabled:!1!==(0,o.resolveQueryBoolean)(t.enabled,e)};if(this.options.experimental_prefetchInRender){let t=void 0!==Q.data,r="error"===Q.status&&!t,i=e=>{r?e.reject(Q.error):t&&e.resolve(Q.data)},n=()=>{i(this.#r=Q.promise=(0,u.pendingThenable)())},a=this.#r;switch(a.status){case"pending":e.queryHash===s.queryHash&&i(a);break;case"fulfilled":(r||Q.data!==a.value)&&n();break;case"rejected":r&&Q.error===a.reason||n()}}return Q}updateResult(){let e=this.#n,t=this.createResult(this.#s,this.options);if(this.#a=this.#s.state,this.#u=this.options,void 0!==this.#a.data&&(this.#c=this.#s),(0,o.shallowEqualObjects)(t,e))return;this.#n=t;let r=()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,r="function"==typeof t?t():t;if("all"===r||!r&&!this.#y.size)return!0;let s=new Set(r??this.#y);return this.options.throwOnError&&s.add("error"),Object.keys(this.#n).some(t=>this.#n[t]!==e[t]&&s.has(t))};this.#S({listeners:r()})}#g(){let e=this.#e.getQueryCache().build(this.#e,this.options);if(e===this.#s)return;let t=this.#s;this.#s=e,this.#i=e.state,this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#b()}#S(e){i.notifyManager.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(this.#n)}),this.#e.getQueryCache().notify({query:this.#s,type:"observerResultsUpdated"})})}};function h(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&void 0===e.state.data&&("error"!==e.state.status||!1!==(0,o.resolveQueryBoolean)(t.retryOnMount,e))||void 0!==e.state.data&&d(e,t,t.refetchOnMount)}function d(e,t,r){if(!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&"static"!==(0,o.resolveStaleTime)(t.staleTime,e)){let s="function"==typeof r?r(e):r;return"always"===s||!1!==s&&y(e,t)}return!1}function p(e,t,r,s){return(e!==t||!1===(0,o.resolveQueryBoolean)(s.enabled,e))&&(!r.suspense||"error"!==e.state.status)&&y(e,r)}function y(e,t){return!1!==(0,o.resolveQueryBoolean)(t.enabled,e)&&e.isStaleByTime((0,o.resolveStaleTime)(t.staleTime,e))}e.i(47167);var f=e.i(71645),b=e.i(12598);e.i(43476);var m=f.createContext((t=!1,{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t})),v=f.createContext(!1);v.Provider;var g=(e,t,r)=>t.fetchOptimistic(e).catch(()=>{r.clearReset()});e.s(["useQuery",0,function(e,t){return function(e,t,r){let n,a=f.useContext(v),u=f.useContext(m),l=(0,b.useQueryClient)(r),c=l.defaultQueryOptions(e);l.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let h=l.getQueryCache().get(c.queryHash),d=!1!==e.subscribed;if(c._optimisticResults=a?"isRestoring":d?"optimistic":void 0,c.suspense){let e=e=>"static"===e?e:Math.max(e??1e3,1e3),t=c.staleTime;c.staleTime="function"==typeof t?(...r)=>e(t(...r)):e(t),"number"==typeof c.gcTime&&(c.gcTime=Math.max(c.gcTime,1e3))}n=h?.state.error&&"function"==typeof c.throwOnError?(0,o.shouldThrowError)(c.throwOnError,[h.state.error,h]):c.throwOnError,(c.suspense||c.experimental_prefetchInRender||n)&&!u.isReset()&&(c.retryOnMount=!1),f.useEffect(()=>{u.clearReset()},[u]);let p=!l.getQueryCache().get(c.queryHash),[y]=f.useState(()=>new t(l,c)),E=y.getOptimisticResult(c),R=!a&&d;if(f.useSyncExternalStore(f.useCallback(e=>{let t=R?y.subscribe(i.notifyManager.batchCalls(e)):o.noop;return y.updateResult(),t},[y,R]),()=>y.getCurrentResult(),()=>y.getCurrentResult()),f.useEffect(()=>{y.setOptions(c)},[c,y]),c?.suspense&&E.isPending)throw g(c,y,u);if((({result:e,errorResetBoundary:t,throwOnError:r,query:s,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&s&&(i&&void 0===e.data||(0,o.shouldThrowError)(r,[e.error,s])))({result:E,errorResetBoundary:u,throwOnError:c.throwOnError,query:h,suspense:c.suspense}))throw E.error;if(l.getDefaultOptions().queries?._experimental_afterQuery?.(c,E),c.experimental_prefetchInRender&&!s.environmentManager.isServer()&&E.isLoading&&E.isFetching&&!a){let e=p?g(c,y,u):h?.promise;e?.catch(o.noop).finally(()=>{y.updateResult()})}return c.notifyOnChangeProps?E:y.trackResult(E)}(e,c,t)}],66027)},54616,e=>{"use strict";var t=e.i(71645),r=e.i(14272),s=e.i(40143),i=e.i(15823),n=e.i(19273),a=class extends i.Subscribable{#e;#n=void 0;#O;#C;constructor(e,t){super(),this.#e=e,this.setOptions(t),this.bindMethods(),this.#N()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(e){let t=this.options;this.options=this.#e.defaultMutationOptions(e),(0,n.shallowEqualObjects)(this.options,t)||this.#e.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#O,observer:this}),t?.mutationKey&&this.options.mutationKey&&(0,n.hashKey)(t.mutationKey)!==(0,n.hashKey)(this.options.mutationKey)?this.reset():this.#O?.state.status==="pending"&&this.#O.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#O?.removeObserver(this)}onMutationUpdate(e){this.#N(),this.#S(e)}getCurrentResult(){return this.#n}reset(){this.#O?.removeObserver(this),this.#O=void 0,this.#N(),this.#S()}mutate(e,t){return this.#C=t,this.#O?.removeObserver(this),this.#O=this.#e.getMutationCache().build(this.#e,this.options),this.#O.addObserver(this),this.#O.execute(e)}#N(){let e=this.#O?.state??(0,r.getDefaultState)();this.#n={...e,isPending:"pending"===e.status,isSuccess:"success"===e.status,isError:"error"===e.status,isIdle:"idle"===e.status,mutate:this.mutate,reset:this.reset}}#S(e){s.notifyManager.batch(()=>{if(this.#C&&this.hasListeners()){let t=this.#n.variables,r=this.#n.context,s={client:this.#e,meta:this.options.meta,mutationKey:this.options.mutationKey};if(e?.type==="success"){try{this.#C.onSuccess?.(e.data,t,r,s)}catch(e){Promise.reject(e)}try{this.#C.onSettled?.(e.data,null,t,r,s)}catch(e){Promise.reject(e)}}else if(e?.type==="error"){try{this.#C.onError?.(e.error,t,r,s)}catch(e){Promise.reject(e)}try{this.#C.onSettled?.(void 0,e.error,t,r,s)}catch(e){Promise.reject(e)}}}this.listeners.forEach(e=>{e(this.#n)})})}},u=e.i(12598);e.s(["useMutation",0,function(e,r){let i=(0,u.useQueryClient)(r),[o]=t.useState(()=>new a(i,e));t.useEffect(()=>{o.setOptions(e)},[o,e]);let l=t.useSyncExternalStore(t.useCallback(e=>o.subscribe(s.notifyManager.batchCalls(e)),[o]),()=>o.getCurrentResult(),()=>o.getCurrentResult()),c=t.useCallback((e,t)=>{o.mutate(e,t).catch(n.noop)},[o]);if(l.error&&(0,n.shouldThrowError)(o.options.throwOnError,[l.error]))throw l.error;return{...l,mutate:c,mutateAsync:l.mutate}}],54616)},55436,e=>{"use strict";let t=(0,e.i(75254).default)("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);e.s(["Search",0,t],55436)},27612,e=>{"use strict";let t=(0,e.i(75254).default)("Trash2",[["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M19 6v14c0 1-1 2-2 2H7c-1 0-2-1-2-2V6",key:"4alrt4"}],["path",{d:"M8 6V4c0-1 1-2 2-2h4c1 0 2 1 2 2v2",key:"v07s0e"}],["line",{x1:"10",x2:"10",y1:"11",y2:"17",key:"1uufr5"}],["line",{x1:"14",x2:"14",y1:"11",y2:"17",key:"xtxkd"}]]);e.s(["Trash2",0,t],27612)},92930,e=>{"use strict";let t=(0,e.i(75254).default)("Pen",[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}]]);e.s(["Edit2",0,t],92930)},40160,e=>{"use strict";let t=(0,e.i(75254).default)("Download",[["path",{d:"M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4",key:"ih7n3h"}],["polyline",{points:"7 10 12 15 17 10",key:"2ggqvy"}],["line",{x1:"12",x2:"12",y1:"15",y2:"3",key:"1vk2je"}]]);e.s(["Download",0,t],40160)},63209,e=>{"use strict";let t=(0,e.i(75254).default)("CircleAlert",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"12",x2:"12",y1:"8",y2:"12",key:"1pkeuh"}],["line",{x1:"12",x2:"12.01",y1:"16",y2:"16",key:"4dfq90"}]]);e.s(["AlertCircle",0,t],63209)},95468,e=>{"use strict";let t=(0,e.i(75254).default)("CircleCheck",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["path",{d:"m9 12 2 2 4-4",key:"dzmm74"}]]);e.s(["CheckCircle2",0,t],95468)},92950,e=>{"use strict";var t=e.i(43476),r=e.i(63209),s=e.i(95468),i=e.i(75254);let n=(0,i.default)("CircleDashed",[["path",{d:"M10.1 2.182a10 10 0 0 1 3.8 0",key:"5ilxe3"}],["path",{d:"M13.9 21.818a10 10 0 0 1-3.8 0",key:"11zvb9"}],["path",{d:"M17.609 3.721a10 10 0 0 1 2.69 2.7",key:"1iw5b2"}],["path",{d:"M2.182 13.9a10 10 0 0 1 0-3.8",key:"c0bmvh"}],["path",{d:"M20.279 17.609a10 10 0 0 1-2.7 2.69",key:"1ruxm7"}],["path",{d:"M21.818 10.1a10 10 0 0 1 0 3.8",key:"qkgqxc"}],["path",{d:"M3.721 6.391a10 10 0 0 1 2.7-2.69",key:"1mcia2"}],["path",{d:"M6.391 20.279a10 10 0 0 1-2.69-2.7",key:"1fvljs"}]]),a=(0,i.default)("ShieldAlert",[["path",{d:"M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z",key:"oel41y"}],["path",{d:"M12 8v4",key:"1got3b"}],["path",{d:"M12 16h.01",key:"1drbdi"}]]),u={OFFEN:{value:"OFFEN",label:"Noch nicht bewertet",badgeClass:"border-slate-300 bg-slate-100 text-slate-700",previewClass:"border-slate-300 bg-slate-50 text-slate-700",color:"#2E3B40",icon:n},BESTANDEN:{value:"BESTANDEN",label:"Bestanden",badgeClass:"border-success/35 bg-success/15 text-success",previewClass:"border-success/40 bg-success/10 text-success",color:"#245C36",icon:s.CheckCircle2},BESTANDEN_MIT_AUFLAGEN:{value:"BESTANDEN_MIT_AUFLAGEN",label:"Bestanden mit Auflagen",badgeClass:"border-warning/40 bg-warning/15 text-[#7A5A00]",previewClass:"border-warning/45 bg-warning/10 text-[#7A5A00]",color:"#7A5A00",icon:a},NICHT_BESTANDEN:{value:"NICHT_BESTANDEN",label:"Nicht bestanden",badgeClass:"border-danger/35 bg-danger/15 text-danger",previewClass:"border-danger/40 bg-danger/10 text-danger",color:"#7A1F26",icon:r.AlertCircle}},o={"":"OFFEN",offen:"OFFEN",OFFEN:"OFFEN",bestanden:"BESTANDEN",BESTANDEN:"BESTANDEN",mit_auflagen:"BESTANDEN_MIT_AUFLAGEN",bestanden_mit_auflagen:"BESTANDEN_MIT_AUFLAGEN","bestanden mit auflagen":"BESTANDEN_MIT_AUFLAGEN",BESTANDEN_MIT_AUFLAGEN:"BESTANDEN_MIT_AUFLAGEN",nicht_bestanden:"NICHT_BESTANDEN","nicht bestanden":"NICHT_BESTANDEN",NICHT_BESTANDEN:"NICHT_BESTANDEN"};function l(e){return o[String(e??"").trim()]??"OFFEN"}function c(e){return u[l(e)]}e.s(["ValidationResultBadge",0,function({value:e,className:r=""}){let s=c(e),i=s.icon;return(0,t.jsxs)("span",{className:`inline-flex items-center gap-1.5 rounded-full border px-3 py-1 text-xs font-semibold ${s.badgeClass} ${r}`,children:[(0,t.jsx)(i,{className:"h-3.5 w-3.5"}),s.label]})},"getValidationResultPresentation",0,c,"normalizeValidationResult",0,l,"validationResultValues",0,["OFFEN","BESTANDEN","BESTANDEN_MIT_AUFLAGEN","NICHT_BESTANDEN"]],92950)},74886,e=>{"use strict";let t=(0,e.i(75254).default)("Copy",[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]]);e.s(["Copy",0,t],74886)}]);