@pollinations/ui 0.1.0-alpha.1 → 0.1.0-alpha.3

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 (88) hide show
  1. package/README.md +137 -36
  2. package/dist/Button-CO3Dpbkj.d.cts +29 -0
  3. package/dist/Button-CO3Dpbkj.d.ts +29 -0
  4. package/dist/Chip-v-ADv6cz.d.cts +18 -0
  5. package/dist/Chip-v-ADv6cz.d.ts +18 -0
  6. package/dist/Dialog-yXzIFrDg.d.cts +63 -0
  7. package/dist/Dialog-yXzIFrDg.d.ts +63 -0
  8. package/dist/app-user-menu/sdk.cjs +631 -235
  9. package/dist/app-user-menu/sdk.cjs.map +1 -1
  10. package/dist/app-user-menu/sdk.d.cts +6 -7
  11. package/dist/app-user-menu/sdk.d.ts +6 -7
  12. package/dist/app-user-menu/sdk.js +639 -236
  13. package/dist/app-user-menu/sdk.js.map +1 -1
  14. package/dist/app.css +6 -122
  15. package/dist/auth/index.cjs +1346 -76
  16. package/dist/auth/index.cjs.map +1 -1
  17. package/dist/auth/index.d.cts +88 -6
  18. package/dist/auth/index.d.ts +88 -6
  19. package/dist/auth/index.js +1343 -75
  20. package/dist/auth/index.js.map +1 -1
  21. package/dist/auth/sdk.cjs +239 -0
  22. package/dist/auth/sdk.cjs.map +1 -0
  23. package/dist/auth/sdk.d.cts +40 -0
  24. package/dist/auth/sdk.d.ts +40 -0
  25. package/dist/auth/sdk.js +208 -0
  26. package/dist/auth/sdk.js.map +1 -0
  27. package/dist/brand/lockup-horizontal-black.png +0 -0
  28. package/dist/brand/lockup-horizontal-black.svg +4 -0
  29. package/dist/brand/lockup-horizontal-white.png +0 -0
  30. package/dist/brand/lockup-horizontal-white.svg +4 -0
  31. package/dist/brand/lockup-horizontal.svg +1 -0
  32. package/dist/brand/lockup-stacked-black.png +0 -0
  33. package/dist/brand/lockup-stacked-black.svg +4 -0
  34. package/dist/brand/lockup-stacked-white.png +0 -0
  35. package/dist/brand/lockup-stacked-white.svg +4 -0
  36. package/dist/brand/lockup-stacked.svg +4 -0
  37. package/dist/brand/mark-black.png +0 -0
  38. package/dist/brand/mark-black.svg +3 -0
  39. package/dist/brand/mark-white.png +0 -0
  40. package/dist/brand/mark-white.svg +3 -0
  41. package/dist/brand/mark.svg +1 -0
  42. package/dist/brand/polli/polli-lockup-horizontal-black.png +0 -0
  43. package/dist/brand/polli/polli-lockup-horizontal-white.png +0 -0
  44. package/dist/brand/polli/polli-lockup-stacked-black.png +0 -0
  45. package/dist/brand/polli/polli-lockup-stacked-white.png +0 -0
  46. package/dist/brand/polli/polli.png +0 -0
  47. package/dist/brand/wordmark-black.png +0 -0
  48. package/dist/brand/wordmark-black.svg +1 -0
  49. package/dist/brand/wordmark-white.png +0 -0
  50. package/dist/brand/wordmark-white.svg +1 -0
  51. package/dist/brand/wordmark.svg +1 -0
  52. package/dist/fonts/geist-pixel-square.woff2 +0 -0
  53. package/dist/gen/index.cjs +395 -214
  54. package/dist/gen/index.cjs.map +1 -1
  55. package/dist/gen/index.d.cts +64 -19
  56. package/dist/gen/index.d.ts +64 -19
  57. package/dist/gen/index.js +391 -212
  58. package/dist/gen/index.js.map +1 -1
  59. package/dist/index.browser.min.js +2 -0
  60. package/dist/index.browser.min.js.map +1 -0
  61. package/dist/index.cjs +3464 -1559
  62. package/dist/index.cjs.map +1 -1
  63. package/dist/index.d.cts +498 -174
  64. package/dist/index.d.ts +498 -174
  65. package/dist/index.js +3518 -1671
  66. package/dist/index.js.map +1 -1
  67. package/dist/licenses/Geist-OFL.txt +93 -0
  68. package/dist/markdown.cjs +821 -0
  69. package/dist/markdown.cjs.map +1 -0
  70. package/dist/markdown.d.cts +16 -0
  71. package/dist/markdown.d.ts +16 -0
  72. package/dist/markdown.js +792 -0
  73. package/dist/markdown.js.map +1 -0
  74. package/dist/styles.css +1 -1
  75. package/dist/theme.css +92 -0
  76. package/dist/wallet/index.cjs +255 -42
  77. package/dist/wallet/index.cjs.map +1 -1
  78. package/dist/wallet/index.d.cts +29 -7
  79. package/dist/wallet/index.d.ts +29 -7
  80. package/dist/wallet/index.js +254 -42
  81. package/dist/wallet/index.js.map +1 -1
  82. package/package.json +106 -89
  83. package/dist/Chip-CQCq34kS.d.cts +0 -20
  84. package/dist/Chip-Cj4xG7Te.d.ts +0 -20
  85. package/dist/assets/logo-wordmark.svg +0 -1
  86. package/dist/assets/logo.svg +0 -4
  87. package/dist/theme-jRPPBmld.d.cts +0 -20
  88. package/dist/theme-jRPPBmld.d.ts +0 -20
@@ -20,13 +20,19 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
20
20
  // src/modules/app-user-menu/sdk.ts
21
21
  var sdk_exports = {};
22
22
  __export(sdk_exports, {
23
- AppUserMenu: () => AppUserMenu,
24
- isEmbeddedContext: () => isEmbeddedContext
23
+ AppUserMenu: () => AppUserMenu
25
24
  });
26
25
  module.exports = __toCommonJS(sdk_exports);
27
26
 
28
27
  // src/modules/app-user-menu/AppUserMenu.tsx
