o.right))return a}return-1};function G(t,r){return t.map(a=>{const s=r.find(p=>p.id==a.fromPlayerId).hasBall;let o=a.type;return s&&o==y.MOVE?o=y.DRIBBLE:s&&o==y.SCREEN?o=y.SHOOT:o==y.DRIBBLE?o=y.MOVE:o==y.SHOOT&&(o=y.SCREEN),{...a,type:o}})}const D=t=>{c(r=>{const a=r.objects.findIndex(p=>p.type=="ball");let s=r.players.at(t);const o=r.players.toSpliced(t,1,{...s,hasBall:!0});return{...r,actions:G(r.actions,o),players:o,objects:r.objects.toSpliced(a,1)}})},q=t=>{if(!_(t)){P();return}const r=F(t,i.players);if(r!=-1){c(f=>({...f,players:f.players.map(S=>({...S,hasBall:!1}))})),D(r);return}if(i.objects.findIndex(f=>f.type=="ball")!=-1)return;const a=B.current.getBoundingClientRect(),{x:s,y:o}=I(t,a);let p;p={type:"ball",rightRatio:s,bottomRatio:o};const h=i.players.map(f=>({...f,hasBall:!1}));c(f=>({...f,actions:G(f.actions,h),players:h,objects:[...f.objects,p]}))},U=t=>{c(a=>({...a,players:N(a.players,t,!1),objects:[...a.objects],actions:a.actions.filter(s=>s.toPlayerId!==t.id&&s.fromPlayerId!==t.id)}));let r;switch(t.team){case M.Opponents:r=A;break;case M.Allies:r=R}t.hasBall&&O([{key:"ball"}]),r(a=>[...a,{team:t.team,pos:t.role,key:t.role}])},P=()=>{c(t=>{const r=t.objects.findIndex(a=>a.type=="ball");return{...t,players:t.players.map(a=>({...a,hasBall:!1})),objects:t.objects.toSpliced(r,1)}}),O([{key:"ball"}])};return n.jsxs("div",{id:"main-div",children:[n.jsxs("div",{id:"topbar-div",children:[n.jsx("div",{id:"topbar-left",children:n.jsx(X,{state:K})}),n.jsx("div",{id:"title-input-div",children:n.jsx(z,{style:g,default_value:m,on_validated:t=>{u(t).then(r=>{b(r?{}:le)})}})}),n.jsx("div",{id:"topbar-right"})]}),n.jsxs("div",{id:"edit-div",children:[n.jsxs("div",{id:"racks",children:[n.jsx(j,{id:"allies-rack",objects:Y,onChange:R,canDetach:t=>_(t.getBoundingClientRect()),onElementDetached:w,render:({team:t,key:r})=>n.jsx(T,{team:t,text:r,hasBall:!1},r)}),n.jsx(j,{id:"objects",objects:J,onChange:O,canDetach:t=>_(t.getBoundingClientRect()),onElementDetached:$,render:ie}),n.jsx(j,{id:"opponent-rack",objects:Z,onChange:A,canDetach:t=>_(t.getBoundingClientRect()),onElementDetached:w,render:({team:t,key:r})=>n.jsx(T,{team:t,text:r,hasBall:!1},r)})]}),n.jsx("div",{id:"court-div",children:n.jsx("div",{id:"court-div-bounds",children:n.jsx(te,{players:i.players,objects:i.objects,actions:i.actions,onBallMoved:q,courtImage:n.jsx(ce,{courtType:E}),courtRef:B,setActions:t=>c(r=>({...r,players:r.players,actions:t(r.actions)})),renderAction:(t,r)=>n.jsx(ee,{action:t,courtRef:B,onActionDeleted:()=>{c(a=>({...a,actions:a.actions.toSpliced(r,1)}))},onActionChanges:a=>c(s=>({...s,actions:s.actions.toSpliced(r,1,a)}))},r),onPlayerChange:t=>{const r=document.getElementById(t.id).getBoundingClientRect();if(!_(r)){U(t);return}c(a=>({...a,players:N(a.players,t,!0)}))},onPlayerRemove:U,onBallRemove:P})})})]})]})}function oe(l){return l.players.findIndex(m=>m.hasBall)!=-1?!0:l.objects.findIndex(m=>m.type=="ball")!=-1}function ie(l){if(l.key=="ball")return n.jsx(Q,{});throw new Error("unknown racked court object ",l.key)}function ce({courtType:l}){return n.jsx("div",{id:"court-image-div",children:l=="PLAIN"?n.jsx(re,{id:"court-image"}):n.jsx(ae,{id:"court-image"})})}function V(l,m){return["1","2","3","4","5"].filter(d=>m.findIndex(k=>k.team==l&&k.role==d)==-1).map(d=>({team:l,key:d}))}function se(l,m=1e3){let d=0;return k=>(clearTimeout(d),new Promise((u,E)=>{d=setTimeout(()=>l(k).then(u).catch(E),m)}))}function me(l,m,d){const[k,u]=e.useState(l),[E,C]=e.useState(m),g=e.useCallback(b=>{u(i=>{const c=typeof b=="function"?b(i):b;return c!==i&&(C(x.Saving),d(c).then(C).catch(()=>C(x.Err))),c})},[d]);return[k,g,E]}function N(l,m,d){const k=l.findIndex(u=>u.team===m.team&&u.role===m.role);return l.toSpliced(k,1,...d?[m]:[])}export{Ae as default};
diff --git a/outputs/public/front/views/NewTacticPanel.tsx-64bf0fca.js b/outputs/public/front/views/NewTacticPanel.tsx-64bf0fca.js
deleted file mode 100644
index e7c6325..0000000
--- a/outputs/public/front/views/NewTacticPanel.tsx-64bf0fca.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode('@import"https://fonts.googleapis.com/css2?family=Roboto:wght@300;400&display=swap";:root{--main-color: #ffffff;--second-color: #e8e8e8;--background-color: #d2cdd3;--selected-team-primarycolor: #ffffff;--selected-team-secondarycolor: #000000;--player-allies-color: #64e4f5;--player-opponents-color: #f59264;--buttons-shadow-color: #a8a8a8;--selection-color: #3f7fc4;--border-color: #ffffff;--editor-court-selection-background: #5f8fee;--editor-court-selection-buttons: #acc4f3;--player-piece-ball-border-color: #000000;--text-main-font: "Roboto", sans-serif}#panel-root{width:100%;height:100%;display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center}#panel-top{font-family:var(--text-main-font)}#panel-choices{width:100%;height:100%;display:flex;justify-content:center;align-items:center;align-content:center;background-color:var(--editor-court-selection-background)}#panel-buttons{width:75%;height:20%;display:flex;justify-content:space-evenly;align-items:stretch;align-content:center}.court-kind-button{position:relative;display:flex;flex-direction:column;justify-content:center;align-items:center;align-content:center;cursor:pointer;transition:scale .5s ease-out;width:auto}.court-kind-button-bottom,.court-kind-button-top{border:solid;border-color:var(--border-color)}.court-kind-button-bottom{display:flex;justify-content:center;align-items:center;align-content:center;height:25%;width:100%;background-color:var(--editor-court-selection-buttons);border-radius:0 0 20px 20px;border-width:3px}.court-kind-button-top{height:30%;background-color:var(--main-color);border-radius:20px 20px 0 0;border-width:3px 3px 0 3px}.court-kind-button:hover{scale:1.1}.court-kind-button-top,.court-kind-button-image-div{overflow:hidden;display:flex;height:100%;width:100%;justify-content:center;align-items:center;align-content:center}.court-kind-button-image{height:100%;width:150px;user-select:none;-webkit-user-drag:none}.court-kind-button-image-div{height:100%;padding:0 10px;background-color:var(--second-color)}.court-kind-button-name,.court-kind-button-details{user-select:none;font-family:var(--text-main-font)}.court-kind-button-details{position:absolute;z-index:-1;top:0;transition:top 1s}.court-kind-button:hover .court-kind-button-details{top:-20px}')),document.head.appendChild(t)}}catch(o){console.error("vite-plugin-css-injected-by-js",o)}})();
-import{j as t}from"../../jsx-runtime-2e2d9038.js";import{C as l}from"../../full_court-1739e2e0.js";import{BASE as s}from"../Constants.ts-0288c91b.js";const o="/IQBall/public/half_court-eb16117a.svg";function m(){return t.jsxs("div",{id:"panel-root",children:[t.jsx("div",{id:"panel-top",children:t.jsx("p",{children:"Select a basket court"})}),t.jsx("div",{id:"panel-choices",children:t.jsxs("div",{id:"panel-buttons",children:[t.jsx(e,{name:"Plain",details:"Select a plain basketball court",image:l,redirect:"/tactic/new/plain"}),t.jsx(e,{name:"Half",details:"Select half a basketball court",image:o,redirect:"/tactic/new/half"})]})})]})}function e({name:i,image:a,details:n,redirect:c}){return t.jsxs("div",{className:"court-kind-button",onClick:()=>location.href=s+c,children:[t.jsx("div",{className:"court-kind-button-details",children:n}),t.jsx("div",{className:"court-kind-button-top",children:t.jsx("div",{className:"court-kind-button-image-div",children:t.jsx("img",{src:a,alt:i,className:"court-kind-button-image"})})}),t.jsx("div",{className:"court-kind-button-bottom",children:t.jsx("p",{className:"court-kind-button-name",children:i})})]})}export{m as default};
diff --git a/outputs/public/front/views/Visualizer.tsx-a2e9b703.js b/outputs/public/front/views/Visualizer.tsx-a2e9b703.js
deleted file mode 100644
index 2dc6047..0000000
--- a/outputs/public/front/views/Visualizer.tsx-a2e9b703.js
+++ /dev/null
@@ -1,2 +0,0 @@
-(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode("#main{height:100vh;width:100%;display:flex;flex-direction:column}#topbar{display:flex;background-color:var(--main-color);justify-content:center;align-items:center}h1{text-align:center;margin-top:0}#court-container{flex:1;display:flex;justify-content:center;background-color:var(--main-color)}#court{max-width:80%;max-height:80%}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
-import{r as s,j as t}from"../../jsx-runtime-2e2d9038.js";import{C as e}from"../../full_court-1739e2e0.js";function c({id:o,name:r}){const[i,a]=s.useState({});return t.jsxs("div",{id:"main",children:[t.jsx("div",{id:"topbar",children:t.jsx("h1",{children:r})}),t.jsx("div",{id:"court-container",children:t.jsx("img",{id:"court",src:e,style:i,alt:"Basketball Court"})})]})}export{c as default};
diff --git a/outputs/public/front/views/editor/CourtAction.tsx-15785ac7.js b/outputs/public/front/views/editor/CourtAction.tsx-15785ac7.js
deleted file mode 100644
index ceae970..0000000
--- a/outputs/public/front/views/editor/CourtAction.tsx-15785ac7.js
+++ /dev/null
@@ -1 +0,0 @@
-import{j as s}from"../../../jsx-runtime-2e2d9038.js";import{ActionKind as r}from"../../tactic/Action.ts-d727cf33.js";import i from"../../components/arrows/BendableArrow.tsx-f8a85d9b.js";import{ScreenHead as n,MoveToHead as y}from"../../components/actions/ArrowAction.tsx-b082b6c9.js";import"../../components/arrows/Pos.ts-9fe07952.js";import"../../../cjs-ff7eb0e1.js";import"../../../index-ca121481.js";function l({action:e,onActionChanges:a,onActionDeleted:m,courtRef:p}){let t;switch(e.type){case r.DRIBBLE:case r.MOVE:case r.SHOOT:t=()=>s.jsx(y,{});break;case r.SCREEN:t=()=>s.jsx(n,{});break}let o;switch(e.type){case r.SHOOT:o="10 5";break}return s.jsx(i,{forceStraight:e.type==r.SHOOT,area:p,startPos:e.moveFrom,segments:e.segments,onSegmentsChanges:d=>{a({...e,segments:d})},wavy:e.type==r.DRIBBLE,endRadius:e.toPlayerId?26:17,startRadius:0,onDeleteRequested:m,style:{head:t,dashArray:o}})}export{l as CourtAction};
diff --git a/outputs/public/full_court-1739e2e0.js b/outputs/public/full_court-1739e2e0.js
deleted file mode 100644
index 5043b9e..0000000
--- a/outputs/public/full_court-1739e2e0.js
+++ /dev/null
@@ -1 +0,0 @@
-const l="/IQBall/public/full_court-939d8e82.svg";export{l as C};
diff --git a/outputs/public/full_court-939d8e82.svg b/outputs/public/full_court-939d8e82.svg
deleted file mode 100644
index 5bfc0de..0000000
--- a/outputs/public/full_court-939d8e82.svg
+++ /dev/null
@@ -1,135 +0,0 @@
-
diff --git a/outputs/public/half_court-eb16117a.svg b/outputs/public/half_court-eb16117a.svg
deleted file mode 100644
index 7bf82e0..0000000
--- a/outputs/public/half_court-eb16117a.svg
+++ /dev/null
@@ -1,74 +0,0 @@
-
diff --git a/outputs/public/index-ca121481.js b/outputs/public/index-ca121481.js
deleted file mode 100644
index f47eb41..0000000
--- a/outputs/public/index-ca121481.js
+++ /dev/null
@@ -1,24 +0,0 @@
-import{r as za}from"./jsx-runtime-2e2d9038.js";var Co={exports:{}},ve={},xo={exports:{}},_o={};/**
- * @license React
- * scheduler.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */(function(e){function n(C,z){var P=C.length;C.push(z);e:for(;0>>1,Y=C[H];if(0>>1;Hl(sl,P))mnl(Xt,sl)?(C[H]=Xt,C[mn]=P,H=mn):(C[H]=sl,C[pn]=P,H=pn);else if(mnl(Xt,P))C[H]=Xt,C[mn]=P,H=mn;else break e}}return z}function l(C,z){var P=C.sortIndex-z.sortIndex;return P!==0?P:C.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var u=Date,o=u.now();e.unstable_now=function(){return u.now()-o}}var s=[],d=[],v=1,m=null,p=3,g=!1,w=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,c=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function f(C){for(var z=t(d);z!==null;){if(z.callback===null)r(d);else if(z.startTime<=C)r(d),z.sortIndex=z.expirationTime,n(s,z);else break;z=t(d)}}function h(C){if(k=!1,f(C),!w)if(t(s)!==null)w=!0,ul(E);else{var z=t(d);z!==null&&ol(h,z.startTime-C)}}function E(C,z){w=!1,k&&(k=!1,c(N),N=-1),g=!0;var P=p;try{for(f(z),m=t(s);m!==null&&(!(m.expirationTime>z)||C&&!Ce());){var H=m.callback;if(typeof H=="function"){m.callback=null,p=m.priorityLevel;var Y=H(m.expirationTime<=z);z=e.unstable_now(),typeof Y=="function"?m.callback=Y:m===t(s)&&r(s),f(z)}else r(s);m=t(s)}if(m!==null)var Yt=!0;else{var pn=t(d);pn!==null&&ol(h,pn.startTime-z),Yt=!1}return Yt}finally{m=null,p=P,g=!1}}var x=!1,_=null,N=-1,B=5,T=-1;function Ce(){return!(e.unstable_now()-TC||125H?(C.sortIndex=P,n(d,C),t(s)===null&&C===t(d)&&(k?(c(N),N=-1):k=!0,ol(h,P-H))):(C.sortIndex=Y,n(s,C),w||g||(w=!0,ul(E))),C},e.unstable_shouldYield=Ce,e.unstable_wrapCallback=function(C){var z=p;return function(){var P=p;p=z;try{return C.apply(this,arguments)}finally{p=P}}}})(_o);xo.exports=_o;var Pa=xo.exports;/**
- * @license React
- * react-dom.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */var No=za,me=Pa;function y(e){for(var n="https://reactjs.org/docs/error-decoder.html?invariant="+e,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Ol=Object.prototype.hasOwnProperty,Ta=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,yu={},gu={};function La(e){return Ol.call(gu,e)?!0:Ol.call(yu,e)?!1:Ta.test(e)?gu[e]=!0:(yu[e]=!0,!1)}function Ma(e,n,t,r){if(t!==null&&t.type===0)return!1;switch(typeof n){case"function":case"symbol":return!0;case"boolean":return r?!1:t!==null?!t.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Da(e,n,t,r){if(n===null||typeof n>"u"||Ma(e,n,t,r))return!0;if(r)return!1;if(t!==null)switch(t.type){case 3:return!n;case 4:return n===!1;case 5:return isNaN(n);case 6:return isNaN(n)||1>n}return!1}function ie(e,n,t,r,l,i,u){this.acceptsBooleans=n===2||n===3||n===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=t,this.propertyName=e,this.type=n,this.sanitizeURL=i,this.removeEmptyString=u}var q={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){q[e]=new ie(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var n=e[0];q[n]=new ie(n,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){q[e]=new ie(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){q[e]=new ie(e,2,!1,e,null,!1,!1)});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(e){q[e]=new ie(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){q[e]=new ie(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){q[e]=new ie(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){q[e]=new ie(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){q[e]=new ie(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ni=/[\-:]([a-z])/g;function zi(e){return e[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(e){var n=e.replace(Ni,zi);q[n]=new ie(n,1,!1,e,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(e){var n=e.replace(Ni,zi);q[n]=new ie(n,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(e){var n=e.replace(Ni,zi);q[n]=new ie(n,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){q[e]=new ie(e,1,!1,e.toLowerCase(),null,!1,!1)});q.xlinkHref=new ie("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){q[e]=new ie(e,1,!1,e.toLowerCase(),null,!0,!0)});function Pi(e,n,t,r){var l=q.hasOwnProperty(n)?q[n]:null;(l!==null?l.type!==0:r||!(2o||l[u]!==i[o]){var s=`
-`+l[u].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=u&&0<=o);break}}}finally{cl=!1,Error.prepareStackTrace=t}return(e=e?e.displayName||e.name:"")?pt(e):""}function Ra(e){switch(e.tag){case 5:return pt(e.type);case 16:return pt("Lazy");case 13:return pt("Suspense");case 19:return pt("SuspenseList");case 0:case 2:case 15:return e=fl(e.type,!1),e;case 11:return e=fl(e.type.render,!1),e;case 1:return e=fl(e.type,!0),e;default:return""}}function Ul(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Mn:return"Fragment";case Ln:return"Portal";case Fl:return"Profiler";case Ti:return"StrictMode";case Il:return"Suspense";case jl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case To:return(e.displayName||"Context")+".Consumer";case Po:return(e._context.displayName||"Context")+".Provider";case Li:var n=e.render;return e=e.displayName,e||(e=n.displayName||n.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Mi:return n=e.displayName||null,n!==null?n:Ul(e.type)||"Memo";case Ye:n=e._payload,e=e._init;try{return Ul(e(n))}catch{}}return null}function Oa(e){var n=e.type;switch(e.tag){case 24:return"Cache";case 9:return(n.displayName||"Context")+".Consumer";case 10:return(n._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=n.render,e=e.displayName||e.name||"",n.displayName||(e!==""?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return n;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Ul(n);case 8:return n===Ti?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n}return null}function sn(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function Mo(e){var n=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(n==="checkbox"||n==="radio")}function Fa(e){var n=Mo(e)?"checked":"value",t=Object.getOwnPropertyDescriptor(e.constructor.prototype,n),r=""+e[n];if(!e.hasOwnProperty(n)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var l=t.get,i=t.set;return Object.defineProperty(e,n,{configurable:!0,get:function(){return l.call(this)},set:function(u){r=""+u,i.call(this,u)}}),Object.defineProperty(e,n,{enumerable:t.enumerable}),{getValue:function(){return r},setValue:function(u){r=""+u},stopTracking:function(){e._valueTracker=null,delete e[n]}}}}function Zt(e){e._valueTracker||(e._valueTracker=Fa(e))}function Do(e){if(!e)return!1;var n=e._valueTracker;if(!n)return!0;var t=n.getValue(),r="";return e&&(r=Mo(e)?e.checked?"true":"false":e.value),e=r,e!==t?(n.setValue(e),!0):!1}function Sr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function Vl(e,n){var t=n.checked;return V({},n,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??e._wrapperState.initialChecked})}function ku(e,n){var t=n.defaultValue==null?"":n.defaultValue,r=n.checked!=null?n.checked:n.defaultChecked;t=sn(n.value!=null?n.value:t),e._wrapperState={initialChecked:r,initialValue:t,controlled:n.type==="checkbox"||n.type==="radio"?n.checked!=null:n.value!=null}}function Ro(e,n){n=n.checked,n!=null&&Pi(e,"checked",n,!1)}function Al(e,n){Ro(e,n);var t=sn(n.value),r=n.type;if(t!=null)r==="number"?(t===0&&e.value===""||e.value!=t)&&(e.value=""+t):e.value!==""+t&&(e.value=""+t);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}n.hasOwnProperty("value")?Bl(e,n.type,t):n.hasOwnProperty("defaultValue")&&Bl(e,n.type,sn(n.defaultValue)),n.checked==null&&n.defaultChecked!=null&&(e.defaultChecked=!!n.defaultChecked)}function Su(e,n,t){if(n.hasOwnProperty("value")||n.hasOwnProperty("defaultValue")){var r=n.type;if(!(r!=="submit"&&r!=="reset"||n.value!==void 0&&n.value!==null))return;n=""+e._wrapperState.initialValue,t||n===e.value||(e.value=n),e.defaultValue=n}t=e.name,t!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,t!==""&&(e.name=t)}function Bl(e,n,t){(n!=="number"||Sr(e.ownerDocument)!==e)&&(t==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+t&&(e.defaultValue=""+t))}var mt=Array.isArray;function Hn(e,n,t,r){if(e=e.options,n){n={};for(var l=0;l"+n.valueOf().toString()+"",n=Jt.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;n.firstChild;)e.appendChild(n.firstChild)}});function zt(e,n){if(n){var t=e.firstChild;if(t&&t===e.lastChild&&t.nodeType===3){t.nodeValue=n;return}}e.textContent=n}var yt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Ia=["Webkit","ms","Moz","O"];Object.keys(yt).forEach(function(e){Ia.forEach(function(n){n=n+e.charAt(0).toUpperCase()+e.substring(1),yt[n]=yt[e]})});function jo(e,n,t){return n==null||typeof n=="boolean"||n===""?"":t||typeof n!="number"||n===0||yt.hasOwnProperty(e)&&yt[e]?(""+n).trim():n+"px"}function Uo(e,n){e=e.style;for(var t in n)if(n.hasOwnProperty(t)){var r=t.indexOf("--")===0,l=jo(t,n[t],r);t==="float"&&(t="cssFloat"),r?e.setProperty(t,l):e[t]=l}}var ja=V({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Wl(e,n){if(n){if(ja[e]&&(n.children!=null||n.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(n.dangerouslySetInnerHTML!=null){if(n.children!=null)throw Error(y(60));if(typeof n.dangerouslySetInnerHTML!="object"||!("__html"in n.dangerouslySetInnerHTML))throw Error(y(61))}if(n.style!=null&&typeof n.style!="object")throw Error(y(62))}}function $l(e,n){if(e.indexOf("-")===-1)return typeof n.is=="string";switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Kl=null;function Di(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var Yl=null,Qn=null,Wn=null;function xu(e){if(e=$t(e)){if(typeof Yl!="function")throw Error(y(280));var n=e.stateNode;n&&(n=Gr(n),Yl(e.stateNode,e.type,n))}}function Vo(e){Qn?Wn?Wn.push(e):Wn=[e]:Qn=e}function Ao(){if(Qn){var e=Qn,n=Wn;if(Wn=Qn=null,xu(e),n)for(e=0;e>>=0,e===0?32:31-(Xa(e)/Ga|0)|0}var qt=64,bt=4194304;function vt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function _r(e,n){var t=e.pendingLanes;if(t===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,u=t&268435455;if(u!==0){var o=u&~l;o!==0?r=vt(o):(i&=u,i!==0&&(r=vt(i)))}else u=t&~l,u!==0?r=vt(u):i!==0&&(r=vt(i));if(r===0)return 0;if(n!==0&&n!==r&&!(n&l)&&(l=r&-r,i=n&-n,l>=i||l===16&&(i&4194240)!==0))return n;if(r&4&&(r|=t&16),n=e.entangledLanes,n!==0)for(e=e.entanglements,n&=r;0t;t++)n.push(e);return n}function Qt(e,n,t){e.pendingLanes|=n,n!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,n=31-Pe(n),e[n]=t}function ba(e,n){var t=e.pendingLanes&~n;e.pendingLanes=n,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=n,e.mutableReadLanes&=n,e.entangledLanes&=n,n=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0=wt),Ru=String.fromCharCode(32),Ou=!1;function us(e,n){switch(e){case"keyup":return zc.indexOf(n.keyCode)!==-1;case"keydown":return n.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function os(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var Dn=!1;function Tc(e,n){switch(e){case"compositionend":return os(n);case"keypress":return n.which!==32?null:(Ou=!0,Ru);case"textInput":return e=n.data,e===Ru&&Ou?null:e;default:return null}}function Lc(e,n){if(Dn)return e==="compositionend"||!Ai&&us(e,n)?(e=ls(),dr=ji=Je=null,Dn=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(n.ctrlKey||n.altKey||n.metaKey)||n.ctrlKey&&n.altKey){if(n.char&&1=n)return{node:t,offset:n-e};e=r}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=Uu(t)}}function fs(e,n){return e&&n?e===n?!0:e&&e.nodeType===3?!1:n&&n.nodeType===3?fs(e,n.parentNode):"contains"in e?e.contains(n):e.compareDocumentPosition?!!(e.compareDocumentPosition(n)&16):!1:!1}function ds(){for(var e=window,n=Sr();n instanceof e.HTMLIFrameElement;){try{var t=typeof n.contentWindow.location.href=="string"}catch{t=!1}if(t)e=n.contentWindow;else break;n=Sr(e.document)}return n}function Bi(e){var n=e&&e.nodeName&&e.nodeName.toLowerCase();return n&&(n==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||n==="textarea"||e.contentEditable==="true")}function Vc(e){var n=ds(),t=e.focusedElem,r=e.selectionRange;if(n!==t&&t&&t.ownerDocument&&fs(t.ownerDocument.documentElement,t)){if(r!==null&&Bi(t)){if(n=r.start,e=r.end,e===void 0&&(e=n),"selectionStart"in t)t.selectionStart=n,t.selectionEnd=Math.min(e,t.value.length);else if(e=(n=t.ownerDocument||document)&&n.defaultView||window,e.getSelection){e=e.getSelection();var l=t.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=Vu(t,i);var u=Vu(t,r);l&&u&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==u.node||e.focusOffset!==u.offset)&&(n=n.createRange(),n.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(n),e.extend(u.node,u.offset)):(n.setEnd(u.node,u.offset),e.addRange(n)))}}for(n=[],e=t;e=e.parentNode;)e.nodeType===1&&n.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Rn=null,bl=null,St=null,ei=!1;function Au(e,n,t){var r=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;ei||Rn==null||Rn!==Sr(r)||(r=Rn,"selectionStart"in r&&Bi(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),St&&Rt(St,r)||(St=r,r=Pr(bl,"onSelect"),0In||(e.current=ui[In],ui[In]=null,In--)}function D(e,n){In++,ui[In]=e.current,e.current=n}var an={},te=fn(an),se=fn(!1),En=an;function Gn(e,n){var t=e.type.contextTypes;if(!t)return an;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===n)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in t)l[i]=n[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=n,e.__reactInternalMemoizedMaskedChildContext=l),l}function ae(e){return e=e.childContextTypes,e!=null}function Lr(){O(se),O(te)}function Yu(e,n,t){if(te.current!==an)throw Error(y(168));D(te,n),D(se,t)}function Ss(e,n,t){var r=e.stateNode;if(n=n.childContextTypes,typeof r.getChildContext!="function")return t;r=r.getChildContext();for(var l in r)if(!(l in n))throw Error(y(108,Oa(e)||"Unknown",l));return V({},t,r)}function Mr(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||an,En=te.current,D(te,e),D(se,se.current),!0}function Xu(e,n,t){var r=e.stateNode;if(!r)throw Error(y(169));t?(e=Ss(e,n,En),r.__reactInternalMemoizedMergedChildContext=e,O(se),O(te),D(te,e)):O(se),D(se,t)}var je=null,Zr=!1,_l=!1;function Es(e){je===null?je=[e]:je.push(e)}function Jc(e){Zr=!0,Es(e)}function dn(){if(!_l&&je!==null){_l=!0;var e=0,n=M;try{var t=je;for(M=1;e>=u,l-=u,Ue=1<<32-Pe(n)+l|t<N?(B=_,_=null):B=_.sibling;var T=p(c,_,f[N],h);if(T===null){_===null&&(_=B);break}e&&_&&T.alternate===null&&n(c,_),a=i(T,a,N),x===null?E=T:x.sibling=T,x=T,_=B}if(N===f.length)return t(c,_),I&&vn(c,N),E;if(_===null){for(;NN?(B=_,_=null):B=_.sibling;var Ce=p(c,_,T.value,h);if(Ce===null){_===null&&(_=B);break}e&&_&&Ce.alternate===null&&n(c,_),a=i(Ce,a,N),x===null?E=Ce:x.sibling=Ce,x=Ce,_=B}if(T.done)return t(c,_),I&&vn(c,N),E;if(_===null){for(;!T.done;N++,T=f.next())T=m(c,T.value,h),T!==null&&(a=i(T,a,N),x===null?E=T:x.sibling=T,x=T);return I&&vn(c,N),E}for(_=r(c,_);!T.done;N++,T=f.next())T=g(_,c,N,T.value,h),T!==null&&(e&&T.alternate!==null&&_.delete(T.key===null?N:T.key),a=i(T,a,N),x===null?E=T:x.sibling=T,x=T);return e&&_.forEach(function(rt){return n(c,rt)}),I&&vn(c,N),E}function F(c,a,f,h){if(typeof f=="object"&&f!==null&&f.type===Mn&&f.key===null&&(f=f.props.children),typeof f=="object"&&f!==null){switch(f.$$typeof){case Gt:e:{for(var E=f.key,x=a;x!==null;){if(x.key===E){if(E=f.type,E===Mn){if(x.tag===7){t(c,x.sibling),a=l(x,f.props.children),a.return=c,c=a;break e}}else if(x.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Ye&&no(E)===x.type){t(c,x.sibling),a=l(x,f.props),a.ref=ct(c,x,f),a.return=c,c=a;break e}t(c,x);break}else n(c,x);x=x.sibling}f.type===Mn?(a=Sn(f.props.children,c.mode,h,f.key),a.return=c,c=a):(h=kr(f.type,f.key,f.props,null,c.mode,h),h.ref=ct(c,a,f),h.return=c,c=h)}return u(c);case Ln:e:{for(x=f.key;a!==null;){if(a.key===x)if(a.tag===4&&a.stateNode.containerInfo===f.containerInfo&&a.stateNode.implementation===f.implementation){t(c,a.sibling),a=l(a,f.children||[]),a.return=c,c=a;break e}else{t(c,a);break}else n(c,a);a=a.sibling}a=Rl(f,c.mode,h),a.return=c,c=a}return u(c);case Ye:return x=f._init,F(c,a,x(f._payload),h)}if(mt(f))return w(c,a,f,h);if(it(f))return k(c,a,f,h);ur(c,f)}return typeof f=="string"&&f!==""||typeof f=="number"?(f=""+f,a!==null&&a.tag===6?(t(c,a.sibling),a=l(a,f),a.return=c,c=a):(t(c,a),a=Dl(f,c.mode,h),a.return=c,c=a),u(c)):t(c,a)}return F}var Jn=Ls(!0),Ms=Ls(!1),Kt={},Fe=fn(Kt),jt=fn(Kt),Ut=fn(Kt);function wn(e){if(e===Kt)throw Error(y(174));return e}function Zi(e,n){switch(D(Ut,n),D(jt,e),D(Fe,Kt),e=n.nodeType,e){case 9:case 11:n=(n=n.documentElement)?n.namespaceURI:Ql(null,"");break;default:e=e===8?n.parentNode:n,n=e.namespaceURI||null,e=e.tagName,n=Ql(n,e)}O(Fe),D(Fe,n)}function qn(){O(Fe),O(jt),O(Ut)}function Ds(e){wn(Ut.current);var n=wn(Fe.current),t=Ql(n,e.type);n!==t&&(D(jt,e),D(Fe,t))}function Ji(e){jt.current===e&&(O(Fe),O(jt))}var j=fn(0);function jr(e){for(var n=e;n!==null;){if(n.tag===13){var t=n.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return n}else if(n.tag===19&&n.memoizedProps.revealOrder!==void 0){if(n.flags&128)return n}else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break;for(;n.sibling===null;){if(n.return===null||n.return===e)return null;n=n.return}n.sibling.return=n.return,n=n.sibling}return null}var Nl=[];function qi(){for(var e=0;et?t:4,e(!0);var r=zl.transition;zl.transition={};try{e(!1),n()}finally{M=t,zl.transition=r}}function Xs(){return Ee().memoizedState}function nf(e,n,t){var r=un(e);if(t={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null},Gs(e))Zs(n,t);else if(t=Ns(e,n,t,r),t!==null){var l=le();Te(t,e,r,l),Js(t,n,r)}}function tf(e,n,t){var r=un(e),l={lane:r,action:t,hasEagerState:!1,eagerState:null,next:null};if(Gs(e))Zs(n,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=n.lastRenderedReducer,i!==null))try{var u=n.lastRenderedState,o=i(u,t);if(l.hasEagerState=!0,l.eagerState=o,Le(o,u)){var s=n.interleaved;s===null?(l.next=l,Xi(n)):(l.next=s.next,s.next=l),n.interleaved=l;return}}catch{}finally{}t=Ns(e,n,l,r),t!==null&&(l=le(),Te(t,e,r,l),Js(t,n,r))}}function Gs(e){var n=e.alternate;return e===U||n!==null&&n===U}function Zs(e,n){Et=Ur=!0;var t=e.pending;t===null?n.next=n:(n.next=t.next,t.next=n),e.pending=n}function Js(e,n,t){if(t&4194240){var r=n.lanes;r&=e.pendingLanes,t|=r,n.lanes=t,Oi(e,t)}}var Vr={readContext:Se,useCallback:b,useContext:b,useEffect:b,useImperativeHandle:b,useInsertionEffect:b,useLayoutEffect:b,useMemo:b,useReducer:b,useRef:b,useState:b,useDebugValue:b,useDeferredValue:b,useTransition:b,useMutableSource:b,useSyncExternalStore:b,useId:b,unstable_isNewReconciler:!1},rf={readContext:Se,useCallback:function(e,n){return De().memoizedState=[e,n===void 0?null:n],e},useContext:Se,useEffect:ro,useImperativeHandle:function(e,n,t){return t=t!=null?t.concat([e]):null,hr(4194308,4,Qs.bind(null,n,e),t)},useLayoutEffect:function(e,n){return hr(4194308,4,e,n)},useInsertionEffect:function(e,n){return hr(4,2,e,n)},useMemo:function(e,n){var t=De();return n=n===void 0?null:n,e=e(),t.memoizedState=[e,n],e},useReducer:function(e,n,t){var r=De();return n=t!==void 0?t(n):n,r.memoizedState=r.baseState=n,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:n},r.queue=e,e=e.dispatch=nf.bind(null,U,e),[r.memoizedState,e]},useRef:function(e){var n=De();return e={current:e},n.memoizedState=e},useState:to,useDebugValue:ru,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=to(!1),n=e[0];return e=ef.bind(null,e[1]),De().memoizedState=e,[n,e]},useMutableSource:function(){},useSyncExternalStore:function(e,n,t){var r=U,l=De();if(I){if(t===void 0)throw Error(y(407));t=t()}else{if(t=n(),G===null)throw Error(y(349));xn&30||Fs(r,n,t)}l.memoizedState=t;var i={value:t,getSnapshot:n};return l.queue=i,ro(js.bind(null,r,i,e),[e]),r.flags|=2048,Bt(9,Is.bind(null,r,i,t,n),void 0,null),t},useId:function(){var e=De(),n=G.identifierPrefix;if(I){var t=Ve,r=Ue;t=(r&~(1<<32-Pe(r)-1)).toString(32)+t,n=":"+n+"R"+t,t=Vt++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=u.createElement(t,{is:r.is}):(e=u.createElement(t),t==="select"&&(u=e,r.multiple?u.multiple=!0:r.size&&(u.size=r.size))):e=u.createElementNS(e,t),e[Re]=n,e[It]=r,ua(e,n,!1,!1),n.stateNode=e;e:{switch(u=$l(t,r),t){case"dialog":R("cancel",e),R("close",e),l=r;break;case"iframe":case"object":case"embed":R("load",e),l=r;break;case"video":case"audio":for(l=0;let&&(n.flags|=128,r=!0,ft(i,!1),n.lanes=4194304)}else{if(!r)if(e=jr(u),e!==null){if(n.flags|=128,r=!0,t=e.updateQueue,t!==null&&(n.updateQueue=t,n.flags|=4),ft(i,!0),i.tail===null&&i.tailMode==="hidden"&&!u.alternate&&!I)return ee(n),null}else 2*Q()-i.renderingStartTime>et&&t!==1073741824&&(n.flags|=128,r=!0,ft(i,!1),n.lanes=4194304);i.isBackwards?(u.sibling=n.child,n.child=u):(t=i.last,t!==null?t.sibling=u:n.child=u,i.last=u)}return i.tail!==null?(n=i.tail,i.rendering=n,i.tail=n.sibling,i.renderingStartTime=Q(),n.sibling=null,t=j.current,D(j,r?t&1|2:t&1),n):(ee(n),null);case 22:case 23:return au(),r=n.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(n.flags|=8192),r&&n.mode&1?fe&1073741824&&(ee(n),n.subtreeFlags&6&&(n.flags|=8192)):ee(n),null;case 24:return null;case 25:return null}throw Error(y(156,n.tag))}function df(e,n){switch(Qi(n),n.tag){case 1:return ae(n.type)&&Lr(),e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 3:return qn(),O(se),O(te),qi(),e=n.flags,e&65536&&!(e&128)?(n.flags=e&-65537|128,n):null;case 5:return Ji(n),null;case 13:if(O(j),e=n.memoizedState,e!==null&&e.dehydrated!==null){if(n.alternate===null)throw Error(y(340));Zn()}return e=n.flags,e&65536?(n.flags=e&-65537|128,n):null;case 19:return O(j),null;case 4:return qn(),null;case 10:return Yi(n.type._context),null;case 22:case 23:return au(),null;case 24:return null;default:return null}}var sr=!1,ne=!1,pf=typeof WeakSet=="function"?WeakSet:Set,S=null;function An(e,n){var t=e.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(r){A(e,n,r)}else t.current=null}function gi(e,n,t){try{t()}catch(r){A(e,n,r)}}var po=!1;function mf(e,n){if(ni=Nr,e=ds(),Bi(e)){if("selectionStart"in e)var t={start:e.selectionStart,end:e.selectionEnd};else e:{t=(t=e.ownerDocument)&&t.defaultView||window;var r=t.getSelection&&t.getSelection();if(r&&r.rangeCount!==0){t=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{t.nodeType,i.nodeType}catch{t=null;break e}var u=0,o=-1,s=-1,d=0,v=0,m=e,p=null;n:for(;;){for(var g;m!==t||l!==0&&m.nodeType!==3||(o=u+l),m!==i||r!==0&&m.nodeType!==3||(s=u+r),m.nodeType===3&&(u+=m.nodeValue.length),(g=m.firstChild)!==null;)p=m,m=g;for(;;){if(m===e)break n;if(p===t&&++d===l&&(o=u),p===i&&++v===r&&(s=u),(g=m.nextSibling)!==null)break;m=p,p=m.parentNode}m=g}t=o===-1||s===-1?null:{start:o,end:s}}else t=null}t=t||{start:0,end:0}}else t=null;for(ti={focusedElem:e,selectionRange:t},Nr=!1,S=n;S!==null;)if(n=S,e=n.child,(n.subtreeFlags&1028)!==0&&e!==null)e.return=n,S=e;else for(;S!==null;){n=S;try{var w=n.alternate;if(n.flags&1024)switch(n.tag){case 0:case 11:case 15:break;case 1:if(w!==null){var k=w.memoizedProps,F=w.memoizedState,c=n.stateNode,a=c.getSnapshotBeforeUpdate(n.elementType===n.type?k:_e(n.type,k),F);c.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var f=n.stateNode.containerInfo;f.nodeType===1?f.textContent="":f.nodeType===9&&f.documentElement&&f.removeChild(f.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(h){A(n,n.return,h)}if(e=n.sibling,e!==null){e.return=n.return,S=e;break}S=n.return}return w=po,po=!1,w}function Ct(e,n,t){var r=n.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&gi(n,t,i)}l=l.next}while(l!==r)}}function br(e,n){if(n=n.updateQueue,n=n!==null?n.lastEffect:null,n!==null){var t=n=n.next;do{if((t.tag&e)===e){var r=t.create;t.destroy=r()}t=t.next}while(t!==n)}}function wi(e){var n=e.ref;if(n!==null){var t=e.stateNode;switch(e.tag){case 5:e=t;break;default:e=t}typeof n=="function"?n(e):n.current=e}}function aa(e){var n=e.alternate;n!==null&&(e.alternate=null,aa(n)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(n=e.stateNode,n!==null&&(delete n[Re],delete n[It],delete n[ii],delete n[Gc],delete n[Zc])),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ca(e){return e.tag===5||e.tag===3||e.tag===4}function mo(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||ca(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function ki(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.nodeType===8?t.parentNode.insertBefore(e,n):t.insertBefore(e,n):(t.nodeType===8?(n=t.parentNode,n.insertBefore(e,t)):(n=t,n.appendChild(e)),t=t._reactRootContainer,t!=null||n.onclick!==null||(n.onclick=Tr));else if(r!==4&&(e=e.child,e!==null))for(ki(e,n,t),e=e.sibling;e!==null;)ki(e,n,t),e=e.sibling}function Si(e,n,t){var r=e.tag;if(r===5||r===6)e=e.stateNode,n?t.insertBefore(e,n):t.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Si(e,n,t),e=e.sibling;e!==null;)Si(e,n,t),e=e.sibling}var Z=null,Ne=!1;function Ke(e,n,t){for(t=t.child;t!==null;)fa(e,n,t),t=t.sibling}function fa(e,n,t){if(Oe&&typeof Oe.onCommitFiberUnmount=="function")try{Oe.onCommitFiberUnmount($r,t)}catch{}switch(t.tag){case 5:ne||An(t,n);case 6:var r=Z,l=Ne;Z=null,Ke(e,n,t),Z=r,Ne=l,Z!==null&&(Ne?(e=Z,t=t.stateNode,e.nodeType===8?e.parentNode.removeChild(t):e.removeChild(t)):Z.removeChild(t.stateNode));break;case 18:Z!==null&&(Ne?(e=Z,t=t.stateNode,e.nodeType===8?xl(e.parentNode,t):e.nodeType===1&&xl(e,t),Mt(e)):xl(Z,t.stateNode));break;case 4:r=Z,l=Ne,Z=t.stateNode.containerInfo,Ne=!0,Ke(e,n,t),Z=r,Ne=l;break;case 0:case 11:case 14:case 15:if(!ne&&(r=t.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,u=i.destroy;i=i.tag,u!==void 0&&(i&2||i&4)&&gi(t,n,u),l=l.next}while(l!==r)}Ke(e,n,t);break;case 1:if(!ne&&(An(t,n),r=t.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=t.memoizedProps,r.state=t.memoizedState,r.componentWillUnmount()}catch(o){A(t,n,o)}Ke(e,n,t);break;case 21:Ke(e,n,t);break;case 22:t.mode&1?(ne=(r=ne)||t.memoizedState!==null,Ke(e,n,t),ne=r):Ke(e,n,t);break;default:Ke(e,n,t)}}function vo(e){var n=e.updateQueue;if(n!==null){e.updateQueue=null;var t=e.stateNode;t===null&&(t=e.stateNode=new pf),n.forEach(function(r){var l=Cf.bind(null,e,r);t.has(r)||(t.add(r),r.then(l,l))})}}function xe(e,n){var t=n.deletions;if(t!==null)for(var r=0;rl&&(l=u),r&=~i}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*hf(r/1960))-r,10e?16:e,qe===null)var r=!1;else{if(e=qe,qe=null,Hr=0,L&6)throw Error(y(331));var l=L;for(L|=4,S=e.current;S!==null;){var i=S,u=i.child;if(S.flags&16){var o=i.deletions;if(o!==null){for(var s=0;sQ()-ou?kn(e,0):uu|=t),ce(e,n)}function wa(e,n){n===0&&(e.mode&1?(n=bt,bt<<=1,!(bt&130023424)&&(bt=4194304)):n=1);var t=le();e=Qe(e,n),e!==null&&(Qt(e,n,t),ce(e,t))}function Ef(e){var n=e.memoizedState,t=0;n!==null&&(t=n.retryLane),wa(e,t)}function Cf(e,n){var t=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(t=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(n),wa(e,t)}var ka;ka=function(e,n,t){if(e!==null)if(e.memoizedProps!==n.pendingProps||se.current)oe=!0;else{if(!(e.lanes&t)&&!(n.flags&128))return oe=!1,cf(e,n,t);oe=!!(e.flags&131072)}else oe=!1,I&&n.flags&1048576&&Cs(n,Rr,n.index);switch(n.lanes=0,n.tag){case 2:var r=n.type;yr(e,n),e=n.pendingProps;var l=Gn(n,te.current);Kn(n,t),l=eu(null,n,r,e,l,t);var i=nu();return n.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(n.tag=1,n.memoizedState=null,n.updateQueue=null,ae(r)?(i=!0,Mr(n)):i=!1,n.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,Gi(n),l.updater=Jr,n.stateNode=l,l._reactInternals=n,fi(n,r,e,t),n=mi(null,n,r,!0,i,t)):(n.tag=0,I&&i&&Hi(n),re(null,n,l,t),n=n.child),n;case 16:r=n.elementType;e:{switch(yr(e,n),e=n.pendingProps,l=r._init,r=l(r._payload),n.type=r,l=n.tag=_f(r),e=_e(r,e),l){case 0:n=pi(null,n,r,e,t);break e;case 1:n=ao(null,n,r,e,t);break e;case 11:n=oo(null,n,r,e,t);break e;case 14:n=so(null,n,r,_e(r.type,e),t);break e}throw Error(y(306,r,""))}return n;case 0:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:_e(r,l),pi(e,n,r,l,t);case 1:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:_e(r,l),ao(e,n,r,l,t);case 3:e:{if(ra(n),e===null)throw Error(y(387));r=n.pendingProps,i=n.memoizedState,l=i.element,zs(e,n),Ir(n,r,null,t);var u=n.memoizedState;if(r=u.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:u.cache,pendingSuspenseBoundaries:u.pendingSuspenseBoundaries,transitions:u.transitions},n.updateQueue.baseState=i,n.memoizedState=i,n.flags&256){l=bn(Error(y(423)),n),n=co(e,n,r,t,l);break e}else if(r!==l){l=bn(Error(y(424)),n),n=co(e,n,r,t,l);break e}else for(de=tn(n.stateNode.containerInfo.firstChild),pe=n,I=!0,ze=null,t=Ms(n,null,r,t),n.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Zn(),r===l){n=We(e,n,t);break e}re(e,n,r,t)}n=n.child}return n;case 5:return Ds(n),e===null&&si(n),r=n.type,l=n.pendingProps,i=e!==null?e.memoizedProps:null,u=l.children,ri(r,l)?u=null:i!==null&&ri(r,i)&&(n.flags|=32),ta(e,n),re(e,n,u,t),n.child;case 6:return e===null&&si(n),null;case 13:return la(e,n,t);case 4:return Zi(n,n.stateNode.containerInfo),r=n.pendingProps,e===null?n.child=Jn(n,null,r,t):re(e,n,r,t),n.child;case 11:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:_e(r,l),oo(e,n,r,l,t);case 7:return re(e,n,n.pendingProps,t),n.child;case 8:return re(e,n,n.pendingProps.children,t),n.child;case 12:return re(e,n,n.pendingProps.children,t),n.child;case 10:e:{if(r=n.type._context,l=n.pendingProps,i=n.memoizedProps,u=l.value,D(Or,r._currentValue),r._currentValue=u,i!==null)if(Le(i.value,u)){if(i.children===l.children&&!se.current){n=We(e,n,t);break e}}else for(i=n.child,i!==null&&(i.return=n);i!==null;){var o=i.dependencies;if(o!==null){u=i.child;for(var s=o.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=Ae(-1,t&-t),s.tag=2;var d=i.updateQueue;if(d!==null){d=d.shared;var v=d.pending;v===null?s.next=s:(s.next=v.next,v.next=s),d.pending=s}}i.lanes|=t,s=i.alternate,s!==null&&(s.lanes|=t),ai(i.return,t,n),o.lanes|=t;break}s=s.next}}else if(i.tag===10)u=i.type===n.type?null:i.child;else if(i.tag===18){if(u=i.return,u===null)throw Error(y(341));u.lanes|=t,o=u.alternate,o!==null&&(o.lanes|=t),ai(u,t,n),u=i.sibling}else u=i.child;if(u!==null)u.return=i;else for(u=i;u!==null;){if(u===n){u=null;break}if(i=u.sibling,i!==null){i.return=u.return,u=i;break}u=u.return}i=u}re(e,n,l.children,t),n=n.child}return n;case 9:return l=n.type,r=n.pendingProps.children,Kn(n,t),l=Se(l),r=r(l),n.flags|=1,re(e,n,r,t),n.child;case 14:return r=n.type,l=_e(r,n.pendingProps),l=_e(r.type,l),so(e,n,r,l,t);case 15:return ea(e,n,n.type,n.pendingProps,t);case 17:return r=n.type,l=n.pendingProps,l=n.elementType===r?l:_e(r,l),yr(e,n),n.tag=1,ae(r)?(e=!0,Mr(n)):e=!1,Kn(n,t),Ts(n,r,l),fi(n,r,l,t),mi(null,n,r,!0,e,t);case 19:return ia(e,n,t);case 22:return na(e,n,t)}throw Error(y(156,n.tag))};function Sa(e,n){return Yo(e,n)}function xf(e,n,t,r){this.tag=e,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=n,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function we(e,n,t,r){return new xf(e,n,t,r)}function fu(e){return e=e.prototype,!(!e||!e.isReactComponent)}function _f(e){if(typeof e=="function")return fu(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Li)return 11;if(e===Mi)return 14}return 2}function on(e,n){var t=e.alternate;return t===null?(t=we(e.tag,n,e.key,e.mode),t.elementType=e.elementType,t.type=e.type,t.stateNode=e.stateNode,t.alternate=e,e.alternate=t):(t.pendingProps=n,t.type=e.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=e.flags&14680064,t.childLanes=e.childLanes,t.lanes=e.lanes,t.child=e.child,t.memoizedProps=e.memoizedProps,t.memoizedState=e.memoizedState,t.updateQueue=e.updateQueue,n=e.dependencies,t.dependencies=n===null?null:{lanes:n.lanes,firstContext:n.firstContext},t.sibling=e.sibling,t.index=e.index,t.ref=e.ref,t}function kr(e,n,t,r,l,i){var u=2;if(r=e,typeof e=="function")fu(e)&&(u=1);else if(typeof e=="string")u=5;else e:switch(e){case Mn:return Sn(t.children,l,i,n);case Ti:u=8,l|=8;break;case Fl:return e=we(12,t,n,l|2),e.elementType=Fl,e.lanes=i,e;case Il:return e=we(13,t,n,l),e.elementType=Il,e.lanes=i,e;case jl:return e=we(19,t,n,l),e.elementType=jl,e.lanes=i,e;case Lo:return nl(t,l,i,n);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case Po:u=10;break e;case To:u=9;break e;case Li:u=11;break e;case Mi:u=14;break e;case Ye:u=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return n=we(u,t,n,l),n.elementType=e,n.type=r,n.lanes=i,n}function Sn(e,n,t,r){return e=we(7,e,r,n),e.lanes=t,e}function nl(e,n,t,r){return e=we(22,e,r,n),e.elementType=Lo,e.lanes=t,e.stateNode={isHidden:!1},e}function Dl(e,n,t){return e=we(6,e,null,n),e.lanes=t,e}function Rl(e,n,t){return n=we(4,e.children!==null?e.children:[],e.key,n),n.lanes=t,n.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},n}function Nf(e,n,t,r,l){this.tag=n,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=pl(0),this.expirationTimes=pl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=pl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function du(e,n,t,r,l,i,u,o,s){return e=new Nf(e,n,t,o,s),n===1?(n=1,i===!0&&(n|=8)):n=0,i=we(3,null,null,n),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gi(i),e}function zf(e,n,t){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(_a)}catch(e){console.error(e)}}_a(),Co.exports=ve;var Rf=Co.exports;export{Rf as r};
diff --git a/outputs/public/index.php b/outputs/public/index.php
deleted file mode 100644
index 8c9a62b..0000000
--- a/outputs/public/index.php
+++ /dev/null
@@ -1,129 +0,0 @@
-addFunction(new TwigFunction('path', fn(string $str) => "$basePath$str"));
-
- return $twig;
-}
-
-function getRoutes(): AltoRouter {
- global $basePath;
-
- $ar = new AltoRouter();
- $ar->setBasePath($basePath);
-
- //authentication
- $ar->map("GET", "/login", Action::noAuth(fn() => getAuthController()->displayLogin()));
- $ar->map("GET", "/register", Action::noAuth(fn() => getAuthController()->displayRegister()));
- $ar->map("POST", "/login", Action::noAuth(fn(SessionHandle $s) => getAuthController()->login($_POST, $s)));
- $ar->map("POST", "/register", Action::noAuth(fn(SessionHandle $s) => getAuthController()->register($_POST, $s)));
-
- //user-related
- $ar->map("GET", "/", Action::auth(fn(SessionHandle $s) => getUserController()->home($s)));
- $ar->map("GET", "/home", Action::auth(fn(SessionHandle $s) => getUserController()->home($s)));
- $ar->map("GET", "/settings", Action::auth(fn(SessionHandle $s) => getUserController()->settings($s)));
- $ar->map("GET", "/disconnect", Action::auth(fn(MutableSessionHandle $s) => getUserController()->disconnect($s)));
-
-
- //tactic-related
- $ar->map("GET", "/tactic/[i:id]/view", Action::auth(fn(int $id, SessionHandle $s) => getVisualizerController()->openVisualizer($id, $s)));
- $ar->map("GET", "/tactic/[i:id]/edit", Action::auth(fn(int $id, SessionHandle $s) => getEditorController()->openEditor($id, $s)));
- // don't require an authentication to run this action.
- // If the user is not connected, the tactic will never save.
- $ar->map("GET", "/tactic/new", Action::noAuth(fn() => getEditorController()->createNew()));
- $ar->map("GET", "/tactic/new/plain", Action::noAuth(fn(SessionHandle $s) => getEditorController()->createNewOfKind(CourtType::plain(), $s)));
- $ar->map("GET", "/tactic/new/half", Action::noAuth(fn(SessionHandle $s) => getEditorController()->createNewOfKind(CourtType::half(), $s)));
-
- //team-related
- $ar->map("GET", "/team/new", Action::auth(fn(SessionHandle $s) => getTeamController()->displayCreateTeam($s)));
- $ar->map("POST", "/team/new", Action::auth(fn(SessionHandle $s) => getTeamController()->submitTeam($_POST, $s)));
- $ar->map("GET", "/team/search", Action::auth(fn(SessionHandle $s) => getTeamController()->displayListTeamByName($s)));
- $ar->map("POST", "/team/search", Action::auth(fn(SessionHandle $s) => getTeamController()->listTeamByName($_POST, $s)));
- $ar->map("GET", "/team/[i:id]", Action::auth(fn(int $id, SessionHandle $s) => getTeamController()->displayTeam($id, $s)));
- $ar->map("GET", "/team/members/add", Action::auth(fn(SessionHandle $s) => getTeamController()->displayAddMember($s)));
- $ar->map("POST", "/team/members/add", Action::auth(fn(SessionHandle $s) => getTeamController()->addMember($_POST, $s)));
- $ar->map("GET", "/team/members/remove", Action::auth(fn(SessionHandle $s) => getTeamController()->displayDeleteMember($s)));
- $ar->map("POST", "/team/members/remove", Action::auth(fn(SessionHandle $s) => getTeamController()->deleteMember($_POST, $s)));
-
- return $ar;
-}
-
-function runMatch($match, MutableSessionHandle $session): HttpResponse {
- global $basePath;
- if (!$match) {
- return ViewHttpResponse::twig("error.html.twig", [
- 'failures' => [ValidationFail::notFound("Could not find page {$_SERVER['REQUEST_URI']}.")],
- ], HttpCodes::NOT_FOUND);
- }
-
- return App::runAction($basePath . '/login', $match['target'], $match['params'], $session);
-}
-
-
-//this is a global variable
-$basePath = get_public_path(__DIR__);
-
-App::render(runMatch(getRoutes()->match(), PhpSessionHandle::init()), fn() => getTwig());
diff --git a/outputs/public/jsx-runtime-2e2d9038.js b/outputs/public/jsx-runtime-2e2d9038.js
deleted file mode 100644
index bb59471..0000000
--- a/outputs/public/jsx-runtime-2e2d9038.js
+++ /dev/null
@@ -1,17 +0,0 @@
-function L(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function ue(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var n=function r(){return this instanceof r?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(r){var u=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(n,r,u.get?u:{enumerable:!0,get:function(){return e[r]}})}),n}var j={exports:{}},m={},k={exports:{}},o={};/**
- * @license React
- * react.production.min.js
- *
- * Copyright (c) Facebook, Inc. and its affiliates.
- *
- * This source code is licensed under the MIT license found in the
- * LICENSE file in the root directory of this source tree.
- */var y=Symbol.for("react.element"),N=Symbol.for("react.portal"),U=Symbol.for("react.fragment"),M=Symbol.for("react.strict_mode"),V=Symbol.for("react.profiler"),q=Symbol.for("react.provider"),B=Symbol.for("react.context"),z=Symbol.for("react.forward_ref"),H=Symbol.for("react.suspense"),W=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),w=Symbol.iterator;function Y(e){return e===null||typeof e!="object"?null:(e=w&&e[w]||e["@@iterator"],typeof e=="function"?e:null)}var g={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},x=Object.assign,C={};function p(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||g}p.prototype.isReactComponent={};p.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")};p.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function P(){}P.prototype=p.prototype;function S(e,t,n){this.props=e,this.context=t,this.refs=C,this.updater=n||g}var E=S.prototype=new P;E.constructor=S;x(E,p.prototype);E.isPureReactComponent=!0;var O=Array.isArray,I=Object.prototype.hasOwnProperty,R={current:null},D={key:!0,ref:!0,__self:!0,__source:!0};function T(e,t,n){var r,u={},c=null,i=null;if(t!=null)for(r in t.ref!==void 0&&(i=t.ref),t.key!==void 0&&(c=""+t.key),t)I.call(t,r)&&!D.hasOwnProperty(r)&&(u[r]=t[r]);var f=arguments.length-2;if(f===1)u.children=n;else if(1tactics->getAll($session->getAccount()->getId());
+ $results = $this->tactics->getAll($session->getAccount()->getUser()->getId());
return ViewHttpResponse::twig("display_tactic.html.twig", ['tactics' => $results]);
}
public function displayTeam(int $tacticId, SessionHandle $session): ViewHttpResponse {
- $results = $this->teams->getAll($session->getAccount()->getId());
+ $results = $this->teams->getAll($session->getAccount()->getUser()->getId());
return ViewHttpResponse::twig("display_user_teams.html.twig", ['teams' => $results, 'tactic' => $tacticId]);
}
public function displayShareConfirmation(int $tacticId, int $teamId, SessionHandle $session) : ViewHttpResponse {
- $team = $this->teams->getTeam($teamId);
- $tactic = $this->tactics->get($tacticId);
return ViewHttpResponse::twig("display_share_confirmation.html.twig", ['team' => $teamId, 'tactic' => $tacticId]);
}
- public function shareTacticToTeam(array $confirmation, int $tacticId, int $teamId, SessionHandle $session) : \IQBall\Core\Http\HttpResponse
+ public function shareTacticToTeam(array $confirmation, int $tacticId, int $teamId, SessionHandle $session) : HttpResponse
{
- if($confirmation['confirmation'] == "no") {
- return ViewHttpResponse::redirect("/");
+ if($confirmation['confirmation'] == "yes") {
+ $this->teams->shareTacticToTeam($teamId, $tacticId);
}
- $this->teams->shareTacticToTeam($teamId, $tacticId);
return ViewHttpResponse::redirect("/");
}
}
diff --git a/src/App/Controller/UserController.php b/src/App/Controller/UserController.php
index 6f56128..8755115 100644
--- a/src/App/Controller/UserController.php
+++ b/src/App/Controller/UserController.php
@@ -38,6 +38,16 @@ class UserController {
if ($this->teams != null) {
$teams = $this->teams->getAll($user->getId());
+
+ $allTacticsSharedTeam = $this->tactics->getAllTacticSharedTeam($user->getId());
+ if(isset($allTacticsSharedTeam)) {
+ foreach ($allTacticsSharedTeam as $tactic) {
+ if(!in_array($tactic, $allTactics)) {
+ array_push($allTactics, $tactic);
+ }
+ }
+ }
+ var_dump($allTactics);
} else {
$teams = [];
}
diff --git a/src/Core/Gateway/TacticInfoGateway.php b/src/Core/Gateway/TacticInfoGateway.php
index 271d4af..a534bb7 100644
--- a/src/Core/Gateway/TacticInfoGateway.php
+++ b/src/Core/Gateway/TacticInfoGateway.php
@@ -43,9 +43,9 @@ class TacticInfoGateway {
* Return the nb last tactics created
*
* @param integer $nb
- * @return array>
+ * @return TacticInfo[] | null
*/
- public function getLast(int $nb, int $ownerId): ?array {
+ public function getLastOwnedBy(int $nb, int $ownerId): ?array {
$res = $this->con->fetch(
"SELECT *
FROM Tactic
@@ -59,15 +59,15 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
- return $res;
+ return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
/**
* Get all the tactics of the owner
*
- * @return array>
+ * @return TacticInfo[] | null
*/
- public function getAll(int $ownerId): ?array {
+ public function getAllOwnedBy(int $ownerId): ?array {
$res = $this->con->fetch(
"SELECT *
FROM Tactic
@@ -80,13 +80,18 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
- return $res;
+ return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
+ /**
+ * @param int $ownerId
+ * @return TacticInfo[]|null
+ */
public function getAllTacticSharedTeam(int $ownerId): ?array {
$res = $this->con->fetch(
- "SELECT * FROM TacticSharedTeam
- WHERE id_team = :ownerId",
+ "SELECT t.* FROM Tactic t, TacticSharedTeam ts, Member m
+ WHERE ts.id_team = m.id_team AND ts.id_tactic = t.id
+ AND m.id_user = :ownerId",
[
":ownerId" => [$ownerId, PDO::PARAM_INT]
]
@@ -94,12 +99,16 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
- return $res;
+ return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
+ /**
+ * @param int $ownerId
+ * @return TacticInfo[]|null
+ */
public function getAllTacticSharedAccount(int $ownerId): ?array {
$res = $this->con->fetch(
- "SELECT * FROM TacticSharedTeam
+ "SELECT * FROM TacticSharedAccount
WHERE id_account = :ownerId",
[
":ownerId" => [$ownerId, PDO::PARAM_INT]
@@ -108,7 +117,7 @@ class TacticInfoGateway {
if (count($res) == 0) {
return [];
}
- return $res;
+ return array_map(fn(array $row) => $this->rowToTacticInfo($row), $res);
}
/**
@@ -158,4 +167,9 @@ class TacticInfoGateway {
]);
return $stmnt->rowCount() == 1;
}
+
+ private function rowToTacticInfo(array $row) : TacticInfo {
+ $type = CourtType::fromName($row['court_type']);
+ return new TacticInfo($row['id'], $row["name"], strtotime($row["creation_date"]), $row["owner"], $type, $row['content']);
+ }
}
diff --git a/src/Core/Gateway/TeamGateway.php b/src/Core/Gateway/TeamGateway.php
index 7d376e5..bb96d34 100644
--- a/src/Core/Gateway/TeamGateway.php
+++ b/src/Core/Gateway/TeamGateway.php
@@ -37,8 +37,8 @@ class TeamGateway {
$this->con->exec(
"INSERT INTO TacticSharedTeam(id_team, id_tactic) VALUES(:teamId, :tacticId)",
[
- ":id_team" => [$teamId, PDO::PARAM_INT],
- ":id_tactic" => [$tacticId, PDO::PARAM_INT],
+ ":teamId" => [$teamId, PDO::PARAM_INT],
+ ":tacticId" => [$tacticId, PDO::PARAM_INT],
]
);
return intval($this->con->lastInsertId());
diff --git a/src/Core/Model/TacticModel.php b/src/Core/Model/TacticModel.php
index 7c801fc..dfcfb9c 100644
--- a/src/Core/Model/TacticModel.php
+++ b/src/Core/Model/TacticModel.php
@@ -67,7 +67,7 @@ class TacticModel {
* @return array>
*/
public function getLast(int $nb, int $ownerId): array {
- return $this->tactics->getLast($nb, $ownerId);
+ return $this->tactics->getLastOwnedBy($nb, $ownerId);
}
/**
@@ -77,10 +77,11 @@ class TacticModel {
* @return array>
*/
public function getAll(int $ownerId): ?array {
- return $this->tactics->getAll($ownerId);
+ return $this->tactics->getAllOwnedBy($ownerId);
}
- public function getAllTacticSharedTeam(int $ownerId) : ?array {
+ public function getAllTacticSharedTeam(int $ownerId) : ?array
+ {
return $this->tactics->getAllTacticSharedTeam($ownerId);
}
@@ -88,10 +89,6 @@ class TacticModel {
return $this->tactics->getAllTacticSharedAccount($ownerId);
}
- public function shareTacticToAccount(int $accountId, int $tacticId) {
- return $this->tactics->shareTacticToAccount($accountId, $tacticId);
- }
-
/**
* Update the name of a tactic
* @param int $id the tactic identifier