(self.webpackChunkroot=self.webpackChunkroot||[]).push([[346],{0:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoLogo-eb0c34a967f39c0e7e3a.jpg"},384:(e,t,n)=>{"use strict";e.exports=n.p+"img/avatarGroup-faca1e69e2c224b7eebe.png"},477:()=>{},539:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileZIP-8e94803f540ec1fbe349.svg"},911:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz48c3ZnIHZlcnNpb249IjEuMSIgaWQ9IldoaXRlIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4PSIwcHgiIHk9IjBweCIgdmlld0JveD0iMCAwIDQwMCA0MDAiIHN0eWxlPSJlbmFibGUtYmFja2dyb3VuZDpuZXcgMCAwIDQwMCA0MDA7IiB4bWw6c3BhY2U9InByZXNlcnZlIj48c3R5bGUgdHlwZT0idGV4dC9jc3MiPi5zdDB7ZmlsbDojRkZGRkZGO308L3N0eWxlPjxwYXRoIGNsYXNzPSJzdDAiIGQ9Ik00MDAsMjAwYzAsMTEwLjUtODkuNSwyMDAtMjAwLDIwMFMwLDMxMC41LDAsMjAwUzg5LjUsMCwyMDAsMFM0MDAsODkuNSw0MDAsMjAweiBNMTYzLjQsMzA1LjVjODguNywwLDEzNy4yLTczLjUsMTM3LjItMTM3LjJjMC0yLjEsMC00LjItMC4xLTYuMmM5LjQtNi44LDE3LjYtMTUuMywyNC4xLTI1Yy04LjYsMy44LTE3LjksNi40LTI3LjcsNy42YzEwLTYsMTcuNi0xNS40LDIxLjItMjYuN2MtOS4zLDUuNS0xOS42LDkuNS0zMC42LDExLjdjLTguOC05LjQtMjEuMy0xNS4yLTM1LjItMTUuMmMtMjYuNiwwLTQ4LjIsMjEuNi00OC4yLDQ4LjJjMCwzLjgsMC40LDcuNSwxLjMsMTFjLTQwLjEtMi03NS42LTIxLjItOTkuNC01MC40Yy00LjEsNy4xLTYuNSwxNS40LTYuNSwyNC4yYzAsMTYuNyw4LjUsMzEuNSwyMS41LDQwLjFjLTcuOS0wLjItMTUuMy0yLjQtMjEuOC02YzAsMC4yLDAsMC40LDAsMC42YzAsMjMuNCwxNi42LDQyLjgsMzguNyw0Ny4zYy00LDEuMS04LjMsMS43LTEyLjcsMS43Yy0zLjEsMC02LjEtMC4zLTkuMS0wLjljNi4xLDE5LjIsMjMuOSwzMy4xLDQ1LDMzLjVjLTE2LjUsMTIuOS0zNy4zLDIwLjYtNTkuOSwyMC42Yy0zLjksMC03LjctMC4yLTExLjUtMC43QzExMC44LDI5Ny41LDEzNi4yLDMwNS41LDE2My40LDMwNS41Ii8+PC9zdmc+"},1037:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsBlank-d9b5a36b6d641e2b1cd9.svg"},1205:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionUnranked-8efe2960cfc090ba51df.png"},1416:(e,t,n)=>{"use strict";e.exports=n.p+"img/googlePlan-b18cf281f99a8608e7a9.png"},1446:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleMaps-093b110e04f11e43e677.png"},1931:(e,t,n)=>{"use strict";e.exports=n.p+"img/google-3994b2066e10d4d349a4.png"},2248:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSIxMDI0cHgiIGhlaWdodD0iMTAyNHB4IiB2aWV3Qm94PSIwIDAgMTAyNCAxMDI0IiB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiPiAgICAgICAgPHRpdGxlPkZpbGwgMTwvdGl0bGU+ICAgIDxkZXNjPkNyZWF0ZWQgd2l0aCBTa2V0Y2guPC9kZXNjPiAgICA8ZGVmcz48L2RlZnM+ICAgIDxnIGlkPSJQYWdlLTEiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPiAgICAgICAgPGcgaWQ9ImZMb2dvX1doaXRlIiBmaWxsPSIjRkZGRkZFIj4gICAgICAgICAgICA8cGF0aCBkPSJNOTY3LjQ4NCwwIEw1Ni41MTcsMCBDMjUuMzA0LDAgMCwyNS4zMDQgMCw1Ni41MTcgTDAsOTY3LjQ4MyBDMCw5OTguNjk0IDI1LjI5NywxMDI0IDU2LjUyMiwxMDI0IEw1NDcsMTAyNCBMNTQ3LDYyOCBMNDE0LDYyOCBMNDE0LDQ3MyBMNTQ3LDQ3MyBMNTQ3LDM1OS4wMjkgQzU0NywyMjYuNzY3IDYyNy43NzMsMTU0Ljc0NyA3NDUuNzU2LDE1NC43NDcgQzgwMi4yNjksMTU0Ljc0NyA4NTAuODQyLDE1OC45NTUgODY1LDE2MC44MzYgTDg2NSwyOTkgTDc4My4zODQsMjk5LjAzNyBDNzE5LjM5MSwyOTkuMDM3IDcwNywzMjkuNTI5IDcwNywzNzQuMjczIEw3MDcsNDczIEw4NjAuNDg3LDQ3MyBMODQwLjUwMSw2MjggTDcwNyw2MjggTDcwNywxMDI0IEw5NjcuNDg0LDEwMjQgQzk5OC42OTcsMTAyNCAxMDI0LDk5OC42OTcgMTAyNCw5NjcuNDg0IEwxMDI0LDU2LjUxNSBDMTAyNCwyNS4zMDMgOTk4LjY5NywwIDk2Ny40ODQsMCIgaWQ9IkZpbGwtMSI+PC9wYXRoPiAgICAgICAgPC9nPiAgICA8L2c+PC9zdmc+"},2281:(e,t,n)=>{"use strict";e.exports=n.p+"img/login2x-a7058a62cb4dc68d53e5.png"},2599:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankHandGlobe-724d35d1342815318f84.svg"},2630:(e,t,n)=>{"use strict";e.exports=n.p+"svg/alert-c575e88c07bbcb08605f.svg"},2647:(e,t,n)=>{"use strict";e.exports=n.p+"img/login-ba738216a561ebc04664.png"},3574:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done2-fe55d02679b93e21cc5f.svg"},3691:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNTAuMzc4IiBoZWlnaHQ9IjI1NC4xNjciIHZpZXdCb3g9IjAgMCA2Ni4yNDYgNjcuMjQ4Ij48ZyB0cmFuc2Zvcm09InRyYW5zbGF0ZSgtMTcyLjUzMSAtMjE4LjQ1NSkgc2NhbGUoLjk4MDEyKSI+PHJlY3Qgcnk9IjUuMjM4IiByeD0iNS4yMzgiIHk9IjIzMS4zOTkiIHg9IjE3Ni4wMzEiIGhlaWdodD0iNjAuMDk5IiB3aWR0aD0iNjAuMDk5IiBmaWxsPSIjMzRhNjY4IiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxwYXRoIGQ9Ik0yMDYuNDc3IDI2MC45bC0yOC45ODcgMjguOTg3YTUuMjE4IDUuMjE4IDAgMCAwIDMuNzggMS42MWg0OS42MjFjMS42OTQgMCAzLjE5LS43OTggNC4xNDYtMi4wMzd6IiBmaWxsPSIjNWM4OGM1Ii8+PHBhdGggZD0iTTIyNi43NDIgMjIyLjk4OGMtOS4yNjYgMC0xNi43NzcgNy4xNy0xNi43NzcgMTYuMDE0LjAwNyAyLjc2Mi42NjMgNS40NzQgMi4wOTMgNy44NzUuNDMuNzAzLjgzIDEuNDA4IDEuMTkgMi4xMDcuMzMzLjUwMi42NSAxLjAwNS45NSAxLjUwOC4zNDMuNDc3LjY3My45NTcuOTg4IDEuNDQgMS4zMSAxLjc2OSAyLjUgMy41MDIgMy42MzcgNS4xNjguNzkzIDEuMjc1IDEuNjgzIDIuNjQgMi40NjYgMy45OSAyLjM2MyA0LjA5NCA0LjAwNyA4LjA5MiA0LjYgMTMuOTE0di4wMTJjLjE4Mi40MTIuNTE2LjY2Ni44NzkuNjY3LjQwMy0uMDAxLjc2OC0uMzE0LjkzLS43OTkuNjAzLTUuNzU2IDIuMjM4LTkuNzI5IDQuNTg1LTEzLjc5NC43ODItMS4zNSAxLjY3My0yLjcxNSAyLjQ2NS0zLjk5IDEuMTM3LTEuNjY2IDIuMzI4LTMuNCAzLjYzOC01LjE2OS4zMTUtLjQ4Mi42NDUtLjk2Mi45ODgtMS40MzkuMy0uNTAzLjYxNy0xLjAwNi45NS0xLjUwOC4zNTktLjcuNzYtMS40MDQgMS4xOS0yLjEwNyAxLjQyNi0yLjQwMiAyLTUuMTE0IDIuMDA0LTcuODc1IDAtOC44NDQtNy41MTEtMTYuMDE0LTE2Ljc3Ni0xNi4wMTR6IiBmaWxsPSIjZGQ0YjNlIiBwYWludC1vcmRlcj0ibWFya2VycyBzdHJva2UgZmlsbCIvPjxlbGxpcHNlIHJ5PSI1LjU2NCIgcng9IjUuODI4IiBjeT0iMjM5LjAwMiIgY3g9IjIyNi43NDIiIGZpbGw9IiM4MDJkMjciIHBhaW50LW9yZGVyPSJtYXJrZXJzIHN0cm9rZSBmaWxsIi8+PHBhdGggZD0iTTE5MC4zMDEgMjM3LjI4M2MtNC42NyAwLTguNDU3IDMuODUzLTguNDU3IDguNjA2czMuNzg2IDguNjA3IDguNDU3IDguNjA3YzMuMDQzIDAgNC44MDYtLjk1OCA2LjMzNy0yLjUxNiAxLjUzLTEuNTU3IDIuMDg3LTMuOTEzIDIuMDg3LTYuMjkgMC0uMzYyLS4wMjMtLjcyMi0uMDY0LTEuMDc5aC04LjI1N3YzLjA0M2g0Ljg1Yy0uMTk3Ljc1OS0uNTMxIDEuNDUtMS4wNTggMS45ODYtLjk0Mi45NTgtMi4wMjggMS41NDgtMy45MDEgMS41NDgtMi44NzYgMC01LjIwOC0yLjM3Mi01LjIwOC01LjI5OSAwLTIuOTI2IDIuMzMyLTUuMjk5IDUuMjA4LTUuMjk5IDEuMzk5IDAgMi42MTguNDA3IDMuNTg0IDEuMjkzbDIuMzgxLTIuMzhjMC0uMDAyLS4wMDMtLjAwNC0uMDA0LS4wMDUtMS41ODgtMS41MjQtMy42Mi0yLjIxNS01Ljk1NS0yLjIxNXptNC40MyA1LjY2bC4wMDMuMDA2di0uMDAzeiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjE1LjE4NCAyNTEuOTI5bC03Ljk4IDcuOTc5IDI4LjQ3NyAyOC40NzVjLjI4Ny0uNjQ5LjQ0OS0xLjM2Ni40NDktMi4xMjN2LTMxLjE2NWMtLjQ2OS42NzUtLjkzNCAxLjM0OS0xLjM4MiAyLjAwNS0uNzkyIDEuMjc1LTEuNjgyIDIuNjQtMi40NjUgMy45OS0yLjM0NyA0LjA2NS0zLjk4MiA4LjAzOC00LjU4NSAxMy43OTQtLjE2Mi40ODUtLjUyNy43OTgtLjkzLjc5OS0uMzYzLS4wMDEtLjY5Ny0uMjU1LS44NzktLjY2N3YtLjAxMmMtLjU5My01LjgyMi0yLjIzNy05LjgyLTQuNi0xMy45MTQtLjc4My0xLjM1LTEuNjczLTIuNzE1LTIuNDY2LTMuOTktMS4xMzctMS42NjYtMi4zMjctMy40LTMuNjM3LTUuMTY5bC0uMDAyLS4wMDN6IiBmaWxsPSIjYzNjM2MzIi8+PHBhdGggZD0iTTIxMi45ODMgMjQ4LjQ5NWwtMzYuOTUyIDM2Ljk1M3YuODEyYTUuMjI3IDUuMjI3IDAgMCAwIDUuMjM4IDUuMjM4aDEuMDE1bDM1LjY2Ni0zNS42NjZhMTM2LjI3NSAxMzYuMjc1IDAgMCAwLTIuNzY0LTMuOSAzNy41NzUgMzcuNTc1IDAgMCAwLS45ODktMS40NGMtLjI5OS0uNTAzLS42MTYtMS4wMDYtLjk1LTEuNTA4LS4wODMtLjE2Mi0uMTc2LS4zMjYtLjI2NC0uNDg5eiIgZmlsbD0iI2ZkZGM0ZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48cGF0aCBkPSJNMjExLjk5OCAyNjEuMDgzbC02LjE1MiA2LjE1MSAyNC4yNjQgMjQuMjY0aC43ODFhNS4yMjcgNS4yMjcgMCAwIDAgNS4yMzktNS4yMzh2LTEuMDQ1eiIgZmlsbD0iI2ZmZiIgcGFpbnQtb3JkZXI9Im1hcmtlcnMgc3Ryb2tlIGZpbGwiLz48L2c+PC9zdmc+"},3780:(e,t,n)=>{"use strict";e.exports=n.p+"svg/check-b496988ef222b46ee39a.svg"},4025:(e,t,n)=>{"use strict";e.exports=n.p+"img/ignPlan-d4659acd351e7c1a33e4.png"},4225:e=>{"use strict";e.exports="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIHdpZHRoPSI1MDRweCIgaGVpZ2h0PSI1MDRweCIgdmlld0JveD0iMCAwIDUwNCA1MDQiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+ICAgICAgICA8dGl0bGU+Z2x5cGgtbG9nb19NYXkyMDE2PC90aXRsZT4gICAgPGRlc2M+Q3JlYXRlZCB3aXRoIFNrZXRjaC48L2Rlc2M+ICAgIDxkZWZzPiAgICAgICAgPHBvbHlnb24gaWQ9InBhdGgtMSIgcG9pbnRzPSIwIDAuMTU5IDUwMy44NDEgMC4xNTkgNTAzLjg0MSA1MDMuOTQgMCA1MDMuOTQiPjwvcG9seWdvbj4gICAgPC9kZWZzPiAgICA8ZyBpZD0iZ2x5cGgtbG9nb19NYXkyMDE2IiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4gICAgICAgIDxnIGlkPSJHcm91cC0zIj4gICAgICAgICAgICA8bWFzayBpZD0ibWFzay0yIiBmaWxsPSJ3aGl0ZSI+ICAgICAgICAgICAgICAgIDx1c2UgeGxpbms6aHJlZj0iI3BhdGgtMSI+PC91c2U+ICAgICAgICAgICAgPC9tYXNrPiAgICAgICAgICAgIDxnIGlkPSJDbGlwLTIiPjwvZz4gICAgICAgICAgICA8cGF0aCBkPSJNMjUxLjkyMSwwLjE1OSBDMTgzLjUwMywwLjE1OSAxNzQuOTI0LDAuNDQ5IDE0OC4wNTQsMS42NzUgQzEyMS4yNCwyLjg5OCAxMDIuOTI3LDcuMTU3IDg2LjkwMywxMy4zODUgQzcwLjMzNywxOS44MjIgNTYuMjg4LDI4LjQzNiA0Mi4yODIsNDIuNDQxIEMyOC4yNzcsNTYuNDQ3IDE5LjY2Myw3MC40OTYgMTMuMjI2LDg3LjA2MiBDNi45OTgsMTAzLjA4NiAyLjczOSwxMjEuMzk5IDEuNTE2LDE0OC4yMTMgQzAuMjksMTc1LjA4MyAwLDE4My42NjIgMCwyNTIuMDggQzAsMzIwLjQ5NyAwLjI5LDMyOS4wNzYgMS41MTYsMzU1Ljk0NiBDMi43MzksMzgyLjc2IDYuOTk4LDQwMS4wNzMgMTMuMjI2LDQxNy4wOTcgQzE5LjY2Myw0MzMuNjYzIDI4LjI3Nyw0NDcuNzEyIDQyLjI4Miw0NjEuNzE4IEM1Ni4yODgsNDc1LjcyMyA3MC4zMzcsNDg0LjMzNyA4Ni45MDMsNDkwLjc3NSBDMTAyLjkyNyw0OTcuMDAyIDEyMS4yNCw1MDEuMjYxIDE0OC4wNTQsNTAyLjQ4NCBDMTc0LjkyNCw1MDMuNzEgMTgzLjUwMyw1MDQgMjUxLjkyMSw1MDQgQzMyMC4zMzgsNTA0IDMyOC45MTcsNTAzLjcxIDM1NS43ODcsNTAyLjQ4NCBDMzgyLjYwMSw1MDEuMjYxIDQwMC45MTQsNDk3LjAwMiA0MTYuOTM4LDQ5MC43NzUgQzQzMy41MDQsNDg0LjMzNyA0NDcuNTUzLDQ3NS43MjMgNDYxLjU1OSw0NjEuNzE4IEM0NzUuNTY0LDQ0Ny43MTIgNDg0LjE3OCw0MzMuNjYzIDQ5MC42MTYsNDE3LjA5NyBDNDk2Ljg0Myw0MDEuMDczIDUwMS4xMDIsMzgyLjc2IDUwMi4zMjUsMzU1Ljk0NiBDNTAzLjU1MSwzMjkuMDc2IDUwMy44NDEsMzIwLjQ5NyA1MDMuODQxLDI1Mi4wOCBDNTAzLjg0MSwxODMuNjYyIDUwMy41NTEsMTc1LjA4MyA1MDIuMzI1LDE0OC4yMTMgQzUwMS4xMDIsMTIxLjM5OSA0OTYuODQzLDEwMy4wODYgNDkwLjYxNiw4Ny4wNjIgQzQ4NC4xNzgsNzAuNDk2IDQ3NS41NjQsNTYuNDQ3IDQ2MS41NTksNDIuNDQxIEM0NDcuNTUzLDI4LjQzNiA0MzMuNTA0LDE5LjgyMiA0MTYuOTM4LDEzLjM4NSBDNDAwLjkxNCw3LjE1NyAzODIuNjAxLDIuODk4IDM1NS43ODcsMS42NzUgQzMyOC45MTcsMC40NDkgMzIwLjMzOCwwLjE1OSAyNTEuOTIxLDAuMTU5IFogTTI1MS45MjEsNDUuNTUgQzMxOS4xODYsNDUuNTUgMzI3LjE1NCw0NS44MDcgMzUzLjcxOCw0Ny4wMTkgQzM3OC4yOCw0OC4xMzkgMzkxLjYxOSw1Mi4yNDMgNDAwLjQ5Niw1NS42OTMgQzQxMi4yNTUsNjAuMjYzIDQyMC42NDcsNjUuNzIyIDQyOS40NjIsNzQuNTM4IEM0MzguMjc4LDgzLjM1MyA0NDMuNzM3LDkxLjc0NSA0NDguMzA3LDEwMy41MDQgQzQ1MS43NTcsMTEyLjM4MSA0NTUuODYxLDEyNS43MiA0NTYuOTgxLDE1MC4yODIgQzQ1OC4xOTMsMTc2Ljg0NiA0NTguNDUsMTg0LjgxNCA0NTguNDUsMjUyLjA4IEM0NTguNDUsMzE5LjM0NSA0NTguMTkzLDMyNy4zMTMgNDU2Ljk4MSwzNTMuODc3IEM0NTUuODYxLDM3OC40MzkgNDUxLjc1NywzOTEuNzc4IDQ0OC4zMDcsNDAwLjY1NSBDNDQzLjczNyw0MTIuNDE0IDQzOC4yNzgsNDIwLjgwNiA0MjkuNDYyLDQyOS42MjEgQzQyMC42NDcsNDM4LjQzNyA0MTIuMjU1LDQ0My44OTYgNDAwLjQ5Niw0NDguNDY2IEMzOTEuNjE5LDQ1MS45MTYgMzc4LjI4LDQ1Ni4wMiAzNTMuNzE4LDQ1Ny4xNCBDMzI3LjE1OCw0NTguMzUyIDMxOS4xOTEsNDU4LjYwOSAyNTEuOTIxLDQ1OC42MDkgQzE4NC42NSw0NTguNjA5IDE3Ni42ODQsNDU4LjM1MiAxNTAuMTIzLDQ1Ny4xNCBDMTI1LjU2MSw0NTYuMDIgMTEyLjIyMiw0NTEuOTE2IDEwMy4zNDUsNDQ4LjQ2NiBDOTEuNTg2LDQ0My44OTYgODMuMTk0LDQzOC40MzcgNzQuMzc5LDQyOS42MjEgQzY1LjU2NCw0MjAuODA2IDYwLjEwNCw0MTIuNDE0IDU1LjUzNCw0MDAuNjU1IEM1Mi4wODQsMzkxLjc3OCA0Ny45OCwzNzguNDM5IDQ2Ljg2LDM1My44NzcgQzQ1LjY0OCwzMjcuMzEzIDQ1LjM5MSwzMTkuMzQ1IDQ1LjM5MSwyNTIuMDggQzQ1LjM5MSwxODQuODE0IDQ1LjY0OCwxNzYuODQ2IDQ2Ljg2LDE1MC4yODIgQzQ3Ljk4LDEyNS43MiA1Mi4wODQsMTEyLjM4MSA1NS41MzQsMTAzLjUwNCBDNjAuMTA0LDkxLjc0NSA2NS41NjMsODMuMzUzIDc0LjM3OSw3NC41MzggQzgzLjE5NCw2NS43MjIgOTEuNTg2LDYwLjI2MyAxMDMuMzQ1LDU1LjY5MyBDMTEyLjIyMiw1Mi4yNDMgMTI1LjU2MSw0OC4xMzkgMTUwLjEyMyw0Ny4wMTkgQzE3Ni42ODcsNDUuODA3IDE4NC42NTUsNDUuNTUgMjUxLjkyMSw0NS41NSBaIiBpZD0iRmlsbC0xIiBmaWxsPSIjRkZGRkZGIiBtYXNrPSJ1cmwoI21hc2stMikiPjwvcGF0aD4gICAgICAgIDwvZz4gICAgICAgIDxwYXRoIGQ9Ik0yNTEuOTIxLDMzNi4wNTMgQzIwNS41NDMsMzM2LjA1MyAxNjcuOTQ3LDI5OC40NTcgMTY3Ljk0NywyNTIuMDggQzE2Ny45NDcsMjA1LjcwMiAyMDUuNTQzLDE2OC4xMDYgMjUxLjkyMSwxNjguMTA2IEMyOTguMjk4LDE2OC4xMDYgMzM1Ljg5NCwyMDUuNzAyIDMzNS44OTQsMjUyLjA4IEMzMzUuODk0LDI5OC40NTcgMjk4LjI5OCwzMzYuMDUzIDI1MS45MjEsMzM2LjA1MyBaIE0yNTEuOTIxLDEyMi43MTUgQzE4MC40NzQsMTIyLjcxNSAxMjIuNTU2LDE4MC42MzMgMTIyLjU1NiwyNTIuMDggQzEyMi41NTYsMzIzLjUyNiAxODAuNDc0LDM4MS40NDQgMjUxLjkyMSwzODEuNDQ0IEMzMjMuMzY3LDM4MS40NDQgMzgxLjI4NSwzMjMuNTI2IDM4MS4yODUsMjUyLjA4IEMzODEuMjg1LDE4MC42MzMgMzIzLjM2NywxMjIuNzE1IDI1MS45MjEsMTIyLjcxNSBaIiBpZD0iRmlsbC00IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgICAgICA8cGF0aCBkPSJNNDE2LjYyNywxMTcuNjA0IEM0MTYuNjI3LDEzNC4zIDQwMy4wOTIsMTQ3LjgzNCAzODYuMzk2LDE0Ny44MzQgQzM2OS43MDEsMTQ3LjgzNCAzNTYuMTY2LDEzNC4zIDM1Ni4xNjYsMTE3LjYwNCBDMzU2LjE2NiwxMDAuOTA4IDM2OS43MDEsODcuMzczIDM4Ni4zOTYsODcuMzczIEM0MDMuMDkyLDg3LjM3MyA0MTYuNjI3LDEwMC45MDggNDE2LjYyNywxMTcuNjA0IiBpZD0iRmlsbC01IiBmaWxsPSIjRkZGRkZGIj48L3BhdGg+ICAgIDwvZz48L3N2Zz4="},4236:(e,t,n)=>{"use strict";e.exports=n.p+"img/background404-7cbee4be29173b045b3e.jpg"},4362:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankSwissArmyKnife-1600d89a247ad1dab4a9.svg"},4628:(e,t,n)=>{"use strict";e.exports=n.p+"img/formPositionRanked-376168a7e3c71ed7defd.png"},5095:(e,t,n)=>{"use strict";e.exports=n.p+"img/netflixWood-fa60c8d3bb65881cf071.jpg"},5376:(e,t,n)=>{"use strict";e.exports=n.p+"svg/sad-cbf74279d944b2baac65.svg"},5594:(e,t,n)=>{"use strict";e.exports=n.p+"img/member-7b0dc9a7cc229b5ba65b.png"},5682:()=>{},6041:(e,t,n)=>{"use strict";e.exports=n.p+"img/logoWeezeventSquare-9184b02c60dbc8695435.png"},6400:(e,t,n)=>{"use strict";e.exports=n.p+"img/weezConstruction-fb73dc7a26ba038c44b3.png"},6687:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankMessages-76d6e6c79babc98388e9.svg"},6751:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileJPG-aed94d931a32b62e488d.svg"},6954:(e,t,n)=>{"use strict";e.exports=n.p+"img/googleSatellite-0706bcb1678d6e9f219c.png"},6959:(e,t,n)=>{"use strict";e.exports=n.p+"svg/filePNG-c7dc0a7230035611ad34.svg"},7008:(e,t,n)=>{"use strict";e.exports=n.p+"img/accreditation-7f66e46aebab965fa566.png"},7524:(e,t,n)=>{"use strict";var i=n(4848);function a(...e){console.log(...e)}n(8630);var s,o,r,l=n(6540),d=n(3345),c=n(2347);function u(e){return(0,c.A)(e.normalize("NFD").replace(/\p{Diacritic}/gu,""))}function m(e){return(0,c.A)((e||"").trim().toLowerCase().normalize("NFD").replace(/\p{Diacritic}/gu,""))}function g(e,t={}){const n=t.replacer??o.Dash,i=u(e).trim().toLowerCase().replace(/['"]+/gi,"");let a;return a=n===o.Dash?i.replace(/[^a-z0-9\\-]+/gu,"-").replace(/-+$/,"").replace(/^-+/,""):n===o.Underscore?i.replace(/[^a-z0-9_]+/gu,"_").replace(/_+$/,"").replace(/^_+/,""):i.replace(/[^a-z0-9]+/gu,"").trim(),t?.replaceStartingNumber?a.replace(/^(\d)/,"_$1"):a}function h(e){return Array.isArray(e)&&"production"!==s.Production&&console.warn("Array passed to `isNonEmptyString()`, did you mean to use `isNonEmptyArray()` instead?"),"string"==typeof e&&e.trim().length>0}function p(e){return!h(e)}(r=s||(s={})).Development="development",r.Production="production",r.Test="test",function(e){e[e.Dash=0]="Dash",e[e.Empty=1]="Empty",e[e.Underscore=2]="Underscore"}(o||(o={}));const f=["hm","hrh","him","hih","hh","hsh","hgdh","kg","lg","kt","lt","sm","sar","sai","sas","sagd"],I=e=>h(e)?e[0].toUpperCase()+e.slice(1):"";function _(e){return(e??"").trim().toLowerCase().replace(/\s+/g," ").split(" ").map(e=>f.includes(e.toLowerCase())?e.toUpperCase():I(e.trim())).join(" ").split("-").map(e=>f.includes(e.toLowerCase())?e.toUpperCase():I(e.trim())).join("-")}function x(e,t){const n=(e,t,n,i,a)=>en?n+1:e+1:i===a?t:t+1;if(e===t)return 0;if(e.length>t.length){const n=e;e=t,t=n}let i=e.length,a=t.length;for(;i>0&&e.charCodeAt(i-1)===t.charCodeAt(a-1);)i--,a--;let s=0;for(;s{let t="$gray200",n="$2",i="$xs";if(h(e)){const a=function(e){if(e){const[t,n,i]=e.split(" ");return{borderColor:t,borderRadius:n,boxShadow:i}}return{}}(e);a.borderColor&&(t=`$${a.borderColor}`),a.borderRadius&&(n=`$${a.borderRadius}`),i=a.boxShadow?`$${a.boxShadow}`:void 0}return{borderColor:t,borderRadius:n,borderStyle:"solid",borderWidth:"1px",boxShadow:i}},clamp:e=>({display:"-webkit-box",overflow:"hidden","-webkit-line-clamp":e.toString(10),"-webkit-box-orient":"vertical"}),ellipsis:()=>({overflow:"hidden","text-overflow":"ellipsis","white-space":"nowrap"}),px:e=>({paddingLeft:e,paddingRight:e}),py:e=>({paddingBottom:e,paddingTop:e})}});C("weezcrew-theme",{});var R,D=n(8542);function O(e){return"string"==typeof e?e:"number"==typeof e?e<=1?100*e+"%":`${e}px`:void 0}function w(e){return(0,D.A)(e,["direction","align","justify","wrap","gap","css","height","width"])}!function(e){e.Nav="nav",e.Header="header",e.Footer="footer",e.Main="main",e.Section="section"}(R||(R={}));const P=j("div",{display:"flex",variants:{direction:{row:{flexDirection:"row"},column:{flexDirection:"column"},rowReverse:{flexDirection:"row-reverse"},columnReverse:{flexDirection:"column-reverse"}},align:{start:{alignItems:"flex-start"},center:{alignItems:"center"},end:{alignItems:"flex-end"},stretch:{alignItems:"stretch"},baseline:{alignItems:"baseline"}},justify:{start:{justifyContent:"flex-start"},center:{justifyContent:"center"},end:{justifyContent:"flex-end"},between:{justifyContent:"space-between"},evenly:{justifyContent:"space-evenly"}},wrap:{noWrap:{flexWrap:"nowrap"},wrap:{flexWrap:"wrap"},wrapReverse:{flexWrap:"wrap-reverse"}},gap:{1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},11:{gap:"$11"},12:{gap:"$12"},13:{gap:"$13"}}},defaultVariants:{direction:"row",align:"stretch",justify:"start",wrap:"noWrap"}}),$=l.forwardRef(({onClick:e,...t},n)=>{const a={};return t.height&&(a.height=O(t.height)),t.width&&(a.width=O(t.width)),(0,i.jsx)(P,{...t,ref:n,css:{...a,...t.css},onClick:e})});$.displayName="Flex";const k=j("p",{fontStyle:"normal",padding:"unset",margin:"unset",lineHeight:"1.42857143","& > *:not(ul)":{display:"inline"},variants:{textStyle:{inherit:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",lineHeight:"inherit"},heading:{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium",lineHeight:"1.55556"},smallcapsheading:{color:"$gray500",fontSize:"10px",lineHeigh:"24px",textTransform:"uppercase"},subheading:{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium",lineHeight:"1.5"},subtitle:{color:"$gray500",fontSize:"$textSm",fontWeight:"$regular",lineHeight:"1.42857"},bodyText:{color:"$gray800",fontSize:"$textSm"},abbreviation:{color:"$gray500",fontVariant:"small-caps",fontSize:"$textSm"}}},defaultVariants:{textStyle:"bodyText"}}),N=l.forwardRef(({children:e,...t},n)=>(0,i.jsx)(k,{ref:n,...t,children:e}));N.displayName="Text";const z=[];function L(e){return null==e?[]:Array.isArray(e)?e:[e]}function F(e){return Array.isArray(e)&&e.length>0}function U(e){return!F(e)}function B(e,t,n){const i=new Set(e);return n?i.add(t):i.delete(t),Array.from(i)}function V(e,t){return e.filter((e,n)=>n!==t)}var G,W,q,Y,H,Z,K,Q,X,J,ee,te,ne,ie,ae,se,oe,re,le,de,ce,ue,me,ge,he,pe,fe,Ie,_e,xe,ye,Se,je,ve,be,Ae,Ce,Ee,Te,Me,Re,De,Oe,we,Pe,$e,ke,Ne,ze,Le,Fe,Ue,Be,Ve,Ge,We,qe,Ye,He,Ze,Ke,Qe,Xe,Je,et,tt,nt,it,at,st,ot,rt,lt,dt,ct,ut,mt,gt,ht,pt,ft,It,_t,xt,yt,St,jt,vt,bt,At,Ct,Et,Tt,Mt,Rt,Dt,Ot,wt,Pt,$t,kt,Nt,zt,Lt,Ft,Ut,Bt,Vt,Gt,Wt,qt,Yt,Ht,Zt,Kt,Qt,Xt,Jt,en,tn,nn,an,sn,on,rn,ln,dn,cn,un,mn,gn,hn,pn,fn,In,_n,xn,yn,Sn,jn,vn,bn,An=n(1519);!function(e){e.Delegation="Delegation",e.DelegationCategory="DelegationCategory",e.Event="Event",e.Organization="Organization",e.Position="Position",e.PositionCategory="PositionCategory"}(G||(G={})),function(e){e.Calendar="Calendar",e.List="List",e.Radio="Radio"}(W||(W={})),(bn=q||(q={})).Acronym="Acronym",bn.Address="Address",bn.AutoAccredit="AutoAccredit",bn.Category="Category",bn.Color="Color",bn.Description="Description",bn.Icon="Icon",bn.Index="Index",bn.Latitude="Latitude",bn.Longitude="Longitude",bn.Name="Name",bn.Tag="Tag",bn.WeezeventIsSynchronized="WeezeventIsSynchronized",function(e){e.Accredited="Accredited",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(Y||(Y={})),function(e){e.Done="Done",e.Waiting="Waiting"}(H||(H={})),(vn=Z||(Z={})).Acronym="Acronym",vn.Category="Category",vn.Color="Color",vn.Description="Description",vn.Icon="Icon",vn.Name="Name",function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(K||(K={})),function(e){e.Accreditation="Accreditation",e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Date="Date",e.Id="Id",e.Name="Name"}(Q||(Q={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Index="Index",e.Name="Name"}(X||(X={})),function(e){e.Accredited="Accredited",e.AutoAccredited="AutoAccredited",e.NotApplicable="NotApplicable",e.Refused="Refused",e.WaitingAccreditation="WaitingAccreditation"}(J||(J={})),function(e){e.Car="Car",e.Moto="Moto"}(ee||(ee={})),function(e){e.Assigned="Assigned",e.Everyone="Everyone",e.Members="Members",e.Refused="Refused",e.Segments="Segments"}(te||(te={})),function(e){e.EventStart="EventStart",e.EventEnd="EventEnd"}(ne||(ne={})),function(e){e.Before="Before",e.After="After"}(ie||(ie={})),function(e){e.NoSchedule="NoSchedule",e.Datetime="Datetime",e.Anchor="Anchor"}(ae||(ae={})),function(e){e.InsertedAt="InsertedAt",e.Name="Name",e.State="State",e.Type="Type"}(se||(se={})),function(e){e.Done="Done",e.Draft="Draft",e.InProgress="InProgress",e.Scheduled="Scheduled",e.Template="Template"}(oe||(oe={})),function(e){e.Email="Email",e.Sms="Sms"}(re||(re={})),function(e){e.C10012713_1K="C10012713_1K",e.C10012713_2K="C10012713_2K",e.C10012713_3K="C10012713_3K",e.C10012713_4K="C10012713_4K",e.C10012713_5K="C10012713_5K",e.C10012713_6K="C10012713_6K",e.C10012713_7K="C10012713_7K",e.C10012713_1="C10012713_1",e.C10012713_2="C10012713_2",e.C10012713_3="C10012713_3",e.C10012713_4="C10012713_4",e.C10012713_5="C10012713_5",e.C10012713_6="C10012713_6",e.C10012713_7="C10012713_7",e.C10012717_1K="C10012717_1K",e.C10012717_2K="C10012717_2K",e.C10012717_3K="C10012717_3K",e.C10012717_4K="C10012717_4K",e.C10012717_5K="C10012717_5K",e.C10012717_6K="C10012717_6K",e.C10012717_7K="C10012717_7K",e.C10012717_1="C10012717_1",e.C10012717_2="C10012717_2",e.C10012717_3="C10012717_3",e.C10012717_4="C10012717_4",e.C10012717_5="C10012717_5",e.C10012717_6="C10012717_6",e.C10012717_7="C10012717_7",e.C10006995K="C10006995K",e.C10006995_1K="C10006995_1K",e.C10006995_2K="C10006995_2K",e.C10006995_3K="C10006995_3K",e.C10006995_4K="C10006995_4K",e.C10006995_5K="C10006995_5K",e.C10006995_6K="C10006995_6K",e.C10006995_7K="C10006995_7K",e.C10006995="C10006995",e.C10006995_1="C10006995_1",e.C10006995_2="C10006995_2",e.C10006995_3="C10006995_3",e.C10006995_4="C10006995_4",e.C10006995_5="C10006995_5",e.C10006995_6="C10006995_6",e.C10006995_7="C10006995_7",e.C10010951K="C10010951K",e.C10010951_1K="C10010951_1K",e.C10010951_2K="C10010951_2K",e.C10010951_3K="C10010951_3K",e.C10010951_4K="C10010951_4K",e.C10010951_5K="C10010951_5K",e.C10010951_6K="C10010951_6K",e.C10010951_7K="C10010951_7K",e.C10010951="C10010951",e.C10010951_1="C10010951_1",e.C10010951_2="C10010951_2",e.C10010951_3="C10010951_3",e.C10010951_4="C10010951_4",e.C10010951_5="C10010951_5",e.C10010951_6="C10010951_6",e.C10010951_7="C10010951_7",e.C10006999="C10006999",e.C10006999_1="C10006999_1",e.C10006999_2="C10006999_2",e.C10006999_3="C10006999_3",e.C10006999_4="C10006999_4",e.C10006999_5="C10006999_5",e.C10006999_6="C10006999_6",e.C10006999_7="C10006999_7",e.C10006999K="C10006999K",e.C10006999_1K="C10006999_1K",e.C10006999_2K="C10006999_2K",e.C10006999_3K="C10006999_3K",e.C10006999_4K="C10006999_4K",e.C10006999_5K="C10006999_5K",e.C10006999_6K="C10006999_6K",e.C10006999_7K="C10006999_7K",e.C10015355K="C10015355K",e.C10015355_1K="C10015355_1K",e.C10015355_2K="C10015355_2K",e.C10015355_3K="C10015355_3K",e.C10015355_4K="C10015355_4K",e.C10015355_5K="C10015355_5K",e.C10015355_6K="C10015355_6K",e.C10015355_7K="C10015355_7K",e.C10015355="C10015355",e.C10015355_1="C10015355_1",e.C10015355_2="C10015355_2",e.C10015355_3="C10015355_3",e.C10015355_4="C10015355_4",e.C10015355_5="C10015355_5",e.C10015355_6="C10015355_6",e.C10015355_7="C10015355_7"}(le||(le={})),(jn=de||(de={})).Waiting="Waiting",jn.CheckedIn="CheckedIn",jn.CheckedOut="CheckedOut",function(e){e.BreakTime="BreakTime",e.CheckIn="CheckIn",e.CheckInOut="CheckInOut",e.CheckOut="CheckOut",e.Reset="Reset"}(ce||(ce={})),function(e){e.And="And",e.Or="Or"}(ue||(ue={})),(Sn=me||(me={})).Animajeconvention="Animajeconvention",Sn.Asoassignment="Asoassignment",Sn.Hbcldc="Hbcldc",Sn.Hbclnh="Hbclnh",Sn.P2nassignment="P2nassignment",Sn.P2nassignmentmontagedemontage="P2nassignmentmontagedemontage",Sn.Paris20km="Paris20km",Sn.Paris20kmassignment="Paris20kmassignment",Sn.Paris20kmcontremarque="Paris20kmcontremarque",Sn.Playground="Playground",Sn.T24assignment="T24assignment",function(e){e.All="All",e.Public="Public",e.Private="Private"}(ge||(ge={})),(yn=he||(he={})).Category="Category",yn.Label="Label",yn.Name="Name",yn.Privacy="Privacy",function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Label="Label",e.Name="Name",e.Status="Status",e.Type="Type"}(pe||(pe={})),(xn=fe||(fe={})).Accreditation="Accreditation",xn.Delegation="Delegation",xn.Event="Event",xn.Position="Position",xn.UserInfo="UserInfo",(_n=Ie||(Ie={})).Campaigns="Campaigns",_n.CanLeadersAddMembers="CanLeadersAddMembers",_n.CanLeadersDeleteMembers="CanLeadersDeleteMembers",_n.CanLeadersDuplicateMembers="CanLeadersDuplicateMembers",_n.CanLeadersEditColumns="CanLeadersEditColumns",_n.CanLeadersEditCustomFields="CanLeadersEditCustomFields",_n.CanLeadersEditMembers="CanLeadersEditMembers",_n.CanLeadersImportMembers="CanLeadersImportMembers",_n.CanLeadersSeeHiddenAccreditationsSlots="CanLeadersSeeHiddenAccreditationsSlots",_n.Category="Category",_n.Columns="Columns",_n.DeadlineDate="DeadlineDate",_n.DelegationsSpaceLayout="DelegationsSpaceLayout",_n.Description="Description",_n.Documents="Documents",_n.Form="Form",_n.IsLocked="IsLocked",_n.MaxResources="MaxResources",_n.Name="Name",_n.Parent="Parent",_n.ShowAllAccreditations="ShowAllAccreditations",_n.ShowFormLinkInDelegationSpace="ShowFormLinkInDelegationSpace",_n.ShowInDelegationSpace="ShowInDelegationSpace",_n.Tag="Tag",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(_e||(_e={})),function(e){e.Done="Done",e.Waiting="Waiting"}(xe||(xe={})),function(e){e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.MaxResources="MaxResources",e.Name="Name"}(ye||(ye={})),(In=Se||(Se={})).Expired="Expired",In.Full="Full",In.Locked="Locked",In.Ongoing="Ongoing",function(e){e.Failed="FAILED",e.Pending="PENDING",e.Success="SUCCESS"}(je||(je={})),function(e){e.OnePerPage="OnePerPage",e.GroupedA4="GroupedA4"}(ve||(ve={})),function(e){e.Name="Name"}(be||(be={})),function(e){e.AsoPaxManifest="AsoPaxManifest",e.Assignments="Assignments",e.Badge="Badge",e.Certificate="Certificate",e.CustomBadge="CustomBadge",e.DelegationCalendar="DelegationCalendar",e.Planning="Planning",e.Position="Position",e.PositionPlanning="PositionPlanning",e.PositionsVolunteersPlanning="PositionsVolunteersPlanning",e.UserCustomDocument="UserCustomDocument",e.UserHours="UserHours",e.UserPlanning="UserPlanning",e.UserPlanningDays="UserPlanningDays",e.UserPlanningList="UserPlanningList",e.UsersPictures="UsersPictures",e.VolunteersListing="VolunteersListing"}(Ae||(Ae={})),function(e){e.Bounced="Bounced",e.Delivered="Delivered",e.Opened="Opened",e.Queued="Queued",e.Sent="Sent",e.Waiting="Waiting"}(Ce||(Ce={})),function(e){e.DoesNotExist="DoesNotExist",e.NotVerified="NotVerified",e.Verified="Verified"}(Ee||(Ee={})),(fn=Te||(Te={})).Accreditations="Accreditations",fn.AccreditationsImport="AccreditationsImport",fn.AccreditationsProfilesImport="AccreditationsProfilesImport",fn.AccreditationsRefused="AccreditationsRefused",fn.Assignments="Assignments",fn.Campaign="Campaign",fn.Code="Code",fn.DelegationCategoryLeaderAssign="DelegationCategoryLeaderAssign",fn.DelegationFormInvite="DelegationFormInvite",fn.DelegationLeaderAssign="DelegationLeaderAssign",fn.DelegationsImport="DelegationsImport",fn.Documents="Documents",fn.EventInvite="EventInvite",fn.EventsImport="EventsImport",fn.Export="Export",fn.FilesImport="FilesImport",fn.FormInvite="FormInvite",fn.FormSubmit="FormSubmit",fn.MembersImport="MembersImport",fn.NewMember="NewMember",fn.NotifyLeaders="NotifyLeaders",fn.OrganizationInvite="OrganizationInvite",fn.PositionCategoryLeaderAssign="PositionCategoryLeaderAssign",fn.PositionLeaderAssign="PositionLeaderAssign",fn.PositionsImport="PositionsImport",fn.Refused="Refused",fn.VolunteerRegistration="VolunteerRegistration",function(e){e.Description="Description",e.EndAt="EndAt",e.Name="Name",e.StartAt="StartAt",e.Tag="Tag"}(Me||(Me={})),function(e){e.Done="Done",e.Waiting="Waiting"}(Re||(Re={})),function(e){e.CreatedAt="CreatedAt",e.EndAt="EndAt",e.Id="Id",e.Name="Name",e.StartAt="StartAt"}(De||(De={})),(pn=Oe||(Oe={})).Archived="Archived",pn.Done="Done",pn.Ongoing="Ongoing",pn.Upcoming="Upcoming",function(e){e.Excel="Excel",e.Csv="CSV"}(we||(we={})),function(e){e.Done="Done",e.Waiting="Waiting"}(Pe||(Pe={})),function(e){e.Accreditation="Accreditation",e.Api="Api",e.Beta="Beta",e.Community="Community",e.Criblage="Criblage",e.CustomDocument="CustomDocument",e.Delegation="Delegation",e.Documents="Documents",e.Eid="Eid",e.KmlImport="KmlImport",e.Languages="Languages",e.Multiform="Multiform",e.Skidata="Skidata",e.Sms="Sms",e.Weezevent="Weezevent",e.Zapier="Zapier"}($e||($e={})),(hn=ke||(ke={})).BirthCity="birthCity",hn.BirthCountry="birthCountry",hn.BirthPostalCode="birthPostalCode",hn.City="city",hn.Country="country",hn.Custom="custom",hn.DateOfBirth="dateOfBirth",hn.Eid="eid",hn.FirstName="firstName",hn.Language="language",hn.LastName="lastName",hn.Nationality="nationality",hn.Phone="phone",hn.Picture="picture",hn.Population="population",hn.PostalCode="postalCode",hn.Sex="sex",hn.Street="street",function(e){e.Freeform="Freeform",e.Iban="Iban",e.Avs="Avs",e.Eid="Eid"}(Ne||(Ne={})),(gn=ze||(ze={})).Address="Address",gn.Checkbox="Checkbox",gn.Country="Country",gn.Date="Date",gn.Datetime="Datetime",gn.File="File",gn.Language="Language",gn.Nationality="Nationality",gn.Number="Number",gn.Phone="Phone",gn.Select="Select",gn.Sex="Sex",gn.Text="Text",gn.Textarea="Textarea",gn.Time="Time",gn.Validation="Validation",function(e){e.Done="Done",e.Waiting="Waiting"}(Le||(Le={})),function(e){e.Default="Default",e.Picture="Picture"}(Fe||(Fe={})),function(e){e.Address="Address",e.Campaign="Campaign",e.Checkbox="Checkbox",e.Country="Country",e.Date="Date",e.DateTimeRange="DateTimeRange",e.Datetime="Datetime",e.File="File",e.Language="Language",e.Nationality="Nationality",e.Number="Number",e.Phone="Phone",e.Select="Select",e.Sex="Sex",e.Text="Text",e.Textarea="Textarea",e.Time="Time",e.Validation="Validation"}(Ue||(Ue={})),(mn=Be||(Be={})).Field="Field",mn.Section="Section",mn.Text="Text",function(e){e.Ranked="Ranked",e.Unranked="Unranked"}(Ve||(Ve={})),function(e){e.Admin="Admin",e.DelegationsSpace="DelegationsSpace",e.Form="Form"}(Ge||(Ge={})),function(e){e.CloseWhenEventDone="CloseWhenEventDone",e.Closed="Closed",e.ClosedAt="ClosedAt",e.Open="Open"}(We||(We={})),function(e){e.Backpack="Backpack",e.BadgeCheck="BadgeCheck",e.BagShopping="BagShopping",e.Bed="Bed",e.BedBunk="BedBunk",e.Bicycle="Bicycle",e.BriefcaseMedical="BriefcaseMedical",e.BurgerSoda="BurgerSoda",e.CakeCandles="CakeCandles",e.Camera="Camera",e.Car="Car",e.CircleParking="CircleParking",e.CircleQuestion="CircleQuestion",e.Computer="Computer",e.Droplet="Droplet",e.ForkKnife="ForkKnife",e.HatCowboy="HatCowboy",e.House="House",e.LocationDot="LocationDot",e.MartiniGlass="MartiniGlass",e.Megaphone="Megaphone",e.Motorcycle="Motorcycle",e.PersonBiking="PersonBiking",e.PersonHiking="PersonHiking",e.Phone="Phone",e.ScrewdriverWrench="ScrewdriverWrench",e.Shirt="Shirt",e.SignsPost="SignsPost",e.Star="Star",e.Ticket="Ticket",e.UserPolice="UserPolice",e.WalkieTalkie="WalkieTalkie"}(qe||(qe={})),function(e){e.Create="Create",e.Upsert="Upsert",e.Update="Update"}(Ye||(Ye={})),function(e){e.Overdue="Overdue",e.Paid="Paid",e.Refunded="Refunded",e.Waiting="Waiting",e.WrittenOff="WrittenOff"}(He||(He={})),function(e){e.Mandarin="Mandarin",e.Spanish="Spanish",e.English="English",e.Hindi="Hindi",e.Bengali="Bengali",e.Portuguese="Portuguese",e.Russian="Russian",e.Japanese="Japanese",e.Punjabi="Punjabi",e.Turkish="Turkish",e.Korean="Korean",e.French="French",e.German="German",e.Vietnamese="Vietnamese",e.Tamil="Tamil",e.Urdu="Urdu",e.Javanese="Javanese",e.Italian="Italian",e.Persian="Persian",e.Polish="Polish",e.Ukrainian="Ukrainian",e.Romanian="Romanian",e.Dutch="Dutch"}(Ze||(Ze={})),function(e){e.Default="Default",e.Dot="Dot",e.Badge="Badge"}(Ke||(Ke={})),function(e){e.App="App",e.DelegationsSpace="DelegationsSpace",e.MembersSpace="MembersSpace",e.VolunteerAssignments="VolunteerAssignments",e.VolunteerRegister="VolunteerRegister"}(Qe||(Qe={})),function(e){e.Google="Google",e.GoogleSatellite="GoogleSatellite",e.IgnPlan="IgnPlan"}(Xe||(Xe={})),function(e){e.Add="Add",e.Delete="Delete",e.Replace="Replace"}(Je||(Je={})),function(e){e.Add="Add",e.Replace="Replace",e.Reset="Reset"}(et||(et={})),function(e){e.Categories="Categories",e.Positions="Positions"}(tt||(tt={})),(un=nt||(nt={})).Both="Both",un.Event="Event",un.Organization="Organization",function(e){e.Id="Id",e.InsertedAt="InsertedAt",e.PeriodEndAt="PeriodEndAt",e.WeezeventOrganizationId="WeezeventOrganizationId"}(it||(it={})),function(e){e.A4Portrait="A4Portrait",e.A4Landscape="A4Landscape",e.A5Portrait="A5Portrait",e.A6Portrait="A6Portrait"}(at||(at={})),function(e){e.List="List",e.Radio="Radio"}(st||(st={})),(cn=ot||(ot={})).Acronym="Acronym",cn.Address="Address",cn.Category="Category",cn.Color="Color",cn.Description="Description",cn.Icon="Icon",cn.Latitude="Latitude",cn.Layer="Layer",cn.Longitude="Longitude",cn.Name="Name",cn.Tag="Tag",cn.Traces="Traces",cn.WeezeventIsSynchronized="WeezeventIsSynchronized",cn.Zoom="Zoom",function(e){e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name"}(rt||(rt={})),function(e){e.Done="Done",e.Waiting="Waiting"}(lt||(lt={})),function(e){e.EndDate="EndDate",e.EndTime="EndTime",e.Resources="Resources",e.StartDate="StartDate",e.StartTime="StartTime"}(dt||(dt={})),function(e){e.Add="Add",e.Replace="Replace",e.Subtract="Subtract"}(ct||(ct={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Position="Position",e.Range="Range"}(ut||(ut={})),function(e){e.Acronym="Acronym",e.Category="Category",e.CreatedAt="CreatedAt",e.Id="Id",e.Name="Name",e.Slot="Slot"}(mt||(mt={})),function(e){e.Empty="Empty",e.Partial="Partial",e.Full="Full"}(gt||(gt={})),function(e){e.Between="between",e.Contains="contains",e.EndsWith="endsWith",e.EngulfedBy="engulfedBy",e.Engulfs="engulfs",e.GreaterThan="greaterThan",e.GreaterThanEqual="greaterThanEqual",e.Is="is",e.IsAfter="isAfter",e.IsBefore="isBefore",e.IsEmpty="isEmpty",e.IsInLast="isInLast",e.IsInNext="isInNext",e.IsMoreThanAgo="isMoreThanAgo",e.IsMoreThanAhead="isMoreThanAhead",e.IsNot="isNot",e.IsNotEmpty="isNotEmpty",e.IsNotValid="isNotValid",e.IsValid="isValid",e.LessThan="lessThan",e.LessThanEqual="lessThanEqual",e.NotContains="notContains",e.NotEngulfedBy="notEngulfedBy",e.NotEngulfs="notEngulfs",e.NotOverlaps="notOverlaps",e.Overlaps="overlaps",e.StartsWith="startsWith",e.ThisDayMonth="thisDayMonth",e.Today="today"}(ht||(ht={})),function(e){e.And="and",e.Or="or"}(pt||(pt={})),function(e){e.EventNotLinked="EventNotLinked",e.GroupsUnreachable="GroupsUnreachable",e.GroupNotFound="GroupNotFound",e.Unexpected="Unexpected"}(ft||(ft={})),function(e){e.Paper="Paper",e.Ticket="Ticket",e.Wristband="Wristband"}(It||(It={})),function(e){e.OrganizationNotLinked="OrganizationNotLinked",e.PartnersUnreachable="PartnersUnreachable",e.PartnerNotFound="PartnerNotFound",e.EventNotLinked="EventNotLinked",e.GroupsUnreachable="GroupsUnreachable",e.GroupNotFound="GroupNotFound",e.DocumentNotFound="DocumentNotFound"}(_t||(_t={})),function(e){e.ActivationRange="ActivationRange",e.CreatedAt="CreatedAt",e.Document="Document",e.Id="Id",e.MediaType="MediaType",e.PrinterGroup="PrinterGroup",e.Status="Status",e.WeezaccessPartner="WeezaccessPartner"}(xt||(xt={})),function(e){e.Active="Active",e.Past="Past",e.Upcoming="Upcoming"}(yt||(yt={})),function(e){e.Accreditation="Accreditation",e.None="None"}(St||(St={})),function(e){e.AllDays="AllDays",e.DaysWithSlots="DaysWithSlots"}(jt||(jt={})),function(e){e.Category="Category",e.Position="Position",e.Slot="Slot",e.None="None"}(vt||(vt={})),function(e){e.FilterWithSlots="FilterWithSlots",e.None="None"}(bt||(bt={})),(dn=At||(At={})).Calendar="Calendar",dn.Custom="Custom",dn.Display="Display",dn.DisplayDays="DisplayDays",dn.Hide="Hide",(ln=Ct||(Ct={})).DelegationCategory="DelegationCategory",ln.Event="Event",ln.Organization="Organization",ln.Position="Position",function(e){e.Custom="Custom",e.DelegationCategoryLeader="DelegationCategoryLeader",e.EventAdmin="EventAdmin",e.EventReader="EventReader",e.OrganizationAdmin="OrganizationAdmin",e.OrganizationReader="OrganizationReader",e.PositionEditor="PositionEditor",e.PositionReader="PositionReader"}(Et||(Et={})),function(e){e.Accreditations="Accreditations",e.AccreditationsProfiles="AccreditationsProfiles",e.Campaigns="Campaigns",e.CustomFields="CustomFields",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.Volunteers="Volunteers",e.Workflows="Workflows"}(Tt||(Tt={})),function(e){e.Female="Female",e.Male="Male",e.Nonbinary="Nonbinary",e.Notsay="Notsay",e.Other="Other"}(Mt||(Mt={})),function(e){e.Asc="Asc",e.Desc="Desc"}(Rt||(Rt={})),function(e){e.DelegationSpace="DelegationSpace",e.EventsShowcase="EventsShowcase",e.MembersSpace="MembersSpace"}(Dt||(Dt={})),(rn=Ot||(Ot={})).De="De",rn.En="En",rn.Es="Es",rn.Fr="Fr",rn.Keys="Keys",rn.Nl="Nl",function(e){e.Accreditations="Accreditations",e.Delegations="Delegations",e.Events="Events",e.Positions="Positions",e.UsersInfos="UsersInfos"}(wt||(wt={})),function(e){e.WithReplies="WithReplies",e.WithUnreadReplies="WithUnreadReplies",e.WithoutReplies="WithoutReplies"}(Pt||(Pt={})),function(e){e.Delivered="Delivered",e.InvalidNumber="InvalidNumber",e.Other="Other",e.Refused="Refused",e.Sent="Sent",e.Undelivered="Undelivered",e.Waiting="Waiting"}($t||($t={})),function(e){e.None="None",e.Backward="Backward",e.Forward="Forward"}(kt||(kt={})),function(e){e.Accreditation="Accreditation",e.CustomField="CustomField",e.CustomSlot="CustomSlot",e.Delegation="Delegation",e.Document="Document",e.Email="Email",e.Event="Event",e.Form="Form",e.Other="Other",e.Position="Position"}(Nt||(Nt={})),function(e){e.NotTranslated="NotTranslated",e.Translated="Translated",e.TranslatedAndNotTranslated="TranslatedAndNotTranslated"}(zt||(zt={})),function(e){e.String="String",e.StringArray="StringArray",e.RichText="RichText"}(Lt||(Lt={})),function(e){e.Admin="Admin",e.Leader="Leader"}(Ft||(Ft={})),function(e){e.Email="Email",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LastSeenAt="LastSeenAt",e.LocalId="LocalId",e.Name="Name",e.UpdatedAt="UpdatedAt"}(Ut||(Ut={})),(on=Bt||(Bt={})).Assigned="Assigned",on.NotApplicable="NotApplicable",on.PreAssigned="PreAssigned",on.Refused="Refused",on.WaitingAssignment="WaitingAssignment",function(e){e.Done="Done",e.Waiting="Waiting"}(Vt||(Vt={})),function(e){e.AccreditationState="AccreditationState",e.Delegation="Delegation",e.Email="Email",e.FirstName="FirstName",e.Id="Id",e.InsertedAt="InsertedAt",e.LastName="LastName",e.LocalId="LocalId",e.Name="Name",e.OrganizationLocalId="OrganizationLocalId",e.PairedAt="PairedAt",e.State="State",e.TeamCode="TeamCode",e.UpdatedAt="UpdatedAt"}(Gt||(Gt={})),function(e){e.OrganizationNotLinked="OrganizationNotLinked",e.PartnersUnreachable="PartnersUnreachable",e.PartnerNotFound="PartnerNotFound",e.Unexpected="Unexpected"}(Wt||(Wt={})),(sn=qt||(qt={})).AddAccreditations="AddAccreditations",sn.AddDelegationPermissions="AddDelegationPermissions",sn.AddEvent="AddEvent",sn.AddPositions="AddPositions",sn.CreateDelegation="CreateDelegation",sn.DeleteAccreditations="DeleteAccreditations",sn.DeleteDelegationPermissions="DeleteDelegationPermissions",sn.DeletePositions="DeletePositions",sn.DuplicateMember="DuplicateMember",sn.LockDelegation="LockDelegation",sn.SendCampaign="SendCampaign",sn.SetCustomField="SetCustomField",sn.UnlockDelegation="UnlockDelegation",(an=Yt||(Yt={})).EveryMinute="EveryMinute",an.Every2Minutes="Every2Minutes",an.Every5Minutes="Every5Minutes",an.Every10Minutes="Every10Minutes",function(e){e.Revert="Revert",e.Keep="Keep"}(Ht||(Ht={})),(nn=Zt||(Zt={})).Frequency="Frequency",nn.Name="Name",nn.State="State",function(e){e.DelegationsLeaders="DelegationsLeaders",e.PositionsLeaders="PositionsLeaders",e.UsersInfosIds="UsersInfosIds",e.View="View"}(Kt||(Kt={})),function(e){e.CreatedAt="CreatedAt",e.ExecutedAt="ExecutedAt",e.Id="Id",e.Name="Name",e.VolunteersSegment="VolunteersSegment"}(Qt||(Qt={})),(tn=Xt||(Xt={})).Active="Active",tn.Error="Error",tn.Paused="Paused",(en=Jt||(Jt={})).Assigned="Assigned",en.DelegationsSegment="DelegationsSegment",en.FormSubmit="FormSubmit",en.VolunteersSegment="VolunteersSegment",Object.keys(G);const Cn=Object.keys(W),En=(Object.keys(q),Object.keys(Y),Object.keys(H),Object.keys(Z),Object.keys(K),Object.keys(Q),Object.keys(X),Object.keys(J)),Tn=(Object.keys(ee),Object.keys(te),Object.keys(ne)),Mn=Object.keys(ie),Rn=(Object.keys(ae),Object.keys(se),Object.keys(oe)),Dn=Object.keys(re),On=(Object.keys(le),Object.keys(de)),wn=(Object.keys(ce),Object.keys(ue),Object.keys(me)),Pn=(Object.keys(ge),Object.keys(he),Object.keys(pe),Object.keys(fe)),$n=(Object.keys(Ie),Object.keys(_e),Object.keys(xe),Object.keys(ye),Object.keys(Se)),kn=(Object.keys(je),Object.keys(ve),Object.keys(be),Object.keys(Ae),Object.keys(Ce)),Nn=(Object.keys(Ee),Object.keys(Te)),zn=(Object.keys(Me),Object.keys(Re),Object.keys(De),Object.keys(Oe),Object.keys(we),Object.keys(Pe),Object.keys($e)),Ln=(Object.keys(ke),Object.keys(Ne)),Fn=Object.keys(ze),Un=(Object.keys(Le),Object.keys(Fe)),Bn=(Object.keys(Ue),Object.keys(Be),Object.keys(Ve)),Vn=(Object.keys(Ge),Object.keys(We)),Gn=Object.keys(qe),Wn=Object.keys(Ye),qn=(Object.keys(He),Object.keys(Ze)),Yn=Object.keys(Ke),Hn=(Object.keys(Qe),Object.keys(Xe)),Zn=Object.keys(Je),Kn=Object.keys(et),Qn=Object.keys(tt),Xn=(Object.keys(nt),Object.keys(it),Object.keys(at),Object.keys(st)),Jn=(Object.keys(ot),Object.keys(rt),Object.keys(lt),Object.keys(dt)),ei=Object.keys(ct),ti=(Object.keys(ut),Object.keys(mt),Object.keys(gt)),ni=(Object.keys(ht),Object.keys(pt),Object.keys(ft),Object.keys(It),Object.keys(_t),Object.keys(xt),Object.keys(yt),Object.keys(St)),ii=Object.keys(jt),ai=Object.keys(vt),si=Object.keys(bt),oi=Object.keys(At),ri=Object.keys(Ct),li=(Object.keys(Et),Object.keys(Tt),Object.keys(Mt)),di=(Object.keys(Rt),Object.keys(Dt),Object.keys(Ot),Object.keys(wt),Object.keys(Pt),Object.keys($t)),ci=(Object.keys(kt),Object.keys(Nt),Object.keys(zt),Object.keys(Lt),Object.keys(Ft),Object.keys(Ut),Object.keys(Bt)),ui=(Object.keys(Vt),Object.keys(Gt),Object.keys(Wt),Object.keys(qt)),mi=Object.keys(Yt),gi=Object.keys(Ht),hi=(Object.keys(Zt),Object.keys(Kt)),pi=(Object.keys(Qt),Object.keys(Xt)),fi=Object.keys(Jt),Ii=["insertedAt","updatedAt","checkInAt","date","sentAt","scheduledAt","deletedAt","lockedAt","bouncedAt","complaintAt","deliveredAt","rejectedAt","openedAt","clickedAt","queuedAt","closedAt","periodEndAt","checkOutAt","validatedAt","receptionDate","startAt","termsAcceptedAt","lastSeenAt","registrationDate","pairedAt","executedAt"],_i=["date","calendarInviteStartDate","calendarInviteEndDate","startDate","endDate","deadlineDate","minAccreditationSlotDate","startAt","endAt","paidAt"],xi=["range","ranges","activationRange"],yi=["assignedDuration","duration"];let Si=class{language;translations;constructor(e,t){this.language=e,this.translations=t}translate(e,...t){if("production"!==s.Test||process.env.JEST_WORKER_ID){let n=this.translations[e]||e;const i=this.translations[`${e}_plural`];return i&&"number"==typeof t[0]&&t[0]>1&&(n=i),Array.isArray(t)&&t.length>0&&(n=t.reduce((e,t,n)=>e.replaceAll(`{${n+1}}`,t),n)),n}return`${e} - ${JSON.stringify(t)}`}*interpolateWithComponents(e,...t){let n=0;for(const[a,s]of e.split(/{\d+}/).entries())n>0&&(yield(0,i.jsx)(l.Fragment,{children:t[a-1]},n)),n++,yield s}formatListValues(e,t="disjunction"){return new Intl.ListFormat(this.language.toLowerCase(),{style:"long",type:t}).format(e)}};Si=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[String,Object])],Si);const ji=(0,l.createContext)({}),vi=ji.Consumer;function bi(e){return(0,l.useContext)(ji).container.get(e)}function Ai(){const e=(0,l.useContext)(ji).container.get(Si);return e.translate.bind(e)}function Ci(){const e=(0,l.useContext)(ji).container.get(Si);return e.interpolateWithComponents.bind(e)}function Ei(e,t,n=[]){const i="production"!==s.Test?e:e.loc.source.body;return(0,l.useContext)(ji).useQuery(i,t,n)}function Ti(e,t={}){return(0,l.useContext)(ji).useMutation(e,t)}function Mi(){return(0,l.useContext)(ji).useParams()}function Ri(){return(0,l.useContext)(ji).useHistory()}function Di(){return(0,l.useContext)(ji).useLocalStorage()}var Oi=n(5126);function wi(e){if(e){const[t,n,i]=e.split(" ");return{color:t,fontSize:n,fontWeight:i}}return{}}const Pi=j("div",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},grayCustom50:{color:"$grayCustom50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},grayCustom500:{color:"$grayCustom500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},grayCustom700:{color:"$grayCustom700"},gray800:{color:"$gray800"},grayCustom800:{color:"$grayCustom800"},gray900:{color:"$gray900"},grayCustom900:{color:"$grayCustom900"},grayDark50:{color:"$grayDark50"},grayDark100:{color:"$grayDark100"},grayDark500:{color:"$grayDark500"},grayDark700:{color:"$grayDark700"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primaryCustom500:{color:"$primaryCustom500"},primary600:{color:"$primary600"},primaryCustom600:{color:"$primaryCustom600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},primary950:{color:"$primary950"},error25:{color:"$error25"},error50:{color:"$error50"},error100:{color:"$error100"},error200:{color:"$error200"},error300:{color:"$error300"},error400:{color:"$error400"},error500:{color:"$error500"},error600:{color:"$error600"},error700:{color:"$error700"},error800:{color:"$error800"},error900:{color:"$error900"},warning25:{color:"$warning25"},warning50:{color:"$warning50"},warning100:{color:"$warning100"},warning200:{color:"$warning200"},warning300:{color:"$warning300"},warning400:{color:"$warning400"},warning500:{color:"$warning500"},warning600:{color:"$warning600"},warning700:{color:"$warning700"},warning800:{color:"$warning800"},warning900:{color:"$warning900"},success25:{color:"$success25"},success50:{color:"$success50"},success100:{color:"$success100"},success200:{color:"$success200"},success300:{color:"$success300"},success400:{color:"$success400"},success500:{color:"$success500"},success600:{color:"$success600"},success700:{color:"$success700"},success800:{color:"$success800"},success900:{color:"$success900"},blue25:{color:"$blue25"},blue50:{color:"$blue50"},blue100:{color:"$blue100"},blue200:{color:"$blue200"},blue300:{color:"$blue300"},blue400:{color:"$blue400"},blue500:{color:"$blue500"},blue600:{color:"$blue600"},blue700:{color:"$blue700"},blue800:{color:"$blue800"},blue900:{color:"$blue900"},blueGray25:{color:"$blueGray25"},blueGray50:{color:"$blueGray50"},blueGray100:{color:"$blueGray100"},blueGray200:{color:"$blueGray200"},blueGray300:{color:"$blueGray300"},blueGray400:{color:"$blueGray400"},blueGray500:{color:"$blueGray500"},blueGray600:{color:"$blueGray600"},blueGray700:{color:"$blueGray700"},blueGray800:{color:"$blueGray800"},blueGray900:{color:"$blueGray900"},blueLight50:{color:"$blueLight50"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight500:{color:"$blueLight500"},blueLight600:{color:"$blueLight600"},blueLight700:{color:"$blueLight700"},blueLight900:{color:"$blueLight900"},purple25:{color:"$purple25"},purple50:{color:"$purple50"},purple100:{color:"$purple100"},purple200:{color:"$purple200"},purple300:{color:"$purple300"},purple400:{color:"$purple400"},purple500:{color:"$purple500"},purple600:{color:"$purple600"},purple700:{color:"$purple700"},purple800:{color:"$purple800"},purple900:{color:"$purple900"},purpleLight50:{color:"$purpleLight50"},purpleLight100:{color:"$purpleLight100"},purpleLight500:{color:"$purpleLight500"},purpleLight700:{color:"$purpleLight700"},purpleDark50:{color:"$purpleDark50"},purpleDark100:{color:"$purpleDark100"},purpleDark500:{color:"$purpleDark500"},purpleDark700:{color:"$purpleDark700"},pink25:{color:"$pink25"},pink50:{color:"$pink50"},pink100:{color:"$pink100"},pink200:{color:"$pink200"},pink300:{color:"$pink300"},pink400:{color:"$pink400"},pink500:{color:"$pink500"},pink600:{color:"$pink600"},pink700:{color:"$pink700"},pink800:{color:"$pink800"},pink900:{color:"$pink900"},orange50:{color:"$orange50"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange500:{color:"$orange500"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},redLight50:{color:"$redLight50"},redLight100:{color:"$redLight100"},redLight500:{color:"$redLight500"},redLight700:{color:"$redLight700"},redDark50:{color:"$redDark50"},redDark100:{color:"$redDark100"},redDark500:{color:"$redDark500"},redDark700:{color:"$redDark700"},green50:{color:"$green50"},green100:{color:"$green100"},green500:{color:"$green500"},green700:{color:"$green700"},greenDark50:{color:"$greenDark50"},greenDark100:{color:"$greenDark100"},greenDark500:{color:"$greenDark500"},greenDark700:{color:"$greenDark700"},brown50:{color:"$brown50"},brown100:{color:"$brown100"},brown500:{color:"$brown500"},brown700:{color:"$brown700"},indigo100:{color:"$indigo100"},indigo600:{color:"$indigo600"},white:{color:"white"}},fontSize:{inherit:{fontSize:"inherit"},textXs:{fontSize:"$textXs"},textSm:{fontSize:"$textSm"},textMd:{fontSize:"$textMd"},textLg:{fontSize:"$textLg"},textXl:{fontSize:"$textXl"},displayXs:{fontSize:"$displayXs"},displaySm:{fontSize:"$displaySm"},displayMd:{fontSize:"$displayMd"},displayLg:{fontSize:"$displayLg"},displayXl:{fontSize:"$displayXl"},display2Xl:{fontSize:"$display2Xl"}},fontWeight:{inherit:{fontWeight:"inherit"},regular:{fontWeight:"$regular"},medium:{fontWeight:"$medium"},semiBold:{fontWeight:"$semiBold"},bold:{fontWeight:"$bold"}},textAlign:{start:{textAlign:"start"},end:{textAlign:"end"},center:{textAlign:"center"},justify:{textAlign:"justify"}},ellipsis:{true:{ellipsis:""}}},defaultVariants:{color:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start"}}),$i=l.forwardRef((e,t)=>{const n={};return e.height&&(n.height=O(e.height)),e.width&&(n.width=O(e.width)),(0,i.jsx)(Pi,{...(0,Oi.A)(e,"font"),...wi(e.font),ref:t,css:{...n,...e.css}})});$i.displayName="Box";var ki=n(8174),Ni=n(4625),zi=n(9191);function Li(e){try{return Buffer.from(e,"base64").toString()}catch{try{return atob(e)}catch{return""}}}class Fi extends URL{subdomain;basename;constructor(e,t,n,i){if(n&&("string"==typeof e?e=`${n}.${e}`:"object"==typeof e&&(e.host=`${n}.${e.host}`)),i&&("string"==typeof e?e=`${e}/${i}`:"object"==typeof e&&(e.pathname=`/${i}`)),!URL.canParse(e)&&(e=`https://${e}`,!URL.canParse(e)))throw new Error(`Invalid URL ${e}`);super(e,t),this.subdomain=n,this.basename=i}set pathname(e){super.pathname=`${this.basename?this.basename:""}${e}`}get pathname(){return"/"!==super.pathname?super.pathname:""}get pathnameOptional(){return"/"!==super.pathname?super.pathname:void 0}get href(){return"/"!==super.pathname?super.href:super.href.substring(0,super.href.length-1)}toString(){return this.href}}const Ui="undefined"!=typeof process&&h(process?.env?.SECRETS_PATH)?process.env.SECRETS_PATH:null,Bi="undefined"!=typeof process?(0,zi.existsSync)(`${Ui}/HEAVENT_SECRETS`)?JSON.parse(Li((0,zi.readFileSync)(`${Ui}/HEAVENT_SECRETS`,"utf-8"))):h(process?.env?.HEAVENT_SECRETS)?JSON.parse(Li(process.env.HEAVENT_SECRETS)):null:null,Vi=e=>{if("object"==typeof window&&void 0!==window[e])return window[e];if(void 0!==Bi?.[e])return Bi[e];throw new Error(`Missing env. var. ${e}`)},Gi=e=>"object"==typeof window&&void 0!==window[e]?window[e]:void 0!==Bi?.[e]?Bi[e]:void 0,Wi=e=>{const t=Vi(e);return"boolean"==typeof t?t:"true"===t},qi=Vi("HEAVENT_APPLICATION_DOMAIN"),Yi=Gi("HEAVENT_RESOURCES_DOMAIN")??qi,Hi=Gi("HEAVENT_ASSETS_DOMAIN")??Yi,Zi=Gi("HEAVENT_APP_SUBDOMAIN")??"admin",Ki=Gi("HEAVENT_API_SUBDOMAIN")??"api",Qi=Gi("HEAVENT_PUBLIC_SUBDOMAIN")??"widget",Xi=Gi("HEAVENT_INVOICES_SUBDOMAIN")??"invoices",Ji=Gi("HEAVENT_ASSETS_SUBDOMAIN")??"assets",ea=Gi("HEAVENT_UPLOADS_SUBDOMAIN")??"uploads",ta=Gi("HEAVENT_APPLICATION_BASENAME")??"crew",na=Gi("HEAVENT_RESOURCES_BASENAME")??"",ia={ADMINS:Vi("HEAVENT_ADMINS"),EMAIL_FROM:Vi("HEAVENT_EMAIL_FROM"),EMAIL_FROM_NAME:Vi("HEAVENT_EMAIL_FROM_NAME"),EMAIL_PICTURE_LINK:Vi("HEAVENT_EMAIL_PICTURE_LINK"),HEAVENT_APPLICATION_DOMAIN:qi,HEAVENT_RESOURCES_DOMAIN:Yi,HEAVENT_ASSETS_DOMAIN:Hi,HEAVENT_APPLICATION_BASENAME:ta,HEAVENT_APP_URL:new Fi(Gi("HEAVENT_APP_DOMAIN")??qi,void 0,Zi,Gi("HEAVENT_APP_BASENAME")??ta),HEAVENT_API_URL:new Fi(Gi("HEAVENT_API_DOMAIN")??qi,void 0,Ki,Gi("HEAVENT_API_BASENAME")??ta),HEAVENT_PUBLIC_URL:new Fi(Gi("HEAVENT_PUBLIC_DOMAIN")??qi,void 0,Qi,Gi("HEAVENT_PUBLIC_BASENAME")??ta),HEAVENT_ASSETS_URL:new Fi(Hi,void 0,Ji,Gi("HEAVENT_ASSETS_BASENAME")??na),HEAVENT_INVOICES_URL:new Fi(Gi("HEAVENT_INVOICES_DOMAIN")??Yi,void 0,Xi,Gi("HEAVENT_INVOICES_BASENAME")??na),HEAVENT_UPLOADS_URL:new Fi(Gi("HEAVENT_UPLOADS_DOMAIN")??Yi,void 0,ea,Gi("HEAVENT_UPLOADS_BASENAME")??na),USE_HUBSPOT:Wi("HEAVENT_USE_HUBSPOT"),USE_INTERCOM:Wi("HEAVENT_USE_INTERCOM"),FORCE_WHITE_LABEL_FOR_ORGANIZATION_ID:Gi("HEAVENT_FORCE_WHITE_LABEL_FOR_ORGANIZATION_ID"),HIGHLIGHT_CUSTOM_COLOURS:(()=>{const e=Gi("HEAVENT_HIGHLIGHT_CUSTOM_COLOURS");return void 0!==e?"boolean"==typeof e?e:"true"===e:void 0})(),COGNITO_USER_POOL_ID:Vi("HEAVENT_COGNITO_USER_POOL_ID"),COGNITO_USER_POOL_CLIENT_ID:Vi("HEAVENT_COGNITO_USER_POOL_CLIENT_ID"),COGNITO_DOMAIN_URL:Vi("HEAVENT_COGNITO_DOMAIN_URL"),COGNITO_CLIENT_CALLBACK_URL:Vi("HEAVENT_COGNITO_CLIENT_CALLBACK_URL")[0],USE_MIXPANEL:Wi("HEAVENT_USE_MIXPANEL"),MIXPANEL_TOKEN:Wi("HEAVENT_MIXPANEL_TOKEN"),HEAVENT_AWS_UPLOADS_BUCKET:Vi("HEAVENT_AWS_UPLOADS_BUCKET"),LOG_TOKEN:Vi("HEAVENT_LOG_TOKEN"),WEEZEVENT_DOMAIN:Vi("HEAVENT_WEEZEVENT_DOMAIN")},aa=["access","ticket","pay"],sa=({children:e,height:t,replace:n,style:a,to:s,width:o,...r})=>{const l=new URL(s.toString(),location.origin),d={};t&&(d.height=O(t)),o&&(d.width=O(o));const c={alignItems:"inherit",color:"inherit",cursor:"pointer",display:"inherit",flexDirection:"inherit",flexWrap:"inherit",gap:"inherit",justifyContent:"inherit",textDecoration:"none",...d,...a};return l.origin!==location.origin||aa.includes(l.pathname.split("/")[1])?(0,i.jsx)("a",{href:l.href,rel:"noreferrer",style:c,target:"_blank",...r,children:e}):(0,i.jsx)(Ni.N_,{replace:n,style:c,to:{pathname:h(ia.HEAVENT_APPLICATION_BASENAME)?l.pathname.replace(new RegExp(`^/${ia.HEAVENT_APPLICATION_BASENAME}`,"gm"),""):l.pathname,hash:l.hash,search:l.search},...r,children:e})};function oa(e){return(0,ki.A)(e)}sa.displayName="LinkWrapper";const ra=e=>{const t=e.iconStyle??"regular",n={};e.primaryColor&&(n["--fa-primary-color"]=e.primaryColor),e.secondaryColor&&(n["--fa-secondary-color"]=e.secondaryColor,n["--fa-secondary-opacity"]="1");const a=()=>(0,i.jsx)("i",{"aria-hidden":e["aria-hidden"]??!0,className:`fa-${t} fa-${e.icon} ${e.className||""}`,role:e.role,style:{...n,cursor:e.title?"help":"inherit"},title:e.title,onClick:e.to?void 0:e.onClick});return e.to?(0,i.jsx)(sa,{target:e.target,to:e.to,onClick:e.onClick,children:a()}):a()},la=e=>(0,l.createElement)("svg",{width:e.width,height:e.height,xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",preserveAspectRatio:"xMidYMid",className:"lds-rolling","data-testid":"loader",style:{background:"none"}},(0,l.createElement)("circle",{cx:"50",cy:"50",fill:"none",stroke:e.color,strokeWidth:e.strokeWidth,r:"16",strokeDasharray:"75.39822368615503 27.132741228718345",transform:"rotate(120 50 50)"},(0,l.createElement)("animateTransform",{attributeName:"transform",type:"rotate",calcMode:"linear",values:"0 50 50;360 50 50",keyTimes:"0;1",dur:"1s",begin:"0s",repeatCount:"indefinite"}))),da=(0,l.memo)(function(){return(0,i.jsx)($,{align:"center",height:1,justify:"center",width:1,children:(0,i.jsx)(la,{color:"#162131",height:"200px",strokeWidth:"2",width:"200px"})})}),ca={alignItems:"center",borderRadius:"$1",cursor:"pointer",display:"flex",fontWeight:"$semiBold",gap:"$2",padding:"$1 $4",userSelect:"none","& .loader":{borderRadius:"$1"},variants:{color:{primary:{background:"$primaryCustom500",border:"1px solid $primaryCustom500",color:"white","&:hover":{background:"$primaryCustom600",border:"1px solid $primaryCustom600"},"& .loader":{background:"$primaryCustom500",border:"1px solid $primaryCustom500"},"& .loader:hover":{background:"$primary600",border:"1px solid $primary600"}},gray:{background:"$gray100",border:"1px solid $gray100",color:"$gray800","&:hover":{background:"$gray100",border:"1px solid $gray100"},"& .loader":{background:"$gray100",border:"1px solid $gray100"},"& .loader:hover":{background:"$gray100",border:"1px solid $gray100"}},white:{background:"white",border:"1px solid $gray300",color:"$grayCustom700","&:hover":{background:"$grayCustom50",color:"$grayCustom800"},"& .loader":{background:"white",border:"1px solid $gray300"},"& .loader:hover":{background:"$gray50",color:"$gray800"}},error:{background:"$error600",border:"1px solid $error600",color:"white","&:hover":{background:"$error700",border:"1px solid $error600"},"& .loader":{background:"$error600",border:"1px solid $error600"},"& .loader:hover":{background:"$error700",border:"1px solid $error600"}},invisible:{background:"none",border:"none",color:"$primaryCustom500",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$primaryCustom600"},"& .h-button-content:has( + .loader)":{color:"transparent"}},"invisible-gray":{background:"none",border:"none",color:"$gray700",fontSize:"$textSm",fontWeight:"$medium",padding:"$1 $2","&:hover":{color:"$gray900"},"& .h-button-content:has( + .loader)":{color:"transparent"}}},disabled:{true:{cursor:"not-allowed"}},size:{sm:{height:"32px",fontSize:"$textSm"},md:{height:"40px",fontSize:"$textSm"},lg:{height:"44px",fontSize:"$textMd"},xl:{height:"48px",fontSize:"$textMd"},"2xl":{height:"60px",fontSize:"$textLg"}},iconOnly:{true:{justifyContent:"center",px:"0"}}},compoundVariants:[{color:"primary",disabled:!0,css:{color:"$gray400",background:"$gray100",border:"1px solid $gray100","&:hover":{background:"$gray100",border:"1px solid $gray100"},"& .loader":{background:"$gray100",border:"1px solid $gray100"},"& .loader:hover":{background:"$gray100",border:"1px solid $gray100"}}},{color:"gray",disabled:!0,css:{background:"$gray50",border:"1px solid $gray50",color:"$gray400","&:hover":{background:"$gray50",border:"1px solid $gray50"},"& .loader":{background:"$gray50",border:"1px solid $gray50"},"& .loader:hover":{background:"$gray50",border:"1px solid $gray50"}}},{color:"transparent",disabled:!0,css:{color:"$gray400",background:"$primary100",border:"1px solid $primary100","&:hover":{color:"$gray400",background:"$primary100",border:"1px solid $primary100"},"& .loader":{background:"$primary100",border:"1px solid $primary100"},"& .loader:hover":{background:"$primary100",border:"1px solid $primary100"}}},{color:"invisible",disabled:!0,css:{color:"$gray400","&:hover":{color:"$gray400"}}},{color:"invisible-gray",disabled:!0,css:{color:"$gray400","&:hover":{color:"$gray400"}}},{color:"error",disabled:!0,css:{background:"$error200",border:"1px solid $error200","&:hover":{background:"$error200",border:"1px solid $error200"},"& .loader":{background:"$error200",border:"1px solid $error200"},"& .loader:hover":{background:"$error200",border:"1px solid $error200"}}},{size:"sm",iconOnly:!0,css:{width:"32px"}},{size:"md",iconOnly:!0,css:{width:"40px"}},{size:"lg",iconOnly:!0,css:{width:"44px"}},{size:"xl",iconOnly:!0,css:{width:"48px"}},{size:"2xl",iconOnly:!0,css:{width:"56px"}}],defaultVariants:{color:"primary",size:"md"}},ua=j("button",ca),ma=j("div",ca),ga=l.forwardRef(({children:e,className:t,color:n,css:a,disabled:s,featureFlags:o,isLoading:r,leftIcon:l,onClick:d,to:c,rightIcon:u,size:m,textAlign:g=(o?.isV4?"center":void 0),title:h,...p},f)=>{const I=!!l&&!e&&!u||!l&&!e&&!!u,_={className:`button ${t||""}`,color:n,css:{width:o?.isV4?"100%":void 0,...a,position:"relative"},disabled:s,iconOnly:I,size:m,title:h},x={children:e,color:n,leftIcon:l,isLoading:r,rightIcon:u,textAlign:g};return c&&!s?(0,i.jsx)(sa,{style:o?.isV4?{flex:"1"}:void 0,title:h,to:c,onClick:e=>{s||r||d&&d(e)},...p,children:(0,i.jsx)(ma,{..._,ref:f,children:(0,i.jsx)(ha,{...x})})}):(0,i.jsx)(ua,{..._,ref:f,type:"button",onClick:e=>{s||r||d&&d(e)},...p,children:(0,i.jsx)(ha,{...x})})});ga.displayName="Button",ga.toString=()=>".button";const ha=({children:e,color:t,isLoading:n,leftIcon:a,rightIcon:s,textAlign:o})=>(0,i.jsxs)(i.Fragment,{children:[a&&(0,i.jsx)($,{children:(0,i.jsx)(ra,{icon:a})}),e&&(0,i.jsx)($i,{className:"h-button-content",css:{flex:"1"},textAlign:o,children:e}),s&&(0,i.jsx)($,{children:(0,i.jsx)(ra,{icon:s})}),n&&(0,i.jsx)($,{align:"center",className:"loader",css:{height:"calc(100% + 2px)",left:"-1px",position:"absolute",top:"-1px",width:"calc(100% + 2px)",zIndex:10},justify:"center",children:(0,i.jsx)(la,{color:t&&"primary"!==t&&"error"!==t?v.colors.gray800.value:"white",height:"40px",strokeWidth:"3",width:"40px"})})]}),pa=l.createContext({});function fa(){return l.useContext(pa)}const Ia=(e,t=!0)=>{t&&e?.preventDefault(),e?.nativeEvent?.stopImmediatePropagation(),e?.stopPropagation()};var _a=n(961);function xa(e){const t=(0,l.useCallback)(t=>{"Esc"!==t.key&&"Escape"!==t.key||e()},[]);(0,l.useEffect)(()=>(document.addEventListener("keydown",t,!1),()=>{document.removeEventListener("keydown",t,!1)}),[])}function ya(e,t){"production"!==s.Production&&console.warn(`Component ${e} is deprecated, use ${t} instead.`)}const Sa=j("dialog",{background:"white",border:"none",display:"flex",flexDirection:"column",overflowY:"auto",padding:"0",variants:{mobile:{true:{height:"100%",width:"100%"},false:{borderRadius:"12px",maxHeight:"calc(100% - 80px)",width:"688px"}}},defaultVariants:{mobile:!1}}),ja=e=>{const t=Ai(),{onClose:n}=fa();return(0,i.jsxs)($,{css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$6 $7"},gap:"3",justify:"end",children:[!e.hideCancelButton&&(0,i.jsx)(ga,{color:"white",onClick:n,children:t("annuler_48254")}),"function"==typeof e.children?e.children(n):e.children]})},va=e=>(0,i.jsx)($,{direction:"column",...w(e),css:{borderTop:e.hideBorder?void 0:"1px solid $gray200",padding:"$5 $7 $7 $7",...e.css},children:e.children}),ba=({icon:e,iconColor:t,children:n,subtitle:a,onClose:s})=>(0,i.jsxs)($,{children:[(0,i.jsxs)($,{align:"center",css:{flexGrow:"1",padding:"$6 $7 $5 $7"},gap:"4",children:[(0,i.jsx)($,{align:"center",css:{border:"1px solid $gray200",borderRadius:"10px",boxShadow:"$xs",color:t||"$gray700",fontSize:"textMd",padding:"$3"},height:48,justify:"center",width:48,children:(0,i.jsx)(ra,{className:"fa-xl",icon:e})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)($i,{font:"gray900 textLg medium",children:n}),h(a)&&(0,i.jsx)($i,{color:"gray500",children:a})]})]}),s&&(0,i.jsx)($,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"textMd",padding:"$2",margin:"$3 $3"},height:24,justify:"center",width:24,onClick:s,children:(0,i.jsx)(ra,{className:"fa-xl",icon:"xmark"})})]}),Aa=({children:e})=>{const{isOpen:t,onClose:n}=fa();return xa(n),ya("common-front/src/designSystem/components/modals/__deprecated/modal/modal.tsx","common-front/src/designSystem/components/modals/base/modal.tsx"),t?(0,_a.createPortal)((0,i.jsx)($,{align:"center",css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"300"},justify:"center",onClick:n,children:(0,i.jsx)(Sa,{onClick:e=>Ia(e,!1),children:e})}),document.body):null},Ca=e=>{const[t,n]=l.useState(e.isOpen??!1),a=l.useCallback(()=>{n(!1),e.onClose?.()},[n,e.onClose]);return l.useEffect(()=>{"boolean"==typeof e.isOpen&&n(e.isOpen)},[e.isOpen]),(0,i.jsx)(pa.Provider,{value:{isOpen:t,onClose:a,setIsOpen:n},children:e.children})},Ea=e=>{const{setIsOpen:t}=fa(),n=e.children,a=l.useCallback(e=>{Ia(e),t(!0),n.props.onClick?.(e)},[t,n]),s=l.useMemo(()=>l.cloneElement(l.Children.only(n),{onClick:a,onKeyPress:a,tabIndex:0}),[n,a]);return(0,i.jsx)(i.Fragment,{children:s})},Ta=e=>{const t=Ai(),n=h(e.content?.[0])?t(e.content[0]):t("ooops_on_a_un_p_56888"),a=((e,t)=>"accreditation_limit_reached"===t?.[0]?[e("_ditez_l_accr_d_66820")]:"delegation_slots_limit_reached"===t?.[0]?[e("la_limite_sur_l_75773")]:"delegation_accreditations_limit_reached"===t?.[0]?[e("la_limite_sur_l_43036")]:"delegation_categories_limit_reached"===t?.[0]?[e("la_limite_sur_l_49480")]:"delegation_profiles_limit_reached"===t?.[0]?[e("la_limite_sur_l_56747")]:"can_not_delete_paired"===t?.[0]?[e("ce_membre_est_d_53903")]:F(t)?t.map(e):[e("une_erreur_est_92333")])(t,e.content);return(0,i.jsx)(Ca,{isOpen:!0,onClose:e.onClose,children:(0,i.jsxs)(Aa,{children:[(0,i.jsx)(ba,{icon:"triangle-exclamation",iconColor:"$error700",children:n}),(0,i.jsx)(va,{css:{color:"$gray500"},hideBorder:!0,children:(0,i.jsxs)($,{direction:"column",gap:"3",children:[e.content?a.join(" "):e.children,h(e.requestUuid)&&(0,i.jsx)(N,{css:{color:"$gray400",fontSize:"$textXs",userSelect:"text",wordBreak:"break-all"},children:t("r_f_rence_1_92505",e.requestUuid)})]})}),(0,i.jsx)(ja,{hideBorder:!0,hideCancelButton:!0,children:(0,i.jsx)(ga,{color:"error",onClick:e.onClose,children:t("fermer_62479")})})]})})},Ma="heaventRequestUuid";function Ra(e,t){return"object"==typeof e&&null!==e&&Object.defineProperty(e,Ma,{value:t}),e}const Da=(0,l.createContext)({}),Oa=e=>{const[t,n]=(0,l.useState)(!1),[s,o]=(0,l.useState)([]),[r,d]=(0,l.useState)(void 0),c=(0,l.useCallback)((e,t)=>{e&&void 0!==t&&a(t),n(e),o((Array.isArray(t)?t:[]).flatMap(e=>e.isHeaventError?e.message.split("\n"):e.message?.startsWith("db::")?[e.message.substring(4).split(" ")[0]]:[])),d(function(e){const t=e?.[Ma];return"string"==typeof t?t:void 0}(t))},[n,o,d]),u=(0,l.useCallback)(()=>{n(!1),o([]),d(void 0)},[n,o,d]);return(0,i.jsxs)(Da.Provider,{value:{isError:t,setIsError:c},children:[e.children,t&&(0,i.jsx)(Ta,{content:s,requestUuid:r,onClose:u})]})};var wa=n(8097);function Pa(e){return new Promise((t,n)=>{!function(e,n,i){const a=document.createElement("script");a.onload=()=>{t(!0)},a.onerror=()=>{i&&i()},a.src=e,document.body.appendChild(a)}(e,0,()=>{n(new Error(`Could not load ${e}`))})})}var $a=n(1343);const ka={AccreditationChartFragment:{code:"fragment AccreditationChart on Accreditation {\n id\n name\n hasSlots\n willAutoAccredit\n\n slots(includeHidden: true) {\n date\n name\n assignedResources\n delegationsTotalResources\n maxResources\n scannedResources\n wishedResources\n }\n}\n",fragments:[]},AccreditationEmailFragment:{code:"fragment AccreditationEmail on AccreditationsUsersInfo {\n accreditationCategory {\n id\n name\n }\n\n accreditation {\n id\n eventId\n name\n acronym\n description\n icon\n color\n address\n latitude\n longitude\n fields\n }\n\n accreditationSlot {\n id\n name\n date\n }\n}\n",fragments:[]},AccreditationImportFragment:{code:"fragment AccreditationImport on Accreditation {\n id\n name\n\n slots(includeHidden: true) {\n id\n name\n date\n }\n}\n",fragments:[]},AccreditationProfileFragment:{code:"fragment AccreditationProfile on AccreditationsProfile {\n id\n accreditationProfileCategoryId\n name\n description\n acronym\n color\n icon\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileEmailFragment:{code:"fragment AccreditationProfileEmail on AccreditationsProfile {\n id\n name\n\n accreditationProfileCategory {\n name\n }\n}\n",fragments:[]},AccreditationProfileImportFragment:{code:"fragment AccreditationProfileImport on AccreditationsProfile {\n id\n name\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileMatrixFragment:{code:"fragment AccreditationProfileMatrix on AccreditationsProfile {\n id\n name\n color\n assignedResources\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationProfileVolunteerRegistrationFragment:{code:"fragment AccreditationProfileVolunteerRegistration on AccreditationsProfile {\n id\n name\n acronym\n color\n icon\n\n accreditationProfileCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationSlotMatrixFragment:{code:"fragment AccreditationSlotMatrix on AccreditationsSlot {\n id\n name\n date\n assignedResources\n maxResources\n isBlocked\n\n accreditation {\n id\n accreditationCategoryName\n accreditationDisplay\n acronym\n color\n index\n name\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationSlotStatsFragment:{code:"fragment AccreditationSlotStats on AccreditationsSlot {\n assignedResources\n maxResources\n scannedResources\n wishedResources\n}\n",fragments:[]},AccreditationSlotVolunteerRegistrationFragment:{code:"fragment AccreditationSlotVolunteerRegistration on AccreditationsSlot {\n id\n accreditationId\n name\n date\n isBlocked\n\n accreditation {\n id\n accreditationCategoryId\n acronym\n name\n color\n icon\n hiddenSlotId\n hasSlots\n index\n fields\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AccreditationsAccreditationFragment:{code:"fragment AccreditationsAccreditation on Accreditation {\n id\n accreditationCategoryId\n index\n name\n description @include(if: $includeDescription)\n address\n latitude\n longitude\n acronym\n icon\n color\n fillingRate\n maxResources\n assignedResources\n willAutoAccredit\n weezeventIsSynchronized\n fields\n index\n hasDateSlots\n insertedAt\n numberOfSlots\n\n accreditationCategory {\n id\n name\n }\n\n accreditationsCustomFields @include(if: $includeConditions) {\n ...AccreditationsAccreditationCustomField\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationCustomFieldFragment"]},AccreditationsAccreditationCustomFieldFragment:{code:"fragment AccreditationsAccreditationCustomField on AccreditationsCustomField {\n conditionValue\n\n customField {\n name\n fieldType\n\n values {\n id\n value\n }\n }\n}\n",fragments:[]},AccreditationsAccreditationSlotFragment:{code:"fragment AccreditationsAccreditationSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n name\n date\n assignedResources\n fillingRate\n insertedAt\n isHidden\n maxResources\n resourcesByFields(slugs: $customFieldsSlugs) @include(if: $includeResources)\n scannedResources @include(if: $includeResources)\n weezeventChecklistId\n wishedResources @include(if: $includeResources)\n\n accreditation {\n ...AccreditationsAccreditation\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:["AccreditationsAccreditationFragment"]},AccreditationsProfilesProfileFragment:{code:"fragment AccreditationsProfilesProfile on AccreditationsProfile {\n id\n name\n description @include(if: $includeDescription)\n acronym\n color\n icon\n insertedAt\n\n accreditationsSlots @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n accreditationProfileCategory {\n id\n name\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment"]},AccreditationsSlotFragment:{code:"fragment AccreditationsSlot on AccreditationsSlot {\n id\n accreditationCategoryId\n accreditationId\n eventId\n name\n date\n assignedResources\n maxResources\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n eventId\n acronym\n name\n color\n icon\n hasSlots\n accreditationDisplay\n hiddenSlotId\n index\n }\n\n accreditationCategory {\n id\n name\n }\n}\n",fragments:[]},AssigmentEmailFragment:{code:"fragment AssigmentEmail on PositionsSlotsUsersInfo {\n id\n\n position {\n id\n eventId\n name\n description\n acronym\n color\n address\n latitude\n longitude\n zoom\n range\n layer\n fields\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n id\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n\n tags {\n name\n }\n }\n\n positionSlot {\n id\n name\n range\n timeDifferenceMinutes\n }\n}\n",fragments:["LeaderAssignmentFragment"]},AttachCustomFieldFragment:{code:"fragment AttachCustomField on CustomField {\n ...CustomFieldWithCondition\n\n category {\n id\n name\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},CampaignEditFragment:{code:"fragment CampaignEdit on Campaign {\n name\n state\n campaignType\n sender\n text\n subject\n html\n replyTo\n sendToEveryone\n states\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n tagsIds\n accreditationsCategoriesIds\n accreditationsIds\n accreditationsSlotsIds\n usersInfosIds\n segmentsIds\n scheduledAt\n emailSenderId\n attachments\n includeDuplicateMembersAttachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n scheduleType\n scheduleAnchor\n scheduleOffsetDays\n scheduleBeforeAfter\n scheduleSendTime\n\n documents {\n acl\n key\n name\n size\n }\n}\n",fragments:[]},CampaignEmailRendererFragment:{code:"fragment CampaignEmailRenderer on Campaign {\n subject\n text\n html\n replyTo\n attachments\n includeDuplicateMembersAttachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n\n documents {\n name\n key\n }\n}\n",fragments:[]},CampaignListFragment:{code:"fragment CampaignList on Campaign {\n id\n name\n campaignType\n state\n numberOfRecipients\n cost\n sentAt\n scheduledAt\n\n createdBy {\n nameOrEmail\n }\n}\n",fragments:[]},CampaignUserInfoFragment:{code:'fragment CampaignUserInfo on UsersInfo {\n id\n name\n email\n picture {\n url\n }\n phone: fieldValue(slug: "phone")\n}\n',fragments:[]},CommentFragment:{code:"fragment Comment on Comment {\n id\n content\n insertedAt\n\n event {\n name\n }\n\n writtenBy {\n id\n email\n\n userInfo(organizationId: $organizationId) {\n ...UserInfoNameAndPicture\n nameOrEmail\n }\n }\n}\n",fragments:["UserInfoNameAndPictureFragment"]},ConditionCustomFieldFragment:{code:"fragment ConditionCustomField on CustomField {\n id\n name\n slug\n fieldType\n fileType\n canSelectMultiple\n\n values {\n id\n value\n }\n}\n",fragments:[]},ConditionsCustomFieldsFragment:{code:"fragment ConditionsCustomFields on Organization {\n conditionsCustomFields: customFields(\n eventId: $eventId\n variety: UserInfo\n privacy: All\n fieldTypes: [Checkbox, Select]\n sort: { attribute: Name, direction: Asc }\n ) {\n nodes {\n ...ConditionCustomField\n }\n }\n}\n",fragments:["ConditionCustomFieldFragment"]},CreateAccreditationEventFragment:{code:"fragment CreateAccreditationEvent on Event {\n startAt\n endAt\n layer\n isWeezeventConnected\n\n accreditationsCategories {\n id\n name\n }\n}\n",fragments:[]},CreateAccreditationProfileEventFragment:{code:"fragment CreateAccreditationProfileEvent on Event {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n name\n acronym\n accreditationDisplay\n index\n color\n icon\n hasSlots\n\n slots(includeHidden: true) {\n id\n name\n date\n }\n }\n }\n\n accreditationsProfilesCategories {\n id\n name\n }\n}\n",fragments:[]},CreateCampaignEmailSenderFragment:{code:"fragment CreateCampaignEmailSender on EmailsSender {\n id\n name\n isValidToSendEmail\n}\n",fragments:[]},CreateCustomFieldInfosFragment:{code:"fragment CreateCustomFieldInfos on Organization {\n # the fields a condition can depend on, of every variety: the form keeps those of its own\n customFields(\n eventId: $eventId\n privacy: All\n fieldTypes: [Checkbox, Country, Language, Nationality, Select]\n ) {\n nodes {\n id\n organizationId\n eventId\n variety\n name\n label\n fieldProperty\n fieldType\n listType\n\n values {\n id\n value\n color\n }\n }\n }\n\n # the fields an Address field can fill, of every variety: the form keeps those of its own\n addressLinksCustomFields: customFields(\n eventId: $eventId\n privacy: All\n fieldTypes: [Text, Country]\n ) {\n nodes {\n id\n organizationId\n eventId\n name\n label\n variety\n fieldType\n }\n }\n\n customFieldsCategories {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateDelegationEventFragment:{code:"fragment CreateDelegationEvent on Event {\n campaigns(states: [Template]) {\n nodes {\n id\n name\n }\n }\n\n customDocuments {\n slug\n name\n }\n\n delegationsSpaceLayouts {\n id\n name\n }\n\n forms {\n nodes {\n ...CreateDelegationForm\n }\n }\n\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n color\n icon\n }\n }\n\n ...EventAccreditations\n}\n",fragments:["CreateDelegationFormFragment","EventAccreditationsFragment"]},CreateDelegationFormFragment:{code:"fragment CreateDelegationForm on Form {\n id\n name\n}\n",fragments:[]},CreatePositionEventFragment:{code:"fragment CreatePositionEvent on Event {\n startAt\n endAt\n layer\n latitude\n longitude\n isWeezeventConnected\n\n positionsCategories(scoped: true) {\n id\n name\n }\n\n traces {\n ...Trace\n }\n}\n",fragments:["TraceFragment"]},CreatePositionTagsFragment:{code:"fragment CreatePositionTags on Organization {\n tags {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},CreateUpdateEventInfosFragment:{code:"fragment CreateUpdateEventInfos on Organization {\n name\n weezeventOrganizationId\n\n eventCustomFields: customFields(variety: Event) {\n nodes {\n ...AttachCustomField\n }\n }\n\n emailsSenders(isValidToSendEmail: true) {\n id\n name\n }\n\n tags {\n nodes {\n id\n name\n }\n }\n\n groups {\n nodes {\n id\n name\n }\n }\n}\n",fragments:["AttachCustomFieldFragment"]},CreateUpdateMemberFormFragment:{code:"fragment CreateUpdateMemberForm on Form {\n id\n name\n isEditableInMemberSpace\n description\n positionTitle\n positionSubtitle\n accreditationTitle\n accreditationSubtitle\n informationTitle\n registerButtonText\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n elements {\n ...FormElementDisplay\n }\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormSlotsOptionsFragment","FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormElementDisplayFragment","FormRegisterCustomSlotPeriodFragment"]},CreatedByFragment:{code:"fragment CreatedBy on UsersInfo {\n ...UserInfoContactInformation\n}\n",fragments:["UserInfoContactInformationFragment"]},CustomBadgeVolunteerRegistrationFragment:{code:"fragment CustomBadgeVolunteerRegistration on VolunteersRegistration {\n localId\n state\n isLeader\n utid\n ticketId\n weezevent\n segmentsIds(usedInCustomDocument: true)\n\n userInfo {\n id\n localId\n email\n name\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n formsUsersInfos(eventId: $eventId, level: Event) {\n formId\n\n slots {\n range\n }\n }\n }\n\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n accreditationsUsersInfos {\n ...AccreditationEmail\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n}\n",fragments:["UserInfoLinksFragment","AccreditationProfileEmailFragment","DelegationEmailFragment","AccreditationEmailFragment","AssigmentEmailFragment"]},CustomDocumentPopulationFragment:{code:"fragment CustomDocumentPopulation on CustomDocument {\n id\n slug\n name\n populationsIds\n shouldRegenerateTicketIdOnDownload\n}\n",fragments:[]},CustomFieldFragment:{code:"fragment CustomField on CustomField {\n id\n slug\n name\n label\n variety\n fieldProperty\n fieldType\n isPrivate\n isEncrypted\n hasCondition\n conditionCustomFieldId\n dependencies\n numberOfTimesUsed\n canDelete\n isSelectV2\n insertedAt\n\n category {\n id\n name\n }\n\n conditionCustomField {\n name\n }\n\n createdBy {\n id\n ...CreatedBy\n }\n\n values {\n id\n value\n }\n}\n",fragments:["CreatedByFragment"]},CustomFieldImportFragment:{code:"fragment CustomFieldImport on CustomField {\n id\n name\n slug\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},CustomFieldWithConditionFragment:{code:"fragment CustomFieldWithCondition on CustomField {\n id\n name\n label\n description\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n isPrivate\n hasCondition\n conditionValue\n canSelectMultiple\n slug\n isSelectV2\n canBeUpdatedByUrl\n validationRules\n\n conditionCustomField {\n id\n name\n fieldType\n fieldProperty\n canSelectMultiple\n slug\n }\n\n addressPostalCodeCustomField {\n id\n slug\n }\n\n addressCityCustomField {\n id\n slug\n }\n\n addressCountryCustomField {\n id\n slug\n }\n\n document {\n url\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},DelegationAccreditationProfileFragment:{code:"fragment DelegationAccreditationProfile on DelegationAccreditationProfile {\n accreditationProfileId\n assignedResources\n isFull\n maxResources\n}\n",fragments:[]},DelegationAccreditationProfileStatsFragment:{code:"fragment DelegationAccreditationProfileStats on DelegationAccreditationProfile {\n accreditationProfileId\n assignedResources\n maxResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationSlotFragment:{code:"fragment DelegationAccreditationSlot on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationId\n accreditationSlotId\n isDefault\n isFull\n isVisible\n assignedResources\n maxResources\n willAutoAccredit\n\n accreditationSlot {\n date\n isBlocked\n isFull\n }\n}\n",fragments:[]},DelegationAccreditationSlotStatsFragment:{code:"fragment DelegationAccreditationSlotStats on DelegationAccreditationSlot {\n accreditationCategoryId\n accreditationSlotId\n accreditationId\n assignedResources\n maxResources\n resourcesByFields\n scannedResources\n wishedResources\n}\n",fragments:[]},DelegationAccreditationsSlotsFragment:{code:"fragment DelegationAccreditationsSlots on Delegation {\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots {\n ...DelegationAccreditationSlot\n }\n}\n",fragments:["DelegationAccreditationProfileFragment","DelegationAccreditationSlotFragment"]},DelegationEmailFragment:{code:'fragment DelegationEmail on Delegation {\n id\n organizationId\n eventId\n formId\n name\n fields\n\n category: delegationCategory {\n id\n name\n }\n\n leaders {\n email\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n}\n',fragments:[]},DelegationUserProfileFragment:{code:"fragment DelegationUserProfile on Delegation {\n id\n name\n event {\n id\n name\n }\n}\n",fragments:[]},DelegationsDelegationFragment:{code:"fragment DelegationsDelegation on Delegation {\n id\n organizationId\n eventId\n name\n description @include(if: $includeDescription)\n state\n deadlineDate\n numberOfResources @include(if: $includeResources)\n maxResources\n fillingRate @include(if: $includeResources)\n showInDelegationSpace\n fields\n canLeadersAddMembers\n canLeadersEditMembers\n canLeadersDeleteMembers\n canLeadersDuplicateMembers\n canLeadersEditColumns\n canLeadersEditCustomFields\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n showFormLinkInDelegationSpace\n showAllAccreditations\n lockedAt\n usedCustomFieldsFilled @include(if: $includeUsedCustomFieldsFilled)\n insertedAt\n\n accreditationsSlots @include(if: $includeAccreditations) {\n accreditationSlot {\n ...AccreditationSlotVolunteerRegistration\n }\n }\n\n accreditationsProfiles @include(if: $includeAccreditationsProfiles) {\n ...DelegationAccreditationProfileStats\n\n accreditationProfile {\n ...AccreditationProfileVolunteerRegistration\n }\n }\n\n campaigns @include(if: $includeCampaigns) {\n id\n name\n }\n\n children @include(if: $includeChildren) {\n event {\n id\n name\n }\n }\n\n parent @include(if: $includeParent) {\n id\n name\n }\n\n customDocuments @include(if: $includeDocuments) {\n slug\n name\n }\n\n delegationCategory {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n email\n name\n nameOrEmail\n }\n }\n }\n\n delegationsSpaceLayout @include(if: $includeLayout) {\n id\n name\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n form {\n id\n name\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n\n leaders @include(if: $includeLeaders) {\n id\n email\n name\n nameOrEmail\n }\n\n allAccreditationsSlots @include(if: $includeAccreditationsSlots) {\n ...DelegationAccreditationSlotStats\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment","DelegationAccreditationProfileStatsFragment","AccreditationProfileVolunteerRegistrationFragment","DelegationAccreditationSlotStatsFragment"]},DelegationsSpaceLayoutTabFragment:{code:"fragment DelegationsSpaceLayoutTab on DelegationsSpaceLayoutsTab {\n id\n name\n description\n slug\n isVisible\n isPinned\n segmentType\n rendering\n infos\n}\n",fragments:[]},DesignColorsFragment:{code:"fragment DesignColors on Design {\n colors {\n grayCustom50\n grayCustom500\n grayCustom700\n grayCustom800\n grayCustom900\n primaryCustom500\n primaryCustom600\n }\n}\n",fragments:[]},DocumentAsoPaxManifestFragment:{code:"fragment DocumentAsoPaxManifest on Query {\n event(id: $eventId) {\n name\n\n accreditationSlot(id: $accreditationSlotId) {\n id\n name\n date\n maxResources\n\n accreditation {\n id\n name\n }\n\n links {\n asoPaxManifestLink\n }\n\n volunteersRegistrations {\n id\n\n userInfo {\n id\n fields(expand: true)\n }\n }\n }\n }\n}\n",fragments:[]},DocumentDelegationCalendarFragment:{code:"fragment DocumentDelegationCalendar on Event {\n startAt\n endAt\n\n document(documentType: DelegationCalendar) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n delegation(id: $delegationId) {\n ...DelegationEmail\n\n allAccreditationsSlots(onlyVisible: $onlyVisible) {\n assignedResources\n\n accreditationSlot {\n id\n date\n name\n }\n\n accreditation {\n name\n color\n index\n }\n }\n\n links {\n delegationCalendarLink\n }\n }\n}\n",fragments:["DelegationEmailFragment"]},DocumentEmailPreviewFragment:{code:"fragment DocumentEmailPreview on Document {\n id\n acl\n key\n name\n size\n url\n}\n",fragments:[]},DocumentPositionPlanningFragment:{code:'fragment DocumentPositionPlanning on Event {\n startAt\n endAt\n dayStartTime\n\n document(documentType: PositionPlanning) {\n id\n options\n }\n\n position(id: $positionId) {\n name\n range\n color\n\n links {\n positionPlanningLink\n }\n\n slots {\n id\n name\n range\n }\n }\n\n volunteersRegistrations(positionId: $positionId, sort: { attribute: "Name", direction: Asc }) {\n nodes {\n id\n\n userInfo {\n name\n\n phone {\n internationalFormat\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n',fragments:[]},DocumentPositionSheetFragment:{code:"fragment DocumentPositionSheet on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: Position) {\n id\n options\n }\n\n position(id: $positionId) {\n ...PositionPdfInfos\n\n links {\n positionSheetLink\n }\n\n slots {\n id\n name\n range\n }\n }\n\n volunteersRegistrations(states: [Assigned], positionId: $positionId) {\n nodes {\n ...VolunteerPdf\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","PositionPdfInfosFragment","VolunteerPdfFragment"]},DocumentPositionsPlanningFragment:{code:"fragment DocumentPositionsPlanning on Event {\n name\n\n positionsSlots(segmentId: $segmentId, date: $date) {\n nodes {\n id\n positionId\n name\n range\n\n position {\n id\n name\n color\n }\n }\n }\n\n segment(id: $segmentId) {\n name\n }\n}\n",fragments:[]},DocumentPositionsVolunteersPlanningFragment:{code:"fragment DocumentPositionsVolunteersPlanning on Event {\n name\n\n positionsSlots(segmentId: $segmentId) {\n nodes {\n id\n range\n\n position {\n id\n name\n acronym\n }\n }\n }\n\n segment(id: $segmentId) {\n name\n }\n\n volunteersRegistrations(states: [Assigned]) {\n nodes {\n id\n\n userInfo {\n ...UserInfoContactInformation\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n }\n }\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},DocumentUserAssignmentsFragment:{code:"fragment DocumentUserAssignments on Query {\n organization(id: $organizationId) {\n id\n\n customFields(eventId: $eventId, variety: Position, privacy: Public) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoDocument\n }\n }\n\n event(id: $eventId) {\n id\n name\n\n document(documentType: Assignments) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n localId\n ticketId\n weezevent\n\n # For the {user.profile} and {user.delegation.*} of the texts.\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n preassignPositions {\n name\n }\n\n preassignPositionsCategories {\n name\n }\n\n positionsSlotsUsersInfos {\n ...AssigmentEmail\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","UserInfoDocumentFragment","AccreditationProfileEmailFragment","DelegationEmailFragment","AssigmentEmailFragment"]},DocumentUserBadgeFragment:{code:'fragment DocumentUserBadge on Event {\n document(documentType: Badge) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n ...UserInfoContactInformation\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userBadgeLink\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:["UserInfoContactInformationFragment"]},DocumentUserCertificateFragment:{code:'fragment DocumentUserCertificate on Event {\n document(documentType: Certificate) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n name\n dateOfBirth: fieldValue(slug: "dateOfBirth")\n street: fieldValue(slug: "street")\n city: fieldValue(slug: "city")\n postalCode: fieldValue(slug: "postalCode")\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userCertificateLink\n }\n }\n\n positionsSlotsUsersInfos {\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n }\n}\n',fragments:[]},DocumentUserCustomBadgeFragment:{code:"fragment DocumentUserCustomBadge on Event {\n id\n name\n startAt\n weezevent\n\n tags {\n name\n }\n\n document(documentType: CustomBadge, customBadge: $customBadge) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...CustomBadgeVolunteerRegistration\n }\n}\n",fragments:["CustomBadgeVolunteerRegistrationFragment"]},DocumentUserCustomBadgesFragment:{code:"fragment DocumentUserCustomBadges on Event {\n id\n name\n startAt\n weezevent\n fields\n\n tags {\n name\n }\n\n document(documentType: CustomBadge, customBadge: $customBadge) {\n id\n options\n }\n\n volunteersRegistrations(segmentId: $segmentId) {\n nodes {\n ...CustomBadgeVolunteerRegistration\n }\n }\n}\n",fragments:["CustomBadgeVolunteerRegistrationFragment"]},DocumentUserPlanningFragment:{code:"fragment DocumentUserPlanning on Event {\n startAt\n endAt\n dayStartTime\n\n document(documentType: UserPlanning) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n localId\n ticketId\n weezevent\n\n # For the {user.profile} and {user.delegation.*} of the texts.\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n\n userInfo {\n ...UserInfoDocument\n }\n\n positionsSlotsUsersInfos {\n ...PsuiUserPlanning\n }\n }\n}\n",fragments:["AccreditationProfileEmailFragment","DelegationEmailFragment","UserInfoDocumentFragment","PsuiUserPlanningFragment"]},DocumentUserPlanningDaysFragment:{code:'fragment DocumentUserPlanningDays on Event {\n document(documentType: UserPlanningDays) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userPlanningDaysLink\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n\n position {\n id\n organizationId\n name\n address\n }\n }\n }\n}\n',fragments:[]},DocumentUserPlanningListFragment:{code:'fragment DocumentUserPlanningList on Event {\n document(documentType: UserPlanningList) {\n id\n options\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n userInfo {\n nameOrEmail\n language: fieldValue(slug: "language")\n\n links(eventId: $eventId) {\n userPlanningListLink\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n name\n range\n }\n\n position {\n name\n }\n }\n }\n}\n',fragments:[]},DocumentUsersHoursFragment:{code:"fragment DocumentUsersHours on Event {\n timeZone\n\n document(documentType: UserHours) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n positionsSlotsUsersInfos {\n ...PsuiUserHours\n }\n\n userInfo {\n ...UserInfoDocument\n }\n }\n}\n",fragments:["PsuiUserHoursFragment","UserInfoDocumentFragment"]},DocumentUsersListingFragment:{code:"fragment DocumentUsersListing on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: VolunteersListing) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n segment(id: $segmentId) {\n name\n\n links {\n usersListingLink\n }\n }\n\n volunteersRegistrations(segmentId: $segmentId) {\n nodes {\n ...VolunteerPdf\n }\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment","VolunteerPdfFragment"]},DocumentUsersPicturesFragment:{code:'fragment DocumentUsersPictures on Query {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo) {\n nodes {\n ...CustomFieldWithCondition\n }\n }\n }\n\n event(id: $eventId) {\n document(documentType: UsersPictures) {\n id\n options\n title\n informationsTitle\n informationsContent\n informations2Title\n informations2Content\n signature\n }\n\n segment(id: $segmentId) {\n name\n\n links {\n usersPicturesLink\n }\n }\n\n volunteersRegistrations(\n segmentId: $segmentId\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n userInfo {\n id\n ...UserInfoContactInformation\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n fields\n }\n }\n }\n }\n}\n',fragments:["CustomFieldWithConditionFragment","UserInfoContactInformationFragment"]},DocumentUsersPlanningFragment:{code:"fragment DocumentUsersPlanning on VolunteersRegistration {\n id\n state\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n\n positionsSlotsUsersInfos(positionId: $positionId) {\n positionCategory {\n name\n }\n\n positionSlot {\n id\n name\n range\n }\n\n position {\n id\n name\n color\n icon\n }\n }\n\n slots {\n range\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},EmailRecipientFragment:{code:"fragment EmailRecipient on Email {\n id\n state\n sentAt\n infos\n\n userInfo {\n ...CampaignUserInfo\n }\n}\n",fragments:["CampaignUserInfoFragment"]},EmailSenderEmailRendererFragment:{code:"fragment EmailSenderEmailRenderer on EmailsSender {\n fromName\n fromEmail\n replyTo\n signature\n\n header {\n key\n }\n\n picture {\n key\n }\n\n footer {\n key\n }\n}\n",fragments:[]},EmailTemplateEmailRendererFragment:{code:"fragment EmailTemplateEmailRenderer on EmailsTemplate {\n useDefault\n subject\n content\n attachments\n hasCalendarInvite\n calendarInviteName\n calendarInviteStartDate\n calendarInviteStartTime\n calendarInviteEndDate\n calendarInviteEndTime\n}\n",fragments:[]},EventAccreditationsFragment:{code:"fragment EventAccreditations on Event {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n accreditationCategoryId\n name\n color\n icon\n accreditationCategoryName\n accreditationDisplay\n hasSlots\n hiddenSlotId\n index\n\n slots(includeHidden: true) {\n id\n accreditationId\n name\n date\n }\n }\n }\n}\n",fragments:[]},EventCreateUpdateMemberFragment:{code:"fragment EventCreateUpdateMember on Event {\n id\n name\n startAt\n endAt\n dayStartTime\n ranges(formId: $formId, delegationId: $delegationId)\n country\n fields\n\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n accreditationsProfilesCategories {\n ...FormRegisterAccreditationProfileCategory\n }\n\n positionsCategories {\n ...FormRegisterCategory\n }\n}\n",fragments:["FormRegisterAccreditationCategoryFragment","FormRegisterAccreditationProfileCategoryFragment","FormRegisterCategoryFragment"]},EventDelegationsExportFragment:{code:"fragment EventDelegationsExport on Event {\n languages\n\n segmentsFolders(segmentType: Delegations) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventEmailRendererFragment:{code:"fragment EventEmailRenderer on Event {\n id\n organizationId\n name\n languages\n timeZone\n startAt\n endAt\n fields\n\n customDocuments {\n slug\n }\n}\n",fragments:[]},EventPositionsExportFragment:{code:"fragment EventPositionsExport on Event {\n languages\n\n segmentsFolders(segmentType: Positions) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventVolunteersExportFragment:{code:"fragment EventVolunteersExport on Event {\n languages\n\n segmentsFolders(segmentType: Volunteers) {\n id\n name\n\n segments {\n id\n name\n }\n }\n}\n",fragments:[]},EventsEventFragment:{code:"fragment EventsEvent on Event {\n id\n name\n description @include(if: $includeDescription)\n state\n startAt\n endAt\n fields\n insertedAt\n numberOfMembers @include(if: $includeNumberOfMembers)\n numberOfMembersAccredited @include(if: $includeNumberOfMembers)\n numberOfMembersAssigned @include(if: $includeNumberOfMembers)\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n tags {\n id\n name\n }\n}\n",fragments:[]},ExistingVolunteerFragment:{code:"fragment ExistingVolunteer on UsersInfo {\n id\n ...UserInfoContactInformation\n nameOrEmail\n}\n",fragments:["UserInfoContactInformationFragment"]},FormAccreditationsOptionsFragment:{code:"fragment FormAccreditationsOptions on Form {\n accreditationDisplay\n accreditationFilter\n showFullAccreditation\n hiddenAccreditationsCategoriesIds\n hiddenAccreditationsIds\n hiddenAccreditationsSlotsIds\n displayedAccreditationsCategoriesIds\n displayedAccreditationsIds\n displayedAccreditationsSlotsIds\n showAccreditationDescription\n slotDisplay\n\n accreditationsFormCustomFields {\n accreditationsSlotsIds\n isMandatory\n\n customField {\n ...CustomFieldWithCondition\n }\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},FormCustomFieldFragment:{code:"fragment FormCustomField on CustomField {\n id\n slug\n eventId\n name\n label\n fieldType\n listType\n fieldProperty\n\n category {\n id\n name\n }\n\n conditionCustomField {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},FormCustomFieldsFragment:{code:"fragment FormCustomFields on Organization {\n formCustomFields: customFields(\n eventId: $eventId\n variety: UserInfo\n privacy: Public\n sort: { attribute: Name, direction: Asc }\n ) {\n nodes {\n ...FormCustomField\n }\n }\n}\n",fragments:["FormCustomFieldFragment"]},FormElementDisplayFragment:{code:"fragment FormElementDisplay on FormsElement {\n id\n elementType\n isMandatory\n section\n text\n hasCondition\n conditionValue\n\n conditionCustomField {\n ...CustomFieldWithCondition\n }\n\n customField {\n ...CustomFieldWithCondition\n }\n}\n",fragments:["CustomFieldWithConditionFragment"]},FormElementsElementFragment:{code:"fragment FormElementsElement on FormsElement {\n id\n elementType\n customFieldId\n section\n text\n isMandatory\n hasCondition\n conditionCustomFieldId\n conditionValue\n}\n",fragments:[]},FormEmailFragment:{code:"fragment FormEmail on FormsUsersInfo {\n teamCode\n\n form {\n id\n areTeamsAllowed\n }\n\n ...WishesEmail\n}\n",fragments:["WishesEmailFragment"]},FormListFragment:{code:"fragment FormList on Form {\n id\n name\n numberOfCustomFields\n}\n",fragments:[]},FormMemberRegistrationFragment:{code:"fragment FormMemberRegistration on Form {\n id\n name\n isEditableInMemberSpace\n\n elements {\n id\n ...FormElementDisplay\n }\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n}\n",fragments:["FormElementDisplayFragment","FormSlotsOptionsFragment","FormMissionsOptionsFragment","FormAccreditationsOptionsFragment","FormRegisterCustomSlotPeriodFragment"]},FormMissionsOptionsFragment:{code:"fragment FormMissionsOptions on Form {\n positionDisplay\n positionFilter\n positionRanking\n positionLimit\n showFullPosition\n hiddenPositionsCategoriesIds\n hiddenPositionsIds\n hiddenPositionsSlotsIds\n hiddenPositionsTagsIds\n displayedPositionsCategoriesIds\n displayedPositionsIds\n displayedPositionsSlotsIds\n displayedPositionsTagsIds\n showPositionCategoryDescription\n showPositionDescription\n slotDisplay\n willAutoAssign\n}\n",fragments:[]},FormRegisterAccreditationFragment:{code:"fragment FormRegisterAccreditation on IAccreditation {\n id\n accreditationCategoryId\n name\n description\n color\n icon\n hiddenSlotId\n hasSlots\n accreditationDisplay\n conditionsOperator\n index\n\n slots(includeHidden: true) {\n ...FormRegisterAccreditationSlot\n }\n\n conditionsCustomFields: accreditationsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n\n formCustomFields {\n isMandatory\n\n customField {\n ...CustomFieldWithCondition\n }\n }\n}\n",fragments:["FormRegisterAccreditationSlotFragment","CustomFieldWithConditionFragment"]},FormRegisterAccreditationCategoryFragment:{code:"fragment FormRegisterAccreditationCategory on IAccreditationsCategory {\n id\n name\n\n accreditations {\n ...FormRegisterAccreditation\n }\n}\n",fragments:["FormRegisterAccreditationFragment"]},FormRegisterAccreditationProfileFragment:{code:"fragment FormRegisterAccreditationProfile on AccreditationsProfile{\n id\n name\n description\n color\n icon\n}\n",fragments:[]},FormRegisterAccreditationProfileCategoryFragment:{code:"fragment FormRegisterAccreditationProfileCategory on AccreditationsProfilesCategory {\n id\n name\n\n accreditationsProfiles {\n ...FormRegisterAccreditationProfile\n }\n}\n",fragments:["FormRegisterAccreditationProfileFragment"]},FormRegisterAccreditationSlotFragment:{code:"fragment FormRegisterAccreditationSlot on IAccreditationsSlot {\n id\n accreditationId\n name\n date\n isBlocked\n isFull\n}\n",fragments:[]},FormRegisterCategoryFragment:{code:"fragment FormRegisterCategory on IPositionsCategory {\n id\n name\n description\n\n positions {\n ...FormRegisterPosition\n }\n}\n",fragments:["FormRegisterPositionFragment"]},FormRegisterCustomSlotFragment:{code:"fragment FormRegisterCustomSlot on CustomSlot {\n name\n startTime\n endTime\n}\n",fragments:[]},FormRegisterCustomSlotPeriodFragment:{code:"fragment FormRegisterCustomSlotPeriod on CustomSlotsPeriod {\n id\n name\n startDate\n endDate\n hideNameDates\n displayAsCalendar\n hasCondition\n conditionCustomFieldId\n conditionValue\n\n conditionCustomField {\n ...CustomFieldWithCondition\n }\n\n customSlots {\n ...FormRegisterCustomSlot\n }\n}\n",fragments:["CustomFieldWithConditionFragment","FormRegisterCustomSlotFragment"]},FormRegisterPositionFragment:{code:"fragment FormRegisterPosition on IPosition {\n id\n positionCategoryId\n name\n description\n acronym\n isVisible\n conditionsOperator\n positionDisplay\n tagsIds\n\n slots {\n ...FormRegisterSlot\n }\n\n conditionsCustomFields: positionsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n}\n",fragments:["FormRegisterSlotFragment"]},FormRegisterSlotFragment:{code:"fragment FormRegisterSlot on IPositionsSlot {\n id\n positionId\n name\n range\n nameOrRange\n isFull\n}\n",fragments:[]},FormSlotsOptionsFragment:{code:"fragment FormSlotsOptions on Form {\n slotDisplay\n minNumberOfSlots\n daysDisplay\n slotTitle\n slotSubtitle\n}\n",fragments:[]},FormUserInfoUserProfileFragment:{code:"fragment FormUserInfoUserProfile on FormsUsersInfo {\n organizationId\n eventId\n formId\n insertedAt\n teamCode\n\n teamMembers {\n ...UserInfoTeamMember\n }\n}\n",fragments:["UserInfoTeamMemberFragment"]},FormUserInfoWishedFragment:{code:"fragment FormUserInfoWished on UsersInfo {\n formUserInfo(formId: $formId) {\n insertedAt\n formId\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationsSlotsIds\n\n form {\n ...FormMemberRegistration\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n }\n\n positions {\n id\n name\n range\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FormUserOverlayFragment:{code:"fragment FormUserOverlay on Form {\n id\n name\n\n elements {\n ...FormElementDisplay\n }\n}\n",fragments:["FormElementDisplayFragment"]},FormsUsersInfosWishedFragment:{code:"fragment FormsUsersInfosWished on UsersInfo {\n formsUsersInfos(eventId: $eventId, level: Both) {\n insertedAt\n formId\n eventId\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationProfileId\n accreditationsSlotsIds\n\n form {\n ...FormMemberRegistration\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n index\n }\n\n accreditationCategory {\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n\n positionCategory {\n name\n }\n }\n\n positions {\n id\n name\n range\n\n category {\n name\n }\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n slots {\n startDate\n startTime\n endDate\n endTime\n range\n }\n }\n}\n",fragments:["FormMemberRegistrationFragment"]},FullPageInfoFragment:{code:"fragment FullPageInfo on PageInfo {\n hasNextPage\n hasPreviousPage\n}\n",fragments:[]},HistoryRowFragment:{code:"fragment HistoryRow on History {\n id\n action\n executedBy\n data\n details\n insertedAt\n\n user {\n id\n name\n email\n picture {\n url\n }\n }\n}\n",fragments:[]},LeaderAssignmentFragment:{code:'fragment LeaderAssignment on Leader {\n userInfo {\n id\n name\n email\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n }\n}\n',fragments:[]},LeaderInfosFragment:{code:"fragment LeaderInfos on Leader {\n role {\n id\n name\n }\n\n userInfo {\n ...LeaderUserInfo\n }\n}\n",fragments:["LeaderUserInfoFragment"]},LeaderUserInfoFragment:{code:"fragment LeaderUserInfo on UsersInfo {\n id\n userId\n ...UserInfoContactInformation\n nameOrEmail\n}\n",fragments:["UserInfoContactInformationFragment"]},MassEditCustomFieldFragment:{code:"fragment MassEditCustomField on CustomField {\n id\n name\n label\n slug\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},MemberAccreditationFragment:{code:"fragment MemberAccreditation on AccreditationsUsersInfo {\n accreditationSlot {\n name\n date\n }\n\n accreditation {\n name\n description\n acronym\n hasSlots\n }\n\n accreditationCategory {\n name\n }\n}\n",fragments:[]},MemberAssignmentFragment:{code:"fragment MemberAssignment on PositionsSlotsUsersInfo {\n position {\n name\n description\n address\n latitude\n longitude\n zoom\n layer\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n\n traces {\n ...Trace\n }\n }\n\n positionSlot {\n range\n }\n}\n",fragments:["LeaderAssignmentFragment","TraceFragment"]},MemberRegistrationUserInfoFragment:{code:"fragment MemberRegistrationUserInfo on UsersInfo {\n id\n userId\n ...UserInfoContactInformation\n nameOrEmail\n fields\n}\n",fragments:["UserInfoContactInformationFragment"]},OrganizationAdminInfosFragment:{code:"fragment OrganizationAdminInfos on Organization {\n name\n adminName\n adminEmail\n street\n postalCode\n city\n country\n timeZone\n emailSenderId\n dateFormat\n datetimeFormat\n timeFormat\n\n emailsSenders(isValidToSendEmail: true) {\n id\n name\n }\n}\n",fragments:[]},OrganizationBackofficeFragment:{code:"fragment OrganizationBackoffice on Organization {\n customBadges\n features\n id\n insertedAt\n isBlocked\n name\n numberOfEvents\n periodEndAt\n weezeventOrganizationId\n useOldBilling\n membersLimit\n pricePerMember\n billingComment\n\n membersStats {\n numberOfMembers\n }\n\n membersStats2024: membersStats(year: 2024) {\n numberOfMembers\n }\n\n users {\n id\n email\n }\n}\n",fragments:[]},OrganizationCertificateDefaultFragment:{code:"fragment OrganizationCertificateDefault on Organization {\n name\n adminName\n street\n city\n postalCode\n country\n}\n",fragments:[]},OrganizationCustomFieldsFragment:{code:"fragment OrganizationCustomFields on Organization {\n customFields(eventId: $eventId, variety: UserInfo, privacy: All) {\n nodes {\n ...SegmentCustomField\n }\n }\n}\n",fragments:["SegmentCustomFieldFragment"]},OrganizationDelegationsSpaceFragment:{code:"fragment OrganizationDelegationsSpace on IOrganization {\n name\n allowDelegationSpaceDownload\n delegationsSpaceCustomBadges\n\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:["DesignColorsFragment"]},OrganizationEmailRendererFragment:{code:"fragment OrganizationEmailRenderer on Organization {\n id\n name\n dateFormat\n datetimeFormat\n timeFormat\n timeZone\n customBadges\n}\n",fragments:[]},OrganizationEventsShowcaseFragment:{code:"fragment OrganizationEventsShowcase on OrganizationPublic {\n eventsShowcaseDesign: spaceDesign(spaceType: EventsShowcase) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n}\n",fragments:["DesignColorsFragment"]},OrganizationMemberFragment:{code:"fragment OrganizationMember on VolunteersRegistration {\n id\n ticketId\n exportedCustomDocumentsSlugs @include(if: $includeCustomDocuments)\n\n delegation {\n name\n }\n\n event {\n id\n name\n }\n\n positionsSlotsUsersInfos{\n positionSlot {\n name\n range\n }\n\n position {\n name\n }\n }\n\n userInfo {\n id\n name\n email\n fields\n\n picture {\n url\n }\n }\n}\n",fragments:[]},OrganizationMemberCustomDocumentFragment:{code:"fragment OrganizationMemberCustomDocument on CustomDocument {\n id\n eventId\n slug\n name\n populationsIds\n shouldRegenerateTicketIdOnDownload\n}\n",fragments:[]},OrganizationMembersSpaceFragment:{code:"fragment OrganizationMembersSpace on Organization {\n name\n\n membersSpaceDesign: spaceDesign(spaceType: MembersSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n\n hideAssignmentsUntilConfirmationEmailSent\n hideAccreditationsUntilConfirmationEmailSent\n membersSpaceExcludeAccreditations\n showMembersSpaceCommunity\n}\n",fragments:["DesignColorsFragment"]},PositionCategoryPositionFragment:{code:"fragment PositionCategoryPosition on Position {\n id\n assignedResources\n name\n range\n resources\n numberOfSlots\n}\n",fragments:[]},PositionPdfInfosFragment:{code:"fragment PositionPdfInfos on Position {\n id\n eventId\n name\n description\n range\n address\n latitude\n longitude\n zoom\n layer\n numberOfSlots\n assignedResources\n acronym\n\n leaders {\n ...LeaderAssignment\n }\n\n category {\n name\n\n leaders {\n ...LeaderAssignment\n }\n }\n}\n",fragments:["LeaderAssignmentFragment"]},PositionPlanningFragment:{code:"fragment PositionPlanning on Position {\n id\n name\n acronym\n color\n icon\n\n category {\n name\n }\n\n slots {\n id\n name\n range\n fillingRate\n assignedResources\n resources\n }\n}\n",fragments:[]},PositionPositionSlotFragment:{code:"fragment PositionPositionSlot on PositionsSlot {\n id\n positionCategoryId\n positionId\n assignedResources\n name\n range\n nameOrRange\n resources\n startDate\n startTime\n endDate\n endTime\n}\n",fragments:[]},PositionPositionsCustomFieldsFragment:{code:"fragment PositionPositionsCustomFields on Position {\n conditionsOperator\n\n conditionsCustomFields: positionsCustomFields {\n conditionValue\n\n customField {\n slug\n fieldType\n canSelectMultiple\n }\n }\n}\n",fragments:[]},PositionPositionsMapFragment:{code:"fragment PositionPositionsMap on Position {\n acronym\n color\n icon\n latitude\n longitude\n}\n",fragments:[]},PositionsPositionFragment:{code:"fragment PositionsPosition on Position {\n id\n name\n description @include(if: $includeDescription)\n range\n resources\n assignedResources\n address\n layer\n zoom\n latitude\n longitude\n acronym\n color\n icon\n isVisible\n state\n fillingRate\n numberOfSlots\n fields\n weezeventIsSynchronized\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n checkedOutRate @include(if: $includeCheckedOutRate)\n\n category {\n id\n name\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n name\n email\n nameOrEmail\n }\n }\n }\n\n createdBy @include(if: $includeCreatedBy) {\n email\n name\n }\n\n leaders @include(if: $includeLeaders) {\n userInfo {\n id\n name\n email\n nameOrEmail\n }\n }\n\n positionsCustomFields @include(if: $includeConditions) {\n ...PositionsPositionCustomField\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n\n traces @include(if: $includePositionTraces) {\n id\n name\n color\n }\n}\n",fragments:["PositionsPositionCustomFieldFragment"]},PositionsPositionCustomFieldFragment:{code:"fragment PositionsPositionCustomField on PositionsCustomField {\n conditionValue\n\n customField {\n name\n fieldType\n\n values {\n id\n value\n }\n }\n}\n",fragments:[]},PositionsPositionSlotFragment:{code:"fragment PositionsPositionSlot on PositionsSlot {\n id\n name\n startDate\n startTime\n endDate\n endTime\n range\n assignedResources\n resources\n fillingRate\n state\n weezeventChecklistId\n insertedAt\n\n checkedInRate @include(if: $includeCheckedInRate)\n checkedOutRate @include(if: $includeCheckedOutRate)\n\n position {\n ...PositionsPosition\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:["PositionsPositionFragment"]},PrintTriggerFormEventFragment:{code:"fragment PrintTriggerFormEvent on Event {\n printerGroups {\n __typename\n\n ... on PrinterGroupList {\n nodes {\n id\n name\n }\n }\n\n ... on PrinterGroupError {\n message\n }\n }\n\n zplDocuments {\n nodes {\n id\n name\n }\n }\n}\n",fragments:[]},PrintTriggerFormOrganizationFragment:{code:"fragment PrintTriggerFormOrganization on Organization {\n weezaccessPartners {\n __typename\n\n ... on WeezaccessPartnerList {\n nodes {\n id\n name\n }\n }\n\n ... on WeezaccessPartnerError {\n message\n }\n }\n}\n",fragments:[]},PrintTriggersPrintTriggerFragment:{code:"fragment PrintTriggersPrintTrigger on PrintTrigger {\n id\n insertedAt\n activationRange\n status\n\n createdBy {\n email\n name\n }\n\n weezaccessPartner {\n __typename\n ... on WeezaccessPartner {\n id\n name\n url\n }\n ... on WeezaccessPartnerError {\n message\n }\n }\n\n printerGroup {\n __typename\n ... on PrinterGroup {\n id\n name\n }\n ... on PrinterGroupError {\n message\n }\n }\n\n document {\n __typename\n ... on CustomDocument {\n name\n }\n ... on EventsDocument {\n documentType\n }\n ... on ZplDocument {\n name\n }\n }\n}\n",fragments:[]},PsuiUserHoursFragment:{code:"fragment PsuiUserHours on PositionsSlotsUsersInfo {\n breakTime\n checkInAt\n checkOutAt\n timeDifferenceMinutes\n\n positionSlot {\n range\n }\n\n position {\n name\n }\n}\n",fragments:[]},PsuiUserPlanningFragment:{code:"fragment PsuiUserPlanning on PositionsSlotsUsersInfo {\n id\n\n positionSlot {\n name\n range\n }\n\n position {\n name\n color\n }\n}\n",fragments:[]},SegmentCampaignFragment:{code:"fragment SegmentCampaign on Campaign {\n id\n name\n campaignType\n}\n",fragments:[]},SegmentCustomFieldFragment:{code:"fragment SegmentCustomField on CustomField {\n id\n slug\n name\n label\n fieldType\n fieldSubtype\n listType\n fileType\n fieldProperty\n canSelectMultiple\n isSelectV2\n isEncrypted\n validationRules\n\n category {\n id\n name\n }\n\n values {\n id\n value\n color\n }\n}\n",fragments:[]},SegmentEventFragment:{code:"fragment SegmentEvent on Event {\n id\n name\n}\n",fragments:[]},SegmentFormFragment:{code:"fragment SegmentForm on Form {\n id\n name\n}\n",fragments:[]},SegmentsFoldersSegmentsFragment:{code:"fragment SegmentsFoldersSegments on SegmentsFolder {\n id\n name\n\n segments {\n id\n segmentFolderId\n name\n predicatesGroups\n columns\n columnsExport\n columnsSearch\n sort\n count\n rendering\n description\n isUsedInWorkflow\n infos\n }\n}\n",fragments:[]},SpaceDesignFragment:{code:"fragment SpaceDesign on Design {\n banner {\n acl\n name\n key\n }\n\n logo {\n acl\n name\n key\n }\n\n ...DesignColors\n}\n",fragments:["DesignColorsFragment"]},TraceFragment:{code:"fragment Trace on Trace {\n id\n name\n color\n points\n direction\n startAt\n firstRunnerPace\n lastRunnerPace\n}\n",fragments:[]},TranslationFragment:{code:"fragment Translation on Translation {\n id\n translationType\n module\n fr\n en\n es\n de\n nl\n isFrTranslated\n isEnTranslated\n isEsTranslated\n isDeTranslated\n isNlTranslated\n frString\n enString\n esString\n deString\n nlString\n}\n",fragments:[]},UpdateUserFormFragment:{code:"fragment UpdateUserForm on Form {\n id\n name\n areTeamsAllowed\n delegationsIds\n\n elements {\n ...FormElementDisplay\n }\n}\n",fragments:["FormElementDisplayFragment"]},UserAllPermissionsFragment:{code:"fragment UserAllPermissions on UsersInfo {\n usersOrganizations {\n id\n sendNotifications\n\n group {\n id\n name\n }\n\n role {\n id\n name\n type\n }\n }\n\n usersEvents(eventId: $eventId) {\n id\n\n group {\n id\n name\n }\n\n event {\n id\n name\n }\n\n role {\n id\n name\n type\n }\n }\n\n usersDelegations(eventId: $eventId) {\n id\n eventId\n userInfoId\n\n delegation {\n name\n }\n }\n\n usersDelegationsCategories(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n delegationCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositionsCategories(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n positionCategory {\n name\n }\n\n role {\n id\n name\n }\n }\n\n usersPositions(eventId: $eventId) {\n id\n eventId\n\n group {\n id\n name\n }\n\n position {\n name\n }\n\n role {\n id\n name\n }\n }\n}\n",fragments:[]},UserInfoCommunityFragment:{code:'fragment UserInfoCommunity on UsersInfo {\n id\n localId\n name\n email\n nameOrEmail\n fields\n lastSeenAt\n insertedAt\n phone: fieldValue(slug: "phone")\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n picture {\n url\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n events @include(if: $includeEvents) {\n id\n name\n }\n\n duplicatedFrom @include(if: $includeDuplicatedFrom) {\n id\n email\n name\n\n picture {\n url\n }\n }\n\n delegations(level: Organization) @include(if: $includeDelegations) {\n id\n name\n\n delegationCategory {\n id\n name\n }\n }\n\n emails(emailTypes: [Campaign], level: Organization) @include(if: $includeEmails) {\n id\n state\n\n campaign {\n name\n }\n }\n\n formsUsersInfos(level: Organization) @include(if: $includeForms) {\n id\n insertedAt\n\n form {\n id\n name\n }\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n}\n',fragments:["UserAllPermissionsFragment"]},UserInfoContactInformationFragment:{code:"fragment UserInfoContactInformation on UsersInfo {\n ...UserInfoNameAndPicture\n email\n phone {\n internationalFormat\n }\n}\n",fragments:["UserInfoNameAndPictureFragment"]},UserInfoDocumentFragment:{code:'fragment UserInfoDocument on UsersInfo {\n id\n localId\n ...UserInfoContactInformation\n nameOrEmail\n language: fieldValue(slug: "language")\n fields(expand: true)\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n}\n',fragments:["UserInfoContactInformationFragment","UserInfoLinksFragment"]},UserInfoEmailRendererFragment:{code:"fragment UserInfoEmailRenderer on UsersInfo {\n id\n localId\n email\n fields\n registrationDate(eventId: $eventId)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n user {\n id\n language\n }\n}\n",fragments:["UserInfoLinksFragment"]},UserInfoFormFragment:{code:"fragment UserInfoForm on UsersInfo {\n id\n localId\n email\n nameOrEmail\n fields\n registrationDate(eventId: $eventId)\n canAccess(formId: $formId)\n}\n",fragments:[]},UserInfoLinksFragment:{code:"fragment UserInfoLinks on UserInfoDocumentLink {\n userAssignmentsLink\n userBadgeLink\n userCertificateLink\n userCustomBadgeLinks\n userCustomDocumentLinks\n userHoursLink\n userPlanningLink\n userPlanningDaysLink\n userPlanningListLink\n}\n",fragments:[]},UserInfoNameAndPictureFragment:{code:"fragment UserInfoNameAndPicture on UsersInfo {\n name\n picture {\n url\n }\n}\n",fragments:[]},UserInfoOrganizationFragment:{code:"fragment UserInfoOrganization on UsersInfo {\n id\n userId\n name\n email\n nameOrEmail\n\n ...UserAllPermissions\n\n groups {\n id\n name\n }\n\n picture {\n url\n }\n}\n",fragments:["UserAllPermissionsFragment"]},UserInfoOverlayFragment:{code:'fragment UserInfoOverlay on UsersInfo {\n id\n name\n email\n nameOrEmail\n fields\n phone: fieldValue(slug: "phone")\n population: fieldValue(slug: "population")\n language: fieldValue(slug: "language")\n\n picture {\n url\n }\n}\n',fragments:[]},UserInfoTeamMemberFragment:{code:"fragment UserInfoTeamMember on UsersInfo {\n id\n ...UserInfoContactInformation\n}\n",fragments:["UserInfoContactInformationFragment"]},UserInfoTeamRightPanelFragment:{code:"fragment UserInfoTeamRightPanel on VolunteersRegistration {\n positionsCategories {\n positions {\n id\n name\n icon\n color\n\n slots {\n id\n name\n range\n }\n }\n }\n\n positions {\n id\n name\n icon\n color\n\n slots {\n id\n name\n range\n }\n }\n\n positionsSlots {\n id\n name\n range\n\n position {\n id\n name\n icon\n color\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlot {\n id\n name\n range\n }\n\n position {\n id\n name\n icon\n color\n }\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},UserInfoUpdateMemberFragment:{code:"fragment UserInfoUpdateMember on UsersInfo {\n id\n email\n name\n fields\n userId\n\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n accreditationProfileId\n accreditationsSlotsIds\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n }\n }\n\n positionsSlots {\n nameOrRange\n\n position {\n id\n name\n }\n }\n\n positions {\n id\n name\n range\n }\n\n positionsCategories {\n id\n name\n range\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n volunteerRegistration(eventId: $eventId) {\n accreditationsUsersInfos {\n accreditationSlotId\n checkInAt\n }\n }\n}\n",fragments:["CreateUpdateMemberFormFragment"]},UserPanelAccreditationSlotUserInfoFragment:{code:"fragment UserPanelAccreditationSlotUserInfo on AccreditationsUsersInfo {\n id\n eventId\n isAutoAccredit\n isWorkflow\n checkInAt\n insertedAt\n checkInAt\n state\n\n accreditationCategory {\n name\n }\n\n accreditation {\n id\n name\n color\n icon\n index\n }\n\n accreditationSlot {\n id\n name\n date\n }\n\n accreditationProfile {\n id\n name\n }\n\n createdBy {\n email\n name\n }\n}\n",fragments:[]},UserPermissionsFragment:{code:"fragment UserPermissions on User {\n roles(organizationId: $organizationId, eventId: $eventId) {\n id\n accessLevel\n type\n permissions\n }\n\n usersDelegationsCategories(eventId: $eventId) {\n delegationCategoryId\n roleId\n }\n\n usersEvents(eventId: $eventId) {\n eventId\n roleId\n }\n\n usersPositionsCategories(eventId: $eventId) {\n positionCategoryId\n roleId\n }\n\n usersPositions(eventId: $eventId) {\n positionId\n roleId\n }\n}\n",fragments:[]},UserPositionSlotUserInfoFragment:{code:"fragment UserPositionSlotUserInfo on PositionsSlotsUsersInfo {\n breakTime\n checkInAt\n checkOutAt\n eventId\n id\n insertedAt\n isAutoAssign\n isWorkflow\n organizationId\n positionCategoryId\n positionSlotId\n state\n timeDifferenceMinutes\n userInfoId\n\n createdBy {\n email\n name\n }\n\n position {\n id\n acronym\n color\n icon\n name\n }\n\n positionSlot {\n id\n name\n range\n }\n\n positionCategory {\n id\n name\n }\n}\n",fragments:[]},VolunteerInfosFragment:{code:'fragment VolunteerInfos on VolunteersRegistration {\n delegation {\n id\n name\n }\n\n userInfo {\n id\n name\n email\n phone: fieldValue(slug: "phone")\n picture {\n url\n }\n }\n}\n',fragments:[]},VolunteerPdfFragment:{code:"fragment VolunteerPdf on VolunteersRegistration {\n delegation {\n name\n }\n\n teams {\n teamCode\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n fields\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationFragment:{code:"fragment VolunteerRegistration on VolunteersRegistration {\n id\n localId\n ticketId\n ticketIdVersion\n state\n accreditationState\n insertedAt\n canDelete\n canRegistrationStateUpdate @include(if: $includeCanRegistrationStateUpdate)\n numberOfAccreditations @include(if: $includeNumberOfAccreditations)\n numberOfAssignments @include(if: $includeNumberOfAssignments)\n numberOfAssignmentsDays @include(if: $includeNumberOfAssignmentsDays)\n numberOfAvailableDays @include(if: $includeNumberOfAvailableDays)\n shortTag\n pairedAt\n volunteerMinutes @include(if: $includeVolunteerMinutes)\n weezeventPayUrl @include(if: $includeWeezeventUrls)\n weezeventTicketUrl @include(if: $includeWeezeventUrls)\n delegationBannerNumber @include(if: $includeDelegation)\n exportedCustomDocumentsSlugs @include(if: $includeCustomDocuments)\n accreditationProfileId\n wishedAccreditationProfileId @include(if: $includeAccreditationsMatrix)\n\n delegation @include(if: $includeDelegation) {\n id\n name\n\n delegationCategory {\n id\n name\n }\n }\n\n userInfo {\n id\n localId\n userId\n organizationId\n email\n name\n nameOrEmail\n fields\n isEditable @include(if: $includeIsEditable)\n insertedAt\n\n picture @include(if: $includePicture) {\n url\n }\n\n ...UserAllPermissions @include(if: $includeRoles)\n\n links(eventId: $eventId) {\n ...UserInfoLinks\n }\n\n comments @include(if: $includeComments) {\n content\n }\n\n emails(\n emailTypes: [Campaign]\n level: Event\n eventId: $eventId\n delegationId: $delegationId\n ) @include(if: $includeEmails) {\n id\n state\n\n campaign {\n name\n }\n }\n\n formsUsersInfos(level: Event, eventId: $eventId) @include(if: $includeFormsUsersInfos) {\n id\n insertedAt\n\n accreditationProfile @include(if: $includeAccreditationProfile) {\n ...AccreditationProfileVolunteerRegistration\n }\n\n form @include(if: $includeForms) {\n id\n name\n slotDisplay\n }\n\n slots @include(if: $includeAvailability) {\n id\n range\n }\n\n teamMembers @include(if: $includeTeam) {\n ...UserInfoTeamMember\n }\n }\n\n tags @include(if: $includeTags) {\n id\n name\n }\n }\n\n accreditationProfile @include(if: $includeAccreditationProfile) {\n ...AccreditationProfileVolunteerRegistration\n }\n\n accreditationsUsersInfos(\n delegationId: $delegationId\n onlyVisible: $onlyVisibleAccreditationsSlots\n ) @include(if: $includeAccreditations) {\n checkInAt\n\n accreditationSlot {\n ...AccreditationSlotVolunteerRegistration\n }\n }\n\n matrixAuis: accreditationsUsersInfos(\n delegationId: $delegationId\n onlyVisible: $onlyVisibleAccreditationsSlots\n ) @include(if: $includeAccreditationsMatrix) {\n accreditationSlotId\n isAutoAccredit\n accreditationProfileId\n checkInAt\n }\n\n accreditationsSlots(delegationId: $delegationId, onlyVisible: $onlyVisibleAccreditationsSlots)\n @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n matrixWishedSlots: accreditationsSlots @include(if: $includeAccreditationsMatrix) {\n id\n }\n\n duplicatedFrom @include(if: $includeDuplicatedFrom) {\n userInfo {\n id\n email\n name\n\n picture {\n url\n }\n }\n }\n\n positionsSlotsUsersInfos @include(if: $includePositions) {\n ...UserPositionSlotUserInfo\n }\n\n positionsCategories @include(if: $includeWishedPositions) {\n id\n name\n }\n\n positions @include(if: $includeWishedPositions) {\n id\n acronym\n color\n icon\n name\n }\n\n positionsSlots @include(if: $includeWishedPositions) {\n id\n name\n range\n\n position {\n acronym\n color\n icon\n name\n }\n }\n\n preassignPositionsCategories @include(if: $includePreassignedPositions) {\n id\n name\n }\n\n preassignPositions @include(if: $includePreassignedPositions) {\n id\n name\n }\n\n teams @include(if: $includeTeam) {\n teamCode\n }\n\n weezaccessChecklists @include(if: $includeWeezeventChecklists) {\n id\n name\n }\n}\n",fragments:["UserAllPermissionsFragment","UserInfoLinksFragment","AccreditationProfileVolunteerRegistrationFragment","UserInfoTeamMemberFragment","AccreditationSlotVolunteerRegistrationFragment","UserPositionSlotUserInfoFragment"]},VolunteerRegistrationDelegationAccreditationProfileFragment:{code:"fragment VolunteerRegistrationDelegationAccreditationProfile on VolunteersRegistration {\n id\n accreditationProfileId\n wishedAccreditationProfileId\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationDelegationAccreditationSlotFragment:{code:"fragment VolunteerRegistrationDelegationAccreditationSlot on VolunteersRegistration {\n id\n\n accreditationsSlots {\n id\n }\n\n accreditationsUsersInfos {\n accreditationSlotId\n }\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationEmailRendererFragment:{code:"fragment VolunteerRegistrationEmailRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n accreditationProfile {\n ...AccreditationProfileEmail\n }\n\n delegation {\n ...DelegationEmail\n }\n}\n",fragments:["AccreditationProfileEmailFragment","DelegationEmailFragment"]},VolunteerRegistrationWaitingAssignmentFragment:{code:"fragment VolunteerRegistrationWaitingAssignment on VolunteersRegistration {\n insertedAt\n\n userInfo {\n id\n ...UserInfoContactInformation\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationWeezeventFragment:{code:"fragment VolunteerRegistrationWeezevent on VolunteersRegistration {\n id\n localId\n state\n accreditationState\n ticketId\n weezevent\n\n accreditationProfile {\n name\n\n accreditationProfileCategory {\n name\n }\n }\n\n accreditationsUsersInfos {\n accreditationSlotId\n accreditationCategoryId\n\n accreditationCategory {\n id\n name\n }\n\n accreditation {\n id\n name\n fields\n }\n }\n\n positionsSlotsUsersInfos {\n positionSlotId\n\n positionCategory {\n id\n name\n }\n\n position {\n id\n name\n }\n }\n\n delegation {\n name\n\n delegationCategory {\n name\n }\n }\n\n userInfo {\n id\n localId\n ...UserInfoContactInformation\n fieldsExpanded: fields(expand: true)\n }\n}\n",fragments:["UserInfoContactInformationFragment"]},VolunteerRegistrationZplRendererFragment:{code:"fragment VolunteerRegistrationZplRenderer on VolunteersRegistration {\n localId\n ticketId\n weezevent\n\n accreditationsUsersInfos {\n accreditation {\n id\n }\n accreditationSlot {\n id\n }\n }\n\n delegation {\n ...DelegationEmail\n }\n\n userInfo {\n id\n localId\n email\n fields\n registrationDate\n }\n}\n",fragments:["DelegationEmailFragment"]},WishesEmailFragment:{code:"fragment WishesEmail on FormsUsersInfo {\n form {\n slotDisplay\n }\n\n positionsCategories {\n name\n }\n\n positions {\n name\n }\n\n positionsSlots {\n name\n range\n\n position {\n name\n }\n }\n\n slots {\n range\n }\n\n accreditationsSlots {\n name\n date\n\n accreditation {\n name\n }\n }\n}\n",fragments:[]},WorkflowsWorkflowFragment:{code:"fragment WorkflowsWorkflow on Workflow {\n id\n name\n state\n trigger\n action\n frequency\n executedAt\n insertedAt\n\n createdBy {\n email\n name\n }\n\n data {\n errorMessage\n }\n\n accreditationsSlots @include(if: $includeAccreditations) {\n ...AccreditationSlotVolunteerRegistration\n }\n\n campaign @include(if: $includeCampaign) {\n id\n name\n }\n\n customField @include(if: $includeCustomField) {\n id\n name\n }\n\n positionsSlots @include(if: $includePositions) {\n id\n name\n range\n\n position {\n acronym\n color\n icon\n name\n }\n }\n\n segment {\n id\n name\n segmentType\n }\n}\n",fragments:["AccreditationSlotVolunteerRegistrationFragment"]},ZapierMemberFragment:{code:"fragment ZapierMember on UsersInfo {\n id\n fields(expand: true)\n email\n insertedAt\n updatedAt\n deletedAt\n}\n",fragments:[]}};function Na(e){return e.flatMap(e=>[e.code].concat(Na(e.fragments.map(e=>ka[e]))))}function za(e){return(0,$a.A)(Na(e)).join(" ")}const La="yyyy-MM-dd",Fa="yyyy-MM-dd'T'HH:mm",Ua="yyyy-MM-dd'T'HH:mm:ss";function Ba(e){const[t,n]=JSON.parse(e);return wa.IX.fromDateTimes(wa.c9.fromISO(t,{zone:"UTC"}),wa.c9.fromISO(n,{zone:"UTC"}))}function Va({startDate:e,startTime:t,endDate:n,endTime:i}){try{const[a,s]=t.split(":"),[o,r]=i.split(":");return wa.IX.fromDateTimes(e.set({hour:parseInt(a,10),minute:parseInt(s,10)}),n.set({hour:parseInt(o,10),minute:parseInt(r,10)}))}catch{return wa.IX.invalid("Invalid")}}function Ga(e){return wa.IX.isInterval(e)?e:Va(e)}function Wa(e){return{startDate:e.start.set({hour:0,minute:0,second:0}),startTime:e.start.toFormat("HH:mm:ss"),endDate:e.end.set({hour:0,minute:0,second:0}),endTime:e.end.toFormat("HH:mm:ss")}}const qa=(e,t)=>e.contains(t)||e.start.startOf("day").toMillis()===t.startOf("day").toMillis()||e.end.minus({minute:1}).startOf("day").toMillis()===t.startOf("day").toMillis(),Ya={DateOnly:{Numeric:{year:"numeric",month:"2-digit",day:"2-digit"},MonthLong:{year:"numeric",month:"long",day:"numeric"},MonthShort:{year:"numeric",month:"short",day:"numeric"},WeekdayLongMonthLong:{year:"numeric",month:"long",day:"numeric",weekday:"long"},WeekdayShortMonthLong:{year:"numeric",month:"long",day:"numeric",weekday:"short"},WeekdayShortMonthShort:{year:"numeric",month:"short",day:"numeric",weekday:"short"},MonthLongYear:{year:"numeric",month:"long"}},TimeOnly:{hour:"2-digit",minute:"2-digit"},DateTime:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit"},FullDateTime:{year:"numeric",month:"long",day:"numeric",hour:"2-digit",minute:"2-digit",second:"2-digit"},ShortDateTime:{year:"numeric",month:"numeric",day:"numeric",hour:"2-digit",minute:"2-digit"}};function Ha(e){return"string"==typeof e?wa.c9.fromISO(e,{setZone:!0}):e}function Za(){return wa.c9.utc().toLocal().zoneName}function Ka(e){return"string"==typeof e&&e.startsWith("[")}function Qa(e){if(!0===Array.isArray(e))return e.map(e=>null!=e&&"object"==typeof e?Qa(e):e);if("boolean"==typeof e||"number"==typeof e||"string"==typeof e||null===e)return e;{const t={};return Object.keys(e).forEach(n=>{const i=e[n];_i.includes(n)||Ii.includes(n)?t[n]=i&&wa.c9.fromISO(i,{zone:"UTC"}):xi.includes(n)?Array.isArray(i)?t[n]=i.map(e=>Ka(e)?Ba(e):e):t[n]=Ka(i)?Ba(i):i:yi.includes(n)?t[n]=i&&wa.dw.fromISO(i):t[n]=null!=i&&"object"==typeof i?Qa(i):i}),t}}const Xa="ef9dfc033afa7f49f937724b5e18f4e49054ffde\n".trim(),Ja="x-heavent-commit-sha",es="x-heavent-request-uuid",ts="x-user-token";function ns(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,e=>{const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)})}var is=n(7405),as=n(5002);const ss="heavent-user-session-key",os="heavent-user-email",rs="UserNotFoundException";let ls=null;const ds=()=>(null===ls&&(ls=new as.NE({UserPoolId:ia.COGNITO_USER_POOL_ID,ClientId:ia.COGNITO_USER_POOL_CLIENT_ID})),ls);function cs(){return new Promise((e,t)=>{const n=ds().getCurrentUser();null!==n?n.getSession((i,a)=>{i||!1===a?.isValid()?t(new Error("Could not get current user")):e({user:n,token:a.getIdToken().getJwtToken()})}):t(new Error("Could not get current user"))})}async function us(){try{const e=localStorage.getItem("heavent-test-token");return h(e)?e:(await cs()).token}catch{return}}function ms(){cs().then(({user:e})=>{e.signOut(),location.reload()}).catch(()=>{alert("Something wrong happened ")})}function gs(){return cs().then(({user:e})=>{e.signOut()})}function hs(e,t,n){return new Promise((i,a)=>{const s=new as.TU({Username:e,Pool:ds()}),o=new as.By({Username:e}),r={onSuccess(e){t(e.getIdToken().getJwtToken())},onFailure(e){e.code===rs?a(rs):n(e)},customChallenge(){localStorage.setItem(os,e),localStorage.setItem(ss,s.Session),i({user:s,callbacks:r})}};s.setAuthenticationFlowType("CUSTOM_AUTH"),s.initiateAuth(o,r)})}async function ps(e,t,n){try{return await hs(e,t,n)}catch(i){if(i!==rs)throw i;try{return await function(e,t){const n=e.trim().toLowerCase();return new Promise((e,i)=>{const a=[new as.HB({Name:"email",Value:n})];ds().signUp(n,t,a,[],(t,n)=>{t?i(t):e(n.user)})})}(e,ns().toString()),await hs(e,t,n)}catch{throw new Error("Auth failure")}}}function fs({code:e,user:t,callbacks:n}){return new Promise((i,a)=>{t.sendCustomChallengeAnswer(e,{...n,onSuccess:(...e)=>{n.onSuccess(...e),i(e)},onFailure:e=>{n.onFailure(e),a({type:"FAILED",error:e})},customChallenge:(...e)=>{n.customChallenge&&n.customChallenge(...e),a({type:"RETRY"})}})}).then(([e])=>e.getIdToken().getJwtToken())}function Is(e,t,n){!async function(e){await fetch(`${ia.HEAVENT_API_URL}/log/report`,{method:"post",headers:{"Content-Type":"application/json"},body:JSON.stringify(e)})}({message:"Could not auth",errorMessage:e,email:t,location:location.href,diff:Math.round((Date.now()-n)/1e3),userAgent:navigator.userAgent})}async function _s(e,t={}){let n=ia.HEAVENT_API_URL.href;const i=new URL(location.href).searchParams,a=`${e} ${F(t.fragments)?za(t.fragments):""}`,s=ns(),o={"Content-Type":"application/json",[Ja]:Xa,[es]:s};i.has("lang")&&(n=`${n}?lang=${i.get("lang")}`),t.token&&(o[ts]=t.token);const r=await fetch(n,{method:"post",headers:o,body:JSON.stringify({query:a,variables:t.variables||{}})});if(r.ok){t.reloadOnNewVersion&&"true"===r.headers.get("x-heavent-new-version")&&document.body.dispatchEvent(new CustomEvent("h-new-version",{bubbles:!0}));const e=await r.json();if(e.errors){const t=e.errors[0]?.message??"";if("You need to be logged-in"===t)return localStorage.clear(),location.href="/crew",{};if(t.startsWith("You do not have access to this"))return location.href="/crew",{};throw Ra(e.errors,s)}{const t=(0,is.A)(e.data),n={};return t.forEach(t=>{n[t]=Qa(e.data[t])}),n}}throw Ra(new Error(r.statusText),s)}function xs(e,t,n){const i=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");return(0,l.useMemo)(()=>us().then(i=>_s(e,{variables:t,token:i||void 0,fragments:n})),[e,i])}const ys="mutation UserCreate {\n userCreate {\n id\n email\n }\n}\n";function Ss(e={}){return Ti("mutation VolunteersRegistrationsMassAccredit(\n $eventId: EventId!\n $massAccredit: MassAccreditInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccredit(\n eventId: $eventId\n massAccredit: $massAccredit\n )\n}\n",e)}function js(e={}){return Ti("mutation UsersInfosMassDelegationDelete(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $selecteds: MassActionSelectedsInput!\n $deleteFromEvent: Boolean\n) {\n usersInfosMassDelegationDelete(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n deleteFromEvent: $deleteFromEvent\n )\n}\n",e)}function vs(e){return Ei("query OrganizationParametersInfos($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n ...OrganizationAdminInfos\n }\n}\n",e,[ka.OrganizationAdminInfosFragment])}function bs(e={}){return Ti("mutation PositionsSlotsUsersInfosCheckIn($eventId: EventId!, $checkIn: PositionSlotCheckInInput!) {\n numberOfMembers: positionsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}function As(e){return Ei("query UserPositions(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n hideAssignmentsUntilConfirmationEmailSent\n\n userInfo(id: $userInfoId) {\n ...FormsUsersInfosWished\n }\n }\n\n event(id: $eventId) {\n name\n startAt\n endAt\n dayStartTime\n hasFormWithPositionDisplay\n hasFormWithSlotDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n id\n volunteerMinutes\n isAssignmentsEmailSent\n\n positionsSlotsUsersInfos {\n ...UserPositionSlotUserInfo\n }\n\n preassignPositions {\n id\n name\n range\n }\n\n preassignPositionsCategories {\n id\n name\n range\n }\n }\n }\n}\n",e,[ka.FormsUsersInfosWishedFragment,ka.UserPositionSlotUserInfoFragment])}function Cs(e,t){return _s("query ConditionsCustomFields(\n $organizationId: OrganizationId!\n $eventId: EventId\n $fieldTypes: [FieldType!]\n) {\n organization(id: $organizationId) {\n customFields(eventId: $eventId, variety: UserInfo, privacy: All, fieldTypes: $fieldTypes) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function Es(e={}){return Ti("mutation FormRegister(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $formId: FormId!\n $email: UserEmail!\n $formRegister: FormRegisterInput!\n) {\n formRegister(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n formId: $formId\n email: $email\n formRegister: $formRegister\n ) {\n teamCode\n }\n}\n",e)}function Ts(e,t){return _s("query User(\n $organizationId: OrganizationId!\n $eventId: EventId\n $id: UsersInfoId!\n $includeComments: Boolean!\n $includeDelegations: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n row: userInfo(id: $id) {\n ...UserInfoCommunity\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.UserInfoCommunityFragment]})}function Ms(e,t){return _s("query Users(\n $organizationId: OrganizationId!\n $eventId: EventId\n $predicatesGroups: PredicatesGroups!\n $name: String\n $columnsSearch: [String!]\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $includeComments: Boolean!\n $includeDelegations: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeEvents: Boolean!\n $includeForms: Boolean!\n $includeTags: Boolean!\n $includeRoles: Boolean!\n) {\n data: organization(id: $organizationId) {\n rows: usersInfos(\n predicatesGroups: $predicatesGroups\n name: $name\n columnsSearch: $columnsSearch\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...UserInfoCommunity\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.UserInfoCommunityFragment]})}function Rs(e={}){return Ti("mutation EmailUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $email: UserEmail!\n) {\n emailUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n userInfoId: $userInfoId\n email: $email\n )\n}\n",e)}function Ds(e,t){return _s("query EventAccreditationsSlots($eventId: EventId!, $loadIsBlocked: Boolean!) {\n event(id: $eventId) {\n accreditationsCategories {\n id\n name\n\n accreditations {\n id\n name\n acronym\n accreditationDisplay\n index\n\n slots(includeHidden: true) {\n id\n name\n date\n isBlocked @include(if: $loadIsBlocked)\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function Os(e,t){return _s("query EventPositionsSlots($eventId: EventId!) {\n event(id: $eventId) {\n positionsCategories {\n id\n name\n\n positions {\n id\n name\n acronym\n positionDisplay\n\n slots {\n id\n name\n range\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}function ws(e={}){return Ti("mutation LoginCodeEmailCreate($loginCodeEmail: LoginCodesEmailInput!) {\n loginCodeEmailCreate(loginCodeEmail: $loginCodeEmail) {\n insertedAt\n }\n}\n",e)}function Ps(e={}){return Ti("mutation VolunteersRegistrationsAccreditationsValidate(\n $eventId: EventId!\n $delegationId: DelegationId\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsAccreditationsValidate(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n )\n}\n",e)}function $s(e={}){return Ti("mutation VolunteersRegistrationsMassAssign($eventId: EventId!, $massAssign: MassAssignInput!) {\n numberOfMembers: volunteersRegistrationsMassAssign(eventId: $eventId, massAssign: $massAssign)\n}\n",e)}function ks(e={}){return Ti("mutation VolunteersRegistrationsMassDelegationAdd(\n $eventId: EventId!\n $delegationId: DelegationId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelegationAdd(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n )\n}\n",e)}function Ns(e={}){return Ti("mutation VolunteerRegistrationUpdateField(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $slug: String!\n $value: JSON!\n) {\n volunteerRegistrationUpdateField(\n eventId: $eventId\n volunteerRegistrationId: $volunteerRegistrationId\n slug: $slug\n value: $value\n ) {\n id\n }\n}\n",e)}function zs(e,t){return _s("query Volunteer(\n $eventId: EventId!\n $id: VolunteersRegistrationId!\n $delegationId: DelegationId\n $includeAccreditationProfile: Boolean!\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeCustomDocuments: Boolean!\n $includeDelegation: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeFormsUsersInfos: Boolean!\n $includeForms: Boolean!\n $includeIsEditable: Boolean!\n $includeNumberOfAccreditations: Boolean!\n $includeNumberOfAssignments: Boolean!\n $includeNumberOfAssignmentsDays: Boolean!\n $includeNumberOfAvailableDays: Boolean!\n $includePicture: Boolean!\n $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n row: volunteerRegistration(id: $id) {\n ...VolunteerRegistration\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.VolunteerRegistrationFragment]})}function Ls(e,t){return _s("query Volunteers(\n $eventId: EventId!\n $predicatesGroups: PredicatesGroups!\n $limit: Int\n $offset: Int\n $sort: VolunteersRegistrationsSort\n $name: String\n $columnsSearch: [String!]\n $positionCategoryId: PositionsCategoryId\n $positionId: PositionId\n $preassignedPositionCategoryId: PositionsCategoryId\n $preassignedPositionId: PositionId\n $accreditationsCategoriesIds: [AccreditationsCategoryId!]\n $accreditationsIds: [AccreditationId!]\n $accreditationsSlotsIds: [AccreditationsSlotId!]\n $accreditationsProfilesCategoriesIds: [AccreditationsProfilesCategoryId!]\n $accreditationsProfilesIds: [AccreditationsProfileId!]\n $delegationCategoryId: DelegationsCategoryId\n $delegationId: DelegationId\n $hasCoordinates: Boolean\n $includeAccreditationProfile: Boolean!\n $onlyVisibleAccreditationsSlots: Boolean\n $includeAccreditations: Boolean!\n $includeAccreditationsMatrix: Boolean!\n $includeAvailability: Boolean!\n $includeCanRegistrationStateUpdate: Boolean!\n $includeComments: Boolean!\n $includeCustomDocuments: Boolean!\n $includeDelegation: Boolean!\n $includeDuplicatedFrom: Boolean!\n $includeEmails: Boolean!\n $includeFormsUsersInfos: Boolean!\n $includeForms: Boolean!\n $includeIsEditable: Boolean!\n $includeNumberOfAccreditations: Boolean!\n $includeNumberOfAssignments: Boolean!\n $includeNumberOfAssignmentsDays: Boolean!\n $includeNumberOfAvailableDays: Boolean!\n $includePicture: Boolean!\n $includePositions: Boolean!\n $includeRoles: Boolean!\n $includeTags: Boolean!\n $includeTeam: Boolean!\n $includeTraces: Boolean!\n $includeVolunteerMinutes: Boolean!\n $includeWishedPositions: Boolean!\n $includePreassignedPositions: Boolean!\n $includeWeezeventChecklists: Boolean!\n $includeWeezeventUrls: Boolean!\n) {\n data: event(id: $eventId) {\n layer\n latitude\n longitude\n\n rows: volunteersRegistrations(\n predicatesGroups: $predicatesGroups\n name: $name\n columnsSearch: $columnsSearch\n positionCategoryId: $positionCategoryId\n positionId: $positionId\n preassignedPositionCategoryId: $preassignedPositionCategoryId\n preassignedPositionId: $preassignedPositionId\n accreditationsCategoriesIds: $accreditationsCategoriesIds\n accreditationsIds: $accreditationsIds\n accreditationsSlotsIds: $accreditationsSlotsIds\n accreditationsProfilesCategoriesIds: $accreditationsProfilesCategoriesIds\n accreditationsProfilesIds: $accreditationsProfilesIds\n delegationCategoryId: $delegationCategoryId\n delegationId: $delegationId\n hasCoordinates: $hasCoordinates\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n ...VolunteerRegistration\n }\n\n numberOfPages\n totalCount\n }\n\n traces @include(if: $includeTraces) {\n ...Trace\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.VolunteerRegistrationFragment,ka.TraceFragment]})}function Fs(e={}){return Ti("mutation VolunteersRegistrationsMassWishedAccreditationsUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $massAccredit: MassAccreditInput!\n) {\n volunteersRegistrationsMassWishedAccreditationsUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massAccredit: $massAccredit\n )\n}\n",e)}function Us(e={}){return Ti("mutation VolunteersRegistrationsMassWishedProfileUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $massProfileUpdate: MassAccreditationProfileUpdateInput!\n) {\n volunteersRegistrationsMassWishedProfileUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massProfileUpdate: $massProfileUpdate\n )\n}\n",e)}const Bs=async()=>{const{user:e}=await(async()=>{try{const e=await async function(){const e=await us();if(h(e)){const{user:t}=await function(e,t){return _s("query CurrentUser {\n user {\n id\n email\n hubspotToken\n insertedAt\n language\n profile\n termsAcceptedAt\n }\n}\n",{variables:{},token:t||void 0,fragments:[]})}(0,e);return{user:t}}throw new Error("No token")}();return wa.wB.defaultLocale=e.user.language.toLowerCase(),e}catch{return{user:null}}})();return await(e=>{const t=new URL(location.href).searchParams.get("lang");let n=null;return e&&(n=e.language.toLowerCase()),h(t)&&(n=t),Pa(`${ia.HEAVENT_API_URL}/translation/language.js?${n?`lang=${n}`:""}`)})(e),{user:e}},Vs=window.matchMedia("(max-width: 1200px)"),Gs=l.createContext({isMobile:!1}),Ws=e=>{const[t,n]=l.useState(!1);return l.useEffect(()=>{n(Vs.matches),Vs.addListener(e=>{n(e.matches)})},[]),(0,i.jsx)(Gs.Provider,{value:{isMobile:t},children:e.children})},qs="old",Ys="new2025",Hs=(0,l.createContext)({});function Zs(){return(0,l.useContext)(Hs)}const Ks=e=>{const t=(0,l.useRef)(null),n=(0,l.useCallback)(e=>{e&&(t.current=e,setTimeout(()=>{e.style.right=v.space[6].value},100))},[]),a=(0,l.useCallback)(()=>{t.current.style.right="-400px",e.onClose()},[e.onClose]);return(0,_a.createPortal)((0,i.jsxs)($,{ref:n,align:"center",className:"h-notification",css:{background:"black"===e.color?"$gray900":"error"===e.color?"$error400":"$success500",borderRadius:"$2",boxShadow:"$lg",maxHeight:"120px",padding:"$2 $4",position:"absolute",right:"-400px",top:"$6",transition:"0.5s right ease-in-out",zIndex:"1000"},gap:"3",role:"status",width:400,children:[(0,i.jsx)($,{align:"center",css:{color:"white"},justify:"center",children:(0,i.jsx)(ra,{icon:"black"===e.color?"circle-exclamation":"error"===e.color?"circle-xmark":"circle-check",iconStyle:"solid"})}),(0,i.jsx)($i,{color:"white",css:{flex:"1","& a":{color:"white",textDecoration:"underline"}},dangerouslySetInnerHTML:{__html:e.text},fontWeight:"medium"}),(0,i.jsx)($,{align:"center",css:{color:"white",cursor:"pointer",fontSize:"$textMd"},height:32,justify:"center",width:32,onClick:a,children:(0,i.jsx)(ra,{icon:"xmark"})})]}),document.body)},Qs=2e3,Xs=(0,l.createContext)({}),Js=e=>{const t=Ai(),[n,a]=(0,l.useState)(!1),[s,o]=(0,l.useState)({color:"success",text:""}),r=(0,l.useCallback)(()=>{setTimeout(()=>{a(!1)},1200)},[a]),d=(0,l.useCallback)(e=>{a(!0),o("string"==typeof e?{text:e}:e),setTimeout(r,wa.dw.fromObject({seconds:5}).toMillis())},[a,o,r]),{mutate:c}=function(e={}){return Ti("mutation AccreditationsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n accreditationsImportResult(organizationId: $organizationId, eventId: $eventId, jobId: $jobId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),u=(0,l.useRef)(null),m=(0,l.useCallback)((e,n,i)=>{u.current=window.setInterval(async()=>{const{accreditationsImportResult:{state:a}}=await c({jobId:e,organizationId:n,eventId:i});a===H.Done&&(clearInterval(u.current),d({color:"success",text:t("votre_import_es_60265")}))},Qs)},[]),{mutate:g}=function(e={}){return Ti("mutation AccreditationsProfilesImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n accreditationsProfilesImportResult(\n organizationId: $organizationId\n eventId: $eventId\n jobId: $jobId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),h=(0,l.useRef)(null),p=(0,l.useCallback)((e,n,i)=>{h.current=window.setInterval(async()=>{const{accreditationsProfilesImportResult:{state:a}}=await g({jobId:e,organizationId:n,eventId:i});a===H.Done&&(clearInterval(h.current),d({color:"success",text:t("votre_import_es_60265")}))},Qs)},[]),{mutate:f}=function(e={}){return Ti("mutation DelegationsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n delegationsImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),I=(0,l.useRef)(null),_=(0,l.useCallback)((e,n,i)=>{I.current=window.setInterval(async()=>{const{delegationsImportResult:{state:a,event:s}}=await f({jobId:e,organizationId:n,eventId:i});a===xe.Done&&(clearInterval(I.current),d({color:"success",text:t("votre_import_es_98992",s.name)}))},Qs)},[]),{mutate:x}=function(e={}){return Ti("mutation EventDocumentsExportResult(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId\n $jobId: JobId!\n) {\n eventDocumentsExportResult(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n jobId: $jobId\n ) {\n state\n url\n }\n}\n",e)}(),y=(0,l.useRef)(null),S=(0,l.useCallback)((e,n,i)=>{y.current=window.setInterval(async()=>{const{eventDocumentsExportResult:a}=await x({jobId:e,organizationId:n,eventId:i});a.state===Pe.Done&&(clearInterval(y.current),d({color:"success",text:t("l_export_de_vos_38257",a.url)}))},Qs)},[]),{mutate:j}=function(e={}){return Ti("mutation EventsImportResult($jobId: JobId!, $organizationId: OrganizationId!) {\n eventsImportResult(jobId: $jobId, organizationId: $organizationId) {\n state\n }\n}\n",e)}(),v=(0,l.useRef)(null),b=(0,l.useCallback)((e,n)=>{v.current=window.setInterval(async()=>{const{eventsImportResult:{state:i}}=await j({jobId:e,organizationId:n});i===Re.Done&&(clearInterval(v.current),d({color:"success",text:t("votre_import_es_60265")}))},Qs)},[]),{mutate:A}=function(e={}){return Ti("mutation ExportResult($jobId: JobId!, $organizationId: OrganizationId!, $eventId: EventId) {\n exportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n url\n }\n}\n",e)}(),C=(0,l.useRef)(null),E=(0,l.useCallback)((e,n,i)=>{C.current=window.setInterval(async()=>{const{exportResult:a}=await A({jobId:e,organizationId:n,eventId:i});a.state===Pe.Done&&(clearInterval(C.current),d({color:"success",text:t("votre_export_es_96069",a.url)}))},Qs)},[]),{mutate:T}=function(e={}){return Ti("mutation FilesImportResult($jobId: JobId!, $organizationId: OrganizationId!, $eventId: EventId) {\n filesImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),M=(0,l.useRef)(null),R=(0,l.useCallback)((e,n,i)=>{M.current=window.setInterval(async()=>{const{filesImportResult:{state:a,event:s}}=await T({jobId:e,organizationId:n,eventId:i});a===Le.Done&&(clearInterval(M.current),d({color:"success",text:s?t("votre_import_es_11791",s.name):t("votre_import_es_10672")}))},Qs)},[]),{mutate:D}=function(e={}){return Ti("mutation PositionsImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId!\n) {\n positionsImportResult(jobId: $jobId, organizationId: $organizationId, eventId: $eventId) {\n state\n event {\n name\n }\n }\n}\n",e)}(),O=(0,l.useRef)(null),w=(0,l.useCallback)((e,n,i)=>{O.current=window.setInterval(async()=>{const{positionsImportResult:{state:a,event:s}}=await D({jobId:e,organizationId:n,eventId:i});a===lt.Done&&(clearInterval(O.current),d({color:"success",text:t("votre_import_es_11848",s.name)}))},Qs)},[]),{mutate:P}=function(e={}){return Ti("mutation VolunteersImportResult(\n $jobId: JobId!\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n) {\n volunteersImportResult(\n jobId: $jobId\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n ) {\n state\n event {\n name\n }\n }\n}\n",e)}(),$=(0,l.useRef)(null),k=(0,l.useCallback)((e,n,i,a)=>{$.current=window.setInterval(async()=>{const{volunteersImportResult:{state:s,event:o}}=await P({jobId:e,organizationId:n,eventId:i,delegationId:a});s===Vt.Done&&(clearInterval($.current),d({color:"success",text:o?t("votre_import_es_37822",o.name):t("votre_import_es_14145")}))},Qs)},[]);return(0,i.jsx)(Xs.Provider,{value:{checkAccreditationsImport:m,checkAccreditationsProfilesImport:p,checkDelegationsImport:_,checkDocumentsExport:S,checkEventsImport:b,checkExport:E,checkFilesImport:R,checkPositionsImport:w,checkVolunteersImport:k,showNotification:d},children:(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(Ks,{color:s.color??"success",text:s.text,onClose:r}),e.children]})})},eo=(0,l.createContext)({user:null});function to(){return(0,l.useContext)(eo)}const no=(0,i.jsx)(da,{});function io(e,{redirectOnSuccess:t}={}){const[n,i]=(0,l.useState)(!1),{setIsError:a}=(0,l.useContext)(Da);let s=null;return n&&(s=no),{isLoading:n,loader:s,mutate:async(n,s)=>{i(!0);try{const o=await us(),r=await((e,t,n)=>_s(e,{variables:t,token:n||void 0}))(e,n,s||o);return!0!==t&&(i(!1),a(!1)),r}catch(e){throw a(!0,e),i(!1),e}}}}const ao=(0,i.jsx)(da,{});function so(e,t,n){const[i,a]=(0,l.useState)(!0),[s,o]=(0,l.useState)({}),[r,d]=(0,l.useState)(0),{setIsError:c}=(0,l.useContext)(Da),u=Object.keys(t).sort().map(e=>{const n=t[e];return`"${e}":${JSON.stringify(n)}`}).join(",");(0,l.useEffect)(()=>{let i=!1;var s;return a(!0),s=u,us().then(i=>_s(e,{reloadOnNewVersion:!0,variables:t,token:i,fragments:n})).then(e=>{i||s!==u||(o(e),c(!1),a(!1))},e=>{i||s!==u||c(!0,e)}),()=>{i=!0}},[e,u,r]);let m=null;return i&&(m=ao),{data:s,isLoading:i,loader:m,reload(){d(r+1)}}}var oo=n(6347);function ro(){return function(e,t={}){return Object.fromEntries(Object.entries(e).map(([e,n])=>e.endsWith("Id")||"id"===e?[e,parseInt(n,10)]:t[e]?[e,t[e](n)]:[e,n]))}((0,oo.g)())}function lo(){const e=(0,oo.W6)();return{...e,goBack:t=>{"POP"===e.action&&e.length<=2?e.push(t):e.goBack()}}}function co(){return(0,oo.zy)()}function uo(){return(0,l.useMemo)(()=>{try{return{clear:window.localStorage.clear.bind(window.localStorage),setItem:window.localStorage.setItem.bind(window.localStorage),getItem:window.localStorage.getItem.bind(window.localStorage),removeItem:window.localStorage.removeItem.bind(window.localStorage),key:window.localStorage.key.bind(window.localStorage),get length(){return window.localStorage.length},getItemInt(e){const t=parseInt(window.window.localStorage.getItem(e),10);return isNaN(t)?null:t}}}catch{return{clear(){},setItem(){},getItem:()=>null,removeItem(){},key:()=>null,get length(){return 0},getItemInt:()=>null}}},[])}var mo=n(2499),go=n(9241),ho=n(2664);function po(e){return"number"==typeof e&&!isNaN(e)}function fo(e){return"number"==typeof e&&Number.isInteger(e)&&e>0}function Io(e){return e?{lat:e.latitude,lng:e.longitude}:null}const _o=Io({latitude:43.6087733,longitude:3.87963579999996});function xo(e){return po(e.latitude)&&po(e.longitude)?(0,D.A)(e,["latitude","longitude"]):void 0}function yo(e){return e===Xe.GoogleSatellite?"satellite":e===Xe.Google?"roadmap":e??Xe.Google}let So=class{translationService;constructor(e){this.translationService=e}t(e,...t){return this.translationService.translate(e,...t)}};So=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],So);let jo=class extends So{translationService;constructor(e){super(e),this.translationService=e}oneOfMessage(e,t){return this.t("_1_doit_tre_70659",e,this.translationService.formatListValues(t.map(e=>this.t(e))))}};jo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],jo);let vo=class extends jo{constructor(e){super(e)}accreditationsCustomFieldInputSchema(){return ho.Ik().shape({customFieldId:ho.ai().required(this.t("le_champ_person_80074")),conditionValue:ho.gl().required(this.t("la_condition_es_66568"))})}};vo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],vo);const bo=ho.gl(e=>e&&wa.c9.fromISO(e).isValid);let Ao=class extends jo{constructor(e){super(e)}accreditationsSlotInputDefault(){return{name:""}}createAccreditationSlotSchema(){return ho.Ik().shape({slot:this.accreditationsSlotInputSchema()})}accreditationsSlotInputSchema(){return ho.Ik().shape({name:ho.Yj(),maxResources:ho.ai().nullable(),date:bo.typeError(this.t("la_date_est_inv_22002")).nullable()})}};Ao=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ao);let Co=class extends jo{accreditationsCustomFieldInput;accreditationsSlotInput;constructor(e,t,n){super(e),this.accreditationsCustomFieldInput=t,this.accreditationsSlotInput=n}createUpdateAccreditationValuesDefault(e,t,n){const i=this.accreditationInputDefault(e,t,n);return{accreditation:i,hasNumberOfDaysLimit:"number"==typeof i.numberOfDaysLimit}}accreditationInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_de_l_acc_82676")),accreditationCategoryId:ho.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),description:ho.Yj(),privateNote:ho.Yj(),acronym:ho.Yj(),color:ho.Yj().required(this.t("la_couleur_est_95740")),icon:ho.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(Gn,this.t("l_ic_ne_est_req_15843")),weezeventIsSynchronized:ho.zM().required(),address:ho.Yj().nullable(),latitude:ho.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:ho.ai().nullable().typeError(this.t("la_longitude_do_35170")),zoom:ho.ai().required(this.t("le_niveau_de_zo_52687")).min(0,this.t("le_niveau_de_zo_38516")).max(23,this.t("le_niveau_de_zo_38516")),layer:ho.Yj().required(this.t("le_fond_de_cart_48524")).oneOf(Hn,this.t("le_fond_de_cart_48524")),slots:ho.YO().of(this.accreditationsSlotInput.accreditationsSlotInputSchema()),accreditationDisplay:ho.Yj().required(this.t("le_type_d_affic_60154")).oneOf(Cn,this.t("le_type_d_affic_60154")).test("calendar-slots",this.t("tous_les_cr_nea_42033"),(e,t)=>e!==W.Calendar||F(t.parent.slots)&&t.parent.slots.every(e=>e.date?.isValid)),numberOfDaysLimit:ho.ai().notRequired(),accreditationsCustomFields:ho.YO().of(this.accreditationsCustomFieldInput.accreditationsCustomFieldInputSchema()),formCustomFields:ho.YO(),tagsIds:ho.YO().of(ho.ai())})}createUpdateAccreditationSchema(e){const t=this.accreditationInputSchema();return ho.Ik().shape({accreditation:e?t.shape({fields:e}):t})}accreditationInputDefault(e,t,n){let i=t?.accreditationCategoryId??n;return Number.isInteger(i)||(i=null),{accreditationCategoryId:i,name:t?.name??"",description:t?.description??"",privateNote:t?.privateNote??"",acronym:t?.acronym??"",color:t?.color??v.colors.primary500.value,icon:t?.icon??qe.BadgeCheck,weezeventIsSynchronized:t?.weezeventIsSynchronized??!0,willAutoAccredit:t?.willAutoAccredit??!1,address:t?.address??null,latitude:t?.latitude??null,longitude:t?.longitude??null,zoom:t?.zoom??13,layer:t?.layer??e,accreditationDisplay:t?.accreditationDisplay??W.List,numberOfDaysLimit:t?.numberOfDaysLimit??null,slots:(0,mo.A)(t?.slots??[],e=>(0,go.A)([e.date?.toMillis(),e.name])),conditionsOperator:t?.conditionsOperator??ue.And,accreditationsCustomFields:t?.accreditationsCustomFields??[],tagsIds:t?.tagsIds??[],fields:t?.fields??{},formCustomFields:t?.formCustomFields??[]}}};Co=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,vo,Ao])],Co);let Eo=class extends jo{constructor(e){super(e)}createUpdateAccreditationProfileValuesDefault(e,t){return{accreditationProfile:this.accreditationProfileInputDefault(e,t)}}accreditationProfileInputSchema(){return ho.Ik().shape({accreditationProfileCategoryId:ho.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),name:ho.Yj().required(this.t("le_nom_de_l_acc_82676")),description:ho.Yj(),acronym:ho.Yj().nullable(),color:ho.Yj().required(this.t("la_couleur_est_95740")),icon:ho.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(Gn,this.t("l_ic_ne_est_req_15843")),accreditationsSlotsIds:ho.YO().of(ho.ai()).min(1,this.t("vous_devez_s_le_34381"))})}createUpdateAccreditationProfileSchema(){return ho.Ik().shape({accreditationProfile:this.accreditationProfileInputSchema()})}accreditationProfileInputDefault(e,t){let n=e?.accreditationProfileCategoryId??t;return Number.isInteger(n)||(n=null),{accreditationProfileCategoryId:n,name:e?.name??"",description:e?.description??"",acronym:e?.acronym??"",color:e?.color??v.colors.primary500.value,icon:e?.icon??qe.BadgeCheck,accreditationsSlotsIds:e?.accreditationsSlotsIds??[]}}};Eo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Eo);var To=n(4809);const Mo=5e9,Ro=2e7;function Do(e){let t=e;try{t=new URL(e).pathname}catch{}if(h(t)){const e=t.split(/[\\/]/).pop(),n=e.lastIndexOf(".");let i=e,a="";return n>=0&&(i=e.substring(0,n),a=e.substring(n+1).toLowerCase()),{path:t,name:i,extension:a}}return{path:"",name:"",extension:""}}var Oo;!function(e){e.Csv="text/csv",e.Default="application/octet-stream",e.Excel="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",e.Gif="image/gif",e.Jpeg="image/jpeg",e.Pdf="application/pdf",e.Png="image/png",e.Zip="application/zip"}(Oo||(Oo={}));const wo=e=>{switch(e.toLowerCase()){case"csv":return Oo.Csv;case"xls":case"xlsx":return Oo.Excel;case"gif":return Oo.Gif;case"jpg":case"jpeg":return Oo.Jpeg;case"pdf":return Oo.Pdf;case"png":return Oo.Png;case"zip":return Oo.Zip;default:return Oo.Default}};let Po=class extends jo{constructor(e){super(e)}csvDocumentInputDefault(e){return{key:"",name:"",acl:"",formats:{timeFormat:"HH:mm",dateFormat:La,datetimeFormat:"yyyy-MM-dd HH:mm",...e}}}schema(){const e=this.t("le_document_est_86403");return ho.Ik().shape({acl:ho.Yj().required(e),delimiter:ho.Yj().optional().test("is-valid-value",this.t("delimiter_value_52108"),e=>!e||!To.BAD_DELIMITERS.includes(e)),key:ho.Yj().required(e).test("is-a-csv",this.t("le_fichier_n_es_33134"),e=>wo(Do(e).extension)===Oo.Csv),name:ho.Yj().required(e),newline:ho.Yj().optional().test("is-valid-value",this.t("newline_charact_88066"),e=>!e||["\r","\n","\r\n"].includes(e)),quoteChar:ho.Yj().optional(),formats:ho.Ik().shape({timeFormat:ho.Yj().optional(),dateFormat:ho.Yj().optional(),datetimeFormat:ho.Yj().optional()}),file:ho.gl().test("is-not-empty",this.t("the_file_is_emp_77243"),e=>!e||e.size>0).test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Po);var $o;let ko=class extends jo{static{$o=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={Id:"id"};static IMPORT_COLUMNS_REQUIRED=e=>e===Ye.Update?[$o.IMPORT_COLUMNS_DEFAULT.Id]:[];constructor(e,t){super(t),this.csvInputService=e}default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mode:Ye.Upsert}}}schema(){return ho.Ik().shape({input:ho.Ik().shape({csv:this.csvInputService.schema(),mode:ho.Yj().oneOf(Wn,this.t("le_mode_d_impor_75706"))})})}};ko=$o=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],ko);let No=class extends ko{csvInputService;default(e){return{input:{csv:this.csvInputService.csvDocumentInputDefault(e),mappings:[],presets:[],mode:Ye.Upsert,tag:""}}}schema(){return ho.Ik().shape({input:ho.Ik().shape({csv:this.csvInputService.schema(),mappings:ho.YO().of(ho.Yj().nullable()),presets:ho.YO().of(ho.Ik().shape({customFieldId:ho.ai().positive(this.t("le_choix_du_typ_07079")),value:ho.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:ho.Yj().oneOf(Wn,this.t("le_mode_d_impor_75706")),tag:ho.Yj().required("a_tag_must_be_s_23274")})})}settingsStepSchema(){return ho.Ik().shape({input:ho.Ik().shape({csv:this.csvInputService.schema()})})}mappingStepSchema(){return ho.Ik().shape({input:ho.Ik().shape({mappings:ho.YO().of(ho.Yj().nullable()),presets:ho.YO().of(ho.Ik().shape({customFieldId:ho.ai().positive(this.t("le_choix_du_typ_07079")),value:ho.gl().when("customFieldId",{is:e=>e>-1,then:e=>e.required(this.t("la_valeur_du_ch_65599"))})})),mode:ho.Yj().oneOf(Wn,this.t("le_mode_d_impor_75706")),tag:ho.Yj().required("a_tag_must_be_s_23274")})})}constructor(e,t){super(e,t),this.csvInputService=e}};No=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],No);var zo;let Lo=class extends No{static{zo=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...No.IMPORT_COLUMNS_DEFAULT,AccreditationName:"accreditationName",AccreditationCategoryName:"accreditationCategoryName",SlotName:"slotName",SlotDate:"slotDate",MaxResources:"slotMaxResources",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",ConditionsOperator:"conditionsOperator",Address:"address",Latitude:"latitude",Longitude:"longitude",MapLayer:"mapLayer",MapZoom:"mapZoom",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[zo.IMPORT_COLUMNS_DEFAULT.Id]:[],zo.IMPORT_COLUMNS_DEFAULT.AccreditationName,zo.IMPORT_COLUMNS_DEFAULT.AccreditationCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};Lo=zo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],Lo);var Fo;let Uo=class extends No{static{Fo=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...No.IMPORT_COLUMNS_DEFAULT,AccreditationProfileCategoryName:"accreditationProfileCategoryName",AccreditationProfileName:"accreditationProfileName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[Fo.IMPORT_COLUMNS_DEFAULT.Id]:[],Fo.IMPORT_COLUMNS_DEFAULT.AccreditationProfileCategoryName,Fo.IMPORT_COLUMNS_DEFAULT.AccreditationProfileName];constructor(e,t){super(e,t),this.csvInputService=e}};Uo=Fo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],Uo);let Bo=class extends jo{constructor(e){super(e)}schema(){const e=this.t("le_document_est_86403");return ho.Ik().shape({acl:ho.Yj().required(e),key:ho.Yj().required(e).test("is-a-zip",this.t("le_fichier_n_es_91526"),e=>wo(Do(e).extension)===Oo.Zip),name:ho.Yj().required(e),file:ho.gl().test("is-not-too-big",this.t("le_fichier_est_17522"),e=>!e||e.size=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Bo);let Vo=class extends jo{constructor(e){super(e)}signInSchema(){return ho.Ik().shape({email:this.email()})}signInPasswordSchema(){return ho.Ik().shape({email:this.email(),password:this.password()})}codeSchema(){return ho.Ik().shape({code:this.code()})}emailSchema(){return ho.Ik().shape({email:this.email()})}emailConfirmSchema(){return ho.Ik().shape({email:this.email(),emailConfirm:this.emailConfirm()})}emailCodeSchema(){return ho.Ik().shape({email:this.email(),code:this.code()})}email(){return ho.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856"))}emailConfirm(){return ho.Yj().required(this.t("la_confirmation_53449")).email(this.t("la_confirmation_53449")).test("same-as-email",this.t("l_e_mail_et_la_57164"),function(){return this.parent.email===this.parent.emailConfirm})}code(){return ho.Yj().required(this.t("le_code_est_req_77618")).length(6,this.t("le_code_doit_co_37160"))}password(){return ho.Yj().required(this.t("le_mot_de_passe_14773"))}passwordRules(){return ho.Yj().required(this.t("le_mot_de_passe_24842")).test("valid-password",this.t("le_mot_de_passe_24842"),function(){return"string"==typeof(e=this.parent.password)&&e.length>=16&&function(e){return"string"==typeof e&&null!==e.match(/\d/)}(this.parent.password)&&function(e){return"string"==typeof e&&null!==e.match(/[A-Z]/)&&null!==e.match(/[a-z]/)}(this.parent.password)&&function(e){return"string"==typeof e&&null!==e.match(/[^A-Za-z0-9]/)}(this.parent.password);var e})}};Vo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Vo);let Go=class extends jo{constructor(e){super(e)}organizationInputDefault(e){return{name:e.name,features:e.features,customBadges:e.customBadges,periodEndAt:e.periodEndAt,usersIds:e.users.map(({id:e})=>e),isBlocked:e.isBlocked,weezeventOrganizationId:e.weezeventOrganizationId,useOldBilling:e.useOldBilling,membersLimit:e.membersLimit,pricePerMember:e.pricePerMember,billingComment:e.billingComment}}organizationInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_de_l_org_60618")),periodEndAt:bo.required(this.t("la_date_de_fin_04076")).typeError(this.t("la_date_de_fin_04076")).test("min-period-end-at",this.t("la_date_de_fin_63806"),function(){return wa.c9.isDateTime(this.parent.periodEndAt)&&this.parent.periodEndAt.isValid&&this.parent.periodEndAt>wa.c9.fromObject({year:2016})}),features:ho.YO().of(ho.Yj().oneOf(zn,this.t("les_fonctionnal_36778"))),usersIds:ho.YO().of(ho.ai()),isBlocked:ho.zM().required()})}updateOrganizationSchema(){return ho.Ik().shape({organization:this.organizationInputSchema()})}};Go=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Go);var Wo=n(5526);function qo(e){return"string"!=typeof e||""===e.trim()||u(e.toLowerCase())===e}const Yo=[" ","@","£","$","¥","è","é","ù","ì","ò","Ç","Ø","ø","Å","å","Æ","æ","ß","É","!",'"',"#","¤","%","&","'","(",")","*","+",",","-",".","/","0","1","2","3","4","5","6","7","8","9",":",";","<","=",">","?","¡","A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R","S","T","U","V","W","X","Y","Z","Ä","Ö","Ñ","Ü","§","¿","a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z","ä","ö","ñ","ü","à"].concat(["^","{","}","\\","|","[","]","~","€","\n"]);const Ho=/^[a-z][a-z0-9]{2,10}$/i;var Zo;!function(e){e.Accreditations="accreditations",e.Everyone="everyone",e.Positions="positions",e.Segments="segments",e.States="states",e.Users="users"}(Zo||(Zo={}));let Ko=class extends jo{constructor(e){super(e)}createUpdateCampaignValuesDefault(e,t,n,i){const a=this.campaignInputDefault(e,t,n,i);return{campaign:a,recipients:a.sendToEveryone?Zo.Everyone:F(a.states)?Zo.States:F(a.segmentsIds)?Zo.Segments:F(a.accreditationsCategoriesIds)||F(a.accreditationsIds)||F(a.accreditationsSlotsIds)?Zo.Accreditations:F(a.positionsCategoriesIds)||F(a.positionsIds)||F(a.positionsSlotsIds)?Zo.Positions:Zo.Users,customSender:h(n?.sender),textOrHtml:h(n?.html)?"html":"text"}}campaignStep1Fields(){return{name:ho.Yj().required(this.t("le_nom_de_la_ca_63405")),campaignType:ho.Yj().required(this.t("le_type_de_camp_96559")).oneOf(Dn,this.t("le_type_de_camp_56467"))}}campaignStep1Schema(){return ho.Ik().shape({campaign:ho.Ik().shape({...this.campaignStep1Fields()})})}campaignStep2Fields(){const e=this;return{sender:ho.Yj().test("is-valid",this.t("l_metteur_ne_r_16421"),function(){return!h(this.parent.sender)||Ho.test(this.parent.sender)}),text:ho.Yj().test("non-empty-text",this.t("le_contenu_est_45048"),function(){return h(this.parent.text)||h(this.parent.html)}).test("only-valid-characters","",function(){if(this.parent.campaignType===re.Email)return!0;{const n=(t=this.parent.text,new Set(Array.from(t??"").filter(e=>!Yo.includes(e))));return!(n.size>0)||this.createError({message:e.translationService.translate("les_caract_res_84839",Array.from(n).join(", "))})}var t}).test("max-length",this.t("le_contenu_ne_p_25416"),function(){return this.parent.campaignType===re.Email||this.parent.text.length<1e3}).test("no-percent-encoded-variables",this.t("le_texte_de_l_e_71717"),function(){return!this.parent.text.includes("%7B")&&!this.parent.text.includes("%7D")}),subject:ho.Yj().when("campaignType",{is:re.Email,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),html:ho.Yj().test("non-empty-text",this.t(this.t("le_code_html_es_52280")),function(){return h(this.parent.text)||h(this.parent.html)}),replyTo:ho.Yj().email(this.t("l_adresse_de_r_53879")).test("clean-reply-to",this.t("l_adresse_de_r_53879"),function(){return qo(this.parent.replyTo)}),documents:ho.YO().test("max-size",this.t("l_ensemble_des_32797"),function(){return this.parent.campaignType!==re.Email||!F(this.parent.documents)||(0,Wo.A)(this.parent.documents,e=>e.size)<2e7}),emailSenderId:ho.ai().nullable(),attachments:ho.YO().of(ho.Yj()),includeDuplicateMembersAttachments:ho.zM().required(),hasCalendarInvite:ho.zM().required(),calendarInviteName:ho.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:bo.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),otherwise:e=>e.nullable()}),calendarInviteStartTime:ho.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:bo.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")),otherwise:e=>e.nullable()}),calendarInviteEndTime:ho.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})}}campaignStep2Schema(){return ho.Ik().shape({campaign:ho.Ik().shape({...this.campaignStep2Fields()})})}campaignStep3Fields(){const e=this,t=function(){return this.parent.state!==oe.Draft&&this.parent.state!==oe.Scheduled||!1!==this.parent.sendToEveryone||0!==this.parent.states.length||0!==this.parent.positionsCategoriesIds.length||0!==this.parent.positionsIds.length||0!==this.parent.positionsSlotsIds.length||0!==this.parent.tagsIds.length||0!==this.parent.accreditationsCategoriesIds.length||0!==this.parent.accreditationsIds.length||0!==this.parent.accreditationsSlotsIds.length||0!==this.parent.usersInfosIds.length||0!==this.parent.segmentsIds.length||this.createError({message:e.translationService.translate("vous_devez_s_le_80552")})};return{sendToEveryone:ho.zM().required(this.t("requis_75853")),states:ho.YO().of(ho.Yj()).test("non-empty","",t),positionsCategoriesIds:ho.YO().of(ho.ai()).test("non-empty","",t),positionsIds:ho.YO().of(ho.ai()).test("non-empty","",t),positionsSlotsIds:ho.YO().of(ho.ai()).test("non-empty","",t),tagsIds:ho.YO().of(ho.ai()).test("non-empty","",t),accreditationsCategoriesIds:ho.YO().of(ho.ai()).test("non-empty","",t),accreditationsIds:ho.YO().of(ho.ai()).test("non-empty","",t),accreditationsSlotsIds:ho.YO().of(ho.ai()).test("non-empty","",t),usersInfosIds:ho.YO().of(ho.ai()).test("non-empty","",t),segmentsIds:ho.YO().of(ho.ai()).test("non-empty","",t)}}campaignStep3Schema(){return ho.Ik().shape({campaign:ho.Ik().shape({...this.campaignStep3Fields()})})}campaignStep4Fields(){return{scheduledAtDate:bo.when("scheduleType",{is:ae.Datetime,then:e=>e.required(this.t("la_date_d_envoi_17792")).typeError(this.t("la_date_d_envoi_17792"))}),scheduledAtTime:ho.Yj().when("scheduleType",{is:ae.Datetime,then:e=>e.required(this.t("l_heure_d_envoi_53643")).matches(/\d{2}:\d{2}/,this.t("l_heure_d_envoi_53643"))}),scheduleAnchor:ho.Yj().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("d_but_fin_est_r_67120")).oneOf(Tn,this.t("d_but_fin_est_r_67120"))}),scheduleOffsetDays:ho.ai().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("le_nombre_de_jo_27562")).min(0,this.t("le_nombre_de_jo_62798"))}),scheduleBeforeAfter:ho.Yj().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("avant_apr_s_est_31173")).oneOf(Mn,this.t("avant_apr_s_est_31173"))}),scheduleSendTime:ho.Yj().when("scheduleType",{is:ae.Anchor,then:e=>e.required(this.t("l_heure_d_envoi_53643")).matches(/\d{2}:\d{2}/,this.t("l_heure_d_envoi_53643"))})}}campaignStep4Schema(){return ho.Ik().shape({campaign:ho.Ik().shape({...this.campaignStep4Fields()})})}campaignInputSchema(){return ho.Ik().shape({...this.campaignStep1Fields(),...this.campaignStep2Fields(),...this.campaignStep3Fields(),...this.campaignStep4Fields()})}createUpdateCampaignSchema(){return ho.Ik().shape({campaign:this.campaignInputSchema()})}campaignInputDefault(e,t,n,i){let a=n?.segmentsIds??[],s=n?.usersInfosIds??[];if(h(i))try{const e=JSON.parse(Li(i));e.segmentId&&(a=[e.segmentId]),F(e.usersInfosIds)&&(s=e.usersInfosIds)}catch{}const o=!F(a)&&!F(s)&&(n?.sendToEveryone??!1);return{name:n?.name??"",state:n?n.scheduleType!==ae.NoSchedule&&n.state===oe.Draft?oe.Scheduled:n.state:e?oe.Template:oe.Draft,campaignType:n?.campaignType??re.Email,sender:n?.sender??"",text:n?.text??"",subject:n?.subject??"",html:n?.html??"",replyTo:n?.replyTo??"",sendToEveryone:o,states:n?.states??[],positionsCategoriesIds:n?.positionsCategoriesIds??[],positionsIds:n?.positionsIds??[],positionsSlotsIds:n?.positionsSlotsIds??[],tagsIds:n?.tagsIds??[],accreditationsCategoriesIds:n?.accreditationsCategoriesIds??[],accreditationsIds:n?.accreditationsIds??[],accreditationsSlotsIds:n?.accreditationsSlotsIds??[],usersInfosIds:s,segmentsIds:a,scheduledAtDate:n?.scheduledAt??void 0,scheduledAtTime:n?.scheduledAt?.toFormat("HH:mm")??void 0,documents:n?.documents??[],emailSenderId:n?.emailSenderId??t,attachments:n?.attachments??[],includeDuplicateMembersAttachments:n?.includeDuplicateMembersAttachments??!1,hasCalendarInvite:n?.hasCalendarInvite??!1,calendarInviteName:n?.calendarInviteName??null,calendarInviteStartDate:n?.calendarInviteStartDate??null,calendarInviteStartTime:n?.calendarInviteStartTime??null,calendarInviteEndDate:n?.calendarInviteEndDate??null,calendarInviteEndTime:n?.calendarInviteEndTime??null,scheduleType:n?.scheduleType??ae.NoSchedule,scheduleAnchor:n?.scheduleAnchor??ne.EventStart,scheduleOffsetDays:n?.scheduleOffsetDays??0,scheduleBeforeAfter:n?.scheduleBeforeAfter??ie.Before,scheduleSendTime:n?.scheduleSendTime??"00:00"}}};Ko=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ko);let Qo=class extends jo{constructor(e){super(e)}commentInputDefault(){return{content:""}}commentInputSchema(){return ho.Ik().shape({content:ho.Yj().required(this.t("le_commentaire_33393"))})}createCommentSchema(){return ho.Ik().shape({comment:this.commentInputSchema()})}};Qo=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Qo);const Xo=1122,Jo=793;let er=class extends jo{constructor(e){super(e)}customDocumentInputDefault(e){return{name:e?.name??"",slug:e?.slug??"",populationsIds:e?.populationsIds??[],configuration:e?.configuration??this.getConfigurationDefault(),shouldRegenerateTicketIdOnDownload:e?.shouldRegenerateTicketIdOnDownload??!1}}customDocumentInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),slug:ho.Yj().required(this.t("le_nom_de_la_va_15472")).test("is-valid",this.t("le_nom_de_la_va_15472"),e=>null!==e.match(/^[a-z][a-z0-9]*$/))})}getConfigurationDefault(){return{bleed:!1,height:Xo,pages:[this.getPageDefault()],width:Jo}}getPageDefault(){return{id:ns(),accreditationsSlotsIds:[],accreditationAcronym:"",conditionsCustomFields:[],elements:[],hasConditions:!1,positionsSlotsIds:[],segmentsIds:[]}}getContainerElementDefault(e,t,n){return{type:"container",id:e,inContainer:!!t,inGrid:"grid"===t?.type,backgroundColor:"",accreditationsSlotsIds:[],accreditationAcronym:"",align:"start",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],direction:"row",elements:[],gap:0,hasBackground:!1,hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,justify:"start",left:0,name:this.t("conteneur_1_03989",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],top:0,width:100,zIndex:1}}getGridElementDefault(e,t,n){return{type:"grid",id:e,inContainer:!!t,inGrid:"grid"===t?.type,backgroundColor:"",accreditationsSlotsIds:[],accreditationAcronym:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,columnGap:0,columns:2,conditionsCustomFields:[],elements:[],hasBackground:!1,hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,left:0,name:this.t("grille_1_66496",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,rowGap:0,rows:2,segmentsIds:[],top:0,width:100,zIndex:1}}getImageElementDefault(e,t,n){return{type:"image",id:e,inContainer:!!t,inGrid:"grid"===t?.type,accreditationsSlotsIds:[],accreditationAcronym:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],hasConditions:!1,hasRotate:!1,height:100,isRatioLocked:!1,left:0,name:this.t("image_1_30956",n+1),positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],top:0,width:100,zIndex:1}}getTextElementDefault(e,t,n){return{type:"text",id:e,inContainer:!!t,inGrid:"grid"===t?.type,accreditationsSlotsIds:[],accreditationAcronym:"",align:"start",hasBackground:!1,backgroundColor:"",borderColor:"#e4e7ec",borderRadius:0,borderSize:0,conditionsCustomFields:[],hasConditions:!1,hasRotate:!1,height:20,isRatioLocked:!1,left:0,name:this.t("texte_1_59540",n+1),text:"",color:"#1d2939",fontFamily:"Open Sans",fontSize:14,fontWeight:400,justify:"start",lineHeight:1.4,positionsSlotsIds:[],px:0,py:0,rotateDegree:0,segmentsIds:[],textTransform:"none",top:0,width:100,zIndex:1}}};function tr(e){throw new Error("Didn't expect to get here")}er=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],er);const nr=/^[A-Z]{2}[0-9]{2}[A-Z0-9]{1,30}$/,ir={AD:24,AE:23,AL:28,AO:25,AT:20,AX:18,AZ:28,BA:20,BE:16,BF:28,BG:22,BH:22,BI:27,BJ:28,BL:27,BR:29,BY:28,CF:27,CG:27,CH:21,CI:28,CM:27,CR:22,CV:25,CY:28,CZ:24,DE:22,DJ:27,DK:18,DO:28,DZ:26,EA:24,EE:20,EG:29,ES:24,FI:18,FK:18,FO:18,FR:27,GA:27,GB:22,GE:22,GF:27,GG:22,GI:23,GL:18,GP:27,GQ:27,GR:27,GT:28,GW:25,HN:28,HR:21,HU:28,IC:24,IE:22,IL:23,IM:22,IQ:23,IR:26,IS:26,IT:27,JE:22,JO:30,KM:27,KW:30,KZ:20,LB:28,LC:32,LI:21,LT:20,LU:20,LV:21,LY:25,MA:28,MC:27,MD:24,ME:22,MF:27,MG:27,MK:19,ML:28,MN:20,MQ:27,MR:27,MT:31,MU:30,MZ:25,NC:27,NE:28,NI:28,NL:18,NO:15,OM:23,PF:27,PK:24,PL:28,PM:27,PS:29,PT:25,QA:29,RE:27,RO:24,RS:22,RU:33,SA:24,SC:31,SD:18,SE:24,SI:19,SK:24,SM:27,SN:28,SO:23,ST:25,SV:28,TD:27,TF:27,TG:28,TL:23,TN:24,TR:26,UA:29,VA:22,VG:24,WF:27,XK:20,YE:30,YT:27};function ar(e,t){switch(t){case fe.Accreditation:return e("accr_ditations_39450");case fe.Delegation:return e("d_l_gations_78318");case fe.Event:return e("Event");case fe.Position:return e("missions_63972");case fe.UserInfo:return e("membres_11310");default:return tr()}}ze.Checkbox,ze.Select,ze.Validation;const sr=["default","regex"],or=["all","numbers","noSymbols","uppercase","lowercase"],rr=["any","past","between"];function lr(e){switch(e.fieldType){case ze.Text:return e.fieldSubtype===Ne.Freeform?"text":null;case ze.Textarea:return"text";case ze.Number:return"number";case ze.Date:case ze.Datetime:return e.fieldProperty===ke.DateOfBirth?null:"date";default:return null}}function dr(e){switch(e){case"text":return{mode:"default",allowedCharacters:"all"};case"date":return{range:"any"};default:return{}}}ze.Text,ze.Text,ze.Country,ze.Checkbox,ze.Country,ze.Language,ze.Nationality,ze.Select;const cr=["key","name","acl"];let ur=class extends jo{constructor(e){super(e)}documentInputDefault(){return{key:"",name:"",acl:""}}documentInputSchema(e){const t=h(e)?this.t("_1_est_requis_99856",e):this.t("le_document_est_86403");return ho.Ik().shape({key:ho.Yj().required(t),name:ho.Yj().required(t),acl:ho.Yj().required(t)})}documentInputSchemaNotRequired(){return ho.Ik().shape({key:ho.Yj(),name:ho.Yj(),acl:ho.Yj()})}};ur=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],ur);let mr=class extends jo{documentInputService;constructor(e,t){super(t),this.documentInputService=e}customFieldInputDefault(e,t){const n=e?.fieldType??ze.Text,i=e?.fieldSubtype??Ne.Freeform;return{name:e?.name??"",label:e?.label??"",customFieldCategoryId:e?.customFieldCategoryId??t[0].id,description:e?.description??"",variety:e?.variety??fe.UserInfo,fieldType:n,fieldSubtype:i,listType:e?.listType??Ke.Default,fileType:e?.fileType??Fe.Default,isPrivate:e?.isPrivate??!1,values:F(e?.values)?e.values:[],hasCondition:e?.hasCondition??!1,conditionCustomFieldId:e?.conditionCustomFieldId??null,conditionValue:e?.conditionValue??!1,canSelectMultiple:e?.canSelectMultiple??!1,document:e?.document||this.documentInputService.documentInputDefault(),isEncrypted:e?.isEncrypted??!1,canBeUpdatedByUrl:e?.canBeUpdatedByUrl??!1,validationRules:{...dr(lr({fieldType:n,fieldSubtype:i,fieldProperty:e?.fieldProperty})),...e?.validationRules},addressPostalCodeCustomFieldId:e?.addressPostalCodeCustomFieldId??null,addressCityCustomFieldId:e?.addressCityCustomFieldId??null,addressCountryCustomFieldId:e?.addressCountryCustomFieldId??null}}customFieldInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_du_champ_17959")),label:ho.Yj(),customFieldCategoryId:ho.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),fieldType:ho.Yj().required(this.t("le_type_est_req_41180")).oneOf(Fn,this.t("le_type_est_req_41180")),fieldSubtype:ho.Yj().required(this.t("le_sous_type_es_85221")).oneOf(Ln,this.t("le_sous_type_es_85221")),listType:ho.Yj().required(this.t("le_style_des_op_46016")).oneOf(Yn,this.t("le_style_des_op_46016")),fileType:ho.Yj().required(this.t("l_affichage_du_11344")).oneOf(Un,this.t("l_affichage_du_11344")),isPrivate:ho.zM().nullable(),hasCondition:ho.zM().nullable(),values:ho.YO().when("fieldType",{is:ze.Select,then:e=>e.of(ho.Ik().shape({id:ho.ai(),value:ho.Yj().required(this.t("la_valeur_est_r_70136"))})).required(this.t("vous_devez_s_le_95641")).min(1,this.t("vous_devez_s_le_95641"))}),conditionCustomFieldId:ho.ai().when("hasCondition",{is:!0,then:e=>e.required(),otherwise:e=>e.nullable()}),conditionValue:ho.gl(),canSelectMultiple:ho.zM().nullable(),document:this.documentInputService.documentInputSchemaNotRequired(),isEncrypted:ho.zM().required(),canBeUpdatedByUrl:ho.zM().required(),validationRules:ho.Ik().required().when(["fieldType","fieldSubtype"],([e,t])=>this.validationRulesSchema(e,t)),addressPostalCodeCustomFieldId:ho.ai().nullable(),addressCityCustomFieldId:ho.ai().nullable(),addressCountryCustomFieldId:ho.ai().nullable()})}validationRulesSchema(e,t){const n=()=>ho.ai().nullable().integer(this.t("ce_nombre_doit_35487")),i=e=>n().min(e,this.t("ce_nombre_doit_66066",e)),a=(e,t)=>e.when(t,([e],t)=>"number"==typeof e?t.min(e,this.t("le_maximum_doit_04562")):t);switch(lr({fieldType:e,fieldSubtype:t})){case"text":return ho.Ik().shape({mode:ho.Yj().oneOf([...sr]),minLength:i(0),maxLength:a(i(1),"minLength"),allowedCharacters:ho.Yj().oneOf([...or]),regex:ho.Yj().when("mode",{is:"regex",then:e=>e.required(this.t("l_expression_r_88693")).test("valid-regex",this.t("l_expression_r_68347"),e=>function(e){try{return new RegExp(e??""),!0}catch{return!1}}(e))}),regexMessage:ho.Yj().when("mode",{is:"regex",then:e=>e.required(this.t("le_message_d_er_84907"))})});case"number":return ho.Ik().shape({min:n(),max:a(n(),"min")});case"date":return ho.Ik().shape({range:ho.Yj().oneOf([...rr]),start:bo.nullable().when("range",{is:"between",then:e=>e.required(this.t("la_date_de_d_bu_05030"))}),end:bo.nullable().when("range",{is:"between",then:e=>e.required(this.t("la_date_de_fin_32246"))}).test("end-after-start",this.t("la_date_de_fin_21930"),function(e){const t=this.parent.start;return!t||!e||Ha(e)>=Ha(t)})});default:return ho.Ik()}}createUpdateCustomFieldSchema(){return ho.Ik().shape({customField:this.customFieldInputSchema()})}};mr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ur,Si])],mr);class gr extends jo{constructor(e){super(e)}customSlotInputDefault(){return{name:"",startTime:"",endTime:""}}customSlotInputSchema(){return ho.Ik().shape({name:ho.Yj().nullable(),startTime:ho.Yj().required(this.t("le_d_but_du_cr_40745")),endTime:ho.Yj().required(this.t("la_fin_du_cr_ne_90351"))})}}let hr=class extends jo{customSlotInputService;constructor(e,t){super(e),this.customSlotInputService=t}customSlotPeriodInputDefault(){return{name:"",customSlots:[this.customSlotInputService.customSlotInputDefault()],hideNameDates:!1,displayAsCalendar:!1,hasCondition:!1,conditionCustomFieldId:null,conditionValue:!1}}customSlotPeriodInputSchema(){return ho.Ik().shape({customSlotPeriod:ho.Ik().shape({name:ho.Yj(),customSlots:ho.YO().of(this.customSlotInputService.customSlotInputSchema()).required("").min(1,"")})})}};hr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,gr])],hr);let pr=class extends jo{constructor(e){super(e)}delegationCategoryBannerInputDefault(){return{bannerType:-1,bannerVehicleType:ee.Car,min:1,max:10}}};pr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],pr);let fr=class extends jo{constructor(e){super(e)}delegationCategoryInputDefault(e){return{name:e.name,banners:e.banners}}};fr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],fr);let Ir=class extends jo{constructor(e){super(e)}delegationFormInviteValuesDefault(){return{usersInfos:[{email:"",fields:{firstName:"",lastName:""}}]}}delegationFormInviteValuesSchema(){return ho.Ik().shape({usersInfos:ho.YO().of(ho.Ik().shape({email:ho.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),fields:ho.gl()})).min(1,"Vous devez invité au moins une personne.")})}};Ir=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ir);var _r=n(5582);function xr(e){return 3145===e||3360===e?{connectionTitle:"Connexion à votre espace personnel d’invitations",connectionSubtitle:"Connectez-vous à votre espace personnel d’invitations afin de gérer vos invités",delegationsListTitle:"Quel espace personnel d’invitations souhaitez-vous voir ?",delegationsListButton:"Voir cet espace personnel d’invitations",delegationHeader:"Gérer votre espace personnel d’invitations.",delegationHeaderEvent:"Gérer votre espace personnel d’invitations.",addMemberButton:"Ajouter un invité",tabMembers:"Invités ({1})",tabAccreditations:"Invitations",dashboardLeaders:"Exposants"}:3136===e?{connectionTitle:"connexion_mon_88378",connectionSubtitle:"connectez_vous_01298",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",delegationHeaderEvent:"g_rer_votre_d_l_04420",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}:{connectionTitle:"connexion_l_e_31965",connectionSubtitle:"connectez_vous_37685",delegationsListTitle:"quelle_d_l_gati_13930",delegationsListButton:"voir_cette_d_l_96190",delegationHeader:"g_rer_votre_d_l_49654",delegationHeaderEvent:"g_rer_votre_d_l_04420",addMemberButton:"ajouter_un_memb_33261",tabMembers:"membres_125561",tabAccreditations:"accr_ditations_39450",dashboardLeaders:"reponsable_82458_plural"}}let yr=class extends jo{constructor(e){super(e)}createUpdateDelegationValuesDefault(e,t){return{delegation:this.delegationInputDefault(e,t),selectedAccreditationsSlotsIds:[]}}delegationInputDefault(e,t){const n=t?.forms&&t?.parentDelegation?t.forms.find(e=>e.name===t.parentDelegation?.form.name):null,i=e?.formId??n?.id??-1,a=F(t?.delegationsCategories)&&t?.parentDelegation?t.delegationsCategories.find(e=>e.name===t.parentDelegation?.delegationCategory.name):null;let s=e?.delegationCategoryId??a?.id??t?.delegationCategoryId;return Number.isInteger(s)||(s=null),{...this.getDefaultAccreditations(e),delegationCategoryId:s,parentId:e?.parentId??t?.parentId??null,name:e?.name??"",description:e?.description??"",leadersIds:e?.leadersIds??t?.parentDelegation?.leadersIds??[],formId:i,deadlineDate:e?.deadlineDate??null,maxResources:e?.maxResources??null,showInDelegationSpace:e?.showInDelegationSpace??!0,showFormLinkInDelegationSpace:e?.showFormLinkInDelegationSpace??!0,delegationsSpaceLayoutId:e?.delegationsSpaceLayoutId??null,columns:e?.columns??t?.parentDelegation?.columns??["name","accreditations","accreditation_state"],canLeadersAddMembers:e?.canLeadersAddMembers??!0,canLeadersDeleteMembers:e?.canLeadersDeleteMembers??!0,canLeadersDuplicateMembers:e?.canLeadersDuplicateMembers??!1,canLeadersEditColumns:e?.canLeadersEditColumns??!0,canLeadersEditCustomFields:e?.canLeadersEditCustomFields??!0,canLeadersEditMembers:e?.canLeadersEditMembers??!0,canLeadersImportMembers:e?.canLeadersImportMembers??!1,canLeadersSeeHiddenAccreditationsSlots:e?.canLeadersSeeHiddenAccreditationsSlots??!1,privateNote:e?.privateNote??t?.parentDelegation?.privateNote??"",addDefaultAccreditationsByAvailability:e?.addDefaultAccreditationsByAvailability??!1,showAllAccreditations:e?.showAllAccreditations??!1,tagsIds:e?.tagsIds??t?.parentDelegation?.tagsIds??[],customFields:e?.customFields||[],fields:e?.fields??{},campaignsIds:e?.campaignsIds??[],customDocumentsSlugs:e?.customDocumentsSlugs??[],usedCustomFieldsIds:e?.usedCustomFieldsIds??[],accreditationsProfiles:e?.accreditationsProfiles??[]}}delegationInputSchema(){return ho.Ik().shape({parentId:ho.ai().nullable(),name:ho.Yj().when("parentId",{is:null,then:e=>e.required(this.t("le_nom_de_la_d_10042"))}),description:ho.Yj(),delegationCategoryId:ho.ai().required(this.t("la_cat_gorie_es_14008")).positive(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")),leadersIds:ho.YO().of(ho.ai()),formId:ho.ai().required(this.t("le_formulaire_e_77404")).typeError(this.t("le_formulaire_e_77404")).test("form-id-valid",this.t("le_formulaire_e_77404"),e=>"number"==typeof e&&e>0),deadlineDate:bo.typeError(this.t("la_date_limite_91708")).nullable(),maxResources:ho.ai().min(0).nullable(),showInDelegationSpace:ho.zM().required(),showFormLinkInDelegationSpace:ho.zM().required(),columns:ho.YO().of(ho.Yj()).required(this.t("vous_devez_choi_82605")).min(1,this.t("vous_devez_choi_82605")),canLeadersAddMembers:ho.zM().required(),canLeadersDeleteMembers:ho.zM().required(),canLeadersEditColumns:ho.zM().required(),canLeadersEditMembers:ho.zM().required(),canLeadersEditCustomFields:ho.zM().required(),canLeadersImportMembers:ho.zM().required(),canLeadersSeeHiddenAccreditationsSlots:ho.zM().required(),privateNote:ho.Yj(),accreditations:ho.YO().of(ho.Ik().shape({accreditationCategoryId:ho.ai().required(),accreditationId:ho.ai().required(),maxResources:ho.gl().nullable(),willAutoAccredit:ho.zM().required()})),accreditationsSlots:ho.YO().of(ho.Ik().shape({accreditationCategoryId:ho.ai().required(),accreditationId:ho.ai().required(),accreditationSlotId:ho.ai().required(),isDefault:ho.zM().required(),maxResources:ho.gl().nullable()})),accreditationsProfiles:ho.YO().of(ho.Ik().shape({accreditationProfileId:ho.ai().required(),maxResources:ho.gl().nullable(),willAutoAccredit:ho.zM().required()})),campaignsIds:ho.YO().of(ho.ai()),customDocumentsSlugs:ho.YO().of(ho.gl()),usedCustomFieldsIds:ho.YO().of(ho.ai())})}delegationUpdateFieldsSchema(e){return ho.Ik().shape({fields:e})}createUpdateDelegationSchema(e){const t=this.delegationInputSchema();return ho.Ik().shape({delegation:e?t.shape({fields:e}):t})}adminAddSchema(){return ho.Ik().shape({usersInfosIds:ho.YO().of(ho.ai())})}getDefaultAccreditations(e){let t=e?.accreditationsCategories||[],n=e?.accreditations||[];const i=e?.accreditationsSlots||[];return F(i)&&(t=(0,_r.A)(t.concat(i.map(e=>({accreditationCategoryId:e.accreditationCategoryId,maxResources:null}))),e=>e.accreditationCategoryId)),F(i)&&(n=(0,_r.A)(n.concat(i.map(e=>({accreditationCategoryId:e.accreditationCategoryId,accreditationId:e.accreditationId,maxResources:null,willAutoAccredit:!1}))),e=>e.accreditationId)),{accreditationsCategories:t,accreditations:n,accreditationsSlots:i}}};yr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],yr);var Sr;let jr=class extends No{static{Sr=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...No.IMPORT_COLUMNS_DEFAULT,Name:"name",CategoryName:"categoryName",FormId:"formId",Deadline:"deadline",MaxResources:"maxResources",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[Sr.IMPORT_COLUMNS_DEFAULT.Id]:[],Sr.IMPORT_COLUMNS_DEFAULT.Name,Sr.IMPORT_COLUMNS_DEFAULT.CategoryName,Sr.IMPORT_COLUMNS_DEFAULT.FormId];default(e){const t=super.default(e);return t.input={...t.input},t}constructor(e,t){super(e,t),this.csvInputService=e}};jr=Sr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],jr);const vr=e=>e.join("/"),br=ia.HEAVENT_APPLICATION_BASENAME,Ar={FIELDS:{PLURAL:"fields",SINGLE:"field"}},Cr={AUTH:"auth",EDIT:"edit",CREATE:"create",EXPORT:"export",EXPORT_BASIC:"export/basic",EXPORT_API:"export/api",IMPORT:"import",INVITE:"invite"},Er={INFORMATION:"information",DASHBOARD:"dashboard",HISTORY:"history",REGISTRATION:"registration",DOCUMENTS:"documents",PROFILE:"profile",REPORTING:"reporting",FORMS:"forms",FORM:"form",MEMBER:"member",MEMBERS:"members",PREVIEW:"preview"},Tr={LIST:"list"},Mr=e=>vr([e,Cr.AUTH]),Rr=e=>vr([e,Tr.LIST]),Dr=e=>vr([e,Cr.CREATE]),Or=e=>vr([e,Cr.EDIT]);var wr,Pr,$r,kr,Nr,zr,Lr,Fr,Ur;function Br(e){switch(e){case $r.AccreditationsMatrix:case zr.AccreditationsMatrix:return"table-cells";case Nr.Calendar:case zr.Calendar:return"chart-gantt";case kr.Card:return"rectangle-list";case Pr.List:case $r.List:case kr.List:case Nr.List:case zr.List:return"table";case Nr.Map:case zr.Map:return"map-location";case Pr.SlotsList:case Nr.SlotsList:return"table";case Pr.Table:return"table-cells";case Pr.WeeklyCalendar:return"calendar";default:return tr()}}function Vr(e,t){switch(t){case $r.AccreditationsMatrix:case zr.AccreditationsMatrix:return e("matrice_des_acc_84939");case Nr.Calendar:case zr.Calendar:return e("vue_planning_91663");case kr.Card:return e("vue_grille_37962");case Pr.List:case $r.List:case kr.List:case Nr.List:case zr.List:return e("vue_liste_56882");case Nr.Map:case zr.Map:return e("vue_carte_79064");case Pr.SlotsList:case Nr.SlotsList:return e("vue_liste_cr_n_47406");case Pr.Table:return e("vue_tableau_18026");case Pr.WeeklyCalendar:return e("vue_calendrier_58086");default:return tr()}}!function(e){e.Category="Category",e.Date="Date"}(wr||(wr={})),(Ur=Pr||(Pr={})).List="List",Ur.SlotsList="SlotsList",Ur.Table="Table",Ur.WeeklyCalendar="WeeklyCalendar",(Fr=$r||($r={})).AccreditationsMatrix="AccreditationsMatrix",Fr.List="List",function(e){e.Card="Card",e.List="List"}(kr||(kr={})),(Lr=Nr||(Nr={})).Calendar="Calendar",Lr.List="List",Lr.Map="Map",Lr.SlotsList="SlotsList",function(e){e.AccreditationsMatrix="AccreditationsMatrix",e.Calendar="Calendar",e.List="List",e.Map="Map"}(zr||(zr={}));let Gr=class extends jo{constructor(e){super(e)}delegationsSpaceLayoutTabInputDefault(){return{name:this.t("tab_sans_nom_50048"),description:"",slug:"",canDelete:!0,isVisible:!0,isPinned:!1,segmentType:Tt.Volunteers,rendering:zr.List,infos:{matrixShowAccreditations:!0,matrixShowProfiles:!0}}}defaultDashboardTab(){return{name:this.t("tableau_de_bord_24627"),description:"",slug:Er.DASHBOARD,canDelete:!1,isVisible:!0,isPinned:!0,segmentType:Tt.Volunteers,rendering:zr.List,infos:{}}}defaultDocumentsTab(){return{name:this.t("Documents"),description:"",slug:Er.DOCUMENTS,canDelete:!1,isVisible:!0,isPinned:!1,segmentType:Tt.Volunteers,rendering:zr.List,infos:{}}}tabInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),description:ho.Yj(),slug:ho.Yj().required(this.t("l_url_est_requi_99475")).test("is-valid-slug",this.t("le_slug_ne_doit_10047"),e=>g(e)===e),canDelete:ho.zM().required(),isVisible:ho.zM().required(),isPinned:ho.zM().required(),segmentType:ho.Yj().oneOf([Tt.Accreditations,Tt.Volunteers],this.t("le_type_de_vue_62720")).required(this.t("le_type_de_vue_62720")),rendering:ho.Yj().required(this.t("le_type_de_visu_51393"))})}};Gr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Gr);let Wr=class extends jo{tabInput;constructor(e,t){super(e),this.tabInput=t}delegationSpaceLayoutInputDefault(e){return{name:e?.name??"",tabs:e?.tabs??[this.tabInput.defaultDashboardTab(),this.tabInput.defaultDocumentsTab()]}}delegationSpaceLayoutInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_du_layou_34851")),tabs:ho.YO().of(this.tabInput.tabInputSchema())})}createUpdateDelegationSpaceLayout(){return ho.Ik().shape({delegationsSpaceLayout:this.delegationSpaceLayoutInputSchema()})}};Wr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,Gr])],Wr);function qr(e){return"production"===s.Development&&ia.HIGHLIGHT_CUSTOM_COLOURS?{grayCustom50:"#fabbf6",grayCustom500:"#fa5aef",grayCustom700:"#ff3df2",grayCustom800:"#fc23ee",grayCustom900:"#ff03ee",primaryCustom500:"#9cff66",primaryCustom600:"#61fc0d"}:{grayCustom50:e?.grayCustom50??v.colors.gray50.value,grayCustom500:e?.grayCustom500??v.colors.gray500.value,grayCustom700:e?.grayCustom700??v.colors.gray700.value,grayCustom800:e?.grayCustom800??v.colors.gray800.value,grayCustom900:e?.grayCustom900??v.colors.gray900.value,primaryCustom500:e?.primaryCustom500??v.colors.primary500.value,primaryCustom600:e?.primaryCustom600??v.colors.primary600.value}}let Yr=class extends jo{documentInputService;constructor(e,t){super(t),this.documentInputService=e}designInputDefault(e,t){return{banner:t?.banner??e?.banner??this.documentInputService.documentInputDefault(),logo:t?.logo??e?.logo??this.documentInputService.documentInputDefault(),colors:qr(t?.colors??e?.colors)}}formParametersDesignInputDefault(e){return{banner:e?.banner??this.documentInputService.documentInputDefault(),colors:qr(e?.colors)}}};Yr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ur,Si])],Yr);let Hr=class extends jo{documentInputService;constructor(e,t){super(e),this.documentInputService=t}emailSenderInputDefault(e){return{header:e?.header??this.documentInputService.documentInputDefault(),picture:e?.picture??this.documentInputService.documentInputDefault(),footer:e?.footer??this.documentInputService.documentInputDefault(),signature:e?.signature??"",name:e?.name??"",fromEmail:e?.fromEmail??"",fromName:e?.fromName??"",replyTo:e?.replyTo??"",eventsIds:e?.eventsIds??[],isOrganizationDefault:e?.isOrganizationDefault??!1}}emailSenderInputSchema(){return ho.Ik().shape({header:this.documentInputService.documentInputSchemaNotRequired(),picture:this.documentInputService.documentInputSchemaNotRequired(),signature:ho.Yj(),name:ho.Yj().required(this.t("le_label_est_re_86986")),fromEmail:ho.Yj().required(this.t("l_e_mail_de_l_56279")),fromName:ho.Yj().required(this.t("le_nom_de_l_me_01331")),replyTo:ho.Yj()})}createUpdateEmailSenderSchema(){return ho.Ik().shape({emailSender:this.emailSenderInputSchema()})}};Hr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,ur])],Hr);const Zr=ia.EMAIL_FROM_NAME;let Kr=class extends jo{constructor(e){super(e)}emailTemplateDefault(e,t,n,i,a){const s=this.emailTypeToDefault(e,t,i,a);return n&&(s.subject=n.subject,s.content=n.content),{useDefault:n?.useDefault??!0,emailType:e,emailSenderId:n?.emailSenderId,attachments:n?.attachments??[],hasCalendarInvite:n?.hasCalendarInvite??!1,calendarInviteName:n?.calendarInviteName??null,calendarInviteStartDate:n?.calendarInviteStartDate??null,calendarInviteStartTime:n?.calendarInviteStartTime??null,calendarInviteEndDate:n?.calendarInviteEndDate??null,calendarInviteEndTime:n?.calendarInviteEndTime??null,...s}}emailTemplateSchema(){return ho.Ik().shape({useDefault:ho.zM().required(""),emailType:ho.Yj().required(this.t("le_type_d_e_mai_84281")).oneOf(Nn,this.t("le_type_d_e_mai_84281")),subject:ho.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_sujet_est_re_18923"))}),content:ho.Yj().when("useDefault",{is:!1,then:e=>e.required(this.t("le_contenu_est_45048")).test("contains-code",this.t("le_contenu_doit_64437"),function(){return!(!this.parent.useDefault&&this.parent.emailType===Te.Code)||this.parent.content.includes("{code}")})}),attachments:ho.YO().of(ho.Yj()),hasCalendarInvite:ho.zM().required(),calendarInviteName:ho.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("nom_de_l_v_nem_58512")),otherwise:e=>e.nullable()}),calendarInviteStartDate:bo.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),otherwise:e=>e.nullable()}),calendarInviteStartTime:ho.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("heure_de_d_but_90785")),otherwise:e=>e.nullable()}),calendarInviteEndDate:bo.when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")),otherwise:e=>e.nullable()}),calendarInviteEndTime:ho.Yj().when("hasCalendarInvite",{is:!0,then:e=>e.required(this.t("l_heure_de_fin_78626")),otherwise:e=>e.nullable()})})}updateEmailTemplateSchema(){return ho.Ik().shape({emailTemplate:this.emailTemplateSchema()})}emailTypeToDefault(e,t,n,i){switch(e){case Te.Accreditations:return this.accreditationsDefault();case Te.AccreditationsRefused:return this.accreditationsRefusedDefault();case Te.Assignments:return this.assignmentsDefault();case Te.Code:return this.codeDefault(n,i);case Te.FormInvite:return this.formInviteDefault();case Te.FormSubmit:return this.formSubmitDefault(n);case Te.NotifyLeaders:return this.notifyLeadersDefault(t);case Te.DelegationCategoryLeaderAssign:return this.delegationCategoryLeaderAssign(t);case Te.DelegationFormInvite:return this.delegationFormInviteDefault();case Te.DelegationLeaderAssign:return this.delegationLeaderAssign();case Te.PositionCategoryLeaderAssign:return this.positionCategoryLeaderAssignDefault(t);case Te.PositionLeaderAssign:return this.positionLeaderAssign(t);case Te.Refused:return this.refusedDefault();case Te.VolunteerRegistration:return this.volunteerRegistrationDefault();case Te.Campaign:case Te.AccreditationsImport:case Te.AccreditationsProfilesImport:case Te.DelegationsImport:case Te.EventsImport:case Te.FilesImport:case Te.Documents:case Te.EventInvite:case Te.Export:case Te.MembersImport:case Te.NewMember:case Te.OrganizationInvite:case Te.PositionsImport:throw new Error("Impossible to change this email");default:return tr()}}accreditationsDefault(){return{subject:this.t("_event_name_49280"),content:this.t("accreditations_default")}}accreditationsRefusedDefault(){return{subject:this.t("_event_name_01805"),content:this.t("accreditations_refused_default")}}assignmentsDefault(){return{subject:this.t("_event_name_72063"),content:this.t("assignments_default")}}codeDefault(e,t){return{subject:e&&!t?this.t("code_de_v_rific_41117"):this.t("code_de_connexi_57121"),content:this.t("code_default")}}formInviteDefault(){return{subject:this.t("form_invite_subject"),content:this.t("form_invite_content")}}formSubmitDefault(e){return e?{subject:this.t("_event_name_12686"),content:this.t("form_submit_event_default")}:{subject:this.t("_organization_n_21926"),content:this.t("form_submit_organization_default")}}notifyLeadersDefault(e){return{subject:this.t("_event_name_95901"),content:this.t("notify_leaders_default_1",e.href,Zr)}}delegationCategoryLeaderAssign(e){return{subject:this.t("_event_name_69973"),content:this.t("_p_bonjour_use_97817",Zr,e.href,Zr)}}delegationLeaderAssign(){return{subject:this.t("_event_name_92886"),content:this.t("_p_bonjour_use_96380")}}delegationFormInviteDefault(){return{subject:this.t("invitation_re_29033"),content:this.t("_p_bonjour_use_29618")}}positionCategoryLeaderAssignDefault(e){return{subject:this.t("_event_name_63708"),content:this.t("category_leader_assign_default_1",Zr,e.href,Zr)}}positionLeaderAssign(e){return{subject:this.t("_event_name_60486"),content:this.t("leader_assign_default_1",Zr,e.href,Zr)}}refusedDefault(){return{subject:this.t("_event_name_59248"),content:this.t("refused_default")}}volunteerRegistrationDefault(){return{subject:this.t("_event_name_12686"),content:this.t("volunteer_registration_default")}}};Kr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Kr);let Qr=class extends jo{constructor(e){super(e)}eventDuplicateInputDefault(e){return{name:this.t("copie_de_1_62900",e.name),startAt:e.startAt,endAt:e.endAt,eventId:null,includeAccreditations:!0,includeCustomDocuments:!0,includeCustomFields:!0,includeDelegations:!0,includeEmailsTemplates:!0,includeForms:!0,includePositions:!0,includeSegments:!0,includeTemplates:!0,includeWorkflows:!0}}eventDuplicateSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),startAt:bo.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:bo.required(this.t("la_date_de_fin_45068")).typeError(this.t("la_date_de_fin_45068")).test("after-start-at",this.t("la_date_de_fin_00429"),function(){return wa.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&wa.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),includeAccreditations:ho.zM(),includeCustomDocuments:ho.zM(),includeCustomFields:ho.zM(),includeDelegations:ho.zM(),includeEmailsTemplates:ho.zM(),includeForms:ho.zM(),includePositions:ho.zM(),includeSegments:ho.zM(),includeTemplates:ho.zM(),includeWorkflows:ho.zM()})}};Qr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Qr);let Xr=class{countries;countriesCodes;phoneCodes;constructor(e){const t=e.translate.bind(e);this.countries=(0,mo.A)([{phoneCode:"+93",code:"AF",name:t("afghanistan_59344"),nationality:t("afghan_10143"),emoji:"🇦🇫",language:["ps","ps-AR"],smsPrice:.27},{phoneCode:"+35818",code:"AX",name:t("_land_islands_92853"),nationality:t("_land_island_62794"),emoji:"🇦🇽"},{phoneCode:"+355",code:"AL",name:t("albania_07621"),nationality:t("albanian_82021"),emoji:"🇦🇱",language:["sq","sq-AL"],smsPrice:.12},{phoneCode:"+213",code:"DZ",name:t("algeria_37723"),nationality:t("algerian_97855"),emoji:"🇩🇿",language:"ar-DZ",smsPrice:.285},{phoneCode:"+1684",code:"AS",name:t("american_samoa_95023"),nationality:t("american_samoan_76272"),emoji:"🇦🇸"},{phoneCode:"+376",code:"AD",name:t("andorra_45150"),nationality:t("andorran_97838"),emoji:"🇦🇩",smsPrice:.52},{phoneCode:"+244",code:"AO",name:t("angola_15815"),nationality:t("angolan_91942"),emoji:"🇦🇴",smsPrice:.17},{phoneCode:"+1264",code:"AI",name:t("anguilla_53408"),nationality:t("anguillan_92612"),emoji:"🇦🇮"},{phoneCode:"+1268",code:"AG",name:t("antigua_and_bar_05164"),nationality:t("antiguan_or_bar_26833"),emoji:"🇦🇬"},{phoneCode:"+54",code:"AR",name:t("argentina_92219"),nationality:t("argentine_14780"),emoji:"🇦🇷",language:"es-AR",smsPrice:.11},{phoneCode:"+374",code:"AM",name:t("armenia_90330"),nationality:t("armenian_87788"),language:["hy","hy-AM"],emoji:"🇦🇲"},{phoneCode:"+297",code:"AW",name:t("aruba_62942"),nationality:t("aruban_18515"),emoji:"🇦🇼",smsPrice:.33},{phoneCode:"+61",code:"AU",name:t("australia_84647"),nationality:t("australian_83553"),emoji:"🇦🇺",language:"en-AU",smsPrice:.093},{phoneCode:"+43",code:"AT",name:t("austria_67457"),nationality:t("austrian_39761"),emoji:"🇦🇹",language:"de-AT",smsPrice:.066},{phoneCode:"+994",code:"AZ",name:t("azerbaijan_14476"),nationality:t("azerbaijani_az_92428"),emoji:"🇦🇿",language:"az-AZ",smsPrice:.39},{phoneCode:"+1242",code:"BS",name:t("bahamas_33701"),nationality:t("bahamian_86817"),emoji:"🇧🇸"},{phoneCode:"+973",code:"BH",name:t("bahrain_43417"),nationality:t("bahraini_76209"),emoji:"🇧🇭",language:"ar-BH",smsPrice:.12},{phoneCode:"+880",code:"BD",name:t("bangladesh_48531"),nationality:t("bangladeshi_66399"),emoji:"🇧🇩",smsPrice:.425},{phoneCode:"+1246",code:"BB",name:t("barbados_57235"),nationality:t("barbadian_02319"),emoji:"🇧🇧"},{phoneCode:"+375",code:"BY",name:t("belarus_97102"),nationality:t("belarusian_60742"),emoji:"🇧🇾",language:["be","be-BY"],smsPrice:.31},{phoneCode:"+32",code:"BE",name:t("belgium_21048"),nationality:t("belgian_00407"),emoji:"🇧🇪",language:["fr-BE","nl-BE"],smsPrice:.094},{phoneCode:"+501",code:"BZ",name:t("belize_94460"),nationality:t("belizean_90827"),emoji:"🇧🇿",language:"en-BZ",smsPrice:0},{phoneCode:"+229",code:"BJ",name:t("benin_88614"),nationality:t("beninese_benin_55987"),emoji:"🇧🇯",smsPrice:.04},{phoneCode:"+1441",code:"BM",name:t("bermuda_84448"),nationality:t("bermudian_berm_58878"),emoji:"🇧🇲"},{phoneCode:"+975",code:"BT",name:t("bhutan_12608"),nationality:t("bhutanese_34101"),emoji:"🇧🇹",smsPrice:.39},{phoneCode:"+591",code:"BO",name:t("bolivia_plurin_43912"),nationality:t("bolivian_98429"),emoji:"🇧🇴",language:["es-BO","qu-BO"],smsPrice:.38},{phoneCode:"+5997",code:"BQ",name:t("bonaire_sint_e_69605"),nationality:t("bonaire_07340"),emoji:"🇧🇶"},{phoneCode:"+387",code:"BA",name:t("bosnia_and_herz_91990"),nationality:t("bosnian_or_herz_88694"),emoji:"🇧🇦",language:["bs-BA","hr-BA","sr-BA"],smsPrice:.46},{phoneCode:"+267",code:"BW",name:t("botswana_49258"),nationality:t("motswana_botsw_32461"),emoji:"🇧🇼",smsPrice:.13},{phoneCode:"+55",code:"BR",name:t("brazil_03275"),nationality:t("brazilian_74116"),emoji:"🇧🇷",language:"pt-BR",smsPrice:.051},{phoneCode:"+246",code:"IO",name:t("british_indian_92949"),nationality:t("british_indian_08875"),emoji:"🇮🇴"},{phoneCode:"+673",code:"BN",name:t("brunei_darussal_84695"),nationality:t("bruneian_06218"),emoji:"🇧🇳",language:"ms-BN",smsPrice:.05},{phoneCode:"+359",code:"BG",name:t("bulgaria_97045"),nationality:t("bulgarian_79288"),emoji:"🇧🇬",language:["bg","bg-BG"],smsPrice:.16},{phoneCode:"+226",code:"BF",name:t("burkina_faso_55299"),nationality:t("burkinab_02690"),emoji:"🇧🇫",smsPrice:.032},{phoneCode:"+257",code:"BI",name:t("burundi_85561"),nationality:t("burundian_35605"),emoji:"🇧🇮",smsPrice:.05},{phoneCode:"+238",code:"CV",name:t("cabo_verde_28261"),nationality:t("cabo_verdean_88842"),emoji:"🇨🇻",smsPrice:.2},{phoneCode:"+855",code:"KH",name:t("cambodia_77971"),nationality:t("cambodian_19577"),emoji:"🇰🇭",smsPrice:.52},{phoneCode:"+237",code:"CM",name:t("cameroon_44200"),nationality:t("cameroonian_12953"),emoji:"🇨🇲",smsPrice:.024},{phoneCode:"+1",code:"CA",name:t("canada_52584"),nationality:t("canadian_90836"),emoji:"🇨🇦",language:["en-CA","fr-CA"],smsPrice:.03},{phoneCode:"+1345",code:"KY",name:t("cayman_islands_80923"),nationality:t("caymanian_07521"),emoji:"🇰🇾"},{phoneCode:"+236",code:"CF",name:t("central_african_74182"),nationality:t("central_african_89873"),emoji:"🇨🇫",smsPrice:.053},{phoneCode:"+235",code:"TD",name:t("chad_58721"),nationality:t("chadian_55061"),emoji:"🇹🇩",smsPrice:.035},{phoneCode:"+56",code:"CL",name:t("chile_06923"),nationality:t("chilean_69498"),emoji:"🇨🇱",language:"es-CL",smsPrice:.13},{phoneCode:"+86",code:"CN",name:t("china_40708"),nationality:t("chinese_12117"),emoji:"🇨🇳",language:["zh","zh-CN"],smsPrice:.055},{phoneCode:"+6189164",code:"CX",name:t("christmas_islan_46649"),nationality:t("christmas_islan_46649"),emoji:"🇨🇽"},{phoneCode:"+6189162",code:"CC",name:t("cocos_keeling_98180"),nationality:t("cocos_island_82627"),emoji:"🇨🇨"},{phoneCode:"+57",code:"CO",name:t("colombia_37632"),nationality:t("colombian_28222"),emoji:"🇨🇴",language:"es-CO",smsPrice:.033},{phoneCode:"+269",code:"KM",name:t("comoros_35439"),nationality:t("comoran_comori_49754"),emoji:"🇰🇲",smsPrice:.42},{phoneCode:"+242",code:"CG",name:t("congo_republic_97304"),nationality:t("congolese_04965"),emoji:"🇨🇬",smsPrice:.045},{phoneCode:"+243",code:"CD",name:t("congo_democrat_80102"),nationality:t("congolese_04965"),emoji:"🇨🇩",smsPrice:.2},{phoneCode:"+682",code:"CK",name:t("cook_islands_51542"),nationality:t("cook_island_99158"),emoji:"🇨🇰",smsPrice:.12},{phoneCode:"+506",code:"CR",name:t("costa_rica_57058"),nationality:t("costa_rican_17127"),emoji:"🇨🇷",language:"es-CR",smsPrice:.061},{phoneCode:"+225",code:"CI",name:t("c_te_d_ivoire_55380"),nationality:t("ivorian_01729"),emoji:"🇨🇮",smsPrice:.055},{phoneCode:"+385",code:"HR",name:t("croatia_52101"),nationality:t("croatian_62900"),emoji:"🇭🇷",language:["hr","hr-HR"],smsPrice:.13},{phoneCode:"+53",code:"CU",name:t("cuba_11922"),nationality:t("cuban_00956"),emoji:"🇨🇺",smsPrice:.08},{phoneCode:"+5999",code:"CW",name:t("cura_ao_46587"),nationality:t("cura_aoan_65055"),emoji:"🇨🇼"},{phoneCode:"+357",code:"CY",name:t("cyprus_86967"),nationality:t("cypriot_85282"),emoji:"🇨🇾",smsPrice:.083},{phoneCode:"+420",code:"CZ",name:t("czech_republic_57570"),nationality:t("czech_42120"),emoji:"🇨🇿",language:["cs","cs-CZ"],smsPrice:.08},{phoneCode:"+45",code:"DK",name:t("denmark_28356"),nationality:t("danish_44544"),emoji:"🇩🇰",language:["da","da-DK"],smsPrice:.06},{phoneCode:"+253",code:"DJ",name:t("djibouti_38156"),nationality:t("djiboutian_72034"),emoji:"🇩🇯",smsPrice:.12},{phoneCode:"+1767",code:"DM",name:t("dominica_13395"),nationality:t("dominican_54004"),emoji:"🇩🇲"},{phoneCode:["+1809","+1829","+1849"],code:"DO",name:t("dominican_repub_08891"),nationality:t("dominican_54004"),emoji:"🇩🇴",language:"es-DO"},{phoneCode:"+593",code:"EC",name:t("ecuador_25933"),nationality:t("ecuadorian_50591"),emoji:"🇪🇨",language:["es-EC","qu-EC"],smsPrice:.48},{phoneCode:"+20",code:"EG",name:t("egypt_61058"),nationality:t("egyptian_75798"),emoji:"🇪🇬",language:"ar-EG",smsPrice:.45},{phoneCode:"+503",code:"SV",name:t("el_salvador_37036"),nationality:t("salvadoran_02475"),emoji:"🇸🇻",language:"es-SV",smsPrice:.34},{phoneCode:"+240",code:"GQ",name:t("equatorial_guin_39570"),nationality:t("equatorial_guin_44537"),emoji:"🇬🇶",smsPrice:.21},{phoneCode:"+291",code:"ER",name:t("eritrea_67366"),nationality:t("eritrean_20355"),emoji:"🇪🇷",smsPrice:.045},{phoneCode:"+372",code:"EE",name:t("estonia_58256"),nationality:t("estonian_46354"),emoji:"🇪🇪",language:["et","et-EE"],smsPrice:.08},{phoneCode:"+251",code:"ET",name:t("ethiopia_72971"),nationality:t("ethiopian_03019"),emoji:"🇪🇹",smsPrice:.08},{phoneCode:"+500",code:"FK",name:t("falkland_island_59316"),nationality:t("falkland_island_15848"),emoji:"🇫🇰"},{phoneCode:"+298",code:"FO",name:t("faroe_islands_71549"),nationality:t("faroese_32806"),emoji:"🇫🇴",language:["fo","fo-FO"],smsPrice:.046},{phoneCode:"+679",code:"FJ",name:t("fiji_36369"),nationality:t("fijian_39649"),emoji:"🇫🇯",smsPrice:.21},{phoneCode:"+358",code:"FI",name:t("finland_07531"),nationality:t("finnish_24918"),emoji:"🇫🇮",language:["fi","fi-FI","se-FI","sv-FI"],smsPrice:.083},{phoneCode:"+33",code:"FR",name:t("france_26614"),nationality:t("french_86034"),emoji:"🇫🇷",language:["fr","fr-FR"],smsPrice:.045},{phoneCode:"+594",code:"GF",name:t("french_guiana_80598"),nationality:t("french_guianese_02041"),emoji:"🇬🇫",smsPrice:.17},{phoneCode:"+689",code:"PF",name:t("french_polynesi_50842"),nationality:t("french_polynesi_47751"),emoji:"🇵🇫",smsPrice:.18},{phoneCode:"+241",code:"GA",name:t("gabon_58286"),nationality:t("gabonese_62984"),emoji:"🇬🇦",smsPrice:.045},{phoneCode:"+220",code:"GM",name:t("gambia_93575"),nationality:t("gambian_30767"),emoji:"🇬🇲",smsPrice:.19},{phoneCode:"+995",code:"GE",name:t("georgia_93003"),nationality:t("georgian_79366"),emoji:"🇬🇪",language:["ka","ka-GE"]},{phoneCode:"+49",code:"DE",name:t("germany_31193"),nationality:t("german_36386"),emoji:"🇩🇪",language:["de","de-DE"],smsPrice:.089},{phoneCode:"+233",code:"GH",name:t("ghana_32464"),nationality:t("ghanaian_99745"),emoji:"🇬🇭",smsPrice:.033},{phoneCode:"+350",code:"GI",name:t("gibraltar_24360"),nationality:t("gibraltar_24360"),emoji:"🇬🇮",smsPrice:.076},{phoneCode:"+30",code:"GR",name:t("greece_28837"),nationality:t("greek_hellenic_39006"),emoji:"🇬🇷",language:["el","el-GR"],smsPrice:.061},{phoneCode:"+299",code:"GL",name:t("greenland_80916"),nationality:t("greenlandic_67508"),emoji:"🇬🇱",smsPrice:.036},{phoneCode:"+1473",code:"GD",name:t("grenada_04221"),nationality:t("grenadian_25686"),emoji:"🇬🇩"},{phoneCode:"+590",code:"GP",name:t("guadeloupe_95839"),nationality:t("guadeloupe_95839"),emoji:"🇬🇵"},{phoneCode:"+1671",code:"GU",name:t("guam_76384"),nationality:t("guamanian_guam_01132"),emoji:"🇬🇺"},{phoneCode:"+502",code:"GT",name:t("guatemala_49597"),nationality:t("guatemalan_60946"),emoji:"🇬🇹",language:"es-GT",smsPrice:.3},{phoneCode:["+441481","+447781","+447839","+447911"],code:"GG",name:t("guernsey_87507"),nationality:t("channel_island_53762"),emoji:"🇬🇬"},{phoneCode:"+224",code:"GN",name:t("guinea_20770"),nationality:t("guinean_42564"),emoji:"🇬🇳",smsPrice:.056},{phoneCode:"+245",code:"GW",name:t("guinea_bissau_80728"),nationality:t("bissau_guinean_66742"),emoji:"🇬🇼",smsPrice:.09},{phoneCode:"+592",code:"GY",name:t("guyana_92443"),nationality:t("guyanese_56902"),emoji:"🇬🇾",smsPrice:.3},{phoneCode:"+509",code:"HT",name:t("haiti_99471"),nationality:t("haitian_50142"),emoji:"🇭🇹",smsPrice:.3},{phoneCode:"+379",code:"VA",name:t("vatican_city_st_63732"),nationality:t("vatican_36370"),emoji:"🇻🇦"},{phoneCode:"+504",code:"HN",name:t("honduras_79402"),nationality:t("honduran_35392"),emoji:"🇭🇳",language:"es-HN",smsPrice:.267},{phoneCode:"+852",code:"HK",name:t("hong_kong_96239"),nationality:t("hong_kong_hong_64846"),emoji:"🇭🇰",language:"zh-HK",smsPrice:.079},{phoneCode:"+36",code:"HU",name:t("hungary_57981"),nationality:t("hungarian_magy_62212"),emoji:"🇭🇺",language:["hu","hu-HU"],smsPrice:.106},{phoneCode:"+354",code:"IS",name:t("iceland_79438"),nationality:t("icelandic_17689"),emoji:"🇮🇸",language:["is","is-IS"],smsPrice:.085},{phoneCode:"+91",code:"IN",name:t("india_39466"),nationality:t("indian_25592"),emoji:"🇮🇳",language:["gu","gu-IN","hi","hi-IN","kn","kn-IN","kok","kok-IN","mr","mr-IN","pa","pa-IN","sa","sa-IN","ta","ta-IN","te","te-IN"],smsPrice:.078},{phoneCode:"+62",code:"ID",name:t("indonesia_65003"),nationality:t("indonesian_29723"),emoji:"🇮🇩",language:["id","id-ID"],smsPrice:.464},{phoneCode:"+98",code:"IR",name:t("iran_76293"),nationality:t("iranian_persia_76791"),emoji:"🇮🇷",language:["fa","fa-IR"],smsPrice:.38},{phoneCode:"+964",code:"IQ",name:t("iraq_82027"),nationality:t("iraqi_31025"),emoji:"🇮🇶",language:"ar-IQ",smsPrice:.33},{phoneCode:"+353",code:"IE",name:t("ireland_62034"),nationality:t("irish_35774"),emoji:"🇮🇪",language:"en-IE",smsPrice:.065},{phoneCode:["+441624","+447524","+447624","+447924"],code:"IM",name:t("isle_of_man_64982"),nationality:t("manx_86314"),emoji:"🇮🇲"},{phoneCode:"+972",code:"IL",name:t("israel_20033"),nationality:t("israeli_69936"),emoji:"🇮🇱",language:["he","he-IL"],smsPrice:.3},{phoneCode:"+39",code:"IT",name:t("italy_14828"),nationality:t("italian_56623"),emoji:"🇮🇹",language:["it","it-IT"],smsPrice:.038},{phoneCode:"+1876",code:"JM",name:t("jamaica_55090"),nationality:t("jamaican_58881"),emoji:"🇯🇲",language:"en-JM"},{phoneCode:"+81",code:"JP",name:t("japan_61810"),nationality:t("japanese_82636"),emoji:"🇯🇵",language:["ja","ja-JP"],smsPrice:.08},{phoneCode:"+441534",code:"JE",name:t("jersey_78898"),nationality:t("channel_island_53762"),emoji:"🇯🇪"},{phoneCode:"+962",code:"JO",name:t("jordan_36280"),nationality:t("jordanian_41310"),emoji:"🇯🇴",language:"ar-JO",smsPrice:.39},{phoneCode:["+76","+77"],code:"KZ",name:t("kazakhstan_30541"),nationality:t("kazakhstani_ka_27277"),emoji:"🇰🇿",language:["kk","kk-KZ"]},{phoneCode:"+254",code:"KE",name:t("kenya_67944"),nationality:t("kenyan_92311"),emoji:"🇰🇪",language:["sw","sw-KE"],smsPrice:.3},{phoneCode:"+686",code:"KI",name:t("kiribati_25369"),nationality:t("i_kiribati_66745"),emoji:"🇰🇮",smsPrice:.036},{phoneCode:"+383",code:"XK",name:t("kosovo_44440"),nationality:t("kosovare_35920"),emoji:"🇽🇰",smsPrice:.12},{phoneCode:"+850",code:"KP",name:t("korea_democrat_48584"),nationality:t("north_korean_16553"),emoji:"🇰🇵",smsPrice:.045},{phoneCode:"+82",code:"KR",name:t("korea_republic_72269"),nationality:t("south_korean_89943"),emoji:"🇰🇷",language:["ko","ko-KR"],smsPrice:.029},{phoneCode:"+965",code:"KW",name:t("kuwait_22026"),nationality:t("kuwaiti_76148"),emoji:"🇰🇼",language:"ar-KW",smsPrice:.327},{phoneCode:"+996",code:"KG",name:t("kyrgyzstan_84406"),nationality:t("kyrgyzstani_ky_19120"),emoji:"🇰🇬",language:["ky","ky-KG"],smsPrice:.34},{phoneCode:"+856",code:"LA",name:t("lao_people_s_de_31069"),nationality:t("lao_laotian_28318"),emoji:"🇱🇦",smsPrice:.273},{phoneCode:"+371",code:"LV",name:t("latvia_73526"),nationality:t("latvian_53651"),emoji:"🇱🇻",language:["lv","lv-LV"],smsPrice:.057},{phoneCode:"+961",code:"LB",name:t("lebanon_49493"),nationality:t("lebanese_43182"),emoji:"🇱🇧",language:"ar-LB",smsPrice:.32},{phoneCode:"+266",code:"LS",name:t("lesotho_91086"),nationality:t("basotho_52532"),emoji:"🇱🇸",smsPrice:.35},{phoneCode:"+231",code:"LR",name:t("liberia_12077"),nationality:t("liberian_64388"),emoji:"🇱🇷",smsPrice:.3},{phoneCode:"+218",code:"LY",name:t("libya_26741"),nationality:t("libyan_35337"),emoji:"🇱🇾",language:"ar-LY",smsPrice:.38},{phoneCode:"+424",code:"LI",name:t("liechtenstein_56974"),nationality:t("liechtenstein_56974"),emoji:"🇱🇮",language:"de-LI"},{phoneCode:"+370",code:"LT",name:t("lithuania_95793"),nationality:t("lithuanian_94145"),emoji:"🇱🇹",language:["lt","lt-LT"],smsPrice:.06},{phoneCode:"+352",code:"LU",name:t("luxembourg_15613"),nationality:t("luxembourg_lux_47318"),emoji:"🇱🇺",language:["de-LU","fr-LU"],smsPrice:.1},{phoneCode:"+853",code:"MO",name:t("macao_74812"),nationality:t("macanese_chine_74224"),emoji:"🇲🇴",language:"zh-MO",smsPrice:.038},{phoneCode:"+389",code:"MK",name:t("macedonia_the_19021"),nationality:t("macedonian_20446"),emoji:"🇲🇰",language:["mk","mk-MK"],smsPrice:.095},{phoneCode:"+261",code:"MG",name:t("madagascar_57052"),nationality:t("malagasy_02353"),emoji:"🇲🇬",smsPrice:.029},{phoneCode:"+265",code:"MW",name:t("malawi_27143"),nationality:t("malawian_10093"),emoji:"🇲🇼",smsPrice:.3},{phoneCode:"+60",code:"MY",name:t("malaysia_54920"),nationality:t("malaysian_81474"),emoji:"🇲🇾",language:["ms","ms-MY"],smsPrice:.29},{phoneCode:"+960",code:"MV",name:t("maldives_67432"),nationality:t("maldivian_67878"),emoji:"🇲🇻",language:["dv","dv-MV"],smsPrice:.34},{phoneCode:"+223",code:"ML",name:t("mali_95091"),nationality:t("malian_malines_66005"),emoji:"🇲🇱",smsPrice:.055},{phoneCode:"+356",code:"MT",name:t("malta_73993"),nationality:t("maltese_52729"),emoji:"🇲🇹",language:["mt","mt-MT"],smsPrice:.08},{phoneCode:"+692",code:"MH",name:t("marshall_island_92726"),nationality:t("marshallese_30337"),emoji:"🇲🇭",smsPrice:.045},{phoneCode:"+596",code:"MQ",name:t("martinique_79541"),nationality:t("martiniquais_m_01923"),emoji:"🇲🇶"},{phoneCode:"+222",code:"MR",name:t("mauritania_77906"),nationality:t("mauritanian_68205"),emoji:"🇲🇷",smsPrice:.055},{phoneCode:"+230",code:"MU",name:t("mauritius_10801"),nationality:t("mauritian_09142"),emoji:"🇲🇺",smsPrice:.184},{phoneCode:["+262269","+262639"],code:"YT",name:t("mayotte_91167"),nationality:t("mahoran_45424"),emoji:"🇾🇹"},{phoneCode:"+52",code:"MX",name:t("mexico_21962"),nationality:t("mexican_80494"),emoji:"🇲🇽",language:"es-MX",smsPrice:.92},{phoneCode:"+691",code:"FM",name:t("micronesia_fed_39555"),nationality:t("micronesian_97912"),emoji:"🇫🇲",smsPrice:.045},{phoneCode:"+373",code:"MD",name:t("moldova_republ_08796"),nationality:t("moldovan_76486"),emoji:"🇲🇩"},{phoneCode:"+377",code:"MC",name:t("monaco_72117"),nationality:t("mon_gasque_mon_17281"),emoji:"🇲🇨",language:"fr-MC",smsPrice:.1},{phoneCode:"+976",code:"MN",name:t("mongolia_36757"),nationality:t("mongolian_33711"),emoji:"🇲🇳",language:["mn","mn-MN"],smsPrice:.33},{phoneCode:"+382",code:"ME",name:t("montenegro_78236"),nationality:t("montenegrin_68334"),emoji:"🇲🇪",smsPrice:.15},{phoneCode:"+1664",code:"MS",name:t("montserrat_38432"),nationality:t("montserratian_13585"),emoji:"🇲🇸"},{phoneCode:"+212",code:"MA",name:t("morocco_52420"),nationality:t("moroccan_14305"),emoji:"🇲🇦",language:"ar-MA"},{phoneCode:"+258",code:"MZ",name:t("mozambique_60988"),nationality:t("mozambican_68300"),emoji:"🇲🇿",smsPrice:.32},{phoneCode:"+95",code:"MM",name:t("myanmar_78678"),nationality:t("burmese_66869"),emoji:"🇲🇲",smsPrice:1.1},{phoneCode:"+264",code:"NA",name:t("namibia_19026"),nationality:t("namibian_01490"),emoji:"🇳🇦",smsPrice:.048},{phoneCode:"+674",code:"NR",name:t("nauru_16303"),nationality:t("nauruan_52578"),emoji:"🇳🇷",smsPrice:.21},{phoneCode:"+977",code:"NP",name:t("nepal_49088"),nationality:t("nepali_nepales_64761"),emoji:"🇳🇵",smsPrice:.35},{phoneCode:"+31",code:"NL",name:t("netherlands_38005"),nationality:t("dutch_netherla_42451"),emoji:"🇳🇱",language:["nl","nl-NL"],smsPrice:.095},{phoneCode:"+687",code:"NC",name:t("new_caledonia_14574"),nationality:t("new_caledonian_12113"),emoji:"🇳🇨",smsPrice:.1},{phoneCode:"+64",code:"NZ",name:t("new_zealand_61929"),nationality:t("new_zealander_71823"),emoji:"🇳🇿",language:["en-NZ","mi","mi-NZ"],smsPrice:.14},{phoneCode:"+505",code:"NI",name:t("nicaragua_14531"),nationality:t("nicaraguan_06649"),emoji:"🇳🇮",language:"es-NI",smsPrice:.17},{phoneCode:"+227",code:"NE",name:t("niger_59137"),nationality:t("nigerien_06144"),emoji:"🇳🇪",smsPrice:.067},{phoneCode:"+234",code:"NG",name:t("nigeria_77810"),nationality:t("nigerian_43407"),emoji:"🇳🇬",smsPrice:.47},{phoneCode:"+683",code:"NU",name:t("niue_97570"),nationality:t("niuean_70518"),emoji:"🇳🇺",smsPrice:.045},{phoneCode:"+6723",code:"NF",name:t("norfolk_island_62377"),nationality:t("norfolk_island_62377"),emoji:"🇳🇫"},{phoneCode:"+1670",code:"MP",name:t("northern_marian_94262"),nationality:t("northern_marian_82360"),emoji:"🇲🇵"},{phoneCode:"+47",code:"NO",name:t("norway_14236"),nationality:t("norwegian_50751"),emoji:"🇳🇴",language:["nb","nb-NO","nn-NO","se-NO"],smsPrice:.064},{phoneCode:"+968",code:"OM",name:t("oman_20900"),nationality:t("omani_15042"),emoji:"🇴🇲",language:"ar-OM",smsPrice:.21},{phoneCode:"+92",code:"PK",name:t("pakistan_59697"),nationality:t("pakistani_12622"),emoji:"🇵🇰",language:["ur","ur-PK"],smsPrice:.5},{phoneCode:"+680",code:"PW",name:t("palau_46088"),nationality:t("palauan_73033"),emoji:"🇵🇼",smsPrice:.1},{phoneCode:"+970",code:"PS",name:t("palestine_stat_33253"),nationality:t("palestinian_06829"),emoji:"🇵🇸",smsPrice:.35},{phoneCode:"+507",code:"PA",name:t("panama_16821"),nationality:t("panamanian_07882"),emoji:"🇵🇦",language:"es-PA",smsPrice:.17},{phoneCode:"+675",code:"PG",name:t("papua_new_guine_56959"),nationality:t("papua_new_guine_50302"),emoji:"🇵🇬",smsPrice:.2},{phoneCode:"+595",code:"PY",name:t("paraguay_66859"),nationality:t("paraguayan_50310"),emoji:"🇵🇾",language:"es-PY",smsPrice:.124},{phoneCode:"+51",code:"PE",name:t("peru_23048"),nationality:t("peruvian_85045"),emoji:"🇵🇪",language:["es-PE","qu-PE"],smsPrice:.31},{phoneCode:"+63",code:"PH",name:t("philippines_65361"),nationality:t("philippine_fil_40400"),emoji:"🇵🇭",language:["en-PH","tl","tl-PH"],smsPrice:.243},{phoneCode:"+64",code:"PN",name:t("pitcairn_59104"),nationality:t("pitcairn_island_58961"),emoji:"🇵🇳"},{phoneCode:"+48",code:"PL",name:t("poland_13527"),nationality:t("polish_26779"),emoji:"🇵🇱",language:["pl","pl-PL"],smsPrice:.036},{phoneCode:"+351",code:"PT",name:t("portugal_19698"),nationality:t("portuguese_08463"),emoji:"🇵🇹",language:["pt","pt-PT"],smsPrice:.025},{phoneCode:["+1787","+1939"],code:"PR",name:t("puerto_rico_88176"),nationality:t("puerto_rican_10401"),emoji:"🇵🇷",language:"es-PR"},{phoneCode:"+974",code:"QA",name:t("qatar_70548"),nationality:t("qatari_58016"),emoji:"🇶🇦",language:"ar-QA",smsPrice:.3},{phoneCode:"+262",code:"RE",name:t("r_union_34094"),nationality:t("r_unionese_r_u_86871"),emoji:"🇷🇪",smsPrice:.055},{phoneCode:"+40",code:"RO",name:t("romania_41618"),nationality:t("romanian_49647"),emoji:"🇷🇴",language:["ro","ro-RO"],smsPrice:.09},{phoneCode:"+7",code:"RU",name:t("russian_federat_68392"),nationality:t("russian_12506"),emoji:"🇷🇺",language:["ru","ru-RU","tt","tt-RU"],smsPrice:2.63},{phoneCode:"+250",code:"RW",name:t("rwanda_84901"),nationality:t("rwandan_47719"),emoji:"🇷🇼",smsPrice:.1},{phoneCode:"+590",code:"BL",name:t("saint_barth_lem_80830"),nationality:t("barth_lemois_35003"),emoji:"🇧🇱",smsPrice:.09},{phoneCode:"+290",code:"SH",name:t("saint_helena_a_39384"),nationality:t("saint_helenian_19012"),emoji:"🇸🇭",smsPrice:.1},{phoneCode:"+1869",code:"KN",name:t("saint_kitts_and_74455"),nationality:t("kittitian_or_ne_99867"),emoji:"🇰🇳"},{phoneCode:"+1758",code:"LC",name:t("saint_lucia_60679"),nationality:t("saint_lucian_97267"),emoji:"🇱🇨"},{phoneCode:"+590",code:"MF",name:t("saint_martin_f_87295"),nationality:t("saint_martinois_75974"),emoji:"🇸🇽"},{phoneCode:"+508",code:"PM",name:t("saint_pierre_an_55649"),nationality:t("saint_pierrais_60177"),emoji:"🇵🇲",smsPrice:.13},{phoneCode:"+1784",code:"VC",name:t("saint_vincent_a_23833"),nationality:t("saint_vincentia_81882"),emoji:"🇻🇨"},{phoneCode:"+685",code:"WS",name:t("samoa_25648"),nationality:t("samoan_97653"),emoji:"🇼🇸",smsPrice:.21},{phoneCode:"+378",code:"SM",name:t("san_marino_47437"),nationality:t("sammarinese_71553"),emoji:"🇸🇲",smsPrice:.045},{phoneCode:"+239",code:"ST",name:t("sao_tome_and_pr_10491"),nationality:t("s_o_tom_an_21489"),emoji:"🇸🇹",smsPrice:.045},{phoneCode:"+966",code:"SA",name:t("saudi_arabia_06433"),nationality:t("saudi_saudi_ar_22967"),emoji:"🇸🇦",language:"ar-SA",smsPrice:.215},{phoneCode:"+221",code:"SN",name:t("senegal_38099"),nationality:t("senegalese_64680"),emoji:"🇸🇳",smsPrice:.034},{phoneCode:"+381",code:"RS",name:t("serbia_45061"),nationality:t("serbian_68735"),emoji:"🇷🇸",smsPrice:.46},{phoneCode:"+248",code:"SC",name:t("seychelles_67712"),nationality:t("seychellois_69858"),emoji:"🇸🇨",smsPrice:.3},{phoneCode:"+232",code:"SL",name:t("sierra_leone_02995"),nationality:t("sierra_leonean_86179"),emoji:"🇸🇱",smsPrice:.4},{phoneCode:"+65",code:"SG",name:t("singapore_37928"),nationality:t("singaporean_41916"),emoji:"🇸🇬",language:"zh-SG",smsPrice:.064},{phoneCode:"+1721",code:"SX",name:t("sint_maarten_d_57391"),nationality:t("sint_maarten_82241"),emoji:"🇸🇽"},{phoneCode:"+421",code:"SK",name:t("slovakia_10924"),nationality:t("slovak_69840"),emoji:"🇸🇰",language:["sk","sk-SK"],smsPrice:.068},{phoneCode:"+386",code:"SI",name:t("slovenia_75447"),nationality:t("slovenian_slov_38562"),emoji:"🇸🇮",language:["sl","sl-SI"],smsPrice:.18},{phoneCode:"+677",code:"SB",name:t("solomon_islands_05259"),nationality:t("solomon_island_59052"),emoji:"🇸🇧",smsPrice:.155},{phoneCode:"+252",code:"SO",name:t("somalia_56358"),nationality:t("somali_somalia_97997"),emoji:"🇸🇴",smsPrice:.35},{phoneCode:"+27",code:"ZA",name:t("south_africa_61184"),nationality:t("south_african_82152"),emoji:"🇿🇦",language:["af-ZA","en-ZA","ns","ns-ZA","tn","tn-ZA","xh","xh-ZA","zu","zu-ZA"],smsPrice:.13},{phoneCode:"+500",code:"GS",name:t("south_georgia_a_39555"),nationality:t("south_georgia_o_65055"),emoji:"🇬🇸",smsPrice:.12},{phoneCode:"+211",code:"SS",name:t("south_sudan_88232"),nationality:t("south_sudanese_69140"),emoji:"🇸🇸"},{phoneCode:"+34",code:"ES",name:t("spain_40048"),nationality:t("spanish_74199"),emoji:"🇪🇸",language:["ca","ca-ES","es","es-ES","eu-ES","gl-ES"],smsPrice:.044},{phoneCode:"+94",code:"LK",name:t("sri_lanka_51563"),nationality:t("sri_lankan_09436"),emoji:"🇱🇰",smsPrice:.4},{phoneCode:"+249",code:"SD",name:t("sudan_18427"),nationality:t("sudanese_42330"),emoji:"🇸🇩",smsPrice:.322},{phoneCode:"+597",code:"SR",name:t("suriname_78561"),nationality:t("surinamese_38193"),emoji:"🇸🇷",smsPrice:.3},{phoneCode:"+4779",code:"SJ",name:t("svalbard_and_ja_38511"),nationality:t("svalbard_26353"),emoji:"🇸🇯"},{phoneCode:"+268",code:"SZ",name:t("swaziland_91614"),nationality:t("swazi_88825"),emoji:"🇸🇿",smsPrice:.3},{phoneCode:"+46",code:"SE",name:t("sweden_85663"),nationality:t("swedish_90836"),emoji:"🇸🇪",language:["se-SE","sv","sv-SE"],smsPrice:.098},{phoneCode:"+41",code:"CH",name:t("switzerland_07889"),nationality:t("swiss_23240"),emoji:"🇨🇭",language:["de-CH","fr-CH","it-CH"],smsPrice:.098},{phoneCode:"+963",code:"SY",name:t("syrian_arab_rep_72539"),nationality:t("syrian_06992"),emoji:"🇸🇾",language:["ar-SY","syr","syr-SY"],smsPrice:.37},{phoneCode:"+886",code:"TW",name:t("taiwan_provinc_87264"),nationality:t("chinese_taiwan_24003"),emoji:"🇹🇼",language:"zh-TW",smsPrice:.105},{phoneCode:"+992",code:"TJ",name:t("tajikistan_97104"),nationality:t("tajikistani_21375"),emoji:"🇹🇯",smsPrice:.38},{phoneCode:"+255",code:"TZ",name:t("tanzania_unite_52757"),nationality:t("tanzanian_71935"),emoji:"🇹🇿",smsPrice:.38},{phoneCode:"+66",code:"TH",name:t("thailand_97396"),nationality:t("thai_51972"),emoji:"🇹🇭",language:["th","th-TH"],smsPrice:.066},{phoneCode:"+670",code:"TL",name:t("timor_leste_95604"),nationality:t("timorese_87542"),emoji:"🇹🇱",smsPrice:.22},{phoneCode:"+228",code:"TG",name:t("togo_60267"),nationality:t("togolese_55079"),emoji:"🇹🇬",smsPrice:.03},{phoneCode:"+690",code:"TK",name:t("tokelau_79536"),nationality:t("tokelauan_89444"),emoji:"🇹🇰",smsPrice:.045},{phoneCode:"+676",code:"TO",name:t("tonga_96982"),nationality:t("tongan_52630"),emoji:"🇹🇴",smsPrice:.2},{phoneCode:"+1868",code:"TT",name:t("trinidad_and_to_31939"),nationality:t("trinidadian_or_65515"),emoji:"🇹🇹",language:"en-TT"},{phoneCode:"+216",code:"TN",name:t("tunisia_36732"),nationality:t("tunisian_19451"),emoji:"🇹🇳",language:"ar-TN",smsPrice:.35},{phoneCode:"+90",code:"TR",name:t("turkey_65699"),nationality:t("turkish_85889"),emoji:"🇹🇷",language:["tr","tr-TR"],smsPrice:.033},{phoneCode:"+993",code:"TM",name:t("turkmenistan_86069"),nationality:t("turkmen_63945"),emoji:"🇹🇲"},{phoneCode:"+1649",code:"TC",name:t("turks_and_caico_34033"),nationality:t("turks_and_caico_41685"),emoji:"🇹🇨"},{phoneCode:"+688",code:"TV",name:t("tuvalu_52410"),nationality:t("tuvaluan_49403"),emoji:"🇹🇻",smsPrice:.12},{phoneCode:"+256",code:"UG",name:t("uganda_42928"),nationality:t("ugandan_07085"),emoji:"🇺🇬",smsPrice:.3},{phoneCode:"+380",code:"UA",name:t("ukraine_86632"),nationality:t("ukrainian_77624"),emoji:"🇺🇦",language:["uk","uk-UA"],smsPrice:.26},{phoneCode:"+971",code:"AE",name:t("united_arab_emi_58689"),nationality:t("emirati_emiria_12413"),emoji:"🇦🇪",language:"ar-AE",smsPrice:.12},{phoneCode:"+44",code:"GB",name:t("united_kingdom_16783"),nationality:t("british_43680"),emoji:"🇬🇧",language:["cy","cy-GB","en","en-GB"],smsPrice:.078},{phoneCode:"+1",code:"US",name:t("united_states_o_43878"),nationality:t("american_36800"),emoji:"🇺🇸",language:"en-US",smsPrice:.03},{phoneCode:"+598",code:"UY",name:t("uruguay_21979"),nationality:t("uruguayan_28212"),emoji:"🇺🇾",language:"es-UY",smsPrice:.1},{phoneCode:"+998",code:"UZ",name:t("uzbekistan_27729"),nationality:t("uzbekistani_uz_10593"),emoji:"🇺🇿",language:["uz","uz-UZ"],smsPrice:.39},{phoneCode:"+678",code:"VU",name:t("vanuatu_82756"),nationality:t("ni_vanuatu_van_02924"),emoji:"🇻🇺",smsPrice:.21},{phoneCode:"+58",code:"VE",name:t("venezuela_boli_00470"),nationality:t("venezuelan_52634"),emoji:"🇻🇪",language:"es-VE",smsPrice:.31},{phoneCode:"+84",code:"VN",name:t("vietnam_82968"),nationality:t("vietnamese_55360"),emoji:"🇻🇳",language:["vi","vi-VN"],smsPrice:.27},{phoneCode:"+1284",code:"VG",name:t("virgin_islands_14222"),nationality:t("british_virgin_42963"),emoji:"🇻🇬"},{phoneCode:"+1340",code:"VI",name:t("virgin_islands_12516"),nationality:t("american_virgi_98088"),emoji:"🇻🇮"},{phoneCode:"+681",code:"WF",name:t("wallis_and_futu_93206"),nationality:t("wallisian_or_fu_60327"),emoji:"🇼🇫",smsPrice:.09},{phoneCode:"+212",code:"EH",name:t("western_sahara_02173"),nationality:t("sahrawi_sahraw_96671"),emoji:"🇪🇭",smsPrice:.053},{phoneCode:"+967",code:"YE",name:t("yemen_76340"),nationality:t("yemeni_26632"),emoji:"🇾🇪",language:"ar-YE",smsPrice:.23},{phoneCode:"+260",code:"ZM",name:t("zambia_50513"),nationality:t("zambian_85114"),emoji:"🇿🇲",smsPrice:.324},{phoneCode:"+263",code:"ZW",name:t("zimbabwe_70209"),nationality:t("zimbabwean_42291"),emoji:"🇿🇼",language:"en-ZW",smsPrice:.35}],({name:e})=>m(e)),this.countriesCodes=this.countries.map(({code:e})=>e),this.phoneCodes=this.countries.flatMap(({phoneCode:e})=>L(e))}countryCodeExists(e){return!!e&&void 0!==this.countries.find(t=>t.code===e)}getCountriesIdName(e){const t=this.getDefaultCountryValues(e).user.country;return(0,mo.A)(this.countries.map(({code:e,name:t})=>({id:e,name:t})),({id:e,name:n})=>[e===t?1:2,m(n)])}getNationalitiesIdName(e){const t=this.getDefaultCountryValues(e).user.nationality;return(0,mo.A)(this.countries.map(({code:e,nationality:t})=>({id:e,name:t})),({id:e,name:n})=>[e===t?1:2,m(n)])}getNationality(e){return this.countries.find(t=>t.code===e)?.nationality}getName(e){return this.countries.find(t=>t.code===e)?.name}getDefaultCountryValues(e){let t=this.countries.find(({code:t})=>t===e);if(!t){try{t=this.countries.find(e=>L(e.language||[]).map(e=>e.toLowerCase()).includes(navigator.language.toLowerCase()))}catch{}t||(t=this.countries.find(({code:e})=>"FR"===e))}const n=L(t.language||[]);return{user:{language:n.some(e=>e.toLowerCase().startsWith("fr"))?Ot.Fr:n.some(e=>e.toLowerCase().startsWith("es"))?Ot.Es:n.some(e=>e.toLowerCase().startsWith("de"))?Ot.De:n.some(e=>e.toLowerCase().startsWith("nl"))?Ot.Nl:Ot.En,country:t.code,nationality:t.code},phone:{country:t.code,code:L(t.phoneCode)[0]}}}getSmsPriceByPhone(e){return this.countries.find(t=>L(t.phoneCode).some(t=>e.startsWith(t)))?.smsPrice}};Xr=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Xr);var Jr=n(7480);const el=[Ot.De,Ot.En,Ot.Es,Ot.Fr,Ot.Nl];function tl(e){return e===Ot.En?"en-gb":e.toString().toLowerCase()}function nl(e){if(h(e)){const t=(0,Jr.A)(e.trim().substring(0,2));return el.includes(t)?t:null}return null}Ot.En.toLowerCase(),Ot.Fr.toLowerCase(),Ot.De.toLowerCase(),Ot.Es.toLowerCase(),Ot.Nl.toLowerCase();const il=["Africa/Abidjan","Africa/Accra","Africa/Addis_Ababa","Africa/Algiers","Africa/Asmara","Africa/Asmera","Africa/Bamako","Africa/Bangui","Africa/Banjul","Africa/Bissau","Africa/Blantyre","Africa/Brazzaville","Africa/Bujumbura","Africa/Cairo","Africa/Casablanca","Africa/Ceuta","Africa/Conakry","Africa/Dakar","Africa/Dar_es_Salaam","Africa/Djibouti","Africa/Douala","Africa/El_Aaiun","Africa/Freetown","Africa/Gaborone","Africa/Harare","Africa/Johannesburg","Africa/Juba","Africa/Kampala","Africa/Khartoum","Africa/Kigali","Africa/Kinshasa","Africa/Lagos","Africa/Libreville","Africa/Lome","Africa/Luanda","Africa/Lubumbashi","Africa/Lusaka","Africa/Malabo","Africa/Maputo","Africa/Maseru","Africa/Mbabane","Africa/Mogadishu","Africa/Monrovia","Africa/Nairobi","Africa/Ndjamena","Africa/Niamey","Africa/Nouakchott","Africa/Ouagadougou","Africa/Porto-Novo","Africa/Sao_Tome","Africa/Timbuktu","Africa/Tripoli","Africa/Tunis","Africa/Windhoek","America/Adak","America/Anchorage","America/Anguilla","America/Antigua","America/Araguaina","America/Argentina/Buenos_Aires","America/Argentina/Catamarca","America/Argentina/Cordoba","America/Argentina/Jujuy","America/Argentina/La_Rioja","America/Argentina/Mendoza","America/Argentina/Rio_Gallegos","America/Argentina/Salta","America/Argentina/San_Juan","America/Argentina/San_Luis","America/Argentina/Tucuman","America/Argentina/Ushuaia","America/Aruba","America/Asuncion","America/Atikokan","America/Atka","America/Bahia","America/Bahia_Banderas","America/Barbados","America/Belem","America/Belize","America/Blanc-Sablon","America/Boa_Vista","America/Bogota","America/Boise","America/Buenos_Aires","America/Cambridge_Bay","America/Campo_Grande","America/Cancun","America/Caracas","America/Catamarca","America/Cayenne","America/Cayman","America/Chicago","America/Chihuahua","America/Coral_Harbour","America/Cordoba","America/Costa_Rica","America/Creston","America/Cuiaba","America/Curacao","America/Danmarkshavn","America/Dawson","America/Dawson_Creek","America/Denver","America/Detroit","America/Dominica","America/Edmonton","America/Eirunepe","America/El_Salvador","America/Ensenada","America/Fort_Nelson","America/Fort_Wayne","America/Fortaleza","America/Glace_Bay","America/Godthab","America/Goose_Bay","America/Grand_Turk","America/Grenada","America/Guadeloupe","America/Guatemala","America/Guayaquil","America/Guyana","America/Halifax","America/Havana","America/Hermosillo","America/Indiana/Indianapolis","America/Indiana/Knox","America/Indiana/Marengo","America/Indiana/Petersburg","America/Indiana/Tell_City","America/Indiana/Vevay","America/Indiana/Vincennes","America/Indiana/Winamac","America/Indianapolis","America/Inuvik","America/Iqaluit","America/Jamaica","America/Jujuy","America/Juneau","America/Kentucky/Louisville","America/Kentucky/Monticello","America/Kralendijk","America/La_Paz","America/Lima","America/Los_Angeles","America/Louisville","America/Lower_Princes","America/Maceio","America/Managua","America/Manaus","America/Marigot","America/Martinique","America/Matamoros","America/Mazatlan","America/Mendoza","America/Menominee","America/Merida","America/Metlakatla","America/Mexico_City","America/Miquelon","America/Moncton","America/Monterrey","America/Montevideo","America/Montreal","America/Montserrat","America/Nassau","America/New_York","America/Nipigon","America/Nome","America/Noronha","America/North_Dakota/Beulah","America/North_Dakota/Center","America/North_Dakota/New_Salem","America/Ojinaga","America/Panama","America/Pangnirtung","America/Paramaribo","America/Phoenix","America/Port-au-Prince","America/Port_of_Spain","America/Porto_Acre","America/Porto_Velho","America/Puerto_Rico","America/Punta_Arenas","America/Rainy_River","America/Rankin_Inlet","America/Recife","America/Regina","America/Resolute","America/Rio_Branco","America/Rosario","America/Santa_Isabel","America/Santarem","America/Santiago","America/Santo_Domingo","America/Sao_Paulo","America/Scoresbysund","America/Shiprock","America/Sitka","America/St_Barthelemy","America/St_Johns","America/St_Kitts","America/St_Lucia","America/St_Thomas","America/St_Vincent","America/Swift_Current","America/Tegucigalpa","America/Thule","America/Thunder_Bay","America/Tijuana","America/Toronto","America/Tortola","America/Vancouver","America/Virgin","America/Whitehorse","America/Winnipeg","America/Yakutat","America/Yellowknife","Antarctica/Casey","Antarctica/Davis","Antarctica/DumontDUrville","Antarctica/Macquarie","Antarctica/Mawson","Antarctica/Palmer","Antarctica/Rothera","Antarctica/South_Pole","Antarctica/Syowa","Antarctica/Troll","Antarctica/Vostok","Arctic/Longyearbyen","Asia/Aden","Asia/Almaty","Asia/Amman","Asia/Anadyr","Asia/Aqtau","Asia/Aqtobe","Asia/Ashgabat","Asia/Ashkhabad","Asia/Atyrau","Asia/Baghdad","Asia/Bahrain","Asia/Baku","Asia/Bangkok","Asia/Barnaul","Asia/Beirut","Asia/Bishkek","Asia/Brunei","Asia/Calcutta","Asia/Chita","Asia/Choibalsan","Asia/Chongqing","Asia/Chungking","Asia/Colombo","Asia/Dacca","Asia/Damascus","Asia/Dhaka","Asia/Dili","Asia/Dubai","Asia/Dushanbe","Asia/Famagusta","Asia/Gaza","Asia/Harbin","Asia/Hebron","Asia/Ho_Chi_Minh","Asia/Hong_Kong","Asia/Hovd","Asia/Irkutsk","Asia/Istanbul","Asia/Jakarta","Asia/Jayapura","Asia/Jerusalem","Asia/Kabul","Asia/Kamchatka","Asia/Karachi","Asia/Kashgar","Asia/Kathmandu","Asia/Katmandu","Asia/Khandyga","Asia/Kolkata","Asia/Krasnoyarsk","Asia/Kuala_Lumpur","Asia/Kuching","Asia/Kuwait","Asia/Macao","Asia/Macau","Asia/Magadan","Asia/Makassar","Asia/Manila","Asia/Muscat","Asia/Nicosia","Asia/Novokuznetsk","Asia/Novosibirsk","Asia/Omsk","Asia/Oral","Asia/Phnom_Penh","Asia/Pontianak","Asia/Pyongyang","Asia/Qatar","Asia/Qostanay","Asia/Qyzylorda","Asia/Rangoon","Asia/Riyadh","Asia/Saigon","Asia/Sakhalin","Asia/Samarkand","Asia/Seoul","Asia/Shanghai","Asia/Singapore","Asia/Srednekolymsk","Asia/Taipei","Asia/Tashkent","Asia/Tbilisi","Asia/Tehran","Asia/Tel_Aviv","Asia/Thimbu","Asia/Thimphu","Asia/Tokyo","Asia/Tomsk","Asia/Ujung_Pandang","Asia/Ulaanbaatar","Asia/Ulan_Bator","Asia/Urumqi","Asia/Ust-Nera","Asia/Vientiane","Asia/Vladivostok","Asia/Yakutsk","Asia/Yangon","Asia/Yekaterinburg","Asia/Yerevan","Atlantic/Azores","Atlantic/Bermuda","Atlantic/Canary","Atlantic/Cape_Verde","Atlantic/Faeroe","Atlantic/Faroe","Atlantic/Jan_Mayen","Atlantic/Madeira","Atlantic/Reykjavik","Atlantic/South_Georgia","Atlantic/St_Helena","Atlantic/Stanley","Australia/Adelaide","Australia/Brisbane","Australia/Broken_Hill","Australia/Canberra","Australia/Currie","Australia/Darwin","Australia/Eucla","Australia/Hobart","Australia/Lindeman","Australia/Lord_Howe","Australia/Melbourne","Australia/North","Australia/Perth","Australia/Queensland","Australia/South","Australia/Sydney","Australia/Tasmania","Australia/Victoria","Australia/West","Australia/Yancowinna","Brazil/Acre","Brazil/East","Brazil/West","Canada/Atlantic","Canada/Central","Canada/Eastern","Canada/Mountain","Canada/Newfoundland","Canada/Pacific","Canada/Saskatchewan","Canada/Yukon","Chile/Continental","Europe/Amsterdam","Europe/Andorra","Europe/Astrakhan","Europe/Athens","Europe/Belfast","Europe/Belgrade","Europe/Berlin","Europe/Bratislava","Europe/Brussels","Europe/Bucharest","Europe/Budapest","Europe/Busingen","Europe/Chisinau","Europe/Copenhagen","Europe/Dublin","Europe/Gibraltar","Europe/Guernsey","Europe/Helsinki","Europe/Isle_of_Man","Europe/Istanbul","Europe/Jersey","Europe/Kaliningrad","Europe/Kiev","Europe/Kirov","Europe/Lisbon","Europe/Ljubljana","Europe/London","Europe/Luxembourg","Europe/Madrid","Europe/Malta","Europe/Mariehamn","Europe/Minsk","Europe/Monaco","Europe/Moscow","Europe/Nicosia","Europe/Oslo","Europe/Paris","Europe/Podgorica","Europe/Prague","Europe/Riga","Europe/Rome","Europe/Samara","Europe/San_Marino","Europe/Sarajevo","Europe/Saratov","Europe/Simferopol","Europe/Skopje","Europe/Sofia","Europe/Stockholm","Europe/Tallinn","Europe/Tirane","Europe/Tiraspol","Europe/Ulyanovsk","Europe/Uzhgorod","Europe/Vaduz","Europe/Vatican","Europe/Vienna","Europe/Vilnius","Europe/Volgograd","Europe/Warsaw","Europe/Zagreb","Europe/Zaporozhye","Europe/Zurich","Indian/Antananarivo","Indian/Chagos","Indian/Christmas","Indian/Cocos","Indian/Comoro","Indian/Kerguelen","Indian/Mahe","Indian/Maldives","Indian/Mauritius","Indian/Mayotte","Indian/Reunion","Mexico/General","Pacific/Apia","Pacific/Auckland","Pacific/Bougainville","Pacific/Chatham","Pacific/Chuuk","Pacific/Easter","Pacific/Efate","Pacific/Enderbury","Pacific/Fakaofo","Pacific/Fiji","Pacific/Funafuti","Pacific/Galapagos","Pacific/Gambier","Pacific/Guadalcanal","Pacific/Guam","Pacific/Honolulu","Pacific/Johnston","Pacific/Kiritimati","Pacific/Kosrae","Pacific/Kwajalein","Pacific/Majuro","Pacific/Marquesas","Pacific/Midway","Pacific/Nauru","Pacific/Niue","Pacific/Norfolk","Pacific/Noumea","Pacific/Pago_Pago","Pacific/Palau","Pacific/Pitcairn","Pacific/Pohnpei","Pacific/Ponape","Pacific/Port_Moresby","Pacific/Rarotonga","Pacific/Saipan","Pacific/Samoa","Pacific/Tahiti","Pacific/Tarawa","Pacific/Tongatapu","Pacific/Truk","Pacific/Wake","Pacific/Wallis","Pacific/Yap"];const al=["country","code","number"];let sl=class extends jo{countriesService;constructor(e,t){super(e),this.countriesService=t}basePhoneInputDefault(){return{country:"",code:"",number:""}}phoneInputDefault(e){return{...this.basePhoneInputDefault(),...e.phone}}phoneInputSchema(){return ho.Ik().shape({country:ho.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.countriesCodes,this.t("le_num_ro_de_t_76885")),code:ho.Yj().required(this.t("le_num_ro_de_t_76885")).oneOf(this.countriesService.phoneCodes,this.t("le_num_ro_de_t_76885")),number:ho.Yj().required(this.t("le_num_ro_de_t_76885"))})}phoneInputSchemaNotRequired(){return ho.Ik().nullable().shape({country:ho.Yj(),code:ho.Yj(),number:ho.Yj()})}};sl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,Xr])],sl);let ol=class extends jo{countriesService;phoneInputService;constructor(e,t,n){super(n),this.countriesService=e,this.phoneInputService=t}organizationInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:"",adminFirstName:"",adminLastName:"",adminPhone:this.phoneInputService.phoneInputDefault(t),weezeventOrganizationId:e}}organizationInputSchema(e){let t=ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_de_l_org_60618")),adminFirstName:ho.Yj().required(this.t("le_pr_nom_est_r_10935")),adminLastName:ho.Yj().required(this.t("le_nom_est_requ_61536")),adminPhone:this.phoneInputService.phoneInputSchema()});return e||(t=t.shape({termsAccepted:ho.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})),t}createOrganizationSchema(e){return ho.Ik().shape({organization:this.organizationInputSchema(e)})}organizationInfosInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:e.name??"",adminName:e.adminName??"",adminEmail:e.adminEmail??"",street:e.street??"",postalCode:e.postalCode??"",city:e.city??"",country:e.country??t.user.country,timeZone:e.timeZone??wa.c9.local().zoneName,emailSenderId:e.emailSenderId,dateFormat:e.dateFormat,datetimeFormat:e.datetimeFormat,timeFormat:e.timeFormat}}organizationInfosInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_de_l_org_60618")),adminName:ho.Yj().required(this.t("le_nom_du_respo_43823")),adminEmail:ho.Yj().required(this.t("l_e_mail_du_rep_90871")).email(this.t("l_e_mail_du_rep_90871")).test("clean-admin-email",this.t("l_e_mail_du_rep_90871"),function(){return qo(this.parent.adminEmail)}),street:ho.Yj().required(this.t("l_adresse_est_r_40489")),postalCode:ho.Yj().required(this.t("le_code_postal_43189")),city:ho.Yj().required(this.t("la_ville_est_re_35239")),country:ho.Yj().oneOf(this.countriesService.countriesCodes).required(this.t("le_pays_est_req_33749")),emailSenderId:ho.ai().nullable(),dateFormat:ho.Yj().required(this.t("le_format_est_r_17097")),datetimeFormat:ho.Yj().required(this.t("le_format_est_r_17097")),timeFormat:ho.Yj().required(this.t("le_format_est_r_17097"))})}updateOrganizationGeneralSchema(){return ho.Ik().shape({organization:this.organizationInfosInputSchema()})}};ol=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,sl,Si])],ol);let rl=class extends So{countriesService;organizationInputService;translationService;constructor(e,t,n){super(n),this.countriesService=e,this.organizationInputService=t,this.translationService=n}eventInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{name:e?.name??"",description:e?.description??"",startAt:e?.startAt??wa.c9.invalid("Invalid"),endAt:e?.endAt??wa.c9.invalid("Invalid"),languages:e?.languages??[t.user.language],timeZone:e?.timeZone??wa.c9.local().zoneName??"utc",country:e?.country??t.user.country,layer:e?.layer??Xe.Google,latitude:e?.latitude??43.6087733,longitude:e?.longitude??3.87963579999996,emailSenderId:e?.emailSenderId,dayStartTime:e?.dayStartTime??"00:00",tagsIds:e?.tagsIds??[],fields:e?.fields??{},isWeezeventSynchronized:e?.isWeezeventSynchronized??!0,useAccreditations:e?.useAccreditations??!0,useCampaigns:e?.useCampaigns??!0,useDelegations:e?.useDelegations??!0,useDocuments:e?.useDocuments??!0,useForms:e?.useForms??!0,usePositions:e?.usePositions??!0,useWorkflows:e?.useWorkflows??!0,delegationsSpaceLayoutId:e?.delegationsSpaceLayoutId??null,groupsAccesses:(e?.groupsAccesses??[]).map(({groupId:e,roleId:t})=>({groupId:e,roleId:t}))}}eventGroupAccessDefault(){return{groupId:null,roleId:null}}eventInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("nom_de_l_v_nem_58512")),description:ho.Yj(),startAt:bo.required(this.t("la_date_d_but_d_30022")).typeError(this.t("la_date_d_but_d_30022")),endAt:bo.required(this.t("la_date_de_fin_45068")).typeError(this.t("la_date_de_fin_45068")).test("after-start-at",this.t("la_date_de_fin_00429"),function(){return wa.c9.isDateTime(this.parent.startAt)&&this.parent.startAt.isValid&&wa.c9.isDateTime(this.parent.endAt)&&this.parent.endAt.isValid&&this.parent.endAt>=this.parent.startAt}),languages:ho.YO().of(ho.Yj().oneOf(el,this.t("les_langues_doi_27712"))).required(this.t("les_langues_son_53717")).min(1,this.t("vous_devez_s_le_16610")),timeZone:ho.Yj().required(this.t("le_fuseau_horai_37109")).oneOf(il,this.t("le_fuseau_horai_37109")),latitude:ho.ai().nullable().typeError(this.t("la_latitude_doi_17800")).min(-90,this.t("la_latitude_doi_17800")).max(90,this.t("la_latitude_doi_17800")),longitude:ho.ai().nullable().typeError(this.t("la_longitude_do_28762")).min(-180,this.t("la_longitude_do_28762")).max(180,this.t("la_longitude_do_28762")),emailSenderId:ho.ai().nullable(),dayStartTime:ho.Yj().required(this.t("l_heure_laque_87748")),isWeezeventSynchronized:ho.zM().required(),usePositions:ho.zM().required(),useAccreditations:ho.zM().required(),useDelegations:ho.zM().required(),useForms:ho.zM().required(),useDocuments:ho.zM().required(),useWorkflows:ho.zM().required(),groupsAccesses:ho.YO().of(ho.Ik().shape({groupId:ho.ai().nullable().required(this.t("vous_devez_s_le_78671")),roleId:ho.ai().nullable().required(this.t("vous_devez_s_le_18837"))}))})}eventOrganizationInputSchema(e){return ho.Ik().shape({event:this.eventInputSchema(),organization:this.organizationInputService.organizationInputSchema(e)})}createUpdateEventSchema(e){const t=this.eventInputSchema();return ho.Ik().shape({event:e?t.shape({fields:e}):t})}};rl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,ol,Si])],rl);var ll;let dl=class extends No{static{ll=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...No.IMPORT_COLUMNS_DEFAULT,Name:"name",StartAt:"startAt",EndAt:"endAt",Country:"country",DayStartTime:"dayStartTime",Description:"description",Languages:"languages",Latitude:"latitude",Layer:"layer",Longitude:"longitude",Tags:"tags",TimeZone:"timeZone",IsWeezeventSynchronized:"isWeezeventSynchronized",UseAccreditations:"useAccreditations",UseCampaigns:"useCampaigns",UseDelegations:"useDelegations",UseDocuments:"useDocuments",UseForms:"useForms",UsePositions:"usePositions",UseWorkflows:"useWorkflows"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[ll.IMPORT_COLUMNS_DEFAULT.Id]:[],ll.IMPORT_COLUMNS_DEFAULT.Name,ll.IMPORT_COLUMNS_DEFAULT.StartAt,ll.IMPORT_COLUMNS_DEFAULT.EndAt];constructor(e,t){super(e,t),this.csvInputService=e}};dl=ll=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],dl);let cl=class extends jo{constructor(e){super(e)}settingsDesignInputSchema(){return ho.Ik().shape({title:ho.Yj().required(),intro:ho.Yj()})}settingsInputSchema(){return ho.Ik().shape({events:ho.YO().of(ho.Ik().shape({buttonText:ho.Yj().required(),descriptionText:ho.Yj().max(70,this.t("the_maximum_len_30779",70)),eventId:ho.ai().required(),formId:ho.ai().nullable()}))})}};cl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],cl);var ul=n(6996),ml=n(7231);let gl=class{translationService;constructor(e){this.translationService=e}now(){return wa.c9.utc()}invalid(){return wa.c9.invalid("Invalid")}toLocaleString(e,t){return e.toLocaleString(t,{locale:tl(this.translationService.language)})}};gl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],gl);const hl=wa.c9.fromObject({year:1920,month:1,day:1}),pl=wa.c9.now();function fl(e){if(wa.c9.isDateTime(e)&&e?.isValid)return e;if(h(e)){const t=wa.c9.fromISO(e);return t.isValid?t:null}return null}var Il=n(2662);const _l=/^[0-9]{11}$/i,xl=wa.c9.now().year-2e3;function yl(e){if(h(e)&&_l.test(e)){const t=(0,Il.A)(e.substring(0,2),10);let n=(0,Il.A)(e.substring(0,9),10);const i=(0,Il.A)(e.substring(9),10);return t<=xl&&(n=2e9+n),i===97-n%97}return!1}let Sl=class{countriesService;dateTimeService;translationService;constructor(e,t,n){this.countriesService=e,this.dateTimeService=t,this.translationService=n}getValueString(e,t,n={}){switch(e.fieldType){case ze.Text:return this.getTextValue(e,t);case ze.Textarea:case ze.Time:case ze.Address:return t[e.slug]||"";case ze.Sex:return this.getSexValue(e,t);case ze.Language:return this.getLanguageValue(e,t);case ze.Nationality:return this.getNationalityValue(e,t);case ze.Country:return this.getCountryValue(e,t);case ze.Select:return this.getSelectValue(e,t);case ze.Checkbox:case ze.Validation:return this.getBooleanValue(e,t);case ze.Date:return this.getDateValue(e,t,n.dateFormat);case ze.Datetime:return this.getDatetimeValue(e,t,n.datetimeFormat);case ze.File:return"name"===n.fileReturnValue?t[e.slug]?.name||"":t[e.slug]?.url||"";case ze.Phone:return this.getPhoneValue(e,t);case ze.Number:return this.getIntValue(e,t);default:return tr(e.fieldType)}}getValue(e,t){return t[e.slug]}getSelectValues(e,t){const n=L(this.getValue(e,t)??[]);return(0,go.A)(n.map(t=>e.values.find(e=>e.id===t)?.value))}getSelectCustomFieldValues(e,t){const n=L(this.getValue(e,t)??[]);return(0,go.A)(n.map(t=>e.values.find(e=>e.id===t)))}getTextValue(e,t){const n=this.getValue(e,t);return h(n)?function(e,t){return"firstName"===e.slug||"lastName"===e.slug?_(t):e.fieldSubtype===Ne.Avs?function(e){const t=e.replace(/\D/g,"");return 13===t.length&&t.startsWith("756")?`756.${t.substring(3,7)}.${t.substring(7,11)}.${t.substring(11)}`:e}(t):e.fieldSubtype===Ne.Iban?function(e){const t=e.toUpperCase().trim().replace(/\s+/g,"");return nr.test(t)&&t.length===ir[t.substring(0,2)]?t.match(/.{1,4}/g).join(" "):e}(t):t}(e,n):n||""}getSexValue(e,t){return this.translationService.translate(this.getValue(e,t)??"")}getLanguageValue(e,t){return this.translationService.translate(this.getValue(e,t)??"")}getNationalityValue(e,t){return this.countriesService.getNationality(this.getValue(e,t)??"")??""}getCountryValue(e,t){return this.countriesService.getName(this.getValue(e,t)??"")??""}getBooleanValue(e,t){const n=this.getValue(e,t);return!0===n?this.translationService.translate("oui_54361"):!1===n?this.translationService.translate("non_33516"):""}getDateValue(e,t,n){let i=this.getValue(e,t);return h(i)&&(i=wa.c9.fromISO(i,{zone:"utc"})),wa.c9.isDateTime(i)&&i.isValid?h(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong):""}getDatetimeValue(e,t,n){let i=this.getValue(e,t);return h(i)&&(i=wa.c9.fromISO(i,{zone:"utc"})),wa.c9.isDateTime(i)&&i.isValid?h(n)?i.toFormat(n):this.dateTimeService.toLocaleString(i,Ya.DateTime):""}getPhoneValue(e,t){return this.getValue(e,t)?.internationalFormat??""}getIntValue(e,t){return this.getValue(e,t)?.toString()??""}getSelectValue(e,t){const n=L(this.getValue(e,t)??[]);return(0,go.A)(n.map(t=>e.values.find(e=>e.id===t)?.value)).join(", ")}};Sl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Sl);const jl=[ze.Country,ze.Language,ze.Nationality,ze.Select];function vl(e,t,n){if(e.hasCondition&&e.conditionCustomField){const i=n.find(t=>t.id===e.conditionCustomField.id);if(i){if(vl(i,t,n)){const n=t[e.conditionCustomField.slug];return"boolean"==typeof n&&e.conditionCustomField.fieldType===ze.Checkbox?n===e.conditionValue:!(!jl.includes(e.conditionCustomField.fieldType)||!F(e.conditionValue))&&(0,ml.A)(L(n),e.conditionValue).length>0}return!1}return!1}return!0}const bl=Ya.DateOnly.Numeric,Al=el.concat(qn);let Cl=class extends jo{countriesService;dateTimeService;documentInputService;phoneInputService;translationService;constructor(e,t,n,i,a){super(a),this.countriesService=e,this.dateTimeService=t,this.documentInputService=n,this.phoneInputService=i,this.translationService=a}fieldsUpdateInputDefault(e,t,n,i){return Object.fromEntries(t.map(t=>{const a=this.getFieldValue(e,t);return[t.slug,a??this.fieldUpdateInputDefault(t,n,i)]}))}getValidationRuleError(e,t,n){switch(lr(e)){case"text":return h(t)?this.textValidationRuleError(e.name,e.validationRules,t):null;case"number":return"number"==typeof t?this.numberValidationRuleError(e.name,e.validationRules,t):null;case"date":{const i=h(t)||wa.c9.isDateTime(t)?Ha(t):null;return i?.isValid?this.dateValidationRuleError(e.name,e.validationRules,i,n):null}default:return null}}changedFieldsSchema(e,t,n){return ho.Ik().shape(Object.fromEntries(e.filter(({slug:e})=>!(0,ul.A)(n[e],t[e])).map(e=>[e.slug,this.fieldSchema(e,!1)])))}fieldSchema(e,t){const n=t=>t.test("validation-rules","",(t,n)=>{const i=this.getValidationRuleError(e,t);return!i||n.createError({message:i})}),i=(i,a)=>{const s=()=>n(i()),o=()=>n(a());if(e.conditionCustomField)return ho.Ik().when(e.conditionCustomField.slug,([n])=>t&&(e.conditionCustomField.fieldType===ze.Checkbox&&n===e.conditionValue||jl.includes(e.conditionCustomField.fieldType)&&F(e.conditionValue)&&(0,ml.A)(L(n),e.conditionValue).length>0)?s():o());{let e;return e=t?s():o(),e}};switch(e.fieldType){case ze.File:return i(()=>this.documentInputService.documentInputSchema(e.name),()=>this.documentInputService.documentInputSchemaNotRequired());case ze.Phone:return i(()=>this.phoneInputService.phoneInputSchema(),()=>this.phoneInputService.phoneInputSchemaNotRequired());case ze.Text:case ze.Textarea:case ze.Time:case ze.Address:return e.fieldProperty===ke.Eid?i(()=>ho.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).test("valid-eid",this.t("le_num_ro_de_re_71488"),e=>!(!h(e)||12!==e.length||!e.startsWith("********"))||yl(e)),()=>ho.Yj()):e.fieldSubtype!==Ne.Freeform?i(()=>ho.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).test("valid-eid",this.t("_1_n_est_pas_a_14932",e.name),t=>{if(h(t)&&12===t.length&&t.startsWith("********"))return!0;switch(e.fieldSubtype){case Ne.Eid:return yl(t);case Ne.Avs:return function(e){if(h(e)){const t=e.replace(/\D/g,"");if(13===t.length&&t.startsWith("756")){const e=t.substring(0,12).split("").reduce((e,t,n)=>n%2==0?e+Number(t):e+3*Number(t),0)%10;return(0===e?0:10-e)===Number(t[12])}return!1}return!1}(t);case Ne.Iban:return function(e){if(h(e)){const t=e.toUpperCase().trim().replace(/\s+/g,"");if(nr.test(t)){const e=t.substring(0,2);if(t.length===ir[e]){const e=`${t.substring(4)}${t.substring(0,4)}`;let n="";for(const t of e)n=/[A-Z]/.test(t)?`${n}${t.charCodeAt(0)-55}`:`${n}${t}`;return BigInt(n)%97n==1n}return!1}return!1}return!1}(t);case Ne.Freeform:return!0;default:return tr(e.fieldSubtype)}}),()=>ho.Yj()):i(()=>ho.Yj().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.Yj());case ze.Number:return i(()=>ho.ai().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.ai().nullable());case ze.Checkbox:return i(()=>ho.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.zM());case ze.Validation:return i(()=>ho.zM().required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)).oneOf([!0],this.t("_1_doit_obliga_82862",e.name)),()=>ho.zM());case ze.Select:return e.canSelectMultiple?i(()=>ho.YO().of(ho.ai().required()).required(this.t("_1_est_requis_99856",e.name)).min(1,this.t("vous_devez_s_le_55757",e.name)),()=>ho.YO().of(ho.ai())):i(()=>ho.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.ai().oneOf(e.values.map(({id:e})=>e),this.oneOfMessage(e.name,e.values.map(({value:e})=>e))));case ze.Date:case ze.Datetime:return e.fieldProperty===ke.DateOfBirth?i(()=>bo.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)).test("valid-date-of-birth",this.t("la_date_de_nais_19129"),e=>!(!wa.c9.isDateTime(e)||!e.isValid)&&e>=hl&&e<=pl),()=>ho.gl().nullable().test("valid-date-of-birth",this.t("la_date_de_nais_19129"),e=>!wa.c9.isDateTime(e)||!e.isValid||e>=hl&&e<=pl)):i(()=>bo.required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("la_date_est_inv_22002",e.name)),()=>ho.gl().nullable());case ze.Sex:return i(()=>ho.Yj().oneOf(li,this.oneOfMessage(e.name,li)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.Yj().oneOf(li,this.oneOfMessage(e.name,li)));case ze.Language:return i(()=>ho.Yj().oneOf(Al,this.oneOfMessage(e.name,Al)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.Yj().oneOf(Al,this.oneOfMessage(e.name,Al)));case ze.Nationality:case ze.Country:return i(()=>ho.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)).required(this.t("_1_est_requis_99856",e.name)).typeError(this.t("_1_est_requis_99856",e.name)),()=>ho.Yj().oneOf(this.countriesService.countriesCodes,this.oneOfMessage(e.name,this.countriesService.countriesCodes)));default:return tr(e.fieldType)}}textValidationRuleError(e,t,n){if("regex"===t.mode)return h(t.regex)&&!new RegExp(t.regex).test(n)?t.regexMessage||this.t("_1_n_a_pas_le_68593",e):null;if(t.noLeadingTrailingSpaces&&n!==n.trim())return this.t("_1_ne_doit_pas_16247",e);if(t.noSpaces&&/\s/.test(n))return this.t("_1_ne_doit_pas_30149",e);if("number"==typeof t.minLength&&n.lengtht.maxLength)return this.t("_1_doit_conten_24426",e,t.maxLength);switch(t.allowedCharacters){case"numbers":return/^[0-9.,]*$/.test(n)?null:this.t("_1_ne_doit_con_32219",e);case"noSymbols":return/^[\p{L}\p{N}\s]*$/u.test(n)?null:this.t("_1_ne_doit_con_83191",e);case"uppercase":return n===n.toLocaleUpperCase()?null:this.t("_1_ne_doit_con_44580",e);case"lowercase":return n===n.toLocaleLowerCase()?null:this.t("_1_ne_doit_con_13605",e);default:return null}}numberValidationRuleError(e,t,n){return"number"==typeof t.min&&nt.max?this.t("_1_doit_tre_i_05381",e,t.max):null}dateValidationRuleError(e,t,n,i){const a=n.toISODate();if("past"===t.range)return a>wa.c9.now().setZone(i??n.zone).toISODate()?this.t("_1_doit_tre_u_03177",e):null;if("between"===t.range){const n=t.start?Ha(t.start):null,i=t.end?Ha(t.end):null;return n?.isValid&&ai.toISODate()?this.t("_1_doit_tre_c_56697",e,n?this.dateTimeService.toLocaleString(n,bl):"",i?this.dateTimeService.toLocaleString(i,bl):""):null}return null}fieldUpdateInputDefault(e,t,n){switch(e.fieldType){case ze.Checkbox:case ze.Validation:return!!n&&void 0;case ze.File:return this.documentInputService.documentInputDefault();case ze.Phone:return this.phoneInputService.phoneInputDefault(t);case ze.Select:return e.canSelectMultiple?[]:void 0;case ze.Address:case ze.Date:case ze.Datetime:case ze.Language:case ze.Number:case ze.Sex:case ze.Text:case ze.Textarea:case ze.Time:return;case ze.Country:return t.user.country;case ze.Nationality:return t.user.nationality;default:return tr(e.fieldType)}}getFieldValue(e,t){const n=e[t.slug];return t.fieldType===ze.Phone&&n?(0,D.A)(n,al):t.fieldType===ze.File?(0,D.A)(n,cr):t.fieldType===ze.Date&&n?wa.c9.fromISO(n,{zone:"UTC"}):n}};Cl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,ur,sl,Si])],Cl);let El=class extends jo{documentInputService;archiveInputService;constructor(e,t,n){super(n),this.documentInputService=e,this.archiveInputService=t}default(){return{input:{archive:this.documentInputService.documentInputDefault(),fieldId:-1}}}schema(){return ho.Ik().shape({input:ho.Ik().shape({archive:this.archiveInputService.schema(),fieldId:ho.Yj().required(this.t("le_champ_person_80074")).typeError(this.t("le_champ_person_80074"))})})}};El=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[ur,Bo,Si])],El);let Tl=class extends Vo{constructor(e){super(e)}step1Schema(){return ho.Ik().shape({email:this.email()})}step2Schema(){return ho.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Tl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Tl);let Ml=class extends jo{constructor(e){super(e)}formInputDefault(){return{name:""}}formInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536"))})}createFormSchema(){return ho.Ik().shape({form:this.formInputSchema()})}};Ml=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ml);let Rl=class extends jo{constructor(e){super(e)}formParametersAccreditationsInputDefault(e){return{accreditationDisplay:e?.accreditationDisplay||St.None,accreditationFilter:e?.accreditationFilter||bt.None,hiddenAccreditationsCategoriesIds:e?.hiddenAccreditationsCategoriesIds||[],hiddenAccreditationsIds:e?.hiddenAccreditationsIds||[],hiddenAccreditationsSlotsIds:e?.hiddenAccreditationsSlotsIds||[],displayedAccreditationsCategoriesIds:e?.displayedAccreditationsCategoriesIds||[],displayedAccreditationsIds:e?.displayedAccreditationsIds||[],displayedAccreditationsSlotsIds:e?.displayedAccreditationsSlotsIds||[],showFullAccreditation:e?.showFullAccreditation??!0,showAccreditationDescription:e?.showAccreditationDescription??!1,accreditationTitle:e?.accreditationTitle||"",accreditationSubtitle:e?.accreditationSubtitle||""}}formParametersAccreditationsInputSchema(){return ho.Ik().shape({accreditationDisplay:ho.Yj().required(this.t("la_strat_gie_d_70458")).oneOf(ni,this.t("la_strat_gie_d_70458")),accreditationFilter:ho.Yj().required(this.t("la_strat_gie_de_28051")).oneOf(si,this.t("la_strat_gie_de_28051")),hiddenAccreditationsIds:ho.YO().of(ho.ai()),showFullAccreditation:ho.zM().required(),showAccreditationDescription:ho.zM().required(),accreditationTitle:ho.Yj(),accreditationSubtitle:ho.Yj()})}updateFormParametersAccreditationsSchema(){return ho.Ik().shape({form:this.formParametersAccreditationsInputSchema()})}};Rl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Rl);let Dl=class extends jo{constructor(e){super(e)}formParametersAvailabilitiesInputDefault(e){return{slotDisplay:e?.slotDisplay||At.Hide,minNumberOfSlots:e?.minNumberOfSlots??1,daysDisplay:e?.daysDisplay||jt.AllDays,customSlotsPeriods:(e?.customSlotsPeriods??[]).map(e=>(0,Oi.A)(e,["id","conditionCustomField"])),slotTitle:e?.slotTitle||"",slotSubtitle:e?.slotSubtitle||""}}formParametersAvailabilitiesInputSchema(){return ho.Ik().shape({slotDisplay:ho.Yj().required(this.t("la_strat_gie_d_34961")).oneOf(oi,this.t("la_strat_gie_d_34961")),daysDisplay:ho.Yj().required(this.t("la_strat_gie_de_56435")).oneOf(ii,this.t("la_strat_gie_de_56435"))})}updateFormParametersAvailabilitiesSchema(){return ho.Ik().shape({form:this.formParametersAvailabilitiesInputSchema()})}};Dl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Dl);let Ol=class extends jo{constructor(e){super(e)}formParametersBroadcastInputDefault(e){return{segmentsIds:(e?.segments??[]).map(e=>e.segmentId),noAccessTitle:e?.noAccessTitle||"",noAccessMessage:e?.noAccessMessage||""}}formParametersBroadcastInputSchema(){return ho.Ik().shape({segmentsIds:ho.YO().of(ho.ai())})}updateFormParametersBroadcastSchema(){return ho.Ik().shape({form:this.formParametersBroadcastInputSchema()})}};Ol=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ol);let wl=class extends jo{constructor(e){super(e)}formParametersGeneralInputDefault(e){return{name:e?.name??"",setAssignmentStateToWaiting:e?.setAssignmentStateToWaiting??!1,setAccreditationStateToWaiting:e?.setAccreditationStateToWaiting??!1,allowMultiProfiles:e?.allowMultiProfiles??!1,canRefill:e?.canRefill??!1,description:e?.description||"",successTitle:e?.successTitle||"",successMessage:e?.successMessage||"",customFields:e?.customFields||[],areTeamsAllowed:e?.areTeamsAllowed??!1,maxTeamMembers:e?.maxTeamMembers,teamMemberFillFullForm:e?.teamMemberFillFullForm??!0,emailTitle:e?.emailTitle||"",informationTitle:e?.informationTitle||"",registerButtonText:e?.registerButtonText||"",isEditableInMemberSpace:e?.isEditableInMemberSpace??!0,ticketUrl:e?.ticketUrl||""}}formParametersGeneralInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),allowMultiProfiles:ho.zM().required(),setAssignmentStateToWaiting:ho.zM().required(),setAccreditationStateToWaiting:ho.zM().required(),description:ho.Yj(),successTitle:ho.Yj(),successMessage:ho.Yj(),areTeamsAllowed:ho.zM().required(),maxTeamMembers:ho.ai().nullable(),teamMemberFillFullForm:ho.zM().required(),informationTitle:ho.Yj(),registerButtonText:ho.Yj(),ticketUrl:ho.Yj().test("valid-ticket-url",this.t("le_lien_doit_co_30275"),e=>!h(e)||e.startsWith("https://"))})}updateFormParametersGeneralSchema(){return ho.Ik().shape({form:this.formParametersGeneralInputSchema()})}};wl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],wl);let Pl=class extends jo{constructor(e){super(e)}formParametersMissionsInputDefault(e){return{positionDisplay:e?.positionDisplay||vt.None,positionFilter:e?.positionFilter||bt.FilterWithSlots,positionRanking:e?.positionRanking||Ve.Unranked,positionLimit:e?.positionLimit||3,hiddenPositionsCategoriesIds:e?.hiddenPositionsCategoriesIds||[],hiddenPositionsIds:e?.hiddenPositionsIds||[],hiddenPositionsSlotsIds:e?.hiddenPositionsSlotsIds||[],hiddenPositionsTagsIds:e?.hiddenPositionsTagsIds||[],displayedPositionsCategoriesIds:e?.displayedPositionsCategoriesIds||[],displayedPositionsIds:e?.displayedPositionsIds||[],displayedPositionsSlotsIds:e?.displayedPositionsSlotsIds||[],displayedPositionsTagsIds:e?.displayedPositionsTagsIds||[],showFullPosition:e?.showFullPosition??!0,showPositionCategoryDescription:e?.showPositionCategoryDescription??!1,showPositionDescription:e?.showPositionDescription??!1,positionTitle:e?.positionTitle||"",positionSubtitle:e?.positionSubtitle||"",willAutoAssign:e?.willAutoAssign??!1}}formParametersMissionsInputSchema(){return ho.Ik().shape({positionDisplay:ho.Yj().required(this.t("la_strat_gie_d_44170")).oneOf(ai,this.t("la_strat_gie_d_44170")),positionFilter:ho.Yj().required(this.t("la_strat_gie_de_13294")).oneOf(si,this.t("la_strat_gie_de_13294")),positionRanking:ho.Yj().required(this.t("le_type_de_clas_66819")).oneOf(Bn,this.t("le_type_de_clas_66819")),positionLimit:ho.ai().required(this.t("le_nombre_maxim_38249")).min(1,this.t("le_nombre_de_ch_27910")),hiddenPositionsCategoriesIds:ho.YO().of(ho.ai()),hiddenPositionsIds:ho.YO().of(ho.ai()),hiddenPositionsSlotsIds:ho.YO().of(ho.ai()),hiddenPositionsTagsIds:ho.YO().of(ho.ai()),displayedPositionsCategoriesIds:ho.YO().of(ho.ai()),displayedPositionsIds:ho.YO().of(ho.ai()),displayedPositionsSlotsIds:ho.YO().of(ho.ai()),displayedPositionsTagsIds:ho.YO().of(ho.ai()),showFullPosition:ho.zM().required(),showPositionCategoryDescription:ho.zM().required(),showPositionDescription:ho.zM().required(),positionTitle:ho.Yj(),positionSubtitle:ho.Yj(),willAutoAssign:ho.zM().required()})}updateFormParametersMissionsSchema(){return ho.Ik().shape({form:this.formParametersMissionsInputSchema()})}};Pl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Pl);let $l=class extends jo{constructor(e){super(e)}formParametersStateInputDefault(e){return{state:e?.state||We.Open,closedTitle:e?.closedTitle||"",closedMessage:e?.closedMessage||"",closedAt:e?.closedAt||null}}formParametersStateInputSchema(){return ho.Ik().shape({state:ho.Yj().required(this.t("cl_turer_le_for_10541")).oneOf(Vn,this.t("cl_turer_le_for_10541")),closedMessage:ho.Yj(),closedAt:bo.when("state",{is:We.ClosedAt,then:e=>e.required(this.t("la_date_de_cl_t_63358")).typeError(this.t("la_date_de_cl_t_63358")),otherwise:e=>e.nullable()})})}updateFormParametersStateSchema(){return ho.Ik().shape({form:this.formParametersStateInputSchema()})}};$l=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],$l);let kl=class extends jo{countriesService;documentInputService;fieldInputService;phoneInputService;constructor(e,t,n,i,a){super(e),this.countriesService=t,this.documentInputService=n,this.fieldInputService=i,this.phoneInputService=a}userInfoUpdateInputDefault(e,t,n={}){const i=this.countriesService.getDefaultCountryValues(n.countryCode);return{id:e?.id??null,fields:this.fieldInputService.fieldsUpdateInputDefault(e?.fields||{},t,i,n.checkboxDefaultEmpty)}}updateUserInfoChangedFieldsSchema(e,t,n){return ho.Ik().shape({userInfo:ho.Ik().shape({fields:this.fieldInputService.changedFieldsSchema(e,t,n)})})}formUserInfoInputSchema(e){return ho.Ik().shape({fields:ho.Ik().shape(Object.fromEntries(e.map(({isMandatory:e,customField:t})=>[t.slug,this.fieldInputService.fieldSchema(t,e)])))})}userInfoProfileInputDefault(e){const t=this.countriesService.getDefaultCountryValues();return{email:e.email,fields:{firstName:e.userInfo?.fields?.firstName??"",lastName:e.userInfo?.fields?.lastName??"",language:e.language??e.userInfo?.fields?.language??t.user.language??Ot.En,picture:e.userInfo.fields.picture?(0,D.A)(e.userInfo.fields.picture,cr):this.documentInputService.documentInputDefault(),phone:e.userInfo.fields.phone?(0,D.A)(e.userInfo.fields.phone,al):this.phoneInputService.phoneInputDefault(t)}}}userInfoFields(){return{fields:ho.Ik().shape({firstName:ho.Yj().nullable(),lastName:ho.Yj().nullable(),picture:this.documentInputService.documentInputSchemaNotRequired(),language:ho.Yj().required(this.t("les_langues_doi_27712")).oneOf(el,this.t("les_langues_doi_27712")),phone:this.phoneInputService.phoneInputSchemaNotRequired()})}}userInfoProfileInputSchema(){return ho.Ik().shape({email:ho.Yj().email(this.t("l_e_mail_est_re_04856")).required(this.t("l_e_mail_est_re_04856")),...this.userInfoFields()})}updateProfileSchema(){return ho.Ik().shape({userInfo:this.userInfoProfileInputSchema()})}userInfoAndTermsInputDefault(e){return{...(0,Oi.A)(e.userInfo,["id"]),termsAccepted:!1}}userInfoAndTermsInputSchema(){return ho.Ik().shape({firstName:ho.Yj().nullable(),lastName:ho.Yj().nullable(),phone:this.phoneInputService.phoneInputSchemaNotRequired(),termsAccepted:ho.zM().oneOf([!0],this.t("il_est_n_cessai_83896")).required(this.t("il_est_n_cessai_83896"))})}updateUserInfoAndTermsSchema(){return ho.Ik().shape({userInfoAndTerms:this.userInfoAndTermsInputSchema()})}};kl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,Xr,ur,Cl,sl])],kl);let Nl=class extends jo{constructor(e){super(e)}volunteersRegistrationsSlotInputDefault(e){return{startDate:e||wa.c9.invalid("Invalid"),startTime:"",endDate:e||wa.c9.invalid("Invalid"),endTime:""}}volunteersRegistrationsSlotInputSchema(e,t){const n=t.plus({day:1}).endOf("day");return ho.Ik().shape({startDate:bo.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")).test("after-event-start-date",this.t("la_date_de_d_bu_68630",e.toLocaleString()),t=>t>=e),startTime:ho.Yj().required(this.t("heure_de_d_but_90785")),endDate:bo.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")).test("after-start-date",this.t("la_date_de_fin_00429"),(e,t)=>wa.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&wa.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate).test("before-event-end-date",this.t("la_date_de_fin_49125",t.toLocaleString()),e=>e<=n),endTime:ho.Yj().required(this.t("l_heure_de_fin_78626"))})}};Nl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Nl);let zl=class extends jo{translationService;volunteerRegistrationSlotInputService;constructor(e,t){super(e),this.translationService=e,this.volunteerRegistrationSlotInputService=t}slotsFields(e,t,n,i,a){switch(e){case At.Display:case At.DisplayDays:case At.Calendar:case At.Custom:return{slots:ho.YO().of(this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputSchema(n,i)).min(a?0:t,this.t("vous_devez_ajou_68961",t))};case At.Hide:return{};default:return tr()}}volunteersRegistrationsSlotsUpdateInputDefault(e){return F(e)?e.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime})):[]}volunteersRegistrationsWishedPositionsInputDefault(){return{positionsCategoriesIds:[],positionsIds:[],positionsSlotsIds:[]}}volunteersRegistrationsWishedPositionsUpdateInputDefault(e){return e?{positionsCategoriesIds:e?.positionsCategoriesIds,positionsIds:e?.positionsIds,positionsSlotsIds:e?.positionsSlotsIds}:this.volunteersRegistrationsWishedPositionsInputDefault()}wishedPositionsFields(e,t,n){if(e===Ve.Ranked){if(t===vt.Category)return{positionsCategoriesIds:ho.YO().of(ho.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_32044")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,go.A)((e||[]).filter(e=>-1!==e));return F(t)&&(0,$a.A)(t).length===t.length})};if(t===vt.Position)return{positionsIds:ho.YO().of(ho.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,go.A)((e||[]).filter(e=>-1!==e));return F(t)&&(0,$a.A)(t).length===t.length})};if(t===vt.Slot)return{positionsSlotsIds:ho.YO().of(ho.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603")).test("different",this.t("les_missions_so_04441"),e=>{const t=(0,go.A)((e||[]).filter(e=>-1!==e));return F(t)&&(0,$a.A)(t).length===t.length})};throw new Error("Should not happen")}switch(t){case vt.Category:return{positionsCategoriesIds:ho.YO().of(ho.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_32044"))};case vt.Position:return{positionsIds:ho.YO().of(ho.ai().typeError(this.t("s_lectionner_un_26253"))).min(n?0:1,this.t("vous_devez_s_le_89603"))};case vt.Slot:return{positionsSlotsIds:ho.YO().of(ho.ai()).min(n?0:1,this.t("vous_devez_s_le_89603"))};case vt.None:return{};default:return tr()}}volunteersRegistrationsWishedAccreditationsInputDefault(){return{accreditationsSlotsIds:[]}}volunteersRegistrationsWishedAccreditationsUpdateInputDefault(e){return e?{accreditationProfileId:e.accreditationProfileId,accreditationsSlotsIds:e.accreditationsSlotsIds}:this.volunteersRegistrationsWishedAccreditationsInputDefault()}accreditationProfileFields(e,t){return e&&F(t)?{accreditationProfileId:ho.ai().required(this.t("vous_devez_s_le_07918"))}:{}}accreditationsFields(e,t,n){if(t)return{};switch(e){case St.Accreditation:return{accreditationsSlotsIds:ho.YO().of(ho.ai().typeError(this.t("s_lectionner_un_96571"))).min(n?0:1,this.t("vous_devez_s_le_72138"))};case St.None:return{};default:return tr()}}userInfoAccreditationsSchema(e){return ho.Ik().shape({userInfo:ho.Ik().shape({accreditations:ho.YO().of(ho.Ik().shape({formId:ho.ai().required(),...this.accreditationsFields(e,null)}))})})}adminAddSchema(){return ho.Ik().shape({usersInfosIds:ho.YO().of(ho.ai()).min(1,this.t("vous_devez_s_le_83608")),sendVolunteerRegistrationEmail:ho.zM().required()})}};zl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,Nl])],zl);let Ll=class extends jo{fieldInputService;userInfoInputService;volunteerRegistrationInputService;volunteerRegistrationSlotInputService;constructor(e,t,n,i,a){super(e),this.fieldInputService=t,this.userInfoInputService=n,this.volunteerRegistrationInputService=i,this.volunteerRegistrationSlotInputService=a}formRegisterInputDefault(e,t,n,i){return{autoAccredit:!1,forOther:i.forOther,positionsSlotsIds:i.team?.positionsSlotsIds??[],positionsIds:i.team?.positionsIds??[],positionsCategoriesIds:i.team?.positionsCategoriesIds??[],accreditationProfileId:null,accreditationsSlotsIds:(i.delegationAccreditationsSlots??[]).filter(e=>e.isDefault).map(e=>e.accreditationSlotId),userInfo:this.userInfoInputService.userInfoUpdateInputDefault(t,n,{countryCode:i.countryCode}),sendNotificationEmail:i.sendNotificationEmail,slots:i.team?.slots??(i.slotDisplay===At.Display?[this.volunteerRegistrationSlotInputService.volunteersRegistrationsSlotInputDefault(i.eventStartDate)]:[]),source:e}}formRegisterInformationsSchema(e){return ho.Ik().shape({formRegister:ho.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e)})})}formRegisterSlotsSchema(e,t,n,i){return ho.Ik().shape({formRegister:ho.Ik().shape({...this.volunteerRegistrationInputService.slotsFields(e,t,n,i)})})}formRegisterPositionsSchema(e,t){return ho.Ik().shape({formRegister:ho.Ik().shape({...this.volunteerRegistrationInputService.wishedPositionsFields(e,t)})})}formRegisterAccreditationsSchema(e,t,n,i){const a=function(e){return Object.values(e.reduce((e,t)=>{if(e[t.customField.slug]){const n=e[t.customField.slug];return{...e,[t.customField.slug]:{accreditationsSlotsIds:n.accreditationsSlotsIds.concat(t.accreditationsSlotsIds),customField:t.customField,isMandatory:n.isMandatory||t.isMandatory}}}return{...e,[t.customField.slug]:{accreditationsSlotsIds:t.accreditationsSlotsIds,customField:t.customField,isMandatory:t.isMandatory}}},{}))}(n);return ho.Ik().shape({formRegister:ho.Ik().shape({...this.volunteerRegistrationInputService.accreditationsFields(e,i),userInfo:ho.Ik().shape({fields:ho.Ik().shape(Object.fromEntries(a.map(e=>{const n=e.isMandatory&&F((0,ml.A)(e.accreditationsSlotsIds,t));return[e.customField.slug,this.fieldInputService.fieldSchema(e.customField,n)]})))})})})}formRegisterSchema(e,{accreditationDisplay:t,areSectionsDisabled:n,delegationAccreditationsProfiles:i,delegationId:a,eventEndDate:s,eventStartDate:o,minNumberOfSlots:r,positionDisplay:l,positionRanking:d,slotDisplay:c}){return ho.Ik().shape({email:ho.Yj().required(this.t("l_e_mail_est_re_04856")).email(this.t("l_e_mail_est_re_04856")),formRegister:ho.Ik().shape({userInfo:this.userInfoInputService.formUserInfoInputSchema(e),...this.volunteerRegistrationInputService.slotsFields(c,r,o,s,n?.isWishedAssignmentsDisabled),...this.volunteerRegistrationInputService.wishedPositionsFields(d,l,n?.isWishedAssignmentsDisabled),...this.volunteerRegistrationInputService.accreditationsFields(t,a,n?.isWishedAccreditationsDisabled),...this.volunteerRegistrationInputService.accreditationProfileFields(a,i)})})}};Ll=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si,Cl,kl,zl,Nl])],Ll);let Fl=class extends jo{constructor(e){super(e)}default(e){return{name:e?.name??"",description:e?.description??"",usersInfosIds:(e?.members??[]).map(({id:e})=>e),eventsAccesses:(e?.accesses??[]).filter(e=>e.scope===Ct.Event&&e.eventId).map(e=>({eventId:e.eventId,roleId:e.roleId})),isWeezaccessSynchronized:e?.isWeezaccessSynchronized??!1}}eventAccessDefault(){return{eventId:null,roleId:null}}schema(){return ho.Ik().shape({group:ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),description:ho.Yj(),usersInfosIds:ho.YO().of(ho.ai()).required(),eventsAccesses:ho.YO().of(ho.Ik().shape({eventId:ho.ai().nullable().required(this.t("vous_devez_s_le_61092")),roleId:ho.ai().nullable().required(this.t("vous_devez_s_le_18837"))})).required(),isWeezaccessSynchronized:ho.zM()}).required()}).required()}};Fl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Fl);let Ul=class extends jo{translationService;constructor(e){super(e),this.translationService=e}step1Schema(){return ho.Ik().shape({[this.inputName]:ho.Ik().shape(this.step1Fields())})}step2Schema(){return ho.Ik().shape({[this.inputName]:ho.Ik().shape(this.step2Fields())})}schema(){return ho.Ik().shape({...this.step1Fields(),...this.step2Fields()})}strategyField(e=Zn){return ho.Yj().required(this.t("la_strat_gie_es_82287")).oneOf(e,this.t("la_strat_gie_es_82287"))}};Ul=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ul);let Bl=class extends Ul{translationService;inputName="massAccredit";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsSlotsIds:ho.YO().of(ho.ai()).required(this.t("vous_devez_s_le_72138")).when("accreditationProfile",{is:e=>!e,then:e=>e.min(1,this.t("vous_devez_s_le_72138"))})}}};Bl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Bl);let Vl=class extends jo{constructor(e){super(e)}massAddEventInputSchema(){return ho.Ik().shape({massAddEvent:ho.Ik().shape({eventId:ho.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})})}massAddEventSchema(){return ho.Ik().shape({eventId:ho.ai().required(this.t("l_v_nement_est_88155")).typeError(this.t("l_v_nement_est_88155"))})}};Vl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Vl);let Gl=class extends Ul{translationService;inputName="massAssign";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{positionsSlotsIds:ho.YO().of(ho.ai()).required(this.t("vous_devez_s_le_28976")).min(1,this.t("vous_devez_s_le_28976"))}}};Gl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Gl);let Wl=class extends Ul{translationService;inputName="massAvailabilitiesUpdate";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(),formId:ho.ai().required(this.t("le_formulaire_e_77404"))}}step2Fields(){return{slots:ho.YO().of(ho.Ik()).required(this.t("vous_devez_ajou_68961")).min(1,this.t("vous_devez_ajou_68961"))}}};Wl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Wl);let ql=class extends Ul{translationService;inputName="massConditions";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(Kn)}}step2Fields(){return{customFieldId:ho.ai().required(this.t("le_champ_person_80074")),value:ho.gl().required(this.t("la_valeur_est_r_70136"))}}};ql=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],ql);let Yl=class extends Ul{translationService;inputName="massAccreditationsProfiles";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsProfiles:ho.YO().of(ho.Ik().shape({accreditationProfileId:ho.ai().required(),maxResources:ho.gl().nullable(),willAutoAccredit:ho.zM().required()})).required(this.t("vous_devez_s_le_98277")).min(1,this.t("vous_devez_s_le_98277"))}}};Yl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Yl);let Hl=class extends Ul{translationService;inputName="massAccreditationsSlots";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField()}}step2Fields(){return{accreditationsSlots:ho.YO().of(ho.Ik().shape({accreditationCategoryId:ho.ai().required(),accreditationId:ho.ai().required(),accreditationSlotId:ho.ai().required(),isDefault:ho.zM().required(),isVisible:ho.zM().required(),maxResources:ho.gl().nullable()})).required(this.t("vous_devez_s_le_72138")).min(1,this.t("vous_devez_s_le_72138"))}}};Hl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Hl);let Zl=class extends Ul{translationService;inputName="massPreAssign";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField(),level:ho.Yj().required(this.t("le_niveau_est_r_81100")).oneOf(Qn,this.t("le_niveau_est_r_81100"))}}step2Fields(){return{positionsCategoriesIds:ho.YO().of(ho.ai()).test("non-empty-categories",this.t("vous_devez_s_le_32044"),function(){return this.parent.level!==tt.Categories||this.parent.positionsCategoriesIds.length>0}),positionsIds:ho.YO().of(ho.ai()).test("non-empty-positions",this.t("vous_devez_s_le_89603"),function(){return this.parent.level!==tt.Positions||this.parent.positionsIds.length>0})}}};Zl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Zl);let Kl=class extends jo{translationService;constructor(e){super(e),this.translationService=e}default(e){return{...e,groupId:void 0,customDocumentId:void 0,eventDocumentId:void 0,zplDocumentId:void 0}}schema(){const e=this;return ho.Ik().shape({input:ho.Ik().shape({groupId:ho.Yj().required(this.t("le_lieu_d_impre_60407")),customDocumentId:ho.ai().nullable(),eventDocumentId:ho.ai().nullable(),zplDocumentId:ho.ai().nullable()}).test({name:"exactly-one-document",test:({customDocumentId:t,eventDocumentId:n,zplDocumentId:i},a)=>1===[t,n,i].filter(Boolean).length||a.createError({message:e.t("a_wristband_to_25340"),path:"input.zplDocumentId"})})})}};Kl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Kl);let Ql=class extends jo{translationService;constructor(e){super(e),this.translationService=e}massStateUpdateSchema(){return ho.Ik().shape({state:ho.Yj().required(this.t("le_statut_est_r_13164")).oneOf([Bt.NotApplicable,Bt.PreAssigned,Bt.Refused,Bt.WaitingAssignment],this.t("le_statut_est_r_13164"))})}massAccreditationStateUpdateSchema(){return ho.Ik().shape({state:ho.Yj().required(this.t("le_statut_est_r_13164")).oneOf([J.NotApplicable,J.Refused,J.WaitingAccreditation],this.t("le_statut_est_r_13164"))})}};Ql=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ql);let Xl=class extends Ul{translationService;inputName="massProfileUpdate";constructor(e){super(e),this.translationService=e}step1Fields(){return{strategy:this.strategyField([Je.Replace,Je.Delete])}}step2Fields(){return{accreditationProfileId:ho.ai().nullable().when("strategy",{is:e=>e!==Je.Delete,then:e=>e.required(this.t("vous_devez_s_le_07918"))})}}};Xl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Xl);let Jl=class{positionsCustomFieldInputSchema(){return ho.Ik().shape({customFieldId:ho.ai().required(),conditionValue:ho.gl().required()})}};Jl=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)()],Jl);const ed=/^\d{1,2}:\d{2}$/,td=/^\d{1,2}:\d{2}:\d{2}$/;function nd(e){return h(e)&&(null!==e.match(ed)||null!==e.match(td))}function id(e){if(nd(e)){const[t,n]=e.split(":");return[parseInt(t,10),parseInt(n,10)]}return null}let ad=class extends jo{constructor(e){super(e)}positionsSlotInputDefault(e,t){return{id:t?.id,name:t?.name??"",startDate:t?.startDate??e,startTime:t?.startTime??e.toFormat("HH:mm"),endDate:t?.endDate??e,endTime:t?.endTime??e.plus({hour:1}).toFormat("HH:mm"),resources:t?.resources??1,assignedResources:t?.assignedResources}}createPositionSlotSchema(){return ho.Ik().shape({slot:this.positionsSlotInputSchema()})}positionsSlotInputSchema(){return ho.Ik().shape({name:ho.Yj(),startDate:bo.required(this.t("la_date_de_d_bu_05030")).typeError(this.t("la_date_de_d_bu_05030")),startTime:ho.Yj().required(this.t("heure_de_d_but_90785")),endDate:bo.required(this.t("la_date_de_fin_32246")).typeError(this.t("la_date_de_fin_32246")).test("after-start-date",this.t("la_date_de_fin_00429"),(e,t)=>wa.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid&&wa.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid&&t.parent.endDate>=t.parent.startDate),endTime:ho.Yj().required(this.t("l_heure_de_fin_78626")).test("after-start-time",this.t("la_date_de_fin_00429"),(e,t)=>{const n=wa.c9.isDateTime(t.parent.startDate)&&t.parent.startDate.isValid,i=nd(t.parent.startTime),a=wa.c9.isDateTime(t.parent.endDate)&&t.parent.endDate.isValid,s=nd(t.parent.endTime);if(n&&i&&a&&s){const[e,n]=id(t.parent.startTime),[i,a]=id(t.parent.endTime);return t.parent.startDate.set({hours:e,minutes:n})=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],ad);let sd=class extends jo{positionsCustomFieldInputService;positionsSlotInputService;constructor(e,t,n){super(n),this.positionsCustomFieldInputService=e,this.positionsSlotInputService=t}positionInputDefault(e,{positionCategoryId:t,layer:n,latitude:i,longitude:a,startAt:s}){let o=e?.category.id??t;return Number.isInteger(o)||(o=null),{positionCategoryId:o,name:e?.name??"",description:e?.description??"",privateNote:e?.privateNote??"",acronym:e?.acronym??"",color:e?.color??v.colors.primary500.value,icon:e?.icon??qe.LocationDot,weezeventIsSynchronized:e?.weezeventIsSynchronized??!1,address:e?.address??null,latitude:e?.latitude??i??null,longitude:e?.longitude??a??null,zoom:e?.zoom??13,layer:e?.layer??n,tracesIds:e?.tracesIds??[],slots:e?.slots??[this.positionsSlotInputService.positionsSlotInputDefault(s)],positionDisplay:e?.positionDisplay??st.List,conditionsOperator:e?.conditionsOperator??ue.And,positionsCustomFields:e?.positionsCustomFields??[],tagsIds:e?.tagsIds??[],fields:e?.fields??{},leadersIds:e?.fields??[]}}createUpdatePositionSchema(e){const t=this.positionInputSchema();return ho.Ik().shape({position:e?t.shape({fields:e}):t})}positionInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_de_la_mi_74207")),positionCategoryId:ho.ai().required(this.t("la_cat_gorie_es_14008")).typeError(this.t("la_cat_gorie_es_14008")).min(1,this.t("la_cat_gorie_es_14008")),acronym:ho.Yj(),color:ho.Yj().required(this.t("la_couleur_est_95740")),icon:ho.Yj().required(this.t("l_ic_ne_est_req_15843")).oneOf(Gn,this.t("l_ic_ne_est_req_15843")),description:ho.Yj(),privateNote:ho.Yj(),address:ho.Yj().nullable(),latitude:ho.ai().nullable().typeError(this.t("la_latitude_doi_43118")),longitude:ho.ai().nullable().typeError(this.t("la_longitude_do_35170")),traces:ho.YO().of(ho.ai()),slots:ho.YO().of(this.positionsSlotInputService.positionsSlotInputSchema()).required(this.t("vous_devez_avoi_26563")).min(1,this.t("vous_devez_avoi_26563")),positionDisplay:ho.Yj().required(this.t("le_type_d_affic_60154")).oneOf(Xn,this.t("le_type_d_affic_60154")),positionsCustomFields:ho.YO().of(this.positionsCustomFieldInputService.positionsCustomFieldInputSchema()),tagsIds:ho.YO().of(ho.ai())})}};sd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Jl,ad,Si])],sd);var od;let rd=class extends No{static{od=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...No.IMPORT_COLUMNS_DEFAULT,PositionName:"positionName",PositionCategoryName:"positionCategoryName",SlotStart:"slotStart",SlotEnd:"slotEnd",MaxResources:"slotMaxResources",SlotName:"slotName",Acronym:"acronym",Color:"color",Icon:"icon",Description:"description",ConditionsOperator:"conditionsOperator",Address:"address",Latitude:"latitude",Longitude:"longitude",MapLayer:"mapLayer",MapZoom:"mapZoom",LeadersEmails:"leadersEmails",LeadersFirstNames:"leadersFirstnames",LeadersLastNames:"leadersLastnames",PrivateNote:"privateNote",Tags:"tags"};static IMPORT_COLUMNS_REQUIRED=e=>[...e===Ye.Update?[od.IMPORT_COLUMNS_DEFAULT.Id]:[],od.IMPORT_COLUMNS_DEFAULT.SlotStart,od.IMPORT_COLUMNS_DEFAULT.SlotEnd,od.IMPORT_COLUMNS_DEFAULT.MaxResources,od.IMPORT_COLUMNS_DEFAULT.PositionName,od.IMPORT_COLUMNS_DEFAULT.PositionCategoryName];constructor(e,t){super(e,t),this.csvInputService=e}};rd=od=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],rd);function ld(e){return e===dt.StartDate||e===dt.EndDate}function dd(e){return e===dt.StartTime||e===dt.EndTime}let cd=class extends jo{constructor(e){super(e)}positionsSlotsMassEditSchema(){return ho.Ik().shape({massEdit:this.positionsSlotsMassEditInputSchema()})}positionsSlotsMassEditInputSchema(){return ho.Ik().shape({selecteds:ho.Ik().required(),property:ho.Yj().required().oneOf(Jn),strategy:ho.Yj().required().oneOf(ei).when("property",{is:ld,then:e=>e.oneOf([ct.Replace])}),value:ho.gl().test("valid-value",(e,t)=>{const{property:n,strategy:i}=t.parent;return ld(n)?wa.c9.isDateTime(e)&&e.isValid||"string"==typeof e&&wa.c9.fromISO(e).isValid||t.createError({message:this.t("la_date_est_req_98470")}):dd(n)&&i===ct.Replace?nd(e)||t.createError({message:this.t("l_heure_est_req_51396")}):dd(n)?fo(e)||t.createError({message:this.t("le_nombre_de_mi_02803")}):fo(e)||t.createError({message:this.t("le_nombre_de_me_04870")})})})}};cd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],cd);function ud(e){switch(e){case _t.OrganizationNotLinked:case _t.PartnersUnreachable:case _t.PartnerNotFound:return"weezaccessPartnerId";case _t.EventNotLinked:case _t.GroupsUnreachable:case _t.GroupNotFound:return"printerGroupId";case _t.DocumentNotFound:return"zplDocumentId";default:return tr()}}function md(e){return wa.c9.isDateTime(e)&&e.isValid}let gd=class extends jo{constructor(e){super(e)}default(e){const t=e?.activationRange;return{weezaccessPartnerId:e?.weezaccessPartnerId??null,printerGroupId:e?.printerGroupId??null,zplDocumentId:e?.zplDocumentId??null,activationStart:t?.start?.toLocal()??null,activationEnd:t?.end?.toLocal()??null}}toInput({weezaccessPartnerId:e,printerGroupId:t,zplDocumentId:n,...i}){if(null===e||null===t||null===n)throw new Error("PrintTriggerInputService.toInput: the schema requires the partner, the printer group and the ZPL document.");return{...i,weezaccessPartnerId:e,printerGroupId:t,zplDocumentId:n,activationStart:md(i.activationStart)?i.activationStart:null,activationEnd:md(i.activationEnd)?i.activationEnd:null}}toSubmitErrors(e){return{printTrigger:Object.fromEntries(e.map(({code:e,message:t})=>[ud(e),t]))}}schema(){return ho.Ik().shape({printTrigger:this.printTriggerInputSchema().required()}).required()}printTriggerInputSchema(){return ho.Ik().shape({weezaccessPartnerId:ho.ai().typeError(this.t("l_op_rateur_wee_26038")).required(this.t("l_op_rateur_wee_26038")),printerGroupId:ho.Yj().typeError(this.t("le_point_d_impr_71946")).required(this.t("le_point_d_impr_71946")),zplDocumentId:ho.ai().typeError(this.t("le_document_est_86403")).required(this.t("le_document_est_86403")),activationStart:ho.gl().nullable().test("required-with-end",this.t("la_date_de_d_bu_05030"),(e,{parent:t})=>md(e)||!md(t.activationEnd)),activationEnd:ho.gl().nullable().test("required-with-start",this.t("la_date_de_fin_32246"),(e,{parent:t})=>md(e)||!md(t.activationStart)).test("after-start",this.t("la_date_de_fin_00429"),(e,{parent:t})=>!md(e)||!md(t.activationStart)||e>t.activationStart)})}};var hd;gd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],gd),function(e){e[e.POSITION_READ=0]="POSITION_READ",e[e.POSITION_EDIT=1]="POSITION_EDIT",e[e.MEMBER_EDIT=2]="MEMBER_EDIT",e[e.MEMBER_ASSIGNMENT_STATE_EDIT=3]="MEMBER_ASSIGNMENT_STATE_EDIT",e[e.COMMENT_READ=4]="COMMENT_READ",e[e.COMMENT_ADD=5]="COMMENT_ADD",e[e.MEMBER_AVAILABILITIES_EDIT=6]="MEMBER_AVAILABILITIES_EDIT",e[e.MEMBER_ASSIGN=7]="MEMBER_ASSIGN",e[e.CAMPAIGN_SEND=8]="CAMPAIGN_SEND",e[e.ACCREDITATION_READ=9]="ACCREDITATION_READ",e[e.ACCREDITATION_EDIT=10]="ACCREDITATION_EDIT",e[e.MEMBER_ACCREDIT=11]="MEMBER_ACCREDIT",e[e.DELEGATION_READ=12]="DELEGATION_READ",e[e.DELEGATION_EDIT=13]="DELEGATION_EDIT",e[e.FORM_READ=14]="FORM_READ",e[e.FORM_EDIT=15]="FORM_EDIT",e[e.EMAIL_EDIT=16]="EMAIL_EDIT",e[e.CAMPAIGN_READ=17]="CAMPAIGN_READ",e[e.DOCUMENT_READ=18]="DOCUMENT_READ",e[e.DOCUMENT_EDIT=19]="DOCUMENT_EDIT",e[e.WORKFLOW_READ=20]="WORKFLOW_READ",e[e.WORKFLOW_EDIT=21]="WORKFLOW_EDIT",e[e.CUSTOM_FIELD_READ=22]="CUSTOM_FIELD_READ",e[e.CUSTOM_FIELD_EDIT=23]="CUSTOM_FIELD_EDIT",e[e.SEGMENT_EDIT=24]="SEGMENT_EDIT",e[e.MEMBER_CREATE=25]="MEMBER_CREATE",e[e.MEMBER_DELETE=26]="MEMBER_DELETE",e[e.EVENT_EDIT=27]="EVENT_EDIT",e[e.ORGANIZATION_PARAM_READ=28]="ORGANIZATION_PARAM_READ",e[e.ORGANIZATION_PARAM_EDIT=29]="ORGANIZATION_PARAM_EDIT",e[e.ORGANIZATION_USER_READ=30]="ORGANIZATION_USER_READ",e[e.ORGANIZATION_USER_EDIT=31]="ORGANIZATION_USER_EDIT",e[e.CUSTOM_FIELD_DECRYPT=32]="CUSTOM_FIELD_DECRYPT",e[e.WEEZEVENT_READ=33]="WEEZEVENT_READ",e[e.WEEZEVENT_EDIT=34]="WEEZEVENT_EDIT",e[e.DELEGATIONS_SPACE_PARAM_READ=35]="DELEGATIONS_SPACE_PARAM_READ",e[e.DELEGATIONS_SPACE_PARAM_EDIT=36]="DELEGATIONS_SPACE_PARAM_EDIT",e[e.PRINT_CONFIG_READ=37]="PRINT_CONFIG_READ",e[e.PRINT_CONFIG_EDIT=38]="PRINT_CONFIG_EDIT",e[e.PRINT=39]="PRINT",e[e.TICKET_ID_REGENERATE=40]="TICKET_ID_REGENERATE"}(hd||(hd={}));const pd=Object.keys(hd).length/2;function fd(e){return new Array(pd).fill("0").map((t,n)=>e.includes(n)?"1":"0").join("")}const Id=fd([hd.POSITION_READ,hd.POSITION_EDIT,hd.MEMBER_EDIT,hd.MEMBER_ASSIGNMENT_STATE_EDIT,hd.COMMENT_READ,hd.COMMENT_ADD,hd.MEMBER_AVAILABILITIES_EDIT,hd.MEMBER_ASSIGN,hd.CAMPAIGN_SEND,hd.ACCREDITATION_READ,hd.ACCREDITATION_EDIT,hd.MEMBER_ACCREDIT,hd.DELEGATION_READ,hd.DELEGATION_EDIT,hd.FORM_READ,hd.FORM_EDIT,hd.EMAIL_EDIT,hd.CAMPAIGN_READ,hd.DOCUMENT_READ,hd.DOCUMENT_EDIT,hd.WORKFLOW_READ,hd.WORKFLOW_EDIT,hd.CUSTOM_FIELD_READ,hd.CUSTOM_FIELD_EDIT,hd.SEGMENT_EDIT,hd.MEMBER_CREATE,hd.MEMBER_DELETE,hd.EVENT_EDIT,hd.ORGANIZATION_PARAM_READ,hd.ORGANIZATION_PARAM_EDIT,hd.ORGANIZATION_USER_READ,hd.ORGANIZATION_USER_EDIT,hd.WEEZEVENT_READ,hd.WEEZEVENT_EDIT,hd.DELEGATIONS_SPACE_PARAM_READ,hd.DELEGATIONS_SPACE_PARAM_EDIT,hd.PRINT_CONFIG_READ,hd.PRINT_CONFIG_EDIT,hd.PRINT,hd.TICKET_ID_REGENERATE]),_d=fd([hd.POSITION_READ,hd.COMMENT_READ,hd.ACCREDITATION_READ,hd.DELEGATION_READ,hd.FORM_READ,hd.CAMPAIGN_READ,hd.DOCUMENT_READ,hd.WORKFLOW_READ,hd.CUSTOM_FIELD_READ,hd.ORGANIZATION_PARAM_READ,hd.ORGANIZATION_USER_READ,hd.WEEZEVENT_READ,hd.DELEGATIONS_SPACE_PARAM_READ,hd.PRINT_CONFIG_READ]),xd=fd([hd.POSITION_READ,hd.POSITION_EDIT,hd.MEMBER_EDIT,hd.MEMBER_ASSIGNMENT_STATE_EDIT,hd.COMMENT_READ,hd.COMMENT_ADD,hd.MEMBER_AVAILABILITIES_EDIT,hd.MEMBER_ASSIGN,hd.CAMPAIGN_SEND,hd.ACCREDITATION_READ,hd.ACCREDITATION_EDIT,hd.MEMBER_ACCREDIT,hd.DELEGATION_READ,hd.DELEGATION_EDIT,hd.FORM_READ,hd.FORM_EDIT,hd.EMAIL_EDIT,hd.CAMPAIGN_READ,hd.DOCUMENT_READ,hd.DOCUMENT_EDIT,hd.WORKFLOW_READ,hd.WORKFLOW_EDIT,hd.CUSTOM_FIELD_READ,hd.CUSTOM_FIELD_EDIT,hd.SEGMENT_EDIT,hd.MEMBER_CREATE,hd.MEMBER_DELETE,hd.WEEZEVENT_READ,hd.WEEZEVENT_EDIT,hd.DELEGATIONS_SPACE_PARAM_READ,hd.DELEGATIONS_SPACE_PARAM_EDIT,hd.PRINT_CONFIG_READ,hd.PRINT_CONFIG_EDIT,hd.PRINT,hd.TICKET_ID_REGENERATE]),yd=fd([hd.POSITION_READ,hd.COMMENT_READ,hd.ACCREDITATION_READ,hd.DELEGATION_READ,hd.FORM_READ,hd.CAMPAIGN_READ,hd.DOCUMENT_READ,hd.WORKFLOW_READ,hd.WEEZEVENT_READ,hd.DELEGATIONS_SPACE_PARAM_READ,hd.PRINT_CONFIG_READ]),Sd=fd([hd.POSITION_READ,hd.POSITION_EDIT,hd.COMMENT_READ,hd.MEMBER_ASSIGN,hd.CAMPAIGN_SEND,hd.CAMPAIGN_READ]),jd=fd([hd.POSITION_READ,hd.COMMENT_READ]),vd=fd([hd.DELEGATION_READ]);let bd=class extends jo{constructor(e){super(e)}default(e){return{name:e?.name??"",description:e?.description??"",accessLevel:e?.accessLevel??Ct.Position,permissions:e?.permissions??Sd}}schema(){return ho.Ik().shape({role:ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),description:ho.Yj().required(this.t("la_description_46559")),accessLevel:ho.Yj().required(this.t("le_niveau_d_acc_94726")).oneOf(ri,this.t("le_niveau_d_acc_94726")),permissions:ho.Yj().matches(new RegExp(`^[01]{${pd}}$`),this.t("le_format_des_p_68818")).required(this.t("le_format_des_p_68818"))}).required()}).required()}};bd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],bd);let Ad=class extends jo{translationService;constructor(e){super(e),this.translationService=e}segmentFolderInputDefault(e,t){return{name:t?.name??"",segmentType:e}}};Ad=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ad);let Cd=class extends jo{translationService;constructor(e){super(e),this.translationService=e}};Cd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Cd);let Ed=class extends Vo{constructor(e){super(e)}step1Schema(){return ho.Ik().shape({email:this.email()})}step2Schema(){return ho.Ik().shape({email:this.email(),code:this.code()})}};Ed=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ed);let Td=class extends Vo{constructor(e){super(e)}step1Schema(){return ho.Ik().shape({email:this.email(),password:this.passwordRules()})}step2Schema(){return ho.Ik().shape({email:this.email(),code:this.code(),password:this.passwordRules()})}};Td=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Td);let Md=class extends jo{constructor(e){super(e)}connectionInfosInputDefault(e){return{url:e?.url??"",issuer:e?.issuer??"",receiver:e?.receiver??"",synchronizedEventsIds:e?.synchronizedEventsIds??[],seasonEventsIds:e?.seasonEventsIds??[],place:e?.place??""}}};Md=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Md);let Rd=class extends jo{constructor(e){super(e)}associateTagsIdsSchema(){return ho.Ik().shape({tagsIds:ho.YO().of(ho.ai())})}};Rd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Rd);let Dd=class extends jo{constructor(e){super(e)}traceInputDefault(e){return{name:e?.name??"",color:e?.color??v.colors.primary500.value,points:e?.points??[],direction:e?.direction??kt.None,startAt:e?.startAt??null,firstRunnerPace:e?.firstRunnerPace??null,lastRunnerPace:e?.lastRunnerPace??null}}traceInputSchema(e){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_du_trac_39859")),color:ho.Yj().required(this.t("la_couleur_du_t_36646")),points:ho.YO().required(this.t("le_trac_doit_c_20895")).min(2,this.t("le_trac_doit_c_20895")),startAt:ho.gl().nullable().test("start-at-during-event",this.t("l_heure_de_d_pa_04968"),t=>!wa.c9.isDateTime(t)||!t.isValid||t>=e.startAt&&t<=e.endAt.endOf("day")),firstRunnerPace:this.paceSchema(),lastRunnerPace:this.paceSchema()})}paceSchema(){return ho.ai().nullable().typeError(this.t("l_allure_doit_06495")).integer(this.t("l_allure_doit_06495")).positive(this.t("l_allure_doit_06495"))}createTraceSchema(e){return ho.Ik().shape({trace:this.traceInputSchema(e)})}updateNameSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_du_trac_39859"))})}};Dd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Dd);let Od=class{translationInputDefault(e){return{fr:this.default(e.translationType,e.fr),en:this.default(e.translationType,e.en),es:this.default(e.translationType,e.es),de:this.default(e.translationType,e.de),nl:this.default(e.translationType,e.nl)}}default(e,t){switch(e){case Lt.String:return h(t)?t:"";case Lt.StringArray:return Array.isArray(t)?t:[];case Lt.RichText:return h(t)?t:"";default:return tr()}}};Od=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)()],Od);var wd;let Pd=class extends No{static{wd=this}csvInputService;static IMPORT_COLUMNS_DEFAULT={...No.IMPORT_COLUMNS_DEFAULT,Email:"email",TicketId:"ticketId"};static IMPORT_COLUMNS_REQUIRED=e=>e===Ye.Update?[wd.IMPORT_COLUMNS_DEFAULT.Id]:[wd.IMPORT_COLUMNS_DEFAULT.Email];constructor(e,t){super(e,t),this.csvInputService=e}};Pd=wd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Po,Si])],Pd);var $d=n(8923);const kd=[Ie.CanLeadersAddMembers,Ie.CanLeadersDeleteMembers,Ie.CanLeadersDuplicateMembers,Ie.CanLeadersEditColumns,Ie.CanLeadersEditCustomFields,Ie.CanLeadersEditMembers,Ie.CanLeadersImportMembers,Ie.CanLeadersSeeHiddenAccreditationsSlots];let Nd=class extends jo{constructor(e){super(e)}workflowInputDefault(e){return{name:e?.name??"",state:e?.state??Xt.Active,frequency:e?.frequency??Yt.Every10Minutes,trigger:e?.trigger??Jt.VolunteersSegment,action:e?.action??qt.SetCustomField,data:(0,$d.A)({recipients:Kt.View},e?.data??{}),onExit:e?.onExit??Ht.Revert}}workflowInputSchema(){return ho.Ik().shape({name:ho.Yj().required(this.t("le_nom_est_requ_61536")),state:ho.Yj().required(this.t("le_statut_est_r_13164")).oneOf(pi,this.t("le_statut_est_r_13164")),action:ho.Yj().required(this.t("l_action_est_re_08934")).oneOf(ui,this.t("l_action_est_re_08934")),trigger:ho.Yj().required(this.t("le_d_clencheur_32555")).oneOf(fi,this.t("le_d_clencheur_32555")),data:ho.gl().required().test("positions-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==Jt.Assigned||F(this.parent.data.positionsCategoriesIds)||F(this.parent.data.positionsIds)||F(this.parent.data.positionsSlotsIds)||F(this.parent.data.positionsSegmentsIds)}).test("volunteers-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==Jt.VolunteersSegment||Number.isInteger(this.parent.data.volunteersSegmentId)}).test("delegations-segment-id-valid",this.t("la_vue_est_requ_65480"),function(){return this.parent.trigger!==Jt.DelegationsSegment||Number.isInteger(this.parent.data.delegationsSegmentId)}).test("form-id-valid",this.t("le_formulaire_e_77404"),function(){return this.parent.trigger!==Jt.FormSubmit||Number.isInteger(this.parent.data.formId)}).test("campaign-id-valid",this.t("la_campagne_est_06708"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.SendCampaign||Number.isInteger(this.parent.data.campaignId)}).test("campaign-recipients-valid",this.t(this.t("les_destinatair_82420")),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.SendCampaign||hi.includes(this.parent.data.recipients)}).test("campaign-recipients-users-infos",this.t("la_liste_des_me_55886"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.SendCampaign||this.parent.data.recipients!==Kt.UsersInfosIds||F(this.parent.data.usersInfosIds)}).test("custom-field-id-valid",this.t("le_champ_person_80074"),function(){return(this.parent.trigger!==Jt.VolunteersSegment&&this.parent.trigger!==Jt.DelegationsSegment||this.parent.action!==qt.SetCustomField)&&(this.parent.trigger!==Jt.FormSubmit||this.parent.action!==qt.CreateDelegation)||Number.isInteger(this.parent.data.customFieldId)}).test("duplicate-member-custom-fields-valid",this.t("le_champ_lier_69891"),function(){return this.parent.action!==qt.DuplicateMember||(this.parent.data.customFields||[]).every(e=>!0!==e.fromField||h(e.value))}).test("accreditations-valid",this.t("les_accr_ditati_27943"),function(){return this.parent.trigger===Jt.Assigned?F(this.parent.data.accreditationsSlotsIds):this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.AddAccreditations&&this.parent.action!==qt.DeleteAccreditations||F(this.parent.data.accreditationsSlotsIds)||"number"==typeof this.parent.data.accreditationProfileId}).test("positions-slots-valid",this.t("les_missions_so_67594"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.AddPositions&&this.parent.action!==qt.DeletePositions||F(this.parent.data.positionsSlotsIds)}).test("delegation-id-valid",this.t("la_d_l_gation_c_71684"),function(){return this.parent.trigger!==Jt.FormSubmit||this.parent.action!==qt.CreateDelegation||Number.isInteger(this.parent.data.delegationId)}).test("event-id-valid",this.t("l_v_nement_est_88155"),function(){return this.parent.trigger!==Jt.VolunteersSegment||this.parent.action!==qt.AddEvent||Number.isInteger(this.parent.data.eventId)}).test("permissions-valid",this.t("les_permissions_82998"),function(){return this.parent.trigger!==Jt.DelegationsSegment||this.parent.action!==qt.AddDelegationPermissions&&this.parent.action!==qt.DeleteDelegationPermissions||F(this.parent.data.permissions)&&this.parent.data.permissions.every(e=>kd.includes(e))}),onExit:ho.Yj().required(this.t("l_action_de_fin_64764")).oneOf(gi,this.t("l_action_de_fin_64764"))})}};Nd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Nd);let zd=class{get(){return{[Et.OrganizationAdmin]:{accessLevel:Ct.Organization,permissions:Id,nameKey:"administrateur_11083",descriptionKey:"a_acc_s_toute_73520"},[Et.OrganizationReader]:{accessLevel:Ct.Organization,permissions:_d,nameKey:"acc_s_en_lectur_30252",descriptionKey:"a_acc_s_l_org_94388"},[Et.EventAdmin]:{accessLevel:Ct.Event,permissions:xd,nameKey:"administrateur_24785",descriptionKey:"a_acc_s_toute_25473"},[Et.EventReader]:{accessLevel:Ct.Event,permissions:yd,nameKey:"acc_s_en_lectur_33482",descriptionKey:"a_acc_s_l_v_17476"},[Et.PositionEditor]:{accessLevel:Ct.Position,permissions:Sd,nameKey:"responsable_de_95683",descriptionKey:"peut_modifier_s_82832"},[Et.PositionReader]:{accessLevel:Ct.Position,permissions:jd,nameKey:"responsable_de_72569",descriptionKey:"a_acc_s_ses_m_09741"},[Et.DelegationCategoryLeader]:{accessLevel:Ct.DelegationCategory,permissions:vd,nameKey:"responsable_de_32820",descriptionKey:"a_acc_s_aux_d_l_87634"}}}};zd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)()],zd);let Ld=class{translationService;constructor(e){this.translationService=e}minutesToHoursMinutesString(e){const t=wa.dw.fromObject({minutes:e},{locale:tl(this.translationService.language)}).shiftTo("hours","minutes");return 0===t.minutes?t.shiftTo("hours").toHuman({unitDisplay:"narrow"}):0===t.hours?t.shiftTo("minutes").toHuman({unitDisplay:"narrow"}):t.toHuman({unitDisplay:"narrow"})}};Ld=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Ld);var Fd=n(7773),Ud=n(6666);const Bd=({children:e,dateTime:t,...n})=>{const a=h(t)?t:t.toISO();return(0,i.jsx)(N,{as:"time",dateTime:a,textStyle:"inherit",...n,children:e})};function Vd(e,t){const n=t.formats?.localeFormat||Ya.DateOnly.MonthLong,i=Ya.TimeOnly,a=t.language?{locale:tl(t.language)}:{};t.formats?.displayWeekday&&(n.weekday="long");const s=e.start,o=e.end;return{startDateString:h(t.formats?.dateFormat)?s.toFormat(t.formats.dateFormat):s.toLocaleString(n,a),startTimeString:h(t.formats?.timeFormat)?s.toFormat(t.formats.timeFormat):s.toLocaleString(i,a),endDateString:h(t.formats?.dateFormat)?o.toFormat(t.formats.dateFormat):o.toLocaleString(n,a),endTimeString:h(t.formats?.timeFormat)?o.toFormat(t.formats.timeFormat):o.toLocaleString(i,a)}}function Gd(e){const t=e.filter(e=>e.isValid);if(F(t)){const e=(0,mo.A)(t,e=>e.start.toMillis()),n=[e[0]];for(let t=1;t=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],Wd);let qd=class{translationService;constructor(e){this.translationService=e}getFormatter(e={}){return Intl.NumberFormat(tl(this.translationService.language),{notation:e.notation||"compact",style:e.style||"unit",unit:e.unit||"byte",unitDisplay:e.unitDisplay||"narrow"})}toNumberOrEmpty(e,{prefix:t}={}){return"number"==typeof e?`${t??""}${e.toLocaleString()}`:""}toNumberOrInfinity(e,{prefix:t}={}){return`${t??""}${"number"==typeof e&&e!==1/0?e.toLocaleString():"∞"}`}static bytesToMegabytes(e){return`${parseFloat((e/1e6).toPrecision(1))} MB`}static bytesToGigabytes(e){return`${parseFloat((e/1e9).toPrecision(1))} GB`}};qd=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Si])],qd);var Yd=n(141),Hd=n(7431),Zd=n(6618),Kd=n(9669),Qd=n(9385);const Xd=(e,t=null,n={})=>(Object.entries(e).forEach(([e,i])=>{const a=t?`${t}.${e}`:e;"object"!=typeof i||null===i||Array.isArray(i)?n[a]=i:Xd(i,a,n)}),n),Jd="dashboard",ec="users",tc={COMMUNITY:e=>vr([Ec.ORGANIZATION(e),"community"]),COMMUNITY_DASHBOARD:e=>vr([tc.COMMUNITY(e),Jd]),COMMUNITY_USERS:e=>vr([tc.COMMUNITY(e),ec])},nc={PLURAL:"events",SINGLE:"event"},ic={PLURAL:"teams",SINGLE:"team"},ac={EVENTS:nc.PLURAL,EVENT:e=>vr([nc.SINGLE,e]),TEAM:e=>vr([ic.SINGLE,e])},sc={EVENTS_IMPORT:e=>vr([Ec.ORGANIZATION(e),ac.EVENTS,Cr.IMPORT]),EVENTS:e=>vr([Ec.ORGANIZATION(e),ac.EVENTS]),EVENT:({eventId:e,...t})=>vr([Ec.ORGANIZATION(t),ac.EVENT(e)]),EVENT_FORM:e=>vr([yc.FORM(e)]),EVENT_TEAM_FORM:({teamCode:e,...t})=>vr([sc.EVENT_FORM(t),ac.TEAM(e)])},oc={PLURAL:"forms",SINGLE:"form"},rc="elements",lc="emails",dc="integration",cc="parameters",uc="preview",mc="general",gc="design",hc="availabilities",pc="missions",fc="accreditations",Ic="broadcast",_c="state",xc={FORMS:oc.PLURAL,FORM:e=>vr([oc.SINGLE,e])},yc={FORMS:({eventId:e,...t})=>vr([e?sc.EVENT({...t,eventId:e}):tc.COMMUNITY(t),xc.FORMS]),FORM:({formId:e,...t})=>vr(["eventId"in t&&t.eventId?sc.EVENT(t):tc.COMMUNITY(t),xc.FORM(e)]),CREATE:e=>Dr(yc.FORMS(e)),FORM_ELEMENTS:e=>vr([yc.FORM(e),rc]),FORM_INTEGRATION:e=>vr([yc.FORM(e),dc]),FORM_EMAILS:e=>vr([yc.FORM(e),lc]),FORM_PREVIEW:e=>vr([yc.FORM(e),uc]),FORM_PARAMETERS:e=>vr([yc.FORM(e),cc]),FORM_PARAMETERS_GENERAL:e=>vr([yc.FORM_PARAMETERS(e),mc]),FORM_PARAMETERS_DESIGN:e=>vr([yc.FORM_PARAMETERS(e),gc]),FORM_PARAMETERS_AVAILABILITIES:e=>vr([yc.FORM_PARAMETERS(e),hc]),FORM_PARAMETERS_MISSIONS:e=>vr([yc.FORM_PARAMETERS(e),pc]),FORM_PARAMETERS_ACCREDITATIONS:e=>vr([yc.FORM_PARAMETERS(e),fc]),FORM_PARAMETERS_BROADCAST:e=>vr([yc.FORM_PARAMETERS(e),Ic]),FORM_PARAMETERS_STATE:e=>vr([yc.FORM_PARAMETERS(e),_c])},Sc={PLURAL:"/organizations",SINGLE:"/organization"},jc="delegations",vc={_BASE:"parameters",COMMON:{DESIGN:"design",INTEGRATION:"integration",EMAIL_TEMPLATES:"emails",SETTINGS:"settings"},EVENTS_SHOWCASE:{_BASE:"events-showcase"},MEMBERS_SPACE:{_BASE:"members-space"},DELEGATION_SPACE:{_BASE:"delegation-space"}},bc="blocked",Ac="expired",Cc={ORGANIZATIONS:Sc.PLURAL,ORGANIZATION:e=>vr([Sc.SINGLE,e])},Ec={ORGANIZATIONS:Cc.ORGANIZATIONS,ORGANIZATION:({organizationId:e})=>Cc.ORGANIZATION(e),ORGANIZATION_SETTINGS:e=>vr([Ec.ORGANIZATION(e),vc._BASE]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE:e=>vr([Ec.ORGANIZATION_SETTINGS(e),vc.EVENTS_SHOWCASE._BASE]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_DESIGN:e=>vr([Ec.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),vc.COMMON.DESIGN]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_INTEGRATION:e=>vr([Ec.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),vc.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_EVENTS_SHOWCASE_SETTINGS:e=>vr([Ec.ORGANIZATION_SETTINGS_EVENTS_SHOWCASE(e),vc.COMMON.SETTINGS]),ORGANIZATION_SETTINGS_MEMBERS_SPACE:e=>vr([Ec.ORGANIZATION_SETTINGS(e),vc.MEMBERS_SPACE._BASE]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_DESIGN:e=>vr([Ec.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),vc.COMMON.DESIGN]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_INTEGRATION:e=>vr([Ec.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),vc.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_EMAIL_TEMPLATES:e=>vr([Ec.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),vc.COMMON.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_MEMBERS_SPACE_SETTINGS:e=>vr([Ec.ORGANIZATION_SETTINGS_MEMBERS_SPACE(e),vc.COMMON.SETTINGS]),ORGANIZATION_SETTINGS_DELEGATION_SPACE:e=>vr([Ec.ORGANIZATION_SETTINGS(e),vc.DELEGATION_SPACE._BASE]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_DESIGN:e=>vr([Ec.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),vc.COMMON.DESIGN]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_INTEGRATION:e=>vr([Ec.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),vc.COMMON.INTEGRATION]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_EMAIL_TEMPLATES:e=>vr([Ec.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),vc.COMMON.EMAIL_TEMPLATES]),ORGANIZATION_SETTINGS_DELEGATION_SPACE_SETTINGS:e=>vr([Ec.ORGANIZATION_SETTINGS_DELEGATION_SPACE(e),vc.COMMON.SETTINGS]),ORGANIZATION_DELEGATIONS:e=>vr([Ec.ORGANIZATION(e),jc]),IS_BLOCKED:e=>vr([e,bc]),IS_EXPIRED:e=>vr([e,Ac]),ORGANIZATION_FORM:e=>yc.FORM(e)},Tc="evenements.handicap-international.fr",Mc="www.partagetapassion.com",Rc="communaute.rncb.fr",Dc="mariage.ravey.fr",Oc="registering.aso.fr",wc="billets.onepiecemarket.fr",Pc=[Tc,Mc,Rc,Dc,Oc,wc],$c={[Tc]:1792,[Mc]:858,[Rc]:1773,[Dc]:3306,[Oc]:3136,[wc]:3469},kc=new Map([[1792,Tc],[858,Mc],[1773,Rc],[3306,Dc],[3136,Oc],[3469,wc]]),Nc={PLURAL:"delegations-categories",SINGLE:"delegation-category"},zc={PLURAL:"delegations",SINGLE:"delegation"},Lc="accreditations",Fc="availabilities",Uc="positions",Bc={DELEGATIONS_CATEGORIES:Nc.PLURAL,DELEGATION_CATEGORY:e=>vr([Nc.SINGLE,e]),DELEGATIONS:zc.PLURAL,DELEGATION:e=>vr([zc.SINGLE,e])},Vc={DELEGATION_CATEGORY:({delegationCategoryId:e,...t})=>vr(["eventId"in t&&t.eventId?sc.EVENT(t):tc.COMMUNITY(t),Bc.DELEGATION_CATEGORY(e)]),DELEGATION_CATEGORY_DASHBOARD:e=>vr([Vc.DELEGATION_CATEGORY(e),Er.DASHBOARD]),DELEGATION_CATEGORY_MEMBERS:e=>vr([Vc.DELEGATION_CATEGORY(e),Er.MEMBERS]),DELEGATION_CATEGORY_UPDATE:e=>Or(Vc.DELEGATION_CATEGORY(e))},Gc={DELEGATIONS:e=>vr(["eventId"in e&&e.eventId?sc.EVENT(e):tc.COMMUNITY(e),Bc.DELEGATIONS]),DELEGATION:({delegationId:e,...t})=>vr(["eventId"in t&&t.eventId?sc.EVENT(t):tc.COMMUNITY(t),Bc.DELEGATION(e)]),DELEGATION_DASHBOARD:e=>vr([Gc.DELEGATION(e),Er.DASHBOARD]),DELEGATION_MEMBERS:e=>vr([Gc.DELEGATION(e),Er.MEMBERS]),DELEGATION_ACCREDITATIONS:e=>vr([Gc.DELEGATION(e),Lc]),DELEGATION_REPORTING:e=>vr([Gc.DELEGATION(e),Er.REPORTING]),DELEGATION_DOCUMENTS:e=>vr([Gc.DELEGATION(e),Er.DOCUMENTS]),DELEGATION_TAB:e=>vr([Gc.DELEGATION(e),e.slug]),DELEGATION_MEMBERS_IMPORT:e=>vr([Gc.DELEGATION(e),Cr.IMPORT]),DELEGATION_MEMBER:({userInfoId:e,slug:t,...n})=>vr([h(t)?Gc.DELEGATION_TAB({...n,slug:t}):Gc.DELEGATION_MEMBERS(n),Er.MEMBER,e]),DELEGATION_MEMBER_INFORMATION:e=>vr([Gc.DELEGATION_MEMBER(e),Er.INFORMATION]),DELEGATION_MEMBER_ACCREDITATIONS:e=>vr([Gc.DELEGATION_MEMBER(e),Lc]),DELEGATION_MEMBER_AVAILABILITIES:e=>vr([Gc.DELEGATION_MEMBER(e),Fc]),DELEGATION_MEMBER_POSITIONS:e=>vr([Gc.DELEGATION_MEMBER(e),Uc]),MEMBERS_INVITE:e=>vr([Gc.DELEGATION(e),Er.MEMBERS,Cr.INVITE]),MEMBER_CREATE:({formId:e,...t})=>Dr(vr([Gc.DELEGATION(t),Er.MEMBER,Er.FORM,e])),MEMBER_EDIT:({formId:e,...t})=>Or(vr([Gc.DELEGATION_MEMBER(t),Er.FORM,e])),DELEGATION_PROFILE:e=>vr([Gc.DELEGATION(e),Er.PROFILE]),FIELDS_EDIT:e=>Or(vr([Gc.DELEGATION(e),Ar.FIELDS.PLURAL])),DELEGATION_FORM:({delegationId:e,...t})=>vr([yc.FORM(t),Bc.DELEGATION(e)])},Wc={...Vc,...Gc},qc=(e,t)=>{t?.startsWith("/")||(console.warn(`Path '${t}' missing leading slash`),t="/"+t);const n=new Fi(ia.HEAVENT_PUBLIC_URL);return kc.has(e)&&(n.host=kc.get(e)),n.pathname+=t,n.href},Yc=({organizationId:e,eventId:t,delegationId:n,formId:i,teamCode:a,query:s})=>{const o=new Fi(ia.HEAVENT_PUBLIC_URL);return kc.has(e)&&(o.host=kc.get(e)),o.pathname+=`${(()=>{if(n)return"number"==typeof t?Wc.DELEGATION_FORM({organizationId:e,delegationId:n,eventId:t,formId:i}):Wc.DELEGATION_FORM({organizationId:e,delegationId:n,formId:i});{const n="number"==typeof t?sc.EVENT_FORM({organizationId:e,eventId:t,formId:i}):Ec.ORGANIZATION_FORM({organizationId:e,formId:i});return h(a)?`${n}/team/${a}`:n}})()}`,h(s?.email)&&o.searchParams.set("email",s.email),s?.preview&&o.searchParams.set("preview",s?.preview?.toString()),s?.previewState&&o.searchParams.set("state",s?.previewState?.toString()),o.href};var Hc;!function(e){e.QR="qr",e.Code39="code39"}(Hc||(Hc={}));const Zc=(e,t)=>{const n=new Fi(ia.HEAVENT_API_URL);return n.pathname+=`/barcode/${t?.barcodeType??Hc.QR}`,n.searchParams.set("text",e),n.searchParams.set("color",t?.color??"000000"),t?.height&&n.searchParams.set("height",t?.height?.toString()),t?.width&&n.searchParams.set("width",t?.width?.toString()),n.href};function Kc(e,t,n={}){const i=new Fi(ia.HEAVENT_API_URL);i.pathname+=`/documents/${e}.${t}`;const a=new URLSearchParams(Object.entries(n).filter(([e,t])=>h(t)));for(const[e,t]of a)i.searchParams.set(e,t);return i.href}var Qc=n(8389),Xc=n(8047),Jc=n(4757),eu=n(6452);function tu(e,t,n,i={}){const a=h(t.name)?t.name:"",s=e.toDisplayString(t.range,i.interval?.options),o=(0,go.A)([i.position?.includeName?n:"",a,i.slot?.includeRange||p(a)?s:"",i.position?.includeNameAtEnd?n:""]).join(" - ");return h(o)?o:n}function nu(e){return`${e.name}${h(e.acronym)?` (${e.acronym})`:""}`}function iu(e,t){const n=t[e.customField.slug];return"boolean"==typeof n&&e.customField.fieldType===ze.Checkbox?n===e.conditionValue:e.customField.fieldType===ze.Select&&e.customField.canSelectMultiple&&F(n)?(0,ml.A)(e.conditionValue,n??[]).length>0:e.customField.fieldType===ze.Select&&"number"==typeof n&&e.conditionValue.includes(n)}function au(e,t){if(!F(e?.conditionsCustomFields))return!0;switch(e.conditionsOperator){case ue.Or:return e.conditionsCustomFields.some(e=>iu(e,t));case ue.And:return e.conditionsCustomFields.every(e=>iu(e,t));default:return tr(e.conditionsOperator)}}function su(e){return h(e.address)}function ou(e){return po(e.latitude)&&po(e.longitude)}function ru(e){return su(e)||ou(e)}function lu(e){return(0,mo.A)(Object.values((0,Zd.A)(e,e=>e.position.name)).map(e=>{const t=e[0].positionCategory,n=e[0].position,i=e.map(e=>e.positionSlot.range.start.toMillis());return{id:n.id,category:t.name,text:h(n.acronym)?n.acronym:n.name,minDate:(0,eu.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,text:t,minDate:n})=>[e.toLowerCase(),t.toLowerCase(),n])}function du(e,t,n,i={}){const a=h(t.name)?t.name:"",s=t.date?h(i?.date?.format)?t.date.toFormat(i?.date?.format??""):e.toLocaleString(t.date,i?.date?.localeFormat||Ya.DateOnly.Numeric):"",o=(0,go.A)([i?.accreditation?.includeName?n:"",a,s,i?.accreditation?.includeNameAtEnd?n:""]).join(" - ");return h(o)?o:h(i?.defaultName)?i?.defaultName:n}function cu(e){return(0,mo.A)(e,e=>[e.date?.toMillis()??1,e.name.toLowerCase()])}function uu(e){return"production"===s.Development?1===e:3136===e}function mu(e={}){const t=_(e.firstName||"").trim();return`${_(e.lastName||"").trim().toUpperCase()} ${t}`.trim()}const gu=(e,t)=>e.split(t).map(e=>e.trim().length>0?e.trim()[0]:"").join("").substring(0,3),hu=[v.colors.success600.value,v.colors.blueGray600.value,v.colors.blueLight600.value,v.colors.purple600.value,v.colors.pink600.value,v.colors.warning600.value];function pu(e){const t=e.charCodeAt(0);return hu[t%hu.length]}const fu=/(\{([\w\.]+)\})/g,Iu=/^user\.(accreditations|accreditationsSlots|firstAccreditationSlot|lastAccreditationSlot|positions|assignments|firstAssignment|lastAssignment)\./,_u=/^\d+$/,xu="nodate",yu=Number.MAX_SAFE_INTEGER;let Su=class{fieldService;dateTimeService;intervalService;constructor(e,t,n){this.fieldService=e,this.dateTimeService=t,this.intervalService=n}renderText(e,t={},n="HTML"){const i=t.separator??"
",a=t.delegation?this.getDelegation(t.delegation,t):t.volunteerRegistration?.delegation?this.getDelegation(t.volunteerRegistration.delegation,t):void 0,s=this.getFormats(t),o=t.assignments?this.getAssignments(t.assignments,s):void 0,r=t.accreditations?this.getAccreditations(t.accreditations,s,t):void 0,l={organization:t.organization||void 0,event:t.event?this.getEvent(t.event,t):void 0,delegation:a,team:a,invitedBy:t?.invitedBy?this.getUser(t.invitedBy,null,t):void 0,recipient:t?.recipient?this.getUser(t.recipient,null,t):void 0,user:t.userInfo?{...this.getUser(t.userInfo,a,t),...this.getUserAccreditations(r??[]),...this.getUserAssignments(o??[])}:void 0,...o?this.getAssignmentsVariables(o,i):{},...r?this.getAccreditationsVariables(r,i,t):{},...t.extraInfos},d=("HTML"===n?this.replaceVariables(e,Xd(l)):(0,Yd.A)(e,{interpolate:/{([\s\S]+?)}/g})(l)).replace(fu,(e,n,i)=>{if(Iu.test(i))return"";const[a,s,o,r]=i.split("."),l=t?.userInfo?{lang:this.getLanguage(t.userInfo)}:{};if(8===r?.length?l.date=r:16===r?.length&&(l.date=r.substring(0,8),l.endDate=r.substring(8)),t.userInfo?.links){const e=t.userInfo.links;return i.includes("planningDays")?Kc(e.userPlanningDaysLink,"pdf",l):i.includes("planningList")?Kc(e.userPlanningListLink,"pdf",l):i.includes("planning")?Kc(e.userPlanningLink,"pdf",l):i.includes("assignments")?Kc(e.userAssignmentsLink,"pdf",l):i.includes("paris20kmassignment")&&e?.userCustomBadgeLinks[me.Paris20kmassignment]?Kc(e.userCustomBadgeLinks[me.Paris20kmassignment],"pdf",l):""}return""});return d}replaceVariables(e,t){return e.replace(fu,(e,n,i)=>{const a=Object.hasOwn(t,i)?t[i]:void 0;return void 0===a||Array.isArray(a)?e:String(a)})}getDelegation(e,t){const n=t.customFields||[],i=this.getFields(e.fields,n);return{...e,...i,leader:{email:e.leaders?.[0]?.email??"",firstName:e.leaders?.[0]?.firstName??"",lastName:e.leaders?.[0]?.lastName??"",phone:e.leaders?.[0]?.phone?.internationalFormat??""},formLink:Yc({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.id,formId:e.formId}),spaceLink:qc(e.organizationId,Mr(Ec.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId})))}}getEvent(e,t){const n=t.customFields||[],i=this.getFields(e.fields,n),a=t.organization?.dateFormat??"yyyy-MM-dd";return{id:e.id,name:e.name,...i,startDate:e.startAt?.toFormat(a)??"",endDate:e.endAt?.toFormat(a)??""}}getFormats(e){return{date:e.organization?.dateFormat||"yyyy-MM-dd",datetime:e.organization?.datetimeFormat||"yyyy-MM-dd HH:mm",time:e.organization?.timeFormat||"HH:mm"}}getAssignments(e,t){return(0,mo.A)(e,e=>e.positionSlot.range.start.toMillis()).map(({id:e,position:n,positionSlot:i})=>{const a=i.range.start,s=i.range.end,o={id:n.category.id,name:n.category.name};return{acronym:n.acronym??"",category:o,date:a.toFormat(t.date),dateKey:a.toFormat("yyyyMMdd"),dateLong:this.dateTimeService.toLocaleString(a,Ya.DateOnly.WeekdayLongMonthLong),endDate:s.toFormat(t.date),endDatetime:s.toFormat(t.datetime),id:e,leaders:this.getLeaders((0,_r.A)(n.category.leaders.concat(n.leaders),e=>e.userInfo.id)),name:n.name,position:{acronym:n.acronym??"",address:n.address??"",category:o,color:n.color,description:n.description,id:n.id,name:n.name},range:this.intervalService.toDisplayString(i.range,{formats:{displayWeekday:!0}}),slot:{durationHours:(0,Hd.A)(i.timeDifferenceMinutes/60,1),durationMinutes:i.timeDifferenceMinutes,endTime:s.toFormat(t.time),id:i.id,name:i.name,startTime:a.toFormat(t.time)},startDate:a.toFormat(t.date),startDatetime:a.toFormat(t.datetime)}})}getAssignmentsVariables(e,t){const n=Object.fromEntries(Object.values((0,Zd.A)(e,e=>e.dateKey)).map(e=>[`positions.${e[0].dateKey}`,(0,mo.A)((0,$a.A)(e.map(({position:e})=>e.name))).join(t)])),i=(0,Wo.A)(e,({slot:e})=>e.durationMinutes);return{assignmentsDays:(0,_r.A)(e,({dateKey:e})=>e).map(({dateLong:e})=>e).join(", "),positionsCategories:(0,mo.A)((0,$a.A)(e.map(({position:e})=>e.category.name))).join(", "),positions:(0,mo.A)((0,$a.A)(e.map(({position:e})=>e.name))).join(", "),volunteerMinutes:i,volunteerHours:(0,Hd.A)(i/60,1),...n}}getAccreditations(e,t,n){const i=!!n.organization&&uu(n.organization.id);return(0,mo.A)(e,e=>e.accreditationSlot.date?.isValid?e.accreditationSlot.date.toMillis():yu).map(({accreditation:e,accreditationCategory:n,accreditationSlot:a})=>{const s=a.date?.isValid??!1,o=t=>du(this.dateTimeService,a,e.name,{accreditation:{includeName:t},date:{localeFormat:Ya.DateOnly.WeekdayLongMonthLong}});return{accreditation:{acronym:e.acronym??"",address:e.address??"",color:e.color,description:e.description,icon:e.icon,id:e.id,name:e.name},acronym:e.acronym??"",category:{id:n.id,name:n.name},date:s?a.date.toFormat(t.date):"",dateKey:s?a.date.toFormat("yyyyMMdd"):xu,dateLong:s?this.dateTimeService.toLocaleString(a.date,Ya.DateOnly.WeekdayLongMonthLong):"",displayName:o(!i),fullName:o(!0),hasDate:s,name:e.name,slot:{id:a.id,name:a.name}}})}getAccreditationsVariables(e,t,n){const[i,a]=(0,Kd.A)(e,({hasDate:e})=>e),s=Object.values((0,Zd.A)(i,({dateKey:e})=>e)),o=Object.fromEntries(s.map(e=>[`accreditations.${e[0].dateKey}`,(0,mo.A)((0,$a.A)(e.map(({name:e})=>e))).join(t)])),r=Object.fromEntries(s.map(e=>[`accreditationsSlots.${e[0].dateKey}`,e.map(({fullName:e})=>e).join(t)]));return{accreditationsCategories:(0,mo.A)((0,$a.A)(e.map(({category:e})=>e.name))).join(t),accreditationsDates:(0,_r.A)(i,({dateKey:e})=>e).map(({dateLong:e})=>e).join(t),accreditationsText:(0,mo.A)((0,$a.A)(e.map(({name:e})=>e))).join(t),accreditationsSlots:(0,mo.A)(e.map(({displayName:e})=>e)).join(t),[`accreditations.${xu}`]:(0,mo.A)((0,$a.A)(a.map(({name:e})=>e))).join(t),[`accreditationsSlots.${xu}`]:(0,mo.A)((0,$a.A)(a.map(({fullName:e})=>e))).join(t),omFonction:this.getOmFonction(n),...o,...r}}getUserAccreditations(e){const t=this.getDistinct(e,e=>e.accreditation.id,(e,t,n)=>({...e.accreditation,category:e.category,firstSlot:t,lastSlot:n}),e=>this.getLastAccreditationSlot(e));return{accreditations:this.toKeyedItems(t,({acronym:e})=>e),accreditationsSlots:this.toKeyedItems(e),firstAccreditationSlot:e[0],lastAccreditationSlot:this.getLastAccreditationSlot(e)}}getUserAssignments(e){const t=this.getDistinct(e,e=>e.position.id,(e,t,n)=>({...e.position,firstSlot:t,lastSlot:n}),Ud.A);return{positions:this.toKeyedItems(t,({acronym:e})=>e),assignments:this.toKeyedItems(e),firstAssignment:e[0],lastAssignment:(0,Ud.A)(e)}}getDistinct(e,t,n,i){return(0,_r.A)(e,t).map(a=>{const s=e.filter(e=>t(e)===t(a));return n(a,s[0],i(s))})}getLastAccreditationSlot(e){return(0,Qd.A)(e,({hasDate:e})=>e)??(0,Ud.A)(e)}toKeyedItems(e,t){const n={};if(t)for(const i of e){const e=g(t(i),{replacer:o.Underscore});!h(e)||_u.test(e)||Object.hasOwn(n,e)||(n[e]=i)}return{...n,...Object.fromEntries(e.map((e,t)=>[`${t+1}`,e]))}}getOmFonction(e){return e.organization&&3953===e.organization.id?(e.accreditations??[]).find(e=>50851===e.accreditation.fields.cf74460)?.accreditation.name??e.userInfo?.fields?.cf73819?.value??"":""}getLeaders(e){return e.map(({userInfo:e})=>({email:e.email,firstName:e.firstName??"",lastName:e.lastName??"",name:e.name,phone:e.phone?.internationalFormat??""}))}getUser(e,t,n){const i=n.customFields||[],a=this.getFields(e.fields,i),s=this.getLanguage(e),o=s?{lang:s.toString()}:{},r=e.links?Kc(e.links.userAssignmentsLink,"pdf",o):"",l=e.links?Kc(e.links.userPlanningLink,"pdf",o):"",d=e.links?Kc(e.links.userPlanningListLink,"pdf",o):"",c=e.links?Kc(e.links.userPlanningDaysLink,"pdf",o):"",u=e.links?{assignments:r,badge:Kc(e.links.userBadgeLink,"pdf",o),certificate:Kc(e.links.userCertificateLink,"pdf",o),planning:l,planningList:d,planningDays:c,...Object.fromEntries(Object.entries(e.links.userCustomBadgeLinks).map(([e,t])=>[e.toLowerCase(),Kc(t,"pdf",o)])),...Object.fromEntries(Object.entries(e.links.userCustomDocumentLinks).map(([e,t])=>[e,Kc(t,"pdf",o)]))}:{},m=n.volunteerRegistration?.ticketId??"",g=(e.fields.isExpanded?e.fields?.firstName?.value:e.fields.firstName)||"",h=(e.fields.isExpanded?e.fields?.lastName?.value:e.fields.lastName)||"",p=`
\n \n
`;return{id:e.id,organizationLocalId:e.localId,localId:n.volunteerRegistration?.localId||"",email:e.email,...a,firstName:g,lastName:h,ticketId:m,qrcode:p,memberCode:n.volunteerRegistration?.weezevent?.memberCode||"",name:mu({firstName:g,lastName:h}),registrationDate:e.registrationDate?.toFormat(n.organization?.dateFormat??"yyyy-MM-dd")??"",registrationDatetime:e.registrationDate?.toFormat(n.organization?.datetimeFormat??"yyyy-MM-dd HH:mm")??"",assignmentSheet:n.event?r:"",documents:u,team:t,delegation:{...t,name:t?.name??"",leader:{email:t?.leader?.email??"",firstName:t?.leader?.firstName??"",lastName:t?.leader?.lastName??"",phone:t?.leader?.phone??""},spaceLink:t?.spaceLink??""},weezevent:{barcode:m,qrcode:p,identificationNumber:""},profile:n.volunteerRegistration?.accreditationProfile?.name??"",profileCategory:n.volunteerRegistration?.accreditationProfile?.accreditationProfileCategory.name??""}}getFields(e,t){return e.isExpanded?Object.fromEntries(Object.entries(e).flatMap(([e,{label:t,value:n}])=>{const i=F(n)?n.join(", "):h(n)?n:"";return(0,go.A)([[e,i],h(t)?[g(t,{replacer:o.Underscore}),i]:null])})):Object.fromEntries(t.flatMap(t=>{const n=this.fieldService.getValueString(t,e);return(0,go.A)([[t.slug,n],h(t.label)?[g(t.label,{replacer:o.Underscore}),n]:null])}))}getLanguage(e){return e.fields.isExpanded?e.fields?.language?.rawValue:e.fields?.language}};Su=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Sl,gl,Wd])],Su);var ju=n(7356);let vu=class{validate(e){return async t=>{try{return await e.validate(t,{abortEarly:!1,strict:!0}),{}}catch(e){return this.errorToObject(e)}}}validateSync(e,t){try{return e.validateSync(t,{abortEarly:!1,strict:!0}),{}}catch(e){return this.errorToObject(e)}}isValidSync(e,t){return 0===Object.keys(this.validateSync(e,t)).length}validateForForm(e){return async t=>{try{return await e.validate(t,{abortEarly:!1,strict:!0}),{}}catch(e){return e.inner.reduce((e,t)=>(0,ju.Oe)(e,t.path,t.message),{})}}}errorToObject(e){return e.inner.reduce((e,t)=>({...e,[t.path]:t.message}),{})}};function bu(e){return function(e){return!!e&&!Array.isArray(e)}(e)?e:Array.isArray(e)&&e.length>0?{operator:pt.And,groups:[{operator:pt.And,predicates:e}]}:{operator:pt.And,groups:[]}}function Au(e,t,n){return{...e,groups:e.groups.map((e,i)=>i===t?n(e):e)}}function Cu(e,t,n){const i=e.groups[t];return i&&1===i.predicates.length&&0===n?Eu(e,t):Au(e,t,e=>({...e,predicates:e.predicates.filter((e,t)=>t!==n)}))}function Eu(e,t){return{...e,groups:e.groups.filter((e,n)=>n!==t)}}vu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)()],vu);const Tu=["formsInsertedAt","campaignSentAt"];function Mu(e){return Tu.includes(e)}function Ru(e){return Mu(e.slug)?{...e,value:e.value2,value2:e.value3,value3:e.value}:e}function Du(e){return Mu(e.slug)?{...e,value:e.value3,value2:e.value,value3:e.value2}:e}const Ou=[ze.Date,ze.Number,ze.Text,ze.Textarea],wu=[ze.Phone,ze.Select,ze.Text,ze.Textarea];function Pu(e,t){const n=new Map(t.map(e=>[e.slug,e]));return{operator:e.operator,groups:e.groups.map((e,t)=>({operator:e.operator,groupIndex:t,filtersPredicates:e.predicates.flatMap((e,i)=>{const a=n.get(e.slug);return a?[{filter:a,predicate:e,groupIndex:t,predicateIndex:i}]:[]})})).filter(e=>e.filtersPredicates.length>0)}}function $u(e){return e.groups.flatMap(e=>e.filtersPredicates)}function ku(e,t){return F(e.values)?e.values.map(({id:e,name:n})=>(0,i.jsx)("option",{value:e,children:t(n)},e)):F(e.valuesGroups)?e.valuesGroups.map(({name:e,values:t},n)=>(0,i.jsx)("optgroup",{label:e,children:t.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},n)):[]}let Nu=class extends So{countriesService;dateTimeService;constructor(e,t,n){super(n),this.countriesService=e,this.dateTimeService=t}filterPredicateToText(e){const{filter:t}=e,n=e.predicate&&Ru(e.predicate);if(!n)return"";{const i=wa.c9.isDateTime(n.value)?n.value:h(n.value)?wa.c9.fromISO(n.value,{zone:"utc",setZone:!0}):wa.c9.invalid("Not valid predicate.value"),a=!i.isValid||t.fieldType!==Ue.DateTimeRange&&t.fieldType!==Ue.Datetime?i.isValid&&t.fieldType===Ue.Date?this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong):n.value:this.dateTimeService.toLocaleString(i,Ya.DateTime),s=wa.c9.isDateTime(n.value2)?n.value2:h(n.value2)?wa.c9.fromISO(n.value2,{zone:"utc",setZone:!0}):wa.c9.invalid("Not valid predicate.value2"),o=!s.isValid||t.fieldType!==Ue.DateTimeRange&&t.fieldType!==Ue.Datetime?s.isValid&&t.fieldType===Ue.Date?this.dateTimeService.toLocaleString(s,Ya.DateOnly.MonthLong):n.value2:this.dateTimeService.toLocaleString(s,Ya.DateTime),r=n.value3;switch(n.operator){case ht.Contains:return"condition"===t.slug?this.conditionFilterToString(e):"wishedPositions"===t.slug?this.t("mission_souhait_38008",o,this.valueToString(t,a)):"wishedPositionsCategories"===t.slug?this.t("cat_gorie_souha_24744",o,this.valueToString(t,a)):"isDelegationLeader"===t.slug?this.t("est_responsable_13012",this.valueToString(t,a)):this.t("_1_contient_2_40552",t.name,a);case ht.NotContains:return this.t("_1_ne_contient_14612",t.name,a);case ht.Is:if("isLeader"===t.slug)return this.t("est_responsable_19679");if("isPositionLeader"===t.slug)return this.t("est_responsable_27270");if("isPositionCategoryLeader"===t.slug)return this.t("est_responsable_72923");if("isDelegationLeader"===t.slug)return this.t("est_responsable_87662");if("privacy"===t.slug)return this.t("visibilit_est_12738");if("campaign"===t.slug)return this.campaignFilterToString(e);if("campaignReply"===t.slug)return this.campaignReplyFilterToString(e);if("condition"===t.slug)return this.t("champ_dont_un_a_44854");if("numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug)return this.t("_1_pour_la_jou_73174",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o);if(t.fieldType===Ue.Date)return this.t("_1_est_gal_43375",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Ue.Datetime||t.fieldType===Ue.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong):n.value;return this.t("_1_est_gal_43375",t.name,e)}return this.t("_1_est_gal_43375",t.name,this.valueToString(t,a));case ht.IsNot:if("isLeader"===t.slug)return this.t("n_est_pas_respo_55625");if("isPositionLeader"===t.slug)return this.t("n_est_pas_respo_35508");if("isPositionCategoryLeader"===t.slug)return this.t("n_est_pas_respo_07811");if("isDelegationLeader"===t.slug)return this.t("n_est_pas_respo_91275");if("privacy"===t.slug)return this.t("visibilit_est_55411");if("condition"===t.slug)return this.t("champ_d_pendant_33676");if("numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug)return this.t("_1_pour_la_jou_61197",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o);if(t.fieldType===Ue.Date)return this.t("_1_n_est_pas_38478",t.name,this.valueDateToString(n.valueDate));if(t.fieldType===Ue.Datetime||t.fieldType===Ue.DateTimeRange){const e=i?.isValid?this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong):n.value;return this.t("_1_n_est_pas_38478",t.name,e)}return this.t("_1_n_est_pas_38478",t.name,this.valueToString(t,a));case ht.IsEmpty:return this.t("_1_est_vide_08225",t.name);case ht.IsNotEmpty:return this.t("_1_n_est_pas_v_31530",t.name);case ht.IsValid:return this.t("_1_est_valide_45209",t.name);case ht.IsNotValid:return this.t("_1_n_est_pas_v_05077",t.name);case ht.GreaterThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_91055",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o):this.t("_1_est_plus_gr_93527",t.name,n.value);case ht.GreaterThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_41388",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o):this.t("_1_est_gal_ou_95771",t.name,n.value);case ht.LessThan:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_99548",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o):this.t("_1_est_plus_pe_18306",t.name,n.value);case ht.LessThanEqual:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_37455",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o):this.t("_1_est_gal_ou_39305",t.name,n.value);case ht.Overlaps:return this.t("_1_chevauche_45834",t.name,a,o);case ht.NotOverlaps:return this.t("_1_ne_chevauch_01846",t.name,a,o);case ht.Engulfs:return this.t("_1_engloutis_32228",t.name,a,o);case ht.NotEngulfs:return this.t("_1_n_engloutis_52951",t.name,a,o);case ht.EngulfedBy:return this.t("_1_est_englout_36064",t.name,a,o);case ht.NotEngulfedBy:return this.t("_1_n_est_pas_e_89161",t.name,a,o);case ht.IsBefore:return this.t("_1_est_avant_l_83271",t.name,a);case ht.IsAfter:return this.t("_1_est_apr_s_l_63712",t.name,a);case ht.Between:return"numberOfAssignmentsPerDay"===t.slug||"volunteersMinutesDays"===t.slug?this.t("_1_pour_la_jou_66546",t.name,this.dateTimeService.toLocaleString(i,Ya.DateOnly.MonthLong),o,r):this.t("_1_est_entre_39871",t.name,a,o);case ht.StartsWith:return this.t("_1_commence_pa_47720",t.name,a);case ht.EndsWith:return this.t("_1_finit_par_65840",t.name,a);case ht.ThisDayMonth:return this.t("_1_est_aujourd_09227",t.name);case ht.Today:return this.t("_1_est_aujourd_42954",t.name);case ht.IsInLast:return this.t("_1_est_dans_le_96995",t.name,a);case ht.IsMoreThanAgo:return this.t("_1_est_il_y_a_01320",t.name,a);case ht.IsInNext:return this.t("_1_est_dans_le_19106",t.name,a);case ht.IsMoreThanAhead:return this.t("_1_est_dans_pl_88491",t.name,a);default:return tr(n.operator)}}}getValues(e){return e.fieldType===ze.Sex?li.map(e=>({id:e,name:this.t(e)})):e.fieldType===ze.Language?e.fieldProperty===ke.Language?el.map(e=>({id:e,name:this.t(e)})):qn.map(e=>({id:e,name:this.t(e)})):e.fieldType===ze.Nationality?this.countriesService.getNationalitiesIdName():e.fieldType===ze.Country?this.countriesService.getCountriesIdName():e.fieldType===ze.Select&&F(e.values)?e.values.map(({id:e,value:t})=>({id:e,name:t})):[]}valueToString(e,t){const n=function(e){return F(e.values)?e.values:F(e.valuesGroups)?e.valuesGroups.flatMap(e=>e.values):[]}(e);return F(n)?L(t).map(e=>this.t(n.find(({id:t})=>t===e)?.name??e)).join(` ${this.t("ou_67404")} `):this.t(t)}valueDateToString(e){const t=[];return"number"==typeof e?.day&&-1!==e.day&&t.push(e.day),"number"==typeof e?.month&&-1!==e.month&&t.push(this.dateTimeService.toLocaleString(wa.c9.now().set({month:e.month}),{month:"long"})),"number"==typeof e?.year&&-1!==e.year&&t.push(e.year),t.join(" ")}conditionFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.values?.find(e=>e.id===t)?.name??"");return 1===t.length?this.t("d_pend_du_champ_43516",t[0]):this.t("d_pend_des_cham_85348",t.join(", "))}return""}campaignFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.campaigns?.find(e=>e.id===t)?.name??"").join(", "),n=e.predicate.value2.map(e=>this.t(e)).join(", ");return this.t("a_re_u_un_messa_76546",t,n)}return""}campaignReplyFilterToString(e){if(e.predicate){const t=e.predicate.value.map(t=>e.filter.campaigns?.find(e=>e.id===t)?.name??"").join(", ");return this.t("la_r_ponse_des_14160",t,e.predicate.value2)}return""}customFieldsToFilters(e){return e.filter(({fieldType:e})=>[Ue.Address,Ue.Checkbox,Ue.Country,Ue.Date,Ue.Datetime,Ue.File,Ue.Language,Ue.Nationality,Ue.Number,Ue.Phone,Ue.Select,Ue.Sex,Ue.Text,Ue.Textarea,Ue.Validation].includes(e)).map(e=>({...e,category:this.t("champs_de_formu_64126"),fieldType:e.fieldType,values:this.getValues(e),color:"warning",isEncrypted:e.isEncrypted}))}customFieldsToPossibleColumns(e){return e.map(e=>({slug:e.slug,name:e.name,label:e.label,customField:e,isSearchable:wu.includes(e.fieldType),isSortable:!!Ou.includes(e.fieldType)||e.fieldType===ze.Select&&e.isSelectV2&&!e.canSelectMultiple,sortAttribute:e.slug,width:e.fileType===Fe.Picture?80:void 0,minWidth:e.fileType===Fe.Picture?void 0:180}))}};Nu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Nu);var zu;!function(e){e.Acronym="acronym",e.Address="address",e.AutoAccredit="autoAccredit",e.Category="category",e.Color="color",e.Conditions="conditions",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.FillingRate="fillingRate",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Index="index",e.Latitude="latitude",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.MaxResources="maxResources",e.AssignedResources="resources",e.Slot="slot",e.SlotDate="slotDate",e.SlotName="slotName",e.ScannedResources="scannedResources",e.WishedResources="wishedResources",e.Tags="tags",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized"}(zu||(zu={}));let Lu=class extends Nu{constructor(e,t,n){super(e,t,n)}getAccreditationsFilters(e,t){return(0,go.A)([{slug:"name",name:this.t("AccreditationName"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text,hideEmpty:!0},{slug:"accreditation",name:this.t("Accreditation"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:zu.Description,name:this.t("Description"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:zu.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},F(e.accreditationsCategories)?{slug:"accreditationCategory",name:this.t("cat_gorie_00291"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,values:(0,mo.A)(e.accreditationsCategories,e=>m(e.name)),hideEmpty:!0}:null,{slug:"slotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:"slotDate",name:this.t("Date"),category:this.t("accr_ditations_39450"),fieldType:Ue.Date},{slug:"tag",name:"Tag",category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:wt.Accreditations},{slug:"accreditationCustomField",name:this.t("condition_61066"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId},{slug:"acronym",name:this.t("Acronym"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:"color",name:this.t("Color"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,values:Gn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("accr_ditations_39450"),fieldType:Ue.Text},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number,hideEmpty:!0},{slug:zu.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:zu.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("accr_ditations_39450"),fieldType:Ue.Datetime,hideEmpty:!0},e.isWeezeventConnected?{slug:zu.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number}:null,...this.customFieldsToFilters(t)])}getAccreditationsPossibleColumns(e,{isWeezeventConnected:t}){const n=[{slug:zu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:X.Id,width:100},{slug:zu.Name,name:this.t("AccreditationName"),isSearchable:!0,isSortable:!0,sortAttribute:X.Name,minWidth:240},{slug:zu.Description,name:this.t("Description"),minWidth:320},{slug:zu.Category,name:this.t("nom_de_la_cat_g_03860"),isSearchable:!0,isSortable:!0,sortAttribute:X.Category,minWidth:240},{slug:zu.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:240},{slug:zu.SlotDate,name:this.t("Date"),minWidth:180,isSortable:!0,sortAttribute:Q.Date},{slug:zu.AssignedResources,name:this.t("membres_11310"),minWidth:320},{slug:zu.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:zu.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:zu.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:zu.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:zu.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:zu.Acronym,name:this.t("Acronym"),isSearchable:!0,isSortable:!0,sortAttribute:X.Acronym,minWidth:180},{slug:zu.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:zu.Icon,name:this.t("ic_ne_55554"),width:80},{slug:zu.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:zu.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:zu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:zu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:X.CreatedAt,minWidth:180},{slug:zu.AutoAccredit,name:this.t("AutoAccredit"),minWidth:180},{slug:zu.Index,name:this.t("Index"),isSortable:!0,sortAttribute:X.Index,width:200}];return t&&n.push({slug:zu.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:zu.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(e))}};Lu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Lu);var Fu;!function(e){e.Accreditation="accreditation",e.Accreditations="accreditations",e.AccreditationProfile="accreditation_profile",e.AccreditationSlot="accreditationSlotId",e.Acronym="acronym",e.Category="category",e.Color="color",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Name="name"}(Fu||(Fu={}));let Uu=class extends Nu{constructor(e,t,n){super(e,t,n)}getAccreditationsProfilesFilters(e){const t=this.t("profils_d_accr_27825");return[{slug:Fu.Name,name:this.t("nom_08311"),category:t,fieldType:Ue.Text,hideEmpty:!0},{slug:Fu.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},...F(e.accreditationsProfilesCategories)?[{slug:Fu.Category,name:this.t("cat_gorie_00291"),category:t,fieldType:Ue.Select,values:(0,mo.A)(e.accreditationsProfilesCategories,e=>m(e.name)),hideEmpty:!0}]:[],{slug:Fu.Description,name:this.t("Description"),category:t,fieldType:Ue.Text},{slug:Fu.Accreditation,name:this.t("Accreditation"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Fu.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:Fu.Acronym,name:this.t("Acronym"),category:t,fieldType:Ue.Text},{slug:Fu.Color,name:this.t("Color"),category:t,fieldType:Ue.Text,hideEmpty:!0},{slug:Fu.Icon,name:this.t("ic_ne_55554"),category:t,fieldType:Ue.Select,values:Gn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:Fu.CreatedBy,name:this.t("cr_e_par_30622"),category:t,fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:Fu.CreatedAt,name:this.t("cr_e_le_02658"),category:t,fieldType:Ue.Datetime,hideEmpty:!0}]}getAccreditationsProfilesPossibleColumns(){return[{slug:Fu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:K.Id},{slug:Fu.Name,name:this.t("nom_08311"),isSearchable:!0,isSortable:!0,sortAttribute:K.Name,minWidth:240},{slug:Fu.Description,name:this.t("Description"),minWidth:320},{slug:Fu.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:K.Category,minWidth:200},{slug:Fu.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:Fu.Acronym,name:this.t("Acronym"),isSearchable:!0,minWidth:160},{slug:zu.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:zu.Icon,name:this.t("ic_ne_55554"),width:80},{slug:zu.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:Fu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Fu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:K.CreatedAt,minWidth:180}]}};Uu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Uu);var Bu;!function(e){e.Features="features",e.Id="id",e.InsertedAt="insertedAt",e.MembersLimit="membersLimit",e.Name="name",e.NumberOfEvents="numberOfEvents",e.NumberOfMembers="numberOfMembers",e.PeriodEndAt="periodEndAt",e.PricePerMember="pricePerMember",e.WeezeventOrganizationId="weezeventOrganizationId"}(Bu||(Bu={}));let Vu=class extends Nu{constructor(e,t,n){super(e,t,n)}getFilters(){return[{slug:"features",name:this.t("fonctionnalit_s_47714"),category:this.t("organisation_71863"),fieldType:Ue.Select,values:zn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_admin_98471"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"isActive",name:this.t("est_active_05309"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"useOldBilling",name:this.t("utilise_l_ancie_27299"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox},{slug:"isOverLimit",name:this.t("d_passe_la_limi_27046"),category:this.t("organisation_71863"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:Bu.MembersLimit,name:this.t("nombre_de_membr_16400"),category:this.t("organisation_71863"),fieldType:Ue.Number},{slug:Bu.PricePerMember,name:this.t("prix_par_membre_20633"),category:this.t("organisation_71863"),fieldType:Ue.Number}]}getPossibleColumns(){return[{slug:Bu.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:it.Id,width:100},{slug:Bu.Name,name:this.t("nom_de_l_organi_49583"),minWidth:240},{slug:Bu.InsertedAt,name:this.t("date_de_cr_atio_00749"),isSortable:!0,sortAttribute:it.InsertedAt,width:200},{slug:Bu.PeriodEndAt,name:this.t("date_de_fin_de_17750"),isSortable:!0,sortAttribute:it.PeriodEndAt,width:200},{slug:Bu.Features,name:this.t("fonctionnalit_s_47714"),minWidth:320},{slug:Bu.NumberOfEvents,name:this.t("nombre_d_v_nem_14214"),minWidth:180},{slug:Bu.NumberOfMembers,name:this.t("nombre_de_membr_49522"),minWidth:180},{slug:Bu.MembersLimit,name:this.t("nombre_de_membr_16400"),minWidth:180},{slug:Bu.PricePerMember,name:this.t("prix_par_membre_20633"),minWidth:180},{slug:Bu.WeezeventOrganizationId,name:this.t("id_de_l_organis_67465"),isSortable:!0,sortAttribute:it.WeezeventOrganizationId,width:100}]}};Vu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Vu);let Gu=class extends Nu{constructor(e,t,n){super(e,t,n)}getCampaignsFilters(e){return[{slug:"state",name:this.t("State"),category:this.t("Campaigns"),fieldType:Ue.Select,values:Rn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"campaign_type",name:this.t("type_35427"),category:this.t("Campaigns"),fieldType:Ue.Select,values:Dn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"created_by",name:this.t("cr_e_par_30622"),category:this.t("Campaigns"),fieldType:Ue.Select,values:e.map(e=>({id:e.userId,name:e.nameOrEmail})),hideEmpty:!0},{slug:"sent_at",name:this.t("envoy_le_60398"),category:this.t("Campaigns"),fieldType:Ue.Date,hideEmpty:!0}]}};Gu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Gu);let Wu=class extends Nu{constructor(e,t,n){super(e,t,n)}getCustomFieldsFilters(e,t,n){return[{slug:"name",name:this.t("nom_du_champ_48329"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text,hideEmpty:!0},{slug:"label",name:this.t("label_08243"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text},{slug:"customFieldCategory",name:this.t("cat_gorie_00291"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:(0,mo.A)(n.customFieldsCategories.nodes,e=>m(e.name)),hideEmpty:!0},{slug:"fieldType",name:this.t("type_35427"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:Fn.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"variety",name:this.t("typologie_34041"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:(0,mo.A)(Pn.filter(e=>!t||e!==fe.Event).map(e=>({id:e,name:ar(this.t.bind(this),e)})),({name:e})=>e),hideEmpty:!0},{slug:"privacy",name:this.t("Privacy"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"condition",name:this.t("condition_61066"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,values:n.customFields.nodes},{slug:"isEncrypted",name:this.t("est_chiffr_99072"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"hasValidationRules",name:this.t("r_gles_de_valid_33082"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"createdBy",name:this.t("cr_e_par_30622"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"createdAt",name:this.t("cr_e_le_02658"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Datetime,hideEmpty:!0}]}getCustomFieldsPossibleColumns(){return[{slug:"id",name:this.t("id_51738"),isSortable:!0,sortAttribute:pe.Id,width:100},{slug:"name",name:this.t("nom_du_champ_48329"),isSortable:!0,sortAttribute:pe.Name,minWidth:240},{slug:"label",name:this.t("label_08243"),isSortable:!0,sortAttribute:pe.Label,minWidth:180},{slug:"category",name:this.t("Category"),isSortable:!0,sortAttribute:pe.Category,minWidth:240},{slug:"variety",name:this.t("typologie_34041"),minWidth:180},{slug:"fieldType",name:this.t("type_35427"),isSortable:!0,sortAttribute:pe.Type,width:250},{slug:"numberOfTimesUsed",name:this.t("nombre_d_utilis_58389"),width:200},{slug:"state",name:this.t("Privacy"),isSortable:!0,sortAttribute:pe.Status,width:200},{slug:"values",name:this.t("valeurs_34314"),minWidth:240},{slug:"variable",name:this.t("variable_pour_l_45711"),minWidth:180},{slug:"isEncrypted",name:this.t("est_chiffr_99072"),width:200},{slug:"createdBy",name:this.t("cr_par_41994"),minWidth:180},{slug:"createdAt",name:this.t("cr_le_85046"),isSortable:!0,sortAttribute:pe.CreatedAt,minWidth:180}]}};Wu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Wu);var qu;!function(e){e.Accreditation="accreditation",e.AccreditationProfile="accreditation_profile",e.Accreditations="accreditations",e.AccreditationSlot="accreditationSlotId",e.AccreditationsProfiles="accreditationsProfiles",e.AssignedResources="resources",e.Campaigns="campaigns",e.CanLeadersAddMembers="canLeadersAddMembers",e.CanLeadersDeleteMembers="canLeadersDeleteMembers",e.CanLeadersDuplicateMembers="canLeadersDuplicateMembers",e.CanLeadersEditColumns="canLeadersEditColumns",e.CanLeadersEditCustomFields="canLeadersEditCustomFields",e.CanLeadersEditMembers="canLeadersEditMembers",e.CanLeadersImportMembers="canLeadersImportMembers",e.CanLeadersSeeHiddenAccreditationsSlots="canLeadersSeeHiddenAccreditationsSlots",e.CategoryLeaders="categoryLeaders",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.DeadlineDate="deadlineDate",e.DelegationCategory="delegationCategory",e.DelegationSpaceLink="delegationSpaceLink",e.DelegationsSpaceLayout="delegationsSpaceLayout",e.Description="description",e.Documents="documents",e.Events="events",e.FillingRate="fillingRate",e.Form="form",e.FormLink="formLink",e.Id="id",e.IsLocked="isLocked",e.Leaders="leaders",e.MaxResources="maxResources",e.Name="name",e.Parent="parent",e.PrivateNote="privateNote",e.ShowAllAccreditations="showAllAccreditations",e.ShowFormLinkInDelegationSpace="showFormLinkInDelegationSpace",e.ShowInDelegation="showInDelegation",e.State="delegationState",e.Tags="tags",e.UsedCustomFieldsFilled="usedCustomFieldsFilled"}(qu||(qu={}));let Yu=class extends Nu{constructor(e,t,n){super(e,t,n)}getDelegationsFilters(e,t,n,i){return(0,go.A)([{slug:qu.Name,name:this.t("nom_de_la_d_l_g_28087"),category:this.t("d_l_gations_78318"),fieldType:Ue.Text,hideEmpty:!0},{slug:qu.Description,name:this.t("Description"),category:this.t("d_l_gations_78318"),fieldType:Ue.Text},{slug:qu.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("d_l_gations_78318"),fieldType:Ue.Text},F(i)?{slug:qu.DelegationCategory,name:this.t("cat_gorie_00291"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,values:(0,mo.A)(i,e=>m(e.name)),hideEmpty:!0}:null,{slug:"delegationState",name:this.t("State"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,values:$n.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:qu.CategoryLeaders,name:this.t("responsables_de_22220"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t},{slug:qu.Leaders,name:this.t("responsables_de_03381"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"leadersEmailSend",name:this.t("les_responsable_08257"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"form",name:this.t("Form"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"deadlineDate",name:this.t("date_limite_d_i_79779"),category:this.t("d_l_gations_78318"),fieldType:Ue.Date},{slug:qu.MaxResources,name:this.t("MaxResources"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number},{slug:"tag",name:this.t("Tag"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:wt.Delegations},{slug:"resources",name:this.t("nombre_de_membr_08851"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number,hideEmpty:!0},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number,hideEmpty:!0},{slug:qu.ShowInDelegation,name:this.t("ShowInDelegationSpace"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersDuplicateMembers,name:this.t("CanLeadersDuplicateMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:qu.ShowAllAccreditations,name:this.t("ShowAllAccreditations"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},t?{slug:qu.DelegationsSpaceLayout,name:this.t("DelegationsSpaceLayout"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,t?{slug:qu.Accreditation,name:this.t("accr_ditations_39450"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,t?{slug:qu.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,t?{slug:qu.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t}:null,{slug:qu.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:qu.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("d_l_gations_78318"),fieldType:Ue.Datetime,hideEmpty:!0},t?{slug:"parent",name:this.t("est_li_e_une_48471"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0}:{slug:"event",name:this.t("_v_nement_22345"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:qu.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(n)])}getDelegationsPossibleColumns(e,t){return[{slug:qu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:ye.Id,width:100},{slug:qu.Name,name:this.t("nom_de_la_d_l_g_28087"),isSearchable:!0,isSortable:!0,sortAttribute:ye.Name,minWidth:240},{slug:qu.Description,name:this.t("Description"),minWidth:320},{slug:qu.DelegationCategory,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:ye.Category,minWidth:240},{slug:qu.State,name:this.t("State"),minWidth:180},{slug:qu.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320},{slug:qu.Leaders,name:this.t("responsables_de_03381"),isSearchable:!0,minWidth:320},{slug:qu.Form,name:this.t("Form"),isSearchable:!0,minWidth:180},{slug:qu.FormLink,name:this.t("FormLink"),minWidth:240},{slug:qu.DelegationSpaceLink,name:this.t("DelegationSpaceLink"),minWidth:240},{slug:qu.DelegationsSpaceLayout,name:this.t("DelegationsSpaceLayout"),minWidth:240},{slug:qu.DeadlineDate,name:this.t("date_limite_d_i_79779"),minWidth:180},{slug:qu.MaxResources,name:this.t("MaxResources"),minWidth:180,isSortable:!0,sortAttribute:ye.MaxResources},{slug:qu.AssignedResources,name:this.t("membres_11310"),minWidth:240},{slug:qu.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:240},{slug:qu.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:qu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:qu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:ye.CreatedAt,minWidth:180},{slug:qu.ShowInDelegation,name:this.t("ShowInDelegationSpace"),minWidth:180},{slug:qu.CanLeadersAddMembers,name:this.t("CanLeadersAddMembers"),minWidth:180},{slug:qu.CanLeadersEditMembers,name:this.t("CanLeadersEditMembers"),minWidth:180},{slug:qu.CanLeadersDeleteMembers,name:this.t("CanLeadersDeleteMembers"),minWidth:180},{slug:qu.CanLeadersDuplicateMembers,name:this.t("CanLeadersDuplicateMembers"),minWidth:180},{slug:qu.CanLeadersEditColumns,name:this.t("CanLeadersEditColumns"),minWidth:180},{slug:qu.CanLeadersEditCustomFields,name:this.t("CanLeadersEditCustomFields"),minWidth:180},{slug:qu.CanLeadersImportMembers,name:this.t("CanLeadersImportMembers"),minWidth:180},{slug:qu.CanLeadersSeeHiddenAccreditationsSlots,name:this.t("CanLeadersSeeHiddenAccreditationsSlots"),minWidth:180},{slug:qu.ShowFormLinkInDelegationSpace,name:this.t("afficher_le_lie_05841"),minWidth:180},{slug:qu.ShowAllAccreditations,name:this.t("ShowAllAccreditations"),minWidth:180},{slug:qu.IsLocked,name:this.t("IsLocked"),minWidth:180},e?{slug:qu.Parent,name:this.t("d_l_gation_de_l_86100"),minWidth:320}:{slug:qu.Events,name:this.t("_v_nements_53672"),minWidth:320},...e?[{slug:qu.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:qu.AccreditationsProfiles,name:this.t("profils_d_accr_27825"),minWidth:320}]:[],{slug:qu.Campaigns,name:this.t("campagnes_que_l_81468"),minWidth:320},{slug:qu.Documents,name:this.t("documents_que_l_18755"),minWidth:320},{slug:qu.UsedCustomFieldsFilled,name:this.t("champs_personna_27238"),minWidth:180},...this.customFieldsToPossibleColumns(t)]}};Yu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Yu);var Hu;!function(e){e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.EndAt="endAt",e.Id="id",e.Name="name",e.NumberOfMembers="numberOfMembers",e.NumberOfMembersAccredited="numberOfMembersAccredited",e.NumberOfMembersAssigned="numberOfMembersAssigned",e.StartAt="startAt",e.State="state",e.Tags="tags"}(Hu||(Hu={}));let Zu=class extends Nu{constructor(e,t,n){super(e,t,n)}getEventsFilters(e,t){return[{slug:"name",name:this.t("nom_de_l_v_nem_08711"),category:this.t("Event"),fieldType:Ue.Text,hideEmpty:!0},{slug:Hu.Description,name:this.t("Description"),category:this.t("Event"),fieldType:Ue.Text},{slug:"startAt",name:this.t("date_de_d_but_43380"),category:this.t("Event"),fieldType:Ue.Date,hideEmpty:!0},{slug:"endAt",name:this.t("date_de_fin_86920"),category:this.t("Event"),fieldType:Ue.Date,hideEmpty:!0},{slug:"state",name:this.t("State"),category:this.t("Event"),fieldType:Ue.Select,values:[{id:Oe.Ongoing,name:this.t(Oe.Ongoing)},{id:Oe.Upcoming,name:this.t(Oe.Upcoming)},{id:Oe.Done,name:this.t(Oe.Done)}],hideEmpty:!0},{slug:"tag",name:this.t("Tag"),category:this.t("Event"),fieldType:Ue.Select,needLoading:!0,organizationId:e,tagContext:wt.Events},{slug:Hu.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("Event"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:Hu.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("Event"),fieldType:Ue.Datetime,hideEmpty:!0},...this.customFieldsToFilters(t)]}getEventPossibleColumns(e){return[{slug:Hu.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:De.Id,width:100},{slug:Hu.Name,name:this.t("nom_de_l_v_nem_08711"),isSearchable:!0,isSortable:!0,sortAttribute:De.Name,minWidth:240},{slug:Hu.Description,name:this.t("Description"),minWidth:320},{slug:Hu.StartAt,name:this.t("date_de_d_but_43380"),isSortable:!0,sortAttribute:De.StartAt,minWidth:180},{slug:Hu.EndAt,name:this.t("date_de_fin_86920"),isSortable:!0,sortAttribute:De.EndAt,minWidth:180},{slug:Hu.State,name:this.t("State"),minWidth:180},{slug:Hu.Tags,name:this.t("tags_79499"),minWidth:320},{slug:Hu.NumberOfMembers,name:this.t("nombre_de_membr_08851"),minWidth:180},{slug:Hu.NumberOfMembersAssigned,name:this.t("nombre_de_membr_87779_plural"),minWidth:180},{slug:Hu.NumberOfMembersAccredited,name:this.t("nombre_de_membr_25913"),minWidth:180},{slug:Hu.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:Hu.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:De.CreatedAt,minWidth:180}].concat(this.customFieldsToPossibleColumns(e))}};Zu=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],Zu);const Ku="custom_document_";function Qu(e){return`${Ku}${e}`}function Xu(e){return e.startsWith(Ku)}function Ju(e,t){return 0===e.length||F((0,ml.A)(e,L(t)))}var em;!function(e){e.Delegation="delegation",e.Event="event",e.Id="id",e.Name="name",e.TicketId="ticket_id"}(em||(em={}));const tm=[{slug:"cf80691",valueId:61410},{slug:"cf80691",valueId:61409}];function nm({slug:e,valueId:t}){return`custom_field_value_${e}_${t}`}let im=class extends Nu{constructor(e,t,n){super(e,t,n)}getPossibleColumns(e,t){return[{slug:em.Id,name:this.t("id_51738"),isSortable:!0,sortAttribute:Gt.Id,width:100},{slug:em.Name,name:this.t("nom_08311"),isSortable:!0,sortAttribute:Gt.Name,minWidth:280},{slug:em.Event,name:this.t("_v_nement_22345"),minWidth:240},{slug:em.TicketId,name:this.t("TicketId"),width:200},...this.getCustomDocumentsColumns(t),...this.getCustomFieldsValuesColumns(e),...this.customFieldsToPossibleColumns(e)]}getCustomFieldsValuesColumns(e){return tm.flatMap(({slug:t,valueId:n})=>{const i=e.find(e=>e.slug===t),a=i?.values.find(e=>e.id===n);return i&&a?[{slug:nm({slug:t,valueId:n}),name:a.value,label:i.name,customField:i,width:200}]:[]})}getCustomDocumentsColumns(e){return(0,mo.A)(Object.entries((0,Zd.A)(e,e=>e.slug)).map(([e,t])=>({slug:Qu(e),name:this.t("imprimer_1_75795",(0,Xc.A)(t,e=>e.id).name),label:e,minWidth:240})),e=>m(e.name))}};im=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],im);var am;!function(e){e.Acronym="acronym",e.Address="address",e.Category="category",e.CategoryLeaders="categoryLeaders",e.CheckedInRate="checkedInRate",e.CheckedOutRate="checkedOutRate",e.Color="color",e.Conditions="conditions",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.Description="description",e.FillingRate="fillingRate",e.Icon="icon",e.IconColor="iconColor",e.Id="id",e.Latitude="latitude",e.Layer="layer",e.Leaders="leaders",e.Longitude="longitude",e.Name="name",e.PrivateNote="privateNote",e.MaxResources="resources",e.AssignedResources="assignedResources",e.Slot="slot",e.SlotName="slotName",e.State="state",e.Tags="tags",e.Traces="traces",e.WeezeventChecklistId="weezeventChecklistId",e.WeezeventIsSynchronized="weezeventIsSynchronized",e.Zoom="zoom"}(am||(am={}));let sm=class extends Nu{constructor(e,t,n){super(e,t,n)}getPositionsFilters(e,t){return(0,go.A)([{slug:am.Name,name:this.t("nom_de_la_missi_64605"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"position",name:this.t("Position"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e.id},{slug:am.Description,name:this.t("Description"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:am.PrivateNote,name:this.t("note_priv_e_06303"),category:this.t("missions_63972"),fieldType:Ue.Text},F(e.positionsCategories)?{slug:"positionCategory",name:this.t("cat_gorie_00291"),category:this.t("missions_63972"),fieldType:Ue.Select,values:(0,mo.A)(e.positionsCategories,e=>m(e.name)),hideEmpty:!0}:null,{slug:"positionSlot",name:this.t("cr_neau_11117"),category:this.t("missions_63972"),fieldType:Ue.DateTimeRange,startAt:e.startAt,endAt:e.endAt},{slug:"positionSlotName",name:this.t("nom_du_cr_neau_54351"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:"tag",name:this.t("Tag"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId,eventId:e.id,tagContext:wt.Positions},{slug:"positionCustomField",name:this.t("condition_61066"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,organizationId:e.organizationId},F(e.traces)?{slug:am.Traces,name:this.t("Traces"),category:this.t("missions_63972"),fieldType:Ue.Select,values:(0,mo.A)(e.traces,e=>m(e.name))}:null,{slug:"acronym",name:this.t("Acronym"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:"color",name:this.t("Color"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"icon",name:this.t("ic_ne_55554"),category:this.t("missions_63972"),fieldType:Ue.Select,values:Gn.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"address",name:this.t("Address"),category:this.t("missions_63972"),fieldType:Ue.Text},{slug:"latitude",name:this.t("Latitude"),category:this.t("missions_63972"),fieldType:Ue.Number},{slug:"longitude",name:this.t("Longitude"),category:this.t("missions_63972"),fieldType:Ue.Number},{slug:"state",name:this.t("statut_des_ress_73550"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,values:ti.map(e=>({id:e,name:this.t(e)}))},{slug:"fillingRate",name:this.t("taux_de_remplis_11913"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:am.CheckedInRate,name:this.t("taux_de_pointag_87285"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:am.CheckedOutRate,name:this.t("taux_de_d_point_88315"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:am.Leaders,name:this.t("nombre_de_respo_19772"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:am.CategoryLeaders,name:this.t("nombre_de_respo_01994"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:am.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e.organizationId,eventId:e.id},{slug:am.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("missions_63972"),fieldType:Ue.Datetime,hideEmpty:!0},e.isWeezeventConnected?{slug:am.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),category:this.t("missions_63972"),fieldType:Ue.Number}:null,...this.customFieldsToFilters(t)])}getPositionsPossibleColumns(e,{isWeezeventConnected:t}){const n=[{slug:am.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Id,width:100},{slug:am.Name,name:this.t("nom_de_la_missi_64605"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Name,minWidth:120},{slug:am.Acronym,name:this.t("acronymes_11499"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Acronym,minWidth:120},{slug:am.Description,name:this.t("Description"),minWidth:320},{slug:am.Category,name:this.t("cat_gorie_00291"),isSearchable:!0,isSortable:!0,sortAttribute:mt.Category,minWidth:240},{slug:am.SlotName,name:this.t("nom_du_cr_neau_54351"),isSearchable:!0,minWidth:180},{slug:am.Slot,name:this.t("cr_neau_11117"),isSortable:!0,sortAttribute:mt.Slot,minWidth:240},{slug:am.MaxResources,name:this.t("membres_n_cessa_55227"),minWidth:320},{slug:am.AssignedResources,name:this.t("membres_11310"),minWidth:320},{slug:"numberOfMinutesRequired",name:this.t("nombre_de_membr_60320_plural"),minWidth:320},{slug:"numberOfMinutesAssigned",name:this.t("nombre_de_membr_87779_plural"),minWidth:320},{slug:am.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:am.Conditions,name:this.t("conditions_77756"),minWidth:320},{slug:am.Address,name:this.t("Address"),isSearchable:!0,minWidth:240},{slug:am.Layer,name:this.t("Layer"),minWidth:180},{slug:am.Traces,name:this.t("Traces"),minWidth:240},{slug:am.Zoom,name:this.t("Zoom"),isSearchable:!0,minWidth:180},{slug:am.Latitude,name:this.t("latitude_46176"),isSearchable:!0,minWidth:180},{slug:am.Longitude,name:this.t("longitude_01695"),isSearchable:!0,minWidth:180},{slug:am.Color,name:this.t("Color"),isSearchable:!0,width:80},{slug:am.Icon,name:this.t("ic_ne_55554"),width:80},{slug:am.IconColor,name:this.t("ic_ne_et_couleu_54485"),width:80},{slug:am.State,name:this.t("statut_des_ress_73550"),minWidth:240},{slug:am.FillingRate,name:this.t("taux_de_remplis_11913"),minWidth:240},{slug:am.CheckedInRate,name:this.t("taux_de_pointag_87285"),minWidth:240},{slug:am.CheckedOutRate,name:this.t("taux_de_d_point_88315"),minWidth:240},{slug:am.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:am.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:mt.CreatedAt,minWidth:180},{slug:am.Leaders,name:this.t("responsables_de_54941"),isSearchable:!0,minWidth:320},{slug:am.CategoryLeaders,name:this.t("responsables_de_22220"),isSearchable:!0,minWidth:320}];return t&&n.push({slug:am.WeezeventIsSynchronized,name:this.t("WeezeventIsSynchronized"),minWidth:180},{slug:am.WeezeventChecklistId,name:this.t("WeezeventChecklistId"),minWidth:180}),n.concat(this.customFieldsToPossibleColumns(e))}};var om;sm=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],sm),function(e){e.Id="id",e.WeezaccessPartner="weezaccessPartner",e.PrinterGroup="printerGroup",e.MediaType="mediaType",e.Document="document",e.CreatedBy="createdBy",e.CreatedAt="createdAt",e.ActivationRange="activationRange",e.Status="status"}(om||(om={}));class rm extends Nu{constructor(e,t,n){super(e,t,n)}getPrintTriggersPossibleColumns(){return[{slug:om.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:xt.Id,width:100},{slug:om.WeezaccessPartner,name:this.t("op_rateur_weeza_31732"),isSearchable:!0,isSortable:!0,sortAttribute:xt.WeezaccessPartner,minWidth:280},{slug:om.PrinterGroup,name:this.t("printing_locati_10729"),isSearchable:!0,isSortable:!0,sortAttribute:xt.PrinterGroup,minWidth:200},{slug:om.MediaType,name:this.t("type_d_impressi_00431"),isSortable:!0,sortAttribute:xt.MediaType,minWidth:160},{slug:om.Document,name:this.t("document_87149"),isSearchable:!0,isSortable:!0,sortAttribute:xt.Document,minWidth:200},{slug:om.CreatedBy,name:this.t("cr_par_41994"),minWidth:220},{slug:om.CreatedAt,name:this.t("cr_le_85046"),isSortable:!0,minWidth:180,sortAttribute:xt.CreatedAt},{slug:om.ActivationRange,name:this.t("p_riode_d_activ_48213"),isSortable:!0,sortAttribute:xt.ActivationRange,minWidth:280},{slug:om.Status,name:this.t("State"),isSortable:!0,sortAttribute:xt.Status,minWidth:140}]}}function lm(e){return{includeComments:e.includes("comments"),includeDelegations:e.includes("delegations")||e.includes("delegations_categories"),includeDuplicatedFrom:e.includes("duplicatedFrom"),includeEmails:e.includes("campaigns_states"),includeEvents:e.includes("events")||e.includes("number_of_events"),includeForms:e.includes("forms")||e.includes("forms_inserted_at"),includeTags:e.includes("tags"),includeRoles:e.includes("roles")}}let dm=class extends Nu{constructor(e,t,n){super(e,t,n)}getOrganizationUsersFilters(e,t,n){return[...this.getBaseFilters(n.customFields.nodes),...this.getEventsFilters(e),...this.getFormsFilters(e),...this.getPositionsFilters(),...this.getDelegationsFilters(e),...this.getEmailsFilters(e),...this.getCommentsFilters(e),{slug:"tag",name:this.t("Tag"),category:this.t("autres_99130"),fieldType:Ue.Select,needLoading:!0,organizationId:e,tagContext:wt.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Ue.Number,hideEmpty:!0},{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("autres_99130"),fieldType:Ue.Select,values:n.segmentsFolders.flatMap(e=>e.segments).filter(e=>e.id!==t),hideEmpty:!0},{slug:"isAdmin",name:this.t("est_administrat_15766"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"isLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"roles",name:this.t("r_les_61679"),category:this.t("autres_99130"),fieldType:Ue.Select,needLoading:!0,organizationId:e}]}getDelegationMembersFilters(e){return this.getBaseFilters(e)}getOrganizationUsersPossibleColumns(e){return[...this.getBaseColumns(),{slug:"duplicatedFrom",name:this.t("dupliqu_de_28582"),minWidth:240},{slug:"events",name:this.t("_v_nements_53672"),minWidth:320},{slug:"number_of_events",name:this.t("nombre_d_v_nem_14214"),width:230},{slug:"forms",name:this.t("formulaires_rem_62495"),minWidth:320},{slug:"forms_inserted_at",name:this.t("dates_de_rempli_65075"),minWidth:320},{slug:"delegations",name:this.t("d_l_gations_78318"),isSearchable:!0,minWidth:320},{slug:"delegations_categories",name:this.t("cat_gories_de_d_45259"),minWidth:320},{slug:"inserted_at",name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:Ut.InsertedAt,width:230},{slug:"last_seen_at",name:this.t("date_de_derni_r_38795"),isSortable:!0,sortAttribute:Ut.LastSeenAt,width:230},{slug:"campaigns_states",name:this.t("statut_des_camp_25280"),minWidth:320},{slug:"tags",name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:"comments",name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:"roles",name:this.t("r_les_61679"),minWidth:320},...this.customFieldsToPossibleColumns(e)]}getDelegationMembersPossibleColumns(e){return[...this.getBaseColumns(),...this.customFieldsToPossibleColumns(e)]}getBaseColumns(){return[{slug:"name",name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.Name,minWidth:240},{slug:"email",name:this.t("e_mail_du_membr_69509"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.Email,minWidth:180},{slug:"id",name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.Id,width:100},{slug:"local_id",name:this.t("id_sur_l_organi_45566"),isSearchable:!0,isSortable:!0,sortAttribute:Ut.LocalId,width:100}]}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text,hideEmpty:!0},{slug:"registrationDate",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Date,hideEmpty:!0},{slug:"id",name:this.t("id_51738"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:"local_id",name:this.t("id_sur_l_organi_45566"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:"lastSeenAt",name:this.t("date_de_derni_r_38795"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Datetime},{slug:"duplicatedFrom",name:this.t("est_dupliqu_62764"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(e)]}getEventsFilters(e){return[{slug:"event",name:this.t("_v_nement_22345"),category:this.t("Event"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"numberOfEvents",name:this.t("nombre_d_v_nem_14214"),category:this.t("Event"),fieldType:Ue.Number,hideEmpty:!0}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Ue.Select,needLoading:!0,organizationId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Ue.Date,hideEmpty:!0,needLoading:!0,organizationId:e}]}getPositionsFilters(){return[{slug:"positionName",name:this.t("nom_de_la_missi_80169"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"positionCategoryName",name:this.t("nom_de_la_cat_g_57279"),category:this.t("missions_63972"),fieldType:Ue.Text,hideEmpty:!0},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0}]}getDelegationsFilters(e){return[{slug:"delegation",name:this.t("fait_partie_de_32196"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox}]}getEmailsFilters(e){return[{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Ue.Campaign,needLoading:!0,organizationId:e},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Ue.Checkbox,hideEmpty:!0}]}getCommentsFilters(e){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Ue.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Ue.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e}]}};function cm(e){return"production"===s.Development?1===e:2676===e}dm=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],dm);var um;function mm(e,t,n){return t===zr.AccreditationsMatrix?{includeAccreditationProfile:!1,includeAccreditations:!1,includeAccreditationsMatrix:!0,includeAvailability:!1,includeComments:!1,includeCustomDocuments:!1,includeDelegation:!1,includeDuplicatedFrom:!1,includeEmails:!1,includeForms:!1,includeFormsUsersInfos:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePicture:!0,includePositions:!1,includePreassignedPositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeTraces:!1,includeVolunteerMinutes:!1,includeWeezeventChecklists:!1,includeWeezeventUrls:!1,includeWishedPositions:!1}:t===zr.Map?{includeAccreditationProfile:!1,includeAccreditations:!1,includeAccreditationsMatrix:!1,includeAvailability:!1,includeComments:!1,includeCustomDocuments:!1,includeDelegation:!1,includeDuplicatedFrom:!1,includeEmails:!1,includeForms:!1,includeFormsUsersInfos:!1,includeNumberOfAccreditations:!1,includeNumberOfAssignments:!1,includeNumberOfAssignmentsDays:!1,includeNumberOfAvailableDays:!1,includePicture:!1,includePositions:!1,includePreassignedPositions:!1,includeRoles:!1,includeTags:!1,includeTeam:!1,includeTraces:!0,includeVolunteerMinutes:!1,includeWeezeventChecklists:!1,includeWeezeventUrls:!1,includeWishedPositions:!1}:{includeAccreditationProfile:e.includes(um.AccreditationProfile)||e.includes(um.WishedAccreditationProfile),includeAccreditations:e.includes(um.Accreditations)||e.includes(um.AccreditationsCategories)||e.includes(um.AccreditationsSlots)||e.includes(um.WishedAccreditationSlots)||e.includes(um.ScannedAccreditations)||e.includes("bracelet_a_delivrer"),includeAccreditationsMatrix:!1,includeAvailability:e.includes(um.Availability),includeComments:e.includes(um.Comments),includeCustomDocuments:e.some(Xu),includeDelegation:e.includes(um.Delegations)||e.includes(um.DelegationCategory)||e.includes(um.DelegationBannerNumber),includeDuplicatedFrom:e.includes(um.DuplicatedFrom),includeEmails:e.includes(um.CampaignsStates),includeFormsUsersInfos:e.includes(um.CompletedForms)||e.includes(um.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at_"))||e.includes(um.Availability)||e.includes(um.TeamCode)||e.includes(um.TeamMembers)||e.includes(um.WishedAccreditationProfile),includeForms:e.includes(um.CompletedForms)||e.includes(um.FormsInsertedAt)||e.some(e=>e.startsWith("form_inserted_at_"))||e.includes(um.Availability),includeNumberOfAccreditations:e.includes(um.NumberOfAccreditations),includeNumberOfAssignments:e.includes(um.NumberOfAssignments),includeNumberOfAssignmentsDays:e.includes(um.NumberOfAssignmentsDays),includeNumberOfAvailableDays:e.includes(um.NumberOfAvailableDays),includePicture:e.includes(um.Name),includePositions:e.includes(um.Positions)||e.includes(um.PositionsCategories)||e.includes(um.WishedPositions)||e.includes(um.CheckedInPositions),includeRoles:e.includes(um.Roles),includeTags:e.includes(um.Tags),includeTeam:e.includes(um.TeamCode)||e.includes(um.TeamMembers),includeTraces:!1,includeVolunteerMinutes:e.includes(um.VolunteerMinutes),includeWishedPositions:e.includes(um.WishedPositions),includePreassignedPositions:e.includes(um.PreassignedPositionsCategories)||e.includes(um.PreassignedPositions),includeWeezeventChecklists:e.includes(um.WeezaccessChecklists),includeWeezeventUrls:!0===n?.includeWeezeventUrls&&(e.includes(um.WeezeventBarcodeId)||e.includes(um.WeezeventShortTag))}}!function(e){e.AccreditationProfile="accreditation_profile",e.AccreditationState="accreditation_state",e.Accreditations="accreditations",e.AccreditationsCategories="accreditations_categories",e.AccreditationsSlots="accreditations_slots",e.Availability="availability",e.CampaignsStates="campaigns_states",e.CheckedInPositions="checed_in_positions",e.Comments="comments",e.CompletedForms="forms",e.DelegationBannerNumber="delegation_banner_number",e.DelegationCategory="delegation_category",e.Delegations="delegations",e.DuplicatedFrom="duplicatedFrom",e.Email="email",e.FormsInsertedAt="forms_inserted_at",e.Id="id",e.InsertedAt="inserted_at",e.LocalId="local_id",e.Name="name",e.NumberOfAccreditations="number_of_accreditations",e.NumberOfAssignments="number_of_assignments",e.NumberOfAssignmentsDays="number_of_assignments_days",e.NumberOfAvailableDays="number_of_available_days",e.OrganizationLocalId="organization_local_id",e.Positions="positions",e.PositionsCategories="positions_categories",e.PreassignedPositions="preassigned_positions",e.PreassignedPositionsCategories="preassigned_positions_categories",e.Roles="roles",e.ScannedAccreditations="scanned_accreditations",e.Tags="tags",e.TeamCode="teamCode",e.TeamMembers="teamMembers",e.VolunteerMinutes="volunteer_minutes",e.VolunteerRegistrationState="volunteer_registration_state",e.WeezaccessChecklists="weezevent_checklists",e.WeezeventBarcodeId="weezevent_barcode_id",e.WeezeventBarcodeVersion="weezevent_barcode_version",e.WeezeventPairedAt="weezevent_paired_at",e.WeezeventShortTag="weezevent_short_tag",e.WishedAccreditationProfile="wished_accreditation_profile",e.WishedAccreditationSlots="wished_accreditation_slots",e.WishedPositions="wished_positions"}(um||(um={}));let gm=class extends Nu{constructor(e,t,n){super(e,t,n)}getVolunteersFilters(e,t,n,i,a,{hasAccreditations:s,hasCampaigns:o,hasDelegations:r,hasForms:l,hasPositions:d,isWeezeventConnected:c}){return[...this.getBaseFilters(i),...this.getBarcodeFilters(),...this.getAvailabilitiesFilters(t,a),...d?this.getPositionsFilters(e,t,a):[],...s?this.getAccreditationsFilters(e,t,a):[],...r?this.getDelegationsFilters(e,t):[],...this.getSegmentsFilters(e,t,n,a),...l?this.getFormsFilters(t):[],...l?this.getTeamsFilters():[],...c?this.getWeezeventFilters(t):[],...this.getEmailsFilters(t,o),...this.getCommentsFilter(e,t),{slug:"tag",name:this.t("Tags"),category:this.t("autres_99130"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t,tagContext:wt.UsersInfos},{slug:"sameEmail",name:this.t("nombre_de_profi_42316"),category:this.t("autres_99130"),fieldType:Ue.Number,hideEmpty:!0},{slug:"possibleDuplicates",name:this.t("potentiel_doubl_87672"),category:this.t("autres_99130"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"isLeader",name:this.t("est_responsable_19679"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"isPositionLeader",name:this.t("est_responsable_27270"),category:this.t("autres_99130"),fieldType:Ue.Checkbox},{slug:"isPositionCategoryLeader",name:this.t("est_responsable_91796"),category:this.t("autres_99130"),fieldType:Ue.Checkbox}]}getPositionMembersFilters(e,t,n,i){return[...this.getBaseFilters(n),...this.getAvailabilitiesFilters(t,i),...this.getPositionsFilters(e,t,i)]}getAccreditationMembersFilters(e,t,n,i,{hasDelegations:a}){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...a?this.getDelegationsFilters(e,t):[]]}getDelegationCategoryMembersFilters(e,t,n,i,a){return[...this.getBaseFilters(n),...this.getAccreditationsFilters(e,t,i),...a?this.getWeezeventFilters(t):[]]}getDelegationMembersFilters(e,t,n,i,a,s){return[...this.getBaseFilters(n),...a.slotDisplay===At.Hide?[]:this.getAvailabilitiesFilters(t,i),...this.getAccreditationsFilters(e,t,i),...a.positionDisplay===vt.None?[]:this.getPositionMembersFilters(e,t,n,i),...s?this.getWeezeventFilters(t):[]]}getVolunteersPossibleColumns(e,t,n,i,{hasAccreditations:a,hasCampaigns:s,hasCustomDocuments:o,hasDelegations:r,hasForms:l,hasPositions:d,isWeezeventConnected:c}){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...o?this.getCustomDocumentsColumns(i):[],...l?this.getFormsColumns(n):[],...d?this.getPositionsColumns():[],...c?this.getWeezeventColumns():[],...a?this.getAccreditationsColumns(e):[],...this.getAvailabilitiesColumns(),...r?this.getDelegationsColumns(e):[],...s?[{slug:um.CampaignsStates,name:this.t("statut_des_camp_25280"),minWidth:320}]:[],{slug:um.Tags,name:this.t("tags_79499"),isSearchable:!0,minWidth:320},{slug:um.Comments,name:this.t("commentaires_96492"),isSearchable:!0,minWidth:320},{slug:um.Roles,name:this.t("r_les_61679"),minWidth:320}]}getPositionMembersPossibleColumns(e){return[...this.getBaseColumns(e,{forDelegationsSpace:!1}),...this.getPositionsColumns()]}getAccreditationMembersPossibleColumns(e,t){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...this.getAccreditationsColumns(e),...this.getDelegationsColumns(e)]}getDelegationCategoryMembersPossibleColumns(e,t,n,{hasCustomDocuments:i,isWeezeventConnected:a}){return[...this.getBaseColumns(t,{forDelegationsSpace:!1}),...i?this.getCustomDocumentsColumns(n):[],...this.getAccreditationsColumns(e),...this.getDelegationsColumns(e),...a?this.getWeezeventColumns():[],{slug:um.CampaignsStates,name:this.t("statut_des_camp_25280")},{slug:um.Delegations,name:this.t("Delegation"),isSearchable:!0}]}getDelegationMembersPossibleColumns(e,t,{customDocuments:n,forDelegationsSpace:i,isWeezeventConnected:a,positionDisplay:s,slotDisplay:o}){return[...this.getBaseColumns(t,{forDelegationsSpace:i}),...this.getCustomDocumentsColumns(n??[]),...this.getAccreditationsColumns(e),...s===vt.None?[]:this.getPositionsColumns(),...o===At.Hide?[]:this.getAvailabilitiesColumns(),...a?this.getWeezeventColumns():[],{slug:um.CampaignsStates,name:this.t("statut_des_camp_25280")}]}getBaseColumns(e,{forDelegationsSpace:t}){return(0,go.A)([{slug:um.Email,name:this.t("e_mail_du_membr_69509"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Email,minWidth:180},t?null:{slug:um.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Id,width:100},t?null:{slug:um.LocalId,name:this.t("id_sur_l_v_nem_01171"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.LocalId,width:100},t?null:{slug:um.OrganizationLocalId,name:this.t("id_sur_l_organi_45566"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.OrganizationLocalId,width:100},t?null:{slug:um.WeezeventBarcodeId,name:this.t("TicketId"),isSearchable:!0,minWidth:240},t?null:{slug:um.WeezeventBarcodeVersion,name:this.t("version_du_code_15471"),minWidth:100},{slug:um.Name,name:this.t("full_name"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Name,minWidth:240},{slug:um.InsertedAt,name:this.t("date_d_inscript_31369"),isSortable:!0,sortAttribute:Gt.InsertedAt,width:240},t?null:{slug:um.DuplicatedFrom,name:this.t("dupliqu_de_28582"),minWidth:240},...this.customFieldsToPossibleColumns(e)])}getAvailabilitiesColumns(){return[{slug:um.Availability,name:this.t("disponibilit_s_49923"),minWidth:320}]}getCustomDocumentsColumns(e){return(0,mo.A)(e,e=>m(e.name)).map(e=>({slug:Qu(e.id),name:this.t("imprimer_1_75795",e.name),customDocument:e,minWidth:240}))}getFormsColumns(e){return[{slug:um.CompletedForms,name:this.t("formulaires_rem_62495"),minWidth:320},{slug:um.FormsInsertedAt,name:this.t("dates_de_rempli_65075"),minWidth:320},...(0,mo.A)(e,e=>m(e.name)).map(e=>({slug:`form_inserted_at_${e.id}`,name:this.t("date_de_remplis_00881",e.name),isSortable:!0,sortAttribute:`form_inserted_at_${e.id}`,minWidth:240})),{slug:um.TeamCode,name:this.t("code_quipe_14296"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.TeamCode,minWidth:180},{slug:um.TeamMembers,name:this.t("membres_de_l_q_00891"),minWidth:240}]}getPositionsColumns(){return[{slug:um.NumberOfAssignments,name:this.t("nombre_d_affect_31455"),width:240},{slug:um.NumberOfAssignmentsDays,name:this.t("nombre_de_jours_86280"),width:240},{slug:um.NumberOfAvailableDays,name:this.t("nombre_de_jours_07962"),width:240},{slug:um.Positions,name:this.t("missions_affect_97811"),minWidth:320},{slug:um.PositionsCategories,name:this.t("cat_gories_de_m_93035"),minWidth:320},{slug:um.VolunteerMinutes,name:this.t("nombre_de_minut_50497"),width:240},{slug:um.VolunteerRegistrationState,name:this.t("status_d_affect_75769"),isSortable:!0,sortAttribute:Gt.State,width:240},{slug:um.WishedPositions,name:this.t("missions_souhai_23225"),minWidth:320},{slug:um.PreassignedPositions,name:this.t("missions_pr_af_02950"),minWidth:320},{slug:um.PreassignedPositionsCategories,name:this.t("cat_gories_pr_83825"),minWidth:320},{slug:um.CheckedInPositions,name:this.t("missions_point_05292"),minWidth:320}]}getAccreditationsColumns(e){return(0,go.A)([{slug:um.Accreditations,name:this.t("accr_ditations_33155"),minWidth:320},{slug:um.AccreditationsCategories,name:this.t("cat_gories_d_ac_37678"),minWidth:320},{slug:um.AccreditationState,name:this.t("statut_d_accr_d_75527"),isSortable:!0,sortAttribute:Gt.AccreditationState,width:240},{slug:um.NumberOfAccreditations,name:this.t("nombre_d_accr_d_02452"),width:240},{slug:um.WishedAccreditationSlots,name:this.t("accr_ditations_74375"),minWidth:320},{slug:um.ScannedAccreditations,name:this.t("accr_ditations_52153"),minWidth:320},{slug:um.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),minWidth:240},{slug:um.WishedAccreditationProfile,name:this.t("profil_d_accr_d_63000"),minWidth:240},cm(e)?{slug:"bracelet_a_delivrer",name:this.t("bracelet_d_li_50372")}:null])}getWeezeventColumns(){return[{slug:um.WeezeventShortTag,name:this.t("puce_50504"),isSearchable:!0,minWidth:180},{slug:um.WeezeventPairedAt,name:this.t("appair_le_70213"),isSortable:!0,sortAttribute:Gt.PairedAt,minWidth:180},{slug:um.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),minWidth:320}]}getDelegationsColumns(e){return(0,go.A)([{slug:um.Delegations,name:this.t("Delegation"),isSearchable:!0,isSortable:!0,sortAttribute:Gt.Delegation,minWidth:240},{slug:um.DelegationCategory,name:this.t("cat_gorie_de_d_18027"),minWidth:240},uu(e)?{slug:um.DelegationBannerNumber,name:this.t("num_ro_de_bande_16203"),isSearchable:!0,width:100}:null])}getBaseFilters(e){return[{slug:"email",name:this.t("Email"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Text,hideEmpty:!0},{slug:"insertedAt",name:this.t("date_d_inscript_31369"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Date,hideEmpty:!0},{slug:um.LocalId,name:this.t("id_sur_l_v_nem_01171"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:um.OrganizationLocalId,name:this.t("id_sur_l_organi_45566"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Number,hideEmpty:!0},{slug:um.DuplicatedFrom,name:this.t("est_dupliqu_62764"),category:this.t("champs_de_formu_64126"),fieldType:Ue.Checkbox,hideEmpty:!0},...this.customFieldsToFilters(e)]}getBarcodeFilters(){return[{slug:um.WeezeventBarcodeId,name:this.t("TicketId"),category:"Weezevent",fieldType:Ue.Text,hideEmpty:!0},{slug:um.WeezeventBarcodeVersion,name:this.t("version_du_code_15471"),category:"Weezevent",fieldType:Ue.Number,hideEmpty:!0}]}getAvailabilitiesFilters(e,t){return[{slug:"numberOfAvailableDays",name:this.t("nombre_de_jours_07962"),category:this.t("disponibilit_s_49923"),fieldType:Ue.Number,hideEmpty:!0},{slug:"wishedSlots",name:this.t("disponibilit_s_49923"),category:this.t("disponibilit_s_49923"),fieldType:Ue.DateTimeRange,startAt:t.startAt,endAt:t.endAt},{slug:"wishedSlotsCustom",name:this.t("disponibilit_s_26280"),category:this.t("disponibilit_s_49923"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:e},{slug:"numberOfWishedSlots",name:this.t("nombre_de_dispo_26405"),category:this.t("disponibilit_s_49923"),fieldType:Ue.Number,hideEmpty:!0}]}getPositionsFilters(e,t,n){return[{slug:"volunteerRegistrationState",name:this.t("statut_d_affect_57444"),category:this.t("missions_63972"),fieldType:Ue.Select,values:ci.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"position",name:this.t("missions_affect_97811"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventPosition",name:this.t("has_shift_on_ot_92375"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"positionSlotId",name:this.t("cr_neau_affect_50400_plural"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"positionSlot",name:this.t("date_d_affectat_98566"),category:this.t("missions_63972"),fieldType:Ue.DateTimeRange,startAt:n.startAt,endAt:n.endAt},{slug:"positionCategory",name:this.t("cat_gories_de_m_93035"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignments",name:this.t("nombre_d_affect_31455"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfAssignmentsPerDay",name:this.t("nombre_d_affect_22087"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"numberOfAssignmentsDays",name:this.t("nombre_de_jours_86280"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"preassignedPosition",name:this.t("missions_pr_af_02950"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"numberOfPreAssignments",name:this.t("nombre_de_pr_a_86516"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"preassignedPositionCategory",name:this.t("cat_gories_pr_83825"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedPositionsCategories",name:this.t("cat_gories_souh_80851"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsCategories",name:this.t("nombre_de_cat_g_05961"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"wishedPositions",name:this.t("missions_souhai_23225"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositions",name:this.t("nombre_de_missi_52579"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"wishedPositionsSlots",name:this.t("cr_neaux_souhai_90108"),category:this.t("missions_63972"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedPositionsSlots",name:this.t("nombre_de_cr_ne_28370"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"volunteersMinutes",name:this.t("nombre_de_minut_50497"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0},{slug:"volunteersMinutesDays",name:this.t("nombre_de_minut_89574"),category:this.t("missions_63972"),fieldType:Ue.Number,hideEmpty:!0,startAt:n.startAt,endAt:n.endAt},{slug:"checkInAt",name:this.t("point_le_93167"),category:this.t("missions_63972"),fieldType:Ue.Datetime,useLocalZone:!0},{slug:"checkOutAt",name:this.t("d_point_le_29289"),category:this.t("missions_63972"),fieldType:Ue.Datetime,useLocalZone:!0},{slug:"checkInState",name:this.t("statut_de_point_44328"),category:this.t("missions_63972"),fieldType:Ue.Select,values:On.map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"checkInAtPositionSlot",name:this.t("cr_neaux_point_71408"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"checkOutAtPositionSlot",name:this.t("cr_neaux_d_poin_45477"),category:this.t("missions_63972"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"overlappingAssignments",name:this.t("affectations_se_49339"),category:this.t("missions_63972"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"differentPositions",name:this.t("les_missions_af_61709"),category:this.t("missions_63972"),fieldType:Ue.Checkbox,hideEmpty:!0}]}getAccreditationsFilters(e,t,n){return(0,go.A)([{slug:"accreditationState",name:this.t("statut_d_accr_d_75527"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,values:En.map(e=>({id:e,name:e})),hideEmpty:!0},{slug:"numberOfAccreditations",name:this.t("nombre_d_accr_d_02452"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditation",name:this.t("accr_ditations_33155"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"hasOtherEventAccreditation",name:this.t("has_accreditati_31831"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:"accreditationCategory",name:this.t("cat_gories_d_ac_37678"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"wishedAccreditationsSlots",name:this.t("accr_ditations_74375"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"numberOfWishedAccreditationsSlots",name:this.t("nombre_d_accr_d_92021"),category:this.t("accr_ditations_39450"),fieldType:Ue.Number,hideEmpty:!0},{slug:"accreditationSlotId",name:this.t("cr_neaux_accr_d_70934"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationSlot",name:this.t("date_d_accr_dit_26214"),category:this.t("accr_ditations_39450"),fieldType:Ue.Date,startAt:n.startAt,endAt:n.endAt,hideEmpty:!0},{slug:"scannedAccreditationsSlots",name:this.t("accr_ditations_52153"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"differentAccreditations",name:this.t("les_accr_ditati_88638"),category:this.t("accr_ditations_39450"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:um.AccreditationProfile,name:this.t("profil_d_accr_d_02274"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:um.WishedAccreditationProfile,name:this.t("profil_d_accr_d_63000"),category:this.t("accr_ditations_39450"),fieldType:Ue.Select,needLoading:!0,eventId:t}])}getDelegationsFilters(e,t){return(0,go.A)([{slug:"delegation",name:this.t("inscrit_via_la_86398"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,eventId:t},{slug:"delegationCategory",name:this.t("inscrit_via_la_12241"),category:this.t("d_l_gations_78318"),fieldType:Ue.Select,needLoading:!0,organizationId:e,eventId:t},{slug:"isDelegationCategoryLeader",name:this.t("est_responsable_36610"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox},{slug:"isDelegationLeader",name:this.t("est_responsable_87662"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,needLoading:!0,eventId:t},uu(e)?{slug:um.DelegationBannerNumber,name:this.t("num_ro_de_bande_16203"),category:this.t("d_l_gations_78318"),fieldType:Ue.Number}:null,{slug:"hasBeenInvitedToDelegation",name:this.t("a_re_u_le_lien_34327"),category:this.t("d_l_gations_78318"),fieldType:Ue.Checkbox,hideEmpty:!0}])}getSegmentsFilters(e,t,n,i){return[{slug:"segments",name:this.t("fait_partie_de_44650"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,values:i.segmentsFolders.flatMap(e=>e.segments).filter(e=>e.id!==n),hideEmpty:!0},{slug:"usersSegments",name:this.t("fait_partie_de_44893"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e},{slug:"positionsSegments",name:this.t("affecter_une_10657"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"accreditationsSegments",name:this.t("affecter_une_91431"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t},{slug:"delegationsSegments",name:this.t("affecter_une_45240"),category:this.t("vues_personnali_80652"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,eventId:t}]}getFormsFilters(e){return[{slug:"forms",name:this.t("formulaires_rem_62495"),category:this.t("Form_plural"),fieldType:Ue.Select,needLoading:!0,eventId:e},{slug:"formsInsertedAt",name:this.t("dates_de_rempli_65075"),category:this.t("Form_plural"),fieldType:Ue.Date,hideEmpty:!0,needLoading:!0,eventId:e}]}getTeamsFilters(){return[{slug:"isTeam",name:this.t("est_inscrit_en_86193"),category:this.t("_quipes_18817"),fieldType:Ue.Checkbox,hideEmpty:!0},{slug:"teamCode",name:this.t("code_quipe_14296"),category:this.t("_quipes_18817"),fieldType:Ue.Text},{slug:"numberOfTeamMembers",name:this.t("nombre_de_membr_82302"),category:this.t("_quipes_18817"),fieldType:Ue.Number,hideEmpty:!0},{slug:"isTeamLeader",name:this.t("est_chef_d_qui_73792"),category:this.t("_quipes_18817"),fieldType:Ue.Checkbox,hideEmpty:!0}]}getWeezeventFilters(e){return[{slug:um.WeezeventShortTag,name:this.t("puce_50504"),category:"Weezevent",fieldType:Ue.Text},{slug:um.WeezeventPairedAt,name:this.t("appair_le_70213"),category:"Weezevent",fieldType:Ue.Datetime,useLocalZone:!0},{slug:um.WeezaccessChecklists,name:this.t("listes_de_contr_55120"),category:"Weezevent",fieldType:Ue.Select,needLoading:!0,eventId:e}]}getEmailsFilters(e,t){return(0,go.A)([t?{slug:"campaign",name:this.t("campagne_97871"),category:this.t("e_mails_09850"),fieldType:Ue.Campaign,needLoading:!0,eventId:e}:null,t?{slug:"campaignSentAt",name:this.t("date_d_envoi_de_84374"),category:this.t("e_mails_09850"),fieldType:Ue.Date,hideEmpty:!0,needLoading:!0,eventId:e}:null,{slug:"assignmentEmailSentAt",name:this.t("date_d_envoi_de_01614"),category:this.t("e_mails_09850"),fieldType:Ue.Date},{slug:"assignmentEmailState",name:this.t("statut_de_de_l_36346"),category:this.t("e_mails_09850"),fieldType:Ue.Select,values:kn.filter(e=>e!==Ce.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"accreditationEmailSentAt",name:this.t("date_d_envoi_de_74383"),category:this.t("e_mails_09850"),fieldType:Ue.Date},{slug:"accreditationEmailState",name:this.t("statut_de_l_e_m_97776"),category:this.t("e_mails_09850"),fieldType:Ue.Select,values:kn.filter(e=>e!==Ce.Queued).map(e=>({id:e,name:this.t(e)})),hideEmpty:!0},{slug:"emailBlacklist",name:this.t("ne_souhaite_plu_08853"),category:this.t("e_mails_09850"),fieldType:Ue.Checkbox,hideEmpty:!0},t?{slug:"campaignReply",name:this.t("r_ponse_une_c_32448"),category:this.t("e_mails_09850"),fieldType:Ue.Text,needLoading:!0,eventId:e}:null])}getCommentsFilter(e,t){return[{slug:"comments",name:this.t("commentaires_96492"),category:this.t("commentaires_96492"),fieldType:Ue.Text},{slug:"lastCommentAt",name:this.t("date_du_dernier_73554"),category:this.t("commentaires_96492"),fieldType:Ue.Date,hideEmpty:!0},{slug:"commentWrittenBy",name:this.t("commentaire_cr_96610"),category:this.t("commentaires_96492"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}};var hm;gm=function(e,t,n,i){var a,s=arguments.length,o=s<3?t:null===i?i=Object.getOwnPropertyDescriptor(t,n):i;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,i);else for(var r=e.length-1;r>=0;r--)(a=e[r])&&(o=(s<3?a(o):s>3?a(t,n,o):a(t,n))||o);return s>3&&o&&Object.defineProperty(t,n,o),o}([(0,An._G)(),function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)}("design:paramtypes",[Xr,gl,Si])],gm),function(e){e.AccreditationSlot="accreditationSlotId",e.Accreditations="accreditations",e.Action="Action",e.Campaign="campaign",e.CreatedAt="createdAt",e.CreatedBy="createdBy",e.CustomField="customField",e.ExecutedAt="executedAt",e.Frequency="frequency",e.Id="id",e.Name="name",e.PositionSlot="positionSlotId",e.Positions="positions",e.State="state",e.Trigger="trigger",e.VolunteersSegment="volunteersSegment"}(hm||(hm={}));class pm extends Nu{constructor(e,t,n){super(e,t,n)}getWorkflowsFilters(e,t){return[{slug:hm.State,name:this.t("State"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:pi.map(e=>({id:e,name:this.t(e)}))},{slug:hm.Trigger,name:this.t("d_clencheur_73493"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:fi.map(e=>({id:e,name:this.t(e)}))},{slug:hm.Action,name:this.t("action_44224"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:ui.map(e=>({id:e,name:this.t(e)}))},{slug:hm.Frequency,name:this.t("Frequency"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,values:mi.map(e=>({id:e,name:this.t(e)}))},{slug:hm.CreatedBy,name:this.t("cr_e_par_30622"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:hm.CreatedAt,name:this.t("cr_e_le_02658"),category:this.t("automatisations_60045"),fieldType:Ue.Datetime,hideEmpty:!0},...t?[{slug:hm.AccreditationSlot,name:this.t("cr_neaux_accr_d_70934"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:hm.PositionSlot,name:this.t("cr_neau_affect_50400_plural"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]:[],{slug:hm.Campaign,name:this.t("campagne_97871"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:hm.CustomField,name:this.t("CustomField"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t},{slug:hm.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),category:this.t("automatisations_60045"),fieldType:Ue.Select,hideEmpty:!0,needLoading:!0,organizationId:e,eventId:t}]}getWorkflowsPossibleColumns(){return[{slug:hm.Id,name:this.t("id_51738"),isSearchable:!0,isSortable:!0,width:100,sortAttribute:Qt.Id},{slug:hm.Name,name:this.t("nom_de_l_automa_04883"),isSearchable:!0,isSortable:!0,sortAttribute:Qt.Name,minWidth:240},{slug:hm.State,name:this.t("State"),minWidth:180},{slug:hm.Trigger,name:this.t("d_clencheur_73493"),minWidth:180},{slug:hm.Action,name:this.t("action_44224"),minWidth:180},{slug:hm.CreatedBy,name:this.t("cr_e_par_30622"),isSearchable:!0,minWidth:180},{slug:hm.CreatedAt,name:this.t("cr_e_le_02658"),isSortable:!0,sortAttribute:Qt.CreatedAt,minWidth:180},{slug:hm.VolunteersSegment,name:this.t("vue_s_lectionn_21556"),isSortable:!0,sortAttribute:Qt.VolunteersSegment,minWidth:320},{slug:hm.ExecutedAt,name:this.t("ex_cut_e_le_99019"),isSortable:!0,sortAttribute:Qt.ExecutedAt,minWidth:180},{slug:hm.Accreditations,name:this.t("accr_ditations_39450"),minWidth:320},{slug:hm.Positions,name:this.t("missions_63972"),minWidth:320},{slug:hm.Campaign,name:this.t("campagne_97871"),minWidth:240},{slug:hm.CustomField,name:this.t("CustomField"),minWidth:240},{slug:hm.Frequency,name:this.t("Frequency"),minWidth:180}]}}const fm=new An.i0(e=>{e(zd).toSelf().inSingletonScope(),e(Xr).toSelf().inSingletonScope(),e(gl).toSelf().inSingletonScope(),e(Ld).toSelf().inSingletonScope(),e(Wd).toSelf().inSingletonScope(),e(qd).toSelf().inSingletonScope(),e(Su).toSelf().inSingletonScope(),e(vu).toSelf().inSingletonScope()}),Im=new An.i0(e=>{e(Co).toSelf().inSingletonScope(),e(Eo).toSelf().inSingletonScope(),e(Lo).toSelf().inSingletonScope(),e(Uo).toSelf().inSingletonScope(),e(vo).toSelf().inSingletonScope(),e(Ao).toSelf().inSingletonScope(),e(Bo).toSelf().inSingletonScope(),e(Vo).toSelf().inSingletonScope(),e(Go).toSelf().inSingletonScope(),e(Ko).toSelf().inSingletonScope(),e(Qo).toSelf().inSingletonScope(),e(Po).toSelf().inSingletonScope(),e(er).toSelf().inSingletonScope(),e(mr).toSelf().inSingletonScope(),e(gr).toSelf().inSingletonScope(),e(hr).toSelf().inSingletonScope(),e(pr).toSelf().inSingletonScope(),e(fr).toSelf().inSingletonScope(),e(Ir).toSelf().inSingletonScope(),e(Yr).toSelf().inSingletonScope(),e(jr).toSelf().inSingletonScope(),e(Wr).toSelf().inSingletonScope(),e(Gr).toSelf().inSingletonScope(),e(yr).toSelf().inSingletonScope(),e(ur).toSelf().inSingletonScope(),e(Hr).toSelf().inSingletonScope(),e(Kr).toSelf().inSingletonScope(),e(Qr).toSelf().inSingletonScope(),e(dl).toSelf().inSingletonScope(),e(rl).toSelf().inSingletonScope(),e(cl).toSelf().inSingletonScope(),e(Cl).toSelf().inSingletonScope(),e(El).toSelf().inSingletonScope(),e(Tl).toSelf().inSingletonScope(),e(Ml).toSelf().inSingletonScope(),e(Rl).toSelf().inSingletonScope(),e(Dl).toSelf().inSingletonScope(),e(Ol).toSelf().inSingletonScope(),e(wl).toSelf().inSingletonScope(),e(Pl).toSelf().inSingletonScope(),e($l).toSelf().inSingletonScope(),e(Ll).toSelf().inSingletonScope(),e(ko).toSelf().inSingletonScope(),e(No).toSelf().inSingletonScope(),e(Bl).toSelf().inSingletonScope(),e(Vl).toSelf().inSingletonScope(),e(Gl).toSelf().inSingletonScope(),e(Wl).toSelf().inSingletonScope(),e(ql).toSelf().inSingletonScope(),e(Yl).toSelf().inSingletonScope(),e(Hl).toSelf().inSingletonScope(),e(Kl).toSelf().inSingletonScope(),e(Zl).toSelf().inSingletonScope(),e(Ql).toSelf().inSingletonScope(),e(Xl).toSelf().inSingletonScope(),e(ol).toSelf().inSingletonScope(),e(Fl).toSelf().inSingletonScope(),e(sl).toSelf().inSingletonScope(),e(sd).toSelf().inSingletonScope(),e(rd).toSelf().inSingletonScope(),e(Jl).toSelf().inSingletonScope(),e(ad).toSelf().inSingletonScope(),e(cd).toSelf().inSingletonScope(),e(gd).toSelf().inSingletonScope(),e(bd).toSelf().inSingletonScope(),e(Ad).toSelf().inSingletonScope(),e(Cd).toSelf().inSingletonScope(),e(Ed).toSelf().inSingletonScope(),e(Td).toSelf().inSingletonScope(),e(Md).toSelf().inSingletonScope(),e(Rd).toSelf().inSingletonScope(),e(Dd).toSelf().inSingletonScope(),e(Od).toSelf().inSingletonScope(),e(kl).toSelf().inSingletonScope(),e(zl).toSelf().inSingletonScope(),e(Nl).toSelf().inSingletonScope(),e(Pd).toSelf().inSingletonScope(),e(Nd).toSelf().inSingletonScope()}),_m=new An.i0(e=>{e(Sl).toSelf().inSingletonScope(),e(Nu).toSelf().inSingletonScope(),e(Uu).toSelf().inSingletonScope(),e(Lu).toSelf().inSingletonScope(),e(Vu).toSelf().inSingletonScope(),e(Gu).toSelf().inSingletonScope(),e(Wu).toSelf().inSingletonScope(),e(Yu).toSelf().inSingletonScope(),e(Zu).toSelf().inSingletonScope(),e(im).toSelf().inSingletonScope(),e(dm).toSelf().inSingletonScope(),e(sm).toSelf().inSingletonScope(),e(rm).toSelf().inSingletonScope(),e(gm).toSelf().inSingletonScope(),e(pm).toSelf().inSingletonScope()});function xm(){const e=new An.mc,t=window.HEAVENT_TRANSLATIONS||{},n=window.HEAVENT_LANGUAGE;if(0===Object.keys(t).length)throw new Error("window.HEAVENT_TRANSLATIONS does not exist");if(!nl(n))throw new Error("window.HEAVENT_LANGUAGE is not valid");return e.bind(Si).toConstantValue(new Si(nl(n),t)),e.load(fm,Im,_m),e}const ym=e=>(0,i.jsx)(ji.Provider,{value:{container:xm(),useQuery:so,useMutation:io,useExecuteQuery:xs,useParams:ro,useHistory:lo,useLocation:co,useLocalStorage:uo},children:e.children}),Sm=()=>((0,l.useEffect)(()=>{us().then(e=>{"true"===ia.LOG_TOKEN&&console.log(`"${ts}": "${e||""}"`)})},[]),null),jm=e=>{const t=Mi(),n=Ri();return(0,l.useEffect)(()=>{h(e.path)&&(e.replace?n.replace(e.path,e.state):n.push(e.path,e.state)),e.push&&n.push(e.push(t),e.state),e.onLoad&&e.onLoad()},[]),(0,i.jsx)("div",{})},vm=e=>{const t=Mi(),{user:n}=to();return n&&e.shouldHaveUser||!n&&!e.shouldHaveUser?(0,i.jsx)(i.Fragment,{children:e.children}):(0,i.jsx)(jm,{path:e.getRedirectPath(t),replace:!0})},bm={PLURAL:"accreditation-categories",SINGLE:"accreditation-category"},Am={PLURAL:"accreditations",SINGLE:"accreditation"},Cm={PLURAL:"slots",SINGLE:"slot"},Em="dashboard",Tm="member",Mm="members",Rm={ACCREDITATION_CATEGORIES:bm.PLURAL,ACCREDITATION_CATEGORY:e=>vr([bm.SINGLE,e]),ACCREDITATIONS:Am.PLURAL,ACCREDITATION:e=>vr([Am.SINGLE,e]),ACCREDITATION_SLOTS:Cm.PLURAL,ACCREDITATION_SLOT:e=>vr([Cm.SINGLE,e])},Dm={ACCREDITATION_CATEGORY:({accreditationCategoryId:e,...t})=>vr([sc.EVENT(t),Rm.ACCREDITATION_CATEGORY(e)]),ACCREDITATION_CATEGORY_DASHBOARD:e=>vr([Dm.ACCREDITATION_CATEGORY(e),Em]),ACCREDITATION_CATEGORY_MEMBERS:e=>vr([Dm.ACCREDITATION_CATEGORY(e),Mm])},Om={ACCREDITATIONS_IMPORT:e=>vr([sc.EVENT(e),Rm.ACCREDITATIONS,Cr.IMPORT]),ACCREDITATIONS:e=>vr([sc.EVENT(e),Rm.ACCREDITATIONS]),ACCREDITATION:({accreditationId:e,...t})=>vr([sc.EVENT(t),Rm.ACCREDITATION(e)]),ACCREDITATION_DASHBOARD:e=>vr([Om.ACCREDITATION(e),Em]),ACCREDITATION_MEMBERS:e=>vr([Om.ACCREDITATION(e),Mm]),ACCREDITATION_MEMBER:({userInfoId:e,...t})=>vr([Om.ACCREDITATION_MEMBERS(t),Tm,e]),ACCREDITATION_MEMBER_INFORMATION:e=>vr([Om.ACCREDITATION_MEMBER(e),Er.INFORMATION])},wm={ACCREDITATION_SLOT:({accreditationSlotId:e,...t})=>vr([Pm.ACCREDITATION(t),Rm.ACCREDITATION_SLOT(e)]),ACCREDITATION_SLOT_DASHBOARD:e=>vr([wm.ACCREDITATION_SLOT(e),Em]),ACCREDITATION_SLOT_MEMBERS:e=>vr([wm.ACCREDITATION_SLOT(e),Mm])},Pm={...Dm,...Om,...wm},$m={ITEMS:{POSITIONS_CATEGORIES:{PLURAL:"position-categories",SINGLE:"position-category"},POSITIONS:{PLURAL:"positions",SINGLE:"position"},POSITION_SLOTS:{PLURAL:"slots",SINGLE:"slot"}},ACTIONS:{IMPORT:{CSV:`${Cr.IMPORT}/csv`}},SECTIONS:{PREASSIGNED_MEMBERS:"preassigned-members",PLANNING:"planning"}},km={POSITION_CATEGORIES:$m.ITEMS.POSITIONS_CATEGORIES.PLURAL,POSITION_CATEGORY:e=>vr([$m.ITEMS.POSITIONS_CATEGORIES.SINGLE,e]),POSITIONS:$m.ITEMS.POSITIONS.PLURAL,POSITION:e=>vr([$m.ITEMS.POSITIONS.SINGLE,e]),POSITION_SLOTS:$m.ITEMS.POSITION_SLOTS.PLURAL,POSITION_SLOT:e=>vr([$m.ITEMS.POSITION_SLOTS.SINGLE,e])},Nm={POSITION_CATEGORY:({positionCategoryId:e,...t})=>vr([sc.EVENT(t),km.POSITION_CATEGORY(e)]),POSITION_CATEGORY_DASHBOARD:e=>vr([Nm.POSITION_CATEGORY(e),Er.DASHBOARD]),POSITION_CATEGORY_MEMBERS:e=>vr([Nm.POSITION_CATEGORY(e),Er.MEMBERS]),POSITION_CATEGORY_PREASSIGNED_MEMBERS:e=>vr([Nm.POSITION_CATEGORY(e),$m.SECTIONS.PREASSIGNED_MEMBERS])},zm={POSITIONS:e=>vr([sc.EVENT(e),km.POSITIONS]),POSITION:({positionId:e,positionCategoryId:t,...n})=>vr(t?[Nm.POSITION_CATEGORY({positionCategoryId:t,...n}),km.POSITION(e)]:[sc.EVENT(n),km.POSITION(e)]),POSITION_DASHBOARD:e=>vr([zm.POSITION(e),Er.DASHBOARD]),POSITION_MEMBERS:e=>vr([zm.POSITION(e),Er.MEMBERS]),POSITION_PREASSIGNED_MEMBERS:e=>vr([zm.POSITION(e),$m.SECTIONS.PREASSIGNED_MEMBERS]),POSITION_PLANNING:e=>vr([zm.POSITION(e),$m.SECTIONS.PLANNING]),POSITION_MEMBER:({userInfoId:e,...t})=>vr([zm.POSITION_MEMBERS(t),Er.MEMBER,e]),POSITION_MEMBER_INFORMATION:e=>vr([zm.POSITION_MEMBER(e),Er.INFORMATION]),POSITION_IMPORT_CSV:e=>vr([sc.EVENT(e),$m.ACTIONS.IMPORT.CSV])},Lm={POSITION_SLOTS:e=>vr([zm.POSITION(e),km.POSITION_SLOTS]),POSITION_SLOT:({positionSlotId:e,...t})=>vr([zm.POSITION(t),km.POSITION_SLOT(e)])},Fm={...Nm,...zm,...Lm},Um="/auth",Bm=`${Um}/sign-in`,Vm=`${Um}/sign-up`,Gm="/backoffice",Wm=e=>`${Ec.ORGANIZATION({organizationId:e})}/parameters`,qm=(e,t,n,i)=>`${Fm.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/check-members`,Ym=(e,t,n,i)=>`${Fm.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/members`,Hm=(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/volunteers`,Zm=(e,t)=>`${Hm(e,t)}/search`,Km=(e,t,n)=>`${Zm(e,t)}/volunteer/${n}`,Qm=(e,t,n)=>`${Hm(e,t)}/${n}`,Xm=(e,t,n,i)=>`${Qm(e,t,n)}/volunteer/${i}`,Jm=(e,t,n,i)=>`${Qm(e,t,n)}/volunteer-panel/${i}`,eg=(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/emails`,tg=(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/options`,ng=(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/dashboard`,ig={HOME:`/${br}`,UNSUBSCRIBE_EMAIL:"/unsubscribe-email",USER_UPDATE_BY_TICKET_ID:(e,t)=>`/organization/${e}/update-by-ticket-id/field/${t}`,USER_FIELD_UPDATE:(e,t,n,i)=>`/organization/${e}/user/${t}/field/${n}/update/${i}`,USER_EVENT_UNREGISTER:(e,t,n)=>`/organization/${e}/user/${t}/event/${n}/unregister`,USER_CHECK_IN:(e,t)=>`/organization/${e}/user/${t}/check-in`,USER_CHECK_OUT:(e,t)=>`/organization/${e}/user/${t}/check-out`,AUTH:Um,AUTH_FORGOT_PASSWORD:`${Um}/forgot-password`,AUTH_SIGN_IN:Bm,AUTH_SIGN_UP:Vm,AUTH_SIGN_IN_EMAIL:`${Bm}/email`,AUTH_SIGN_IN_CODE:`${Bm}/code`,AUTH_SIGN_UP_CREDENTIALS:`${Vm}/credentials`,AUTH_SIGN_UP_CODE:`${Vm}/code`,COGNITO_CALLBACK:"/cognito-callback",MAGIC_LINK:(e,t)=>`/magic-link/${e}/${t}`,ACCEPT_TERMS_AND_CONDITIONS:e=>`${Ec.ORGANIZATION({organizationId:e})}/accept-terms-and-conditions`,BACKOFFICE:Gm,BACKOFFICE_ORGANIZATIONS:`${Gm}/organizations`,EDIT_BACKOFFICE_ORGANIZATION:e=>`${Gm}/organization/${e}/edit`,BACKOFFICE_INVOICES:`${Gm}/invoices`,ORGANIZATION_PARAMETERS:Wm,ORGANIZATION_PARAMETERS_PROFILE:e=>`${Wm(e)}/profile`,ORGANIZATION_PARAMETERS_INFOS:e=>`${Wm(e)}/general`,ORGANIZATION_PARAMETERS_TEAM:e=>`${Wm(e)}/team`,ORGANIZATION_PARAMETERS_GROUPS:e=>`${Wm(e)}/groups`,CREATE_ORGANIZATION_PARAMETERS_GROUP:e=>`${Wm(e)}/groups/create`,EDIT_ORGANIZATION_PARAMETERS_GROUP:(e,t)=>`${Wm(e)}/groups/group/${t}/edit`,ORGANIZATION_PARAMETERS_ROLES:e=>`${Wm(e)}/roles`,CREATE_ORGANIZATION_PARAMETERS_ROLE:e=>`${Wm(e)}/roles/create`,EDIT_ORGANIZATION_PARAMETERS_ROLE:(e,t)=>`${Wm(e)}/roles/role/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS:e=>`${Wm(e)}/emails`,CREATE_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${Wm(e)}/emails/senders/create`,EDIT_ORGANIZATION_PARAMETERS_EMAILS_SENDERS:(e,t)=>`${Wm(e)}/emails/senders/${t}/edit`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS:e=>`${Wm(e)}/emails/senders`,ORGANIZATION_PARAMETERS_EMAILS_SENDERS_PREVIEW:(e,t)=>`${Wm(e)}/emails/senders/${t}/preview`,ORGANIZATION_PARAMETERS_EMAILS_DNS:e=>`${Wm(e)}/emails/dns`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE:e=>`${Wm(e)}/delegations-space`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_DESIGN:e=>`${Wm(e)}/delegations-space/design`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_INTEGRATION:e=>`${Wm(e)}/delegations-space/integration`,ORGANIZATION_PARAMETERS_DELEGATIONS_SPACE_EMAILS:e=>`${Wm(e)}/delegations-space/emails`,ORGANIZATION_PARAMETERS_CATEGORIES:e=>`${Wm(e)}/categories`,ORGANIZATION_PARAMETERS_CATEGORIES_CUSTOM_FIELDS:e=>`${Wm(e)}/categories/custom-fields`,ORGANIZATION_PARAMETERS_CATEGORIES_POSITIONS:e=>`${Wm(e)}/categories/positions`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS:e=>`${Wm(e)}/categories/accreditations`,ORGANIZATION_PARAMETERS_CATEGORIES_ACCREDITATIONS_PROFILES:e=>`${Wm(e)}/categories/accreditation-profiles`,ORGANIZATION_PARAMETERS_CATEGORIES_DELEGATIONS:e=>`${Wm(e)}/categories/delegations`,ORGANIZATION_PARAMETERS_TAGS:e=>`${Wm(e)}/tags`,ORGANIZATION_PARAMETERS_TRANSLATIONS:e=>`${Wm(e)}/translations`,ORGANIZATION_PARAMETERS_INVOICES:e=>`${Wm(e)}/invoices`,ORGANIZATION_PARAMETERS_ACTIVITY:e=>`${Wm(e)}/activity`,ORGANIZATION_PARAMETERS_SKIDATA:e=>`${Wm(e)}/skidata`,ORGANIZATION_PARAMETERS_ORGANIZATION_SWITCH:e=>`${Wm(e)}/organization-switch`,ORGANIZATION_PARAMETERS_DELETE_ACCOUNT:e=>`${Wm(e)}/delete-account`,COMMUNITY_USERS_SEGMENT:(e,t)=>`${Ec.ORGANIZATION({organizationId:e})}/community/users/${t}`,COMMUNITY_USERS_USER:(e,t,n)=>`${Ec.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}`,COMMUNITY_USERS_USER_INFORMATIONS:(e,t,n)=>`${Ec.ORGANIZATION({organizationId:e})}/community/users/${t}/user/${n}/${Er.INFORMATION}`,COMMUNITY_USERS_DUPLICATES:e=>`${Ec.ORGANIZATION({organizationId:e})}/community/users-duplicates`,COMMUNITY_EDIT_USER:(e,t)=>`${Ec.ORGANIZATION({organizationId:e})}/community/user/${t}/edit`,COMMUNITY_EDIT_USER_FORM:(e,t,n)=>`${Ec.ORGANIZATION({organizationId:e})}/community/user/${t}/edit/form/${n}`,COMMUNITY_VOLUNTEERS_IMPORT:e=>`${Ec.ORGANIZATION({organizationId:e})}/community/import`,COMMUNITY_FILES_IMPORT:e=>`${Ec.ORGANIZATION({organizationId:e})}/community/documents-import`,COMMUNITY_DELEGATIONS:e=>`${Ec.ORGANIZATION({organizationId:e})}/community/delegations`,COMMUNITY_DELEGATIONS_SEGMENT:(e,t)=>`${Ec.ORGANIZATION({organizationId:e})}/community/delegations/${t}`,COMMUNITY_DELEGATION:(e,t)=>`${Ec.ORGANIZATION({organizationId:e})}/community/delegation/${t}`,COMMUNITY_CREATE_DELEGATION(e,t){let n=`${Ec.ORGANIZATION({organizationId:e})}/community/create-delegation`;return t&&(n=`${n}/${t}`),n},COMMUNITY_EDIT_DELEGATION:(e,t)=>`${Ec.ORGANIZATION({organizationId:e})}/community/delegation/${t}/edit`,CREATE_EVENT_WITH_ORGANIZATION(e){let t="/create-event";return e&&(t=`${t}/${e}`),t},CREATE_EVENT:e=>`${Ec.ORGANIZATION({organizationId:e})}/create-event`,EVENTS_SEGMENT:(e,t)=>`${Ec.ORGANIZATION({organizationId:e})}/events/${t}`,EVENT_DELEGATIONS_IMPORT:(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/delegations-import`,EVENT_VOLUNTEERS_IMPORT:(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/members-import`,EVENT_FILES_IMPORT:(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/documents-import`,EDIT_EVENT:(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/edit`,DASHBOARD:ng,DASHBOARD_EVENT_SWITCH:(e,t)=>`${ng(e,t)}/event-switch`,POSITION_MEMBERS_USER:(e,t,n,i,a)=>`${Fm.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${a}`,POSITION_MEMBERS_USER_INFORMATIONS:(e,t,n,i,a)=>`${Fm.POSITION_MEMBERS({organizationId:e,eventId:t,positionCategoryId:n,positionId:i})}/${a}/${Er.INFORMATION}`,EXPORT_POSITIONS_MAP:(e,t)=>`/export/event/${e}/positions/${t}/map`,POSITIONS_SEARCH:(e,t)=>`${Fm.POSITIONS({organizationId:e,eventId:t})}/search`,POSITIONS_SEGMENT:(e,t,n)=>`${Fm.POSITIONS({organizationId:e,eventId:t})}/${n}`,CREATE_POSITION(e,t,n){let i=`${sc.EVENT({organizationId:e,eventId:t})}/create-position`;return n&&(i=`${i}/${n}`),i},POSITION_MAP:(e,t)=>`/position/${e}-${t}/map`,POSITION_SETTINGS:(e,t,n)=>`${Fm.POSITION({organizationId:e,eventId:t,positionId:n})}/settings`,EDIT_POSITION:(e,t,n)=>`${Fm.POSITION({organizationId:e,eventId:t,positionId:n})}/edit`,POSITION_SLOT_ASSIGN_VOLUNTEERS:(e,t,n,i)=>`${Fm.POSITION_SLOT({organizationId:e,eventId:t,positionId:n,positionSlotId:i})}/assign-volunteers`,POSITION_SLOT_MEMBERS:Ym,POSITION_SLOT_MEMBERS_USER:(e,t,n,i,a)=>`${Ym(e,t,n,i)}/${a}`,POSITION_SLOT_MEMBERS_USER_INFORMATIONS:(e,t,n,i,a)=>`${Ym(e,t,n,i)}/${a}/${Er.INFORMATION}`,POSITION_SLOT_MEMBERS_CHECK_OPTIONS:(e,t,n,i)=>`${Ym(e,t,n,i)}/check-options`,POSITION_SLOT_CHECK_MEMBERS_CHECK_IN:(e,t,n,i)=>`${qm(e,t,n,i)}/check-in`,POSITION_SLOT_CHECK_MEMBERS_CHECK_OUT:(e,t,n,i)=>`${qm(e,t,n,i)}/check-out`,POSITION_SLOT_CHECK_MEMBERS_RESET:(e,t,n,i)=>`${qm(e,t,n,i)}/reset`,VOLUNTEERS:Hm,VOLUNTEERS_SEARCH:Zm,VOLUNTEERS_SEARCH_USER:Km,VOLUNTEERS_SEARCH_USER_INFORMATIONS:(e,t,n)=>`${Km(e,t,n)}/${Er.INFORMATION}`,VOLUNTEERS_SEGMENT:(e,t,n)=>`${Hm(e,t)}/${n}`,VOLUNTEERS_LIST_USER:Xm,VOLUNTEERS_LIST_USER_INFORMATIONS:(e,t,n,i)=>`${Xm(e,t,n,i)}/${Er.INFORMATION}`,VOLUNTEERS_LIST_USER_PANEL:Jm,VOLUNTEERS_LIST_USER_PANEL_ACCREDITATIONS:(e,t,n,i)=>`${Jm(e,t,n,i)}/accreditations`,VOLUNTEERS_LIST_USER_PANEL_AVAILABILITIES:(e,t,n,i)=>`${Jm(e,t,n,i)}/availabilities`,VOLUNTEERS_LIST_USER_PANEL_POSITIONS:(e,t,n,i)=>`${Jm(e,t,n,i)}/positions`,VOLUNTEERS_LIST_USER_PANEL_TEAM:(e,t,n,i,a)=>`${Jm(e,t,n,i)}/team/${a}`,EDIT_USER:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit`,EDIT_USER_FORM:(e,t,n,i)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit/form/${i}`,EDIT_USER_MISSIONS:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions`,EDIT_USER_MISSIONS_FORM:(e,t,n,i)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-missions/form/${i}`,EDIT_USER_SLOTS:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots`,EDIT_USER_SLOTS_FORM:(e,t,n,i)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-slots/form/${i}`,EDIT_USER_ACCREDITATIONS:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations`,EDIT_USER_ACCREDITATIONS_FORM:(e,t,n,i)=>`${sc.EVENT({organizationId:e,eventId:t})}/user/${n}/edit-accreditations/form/${i}`,ASSIGNMENTS:(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/assignments`,ASSIGNMENT:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/assignment/${n}`,EDIT_ASSIGNMENT:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/edit-assignment/${n}`,TEAM_ASSIGNMENT:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/team-assignment/${n}`,PRE_ASSIGNMENT:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/pre-assignment/${n}`,ACCREDITATIONS_ASSIGNMENTS:(e,t)=>`${sc.EVENT({organizationId:e,eventId:t})}/accreditations-assignments`,ACCREDIT:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/accredit/${n}`,EDIT_ACCREDIT:(e,t,n)=>`${sc.EVENT({organizationId:e,eventId:t})}/edit-accredit/${n}`,EVENT_EMAILS:eg,EVENT_EMAILS_PARAMETERS:(e,t)=>`${eg(e,t)}/parameters`,OPTIONS:tg,OPTIONS_API:(e,t)=>`${tg(e,t)}/api`,OPTIONS_WEEZEVENT:(e,t)=>`${tg(e,t)}/weezevent`,ACCREDITATIONS_SEGMENT:(e,t,n)=>`${Pm.ACCREDITATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_ACCREDITATION(e,t,n){let i=`${sc.EVENT({organizationId:e,eventId:t})}/create-accreditation`;return n&&(i=`${i}/${n}`),i},EDIT_ACCREDITATION:(e,t,n)=>`${Pm.ACCREDITATION({organizationId:e,eventId:t,accreditationId:n})}/edit`,ACCREDITATION_MAP:(e,t)=>`/accreditation/${e}-${t}/map`,DELEGATIONS_SEGMENT:(e,t,n)=>`${Wc.DELEGATIONS({organizationId:e,eventId:t})}/${n}`,CREATE_DELEGATION(e,t,n){let i=`${sc.EVENT({organizationId:e,eventId:t})}/create-delegation`;return n&&(i=`${i}/${n}`),i},EDIT_DELEGATION:(e,t,n)=>`${Wc.DELEGATION({organizationId:e,eventId:t,delegationId:n})}/edit`},ag=(e,t)=>`/volunteers/${e}-${t}`,sg=(e,t)=>`${ag(e,t)}/assignments`,og=(e,t)=>`${ag(e,t)}/auth`,rg=(e,t,n,i)=>`/magic-link/${e}/${t}/${n}/${i}`,lg=(e,t)=>`${ag(e,t)}/register`,dg=sg;function cg(e,t){return e&&!t.startsWith("/embed")?`/embed${t}`:t}const ug=()=>{const{code:e,source:t,organizationId:n,eventId:i}=Mi();return(0,l.useEffect)(()=>{const s=localStorage.getItem(os),o=localStorage.getItem(ss);if(h(s)&&h(o)&&h(e)&&h(t)){localStorage.removeItem(os),localStorage.removeItem(ss);const r=new as.TU({Username:s,Pool:ds()});r.Session=o,r.setAuthenticationFlowType("CUSTOM_AUTH"),r.sendCustomChallengeAnswer(e,{async onSuccess(e){const a=e.getIdToken().getJwtToken();await _s(ys,{token:a}),n&&i&&t===Qe.VolunteerRegister?location.href=lg(n,i):n&&i&&t===Qe.VolunteerAssignments?location.href=dg(n,i):t===Qe.App?location.href=ig.HOME:location.href="/"},onFailure(e){a("Could not sendCustomChallengeAnswer",e),location.href="/"}})}else location.href="/"},[]),null},mg=n.p+"img/asoFavicon-54a1d8b7694af9631875.png",gg=n.p+"img/faviconWeezcrew-d996db40808b25d12473.png",hg=n.p+"img/netflixFavicon-a36aceec7edf22da5a10.png",pg=n.p+"img/partageTaPassionFavicon-b06b908163009e73794c.png";function fg(e){(0,l.useEffect)(()=>{const t=document.title;return document.title=(n=location.host,`${h(i=e)?`${i} | `:""}${function(e){return e===Mc?"Partage Ta Passion":e===wc?"One Piece":e===Oc?"A.S.O.":Zr}(n)}`),()=>{document.title=t};var n,i},[e])}const Ig={PLURAL:"members",SINGLE:"member"},_g={PLURAL:"profiles",SINGLE:"profile"},xg="accreditations",yg="actions",Sg="availabilities",jg="campaigns",vg="changes",bg="comments",Ag="documents",Cg="events",Eg="form",Tg="forms",Mg="history",Rg="informations",Dg="messages",Og="positions",wg="scans",Pg="segments",$g=e=>vr([Ig.SINGLE,e]),kg=e=>vr([_g.SINGLE,e]),Ng={USER_PROFILE:({userInfoId:e,...t})=>vr([Ec.ORGANIZATION(t),kg(e)]),USER_PROFILES:e=>vr([Ec.ORGANIZATION(e),_g.PLURAL]),ORGANIZATION_MEMBERS:e=>vr([Ec.ORGANIZATION(e),Ig.PLURAL]),MEMBERS:e=>vr(["delegationId"in e?Wc.DELEGATION(e):"eventId"in e&&e.eventId?sc.EVENT(e):tc.COMMUNITY(e),Ig.PLURAL]),MEMBER:({userInfoId:e,...t})=>vr(["eventId"in t&&t.eventId?sc.EVENT(t):tc.COMMUNITY(t),$g(e)]),MEMBER_INFORMATION:e=>vr([Ng.MEMBER(e),Rg]),MEMBER_ACTIONS:e=>vr([Ng.MEMBER(e),yg]),MEMBER_AVAILABILITIES:e=>vr([Ng.MEMBER(e),Sg]),MEMBER_COMMENTS:e=>vr([Ng.MEMBER(e),bg]),MEMBER_HISTORY:e=>vr([Ng.MEMBER(e),Mg]),MEMBER_HISTORY_CHANGES:e=>vr([Ng.MEMBER(e),Mg,vg]),MEMBER_HISTORY_CAMPAIGNS:e=>vr([Ng.MEMBER(e),Mg,jg]),MEMBER_HISTORY_EVENTS:e=>vr([Ng.MEMBER(e),Mg,Cg]),MEMBER_HISTORY_FORMS:e=>vr([Ng.MEMBER(e),Mg,Tg]),MEMBER_HISTORY_SCANS:e=>vr([Ng.MEMBER(e),Mg,wg]),MEMBER_HISTORY_SEGMENTS:e=>vr([Ng.MEMBER(e),Mg,Pg]),MEMBER_POSITIONS:e=>vr([Ng.MEMBER(e),Og]),MEMBER_ACCREDITATIONS:e=>vr([Ng.MEMBER(e),xg]),MEMBER_FORMS:e=>vr([Ng.MEMBER(e),Tg]),MEMBER_FORM:e=>vr([Ng.MEMBER(e),Eg,e.formId]),MEMBER_FORM_EDIT:e=>Or(Ng.MEMBER_FORM(e)),MEMBER_MESSAGES:e=>vr([Ng.MEMBER(e),Dg]),MEMBER_DOCUMENTS:e=>vr([Ng.MEMBER(e),Ag]),CREATE:e=>Dr(Ng.MEMBERS(e))};function zg(){return{history:Ri(),params:Mi(),translate:Ai()}}function Lg(e){try{return location.host===Mc&&e===$c[Mc]}catch{return!1}}function Fg(e){try{return location.host===Oc&&e===$c[Oc]}catch{return!1}}function Ug(e){return e?new Promise((t,n)=>{const i=new Image;i.onload=()=>{t(i)},i.onerror=()=>{n(new Error("Could not load image"))},i.src=e}):Promise.resolve(null)}function Bg(e){const t=C({colors:{...qr(e)}});document.getElementById("heavent-react-hook")?.classList.add(t.toString())}const Vg=l.createContext({}),Gg=e=>{const{data:t,isLoading:n}=Ei("query OrganizationPublic(\n $organizationId: OrganizationId!\n $loadDelegationsSpace: Boolean!\n $loadMembersSpace: Boolean!\n) {\n organization: organizationPublic(id: $organizationId) {\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace)\n @include(if: $loadDelegationsSpace) {\n ...DesignColors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n\n membersSpaceDesign: spaceDesign(spaceType: MembersSpace) @include(if: $loadMembersSpace) {\n ...DesignColors\n\n banner {\n url\n }\n\n logo {\n url\n }\n }\n }\n}\n",{organizationId:e.organizationId,loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace},[ka.DesignColorsFragment]);const[a,s]=l.useState(void 0),[o,r]=l.useState(void 0),[d,c]=l.useState(!0);return l.useEffect(()=>{t.organization&&(Bg(t.organization?.delegationsSpaceDesign?.colors??t.organization.membersSpaceDesign?.colors??{}),(async()=>{t.organization.delegationsSpaceDesign?(await Promise.all([Ug(t.organization.delegationsSpaceDesign?.banner?.url),Ug(t.organization.delegationsSpaceDesign?.logo?.url)]),s(t.organization.delegationsSpaceDesign?.banner?.url),r(t.organization.delegationsSpaceDesign?.logo?.url),c(!1)):t.organization.membersSpaceDesign?(await Promise.all([Ug(t.organization.membersSpaceDesign?.banner?.url),Ug(t.organization.membersSpaceDesign?.logo?.url)]),s(t.organization.membersSpaceDesign?.banner?.url),r(t.organization.membersSpaceDesign?.logo?.url),c(!1)):c(!1)})())},[t.organization]),(0,i.jsx)(Vg.Provider,{value:{bannerUrl:a,logoUrl:o},children:n||d||!0===e.isLoading?e.skeleton:e.children})};var Wg=n(924),qg=n(952);const Yg=(0,l.createContext)({}),Hg=j("div",{variants:{height:{default:{height:"100%"},1:{minHeight:"$space$1"},2:{minHeight:"$space$2"},3:{minHeight:"$space$3"},4:{minHeight:"$space$4"},5:{minHeight:"$space$5"},6:{minHeight:"$space$6"},7:{minHeight:"$space$7"},8:{minHeight:"$space$8"},9:{minHeight:"$space$9"},10:{minHeight:"$space$10"},11:{minHeight:"$space$11"},12:{minHeight:"$space$12"},13:{minHeight:"$space$13"}},width:{default:{width:"100%"},1:{minWidth:"$space$1"},2:{minWidth:"$space$2"},3:{minWidth:"$space$3"},4:{minWidth:"$space$4"},5:{minWidth:"$space$5"},6:{minWidth:"$space$6"},7:{minWidth:"$space$7"},8:{minWidth:"$space$8"},9:{minWidth:"$space$9"},10:{minWidth:"$space$10"},11:{minWidth:"$space$11"},12:{minWidth:"$space$12"},13:{minWidth:"$space$13"}}},defaultVariants:{height:"default",width:"default"}});var Zg=n(2695);const Kg=e=>{const t={iconStyle:"solid"};switch(e.iconStyle){case"error":return(0,i.jsx)(ra,{className:"h-alert-icon",icon:"circle-exclamation",...t});case"warning":return(0,i.jsx)(ra,{className:"h-alert-icon",icon:"triangle-exclamation",...t});case"success":return(0,i.jsx)(ra,{className:"h-alert-icon",icon:"circle-check",...t});case"primary":case"gray":return(0,i.jsx)(ra,{className:"h-alert-icon",icon:"circle-info",...t});default:tr(e.iconStyle)}},Qg=j($,{borderRadius:"$1",alignItems:"flex-start",gap:"$2",padding:"$4","& i":{fontSize:"$textMd"},variants:{alertStyle:{error:{background:"$error50",border:"1px solid $error500",color:"$gray800","& i.h-alert-icon":{color:"$error500"}},warning:{background:"$warning50",border:"1px solid $warning500",color:"$gray800","& i.h-alert-icon":{color:"$warning500"}},success:{background:"$success50",border:"1px solid $success500",color:"$gray800","& i.h-alert-icon":{color:"$success500"}},primary:{background:"$primary50",border:"1px solid $primary500",color:"$gray800","& i.h-alert-icon":{color:"$primary500"}},gray:{background:"$gray50",border:"1px solid $gray500",color:"$gray800","& i.h-alert-icon":{color:"$gray500"}}}},defaultVariants:{alertStyle:"error"}}),Xg=({min:e=2,max:t=6,textStyle:n="heading",children:a,...s})=>{t{const i=e?.parentElement;if(!i||n===t)return n;for(const e of Array(i.children))if(e[0]instanceof HTMLHeadingElement)return c(i,++n);return c(i,n)},[t]);return l.useEffect(()=>d(`h${c(o.current?.parentElement,e)}`),[e,t]),(0,i.jsx)(N,{ref:o,as:r,...s,textStyle:n,children:a})},Jg=e=>{const{translate:t}=zg();return(0,i.jsxs)(Qg,{alertStyle:e.alertStyle,"aria-live":e["aria-live"]??"polite",role:"alert",width:e.width,children:[(0,i.jsx)($,{align:"start",children:(0,i.jsx)($i,{height:"20px",width:"20px",children:(0,i.jsx)(Kg,{iconStyle:e.alertStyle})})}),(0,i.jsx)($,{align:"start",css:{flex:"1",gap:"2px"},direction:"column",children:e.children}),e.onClose&&(0,i.jsx)(ga,{"aria-label":t("fermer_62479"),color:"invisible",css:{height:"20px",padding:0,width:"20px","& i":{color:"$gray500"}},textAlign:"center",onClick:e.onClose,children:(0,i.jsx)(ra,{icon:"xmark"})})]})},eh=({children:e})=>(0,i.jsx)(Xg,{css:{color:"$gray900",fontWeight:"$medium",fontSize:"$textSm",lineHeight:"1.42857"},children:e}),th=({children:e})=>(0,i.jsx)(i.Fragment,{children:e}),nh=e=>(0,i.jsxs)(Jg,{alertStyle:"error","aria-live":"assertive",children:[(0,i.jsx)(eh,{children:e.title}),(0,i.jsx)(th,{children:e.children})]});function ih(e){return e?(0,$a.A)(Object.values(e).map(e=>"string"==typeof e?e:Array.isArray(e)?(0,go.A)(e).map(e=>ih(e)).flat():ih(e)).flat()):[]}const ah=e=>{const{translate:t}=zg(),{formRenderProps:{errors:n,submitErrors:a},showErrors:s}=(0,l.useContext)(Yg),o=ih((0,Zg.A)({},n,a));return s&&F(o)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(nh,{title:t("form_has_errors_14074"),children:(0,i.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:o.map((e,t)=>(0,i.jsx)("li",{children:e},t))})}),!0!==e.hideSpacer&&(0,i.jsx)(Hg,{height:"6"})]}):null};function sh(e,t){Object.values(t.fields).forEach(e=>{e.data={...e.data,forceDisplayError:!0}})}const oh=e=>{const t=l.useRef(null),{setShowErrors:n}=l.useContext(Yg),a=()=>{const t=e.formRenderProps.handleSubmit();return t?.catch(e=>{console.debug("Form submission failed:",e)}),t},s=i=>(i?.preventDefault?.(),e.formRenderProps.invalid?(n(!0),e.formRenderProps.form.mutators.forceErrors(),setTimeout(()=>{e.customErrorRef&&e.customErrorRef.current?(e.customErrorRef.current.scrollIntoView(),e.customErrorRef.current.scrollTop=0):!e.hideDefaultErrors&&t.current&&(t.current.scrollIntoView(),t.current.scrollTop=0)},100),!e.formRenderProps.hasValidationErrors&&e.formRenderProps.hasSubmitErrors?a():void 0):a());return(0,i.jsxs)($,{ref:t,as:"form",onSubmit:s,...w(e),children:[!e.hideDefaultErrors&&!e.customErrorRef&&(0,i.jsx)(ah,{}),(0,i.jsx)("input",{style:{display:"none"},type:"submit",value:"Submit"}),e.render({...e.formRenderProps,handleSubmit:s})]})},rh=e=>{const t=bi(vu),[n,a]=l.useState(!1);return(0,i.jsx)(qg.lV,{initialValues:e.initialValues,initialValuesEqual:e.initialValuesEqual??ul.A,mutators:{...e.mutators,...Wg.A,forceErrors:sh},render:t=>(0,i.jsx)(Yg.Provider,{value:{formRenderProps:t,showErrors:n,setShowErrors:a},children:(0,i.jsx)(oh,{...(0,D.A)(e,["direction","align","justify","wrap","gap","css","height","width"]),customErrorRef:e.customErrorRef,formRenderProps:t,hideDefaultErrors:e.hideDefaultErrors,render:e.render})}),validate:n=>e.schema?t.validateForForm(e.schema)(n):"function"==typeof e.validate?e.validate(n):{},onSubmit:async(t,n,i)=>{const s=await e.onSubmit(t,n,i);return Object.keys(s||{}).length>0&&a(!0),s}})};var lh=n(9008);function dh(e){return e.data?.forceDisplayError&&e.invalid||e.touched&&!e.pristine&&e.invalid||!1}var ch=n(5664);function uh(){const[e]=(0,l.useState)(()=>(0,ch.A)("forminput-")),[t]=(0,l.useState)(()=>(0,ch.A)("forminputlabel-")),[n]=(0,l.useState)(()=>(0,ch.A)("forminputdesc-")),[i]=(0,l.useState)(()=>(0,ch.A)("forminputerror-"));return{inputId:e,labelId:t,descId:n,errorId:i}}const mh=({children:e,id:t})=>e?(0,i.jsx)($i,{color:"gray500",fontSize:"textXs",id:t,children:e}):null,gh=e=>e.children?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"error"===e.state?"error500":"gray500",fontSize:"textXs",id:e.id,role:"error"===e.state?"alert":void 0,children:e.children})]}):null,hh=({id:e,children:t,htmlFor:n,isClickable:a=!0})=>t?(0,i.jsx)("label",{htmlFor:n,id:e,style:{display:"block",cursor:"inherit",fontWeight:"$medium",marginBlockEnd:0},onClick:e=>{a||e.preventDefault()},children:(0,i.jsx)($i,{color:"gray700",fontWeight:"medium",children:t})}):null,ph=j("div",{alignItems:"center",borderRadius:"$1",display:"flex",gap:"$space$2",padding:"0 $space$3",position:"relative",width:"100%","& input::placeholder":{color:"$gray500"},"&:focus-within":{border:"2px solid $primaryCustom500"},variants:{state:{active:{backgroundColor:"white",border:"1px solid $gray300",color:"$gray900"},disabled:{background:"$gray50",border:"1px solid $gray300",color:"$gray500"},error:{backgroundColor:"white",border:"1px solid $error500"},search:{backgroundColor:"$gray100",border:"1px solid $gray300",color:"$gray500"}},cursor:{default:{cursor:"default"},text:{cursor:"text"},pointer:{cursor:"pointer"}},height:{fixed:{height:"40px"},fluid:{minHeight:"40px"}}},defaultVariants:{state:"active",height:"fixed"}}),fh=l.forwardRef(({height:e,cursor:t,css:n,icon:a,children:s,state:o,onClick:r,rightIcon:l,rightText:d,onRightIconClick:c,...u},m)=>(0,i.jsxs)(ph,{ref:m,className:"h-styled-input-container",css:n,cursor:t,height:e,state:o,onClick:e=>{r?.(e)},...u,children:[a&&(0,i.jsx)($,{css:{color:"$gray500"},role:"presentation",children:(0,i.jsx)(ra,{icon:a})}),s,"error"===o&&(0,i.jsx)($,{className:"styled-input-container-circle-exclamation",css:{color:"$error500"},children:(0,i.jsx)(ra,{icon:"circle-exclamation"})}),l&&(0,i.jsx)($,{css:{color:"$gray500",cursor:"function"==typeof c?"pointer":"inherit"},role:"presentation",onClick:e=>{c?.(e)},children:(0,i.jsx)(ra,{icon:l})}),h(d)&&(0,i.jsx)($i,{css:{userSelect:"none"},font:"gray500 textSm regular",children:d})]}));fh.displayName="StyledInputContainer";const Ih=l.forwardRef(({autoComplete:e,isEmail:t,shouldParseAsInt:n,css:a,label:s,description:o,hint:r,onRightIconClick:d,state:c,type:u,onChange:m,rightIcon:g,rightText:p,icon:f,treatIntNaNAsNull:I,..._},x)=>{const y=l.useRef(),S=l.useRef(),j=x??S,{inputId:v,descId:b,errorId:A}=uh();return(0,i.jsxs)($,{ref:y,css:a,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:v,children:s}),(0,i.jsx)(mh,{id:b,children:o}),(s||o)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(fh,{cursor:"text",icon:f,rightIcon:g,rightText:p,state:c,onClick:()=>j.current?.focus(),onRightIconClick:e=>{Ia(e),d?.(e)},children:(0,i.jsx)($i,{color:"inherit",css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%","&:disabled":{color:"$gray500"}},"& input::placeholder":{color:"search"===c?"$gray400":"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"search"===c?"$gray400":"$gray500",opacity:1}},children:(0,i.jsx)("input",{ref:j,"aria-describedby":o?b:void 0,"aria-errormessage":"error"===c?A:void 0,"aria-invalid":"error"===c,autoComplete:e??"off",disabled:"disabled"===c,id:v,type:u??(t?"email":n?"number":"text"),onChange:e=>{if(t&&h(e.target.value))m(e.target.value.toLowerCase());else if(!0===n){const t=parseInt(e.target.value,10);isNaN(t)?m(I?null:0):m(t)}else m(e.target.value)},..._})})}),(0,i.jsx)(gh,{id:A,state:c,children:r})]})});Ih.displayName="TextInput";const _h=({autoComplete:e,hint:t,shouldParseAsInt:n,name:a,state:s,...o})=>{const r=(0,l.useCallback)(e=>{switch(e){case ke.City:return"address-level1";case ke.DateOfBirth:return"bday";case ke.FirstName:return"given-name";case ke.LastName:return"family-name";case ke.PostalCode:return"postal-code";case ke.Street:return"street-address";case ke.Country:case ke.Language:case ke.Nationality:case ke.Phone:case ke.Picture:case ke.Sex:default:return}},[]),d=(0,l.useMemo)(()=>a.startsWith("formRegister.userInfo.fields.")?r(a.split(".").pop())??e:e,[a,e,r]),c=(0,l.useCallback)(e=>{const a=dh(e.meta);return(0,i.jsx)(Ih,{autoComplete:d,hint:a?e.meta.error||e.meta.submitError:t,shouldParseAsInt:n??!1,state:a?"error":s,value:e.input.value,onBlur:e.input.onBlur,onChange:t=>{e.input.onChange(t)},onFocus:e.input.onFocus,...o})},[t,n,s,d,o]);return(0,i.jsx)(qg.D0,{name:a,parse:lh.A,render:c})},xh={AUTH_EMAIL:"heavent-auth-email",BACKOFFICE_INVOICES_COLUMNS:"heavent-backoffice-invoices-columns",BACKOFFICE_COLUMNS:"heavent-backoffice-columns",BACKOFFICE_LIMIT:"heavent-backoffice-limit",BACKOFFICE_PREDICATES:"heavent-backoffice-predicates",BACKOFFICE_SEARCH:"heavent-backoffice-search",BACKOFFICE_SORT:"heavent-backoffice-sort",CURRENT_EVENT_ID:"heavent-current-event-id",CURRENT_EVENT_NAME:"heavent-current-event-name",CURRENT_ORGANIZATION_ID:"heavent-current-organization-id",DELEGATIONS_SPACE_TAB:"heavent-delegations-space-tab",EVENT_ID:"heavent-event-id",HIDE_HUBSPOT:"hide-hubspot",ORGANIZATION_ID:"heavent-organization-id",ACCREDITATIONS_IMPORT_FORMATS:"heavent-accreditations-import-formats",ACCREDITATIONS_IMPORT_MAPPINGS:"heavent-accreditations-import-mappings",ACCREDITATIONS_IMPORT_MODE:"heavent-accreditations-import-mode",ACCREDITATIONS_IMPORT_PRESETS:e=>`heavent-accreditations-import-presets-${e}`,ACCREDITATIONS_PROFILES_IMPORT_FORMATS:"heavent-accreditations-profiles-import-formats",ACCREDITATIONS_PROFILES_IMPORT_MAPPINGS:"heavent-accreditations-profiles-import-mappings",ACCREDITATIONS_PROFILES_IMPORT_MODE:"heavent-accreditations-profiles-import-mode",ACCREDITATIONS_PROFILES_IMPORT_PRESETS:e=>`heavent-accreditations-profiles-import-presets-${e}`,EVENTS_IMPORT_FORMATS:"heavent-events-import-formats",EVENTS_IMPORT_MAPPINGS:"heavent-events-import-mappings",EVENTS_IMPORT_MODE:"heavent-events-import-mode",EVENTS_IMPORT_PRESETS:e=>`heavent-events-import-presets-${e}`,POSITIONS_IMPORT_FORMATS:"heavent-positions-import-formats",POSITIONS_IMPORT_MAPPINGS:"heavent-positions-import-mappings",POSITIONS_IMPORT_MODE:"heavent-positions-import-mode",POSITIONS_IMPORT_PRESETS:e=>`heavent-positions-import-presets-${e}`,VOLUNTEERS_IMPORT_FORMATS:"heavent-volunteers-import-formats",VOLUNTEERS_IMPORT_MAPPINGS:"heavent-volunteers-import-mappings",VOLUNTEERS_IMPORT_MODE:"heavent-volunteers-import-mode",VOLUNTEERS_IMPORT_PRESETS:e=>`heavent-volunteers-import-presets-${e}`,DELEGATIONS_IMPORT_FORMATS:"heavent-delegations-import-formats",DELEGATIONS_IMPORT_MAPPINGS:"heavent-delegations-import-mappings",DELEGATIONS_IMPORT_PRESETS:e=>`heavent-delegations-import-presets-${e}`,DELEGATIONS_IMPORT_MODE:"heavent-delegations-import-mode",DELEGATION_MEMBERS_IMPORT_FORMATS:"heavent-delegation-members-import-formats",DELEGATION_MEMBERS_IMPORT_MAPPINGS:"heavent-delegation-members-import-mappings",DELEGATION_MEMBERS_IMPORT_PRESETS:e=>`heavent-delegation-members-import-presets-${e}`,DELEGATION_MEMBERS_IMPORT_MODE:"heavent-delegation-members-import-mode"};var yh=n(2302);const Sh=e=>{const t=Ai(),n=Di(),a=bi(vu),s=bi(Vo),{mutate:o}=ws(),[r,d]=(0,l.useState)(0),[c,u]=(0,l.useState)(null),m=location.pathname.includes("/delegations")||Fg(e.organizationId),g=(0,l.useCallback)(async t=>{await _s(ys,{token:t}),m?(n.removeItem(xh.DELEGATIONS_SPACE_TAB),location.pathname=`${ia.HEAVENT_PUBLIC_URL.pathname}${Rr(Ec.ORGANIZATION_DELEGATIONS({organizationId:e.organizationId}))}`):location.pathname=`${ia.HEAVENT_PUBLIC_URL.pathname}${Rr(Ng.USER_PROFILES({organizationId:e.organizationId}))}`},[m]),[h,p]=(0,l.useState)(0),[f,I]=(0,l.useState)(!1),[_,x]=(0,l.useState)(Date.now()),y=()=>{location.reload()},{connectionTitle:S,connectionSubtitle:j}=xr(e.organizationId);return(0,i.jsx)(rh,{css:{...e.css},direction:"column",initialValues:{email:"",code:""},render:({handleSubmit:e,submitting:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{color:"gray900",fontSize:{"@initial":"textXl","@tablet":"displaySm"},fontWeight:"semiBold",textAlign:{"@initial":"center","@desktop":"start"},children:t(m?S:"connexion_mon_39916")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)($i,{color:"gray500",textAlign:{"@initial":"center","@desktop":"start"},children:t(m?j:"connecter_vous_19749")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)(_h,{autoComplete:"email",isEmail:!0,label:t("adresse_e_mail_60930"),name:"email",placeholder:t("entrez_votre_ad_42451"),state:1===r||f?"disabled":"active"}),1===r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(_h,{autoComplete:"one-time-code",inputMode:"numeric",label:t("code_re_u_par_e_75150"),name:"code",pattern:"\\d*",placeholder:t("code_re_u_par_e_75150"),state:f?"disabled":void 0})]}),(0,i.jsx)(Hg,{height:"6"}),f?(0,i.jsx)(ga,{textAlign:"center",onClick:y,children:t("recommencer_14712")}):(0,i.jsx)(ga,{isLoading:n,textAlign:"center",onClick:e,children:t(0===r?"recevoir_un_cod_82139":"se_connecter_63820")})]}),validate:a.validateForForm(s.signInSchema()),onSubmit:async n=>{if(0!==r){const{user:e,callbacks:i}=c;return fs({code:n.code,user:e,callbacks:i}).then(g,e=>{if("RETRY"===e.type)return p(h+1),{code:t("le_code_n_est_p_95065",3-(h+1))};{let i;return Is(e.message,n.email,_),I(!0),i=wa.dw.fromMillis(Date.now()-_).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:i}}})}{await o({loginCodeEmail:{email:n.email,organizationId:e.organizationId,source:m?Qe.DelegationsSpace:Qe.MembersSpace}}),x(Date.now());const t=await ps(n.email,yh.A,yh.A);u(t),d(1)}}})};function jh(e){const t=window.matchMedia(e),[n,i]=(0,l.useState)(t.matches);return(0,l.useEffect)(()=>{const e=()=>i(t.matches);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},[n,e]),n}function vh(){return jh(y.desktop)}function bh(){return jh(y.tablet)}const Ah={Aso:{Aso:n(8301),HomeBackground:n(8144),Logo:n(0)},Blanks:{Accreditation:n(7008),Member:n(5594)},Maps:{GooglePlan:n(1416),GoogleSatellite:n(6954),IgnPlan:n(4025)},AvatarGroup:n(384),Background404:n(4236),FormPositionRanked:n(4628),FormPositionUnranked:n(1205),Google:n(1931),GoogleMaps:n(1446),Ign:n(9882),Login:n(2647),Login2x:n(2281),LogoWeezeventSquare:n(6041),NetflixWood:n(5095),UserProfile:n(8264),WeezConstruction:n(6400)},Ch={Alert:n(2630),Check:n(3780),DnsBlank:n(1037),DnsWrongDomain:n(8184),Done:n(8652),Done2:n(3574),FileBlank:n(7619),FileCSV:n(9625),FileJPG:n(6751),FilePDF:n(9848),FilePNG:n(6959),FileZIP:n(539),RecrewteerMarker:n(8798),Sad:n(5376),WeezeventBlankHandGlobe:n(2599),WeezeventBlankMessages:n(6687),WeezeventBlankPerson:n(7648),WeezeventBlankSwissArmyKnife:n(4362)},Eh=j("div",{display:"grid",variants:{align:{start:{alignItems:"start"},center:{alignItems:"center"},end:{alignItems:"end"}},gap:{1:{gap:"$1"},2:{gap:"$2"},3:{gap:"$3"},4:{gap:"$4"},5:{gap:"$5"},6:{gap:"$6"},7:{gap:"$7"},8:{gap:"$8"},9:{gap:"$9"},10:{gap:"$10"},11:{gap:"$11"},12:{gap:"$12"},13:{gap:"$13"}},columnGap:{1:{columnGap:"$1"},2:{columnGap:"$2"},3:{columnGap:"$3"},4:{columnGap:"$4"},5:{columnGap:"$5"},6:{columnGap:"$6"},7:{columnGap:"$7"},8:{columnGap:"$8"},9:{columnGap:"$9"},10:{columnGap:"$10"},11:{columnGap:"$11"},12:{columnGap:"$12"},13:{columnGap:"$13"}},rowGap:{1:{rowGap:"$1"},2:{rowGap:"$2"},3:{rowGap:"$3"},4:{rowGap:"$4"},5:{rowGap:"$5"},6:{rowGap:"$6"},7:{rowGap:"$7"},8:{rowGap:"$8"},9:{rowGap:"$9"},10:{rowGap:"$10"},11:{rowGap:"$11"},12:{rowGap:"$12"},13:{rowGap:"$13"}}}}),Th=l.forwardRef((e,t)=>{const n={gridTemplate:e.gridtemplate,gridTemplateColumns:e.gridtemplatecolumns,gridTemplateRows:e.gridtemplaterows};return e.height&&(n.height=O(e.height)),e.width&&(n.width=O(e.width)),(0,i.jsx)(Eh,{role:"grid",...e,ref:t,css:{...n,...e.css}})});Th.displayName="Grid";const Mh=e=>{const t=vh(),n=bh(),a=t?"720px 1fr":"1fr";return(0,i.jsxs)(Th,{gridtemplatecolumns:a,gridtemplaterows:"1fr",height:1,width:1,children:[t&&(0,i.jsx)($i,{css:{background:`url(${Ah.Aso.HomeBackground}) no-repeat`,backgroundSize:"cover",backgroundPosition:"center"}}),(0,i.jsxs)($,{align:"center",css:{overflow:"hidden"},direction:"column",children:[(0,i.jsx)(Hg,{height:"12"}),(0,i.jsx)($i,{height:t?160:n?133:96,width:t?383:n?272:231,children:(0,i.jsx)("img",{height:"100%",src:Ah.Aso.Logo,width:"100%"})}),(0,i.jsx)(Hg,{height:{"@initial":"10","@tablet":"13"}}),e.children]})]})},Rh=T({"0%":{opacity:1},"50%":{opacity:.4},"100%":{opacity:1}}),Dh=l.memo(function(e){const t="circular"===e.variant?e.size:e.height,n="circular"===e.variant?e.size:e.width;return(0,i.jsx)($i,{css:{animation:`${Rh} 1.5s ease-in-out 0.5s infinite`,background:"$gray200",borderRadius:"circular"===e.variant?"50%":e.borderRadius,color:"transparent",...e.css},height:t,width:n,children:e.children})}),Oh=()=>(0,i.jsx)(Mh,{children:(0,i.jsxs)($,{direction:"column",width:"$modalMd",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:28,width:1}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:42,width:1}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:38,width:1}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]})}),wh=()=>{const{organizationId:e}=Mi();return(0,i.jsx)(Gg,{loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,i.jsx)(Oh,{}),children:(0,i.jsx)(Mh,{children:(0,i.jsx)(Sh,{css:{width:"100%",px:"$6","@tablet":{maxWidth:"100%",px:"$12"},"@desktop":{width:"$modalMd",px:"$3"}},organizationId:e})})})};function Ph(e,t){return t.has("lang")?nl(t.get("lang"))||Ot.En:e||nl(navigator.language)||Ot.En}const $h=({css:e,children:t,hideIcon:n,to:a,...s})=>{const o=new URL(a.toString(),location.origin),r=n?void 0:["http:","https:"].includes(o.protocol)&&o.origin!==location.origin?"arrow-up-right-from-square":s.download?"arrow-down-to-bracket":void 0;return(0,i.jsx)($,{align:"center",as:"span",css:{cursor:"pointer",fontWeight:"$medium","&:hover":{textDecoration:"underline"},...e},gap:"2",children:(0,i.jsxs)(sa,{to:o,...s,children:[t,r&&(0,i.jsx)($i,{as:"span",css:{marginInlineStart:"$1"},children:(0,i.jsx)(ra,{icon:r})})]})})};$h.displayName="LinkText";const kh=e=>{const{translate:t}=zg(),{user:n}=to(),a=Ph(n?.language,new URL(location.href).searchParams),s=(0,l.useMemo)(()=>a===Ot.Fr?`${ia.HEAVENT_ASSETS_URL}/aso/cgus/cgu_fr.pdf`:a===Ot.Es?`${ia.HEAVENT_ASSETS_URL}/aso/cgus/cgu_es.pdf`:`${ia.HEAVENT_ASSETS_URL}/aso/cgus/cgu_en.pdf`,[a]),o=(0,l.useMemo)(()=>a===Ot.Fr?`${ia.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_fr.pdf`:a===Ot.Es?`${ia.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_es.pdf`:`${ia.HEAVENT_ASSETS_URL}/aso/cgus/confidentialite_en.pdf`,[a]);return(0,i.jsxs)($,{css:{alignItems:"center",background:"auth"===e.source?"#e20613":"transparent",color:"auth"===e.source?"white":"$gray500 ",fontWeight:"500",gap:"$4",py:"$4","& .h-dot":{display:"none"},"@tablet":{gap:"$7",justifyContent:"center",py:"10px","& .h-dot":{display:"block"}}},direction:{"@initial":"column","@tablet":"row"},width:1,children:[(0,i.jsx)($i,{children:(0,i.jsx)($h,{hideIcon:!0,to:s,children:t("aso_cgu")})}),(0,i.jsx)($i,{className:"h-dot",children:"•"}),(0,i.jsx)($i,{children:(0,i.jsx)($h,{hideIcon:!0,to:o,children:t("aso_confidentialite")})})]})},Nh=e=>(0,i.jsxs)($,{align:"center",css:{background:"white",paddingTop:"64px","@desktop":{paddingTop:"80px"}},direction:"column",height:1,width:1,children:[(0,i.jsx)($i,{height:68,width:185,children:(0,i.jsx)("img",{height:"100%",src:Ah.Aso.Aso,width:"100%"})}),(0,i.jsx)($i,{css:{minHeight:"148px","@desktop":{minHeight:"98px"}}}),(0,i.jsx)($,{css:{width:"100%",px:"$6","@tablet":{px:"0",width:"360px"},"@desktop":{px:"0",width:"640px"}},children:e.children}),(0,i.jsx)($i,{css:{flex:"1"}}),(0,i.jsx)(kh,{source:"auth"})]}),zh=()=>{const{params:{organizationId:e}}=zg();return(0,i.jsx)(Gg,{loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:e,skeleton:(0,i.jsx)(da,{}),children:(0,i.jsx)(Nh,{children:(0,i.jsx)(Sh,{css:{width:"100%"},organizationId:e})})})},Lh=()=>{const{params:{organizationId:e}}=zg(),{logoUrl:t}=l.useContext(Vg);return t?(0,i.jsx)($i,{css:{background:`url(${t})`,backgroundSize:"cover"},height:uu(e)?68:120,width:uu(e)?185:120}):null},Fh=()=>(0,i.jsx)($,{css:{marginBottom:"$9","@tablet":{marginBottom:"$10"}},justify:"center",width:1,children:(0,i.jsx)(Dh,{borderRadius:"$1",height:140,width:140})}),Uh=j("div",{alignItems:"center",background:"$grayCustom50",display:"flex",flexDirection:"column",height:"100%",overflowY:"auto",padding:"$4",gap:"$7",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),Bh={bd:!0,background:"white",padding:"$7 $4",width:"100%","@tablet":{padding:"$7"},"@desktop":{width:"$modalMd"}},Vh=()=>(0,i.jsxs)(Uh,{children:[(0,i.jsx)(Fh,{}),(0,i.jsxs)($,{css:Bh,direction:"column",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:28,width:1}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:42,width:1}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:38,width:1}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]})]}),Gh=e=>{const{organizationId:t}=Mi();return(0,i.jsx)(Gg,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace,organizationId:t,skeleton:(0,i.jsx)(Vh,{}),children:(0,i.jsxs)(Uh,{children:[(0,i.jsx)(Lh,{}),(0,i.jsx)(Sh,{css:Bh,organizationId:t})]})})},Wh=e=>{const{params:{organizationId:t}}=zg();return Lg(t)?(0,i.jsx)(wh,{}):Fg(t)?(0,i.jsx)(zh,{}):(0,i.jsx)(Gh,{loadDelegationsSpace:e.loadDelegationsSpace,loadMembersSpace:e.loadMembersSpace})},qh=e=>`/v2/organization/${e}`,Yh=(e,t)=>`${qh(e)}/member/${t}`,Hh=({organizationId:e,userInfoId:t,eventId:n})=>n?`${Yh(e,t)}/event/${n}`:`${Yh(e,t)}/community`,Zh=e=>qh(e),Kh=e=>`${qh(e)}/profiles`,Qh=(e,t)=>`${Yh(e,t)}/campaigns`,Xh=(e,t)=>`${Yh(e,t)}/documents`,Jh=Hh,ep=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/edit`,tp=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/information`,np=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/availability`,ip=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/positions`,ap=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/assignments`,sp=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations`,op=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/accreditations`,rp=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/information/edit`,lp=(e,t,n,i)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/information/edit/${i}`,dp=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/availability/edit`,cp=(e,t,n,i)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/availability/edit/${i}`,up=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/positions/edit`,mp=(e,t,n,i)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/positions/edit/${i}`,gp=(e,t,n)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit`,hp=(e,t,n,i)=>`${Hh({organizationId:e,userInfoId:t,eventId:n})}/desired-accreditations/edit/${i}`,pp=(e,t,n)=>`${qh(e)}/event/${t}/form/${n}`,fp=(e,t)=>`${qh(e)}/form/${t}`,Ip=(e,t,n,i)=>t?`${qh(e)}/event/${t}/form/${i}/delegation/${n}`:`${qh(e)}/form/${i}/delegation/${n}`,_p=(e,t,n,i)=>`${qh(e)}/event/${t}/form/${n}/team/${i}`,xp=()=>{const e=Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),t=Ng.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"}),n=[Jh({organizationId:":organizationId",userInfoId:":userInfoId"}),Jh({organizationId:":organizationId",userInfoId:":userInfoId"}),Jh({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"}),ep(":organizationId",":userInfoId",null),ep(":organizationId",":userInfoId",":eventId"),tp(":organizationId",":userInfoId",null),tp(":organizationId",":userInfoId",":eventId"),rp(":organizationId",":userInfoId",null),rp(":organizationId",":userInfoId",":eventId"),np(":organizationId",":userInfoId",":eventId"),dp(":organizationId",":userInfoId",":eventId"),ip(":organizationId",":userInfoId",":eventId"),up(":organizationId",":userInfoId",":eventId"),sp(":organizationId",":userInfoId",":eventId"),gp(":organizationId",":userInfoId",":eventId")],a=[lp(":organizationId",":userInfoId",null,":formId"),lp(":organizationId",":userInfoId",":eventId",":formId"),cp(":organizationId",":userInfoId",":eventId",":formId"),mp(":organizationId",":userInfoId",":eventId",":formId"),hp(":organizationId",":userInfoId",":eventId",":formId")];return(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId/delegation/:delegationId",to:Wc.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId/delegation/:delegationId",to:Wc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:"/v2/organization/:organizationId/event/:eventId/form/:formId",to:sc.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:"/v2/organization/:organizationId/form/:formId",to:Ec.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:"/v2/organization/:organizationId/delegations/auth",to:Mr(Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,i.jsx)(oo.rd,{exact:!0,from:Kh(":organizationId"),to:Rr(Ng.USER_PROFILES({organizationId:":organizationId"}))}),n.map(t=>(0,i.jsx)(oo.rd,{exact:!0,from:t,to:e},t)),a.map(e=>(0,i.jsx)(oo.rd,{exact:!0,from:e,to:t},e)),(0,i.jsx)(oo.rd,{exact:!0,from:ap(":organizationId",":userInfoId",":eventId"),to:Ng.MEMBER_POSITIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:op(":organizationId",":userInfoId",":eventId"),to:Ng.MEMBER_ACCREDITATIONS({organizationId:":organizationId",eventId:":eventId",userInfoId:":userInfoId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:Qh(":organizationId",":userInfoId"),to:Ng.MEMBER_MESSAGES({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:Xh(":organizationId",":userInfoId"),to:Ng.MEMBER_DOCUMENTS({organizationId:":organizationId",userInfoId:":userInfoId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:fp(":organizationId",":formId"),to:Ec.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:pp(":organizationId",":eventId",":formId"),to:sc.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:_p(":organizationId",":eventId",":formId",":teamCode"),to:sc.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"})}),(0,i.jsx)(oo.rd,{exact:!0,from:Ip(":organizationId",null,":delegationId",":formId"),to:Wc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(oo.rd,{exact:!0,from:Ip(":organizationId",":eventId",":delegationId",":formId"),to:Wc.DELEGATION_FORM({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})}),(0,i.jsx)(oo.rd,{from:Zh(":organizationId"),to:Ec.ORGANIZATION({organizationId:":organizationId"})})]})},yp=({acceptCustomColours:e,css:t,footer:n,header:a,heading:s,subtitle:o,children:r,...l})=>(0,i.jsxs)($,{as:R.Section,className:"card",css:{padding:"unset !important",bd:!0,inlineSize:"100%",backgroundColor:"$white","& .card":{backgroundColor:"$gray50","& .card__body":{padding:"$4 $5"}},...t},direction:"column",...l,children:[a||(s||o)&&(0,i.jsx)($,{align:"center",as:R.Header,css:{borderBlockEnd:"1px solid $gray200",padding:"$6 $7 $5 $7"},gap:"3",children:(0,i.jsxs)($i,{css:{flex:"1"},children:[s&&(0,i.jsx)(Xg,{css:e?{color:"$grayCustom900"}:void 0,children:s}),o&&(0,i.jsx)(N,{css:e?{color:"$grayCustom500"}:void 0,textStyle:"subtitle",children:o})]})}),(0,i.jsx)($,{className:"card__body",css:{gap:"$6",padding:"$6 $7","&:empty":{display:"none"}},direction:"column",children:r}),n&&(0,i.jsx)($,{as:R.Footer,css:{borderBlockStart:"1px solid $gray200",padding:"$6","&:empty":{display:"none"}},gap:"3",children:n})]}),Sp=e=>(0,i.jsx)($,{css:{bd:!0,alignSelf:"stretch",alignItems:"flex-start",padding:"$4",background:"$gray50"},direction:"column",gap:"3",children:e.children});function jp(e){return{[`${e} p.h-small`]:{fontSize:"12px"},[`${e} h2`]:{fontSize:"20px",fontWeight:"$semiBold"},[`${e} h3`]:{fontSize:"18px",fontWeight:"$semiBold"},[`${e} h4`]:{fontSize:"16px",fontWeight:"$semiBold"},[`${e} a`]:{color:"$primary500"},[`${e} blockquote`]:{borderLeft:"3px solid $gray200",fontStyle:"italic",marginLeft:0,marginRight:0,px:"$4","& p":{margin:0,paddingBottom:"$2",paddingTop:"$2"}}}}const vp=e=>(0,i.jsx)($i,{className:"h-rich-text",css:{...jp("&"),"& > p:first-child":{marginTop:0},"& > p:last-child":{marginBottom:0},"& figure":{margin:"auto","& img":{width:"100%"}},...e.css},dangerouslySetInnerHTML:{__html:e.text},width:1,onClick:e=>{const t=e.target;if(t){const n=t.closest("a");n&&(e.preventDefault(),window.open(n.getAttribute("href"),"_blank"))}}});function bp(){return jh(y.mobile)}const Ap=e=>{const t=bp();return(0,i.jsxs)($,{css:{bd:!0,alignSelf:"stretch",alignItems:"stretch",justifyContent:"space-between",padding:"$3 $4",background:"$white","@tablet":{alignItems:"center"}},direction:t?"column":"row",gap:"3",children:[(0,i.jsxs)($,{direction:"column",gap:"4",children:[(0,i.jsxs)($,{css:{flex:"1"},direction:t?"column":"row",gap:t?"1":"4",children:[(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)($i,{fontWeight:"medium",children:e.title}),e.subtitle&&(0,i.jsx)(vp,{css:{color:"$gray500"},text:e.subtitle.toString()})]}),!t&&(0,i.jsx)($i,{css:{blockSize:"fit-content",inlineSize:"fit-content"},children:e.badge})]}),e.children&&(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},gap:"8",children:e.children})]}),(0,i.jsx)($,{gap:"3",children:e.button})]})},Cp=({bannerUrl:e,featureFlags:t,isLoading:n})=>{const[a,s]=(0,l.useState)(!0);return(0,l.useEffect)(()=>{(async()=>{h(e)&&(s(!0),await Ug(e),s(!1))})()},[e]),n||h(e)?a?(0,i.jsx)(Dh,{css:{minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):(0,i.jsx)($i,{css:{background:`url(${e}) no-repeat center`,backgroundSize:"cover",minHeight:"115px",width:"100%","@tablet":{borderRadius:"$2",margin:t?.isV4?"$6 0":void 0,minHeight:"230px"},"@desktop":{marginLeft:"auto",marginRight:"auto",minHeight:"360px",width:"$container"}}}):null},Ep="h-dropdown-open";function Tp(e,t){e.dispatchEvent(new CustomEvent(Ep,{bubbles:!0,detail:{uuid:t??""}}))}const Mp=l.createContext({}),Rp=e=>{const t=l.useRef(ns()),[n,a]=l.useState(e.isOpen??!1),[s,o]=l.useState(null),[r,d]=l.useState(null),c=l.useCallback(n=>{e.disabled||(a(n),e.onStateChange&&e.onStateChange(n),!0===n&&s&&Tp(s,t.current))},[e.disabled,s,a,e.onStateChange]),u=l.useCallback(n=>{n.detail.uuid!==t.current&&!0!==e.doNotCloseOnOtherOpen&&c(!1)},[c]);return l.useEffect(()=>{e.isOpen!==n&&a(e.isOpen??!1)},[e.isOpen]),l.useEffect(()=>(document.addEventListener(Ep,u),()=>{document.removeEventListener(Ep,u)}),[u]),xa(()=>{c(!1)}),function(){const e=l.useCallback(()=>{c(!1)},[]);l.useEffect(()=>(document.addEventListener("click",e,!1),()=>{document.removeEventListener("click",e,!1)}),[])}(),(0,i.jsx)(Mp.Provider,{value:{isOpen:n,referenceElement:s,popperElement:r,setIsOpen:c,setReferenceElement:o,setPopperElement:d},children:e.children})};function Dp(){return l.useContext(Mp)}const Op=e=>(0,i.jsx)($i,{css:{padding:"$2 $3"},font:"gray500 textXs semiBold",children:e.children}),wp=j("div",{display:"flex",flexDirection:"column","& + &":{borderTop:"1px solid $gray100"}}),Pp=e=>l.Children.toArray(e).some(e=>(0,l.isValidElement)(e)&&e.type===l.Fragment?Pp(e.props.children):Boolean(e)),$p=e=>Pp(e.children)?(0,i.jsxs)(wp,{"aria-label":e.title,role:"group",children:[h(e.title)&&(0,i.jsx)(Op,{children:e.title}),e.children]}):null,kp=j("div",{alignItems:"center",display:"flex",fontSize:"$textSm",fontWeight:"$regular",minHeight:"40px",px:"$4",py:"$2",userSelect:"none",width:"100%",ellipsis:"",variants:{color:{default:{cursor:"pointer",color:"$gray700","&:hover":{background:"$primary50",color:"$primary500"}},disabled:{color:"$gray400",cursor:"not-allowed"},heading:{color:"$gray500",fontSize:"$textXs",fontWeight:"$semiBold",cursor:"default"},red:{cursor:"pointer",color:"$error700","&:hover":{background:"$error50"}}}},defaultVariants:{color:"default"}}),Np=({children:e,color:t,css:n,download:a,to:s,onClick:o,target:r,role:l})=>"disabled"!==t&&s?(0,i.jsx)(sa,{download:a,target:r,to:s,onClick:e=>o?.(e),children:(0,i.jsx)(kp,{color:t||"default",css:n,children:e})}):(0,i.jsx)(kp,{color:t||"default",css:n,role:l??"menuitem",tabIndex:s?void 0:"presentation"!==l?0:void 0,onClick:e=>o?.(e),children:e}),zp=({css:e,children:t,color:n,download:a,icon:s,isDisabled:o=!1,onClick:r,to:l,target:d})=>(0,i.jsx)(Np,{color:n,css:{cursor:o?"not-allowed":"pointer",opacity:o?"0.6":"inherit",...e},download:a,target:d,to:l,onClick:e=>{o||(Tp(e.target),r?.(e))},children:(0,i.jsxs)($,{align:"center",gap:"3",height:1,width:1,children:[(0,i.jsx)($,{align:"center",height:1,justify:"start",width:16,children:(0,i.jsx)(ra,{icon:s})}),(0,i.jsx)($i,{css:{flex:"1",ellipsis:""},children:t})]})});var Lp=n(832);const Fp=e=>{const{isOpen:t,referenceElement:n,popperElement:a,setPopperElement:s}=Dp(),{styles:o,attributes:r,update:d}=(0,Lp.E)(n,a,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,e.offset??8]}}]}),c="match"===e.width?`${n?.getBoundingClientRect().width??240}px`:"number"==typeof e.width?`${e.width}px`:"fit-content";l.useEffect(()=>{d?.()},[d,t,n]),l.useEffect(()=>{if(n){const e=new ResizeObserver(()=>{d?.()});return e.observe(n),()=>{e.disconnect()}}return yh.A},[d,n]);const u=(0,i.jsx)($,{ref:s,"aria-hidden":!t,"aria-orientation":e["aria-orientation"],css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$lg",display:t?"flex":"none",maxHeight:e.maxHeight?`${e.maxHeight}px`:void 0,overflowX:"hidden",overflowY:"auto",py:"$2",width:c,zIndex:"400",...e.css,...o.popper,"&:empty":{opacity:0}},direction:"column",id:e.id,role:"menu",onClick:e=>Ia(e,!1),...r.popper,tabIndex:-1,children:e.children});return t?e.renderOnPortal?(0,_a.createPortal)(u,document.body):u:null},Up=e=>{const{isOpen:t,setIsOpen:n,setReferenceElement:a}=Dp(),s=e.children,o=e=>{Ia(e),n(!t),s.props.onClick?.(e)},r=l.cloneElement(l.Children.only(s),{ref(e){a(e)},onClick(e){e.preventDefault(),o(e)},onKeyPress(e){o(e)},tabIndex:0});return(0,i.jsx)(i.Fragment,{children:r})},Bp=e=>{switch(e){case 16:return 7;case 24:return 10;case 32:return 14;case 40:return 16;case 48:return 18;case 56:return 20;case 64:return 24;case 88:return 30;case 96:return 36;case 110:return 40;case 160:return 48;case 310:return 120}},Vp=e=>{const[t,n]=(0,l.useState)(h(e.image)?e.image:void 0);if((0,l.useEffect)(()=>{h(e.image)&&n(e.image)},[e.image]),h(t))return(0,i.jsx)("div",{style:{border:e.border,borderRadius:e.size+"px",height:`${e.size}px`,overflow:"hidden",width:`${e.size}px`},children:(0,i.jsx)("img",{alt:"Avatar",src:t,style:{height:`${e.size}px`,width:`${e.size}px`,verticalAlign:"baseline"}})});{const t=function(e,t){if(h(e))return gu(e," ");if(h(t)){const[e]=t.split("@");return gu(e,".")}return""}(e.name,e.email);return(0,i.jsx)("div",{style:{borderRadius:e.size+"px",height:e.size+"px",overflow:"hidden",width:e.size+"px"},children:(0,i.jsx)("div",{className:"h-avatar-initials",style:{alignItems:"center",background:pu(t),color:"white",display:"flex",fontSize:`${Bp(e.size)}px`,height:"100%",justifyContent:"center",textTransform:"uppercase",width:"100%"},children:t})})}},Gp=e=>{const{params:{organizationId:t,eventId:n,delegationId:a,userInfoId:s},translate:o}=zg(),{data:r,loader:d}=Ei('query SpaceHeader($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n id\n name\n showMembersSpaceCommunity\n }\n\n user {\n userInfo(organizationId: $organizationId) {\n ...MemberRegistrationUserInfo\n firstName: fieldValue(slug: "firstName")\n\n events {\n id\n name\n }\n }\n }\n}\n',{organizationId:t},[ka.MemberRegistrationUserInfoFragment]),c=bp(),u=Di(),[m,g]=l.useState(!1),p=l.useMemo(()=>r.user?.userInfo,[r.user?.userInfo]);return d||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{css:{flex:"1"}}),(0,i.jsxs)(Rp,{"aria-label":o("menu_utilisateu_40033"),"aria-orientation":"vertical",isOpen:m,onStateChange:g,children:[(0,i.jsx)(Up,{children:(0,i.jsxs)($,{align:"center","aria-expanded":m,"aria-label":o("ouvrir_le_menu_47803"),css:{fontWeight:"$medium",color:"$gray800",fontSize:"$textSm",cursor:"pointer"},gap:"3",justify:"end",width:300,onClick:()=>document.getElementById("user-menu")?.focus(),children:[(0,i.jsx)(Vp,{email:p?.email,image:p?.picture?.url,name:p?.name,size:32}),!c&&(0,i.jsx)($i,{css:{maxWidth:"calc(100% - 66px)"},children:(0,i.jsx)($i,{css:{ellipsis:!0},children:p?.name||p?.email})}),(0,i.jsx)("div",{children:m?(0,i.jsx)("i",{className:"far fa-angle-up"}):(0,i.jsx)("i",{className:"far fa-angle-down"})})]})}),(0,i.jsxs)(Fp,{"aria-orientation":"vertical",id:"user-menu",maxHeight:500,placement:"bottom-end",width:300,children:[(0,i.jsx)($p,{children:(0,i.jsx)(Np,{children:(0,i.jsxs)($,{align:"center",as:R.Nav,css:{cursor:"default"},gap:"3",width:1,children:[(0,i.jsx)(Vp,{email:p?.email,image:p?.picture?.url,name:p?.name,size:32}),(0,i.jsxs)($i,{css:{width:"calc(100% - 44px)"},children:[(0,i.jsx)($i,{css:{ellipsis:!0},fontWeight:"semiBold",children:p?.name||p?.email}),h(p?.name)&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},children:p?.email})]})]})})}),(0,i.jsx)($p,{children:r.organization.showMembersSpaceCommunity&&!a&&(0,i.jsx)(Np,{children:(0,i.jsx)(sa,{to:a?Wc.DELEGATION({organizationId:r.organization.id,delegationId:a}):Ng.MEMBER({organizationId:r.organization.id,userInfoId:s}),width:1,children:(0,i.jsx)(N,{css:{fontWeight:void 0===n&&r.organization.id===t?"bold":"inherit"},children:r.organization.name})})})}),(0,i.jsx)($p,{children:!a&&r.user.userInfo.events.map(e=>(0,i.jsx)(Np,{children:(0,i.jsx)(sa,{to:a?Wc.DELEGATION({organizationId:r.organization.id,eventId:e.id,delegationId:a}):Ng.MEMBER({organizationId:t,eventId:e.id,userInfoId:s}),width:1,children:(0,i.jsx)(N,{css:{fontWeight:void 0!==n&&n===e.id?"bold":"inherit"},children:e.name})})},e.id))}),e.extraItems,(0,i.jsx)($p,{children:(0,i.jsx)(Np,{color:"red",onClick:()=>{u.removeItem(xh.DELEGATIONS_SPACE_TAB),ms()},children:o("se_d_connecter_74151")})})]})]})]})},Wp=({additionalComponents:e,logoSrc:t,...n})=>{const{params:{organizationId:a,delegationId:s,userInfoId:o}}=zg();return(0,i.jsxs)($,{align:"center",as:"header",css:{backgroundColor:"white",px:"$6",position:"relative",borderBottom:"1px solid $gray200",justifyContent:"center"},height:65,width:1,children:[(0,i.jsxs)($,{align:"center",css:{cursor:t?"pointer":"default",margin:"inherit",padding:"$4","& svg":{height:"50%"}},gap:"7",height:1,children:[t&&(0,i.jsx)(sa,{height:1,to:s?Rr(Ec.ORGANIZATION_DELEGATIONS({organizationId:a})):Ng.USER_PROFILE({organizationId:a,userInfoId:o}),children:t&&(0,i.jsx)("img",{height:"100%",src:t,width:"auto"})}),e]}),(0,i.jsx)(oo.qh,{path:[Wc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),Wc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"}),Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,i.jsx)(Gp,{...n})})]})},qp=({children:e,extraItems:t,featureFlags:n,isLoading:a,organization:s,spaceDesign:o})=>{const{params:{organizationId:r}}=zg();return(0,l.useEffect)(()=>{s&&Bg(o.themeColors??{})},[s,o.themeColors]),(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Wp,{extraItems:t,logoSrc:o.logoSrc}),(0,i.jsxs)($,{align:"center",as:"main",css:{height:"fit-content",...n?.isV4?{padding:"$7 $4 $12 $4","@desktop":{padding:"$7 0 $12 0"}}:{maxWidth:"1170px",marginLeft:"auto",marginRight:"auto","@tablet":{marginTop:"$6",borderRadius:"$2"},"@desktop":{backgroundColor:"$white",border:"1px solid $gray200",marginBottom:"$8"}}},direction:"column",gap:n?.isV4?"4":void 0,height:1,width:1,children:["edit"!==window.location.pathname.split("/").at(-1)&&"edit"!==window.location.pathname.split("/").at(-2)&&(0,i.jsx)(Cp,{bannerUrl:o.bannerSrc,featureFlags:n,isLoading:a}),(0,i.jsx)($i,{css:{width:"100%",...n?.isV4?{}:{height:"100%",position:"relative",padding:"$4","@tablet":{padding:"$5 $7"},"@desktop":{paddingBottom:"$7",marginLeft:"auto",marginRight:"auto"}},"@desktop":{width:"$container"}},children:e})]}),Fg(r)&&(0,i.jsx)(kh,{source:"delegation"})]})},Yp=()=>{const{params:{organizationId:e}}=zg(),{data:t,isLoading:n,loader:a}=Ei("query OrganizationEventsShowcase($organizationId: OrganizationId!) {\n organization: organizationPublic(id: $organizationId) {\n ...OrganizationEventsShowcase\n\n eventsShowcaseSettings {\n title\n intro\n events {\n event {\n id\n name\n }\n descriptionText\n buttonText\n form {\n id\n name\n }\n }\n }\n }\n}\n",{organizationId:e},[ka.OrganizationEventsShowcaseFragment]);return a||(0,i.jsx)(qp,{featureFlags:{isV4:!0},isLoading:n,organization:t.organization,spaceDesign:{themeColors:t.organization?.eventsShowcaseDesign?.colors,bannerSrc:t.organization?.eventsShowcaseDesign?.banner?.url,logoSrc:t.organization?.eventsShowcaseDesign?.logo?.url},children:(0,i.jsx)(yp,{heading:t.organization.eventsShowcaseSettings.title,subtitle:t.organization.eventsShowcaseSettings.intro,children:(0,i.jsx)(Sp,{children:t.organization.eventsShowcaseSettings.events.map(t=>(0,i.jsx)(Ap,{button:t.form?(0,i.jsx)(ga,{to:Yc({organizationId:e,eventId:t.event.id,formId:t.form.id}),children:t.buttonText}):(0,i.jsx)(ga,{disabled:!0,children:t.buttonText}),subtitle:t.descriptionText,title:t.event.name},t.event.id))})})})};function Hp(e){return`${e.name}${h(e.acronym)?` (${e.acronym})`:""}`}function Zp(e){return Kp(e.map(({accreditationSlot:e})=>e))}function Kp(e){return(0,mo.A)(Object.values((0,Zd.A)(e,e=>e.accreditation.id)).map(e=>{const t=e[0].accreditationCategory,n=e[0].accreditation,i=e.map(e=>e.date?.toMillis()??1);return{id:n.id,category:t.name,index:n.index,text:h(n.acronym)?n.acronym:n.name,minDate:(0,eu.A)(i),color:n.color,count:e.length,icon:n.icon}}),({category:e,index:t,text:n,minDate:i})=>[m(e),Qp(t),m(n),i])}function Qp(e){return"number"!=typeof e||isNaN(e)?"9999":e.toString(10).padStart(4,"0")}function Xp(e){return(0,mo.A)(e,e=>[m(e.accreditationCategoryName||""),Qp(e.index),m(e.name)])}function Jp(e){return(0,mo.A)(e.map(e=>({id:e.id,category:e.accreditationProfileCategory.name,text:h(e.acronym)?e.acronym:e.name,color:e.color,icon:e.icon})),({category:e,text:t})=>[m(e),m(t)])}var ef=n(9116),tf=n(5315);const nf=[0,50,100,200,300,400,500,600,700,800,900,950,1e3],af=Object.fromEntries(["gray","grayDark","primary","error","warning","success","blue","blueGray","blueLight","purple","purpleLight","purpleDark","pink","orange","redLight","redDark","green","greenDark","brown"].flatMap(e=>{const t={50:v.colors[`${e}50`].value,100:v.colors[`${e}100`].value,500:v.colors[`${e}500`].value,700:v.colors[`${e}700`].value};return[[e,t],[t[700],t]]}));function sf(e,t=700){const n=af[e.toLowerCase()];if(n)return n;{const n=(0,tf.KI)(e),i=((e,t=700)=>nf.map(n=>{if(0===n)return{stop:n,tweak:100};if(1e3===n)return{stop:n,tweak:0};if(n===t)return{stop:n,tweak:e};{const i=Math.abs((n-t)/100),a=n[e,n.copy({l:t/100}).formatHex()]))}}const of={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",goldenrod:"#daa520",gold:"#ffd700",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavenderblush:"#fff0f5",lavender:"#e6e6fa",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};function rf(e){return h(e)&&(function(e){return/^#(([0-9a-fA-F]{2}){3,4}|([0-9a-fA-F]){3,4})$/g.test(e)}(e)||function(e){return Object.keys(of).includes(e)}(e))}function lf(e,{higherIsBetter:t}={higherIsBetter:!0}){return e<=.2?t?v.colors.error500.value:v.colors.success500.value:e<=.7?v.colors.warning500.value:e<=1?t?v.colors.success500.value:v.colors.error500.value:v.colors.blueGray500.value}const df=j($,{borderRadius:"$2",fontSize:"$textSm",height:"32px",width:"32px",variants:{size:{sm:{},md:{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"},responsive:{"@tablet":{borderRadius:"$3",fontSize:"$textMd",height:"40px",width:"40px"}}}},defaultVariants:{size:"responsive"}}),cf=e=>{const t=(0,l.useMemo)(()=>sf(e.color??""),[e.color]),n=(0,l.useMemo)(()=>Gn.includes(e.icon)?oa(e.icon):e.icon,[e.icon]);return(0,i.jsx)(df,{align:"center",css:{background:t[100],color:t[700],...e.css},justify:"center",role:"presentation",size:e.size,children:(0,i.jsx)(ra,{icon:n})})},uf=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>Hp(e.accreditation),[e.accreditation]),[a,s]=(0,l.useState)(!0),o=e.displaySlots||"function"==typeof e.renderCheckbox;return(0,i.jsxs)($,{css:{background:"white",bd:!0,overflow:"hidden",userSelect:"none"},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{cursor:o?"pointer":"default",padding:"$3 $4"},gap:"2",onClick:()=>{s(!a),e.onClick?.()},children:[e.displaySlots&&(0,i.jsx)($,{align:"center",css:{fontSize:"$textXs"},height:20,justify:"center",width:20,children:(0,i.jsx)(ra,{icon:a?"chevron-down":"chevron-right"})}),e.renderCheckbox?.(),(0,i.jsx)(cf,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{font:"gray800 textSm semiBold",children:n}),e.badge]}),e.displayNumberOfSlots&&(0,i.jsx)($i,{color:"gray500",children:t("creneau",e.numberOfSlots)})]}),e.renderActions?.()]}),(e.displayFormCustomFields||e.displaySlots&&a)&&(0,i.jsx)($,{css:{borderTop:"1px solid $gray200"},direction:"column",children:e.children})]})},mf=j("div",{background:"white",alignItems:"center",cursor:"pointer",display:"flex",justifyContent:"center",variants:{size:{sm:{borderRadius:"16px",height:"16px",width:"16px"},md:{borderRadius:"20px",height:"20px",width:"20px"}},state:{unchecked:{border:"1px solid $gray300","&:hover":{border:"1px solid $primary600"}},checked:{border:"1px solid $primary600"}},disabled:{true:{cursor:"not-allowed"}}},compoundVariants:[{size:"sm",state:"checked",css:{"& > div":{background:"$primary600",borderRadius:"6px",height:"6px",width:"6px"}}},{size:"md",state:"checked",css:{"& > div":{background:"$primary600",borderRadius:"8px",height:"8px",width:"8px"}}},{state:"unchecked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","&:hover":{borderColor:"$gray200"}}},{state:"checked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","& > div":{background:"$gray300 !important"}}}],defaultVariants:{size:"sm",state:"unchecked"}}),gf=({shouldPreventDefault:e=!0,...t})=>{ya("common-front/src/designSystem/components/radio.tsx","common-front/src/designSystem/components/radioCard.tsx for card-style radio buttons, or create a new component following that pattern for other styles of radio button");const n=n=>{e&&Ia(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,i.jsx)(mf,{"aria-describedby":t.descId,"aria-labelledby":t.labelId,disabled:t.disabled,id:t.inputId,role:"radio",size:t.size,state:t.state,tabIndex:t.tabIndex??0,onClick:n,onKeyDown:e=>{"Space"===e.key&&n(e)},children:"checked"===t.state&&(0,i.jsx)("div",{})})},hf=({shouldPreventDefault:e=!0,...t})=>{ya("common-front/src/designSystem/components/radio.tsx","common-front/src/designSystem/components/radioCard.tsx for card-style radio buttons, or create a new component following that pattern for other styles of radio button");const{inputId:n,descId:a,labelId:s}=uh(),o="string"==typeof t.subtext&&t.subtext.length>0,r=n=>{e&&Ia(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked"):t.onClick("checked"))};return(0,i.jsxs)($,{css:{...t.css,cursor:t.disabled?"not-allowed":"pointer",userSelect:"none"},tabIndex:0,onClick:e=>{r(e)},onKeyDown:e=>{"Space"===e.key&&r(e)},children:[(0,i.jsx)($,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,i.jsx)(gf,{descId:a,disabled:t.disabled,inputId:n,labelId:s,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:yh.A})}),(0,i.jsx)(Hg,{width:"2"}),(0,i.jsxs)($,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2","& div":{cursor:"pointer !important"}},children:[(0,i.jsx)(hh,{htmlFor:n,id:s,children:(0,i.jsx)($i,{css:{color:t.disabled&&!o?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),t.subtext&&(0,i.jsx)($i,{color:"gray500",id:a,children:t.subtext})]})]})},pf=e=>(0,i.jsx)($,{align:"center",css:{background:`$${e.color}50`,borderRadius:"48px",color:`$${e.color}700`,...e.css},height:48,justify:"center",width:48,children:(0,i.jsx)($,{align:"center",css:{background:`$${e.color}100`,borderRadius:"32px"},height:32,justify:"center",width:32,children:(0,i.jsx)(ra,{icon:e.icon})})}),ff=j("dialog",{background:"white",border:"none",display:"flex",flexDirection:"column",variants:{mobile:{true:{height:"100%",paddingBottom:"$6",paddingTop:"$8",width:"100%"},false:{borderRadius:"12px",maxHeight:"calc(100% - 80px)",py:"$7"}},size:{sm:{},md:{},lg:{}}},compoundVariants:[{mobile:!1,size:"sm",css:{width:"$modalSm"}},{mobile:!1,size:"md",css:{width:"$modalMd"}},{mobile:!1,size:"lg",css:{width:"$modalLg"}}],defaultVariants:{mobile:!1}}),If=j("div",{display:"flex",flexDirection:"column",overflow:"auto",width:"100%",variants:{mobile:{true:{flex:"1",px:"$4"},false:{px:"$8"}}}}),_f=j("div",{display:"flex",gap:"$3",variants:{mobile:{true:{boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",flexDirection:"column",padding:"$6 $4 0 $4","& .h-button-content":{textAlign:"center"}},false:{flexDirection:"row",justifyContent:"flex-end",px:"$8"}}}}),xf=({buttons:e,children:t,onClose:n,role:a,size:s})=>{const o=bp();return xa(n),ya("../../../../../components/modals/__deprecated/modal/modal.tsx","../../../../../components/modals/base/modal.tsx"),(0,_a.createPortal)((0,i.jsx)($,{align:"center",css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"300"},"data-testid":"modal-backdrop",justify:"center",role:"presentation",onMouseDown:n,children:(0,i.jsxs)(ff,{mobile:o,open:!0,role:a,size:s,onClick:e=>Ia(e,!1),onMouseDown:e=>Ia(e,!1),children:[(0,i.jsx)(If,{mobile:o,children:t}),e&&(0,i.jsx)(_f,{mobile:o,children:e})]})}),document.body)},yf=e=>{const t=Ai();return(0,i.jsxs)(xf,{buttons:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(ga,{onClick:e.onClose,children:t("fermer_62479")})}),size:"md",onClose:e.onClose,children:[(0,i.jsx)($,{justify:"center",width:1,children:(0,i.jsx)(pf,{color:"primary",icon:"circle-info"})}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{font:"gray900 textLg medium",textAlign:"center",width:1,children:t("informations_su_86120",e.name)}),(0,i.jsx)(Hg,{height:"7"}),h(e.description)&&(0,i.jsxs)($,{css:{overflowY:"auto"},direction:"column",gap:"2",children:[(0,i.jsx)($i,{font:"gray900 textMd semiBold",children:t("description_58935")}),(0,i.jsx)(vp,{text:e.description})]}),(0,i.jsx)(Hg,{height:"4"})]})},Sf=j("div",{alignItems:"center",borderRadius:"$1",display:"flex",fontWeight:"$medium",gap:"$1",px:"$2",userSelect:"none",height:"fit-content","&:has(.h-badge-count)":{paddingRight:"$1"},"& > .h-badge-count":{borderRadius:"3px",height:"calc(100% - 8px)",marginLeft:"$1",px:"6px"},variants:{size:{sm:{height:"22px",fontSize:"12px","& > .h-badge-count":{fontSize:"10px"}},md:{height:"24px",fontSize:"12px","& > .h-badge-count":{fontSize:"10px"}},lg:{height:"28px",fontSize:"14px","& > .h-badge-count":{fontSize:"12px"}}},cursor:{default:{cursor:"default"},pointer:{cursor:"pointer"},text:{cursor:"text"}},ellipsis:{true:{maxWidth:"80%","& .h-badge-content":{ellipsis:!0,flex:"1"}}}},defaultVariants:{size:"sm",cursor:"default"}}),jf=l.forwardRef((e,t)=>{const n=l.useMemo(()=>{const t=e.color||"gray",n=sf(t);return"gray"===t?{background:"$gray100",color:"$gray700","& > .h-badge-left-icon":{color:"$gray500"},"& > .h-badge-count":{background:"$gray200"}}:"white"===t?{background:"white",border:"1px solid $gray300","& > .h-badge-count":{background:"$gray100"}}:"white-with-green-icon"===t?{background:"white",border:"1px solid $gray300","& > .h-badge-left-icon":{color:"$success500"}}:"orange"===t?{background:"$orange50",color:"$orange700","& > .h-badge-left-icon":{color:"$orange500"}}:{background:n[50],color:n[700],"& > .h-badge-left-icon":{color:n[500]},"& > .h-badge-count":{background:n[100]}}},[e.color]);return(0,i.jsxs)(Sf,{ref:t,color:e.color,css:{maxWidth:"100%",...n,...e.css},cursor:e.cursor,ellipsis:e.ellipsis,size:e.size,onClick:e.onClick,children:[e.leftIcon&&(0,i.jsx)($,{className:"h-badge-left-icon",css:{cursor:e.onLeftIconClick?"pointer":"inherit"},onClick:t=>{e.onLeftIconClick?.(t)},children:(0,i.jsx)(ra,{icon:e.leftIcon,iconStyle:e.leftIconStyle})}),e.children&&(0,i.jsx)($i,{className:"h-badge-content",css:{flex:"1",overflow:"hidden"},title:e.title,onClick:t=>{e.onContentClick?.(t)},children:(0,i.jsx)($i,{css:{ellipsis:!0},title:"string"==typeof e.children?e.children:"",children:e.children})}),e.rightIcon&&(0,i.jsx)($,{css:{cursor:e.onRightIconClick?"pointer":"inherit"},onClick:t=>{e.onRightIconClick?.(t)},children:(0,i.jsx)(ra,{icon:e.rightIcon})}),("number"==typeof e.count||h(e.count))&&(0,i.jsx)($,{align:"center",className:"h-badge-count",children:e.count})]})});function vf(e,t,n){const i=n-t;return i<=0?e("quota_atteint_12838"):e("quota_1_2_23970",t,n,i)}jf.displayName="Badge";const bf=e=>{const{translate:t}=zg();return(0,l.useMemo)(()=>{const n=e.getAssignedMaxRemaining(e.slotId);return n?n.remaining<=0?(0,i.jsx)(jf,{color:"error",leftIcon:"circle-xmark",size:"sm",children:vf(t,n.assignedResources,n.maxResources)}):(0,i.jsx)(jf,{color:"white",size:"sm",children:vf(t,n.assignedResources,n.maxResources)}):null},[e.slotId,e.getAssignedMaxRemaining,t])},Af=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)(!1),s=(0,l.useMemo)(()=>h(e.profile.description)&&e.showDescription,[e.profile,e.showDescription]),o=(0,l.useMemo)(()=>(e.delegationAccreditationsProfiles||[]).find(({accreditationProfileId:t})=>t===e.profile.id),[e.delegationAccreditationsProfiles,e.profile]),r=(0,l.useCallback)(()=>"number"==typeof o?.maxResources?{assignedResources:o.assignedResources,maxResources:o.maxResources,remaining:o.maxResources-o.assignedResources}:null,[o]),d=(0,l.useMemo)(()=>!!o&&o.isFull&&e.alreadyAssignedProfileId!==e.profile.id,[e.alreadyAssignedProfileId,o,e.profile]),c=(0,l.useMemo)(()=>(0,i.jsx)(bf,{getAssignedMaxRemaining:r,slotId:e.profile.id}),[r,e.profile]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{accreditation:e.profile,badge:c,displayNumberOfSlots:!1,displaySlots:!1,numberOfSlots:0,renderActions:()=>s&&(0,i.jsx)(ga,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),a(!0)},children:t("voir_la_descrip_62304")}),renderCheckbox:()=>(0,i.jsx)(gf,{disabled:d,shouldPreventDefault:!1,state:e.profile.id===e.accreditationProfileId?"checked":"unchecked",onClick:yh.A}),onClick:()=>{d||e.setAccreditationProfileId(e.profile.id===e.accreditationProfileId?null:e.profile.id)}}),n&&(0,i.jsx)(yf,{description:e.profile.description,name:e.profile.name,onClose:()=>a(!1)})]})},Cf=e=>{const{translate:t}=zg(),n=(0,l.useCallback)(t=>{e.change(`${e.prefix}accreditationProfileId`,t)},[e.prefix,e.change]);return(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)($i,{font:"gray800 textMd semiBold",children:t("quel_profil_vou_78626")}),(0,i.jsx)($,{css:{background:"$gray50",bd:"gray200 2",padding:"$6"},direction:"column",gap:"3",children:e.accreditationsProfiles.map(t=>(0,i.jsx)(Af,{accreditationProfileId:e.accreditationProfileId,alreadyAssignedProfileId:e.alreadyAssignedProfileId,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,profile:t,setAccreditationProfileId:n,showDescription:e.options.showAccreditationDescription},t.id))})]})},Ef=e=>(0,i.jsx)($,{css:{background:"$gray50",overflowX:"auto",padding:"$6",...e.css},direction:"column",gap:"4",height:1,width:1,children:e.children}),Tf=e=>(0,i.jsxs)($,{align:"center",css:e.css,direction:"column",height:1,justify:"center",width:1,children:[(0,i.jsx)($i,{css:{inlineSize:"70%","@tablet":{inlineSize:"50%",blockSize:"auto",maxInlineSize:"100px"}},children:(0,i.jsx)("img",{alt:"Blank image",className:"blank-image",height:"100%",src:e.imageSrc??Ch.WeezeventBlankPerson,width:"100%"})}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($i,{css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},textAlign:"center",children:e.title}),h(e.subtitle)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)($i,{color:"gray500",fontSize:"textSm",textAlign:"center",children:e.subtitle})]}),e.button&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($,{justify:"center",children:e.button})]})]}),Mf=j("div",{alignItems:"center",borderRadius:"12px",cursor:"pointer",display:"flex",position:"relative",padding:"$1","&:hover":{background:"$gray300"},"& > div":{background:"white",boxShadow:"$sm",position:"absolute",transition:"left 200ms ease-in"},"& > i":{color:"white"},"&:focus":{outline:"none"},"&:focus-visible":{border:"1px solid $success500",boxShadow:"0 0 0 4px rgba(16, 167, 77, 0.16)"},variants:{disabled:{true:{cursor:"not-allowed",background:"$gray100","&:hover":{background:"$gray100"},"&:focus-visible":{border:"1px solid $gray300",boxShadow:"0 0 0 4px rgba(206, 206, 206, 0.4)"},"& > i":{color:"$gray400"}}},size:{sm:{blockSize:"16px",inlineSize:"30px","& > div":{borderRadius:"12px",blockSize:"12px",inlineSize:"12px"},"& > i":{fontSize:"8px"}},md:{blockSize:"24px",inlineSize:"44px","& > div":{borderRadius:"20px",blockSize:"20px",inlineSize:"20px"},"& > i":{fontSize:"12px",paddingInlineStart:"2px"}}},state:{unchecked:{background:"$gray200","& > div":{left:"2px"}},checked:{background:"$success500","&:hover":{background:"$success600"}}}},compoundVariants:[{size:"sm",state:"checked",css:{"& > div":{left:"calc(100% - 2px - 12px)"}}},{size:"md",state:"checked",css:{"& > div":{left:"calc(100% - 2px - 20px)"}}},{disabled:!0,state:"checked",css:{background:"$gray100","&:hover":{background:"$gray100"}}}],defaultVariants:{size:"sm"}}),Rf=e=>(0,i.jsxs)(Mf,{"aria-checked":e.value,"aria-describedby":e.descId,"aria-label":e.label,"aria-labelledby":e.labelId,disabled:e.disabled,id:e.inputId,role:"checkbox",size:e.size,state:e.value?"checked":"unchecked",tabIndex:e.tabIndex??0,onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,i.jsx)(ra,{height:"8",icon:"check",width:"8"}),(0,i.jsx)("div",{})]}),Df=e=>{const{inputId:t,descId:n,labelId:a}=uh(),s=h(e.subtext);return(0,i.jsxs)($,{align:"center","aria-keyshortcuts":e["aria-keyshortcuts"],css:{cursor:e.disabled?"auto":"pointer",userSelect:"none",...e.css},onClick:()=>{e.disabled||e.onChange(!e.value)},onKeyDown:t=>{e.disabled||"Space"!==t.code||(t.preventDefault(),e.onChange(!e.value))},children:[(0,i.jsx)(Rf,{descId:n,disabled:e.disabled,inputId:t,labelId:a,size:e.size,value:e.value,onChange:yh.A}),(0,i.jsx)(Hg,{width:"2"}),(0,i.jsxs)($,{css:{flex:"1",fontSize:"md"===e.size?"$3":"$2"},direction:"column",children:[(0,i.jsx)(hh,{htmlFor:t,id:a,children:(0,i.jsx)($i,{color:"gray800",fontWeight:"medium",children:e.children})}),s&&(0,i.jsx)($i,{color:"gray500",id:n,children:e.subtext})]})]})},Of=e=>(0,i.jsx)(qg.D0,{name:e.name,render:t=>(0,i.jsx)(Df,{disabled:e.disabled,size:e.size,subtext:e.subtext,value:t.input.value,onChange:t.input.onChange,children:e.children})}),wf=e=>(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)($,{align:"center",css:{color:"$gray800",fontSize:"$textMd",fontWeight:"$medium"},gap:"3",children:e.category}),(0,i.jsx)($,{direction:"column",gap:"3",children:e.children})]}),Pf=e=>{const t=Ai();return(0,i.jsxs)($,{align:"center",gap:"1",children:[e.children,(0,i.jsxs)($i,{color:"gray500",fontSize:"textXs",fontWeight:"regular",children:["(",t("facultatif_76747"),")"]})]})},$f=e=>{if(0===e.names.length)return e.render(e.fields);{const[t,...n]=e.names;return(0,i.jsx)(qg.D0,{name:t,render:a=>(0,i.jsx)($f,{fields:{...e.fields||{},[t]:a},names:n,render:e.render,subscription:e.subscription}),subscription:e.subscription})}},kf=({formattedAddressProps:e,getAddress:t,hint:n,latitudeProps:a,longitudeProps:s,onPlaceChange:o,state:r,...d})=>{const c=Ai(),u=(0,l.useRef)(null),m=(0,l.useRef)({getAddress:t,onPlaceChange:o});m.current={getAddress:t,onPlaceChange:o};const g=dh(e.meta);return(0,l.useEffect)(()=>{const t=new google.maps.places.Autocomplete(u.current,{types:["geocode"]});t.addListener("place_changed",()=>{const n=t.getPlace();if(n.geometry?.location){const t=n.geometry.location.lat(),i=n.geometry.location.lng();e.input.onChange(m.current.getAddress?.(n)??n.formatted_address),a?.input.onChange(t),s?.input.onChange(i),m.current.onPlaceChange?.(n)}})},[]),(0,i.jsx)(Ih,{ref:u,hint:g?e.meta.error||e.meta.submitError:n,placeholder:c("indiquez_un_lie_85634"),state:g?"error":r,value:e.input.value,onBlur:e.input.onBlur,onChange:e.input.onChange,onFocus:e.input.onFocus,...d})},Nf=({addressName:e,latitudeName:t,longitudeName:n,...a})=>{const s=[e];return t&&s.push(t),n&&s.push(n),(0,i.jsx)($f,{names:s,render:s=>(0,i.jsx)(kf,{formattedAddressProps:s[e],latitudeProps:t?s[t]:void 0,longitudeProps:n?s[n]:void 0,...a})})},zf=(0,l.createContext)({});function Lf(){return(0,l.useContext)(zf)}const Ff=j("div",{alignItems:"center",border:"1px solid $gray300",cursor:"pointer",display:"flex",fontSize:"10px",fontWeight:"$semiBold",justifyContent:"center","& > i":{fontSize:"10px",fontWeight:"$semiBold"},variants:{size:{sm:{borderRadius:"4px",height:"16px",width:"16px"},md:{borderRadius:"6px",height:"20px",width:"20px"}},state:{unchecked:{background:"white","&:hover":{border:"1px solid $primaryCustom600"}},checked:{background:"$primaryCustom600",border:"none",color:"white"},indeterminate:{background:"$primaryCustom600",border:"none",color:"white",padding:"$1","& > div":{borderTop:"2px solid white",width:"100%"}}},disabled:{true:{}}},compoundVariants:[{state:"unchecked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200","&:hover":{borderColor:"$gray200"}}},{state:"checked",disabled:!0,css:{background:"$gray100",borderColor:"$gray200",color:"$gray300"}},{state:"indeterminate",disabled:!0,css:{background:"$gray100",borderColor:"$gray200",color:"$gray300","& > div":{borderTopColor:"$gray300"}}}],defaultVariants:{size:"sm",state:"unchecked"}}),Uf=({shouldPreventDefault:e=!0,...t})=>{ya("common-front/src/designSystem/components/checkbox.tsx","a new component following the pattern of common-front/src/designSystem/components/radioCard.tsx");const n=n=>{e&&Ia(n),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,i.jsxs)(Ff,{"aria-describedby":t.descId,"aria-labelledby":t.labelId,disabled:t.disabled,id:t.inputId,role:"checkbox",size:t.size,state:t.state,tabIndex:t.tabIndex??0,onClick:e=>n(e),onKeyDown:e=>{"Space"===e.code&&n(e)},onMouseDown:e=>{e.shiftKey&&Ia(e)},children:["checked"===t.state&&(0,i.jsx)("i",{className:"far fa-check"}),"indeterminate"===t.state&&(0,i.jsx)("div",{})]})},Bf=({shouldPreventDefault:e=!0,...t})=>{ya("common-front/src/designSystem/components/checkbox.tsx","a new component following the pattern of common-front/src/designSystem/components/radioCard.tsx");const{descId:n,inputId:a,labelId:s}=uh(),o=void 0!==t.subtext&&null!==t.subtext,r=n=>{e&&n.preventDefault(),!0!==t.disabled&&("unchecked"!==t.state&&t.state?t.onClick("unchecked",n):t.onClick("checked",n))};return(0,i.jsxs)($,{css:{cursor:t.disabled?"not-allowed":"pointer",userSelect:"none",...t.css},tabIndex:0,onClick:r,onKeyDown:e=>{"Space"===e.code&&r(e)},children:[(0,i.jsx)($,{css:{alignItems:"center",height:"md"===t.size?"23px":"20px"},children:(0,i.jsx)(Uf,{descId:n,disabled:t.disabled,inputId:a,labelId:s,shouldPreventDefault:!1,size:t.size,state:t.state,tabIndex:-1,onClick:yh.A})}),(0,i.jsx)(Hg,{width:"2"}),(0,i.jsxs)($,{css:{flexDirection:"column",fontSize:"md"===t.size?"$3":"$2"},children:[(0,i.jsx)(hh,{htmlFor:a,id:s,children:(0,i.jsx)($i,{css:{color:t.disabled&&!o?"$gray300":"$gray800"},fontWeight:"medium",children:t.children})}),o&&(0,i.jsx)($i,{color:"gray500",id:n,children:t.subtext})]})]})},Vf=({name:e,children:t,...n})=>{const{isDisabled:a}=Lf();return(0,i.jsx)(qg.D0,{name:e,render:e=>{const s=!0===e.input.checked?"checked":"unchecked";return(0,i.jsx)(Bf,{...n,disabled:a??n.disabled,state:s,onClick:()=>{e.input.onChange(!e.input.checked)},children:t})},type:"checkbox"})},Gf=({value:e,css:t,label:n,description:a,hint:s,icon:o,min:r,onChange:l,max:d,state:c,rightIcon:u,onRightIconClick:m,zone:g,...p})=>{const f=e?fl(e):null,I=f?.isValid?f.toFormat(La):"",{inputId:_,descId:x,errorId:y}=uh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:_,children:n}),(0,i.jsx)(mh,{id:x,children:a}),(n||a)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(fh,{cursor:"default",icon:o,rightIcon:u,state:c,onRightIconClick:m,children:(0,i.jsx)($i,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray500",fontSize:"$textSm",height:"100%",lineHeight:"20px",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":a?x:void 0,"aria-errormessage":"error"===c?y:void 0,"aria-invalid":"error"===c,disabled:"disabled"===c,id:_,max:d?.toFormat(La),min:r?.toFormat(La),type:"date",value:I,onChange:e=>{h(e.target.value)?l(wa.c9.fromFormat(e.target.value,La,{zone:g||"UTC"})):l(wa.c9.invalid("Invalid"))},...p})})}),(0,i.jsx)(gh,{id:y,state:c,children:s})]})},Wf=(0,l.memo)(function({name:e,hint:t,state:n,...a}){return(0,i.jsx)(qg.D0,{name:e,render:({input:s,meta:o})=>{const r=o.data?.forceDisplayError&&o.invalid||o.touched&&o.invalid;return(0,i.jsx)(Gf,{hint:r?o.error:t,name:e,state:r?"error":n,value:s.value,onBlur:s.onBlur,onChange:s.onChange,onFocus:s.onFocus,...a})}})}),qf=({value:e,css:t,label:n,description:a,hint:s,icon:o,min:r,onChange:l,max:d,rightIcon:c,onRightIconClick:u,state:m,zone:g,...p})=>{const f=e?h(e)?wa.c9.fromISO(e,{zone:"utc"}):e:null,I=f?.isValid?f.toFormat(Fa):"",{inputId:_,descId:x,errorId:y}=uh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:_,children:n}),(0,i.jsx)(mh,{id:x,children:a}),(n||a)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(fh,{cursor:"default",icon:o,rightIcon:c,state:m,onRightIconClick:u,children:(0,i.jsx)($i,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":a?x:void 0,"aria-errormessage":"error"===m?y:void 0,"aria-invalid":"error"===m,disabled:"disabled"===m,id:_,max:d?.toFormat(Fa),min:r?.toFormat(Fa),type:"datetime-local",value:I,onChange:e=>{h(e.target.value)?l(wa.c9.fromFormat(e.target.value,Fa,{zone:g||"UTC"})):l(wa.c9.invalid("Invalid"))},...p})})}),(0,i.jsx)(gh,{id:y,state:m,children:s})]})},Yf=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=s.meta.data?.forceDisplayError&&s.meta.invalid||s.meta.touched&&s.meta.invalid;return(0,i.jsx)(qf,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:s.input.onChange,onFocus:s.input.onFocus,...a})}}),Hf=({value:e,css:t,label:n,description:a,hint:s,icon:o,onChange:r,state:l,...d})=>{const c=h(e)&&e.length>5?e.substring(0,5):e,{inputId:u,descId:m,errorId:g}=uh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:u,children:n}),(0,i.jsx)(mh,{id:m,children:a}),(n||a)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(fh,{cursor:"default",icon:o,state:l,children:(0,i.jsx)($i,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},children:(0,i.jsx)("input",{"aria-describedby":a?m:void 0,"aria-errormessage":"error"===l?g:void 0,"aria-invalid":"error"===l,disabled:"disabled"===l,id:u,type:"time",value:c,onChange:e=>{r(e.target.value)},...d})})}),(0,i.jsx)(gh,{id:g,state:l,children:s})]})},Zf=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=dh(s.meta);return(0,i.jsx)(Hf,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:s.input.onChange,onFocus:s.input.onFocus,...a})}});var Kf;function Qf(e){return L(e).flatMap(e=>{switch(e){case Kf.Archives:return["zip"];case Kf.Csv:return["csv"];case Kf.Gpx:return["gpx"];case Kf.Images:return["jpg","png","jpeg","gif"];case Kf.Kml:return["kml"];case Kf.Pdf:return["pdf"];case Kf.SmallImages:return["jpg","png","jpeg"];case Kf.Videos:return["mp4","mov","webm","mkv"];default:return tr()}})}function Xf(e){return Math.min(...L(e).flatMap(e=>{switch(e){case Kf.Archives:return Mo;case Kf.Csv:return Ro;case Kf.Images:case Kf.Pdf:return 2e7;case Kf.Kml:case Kf.Gpx:return 1/0;case Kf.SmallImages:return 2e6;case Kf.Videos:return 5e7;default:return tr()}}))}function Jf(e){return L(e).flatMap(e=>e===Kf.Images?"image/*":Qf(e).map(e=>`.${e}`)).join(",")}async function eI(e,t,n,i){const s=await us(),{name:o,extension:r}=Do(t.name),l=`organization/${e}/${ns()}/${g(o)}.${r}`,{awsS3PostCredentials:{endpointUrl:d,policy:c,amzCredential:u,amzSignature:m,amzDate:h,amzSecurityToken:p}}=await function(e,t){return _s("query AwsS3PostCredentials($organizationId: OrganizationId!, $acl: String!, $key: String!) {\n awsS3PostCredentials(organizationId: $organizationId, acl: $acl, key: $key) {\n endpointUrl\n policy\n amzSignature\n amzCredential\n amzDate\n amzSecurityToken\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:e,acl:n,key:l},s),f=new FormData;return f.append("key",l),f.append("acl",n),f.append("success_action_status","201"),f.append("X-Amz-Credential",u),f.append("X-Amz-Algorithm","AWS4-HMAC-SHA256"),f.append("X-Amz-Date",h),p&&f.append("X-Amz-Security-Token",p),f.append("Policy",c),f.append("X-Amz-Signature",m),f.append("Content-Type",wo(r)),f.append("file",t),new Promise((e,s)=>{const o=new XMLHttpRequest;o.upload.onprogress=e=>{if(e.lengthComputable){const t=Math.round(e.loaded/e.total*100);i?.(t)}},o.onerror=()=>{s(new Error("Could not upload file to S3"))},o.onreadystatechange=()=>{if(4===o.readyState){const i=o.responseXML?.querySelector("Error Code");null!==i?(a("Could not upload file to S3",{code:i?.textContent??"",message:o.responseXML?.querySelector("Error Message")?.textContent??""}),s(new Error("Could not upload file to S3"))):e({acl:n,key:l,name:t.name,size:t.size})}},o.open("POST",d,!0),o.send(f)})}!function(e){e[e.Archives=0]="Archives",e[e.Csv=1]="Csv",e[e.Gpx=2]="Gpx",e[e.Images=3]="Images",e[e.Kml=4]="Kml",e[e.Pdf=5]="Pdf",e[e.SmallImages=6]="SmallImages",e[e.Videos=7]="Videos"}(Kf||(Kf={}));const tI=e=>{switch(e.split(".").at(-1)){case"csv":return Ch.FileCSV;case"jpeg":case"jpg":return Ch.FileJPG;case"pdf":return Ch.FilePDF;case"png":return Ch.FilePNG;case"zip":return Ch.FileZIP;default:return Ch.FileBlank}};function nI(e,t){return`https://${t}.s3-eu-west-1.amazonaws.com/${e.key}`}var iI=n(4741);function aI(e,t,n){return 25===e?{transform:`translateX(${t}px) rotate(0.25turn)`,transformOrigin:"top left"}:50===e?{transform:"rotate(0.5turn)"}:75===e?{transform:`translateY(${n}px) rotate(0.75turn)`,transformOrigin:"top left"}:{}}const sI=j("div",{alignItems:"center",background:"#434c5e",borderRadius:"$1",color:"white",cursor:"pointer",display:"flex",variants:{controls:{true:{height:"calc(100% - 10px)",paddingLeft:"10px",paddingRight:"10px",width:"200px"}},rotate:{true:{height:"40px",justifyContent:"center",marginLeft:"10px",width:"40px"}}}}),oI=j("input",{"-webkit-appearance":"none",background:"transparent",marginLeft:"10px",marginRight:"10px",width:"100%","&::-webkit-slider-thumb":{"-webkit-appearance":"none",background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",marginTop:"-7px",width:"16px"},"&::-webkit-slider-runnable-track":{background:"white",borderRadius:"2px",cursor:"pointer",height:"2px",width:"100%"},"&:focus::-webkit-slider-runnable-track":{background:"white"},"&::-moz-range-thumb":{background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",width:"16px"},"&::-moz-range-track":{background:"white",borderRadius:"2px",cursor:"pointer",height:"2px",width:"100%"},"&::-ms-thumb":{background:"white",borderRadius:"16px",cursor:"pointer",height:"16px",width:"16px"},"&:focus":{ouline:"none"}});var rI;!function(e){e[e.EmptyFile=0]="EmptyFile",e[e.Pdf=1]="Pdf",e[e.Image=2]="Image"}(rI||(rI={}));class lI extends l.Component{contentRef;renderPagesDebounced;constructor(e){super(e);let t=rI.Image;"string"!=typeof this.props.fileUrl||0===this.props.fileUrl.trim().length?t=rI.EmptyFile:"pdf"===Do(this.props.fileUrl).extension&&(t=rI.Pdf),this.state={image:null,isLoading:!0,fileType:t,pdf:null,rotate:0,zoomLevel:100},this.renderPagesDebounced=(0,iI.A)(()=>{this.renderPdfPages()},200),this.contentRef=l.createRef()}componentDidMount(){var e;this.state.fileType===rI.Pdf?(e=this.props.fileUrl,(void 0===window.pdfjsLib?Pa("https://cdn.jsdelivr.net/npm/pdfjs-dist@2.0.943/build/pdf.min.js"):Promise.resolve(!0)).then(()=>window.pdfjsLib.getDocument(e))).then(e=>{this.setState({pdf:e}),this.renderPdfPages()}):this.state.fileType===rI.Image&&this.loaderImage()}renderPdfPages(){this.state.fileType===rI.Pdf&&async function(e,t,n,i){Array.from(t.childNodes).forEach(e=>{t.removeChild(e)});for(let a=1;a<=e.numPages;a++){const s=await e.getPage(a),o=s.getViewport(n),r=document.createElement("div"),l=document.createElement("canvas"),d=l.getContext("2d"),c=aI(i,o.height,o.width);25===i||75===i?(r.style.height=`${o.width}px`,r.style.width=`${o.height}px`):(r.style.height=`${o.height}px`,r.style.width=`${o.width}px`),l.height=o.height,l.width=o.width,l.style.transform=c.transform||"",l.style.transformOrigin=c.transformOrigin||"",r.appendChild(l),t.appendChild(r),s.render({canvasContext:d,viewport:o})}}(this.state.pdf,this.contentRef.current,this.state.zoomLevel/100,this.state.rotate).then(()=>{this.setState({isLoading:!1})})}loaderImage(){if(this.state.fileType===rI.Image){const e=new Image;e.onload=()=>{const t=this.contentRef.current.getBoundingClientRect(),n=t.height/e.height,i=t.width/e.width,a=Math.min(n,i);let s=100;a<1&&(s=100*(a-.1*a)),this.setState({image:e,isLoading:!1,zoomLevel:s})},e.onerror=()=>{this.setState({isLoading:!1,fileType:rI.EmptyFile})},e.src=this.props.fileUrl}}imageHeight(){return this.state.image.height*(this.state.zoomLevel/100)}imageWidth(){return this.state.image.width*(this.state.zoomLevel/100)}zoomMinus(){this.setState({zoomLevel:Math.max(1,10*Math.floor((this.state.zoomLevel-10)/10))}),this.renderPagesDebounced()}zoomPlus(){this.setState({zoomLevel:10*Math.ceil((this.state.zoomLevel+10)/10)}),this.renderPagesDebounced()}rangeChange(e){this.setState({zoomLevel:parseInt(e.target.value,10)}),this.renderPagesDebounced()}rotate(){this.setState(e=>{const t=e.rotate+25;return{rotate:t>=100?0:t}}),this.renderPagesDebounced()}render(){return(0,i.jsx)(vi,{children:({container:e})=>{const t=e.get(Si);return(0,i.jsxs)($,{css:{position:"relative"},direction:"column",height:1,width:1,children:[(0,i.jsx)($i,{ref:this.contentRef,css:{height:"calc(100% - 50px)",overflow:"auto",padding:"10px",width:"100%",zIndex:"1","& > div":{margin:"auto",marginBottom:"20px"},"& > div:last-child":{marginBottom:"0"}}}),this.state.fileType===rI.Image&&!1===this.state.isLoading&&(0,i.jsx)($i,{css:{background:"white",height:"calc(100% - 50px)",left:"0",overflow:"auto",padding:"10px",position:"absolute",top:"0",width:"100%",zIndex:"5","& > div:last-child":{marginBottom:"0"}},children:(0,i.jsx)("img",{src:this.state.image.src,style:{height:`${this.imageHeight()}px`,width:`${this.imageWidth()}px`,...aI(this.state.rotate,this.imageHeight(),this.imageWidth())}})}),!0===this.state.isLoading&&(0,i.jsx)($i,{css:{background:"white",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"10"},children:(0,i.jsx)(da,{})}),this.state.fileType===rI.EmptyFile&&(0,i.jsx)($,{align:"center",css:{background:"white",fontSize:"22px",height:"calc(100% - 50px)",left:"0",position:"absolute",top:"0",width:"100%",zIndex:"20"},justify:"center",children:t.translate("aucun_fichier_77247")}),(0,i.jsxs)($,{align:"center",css:{height:"50px",width:"100%"},justify:"center",children:[(0,i.jsxs)(sI,{controls:!0,children:[(0,i.jsx)("i",{className:"fas fa-minus",onClick:this.zoomMinus.bind(this)}),(0,i.jsx)(oI,{max:"200",min:"1",step:"1",type:"range",value:this.state.zoomLevel,onChange:this.rangeChange.bind(this)}),(0,i.jsx)("i",{className:"fas fa-plus",onClick:this.zoomPlus.bind(this)})]}),(0,i.jsx)(sI,{rotate:!0,onClick:this.rotate.bind(this),children:(0,i.jsx)("i",{className:"far fa-undo"})})]})]})}})}}const dI=j("div",{display:"flex",flexDirection:"column",height:"100%",width:"100%",zIndex:"10","& .fsp-header":{px:"$7"},"& .fsp-category":{fontSize:"11px",fontWeight:"$semiBold",textTransform:"uppercase"},"& .fsp-title":{fontSize:"$textMd",fontWeight:"$semiBold"},variants:{color:{white:{"& .fsp-header":{background:"white",borderBottom:"1px solid $gray200"},"& .fsp-category":{color:"$gray600"},"& .fsp-title":{color:"$gray900"}},dark:{"& .fsp-header":{background:"$gray900"},"& .fsp-category":{color:"white"},"& .fsp-title":{color:"white"}}}},defaultVariants:{color:"white"}}),cI=e=>{const t=Ri();return(0,i.jsxs)(dI,{color:e.color,children:[(0,i.jsxs)($,{align:"center",className:"fsp-header",gap:"4",height:65,width:1,children:[(0,i.jsx)($i,{css:{flexShrink:3},width:300}),(0,i.jsxs)($,{align:"center",css:{flex:"1"},direction:"column",children:[e.category&&(0,i.jsx)($i,{className:"fsp-category",children:e.category}),(0,i.jsx)($i,{className:"fsp-title",css:{maxWidth:"100%"},ellipsis:!0,children:e.heading})]}),(0,i.jsxs)($,{gap:"4",justify:"end",width:300,children:[e.button,(0,i.jsx)(ga,{color:"dark"===e.color?"gray":"white",css:{flexShrink:0},leftIcon:"xmark",onClick:()=>{"function"==typeof e.onClose?e.onClose():t.goBack(e.fallbackClosePath||ig.HOME)}})]})]}),(0,i.jsx)($i,{css:{height:"calc(100% - 65px)"},width:1,children:e.children})]})},uI=({acl:e,document:t,onDelete:n,...a})=>{const{translate:s}=zg(),[o,r]=(0,l.useState)(!1),d=bp(),c="public-read"===e||h(t.url),u=h(t.url)?t.url:nI(t,ia.HEAVENT_AWS_UPLOADS_BUCKET),{designSystem:m}=Zs();return(0,i.jsxs)($,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",fontSize:"$textSm",overflow:"hidden",minHeight:"72px","@tablet":{border:"1px solid $gray300",borderRadius:"$2",fontSize:"$textMd"},...(()=>{switch(m){case qs:return{padding:"$3","@tablet":{padding:"$3"}};case Ys:return{padding:"$4 $6"};default:tr()}})()},justify:"between",width:1,...d&&{onClick:()=>{!function(e,t){const n=document.createElement("a");n.href=e,n.target="_blank",n.download=t,n.click()}(u,t.name)}},...a,children:[(0,i.jsxs)($,{align:"center",css:{maxInlineSize:"80%"},gap:"4",children:[(0,i.jsx)("img",{src:tI(t.name),style:{color:"black"}}),(0,i.jsx)(N,{css:{ellipsis:!0,wordBreak:"break-all",...(()=>{if(m===Ys)return{fontWeight:"$medium"}})()},children:t.name})]}),(0,i.jsx)($i,{css:{flex:"1"}}),(0,i.jsxs)($,{gap:"2",children:[c&&(0,i.jsxs)(i.Fragment,{children:[!1===d&&(0,i.jsx)(ga,{"aria-label":s("view_48132"),color:"white",leftIcon:"eye",onClick:()=>{r(!0)}}),(0,i.jsx)(ga,{"aria-label":s("download_47607"),color:"white",download:t.name,leftIcon:"download",target:"_blank",to:u})]}),n&&(0,i.jsx)(ga,{"aria-label":s("delete_file_40417"),color:"white",leftIcon:"trash-can",onClick:n})]}),o&&(0,_a.createPortal)((0,i.jsx)($,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"250"},height:1,width:1,children:(0,i.jsx)(cI,{heading:t.name,onClose:()=>r(!1),children:(0,i.jsx)(lI,{fileUrl:u})})}),document.body)]})},mI=j("progress",{}),gI=e=>(0,i.jsx)(mI,{...e,children:e.children}),hI=({name:e,progress:t,...n})=>{const a=Math.min(100,Math.max(0,t)),{inputId:s}=uh();return(0,i.jsxs)($,{css:{border:"1px solid $gray300",borderRadius:"$2",padding:"$4"},direction:"column",width:1,gap:"2",...n,children:[(0,i.jsx)(hh,{htmlFor:s,children:e}),(0,i.jsxs)(gI,{id:s,max:"100",value:a,children:[a,"%"]})]})};var pI=n(3112),fI=(n(8181),n(9618));const II=({allowCrop:e,onChange:t,hint:n,label:a,...s})=>{const o=Ai(),{isDisabled:r}=Lf(),d=(0,l.useRef)(null),[c,u]=(0,l.useState)(!1),[m,g]=(0,l.useState)(null),[h,p]=(0,l.useState)(!1),f=Qf(Kf.Images),I=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{g({src:t,type:(0,pI.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}p(!0)};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsx)($,{align:"center",css:{background:c?"$primary50":"$gray50",border:c?"1px solid $primary300":"1px solid $gray200",borderRadius:"$1",cursor:r?"not-allowed":"pointer"},disabled:r,height:126,justify:"center",width:126,onClick:()=>{d.current?.click()},onDragEnter:e=>{Ia(e),u(!0)},onDragLeave:e=>{Ia(e),u(!1)},onDragOver:e=>{Ia(e),c||u(!0)},onDrop:n=>{Ia(n),u(!1);const i=n.dataTransfer.files.item(0);i&&f.includes(Do(i.name).extension)&&(e?I(n.dataTransfer.files):t(i))},children:(0,i.jsx)($,{align:"center",css:{background:c?"$primary100":"$gray100",borderRadius:"36px",color:c?"$primary600":"$gray600"},height:c?48:32,justify:"center",width:c?48:32,children:(0,i.jsx)(ra,{icon:"plus"})})}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",children:[(0,i.jsx)($i,{color:"gray700",fontWeight:"medium",children:a}),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray400",children:n})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{d.current?.click()},children:o("s_lectionner_un_50712")})})]}),(0,i.jsx)($i,{css:{display:"none"},children:(0,i.jsx)("input",{ref:d,accept:Jf(Kf.Images),type:"file",onChange:n=>{n.target.files?.[0]&&(e?I(n.target.files):t(n.target.files[0]))},...s})})]}),e&&h&&m&&(0,i.jsx)(_I,{image:m,onChange:t,onClose:()=>p(!1)})]})},_I=({image:e,onChange:t,onClose:n})=>{const a=Ai(),s=(0,l.useRef)(null);return(0,l.useEffect)(()=>()=>{e&&e.src&&URL.revokeObjectURL(e.src)},[e]),(0,i.jsx)(xf,{size:"md",onClose:n,children:(0,i.jsxs)($,{css:{overflow:"auto"},direction:"column",gap:"3",children:[(0,i.jsx)(fI.IOb,{ref:s,className:"cropper",defaultSize:({imageSize:e,visibleArea:t})=>({width:(t||e).width,height:(t||e).height}),src:e.src,stencilProps:{aspectRatio:1}}),(0,i.jsx)(ga,{size:"lg",textAlign:"center",onClick:()=>{const i=s.current?.getCanvas();i&&i.toBlob(n=>{if(n){const i=new File([n],e.name,{lastModified:(new Date).getTime(),type:e.type});t(i)}},e.type,.95),n()},children:a("submit_21373")})]})})},xI="dragover",yI=({accept:e,allowCrop:t,"aria-describedby":n,capture:a,onChange:s,...o})=>{const{translate:r}=zg(),d=Ci(),{isDisabled:c}=Lf(),u=(0,ch.A)(),m=(0,l.useRef)(null),[g,h]=(0,l.useState)(void 0),[p,f]=(0,l.useState)(null),[I,_]=(0,l.useState)(!1),x=Qf(e||[]),y=Xf(e||[]),S=e=>{if(e&&e[0]){const t=URL.createObjectURL(e[0]),n=e[0].type,i=new FileReader;i.onload=i=>{f({src:t,type:(0,pI.h)(i.target?.result,n),name:e[0].name})},i.readAsArrayBuffer(e[0])}_(!0)},{designSystem:j}=(0,l.useContext)(Hs);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("input",{ref:m,accept:e?Jf(e):void 0,"aria-describedby":[n,u].join(" "),capture:a,style:{display:"none"},type:"file",onChange:n=>{if(n.target.files?.[0])if(t){if(e!==Kf.Images)throw new Error("Crop enabled on non-image file uploader");S(n.target.files)}else s(n.target.files[0])},...o}),(0,i.jsxs)($,{align:"center",className:g,css:{background:"$gray50",borderWidth:"1px",borderColor:"$gray200",borderRadius:"$2",cursor:c?"not-allowed":"pointer",padding:"$4",[`&.${xI}`]:{background:"$primary50",borderColor:"$gray200"},...(()=>{switch(j){case qs:return{borderStyle:"solid"};case Ys:return{borderStyle:"dashed",[`&:hover, &:has( input:focus), &.${xI}`]:{borderStyle:"solid",borderColor:"$primary500"}};default:tr()}})()},direction:"column",disabled:c,gap:"2",width:1,onClick:()=>m.current?.click(),onDragLeave:()=>{h(void 0)},onDragOver:e=>{Ia(e),h(xI)},onDrop:n=>{Ia(n),h(void 0);const i=n.dataTransfer.files.item(0);if(i&&(0===x.length||x.includes(Do(i.name).extension)))if(t){if(e!==Kf.Images&&e!=Kf.SmallImages)throw new Error("Crop enabled on non-image file uploader");S(n.dataTransfer.files)}else s(i)},children:[(0,i.jsx)($,{align:"center","aria-hidden":!0,css:{color:"$gray600",...(()=>{switch(j){case qs:return{background:"$gray100",borderRadius:"36px"};case Ys:return;default:tr()}})()},height:32,justify:"center",width:32,children:(0,i.jsx)(ra,{icon:"cloud-arrow-down"})}),(0,i.jsxs)($,{css:{textAlign:"center"},direction:"column",justify:"center",wrap:"wrap",children:[(0,i.jsx)(N,{textStyle:"subtitle",children:[...d(r("_1_ou_glisser_61813","{1}"),(0,i.jsx)(ga,{color:"invisible",css:{height:"auto",padding:0},id:"clickHereLink",type:"button",children:r("cliquez_ici_98447")}))]}),(0,i.jsx)(N,{id:u,textStyle:"subtitle",children:[...d(r("_1_accept_2_30390","{1}","{2}"),F(x)?x.map((e,t,{length:n})=>(0,i.jsxs)(l.Fragment,{children:[t>0?n-1!==t?", ":" & ":"",(0,i.jsxs)("code",{children:[".",e]})]},e)):r("all_file_format_50211"),y!==1/0?qd.bytesToMegabytes(y):r("no_55268"))]})]})]}),t&&I&&p&&(0,i.jsx)(_I,{image:p,onChange:s,onClose:()=>_(!1)})]})};var SI;!function(e){e[e.File=0]="File",e[e.Uploader=1]="Uploader",e[e.Uploading=2]="Uploading"}(SI||(SI={}));const jI=({acl:e,css:t,descId:n,description:a,errorId:s,inputId:o,label:r,labelId:d,hint:c,onChange:u,organizationId:m,state:g,value:h,...p})=>{const{translate:f}=zg(),[I,_]=(0,l.useState)(h?SI.File:SI.Uploader),[x,y]=(0,l.useState)(""),[S,j]=(0,l.useState)(0);return(0,i.jsxs)($,{"aria-live":"polite",css:t,direction:"column",gap:"1",width:1,children:[(r||a)&&(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(hh,{htmlFor:o,id:d,children:r}),(0,i.jsx)(mh,{id:n,children:a})]}),I===SI.File&&h?(0,i.jsx)(uI,{acl:e,"aria-label":f("delete_uploaded_14711"),document:h,id:o,role:"button",onDelete:()=>{u(null),_(SI.Uploader)}}):I===SI.Uploading?(0,i.jsx)(hI,{"aria-busy":!0,"aria-describedby":n,"aria-label":f("uploading_file_46483"),id:o,name:x,progress:S}):(0,i.jsx)(yI,{"aria-describedby":n,"aria-errormessage":s,"aria-invalid":"error"===g,"aria-label":f("upload_file_97740"),id:o,onChange:async t=>{_(SI.Uploading),y(t.name),j(0);try{if(t.size>Xf(p.accept||[]))throw y(""),alert(f("file_is_too_lar_57859")),new Error;const n=await eI(m,t,e,j);u({...n,file:t}),_(SI.File)}catch{_(SI.Uploader)}},...p}),(0,i.jsx)(gh,{state:g,children:c})]})},vI=({onChange:e,prefix:t,state:n,withFileField:a,...s})=>{const o=`${t}key`,r=`${t}name`,l=`${t}acl`,d=[o,r,l];let c;return a&&(c=`${t}file`,d.push(c)),(0,i.jsx)($f,{names:d,render:t=>{let d=null;h(t[o].input.value)&&h(t[r].input.value)&&h(t[l].input.value)&&(d={key:t[o].input.value,name:t[r].input.value,acl:t[l].input.value});const{invalid:u,hint:m}=Object.values(t).reduce((e,t)=>e.invalid?e:dh(t.meta)?{invalid:!0,hint:t.meta.error||t.meta.submitError}:e,{invalid:!1,hint:void 0});return(0,i.jsx)(jI,{hint:m,state:u?"error":n,value:d,onChange:n=>{t[o].input.onChange(n?.key??""),t[o].input.onBlur(),t[r].input.onChange(n?.name??""),t[r].input.onBlur(),t[l].input.onChange(n?.acl??""),t[l].input.onBlur(),a&&(t[c].input.onChange(n?.file),t[c].input.onBlur(),n?.file&&e?.(n.file))},...s})}})},bI=e=>{const t=Ai(),[n,a]=(0,l.useState)(!1);return(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsx)($i,{css:{border:"1px solid $gray200",borderRadius:"$1",overflow:"hidden",cursor:e.allowCrop?"pointer":void 0},height:126,width:126,onClick:e.allowCrop?()=>a(!0):void 0,children:(0,i.jsx)("img",{src:e.url,style:{objectFit:"cover",inlineSize:"100%",blockSize:"100%"}})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)($i,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray400",children:e.hint})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)($i,{color:"error700",css:{cursor:"pointer"},fontWeight:"medium",onClick:e.onDelete,children:t("supprimer_43083")})]}),e.allowCrop&&n&&(0,i.jsx)(_I,{image:{name:e.url.split("/").pop().split(".").join("-cropped."),src:`${e.url}?cacheblock=true`},onChange:e.onChange,onClose:()=>a(!1)})]})},AI=e=>(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsx)($,{align:"center",css:{background:"$gray50",border:"1px solid $gray200",borderRadius:"$1",cursor:"pointer"},height:126,justify:"center",width:126,children:(0,i.jsx)($,{height:64,width:64,children:(0,i.jsx)(la,{color:v.colors.gray900.value,height:"64px",strokeWidth:"4",width:"64px"})})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)($i,{color:"gray700",fontWeight:"medium",children:e.label}),e.hint&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray400",children:e.hint})]})]})]}),CI=({allowCrop:e,value:t,onChange:n,label:a,hint:s,organizationId:o,...r})=>{const[d,c]=(0,l.useState)(t?SI.File:SI.Uploader),u=async e=>{c(SI.Uploading);try{const t=await eI(o,e,"public-read");n(t),c(SI.File)}catch{c(SI.Uploader)}};return d===SI.File&&t?(0,i.jsx)(bI,{allowCrop:e,hint:s,label:a,url:nI(t,ia.HEAVENT_AWS_UPLOADS_BUCKET),onChange:u,onDelete:()=>{n(null),c(SI.Uploader)}}):d===SI.Uploading?(0,i.jsx)(AI,{hint:s,label:a}):(0,i.jsx)(II,{allowCrop:e,hint:s,label:a,onChange:u,...r})},EI=({prefix:e,...t})=>{const n=`${e}key`,a=`${e}name`,s=`${e}acl`;return(0,i.jsx)($f,{names:[n,a,s],render:e=>{let o=null;return h(e[n].input.value)&&h(e[a].input.value)&&h(e[s].input.value)&&(o={key:e[n].input.value,name:e[a].input.value,acl:e[s].input.value}),(0,i.jsx)(CI,{value:o,onChange:t=>{e[n].input.onChange(t?.key??""),e[a].input.onChange(t?.name??""),e[s].input.onChange(t?.acl??"")},...t})}})},TI=j("div",{variants:{direction:{horizontal:{width:"100%"},vertical:{height:"100%"}},color:{gray100:{},gray200:{}}},compoundVariants:[{direction:"horizontal",color:"gray100",css:{borderTop:"1px solid $gray100"}},{direction:"vertical",color:"gray100",css:{borderRight:"1px solid $gray100"}},{direction:"horizontal",color:"gray200",css:{borderTop:"1px solid $gray200"}},{direction:"vertical",color:"gray200",css:{borderRight:"1px solid $gray200"}}],defaultVariants:{color:"gray200"}}),MI=e=>(0,i.jsx)(TI,{"aria-orientation":e.direction,color:e.color,css:e.css,direction:e.direction,role:"separator"}),RI=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:e.height}),(0,i.jsx)(TI,{color:e.color,direction:"horizontal",role:"separator"}),(0,i.jsx)(Hg,{height:e.height})]}),DI=({value:e,onChange:t,css:n,label:a,state:s,description:o,hint:r,...d})=>{const c=Ai(),m=(0,l.useCallback)(e=>{e&&f(e.getBoundingClientRect().width)},[]),g=(0,l.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[p,f]=(0,l.useState)(200),[I,_]=(0,l.useState)(!1),[x,y]=(0,l.useState)(""),S=bi(Xr),j=(0,l.useMemo)(()=>(0,mo.A)(S.countries.flatMap(e=>L(e.phoneCode).map(t=>({...e,phoneCode:t}))),({name:e})=>u(e)),[]),v=(0,l.useMemo)(()=>j.find(({code:t,phoneCode:n})=>t===e.country&&n===e.code),[e.country,e.code]),b=(0,l.useMemo)(()=>j.filter(e=>!h(x)||e.name.toLowerCase().includes(x.trim().toLowerCase())||e.phoneCode.includes(x.trim())),[j,x]),A=(0,l.useMemo)(()=>b.map((n,a)=>(0,i.jsx)(Np,{onClick:()=>{t({...e,country:n.code,code:n.phoneCode}),y(""),_(!1)},children:(0,i.jsxs)($,{gap:"2",width:1,children:[(0,i.jsx)($i,{children:n.emoji}),(0,i.jsx)($i,{css:{ellipsis:!0},children:n.name}),(0,i.jsx)($i,{color:"gray500",children:n.phoneCode})]})},a)),[b,e,t]),{inputId:C,descId:E,errorId:T}=uh();return(0,i.jsxs)($,{ref:m,css:n,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:C,children:a}),(0,i.jsx)(mh,{id:E,children:o}),(a||o)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsxs)(Rp,{disabled:"disabled"===s,isOpen:I,onStateChange:e=>_(e),children:[(0,i.jsx)(Up,{children:(0,i.jsx)(fh,{css:{borderRight:"none",borderBottomRightRadius:"0",borderTopRightRadius:"0",userSelect:"none",width:"100px","& .styled-input-container-circle-exclamation":{display:"none"},cursor:"disabled"===s?"not-allowed !important":void 0},cursor:"pointer",rightIcon:I?"chevron-up":"chevron-down",state:s,children:v&&(0,i.jsxs)($i,{width:1,children:[v.emoji," ",v.phoneCode]})})}),(0,i.jsx)(Fp,{placement:"bottom-start",renderOnPortal:!0,width:p,children:(0,i.jsxs)($,{direction:"column",height:Math.min(201,40*b.length+41),width:1,children:[(0,i.jsx)($i,{css:{padding:"$2 $4","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"$gray500",opacity:1}},height:40,children:(0,i.jsx)("input",{ref:g,"aria-label":c("indicatif_t_l_p_02025"),placeholder:c("rechercher_un_p_04678"),type:"text",value:x,onChange:e=>{y(e.target.value)}})}),(0,i.jsx)(MI,{color:"gray100",direction:"horizontal"}),(0,i.jsx)($,{css:{height:"calc(100% - 41px)",overflowY:"auto"},direction:"column",children:A})]})})]}),(0,i.jsx)(fh,{css:{borderBottomLeftRadius:"0",borderTopLeftRadius:"0",flex:"1"},cursor:"text",state:s,children:(0,i.jsx)($i,{css:{flex:"1",height:"100%","& input":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"},"& input::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder ":{color:"$gray500",opacity:1}},children:(0,i.jsx)("input",{"aria-describedby":o?E:void 0,"aria-errormessage":"error"===s?T:void 0,"aria-invalid":"error"===s,autoComplete:"tel-national",disabled:"disabled"===s,id:C,type:"tel",value:e.number,onChange:n=>{t({...e,number:n.target.value})},...d})})})]}),(0,i.jsx)(gh,{id:T,state:s,children:r})]})},OI=(0,l.memo)(function({prefix:e,hint:t,state:n,...a}){const{isDisabled:s}=Lf(),o=`${e}country`,r=`${e}code`,l=`${e}number`;return(0,i.jsx)($f,{names:[o,r,l],render:e=>{const d=dh(e[r].meta)||dh(e[l].meta);return(0,i.jsx)(DI,{hint:d?e[r].meta.error||e[l].meta.error:t,state:d?"error":s?"disabled":n,value:{country:e[o].input.value,code:e[r].input.value,number:e[l].input.value},onChange:t=>{e[o].input.onChange(t.country),e[r].input.onChange(t.code),e[l].input.onChange(t.number)},...a})}})});var wI=n(7456);const PI=e=>(0,i.jsx)($,{css:{background:"$gray50",boxShadow:"0px -1px 3px rgba(16, 24, 40, 0.1), 0px -1px 2px rgba(16, 24, 40, 0.06)",color:"$primary500",cursor:"pointer",padding:"$3 $4",userSelect:"none"},width:1,onClick:e.onClick,children:e.children}),$I=({children:e,index:t,state:n,onToggle:a,...s})=>(0,i.jsxs)(i.Fragment,{children:[0!==t&&(0,i.jsx)(Hg,{height:"6"}),(0,i.jsxs)($,{align:"center",css:a?{cursor:"pointer",userSelect:"none"}:void 0,gap:"2",width:1,onClick:a,children:[a&&(0,i.jsx)(Uf,{shouldPreventDefault:!1,state:n??"unchecked",onClick:yh.A}),(0,i.jsx)($i,{"aria-label":e?.toString(),css:{flex:"1"},font:"gray600 textXs semiBold",role:"group",...s,children:e})]}),(0,i.jsx)(Hg,{height:"2"})]});function kI(e){return l.Children.toArray(e).flatMap(e=>(0,l.isValidElement)(e)&&e.type===l.Fragment?kI(e.props.children):e)}function NI(e){return"string"==typeof e?e:"number"==typeof e?String(e):Array.isArray(e)?e.map(NI).join(""):(0,l.isValidElement)(e)?NI(e.props.children):""}const zI=({badge:e,children:t,color:n,css:a,disabled:s,isCheckbox:o,isRadio:r,isSelected:d,onClick:c,subtext:u,value:m,...g})=>{const p=(0,l.useCallback)(()=>{s||c?.()},[s,c]),f=(0,l.useCallback)(e=>{"Enter"===e.key&&p?.()},[p]),I=(0,l.useMemo)(()=>NI(t),[t]);return(0,i.jsxs)($,{align:"center","aria-checked":o?d:void 0,"aria-label":I,"aria-selected":d,css:{cursor:s?"default":"pointer",minHeight:"40px",padding:"$2 $3",userSelect:"none","&:hover":{background:"$gray100",borderRadius:"$1"},...a},gap:"3",role:"option",tabIndex:0,width:1,onClick:p,onKeyDown:f,...g,children:[o&&(0,i.jsx)(Uf,{disabled:s,shouldPreventDefault:!1,state:d?"checked":"unchecked",onClick:yh.A}),r&&(0,i.jsx)(gf,{shouldPreventDefault:!1,state:d?"checked":"unchecked",onClick:yh.A}),(0,i.jsxs)($,{align:"center",css:{flex:"1",overflow:"hidden"},gap:"2",children:[rf(n)&&!e&&(0,i.jsx)($i,{css:{background:n,borderRadius:"16px",overflow:"hidden"},height:16,width:16}),rf(n)&&e?(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},children:(0,i.jsx)(jf,{color:n,children:t})}):(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{color:"gray800",css:{ellipsis:!0},title:I,width:1,children:t}),h(u)&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),!o&&!r&&d&&(0,i.jsx)($i,{color:"primary500",children:(0,i.jsx)(ra,{icon:"check"})})]})};function LI(e,t){if(0===e.length)return"unchecked";{const n=(0,ml.A)(e,t).length;return 0===n?"unchecked":n>=e.length?"checked":"indeterminate"}}function FI(e,t,n){return"checked"===n?(0,Jc.A)(e,t):(0,$a.A)(e.concat(t))}function UI(e){return l.Children.toArray(e).map(t=>{if("optgroup"===t.type)return[{id:(0,ch.A)(),type:"group",text:t.props.label}].concat(UI(t.props.children));if("option"===t.type)return{id:(0,ch.A)(),type:"option",text:t.props.children,value:t.props.value,badge:!0===t.props["data-badge"]||"true"===t.props["data-badge"],color:t.props["data-color"],disabled:t.props.disabled,radio:t.props["data-radio"],selected:t.props.selected,style:t.props.style,subtext:t.props["data-subtext"]};if(t.type===Symbol.for("react.fragment"))return UI(t.props.children);throw a("Unexpected child type",t,e),new Error("Unexpected child type")}).flat()}function BI(e){return Object.fromEntries(e.filter(e=>"option"===e.type).map(e=>[e.value,e.text]))}const VI=({children:e,createText:t,css:n,description:a,hint:s,icon:o,isCreateVisible:r,isSearchLoading:d,isSearchVisible:c,isSelectAllVisible:u,label:g,menuWidth:f,multiple:I,onChange:_,onClick:x,onCreateClick:y,placeholder:S,renderOnPortal:j,renderValue:v,searchElement:b,searchPlaceholder:A,state:C,triggerElem:E,values:T})=>{const{translate:M}=zg(),R=(0,l.useCallback)(e=>e?.focus({preventScroll:!0}),[]),[D,O]=(0,l.useState)(!1),[w,P]=(0,l.useState)(""),{inputId:k,descId:N}=uh(),{displayedChildren:z,allValues:L,valuesByGroup:U,childrenByRadio:B,valueToName:V,valueToText:G}=function(e,t){const n=(0,l.useMemo)(()=>UI(e),[e]),i=(0,l.useMemo)(()=>{const e=m(t||"");return n.filter(t=>""===e||"group"===t.type||m(NI(t.text)).includes(e)).filter((e,t,n)=>{const i=n[t+1];return"option"===e.type||"option"===i?.type})},[n,t]),a=(0,l.useMemo)(()=>i.flatMap(e=>"option"===e.type?[e.value]:[]),[i]),s=(0,l.useMemo)(()=>{const e={};let t=null;for(const n of i)"group"===n.type?(t=n.id,e[t]=[]):t&&!n.disabled&&p(n.radio)&&e[t].push(n.value);return e},[i]),o=(0,l.useMemo)(()=>(0,ef.A)((0,Zd.A)(i.filter(e=>"option"===e.type&&h(e.radio)),e=>e.radio),e=>e.map(e=>e.value)),[i]),r=(0,l.useMemo)(()=>BI(n),[n]),d=(0,l.useMemo)(()=>(0,ef.A)(r,NI),[r]);return{displayedChildren:i,allValues:a,valuesByGroup:s,childrenByRadio:o,valueToName:r,valueToText:d}}(e,w),W=LI(L,T),q=(0,l.useMemo)(()=>v?v(T[0],V[T[0]]):V[T[0]],[v,T,V]);return(0,l.useEffect)(()=>{D||P("")},[D]),(0,i.jsxs)($,{css:n,direction:"column",width:1,children:[g&&(0,i.jsx)(hh,{htmlFor:k,children:g}),a&&(0,i.jsx)(mh,{id:N,children:a}),(g||a)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)(Rp,{disabled:"disabled"===C,isOpen:D,onStateChange:e=>O(e),children:[(0,i.jsx)(Up,{children:E||(0,i.jsx)(fh,{"aria-describedby":N,"aria-label":(g??S)+(G[T[0]]?` (currently: ${G[T[0]]})`:""),"aria-multiselectable":I,"aria-owns":z.map(e=>e.id).join(" "),"aria-placeholder":S,css:{maxHeight:"200px",overflowY:"auto",padding:"$2 $3",userSelect:"none",cursor:"disabled"===C?"not-allowed":void 0},cursor:"disabled"===C?"default":"pointer",height:"fluid",icon:o,id:k,rightIcon:D?"chevron-up":"chevron-down",role:"listbox",state:C,children:F(T)?I?(0,i.jsx)($,{css:{flex:"1",overflowY:"auto"},gap:"2",height:1,role:"presentation",wrap:"wrap",children:T.map((e,t)=>(0,i.jsx)(jf,{ellipsis:!0,rightIcon:"xmark",onRightIconClick:t=>{Ia(t),_((0,wI.A)(T,e))},children:V[e]},t))}):(0,i.jsx)($i,{color:"gray800",css:{flex:"1",overflow:"hidden"},role:"presentation",children:(0,i.jsx)($i,{css:{ellipsis:!0},title:G[T[0]],children:q})}):(0,i.jsx)($i,{color:"gray500",css:{flex:"1"},role:"presentation",children:S})})}),(0,i.jsx)(Fp,{css:{padding:"0"},placement:"bottom-start",renderOnPortal:j,width:f??"match",children:(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsxs)($,{css:{padding:"$3"},direction:"column",width:1,children:[c&&(0,i.jsxs)(i.Fragment,{children:[b||(0,i.jsx)(Ih,{ref:R,icon:"magnifying-glass",placeholder:A||M("rechercher_50038"),state:"search",value:w,onChange:P}),(0,i.jsx)(Hg,{height:"3"})]}),(0,i.jsx)($i,{css:{maxHeight:"250px",overflowY:"auto"},children:d?(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:40}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40})]}):z.map((e,t)=>{if("group"===e.type){const n=U[e.id]??[],a=!0===I&&F(n),s=LI(n,T);return(0,i.jsx)($I,{id:e.id,index:t,state:a?s:void 0,onToggle:a?()=>{_(FI(T,n,s))}:void 0,children:e.text},e.id)}{const n=e.value,a=e.selected??T.includes(n),s=e.radio,o=!0===I&&p(s),r=!0===I&&h(s);return(0,i.jsx)(zI,{badge:e.badge,color:e.color,css:e.style,disabled:e.disabled,id:e.id,isCheckbox:o,isRadio:r,isSelected:a,subtext:e.subtext,value:e.value,onClick:()=>{if(x)x(n,a);else if(I&&o)_(a?(0,wI.A)(T,n):T.concat(n));else if(I&&r){const e=(0,Jc.A)(T,B[s]).concat(a?[]:[n]);_(e)}else _(a?[]:[n]),O(!1)},children:e.text},t)}})})]}),r&&(0,i.jsxs)(PI,{onClick:()=>{y?.(),O(!1)},children:["+ ",t||M("cr_er_82895")]}),u&&(0,i.jsx)(PI,{onClick:()=>{_(FI(T,L,W))},children:M("checked"===W?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})})]}),(0,i.jsx)(gh,{state:C,children:s})]})},GI=({name:e,hint:t,state:n,multiple:a,...s})=>{const{isDisabled:o}=Lf();return(0,i.jsx)(qg.D0,{name:e,render:r=>{const l=dh(r.meta);return(0,i.jsx)(VI,{hint:l?r.meta.error:t,multiple:a,name:e,state:l?"error":o?"disabled":n,values:a?Array.isArray(r.input.value)?r.input.value:[]:"number"==typeof r.input.value||h(r.input.value)?[r.input.value]:[],onChange:e=>{a?r.input.onChange(e):F(e)?r.input.onChange(e[0]):r.input.onChange(null)},...s})}})},WI=j("select",{backgroundColor:"$white",height:"100%",left:0,opacity:0,position:"absolute",top:0,width:"100%"}),qI=j("div",{ellipsis:""}),YI=({autoComplete:e,children:t,css:n,label:a,description:s,shouldParseAsInt:o,shouldParseAsBoolean:r,onChange:d,hint:c,icon:u,state:m,value:g="",...h})=>{const p=l.useMemo(()=>BI(UI(t)),[t]),{inputId:f,descId:I,errorId:_}=uh();return(0,i.jsxs)($,{css:n,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:f,children:a}),(0,i.jsx)(mh,{id:I,children:s}),(a||s)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)(fh,{cursor:"default",icon:u,state:m,children:[(0,i.jsx)($,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,width:1,children:(0,i.jsx)(qI,{children:p[g.toString()]})}),(0,i.jsx)($,{css:{color:"$gray500"},children:(0,i.jsx)(ra,{icon:"chevron-down"})}),(0,i.jsx)(WI,{"aria-describedby":s?I:void 0,"aria-errormessage":"error"===m?_:void 0,"aria-invalid":"error"===m,autoComplete:e??"off",css:{cursor:"disabled"===m?"not-allowed":"pointer"},disabled:"disabled"===m,id:f,value:g.toString(),onChange:e=>{d(o?parseInt(e.target.value,10):r?"true"===e.target.value:e.target.value)},...h,children:t})]}),(0,i.jsx)(gh,{id:_,state:m,children:c})]})},HI=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=dh(s.meta);return(0,i.jsx)(YI,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:e=>{s.input.onChange(e)},onFocus:s.input.onFocus,...a})}}),ZI=({css:e,label:t,description:n,state:a,icon:s,hint:o,rightIcon:r,rightText:l,onChange:d,value:c,...u})=>{const{inputId:m,descId:g,errorId:h}=uh();return(0,i.jsxs)($,{css:e,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:m,children:t}),(0,i.jsx)(mh,{id:g,children:n}),(t||n)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(fh,{cursor:"text",height:"fluid",icon:s,rightIcon:r,rightText:l,state:a,children:(0,i.jsxs)(Th,{css:{flex:"1",minHeight:"100px",py:"$3","& .replicated-text":{whiteSpace:"pre-wrap",visibility:"hidden"},"& textarea":{outline:"none",overflow:"hidden",resize:"none"},"& .replicated-text, & textarea":{background:"transparent",border:"none",gridArea:"1 / 1 / 2 / 2",width:"100%"},"& textarea::placeholder":{color:"$gray500",opacity:1},"& input::-ms-input-placeholder":{color:"$gray500",opacity:1}},children:[(0,i.jsx)("textarea",{"aria-describedby":n?g:void 0,"aria-errormessage":"error"===a?h:void 0,"aria-invalid":"error"===a,disabled:"disabled"===a,id:m,value:c,onChange:e=>{d(e.target.value)},...u}),(0,i.jsxs)($i,{className:"replicated-text",children:[c," "]})]})}),(0,i.jsx)(gh,{id:h,state:a,children:o})]})},KI=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=dh(s.meta);return(0,i.jsx)(ZI,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:e=>{s.input.onChange(e)},onFocus:s.input.onFocus,...a})}});function QI(){const e=Ai();return t=>(0,mo.A)(t.map(t=>({value:t,translation:e(t)})),({translation:e})=>m(e)).map(({value:e,translation:t},n)=>(0,i.jsx)("option",{value:e,children:t},n))}function XI(e,t){const n=bi(Xr),a=QI();return(0,l.useMemo)(()=>e?e.fieldType===ze.Country?n.getCountriesIdName(t).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)):e.fieldType===ze.Language?e.fieldProperty===ke.Language?a(el):a(qn):e.fieldType===ze.Nationality?n.getNationalitiesIdName(t).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)):e.fieldType===ze.Sex?a(li):e.values.map(({id:t,value:n,color:a})=>(0,i.jsx)("option",{"data-badge":e.listType===Ke.Badge,"data-color":e.listType===Ke.Default?void 0:a,value:t,children:n},t)):(0,i.jsx)(i.Fragment,{}),[e,t])}function JI(e,t){const n=t=>e.address_components?.find(({types:e})=>e.includes(t)),i=n("country")?.short_name;return{street:e.name,postalCode:n("postal_code")?.long_name,city:n("locality")?.long_name,countryCode:t.countryCodeExists(i)?i:void 0}}const e_=e=>{const{translate:t}=zg(),n=bi(Xr),a=bi(Cl),s=XI(e.field,e.countryCode),o=e.isMandatory?e.field.name:(0,i.jsx)(Pf,{children:e.field.name}),r=`${e.prefix}${e.field.slug}`,d=e.field.description,c=(0,l.useMemo)(()=>r.startsWith("formRegister.userInfo.fields."),[r]),u=function({change:e,field:t,prefix:n}){const i=bi(Xr),a=(0,qg.mN)();return(0,l.useMemo)(()=>{const s=function(e){return e.fieldProperty===ke.Street?{isCity:!1,postalCode:"postalCode",city:"city",country:"country",latitude:"latitude",longitude:"longitude"}:e.fieldProperty===ke.BirthCity?{isCity:!0,postalCode:"birthPostalCode",city:null,country:"birthCountry",latitude:null,longitude:null}:e.addressPostalCodeCustomField||e.addressCityCustomField||e.addressCountryCustomField?{isCity:!1,postalCode:e.addressPostalCodeCustomField?.slug??null,city:e.addressCityCustomField?.slug??null,country:e.addressCountryCustomField?.slug??null,latitude:null,longitude:null}:null}(t);if(s){const t=(t,i,s=!1)=>{if(t&&void 0!==i){const o=`${n}${t}`;(s||a.getFieldState(o))&&e(o,i)}};return{getAddress(e){const t=JI(e,i);return(s.isCity?t.city:t.street)??e.formatted_address??""},onPlaceChange(e){const n=JI(e,i);t(s.postalCode,n.postalCode),t(s.city,n.city),t(s.country,n.countryCode),t(s.latitude,e.geometry?.location?.lat(),!0),t(s.longitude,e.geometry?.location?.lng(),!0)}}}return{}},[e,i,t,a,n])}(e);if((0,l.useEffect)(()=>{e.display||e.change(r,a.fieldUpdateInputDefault(e.field,n.getDefaultCountryValues()))},[e.display,e.field,e.change]),!e.display)return null;switch(e.field.fieldType){case ze.Text:return(0,i.jsx)(_h,{description:d,disabled:e.disabled,label:o,name:r});case ze.Textarea:return(0,i.jsx)(KI,{description:d,disabled:e.disabled,label:o,name:r});case ze.Checkbox:return(0,i.jsx)(Vf,{disabled:e.disabled,name:r,subtext:d,children:o});case ze.Validation:return(0,i.jsx)(Vf,{disabled:e.disabled,name:r,subtext:(0,i.jsxs)(i.Fragment,{children:[h(d)&&(0,i.jsx)("span",{children:d}),h(d)&&e.field.document&&(0,i.jsx)("br",{}),e.field.document&&(0,i.jsx)($h,{css:{color:"$primary500"},download:e.field.document.name,to:e.field.document.url,onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()},children:t("consulter_le_do_69928")})]}),children:o});case ze.Select:return e.field.canSelectMultiple?(0,i.jsx)(GI,{description:d,disabled:e.disabled,isSearchVisible:!0,isSelectAllVisible:!0,label:o,multiple:!0,name:r,children:s}):(0,i.jsx)(GI,{description:d,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case ze.Date:return"dateOfBirth"===e.field.slug?(0,i.jsx)(Wf,{autoComplete:c?"bday":void 0,description:d,disabled:e.disabled,label:o,max:pl,min:hl,name:r}):(0,i.jsx)(Wf,{description:d,disabled:e.disabled,label:o,name:r});case ze.Datetime:return(0,i.jsx)(Yf,{description:d,disabled:e.disabled,label:o,name:r});case ze.Time:return(0,i.jsx)(Zf,{description:d,disabled:e.disabled,label:o,name:r});case ze.Phone:return(0,i.jsx)(OI,{description:d,disabled:e.disabled,label:o,prefix:`${r}.`});case ze.Number:return(0,i.jsx)(_h,{description:d,disabled:e.disabled,label:o,name:r,shouldParseAsInt:!0});case ze.Sex:return(0,i.jsxs)(HI,{autoComplete:c?"sex":void 0,description:d,disabled:e.disabled,label:o,name:r,children:[(0,i.jsx)("option",{disabled:!0,value:"",children:t("choisir_une_val_00277")}),s]});case ze.Language:return(0,i.jsx)(GI,{autoComplete:c?"language":void 0,description:d,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case ze.Nationality:return(0,i.jsx)(GI,{description:d,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case ze.Address:return(0,i.jsx)(Nf,{addressName:r,autoComplete:c?"street-address":void 0,description:d,disabled:e.disabled,label:o,...u});case ze.Country:return(0,i.jsx)(GI,{autoComplete:c?"country":void 0,description:d,disabled:e.disabled,isSearchVisible:!0,label:o,name:r,placeholder:t("choisir_une_val_00277"),children:s});case ze.File:return e.field.fileType===Fe.Picture?(0,i.jsx)(EI,{allowCrop:!0,disabled:e.disabled,hint:d,label:o,organizationId:e.organizationId,prefix:`${r}.`}):(0,i.jsx)(vI,{accept:[Kf.Images,Kf.Pdf,Kf.Videos],acl:e.fileAcl??"private",description:d,disabled:e.disabled,label:o,organizationId:e.organizationId,prefix:`${r}.`});default:return tr(e.field.fieldType)}};var t_=n(9120);const n_=e=>(0,mo.A)(e,e=>e.toMillis()),i_=j("div",{alignItems:"center",borderRadius:"$2",color:"$gray400",display:"flex",fontWeight:"$medium",height:"32px",justifyContent:"center",userSelect:"none",width:"32px",variants:{isSelectable:{true:{color:"$gray800",cursor:"pointer","&:hover":{background:"$primary500",color:"white"}}},isSelected:{true:{background:"$primary500",color:"white",cursor:"pointer"}}},compoundVariants:[{isSelectable:!0,isSelected:!0,css:{background:"$primary500",color:"white",cursor:"pointer"}}]}),a_=({datesToTitle:e,disabledDates:t,firstDayOfMonth:n,max:a,min:s,onChange:o,startHour:r,values:d})=>{const c=Ai(),u=bi(gl),m=(0,l.useMemo)(()=>n.minus({day:n.weekday-1}),[n]),g=(0,l.useMemo)(()=>n.endOf("month"),[n]),h=(0,l.useMemo)(()=>{const e=g.plus({day:7-g.weekday});return Math.ceil(e.diff(m,"days").days)},[g]),p=(0,l.useMemo)(()=>(0,Fd.A)(0,h).map(e=>{const i=m.plus({day:e}).set({hour:r||0}),o=i.toMillis(),l=d.some(e=>e.toMillis()===o),c=!!F(t)&&t.some(e=>e.toMillis()===o);return{day:i,isSelected:l,isDisabled:c,isSelectable:!c&&i.month===n.month&&i>=s&&i<=a}}),[m,h,d,t,r]),f=(0,l.useMemo)(()=>!p.some(({isSelectable:e,isSelected:t})=>e&&!t),[p]),I=(0,l.useCallback)(()=>{o(f?[]:p.flatMap(({day:e,isSelectable:t,isSelected:n})=>t||n?[e]:[]))},[p,f,o]);return(0,i.jsxs)($,{css:{background:"white",bd:!0,padding:"$5 $4"},direction:"column",children:[(0,i.jsx)($i,{css:{textTransform:"capitalize"},font:"gray800 textXl semiBold",textAlign:"center",width:1,children:u.toLocaleString(n,{month:"long",year:"numeric"})}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(Th,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:(0,Fd.A)(0,7).map(e=>{const t=m.plus({day:e});return(0,i.jsx)($i,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",width:32,children:u.toLocaleString(t,{weekday:"short"})},e)})}),(0,i.jsx)(Hg,{height:"5"}),(0,i.jsx)(Th,{gap:"2",gridtemplatecolumns:"repeat(7, 32px)",gridtemplaterows:"auto",children:p.map(({day:t,isSelected:n,isSelectable:a},s)=>(0,i.jsx)(i_,{isSelectable:a,isSelected:n,title:e?.[t.toMillis()],onClick:e=>{if(a&&n)o(n_((0,t_.A)(d,[t],e=>e.toMillis())));else if(a&&!n){const n=d.findLast(e=>en.plus({day:e+1}));o(n_([...d,...i]))}else o(n_([...d,t]))}},children:t.day},s))}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(ga,{color:"white",textAlign:"center",onClick:I,children:c(f?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})]})},s_=e=>{const{translate:t}=zg(),{minDate:n,maxDate:a,numberOfMonths:s,totalDaysDiff:o}=(0,l.useMemo)(()=>function(e){const t=e.filter(e=>e.date?.isValid),n=(0,Qc.A)(t.map(e=>e.date),e=>e.toMillis()),i=(0,Xc.A)(t.map(e=>e.date),e=>e.toMillis()),a=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months),s=Math.ceil(i.diff(n,"days").days);return{minDate:n,maxDate:i,numberOfMonths:a,totalDaysDiff:s}}(e.slots),[e.slots]),r=(0,l.useMemo)(()=>e.slots.flatMap(t=>t.date?.isValid&&e.accreditationsSlotsIds.includes(t.id)?[t.date]:[]),[e.slots,e.accreditationsSlotsIds]),d=(0,l.useMemo)(()=>(0,Fd.A)(0,o).flatMap(t=>{const i=n.plus({day:t});return e.slots.some(e=>e.date?.isValid&&e.date.toMillis()===i.toMillis())?[]:[i]}),[n,o,e.slots]),c=(0,l.useMemo)(()=>Object.fromEntries(e.slots.flatMap(n=>{const i=e.slotIdToDas?.[n.id];return n.date?.isValid&&"number"==typeof i?.maxResources?[[n.date.toMillis(),vf(t,i.assignedResources,i.maxResources)]]:[]})),[e.slotIdToDas,e.slots,t]);return(0,i.jsx)($,{gap:"4",wrap:"wrap",children:(0,Fd.A)(0,s).map(t=>{const o=n.plus({month:t}).startOf("month"),l=0===t?n:o,u=t===s-1?a:o.endOf("month"),m=r.filter(e=>e.startOf("month").equals(o));return(0,i.jsx)(a_,{datesToTitle:c,disabledDates:d,firstDayOfMonth:o,max:u,min:l,values:m,onChange:t=>{e.onChange(function(e,t,n,i){const a=(0,Jc.A)(e,t.flatMap(e=>e.date?.isValid&&n.equals(e.date.startOf("month"))?[e.id]:[]));return t.flatMap(e=>i.some(t=>e.date?.isValid&&t.startOf("day").equals(e.date.startOf("day")))?[e.id]:[]).concat(a)}(e.accreditationsSlotsIds,e.slots,o,t))}},t)})})},o_=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>e.slots.filter(e=>e.date?.isValid),[e.slots]);return F(n)?(0,i.jsx)(s_,{...e,slots:n}):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})},r_=e=>{const{translate:t}=zg(),n=bi(gl);return(0,i.jsx)(i.Fragment,{children:F(e.slots)?e.slots.map(t=>(0,i.jsx)(Bf,{disabled:e.getDisabled(t.id),state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{e.onChange(B(e.accreditationsSlotsIds,t.id,"checked"===n))},children:(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{css:{textTransform:"capitalize"},children:du(n,t,e.accreditation.name,{date:{localeFormat:Ya.DateOnly.WeekdayLongMonthLong}})}),(0,i.jsx)(bf,{getAssignedMaxRemaining:e.getAssignedMaxRemaining,slotId:t.id})]})},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},l_=e=>{const{translate:t}=zg(),n=bi(gl),a=(0,l.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]);return(0,i.jsx)(i.Fragment,{children:F(e.slots)?e.slots.map(t=>(0,i.jsx)(hf,{disabled:e.getDisabled(t.id),state:e.accreditationsSlotsIds.includes(t.id)?"checked":"unchecked",onClick:n=>{const i=[...e.accreditationsSlotsIds.filter(e=>!a.includes(e)),..."checked"===n?[t.id]:[]];e.onChange(i)},children:(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{css:{textTransform:"capitalize"},children:du(n,t,e.accreditation.name,{date:{localeFormat:Ya.DateOnly.WeekdayLongMonthLong}})}),(0,i.jsx)(bf,{getAssignedMaxRemaining:e.getAssignedMaxRemaining,slotId:t.id})]})},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},d_=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>e.slots.map(e=>e.id),[e.slots]),a=(0,l.useMemo)(()=>e.accreditation.accreditationDisplay===W.List&&e.slots.every(t=>e.accreditationsSlotsIds.includes(t.id)),[e.accreditation,e.accreditationsSlotsIds,e.slots]),s=(0,l.useCallback)(()=>{a?e.onChange((0,Jc.A)(e.accreditationsSlotsIds,n)):e.onChange((0,$a.A)(e.accreditationsSlotsIds.concat(n)))},[a,e.accreditationsSlotsIds,e.onChange,n]);return e.accreditation.accreditationDisplay===W.List?(0,i.jsx)($,{css:{borderTop:"1px solid $gray200",padding:"$4"},children:(0,i.jsx)($i,{css:{cursor:"pointer"},font:"primary500 textSm medium",onClick:s,children:t(a?"tout_d_s_lectio_37372":"tout_s_lectionn_48027")})}):null},c_=e=>{const{params:{organizationId:t},translate:n}=zg(),[a,s]=(0,l.useState)(!1),o=(0,l.useMemo)(()=>h(e.accreditation.description)&&e.options.showAccreditationDescription,[e.accreditation,e.options]),r=(0,l.useMemo)(()=>{const t=e.accreditation.hasSlots?e.slots.map(e=>e.id):[e.accreditation.hiddenSlotId];return e.displayFormCustomFields&&F(e.accreditation.formCustomFields)&&F((0,ml.A)(t,e.accreditationsSlotsIds))},[e.accreditation,e.accreditationsSlotsIds,e.displayFormCustomFields,e.slots]),d=(0,l.useMemo)(()=>Object.fromEntries(e.delegationAccreditationsSlots.map(e=>[e.accreditationSlotId,e])),[e.delegationAccreditationsSlots]),c=(0,l.useCallback)(e=>{const t=d[e];return"number"==typeof t?.maxResources?{assignedResources:t.assignedResources,maxResources:t.maxResources,remaining:t.maxResources-t.assignedResources}:null},[d]),u=(0,l.useCallback)(t=>{const n=d[t];return!!n&&n.isFull&&n.willAutoAccredit&&!e.alreadyAssignedSlotsIds.includes(t)},[e.alreadyAssignedSlotsIds,d]),m=(0,l.useMemo)(()=>e.accreditation.hasSlots?null:(0,i.jsx)(bf,{getAssignedMaxRemaining:c,slotId:e.accreditation.hiddenSlotId}),[c,e.accreditation]),g=(0,l.useCallback)(t=>{e.change(`${e.prefix}accreditationsSlotsIds`,t)},[e.prefix,e.change]),p=e.accreditationsSlotsIds.includes(e.accreditation.hiddenSlotId)?"checked":"unchecked";return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(uf,{accreditation:e.accreditation,badge:m,displayFormCustomFields:r,displayNumberOfSlots:!1,displaySlots:e.accreditation.hasSlots,numberOfSlots:0,renderActions:()=>o&&(0,i.jsx)(ga,{color:"white",onClick:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation(),s(!0)},children:n("voir_la_descrip_62304")}),renderCheckbox:()=>!e.accreditation.hasSlots&&(0,i.jsx)(Uf,{disabled:u(e.accreditation.hiddenSlotId),shouldPreventDefault:!1,state:p,onClick:yh.A}),onClick:()=>{e.accreditation.hasSlots||u(e.accreditation.hiddenSlotId)||e.change(`${e.prefix}accreditationsSlotsIds`,B(e.accreditationsSlotsIds,e.accreditation.hiddenSlotId,"unchecked"===p))},children:(0,i.jsxs)($,{css:{background:"white",padding:"$4"},direction:"column",gap:"3",children:[e.accreditation.hasSlots?e.accreditation.accreditationDisplay===W.Calendar?(0,i.jsx)(o_,{accreditationsSlotsIds:e.accreditationsSlotsIds,slotIdToDas:d,slots:e.slots,onChange:g}):(0,i.jsxs)($,{css:{background:"white",bd:!0},direction:"column",width:1,children:[(0,i.jsx)($,{css:{padding:"$4"},direction:"column",gap:"3",children:e.accreditation.accreditationDisplay===W.Radio?(0,i.jsx)(l_,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,getAssignedMaxRemaining:c,getDisabled:u,slots:e.slots,onChange:g}):(0,i.jsx)(r_,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,getAssignedMaxRemaining:c,getDisabled:u,slots:e.slots,onChange:g})}),(0,i.jsx)(d_,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,slots:e.slots,onChange:g})]}):null,r&&(0,i.jsx)($,{css:{background:"white",bd:!0,padding:"$4"},direction:"column",gap:"3",width:1,children:e.accreditation.formCustomFields.map(({customField:n,isMandatory:a})=>(0,i.jsx)(e_,{change:e.change,display:!0,field:n,isMandatory:a,organizationId:t,prefix:`${e.prefix}userInfo.fields.`},n.id))})]})}),a&&(0,i.jsx)(yf,{description:e.accreditation.description,name:e.accreditation.name,onClose:()=>s(!1)})]})},u_=e=>{const{translate:t}=zg();return(0,i.jsx)(wf,{category:e.category.name,children:F(e.accreditations)?e.accreditations.map(t=>(0,i.jsx)(c_,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,slots:e.accreditationIdToSelectableSlots[t.id]},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},m_=e=>{const{translate:t}=zg();return(0,i.jsx)(Ef,{css:{background:"transparent",padding:"0"},children:F(e.categories)?(0,i.jsxs)(i.Fragment,{children:[e.categories.map(t=>(0,i.jsx)(u_,{accreditationIdToSelectableSlots:e.accreditationIdToSelectableSlots,accreditations:e.categoryIdToSelectableAccreditations[t.id],accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,category:t,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix},t.id)),e.showAutoAccredit&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray900 textSm medium",children:t("attribution_des_59896")}),(0,i.jsx)(Of,{name:`${e.prefix}autoAccredit`,children:t("attribuer_les_a_75431")})]})]}):F(e.delegationAccreditationsProfiles)?null:(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},g_=(0,l.memo)(e=>{const{accreditationIdToSelectableSlots:t,categoryIdToSelectableAccreditations:n,selectableCategories:a,selectableProfiles:s}=(0,l.useMemo)(()=>{const t=Gd(e.slots.map(Ga)),n=e.event.accreditationsProfilesCategories.flatMap(t=>t.accreditationsProfiles.filter(t=>function(e,t,n){return t.some(t=>t.accreditationProfileId===e.id&&(n===t.accreditationProfileId||!t.isFull))}(t,e.delegationAccreditationsProfiles,e.alreadyAssignedProfileId))),i=e.event.accreditationsCategories.flatMap(n=>n.accreditations.flatMap(n=>n.slots.filter(n=>function(e,t,n,i,a,s){const o=n.slotDisplay===At.Hide||n.accreditationFilter===bt.None||!e.date||t.some(t=>qa(t,e.date)),r=n.showFullAccreditation||s.includes(e.id),l=n.accreditationDisplay!==St.None&&!n.hiddenAccreditationsSlotsIds.includes(e.id)&&(0===n.displayedAccreditationsSlotsIds.length||n.displayedAccreditationsSlotsIds.includes(e.id))&&(r||!e.isFull),d=i.some(t=>t.accreditationSlotId===e.id&&(r||!t.isFull&&!e.isFull));return!a.includes(e.id)&&!e.isBlocked&&o&&(l||d)}(n,t,e.options,e.delegationAccreditationsSlots,e.scannedSlotsIds,e.alreadyAssignedSlotsIds)))),a=i.map(e=>e.id),s=(0,ef.A)((0,Zd.A)(i,e=>e.accreditationId),e=>(0,mo.A)(e,e=>(0,go.A)([e.date?.toMillis(),m(e.name)]))),o=e.event.accreditationsCategories.flatMap(t=>t.accreditations.filter(t=>function(e,t,n,i,a){return i.accreditationDisplay!==St.None&&!i.hiddenAccreditationsIds.includes(e.id)&&(0===i.displayedAccreditationsIds.length||i.displayedAccreditationsIds.includes(e.id))&&au(e,n)&&e.slots.some(e=>t.includes(e.id))||a.some(i=>i.accreditationId===e.id&&au(e,n)&&e.slots.some(e=>t.includes(e.id)))}(t,a,e.userInfosFields,e.options,e.delegationAccreditationsSlots))),r=o.map(e=>e.id),l=(0,ef.A)((0,Zd.A)(o,e=>e.accreditationCategoryId),e=>Xp(e)),d=(0,mo.A)(e.event.accreditationsCategories.filter(t=>function(e,t,n,i){return n.accreditationDisplay!==St.None&&!n.hiddenAccreditationsCategoriesIds.includes(e.id)&&(0===n.displayedAccreditationsCategoriesIds.length||n.displayedAccreditationsCategoriesIds.includes(e.id))&&e.accreditations.some(e=>t.includes(e.id))||i.some(n=>n.accreditationCategoryId===e.id&&e.accreditations.some(e=>t.includes(e.id)))}(t,r,e.options,e.delegationAccreditationsSlots)),e=>m(e.name));return{selectableCategories:d,selectableProfiles:n,categoryIdToSelectableAccreditations:l,accreditationIdToSelectableSlots:s}},[e.alreadyAssignedProfileId,e.alreadyAssignedSlotsIds,e.delegationAccreditationsProfiles,e.delegationAccreditationsSlots,e.event.accreditationsCategories,e.event.accreditationsProfilesCategories,e.options,e.scannedSlotsIds,e.slots,e.userInfosFields]);return(0,l.useEffect)(()=>{const t=e.event.accreditationsCategories.flatMap(t=>t.accreditations.filter(t=>!au(t,e.userInfosFields)).flatMap(e=>e.slots.map(e=>e.id))),n=e.accreditationsSlotsIds.filter(n=>!t.includes(n)||e.alreadyAssignedSlotsIds.includes(n));n.length!==e.accreditationsSlotsIds.length&&e.change(`${e.prefix}accreditationsSlotsIds`,n)},[e.accreditationsSlotsIds,e.alreadyAssignedSlotsIds,e.event.accreditationsCategories,e.userInfosFields]),F(s)||F(e.delegationAccreditationsSlots)||e.options.accreditationDisplay===St.Accreditation?(0,i.jsxs)($,{direction:"column",gap:"9",children:[F(e.delegationAccreditationsProfiles)&&(0,i.jsx)(Cf,{accreditationProfileId:e.accreditationProfileId,accreditationsProfiles:s,alreadyAssignedProfileId:e.alreadyAssignedProfileId,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,options:e.options,prefix:e.prefix}),(0,i.jsx)(m_,{accreditationIdToSelectableSlots:t,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,categories:a,categoryIdToSelectableAccreditations:n,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,displayFormCustomFields:e.displayFormCustomFields,options:e.options,prefix:e.prefix,showAutoAccredit:e.showAutoAccredit})]}):null}),h_=e=>{const t=Ai(),{data:n,loader:a}=Ei("query FormAccreditations($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n accreditationsCategories {\n ...FormRegisterAccreditationCategory\n }\n\n accreditationsProfilesCategories {\n ...FormRegisterAccreditationProfileCategory\n }\n }\n}\n",{eventId:e.eventId},[ka.FormRegisterAccreditationCategoryFragment,ka.FormRegisterAccreditationProfileCategoryFragment]);return a||(0,i.jsxs)(i.Fragment,{children:[h(e.form.accreditationSubtitle)?(0,i.jsx)(vp,{text:e.renderText(e.form.accreditationSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_91873")}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray500",children:t("s_lectionnez_le_63924")})]}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(ah,{}),(0,i.jsx)(g_,{accreditationProfileId:null,accreditationsSlotsIds:e.accreditationsSlotsIds,alreadyAssignedProfileId:null,alreadyAssignedSlotsIds:z,change:e.change,delegationAccreditationsProfiles:z,delegationAccreditationsSlots:z,displayFormCustomFields:!0,event:n.event,options:e.form,prefix:"formRegister.",scannedSlotsIds:z,showAutoAccredit:!1,slots:e.slots,userInfosFields:e.userInfoFields}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:e.handleSubmit,children:e.registerButtonText})})]})},p_=l.forwardRef((e,t)=>(0,i.jsxs)($,{ref:t,css:{background:"white",bd:"white 1 sm",width:"100%","@tablet":{width:"$containerTablet"},"@desktop":{width:"$container"}},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{borderBottom:e.isOpen?"1px solid $gray200":"",cursor:e.canSelect?"pointer":"default",padding:"$4","@tablet":{padding:"$4 $6"}},gap:"4",onClick:()=>{e.canSelect&&e.onSelect()},children:[(0,i.jsx)($,{align:"center",css:{background:e.isCompleted?"$success100":"white",border:e.isCompleted?"none":"1px solid $gray200",borderRadius:"32px",color:e.isCompleted?"$success700":"$gray800",fontSize:"$textMd",fontWeight:"$semiBold"},height:32,justify:"center",width:32,children:e.isCompleted?(0,i.jsx)(ra,{icon:"check"}):e.number}),(0,i.jsx)($i,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.title})]}),e.isOpen&&(0,i.jsx)($,{css:{padding:"$6 $4","@tablet":{padding:"$6"},"@desktop":{padding:"$6 70px"}},direction:"column",children:e.children})]}));p_.displayName="FormBox";const f_=[79151,64083,79017,64084,79152,71228];["INTER. COMMISSAIRE TECHNIQUE COURSE D'ACCELERATION DRAGSTER","INTERNATIONALE CHRONOMETREUR A AUTO","INTERNATIONALE CHRONOMETREUR B AUTO","INTERNATIONALE CHRONOMETREUR C CIRCUIT AUTO","INTERNATIONALE CHRONOMETREUR C ROUTE AUTO","INTERNATIONALE CHRONOMETREUR KARTING","INTERNATIONALE COMMISSAIRE A CHEF DE POSTE CIRCUIT","INTERNATIONALE COMMISSAIRE A CHEF DE POSTE ROUTE AUTO","INTERNATIONALE COMMISSAIRE B","INTERNATIONALE COMMISSAIRE SPORTIF AUTO","INTERNATIONALE COMMISSAIRE SPORTIF KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE A AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE A KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE B AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE B KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE C AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE C KARTING","INTERNATIONALE COMMISSAIRE TECHNIQUE D'ACCELERATION DRAGSTER","INTERNATIONALE COMMISSAIRE TECHNIQUE STAGIAIRE AUTO","INTERNATIONALE COMMISSAIRE TECHNIQUE STAGIAIRE KARTING","INTERNATIONALE DIRECTEUR DE COURSE CIRCUIT ASPHALTE","INTERNATIONALE DIRECTEUR DE COURSE CIRCUIT TERRE","INTERNATIONALE DIRECTEUR DE COURSE DRAGSTER","INTERNATIONALE DIRECTEUR DE COURSE KARTING","INTERNATIONALE DIRECTEUR DE COURSE ROUTE AUTO","INTERNATIONALE DIRECTEUR DE COURSE TRIAL 4X4","INTERNATIONALE DIRIGEANT","INTERNATIONALE MEDICALE","INTERNATIONALE PERSONNE SATELLITE","INTERNATIONALE RESPONSABLE DE ZONE TRIAL 4X4","INTERNATIONALE VOLONTAIRE","NATIONALE CHRONOMETREUR STAGIAIRE","NATIONALE COMMISSAIRE C","NATIONALE COMMISSAIRE SPORTIF KARTING GRADE C","NATIONALE COMMISSAIRE SPORTIF KARTING","NATIONALE DIRECTEUR DE COURSE DRIFT","NATIONALE DIRECTEUR DE COURSE KARTING GRADE C","NATIONALE DIRECTEUR DE COURSE KARTING","NATIONALE DIRECTEUR DE COURSE TRIAL 4X4","NATIONALE JUGE DRIFT","NATIONALE MEDIA","NATIONALE MEDICALE","NATIONALE STAGIAIRE OPTION COMMISSAIRE SPORTIF","NATIONALE STAGIAIRE OPTION DIRECTEUR DE COURSE","NATIONALE STAGIAIRE OPTION JUGE DRIFT"].map(e=>function(e){return m(e).replace(/[\u2018\u2019]/g,"'")}(e));const I_=e=>{const t=(0,l.useMemo)(()=>e.elements.flatMap(e=>e.elementType===Be.Field?(0,go.A)([e.customField,e.conditionCustomField]):e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]).map(t=>uu(e.organizationId)&&("production"===s.Development?[14]:[66919,68131,68598,70260,74864,74866,74868]).includes(t.id)&&F(e.asoBannersColors)?{...t,values:t.values.filter(({id:t})=>e.asoBannersColors?.includes(t))}:t),[e.elements]),n=(0,l.useMemo)(()=>Object.fromEntries(t.map(e=>[e.id,e])),[t]);return(0,i.jsx)($i,{children:e.elements.map((a,s)=>{switch(a.elementType){case Be.Field:{const o=n[a.customField.id],r=vl(o,e.values,t);return(0,i.jsxs)(l.Fragment,{children:[r&&0!==s&&(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(e_,{change:e.change,countryCode:e.countryCode,disabled:f_.includes(o.id),display:r,field:o,isMandatory:!0===a.isMandatory,organizationId:e.organizationId,prefix:e.prefix},s)]},s)}case Be.Section:return vl(a,e.values,t)?(0,i.jsx)(l.Fragment,{children:"function"==typeof e.renderSection?e.renderSection(a.section,s):(0,i.jsxs)(i.Fragment,{children:[e.featureFlags?.isV4?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"5"}),(0,i.jsx)(MI,{direction:"horizontal"}),(0,i.jsx)(Hg,{height:"5"})]}):0!==s&&(0,i.jsx)(Hg,{height:"8"}),(0,i.jsx)($i,{font:"grayCustom900 textMd semiBold",children:"function"==typeof e.renderText?e.renderText(a.section):a.section})]})},s):null;case Be.Text:return vl(a,e.values,t)?(0,i.jsx)(l.Fragment,{children:(0,i.jsxs)(i.Fragment,{children:[0!==s&&(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(vp,{text:"function"==typeof e.renderText?e.renderText(a.text):a.text})]})},s):null;default:return tr(a.elementType)}})})},__=e=>{const{translate:t,params:{organizationId:n}}=zg();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ah,{}),(0,i.jsx)(I_,{change:e.change,countryCode:e.countryCode,elements:e.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",renderText:t=>e.renderText(t,e.values),values:e.values}),(0,i.jsx)(Hg,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})},x_=e=>{const[t,n]=(0,l.useState)(!1),a=h(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bf,{css:{alignItems:"center"},state:e.positionsCategoriesIds.includes(e.category.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsCategoriesIds`,B(e.positionsCategoriesIds,e.category.id,"checked"===t))},children:(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{children:e.category.name}),a&&(0,i.jsx)($i,{onClick:e=>{Ia(e),n(!0)},children:(0,i.jsx)(ra,{icon:"circle-info"})})]})}),t&&(0,i.jsx)(yf,{description:e.category.description,name:e.category.name,onClose:()=>{n(!1)}})]})},y_=e=>{const{translate:t}=zg();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(x_,{category:t,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},S_=e=>{const[t,n]=(0,l.useState)(!1),a=h(e.position.description)&&e.options.showPositionDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bf,{css:{alignItems:"center"},state:e.positionsIds.includes(e.position.id)?"checked":"unchecked",onClick:t=>{e.change(`${e.prefix}positionsIds`,B(e.positionsIds,e.position.id,"checked"===t))},children:(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{children:e.position.name}),a&&(0,i.jsx)($i,{onClick:e=>{Ia(e),n(!0)},children:(0,i.jsx)(ra,{icon:"circle-info"})})]})}),t&&(0,i.jsx)(yf,{description:e.position.description,name:e.position.name,onClose:()=>{n(!1)}})]})},j_=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)(!1),s=h(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{color:"gray900",fontWeight:"semiBold",children:e.category.name}),s&&(0,i.jsx)($i,{color:"gray700",onClick:()=>{a(!0)},children:(0,i.jsx)(ra,{icon:"circle-info"})})]}),(0,i.jsx)(Hg,{height:"2"}),F(e.positions)?e.positions.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(S_,{change:e.change,options:e.options,position:t,positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(yf,{description:e.category.description,name:e.category.name,onClose:()=>{a(!1)}})]})},v_=e=>{const{translate:t}=zg();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(j_,{category:t,change:e.change,options:e.options,positions:e.categoryIdToSelectablePositions[t.id],positionsIds:e.positionsIds,prefix:e.prefix})]},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},b_=e=>{const t=Ai(),n=vh(),a=(0,l.useMemo)(()=>e.categories.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id)),[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[F(a)?n?(0,i.jsxs)(VI,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsCategoriesIds?.[e.index]??-1],onChange:t=>{F(t)&&e.change(`${e.prefix}positionsCategoriesIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsxs)(YI,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsCategoriesIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsCategoriesIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(Hg,{height:"4"})]})},A_=e=>{const{translate:t}=zg(),n=vh(),a=(0,l.useMemo)(()=>e.categories.map(t=>{const n=e.categoryIdToSelectablePositions[t.id];return(0,i.jsx)("optgroup",{label:t.name,children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},t.id)}),[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[F(a)?n?(0,i.jsxs)(VI,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsIds?.[e.index]??-1],onChange:t=>{F(t)&&e.change(`${e.prefix}positionsIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsxs)(YI,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),a]}):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(Hg,{height:"4"})]})};function C_(e,t,n={}){return(0,mo.A)(t,e=>m(e.name)).flatMap(t=>(0,mo.A)(t.positions,e=>m(e.name)).map(a=>{const s=n.usePositionDisplay&&a.positionDisplay===st.Radio?`position-${a.id}`:void 0;return(0,i.jsx)("optgroup",{label:`${t.name} - ${nu(a)}`,children:(0,mo.A)(a.slots,e=>[e.range.start.toMillis(),e.name]).map(t=>{const n=tu(e,t,nu(a),{position:{includeNameAtEnd:!0},slot:{includeRange:!0}});return(0,i.jsx)("option",{"data-radio":s,value:t.id,children:n},t.id)})},a.id)}))}const E_=e=>{const{translate:t}=zg(),n=bi(Wd),a=vh(),s=(0,l.useMemo)(()=>{const t=e.categories.map(t=>{const n=e.categoryIdToSelectablePositions[t.id];return{...t,positions:n.map(t=>{const n=e.positionIdToSelectableSlots[t.id];return{...t,slots:n}})}});return C_(n,t)},[e.categories]);return(0,i.jsxs)(i.Fragment,{children:[F(s)?a?(0,i.jsxs)(VI,{isSearchVisible:!0,label:t("souhait_n_1_47211",e.index+1),values:[e.positionsSlotsIds?.[e.index]??-1],onChange:t=>{F(t)&&e.change(`${e.prefix}positionsSlotsIds[${e.index}]`,t[0])},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),s]}):(0,i.jsxs)(YI,{label:t("souhait_n_1_47211",e.index+1),shouldParseAsInt:!0,value:e.positionsSlotsIds?.[e.index]??-1,onChange:t=>{e.change(`${e.prefix}positionsSlotsIds[${e.index}]`,t)},children:[(0,i.jsx)("option",{value:-1,children:t("choisir_une_mis_90627")}),s]}):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),e.index!==e.options.positionLimit-1&&(0,i.jsx)(Hg,{height:"4"})]})},T_=e=>{const{translate:t}=zg();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?(0,Fd.A)(0,e.options.positionLimit).map(t=>e.options.positionDisplay===vt.Category?(0,i.jsx)(b_,{categories:e.categories,change:e.change,index:t,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix},t):e.options.positionDisplay===vt.Position?(0,i.jsx)(A_,{categories:e.categories,categoryIdToSelectablePositions:e.categoryIdToSelectablePositions,change:e.change,index:t,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix},t):e.options.positionDisplay===vt.Slot?(0,i.jsx)(E_,{categories:e.categories,categoryIdToSelectablePositions:e.categoryIdToSelectablePositions,change:e.change,index:t,options:e.options,positionIdToSelectableSlots:e.positionIdToSelectableSlots,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix},t):null):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},M_=l.createContext({}),R_=e=>{const[t,n]=l.useState(!1),[a,s]=l.useState(null),[o,r]=l.useState(null),d=(0,ch.A)("tooltip-");return(0,i.jsx)(M_.Provider,{value:{isVisible:t,referenceElement:a,popperElement:o,tooltipId:d,setIsVisible:n,setReferenceElement:s,setPopperElement:r},children:e.children})};function D_(){return l.useContext(M_)}const O_=e=>{const{isVisible:t,popperElement:n,referenceElement:a,setPopperElement:s,tooltipId:o}=D_(),{styles:r,attributes:d,update:c}=(0,Lp.E)(a,n,{placement:e.placement,modifiers:[{name:"offset",options:{offset:[0,4]}}]});l.useEffect(()=>{c?.()},[t,a]);const u=(0,i.jsx)($,{ref:s,align:"center",css:{background:"$grayCustom900",borderRadius:"$1",color:location.origin===ia.HEAVENT_PUBLIC_URL.origin?"contrast-color(var(--colors-grayCustom900))":"white",display:t?"flex":"none",px:"$3",py:"6px",zIndex:1e3,...r.popper},id:o,justify:"center",role:"tooltip",...d.popper,children:e.children});return e.renderOnPortal?(0,_a.createPortal)(u,document.body):u},w_=e=>{const{setIsVisible:t,setReferenceElement:n,tooltipId:a}=D_(),s=l.cloneElement(l.Children.only(e.children),{ref(e){n(e)},"aria-labelledby":a,"aria-describedby":a,onMouseEnter(){t(!0)},onMouseLeave(){t(!1)},onFocus(){t(!0)},onBlur(){t(!1)}});return(0,i.jsx)($i,{css:e.css,children:s})},P_=e=>{const{translate:t}=zg(),{rangeString:n,finalName:a,isRenamed:s}=function(e){const t=bi(Wd),n=(0,l.useMemo)(()=>t.toDisplayString(e.range,{formats:{displayWeekday:!0}}),[e]),i=h(e.name);return{isRenamed:i,finalName:i?e.name:n,rangeString:n}}(e.slot),o=e.position.positionDisplay===st.Radio,r=o?hf:Bf,d=(0,l.useMemo)(()=>e.position.slots.map(e=>e.id),[e.position.slots]),c=(0,l.useMemo)(()=>{if(e.options.willAutoAssign){const t=e.allSlots.filter(t=>e.positionsSlotsIds.includes(t.id)&&(!o||!d.includes(t.id)));return function(e,t){return t.some(({id:t,range:n})=>e.id!==t&&n.overlaps(e.range))}(e.slot,t)}return!1},[e.options.willAutoAssign,e.allSlots,e.positionsSlotsIds,o,d]);return(0,i.jsxs)(l.Fragment,{children:[0!==e.index&&(0,i.jsx)(Hg,{height:"3"}),c?(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)($i,{children:(0,i.jsx)(r,{disabled:!0,shouldPreventDefault:!1,state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:s?n:void 0,onClick:yh.A,children:a})})}),(0,i.jsx)(O_,{placement:"top-start",children:t("ce_cr_neau_en_c_55775")})]}):(0,i.jsx)(r,{state:e.positionsSlotsIds.includes(e.slot.id)?"checked":"unchecked",subtext:s?n:void 0,onClick:t=>{const n="checked"===t;o?e.change(`${e.prefix}positionsSlotsIds`,[...e.positionsSlotsIds.filter(e=>!d.includes(e)),...n?[e.slot.id]:[]]):e.change(`${e.prefix}positionsSlotsIds`,B(e.positionsSlotsIds,e.slot.id,n))},children:a})]},e.slot.id)},$_=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)(!1),s=h(e.position.description)&&e.options.showPositionDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{color:"gray900",fontWeight:"semiBold",children:e.position.name}),s&&(0,i.jsx)($i,{color:"gray700",onClick:()=>{a(!0)},children:(0,i.jsx)(ra,{icon:"circle-info"})})]}),(0,i.jsx)(Hg,{height:"2"}),F(e.slots)?e.slots.map((t,n)=>(0,i.jsx)(P_,{allSlots:e.allSlots,change:e.change,index:n,options:e.options,position:e.position,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slot:t},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(yf,{description:e.position.description,name:e.position.name,onClose:()=>{a(!1)}})]})},k_=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)(!1),s=h(e.category.description)&&e.options.showPositionCategoryDescription;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{color:"gray500",css:{textTransform:"uppercase"},fontSize:"textXs",fontWeight:"semiBold",children:e.category.name}),s&&(0,i.jsx)($i,{color:"gray700",onClick:()=>{a(!0)},children:(0,i.jsx)(ra,{icon:"circle-info"})})]}),F(e.positions)?e.positions.map(t=>(0,i.jsx)($_,{allSlots:e.allSlots,change:e.change,options:e.options,position:t,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix,slots:e.positionIdToSelectableSlots[t.id]},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")}),n&&(0,i.jsx)(yf,{description:e.category.description,name:e.category.name,onClose:()=>{a(!1)}})]})},N_=e=>{const{translate:t}=zg();return(0,i.jsx)(i.Fragment,{children:F(e.categories)?e.categories.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)(k_,{allSlots:e.allSlots,category:t,change:e.change,options:e.options,positionIdToSelectableSlots:e.positionIdToSelectableSlots,positions:e.categoryIdToSelectablePositions[t.id],positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix},t.id)]},t.id)):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:t("this_may_be_bec_43194"),title:t("no_items_are_cu_47996")})})},z_=(0,l.memo)(e=>{const{categoryIdToSelectablePositions:t,positionIdToSelectableSlots:n,selectableCategories:a,selectableSlots:s}=(0,l.useMemo)(()=>{const t=Gd(e.slots.map(Ga)),n=e.event.positionsCategories.flatMap(n=>n.positions.flatMap(n=>n.slots.filter(n=>function(e,t,n){return!n.hiddenPositionsSlotsIds.includes(e.id)&&(0===n.displayedPositionsSlotsIds.length||n.displayedPositionsSlotsIds.includes(e.id))&&(n.showFullPosition||!e.isFull)&&(n.slotDisplay===At.Hide||n.positionFilter===bt.None||t.some(t=>t.engulfs(e.range)))}(n,t,e.options)))),i=n.map(e=>e.id),a=(0,ef.A)((0,Zd.A)(n,e=>e.positionId),e=>(0,mo.A)(e,e=>[e.range.start.toMillis(),e.nameOrRange])),s=e.event.positionsCategories.flatMap(t=>t.positions.filter(t=>function(e,t,n,i){return!i.hiddenPositionsIds.includes(e.id)&&(0===i.displayedPositionsIds.length||i.displayedPositionsIds.includes(e.id))&&(0===i.hiddenPositionsTagsIds.length||U((0,ml.A)(i.hiddenPositionsTagsIds,e.tagsIds)))&&(0===i.displayedPositionsTagsIds.length||F((0,ml.A)(i.displayedPositionsTagsIds,e.tagsIds)))&&au(e,n)&&e.slots.some(e=>t.includes(e.id))}(t,i,e.userInfoFields,e.options))),o=s.map(e=>e.id),r=(0,ef.A)((0,Zd.A)(s,e=>e.positionCategoryId),e=>(0,mo.A)(e,e=>m(e.name))),l=(0,mo.A)(e.event.positionsCategories.filter(t=>function(e,t,n){return!n.hiddenPositionsCategoriesIds.includes(e.id)&&(0===n.displayedPositionsCategoriesIds.length||n.displayedPositionsCategoriesIds.includes(e.id))&&e.positions.some(e=>t.includes(e.id))}(t,o,e.options)),e=>m(e.name));return{selectableCategories:l,selectableSlots:n,categoryIdToSelectablePositions:r,positionIdToSelectableSlots:a}},[e.event.positionsCategories,e.options,e.slots,e.userInfoFields]);if((0,l.useEffect)(()=>{const t=e.event.positionsCategories.flatMap(t=>t.positions.filter(t=>!au(t,e.userInfoFields)).map(e=>e.id));if(F(t)){const n=e.event.positionsCategories.flatMap(e=>e.positions.filter(e=>t.includes(e.id)).flatMap(e=>e.slots.map(e=>e.id))),i=e.positionsIds.filter(e=>!t.includes(e)),a=e.positionsSlotsIds.filter(e=>!n.includes(e));i.length!==e.positionsIds.length&&e.change(`${e.prefix}positionsIds`,i),a.length!==e.positionsSlotsIds.length&&e.change(`${e.prefix}positionsSlotsIds`,a)}},[e.event.positionsCategories,e.positionsIds,e.positionsSlotsIds,e.userInfoFields]),e.options.positionRanking===Ve.Ranked)return(0,i.jsx)(T_,{categories:a,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionIdToSelectableSlots:n,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix});switch(e.options.positionDisplay){case vt.Category:return(0,i.jsx)(y_,{categories:a,change:e.change,options:e.options,positionsCategoriesIds:e.positionsCategoriesIds,prefix:e.prefix});case vt.Position:return(0,i.jsx)(v_,{categories:a,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionsIds:e.positionsIds,prefix:e.prefix,slots:e.slots,userInfoFields:e.userInfoFields});case vt.Slot:return(0,i.jsx)(N_,{allSlots:s,categories:a,categoryIdToSelectablePositions:t,change:e.change,options:e.options,positionIdToSelectableSlots:n,positionsSlotsIds:e.positionsSlotsIds,prefix:e.prefix});case vt.None:return null;default:return tr(e.options.positionDisplay)}}),L_=e=>{const t=Ai(),{data:n,loader:a}=Ei("query FormMissions($eventId: EventId!) {\n event: eventPublic(id: $eventId) {\n positionsCategories {\n ...FormRegisterCategory\n }\n }\n}\n",{eventId:e.eventId},[ka.FormRegisterCategoryFragment]);return a||(0,i.jsxs)(i.Fragment,{children:[h(e.form.positionSubtitle)?(0,i.jsx)(vp,{text:e.renderText(e.form.positionSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_83925")}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray500",children:t("s_lectionnez_le_37648")})]}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(ah,{}),(0,i.jsx)(z_,{change:e.change,event:n.event,options:e.form,positionsCategoriesIds:e.positionsCategoriesIds,positionsIds:e.positionsIds,positionsSlotsIds:e.positionsSlotsIds,prefix:"formRegister.",slots:e.slots,userInfoFields:e.userInfoFields}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function F_(e,t,n,i,a){const s=t.diff(e,"days").days;return(0,Kd.A)((0,Fd.A)(0,s+1).map(t=>e.plus({days:t}).set({hour:a})),e=>i===jt.AllDays||n.some(t=>t.contains(e)||t.start.startOf("day").equals(e.startOf("day"))||t.end.startOf("day").equals(e.startOf("day"))))}function U_(e,t,n,i,a){const s=t.diff(e,"days").days;return(0,Fd.A)(0,s+1).flatMap(t=>{const i=e.plus({days:t});return n.map(e=>{const[t,n]=e.startTime.split(":").map(e=>parseInt(e,10)),[a,s]=e.endTime.split(":").map(e=>parseInt(e,10)),o=i.set({hour:t,minute:n});let r=i.set({hour:a,minute:s});return(aa===jt.AllDays||i.some(t=>t.overlaps(e.interval)))}function B_(e,t){return h(e)?`${e} (${t.toFormat("HH:mm")})`:t.toFormat("HH:mm")}function V_(e,t,n){const i=e.filter(e=>!t.equals(Va(e)));return i.length===e.length&&n?[...e,Wa(t)]:i.length===e.length||n?e:i}const G_=e=>{const t=(0,l.useMemo)(()=>id(e.dayStartTime)?.[0]??0,[e.dayStartTime]),[n,a]=(0,l.useMemo)(()=>F_(e.startAt,e.endAt,e.ranges,e.daysDisplay,t),[e.startAt,e.endAt,e.ranges,e.daysDisplay,t]),s=(0,l.useMemo)(()=>(0,Qc.A)(n,e=>e.toMillis()),[n]),o=(0,l.useMemo)(()=>(0,Xc.A)(n,e=>e.toMillis()),[n]),r=(0,l.useMemo)(()=>s?.isValid&&o?.isValid?Math.ceil(o.endOf("month").diff(s.startOf("month"),"months").months):0,[s,o]),d=(0,l.useCallback)((t,n)=>{const i=e.currentSlots.filter(e=>e.startDate.year!==t.year||e.startDate.month!==t.month).concat(n.map(e=>Wa(wa.IX.fromDateTimes(e,e.plus({day:1})))));e.change(`${e.prefix}slots`,i)},[e.currentSlots,e.prefix,e.change]);return s?.isValid&&o?.isValid&&r>0?(0,i.jsx)($,{gap:"6",wrap:"wrap",children:(0,Fd.A)(0,r).map(n=>{const l=s.plus({month:n}).startOf("month"),c=0===n?s:l,u=n===r-1?o:l.endOf("month"),m=e.currentSlots.flatMap(e=>e.startDate.year===l.year&&e.startDate.month===l.month?[e.startDate.startOf("day").set({hour:t||0})]:[]);return(0,i.jsx)(a_,{disabledDates:a,firstDayOfMonth:l,max:u,min:c,startHour:t,values:m,onChange:e=>{d(l,e)}},n)})}):null},W_=e=>{const{intervals:t,minDate:n,maxDate:a,numberOfMonths:s}=(0,l.useMemo)(()=>{const t=e.intervalsGrouped.flatMap(([e,t])=>t.map(({interval:e})=>e)),n=(0,Qc.A)(t,e=>e.start.toMillis()).start.startOf("day"),i=(0,Xc.A)(t,e=>e.end.toMillis()).end.endOf("day"),a=Math.ceil(i.endOf("month").diff(n.startOf("month"),"months").months);return{intervals:t,minDate:n,maxDate:i,numberOfMonths:a}},[e.intervalsGrouped]),o=t.flatMap(t=>e.isSelected(t)?[t.start.startOf("day")]:[]);return(0,i.jsx)($,{gap:"6",wrap:"wrap",children:(0,Fd.A)(0,s).map(r=>{const l=n.plus({month:r}).startOf("month"),d=0===r?n:l,c=r===s-1?a:l.endOf("month"),u=o.filter(e=>e.month===l.month&&e.year===l.year);return(0,i.jsx)(a_,{firstDayOfMonth:l,max:c,min:d,values:u,onChange:n=>{((n,i)=>{e.setSelectedBatch(t.flatMap(e=>{if(e.start.startOf("month").equals(n)){const t=i.some(t=>t.equals(e.start.startOf("day")));return[{interval:e,isSelected:t}]}return[]}))})(l,n)}},r)})})},q_=e=>{const[t,n]=(0,l.useState)(e.intervals.some(({interval:t})=>e.isSelected(t))?"checked":"unchecked"),a=(0,l.useCallback)(()=>{const i="checked"===t?"unchecked":"checked";n(i),"unchecked"===i&&e.intervals.forEach(({interval:t})=>{e.setSelected(t,!1)})},[e.intervals,t,n,e.setSelected]);return(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{cursor:"pointer",padding:"$4 $5"},gap:"2",onClick:a,children:[(0,i.jsx)($i,{color:"gray900",fontSize:"textXs",children:(0,i.jsx)(ra,{icon:"checked"===t?"chevron-down":"chevron-right"})}),(0,i.jsx)($i,{font:"gray800 textSm medium",children:e.day})]}),"checked"===t&&(0,i.jsx)($,{css:{borderTop:"1px solid $gray200",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervals.map(({name:t,interval:n},a)=>(0,i.jsx)(Bf,{state:e.isSelected(n)?"checked":"unchecked",onClick:t=>{e.setSelected(n,"checked"===t)},children:B_(t,n)},a))})]})},Y_=e=>(0,i.jsx)($,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4 $5"},direction:"column",gap:"3",children:e.intervalsGrouped.map(([t,[{name:n,interval:a}]],s)=>{const o=`${n} ${a.toFormat("HH:mm")}`.trim(),r=`${t} ${e.hideNameDates?"":`(${o})`}`.trim();return(0,i.jsx)(Bf,{state:e.isSelected(a)?"checked":"unchecked",onClick:t=>{e.setSelected(a,"checked"===t)},children:r},s)})}),H_=({customSlotPeriod:e,daysDisplay:t,event:n,isSelected:a,setSelected:s,setSelectedBatch:o})=>{const r=bi(gl),d=(0,l.useMemo)(()=>U_(e.startDate??n.startAt,e.endDate??n.endAt,e.customSlots,n.ranges,t),[e,n,t]),c=(0,l.useMemo)(()=>(0,mo.A)(Object.entries((0,Zd.A)(d,({interval:e})=>r.toLocaleString(e.start.startOf("day"),Ya.DateOnly.WeekdayLongMonthLong))),([e,[{interval:t}]])=>t.start.startOf("day").toMillis()),[d]);return(0,i.jsxs)($,{direction:"column",gap:"2",width:1,children:[h(e.name)&&(0,i.jsx)($i,{font:"gray900 textSm semiBold",children:e.name}),1===e.customSlots.length?0===c.length?null:e.displayAsCalendar?(0,i.jsx)(W_,{intervalsGrouped:c,isSelected:a,setSelectedBatch:o}):(0,i.jsx)(Y_,{hideNameDates:e.hideNameDates,intervalsGrouped:c,isSelected:a,setSelected:s}):c.map(([e,t],n)=>(0,i.jsx)(q_,{day:e,intervals:t,isSelected:a,setSelected:s},n))]})},Z_=e=>{const t=(0,l.useMemo)(()=>e.customSlotsPeriods.flatMap(t=>U_(t.startDate??e.event.startAt,t.endDate??e.event.endAt,t.customSlots,e.event.ranges,e.daysDisplay)).map(({interval:e})=>e),[e.customSlotsPeriods,e.event,e.daysDisplay]),[n,a]=(0,l.useState)(Object.fromEntries(t.map(t=>{const n=e.currentSlots.some(e=>Va(e).equals(t));return[t.toISO(),n]}))),s=(0,l.useCallback)(e=>n[e.toISO()],[n]),o=(0,l.useCallback)((t,n)=>{const i=t.toISO();a(e=>({...e,[i]:n})),e.change(`${e.prefix}slots`,V_(e.currentSlots,t,n))},[e.currentSlots,a]),r=(0,l.useCallback)(t=>{const n=t.reduce((e,{interval:t,isSelected:n})=>{const i=t.toISO();return a(e=>({...e,[i]:n})),V_(e,t,n)},e.currentSlots);e.change(`${e.prefix}slots`,n)},[e.currentSlots,a]),d=(0,l.useMemo)(()=>e.elements.flatMap(e=>e.elementType===Be.Field?(0,go.A)([e.customField,e.conditionCustomField]):e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.elements]);return(0,i.jsx)($,{direction:"column",gap:"6",children:e.customSlotsPeriods.map(t=>vl(t,e.userInfoFields,d)?(0,i.jsx)(H_,{customSlotPeriod:t,daysDisplay:e.daysDisplay,event:e.event,isSelected:s,setSelected:o,setSelectedBatch:r},t.id):null)})},K_=e=>{const{translate:t}=zg(),[n]=(0,l.useMemo)(()=>F_(e.startAt,e.endAt,e.ranges,e.daysDisplay,id(e.dayStartTime)?.[0]??0),[e.startAt,e.endAt,e.ranges,e.daysDisplay,e.dayStartTime]),a=(0,l.useMemo)(()=>n.filter(t=>(e.blockedSlots??[]).some(e=>qa(e,t))),[e.blockedSlots,n]),s=bi(gl),[o,r]=(0,l.useState)(Object.fromEntries(n.map((t,n)=>{const i=wa.IX.fromDateTimes(t,t.plus({day:1}));return[`day${n}`,void 0!==e.currentSlots.find(e=>Va(e).equals(i))]})));return(0,i.jsx)(i.Fragment,{children:n.map((n,d)=>{const c=a.includes(n);return(0,i.jsxs)(l.Fragment,{children:[0!==d&&(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(Bf,{disabled:c,state:o[`day${d}`]?"checked":"unchecked",onClick:t=>{r({...o,[`day${d}`]:"checked"===t}),e.change(`${e.prefix}slots`,V_(e.currentSlots,wa.IX.fromDateTimes(n,n.plus({day:1})),"checked"===t))},children:c?(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)(N,{children:s.toLocaleString(n,Ya.DateOnly.WeekdayLongMonthLong)})}),(0,i.jsx)(O_,{placement:"right",children:t("vous_avez_d_j_92810")})]}):s.toLocaleString(n,Ya.DateOnly.WeekdayLongMonthLong)})]},d)})})};var Q_=n(3088);const X_=e=>(0,i.jsxs)(yp,{children:[(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(Xg,{css:{flex:"1",textTransform:"uppercase"},textStyle:"smallcapsheading",children:e.title}),e.buttons]}),e.children]}),J_=e=>{const t=Ai();return(0,i.jsx)(X_,{buttons:(0,i.jsx)(i.Fragment,{children:(0,i.jsx)($i,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),title:t("disponibilit_n_50484",e.index+1),children:(0,i.jsxs)($,{direction:{"@initial":"column","@desktop":"row"},gap:"4",children:[(0,i.jsx)(Wf,{label:t("date_de_d_but_43380"),max:e.max,min:e.min,name:`${e.prefix}startDate`}),(0,i.jsx)(Zf,{label:t("heure_de_d_but_27566"),name:`${e.prefix}startTime`}),(0,i.jsx)(Wf,{label:t("date_de_fin_86920"),max:e.max,min:e.min,name:`${e.prefix}endDate`}),(0,i.jsx)(Zf,{label:t("heure_de_fin_95071"),name:`${e.prefix}endTime`})]})})},ex=e=>{const t=Ai(),n=bi(Nl),a=(0,l.useMemo)(()=>e.max.endOf("day"),[e.max]);return(0,i.jsx)(Q_.ED,{name:`${e.prefix}slots`,children:({fields:s})=>(0,i.jsxs)(i.Fragment,{children:[s.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(J_,{index:n,max:a,min:e.min,prefix:`${t}.`,remove:()=>{s.remove(n)}})]},n)),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(ga,{color:"invisible",leftIcon:"plus",onClick:()=>{s.push(n.volunteersRegistrationsSlotInputDefault(e.min))},children:t("ajouter_une_dis_96540")})]})})},tx=(0,l.memo)(e=>{switch(e.slotDisplay){case At.Display:return(0,i.jsx)(ex,{max:e.event.endAt,min:e.event.startAt,prefix:e.prefix});case At.DisplayDays:return(0,i.jsx)(K_,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.currentSlots,dayStartTime:e.event.dayStartTime,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case At.Calendar:return(0,i.jsx)(G_,{change:e.change,currentSlots:e.currentSlots,dayStartTime:e.event.dayStartTime,daysDisplay:e.daysDisplay,endAt:e.event.endAt,prefix:e.prefix,ranges:e.event.ranges,startAt:e.event.startAt});case At.Custom:return(0,i.jsx)(Z_,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:e.customSlotsPeriods,daysDisplay:e.daysDisplay,elements:e.elements,event:e.event,prefix:e.prefix,userInfoFields:e.userInfoFields});case At.Hide:return null;default:return tr(e.slotDisplay)}}),nx=e=>{const t=Ai(),{data:n,loader:a}=Ei("query FormSlots(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $delegationId: DelegationId\n) {\n organization: organizationPublic(id: $organizationId) {\n form(id: $formId, eventId: $eventId) {\n customSlotsPeriods {\n ...FormRegisterCustomSlotPeriod\n }\n }\n }\n\n event: eventPublic(id: $eventId) {\n startAt\n endAt\n dayStartTime\n ranges(formId: $formId, delegationId: $delegationId)\n }\n}\n",{organizationId:e.organizationId,eventId:e.eventId,formId:e.formId,delegationId:e.delegationId},[ka.FormRegisterCustomSlotPeriodFragment]);return a||(0,i.jsxs)(i.Fragment,{children:[h(e.form.slotSubtitle)?(0,i.jsx)(vp,{text:e.renderText(e.form.slotSubtitle,e.userInfoFields)}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{font:"gray800 textMd semiBold",children:t("s_lectionnez_vo_77037")}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray500",children:t("vos_disponibili_52929")})]}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(ah,{}),(0,i.jsx)(tx,{change:e.change,currentSlots:e.currentSlots,customSlotsPeriods:n.organization.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,elements:e.form.elements,event:n.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay,userInfoFields:e.userInfoFields}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:e.handleSubmit,children:e.isFinalStep?e.registerButtonText:t("suivant_62774")})})]})};function ix(e){navigator.clipboard.writeText(e)}function ax(){const[e,t]=(0,l.useState)(!1);return{isLoading:e,copy:(0,l.useCallback)(e=>{t(!0),ix(e),setTimeout(()=>t(!1),500)},[])}}var sx=n(1932);const ox=e=>{const t=Ai();return(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)($i,{css:{textTransform:"uppercase"},font:"gray800 textSm semiBold",children:t("invitation_n_1_64964",e.index+1)}),(0,i.jsx)(Ih,{isEmail:!0,label:t("adresse_e_mail_60930"),value:e.email,onChange:e.onChange})]})},rx=({eventId:e,form:t,formId:n,formRegisterResult:a,organizationId:s})=>{const o=Ai(),{mutate:r,isLoading:d}=function(e={}){return Ti("mutation EmailFormInviteSend(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $formId: FormId!\n $invitedById: UsersInfoId\n $teamCode: TeamCode!\n $emails: [UserEmail!]!\n) {\n emailFormInviteSend(\n organizationId: $organizationId\n eventId: $eventId\n formId: $formId\n invitedById: $invitedById\n teamCode: $teamCode\n emails: $emails\n )\n}\n",e)}(),{isLoading:c,copy:u}=ax(),m=Yc({organizationId:s,eventId:e,formId:n,teamCode:a?.teamCode}),[g,h]=(0,l.useState)([""]),[p,f]=(0,l.useState)(void 0),I=t.maxTeamMembers&&g.length>=t.maxTeamMembers-1,_=vh(),x=(0,l.useCallback)(async()=>{await r({organizationId:s,eventId:e,formId:n,invitedById:a?.userInfo?.id,teamCode:a?.teamCode??"",emails:g})&&f(!0)},[g,r,a]);return(0,i.jsxs)($,{css:{background:"$gray50",bd:!0,padding:"$6"},direction:{"@initial":"column","@desktop":"row"},gap:"3",children:[(0,i.jsx)($i,{color:"gray800",fontSize:"textXl",children:(0,i.jsx)(ra,{icon:"circle-exclamation"})}),(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsx)($i,{font:"gray800 textMd semiBold",children:o("vous_souhaitez_73288")}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray800",children:o("inviter_vos_qu_82288")}),(0,i.jsx)(Hg,{height:"5"}),(0,i.jsx)($i,{font:"gray800 textSm semiBold",children:o("FormLink")}),(0,i.jsx)(Hg,{height:"2"}),(0,i.jsxs)($,{direction:{"@initial":"column","@desktop":"row"},gap:"2",width:1,children:[(0,i.jsx)($,{align:"center",css:{background:"white",border:"1px solid $gray300",borderRadius:"$1",color:"$gray800",flex:_?"1":void 0,px:"$3"},height:40,children:(0,i.jsx)($i,{css:{ellipsis:!0},width:1,children:m})}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{isLoading:c,leftIcon:"copy",onClick:()=>{u(m)},children:o("copier_le_lien_54974")})})]}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($i,{font:"gray800 textSm semiBold",children:o("invitations_32350")}),(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)($,{css:{background:"white",bd:!0,padding:"$6"},direction:"column",gap:"4",children:p?(0,i.jsxs)($,{align:"center",direction:"column",gap:"2",children:[(0,i.jsx)(cf,{color:"success",css:{borderRadius:"50%"},icon:"check"}),(0,i.jsx)(N,{css:{textAlign:"center",color:"$gray800",fontSize:"$textMd",fontWeight:"$semiBold","@tablet":{color:"$gray900",fontSize:"$textMd",fontWeight:"$medium"}},children:o("les_invitations_24485")})]}):(0,i.jsxs)(i.Fragment,{children:[g.map((e,t)=>(0,i.jsx)(ox,{email:e,index:t,onChange:e=>{h((0,sx.jM)(n=>{n[t]=e}))}},t)),!I&&(0,i.jsx)($,{children:(0,i.jsxs)(ga,{color:"primary",onClick:()=>{h(g.concat([""]))},children:["+ ",o("ajouter_une_inv_21322")]})})]})}),(0,i.jsx)(Hg,{height:"3"}),!p&&(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!F(g)||1===g.length&&""===g[0],isLoading:d,onClick:x,children:o("envoyer_les_inv_50560")})})]})]})},lx=e=>{const t=Ai();return(0,i.jsxs)(i.Fragment,{children:[h(e.form.successMessage)?(0,i.jsx)(vp,{text:e.renderText(e.form.successMessage,e.userInfoFields)}):(0,i.jsx)($i,{height:250,width:1,children:(0,i.jsx)(Tf,{imageSrc:Ch.Done,title:t("merci_70020")})}),e.form.areTeamsAllowed&&(0,i.jsx)(rx,{eventId:e.eventId,form:e.form,formId:e.formId,formRegisterResult:e.formRegisterResult,organizationId:e.organizationId}),h(e.form.ticketUrl)&&(0,i.jsx)("div",{style:{height:"600px"},children:(0,i.jsx)("a",{className:"weezevent-widget-integration","data-height":"600","data-id":"1707621","data-nopb":"0","data-noscroll":"0","data-resize":"1","data-src":e.form.ticketUrl,"data-type":"neo","data-width":"650","data-width_auto":"1",href:`https://www.${ia.WEEZEVENT_DOMAIN}?c=sys_widget`,rel:"noreferrer",target:"_blank",title:"Logiciel billetterie en ligne",children:"Billetterie Weezevent"})})]})};function dx(e,t){return{flex:t?"1 1 0":e?"0 0 0":"1",minWidth:t?`${t}px`:e?`${e}px`:void 0}}const cx=l.forwardRef((e,t)=>(0,i.jsx)($,{ref:t,align:"center",className:"table-cell",css:{...dx(e.width,e.minWidth),color:"$gray800",overflow:"hidden",px:"$3",...e.css},height:1,role:"gridcell",onClick:t=>{e.onClick&&e.onClick(t)},...(0,D.A)(e,["direction","align","justify","wrap","gap"]),children:e.children}));cx.displayName="Cell";const ux=e=>(0,i.jsx)($,{align:"center",className:"table-header-cell",css:{...dx(e.width,e.minWidth),color:"$gray500",overflow:"hidden",px:"$3",...e.css},height:1,role:"columnheader",tabIndex:0,onClick:()=>{e.onClick?.()},...(0,D.A)(e,["aria-label","direction","align","justify","wrap","gap"]),children:e.children}),mx=e=>(0,i.jsx)($,{align:"center",className:"table-header-row",css:{background:"$gray50",border:"1px solid $gray200",fontSize:"$textXs",fontWeight:"$medium",height:"44px",width:"100%",...e.css},role:"row",children:e.children}),gx=l.createContext({}),hx=e=>{const[t,n]=l.useState(null);return(0,i.jsx)(gx.Provider,{value:{clickedRowIndex:t,setClickedRowIndex:n},children:e.children})},px=e=>{const{setClickedRowIndex:t}=l.useContext(gx);return(0,i.jsx)($,{align:"center",className:"table-row",css:{background:"white",borderBottom:"1px solid $gray200",borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",height:"64px",width:"100%",...e.css,"&:hover .dot-dot-dot":{display:"block"},"&:hover .h-controls":{display:"flex"}},role:"row",onClick:()=>{e.onClick?.()},onMouseLeave:n=>{t?.(null),e.onMouseLeave?.(n)},children:e.children})},fx=({children:e,css:t,hideBorder:n,...a})=>(0,i.jsx)(hx,{children:(0,i.jsx)($,{className:!0===n?"table-no-border":"table",css:{width:"100%","&.table > div:first-child":{borderTopLeftRadius:"$1",borderTopRightRadius:"$1"},"&.table > div:last-child":{borderBottomLeftRadius:"$1",borderBottomRightRadius:"$1"},"&.table-no-border .table-header-row":{borderLeft:"none",borderRight:"none",borderTop:"none"},"&.table-no-border .table-row":{borderLeft:"none",borderRight:"none"},"&.table-no-border .table-row:last-child":{borderBottom:"none"},...t},direction:"column",...a,children:e})}),Ix=e=>{const t=Ai(),n=bi(gl),a=bi(Wd),s=(0,l.useMemo)(()=>e.team.positionsCategories.map(e=>({name:e.name})).concat(e.team.positions.map(e=>({name:e.name}))).concat(e.team.positionsSlots.map(e=>({name:e.nameOrRange}))),[e.team]),o=(0,l.useCallback)(t=>{switch(e.slotDisplay){case At.Calendar:case At.DisplayDays:return n.toLocaleString(t.start,Ya.DateOnly.WeekdayLongMonthLong);case At.Custom:case At.Display:return a.toDisplayString(t,{formats:{displayWeekday:!0}});case At.Hide:return null;default:return tr(e.slotDisplay)}},[e.slotDisplay]);return(0,i.jsxs)(i.Fragment,{children:[F(e.team.slots)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,i.jsx)($i,{font:"gray900 textMd medium",children:t("disponibilit_s_49923")})}),(0,i.jsxs)(fx,{children:[(0,i.jsx)(mx,{css:{borderRadius:"0 !important"},children:(0,i.jsx)(ux,{children:t("Date")})}),e.team.slots.map((e,t)=>(0,i.jsx)(px,{children:(0,i.jsx)(cx,{css:{textTransform:"capitalize"},children:o(e.range)})},t))]}),(0,i.jsx)(Hg,{height:"6"})]}),F(s)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$5 $6"},children:(0,i.jsx)($i,{font:"gray900 textMd medium",children:t("missions_souhai_23225")})}),(0,i.jsxs)(fx,{children:[(0,i.jsx)(mx,{css:{borderRadius:"0 !important"},children:(0,i.jsx)(ux,{children:t("Position")})}),s.map((e,t)=>(0,i.jsx)(px,{children:(0,i.jsx)(cx,{children:e.name})},t))]}),(0,i.jsx)(Hg,{height:"6"})]}),(0,i.jsx)(KI,{label:(0,i.jsx)(Pf,{children:t("commentaire_r_12290")}),name:`formRegister.userInfo.fields.form${e.formId}`})]})},_x=e=>{const{data:t,loader:n}=Ei("query FormTeamSummary($eventId: EventId!, $teamCode: TeamCode!) {\n event: eventPublic(id: $eventId) {\n team(teamCode: $teamCode) {\n positionsCategories {\n name\n }\n\n positions {\n name\n }\n\n positionsSlots {\n nameOrRange\n }\n\n slots {\n range\n }\n }\n }\n}\n",{eventId:e.eventId,teamCode:e.teamCode},[]);return n||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ix,{formId:e.formId,slotDisplay:e.slotDisplay,team:t.event.team}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:e.handleSummit,children:e.registerButtonText})})]})},xx=l.forwardRef((e,t)=>{const n=vh(),a=Math.min(Math.round(360*window.screen.width/1170),360);return(0,i.jsx)($i,{ref:t,css:{background:"$grayCustom50",overflowY:"auto"},height:1,width:1,children:(0,i.jsxs)($,{align:"center",direction:"column",width:1,children:[n&&(0,i.jsx)(Hg,{height:"10"}),e.bannerUrl&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{css:{background:`url(${e.bannerUrl}) no-repeat`,backgroundSize:"cover",height:`${a}px`,width:"100%","@desktop":{borderRadius:"$1",boxShadow:"$xs",width:"$container"}}}),(0,i.jsx)(Hg,{height:{"@initial":"6","@tablet":"7","@desktop":"9"}})]}),e.children]})})});xx.displayName="FormContainer";const yx=e=>{const t=Ai();return(0,i.jsxs)(xx,{bannerUrl:e.bannerUrl,children:[(0,i.jsx)(p_,{canSelect:!1,isCompleted:!1,isOpen:!0,number:1,title:h(e.closedTitle)?e.closedTitle:t("formulaire_cl_t_92617"),onSelect:yh.A,children:h(e.closedMessage)?(0,i.jsx)(vp,{text:e.closedMessage}):(0,i.jsx)($i,{height:250,width:1,children:(0,i.jsx)(Tf,{imageSrc:Ch.Done,title:t("ce_formulaire_a_73045")})})}),(0,i.jsx)(Hg,{height:"9"})]})},Sx=e=>{const{translate:t,params:{organizationId:n,eventId:a,formId:s}}=zg(),o=bi(vu),r=bi(Vo),{user:d}=to(),{mutate:c}=ws(),u=(0,l.useCallback)(async t=>{if(!e.isPreview){const{userCreate:n}=await _s(ys,{token:t});await e.onSuccess(n.email,t)}},[e.onSuccess]),[m,g]=(0,l.useState)(null),[p,f]=(0,l.useState)(!1),[I,_]=(0,l.useState)(0),[x,y]=(0,l.useState)(!1),[S,j]=(0,l.useState)(Date.now()),v=(0,l.useMemo)(()=>{const e=new URL(location.href).searchParams,t=h(d?.email)?d.email:h(e.get("email"))?e.get("email"):"";return{email:t,emailConfirm:t,code:""}},[d]),b=()=>{location.reload()};return(0,i.jsx)(rh,{align:"center",direction:"column",hideDefaultErrors:!0,initialValues:v,render:({handleSubmit:n,submitting:a,values:s})=>(0,i.jsxs)(p_,{canSelect:!1,isCompleted:!e.isOpen,isOpen:e.isOpen,number:"1",title:h(e.emailTitle)?e.emailTitle:t("Email"),onSelect:yh.A,children:[(0,i.jsx)(ah,{}),h(e.description)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(vp,{text:e.description}),(0,i.jsx)(Hg,{height:"4"})]}),(0,i.jsx)(_h,{autoComplete:"email",isEmail:!0,label:t("Email"),name:"email",state:p||x?"disabled":void 0}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(_h,{autoComplete:"email",isEmail:!0,label:t("confirmation_de_51185"),name:"emailConfirm",state:p||x?"disabled":void 0}),p&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)(Jg,{alertStyle:"gray",children:[(0,i.jsx)(eh,{children:t("un_code_6_chi_33026",s.email)}),(0,i.jsx)(th,{children:(0,i.jsx)($i,{css:{fontStyle:"italic"},children:t("attention_ne_16312")})})]}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(_h,{autoComplete:"one-time-code",inputMode:"numeric",label:t("code_20843"),name:"code",pattern:"\\d*",state:x?"disabled":void 0})]}),(0,i.jsx)(Hg,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)($,{children:x?(0,i.jsx)(ga,{onClick:b,children:t("recommencer_14712")}):(0,i.jsx)(ga,{isLoading:a,onClick:n,children:t("suivant_62774")})})]}),validate:e=>p?o.validateForForm(r.emailCodeSchema())(e):o.validateForForm(r.emailConfirmSchema())(e),width:1,onSubmit:async i=>{if(!e.isPreview){if(h(i.code)){const{user:e,callbacks:n}=m;return fs({code:i.code,user:e,callbacks:n}).then(u,e=>{if("RETRY"===e.type)return _(I+1),{code:t("le_code_n_est_p_95065",3-(I+1))};{let n;return Is(e.message,i.email,S),y(!0),n=wa.dw.fromMillis(Date.now()-S).as("minutes")>3?t("le_code_a_expir_45975"):t("le_code_n_est_p_12317"),{FORM_ERROR:n}}})}if(d?.email===i.email)await u(await us());else{await gs().catch(()=>!0);const{userExists:t}=await(o={email:i.email},_s("query UserExists($email: UserEmail!) {\n userExists(email: $email)\n}\n",{variables:o,token:void 0,fragments:[]}));if(t){await c({loginCodeEmail:{email:i.email,organizationId:n,eventId:a,formId:s,source:Qe.VolunteerRegister}}),j(Date.now());const e=await ps(i.email,yh.A,yh.A);g(e),f(!0)}else await e.onSuccess(i.email)}}var o}})};function jx(e){const t=new URL(location.href);t.searchParams.set("lang",e.toLowerCase()),location.href=t.toString()}const vx=e=>{const t=Ai();return(0,i.jsxs)($,{align:{"@initial":"start","@tablet":"center"},css:{background:"white",bd:"white 1 sm",padding:"$4 $6",width:"100%","@tablet":{padding:"$6",width:"$containerTablet"},"@desktop":{width:"$container"}},direction:{"@initial":"column","@tablet":"row"},gap:"4",children:[(0,i.jsx)($i,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t("langue_du_formu_66193")}),(0,i.jsx)($i,{css:{"@mobile":{width:"100%"},"@tablet":{flex:"1"}},children:(0,i.jsx)(YI,{value:e.language,onChange:jx,children:e.languages.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})})]})},bx=e=>{const t=Ai();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(p_,{canSelect:!1,isCompleted:!1,isOpen:!0,number:2,title:h(e.noAccessTitle)?e.noAccessTitle:t("acc_s_limit_69177"),onSelect:yh.A,children:h(e.noAccessMessage)?(0,i.jsx)(vp,{text:e.noAccessMessage}):(0,i.jsx)($i,{font:"gray800 textMd semiBold",textAlign:"center",width:1,children:t("vous_n_avez_pas_58193")})})]})},Ax=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.userInfoId),[s,o]=(0,l.useState)(!e.userInfoId);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{font:"gray800 textSm semiBold",children:t("avec_quel_profi_89563")}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsxs)($,{direction:"column",gap:"3",width:1,children:[e.usersInfos.map(e=>(0,i.jsx)(hf,{state:n===e.id?"checked":"unchecked",onClick:t=>{"checked"===t&&(a(e.id),o(!1))},children:e.nameOrEmail},e.id)),(0,i.jsx)(hf,{state:s?"checked":"unchecked",onClick:e=>{"checked"===e&&(a(null),o(!0))},children:t("s_inscrire_avec_00521")})]}),(0,i.jsx)(Hg,{height:{"@initial":"6","@tablet":"7"}}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{e.onSuccess(n,s)},children:t("suivant_62774")})})]})},Cx=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s,formId:o}}=zg(),{mutate:r}=Es(),d=bi(vu),c=bi(Ll),u=bi(Su),m=function(e,{isOrganization:t}){const{user:n}=to();return(0,l.useMemo)(()=>{const i=new URL(location.href),a=Ph(n?.language,i.searchParams);return t||e.includes(a)?a:(jx(e[0]),e[0])},[t,e,n])}(e.languages,{isOrganization:"number"!=typeof a}),g=(0,l.useRef)(null),p=(0,l.useCallback)(()=>{g.current&&(g.current.scrollTop=0)},[g]),f=(0,l.useMemo)(()=>e.form.elements.filter(e=>e.elementType===Be.Field),[e.form]),I=(0,l.useMemo)(()=>f.flatMap(e=>(0,go.A)([e.customField,e.conditionCustomField])),[f]),[_,x]=(0,l.useState)(void 0),[y,S]=(0,l.useState)(void 0),[j,v]=(0,l.useState)(0===e.form.segments.length),[b,A]=(0,l.useState)({formRegister:c.formRegisterInputDefault(Ge.Form,null,I,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),[C,E]=(0,l.useState)(0),[T,M]=(0,l.useState)(null),[R,D]=(0,l.useState)([]),[O,w]=(0,l.useState)(null),P=(0,l.useCallback)((t,n)=>u.renderText(t,{userInfo:T?{...T,fields:{...T.fields,...n}}:{id:-1,localId:-1,email:_,fields:n,registrationDate:wa.c9.now()},event:e.event,organization:e.organization,customFields:I}),[e.event,_,T,I,e.organization]),$=(0,l.useMemo)(()=>h(e.form.description)?u.renderText(e.form.description,{event:e.event,organization:e.organization}):"",[e.event,e.form.description,e.organization]),k=(0,l.useCallback)(async(t,i)=>{if(!e.isPreview){if(i){const{user:t}=await function(e,t){return _s("query UsersInfos($organizationId: OrganizationId!, $eventId: EventId, $formId: FormId!) {\n user {\n userInfo(organizationId: $organizationId) {\n ...UserInfoForm\n }\n\n usersInfos(organizationId: $organizationId) {\n ...UserInfoForm\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.UserInfoFormFragment]})}({organizationId:n,eventId:a,formId:o},i);e.form.allowMultiProfiles?(M(t.userInfo),D(t.usersInfos)):(M(t.userInfo),v(t.userInfo.canAccess),A({formRegister:c.formRegisterInputDefault(Ge.Form,t.userInfo,I,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:!1,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}))}x(t),S(i),setTimeout(()=>{E(C+1),p()},100)}},[C,I,e.form,e.countryCode,e.team,p]),N=(0,l.useCallback)((t,n)=>{if(!e.isPreview){const i=R.find(e=>e.id===t);M(i),v(i?.canAccess??0===e.form.segments.length),A({formRegister:c.formRegisterInputDefault(Ge.Form,i,I,{countryCode:e.countryCode,eventStartDate:e.event?.startAt,forOther:n,sendNotificationEmail:!0,slotDisplay:e.form.slotDisplay,team:e.team})}),setTimeout(()=>{E(C+1),p()},100)}},[C,I,e.form,e.countryCode,e.team,p]),z=(0,l.useCallback)(async t=>{if(!e.isPreview){if(C===W-2){const i=await r({organizationId:n,eventId:a,delegationId:s,formId:o,email:_,formRegister:{...t.formRegister,teamCode:e.team?.teamCode}},y);w(i.formRegister)}E(C+1),p()}},[_,y,C,E,p]),L=(0,l.useMemo)(()=>e.form.areTeamsAllowed&&h(e.team?.teamCode),[e.form,e.team]),F=(0,l.useMemo)(()=>a&&L&&!e.form.teamMemberFillFullForm,[a,L,e.form]),U=(0,l.useMemo)(()=>e.form.allowMultiProfiles&&R.length>0,[e.form,R]),B=(0,l.useMemo)(()=>e.form.slotDisplay!==At.Hide&&a&&!F,[e.form,a,F]),V=(0,l.useMemo)(()=>e.form.positionDisplay!==vt.None&&a&&!F,[e.form,a,F]),G=(0,l.useMemo)(()=>e.form.accreditationDisplay!==St.None&&a&&!F,[e.form,a,F]),W=(0,l.useMemo)(()=>3+(U?1:0)+(B?1:0)+(V?1:0)+(G?1:0)+(F?1:0),[U,B,V,G,F]),q=U?2:1,Y=B?q+1:q,H=V?Y+1:Y,Z=G?H+1:H,K=q+1,Q=(0,l.useMemo)(()=>c.formRegisterInformationsSchema(f),[f,c]),X=(0,l.useMemo)(()=>c.formRegisterSlotsSchema(e.form.slotDisplay,e.form.minNumberOfSlots,e.event?.startAt??wa.c9.now(),e.event?.endAt??wa.c9.now()),[c,e.event,e.form]),J=(0,l.useMemo)(()=>c.formRegisterPositionsSchema(e.form.positionRanking,e.form.positionDisplay),[c,e.form]),ee=(0,l.useCallback)(t=>C===q?d.validateForForm(Q)(t):B&&C===Y?d.validateForForm(X)(t):V&&C===H?d.validateForForm(J)(t):G&&C===Z?d.validateForForm(c.formRegisterAccreditationsSchema(e.form.accreditationDisplay,t.formRegister.accreditationsSlotsIds,e.form.accreditationsFormCustomFields,s))(t):{},[Z,s,c,Q,q,J,H,e.form,G,V,B,X,Y,C,d]),te=(0,l.useMemo)(()=>h(e.form.registerButtonText)?e.form.registerButtonText:t("s_inscrire_20304"),[e.form]),ne=(0,l.useMemo)(()=>!e.hideFormLanguages&&e.languages.length>1,[e.hideFormLanguages,e.languages]),ie=e.isPreview?"opened"===e.formPreviewState:j,ae=e.isPreview?"blocked"===e.formPreviewState:!(j||0===C||1===C&&U);return(0,i.jsxs)(xx,{ref:g,bannerUrl:e.form.design?.banner?.url,children:[ne&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(vx,{language:m,languages:e.languages}),(0,i.jsx)(Hg,{height:"4"})]}),(0,i.jsx)(Sx,{description:$,emailTitle:e.form.emailTitle,isOpen:e.isPreview||0===C,isPreview:e.isPreview,onSuccess:k}),U&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(p_,{canSelect:C>=1&&C!==W-1,isCompleted:C>=1,isOpen:e.isPreview||1===C,number:"2",title:t("choix_du_profil_50142"),onSelect:()=>E(1),children:(0,i.jsx)(Ax,{userInfoId:T?.id,usersInfos:R,onSuccess:N})})]}),ie&&(0,i.jsx)(rh,{align:"center",customErrorRef:g,direction:"column",initialValues:b,render:({form:r,handleSubmit:l,values:d})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(p_,{canSelect:C>=q&&C!==W-1,isCompleted:C>=q+1,isOpen:e.isPreview||C===q,number:q+1,title:h(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),onSelect:()=>E(q),children:(0,i.jsx)(__,{change:r.change,countryCode:e.countryCode,elements:e.form.elements,handleSubmit:l,isFinalStep:!(B||V||G||F),registerButtonText:te,renderText:P,values:d.formRegister.userInfo.fields})}),(0,i.jsx)(Hg,{height:"4"}),B&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p_,{canSelect:C>=Y&&C!==W-1,isCompleted:C>=Y+1,isOpen:e.isPreview||C===Y,number:Y+1,title:h(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),onSelect:()=>E(Y),children:(0,i.jsx)(nx,{change:r.change,currentSlots:d.formRegister.slots,delegationId:s,eventId:a,form:e.form,formId:o,handleSubmit:l,isFinalStep:!V&&!G,organizationId:n,registerButtonText:te,renderText:P,userInfoFields:d.formRegister.userInfo.fields})}),(0,i.jsx)(Hg,{height:"4"})]}),V&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p_,{canSelect:C>=H&&C!==W-1,isCompleted:C>=H+1,isOpen:e.isPreview||C===H,number:H+1,title:h(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),onSelect:()=>E(H),children:(0,i.jsx)(L_,{change:r.change,eventId:a,form:e.form,handleSubmit:l,isFinalStep:!G,positionsCategoriesIds:d.formRegister.positionsCategoriesIds,positionsIds:d.formRegister.positionsIds,positionsSlotsIds:d.formRegister.positionsSlotsIds,registerButtonText:te,renderText:P,slots:d.formRegister.slots,userInfoFields:d.formRegister.userInfo.fields})}),(0,i.jsx)(Hg,{height:"4"})]}),G&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p_,{canSelect:C>=Z&&C!==W-1,isCompleted:C>=Z+1,isOpen:e.isPreview||C===Z,number:Z+1,title:h(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),onSelect:()=>E(Z),children:(0,i.jsx)(h_,{accreditationsSlotsIds:d.formRegister.accreditationsSlotsIds,change:r.change,eventId:a,form:e.form,handleSubmit:l,registerButtonText:te,renderText:P,slots:d.formRegister.slots,userInfoFields:d.formRegister.userInfo.fields})}),(0,i.jsx)(Hg,{height:"4"})]}),F&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(p_,{canSelect:C>=K&&C!==W-1,isCompleted:C>=W-1,isOpen:e.isPreview||C===K,number:K+1,title:t("r_capitulatif_d_48468"),onSelect:()=>E(K),children:(0,i.jsx)(_x,{eventId:a,formId:o,handleSummit:l,registerButtonText:te,slotDisplay:e.form.slotDisplay,teamCode:e.team.teamCode})}),(0,i.jsx)(Hg,{height:"4"})]}),(0,i.jsx)(p_,{canSelect:!1,isCompleted:!1,isOpen:e.isPreview||C===W-1,number:W,title:h(e.form.successTitle)?e.form.successTitle:t("confirmation_95122"),onSelect:()=>E(W-1),children:(0,i.jsx)(lx,{eventId:a,form:e.form,formId:o,formRegisterResult:O,organizationId:n,renderText:P,userInfoFields:d.formRegister.userInfo.fields})}),(0,i.jsx)(Hg,{height:"9"})]}),validate:ee,width:1,onSubmit:z}),ae&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(bx,{noAccessMessage:e.form.noAccessMessage,noAccessTitle:e.form.noAccessTitle}),(0,i.jsx)(Hg,{height:"9"})]})]})},Ex=()=>{const{organizationId:e,eventId:t,formId:n,delegationId:a,teamCode:s}=Mi(),{data:o,loader:r}=Ei("query FormInfos(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId\n $teamCode: TeamCode\n) {\n organization: organizationPublic(id: $organizationId) {\n id\n name\n country\n dateFormat\n datetimeFormat\n timeFormat\n\n event(id: $eventId) {\n id\n name\n country\n languages\n startAt\n endAt\n fields\n\n team(teamCode: $teamCode) {\n teamCode\n accreditationsSlotsIds\n positionsCategoriesIds\n positionsIds\n positionsSlotsIds\n\n slots {\n startDate\n startTime\n endDate\n endTime\n }\n }\n }\n\n delegation: delegationMaybe(id: $delegationId) {\n state\n }\n\n form(id: $formId, eventId: $eventId) {\n allowMultiProfiles\n description\n successTitle\n successMessage\n isOpen\n closedTitle\n closedMessage\n noAccessTitle\n noAccessMessage\n positionTitle\n positionSubtitle\n accreditationTitle\n accreditationSubtitle\n areTeamsAllowed\n maxTeamMembers\n teamMemberFillFullForm\n emailTitle\n informationTitle\n registerButtonText\n ticketUrl\n\n ...FormSlotsOptions\n ...FormMissionsOptions\n ...FormAccreditationsOptions\n\n design {\n ...DesignColors\n\n banner {\n url\n }\n }\n\n elements {\n ...FormElementDisplay\n }\n\n segments {\n segmentId\n }\n }\n }\n}\n",{organizationId:e,eventId:t,formId:n,delegationId:a,teamCode:s},[ka.FormSlotsOptionsFragment,ka.FormMissionsOptionsFragment,ka.FormAccreditationsOptionsFragment,ka.DesignColorsFragment,ka.FormElementDisplayFragment]),{isPreview:d,formPreviewState:c,hideFormLanguages:u}=(0,l.useMemo)(()=>{const e=new URLSearchParams(location.search);return{isPreview:"true"===e.get("preview"),formPreviewState:e.get("state"),hideFormLanguages:"true"===e.get("hideFormLanguages")}},[]),m=(0,l.useMemo)(()=>{if(d)return"closed"===c;{const e=o.organization?.form.isOpen??!0,t=!o.organization?.delegation||o.organization?.delegation.state===Se.Ongoing;return!e||!t}},[o.organization,c,d]);return(0,l.useEffect)(()=>{o.organization&&Bg(o.organization.form.design?.colors)},[o.organization]),r||(m?(0,i.jsx)(yx,{bannerUrl:o.organization.form.design?.banner?.url,closedMessage:o.organization.form.closedMessage,closedTitle:o.organization.form.closedTitle}):(0,i.jsx)(Cx,{countryCode:o.organization.event?.country??o.organization.country,event:o.organization.event,form:o.organization.form,formPreviewState:c,hideFormLanguages:u,isPreview:d,languages:o.organization.event?.languages??z,organization:o.organization,team:o.organization?.event?.team}))};var Tx;!function(e){e.AUTO_RESIZE_SYN="piglet-widget-auto-resize-syn",e.AUTO_RESIZE_ACK="piglet-widget-auto-resize-ack",e.AUTO_RESIZE_CHANGE_DIMENSIONS="piglet-widget-auto-resize-change-dimensions"}(Tx||(Tx={}));const Mx=`\n .UICta {\n padding: 12px 24px;\n overflow: hidden;\n position: relative;\n display: flex;\n flex-direction: column;\n gap: 16px;\n align-items: start;\n color: #d8b26a;\n border: 0;\n background: none;\n}\n.UICta:hover .UICta-bg-hover,\n.UICta:active .UICta-bg-hover,\n.UICta:focus .UICta-bg-hover {\n opacity: 1;\n}\n.UICta-gradient {\n position: absolute;\n inset: 0;\n border-radius: 10px;\n background: linear-gradient(180deg, #D8B26A 0%, #6E460C 100%);\n transition: all 400ms ease-out;\n}\n.UICta-bg {\n position: absolute;\n inset: 1.5px;\n border-radius: 10px;\n background-image: url('${ia.HEAVENT_ASSETS_URL}/img/bg-cta.jpg');\n background-size: cover;\n transition: all 300ms ease-out;\n}\n.UICta-bg-hover {\n position: absolute;\n inset: 1.5px;\n border-radius: 10px;\n background-image: url('${ia.HEAVENT_ASSETS_URL}/img/bg-cta-hover.jpg');\n background-size: cover;\n opacity: 0;\n transition: all 300ms ease-out;\n}\n.UICta-label {\n position: relative;\n width: 100%;\n font-size: 16px;\n letter-spacing: 1px;\n font-family: 'Netflix Sans Serif', serif;\n text-align: center;\n}\n`,Rx=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{children:Mx}),(0,i.jsxs)("button",{className:"UICta",type:"button",onClick:e.onClick,children:[(0,i.jsx)("div",{className:"UICta-gradient"}),(0,i.jsx)("div",{className:"UICta-bg"}),(0,i.jsx)("div",{className:"UICta-bg-hover"}),(0,i.jsx)("div",{className:"UICta-label",children:"CONFIRMER MA PRÉSENCE"})]})]}),Dx=()=>{const{params:{userInfoId:e,customFieldSlug:t,value:n}}=zg(),[a,s]=(0,l.useState)(!1),o=`${ia.HEAVENT_API_URL}/users/${e}/field/${t}/update/${n}`,r=wa.c9.now()>wa.c9.fromISO("2026-02-27T10:00:00.000+01:00");return(0,i.jsx)($,{align:"center",className:"netflix",css:{background:`url(${Ah.NetflixWood})`,fontFamily:"$FKRomanStandard",py:"40px"},direction:"column",height:1,width:1,children:r?(0,i.jsx)($,{css:{gap:"32px",px:"50px",width:"100%","@desktop":{width:"738px"}},direction:"column",children:(0,i.jsxs)($,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)($i,{css:{color:"white"},textAlign:"center",children:"L'équipage a levé l'ancre et l'embarquement est maintenant complet"}),(0,i.jsxs)($i,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:["Le délai pour confirmer ta venue dans l'équipage One Piece Market est dépassé. Ta place n’a malheureusement pas pu être confirmée.",(0,i.jsx)("br",{}),"Pas d'inquiétude ! Il est également possible de venir sans réservation pour explorer le One Piece Market. Cependant, cela ne permettra pas d’accéder au visionnage de l’épisode en avant-première. À votre arrivée, suivez l’entrée VOGUE MERRY.",(0,i.jsx)("br",{}),"Rendez-vous le 10 mars sur Netflix pour la saison 2 de One Piece, en route pour Grand Line ! La quête continue."]})]})}):(0,i.jsxs)($,{css:{gap:"32px",px:"50px",width:"100%","@desktop":{width:"738px"}},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)($i,{css:{color:"white"},textAlign:"center",children:"LE 28 FÉVRIER ET 1ER MARS CENTQUATRE-PARIS"}),(0,i.jsx)($i,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:"VOTRE DERNIÈRE ESCALE AVANT GRAND LINE"})]}),a?(0,i.jsxs)($,{align:"center",css:{fontSize:"22px",textTransform:"uppercase","@desktop":{fontSize:"32px"}},direction:"column",children:[(0,i.jsx)($i,{css:{color:"white"},textAlign:"center",children:"Réponse enregistrée"}),(0,i.jsx)($i,{css:{color:"rgb(216, 178, 106)"},textAlign:"center",children:"Vous allez recevoir vos billets par emails dans quelques minutes"})]}):(0,i.jsx)(Rx,{onClick:async()=>{await fetch(o),s(!0)}})]})})},Ox=l.createContext({}),wx=e=>(0,i.jsx)(Ox.Provider,{value:{},children:e.children}),Px=j("div",{alignItems:"center",background:"$grayCustom50",display:"flex",flexDirection:"column",gap:"$10",height:"100%",overflowY:"auto",padding:"$4",paddingTop:"$10",width:"100%","@tablet":{padding:"$10"}}),$x=()=>(ya("volunteers/src/v2/profiles/list/profilesListSkeleton.tsx","volunteers/src/v2/common/landingSkeleton.tsx"),(0,i.jsxs)(Px,{children:[(0,i.jsx)(Fh,{}),(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1})]})]})),kx=({delegation:e})=>{const{params:{organizationId:t},translate:n}=zg(),a=bh(),{delegationsListButton:s}=xr(t);return(0,i.jsx)(sa,{to:Wc.DELEGATION({delegationId:e.id,eventId:e.eventId||void 0,organizationId:t}),children:(0,i.jsxs)($,{align:"center",css:{background:"white",bd:!0,padding:"$4 $6"},gap:"3",children:[(0,i.jsx)($i,{css:{flex:"1"},font:"gray800 textSm medium",children:e.name}),a?(0,i.jsx)(ga,{color:"white",size:"sm",children:n(s)}):(0,i.jsx)(ga,{color:"white",leftIcon:"arrow-right",size:"sm"})]})})},Nx=()=>{const{history:e,translate:t,params:{organizationId:n}}=zg(),{data:a,isLoading:s}=Ei("query DelegationsList($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n name\n\n events(sort: { attribute: StartAt, direction: Desc }) {\n nodes {\n id\n name\n startAt\n }\n }\n\n delegations(level: Both, onlyVisibleInDelegation: true) {\n nodes {\n id\n name\n eventId\n }\n }\n }\n}\n",{organizationId:n},[]),o=(0,l.useMemo)(()=>a.organization?.events.nodes??[],[a.organization]),{eventDelegationsGroupedByEvent:r,organizationDelegations:d}=(0,l.useMemo)(()=>{const e=(0,mo.A)((a.organization?.delegations.nodes??[]).filter(e=>!e.eventId),e=>e.name.toLowerCase());return{eventDelegationsGroupedByEvent:(0,ef.A)((0,Zd.A)((a.organization?.delegations.nodes??[]).filter(e=>e.eventId),e=>e.eventId),e=>(0,mo.A)(e,e=>e.name.toLowerCase())),organizationDelegations:e}},[a.organization]);(0,l.useEffect)(()=>{if(1===a.organization?.delegations.nodes.length){const t=a.organization.delegations.nodes[0];e.replace(Wc.DELEGATION({organizationId:n,eventId:t.eventId||void 0,delegationId:t.id}))}},[a.organization]);const{delegationsListTitle:c}=xr(n);return(0,l.useEffect)(()=>{document.title=a.organization?.name??Zr},[a.organization]),(0,i.jsx)(Gg,{isLoading:s,loadDelegationsSpace:!0,loadMembersSpace:!1,organizationId:n,skeleton:(0,i.jsx)($x,{}),children:(0,i.jsxs)(Px,{children:[(0,i.jsx)(Lh,{}),(0,i.jsx)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:F(a.organization?.delegations.nodes)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:t(c)}),(0,i.jsx)(Hg,{width:"6"}),F(d)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{color:"gray800",fontSize:"textSm",fontWeight:"semiBold",children:a.organization?.name}),d.map(e=>(0,i.jsx)(kx,{delegation:e},e.id))]}),F(Object.values(r))&&(0,i.jsxs)(i.Fragment,{children:[F(d)&&(0,i.jsx)(MI,{direction:"horizontal"}),(0,i.jsx)($i,{font:"gray800 textSm semiBold",children:t("_v_nements_53672")}),o.map(e=>{const t=r[e.id];return F(t)?(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)($i,{font:"gray500 textXs semiBold",children:e.name}),t.map(e=>(0,i.jsx)(kx,{delegation:e},e.id))]},e.id):null})]})]}):(0,i.jsxs)($,{align:"center",direction:"column",children:[(0,i.jsx)(Tf,{title:t("aucune_d_l_gati_85273")}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{color:"white",onClick:ms,children:t("se_d_connecter_74151")})})]})})]})})};function zx(e,t,n){if("positionCategoryId"in n){const i=e.usersPositionsCategories.some(e=>"ANY"===n.positionCategoryId?t===e.roleId:t===e.roleId&&e.positionCategoryId===n.positionCategoryId);if("positionId"in n){const a=e.usersPositions.some(e=>t===e.roleId&&e.positionId===n.positionId);return i||a}return i}return"delegationCategoryId"in n?e.usersDelegationsCategories.some(e=>"ANY"===n.delegationCategoryId?t===e.roleId:t===e.roleId&&e.delegationCategoryId===n.delegationCategoryId):"eventId"in n&&e.usersEvents.some(e=>"ANY"===n.eventId?t===e.roleId:t===e.roleId&&e.eventId===n.eventId)}function Lx(e,t,n){const i=n?e.roles.filter(t=>"positionCategoryId"in n||"positionId"in n?t.accessLevel===Ct.Position?zx(e,t.id,n):t.accessLevel===Ct.Organization||t.accessLevel===Ct.Event:"delegationCategoryId"in n?t.accessLevel===Ct.DelegationCategory?zx(e,t.id,n):t.accessLevel===Ct.Organization||t.accessLevel===Ct.Event:"eventId"in n&&(t.accessLevel===Ct.Event?zx(e,t.id,n):t.accessLevel===Ct.Organization)):e.roles;return t.map(e=>i.some(t=>"1"===t.permissions[e]))}const Fx=l.createContext({}),Ux=e=>{const{params:{eventId:t}}=zg(),n=l.useMemo(()=>e.userPermissions.roles.some(e=>e.accessLevel===Ct.Organization||e.accessLevel===Ct.Event),[e.userPermissions]);return t?(0,i.jsx)(Fx.Provider,{value:{hasEventRole:n,userPermissions:e.userPermissions,hasPermission:(t,n)=>function(e,t,n){return Lx(e,[t],n)[0]}(e.userPermissions,t,n),hasPermissions:(t,n)=>Lx(e.userPermissions,t,n)},children:e.children}):(0,i.jsx)(i.Fragment,{children:e.children})};function Bx(){return l.useContext(Fx)}const Vx=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),[o,r]=(0,l.useMemo)(()=>(0,Kd.A)(e.delegations,e=>"number"==typeof e.event?.id),[e.delegations]),d=(0,l.useMemo)(()=>(0,mo.A)(Object.values((0,Zd.A)(o,e=>e.event.id)),([e])=>e.event.name.toLowerCase()),[o]);return e.delegations.length>1?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($p,{title:t("communaut_20896"),children:r.map(e=>(0,i.jsx)(Np,{to:Wc.DELEGATION({organizationId:n,delegationId:e.id}),children:e.name},e.id))}),d.map((e,t)=>{const a=e[0],s=(0,mo.A)(e,e=>e.name.toLowerCase());return(0,i.jsx)($p,{title:a.event.name,children:s.map(e=>(0,i.jsx)(Np,{to:Wc.DELEGATION({organizationId:n,eventId:e.event?.id,delegationId:e.id}),children:e.name},e.id))},t)}),(0,i.jsx)($p,{children:(0,i.jsx)(Np,{to:Rr(Ec.ORGANIZATION_DELEGATIONS({organizationId:n})),children:t("voir_toutes_les_79250")})}),(0,i.jsx)($p,{children:(0,i.jsx)(Np,{to:Wc.DELEGATION_PROFILE({organizationId:n,eventId:a,delegationId:s}),children:t("mon_profil_48224")})})]}):(0,i.jsx)($p,{children:(0,i.jsx)(Np,{to:Wc.DELEGATION_PROFILE({organizationId:n,eventId:a,delegationId:s}),children:t("mon_profil_48224")})})},Gx=e=>{const{history:t,translate:n,params:{organizationId:a,eventId:s,delegationId:o}}=zg(),r=bi(yr),d=bi(Cl),c=bi(vu),{mutate:u}=function(e={}){return Ti("mutation DelegationUpdateFields(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $fields: JSON!\n) {\n delegationUpdateFields(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n fields: $fields\n )\n}\n",e)}(),m=(0,l.useMemo)(()=>({fields:e.delegation.fields}),[e.delegation]),g=(0,l.useCallback)(t=>c.validateForForm(r.delegationUpdateFieldsSchema(d.changedFieldsSchema(e.delegation.usedCustomFields,m.fields,t.fields)))(t),[e.delegation,m]),h=(e=!1)=>e?t.goBack(Wc.DELEGATION_DASHBOARD({organizationId:a,eventId:s,delegationId:o})):t.push(Wc.DELEGATION_DASHBOARD({organizationId:a,eventId:s,delegationId:o}));return(0,i.jsx)(rh,{direction:"column",initialValues:m,render:({form:t,handleSubmit:s,submitting:o,values:r})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ga,{color:"invisible",leftIcon:"arrow-left",onClick:()=>h(!0),children:n("retour_92202")}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($,{direction:"column",gap:"4",children:e.delegation.usedCustomFields.map(n=>(0,i.jsx)(e_,{change:t.change,display:vl(n,r.fields,e.delegation.usedCustomFields),field:n,fileAcl:"public-read",isMandatory:!1,organizationId:a,prefix:"fields."},n.id))}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(ga,{isLoading:o,onClick:s,children:n("mettre_jour_85141")}),(0,i.jsx)(ga,{color:"white",onClick:()=>h(!0),children:n("annuler_48254")})]})]}),validate:g,width:1,onSubmit:async e=>{await u({organizationId:a,eventId:s,delegationId:o,fields:e.fields}),h()}})},Wx=()=>{const{params:{organizationId:e,delegationId:t}}=zg(),{data:n,loader:a}=Ei("query DelegationUpdateFieldsInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization(id: $organizationId) {\n delegation(id: $delegationId) {\n fields\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n }\n }\n}\n",{organizationId:e,delegationId:t},[ka.CustomFieldWithConditionFragment]);return a||(0,i.jsx)(Gx,{delegation:n.organization.delegation})},qx=e=>{const{params:{organizationId:t,eventId:n,delegationId:a}}=zg(),s=Di(),o=e.delegationsSpaceLayoutTabs.find(e=>e.isPinned)?.slug;return h(o)?(0,i.jsx)(jm,{path:Wc.DELEGATION_TAB({organizationId:t,eventId:n,delegationId:a,slug:o}),replace:!0}):"members"===s.getItem(xh.DELEGATIONS_SPACE_TAB)?(0,i.jsx)(jm,{path:Wc.DELEGATION_MEMBERS({organizationId:t,eventId:n,delegationId:a}),replace:!0}):(0,i.jsx)(jm,{path:Wc.DELEGATION_DASHBOARD({organizationId:t,eventId:n,delegationId:a}),replace:!0})},Yx=e=>{const t=(0,l.useContext)(ji).useLocation().pathname.includes(e.basePath||e.path);return(0,i.jsxs)(i.Fragment,{children:[e.disabled?(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)($i,{color:"grayCustom500",css:{borderBottom:"unset",paddingBlock:"$3",fontWeight:"$medium"},children:e.children})}),(0,i.jsx)(O_,{placement:"top",children:e.disabledMessage})]}):(0,i.jsx)(sa,{replace:!0,to:e.path,children:(0,i.jsx)($i,{color:t?"primaryCustom500":"grayCustom500",css:{borderBottom:t?"2px solid $primaryCustom500":"unset",cursor:t?"inherit":"pointer",paddingBlock:"$3","&:hover":{color:t?"$primaryCustom600":"$grayCustom800"},fontWeight:"$medium"},children:e.children})}),(0,i.jsx)($i,{width:24})]})},Hx=e=>(0,i.jsxs)($,{"aria-orientation":"horizontal",as:R.Nav,css:{borderBottom:"1px solid $gray200",...e.css},width:1,children:[e.center&&(0,i.jsx)(i.Fragment,{children:(0,i.jsx)($i,{css:{flex:"1"}})}),e.children,(0,i.jsx)($i,{css:{flex:"1"}})]}),Zx=e=>(0,i.jsx)(i.Fragment,{children:e.children});Zx.displayName="TabPanel";const Kx=e=>{const[t,n]=(0,Kd.A)(l.Children.toArray(e.children),e=>l.isValidElement(e)&&e.type===Zx);return(0,i.jsxs)($,{direction:"column",width:1,...w(e),children:[n,(0,i.jsx)(oo.dO,{children:t.map((e,t)=>(0,i.jsx)(oo.qh,{path:e.props.path,children:e},t))})]})},Qx=e=>{const{history:t}=zg(),n=kI(e.children),a=vh(),s=bh(),o=a||s&&e.tabsOnTablet,r=(e,t)=>{const n=e(t);return h(n)?n:n[0]};return(0,i.jsx)(i.Fragment,{children:o?(0,i.jsxs)(Kx,{height:1,children:[(0,i.jsx)(Hx,{css:e.featureFlags?.isV4?{background:"$white",padding:"$2",borderRadius:"$2"}:void 0,children:n.map((e,t)=>(0,i.jsx)(Yx,{path:r(e.props.getPath),children:e.props.title},t))}),(0,i.jsx)(Hg,{height:"7"}),n.map((e,t)=>(0,i.jsx)(Zx,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,i.jsx)(yp,{heading:e.props.title,subtitle:e.props.subtitle,children:e.props.children}):e.props.children},t))]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(YI,{css:{marginTop:"$4"},value:h(ia.HEAVENT_APPLICATION_BASENAME)?location.pathname.replace(new RegExp(`^/${ia.HEAVENT_APPLICATION_BASENAME}`,"gm"),""):location.pathname,onChange:e=>t.replace(e),children:n.map((e,t)=>(0,i.jsx)("option",{value:r(e.props.getPath),children:e.props.title},t))}),(0,i.jsx)(Hg,{height:"5"}),(0,i.jsx)(oo.dO,{children:n.map((e,t)=>(0,i.jsx)(oo.qh,{path:e.props.getPath(!0),children:e.props.featureFlags?.isV4?(0,i.jsx)(yp,{heading:e.props.title,subtitle:e.props.subtitle,children:e.props.children}):e.props.children},t))})]})})},Xx=e=>(0,i.jsx)(i.Fragment,{children:e.children}),Jx=[25,50,100];const ey=(0,l.createContext)({});function ty(){return(0,l.useContext)(ey)}function ny(e,t,n={}){return(0,mo.A)(t,e=>m(e.name)).flatMap(t=>Xp(t.accreditations).map(a=>{const s=n.useAccreditationDisplay&&a.accreditationDisplay===W.Radio?a.name:void 0,o=cu(a.slots);return(0,i.jsx)("optgroup",{label:`${t.name} - ${Hp(a)}`,children:o.map(t=>{const o=du(e,t,Hp(a),{accreditation:{includeNameAtEnd:!0}});return(0,i.jsx)("option",{"data-radio":s,disabled:!(!n.useIsBlocked||!t.isBlocked),value:t.id,children:o},t.id)})},a.id)}))}const iy=new WeakMap,ay=(e,t,n,i)=>{let a=iy.get(i);return a||(a=(async(e,t,n,i)=>{const a=await us();if("createdBy"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return _s("query Admins($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n usersInfos(isResourceCreator: true) {\n nodes {\n userId\n email\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},a);i.values=e.usersInfos.nodes.map(({userId:e,email:t,name:n})=>({id:e,name:`${h(n)?n:"-"} - ${t}`})),i.needLoading=!1}else if("categoryLeaders"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return _s('query DelegationsSegmentsCategoryLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(\n eventId: $eventId\n isDelegationCategoryLeader: true\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n id\n name\n }\n }\n }\n}\n',{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.values=e.usersInfos.nodes,i.needLoading=!1}else if("leaders"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return _s('query DelegationsSegmentsLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n usersInfos(\n eventId: $eventId\n isDelegationLeader: true\n sort: { attribute: "Name", direction: Asc }\n ) {\n nodes {\n id\n name\n }\n }\n }\n}\n',{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.values=e.usersInfos.nodes,i.needLoading=!1}else if("delegationCategory"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return _s("query VolunteersSegmentsDelegationsCategories(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n delegationsCategories(level: $level, eventId: $eventId) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:i.eventId?nt.Event:nt.Organization,eventId:i.eventId},a);i.values=(0,mo.A)(e.delegationsCategories.nodes,e=>m(e.name)),i.needLoading=!1}else if("roles"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return _s("query UsersSegmentsRoles($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n roles {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},a);i.values=(0,mo.A)(e.roles,e=>m(e.name)),i.needLoading=!1}else if("tag"===i.slug&&i.organizationId){const{organization:e}=await function(e,t){return _s("query Tags($organizationId: OrganizationId!, $eventId: EventId, $context: TagContext) {\n organization(id: $organizationId) {\n tags(eventId: $eventId, context: $context) {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId,context:i.tagContext},a);i.values=(0,mo.A)(e.tags.nodes,e=>m(e.name)),i.needLoading=!1}else if(i.slug===hm.CustomField&&i.organizationId){const{organization:e}=await Cs({organizationId:i.organizationId,eventId:i.eventId},a);i.values=(0,mo.A)(e.customFields.nodes,e=>m(e.name)),i.needLoading=!1}else if(i.slug===hm.VolunteersSegment&&i.organizationId){const{organization:e}=await function(e,t){return _s("query WorkflowsSegmentsSegments(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n volunteersSegmentsFolders: segmentsFolders(\n level: $level\n eventId: $eventId\n segmentType: Volunteers\n ) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n\n delegationsSegmentsFolders: segmentsFolders(\n level: $level\n eventId: $eventId\n segmentType: Delegations\n ) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:i.eventId?nt.Event:nt.Organization,eventId:i.eventId},a),t=(e,t)=>(0,mo.A)(t,e=>e.index).map(t=>({name:`${e} - ${t.name}`,values:(0,mo.A)(t.segments,e=>e.index)}));i.valuesGroups=t(n.translate("membres_11310"),e.volunteersSegmentsFolders).concat(t(n.translate("d_l_gations_78318"),e.delegationsSegmentsFolders)),i.needLoading=!1}else if(i.eventId){if(["preassignedPosition","position","wishedPositions"].includes(i.slug)){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsPositions($eventId: EventId!) {\n event(id: $eventId) {\n positions {\n nodes {\n id\n name\n acronym\n positionCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(Object.entries((0,Zd.A)(e.positions.nodes,e=>e.positionCategoryName)).map(([e,t])=>({name:t[0].positionCategoryName,values:(0,mo.A)(t.map(e=>({id:e.id,name:`${nu(e)} - ${e.positionCategoryName}`})),e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("hasOtherEventPosition"===i.slug&&i.organizationId){const{organization:{positions:e}}=await function(e,t){return _s("query VolunteersSegmentsOtherPositions($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n positions(excludedEventId: $eventId) {\n nodes {\n id\n name\n positionCategoryName\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(Object.entries((0,Zd.A)(e.nodes,e=>[e.event.id,e.positionCategoryName])).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].positionCategoryName}`,values:(0,mo.A)(t,e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if(["numberOfAssignments","positionSlotId","wishedPositionsSlots","checkInAtPositionSlot","checkOutAtPositionSlot"].includes(i.slug)){const{event:e}=await Os({eventId:i.eventId},a);i.valuesGroups=function(e,t){return(0,mo.A)(t,e=>m(e.name)).flatMap(t=>(0,mo.A)(t.positions,e=>m(e.name)).map(n=>({id:n.id,name:`${t.name} - ${nu(n)}`,values:(0,mo.A)(n.slots,e=>[e.range.start.toMillis(),e.name]).map(t=>{const i=tu(e,t,nu(n),{position:{includeNameAtEnd:!0}});return{id:t.id,name:i}})})))}(t,e.positionsCategories),i.needLoading=!1}else if(["positionCategory","preassignedPositionCategory","wishedPositionsCategories"].includes(i.slug)){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsPositionsCategories($eventId: EventId!) {\n event(id: $eventId) {\n positionsCategories {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,mo.A)(e.positionsCategories,e=>m(e.name)),i.needLoading=!1}else if("wishedSlotsCustom"===i.slug){const{event:t}=await function(e,t){return _s("query VolunteeersSegmentsCustomSlotsPeriods($eventId: EventId!) {\n event(id: $eventId) {\n startAt\n endAt\n ranges\n\n customSlotsPeriods {\n name\n startDate\n endDate\n\n customSlots {\n name\n startTime\n endTime\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=((e,t)=>{const n=t.customSlotsPeriods.flatMap(e=>U_(e.startDate??t.startAt,e.endDate??t.endAt,e.customSlots,t.ranges,jt.AllDays));return(0,mo.A)(Object.values((0,Zd.A)(n,({interval:e})=>e.start.startOf("day").toMillis())),e=>e[0].interval.start.startOf("day").toMillis()).map(t=>{const n=t[0].interval;return{name:e.toLocaleString(n.start.startOf("day"),Ya.DateOnly.WeekdayLongMonthLong),values:t.map(({name:e,interval:t})=>({id:t.toISO(),name:B_(e,t)}))}})})(e,t),i.needLoading=!1}else if(i.slug==um.AccreditationProfile||i.slug===um.WishedAccreditationProfile){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsAccreditationsProfiles($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n acronym\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(e.accreditationsProfilesCategories,e=>m(e.name)).map(e=>({name:e.name,values:(0,mo.A)(e.accreditationsProfiles,e=>m(e.name)).map(t=>({id:t.id,name:`${Hp(t)} - ${e.name}`}))})),i.needLoading=!1}else if("accreditation"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsAccreditations($eventId: EventId!) {\n event(id: $eventId) {\n accreditations {\n nodes {\n id\n name\n acronym\n accreditationCategoryName\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(Object.entries((0,Zd.A)(e.accreditations.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:t[0].accreditationCategoryName,values:(0,mo.A)(t.map(e=>({id:e.id,name:`${Hp(e)} - ${e.accreditationCategoryName}`})),e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("hasOtherEventAccreditation"===i.slug&&i.organizationId){const{organization:{accreditations:e}}=await function(e,t){return _s("query VolunteersSegmentsOtherAccreditations($organizationId: OrganizationId!, $eventId: EventId!) {\n organization(id: $organizationId) {\n accreditations(excludedEventId: $eventId) {\n nodes {\n id\n name\n accreditationCategoryName\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(Object.entries((0,Zd.A)(e.nodes,e=>e.accreditationCategoryName)).map(([e,t])=>({name:`${t[0].event.name}: ${t[0].accreditationCategoryName}`,values:(0,mo.A)(t,e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("accreditationCategory"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsAccreditationsCategories($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsCategories {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,mo.A)(e.accreditationsCategories,e=>m(e.name)),i.needLoading=!1}else if("positionsSegments"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsPositionsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Positions) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,mo.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("accreditationsSegments"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsAccreditationsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Accreditations) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,mo.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("delegationsSegments"===i.slug||"isDelegationLeader"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsDelegationsSegments($eventId: EventId!) {\n event(id: $eventId) {\n segmentsFolders(segmentType: Delegations) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.valuesGroups=(0,mo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,mo.A)(e.segments,e=>e.index)})),i.needLoading=!1}else if("forms"===i.slug||"form"===i.slug||"formsInsertedAt"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsForms($eventId: EventId!) {\n event(id: $eventId) {\n forms {\n nodes {\n ...SegmentForm\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.SegmentFormFragment]})}({eventId:i.eventId},a);i.values=(0,mo.A)(e.forms.nodes,e=>m(e.name)),i.needLoading=!1}else if("campaign"===i.slug||"campaignReply"===i.slug||"campaignSentAt"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsCampaigns($eventId: EventId!) {\n event(id: $eventId) {\n campaigns(states: [Done, Scheduled, Template]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.SegmentCampaignFragment]})}({eventId:i.eventId},a);i.campaigns=(0,mo.A)(e.campaigns.nodes,e=>m(e.name)),i.values=i.campaigns,i.needLoading=!1}else if("delegation"===i.slug){const{event:e}=await function(e,t){return _s("query VolunteersSegmentsDelegations($eventId: EventId!) {\n event(id: $eventId) {\n delegations {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,mo.A)(e.delegations.nodes,e=>m(e.name)),i.needLoading=!1}else if(["numberOfAccreditations","accreditationSlotId","scannedAccreditationsSlots","wishedAccreditationsSlots"].includes(i.slug)){const{event:t}=await Ds({eventId:i.eventId,loadIsBlocked:!1},a);i.valuesGroups=function(e,t){return(0,mo.A)(t,e=>m(e.name)).flatMap(t=>Xp(t.accreditations).map(n=>{const i=cu(n.slots);return{id:n.id,name:`${t.name} - ${Hp(n)}`,values:i.map(t=>{const i=du(e,t,Hp(n),{accreditation:{includeNameAtEnd:!0}});return{id:t.id,name:i}})}}))}(e,t.accreditationsCategories),i.needLoading=!1}else if(i.slug===um.WeezaccessChecklists){const{event:e}=await function(e,t){return _s("query VolunteersWeezaccessChecklists($eventId: EventId!) {\n event(id: $eventId) {\n weezaccessChecklists {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,mo.A)(e.weezaccessChecklists,e=>m(e.name)),i.needLoading=!1}else if("commentWrittenBy"===i.slug){const{organization:e}=await function(e,t){return _s("query VolunteersSegmentsLeaders($organizationId: OrganizationId!, $eventId: EventId) {\n organization(id: $organizationId) {\n admins: usersInfos(isResourceCreator: true) {\n nodes {\n id\n nameOrEmail\n }\n }\n\n usersInfos(eventId: $eventId, hasRole: true) {\n nodes {\n id\n nameOrEmail\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,eventId:i.eventId},a);i.values=(0,mo.A)((0,_r.A)(e.admins.nodes.concat(e.usersInfos.nodes),e=>e.id),e=>m(e.nameOrEmail)).map(({id:e,nameOrEmail:t})=>({id:e,name:t})),i.needLoading=!1}else if(i.slug===qu.DelegationsSpaceLayout){const{event:e}=await function(e,t){return _s("query DelegationsSegmentsLayouts($eventId: EventId!) {\n event(id: $eventId) {\n delegationsSpaceLayouts {\n id\n name\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:i.eventId},a);i.values=(0,mo.A)(e.delegationsSpaceLayouts,e=>m(e.name)),i.needLoading=!1}}else if(i.organizationId)if("event"===i.slug){const{organization:e}=await function(e,t){return _s("query UsersSegmentsEvents($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n events {\n nodes {\n ...SegmentEvent\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.SegmentEventFragment]})}({organizationId:i.organizationId},a);i.values=(0,mo.A)(e.events.nodes,e=>m(e.name)),i.needLoading=!1}else if("forms"===i.slug||"formsInsertedAt"===i.slug){const{organization:e}=await function(e,t){return _s("query UsersSegmentsForms($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n forms(level: Organization) {\n nodes {\n ...SegmentForm\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.SegmentFormFragment]})}({organizationId:i.organizationId},a);i.values=(0,mo.A)(e.forms.nodes,e=>m(e.name)),i.needLoading=!1}else if("campaign"===i.slug){const{organization:e}=await function(e,t){return _s("query UsersSegmentsCampaigns($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n campaigns(level: Organization, states: [Done, Scheduled, Template]) {\n nodes {\n ...SegmentCampaign\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.SegmentCampaignFragment]})}({organizationId:i.organizationId},a);i.campaigns=(0,mo.A)(e.campaigns.nodes,e=>m(e.name)),i.values=i.campaigns,i.needLoading=!1}else if("positionCustomField"===i.slug||"accreditationCustomField"===i.slug){const{organization:e}=await Cs({organizationId:i.organizationId,eventId:i.eventId,fieldTypes:[ze.Checkbox,ze.Select]},a);i.values=(0,mo.A)(e.customFields.nodes,e=>m(e.name)),i.needLoading=!1}else if("delegation"===i.slug){const{organization:e}=await function(e,t){return _s("query UsersSegmentsDelegations($organizationId: OrganizationId!) {\n organization(id: $organizationId) {\n name\n\n delegations(level: Both) {\n nodes {\n id\n name\n\n event {\n id\n name\n }\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId},a);i.valuesGroups=(0,mo.A)(Object.entries((0,Zd.A)(e.delegations.nodes,e=>e.event?.id||-1)).map(([t,n])=>({name:n[0].event?.name??e.name,values:(0,mo.A)(n,e=>m(e.name))})),({name:e})=>m(e)),i.needLoading=!1}else if("usersSegments"===i.slug){const{organization:e}=await function(e,t){return _s("query VolunteersSegmentsUsersSegments(\n $organizationId: OrganizationId!\n $level: OrganizationEventLevel!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n segmentsFolders(level: $level, eventId: $eventId, segmentType: Volunteers) {\n id\n name\n index\n\n segments {\n id\n name\n index\n }\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({organizationId:i.organizationId,level:nt.Organization},a);i.valuesGroups=(0,mo.A)(e.segmentsFolders,e=>e.index).map(e=>({name:e.name,values:(0,mo.A)(e.segments,e=>e.index)})),i.needLoading=!1}})(e,t,n,i).finally(()=>{iy.delete(i)}),iy.set(i,a)),a};function sy(e){const t=bi(gl),n=bi(Wd),i=bi(Si),[a,s]=(0,l.useState)(!1);return(0,l.useEffect)(()=>{e.needLoading&&(s(!0),ay(t,n,i,e).then(()=>{s(!1)}))},[e.needLoading]),a}const oy={boxShadow:"$xs",color:"$gray800"},ry=e=>{const t=bi(Nu);return e.filterPredicate.filter.needLoading?(0,i.jsx)(jf,{color:"white",css:oy,leftIcon:"loader"}):e.isReadOnly?(0,i.jsx)(jf,{color:"white",css:oy,cursor:"default",ellipsis:!0,children:t.filterPredicateToText(e.filterPredicate)}):(0,i.jsx)(jf,{color:"white",css:oy,cursor:"pointer",ellipsis:!0,rightIcon:"xmark",onContentClick:()=>e.onClick(e.filterPredicate),onRightIconClick:()=>e.onRemove(e.filterPredicate),children:t.filterPredicateToText(e.filterPredicate)})},ly=e=>{const t=Ai();return(0,i.jsx)($i,{color:"gray800",css:{textTransform:"uppercase",whiteSpace:"nowrap"},fontSize:"textXs",fontWeight:"medium",children:e.operator===pt.Or?t("Or"):t("And")})},dy=e=>(0,i.jsx)($,{align:"center",css:{background:"$gray100",borderRadius:"$1",maxWidth:"100%",minWidth:0,padding:"$1 $2"},gap:"2",wrap:"wrap",children:e.group.filtersPredicates.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[n>0&&(0,i.jsx)(ly,{operator:e.group.operator}),(0,i.jsx)(ry,{filterPredicate:t,isReadOnly:e.isReadOnly,onClick:e.onClick,onRemove:e.onRemove})]},t.predicateIndex))}),cy=e=>{const t=Ai(),{filtersPredicates:n,clearNameCursors:a,setPredicates:s,setIsFilterOpen:o,setSelectedFilterPredicate:r,predicates:d}=ty(),c=(0,l.useMemo)(()=>$u(n),[n]),u=(0,l.useMemo)(()=>(0,_r.A)(c,({filter:e})=>e.slug),[c]),m=(0,l.useCallback)(()=>{a(),s({operator:pt.And,groups:[]})},[a,s]),g=(0,l.useCallback)(({groupIndex:e,predicateIndex:t})=>{r({groupIndex:e,predicateIndex:t}),o(!0)},[o,r]),h=(0,l.useCallback)(({groupIndex:e,predicateIndex:t})=>{a(),s(Cu(d,e,t))},[d,a,s]);return function(e){const t=bi(gl),n=bi(Wd),i=bi(Si),[a,s]=(0,l.useState)(!1);(0,l.useEffect)(()=>{const a=e.filter(({filter:e})=>e.needLoading);F(a)&&(s(!0),Promise.all(a.map(({filter:e})=>ay(t,n,i,e))).then(()=>{s(!1)}))},[e])}(u),F(c)?(0,i.jsxs)($,{align:"center",gap:"2",width:1,wrap:"wrap",children:[n.groups.map((t,a)=>(0,i.jsxs)(l.Fragment,{children:[a>0&&(0,i.jsx)(ly,{operator:n.operator}),(0,i.jsx)(dy,{group:t,isReadOnly:e.isReadOnly,onClick:g,onRemove:h})]},t.groupIndex)),!e.isReadOnly&&(0,i.jsx)($i,{color:"gray700",css:{cursor:"pointer",marginLeft:"$1"},fontWeight:"medium",onClick:m,children:t("r_initialiser_l_66835")})]}):null};function uy(){return(0,l.useMemo)(()=>navigator.platform.toLowerCase().startsWith("mac"),[])}const my=e=>{const{translate:t}=zg(),{columnsSearch:n,setColumnsSearch:a}=ty(),[s,o]=(0,l.useState)(""),r=(0,l.useMemo)(()=>h(s)?e.searchableColumns.filter(e=>m(e.name).includes(m(s))):e.searchableColumns,[e.searchableColumns,s]);return(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"white",css:{borderLeft:"none",borderBottomLeftRadius:"0",borderTopLeftRadius:"0"},leftIcon:"bars-filter"})}),(0,i.jsx)(Fp,{css:{padding:"0"},maxHeight:350,placement:"bottom-end",width:320,children:(0,i.jsxs)($,{css:{padding:"$4 $6"},direction:"column",gap:"3",children:[(0,i.jsx)($i,{font:"gray800 textMd medium",children:t("rechercher_sur_85243")}),(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:t("filtrer_78031"),state:"search",value:s,onChange:o}),(0,i.jsx)($,{direction:"column",gap:"3",children:r.map(({slug:e,name:t})=>(0,i.jsx)(Bf,{state:n.includes(e)?"checked":"unchecked",onClick:t=>{a(B(n,e,"checked"===t))},children:t},e))})]})})]})},gy=e=>{const t=Ai(),{isEditMode:n,massActions:a,name:s,possibleColumns:o,possibleRenderings:r,rendering:d,setAreColumnsOpen:c,setIsEditMode:u,setIsFilterOpen:m,setName:g,setNameDebounced:h,setRendering:p,setSelectedFilterPredicate:f}=ty(),I=uy(),_=e.showActions&&!!e.actions&&a.numberOfSelected>0,x=(0,l.useMemo)(()=>(0,mo.A)(o.filter(e=>e.isSearchable),e=>e.name),[o]),y=(0,l.useMemo)(()=>e.showSearchColumns?{"& .h-styled-input-container":{borderBottomRightRadius:"0",borderTopRightRadius:"0"}}:{},[e.showSearchColumns]);return function(e,t){const n=uy(),i=(0,l.useCallback)(e=>{"e"===e.key&&(n&&e.metaKey||!n&&e.ctrlKey)&&t(e)},["e",t]);(0,l.useEffect)(()=>(document.addEventListener("keydown",i,!1),()=>{document.removeEventListener("keydown",i,!1)}),["e",t,i])}(0,(0,l.useCallback)(()=>{e.showEditMode&&u(!n)},[n,e.showEditMode,u])),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsxs)($,{width:320,children:[(0,i.jsx)(Ih,{autoFocus:!0,css:y,icon:"magnifying-glass",placeholder:e.searchPlaceholder??t("rechercher_50038"),value:s,onChange:e=>{g(e),h(e)}}),e.showSearchColumns&&(0,i.jsx)(my,{searchableColumns:x})]}),_?(0,i.jsx)($,{css:{flex:"1",justifyContent:"right"},gap:"4",children:e.actions}):(0,i.jsxs)($,{css:{flex:"1"},gap:"4",children:[e.showFilters&&(0,i.jsx)(ga,{color:"gray",leftIcon:"bars-filter",onClick:()=>{f(null),m(!0)},children:t("filtres_64574")}),(0,i.jsx)($i,{css:{flex:"1"}}),e.controls,F(r)&&(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"white",leftIcon:Br(d),children:Vr(t,d)})}),(0,i.jsx)(Fp,{placement:"bottom-end",children:r.map(e=>(0,i.jsx)(zp,{icon:Br(e),onClick:()=>p(e),children:Vr(t,e)},e))})]}),e.showEditColumns&&(0,i.jsx)(ga,{color:"white",leftIcon:"gear",onClick:()=>{c(!0)},children:t("_diter_les_colo_39630")}),e.showEditMode&&(0,i.jsx)(Df,{"aria-keyshortcuts":(I?"Meta":"Control")+"+E",value:n,onChange:u,children:t("mode_dition_93778")})]})]})},hy=e=>{const t=Ai(),{massActions:n}=ty(),a=(0,l.useCallback)(()=>{n.toggleSelectAll("unchecked"),n.setIsAllSelected(!1)},[n]),s=(0,l.useCallback)(()=>{n.setIsAllSelected(!0)},[n]);return(0,i.jsxs)($,{align:"center",css:{background:"$gray50",borderRadius:"$1",padding:"$3 $4"},gap:"3",children:[(0,i.jsx)($i,{fontSize:"textMd",fontWeight:"medium",children:(0,i.jsx)(ra,{icon:"circle-exclamation"})}),(0,i.jsx)($i,{color:"gray700",css:{flex:"1"},fontWeight:"medium",children:n.isAllSelected?e.allSelectedText:e.pageSelectedText}),n.isAllSelected?(0,i.jsx)($i,{color:"primary500",css:{cursor:"pointer"},fontWeight:"medium",onClick:a,children:t("effacer_la_s_le_85095")}):(0,i.jsx)($i,{color:"primary500",css:{cursor:"pointer"},fontWeight:"medium",onClick:s,children:e.selectAllText})]})},py=e=>{const{limit:t,massActions:n,reload:a,showMassActions:s,totalCount:o}=ty(),r=s&&e.showSelectAll&&n.numberOfSelected===t&&o>t;return(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$1",borderTopRightRadius:"$1",padding:"$3 $4"},direction:"column",gap:"4",width:1,children:[(0,i.jsx)(gy,{actions:e.renderActions?.(n,o,a),controls:e.renderControls?.(),showActions:s,showEditColumns:e.showEditColumns??!1,showEditMode:e.showEditMode??!1,showFilters:e.showFilters??!1,showSearchColumns:e.showSearchColumns??!1}),e.showPredicatesBadges&&(0,i.jsx)(cy,{isReadOnly:!e.showFilters}),r&&(0,i.jsx)(hy,{allSelectedText:e.renderAllSelectedText?.(o)??"",pageSelectedText:e.renderPageSelectedText?.(t)??"",selectAllText:e.renderSelectAllText?.(o)??""})]})};var fy=n(3627),Iy=n(4979);const _y=e=>{const{setNodeRef:t,style:n,handleProps:a}=function(e){const{attributes:t,isDragging:n,listeners:i,setActivatorNodeRef:a,setNodeRef:s,transform:o,transition:r}=(0,fy.gl)({id:e,data:void 0});return{handleProps:{ref:a,...t,...i},isDragging:n,setNodeRef:s,style:{position:"relative",transform:Iy.Ks.Translate.toString(o),transition:r,zIndex:n?1:void 0}}}(e.column.slug);return(0,i.jsxs)($,{ref:t,css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",padding:"$4"},gap:"4",style:n,children:[(0,i.jsx)($i,{color:"gray300",css:{cursor:"grab"},...a,children:(0,i.jsx)(ra,{icon:"grip-vertical",iconStyle:"solid"})}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{color:"gray800",css:{ellipsis:!0},title:e.column.name,width:1,children:e.column.name}),h(e.column.label)&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},title:e.column.label,width:1,children:e.column.label})]}),(0,i.jsx)(Rf,{value:e.column.isSelected,onChange:e.onToggle})]})},xy=({children:e,css:t,onClose:n,returnToFallback:a,size:s})=>{const o=Ri(),r=()=>{n?n():o.goBack(a??ig.HOME)};return xa(r),ya("common-front/src/designSystem/components/rightPanels/__deprecated/rightPanel.tsx","common-front/src/designSystem/components/rightPanels/base/rightPanel.tsx"),(0,_a.createPortal)((0,i.jsx)($,{css:{background:"rgba(52, 64, 84, 0.7)",height:"100%",left:0,position:"absolute",top:0,width:"100%",zIndex:"100",...t},"data-testid":"right-panel-backdrop",onClick:r,children:(0,i.jsxs)($,{css:{background:"white",height:"100%",position:"absolute",right:"0",top:"0",width:"sm"===s?"480px":"650px"},"data-testid":"right-panel-body",direction:"column",onClick:e=>Ia(e,!1),children:[(0,i.jsx)($i,{color:"gray500",css:{cursor:"pointer",fontSize:"$textMd",position:"absolute",right:"$space$6",top:"$space$6"},onClick:r,children:(0,i.jsx)("i",{className:"far fa-xmark"})}),e]})}),document.body)},yy=l.forwardRef((e,t)=>(0,i.jsx)($,{ref:t,css:{flex:"1",overflowY:"auto",px:"$6",...e.css},direction:"column",children:e.children}));yy.displayName="RightPanelBody";const Sy=e=>(0,i.jsx)($i,{color:"gray800",css:{borderTop:"1px solid $gray200",px:"$6",py:"$4"},children:e.children});var jy=n(3375),vy=n(8831);const by=[vy.FN,vy.Mk],Ay=e=>{const t=(0,jy.FR)((0,jy.MS)(jy.AN,{activationConstraint:{distance:4}}),(0,jy.MS)(jy.uN,{coordinateGetter:fy.JR})),n=(0,l.useCallback)(({active:t,over:n})=>{if(n&&t.id!==n.id){const i=e.ids.indexOf(t.id),a=e.ids.indexOf(n.id);-1!==i&&-1!==a&&e.onReorder(i,a)}},[e.ids,e.onReorder]);return(0,i.jsx)(jy.Mp,{collisionDetection:jy.fp,modifiers:by,sensors:t,onDragEnd:n,children:(0,i.jsx)(fy.gB,{items:e.ids,strategy:fy._G,children:e.children})})},Cy=e=>{const t=Ai(),[n,a]=(0,l.useState)(""),[s,o]=(0,l.useState)((0,mo.A)(e.columns.map(t=>({...t,isSelected:e.initialSelectedColumns.includes(t.slug)})),[({slug:t})=>{const n=e.initialSelectedColumns.indexOf(t);return-1===n?e.columns.length:n},({name:e})=>e])),r=e=>{if(h(n)){const t=m(n);return m(e.name).includes(t)||h(e.label)&&m(e.label).includes(t)}return!0},d=s.filter(r).map(e=>e.slug);return(0,i.jsxs)(xy,{css:e.css,size:"sm",onClose:e.onClose,children:[(0,i.jsxs)(yy,{children:[(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($i,{color:"gray900",fontSize:"textXl",children:e.title}),(0,i.jsx)($i,{color:"gray500",children:e.subtitle}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:e.searchPlaceholder,value:n,onChange:a}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($i,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_champ_00325")}),(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)(Ay,{ids:d,onReorder:(e,t)=>{const n=s.map(e=>e.slug);o(function(e,t,n){const i=[...e],[a]=i.splice(t,1);return i.splice(n,0,a),i}(s,n.indexOf(d[e]),n.indexOf(d[t])))},children:(0,i.jsx)($,{direction:"column",gap:"2",children:s.map((e,t)=>r(e)?(0,i.jsx)(_y,{column:e,onToggle:()=>{((e,t)=>{o((0,sx.jM)(n=>{n[t].isSelected=!e.isSelected}))})(e,t)}},e.slug):null)})}),(0,i.jsx)(Hg,{height:"6"})]}),(0,i.jsx)(Sy,{children:(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(ga,{onClick:()=>{e.onSave(s.filter(e=>e.isSelected).map(e=>e.slug)),e.onClose()},children:e.saveButtonText}),(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})};var Ey=n(903);const Ty=["isLeader","isPositionLeader","isPositionCategoryLeader","isDelegationLeader"],My=[ht.IsInLast,ht.IsMoreThanAgo,ht.IsInNext,ht.IsMoreThanAhead],Ry=[ht.Is,ht.IsNot,ht.GreaterThan,ht.GreaterThanEqual,ht.LessThan,ht.LessThanEqual];function Dy(e){const{slug:t,fieldType:n}=e;if("condition"===t)return"condition";if(Ty.includes(t))return"leader";if("isAdmin"===t)return"admin";if("privacy"===t)return"privacy";if("isTeam"===t)return"team";if("wishedPositions"===t||"wishedPositionsCategories"===t)return"wishedPositions";if("numberOfAssignmentsPerDay"===t||"volunteersMinutesDays"===t)return"numberPerDay";if("campaignReply"===t)return"campaignReply";switch(n){case Ue.Address:case Ue.Text:case Ue.Textarea:return"text";case Ue.Country:case Ue.Language:case Ue.Nationality:case Ue.Select:case Ue.Sex:return"select";case Ue.Checkbox:case Ue.Validation:return"checkbox";case Ue.Phone:return"phone";case Ue.Number:return"number";case Ue.DateTimeRange:return"dateTimeRange";case Ue.Date:return"date";case Ue.Datetime:return"datetime";case Ue.File:return"file";case Ue.Campaign:return"campaign";default:return"unknown"}}function Oy(e){return"numberOfAccreditations"===e||"numberOfAssignments"===e}function wy(e){const t=e.slug,n=(e,n)=>({slug:t,operator:e,...n});switch(Dy(e)){case"condition":case"leader":case"select":return n(ht.Is,{value:[]});case"admin":case"privacy":case"team":case"unknown":return n(ht.Is,{value:""});case"file":return n(ht.IsEmpty,{value:""});case"wishedPositions":return n(ht.Is,{value:[],value2:1});case"numberPerDay":return n(ht.Is,{value:"",value2:"",value3:""});case"campaignReply":return n(ht.Contains,{value:[],value2:""});case"campaign":return n(ht.Is,{value:[],value2:[]});case"text":case"phone":return n(e.isEncrypted?ht.IsEmpty:ht.Contains,{value:""});case"checkbox":return n(ht.Is,{value:!0});case"number":return n(ht.Is,{value:"",value2:"",value3:Oy(t)?[]:"",value4:""});case"dateTimeRange":return n(ht.Contains,{value:"",value2:""});case"date":return Du(n(ht.Is,{value:"",value2:"",value3:Mu(t)?[]:void 0,valueDate:{day:-1,month:-1,year:-1}}));case"datetime":return n(ht.Is,{value:"",value2:""})}}function Py(e){return null!==fl(e)}function $y(e){return Number.isInteger(e)&&e>=0}function ky(e){return"number"==typeof e}function Ny(e){return null==e||""===e}function zy(e,t,n){return Ry.includes(e.operator)?ky(t):e.operator!==ht.Between||ky(t)&&ky(n)}function Ly(e,t){const{operator:n,value:i,value2:a,value3:s,value4:o}=t;switch(Dy(e)){case"condition":return n===ht.Is||n===ht.IsNot||F(i);case"leader":return n!==ht.Contains||F(i);case"select":return n!==ht.Is&&n!==ht.IsNot||F(i);case"admin":case"privacy":case"team":case"file":case"checkbox":return!0;case"wishedPositions":return F(i)||n===ht.IsEmpty||n===ht.IsNotEmpty;case"numberPerDay":return Py(i)&&(Ry.includes(n)||n===ht.Between)&&zy(t,a,s);case"campaignReply":return F(i)&&(n===ht.Contains&&h(a)||n===ht.IsEmpty||n===ht.IsNotEmpty);case"campaign":return F(i)&&F(a);case"text":case"phone":return n!==ht.Contains&&n!==ht.NotContains||h(i);case"number":return(Oy(e.slug)||Ny(s)&&Ny(o)||Py(s)&&Py(o))&&zy(t,i,a);case"dateTimeRange":return Py(i)&&([ht.Contains,ht.NotContains,ht.Is].includes(n)||Py(a));case"date":{const n=Ru(t);return function(e){const{operator:t,value:n,value2:i,valueDate:a}=e;return t===ht.Is||t===ht.IsNot?[a?.day,a?.month,a?.year].some(e=>"number"==typeof e&&-1!==e):t===ht.IsBefore||t===ht.IsAfter?Py(n):t===ht.Between?Py(n)&&Py(i):!My.includes(t)||$y(n)}(n)&&(!Mu(e.slug)||F(n.value3))}case"datetime":return function(e){const{operator:t,value:n,value2:i}=e;return[ht.Is,ht.IsNot,ht.IsBefore,ht.IsAfter].includes(t)?Py(n):t===ht.Between?Py(n)&&Py(i):!My.includes(t)||$y(n)}(t);case"unknown":return!1}}const Fy=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.value??[]),[s,o]=(0,l.useState)(e.filterPredicate.predicate?.value2??[]),r=e.filterPredicate.filter.campaigns??[],d=(0,$a.A)(r.filter(({id:e})=>n.includes(e)).map(({campaignType:e})=>e)),c=(0,$a.A)(["NotSent",...d.includes(re.Email)?kn.filter(e=>e!==Ce.Queued):[],...d.includes(re.Sms)?di:[]]),u={operator:ht.Is,value:n,value2:s,slug:e.filterPredicate.filter.slug},m=Ly(e.filterPredicate.filter,u);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:n,onChange:a,children:r.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_62901"),values:s,onChange:o,children:c.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!m,onClick:()=>{e.onAdd(u)},children:t("ajouter_le_filt_54222")})})]})},Uy=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.value??[]),[s,o]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Contains),[r,d]=(0,l.useState)(e.filterPredicate.predicate?.value2??[]),c=e.filterPredicate.filter.campaigns??[],u={operator:s,value:n,value2:r,slug:e.filterPredicate.filter.slug},m=Ly(e.filterPredicate.filter,u);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:n,onChange:a,children:c.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),n.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"contains"===s?"checked":"unchecked",onClick:()=>o(ht.Contains),children:t("contient_34012")}),"contains"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!m,onClick:()=>{e.onAdd(u)},children:t("ajouter_le_filt_54222")})})]})},By=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),[s,o]=(0,l.useState)(e.filterPredicate.predicate?.value??!0);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsxs)(YI,{shouldParseAsBoolean:!0,value:s,onChange:o,children:[(0,i.jsx)("option",{value:"true",children:t("true")}),(0,i.jsx)("option",{value:"false",children:t("false")})]})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsxs)(YI,{shouldParseAsBoolean:!0,value:s,onChange:o,children:[(0,i.jsx)("option",{value:"true",children:t("true")}),(0,i.jsx)("option",{value:"false",children:t("false")})]})]}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{e.onAdd({operator:n,value:s,slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Vy=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=e.filterPredicate.filter.values??[],[o,r]=(0,l.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),d={operator:n,value:o,slug:e.filterPredicate.filter.slug},c=Ly(e.filterPredicate.filter,d);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("champ_dont_un_a_44854")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("champ_d_pendant_33676")}),s.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("d_pends_du_cham_39787")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s.map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))})]}),(0,i.jsx)(Hg,{height:"1"})]})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!c,onClick:()=>{e.onAdd(d)},children:t("ajouter_le_filt_54222")})})]})},Gy=[ht.IsInLast,ht.IsMoreThanAgo,ht.IsInNext,ht.IsMoreThanAhead],Wy=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:e.operator===e.relativeOperator?"checked":"unchecked",onClick:()=>e.setOperator(e.relativeOperator),children:e.label}),e.operator===e.relativeOperator&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{align:"center",children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:e.days,onChange:e.setDays})]}),(0,i.jsx)(Hg,{height:"1"})]})]});var qy=n(3551);const Yy=e=>{const t=Ai(),n=bi(gl),a=(0,l.useMemo)(()=>wa.c9.now().startOf("year"),[]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsxs)(YI,{shouldParseAsInt:!0,value:e.value.day,onChange:t=>{e.setValue({...e.value,day:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("jour_74089")}),(0,Fd.A)(1,32).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsxs)(YI,{shouldParseAsInt:!0,value:e.value.month,onChange:t=>{e.setValue({...e.value,month:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("mois_10165")}),(0,Fd.A)(1,13).map(e=>{const t=n.toLocaleString(a.set({month:e}),{month:"long"});return(0,i.jsx)("option",{value:e,children:t},e)})]})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsxs)(YI,{shouldParseAsInt:!0,value:e.value.year,onChange:t=>{e.setValue({...e.value,year:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("ann_e_38546")}),(0,qy.A)(1900,a.year+2).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]})]}),(0,i.jsx)(Hg,{height:"1"})]})},Hy=e=>{const t=Ai(),n=Mu(e.filterPredicate.filter.slug),a=e.filterPredicate.predicate?Ru(e.filterPredicate.predicate):void 0,s=(0,l.useMemo)(()=>(e.filterPredicate.filter.values||[]).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e)),[e.filterPredicate.filter]),[o,r]=(0,l.useState)(n?a?.value3??[]:[]),[d,c]=(0,l.useState)(a?.operator??ht.Is),[u,m]=(0,l.useState)(fl(a?.value)||""),[g,h]=(0,l.useState)(fl(a?.value2)||""),[p,f]=(0,l.useState)(a?.valueDate??{day:-1,month:-1,year:-1}),[I,_]=(0,l.useState)(Gy.includes(d)?a?.value??"":""),x=Gy.includes(d),y=Du({operator:d,value:x?I:u,value2:x?"":g,value3:n?o:void 0,valueDate:p,slug:e.filterPredicate.filter.slug}),S=Ly(e.filterPredicate.filter,y);return(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:"campaignSentAt"===e.filterPredicate.filter.slug?t("s_lectionner_un_28439"):t("s_lectionner_un_13356"),values:o,onChange:r,children:s}),(0,i.jsx)(Hg,{height:"3"})]}),(!n||o.length>0)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===d?"checked":"unchecked",onClick:()=>c(ht.Is),children:t("est_25967")}),"is"===d&&(0,i.jsx)(Yy,{setValue:f,value:p}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===d?"checked":"unchecked",onClick:()=>c(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===d&&(0,i.jsx)(Yy,{setValue:f,value:p}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isBefore"===d?"checked":"unchecked",onClick:()=>c(ht.IsBefore),children:t("est_avant_le_16689")}),"isBefore"===d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:u,onChange:m})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isAfter"===d?"checked":"unchecked",onClick:()=>c(ht.IsAfter),children:t("est_apr_s_le_79703")}),"isAfter"===d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:u,onChange:m})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"between"===d?"checked":"unchecked",onClick:()=>c(ht.Between),children:t("est_entre_born_59665")}),"between"===d&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:u,onChange:m}),(0,i.jsx)(Hg,{width:"3"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:g,onChange:h})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Wy,{days:I,label:t("est_dans_les_n_05750"),operator:d,relativeOperator:ht.IsInLast,setDays:_,setOperator:c}),(0,i.jsx)(Wy,{days:I,label:t("est_il_y_a_plus_04600"),operator:d,relativeOperator:ht.IsMoreThanAgo,setDays:_,setOperator:c}),(0,i.jsx)(Wy,{days:I,label:t("est_dans_les_n_72234"),operator:d,relativeOperator:ht.IsInNext,setDays:_,setOperator:c}),(0,i.jsx)(Wy,{days:I,label:t("est_dans_plus_d_94311"),operator:d,relativeOperator:ht.IsMoreThanAhead,setDays:_,setOperator:c}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"today"===d?"checked":"unchecked",onClick:()=>c(ht.Today),children:t("est_aujourd_hui_82571")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"thisDayMonth"===d?"checked":"unchecked",onClick:()=>c(ht.ThisDayMonth),children:t("est_aujourd_hui_70881")}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===d?"checked":"unchecked",onClick:()=>c(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===d?"checked":"unchecked",onClick:()=>c(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!S,onClick:()=>{e.onAdd(y)},children:t("ajouter_le_filt_54222")})})]})},Zy=e=>{const t=Ai(),n=(0,l.useMemo)(()=>e.filterPredicate.filter.useLocalZone?Za():void 0,[e.filterPredicate]),[a,s]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),[o,r]=(0,l.useState)(fl(e.filterPredicate.predicate?.value)||""),[d,c]=(0,l.useState)(fl(e.filterPredicate.predicate?.value2)||""),[u,m]=(0,l.useState)(Gy.includes(a)?e.filterPredicate.predicate?.value??"":""),g=Gy.includes(a),h={operator:a,value:g?u:o,value2:g?"":d,slug:e.filterPredicate.filter.slug},p=Ly(e.filterPredicate.filter,h);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===a?"checked":"unchecked",onClick:()=>s(ht.Is),children:t("est_25967")}),"is"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:o,onChange:r})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===a?"checked":"unchecked",onClick:()=>s(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:o,onChange:r})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isBefore"===a?"checked":"unchecked",onClick:()=>s(ht.IsBefore),children:t("est_avant_le_16689")}),"isBefore"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{value:o,zone:n,onChange:r})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isAfter"===a?"checked":"unchecked",onClick:()=>s(ht.IsAfter),children:t("est_apr_s_le_79703")}),"isAfter"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{value:o,zone:n,onChange:r})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"between"===a?"checked":"unchecked",onClick:()=>s(ht.Between),children:t("est_entre_born_59665")}),"between"===a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{value:o,zone:n,onChange:r})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{value:d,zone:n,onChange:c})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Wy,{days:u,label:t("est_dans_les_n_05750"),operator:a,relativeOperator:ht.IsInLast,setDays:m,setOperator:s}),(0,i.jsx)(Wy,{days:u,label:t("est_il_y_a_plus_04600"),operator:a,relativeOperator:ht.IsMoreThanAgo,setDays:m,setOperator:s}),(0,i.jsx)(Wy,{days:u,label:t("est_dans_les_n_72234"),operator:a,relativeOperator:ht.IsInNext,setDays:m,setOperator:s}),(0,i.jsx)(Wy,{days:u,label:t("est_dans_plus_d_94311"),operator:a,relativeOperator:ht.IsMoreThanAhead,setDays:m,setOperator:s}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"today"===a?"checked":"unchecked",onClick:()=>s(ht.Today),children:t("est_aujourd_hui_82571")}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===a?"checked":"unchecked",onClick:()=>s(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===a?"checked":"unchecked",onClick:()=>s(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!p,onClick:()=>{e.onAdd(h)},children:t("ajouter_le_filt_54222")})})]})},Ky=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Contains),[s,o]=(0,l.useState)(e.filterPredicate.predicate?.value??""),[r,d]=(0,l.useState)(e.filterPredicate.predicate?.value2??""),c={operator:n,value:s,value2:r,slug:e.filterPredicate.filter.slug},u=Ly(e.filterPredicate.filter,c);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("contient_34012")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("contient_date_89885")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o})]})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"notContains"===n?"checked":"unchecked",onClick:()=>a(ht.NotContains),children:t("ne_contient_pas_85399")}),"notContains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"overlaps"===n?"checked":"unchecked",onClick:()=>a(ht.Overlaps),children:t("chevauche_49445")}),"overlaps"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"notOverlaps"===n?"checked":"unchecked",onClick:()=>a(ht.NotOverlaps),children:t("ne_chevauche_pa_17307")}),"notOverlaps"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"engulfs"===n?"checked":"unchecked",onClick:()=>a(ht.Engulfs),children:t("engloutis_42346")}),"engulfs"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"notEngulfs"===n?"checked":"unchecked",onClick:()=>a(ht.NotEngulfs),children:t("n_engloutis_pas_42363")}),"notEngulfs"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"engulfedBy"===n?"checked":"unchecked",onClick:()=>a(ht.EngulfedBy),children:t("est_englouti_pa_47852")}),"engulfedBy"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"notEngulfedBy"===n?"checked":"unchecked",onClick:()=>a(ht.NotEngulfedBy),children:t("n_est_pas_englo_08733")}),"notEngulfedBy"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("d_but_41840"),value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(qf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,placeholder:t("fin_60104"),value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!u,onClick:()=>{e.onAdd(c)},children:t("ajouter_le_filt_54222")})})]})},Qy=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.IsEmpty);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Xy=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_administrat_15766")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_admin_58612")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},Jy=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=(0,l.useMemo)(()=>ku(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[o,r]=(0,l.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),d={operator:n,value:o,slug:e.filterPredicate.filter.slug},c=Ly(e.filterPredicate.filter,d),u=(0,l.useMemo)(()=>Array.isArray(o)?o.length:0,[o]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_responsable_47377")}),(0,i.jsx)(Hg,{height:"3"}),"isDelegationLeader"===e.filterPredicate.filter.slug&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("est_responsable_00281")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(VI,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"})]}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_respo_55625")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!c,onClick:()=>{e.onAdd(d)},children:t("ajouter_le_filt_54222")})})]})},eS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_inscrit_en_86193")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_inscr_25311")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},tS=e=>{const t=Ai(),n="numberOfAccreditations"===e.filterPredicate.filter.slug,a="numberOfAssignments"===e.filterPredicate.filter.slug,[s,o]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),[r,d]=(0,l.useState)(e.filterPredicate.predicate?.value??""),[c,u]=(0,l.useState)(e.filterPredicate.predicate?.value2??""),[m,g]=(0,l.useState)(fl(e.filterPredicate.predicate?.value3)||""),[h,p]=(0,l.useState)(fl(e.filterPredicate.predicate?.value4)||""),[f,I]=(0,l.useState)(wa.c9.isDateTime(m)&&m.isValid&&wa.c9.isDateTime(h)&&h.isValid?"checked":"unchecked"),[_,x]=(0,l.useState)(!n||U(e.filterPredicate.predicate?.value3)),[y,S]=(0,l.useState)(n&&F(e.filterPredicate.predicate?.value3)?e.filterPredicate.predicate?.value3:[]),[j,v]=(0,l.useState)(!a||U(e.filterPredicate.predicate?.value3)),[b,A]=(0,l.useState)(a&&F(e.filterPredicate.predicate?.value3)?e.filterPredicate.predicate?.value3:[]),C={operator:s,value:r,value2:c,value3:n?y:a?b:"checked"===f?m:"",value4:"checked"===f?h:"",slug:e.filterPredicate.filter.slug},E=Ly(e.filterPredicate.filter,C);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===s?"checked":"unchecked",onClick:()=>o(ht.Is),children:t("est_25967")}),"is"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===s?"checked":"unchecked",onClick:()=>o(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"greaterThan"===s?"checked":"unchecked",onClick:()=>o(ht.GreaterThan),children:t("plus_grand_que_28412")}),"greaterThan"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"greaterThanEqual"===s?"checked":"unchecked",onClick:()=>o(ht.GreaterThanEqual),children:t("_gal_ou_plus_gr_76897")}),"greaterThanEqual"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"lessThan"===s?"checked":"unchecked",onClick:()=>o(ht.LessThan),children:t("plus_petit_que_35846")}),"lessThan"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"lessThanEqual"===s?"checked":"unchecked",onClick:()=>o(ht.LessThanEqual),children:t("_gal_ou_plus_pe_38400")}),"lessThanEqual"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"between"===s?"checked":"unchecked",onClick:()=>o(ht.Between),children:t("est_entre_born_59665")}),"between"===s&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d}),(0,i.jsx)(Hg,{width:"3"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:c,onChange:u})]}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===s?"checked":"unchecked",onClick:()=>o(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),"numberOfAssignmentsDays"===e.filterPredicate.filter.slug&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(RI,{height:"3"}),(0,i.jsx)(Bf,{state:f,onClick:I,children:t("filtrer_sur_une_06420")}),"checked"===f&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:m,onChange:g}),(0,i.jsx)(Gf,{max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:h,onChange:p})]})]})]}),n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$2",background:"$gray50",padding:"$5 $6"},direction:"column",gap:"2",children:[(0,i.jsx)($i,{font:"gray900 textSm medium",children:t("le_filtre_se_ba_92445")}),(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(hf,{state:_?"checked":"unchecked",onClick:()=>x(!0),children:t("sur_toutes_les_40684")}),(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(hf,{state:_?"unchecked":"checked",onClick:()=>x(!1),children:t("sur_certaines_a_13180")}),!_&&(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,values:y,onChange:S,children:ku(e.filterPredicate.filter,t)})})]})]})]})]}),a&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$2",background:"$gray50",padding:"$5 $6"},direction:"column",gap:"2",children:[(0,i.jsx)($i,{font:"gray900 textSm medium",children:t("le_filtre_se_ba_92445")}),(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(hf,{state:j?"checked":"unchecked",onClick:()=>v(!0),children:t("sur_toutes_les_97037")}),(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(hf,{state:j?"unchecked":"checked",onClick:()=>v(!1),children:t("sur_certaines_m_74733")}),!j&&(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,values:b,onChange:A,children:ku(e.filterPredicate.filter,t)})})]})]})]})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!E,onClick:()=>{e.onAdd(C)},children:t("ajouter_le_filt_54222")})})]})},nS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),[s,o]=(0,l.useState)(e.filterPredicate.predicate?.value??""),[r,d]=(0,l.useState)(e.filterPredicate.predicate?.value2??""),[c,u]=(0,l.useState)(e.filterPredicate.predicate?.value3??""),m={operator:n,value:s,value2:r,value3:c,slug:e.filterPredicate.filter.slug},g=Ly(e.filterPredicate.filter,m);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gf,{label:t("jour_d_affectat_27334"),max:e.filterPredicate.filter.endAt,min:e.filterPredicate.filter.startAt,value:s,onChange:o}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(hh,{children:e.filterPredicate.filter.name}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"greaterThan"===n?"checked":"unchecked",onClick:()=>a(ht.GreaterThan),children:t("plus_grand_que_28412")}),"greaterThan"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"greaterThanEqual"===n?"checked":"unchecked",onClick:()=>a(ht.GreaterThanEqual),children:t("_gal_ou_plus_gr_76897")}),"greaterThanEqual"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"lessThan"===n?"checked":"unchecked",onClick:()=>a(ht.LessThan),children:t("plus_petit_que_35846")}),"lessThan"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"lessThanEqual"===n?"checked":"unchecked",onClick:()=>a(ht.LessThanEqual),children:t("_gal_ou_plus_pe_38400")}),"lessThanEqual"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,value:r,onChange:d})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"between"===n?"checked":"unchecked",onClick:()=>a(ht.Between),children:t("est_entre_born_59665")}),"between"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:r,onChange:d}),(0,i.jsx)(Hg,{width:"3"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:c,onChange:u})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!g,onClick:()=>{e.onAdd(m)},children:t("ajouter_le_filt_54222")})})]})},iS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("Public")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("Private")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:()=>{e.onAdd({operator:n,value:"",slug:e.filterPredicate.filter.slug})},children:t("ajouter_le_filt_54222")})})]})},aS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=(0,l.useMemo)(()=>ku(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[o,r]=(0,l.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),d={operator:n,value:o,slug:e.filterPredicate.filter.slug},c=Ly(e.filterPredicate.filter,d),u=(0,l.useMemo)(()=>Array.isArray(o)?o.length:0,[o]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(VI,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(VI,{hint:t("_1_s_lectionn_51286",u),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!c,onClick:()=>{e.onAdd(d)},children:t("ajouter_le_filt_54222")})})]})},sS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??(e.filterPredicate.filter.isEncrypted?ht.IsEmpty:ht.Contains)),[s,o]=(0,l.useState)(e.filterPredicate.predicate?.value??""),r={operator:n,value:s,slug:e.filterPredicate.filter.slug},d=Ly(e.filterPredicate.filter,r);return(0,i.jsxs)(i.Fragment,{children:[!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsx)(hf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("contient_34012")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"notContains"===n?"checked":"unchecked",onClick:()=>a(ht.NotContains),children:t("ne_contient_pas_85399")})]}),"notContains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"startsWith"===n?"checked":"unchecked",onClick:()=>a(ht.StartsWith),children:t("commence_par_11056")})]}),"startsWith"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.isEncrypted&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"endsWith"===n?"checked":"unchecked",onClick:()=>a(ht.EndsWith),children:t("finit_par_79657")})]}),"endsWith"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{value:s,onChange:o})]}),(0,i.jsx)(Hg,{height:"1"})]}),!0!==e.filterPredicate.filter.hideEmpty&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")})]}),e.showIsValid&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isValid"===n?"checked":"unchecked",onClick:()=>a(ht.IsValid),children:t("est_valide_72630")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotValid"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotValid),children:t("n_est_pas_valid_75405")})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!d,onClick:()=>{e.onAdd(r)},children:t("ajouter_le_filt_54222")})})]})},oS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.filterPredicate.predicate?.operator??ht.Is),s=(0,l.useMemo)(()=>ku(e.filterPredicate.filter,t),[e.filterPredicate.filter]),[o,r]=(0,l.useState)(F(e.filterPredicate.predicate?.value)?e.filterPredicate.predicate.value:[]),[d,c]=(0,l.useState)(e.filterPredicate.predicate?.value2??1),u={operator:n,value:o,value2:d,slug:e.filterPredicate.filter.slug},m=Ly(e.filterPredicate.filter,u);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:"is"===n?"checked":"unchecked",onClick:()=>a(ht.Is),children:t("est_25967")}),"is"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNot"===n?"checked":"unchecked",onClick:()=>a(ht.IsNot),children:t("n_est_pas_97826")}),"isNot"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"contains"===n?"checked":"unchecked",onClick:()=>a(ht.Contains),children:t("est_le_choix_07450")}),"contains"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:d,onChange:c})]}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)($,{children:[(0,i.jsx)(Hg,{width:"6"}),(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:o,onChange:r,children:s})]}),(0,i.jsx)(Hg,{height:"1"})]}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsEmpty),children:t("est_vide_96759")}),(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:"isNotEmpty"===n?"checked":"unchecked",onClick:()=>a(ht.IsNotEmpty),children:t("n_est_pas_vide_45804")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{disabled:!m,onClick:()=>{e.onAdd(u)},children:t("ajouter_le_filt_54222")})})]})},rS=e=>{const t=Ai(),n=sy(e.filterPredicate.filter),a=(()=>{const{filterPredicate:t,onAdd:n}=e;switch(Dy(t.filter)){case"condition":return(0,i.jsx)(Vy,{filterPredicate:t,onAdd:n});case"leader":return(0,i.jsx)(Jy,{filterPredicate:t,onAdd:n});case"admin":return(0,i.jsx)(Xy,{filterPredicate:t,onAdd:n});case"privacy":return(0,i.jsx)(iS,{filterPredicate:t,onAdd:n});case"team":return(0,i.jsx)(eS,{filterPredicate:t,onAdd:n});case"wishedPositions":return(0,i.jsx)(oS,{filterPredicate:t,onAdd:n});case"numberPerDay":return(0,i.jsx)(nS,{filterPredicate:t,onAdd:n});case"campaignReply":return(0,i.jsx)(Uy,{filterPredicate:t,onAdd:n});case"text":return(0,i.jsx)(sS,{filterPredicate:t,showIsValid:!1,onAdd:n});case"phone":return(0,i.jsx)(sS,{filterPredicate:t,showIsValid:!0,onAdd:n});case"select":return(0,i.jsx)(aS,{filterPredicate:t,onAdd:n});case"checkbox":return(0,i.jsx)(By,{filterPredicate:t,onAdd:n});case"number":return(0,i.jsx)(tS,{filterPredicate:t,onAdd:n});case"dateTimeRange":return(0,i.jsx)(Ky,{filterPredicate:t,onAdd:n});case"date":return(0,i.jsx)(Hy,{filterPredicate:t,onAdd:n});case"datetime":return(0,i.jsx)(Zy,{filterPredicate:t,onAdd:n});case"file":return(0,i.jsx)(Qy,{filterPredicate:t,onAdd:n});case"campaign":return(0,i.jsx)(Fy,{filterPredicate:t,onAdd:n});case"unknown":return(0,i.jsx)("div",{children:"TODO"})}})();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{color:"$gray500",cursor:"pointer",fontSize:"$textXs",fontWeight:"$semiBold"},gap:"3",onClick:e.onBack,children:[(0,i.jsx)("i",{className:"fa-regular fa-arrow-left"}),t("retour_la_lis_63860")]}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e.filterPredicate.filter.name}),(0,i.jsx)(Hg,{height:"3"}),n?(0,i.jsx)(da,{}):a]})};function lS(e){switch(e){case Ue.Address:return"map-location";case Ue.Text:case Ue.Textarea:return"text";case Ue.Checkbox:return"square-check";case Ue.Validation:return"check";case Ue.Select:return"list-ul";case Ue.Date:return"calendar";case Ue.Datetime:return"calendar-day";case Ue.Time:return"clock";case Ue.File:return"file";case Ue.Phone:return"phone";case Ue.Language:return"language";case Ue.Number:return"00";case Ue.Sex:return"venus-mars";case Ue.Nationality:case Ue.Country:return"flag";case Ue.DateTimeRange:return"calendar-range";case Ue.Campaign:return"paper-plane";default:return tr()}}const dS=e=>{const t=(0,l.useMemo)(()=>(0,$a.A)(e.filtersPredicates.map(({filter:e})=>e.category)),[e.filtersPredicates]),n=(0,l.useMemo)(()=>(0,Zd.A)(e.filtersPredicates,({filter:e})=>e.category),[e.filtersPredicates]);return(0,i.jsx)($,{css:{border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs",px:"$4"},direction:"column",children:t.map((t,a)=>{const s=n[t];return(0,i.jsxs)(l.Fragment,{children:[!e.isEdit&&(0,i.jsxs)(i.Fragment,{children:[0!==a&&(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)($i,{css:{paddingBottom:"$2",paddingTop:"$3"},font:"gray500 textXs semiBold",children:t})]}),s.map(t=>{const{filter:n}=t;return(0,i.jsxs)($,{align:"center",css:{py:"$2"},gap:"3",children:[(0,i.jsx)($,{align:"center",css:{borderRadius:"$1",height:"32px",width:"32px"},justify:"center",children:(0,i.jsx)(ra,{icon:lS(n.fieldType)})}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{color:"gray900",css:{ellipsis:!0},fontWeight:"medium",title:n.name,width:1,children:n.name}),h(n.label)&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},title:n.label,width:1,children:n.label})]}),e.isEdit?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ga,{color:"white",leftIcon:"pen",size:"sm",onClick:()=>e.onEdit(t)}),(0,i.jsx)(ga,{color:"white",leftIcon:"trash-can",size:"sm",onClick:()=>e.onDelete(n.slug)})]}):(0,i.jsx)(ga,{color:"white",leftIcon:"plus",size:"sm",onClick:()=>e.onAdd(t)})]},n.slug)})]},a)})})},cS=e=>{const t=Ai(),[n,a]=(0,l.useState)(e.selectedFilterPredicate),[s,o]=(0,l.useState)((0,Ey.A)(e.predicates)),r=(0,l.useCallback)(e=>{o((0,sx.jM)(t=>{const n=t.findIndex(t=>t.slug===e.slug);-1===n?t.push(e):t[n]=e})),a(null)},[o,a]),d=(0,l.useCallback)(e=>{o((0,sx.jM)(t=>{const n=t.findIndex(t=>t.slug===e);t.splice(n,1)}))},[o]),[c,u]=(0,l.useState)(""),[g,p]=function(e,t,n){const i=[],a=[];for(const s of t)if(!h(n)||m(s.name).includes(m(n))||h(s.label)&&m(s.label).includes(m(n))){const t=e.find(({slug:e})=>e===s.slug);t?i.push({filter:s,predicate:t}):a.push({filter:s,predicate:t})}return[i,a]}(s,e.possibleFilters,c);return(0,i.jsxs)(xy,{size:"sm",onClose:e.onClose,children:[(0,i.jsxs)(yy,{children:[(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($i,{color:"gray900",fontSize:"textXl",children:t("filtres_64574")}),h(e.subtitle)&&(0,i.jsx)($i,{color:"gray500",children:e.subtitle}),(0,i.jsx)(Hg,{height:"6"}),n?(0,i.jsx)(rS,{filterPredicate:n,onAdd:r,onBack:()=>{a(null)}}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:t("rechercher_un_f_22061"),value:c,onChange:u}),(0,i.jsx)(Hg,{height:"6"}),s.length>0&&g.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_filtr_29511")}),(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)(dS,{filtersPredicates:g,isEdit:!0,onDelete:d,onEdit:e=>a(e)}),(0,i.jsx)(Hg,{height:"8"})]}),(0,i.jsx)($i,{color:"gray900",fontSize:"textMd",fontWeight:"semiBold",children:t("liste_des_filtr_37728")}),p.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)(dS,{filtersPredicates:p,isEdit:!1,onAdd:e=>{a(e)}})]})]}),(0,i.jsx)(Hg,{height:"6"})]}),null===n&&(0,i.jsx)(Sy,{children:(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(ga,{onClick:()=>{e.onFilter(s),e.onClose()},children:e.buttonText||t("filtrer_78031")}),(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})})]})},uS=l.forwardRef(({shouldLightDismiss:e=!0,initialOpen:t=!1,isOpen:n,setIsOpen:a,onClose:s,children:o,...r},d)=>{const[c,u]=l.useState(t),m=l.useRef(null),g=n??c,h=a??u;return l.useEffect(()=>{const e=m.current;return g?function(e){e&&!e.open&&e.showModal()}(e):e?.close(),()=>{e?.close()}},[g]),l.useEffect(()=>{const t=m.current;function n(e){e.preventDefault(),e.stopPropagation(),r.onClose?.(),h(!1)}function i(e){const{target:t}=e;t instanceof Element&&"DIALOG"===t.nodeName&&n(e)}function a(e){"Escape"===e.code&&n(e)}return e&&t?.addEventListener("click",i),t?.addEventListener("keydown",a),()=>{e&&t?.removeEventListener("click",i),t?.removeEventListener("keydown",a)}},[e,h]),l.useImperativeHandle(d,()=>({close(){h(!1)},showModal(){h(!0)},isOpen:()=>g,addEventListener(e,t,n){m.current?.addEventListener(e,t,n)},removeEventListener(e,t,n){m.current?.removeEventListener(e,t,n)}}),[g,h]),(0,i.jsxs)(i.Fragment,{children:[false,(0,i.jsx)("dialog",{ref:m,"aria-describedby":r["aria-describedby"],"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],style:r.style,onClose:s,...r["aria-description"]?{"aria-description":r["aria-description"]}:{},children:o})]})});uS.displayName="Dialog";const mS=({children:e,labelId:t,isOpen:n,size:a,setIsOpen:s,...o})=>{const r=vh();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,i.jsx)(uS,{"aria-labelledby":t,"data-testid":"right-panel-body",isOpen:n,setIsOpen:s,style:{maxHeight:"none",maxWidth:"none",margin:"0 0 0 0",marginInlineStart:r?"auto":"0",height:"100%",border:"none",inlineSize:r?"sm"===a?"480px":"690px":"100%",top:0,padding:0},onClose:o.onClose,children:(0,i.jsx)($,{align:"center",css:{background:"$gray50",boxShadow:"$shadowsXl",blockSize:"100%",flex:1},direction:"column",...o,children:e})})]})},gS=({heading:e,id:t,leftIcon:n,leftIconColor:a,leftIconBorder:s,setIsOpen:o,...r})=>(0,i.jsxs)($,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)($,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[n&&(0,i.jsx)($,{align:"center",css:{border:s},justify:"center",children:(0,i.jsx)(cf,{color:a,icon:n})}),(0,i.jsx)($,{css:{alignItems:"flex-start",flex:1},direction:"column",id:t,justify:"center",children:e})]}),(0,i.jsx)($,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,i.jsx)(ga,{color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>o(!1),children:(0,i.jsx)("i",{className:"far fa-xmark"})})}),r.children]}),hS=e=>(0,i.jsx)($,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),pS=e=>(0,i.jsx)($,{as:"footer",css:{alignSelf:"stretch",background:"$white",borderBlockStart:"1px solid $gray200",marginBlockStart:"auto",padding:"$4 $6"},gap:"3",justify:"end",children:e.children});function fS(e){return{...e,groups:e.groups.map(e=>({...e,key:e.key??ns(),predicates:e.predicates.map(e=>({...e,key:e.key??ns()}))}))}}function IS(e){return e.key}const _S=e=>{const{setIsOpen:t}=Dp();return(0,i.jsxs)(zI,{isCheckbox:!1,isRadio:!1,isSelected:!1,value:e.filter.slug,onClick:()=>{e.onSelect(e.filter),t(!1)},children:[e.filter.name,h(e.filter.label)&&(0,i.jsxs)($i,{as:"span",color:"gray500",css:{marginLeft:"$1"},fontSize:"textXs",children:["(",e.filter.label,")"]})]})},xS=e=>{const t=Ai(),[n,a]=(0,l.useState)(""),s=(0,l.useMemo)(()=>{const t=m(n),i=h(n)?e.filters.filter(e=>m(e.name).includes(t)||h(e.label)&&m(e.label).includes(t)):e.filters;return Object.entries((0,Zd.A)(i,e=>e.category))},[e.filters,n]);return(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"invisible",css:{paddingInline:0},leftIcon:"plus",children:e.text})}),(0,i.jsx)(Fp,{css:{padding:0},placement:e.placement??"bottom-start",width:560,children:(0,i.jsxs)($,{css:{padding:"$2"},direction:"column",gap:"3",width:1,children:[(0,i.jsx)(Ih,{autoFocus:!0,icon:"magnifying-glass",placeholder:t("rechercher_un_f_22061"),value:n,onChange:a}),(0,i.jsx)($i,{css:{maxHeight:"360px",overflowY:"auto"},children:s.map(([t,n],s)=>(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)($I,{index:s,children:t}),n.map(t=>(0,i.jsx)(_S,{filter:t,onSelect:t=>{a(""),e.onSelect(t)}},t.slug))]},t))})]})})]})},yS=e=>{const t=Ai(),n=e.filter.campaigns??[],a=Array.isArray(e.predicate.value)?e.predicate.value:[],s=Array.isArray(e.predicate.value2)?e.predicate.value2:[],o=(0,$a.A)(n.filter(({id:e})=>a.includes(e)).map(({campaignType:e})=>e)),r=(0,$a.A)(["NotSent",...o.includes(re.Email)?kn.filter(e=>e!==Ce.Queued):[],...o.includes(re.Sms)?di:[]]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:a,onChange:t=>{e.onChange({...e.predicate,value:t})},children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),a.length>0&&(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_62901"),values:s,onChange:t=>{e.onChange({...e.predicate,value2:t})},children:r.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))})]})},SS=e=>(0,i.jsx)(YI,{value:e.value,onChange:t=>{e.onChange(t)},children:e.operators.map(({operator:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))}),jS=e=>{const t=Ai(),n=e.filter.campaigns??[],{operator:a,value2:s}=e.predicate,o=Array.isArray(e.predicate.value)?e.predicate.value:[],r=(0,l.useMemo)(()=>[{operator:ht.Contains,name:t("contient_34012")},{operator:ht.IsEmpty,name:t("est_vide_96759")},{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}],[t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_un_28439"),values:o,onChange:t=>{e.onChange({...e.predicate,value:t})},children:n.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),o.length>0&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:r,value:a,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),a===ht.Contains&&(0,i.jsx)(Ih,{value:s??"",onChange:t=>{e.onChange({...e.predicate,value2:t})}})]})]})},vS=[ht.Is,ht.IsNot],bS=e=>{const t=Ai(),n=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},!0!==e.filter.hideEmpty&&{operator:ht.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),vS.includes(e.predicate.operator)&&(0,i.jsxs)(YI,{shouldParseAsBoolean:!0,value:e.predicate.value??!0,onChange:t=>{e.onChange({...e.predicate,value:t})},children:[(0,i.jsx)("option",{value:"true",children:t("true")}),(0,i.jsx)("option",{value:"false",children:t("false")})]})]})},AS=e=>{const t=Ai(),n=e.filter.values??[],a=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("champ_dont_un_a_44854")},{operator:ht.IsNot,name:t("champ_d_pendant_33676")},F(e.filter.values)&&{operator:ht.Contains,name:t("d_pends_du_cham_39787")}]),[e.filter,t]),s=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:a,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),e.predicate.operator===ht.Contains&&(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:s,onChange:t=>{e.onChange({...e.predicate,value:t})},children:n.map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))})]})},CS=e=>{const t=Ai(),n=bi(gl),a=(0,l.useMemo)(()=>wa.c9.now().startOf("year"),[]);return(0,i.jsxs)($,{gap:"3",children:[(0,i.jsxs)(YI,{shouldParseAsInt:!0,value:e.value.day??-1,onChange:t=>{e.onChange({...e.value,day:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("jour_74089")}),(0,Fd.A)(1,32).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]}),(0,i.jsxs)(YI,{shouldParseAsInt:!0,value:e.value.month??-1,onChange:t=>{e.onChange({...e.value,month:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("mois_10165")}),(0,Fd.A)(1,13).map(e=>(0,i.jsx)("option",{value:e,children:n.toLocaleString(a.set({month:e}),{month:"long"})},e))]}),(0,i.jsxs)(YI,{shouldParseAsInt:!0,value:e.value.year??-1,onChange:t=>{e.onChange({...e.value,year:t})},children:[(0,i.jsx)("option",{value:"-1",children:t("ann_e_38546")}),(0,qy.A)(1900,a.year+2).map(e=>(0,i.jsx)("option",{value:e,children:e},e))]})]})};function ES(e){return My.includes(e)}function TS(e,t){return ES(e)===ES(t)?{operator:t}:{operator:t,value:"",value2:""}}function MS(e){return[{operator:ht.IsInLast,name:e("est_dans_les_n_05750")},{operator:ht.IsMoreThanAgo,name:e("est_il_y_a_plus_04600")},{operator:ht.IsInNext,name:e("est_dans_les_n_72234")},{operator:ht.IsMoreThanAhead,name:e("est_dans_plus_d_94311")}]}const RS={day:-1,month:-1,year:-1},DS=e=>{const t=Ai(),n=Mu(e.filter.slug),a=Ru(e.predicate),{operator:s,value:o,value2:r,value3:d,valueDate:c}=a,u=n&&Array.isArray(d)?d:[],m=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},{operator:ht.IsBefore,name:t("est_avant_le_16689")},{operator:ht.IsAfter,name:t("est_apr_s_le_79703")},{operator:ht.Between,name:t("est_entre_born_59665")},...MS(t),{operator:ht.Today,name:t("est_aujourd_hui_82571")},{operator:ht.ThisDayMonth,name:t("est_aujourd_hui_70881")},!0!==e.filter.hideEmpty&&{operator:ht.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),g=t=>{e.onChange(Du({...a,...t}))};return(0,i.jsxs)(i.Fragment,{children:[n&&(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:"campaignSentAt"===e.filter.slug?t("s_lectionner_un_28439"):t("s_lectionner_un_13356"),values:u,onChange:e=>{g({value3:e})},children:(e.filter.values||[]).map(({id:e,name:t})=>(0,i.jsx)("option",{value:e,children:t},e))}),(!n||u.length>0)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:m,value:s,onChange:e=>{g(TS(s,e))}}),(s===ht.Is||s===ht.IsNot)&&(0,i.jsx)(CS,{value:c??RS,onChange:e=>{g({valueDate:e})}}),(s===ht.IsBefore||s===ht.IsAfter)&&(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:o??"",onChange:e=>{g({value:e})}}),s===ht.Between&&(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:o??"",onChange:e=>{g({value:e})}}),(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:r??"",onChange:e=>{g({value2:e})}})]}),ES(s)&&(0,i.jsx)(Ih,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:o??"",onChange:e=>{g({value:e})}})]})]})},OS=e=>{const t=Ai(),{operator:n,value:a,value2:s}=e.predicate,o=(0,l.useMemo)(()=>e.filter.useLocalZone?Za():void 0,[e.filter]),r=e=>h(e)?wa.c9.fromISO(e,{zone:o||"UTC"}):e??"",d=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},{operator:ht.IsBefore,name:t("est_avant_le_16689")},{operator:ht.IsAfter,name:t("est_apr_s_le_79703")},{operator:ht.Between,name:t("est_entre_born_59665")},...MS(t),{operator:ht.Today,name:t("est_aujourd_hui_82571")},!0!==e.filter.hideEmpty&&{operator:ht.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),c=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:d,value:n,onChange:e=>{c(TS(n,e))}}),(n===ht.Is||n===ht.IsNot)&&(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:a??"",onChange:e=>{c({value:e})}}),(n===ht.IsBefore||n===ht.IsAfter)&&(0,i.jsx)(qf,{value:r(a),zone:o,onChange:e=>{c({value:e})}}),n===ht.Between&&(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(qf,{value:r(a),zone:o,onChange:e=>{c({value:e})}}),(0,i.jsx)(qf,{value:r(s),zone:o,onChange:e=>{c({value2:e})}})]}),ES(n)&&(0,i.jsx)(Ih,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:a??"",onChange:e=>{c({value:e})}})]})},wS=[ht.Contains,ht.NotContains],PS=[ht.Overlaps,ht.NotOverlaps,ht.Engulfs,ht.NotEngulfs,ht.EngulfedBy,ht.NotEngulfedBy],$S=e=>{const t=Ai(),{operator:n,value:a,value2:s}=e.predicate,o=(0,l.useMemo)(()=>[{operator:ht.Contains,name:t("contient_34012")},{operator:ht.Is,name:t("contient_date_89885")},{operator:ht.NotContains,name:t("ne_contient_pas_85399")},{operator:ht.Overlaps,name:t("chevauche_49445")},{operator:ht.NotOverlaps,name:t("ne_chevauche_pa_17307")},{operator:ht.Engulfs,name:t("engloutis_42346")},{operator:ht.NotEngulfs,name:t("n_engloutis_pas_42363")},{operator:ht.EngulfedBy,name:t("est_englouti_pa_47852")},{operator:ht.NotEngulfedBy,name:t("n_est_pas_englo_08733")}],[t]),r=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:o,value:n,onChange:e=>{r({operator:e})}}),wS.includes(n)&&(0,i.jsx)(qf,{max:e.filter.endAt,min:e.filter.startAt,value:a??"",onChange:e=>{r({value:e})}}),n===ht.Is&&(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:a??"",onChange:e=>{r({value:e})}}),PS.includes(n)&&(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(qf,{max:e.filter.endAt,min:e.filter.startAt,placeholder:t("d_but_41840"),value:a??"",onChange:e=>{r({value:e})}}),(0,i.jsx)(qf,{max:e.filter.endAt,min:e.filter.startAt,placeholder:t("fin_60104"),value:s??"",onChange:e=>{r({value2:e})}})]})]})},kS=e=>{const t=Ai(),n=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("est_responsable_47377")},"isDelegationLeader"===e.filter.slug&&{operator:ht.Contains,name:t("est_responsable_00281")},{operator:ht.IsNot,name:t("n_est_pas_respo_55625")}]),[e.filter,t]),a=(0,l.useMemo)(()=>ku(e.filter,t),[e.filter,t]),s=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),e.predicate.operator===ht.Contains&&(0,i.jsx)(VI,{hint:t("_1_s_lectionn_51286",s.length),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:s,onChange:t=>{e.onChange({...e.predicate,value:t})},children:a})]})},NS=e=>{const t=Ai(),[n,a]=(0,l.useState)(!F(e.value)),s=(0,l.useMemo)(()=>ku(e.filter,t),[e.filter,t]);return(0,i.jsxs)($,{css:{border:"1px solid $gray200",borderRadius:"$2",background:"$white",padding:"$4"},direction:"column",gap:"2",children:[(0,i.jsx)($i,{color:"gray900",fontSize:"textSm",fontWeight:"medium",children:t("le_filtre_se_ba_92445")}),(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(hf,{state:n?"checked":"unchecked",onClick:()=>{a(!0),e.onChange([])},children:e.allText}),(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)(hf,{state:n?"unchecked":"checked",onClick:()=>a(!1),children:e.someText}),!n&&(0,i.jsx)($,{css:{paddingLeft:"$6"},children:(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,values:e.value,onChange:e.onChange,children:s})})]})]})]})},zS=[ht.Is,ht.IsNot,ht.GreaterThan,ht.GreaterThanEqual,ht.LessThan,ht.LessThanEqual],LS=e=>null!==fl(e),FS=e=>{const t=Ai(),{slug:n}=e.filter,{operator:a,value:s,value2:o,value3:r,value4:d}=e.predicate,c=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},{operator:ht.GreaterThan,name:t("plus_grand_que_28412")},{operator:ht.GreaterThanEqual,name:t("_gal_ou_plus_gr_76897")},{operator:ht.LessThan,name:t("plus_petit_que_35846")},{operator:ht.LessThanEqual,name:t("_gal_ou_plus_pe_38400")},{operator:ht.Between,name:t("est_entre_born_59665")},!0!==e.filter.hideEmpty&&{operator:ht.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),[u,m]=(0,l.useState)(LS(r)&&LS(d)),g=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:c,value:a,onChange:e=>{g({operator:e})}}),zS.includes(a)&&(0,i.jsx)(Ih,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:e=>{g({value:e})}}),a===ht.Between&&(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(Ih,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:e=>{g({value:e})}}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:o??"",onChange:e=>{g({value2:e})}})]}),"numberOfAssignmentsDays"===n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Bf,{state:u?"checked":"unchecked",onClick:e=>{m("checked"===e),"checked"!==e&&g({value3:"",value4:""})},children:t("filtrer_sur_une_06420")}),u&&(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:r??"",onChange:e=>{g({value3:e})}}),(0,i.jsx)(Gf,{max:e.filter.endAt,min:e.filter.startAt,value:d??"",onChange:e=>{g({value4:e})}})]})]}),"numberOfAccreditations"===n&&(0,i.jsx)(NS,{allText:t("sur_toutes_les_40684"),filter:e.filter,someText:t("sur_certaines_a_13180"),value:Array.isArray(r)?r:[],onChange:e=>{g({value3:e})}}),"numberOfAssignments"===n&&(0,i.jsx)(NS,{allText:t("sur_toutes_les_97037"),filter:e.filter,someText:t("sur_certaines_m_74733"),value:Array.isArray(r)?r:[],onChange:e=>{g({value3:e})}})]})},US=e=>{const t=Ai(),{operator:n,value:a,value2:s,value3:o}=e.predicate,r=(0,l.useMemo)(()=>[{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},{operator:ht.GreaterThan,name:t("plus_grand_que_28412")},{operator:ht.GreaterThanEqual,name:t("_gal_ou_plus_gr_76897")},{operator:ht.LessThan,name:t("plus_petit_que_35846")},{operator:ht.LessThanEqual,name:t("_gal_ou_plus_pe_38400")},{operator:ht.Between,name:t("est_entre_born_59665")}],[t]),d=t=>{e.onChange({...e.predicate,...t})};return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Gf,{label:t("jour_d_affectat_27334"),max:e.filter.endAt,min:e.filter.startAt,value:a??"",onChange:e=>{d({value:e})}}),(0,i.jsx)(SS,{operators:r,value:n,onChange:e=>{d({operator:e})}}),(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:s??"",onChange:e=>{d({value2:e})}}),n===ht.Between&&(0,i.jsx)(Ih,{min:0,shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:o??"",onChange:e=>{d({value3:e})}})]})]})},BS=e=>{const t=Ai(),n=(0,l.useMemo)(()=>{switch(e.kind){case"admin":return[{operator:ht.Is,name:t("est_administrat_15766")},{operator:ht.IsNot,name:t("n_est_pas_admin_58612")}];case"privacy":return[{operator:ht.Is,name:t("Public")},{operator:ht.IsNot,name:t("Private")}];case"team":return[{operator:ht.Is,name:t("est_inscrit_en_86193")},{operator:ht.IsNot,name:t("n_est_pas_inscr_25311")}];case"file":return[{operator:ht.IsEmpty,name:t("est_vide_96759")},{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}]}},[e.kind,t]);return(0,i.jsx)(SS,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}})},VS=[ht.Is,ht.IsNot],GS=e=>{const t=Ai(),n=(0,l.useMemo)(()=>(0,go.A)([{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},!0!==e.filter.hideEmpty&&{operator:ht.IsEmpty,name:t("est_vide_96759")},!0!==e.filter.hideEmpty&&{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}]),[e.filter,t]),a=(0,l.useMemo)(()=>ku(e.filter,t),[e.filter,t]),s=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),VS.includes(e.predicate.operator)&&(0,i.jsx)(VI,{hint:t("_1_s_lectionn_51286",s.length),isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:s,onChange:t=>{e.onChange({...e.predicate,value:t})},children:a})]})},WS=[ht.Contains,ht.NotContains,ht.StartsWith,ht.EndsWith],qS=e=>{const t=Ai(),n=(0,l.useMemo)(()=>{const n=!0===e.filter.isEncrypted,i=!0!==e.filter.hideEmpty;return(0,go.A)([!n&&{operator:ht.Contains,name:t("contient_34012")},!n&&{operator:ht.NotContains,name:t("ne_contient_pas_85399")},!n&&{operator:ht.StartsWith,name:t("commence_par_11056")},!n&&{operator:ht.EndsWith,name:t("finit_par_79657")},i&&{operator:ht.IsEmpty,name:t("est_vide_96759")},i&&{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")},e.showIsValid&&{operator:ht.IsValid,name:t("est_valide_72630")},e.showIsValid&&{operator:ht.IsNotValid,name:t("n_est_pas_valid_75405")}])},[e.filter,e.showIsValid,t]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:n,value:e.predicate.operator,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),WS.includes(e.predicate.operator)&&(0,i.jsx)(Ih,{value:e.predicate.value??"",onChange:t=>{e.onChange({...e.predicate,value:t})}})]})},YS=[ht.Is,ht.IsNot,ht.Contains],HS=e=>{const t=Ai(),n=(0,l.useMemo)(()=>[{operator:ht.Is,name:t("est_25967")},{operator:ht.IsNot,name:t("n_est_pas_97826")},{operator:ht.Contains,name:t("est_le_choix_07450")},{operator:ht.IsEmpty,name:t("est_vide_96759")},{operator:ht.IsNotEmpty,name:t("n_est_pas_vide_45804")}],[t]),a=(0,l.useMemo)(()=>ku(e.filter,t),[e.filter,t]),{operator:s,value2:o}=e.predicate,r=Array.isArray(e.predicate.value)?e.predicate.value:[];return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SS,{operators:n,value:s,onChange:t=>{e.onChange({...e.predicate,operator:t})}}),s===ht.Contains&&(0,i.jsx)(Ih,{shouldParseAsInt:!0,treatIntNaNAsNull:!0,value:o??"",onChange:t=>{e.onChange({...e.predicate,value2:t})}}),YS.includes(s)&&(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,multiple:!0,placeholder:t("s_lectionner_de_52380"),values:r,onChange:t=>{e.onChange({...e.predicate,value:t})},children:a})]})},ZS=({filter:e,predicate:t,onChange:n})=>{const a=Dy(e);switch(a){case"text":case"phone":return(0,i.jsx)(qS,{filter:e,predicate:t,showIsValid:"phone"===a,onChange:n});case"select":return(0,i.jsx)(GS,{filter:e,predicate:t,onChange:n});case"checkbox":return(0,i.jsx)(bS,{filter:e,predicate:t,onChange:n});case"number":return(0,i.jsx)(FS,{filter:e,predicate:t,onChange:n});case"date":return(0,i.jsx)(DS,{filter:e,predicate:t,onChange:n});case"datetime":return(0,i.jsx)(OS,{filter:e,predicate:t,onChange:n});case"dateTimeRange":return(0,i.jsx)($S,{filter:e,predicate:t,onChange:n});case"condition":return(0,i.jsx)(AS,{filter:e,predicate:t,onChange:n});case"leader":return(0,i.jsx)(kS,{filter:e,predicate:t,onChange:n});case"admin":case"file":case"privacy":case"team":return(0,i.jsx)(BS,{kind:a,predicate:t,onChange:n});case"wishedPositions":return(0,i.jsx)(HS,{filter:e,predicate:t,onChange:n});case"numberPerDay":return(0,i.jsx)(US,{filter:e,predicate:t,onChange:n});case"campaign":return(0,i.jsx)(yS,{filter:e,predicate:t,onChange:n});case"campaignReply":return(0,i.jsx)(jS,{filter:e,predicate:t,onChange:n});case"unknown":return null}},KS=e=>{const t=Ai(),n=sy(e.filter),a=Ly(e.filter,e.predicate),s=(0,l.useRef)(null);return(0,l.useEffect)(()=>{if(e.isSelected&&!n){const e=requestAnimationFrame(()=>{s.current?.scrollIntoView({block:"center"})});return()=>{cancelAnimationFrame(e)}}return yh.A},[n]),(0,i.jsxs)($,{ref:s,css:{background:"$white",border:"1px solid "+(a?"$gray200":"$error500"),borderRadius:"$2",boxShadow:"$xs",overflow:"hidden"},direction:"column",width:1,children:[(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4"},gap:"4",width:1,children:[(0,i.jsx)($i,{color:"gray900",css:{flex:"1"},fontSize:"textSm",fontWeight:"semiBold",children:e.filter.name}),(0,i.jsx)(ga,{"aria-label":t("Supprimer le filtre"),color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onDelete})]}),(0,i.jsx)($,{css:{background:"$gray50",padding:"$3 $4"},direction:"column",gap:"4",width:1,children:n?(0,i.jsx)(da,{}):(0,i.jsx)(ZS,{filter:e.filter,predicate:e.predicate,onChange:e.onChange})})]})},QS=e=>{const t=Ai();return e.isFirst?(0,i.jsxs)(YI,{css:{width:"fit-content"},value:e.operator,onChange:e.onChange,children:[(0,i.jsx)("option",{value:pt.And,children:t("And")}),(0,i.jsx)("option",{value:pt.Or,children:t("Or")})]}):(0,i.jsx)($i,{color:"gray800",fontSize:"textSm",fontWeight:"medium",children:e.operator===pt.Or?t("Or"):t("And")})},XS=e=>{const t=Ai();return(0,i.jsxs)($,{css:{background:"$white",border:"1px solid $gray200",borderRadius:"$2",boxShadow:"$xs"},direction:"column",width:1,children:[(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4 $6"},gap:"4",width:1,children:[(0,i.jsxs)($i,{color:"gray900",css:{flex:"1"},fontSize:"textSm",fontWeight:"semiBold",children:[t("groupe_74342")," ",e.index+1]}),(0,i.jsx)(ga,{"aria-label":t("Supprimer le groupe"),color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onDelete})]}),(0,i.jsxs)($,{align:"start",css:{padding:"$4 $6"},direction:"column",gap:"4",width:1,children:[e.group.filtersPredicates.map(({filter:t,predicate:n,predicateIndex:a},s)=>(0,i.jsxs)(l.Fragment,{children:[s>0&&(0,i.jsx)(QS,{isFirst:1===s,operator:e.group.operator,onChange:e.onOperatorChange}),(0,i.jsx)(KS,{filter:t,isSelected:e.selectedFilterPredicate?.groupIndex===e.group.groupIndex&&e.selectedFilterPredicate.predicateIndex===a,predicate:n,onChange:t=>e.onChange(a,t),onDelete:()=>e.onDeletePredicate(a)})]},IS(n)??a)),(0,i.jsx)(xS,{filters:e.filters,text:t("Ajouter un filtre"),onSelect:e.onAdd})]})]})},JS="filters-v2-heading",ej=e=>{const t=Ai(),[n,a]=(0,l.useState)(()=>fS(e.predicates)),s=e=>a(t=>fS(e(t))),o=(0,l.useMemo)(()=>Pu(n,e.possibleFilters),[n,e.possibleFilters]),r=(0,l.useMemo)(()=>$u(o).every(({filter:e,predicate:t})=>Ly(e,t)),[o]),d=e=>s(t=>{return n=t,i=wy(e),{...n,groups:[...n.groups,{operator:pt.And,predicates:[i]}]};var n,i});return(0,i.jsxs)(mS,{isOpen:!0,labelId:JS,setIsOpen:t=>{t||e.onClose()},size:"md",children:[(0,i.jsx)(gS,{heading:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{color:"gray900",fontSize:"textLg",fontWeight:"semiBold",children:t("filtres_64574")}),h(e.subtitle)&&(0,i.jsx)($i,{color:"gray500",fontSize:"textSm",children:e.subtitle})]}),id:JS,leftIcon:"sliders",leftIconColor:"gray",setIsOpen:()=>e.onClose()}),(0,i.jsx)(hS,{css:{alignItems:"stretch",flex:"1"},children:0===o.groups.length?(0,i.jsxs)($,{align:"center",css:{background:"$white",border:"1px solid $gray200",borderRadius:"$2",boxShadow:"$xs",flex:"1",padding:"$6"},direction:"column",gap:"4",justify:"center",children:[(0,i.jsx)($i,{color:"gray800",fontSize:"textSm",children:t("Personnaliser votre liste en appliquant des filtres")}),(0,i.jsx)(xS,{filters:e.possibleFilters,placement:"bottom",text:t("Ajouter un filtre"),onSelect:d})]}):(0,i.jsxs)($,{align:"start",direction:"column",gap:"4",children:[o.groups.map((t,a)=>(0,i.jsxs)(l.Fragment,{children:[a>0&&(0,i.jsx)(QS,{isFirst:1===a,operator:n.operator,onChange:e=>s(t=>function(e,t){return{...e,operator:t}}(t,e))}),(0,i.jsx)(XS,{filters:e.possibleFilters,group:t,index:a,selectedFilterPredicate:e.selectedFilterPredicate,onAdd:e=>s(n=>{return i=n,a=t.groupIndex,s=wy(e),Au(i,a,e=>({...e,predicates:[...e.predicates,s]}));var i,a,s}),onChange:(e,n)=>s(i=>function(e,t,n,i){return Au(e,t,e=>({...e,predicates:e.predicates.map((e,t)=>t===n?i:e)}))}(i,t.groupIndex,e,n)),onDelete:()=>s(e=>Eu(e,t.groupIndex)),onDeletePredicate:e=>s(n=>Cu(n,t.groupIndex,e)),onOperatorChange:e=>s(n=>function(e,t,n){return Au(e,t,e=>({...e,operator:n}))}(n,t.groupIndex,e))})]},IS(n.groups[t.groupIndex])??t.groupIndex)),(0,i.jsx)(xS,{filters:e.possibleFilters,text:t("Ajouter un groupe de filtre"),onSelect:d})]})}),(0,i.jsxs)(pS,{children:[(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")}),(0,i.jsx)(ga,{disabled:!r,onClick:()=>{var t;e.onFilter((t=n,{...t,groups:t.groups.map(e=>({...(0,Oi.A)(e,"key"),predicates:e.predicates.map(e=>(0,Oi.A)(e,"key"))}))})),e.onClose()},children:e.buttonText||t("filtrer_78031")})]})]})},tj=e=>{const t=Ai(),{areColumnsOpen:n,clearNameCursors:a,columns:s,filtersPredicates:o,isFilterOpen:r,possibleColumns:d,predicates:c,selectedFilterPredicate:u,setAreColumnsOpen:m,setColumns:g,setIsFilterOpen:h,setPredicates:p}=ty(),{user:f}=to(),I=(f?.email??"").endsWith("@weezevent.com")||!function(e){return 0===e.groups.length||1===e.groups.length&&e.groups[0].operator===pt.And}(c)||function(e){return e.groups.some(e=>new Set(e.predicates.map(({slug:e})=>e)).size!==e.predicates.length)}(c),_=(0,l.useMemo)(()=>function(e){return bu(e).groups.flatMap(e=>e.predicates)}(c),[c]),x=(0,l.useMemo)(()=>u?$u(o).find(({groupIndex:e,predicateIndex:t})=>e===u.groupIndex&&t===u.predicateIndex)??null:null,[o,u]);return(0,i.jsxs)(i.Fragment,{children:[r&&I&&(0,i.jsx)(ej,{buttonText:e.filtersButtonText,possibleFilters:e.filters,predicates:c,selectedFilterPredicate:u,subtitle:e.filtersSubtitle,onClose:()=>{h(!1)},onFilter:e=>{a(),p(e)}}),r&&!I&&(0,i.jsx)(cS,{buttonText:e.filtersButtonText,possibleFilters:e.filters,predicates:_,selectedFilterPredicate:x,subtitle:e.filtersSubtitle,onClose:()=>{h(!1)},onFilter:e=>{a(),p(bu(e))}}),n&&(0,i.jsx)(Cy,{columns:d,initialSelectedColumns:s,saveButtonText:t("_diter_les_colo_39630"),searchPlaceholder:t("rechercher_un_c_86475"),subtitle:t("personnaliser_l_03763"),title:t("_dition_des_col_70300"),onClose:()=>{m(!1)},onSave:g})]})};function nj(e){return{numberOfPages:(0,l.useMemo)(()=>e?.numberOfPages??1,[e]),totalCount:(0,l.useMemo)(()=>e?.totalCount??0,[e])}}const ij=[];function aj(e,t=500){return(0,l.useCallback)((0,iI.A)(e,t),[])}const sj=e=>{const{isGridDirty:t,...n}=function(e){const{filters:t,initial:n,onChange:i}=e,[a,s]=(0,l.useState)(n.predicates),[o,r]=(0,l.useState)(n.columns),[d,c]=(0,l.useState)(n.columnsSearch),[u,m]=(0,l.useState)(n.rendering),[g,h]=(0,l.useState)(n.sort),[p,f]=(0,l.useState)(n.name||""),[I,_]=(0,l.useState)(n.name||""),[x,y]=(0,l.useState)(n.limit),[S,j]=(0,l.useState)(0),[v,b]=(0,l.useState)(!1),[A,C]=(0,l.useState)(!1),[E,T]=(0,l.useState)(!1),[M,R]=(0,l.useState)(null),D=(0,l.useCallback)(()=>{j(0)},[j]),O=aj(e=>{_(e),D()}),w=(0,l.useCallback)(e=>{i?.setName?.(e),f(e)},[i?.setName,f]),P=(0,l.useCallback)(()=>{w(""),_(""),D()},[w,_,D]),$=(0,l.useCallback)(e=>{i?.setPredicates?.(e),s(e)},[i?.setPredicates,s]),k=(0,l.useCallback)(e=>{i?.setColumns?.(e),r(e)},[i?.setColumns,r]),N=(0,l.useCallback)(e=>{i?.setColumnsSearch?.(e),c(e)},[i?.setColumnsSearch,c]),z=(0,l.useCallback)(e=>{i?.setRendering?.(e),m(e)},[i?.setRendering,m]),L=(0,l.useCallback)(e=>{i?.setLimit?.(e),y(e),D()},[i?.setLimit,y,D]),F=(0,l.useCallback)(e=>{i?.setSort?.(e),h(e),j(0)},[i?.setSort,h,j]),U=(0,l.useMemo)(()=>Pu(a,t),[a,t]),B=(0,l.useMemo)(()=>JSON.stringify(n.predicates),[n.predicates]),V=(0,l.useMemo)(()=>JSON.stringify(n.columns),[n.columns]),G=(0,l.useMemo)(()=>JSON.stringify(n.columnsSearch),[n.columnsSearch]),W=(0,l.useMemo)(()=>JSON.stringify(n.rendering),[n.rendering]),q=(0,l.useMemo)(()=>JSON.stringify(n.sort),[n.sort]),Y=(0,l.useMemo)(()=>JSON.stringify(a)!==B||JSON.stringify(o)!==V||JSON.stringify(d)!==G||JSON.stringify(u)!==W||JSON.stringify(g)!==q,[B,a,V,o,G,d,W,u,q,g]);return{areColumnsOpen:E,clearNameCursors:P,columns:o,columnsSearch:d,filtersPredicates:U,isEditMode:v,isFilterOpen:A,isGridDirty:Y,limit:x,name:p,nameDebounced:I,offset:S,predicates:a,rendering:u,selectedFilterPredicate:M,setAreColumnsOpen:T,setColumns:k,setColumnsSearch:N,setIsEditMode:b,setIsFilterOpen:C,setLimit:L,setName:w,setNameDebounced:O,setOffset:j,setPredicates:$,setRendering:z,setSelectedFilterPredicate:R,setSort:F,sort:g}}({filters:e.filters,initial:{columns:e.columns,columnsSearch:e.columnsSearch,limit:e.limit,name:e.name,predicates:e.predicates,rendering:e.rendering,sort:e.sort},onChange:{setColumns:e.setColumns,setColumnsSearch:e.setColumnsSearch,setLimit:e.setLimit,setName:e.setName,setPredicates:e.setPredicates,setRendering:e.setRendering,setSort:e.setSort}}),a=function(e){const[t,n]=(0,l.useState)(e),[i,a]=(0,l.useState)(!1),s=(0,l.useMemo)(()=>{const e=Object.values(t).filter(e=>!0!==e.disabled),n=e.filter(e=>"checked"===e.state),i=n.map(e=>e.id),a=(0,$a.A)(e.map(({state:e})=>e)),s=2===a.length?"indeterminate":"checked"===a[0]?"checked":"unchecked";return{numberOfSelected:n.length,selectAllState:s,selecteds:n,selectedsIds:i}},[t]),o=(0,l.useRef)(null),r=(0,l.useCallback)((e,t,i)=>{const s=o.current;n(n=>{const a=i&&s?function(e,t,n){const i=Object.keys(e),a=i.indexOf(t),s=i.indexOf(n);return-1===a||-1===s?[n]:i.slice(Math.min(a,s),Math.max(a,s)+1)}(n,s,e):[e];return{...n,...Object.fromEntries(a.filter(e=>!0!==n[e]?.disabled).map(e=>[e,{...n[e],state:t}]))}}),o.current=e,"unchecked"===t&&a(!1)},[n,a]),d=(0,l.useCallback)(e=>{o.current=null,n(Object.fromEntries(Object.entries(t).filter(([e,t])=>!0!==t.disabled).map(([t,n])=>[t,{...n,state:e}]))),"unchecked"===e&&a(!1)},[t,n,a]);return{getSelectedsInput:(0,l.useCallback)((e,t)=>i?{ids:null,predicatesGroups:e??null,scope:t??null}:{ids:s.selectedsIds,predicatesGroups:null,scope:null},[i,s]),isAllSelected:i,numberOfSelected:s.numberOfSelected,selectAllState:s.selectAllState,selecteds:s.selecteds,selectedsIds:s.selectedsIds,setIsAllSelected:a,setStates:n,states:t,toggleRow:r,toggleSelectAll:d}}({}),s=function(e){const{massActions:t}=e,{columns:n,columnsSearch:i,limit:a,nameDebounced:s,offset:o,predicates:r,rendering:d,sort:c}=e.state,u=(0,l.useMemo)(()=>{const t=e.renderingLoaders?.(d);return null===t?{}:{columnsToIncludes:e.columnsToIncludes,getMassActionId:e.getMassActionId,loadDataList:e.loadDataList,loadDataListParams:e.loadDataListParams,loadRow:e.loadRow,loadRowParams:e.loadRowParams,...t}},[d,e.columnsToIncludes,e.getMassActionId,e.loadDataList,e.loadDataListParams,e.loadRow,e.loadRowParams,e.renderingLoaders]),m=(0,l.useMemo)(()=>u.columnsToIncludes?.(n,d)??{},[n,d,u.columnsToIncludes]),g=(0,l.useMemo)(()=>e.renderingParams?.(d)??{},[d,e.renderingParams]),[p,f]=(0,l.useState)(null),[I,_]=(0,l.useState)(!1),{setIsError:x}=(0,l.useContext)(Da),y=(0,l.useRef)(0),S=(0,l.useCallback)(async()=>{const t=u.loadDataList;if(!t)return;const n=++y.current;_(!0);try{const l=await t({...m,...u.loadDataListParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,name:h(s)?s:null,columnsSearch:F(i)?i:null,predicatesGroups:r,limit:a,offset:o,sort:c,...g},await us());n===y.current&&(f({loadDataList:t,rendering:d,result:l.data}),x(!1),_(!1))}catch(e){n===y.current&&x(!0,e)}},[i,m,a,s,o,r,d,g,x,_,f,c,e.organizationId,e.eventId,u.loadDataList,u.loadDataListParams]),j=!!u.loadDataList&&p?.loadDataList===u.loadDataList&&p.rendering===d,v=j?p.result:null,[b,A]=(0,l.useState)([]),C=j?b:ij,{numberOfPages:E,totalCount:T}=nj(v?.rows),[M,R]=(0,l.useState)({}),D=(0,l.useRef)(0),O=(0,l.useCallback)(async t=>{const n=u.loadRow;if(!n)return;const i=D.current,a=()=>i!==D.current;R(e=>({...e,[t]:!0}));try{const i=(await n({...m,...u.loadRowParams||{},organizationId:e.organizationId||void 0,eventId:e.eventId||void 0,id:t},await us())).data.row;if(a())return;A(e=>e.map(e=>e.id===t?i:e))}catch(e){if(a())return;x(!0,e)}R(e=>({...e,[t]:!1}))},[m,R,x,e.organizationId,e.eventId,u.loadRow,u.loadRowParams]),w=(0,l.useCallback)(e=>u.getMassActionId?.(e)??e.id,[u.getMassActionId]);return(0,l.useEffect)(()=>(S(),()=>{y.current++,_(!1)}),[i,m,a,s,o,r,d,g,c,e.organizationId,e.eventId,u.loadDataList]),(0,l.useEffect)(()=>{A(p?.result.rows?.nodes??[])},[p]),(0,l.useEffect)(()=>(R({}),()=>{D.current++}),[p,d,u.loadRow]),(0,l.useEffect)(()=>{u.loadDataList&&(t.setStates(Object.fromEntries(C.map(e=>[`r${w(e)}`,{id:w(e),state:"unchecked"}]))),t.setIsAllSelected(!1))},[C,t.setStates,t.setIsAllSelected]),{data:C,getMassActionId:w,idToLoading:M,isLoading:I||!!u.loadDataList&&!j,loadDataResult:v,numberOfPages:E,reload:S,reloadRow:O,totalCount:T}}({columnsToIncludes:e.columnsToIncludes,eventId:e.eventId,getMassActionId:e.getMassActionId,loadDataList:e.loadDataList,loadDataListParams:e.loadDataListParams,loadRow:e.loadRow,loadRowParams:e.loadRowParams,massActions:a,organizationId:e.organizationId,renderingLoaders:e.renderingLoaders,renderingParams:e.renderingParams,state:n});return(0,i.jsxs)(ey.Provider,{value:{...n,...s,isSaveVisible:t,massActions:a,possibleColumns:e.possibleColumns,possibleRenderings:e.possibleRenderings,showMassActions:e.showMassActions??!1,showRowDropdown:e.showRowDropdown??!1,showRowEdit:e.showRowEdit??!1},children:[!1===e.showHeader?e.children:(0,i.jsxs)($,{css:{background:"white"},direction:"column",height:1,width:1,children:[(0,i.jsx)(py,{renderActions:e.renderActions,renderAllSelectedText:e.renderAllSelectedText,renderControls:e.renderControls,renderPageSelectedText:e.renderPageSelectedText,renderSelectAllText:e.renderSelectAllText,showEditColumns:e.showEditColumns,showEditMode:e.showEditMode,showFilters:e.showFilters,showPredicatesBadges:e.showPredicatesBadges,showSearchColumns:e.showSearchColumns,showSelectAll:e.showSelectAll}),e.children]}),(0,i.jsx)(tj,{filters:e.filters,filtersButtonText:e.filtersButtonText,filtersSubtitle:e.filtersSubtitle})]})};var oj=n(5830);class rj extends oj.Ay{events;forms;organizations;segmentsFolders;constructor(){super("recrewteer"),this.version(6).stores({events:"id",forms:"id",organizations:"id",segmentsFolders:"id"})}}const lj=new rj;function dj(e,t,n,i){const{getLocalOrganization:a,updateLocalOrganization:s}=function(e){const t=(0,l.useCallback)(async()=>{let t=await lj.organizations.get(e);return t||(t={id:e},await lj.organizations.put(t)),t},[e]),n=(0,l.useCallback)(async n=>{const i=await t(),a=(0,$d.A)(i,{id:e},n);return await lj.organizations.put(a),a},[e,t]);return{getLocalOrganization:t,updateLocalOrganization:n}}(e),[o,r]=(0,l.useState)(n),[d,c]=(0,l.useState)(!0),u=(0,l.useCallback)(async e=>{r(e),await s({[t]:e})},[t,r,s]);return(0,l.useEffect)(()=>{(async()=>{const e=await a();e[t]&&(i?.includes(e[t])??1)&&r(e[t]),c(!1)})()},[e,i,a,r,c]),[o,u,d]}function cj(e,t,n,i,a,s){const o=dj(n,i,a,s);return(0,l.useMemo)(()=>e?[t(e),yh.A,!1]:o,[e,o])}function uj(e){return(0,l.useMemo)(()=>new Map(e.map(e=>[e.slug,e])),[e])}const mj=e=>{return(0,i.jsxs)(ux,{css:{cursor:"pointer",userSelect:"none",...e.css||{}},minWidth:e.minWidth,width:e.width,onClick:()=>{var t,n;e.setSort((t=e.sort,n=e.attribute,null===t||t.attribute!==n?{attribute:n,direction:Rt.Asc}:t.direction===Rt.Asc?{attribute:n,direction:Rt.Desc}:null))},children:[e.children,(0,i.jsx)(Hg,{width:"2"}),(0,i.jsx)(ra,{icon:(t=e.sort,n=e.attribute,null===t||t.attribute!==n?"arrow-down-arrow-up":t.direction===Rt.Asc?"arrow-up":"arrow-down")})]});var t,n},gj=e=>(0,i.jsx)($,{align:"center",css:{borderBottom:"1px solid $gray200",borderLeft:e.bx?"1px solid $gray200":void 0,borderRight:e.bx?"1px solid $gray200":void 0,padding:"$3",...e.css},height:72,width:1,children:(0,i.jsx)(Dh,{borderRadius:"$1",height:1,width:1})}),hj=e=>{const t=!!e.paginationRow;return(0,i.jsx)(hx,{children:(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsxs)(Th,{css:{borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",height:"100%",overflow:"auto hidden",width:"100%","& > div:first-child":{borderStartStartRadius:e.featureFlags?.isV4?"$radii$2":void 0,borderStartEndRadius:e.featureFlags?.isV4?"$radii$2":void 0},"& > div:last-child":{borderEndEndRadius:t?void 0:"$radii$2",borderEndStartRadius:t?void 0:"$radii$2"},"& .table-header-row, & .table-row":{borderLeft:"none",borderRight:"none"},...e.css},gridtemplaterows:"44px 1fr",children:[e.headerRow,(0,i.jsx)($i,{css:{overflow:"auto"},children:e.children})]}),e.paginationRow]})})},pj=e=>(0,i.jsx)(ga,{color:"white",css:{background:e.active?"$gray100":"white",border:0,borderInlineStart:"1px solid $gray300",color:e.disabled?"$gray400":"$gray700",cursor:e.disabled?"not-allowed":e.cursor,fontWeight:"$medium",inlineSize:"40px",blockSize:"32px",alignItems:"center",justifyContent:"center",borderRadius:"unset"},disabled:e.disabled,textAlign:"center",onClick:()=>{e.onClick()},children:e.children}),fj=e=>{const{translate:t}=zg(),n=bp(),a=e.limit??25,s=Ci(),o=e.offset/a,r=(0,Fd.A)(Math.max(0,o-2),Math.min(e.numberOfPages,o+3)),l=0===o,d=o===e.numberOfPages-1,c=Math.min(e.totalCount,(o+1)*a);return(0,i.jsxs)(cx,{css:{gap:"$6","@tablet":{justifyContent:"space-between"}},children:[(0,i.jsx)($i,{css:{order:1,display:n?"none":void 0},width:150,children:!n&&e.showLimits&&(0,i.jsxs)($,{align:"center",css:{inlineSize:"fit-content",overflow:"hidden"},gap:"4",children:[(0,i.jsx)($,{css:{border:"1px solid $gray300",inlineSize:"fit-content",overflow:"hidden",borderRadius:"$1","& > button:first-child":{borderInlineStart:"none"}},children:Jx.map((t,n)=>(0,i.jsx)(pj,{active:a===t,cursor:"pointer",disabled:!1,onClick:()=>{e.setLimit?.(t)},children:t},n))}),e.itemName&&(0,i.jsx)(N,{css:{width:150},children:t("_1_per_page_06128",e.itemName)})]})}),!n&&(e.totalCount>a?(0,i.jsxs)($,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:3,"& > button:first-child":{borderInlineStart:"none"}},children:[(0,i.jsx)(pj,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset-a),children:(0,i.jsx)(ra,{icon:"arrow-left"})}),e.numberOfPages<=7?(0,Fd.A)(0,e.numberOfPages).map(t=>(0,i.jsx)(pj,{active:o===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*a),children:t+1},t)):(0,i.jsxs)(i.Fragment,{children:[!r.includes(0)&&(0,i.jsx)(pj,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(0),children:"1"}),!r.includes(1)&&(0,i.jsx)(pj,{active:!1,cursor:"default",disabled:!1,onClick:yh.A,children:(0,i.jsx)(ra,{icon:"ellipsis"})}),r.map(t=>(0,i.jsx)(pj,{active:o===t,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset(t*a),children:t+1},t)),!r.includes(e.numberOfPages-2)&&(0,i.jsx)(pj,{active:!1,cursor:"default",disabled:!1,onClick:yh.A,children:(0,i.jsx)(ra,{icon:"ellipsis"})}),!r.includes(e.numberOfPages-1)&&(0,i.jsx)(pj,{active:!1,cursor:"pointer",disabled:!1,onClick:()=>e.setOffset((e.numberOfPages-1)*a),children:e.numberOfPages})]}),(0,i.jsx)(pj,{active:!1,cursor:d?"default":"pointer",disabled:d,onClick:()=>e.setOffset(e.offset+a),children:(0,i.jsx)(ra,{icon:"arrow-right"})})]}):(0,i.jsx)($i,{css:{order:3}})),n&&(0,i.jsx)($,{css:{border:"1px solid $gray300",borderRadius:"$1",overflow:"hidden",order:1,inlineSize:"fit-content","& > button:first-child":{borderInlineStart:"none"}},children:(0,i.jsx)(pj,{active:!1,cursor:l?"default":"pointer",disabled:l,onClick:()=>e.setOffset(e.offset-a),children:(0,i.jsx)(ra,{icon:"arrow-left"})})}),(0,i.jsx)($i,{css:{order:2,flex:"1","@tablet":{order:3,flex:"unset"}},textAlign:n?"center":"end",width:150,children:n?[...s(t("page_1_of_2_92409"),(0,i.jsx)("b",{children:o+1}),(0,i.jsx)("b",{children:e.numberOfPages}))]:[...s(t(e.itemName?"_1_of_2_3_03566":"x_to_y_of_x","{1}",e.totalCount,e.itemName),(0,i.jsxs)("b",{children:[o*a+1,"–",c]}))]}),n&&(0,i.jsx)($,{css:{border:"1px solid $gray300",order:3,borderRadius:"$1",overflow:"hidden",inlineSize:"fit-content","& > button:first-child":{borderInlineStart:"none"}},children:(0,i.jsx)(pj,{active:!1,cursor:d?"default":"pointer",disabled:d,onClick:()=>e.setOffset(e.offset+a),children:(0,i.jsx)(ra,{icon:"arrow-right"})})})]})},Ij=e=>(0,i.jsx)(px,{css:{borderBottomLeftRadius:"$2",borderBottomRightRadius:"$2",height:"56px",...e.css},children:e.children}),_j=({children:e,css:t,gap:n,justify:a,width:s})=>(0,i.jsx)(cx,{width:s??100,children:(0,i.jsx)($,{align:"center",className:"h-controls",css:{cursor:"pointer",display:"none",...t},gap:n??"6",height:1,justify:a,width:1,onClick:Ia,children:e})}),xj=e=>{const{translate:t}=zg(),{getMassActionId:n,massActions:a,reload:s,reloadRow:o}=ty(),{showMassActions:r,showRowDropdown:d,showRowEdit:c}=e,u=a.states[`r${n(e.row)}`]?.state??"unchecked",m=l.useCallback(()=>{o(e.row.id)},[e.row.id,o]),g=d||c;return(0,i.jsxs)(px,{css:{background:"checked"===u?"$primary100":"white","&:hover":{background:"checked"===u?"$primary100":"$gray100"}},onMouseLeave:e=>{Tp(e.target)},children:[r&&(0,i.jsx)(cx,{justify:"center",width:48,children:(0,i.jsx)(Uf,{state:u,onClick:(t,i)=>{a.toggleRow(`r${n(e.row)}`,t,i.shiftKey)}})}),e.selectedColumns.map(t=>(0,i.jsx)(l.Fragment,{children:e.renderCell(t,e.row,m)},t.slug)),g&&(0,i.jsxs)(_j,{justify:"center",children:[c&&e.getEditPath&&(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:"pen",to:e.getEditPath(e.row)})})}),(0,i.jsx)(O_,{placement:"top",children:t("_diter_62574")})]}),d&&e.renderRowDropdown?.(e.row,s)]}),e.renderRowPanels?.(e.row,m)]})},yj=e=>{const{columns:t,data:n,idToLoading:a,isLoading:s,limit:o,massActions:r,numberOfPages:d,offset:c,possibleColumns:u,setLimit:m,setOffset:g,setSort:h,sort:p,totalCount:f,...I}=ty(),_=e.showMassActions??I.showMassActions,x=e.showRowDropdown??I.showRowDropdown,y=e.showRowEdit??I.showRowEdit,S=l.useMemo(()=>t.flatMap(e=>(0,go.A)([u.find(t=>t.slug===e)])),[t,u]);return(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(hj,{"aria-busy":s,headerRow:(0,i.jsxs)(mx,{children:[_&&(0,i.jsx)(ux,{justify:"center",width:48,children:(0,i.jsx)(Uf,{state:r.selectAllState,onClick:r.toggleSelectAll})}),S.map(e=>e.isSortable?(0,i.jsx)(mj,{attribute:e.sortAttribute,minWidth:e.minWidth,setSort:h,sort:p,width:e.width,children:(0,i.jsx)($i,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug):(0,i.jsx)(ux,{minWidth:e.minWidth,width:e.width,children:(0,i.jsx)($i,{css:{ellipsis:!0},title:e.name,children:e.name})},e.slug)),(x||y)&&(0,i.jsx)(ux,{width:100})]}),paginationRow:(0,i.jsx)(Ij,{children:(0,i.jsx)(fj,{limit:o,numberOfPages:d,offset:c,setLimit:m,setOffset:g,showLimits:!0,totalCount:f})}),children:s?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{})]}):n.map(t=>a[t.id]?(0,i.jsx)(gj,{},t.id):(0,i.jsx)(xj,{getEditPath:e.getEditPath,renderCell:e.renderCell,renderRowDropdown:e.renderRowDropdown,renderRowPanels:e.renderRowPanels,row:t,selectedColumns:S,showMassActions:_,showRowDropdown:x,showRowEdit:y},t.id))})})};function Sj(e,t,n){if(t.startsWith("form_inserted_at")){const i=parseInt(t.substring(17),10);if(isNaN(i))return"";{const t=n.find(({form:e})=>e?.id===i);return t?e.toLocaleString(t.insertedAt.toLocal(),Ya.DateTime):""}}return""}const jj=j($,{gap:"$3",variants:{avatarOnTop:{true:{flexDirection:"column",gap:"$2"},false:{alignItems:"center",flexDirection:"row"}}}}),vj=e=>{const{params:{organizationId:t,eventId:n}}=zg(),a=l.useMemo(()=>h(e.userInfo.name)?e.userInfo.name:"-",[e.userInfo.name]),s=()=>(0,i.jsx)($i,{color:e.disabled?"gray300":"gray800",css:{ellipsis:""},disabled:e.disabled,fontWeight:"medium",title:a,children:a});return(0,i.jsxs)(jj,{avatarOnTop:{"@initial":!!e.badge,"@tablet":!1},width:1,children:[(0,i.jsx)(Vp,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:e.size||40}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",justify:"center",children:[(0,i.jsxs)($,{align:"center",gap:"2",children:[e.isClickDisabled?s():(0,i.jsx)($h,{to:e.clickPath??Ng.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.userInfo.id}),children:s()}),(0,i.jsx)($i,{css:{flexShrink:0},children:e.badge})]}),(0,i.jsx)($i,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.email,children:e.areContactLinksEnabled?(0,i.jsx)($h,{css:{fontWeight:"normal"},to:`mailto:${e.userInfo.email}`,children:e.userInfo.email}):(0,i.jsx)(i.Fragment,{children:e.userInfo.email})}),e.showPhoneNumber&&(0,i.jsx)($i,{color:e.disabled?"gray300":"gray500",css:{ellipsis:""},fontSize:"textSm",title:e.userInfo.phone?.internationalFormat,children:e.areContactLinksEnabled?(0,i.jsx)($h,{css:{fontWeight:"normal"},to:`tel:${e.userInfo.phone?.internationalFormat}`,children:e.userInfo.phone?.internationalFormat}):(0,i.jsx)(i.Fragment,{children:e.userInfo.phone?.internationalFormat})})]})]})},bj=e=>{const t=bi(Sl),{isEditMode:n}=ty(),a=t.getValue(e.customField,e.fields),s=t.getValueString(e.customField,e.fields),o=!0===a?"checked":!1===a?"unchecked":"indeterminate";return n&&e.updatable?(0,i.jsxs)(cx,{css:{border:"2px solid transparent","& > .h-checkbox-cell-hover":{display:"none"},"&:hover":{border:"2px solid $primary500"},"&:hover > .h-checkbox-cell-default":{display:"none"},"&:hover > .h-checkbox-cell-hover":{display:"block"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Ia,children:[(0,i.jsx)($i,{className:"h-checkbox-cell-default",children:s}),(0,i.jsx)($i,{className:"h-checkbox-cell-hover",children:(0,i.jsx)(Uf,{state:o,onClick:async t=>{await e.mutate("checked"===t,e.customField.slug),e.reload()}})})]}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:s})};class Aj extends Error{}function Cj(e,t){const n=bi(Cl);return(0,l.useCallback)(i=>{const a=n.getValidationRuleError(e,i);return a?Promise.reject(new Aj(a)):t(i,e.slug)},[e,t])}const Ej="h-update-cell-open",Tj=e=>{const t=Ai(),n=(0,l.useRef)(ns()),[a,s]=(0,l.useState)(!1),[o,r]=(0,l.useState)(e.initialValue),[d,c]=(0,l.useState)(!1),[u,m]=(0,l.useState)(null),g=(0,l.useCallback)(e=>{r(e),m(null)},[]),h=(0,l.useCallback)(t=>{s(t),document.body.dispatchEvent(new CustomEvent(Ej,{bubbles:!0,detail:{uuid:n.current}})),e.onStateChange?.(t)},[s,e.onStateChange]),p=(0,l.useCallback)(e=>{e.detail.uuid!==n.current&&s(!1)},[s]),f=(0,l.useCallback)(()=>{h(!1),g(e.initialValue)},[e.initialValue,h,g]),I=(0,l.useCallback)(async()=>{c(!0);try{await e.onSave(o)}catch(e){if(!(e instanceof Aj))throw e;m(e.message)}finally{c(!1)}},[e.onSave,o]);return(0,l.useEffect)(()=>(document.addEventListener(Ej,p),()=>{document.removeEventListener(Ej,p)}),[p]),(0,i.jsxs)(Rp,{doNotCloseOnOtherOpen:!0,isOpen:a,onStateChange:h,children:[(0,i.jsx)(Up,{children:(0,i.jsx)(cx,{css:{...e.css,border:"2px solid transparent",cursor:"text","&:hover":{border:"2px solid $primary700"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Ia,children:"function"==typeof e.renderValue?e.renderValue():e.renderValue})}),(0,i.jsxs)(Fp,{css:{padding:"0",overflowBlock:"auto",maxBlockSize:"50vh"},placement:"bottom-start",width:380,children:[(0,i.jsx)($,{css:{padding:"$4 $6"},onKeyDown:e=>{"Enter"===e.key&&I()},children:e.renderInput(o,r,u)}),(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6"},gap:"4",justify:"end",children:[(0,i.jsx)($i,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:f,children:t("annuler_48254")}),(0,i.jsx)(ga,{isLoading:d,size:"sm",onClick:I,children:t("appliquer_05753")})]})]})]})},Mj=e=>{const{isEditMode:t}=ty();return t&&e.updatable?(0,i.jsx)(Tj,{column:e.column,initialValue:e.initialValue,renderInput:e.renderInput,renderValue:e.renderValue,onSave:async t=>{await e.mutate(t),e.reload()}}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:"function"==typeof e.renderValue?e.renderValue():e.renderValue})},Rj=e=>{const t=bi(Sl),n=t.getValueString(e.customField,e.fields),a=(0,l.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return h(n)?wa.c9.fromISO(n,{zone:"utc"}):n},[]),s=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(Gf,{hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},Dj=e=>{const t=bi(Sl),n=t.getValueString(e.customField,e.fields),a=(0,l.useMemo)(()=>{const n=t.getValue(e.customField,e.fields);return h(n)?wa.c9.fromISO(n,{zone:"utc"}):n},[]),s=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(qf,{hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},Oj=e=>{const{params:{organizationId:t}}=zg(),n=bi(Sl),a=n.getValueString(e.customField,e.fields,{fileReturnValue:"name"}),s=n.getValueString(e.customField,e.fields,{fileReturnValue:"url"}),o=(0,l.useMemo)(()=>n.getValue(e.customField,e.fields),[e.customField,e.fields]),r=Cj(e.customField,e.mutate),d=e.customField.fileType===Fe.Picture,c=e.customField.fieldProperty===ke.Picture?e.avatarUser:void 0;return(0,i.jsx)(Mj,{column:e.column,initialValue:o,mutate:r,reload:e.reload,renderInput:(n,a)=>d?(0,i.jsx)(CI,{allowCrop:!0,label:e.customField.name,organizationId:t,value:n,onChange:a}):(0,i.jsx)(jI,{accept:[Kf.Images,Kf.Pdf],acl:"private",label:e.customField.name,organizationId:t,value:n,onChange:a}),renderValue:()=>d?(h(s)||c)&&(0,i.jsx)(Vp,{email:c?.email,image:s,name:c?.name,size:32}):(0,i.jsx)($h,{css:{fontWeight:"$regular"},to:s,children:a}),updatable:e.updatable})},wj=e=>{const t=bi(Sl),n=t.getValueString(e.customField,e.fields),a=(0,l.useMemo)(()=>t.getValue(e.customField,e.fields)||0,[e.customField,e.fields]),s=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(Ih,{hint:a,label:e.customField.name,shouldParseAsInt:!0,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:n,updatable:e.updatable})},Pj=e=>{const t=bi(Sl),n=bi(sl),a=t.getValueString(e.customField,e.fields),s=(0,l.useMemo)(()=>{const i=t.getValue(e.customField,e.fields),a=n.basePhoneInputDefault();return{country:i?.country||a.country,code:i?.code||a.code,number:i?.number||a.number}},[e.fields]),o=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:s,mutate:o,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(DI,{label:e.customField.name,value:t,onChange:n}),renderValue:a,updatable:e.updatable})},$j=e=>(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)($i,{css:{background:e.color,borderRadius:"16px",flex:"0 0 auto",overflow:"hidden"},height:16,width:16}),(0,i.jsx)($i,{css:{clamp:2,minWidth:0,wordBreak:"break-word"},title:e.children,children:e.children})]});let kj=null;function Nj(e,{fontSize:t,fontWeight:n}={}){kj||=document.createElement("canvas");const i=kj.getContext("2d");return i.font=`${n||"400"} ${t||"14px"} 'Open Sans`,i.measureText(e).width}const zj=({badge:e})=>(0,i.jsx)(jf,{color:e.color,count:e.count,css:{cursor:e.onClick?"pointer":"inherit"},leftIcon:e.icon?Gn.includes(e.icon)?oa(e.icon):e.icon:void 0,size:"md",onClick:e.onClick,children:e.text}),Lj=({badges:e})=>(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(jf,{cursor:"pointer",size:"md",children:`+${e.length}`})}),(0,i.jsx)(Fp,{css:{flexWrap:"wrap",gap:"$2",overflow:"auto",padding:"$4",zIndex:100},maxHeight:300,placement:"top-end",width:400,children:e.map(e=>(0,i.jsx)($,{children:(0,i.jsx)(zj,{badge:e})},e.id))})]}),Fj=e=>{const[t,n]=(0,l.useState)(0),a=(0,l.useCallback)(e=>{e&&n(e.getBoundingClientRect().width)},[]),s=(0,l.useMemo)(()=>e.badges.some(e=>"number"==typeof e.count||"string"==typeof e.count),[e.badges]),o=(0,l.useMemo)(()=>e.badges.some(e=>!!e.icon),[e.badges]),r=(0,l.useMemo)(()=>(s?28:0)+(o?12:0)+20,[s,o]),d=(0,l.useMemo)(()=>{const t=e.badges.map(e=>({...e,textWidth:Math.floor(Nj(e.text,{fontSize:"12px"}))+r}));return!0===e.doNotSort?t:(0,mo.A)(t,({textWidth:e})=>e)},[r,e.badges,e.doNotSort]),[c,u]=(0,l.useMemo)(()=>{let e=37;const n=[],i=[];for(const a of d)e+=a.textWidth+8,eF(u),[u]);return(0,i.jsxs)($,{ref:a,align:"center",css:{cursor:e.onClick?"pointer":"inherit","&:hover":{color:"black"}},gap:"2",height:1,width:1,onClick:t=>{e.onClick&&F(d)&&(Ia(t),e.onClick())},children:[c.map(e=>(0,i.jsx)(zj,{badge:e},e.id)),m&&(e.onClick?(0,i.jsx)(jf,{css:{cursor:"pointer"},size:"md",children:"+"+(d.length-c.length)}):(0,i.jsx)(Lj,{badges:u}))]})},Uj=e=>{const t=Ai(),n=bi(Sl),a=(0,l.useMemo)(()=>{if(e.customField.canSelectMultiple){const t=n.getSelectCustomFieldValues(e.customField,e.fields);if(e.customField.listType==Ke.Dot)return(0,i.jsx)($,{align:"center",gap:"3",wrap:"wrap",children:t.map(({value:e,color:t},n)=>(0,i.jsx)($j,{color:t||"",children:e},n))});{const n=t.map(({value:t,color:n})=>({id:t,color:e.customField.listType===Ke.Badge?n||"":"gray",icon:null,text:t}));return(0,i.jsx)(Fj,{badges:n})}}{const t=n.getValueString(e.customField,e.fields);if(h(t)){if(e.customField.listType===Ke.Default)return t;{const a=n.getValue(e.customField,e.fields),s=e.customField.values.find(({id:e})=>e===a)?.color??"";return e.customField.listType===Ke.Dot?(0,i.jsx)($j,{color:s,children:t}):(0,i.jsx)(jf,{color:s,children:t})}}return""}},[n,e.customField,e.fields]),s=(0,l.useMemo)(()=>{const t=n.getValue(e.customField,e.fields);return e.customField.canSelectMultiple?F(t)?t:[]:t||""},[n,e.customField,e.fields]),o=XI(e.customField),r=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:s,mutate:r,reload:e.reload,renderInput:(n,a)=>e.customField.canSelectMultiple?(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,label:e.customField.name,multiple:!0,renderOnPortal:!0,values:n,onChange:a,children:o}):(0,i.jsx)(VI,{isSearchVisible:!0,label:e.customField.name,multiple:!1,placeholder:t("choisir_une_val_00277"),renderOnPortal:!0,values:[n],onChange:e=>{F(e)&&a(e[0])},children:o}),renderValue:a,updatable:e.updatable})},Bj=e=>{const t=bi(Sl).getValueString(e.customField,e.fields),n=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(ZI,{hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n,onKeyDown:e=>{e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()}}),renderValue:t,updatable:e.updatable})},Vj=e=>{const t=bi(Sl).getValueString(e.customField,e.fields),n=Cj(e.customField,e.mutate),{isEditMode:a}=ty(),s="string"==typeof e.clickPath&&(e.column.slug===ke.FirstName||e.column.slug===ke.LastName),o=s&&!a;return(0,i.jsx)(Mj,{column:e.column,initialValue:t,mutate:n,reload:e.reload,renderInput:(t,n,a)=>(0,i.jsx)(Ih,{autoFocus:!0,hint:a,label:e.customField.name,state:h(a)?"error":"active",value:t,onChange:n}),renderValue:()=>o?(0,i.jsx)($h,{to:e.clickPath,children:t}):(0,i.jsx)($i,{fontWeight:s?"medium":"inherit",children:t}),updatable:e.updatable})},Gj=e=>{const t=bi(Sl),n=t.getValueString(e.customField,e.fields),a=(0,l.useMemo)(()=>t.getValueString(e.customField,e.fields),[]),s=Cj(e.customField,e.mutate);return(0,i.jsx)(Mj,{column:e.column,initialValue:a,mutate:s,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(Hf,{label:e.customField.name,value:t,onChange:n}),renderValue:n,updatable:e.updatable})},Wj=e=>{const t=bi(Sl);return e.customField?.fieldType===ze.Checkbox?(0,i.jsx)(bj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Date?(0,i.jsx)(Rj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Phone?(0,i.jsx)(Pj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Select||e.customField?.fieldType===ze.Country||e.customField?.fieldType===ze.Language||e.customField?.fieldType===ze.Sex||e.customField?.fieldType===ze.Nationality?(0,i.jsx)(Uj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Text?(0,i.jsx)(Vj,{clickPath:e.clickPath,column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Textarea?(0,i.jsx)(Bj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Number?(0,i.jsx)(wj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.File?(0,i.jsx)(Oj,{avatarUser:e.avatarUser,column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Datetime?(0,i.jsx)(Dj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):e.customField?.fieldType===ze.Time?(0,i.jsx)(Gj,{column:e.column,customField:e.customField,fields:e.fields,mutate:e.mutate,reload:e.reload,updatable:e.updatable}):(0,i.jsx)(cx,{children:e.customField?t.getValueString(e.customField,e.fields,{fileReturnValue:"name"}):""})},qj=e=>{const{params:{organizationId:t,eventId:n}}=zg(),{isEditMode:a}=ty(),{mutate:s}=Rs(),o=(0,l.useCallback)(i=>s({organizationId:t,eventId:n,userInfoId:e.userInfo.id,email:i}),[e.userInfo,s]);return(0,i.jsx)(Mj,{column:e.column,initialValue:e.userInfo.email,mutate:o,reload:e.reload,renderInput:(t,n)=>(0,i.jsx)(Ih,{isEmail:!0,label:e.column.name,value:t,onChange:n}),renderValue:()=>"string"!=typeof e.clickPath||a?(0,i.jsx)($i,{fontWeight:"medium",children:e.userInfo.email}):(0,i.jsx)($h,{to:e.clickPath,children:e.userInfo.email}),updatable:e.updatable})},Yj=e=>{const{translate:t}=zg(),{isEditMode:n}=ty(),a=(0,l.useMemo)(()=>({firstName:e.userInfo.fields.firstName||"",lastName:e.userInfo.fields.lastName||""}),[e.userInfo]),s=(0,l.useCallback)(async t=>{await e.mutate(t.firstName,"firstName"),await e.mutate(t.lastName,"lastName"),e.reload()},[e.mutate,e.reload]);return n&&e.updatable?(0,i.jsx)(Tj,{column:e.column,initialValue:a,renderInput:(e,n)=>(0,i.jsxs)($,{direction:"column",gap:"2",width:1,children:[(0,i.jsx)(Ih,{label:t("pr_nom_66988"),value:e.firstName,onChange:t=>{n({...e,firstName:t})}}),(0,i.jsx)(Ih,{label:t("last_name"),value:e.lastName,onChange:t=>{n({...e,lastName:t})}})]}),renderValue:()=>(0,i.jsx)(vj,{clickPath:e.clickPath,isClickDisabled:!0,size:32,userInfo:e.userInfo}),onSave:s}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(vj,{clickPath:e.clickPath,size:32,userInfo:e.userInfo})})},Hj=e=>{const t=Ai(),n=(0,l.useMemo)(()=>function(e,t){if(e){const n=(e.usersOrganizations||[]).map(e=>({id:`uo-${e.id}`,color:"gray",icon:e.role.type===Et.OrganizationAdmin?"gem":"glasses-round",text:`${e.role.name}`})).concat((e.usersEvents||[]).map(e=>({id:`ue-${e.id}`,color:"gray",icon:e.role.type===Et.EventAdmin?"gem":"glasses-round",text:`${e.event.name} - ${e.role.name}`}))).concat((e.usersDelegations||[]).map(e=>({id:`ud-${e.id}`,color:"gray",icon:"user-group",text:`${e.delegation.name} - ${t("responsable_de_70462")}`}))).concat((e.usersDelegationsCategories||[]).map(e=>({id:`udc-${e.id}`,color:"gray",icon:"user-group",text:`${e.delegationCategory.name} - ${e.role.name}`}))).concat((e.usersPositions||[]).map(e=>({id:`up-${e.id}`,color:"gray",icon:"sitemap",text:`${e.position.name} - ${e.role.name}`}))).concat((e.usersPositionsCategories||[]).map(e=>({id:`upc-${e.id}`,color:"gray",icon:"sitemap",text:`${e.positionCategory.name} - ${e.role.name}`})));return(0,_r.A)(n,({text:e})=>e)}return[]}(e.userPermissions,t),[e.userPermissions]);return(0,i.jsx)(cx,{minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(Fj,{badges:n,doNotSort:!0})})};function Zj(e){return(0,mo.A)(e,e=>m(e.name)).filter(e=>F(e.accreditationsProfiles)).map(e=>(0,i.jsx)("optgroup",{label:e.name,children:(0,mo.A)(e.accreditationsProfiles,e=>m(e.name)).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id))}const Kj=e=>{const{translate:t}=zg(),{mutate:n}=function(e={}){return Ti("mutation VolunteersRegistrationsMassAccreditationProfileUpdate(\n $eventId: EventId!\n $massProfileUpdate: MassAccreditationProfileUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationProfileUpdate(\n eventId: $eventId\n massProfileUpdate: $massProfileUpdate\n )\n}\n",e)}(),{isEditMode:a}=ty(),s=(0,l.useMemo)(()=>(0,go.A)([e.volunteerRegistration.accreditationProfile?.id]),[e.volunteerRegistration]),[o,r]=(0,l.useState)(!0),[d,c]=(0,l.useState)(null),u=(0,l.useMemo)(()=>Jp((0,go.A)([e.volunteerRegistration.accreditationProfile])),[e.volunteerRegistration.accreditationProfile]),m=(0,l.useCallback)(async t=>{if(t&&o){const{event:t}=await(n={eventId:e.eventId},i=await us(),_s("query EventAccreditationsProfiles($eventId: EventId!) {\n event(id: $eventId) {\n accreditationsProfilesCategories {\n id\n name\n\n accreditationsProfiles {\n id\n name\n color\n icon\n }\n }\n }\n}\n",{variables:n,token:i||void 0,fragments:[]})),a=Zj(t.accreditationsProfilesCategories);c(a),r(!1)}var n,i},[e.eventId,o]),g=(0,l.useCallback)(async t=>{U(t)?await n({eventId:e.eventId,massProfileUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:Je.Delete}}):await n({eventId:e.eventId,massProfileUpdate:{accreditationProfileId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:Je.Replace}}),e.reload()},[n,e.eventId,e.volunteerRegistration,e.reload]);return a&&e.updatable?(0,i.jsx)(Tj,{column:e.column,css:{gap:"$2"},initialValue:s,renderInput:(e,n)=>o?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(VI,{isSearchVisible:!0,label:t("profil_d_accr_d_02274"),multiple:!1,renderOnPortal:!0,values:e,onChange:n,children:d}),renderValue:()=>(0,i.jsx)(Fj,{badges:u}),onSave:g,onStateChange:m}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:u})})},Qj=({column:e,eventId:t,onClick:n,reload:a,updatable:s,volunteerRegistration:o})=>{const r=Ai(),{mutate:d}=Ss(),{mutate:c}=function(e={}){return Ti("mutation VolunteersRegistrationsMassAccreditationStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassAccreditationStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassAccreditationStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),u=bi(gl),{isEditMode:m}=ty(),[g,h]=(0,l.useState)(!0),[p,f]=(0,l.useState)(null),I=(0,l.useMemo)(()=>o?.accreditationsUsersInfos||[],[o]),_=(0,l.useMemo)(()=>Zp(I),[I]),x=(0,l.useMemo)(()=>I.map(e=>e.accreditationSlot.id),[I]),y=(0,l.useCallback)(async e=>{if(e&&g){const{event:e}=await Ds({eventId:t,loadIsBlocked:!0},await us()),n=ny(u,e.accreditationsCategories,{useAccreditationDisplay:!0,useIsBlocked:!0});f(n),h(!1)}},[u,t,g]),S=(0,l.useCallback)(async e=>{F(e)?await d({eventId:t,massAccredit:{accreditationsSlotsIds:e,selecteds:{ids:[o.userInfo.id]},strategy:Je.Replace}}):await c({eventId:t,massStateUpdate:{selecteds:{ids:[o.userInfo.id]},state:J.WaitingAccreditation}}),a()},[t,o,d,a]);return m&&s?(0,i.jsx)(Tj,{column:e,css:{gap:"$2"},initialValue:x,renderInput:(e,t)=>g?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(VI,{isSearchVisible:!0,label:r("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:e,onChange:t,children:p}),renderValue:()=>(0,i.jsx)(Fj,{badges:_,doNotSort:!0}),onSave:S,onStateChange:y}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.minWidth,width:e.width,children:(0,i.jsx)(Fj,{badges:_,doNotSort:!0,onClick:n})})},Xj=e=>{const t=(0,l.useMemo)(()=>(0,_r.A)(e.volunteerRegistration?.accreditationsUsersInfos??[],e=>e.accreditationSlot.accreditationCategory.id).map(e=>({id:e.accreditationSlot.accreditationCategory.id,color:"gray",icon:null,text:e.accreditationSlot.accreditationCategory.name})),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t})})};function Jj(e){switch(e){case Bt.Assigned:return{color:"success",leftIcon:"check"};case Bt.Refused:return{color:"error",leftIcon:"xmark"};case Bt.PreAssigned:return{color:"pink",leftIcon:"wand-magic-sparkles"};case Bt.WaitingAssignment:return{color:"warning",leftIcon:"hourglass-empty"};case Bt.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return tr()}}function ev(e){switch(e){case J.Accredited:return{color:"success",leftIcon:"check"};case J.AutoAccredited:return{color:"success",leftIcon:"bolt-auto"};case J.Refused:return{color:"error",leftIcon:"xmark"};case J.WaitingAccreditation:return{color:"warning",leftIcon:"hourglass-empty"};case J.NotApplicable:return{color:"gray",leftIcon:"infinity"};default:return tr()}}const tv=e=>{const t=Ai(),{mutate:n}=Ns();return(0,i.jsx)($,{css:{cursor:"pointer",padding:"$3","&:hover":{background:"$gray100"}},onClick:async()=>{await n({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistrationId,slug:"accreditation_state",value:e.state}),e.reload(),e.close()},children:(0,i.jsx)(jf,{...ev(e.state),children:t(e.state)})})},nv=e=>{const t=Ai(),{isEditMode:n}=ty(),[a,s]=(0,l.useState)(!1),o=(0,l.useCallback)(e=>{n&&s(e)},[n,s]),r=(0,l.useCallback)(()=>{o(!1)},[o]);return n&&e.updatable?(0,i.jsx)(cx,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary500"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Ia,children:(0,i.jsxs)(Rp,{isOpen:a,onStateChange:o,children:[(0,i.jsx)(Up,{children:(0,i.jsxs)($,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,i.jsx)(jf,{...ev(e.state),cursor:"text",children:t(e.state)}),a&&(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:"chevron-down"})})]})}),(0,i.jsxs)(Fp,{offset:2,placement:"bottom",width:240,children:[e.state!==J.WaitingAccreditation&&(0,i.jsx)(tv,{close:r,eventId:e.eventId,reload:e.reload,state:J.WaitingAccreditation,volunteerRegistrationId:e.volunteerRegistrationId}),e.state!==J.NotApplicable&&(0,i.jsx)(tv,{close:r,eventId:e.eventId,reload:e.reload,state:J.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})]})}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(jf,{...ev(e.state),children:t(e.state)})})},iv=e=>{const t=bi(gl),n=bi(Wd),a=(0,l.useMemo)(()=>function(e,t,n){return(0,mo.A)((n||[]).flatMap(e=>(e.slots||[]).map(t=>({range:t.range,display:e.form.slotDisplay}))),({range:e})=>e.start.toMillis()).map(n=>n.display===At.Calendar||n.display===At.DisplayDays?e.toLocaleString(n.range.start,Ya.DateOnly.Numeric):t.toDisplayString(n.range,{formats:{localeFormat:Ya.DateOnly.Numeric}}))}(t,n,e.volunteerRegistration.userInfo.formsUsersInfos).map((e,t)=>({id:t,color:"gray",icon:null,text:e})),[e.volunteerRegistration.userInfo.formsUsersInfos]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:a,doNotSort:!0,onClick:e.onClick})})},av=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>e.volunteerRegistration.delegationBannerNumber||0,[e.volunteerRegistration]),a=e.volunteerRegistration.delegationBannerNumber?.toString(10)||"",s=(0,l.useCallback)(t=>e.mutate(t,"banner_number"),[e.mutate]);return(0,i.jsx)(Mj,{column:e.column,initialValue:n,mutate:s,reload:e.reload,renderInput:(e,n)=>(0,i.jsx)(Ih,{label:t("num_ro_de_bande_16203"),shouldParseAsInt:!0,value:e,onChange:n}),renderValue:a,updatable:e.updatable})},sv=e=>{const{translate:t}=zg();return(0,i.jsxs)(Ca,{children:[(0,i.jsx)(Ea,{children:(0,i.jsx)($i,{css:{cursor:"pointer"},height:e.size,width:e.size,children:(0,i.jsx)("img",{height:"100%",src:Zc(e.value,{height:e.size,width:e.size}),width:"100%"})})}),(0,i.jsxs)(Aa,{children:[(0,i.jsx)(ba,{icon:"qrcode",children:t("code_barres_1_82428",e.name)}),(0,i.jsxs)(va,{align:"center",css:{padding:"$4"},gap:"3",justify:"center",children:[(0,i.jsx)($i,{height:100,width:100,children:(0,i.jsx)("img",{height:"100%",src:Zc(e.value,{height:100,width:100}),width:"100%"})}),(0,i.jsx)($i,{children:e.value})]}),(0,i.jsx)(ja,{})]})]})},ov=e=>{const t=e.volunteerRegistration.ticketId;return(0,i.jsxs)(cx,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:[(0,i.jsx)(sv,{name:e.volunteerRegistration.userInfo.nameOrEmail,size:30,value:e.volunteerRegistration.ticketId}),h(e.volunteerRegistration.weezeventTicketUrl)?(0,i.jsx)($h,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventTicketUrl,children:t}):t]})};function rv(e){switch(e){case Ce.Waiting:case Ce.Queued:return{color:"warning",leftIcon:"hourglass-empty"};case Ce.Bounced:return{color:"error",leftIcon:"circle-exclamation"};default:return{color:"success",leftIcon:"check"}}}const lv=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>(e.volunteerRegistration.userInfo.emails??[]).map(e=>{const{color:n,leftIcon:i}=rv(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:n})})},dv=e=>{const t=(0,l.useMemo)(()=>(e.volunteerRegistration.positionsSlotsUsersInfos||[]).filter(e=>e.state!==de.Waiting),[e.volunteerRegistration]),n=(0,l.useMemo)(()=>lu(t),[t]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:n,doNotSort:!0,onClick:e.onClick})})},cv=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)("");return(0,i.jsx)(Ca,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(Aa,{children:[(0,i.jsx)(ba,{icon:"print",children:t("impression_du_d_03836",e.customDocumentName)}),(0,i.jsxs)(va,{gap:"6",children:[(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t("le_document_a_d_84754")}),(0,i.jsx)(th,{children:t("afin_de_r_dite_85227")})]}),(0,i.jsx)(ZI,{label:t("raison_de_l_imp_75064"),value:n,onChange:a})]}),(0,i.jsx)(ja,{children:(0,i.jsx)(ga,{disabled:p(n),onClick:()=>e.onPrint(n),children:t("imprimer_le_doc_75788")})})]})})},uv=e=>{const{mutate:t}=function(e={}){return Ti("mutation VolunteerRegistrationCustomDocumentPrint(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $customDocumentSlug: String!\n $reason: String!\n) {\n link: volunteerRegistrationCustomDocumentPrint(\n eventId: $eventId\n volunteerRegistrationId: $volunteerRegistrationId\n customDocumentSlug: $customDocumentSlug\n reason: $reason\n )\n}\n",e)}(),n=(0,l.useMemo)(()=>!!e.customDocument&&Ju(e.customDocument.populationsIds??[],e.volunteerRegistration.userInfo.fields?.population),[e.customDocument,e.volunteerRegistration]),a=(0,l.useMemo)(()=>(e.volunteerRegistration.exportedCustomDocumentsSlugs??[]).includes(e.customDocument?.slug??"")&&(e.customDocument?.shouldRegenerateTicketIdOnDownload??!1),[e.customDocument,e.volunteerRegistration]),[s,o]=(0,l.useState)(!1),[r,d]=(0,l.useState)(!1),{name:c,clearName:u}=e.search,m=(0,l.useCallback)(()=>{c.startsWith("185")&&u()},[c,u]),g=(0,l.useCallback)(async(n="")=>{d(!0),o(!1);try{await async function(i,a){const s=window.open("about:blank","_blank");if(!s)throw new Error("Could not open print window, it has probably been blocked");try{const i=await(async()=>{const{link:i}=await t({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,customDocumentSlug:e.customDocument?.slug??"",reason:n});return Kc(i,"html",{lang:e.volunteerRegistration.userInfo.fields?.language})})(),o=await fetch(i,{method:"GET"});if(!o.ok)throw new Error(`Could not load document to print: ${o.status}`);const r=await o.text();s.document.write(r),s.document.close(),await Promise.all(Array.from(s.document.images).map(e=>new Promise(t=>{e.complete?t():(e.addEventListener("load",()=>t(),{once:!0}),e.addEventListener("error",()=>t(),{once:!0}))}))),await(s.document.fonts?.ready),s.addEventListener("afterprint",()=>{a?.(),s.close()},{once:!0}),s.focus(),s.print()}catch(e){throw s.close(),e}}(0,m)}catch(e){console.error(`Could not print custom document: ${e.toString()}`)}finally{d(!1),e.reload()}},[t,m,e.customDocument,e.eventId,e.volunteerRegistration,e.reload]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:n&&(0,i.jsx)(ga,{color:"white",css:{overflow:"hidden","& .h-button-content":{overflow:"hidden"}},isLoading:r,leftIcon:"print",size:"sm",onClick:()=>a?o(!0):g(),children:(0,i.jsx)($i,{css:{ellipsis:!0},title:e.column.name,width:1,children:e.column.name})})}),s&&(0,i.jsx)(cv,{customDocumentName:e.customDocument?.name??"",isOpen:s,onClose:()=>o(!1),onPrint:g})]})},mv=e=>{const{clearNameCursors:t,name:n}=ty();return(0,i.jsx)(uv,{column:e.column,customDocument:e.column.customDocument,eventId:e.eventId,reload:e.reload,search:{name:n,clearName:t},volunteerRegistration:e.volunteerRegistration})},gv=e=>{const{translate:t,params:{organizationId:n,eventId:a}}=zg(),{mutate:s}=ks(),{mutate:o}=js(),{isEditMode:r}=ty(),d=(0,l.useMemo)(()=>e.volunteerRegistration.delegation,[e.volunteerRegistration.delegation]),c=(0,l.useMemo)(()=>d?[d.id]:[],[d]),[u,m]=(0,l.useState)(!0),[g,h]=(0,l.useState)([]),p=(0,l.useCallback)(async e=>{if(e&&u){const{event:{delegations:e}}=await(t={eventId:a},n=await us(),_s("query UpdateCellDelegations($eventId: EventId!) {\n event(id: $eventId) {\n delegations {\n nodes {\n id\n name\n }\n }\n }\n}\n",{variables:t,token:n||void 0,fragments:[]}));h(e.nodes),m(!1)}var t,n},[u]),f=(0,l.useCallback)(async t=>{F(t)?await s({eventId:a,delegationId:t[0],selecteds:{ids:[e.volunteerRegistration.userInfo.id]}}):d&&await o({organizationId:n,eventId:a,delegationId:d.id,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},deleteFromEvent:!1}),e.reload()},[a,e.volunteerRegistration]);return r&&e.updatable?(0,i.jsx)(Tj,{column:e.column,css:{gap:"$2"},initialValue:c,renderInput:(e,n)=>u?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(VI,{isSearchVisible:!0,label:t("Delegation"),renderOnPortal:!0,values:e,onChange:n,children:g.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),renderValue:()=>d?(0,i.jsx)(jf,{cursor:"pointer",ellipsis:!0,title:d.name,children:d.name}):null,onSave:f,onStateChange:p}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:d&&(0,i.jsx)(jf,{cursor:"pointer",ellipsis:!0,title:d.name,children:(0,i.jsx)(sa,{to:Wc.DELEGATION({organizationId:n,eventId:a,delegationId:d.id}),children:d.name})})})},hv=e=>{const{params:{organizationId:t,eventId:n}}=zg(),a=e.volunteerRegistration.delegation?.delegationCategory;return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:a&&(0,i.jsx)(jf,{cursor:"pointer",ellipsis:!0,title:a.name,children:(0,i.jsx)(sa,{to:Wc.DELEGATION_CATEGORY({organizationId:t,eventId:n,delegationCategoryId:a.id}),children:a.name})})})},pv=e=>{const{history:t,params:{organizationId:n,eventId:a}}=zg(),s=(0,l.useMemo)(()=>(e.volunteerRegistration.userInfo?.formsUsersInfos??[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name,onClick(){t.push(yc.FORM_ELEMENTS({organizationId:n,eventId:a,formId:e.form.id}))}}]:[]),[e.volunteerRegistration.userInfo]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:s})})},fv=e=>{const t=(0,l.useMemo)(()=>function(e,t){const n=(0,mo.A)((0,_r.A)(e.filter(e=>t.includes(e.accreditationCategoryId)),e=>e.accreditation.id),e=>e.accreditation.fields.cf50732).map(e=>e.accreditation.name.substring(9));return n[0]||""}((e.volunteerRegistration.accreditationsUsersInfos||[]).map(e=>({accreditationCategoryId:e.accreditationSlot.accreditationCategory.id,accreditation:e.accreditationSlot.accreditation})),[6870,5709]),[e.volunteerRegistration.accreditationsUsersInfos]);return(0,i.jsx)(cx,{align:"center",gap:"2",minWidth:e.column.minWidth,width:e.column.width,children:t})},Iv=e=>{const t=Ai(),{mutate:n}=$s(),{mutate:a}=function(e={}){return Ti("mutation VolunteersRegistrationsMassStateUpdate(\n $eventId: EventId!\n $massStateUpdate: MassStateUpdateInput!\n) {\n numberOfMembers: volunteersRegistrationsMassStateUpdate(\n eventId: $eventId\n massStateUpdate: $massStateUpdate\n )\n}\n",e)}(),s=bi(Wd),{isEditMode:o}=ty(),r=(0,l.useMemo)(()=>e.volunteerRegistration?.positionsSlotsUsersInfos||[],[e.volunteerRegistration]),d=(0,l.useMemo)(()=>lu(r),[r]),c=(0,l.useMemo)(()=>r.map(e=>e.positionSlot.id),[r]),[u,m]=(0,l.useState)(!0),[g,h]=(0,l.useState)([]),p=(0,l.useCallback)(async t=>{if(t&&u){const{event:t}=await Os({eventId:e.eventId},await us());h(C_(s,t.positionsCategories,{usePositionDisplay:!0})),m(!1)}},[u]),f=(0,l.useCallback)(async t=>{F(t)?await n({eventId:e.eventId,massAssign:{positionsSlotsIds:t,selecteds:{ids:[e.volunteerRegistration.userInfo.id]},strategy:Je.Replace}}):await a({eventId:e.eventId,massStateUpdate:{selecteds:{ids:[e.volunteerRegistration.userInfo.id]},state:Bt.WaitingAssignment}}),e.reload()},[e.eventId,e.volunteerRegistration,n,e.reload]);return o&&e.updatable?(0,i.jsx)(Tj,{column:e.column,css:{gap:"$2"},initialValue:c,renderInput:(e,n)=>u?(0,i.jsxs)($,{direction:"column",gap:"1",width:1,children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(VI,{isSearchVisible:!0,label:t("missions_63972"),multiple:!0,renderOnPortal:!0,values:e,onChange:n,children:g}),renderValue:()=>(0,i.jsx)(Fj,{badges:d,doNotSort:!0}),onSave:f,onStateChange:p}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:d,doNotSort:!0,onClick:e.onClick})})},_v=e=>{const t=(0,l.useMemo)(()=>(0,_r.A)(e.volunteerRegistration?.positionsSlotsUsersInfos??[],e=>e.positionCategory.id).map(e=>({id:e.positionCategory.id,color:"gray",icon:null,text:e.positionCategory.name})),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t})})},xv=e=>{const t=(0,l.useMemo)(()=>(e.volunteerRegistration?.preassignPositions||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t})})},yv=e=>{const t=(0,l.useMemo)(()=>(e.volunteerRegistration?.preassignPositionsCategories||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t})})},Sv=e=>{const t=(0,l.useMemo)(()=>(e.volunteerRegistration.accreditationsUsersInfos||[]).filter(e=>e.checkInAt?.isValid),[e.volunteerRegistration]),n=(0,l.useMemo)(()=>Zp(t),[t]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:n,doNotSort:!0,onClick:e.onClick})})},jv=e=>(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:h(e.volunteerRegistration.shortTag)&&h(e.volunteerRegistration.weezeventPayUrl)?(0,i.jsx)($h,{css:{fontWeight:"normal"},to:e.volunteerRegistration.weezeventPayUrl,children:e.volunteerRegistration.shortTag}):e.volunteerRegistration.shortTag||""}),vv=(...e)=>({name:"canRegistrationStateUpdateFn",args:e});async function bv(e){try{const t=await us(),n=await function(e,t){return _s("query UserPermission($checks: [PermissionCheck!]!) {\n user {\n permission(checks: $checks)\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}(e,t);return n.user.permission}catch{return e.checks.map(e=>!1)}}const Av=new Map;function Cv({checks:e}){const t=e.map(e=>[e,JSON.stringify(e)]),n=t.filter(([e,t])=>!Av.has(t));if(n.length>0){const e=bv({checks:n.map(([e,t])=>e)});n.forEach(([t,n],i)=>{Av.set(n,e.then(e=>e[i]))})}return Promise.all(t.map(([e,t])=>Av.get(t)))}function Ev({withCaching:e,checks:t}){const[{isLoading:n,permissions:i},a]=(0,l.useState)({isLoading:!0,permissions:new Array(t.length).fill(!1)}),s=e?Cv:bv;return(0,l.useEffect)(()=>{s({checks:t}).then(e=>{a({isLoading:!1,permissions:e})},()=>{a({isLoading:!1,permissions:i})})},[]),{isLoading:n,permissions:i}}const Tv=e=>{const t=Ai(),{mutate:n}=Ns();return(0,i.jsx)($,{css:{cursor:"pointer",padding:"$3","&:hover":{background:"$gray100"}},onClick:async()=>{await n({eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistrationId,slug:"volunteer_registration_state",value:e.state}),e.reload(),e.close()},children:(0,i.jsx)(jf,{cursor:"pointer",...Jj(e.state),children:t(e.state)})})},Mv=e=>{const{permissions:[t,n],isLoading:a}=function(...e){return Ev({withCaching:!1,checks:e})}(vv(e.eventId,Bt.PreAssigned,e.volunteerRegistrationId),vv(e.eventId,Bt.Assigned,e.volunteerRegistrationId));return a?null:(0,i.jsxs)(i.Fragment,{children:[n&&e.state!==Bt.WaitingAssignment&&(0,i.jsx)(Tv,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.WaitingAssignment,volunteerRegistrationId:e.volunteerRegistrationId}),t&&(0,i.jsx)(Tv,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.PreAssigned,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==Bt.Refused&&(0,i.jsx)(Tv,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.Refused,volunteerRegistrationId:e.volunteerRegistrationId}),n&&e.state!==Bt.NotApplicable&&(0,i.jsx)(Tv,{close:e.close,eventId:e.eventId,reload:e.reload,state:Bt.NotApplicable,volunteerRegistrationId:e.volunteerRegistrationId})]})},Rv=e=>{const t=Ai(),{isEditMode:n}=ty(),[a,s]=(0,l.useState)(!1),o=(0,l.useCallback)(e=>{n&&s(e)},[n,s]),r=(0,l.useCallback)(()=>{o(!1)},[o]);return n&&e.updatable?(0,i.jsx)(cx,{css:{border:"2px solid transparent","&:hover":{border:"2px solid $primary500"}},minWidth:e.column.minWidth,width:e.column.width,onClick:Ia,children:(0,i.jsxs)(Rp,{isOpen:a,onStateChange:o,children:[(0,i.jsx)(Up,{children:(0,i.jsxs)($,{align:"center",gap:"3",height:1,justify:"between",width:1,children:[(0,i.jsx)(jf,{...Jj(e.state),cursor:"text",ellipsis:!0,children:t(e.state)}),a&&(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:"chevron-down"})})]})}),(0,i.jsx)(Fp,{offset:2,placement:"bottom",width:230,children:(0,i.jsx)(Mv,{close:r,...e})})]})}):(0,i.jsx)(cx,{css:{border:"2px solid transparent"},minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(jf,{...Jj(e.state),children:t(e.state)})})},Dv=e=>{const t=(0,l.useMemo)(()=>e.volunteerRegistration.userInfo.tags||[],[e.volunteerRegistration]),n=(0,l.useMemo)(()=>t.map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:n})})},Ov=e=>{const{history:t,translate:n,params:{organizationId:a,eventId:s,segmentId:o}}=zg(),{isEditMode:r}=ty(),{mutate:d}=Ns(),c=(0,l.useMemo)(()=>e.volunteerRegistration.teams||[],[e.volunteerRegistration]),u=(0,l.useMemo)(()=>c.map(({teamCode:n})=>({id:n,color:"gray",icon:null,text:n,onClick:r?void 0:()=>{t.push(ig.VOLUNTEERS_LIST_USER_PANEL_TEAM(a,s,o,e.volunteerRegistration.userInfo.id,n))}})),[c,r]);return 1===c.length&&r?(0,i.jsx)(Tj,{column:e.column,css:{gap:"$2"},initialValue:c[0].teamCode,renderInput:(e,t)=>(0,i.jsx)(Ih,{label:n("code_quipe_14296"),value:e,onChange:t}),renderValue:()=>(0,i.jsx)(Fj,{badges:u}),onSave:async t=>{await d({eventId:s,volunteerRegistrationId:e.volunteerRegistration.id,slug:"team_code",value:t}),e.reload()}}):(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:u})})},wv=e=>{const{params:{organizationId:t,eventId:n}}=zg(),a=(0,l.useMemo)(()=>(0,mo.A)(e.teamMembers,e=>m(e.name)),[e.teamMembers]);return(0,i.jsx)($,{children:a.map((e,a)=>(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)($i,{css:{cursor:"pointer",position:"relative",left:-4*a+"px"},children:(0,i.jsx)(sa,{to:Ng.MEMBER_INFORMATION({organizationId:t,eventId:n,userInfoId:e.id}),children:(0,i.jsx)(Vp,{email:e.email,image:e.picture?.url,name:e.name,size:24})})})}),(0,i.jsx)(O_,{placement:"top",children:e.name})]},e.id))})},Pv=e=>{const t=(0,l.useMemo)(()=>(e.volunteerRegistration.userInfo.formsUsersInfos||[]).flatMap(e=>e.teamMembers||[]),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(wv,{teamMembers:t})})},$v=e=>{const t=(0,l.useMemo)(()=>(e.volunteerRegistration.weezaccessChecklists||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t})})},kv=e=>{const t=(0,l.useMemo)(()=>Jp((e.volunteerRegistration.userInfo.formsUsersInfos??[]).flatMap(e=>e.accreditationProfile?[e.accreditationProfile]:[])),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t,doNotSort:!0})})},Nv=e=>{const t=(0,l.useMemo)(()=>Kp(e.volunteerRegistration?.accreditationsSlots||[]),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:t,doNotSort:!0,onClick:e.onClick})})},zv=e=>{const t=bi(Wd),n=(0,l.useMemo)(()=>function(e,t,n,i){return(0,_r.A)(t,e=>e.id).map(e=>({id:`c-${e.id}`,color:"gray",icon:null,text:e.name})).concat((0,_r.A)(n,e=>e.id).map(e=>({id:`p-${e.id}`,color:e.color,icon:e.icon,text:h(e.acronym)?e.acronym:e.name}))).concat((0,_r.A)(i,e=>e.id).map(t=>{const n=h(t.position.acronym)?t.position.acronym:t.position.name,i=tu(e,t,n,{interval:{options:{formats:{localeFormat:Ya.DateOnly.Numeric}}}});return{id:`s-${t.id}`,color:t.position.color,icon:t.position.icon,text:`${n} | ${i}`}}))}(t,e.volunteerRegistration?.positionsCategories||[],e.volunteerRegistration?.positions||[],e.volunteerRegistration?.positionsSlots||[]),[e.volunteerRegistration]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:n,onClick:e.onClick})})},Lv=e=>{const{history:t,params:{organizationId:n,eventId:a}}=zg(),s=bi(gl),o=bi(Ld),r=(0,l.useMemo)(()=>function(e,t){return t.flatMap(t=>t.form?[`${t.form.name} : ${e.toLocaleString(t.insertedAt.toLocal(),Ya.DateTime)}`]:[]).join(", ")}(s,e.row.userInfo.formsUsersInfos||[]),[e.row]),{mutate:d}=Ns(),c=(0,l.useCallback)((t,n)=>d({eventId:e.eventId,volunteerRegistrationId:e.row.id,slug:n,value:t}),[e.eventId,e.row,d]),u=e.row.userInfo;switch(e.column.slug){case um.AccreditationProfile:return(0,i.jsx)(Kj,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAccredit,volunteerRegistration:e.row});case um.Accreditations:return(0,i.jsx)(Qj,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAccredit,volunteerRegistration:e.row,onClick:h(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/assigned`)}:void 0});case um.AccreditationsCategories:return(0,i.jsx)(Xj,{column:e.column,volunteerRegistration:e.row});case um.AccreditationState:return(0,i.jsx)(nv,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.accreditationState,updatable:e.canMemberAccredit,volunteerRegistrationId:e.row.id});case um.ScannedAccreditations:return(0,i.jsx)(Sv,{column:e.column,volunteerRegistration:e.row,onClick:h(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/scanned`)}:void 0});case"bracelet_a_delivrer":return(0,i.jsx)(fv,{column:e.column,volunteerRegistration:e.row});case um.Availability:return(0,i.jsx)(iv,{column:e.column,volunteerRegistration:e.row,onClick:h(e.availabilitiesPanelPath)?()=>{t.push(e.availabilitiesPanelPath)}:void 0});case um.Comments:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:F(u.comments)?u.comments.map(e=>e.content).join("; "):""});case um.CampaignsStates:return(0,i.jsx)(lv,{column:e.column,volunteerRegistration:e.row});case um.CheckedInPositions:return(0,i.jsx)(dv,{column:e.column,volunteerRegistration:e.row,onClick:h(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case um.CompletedForms:return(0,i.jsx)(pv,{column:e.column,volunteerRegistration:e.row});case um.FormsInsertedAt:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)($i,{css:{ellipsis:!0},title:r,children:r})});case um.Delegations:return(0,i.jsx)(gv,{column:e.column,reload:e.reloadRow,updatable:e.canChangeDelegation,volunteerRegistration:e.row});case um.DelegationBannerNumber:return(0,i.jsx)(av,{column:e.column,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,volunteerRegistration:e.row});case um.DuplicatedFrom:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.duplicatedFrom?(0,i.jsx)(vj,{size:32,userInfo:e.row.duplicatedFrom.userInfo}):null});case um.DelegationCategory:return(0,i.jsx)(hv,{column:e.column,volunteerRegistration:e.row});case um.Email:return(0,i.jsx)(qj,{clickPath:e.informationPanelPath??Ng.MEMBER_INFORMATION({organizationId:n,eventId:a,userInfoId:e.row.userInfo.id}),column:e.column,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:u});case um.Id:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:u.id});case um.LocalId:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId});case um.OrganizationLocalId:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:u.localId});case um.InsertedAt:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:s.toLocaleString(e.row.insertedAt.toLocal(),Ya.DateTime)});case um.Name:return(0,i.jsx)(Yj,{clickPath:e.informationPanelPath,column:e.column,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0,userInfo:e.row.userInfo});case um.NumberOfAccreditations:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAccreditations});case um.NumberOfAssignments:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignments});case um.NumberOfAssignmentsDays:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAssignmentsDays});case um.NumberOfAvailableDays:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.numberOfAvailableDays});case um.Positions:return(0,i.jsx)(Iv,{column:e.column,eventId:e.eventId,reload:e.reloadRow,updatable:e.canMemberAssign,volunteerRegistration:e.row,onClick:h(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/assigned`)}:void 0});case um.PositionsCategories:return(0,i.jsx)(_v,{column:e.column,volunteerRegistration:e.row});case um.PreassignedPositions:return(0,i.jsx)(xv,{column:e.column,volunteerRegistration:e.row});case um.PreassignedPositionsCategories:return(0,i.jsx)(yv,{column:e.column,volunteerRegistration:e.row});case um.Roles:return(0,i.jsx)(Hj,{minWidth:e.column.minWidth,userPermissions:e.row.userInfo,width:e.column.width});case um.Tags:return(0,i.jsx)(Dv,{column:e.column,volunteerRegistration:e.row});case um.TeamCode:return(0,i.jsx)(Ov,{column:e.column,reload:e.reloadRow,volunteerRegistration:e.row});case um.TeamMembers:return(0,i.jsx)(Pv,{column:e.column,volunteerRegistration:e.row});case um.VolunteerMinutes:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:o.minutesToHoursMinutesString(e.row.volunteerMinutes)});case um.VolunteerRegistrationState:return(0,i.jsx)(Rv,{column:e.column,eventId:e.eventId,field:e.column,reload:e.reloadRow,state:e.row.state,updatable:e.row.canRegistrationStateUpdate??!0,volunteerRegistrationId:e.row.id});case um.WishedAccreditationProfile:return(0,i.jsx)(kv,{column:e.column,volunteerRegistration:e.row});case um.WishedAccreditationSlots:return(0,i.jsx)(Nv,{column:e.column,volunteerRegistration:e.row,onClick:h(e.accreditationsPanelPath)?()=>{t.push(`${e.accreditationsPanelPath}/wished`)}:void 0});case um.WishedPositions:return(0,i.jsx)(zv,{column:e.column,volunteerRegistration:e.row,onClick:h(e.positionsPanelPath)?()=>{t.push(`${e.positionsPanelPath}/wished`)}:void 0});case um.WeezaccessChecklists:return(0,i.jsx)($v,{column:e.column,volunteerRegistration:e.row});case um.WeezeventBarcodeId:return(0,i.jsx)(ov,{column:e.column,volunteerRegistration:e.row});case um.WeezeventBarcodeVersion:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.ticketIdVersion});case um.WeezeventPairedAt:return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.pairedAt?.isValid?s.toLocaleString(e.row.pairedAt.toLocal(),Ya.DateTime):""});case um.WeezeventShortTag:return(0,i.jsx)(jv,{column:e.column,volunteerRegistration:e.row});default:return Object.values(um).includes(e.column.slug)?(console.error(`003: Unhandled default column ${e.column.slug}`),(0,i.jsx)(cx,{children:"ERR"})):e.column.slug.startsWith("form_inserted_at")?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:Sj(s,e.column.slug,e.row.userInfo.formsUsersInfos||[])}):Xu(e.column.slug)?(0,i.jsx)(mv,{column:e.column,eventId:e.eventId,reload:e.reloadRow,volunteerRegistration:e.row}):(0,i.jsx)(Wj,{avatarUser:e.row.userInfo,clickPath:e.informationPanelPath??Ng.MEMBER_INFORMATION({organizationId:n,eventId:a,userInfoId:e.row.userInfo.id}),column:e.column,customField:e.customField,fields:e.row.userInfo.fields,mutate:c,reload:e.reloadRow,updatable:e.row.userInfo.isEditable??!0})}},Fv=e=>(0,i.jsx)($i,{color:"gray800",css:{borderBottom:"1px solid $gray200",padding:"$6"},fontSize:"textXl",fontWeight:"medium",children:e.children}),Uv=({title:e,subtitle:t})=>(0,i.jsx)(px,{css:{height:"fit-content"},children:(0,i.jsx)(cx,{children:(0,i.jsxs)($,{align:"center",css:{padding:"$8 0"},direction:"column",justify:"center",width:1,children:[(0,i.jsx)(pf,{color:"primary",icon:"magnifying-glass"}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{color:"gray900",fontSize:"textMd",fontWeight:"medium",children:e}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray500",children:t})]})})}),Bv=(0,l.createContext)({}),Vv=e=>{const{mutate:t}=Ss(),{mutate:n}=Fs(),[a,s]=(0,l.useState)(e.volunteerRegistration.accreditationsUsersInfos.map(e=>e.accreditationSlot)),o=(0,l.useMemo)(()=>a.map(({id:e})=>e),[a]),[r,d]=(0,l.useState)(e.volunteerRegistration.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlot]:[])),[c,u]=(0,l.useState)(e.volunteerRegistration.accreditationsSlots),m=(0,l.useMemo)(()=>(0,mo.A)((0,_r.A)(a.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[a]),g=(0,l.useMemo)(()=>(0,mo.A)((0,_r.A)(r.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[r]),h=(0,l.useMemo)(()=>(0,mo.A)((0,_r.A)(c.map(e=>e.accreditationCategory),e=>e.id),e=>e.name.toLowerCase()),[c]),p=(0,l.useMemo)(()=>(0,_r.A)(a.map(e=>e.accreditation),e=>e.id),[a]),f=(0,l.useMemo)(()=>(0,_r.A)(r.map(e=>e.accreditation),e=>e.id),[r]),I=(0,l.useMemo)(()=>(0,_r.A)(c.map(e=>e.accreditation),e=>e.id),[c]),_=(0,l.useCallback)(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:Je.Delete}}),s(e=>e.filter(e=>e.id!==n)),d(e=>e.filter(e=>e.id!==n))},[e.eventId,e.userInfoId,s,d]),x=(0,l.useCallback)(async t=>{await n({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massAccredit:{accreditationsSlotsIds:[t],selecteds:{ids:[e.userInfoId]},strategy:Je.Delete}}),u(e=>e.filter(e=>e.id!==t))},[e.eventId,e.delegationId,e.userInfoId]),y=(0,l.useCallback)(async n=>{await t({eventId:e.eventId,massAccredit:{accreditationsSlotsIds:[n],selecteds:{ids:[e.userInfoId]},strategy:Je.Add}});const i=c.find(e=>e.id===n);s(e=>[...e,i])},[e.eventId,e.volunteerRegistration,c,s]),S=(0,l.useCallback)(t=>e.volunteerRegistration.accreditationsUsersInfos.find(e=>e.accreditationSlot.id===t).checkInAt,[e.volunteerRegistration]);return(0,i.jsx)(Bv.Provider,{value:{assignSlot:y,assignedAccreditations:p,assignedCategories:m,assignedSlots:a,assignedSlotsIds:o,canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,deleteAssignedSlot:_,deleteWishedSlot:x,scannedAccreditations:f,scannedCategories:g,scannedSlots:r,wishedAccreditations:I,wishedCategories:h,wishedSlots:c,getScannedAt:S},children:e.children})};function Gv(){return(0,l.useContext)(Bv)}const Wv=e=>{const{translate:t}=zg(),n=bi(gl),{assignSlot:a,assignedSlotsIds:s,canMemberAccredit:o,canWishedAccreditationsEdit:r,defaultHiddenAccreditationsSlotsIds:d,deleteAssignedSlot:c,deleteWishedSlot:u,getScannedAt:m}=Gv(),[g,h]=(0,l.useState)(!1);return"assigned"===e.state&&!e.isBlocked&&o?(0,i.jsx)($,{css:{flex:"1",px:"$4"},justify:"end",children:g?(0,i.jsx)(Dh,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,i.jsx)($i,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{h(!0),await c(e.accreditationSlotId)},children:t("retirer_05155")})}):"wished"===e.state&&o?(0,i.jsx)($,{css:{flex:"1",px:"$4"},justify:"end",children:s.includes(e.accreditationSlotId)?(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{color:"success500",children:(0,i.jsx)(ra,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("d_j_attribu_e_06450")})]}):e.isBlocked?null:(0,i.jsx)(ga,{isLoading:g,size:"sm",onClick:async()=>{h(!0),await a(e.accreditationSlotId),h(!1)},children:t("ajouter_97327")})}):"wished"!==e.state||!r||e.isBlocked||d.includes(e.accreditationSlotId)?"scanned"===e.state?(0,i.jsx)($,{css:{flex:"1",px:"$4"},children:(0,i.jsx)($i,{css:{ellipsis:!0},children:n.toLocaleString(m(e.accreditationSlotId),Ya.DateTime)})}):(0,i.jsx)($,{css:{flex:"1",px:"$4"}}):(0,i.jsx)($,{css:{flex:"1",px:"$4"},justify:"end",children:g?(0,i.jsx)(Dh,{borderRadius:"$1",height:20,children:t("retirer_05155")}):(0,i.jsx)($i,{css:{cursor:"pointer"},font:"error700 textSm medium",onClick:async()=>{h(!0),await u(e.accreditationSlotId)},children:t("retirer_05155")})})},qv=e=>{const t=bi(gl),{canDeleteCheckedIn:n,canMemberAccredit:a,canWishedAccreditationsEdit:s,scannedSlots:o}=Gv(),r="assigned"===e.state&&a||"scanned"===e.state||"wished"===e.state&&(a||s),d=h(e.slot.name)?e.slot.name:"-",c=(0,l.useMemo)(()=>e.slot.isBlocked?e.slot.isBlocked:!n&&o.some(t=>t.id===e.slot.id),[n,e.slot,o]);return(0,i.jsxs)(px,{children:[(0,i.jsx)(cx,{css:{textTransform:"capitalize"},children:e.slot.date?t.toLocaleString(e.slot.date,Ya.DateOnly.WeekdayShortMonthShort):"-"}),(0,i.jsx)(cx,{children:(0,i.jsx)($i,{css:{ellipsis:!0},title:d,width:1,children:d})}),r&&(0,i.jsx)(Wv,{accreditationSlotId:e.slot.id,isBlocked:c,state:e.state})]})},Yv=e=>{const{translate:t}=zg(),{assignedSlots:n,canDeleteCheckedIn:a,canMemberAccredit:s,canWishedAccreditationsEdit:o,scannedSlots:r,wishedSlots:d}=Gv(),c=(0,l.useMemo)(()=>(0,mo.A)(("assigned"===e.state?n:"scanned"===e.state?r:d).filter(t=>t.accreditationId===e.accreditation.id),e=>[e.date?.toMillis()??1,e.name?.toLowerCase()||""]),[n,r,d,e.accreditation,e.state]),u=(0,l.useMemo)(()=>!a&&r.some(t=>t.id===e.accreditation.hiddenSlotId),[a,e.accreditation,r]),m="assigned"===e.state&&s||"scanned"===e.state||"wished"===e.state&&(s||o);return(0,i.jsx)(uf,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:e.accreditation.hasSlots,numberOfSlots:c.length,renderActions:!e.accreditation.hasSlots&&m?()=>(0,i.jsx)(Wv,{accreditationSlotId:e.accreditation.hiddenSlotId,isBlocked:u,state:e.state}):void 0,children:(0,i.jsxs)(fx,{hideBorder:!0,children:[(0,i.jsxs)(mx,{children:[(0,i.jsx)(ux,{children:t("date_du_cr_neau_82295")}),(0,i.jsx)(ux,{children:t("nom_du_cr_neau_54351")}),m&&(0,i.jsx)(ux,{children:"scanned"===e.state&&t("scann_e_le_27812")})]}),c.map(t=>(0,i.jsx)(qv,{slot:t,state:e.state},t.id))]})})},Hv=e=>{const{assignedAccreditations:t,scannedAccreditations:n,wishedAccreditations:a}=Gv(),s=(0,l.useMemo)(()=>Xp(("assigned"===e.state?t:"scanned"===e.state?n:a).filter(t=>t.accreditationCategoryId===e.category.id)),[t,a,e.category,e.state]);return(0,i.jsx)(wf,{category:e.category.name,children:s.map(t=>(0,i.jsx)(Yv,{accreditation:t,state:e.state},t.id))})},Zv=e=>{const t=Ai(),{assignedCategories:n,scannedCategories:a,wishedCategories:s}=Gv(),o="assigned"===e.state?n:"scanned"===e.state?a:s;return(0,i.jsx)(Ef,{children:F(o)?o.map(t=>(0,i.jsx)(Hv,{category:t,state:e.state},t.id)):(0,i.jsx)(Uv,{title:t("no_accreditations")})})},Kv=e=>{const{translate:t}=zg();return(0,i.jsx)(Vv,{canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegationId,eventId:e.eventId,organizationId:e.organizationId,userInfoId:e.volunteerRegistration.userInfo.id,volunteerRegistration:e.volunteerRegistration,children:(0,i.jsxs)(xy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Fv,{children:t("accr_ditations_04710",e.volunteerRegistration.userInfo.name)}),(0,i.jsx)(yy,{css:{padding:"0"},children:(0,i.jsxs)(Kx,{height:1,children:[(0,i.jsxs)(Hx,{center:!0,children:[(0,i.jsx)(Yx,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,i.jsx)(Yx,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")}),(0,i.jsx)(Yx,{path:`${e.basePath}/scanned`,children:t("scann_es_13169")})]}),(0,i.jsx)(Zx,{path:`${e.basePath}/assigned`,children:(0,i.jsx)(Zv,{state:"assigned"})}),(0,i.jsx)(Zx,{path:`${e.basePath}/wished`,children:(0,i.jsx)(Zv,{state:"wished"})}),(0,i.jsx)(Zx,{path:`${e.basePath}/scanned`,children:(0,i.jsx)(Zv,{state:"scanned"})})]})})]})})},Qv=j($i,{overflow:"hidden",textOverflow:"ellipsis",color:"$gray500",fontSize:"$textSm",fontWeight:"$regular","@tablet":{fontSize:"$textSm"}}),Xv=e=>{const t=bi(Sl);switch(e.field.fieldType){case ze.File:{const n=t.getValue(e.field,e.fields);return n?(0,i.jsx)(uI,{acl:"public-read",document:n}):(0,i.jsx)(Qv,{children:"-"})}case ze.Phone:{const n=t.getValueString(e.field,e.fields);return(0,i.jsx)(Qv,{children:h(n)?(0,i.jsx)($h,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:`tel:${n}`,children:n}):"-"})}case ze.Select:{const n=t.getSelectCustomFieldValues(e.field,e.fields);return(0,i.jsx)($,{align:"center",gap:"3",wrap:"wrap",children:n.map(({value:t,color:n},a)=>e.field.listType===Ke.Dot?(0,i.jsx)($j,{color:n||"",children:t},a):(0,i.jsx)(jf,{color:e.field.listType===Ke.Badge?n||"":"gray",children:t},a))})}default:{const n=t.getValueString(e.field,e.fields);return(0,i.jsx)(Qv,{children:h(n)?URL.canParse(n)?(0,i.jsx)($h,{css:{display:"block",overflow:"hidden",textOverflow:"ellipsis"},hideIcon:!0,to:n,children:n}):n:"-"})}}},Jv=e=>(0,i.jsx)($i,{color:"gray800",css:{overflow:"hidden",textOverflow:"ellipsis",...e.css},fontSize:"textSm",fontWeight:"medium",children:e.children}),eb=e=>(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Jv,{children:e.field.name}),(0,i.jsx)(Xv,{field:e.field,fields:e.fields})]}),tb=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>e.form.elements.flatMap(e=>e.elementType===Be.Field?[e.customField]:e.hasCondition&&e.conditionCustomField?[e.conditionCustomField]:[]),[e.form]),a=(0,l.useMemo)(()=>e.form.elements.filter(t=>t.elementType===Be.Field?vl(t.customField,e.userInfo.fields,n):t.elementType===Be.Section&&vl(t,e.userInfo.fields,n)),[n,e.form.elements,e.userInfo.fields]),s="all"!==e.form.id?(o=e.form.id,{name:t("commentaire_r_12290"),slug:`form${o}`,fieldType:ze.Textarea,listType:Ke.Default,values:[]}):null;var o;return(0,i.jsxs)($,{css:e.css,direction:"column",children:[a.map((t,n)=>{switch(t.elementType){case Be.Field:return(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(eb,{field:t.customField,fields:e.userInfo.fields}),n!==a.length-1&&(0,i.jsx)(Hg,{height:"6"})]},t.id);case Be.Section:return(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)($i,{color:"gray800",fontWeight:"semiBold",children:t.section}),n!==a.length-1&&(0,i.jsx)(Hg,{height:"4"})]},t.id);case Be.Text:return null;default:return tr(t.elementType)}}),s&&h(e.userInfo.fields[s.slug])&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($i,{color:"gray800",fontWeight:"semiBold",children:t("inscription_en_49989")}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)(eb,{field:s,fields:e.userInfo.fields})]})]})},nb=e=>{const{data:t,loader:n}=Ei("query DelegationMemberRightPanel(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $formId: FormId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n id\n name\n email\n fields\n picture {\n url\n }\n\n formUserInfo(formId: $formId) {\n insertedAt\n form {\n ...FormMemberRegistration\n }\n }\n }\n }\n}\n",{organizationId:e.organizationId,userInfoId:e.userInfoId,formId:e.delegation.form.id},[ka.FormMemberRegistrationFragment]);return(0,i.jsx)(xy,{returnToFallback:e.returnPathFallback,size:"md",children:n||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Fv,{children:(0,i.jsx)(vj,{areContactLinksEnabled:!0,isClickDisabled:!0,size:48,userInfo:t.organization.userInfo})}),(0,i.jsx)(yy,{css:{background:"$gray50",py:"$6"},children:(0,i.jsx)(yp,{children:(0,i.jsx)(tb,{form:t.organization.userInfo.formUserInfo.form,userInfo:t.organization.userInfo})})})]})})},ib=e=>(0,i.jsxs)(Rp,{isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,i.jsx)(Up,{children:e.triggerElem||(0,i.jsx)($,{align:"center",css:{cursor:"pointer"},height:20,justify:"center",width:20,children:(0,i.jsx)(ra,{icon:"ellipsis-vertical"})})}),(0,i.jsx)(Fp,{placement:"bottom-end",children:e.children})]}),ab=e=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:e.isChecked?"checked":"unchecked",onClick:e.onClick,children:e.text}),e.isChecked&&e.children&&(0,i.jsx)($,{css:{paddingBottom:"$3",paddingLeft:"$6"},gap:"4",children:e.children})]}),sb=e=>{const{translate:t}=zg(),{mutate:n}=bs(),[a,s]=(0,l.useState)(ce.CheckInOut),[o,r]=(0,l.useState)(e.positionSlotUserInfo.checkInAt?.toLocal()),[d,c]=(0,l.useState)(e.positionSlotUserInfo.checkOutAt?.toLocal()),[u,m]=(0,l.useState)(e.positionSlotUserInfo.breakTime),[g,h]=(0,l.useState)(!1),p=(0,l.useMemo)(()=>Za(),[]),f=a===ce.Reset||o?.isValid&&d?.isValid&&d>o||o?.isValid&&!d?.isValid;return(0,i.jsx)(Ca,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(Aa,{children:[(0,i.jsx)(ba,{icon:"sliders",children:t("mise_jour_du_76261")}),(0,i.jsxs)(va,{gap:"2",children:[(0,i.jsx)($i,{font:"gray700 textSm medium",children:t("que_souhaitez_v_87607")}),(0,i.jsxs)(ab,{isChecked:a===ce.CheckInOut,text:t("mettre_jour_l_00128"),onClick:()=>{s(ce.CheckInOut)},children:[(0,i.jsx)(qf,{hint:t("date_et_heure_d_93417"),rightIcon:"xmark",value:o,zone:p,onChange:r,onRightIconClick:()=>r(null)}),(0,i.jsx)(qf,{hint:t("date_et_heure_d_65738"),rightIcon:"xmark",value:d,zone:p,onChange:c,onRightIconClick:()=>c(null)}),(0,i.jsx)(Ih,{hint:t("temps_de_pause_00051"),shouldParseAsInt:!0,value:u,onChange:m})]}),(0,i.jsx)(ab,{isChecked:a===ce.Reset,text:t("remettre_z_ro_11572"),onClick:()=>{s(ce.Reset)}})]}),(0,i.jsx)(ja,{children:s=>(0,i.jsx)(ga,{disabled:!f,isLoading:g,onClick:async()=>{h(!0),await n({eventId:e.positionSlotUserInfo.eventId,checkIn:{breakTime:u,checkInAt:o?.toUTC(),checkOutAt:d?.toUTC(),strategy:a,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),s()},children:t("mettre_jour_85141")})})]})})},ob=e=>{const{translate:t}=zg(),{mutate:n}=bs(),{mutate:a}=$s(),[s,o]=(0,l.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ib,{triggerElem:e.triggerElem,children:[e.canCheckIn&&(0,i.jsx)(zp,{icon:"circle-check",onClick:()=>o(!0),children:t("mettre_jour_l_00128")}),e.canCheckIn&&e.psui.state!==de.Waiting&&(0,i.jsx)(zp,{icon:"arrows-rotate",onClick:async()=>{await n({eventId:e.psui.eventId,checkIn:{strategy:ce.Reset,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reloadCheckIn(e.psui.id)},children:t("remettre_z_ro_11572")}),e.canDelete&&(0,i.jsx)(zp,{color:"red",icon:"user-xmark",onClick:async()=>{await a({eventId:e.psui.eventId,massAssign:{positionsSlotsIds:[e.psui.positionSlotId],selecteds:{ids:[e.psui.userInfoId]},strategy:Je.Delete}}),e.onDelete(e.psui.id)},children:t("d_saffecter_du_47122")})]}),(0,i.jsx)(sb,{isOpen:s,positionSlotUserInfo:e.psui,onClose:()=>{e.reloadCheckIn(e.psui.id),o(!1)}})]})},rb=e=>{const{translate:t}=zg(),n=bi(gl),a=bi(Ld),s=bi(Wd),{mutate:o}=bs(),r=bp(),d=(0,l.useMemo)(()=>{const t=e.positionSlotUserInfo.positionSlot;return h(t.name)?`${t.name} - ${s.toDisplayString(t.range)}`:s.toDisplayString(t.range)},[e.positionSlotUserInfo.positionSlot]),c=()=>(0,i.jsxs)($,{align:"center",css:{padding:"$3","@tablet":{padding:"$3 $4"}},gap:"3",width:1,wrap:"wrap",children:[(0,i.jsx)(cf,{color:e.positionSlotUserInfo.position.color,icon:e.positionSlotUserInfo.position.icon}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{color:"gray800",css:{fontWeight:"$medium",overflow:"hidden",textOverflow:"ellipsis","@tablet":{fontWeight:"$semiBold"}},children:e.positionSlotUserInfo.position.name}),(0,i.jsx)($i,{color:"gray500",fontSize:"textSm",children:d})]})]});return(0,i.jsxs)($,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs","@tablet":{borderRadius:"$2"}},direction:"column",width:1,children:[e.canCheckIn?(0,i.jsx)(sa,{to:Fm.POSITION({organizationId:e.positionSlotUserInfo.organizationId,eventId:e.positionSlotUserInfo.eventId,positionId:e.positionSlotUserInfo.position.id}),children:c()}):c(),(e.canCheckIn||e.canDelete)&&(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$3","@tablet":{padding:"$3 $4"}},justify:"between",width:1,children:[e.positionSlotUserInfo.state===de.CheckedOut?(0,i.jsx)(jf,{leftIcon:"clock",children:t("temps_total_79448",a.minutesToHoursMinutesString(e.positionSlotUserInfo.timeDifferenceMinutes))}):e.positionSlotUserInfo.state===de.CheckedIn?(0,i.jsx)(jf,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",n.toLocaleString(e.positionSlotUserInfo.checkInAt.toLocal(),r?Ya.ShortDateTime:Ya.DateTime))}):(0,i.jsx)(jf,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")}),(0,i.jsxs)($,{gap:"3",children:[e.canCheckIn&&e.positionSlotUserInfo.state===de.Waiting&&(0,i.jsx)(ga,{size:"sm",onClick:async()=>{await o({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:ce.CheckIn,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("pointer_80927")}),e.canCheckIn&&e.positionSlotUserInfo.state===de.CheckedIn&&(0,i.jsx)(ga,{color:"white",size:"sm",onClick:async()=>{await o({eventId:e.positionSlotUserInfo.eventId,checkIn:{strategy:ce.CheckOut,positionsSlotsUsersInfosIds:[e.positionSlotUserInfo.id]}}),e.reloadCheckIn(e.positionSlotUserInfo.id)},children:t("d_pointer_25328")}),(0,i.jsx)(ob,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,psui:e.positionSlotUserInfo,reloadCheckIn:e.reloadCheckIn,triggerElem:(0,i.jsx)($i,{children:(0,i.jsx)(ga,{color:"white",rightIcon:"ellipsis-vertical",size:"sm"})}),onDelete:e.onDelete})]})]})]})},lb=(0,l.createContext)({}),db=e=>{const{data:t}=As({organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.volunteerRegistration.userInfo.id}),[n,a]=(0,l.useState)(e.volunteerRegistration.positionsSlotsUsersInfos),s=(0,l.useMemo)(()=>(0,mo.A)((0,_r.A)(n.map(e=>e.positionCategory),e=>e.id),e=>e.name.toLowerCase()),[n]),o=(0,l.useCallback)(e=>{a(t=>t.filter(t=>t.id!==e))},[a]),r=(0,l.useCallback)(async t=>{const i=n.find(e=>e.id===t),{event:{volunteerRegistration:{positionSlotUserInfo:s}}}=await(o={eventId:e.eventId,volunteerRegistrationId:e.volunteerRegistration.id,positionSlotId:i.positionSlot.id},r=await us(),_s("query PositionSlotUserInfo(\n $eventId: EventId!\n $volunteerRegistrationId: VolunteersRegistrationId!\n $positionSlotId: PositionsSlotId!\n) {\n event(id: $eventId) {\n volunteerRegistration(id: $volunteerRegistrationId) {\n positionSlotUserInfo(positionSlotId: $positionSlotId) {\n ...UserPositionSlotUserInfo\n }\n }\n }\n}\n",{variables:o,token:r||void 0,fragments:[ka.UserPositionSlotUserInfoFragment]}));var o,r;a(e=>e.map(e=>e.id===t?s:e))},[e.eventId,e.volunteerRegistration,n,a]);return(0,i.jsx)(lb.Provider,{value:{assignedCategories:s,assignedPsuis:n,canCheckIn:e.canCheckIn,canDelete:e.canDelete,formsUsersInfos:t.organization?.userInfo.formsUsersInfos??[],onAssignedPsuiDelete:o,reloadCheckIn:r},children:e.children})};function cb(){return(0,l.useContext)(lb)}const ub=()=>{const{assignedCategories:e,assignedPsuis:t,canCheckIn:n,canDelete:a,onAssignedPsuiDelete:s,reloadCheckIn:o}=cb(),r=(0,l.useMemo)(()=>(0,Zd.A)(t,e=>e.positionCategory.id),[t]);return(0,i.jsx)(Ef,{children:e.map(e=>{const t=r[e.id];return(0,i.jsx)(wf,{category:e.name,children:t.map(e=>(0,i.jsx)(rb,{canCheckIn:"function"==typeof n?n(e.positionCategoryId,e.position.id):n,canDelete:a(e.positionCategoryId,e.position.id),positionSlotUserInfo:e,reloadCheckIn:o,onDelete:s},e.id))},e.id)})})},mb=({css:e,filters:t,headerCells:n,limit:a,numberOfPages:s,offset:o,rows:r,setLimit:l,setOffset:d,showLimits:c=!1,showPagination:u=!0,title:m,totalCount:g})=>{const{designSystem:h}=Zs(),p=(c||u)&&"number"==typeof s&&"number"==typeof o&&"function"==typeof d&&(g??0)>0;return(0,i.jsxs)($i,{css:{...e},children:[(0,i.jsxs)($,{align:"center",css:{background:"white",border:"1px solid $gray200",borderBottom:"none",borderTopLeftRadius:"$2",borderTopRightRadius:"$2",padding:"$3 $6"},gap:"3",children:[m&&(0,i.jsx)($i,{color:"gray900",css:{flex:"1"},fontSize:h===Ys?"textMd":"textLg",fontWeight:"medium",children:m}),t]}),(0,i.jsxs)(fx,{role:"grid",children:[(0,i.jsx)(mx,{css:{borderRadius:"0 !important",borderTop:"1px solid $gray200"},children:n}),r,p&&(0,i.jsx)(Ij,{children:(0,i.jsx)(fj,{limit:a,numberOfPages:s,offset:o,setLimit:l,setOffset:d,showLimits:c,totalCount:g??0})})]})]})},gb=({message:e,title:t})=>(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t}),(0,i.jsx)(th,{children:e})]}),hb=({editDisabled:e,eventId:t,form:n,organizationId:a})=>{const s=Ri();return(0,i.jsx)(jf,{color:"primary",cursor:e?"default":"pointer",onContentClick:()=>{e||s.push(yc.FORM_ELEMENTS({organizationId:a,eventId:t??void 0,formId:n.id}))},children:n.name})},pb=({canMemberAssign:e,editPath:t,formsUsersInfos:n,isEditDisabled:a=!1})=>{const{history:s,params:{organizationId:o,eventId:r},translate:d}=zg(),c=bi(Wd),u=(0,l.useMemo)(()=>function(e,t,n,i){return(0,mo.A)(e.map(e=>{const a=e.positions.map((a,s)=>({name:a.name,category:a.category.name,range:a.range?t.toDisplayString(a.range):"-",path:Fm.POSITION({organizationId:n,eventId:i,positionId:a.id}),form:e.form,rank:s+1})),s=e.positionsCategories.map((a,s)=>({name:a.name,category:"",range:a.range?t.toDisplayString(a.range):"-",path:Fm.POSITION_CATEGORY({organizationId:n,eventId:i,positionCategoryId:a.id}),form:e.form,rank:s+1})),o=e.positionsSlots.map((t,a)=>({name:t.position.name,category:t.positionCategory.name,range:t.nameOrRange,path:Fm.POSITION({organizationId:n,eventId:i,positionId:t.position.id}),form:e.form,rank:a+1}));return a.concat(s).concat(o)}).flat(),[e=>e.form.name,(e,t)=>t])}(n,c,o,r),[n]),m=bp();return(0,i.jsxs)($,{direction:"column",gap:"6",width:1,children:[a&&(0,i.jsx)(gb,{message:d("you_are_already_assigned_to_missions"),title:d("wished_positions_can_no_longer_be_changed")}),(0,i.jsx)(mb,{filters:e&&h(t)&&(0,i.jsx)(ga,{color:"white",disabled:a,size:"sm",to:t,children:d("_diter_62574")}),headerCells:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ux,{children:d("nom_de_la_missi_64605")}),!m&&(0,i.jsx)(ux,{children:d("Date")}),!m&&(0,i.jsx)(ux,{children:d("Form")})]}),numberOfPages:0,offset:0,rows:(0,i.jsx)(i.Fragment,{children:F(u)?u.map((e,t)=>(0,i.jsxs)(px,{children:[(0,i.jsxs)(cx,{align:"start",direction:"column",gap:"1",justify:"center",children:[h(e.category)&&(0,i.jsx)($i,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.category}),(0,i.jsx)($i,{css:{cursor:"pointer"},font:"gray900 textSm medium",onClick:()=>{s.push(e.path)},children:e.name}),e.form.positionRanking===Ve.Ranked&&(0,i.jsx)($i,{color:"gray500",children:d("choix_n_1_00613",e.rank)}),m&&(0,i.jsx)($i,{color:"gray500",children:e.range})]}),!m&&(0,i.jsx)(cx,{children:e.range}),!m&&(0,i.jsx)(cx,{children:(0,i.jsx)(hb,{editDisabled:a,eventId:r,form:e.form,organizationId:o})})]},t)):(0,i.jsx)(px,{css:{height:"200px"},children:(0,i.jsx)(cx,{children:(0,i.jsx)(Tf,{title:d("aucune_mission_61179")})})})}),setOffset:yh.A,title:d("missions_souhai_23225"),totalCount:0})]})},fb=()=>{const{formsUsersInfos:e}=cb();return(0,i.jsx)($,{css:{background:"$gray50",padding:"$6"},height:1,width:1,children:(0,i.jsx)(pb,{canMemberAssign:!1,formsUsersInfos:e})})},Ib=e=>{const{translate:t}=zg();return(0,i.jsx)(db,{canCheckIn:e.canCheckIn,canDelete:e.canDelete,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,children:(0,i.jsxs)(xy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Fv,{children:t("missions_de_1_99317",e.volunteerRegistration.userInfo.name)}),(0,i.jsx)(yy,{css:{padding:"0"},children:(0,i.jsxs)(Kx,{height:1,children:[(0,i.jsxs)(Hx,{center:!0,children:[(0,i.jsx)(Yx,{path:`${e.basePath}/assigned`,children:t("attribu_es_48167")}),(0,i.jsx)(Yx,{path:`${e.basePath}/wished`,children:t("souhait_es_78101")})]}),(0,i.jsx)(Zx,{path:`${e.basePath}/assigned`,children:(0,i.jsx)(ub,{})}),(0,i.jsx)(Zx,{path:`${e.basePath}/wished`,children:(0,i.jsx)(fb,{})})]})})]})})},_b=l.createContext({}),xb=e=>{const{data:t,loader:n}=Ei("query TeamRightPanel($eventId: EventId!, $teamCode: TeamCode!) {\n event(id: $eventId) {\n team(teamCode: $teamCode) {\n form {\n name\n }\n\n members {\n ...UserInfoTeamRightPanel\n }\n }\n }\n}\n",{eventId:e.eventId,teamCode:e.teamCode},[ka.UserInfoTeamRightPanelFragment]);const{mutate:a}=$s(),[s,o]=l.useState([]),r=l.useMemo(()=>{const e=s.flatMap(e=>e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,D.A)(e,["id","name","icon","color"])}))))),t=s.flatMap(e=>e.positions.flatMap(e=>e.slots.map(t=>({...t,position:(0,D.A)(e,["id","name","icon","color"])})))),n=s.flatMap(e=>e.positionsSlots);return(0,_r.A)(e.concat(t).concat(n),e=>e.id)},[s]),d=l.useMemo(()=>(0,_r.A)(s.flatMap(e=>e.positionsSlotsUsersInfos.map(e=>({...e.positionSlot,position:e.position}))),e=>e.id),[s]),c=l.useMemo(()=>(0,mo.A)((0,_r.A)(r.concat(d),e=>e.id),e=>[e.position.name.toLowerCase(),e.range.start.toMillis()]),[r,d]),u=l.useMemo(()=>Object.fromEntries(s.map(e=>{const t=(0,$a.A)(e.positionsCategories.flatMap(e=>e.positions.flatMap(e=>e.slots.map(e=>e.id))).concat(e.positions.flatMap(e=>e.slots.map(e=>e.id))).concat(e.positionsSlots.map(e=>e.id)));return[e.userInfo.id,t]})),[s]),m=l.useMemo(()=>Object.fromEntries(s.map(e=>{const t=e.positionsSlotsUsersInfos.map(e=>e.positionSlot.id);return[e.userInfo.id,t]})),[s]),g=l.useCallback(async(t,n)=>{await a({eventId:e.eventId,massAssign:{positionsSlotsIds:[n],selecteds:{ids:[t]},strategy:Je.Add}});const{event:i}=await function(e,t){return _s("query TeamRightPanelMember($eventId: EventId!, $userInfoId: UsersInfoId!) {\n event(id: $eventId) {\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...UserInfoTeamRightPanel\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[ka.UserInfoTeamRightPanelFragment]})}({eventId:e.eventId,userInfoId:t},await us());o(e=>e.map(e=>e.userInfo.id===t?i.volunteerRegistration:e))},[e.eventId,o]);return l.useEffect(()=>{o(t.event?.team?.members??[])},[t.event,o]),(0,i.jsx)(_b.Provider,{value:{allSlots:c,form:t.event?.team?.form,loader:n,memberIdToAssignedSlotsIds:m,memberIdToWishedSlotsIds:u,members:s,assign:g},children:e.children})};function yb(){return l.useContext(_b)}const Sb=e=>{const{translate:t}=zg(),{assign:n,memberIdToAssignedSlotsIds:a,memberIdToWishedSlotsIds:s}=yb(),[o,r]=(0,l.useState)(!1),d=a[e.member.userInfo.id].includes(e.slot.id),c=s[e.member.userInfo.id].includes(e.slot.id);return(0,i.jsxs)(px,{children:[(0,i.jsx)(cx,{children:(0,i.jsx)(vj,{size:32,userInfo:e.member.userInfo})}),(0,i.jsx)(cx,{justify:"end",children:d?(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{color:"success500",children:(0,i.jsx)(ra,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("d_j_affect_71706")})]}):c?(0,i.jsx)(ga,{isLoading:o,size:"sm",onClick:()=>{r(!0),n(e.member.userInfo.id,e.slot.id)},children:t("affecter_94255")}):(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{color:"error500",children:(0,i.jsx)(ra,{icon:"circle-xmark",iconStyle:"solid"})}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("non_souhait_46147")})]})})]})},jb=e=>{const{translate:t}=zg(),{members:n}=yb(),a=bi(Wd),s=(0,l.useMemo)(()=>tu(a,e.slot,e.slot.position.name,{slot:{includeRange:!0}}),[e.slot]);return(0,i.jsxs)($,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,i.jsxs)($,{css:{padding:"$3 $4"},gap:"3",children:[(0,i.jsx)(cf,{color:e.slot.position.color,icon:e.slot.position.icon}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)($i,{font:"gray800 textSm semiBold",children:e.slot.position.name}),(0,i.jsx)($i,{color:"gray500",children:s})]})]}),(0,i.jsxs)(fx,{hideBorder:!0,children:[(0,i.jsxs)(mx,{children:[(0,i.jsx)(ux,{children:t("full_name")}),(0,i.jsx)(ux,{})]}),n.map(t=>(0,i.jsx)(Sb,{member:t,slot:e.slot},t.userInfo.id))]})]})},vb=()=>{const{allSlots:e}=yb();return(0,i.jsx)($,{direction:"column",gap:"3",width:1,children:e.map(e=>(0,i.jsx)(jb,{slot:e},e.id))})},bb=e=>{const{translate:t}=zg(),{form:n,loader:a}=yb();return(0,i.jsxs)(xy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Fv,{children:(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)($i,{children:t("_quipe_1_19590",e.teamCode)}),(0,i.jsx)($i,{color:"gray500",fontSize:"textSm",children:t("formulaire_1_39637",n?.name)})]})}),(0,i.jsx)(yy,{css:{background:"$gray50",py:"$6"},children:a||(0,i.jsx)(vb,{})})]})},Ab=e=>(0,i.jsx)(xb,{eventId:e.eventId,teamCode:e.teamCode,children:(0,i.jsx)(bb,{...e})}),Cb=({editPath:e,eventId:t,organizationId:n,formsUsersInfos:a,showEditButton:s,isEditDisabled:o=!1})=>{const{translate:r}=zg(),d=bi(gl),c=bi(Wd),u=(0,l.useMemo)(()=>(0,mo.A)(a.flatMap(e=>e.slots.map(t=>({range:t.range,display:e.form.slotDisplay,form:e.form}))),({range:e})=>e.start.toMillis()),[a]),m=bp(),g=(0,l.useCallback)((e,t)=>{switch(t){case At.Calendar:case At.DisplayDays:return(0,i.jsx)($i,{children:d.toLocaleString(e.start,Ya.DateOnly.MonthLong)});case At.Display:case At.Custom:return(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)($i,{css:{lineHeight:"20px"},children:c.toDisplayString(e,{hideTime:!0})}),(0,i.jsx)($i,{color:"gray500",css:{fontWeight:400,lineHeight:"20px"},fontSize:"textSm",children:c.toDisplayString(e,{hideDate:!0})})]});case At.Hide:return null;default:return tr()}},[]);return(0,i.jsxs)($,{direction:"column",gap:"6",children:[o&&(0,i.jsx)(gb,{message:r("you_are_already_assigned_to_missions"),title:r("availabilities_can_no_longer_be_changed")}),(0,i.jsx)(mb,{filters:s&&(0,i.jsx)(ga,{color:"white",disabled:o,size:"sm",to:e,children:r("_diter_62574")}),headerCells:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ux,{children:r("Date")}),!m&&(0,i.jsx)(ux,{children:r("Form")})]}),numberOfPages:0,offset:0,rows:(0,i.jsx)(i.Fragment,{children:F(u)?u.map((e,a)=>(0,i.jsxs)(px,{children:[(0,i.jsx)(cx,{children:g(e.range,e.display)}),!m&&(0,i.jsx)(cx,{children:(0,i.jsx)(hb,{editDisabled:o,eventId:t,form:e.form,organizationId:n})})]},a)):(0,i.jsx)(px,{css:{height:"200px"},children:(0,i.jsx)(cx,{children:(0,i.jsx)(Tf,{title:r("aucune_disponib_15602")})})})}),setOffset:yh.A,title:r("disponibilit_s_49923"),totalCount:0})]})},Eb=e=>{const t=Ai(),{data:n,loader:a}=Ei("query UserOverlaySlots(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n ...FormsUsersInfosWished\n }\n }\n\n event(id: $eventId) {\n hasFormWithSlotDisplay\n }\n}\n",{organizationId:e.organizationId,eventId:e.eventId,userInfoId:e.userInfoId},[ka.FormsUsersInfosWishedFragment]);const{permissions:[s],isLoading:o}=function(...e){return Ev({withCaching:!0,checks:e})}(((...e)=>({name:"canUserInfoSlotsUpdateFn",args:e}))({eventId:e.eventId,userInfoId:e.userInfoId}));return(0,i.jsxs)(xy,{returnToFallback:e.returnPathFallback,size:"md",children:[(0,i.jsx)(Fv,{children:t("disponibilit_s_49923")}),(0,i.jsx)(yy,{children:a||o?a:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(Cb,{editPath:ig.EDIT_USER_SLOTS(e.organizationId,e.eventId,e.userInfoId),eventId:e.eventId,formsUsersInfos:n.organization.userInfo.formsUsersInfos,organizationId:e.organizationId,showEditButton:s}),(0,i.jsx)(Hg,{height:"6"})]})})]})},Tb=e=>{const{history:t,params:{organizationId:n}}=zg();return(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{path:e.accreditationsPanelPath,children:(0,i.jsx)(Kv,{basePath:e.accreditationsPanelPath,canDeleteCheckedIn:e.canDeleteCheckedIn,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:e.canWishedAccreditationsEdit,defaultHiddenAccreditationsSlotsIds:e.defaultHiddenAccreditationsSlotsIds,delegationId:e.delegation?.id,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(0,i.jsx)(oo.qh,{path:e.availabilitiesPanelPath,children:(0,i.jsx)(Eb,{delegationId:e.delegation?.id,eventId:e.eventId,organizationId:e.organizationId,returnPathFallback:e.availabilitiesPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),e.informationPanelPath&&e.delegation&&(0,i.jsx)(oo.qh,{path:e.informationPanelPath,children:(0,i.jsx)(nb,{delegation:e.delegation,organizationId:n,returnPathFallback:e.informationPanelPath,userInfoId:e.volunteerRegistration.userInfo.id})}),(0,i.jsx)(oo.qh,{path:e.positionsPanelPath,children:(0,i.jsx)(Ib,{basePath:e.positionsPanelPath,canCheckIn:e.canCheckIn,canDelete:e.canDeletePosition,eventId:e.eventId,organizationId:e.organizationId,volunteerRegistration:e.volunteerRegistration,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})}),(e.teamsPanelsPath||[]).map((n,a)=>(0,i.jsx)(oo.qh,{path:n,children:(0,i.jsx)(Ab,{eventId:e.eventId,teamCode:(e.volunteerRegistration.teams||[])[a].teamCode,onClose:()=>{e.reloadRow(),t.goBack(e.returnPathFallback)}})},a))]})},Mb=j("span",{variants:{color:{inherit:{color:"inherit"},cyan:{color:"$cyan"},gray25:{color:"$gray25"},gray50:{color:"$gray50"},grayCustom50:{color:"$grayCustom50"},gray100:{color:"$gray100"},gray200:{color:"$gray200"},gray300:{color:"$gray300"},gray400:{color:"$gray400"},gray500:{color:"$gray500"},grayCustom500:{color:"$grayCustom500"},gray600:{color:"$gray600"},gray700:{color:"$gray700"},grayCustom700:{color:"$grayCustom700"},gray800:{color:"$gray800"},grayCustom800:{color:"$grayCustom800"},gray900:{color:"$gray900"},grayCustom900:{color:"$grayCustom900"},grayDark50:{color:"$grayDark50"},grayDark100:{color:"$grayDark100"},grayDark500:{color:"$grayDark500"},grayDark700:{color:"$grayDark700"},primary25:{color:"$primary25"},primary50:{color:"$primary50"},primary100:{color:"$primary100"},primary200:{color:"$primary200"},primary300:{color:"$primary300"},primary400:{color:"$primary400"},primary500:{color:"$primary500"},primaryCustom500:{color:"$primaryCustom500"},primary600:{color:"$primary600"},primaryCustom600:{color:"$primaryCustom600"},primary700:{color:"$primary700"},primary800:{color:"$primary800"},primary900:{color:"$primary900"},primary950:{color:"$primary950"},error25:{color:"$error25"},error50:{color:"$error50"},error100:{color:"$error100"},error200:{color:"$error200"},error300:{color:"$error300"},error400:{color:"$error400"},error500:{color:"$error500"},error600:{color:"$error600"},error700:{color:"$error700"},error800:{color:"$error800"},error900:{color:"$error900"},warning25:{color:"$warning25"},warning50:{color:"$warning50"},warning100:{color:"$warning100"},warning200:{color:"$warning200"},warning300:{color:"$warning300"},warning400:{color:"$warning400"},warning500:{color:"$warning500"},warning600:{color:"$warning600"},warning700:{color:"$warning700"},warning800:{color:"$warning800"},warning900:{color:"$warning900"},success25:{color:"$success25"},success50:{color:"$success50"},success100:{color:"$success100"},success200:{color:"$success200"},success300:{color:"$success300"},success400:{color:"$success400"},success500:{color:"$success500"},success600:{color:"$success600"},success700:{color:"$success700"},success800:{color:"$success800"},success900:{color:"$success900"},blue25:{color:"$blue25"},blue50:{color:"$blue50"},blue100:{color:"$blue100"},blue200:{color:"$blue200"},blue300:{color:"$blue300"},blue400:{color:"$blue400"},blue500:{color:"$blue500"},blue600:{color:"$blue600"},blue700:{color:"$blue700"},blue800:{color:"$blue800"},blue900:{color:"$blue900"},blueGray25:{color:"$blueGray25"},blueGray50:{color:"$blueGray50"},blueGray100:{color:"$blueGray100"},blueGray200:{color:"$blueGray200"},blueGray300:{color:"$blueGray300"},blueGray400:{color:"$blueGray400"},blueGray500:{color:"$blueGray500"},blueGray600:{color:"$blueGray600"},blueGray700:{color:"$blueGray700"},blueGray800:{color:"$blueGray800"},blueGray900:{color:"$blueGray900"},blueLight50:{color:"$blueLight50"},blueLight100:{color:"$blueLight100"},blueLight400:{color:"$blueLight400"},blueLight500:{color:"$blueLight500"},blueLight600:{color:"$blueLight600"},blueLight700:{color:"$blueLight700"},blueLight900:{color:"$blueLight900"},purple25:{color:"$purple25"},purple50:{color:"$purple50"},purple100:{color:"$purple100"},purple200:{color:"$purple200"},purple300:{color:"$purple300"},purple400:{color:"$purple400"},purple500:{color:"$purple500"},purple600:{color:"$purple600"},purple700:{color:"$purple700"},purple800:{color:"$purple800"},purple900:{color:"$purple900"},purpleLight50:{color:"$purpleLight50"},purpleLight100:{color:"$purpleLight100"},purpleLight500:{color:"$purpleLight500"},purpleLight700:{color:"$purpleLight700"},purpleDark50:{color:"$purpleDark50"},purpleDark100:{color:"$purpleDark100"},purpleDark500:{color:"$purpleDark500"},purpleDark700:{color:"$purpleDark700"},pink25:{color:"$pink25"},pink50:{color:"$pink50"},pink100:{color:"$pink100"},pink200:{color:"$pink200"},pink300:{color:"$pink300"},pink400:{color:"$pink400"},pink500:{color:"$pink500"},pink600:{color:"$pink600"},pink700:{color:"$pink700"},pink800:{color:"$pink800"},pink900:{color:"$pink900"},orange50:{color:"$orange50"},orange100:{color:"$orange100"},orange400:{color:"$orange400"},orange500:{color:"$orange500"},orange600:{color:"$orange600"},orange700:{color:"$orange700"},redLight50:{color:"$redLight50"},redLight100:{color:"$redLight100"},redLight500:{color:"$redLight500"},redLight700:{color:"$redLight700"},redDark50:{color:"$redDark50"},redDark100:{color:"$redDark100"},redDark500:{color:"$redDark500"},redDark700:{color:"$redDark700"},green50:{color:"$green50"},green100:{color:"$green100"},green500:{color:"$green500"},green700:{color:"$green700"},greenDark50:{color:"$greenDark50"},greenDark100:{color:"$greenDark100"},greenDark500:{color:"$greenDark500"},greenDark700:{color:"$greenDark700"},brown50:{color:"$brown50"},brown100:{color:"$brown100"},brown500:{color:"$brown500"},brown700:{color:"$brown700"},indigo100:{color:"$indigo100"},indigo600:{color:"$indigo600"},white:{color:"white"}},fontSize:{inherit:{fontSize:"inherit"},textXs:{fontSize:"$textXs"},textSm:{fontSize:"$textSm"},textMd:{fontSize:"$textMd"},textLg:{fontSize:"$textLg"},textXl:{fontSize:"$textXl"},displayXs:{fontSize:"$displayXs"},displaySm:{fontSize:"$displaySm"},displayMd:{fontSize:"$displayMd"},displayLg:{fontSize:"$displayLg"},displayXl:{fontSize:"$displayXl"},display2Xl:{fontSize:"$display2Xl"}},fontWeight:{inherit:{fontWeight:"inherit"},regular:{fontWeight:"$regular"},medium:{fontWeight:"$medium"},semiBold:{fontWeight:"$semiBold"},bold:{fontWeight:"$bold"}}},defaultVariants:{color:"inherit",fontSize:"inherit",fontWeight:"inherit"}}),Rb=l.forwardRef((e,t)=>(0,i.jsx)(Mb,{...(0,Oi.A)(e,"font"),...wi(e.font),ref:t,css:e.css}));Rb.displayName="Span",wa.IX.fromDateTimes(wa.c9.fromObject({year:2026,month:5,day:22}).startOf("day"),wa.c9.fromObject({year:2026,month:5,day:24}).endOf("day"));function Db(e){switch(e){case me.Animajeconvention:return"Animaje Convention";case me.Asoassignment:return"Fiche d'affectation ASO";case me.Hbcldc:return"Badge HBC Ligue des Champions";case me.Hbclnh:return"Badge HBC LNH";case me.P2nassignment:return"Fiche d'affectation P2N (Exploit)";case me.P2nassignmentmontagedemontage:return"Fiche d'affectation P2N (Montage/Démontage)";case me.Paris20km:return"Badge 20km de Paris";case me.Paris20kmassignment:return"Fiche d'affectation 20km de Paris";case me.Paris20kmcontremarque:return"Contremarque 20km de Paris";case me.Playground:return"Fiche d'affectation Playground";case me.T24assignment:return"Fiche d'affectation T24";default:return tr()}}Object.keys({cf25078:"Parcours",cf25079:"Plan village",cf25080:"Poste vélo",cf25511:"Poste course à pied",cf25512:"Plan d'accès"});const Ob=e=>{const t=Ai(),[n,a]=l.useState(!1),s=l.useCallback(async()=>{let t=!0;return a(!0),await e.onDelete(),t&&a(!1),()=>{t=!1}},[e.onDelete,n,a]);return(0,i.jsxs)(xf,{size:"md",onClose:e.onClose,children:[(0,i.jsx)($,{justify:"center",children:(0,i.jsx)($,{align:"center",css:{background:"$error100",borderRadius:"48px",color:"$error600",height:"48px",fontSize:"20px",width:"48px"},justify:"center",children:(0,i.jsx)(ra,{icon:"circle-exclamation",iconStyle:"light"})})}),(0,i.jsx)(Hg,{height:"5"}),(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray900 textLg regular",textAlign:"center",title:e.text,children:e.text}),"subtext"in e&&L(e.subtext).map((e,t)=>(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)($i,{color:"gray500",textAlign:"center",children:e})]},t)),"children"in e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)($i,{color:"gray500",css:{alignSelf:"center"},children:e.children})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(ga,{color:"error",isLoading:n,onClick:s,children:e.buttonText}),(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},wb=e=>{const{translate:t,params:{eventId:n,delegationId:a}}=zg(),{mutate:s}=function(e={}){return Ti("mutation VolunteersRegistrationsMassDuplicate(\n $eventId: EventId!\n $delegationId: DelegationId\n $selecteds: MassActionSelectedsInput!\n $numberOfCopies: Int!\n) {\n numberOfCreatedMembers: volunteersRegistrationsMassDuplicate(\n eventId: $eventId\n delegationId: $delegationId\n selecteds: $selecteds\n numberOfCopies: $numberOfCopies\n )\n}\n",e)}(),[o,r]=(0,l.useState)(1),[d,c]=(0,l.useState)(!1);return(0,i.jsx)(Ca,{isOpen:!0,onClose:e.onClose,children:(0,i.jsxs)(Aa,{children:[(0,i.jsx)(ba,{icon:"clone",children:t("dupliquer_un_me_90016")}),(0,i.jsx)(va,{children:(0,i.jsx)(Ih,{label:t("nombre_de_copie_37518"),min:1,shouldParseAsInt:!0,value:o,onChange:r})}),(0,i.jsx)(ja,{children:(0,i.jsx)(ga,{isLoading:d,onClick:async()=>{c(!0),await s({eventId:n,delegationId:a,selecteds:{ids:[e.userInfoId]},numberOfCopies:o}),e.onClose(),e.reload()},children:t("dupliquer_1_94438",e.name)})})]})})},Pb=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),{user:o}=to(),{mutate:r}=Ps(),{mutate:d}=js(),{mutate:c}=function(e={}){return Ti("mutation VolunteersRegistrationsMassDelete(\n $eventId: EventId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: volunteersRegistrationsMassDelete(eventId: $eventId, selecteds: $selecteds)\n}\n",e)}(),[u,m]=(0,l.useState)(!1),[g,h]=(0,l.useState)(!1),[p,f]=(0,l.useState)(!1),I=(0,l.useMemo)(()=>e.customDocuments.filter(t=>Ju(t.populationsIds,e.member.fields.population)),[e.customDocuments,e.member]),_=a&&e.canMemberAccredit&&e.accreditationState===J.WaitingAccreditation,x=a&&e.showDocumentsDownload&&void 0!==e.member.links&&F(e.allowedCustomDocuments),y=x?e.allowedCustomDocuments.map((n,a)=>{const s=I.find(e=>e.slug===n);return s?(0,i.jsx)(zp,{download:`${e.member.nameOrEmail}-${s.name}`,icon:"arrow-down-to-bracket",target:"_blank",to:Kc(e.member.links?.userCustomDocumentLinks[n],"pdf",{lang:o?.language}),children:t("t_l_charger_1_80752",s.name)},a):wn.includes(n)?(0,i.jsx)(zp,{download:`${e.member.nameOrEmail}-custom-badge`,icon:"arrow-down-to-bracket",target:"_blank",to:Kc(e.member.links?.userCustomBadgeLinks[n],"pdf",{lang:o?.language}),children:t("t_l_charger_1_80752",Db(n))},a):null}):[];return _||x||e.canDuplicate||e.canDelete||e.showDeleteFromEvent?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)(ib,{children:[(0,i.jsx)($p,{children:_?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(zp,{icon:"check",onClick:async()=>{await r({eventId:a,delegationId:s,selecteds:{ids:[e.member.id]}}),e.reload()},children:t("valider_les_acc_80801")}),(0,i.jsx)(zp,{icon:"badge-check",to:ig.ACCREDIT(n,a,e.member.id),children:t("accr_diter_70543")})]}):null}),(0,i.jsx)($p,{children:y}),(0,i.jsxs)($p,{children:[e.canDuplicate&&(0,i.jsx)(zp,{icon:"clone",onClick:()=>m(!0),children:t("dupliquer_28256")}),e.canDelete&&(0,i.jsx)(zp,{color:"red",icon:"user-xmark",onClick:()=>h(!0),children:t("retirer_de_la_d_64963")})]}),(0,i.jsx)($p,{children:e.showDeleteFromEvent&&(0,i.jsx)(zp,{color:"red",icon:"trash-can",onClick:()=>f(!0),children:t("delete_from_eve_69290")})})]}),g&&(0,i.jsx)(Ob,{buttonText:t("supprimer_43083"),subtext:[t("_tes_vous_sur_d_88752")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>h(!1),onDelete:async()=>{await d({organizationId:n,eventId:a,delegationId:s,selecteds:{ids:[e.member.id]},deleteFromEvent:e.deleteFromEvent}),e.reload()}}),e.canDuplicate&&u&&(0,i.jsx)(wb,{name:e.member.nameOrEmail,reload:e.reload,userInfoId:e.member.id,onClose:()=>m(!1)}),p&&e.volunteerRegistrationId&&(0,i.jsx)(Ob,{buttonText:t("supprimer_43083"),subtext:[t("are_you_sure_yo_46668")],text:t("suppression_de_73669",e.member.nameOrEmail),onClose:()=>f(!1),onDelete:async()=>{await c({eventId:a,selecteds:{ids:[e.member.id]}}),e.reload()}})]}):null},$b=(0,l.forwardRef)(({borderRadius:e,size:t,value:n,onChange:a,...s},o)=>{const r=(0,l.useMemo)(()=>e??4,[e]),d=(0,l.useMemo)(()=>t??24,[t]),c=(0,l.useMemo)(()=>(0,iI.A)(e=>{a(e)},500),[a]);return(0,i.jsx)($i,{css:{background:n,borderRadius:`${r}px`,height:`${d}px`,overflow:"hidden",width:`${d}px`,"& input":{background:"transparent",border:"none",borderRadius:"$1",cursor:"pointer",height:`${d}px`,padding:"0",width:`${d}px`,"&::-webkit-color-swatch-wrapper":{padding:0},"&::-webkit-color-swatch":{borderRadius:"$1",border:"none"},"&::-moz-color-swatch":{border:"none"}}},children:(0,i.jsx)("input",{ref:o,type:"color",value:n,onChange:e=>{c(e.target.value)},...s})})});$b.displayName="ColorPicker";const kb=({onChange:e,css:t,label:n,description:a,value:s,hint:o,state:r,initialValue:d,icon:c,...u})=>{const m=Ai(),g=(0,l.useRef)(null),{inputId:h,descId:p,errorId:f}=uh();return(0,i.jsxs)($,{css:t,direction:"column",width:1,children:[(0,i.jsx)(hh,{htmlFor:h,isClickable:!1,children:n}),(0,i.jsx)(mh,{id:p,children:a}),(n||a)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)(fh,{cursor:"default",icon:c,state:r,onClick:()=>{g.current?.click()},children:[(0,i.jsxs)($,{align:"center",css:{flex:"1"},height:1,children:[(0,i.jsx)($b,{ref:g,"aria-describedby":a?p:void 0,"aria-errormessage":"error"===r?f:void 0,"aria-invalid":"error"===r,id:h,value:s,onChange:e,...u}),(0,i.jsx)(Hg,{width:"3"}),(0,i.jsx)($i,{"aria-hidden":!0,color:"gray800",css:{flex:"1","& input[type=text]":{background:"transparent",border:"none",color:"$gray800",height:"100%",outline:"none",width:"100%"}},height:1,onClick:Ia,children:(0,i.jsx)("input",{disabled:"disabled"===r,id:h,type:"text",value:s,onChange:t=>{e(t.target.value)},...u})})]}),d&&s!==d&&(0,i.jsx)(ga,{color:"invisible",css:{color:"$primary500"},onClick:t=>{Ia(t),e(d)},children:m("remettre_sa_v_90478")})]}),(0,i.jsx)(gh,{id:f,state:r,children:o})]})},Nb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=dh(s.meta);return(0,i.jsx)(kb,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onChange:e=>{s.input.onChange(e)},...a})}}),zb=({value:e,onChange:t,...n})=>{const[a,s]=(0,l.useState)(e?.toString()??""),[o,r]=(0,l.useState)(e);return o!==e&&(s(e?.toString()??""),r(e)),(0,i.jsx)(Ih,{value:a,onChange:e=>{const n=parseFloat(e);s(e),r(isNaN(n)?null:n),t(isNaN(n)?null:n)},...n})},Lb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=dh(s.meta);return(0,i.jsx)(zb,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:s.input.onChange,onFocus:s.input.onFocus,...a})}}),Fb=j("div",{alignItems:"center",borderRadius:"$1",color:"$gray600",cursor:"pointer",display:"flex",height:"40px",justifyContent:"center",width:"40px",variants:{active:{true:{background:"$primary100",color:"$primary500"},false:{"&:hover":{background:"$gray200",color:"$gray800"}}}}}),Ub=({css:e,label:t,description:n,value:a,height:s,renderOnPortal:o,onChange:r,...d})=>{const c=Ai(),[u,m]=(0,l.useState)(!1),g=(0,l.useMemo)(()=>(0,mo.A)(Gn.map(e=>({value:e,name:c(e)})),e=>e.name),[]);return(0,i.jsxs)($,{css:e,direction:"column",width:1,children:[(0,i.jsx)(hh,{children:t}),(0,i.jsx)(mh,{children:n}),(t||n)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsxs)(Rp,{isOpen:u,onStateChange:m,children:[(0,i.jsx)(Up,{children:(0,i.jsx)(fh,{cursor:"pointer",icon:oa(a),rightIcon:u?"chevron-up":"chevron-down",...d,children:(0,i.jsx)($i,{css:{flex:"1"},children:c(a)})})}),(0,i.jsx)(Fp,{maxHeight:300,placement:"bottom",renderOnPortal:o,width:"match",children:(0,i.jsx)($,{css:{px:"$2"},gap:"2",width:1,wrap:"wrap",children:g.map(e=>(0,i.jsx)(Fb,{active:a===e.value,onClick:()=>{m(!1),r(e.value)},children:(0,i.jsx)(ra,{icon:oa(e.value)})},e.value))})})]})]})},Bb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,render:s=>{const o=dh(s.meta);return(0,i.jsx)(Ub,{hint:o?s.meta.error:t,name:e,state:o?"error":n,value:s.input.value,onBlur:s.input.onBlur,onChange:e=>{s.input.onChange(e)},onFocus:s.input.onFocus,...a})}});var Vb=n(7785),Gb=n(8790),Wb=(n(1036),n(6585)),qb=n(2230),Yb=n(2910),Hb=n(456);const Zb=(e,t)=>{const n=document.createElement("span");return n.className=e,void 0!==t&&(n.textContent=t),n};class Kb extends Gb.k_1{static get pluginName(){return"VariablesMention"}static get requires(){return[Gb.PXQ]}init(){const e=this.editor,t=e.commands.get("mention");this.listenTo(t,"execute",(t,n)=>{const i=n[0];if("{"!==i.marker)return;t.stop();const a=e.model,s=a.document.selection,o="string"==typeof i.mention?i.mention:i.mention.id;a.change(e=>{const t=new Map(s.getAttributes());t.delete("mention"),a.insertContent(e.createText(o,t),i.range??s.getFirstRange())})},{priority:"high"})}}const Qb=E({".ck.ck-mentions":{maxWidth:"420px"},".ck.ck-mentions .ck-button.rich-editor-variable-item":{alignItems:"stretch",background:"transparent !important",borderRadius:"0 !important",boxShadow:"none !important",color:"$gray800 !important",cursor:"pointer",display:"flex",flexDirection:"column",padding:"0 !important",width:"100%"},".ck.ck-mentions .rich-editor-variable-item-group":{borderTop:"1px solid $gray100",color:"$gray500",cursor:"default",fontSize:"$textXs",fontWeight:"$semiBold",padding:"$2 $3 $1"},".ck.ck-mentions .ck-list__item:first-child .rich-editor-variable-item-group":{borderTop:"none"},".ck.ck-mentions .rich-editor-variable-item-row":{alignItems:"baseline",display:"flex",gap:"$4",justifyContent:"space-between",padding:"$2 $3"},".ck.ck-mentions .rich-editor-variable-item:hover .rich-editor-variable-item-row":{background:"$gray100"},".ck.ck-mentions .ck-mentions__item_focused .rich-editor-variable-item-row":{background:"$primary100",color:"$primary700"},".ck.ck-mentions .rich-editor-variable-item-label":{fontSize:"$textSm",whiteSpace:"nowrap"},".ck.ck-mentions .rich-editor-variable-item-key":{color:"$gray500",fontSize:"$textXs",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"}}),Xb=({css:e,label:t,description:n,state:a,initialValue:s,onChange:o,onBlur:r,onFocus:d,hint:c,placeholder:u,value:g,variables:h,...p})=>{const{translate:f,params:{organizationId:I}}=zg(),{language:_}=bi(Si),x=(0,l.useRef)(h),[y]=(0,l.useState)(void 0!==h);(0,l.useEffect)(()=>{x.current=h},[h]),y&&Qb();const S=(0,l.useMemo)(()=>[{color:"white",label:f("blanc_36425")},{color:v.colors.gray800.value,label:f("gris_fonc_51159")},{color:v.colors.gray400.value,label:f("gris_clair_52465")},{color:v.colors.primary900.value,label:f("bleu_fonc_40491")},{color:v.colors.primary500.value,label:f("bleu_41949")},{color:v.colors.error700.value,label:f("rouge_fonc_45023")},{color:v.colors.error500.value,label:f("rouge_75079")},{color:v.colors.warning300.value,label:f("jaune_53503")},{color:v.colors.warning600.value,label:f("orange_64132")},{color:v.colors.success700.value,label:f("vert_fonc_37265")},{color:v.colors.success500.value,label:f("vert_27018")},{color:v.colors.purple700.value,label:f("violet_fonc_77270")},{color:v.colors.purple500.value,label:f("violet_54005")},{color:v.colors.pink700.value,label:f("rose_fonc_98996")},{color:v.colors.pink500.value,label:f("rose_49360")}],[]);return(0,i.jsxs)($,{css:e,direction:"column",width:1,children:[(0,i.jsx)(hh,{children:t}),(0,i.jsx)(mh,{children:n}),(t||n)&&(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{css:{"--ck-border-radius":"$radii$1","--ck-color-toolbar-background":"$colors$gray100","& .ck.ck-toolbar":{borderColor:"error"===a?"$error500":"$gray300",borderBottom:"none","& .ck.ck-toolbar__separator":{background:"$gray200"},"& .ck.ck-button":{color:"$gray600","&:hover":{background:"$gray200",color:"$gray800",cursor:"pointer"},"&.ck-on, &.ck-on:hover:not(.ck-disabled)":{background:"$primary100",color:"$primary500"}}},"& .ck.ck-content":{borderColor:"error"===a?"$error500 !important":"$gray300 !important",borderStyle:"solid",borderWidth:"1px",borderTop:"none !important",color:"$gray800",minHeight:"100px",px:"$3","&.ck-editor__editable.ck-focused":{boxShadow:"none"},"& p.h-small":{fontSize:"12px"}},"& .ck.ck-editor__editable > .ck-placeholder::before":{color:"$gray500"},...jp("& .ck.ck-content")},width:1,children:(0,i.jsx)(Vb.aF,{config:{licenseKey:"GPL",plugins:[Gb.C1k,Gb.Y0,Gb.yN4,Gb.uwK,Gb.LcX,Gb.rwA,Gb.DZT,Gb._V3,Gb.uXn,Gb.BRX,Gb.J20,Gb.N_E,Gb.B8B,Gb.PXQ,Gb.fzL,Gb.fTX,Gb.z2z,...y?[Kb]:[]],mention:y?{feeds:[{marker:"{",dropdownLimit:Number.MAX_SAFE_INTEGER,feed:e=>function(e){return e.map((t,n)=>({id:`{${t.key}}`,text:`{${t.key}}`,variable:t,isFirstOfGroup:0===n||e[n-1].group!==t.group}))}(function(e,t){const n=m(t).split(/\s+/).filter(e=>e.length>0);return t.includes("}")?[]:0===n.length?e:e.filter(e=>{const t=m(`${e.label} ${e.groupLabel} ${e.key}`);return n.every(e=>t.includes(e))})}(x.current??[],e)),itemRenderer:e=>function(e){const t=Zb("rich-editor-variable-item"),n=Zb("rich-editor-variable-item-row");return e.isFirstOfGroup&&t.append(Zb("rich-editor-variable-item-group",e.variable.groupLabel)),n.append(Zb("rich-editor-variable-item-label",e.variable.label),Zb("rich-editor-variable-item-key",e.variable.key)),t.append(n),t}(e)}]}:void 0,translations:[Wb.A,qb.A,Yb.A,Hb.A],placeholder:u,fontColor:{colors:S},fontBackgroundColor:{colors:S},language:_.toString().toLowerCase(),simpleUpload:{uploadUrl:`${ia.HEAVENT_API_URL}/image/upload?organizationId=${I}`},heading:{options:[{model:"headingParagraphSmall",view:{name:"p",classes:"h-small"},title:f("paragraphe_pet_01073"),class:"ck-heading_paragraph_small",converterPriority:"high"},{model:"paragraph",title:"Paragraph",class:"ck-heading_paragraph"},{model:"heading1",view:"h2",title:"Heading 1",class:"ck-heading_heading1"},{model:"heading2",view:"h3",title:"Heading 2",class:"ck-heading_heading2"},{model:"heading3",view:"h4",title:"Heading 3",class:"ck-heading_heading2"}]},toolbar:{items:["bold","italic","underline","|","heading","fontColor","fontBackgroundColor","alignment","|","blockQuote","bulletedList","numberedList","|","link","imageUpload","|","undo","redo"],shouldNotGroupWhenFull:!0}},data:s,editor:Gb.aRV,onBlur:()=>{r?.()},onChange:(e,t)=>{o(t.getData())},onFocus:()=>{d?.()},...p})}),(0,i.jsx)(gh,{state:a,children:c})]})},Jb=({name:e,hint:t,state:n,...a})=>(0,i.jsx)(qg.D0,{name:e,parse:lh.A,render:s=>{const o=dh(s.meta);return(0,i.jsx)(Xb,{hint:o?s.meta.error:t,initialValue:s.input.value,name:e,state:o?"error":n,onChange:e=>{s.input.onChange(e)},...a})}}),eA=e=>{const{translate:t,params:{organizationId:n}}=zg(),a=bi(ur),s=bi(sl),o=XI(e.customField),r=(0,l.useMemo)(()=>pi.filter(e=>e!==Xt.Error),[]);if((0,l.useEffect)(()=>{e.slug===q.Acronym||e.slug===q.Address||e.slug===q.Color||e.slug===q.Description||e.slug===q.Icon||e.slug===q.Name||e.slug===ot.Acronym||e.slug===ot.Address||e.slug===ot.Color||e.slug===ot.Description||e.slug===ot.Icon||e.slug===ot.Name||e.slug===Ie.Description||e.slug===Ie.Name||e.customField?.fieldType===ze.Address||e.customField?.fieldType===ze.Country||e.customField?.fieldType===ze.Language||e.customField?.fieldType===ze.Nationality||e.customField?.fieldType===ze.Sex||e.customField?.fieldType===ze.Text||e.customField?.fieldType===ze.Textarea||e.customField?.fieldType===ze.Time?"string"!=typeof e.value&&e.change(e.name,""):e.slug===q.AutoAccredit||e.slug===q.WeezeventIsSynchronized||e.slug===he.Privacy||e.slug===Ie.IsLocked||e.slug===Ie.ShowInDelegationSpace||e.slug===Ie.CanLeadersAddMembers||e.slug===Ie.CanLeadersEditCustomFields||e.slug===Ie.CanLeadersEditMembers||e.slug===Ie.CanLeadersDeleteMembers||e.slug===Ie.CanLeadersDuplicateMembers||e.slug===Ie.CanLeadersEditColumns||e.slug===Ie.CanLeadersImportMembers||e.slug===Ie.CanLeadersSeeHiddenAccreditationsSlots||e.slug===Ie.ShowAllAccreditations||e.slug===Ie.ShowFormLinkInDelegationSpace||e.slug===ot.WeezeventIsSynchronized||e.customField?.fieldType===ze.Checkbox||e.customField?.fieldType===ze.Validation?"boolean"!=typeof e.value&&e.change(e.name,!1):e.slug===q.Category||e.slug===Ie.Category||e.slug===ot.Category?"number"!=typeof e.value&&e.change(e.name,e.categories[0]?.id):e.slug===q.Index||e.slug===q.Latitude||e.slug===q.Longitude||e.slug===ot.Latitude||e.slug===ot.Longitude||e.slug===ot.Zoom||e.slug===Ie.MaxResources||e.customField?.fieldType===ze.Number?"number"!=typeof e.value&&e.change(e.name,0):e.slug===q.Tag||e.slug===ot.Tag||e.slug===Ie.Campaigns||e.slug===Ie.Documents||e.slug===Ie.Tag||e.slug===ot.Traces?Array.isArray(e.value)||e.change(e.name,[]):e.slug===Ie.DeadlineDate||e.customField?.fieldType===ze.Date||e.customField?.fieldType===ze.Datetime?wa.c9.isDateTime(e.value)||h(e.value)||e.change(e.name,wa.c9.invalid("Invalid")):e.customField?.fieldType===ze.File?null!==e.value&&"object"==typeof e.value||e.change(e.name,a.documentInputDefault()):e.customField?.fieldType===ze.Phone?null!==e.value&&"object"==typeof e.value||e.change(e.name,s.basePhoneInputDefault()):e.customField?.fieldType===ze.Select?e.customField.canSelectMultiple&&!Array.isArray(e.value)?e.change(e.name,[]):e.customField.canSelectMultiple||"number"==typeof e.value||e.change(e.name,""):e.slug===Ie.Form?"number"!=typeof e.value&&e.change("massEdit.value",e.forms[0].id):e.slug===Ie.DelegationsSpaceLayout?"number"!=typeof e.value&&F(e.delegationsSpaceLayouts)&&e.change("massEdit.value",e.delegationsSpaceLayouts[0].id):e.slug===ot.Layer?Hn.includes(e.value)||e.change("massEdit.value",Xe.Google):e.slug===Zt.State?r.includes(e.value)||e.change("massEdit.value",r[0]):e.slug===Zt.Frequency&&(mi.includes(e.value)||e.change("massEdit.value",Yt.Every10Minutes))},[e.customField,e.slug]),e.slug===q.Acronym||e.slug===ot.Acronym||e.slug===q.Address||e.slug===ot.Address||e.customField?.fieldType===ze.Address||e.customField?.fieldType===ze.Text)return(0,i.jsx)(_h,{name:e.name});if(e.slug===q.AutoAccredit||e.slug===q.WeezeventIsSynchronized||e.slug===Ie.IsLocked||e.slug===Ie.ShowFormLinkInDelegationSpace||e.slug===Ie.ShowInDelegationSpace||e.slug===Ie.CanLeadersAddMembers||e.slug===Ie.CanLeadersEditCustomFields||e.slug===Ie.CanLeadersEditMembers||e.slug===Ie.CanLeadersDeleteMembers||e.slug===Ie.CanLeadersDuplicateMembers||e.slug===Ie.CanLeadersEditColumns||e.slug===Ie.CanLeadersImportMembers||e.slug===Ie.CanLeadersSeeHiddenAccreditationsSlots||e.slug===Ie.ShowAllAccreditations||e.slug===ot.WeezeventIsSynchronized||e.customField?.fieldType===ze.Checkbox||e.customField?.fieldType===ze.Validation)return(0,i.jsxs)(HI,{name:e.name,shouldParseAsBoolean:!0,children:[(0,i.jsx)("option",{value:"true",children:t("oui_54361")}),(0,i.jsx)("option",{value:"false",children:t("non_33516")})]});if(e.slug===he.Privacy)return(0,i.jsxs)(HI,{name:e.name,shouldParseAsBoolean:!0,children:[(0,i.jsx)("option",{value:"true",children:t("Private")}),(0,i.jsx)("option",{value:"false",children:t("Public")})]});if(e.slug===q.Category||e.slug===Ie.Category||e.slug===ot.Category)return(0,i.jsx)(GI,{isSearchVisible:!0,name:e.name,children:e.categories.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))});if(e.slug===q.Color||e.slug===ot.Color)return(0,i.jsx)(Nb,{name:e.name});if(e.slug===q.Description||e.slug===Ie.Description||e.slug===ot.Description)return(0,i.jsx)($i,{css:{overflow:"hidden auto"},width:1,children:(0,i.jsx)(Jb,{name:e.name})});if(e.slug===q.Icon||e.slug===ot.Icon)return(0,i.jsx)(Bb,{name:e.name});if(e.slug===q.Latitude||e.slug===ot.Latitude)return(0,i.jsx)(Lb,{name:e.name});if(e.slug===q.Longitude||e.slug===ot.Longitude)return(0,i.jsx)(Lb,{name:e.name});if(e.slug===q.Name||e.slug===ot.Name||e.slug===Zt.Name)throw new Error("Should not happen");return e.slug===Zt.State?(0,i.jsx)(HI,{name:e.name,children:r.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))}):e.slug===Zt.Frequency?(0,i.jsx)(HI,{name:e.name,children:mi.map(e=>(0,i.jsx)("option",{value:e,children:t(e)},e))}):e.slug===Ie.Campaigns?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.campaigns.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===Ie.Documents?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.customDocuments.map(e=>(0,i.jsx)("option",{value:e.slug,children:e.name},e.slug))}):e.slug===q.Tag||e.slug===ot.Tag||e.slug===Ie.Tag?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.tags.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===ot.Traces?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!0,name:e.name,children:e.traces.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===q.Index||e.slug===Ie.MaxResources||e.slug===ot.Zoom||e.customField?.fieldType===ze.Number?(0,i.jsx)(_h,{name:e.name,shouldParseAsInt:!0}):e.customField?.fieldType===ze.Country?(0,i.jsx)(GI,{isSearchVisible:!0,name:e.name,children:o}):e.slug===Ie.DeadlineDate||e.customField?.fieldType===ze.Date?(0,i.jsx)(Wf,{name:e.name}):e.customField?.fieldType===ze.Datetime?(0,i.jsx)(Yf,{name:e.name}):e.customField?.fieldType===ze.File?e.customField.fileType===Fe.Picture?(0,i.jsx)(EI,{allowCrop:!0,organizationId:n,prefix:`${e.name}.`}):(0,i.jsx)(vI,{accept:[Kf.Images,Kf.Pdf],acl:"private",organizationId:n,prefix:`${e.name}.`}):e.customField?.fieldType===ze.Language?(0,i.jsxs)(HI,{name:e.name,children:[(0,i.jsx)("option",{value:"",children:t("s_lectionnez_un_31086")}),o]}):e.customField?.fieldType===ze.Nationality?(0,i.jsx)(GI,{isSearchVisible:!0,name:e.name,children:o}):e.customField?.fieldType===ze.Phone?(0,i.jsx)(OI,{prefix:`${e.name}.`}):e.customField?.fieldType===ze.Select?e.customField.canSelectMultiple?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!0,name:e.name,children:o}):(0,i.jsx)(GI,{isSearchVisible:!0,name:e.name,placeholder:t("s_lectionnez_un_44130"),children:o}):e.customField?.fieldType===ze.Sex?(0,i.jsxs)(HI,{name:e.name,children:[(0,i.jsx)("option",{value:"",children:t("s_lectionnez_un_43620")}),o]}):e.customField?.fieldType===ze.Textarea?(0,i.jsx)(KI,{name:e.name}):e.customField?.fieldType===ze.Time?(0,i.jsx)(Zf,{name:e.name}):e.slug===Ie.Form?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.forms.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===Ie.DelegationsSpaceLayout?(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!1,name:"massEdit.value",children:e.delegationsSpaceLayouts.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}):e.slug===ot.Layer?(0,i.jsxs)(HI,{name:e.name,children:[(0,i.jsx)("option",{value:Xe.Google,children:"Plan"}),(0,i.jsx)("option",{value:Xe.GoogleSatellite,children:"Satellite"}),(0,i.jsx)("option",{value:Xe.IgnPlan,children:"IGN Plan"})]}):null},tA=({displayName:e,isAddDeleteVisible:t,isResetVisible:n,massEditFieldInput:a,reset:s,strategy:o,change:r})=>{const{translate:l}=zg();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{font:"gray700 textSm medium",children:l("que_souhaitez_v_87607")}),(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)(hf,{state:s||o!==Je.Replace?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",Je.Replace)},children:l("remplacer_les_v_78885")}),!s&&o===Je.Replace&&a,(0,i.jsx)(Hg,{height:"3"}),t&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(hf,{state:s||o!==Je.Add?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",Je.Add)},children:l("ajouter_des_val_80159")}),!s&&o===Je.Add&&a,(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(hf,{state:s||o!==Je.Delete?"unchecked":"checked",onClick:()=>{r("massEdit.reset",!1),r("massEdit.strategy",Je.Delete)},children:l("supprimer_des_v_96120")}),!s&&o===Je.Delete&&a,(0,i.jsx)(Hg,{height:"3"})]}),n&&(0,i.jsx)(hf,{state:s?"checked":"unchecked",onClick:()=>r("massEdit.reset",!0),children:l("r_initialiser_42983",e)})]})},nA=e=>{const t=Ai(),n=bi(Cl),a=(0,l.useMemo)(()=>(0,mo.A)(e.customFields??[],e=>e.name.toLowerCase()),[e.customFields]),s=(0,l.useMemo)(()=>(0,mo.A)([...a.map(e=>({slug:e.slug,name:e.name,label:e.label})),...e.properties.map(e=>({slug:e,name:t(e),label:null}))],e=>e.name.toLowerCase()),[a,e.properties]);return(0,i.jsx)(xf,{size:"md",onClose:e.onClose,children:(0,i.jsx)(qg.lV,{initialValues:{massEdit:{reset:!1,selecteds:e.selecteds,slug:"",value:"",strategy:Je.Replace}},initialValuesEqual:ul.A,render:({form:n,handleSubmit:o,submitting:r,values:l})=>{const{reset:d,slug:c,strategy:u}=l.massEdit,m=s.find(e=>e.slug===c),g=a.find(e=>e.slug===c),p=h(c)?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{css:{paddingLeft:"$6"},children:(0,i.jsx)(eA,{campaigns:e.campaigns,categories:e.categories,change:n.change,customDocuments:e.customDocuments,customField:g,delegationsSpaceLayouts:e.delegationsSpaceLayouts,forms:e.forms,name:"massEdit.value",slug:c,tags:e.tags,traces:e.traces,value:l.massEdit.value})})]}):null,f=c===q.Tag||c===Ie.Campaigns||c===Ie.Documents||!0===g?.canSelectMultiple,I=c!==q.Category&&c!==he.Category&&c!==Ie.Category&&c!==ot.Category&&c!==ot.Layer&&c!==ot.Zoom&&c!==q.WeezeventIsSynchronized&&c!==he.Privacy&&c!==Ie.Form&&c!==Ie.IsLocked&&c!==Ie.ShowFormLinkInDelegationSpace&&c!==Ie.ShowInDelegationSpace&&c!==Ie.CanLeadersAddMembers&&c!==Ie.CanLeadersEditCustomFields&&c!==Ie.CanLeadersEditMembers&&c!==Ie.CanLeadersDeleteMembers&&c!==Ie.CanLeadersDuplicateMembers&&c!==Ie.CanLeadersEditColumns&&c!==Ie.CanLeadersImportMembers&&c!==Ie.CanLeadersSeeHiddenAccreditationsSlots&&c!==Ie.ShowAllAccreditations&&c!==ot.WeezeventIsSynchronized&&c!==Zt.Frequency&&c!==Zt.State;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($,{justify:"center",children:(0,i.jsx)(pf,{color:"primary",icon:"sliders"})}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{color:"gray900",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("_dition_de_la_v_67585")}),(0,i.jsx)(Hg,{height:"7"}),e.isLoading?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)(Dh,{borderRadius:"$1",height:40,width:1})]}):(0,i.jsx)(GI,{isSearchVisible:!0,label:t("quel_est_le_cha_81138"),name:"massEdit.slug",placeholder:t("s_lectionnez_un_82446"),children:s.map(e=>{return(0,i.jsx)("option",{value:e.slug,children:(t=e,h(t.label)?`${t.name} (${t.label})`:t.name)},e.slug);var t})}),m&&(0,i.jsx)(tA,{change:n.change,displayName:m.name,isAddDeleteVisible:f,isResetVisible:I,massEditFieldInput:p,reset:d,strategy:u}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(ga,{disabled:(_=l.massEdit,x=g,!(_.reset||!x||x.fieldType!==ze.Select||x.canSelectMultiple||"number"==typeof _.value&&!isNaN(_.value))),isLoading:r,onClick:o,children:t("modifier_la_val_07602")}),(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]});var _,x},validate:e=>{const t=a.find(t=>t.slug===e.massEdit.slug),i=t&&!e.massEdit.reset?n.getValidationRuleError(t,e.massEdit.value):null;return i?{massEdit:{value:i}}:{}},onSubmit:async t=>{const n=(await e.mutate(t.massEdit)).numberOfEdited;e.onSuccess(n),e.onClose()}})})},iA=e=>(0,i.jsx)(nA,{campaigns:[],categories:[],customDocuments:[],customFields:e.customFields,delegationsSpaceLayouts:[],forms:[],isLoading:!1,mutate:e.mutate,properties:z,selecteds:e.selecteds,tags:[],traces:[],onClose:e.onClose,onSuccess:e.onSuccess}),aA=j("div",{margin:"auto",width:"$containerTablet","@desktop":{width:"$container"}}),sA=l.forwardRef((e,t)=>(0,i.jsx)($i,{ref:t,css:{background:"$gray50",overflowX:"hidden",overflowY:"auto",py:"$10",...e.css},height:1,width:1,children:(0,i.jsx)(aA,{children:e.children})}));sA.displayName="CenteredContainer";const oA=e=>(0,i.jsx)($,{as:"legend",css:{position:"absolute",overflow:"hidden",clip:"rect(0 0 0 0)",clipPath:"inset(50%)",width:"1px",height:"1px",whiteSpace:"nowrap"},direction:"column",children:e.heading});var rA;!function(e){e.Dark="dark",e.Normal="normal"}(rA||(rA={}));const lA=({canSelect:e,centerHeader:t,children:n,disabled:a,footerActions:s,heading:o,header:r,headerStyle:d=rA.Normal,headerActions:c,hideHeader:u,initialIsOpen:m,isCompleted:g,isOpen:h,isToggleable:p,onSelect:f,onToggle:I,stepNumber:_,subtitle:x,...y})=>{const S=Ai(),{descId:j}=uh(),[v,b]=l.useState(m??!0),A=p?v:h,C=d===rA.Dark;return(0,i.jsx)(zf.Provider,{value:{isDisabled:a},children:(0,i.jsx)(yp,{"aria-describedby":j,as:"fieldset",css:{borderRadius:C?"$1":void 0,overflow:"hidden","&:disabled :is(input, select, textarea, datalist, button)":{cursor:"not-allowed !important"},...y.css},direction:"column",disabled:a,footer:!1!==A&&s,header:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(oA,{heading:o}),!u&&(0,i.jsxs)($,{align:"center",as:"header",css:C?{background:A?"$gray900":"white",blockSize:"64px",cursor:e&&!A?"pointer":"default",padding:"$6 $6 $5 $6"}:t?{padding:"$7 $7 0 $7",textAlign:"center"}:!1!==A?{borderBlockEnd:"1px solid $gray200",padding:"$6 $7 $5 $7"}:{padding:"$6 $7"},gap:"3",onClick:f,children:[C&&(0,i.jsx)($,{align:"center",css:{background:g?"$success200":"white",border:g?"none":"1px solid $gray200",borderRadius:"32px",color:g?"$success700":"$gray800",fontWeight:"$medium"},height:32,justify:"center",width:32,children:g?(0,i.jsx)(ra,{icon:"check"}):_}),(0,i.jsxs)($i,{css:{flex:"1"},children:[o&&(0,i.jsx)(Xg,{"aria-hidden":"true",css:C?A?{color:"white"}:void 0:{fontWeight:"$semiBold"},children:o}),x&&(0,i.jsx)(N,{color:C?A?"white":"gray800":void 0,id:j,textStyle:"subtitle",children:x})]}),c&&(0,i.jsx)($,{gap:"4",justify:"end",children:c}),p&&(0,i.jsx)(Rf,{label:S("toggle_section_92160"),size:"md",value:v,onChange:e=>{b(e),I?.(e)}})]})]}),...y,children:!1!==A&&(0,i.jsx)($,{css:{"&:has(> fieldset.fieldset--column)":{gap:"$9"}},direction:"column",children:n})})})},dA=e=>(0,i.jsx)(oh,{direction:"column",formRenderProps:e.formRenderProps,render:e.render}),cA=e=>{const{translate:t}=zg(),[n,a]=l.useState(!1),[s,o]=l.useState(0),r=bi(vu),d=l.Children.toArray(e.children),[c,u]=l.useState(!1);return c?(0,i.jsx)(lA,{heading:t("r_capitulaif_76565"),children:e.summaryStep}):(0,i.jsx)(qg.lV,{initialValues:e.initialValues,initialValuesEqual:ul.A,mutators:{...Wg.A,forceErrors:sh},render:t=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(qg.Pc,{subscription:{dirtyFields:!0},children:({dirtyFields:e})=>Object.keys(e).map((e,t)=>(0,i.jsx)(qg.D0,{name:e,render:()=>null,subscription:{}},t))}),d.map((r,d)=>{const c=s>=d||e.isEdit&&t.valid;if("string"==typeof r||"number"==typeof r||"boolean"==typeof r||!("props"in r))throw new Error("Invalid step passed to wizard");return(0,i.jsxs)(Yg.Provider,{value:{formRenderProps:t,showErrors:n,setShowErrors:a},children:[(0,i.jsx)(lA,{canSelect:c,footerActions:r.props.actions?.(t),headerStyle:rA.Dark,heading:r.props.heading,isCompleted:s>d,isOpen:s===d,stepNumber:d+1,onSelect:()=>{c&&(a(!1),o(d))},children:l.cloneElement(r,{formRenderProps:t})}),(0,i.jsx)(Hg,{height:"6"})]},d)})]}),validate:e=>r.validateForForm(d[s].props.schema)(e),onSubmit:async(t,n)=>{if(s===d.length-1){const i=await e.onSubmit(t,n);return i?(a(!0),e.containerRef&&e.containerRef.current&&(e.containerRef.current.scrollIntoView(),e.containerRef.current.scrollTop=0),i):void u(!0)}return a(!1),void o(s+1)}})},uA=e=>(0,_a.createPortal)((0,i.jsx)($i,{css:{background:"white",left:"0",position:"absolute",top:"0",zIndex:"50",...e.css},height:1,width:1,children:e.children}),document.body),mA=e=>(0,i.jsx)(qg.D0,{name:e.name,render:t=>{const n=t.input.checked?"checked":"unchecked";return(0,i.jsx)(hf,{disabled:e.disabled,size:e.size,state:n,subtext:e.subtext,onClick:()=>{t.input.onChange(e.value)},children:e.children})},type:"radio",value:e.value}),gA=({children:e,handleSubmit:t,nextText:n,prefix:a,strategies:s})=>{const o=Ai();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)($i,{font:"gray900 textSm medium",children:o("que_souhaitez_v_87607")}),s.map(({label:e,value:t})=>(0,i.jsxs)(l.Fragment,{children:[(0,i.jsx)(Hg,{height:"3"}),(0,i.jsx)(mA,{name:`${a}strategy`,value:t,children:e})]},t)),e&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"6"}),e]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{onClick:t,children:n})})]})},hA=e=>{const t=Ai();return(0,i.jsx)(gA,{handleSubmit:e.handleSubmit,nextText:t("suivant_accr_25709"),prefix:"massAccredit.",strategies:[{label:t("ajouter_des_acc_17744"),value:Je.Add},{label:t("remplacer_les_a_92733"),value:Je.Replace},{label:t("supprimer_des_a_04246"),value:Je.Delete}]})};function pA(e,t=500){const[n,i]=(0,l.useState)(e),[a,s]=(0,l.useState)(e),o=aj(e=>{s(e)},t);return[n,a,e=>{i(e),o(e)}]}const fA=e=>{const{translate:t}=zg(),n=bi(qd),a=(0,l.useMemo)(()=>Hp(e.accreditation),[e.accreditation]),s=(0,l.useMemo)(()=>e.das?.assignedResources??e.slot.assignedResources,[e.das,e.slot]),o=(0,l.useMemo)(()=>e.das?.maxResources??e.slot.maxResources,[e.das,e.slot]),r=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,i.jsxs)($,{align:"center",css:{background:"white",bd:!0,cursor:"pointer",px:"$4",userSelect:"none"},gap:"2",height:64,onClick:()=>{e.onClick(e.slot.id,"unchecked"===r)},children:[(0,i.jsx)(Uf,{shouldPreventDefault:!1,state:r,onClick:yh.A}),(0,i.jsx)(cf,{color:e.accreditation.color,icon:e.accreditation.icon}),(0,i.jsx)($i,{css:{flex:"1"},font:"gray800 textSm semiBold",children:a}),(0,i.jsx)($,{css:{px:"$3"},width:310,children:(0,i.jsx)(jf,{color:s>=(o||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",s,n.toNumberOrInfinity(o))})})]})},IA=e=>{const t=Ai(),n=bi(gl),a=bi(qd),s=(0,l.useMemo)(()=>e.das?.assignedResources??e.slot.assignedResources,[e.das,e.slot]),o=(0,l.useMemo)(()=>e.das?.maxResources??e.slot.maxResources,[e.das,e.slot]),r=e.accreditationsSlotsIds.includes(e.slot.id)?"checked":"unchecked";return(0,i.jsxs)(px,{css:{cursor:"pointer"},onClick:()=>{e.onClick(e.slot.id,"unchecked"===r)},children:[(0,i.jsx)(cx,{justify:"center",width:48,children:e.shouldDisplayList?(0,i.jsx)(Uf,{shouldPreventDefault:!1,state:r,onClick:yh.A}):(0,i.jsx)(gf,{shouldPreventDefault:!1,state:r,onClick:yh.A})}),(0,i.jsx)(cx,{children:h(e.slot.name)?e.slot.name:"-"}),(0,i.jsx)(cx,{children:e.slot.date?.isValid?n.toLocaleString(e.slot.date,Ya.DateOnly.WeekdayLongMonthLong):"-"}),(0,i.jsx)(cx,{children:(0,i.jsx)(jf,{color:s>=(o||1/0)?"success":"warning",leftIcon:"user-group",children:t("_1_2_membres_04485",s,a.toNumberOrInfinity(o))})})]})},_A=e=>{const t=Ai(),n=(0,l.useMemo)(()=>(0,mo.A)(e.slots.filter(t=>t.accreditation.id===e.accreditation.id),e=>(0,go.A)([e.date?.toMillis(),e.name.toLowerCase()])),[e.slots,e.accreditation]),a=(0,l.useMemo)(()=>n.map(e=>e.id),[n]),s=(0,l.useMemo)(()=>Object.fromEntries(e.delegationAccreditationsSlots.map(e=>[e.accreditationSlotId,e])),[e.delegationAccreditationsSlots]),o=(0,l.useMemo)(()=>{const t=(0,ml.A)(e.accreditationsSlotsIds,a);return t.length===a.length?"checked":0===t.length?"unchecked":"indeterminate"},[a,e.accreditationsSlotsIds]),r=(0,l.useCallback)((t,n)=>{if(e.accreditation.accreditationDisplay===W.Radio){const i=(0,Jc.A)(e.accreditationsSlotsIds,a).concat(n?[t]:[]);e.change("massAccredit.accreditationsSlotsIds",i)}else e.change("massAccredit.accreditationsSlotsIds",B(e.accreditationsSlotsIds,t,n))},[e.accreditation,e.accreditationsSlotsIds,e.change,a]),d=(0,l.useCallback)(t=>{e.change("massAccredit.accreditationsSlotsIds",t)},[e.change]),c=e.accreditation.accreditationDisplay===W.List||e.strategy===Je.Delete;return e.accreditation.hasSlots?(0,i.jsx)(uf,{accreditation:e.accreditation,displayNumberOfSlots:!0,displaySlots:!0,numberOfSlots:n.length,children:e.accreditation.accreditationDisplay===W.Calendar?(0,i.jsx)($,{css:{background:"$gray50",padding:"$4"},children:(0,i.jsx)(o_,{accreditationsSlotsIds:e.accreditationsSlotsIds,slots:n,onChange:d})}):(0,i.jsxs)(fx,{hideBorder:!0,children:[(0,i.jsxs)(mx,{children:[(0,i.jsx)(ux,{justify:"center",width:48,children:c&&(0,i.jsx)(Uf,{state:o,onClick:t=>{"checked"===t?e.change("massAccredit.accreditationsSlotsIds",(0,$a.A)(e.accreditationsSlotsIds.concat(a))):e.change("massAccredit.accreditationsSlotsIds",(0,Jc.A)(e.accreditationsSlotsIds,a))}})}),(0,i.jsx)(ux,{children:t("nom_du_cr_neau_54351")}),(0,i.jsx)(ux,{children:t("date_du_cr_neau_82295")}),(0,i.jsx)(ux,{})]}),n.map(t=>(0,i.jsx)(IA,{accreditationsSlotsIds:e.accreditationsSlotsIds,das:s[t.id]??null,shouldDisplayList:c,slot:t,onClick:r},t.id))]})}):(0,i.jsx)(fA,{accreditation:e.accreditation,accreditationsSlotsIds:e.accreditationsSlotsIds,das:s[n[0].id]??null,slot:n[0],onClick:r})},xA=e=>{const t=(0,l.useMemo)(()=>Xp(e.accreditations.filter(t=>t.accreditationCategoryId===e.category.id)),[e.accreditations,e.category]);return(0,i.jsx)(wf,{category:e.category.name,children:t.map(t=>(0,i.jsx)(_A,{accreditation:t,accreditationsSlotsIds:e.accreditationsSlotsIds,change:e.change,delegationAccreditationsSlots:e.delegationAccreditationsSlots,slots:e.slots,strategy:e.strategy},t.id))})},yA=e=>{const t=Ai();return(0,i.jsxs)(Rp,{doNotCloseOnOtherOpen:!0,isOpen:e.isOpen,onStateChange:e.onStateChange,children:[(0,i.jsx)(Up,{children:(0,i.jsx)($i,{children:(0,i.jsxs)(ga,{color:e.color,leftIcon:"bars-filter",children:[t("filtres_64574")," ",(e.numberOfAppliedFilters||0)>0?`(${e.numberOfAppliedFilters})`:""]})})}),(0,i.jsx)(Fp,{placement:"bottom-end",width:385,children:(0,i.jsxs)($,{direction:"column",onChange:Ia,children:[(0,i.jsxs)($,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,i.jsx)($i,{font:"gray800 textMd medium",children:t("liste_des_filtr_75605")}),e.children]}),e.showButtons&&(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,i.jsx)($i,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:e.reinit,children:t("r_initialiser_77538")}),(0,i.jsx)(ga,{size:"sm",onClick:e.apply,children:t("appliquer_05753")})]})]})})]})},SA=e=>{const t=Ai(),[n,a]=(0,l.useState)(!1),[s,o]=(0,l.useState)(e.excludeEmpty?"checked":"unchecked"),[r,d]=(0,l.useState)(e.excludeFull?"checked":"unchecked"),[c,u]=(0,l.useState)(e.excludePast?"checked":"unchecked"),m=(e.excludeEmpty?1:0)+(e.excludeFull?1:0)+(e.excludePast?1:0);return(0,i.jsxs)($,{css:{background:"$gray100",borderRadius:"$2",padding:"$4"},gap:"3",children:[(0,i.jsx)($i,{css:{flex:"1"},children:(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:e.name,onChange:t=>{e.setName(t)}})}),(0,i.jsxs)(yA,{apply:()=>{e.setExcludeEmpty("checked"===s),e.setExcludeFull("checked"===r),e.setExcludePast("checked"===c),a(!1)},color:"white",isOpen:n,numberOfAppliedFilters:m,reinit:()=>{e.setExcludeEmpty(!1),o("unchecked"),e.setExcludeFull(!1),d("unchecked"),e.setExcludePast(!1),u("unchecked"),e.setName(""),a(!1)},showButtons:!0,onStateChange:a,children:[(0,i.jsx)(Bf,{state:s,onClick:o,children:t("cacher_les_cr_n_76382")}),(0,i.jsx)(Bf,{state:r,onClick:d,children:t("cacher_les_cr_n_31908")}),(0,i.jsx)(Bf,{state:c,onClick:u,children:t("masquer_les_cr_05336")})]})]})},jA=e=>{const t=Ai(),[n,a,s]=pA(""),[o,r]=(0,l.useState)(!1),[d,c]=(0,l.useState)(!1),[u,g]=(0,l.useState)(!1),{data:p,loader:f}=Ei("query MassAccreditSlots(\n $eventId: EventId!\n $delegationId: DelegationId\n $accreditationName: String\n $excludeFull: Boolean\n $excludeEmpty: Boolean\n $excludePast: Boolean\n) {\n event(id: $eventId) {\n delegation: delegationMaybe(id: $delegationId) {\n accreditationsSlots {\n accreditationSlotId\n assignedResources\n maxResources\n }\n }\n\n accreditationsSlots(\n delegationId: $delegationId\n accreditationName: $accreditationName\n includeHidden: true\n excludeFull: $excludeFull\n excludeEmpty: $excludeEmpty\n excludePast: $excludePast\n ) {\n nodes {\n id\n accreditationId\n name\n assignedResources\n maxResources\n date\n isBlocked\n isFull\n\n accreditation {\n id\n accreditationCategoryId\n accreditationCategoryName\n name\n accreditationDisplay\n hasSlots\n color\n icon\n index\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationName:h(a)?a:void 0,excludeEmpty:o,excludeFull:d,excludePast:u},[]);const I=(0,l.useMemo)(()=>(p.event?.accreditationsSlots.nodes??[]).filter(e=>!e.isBlocked),[p.event]),_=(0,l.useMemo)(()=>(0,mo.A)((0,_r.A)(I.map(e=>e.accreditationCategory),e=>e.id),e=>m(e.name)),[I]),x=(0,l.useMemo)(()=>(0,_r.A)(I.map(e=>e.accreditation),e=>e.id),[I]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(SA,{excludeEmpty:o,excludeFull:d,excludePast:u,name:n,setExcludeEmpty:r,setExcludeFull:c,setExcludePast:g,setName:s}),(0,i.jsx)(Hg,{height:"6"}),f||(0,i.jsx)(Ef,{css:{border:"1px solid $gray100",borderRadius:"$1"},children:_.map(t=>(0,i.jsx)(xA,{accreditations:x,accreditationsSlotsIds:e.values.massAccredit.accreditationsSlotsIds,category:t,change:e.change,delegationAccreditationsSlots:p.event.delegation?.accreditationsSlots??[],slots:I,strategy:e.values.massAccredit.strategy},t.id))}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{isLoading:e.submitting,onClick:e.handleSubmit,children:h(e.buttonText)?e.buttonText:t(e.values.massAccredit.strategy===Je.Add?"accr_diter_les_78545":e.values.massAccredit.strategy===Je.Replace?"r_accr_diter_le_34059":"d_saccr_diter_l_28590",e.numberOfSelected)})})]})},vA=({eventId:e,numberOfSelected:t,onClose:n,onSuccess:a,selecteds:s})=>{const o=Ai(),r=bi(Bl),{mutate:l}=Ss();return(0,i.jsx)(uA,{children:(0,i.jsx)(cI,{category:o("Accreditation"),heading:o("accr_diter_les_48281"),onClose:n,children:(0,i.jsx)(sA,{children:(0,i.jsxs)(cA,{initialValues:{massAccredit:{selecteds:s,strategy:Je.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{const i=(await l({eventId:e,massAccredit:t.massAccredit})).numberOfMembers;a(o("_1_membres_ont_05068",i)),n()},children:[(0,i.jsx)(dA,{heading:o("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(hA,{handleSubmit:e}),schema:r.step1Schema()}),(0,i.jsx)(dA,{heading:o("accr_ditations_39450"),render:({form:n,handleSubmit:a,submitting:s,values:o})=>(0,i.jsx)(jA,{change:n.change,delegationId:null,eventId:e,handleSubmit:a,numberOfSelected:t,submitting:s,values:o}),schema:r.step2Schema()})]})})})})},bA={PLURAL:"campaigns",SINGLE:"campaign"},AA={CAMPAIGNS:bA.PLURAL,CAMPAIGN:e=>vr([bA.SINGLE,e])},CA={CAMPAIGNS:({organizationId:e,eventId:t})=>vr([t?sc.EVENT({organizationId:e,eventId:t}):tc.COMMUNITY({organizationId:e}),AA.CAMPAIGNS]),CAMPAIGNS_SEGMENT:({organizationId:e,segmentId:t})=>vr([CA.CAMPAIGNS({organizationId:e}),t]),CAMPAIGN:({organizationId:e,eventId:t,campaignId:n})=>vr([t?sc.EVENT({organizationId:e,eventId:t}):tc.COMMUNITY({organizationId:e}),AA.CAMPAIGN(n)]),CAMPAIGN_DASHBOARD:e=>vr([CA.CAMPAIGN(e),Er.DASHBOARD]),CAMPAIGN_PREVIEW:({userInfoId:e,...t})=>vr([CA.CAMPAIGN(t),Er.PREVIEW,e]),CREATE(e){const t=Dr(CA.CAMPAIGNS(e));return e.options?`${t}/${e.options}`:t},CREATE_TEMPLATE:e=>vr([Dr(CA.CAMPAIGNS(e)),"template"]),UPDATE:e=>Or(CA.CAMPAIGN(e))},EA=e=>{const{history:t,translate:n}=zg(),{mutate:a,isLoading:s}=function(e={}){return Ti("mutation UsersInfosMassCampaignSend(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $campaignId: CampaignId!\n $selecteds: MassActionSelectedsInput!\n) {\n numberOfMembers: usersInfosMassCampaignSend(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n campaignId: $campaignId\n selecteds: $selecteds\n )\n}\n",e)}(),[o,r]=(0,l.useState)([]),d=F(o);return(0,i.jsxs)(xf,{size:"md",onClose:e.onClose,children:[(0,i.jsx)($,{justify:"center",children:(0,i.jsx)(pf,{color:"primary",icon:"people-group"})}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{font:"gray900 textLg medium",textAlign:"center",children:n("SendCampaign")}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsx)(VI,{isSearchVisible:!0,label:n("campagne_97871"),values:o,onChange:r,children:e.campaigns.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),e.canCreate&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Hg,{height:"2"}),(0,i.jsx)(ga,{color:"invisible",leftIcon:"plus",onClick:()=>{const n=function(e){try{return Buffer.from(e).toString("base64")}catch{try{return btoa(e)}catch{return""}}}(JSON.stringify({usersInfosIds:e.selecteds.ids}));t.push(CA.CREATE({organizationId:e.organizationId,eventId:e.eventId||void 0,options:n}))},children:n("cr_er_une_nouve_86635")})]}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)($,{gap:"3",justify:"end",children:[(0,i.jsx)(ga,{disabled:!d,isLoading:s,onClick:async()=>{if(F(o)){const t=e.campaigns.find(e=>e.id===o[0]),i=(await a({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,selecteds:e.selecteds,campaignId:o[0]})).numberOfMembers;e.onSuccess(n("la_campagne_1_62015",t.name,i)),e.onClose()}},children:n("envoyer_26609")}),(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:n("annuler_48254")})]})]})},TA=e=>(0,i.jsx)($,{css:{alignSelf:"stretch",alignItems:"start",padding:"$6",overflowY:"auto",...e.css},direction:"column",gap:"6",children:e.children}),MA=({handleSubmit:e,isLoading:t=!1,isSubmitDisabled:n=!1,setIsOpen:a,submitStyle:s,submitText:o,...r})=>{const{translate:l}=zg();return(0,i.jsxs)($,{as:"footer",css:{alignItems:"flex-end",alignSelf:"stretch",background:"$white",borderBlockStart:"1px solid $gray200",padding:"$6"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)($,{align:"center",gap:"4",justify:"end",children:[(0,i.jsx)(ga,{color:"white",onClick:()=>a(!1),children:l("annuler_48254")}),(0,i.jsx)(ga,{color:s,disabled:n,isLoading:t,onClick:()=>e(),children:o??l("submit_21373")})]}),r.children]})},RA=({heading:e,leftIcon:t,leftIconColor:n,leftIconBorder:a,leftIconCss:s,setIsOpen:o,...r})=>{const{translate:l}=zg();return(0,i.jsxs)($,{as:"header",css:{alignItems:"flex-start",alignSelf:"stretch",background:"$white",borderBlockEnd:"1px solid $gray200"},direction:"column",gap:"4",...r,children:[(0,i.jsxs)($,{css:{alignItems:"center",alignSelf:"stretch",padding:"$6 $7 $5 $7"},gap:"4",children:[t&&(0,i.jsx)($,{align:"center",css:{padding:"$3",bd:!0,border:a,...s},justify:"center",children:(0,i.jsx)($,{align:"center",height:24,justify:"center",width:24,children:(0,i.jsx)(ra,{className:"fa-xl",color:n,icon:t})})}),(0,i.jsx)($,{css:{alignItems:"flex-start",flex:1},direction:"column",justify:"center",children:e})]}),(0,i.jsx)($,{align:"center",css:{padding:"$2",height:"$space$9",width:"$space$9",position:"absolute",right:"$space$4",top:"$space$4"},justify:"center",children:(0,i.jsx)(ga,{"aria-label":l("close_dialog_50926"),color:"invisible",css:{color:"$gray500",width:"$space$6",height:"$space$6",padding:0},textAlign:"center",onClick:()=>o(!1),children:(0,i.jsx)("i",{className:"far fa-xmark"})})}),r.children]})},DA=({children:e,descId:t,labelId:n,isOpen:a,size:s,setIsOpen:o,...r})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("style",{dangerouslySetInnerHTML:{__html:"\n dialog::backdrop {\n background: rgba(52, 64, 84, 0.7)\n }\n "}}),(0,i.jsx)(uS,{"aria-describedby":t,"aria-labelledby":n,"data-testid":"modal-body",isOpen:a,setIsOpen:o,style:{border:"none",borderRadius:"var(--radii-3)",padding:0,inlineSize:"70vw",blockSize:"fit-content",maxWidth:"688px"},onClose:r.onClose,children:(0,i.jsx)($,{align:"center",direction:"column",...r,children:e})})]}),OA=({eventId:e,selecteds:t,sort:n,isOpen:a,setIsOpen:s})=>{const{translate:o}=zg(),r=bi(Kl),{data:d,isLoading:c}=Ei("query MassPrintGroupsAndDocuments($eventId: EventId!) {\n event(id: $eventId) {\n printerGroups {\n __typename\n\n ... on PrinterGroupList {\n nodes {\n id\n name\n }\n }\n\n ... on PrinterGroupError {\n message\n }\n }\n zplDocuments {\n nodes {\n id\n name\n }\n }\n }\n}\n",{eventId:e},[]),{mutate:u}=function(e={}){return Ti("mutation VolunteersRegistrationsMassPrint($eventId: EventId!, $input: MassPrintInput!) {\n count: volunteersRegistrationsMassPrint(eventId: $eventId, input: $input)\n}\n",e)}(),m=uh(),g=(0,l.useRef)(null),h=c?null:d.event.printerGroups,p="PrinterGroupError"===h?.__typename,f="PrinterGroupError"===h?.__typename?h.message:0===h?.nodes.length?o("no_printing_loc_73059"):void 0;return(0,i.jsx)(rh,{css:{dialog:{overflow:"visible"},footer:{borderBottomLeftRadius:"$3",borderBottomRightRadius:"$3"},header:{borderTopLeftRadius:"$3",borderTopRightRadius:"$3"}},customErrorRef:g,initialValues:{input:r.default({selecteds:t,sort:n})},render:({handleSubmit:e,submitting:t})=>(0,i.jsx)(wA,{disabled:c||t||p,ids:m,isOpen:a,setIsOpen:s,onSubmit:()=>{c||t||p||e()},children:c?(0,i.jsxs)($,{direction:"column",gap:"6",width:"100%",children:[(0,i.jsx)(Dh,{borderRadius:"$1",css:{marginTop:"$6"},height:40,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",css:{marginTop:"$6"},height:40,width:1})]}):(0,i.jsxs)($i,{width:"100%",children:[(0,i.jsx)($i,{ref:g,children:(0,i.jsx)(Hs.Provider,{value:{designSystem:Ys},children:(0,i.jsx)(ah,{})})}),(0,i.jsxs)($,{direction:"column",gap:"6",children:[f&&(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:o("incomplete_prin_64421")}),(0,i.jsx)(th,{children:f})]}),(0,i.jsx)(GI,{label:o("wristband_to_pr_39675"),name:"input.zplDocumentId",children:d.event.zplDocuments.nodes.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))}),(0,i.jsx)(GI,{label:o("printing_locati_10729"),name:"input.groupId",state:p?"disabled":void 0,children:("PrinterGroupList"===h?.__typename?h.nodes:[]).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))})]})]})}),schema:r.schema(),onSubmit:async({input:t},n)=>{if(!n.getState().invalid)try{await u({eventId:e,input:t})}finally{s(!1)}}})},wA=({children:e,disabled:t,ids:n,isOpen:a,onSubmit:s,setIsOpen:o})=>{const{translate:r}=zg();return(0,i.jsxs)(DA,{descId:n.descId,isOpen:a,labelId:n.labelId,role:"dialog",setIsOpen:o,size:"md",onClose:()=>{o(!1)},children:[(0,i.jsx)(RA,{heading:(0,i.jsx)(Xg,{id:n.labelId,children:r("imprimer_un_bra_94539")}),id:n.labelId,leftIcon:"hand-back-fist",leftIconColor:"gray800",setIsOpen:o}),(0,i.jsx)(TA,{css:{backgroundColor:"white"},id:n.descId,children:e}),(0,i.jsx)(MA,{handleSubmit:s,isSubmitDisabled:t,setIsOpen:o,submitText:r("print_37582")})]})},PA=e=>{const{translate:t}=zg(),n=bi(Bl),{mutate:a}=Fs();return(0,i.jsx)(uA,{children:(0,i.jsx)(cI,{category:t("Accreditation"),heading:t("update_desired_accreditations"),onClose:e.onClose,children:(0,i.jsx)(sA,{css:{py:"$7"},children:(0,i.jsxs)(cA,{initialValues:{massAccredit:{selecteds:e.selecteds,strategy:Je.Add,accreditationsSlotsIds:[]}},isEdit:!1,onSubmit:async t=>{await a({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massAccredit:t.massAccredit}),e.onSuccess(),e.onClose()},children:[(0,i.jsx)(dA,{heading:t("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)(hA,{handleSubmit:e}),schema:n.step1Schema()}),(0,i.jsx)(dA,{heading:t("accr_ditations_39450"),render:({form:n,handleSubmit:a,values:s,submitting:o})=>(0,i.jsx)(jA,{buttonText:s.massAccredit.strategy===Je.Delete?t("supprimer_les_a_93519"):t("update_desired_accreditations"),change:n.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:a,numberOfSelected:e.numberOfSelected,submitting:o,values:s}),schema:n.step2Schema()})]})})})})},$A=e=>{const t=Ai();return(0,i.jsx)(gA,{handleSubmit:e.handleSubmit,nextText:t("suivant_62774"),prefix:"massProfileUpdate.",strategies:[{label:t("remplacer_le_pr_39873"),value:Je.Replace},{label:t("supprimer_le_pr_54358"),value:Je.Delete}]})},kA=e=>{const t=Ai(),{data:n,loader:a}=Ei("query MassWishedProfileUpdateProfiles($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsProfiles {\n accreditationProfile {\n id\n name\n\n accreditationProfileCategory {\n id\n name\n }\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId},[]);const{accreditationProfileId:s,strategy:o}=e.values.massProfileUpdate,r=o===Je.Delete,d=(0,l.useMemo)(()=>(n.event?.delegation.accreditationsProfiles??[]).map(e=>e.accreditationProfile),[n.event]),c=(0,l.useMemo)(()=>Object.values((0,Zd.A)(d,e=>e.accreditationProfileCategory.id)).map(e=>({...e[0].accreditationProfileCategory,accreditationsProfiles:e})),[d]),u=(0,l.useMemo)(()=>Zj(c),[c]);return a||(0,i.jsxs)(i.Fragment,{children:[!r&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(VI,{isSearchVisible:!0,label:t("profil_d_accr_d_63000"),multiple:!1,placeholder:t("s_lectionner_un_45763"),values:(0,go.A)([s]),onChange:t=>{e.change("massProfileUpdate.accreditationProfileId",t[0]??null)},children:u}),(0,i.jsx)(Hg,{height:"7"})]}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{isLoading:e.submitting,onClick:e.handleSubmit,children:t(r?"supprimer_le_pr_87965":"mettre_jour_l_05683",e.numberOfSelected)})})]})},NA=e=>{const{translate:t}=zg(),n=bi(Xl),{mutate:a}=Us();return(0,i.jsx)(uA,{children:(0,i.jsx)(cI,{category:t("Accreditation"),heading:t("mettre_jour_l_03244"),onClose:e.onClose,children:(0,i.jsx)(sA,{css:{py:"$7"},children:(0,i.jsxs)(cA,{initialValues:{massProfileUpdate:{accreditationProfileId:null,selecteds:e.selecteds,strategy:Je.Replace}},isEdit:!1,onSubmit:async t=>{await a({organizationId:e.organizationId,eventId:e.eventId,delegationId:e.delegationId,massProfileUpdate:t.massProfileUpdate}),e.onSuccess(),e.onClose()},children:[(0,i.jsx)(dA,{heading:t("initialisation_38640"),render:({handleSubmit:e})=>(0,i.jsx)($A,{handleSubmit:e}),schema:n.step1Schema()}),(0,i.jsx)(dA,{heading:t("profil_d_accr_d_02274"),render:({form:t,handleSubmit:n,submitting:a,values:s})=>(0,i.jsx)(kA,{change:t.change,delegationId:e.delegationId,eventId:e.eventId,handleSubmit:n,numberOfSelected:e.numberOfSelected,submitting:a,values:s}),schema:n.step2Schema()})]})})})})},zA=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),{mutate:o}=function(e={}){return Ti("mutation UsersInfosMassEdit(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $massEdit: MassEditInput!\n) {\n numberOfEdited: usersInfosMassEdit(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n massEdit: $massEdit\n )\n}\n",e)}(),{mutate:r}=Ps(),{mutate:d}=js(),[c,u]=(0,l.useState)(!1),[m,g]=(0,l.useState)(!1),[h,p]=(0,l.useState)(!1),[f,I]=(0,l.useState)(!1),[_,x]=(0,l.useState)(!1),[y,S]=(0,l.useState)(!1),[j,v]=(0,l.useState)(!1),b=e.massActions.getSelectedsInput(e.predicates,e.scope),A=e.massActions.isAllSelected?e.totalCount:e.massActions.numberOfSelected,C=e.showAccreditationsValidate||F(e.campaigns)||e.showDelete;return(0,i.jsxs)(i.Fragment,{children:[e.canMemberEdit&&(0,i.jsx)(ga,{color:"invisible-gray",leftIcon:"pen",onClick:()=>u(!0),children:t("_diter_un_champ_64621")}),e.showWishedAccreditationsEdit&&(0,i.jsx)(ga,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>g(!0),children:t("_diter_les_accr_41957")}),e.showWishedProfileEdit&&(0,i.jsx)(ga,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>p(!0),children:t("_diter_le_profi_54032")}),e.showAccreditationsEdit&&(0,i.jsx)(ga,{color:"invisible-gray",leftIcon:"wand-magic-sparkles",onClick:()=>I(!0),children:t("_diter_les_accr_86042")}),C&&(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"invisible-gray",rightIcon:"chevron-down",children:t("plus_77692")})}),(0,i.jsxs)(Fp,{placement:"bottom-end",children:[e.showAccreditationsValidate&&(0,i.jsx)(zp,{icon:"check",onClick:async()=>{await r({eventId:a,delegationId:s,selecteds:b}),e.onMassEditSuccess()},children:t("valider_les_acc_80801")}),e.showPrint&&(0,i.jsx)(zp,{icon:"hand-back-fist",onClick:()=>v(!0),children:t("imprimer_un_bra_94539")}),F(e.campaigns)&&(0,i.jsx)(zp,{icon:"paper-plane",onClick:()=>x(!0),children:t("SendCampaign")}),e.showDelete&&(0,i.jsx)(zp,{color:"red",icon:"user-xmark",onClick:()=>S(!0),children:t("retirer_de_la_d_64963")})]})]}),c&&(0,i.jsx)(iA,{customFields:e.customFields,mutate:e=>o({organizationId:n,eventId:a,delegationId:s,massEdit:e}),selecteds:b,onClose:()=>u(!1),onSuccess:e.onMassEditSuccess}),m&&(0,i.jsx)(PA,{delegationId:s,eventId:a,numberOfSelected:A,organizationId:n,selecteds:b,onClose:()=>g(!1),onSuccess:e.onMassEditSuccess}),h&&(0,i.jsx)(NA,{delegationId:s,eventId:a,numberOfSelected:A,organizationId:n,selecteds:b,onClose:()=>p(!1),onSuccess:e.onMassEditSuccess}),f&&(0,i.jsx)(vA,{eventId:a,numberOfSelected:A,selecteds:b,onClose:()=>I(!1),onSuccess:e.onMassEditSuccess}),_&&(0,i.jsx)(EA,{campaigns:e.campaigns,canCreate:!1,delegationId:s,eventId:a,organizationId:n,selecteds:b,onClose:()=>x(!1),onSuccess:e.onMassEditSuccess}),y&&(0,i.jsx)(Ob,{buttonText:t("supprimer_43083"),subtext:t("_tes_vous_sur_d_29974"),text:t("suppression_de_57689",A),onClose:()=>S(!1),onDelete:async()=>{await d({organizationId:n,eventId:a,delegationId:s,selecteds:b,deleteFromEvent:e.deleteFromEvent}),e.onMassEditSuccess()}}),j&&(0,i.jsx)(OA,{eventId:a,isOpen:j,selecteds:b,setIsOpen:v,sort:e.sort})]})},LA=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)(e.selectedSlotsIds),[s,o]=(0,l.useState)(e.selectedProfilesIds),[r,d]=(0,l.useState)(e.rendering),[c,u]=(0,l.useState)(e.showAccreditations),[m,g]=(0,l.useState)(e.showProfiles),[h,p]=(0,l.useState)(e.showQuota);return(0,i.jsxs)($,{direction:"column",onChange:Ia,children:[(0,i.jsxs)($,{css:{padding:"$2 $6 $4 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(Df,{value:c,onChange:u,children:t("afficher_les_ac_56952")}),c&&(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,label:t("accr_ditations_39450"),multiple:!0,renderOnPortal:!0,values:n,onChange:a,children:e.accreditationsOptions}),e.accreditationsProfilesOptions&&(0,i.jsx)(Df,{value:m,onChange:g,children:t("afficher_les_pr_62371")}),e.accreditationsProfilesOptions&&m&&(0,i.jsx)(VI,{isSearchVisible:!0,isSelectAllVisible:!0,label:t("profils_d_accr_27825"),multiple:!0,renderOnPortal:!0,values:s,onChange:o,children:e.accreditationsProfilesOptions}),(0,i.jsxs)(YI,{label:t("grouper_les_acc_40252"),value:r,onChange:d,children:[(0,i.jsx)("option",{value:wr.Category,children:t("cat_gorie_00291")}),(0,i.jsx)("option",{value:wr.Date,children:t("Date")})]}),!e.hideQuotaOption&&(0,i.jsx)(Df,{value:h,onChange:p,children:t("afficher_les_qu_20761")})]}),(0,i.jsxs)($,{align:"center",css:{borderTop:"1px solid $gray200",padding:"$4 $6 $2 $6"},gap:"4",justify:"end",children:[(0,i.jsx)($i,{css:{cursor:"pointer"},font:"gray700 textSm medium",onClick:()=>{e.reset(),e.close()},children:t("r_initialiser_77538")}),(0,i.jsx)(ga,{size:"sm",onClick:()=>{e.setShowAccreditations(c),e.setSelectedSlotsIds(n),e.setShowProfiles(m),e.setSelectedProfilesIds(s),e.setRendering(r),e.hideQuotaOption||e.setShowQuota(h),e.close()},children:t("appliquer_05753")})]})]})};function FA(e){return Xp((0,_r.A)(e,e=>e.accreditation.id).map(t=>({...t.accreditation,accreditationCategory:t.accreditationCategory,slots:cu(e.filter(e=>e.accreditation.id===t.accreditation.id))})))}const UA=e=>{const{translate:t}=zg(),n=l.useRef(null),a=bi(gl),s=bi(qd),o=(0,l.useMemo)(()=>(0,_r.A)((0,mo.A)(e.slots.flatMap(e=>e.date?.isValid?[e.date]:[]),e=>e.toMillis()),e=>e.toMillis()),[e.filteredAccreditations]),r=(0,l.useMemo)(()=>(0,ef.A)((0,Zd.A)(e.slots,e=>e.date?.isValid?e.date.toMillis():"nodate"),e=>e.length),[e.slots]),d=(0,l.useMemo)(()=>ny(a,e.allCategories),[a,e.allCategories]),c=(0,l.useMemo)(()=>{return F(e.allAccreditationsProfiles)?(t=e.allAccreditationsProfiles,(0,mo.A)((0,_r.A)(t.map(e=>e.accreditationProfileCategory),e=>e.id),e=>m(e.name)).map(e=>(0,i.jsx)("optgroup",{label:e.name,children:(0,mo.A)(t.filter(t=>t.accreditationProfileCategory.id===e.id),e=>m(e.name)).map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id))):null;var t},[e.allAccreditationsProfiles]),[u,g]=(0,l.useState)(!1),p=(0,l.useCallback)(()=>{e.setShowAccreditations(!0),e.setSelectedSlotsIds([]),e.setShowProfiles(!0),e.setSelectedProfilesIds([]),e.setRendering(wr.Category),e.hideQuotaOption||e.setShowQuota(!1)},[e.hideQuotaOption,e.setRendering,e.setSelectedProfilesIds,e.setSelectedSlotsIds,e.setShowAccreditations,e.setShowProfiles,e.setShowQuota]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{ref:n,css:{background:"white",border:"1px solid $gray200"},children:[(0,i.jsxs)($,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,i.jsx)($,{align:"center",css:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},gap:"3",width:1,children:!e.hideOptions&&(0,i.jsxs)(Rp,{doNotCloseOnOtherOpen:!0,isOpen:u,onStateChange:g,children:[(0,i.jsx)(Up,{children:(0,i.jsx)($i,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"bars-filter",size:"sm",children:t("filtres_64574")})})}),(0,i.jsx)(Fp,{placement:"bottom-start",width:385,children:(0,i.jsx)(LA,{accreditationsOptions:d,accreditationsProfilesOptions:c,close:()=>g(!1),hideQuotaOption:e.hideQuotaOption,rendering:e.rendering,reset:p,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setRendering:e.setRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setShowAccreditations,setShowProfiles:e.setShowProfiles,setShowQuota:e.setShowQuota,showAccreditations:e.showAccreditations,showProfiles:e.showProfiles,showQuota:e.showQuota})})]})}),(0,i.jsx)($,{css:{borderRight:"1px solid $gray200",height:"$cellHeightSm"},width:1,onClick:()=>{n.current?.requestFullscreen()}}),e.showQuota&&(0,i.jsx)($,{css:{borderRight:"1px solid $gray200",height:"32px"},width:1}),e.data.map(t=>e.renderLeftColumn(t))]}),(0,i.jsx)($,{css:{flex:"1",overflowX:"auto"},children:(0,i.jsxs)($,{direction:"column",children:[(0,i.jsxs)($,{css:{borderBottom:"1px solid $gray200",height:"$cellHeightSm"},children:[F(e.accreditationsProfiles)&&(0,i.jsx)($,{css:{background:"$gray700",borderRight:"1px solid $gray200",color:"white",fontSize:"$textSm",fontWeight:"$medium",px:"$4",textAlign:"center",textTransform:"uppercase",width:`calc(${e.accreditationsProfiles.length} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:t("profils_09110")}),e.rendering===wr.Category&&e.filteredAccreditations.map(t=>{const n=h(t.acronym)?t.acronym:t.name;return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${t.numberOfSlots} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)}),e.rendering===wr.Date&&o.map(t=>{const n=t.toMillis(),s=r[n],o=a.toLocaleString(t,Ya.DateOnly.MonthLong);return(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${s} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:o,width:1,children:o})},n)}),e.rendering===wr.Date&&(r.nodate??0)>0&&(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`calc(${r.nodate} * ${e.cellWidth}px)`},direction:"column",height:1,justify:"center",children:(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",width:1,children:"-"})})]}),(0,i.jsxs)($,{css:{height:"$cellHeightSm"},children:[e.accreditationsProfiles.map(t=>(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:t.name,width:1,children:t.name}),(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationProfileCategory.name,width:1,children:t.accreditationProfileCategory.name})]},t.id)),e.slots.map(t=>{const n=e.rendering===wr.Category?t.name||"-":h(t.accreditation.acronym)?t.accreditation.acronym:t.accreditation.name,s=t.date?.isValid?a.toLocaleString(t.date,Ya.DateOnly.Numeric):"-";return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",px:"$4",width:`${e.cellWidth}px`},direction:"column",height:1,justify:"center",children:[(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray800 textSm medium",textAlign:"center",title:n,width:1,children:n}),e.rendering===wr.Category&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:s,width:1,children:s}),e.rendering===wr.Date&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},textAlign:"center",title:t.accreditationCategory.name,width:1,children:t.accreditationCategory.name})]},t.id)})]}),e.showQuota&&(0,i.jsxs)($,{height:32,children:[e.accreditationsProfiles.map(n=>{const a=n.maxResources??Number.POSITIVE_INFINITY,o=n.assignedResources/a;return(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",width:`${e.cellWidth}px`},height:1,justify:"center",children:(0,i.jsx)(jf,{color:lf(o,{higherIsBetter:!1}),size:"sm",children:t("_1_2_membres_04485",n.assignedResources,s.toNumberOrInfinity(a))})},n.id)}),e.slots.map(n=>{const a=n.maxResources??Number.POSITIVE_INFINITY,o=n.assignedResources/a;return(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",width:`${e.cellWidth}px`},height:1,justify:"center",children:(0,i.jsx)(jf,{color:lf(o,{higherIsBetter:!1}),size:"sm",children:t("_1_2_membres_04485",n.assignedResources,s.toNumberOrInfinity(a))})},n.id)})]}),e.data.map(t=>e.renderRow(t))]})})]}),(0,i.jsx)(Ij,{children:(0,i.jsx)(fj,{limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,setLimit:e.setLimit,setOffset:e.setOffset,showLimits:!0,totalCount:e.totalCount})})]})},BA=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[e.accreditationSlotId]:[]),[e.vr]),a=(0,l.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.isAutoAccredit?[]:[e.accreditationSlotId]),[e.vr]),s=(0,l.useMemo)(()=>(e.vr.matrixWishedSlots||[]).map(e=>e.id),[e.vr]),o=(0,l.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlotId]:[]),[e.vr]),r=(0,l.useMemo)(()=>(e.vr.matrixAuis||[]).flatMap(e=>e.accreditationProfileId?[e.accreditationSlotId]:[]),[e.vr]);return(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[e.accreditationsProfiles.map(n=>{const a=e.vr.accreditationProfileId===n.id,s=e.vr.wishedAccreditationProfileId===n.id,o=e.isEditMode&&("assigned"===e.editMode&&a||"wished"===e.editMode&&s),r=e.isEditMode&&("assigned"===e.editMode&&!a||"wished"===e.editMode&&!s);return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",padding:"$3 $4",width:"$cellWidth","& > .h-accreditations-matrix-cell":{display:"flex"},"&:hover > .h-accreditations-matrix-cell":{display:"none"},"& > .h-accreditations-matrix-edit-cell":{display:"none"},"&:hover > .h-accreditations-matrix-edit-cell":{display:"flex"}},height:1,children:[o&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$error200",bd:"error500 1",color:"$error700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.deleteAccreditationProfile(e.vr.userInfo.id,n.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(ra,{icon:"trash-can"})}),r&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary100",bd:"primary500 1",color:"$primary500",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationProfile(e.vr.userInfo.id,n.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(ra,{icon:"plus"})}),a?(0,i.jsx)($,{align:"center",className:r||o?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,i.jsx)(ra,{icon:"check"})}):s?(0,i.jsx)($,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"white",bd:"gray300 1",borderStyle:"dashed"},height:1,justify:"center",width:1,children:(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("souhait_19593")})}):null]},n.id)}),e.slots.map(l=>{const d=n.includes(l.id),c=a.includes(l.id),u=s.includes(l.id),m=r.includes(l.id),g=e.isEditMode&&!l.isBlocked&&!m&&(e.canDeleteCheckedIn||!o.includes(l.id))&&("assigned"===e.editMode&&(d||c)||"wished"===e.editMode&&u),h=e.isEditMode&&!l.isBlocked&&("assigned"===e.editMode&&!d&&!c||"wished"===e.editMode&&!u);return(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",padding:"$3 $4",width:"$cellWidth","& > .h-accreditations-matrix-cell":{display:"flex"},"&:hover > .h-accreditations-matrix-cell":{display:"none"},"& > .h-accreditations-matrix-edit-cell":{display:"none"},"&:hover > .h-accreditations-matrix-edit-cell":{display:"flex"}},height:1,children:[g&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$error200",bd:"error500 1",color:"$error700",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.deleteAccreditationSlot(e.vr.userInfo.id,l.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(ra,{icon:"trash-can"})}),h&&(0,i.jsx)($,{align:"center",className:"h-accreditations-matrix-edit-cell",css:{background:"$primary100",bd:"primary500 1",color:"$primary500",cursor:"pointer"},height:1,justify:"center",width:1,onClick:async()=>{await e.addAccreditationSlot(e.vr.userInfo.id,l.id),e.reloadRow(e.vr.id)},children:(0,i.jsx)(ra,{icon:"plus"})}),d||c?(0,i.jsx)($,{align:"center",className:h||g?"h-accreditations-matrix-cell":"",css:{background:"$success200",bd:"success500 1",color:"$success700",fontSize:"$textMd"},height:1,justify:"center",width:1,children:(0,i.jsx)(ra,{icon:m?"layer-group":d?"bolt-auto":"check"})}):u?(0,i.jsx)($,{align:"center",className:e.isEditMode?"h-accreditations-matrix-cell":"",css:{background:"white",bd:"gray300 1",borderStyle:"dashed"},height:1,justify:"center",width:1,children:(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("souhait_e_52100")})}):null]},l.id)})]})},VA=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>function(e){const t=FA(e);return(0,mo.A)((0,_r.A)(e,e=>e.accreditationCategory.id).map(e=>({...e.accreditationCategory,accreditations:t.filter(t=>t.accreditationCategory.id===e.accreditationCategory.id)})),e=>m(e.name))}(e.allAccreditationsSlots),[e.allAccreditationsSlots]),a=(0,l.useMemo)(()=>FA(e.allAccreditationsSlots),[e.allAccreditationsSlots]),s=(0,l.useMemo)(()=>e.showAccreditations?function(e,t){return e.flatMap(e=>{const n=e.slots.map(e=>e.id),i=U(t)?e.slots.length:(0,ml.A)(n,t).length;return 0===i?[]:[{...e,numberOfSlots:i}]})}(a,e.selectedSlotsIds):[],[a,e.selectedSlotsIds,e.showAccreditations]),o=(0,l.useMemo)(()=>function(e,t,n){const i=e.flatMap(e=>e.slots.filter(e=>U(t)||t.includes(e.id)));return n===wr.Category?i:(0,mo.A)(i,e=>e.date?.isValid?e.date.toMillis():Number.POSITIVE_INFINITY)}(s,e.selectedSlotsIds,e.rendering),[s,e.selectedSlotsIds,e.rendering]),r=(0,l.useMemo)(()=>(0,mo.A)(e.allAccreditationsProfiles.filter(t=>e.showProfiles&&(U(e.selectedProfilesIds)||e.selectedProfilesIds.includes(t.id))),e=>[m(e.accreditationProfileCategory.name),m(e.name)]),[e.allAccreditationsProfiles,e.selectedProfilesIds,e.showProfiles]),d=(0,l.useCallback)(t=>e.isRowLoading(t.id)?(0,i.jsx)(gj,{css:{border:"none",borderTop:"1px solid $gray200",height:"$cellHeightSm"}},t.userInfo.id):(0,i.jsx)(BA,{accreditationsProfiles:r,addAccreditationProfile:e.addAccreditationProfile,addAccreditationSlot:e.addAccreditationSlot,canDeleteCheckedIn:e.canDeleteCheckedIn,deleteAccreditationProfile:e.deleteAccreditationProfile,deleteAccreditationSlot:e.deleteAccreditationSlot,editMode:e.editMode,isEditMode:e.isEditMode,reloadRow:e.reloadRow,slots:o,vr:t},t.userInfo.id),[e.addAccreditationProfile,e.addAccreditationSlot,e.deleteAccreditationProfile,e.deleteAccreditationSlot,e.editMode,e.isEditMode,e.isRowLoading,e.reloadRow,r,o]);return(0,i.jsx)($,{direction:"column",width:1,children:e.isLoading?(0,i.jsx)(da,{}):U(e.members)||U(s)&&U(r)?(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200"},height:400,children:U(e.members)?(0,i.jsx)(Tf,{imageSrc:Ah.Blanks.Member,title:t("aucun_membre_ne_07054")}):F(e.selectedSlotsIds)||F(e.selectedProfilesIds)||!e.showAccreditations||!e.showProfiles?(0,i.jsx)($,{align:"center",height:1,justify:"center",width:1,children:(0,i.jsx)(ga,{color:"white",leftIcon:"broom-wide",onClick:()=>{e.setShowAccreditations(!0),e.setSelectedSlotsIds([]),e.setShowProfiles(!0),e.setSelectedProfilesIds([])},children:t("remettre_les_fi_83263")})}):(0,i.jsx)(Tf,{imageSrc:Ah.Blanks.Accreditation,title:t("aucune_accr_dit_97505")})}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)(UA,{accreditationsProfiles:r,allAccreditations:a,allAccreditationsProfiles:e.allAccreditationsProfiles,allCategories:n,cellWidth:120,data:e.members,filteredAccreditations:s,hideOptions:e.hideOptions,limit:e.limit,numberOfPages:e.numberOfPages,offset:e.offset,renderLeftColumn:t=>(0,i.jsx)($,{css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:(0,i.jsx)(vj,{isClickDisabled:!!e.getInformationPanelPath,size:32,userInfo:t.userInfo})},t.userInfo.id),renderRow:d,rendering:e.rendering,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setLimit:e.setLimit,setOffset:e.setOffset,setRendering:e.setRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setShowAccreditations,setShowProfiles:e.setShowProfiles,setShowQuota:e.setShowQuota,showAccreditations:e.showAccreditations,showProfiles:e.showProfiles,showQuota:e.showQuota,slots:o,totalCount:e.totalCount})})})},GA=e=>{const{params:{organizationId:t,eventId:n,delegationId:a}}=zg(),{data:s,idToLoading:o,isEditMode:r,isLoading:d,limit:c,numberOfPages:u,offset:m,reloadRow:g,setLimit:h,setOffset:p,totalCount:f}=ty(),{mutate:I}=Fs(),{mutate:_}=Us(),{data:x,isLoading:y,reload:S}=Ei("query DelegationMembersAccreditationsMatrix($eventId: EventId!, $delegationId: DelegationId!) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationsProfiles {\n assignedResources\n maxResources\n\n accreditationProfile {\n ...AccreditationProfileMatrix\n }\n }\n\n allAccreditationsSlots(onlyVisible: true) {\n assignedResources\n maxResources\n\n accreditationSlot {\n ...AccreditationSlotMatrix\n }\n }\n }\n }\n}\n",{eventId:n,delegationId:a},[ka.AccreditationProfileMatrixFragment,ka.AccreditationSlotMatrixFragment]),j=(0,l.useMemo)(()=>(x.event?.delegation.allAccreditationsSlots??[]).map(e=>({...e.accreditationSlot,assignedResources:e.assignedResources,maxResources:e.maxResources})),[x]),v=(0,l.useMemo)(()=>(x.event?.delegation.accreditationsProfiles??[]).map(e=>({...e.accreditationProfile,assignedResources:e.assignedResources,maxResources:e.maxResources})),[x]),b=(0,l.useCallback)(e=>o[e]??!1,[o]),A=(0,l.useCallback)(async(i,s)=>{await _({organizationId:t,eventId:n,delegationId:a,massProfileUpdate:{accreditationProfileId:s,selecteds:{ids:[i]},strategy:Je.Replace}}),e.matrixShowQuota&&S()},[S,a,n,_,t,e.matrixShowQuota]),C=(0,l.useCallback)(async(i,s)=>{await I({organizationId:t,eventId:n,delegationId:a,massAccredit:{accreditationsSlotsIds:[s],selecteds:{ids:[i]},strategy:Je.Add}}),e.matrixShowQuota&&S()},[S,a,n,I,t,e.matrixShowQuota]),E=(0,l.useCallback)(async(i,s)=>{await _({organizationId:t,eventId:n,delegationId:a,massProfileUpdate:{accreditationProfileId:s,selecteds:{ids:[i]},strategy:Je.Delete}}),e.matrixShowQuota&&S()},[S,a,n,_,t,e.matrixShowQuota]),T=(0,l.useCallback)(async(i,s)=>{await I({organizationId:t,eventId:n,delegationId:a,massAccredit:{accreditationsSlotsIds:[s],selecteds:{ids:[i]},strategy:Je.Delete}}),e.matrixShowQuota&&S()},[S,a,n,I,t,e.matrixShowQuota]);return(0,i.jsx)(VA,{addAccreditationProfile:A,addAccreditationSlot:C,allAccreditationsProfiles:v,allAccreditationsSlots:j,canDeleteCheckedIn:!1,deleteAccreditationProfile:E,deleteAccreditationSlot:T,editMode:"wished",getInformationPanelPath:e.getInformationPanelPath,hideOptions:e.hideOptions,isEditMode:r,isLoading:d||y,isRowLoading:b,limit:c,members:s,numberOfPages:u,offset:m,reloadRow:g,rendering:e.matrixRendering,selectedProfilesIds:e.selectedProfilesIds,selectedSlotsIds:e.selectedSlotsIds,setLimit:h,setOffset:p,setRendering:e.setMatrixRendering,setSelectedProfilesIds:e.setSelectedProfilesIds,setSelectedSlotsIds:e.setSelectedSlotsIds,setShowAccreditations:e.setMatrixShowAccreditations,setShowProfiles:e.setMatrixShowProfiles,setShowQuota:e.setMatrixShowQuota,showAccreditations:e.matrixShowAccreditations,showProfiles:e.matrixShowProfiles,showQuota:e.matrixShowQuota,totalCount:f})},WA=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),o=bi(gm),r=Di(),[d,c,u]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.columns??[],n,"eventDelegationMembers.columns",e.columns),m=(0,l.useMemo)(()=>e.canEditColumns||e.delegationsSpaceLayoutTab?d:e.columns,[d,e.canEditColumns,e.columns,e.delegationsSpaceLayoutTab]),[g,h,p]=dj(n,"eventDelegationMembers.limit",25),[f,I,_]=dj(n,"eventDelegationMembers.predicates",[]),x=(0,l.useMemo)(()=>bu(f),[f]),y=(0,l.useMemo)(()=>e.delegationsSpaceLayoutTab?.rendering===zr.List&&F(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds)?bu([{slug:"accreditationSlotId",operator:ht.Is,value:e.delegationsSpaceLayoutTab.infos.accreditationsSlotsIds}]):x,[e.delegationsSpaceLayoutTab,x]),[S,j,v]=cj(e.delegationsSpaceLayoutTab,e=>e.rendering,n,"eventDelegationMembers.rendering",zr.List),[b,A,C]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixRendering||wr.Category,n,"eventDelegationMembers.matrixRendering",wr.Category),[E,T,M]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.accreditationsSlotsIds||[],n,"eventDelegationMembers.selectedSlotsIds",[]),[R,D,O]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.accreditationsProfilesIds||[],n,"eventDelegationMembers.selectedProfilesIds",[]),[w,P,$]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowAccreditations??!0,n,"eventDelegationMembers.matrixShowAccreditations",!0),[k,N,L]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowProfiles??!0,n,"eventDelegationMembers.matrixShowProfiles",!0),[B,V,G]=cj(e.delegationsSpaceLayoutTab,e=>e.infos?.matrixShowQuota??!1,n,"eventDelegationMembers.matrixShowQuota",!1),[W,q,Y]=dj(n,"eventDelegationMembers.sort",null),{data:H,isLoading:Z}=Ei("query EventDelegationMembersInfos(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n weezeventOrganizationId\n\n customFields(eventId: $eventId, variety: UserInfo, privacy: $privacy) {\n nodes {\n ...SegmentCustomField\n }\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n isWeezeventConnected\n\n customDocuments {\n ...CustomDocumentPopulation\n }\n\n delegation(id: $delegationId) {\n id\n numberOfDelegationsAccreditationsSlots\n numberOfDelegationsAccreditationsProfiles\n\n accreditationsSlots(onlyDefault: true, onlyHidden: true) {\n accreditationSlotId\n }\n\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n id\n positionDisplay\n slotDisplay\n\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:n,eventId:a,delegationId:s,privacy:e.customFieldsPrivacy},[ka.SegmentCustomFieldFragment,ka.CustomDocumentPopulationFragment]);const K=u||p||_||v||C||M||O||$||L||G||Y||Z,Q=(0,l.useMemo)(()=>e.customFieldsPrivacy===ge.All?H.organization?.customFields.nodes??[]:(0,_r.A)((0,go.A)((H.event?.delegation.form.elements.map(e=>e.customField)||[]).concat(H.event?.delegation.columnsCustomFields||[])),e=>e.slug),[e.customFieldsPrivacy,H.organization,H.event]),X=uj(Q),J=(0,l.useMemo)(()=>H.event?o.getDelegationMembersFilters(n,a,Q,H.event,H.event.delegation.form,H.event.isWeezeventConnected):[],[a,Q,H.event]),ee=(0,l.useMemo)(()=>H.event?o.getDelegationMembersPossibleColumns(n,Q,{customDocuments:e.showCustomDocumentsColumns?H.event.customDocuments:[],forDelegationsSpace:e.forDelegationsSpace,isWeezeventConnected:H.event.isWeezeventConnected,positionDisplay:H.event.delegation.form.positionDisplay,slotDisplay:H.event.delegation.form.slotDisplay}):[],[e.forDelegationsSpace,e.showCustomDocumentsColumns,n,Q,H.event]),te=(0,l.useMemo)(()=>(H.event?.delegation.accreditationsSlots??[]).map(e=>e.accreditationSlotId),[H.event]),ne=(0,l.useMemo)(()=>"function"==typeof e.showEditMode?e.showEditMode(S):e.showEditMode,[e.showEditMode,S]),ie=(0,l.useMemo)(()=>U(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds||[]),[e.delegationsSpaceLayoutTab]),ae=(0,l.useMemo)(()=>U(e.delegationsSpaceLayoutTab?.infos?.accreditationsSlotsIds||[]),[e.delegationsSpaceLayoutTab]),se=(0,l.useMemo)(()=>e.delegationsSpaceLayoutTab?void 0:[zr.List,zr.AccreditationsMatrix],[e.delegationsSpaceLayoutTab]),oe=3695!==n&&(H.event?.delegation.numberOfDelegationsAccreditationsSlots??0)>0,re=(H.event?.delegation.numberOfDelegationsAccreditationsProfiles??0)>0,le=window.location.origin===ia.HEAVENT_PUBLIC_URL.origin?t=>`${window.location.origin}${Wc.DELEGATION_MEMBER_INFORMATION({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id})}`:void 0;return(0,l.useEffect)(()=>{r.setItem(xh.DELEGATIONS_SPACE_TAB,"members")},[]),K?(0,i.jsx)(da,{}):(0,i.jsx)(sj,{columns:m,columnsSearch:[],columnsToIncludes:mm,eventId:a,filters:J,getMassActionId:e=>e.userInfo.id,limit:g,loadDataList:Ls,loadDataListParams:{delegationId:s,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},loadRow:zs,loadRowParams:{delegationId:s,onlyVisibleAccreditationsSlots:e.onlyVisibleAccreditationsSlots,includeCanRegistrationStateUpdate:!1,includeIsEditable:!1},organizationId:n,possibleColumns:ee,possibleRenderings:se,predicates:y,renderActions:(t,n,a)=>(0,i.jsx)(zA,{campaigns:e.campaigns,canMemberEdit:e.canMemberEdit,customFields:Q,deleteFromEvent:e.deleteFromEvent,massActions:t,predicates:y,scope:{delegationId:s},showAccreditationsEdit:e.showAccreditationsEdit,showAccreditationsValidate:e.showAccreditationsValidate,showDelete:e.canMemberDelete,showPrint:e.showPrint,showWishedAccreditationsEdit:oe,showWishedProfileEdit:re,sort:W,totalCount:n,onMassEditSuccess:a}),renderAllSelectedText:e=>t("les_1_membres_71180",e),renderPageSelectedText:e=>t("les_1_membres_00895",e),renderSelectAllText:e=>t("s_lectionner_le_45277",e),rendering:S,setColumns:c,setLimit:h,setPredicates:I,setRendering:j,setSort:q,showEditColumns:S===zr.List&&e.canEditColumns,showEditMode:ne,showFilters:ie,showMassActions:e.canMemberEdit||e.canMemberAccredit,showPredicatesBadges:ae,showRowDropdown:!0,showRowEdit:e.canMemberEdit,showSearchColumns:!1,showSelectAll:!0,sort:W,children:S===zr.AccreditationsMatrix?(0,i.jsx)(GA,{getInformationPanelPath:le,hideOptions:!!e.delegationsSpaceLayoutTab,matrixRendering:b,matrixShowAccreditations:w,matrixShowProfiles:k,matrixShowQuota:B,selectedProfilesIds:R,selectedSlotsIds:E,setMatrixRendering:A,setMatrixShowAccreditations:P,setMatrixShowProfiles:N,setMatrixShowQuota:V,setSelectedProfilesIds:D,setSelectedSlotsIds:T}):(0,i.jsx)(yj,{getEditPath:e.getEditPath,renderCell:(t,o,r)=>(0,i.jsx)(Lv,{accreditationsPanelPath:Wc.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:o.userInfo.id}),availabilitiesPanelPath:Wc.DELEGATION_MEMBER_AVAILABILITIES({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:o.userInfo.id}),canChangeDelegation:!1,canMemberAccredit:e.canMemberAccredit,canMemberAssign:!1,column:t,customField:X.get(t.slug),eventId:a,informationPanelPath:le?.(o),positionsPanelPath:Wc.DELEGATION_MEMBER_POSITIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:o.userInfo.id}),reloadRow:r,row:o}),renderRowDropdown:(t,n)=>(0,i.jsx)(Pb,{accreditationState:t.accreditationState,allowedCustomDocuments:e.customBadges,canDelete:e.canMemberDelete&&t.canDelete,canDuplicate:e.canDuplicateMembers,canMemberAccredit:e.canMemberAccredit,customDocuments:H.event?.customDocuments??z,deleteFromEvent:e.deleteFromEvent,member:t.userInfo,reload:n,showDeleteFromEvent:e.showDeleteFromEvent,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:t.id}),renderRowPanels:(t,o)=>(0,i.jsx)(Tb,{accreditationsPanelPath:Wc.DELEGATION_MEMBER_ACCREDITATIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),availabilitiesPanelPath:Wc.DELEGATION_MEMBER_AVAILABILITIES({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),canCheckIn:!1,canDeleteCheckedIn:!1,canDeletePosition:()=>!1,canMemberAccredit:e.canMemberAccredit,canWishedAccreditationsEdit:!0,defaultHiddenAccreditationsSlotsIds:te,delegation:H.event.delegation,eventId:a,informationPanelPath:Wc.DELEGATION_MEMBER_INFORMATION({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),organizationId:n,positionsPanelPath:Wc.DELEGATION_MEMBER_POSITIONS({organizationId:n,eventId:a,delegationId:s,slug:e.delegationsSpaceLayoutTab?.slug,userInfoId:t.userInfo.id}),reloadRow:o,returnPathFallback:e.delegationsSpaceLayoutTab?Wc.DELEGATION_TAB({organizationId:n,eventId:a,slug:e.delegationsSpaceLayoutTab?.slug,delegationId:s}):Wc.DELEGATION_MEMBERS({organizationId:n,eventId:a,delegationId:s}),volunteerRegistration:t})})})},qA=e=>{const{history:t,params:{organizationId:n}}=zg(),a=(0,l.useMemo)(()=>(e.user.events||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name,onClick(){t.push(sc.EVENT({organizationId:n,eventId:e.id}))}})),[e.user]);return(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:a})})},YA=e=>{const{translate:t,params:{organizationId:n}}=zg(),a=bi(gl),{mutate:s}=function(e={}){return Ti("mutation UserInfoUpdateField(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $slug: String!\n $value: JSON!\n) {\n userInfoUpdateField(\n organizationId: $organizationId\n userInfoId: $userInfoId\n slug: $slug\n value: $value\n ) {\n id\n }\n}\n",e)}(),o=(0,l.useCallback)((t,i)=>s({organizationId:n,userInfoId:e.row.id,slug:i,value:t}),[e.row,s]),r=(0,l.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[{id:e.form.id,color:"gray",icon:null,text:e.form.name}]:[]),[e.row.formsUsersInfos]),d=(0,l.useMemo)(()=>(e.row.formsUsersInfos||[]).flatMap(e=>e.form?[`${e.form.name} : ${a.toLocaleString(e.insertedAt.toLocal(),Ya.DateTime)}`]:[]).join(", "),[e.row.formsUsersInfos]),c=(0,l.useMemo)(()=>(e.row.delegations||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.delegations]),u=(0,l.useMemo)(()=>(0,_r.A)(e.row.delegations||[],e=>e.delegationCategory.id).map(e=>({id:e.delegationCategory.id,color:"gray",icon:null,text:e.delegationCategory.name})),[e.row.delegations]),m=(0,l.useMemo)(()=>(e.row.emails??[]).map(e=>{const{color:n,leftIcon:i}=rv(e.state);return{id:e.id,color:n,icon:i,text:`${e.campaign?.name??""} - ${t(e.state)}`}}),[e.row.emails]),g=(0,l.useMemo)(()=>(e.row.tags||[]).map(e=>({id:e.id,color:"gray",icon:null,text:e.name})),[e.row.tags]);return"name"===e.column.slug?(0,i.jsx)(Yj,{clickPath:e.informationPanelPath,column:e.column,mutate:o,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"id"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.id}):"local_id"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.localId}):"duplicatedFrom"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.duplicatedFrom?(0,i.jsx)(vj,{size:32,userInfo:e.row.duplicatedFrom}):null}):"email"===e.column.slug?(0,i.jsx)(qj,{clickPath:e.informationPanelPath??Ng.MEMBER_INFORMATION({organizationId:n,userInfoId:e.row.id}),column:e.column,reload:e.reloadRow,updatable:e.updatable,userInfo:e.row}):"events"===e.column.slug?(0,i.jsx)(qA,{column:e.column,user:e.row}):"number_of_events"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.events?.length??0}):"forms"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:r})}):"forms_inserted_at"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)($i,{css:{ellipsis:!0},title:d,children:d})}):"delegations"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:c})}):"delegations_categories"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:u})}):"inserted_at"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:a.toLocaleString(e.row.insertedAt.toLocal(),Ya.DateTime)}):"last_seen_at"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:e.row.lastSeenAt?.isValid?a.toLocaleString(e.row.lastSeenAt.toLocal(),Ya.DateTime):""}):"campaigns_states"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:m})}):"tags"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:(0,i.jsx)(Fj,{badges:g})}):"comments"===e.column.slug?(0,i.jsx)(cx,{minWidth:e.column.minWidth,width:e.column.width,children:F(e.row.comments)?e.row.comments.map(e=>e.content).join("; "):""}):"roles"===e.column.slug?(0,i.jsx)(Hj,{minWidth:e.column.minWidth,userPermissions:e.row,width:e.column.width}):(0,i.jsx)(Wj,{avatarUser:e.row,clickPath:e.informationPanelPath??Ng.MEMBER_INFORMATION({organizationId:n,userInfoId:e.row.id}),column:e.column,customField:e.customField,fields:e.row.fields,mutate:o,reload:e.reloadRow,updatable:e.updatable})},HA=e=>{const{params:{organizationId:t}}=zg();return(0,i.jsx)(oo.dO,{children:e.informationPanelPath&&e.delegation&&(0,i.jsx)(oo.qh,{path:e.informationPanelPath,children:(0,i.jsx)(nb,{organizationId:t,delegation:e.delegation,userInfoId:e.userInfo.id,returnPathFallback:e.informationPanelPath})})})},ZA=e=>{const{translate:t,params:{organizationId:n,delegationId:a}}=zg(),s=bi(dm),o=Di(),[r,d,c]=dj(n,"organizationDelegationMembers.columns",e.columns),[u,m,g]=dj(n,"organizationDelegationMembers.limit",25),[h,p,f]=dj(n,"organizationDelegationMembers.predicates",[]),I=(0,l.useMemo)(()=>bu(h),[h]),[_,x,y]=dj(n,"organizationDelegationMembers.sort",null),{data:S,isLoading:j}=Ei("query OrganizationDelegationMembersInfos(\n $organizationId: OrganizationId!\n $delegationId: DelegationId!\n $privacy: CustomFieldPrivacy!\n) {\n organization(id: $organizationId) {\n customFields(variety: UserInfo, privacy: $privacy) {\n nodes {\n ...SegmentCustomField\n }\n }\n\n delegation(id: $delegationId) {\n id\n columnsCustomFields {\n ...SegmentCustomField\n }\n\n form {\n id\n elements {\n customField {\n ...SegmentCustomField\n }\n }\n }\n }\n }\n}\n",{organizationId:n,privacy:e.canCustomFieldRead?ge.All:ge.Public,delegationId:a},[ka.SegmentCustomFieldFragment]);const v=c||g||f||y||j,b=(0,l.useMemo)(()=>e.canCustomFieldRead?S.organization?.customFields.nodes??[]:(0,go.A)((S.organization?.delegation.form.elements.map(e=>e.customField)||[]).concat(S.organization?.delegation.columnsCustomFields??[])),[S.organization]),A=uj(b),C=(0,l.useMemo)(()=>s.getDelegationMembersFilters(b),[b]),E=(0,l.useMemo)(()=>s.getDelegationMembersPossibleColumns(b),[b]);return(0,l.useEffect)(()=>{o.setItem(xh.DELEGATIONS_SPACE_TAB,"members")},[]),v?(0,i.jsx)(da,{}):(0,i.jsx)(sj,{columns:e.canEditColumns?r:e.columns,columnsSearch:[],columnsToIncludes:lm,eventId:null,filters:C,limit:u,loadDataList:Ms,loadDataListParams:{delegationId:a},loadRow:Ts,organizationId:n,possibleColumns:E,predicates:I,renderActions:(t,n,s)=>(0,i.jsx)(zA,{campaigns:e.campaigns,canMemberEdit:e.canMemberEdit,customFields:b,deleteFromEvent:!1,massActions:t,predicates:I,scope:{delegationId:a},showAccreditationsEdit:!1,showAccreditationsValidate:!1,showDelete:e.canMemberDelete,showPrint:!1,showWishedAccreditationsEdit:!1,showWishedProfileEdit:!1,sort:_,totalCount:n,onMassEditSuccess:s}),renderAllSelectedText:e=>t("les_1_membres_71180",e),renderPageSelectedText:e=>t("les_1_membres_00895",e),renderSelectAllText:e=>t("s_lectionner_le_45277",e),rendering:zr.List,setColumns:d,setLimit:m,setPredicates:p,setSort:x,showEditColumns:e.canEditColumns,showEditMode:e.showEditMode,showFilters:!0,showMassActions:!0,showPredicatesBadges:!0,showRowDropdown:!0,showRowEdit:e.canMemberEdit,showSearchColumns:!1,showSelectAll:!0,sort:_,children:(0,i.jsx)(yj,{getEditPath:e.getEditPath,renderCell:(t,s,o)=>(0,i.jsx)(YA,{column:t,customField:A.get(t.slug),informationPanelPath:a?`${window.location.origin}${Wc.DELEGATION_MEMBER_INFORMATION({organizationId:n,delegationId:a,userInfoId:s.id})}`:void 0,reloadRow:o,row:s,updatable:e.canMemberEdit}),renderRowDropdown:(t,n)=>(0,i.jsx)(Pb,{accreditationState:null,allowedCustomDocuments:e.customBadges,canDelete:e.canMemberDelete,canDuplicate:!1,canMemberAccredit:!1,customDocuments:z,deleteFromEvent:!1,member:t,reload:n,showDeleteFromEvent:!1,showDocumentsDownload:e.showDocumentsDownload,volunteerRegistrationId:null}),renderRowPanels:e=>(0,i.jsx)(HA,{delegation:S.organization.delegation,informationPanelPath:Wc.DELEGATION_MEMBER_INFORMATION({organizationId:n,delegationId:a,userInfoId:e.id}),userInfo:e})})})},KA=e=>(0,i.jsx)($,{align:"end",css:{background:"gray"===e.background?"$gray50":"none",borderRight:"1px solid $gray200",overflow:"hidden",px:"$4"},direction:"column",height:1,justify:"center",width:1,children:e.children}),QA=(0,l.createContext)({});function XA(){return(0,l.useContext)(QA)}const JA=e=>{const{translate:t}=zg(),n=bi(qd),{accreditationIdToOpen:a,accreditationIdToValues:s,accreditationKeyToStats:o,accreditationValueKeyToStats:r,dates:d,hasNoDate:c,hasScanned:u,showTotal:m}=XA(),g=o[`a${e.accreditation.id}__no_date`],h=s[e.accreditation.id]||[],p=F(h),f=a[e.accreditation.id]??!0,{assignedTotal:I,scannedTotal:_}=(0,l.useMemo)(()=>{const t=(0,go.A)(d.map(t=>o[`a${e.accreditation.id}__${t.toSQLDate()}`]));return{assignedTotal:(0,Wo.A)(t,e=>e.assigned??0)+(c?g?.assigned??0:0),scannedTotal:(0,Wo.A)(t,e=>e.scanned??0)+(c?g?.scanned??0:0)}},[o,g,d,c,e.accreditation]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[d.map(a=>{const s=`a${e.accreditation.id}__${a.toSQLDate()}`,r=o[s];return e.accreditation.hasDateSlots?(0,i.jsxs)(KA,{background:"none",children:[(0,i.jsxs)($i,{children:[r?.assigned??0,n.toNumberOrInfinity(r?.max,{prefix:"/"})]}),u&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:r?.scanned?t("_1_scann_e_19753",r.scanned):"-"})]},a.toISO()):(0,i.jsx)(KA,{background:"none"},a.toISO())}),c&&(e.accreditation.hasDateSlots?(0,i.jsx)(KA,{background:"none"}):(0,i.jsxs)(KA,{background:"none",children:[(0,i.jsxs)($i,{children:[g?.assigned??0,n.toNumberOrInfinity(g?.max,{prefix:"/"})]}),u&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:g?.scanned?t("_1_scann_e_19753",g.scanned):"-"})]})),m&&(0,i.jsxs)(KA,{background:"none",children:[(0,i.jsxs)($i,{children:[I,n.toNumberOrEmpty(e.accreditation.maxResources,{prefix:"/"})]}),u&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:_>0?t("_1_scann_e_19753",_):"-"})]})]}),f&&p&&h.map(({id:n})=>{const a=r[`a${e.accreditation.id}__${n}__no_date`];return(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[d.map(a=>{const s=`a${e.accreditation.id}__${n}__${a.toSQLDate()}`,o=r[s];return e.accreditation.hasDateSlots?(0,i.jsxs)(KA,{background:"none",children:[(0,i.jsx)($i,{children:o?.assigned??0}),u&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:o?.scanned?t("_1_scann_e_19753",o.scanned):"-"})]},a.toISO()):(0,i.jsx)(KA,{background:"none"},a.toISO())}),c&&(e.accreditation.hasDateSlots?(0,i.jsx)(KA,{background:"none"}):(0,i.jsxs)(KA,{background:"none",children:[(0,i.jsx)($i,{children:a?.assigned??0}),u&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:a?.scanned?t("_1_scann_e_19753",a.scanned):"-"})]})),m&&(0,i.jsx)(KA,{background:"none"})]},n)})]})},eC=e=>{const{translate:t}=zg(),n=bi(qd),{categoryIdToAccreditations:a,categoryIdToOpen:s,categoryKeyToStats:o,dates:r,hasNoDate:d,hasScanned:c,showTotal:u}=XA(),m=(0,l.useMemo)(()=>a[e.category.id],[a,e.category.id]),g=s[e.category.id]??!0,h=o[`c${e.category.id}__no_date`],{assignedTotal:p,scannedTotal:f}=(0,l.useMemo)(()=>{const t=(0,go.A)(r.map(t=>o[`c${e.category.id}__${t.toSQLDate()}`]));return{assignedTotal:(0,Wo.A)(t,e=>e.assigned??0)+(d?h?.assigned??0:0),scannedTotal:(0,Wo.A)(t,e=>e.scanned??0)+(d?h?.scanned??0:0)}},[o,r,d,h,e.category]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{borderTop:"1px solid $gray200",height:"$cellHeightSm"},children:[r.map(n=>{const a=`c${e.category.id}__${n.toSQLDate()}`,s=o[a];return(0,i.jsxs)(KA,{background:"gray",children:[(0,i.jsx)($i,{children:s?.assigned??0}),c&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:s?.scanned?t("_1_scann_e_19753",s.scanned):"-"})]},n.toISO())}),d&&(0,i.jsxs)(KA,{background:"gray",children:[(0,i.jsx)($i,{children:h?.assigned??0}),c&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:h?.scanned?t("_1_scann_e_19753",h.scanned):"-"})]}),u&&(0,i.jsxs)(KA,{background:"gray",children:[(0,i.jsxs)($i,{children:[p,n.toNumberOrEmpty(e.category.maxResources,{prefix:"/"})]}),c&&(0,i.jsx)($i,{css:{ellipsis:!0},font:"gray500 textXs regular",textAlign:"end",width:1,children:f>0?t("_1_scann_e_19753",f):"-"})]})]}),g?m.map(e=>(0,i.jsx)(JA,{accreditation:e},e.id)):null]})},tC=e=>{const{translate:t}=zg(),{categories:n,categoryIdToAccreditations:a,customFields:s,links:o,setLinks:r}=XA(),[d,c]=(0,l.useState)(o),u=(0,l.useMemo)(()=>(0,mo.A)(s,e=>m(e.name)).filter(e=>!e.canSelectMultiple).map(e=>(0,i.jsx)("option",{value:e.slug,children:e.name},e.id)),[s]),g=(0,l.useCallback)((e,t)=>{c((0,sx.jM)(n=>{n[e].customFieldSlug=t}))},[c]),h=(0,l.useCallback)((e,t)=>{c((0,sx.jM)(n=>{n[e].accreditationsIds=t}))},[c]),p=d.every(e=>""!==e.customFieldSlug&&F(e.accreditationsIds));return(0,i.jsxs)(xy,{size:"md",onClose:e.onClose,children:[(0,i.jsx)(Fv,{children:t("ventiler_les_st_00770")}),(0,i.jsx)(yy,{css:{padding:"$6"},children:(0,i.jsxs)($,{direction:"column",gap:"3",children:[d.map((e,s)=>(0,i.jsxs)($,{css:{bd:!0},direction:"column",children:[(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$5 $6 $4 $6"},gap:"4",children:[(0,i.jsx)($i,{css:{flex:"1"},font:"gray800 textMd medium",children:t("liaison_n_1_48160",s+1)}),(0,i.jsx)(ga,{color:"white",leftIcon:"trash-can",size:"sm",onClick:()=>c(V(d,s))})]}),(0,i.jsxs)($,{css:{padding:"$4 $6 $6 $6"},direction:"column",gap:"4",children:[(0,i.jsx)(VI,{isSearchVisible:!0,label:t("CustomField"),values:[e.customFieldSlug],onChange:e=>{F(e)&&g(s,e[0])},children:u}),(0,i.jsx)(VI,{isSearchVisible:!0,label:t("accr_ditations_39450"),multiple:!0,values:e.accreditationsIds,onChange:e=>h(s,e),children:n.map(e=>{const t=a[e.id];return(0,i.jsx)("optgroup",{label:e.name,children:t.map(e=>(0,i.jsx)("option",{value:e.id,children:e.name},e.id))},e.id)})})]})]},s)),(0,i.jsx)(ga,{color:"invisible",leftIcon:"plus",onClick:()=>c([...d,{accreditationsIds:[],customFieldSlug:""}]),children:t("ajouter_une_lia_43639")})]})}),(0,i.jsx)(Sy,{children:(0,i.jsxs)($,{gap:"3",justify:"end",width:1,children:[(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")}),(0,i.jsx)(ga,{disabled:!p,onClick:()=>{r(d),e.onClose()},children:t("ventiler_10014")})]})})]})},nC=e=>{const{accreditationIdToOpen:t,accreditationIdToValues:n,setAccreditationIdToOpen:a}=XA(),s=n[e.accreditation.id]||[],o=F(s),r=t[e.accreditation.id]??!0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",cursor:o?"pointer":"default",height:"$cellHeightSm",paddingLeft:"$6",paddingRight:"$4",userSelect:"none"},gap:"2",onClick:()=>{o&&a(t=>({...t,[e.accreditation.id]:!(t[e.accreditation.id]??1)}))},children:[(0,i.jsx)($i,{css:{visibility:o?"visible":"hidden"},children:(0,i.jsx)(ra,{icon:r?"chevron-up":"chevron-right"})}),(0,i.jsx)(cf,{color:e.accreditation.color,icon:e.accreditation.icon,size:"sm"}),(0,i.jsx)($,{align:"center",css:{flex:"1",overflow:"hidden"},height:1,wrap:"wrap",children:(0,i.jsx)($i,{color:"gray800",title:e.accreditation.name,children:e.accreditation.name})})]}),r&&o&&s.map(({id:e,value:t})=>(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",height:"$cellHeightSm",paddingLeft:"88px",paddingRight:"$4",userSelect:"none"},gap:"2",children:t},e))]})},iC=e=>{const{categoryIdToAccreditations:t,categoryIdToOpen:n,setCategoryIdToOpen:a}=XA(),s=(0,l.useMemo)(()=>t[e.category.id],[t,e.category.id]),o=n[e.category.id]??!0;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{background:"$gray50",borderRight:"1px solid $gray200",borderTop:"1px solid $gray200",cursor:"pointer",height:"$cellHeightSm",px:"$4",userSelect:"none"},gap:"2",onClick:()=>a(t=>({...t,[e.category.id]:!(t[e.category.id]??1)})),children:[(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:o?"chevron-up":"chevron-right"})}),(0,i.jsx)($i,{css:{textTransform:"uppercase"},font:"gray800 textXs medium",children:e.category.name})]}),o?s.map(e=>(0,i.jsx)(nC,{accreditation:e},e.id)):null]})},aC=()=>{const{translate:e}=zg(),{categories:t,links:n,hideOptions:a}=XA(),[s,o]=(0,l.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{width:"calc(2 * $cellWidth)"},direction:"column",children:[(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},width:1,children:!a&&(0,i.jsx)(ga,{color:"white",size:"sm",onClick:()=>o(!0),children:`${e("ventiler_par_ch_78972")} (${n.length})`})}),t.map(e=>(0,i.jsx)(iC,{category:e},e.id))]}),s&&(0,i.jsx)(tC,{onClose:()=>o(!1)})]})},sC=e=>{const{translate:t}=zg(),n=bi(gl),a=(0,l.useMemo)(()=>(0,mo.A)((0,_r.A)(e.slots.flatMap(e=>e.date?.isValid?[e.date.startOf("day")]:[]),e=>e.toMillis()),e=>e.toMillis()),[e.slots]),s=(0,l.useMemo)(()=>e.slots.some(e=>!e.date?.isValid),[e.slots]),o=(0,l.useMemo)(()=>e.slots.some(e=>(e.scannedResources??0)>0),[e.slots]),r=(0,l.useMemo)(()=>e.showTotal&&(F(a)||e.categories.some(e=>"number"==typeof e.maxResources)||e.accreditations.some(e=>"number"==typeof e.maxResources)),[a,e.accreditations,e.categories,e.showTotal]),d=(0,l.useMemo)(()=>(0,mo.A)(e.categories,e=>m(e.name)),[e.categories]),[c,u]=(0,l.useState)({}),[g,h]=(0,l.useState)({}),p=(0,l.useMemo)(()=>(0,Zd.A)(Xp(e.accreditations),e=>e.accreditationCategoryId),[e.accreditations]),f=(0,l.useMemo)(()=>Object.fromEntries(e.accreditations.map(t=>{const n=e.links.find(e=>e.accreditationsIds.includes(t.id));if(n){const i=(0,mo.A)(e.customFields.find(e=>e.slug===n.customFieldSlug)?.values??[],e=>m(e.value));return[t.id,i]}return[t.id,[]]})),[e.accreditations,e.customFields,e.links]),I=(0,l.useMemo)(()=>(0,ef.A)((0,Zd.A)(e.slots,e=>{const t=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return`c${e.accreditationCategoryId}__${t}`}),e=>({assigned:(0,Wo.A)(e,e=>e.assignedResources),scanned:(0,Wo.A)(e,e=>e.scannedResources??0)})),[e.slots]),_=(0,l.useMemo)(()=>Object.fromEntries(e.slots.map(e=>{const t=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return[`a${e.accreditationId}__${t}`,{assigned:e.assignedResources,max:e.maxResources,scanned:e.scannedResources??0}]})),[e.slots]),x=(0,l.useMemo)(()=>Object.fromEntries(e.slots.flatMap(e=>Object.entries(e.resourcesByFields).flatMap(([t,n])=>{const i=e.date?.isValid?e.date.startOf("day").toSQLDate():"no_date";return n.map(({customFieldValueId:t,assignedResources:n,scannedResources:a})=>[`a${e.accreditationId}__${t}__${i}`,{assigned:n,scanned:a}])}))),[e.slots]);return(0,i.jsx)(QA.Provider,{value:{accreditationKeyToStats:_,accreditationValueKeyToStats:x,accreditationIdToOpen:g,accreditationIdToValues:f,categories:d,categoryIdToAccreditations:p,categoryIdToOpen:c,categoryKeyToStats:I,customFields:e.customFields,dates:a,hasNoDate:s,hasScanned:o,hideOptions:e.hideOptions,links:e.links,showTotal:r,setAccreditationIdToOpen:h,setCategoryIdToOpen:u,setLinks:e.setLinks},children:(0,i.jsxs)($,{css:{background:"white",border:"1px solid $gray200"},children:[(0,i.jsx)(aC,{}),(0,i.jsx)($,{css:{flex:"1",overflowX:"auto"},children:(0,i.jsxs)($,{direction:"column",children:[(0,i.jsxs)($,{css:{height:"$cellHeightSm"},children:[a.map(e=>(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)($i,{font:"gray800 textSm medium",children:n.toLocaleString(e,Ya.DateOnly.MonthShort)})},e.toISO())),s&&(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)($i,{font:"gray800 textSm medium",textAlign:"center",children:t("tout_l_v_nemen_70929")})}),r&&(0,i.jsx)($,{align:"center",css:{borderRight:"1px solid $gray200",height:"$cellHeightSm",px:"$4"},justify:"center",width:120,children:(0,i.jsx)($i,{font:"gray800 textSm medium",children:t("total_07173")})})]}),d.map(e=>(0,i.jsx)(eC,{category:e},e.id))]})})]})})},oC=e=>{const t=vh(),n=(0,l.useMemo)(()=>e.min.startOf("week").equals(e.value.startOf("week")),[e.min,e.value]),a=(0,l.useMemo)(()=>e.max.endOf("week").equals(e.value.endOf("week")),[e.max,e.value]);return(0,i.jsxs)($,{gap:"2",children:[(0,i.jsx)(ga,{color:"white",disabled:n,leftIcon:"chevron-left",onClick:()=>{e.onChange(e.value.minus(t?{week:1}:{day:1}))}}),(0,i.jsx)($i,{width:160,children:(0,i.jsx)(Gf,{...e})}),(0,i.jsx)(ga,{color:"white",disabled:a,leftIcon:"chevron-right",onClick:()=>{e.onChange(e.value.plus(t?{week:1}:{day:1}))}})]})},rC=(0,l.createContext)({}),lC=e=>{const{days:t,interval:n}=(0,l.useContext)(rC),a=t[0],s=t[6]??t[0],o=(0,l.useMemo)(()=>(e.startAt??wa.c9.max(a,n.start)).startOf("day"),[e.startAt,a,n]),r=(0,l.useMemo)(()=>(e.endAt??wa.c9.min(s,n.end)).endOf("day"),[e.endAt,s,n]),d=(0,l.useMemo)(()=>"number"==typeof e.startHour&&e.startHour>0&&e.startAt?.isValid&&e.startAt.hour{const e=Math.max(o.diff(a,"days").days+1,1);return d?e-1:e},[d,o,a]),u=(0,l.useMemo)(()=>{const e=Math.min(Math.ceil(r.diff(a,"days").days)+1,8);return d?e-1:e},[d,r,a]);return o>s||r{const t=(0,l.useMemo)(()=>{if("week"===e.display){const t=e.date.startOf("week");return(0,Fd.A)(0,7).map(e=>t.plus({day:e}))}return[e.date]},[e.date]),n=(0,l.useMemo)(()=>wa.IX.fromDateTimes(e.minDate.startOf("day"),e.maxDate.endOf("day")),[e.minDate,e.maxDate]),[a,s]=(0,l.useState)(300),o=(0,l.useCallback)(e=>{if(e){const t=Math.max(Math.ceil(e.getBoundingClientRect().height),300);s(t)}},[e.date,s]),r=e.showBorder?{bd:!0,overflow:"hidden"}:{};return(0,i.jsx)(rC.Provider,{value:{days:t,interval:n},children:(0,i.jsxs)($,{css:{...r,...e.css},direction:"column",children:[(0,i.jsx)($,{css:{borderBottom:"1px solid $gray200"},height:60,width:1,children:t.map(e=>(0,i.jsxs)($,{align:"center",css:{background:"$gray50"},direction:"column",height:1,justify:"center",width:1,children:[(0,i.jsx)($i,{css:{textTransform:"capitalize"},font:"gray500 textXs medium",children:e.toLocaleString({weekday:"long"})}),(0,i.jsx)($i,{font:"gray800 textXl semiBold",children:e.day})]},e.toISO()))}),(0,i.jsxs)($,{className:"h-calendar-events-container",css:{position:"relative"},direction:"column",height:a,width:1,children:[(0,i.jsx)(Th,{css:{flex:"1","& > div:last-child":{borderRight:"none"}},gridtemplatecolumns:"week"===e.display?"repeat(7, minmax(0, 1fr))":"1",gridtemplaterows:"1fr",width:1,children:t.map((e,t)=>(0,i.jsx)($,{css:{background:n.contains(e)?"white":"$primary50",borderRight:"1px solid $gray200",gridColumn:`${t+1} / ${t+2}`,gridRow:"1 / 2"}},e.toISO()))}),(0,i.jsx)(Th,{ref:o,css:{gridAutoFlow:"column",rowGap:"$2",position:"absolute",top:"0",py:"$2"},gridtemplatecolumns:"week"===e.display?"repeat(7, minmax(0, 1fr))":"1",width:1,children:e.children})]})]})})},cC=e=>(0,i.jsxs)($,{align:"center",gap:"2",width:1,children:[(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:e.icon})}),(0,i.jsx)($i,{css:{flex:"1"},fontSize:"textXs",children:e.text}),(0,i.jsx)($,{align:"center",css:{background:e.background,borderRadius:"$1",fontSize:"$textXs",fontWeight:"$medium",padding:"2px 8px",minWidth:"30px"},justify:"center",children:e.count})]}),uC=n.p+"img/unavailableCell-148d1ec075614a0e294d.png",mC=j($i,{alignItems:"center",color:"$gray900",display:"flex",height:"40px",justifyContent:"center",variants:{border:{gray100:{borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100"},gray200:{borderBottom:"1px solid $gray200",borderRight:"1px solid $gray200"}}},defaultVariants:{border:"gray100"}}),gC=(j($i,{alignItems:"center",borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray700",display:"flex",gap:"$2",height:"48px",px:"$4",width:"200px"}),j($i,{alignItems:"center",borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray800",display:"flex",height:"48px",padding:"$2",width:"100px","& > div":{alignItems:"center",background:"$success400",borderRadius:"$1",display:"flex",height:"100%",justifyContent:"center",width:"100%","& svg":{height:"50%"}}}),j($i,{background:`url(${uC}) no-repeat`,borderBottom:"1px solid $gray100",borderRight:"1px solid $gray100",color:"$gray700",height:"48px",width:"100px"}),e=>{const{translate:t}=zg();return(0,i.jsx)(px,{children:(0,i.jsxs)(cx,{children:[(0,i.jsx)($i,{css:{flex:"1"},children:(0,i.jsx)(vj,{userInfo:e.userInfo})}),(0,i.jsx)($,{align:"center",gap:"3",children:e.isAssigned?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{color:"success500",children:(0,i.jsx)(ra,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:e.assignedText})]}),(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"ellipsis-vertical",size:"sm"})}),(0,i.jsx)(Fp,{placement:"bottom-end",children:(0,i.jsx)(zp,{color:"red",icon:"trash-can",onClick:e.onDelete,children:e.deleteText})})]})]}):(0,i.jsx)(ga,{size:"sm",onClick:e.onAdd,children:t("ajouter_97327")})})]})})}),hC=e=>{const{translate:t}=zg();return(0,i.jsx)($,{css:{background:"white",bd:!0,padding:"$4 $6"},direction:"column",gap:"2",children:e.isLoading?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1})]}):(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:"badge-check"})}),(0,i.jsx)($i,{css:{flex:"1"},children:t("attribu_es_48167")}),(0,i.jsx)($i,{children:e.stats.assignedResources})]}),(0,i.jsxs)($,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:"hand-holding-heart"})}),(0,i.jsx)($i,{css:{flex:"1"},children:t("souhait_es_78101")}),(0,i.jsx)($i,{children:e.stats.wishedResources})]}),void 0!==e.stats.scannedResources&&(0,i.jsxs)($,{align:"center",css:{color:"$gray700"},gap:"1",width:1,children:[(0,i.jsx)($i,{children:(0,i.jsx)(ra,{icon:"scanner-gun"})}),(0,i.jsx)($i,{css:{flex:"1"},children:t("scann_es_13169")}),(0,i.jsx)($i,{children:e.stats.scannedResources})]})]})})},pC=e=>{const{translate:t}=zg(),[n,a]=(0,l.useState)(!1),[s,o]=(0,l.useState)(e.stats),[r,d]=(0,l.useState)((0,mo.A)(e.members,e=>m(e.userInfo.name))),[c,u]=(0,l.useState)({}),g=(0,l.useCallback)(async t=>{a(!0),u(e=>({...e,[t]:!0}));const{member:n,stats:i}=await e.reloadMember(t);d(e=>e.flatMap(e=>e.userInfo.id===t?n?[n]:[]:[e])),o(i),u(e=>({...e,[t]:!1})),a(!1)},[e.reloadMember,a,o,u,d]),h=(0,l.useCallback)(async t=>{u(e=>({...e,[t]:!0})),await e.add(t),await g(t)},[e.add,g,u]),p=(0,l.useCallback)(async t=>{u(e=>({...e,[t]:!0})),await e.delete(t),await g(t)},[e.delete,g,u]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Fv,{children:e.name}),(0,i.jsxs)(yy,{css:{background:"$gray50",gap:"$6",padding:"$6"},children:[(0,i.jsx)(hC,{isLoading:n,stats:s}),(0,i.jsxs)(fx,{children:[(0,i.jsx)(mx,{children:(0,i.jsx)(mC,{children:t("nom_du_membre_69353")})}),r.map(t=>c[t.userInfo.id]?(0,i.jsx)(gj,{bx:!0},t.id):(0,i.jsx)(gC,{assignedText:e.assignedText,deleteText:e.deleteText,isAssigned:e.isAssigned(t),userInfo:t.userInfo,onAdd:()=>h(t.userInfo.id),onDelete:()=>p(t.userInfo.id)},t.id))]})]})]})},fC=e=>{const{params:{eventId:t,delegationId:n},translate:a}=zg(),{mutate:s}=Ss(),o=(0,l.useMemo)(()=>`${e.accreditation.name}${h(e.accreditationSlot.name)?` - ${e.accreditationSlot.name}`:""}`,[e.accreditation,e.accreditationSlot]),r=(0,l.useCallback)(t=>t.accreditationsUsersInfos.some(t=>t.accreditationSlotId===e.accreditationSlotId),[e.accreditationSlotId]),d=(0,l.useCallback)(async i=>{const{event:a}=await(s={eventId:t,delegationId:n,accreditationSlotId:e.accreditationSlotId,userInfoId:i},o=await us(),_s("query CalendarAccreditationSlotMember(\n $eventId: EventId!\n $delegationId: DelegationId\n $accreditationSlotId: AccreditationsSlotId!\n $userInfoId: UsersInfoId!\n) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...AccreditationSlotStats\n }\n\n delegationMaybe(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n\n member: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n}\n",{variables:s,token:o||void 0,fragments:[ka.AccreditationSlotStatsFragment,ka.DelegationAccreditationSlotStatsFragment,ka.VolunteerRegistrationDelegationAccreditationSlotFragment]}));var s,o;const l=a.member.accreditationsSlots.some(t=>t.id===e.accreditationSlotId);return{member:r(a.member)||l?a.member:null,stats:a.delegationMaybe?.accreditationSlot??a.accreditationSlot}},[e.accreditationSlotId,n,t,r]),c=(0,l.useCallback)((n,i)=>s({eventId:t,massAccredit:{accreditationsSlotsIds:[e.accreditationSlotId],selecteds:{ids:[n]},strategy:i}}),[t,s,e.accreditationSlotId]),u=(0,l.useCallback)(e=>c(e,Je.Add),[c]),m=(0,l.useCallback)(e=>c(e,Je.Delete),[c]);return(0,i.jsx)(pC,{add:u,assignedText:a("d_j_attribu_e_06450"),delete:m,deleteText:a("retirer_l_accr_62187"),isAssigned:r,members:e.volunteersRegistrations,name:o,reloadMember:d,stats:e.stats})},IC=e=>{const{data:t,loader:n}=Ei("query AccreditationSlotMembers($eventId: EventId!, $accreditationSlotId: AccreditationsSlotId!) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...AccreditationSlotStats\n date\n name\n\n accreditation {\n name\n }\n\n volunteersRegistrations {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n }\n}\n",{eventId:e.eventId,accreditationSlotId:e.accreditationSlotId},[ka.AccreditationSlotStatsFragment,ka.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,i.jsx)(xy,{size:"md",onClose:e.onClose,children:n||(0,i.jsx)(fC,{accreditation:t.event.accreditationSlot.accreditation,accreditationSlot:t.event.accreditationSlot,accreditationSlotId:e.accreditationSlotId,stats:t.event.accreditationSlot,volunteersRegistrations:t.event.accreditationSlot.volunteersRegistrations})})},_C=e=>{const{data:t,loader:n}=Ei("query DelegationAccreditationSlotMembers(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n\n accreditationSlot {\n date\n name\n }\n\n accreditation {\n name\n }\n\n volunteersRegistrations {\n ...VolunteerRegistrationDelegationAccreditationSlot\n }\n }\n }\n }\n}\n",{eventId:e.eventId,delegationId:e.delegationId,accreditationSlotId:e.accreditationSlotId},[ka.DelegationAccreditationSlotStatsFragment,ka.VolunteerRegistrationDelegationAccreditationSlotFragment]);return(0,i.jsx)(xy,{size:"md",onClose:e.onClose,children:n||(0,i.jsx)(fC,{accreditation:t.event.delegation.accreditationSlot.accreditation,accreditationSlot:t.event.delegation.accreditationSlot.accreditationSlot,accreditationSlotId:e.accreditationSlotId,stats:t.event.delegation.accreditationSlot,volunteersRegistrations:t.event.delegation.accreditationSlot.volunteersRegistrations})})},xC=e=>{const{translate:t,params:{eventId:n,delegationId:a}}=zg(),[s,o]=(0,l.useState)(e.stats),r=(0,l.useMemo)(()=>sf(e.accreditation.color),[e.accreditation]),d=(0,l.useMemo)(()=>({background:r[50],border:`1px solid ${r[500]}`,color:r[700]}),[r]),c=(0,l.useMemo)(()=>`${e.accreditation.name}${h(e.accreditationSlot.name)?` - ${e.accreditationSlot.name}`:""}`,[e.accreditation,e.accreditationSlot]),u=(0,l.useCallback)(async()=>{if(a){const{event:{delegation:s}}=await(t={eventId:n,delegationId:a,accreditationSlotId:e.accreditationSlot.id},i=await us(),_s("query DelegationAccreditationSlotStats(\n $eventId: EventId!\n $delegationId: DelegationId!\n $accreditationSlotId: AccreditationsSlotId!\n) {\n event(id: $eventId) {\n delegation(id: $delegationId) {\n accreditationSlot(id: $accreditationSlotId) {\n ...DelegationAccreditationSlotStats\n }\n }\n }\n}\n",{variables:t,token:i||void 0,fragments:[ka.DelegationAccreditationSlotStatsFragment]}));o(s.accreditationSlot)}else{const{event:{accreditationSlot:t}}=await function(e,t){return _s("query AccreditationSlotStats($eventId: EventId!, $accreditationSlotId: AccreditationsSlotId!) {\n event(id: $eventId) {\n accreditationSlot(id: $accreditationSlotId) {\n assignedResources\n maxResources\n scannedResources\n wishedResources\n }\n }\n}\n",{variables:e,token:t||void 0,fragments:[]})}({eventId:n,accreditationSlotId:e.accreditationSlot.id},await us());o(t)}var t,i},[e.accreditationSlot,o]),[m,g]=(0,l.useState)(!1),p=s.maxResources?`/${s.maxResources}`:"",f=`${s.assignedResources}${p}`;return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"start",css:{...d,borderRadius:"$1",cursor:e.canMemberAccredit?"pointer":"default",minHeight:"32px",padding:"$2"},direction:"column",gap:"2",width:1,onClick:()=>{e.canMemberAccredit&&g(!0)},children:[(0,i.jsx)($i,{css:{flex:"1"},fontSize:"textXs",fontWeight:"medium",children:c}),(0,i.jsx)(cC,{background:r[100],count:f,icon:"badge-check",text:t("attribu_es_48167")}),e.showWished&&"number"==typeof s.wishedResources&&(0,i.jsx)(cC,{background:r[100],count:s.wishedResources,icon:"hand-holding-heart",text:t("souhait_es_78101")}),"number"==typeof s.scannedResources&&(0,i.jsx)(cC,{background:r[100],count:s.scannedResources,icon:"scanner-gun",text:t("scann_es_13169")})]}),e.canMemberAccredit&&m?a?(0,i.jsx)(_C,{accreditationSlotId:e.accreditationSlot.id,delegationId:a,eventId:n,onClose:()=>(g(!1),u())}):(0,i.jsx)(IC,{accreditationSlotId:e.accreditationSlot.id,eventId:n,onClose:()=>(g(!1),u())}):null]})},yC=e=>{const t=vh(),n=(0,l.useMemo)(()=>(0,mo.A)(e.accreditationsSlots.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,Qp(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),a=(0,l.useMemo)(()=>(0,mo.A)(e.accreditationsSlots.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name,Qp(e.accreditation.index),e.accreditation.name.toLowerCase()]),[e.accreditationsSlots]),s=(0,l.useMemo)(()=>Object.fromEntries(e.accreditations.map(e=>[e.accreditationId,e.willAutoAccredit||e.accreditation.willAutoAccredit])),[e.accreditations]);return(0,i.jsxs)(dC,{css:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[n.map(t=>(0,i.jsx)(lC,{children:(0,i.jsx)(xC,{accreditation:t.accreditation,accreditationSlot:t.accreditationSlot,canMemberAccredit:e.canMemberAccredit,showWished:!s[t.accreditationId],stats:t})},t.accreditationSlot.id)),a.map(t=>(0,i.jsx)(lC,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,i.jsx)(xC,{accreditation:t.accreditation,accreditationSlot:t.accreditationSlot,canMemberAccredit:e.canMemberAccredit,showWished:!s[t.accreditationId],stats:t})},t.accreditationSlot.id))]})},SC=e=>{const{translate:t,params:{organizationId:n}}=zg(),[a,s]=(0,l.useState)(""),[o,r]=cj(e.delegationsSpaceLayoutTab,e=>e.rendering,n,"eventDelegationAccreditations.rendering",Pr.WeeklyCalendar,[Pr.Table,Pr.WeeklyCalendar]),[d,c]=(0,l.useState)(e.event.delegation.minAccreditationSlotDate),u=(0,l.useMemo)(()=>d?.isValid?d:e.event.startAt,[e.event,d]),[g,p]=(0,l.useState)(null),f=(0,l.useMemo)(()=>{const t=m(a||""),n=e.delegationsSpaceLayoutTab?.infos.accreditationsSlotsIds;return e.event.delegation.allAccreditationsSlots.filter(e=>{const i=!h(t)||m(e.accreditation.name).includes(t)||m(e.accreditationSlot.name).includes(t)||o===Pr.Table&&m(e.accreditationCategory.name).includes(t),a=!g?.isValid||!!e.accreditationSlot.date?.isValid&&g.toSQLDate()===e.accreditationSlot.date.toSQLDate(),s=!F(n)||n.includes(e.accreditationSlotId);return i&&a&&s})},[e.delegationsSpaceLayoutTab,e.event,a,o,g]),I=(0,l.useMemo)(()=>f.map(e=>({accreditationCategoryId:e.accreditationCategory.id,accreditationId:e.accreditationSlot.accreditationId,date:e.accreditationSlot.date,assignedResources:e.assignedResources,maxResources:e.maxResources,resourcesByFields:e.resourcesByFields,scannedResources:e.scannedResources})),[f]),_=(0,l.useMemo)(()=>{const t=f.map(e=>e.accreditationId);return e.event.delegation.allAccreditations.filter(e=>t.includes(e.accreditationId))},[e.event,f]),x=(0,l.useMemo)(()=>_.map(e=>({id:e.accreditation.id,accreditationCategoryId:e.accreditation.accreditationCategoryId,index:e.accreditation.index,name:e.accreditation.name,color:e.accreditation.color,icon:e.accreditation.icon,hasDateSlots:e.accreditation.hasDateSlots,maxResources:e.maxResources})),[_]),y=(0,l.useMemo)(()=>{const t=f.map(e=>e.accreditationCategoryId);return e.event.delegation.allAccreditationsCategories.filter(e=>t.includes(e.accreditationCategoryId)).map(e=>({id:e.accreditationCategory.id,name:e.accreditationCategory.name,maxResources:e.maxResources}))},[f,e.event]),S=(0,l.useMemo)(()=>!e.delegationsSpaceLayoutTab,[e.delegationsSpaceLayoutTab]),j=(0,l.useMemo)(()=>h(e.delegationsSpaceLayoutTab?.infos.customFieldSlug)&&F(x)?[{accreditationsIds:x.map(e=>e.id),customFieldSlug:e.delegationsSpaceLayoutTab.infos.customFieldSlug}]:[],[e.delegationsSpaceLayoutTab,x]);return(0,i.jsxs)($,{css:{background:"white",bd:!0,overflow:"hidden"},direction:"column",children:[(0,i.jsxs)($,{css:{background:"white",padding:"$5 $5"},gap:"3",children:[(0,i.jsx)($i,{width:320,children:(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:t("rechercher_une_65646"),value:a,onChange:s})}),(0,i.jsx)($i,{css:{flex:"1"}}),o===Pr.WeeklyCalendar&&(0,i.jsx)(oC,{max:e.event.endAt,min:e.event.startAt,value:u,onChange:c}),o===Pr.Table&&(0,i.jsx)($i,{width:160,children:(0,i.jsx)(Gf,{max:e.event.endAt,min:e.event.startAt,value:g,onChange:p})}),S&&(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"white",leftIcon:Br(o),children:Vr(t,o)})}),(0,i.jsxs)(Fp,{placement:"bottom-end",children:[(0,i.jsx)(zp,{icon:Br(Pr.WeeklyCalendar),onClick:()=>r(Pr.WeeklyCalendar),children:Vr(t,Pr.WeeklyCalendar)}),(0,i.jsx)(zp,{icon:Br(Pr.Table),onClick:()=>r(Pr.Table),children:Vr(t,Pr.Table)})]})]})]}),o===Pr.Table?(0,i.jsx)(sC,{accreditations:x,categories:y,customFields:e.organization.customFields.nodes,hideOptions:!0,links:j,setLinks:yh.A,showTotal:!0,slots:I}):(0,i.jsx)(yC,{accreditations:_,accreditationsSlots:f,canMemberAccredit:e.canMemberAccredit,event:e.event,selectedDay:u})]})},jC=()=>{const e=Ai();return(0,i.jsx)($,{align:"center",css:{background:"white",border:"1px solid $gray200",borderRadius:"$1",boxShadow:"$xs"},height:1,justify:"center",width:1,children:(0,i.jsx)($i,{height:250,width:1,children:(0,i.jsx)(Tf,{title:e("aucune_accr_dit_27643")})})})},vC=e=>{const{params:{organizationId:t,eventId:n,delegationId:a}}=zg(),{data:s,loader:o}=Ei("query DelegationAccreditations(\n $organizationId : OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId!\n $onlyVisible: Boolean!\n) {\n organization(id: $organizationId){\n customFields(eventId: $eventId, fieldTypes: [Select], variety: UserInfo, privacy: Public){\n nodes {\n ...ConditionCustomField\n }\n }\n }\n\n event(id: $eventId) {\n startAt\n endAt\n\n delegation(id: $delegationId) {\n minAccreditationSlotDate\n\n allAccreditationsCategories {\n accreditationCategoryId\n maxResources\n\n accreditationCategory {\n id\n name\n }\n }\n\n allAccreditations {\n accreditationId\n accreditationCategoryId\n willAutoAccredit\n maxResources\n\n accreditation {\n id\n accreditationCategoryId\n name\n color\n icon\n hasSlots\n index\n willAutoAccredit\n hasDateSlots\n }\n }\n\n allAccreditationsSlots(onlyVisible: $onlyVisible) {\n ...DelegationAccreditationSlotStats\n\n accreditationSlot {\n id\n accreditationId\n date\n name\n }\n\n accreditation {\n name\n color\n index\n }\n\n accreditationCategory {\n id\n name\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,delegationId:a,onlyVisible:e.onlyVisible},[ka.ConditionCustomFieldFragment,ka.DelegationAccreditationSlotStatsFragment]);return o||(U(s.event?.delegation.allAccreditationsSlots)?(0,i.jsx)(jC,{}):(0,i.jsx)(SC,{canMemberAccredit:e.canMemberAccredit,delegationsSpaceLayoutTab:e.delegationsSpaceLayoutTab,event:s.event,organization:s.organization}))},bC=e=>{const{params:{organizationId:t,eventId:n,delegationId:a},translate:s}=zg(),{mutate:o,isLoading:r}=function(e={}){return Ti("mutation EventDocumentsExport(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $delegationId: DelegationId\n $documentsExport: DocumentsExportInput!\n) {\n jobId: eventDocumentsExport(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n documentsExport: $documentsExport\n )\n}\n",e)}(),d=(0,l.useMemo)(()=>e.customDocuments.filter(t=>t.slug===e.slug),[e.customDocuments,e.slug]),c=(0,l.useMemo)(()=>F(d)?d.map(e=>e.name).join(", "):wn.includes(e.slug)?Db(e.slug):null,[d,e.slug]),u=F(d);return c?(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",padding:"$4 $6","&:last-child":{borderBottom:"none"}},gap:"3",children:[(0,i.jsx)($,{align:"center",css:{background:"$blueGray100",borderRadius:"12px",color:"$blueGray700"},height:40,justify:"center",width:40,children:(0,i.jsx)(ra,{icon:"file-lines"})}),(0,i.jsx)($i,{css:{flex:"1"},font:"gray900 textSm medium",children:c}),(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)($i,{children:(0,i.jsx)(ga,{color:"white",isLoading:r,leftIcon:"download",onClick:()=>o({organizationId:t,eventId:n,delegationId:a,documentsExport:{badgeType:u?null:e.slug,customDocumentSlug:u?e.slug:null,documentType:u?Ae.UserCustomDocument:Ae.CustomBadge,language:Ot.Fr,oneFile:!1,segmentsIds:[],strategy:ve.OnePerPage}})})})}),(0,i.jsx)(O_,{placement:"top",children:s("recevoir_les_do_31669")})]})]}):null},AC=e=>{const{translate:t}=zg();return(0,i.jsxs)($,{direction:"column",gap:"2",children:[(0,i.jsx)($i,{font:"gray900 textMd medium",children:t("documents_dispo_46996")}),(0,i.jsx)($,{css:{background:"white",border:"1px solid $gray200",borderRadius:"$2",flex:"1",overflow:"hidden"},direction:"column",children:e.delegationsSpaceCustomBadges.map(t=>(0,i.jsx)(bC,{customDocuments:e.customDocuments,slug:t},t))})]})},CC=e=>{const{designSystem:t}=Zs(),n=t===Ys?({children:e})=>(0,i.jsx)($,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e}):({children:e})=>(0,i.jsx)($i,{className:"h-detail-box-content",css:{flex:"1",padding:"$6"},width:1,children:e});return(0,i.jsx)($,{css:{background:"white",bd:!0,...e.css},direction:"column",width:1,children:(0,i.jsxs)($,{direction:"column",height:1,width:1,children:[(0,i.jsxs)($,{css:{borderBottom:e.hideTitleBorder?void 0:"1px solid $gray200",paddingBottom:e.hideTitleBorder?"0":"$5",paddingTop:"$5",px:"$6"},gap:"3",width:1,children:[(0,i.jsx)(Xg,{css:{flex:"1",alignContent:"center"},children:e.title}),e.rightIcon&&(0,i.jsx)($i,{color:"gray900",css:{cursor:"pointer"},fontSize:"textMd",fontWeight:"semiBold",textAlign:"center",width:20,onClick:t=>{e.rightIconClick?.(t)},children:(0,i.jsx)(ra,{icon:e.rightIcon})}),e.select]}),(0,i.jsx)(n,{children:e.children})]})})},EC=({css:e,title:t,children:n})=>(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)($i,{color:"gray900",fontSize:"textLg",fontWeight:"semiBold",children:t}),(0,i.jsx)($,{css:{bd:!0,padding:"$4",...e},direction:"column",children:n})]}),TC=({children:e,...t})=>bp()?(0,i.jsx)(EC,{...t,children:e}):(0,i.jsx)(CC,{...t,children:e}),MC=e=>(0,i.jsx)($,{direction:"column",gap:"4",width:1,children:e.customFields.map((t,n)=>(0,i.jsxs)(l.Fragment,{children:[0!==n&&(0,i.jsx)(MI,{direction:"horizontal"}),(0,i.jsx)(eb,{field:t,fields:e.delegation.fields})]},t.id))}),RC=({percent:e,prospectivePercent:t})=>(0,i.jsxs)($i,{css:{background:"$gray100",borderRadius:"$1",position:"relative"},height:8,width:1,children:[(0,i.jsx)($i,{css:{background:lf(e),borderRadius:"$1",left:0,maxWidth:"100%",position:"absolute",top:0,width:100*e+"%"},height:1}),void 0!==t&&(0,i.jsx)($i,{css:{background:lf(t),borderRadius:"$1",left:0,opacity:.4,maxWidth:"100%",position:"absolute",top:0,width:100*t+"%"},height:1})]}),DC=e=>(0,i.jsx)($,{align:"center",css:{bd:!0,fontSize:"$textMd"},height:48,justify:"center",width:48,children:(0,i.jsx)(ra,{icon:e.icon})}),OC=({delegation:e})=>{const{translate:t,params:{organizationId:n}}=zg(),a=bi(gl),s=bi(qd),{dashboardLeaders:o}=xr(n);return(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[e.deadlineDate&&(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(DC,{icon:"calendar"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray800 textSm medium",children:t("date_butoir_dinscription")}),(0,i.jsx)($i,{color:"gray500",children:a.toLocaleString(e.deadlineDate,Ya.DateOnly.MonthLong)})]})]}),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(DC,{icon:"gem"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray800 textSm medium",children:t(o)}),(0,i.jsx)($,{gap:"3",wrap:"wrap",children:e.leaders.map(e=>(0,i.jsxs)($,{align:"center",css:{bd:"gray300 1 xs",px:"$1"},gap:"1",height:22,children:[(0,i.jsx)(Vp,{email:e.email,image:e.picture?.url,name:e.name,size:16}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:e.nameOrEmail})]},e.id))})]})]}),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(DC,{icon:"users"}),(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray800 textSm medium",children:t("quota_00069")}),(0,i.jsxs)($,{align:"center",css:{flex:"1"},gap:"3",children:[(0,i.jsx)($i,{width:100,children:(0,i.jsx)(RC,{percent:e.maxResources?e.numberOfResources/e.maxResources:1})}),(0,i.jsxs)($i,{color:"gray500",children:[e.numberOfResources,"/",s.toNumberOrInfinity(e.maxResources)]})]})]})]})]})},wC=()=>{const{translate:e,params:{organizationId:t}}=zg(),{dashboardLeaders:n}=xr(t);return(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(DC,{icon:"gem"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray800 textSm medium",children:e(n)}),(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1})]})]}),(0,i.jsxs)($,{align:"center",gap:"4",children:[(0,i.jsx)(DC,{icon:"users"}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray800 textSm medium",children:e("quota_00069")}),(0,i.jsx)(Dh,{borderRadius:"$1",height:20,width:1})]})]})]})},PC=e=>{const{params:{organizationId:t,eventId:n,delegationId:a},translate:s}=zg(),o=(0,l.useMemo)(()=>Yc({organizationId:e.delegation.organizationId,eventId:e.delegation.eventId,delegationId:e.delegation.id,formId:e.delegation.form.id}),[e.delegation]);return(0,i.jsx)(TC,{css:{height:"fit-content"},hideTitleBorder:!0,title:s("Form"),children:(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[(0,i.jsx)($i,{color:"gray800",children:s("envoyez_le_lien_23853")}),(0,i.jsxs)($,{gap:"3",width:1,children:[(0,i.jsx)($,{css:{flex:"1"},children:(0,i.jsx)(ga,{css:{width:"100%"},textAlign:"center",to:Wc.MEMBERS_INVITE({organizationId:t,eventId:n,delegationId:a}),children:s("envoyer_par_e_m_11240")})}),(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"arrow-up-right-from-square",target:"_blank",to:o})}),(0,i.jsx)(O_,{placement:"top",children:s("ouvrir_40131")})]}),(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"copy",onClick:()=>ix(o)})}),(0,i.jsx)(O_,{placement:"top",children:s("copier_75889")})]})]})]})})},$C=e=>{const{translate:t}=zg();return(0,i.jsx)(TC,{css:{"& .h-detail-box-content":{padding:"0","& :last-child":{borderBottom:"none"}}},title:(0,i.jsx)($,{gap:"2",children:(0,i.jsx)($i,{children:t("invitations_32350")})}),children:e.delegation.usersInfosInvitations.nodes.map(({userInfo:e})=>(0,i.jsx)($,{css:{borderBottom:"1px solid $gray200",padding:"$3 $6"},children:(0,i.jsx)(vj,{isClickDisabled:!0,userInfo:e})},e.id))})},kC=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),o=bi(Su),{data:r,isLoading:d}=Ei('query DelegationSpaceDashboard($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization(id: $organizationId) {\n allowDelegationSpaceDownload\n\n delegation(id: $delegationId) {\n id\n name\n description\n organizationId\n eventId\n formId\n deadlineDate\n numberOfResources\n maxResources\n columns\n state\n showFormLinkInDelegationSpace\n fields\n canLeadersEditCustomFields\n usedCustomFieldsFilled\n\n category: delegationCategory {\n id\n name\n }\n\n form {\n id\n name\n }\n\n leaders {\n id\n email\n name\n nameOrEmail\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n phone: fieldValue(slug: "phone")\n\n picture {\n url\n }\n }\n\n usedCustomFields {\n ...CustomFieldWithCondition\n }\n\n usersInfosInvitations(limit: 5, offset: 0) {\n nodes {\n userInfo {\n id\n email\n name\n\n picture {\n url\n }\n }\n }\n\n pageInfo {\n hasNextPage\n }\n }\n }\n }\n}\n',{organizationId:n,delegationId:s},[ka.CustomFieldWithConditionFragment]),c=(0,l.useMemo)(()=>r.organization?.delegation.canLeadersEditCustomFields??!1,[r.organization]),u=(0,l.useMemo)(()=>r.organization?.delegation.usedCustomFields??[],[r.organization]),m=(0,l.useCallback)(()=>e.push(Wc.FIELDS_EDIT({organizationId:n,eventId:a,delegationId:s})),[n,a,s]),g=(0,l.useMemo)(()=>!(r.organization?.delegation.usedCustomFieldsFilled??1),[r.organization]),p=(0,l.useMemo)(()=>{if(h(r.organization?.delegation.description)){const e=r.organization.delegation;return o.renderText(e.description,{delegation:e})}return""},[r.organization]);return(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[g&&c&&(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t("informations_im_33187")}),(0,i.jsx)(th,{children:(0,i.jsxs)($,{direction:"column",gap:"2",children:[t("des_information_10949"),(0,i.jsx)($,{width:1,children:(0,i.jsx)(ga,{color:"invisible",css:{color:"inherit",px:"0","&:hover":{color:"inherit"}},rightIcon:"arrow-right",onClick:m,children:t("_diter_les_info_35201")})})]})})]}),(0,i.jsxs)($,{gap:"4",width:1,children:[(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"4",children:[h(p)&&(0,i.jsx)($,{children:(0,i.jsx)(TC,{hideTitleBorder:!0,title:t("description_58935"),children:(0,i.jsx)(vp,{text:p})})}),(0,i.jsx)(TC,{hideTitleBorder:!0,title:t("informations_g_79325"),children:d?(0,i.jsx)(wC,{}):(0,i.jsx)(OC,{delegation:r.organization.delegation})}),F(u)&&(0,i.jsx)($,{children:(0,i.jsx)(TC,{hideTitleBorder:!0,rightIcon:c?"pen":void 0,rightIconClick:m,title:t("informations_co_28407"),children:d?(0,i.jsx)(wC,{}):(0,i.jsx)(MC,{customFields:u,delegation:r.organization.delegation})})})]}),!0===r.organization?.delegation.showFormLinkInDelegationSpace&&(0,i.jsxs)($,{direction:"column",gap:"4",width:450,children:[(0,i.jsx)(PC,{delegation:r.organization.delegation}),F(r.organization.delegation.usersInfosInvitations.nodes)&&(0,i.jsx)($C,{delegation:r.organization.delegation})]})]})]})},NC=e=>{switch(e){case zC.Event:return{color:"success",leftIcon:"calendar"};case zC.ParentDelegation:return{color:"pink",leftIcon:"people-group"};default:return tr()}};var zC;!function(e){e.Event="event",e.ParentDelegation="parent-delegation"}(zC||(zC={}));const LC=({state:e,userInfo:t,onClick:n})=>{const a=Ai(),s=h(t.name);return(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},onClick:n,children:[(0,i.jsx)(Uf,{shouldPreventDefault:!1,state:e,onClick:yh.A}),(0,i.jsx)(Hg,{width:"3"}),(0,i.jsx)(Vp,{email:t.email,image:t.picture?.url,name:t.name,size:40}),(0,i.jsx)(Hg,{width:"4"}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)($i,{ellipsis:!0,color:"gray700",children:s?t.name:t.email}),s&&(0,i.jsx)($i,{ellipsis:!0,color:"gray500",children:t.email})]}),t.source&&(0,i.jsx)($i,{children:(0,i.jsx)(jf,{...NC(t.source),leftIconStyle:"solid",children:t.source===zC.Event?a("_v_nement_22345"):a("d_l_gation_pare_68507")})})]})},FC=()=>(0,i.jsxs)($,{align:"center",css:{borderBottom:"1px solid $gray200",cursor:"pointer",py:"$3",userSelect:"none",width:"100%","&:last-child":{border:"none"}},children:[(0,i.jsx)(Uf,{shouldPreventDefault:!1,state:"unchecked",onClick:yh.A}),(0,i.jsx)(Hg,{width:"3"}),(0,i.jsx)(Dh,{size:40,variant:"circular"}),(0,i.jsx)(Hg,{width:"4"}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",gap:"1",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:12,width:1}),(0,i.jsx)(Dh,{borderRadius:"$1",height:12,width:1})]})]}),UC=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),{mutate:o,isLoading:r}=ks(),[d,c,u]=pA(""),{data:m,isLoading:g}=Ei("query ParentUsersInfos(\n $organizationId: OrganizationId!\n $delegationId: DelegationId!\n $name: String\n) {\n organization(id: $organizationId) {\n delegation(id: $delegationId) {\n parentUsersInfos(name: $name) {\n ...ExistingVolunteer\n }\n }\n }\n}\n",{organizationId:n,delegationId:s,name:h(c)?c:void 0},[ka.ExistingVolunteerFragment]);const[p,f]=(0,l.useState)([]);return(0,i.jsxs)(xf,{size:"md",onClose:e.onClose,children:[(0,i.jsx)($i,{color:"gray800",css:{height:"56px",textAlign:"center"},children:(0,i.jsx)("img",{alt:"Avatars",height:"100%",src:Ah.AvatarGroup})}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($i,{color:"gray800",fontSize:"textLg",fontWeight:"medium",textAlign:"center",children:t("ajouter_un_memb_33261")}),(0,i.jsx)(Hg,{height:"1"}),(0,i.jsx)($i,{color:"gray500",textAlign:"center",children:t("ajouter_un_ou_d_21477")}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:t("rechercher_un_m_05904"),value:d,onChange:u}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)($,{css:{flex:"1",overflowY:"auto"},direction:"column",children:g?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(FC,{}),(0,i.jsx)(FC,{}),(0,i.jsx)(FC,{})]}):m.organization.delegation.parentUsersInfos.map(e=>{const t=p.includes(e.id)?"checked":"unchecked";return(0,i.jsx)(LC,{state:t,userInfo:e,onClick:()=>{f(B(p,e.id,"unchecked"===t))}},e.id)})}),(0,i.jsx)(Hg,{height:"7"}),(0,i.jsxs)($,{align:"center",gap:"3",justify:"end",children:[(0,i.jsx)(ga,{disabled:!F(p),isLoading:r,onClick:async()=>{await o({eventId:a,delegationId:s,selecteds:{ids:p}}),location.reload()},children:t("ajouter_97327")}),(0,i.jsx)(ga,{color:"white",onClick:e.onClose,children:t("annuler_48254")})]})]})},BC=({delegation:e,name:t})=>{const{translate:n,params:{organizationId:a,delegationId:s}}=zg(),[o,r]=(0,l.useState)(!1),d=e.canLeadersAddMembers&&e.state===Se.Ongoing,c=d&&(!!e.eventId&&!!e.parentId||e.canLeadersImportMembers),{delegationHeader:u,delegationHeaderEvent:m,addMemberButton:g}=xr(a);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{gap:"3",children:[(0,i.jsxs)($,{css:{flex:"1"},direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"grayCustom900 displayXs semiBold",children:n("bienvenue_1_42255",t||"")}),(0,i.jsx)($i,{color:"grayCustom500",children:e.event?n(m,e.name,e.event.name):n(u,e.name)})]}),c?(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{children:n(g)})}),(0,i.jsxs)(Fp,{placement:"bottom-end",children:[e.eventId&&e.parentId&&(0,i.jsx)(zp,{icon:"user-group",onClick:()=>{r(!0)},children:n("ajouter_des_mem_06922")}),(0,i.jsx)(zp,{icon:"user-plus",to:Wc.MEMBER_CREATE({organizationId:a,eventId:e.eventId||void 0,delegationId:s,formId:e.formId}),children:n("ajouter_un_nouv_29283")}),e.canLeadersImportMembers&&(0,i.jsx)(zp,{icon:"file-import",to:Wc.DELEGATION_MEMBERS_IMPORT({organizationId:a,eventId:e.eventId||void 0,delegationId:s}),onClick:e=>Tp(e.target),children:n("importer_via_un_61623")})]})]}):d?(0,i.jsx)(ga,{to:Wc.MEMBER_CREATE({organizationId:a,eventId:e.eventId||void 0,delegationId:s,formId:e.formId}),children:n(g)}):null]}),o&&(0,i.jsx)(UC,{onClose:()=>{r(!1)}})]})},VC=e=>{const{translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),o=(0,l.useMemo)(()=>e.user?uu(n)?`${e.user.userInfo.firstName||""} ${e.user.userInfo.lastName||""}`.trim():e.user.userInfo.firstName||"":"",[e.user]),r=(0,l.useMemo)(()=>e.delegation.canLeadersDeleteMembers&&e.delegation.state!==Se.Locked,[e.delegation]),d=(0,l.useMemo)(()=>e.delegation.canLeadersDuplicateMembers&&e.delegation.state!==Se.Locked,[e.delegation]),c=(0,l.useMemo)(()=>e.delegation.canLeadersEditMembers&&e.delegation.state!==Se.Locked,[e.delegation]),u=(0,l.useCallback)(e=>e===zr.AccreditationsMatrix&&c,[c]),m=(0,l.useMemo)(()=>(e.delegation.numberOfDelegationsAccreditationsSlots??0)>0,[e.delegation]),g=(0,l.useMemo)(()=>e.delegationsSpaceLayoutTabs.find(e=>e.slug===Er.DOCUMENTS),[e.delegationsSpaceLayoutTabs]),h=(0,l.useMemo)(()=>g?g.isVisible&&F(g?.infos.customDocumentsSlugs??[]):e.allowDelegationSpaceDownload||F(e.delegation.customDocuments??[]),[e.allowDelegationSpaceDownload,e.delegation,g]),p=(0,l.useMemo)(()=>(e.delegationsSpaceCustomBadges??[]).concat(e.delegation.customDocuments.map(e=>e.slug)??[]).concat(g?.infos.customDocumentsSlugs??[]),[e.delegation,e.delegationsSpaceCustomBadges,g]),f=(0,l.useMemo)(()=>e.delegation.event?.customDocuments??[],[e.delegation]),I=e=>({organizationId:e?":organizationId":n,eventId:a?e?":eventId":a:void 0,delegationId:e?":delegationId":s}),{tabMembers:_,tabAccreditations:x}=xr(n),y=!e.delegation.canLeadersSeeHiddenAccreditationsSlots,S=(0,l.useMemo)(()=>{const n=e.delegationsSpaceLayoutTabs.find(e=>e.slug===Er.DASHBOARD),a=n?.name.trim();return n?.isVisible??1?(0,i.jsx)(Xx,{getPath:(e=!1)=>Wc.DELEGATION_DASHBOARD(I(e)),title:a||t("tableau_de_bord_24627"),children:(0,i.jsx)(kC,{})},Er.DASHBOARD):null},[e.delegationsSpaceLayoutTabs,I]),j=(0,l.useMemo)(()=>{const e=g?.name.trim();return a&&h?(0,i.jsx)(Xx,{getPath:(e=!1)=>Wc.DELEGATION_DOCUMENTS(I(e)),title:e||t("Documents"),children:(0,i.jsx)(AC,{customDocuments:f,delegationsSpaceCustomBadges:p})},Er.DOCUMENTS):null},[g,f,e.delegationsSpaceLayoutTabs,p,a,I,h]);return(0,i.jsxs)($,{direction:"column",gap:"6",children:[(0,i.jsx)(BC,{delegation:e.delegation,name:o}),(0,i.jsx)($,{direction:"column",children:(0,i.jsx)(Qx,{children:F(e.delegationsSpaceLayoutTabs)?e.delegationsSpaceLayoutTabs.map(t=>t.slug===Er.DASHBOARD?S:t.slug===Er.DOCUMENTS?j:(0,i.jsx)(Xx,{getPath:(e=!1)=>Wc.DELEGATION_TAB({...I(e),slug:t.slug}),title:t.name,children:t.segmentType===Tt.Volunteers?(0,i.jsx)(WA,{campaigns:e.delegation.campaigns,canDuplicateMembers:d,canEditColumns:e.delegation.canLeadersEditColumns,canMemberAccredit:!1,canMemberDelete:r,canMemberEdit:c,columns:e.delegation.columns,customBadges:p,customFieldsPrivacy:ge.Public,delegationsSpaceLayoutTab:t,deleteFromEvent:!0,forDelegationsSpace:!0,getEditPath:t=>Wc.MEMBER_EDIT({delegationId:s,eventId:a,organizationId:n,userInfoId:t.userInfo.id,formId:e.delegation.formId}),onlyVisibleAccreditationsSlots:!e.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showCustomDocumentsColumns:!1,showDeleteFromEvent:!1,showDocumentsDownload:h,showEditMode:u,showPrint:!1}):(0,i.jsx)(vC,{canMemberAccredit:!1,delegationsSpaceLayoutTab:t,onlyVisible:y})},t.id)):(0,i.jsxs)(i.Fragment,{children:[S,(0,i.jsx)(Xx,{getPath:(e=!1)=>Wc.DELEGATION_MEMBERS(I(e)),title:t(_,e.delegation.numberOfResources),children:a?(0,i.jsx)(WA,{campaigns:e.delegation.campaigns,canDuplicateMembers:d,canEditColumns:e.delegation.canLeadersEditColumns,canMemberAccredit:!1,canMemberDelete:r,canMemberEdit:c,columns:e.delegation.columns,customBadges:p,customFieldsPrivacy:ge.Public,deleteFromEvent:!0,forDelegationsSpace:!0,getEditPath:t=>Wc.MEMBER_EDIT({delegationId:s,eventId:a,organizationId:n,userInfoId:t.userInfo.id,formId:e.delegation.formId}),onlyVisibleAccreditationsSlots:!e.delegation.canLeadersSeeHiddenAccreditationsSlots,showAccreditationsEdit:!1,showAccreditationsValidate:!1,showCustomDocumentsColumns:!1,showDeleteFromEvent:!1,showDocumentsDownload:h,showEditMode:u,showPrint:!1}):(0,i.jsx)(ZA,{campaigns:e.delegation.campaigns,canCustomFieldRead:!1,canEditColumns:e.delegation.canLeadersEditColumns,canMemberDelete:r,canMemberEdit:c,columns:e.delegation.columns,customBadges:p,getEditPath:t=>Wc.MEMBER_EDIT({delegationId:s,organizationId:n,userInfoId:t.id,formId:e.delegation.formId}),showDocumentsDownload:h,showEditMode:!1})}),a&&m&&(0,i.jsx)(Xx,{getPath:(e=!1)=>Wc.DELEGATION_ACCREDITATIONS(I(e)),title:t(x),children:(0,i.jsx)(vC,{canMemberAccredit:!1,onlyVisible:y})}),j]})})})]})},GC=(0,l.createContext)({}),WC=({children:e,...t})=>(0,i.jsx)(GC.Provider,{value:{shouldShowModeSelection:Boolean(t.createCard||t.upsertCard||t.updateCard),...t},children:e});function qC(){return(0,l.useContext)(GC)}const YC=e=>{const t=(0,l.useRef)(null);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)("details",{ref:t,open:e.showSection,onToggle:t=>{const n=t.currentTarget.open;n!==e.showSection&&(e.setShowSection(n),e.onToggle?.(n))},children:[(0,i.jsx)("summary",{style:{cursor:"pointer"},children:(0,i.jsxs)($,{align:"center",gap:"2",children:[(0,i.jsx)(Rf,{tabIndex:-1,value:e.showSection,onChange:yh.A}),(0,i.jsx)(N,{css:{fontWeight:"$medium"},children:e.toggle})]})}),(0,i.jsx)($,{css:{marginBlockStart:"$5",borderBlockStart:"1px solid $gray200",paddingBlockStart:"$6","&:has(> .card)":{borderBlockStart:"unset",marginBlockStart:"$4",paddingBlockStart:"unset"}},direction:"column",gap:"3",children:e.children})]})})},HC=({css:e,disabled:t,hideHeading:n,isOpen:a,isOpenToggleLabel:o,onToggle:r,...d})=>{const{descId:c}=uh(),[u,m]=l.useState(a??!1);return"production"!==s.Production&&l.Children.toArray(d.children).filter(e=>["RadioText","Radio"].includes(e.type.name)).length>=2&&"radiogroup"!==d.role&&console.warn('This `` element contains multiple `` components, but does not have `role="radiogroup"` set; this may result in incorrect styling (i.e., too much vertical spacing).'),(0,i.jsx)(zf.Provider,{value:{isDisabled:t},children:(0,i.jsxs)($,{"aria-describedby":c,as:"fieldset",className:"fieldset--column",css:{border:"unset",padding:"unset",margin:"unset",'&[role="radiogroup"]':{gap:"$2","& header":{borderBlockEnd:"unset",paddingBlockEnd:"unset","& > h2":{fontSize:"$textSm",color:"$gray700"},"& + div":{gap:"$3"}}},"&:disabled :is(input, select, textarea, datalist, button)":{cursor:"not-allowed !important"},...e},direction:"column",disabled:o?!u:void 0,gap:o?"5":"6",...d,children:[(0,i.jsx)(oA,{heading:d.heading}),!n&&(0,i.jsxs)($,{as:R.Header,css:{paddingBlockEnd:o?void 0:"$5",borderBlockEnd:o?void 0:"1px solid $gray200"},direction:"column",gap:"1",children:[(0,i.jsxs)($,{gap:"1",children:[(0,i.jsx)(Xg,{"aria-hidden":"true",color:"gray800",textStyle:"heading",children:d.heading}),d.tooltip]}),d.subtitle&&(0,i.jsx)(N,{id:c,textStyle:"subtitle",children:d.subtitle})]}),o?(0,i.jsx)(YC,{setShowSection:m,showSection:u,toggle:o,onToggle:r,children:d.children}):(0,i.jsx)(i.Fragment,{children:(0,i.jsx)($,{css:{gap:"$6",'&:not(role="radiogroup"):has(> fieldset.fieldset--column + fieldset.fieldset--column)':{gap:"$9"},"&:has(> fieldset.fieldset--row)":{gap:"unset"}},direction:"column",children:d.children})})]})})},ZC=({disabled:e,...t})=>{const{descId:n}=uh();return(0,i.jsx)(zf.Provider,{value:{isDisabled:e},children:(0,i.jsxs)($,{"aria-describedby":n,as:"fieldset",className:"fieldset--row",css:{border:"unset",padding:"unset",margin:"unset","&:disabled :is(input, select, button)":{cursor:"not-allowed !important"},"& + &":{borderBlockStart:"1px solid $gray200",marginBlockStart:"$5",paddingBlockStart:"$5"},"& fieldset.fieldset--column":{gap:"$2","& header":{paddingBlockEnd:"unset",borderBlockEnd:"unset !important","& > div > :is(h1, h2, h3, h4, h5, h6)":{fontSize:"$textSm !important",fontWeight:"$medium !important"}}}},direction:"row",gap:"7",...t,children:[(0,i.jsx)(oA,{heading:t.heading}),(0,i.jsxs)($,{as:R.Header,direction:"row",gap:"1",width:280,children:[(0,i.jsx)(Xg,{"aria-hidden":"true",color:"gray800",css:{fontSize:"$textSm"},textStyle:"subheading",children:t.heading}),(0,i.jsx)(N,{id:n,textStyle:"subtitle",children:t.subtitle})]}),(0,i.jsx)($,{css:{flex:"1"},direction:"column",gap:"4",children:t.children})]})})},KC=e=>{const{params:{organizationId:t},translate:n}=zg(),{data:a,loader:s}=vs({organizationId:t}),o=uh(),r=(0,l.useMemo)(()=>e.formRenderProps.values.input.csv.file,[e.formRenderProps.values.input.csv]),d=(0,l.useMemo)(()=>{const t=localStorage.getItem(xh[`${e.localStorageKeyPrefix}_FORMATS`]);return t?JSON.parse(t):t},[e.localStorageKeyPrefix]),c=(0,l.useMemo)(()=>{const t=t=>e.formRenderProps.values.input.csv.formats?.[t]===a.organization?.[t]?(0,i.jsx)(jf,{css:{textTransform:"uppercase"},children:n("from_organisati_25675")}):d?.[t]===e.formRenderProps.values.input.csv.formats?.[t]&&(0,i.jsx)(jf,{css:{textTransform:"uppercase"},children:n("from_saved_22150")});return{datetime:t("datetimeFormat"),date:t("dateFormat"),timeBadge:t("timeFormat")}},[a.organization,d,e.formRenderProps.values.input.csv.formats]),u=Ci(),m=[e.ImportInputService.IMPORT_COLUMNS_DEFAULT.Id];window.location.origin===ia.HEAVENT_PUBLIC_URL.origin&&m.push(Pd.IMPORT_COLUMNS_DEFAULT.TicketId);const g=Object.values(e.ImportInputService.IMPORT_COLUMNS_DEFAULT).filter(e=>!m.includes(e));let h=[...g,...e.customFields.map(e=>e.slug.startsWith("cf")?`${e.name} [${e.slug}]`:e.name)],p=0;if(F(e.additionalCategories))for(const t of e.additionalCategories){if(t.fields.some(e=>!e.slug.startsWith("accreditation_slot_")&&!e.slug.startsWith("accreditation_profile_")))throw new Error("Unhandled category type");h=[...h,...t.fields.map(e=>`${e.name} [${e.slug}]`)],p+=t.fields.length}const f=[h,new Array(g.length+e.customFields.length+p)].map(e=>e.map(e=>{return`${t=e,t.includes(",")||t.includes('"')||t.includes("\n")||t.includes(" ")?'"'+t.replace(/"/g,'""')+'"':t}`;var t}).join(",")).join("\n"),I=`data:text/csv;charset=utf-8,${encodeURIComponent(f)}`;return s||(0,i.jsxs)($,{direction:"column",gap:"8",children:[(0,i.jsx)(HC,{css:{"& header":{borderBlockEnd:"unset",paddingBlockEnd:"unset"}},heading:n("choix_du_fichie_30517"),subtitle:[...u(n("s_lectionnez_vo_53506","{1}"),(0,i.jsx)($h,{css:{color:"$primary600"},download:"export-sample-file.csv",to:I,children:n("t_l_charger_un_46976")}))],children:(0,i.jsx)(vI,{...o,accept:Kf.Csv,acl:"private",organizationId:t,prefix:"input.csv.",withFileField:!0,onChange:t=>e.onChange(t,e.formRenderProps)})}),(0,i.jsxs)(HC,{heading:n("param_tres_du_f_01675"),isOpenToggleLabel:n("afficher_les_pa_96893"),subtitle:n("personnaliser_s_29361"),children:[(0,i.jsxs)(ZC,{heading:n("type_de_carat_r_62356"),children:[(0,i.jsx)(_h,{hint:n("laissez_ce_cham_07837"),label:n("d_limitateur_77701"),name:"input.csv.delimiter",state:r?"disabled":void 0}),(0,i.jsx)(_h,{hint:n("leave_blank_if_02058"),label:n("caract_re_d_ch_56847"),name:"input.csv.quoteChar",state:r?"disabled":void 0}),(0,i.jsxs)(HI,{hint:n("leave_blank_if_02058"),label:n("caract_re_de_re_71491"),name:"input.csv.newline",state:r?"disabled":void 0,children:[(0,i.jsx)("option",{value:void 0,children:"Auto-detect"}),(0,i.jsx)("option",{value:"\r",children:"\\r"}),(0,i.jsx)("option",{value:"\n",children:"\\n"}),(0,i.jsx)("option",{value:"\r\n",children:"\\r\\n"})]})]}),(0,i.jsxs)(ZC,{heading:n("type_de_format_68432"),children:[(0,i.jsx)(_h,{label:(0,i.jsxs)($,{align:"center",gap:"2",children:[n("format_d_heure_46798"),c.timeBadge]}),name:"input.csv.formats.timeFormat",state:r?"disabled":void 0}),(0,i.jsx)(_h,{label:(0,i.jsxs)($,{align:"center",gap:"2",children:[n("format_de_date_82059"),c.date]}),name:"input.csv.formats.dateFormat",state:r?"disabled":void 0}),(0,i.jsx)(_h,{label:(0,i.jsxs)($,{align:"center",gap:"2",children:[n("format_de_date_24474"),c.datetime]}),name:"input.csv.formats.datetimeFormat",state:r?"disabled":void 0})]})]})]})},QC=j("input",{blockSize:"fit-content",inlineSize:"fit-content"}),XC=(0,l.forwardRef)((e,t)=>(0,i.jsx)(QC,{ref:t,type:"radio",...e}));XC.displayName="Radio";const JC=({children:e,css:t,icon:n,subtext:a,...s})=>{const{inputId:o,descId:r,labelId:d}=uh(),c=(0,l.useRef)(null);return(0,i.jsx)($,{css:{bd:!0,flexGrow:"1",margin:"-1px",cursor:"pointer",'&:has( input[type="radio"]:checked)':{border:"2px solid $primary500"},...t},onClick:()=>c.current?.click(),children:(0,i.jsx)($,{css:{border:"1px solid transparent",padding:"$4",'&:has( input[type="radio"]:checked)':{border:"none"}},children:(0,i.jsxs)($,{gap:"1",children:[(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)($,{css:{bd:!0,border:"1px solid $gray200",inlineSize:"fit-content"},justify:"start",children:(0,i.jsx)(cf,{css:{color:"$gray800",background:"unset"},icon:n})}),(0,i.jsxs)($,{direction:"column",children:[(0,i.jsx)(hh,{htmlFor:o,id:d,children:(0,i.jsx)(N,{css:{fontSize:"$textSm",fontWeight:"$medium"},children:e})}),a&&(0,i.jsx)(N,{id:r,children:a})]}),(0,i.jsx)($,{css:{flex:"1"}})]}),(0,i.jsx)(XC,{ref:c,"aria-describedby":r,"aria-labelledby":d,id:o,...s})]})})})},eE=({name:e,value:t,...n})=>(0,i.jsx)(qg.D0,{name:e,render:({input:e})=>(0,i.jsx)(JC,{checked:e.checked,name:e.name,value:t,onChange:e.onChange,...n,children:n.children}),type:"radio",value:t});function tE(e){const t=(0,Zd.A)(e,e=>e.category.id);return(n=(0,_r.A)(e.map(e=>e.category),e=>e.id),(0,mo.A)(n,e=>m(e.name))).map(e=>({category:e,items:(0,mo.A)(t[e.id],e=>m(e.name))}));var n}const nE=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>[{id:-1,name:t("default_fields_04920"),fields:Object.entries(e.defaultFields).map(([e,n])=>({name:h(t(e))?t(e):e,slug:n,id:parseInt((0,ch.A)())}))},...e.categories].map(t=>({...t,fields:(0,mo.A)(t.fields,t=>{const n=t.name.toLowerCase(),i=t.slug.toLowerCase(),a=e.column.name.toLowerCase(),s=Math.min(x(n,a),x(i,a));return s{const a=Object.values(e.defaultFields).find(e=>e===t);return a&&e.requiredFieldSlugs.includes(a)?(0,i.jsx)("strong",{children:n}):n},[e.defaultFields,e.requiredFieldSlugs]);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Ih,{state:"disabled",value:e.column.name,onChange:()=>{}}),(0,i.jsx)(ra,{icon:"arrow-right"}),(0,i.jsx)(GI,{isSearchVisible:!0,multiple:!1,name:`input.mappings.${e.column.index}`,placeholder:t("s_lectionnez_un_12007"),renderValue:a,children:n.map(t=>(0,i.jsx)("optgroup",{label:t.name,children:t.fields.map(t=>(0,i.jsx)("option",{style:{fontWeight:e.requiredFieldSlugs.includes(t.slug)?"bold":"inherit",opacity:e.values.includes(t.slug)?.5:1},value:t.slug,children:t.name},t.id))},t.id))})]})},iE=j("div",{display:"grid",gridTemplateColumns:"[column] 1fr auto [field] 1fr",gap:"$4 $5",alignItems:"center"}),aE=j("div",{color:"$gray800",gridColumn:"column",fontWeight:"$medium"}),sE=j("div",{color:"$gray800",gridColumn:"field",fontWeight:"$medium"}),oE=e=>{const{translate:t}=zg();return(0,i.jsxs)(iE,{children:[(0,i.jsx)(aE,{children:t("titres_de_vos_c_31388")}),(0,i.jsx)(sE,{children:t("champs_de_formu_64126")}),e.columns.map((t,n)=>(0,i.jsx)(nE,{categories:e.categories,column:{name:t,index:n},defaultFields:e.defaultFields,requiredFieldSlugs:e.requiredFieldSlugs,values:e.values},n))]})},rE=e=>{const{translate:t}=zg(),{alertDescriptionKey:n}=qC(),{formRenderProps:{values:{input:{mappings:a}}}}=(0,l.useContext)(Yg),s=(0,l.useMemo)(()=>Object.entries(e.defaultFields).filter(([t,n])=>e.requiredFieldSlugs.includes(n)&&!a.includes(n)).map(([e,n])=>h(t(e))?t(e):e),[e.defaultFields,e.requiredFieldSlugs,a]),o=Ci();return(0,i.jsxs)(HC,{css:{"& > header":{borderBlockEnd:"unset",paddingBlockEnd:"unset"}},gap:"5",heading:t("donn_es_de_mapp_98874"),subtitle:t("s_lectionnez_le_13978"),children:[F(s)&&(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t("required_field_46113",s.length)}),(0,i.jsx)(th,{children:[...o(t(n,"{1}"),(0,i.jsx)("ul",{style:{margin:"0",paddingInlineStart:"var(--space-4)"},children:s.map(e=>(0,i.jsx)("li",{children:e},e))}))]})]}),(0,i.jsx)(oE,{...e})]})};function lE(e,t=e=>e.id){return tE(e).map(({category:e,items:n})=>(0,i.jsx)("optgroup",{label:e.name,children:n.map(e=>(0,i.jsx)("option",{"data-subtext":e.label,value:t(e),children:e.name},e.id))},e.id))}const dE=/^\{user\.(.+)\}$/,cE=e=>{const{translate:t}=zg(),n=e.customFields.find(t=>t.id===e.customFieldValues.customFieldId),a=!0===e.canLinkToField&&n?.fieldType!==ze.Select,s=a&&(e.customFieldValues.fromField??(h(e.customFieldValues.value)&&dE.test(e.customFieldValues.value.trim()))),o=(0,l.useMemo)(()=>n?e.customFields.filter(e=>e.fieldType===n.fieldType&&e.id!==n.id):[],[e.customFields,n]),r=(0,l.useMemo)(()=>lE(e.customFields),[e.customFields]),d=(0,l.useMemo)(()=>lE(o,e=>`{user.${e.slug}}`),[o]),c=n&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(eA,{campaigns:[],categories:[],change:e.change,customDocuments:[],customField:n,delegationsSpaceLayouts:[],forms:[],name:`${e.field}.value`,slug:n.slug,tags:[],traces:[],value:e.customFieldValues.value}),(u=n,u.fieldType===ze.Select&&u.canSelectMultiple&&(0,i.jsx)(Vf,{name:`${e.field}.addValues`,children:t("ajouter_les_val_22996")}))]});var u;const m=t=>{t!==s&&(e.change(`${e.field}.fromField`,t),e.change(`${e.field}.value`,void 0),e.change(`${e.field}.addValues`,!1))};return(0,i.jsx)(X_,{buttons:(0,i.jsxs)(R_,{children:[(0,i.jsx)(w_,{children:(0,i.jsx)($i,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.remove})})}),(0,i.jsx)(O_,{placement:"top",children:t("supprimer_43083")})]}),title:t("champ_de_formul_73221",e.index+1),children:(0,i.jsxs)($,{direction:"column",gap:"4",children:[(0,i.jsxs)(GI,{isSearchVisible:!0,label:t("CustomField"),name:`${e.field}.customFieldId`,children:[(0,i.jsx)("option",{value:"-1",children:t("s_lectionner_un_48159")}),r]}),n&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray700 textSm medium",children:t("nouvelle_valeur_39039",n.name)}),a?(0,i.jsxs)($,{direction:"column",gap:"3",children:[(0,i.jsx)(hf,{state:s?"unchecked":"checked",onClick:()=>m(!1),children:t("saisir_une_nouv_92931")}),!s&&(0,i.jsx)($,{css:{paddingLeft:"$6"},direction:"column",gap:"1",children:c}),(0,i.jsx)(hf,{state:s?"checked":"unchecked",onClick:()=>m(!0),children:t("lier_un_autre_51509")}),s&&(0,i.jsx)($i,{css:{paddingLeft:"$6"},children:(0,i.jsx)(GI,{isSearchVisible:!0,name:`${e.field}.value`,placeholder:t("choisir_un_cham_67587"),children:d})})]}):c]})]})})},uE=e=>{const t=Ai();return(0,i.jsx)($,{direction:"column",gap:"3",children:F(e.values)?(0,i.jsxs)(i.Fragment,{children:[e.values.map((t,n)=>{const a=`${e.name}[${n}]`;return(0,i.jsx)($,{direction:"column",children:(0,i.jsx)($,{gap:"3",children:(0,i.jsx)(cE,{canLinkToField:e.canLinkToField,change:e.change,customFieldValues:e.values[n],customFields:e.customFields,field:a,index:n,remove:()=>{e.change(e.name,V(e.values,n))}})})},n)}),(0,i.jsx)(ga,{color:"invisible",css:{"::before":{content:"+",marginInlineEnd:"$1"}},onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:t("ajouter_un_nouv_22370")})]}):(0,i.jsx)(yp,{align:"center",css:{background:"$gray50",textAlign:"center"},gap:"2",children:(0,i.jsxs)($,{align:"center",css:{textAlign:"center"},direction:"column",gap:"2",children:[(0,i.jsx)(N,{css:{fontWeight:"$medium"},children:t("aucun_champ_est_98607")}),(0,i.jsx)(ga,{color:"invisible",css:{inlineSize:"fit-content","::before":{content:"+",marginInlineEnd:"$1"}},onClick:()=>{e.change(e.name,e.values.concat([{customFieldId:-1,addValues:!1}]))},children:t("_lier_un_champ_52842")})]})})})},mE=({file:e,onToggle:t,...n})=>{const a=Ai();return(0,i.jsx)(HC,{heading:a("attribution_d_u_50979"),isOpen:F(n.values)??!1,isOpenToggleLabel:a("attribuer_autom_74319"),subtitle:a("d_finissez_dire_31742"),onToggle:t,children:(0,i.jsx)(ZC,{heading:a("liste_des_champ_94862"),children:(0,i.jsx)(uE,{name:"input.presets",...n})})})},gE=(e,t)=>{switch(t.type){case"LOADING":return{isLoading:!0,columns:void 0,errors:void 0};case"SUCCESS":return{isLoading:!1,columns:t.columns,errors:void 0};case"ERROR":return{isLoading:!1,columns:void 0,errors:t.errors}}};function hE(e){const{translate:t}=zg(),{isLoading:n,columns:a,errors:s}=((e,t)=>{const[n,i]=(0,l.useReducer)(gE,{isLoading:!0,columns:void 0,errors:void 0});return(0,l.useEffect)(()=>{i({type:"LOADING"}),(0,To.parse)(e,{preview:1,...t,complete:({data:e,errors:t})=>{t.filter(e=>"UndetectableDelimiter"!==e.code).length?i({type:"ERROR",errors:t}):i({type:"SUCCESS",columns:e[0]})}})},[e]),n})(e.file,{delimiter:e.values.input.csv.delimiter??void 0,quoteChar:e.values.input.csv.quoteChar??void 0,newline:e.values.input.csv.newline??void 0}),o=(0,l.useMemo)(()=>{const t=tE(e.customFields).map(({category:e,items:t})=>({id:e.id,name:e.name,fields:t.map(e=>e.fieldType===ze.File?{...e,name:`${e.name} (URL)`}:e)}));return e.additionalCategories?t.concat(e.additionalCategories):t},[e.additionalCategories,e.customFields]);return n||s?null:(0,i.jsxs)(i.Fragment,{children:[e.additionalOptions&&(0,i.jsx)(HC,{heading:t("param_tres_d_im_18876"),children:e.additionalOptions}),(0,i.jsx)(rE,{categories:o,columns:a,defaultFields:e.defaultFields,modeSelection:e.modeSelection,requiredFieldSlugs:e.requiredFieldSlugs,values:e.values.input.mappings}),F(e.customFields)&&(0,i.jsx)(mE,{change:e.form.change,customFields:e.customFields,file:e.file,values:e.values.input.presets,onToggle:e.onToggle})]})}const pE=e=>{const{params:{organizationId:t},translate:n}=zg(),{createCard:a,upsertCard:s,updateCard:o,shouldShowModeSelection:r}=qC();return(0,i.jsxs)($,{direction:"column",gap:"8",children:[r&&(0,i.jsx)(HC,{heading:n("type_d_action_d_35533"),name:"input.mode",role:"radiogroup",subtitle:n("s_lectionnez_la_32551"),children:(0,i.jsxs)($,{gap:"4",justify:"evenly",children:[a&&(0,i.jsx)($,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(eE,{icon:"user-plus",name:"input.mode",subtext:a.description,value:Ye.Create,children:a.heading})}),s&&(0,i.jsx)($,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(eE,{icon:"user-pen",name:"input.mode",subtext:s.description,value:Ye.Upsert,children:s.heading})}),o&&(0,i.jsx)($,{css:{flex:"1"},direction:"column",children:(0,i.jsx)(eE,{icon:"arrows-rotate",name:"input.mode",subtext:o.description,value:Ye.Update,children:o.heading})})]})}),e.formRenderProps.values.input.csv?.file&&IE(e.formRenderProps.form)&&(0,i.jsx)(hE,{additionalCategories:e.additionalCategories,additionalOptions:e.additionalOptions,customFields:e.customFields,defaultFields:e.ImportInputService.IMPORT_COLUMNS_DEFAULT,file:e.formRenderProps.values.input.csv.file,form:e.formRenderProps.form,requiredFieldSlugs:e.ImportInputService.IMPORT_COLUMNS_REQUIRED(e.formRenderProps.values.input.mode),values:e.formRenderProps.values,onToggle:n=>{if(!e.formRenderProps.values.input.csv.file)throw new Error("No file in input!");try{n?e.formRenderProps.form.change("input.presets",JSON.parse(localStorage.getItem(xh[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]")):e.formRenderProps.form.change("input.presets",[])}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}}}),(0,i.jsxs)(HC,{heading:n("identify_your_i_87636"),subtitle:n("by_default_you_75833"),children:[(0,i.jsx)(_h,{label:n("your_import_tag_41852"),name:"input.tag",state:"disabled"}),!e.isTagInputDisabled&&(0,i.jsx)(Ih,{label:n("specify_an_impo_41868"),onChange:t=>{h(t)?e.formRenderProps.form.change("input.tag",`${e.importTagPrefix}-csv-${t}`):e.formRenderProps.form.change("input.tag",`${e.importTagPrefix}-csv-${wa.c9.now().toFormat(Ua)}`)}})]})]})},fE=e=>{const{translate:t}=zg();return(0,i.jsxs)($,{align:"center",css:{alignSelf:"center",maxInlineSize:"640px"},direction:"column",gap:"8",children:[(0,i.jsxs)($,{align:"center",direction:"column",gap:"4",children:[(0,i.jsx)($,{css:{bd:!0,border:"1px solid $gray200",inlineSize:"fit-content"},justify:"start",children:(0,i.jsx)(cf,{css:{color:"$gray800",background:"unset"},icon:"party-horn"})}),(0,i.jsxs)($,{css:{textAlign:"center"},direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{children:t("l_importation_e_12369")}),(0,i.jsx)(N,{textStyle:"subtitle",children:t("_la_fin_du_pro_00757")})]})]}),(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(ga,{onClick:()=>window.location.reload(),children:t("nouvel_import_48306")}),e.returnLink]})]})},IE=e=>!!e.getFieldState("input.csv.key")?.valid&&!!e.getFieldState("input.csv.file")?.valid,_E=/\[(cf[0-9]+|accreditation_slot_[0-9]+)\]$/,xE=/\[accreditation_slot_([0-9]+)\]$/,yE=(e,t)=>Math.abs(e.length-t.length)<=1&&(0===e.length||0===t.length||e.charCodeAt(0)===t.charCodeAt(0)||e.charCodeAt(e.length-1)===t.charCodeAt(t.length-1)),SE=(e,t)=>e.IMPORT_COLUMNS_REQUIRED(t.mode).every(e=>t.mappings.includes(e)),jE=(e,t,n)=>t.formatListValues(e.IMPORT_COLUMNS_REQUIRED(n.mode).filter(e=>!n.mappings.includes(e)),"conjunction"),vE=e=>{const{params:{organizationId:t,eventId:n,delegationId:a},translate:s}=zg(),{shouldShowModeSelection:o}=qC();fg(e.heading);const r=bi(Si),{data:d}=vs({organizationId:t}),c=Di(),u=bi(e.ImportInputService),m=(0,l.useRef)(null),g=(0,l.useMemo)(()=>((e,t,n)=>{let i;const a=()=>i??=((e,t,n)=>{const i=e.IMPORT_COLUMNS_DEFAULT,a=new Map,s=new Map;for(const[e,t]of Object.entries(i)){const n=e.toLowerCase(),o=String(t).toLowerCase();s.has(n)||s.set(n,i[e]),a.has(o)||a.set(o,i[t])}const o=new Map,r=new Map;for(const e of t){const t=e.slug.toLowerCase(),n=e.name.toLowerCase();o.has(t)||o.set(t,e.slug),r.has(n)||r.set(n,e.slug)}const l=new Map,d=new Map,c=[];let u=0;for(let e=0;e<(n?.length??0);e++){const t=[];c.push(t);for(const i of n[e].fields){const n={slug:i.slug,name:i.name,categoryIndex:e,order:u++};t.push(n);const a=String(i.id);l.has(a)||l.set(a,n);const s=d.get(i.name.length);s?s.push(n):d.set(i.name.length,[n])}}return{defaultBySlug:a,defaultByName:s,customFieldBySlug:o,customFieldByName:r,accreditationsById:l,accreditationsByLength:d,accreditationsByCategory:c,hasAccreditations:c.length>0}})(e,t,n),s=e=>{const t=a(),n=(e=>_E.exec(e)?.[1])(e);if(n){const i=n.toLowerCase();return t.defaultBySlug.has(i)?t.defaultBySlug.get(i)??null:n.startsWith("accreditation_slot_")&&t.hasAccreditations?(e=>{const t=a(),n=xE.exec(e)?.[1];if(void 0===n)return null;const i=t.accreditationsById.get(n);if(i)return i.slug;const s=e.split(" [accreditation_slot_").at(0)??e,o=t.accreditationsByLength.get(s.length)?.find(e=>e.name===s);if(o)return o.slug;let r;for(let e=s.length-1;e<=s.length+1;e++){const n=t.accreditationsByLength.get(e);if(n)for(const e of n)r&&e.order>r.order||yE(e.name,s)&&x(e.name,s)<2&&(r=e)}return r?.slug??null})(e):t.customFieldBySlug.has(i)?t.customFieldBySlug.get(i)??null:t.customFieldByName.get(e.toLowerCase())??null}const i=e.toLowerCase();return t.defaultByName.has(i)?t.defaultByName.get(i)??null:t.customFieldByName.get(i)??null};let o=null,r=[];return{matchColumn:s,getAutomaticMappings(e){const t=e.join("\0");return t===o||(o=t,r=e.map(s)),r}}})(e.ImportInputService,e.customFields,e.additionalCategories),[e.ImportInputService,e.customFields,e.additionalCategories]),[p,f]=(0,l.useState)(!1),I=(0,l.useMemo)(()=>{try{const t={dateFormat:d.organization.dateFormat,datetimeFormat:d.organization.datetimeFormat,timeFormat:d.organization.timeFormat},n=JSON.parse(c.getItem(xh[`${e.localStorageKeyPrefix}_FORMATS`])??"{}");return{...t,...n}}catch{return null}},[d.organization]),_=(0,l.useMemo)(()=>{const t=c.getItem(xh[`${e.localStorageKeyPrefix}_FORMATS`]);return t?JSON.parse(t):t},[e.localStorageKeyPrefix]),y=(0,l.useMemo)(()=>{const t=u.default(I).input;let n=t.mode;if(o)try{n=c.getItem(xh[`${e.localStorageKeyPrefix}_MODE`])??Ye.Upsert}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}return{input:{...t,mode:n,tag:`${e.importTagPrefix}-csv-${wa.c9.now().toFormat(Ua)}`}}},[u,I,o,e.localStorageKeyPrefix,e.importTagPrefix]),S=bi(No),j=(0,l.useCallback)((n,i)=>{(0,To.parse)(n,{delimiter:i.values.input.csv.delimiter,preview:1,newline:i.values.input.csv.newline,quoteChar:i.values.input.csv.quoteChar,complete:({data:t,errors:n})=>{if(!n.length||1===n.length&&"UndetectableDelimiter"===n[0].code){const n=t[0],a=g.getAutomaticMappings(n);let s={};try{s=JSON.parse(c.getItem(xh[`${e.localStorageKeyPrefix}_MAPPINGS`])??"{}")}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}const o=n.map((e,t)=>void 0!==s[e]?s[e]:a[t]??null);if(i.form.change("input.mappings",o),e.skipMappingIfAllColumnsMatch){const t=new Set([...Object.values(e.ImportInputService.IMPORT_COLUMNS_DEFAULT),...e.customFields.map(e=>e.slug),...(e.additionalCategories??[]).flatMap(e=>e.fields.map(e=>e.slug))]);f(o.every(e=>h(e)&&t.has(e))&&SE(e.ImportInputService,{mode:i.values.input.mode,mappings:o.filter(h)}))}}}});try{i.form.change("input.presets",JSON.parse(c.getItem(xh[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]"))}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}},[g,c,t,o,e.ImportInputService,e.importTagPrefix,e.localStorageKeyPrefix,e.skipMappingIfAllColumnsMatch]);return(0,i.jsx)(Hs.Provider,{value:{designSystem:Ys},children:(0,i.jsx)(cI,{category:s("nouvel_import_48306"),color:"dark",fallbackClosePath:e.closePath,heading:e.heading,children:(0,i.jsx)(sA,{ref:m,children:(0,i.jsxs)(cA,{containerRef:m,initialValues:y,isEdit:!1,summaryStep:(0,i.jsx)(fE,{returnLink:e.returnLink}),onSubmit:async({input:i})=>{if(!SE(e.ImportInputService,i))return{[ju.Ym]:s("you_have_not_ma_46806",jE(e.ImportInputService,r,i))};(n=>{const i=n.csv.file;if(!i)throw new Error("No file in input!");(0,To.parse)(i,{delimiter:n.csv.delimiter,preview:1,newline:n.csv.newline,quoteChar:n.csv.quoteChar,complete:({data:t,errors:i})=>{if(!i.length)try{const i=t[0],a=g.getAutomaticMappings(i),s=JSON.parse(c.getItem(xh[`${e.localStorageKeyPrefix}_MAPPINGS`])??"{}"),o={};for(const[e,t]of n.mappings.entries()){const n=i[e];t?o[n]=t:delete s[n],h(a[e])&&!o[n]&&(o[n]=null)}c.setItem(xh[`${e.localStorageKeyPrefix}_MAPPINGS`],JSON.stringify({...s,...o}))}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}}});try{const i=JSON.parse(c.getItem(xh[`${e.localStorageKeyPrefix}_PRESETS`](t))??"[]");c.setItem(xh[`${e.localStorageKeyPrefix}_PRESETS`](t),JSON.stringify([...new Map([...i,...n.presets].map(e=>[e.customFieldId,e])).values()])),c.setItem(xh[`${e.localStorageKeyPrefix}_FORMATS`],JSON.stringify(n.csv.formats?Object.fromEntries(Object.entries(n.csv.formats).filter(([e,t])=>h(t))):{})),o&&c.setItem(xh[`${e.localStorageKeyPrefix}_MODE`],n.mode)}catch(e){console.debug(`LocalStorage not available: ${e.toString()}`)}})(i);const l=(e=>{const t={...e.csv};return delete t.file,{...e,csv:t}})(i);try{const{jobId:i}=await e.mutate({organizationId:t,eventId:n,delegationId:a,input:l});e.checkImport(i,t,n)}catch{}},children:[(0,i.jsx)(dA,{actions:t=>(0,i.jsxs)($,{gap:"3",children:[(0,i.jsx)(ga,{disabled:!IE(t.form),onClick:t.handleSubmit,children:s("suivant_donn_08625")}),_&&(0,i.jsx)(ga,{color:"invisible-gray",onClick:()=>{c.removeItem(xh[`${e.localStorageKeyPrefix}_FORMATS`]),window.location.reload()},children:s("clear_saved_set_61259")})]}),heading:s("choix_du_fichie_30517"),render:t=>(0,i.jsx)(KC,{ImportInputService:e.ImportInputService,additionalCategories:e.additionalCategories,customFields:e.customFields,formRenderProps:t,localStorageKeyPrefix:e.localStorageKeyPrefix,onChange:j}),schema:S.settingsStepSchema()}),!p&&(0,i.jsx)(dA,{actions:e=>(0,i.jsx)(ga,{type:"submit",onClick:e.handleSubmit,children:s("importer_90688")}),heading:s("donn_es_impor_12371"),render:t=>(0,i.jsx)(pE,{ImportInputService:e.ImportInputService,additionalCategories:e.additionalCategories,additionalOptions:e.additionalOptions,customFields:e.customFields,formRenderProps:t,importTagPrefix:e.importTagPrefix,isTagInputDisabled:e.isTagInputDisabled,localStorageKeyPrefix:e.localStorageKeyPrefix}),schema:u.mappingStepSchema()})]})})})})},bE=()=>{const{params:{organizationId:e,eventId:t,delegationId:n},translate:a}=zg(),s=bi(gl),{data:o,loader:r}=Ei("query DelegationImportInfos($organizationId: OrganizationId!, $delegationId: DelegationId!) {\n organization: organizationPublic(id: $organizationId) {\n delegation(id: $delegationId) {\n form {\n elements {\n elementType\n customField {\n ...CustomFieldImport\n }\n }\n }\n\n accreditationsProfiles {\n accreditationProfile {\n ...AccreditationProfileImport\n }\n }\n\n accreditationsSlots(onlyVisible: true) {\n accreditationSlot {\n id\n name\n date\n isBlocked\n accreditation {\n id\n name\n }\n }\n }\n }\n }\n}\n",{organizationId:e,delegationId:n},[ka.CustomFieldImportFragment,ka.AccreditationProfileImportFragment]),{mutate:d}=function(e={}){return Ti("mutation VolunteersImport(\n $eventId: EventId\n $organizationId: OrganizationId!\n $delegationId: DelegationId\n $input: MappableImportInput!\n) {\n jobId: volunteersImport(\n eventId: $eventId\n organizationId: $organizationId\n delegationId: $delegationId\n input: $input\n )\n}\n",e)}(),{checkVolunteersImport:c}=(0,l.useContext)(Xs),u=(0,l.useCallback)((e,t,i)=>c(e,t,i,n),[c,n]),m=(0,l.useMemo)(()=>{const e=new Map;return(0,mo.A)((o.organization?.delegation.accreditationsSlots??[]).filter(e=>!e.accreditationSlot.isBlocked),e=>e.accreditationSlot.date?.toMillis()??0).forEach(({accreditationSlot:{accreditation:t,id:n,name:i,date:a}})=>{const s={id:n,name:i,date:a},o=e.get(t.id);o?o.slots.push(s):e.set(t.id,{...t,slots:[s]})}),((e,t)=>t.map(t=>({id:t.id,name:t.name,fields:t.slots.map(n=>({id:n.id,slug:`accreditation_slot_${n.id}`,name:du(e,n,t.name,{accreditation:{includeNameAtEnd:!0}})}))})))(s,[...e.values()]).concat((t=(o.organization?.delegation.accreditationsProfiles??[]).map(e=>e.accreditationProfile),Object.values((0,Zd.A)(t,e=>e.accreditationProfileCategory.id)).map(e=>({id:e[0].accreditationProfileCategory.id,name:e[0].accreditationProfileCategory.name,fields:e.map(e=>({id:e.id,slug:`accreditation_profile_${e.id}`,name:e.name}))}))));var t},[o.organization,s]),g=(0,l.useMemo)(()=>(o.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===Be.Field?[e.customField]:[]),[o.organization]);return r||(0,i.jsx)(WC,{alertDescriptionKey:"to_add_a_member_56912",children:(0,i.jsx)(vE,{ImportInputService:Pd,additionalCategories:m,checkImport:u,closePath:Wc.DELEGATION_MEMBERS({organizationId:e,eventId:t,delegationId:n}),customFields:g,heading:a("import_de_membr_48618"),importTagPrefix:`delegation-${n}`,isTagInputDisabled:!0,localStorageKeyPrefix:"DELEGATION_MEMBERS_IMPORT",mutate:d,returnLink:(0,i.jsx)($h,{to:Wc.DELEGATION({organizationId:e,eventId:t,delegationId:n}),children:a("revenir_aux_d_l_04236")}),skipMappingIfAllColumnsMatch:!0})})},AE=e=>(0,i.jsx)(lA,{disabled:e.disabled,heading:e.heading,hideHeader:e.hideHeader,children:(0,i.jsx)($,{direction:"column",children:e.children})}),CE=e=>{const{translate:t}=zg();return(0,i.jsx)(AE,{heading:(0,i.jsxs)($,{justify:"between",width:1,css:{display:"flex !important"},children:[(0,i.jsx)($i,{children:t("invit_n_1_57041",e.index+1)}),e.showRemove&&(0,i.jsx)(ga,{color:"white",leftIcon:"trash-can",size:"sm",onClick:e.onRemove})]}),children:(0,i.jsxs)($,{direction:"column",gap:"4",width:1,children:[(0,i.jsx)(_h,{isEmail:!0,label:t("Email"),name:`${e.prefix}email`}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(_h,{label:(0,i.jsx)(Pf,{children:t("pr_nom_66988")}),name:`${e.prefix}fields.firstName`}),(0,i.jsx)(_h,{label:(0,i.jsx)(Pf,{children:t("last_name")}),name:`${e.prefix}fields.lastName`})]})]})})},EE=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),o=bi(Ir),{mutate:r}=function(e={}){return Ti("mutation DelegationFormInvite(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $usersInfos: [UsersInfoEmailInput!]!\n) {\n delegationFormInvite(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n usersInfos: $usersInfos\n )\n}\n",e)}(),l=()=>{e.goBack(Wc.DELEGATION_DASHBOARD({organizationId:n,eventId:a,delegationId:s}))};return(0,i.jsxs)($,{direction:"column",gap:"7",children:[(0,i.jsx)(ga,{color:"invisible",leftIcon:"arrow-left",onClick:l,children:t("retour_92202")}),(0,i.jsx)($i,{font:"gray800 textLg bold",children:t("envoyer_le_lien_38138")}),(0,i.jsx)(rh,{direction:"column",gap:"6",hideDefaultErrors:!0,initialValues:o.delegationFormInviteValuesDefault(),render:({handleSubmit:e,submitting:n})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ah,{hideSpacer:!0}),(0,i.jsx)(Q_.ED,{name:"usersInfos",children:({fields:e})=>(0,i.jsxs)(i.Fragment,{children:[e.map((t,n)=>(0,i.jsx)(CE,{index:n,prefix:`${t}.`,showRemove:(e?.length??0)>1,onRemove:()=>e.remove(n)},n)),(0,i.jsx)(ga,{color:"invisible",leftIcon:"plus",onClick:()=>{e.push({email:"",fields:{firstName:"",lastName:""}})},children:t("ajouter_un_invi_90855")})]})}),(0,i.jsx)($,{children:(0,i.jsx)(ga,{isLoading:n,onClick:e,children:t("envoyer_le_lien_38138")})})]}),schema:o.delegationFormInviteValuesSchema(),onSubmit:async e=>{await r({organizationId:n,eventId:a,delegationId:s,usersInfos:e.usersInfos}),l()}})]})},TE=e=>{const{translate:t,params:{organizationId:n,eventId:a}}=zg(),s=bi(Su),o=(0,l.useMemo)(()=>h(e.form.description)?s.renderText(e.form.description,{event:e.event,organization:e.organization}):"",[e.event,e.form.description,e.organization]),r=(0,l.useMemo)(()=>a&&e.form.slotDisplay!==At.Hide,[e.form,a]),d=(0,l.useMemo)(()=>a&&e.form.positionDisplay!==vt.None,[e.form,a]),c=(0,l.useMemo)(()=>a&&(e.form.accreditationDisplay!==St.None||F(e.delegationAccreditationsSlots)||F(e.delegationAccreditationsProfiles)),[e.delegationAccreditationsProfiles,e.delegationAccreditationsSlots,e.form,a]),u=(0,l.useMemo)(()=>e.userInfo?.volunteerRegistration?.accreditationsUsersInfos.flatMap(e=>e.checkInAt?.isValid?[e.accreditationSlotId]:[])??[],[e.userInfo]),m=function(e,t=300){const[n,i]=(0,l.useState)(e),a=aj(i,t);return(0,l.useEffect)(()=>{a(e)},[e]),n}(e.values.formRegister.userInfo.fields);return(0,i.jsxs)(i.Fragment,{children:[e.showEmail&&(0,i.jsxs)(AE,{hideHeader:!0,children:[h(o)&&(0,i.jsx)(vp,{text:o}),(0,i.jsx)(_h,{isEmail:!0,label:t("Email"),name:"email"})]}),(0,i.jsx)(AE,{heading:h(e.form.informationTitle)?e.form.informationTitle:t("informations_pe_37892"),children:e.disabled?(0,i.jsx)(tb,{form:e.form,userInfo:e.userInfo}):(0,i.jsx)(I_,{asoBannersColors:e.asoBannersColors,change:e.change,elements:e.form.elements,organizationId:n,prefix:"formRegister.userInfo.fields.",values:e.values.formRegister.userInfo.fields})}),r&&e.event&&(0,i.jsxs)(AE,{heading:h(e.form.slotTitle)?e.form.slotTitle:t("disponibilit_s_49923"),children:[h(e.form.slotSubtitle)&&(0,i.jsx)(vp,{text:e.form.slotSubtitle}),e.areSectionsDisabled?.isWishedAssignmentsDisabled?(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t("no_longer_modif_99663")}),(0,i.jsx)(th,{children:t("you_are_already_assigned_to_missions")})]}):(0,i.jsx)(tx,{blockedSlots:e.blockedSlots,change:e.change,currentSlots:e.values.formRegister.slots,customSlotsPeriods:e.form.customSlotsPeriods,daysDisplay:e.form.daysDisplay,elements:e.form.elements,event:e.event,prefix:"formRegister.",slotDisplay:e.form.slotDisplay,userInfoFields:m})]}),d&&e.event&&(0,i.jsxs)(AE,{heading:h(e.form.positionTitle)?e.form.positionTitle:t("missions_souhai_23225"),children:[h(e.form.positionSubtitle)&&(0,i.jsx)(vp,{text:e.form.positionSubtitle}),e.areSectionsDisabled?.isWishedAssignmentsDisabled?(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t("no_longer_modif_99663")}),(0,i.jsx)(th,{children:t("you_are_already_assigned_to_missions")})]}):(0,i.jsx)(z_,{change:e.change,event:e.event,options:e.form,positionsCategoriesIds:e.values.formRegister.positionsCategoriesIds,positionsIds:e.values.formRegister.positionsIds,positionsSlotsIds:e.values.formRegister.positionsSlotsIds,prefix:"formRegister.",slots:e.values.formRegister.slots,userInfoFields:m})]}),c&&e.event&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(AE,{heading:h(e.form.accreditationTitle)?e.form.accreditationTitle:t("accr_ditations_74375"),children:[h(e.form.accreditationSubtitle)&&(0,i.jsx)(vp,{text:e.form.accreditationSubtitle}),e.areSectionsDisabled?.isWishedAccreditationsDisabled?(0,i.jsxs)(Jg,{alertStyle:"warning",children:[(0,i.jsx)(eh,{children:t("no_longer_modif_99663")}),(0,i.jsx)(th,{children:t("you_are_already_assigned_to_accreditations")})]}):(0,i.jsx)(g_,{accreditationProfileId:e.values.formRegister.accreditationProfileId,accreditationsSlotsIds:e.values.formRegister.accreditationsSlotsIds,alreadyAssignedProfileId:e.alreadyAssignedProfileId,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,change:e.change,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles??z,delegationAccreditationsSlots:e.delegationAccreditationsSlots??z,displayFormCustomFields:!0,event:e.event,options:e.form,prefix:"formRegister.",scannedSlotsIds:u,showAutoAccredit:e.showAutoAccredit,slots:e.values.formRegister.slots,userInfosFields:m})]})})]})},ME=e=>{const{params:{delegationId:t},translate:n}=zg(),a=bi(vu),s=bi(Ll),o=(0,l.useRef)(null),r=e.form,d=(0,l.useMemo)(()=>r.elements.filter(e=>e.elementType===Be.Field),[r.elements]),c=(0,l.useMemo)(()=>s.formRegisterSchema(d,{...r,eventStartDate:e.event?.startAt??wa.c9.now(),eventEndDate:e.event?.endAt??wa.c9.now(),delegationId:t,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles||[],areSectionsDisabled:e.areSectionsDisabled}),[t,d,r,e.areSectionsDisabled,e.delegationAccreditationsProfiles,e.event]),u=(0,l.useCallback)(e=>a.validateForForm(c)(e),[c]);return(0,i.jsxs)($,{ref:o,direction:"column",gap:"7",children:[(0,i.jsx)(ga,{color:"invisible",leftIcon:"arrow-left",onClick:e.handleRedirect,children:n("retour_92202")}),e.header,(0,i.jsx)(rh,{customErrorRef:o,direction:"column",gap:"6",initialValues:e.initialValues,render:({form:{change:t},submitting:a,values:s,handleSubmit:o})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ah,{featureFlags:e.featureFlags,hideSpacer:!0}),(0,i.jsx)(TE,{alreadyAssignedProfileId:e.alreadyAssignedProfileId,alreadyAssignedSlotsIds:e.alreadyAssignedSlotsIds,areSectionsDisabled:e.areSectionsDisabled,asoBannersColors:e.asoBannersColors,blockedSlots:e.blockedSlots,change:t,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,disabled:e.disabled,event:e.event,form:e.form,organization:e.organization,showAutoAccredit:!1,showEmail:e.showEmail,userInfo:e.userInfo,values:s}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(ga,{isLoading:a,onClick:o,children:e.isUpdate?n("enregistrer_06519"):n("cr_er_le_membre_78743")}),(0,i.jsx)(ga,{color:"white",onClick:e.handleRedirect,children:n("annuler_48254")})]})]}),validate:u,width:1,onSubmit:async t=>{await e.mutate(t.email,t.formRegister),e.reload(),e.handleRedirect()}})]})},RE=e=>{const{params:{organizationId:t,delegationId:n},translate:a}=zg(),s=bi(Ll),{mutate:o}=Es(),r=(0,l.useMemo)(()=>({email:"",formRegister:s.formRegisterInputDefault(Ge.DelegationsSpace,null,e.customFields,{countryCode:e.country,delegationAccreditationsSlots:e.delegationAccreditationsSlots,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null})}),[e.customFields]),d=(0,l.useCallback)((i,a)=>o({organizationId:t,eventId:e.eventId,delegationId:n,formId:e.form.id,email:i,formRegister:a}),[]);return(0,i.jsx)(ME,{alreadyAssignedProfileId:null,alreadyAssignedSlotsIds:z,asoBannersColors:e.asoBannersColors,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,event:e.event,form:e.form,handleRedirect:e.handleRedirect,header:(0,i.jsx)($i,{font:"gray800 textLg bold",children:a("cr_ation_d_un_m_98624")}),initialValues:r,isUpdate:!1,mutate:d,organization:e.organization,reload:e.reload,showEmail:e.showEmail})},DE=e=>{const{params:{organizationId:t,eventId:n,delegationId:a,formId:s,userInfoId:o},translate:r}=zg(),d=bi(Ll),{mutate:c}=Rs(),{mutate:u}=function(e={}){return Ti("mutation UserInfoUpdate(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId\n $userId: UserId!\n $userInfo: UsersInfoInput!\n $filledFormsIds: [FormId!]\n $memberSpaceFormId: FormId\n $formKeyToTeamCode: JSON\n) {\n userInfoUpdate(\n organizationId: $organizationId\n eventId: $eventId\n delegationId: $delegationId\n userId: $userId\n userInfo: $userInfo\n filledFormsIds: $filledFormsIds\n formKeyToTeamCode: $formKeyToTeamCode\n memberSpaceFormId: $memberSpaceFormId\n ) {\n id\n }\n}\n",e)}(),{mutate:m}=function(e={}){return Ti("mutation UserInfoSlotsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoSlots: [UserInfoSlotsInput!]!\n) {\n userInfoSlotsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoSlots: $userInfoSlots\n )\n}\n",e)}(),{mutate:g}=function(e={}){return Ti("mutation UserInfoPositionsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoPositions: [UserInfoPositionsInput!]!\n) {\n userInfoPositionsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoPositions: $userInfoPositions\n )\n}\n",e)}(),{mutate:h}=function(e={}){return Ti("mutation UserInfoAccreditationsUpdate(\n $eventId: EventId!\n $userId: UserId\n $delegationId: DelegationId\n $userInfoId: UsersInfoId!\n $userInfoAccreditations: [UserInfoAccreditationsInput!]!\n) {\n userInfoAccreditationsUpdate(\n eventId: $eventId\n userId: $userId\n delegationId: $delegationId\n userInfoId: $userInfoId\n userInfoAccreditations: $userInfoAccreditations\n )\n}\n",e)}(),p=(0,l.useMemo)(()=>{const t=(e.form.elements??[]).flatMap(e=>e.elementType===Be.Field?[e.customField]:[]),n=(e.event?.accreditationsCategories??[]).flatMap(e=>e.accreditations.flatMap(e=>e.formCustomFields.map(({customField:e})=>e)));return t.concat(n)},[e.form,e.event]),f=(0,l.useMemo)(()=>({email:e.userInfo.email,formRegister:{...d.formRegisterInputDefault(Ge.DelegationsSpace,e.userInfo,p,{countryCode:e.country,eventStartDate:e.event?.startAt,forOther:!0,sendNotificationEmail:!1,slotDisplay:e.form.slotDisplay,team:null}),positionsSlotsIds:e.userInfo.formUserInfo.positionsSlotsIds,positionsIds:e.userInfo.formUserInfo.positionsIds,positionsCategoriesIds:e.userInfo.formUserInfo.positionsCategoriesIds,accreditationProfileId:e.userInfo.formUserInfo.accreditationProfileId,accreditationsSlotsIds:e.userInfo.formUserInfo.accreditationsSlotsIds.concat(e.delegationAccreditationsSlots?.filter(e=>e.isDefault).map(e=>e.accreditationSlotId)??[]),slots:e.userInfo.formUserInfo.slots.map(e=>({startDate:e.startDate,startTime:e.startTime,endDate:e.endDate,endTime:e.endTime}))}}),[e.userInfo,e.country,e.form,e.event,p]),I=(0,l.useCallback)(async(i,r)=>(i!==e.userInfo.email&&await c({organizationId:t,eventId:n,delegationId:a,userInfoId:o,email:i}),e.disabled||await u({organizationId:t,eventId:n,delegationId:a,userId:e.userInfo.userId,userInfo:r.userInfo}),n&&e.form.slotDisplay!==At.Hide&&await m({eventId:n,delegationId:a,userId:e.userInfo.userId,userInfoId:o,userInfoSlots:[{formId:s,slots:r.slots}]}),n&&e.form.positionDisplay!==vt.None&&await g({eventId:n,delegationId:a,userId:e.userInfo.userId,userInfoId:o,userInfoPositions:[{formId:s,positionsCategoriesIds:r.positionsCategoriesIds,positionsIds:r.positionsIds,positionsSlotsIds:r.positionsSlotsIds}]}),n&&await h({eventId:n,delegationId:a,userId:e.userInfo.userId,userInfoId:o,userInfoAccreditations:[{formId:s,accreditationProfileId:r.accreditationProfileId,accreditationsSlotsIds:r.accreditationsSlotsIds}]}),!0),[e.userInfo,e.form]);return(0,i.jsx)(ME,{alreadyAssignedProfileId:e.userInfo.formUserInfo.accreditationProfileId,alreadyAssignedSlotsIds:e.userInfo.formUserInfo.accreditationsSlotsIds,areSectionsDisabled:e.areSectionsDisabled,asoBannersColors:e.asoBannersColors,blockedSlots:e.blockedSlots,delegationAccreditationsProfiles:e.delegationAccreditationsProfiles,delegationAccreditationsSlots:e.delegationAccreditationsSlots,disabled:e.disabled,event:e.event,featureFlags:e.featureFlags,form:e.form,handleRedirect:e.handleRedirect,header:(0,i.jsx)(AE,{hideHeader:!0,children:(0,i.jsxs)($,{align:"center",gap:"3",children:[(0,i.jsx)(Vp,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:64}),(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)($i,{font:"gray500 textXs medium",children:r("mise_jour_des_00596")}),(0,i.jsx)($i,{font:"gray800 textXl bold",children:e.userInfo.name})]})]})}),initialValues:f,isUpdate:!0,mutate:I,organization:e.organization,reload:e.reload,showEmail:e.showEmail,userInfo:e.userInfo})},OE=e=>{const{history:t,params:{organizationId:n,eventId:a,delegationId:s,formId:o}}=zg(),{data:r,loader:d}=Ei("query DelegationsSpaceCreateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n ...OrganizationDelegationsSpace\n\n delegation(id: $delegationId) {\n eventId\n\n delegationCategory {\n banners(excludeFull: true) {\n bannerType\n }\n }\n\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n }\n}\n",{organizationId:n,eventId:a,delegationId:s,formId:o},[ka.OrganizationDelegationsSpaceFragment,ka.DelegationAccreditationProfileFragment,ka.DelegationAccreditationSlotFragment,ka.CreateUpdateMemberFormFragment,ka.EventCreateUpdateMemberFragment]),c=(0,l.useMemo)(()=>(r.organization?.delegation.form.elements??[]).flatMap(e=>e.elementType===Be.Field?[e.customField]:[]),[r.organization]),u=(0,l.useMemo)(()=>(r.organization?.delegation.delegationCategory.banners??[]).flatMap(e=>"number"==typeof e.bannerType?[e.bannerType]:[]),[r.organization]);return d||(0,i.jsx)(RE,{asoBannersColors:u,country:r.organization.event?.country,customFields:c,delegationAccreditationsProfiles:r.organization.delegation.accreditationsProfiles,delegationAccreditationsSlots:r.organization.delegation.accreditationsSlots,event:r.organization.event,eventId:r.organization.delegation.eventId,form:r.organization.delegation.form,organization:r.organization,handleRedirect:()=>t.goBack(Wc.DELEGATION({organizationId:n,eventId:a,delegationId:s})),reload:e.reload,showEmail:!0})},wE=e=>{const{history:t,params:{organizationId:n,eventId:a,delegationId:s,formId:o,userInfoId:r}}=zg(),{data:d,loader:c}=Ei("query DelegationsSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $delegationId: DelegationId!\n $formId: FormId!\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n ...OrganizationDelegationsSpace\n country\n\n delegation(id: $delegationId) {\n eventId\n\n delegationCategory {\n banners(excludeFull: true) {\n bannerType\n }\n }\n\n accreditationsProfiles {\n ...DelegationAccreditationProfile\n }\n\n accreditationsSlots(onlyVisible: true) {\n ...DelegationAccreditationSlot\n }\n\n form {\n ...CreateUpdateMemberForm\n }\n }\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoUpdateMember\n }\n }\n}\n",{organizationId:n,eventId:a,delegationId:s,formId:o,userInfoId:r},[ka.OrganizationDelegationsSpaceFragment,ka.DelegationAccreditationProfileFragment,ka.DelegationAccreditationSlotFragment,ka.CreateUpdateMemberFormFragment,ka.EventCreateUpdateMemberFragment,ka.UserInfoUpdateMemberFragment]),u=(0,l.useMemo)(()=>(d.organization?.delegation.delegationCategory.banners??[]).flatMap(e=>"number"==typeof e.bannerType?[e.bannerType]:[]),[d.organization]);return c||(0,i.jsx)(DE,{asoBannersColors:u,country:d.organization.event?.country??d.organization.country,delegationAccreditationsProfiles:d.organization.delegation.accreditationsProfiles,delegationAccreditationsSlots:d.organization.delegation.accreditationsSlots,event:d.organization.event,form:d.organization.delegation.form,organization:d.organization,handleRedirect:()=>t.goBack(Wc.DELEGATION({organizationId:n,eventId:a,delegationId:s})),reload:e.reload,showEmail:!0,userInfo:d.organization.userInfo})},PE=({inputName:e})=>{const t=Ai(),n=QI();return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{css:{gap:"$6","@tablet":{gap:"$4","> *":{flexGrow:1,width:"auto"}}},wrap:"wrap",children:[(0,i.jsx)(_h,{autoComplete:"given-name",label:t("pr_nom_66988"),name:`${e}fields.firstName`}),(0,i.jsx)(_h,{autoComplete:"family-name",label:t("last_name"),name:`${e}fields.lastName`})]}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(_h,{autoComplete:"email",isEmail:!0,label:t("e_mail_13869"),name:`${e}email`}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(HI,{autoComplete:"language",label:t("Language"),name:`${e}fields.language`,children:n(el)}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(OI,{label:t("Phone"),prefix:`${e}fields.phone.`})]})},$E=()=>{const{history:e,translate:t,params:{organizationId:n,eventId:a,delegationId:s}}=zg(),{data:o,loader:r}=Ei("query Profile($organizationId: OrganizationId!) {\n user {\n email\n language\n\n userInfo(organizationId: $organizationId) {\n id\n fields\n }\n }\n}\n",{organizationId:n},[]),l=bi(kl),d=bi(vu),{mutate:c,isLoading:u}=function(e={}){return Ti("mutation UserProfileUpdate(\n $userId: UserId!\n $userInfoId: UsersInfoId!\n $userInfo: UsersInfoEmailInput!\n) {\n userProfileUpdate(userId: $userId, userInfoId: $userInfoId, userInfo: $userInfo) {\n email\n language\n }\n}\n",e)}(),{user:m}=to(),g=Wc.DELEGATION({organizationId:n,eventId:a,delegationId:s}),h=(t=!1)=>t?e.goBack(g):e.push(g);return r||(0,i.jsx)(rh,{direction:"column",height:1,initialValues:{userInfo:l.userInfoProfileInputDefault(o.user)},render:({handleSubmit:e})=>(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ga,{color:"invisible",leftIcon:"arrow-left",onClick:()=>h(!0),children:t("retour_92202")}),(0,i.jsx)(Hg,{height:"4"}),(0,i.jsx)($i,{font:"gray800 textLg bold",children:t("mise_jour_du_49930")}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(ah,{}),(0,i.jsx)(vI,{accept:Kf.Images,acl:"public-read",allowCrop:!0,label:t("photo_de_profil_08618"),organizationId:n,prefix:"userInfo.fields.picture."}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsx)(PE,{inputName:"userInfo."}),(0,i.jsx)(Hg,{height:"6"}),(0,i.jsxs)($,{gap:"4",children:[(0,i.jsx)(ga,{isLoading:u,onClick:e,children:t("enregistrer_les_30411")}),(0,i.jsx)(ga,{color:"white",onClick:()=>h(!0),children:t("annuler_48254")})]})]}),validate:d.validateForForm(l.updateProfileSchema()),width:1,onSubmit:async e=>{const{userProfileUpdate:{email:t,language:n}}=await c({userId:m.id,userInfoId:o.user.userInfo.id,userInfo:e.userInfo});m.email!==t||m.language!==n?ms():h()}})},kE=()=>{const{params:{organizationId:e,eventId:t,delegationId:n}}=zg(),{data:a,loader:s,reload:o}=Ei('query DelegationsSpaceDelegation(\n $delegationId: DelegationId!\n $organizationId: OrganizationId!\n $eventId: EventId\n) {\n organization(id: $organizationId) {\n ...OrganizationDelegationsSpace\n\n event: eventMaybe(id: $eventId) {\n defaultDelegationsSpaceLayout {\n tabs {\n ...DelegationsSpaceLayoutTab\n }\n }\n\n delegationsSpaceDesign: spaceDesign(spaceType: DelegationSpace) {\n ...DesignColors\n\n logo {\n url\n }\n\n banner {\n url\n }\n }\n }\n\n delegations(level: Both, onlyVisibleInDelegation: true) {\n nodes {\n id\n name\n\n event {\n id\n name\n }\n }\n }\n\n delegation(id: $delegationId) {\n eventId\n formId\n parentId\n numberOfDelegationsAccreditationsSlots\n numberOfResources\n name\n columns\n state\n canLeadersAddMembers\n canLeadersEditMembers\n canLeadersDeleteMembers\n canLeadersDuplicateMembers\n canLeadersEditColumns\n canLeadersImportMembers\n canLeadersSeeHiddenAccreditationsSlots\n\n campaigns {\n id\n name\n }\n\n customDocuments {\n slug\n name\n }\n\n delegationsSpaceLayout {\n tabs {\n ...DelegationsSpaceLayoutTab\n }\n }\n\n event {\n name\n\n customDocuments {\n slug\n name\n }\n }\n }\n }\n\n user {\n ...UserPermissions\n\n userInfo(organizationId: $organizationId) {\n ...MemberRegistrationUserInfo\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n }\n }\n}\n',{delegationId:n,organizationId:e,eventId:t},[ka.OrganizationDelegationsSpaceFragment,ka.DelegationsSpaceLayoutTabFragment,ka.DesignColorsFragment,ka.UserPermissionsFragment,ka.MemberRegistrationUserInfoFragment]),r=(0,l.useMemo)(()=>{const e=a.organization?.delegations.nodes??[];return(0,i.jsx)(Vx,{delegations:e})},[a.organization]),d=(0,l.useMemo)(()=>a.organization?.delegation?.delegationsSpaceLayout?.tabs??a.organization?.event?.defaultDelegationsSpaceLayout?.tabs??z,[a.organization]);return(0,l.useEffect)(()=>{const e=a.organization?.delegation?.event?.name??a.organization?.name??"Recrewteer";document.title=(0,go.A)([e,a.organization?.delegation?.name]).join(" - ")},[a.organization]),s||(0,i.jsx)(Ux,{userPermissions:a.user,children:(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{path:[Wc.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId"}),Wc.DELEGATION_MEMBERS_IMPORT({organizationId:":organizationId",delegationId:":delegationId"})],children:(0,i.jsx)(bE,{})}),(0,i.jsx)(oo.qh,{children:(0,i.jsx)(qp,{extraItems:r,isLoading:!1,organization:a.organization,spaceDesign:{themeColors:a.organization?.event?.delegationsSpaceDesign?.colors??a.organization?.delegationsSpaceDesign?.colors,bannerSrc:a.organization?.event?.delegationsSpaceDesign?.banner?.url??a.organization?.delegationsSpaceDesign?.banner?.url,logoSrc:a.organization?.event?.delegationsSpaceDesign?.logo?.url??a.organization?.delegationsSpaceDesign?.logo?.url},children:(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{exact:!0,path:[Wc.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),Wc.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(qx,{delegationsSpaceLayoutTabs:d})}),(0,i.jsx)(oo.qh,{path:[Wc.MEMBERS_INVITE({organizationId:":organizationId",delegationId:":delegationId"}),Wc.MEMBERS_INVITE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(EE,{})}),(0,i.jsx)(oo.qh,{path:[Wc.MEMBER_EDIT({organizationId:":organizationId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"}),Wc.MEMBER_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",userInfoId:":userInfoId",formId:":formId"})],children:(0,i.jsx)(wE,{reload:o})}),(0,i.jsx)(oo.qh,{path:[Wc.MEMBER_CREATE({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),Wc.MEMBER_CREATE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId",formId:":formId"})],children:(0,i.jsx)(OE,{reload:o})}),(0,i.jsx)(oo.qh,{path:[Wc.DELEGATION_PROFILE({organizationId:":organizationId",delegationId:":delegationId"}),Wc.DELEGATION_PROFILE({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)($E,{})}),(0,i.jsx)(oo.qh,{path:[Wc.FIELDS_EDIT({organizationId:":organizationId",delegationId:":delegationId"}),Wc.FIELDS_EDIT({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(Wx,{})}),(0,i.jsx)(oo.qh,{children:(0,i.jsx)(VC,{allowDelegationSpaceDownload:a.organization.allowDelegationSpaceDownload,delegation:a.organization.delegation,delegationsSpaceCustomBadges:a.organization.delegationsSpaceCustomBadges,delegationsSpaceLayoutTabs:d,user:a.user})})]})})})]})})},NE=()=>(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{path:[Wc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),Wc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,i.jsx)(kE,{})}),(0,i.jsx)(oo.rd,{from:"/v2/organization/:organizationId/delegations",to:Mr(Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))})]}),zE=()=>(0,i.jsx)(wx,{children:(0,i.jsx)(NE,{})}),LE=()=>(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.rd,{exact:!0,from:Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),to:Rr(Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}))}),(0,i.jsx)(oo.qh,{path:Rr(Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,i.jsx)(Nx,{})}),(0,i.jsx)(oo.qh,{path:[Wc.DELEGATION({delegationId:":delegationId",organizationId:":organizationId"}),Wc.DELEGATION({delegationId:":delegationId",eventId:":eventId",organizationId:":organizationId"})],children:(0,i.jsx)(zE,{})})]}),FE=()=>(0,i.jsx)(wx,{children:(0,i.jsx)(LE,{})});function UE(e,t,n){const i=Ya.DateOnly.MonthLong;return t.equals(n)?e.toLocaleString(t,i):[e.toLocaleString(t,Ya.DateOnly.MonthShort),e.toLocaleString(n,Ya.DateOnly.MonthShort)].join(" - ")}function BE(e){switch(e){case Oe.Archived:case Oe.Done:return"error";case Oe.Ongoing:return"success";case Oe.Upcoming:return"purple";default:return tr()}}function VE(e,t){const n=wa.c9.now().setZone("utc",{keepLocalTime:!0}).startOf("day");return wa.IX.fromDateTimes(e.startOf("day"),t.endOf("day")).contains(n)?n:e}const GE=e=>{const t=Ai(),n=bi(gl);return(0,i.jsxs)($,{direction:"column",gap:"1",width:200,children:[(0,i.jsx)($i,{font:"gray500 textXs regular",children:t("date_de_l_v_ne_69973")}),(0,i.jsx)($i,{font:"gray800 textSm medium",children:UE(n,e.event.startAt,e.event.endAt)})]})},WE=e=>{const t=Ai();return(0,i.jsxs)($,{direction:"column",gap:"1",width:100,children:[(0,i.jsx)($i,{font:"gray500 textXs regular",children:t("State")}),(0,i.jsx)($,{children:(0,i.jsx)(jf,{color:BE(e.event.state),children:t(e.event.state)})})]})},qE=e=>(0,i.jsxs)($,{css:{alignItems:"center",padding:"$4",inlineSize:"100%",background:"$grayCustom50","@tablet":{maxInlineSize:"$containerTablet"},"@desktop":{maxInlineSize:"$container"}},direction:"column",gap:"7",children:[(0,i.jsx)(Lh,{}),(0,i.jsx)($,{css:{alignItems:"flex-start",alignSelf:"stretch"},direction:"column",gap:"6",children:e.children})]}),YE=j("div",{display:"flex",justifyContent:"center",alignItems:"center",background:"$grayCustom50",padding:"$10 $4 0 $4"}),HE=()=>(0,i.jsx)(YE,{children:(0,i.jsxs)(qE,{children:[(0,i.jsx)(Fh,{}),(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1})]})]})}),ZE=()=>{const{params:{organizationId:e,userInfoId:t},translate:n}=zg(),a=bp(),{data:s,isLoading:o,loader:r}=Ei('query MemberRegistrations($organizationId: OrganizationId!, $userInfoId: UsersInfoId!) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n }\n\n userInfo(id: $userInfoId) {\n email\n name\n firstName: fieldValue(slug: "firstName")\n lastName: fieldValue(slug: "lastName")\n\n picture {\n url\n }\n\n volunteersRegistrations {\n id\n isAccreditationsEmailSent\n isAssignmentsEmailSent\n\n event {\n id\n name\n range\n startAt\n endAt\n description\n state\n }\n\n positionsSlotsUsersInfos {\n id\n\n position {\n name\n }\n\n positionSlot {\n range\n }\n }\n\n accreditationsUsersInfos {\n id\n\n accreditationSlot {\n name\n date\n }\n\n accreditation {\n name\n acronym\n }\n\n accreditationCategory {\n name\n }\n }\n }\n }\n}\n',{organizationId:e,userInfoId:t},[ka.OrganizationMembersSpaceFragment]),d=(0,l.useMemo)(()=>s.userInfo?uu(e)?`${s.userInfo.firstName||""} ${s.userInfo.lastName||""}`.trim():s.userInfo.firstName||"":"",[s.userInfo]),c=Ci(),u=(0,l.useMemo)(()=>{const e=(s.userInfo?.volunteersRegistrations??[]).map(e=>({...e,accreditationsUsersInfos:s.organization?.hideAccreditationsUntilConfirmationEmailSent&&!e.isAccreditationsEmailSent?[]:e.accreditationsUsersInfos,positionsSlotsUsersInfos:s.organization?.hideAssignmentsUntilConfirmationEmailSent&&!e.isAssignmentsEmailSent?[]:e.positionsSlotsUsersInfos}));return(0,mo.A)(e,e=>-(e.event.range?.start?.toMillis()??e.event.startAt.toMillis()))},[s.userInfo,s.organization]);return r||(0,i.jsx)(Gg,{isLoading:o,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:e,skeleton:(0,i.jsx)(HE,{}),children:(0,i.jsx)(YE,{children:(0,i.jsxs)(qE,{children:[(0,i.jsx)(yp,{acceptCustomColours:!0,heading:(0,i.jsx)($i,{fontSize:"displayXs",fontWeight:"semiBold",children:n("bonjour_1_97713",d)}),subtitle:[...c(n("g_rer_et_visual_89310","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-grayCustom800)"},children:s.organization.name}))]}),(0,i.jsx)(yp,{heading:n("listes_des_v_n_07148"),subtitle:n("visualisez_tous_48942"),children:(0,i.jsxs)($,{direction:"column",gap:"8",children:[s.organization.showMembersSpaceCommunity&&(0,i.jsx)(Sp,{children:(0,i.jsx)(Ap,{button:(0,i.jsx)(ga,{featureFlags:{isV4:!0},to:Ng.MEMBER({organizationId:e,userInfoId:t}),children:n("voir_les_inform_25921")}),title:s.organization.name})}),F(u)&&(0,i.jsx)(Sp,{children:u.map(s=>(0,i.jsxs)(Ap,{button:(0,i.jsx)(ga,{featureFlags:{isV4:!0},to:Ng.MEMBER({organizationId:e,userInfoId:t,eventId:s.event.id}),children:n("voir_l_v_nemen_72358")}),subtitle:s.event.description,title:s.event.name,children:[(0,i.jsx)(GE,{event:s.event}),!a&&(0,i.jsx)(WE,{event:s.event})]},s.id))})]})})]})})})},KE=l.createContext({}),QE=e=>(0,i.jsx)(KE.Provider,{value:{},children:e.children}),XE=e=>{const{history:t,params:{organizationId:n,eventId:a,formId:s,userInfoId:o}}=zg(),{data:r,loader:d}=Ei("query MemberSpaceUpdateMember(\n $organizationId: OrganizationId!\n $eventId: EventId\n $formId: FormId!\n $delegationId: DelegationId # EventCreateUpdateMember expects $delegationId, so we have to add it to the params even if it's null and we don't use it\n $userInfoId: UsersInfoId!\n) {\n organization(id: $organizationId) {\n id\n name\n dateFormat\n datetimeFormat\n\n event: eventMaybe(id: $eventId) {\n ...EventCreateUpdateMember\n }\n\n userInfo(id: $userInfoId) {\n ...UserInfoUpdateMember\n\n volunteerRegistration(eventId: $eventId) {\n numberOfAssignments\n numberOfAccreditations\n\n positionsSlotsUsersInfos {\n positionSlot {\n range\n }\n }\n }\n }\n }\n\n organizationPublic(id: $organizationId) {\n ...OrganizationDelegationsSpace\n country\n }\n}\n",{organizationId:n,eventId:a,formId:s,userInfoId:o},[ka.EventCreateUpdateMemberFragment,ka.UserInfoUpdateMemberFragment,ka.OrganizationDelegationsSpaceFragment]),c=(0,l.useMemo)(()=>(r.organization?.userInfo.volunteerRegistration?.positionsSlotsUsersInfos??[]).map(e=>e.positionSlot.range),[r.organization?.userInfo.volunteerRegistration]);return d||(0,i.jsx)(DE,{areSectionsDisabled:{isWishedAccreditationsDisabled:r.organization.userInfo.volunteerRegistration?r.organization.userInfo.volunteerRegistration?.numberOfAccreditations>0:void 0,isWishedAssignmentsDisabled:r.organization.userInfo.volunteerRegistration?r.organization.userInfo.volunteerRegistration?.numberOfAssignments>0:void 0},blockedSlots:c,country:r.organization.event?.country??r.organizationPublic.country,disabled:!1===r.organization.userInfo.formUserInfo.form.isEditableInMemberSpace,event:r.organization.event,featureFlags:{isV4:!0},form:r.organization.userInfo.formUserInfo.form,organization:r.organization,handleRedirect:()=>t.goBack(Ng.MEMBER_FORMS({organizationId:n,eventId:a,userInfoId:o})),reload:e.reload,showEmail:!1,userInfo:r.organization.userInfo})},JE=e=>{const t=bi(gl),n=l.useMemo(()=>{const t=sf(e.aui.accreditation.color);return{background:t[50],color:t[700]}},[e.aui]);return(0,i.jsx)(i.Fragment,{children:e.renderAccreditation((0,i.jsxs)($,{css:{...n,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,i.jsxs)($,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,i.jsx)($i,{children:du(t,e.aui.accreditationSlot,"")}),e.aui.isAutoAccredit&&(0,i.jsx)($i,{fontSize:"textXs",children:(0,i.jsx)(ra,{icon:"bolt-auto"})})]}),(0,i.jsx)($i,{fontSize:"textXs",fontWeight:"medium",children:e.aui.accreditation.name})]}),e.aui.accreditation.id)})},eT=e=>{const t=vh(),n=l.useMemo(()=>(0,mo.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>!e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),Qp(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]),a=l.useMemo(()=>(0,mo.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(e=>e.accreditationSlot.date?.isValid),e=>[e.accreditationCategory.name.toLowerCase(),Qp(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.name.toLowerCase()]),[e.event]);return(0,i.jsxs)(dC,{css:e.featureFlags?.isV4?{bd:!0,overflow:"auto"}:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.event.endAt,minDate:e.event.startAt,children:[n.map(t=>(0,i.jsx)(lC,{children:(0,i.jsx)(JE,{aui:t,renderAccreditation:e.renderAccreditation})},t.id)),a.map(t=>(0,i.jsx)(lC,{endAt:t.accreditationSlot.date,startAt:t.accreditationSlot.date,children:(0,i.jsx)(JE,{aui:t,renderAccreditation:e.renderAccreditation})},t.id))]})},tT=e=>{const{translate:t,params:{organizationId:n,eventId:a,userInfoId:s}}=zg(),o=bi(gl),{mutate:r}=Ss(),{mutate:d}=function(e={}){return Ti("mutation AccreditationsSlotsUsersInfosCheckIn(\n $eventId: EventId!\n $checkIn: AccreditationSlotCheckInInput!\n) {\n accreditationsSlotsUsersInfosCheckIn(eventId: $eventId, checkIn: $checkIn)\n}\n",e)}(),c=(0,l.useMemo)(()=>du(o,e.aui.accreditationSlot,e.aui.accreditation.name),[e.aui]);return(0,i.jsxs)(px,{children:[(0,i.jsxs)(cx,{align:"center",gap:"3",children:[(0,i.jsx)(cf,{color:e.aui.accreditation.color,icon:e.aui.accreditation.icon}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)($i,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.aui.accreditationCategory.name}),(0,i.jsx)($h,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Pm.ACCREDITATION({organizationId:n,eventId:a,accreditationId:e.aui.accreditation.id}),children:(0,i.jsx)($i,{css:{ellipsis:!0},title:e.aui.accreditation.name,width:1,children:e.aui.accreditation.name})}),c!==e.aui.accreditation.name&&(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},title:c,width:1,children:c})]})]}),(0,i.jsxs)(cx,{align:"start",direction:"column",justify:"center",children:[e.aui.state===de.Waiting&&(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{color:"warning500",children:(0,i.jsx)(ra,{icon:"hourglass-empty",iconStyle:"solid"})}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("pas_encore_scan_88057")})]}),e.aui.state===de.CheckedIn&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{align:"center",gap:"1",children:[(0,i.jsx)($i,{color:"success500",children:(0,i.jsx)(ra,{icon:"badge-check",iconStyle:"solid"})}),(0,i.jsx)($i,{font:"gray800 textXs medium",children:t("scann_e_01567")})]}),(0,i.jsx)($i,{font:"gray500 textXs regular",children:e.aui.checkInAt?.isValid?o.toLocaleString(e.aui.checkInAt.toLocal(),Ya.DateTime):""})]})]}),(0,i.jsx)(cx,{children:e.aui.isAutoAccredit&&(0,i.jsx)($i,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(ra,{icon:"check"})})}),(0,i.jsx)(cx,{children:e.aui.isWorkflow&&(0,i.jsx)($i,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(ra,{icon:"check"})})}),(0,i.jsx)(cx,{children:e.aui.accreditationProfile?e.aui.accreditationProfile.name:"-"}),(0,i.jsxs)(cx,{align:"start",direction:"column",justify:"center",children:[(0,i.jsx)($i,{children:e.aui.createdBy?.name||e.aui.createdBy?.email||"-"}),(0,i.jsx)($i,{color:"gray500",children:o.toLocaleString(e.aui.insertedAt.toLocal(),Ya.DateTime)})]}),e.canMemberAccredit&&(0,i.jsxs)(_j,{justify:"end",width:200,children:[e.aui.state===de.Waiting&&(0,i.jsx)(ga,{color:"white",size:"sm",onClick:async()=>{await d({eventId:e.aui.eventId,checkIn:{strategy:ce.CheckIn,accreditationsSlotsUsersInfosIds:[e.aui.id]}}),e.reload()},children:"Scanner"}),(0,i.jsx)(ib,{children:(0,i.jsx)(zp,{color:"red",icon:"trash-can",onClick:async()=>{await r({eventId:a,massAccredit:{accreditationsSlotsIds:[e.aui.accreditationSlot.id],selecteds:{ids:[s]},strategy:Je.Delete}}),e.reload()},children:t("d_saffecter_du_47122")})})]})]})},nT=e=>{const{translate:t}=zg(),n=(0,l.useMemo)(()=>(0,mo.A)(e.event.volunteerRegistration.accreditationsUsersInfos.filter(t=>!e.selectedDay?.isValid||!!t.accreditationSlot.date?.isValid&&t.accreditationSlot.date.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()),e=>[e.accreditationCategory.name.toLowerCase(),Qp(e.accreditation.index),e.accreditation.name.toLowerCase(),e.accreditationSlot.date?.toMillis()??1,e.accreditationSlot.name.toLowerCase()]),[e.event,e.selectedDay]);return(0,i.jsxs)(fx,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,i.jsxs)(mx,{children:[(0,i.jsx)(ux,{children:t("Accreditation")}),(0,i.jsx)(ux,{children:t("scann_e_le_27812")}),(0,i.jsx)(ux,{children:t("affect_e_automa_74071")}),(0,i.jsx)(ux,{children:t("ajout_via_une_69544")}),(0,i.jsx)(ux,{children:t("ajout_via_un_p_85925")}),(0,i.jsx)(ux,{children:t("ajout_e_par_71330")}),e.canMemberAccredit&&(0,i.jsx)(ux,{width:200})]}),n.map(t=>(0,i.jsx)(tT,{aui:t,canMemberAccredit:e.canMemberAccredit,reload:e.reload},t.id))]})},iT=e=>{const{translate:t}=zg(),[n,a]=l.useState(VE(e.event.startAt,e.event.endAt)),[s,o]=l.useState(null);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,overflow:"hidden",padding:e.featureFlags?.isV4?"$6 $7 $7 $7":void 0},direction:"column",gap:e.featureFlags?.isV4?"6":void 0,justify:"center",children:[(0,i.jsxs)($,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,i.jsxs)($i,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Xg,{children:e.title}),e.subtitle&&(0,i.jsx)(N,{textStyle:"subtitle",children:e.subtitle})]}),(0,i.jsxs)($,{as:"nav",gap:"3",children:["calendar"===e.accreditationsDisplay&&(0,i.jsx)(oC,{max:e.event.endAt,min:e.event.startAt,value:n,onChange:a}),"list"===e.accreditationsDisplay&&!e.hideListView&&(0,i.jsx)($i,{width:160,children:(0,i.jsx)(Gf,{rightIcon:"xmark",value:s,onChange:o,onRightIconClick:()=>o(null)})}),!e.hideListView&&e.setAccreditationsDisplay&&(0,i.jsx)($i,{width:200,children:(0,i.jsxs)(YI,{value:e.accreditationsDisplay,onChange:e.setAccreditationsDisplay,children:[(0,i.jsx)("option",{value:"calendar",children:t("Calendar")}),(0,i.jsx)("option",{value:"list",children:t("List")})]})}),e.actions]})]}),"calendar"===e.accreditationsDisplay?(0,i.jsx)(eT,{event:e.event,featureFlags:e.featureFlags,renderAccreditation:e.renderAccreditation,selectedDay:n}):(0,i.jsx)(nT,{canMemberAccredit:e.canMemberAccredit,event:e.event,reload:e.reload,selectedDay:s})]})})};var aT=n(2096);const sT=(0,l.memo)(e=>{const t=(0,l.useCallback)(t=>{t&&(n.current&&(a.current?.setMap(null),n.current=null),n.current=new google.maps.Map(t,{zoom:e.coordinatesFieldsProps?.zoomProps.input.value??e.initialZoom??13,center:Io(e.center)||_o,gestureHandling:"cooperative",mapTypeControl:!1,streetViewControl:!1,mapTypeId:yo(e.layer),...e.mapOptions||{}}),n.current.mapTypes.set(Xe.IgnPlan,new google.maps.ImageMapType({getTileUrl:(e,t)=>((e,t)=>`https://data.geopf.fr/wmts?${["REQUEST=GetTile","SERVICE=WMTS","VERSION=1.0.0","STYLE=normal","TILEMATRIXSET=PM",`FORMAT=${encodeURIComponent("image/png")}`,"LAYER=GEOGRAPHICALGRIDSYSTEMS.PLANIGNV2",`TILEMATRIX=${t}`,`TILEROW=${e.y}`,`TILECOL=${e.x}`].join("&")}`)(e,t),tileSize:new google.maps.Size(256,256),name:Xe.IgnPlan,maxZoom:18})),n.current.addListener("zoom_changed",()=>{e.coordinatesFieldsProps&&e.coordinatesFieldsProps.zoomProps.input.onChange(n.current.getZoom())}),n.current.addListener("tilesloaded",()=>{e.onTilesloaded?.()}),o())},[]),n=(0,l.useRef)(null),a=(0,l.useRef)(null),s=(0,l.useRef)([]),o=()=>{s.current.forEach(e=>e.setMap(null)),F(e.traces)?s.current=e.traces.map(e=>{const t=e.points.map(([e,t])=>({lat:e,lng:t})),i=e.direction===kt.None?[]:[{icon:{path:e.direction===kt.Backward?google.maps.SymbolPath.BACKWARD_OPEN_ARROW:google.maps.SymbolPath.FORWARD_OPEN_ARROW,scale:4,strokeColor:e.color},offset:"0%",repeat:"200px"}],a=new google.maps.Polyline({path:t,geodesic:!0,strokeColor:e.color,strokeOpacity:1,strokeWeight:4,icons:i});return a.setMap(n.current),a}):s.current=[]};return(0,l.useEffect)(()=>{(()=>{if(a.current&&a.current.setMap(null),e.point&&n.current){const t=Io(e.point);n.current.setCenter(t),a.current=new google.maps.Marker({position:t,map:n.current,draggable:"object"==typeof e.coordinatesFieldsProps&&null!==e.coordinatesFieldsProps}),e.coordinatesFieldsProps&&a.current.addListener("dragend",t=>{e.coordinatesFieldsProps?.latitudeProps.input.onChange(t.latLng.lat()),e.coordinatesFieldsProps?.longitudeProps.input.onChange(t.latLng.lng())})}})()},[JSON.stringify(e.point)]),(0,l.useEffect)(()=>{n.current?.setMapTypeId(yo(e.layer))},[e.layer]),(0,l.useEffect)(()=>{o()},[JSON.stringify(e.traces||[])]),(0,i.jsx)($i,{ref:t,height:1,width:1,children:e.coordinatesFieldsProps?.zoomProps&&(0,i.jsx)(aT.Yr,{name:e.coordinatesFieldsProps.zoomProps.input.name,children:e=>{n.current?.setZoom(e)}})})},ul.A);sT.displayName="Map";const oT=({children:e,...t})=>(0,i.jsx)(N,{as:"address",textStyle:"inherit",...t,children:e}),rT=e=>{const{params:{organizationId:t,eventId:n},translate:a}=zg(),{data:s,loader:o}=Ei("query AccreditationRightPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $accreditationId: AccreditationId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n accreditation(id: $accreditationId) {\n id\n name\n acronym\n color\n icon\n description\n address\n latitude\n longitude\n zoom\n layer\n }\n }\n }\n}\n",{organizationId:t,eventId:n,accreditationId:e.accreditationId},[]);return o||(s.organization.event?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(gS,{heading:(0,i.jsx)(Xg,{children:s.organization.event.accreditation.name}),id:e.labelId,leftIcon:oa(s.organization.event.accreditation.icon),leftIconColor:s.organization.event.accreditation.color,setIsOpen:e.setIsOpen}),(0,i.jsx)(hS,{children:(0,i.jsx)(yp,{children:(0,i.jsx)($,{direction:"column",gap:"6",children:s.organization.event.accreditation.description||ru(s.organization.event.accreditation)?(0,i.jsxs)(i.Fragment,{children:[s.organization.event.accreditation.description&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("description_58935")}),(0,i.jsx)(vp,{text:s.organization.event.accreditation.description})]}),ru(s.organization.event.accreditation)&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("localisation_38416")}),su(s.organization.event.accreditation)&&(0,i.jsx)(oT,{children:s.organization.event.accreditation.address}),ou(s.organization.event.accreditation)&&(0,i.jsx)($i,{height:380,width:1,children:(0,i.jsx)(sT,{initialZoom:s.organization.event.accreditation.zoom,layer:s.organization.event.accreditation.layer,point:xo(s.organization.event.accreditation)})})]})]}):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,title:a("il_n_y_a_aucun_10373")})})})})]}):(0,i.jsx)(jm,{}))},lT=e=>{const[t,n]=(0,l.useState)(!1),a=(0,ch.A)("rightpanel-");return(0,l.useEffect)(()=>(e.accreditationId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.accreditationId]),(0,i.jsx)(mS,{isOpen:t,labelId:a,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedAccreditationId(null),children:e.accreditationId&&(0,i.jsx)(rT,{accreditationId:e.accreditationId,labelId:a,setIsOpen:n})})},dT=e=>{const{params:{organizationId:t,eventId:n,userInfoId:a},translate:s}=zg(),{data:o,loader:r,reload:d}=Ei("query UserProfileAccreditations(\n $organizationId: OrganizationId!\n $eventId: EventId!\n $userInfoId: UsersInfoId!\n $excludeAccreditations: [AccreditationId!]\n) {\n organization(id: $organizationId) {\n hideAccreditationsUntilConfirmationEmailSent\n\n userInfo(id: $userInfoId) {\n formsUsersInfos(eventId: $eventId, level: Event) {\n accreditationsSlots {\n name\n date\n\n accreditation {\n id\n name\n index\n }\n\n accreditationCategory {\n name\n }\n }\n\n form {\n id\n name\n }\n }\n }\n }\n\n event(id: $eventId) {\n name\n dayStartTime\n startAt\n endAt\n hasFormWithAccreditationDisplay\n\n volunteerRegistration: volunteerRegistrationByUserInfoId(userInfoId: $userInfoId) {\n isAccreditationsEmailSent\n\n accreditationsUsersInfos(excludeAccreditations: $excludeAccreditations) {\n ...UserPanelAccreditationSlotUserInfo\n }\n }\n }\n}\n",{organizationId:t,eventId:n,userInfoId:a,excludeAccreditations:e.excludeAccreditations},[ka.UserPanelAccreditationSlotUserInfoFragment]);const[c,u]=(0,l.useState)(null),m=Ci(),g=(0,l.useMemo)(()=>(0,mo.A)(!o.organization?.hideAccreditationsUntilConfirmationEmailSent||o.organization?.hideAccreditationsUntilConfirmationEmailSent&&o.event?.volunteerRegistration.isAccreditationsEmailSent?o.event?.volunteerRegistration.accreditationsUsersInfos:[],e=>e.accreditationSlot.date?.toMillis()??0),[o.event,o.organization]),h=s("planning_de_vos_42899"),p=[...m(s("visualiser_l_in_46133","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:o.event?.name}))];return r||(0,i.jsxs)(i.Fragment,{children:[F(g)?(0,i.jsx)(iT,{accreditationsDisplay:"calendar",canMemberAccredit:!1,event:o.event,featureFlags:{isV4:!0},hideListView:!0,reload:()=>{d(),g.length<=1&&e.reloadHeader()},renderAccreditation:(e,t)=>(0,i.jsx)(ga,{color:"invisible",style:{width:"100%",padding:"unset"},onClick:()=>u(t),children:e}),subtitle:p,title:h}):(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,i.jsx)($,{align:"center",as:"header",gap:"4",children:(0,i.jsxs)($i,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Xg,{children:h}),p&&(0,i.jsx)(N,{textStyle:"subtitle",children:p})]})}),(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankHandGlobe,subtitle:s("ici_seront_affi_51536"),title:s("encore_un_peu_d_88675")})})]}),(0,i.jsx)(lT,{accreditationId:c,setDisplayedAccreditationId:u})]})},cT=e=>{const{translate:t,params:{eventId:n}}=zg(),a=bi(Wd),{mutate:s}=bs(),o=(0,l.useMemo)(()=>Za(),[]),[r,d]=(0,l.useState)(e.assignments.map(e=>({...e,checkInAt:e.checkInAt?.toLocal(),checkOutAt:e.checkOutAt?.toLocal()}))),c=(0,l.useMemo)(()=>r.every(e=>e.checkInAt?.isValid&&e.checkOutAt?.isValid&&e.checkOutAt>e.checkInAt||e.checkInAt?.isValid&&!e.checkOutAt?.isValid||!e.checkInAt?.isValid&&!e.checkOutAt?.isValid),[r]),u=(0,l.useCallback)((e,t,n)=>{d((0,sx.jM)(i=>{i.forEach(i=>{i.id===e&&(i[t]=n||void 0)})}))},[r,d]);return(0,i.jsx)(Ca,{isOpen:e.isOpen,onClose:e.onClose,children:(0,i.jsxs)(Aa,{children:[(0,i.jsx)(ba,{icon:"sliders",children:t("mettre_jour_d_54198")}),(0,i.jsx)(va,{gap:"4",children:r.map(e=>(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsxs)($i,{font:"gray800 textSm medium",children:[e.position.name," -"," ",(0,i.jsx)(Rb,{fontWeight:"regular",children:tu(a,e.positionSlot,"",{slot:{includeRange:!0}})})]}),(0,i.jsxs)($,{gap:"6",children:[(0,i.jsx)(qf,{rightIcon:"xmark",value:e.checkInAt,zone:o,onChange:t=>{u(e.id,"checkInAt",t)},onRightIconClick:()=>{u(e.id,"checkInAt",null)}}),(0,i.jsx)(qf,{rightIcon:"xmark",value:e.checkOutAt,zone:o,onChange:t=>{u(e.id,"checkOutAt",t)},onRightIconClick:()=>{u(e.id,"checkOutAt",null)}}),(0,i.jsx)(Ih,{shouldParseAsInt:!0,value:e.breakTime,onChange:t=>{u(e.id,"breakTime",t)}})]})]},e.id))}),(0,i.jsx)(ja,{children:(0,i.jsx)(ga,{disabled:!c,onClick:async()=>{await Promise.all(r.map(e=>s({eventId:n,checkIn:{strategy:ce.CheckInOut,breakTime:e.breakTime,checkInAt:e.checkInAt,checkOutAt:e.checkOutAt,positionsSlotsUsersInfosIds:[e.id]}}))),e.onClose(),e.onSuccess()},children:t("mettre_jour_85141")})})]})})},uT=e=>{const{translate:t}=zg(),n=bi(Wd),a=(0,l.useMemo)(()=>{const t=sf(e.psui.position.color);return{background:t[50],color:t[700]}},[e.psui]);return(0,i.jsx)(i.Fragment,{children:e.renderPosition((0,i.jsxs)($,{css:{...a,borderRadius:"$1",padding:"$1 $2"},direction:"column",gap:"1",justify:"center",width:1,children:[(0,i.jsxs)($,{align:"center",css:{fontSize:"10px"},gap:"1",children:[(0,i.jsxs)($,{direction:"column",gap:"1",children:[e.psui.positionSlot.name&&(0,i.jsx)($i,{children:e.psui.positionSlot.name}),(0,i.jsx)($i,{children:n.toDisplayString(e.psui.positionSlot.range,{hideDate:!0})})]}),e.psui.state===de.CheckedOut&&(0,i.jsx)(ra,{icon:"stopwatch",title:t("d_pointer_25328")}),e.psui.state===de.CheckedIn&&(0,i.jsx)(ra,{icon:"timer",title:t("pointer_80927")})]}),(0,i.jsx)($i,{fontSize:"textXs",fontWeight:"medium",children:e.psui.position.name})]}),e.psui.position.id)})},mT=e=>{const t=vh(),[n]=id(e.dayStartTime),a=(0,l.useMemo)(()=>function(e,t,n,i){const a=Math.ceil(n.endOf("day").diff(t.startOf("day"),"days").days),s=(0,Fd.A)(0,a).map(e=>t.startOf("day").set({hour:i}).plus({day:e}));return e.flatMap(e=>{const{start:t,end:n}=e.range,i=s.filter(e=>e>t&&e({...e,range:t}))})}(e.assignments.map(e=>({...e,range:e.positionSlot.range})),e.startAt,e.endAt,n),[e.assignments,e.startAt,e.endAt,n]);return(0,i.jsx)(dC,{css:e.featureFlags?.isV4?{bd:!0,overflow:"auto"}:{borderTop:"1px solid $gray200"},date:e.selectedDay,display:t?"week":"day",maxDate:e.endAt,minDate:e.startAt,children:a.map((t,a)=>(0,i.jsx)(lC,{endAt:t.range.start,startAt:t.range.start,startHour:n,children:(0,i.jsx)(uT,{psui:t,renderPosition:e.renderPosition,startHour:n})},a))})},gT=e=>{const{translate:t,params:{organizationId:n,eventId:a}}=zg(),{hasPermission:s}=Bx(),o=bi(gl),r=bi(Ld),d=bi(Wd),{mutate:c}=bs(),u=(0,l.useMemo)(()=>tu(d,e.psui.positionSlot,"",{slot:{includeRange:!0}}),[e.psui]),m=s(hd.MEMBER_ASSIGN),g=s(hd.POSITION_READ,{positionCategoryId:e.psui.positionCategoryId,positionId:e.psui.position.id});return(0,i.jsxs)(px,{children:[(0,i.jsxs)(cx,{align:"center",gap:"3",children:[(0,i.jsx)(cf,{color:e.psui.position.color,icon:e.psui.position.icon}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)($i,{color:"gray500",css:{fontSize:"11px",textTransform:"uppercase"},fontWeight:"medium",children:e.psui.positionCategory.name}),(0,i.jsx)($h,{css:{overflow:"hidden",width:"100%","& > a":{width:"100%"}},to:Fm.POSITION({organizationId:n,eventId:a,positionId:e.psui.position.id}),children:(0,i.jsx)($i,{css:{ellipsis:!0},title:e.psui.position.name,width:1,children:e.psui.position.name})}),(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},title:u,width:1,children:u})]})]}),(0,i.jsx)(cx,{children:e.psui.state===de.CheckedOut?(0,i.jsx)(jf,{leftIcon:"clock",children:t("temps_total_79448",r.minutesToHoursMinutesString(e.psui.timeDifferenceMinutes))}):e.psui.state===de.CheckedIn?(0,i.jsx)(jf,{color:"success",leftIcon:"circle",leftIconStyle:"solid",children:t("point_le_1_63576",o.toLocaleString(e.psui.checkInAt.toLocal(),Ya.DateTime))}):(0,i.jsx)(jf,{color:"warning",leftIcon:"circle",leftIconStyle:"solid",children:t("non_point_42145")})}),(0,i.jsx)(cx,{children:e.psui.isAutoAssign&&(0,i.jsx)($i,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(ra,{icon:"check"})})}),(0,i.jsx)(cx,{children:e.psui.isWorkflow&&(0,i.jsx)($i,{color:"success700",fontSize:"textMd",children:(0,i.jsx)(ra,{icon:"check"})})}),(0,i.jsxs)(cx,{align:"start",direction:"column",justify:"center",children:[(0,i.jsx)($i,{children:e.psui.createdBy?.name||e.psui.createdBy?.email||"-"}),(0,i.jsx)($i,{color:"gray500",children:o.toLocaleString(e.psui.insertedAt.toLocal(),Ya.DateTime)})]}),(0,i.jsxs)(_j,{justify:"end",width:200,children:[g&&(e.psui.state===de.Waiting?(0,i.jsx)(ga,{color:"white",size:"sm",onClick:async()=>{await c({eventId:e.psui.eventId,checkIn:{strategy:ce.CheckIn,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("pointer_80927")}):e.psui.state===de.CheckedIn?(0,i.jsx)(ga,{color:"white",size:"sm",onClick:async()=>{await c({eventId:e.psui.eventId,checkIn:{strategy:ce.CheckOut,positionsSlotsUsersInfosIds:[e.psui.id]}}),e.reload()},children:t("d_pointer_25328")}):null),(0,i.jsx)(ob,{canCheckIn:g,canDelete:m,psui:e.psui,reloadCheckIn:e.reload,onDelete:e.reload})]})]})},hT=e=>{const{translate:t}=zg(),{hasPermission:n}=Bx(),a=n(hd.POSITION_READ),s=(0,l.useMemo)(()=>e.assignments.filter(t=>!e.selectedDay?.isValid||t.positionSlot.range.contains(e.selectedDay)||t.positionSlot.range.start.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()||t.positionSlot.range.end.startOf("day").toMillis()===e.selectedDay.startOf("day").toMillis()),[e.assignments,e.selectedDay]);return(0,i.jsxs)(fx,{css:{borderTop:"1px solid $gray200"},hideBorder:!0,children:[(0,i.jsxs)(mx,{children:[(0,i.jsx)(ux,{children:t("Position")}),(0,i.jsx)(ux,{children:t("statut_du_point_52451")}),(0,i.jsx)(ux,{children:t("affect_e_automa_74071")}),(0,i.jsx)(ux,{children:t("ajout_via_une_69544")}),(0,i.jsx)(ux,{children:t("ajout_e_par_71330")}),a&&(0,i.jsx)(ux,{width:200})]}),s.map(t=>(0,i.jsx)(gT,{psui:t,reload:e.reload},t.id))]})},pT=e=>{const{params:{organizationId:t,eventId:n,userInfoId:a},translate:s}=zg(),[o,r]=(0,l.useState)(VE(e.event.startAt,e.event.endAt)),[d,c]=(0,l.useState)(null),[u,m]=(0,l.useState)(!1);return(0,i.jsxs)(i.Fragment,{children:[(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,overflow:"hidden",padding:e.featureFlags?.isV4?"$6 $7 $7 $7":void 0},direction:"column",gap:e.featureFlags?.isV4?"6":void 0,justify:"center",children:[(0,i.jsxs)($,{align:"center",as:"header",css:{padding:e.featureFlags?.isV4?void 0:"$5 $6"},gap:"4",children:[(0,i.jsxs)($i,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Xg,{children:e.title}),e.subtitle&&(0,i.jsx)(N,{textStyle:"subtitle",children:e.subtitle})]}),(0,i.jsxs)($,{as:"nav",gap:"3",children:["calendar"===e.positionsDisplay&&(0,i.jsx)(oC,{max:e.event.endAt,min:e.event.startAt,value:o,onChange:r}),"list"===e.positionsDisplay&&!e.hideListView&&(0,i.jsx)($i,{width:160,children:(0,i.jsx)(Gf,{rightIcon:"xmark",value:d,onChange:c,onRightIconClick:()=>c(null)})}),!e.hideListView&&e.setPositionsDisplay&&(0,i.jsx)($i,{width:200,children:(0,i.jsxs)(YI,{value:e.positionsDisplay,onChange:e.setPositionsDisplay,children:[(0,i.jsx)("option",{value:"calendar",children:s("Calendar")}),(0,i.jsx)("option",{value:"list",children:s("List")})]})}),e.canMemberAssign&&(0,i.jsx)(ga,{to:ig.EDIT_ASSIGNMENT(t,n,a),children:s("_diter_les_affe_42283")}),e.canMemberAssign&&(0,i.jsxs)(Rp,{children:[(0,i.jsx)(Up,{children:(0,i.jsx)(ga,{color:"white",leftIcon:"ellipsis-vertical"})}),(0,i.jsx)(Fp,{placement:"bottom-end",children:(0,i.jsx)(zp,{icon:"circle-check",onClick:()=>m(!0),children:s("mettre_jour_d_54198")})})]})]})]}),"calendar"===e.positionsDisplay?(0,i.jsx)(mT,{assignments:e.assignments,dayStartTime:e.event.dayStartTime,endAt:e.event.endAt,featureFlags:e.featureFlags,renderPosition:e.renderPosition,selectedDay:o,startAt:e.event.startAt}):!e.hideListView&&(0,i.jsx)(hT,{assignments:e.assignments,reload:e.reload,selectedDay:d})]}),cT&&(0,i.jsx)(cT,{assignments:e.assignments,isOpen:u,onClose:()=>m(!1),onSuccess:()=>e.reload()})]})},fT=l.createContext({});function IT(){return l.useContext(fT)}const _T=e=>(0,i.jsx)(i.Fragment,{children:e.children});_T.displayName="TabPanel";const xT=j(ga,{height:"auto",borderRadius:"initial",fontWeight:"$medium",paddingBlock:"$3",alignItems:"center",justifyContent:"center",flex:"1 0 0",variants:{selected:{true:{cursor:"inherit",color:"$primary500",borderBlockEnd:"2px solid $primary500"},false:{color:"$gray500",borderBlockEnd:"2px solid transparent","&:hover, &:focus-visible":{color:"$gray800"},"&:hover":{borderBlockEnd:"2px solid $gray200"}}}}}),yT={Root:({children:e,...t})=>{const[n,a]=l.useState(0);return(0,i.jsx)(fT.Provider,{value:{currentTab:n,setCurrentTab:a},children:(0,i.jsx)(mS,{...t,children:e})})},Header:({children:e,...t})=>{const[n,a]=l.useMemo(()=>(0,Kd.A)(l.Children.toArray(e),e=>l.isValidElement(e)&&e.type===yT.Tabs),[e]);return(0,i.jsxs)(gS,{...t,children:[a,n]})},Body:({children:e,...t})=>{const{currentTab:n}=IT(),a=l.useMemo(()=>l.Children.toArray(e).filter(e=>l.isValidElement(e)&&e.type===_T),[e]);return(0,i.jsx)(hS,{...t,children:a[n]})},Tabs:({children:e,...t})=>{const{currentTab:n,setCurrentTab:a}=IT(),s=l.useMemo(()=>l.Children.toArray(e).filter(e=>l.isValidElement(e)&&e.type===yT.Tab),[e]);return(0,i.jsx)($,{direction:"column",width:1,...w(t),children:(0,i.jsx)(yT.TabList,{children:s.map((e,t)=>(0,i.jsx)(xT,{color:"invisible",role:"tab",selected:n===t,onClick:()=>{a(t)},children:e},t))})})},Tab:e=>(0,i.jsx)($,{align:"center",css:{paddingBlock:"$4"},gap:"2",justify:"center",children:e.children}),TabList:e=>(0,i.jsx)($,{"aria-orientation":"horizontal",as:R.Nav,css:{borderBottom:"1px solid $gray200",alignItems:"stretch",alignContent:"center",justifyContent:"center",padding:"0 $6",gap:"$6",...e.css},role:"tablist",width:1,children:e.children}),TabPanel:_T},ST=({children:e,...t})=>(0,i.jsx)(N,{as:"abbr",textStyle:"abbreviation",...t,children:e}),jT=e=>(0,i.jsx)($i,{"aria-atomic":!0,"aria-live":"polite",css:{background:"white",borderBottom:"1px solid $gray200",borderLeft:"1px solid $gray200",borderRight:"1px solid $gray200",width:"100%",paddingBlock:"$6",...e.css},children:(0,i.jsx)(Tf,{...e})}),vT=e=>(0,i.jsx)($i,{"aria-atomic":!0,"aria-live":"polite",children:e.children}),bT=()=>(0,i.jsxs)($i,{"aria-busy":!0,children:[(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{})]}),AT=e=>{const{params:{organizationId:t,eventId:n},translate:a}=zg(),[s,o,r]=pA(""),[d,c]=l.useState(null),[u,m]=l.useState(0),{data:g,isLoading:p}=Ei("query PositionAssignedMembersTabPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n $name: String\n $limit: Int\n $offset: Int\n $sort: UsersInfosSort\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n assignedMembers(name: $name, limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n id\n ...UserInfoNameAndPicture\n }\n numberOfPages\n totalCount\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId,name:h(o)?o:void 0,offset:u,sort:d},[ka.UserInfoNameAndPictureFragment]);const{numberOfPages:f,totalCount:I}=nj(g.organization?.event?.position.assignedMembers),_=g.organization?.event;return(0,i.jsx)(i.Fragment,{children:(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(mb,{css:{width:"100%"},filters:(0,i.jsx)($i,{role:"search",width:320,children:(0,i.jsx)(Ih,{icon:"magnifying-glass",placeholder:a("rechercher_un_m_05904"),type:"search",value:s,onChange:r})}),headerCells:(0,i.jsx)(mx,{children:(0,i.jsx)(mj,{attribute:Ut.Name,setSort:c,sort:d,children:a("nom_complet_du_71872")})}),numberOfPages:f,offset:u,rows:p?(0,i.jsx)(bT,{}):F(_.position.assignedMembers.nodes)?(0,i.jsx)(vT,{children:_.position.assignedMembers.nodes.map(e=>(0,i.jsx)(px,{children:(0,i.jsx)(cx,{role:"gridcell",children:(0,i.jsx)(vj,{userInfo:{...e,email:""}})})},e.id))}):(0,i.jsx)(jT,{imageSrc:Ch.WeezeventBlankPerson,title:a("il_n_y_a_aucun_10373")}),setOffset:m,totalCount:I})})})},CT=e=>{const{params:{organizationId:t,eventId:n},translate:a}=zg(),{data:s,loader:o}=Ei("query PositionInformationTabPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n description\n range\n leaders {\n ...LeaderInfos\n }\n address\n latitude\n longitude\n zoom\n layer\n traces {\n ...Trace\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId},[ka.LeaderInfosFragment,ka.TraceFragment]);const r=bi(Wd),l=s.organization?.event;return(0,i.jsx)(yp,{children:o||!l||(l.position.description||l.position.range||F(l.position.leaders)||l.position.range||ru(l.position)?(0,i.jsxs)($,{direction:"column",gap:"6",children:[l.position.description&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("description_du_95106")}),(0,i.jsx)(vp,{text:l.position.description})]}),l.position.range&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("Date")}),(0,i.jsx)(N,{children:r.toComponents(l.position.range)})]}),F(l.position.leaders)&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("reponsable_82458_plural")}),l.position.leaders.map(e=>(0,i.jsx)($i,{children:(0,i.jsx)(vj,{areContactLinksEnabled:!0,showPhoneNumber:!0,size:40,userInfo:e.userInfo})},e.userInfo.id))]}),ru(l.position)&&(0,i.jsxs)($,{direction:"column",gap:"1",children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("localisation_38416")}),su(l.position)&&(0,i.jsx)(oT,{children:l.position.address}),ou(l.position)&&(0,i.jsx)($i,{height:380,width:1,children:(0,i.jsx)(sT,{initialZoom:l.position.zoom,layer:l.position.layer,point:xo(l.position),traces:l.position.traces})})]})]}):(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,title:a("il_n_y_a_aucun_10373")}))})},ET=e=>{const{params:{organizationId:t,eventId:n},translate:a}=zg(),{data:s,loader:o}=Ei("query PositionRightPanel(\n $organizationId: OrganizationId!\n $eventId: EventId\n $positionId: PositionId!\n) {\n organization: organizationPublic(id: $organizationId) {\n event(id: $eventId) {\n position(id: $positionId) {\n id\n name\n acronym\n color\n icon\n assignedMembers {\n totalCount\n }\n }\n }\n }\n}\n",{organizationId:t,eventId:n,positionId:e.positionId},[]);return o||(s.organization.event?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(yT.Header,{heading:(0,i.jsxs)(Xg,{children:[s.organization.event.position.name,h(s.organization.event.position.acronym)&&(0,i.jsx)(ST,{css:{marginInlineStart:"$2"},children:s.organization.event.position.acronym})]}),id:e.labelId,leftIcon:oa(s.organization.event.position.icon),leftIconColor:s.organization.event.position.color,setIsOpen:e.setIsOpen,children:(0,i.jsxs)(yT.Tabs,{css:{},height:1,children:[(0,i.jsx)(yT.Tab,{children:a("informations_22954")}),(0,i.jsx)(yT.Tab,{children:a("membres_affect_76655",s.organization.event.position.assignedMembers.totalCount)})]})}),(0,i.jsxs)(yT.Body,{children:[(0,i.jsx)(yT.TabPanel,{children:(0,i.jsx)(CT,{positionId:e.positionId})}),(0,i.jsx)(yT.TabPanel,{children:(0,i.jsx)(AT,{positionId:e.positionId})})]})]}):(0,i.jsx)(jm,{}))},TT=e=>{const[t,n]=(0,l.useState)(!1),a=(0,ch.A)("rightpanel-");return(0,l.useEffect)(()=>(e.positionId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.positionId]),(0,i.jsx)(yT.Root,{isOpen:t,labelId:a,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedPositionId(null),children:e.positionId&&(0,i.jsx)(ET,{labelId:a,positionId:e.positionId,setIsOpen:n})})},MT=e=>{const{params:{organizationId:t,eventId:n,userInfoId:a},translate:s}=zg(),{data:o,loader:r,reload:d}=As({organizationId:t,eventId:n,userInfoId:a}),[c,u]=(0,l.useState)(null),m=Ci(),g=(0,l.useMemo)(()=>(0,mo.A)(!o.organization?.hideAssignmentsUntilConfirmationEmailSent||o.organization?.hideAssignmentsUntilConfirmationEmailSent&&o.event?.volunteerRegistration.isAssignmentsEmailSent?o.event?.volunteerRegistration.positionsSlotsUsersInfos:[],e=>e.positionSlot.range.start.toMillis()),[o.event,o.organization]),h=s("planning_de_vos_51737"),p=[...m(s("visualisez_l_in_88697","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:o.event?.name}))];return r||(0,i.jsxs)(i.Fragment,{children:[F(g)?(0,i.jsx)(pT,{assignments:g,canMemberAssign:!1,event:o.event,featureFlags:{isV4:!0},hideListView:!0,positionsDisplay:"calendar",reload:()=>{d(),g.length<=1&&e.reloadHeader()},renderPosition:(e,t)=>(0,i.jsx)(ga,{color:"invisible",style:{width:"100%",padding:"unset",blockSize:"fit-content"},onClick:()=>u(t),children:e}),subtitle:p,title:h}):(0,i.jsxs)($,{as:"section",css:{background:"white",bd:!0,padding:"$6 $7 $7 $7"},direction:"column",gap:"6",justify:"center",children:[(0,i.jsx)($,{align:"center",as:"header",gap:"4",children:(0,i.jsxs)($i,{as:"hgroup",css:{flex:"1"},children:[(0,i.jsx)(Xg,{children:h}),p&&(0,i.jsx)(N,{textStyle:"subtitle",children:p})]})}),(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:s("ici_seront_affi_69159"),title:s("encore_un_peu_d_88675")})})]}),c&&(0,i.jsx)(TT,{positionId:c,setDisplayedPositionId:u})]})},RT=e=>{const t=Ai(),n=bp(),a=bh(),s=bi(qd),o=l.useMemo(()=>{try{return s.getFormatter()}catch{return null}},[]);return(0,i.jsxs)($,{align:"center",css:{boxShadow:"$xs",padding:"$4",flex:"1",blockSize:"100%"},gap:"4",children:[!n&&(0,i.jsx)($,{align:"center",css:{background:"$gray100",borderRadius:"$2",color:"$gray700"},height:40,justify:"center",width:40,children:(0,i.jsx)(ra,{icon:"file-lines"})}),(0,i.jsxs)($,{css:{flex:"1"},direction:"column",children:[(0,i.jsx)(Xg,{css:{lineBreak:"anywhere",whiteSpace:"normal"},textStyle:"subheading",children:e.document.name}),(0,i.jsxs)($,{css:{ellipsis:!0},direction:n?"column":"row",gap:n?void 0:"1",children:[e.subtitle&&(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(N,{textStyle:"subtitle",children:[e.subtitle,!n&&" | "]})}),(0,i.jsx)(N,{textStyle:"subtitle",children:o&&"number"==typeof e.document.size&&e.document.size>0&&o.format(e.document.size).replace(/^([\d,.]+)/,"$1 ")})]})]}),(0,i.jsx)(ga,{color:"white",download:!0,leftIcon:"arrow-down-to-bracket",target:"_blank",to:e.document.url,children:a&&t("t_l_charger_03283")})]})},DT=e=>{const{params:{organizationId:t,userInfoId:n},translate:a}=zg(),s=bi(gl),o=(0,l.useCallback)(e=>{e&&(e.onload=()=>{const t=e.contentDocument.body.scrollHeight;e.style.height=`${t}px`,e.contentDocument.body.style.margin="0",e.contentDocument.body.style.overflow="hidden",e.parentElement.style.height=`${t+64}px`})},[]),r=Ci(),{data:d,loader:c}=Ei("query CampaignRightPanel(\n $organizationId: OrganizationId!\n $userInfoId: UsersInfoId!\n $campaignId: CampaignId!\n) {\n organization(id: $organizationId) {\n userInfo(id: $userInfoId) {\n campaign(id: $campaignId) {\n id\n name\n sentAt\n campaignType\n subject\n text\n preview(userInfoId: $userInfoId)\n\n documents {\n ...DocumentEmailPreview\n }\n\n emailSender {\n fromEmail\n fromName\n }\n createdBy {\n email\n name\n nameOrEmail\n }\n }\n }\n }\n}\n",{organizationId:t,userInfoId:n,campaignId:e.campaignId},[ka.DocumentEmailPreviewFragment]);const u=d.organization?.userInfo.campaign.sentAt?.setZone(wa.c9.local().zone);return c||(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(gS,{heading:(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Xg,{children:d.organization.userInfo.campaign.name}),(0,i.jsx)(N,{textStyle:"subtitle",children:[...r(a("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(Bd,{dateTime:u,children:s.toLocaleString(u,Ya.DateTime)}),(0,i.jsx)($h,{to:`mailto:${d.organization.userInfo.campaign.createdBy.email}?subject=${encodeURIComponent(a("re_1_84422",d.organization.userInfo.campaign.subject))}`,children:d.organization.userInfo.campaign.createdBy?.nameOrEmail}))]})]}),id:e.labelId,leftIcon:d.organization.userInfo.campaign.campaignType===re.Email?"at":"message",leftIconColor:"black",setIsOpen:e.setIsOpen}),(0,i.jsx)(hS,{css:{blockSize:"100%",backgroundColor:"$gray100"},children:(0,i.jsx)($,{css:{background:"white",borderRadius:"$2",boxShadow:"$md",inlineSize:"100%"},direction:"column",gap:"3",children:(0,i.jsxs)($,{css:{background:"$gray200",borderRadius:"$2",padding:"$7"},direction:"column",gap:"6",children:[(0,i.jsx)($i,{css:{padding:0,minBlockSize:"300px",marginBlockStart:"$3",blockSize:"fit-content !important","& iframe":{background:"white",border:"none",borderRadius:"$2",overflow:"hidden",inlineSize:"100%"}},children:(0,i.jsx)("iframe",{ref:o,srcDoc:d.organization.userInfo.campaign.preview})}),F(d.organization.userInfo.campaign.documents)&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(Xg,{textStyle:"subheading",children:a("pi_ces_jointes_36761")}),(0,i.jsx)(yp,{css:{padding:0},children:(0,i.jsx)($,{direction:"column",children:d.organization.userInfo.campaign.documents.map(e=>(0,i.jsx)(RT,{document:e},e.id))})})]})]})})})]})},OT=e=>{const[t,n]=(0,l.useState)(!1),a=(0,ch.A)("rightpanel-");return(0,l.useEffect)(()=>(e.campaignId&&!t?n(!0):n(!1),()=>{n(!1)}),[e.campaignId]),(0,i.jsx)(mS,{isOpen:t,labelId:a,setIsOpen:n,size:"md",onClose:()=>e.setDisplayedCampaignId(null),children:e.campaignId&&(0,i.jsx)(DT,{campaignId:e.campaignId,labelId:a,setIsOpen:n})})},wT=e=>{const{translate:t}=zg(),n=bp(),a=Ci(),s=bi(gl),o=e.campaign.email?.sentAt??e.campaign.sentAt?.setZone(wa.c9.local().zone)??wa.c9.now();return(0,i.jsxs)(px,{css:{"&:hover":{background:"$gray100"}},onMouseLeave:e=>{Tp(e.target)},children:[(0,i.jsx)(cx,{css:{flex:"1"},children:(0,i.jsxs)($,{direction:"column",width:1,children:[(0,i.jsx)(Xg,{css:{ellipsis:!0,fontSize:"$textSm"},textStyle:"subheading",children:e.campaign.name}),(0,i.jsx)(N,{css:{ellipsis:!0},textStyle:"subtitle",children:[...a(t("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(Bd,{dateTime:o,children:s.toLocaleString(o,n?Ya.ShortDateTime:Ya.DateTime)}),(0,i.jsx)($h,{to:`mailto:${e.campaign.createdBy.email}?subject=${encodeURIComponent(t("re_1_84422",e.campaign.subject))}`,children:e.campaign.createdBy.nameOrEmail}))]})]})}),(0,i.jsxs)(cx,{css:{flex:n?"0 50px":"0 150px"},children:[(0,i.jsx)($i,{width:22,children:e.campaign.campaignType===re.Email?(0,i.jsx)(ra,{icon:"at"}):(0,i.jsx)(ra,{icon:"message"})}),!n&&e.campaign.campaignType]}),(0,i.jsx)(cx,{css:{flex:"0 200px"},justify:"end",children:(0,i.jsx)(ga,{color:"white",textAlign:"center",onClick:()=>e.setDisplayedCampaignId(e.campaign.id),children:t("lire_le_message_68344")})})]})},PT=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=zg(),s=bp(),[o,r]=(0,l.useState)(null),[d,c]=(0,l.useState)(25),[u,m]=(0,l.useState)(0),g=(0,l.useCallback)(()=>{m(0)},[m]),h=(0,l.useCallback)(e=>{c(e),g()},[c,g]),{data:p,isLoading:f,loader:I}=Ei("query UserCampaigns(\n $organizationId: OrganizationId!\n $eventId: EventId\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: CampaignsSort\n) {\n organization(id: $organizationId) {\n name\n\n event: eventMaybe(id: $eventId) {\n name\n }\n }\n\n userInfo(id: $userInfoId) {\n campaigns(\n eventId: $eventId\n states: [Done, Template]\n limit: $limit\n offset: $offset\n sort: $sort\n ) {\n nodes {\n id\n name\n campaignType\n state\n subject\n sentAt\n\n email(userInfoId: $userInfoId) {\n sentAt\n }\n\n createdBy {\n id\n email\n nameOrEmail\n }\n }\n\n numberOfPages\n totalCount\n }\n }\n}\n",{organizationId:e,eventId:t??null,userInfoId:n,limit:d,offset:u,sort:o},[]),{numberOfPages:_,totalCount:x}=nj(p.userInfo?.campaigns),[y,S]=(0,l.useState)(null);return I||(0,i.jsxs)(i.Fragment,{children:[F(p.userInfo.campaigns.nodes)?(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(hj,{css:{borderStartStartRadius:"$radii$2",borderStartEndRadius:"$radii$2",blockSize:"fit-content"},featureFlags:{isV4:!0},headerRow:(0,i.jsxs)(mx,{children:[(0,i.jsx)(mj,{attribute:se.Name,setSort:r,sort:o,children:a("titre_de_la_cam_20463")}),(0,i.jsx)(mj,{attribute:se.Type,css:{flex:s?"0 50px":"0 150px"},setSort:r,sort:o,children:a("type_35427")}),(0,i.jsx)(ux,{width:200})]}),paginationRow:(0,i.jsx)(Ij,{children:(0,i.jsx)(fj,{limit:d,numberOfPages:_,offset:u,setLimit:h,setOffset:m,showLimits:!0,totalCount:x})}),children:f?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{})]}):p.userInfo.campaigns.nodes.map(e=>(0,i.jsx)(wT,{campaign:e,setDisplayedCampaignId:S},e.id))})}):(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankSwissArmyKnife,subtitle:a("ici_seront_affi_69159"),title:a("ici_seront_affi_06596")})}),(0,i.jsx)(OT,{campaignId:y,setDisplayedCampaignId:S})]})},$T=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=zg(),s=bp(),[o,r]=(0,l.useState)(null),[d,c]=(0,l.useState)(2),[u,m]=(0,l.useState)(0),g=(0,l.useCallback)(()=>{m(0)},[m]),h=(0,l.useCallback)(e=>{c(e),g()},[c,g]),{data:p,loader:f,isLoading:I}=Ei('query UserDocuments(\n $organizationId: OrganizationId!\n $eventId: EventId\n $isEvent: Boolean!\n $userInfoId: UsersInfoId!\n $limit: Int\n $offset: Int\n $sort: DocumentsSort\n) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n customBadges\n hideAssignmentsUntilConfirmationEmailSent\n\n event: eventMaybe(id: $eventId) {\n name\n country\n usePositions\n }\n\n userInfo(id: $userInfoId) {\n name\n nameOrEmail\n fields\n language: fieldValue(slug: "language")\n\n volunteerRegistration(eventId: $eventId) {\n state\n isAssignmentsEmailSent\n\n customDocuments(sent: true) {\n ...CustomDocumentPopulation\n }\n }\n\n links(eventId: $eventId) @include(if: $isEvent) {\n ...UserInfoLinks\n }\n\n documents(eventId: $eventId, limit: $limit, offset: $offset, sort: $sort) {\n nodes {\n ...DocumentEmailPreview\n\n campaigns {\n id\n name\n sentAt\n\n emailSender {\n fromEmail\n fromName\n }\n\n createdBy {\n email\n name\n nameOrEmail\n }\n }\n }\n\n numberOfPages\n totalCount\n }\n }\n }\n}\n',{organizationId:e,eventId:t??null,isEvent:!!t,userInfoId:n,limit:d,offset:u,sort:o},[ka.OrganizationMembersSpaceFragment,ka.CustomDocumentPopulationFragment,ka.UserInfoLinksFragment,ka.DocumentEmailPreviewFragment]),_=(0,l.useMemo)(()=>p.organization?.userInfo,[p.organization?.userInfo]),x=(0,l.useMemo)(()=>(0,mo.A)(_?.volunteerRegistration?.customDocuments.filter(e=>Ju(e.populationsIds,_.fields.population)),e=>e.name),[_?.volunteerRegistration?.customDocuments,_]),y=!!p.organization?.event?.usePositions&&_?.volunteerRegistration?.state===Bt.Assigned&&(!p.organization.hideAssignmentsUntilConfirmationEmailSent||_.volunteerRegistration.isAssignmentsEmailSent),S=(0,l.useMemo)(()=>_?.links&&(y||F(p.organization.customBadges)||F(x))||F(_?.documents.nodes),[x,p.organization?.customBadges,y,_]),{numberOfPages:j,totalCount:v}=nj(_?.documents),b=bi(gl),A=Ci(),C={lang:_?.language};return f||(0,i.jsx)(i.Fragment,{children:S?(0,i.jsxs)(i.Fragment,{children:[_.links&&(0,i.jsxs)($,{direction:"column",gap:"3",children:[y&&(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(ga,{color:"white",download:`${_.nameOrEmail}-assignments`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Kc(_.links.userAssignmentsLink,"pdf"),children:a("t_l_charger_la_82882")}),(0,i.jsx)(ga,{color:"white",download:`${_.nameOrEmail}-planning`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Kc(_.links.userPlanningLink,"pdf"),children:a("t_l_charger_le_74660")}),(0,i.jsx)(ga,{color:"white",download:`${_.nameOrEmail}-planning-days`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Kc(_.links.userPlanningDaysLink,"pdf"),children:a("t_l_charger_le_43587")}),(0,i.jsx)(ga,{color:"white",download:`${_.nameOrEmail}-planning-list`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Kc(_.links.userPlanningListLink,"pdf"),children:a("t_l_charger_le_58518")})]}),p.organization.customBadges.map(e=>(0,i.jsx)(ga,{color:"white",download:`${_.nameOrEmail}-custom-badge`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Kc(_.links.userCustomBadgeLinks[e],"pdf",C),children:a("t_l_charger_1_80752",Db(e))},e)),x.map((e,t)=>(0,i.jsx)(ga,{color:"white",download:`${_.nameOrEmail}-custom-document`,leftIcon:"arrow-down-to-bracket",rightIcon:"arrow-right",to:Kc(_.links.userCustomDocumentLinks[e.slug],"pdf",C),children:a("t_l_charger_1_80752",e.name)},t))]}),F(_.documents.nodes)&&(0,i.jsx)($,{css:{flex:"1",overflow:"hidden"},width:1,children:(0,i.jsx)(hj,{css:{borderStartStartRadius:"$radii$2",borderStartEndRadius:"$radii$2",blockSize:"fit-content"},featureFlags:{isV4:!0},headerRow:(0,i.jsxs)(mx,{children:[(0,i.jsx)(mj,{attribute:be.Name,setSort:r,sort:o,children:a("nom_du_document_73868")}),(0,i.jsx)(ux,{width:200})]}),paginationRow:(0,i.jsx)(Ij,{children:(0,i.jsx)(fj,{limit:d,numberOfPages:j,offset:u,setLimit:h,setOffset:m,showLimits:!0,totalCount:v})}),children:I?(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{}),(0,i.jsx)(gj,{})]}):_.documents.nodes.map(e=>(0,i.jsx)(px,{children:(0,i.jsx)(RT,{document:e,subtitle:F(e.campaigns)?1===e.campaigns.length?[...A(a("envoy_e_le_1_90336","{1}","{2}"),(0,i.jsx)(Bd,{dateTime:e.campaigns[0].sentAt,children:b.toLocaleString(e.campaigns[0].sentAt,s?Ya.ShortDateTime:Ya.DateTime)}),(0,i.jsx)($h,{to:`mailto:${e.campaigns[0].createdBy.email}?subject=${encodeURIComponent(a("re_1_84422",e.name))}`,children:e.campaigns[0].createdBy?.nameOrEmail}))]:a("sent_multiple_t_40457"):void 0})},e.id))})})]}):(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankSwissArmyKnife,subtitle:a("ici_seront_affi_73099"),title:a("pour_le_moment_62758")})})})},kT=e=>{const t=Ai(),n=bi(gl),a=Ci();return(0,i.jsx)(jf,{color:"white-with-green-icon",leftIcon:"circle-check",leftIconStyle:"solid",children:[...a(t("rempli_le_1_29292","{1}"),(0,i.jsx)(Bd,{dateTime:e.formUserInfo.insertedAt,children:n.toLocaleString(e.formUserInfo.insertedAt,Ya.DateOnly.MonthLong)}))]})},NT=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=zg(),s=bp(),{data:o,loader:r}=Ei("query MemberRegistrationForms($eventId: EventId, $userInfoId: UsersInfoId!) {\n userInfo(id: $userInfoId) {\n ...MemberRegistrationUserInfo\n\n ...FormsUsersInfosWished\n\n volunteerRegistration(eventId: $eventId) {\n state\n accreditationState\n volunteerMinutes\n isAccreditationsEmailSent\n isAssignmentsEmailSent\n\n positionsSlotsUsersInfos {\n ...MemberAssignment\n }\n\n accreditationsUsersInfos {\n ...MemberAccreditation\n }\n }\n }\n}\n",{eventId:t,userInfoId:n},[ka.MemberRegistrationUserInfoFragment,ka.FormsUsersInfosWishedFragment,ka.MemberAssignmentFragment,ka.MemberAccreditationFragment]),d=(0,l.useMemo)(()=>{const e=o.userInfo?.formsUsersInfos.filter(e=>t?null!==e.eventId:null===e.eventId);return F(e)?e.flatMap(e=>e.form.elements.length>0?[e]:[]):[]},[o.userInfo?.formsUsersInfos,t]);return r||(0,i.jsx)(i.Fragment,{children:F(d)?(0,i.jsx)(Sp,{children:d.map(o=>(0,i.jsx)(Ap,{badge:(0,i.jsx)(kT,{formUserInfo:o}),button:(0,i.jsx)(ga,{to:Ng.MEMBER_FORM_EDIT({organizationId:e,userInfoId:n,eventId:t,formId:o.formId}),children:s?(0,i.jsx)(ra,{icon:"eye"}):a("view_48132")}),title:o.form.name},o.form.id))}):(0,i.jsx)($,{css:{bd:!0,padding:"$9 $7"},children:(0,i.jsx)(Tf,{imageSrc:Ch.WeezeventBlankPerson,subtitle:a("ici_seront_affi_54352"),title:a("encore_un_peu_d_88675")})})})},zT=()=>{const{params:{organizationId:e,eventId:t,userInfoId:n},translate:a}=zg(),{data:s,loader:o,reload:r}=Ei("query MemberRegistration($organizationId: OrganizationId!, $eventId: EventId, $isEvent: Boolean!) {\n organization(id: $organizationId) {\n ...OrganizationMembersSpace\n country\n\n event: eventMaybe(id: $eventId) @include(if: $isEvent) {\n name\n country\n usePositions\n useAccreditations\n useForms\n useCampaigns\n useDocuments\n }\n }\n\n user {\n ...UserPermissions\n }\n}\n",{organizationId:e,eventId:t,isEvent:!!t},[ka.OrganizationMembersSpaceFragment,ka.UserPermissionsFragment]),l=Ci(),d=s.organization?.event,c=!!d?.usePositions,u=!!d?.useAccreditations,m=!t||!!d?.useCampaigns,g=!t||!!d?.useDocuments,h=!(t&&!d?.useForms&&(c||u||m||g)),p=c?Ng.MEMBER_POSITIONS({organizationId:e,userInfoId:n,eventId:t}):u?Ng.MEMBER_ACCREDITATIONS({organizationId:e,userInfoId:n,eventId:t}):h?Ng.MEMBER_FORMS({organizationId:e,userInfoId:n,eventId:t}):m?Ng.MEMBER_MESSAGES({organizationId:e,userInfoId:n,eventId:t}):Ng.MEMBER_DOCUMENTS({organizationId:e,userInfoId:n,eventId:t});return o||(0,i.jsx)(Ux,{userPermissions:s.user,children:(0,i.jsx)(qp,{featureFlags:{isV4:!0},isLoading:!1,organization:s.organization,spaceDesign:{themeColors:s.organization?.membersSpaceDesign?.colors,bannerSrc:s.organization?.membersSpaceDesign?.banner?.url,logoSrc:s.organization?.membersSpaceDesign?.logo?.url},children:(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.rd,{exact:!0,from:Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),to:Ng.MEMBER_FORMS({organizationId:e,userInfoId:n})}),(0,i.jsx)(oo.rd,{exact:!0,from:Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"}),to:p}),(0,i.jsx)(oo.qh,{path:[Ng.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",formId:":formId"}),Ng.MEMBER_FORM_EDIT({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId",formId:":formId"})],children:(0,i.jsx)(XE,{reload:r})}),(0,i.jsx)(oo.qh,{children:(0,i.jsxs)(Qx,{featureFlags:{isV4:!0},children:[h&&(0,i.jsx)(Xx,{featureFlags:{isV4:!0},getPath:(i=!1)=>Ng.MEMBER_FORMS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...l(a(t?"pr_visualiser_e_41845":"pr_visualiser_e_26744","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:a("formulaires_rem_62495"),children:(0,i.jsx)(NT,{})}),t&&c&&(0,i.jsx)(Xx,{featureFlags:{isV4:!1},getPath:(i=!1)=>Ng.MEMBER_POSITIONS({organizationId:i?":organizationId":e,eventId:i?":eventId":t,userInfoId:i?":userInfoId":n}),title:a("planning_de_vos_51737"),children:(0,i.jsx)(MT,{reloadHeader:r})}),t&&u&&(0,i.jsx)(Xx,{featureFlags:{isV4:!1},getPath:(i=!1)=>Ng.MEMBER_ACCREDITATIONS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?":eventId":t}),title:a("accr_ditations_39450"),children:(0,i.jsx)(dT,{excludeAccreditations:s.organization.membersSpaceExcludeAccreditations,reloadHeader:r})}),m&&(0,i.jsx)(Xx,{featureFlags:{isV4:!0},getPath:(i=!1)=>Ng.MEMBER_MESSAGES({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...l(a(t?"visualiser_l_en_66953":"visualiser_l_en_48128","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:a("messages_37744"),children:(0,i.jsx)(PT,{})}),g&&(0,i.jsx)(Xx,{featureFlags:{isV4:!0},getPath:(i=!1)=>Ng.MEMBER_DOCUMENTS({organizationId:i?":organizationId":e,userInfoId:i?":userInfoId":n,eventId:i?t?":eventId":void 0:t}),subtitle:[...l(a(t?"visualiser_l_en_48475":"visualiser_l_en_47798","{1}"),(0,i.jsx)("b",{style:{color:"var(--colors-gray800)"},children:t?s.organization.event?.name:s.organization.name}))],title:a("Documents"),children:(0,i.jsx)($T,{})})]})})]})})})},LT=()=>(0,i.jsx)(QE,{children:(0,i.jsx)(zT,{})}),FT=e=>{const{params:{organizationId:t},translate:n}=zg(),a=bh();return(0,i.jsxs)($,{align:"center",css:{padding:"$4 $6",borderBlockEnd:"1px solid $gray200","&:last-of-type":{borderBlockEnd:"none"}},gap:"3",children:[(0,i.jsx)(Vp,{email:e.userInfo.email,image:e.userInfo.picture?.url,name:e.userInfo.name,size:40}),(0,i.jsxs)($,{css:{flex:"1",overflow:"hidden"},direction:"column",children:[(0,i.jsx)($i,{color:"gray800",css:{ellipsis:!0},fontWeight:"medium",children:h(e.userInfo.name)?e.userInfo.name:"-"}),(0,i.jsx)($i,{color:"gray500",css:{ellipsis:!0},children:e.userInfo.email})]}),(0,i.jsx)($,{children:a?(0,i.jsx)(ga,{color:"white",size:"sm",to:Ng.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id}),children:n("voir_son_profil_99428")}):(0,i.jsx)(ga,{color:"white",leftIcon:"arrow-right",size:"sm",to:Ng.USER_PROFILE({organizationId:t,userInfoId:e.userInfo.id})})})]})};function UT(){const{history:e,params:{organizationId:t}}=zg(),{data:n,isLoading:i}=Ei("query Profiles($organizationId: OrganizationId!) {\n user {\n usersInfos(organizationId: $organizationId) {\n id\n name\n email\n picture {\n url\n }\n }\n }\n}\n",{organizationId:t},[]);return(0,l.useEffect)(()=>{1===n.user?.usersInfos.length&&e.replace(Ng.USER_PROFILE({organizationId:t,userInfoId:n.user.usersInfos[0].id}))},[n.user]),{isLoading:i,usersInfos:n.user?.usersInfos}}const BT=()=>(0,i.jsx)(Mh,{children:(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)(Dh,{borderRadius:"$1",height:23,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1}),(0,i.jsx)(Dh,{borderRadius:"$2",height:74,width:1})]})}),VT=()=>{const e=Ai(),{organizationId:t}=Mi(),{usersInfos:n,isLoading:a}=UT();return(0,i.jsx)(Gg,{isLoading:a,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,i.jsx)(BT,{}),children:(0,i.jsx)(Mh,{children:(0,i.jsxs)($,{css:{width:"100%","@desktop":{width:"$modalMd"}},direction:"column",gap:"3",children:[(0,i.jsx)($i,{color:"gray800",fontSize:"textMd",fontWeight:"semiBold",children:e("_quel_profil_s_67307")}),(n??[]).map(e=>(0,i.jsx)(FT,{userInfo:e},e.id))]})})})},GT=()=>{const e=Ai(),{organizationId:t}=Mi(),{usersInfos:n,isLoading:a}=UT();return(0,i.jsx)(Gg,{isLoading:a,loadDelegationsSpace:!1,loadMembersSpace:!0,organizationId:t,skeleton:(0,i.jsx)(HE,{}),children:(0,i.jsx)(YE,{children:(0,i.jsx)(qE,{children:(0,i.jsx)(yp,{heading:e("s_lectionnez_le_89411"),subtitle:F(n)?[e("listes_des_prof_08757",n[0].email)]:void 0,children:(0,i.jsx)($,{css:{bd:!0},direction:"column",children:(n??[]).map(e=>(0,i.jsx)(FT,{userInfo:e},e.id))})})})})})},WT=()=>{const{params:{organizationId:e}}=zg();return(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.rd,{exact:!0,from:Ng.USER_PROFILES({organizationId:":organizationId"}),to:Rr(Ng.USER_PROFILES({organizationId:":organizationId"}))}),(0,i.jsx)(oo.qh,{children:Lg(e)?(0,i.jsx)(VT,{}):(0,i.jsx)(GT,{})})]})},qT=()=>(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{path:Ng.USER_PROFILES({organizationId:":organizationId"}),children:(0,i.jsx)(WT,{})}),(0,i.jsx)(oo.qh,{path:Ng.USER_PROFILE({organizationId:":organizationId",userInfoId:":userInfoId"}),children:(0,i.jsx)(ZE,{})}),(0,i.jsx)(oo.qh,{path:[Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"}),Wc.DELEGATIONS({organizationId:":organizationId"}),Wc.DELEGATIONS({organizationId:":organizationId",eventId:":eventId"}),Wc.DELEGATION({organizationId:":organizationId",delegationId:":delegationId"}),Wc.DELEGATION({organizationId:":organizationId",eventId:":eventId",delegationId:":delegationId"})],children:(0,i.jsx)(FE,{})}),(0,i.jsx)(oo.qh,{path:[Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId"}),Ng.MEMBER({organizationId:":organizationId",userInfoId:":userInfoId",eventId:":eventId"})],children:(0,i.jsx)(LT,{})}),(0,i.jsx)(oo.rd,{to:Mr(Ec.ORGANIZATION({organizationId:":organizationId"}))})]});var YT,HT,ZT;function KT(){return KT=Object.assign?Object.assign.bind():function(e){for(var t=1;t{const e=Ai(),{user:t}=to(),n=Di();let a=null,s=null;try{a=n.getItemInt(xh.ORGANIZATION_ID),s=n.getItemInt(xh.EVENT_ID)}catch{}return Pc.includes(location.host)?(a=$c[window.location.host],(0,i.jsx)(jm,{path:`/v2/organization/${a}/auth`})):a&&s?t?(0,i.jsx)(jm,{path:dg(a,s)}):(0,i.jsx)(jm,{path:og(a,s)}):(0,i.jsxs)($,{align:"center",css:{backgroundImage:`url(${Ah.Background404})`,backgroundSize:"cover",height:"100%",width:"100%"},direction:"column",justify:"center",children:[(0,i.jsx)($i,{css:{marginBottom:"100px",width:"300px"},children:(0,i.jsx)(QT,{})}),(0,i.jsx)($i,{css:{color:"white",fontSize:"24px"},children:e("il_n_y_a_rien_33749")})]})},JT=e=>(0,i.jsx)(vm,{getRedirectPath:({organizationId:t,eventId:n,userInfoId:i,delegationId:a})=>"number"!=typeof t||"number"!=typeof n||i||a?location.pathname.includes("delegation")&&"number"==typeof t?Mr(Ec.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${ia.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?Mr(Ec.ORGANIZATION({organizationId:t})):ig.HOME:cg(e.isEmbed,og(t,n)),shouldHaveUser:!0,children:e.children}),eM=e=>(0,i.jsx)(vm,{getRedirectPath:({organizationId:t,eventId:n})=>"number"==typeof t&&"number"==typeof n?cg(e.isEmbed,dg(t,n)):location.pathname.includes("delegations")&&"number"==typeof t?Rr(Ec.ORGANIZATION_DELEGATIONS({organizationId:t})):location.pathname.startsWith(`${ia.HEAVENT_PUBLIC_URL.pathname}/organization`)&&"number"==typeof t?Rr(Ng.USER_PROFILES({organizationId:t})):ig.HOME,shouldHaveUser:!1,children:e.children}),tM=e=>(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{path:"/v2",children:(0,i.jsx)(xp,{})}),(0,i.jsx)(oo.rd,{from:cg(e.isEmbed,og(":organizationId",":eventId")),to:Mr(Ec.ORGANIZATION({organizationId:":organizationId"}))}),(0,i.jsx)(oo.rd,{from:cg(e.isEmbed,lg(":organizationId",":eventId")),to:Mr(Ec.ORGANIZATION({organizationId:":organizationId"}))}),(0,i.jsx)(oo.qh,{exact:!0,path:[Ec.ORGANIZATION_FORM({organizationId:":organizationId",formId:":formId"}),sc.EVENT_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId"}),sc.EVENT_TEAM_FORM({organizationId:":organizationId",eventId:":eventId",formId:":formId",teamCode:":teamCode"}),Wc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",formId:":formId"}),Wc.DELEGATION_FORM({organizationId:":organizationId",delegationId:":delegationId",eventId:":eventId",formId:":formId"})],children:(0,i.jsx)(Ex,{})}),(0,i.jsx)(oo.qh,{exact:!0,path:sc.EVENTS({organizationId:":organizationId"}),children:(0,i.jsx)(Yp,{})}),(0,i.jsx)(oo.qh,{path:ig.USER_FIELD_UPDATE(":organizationId",":userInfoId",":customFieldSlug",":value"),children:(0,i.jsx)(Dx,{})}),(0,i.jsx)(oo.qh,{path:Mr(Ec.ORGANIZATION_DELEGATIONS({organizationId:":organizationId"})),children:(0,i.jsx)(eM,{isEmbed:!1,children:(0,i.jsx)(Wh,{loadDelegationsSpace:!0,loadMembersSpace:!1})})}),(0,i.jsx)(oo.qh,{path:Mr(Ec.ORGANIZATION({organizationId:":organizationId"})),children:(0,i.jsx)(eM,{isEmbed:!1,children:(0,i.jsx)(Wh,{loadDelegationsSpace:!1,loadMembersSpace:!0})})}),(0,i.jsx)(oo.qh,{path:Ec.ORGANIZATION({organizationId:":organizationId"}),children:(0,i.jsx)(JT,{isEmbed:!1,children:(0,i.jsx)(qT,{})})}),(0,i.jsx)(oo.qh,{children:(0,i.jsx)(XT,{})})]}),nM=()=>(fg(""),(0,l.useEffect)(()=>{const e=document.querySelector("link[rel~='icon']");var t;e&&(e.href=(t=location.host)===Mc?pg:t===wc?hg:t===Oc?mg:gg)}),function(){const[e,t]=(0,l.useState)(null),n=({data:e})=>{const{type:n,...i}=e||{};n===Tx.AUTO_RESIZE_ACK&&(t(i),window.parent.postMessage({id:window.name,type:Tx.AUTO_RESIZE_CHANGE_DIMENSIONS,blockSize:window.outerHeight,inlineSize:743},i.page??"*"))};(0,l.useEffect)(()=>null===e?(window.addEventListener("message",n),window.parent.postMessage({id:window.name,type:Tx.AUTO_RESIZE_SYN},"*"),()=>window.removeEventListener("message",n)):void 0,[e])}(),(0,i.jsx)($i,{css:{color:"$gray800",height:"100%",overflow:"auto",position:"relative",width:"100%",backgroundColor:"$grayCustom50"},children:(0,i.jsx)(Ni.Kd,{basename:ia.HEAVENT_PUBLIC_URL.pathnameOptional,children:(0,i.jsxs)(oo.dO,{children:[(0,i.jsx)(oo.qh,{path:rg(":code",":source",":organizationId",":eventId"),children:(0,i.jsx)(ug,{})}),(0,i.jsx)(oo.qh,{path:"/embed",children:(0,i.jsx)(tM,{isEmbed:!0})}),(0,i.jsx)(oo.qh,{children:(0,i.jsx)(tM,{isEmbed:!1})})]})})}));(0,_a.render)((0,i.jsx)(l.StrictMode,{children:(0,i.jsx)(e=>{const[t,n]=(0,l.useState)(null);return(0,l.useEffect)(()=>{let e=!0;return Bs().then(t=>{e&&n(t)}).catch(()=>{alert("Could not load application, please try again.")}),()=>{e=!1}},[]),t?e.render(t):(0,i.jsx)(da,{})},{render:e=>(0,i.jsx)(eo.Provider,{value:e,children:(0,i.jsx)(ym,{children:(0,i.jsx)(Ws,{children:(0,i.jsx)(Oa,{children:(0,i.jsx)(Js,{children:(0,i.jsxs)(Hs.Provider,{value:{designSystem:qs},children:[(0,i.jsx)(Sm,{}),(0,i.jsx)(nM,{})]})})})})})})})}),document.getElementById("heavent-react-hook"))},7619:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileBlank-8285380bb91a4d9e73d7.svg"},7648:(e,t,n)=>{"use strict";e.exports=n.p+"svg/weezeventBlankPerson-e5c7b9cf3fcac68f3df8.svg"},8144:(e,t,n)=>{"use strict";e.exports=n.p+"img/asoHomeBackground-e46035697a28c8d248e6.jpg"},8184:(e,t,n)=>{"use strict";e.exports=n.p+"svg/dnsWrongDomain-3954cd8d9805c779a7bc.svg"},8242:e=>{"use strict";e.exports="data:image/svg+xml;base64,PHN2ZyB2aWV3Qm94PSIwIDAgMjAgMjAiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZmlsbD0iI2ZmZiIgZD0ibTExLjA3NyAxNSAuOTkxLTEuNDE2YS43NS43NSAwIDEgMSAxLjIyOS44NmwtMS4xNDggMS42NGEuNzQ4Ljc0OCAwIDAgMS0uMjE3LjIwNiA1LjI1MSA1LjI1MSAwIDAgMS04LjUwMy01Ljk1NS43NDEuNzQxIDAgMCAxIC4xMi0uMjc0bDEuMTQ3LTEuNjM5YS43NS43NSAwIDEgMSAxLjIyOC44Nkw0LjkzMyAxMC43bC4wMDYuMDAzYTMuNzUgMy43NSAwIDAgMCA2LjEzMiA0LjI5NGwuMDA2LjAwNHptNS40OTQtNS4zMzVhLjc0OC43NDggMCAwIDEtLjEyLjI3NGwtMS4xNDcgMS42MzlhLjc1Ljc1IDAgMSAxLTEuMjI4LS44NmwuODYtMS4yM2EzLjc1IDMuNzUgMCAwIDAtNi4xNDQtNC4zMDFsLS44NiAxLjIyOWEuNzUuNzUgMCAwIDEtMS4yMjktLjg2bDEuMTQ4LTEuNjRhLjc0OC43NDggMCAwIDEgLjIxNy0uMjA2IDUuMjUxIDUuMjUxIDAgMCAxIDguNTAzIDUuOTU1em0tNC41NjMtMi41MzJhLjc1Ljc1IDAgMCAxIC4xODQgMS4wNDVsLTMuMTU1IDQuNTA1YS43NS43NSAwIDEgMS0xLjIyOS0uODZsMy4xNTUtNC41MDZhLjc1Ljc1IDAgMCAxIDEuMDQ1LS4xODR6Ii8+PC9zdmc+"},8264:(e,t,n)=>{"use strict";e.exports=n.p+"img/userProfile-37c0493d81fa861def54.png"},8301:(e,t,n)=>{"use strict";e.exports=n.p+"img/aso-897aab2a976d58ba485d.png"},8652:(e,t,n)=>{"use strict";e.exports=n.p+"svg/done-d3eb25606e0846af3988.svg"},8798:(e,t,n)=>{"use strict";e.exports=n.p+"svg/recrewteerMarker-a76de3956f8adec5ded2.svg"},9191:()=>{},9625:(e,t,n)=>{"use strict";e.exports=n.p+"svg/fileCSV-6ea65d2431d3a4293aad.svg"},9848:(e,t,n)=>{"use strict";e.exports=n.p+"svg/filePDF-37cadc96dae9bc3a10ef.svg"},9882:(e,t,n)=>{"use strict";e.exports=n.p+"img/ign-3cfd31ba578060a32efa.png"}},e=>{e.O(0,[121],()=>e(e.s=7524)),e.O()}]); //# sourceMappingURL=volunteers-87b87a34dfe16884b32e.cjs.map