29
- var import_react10 = require("@pollinations/sdk/react");
28
+ var import_react4 = require("@pollinations/sdk/react");
29
+ var import_react5 = require("react");
30
+
31
+ // src/brand/mark.svg
32
+ var mark_default = 'data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="500" height="500" viewBox="0 0 375 375"><path fill="currentColor" d="M.367 162.23c0-2.69 0-5.386.156-8.277 1.922-.074 3.352-.324 3.247-2.633-.047-1.03.68-1.289 1.597-1.285 2.438.016 4.88-.02 7.32-.008 1.372.004 2.25-.515 2.258-2.007.008-1.247.645-1.747 1.852-1.66.547.038 1.098.011 1.648-.005 1.762-.062 3.844.497 4.29-2.18.023-.136.238-.284.39-.34 1.52-.55 2.898-1.507 4.64-1.362 1.348.109 2.274-.426 2.196-1.977-.063-1.203.547-1.559 1.687-1.555 4.149 0 8.297-.066 12.446-.12 2.426-.032 2.804-.321 2.828-2.743.05-5.793.008-11.59.008-17.383.008-13.851.035-27.703.004-41.55-.004-1.567.507-2.157 2.113-2.153 11.168.04 22.336.008 33.5 0 10.742-.004 21.48.008 32.223-.031 1.472-.004 2.363.316 2.207 2.023-.13 1.403.78 1.766 1.976 1.766 3.356 0 6.711-.02 10.067.02 1.43.02 2.164-.551 2.19-2.024.02-.8.126-1.535 1.216-1.73 2.582-.47 2.574-.516 2.59-3.223.004-.73.062-1.469-.012-2.195-.145-1.457.34-2.203 1.922-2.024 1.36.156 1.844-.582 1.828-1.867-.02-1.34.062-2.684.094-4.023.023-1.094.468-1.75 1.66-1.649 1.398.117 2.074-.57 2.043-1.918-.031-1.414.594-1.988 1.992-1.844 1.215.122 1.894-.46 1.789-1.703-.129-1.535.57-2.078 2.031-1.984 1.258.078 1.711-.668 1.692-1.848-.024-1.34.043-2.683.004-4.027-.028-1.082.46-1.566 1.515-1.582 1.406-.024 2.809-.09 4.211-.11 1.133-.011 1.68-.566 1.688-1.687.011-1.34.047-2.684.035-4.027-.008-1.192.445-1.813 1.746-1.727 1.152.074 2.32-.062 3.473.031 1.8.145 2.425-.695 2.328-2.382-.063-1.036.05-2.079-.016-3.11-.086-1.367.344-2.05 1.852-1.957 1.273.074 2.558-.125 3.84-.117 1.316.008 1.902-.656 1.93-1.895.026-1.222.085-2.445.003-3.66-.094-1.386.356-2.066 1.844-1.922 1.304.133 1.914-.539 1.87-1.847-.026-.977-.01-1.953 0-2.93.024-2.555.028-2.547 2.509-2.574a83 83 0 0 0 3.11-.094c1.171-.059 1.765-.644 1.733-1.871-.035-1.402.02-2.809.016-4.21 0-.981.453-1.458 1.445-1.454 1.77.012 3.54.02 5.309-.012 1.125-.023 1.504.563 1.488 1.594-.02 1.281.051 2.562-.004 3.844-.066 1.508.637 2.097 2.09 2.05 1.219-.039 2.442.028 3.664.032 1.125 0 1.664.492 1.621 1.672-.054 1.402-.011 2.804.004 4.21.012.915.422 1.665 1.395 1.54 2.304-.29 2.344 1.004 2.324 2.75-.059 5.097-.594 4.734 4.668 4.797 2.934.03 2.922.023 2.938 2.917.035 5.149-.52 4.579 4.609 4.61 2.758.015 2.762.004 2.777 2.75.035 5.402-.012 4.586 4.68 4.683 2.86.063 2.86.047 2.894 2.813.012.855.07 1.71.016 2.562-.094 1.532.5 2.329 2.113 2.188 1.121-.094 1.754.297 1.614 1.555-.172 1.562.539 2.293 2.125 2.148 1.148-.105 1.742.414 1.687 1.578-.074 1.559.652 2.242 2.2 2.153 1.074-.063 1.538.515 1.53 1.57-.007 1.16.094 2.32.036 3.476-.082 1.563.433 2.47 2.152 2.399 1.16-.047 1.613.582 1.582 1.715-.035 1.28.008 2.562.031 3.843.02 1.243.59 1.989 1.899 1.93 1.344-.062 1.898.54 1.777 1.863-.12 1.29.45 1.938 1.79 1.93 3.538-.02 7.077-.016 10.616-.004 1.086.004 1.832-.457 1.813-1.582-.04-2.008 1.16-2.172 2.742-2.168 21.543.047 43.082.059 64.625.086 2.606.004 2.824.207 2.817 2.817-.024 5.55-.18 11.105-.122 16.656.153 13.851.18 27.699.04 41.55-.024 2.266.328 2.684 2.609 2.7 4.09.027 8.176.02 12.265.008 1.235-.004 2.2.203 2.114 1.777-.07 1.324.676 1.851 1.933 1.848 1.22-.008 2.442.078 3.66.023 1.372-.062 2.07.383 1.887 1.887-.172 1.398.559 2.015 1.942 1.984 1.28-.027 2.566.067 3.843-.008 1.22-.07 1.883.328 1.805 1.625-.098 1.621.777 2.125 2.266 2.094 2.316-.055 4.64.047 6.957-.039 1.383-.05 2.066.402 2.011 1.84-.054 1.414.715 1.969 2.067 1.89.422-.023.851.051 1.277.079 0 2.57 0 5.14-.16 7.906-2.832.254-2.879.242-3.355 2.879-.184 1.031-.817 1.09-1.579 1.066-1.586-.043-2.152.762-2.12 2.274.05 2.441-.016 4.882.003 7.324.008 1.09-.336 1.812-1.554 1.722-1.586-.117-2.23.633-2.176 2.168.031.79-.2 1.575-1.184 1.489-2.277-.2-2.66 1.14-2.594 2.957.032.855-.082 1.715-.011 2.562.125 1.457-.383 2.207-1.942 2.098-1.351-.094-1.832.64-1.785 1.922.043 1.281-.07 2.562-.004 3.84.063 1.28-.457 1.793-1.715 1.675-1.378-.129-2.082.516-2.02 1.914.056 1.188-.362 1.887-1.679 1.762-1.523-.14-2.129.621-2.008 2.078.106 1.239-.464 1.828-1.699 1.785-1.48-.05-2.098.73-2.086 2.141.008 1.04-.496 1.637-1.554 1.586-1.602-.078-2.168.758-2.184 2.23-.008.762-.203 1.372-1.203 1.512-2.61.367-2.606.414-2.613 3.051-.004.852-.043 1.71.007 2.563.075 1.238-.3 2.011-1.703 1.988-1.363-.024-2.004.699-1.988 2.05.016 1.165-.649 1.676-1.734 1.622-1.5-.075-2.11.629-2.07 2.078.03 1.23-.626 1.73-1.848 1.668-1.157-.059-2.32.043-3.477-.004-1.45-.059-2.234.57-2.164 2.031.062 1.332-.602 1.711-1.785 1.652-.945-.05-1.89.262-1.828 1.32.144 2.427-1.23 2.688-3.11 2.52-.785-.074-1.586.047-2.379.024-1.425-.043-2.25.613-2.203 2.043.043 1.316-.547 1.738-1.758 1.675-1.039-.054-1.957.356-1.886 1.489.133 2.152-1.059 2.41-2.739 2.27-.789-.067-1.59.034-2.378-.024-1.551-.117-2.5.351-2.38 2.113.083 1.172-.534 1.633-1.683 1.59-1.281-.047-2.562 0-3.844-.004-1.324-.008-2.164.57-2.039 1.965.145 1.594-.683 1.793-1.988 1.766-3.477-.07-6.957-.012-10.434-.079-1.574-.03-2.453.559-2.464 2.192-.012 1.324-.676 1.77-1.97 1.754-3.6-.051-7.202.023-10.8-.008-1.387-.012-2.262.414-2.246 1.941.016 1.356-.734 1.743-1.988 1.743a5556 5556 0 0 0-34.235.011c-1.504.008-2.113-.582-2.129-2.008-.015-1.226-.714-1.714-1.898-1.695-2.133.04-4.27.027-6.406.063-.98.02-1.891.242-1.891 1.484 0 1.191.938 1.316 1.805 1.344 1.086.039 1.722.34 1.625 1.61-.117 1.562.597 2.44 2.273 2.308 1.055-.082 1.617.355 1.61 1.457-.008 1.355.773 2.078 2.03 2.105 1.372.035 1.794.672 1.766 1.938-.03 1.351.7 1.968 2.07 1.933 1.282-.031 2.563.047 3.844.059.833.008 1.485.254 1.477 1.21-.012 2.192 1.398 2.595 3.164 2.595 2.93 0 5.86.015 8.79.011 6.71 0 13.425-.015 20.136 0 .726.004 1.621-.3 1.844.93.484 2.719.52 2.715 3.355 2.73.73.004 1.469.055 2.195-.02 1.317-.132 1.97.4 1.942 1.731-.028 1.34.531 2.098 1.965 1.985 1.152-.09 1.734.422 1.668 1.594-.079 1.414.476 2.203 1.992 2.167 1.105-.027 1.722.5 1.672 1.665-.063 1.476.68 2.125 2.117 2.07 1.11-.043 1.758.39 1.656 1.605-.129 1.504.695 2.118 2.078 2.13 1.23.01 1.766.57 1.66 1.816-.078.91.125 1.972 1.22 1.867 2.737-.266 2.562 1.441 2.46 3.226-.039.668.031 1.344-.012 2.012-.105 1.578.508 2.45 2.192 2.379 1.246-.05 1.633.516 1.594 1.805-.118 3.718-.016 7.441-.09 11.164-.035 1.539.629 2.082 2.078 2.027 1.277-.047 2.562.016 3.844-.004 1.207-.02 1.796.461 1.718 1.746-.074 1.219.043 2.446-.02 3.66-.07 1.414.372 2.243 1.942 2.157 1.145-.063 1.867.343 1.805 1.675-.059 1.301.535 2.094 1.945 2.082 1.192-.011 1.79.5 1.719 1.778-.078 1.36.672 2.074 2.016 1.988 1.351-.086 1.847.465 1.843 1.797-.023 6.469 0 12.938.028 19.406.004 1.211-.29 2.012-1.75 1.903-1.418-.106-2.239.613-2.157 2.062.075 1.344-.55 1.692-1.757 1.613-1.297-.086-1.965.657-1.903 1.903.074 1.453-.597 1.976-1.96 1.918-1.344-.055-1.856.699-1.77 1.965.078 1.203-.414 1.867-1.692 1.789-1.375-.09-2.07.515-2.007 1.925.058 1.32-.586 1.82-1.899 1.813-6.469-.035-12.937-.031-19.406 0-1.285.008-1.996-.422-1.899-1.785.102-1.41-.578-2.043-1.953-1.973-1.21.066-1.86-.43-1.761-1.707.101-1.394-.567-2.039-1.946-2.004-1.164.027-1.855-.402-1.754-1.719.114-1.464-.675-2.21-2.09-2.105-1.316.101-1.769-.492-1.757-1.684.02-1.363-.676-2.058-2.024-1.992-1.324.063-1.675-.633-1.672-1.805.02-6.527.04-13.058.004-19.59-.007-1.34.524-1.917 1.828-1.859 1.493.067 2.145-.695 2.032-2.133-.086-1.12.43-1.57 1.5-1.507 1.52.082 2.308-.586 2.203-2.164-.074-1.067.414-1.649 1.496-1.56 1.851.153 2.226-.827 2.226-2.456 0-5.156.047-5.184 5.286-5.043 1.492.039 2.136-.606 2.132-2.047-.007-2.195-.007-4.39.016-6.586.02-1.469-.633-2.172-2.125-1.996-1.27.152-1.82-.394-1.715-1.668.13-1.496-.644-2.11-2.082-2.074-1.031.023-1.648-.453-1.555-1.543.137-1.574-.593-2.27-2.12-2.238-1.09.023-1.747-.344-1.633-1.602.136-1.539-.637-2.293-2.172-2.203-1.192.066-1.68-.5-1.621-1.637.082-1.617-.77-2.113-2.274-2.074-2.379.066-4.762.008-7.14-.004-.813-.004-1.774 0-1.704-1.133.153-2.449-1.34-2.554-3.18-2.543-7.019.043-14.034.004-21.054-.004-1.062-.004-2.21.063-2.129-1.511.086-1.715-.851-2.243-2.383-2.239-2.254.008-4.515-.097-6.77-.039-1.433.035-2.21-.437-2.179-1.957.027-1.308-.719-1.918-1.953-1.867-1.242.05-1.758-.46-1.805-1.695-.047-1.215-.808-1.91-2.015-1.942-1.168-.027-1.633-.566-1.618-1.699.02-1.34-.69-2.058-2.023-2.047-1.258.012-1.758-.648-1.789-1.8-.035-1.36-.71-1.989-2.078-1.95-1.113.035-1.719-.531-1.684-1.672.051-1.574-.758-2.23-2.258-2.144-1.136.066-1.496-.524-1.476-1.567a57 57 0 0 0-.043-3.843c-.043-1-.477-1.883-1.57-1.914-1.2-.036-1.446.91-1.453 1.914q-.012 2.286-.012 4.574-.002 25.084.008 50.168c0 2.266.394 2.625 2.68 2.598 1.034-.016 2.081.086 3.105-.016 1.445-.14 1.808.531 1.734 1.824-.074 1.215.016 2.438.012 3.66 0 1.274.582 1.98 1.89 1.887 1.317-.09 1.97.434 1.891 1.781-.082 1.371.531 2.051 1.941 2.004 1.168-.039 1.875.434 1.762 1.73-.117 1.403.586 2.032 1.942 2.032 1.18-.004 1.742.469 1.73 1.762a1926 1926 0 0 0-.008 19.59c.008 1.171-.32 1.906-1.648 1.804-1.496-.11-2.14.625-2.031 2.086.086 1.145-.356 1.742-1.582 1.598-1.559-.18-2.278.527-2.215 2.097.047 1.192-.516 1.836-1.766 1.754-1.469-.097-2.207.559-2.043 2.055.14 1.29-.437 1.816-1.68 1.71-1.32-.108-1.976.567-1.953 1.821.024 1.414-.574 1.91-1.98 1.899-6.469-.051-12.938-.04-19.406-.008-1.204.008-1.864-.309-1.727-1.652.14-1.446-.531-2.204-2.023-2.106-1.243.082-1.817-.512-1.797-1.723.023-1.363-.637-2.03-2-2.015-1.207.015-1.805-.543-1.73-1.79.077-1.359-.563-2.132-1.946-2.015-1.39.113-1.875-.484-1.8-1.8.073-1.313-.669-1.93-1.915-1.876-1.402.063-1.766-.636-1.758-1.902.032-6.469.035-12.941 0-19.41-.008-1.266.34-2 1.73-1.934 1.372.063 2.055-.578 1.966-1.98-.075-1.16.523-1.727 1.64-1.672 1.61.078 2.172-.758 2.164-2.23-.004-.805.266-1.56 1.223-1.473 2.426.215 2.426-1.348 2.43-3.055.015-4.383.039-4.383 4.312-4.406 3.117-.016 3.234-.121 3.234-3.16 0-12.082-.007-24.168-.007-36.25 0-5.922.004-11.84.004-17.762 0-1.106-.121-2.184-1.575-2.18-1.359 0-1.472 1.047-1.496 2.067-.027 1.222-.054 2.441-.015 3.664.03 1.133-.34 1.742-1.59 1.593-1.446-.168-2.196.473-2.153 1.977.036 1.227-.417 1.988-1.808 1.91-1.477-.078-2.113.711-2.074 2.137.02.691.023 1.539-.887 1.508-1.645-.055-2.543.73-3.281 2.101-.348.64-1.114 1.16-1.809 1.489-.96.457-1.441 1.105-1.379 2.132.082 1.38-.59 1.848-1.887 1.746-1.292-.097-1.976.56-1.902 1.852.098 1.691-.766 2.008-2.266 1.945-2.375-.101-4.757 0-7.132.043-.828.016-1.836.2-1.762 1.184.207 2.77-1.547 2.637-3.422 2.625-6.836-.035-13.672-.008-20.508-.012-1.316-.004-2.562.113-2.48 1.871.07 1.516-.723 1.852-2.04 1.825-2.378-.051-4.761.035-7.14-.012-1.453-.028-2.187.574-2.152 2.039.02.973-.207 1.707-1.406 1.633-1.653-.106-2.356.742-2.258 2.332.07 1.168-.551 1.476-1.594 1.386-1.43-.125-2.23.485-2.113 2.004.105 1.348-.54 1.887-1.84 1.844-1.293-.043-1.926.637-1.875 1.914.058 1.434-.633 1.977-2.016 1.863-1.324-.105-1.894.641-1.91 1.887-.02 1.524-.016 3.05-.016 4.574-.007 4.051-.003 4.04 4.055 4.078 4.328.04 3.5-.015 3.602 3.52.015.55.03 1.102-.004 1.648-.106 1.497.515 2.364 2.074 2.344 1.219-.012 1.82.528 1.793 1.746-.031 1.492.762 2.07 2.176 2.032.949-.028 1.535.406 1.445 1.43-.14 1.57.586 2.253 2.121 2.241.965-.007 1.66.344 1.656 1.485-.007 6.71 0 13.426-.004 20.137-.003.988-.37 1.687-1.507 1.59-1.563-.133-2.258.605-2.27 2.124-.008 1.086-.45 1.72-1.672 1.598-1.472-.145-2.187.625-2.133 2.05.047 1.247-.464 1.86-1.718 1.72-1.59-.18-2.082.628-1.969 2.062.098 1.246-.508 1.809-1.742 1.73-1.371-.085-2.07.547-2.02 1.938.047 1.336-.61 1.805-1.906 1.8-6.469-.034-12.941-.03-19.41-.003-1.188.004-1.906-.367-1.809-1.66.13-1.621-.687-2.192-2.199-2.11-1.055.059-1.59-.48-1.535-1.554.074-1.45-.625-2.172-2.059-2.176-1.242 0-1.71-.598-1.668-1.824.047-1.34-.71-2.055-2.047-2.008-1.168.043-1.691-.504-1.71-1.613-.02-1.368-.758-2.028-2.067-2.004-1.297.02-1.68-.645-1.68-1.825q.032-9.889-.007-19.773c-.004-1.16.488-1.746 1.62-1.684 1.477.079 2.145-.593 2.141-2.043 0-.976.348-1.675 1.492-1.617 1.653.09 2.336-.765 2.297-2.336-.02-.898.414-1.445 1.313-1.363 2.234.203 2.39-1.129 2.414-2.867.082-5.328-.957-4.41 4.914-4.656 2.18-.094 2.395-.172 2.559-2.329.27-3.539.062-7.074-.012-10.609-.027-1.277.27-2.101 1.828-2.031 1.406.058 2.09-.742 2.016-2.203-.059-1.157.035-2.32-.024-3.477-.062-1.262.309-2.035 1.727-1.91 1.535.137 2.105-.64 1.984-2.086-.094-1.172.465-1.703 1.629-1.617 1.508.11 2.129-.637 2.031-2.09-.074-1.152.43-1.723 1.625-1.598 1.469.149 2.18-.554 2.176-2-.004-1.257.531-1.953 1.863-1.89 1.414.062 2.024-.711 1.938-2.035-.086-1.282.465-1.79 1.715-1.704 1.05.075 1.937-.37 1.898-1.484-.066-1.992.977-2.36 2.637-2.215.847.074 1.707-.008 2.562-.02 1.332-.019 2.285-.491 2.258-2.011-.023-1.297.66-1.664 1.848-1.637 2.07.047 4.148.004 6.222.004q11.444-.006 22.887 0c1.117 0 2.531.07 2.656-1.312.215-2.332 1.641-2.512 3.41-2.473.731.016 1.465-.055 2.196-.062 1.324-.02 2.098-.684 2.117-2 .02-1.247.586-1.747 1.781-1.786 1.32-.043 2.004-.765 1.989-2.105-.012-1.05.464-1.606 1.547-1.555 1.43.07 2.175-.566 2.167-2.039-.003-1.144.422-1.812 1.739-1.781.953.023 1.906-.277 1.812-1.543-.09-1.23-1.09-1.36-2.02-1.387-2.073-.058-4.148-.027-6.222-.062-1.41-.028-2.242.515-2.144 2.031.078 1.184-.485 1.64-1.63 1.64q-17.484-.016-34.968 0c-.942 0-1.55-.245-1.461-1.343.156-1.88-.836-2.39-2.574-2.356-3.598.067-7.2-.03-10.801-.027-1.18.004-1.902-.398-1.797-1.691.137-1.723-.758-2.223-2.336-2.2-3.476.055-6.957-.035-10.433.047-1.422.032-2.22-.258-2.051-1.883.133-1.312-.574-1.882-1.88-1.843-1.28.039-2.566-.059-3.843.015-1.332.078-1.945-.457-1.867-1.789.086-1.445-.684-1.949-2.027-1.902-1.22.039-2.442-.047-3.66.008-1.243.054-1.84-.426-1.72-1.703.145-1.493-.566-2.137-2.034-2.086-.82.027-1.758-.04-1.708-1.145.11-2.258-1.23-2.633-3.03-2.582-.852.024-1.708-.086-2.555-.031-1.356.086-2.125-.352-1.989-1.848.13-1.398-.531-2.05-1.937-1.96-1.059.066-1.828-.216-1.727-1.497.133-1.699-.726-2.308-2.328-2.183-.715.054-1.266-.149-1.484-1.004-.692-2.723-.72-2.72-3.504-2.75-.668-.008-1.344-.032-2.012 0-1.328.066-2.11-.383-2.008-1.875.059-.864-.226-1.75-1.23-1.684-2.63.172-2.606-1.48-2.485-3.305.043-.668-.03-1.343.008-2.011.09-1.547-.594-2.473-2.148-2.602-1.047-.086-1.543-.543-1.512-1.61.035-1.292-.637-1.886-1.922-1.87-.918.007-1.762-.2-1.832-1.328-.09-1.399-.605-2.36-1.996-2.954-.797-.34-1.379-1.199-1.777-2.035-.278-.586-.657-.976-1.246-1.258-1.223-.585-2.32-1.312-2.727-2.746-.164-.574-.648-.98-1.23-.93-2.122.188-2.422-1.058-2.317-2.738.051-.789-.027-1.586-.02-2.379.02-1.484-.406-2.53-2.175-2.414-1.285.082-1.703-.62-1.656-1.82.046-1.219-.036-2.441-.02-3.66.02-1.34-.527-2.106-1.945-2.027-1.192.07-1.887-.364-1.793-1.664.105-1.5-.621-2.145-2.086-2.024-1.192.094-1.621-.484-1.602-1.637.035-2.5-.05-5.004.02-7.507.043-1.551-.531-2.305-2.125-2.188-.938.066-1.63-.105-1.785-1.289-.348-2.59-.68-2.766-3.313-2.145m191.004.899c.004-6.164.02-12.324 0-18.488-.004-1.133.063-2.102 1.559-2.098 1.668 0 2.175-.977 2.148-2.508-.047-2.379.004-4.758.004-7.137-.004-.89.195-1.59 1.281-1.585 1.98.003 2.457-1.204 2.375-2.903-.039-.789.047-1.59-.008-2.379-.101-1.37.278-2.23 1.852-2.273 1.36-.035 1.879-.922 1.883-2.211 0-1.16.066-2.317.082-3.477.012-1.152.406-1.847 1.723-1.765 1.484.09 2.16-.778 2.054-2.157-.097-1.273.48-1.578 1.602-1.57 1.492.008 2.21-.781 2.152-2.308-.043-1.094.027-2.196.008-3.293-.02-1.13.277-1.875 1.625-1.864 1.418.016 2.14-.77 2.027-2.207-.101-1.261.5-1.785 1.703-1.785 1.29 0 2.121-.484 2.028-1.95-.07-1.175.515-1.655 1.676-1.573 1.48.109 2.136-.672 2.082-2.098-.047-1.23.52-1.8 1.742-1.793.922.004 1.898-.266 1.894-1.3-.02-2.571 1.63-2.524 3.414-2.434.668.035 1.344.007 2.012-.016 1.063-.039 2.04-.316 2.016-1.602-.02-1.214-1-1.43-1.97-1.402-1.214.031-1.597-.558-1.562-1.687.043-1.34-.003-2.684-.015-4.028-.008-.793-.227-1.68-1.11-1.605-2.875.234-2.71-1.602-2.613-3.508.035-.727-.097-1.46-.094-2.191.004-1.344-.57-2.102-1.98-2.004-1.14.078-1.77-.325-1.598-1.559.219-1.59-.472-2.293-2.058-2.16-1.121.09-1.785-.39-1.739-1.559.063-1.66-.73-2.316-2.34-2.23-1.09.058-1.492-.574-1.46-1.621.035-1.281-.047-2.567.011-3.844.067-1.488-.57-2.203-2.058-2.031-1.27.144-1.828-.32-1.684-1.633.16-1.469-.515-2.195-2.02-2.066-1.23.105-1.85-.454-1.804-1.684.055-1.43-.531-2.195-2.035-2.117-1.203.058-1.852-.45-1.738-1.73.12-1.438-.66-2-1.985-1.973-1.336.027-1.863-.61-1.73-1.926.132-1.297-.496-1.988-1.813-1.887-1.46.113-1.976-.558-1.87-1.95.081-1.073-.372-1.862-1.571-1.718-2.117.262-2.14-.957-2.145-2.554-.012-5.372.946-4.922-5.215-4.934-1.226-.004-1.78.586-1.765 1.797.015 1.34-.04 2.683 0 4.027.035 1.156-.442 1.734-1.621 1.613-1.637-.164-2.196.653-2.09 2.172.078 1.078-.485 1.602-1.551 1.516-1.594-.129-2.258.601-2.11 2.16.118 1.2-.472 1.629-1.632 1.566-1.414-.078-2.184.59-2.121 2.075.05 1.218-.508 1.8-1.766 1.718-1.266-.078-1.98.524-1.945 1.829.035 1.457-.57 2.14-2.086 1.988-1.23-.125-1.852.52-1.75 1.742.125 1.543-.598 2.074-2.059 1.965-1.152-.086-1.648.582-1.64 1.695.007 1.281-.047 2.563.004 3.844.05 1.246-.332 2.008-1.727 1.965-1.328-.035-2.074.554-2.012 1.972.051 1.207-.531 1.836-1.761 1.77-1.395-.074-2.047.586-2 1.96.046 1.294-.489 1.903-1.852 1.802-1.375-.102-2.004.64-1.988 2.004.015 1.343-.024 2.683-.024 4.027 0 .762-.254 1.422-1.097 1.379-2.528-.13-2.72 1.433-2.57 3.336.058.73-.032 1.469.023 2.195.105 1.434-.383 2.2-1.957 2.098-.93-.063-1.723.27-1.715 1.418.008 1.097.75 1.48 1.687 1.523 1.34.063 2.684.086 4.028.059 1.133-.024 1.754.394 1.636 1.601-.156 1.598.622 2.223 2.153 2.164 1.078-.043 1.773.418 1.734 1.602-.05 1.445.633 2.16 2.074 2.148 1.137-.011 1.692.524 1.641 1.68-.062 1.285.578 1.953 1.855 1.941 1.391-.011 2.004.618 1.887 2.024-.078.933.196 1.887 1.305 1.793 2.23-.18 2.543 1.012 2.363 2.797-.082.785.016 1.586.012 2.379-.008 1.511.555 2.472 2.246 2.41 1.148-.04 1.676.465 1.531 1.676-.183 1.582.617 2.261 2.16 2.132 1.106-.093 1.551.434 1.543 1.5-.004 1.403.036 2.809.075 4.211.027.852.27 1.746 1.28 1.66 2.505-.214 2.602 1.297 2.473 3.11-.062.851.02 1.71-.02 2.562-.065 1.414.61 2.082 1.981 1.93 1.442-.156 1.778.527 1.743 1.816-.059 2.317-.032 4.637.023 6.954.023 1.058.195 2.273 1.55 2.312 1.977.055 2.15 1.145 2.134 2.754-.063 6.71-.051 13.422-.012 20.133.02 2.844.586 3.418 3.035 3.469 3.547.074 3.95-.325 3.957-3.961.004-.426 0-.852 0-1.637m-104.195-1.3c-.637-.184-.867-.673-.828-1.263.125-1.972-1.047-2.336-2.676-2.304-2.317.039-4.637-.035-6.957-.012-1.207.012-1.871-.441-1.746-1.719.164-1.668-.82-2.144-2.227-2.16-2.074-.02-4.148-.016-6.226-.023-1.414 0-2.215.754-2.223 2.12-.016 3.415.059 6.829.11 10.243.015 1.32.636 2.094 2.019 2.02 1.531-.079 1.816.773 1.789 2.074-.055 2.379.047 4.761-.012 7.14-.039 1.465.508 2.207 2.012 2.106 1.262-.086 1.762.484 1.707 1.738-.05 1.277-.004 2.563.043 3.844.027.824.223 1.812 1.207 1.754 2.644-.157 2.547 1.504 2.426 3.293-.047.668.023 1.343-.008 2.015-.066 1.508.633 2.328 2.148 2.305 1.246-.02 1.797.555 1.77 1.762-.027 1.351.598 2.058 1.988 2.015 1.188-.039 1.824.438 1.778 1.723-.047 1.156.57 1.824 1.734 1.953 1.113.121 1.808.684 1.898 1.844.11 1.43.938 2.082 2.297 2.035 1.223-.043 1.625.559 1.582 1.668-.05 1.45.633 2.172 2.106 2.066 1.246-.09 1.593.633 1.566 1.707-.035 1.34.531 2.094 1.961 1.989 1.39-.102 1.832.675 1.785 1.914-.047 1.328.633 1.863 1.918 1.828 1.219-.035 2.442.039 3.66.004 1.164-.035 1.891.308 1.848 1.637-.05 1.48.777 2.058 2.184 2.046 1.34-.015 2.683.024 4.023.047.953.016 1.52.446 1.441 1.457-.148 1.91.899 2.414 2.59 2.39 3.477-.046 6.957.009 10.434-.034 1.18-.012 1.918.347 1.871 1.629-.066 1.797 1.031 2.082 2.492 2.078 10.254-.02 20.508-.012 30.762-.016.734 0 1.469-.02 2.144-.363.508-.262.946-.625.95-1.242.004-.73-.536-1.207-1.145-1.219-2.039-.047-2.121-1.336-2.039-2.86.05-.91-.004-1.831-.074-2.742-.067-.847-.45-1.757-1.317-1.757-2.593-.004-2.488-1.657-2.375-3.446.047-.726-.039-1.46-.054-2.195-.024-1.371-.617-2.238-2.086-2.2-1.168.032-1.707-.503-1.672-1.632.043-1.313-.68-1.957-1.875-1.984-1.383-.04-1.992-.676-2.031-2.012-.043-1.344-.82-2.043-2.118-1.977-1.171.063-1.5-.449-1.472-1.508.039-1.417-.703-2.132-2.133-2.125-1.105.004-1.672-.503-1.71-1.652-.044-1.39-.81-2.14-2.204-2.148-1.004-.004-1.473-.485-1.45-1.453.036-1.551-.777-2.211-2.253-2.211-.957 0-1.54-.438-1.465-1.438.121-1.625-.586-2.402-2.215-2.363-1.05.023-1.55-.473-1.535-1.559.023-1.578-.785-2.36-2.383-2.316-.558.015-1.316-.024-1.219-.742.278-2.012-.863-2.82-2.476-3.45-.457-.18-1.008-.707-1.094-1.156-.39-2.07-1.828-2.125-3.445-2.023-.79.054-1.59-.035-2.38.015-1.347.086-2.089-.367-1.995-1.855.09-1.43-.77-1.926-2.078-1.918-1.22.004-2.442-.05-3.66-.043-1.192.008-1.844-.488-1.793-1.742.062-1.45-.606-2.188-2.086-2.078-1.149.086-1.727-.383-1.684-1.567.063-1.605-.844-2.129-2.309-2.113-2.316.027-4.64-.05-6.957.016-1.296.035-1.945-.418-1.941-1.754.008-1.508-.902-1.985-2.27-1.973-1.34.012-2.683-.043-4.347-.129m224.125-2.7c-.02-.733-.102-1.472-.043-2.194.148-1.805-.66-2.582-2.442-2.547-2.011.043-4.027-.02-6.039.011-1.27.02-2.12.559-2.03 1.997.093 1.453-.669 1.917-2.017 1.898-2.44-.035-4.882.02-7.324.016-1.015 0-1.992.222-1.906 1.425.152 2.184-1.102 2.371-2.754 2.25-.789-.058-1.59.04-2.379-.011-1.547-.098-2.508.402-2.398 2.14.078 1.196-.531 1.586-1.672 1.578-2.442-.015-4.883.055-7.32.098-1.313.024-2.329.418-2.227 1.992.086 1.344-.594 1.676-1.793 1.586-.941-.074-1.879.317-1.848 1.34.079 2.543-1.468 2.684-3.347 2.547-.668-.05-1.344.031-2.012 0-1.496-.074-2.352.547-2.316 2.11.03 1.32-.696 1.667-1.86 1.632-1.156-.039-2.316.016-3.476-.004-1.336-.023-2.114.582-2.114 1.942 0 1.316-.578 1.851-1.89 1.836-1.258-.016-1.926.77-1.899 1.984.028 1.363-.632 1.809-1.886 1.82-1.344.008-2.008.735-1.934 2.098.059 1.078-.488 1.601-1.531 1.586-1.41-.016-2.203.554-2.137 2.058.047 1.133-.496 1.711-1.644 1.692-1.454-.028-2.09.75-2.141 2.148-.031.867-.324 1.531-1.387 1.547-1.402.02-2.082.875-2.273 2.176-.14.957-.504 1.59-1.633 1.508-1.559-.114-2.242.738-2.211 2.218.023 1.055-.41 1.618-1.496 1.606-1.344-.016-2.086.71-2.149 1.984-.054 1.215-.566 1.766-1.77 1.825-1.198.058-1.94.703-1.976 1.957-.035 1.175-.476 1.785-1.765 1.753-1.512-.035-2.192.872-2.2 2.329-.003 1.101-.05 2.199.004 3.296.063 1.247-.304 2.004-1.707 1.973-1.511-.031-2.015.879-1.984 2.25.02.73-.055 1.469.012 2.195.172 1.82.039 3.332-2.399 3.266-.668-.016-1.12.512-1.144 1.211-.024.727.445 1.121 1.113 1.238.656.117 1.324.223 1.988.227 3.297.035 6.594.043 9.887.043 6.957.004 13.918.008 20.875-.02 1.145-.004 2.613.078 2.75-1.453.188-2.09 1.473-2.195 3.031-2.21 3.23-.032 6.465-.095 9.696-.157 1.421-.027 2.351-.586 2.3-2.184-.035-1.117.579-1.46 1.621-1.453 1.403.008 2.805-.113 4.207-.148.91-.024 1.684-.383 1.649-1.324-.09-2.395 1.39-2.442 3.113-2.313.727.055 1.465-.02 2.196 0 1.394.031 2.23-.531 2.214-2.02-.011-1.23.614-1.714 1.809-1.777 1.18-.062 1.953-.726 1.957-1.98.004-1.246.57-1.742 1.8-1.703 1.364.043 2.032-.735 1.977-2.063-.058-1.3.614-1.719 1.782-1.7 1.34.024 2.07-.597 2.003-1.995-.046-1.074.555-1.578 1.532-1.653 1.48-.109 2.226-.816 2.152-2.34-.047-1.05.453-1.577 1.547-1.546 1.414.043 2.184-.653 2.184-2.094-.004-1.316.75-1.656 1.906-1.57 1.402.105 2.008-.594 1.98-1.973-.027-1.219.078-2.441.016-3.66-.067-1.262.312-2.004 1.703-1.965 1.238.035 1.738-.684 1.793-1.828.063-1.34.184-2.68.195-4.02.012-1.05.383-1.601 1.504-1.566 1.696.055 2.196-.961 2.176-2.473-.027-2.32.031-4.64-.016-6.957-.023-1.168.286-1.906 1.602-1.875 1.695.04 2.203-.968 2.195-2.472-.015-2.258.012-4.516.02-7.137m-191.305-51.602c-.113-1.468-.039-2.715 2.02-2.566 1.082.078 1.671-.66 1.699-1.738q.06-2.198.027-4.391c-.07-4.344.68-4.426-4.566-4.41-2.047.008-4.106.137-6.059-.656.418-2.055-.496-3.164-2.59-3.164-14.582-.012-29.164-.008-43.746.003-1.953.004-2.511.56-2.504 2.516.008 2.317.133 4.637.13 6.953-.02 11.953-.083 23.91-.09 35.867-.004 2.543.351 2.84 2.867 2.864 3.476.027 6.957.027 10.433.02 1.133 0 1.91.316 1.867 1.644-.046 1.535.868 1.988 2.235 1.965 1.281-.02 2.562.023 3.844.043.835.007 1.457.289 1.402 1.265-.137 2.36.976 2.606 2.988 2.602 3.418-.004 6.836-.008 10.25.008.77 0 1.586-.149 1.762 1.05.375 2.618.422 2.61 3.015 2.621.793.004 1.59.051 2.38-.015 1.44-.117 2.245.347 2.038 1.941-.183 1.414.59 1.817 1.86 1.778 1.34-.04 2.683.023 4.023.02 1.106-.005 1.766.417 1.656 1.624-.152 1.606.66 2.211 2.172 2.16.91-.031 1.57.297 1.496 1.367-.128 1.805.848 2.258 2.473 2.297 4.45.098 4.504.028 4.516-4.558.004-1.582-.586-2.356-2.094-2.246-1.516.105-1.73-.735-1.723-1.914.008-1.278-.02-2.559-.05-3.84-.024-.914-.461-1.653-1.399-1.594-2.277.148-2.344-1.211-2.34-2.918.032-12.078.012-24.16.008-36.598m191.274 22.66c-.004-12.328-.004-24.652-.012-36.98-.004-2.281-.274-2.605-2.278-2.605-14.46-.008-28.925.015-43.386-.012-1.594-.004-2.492.574-2.418 2.2.066 1.487-.75 1.679-1.953 1.655-2.258-.043-4.516.07-6.774-.011-1.836-.063-2.535.761-2.48 2.52.058 2.01.066 4.026.031 6.038-.023 1.375.54 2.098 1.95 1.988 1.378-.109 1.792.551 1.792 1.852a10511 10511 0 0 0-.004 38.445c0 1.172-.27 1.88-1.652 1.73-1.516-.163-2.07.731-2.074 2.118-.004 1.16-.075 2.32-.024 3.477.063 1.328-.492 1.968-1.824 1.84-1.504-.145-1.844.695-1.922 1.995-.297 4.965-.054 4.864 4.93 4.688 1.183-.043 1.879-.68 1.86-1.816-.028-1.508.792-1.88 2.054-1.895.902-.008 1.68-.387 1.613-1.351-.152-2.262 1.176-2.481 2.903-2.352.726.05 1.464-.05 2.195-.004 1.535.106 2.476-.402 2.496-2.105.012-1.114.605-1.622 1.754-1.575 1.281.047 2.562-.011 3.844-.02 1.136-.01 1.957-.445 1.89-1.702-.097-1.727.867-2 2.293-1.977 3.297.047 6.594-.031 9.887.016 1.766.023 2.84-.61 2.836-2.496 0-1.036.535-1.395 1.488-1.395 1.344 0 2.684-.047 4.027-.05 1.149-.005 1.938-.458 1.926-1.688-.015-1.598.883-1.899 2.239-1.883 3.171.043 6.343.004 9.52-.004 3.073-.008 3.23-.152 3.26-3.148.016-1.707.009-3.418.013-5.493m-78.633 18.227c.09-.902.629-1.402 1.453-1.68 1.531-.515 2.152-1.59 2.148-3.21-.039-11.899-.035-23.801-.039-35.7-.004-1.058-.168-2.031-1.469-2.117-1.453-.094-1.468 1.02-1.472 2.008-.004 1.133-.406 1.726-1.633 1.582-1.656-.2-2.406.547-2.21 2.223.144 1.226-.325 1.847-1.645 1.71-1.625-.171-2.168.7-2.086 2.211.058 1.094-.047 2.2.015 3.293.082 1.446-.582 1.973-1.969 1.903-1.214-.063-2.44.035-3.66-.02-1.425-.066-2.004.633-2.007 1.973-.004 1.402-.032 2.805-.024 4.207.004.797-.32 1.398-1.137 1.34-2.394-.172-2.695 1.238-2.547 3.12.07.911-.03 1.833.004 2.747.043 1.148-.433 1.71-1.617 1.64-1.644-.101-2.09.848-2.066 2.305.035 2.38-.035 4.758.004 7.137.02 1.273-.39 1.996-1.782 1.887-1.449-.118-1.957.668-1.925 2.007.027 1.22-.043 2.442-.004 3.66.043 1.215-.38 1.84-1.7 1.72-1.359-.13-2.039.546-2.062 1.925-.02 1.156-.137 2.313-.148 3.473-.098 10.004.285 20.008.015 30.015-.094 3.41.11 6.829.215 10.243.031.957.285 1.902 1.469 1.976 1.16.074 1.363-.812 1.457-1.71.086-.798.316-1.532 1.265-1.47 2.317.153 2.547-1.355 2.563-3.074.008-.855.035-1.71.008-2.562-.04-1.164.32-1.871 1.656-1.809 1.348.063 2.055-.68 2.043-2.012-.012-1.242.625-1.765 1.785-1.82 1.48-.066 1.969-.988 1.985-2.324.015-1.219.035-2.438.078-3.66.027-.91.406-1.535 1.437-1.48 1.649.085 2.332-.805 2.356-2.333.015-.918.484-1.289 1.359-1.363 1.672-.14 2.258-1.254 2.309-2.762.035-1.097.023-2.199.023-3.297 0-.734.172-1.43 1.023-1.468 2.387-.114 2.637-1.743 2.657-3.575.011-.855.031-1.71.035-2.566 0-.855.305-1.394 1.27-1.398 1.925-.004 2.453-1.145 2.437-2.88-.031-3.234.047-6.468.133-10.015m-67.16-3.726c-.504-.625-.422-1.38-.43-2.102-.02-1.649-.008-3.297-.027-4.941-.012-1.02-.403-1.977-1.508-1.926-2.04.094-2.301-1.004-2.172-2.617.066-.848-.028-1.707-.008-2.563.035-1.445-.48-2.379-2.098-2.309-1.293.055-1.687-.597-1.629-1.816.067-1.336.012-2.684-.058-4.02-.063-1.152-.707-1.765-1.902-1.75-1.282.012-2.563-.054-3.84.02-1.243.074-1.825-.375-1.778-1.656.043-1.16-.035-2.32.004-3.477.047-1.402-.496-2.273-1.98-2.238-1.39.031-1.809-.668-1.742-1.934.05-1.035-.36-1.875-1.52-1.867-1.644.012-2.488-.57-2.398-2.347.05-.942-.664-1.415-1.57-1.418-.91-.004-1.25.628-1.348 1.437-.043.363-.106.727-.11 1.09-.027 12.016-.164 24.027.125 36.043.032 1.336.582 2.101 1.977 2.023 1.316-.074 1.644.563 1.633 1.778-.036 3.539.086 7.074.035 10.609-.024 1.645.469 2.586 2.258 2.512 1.152-.047 1.629.539 1.593 1.691-.047 1.34-.011 2.684.032 4.024.03.859.382 1.75 1.312 1.699 2.41-.133 2.438 1.347 2.324 3.054-.047.727.004 1.461-.004 2.196-.015 1.433.504 2.379 2.114 2.316 1.23-.043 1.785.531 1.754 1.762-.02 1 .297 1.988 1.437 1.965 2.113-.035 2.375 1.148 2.227 2.816-.063.727.05 1.465.023 2.196-.062 1.59.488 2.59 2.262 2.59 1.023-.005 1.562.507 1.52 1.597-.063 1.54.722 2.281 2.245 2.156 1.149-.097 1.489.43 1.497 1.5.003 1.336.132 2.676.238 4.016.086 1.11.637 1.855 1.82 1.898 1.047.035 1.766.36 1.86 1.535.042.524.328.938.886 1.024.64.094 1.012-.309 1.305-.813.605-1.058.59-2.226.594-3.382q.041-18.481.066-36.957c0-1.282-.043-2.563-.086-3.844-.031-.977-.476-1.742-1.512-1.696-2.058.094-2.367-1.101-2.105-2.69.504-3.032-.684-5.274-3.316-7.185M293.34 228.54c1.695.121 3.062-.11 2.953-2.344-.043-.8.578-1.125 1.371-1.117 1.277.012 2.563-.047 3.84-.004 1.5.047 2.375-.562 2.281-2.129-.086-1.418.664-1.808 1.895-1.793.96.016 1.832-.351 1.754-1.414-.164-2.207 1.144-2.328 2.765-2.234.79.047 1.586-.063 2.375-.02 1.54.082 2.496-.394 2.395-2.144-.055-1.004.375-1.692 1.488-1.594 1.598.137 2.219-.633 2.215-2.14-.004-1.141.617-1.606 1.754-1.567 1.437.055 2.16-.707 2.078-2.144-.07-1.208.562-1.672 1.652-1.637 1.567.054 2.215-.696 2.14-2.227-.05-1.054.528-1.605 1.571-1.558 1.496.07 2.102-.649 2.067-2.09-.024-1.008.449-1.7 1.53-1.598 1.837.172 2.395-.781 2.337-2.402-.031-.758.199-1.223 1.094-1.356 2.613-.386 2.605-.425 2.62-3.062.008-.793.051-1.59 0-2.38-.085-1.32.31-2.132 1.81-2.062 1.363.067 2.042-.617 1.995-1.992-.039-1.18.414-1.863 1.7-1.804 1.285.058 1.937-.543 1.902-1.86-.035-1.265.5-1.914 1.867-1.84 1.367.075 1.996-.738 2.02-2.043.027-1.343.046-2.683.023-4.027-.012-.785.184-1.223 1.082-1.332 2.625-.32 2.621-.36 2.633-3.086.004-.734.058-1.469-.004-2.195-.125-1.559.328-2.469 2.117-2.317 1.05.09 1.52-.582 1.54-1.609.019-1.148-.669-1.461-1.653-1.453-1.281.004-2.567-.04-3.844.012-1.289.054-1.957-.41-1.863-1.793.098-1.414-.672-1.961-2.027-1.918-1.22.035-2.442-.059-3.66-.008-1.27.047-2.02-.356-1.891-1.758.152-1.637-.762-2.156-2.219-2.152-3.05.007-6.102-.02-9.152-.004-2.508.008-2.864.344-2.88 2.855-.027 4.574-.015 9.153-.007 13.727.004 1.363-.219 2.43-1.988 2.289-1.461-.113-1.871.8-1.864 2.094.024 2.562 0 5.125.008 7.687 0 .793-.098 1.39-1.098 1.566-2.613.458-2.609.5-2.617 3.098-.004.793-.035 1.59.008 2.38.078 1.347-.39 2.105-1.875 2-1.312-.095-1.887.597-1.875 1.882.016 1.281-.05 2.562-.012 3.84.032 1.129-.324 1.746-1.574 1.617-1.445-.145-2.207.52-2.148 2.004.05 1.3-.438 1.933-1.84 1.762-1.41-.168-2 .625-2 1.964 0 1.282-.059 2.563-.008 3.844.05 1.238-.437 1.84-1.703 1.738-1.363-.113-2.14.434-1.98 1.883.16 1.488-.532 1.957-1.922 1.84-1.207-.098-1.848.52-1.758 1.758.101 1.394-.492 2.008-1.91 1.969-1.098-.028-1.946.441-1.91 1.703.042 1.523-.56 2.254-2.157 2.125-.785-.063-1.61.261-1.508 1.191.22 2-.609 2.735-2.554 2.735-.938.003-1.254.886-1.16 1.765.09.867.734 1.035 1.472 1 .668-.027 1.336-.062 2.309-.12M71.988 214.292c-.558-.2-.703-.676-.668-1.176.137-1.765-.53-2.672-2.418-2.441-.922.113-1.324-.344-1.3-1.29.03-1.34-.016-2.683-.032-4.027-.011-1.375-.578-2.226-2.078-2.156-1.152.055-1.703-.445-1.617-1.629.113-1.539-.59-2.332-2.16-2.164-1.356.145-1.695-.539-1.66-1.73.043-1.34-.012-2.684-.032-4.028-.015-.91-.402-1.675-1.37-1.582-2.247.211-2.532-1.043-2.372-2.808.07-.785-.027-1.586.012-2.38.078-1.566-.602-2.503-2.2-2.48-1.273.02-1.523-.59-1.503-1.691.039-2.379-.004-4.758-.016-7.14-.008-1.419-.52-2.376-2.136-2.321-1.286.047-1.711-.68-1.668-1.852.02-.546-.012-1.097-.012-1.644.004-4.453.008-8.91.02-13.363.003-1.325-.544-2.063-1.954-2.059-3.539.02-7.082.004-10.62.012-.966.004-1.786.383-1.731 1.453.12 2.293-1.258 2.558-3.024 2.473-.793-.04-1.59.03-2.383.003-1.39-.043-2.257.48-2.195 2 .055 1.286-.613 1.715-1.805 1.688a63 63 0 0 0-4.027.05c-.934.044-1.437.602-1.469 1.54-.03.887.465 1.5 1.297 1.441 2.383-.16 2.5 1.293 2.367 3.04-.054.726.024 1.464-.023 2.195-.098 1.48.434 2.375 2.047 2.316 1.297-.047 1.687.637 1.629 1.836-.063 1.215.004 2.437-.016 3.66-.02 1.227.434 2.027 1.77 2.035 1.3.008 1.82.742 1.984 1.926.152 1.102.746 1.816 1.953 1.715 1.457-.121 1.98.586 1.922 1.953-.04.848.184 1.766 1.195 1.723 2.414-.098 2.637 1.328 2.485 3.175-.059.727.039 1.465.008 2.196-.055 1.425.605 2.234 2.027 2.242 1.195.004 1.844.344 1.7 1.684-.15 1.37.577 2.105 1.929 2.054 1.426-.05 1.988.586 1.949 1.961-.027 1.082.504 1.781 1.648 1.734 1.528-.058 2.051.715 2.004 2.125-.043 1.208.61 1.875 1.79 1.79 1.48-.106 2.136.402 2.035 1.949-.083 1.172.558 1.863 1.789 1.765 1.457-.113 1.976.551 1.855 1.95-.105 1.234.555 1.836 1.77 1.73 1.507-.129 2.12.559 2.07 2.02-.043 1.332.742 1.836 1.973 1.828 1.34-.008 2.683-.016 4.023-.004.707.008 1.5.133 1.402 1.039-.277 2.578 1.317 2.734 3.203 2.656.915-.035 1.836.117 2.739.04 1.18-.102 1.703.241 1.578 1.515-.164 1.64.695 2.383 2.312 2.222 1.047-.101 1.485.399 1.434 1.38-.102 1.902.941 2.449 2.637 2.328.726-.055 1.465 0 2.195-.004.96-.008 1.93-.07 1.969-1.356.035-1.246-.739-1.738-1.883-1.707-1.219.04-1.824-.45-1.738-1.726.093-1.38-.598-2.036-1.97-2.016-1.112.02-1.94-.313-1.866-1.649.082-1.468-.606-2.136-2.082-2.066-1.012.05-1.688-.387-1.602-1.492.16-2.082-1.11-2.457-3.09-2.461m215.14 116.45c-1.226.097-1.452.952-1.421 1.94.031 1.22-.492 1.86-1.738 1.747-1.64-.145-2.184.777-2.168 2.207.012 1.062-.41 1.578-1.516 1.515-1.691-.093-2.262.856-2.183 2.407.043.851-.004 1.707.046 2.554.075 1.25.551 2.114 2.024 1.973.996-.094 1.687.23 1.601 1.406-.132 1.746.739 2.469 2.41 2.344 1.094-.086 1.633.379 1.512 1.476-.203 1.805.672 2.434 2.36 2.286a13 13 0 0 1 2.191-.004c1.629.133 2.418-.528 2.27-2.207-.09-1.035.312-1.645 1.453-1.555 1.62.129 2.375-.605 2.308-2.246-.039-.953.422-1.527 1.446-1.399 2.023.258 2.601-.769 2.422-2.585-.079-.786-.032-1.582-.012-2.375.035-1.43-.586-2.196-2.082-2.075-1.192.098-1.895-.336-1.813-1.632.098-1.465-.547-2.149-2.039-2.075-.969.047-1.758-.312-1.66-1.437.184-2.113-1.008-2.445-2.715-2.293-.785.066-1.578.008-2.695.027m-102.484.535c-.34.485-.329 1.043-.305 1.59.05 1.074-.422 1.645-1.504 1.547-1.723-.152-2.309.691-2.191 2.29.07.972-.415 1.507-1.418 1.444-1.797-.117-2.387.829-2.286 2.473.047.793.04 1.59-.011 2.379-.098 1.523.465 2.34 2.105 2.16.875-.094 1.688.067 1.598 1.192-.153 1.886.832 2.527 2.52 2.468 1.007-.03 1.285.54 1.195 1.395-.203 1.867.672 2.558 2.46 2.387.79-.075 1.594-.086 2.38-.012 1.582.148 2.289-.527 2.164-2.098-.086-1.129.347-1.707 1.562-1.664 1.488.047 2.285-.656 2.168-2.23-.07-.957.383-1.578 1.367-1.52 2.067.117 2.485-1.039 2.328-2.765-.066-.727-.035-1.465-.023-2.196.02-1.285-.613-1.98-1.883-1.933-1.324.046-1.926-.473-1.809-1.825.114-1.293-.496-2.004-1.816-1.89-1.531.133-2.098-.594-2.078-2.024.012-.867-.27-1.664-1.273-1.687-1.688-.047-3.403-.414-5.25.52M82.93 349.108c.855 3.547.855 3.5 4.687 3.477 1.563-.012 2.48-.48 2.367-2.191-.066-1.036.317-1.637 1.461-1.563 1.696.106 2.516-.762 2.47-2.41-.032-1.094.589-1.387 1.48-1.379 1.582.012 2.156-.898 2.187-2.313.023-.855.027-1.707-.012-2.562-.058-1.273-.62-2.113-2.03-2.012-1.145.082-1.74-.375-1.712-1.547.035-1.523-.672-2.257-2.226-2.156-1.032.067-1.688-.39-1.594-1.488.16-1.84-.778-2.38-2.43-2.246-.785.062-1.582.043-2.375.008-1.367-.055-2.066.53-2.004 1.941.043 1.05-.277 1.836-1.523 1.77-1.57-.086-2.207.699-2.203 2.203.004.886-.317 1.609-1.387 1.492-1.95-.215-2.441.883-2.414 2.535.012.73-.035 1.46-.059 2.195-.05 1.567.594 2.438 2.278 2.317.68-.047 1.59-.055 1.523.843-.195 2.516 1.535 2.664 3.516 3.086M93.32 231.98c.575-1.773.305-2.343-1.347-2.496-1.149-.109-2.317-.074-3.473-.023-.875.039-1.281.605-1.305 1.465-.023.851.305 1.488 1.203 1.52 1.57.058 3.165.355 4.922-.466m191.817-2.578c-.606.043-1.227.012-1.813.141-.804.18-1.242.75-1.222 1.594.023.933.648 1.27 1.453 1.293 1.218.035 2.437.035 3.652-.012.965-.031 1.387-.652 1.426-1.563.039-.93-.531-1.312-1.352-1.394-.605-.055-1.215-.043-2.144-.059m0 0"/></svg>';
33
+
34
+ // src/compositions/AccountIdentity.tsx
35
+ var import_react2 = require("react");
30
36
 
