├── logos ├── Readme.md ├── 0.png ├── 1.png ├── 2.png ├── 3.png ├── 4.png ├── 5.png ├── 6.png ├── 7.png ├── 8.png ├── 9.png ├── 10.png ├── 11.png ├── 12.png ├── 13.png ├── 14.png ├── 15.png ├── 16.png ├── 17.png ├── 18.png ├── 19.png ├── 20.png ├── 21.png ├── 22.png ├── 23.png ├── 24.png ├── 25.png ├── 26.png ├── 27.png ├── 28.png ├── 29.png ├── 30.png ├── 31.png ├── 32.png ├── 33.png ├── 34.png ├── 35.png ├── 36.png ├── 37.png ├── 38.png ├── 39.png ├── 40.png ├── 41.png ├── 42.png ├── 43.png ├── 44.png ├── 45.png ├── 46.png ├── 47.png ├── 48.png ├── 49.png ├── 50.png ├── 51.png ├── 52.png ├── 53.png ├── 54.png ├── 55.png └── logo_atomic_crm.svg ├── favicon.ico ├── logo192.png ├── logo512.png ├── robots.txt ├── img ├── adding-sales.png └── empty.svg ├── manifest.json ├── README.md ├── LICENSE ├── assets ├── index-CwOW9WHn.css └── DealList-DHFfng8u.js ├── index.html └── mockServiceWorker.js /logos/Readme.md: -------------------------------------------------------------------------------- 1 | Logos from https://uilogos.co/ -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/favicon.ico -------------------------------------------------------------------------------- /logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logo192.png -------------------------------------------------------------------------------- /logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logo512.png -------------------------------------------------------------------------------- /logos/0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/0.png -------------------------------------------------------------------------------- /logos/1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/1.png -------------------------------------------------------------------------------- /logos/2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/2.png -------------------------------------------------------------------------------- /logos/3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/3.png -------------------------------------------------------------------------------- /logos/4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/4.png -------------------------------------------------------------------------------- /logos/5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/5.png -------------------------------------------------------------------------------- /logos/6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/6.png -------------------------------------------------------------------------------- /logos/7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/7.png -------------------------------------------------------------------------------- /logos/8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/8.png -------------------------------------------------------------------------------- /logos/9.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/9.png -------------------------------------------------------------------------------- /logos/10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/10.png -------------------------------------------------------------------------------- /logos/11.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/11.png -------------------------------------------------------------------------------- /logos/12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/12.png -------------------------------------------------------------------------------- /logos/13.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/13.png -------------------------------------------------------------------------------- /logos/14.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/14.png -------------------------------------------------------------------------------- /logos/15.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/15.png -------------------------------------------------------------------------------- /logos/16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/16.png -------------------------------------------------------------------------------- /logos/17.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/17.png -------------------------------------------------------------------------------- /logos/18.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/18.png -------------------------------------------------------------------------------- /logos/19.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/19.png -------------------------------------------------------------------------------- /logos/20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/20.png -------------------------------------------------------------------------------- /logos/21.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/21.png -------------------------------------------------------------------------------- /logos/22.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/22.png -------------------------------------------------------------------------------- /logos/23.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/23.png -------------------------------------------------------------------------------- /logos/24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/24.png -------------------------------------------------------------------------------- /logos/25.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/25.png -------------------------------------------------------------------------------- /logos/26.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/26.png -------------------------------------------------------------------------------- /logos/27.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/27.png -------------------------------------------------------------------------------- /logos/28.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/28.png -------------------------------------------------------------------------------- /logos/29.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/29.png -------------------------------------------------------------------------------- /logos/30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/30.png -------------------------------------------------------------------------------- /logos/31.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/31.png -------------------------------------------------------------------------------- /logos/32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/32.png -------------------------------------------------------------------------------- /logos/33.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/33.png -------------------------------------------------------------------------------- /logos/34.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/34.png -------------------------------------------------------------------------------- /logos/35.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/35.png -------------------------------------------------------------------------------- /logos/36.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/36.png -------------------------------------------------------------------------------- /logos/37.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/37.png -------------------------------------------------------------------------------- /logos/38.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/38.png -------------------------------------------------------------------------------- /logos/39.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/39.png -------------------------------------------------------------------------------- /logos/40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/40.png -------------------------------------------------------------------------------- /logos/41.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/41.png -------------------------------------------------------------------------------- /logos/42.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/42.png -------------------------------------------------------------------------------- /logos/43.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/43.png -------------------------------------------------------------------------------- /logos/44.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/44.png -------------------------------------------------------------------------------- /logos/45.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/45.png -------------------------------------------------------------------------------- /logos/46.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/46.png -------------------------------------------------------------------------------- /logos/47.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/47.png -------------------------------------------------------------------------------- /logos/48.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/48.png -------------------------------------------------------------------------------- /logos/49.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/49.png -------------------------------------------------------------------------------- /logos/50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/50.png -------------------------------------------------------------------------------- /logos/51.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/51.png -------------------------------------------------------------------------------- /logos/52.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/52.png -------------------------------------------------------------------------------- /logos/53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/53.png -------------------------------------------------------------------------------- /logos/54.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/54.png -------------------------------------------------------------------------------- /logos/55.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/logos/55.png -------------------------------------------------------------------------------- /robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /img/adding-sales.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/marmelab/react-admin-crm/HEAD/img/adding-sales.png -------------------------------------------------------------------------------- /manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Atomic CRM 2 | 3 | [Atomic CRM](https://marmelab.com/atomic-crm/) is a CRM template built with [react-admin](https://github.com/marmelab/react-admin) and Supabse. You can test it online at https://marmelab.com/react-admin-crm. 4 | 5 | https://user-images.githubusercontent.com/99944/116970434-4a926480-acb8-11eb-8ce2-0602c680e45e.mp4 6 | 7 | This repo stores a local demo of Atomic CRM. React-admin usually requires a REST/GraphQL server to provide data. In this demo however, the API is simulated by the browser (using [FakeRest](https://github.com/marmelab/FakeRest)). The source data is generated at runtime by a package called [data-generator](https://github.com/marmelab/react-admin/tree/master/examples/data-generator). 8 | 9 | To explore the source code, head to [marmelab/atomic-crm](https://github.com/marmelab/atomic-crm). 10 | 11 | ## How to run 12 | 13 | This demo is a static website, so you just need a web server to serve the HTML, JS and CSS files. For example, with Python: 14 | 15 | ```sh 16 | python3 -m http.server 17 | ``` 18 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2021 marmelab 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /logos/logo_atomic_crm.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /assets/index-CwOW9WHn.css: -------------------------------------------------------------------------------- 1 | /*! 2 | * Cropper.js v1.6.2 3 | * https://fengyuanchen.github.io/cropperjs 4 | * 5 | * Copyright 2015-present Chen Fengyuan 6 | * Released under the MIT license 7 | * 8 | * Date: 2024-04-21T07:43:02.731Z 9 | */.cropper-container{direction:ltr;font-size:0;line-height:0;position:relative;-ms-touch-action:none;touch-action:none;-webkit-touch-callout:none;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.cropper-container img{backface-visibility:hidden;display:block;height:100%;image-orientation:0deg;max-height:none!important;max-width:none!important;min-height:0!important;min-width:0!important;width:100%}.cropper-wrap-box,.cropper-canvas,.cropper-drag-box,.cropper-crop-box,.cropper-modal{bottom:0;left:0;position:absolute;right:0;top:0}.cropper-wrap-box,.cropper-canvas{overflow:hidden}.cropper-drag-box{background-color:#fff;opacity:0}.cropper-modal{background-color:#000;opacity:.5}.cropper-view-box{display:block;height:100%;outline:1px solid #39f;outline-color:#3399ffbf;overflow:hidden;width:100%}.cropper-dashed{border:0 dashed #eee;display:block;opacity:.5;position:absolute}.cropper-dashed.dashed-h{border-bottom-width:1px;border-top-width:1px;height:calc(100% / 3);left:0;top:calc(100% / 3);width:100%}.cropper-dashed.dashed-v{border-left-width:1px;border-right-width:1px;height:100%;left:calc(100% / 3);top:0;width:calc(100% / 3)}.cropper-center{display:block;height:0;left:50%;opacity:.75;position:absolute;top:50%;width:0}.cropper-center:before,.cropper-center:after{background-color:#eee;content:" ";display:block;position:absolute}.cropper-center:before{height:1px;left:-3px;top:0;width:7px}.cropper-center:after{height:7px;left:0;top:-3px;width:1px}.cropper-face,.cropper-line,.cropper-point{display:block;height:100%;opacity:.1;position:absolute;width:100%}.cropper-face{background-color:#fff;left:0;top:0}.cropper-line{background-color:#39f}.cropper-line.line-e{cursor:ew-resize;right:-3px;top:0;width:5px}.cropper-line.line-n{cursor:ns-resize;height:5px;left:0;top:-3px}.cropper-line.line-w{cursor:ew-resize;left:-3px;top:0;width:5px}.cropper-line.line-s{bottom:-3px;cursor:ns-resize;height:5px;left:0}.cropper-point{background-color:#39f;height:5px;opacity:.75;width:5px}.cropper-point.point-e{cursor:ew-resize;margin-top:-3px;right:-3px;top:50%}.cropper-point.point-n{cursor:ns-resize;left:50%;margin-left:-3px;top:-3px}.cropper-point.point-w{cursor:ew-resize;left:-3px;margin-top:-3px;top:50%}.cropper-point.point-s{bottom:-3px;cursor:s-resize;left:50%;margin-left:-3px}.cropper-point.point-ne{cursor:nesw-resize;right:-3px;top:-3px}.cropper-point.point-nw{cursor:nwse-resize;left:-3px;top:-3px}.cropper-point.point-sw{bottom:-3px;cursor:nesw-resize;left:-3px}.cropper-point.point-se{bottom:-3px;cursor:nwse-resize;height:20px;opacity:1;right:-3px;width:20px}@media (min-width: 768px){.cropper-point.point-se{height:15px;width:15px}}@media (min-width: 992px){.cropper-point.point-se{height:10px;width:10px}}@media (min-width: 1200px){.cropper-point.point-se{height:5px;opacity:.75;width:5px}}.cropper-point.point-se:before{background-color:#39f;bottom:-50%;content:" ";display:block;height:200%;opacity:0;position:absolute;right:-50%;width:200%}.cropper-invisible{opacity:0}.cropper-bg{background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAAA3NCSVQICAjb4U/gAAAABlBMVEXMzMz////TjRV2AAAACXBIWXMAAArrAAAK6wGCiw1aAAAAHHRFWHRTb2Z0d2FyZQBBZG9iZSBGaXJld29ya3MgQ1M26LyyjAAAABFJREFUCJlj+M/AgBVhF/0PAH6/D/HkDxOGAAAAAElFTkSuQmCC)}.cropper-hide{display:block;height:0;position:absolute;width:0}.cropper-hidden{display:none!important}.cropper-move{cursor:move}.cropper-crop{cursor:crosshair}.cropper-disabled .cropper-drag-box,.cropper-disabled .cropper-face,.cropper-disabled .cropper-line,.cropper-disabled .cropper-point{cursor:not-allowed} 10 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 9 | 10 | 11 | 12 | Atomic CRM 13 | 103 | 104 | 108 | 109 | 110 | 111 | 112 | 113 | 114 |
115 |
116 |
Loading...
117 |
118 |
119 | 120 | 121 | -------------------------------------------------------------------------------- /mockServiceWorker.js: -------------------------------------------------------------------------------- 1 | /* eslint-disable */ 2 | /* tslint:disable */ 3 | 4 | /** 5 | * Mock Service Worker. 6 | * @see https://github.com/mswjs/msw 7 | * - Please do NOT modify this file. 8 | */ 9 | 10 | const PACKAGE_VERSION = '2.10.4' 11 | const INTEGRITY_CHECKSUM = 'f5825c521429caf22a4dd13b66e243af' 12 | const IS_MOCKED_RESPONSE = Symbol('isMockedResponse') 13 | const activeClientIds = new Set() 14 | 15 | addEventListener('install', function () { 16 | self.skipWaiting() 17 | }) 18 | 19 | addEventListener('activate', function (event) { 20 | event.waitUntil(self.clients.claim()) 21 | }) 22 | 23 | addEventListener('message', async function (event) { 24 | const clientId = Reflect.get(event.source || {}, 'id') 25 | 26 | if (!clientId || !self.clients) { 27 | return 28 | } 29 | 30 | const client = await self.clients.get(clientId) 31 | 32 | if (!client) { 33 | return 34 | } 35 | 36 | const allClients = await self.clients.matchAll({ 37 | type: 'window', 38 | }) 39 | 40 | switch (event.data) { 41 | case 'KEEPALIVE_REQUEST': { 42 | sendToClient(client, { 43 | type: 'KEEPALIVE_RESPONSE', 44 | }) 45 | break 46 | } 47 | 48 | case 'INTEGRITY_CHECK_REQUEST': { 49 | sendToClient(client, { 50 | type: 'INTEGRITY_CHECK_RESPONSE', 51 | payload: { 52 | packageVersion: PACKAGE_VERSION, 53 | checksum: INTEGRITY_CHECKSUM, 54 | }, 55 | }) 56 | break 57 | } 58 | 59 | case 'MOCK_ACTIVATE': { 60 | activeClientIds.add(clientId) 61 | 62 | sendToClient(client, { 63 | type: 'MOCKING_ENABLED', 64 | payload: { 65 | client: { 66 | id: client.id, 67 | frameType: client.frameType, 68 | }, 69 | }, 70 | }) 71 | break 72 | } 73 | 74 | case 'MOCK_DEACTIVATE': { 75 | activeClientIds.delete(clientId) 76 | break 77 | } 78 | 79 | case 'CLIENT_CLOSED': { 80 | activeClientIds.delete(clientId) 81 | 82 | const remainingClients = allClients.filter((client) => { 83 | return client.id !== clientId 84 | }) 85 | 86 | // Unregister itself when there are no more clients 87 | if (remainingClients.length === 0) { 88 | self.registration.unregister() 89 | } 90 | 91 | break 92 | } 93 | } 94 | }) 95 | 96 | addEventListener('fetch', function (event) { 97 | // Bypass navigation requests. 98 | if (event.request.mode === 'navigate') { 99 | return 100 | } 101 | 102 | // Opening the DevTools triggers the "only-if-cached" request 103 | // that cannot be handled by the worker. Bypass such requests. 104 | if ( 105 | event.request.cache === 'only-if-cached' && 106 | event.request.mode !== 'same-origin' 107 | ) { 108 | return 109 | } 110 | 111 | // Bypass all requests when there are no active clients. 112 | // Prevents the self-unregistered worked from handling requests 113 | // after it's been deleted (still remains active until the next reload). 114 | if (activeClientIds.size === 0) { 115 | return 116 | } 117 | 118 | const requestId = crypto.randomUUID() 119 | event.respondWith(handleRequest(event, requestId)) 120 | }) 121 | 122 | /** 123 | * @param {FetchEvent} event 124 | * @param {string} requestId 125 | */ 126 | async function handleRequest(event, requestId) { 127 | const client = await resolveMainClient(event) 128 | const requestCloneForEvents = event.request.clone() 129 | const response = await getResponse(event, client, requestId) 130 | 131 | // Send back the response clone for the "response:*" life-cycle events. 132 | // Ensure MSW is active and ready to handle the message, otherwise 133 | // this message will pend indefinitely. 134 | if (client && activeClientIds.has(client.id)) { 135 | const serializedRequest = await serializeRequest(requestCloneForEvents) 136 | 137 | // Clone the response so both the client and the library could consume it. 138 | const responseClone = response.clone() 139 | 140 | sendToClient( 141 | client, 142 | { 143 | type: 'RESPONSE', 144 | payload: { 145 | isMockedResponse: IS_MOCKED_RESPONSE in response, 146 | request: { 147 | id: requestId, 148 | ...serializedRequest, 149 | }, 150 | response: { 151 | type: responseClone.type, 152 | status: responseClone.status, 153 | statusText: responseClone.statusText, 154 | headers: Object.fromEntries(responseClone.headers.entries()), 155 | body: responseClone.body, 156 | }, 157 | }, 158 | }, 159 | responseClone.body ? [serializedRequest.body, responseClone.body] : [], 160 | ) 161 | } 162 | 163 | return response 164 | } 165 | 166 | /** 167 | * Resolve the main client for the given event. 168 | * Client that issues a request doesn't necessarily equal the client 169 | * that registered the worker. It's with the latter the worker should 170 | * communicate with during the response resolving phase. 171 | * @param {FetchEvent} event 172 | * @returns {Promise} 173 | */ 174 | async function resolveMainClient(event) { 175 | const client = await self.clients.get(event.clientId) 176 | 177 | if (activeClientIds.has(event.clientId)) { 178 | return client 179 | } 180 | 181 | if (client?.frameType === 'top-level') { 182 | return client 183 | } 184 | 185 | const allClients = await self.clients.matchAll({ 186 | type: 'window', 187 | }) 188 | 189 | return allClients 190 | .filter((client) => { 191 | // Get only those clients that are currently visible. 192 | return client.visibilityState === 'visible' 193 | }) 194 | .find((client) => { 195 | // Find the client ID that's recorded in the 196 | // set of clients that have registered the worker. 197 | return activeClientIds.has(client.id) 198 | }) 199 | } 200 | 201 | /** 202 | * @param {FetchEvent} event 203 | * @param {Client | undefined} client 204 | * @param {string} requestId 205 | * @returns {Promise} 206 | */ 207 | async function getResponse(event, client, requestId) { 208 | // Clone the request because it might've been already used 209 | // (i.e. its body has been read and sent to the client). 210 | const requestClone = event.request.clone() 211 | 212 | function passthrough() { 213 | // Cast the request headers to a new Headers instance 214 | // so the headers can be manipulated with. 215 | const headers = new Headers(requestClone.headers) 216 | 217 | // Remove the "accept" header value that marked this request as passthrough. 218 | // This prevents request alteration and also keeps it compliant with the 219 | // user-defined CORS policies. 220 | const acceptHeader = headers.get('accept') 221 | if (acceptHeader) { 222 | const values = acceptHeader.split(',').map((value) => value.trim()) 223 | const filteredValues = values.filter( 224 | (value) => value !== 'msw/passthrough', 225 | ) 226 | 227 | if (filteredValues.length > 0) { 228 | headers.set('accept', filteredValues.join(', ')) 229 | } else { 230 | headers.delete('accept') 231 | } 232 | } 233 | 234 | return fetch(requestClone, { headers }) 235 | } 236 | 237 | // Bypass mocking when the client is not active. 238 | if (!client) { 239 | return passthrough() 240 | } 241 | 242 | // Bypass initial page load requests (i.e. static assets). 243 | // The absence of the immediate/parent client in the map of the active clients 244 | // means that MSW hasn't dispatched the "MOCK_ACTIVATE" event yet 245 | // and is not ready to handle requests. 246 | if (!activeClientIds.has(client.id)) { 247 | return passthrough() 248 | } 249 | 250 | // Notify the client that a request has been intercepted. 251 | const serializedRequest = await serializeRequest(event.request) 252 | const clientMessage = await sendToClient( 253 | client, 254 | { 255 | type: 'REQUEST', 256 | payload: { 257 | id: requestId, 258 | ...serializedRequest, 259 | }, 260 | }, 261 | [serializedRequest.body], 262 | ) 263 | 264 | switch (clientMessage.type) { 265 | case 'MOCK_RESPONSE': { 266 | return respondWithMock(clientMessage.data) 267 | } 268 | 269 | case 'PASSTHROUGH': { 270 | return passthrough() 271 | } 272 | } 273 | 274 | return passthrough() 275 | } 276 | 277 | /** 278 | * @param {Client} client 279 | * @param {any} message 280 | * @param {Array} transferrables 281 | * @returns {Promise} 282 | */ 283 | function sendToClient(client, message, transferrables = []) { 284 | return new Promise((resolve, reject) => { 285 | const channel = new MessageChannel() 286 | 287 | channel.port1.onmessage = (event) => { 288 | if (event.data && event.data.error) { 289 | return reject(event.data.error) 290 | } 291 | 292 | resolve(event.data) 293 | } 294 | 295 | client.postMessage(message, [ 296 | channel.port2, 297 | ...transferrables.filter(Boolean), 298 | ]) 299 | }) 300 | } 301 | 302 | /** 303 | * @param {Response} response 304 | * @returns {Response} 305 | */ 306 | function respondWithMock(response) { 307 | // Setting response status code to 0 is a no-op. 308 | // However, when responding with a "Response.error()", the produced Response 309 | // instance will have status code set to 0. Since it's not possible to create 310 | // a Response instance with status code 0, handle that use-case separately. 311 | if (response.status === 0) { 312 | return Response.error() 313 | } 314 | 315 | const mockedResponse = new Response(response.body, response) 316 | 317 | Reflect.defineProperty(mockedResponse, IS_MOCKED_RESPONSE, { 318 | value: true, 319 | enumerable: true, 320 | }) 321 | 322 | return mockedResponse 323 | } 324 | 325 | /** 326 | * @param {Request} request 327 | */ 328 | async function serializeRequest(request) { 329 | return { 330 | url: request.url, 331 | mode: request.mode, 332 | method: request.method, 333 | headers: Object.fromEntries(request.headers.entries()), 334 | cache: request.cache, 335 | credentials: request.credentials, 336 | destination: request.destination, 337 | integrity: request.integrity, 338 | redirect: request.redirect, 339 | referrer: request.referrer, 340 | referrerPolicy: request.referrerPolicy, 341 | body: await request.arrayBuffer(), 342 | keepalive: request.keepalive, 343 | } 344 | } 345 | -------------------------------------------------------------------------------- /img/empty.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /assets/DealList-DHFfng8u.js: -------------------------------------------------------------------------------- 1 | var ci=Object.defineProperty;var o=(e,t)=>ci(e,"name",{value:t,configurable:!0});import{u as di,a as ui,b as pi,c as fi,d as gi,e as zt,r as D,j as m,R as mi,C as hi,A as wr,f as bi,g as vi,s as xi,h as yi,i as Di,F as Si,I as Ii,T as Ci,O as wi,k as Er,_ as Pr,l as be,m as B,n as En,o as Yt,p as Ei,q as Se,B as $,t as Ar,v as Jt,w as Kt,x as j,y as Ve,z as st,D as at,E as lt,G as Xt,H as ct,S as F,J as Pn,K as Pi,L as Ai,M as Rr,N as An,P as Ri,Q as Bi,U as dt,V as Br,W as Oi,X as Ni,Y as Ue,Z as Ft,$ as Ti,a0 as Qt,a1 as ut,a2 as Li,a3 as ji,a4 as Or,a5 as Nr,a6 as Tr,a7 as Mi,a8 as Lr,a9 as Zt,aa as jr,ab as Mr,ac as Xe,ad as Fi,ae as Gi,af as Fr,ag as Gr,ah as _i,ai as _r,aj as $r,ak as Wr,al as kr,am as $i,an as Wi,ao as ki,ap as Vi,aq as Ui,ar as Hi,as as qi,at as zi,au as Yi,av as Ji,aw as Vr,ax as Ki,ay as Xi,az as Qi,aA as Zi,aB as es,aC as ts,aD as ns,aE as rs,aF as os,aG as is,aH as ss,aI as as}from"./index-CQumaBri.js";const ls=o(e=>{const{debounce:t,enableGetChoices:n,filter:r,page:i=1,perPage:s=25,sort:a={field:"id",order:"DESC"},queryOptions:l={},reference:c,source:p}=e,{getValues:f}=di(),u=ui(p),d=pi({name:u})??f(u),{meta:g,...b}=l,{data:v,error:h,isLoading:y,isFetching:S,isPaused:w,isPending:I,isPlaceholderData:A,refetch:C}=fi(c,{ids:d||cs,meta:g},{enabled:d!=null&&d.length>0}),[E,R]=gi({resource:c,page:i,perPage:s,sort:a,debounce:t,filter:r}),M=v?v.filter(Boolean):[],T=n?n(E.filterValues):!0,{data:O,total:_,pageInfo:H,error:te,isLoading:q,isFetching:me,isPaused:ce,isPending:oe,isPlaceholderData:he,refetch:de}=zt(c,{pagination:{page:E.page,perPage:E.perPage},sort:{field:E.sort,order:E.order},filter:{...E.filter,...r},meta:g},{retry:!1,enabled:T,placeholderData:o(ie=>ie,"placeholderData"),...b}),ue=O&&O.length>0?ds(O,M):M.length>0?M:O,V=D.useCallback(()=>{C(),de()},[C,de]);return{sort:D.useMemo(()=>({field:E.sort,order:E.order}),[E.sort,E.order]),allChoices:ue,availableChoices:O,selectedChoices:M,displayedFilters:E.displayedFilters,error:h||te,filter:r,filterValues:E.filterValues,hideFilter:R.hideFilter,isFetching:S||me,isLoading:y||q,isPaused:w||ce,isPending:I||oe,isPlaceholderData:A||he,page:E.page,perPage:E.perPage,refetch:V,resource:c,setFilters:R.setFilters,setPage:R.setPage,setPerPage:R.setPerPage,setSort:R.setSort,showFilter:R.showFilter,source:p,total:_,hasNextPage:H?H.hasNextPage:_!=null?E.page*E.perPage<_:void 0,hasPreviousPage:H?H.hasPreviousPage:E.page>1,isFromReference:!0}},"useReferenceArrayInputController"),cs=[],ds=o((e,t)=>{const n=[...e],r=e.map(i=>i.id);return t.forEach(i=>{r.includes(i.id)||(r.push(i.id),n.push(i))}),n},"mergeReferences"),us=o(e=>{const{children:t,filter:n=ps,offline:r,reference:i,render:s,sort:a}=e;if(t&&D.Children.count(t)!==1)throw new Error(" only accepts a single child (like )");if(!s&&!t)throw new Error(" requires either a 'render' prop or 'children' prop");const l=ls({...e,sort:a,filter:n}),{isPaused:c,isPending:p}=l,f=c&&p&&r!==void 0&&r!==!1;return m.jsx(mi,{value:i,children:m.jsx(hi,{value:l,children:f?r:s?s(l):t})})},"ReferenceArrayInputBase"),ps={};function je(e){"@babel/helpers - typeof";return je=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(e)}o(je,"_typeof");function fs(e,t){if(je(e)!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(je(r)!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}o(fs,"toPrimitive");function gs(e){var t=fs(e,"string");return je(t)=="symbol"?t:t+""}o(gs,"toPropertyKey");const Ur=o(({defaultValue:e,...t})=>m.jsx(wr,{...t,multiple:!0,defaultValue:e??(t.disabled?void 0:[])}),"AutocompleteArrayInput"),ms=o(e=>{const{className:t,defaultValue:n=null,format:r=bs,helperText:i,label:s,margin:a,onChange:l,onBlur:c,onFocus:p,parse:f,resource:u,source:d,step:g="any",min:b,max:v,validate:h,variant:y,inputProps:S,disabled:w,readOnly:I,...A}=bi({props:e,name:Hr}),{field:C,fieldState:{error:E,invalid:R},id:M,isRequired:T}=vi({defaultValue:n,onBlur:c,resource:u,source:d,validate:h,disabled:w,readOnly:I,...A}),{onBlur:O}=C,_={...S,step:g,min:b,max:v},[H,te]=D.useState(r(C.value)),q=D.useRef(!1);D.useEffect(()=>{if(!q.current){const V=r(C.value);te(G=>G!==V?V:G)}},[C.value,r]);const me=o(V=>{if(l&&l(V),typeof V.target>"u"||typeof V.target.value>"u")return;const G=V.target;te(G.value);const ie=G.valueAsNumber!==void 0&&G.valueAsNumber!==null&&!isNaN(G.valueAsNumber)?f?f(G.valueAsNumber):G.valueAsNumber:f?f(G.value):hs(G.value);C.onChange(ie)},"handleChange"),ce=o(V=>{p&&p(V),q.current=!0},"handleFocus"),oe=o(V=>{O&&O(V),q.current=!1;const G=r(C.value);te(ie=>ie!==G?G:ie)},"handleBlur"),he=i!==!1||R,{ref:de,...ue}=C;return m.jsx(vs,{id:M,...ue,inputRef:de,value:H,onChange:me,onFocus:ce,onBlur:oe,className:Di("ra-input",`ra-input-${d}`,t),type:"number",size:"small",variant:y,error:R,disabled:w||I,readOnly:I,helperText:he?m.jsx(Ii,{error:E==null?void 0:E.message,helperText:i}):null,label:s!==""&&s!==!1?m.jsx(Si,{label:s,source:d,resource:u,isRequired:T}):null,margin:a,inputProps:{..._,readOnly:I},...yi(A)})},"NumberInput"),hs=o(e=>{if(e==null||e==="")return null;const t=parseFloat(e);return isNaN(t)?0:t},"convertStringToNumber"),bs=o(e=>e==null||isNaN(e)?"":e.toString(),"convertNumberToString"),Hr="RaNumberInput",vs=xi(Ci,{name:Hr,overridesResolver:o((e,t)=>t.root,"overridesResolver")})({}),xs=o(e=>{const{children:t=ys,offline:n=Ds,...r}=e;if(D.Children.count(t)!==1)throw new Error(" only accepts a single child (like )");return m.jsx(us,{...r,offline:n,children:t})},"ReferenceArrayInput"),ys=m.jsx(Ur,{}),Ds=m.jsx(wi,{variant:"inline"});function Ss(e,t,n){return(t=gs(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}o(Ss,"_defineProperty");function Rn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}o(Rn,"ownKeys");function Bn(e){for(var t=1;t"u"&&(n=t,t=void 0),typeof n<"u"){if(typeof n!="function")throw new Error(Y(1));return n(qr)(e,t)}if(typeof e!="function")throw new Error(Y(2));var i=e,s=t,a=[],l=a,c=!1;function p(){l===a&&(l=a.slice())}o(p,"ensureCanMutateNextListeners");function f(){if(c)throw new Error(Y(3));return s}o(f,"getState");function u(v){if(typeof v!="function")throw new Error(Y(4));if(c)throw new Error(Y(5));var h=!0;return p(),l.push(v),o(function(){if(h){if(c)throw new Error(Y(6));h=!1,p();var S=l.indexOf(v);l.splice(S,1),a=null}},"unsubscribe")}o(u,"subscribe");function d(v){if(!Is(v))throw new Error(Y(7));if(typeof v.type>"u")throw new Error(Y(8));if(c)throw new Error(Y(9));try{c=!0,s=i(s,v)}finally{c=!1}for(var h=a=l,y=0;y"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?p:l;return It.useSyncExternalStore=e.useSyncExternalStore!==void 0?e.useSyncExternalStore:f,It}o(ws,"requireUseSyncExternalStoreShim_production_min");var Fn;function Yr(){return Fn||(Fn=1,St.exports=ws()),St.exports}o(Yr,"requireShim");var Es=Yr(),Ct={exports:{}},wt={};/** 10 | * @license React 11 | * use-sync-external-store-shim/with-selector.production.min.js 12 | * 13 | * Copyright (c) Facebook, Inc. and its affiliates. 14 | * 15 | * This source code is licensed under the MIT license found in the 16 | * LICENSE file in the root directory of this source tree. 17 | */var Gn;function Ps(){if(Gn)return wt;Gn=1;var e=Er(),t=Yr();function n(p,f){return p===f&&(p!==0||1/p===1/f)||p!==p&&f!==f}o(n,"p");var r=typeof Object.is=="function"?Object.is:n,i=t.useSyncExternalStore,s=e.useRef,a=e.useEffect,l=e.useMemo,c=e.useDebugValue;return wt.useSyncExternalStoreWithSelector=function(p,f,u,d,g){var b=s(null);if(b.current===null){var v={hasValue:!1,value:null};b.current=v}else v=b.current;b=l(function(){function y(C){if(!S){if(S=!0,w=C,C=d(C),g!==void 0&&v.hasValue){var E=v.value;if(g(E,C))return I=E}return I=C}if(E=I,r(w,C))return E;var R=d(C);return g!==void 0&&g(E,R)?E:(w=C,I=R)}o(y,"a");var S=!1,w,I,A=u===void 0?null:u;return[function(){return y(f())},A===null?void 0:function(){return y(A())}]},[f,u,d,g]);var h=i(p,b[0],b[1]);return a(function(){v.hasValue=!0,v.value=h},[h]),c(h),h},wt}o(Ps,"requireWithSelector_production_min");var _n;function As(){return _n||(_n=1,Ct.exports=Ps()),Ct.exports}o(As,"requireWithSelector");As();function Rs(e){e()}o(Rs,"defaultNoopBatch");let Jr=Rs;const Bs=o(e=>Jr=e,"setBatch"),Os=o(()=>Jr,"getBatch"),$n=Symbol.for(`react-redux-context-${D.version}`),Wn=globalThis;function Ns(){let e=Wn[$n];return e||(e=D.createContext(null),Wn[$n]=e),e}o(Ns,"getContext");const Kr=new Proxy({},new Proxy({},{get(e,t){const n=Ns();return(r,...i)=>Reflect[t](n,...i)}})),Ts=o(()=>{throw new Error("uSES not initialized!")},"notInitialized");var Et={exports:{}},L={};/** 18 | * @license React 19 | * react-is.production.min.js 20 | * 21 | * Copyright (c) Facebook, Inc. and its affiliates. 22 | * 23 | * This source code is licensed under the MIT license found in the 24 | * LICENSE file in the root directory of this source tree. 25 | */var kn;function Ls(){if(kn)return L;kn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),a=Symbol.for("react.context"),l=Symbol.for("react.server_context"),c=Symbol.for("react.forward_ref"),p=Symbol.for("react.suspense"),f=Symbol.for("react.suspense_list"),u=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),g=Symbol.for("react.offscreen"),b;b=Symbol.for("react.module.reference");function v(h){if(typeof h=="object"&&h!==null){var y=h.$$typeof;switch(y){case e:switch(h=h.type,h){case n:case i:case r:case p:case f:return h;default:switch(h=h&&h.$$typeof,h){case l:case a:case c:case d:case u:case s:return h;default:return y}}case t:return y}}}return o(v,"v"),L.ContextConsumer=a,L.ContextProvider=s,L.Element=e,L.ForwardRef=c,L.Fragment=n,L.Lazy=d,L.Memo=u,L.Portal=t,L.Profiler=i,L.StrictMode=r,L.Suspense=p,L.SuspenseList=f,L.isAsyncMode=function(){return!1},L.isConcurrentMode=function(){return!1},L.isContextConsumer=function(h){return v(h)===a},L.isContextProvider=function(h){return v(h)===s},L.isElement=function(h){return typeof h=="object"&&h!==null&&h.$$typeof===e},L.isForwardRef=function(h){return v(h)===c},L.isFragment=function(h){return v(h)===n},L.isLazy=function(h){return v(h)===d},L.isMemo=function(h){return v(h)===u},L.isPortal=function(h){return v(h)===t},L.isProfiler=function(h){return v(h)===i},L.isStrictMode=function(h){return v(h)===r},L.isSuspense=function(h){return v(h)===p},L.isSuspenseList=function(h){return v(h)===f},L.isValidElementType=function(h){return typeof h=="string"||typeof h=="function"||h===n||h===i||h===r||h===p||h===f||h===g||typeof h=="object"&&h!==null&&(h.$$typeof===d||h.$$typeof===u||h.$$typeof===s||h.$$typeof===a||h.$$typeof===c||h.$$typeof===b||h.getModuleId!==void 0)},L.typeOf=v,L}o(Ls,"requireReactIs_production_min");var Vn;function js(){return Vn||(Vn=1,Et.exports=Ls()),Et.exports}o(js,"requireReactIs");var Ms=js();const Fs=["initMapStateToProps","initMapDispatchToProps","initMergeProps"];function Gs(e,t,n,r,{areStatesEqual:i,areOwnPropsEqual:s,areStatePropsEqual:a}){let l=!1,c,p,f,u,d;function g(S,w){return c=S,p=w,f=e(c,p),u=t(r,p),d=n(f,u,p),l=!0,d}o(g,"handleFirstCall");function b(){return f=e(c,p),t.dependsOnOwnProps&&(u=t(r,p)),d=n(f,u,p),d}o(b,"handleNewPropsAndNewState");function v(){return e.dependsOnOwnProps&&(f=e(c,p)),t.dependsOnOwnProps&&(u=t(r,p)),d=n(f,u,p),d}o(v,"handleNewProps");function h(){const S=e(c,p),w=!a(S,f);return f=S,w&&(d=n(f,u,p)),d}o(h,"handleNewState");function y(S,w){const I=!s(w,p),A=!i(S,c,w,p);return c=S,p=w,I&&A?b():I?v():A?h():d}return o(y,"handleSubsequentCalls"),o(function(w,I){return l?y(w,I):g(w,I)},"pureFinalPropsSelector")}o(Gs,"pureFinalPropsSelectorFactory");function _s(e,t){let{initMapStateToProps:n,initMapDispatchToProps:r,initMergeProps:i}=t,s=Pr(t,Fs);const a=n(e,s),l=r(e,s),c=i(e,s);return Gs(a,l,c,e,s)}o(_s,"finalPropsSelectorFactory");function $s(e,t){const n={};for(const r in e){const i=e[r];typeof i=="function"&&(n[r]=(...s)=>t(i(...s)))}return n}o($s,"bindActionCreators");function Gt(e){return o(function(n){const r=e(n);function i(){return r}return o(i,"constantSelector"),i.dependsOnOwnProps=!1,i},"initConstantSelector")}o(Gt,"wrapMapToPropsConstant");function Un(e){return e.dependsOnOwnProps?!!e.dependsOnOwnProps:e.length!==1}o(Un,"getDependsOnOwnProps");function Xr(e,t){return o(function(r,{displayName:i}){const s=o(function(l,c){return s.dependsOnOwnProps?s.mapToProps(l,c):s.mapToProps(l,void 0)},"mapToPropsProxy");return s.dependsOnOwnProps=!0,s.mapToProps=o(function(l,c){s.mapToProps=e,s.dependsOnOwnProps=Un(e);let p=s(l,c);return typeof p=="function"&&(s.mapToProps=p,s.dependsOnOwnProps=Un(p),p=s(l,c)),p},"detectFactoryAndVerify"),s},"initProxySelector")}o(Xr,"wrapMapToPropsFunc");function en(e,t){return(n,r)=>{throw new Error(`Invalid value of type ${typeof e} for ${t} argument when connecting component ${r.wrappedComponentName}.`)}}o(en,"createInvalidArgFactory");function Ws(e){return e&&typeof e=="object"?Gt(t=>$s(e,t)):e?typeof e=="function"?Xr(e):en(e,"mapDispatchToProps"):Gt(t=>({dispatch:t}))}o(Ws,"mapDispatchToPropsFactory");function ks(e){return e?typeof e=="function"?Xr(e):en(e,"mapStateToProps"):Gt(()=>({}))}o(ks,"mapStateToPropsFactory");function Vs(e,t,n){return be({},n,e,t)}o(Vs,"defaultMergeProps");function Us(e){return o(function(n,{displayName:r,areMergedPropsEqual:i}){let s=!1,a;return o(function(c,p,f){const u=e(c,p,f);return s?i(u,a)||(a=u):(s=!0,a=u),a},"mergePropsProxy")},"initMergePropsProxy")}o(Us,"wrapMergePropsFunc");function Hs(e){return e?typeof e=="function"?Us(e):en(e,"mergeProps"):()=>Vs}o(Hs,"mergePropsFactory");function qs(){const e=Os();let t=null,n=null;return{clear(){t=null,n=null},notify(){e(()=>{let r=t;for(;r;)r.callback(),r=r.next})},get(){let r=[],i=t;for(;i;)r.push(i),i=i.next;return r},subscribe(r){let i=!0,s=n={callback:r,next:null,prev:n};return s.prev?s.prev.next=s:t=s,o(function(){!i||t===null||(i=!1,s.next?s.next.prev=s.prev:n=s.prev,s.prev?s.prev.next=s.next:t=s.next)},"unsubscribe")}}}o(qs,"createListenerCollection");const Hn={notify(){},get:o(()=>[],"get")};function Qr(e,t){let n,r=Hn;function i(u){return c(),r.subscribe(u)}o(i,"addNestedSub");function s(){r.notify()}o(s,"notifyNestedSubs");function a(){f.onStateChange&&f.onStateChange()}o(a,"handleChangeWrapper");function l(){return!!n}o(l,"isSubscribed");function c(){n||(n=t?t.addNestedSub(a):e.subscribe(a),r=qs())}o(c,"trySubscribe");function p(){n&&(n(),n=void 0,r.clear(),r=Hn)}o(p,"tryUnsubscribe");const f={addNestedSub:i,notifyNestedSubs:s,handleChangeWrapper:a,isSubscribed:l,trySubscribe:c,tryUnsubscribe:p,getListeners:o(()=>r,"getListeners")};return f}o(Qr,"createSubscription");const zs=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Ze=zs?D.useLayoutEffect:D.useEffect;function qn(e,t){return e===t?e!==0||t!==0||1/e===1/t:e!==e&&t!==t}o(qn,"is");function Pt(e,t){if(qn(e,t))return!0;if(typeof e!="object"||e===null||typeof t!="object"||t===null)return!1;const n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let i=0;i{Zr=e},"initializeConnect"),Ks=[null,null];function Xs(e,t,n){Ze(()=>e(...t),n)}o(Xs,"useIsomorphicLayoutEffectWithArgs");function Qs(e,t,n,r,i,s){e.current=r,n.current=!1,i.current&&(i.current=null,s())}o(Qs,"captureWrapperProps");function Zs(e,t,n,r,i,s,a,l,c,p,f){if(!e)return()=>{};let u=!1,d=null;const g=o(()=>{if(u||!l.current)return;const v=t.getState();let h,y;try{h=r(v,i.current)}catch(S){y=S,d=S}y||(d=null),h===s.current?a.current||p():(s.current=h,c.current=h,a.current=!0,f())},"checkForUpdates");return n.onStateChange=g,n.trySubscribe(),g(),o(()=>{if(u=!0,n.tryUnsubscribe(),n.onStateChange=null,d)throw d},"unsubscribeWrapper")}o(Zs,"subscribeUpdates");function ea(e,t){return e===t}o(ea,"strictEqual");function eo(e,t,n,{pure:r,areStatesEqual:i=ea,areOwnPropsEqual:s=Pt,areStatePropsEqual:a=Pt,areMergedPropsEqual:l=Pt,forwardRef:c=!1,context:p=Kr}={}){const f=p,u=ks(e),d=Ws(t),g=Hs(n),b=!!e;return o(h=>{const y=h.displayName||h.name||"Component",S=`Connect(${y})`,w={shouldHandleStateChanges:b,displayName:S,wrappedComponentName:y,WrappedComponent:h,initMapStateToProps:u,initMapDispatchToProps:d,initMergeProps:g,areStatesEqual:i,areStatePropsEqual:a,areOwnPropsEqual:s,areMergedPropsEqual:l};function I(E){const[R,M,T]=D.useMemo(()=>{const{reactReduxForwardedRef:re}=E,Ee=Pr(E,Ys);return[E.context,re,Ee]},[E]),O=D.useMemo(()=>R&&R.Consumer&&Ms.isContextConsumer(B.createElement(R.Consumer,null))?R:f,[R,f]),_=D.useContext(O),H=!!E.store&&!!E.store.getState&&!!E.store.dispatch,te=!!_&&!!_.store,q=H?E.store:_.store,me=te?_.getServerState:q.getState,ce=D.useMemo(()=>_s(q.dispatch,w),[q]),[oe,he]=D.useMemo(()=>{if(!b)return Ks;const re=Qr(q,H?void 0:_.subscription),Ee=re.notifyNestedSubs.bind(re);return[re,Ee]},[q,H,_]),de=D.useMemo(()=>H?_:be({},_,{subscription:oe}),[H,_,oe]),ue=D.useRef(),V=D.useRef(T),G=D.useRef(),ie=D.useRef(!1);D.useRef(!1);const xt=D.useRef(!1),yt=D.useRef();Ze(()=>(xt.current=!0,()=>{xt.current=!1}),[]);const wn=D.useMemo(()=>o(()=>G.current&&T===V.current?G.current:ce(q.getState(),T),"selector"),[q,T]),li=D.useMemo(()=>o(Ee=>oe?Zs(b,q,oe,ce,V,ue,ie,xt,G,he,Ee):()=>{},"subscribe"),[oe]);Xs(Qs,[V,ue,ie,T,G,he]);let ze;try{ze=Zr(li,wn,me?()=>ce(me(),T):wn)}catch(re){throw yt.current&&(re.message+=` 26 | The error may be correlated with this previous error: 27 | ${yt.current.stack} 28 | 29 | `),re}Ze(()=>{yt.current=void 0,G.current=void 0,ue.current=ze});const Dt=D.useMemo(()=>B.createElement(h,be({},ze,{ref:M})),[M,h,ze]);return D.useMemo(()=>b?B.createElement(O.Provider,{value:de},Dt):Dt,[O,Dt,de])}o(I,"ConnectFunction");const C=B.memo(I);if(C.WrappedComponent=h,C.displayName=I.displayName=S,c){const R=B.forwardRef(o(function(T,O){return B.createElement(C,be({},T,{reactReduxForwardedRef:O}))},"forwardConnectRef"));return R.displayName=S,R.WrappedComponent=h,En(R,h)}return En(C,h)},"wrapWithConnect")}o(eo,"connect");function ta({store:e,context:t,children:n,serverState:r,stabilityCheck:i="once",noopCheck:s="once"}){const a=D.useMemo(()=>{const p=Qr(e);return{store:e,subscription:p,getServerState:r?()=>r:void 0,stabilityCheck:i,noopCheck:s}},[e,r,i,s]),l=D.useMemo(()=>e.getState(),[e]);Ze(()=>{const{subscription:p}=a;return p.onStateChange=p.notifyNestedSubs,p.trySubscribe(),l!==e.getState()&&p.notifyNestedSubs(),()=>{p.tryUnsubscribe(),p.onStateChange=void 0}},[a,l]);const c=t||Kr;return B.createElement(c.Provider,{value:a},n)}o(ta,"Provider");Js(Es.useSyncExternalStore);Bs(Yt.unstable_batchedUpdates);function na(e,t){if(e.length!==t.length)return!1;for(var n=0;n{const s=da(n,i.options);return e.addEventListener(i.eventName,i.fn,s),o(function(){e.removeEventListener(i.eventName,i.fn,s)},"unbind")});return o(function(){r.forEach(s=>{s()})},"unbindAll")}o(Z,"bindEvents");const ua="Invariant failed",Sn=class Sn extends Error{};o(Sn,"RbdInvariant");let ve=Sn;ve.prototype.toString=o(function(){return this.message},"toString");function x(e,t){throw new ve(ua)}o(x,"invariant");const In=class In extends B.Component{constructor(){super(...arguments),this.callbacks=null,this.unbind=se,this.onWindowError=t=>{const n=this.getCallbacks();n.isDragging()&&n.tryAbort(),t.error instanceof ve&&t.preventDefault()},this.getCallbacks=()=>{if(!this.callbacks)throw new Error("Unable to find AppCallbacks in ");return this.callbacks},this.setCallbacks=t=>{this.callbacks=t}}componentDidMount(){this.unbind=Z(window,[{eventName:"error",fn:this.onWindowError}])}componentDidCatch(t){if(t instanceof ve){this.setState({});return}throw t}componentWillUnmount(){this.unbind()}render(){return this.props.children(this.setCallbacks)}};o(In,"ErrorBoundary");let _t=In;const pa=` 30 | Press space bar to start a drag. 31 | When dragging you can use the arrow keys to move the item around and escape to cancel. 32 | Some screen readers may require you to be in focus mode or to use your pass through key 33 | `,nt=o(e=>e+1,"position"),fa=o(e=>` 34 | You have lifted an item in position ${nt(e.source.index)} 35 | `,"onDragStart"),io=o((e,t)=>{const n=e.droppableId===t.droppableId,r=nt(e.index),i=nt(t.index);return n?` 36 | You have moved the item from position ${r} 37 | to position ${i} 38 | `:` 39 | You have moved the item from position ${r} 40 | in list ${e.droppableId} 41 | to list ${t.droppableId} 42 | in position ${i} 43 | `},"withLocation"),so=o((e,t,n)=>t.droppableId===n.droppableId?` 44 | The item ${e} 45 | has been combined with ${n.draggableId}`:` 46 | The item ${e} 47 | in list ${t.droppableId} 48 | has been combined with ${n.draggableId} 49 | in list ${n.droppableId} 50 | `,"withCombine"),ga=o(e=>{const t=e.destination;if(t)return io(e.source,t);const n=e.combine;return n?so(e.draggableId,e.source,n):"You are over an area that cannot be dropped on"},"onDragUpdate"),Jn=o(e=>` 51 | The item has returned to its starting position 52 | of ${nt(e.index)} 53 | `,"returnedToStart"),ma=o(e=>{if(e.reason==="CANCEL")return` 54 | Movement cancelled. 55 | ${Jn(e.source)} 56 | `;const t=e.destination,n=e.combine;return t?` 57 | You have dropped the item. 58 | ${io(e.source,t)} 59 | `:n?` 60 | You have dropped the item. 61 | ${so(e.draggableId,e.source,n)} 62 | `:` 63 | The item has been dropped while not over a drop area. 64 | ${Jn(e.source)} 65 | `},"onDragEnd"),ha={dragHandleUsageInstructions:pa,onDragStart:fa,onDragUpdate:ga,onDragEnd:ma};var Qe=ha;const k={x:0,y:0},U=o((e,t)=>({x:e.x+t.x,y:e.y+t.y}),"add"),J=o((e,t)=>({x:e.x-t.x,y:e.y-t.y}),"subtract"),ae=o((e,t)=>e.x===t.x&&e.y===t.y,"isEqual$1"),Ie=o(e=>({x:e.x!==0?-e.x:0,y:e.y!==0?-e.y:0}),"negate"),ge=o(function(e,t,n){return n===void 0&&(n=0),e==="x"?{x:t,y:n}:{x:n,y:t}},"patch"),Fe=o((e,t)=>Math.sqrt((t.x-e.x)**2+(t.y-e.y)**2),"distance"),Kn=o((e,t)=>Math.min(...t.map(n=>Fe(e,n))),"closest$1"),ao=o(e=>t=>({x:e(t.x),y:e(t.y)}),"apply");var ba=o((e,t)=>{const n=ne({top:Math.max(t.top,e.top),right:Math.min(t.right,e.right),bottom:Math.min(t.bottom,e.bottom),left:Math.max(t.left,e.left)});return n.width<=0||n.height<=0?null:n},"executeClip");const He=o((e,t)=>({top:e.top+t.y,left:e.left+t.x,bottom:e.bottom+t.y,right:e.right+t.x}),"offsetByPosition"),Xn=o(e=>[{x:e.left,y:e.top},{x:e.right,y:e.top},{x:e.left,y:e.bottom},{x:e.right,y:e.bottom}],"getCorners"),va={top:0,right:0,bottom:0,left:0},xa=o((e,t)=>t?He(e,t.scroll.diff.displacement):e,"scroll$1"),ya=o((e,t,n)=>n&&n.increasedBy?{...e,[t.end]:e[t.end]+n.increasedBy[t.line]}:e,"increase"),Da=o((e,t)=>t&&t.shouldClipSubject?ba(t.pageMarginBox,e):ne(e),"clip");var xe=o(e=>{let{page:t,withPlaceholder:n,axis:r,frame:i}=e;const s=xa(t.marginBox,i),a=ya(s,r,n),l=Da(a,i);return{page:t,withPlaceholder:n,active:l}},"getSubject"),rn=o((e,t)=>{e.frame||x();const n=e.frame,r=J(t,n.scroll.initial),i=Ie(r),s={...n,scroll:{initial:n.scroll.initial,current:t,diff:{value:r,displacement:i},max:n.scroll.max}},a=xe({page:e.subject.page,withPlaceholder:e.subject.withPlaceholder,axis:e.axis,frame:s});return{...e,frame:s,subject:a}},"scrollDroppable");const lo=W(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),co=W(e=>e.reduce((t,n)=>(t[n.descriptor.id]=n,t),{})),pt=W(e=>Object.values(e)),Sa=W(e=>Object.values(e));var Ce=W((e,t)=>Sa(t).filter(r=>e===r.descriptor.droppableId).sort((r,i)=>r.descriptor.index-i.descriptor.index));function on(e){return e.at&&e.at.type==="REORDER"?e.at.destination:null}o(on,"tryGetDestination");function ft(e){return e.at&&e.at.type==="COMBINE"?e.at.combine:null}o(ft,"tryGetCombine");var gt=W((e,t)=>t.filter(n=>n.descriptor.id!==e.descriptor.id)),Ia=o(e=>{let{isMovingForward:t,draggable:n,destination:r,insideDestination:i,previousImpact:s}=e;if(!r.isCombineEnabled||!on(s))return null;function l(b){const v={type:"COMBINE",combine:{draggableId:b,droppableId:r.descriptor.id}};return{...s,at:v}}o(l,"getImpact");const c=s.displaced.all,p=c.length?c[0]:null;if(t)return p?l(p):null;const f=gt(n,i);if(!p){if(!f.length)return null;const b=f[f.length-1];return l(b.descriptor.id)}const u=f.findIndex(b=>b.descriptor.id===p);u===-1&&x();const d=u-1;if(d<0)return null;const g=f[d];return l(g.descriptor.id)},"moveToNextCombine"),we=o((e,t)=>e.descriptor.droppableId===t.descriptor.id,"isHomeOf");const uo={point:k,value:0},Ge={invisible:{},visible:{},all:[]},Ca={displaced:Ge,displacedBy:uo,at:null};var wa=Ca,ee=o((e,t)=>n=>e<=n&&n<=t,"isWithin"),po=o(e=>{const t=ee(e.top,e.bottom),n=ee(e.left,e.right);return r=>{if(t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right))return!0;const s=t(r.top)||t(r.bottom),a=n(r.left)||n(r.right);if(s&&a)return!0;const c=r.tope.bottom,p=r.lefte.right;return c&&p?!0:c&&a||p&&s}},"isPartiallyVisibleThroughFrame"),Ea=o(e=>{const t=ee(e.top,e.bottom),n=ee(e.left,e.right);return r=>t(r.top)&&t(r.bottom)&&n(r.left)&&n(r.right)},"isTotallyVisibleThroughFrame");const sn={direction:"vertical",line:"y",crossAxisLine:"x",start:"top",end:"bottom",size:"height",crossAxisStart:"left",crossAxisEnd:"right",crossAxisSize:"width"},fo={direction:"horizontal",line:"x",crossAxisLine:"y",start:"left",end:"right",size:"width",crossAxisStart:"top",crossAxisEnd:"bottom",crossAxisSize:"height"};var Pa=o(e=>t=>{const n=ee(t.top,t.bottom),r=ee(t.left,t.right);return i=>e===sn?n(i.top)&&n(i.bottom):r(i.left)&&r(i.right)},"isTotallyVisibleThroughFrameOnAxis");const Aa=o((e,t)=>{const n=t.frame?t.frame.scroll.diff.displacement:k;return He(e,n)},"getDroppableDisplaced"),Ra=o((e,t,n)=>t.subject.active?n(t.subject.active)(e):!1,"isVisibleInDroppable"),Ba=o((e,t,n)=>n(t)(e),"isVisibleInViewport"),an=o(e=>{let{target:t,destination:n,viewport:r,withDroppableDisplacement:i,isVisibleThroughFrameFn:s}=e;const a=i?Aa(t,n):t;return Ra(a,n,s)&&Ba(a,r,s)},"isVisible$1"),Oa=o(e=>an({...e,isVisibleThroughFrameFn:po}),"isPartiallyVisible"),go=o(e=>an({...e,isVisibleThroughFrameFn:Ea}),"isTotallyVisible"),Na=o(e=>an({...e,isVisibleThroughFrameFn:Pa(e.destination.axis)}),"isTotallyVisibleOnAxis"),Ta=o((e,t,n)=>{if(typeof n=="boolean")return n;if(!t)return!0;const{invisible:r,visible:i}=t;if(r[e])return!1;const s=i[e];return s?s.shouldAnimate:!0},"getShouldAnimate");function La(e,t){const n=e.page.marginBox,r={top:t.point.y,right:0,bottom:0,left:t.point.x};return ne(tn(n,r))}o(La,"getTarget");function _e(e){let{afterDragging:t,destination:n,displacedBy:r,viewport:i,forceShouldAnimate:s,last:a}=e;return t.reduce(o(function(c,p){const f=La(p,r),u=p.descriptor.id;if(c.all.push(u),!Oa({target:f,destination:n,viewport:i,withDroppableDisplacement:!0}))return c.invisible[p.descriptor.id]=!0,c;const g=Ta(u,a,s),b={draggableId:u,shouldAnimate:g};return c.visible[u]=b,c},"process2"),{all:[],visible:{},invisible:{}})}o(_e,"getDisplacementGroups");function ja(e,t){if(!e.length)return 0;const n=e[e.length-1].descriptor.index;return t.inHomeList?n:n+1}o(ja,"getIndexOfLastItem");function Qn(e){let{insideDestination:t,inHomeList:n,displacedBy:r,destination:i}=e;const s=ja(t,{inHomeList:n});return{displaced:Ge,displacedBy:r,at:{type:"REORDER",destination:{droppableId:i.descriptor.id,index:s}}}}o(Qn,"goAtEnd");function rt(e){let{draggable:t,insideDestination:n,destination:r,viewport:i,displacedBy:s,last:a,index:l,forceShouldAnimate:c}=e;const p=we(t,r);if(l==null)return Qn({insideDestination:n,inHomeList:p,displacedBy:s,destination:r});const f=n.find(v=>v.descriptor.index===l);if(!f)return Qn({insideDestination:n,inHomeList:p,displacedBy:s,destination:r});const u=gt(t,n),d=n.indexOf(f),g=u.slice(d);return{displaced:_e({afterDragging:g,destination:r,displacedBy:s,last:a,viewport:i.frame,forceShouldAnimate:c}),displacedBy:s,at:{type:"REORDER",destination:{droppableId:r.descriptor.id,index:l}}}}o(rt,"calculateReorderImpact");function le(e,t){return!!t.effected[e]}o(le,"didStartAfterCritical");var Ma=o(e=>{let{isMovingForward:t,destination:n,draggables:r,combine:i,afterCritical:s}=e;if(!n.isCombineEnabled)return null;const a=i.draggableId,c=r[a].descriptor.index;return le(a,s)?t?c:c-1:t?c+1:c},"fromCombine"),Fa=o(e=>{let{isMovingForward:t,isInHomeList:n,insideDestination:r,location:i}=e;if(!r.length)return null;const s=i.index,a=t?s+1:s-1,l=r[0].descriptor.index,c=r[r.length-1].descriptor.index,p=n?c:c+1;return ap?null:a},"fromReorder"),Ga=o(e=>{let{isMovingForward:t,isInHomeList:n,draggable:r,draggables:i,destination:s,insideDestination:a,previousImpact:l,viewport:c,afterCritical:p}=e;const f=l.at;if(f||x(),f.type==="REORDER"){const d=Fa({isMovingForward:t,isInHomeList:n,location:f.destination,insideDestination:a});return d==null?null:rt({draggable:r,insideDestination:a,destination:s,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:d})}const u=Ma({isMovingForward:t,destination:s,displaced:l.displaced,draggables:i,combine:f.combine,afterCritical:p});return u==null?null:rt({draggable:r,insideDestination:a,destination:s,viewport:c,last:l.displaced,displacedBy:l.displacedBy,index:u})},"moveToNextIndex"),_a=o(e=>{let{displaced:t,afterCritical:n,combineWith:r,displacedBy:i}=e;const s=!!(t.visible[r]||t.invisible[r]);return le(r,n)?s?k:Ie(i.point):s?i.point:k},"getCombinedItemDisplacement"),$a=o(e=>{let{afterCritical:t,impact:n,draggables:r}=e;const i=ft(n);i||x();const s=i.draggableId,a=r[s].page.borderBox.center,l=_a({displaced:n.displaced,afterCritical:t,combineWith:s,displacedBy:n.displacedBy});return U(a,l)},"whenCombining");const mo=o((e,t)=>t.margin[e.start]+t.borderBox[e.size]/2,"distanceFromStartToBorderBoxCenter"),Wa=o((e,t)=>t.margin[e.end]+t.borderBox[e.size]/2,"distanceFromEndToBorderBoxCenter"),ln=o((e,t,n)=>t[e.crossAxisStart]+n.margin[e.crossAxisStart]+n.borderBox[e.crossAxisSize]/2,"getCrossAxisBorderBoxCenter"),Zn=o(e=>{let{axis:t,moveRelativeTo:n,isMoving:r}=e;return ge(t.line,n.marginBox[t.end]+mo(t,r),ln(t,n.marginBox,r))},"goAfter"),er=o(e=>{let{axis:t,moveRelativeTo:n,isMoving:r}=e;return ge(t.line,n.marginBox[t.start]-Wa(t,r),ln(t,n.marginBox,r))},"goBefore"),ka=o(e=>{let{axis:t,moveInto:n,isMoving:r}=e;return ge(t.line,n.contentBox[t.start]+mo(t,r),ln(t,n.contentBox,r))},"goIntoStart");var Va=o(e=>{let{impact:t,draggable:n,draggables:r,droppable:i,afterCritical:s}=e;const a=Ce(i.descriptor.id,r),l=n.page,c=i.axis;if(!a.length)return ka({axis:c,moveInto:i.page,isMoving:l});const{displaced:p,displacedBy:f}=t,u=p.all[0];if(u){const g=r[u];if(le(u,s))return er({axis:c,moveRelativeTo:g.page,isMoving:l});const b=et(g.page,f.point);return er({axis:c,moveRelativeTo:b,isMoving:l})}const d=a[a.length-1];if(d.descriptor.id===n.descriptor.id)return l.borderBox.center;if(le(d.descriptor.id,s)){const g=et(d.page,Ie(s.displacedBy.point));return Zn({axis:c,moveRelativeTo:g,isMoving:l})}return Zn({axis:c,moveRelativeTo:d.page,isMoving:l})},"whenReordering"),$t=o((e,t)=>{const n=e.frame;return n?U(t,n.scroll.diff.displacement):t},"withDroppableDisplacement");const Ua=o(e=>{let{impact:t,draggable:n,droppable:r,draggables:i,afterCritical:s}=e;const a=n.page.borderBox.center,l=t.at;return!r||!l?a:l.type==="REORDER"?Va({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:s}):$a({impact:t,draggables:i,afterCritical:s})},"getResultWithoutDroppableDisplacement");var mt=o(e=>{const t=Ua(e),n=e.droppable;return n?$t(n,t):t},"getPageBorderBoxCenterFromImpact"),ho=o((e,t)=>{const n=J(t,e.scroll.initial),r=Ie(n);return{frame:ne({top:t.y,bottom:t.y+e.frame.height,left:t.x,right:t.x+e.frame.width}),scroll:{initial:e.scroll.initial,max:e.scroll.max,current:t,diff:{value:n,displacement:r}}}},"scrollViewport");function tr(e,t){return e.map(n=>t[n])}o(tr,"getDraggables$1");function Ha(e,t){for(let n=0;n{let{impact:t,viewport:n,destination:r,draggables:i,maxScrollChange:s}=e;const a=ho(n,U(n.scroll.current,s)),l=r.frame?rn(r,U(r.frame.scroll.current,s)):r,c=t.displaced,p=_e({afterDragging:tr(c.all,i),destination:r,displacedBy:t.displacedBy,viewport:a.frame,last:c,forceShouldAnimate:!1}),f=_e({afterDragging:tr(c.all,i),destination:l,displacedBy:t.displacedBy,viewport:n.frame,last:c,forceShouldAnimate:!1}),u={},d={},g=[c,p,f];return c.all.forEach(v=>{const h=Ha(v,g);if(h){d[v]=h;return}u[v]=!0}),{...t,displaced:{all:c.all,invisible:u,visible:d}}},"speculativelyIncrease"),za=o((e,t)=>U(e.scroll.diff.displacement,t),"withViewportDisplacement"),cn=o(e=>{let{pageBorderBoxCenter:t,draggable:n,viewport:r}=e;const i=za(r,t),s=J(i,n.page.borderBox.center);return U(n.client.borderBox.center,s)},"getClientFromPageBorderBoxCenter"),bo=o(e=>{let{draggable:t,destination:n,newPageBorderBoxCenter:r,viewport:i,withDroppableDisplacement:s,onlyOnMainAxis:a=!1}=e;const l=J(r,t.page.borderBox.center),p={target:He(t.page.borderBox,l),destination:n,withDroppableDisplacement:s,viewport:i};return a?Na(p):go(p)},"isTotallyVisibleInNewLocation"),Ya=o(e=>{let{isMovingForward:t,draggable:n,destination:r,draggables:i,previousImpact:s,viewport:a,previousPageBorderBoxCenter:l,previousClientSelection:c,afterCritical:p}=e;if(!r.isEnabled)return null;const f=Ce(r.descriptor.id,i),u=we(n,r),d=Ia({isMovingForward:t,draggable:n,destination:r,insideDestination:f,previousImpact:s})||Ga({isMovingForward:t,isInHomeList:u,draggable:n,draggables:i,destination:r,insideDestination:f,previousImpact:s,viewport:a,afterCritical:p});if(!d)return null;const g=mt({impact:d,draggable:n,droppable:r,draggables:i,afterCritical:p});if(bo({draggable:n,destination:r,newPageBorderBoxCenter:g,viewport:a.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0}))return{clientSelection:cn({pageBorderBoxCenter:g,draggable:n,viewport:a}),impact:d,scrollJumpRequest:null};const v=J(g,l),h=qa({impact:d,viewport:a,destination:r,draggables:i,maxScrollChange:v});return{clientSelection:c,impact:h,scrollJumpRequest:v}},"moveToNextPlace");const z=o(e=>{const t=e.subject.active;return t||x(),t},"getKnownActive");var Ja=o(e=>{let{isMovingForward:t,pageBorderBoxCenter:n,source:r,droppables:i,viewport:s}=e;const a=r.subject.active;if(!a)return null;const l=r.axis,c=ee(a[l.start],a[l.end]),p=pt(i).filter(u=>u!==r).filter(u=>u.isEnabled).filter(u=>!!u.subject.active).filter(u=>po(s.frame)(z(u))).filter(u=>{const d=z(u);return t?a[l.crossAxisEnd]{const d=z(u),g=ee(d[l.start],d[l.end]);return c(d[l.start])||c(d[l.end])||g(a[l.start])||g(a[l.end])}).sort((u,d)=>{const g=z(u)[l.crossAxisStart],b=z(d)[l.crossAxisStart];return t?g-b:b-g}).filter((u,d,g)=>z(u)[l.crossAxisStart]===z(g[0])[l.crossAxisStart]);if(!p.length)return null;if(p.length===1)return p[0];const f=p.filter(u=>ee(z(u)[l.start],z(u)[l.end])(n[l.line]));return f.length===1?f[0]:f.length>1?f.sort((u,d)=>z(u)[l.start]-z(d)[l.start])[0]:p.sort((u,d)=>{const g=Kn(n,Xn(z(u))),b=Kn(n,Xn(z(d)));return g!==b?g-b:z(u)[l.start]-z(d)[l.start]})[0]},"getBestCrossAxisDroppable");const nr=o((e,t)=>{const n=e.page.borderBox.center;return le(e.descriptor.id,t)?J(n,t.displacedBy.point):n},"getCurrentPageBorderBoxCenter"),Ka=o((e,t)=>{const n=e.page.borderBox;return le(e.descriptor.id,t)?He(n,Ie(t.displacedBy.point)):n},"getCurrentPageBorderBox");var Xa=o(e=>{let{pageBorderBoxCenter:t,viewport:n,destination:r,insideDestination:i,afterCritical:s}=e;return i.filter(l=>go({target:Ka(l,s),destination:r,viewport:n.frame,withDroppableDisplacement:!0})).sort((l,c)=>{const p=Fe(t,$t(r,nr(l,s))),f=Fe(t,$t(r,nr(c,s)));return p{const r=e.axis;if(e.descriptor.mode==="virtual")return ge(r.line,t[r.line]);const i=e.subject.page.contentBox[r.size],c=Ce(e.descriptor.id,n).reduce((p,f)=>p+f.client.marginBox[r.size],0)+t[r.line]-i;return c<=0?null:ge(r.line,c)},"getRequiredGrowthForPlaceholder"),vo=o((e,t)=>({...e,scroll:{...e.scroll,max:t}}),"withMaxScroll"),xo=o((e,t,n)=>{const r=e.frame;we(t,e)&&x(),e.subject.withPlaceholder&&x();const i=qe(e.axis,t.displaceBy).point,s=Qa(e,i,n),a={placeholderSize:i,increasedBy:s,oldFrameMaxScroll:e.frame?e.frame.scroll.max:null};if(!r){const f=xe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:e.frame});return{...e,subject:f}}const l=s?U(r.scroll.max,s):r.scroll.max,c=vo(r,l),p=xe({page:e.subject.page,withPlaceholder:a,axis:e.axis,frame:c});return{...e,subject:p,frame:c}},"addPlaceholder"),Za=o(e=>{const t=e.subject.withPlaceholder;t||x();const n=e.frame;if(!n){const a=xe({page:e.subject.page,axis:e.axis,frame:null,withPlaceholder:null});return{...e,subject:a}}const r=t.oldFrameMaxScroll;r||x();const i=vo(n,r),s=xe({page:e.subject.page,axis:e.axis,frame:i,withPlaceholder:null});return{...e,subject:s,frame:i}},"removePlaceholder");var el=o(e=>{let{previousPageBorderBoxCenter:t,moveRelativeTo:n,insideDestination:r,draggable:i,draggables:s,destination:a,viewport:l,afterCritical:c}=e;if(!n){if(r.length)return null;const d={displaced:Ge,displacedBy:uo,at:{type:"REORDER",destination:{droppableId:a.descriptor.id,index:0}}},g=mt({impact:d,draggable:i,droppable:a,draggables:s,afterCritical:c}),b=we(i,a)?a:xo(a,i,s);return bo({draggable:i,destination:b,newPageBorderBoxCenter:g,viewport:l.frame,withDroppableDisplacement:!1,onlyOnMainAxis:!0})?d:null}const p=t[a.axis.line]<=n.page.borderBox.center[a.axis.line],f=(()=>{const d=n.descriptor.index;return n.descriptor.id===i.descriptor.id||p?d:d+1})(),u=qe(a.axis,i.displaceBy);return rt({draggable:i,insideDestination:r,destination:a,viewport:l,displacedBy:u,last:Ge,index:f})},"moveToNewDroppable"),tl=o(e=>{let{isMovingForward:t,previousPageBorderBoxCenter:n,draggable:r,isOver:i,draggables:s,droppables:a,viewport:l,afterCritical:c}=e;const p=Ja({isMovingForward:t,pageBorderBoxCenter:n,source:i,droppables:a,viewport:l});if(!p)return null;const f=Ce(p.descriptor.id,s),u=Xa({pageBorderBoxCenter:n,viewport:l,destination:p,insideDestination:f,afterCritical:c}),d=el({previousPageBorderBoxCenter:n,destination:p,draggable:r,draggables:s,moveRelativeTo:u,insideDestination:f,viewport:l,afterCritical:c});if(!d)return null;const g=mt({impact:d,draggable:r,droppable:p,draggables:s,afterCritical:c});return{clientSelection:cn({pageBorderBoxCenter:g,draggable:r,viewport:l}),impact:d,scrollJumpRequest:null}},"moveCrossAxis"),K=o(e=>{const t=e.at;return t?t.type==="REORDER"?t.destination.droppableId:t.combine.droppableId:null},"whatIsDraggedOver");const nl=o((e,t)=>{const n=K(e);return n?t[n]:null},"getDroppableOver$1");var rl=o(e=>{let{state:t,type:n}=e;const r=nl(t.impact,t.dimensions.droppables),i=!!r,s=t.dimensions.droppables[t.critical.droppable.id],a=r||s,l=a.axis.direction,c=l==="vertical"&&(n==="MOVE_UP"||n==="MOVE_DOWN")||l==="horizontal"&&(n==="MOVE_LEFT"||n==="MOVE_RIGHT");if(c&&!i)return null;const p=n==="MOVE_DOWN"||n==="MOVE_RIGHT",f=t.dimensions.draggables[t.critical.draggable.id],u=t.current.page.borderBoxCenter,{draggables:d,droppables:g}=t.dimensions;return c?Ya({isMovingForward:p,previousPageBorderBoxCenter:u,draggable:f,destination:a,draggables:d,viewport:t.viewport,previousClientSelection:t.current.client.selection,previousImpact:t.impact,afterCritical:t.afterCritical}):tl({isMovingForward:p,previousPageBorderBoxCenter:u,draggable:f,isOver:a,draggables:d,droppables:g,viewport:t.viewport,afterCritical:t.afterCritical})},"moveInDirection");function fe(e){return e.phase==="DRAGGING"||e.phase==="COLLECTING"}o(fe,"isMovementAllowed");function yo(e){const t=ee(e.top,e.bottom),n=ee(e.left,e.right);return o(function(i){return t(i.y)&&n(i.x)},"run")}o(yo,"isPositionInFrame");function ol(e,t){return e.leftt.left&&e.topt.top}o(ol,"getHasOverlap");function il(e){let{pageBorderBox:t,draggable:n,candidates:r}=e;const i=n.page.borderBox.center,s=r.map(a=>{const l=a.axis,c=ge(a.axis.line,t.center[l.line],a.page.borderBox.center[l.crossAxisLine]);return{id:a.descriptor.id,distance:Fe(i,c)}}).sort((a,l)=>l.distance-a.distance);return s[0]?s[0].id:null}o(il,"getFurthestAway");function sl(e){let{pageBorderBox:t,draggable:n,droppables:r}=e;const i=pt(r).filter(s=>{if(!s.isEnabled)return!1;const a=s.subject.active;if(!a||!ol(t,a))return!1;if(yo(a)(t.center))return!0;const l=s.axis,c=a.center[l.crossAxisLine],p=t[l.crossAxisStart],f=t[l.crossAxisEnd],u=ee(a[l.crossAxisStart],a[l.crossAxisEnd]),d=u(p),g=u(f);return!d&&!g?!0:d?pc});return i.length?i.length===1?i[0].descriptor.id:il({pageBorderBox:t,draggable:n,candidates:i}):null}o(sl,"getDroppableOver");const Do=o((e,t)=>ne(He(e,t)),"offsetRectByPosition");var al=o((e,t)=>{const n=e.frame;return n?Do(t,n.scroll.diff.value):t},"withDroppableScroll");function So(e){let{displaced:t,id:n}=e;return!!(t.visible[n]||t.invisible[n])}o(So,"getIsDisplaced");function ll(e){let{draggable:t,closest:n,inHomeList:r}=e;return n?r&&n.descriptor.index>t.descriptor.index?n.descriptor.index-1:n.descriptor.index:null}o(ll,"atIndex");var cl=o(e=>{let{pageBorderBoxWithDroppableScroll:t,draggable:n,destination:r,insideDestination:i,last:s,viewport:a,afterCritical:l}=e;const c=r.axis,p=qe(r.axis,n.displaceBy),f=p.value,u=t[c.start],d=t[c.end],b=gt(n,i).find(h=>{const y=h.descriptor.id,S=h.page.borderBox.center[c.line],w=le(y,l),I=So({displaced:s,id:y});return w?I?d<=S:u{let{draggable:t,pageBorderBoxWithDroppableScroll:n,previousImpact:r,destination:i,insideDestination:s,afterCritical:a}=e;if(!i.isCombineEnabled)return null;const l=i.axis,c=qe(i.axis,t.displaceBy),p=c.value,f=n[l.start],u=n[l.end],g=gt(t,s).find(v=>{const h=v.descriptor.id,y=v.page.borderBox,w=y[l.size]/dl,I=le(h,a),A=So({displaced:r.displaced,id:h});return I?A?u>y[l.start]+w&&uy[l.start]-p+w&&fy[l.start]+p+w&&uy[l.start]+w&&f{let{pageOffset:t,draggable:n,draggables:r,droppables:i,previousImpact:s,viewport:a,afterCritical:l}=e;const c=Do(n.page.borderBox,t),p=sl({pageBorderBox:c,draggable:n,droppables:i});if(!p)return wa;const f=i[p],u=Ce(f.descriptor.id,r),d=al(f,c);return ul({pageBorderBoxWithDroppableScroll:d,draggable:n,previousImpact:s,destination:f,insideDestination:u,afterCritical:l})||cl({pageBorderBoxWithDroppableScroll:d,draggable:n,destination:f,insideDestination:u,last:s.displaced,viewport:a,afterCritical:l})},"getDragImpact"),dn=o((e,t)=>({...e,[t.descriptor.id]:t}),"patchDroppableMap");const pl=o(e=>{let{previousImpact:t,impact:n,droppables:r}=e;const i=K(t),s=K(n);if(!i||i===s)return r;const a=r[i];if(!a.subject.withPlaceholder)return r;const l=Za(a);return dn(r,l)},"clearUnusedPlaceholder");var fl=o(e=>{let{draggable:t,draggables:n,droppables:r,previousImpact:i,impact:s}=e;const a=pl({previousImpact:i,impact:s,droppables:r}),l=K(s);if(!l)return a;const c=r[l];if(we(t,c)||c.subject.withPlaceholder)return a;const p=xo(c,t,n);return dn(a,p)},"recomputePlaceholders"),Ne=o(e=>{let{state:t,clientSelection:n,dimensions:r,viewport:i,impact:s,scrollJumpRequest:a}=e;const l=i||t.viewport,c=r||t.dimensions,p=n||t.current.client.selection,f=J(p,t.initial.client.selection),u={offset:f,selection:p,borderBoxCenter:U(t.initial.client.borderBoxCenter,f)},d={selection:U(u.selection,l.scroll.current),borderBoxCenter:U(u.borderBoxCenter,l.scroll.current),offset:U(u.offset,l.scroll.diff.value)},g={client:u,page:d};if(t.phase==="COLLECTING")return{...t,dimensions:c,viewport:l,current:g};const b=c.draggables[t.critical.draggable.id],v=s||Io({pageOffset:d.offset,draggable:b,draggables:c.draggables,droppables:c.droppables,previousImpact:t.impact,viewport:l,afterCritical:t.afterCritical}),h=fl({draggable:b,impact:v,previousImpact:t.impact,draggables:c.draggables,droppables:c.droppables});return{...t,current:g,dimensions:{draggables:c.draggables,droppables:h},impact:v,viewport:l,scrollJumpRequest:a||null,forceShouldAnimate:a?!1:null}},"update");function gl(e,t){return e.map(n=>t[n])}o(gl,"getDraggables");var Co=o(e=>{let{impact:t,viewport:n,draggables:r,destination:i,forceShouldAnimate:s}=e;const a=t.displaced,l=gl(a.all,r),c=_e({afterDragging:l,destination:i,displacedBy:t.displacedBy,viewport:n.frame,forceShouldAnimate:s,last:a});return{...t,displaced:c}},"recompute"),wo=o(e=>{let{impact:t,draggable:n,droppable:r,draggables:i,viewport:s,afterCritical:a}=e;const l=mt({impact:t,draggable:n,draggables:i,droppable:r,afterCritical:a});return cn({pageBorderBoxCenter:l,draggable:n,viewport:s})},"getClientBorderBoxCenter"),Eo=o(e=>{let{state:t,dimensions:n,viewport:r}=e;t.movementMode!=="SNAP"&&x();const i=t.impact,s=r||t.viewport,a=n||t.dimensions,{draggables:l,droppables:c}=a,p=l[t.critical.draggable.id],f=K(i);f||x();const u=c[f],d=Co({impact:i,viewport:s,destination:u,draggables:l}),g=wo({impact:d,draggable:p,droppable:u,draggables:l,viewport:s,afterCritical:t.afterCritical});return Ne({impact:d,clientSelection:g,state:t,dimensions:a,viewport:s})},"refreshSnap"),ml=o(e=>({index:e.index,droppableId:e.droppableId}),"getHomeLocation"),Po=o(e=>{let{draggable:t,home:n,draggables:r,viewport:i}=e;const s=qe(n.axis,t.displaceBy),a=Ce(n.descriptor.id,r),l=a.indexOf(t);l===-1&&x();const c=a.slice(l+1),p=c.reduce((g,b)=>(g[b.descriptor.id]=!0,g),{}),f={inVirtualList:n.descriptor.mode==="virtual",displacedBy:s,effected:p};return{impact:{displaced:_e({afterDragging:c,destination:n,displacedBy:s,last:null,viewport:i.frame,forceShouldAnimate:!1}),displacedBy:s,at:{type:"REORDER",destination:ml(t.descriptor)}},afterCritical:f}},"getLiftEffect"),hl=o((e,t)=>({draggables:e.draggables,droppables:dn(e.droppables,t)}),"patchDimensionMap"),bl=o(e=>{let{draggable:t,offset:n,initialWindowScroll:r}=e;const i=et(t.client,n),s=tt(i,r);return{...t,placeholder:{...t.placeholder,client:i},client:i,page:s}},"offsetDraggable"),vl=o(e=>{const t=e.frame;return t||x(),t},"getFrame"),xl=o(e=>{let{additions:t,updatedDroppables:n,viewport:r}=e;const i=r.scroll.diff.value;return t.map(s=>{const a=s.descriptor.droppableId,l=n[a],p=vl(l).scroll.diff.value,f=U(i,p);return bl({draggable:s,offset:f,initialWindowScroll:r.scroll.initial})})},"adjustAdditionsForScrollChanges"),yl=o(e=>{let{state:t,published:n}=e;const r=n.modified.map(S=>{const w=t.dimensions.droppables[S.droppableId];return rn(w,S.scroll)}),i={...t.dimensions.droppables,...lo(r)},s=co(xl({additions:n.additions,updatedDroppables:i,viewport:t.viewport})),a={...t.dimensions.draggables,...s};n.removals.forEach(S=>{delete a[S]});const l={droppables:i,draggables:a},c=K(t.impact),p=c?l.droppables[c]:null,f=l.draggables[t.critical.draggable.id],u=l.droppables[t.critical.droppable.id],{impact:d,afterCritical:g}=Po({draggable:f,home:u,draggables:a,viewport:t.viewport}),b=p&&p.isCombineEnabled?t.impact:d,v=Io({pageOffset:t.current.page.offset,draggable:l.draggables[t.critical.draggable.id],draggables:l.draggables,droppables:l.droppables,previousImpact:b,viewport:t.viewport,afterCritical:g}),h={...t,phase:"DRAGGING",impact:v,onLiftImpact:d,dimensions:l,afterCritical:g,forceShouldAnimate:!1};return t.phase==="COLLECTING"?h:{...h,phase:"DROP_PENDING",reason:t.reason,isWaiting:!1}},"publishWhileDraggingInVirtual");const Wt=o(e=>e.movementMode==="SNAP","isSnapping"),Rt=o((e,t,n)=>{const r=hl(e.dimensions,t);return!Wt(e)||n?Ne({state:e,dimensions:r}):Eo({state:e,dimensions:r})},"postDroppableChange");function Bt(e){return e.isDragging&&e.movementMode==="SNAP"?{...e,scrollJumpRequest:null}:e}o(Bt,"removeScrollJumpRequest");const rr={phase:"IDLE",completed:null,shouldFlush:!1};var Dl=o(function(e,t){if(e===void 0&&(e=rr),t.type==="FLUSH")return{...rr,shouldFlush:!0};if(t.type==="INITIAL_PUBLISH"){e.phase!=="IDLE"&&x();const{critical:n,clientSelection:r,viewport:i,dimensions:s,movementMode:a}=t.payload,l=s.draggables[n.draggable.id],c=s.droppables[n.droppable.id],p={selection:r,borderBoxCenter:l.client.borderBox.center,offset:k},f={client:p,page:{selection:U(p.selection,i.scroll.initial),borderBoxCenter:U(p.selection,i.scroll.initial),offset:U(p.selection,i.scroll.diff.value)}},u=pt(s.droppables).every(v=>!v.isFixedOnPage),{impact:d,afterCritical:g}=Po({draggable:l,home:c,draggables:s.draggables,viewport:i});return{phase:"DRAGGING",isDragging:!0,critical:n,movementMode:a,dimensions:s,initial:f,current:f,isWindowScrollAllowed:u,impact:d,afterCritical:g,onLiftImpact:d,viewport:i,scrollJumpRequest:null,forceShouldAnimate:null}}if(t.type==="COLLECTION_STARTING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"?e:(e.phase!=="DRAGGING"&&x(),{...e,phase:"COLLECTING"});if(t.type==="PUBLISH_WHILE_DRAGGING")return e.phase==="COLLECTING"||e.phase==="DROP_PENDING"||x(),yl({state:e,published:t.payload});if(t.type==="MOVE"){if(e.phase==="DROP_PENDING")return e;fe(e)||x();const{client:n}=t.payload;return ae(n,e.current.client.selection)?e:Ne({state:e,clientSelection:n,impact:Wt(e)?e.impact:null})}if(t.type==="UPDATE_DROPPABLE_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="COLLECTING")return Bt(e);fe(e)||x();const{id:n,newScroll:r}=t.payload,i=e.dimensions.droppables[n];if(!i)return e;const s=rn(i,r);return Rt(e,s,!1)}if(t.type==="UPDATE_DROPPABLE_IS_ENABLED"){if(e.phase==="DROP_PENDING")return e;fe(e)||x();const{id:n,isEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||x(),i.isEnabled===r&&x();const s={...i,isEnabled:r};return Rt(e,s,!0)}if(t.type==="UPDATE_DROPPABLE_IS_COMBINE_ENABLED"){if(e.phase==="DROP_PENDING")return e;fe(e)||x();const{id:n,isCombineEnabled:r}=t.payload,i=e.dimensions.droppables[n];i||x(),i.isCombineEnabled===r&&x();const s={...i,isCombineEnabled:r};return Rt(e,s,!0)}if(t.type==="MOVE_BY_WINDOW_SCROLL"){if(e.phase==="DROP_PENDING"||e.phase==="DROP_ANIMATING")return e;fe(e)||x(),e.isWindowScrollAllowed||x();const n=t.payload.newScroll;if(ae(e.viewport.scroll.current,n))return Bt(e);const r=ho(e.viewport,n);return Wt(e)?Eo({state:e,viewport:r}):Ne({state:e,viewport:r})}if(t.type==="UPDATE_VIEWPORT_MAX_SCROLL"){if(!fe(e))return e;const n=t.payload.maxScroll;if(ae(n,e.viewport.scroll.max))return e;const r={...e.viewport,scroll:{...e.viewport.scroll,max:n}};return{...e,viewport:r}}if(t.type==="MOVE_UP"||t.type==="MOVE_DOWN"||t.type==="MOVE_LEFT"||t.type==="MOVE_RIGHT"){if(e.phase==="COLLECTING"||e.phase==="DROP_PENDING")return e;e.phase!=="DRAGGING"&&x();const n=rl({state:e,type:t.type});return n?Ne({state:e,impact:n.impact,clientSelection:n.clientSelection,scrollJumpRequest:n.scrollJumpRequest}):e}if(t.type==="DROP_PENDING"){const n=t.payload.reason;return e.phase!=="COLLECTING"&&x(),{...e,phase:"DROP_PENDING",isWaiting:!0,reason:n}}if(t.type==="DROP_ANIMATE"){const{completed:n,dropDuration:r,newHomeClientOffset:i}=t.payload;return e.phase==="DRAGGING"||e.phase==="DROP_PENDING"||x(),{phase:"DROP_ANIMATING",completed:n,dropDuration:r,newHomeClientOffset:i,dimensions:e.dimensions}}if(t.type==="DROP_COMPLETE"){const{completed:n}=t.payload;return{phase:"IDLE",completed:n,shouldFlush:!1}}return e},"reducer");const Sl=o(e=>({type:"BEFORE_INITIAL_CAPTURE",payload:e}),"beforeInitialCapture"),Il=o(e=>({type:"LIFT",payload:e}),"lift$1"),Cl=o(e=>({type:"INITIAL_PUBLISH",payload:e}),"initialPublish"),wl=o(e=>({type:"PUBLISH_WHILE_DRAGGING",payload:e}),"publishWhileDragging"),El=o(()=>({type:"COLLECTION_STARTING",payload:null}),"collectionStarting"),Pl=o(e=>({type:"UPDATE_DROPPABLE_SCROLL",payload:e}),"updateDroppableScroll"),Al=o(e=>({type:"UPDATE_DROPPABLE_IS_ENABLED",payload:e}),"updateDroppableIsEnabled"),Rl=o(e=>({type:"UPDATE_DROPPABLE_IS_COMBINE_ENABLED",payload:e}),"updateDroppableIsCombineEnabled"),Ao=o(e=>({type:"MOVE",payload:e}),"move"),Bl=o(e=>({type:"MOVE_BY_WINDOW_SCROLL",payload:e}),"moveByWindowScroll"),Ol=o(e=>({type:"UPDATE_VIEWPORT_MAX_SCROLL",payload:e}),"updateViewportMaxScroll"),Nl=o(()=>({type:"MOVE_UP",payload:null}),"moveUp"),Tl=o(()=>({type:"MOVE_DOWN",payload:null}),"moveDown"),Ll=o(()=>({type:"MOVE_RIGHT",payload:null}),"moveRight"),jl=o(()=>({type:"MOVE_LEFT",payload:null}),"moveLeft"),un=o(()=>({type:"FLUSH",payload:null}),"flush"),Ml=o(e=>({type:"DROP_ANIMATE",payload:e}),"animateDrop"),pn=o(e=>({type:"DROP_COMPLETE",payload:e}),"completeDrop"),Ro=o(e=>({type:"DROP",payload:e}),"drop$1"),Fl=o(e=>({type:"DROP_PENDING",payload:e}),"dropPending"),Bo=o(()=>({type:"DROP_ANIMATION_FINISHED",payload:null}),"dropAnimationFinished");var Gl=o(e=>t=>{let{getState:n,dispatch:r}=t;return i=>s=>{if(s.type!=="LIFT"){i(s);return}const{id:a,clientSelection:l,movementMode:c}=s.payload,p=n();p.phase==="DROP_ANIMATING"&&r(pn({completed:p.completed})),n().phase!=="IDLE"&&x(),r(un()),r(Sl({draggableId:a,movementMode:c}));const u={draggableId:a,scrollOptions:{shouldPublishImmediately:c==="SNAP"}},{critical:d,dimensions:g,viewport:b}=e.startPublishing(u);r(Cl({critical:d,dimensions:g,clientSelection:l,movementMode:c,viewport:b}))}},"lift"),_l=o(e=>()=>t=>n=>{n.type==="INITIAL_PUBLISH"&&e.dragging(),n.type==="DROP_ANIMATE"&&e.dropping(n.payload.completed.result.reason),(n.type==="FLUSH"||n.type==="DROP_COMPLETE")&&e.resting(),t(n)},"style");const fn={outOfTheWay:"cubic-bezier(0.2, 0, 0, 1)",drop:"cubic-bezier(.2,1,.1,1)"},$e={opacity:{drop:0,combining:.7},scale:{drop:.75}},Oo={outOfTheWay:.2,minDropTime:.33,maxDropTime:.55},pe=`${Oo.outOfTheWay}s ${fn.outOfTheWay}`,Te={fluid:`opacity ${pe}`,snap:`transform ${pe}, opacity ${pe}`,drop:o(e=>{const t=`${e}s ${fn.drop}`;return`transform ${t}, opacity ${t}`},"drop"),outOfTheWay:`transform ${pe}`,placeholder:`height ${pe}, width ${pe}, margin ${pe}`},or=o(e=>ae(e,k)?void 0:`translate(${e.x}px, ${e.y}px)`,"moveTo"),kt={moveTo:or,drop:o((e,t)=>{const n=or(e);if(n)return t?`${n} scale(${$e.scale.drop})`:n},"drop")},{minDropTime:Vt,maxDropTime:No}=Oo,$l=No-Vt,ir=1500,Wl=.6;var kl=o(e=>{let{current:t,destination:n,reason:r}=e;const i=Fe(t,n);if(i<=0)return Vt;if(i>=ir)return No;const s=i/ir,a=Vt+$l*s,l=r==="CANCEL"?a*Wl:a;return Number(l.toFixed(2))},"getDropDuration"),Vl=o(e=>{let{impact:t,draggable:n,dimensions:r,viewport:i,afterCritical:s}=e;const{draggables:a,droppables:l}=r,c=K(t),p=c?l[c]:null,f=l[n.descriptor.droppableId],u=wo({impact:t,draggable:n,draggables:a,afterCritical:s,droppable:p||f,viewport:i});return J(u,n.client.borderBox.center)},"getNewHomeClientOffset"),Ul=o(e=>{let{draggables:t,reason:n,lastImpact:r,home:i,viewport:s,onLiftImpact:a}=e;return!r.at||n!=="DROP"?{impact:Co({draggables:t,impact:a,destination:i,viewport:s,forceShouldAnimate:!0}),didDropInsideDroppable:!1}:r.at.type==="REORDER"?{impact:r,didDropInsideDroppable:!0}:{impact:{...r,displaced:Ge},didDropInsideDroppable:!0}},"getDropImpact");const Hl=o(e=>{let{getState:t,dispatch:n}=e;return r=>i=>{if(i.type!=="DROP"){r(i);return}const s=t(),a=i.payload.reason;if(s.phase==="COLLECTING"){n(Fl({reason:a}));return}if(s.phase==="IDLE")return;s.phase==="DROP_PENDING"&&s.isWaiting&&x(),s.phase==="DRAGGING"||s.phase==="DROP_PENDING"||x();const c=s.critical,p=s.dimensions,f=p.draggables[s.critical.draggable.id],{impact:u,didDropInsideDroppable:d}=Ul({reason:a,lastImpact:s.impact,afterCritical:s.afterCritical,onLiftImpact:s.onLiftImpact,home:s.dimensions.droppables[s.critical.droppable.id],viewport:s.viewport,draggables:s.dimensions.draggables}),g=d?on(u):null,b=d?ft(u):null,v={index:c.draggable.index,droppableId:c.droppable.id},h={draggableId:f.descriptor.id,type:f.descriptor.type,source:v,reason:a,mode:s.movementMode,destination:g,combine:b},y=Vl({impact:u,draggable:f,dimensions:p,viewport:s.viewport,afterCritical:s.afterCritical}),S={critical:s.critical,afterCritical:s.afterCritical,result:h,impact:u};if(!(!ae(s.current.client.offset,y)||!!h.combine)){n(pn({completed:S}));return}const I=kl({current:s.current.client.offset,destination:y,reason:a});n(Ml({newHomeClientOffset:y,dropDuration:I,completed:S}))}},"dropMiddleware");var ql=Hl,To=o(()=>({x:window.pageXOffset,y:window.pageYOffset}),"getWindowScroll");function zl(e){return{eventName:"scroll",options:{passive:!0,capture:!1},fn:o(t=>{t.target!==window&&t.target!==window.document||e()},"fn")}}o(zl,"getWindowScrollBinding");function Yl(e){let{onWindowScroll:t}=e;function n(){t(To())}o(n,"updateScroll");const r=Me(n),i=zl(r);let s=se;function a(){return s!==se}o(a,"isActive2");function l(){a()&&x(),s=Z(window,[i])}o(l,"start2");function c(){a()||x(),r.cancel(),s(),s=se}return o(c,"stop"),{start:l,stop:c,isActive:a}}o(Yl,"getScrollListener");const Jl=o(e=>e.type==="DROP_COMPLETE"||e.type==="DROP_ANIMATE"||e.type==="FLUSH","shouldEnd"),Kl=o(e=>{const t=Yl({onWindowScroll:o(n=>{e.dispatch(Bl({newScroll:n}))},"onWindowScroll")});return n=>r=>{!t.isActive()&&r.type==="INITIAL_PUBLISH"&&t.start(),t.isActive()&&Jl(r)&&t.stop(),n(r)}},"scrollListener");var Xl=Kl,Ql=o(e=>{let t=!1,n=!1;const r=setTimeout(()=>{n=!0}),i=o(s=>{t||n||(t=!0,e(s),clearTimeout(r))},"result");return i.wasCalled=()=>t,i},"getExpiringAnnounce"),Zl=o(()=>{const e=[],t=o(i=>{const s=e.findIndex(l=>l.timerId===i);s===-1&&x();const[a]=e.splice(s,1);a.callback()},"execute2");return{add:o(i=>{const s=setTimeout(()=>t(s)),a={timerId:s,callback:i};e.push(a)},"add2"),flush:o(()=>{if(!e.length)return;const i=[...e];e.length=0,i.forEach(s=>{clearTimeout(s.timerId),s.callback()})},"flush2")}},"getAsyncMarshal");const ec=o((e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.droppableId===t.droppableId&&e.index===t.index,"areLocationsEqual"),tc=o((e,t)=>e==null&&t==null?!0:e==null||t==null?!1:e.draggableId===t.draggableId&&e.droppableId===t.droppableId,"isCombineEqual"),nc=o((e,t)=>{if(e===t)return!0;const n=e.draggable.id===t.draggable.id&&e.draggable.droppableId===t.draggable.droppableId&&e.draggable.type===t.draggable.type&&e.draggable.index===t.draggable.index,r=e.droppable.id===t.droppable.id&&e.droppable.type===t.droppable.type;return n&&r},"isCriticalEqual"),Pe=o((e,t)=>{t()},"withTimings"),Ye=o((e,t)=>({draggableId:e.draggable.id,type:e.droppable.type,source:{droppableId:e.droppable.id,index:e.draggable.index},mode:t}),"getDragStart");function Ot(e,t,n,r){if(!e){n(r(t));return}const i=Ql(n);e(t,{announce:i}),i.wasCalled()||n(r(t))}o(Ot,"execute");var rc=o((e,t)=>{const n=Zl();let r=null;const i=o((u,d)=>{r&&x(),Pe("onBeforeCapture",()=>{const g=e().onBeforeCapture;g&&g({draggableId:u,mode:d})})},"beforeCapture"),s=o((u,d)=>{r&&x(),Pe("onBeforeDragStart",()=>{const g=e().onBeforeDragStart;g&&g(Ye(u,d))})},"beforeStart"),a=o((u,d)=>{r&&x();const g=Ye(u,d);r={mode:d,lastCritical:u,lastLocation:g.source,lastCombine:null},n.add(()=>{Pe("onDragStart",()=>Ot(e().onDragStart,g,t,Qe.onDragStart))})},"start2"),l=o((u,d)=>{const g=on(d),b=ft(d);r||x();const v=!nc(u,r.lastCritical);v&&(r.lastCritical=u);const h=!ec(r.lastLocation,g);h&&(r.lastLocation=g);const y=!tc(r.lastCombine,b);if(y&&(r.lastCombine=b),!v&&!h&&!y)return;const S={...Ye(u,r.mode),combine:b,destination:g};n.add(()=>{Pe("onDragUpdate",()=>Ot(e().onDragUpdate,S,t,Qe.onDragUpdate))})},"update2"),c=o(()=>{r||x(),n.flush()},"flush2"),p=o(u=>{r||x(),r=null,Pe("onDragEnd",()=>Ot(e().onDragEnd,u,t,Qe.onDragEnd))},"drop2");return{beforeCapture:i,beforeStart:s,start:a,update:l,flush:c,drop:p,abort:o(()=>{if(!r)return;const u={...Ye(r.lastCritical,r.mode),combine:null,destination:null,reason:"CANCEL"};p(u)},"abort")}},"getPublisher"),oc=o((e,t)=>{const n=rc(e,t);return r=>i=>s=>{if(s.type==="BEFORE_INITIAL_CAPTURE"){n.beforeCapture(s.payload.draggableId,s.payload.movementMode);return}if(s.type==="INITIAL_PUBLISH"){const l=s.payload.critical;n.beforeStart(l,s.payload.movementMode),i(s),n.start(l,s.payload.movementMode);return}if(s.type==="DROP_COMPLETE"){const l=s.payload.completed.result;n.flush(),i(s),n.drop(l);return}if(i(s),s.type==="FLUSH"){n.abort();return}const a=r.getState();a.phase==="DRAGGING"&&n.update(a.critical,a.impact)}},"responders");const ic=o(e=>t=>n=>{if(n.type!=="DROP_ANIMATION_FINISHED"){t(n);return}const r=e.getState();r.phase!=="DROP_ANIMATING"&&x(),e.dispatch(pn({completed:r.completed}))},"dropAnimationFinishMiddleware");var sc=ic;const ac=o(e=>{let t=null,n=null;function r(){n&&(cancelAnimationFrame(n),n=null),t&&(t(),t=null)}return o(r,"clear"),i=>s=>{if((s.type==="FLUSH"||s.type==="DROP_COMPLETE"||s.type==="DROP_ANIMATION_FINISHED")&&r(),i(s),s.type!=="DROP_ANIMATE")return;const a={eventName:"scroll",options:{capture:!0,passive:!1,once:!0},fn:o(function(){e.getState().phase==="DROP_ANIMATING"&&e.dispatch(Bo())},"flushDropAnimation")};n=requestAnimationFrame(()=>{n=null,t=Z(window,[a])})}},"dropAnimationFlushOnScrollMiddleware");var lc=ac,cc=o(e=>()=>t=>n=>{(n.type==="DROP_COMPLETE"||n.type==="FLUSH"||n.type==="DROP_ANIMATE")&&e.stopPublishing(),t(n)},"dimensionMarshalStopper"),dc=o(e=>{let t=!1;return()=>n=>r=>{if(r.type==="INITIAL_PUBLISH"){t=!0,e.tryRecordFocus(r.payload.critical.draggable.id),n(r),e.tryRestoreFocusRecorded();return}if(n(r),!!t){if(r.type==="FLUSH"){t=!1,e.tryRestoreFocusRecorded();return}if(r.type==="DROP_COMPLETE"){t=!1;const i=r.payload.completed.result;i.combine&&e.tryShiftRecord(i.draggableId,i.combine.draggableId),e.tryRestoreFocusRecorded()}}}},"focus");const uc=o(e=>e.type==="DROP_COMPLETE"||e.type==="DROP_ANIMATE"||e.type==="FLUSH","shouldStop");var pc=o(e=>t=>n=>r=>{if(uc(r)){e.stop(),n(r);return}if(r.type==="INITIAL_PUBLISH"){n(r);const i=t.getState();i.phase!=="DRAGGING"&&x(),e.start(i);return}n(r),e.scroll(t.getState())},"autoScroll");const fc=o(e=>t=>n=>{if(t(n),n.type!=="PUBLISH_WHILE_DRAGGING")return;const r=e.getState();r.phase==="DROP_PENDING"&&(r.isWaiting||e.dispatch(Ro({reason:r.reason})))},"pendingDrop");var gc=fc;const mc=zr;var hc=o(e=>{let{dimensionMarshal:t,focusMarshal:n,styleMarshal:r,getResponders:i,announce:s,autoScroller:a}=e;return qr(Dl,mc(Cs(_l(r),cc(t),Gl(t),ql,sc,lc,gc,pc(a),Xl,dc(n),oc(i,s))))},"createStore");const Nt=o(()=>({additions:{},removals:{},modified:{}}),"clean$1");function bc(e){let{registry:t,callbacks:n}=e,r=Nt(),i=null;const s=o(()=>{i||(n.collectionStarting(),i=requestAnimationFrame(()=>{i=null;const{additions:p,removals:f,modified:u}=r,d=Object.keys(p).map(v=>t.draggable.getById(v).getDimension(k)).sort((v,h)=>v.descriptor.index-h.descriptor.index),g=Object.keys(u).map(v=>{const y=t.droppable.getById(v).callbacks.getScrollWhileDragging();return{droppableId:v,scroll:y}}),b={additions:d,removals:Object.keys(f),modified:g};r=Nt(),n.publish(b)}))},"collect");return{add:o(p=>{const f=p.descriptor.id;r.additions[f]=p,r.modified[p.descriptor.droppableId]=!0,r.removals[f]&&delete r.removals[f],s()},"add2"),remove:o(p=>{const f=p.descriptor;r.removals[f.id]=!0,r.modified[f.droppableId]=!0,r.additions[f.id]&&delete r.additions[f.id],s()},"remove"),stop:o(()=>{i&&(cancelAnimationFrame(i),i=null,r=Nt())},"stop")}}o(bc,"createPublisher");var Lo=o(e=>{let{scrollHeight:t,scrollWidth:n,height:r,width:i}=e;const s=J({x:n,y:t},{x:i,y:r});return{x:Math.max(0,s.x),y:Math.max(0,s.y)}},"getMaxScroll"),jo=o(()=>{const e=document.documentElement;return e||x(),e},"getDocumentElement"),Mo=o(()=>{const e=jo();return Lo({scrollHeight:e.scrollHeight,scrollWidth:e.scrollWidth,width:e.clientWidth,height:e.clientHeight})},"getMaxWindowScroll"),vc=o(()=>{const e=To(),t=Mo(),n=e.y,r=e.x,i=jo(),s=i.clientWidth,a=i.clientHeight,l=r+s,c=n+a;return{frame:ne({top:n,left:r,right:l,bottom:c}),scroll:{initial:e,current:e,max:t,diff:{value:k,displacement:k}}}},"getViewport"),xc=o(e=>{let{critical:t,scrollOptions:n,registry:r}=e;const i=vc(),s=i.scroll.current,a=t.droppable,l=r.droppable.getAllByType(a.type).map(u=>u.callbacks.getDimensionAndWatchScroll(s,n)),c=r.draggable.getAllByType(t.draggable.type).map(u=>u.getDimension(s));return{dimensions:{draggables:co(c),droppables:lo(l)},critical:t,viewport:i}},"getInitialPublish");function sr(e,t,n){return!(n.descriptor.id===t.id||n.descriptor.type!==t.type||e.droppable.getById(n.descriptor.droppableId).descriptor.mode!=="virtual")}o(sr,"shouldPublishUpdate");var yc=o((e,t)=>{let n=null;const r=bc({callbacks:{publish:t.publishWhileDragging,collectionStarting:t.collectionStarting},registry:e}),i=o((d,g)=>{e.droppable.exists(d)||x(),n&&t.updateDroppableIsEnabled({id:d,isEnabled:g})},"updateDroppableIsEnabled2"),s=o((d,g)=>{n&&(e.droppable.exists(d)||x(),t.updateDroppableIsCombineEnabled({id:d,isCombineEnabled:g}))},"updateDroppableIsCombineEnabled2"),a=o((d,g)=>{n&&(e.droppable.exists(d)||x(),t.updateDroppableScroll({id:d,newScroll:g}))},"updateDroppableScroll2"),l=o((d,g)=>{n&&e.droppable.getById(d).callbacks.scroll(g)},"scrollDroppable2"),c=o(()=>{if(!n)return;r.stop();const d=n.critical.droppable;e.droppable.getAllByType(d.type).forEach(g=>g.callbacks.dragStopped()),n.unsubscribe(),n=null},"stopPublishing"),p=o(d=>{n||x();const g=n.critical.draggable;d.type==="ADDITION"&&sr(e,g,d.value)&&r.add(d.value),d.type==="REMOVAL"&&sr(e,g,d.value)&&r.remove(d.value)},"subscriber");return{updateDroppableIsEnabled:i,updateDroppableIsCombineEnabled:s,scrollDroppable:l,updateDroppableScroll:a,startPublishing:o(d=>{n&&x();const g=e.draggable.getById(d.draggableId),b=e.droppable.getById(g.descriptor.droppableId),v={draggable:g.descriptor,droppable:b.descriptor},h=e.subscribe(p);return n={critical:v,unsubscribe:h},xc({critical:v,registry:e,scrollOptions:d.scrollOptions})},"startPublishing"),stopPublishing:c}},"createDimensionMarshal"),Fo=o((e,t)=>e.phase==="IDLE"?!0:e.phase!=="DROP_ANIMATING"||e.completed.result.draggableId===t?!1:e.completed.result.reason==="DROP","canStartDrag"),Dc=o(e=>{window.scrollBy(e.x,e.y)},"scrollWindow");const Sc=W(e=>pt(e).filter(t=>!(!t.isEnabled||!t.frame))),Ic=o((e,t)=>Sc(t).find(r=>(r.frame||x(),yo(r.frame.pageMarginBox)(e)))||null,"getScrollableDroppableOver");var Cc=o(e=>{let{center:t,destination:n,droppables:r}=e;if(n){const s=r[n];return s.frame?s:null}return Ic(t,r)},"getBestScrollableDroppable");const We={startFromPercentage:.25,maxScrollAtPercentage:.05,maxPixelScroll:28,ease:o(e=>e**2,"ease"),durationDampening:{stopDampeningAt:1200,accelerateAt:360},disabled:!1};var wc=o(function(e,t,n){n===void 0&&(n=o(()=>We,"getAutoScrollerOptions"));const r=n(),i=e[t.size]*r.startFromPercentage,s=e[t.size]*r.maxScrollAtPercentage;return{startScrollingFrom:i,maxScrollValueAt:s}},"getDistanceThresholds"),Go=o(e=>{let{startOfRange:t,endOfRange:n,current:r}=e;const i=n-t;return i===0?0:(r-t)/i},"getPercentage"),gn=1,Ec=o(function(e,t,n){n===void 0&&(n=o(()=>We,"getAutoScrollerOptions"));const r=n();if(e>t.startScrollingFrom)return 0;if(e<=t.maxScrollValueAt)return r.maxPixelScroll;if(e===t.startScrollingFrom)return gn;const s=1-Go({startOfRange:t.maxScrollValueAt,endOfRange:t.startScrollingFrom,current:e}),a=r.maxPixelScroll*r.ease(s);return Math.ceil(a)},"getValueFromDistance"),Pc=o((e,t,n)=>{const r=n(),i=r.durationDampening.accelerateAt,s=r.durationDampening.stopDampeningAt,a=t,l=s,p=Date.now()-a;if(p>=s)return e;if(p{let{distanceToEdge:t,thresholds:n,dragStartTime:r,shouldUseTimeDampening:i,getAutoScrollerOptions:s}=e;const a=Ec(t,n,s);return a===0?0:i?Math.max(Pc(a,r,s),gn):a},"getValue"),lr=o(e=>{let{container:t,distanceToEdges:n,dragStartTime:r,axis:i,shouldUseTimeDampening:s,getAutoScrollerOptions:a}=e;const l=wc(t,i,a);return n[i.end]{let{container:t,subject:n,proposedScroll:r}=e;const i=n.height>t.height,s=n.width>t.width;return!s&&!i?r:s&&i?null:{x:s?0:r.x,y:i?0:r.y}},"adjustForSizeLimits");const Rc=ao(e=>e===0?0:e);var _o=o(e=>{let{dragStartTime:t,container:n,subject:r,center:i,shouldUseTimeDampening:s,getAutoScrollerOptions:a}=e;const l={top:i.y-n.top,right:n.right-i.x,bottom:n.bottom-i.y,left:i.x-n.left},c=lr({container:n,distanceToEdges:l,dragStartTime:t,axis:sn,shouldUseTimeDampening:s,getAutoScrollerOptions:a}),p=lr({container:n,distanceToEdges:l,dragStartTime:t,axis:fo,shouldUseTimeDampening:s,getAutoScrollerOptions:a}),f=Rc({x:p,y:c});if(ae(f,k))return null;const u=Ac({container:n,subject:r,proposedScroll:f});return u?ae(u,k)?null:u:null},"getScroll$1");const Bc=ao(e=>e===0?0:e>0?1:-1),mn=(()=>{const e=o((t,n)=>t<0?t:t>n?t-n:0,"getRemainder");return t=>{let{current:n,max:r,change:i}=t;const s=U(n,i),a={x:e(s.x,r.x),y:e(s.y,r.y)};return ae(a,k)?null:a}})(),$o=o(e=>{let{max:t,current:n,change:r}=e;const i={x:Math.max(n.x,t.x),y:Math.max(n.y,t.y)},s=Bc(r),a=mn({max:i,current:n,change:s});return!a||s.x!==0&&a.x===0||s.y!==0&&a.y===0},"canPartiallyScroll"),hn=o((e,t)=>$o({current:e.scroll.current,max:e.scroll.max,change:t}),"canScrollWindow"),Oc=o((e,t)=>{if(!hn(e,t))return null;const n=e.scroll.max,r=e.scroll.current;return mn({current:r,max:n,change:t})},"getWindowOverlap"),bn=o((e,t)=>{const n=e.frame;return n?$o({current:n.scroll.current,max:n.scroll.max,change:t}):!1},"canScrollDroppable"),Nc=o((e,t)=>{const n=e.frame;return!n||!bn(e,t)?null:mn({current:n.scroll.current,max:n.scroll.max,change:t})},"getDroppableOverlap");var Tc=o(e=>{let{viewport:t,subject:n,center:r,dragStartTime:i,shouldUseTimeDampening:s,getAutoScrollerOptions:a}=e;const l=_o({dragStartTime:i,container:t.frame,subject:n,center:r,shouldUseTimeDampening:s,getAutoScrollerOptions:a});return l&&hn(t,l)?l:null},"getWindowScrollChange"),Lc=o(e=>{let{droppable:t,subject:n,center:r,dragStartTime:i,shouldUseTimeDampening:s,getAutoScrollerOptions:a}=e;const l=t.frame;if(!l)return null;const c=_o({dragStartTime:i,container:l.pageMarginBox,subject:n,center:r,shouldUseTimeDampening:s,getAutoScrollerOptions:a});return c&&bn(t,c)?c:null},"getDroppableScrollChange"),cr=o(e=>{let{state:t,dragStartTime:n,shouldUseTimeDampening:r,scrollWindow:i,scrollDroppable:s,getAutoScrollerOptions:a}=e;const l=t.current.page.borderBoxCenter,p=t.dimensions.draggables[t.critical.draggable.id].page.marginBox;if(t.isWindowScrollAllowed){const d=t.viewport,g=Tc({dragStartTime:n,viewport:d,subject:p,center:l,shouldUseTimeDampening:r,getAutoScrollerOptions:a});if(g){i(g);return}}const f=Cc({center:l,destination:K(t.impact),droppables:t.dimensions.droppables});if(!f)return;const u=Lc({dragStartTime:n,droppable:f,subject:p,center:l,shouldUseTimeDampening:r,getAutoScrollerOptions:a});u&&s(f.descriptor.id,u)},"scroll"),jc=o(e=>{let{scrollWindow:t,scrollDroppable:n,getAutoScrollerOptions:r=o(()=>We,"getAutoScrollerOptions")}=e;const i=Me(t),s=Me(n);let a=null;const l=o(f=>{a||x();const{shouldUseTimeDampening:u,dragStartTime:d}=a;cr({state:f,scrollWindow:i,scrollDroppable:s,dragStartTime:d,shouldUseTimeDampening:u,getAutoScrollerOptions:r})},"tryScroll");return{start:o(f=>{a&&x();const u=Date.now();let d=!1;const g=o(()=>{d=!0},"fakeScrollCallback");cr({state:f,dragStartTime:0,shouldUseTimeDampening:!1,scrollWindow:g,scrollDroppable:g,getAutoScrollerOptions:r}),a={dragStartTime:u,shouldUseTimeDampening:d},d&&l(f)},"start$1"),stop:o(()=>{a&&(i.cancel(),s.cancel(),a=null)},"stop"),scroll:l}},"createFluidScroller"),Mc=o(e=>{let{move:t,scrollDroppable:n,scrollWindow:r}=e;const i=o((c,p)=>{const f=U(c.current.client.selection,p);t({client:f})},"moveByOffset"),s=o((c,p)=>{if(!bn(c,p))return p;const f=Nc(c,p);if(!f)return n(c.descriptor.id,p),null;const u=J(p,f);return n(c.descriptor.id,u),J(p,u)},"scrollDroppableAsMuchAsItCan"),a=o((c,p,f)=>{if(!c||!hn(p,f))return f;const u=Oc(p,f);if(!u)return r(f),null;const d=J(f,u);return r(d),J(f,d)},"scrollWindowAsMuchAsItCan");return o(c=>{const p=c.scrollJumpRequest;if(!p)return;const f=K(c.impact);f||x();const u=s(c.dimensions.droppables[f],p);if(!u)return;const d=c.viewport,g=a(c.isWindowScrollAllowed,d,u);g&&i(c,g)},"jumpScroller")},"createJumpScroller"),Fc=o(e=>{let{scrollDroppable:t,scrollWindow:n,move:r,getAutoScrollerOptions:i}=e;const s=jc({scrollWindow:n,scrollDroppable:t,getAutoScrollerOptions:i}),a=Mc({move:r,scrollWindow:n,scrollDroppable:t});return{scroll:o(p=>{if(!(i().disabled||p.phase!=="DRAGGING")){if(p.movementMode==="FLUID"){s.scroll(p);return}p.scrollJumpRequest&&a(p)}},"scroll2"),start:s.start,stop:s.stop}},"createAutoScroller");const ye="data-rfd",De=(()=>{const e=`${ye}-drag-handle`;return{base:e,draggableId:`${e}-draggable-id`,contextId:`${e}-context-id`}})(),Ut=(()=>{const e=`${ye}-draggable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),Gc=(()=>{const e=`${ye}-droppable`;return{base:e,contextId:`${e}-context-id`,id:`${e}-id`}})(),dr={contextId:`${ye}-scroll-container-context-id`},_c=o(e=>t=>`[${t}="${e}"]`,"makeGetSelector"),Ae=o((e,t)=>e.map(n=>{const r=n.styles[t];return r?`${n.selector} { ${r} }`:""}).join(" "),"getStyles"),$c="pointer-events: none;";var Wc=o(e=>{const t=_c(e),n=(()=>{const l=` 66 | cursor: -webkit-grab; 67 | cursor: grab; 68 | `;return{selector:t(De.contextId),styles:{always:` 69 | -webkit-touch-callout: none; 70 | -webkit-tap-highlight-color: rgba(0,0,0,0); 71 | touch-action: manipulation; 72 | `,resting:l,dragging:$c,dropAnimating:l}}})(),r=(()=>{const l=` 73 | transition: ${Te.outOfTheWay}; 74 | `;return{selector:t(Ut.contextId),styles:{dragging:l,dropAnimating:l,userCancel:l}}})(),i={selector:t(Gc.contextId),styles:{always:"overflow-anchor: none;"}},a=[r,n,i,{selector:"body",styles:{dragging:` 75 | cursor: grabbing; 76 | cursor: -webkit-grabbing; 77 | user-select: none; 78 | -webkit-user-select: none; 79 | -moz-user-select: none; 80 | -ms-user-select: none; 81 | overflow-anchor: none; 82 | `}}];return{always:Ae(a,"always"),resting:Ae(a,"resting"),dragging:Ae(a,"dragging"),dropAnimating:Ae(a,"dropAnimating"),userCancel:Ae(a,"userCancel")}},"getStyles$1");const kc=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u"?D.useLayoutEffect:D.useEffect;var X=kc;const Tt=o(()=>{const e=document.querySelector("head");return e||x(),e},"getHead"),ur=o(e=>{const t=document.createElement("style");return e&&t.setAttribute("nonce",e),t.type="text/css",t},"createStyleEl");function Vc(e,t){const n=N(()=>Wc(e),[e]),r=D.useRef(null),i=D.useRef(null),s=P(W(u=>{const d=i.current;d||x(),d.textContent=u}),[]),a=P(u=>{const d=r.current;d||x(),d.textContent=u},[]);X(()=>{!r.current&&!i.current||x();const u=ur(t),d=ur(t);return r.current=u,i.current=d,u.setAttribute(`${ye}-always`,e),d.setAttribute(`${ye}-dynamic`,e),Tt().appendChild(u),Tt().appendChild(d),a(n.always),s(n.resting),()=>{const g=o(b=>{const v=b.current;v||x(),Tt().removeChild(v),b.current=null},"remove");g(r),g(i)}},[t,a,s,n.always,n.resting,e]);const l=P(()=>s(n.dragging),[s,n.dragging]),c=P(u=>{if(u==="DROP"){s(n.dropAnimating);return}s(n.userCancel)},[s,n.dropAnimating,n.userCancel]),p=P(()=>{i.current&&s(n.resting)},[s,n.resting]);return N(()=>({dragging:l,dropping:c,resting:p}),[l,c,p])}o(Vc,"useStyleMarshal");function Wo(e,t){return Array.from(e.querySelectorAll(t))}o(Wo,"querySelectorAll");var ko=o(e=>{var t;return((t=e==null?void 0:e.ownerDocument)==null?void 0:t.defaultView)||window},"getWindowFromEl");function ht(e){return e instanceof ko(e).HTMLElement}o(ht,"isHtmlElement");function Uc(e,t){const n=`[${De.contextId}="${e}"]`,r=Wo(document,n);if(!r.length)return null;const i=r.find(s=>s.getAttribute(De.draggableId)===t);return!i||!ht(i)?null:i}o(Uc,"findDragHandle");function Hc(e){const t=D.useRef({}),n=D.useRef(null),r=D.useRef(null),i=D.useRef(!1),s=P(o(function(d,g){const b={id:d,focus:g};return t.current[d]=b,o(function(){const h=t.current;h[d]!==b&&delete h[d]},"unregister")},"register2"),[]),a=P(o(function(d){const g=Uc(e,d);g&&g!==document.activeElement&&g.focus()},"tryGiveFocus2"),[e]),l=P(o(function(d,g){n.current===d&&(n.current=g)},"tryShiftRecord2"),[]),c=P(o(function(){r.current||i.current&&(r.current=requestAnimationFrame(()=>{r.current=null;const d=n.current;d&&a(d)}))},"tryRestoreFocusRecorded2"),[a]),p=P(o(function(d){n.current=null;const g=document.activeElement;g&&g.getAttribute(De.draggableId)===d&&(n.current=d)},"tryRecordFocus2"),[]);return X(()=>(i.current=!0,o(function(){i.current=!1;const d=r.current;d&&cancelAnimationFrame(d)},"clearFrameOnUnmount")),[]),N(()=>({register:s,tryRecordFocus:p,tryRestoreFocusRecorded:c,tryShiftRecord:l}),[s,p,c,l])}o(Hc,"useFocusMarshal");function qc(){const e={draggables:{},droppables:{}},t=[];function n(u){return t.push(u),o(function(){const g=t.indexOf(u);g!==-1&&t.splice(g,1)},"unsubscribe")}o(n,"subscribe");function r(u){t.length&&t.forEach(d=>d(u))}o(r,"notify");function i(u){return e.draggables[u]||null}o(i,"findDraggableById");function s(u){const d=i(u);return d||x(),d}o(s,"getDraggableById");const a={register:o(u=>{e.draggables[u.descriptor.id]=u,r({type:"ADDITION",value:u})},"register"),update:o((u,d)=>{const g=e.draggables[d.descriptor.id];g&&g.uniqueId===u.uniqueId&&(delete e.draggables[d.descriptor.id],e.draggables[u.descriptor.id]=u)},"update"),unregister:o(u=>{const d=u.descriptor.id,g=i(d);g&&u.uniqueId===g.uniqueId&&(delete e.draggables[d],e.droppables[u.descriptor.droppableId]&&r({type:"REMOVAL",value:u}))},"unregister"),getById:s,findById:i,exists:o(u=>!!i(u),"exists"),getAllByType:o(u=>Object.values(e.draggables).filter(d=>d.descriptor.type===u),"getAllByType")};function l(u){return e.droppables[u]||null}o(l,"findDroppableById");function c(u){const d=l(u);return d||x(),d}o(c,"getDroppableById");const p={register:o(u=>{e.droppables[u.descriptor.id]=u},"register"),unregister:o(u=>{const d=l(u.descriptor.id);d&&u.uniqueId===d.uniqueId&&delete e.droppables[u.descriptor.id]},"unregister"),getById:c,findById:l,exists:o(u=>!!l(u),"exists"),getAllByType:o(u=>Object.values(e.droppables).filter(d=>d.descriptor.type===u),"getAllByType")};function f(){e.draggables={},e.droppables={},t.length=0}return o(f,"clean2"),{draggable:a,droppable:p,subscribe:n,clean:f}}o(qc,"createRegistry");function zc(){const e=N(qc,[]);return D.useEffect(()=>o(function(){B.version.startsWith("16")||B.version.startsWith("17")?requestAnimationFrame(e.clean):e.clean()},"unmount"),[e]),e}o(zc,"useRegistry");var vn=B.createContext(null),ot=o(()=>{const e=document.body;return e||x(),e},"getBodyElement");const Yc={position:"absolute",width:"1px",height:"1px",margin:"-1px",border:"0",padding:"0",overflow:"hidden",clip:"rect(0 0 0 0)","clip-path":"inset(100%)"};var Jc=Yc;const Kc=o(e=>`rfd-announcement-${e}`,"getId");function Xc(e){const t=N(()=>Kc(e),[e]),n=D.useRef(null);return D.useEffect(o(function(){const s=document.createElement("div");return n.current=s,s.id=t,s.setAttribute("aria-live","assertive"),s.setAttribute("aria-atomic","true"),be(s.style,Jc),ot().appendChild(s),o(function(){setTimeout(o(function(){const c=ot();c.contains(s)&&c.removeChild(s),s===n.current&&(n.current=null)},"remove"))},"cleanup")},"setup"),[t]),P(i=>{const s=n.current;if(s){s.textContent=i;return}},[])}o(Xc,"useAnnouncer");let Qc=0;const Vo={separator:"::"};function Zc(e,t){return t===void 0&&(t=Vo),N(()=>`${e}${t.separator}${Qc++}`,[t.separator,e])}o(Zc,"useDeprecatedUniqueId");function ed(e,t){t===void 0&&(t=Vo);const n=B.useId();return N(()=>`${e}${t.separator}${n}`,[t.separator,e,n])}o(ed,"useUniqueId");var xn="useId"in B?ed:Zc;function td(e){let{contextId:t,uniqueId:n}=e;return`rfd-hidden-text-${t}-${n}`}o(td,"getElementId");function nd(e){let{contextId:t,text:n}=e;const r=xn("hidden-text",{separator:"-"}),i=N(()=>td({contextId:t,uniqueId:r}),[r,t]);return D.useEffect(o(function(){const a=document.createElement("div");return a.id=i,a.textContent=n,a.style.display="none",ot().appendChild(a),o(function(){const c=ot();c.contains(a)&&c.removeChild(a)},"unmount")},"mount"),[i,n]),i}o(nd,"useHiddenTextElement");var bt=B.createContext(null);function Uo(e){const t=D.useRef(e);return D.useEffect(()=>{t.current=e}),t}o(Uo,"usePrevious");function rd(){let e=null;function t(){return!!e}o(t,"isClaimed");function n(a){return a===e}o(n,"isActive2");function r(a){e&&x();const l={abandon:a};return e=l,l}o(r,"claim");function i(){e||x(),e=null}o(i,"release");function s(){e&&(e.abandon(),i())}return o(s,"tryAbandon"),{isClaimed:t,isActive:n,claim:r,release:i,tryAbandon:s}}o(rd,"create");function ke(e){return e.phase==="IDLE"||e.phase==="DROP_ANIMATING"?!1:e.isDragging}o(ke,"isDragging");const od=9,id=13,yn=27,Ho=32,sd=33,ad=34,ld=35,cd=36,dd=37,ud=38,pd=39,fd=40,gd={[id]:!0,[od]:!0};var qo=o(e=>{gd[e.keyCode]&&e.preventDefault()},"preventStandardKeyEvents");const md=(()=>{const e="visibilitychange";return typeof document>"u"?e:[e,`ms${e}`,`webkit${e}`,`moz${e}`,`o${e}`].find(r=>`on${r}`in document)||e})();var vt=md;const zo=0,pr=5;function hd(e,t){return Math.abs(t.x-e.x)>=pr||Math.abs(t.y-e.y)>=pr}o(hd,"isSloppyClickThresholdExceeded");const fr={type:"IDLE"};function bd(e){let{cancel:t,completed:n,getPhase:r,setPhase:i}=e;return[{eventName:"mousemove",fn:o(s=>{const{button:a,clientX:l,clientY:c}=s;if(a!==zo)return;const p={x:l,y:c},f=r();if(f.type==="DRAGGING"){s.preventDefault(),f.actions.move(p);return}f.type!=="PENDING"&&x();const u=f.point;if(!hd(u,p))return;s.preventDefault();const d=f.actions.fluidLift(p);i({type:"DRAGGING",actions:d})},"fn")},{eventName:"mouseup",fn:o(s=>{const a=r();if(a.type!=="DRAGGING"){t();return}s.preventDefault(),a.actions.drop({shouldBlockNextClick:!0}),n()},"fn")},{eventName:"mousedown",fn:o(s=>{r().type==="DRAGGING"&&s.preventDefault(),t()},"fn")},{eventName:"keydown",fn:o(s=>{if(r().type==="PENDING"){t();return}if(s.keyCode===yn){s.preventDefault(),t();return}qo(s)},"fn")},{eventName:"resize",fn:t},{eventName:"scroll",options:{passive:!0,capture:!1},fn:o(()=>{r().type==="PENDING"&&t()},"fn")},{eventName:"webkitmouseforcedown",fn:o(s=>{const a=r();if(a.type==="IDLE"&&x(),a.actions.shouldRespectForcePress()){t();return}s.preventDefault()},"fn")},{eventName:vt,fn:t}]}o(bd,"getCaptureBindings");function vd(e){const t=D.useRef(fr),n=D.useRef(se),r=N(()=>({eventName:"mousedown",fn:o(function(u){if(u.defaultPrevented||u.button!==zo||u.ctrlKey||u.metaKey||u.shiftKey||u.altKey)return;const d=e.findClosestDraggableId(u);if(!d)return;const g=e.tryGetLock(d,a,{sourceEvent:u});if(!g)return;u.preventDefault();const b={x:u.clientX,y:u.clientY};n.current(),p(g,b)},"onMouseDown")}),[e]),i=N(()=>({eventName:"webkitmouseforcewillbegin",fn:o(f=>{if(f.defaultPrevented)return;const u=e.findClosestDraggableId(f);if(!u)return;const d=e.findOptionsForDraggable(u);d&&(d.shouldRespectForcePress||e.canGetLock(u)&&f.preventDefault())},"fn")}),[e]),s=P(o(function(){const u={passive:!1,capture:!0};n.current=Z(window,[i,r],u)},"listenForCapture2"),[i,r]),a=P(()=>{t.current.type!=="IDLE"&&(t.current=fr,n.current(),s())},[s]),l=P(()=>{const f=t.current;a(),f.type==="DRAGGING"&&f.actions.cancel({shouldBlockNextClick:!0}),f.type==="PENDING"&&f.actions.abort()},[a]),c=P(o(function(){const u={capture:!0,passive:!1},d=bd({cancel:l,completed:a,getPhase:o(()=>t.current,"getPhase"),setPhase:o(g=>{t.current=g},"setPhase")});n.current=Z(window,d,u)},"bindCapturingEvents2"),[l,a]),p=P(o(function(u,d){t.current.type!=="IDLE"&&x(),t.current={type:"PENDING",point:d,actions:u},c()},"startPendingDrag2"),[c]);X(o(function(){return s(),o(function(){n.current()},"unmount")},"mount"),[s])}o(vd,"useMouseSensor");function xd(){}o(xd,"noop$1");const yd={[ad]:!0,[sd]:!0,[cd]:!0,[ld]:!0};function Dd(e,t){function n(){t(),e.cancel()}o(n,"cancel");function r(){t(),e.drop()}return o(r,"drop2"),[{eventName:"keydown",fn:o(i=>{if(i.keyCode===yn){i.preventDefault(),n();return}if(i.keyCode===Ho){i.preventDefault(),r();return}if(i.keyCode===fd){i.preventDefault(),e.moveDown();return}if(i.keyCode===ud){i.preventDefault(),e.moveUp();return}if(i.keyCode===pd){i.preventDefault(),e.moveRight();return}if(i.keyCode===dd){i.preventDefault(),e.moveLeft();return}if(yd[i.keyCode]){i.preventDefault();return}qo(i)},"fn")},{eventName:"mousedown",fn:n},{eventName:"mouseup",fn:n},{eventName:"click",fn:n},{eventName:"touchstart",fn:n},{eventName:"resize",fn:n},{eventName:"wheel",fn:n,options:{passive:!0}},{eventName:vt,fn:n}]}o(Dd,"getDraggingBindings");function Sd(e){const t=D.useRef(xd),n=N(()=>({eventName:"keydown",fn:o(function(s){if(s.defaultPrevented||s.keyCode!==Ho)return;const a=e.findClosestDraggableId(s);if(!a)return;const l=e.tryGetLock(a,f,{sourceEvent:s});if(!l)return;s.preventDefault();let c=!0;const p=l.snapLift();t.current();function f(){c||x(),c=!1,t.current(),r()}o(f,"stop"),t.current=Z(window,Dd(p,f),{capture:!0,passive:!1})},"onKeyDown")}),[e]),r=P(o(function(){const s={passive:!1,capture:!0};t.current=Z(window,[n],s)},"tryStartCapture"),[n]);X(o(function(){return r(),o(function(){t.current()},"unmount")},"mount"),[r])}o(Sd,"useKeyboardSensor");const Lt={type:"IDLE"},Id=120,Cd=.15;function wd(e){let{cancel:t,getPhase:n}=e;return[{eventName:"orientationchange",fn:t},{eventName:"resize",fn:t},{eventName:"contextmenu",fn:o(r=>{r.preventDefault()},"fn")},{eventName:"keydown",fn:o(r=>{if(n().type!=="DRAGGING"){t();return}r.keyCode===yn&&r.preventDefault(),t()},"fn")},{eventName:vt,fn:t}]}o(wd,"getWindowBindings");function Ed(e){let{cancel:t,completed:n,getPhase:r}=e;return[{eventName:"touchmove",options:{capture:!1},fn:o(i=>{const s=r();if(s.type!=="DRAGGING"){t();return}s.hasMoved=!0;const{clientX:a,clientY:l}=i.touches[0],c={x:a,y:l};i.preventDefault(),s.actions.move(c)},"fn")},{eventName:"touchend",fn:o(i=>{const s=r();if(s.type!=="DRAGGING"){t();return}i.preventDefault(),s.actions.drop({shouldBlockNextClick:!0}),n()},"fn")},{eventName:"touchcancel",fn:o(i=>{if(r().type!=="DRAGGING"){t();return}i.preventDefault(),t()},"fn")},{eventName:"touchforcechange",fn:o(i=>{const s=r();s.type==="IDLE"&&x();const a=i.touches[0];if(!a||!(a.force>=Cd))return;const c=s.actions.shouldRespectForcePress();if(s.type==="PENDING"){c&&t();return}if(c){if(s.hasMoved){i.preventDefault();return}t();return}i.preventDefault()},"fn")},{eventName:vt,fn:t}]}o(Ed,"getHandleBindings");function Pd(e){const t=D.useRef(Lt),n=D.useRef(se),r=P(o(function(){return t.current},"getPhase2"),[]),i=P(o(function(g){t.current=g},"setPhase2"),[]),s=N(()=>({eventName:"touchstart",fn:o(function(g){if(g.defaultPrevented)return;const b=e.findClosestDraggableId(g);if(!b)return;const v=e.tryGetLock(b,l,{sourceEvent:g});if(!v)return;const h=g.touches[0],{clientX:y,clientY:S}=h,w={x:y,y:S};n.current(),u(v,w)},"onTouchStart")}),[e]),a=P(o(function(){const g={capture:!0,passive:!1};n.current=Z(window,[s],g)},"listenForCapture2"),[s]),l=P(()=>{const d=t.current;d.type!=="IDLE"&&(d.type==="PENDING"&&clearTimeout(d.longPressTimerId),i(Lt),n.current(),a())},[a,i]),c=P(()=>{const d=t.current;l(),d.type==="DRAGGING"&&d.actions.cancel({shouldBlockNextClick:!0}),d.type==="PENDING"&&d.actions.abort()},[l]),p=P(o(function(){const g={capture:!0,passive:!1},b={cancel:c,completed:l,getPhase:r},v=Z(window,Ed(b),g),h=Z(window,wd(b),g);n.current=o(function(){v(),h()},"unbindAll")},"bindCapturingEvents2"),[c,r,l]),f=P(o(function(){const g=r();g.type!=="PENDING"&&x();const b=g.actions.fluidLift(g.point);i({type:"DRAGGING",actions:b,hasMoved:!1})},"startDragging2"),[r,i]),u=P(o(function(g,b){r().type!=="IDLE"&&x();const v=setTimeout(f,Id);i({type:"PENDING",point:b,actions:g,longPressTimerId:v}),p()},"startPendingDrag2"),[p,r,i,f]);X(o(function(){return a(),o(function(){n.current();const b=r();b.type==="PENDING"&&(clearTimeout(b.longPressTimerId),i(Lt))},"unmount")},"mount"),[r,a,i]),X(o(function(){return Z(window,[{eventName:"touchmove",fn:o(()=>{},"fn"),options:{capture:!1,passive:!1}}])},"webkitHack"),[])}o(Pd,"useTouchSensor");const Ad=["input","button","textarea","select","option","optgroup","video","audio"];function Yo(e,t){if(t==null)return!1;if(Ad.includes(t.tagName.toLowerCase()))return!0;const r=t.getAttribute("contenteditable");return r==="true"||r===""?!0:t===e?!1:Yo(e,t.parentElement)}o(Yo,"isAnInteractiveElement");function Rd(e,t){const n=t.target;return ht(n)?Yo(e,n):!1}o(Rd,"isEventInInteractiveElement");var Bd=o(e=>ne(e.getBoundingClientRect()).center,"getBorderBoxCenterPosition");function Od(e){return e instanceof ko(e).Element}o(Od,"isElement");const Nd=(()=>{const e="matches";return typeof document>"u"?e:[e,"msMatchesSelector","webkitMatchesSelector"].find(r=>r in Element.prototype)||e})();function Jo(e,t){return e==null?null:e[Nd](t)?e:Jo(e.parentElement,t)}o(Jo,"closestPonyfill");function Td(e,t){return e.closest?e.closest(t):Jo(e,t)}o(Td,"closest");function Ld(e){return`[${De.contextId}="${e}"]`}o(Ld,"getSelector");function jd(e,t){const n=t.target;if(!Od(n))return null;const r=Ld(e),i=Td(n,r);return!i||!ht(i)?null:i}o(jd,"findClosestDragHandleFromEvent");function Md(e,t){const n=jd(e,t);return n?n.getAttribute(De.draggableId):null}o(Md,"tryGetClosestDraggableIdFromEvent");function Fd(e,t){const n=`[${Ut.contextId}="${e}"]`,i=Wo(document,n).find(s=>s.getAttribute(Ut.id)===t);return!i||!ht(i)?null:i}o(Fd,"findDraggable");function Gd(e){e.preventDefault()}o(Gd,"preventDefault");function Je(e){let{expected:t,phase:n,isLockActive:r,shouldWarn:i}=e;return!(!r()||t!==n)}o(Je,"isActive");function Ko(e){let{lockAPI:t,store:n,registry:r,draggableId:i}=e;if(t.isClaimed())return!1;const s=r.draggable.findById(i);return!(!s||!s.options.isEnabled||!Fo(n.getState(),i))}o(Ko,"canStart");function _d(e){let{lockAPI:t,contextId:n,store:r,registry:i,draggableId:s,forceSensorStop:a,sourceEvent:l}=e;if(!Ko({lockAPI:t,store:r,registry:i,draggableId:s}))return null;const p=i.draggable.getById(s),f=Fd(n,p.descriptor.id);if(!f||l&&!p.options.canDragInteractiveElements&&Rd(f,l))return null;const u=t.claim(a||se);let d="PRE_DRAG";function g(){return p.options.shouldRespectForcePress}o(g,"getShouldRespectForcePress");function b(){return t.isActive(u)}o(b,"isLockActive");function v(C,E){Je({expected:C,phase:d,isLockActive:b,shouldWarn:!0})&&r.dispatch(E())}o(v,"tryDispatch");const h=v.bind(null,"DRAGGING");function y(C){function E(){t.release(),d="COMPLETED"}o(E,"completed"),d!=="PRE_DRAG"&&(E(),x()),r.dispatch(Il(C.liftActionArgs)),d="DRAGGING";function R(M,T){if(T===void 0&&(T={shouldBlockNextClick:!1}),C.cleanup(),T.shouldBlockNextClick){const O=Z(window,[{eventName:"click",fn:Gd,options:{once:!0,passive:!1,capture:!0}}]);setTimeout(O)}E(),r.dispatch(Ro({reason:M}))}return o(R,"finish2"),{isActive:o(()=>Je({expected:"DRAGGING",phase:d,isLockActive:b,shouldWarn:!1}),"isActive"),shouldRespectForcePress:g,drop:o(M=>R("DROP",M),"drop"),cancel:o(M=>R("CANCEL",M),"cancel"),...C.actions}}o(y,"lift2");function S(C){const E=Me(M=>{h(()=>Ao({client:M}))});return{...y({liftActionArgs:{id:s,clientSelection:C,movementMode:"FLUID"},cleanup:o(()=>E.cancel(),"cleanup"),actions:{move:E}}),move:E}}o(S,"fluidLift");function w(){const C={moveUp:o(()=>h(Nl),"moveUp"),moveRight:o(()=>h(Ll),"moveRight"),moveDown:o(()=>h(Tl),"moveDown"),moveLeft:o(()=>h(jl),"moveLeft")};return y({liftActionArgs:{id:s,clientSelection:Bd(f),movementMode:"SNAP"},cleanup:se,actions:C})}o(w,"snapLift");function I(){Je({expected:"PRE_DRAG",phase:d,isLockActive:b,shouldWarn:!0})&&t.release()}return o(I,"abortPreDrag"),{isActive:o(()=>Je({expected:"PRE_DRAG",phase:d,isLockActive:b,shouldWarn:!1}),"isActive"),shouldRespectForcePress:g,fluidLift:S,snapLift:w,abort:I}}o(_d,"tryStart");const $d=[vd,Sd,Pd];function Wd(e){let{contextId:t,store:n,registry:r,customSensors:i,enableDefaultSensors:s}=e;const a=[...s?$d:[],...i||[]],l=D.useState(()=>rd())[0],c=P(o(function(y,S){ke(y)&&!ke(S)&&l.tryAbandon()},"tryAbandonLock2"),[l]);X(o(function(){let y=n.getState();return n.subscribe(()=>{const w=n.getState();c(y,w),y=w})},"listenToStore"),[l,n,c]),X(()=>l.tryAbandon,[l.tryAbandon]);const p=P(h=>Ko({lockAPI:l,registry:r,store:n,draggableId:h}),[l,r,n]),f=P((h,y,S)=>_d({lockAPI:l,registry:r,contextId:t,store:n,draggableId:h,forceSensorStop:y||null,sourceEvent:S&&S.sourceEvent?S.sourceEvent:null}),[t,l,r,n]),u=P(h=>Md(t,h),[t]),d=P(h=>{const y=r.draggable.findById(h);return y?y.options:null},[r.draggable]),g=P(o(function(){l.isClaimed()&&(l.tryAbandon(),n.getState().phase!=="IDLE"&&n.dispatch(un()))},"tryReleaseLock2"),[l,n]),b=P(()=>l.isClaimed(),[l]),v=N(()=>({canGetLock:p,tryGetLock:f,findClosestDraggableId:u,findOptionsForDraggable:d,tryReleaseLock:g,isLockClaimed:b}),[p,f,u,d,g,b]);for(let h=0;h({onBeforeCapture:o(t=>{const n=o(()=>{e.onBeforeCapture&&e.onBeforeCapture(t)},"onBeforeCapureCallback");B.version.startsWith("16")||B.version.startsWith("17")?n():Yt.flushSync(n)},"onBeforeCapture"),onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragEnd:e.onDragEnd,onDragUpdate:e.onDragUpdate}),"createResponders"),Vd=o(e=>({...We,...e.autoScrollerOptions,durationDampening:{...We.durationDampening,...e.autoScrollerOptions}}),"createAutoScrollerOptions");function Re(e){return e.current||x(),e.current}o(Re,"getStore");function Ud(e){const{contextId:t,setCallbacks:n,sensors:r,nonce:i,dragHandleUsageInstructions:s}=e,a=D.useRef(null),l=Uo(e),c=P(()=>kd(l.current),[l]),p=P(()=>Vd(l.current),[l]),f=Xc(t),u=nd({contextId:t,text:s}),d=Vc(t,i),g=P(T=>{Re(a).dispatch(T)},[]),b=N(()=>jn({publishWhileDragging:wl,updateDroppableScroll:Pl,updateDroppableIsEnabled:Al,updateDroppableIsCombineEnabled:Rl,collectionStarting:El},g),[g]),v=zc(),h=N(()=>yc(v,b),[v,b]),y=N(()=>Fc({scrollWindow:Dc,scrollDroppable:h.scrollDroppable,getAutoScrollerOptions:p,...jn({move:Ao},g)}),[h.scrollDroppable,g,p]),S=Hc(t),w=N(()=>hc({announce:f,autoScroller:y,dimensionMarshal:h,focusMarshal:S,getResponders:c,styleMarshal:d}),[f,y,h,S,c,d]);a.current=w;const I=P(()=>{const T=Re(a);T.getState().phase!=="IDLE"&&T.dispatch(un())},[]),A=P(()=>{const T=Re(a).getState();return T.phase==="DROP_ANIMATING"?!0:T.phase==="IDLE"?!1:T.isDragging},[]),C=N(()=>({isDragging:A,tryAbort:I}),[A,I]);n(C);const E=P(T=>Fo(Re(a).getState(),T),[]),R=P(()=>fe(Re(a).getState()),[]),M=N(()=>({marshal:h,focus:S,contextId:t,canLift:E,isMovementAllowed:R,dragHandleUsageInstructionsId:u,registry:v}),[t,h,u,S,E,R,v]);return Wd({contextId:t,store:w,registry:v,customSensors:r||null,enableDefaultSensors:e.enableDefaultSensors!==!1}),D.useEffect(()=>I,[I]),B.createElement(bt.Provider,{value:M},B.createElement(ta,{context:vn,store:w},e.children))}o(Ud,"App");let Hd=0;function qd(){return N(()=>`${Hd++}`,[])}o(qd,"useDeprecatedUniqueContextId");function zd(){return B.useId()}o(zd,"useUniqueContextId");var Yd="useId"in B?zd:qd;function Jd(e){const t=Yd(),n=e.dragHandleUsageInstructions||Qe.dragHandleUsageInstructions;return B.createElement(_t,null,r=>B.createElement(Ud,{nonce:e.nonce,contextId:t,setCallbacks:r,dragHandleUsageInstructions:n,enableDefaultSensors:e.enableDefaultSensors,sensors:e.sensors,onBeforeCapture:e.onBeforeCapture,onBeforeDragStart:e.onBeforeDragStart,onDragStart:e.onDragStart,onDragUpdate:e.onDragUpdate,onDragEnd:e.onDragEnd,autoScrollerOptions:e.autoScrollerOptions},e.children))}o(Jd,"DragDropContext");const gr={dragging:5e3,dropAnimating:4500},Kd=o((e,t)=>t?Te.drop(t.duration):e?Te.snap:Te.fluid,"getDraggingTransition"),Xd=o((e,t)=>{if(e)return t?$e.opacity.drop:$e.opacity.combining},"getDraggingOpacity"),Qd=o(e=>e.forceShouldAnimate!=null?e.forceShouldAnimate:e.mode==="SNAP","getShouldDraggingAnimate");function Zd(e){const n=e.dimension.client,{offset:r,combineWith:i,dropping:s}=e,a=!!i,l=Qd(e),c=!!s,p=c?kt.drop(r,a):kt.moveTo(r);return{position:"fixed",top:n.marginBox.top,left:n.marginBox.left,boxSizing:"border-box",width:n.borderBox.width,height:n.borderBox.height,transition:Kd(l,s),transform:p,opacity:Xd(a,c),zIndex:c?gr.dropAnimating:gr.dragging,pointerEvents:"none"}}o(Zd,"getDraggingStyle");function eu(e){return{transform:kt.moveTo(e.offset),transition:e.shouldAnimateDisplacement?void 0:"none"}}o(eu,"getSecondaryStyle");function tu(e){return e.type==="DRAGGING"?Zd(e):eu(e)}o(tu,"getStyle$1");function nu(e,t,n){n===void 0&&(n=k);const r=window.getComputedStyle(t),i=t.getBoundingClientRect(),s=no(i,r),a=tt(s,n),l={client:s,tagName:t.tagName.toLowerCase(),display:r.display},c={x:s.marginBox.width,y:s.marginBox.height};return{descriptor:e,placeholder:l,displaceBy:c,client:s,page:a}}o(nu,"getDimension$1");function ru(e){const t=xn("draggable"),{descriptor:n,registry:r,getDraggableRef:i,canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}=e,c=N(()=>({canDragInteractiveElements:s,shouldRespectForcePress:a,isEnabled:l}),[s,l,a]),p=P(g=>{const b=i();return b||x(),nu(n,b,g)},[n,i]),f=N(()=>({uniqueId:t,descriptor:n,options:c,getDimension:p}),[n,p,c,t]),u=D.useRef(f),d=D.useRef(!0);X(()=>(r.draggable.register(u.current),()=>r.draggable.unregister(u.current)),[r.draggable]),X(()=>{if(d.current){d.current=!1;return}const g=u.current;u.current=f,r.draggable.update(f,g)},[f,r.draggable])}o(ru,"useDraggablePublisher");var Dn=B.createContext(null);function it(e){const t=D.useContext(e);return t||x(),t}o(it,"useRequiredContext");function ou(e){e.preventDefault()}o(ou,"preventHtml5Dnd");const iu=o(e=>{const t=D.useRef(null),n=P(function(C){C===void 0&&(C=null),t.current=C},[]),r=P(()=>t.current,[]),{contextId:i,dragHandleUsageInstructionsId:s,registry:a}=it(bt),{type:l,droppableId:c}=it(Dn),p=N(()=>({id:e.draggableId,index:e.index,type:l,droppableId:c}),[e.draggableId,e.index,l,c]),{children:f,draggableId:u,isEnabled:d,shouldRespectForcePress:g,canDragInteractiveElements:b,isClone:v,mapped:h,dropAnimationFinished:y}=e;if(!v){const C=N(()=>({descriptor:p,registry:a,getDraggableRef:r,canDragInteractiveElements:b,shouldRespectForcePress:g,isEnabled:d}),[p,a,r,b,g,d]);ru(C)}const S=N(()=>d?{tabIndex:0,role:"button","aria-describedby":s,"data-rfd-drag-handle-draggable-id":u,"data-rfd-drag-handle-context-id":i,draggable:!1,onDragStart:ou}:null,[i,s,u,d]),w=P(C=>{h.type==="DRAGGING"&&h.dropping&&C.propertyName==="transform"&&(B.version.startsWith("16")||B.version.startsWith("17")?y():Yt.flushSync(y))},[y,h]),I=N(()=>{const C=tu(h),E=h.type==="DRAGGING"&&h.dropping?w:void 0;return{innerRef:n,draggableProps:{"data-rfd-draggable-context-id":i,"data-rfd-draggable-id":u,style:C,onTransitionEnd:E},dragHandleProps:S}},[i,S,u,h,w,n]),A=N(()=>({draggableId:p.id,type:p.type,source:{index:p.index,droppableId:p.droppableId}}),[p.droppableId,p.id,p.index,p.type]);return B.createElement(B.Fragment,null,f(I,h.snapshot,A))},"Draggable");var su=iu,Xo=o((e,t)=>e===t,"isStrictEqual"),Qo=o(e=>{const{combine:t,destination:n}=e;return n?n.droppableId:t?t.droppableId:null},"whatIsDraggedOverFromResult");const au=o(e=>e.combine?e.combine.draggableId:null,"getCombineWithFromResult"),lu=o(e=>e.at&&e.at.type==="COMBINE"?e.at.combine.draggableId:null,"getCombineWithFromImpact");function cu(){const e=W((i,s)=>({x:i,y:s})),t=W(function(i,s,a,l,c){return a===void 0&&(a=null),l===void 0&&(l=null),c===void 0&&(c=null),{isDragging:!0,isClone:s,isDropAnimating:!!c,dropAnimation:c,mode:i,draggingOver:a,combineWith:l,combineTargetFor:null}}),n=W(function(i,s,a,l,c,p,f){return c===void 0&&(c=null),p===void 0&&(p=null),f===void 0&&(f=null),{mapped:{type:"DRAGGING",dropping:null,draggingOver:c,combineWith:p,mode:s,offset:i,dimension:a,forceShouldAnimate:f,snapshot:t(s,l,c,p,null)}}});return o((i,s)=>{if(ke(i)){if(i.critical.draggable.id!==s.draggableId)return null;const a=i.current.client.offset,l=i.dimensions.draggables[s.draggableId],c=K(i.impact),p=lu(i.impact),f=i.forceShouldAnimate;return n(e(a.x,a.y),i.movementMode,l,s.isClone,c,p,f)}if(i.phase==="DROP_ANIMATING"){const a=i.completed;if(a.result.draggableId!==s.draggableId)return null;const l=s.isClone,c=i.dimensions.draggables[s.draggableId],p=a.result,f=p.mode,u=Qo(p),d=au(p),b={duration:i.dropDuration,curve:fn.drop,moveTo:i.newHomeClientOffset,opacity:d?$e.opacity.drop:null,scale:d?$e.scale.drop:null};return{mapped:{type:"DRAGGING",offset:i.newHomeClientOffset,dimension:c,dropping:b,draggingOver:u,combineWith:d,mode:f,forceShouldAnimate:null,snapshot:t(f,l,u,d,b)}}}return null},"selector")}o(cu,"getDraggableSelector");function Zo(e){return e===void 0&&(e=null),{isDragging:!1,isDropAnimating:!1,isClone:!1,dropAnimation:null,mode:null,draggingOver:null,combineTargetFor:e,combineWith:null}}o(Zo,"getSecondarySnapshot");const du={mapped:{type:"SECONDARY",offset:k,combineTargetFor:null,shouldAnimateDisplacement:!0,snapshot:Zo(null)}};function uu(){const e=W((a,l)=>({x:a,y:l})),t=W(Zo),n=W(function(a,l,c){return l===void 0&&(l=null),{mapped:{type:"SECONDARY",offset:a,combineTargetFor:l,shouldAnimateDisplacement:c,snapshot:t(l)}}}),r=o(a=>a?n(k,a,!0):null,"getFallback"),i=o((a,l,c,p)=>{const f=c.displaced.visible[a],u=!!(p.inVirtualList&&p.effected[a]),d=ft(c),g=d&&d.draggableId===a?l:null;if(!f){if(!u)return r(g);if(c.displaced.invisible[a])return null;const h=Ie(p.displacedBy.point),y=e(h.x,h.y);return n(y,g,!0)}if(u)return r(g);const b=c.displacedBy.point,v=e(b.x,b.y);return n(v,g,f.shouldAnimate)},"getProps");return o((a,l)=>{if(ke(a))return a.critical.draggable.id===l.draggableId?null:i(l.draggableId,a.critical.draggable.id,a.impact,a.afterCritical);if(a.phase==="DROP_ANIMATING"){const c=a.completed;return c.result.draggableId===l.draggableId?null:i(l.draggableId,c.result.draggableId,c.impact,c.afterCritical)}return null},"selector")}o(uu,"getSecondarySelector");const pu=o(()=>{const e=cu(),t=uu();return o((r,i)=>e(r,i)||t(r,i)||du,"selector")},"makeMapStateToProps$1"),fu={dropAnimationFinished:Bo},gu=eo(pu,fu,null,{context:vn,areStatePropsEqual:Xo})(su);var mu=gu;function ei(e){return it(Dn).isUsingCloneFor===e.draggableId&&!e.isClone?null:B.createElement(mu,e)}o(ei,"PrivateDraggable");function hu(e){const t=typeof e.isDragDisabled=="boolean"?!e.isDragDisabled:!0,n=!!e.disableInteractiveElementBlocking,r=!!e.shouldRespectForcePress;return B.createElement(ei,be({},e,{isClone:!1,isEnabled:t,canDragInteractiveElements:n,shouldRespectForcePress:r}))}o(hu,"PublicDraggable");const ti=o(e=>t=>e===t,"isEqual"),bu=ti("scroll"),vu=ti("auto"),mr=o((e,t)=>t(e.overflowX)||t(e.overflowY),"isEither"),xu=o(e=>{const t=window.getComputedStyle(e),n={overflowX:t.overflowX,overflowY:t.overflowY};return mr(n,bu)||mr(n,vu)},"isElementScrollable"),yu=o(()=>!1,"isBodyScrollable"),ni=o(e=>e==null?null:e===document.body?yu()?e:null:e===document.documentElement?null:xu(e)?e:ni(e.parentElement),"getClosestScrollable");var Du=ni,Ht=o(e=>({x:e.scrollLeft,y:e.scrollTop}),"getScroll");const ri=o(e=>e?window.getComputedStyle(e).position==="fixed"?!0:ri(e.parentElement):!1,"getIsFixed");var Su=o(e=>{const t=Du(e),n=ri(e);return{closestScrollable:t,isFixedOnPage:n}},"getEnv"),Iu=o(e=>{let{descriptor:t,isEnabled:n,isCombineEnabled:r,isFixedOnPage:i,direction:s,client:a,page:l,closest:c}=e;const p=(()=>{if(!c)return null;const{scrollSize:g,client:b}=c,v=Lo({scrollHeight:g.scrollHeight,scrollWidth:g.scrollWidth,height:b.paddingBox.height,width:b.paddingBox.width});return{pageMarginBox:c.page.marginBox,frameClient:b,scrollSize:g,shouldClipSubject:c.shouldClipSubject,scroll:{initial:c.scroll,current:c.scroll,max:v,diff:{value:k,displacement:k}}}})(),f=s==="vertical"?sn:fo,u=xe({page:l,withPlaceholder:null,axis:f,frame:p});return{descriptor:t,isCombineEnabled:r,isFixedOnPage:i,axis:f,isEnabled:n,client:a,page:l,frame:p,subject:u}},"getDroppableDimension");const Cu=o((e,t)=>{const n=ro(e);if(!t||e!==t)return n;const r=n.paddingBox.top-t.scrollTop,i=n.paddingBox.left-t.scrollLeft,s=r+t.scrollHeight,a=i+t.scrollWidth,c=tn({top:r,right:a,bottom:s,left:i},n.border);return nn({borderBox:c,margin:n.margin,border:n.border,padding:n.padding})},"getClient");var wu=o(e=>{let{ref:t,descriptor:n,env:r,windowScroll:i,direction:s,isDropDisabled:a,isCombineEnabled:l,shouldClipSubject:c}=e;const p=r.closestScrollable,f=Cu(t,p),u=tt(f,i),d=(()=>{if(!p)return null;const b=ro(p),v={scrollHeight:p.scrollHeight,scrollWidth:p.scrollWidth};return{client:b,page:tt(b,i),scroll:Ht(p),scrollSize:v,shouldClipSubject:c}})();return Iu({descriptor:n,isEnabled:!a,isCombineEnabled:l,isFixedOnPage:r.isFixedOnPage,direction:s,client:f,page:u,closest:d})},"getDimension");const Eu={passive:!1},Pu={passive:!0};var hr=o(e=>e.shouldPublishImmediately?Eu:Pu,"getListenerOptions");const Ke=o(e=>e&&e.env.closestScrollable||null,"getClosestScrollableFromDrag");function Au(e){const t=D.useRef(null),n=it(bt),r=xn("droppable"),{registry:i,marshal:s}=n,a=Uo(e),l=N(()=>({id:e.droppableId,type:e.type,mode:e.mode}),[e.droppableId,e.mode,e.type]),c=D.useRef(l),p=N(()=>W((I,A)=>{t.current||x();const C={x:I,y:A};s.updateDroppableScroll(l.id,C)}),[l.id,s]),f=P(()=>{const I=t.current;return!I||!I.env.closestScrollable?k:Ht(I.env.closestScrollable)},[]),u=P(()=>{const I=f();p(I.x,I.y)},[f,p]),d=N(()=>Me(u),[u]),g=P(()=>{const I=t.current,A=Ke(I);if(I&&A||x(),I.scrollOptions.shouldPublishImmediately){u();return}d()},[d,u]),b=P((I,A)=>{t.current&&x();const C=a.current,E=C.getDroppableRef();E||x();const R=Su(E),M={ref:E,descriptor:l,env:R,scrollOptions:A};t.current=M;const T=wu({ref:E,descriptor:l,env:R,windowScroll:I,direction:C.direction,isDropDisabled:C.isDropDisabled,isCombineEnabled:C.isCombineEnabled,shouldClipSubject:!C.ignoreContainerClipping}),O=R.closestScrollable;return O&&(O.setAttribute(dr.contextId,n.contextId),O.addEventListener("scroll",g,hr(M.scrollOptions))),T},[n.contextId,l,g,a]),v=P(()=>{const I=t.current,A=Ke(I);return I&&A||x(),Ht(A)},[]),h=P(()=>{const I=t.current;I||x();const A=Ke(I);t.current=null,A&&(d.cancel(),A.removeAttribute(dr.contextId),A.removeEventListener("scroll",g,hr(I.scrollOptions)))},[g,d]),y=P(I=>{const A=t.current;A||x();const C=Ke(A);C||x(),C.scrollTop+=I.y,C.scrollLeft+=I.x},[]),S=N(()=>({getDimensionAndWatchScroll:b,getScrollWhileDragging:v,dragStopped:h,scroll:y}),[h,b,v,y]),w=N(()=>({uniqueId:r,descriptor:l,callbacks:S}),[S,l,r]);X(()=>(c.current=w.descriptor,i.droppable.register(w),()=>{t.current&&h(),i.droppable.unregister(w)}),[S,l,h,w,s,i.droppable]),X(()=>{t.current&&s.updateDroppableIsEnabled(c.current.id,!e.isDropDisabled)},[e.isDropDisabled,s]),X(()=>{t.current&&s.updateDroppableIsCombineEnabled(c.current.id,e.isCombineEnabled)},[e.isCombineEnabled,s])}o(Au,"useDroppablePublisher");function jt(){}o(jt,"noop");const br={width:0,height:0,margin:va},Ru=o(e=>{let{isAnimatingOpenOnMount:t,placeholder:n,animate:r}=e;return t||r==="close"?br:{height:n.client.borderBox.height,width:n.client.borderBox.width,margin:n.client.margin}},"getSize"),Bu=o(e=>{let{isAnimatingOpenOnMount:t,placeholder:n,animate:r}=e;const i=Ru({isAnimatingOpenOnMount:t,placeholder:n,animate:r});return{display:n.display,boxSizing:"border-box",width:i.width,height:i.height,marginTop:i.margin.top,marginRight:i.margin.right,marginBottom:i.margin.bottom,marginLeft:i.margin.left,flexShrink:"0",flexGrow:"0",pointerEvents:"none",transition:r!=="none"?Te.placeholder:null}},"getStyle"),Ou=o(e=>{const t=D.useRef(null),n=P(()=>{t.current&&(clearTimeout(t.current),t.current=null)},[]),{animate:r,onTransitionEnd:i,onClose:s,contextId:a}=e,[l,c]=D.useState(e.animate==="open");D.useEffect(()=>l?r!=="open"?(n(),c(!1),jt):t.current?jt:(t.current=setTimeout(()=>{t.current=null,c(!1)}),n):jt,[r,l,n]);const p=P(u=>{u.propertyName==="height"&&(i(),r==="close"&&s())},[r,s,i]),f=Bu({isAnimatingOpenOnMount:l,animate:e.animate,placeholder:e.placeholder});return B.createElement(e.placeholder.tagName,{style:f,"data-rfd-placeholder-context-id":a,onTransitionEnd:p,ref:e.innerRef})},"Placeholder");var Nu=B.memo(Ou);const Cn=class Cn extends B.PureComponent{constructor(){super(...arguments),this.state={isVisible:!!this.props.on,data:this.props.on,animate:this.props.shouldAnimate&&this.props.on?"open":"none"},this.onClose=()=>{this.state.animate==="close"&&this.setState({isVisible:!1})}}static getDerivedStateFromProps(t,n){return t.shouldAnimate?t.on?{isVisible:!0,data:t.on,animate:"open"}:n.isVisible?{isVisible:!0,data:n.data,animate:"close"}:{isVisible:!1,animate:"close",data:null}:{isVisible:!!t.on,data:t.on,animate:"none"}}render(){if(!this.state.isVisible)return null;const t={onClose:this.onClose,data:this.state.data,animate:this.state.animate};return this.props.children(t)}};o(Cn,"AnimateInOut");let qt=Cn;const Tu=o(e=>{const t=D.useContext(bt);t||x();const{contextId:n,isMovementAllowed:r}=t,i=D.useRef(null),s=D.useRef(null),{children:a,droppableId:l,type:c,mode:p,direction:f,ignoreContainerClipping:u,isDropDisabled:d,isCombineEnabled:g,snapshot:b,useClone:v,updateViewportMaxScroll:h,getContainerForClone:y}=e,S=P(()=>i.current,[]),w=P(function(O){O===void 0&&(O=null),i.current=O},[]);P(()=>s.current,[]);const I=P(function(O){O===void 0&&(O=null),s.current=O},[]),A=P(()=>{r()&&h({maxScroll:Mo()})},[r,h]);Au({droppableId:l,type:c,mode:p,direction:f,isDropDisabled:d,isCombineEnabled:g,ignoreContainerClipping:u,getDroppableRef:S});const C=N(()=>B.createElement(qt,{on:e.placeholder,shouldAnimate:e.shouldAnimatePlaceholder},O=>{let{onClose:_,data:H,animate:te}=O;return B.createElement(Nu,{placeholder:H,onClose:_,innerRef:I,animate:te,contextId:n,onTransitionEnd:A})}),[n,A,e.placeholder,e.shouldAnimatePlaceholder,I]),E=N(()=>({innerRef:w,placeholder:C,droppableProps:{"data-rfd-droppable-id":l,"data-rfd-droppable-context-id":n}}),[n,l,C,w]),R=v?v.dragging.draggableId:null,M=N(()=>({droppableId:l,type:c,isUsingCloneFor:R}),[l,R,c]);function T(){if(!v)return null;const{dragging:O,render:_}=v,H=B.createElement(ei,{draggableId:O.draggableId,index:O.source.index,isClone:!0,isEnabled:!0,shouldRespectForcePress:!1,canDragInteractiveElements:!0},(te,q)=>_(te,q,O));return Ei.createPortal(H,y())}return o(T,"getClone"),B.createElement(Dn.Provider,{value:M},a(E,b),T())},"Droppable");var Lu=Tu;function ju(){return document.body||x(),document.body}o(ju,"getBody");const vr={mode:"standard",type:"DEFAULT",direction:"vertical",isDropDisabled:!1,isCombineEnabled:!1,ignoreContainerClipping:!1,renderClone:null,getContainerForClone:ju},oi=o(e=>{let t={...e},n;for(n in vr)e[n]===void 0&&(t={...t,[n]:vr[n]});return t},"attachDefaultPropsToOwnProps"),Mt=o((e,t)=>e===t.droppable.type,"isMatchingType"),xr=o((e,t)=>t.draggables[e.draggable.id],"getDraggable"),Mu=o(()=>{const e={placeholder:null,shouldAnimatePlaceholder:!0,snapshot:{isDraggingOver:!1,draggingOverWith:null,draggingFromThisWith:null,isUsingPlaceholder:!1},useClone:null},t={...e,shouldAnimatePlaceholder:!1},n=W(s=>({draggableId:s.id,type:s.type,source:{index:s.index,droppableId:s.droppableId}})),r=W((s,a,l,c,p,f)=>{const u=p.descriptor.id;if(p.descriptor.droppableId===s){const b=f?{render:f,dragging:n(p.descriptor)}:null,v={isDraggingOver:l,draggingOverWith:l?u:null,draggingFromThisWith:u,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!1,snapshot:v,useClone:b}}if(!a)return t;if(!c)return e;const g={isDraggingOver:l,draggingOverWith:u,draggingFromThisWith:null,isUsingPlaceholder:!0};return{placeholder:p.placeholder,shouldAnimatePlaceholder:!0,snapshot:g,useClone:null}});return o((s,a)=>{const l=oi(a),c=l.droppableId,p=l.type,f=!l.isDropDisabled,u=l.renderClone;if(ke(s)){const d=s.critical;if(!Mt(p,d))return t;const g=xr(d,s.dimensions),b=K(s.impact)===c;return r(c,f,b,b,g,u)}if(s.phase==="DROP_ANIMATING"){const d=s.completed;if(!Mt(p,d.critical))return t;const g=xr(d.critical,s.dimensions);return r(c,f,Qo(d.result)===c,K(d.impact)===c,g,u)}if(s.phase==="IDLE"&&s.completed&&!s.shouldFlush){const d=s.completed;if(!Mt(p,d.critical))return t;const g=K(d.impact)===c,b=!!(d.impact.at&&d.impact.at.type==="COMBINE"),v=d.critical.droppable.id===c;return g?b?e:t:v?e:t}return t},"selector")},"makeMapStateToProps"),Fu={updateViewportMaxScroll:Ol},Gu=eo(Mu,Fu,(e,t,n)=>({...oi(n),...e,...t}),{context:vn,areStatePropsEqual:Xo})(Lu);var _u=Gu;const $u=o(({deal:e,index:t})=>e?m.jsx(hu,{draggableId:String(e.id),index:t,children:o((n,r)=>m.jsx(ii,{provided:n,snapshot:r,deal:e}),"children")}):null,"DealCard"),ii=o(({provided:e,snapshot:t,deal:n})=>{const r=Se(),i=o(()=>{r(`/deals/${n.id}/show`,void 0,void 0,void 0,{_scrollToTop:!1})},"handleClick");return m.jsx($,{sx:{marginBottom:1,cursor:"pointer"},...e==null?void 0:e.draggableProps,...e==null?void 0:e.dragHandleProps,ref:e==null?void 0:e.innerRef,onClick:i,children:m.jsx(Ar,{style:{opacity:t!=null&&t.isDragging?.9:1,transform:t!=null&&t.isDragging?"rotate(-2deg)":""},elevation:t!=null&&t.isDragging?3:1,children:m.jsxs($,{padding:1,display:"flex",children:[m.jsx(Jt,{source:"company_id",record:n,reference:"companies",link:!1,children:m.jsx(Kt,{width:20,height:20})}),m.jsxs($,{sx:{marginLeft:1},children:[m.jsx(j,{variant:"body2",gutterBottom:!0,children:n.name}),m.jsxs(j,{variant:"caption",color:"textSecondary",children:[n.amount.toLocaleString("en-US",{notation:"compact",style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",minimumSignificantDigits:3}),n.category?`, ${n.category}`:""]})]})]})})})},"DealCardContent"),yr=o(()=>{const{identity:e}=Ve(),{data:t,total:n,isPending:r}=zt("deals",{pagination:{page:1,perPage:1e3},sort:{field:"archived_at",order:"DESC"},filter:{"archived_at@not.is":null}}),[i,s]=D.useState(!1);if(D.useEffect(()=>{!r&&n===0&&s(!1)},[r,n]),D.useEffect(()=>{s(!1)},[t]),!e||r||!n||!t)return null;const a=t.reduce((l,c)=>{const p=new Date(c.archived_at).toDateString();return l[p]||(l[p]=[]),l[p].push(c),l},{});return m.jsxs(m.Fragment,{children:[m.jsx(st,{variant:"text",onClick:o(()=>s(!0),"onClick"),sx:{my:1},children:"View archived deals"}),m.jsxs(at,{open:i,onClose:o(()=>s(!1),"onClose"),fullWidth:!0,maxWidth:"lg",children:[m.jsx(lt,{onClose:o(()=>s(!1),"onClose")}),m.jsx(Xt,{children:"Archived Deals"}),m.jsx(ct,{children:m.jsx(F,{gap:2,children:Object.entries(a).map(([l,c])=>m.jsxs(F,{gap:1,children:[m.jsx(j,{variant:"body1",fontWeight:"bold",children:Wu(l)}),m.jsx(Pn,{container:!0,spacing:2,children:c.map(p=>m.jsx(Pn,{item:!0,xs:12,sm:6,md:4,children:m.jsx(ii,{deal:p})},p.id))})]},l))})})]})]})},"DealArchivedList");function Wu(e){const t=new Date(e);t.setHours(0,0,0,0);const n=new Date;n.setHours(0,0,0,0);const r=t.getTime()-n.getTime(),i=Math.round(r/(1e3*60*60*24));if(Math.abs(i)>7)return new Intl.DateTimeFormat(void 0,{day:"numeric",month:"long"}).format(t);const s=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"});return ku(s.format(i,"day"))}o(Wu,"getRelativeTimeString");function ku(e){return e.charAt(0).toUpperCase()+e.slice(1)}o(ku,"ucFirst");const Le=Ri(),si=o(()=>{const e=Pi(),t=Ai(e.breakpoints.down("md"));return m.jsxs(F,{gap:4,p:1,children:[m.jsx(Vu,{}),m.jsxs(F,{gap:4,flexDirection:t?"column":"row",children:[m.jsx(Uu,{}),m.jsx(Rr,{orientation:t?"horizontal":"vertical",flexItem:!0}),m.jsx(Hu,{})]})]})},"DealInputs"),Vu=o(()=>m.jsxs(F,{gap:1,flex:1,children:[m.jsx(An,{source:"name",label:"Deal name",validate:Le,helperText:!1}),m.jsx(An,{source:"description",multiline:!0,rows:3,helperText:!1})]}),"DealInfoInputs"),Uu=o(()=>{const[e]=Bi(),t=dt(),{identity:n}=Ve(),r=o(async i=>{if(i)try{return await e("companies",{data:{name:i,sales_id:n==null?void 0:n.id,created_at:new Date().toISOString()}},{returnPromise:!0})}catch{t("An error occurred while creating the company",{type:"error"})}},"handleCreateCompany");return m.jsxs(F,{gap:1,flex:1,children:[m.jsx(j,{variant:"subtitle1",children:"Linked to"}),m.jsx(Br,{source:"company_id",reference:"companies",children:m.jsx(wr,{optionText:"name",onCreate:r,validate:Le,helperText:!1})}),m.jsx(xs,{source:"contact_ids",reference:"contacts_summary",children:m.jsx(Ur,{label:"Contacts",optionText:Ni,inputText:Oi,helperText:!1})})]})},"DealLinkedToInputs"),Hu=o(()=>{const{dealStages:e,dealCategories:t}=Ue();return m.jsxs(F,{gap:1,flex:1,children:[m.jsx(j,{variant:"subtitle1",children:"Misc"}),m.jsx(Ft,{source:"category",label:"Category",choices:t.map(n=>({id:n,name:n})),helperText:!1}),m.jsx(ms,{source:"amount",defaultValue:0,validate:Le,helperText:!1}),m.jsx(Ti,{source:"expected_closing_date",fullWidth:!0,validate:[Le],helperText:!1,inputProps:{max:"9999-12-31"},defaultValue:new Date().toISOString().split("T")[0]}),m.jsx(Ft,{source:"stage",choices:e.map(n=>({id:n.value,name:n.label})),validate:Le,defaultValue:"opportunity",helperText:!1})]})},"DealMiscInputs"),ai=o(({open:e})=>{const t=Se(),n=Qt(),{data:r}=ut(),i=o(()=>{t("/deals")},"handleClose"),s=Li(),a=o(async c=>{if(!r){t("/deals");return}const p=r.filter(d=>d.stage===c.stage&&d.id!==c.id);await Promise.all(p.map(async d=>n.update("deals",{id:d.id,data:{index:d.index+1},previousData:d})));const f=p.reduce((d,g)=>({...d,[g.id]:{...g,index:g.index+1}}),{}),u=Date.now();s.setQueriesData({queryKey:["deals","getList"]},d=>d&&{...d,data:d.data.map(g=>f[g.id]||g)},{updatedAt:u}),t("/deals")},"onSuccess"),{identity:l}=Ve();return m.jsx(at,{open:e,onClose:i,fullWidth:!0,maxWidth:"md",children:m.jsxs(ji,{resource:"deals",mutationOptions:{onSuccess:a},sx:{"& .RaCreate-main":{mt:0}},children:[m.jsx(lt,{onClose:i}),m.jsx(Xt,{sx:{paddingBottom:0},children:"Create a new deal"}),m.jsxs(Or,{defaultValues:{sales_id:l==null?void 0:l.id,contact_ids:[],index:0},children:[m.jsx(ct,{children:m.jsx(si,{})}),m.jsx(Nr,{children:m.jsx(Tr,{})})]})]})})},"DealCreate"),qu=o(({open:e,id:t})=>{const n=Se(),r=dt(),i=o(()=>{n("/deals",void 0,void 0,void 0,{_scrollToTop:!1})},"handleClose");return m.jsx(at,{open:e,onClose:i,fullWidth:!0,maxWidth:"md",sx:{"& .MuiDialog-container":{alignItems:"flex-start"}},children:t?m.jsxs(Mi,{id:t,mutationMode:"pessimistic",mutationOptions:{onSuccess:o(()=>{r("Deal updated"),n(`/deals/${t}/show`,void 0,void 0,void 0,{_scrollToTop:!1})},"onSuccess")},children:[m.jsx(lt,{onClose:i,top:13}),m.jsx(zu,{}),m.jsxs(Or,{children:[m.jsx(ct,{children:m.jsx(si,{})}),m.jsx(Yu,{})]})]}):null})},"DealEdit");function zu(){const e=Lr();return e?m.jsx(Xt,{sx:{paddingBottom:0},children:m.jsxs(F,{direction:"row",alignItems:"center",justifyContent:"space-between",spacing:1,children:[m.jsxs(F,{direction:"row",alignItems:"center",gap:2,children:[m.jsx(Jt,{source:"company_id",reference:"companies",link:"show",children:m.jsx(Kt,{})}),m.jsxs(j,{variant:"h6",children:["Edit ",e.name," deal"]})]}),m.jsx(F,{direction:"row",spacing:1,sx:{pr:3},children:m.jsx(st,{component:Zt,to:`/deals/${e.id}/show`,size:"small",children:"Back to deal"})})]})}):null}o(zu,"EditHeader");function Yu(){return m.jsxs(Nr,{sx:{display:"flex",justifyContent:"space-between"},children:[m.jsx(Tr,{}),m.jsx(jr,{mutationMode:"undoable"})]})}o(Yu,"EditToolbar");const Ju=o(({children:e})=>{const t=Mr(),n=Xe("/deals/create",t.pathname),r=Fi(),{data:i,isPending:s}=zt("contacts",{pagination:{page:1,perPage:1}});return s?m.jsx(Gi,{}):m.jsxs(F,{justifyContent:"center",alignItems:"center",gap:3,sx:{height:`calc(100dvh - ${r}px)`},children:[m.jsx("img",{src:"./img/empty.svg",alt:"No contacts found"}),i&&i.length>0?m.jsxs(m.Fragment,{children:[m.jsxs(F,{gap:0,alignItems:"center",children:[m.jsx(j,{variant:"h6",fontWeight:"bold",children:"No deals found"}),m.jsx(j,{variant:"body2",align:"center",color:"text.secondary",gutterBottom:!0,children:"It seems your deal list is empty."})]}),m.jsx(F,{spacing:2,direction:"row",children:m.jsx(Fr,{variant:"contained",label:"Create deal"})}),m.jsx(ai,{open:!!n}),e]}):m.jsxs(F,{gap:0,alignItems:"center",children:[m.jsx(j,{variant:"h6",fontWeight:"bold",children:"No deals found"}),m.jsxs(j,{variant:"body2",align:"center",color:"text.secondary",gutterBottom:!0,children:["It seems your contact list is empty.",m.jsx("br",{}),m.jsx(Zt,{to:"/contacts/create",children:"Add your first contact"})," ","before creating a deal."]})]})]})},"DealEmpty"),Ku=o(({stage:e,deals:t})=>{const n=t.reduce((i,s)=>i+s.amount,0),{dealStages:r}=Ue();return m.jsxs($,{sx:{flex:1,paddingTop:"8px",paddingBottom:"16px",bgcolor:"#eaeaee","&:first-of-type":{paddingLeft:"5px",borderTopLeftRadius:5},"&:last-of-type":{paddingRight:"5px",borderTopRightRadius:5}},children:[m.jsxs(F,{alignItems:"center",children:[m.jsx(j,{variant:"subtitle1",children:Gr(r,e)}),m.jsx(j,{variant:"subtitle1",color:"text.secondary",fontSize:"small",children:n.toLocaleString("en-US",{notation:"compact",style:"currency",currency:"USD",currencyDisplay:"narrowSymbol",minimumSignificantDigits:3})})]}),m.jsx(_u,{droppableId:e,children:o((i,s)=>m.jsxs($,{ref:i.innerRef,...i.droppableProps,className:s.isDraggingOver?" isDraggingOver":"",sx:{display:"flex",flexDirection:"column",borderRadius:1,padding:"5px","&.isDraggingOver":{bgcolor:"#dadadf"}},children:[t.map((a,l)=>m.jsx($u,{deal:a,index:l},a.id)),i.placeholder]}),"children")})]})},"DealColumn"),Dr=o((e,t)=>{if(!t)return{};const n=e.reduce((r,i)=>(r[i.stage].push(i),r),t.reduce((r,i)=>({...r,[i.value]:[]}),{}));return t.forEach(r=>{n[r.value]=n[r.value].sort((i,s)=>i.index-s.index)}),n},"getDealsByStage"),Xu=o(()=>{const{dealStages:e}=Ue(),{data:t,isPending:n,refetch:r}=ut(),i=Qt(),[s,a]=D.useState(Dr([],e));if(D.useEffect(()=>{if(t){const c=Dr(t,e);_i(c,s)||a(c)}},[t]),n)return null;const l=o(c=>{const{destination:p,source:f}=c;if(!p||p.droppableId===f.droppableId&&p.index===f.index)return;const u=f.droppableId,d=p.droppableId,g=s[u][f.index],b=s[d][p.index]??{stage:d,index:void 0};a(Qu(g,{stage:u,index:f.index},{stage:d,index:p.index},s)),Zu(g,b,i).then(()=>{r()})},"onDragEnd");return m.jsx(Jd,{onDragEnd:l,children:m.jsx($,{display:"flex",children:e.map(c=>m.jsx(Ku,{stage:c.value,deals:s[c.value]},c.value))})})},"DealListContent"),Qu=o((e,t,n,r)=>{if(t.stage===n.stage){const i=r[t.stage];return i.splice(t.index,1),i.splice(n.index??i.length+1,0,e),{...r,[n.stage]:i}}else{const i=r[t.stage],s=r[n.stage];return i.splice(t.index,1),s.splice(n.index??s.length+1,0,e),{...r,[t.stage]:i,[n.stage]:s}}},"updateDealStageLocal"),Zu=o(async(e,t,n)=>{if(e.stage===t.stage){const{data:r}=await n.getList("deals",{sort:{field:"index",order:"ASC"},pagination:{page:1,perPage:100},filter:{stage:e.stage}}),i=t.index??r.length+1;e.index>i?await Promise.all([...r.filter(s=>s.index>=i&&s.indexn.update("deals",{id:s.id,data:{index:s.index+1},previousData:s})),n.update("deals",{id:e.id,data:{index:i},previousData:e})]):await Promise.all([...r.filter(s=>s.index<=i&&s.index>e.index).map(s=>n.update("deals",{id:s.id,data:{index:s.index-1},previousData:s})),n.update("deals",{id:e.id,data:{index:i},previousData:e})])}else{const[{data:r},{data:i}]=await Promise.all([n.getList("deals",{sort:{field:"index",order:"ASC"},pagination:{page:1,perPage:100},filter:{stage:e.stage}}),n.getList("deals",{sort:{field:"index",order:"ASC"},pagination:{page:1,perPage:100},filter:{stage:t.stage}})]),s=t.index??i.length+1;await Promise.all([...r.filter(a=>a.index>e.index).map(a=>n.update("deals",{id:a.id,data:{index:a.index-1},previousData:a})),...i.filter(a=>a.index>=s).map(a=>n.update("deals",{id:a.id,data:{index:a.index+1},previousData:a})),n.update("deals",{id:e.id,data:{index:s,stage:t.stage},previousData:e})])}},"updateDealStage");var Be={},Sr;function ep(){if(Sr)return Be;Sr=1;var e=_r();Object.defineProperty(Be,"__esModule",{value:!0}),Be.default=void 0;var t=e($r()),n=Wr();return Be.default=(0,t.default)((0,n.jsx)("path",{d:"m20.54 5.23-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.16.55L3.46 5.23C3.17 5.57 3 6.02 3 6.5V19c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.48-.17-.93-.46-1.27M12 17.5 6.5 12H10v-2h4v2h3.5zM5.12 5l.81-1h12l.94 1z"}),"Archive"),Be}o(ep,"requireArchive");var tp=ep();const np=kr(tp);var Oe={},Ir;function rp(){if(Ir)return Oe;Ir=1;var e=_r();Object.defineProperty(Oe,"__esModule",{value:!0}),Oe.default=void 0;var t=e($r()),n=Wr();return Oe.default=(0,t.default)((0,n.jsx)("path",{d:"m20.55 5.22-1.39-1.68C18.88 3.21 18.47 3 18 3H6c-.47 0-.88.21-1.15.55L3.46 5.22C3.17 5.57 3 6.01 3 6.5V19c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V6.5c0-.49-.17-.93-.45-1.28M12 9.5l5.5 5.5H14v2h-4v-2H6.5zM5.12 5l.82-1h12l.93 1z"}),"Unarchive"),Oe}o(rp,"requireUnarchive");var op=rp();const ip=kr(op),sp=o(()=>{const{data:e,error:t,isPending:n}=ut();return n||t?m.jsx("div",{style:{height:"2em"}}):m.jsx(F,{direction:"row",flexWrap:"wrap",gap:3,mt:1,children:e.map(r=>m.jsxs(F,{direction:"row",gap:1,children:[m.jsx($i,{record:r}),m.jsxs(F,{children:[m.jsxs(Wi,{component:Zt,to:`/contacts/${r.id}/show`,variant:"body2",children:[r.first_name," ",r.last_name]}),m.jsxs(j,{variant:"caption",color:"text.secondary",children:[r.title,r.title&&r.company_name&&" at ",r.company_name]})]})]},r.id))})},"ContactList"),Cr=o(({open:e,id:t})=>{const n=Se(),r=o(()=>{n("list","deals")},"handleClose");return m.jsx(at,{open:e,onClose:r,fullWidth:!0,maxWidth:"md",sx:{"& .MuiDialog-container":{alignItems:"flex-start"}},children:m.jsx(ct,{sx:{padding:0},children:t?m.jsx(ki,{id:t,children:m.jsx(lp,{handleClose:r})}):null})})},"DealShow"),ap=14,lp=o(({handleClose:e})=>{var r;const{dealStages:t}=Ue(),n=Lr();return n?m.jsxs(m.Fragment,{children:[m.jsx(lt,{onClose:e,top:n.archived_at?ap:16,right:10,color:n.archived_at?"white":void 0}),m.jsxs(F,{gap:1,children:[n.archived_at?m.jsx(cp,{}):null,m.jsx($,{display:"flex",p:2,children:m.jsxs($,{flex:"1",children:[m.jsxs(F,{direction:"row",justifyContent:"space-between",mb:4,children:[m.jsxs(F,{direction:"row",alignItems:"center",gap:2,children:[m.jsx(Jt,{source:"company_id",reference:"companies",link:"show",sx:{"& a":{textDecoration:"none"}},children:m.jsx(Kt,{})}),m.jsx(j,{variant:"h5",children:n.name})]}),m.jsx(F,{gap:1,direction:"row",pr:n.archived_at?0:6,children:n.archived_at?m.jsxs(m.Fragment,{children:[m.jsx(up,{record:n}),m.jsx(jr,{})]}):m.jsxs(m.Fragment,{children:[m.jsx(dp,{record:n}),m.jsx(Vi,{scrollToTop:!1})]})})]}),m.jsxs($,{display:"flex",m:2,children:[m.jsxs($,{display:"flex",mr:5,flexDirection:"column",children:[m.jsx(j,{color:"textSecondary",variant:"caption",children:"Expected closing date"}),m.jsxs(F,{direction:"row",alignItems:"center",gap:1,children:[m.jsx(j,{variant:"body2",children:Hi(new Date(n.expected_closing_date))?Ui(new Date(n.expected_closing_date),"PP"):"Invalid date"}),new Date(n.expected_closing_date)m.jsx($,{sx:{background:o(e=>e.palette.warning.main,"background"),px:3,py:2},children:m.jsx(j,{variant:"h6",fontWeight:"bold",sx:{color:o(e=>e.palette.warning.contrastText,"color")},children:"Archived Deal"})}),"ArchivedTitle"),dp=o(({record:e})=>{const[t]=Xi(),n=Se(),r=dt(),i=Vr(),s=o(()=>{t("deals",{id:e.id,data:{archived_at:new Date().toISOString()},previousData:e},{onSuccess:o(()=>{n("list","deals"),r("Deal archived",{type:"info",undoable:!1}),i()},"onSuccess"),onError:o(()=>{r("Error: deal not archived",{type:"error"})},"onError")})},"handleClick");return m.jsx(st,{onClick:s,startIcon:m.jsx(np,{}),size:"small",children:"Archive"})},"ArchiveButton"),up=o(({record:e})=>{const t=Qt(),n=Se(),r=dt(),i=Vr(),{mutate:s}=Ki({mutationFn:o(()=>t.unarchiveDeal(e),"mutationFn"),onSuccess:o(()=>{n("list","deals"),r("Deal unarchived",{type:"info",undoable:!1}),i()},"onSuccess"),onError:o(()=>{r("Error: deal not unarchived",{type:"error"})},"onError")}),a=o(()=>{s()},"handleClick");return m.jsx(st,{onClick:a,startIcon:m.jsx(ip,{}),size:"small",children:"Send back to the board"})},"UnarchiveButton"),pp=o(e=>{const{filterValues:t,displayedFilters:n,setFilters:r}=Qi(),{identity:i}=Ve(),s=o(()=>{const a={...t};typeof t.sales_id<"u"?delete a.sales_id:a.sales_id=i==null?void 0:i.id,r(a,n)},"handleChange");return m.jsx($,{sx:{marginBottom:1,marginLeft:1},children:m.jsx(Zi,{control:m.jsx(es,{checked:typeof t.sales_id<"u",onChange:s,color:"primary",name:"checkedC"}),label:"Only companies I manage"})})},"OnlyMineInput"),vp=o(()=>{const{identity:e}=Ve();return e?m.jsx(ts,{perPage:100,filter:{"archived_at@is":null},sort:{field:"index",order:"DESC"},children:m.jsx(fp,{})}):null},"DealList"),fp=o(()=>{const e=Mr(),t=Xe("/deals/create",e.pathname),n=Xe("/deals/:id/show",e.pathname),r=Xe("/deals/:id",e.pathname),{dealCategories:i}=Ue(),s=[m.jsx(ns,{source:"q",alwaysOn:!0}),m.jsx(Br,{source:"company_id",reference:"companies"}),m.jsx(Ft,{source:"category",label:"Category",choices:i.map(f=>({id:f,name:f}))}),m.jsx(pp,{source:"sales_id",alwaysOn:!0})],{data:a,isPending:l,filterValues:c}=ut(),p=c&&Object.keys(c).length>0;return l?null:!(a!=null&&a.length)&&!p?m.jsx(m.Fragment,{children:m.jsxs(Ju,{children:[m.jsx(Cr,{open:!!n,id:n==null?void 0:n.params.id}),m.jsx(yr,{})]})}):m.jsxs(F,{component:"div",sx:{width:"100%"},children:[m.jsx(rs,{title:"Deals"}),m.jsx(os,{filters:s,actions:m.jsx(gp,{})}),m.jsx(Ar,{children:m.jsx(Xu,{})}),m.jsx(yr,{}),m.jsx(ai,{open:!!t}),m.jsx(qu,{open:!!r&&!t,id:r==null?void 0:r.params.id}),m.jsx(Cr,{open:!!n,id:n==null?void 0:n.params.id})]})},"DealLayout"),gp=o(()=>m.jsxs(is,{children:[m.jsx(ss,{}),m.jsx(as,{}),m.jsx(Fr,{variant:"contained",label:"New Deal",sx:{marginLeft:2}})]}),"DealActions");export{vp as default}; 83 | //# sourceMappingURL=DealList-DHFfng8u.js.map 84 | --------------------------------------------------------------------------------