@protobase/ui 0.46.3 → 0.46.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (214) hide show
  1. package/dist/account/account-page.js +50 -0
  2. package/dist/account/account-pages.js +24 -9
  3. package/dist/account/account-tree.js +18 -0
  4. package/dist/account/blocks/account-loading.js +19 -0
  5. package/dist/account/blocks/connected-accounts-block.js +37 -0
  6. package/dist/account/blocks/connected-apps-block.js +21 -0
  7. package/dist/account/blocks/devices-block.js +23 -0
  8. package/dist/account/blocks/passkeys-block.js +25 -0
  9. package/dist/account/blocks/password-block.js +27 -0
  10. package/dist/account/blocks/profile-block.js +28 -0
  11. package/dist/account/blocks/two-factor-block.js +29 -0
  12. package/dist/account/blocks/use-account-data.js +24 -0
  13. package/dist/account/change-email-dialog.js +98 -0
  14. package/dist/account/connected-apps-section.js +4 -4
  15. package/dist/account/device-name.js +26 -0
  16. package/dist/account/devices-section.js +119 -0
  17. package/dist/account/messages.js +94 -2
  18. package/dist/account/passkeys-section.js +4 -4
  19. package/dist/account/password-change-dialog.js +119 -0
  20. package/dist/account/password-dialog.js +2 -2
  21. package/dist/account/password-section.js +51 -0
  22. package/dist/account/profile-section.js +107 -0
  23. package/dist/account/sign-in-policy-form.js +1 -1
  24. package/dist/account/sign-in-policy-page.js +1 -1
  25. package/dist/account/sign-in-providers-section.js +2 -2
  26. package/dist/account/staff-sign-in-log.js +1 -1
  27. package/dist/account/two-factor-section.js +1 -1
  28. package/dist/account/two-factor-setup.js +2 -2
  29. package/dist/activity-chart/activity-chart.js +2 -2
  30. package/dist/app/app.js +39 -23
  31. package/dist/app/charts/chart-view.js +2 -2
  32. package/dist/app/comments/comment-composer.js +1 -1
  33. package/dist/app/comments/comments-section.js +3 -3
  34. package/dist/app/create/create-page.js +4 -4
  35. package/dist/app/current-address.d.ts +1 -0
  36. package/dist/app/custom-section.js +4 -4
  37. package/dist/app/delete/use-delete-flow.js +1 -1
  38. package/dist/app/displays/board-column.js +1 -1
  39. package/dist/app/displays/board-display.js +2 -2
  40. package/dist/app/displays/calendar-display.js +2 -2
  41. package/dist/app/displays/custom-display.js +3 -3
  42. package/dist/app/displays/display-controls.js +1 -1
  43. package/dist/app/displays/map-display.js +2 -2
  44. package/dist/app/displays/period-controls.js +1 -1
  45. package/dist/app/displays/record-card.js +2 -2
  46. package/dist/app/displays/timeline-display.js +2 -2
  47. package/dist/app/displays/use-calendar-move.js +1 -1
  48. package/dist/app/document-title.js +2 -2
  49. package/dist/app/embedded-list/embedded-display.js +1 -1
  50. package/dist/app/embedded-list/embedded-list.js +1 -1
  51. package/dist/app/export/export-dialog.js +2 -2
  52. package/dist/app/export/use-export-flow.js +1 -1
  53. package/dist/app/field-editor.js +2 -2
  54. package/dist/app/file-field.js +3 -3
  55. package/dist/app/gallery/gallery-section.js +2 -2
  56. package/dist/app/gallery/photo-details.js +1 -1
  57. package/dist/app/gallery/use-gallery-photos.js +1 -1
  58. package/dist/app/hand-order/hand-sorted-list.js +3 -3
  59. package/dist/app/history/history-section.js +2 -2
  60. package/dist/app/import/import-button.js +1 -1
  61. package/dist/app/import/import-check-step.js +1 -1
  62. package/dist/app/incoming-card.js +2 -2
  63. package/dist/app/list-group-chart.js +1 -1
  64. package/dist/app/list-page.js +6 -6
  65. package/dist/app/messages.js +0 -2
  66. package/dist/app/meta-gate.js +1 -1
  67. package/dist/app/nav-from-meta.js +1 -1
  68. package/dist/app/new-version/new-version-banner.js +1 -1
  69. package/dist/app/new-version/new-version-button.js +1 -1
  70. package/dist/app/new-version/new-version-toast.js +1 -1
  71. package/dist/app/pages/action-inputs/action-inputs-dialog.js +2 -2
  72. package/dist/app/pages/action-inputs/input-answers.js +1 -1
  73. package/dist/app/pages/blocks/card-row.js +2 -2
  74. package/dist/app/pages/blocks/field.js +1 -1
  75. package/dist/app/pages/blocks/form-draft.js +19 -0
  76. package/dist/app/pages/blocks/modal-form.js +10 -24
  77. package/dist/app/pages/blocks/page-block.js +1 -1
  78. package/dist/app/pages/blocks/record-card.js +2 -2
  79. package/dist/app/pages/blocks/settings.js +179 -0
  80. package/dist/app/pages/blocks/stat.js +2 -2
  81. package/dist/app/pages/blocks/tabs.js +59 -0
  82. package/dist/app/pages/composed-page.js +16 -3
  83. package/dist/app/pages/custom-boundary.js +1 -1
  84. package/dist/app/pages/field-value.js +1 -1
  85. package/dist/app/pages/messages.js +6 -0
  86. package/dist/app/pages/page-tabs.js +27 -0
  87. package/dist/app/pages/record-actions.js +2 -2
  88. package/dist/app/pages/render-node.js +22 -3
  89. package/dist/app/pages/use-run-action.js +1 -1
  90. package/dist/app/project-logo.js +2 -2
  91. package/dist/app/record-chart/record-chart-section.js +4 -4
  92. package/dist/app/record-page.js +12 -12
  93. package/dist/app/record-row/record-row-body.js +1 -1
  94. package/dist/app/record-row/saved-record-row.js +1 -1
  95. package/dist/app/related-cards/related-card.js +1 -1
  96. package/dist/app/related-dots/related-dots-columns.js +1 -1
  97. package/dist/app/related-section.js +2 -2
  98. package/dist/app/relation-picker.js +1 -1
  99. package/dist/app/router.js +2 -2
  100. package/dist/app/saved/saved-list.js +1 -1
  101. package/dist/app/search/use-global-search.js +1 -1
  102. package/dist/app/searches/save-search-button.js +1 -1
  103. package/dist/app/searches/saved-search-rows.js +1 -1
  104. package/dist/app/searches/saved-search-section.js +2 -2
  105. package/dist/app/searches/saved-searches.js +3 -3
  106. package/dist/app/searches/search-controls.js +2 -2
  107. package/dist/app/searches/search-name-dialog.js +1 -1
  108. package/dist/app/searches/update-search-dialog.js +2 -2
  109. package/dist/app/searches/use-save-search.js +1 -1
  110. package/dist/app/sensitive-field.js +2 -2
  111. package/dist/app/source-notice.js +1 -1
  112. package/dist/app/staff-banner.js +2 -2
  113. package/dist/app/use-app-address.js +2 -2
  114. package/dist/app/use-incoming-counts.js +1 -1
  115. package/dist/app-shell/app-shell.js +2 -1
  116. package/dist/app-shell/breadcrumb.js +1 -1
  117. package/dist/app-shell/drawer.js +1 -1
  118. package/dist/app-shell/global-search.js +1 -1
  119. package/dist/app-shell/profile-menu.js +27 -12
  120. package/dist/app-shell/sidebar.js +2 -1
  121. package/dist/assistant-dock/widget-view.js +1 -1
  122. package/dist/auth/auth-gate.js +2 -2
  123. package/dist/auth/auth-messages.js +2 -2
  124. package/dist/auth/auth-provider.js +4 -0
  125. package/dist/auth/code-form.js +1 -1
  126. package/dist/auth/email-code-form.js +1 -1
  127. package/dist/auth/email-code-page.js +1 -1
  128. package/dist/auth/forgot-password-form.js +4 -4
  129. package/dist/auth/provider-sign-in-page.js +2 -2
  130. package/dist/auth/reset-password-form.js +1 -1
  131. package/dist/auth/setup-required-form.js +1 -1
  132. package/dist/auth/setup-required-page.js +2 -2
  133. package/dist/auth/sign-in-form.js +2 -2
  134. package/dist/auth/sign-in-page.js +1 -1
  135. package/dist/auth/sign-in-prompt.js +2 -2
  136. package/dist/auth/sign-up-code-form.js +1 -1
  137. package/dist/auth/sign-up-details-form.js +2 -2
  138. package/dist/auth/sign-up-email-form.js +1 -1
  139. package/dist/auth/sign-up-page.js +1 -1
  140. package/dist/auth/staff-sign-in-form.js +2 -2
  141. package/dist/auth/staff-sign-in-page.js +1 -1
  142. package/dist/auth/two-factor-form.js +3 -3
  143. package/dist/auth/two-factor-page.js +1 -1
  144. package/dist/chat/composer.js +1 -1
  145. package/dist/connect/connect-page.js +4 -4
  146. package/dist/data/meta-data.d.ts +3 -1
  147. package/dist/data/use-meta.js +1 -0
  148. package/dist/data-grid/cell-text.js +1 -1
  149. package/dist/data-grid/cells.js +3 -3
  150. package/dist/data-grid/grid-header.js +1 -1
  151. package/dist/data-grid/grid-row.js +2 -2
  152. package/dist/data-grid/row-menu.js +1 -1
  153. package/dist/filter-panel/facet-group.js +1 -1
  154. package/dist/forms/public-form-page.js +5 -5
  155. package/dist/index.js +20 -20
  156. package/dist/inline-child-table/line-row.js +1 -1
  157. package/dist/inline-child-table/totals-footer.js +1 -1
  158. package/dist/invitations/invite-form.js +1 -1
  159. package/dist/lists/paged-search-list.js +1 -1
  160. package/dist/live/columns-from-model.js +1 -1
  161. package/dist/live/use-filter-config.js +1 -1
  162. package/dist/live/use-reference-search.js +1 -1
  163. package/dist/notifications/bell/notification-bell.js +1 -1
  164. package/dist/notifications/bell/notification-item.js +2 -2
  165. package/dist/organizations/all-organizations.js +1 -1
  166. package/dist/organizations/invitation-page.js +6 -6
  167. package/dist/organizations/invitations-page.js +3 -3
  168. package/dist/organizations/members-page.js +5 -5
  169. package/dist/organizations/organization-page.js +3 -3
  170. package/dist/organizations/organization-row.js +1 -1
  171. package/dist/organizations/organizations-page.js +3 -3
  172. package/dist/organizations/use-organizations.js +1 -1
  173. package/dist/package.js +1 -1
  174. package/dist/plugins/before-sign-in.js +1 -1
  175. package/dist/plugins/plugin-gate.js +1 -1
  176. package/dist/primitives/sheet.js +1 -1
  177. package/dist/record-view/field.js +2 -2
  178. package/dist/record-view/record-header.js +1 -1
  179. package/dist/record-view/record-tabs.js +1 -1
  180. package/dist/roles/use-active-role.js +1 -1
  181. package/dist/shell/assets/app-BS1C66SI.js +9 -0
  182. package/dist/shell/assets/index-DMB4DCM1.js +2 -0
  183. package/dist/shell/assets/index-zVvlyz9B.css +2 -0
  184. package/dist/shell/assets/{maplibre-BlwO7zTh.js → maplibre-CjNYwEqW.js} +3 -3
  185. package/dist/shell/assets/{preload-helper-C24C2MCK.js → preload-helper-SYSsmQ2O.js} +2 -2
  186. package/dist/shell/assets/{record-map-QajKJid1.js → record-map-DjqQGqZ2.js} +2 -2
  187. package/dist/shell/assets/{records-map-DybHhZlM.js → records-map-peII4mzy.js} +2 -2
  188. package/dist/shell/assets/shared-protobase-ui-CQQebf-J.js +2 -0
  189. package/dist/shell/assets/vendor-BzlIWwX2.js +63 -0
  190. package/dist/shell/index.html +6 -6
  191. package/dist/shell/protobase.shell.json +1 -1
  192. package/dist/shell/protobase.sw.js +2 -2
  193. package/dist/shell-source-maps/assets/app-BS1C66SI.js.map +1 -0
  194. package/dist/shell-source-maps/assets/{index-CY22munM.js.map → index-DMB4DCM1.js.map} +1 -1
  195. package/dist/shell-source-maps/assets/{maplibre-BlwO7zTh.js.map → maplibre-CjNYwEqW.js.map} +1 -1
  196. package/dist/shell-source-maps/assets/{preload-helper-C24C2MCK.js.map → preload-helper-SYSsmQ2O.js.map} +1 -1
  197. package/dist/shell-source-maps/assets/{record-map-QajKJid1.js.map → record-map-DjqQGqZ2.js.map} +1 -1
  198. package/dist/shell-source-maps/assets/{records-map-DybHhZlM.js.map → records-map-peII4mzy.js.map} +1 -1
  199. package/dist/shell-source-maps/assets/{shared-protobase-ui-TOG-RVkz.js.map → shared-protobase-ui-CQQebf-J.js.map} +1 -1
  200. package/dist/shell-source-maps/assets/vendor-BzlIWwX2.js.map +1 -0
  201. package/dist/side-panel/side-panel.js +1 -1
  202. package/dist/toasts/toast.js +1 -1
  203. package/dist/users/create-user-form.js +1 -1
  204. package/dist/users/use-user-roles.js +1 -1
  205. package/dist/users/user-row.js +1 -1
  206. package/package.json +4 -4
  207. package/dist/account/account-security-page.js +0 -97
  208. package/dist/shell/assets/app-BDvKMNNB.js +0 -9
  209. package/dist/shell/assets/index-CY22munM.js +0 -2
  210. package/dist/shell/assets/index-DHaeB8cs.css +0 -2
  211. package/dist/shell/assets/shared-protobase-ui-TOG-RVkz.js +0 -2
  212. package/dist/shell/assets/vendor-C4-Hop1T.js +0 -63
  213. package/dist/shell-source-maps/assets/app-BDvKMNNB.js.map +0 -1
  214. package/dist/shell-source-maps/assets/vendor-C4-Hop1T.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{t as r}from"./cn-Bi0ZEjD9.js";var i=[`en`,`nl`],a=e=>i.includes(e),o=e=>e.map(e=>e.split(`-`)[0].toLowerCase()).find(a)??`en`,s=e(t(),1),c=`en`,l,u=()=>l??c,d=e=>{c=e},f=e=>{l=e},p=(e=globalThis.navigator?.languages??[])=>o(e),m={en:`en-GB`,nl:`nl-NL`},h=()=>m[u()],g=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function _(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:g(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var v=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},y=e=>{let t=v(e);return t.charAt(0).toUpperCase()+t.slice(1)},b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function S(e){return e!=null}function C(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??x.width,a=e.size??e.height??x.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?b(...c):b(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??x[`stroke-width`])*Number(e.size??e.width??x.width)/Number(t.size??t.width??x.width):t.strokeWidth??x[`stroke-width`];return[`svg`,{...Object.entries(x).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&S(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&S(t.width)&&{[r(`width`)]:t.width},...`height`in t&&S(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function w(e,t={}){return C(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,s.createContext)({}),D=()=>(0,s.useContext)(E),O=(0,s.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=D()??{},x=!!l||T(f),[S,C,E=[]]=w(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:b(y,c),hasA11yProp:x,attributes:f});return(0,s.createElement)(S,{ref:p,...C},[...E.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function k(e,t=[],n=[]){let r=typeof e==`string`?_(e,t,n):e,i=(0,s.forwardRef)(({className:e,...t},n)=>(0,s.createElement)(O,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=y(r.name)),i}var A=e=>(t,...n)=>{let r=e[u()][t];return typeof r==`function`?r(...n):r},j=e(n(),1),M={sm:{group:`h-7`,option:`px-2.5 text-body`},md:{group:`h-8`,option:`px-3 text-body`}},N={group:(e=`sm`)=>r(`inline-flex`,M[e].group,`rounded-md bg-muted p-0.5`),option:(e,t=`sm`)=>r(`inline-flex items-center gap-1.5 rounded`,M[t].option,`font-medium transition-colors`,e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`)},P=({value:e,options:t,onChange:n,label:r,size:i=`sm`,iconOnly:a=!1})=>(0,j.jsx)(`span`,{role:`group`,"aria-label":r,className:N.group(i),children:t.map(t=>(0,j.jsxs)(`button`,{type:`button`,"aria-pressed":t.value===e,...a&&{"aria-label":t.label,title:t.label},onClick:()=>n(t.value),className:N.option(t.value===e,i),children:[t.icon&&(0,j.jsx)(t.icon,{className:`size-3.5`}),!a&&t.label]},t.value))}),F=(e,t)=>{try{return e()}catch(e){if(!(e instanceof DOMException))throw e;return t}},I=`modulepreload`,L=function(e){return`/`+e},R={},z=function(e){return e.pathname.endsWith(`.css`)},B=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=L(t,n);let r=s(t);if(r.href in R)return;R[r.href]=!0;let i=z(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:I,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{A as a,p as c,d,a as f,N as i,h as l,F as n,k as o,P as r,u as s,B as t,f as u};
2
- //# debugId=b6e02d8c-08a5-4b88-bb60-87c7569c9112
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{t as r}from"./cn-Bi0ZEjD9.js";var i=[`en`,`nl`],a=e=>i.includes(e),o=e=>e.map(e=>e.split(`-`)[0].toLowerCase()).find(a)??`en`,s=e(t(),1),c=`en`,l,u=()=>l??c,d=e=>{c=e},f=e=>{l=e},p=(e=globalThis.navigator?.languages??[])=>o(e),m={en:`en-GB`,nl:`nl-NL`},h=()=>m[u()],g=e=>e?.replace(/([a-z0-9])([A-Z])/g,`$1-$2`).toLowerCase();function _(e,t,n=[]){if(t==null)throw Error(`[lucide]: iconNode is required when icon name is used`);return{name:g(e),size:24,node:t,...n.length>0?{aliases:n}:{}}}var v=e=>{let t=``,n=!1;for(let r of e){if(r===`-`||r===`_`||r<=` `){n=t.length>0;continue}t.length===0?t+=r.toLowerCase():t+=n?r.toUpperCase():r,n=!1}return t},y=e=>{let t=v(e);return t.charAt(0).toUpperCase()+t.slice(1)},b=(...e)=>e.filter((e,t,n)=>!!e&&e.trim()!==``&&n.indexOf(e)===t).join(` `).trim(),x={xmlns:`http://www.w3.org/2000/svg`,width:24,height:24,viewBox:`0 0 24 24`,fill:`none`,stroke:`currentColor`,"stroke-width":2,"stroke-linecap":`round`,"stroke-linejoin":`round`};function S(e){return e!=null}function C(e,t={}){let n=t.attributeNames??{},r=e=>n[e]??e,i=e.size??e.width??x.width,a=e.size??e.height??x.height,o=e.aliases?.filter(e=>typeof e==`string`&&e.trim()!==``).map(e=>`lucide-${e}`)??[],s=[...e.name?[`lucide-${e.name}`]:[],...o],c=t.className?.split(` `).filter(Boolean)??[],l=t.includeDefaultClasses===!1?b(...c):b(`lucide`,...s,...c),u=t.absoluteStrokeWidth?Number(t.strokeWidth??x[`stroke-width`])*Number(e.size??e.width??x.width)/Number(t.size??t.width??x.width):t.strokeWidth??x[`stroke-width`];return[`svg`,{...Object.entries(x).reduce((e,[t,n])=>(e[r(t)]=n,e),{}),...`color`in t&&t.color&&{[r(`stroke`)]:t.color},...`size`in t&&S(t.size)&&{[r(`width`)]:t.size,[r(`height`)]:t.size},...`width`in t&&S(t.width)&&{[r(`width`)]:t.width},...`height`in t&&S(t.height)&&{[r(`height`)]:t.height},[r(`stroke-width`)]:u,...l&&{[r(`class`)]:l},[r(`viewBox`)]:`0 0 ${i} ${a}`,...t.hasA11yProp===!1?{[r(`aria-hidden`)]:`true`}:{},...`attributes`in t&&t.attributes},e.node.map(e=>{let[n,i,a]=e,o=t.nonScalingStroke?{[r(`vector-effect`)]:`non-scaling-stroke`,...i}:i;return a?[n,o,a]:[n,o]})]}function w(e,t={}){return C(e,{...t,attributeNames:{...t.attributeNames,class:`className`,"stroke-width":`strokeWidth`,"stroke-linecap":`strokeLinecap`,"stroke-linejoin":`strokeLinejoin`,"vector-effect":`vectorEffect`}})}var T=e=>{for(let t in e)if(t.startsWith(`aria-`)||t===`role`||t===`title`)return!0;return!1},E=(0,s.createContext)({}),D=()=>(0,s.useContext)(E),O=(0,s.forwardRef)(({color:e,size:t,width:n,height:r,strokeWidth:i,absoluteStrokeWidth:a,nonScalingStroke:o,className:c=``,children:l,iconNode:u=[],icon:d={node:u,aliases:[],size:24},...f},p)=>{let{size:m=24,strokeWidth:h=2,absoluteStrokeWidth:g=!1,nonScalingStroke:_=!1,color:v=`currentColor`,className:y=``}=D()??{},x=!!l||T(f),[S,C,E=[]]=w(d,{color:e??v,width:n??t??m,height:r??t??m,strokeWidth:i??h,absoluteStrokeWidth:a??g,nonScalingStroke:o??_,className:b(y,c),hasA11yProp:x,attributes:f});return(0,s.createElement)(S,{ref:p,...C},[...E.map(([e,t])=>(0,s.createElement)(e,t)),...Array.isArray(l)?l:[l]])});function k(e,t=[],n=[]){let r=typeof e==`string`?_(e,t,n):e,i=(0,s.forwardRef)(({className:e,...t},n)=>(0,s.createElement)(O,{ref:n,icon:r,className:e,...t}));return r.name&&(i.displayName=y(r.name)),i}var A=e=>(t,...n)=>{let r=e[u()][t];return typeof r==`function`?r(...n):r},j=(e,t)=>{try{return e()}catch(e){if(!(e instanceof DOMException))throw e;return t}},M=e(n(),1),N={sm:{group:`h-7`,option:`px-2.5 text-body`},md:{group:`h-8`,option:`px-3 text-body`}},P={group:(e=`sm`)=>r(`inline-flex`,N[e].group,`rounded-md bg-muted p-0.5`),option:(e,t=`sm`)=>r(`inline-flex items-center gap-1.5 rounded`,N[t].option,`font-medium transition-colors`,e?`bg-background text-foreground shadow-sm`:`text-muted-foreground hover:text-foreground`)},F=({value:e,options:t,onChange:n,label:r,size:i=`sm`,iconOnly:a=!1})=>(0,M.jsx)(`span`,{role:`group`,"aria-label":r,className:P.group(i),children:t.map(t=>(0,M.jsxs)(`button`,{type:`button`,"aria-pressed":t.value===e,...a&&{"aria-label":t.label,title:t.label},onClick:()=>n(t.value),className:P.option(t.value===e,i),children:[t.icon&&(0,M.jsx)(t.icon,{className:`size-3.5`}),!a&&t.label]},t.value))}),I=`modulepreload`,L=function(e){return`/`+e},R={},z=function(e){return e.pathname.endsWith(`.css`)},B=function(e,t,n){let r=Promise.resolve();if(t&&t.length>0){let e,i=document.querySelector(`meta[property=csp-nonce]`),a=i?.nonce||i?.getAttribute(`nonce`);function o(e){return Promise.all(e.map(e=>Promise.resolve(e).then(e=>({status:`fulfilled`,value:e}),e=>({status:`rejected`,reason:e}))))}function s(e){return import.meta.resolve?new URL(import.meta.resolve(e)):new URL(e,import.meta.url)}r=o(t.map(t=>{t=L(t,n);let r=s(t);if(r.href in R)return;R[r.href]=!0;let i=z(r);if(e===void 0){e={all:new Set,styles:new Set};let t=document.getElementsByTagName(`link`);for(let n=t.length-1;n>=0;n--){let r=t[n];e.all.add(r.href),r.rel===`stylesheet`&&e.styles.add(r.href)}}if((i?e.styles:e.all).has(r.href))return;let o=document.createElement(`link`);if(o.rel=i?`stylesheet`:I,i||(o.as=`script`),o.crossOrigin=``,o.href=r.href,a&&o.setAttribute(`nonce`,a),document.head.appendChild(o),i)return new Promise((e,t)=>{o.addEventListener(`load`,e),o.addEventListener(`error`,()=>t(Error(`Unable to preload CSS for ${r}`)))})}).filter(e=>e!==void 0))}function i(e){let t=new Event(`vite:preloadError`,{cancelable:!0});if(t.payload=e,window.dispatchEvent(t),!t.defaultPrevented)throw e}return r.then(t=>{for(let e of t||[])e.status===`rejected`&&i(e.reason);return e().catch(i)})};export{A as a,p as c,d,a as f,j as i,h as l,F as n,k as o,P as r,u as s,B as t,f as u};
2
+ //# debugId=12612b26-4363-4ab7-b9ff-f110e2f70544
@@ -1,2 +1,2 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CR5VJ85Q.js";import{a as n,c as r,n as i,o as a,s as o,t as s}from"./maplibre-BlwO7zTh.js";var c=e(t(),1),l=({style:e,layers:t,position:l,zoom:u})=>(0,c.jsxs)(o,{mapLib:s,mapStyle:e,initialViewState:{...l,zoom:u},cooperativeGestures:!0,style:{width:`100%`,height:`100%`},children:[(0,c.jsx)(n,{showCompass:!1}),(0,c.jsx)(i,{layers:t}),(0,c.jsx)(a,{latitude:l.latitude,longitude:l.longitude,anchor:`bottom`,children:(0,c.jsx)(r,{"aria-hidden":!0,className:`size-8 fill-primary text-primary-foreground drop-shadow`,strokeWidth:1.5})})]});export{l as RecordMap};
2
- //# debugId=106a3289-89dd-4fba-985d-39b38f8684c1
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{t}from"./react-CR5VJ85Q.js";import{a as n,c as r,n as i,o as a,s as o,t as s}from"./maplibre-CjNYwEqW.js";var c=e(t(),1),l=({style:e,layers:t,position:l,zoom:u})=>(0,c.jsxs)(o,{mapLib:s,mapStyle:e,initialViewState:{...l,zoom:u},cooperativeGestures:!0,style:{width:`100%`,height:`100%`},children:[(0,c.jsx)(n,{showCompass:!1}),(0,c.jsx)(i,{layers:t}),(0,c.jsx)(a,{latitude:l.latitude,longitude:l.longitude,anchor:`bottom`,children:(0,c.jsx)(r,{"aria-hidden":!0,className:`size-8 fill-primary text-primary-foreground drop-shadow`,strokeWidth:1.5})})]});export{l as RecordMap};
2
+ //# debugId=e3a901aa-6765-4da2-97a1-6f70eb57e565
@@ -1,2 +1,2 @@
1
- import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{Ct as r,u as i}from"./app-BDvKMNNB.js";import{a,c as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./maplibre-BlwO7zTh.js";import{t as p}from"./cn-Bi0ZEjD9.js";var m=e(t(),1),h=512,g=85.051129,_=16,v=Array.from({length:23},(e,t)=>t),y=e=>e.type===`LineString`?e.coordinates:e.type===`MultiPolygon`?e.coordinates.flat(2):e.coordinates.flat(),b=e=>{let t=Math.max(-85.051129,Math.min(g,e))*Math.PI/180;return .5-Math.log(Math.tan(Math.PI/4+t/2))/(2*Math.PI)},x=e=>{let t=y(e),n=t.map(([e])=>e),r=t.map(([,e])=>b(e)),i=(Math.max(...n)-Math.min(...n))/360*h,a=(Math.max(...r)-Math.min(...r))*h;return Math.max(i,a)},S=(e,t)=>{let n=e.flatMap(e=>{if(!e.area)return[];let n=e.area.type===`LineString`||e.area.type===`MultiLineString`?`line`:`polygon`;return[{type:`Feature`,geometry:e.area,properties:{key:e.key,kind:n,span:x(e.area),chosen:t?.includes(e.key)??!1}}]});return{type:`FeatureCollection`,features:[...n.filter(e=>!e.properties.chosen),...n.filter(e=>e.properties.chosen)]}},C=e=>[`interpolate`,[`linear`],[`zoom`],...v.flatMap(t=>[t,[`*`,e,[`min`,1,[`max`,0,[`/`,[`-`,[`*`,[`get`,`span`],2**t],_],32]]]]])],w=e(n(),1),T=`position-area-fills`,E=[`==`,[`get`,`kind`],`polygon`],D=[`==`,[`get`,`kind`],`line`],O=(e,t)=>[`case`,[`get`,`chosen`],e,t],k=({points:e,selected:t,colors:n})=>{let r=S(e,t);if(r.features.length===0)return null;let i=[`case`,[`get`,`chosen`],n.chosen,n.area];return(0,w.jsxs)(s,{id:`position-areas`,type:`geojson`,data:r,children:[(0,w.jsx)(u,{id:T,type:`fill`,filter:E,paint:{"fill-color":i,"fill-opacity":C(O(.15,.1))}}),(0,w.jsx)(u,{id:`position-area-outlines`,type:`line`,filter:E,paint:{"line-color":i,"line-width":1.5,"line-dasharray":[3,2],"line-opacity":C(.8)}}),(0,w.jsx)(u,{id:`position-area-lines`,type:`line`,filter:D,layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-color":i,"line-width":6,"line-opacity":C(O(.6,.35))}})]})},A=(e,t)=>{let n=document.createElement(`span`);n.style.color=`var(${t})`,e.append(n);let r=getComputedStyle(n).color;n.remove();let i=document.createElement(`canvas`);i.width=1,i.height=1;let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return r;a.fillStyle=r,a.fillRect(0,0,1,1);let[o,s,c,l]=a.getImageData(0,0,1,1).data;return`rgba(${o}, ${s}, ${c}, ${l/255})`},j=28,M={padding:48,maxZoom:15,duration:0},N={padding:48,maxZoom:16,duration:300},P=32,F=()=>r(`compact`,e=>new Intl.NumberFormat(e,{notation:`compact`,maximumFractionDigits:1})),I=e=>[[e.west,e.south],[e.east,e.north]],L=({style:e,layers:t,initial:n,points:r,buckets:s,fit:u,onFitted:h,onMove:g,selected:_,covered:v,onSelect:y,onClear:b,markerLabel:x,bucketLabel:S})=>{let C=(0,m.useRef)(null),[E,D]=(0,m.useState)([]),[O,L]=(0,m.useState)(),R=new globalThis.Map(r.map(e=>[e.key,e])),z=r.map(e=>e.key).join(`,`),B=u&&JSON.stringify(u),V=()=>{let e=C.current?.getMap();e&&D(i(r.map(t=>({key:t.key,...e.project([t.longitude,t.latitude])})),j))},H=()=>{let e=C.current?.getMap();if(!e)return;let t=e.getBounds(),n=e.getCenter();g({bounds:{south:t.getSouth(),west:t.getWest(),north:t.getNorth(),east:t.getEast()},zoom:e.getZoom()},{latitude:n.lat,longitude:n.lng,zoom:e.getZoom()})},U=()=>{let e=C.current?.getMap();e&&u&&(e.fitBounds(I(u),M),h(),H())};(0,m.useEffect)(V,[z]),(0,m.useEffect)(U,[B]);let W=E.find(e=>_!==void 0&&e.keys.some(e=>_.includes(e)))?.at;return(0,m.useEffect)(()=>{let e=C.current?.getMap(),t=W===void 0?void 0:R.get(W);if(!e||!t||v===0)return;let{y:n}=e.project([t.longitude,t.latitude]),r=e.getContainer().clientHeight-v;n>P&&n<r||e.easeTo({center:[t.longitude,t.latitude],offset:[0,(P-v)/2],duration:300})},[W,v]),(0,w.jsxs)(d,{ref:C,mapLib:f,mapStyle:e,initialViewState:n??{latitude:0,longitude:0,zoom:1},style:{width:`100%`,height:`100%`},onLoad:()=>{let e=C.current.getMap().getContainer();L({area:A(e,`--primary`),chosen:A(e,`--foreground`)}),V(),u?U():H()},onZoomEnd:V,onMoveEnd:H,onClick:b,children:[(0,w.jsx)(a,{showCompass:!1}),(0,w.jsx)(c,{layers:t,below:T}),O&&(0,w.jsx)(k,{points:r,selected:_,colors:O}),s.map(e=>(0,w.jsx)(l,{latitude:e.latitude,longitude:e.longitude,anchor:`center`,children:(0,w.jsx)(`button`,{type:`button`,"aria-label":S(e.count),className:`flex size-10 cursor-pointer items-center justify-center rounded-full border-2 border-background bg-primary text-xs font-semibold text-primary-foreground tabular-nums shadow`,onClick:t=>{t.stopPropagation(),C.current?.getMap().fitBounds(I(e.bounds),N)},children:F().format(e.count)})},`${e.latitude},${e.longitude}`)),E.map(e=>{let t=R.get(e.at);if(!t)return null;let n=_!==void 0&&e.keys.some(e=>_.includes(e)),r=e.keys.every(e=>R.get(e)?.approximate);return(0,w.jsx)(l,{latitude:t.latitude,longitude:t.longitude,anchor:`bottom`,style:{zIndex:+!!n},children:(0,w.jsxs)(`button`,{type:`button`,"aria-label":x(e.keys),"aria-pressed":n,className:`relative block cursor-pointer`,onClick:t=>{t.stopPropagation(),y(e.keys)},children:[(0,w.jsx)(o,{"aria-hidden":!0,"data-approximate":r||void 0,className:p(`size-8 drop-shadow`,r?n?`fill-background text-foreground`:`fill-background text-primary`:n?`fill-foreground text-background`:`fill-primary text-primary-foreground`),strokeWidth:r?2:1.5,strokeDasharray:r?`3 2`:void 0}),e.keys.length>1&&(0,w.jsx)(`span`,{className:`absolute -right-2 -top-1 min-w-5 rounded-full border border-background bg-foreground px-1 text-center text-[11px] font-medium leading-4 text-background tabular-nums`,children:e.keys.length})]})},e.at)})]})};export{L as RecordsMap};
2
- //# debugId=f26c7859-94c0-4438-970e-8b42c363d00b
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{V as r,gt as i}from"./app-BS1C66SI.js";import{a,c as o,i as s,n as c,o as l,r as u,s as d,t as f}from"./maplibre-CjNYwEqW.js";import{t as p}from"./cn-Bi0ZEjD9.js";var m=e(t(),1),h=512,g=85.051129,_=16,v=Array.from({length:23},(e,t)=>t),y=e=>e.type===`LineString`?e.coordinates:e.type===`MultiPolygon`?e.coordinates.flat(2):e.coordinates.flat(),b=e=>{let t=Math.max(-85.051129,Math.min(g,e))*Math.PI/180;return .5-Math.log(Math.tan(Math.PI/4+t/2))/(2*Math.PI)},x=e=>{let t=y(e),n=t.map(([e])=>e),r=t.map(([,e])=>b(e)),i=(Math.max(...n)-Math.min(...n))/360*h,a=(Math.max(...r)-Math.min(...r))*h;return Math.max(i,a)},S=(e,t)=>{let n=e.flatMap(e=>{if(!e.area)return[];let n=e.area.type===`LineString`||e.area.type===`MultiLineString`?`line`:`polygon`;return[{type:`Feature`,geometry:e.area,properties:{key:e.key,kind:n,span:x(e.area),chosen:t?.includes(e.key)??!1}}]});return{type:`FeatureCollection`,features:[...n.filter(e=>!e.properties.chosen),...n.filter(e=>e.properties.chosen)]}},C=e=>[`interpolate`,[`linear`],[`zoom`],...v.flatMap(t=>[t,[`*`,e,[`min`,1,[`max`,0,[`/`,[`-`,[`*`,[`get`,`span`],2**t],_],32]]]]])],w=e(n(),1),T=`position-area-fills`,E=[`==`,[`get`,`kind`],`polygon`],D=[`==`,[`get`,`kind`],`line`],O=(e,t)=>[`case`,[`get`,`chosen`],e,t],k=({points:e,selected:t,colors:n})=>{let r=S(e,t);if(r.features.length===0)return null;let i=[`case`,[`get`,`chosen`],n.chosen,n.area];return(0,w.jsxs)(s,{id:`position-areas`,type:`geojson`,data:r,children:[(0,w.jsx)(u,{id:T,type:`fill`,filter:E,paint:{"fill-color":i,"fill-opacity":C(O(.15,.1))}}),(0,w.jsx)(u,{id:`position-area-outlines`,type:`line`,filter:E,paint:{"line-color":i,"line-width":1.5,"line-dasharray":[3,2],"line-opacity":C(.8)}}),(0,w.jsx)(u,{id:`position-area-lines`,type:`line`,filter:D,layout:{"line-cap":`round`,"line-join":`round`},paint:{"line-color":i,"line-width":6,"line-opacity":C(O(.6,.35))}})]})},A=(e,t)=>{let n=document.createElement(`span`);n.style.color=`var(${t})`,e.append(n);let r=getComputedStyle(n).color;n.remove();let i=document.createElement(`canvas`);i.width=1,i.height=1;let a=i.getContext(`2d`,{willReadFrequently:!0});if(!a)return r;a.fillStyle=r,a.fillRect(0,0,1,1);let[o,s,c,l]=a.getImageData(0,0,1,1).data;return`rgba(${o}, ${s}, ${c}, ${l/255})`},j=28,M={padding:48,maxZoom:15,duration:0},N={padding:48,maxZoom:16,duration:300},P=32,F=()=>i(`compact`,e=>new Intl.NumberFormat(e,{notation:`compact`,maximumFractionDigits:1})),I=e=>[[e.west,e.south],[e.east,e.north]],L=({style:e,layers:t,initial:n,points:i,buckets:s,fit:u,onFitted:h,onMove:g,selected:_,covered:v,onSelect:y,onClear:b,markerLabel:x,bucketLabel:S})=>{let C=(0,m.useRef)(null),[E,D]=(0,m.useState)([]),[O,L]=(0,m.useState)(),R=new globalThis.Map(i.map(e=>[e.key,e])),z=i.map(e=>e.key).join(`,`),B=u&&JSON.stringify(u),V=()=>{let e=C.current?.getMap();e&&D(r(i.map(t=>({key:t.key,...e.project([t.longitude,t.latitude])})),j))},H=()=>{let e=C.current?.getMap();if(!e)return;let t=e.getBounds(),n=e.getCenter();g({bounds:{south:t.getSouth(),west:t.getWest(),north:t.getNorth(),east:t.getEast()},zoom:e.getZoom()},{latitude:n.lat,longitude:n.lng,zoom:e.getZoom()})},U=()=>{let e=C.current?.getMap();e&&u&&(e.fitBounds(I(u),M),h(),H())};(0,m.useEffect)(V,[z]),(0,m.useEffect)(U,[B]);let W=E.find(e=>_!==void 0&&e.keys.some(e=>_.includes(e)))?.at;return(0,m.useEffect)(()=>{let e=C.current?.getMap(),t=W===void 0?void 0:R.get(W);if(!e||!t||v===0)return;let{y:n}=e.project([t.longitude,t.latitude]),r=e.getContainer().clientHeight-v;n>P&&n<r||e.easeTo({center:[t.longitude,t.latitude],offset:[0,(P-v)/2],duration:300})},[W,v]),(0,w.jsxs)(d,{ref:C,mapLib:f,mapStyle:e,initialViewState:n??{latitude:0,longitude:0,zoom:1},style:{width:`100%`,height:`100%`},onLoad:()=>{let e=C.current.getMap().getContainer();L({area:A(e,`--primary`),chosen:A(e,`--foreground`)}),V(),u?U():H()},onZoomEnd:V,onMoveEnd:H,onClick:b,children:[(0,w.jsx)(a,{showCompass:!1}),(0,w.jsx)(c,{layers:t,below:T}),O&&(0,w.jsx)(k,{points:i,selected:_,colors:O}),s.map(e=>(0,w.jsx)(l,{latitude:e.latitude,longitude:e.longitude,anchor:`center`,children:(0,w.jsx)(`button`,{type:`button`,"aria-label":S(e.count),className:`flex size-10 cursor-pointer items-center justify-center rounded-full border-2 border-background bg-primary text-xs font-semibold text-primary-foreground tabular-nums shadow`,onClick:t=>{t.stopPropagation(),C.current?.getMap().fitBounds(I(e.bounds),N)},children:F().format(e.count)})},`${e.latitude},${e.longitude}`)),E.map(e=>{let t=R.get(e.at);if(!t)return null;let n=_!==void 0&&e.keys.some(e=>_.includes(e)),r=e.keys.every(e=>R.get(e)?.approximate);return(0,w.jsx)(l,{latitude:t.latitude,longitude:t.longitude,anchor:`bottom`,style:{zIndex:+!!n},children:(0,w.jsxs)(`button`,{type:`button`,"aria-label":x(e.keys),"aria-pressed":n,className:`relative block cursor-pointer`,onClick:t=>{t.stopPropagation(),y(e.keys)},children:[(0,w.jsx)(o,{"aria-hidden":!0,"data-approximate":r||void 0,className:p(`size-8 drop-shadow`,r?n?`fill-background text-foreground`:`fill-background text-primary`:n?`fill-foreground text-background`:`fill-primary text-primary-foreground`),strokeWidth:r?2:1.5,strokeDasharray:r?`3 2`:void 0}),e.keys.length>1&&(0,w.jsx)(`span`,{className:`absolute -right-2 -top-1 min-w-5 rounded-full border border-background bg-foreground px-1 text-center text-[11px] font-medium leading-4 text-background tabular-nums`,children:e.keys.length})]})},e.at)})]})};export{L as RecordsMap};
2
+ //# debugId=29788238-9b3c-48c0-91f0-980bf86c9d22
@@ -0,0 +1,2 @@
1
+ import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./react-CR5VJ85Q.js";import{G as r,V as i,q as a}from"./vendor-BzlIWwX2.js";import{$ as o,A as s,B as c,C as l,Ct as u,D as d,Dt as f,E as p,Et as m,F as ee,G as te,H as ne,I as re,J as ie,K as ae,L as h,M as g,N as _,O as v,P as y,Q as b,R as x,S,St as C,T as w,Tt as T,U as E,W as D,X as O,Y as k,Z as A,_ as j,_t as M,a as N,at as P,b as F,bt as I,c as L,ct as R,d as z,dt as B,et as V,f as H,ft as U,g as W,h as G,ht as K,i as q,it as J,j as oe,k as se,l as ce,lt as Y,m as le,mt as ue,n as de,nt as fe,o as pe,ot as X,p as me,pt as he,q as ge,r as _e,rt as ve,s as ye,st as be,t as xe,tt as Se,u as Ce,ut as we,v as Te,vt as Ee,w as De,wt as Oe,x as ke,xt as Ae,y as je,yt as Me,z as Ne}from"./app-BS1C66SI.js";import{n as Pe}from"./preload-helper-SYSsmQ2O.js";import{t as Z}from"./cn-Bi0ZEjD9.js";var Q=e(n(),1),$=({row:e,resource:t,recordKey:n,...r})=>{let i=E(),a=V(),o=t??i?.resource??a?.model.name;if(o===void 0)throw Error(`RecordLink needs a resource outside a list display or a record`);return(0,Q.jsx)(Y,{to:{kind:`record`,resource:o,key:e?e.key:n},...r})},Fe={width:640,height:480},Ie=e=>e.flatMap(e=>{if(`src`in e)return[{image:{url:e.src},alt:e.alt}];let t=B(e,Fe);return t?[{image:t,alt:e.alt??``}]:[]}),Le=({images:e,label:t,fit:n=`cover`,swipe:r=!0,className:i})=>{let a=Ie(e),o=D(a.length);return(0,Q.jsxs)(`div`,{role:`group`,"aria-roledescription":`carousel`,"aria-label":t,className:Z(`group/carousel relative overflow-hidden`,i),children:[(0,Q.jsx)(te,{"data-carousel-track":!0,carousel:o,swipe:r,slides:a.map(({image:e,alt:t})=>(0,Q.jsx)(P,{image:e,alt:t,loading:`lazy`,className:Z(`size-full`,n===`cover`?`object-cover`:`object-contain`)}))}),(0,Q.jsx)(ae,{carousel:o,count:a.length,swipe:r,reveal:`group-hover/carousel:opacity-100`,className:`inset-0`})]})},Re=({name:e,label:t,options:n,value:r,onChange:i})=>(0,Q.jsx)(`div`,{role:`radiogroup`,"aria-label":t,className:`flex flex-col gap-2`,children:n.map(t=>(0,Q.jsxs)(`label`,{className:Z(`block rounded-lg border p-3 transition-colors has-[:focus-visible]:outline-2 has-[:focus-visible]:outline-offset-2 has-[:focus-visible]:outline-primary`,t.disabled?`cursor-default bg-background opacity-60`:t.value===r?`cursor-pointer border-primary bg-primary-soft`:`cursor-pointer bg-background hover:bg-surface`),children:[(0,Q.jsx)(`input`,{type:`radio`,name:e,value:t.value,checked:t.value===r,disabled:t.disabled,onChange:()=>i(t.value),className:`sr-only`}),(0,Q.jsx)(`span`,{className:Z(`block font-medium`,t.value===r&&`text-primary-text`),children:t.label}),t.description&&(0,Q.jsx)(`span`,{className:`mt-0.5 block text-xs leading-snug text-muted-foreground`,children:t.description})]},t.value))}),ze=(e,t,n)=>{let o=T(),s=a(),c=[...new Set(n)].sort();return i({queryKey:f.pickedLabels(e.name,c.join(`,`)),enabled:c.length>0,placeholderData:r,queryFn:()=>O(s,o,e,c,t)}).data??new Map},Be=e(t(),1),Ve=e=>{let{resources:t,views:n}=Ae(),r=t[e.resource];if(!r)throw Error(`RecordPicker: the app has no resource named "${e.resource}"`);if(r.primaryKey.length!==1)throw Error(`RecordPicker: "${e.resource}" has a composite key, which a picker cannot name`);let i=n[e.resource],a=e.multiple?e.value:e.value===void 0?[]:[e.value],[o,s]=(0,Be.useState)({}),c=ze(r,i,a),l=e=>o[e]??c.get(e)??e,u=(e,t)=>s(n=>({...n,[e]:t}));if(!e.multiple){let{value:t,onChange:n}=e;return(0,Q.jsx)(X,{target:r,view:i,value:t??``,label:t===void 0?void 0:l(t),invalid:e.invalid,onChange:(e,t)=>{u(e,t),n(e)}})}let{value:d,onChange:f}=e;return(0,Q.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,Q.jsx)(X,{target:r,view:i,value:``,chosen:d,several:!0,invalid:e.invalid,onChange:(e,t)=>{u(e,t),f(d.includes(e)?d.filter(t=>t!==e):[...d,e])}}),d.length>0&&(0,Q.jsx)(`div`,{className:`flex flex-wrap gap-1`,children:d.map(e=>(0,Q.jsx)(ie,{label:l(e),onRemove:()=>f(d.filter(t=>t!==e))},e))})]})};export{F as ActionCard,Se as ActionInputError,Oe as ApiProvider,xe as App,Y as AppLink,z as AssistantDock,Ne as AuthLayout,Me as Button,Le as Carousel,De as ChatMessage,l as ChatThread,Re as Choices,g as CodeForm,Te as CompactTable,S as Composer,Ee as Dialog,G as DiffView,he as Field,je as FieldList,L as Form,ue as Input,k as LogoMark,fe as Markdown,c as MenuSelect,x as OtpInput,me as PartView,$ as RecordLink,Ve as RecordPicker,_ as ResendCodeButton,M as ResponsiveDialog,U as Section,Pe as Segmented,ke as SidePanel,ge as SignInPrompt,C as Spinner,le as StepList,R as Textarea,y as allowDelayMs,I as buttonClass,ve as definePlugin,J as defineUi,W as diffStats,de as isConflict,ee as isFramed,s as mergeUi,j as parseDiff,d as pluginApi,v as protobaseVersion,oe as uiFromModule,p as useApiToken,we as useAppAddress,re as useArmedAfterFocus,Ce as useAssistant,ce as useAssistantClient,H as useBackendData,T as useClient,A as useFacets,K as useFieldControl,h as useGuardedPress,b as useHistogram,q as useInbox,V as useLayoutRecord,be as useList,ne as useListDisplay,N as useMarkNotificationsRead,u as useMeta,se as usePlugin,ye as usePushNotifications,w as useRecord,m as useResourceClient,o as useSeries,pe as useUnreadNotifications,_e as useUpdateRecord};
2
+ //# debugId=9041e6df-f899-4856-b45e-7aee4ee42440