31
37
  // src/lib/cn.ts
32
38
  var import_clsx = require("clsx");
@@ -69,16 +75,19 @@ var import_popover = require("@ark-ui/react/popover");
69
75
  var import_portal = require("@ark-ui/react/portal");
70
76
  var import_react = require("react");
71
77
  var import_jsx_runtime2 = require("react/jsx-runtime");
72
- var DEFAULT_PANEL = "polli:rounded-lg polli:border polli:border-theme-border polli:bg-theme-bg-pale polli:shadow-lg";
78
+ var DEFAULT_PANEL = "polli:rounded-lg polli:bg-surface-menu polli:shadow-lg";
73
79
  var Dropdown = ({
74
- theme,
75
80
  trigger,
76
81
  children,
77
82
  align = "start",
83
+ side = "bottom",
78
84
  open: openProp,
85
+ portalled = true,
79
86
  onOpenChange,
80
- className
87
+ className,
88
+ panelStyle
81
89
  }) => {
90
+ const triggerId = (0, import_react.useId)();
82
91
  const [internalOpen, setInternalOpen] = (0, import_react.useState)(false);
83
92
  const isControlled = openProp !== void 0;
84
93
  const open = isControlled ? openProp : internalOpen;
@@ -89,19 +98,23 @@ var Dropdown = ({
89
98
  return /* @__PURE__ */ (0, import_jsx_runtime2.jsxs)(
90
99
  import_popover.Popover.Root,
91
100
  {
101
+ ids: { trigger: triggerId },
92
102
  open,
103
+ portalled,
93
104
  onOpenChange: (details) => setOpen(details.open),
94
105
  positioning: {
95
- placement: align === "end" ? "bottom-end" : "bottom-start"
106
+ placement: `${side}-${align}`,
107
+ strategy: portalled ? "absolute" : "fixed"
96
108
  },
97
109
  children: [
98
110
  /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Trigger, { asChild: true, children: trigger(open) }),
99
- /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_portal.Portal, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
111
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_portal.Portal, { disabled: !portalled, children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(import_popover.Popover.Positioner, { children: /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(
100
112
  import_popover.Popover.Content,
101
113
  {
102
- "data-theme": theme,
114
+ "aria-labelledby": triggerId,
115
+ style: panelStyle,
103
116
  className: cn(
104
- "polli:z-50 polli:overflow-hidden polli:focus:outline-none",
117
+ "polli:z-[120] polli:overflow-hidden polli:focus:outline-none",
105
118
  DEFAULT_PANEL,
106
119
  className
107
120
  ),
@@ -113,8 +126,158 @@ var Dropdown = ({
113
126
  );
114
127
  };
115
128
 
116
- // src/primitives/DropdownItem.tsx
129
+ // src/compositions/AccountIdentity.tsx
117
130
  var import_jsx_runtime3 = require("react/jsx-runtime");
131
+ function initials(name) {
132
+ const parts = name.trim().split(/\s+/).filter(Boolean);
133
+ if (parts.length === 0) return "?";
134
+ if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
135
+ return `${parts[0][0] ?? ""}${parts.at(-1)?.[0] ?? ""}`.toUpperCase();
136
+ }
137
+ function AccountAvatar({
138
+ name,
139
+ avatarUrl,
140
+ secondaryContent,
141
+ dashboardHref
142
+ }) {
143
+ const large = secondaryContent != null;
144
+ const className = large ? "polli:h-11 polli:w-11" : "polli:h-8 polli:w-8";
145
+ const avatar = avatarUrl ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
146
+ "img",
147
+ {
148
+ src: avatarUrl,
149
+ alt: "",
150
+ className: cn(
151
+ className,
152
+ "polli:shrink-0 polli:rounded-full polli:object-cover"
153
+ )
154
+ }
155
+ ) : /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
156
+ "span",
157
+ {
158
+ role: "img",
159
+ "aria-label": `${name} avatar`,
160
+ className: cn(
161
+ className,
162
+ "polli:flex polli:shrink-0 polli:items-center polli:justify-center polli:rounded-full polli:bg-theme-bg-pale polli:text-xs polli:font-semibold polli:text-theme-text-strong"
163
+ ),
164
+ children: initials(name)
165
+ }
166
+ );
167
+ return dashboardHref ? /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
168
+ "a",
169
+ {
170
+ href: dashboardHref,
171
+ target: "_blank",
172
+ rel: "noopener noreferrer",
173
+ "aria-label": "Open dashboard",
174
+ title: "Open dashboard",
175
+ className: "polli:shrink-0 polli:rounded-full polli:cursor-pointer polli:transition-transform polli:hover:scale-105 polli:hover:brightness-110 polli:focus-visible:outline-2 polli:focus-visible:outline-offset-2 polli:focus-visible:outline-current polli:motion-reduce:transition-none polli:motion-reduce:hover:scale-100",
176
+ children: avatar
177
+ }
178
+ ) : avatar;
179
+ }
180
+ function AccountDetails({
181
+ name,
182
+ secondaryContent,
183
+ secondaryId
184
+ }) {
185
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("span", { className: "polli:flex polli:min-w-0 polli:flex-col polli:items-start polli:text-left", children: [
186
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
187
+ "span",
188
+ {
189
+ title: name,
190
+ className: "polli:max-w-full polli:truncate polli:text-sm polli:font-medium polli:leading-5 polli:text-theme-text-strong",
191
+ children: name
192
+ }
193
+ ),
194
+ secondaryContent != null && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
195
+ "span",
196
+ {
197
+ id: secondaryId,
198
+ className: "polli:inline-flex polli:min-h-5 polli:items-center polli:whitespace-nowrap polli:text-xs polli:leading-4 polli:text-theme-text-base",
199
+ children: secondaryContent
200
+ }
201
+ )
202
+ ] });
203
+ }
204
+ function AccountMenu({
205
+ name,
206
+ avatarUrl,
207
+ dashboardHref,
208
+ secondaryContent,
209
+ children,
210
+ className,
211
+ menuClassName,
212
+ side = "bottom",
213
+ menuLabel = `Account menu for ${name}`
214
+ }) {
215
+ const statusId = (0, import_react2.useId)();
216
+ const avatar = /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
217
+ AccountAvatar,
218
+ {
219
+ name,
220
+ avatarUrl,
221
+ dashboardHref,
222
+ secondaryContent
223
+ }
224
+ );
225
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
226
+ "div",
227
+ {
228
+ "data-theme": "accent",
229
+ className: cn(
230
+ "polli:flex polli:min-w-0 polli:items-center polli:gap-2 polli:rounded-full polli:bg-theme-bg-active polli:p-1 polli:pr-3 polli:text-theme-text-strong polli:transition-colors polli:hover:bg-theme-bg-hover",
231
+ className
232
+ ),
233
+ children: [
234
+ dashboardHref && avatar,
235
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
236
+ Dropdown,
237
+ {
238
+ align: "end",
239
+ side,
240
+ className: cn(
241
+ "polli:w-max polli:min-w-[var(--reference-width)] polli:p-1",
242
+ menuClassName
243
+ ),
244
+ trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
245
+ "button",
246
+ {
247
+ type: "button",
248
+ "aria-label": menuLabel,
249
+ "aria-describedby": secondaryContent != null ? statusId : void 0,
250
+ className: "polli-control polli:flex polli:min-w-0 polli:flex-1 polli:items-center polli:gap-2 polli:self-stretch polli:rounded-full polli:text-theme-text-strong",
251
+ children: [
252
+ !dashboardHref && avatar,
253
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
254
+ AccountDetails,
255
+ {
256
+ name,
257
+ secondaryContent,
258
+ secondaryId: statusId
259
+ }
260
+ ),
261
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
262
+ ChevronIcon,
263
+ {
264
+ expanded: open,
265
+ className: "polli:ml-auto polli:h-4 polli:w-4 polli:text-theme-text-strong"
266
+ }
267
+ )
268
+ ]
269
+ }
270
+ ),
271
+ children
272
+ }
273
+ )
274
+ ]
275
+ }
276
+ );
277
+ }
278
+
279
+ // src/primitives/DropdownItem.tsx
280
+ var import_jsx_runtime4 = require("react/jsx-runtime");
118
281
  function DropdownItem({
119
282
  as,
120
283
  className,
@@ -122,13 +285,13 @@ function DropdownItem({
122
285
  ...rest
123
286
  }) {
124
287
  const Component = as || "button";
125
- return /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
288
+ return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
126
289
  Component,
127
290
  {
128
291
  ...Component === "button" ? { type: "button" } : void 0,
129
292
  ...rest,
130
293
  className: cn(
131
- "polli-control polli:flex polli:w-full polli:cursor-pointer polli:items-center polli:gap-2 polli:rounded-lg polli:bg-transparent polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:text-theme-text-base polli:no-underline polli:transition-colors polli:hover:bg-theme-bg-hover polli:focus-visible:bg-theme-bg-hover",
294
+ "polli-control polli:flex polli:w-full polli:cursor-pointer polli:items-center polli:gap-2 polli:rounded-lg polli:bg-transparent polli:px-3 polli:py-2 polli:text-left polli:text-sm polli:font-medium polli:text-theme-text-base polli:no-underline polli:transition-colors polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover polli:focus-visible:bg-theme-bg-hover",
132
295
  className
133
296
  ),
134
297
  children
@@ -136,177 +299,184 @@ function DropdownItem({
136
299
  );
137
300
  }
138
301
 
302
+ // src/primitives/icons/index.tsx
303
+ var import_jsx_runtime5 = require("react/jsx-runtime");
304
+ var strokeProps = {
305
+ fill: "none",
306
+ stroke: "currentColor",
307
+ strokeWidth: 2,
308
+ strokeLinecap: "round",
309
+ strokeLinejoin: "round"
310
+ };
311
+ function ExternalLinkIcon(props) {
312
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M7 17 17 7M9 7h8v8" }) });
313
+ }
314
+ function WalletIcon(props) {
315
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
316
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3 7a2 2 0 0 1 2-2h13a2 2 0 0 1 2 2v2H5a2 2 0 0 0-2 2V7Z" }),
317
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M3 11a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-6Z" }),
318
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "17", cy: "14", r: "1.25", fill: "currentColor" })
319
+ ] });
320
+ }
321
+ function PowerIcon(props) {
322
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
323
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M12 2v10" }),
324
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M18.4 6.6a9 9 0 1 1-12.77.04" })
325
+ ] });
326
+ }
327
+ function CardIcon(props) {
328
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
329
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("rect", { x: "2", y: "5", width: "20", height: "14", rx: "2" }),
330
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M2 10h20" })
331
+ ] });
332
+ }
333
+ function SproutIcon(props) {
334
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
335
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M7 20h10" }),
336
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M10 20c5.5-2.5.8-6.4 3-10" }),
337
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M9.5 9.4c1.1.8 1.8 2.2 2.3 3.7-2 .4-3.5.4-4.8-.3-1.2-.6-2.3-1.9-3-4.2 2.8-.5 4.4 0 5.5.8z" }),
338
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "M14.1 6a7 7 0 0 0-1.1 4c1.9-.1 3.3-.6 4.3-1.4 1-1 1.6-2.3 1.7-4.6-2.7.1-4 1-4.9 2z" })
339
+ ] });
340
+ }
341
+ function KeyIcon(props) {
342
+ return /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)("svg", { "aria-hidden": "true", viewBox: "0 0 24 24", ...strokeProps, ...props, children: [
343
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("circle", { cx: "7.5", cy: "15.5", r: "5.5" }),
344
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m21 2-9.6 9.6" }),
345
+ /* @__PURE__ */ (0, import_jsx_runtime5.jsx)("path", { d: "m15.5 7.5 3 3L22 7l-3-3" })
346
+ ] });
347
+ }
348
+
139
349
  // src/modules/auth/LoginButton.tsx
140
- var import_react2 = require("@pollinations/sdk/react");
350
+ var import_react3 = require("@pollinations/sdk/react");
141
351
 
142
352
  // src/primitives/Button.tsx
143
- var import_jsx_runtime4 = require("react/jsx-runtime");
144
- var sizes = {
145
- sm: "polli:px-2 polli:pt-0.5 polli:pb-1",
146
- md: "polli:px-4 polli:pt-1.5 polli:pb-2",
147
- lg: "polli:px-6 polli:py-3"
353
+ var import_jsx_runtime6 = require("react/jsx-runtime");
354
+ var pillSizes = {
355
+ icon: "polli:h-12 polli:w-12 polli:p-0",
356
+ xs: "polli:h-5 polli:px-1.5 polli:py-0 polli:text-[11px] polli:leading-none",
357
+ sm: "polli:min-h-7 polli:px-2 polli:pt-0.5 polli:pb-1",
358
+ md: "polli:min-h-9 polli:px-4 polli:pt-1.5 polli:pb-2",
359
+ lg: "polli:min-h-12 polli:px-6 polli:py-3"
360
+ };
361
+ var raisedSizes = {
362
+ icon: "polli:h-12 polli:w-12 polli:p-0",
363
+ xs: "polli:px-2 polli:py-1 polli:text-xs",
364
+ sm: "polli:px-4 polli:py-2 polli:text-sm",
365
+ md: "polli:px-7 polli:py-3.5 polli:text-base",
366
+ lg: "polli:px-8 polli:py-4 polli:text-lg"
148
367
  };
149
- var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-base polli:hover:bg-theme-bg-hover polli:transition-colors";
368
+ var appearanceClasses = {
369
+ pill: "polli:rounded-full",
370
+ raised: "polli:rounded-xl polli:border-r-[3px] polli:border-b-[3px] polli:border-solid polli:border-theme-text-strong/20 polli:hover:border-theme-text-strong/45"
371
+ };
372
+ var themeClasses = "polli:bg-theme-bg-active polli:text-theme-text-strong polli:hover:bg-theme-bg-hover polli:hover:text-theme-text-hover polli:transition-colors";
373
+ var outlined = "polli:border polli:border-theme-text-soft polli:bg-surface-white polli:text-theme-text-strong polli:transition-colors polli:[.dark_&]:bg-transparent";
150
374
  var intentClasses = {
151
- danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text polli:hover:bg-intent-danger-bg-hover polli:transition-colors"
375
+ brand: `${outlined} polli:hover:bg-theme-text-soft/10`,
376
+ commit: `${outlined} polli:hover:border-theme-bg-active polli:hover:bg-theme-bg-active polli:focus-visible:border-theme-bg-active polli:focus-visible:bg-theme-bg-active polli:[.dark_&]:hover:bg-theme-bg-active polli:[.dark_&]:focus-visible:bg-theme-bg-active`,
377
+ danger: "polli:border polli:border-intent-danger-text polli:bg-transparent polli:text-intent-danger-text polli:hover:bg-intent-danger-bg-hover polli:focus-visible:bg-intent-danger-bg-hover polli:transition-colors",
378
+ info: "polli:bg-intent-info-bg-light polli:text-intent-info-text polli:hover:bg-intent-info-bg-hover polli:transition-colors",
379
+ // Secondary actions never take the accent: one step stronger grey on hover.
380
+ neutral: "polli:bg-theme-bg-subtle polli:text-theme-text-base polli:hover:bg-theme-text-muted/25 polli:hover:text-theme-text-strong polli:transition-colors"
152
381
  };
153
382
  var buttonClasses = ({
154
- theme: _theme,
155
383
  intent,
384
+ appearance = "pill",
156
385
  size,
157
386
  className,
158
387
  disabled
159
388
  }) => {
160
389
  const colorClasses = intent ? intentClasses[intent] : themeClasses;
390
+ const sizeClasses = appearance === "raised" ? raisedSizes : pillSizes;
161
391
  return cn(
162
- "polli-control polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:self-center polli:font-medium polli:leading-normal polli:box-border",
392
+ "polli-control polli:inline-flex polli:items-center polli:justify-center polli:self-center polli:font-body polli:text-sm polli:font-medium polli:leading-normal polli:box-border polli:border polli:border-transparent",
163
393
  disabled ? "polli:opacity-50 polli:cursor-not-allowed" : "polli:hover:filter polli:hover:brightness-105 polli:cursor-pointer",
164
394
  colorClasses,
165
- sizes[size || "md"],
395
+ appearanceClasses[appearance],
396
+ sizeClasses[size || "md"],
166
397
  className
167
398
  );
168
399
  };
169
400
  function Button({
170
401
  as,
171
402
  children,
172
- theme,
403
+ icon,
173
404
  intent,
405
+ appearance,
174
406
  size,
175
407
  className,
176
408
  disabled,
177
409
  ...buttonProps
178
410
  }) {
179
411
  const Component = as || "button";
180
- return /* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
412
+ const isButton = Component === "button";
413
+ const isAnchor = Component === "a";
414
+ const buttonType = buttonProps.type;
415
+ const onClick = buttonProps.onClick;
416
+ const handleClick = disabled ? (event) => {
417
+ event.preventDefault();
418
+ event.stopPropagation();
419
+ } : onClick;
420
+ return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
181
421
  Component,
182
422
  {
183
- "data-theme": intent ? void 0 : theme,
423
+ ...buttonProps,
184
424
  "data-intent": intent,
425
+ ...isButton ? { type: buttonType ?? "button", disabled } : {},
426
+ ...!isButton && disabled ? { "aria-disabled": true, tabIndex: -1 } : {},
427
+ ...isAnchor && disabled ? { href: void 0 } : {},
428
+ onClick: handleClick,
185
429
  className: buttonClasses({
186
- theme,
187
430
  intent,
431
+ appearance,
188
432
  size,
189
433
  className,
190
434
  disabled
191
435
  }),
192
- disabled,
193
- ...buttonProps,
194
- children
436
+ children: [
437
+ icon && /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
438
+ "span",
439
+ {
440
+ "aria-hidden": "true",
441
+ className: "polli:mr-2 polli:flex polli:size-4 polli:shrink-0 polli:[&>svg]:size-full",
442
+ children: icon
443
+ }
444
+ ),
445
+ children
446
+ ]
195
447
  }
196
448
  );
197
449
  }
198
450
 
199
451
  // src/modules/auth/LoginButton.tsx
200
- var import_jsx_runtime5 = require("react/jsx-runtime");
452
+ var import_jsx_runtime7 = require("react/jsx-runtime");
201
453
  function LoginButton({ children, ...buttonProps }) {
202
- const { isLoggedIn } = (0, import_react2.useAuthState)();
203
- const { login } = (0, import_react2.useAuthActions)();
204
- if (isLoggedIn) return null;
205
- return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(Button, { ...buttonProps, onClick: () => login(), children });
206
- }
207
-
208
- // src/modules/auth/UserAvatar.tsx
209
- var import_react3 = require("@pollinations/sdk/react");
210
- var import_jsx_runtime6 = require("react/jsx-runtime");
211
- var sizeClass = {
212
- sm: "polli:w-6 polli:h-6 polli:text-xs",
213
- md: "polli:w-9 polli:h-9 polli:text-sm",
214
- lg: "polli:w-12 polli:h-12 polli:text-base"
215
- };
216
- function initials(name) {
217
- const parts = name.trim().split(/\s+/).filter(Boolean);
218
- if (parts.length === 0) return null;
219
- if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase() || null;
220
- const first = parts[0][0] ?? "";
221
- const last = parts[parts.length - 1][0] ?? "";
222
- return (first + last).toUpperCase() || null;
223
- }
224
- function UserAvatar({ size = "md", className }) {
225
454
  const { isLoggedIn } = (0, import_react3.useAuthState)();
226
- const { data: profile } = (0, import_react3.useAccountProfile)({ enabled: isLoggedIn });
227
- if (!isLoggedIn) return null;
228
- const base = cn(
229
- "polli:inline-flex polli:items-center polli:justify-center polli:rounded-full polli:overflow-hidden polli:bg-theme-bg-pale polli:text-theme-text-strong polli:font-semibold polli:select-none",
230
- sizeClass[size],
231
- className
232
- );
233
- if (profile?.image) {
234
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
235
- "img",
236
- {
237
- "data-polli": "user-avatar",
238
- src: profile.image,
239
- alt: profile.name ?? "",
240
- className: base
241
- }
242
- );
243
- }
244
- const label = profile?.name ? initials(profile.name) : null;
245
- if (!label) return null;
246
- return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
247
- "div",
248
- {
249
- "data-polli": "user-avatar",
250
- role: "img",
251
- "aria-label": profile?.name ?? void 0,
252
- className: base,
253
- children: label
254
- }
255
- );
256
- }
257
-
258
- // src/modules/auth/UserName.tsx
259
- var import_react4 = require("@pollinations/sdk/react");
260
- var import_jsx_runtime7 = require("react/jsx-runtime");
261
- function UserName({ className }) {
262
- const { isLoggedIn } = (0, import_react4.useAuthState)();
263
- const { data: profile } = (0, import_react4.useAccountProfile)({ enabled: isLoggedIn });
264
- if (!isLoggedIn || !profile) return null;
265
- const display = profile.name || profile.githubUsername;
266
- if (!display) return null;
267
- return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)("span", { "data-polli": "user-name", className, children: display });
268
- }
269
-
270
- // src/modules/auth/WhenLoggedIn.tsx
271
- var import_react5 = require("@pollinations/sdk/react");
272
- var import_react6 = require("react");
273
- var import_jsx_runtime8 = require("react/jsx-runtime");
274
- function WhenLoggedIn({ children }) {
275
- const { isLoggedIn } = (0, import_react5.useAuthState)();
276
- if (!isLoggedIn) return null;
277
- return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react6.Fragment, { children });
278
- }
279
-
280
- // src/modules/auth/WhenLoggedOut.tsx
281
- var import_react7 = require("@pollinations/sdk/react");
282
- var import_react8 = require("react");
283
- var import_jsx_runtime9 = require("react/jsx-runtime");
284
- function WhenLoggedOut({ children }) {
285
- const { isLoggedIn } = (0, import_react7.useAuthState)();
455
+ const { login } = (0, import_react3.useAuthActions)();
286
456
  if (isLoggedIn) return null;
287
- return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react8.Fragment, { children });
457
+ return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(Button, { ...buttonProps, onClick: () => login(), children });
288
458
  }
289
459
 
290
- // src/modules/wallet/Balance.tsx
291
- var import_react9 = require("@pollinations/sdk/react");
292
-
293
460
  // src/primitives/Chip.tsx
294
- var import_jsx_runtime10 = require("react/jsx-runtime");
461
+ var import_jsx_runtime8 = require("react/jsx-runtime");
295
462
  var chipSizes = {
296
- sm: "polli:px-2 polli:py-0.5 polli:text-xs",
297
- md: "polli:px-2.5 polli:py-0.5 polli:text-sm",
298
- lg: "polli:px-3 polli:py-1 polli:text-sm"
463
+ icon: "polli:h-5 polli:w-5 polli:p-0 polli:text-xs",
464
+ sm: "polli:h-5 polli:px-2 polli:text-xs",
465
+ md: "polli:h-6 polli:px-2.5 polli:text-sm",
466
+ lg: "polli:h-7 polli:px-3 polli:text-sm"
299
467
  };
300
468
  var intentClasses2 = {
301
469
  news: "polli:bg-intent-news-bg-light polli:text-intent-news-text",
470
+ new: "polli:bg-intent-new-bg-light polli:text-intent-new-text",
471
+ free: "polli:bg-intent-free-bg-light polli:text-intent-free-text",
302
472
  alpha: "polli:bg-intent-alpha-bg-light polli:text-intent-alpha-text",
303
473
  neutral: "polli:bg-ink-100/80 polli:text-ink-900",
304
- success: "polli:bg-intent-success-bg-light polli:text-intent-success-text",
474
+ success: "polli:bg-intent-success-bg-bright/15 polli:text-intent-success-text",
305
475
  warning: "polli:bg-intent-warning-bg-light polli:text-intent-warning-text",
476
+ info: "polli:bg-intent-info-bg-light polli:text-intent-info-text",
306
477
  danger: "polli:bg-intent-danger-bg-light polli:text-intent-danger-text"
307
478
  };
308
479
  var Chip = ({
309
- theme,
310
480
  intent,
311
481
  size = "md",
312
482
  className,
@@ -314,13 +484,12 @@ var Chip = ({
314
484
  ...rest
315
485
  }) => {
316
486
  const intentClass = intent ? intentClasses2[intent] : "polli:bg-theme-bg-active polli:text-theme-text-strong";
317
- return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
487
+ return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
318
488
  "span",
319
489
  {
320
490
  ...rest,
321
- "data-theme": theme,
322
491
  className: cn(
323
- "polli:inline-flex polli:shrink-0 polli:items-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-normal",
492
+ "polli:inline-flex polli:shrink-0 polli:items-center polli:justify-center polli:gap-1 polli:rounded-lg polli:font-medium polli:leading-none",
324
493
  chipSizes[size],
325
494
  intentClass,
326
495
  className
@@ -330,6 +499,55 @@ var Chip = ({
330
499
  );
331
500
  };
332
501
 
502
+ // src/lib/link.ts
503
+ function isExternalHref(href, origin = globalThis.location?.origin) {
504
+ if (typeof href !== "string" || !/^(https?:)?\/\//i.test(href))
505
+ return false;
506
+ if (!origin) return true;
507
+ try {
508
+ return new URL(href, origin).origin !== origin;
509
+ } catch {
510
+ return false;
511
+ }
512
+ }
513
+
514
+ // src/primitives/InlineLink.tsx
515
+ var import_jsx_runtime9 = require("react/jsx-runtime");
516
+ function InlineLink({
517
+ as,
518
+ external,
519
+ showIcon = true,
520
+ size = "inherit",
521
+ tone = "accent",
522
+ className,
523
+ children,
524
+ ...linkProps
525
+ }) {
526
+ const Component = as || "a";
527
+ const isExternal = external ?? isExternalHref(linkProps.href);
528
+ return /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
529
+ Component,
530
+ {
531
+ target: isExternal && as !== "button" ? "_blank" : void 0,
532
+ rel: isExternal && as !== "button" ? "noopener noreferrer" : void 0,
533
+ className: ["polli-link", className].filter(Boolean).join(" "),
534
+ "data-size": size,
535
+ "data-tone": tone,
536
+ ...linkProps,
537
+ children: [
538
+ children,
539
+ showIcon && isExternal && /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
540
+ ExternalLinkIcon,
541
+ {
542
+ "aria-hidden": "true",
543
+ className: "polli-link-external-icon"
544
+ }
545
+ )
546
+ ]
547
+ }
548
+ );
549
+ }
550
+
333
551
  // src/modules/wallet/format-pollen.ts
334
552
  var BUDGET = 5;
335
553
  var MAX_DECIMALS = 4;
@@ -359,139 +577,317 @@ function formatPollen(value) {
359
577
  return Number(floored.toFixed(decimals)).toString();
360
578
  }
361
579
 
362
- // src/modules/wallet/Balance.tsx
580
+ // src/modules/wallet/wallet-display.tsx
581
+ var import_jsx_runtime10 = require("react/jsx-runtime");
582
+ var walletTextClasses = {
583
+ paid: "polli-wallet-text-paid",
584
+ tier: "polli-wallet-text-tier"
585
+ };
586
+ var walletKindIcons = {
587
+ paid: CardIcon,
588
+ tier: SproutIcon
589
+ };
590
+ var WalletKindIcon = ({
591
+ kind,
592
+ className
593
+ }) => {
594
+ const Icon = walletKindIcons[kind];
595
+ return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
596
+ Icon,
597
+ {
598
+ "aria-hidden": "true",
599
+ className: cn(
600
+ "polli:h-3.5 polli:w-3.5 polli:shrink-0",
601
+ walletTextClasses[kind],
602
+ className
603
+ )
604
+ }
605
+ );
606
+ };
607
+
608
+ // src/modules/wallet/AccountPollen.tsx
363
609
  var import_jsx_runtime11 = require("react/jsx-runtime");
364
- function Balance({ className } = {}) {
365
- const { isLoggedIn } = (0, import_react9.useAuthState)();
366
- const { data: balance } = (0, import_react9.useAccountBalance)({ enabled: isLoggedIn });
367
- if (!isLoggedIn || balance == null) return null;
610
+ function isEmpty(amount) {
611
+ return amount != null && amount <= 0;
612
+ }
613
+ var labels = {
614
+ "limit-reached": "Limit reached",
615
+ "no-pollen": "No Pollen",
616
+ unlimited: "Unlimited"
617
+ };
618
+ function PollenStatusBadge({
619
+ state,
620
+ topUpHref
621
+ }) {
622
+ const Icon = state === "no-pollen" ? WalletIcon : KeyIcon;
623
+ const label = labels[state];
368
624
  return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
369
625
  Chip,
370
626
  {
371
- "data-polli": "balance",
372
- className: cn("polli:tabular-nums", className),
627
+ size: "sm",
628
+ intent: state === "unlimited" ? "info" : "danger",
629
+ "aria-label": label,
373
630
  children: [
374
- formatPollen(balance.balance),
375
- " pollen"
631
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
632
+ Icon,
633
+ {
634
+ "aria-hidden": "true",
635
+ className: "polli:h-3.5 polli:w-3.5 polli:shrink-0"
636
+ }
637
+ ),
638
+ label,
639
+ state === "no-pollen" && topUpHref && /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_jsx_runtime11.Fragment, { children: [
640
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { "aria-hidden": "true", children: "\xB7" }),
641
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
642
+ InlineLink,
643
+ {
644
+ href: topUpHref,
645
+ "aria-label": `${label}. Top up`,
646
+ children: "Top up"
647
+ }
648
+ )
649
+ ] })
376
650
  ]
377
651
  }
378
652
  );
379
653
  }
654
+ function AccountPollen({
655
+ source,
656
+ topUpHref
657
+ }) {
658
+ if (source.type === "budget") {
659
+ if (source.generationEnabled === false) return null;
660
+ const unlimited = source.remaining === null;
661
+ if (!unlimited && source.remaining === void 0) return null;
662
+ if (unlimited) return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PollenStatusBadge, { state: "unlimited" });
663
+ const remaining = source.remaining;
664
+ if (isEmpty(remaining))
665
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PollenStatusBadge, { state: "limit-reached" });
666
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
667
+ "span",
668
+ {
669
+ title: "App budget left",
670
+ className: "polli:inline-flex polli:items-center polli:gap-1 polli:tabular-nums",
671
+ children: [
672
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
673
+ KeyIcon,
674
+ {
675
+ "aria-hidden": "true",
676
+ className: "polli:h-3.5 polli:w-3.5 polli:shrink-0"
677
+ }
678
+ ),
679
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "polli:sr-only", children: "App budget: " }),
680
+ formatPollen(remaining),
681
+ " pollen"
682
+ ]
683
+ }
684
+ );
685
+ }
686
+ const { balances } = source;
687
+ if (!balances) return null;
688
+ if (isEmpty(balances.paid) && isEmpty(balances.quest))
689
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(PollenStatusBadge, { state: "no-pollen", topUpHref });
690
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)("span", { className: "polli:inline-flex polli:items-center polli:gap-2 polli:tabular-nums", children: ["quest", "paid"].map((kind) => {
691
+ const amount = balances[kind];
692
+ return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
693
+ "span",
694
+ {
695
+ className: "polli:inline-flex polli:items-center polli:gap-1",
696
+ children: [
697
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
698
+ WalletKindIcon,
699
+ {
700
+ kind: kind === "paid" ? "paid" : "tier"
701
+ }
702
+ ),
703
+ /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)("span", { className: "polli:sr-only", children: [
704
+ kind === "paid" ? "Paid" : "Quest",
705
+ " Pollen:",
706
+ " "
707
+ ] }),
708
+ formatPollen(Math.max(0, amount))
709
+ ]
710
+ },
711
+ kind
712
+ );
713
+ }) });
714
+ }
380
715
 
381
716
  // src/modules/app-user-menu/AppUserMenu.tsx
382
717
  var import_jsx_runtime12 = require("react/jsx-runtime");
383
718
  var defaultLabels = {
384
- authorize: "Authorize app",
719
+ authorize: "Pollinations Connect",
385
720
  appUserMenu: "App user menu",
386
- topUpAccount: "Top up account",
387
- logout: "Log out from this app"
721
+ permissions: "Permissions",
722
+ buyPollen: "Buy Pollen",
723
+ logout: "Disconnect"
388
724
  };
389
- function isEmbeddedContext(embedQueryParam = "embed") {
390
- if (typeof window === "undefined") return false;
391
- const search = new URLSearchParams(window.location.search);
392
- if (search.get(embedQueryParam) === "1") return true;
393
- try {
394
- return window.self !== window.top;
395
- } catch {
396
- return true;
397
- }
398
- }
399
725
  function AppUserMenu({
400
726
  dashboardHref,
401
- labels: labelOverrides,
402
- hiddenWhenEmbedded = false,
403
- embedQueryParam = "embed"
727
+ labels: labelOverrides
404
728
  }) {
405
- if (hiddenWhenEmbedded && isEmbeddedContext(embedQueryParam)) return null;
729
+ const labels2 = { ...defaultLabels, ...labelOverrides };
730
+ const { logout, enterUrl } = (0, import_react4.useAuthActions)();
731
+ const { isLoggedIn } = (0, import_react4.useAuthState)();
732
+ const profile = (0, import_react4.useAccountProfile)({ enabled: isLoggedIn });
733
+ const key = (0, import_react4.useAccountKey)({ enabled: isLoggedIn });
734
+ const canReadWallet = key.data?.pollenBudget === null && (key.data.permissions?.account?.includes("usage") ?? false);
735
+ const balance = (0, import_react4.useAccountBalance)({
736
+ enabled: isLoggedIn && canReadWallet
737
+ });
738
+ const wallet = balance.data?.accountBalance;
739
+ (0, import_react5.useEffect)(() => {
740
+ if (!isLoggedIn) return;
741
+ const onVisible = () => {
742
+ if (document.visibilityState !== "visible") return;
743
+ void key.refresh();
744
+ void balance.refresh();
745
+ };
746
+ document.addEventListener("visibilitychange", onVisible);
747
+ return () => document.removeEventListener("visibilitychange", onVisible);
748
+ }, [isLoggedIn, key.refresh, balance.refresh]);
749
+ const returnUrl = typeof window === "undefined" ? void 0 : window.location.href;
750
+ const topUpUrl = new URL("/top-up", enterUrl);
751
+ if (returnUrl) topUpUrl.searchParams.set("redirect", returnUrl);
752
+ const keyId = key.data?.id;
753
+ let editKeyUrl;
754
+ if (keyId) {
755
+ editKeyUrl = new URL("/edit-key", enterUrl);
756
+ editKeyUrl.searchParams.set("id", keyId);
757
+ if (returnUrl) editKeyUrl.searchParams.set("redirect", returnUrl);
758
+ }
759
+ let pollenSource;
760
+ if (key.data && key.data.pollenBudget !== null) {
761
+ pollenSource = {
762
+ type: "budget",
763
+ remaining: key.data.pollenBudget,
764
+ generationEnabled: key.data.permissions?.models?.length !== 0
765
+ };
766
+ } else if (wallet) {
767
+ pollenSource = {
768
+ type: "wallet",
769
+ balances: { paid: wallet.paid, quest: wallet.tier }
770
+ };
771
+ } else if (key.data && !canReadWallet) {
772
+ pollenSource = { type: "budget", remaining: null };
773
+ }
406
774
  return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
407
- AppUserMenuContent,
775
+ "div",
408
776
  {
409
- dashboardHref,
410
- labels: labelOverrides
411
- }
412
- );
413
- }
414
- function AppUserMenuContent({
415
- dashboardHref,
416
- labels: labelOverrides
417
- }) {
418
- const labels = { ...defaultLabels, ...labelOverrides };
419
- const { logout } = (0, import_react10.useAuthActions)();
420
- return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("div", { "data-theme": "amber", className: "polli:flex polli:justify-end", children: [
421
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WhenLoggedOut, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(LoginButton, { theme: "amber", children: labels.authorize }) }),
422
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WhenLoggedIn, { children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
423
- Dropdown,
424
- {
425
- theme: "amber",
426
- align: "end",
427
- className: "polli:w-64 polli:p-1",
428
- trigger: (open) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
429
- "button",
777
+ "data-theme": "accent",
778
+ className: "polli:flex polli:shrink-0 polli:justify-end",
779
+ children: !isLoggedIn ? /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(LoginButton, { className: "polli:h-10 polli:gap-0 polli:overflow-hidden polli:border polli:border-theme-bg-active polli:bg-surface-white polli:p-0 polli:text-theme-text-strong polli:whitespace-nowrap polli:hover:bg-surface-white polli:[.dark_&]:bg-transparent polli:[.dark_&]:hover:bg-transparent", children: [
780
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
781
+ "span",
430
782
  {
431
- type: "button",
432
- "data-theme": "amber",
433
- "aria-label": labels.appUserMenu,
434
- className: "polli-control polli:flex polli:min-w-0 polli:items-center polli:gap-2 polli:rounded-full polli:bg-theme-bg-active polli:py-1 polli:pl-1 polli:pr-3 polli:text-theme-text-base polli:shadow-sm polli:transition-colors polli:hover:bg-theme-bg-hover",
435
- children: [
436
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
437
- UserAvatar,
438
- {
439
- size: "md",
440
- className: "polli:h-8 polli:w-8"
783
+ "aria-hidden": "true",
784
+ className: "polli:flex polli:h-full polli:w-10 polli:shrink-0 polli:items-center polli:justify-center polli:bg-theme-bg-active",
785
+ children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
786
+ "span",
787
+ {
788
+ className: "polli:relative polli:-top-px polli:left-px polli:block polli:h-6 polli:w-6 polli:bg-current",
789
+ style: {
790
+ mask: `url('${mark_default}') center / contain no-repeat`,
791
+ WebkitMask: `url('${mark_default}') center / contain no-repeat`
441
792
  }
442
- ),
443
- /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)("span", { className: "polli:flex polli:min-w-0 polli:flex-col polli:items-start polli:leading-tight", children: [
444
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(UserName, { className: "polli:max-w-32 polli:truncate polli:text-sm polli:font-semibold" }),
445
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(Balance, { className: "polli:bg-transparent polli:px-0 polli:py-0 polli:text-xs polli:text-theme-text-base" })
446
- ] }),
447
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
448
- ChevronIcon,
449
- {
450
- expanded: open,
451
- className: "polli:h-4 polli:w-4 polli:text-theme-text-base"
452
- }
453
- )
454
- ]
793
+ }
794
+ )
455
795
  }
456
796
  ),
457
- children: (close) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
458
- "div",
459
- {
460
- "data-theme": "amber",
461
- className: "polli:flex polli:flex-col",
462
- children: [
463
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
464
- DropdownItem,
465
- {
466
- as: "a",
467
- href: dashboardHref,
468
- target: "_blank",
469
- rel: "noopener noreferrer",
470
- onClick: close,
471
- children: labels.topUpAccount
472
- }
473
- ),
474
- /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
475
- DropdownItem,
476
- {
477
- type: "button",
478
- onClick: () => {
479
- close();
480
- logout();
481
- },
482
- children: labels.logout
483
- }
484
- )
485
- ]
486
- }
487
- )
488
- }
489
- ) })
490
- ] });
797
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)("span", { className: "polli:px-3", children: labels2.authorize })
798
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
799
+ AccountMenu,
800
+ {
801
+ name: profile.data?.name || profile.data?.githubUsername || "Connected user",
802
+ avatarUrl: profile.data?.image,
803
+ dashboardHref: dashboardHref ?? new URL("/pollen", enterUrl).href,
804
+ menuLabel: labels2.appUserMenu,
805
+ className: "polli:max-w-80",
806
+ secondaryContent: pollenSource ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(AccountPollen, { source: pollenSource }) : void 0,
807
+ children: (close) => /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_jsx_runtime12.Fragment, { children: [
808
+ editKeyUrl && /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
809
+ DropdownItem,
810
+ {
811
+ as: "a",
812
+ href: editKeyUrl.href,
813
+ target: "_blank",
814
+ rel: "noopener noreferrer",
815
+ onClick: close,
816
+ children: [
817
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
818
+ KeyIcon,
819
+ {
820
+ className: "polli:h-4 polli:w-4 polli:shrink-0",
821
+ "aria-hidden": "true"
822
+ }
823
+ ),
824
+ labels2.permissions,
825
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
826
+ ExternalLinkIcon,
827
+ {
828
+ className: "polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0",
829
+ "aria-hidden": "true"
830
+ }
831
+ )
832
+ ]
833
+ }
834
+ ),
835
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
836
+ DropdownItem,
837
+ {
838
+ as: "a",
839
+ href: topUpUrl.href,
840
+ target: "_blank",
841
+ rel: "noopener noreferrer",
842
+ onClick: close,
843
+ children: [
844
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
845
+ WalletIcon,
846
+ {
847
+ className: "polli:h-4 polli:w-4 polli:shrink-0",
848
+ "aria-hidden": "true"
849
+ }
850
+ ),
851
+ labels2.buyPollen,
852
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
853
+ ExternalLinkIcon,
854
+ {
855
+ className: "polli:ml-auto polli:h-3.5 polli:w-3.5 polli:shrink-0",
856
+ "aria-hidden": "true"
857
+ }
858
+ )
859
+ ]
860
+ }
861
+ ),
862
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(
863
+ DropdownItem,
864
+ {
865
+ type: "button",
866
+ className: "polli:justify-start polli:text-left",
867
+ onClick: () => {
868
+ close();
869
+ logout();
870
+ },
871
+ children: [
872
+ /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
873
+ PowerIcon,
874
+ {
875
+ className: "polli:h-4 polli:w-4 polli:shrink-0",
876
+ "aria-hidden": "true"
877
+ }
878
+ ),
879
+ labels2.logout
880
+ ]
881
+ }
882
+ )
883
+ ] })
884
+ }
885
+ )
886
+ }
887
+ );
491
888
  }
492
889
  // Annotate the CommonJS export names for ESM import in node:
493
890
  0 && (module.exports = {
494
- AppUserMenu,
495
- isEmbeddedContext
891
+ AppUserMenu
496
892
  });
497
893
  //# sourceMappingURL=sdk.cjs.map