@highstate/designer 0.1.0

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 (335) hide show
  1. package/.output/nitro.json +15 -0
  2. package/.output/public/_nuxt/1jbH28Ud.js +1 -0
  3. package/.output/public/_nuxt/BAsjE6c8.js +69 -0
  4. package/.output/public/_nuxt/D4AvvZ3p.js +1 -0
  5. package/.output/public/_nuxt/DcSK-0AR.js +1 -0
  6. package/.output/public/_nuxt/builds/latest.json +1 -0
  7. package/.output/public/_nuxt/builds/meta/0ea9cf82-d280-4ae3-95c8-082f396c88c7.json +1 -0
  8. package/.output/public/_nuxt/entry.Df9XoxdB.css +1 -0
  9. package/.output/public/_nuxt/error-404.SWzu_puR.css +1 -0
  10. package/.output/public/_nuxt/error-500.Bkv_zTjr.css +1 -0
  11. package/.output/public/favicon.ico +0 -0
  12. package/.output/public/robots.txt +1 -0
  13. package/.output/server/chunks/_/error-500.mjs +8 -0
  14. package/.output/server/chunks/_/error-500.mjs.map +1 -0
  15. package/.output/server/chunks/_/index.mjs +229 -0
  16. package/.output/server/chunks/_/index.mjs.map +1 -0
  17. package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs +6 -0
  18. package/.output/server/chunks/build/ComponentIcon-styles.CVav5bPa.mjs.map +1 -0
  19. package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs +6 -0
  20. package/.output/server/chunks/build/ComponentIcon-styles.DJ59dQiL.mjs.map +1 -0
  21. package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs +6 -0
  22. package/.output/server/chunks/build/ComponentNode-styles.5_iLK35r.mjs.map +1 -0
  23. package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs +6 -0
  24. package/.output/server/chunks/build/ComponentNode-styles.7QJfF7h3.mjs.map +1 -0
  25. package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs +7 -0
  26. package/.output/server/chunks/build/ProjectCanvas-styles.B6yAk_TI.mjs.map +1 -0
  27. package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs +6 -0
  28. package/.output/server/chunks/build/ProjectCanvas-styles.BxP3nGl6.mjs.map +1 -0
  29. package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs +6 -0
  30. package/.output/server/chunks/build/ProjectCanvas-styles.CsOcKxeb.mjs.map +1 -0
  31. package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs +6 -0
  32. package/.output/server/chunks/build/VAppBar-styles.CaKoZ7v7.mjs.map +1 -0
  33. package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs +6 -0
  34. package/.output/server/chunks/build/VAvatar-styles.BloWs-NL.mjs.map +1 -0
  35. package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs +6 -0
  36. package/.output/server/chunks/build/VBtn-styles.5s8xLaPo.mjs.map +1 -0
  37. package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs +6 -0
  38. package/.output/server/chunks/build/VBtnGroup-styles.B8WSSc7t.mjs.map +1 -0
  39. package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs +6 -0
  40. package/.output/server/chunks/build/VBtnToggle-styles.DRWSZkHZ.mjs.map +1 -0
  41. package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs +6 -0
  42. package/.output/server/chunks/build/VCard-styles.BpQql6F5.mjs.map +1 -0
  43. package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs +6 -0
  44. package/.output/server/chunks/build/VChip-styles.KvWWirvS.mjs.map +1 -0
  45. package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs +6 -0
  46. package/.output/server/chunks/build/VChipGroup-styles.SezSZY5I.mjs.map +1 -0
  47. package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs +6 -0
  48. package/.output/server/chunks/build/VCounter-styles.DlbjDB7E.mjs.map +1 -0
  49. package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs +6 -0
  50. package/.output/server/chunks/build/VDivider-styles.B5vnnFG1.mjs.map +1 -0
  51. package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs +6 -0
  52. package/.output/server/chunks/build/VField-styles.DkgSx68C.mjs.map +1 -0
  53. package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs +6 -0
  54. package/.output/server/chunks/build/VIcon-styles._8GsAkxR.mjs.map +1 -0
  55. package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs +6 -0
  56. package/.output/server/chunks/build/VImg-styles.BQYU2VXD.mjs.map +1 -0
  57. package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs +6 -0
  58. package/.output/server/chunks/build/VInput-styles.Cr1uxB2l.mjs.map +1 -0
  59. package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs +6 -0
  60. package/.output/server/chunks/build/VLabel-styles.OzbLNKaZ.mjs.map +1 -0
  61. package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs +6 -0
  62. package/.output/server/chunks/build/VLayout-styles.DBbIk0kn.mjs.map +1 -0
  63. package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs +6 -0
  64. package/.output/server/chunks/build/VMain-styles.CI15Xs8y.mjs.map +1 -0
  65. package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs +6 -0
  66. package/.output/server/chunks/build/VMessages-styles.C9dRMjf9.mjs.map +1 -0
  67. package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs +6 -0
  68. package/.output/server/chunks/build/VNavigationDrawer-styles.BcT_iIsk.mjs.map +1 -0
  69. package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs +6 -0
  70. package/.output/server/chunks/build/VProgressCircular-styles.CWpXfZ6Q.mjs.map +1 -0
  71. package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs +6 -0
  72. package/.output/server/chunks/build/VProgressLinear-styles.DjitzH7c.mjs.map +1 -0
  73. package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs +6 -0
  74. package/.output/server/chunks/build/VResponsive-styles.KUuswLet.mjs.map +1 -0
  75. package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs +6 -0
  76. package/.output/server/chunks/build/VSlideGroup-styles.fT1UQTdA.mjs.map +1 -0
  77. package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs +6 -0
  78. package/.output/server/chunks/build/VSpacer-styles.B_L0TU3-.mjs.map +1 -0
  79. package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs +6 -0
  80. package/.output/server/chunks/build/VTextField-styles.e8Z3kCRA.mjs.map +1 -0
  81. package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs +6 -0
  82. package/.output/server/chunks/build/VToolbar-styles.Bvr717Vh.mjs.map +1 -0
  83. package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs +6 -0
  84. package/.output/server/chunks/build/app-styles.-ZJ3yGO7.mjs.map +1 -0
  85. package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs +6 -0
  86. package/.output/server/chunks/build/app-styles.Ckjy6RrK.mjs.map +1 -0
  87. package/.output/server/chunks/build/client.manifest.mjs +82 -0
  88. package/.output/server/chunks/build/client.manifest.mjs.map +1 -0
  89. package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs +4 -0
  90. package/.output/server/chunks/build/entry-styles-10.mjs-BpLi0qx6.mjs.map +1 -0
  91. package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs +4 -0
  92. package/.output/server/chunks/build/entry-styles-11.mjs-6TeH4I7w.mjs.map +1 -0
  93. package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs +4 -0
  94. package/.output/server/chunks/build/entry-styles-12.mjs-DU1igcRL.mjs.map +1 -0
  95. package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs +4 -0
  96. package/.output/server/chunks/build/entry-styles-13.mjs-lZGUjhhD.mjs.map +1 -0
  97. package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs +4 -0
  98. package/.output/server/chunks/build/entry-styles-14.mjs-BRdr1-px.mjs.map +1 -0
  99. package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs +4 -0
  100. package/.output/server/chunks/build/entry-styles-15.mjs-mUPL6Nc9.mjs.map +1 -0
  101. package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs +4 -0
  102. package/.output/server/chunks/build/entry-styles-16.mjs-CPJMcIL1.mjs.map +1 -0
  103. package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs +4 -0
  104. package/.output/server/chunks/build/entry-styles-17.mjs-CQOORRn5.mjs.map +1 -0
  105. package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs +4 -0
  106. package/.output/server/chunks/build/entry-styles-18.mjs-C7z1LTi9.mjs.map +1 -0
  107. package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs +4 -0
  108. package/.output/server/chunks/build/entry-styles-19.mjs-it-LBeIM.mjs.map +1 -0
  109. package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs +4 -0
  110. package/.output/server/chunks/build/entry-styles-2.mjs-CIKbACDD.mjs.map +1 -0
  111. package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs +4 -0
  112. package/.output/server/chunks/build/entry-styles-20.mjs-Igpd8vNA.mjs.map +1 -0
  113. package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs +4 -0
  114. package/.output/server/chunks/build/entry-styles-21.mjs-VGEW4cec.mjs.map +1 -0
  115. package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs +4 -0
  116. package/.output/server/chunks/build/entry-styles-22.mjs-DLAUZ2Ss.mjs.map +1 -0
  117. package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs +4 -0
  118. package/.output/server/chunks/build/entry-styles-23.mjs-D6dUb4Q1.mjs.map +1 -0
  119. package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs +4 -0
  120. package/.output/server/chunks/build/entry-styles-24.mjs-CR2CscOT.mjs.map +1 -0
  121. package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs +4 -0
  122. package/.output/server/chunks/build/entry-styles-25.mjs-gcGnyYj1.mjs.map +1 -0
  123. package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs +4 -0
  124. package/.output/server/chunks/build/entry-styles-26.mjs-BGcP6LjH.mjs.map +1 -0
  125. package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs +4 -0
  126. package/.output/server/chunks/build/entry-styles-27.mjs-DKPK367G.mjs.map +1 -0
  127. package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs +4 -0
  128. package/.output/server/chunks/build/entry-styles-28.mjs-BxlgEOUH.mjs.map +1 -0
  129. package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs +4 -0
  130. package/.output/server/chunks/build/entry-styles-29.mjs-EoZxjH32.mjs.map +1 -0
  131. package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs +4 -0
  132. package/.output/server/chunks/build/entry-styles-3.mjs-BZeC22He.mjs.map +1 -0
  133. package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs +4 -0
  134. package/.output/server/chunks/build/entry-styles-30.mjs-CoAZ885y.mjs.map +1 -0
  135. package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs +4 -0
  136. package/.output/server/chunks/build/entry-styles-31.mjs-JYOGcJtH.mjs.map +1 -0
  137. package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs +4 -0
  138. package/.output/server/chunks/build/entry-styles-32.mjs-lT-SGbzA.mjs.map +1 -0
  139. package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs +4 -0
  140. package/.output/server/chunks/build/entry-styles-33.mjs-CGVyg8PA.mjs.map +1 -0
  141. package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs +4 -0
  142. package/.output/server/chunks/build/entry-styles-4.mjs-DZ0RUZ3Y.mjs.map +1 -0
  143. package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs +4 -0
  144. package/.output/server/chunks/build/entry-styles-5.mjs-CWoX264H.mjs.map +1 -0
  145. package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs +4 -0
  146. package/.output/server/chunks/build/entry-styles-6.mjs-D97cocWn.mjs.map +1 -0
  147. package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs +4 -0
  148. package/.output/server/chunks/build/entry-styles-7.mjs-fDLOEPrI.mjs.map +1 -0
  149. package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs +4 -0
  150. package/.output/server/chunks/build/entry-styles-8.mjs-CogORmQT.mjs.map +1 -0
  151. package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs +4 -0
  152. package/.output/server/chunks/build/entry-styles-9.mjs-CIkuJriK.mjs.map +1 -0
  153. package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs +39 -0
  154. package/.output/server/chunks/build/entry-styles.CtA8hhgO.mjs.map +1 -0
  155. package/.output/server/chunks/build/error-404-BE32jcXw.mjs +399 -0
  156. package/.output/server/chunks/build/error-404-BE32jcXw.mjs.map +1 -0
  157. package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs +4 -0
  158. package/.output/server/chunks/build/error-404-styles-1.mjs-BnwklZPR.mjs.map +1 -0
  159. package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs +6 -0
  160. package/.output/server/chunks/build/error-404-styles.B5NDqGbJ.mjs.map +1 -0
  161. package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs +6 -0
  162. package/.output/server/chunks/build/error-404-styles.CeFcgbBS.mjs.map +1 -0
  163. package/.output/server/chunks/build/error-500-B3vPuajn.mjs +80 -0
  164. package/.output/server/chunks/build/error-500-B3vPuajn.mjs.map +1 -0
  165. package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs +4 -0
  166. package/.output/server/chunks/build/error-500-styles-1.mjs-C2TN-owL.mjs.map +1 -0
  167. package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs +6 -0
  168. package/.output/server/chunks/build/error-500-styles.BE3GHqYY.mjs.map +1 -0
  169. package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs +6 -0
  170. package/.output/server/chunks/build/error-500-styles.LQn8-gvg.mjs.map +1 -0
  171. package/.output/server/chunks/build/index-C2merokO.mjs +34 -0
  172. package/.output/server/chunks/build/index-C2merokO.mjs.map +1 -0
  173. package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs +6 -0
  174. package/.output/server/chunks/build/index-styles.C7jmw0Wl.mjs.map +1 -0
  175. package/.output/server/chunks/build/server.mjs +10495 -0
  176. package/.output/server/chunks/build/server.mjs.map +1 -0
  177. package/.output/server/chunks/build/styles.mjs +47 -0
  178. package/.output/server/chunks/build/styles.mjs.map +1 -0
  179. package/.output/server/chunks/nitro/nitro.mjs +6203 -0
  180. package/.output/server/chunks/nitro/nitro.mjs.map +1 -0
  181. package/.output/server/chunks/routes/api/_trpc_.mjs +209 -0
  182. package/.output/server/chunks/routes/api/_trpc_.mjs.map +1 -0
  183. package/.output/server/chunks/routes/renderer.mjs +391 -0
  184. package/.output/server/chunks/routes/renderer.mjs.map +1 -0
  185. package/.output/server/chunks/virtual/_virtual_spa-template.mjs +4 -0
  186. package/.output/server/chunks/virtual/_virtual_spa-template.mjs.map +1 -0
  187. package/.output/server/index.mjs +7 -0
  188. package/.output/server/index.mjs.map +1 -0
  189. package/.output/server/node_modules/@babel/parser/lib/index.js +14023 -0
  190. package/.output/server/node_modules/@babel/parser/package.json +50 -0
  191. package/.output/server/node_modules/@iconify/vue/dist/iconify.mjs +1996 -0
  192. package/.output/server/node_modules/@iconify/vue/package.json +65 -0
  193. package/.output/server/node_modules/@trpc/client/dist/TRPCClientError-38f9a32a.mjs +59 -0
  194. package/.output/server/node_modules/@trpc/client/dist/httpBatchLink-d0f9eac9.mjs +248 -0
  195. package/.output/server/node_modules/@trpc/client/dist/httpUtils-b9d0cb48.mjs +144 -0
  196. package/.output/server/node_modules/@trpc/client/dist/index.mjs +365 -0
  197. package/.output/server/node_modules/@trpc/client/dist/links/httpLink.mjs +62 -0
  198. package/.output/server/node_modules/@trpc/client/dist/links/loggerLink.mjs +173 -0
  199. package/.output/server/node_modules/@trpc/client/dist/links/wsLink.mjs +278 -0
  200. package/.output/server/node_modules/@trpc/client/dist/splitLink-4c75f7be.mjs +45 -0
  201. package/.output/server/node_modules/@trpc/client/dist/transformResult-ace864b8.mjs +58 -0
  202. package/.output/server/node_modules/@trpc/client/package.json +101 -0
  203. package/.output/server/node_modules/@trpc/server/dist/TRPCError-98d44758.mjs +39 -0
  204. package/.output/server/node_modules/@trpc/server/dist/batchStreamFormatter-fc1ffb26.mjs +30 -0
  205. package/.output/server/node_modules/@trpc/server/dist/codes-c924c3db.mjs +44 -0
  206. package/.output/server/node_modules/@trpc/server/dist/config-d5fdbd39.mjs +196 -0
  207. package/.output/server/node_modules/@trpc/server/dist/contentType-9fd995d3.mjs +52 -0
  208. package/.output/server/node_modules/@trpc/server/dist/getCauseFromUnknown-2d66414a.mjs +33 -0
  209. package/.output/server/node_modules/@trpc/server/dist/http/index.mjs +9 -0
  210. package/.output/server/node_modules/@trpc/server/dist/index-f91d720c.mjs +97 -0
  211. package/.output/server/node_modules/@trpc/server/dist/index.mjs +871 -0
  212. package/.output/server/node_modules/@trpc/server/dist/observable/index.mjs +147 -0
  213. package/.output/server/node_modules/@trpc/server/dist/observable-ade1bad8.mjs +81 -0
  214. package/.output/server/node_modules/@trpc/server/dist/resolveHTTPResponse-2fc435bb.mjs +291 -0
  215. package/.output/server/node_modules/@trpc/server/dist/shared/index.mjs +4 -0
  216. package/.output/server/node_modules/@trpc/server/dist/transformTRPCResponse-1153b421.mjs +53 -0
  217. package/.output/server/node_modules/@trpc/server/package.json +177 -0
  218. package/.output/server/node_modules/@unhead/dom/dist/index.mjs +197 -0
  219. package/.output/server/node_modules/@unhead/dom/package.json +40 -0
  220. package/.output/server/node_modules/@unhead/shared/dist/index.mjs +731 -0
  221. package/.output/server/node_modules/@unhead/shared/package.json +47 -0
  222. package/.output/server/node_modules/@unhead/ssr/dist/index.mjs +95 -0
  223. package/.output/server/node_modules/@unhead/ssr/package.json +40 -0
  224. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +6690 -0
  225. package/.output/server/node_modules/@vue/compiler-core/package.json +58 -0
  226. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +686 -0
  227. package/.output/server/node_modules/@vue/compiler-dom/package.json +57 -0
  228. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +1404 -0
  229. package/.output/server/node_modules/@vue/compiler-ssr/package.json +34 -0
  230. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +1789 -0
  231. package/.output/server/node_modules/@vue/reactivity/package.json +55 -0
  232. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +6654 -0
  233. package/.output/server/node_modules/@vue/runtime-core/package.json +52 -0
  234. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +1669 -0
  235. package/.output/server/node_modules/@vue/runtime-dom/package.json +60 -0
  236. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +857 -0
  237. package/.output/server/node_modules/@vue/server-renderer/package.json +55 -0
  238. package/.output/server/node_modules/@vue/shared/dist/shared.cjs.prod.js +594 -0
  239. package/.output/server/node_modules/@vue/shared/package.json +47 -0
  240. package/.output/server/node_modules/@vue-flow/background/dist/vue-flow-background.mjs +126 -0
  241. package/.output/server/node_modules/@vue-flow/background/package.json +73 -0
  242. package/.output/server/node_modules/@vue-flow/core/dist/vue-flow-core.mjs +9873 -0
  243. package/.output/server/node_modules/@vue-flow/core/package.json +92 -0
  244. package/.output/server/node_modules/@vue-flow/minimap/dist/vue-flow-minimap.mjs +2953 -0
  245. package/.output/server/node_modules/@vue-flow/minimap/package.json +80 -0
  246. package/.output/server/node_modules/devalue/index.js +3 -0
  247. package/.output/server/node_modules/devalue/package.json +34 -0
  248. package/.output/server/node_modules/devalue/src/base64.js +110 -0
  249. package/.output/server/node_modules/devalue/src/constants.js +6 -0
  250. package/.output/server/node_modules/devalue/src/parse.js +160 -0
  251. package/.output/server/node_modules/devalue/src/stringify.js +232 -0
  252. package/.output/server/node_modules/devalue/src/uneval.js +351 -0
  253. package/.output/server/node_modules/devalue/src/utils.js +113 -0
  254. package/.output/server/node_modules/entities/lib/decode.js +536 -0
  255. package/.output/server/node_modules/entities/lib/decode_codepoint.js +76 -0
  256. package/.output/server/node_modules/entities/lib/generated/decode-data-html.js +9 -0
  257. package/.output/server/node_modules/entities/lib/generated/decode-data-xml.js +9 -0
  258. package/.output/server/node_modules/entities/package.json +90 -0
  259. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +344 -0
  260. package/.output/server/node_modules/estree-walker/package.json +37 -0
  261. package/.output/server/node_modules/hookable/dist/index.mjs +290 -0
  262. package/.output/server/node_modules/hookable/package.json +49 -0
  263. package/.output/server/node_modules/nanoid/index.js +46 -0
  264. package/.output/server/node_modules/nanoid/package.json +41 -0
  265. package/.output/server/node_modules/nanoid/url-alphabet/index.js +2 -0
  266. package/.output/server/node_modules/pinia/dist/pinia.prod.cjs +858 -0
  267. package/.output/server/node_modules/pinia/package.json +100 -0
  268. package/.output/server/node_modules/source-map-js/lib/array-set.js +121 -0
  269. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +140 -0
  270. package/.output/server/node_modules/source-map-js/lib/base64.js +67 -0
  271. package/.output/server/node_modules/source-map-js/lib/binary-search.js +111 -0
  272. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +79 -0
  273. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +132 -0
  274. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +1188 -0
  275. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +444 -0
  276. package/.output/server/node_modules/source-map-js/lib/source-node.js +413 -0
  277. package/.output/server/node_modules/source-map-js/lib/util.js +594 -0
  278. package/.output/server/node_modules/source-map-js/package.json +71 -0
  279. package/.output/server/node_modules/source-map-js/source-map.js +8 -0
  280. package/.output/server/node_modules/ufo/dist/index.mjs +630 -0
  281. package/.output/server/node_modules/ufo/package.json +47 -0
  282. package/.output/server/node_modules/unhead/dist/index.mjs +747 -0
  283. package/.output/server/node_modules/unhead/package.json +46 -0
  284. package/.output/server/node_modules/vue/dist/vue.cjs.js +80 -0
  285. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +66 -0
  286. package/.output/server/node_modules/vue/index.js +7 -0
  287. package/.output/server/node_modules/vue/index.mjs +1 -0
  288. package/.output/server/node_modules/vue/package.json +112 -0
  289. package/.output/server/node_modules/vue/server-renderer/index.mjs +1 -0
  290. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +196 -0
  291. package/.output/server/node_modules/vue-bundle-renderer/package.json +50 -0
  292. package/.output/server/node_modules/vue-demi/lib/index.cjs +29 -0
  293. package/.output/server/node_modules/vue-demi/package.json +47 -0
  294. package/.output/server/node_modules/zod/lib/index.mjs +4236 -0
  295. package/.output/server/node_modules/zod/package.json +119 -0
  296. package/.output/server/node_modules/zod-to-json-schema/dist/esm/Options.js +31 -0
  297. package/.output/server/node_modules/zod-to-json-schema/dist/esm/Refs.js +21 -0
  298. package/.output/server/node_modules/zod-to-json-schema/dist/esm/errorMessages.js +14 -0
  299. package/.output/server/node_modules/zod-to-json-schema/dist/esm/index.js +37 -0
  300. package/.output/server/node_modules/zod-to-json-schema/dist/esm/package.json +1 -0
  301. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parseDef.js +164 -0
  302. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/any.js +3 -0
  303. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/array.js +25 -0
  304. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/bigint.js +49 -0
  305. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/boolean.js +5 -0
  306. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/branded.js +4 -0
  307. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/catch.js +4 -0
  308. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/date.js +46 -0
  309. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/default.js +7 -0
  310. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/effects.js +6 -0
  311. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/enum.js +6 -0
  312. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/intersection.js +52 -0
  313. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/literal.js +21 -0
  314. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/map.js +25 -0
  315. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nativeEnum.js +16 -0
  316. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/never.js +5 -0
  317. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/null.js +10 -0
  318. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/nullable.js +33 -0
  319. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/number.js +52 -0
  320. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/object.js +45 -0
  321. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/optional.js +20 -0
  322. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/pipeline.js +20 -0
  323. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/promise.js +4 -0
  324. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/readonly.js +4 -0
  325. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/record.js +57 -0
  326. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/set.js +20 -0
  327. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/string.js +324 -0
  328. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/tuple.js +32 -0
  329. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/undefined.js +5 -0
  330. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/union.js +80 -0
  331. package/.output/server/node_modules/zod-to-json-schema/dist/esm/parsers/unknown.js +3 -0
  332. package/.output/server/node_modules/zod-to-json-schema/dist/esm/zodToJsonSchema.js +59 -0
  333. package/.output/server/node_modules/zod-to-json-schema/package.json +89 -0
  334. package/.output/server/package.json +1 -0
  335. package/package.json +41 -0
@@ -0,0 +1,1996 @@
1
+ import { h, defineComponent } from 'vue';
2
+
3
+ const matchIconName = /^[a-z0-9]+(-[a-z0-9]+)*$/;
4
+ const stringToIcon = (value, validate, allowSimpleName, provider = "") => {
5
+ const colonSeparated = value.split(":");
6
+ if (value.slice(0, 1) === "@") {
7
+ if (colonSeparated.length < 2 || colonSeparated.length > 3) {
8
+ return null;
9
+ }
10
+ provider = colonSeparated.shift().slice(1);
11
+ }
12
+ if (colonSeparated.length > 3 || !colonSeparated.length) {
13
+ return null;
14
+ }
15
+ if (colonSeparated.length > 1) {
16
+ const name2 = colonSeparated.pop();
17
+ const prefix = colonSeparated.pop();
18
+ const result = {
19
+ // Allow provider without '@': "provider:prefix:name"
20
+ provider: colonSeparated.length > 0 ? colonSeparated[0] : provider,
21
+ prefix,
22
+ name: name2
23
+ };
24
+ return validate && !validateIconName(result) ? null : result;
25
+ }
26
+ const name = colonSeparated[0];
27
+ const dashSeparated = name.split("-");
28
+ if (dashSeparated.length > 1) {
29
+ const result = {
30
+ provider,
31
+ prefix: dashSeparated.shift(),
32
+ name: dashSeparated.join("-")
33
+ };
34
+ return validate && !validateIconName(result) ? null : result;
35
+ }
36
+ if (allowSimpleName && provider === "") {
37
+ const result = {
38
+ provider,
39
+ prefix: "",
40
+ name
41
+ };
42
+ return validate && !validateIconName(result, allowSimpleName) ? null : result;
43
+ }
44
+ return null;
45
+ };
46
+ const validateIconName = (icon, allowSimpleName) => {
47
+ if (!icon) {
48
+ return false;
49
+ }
50
+ return !!((icon.provider === "" || icon.provider.match(matchIconName)) && (allowSimpleName && icon.prefix === "" || icon.prefix.match(matchIconName)) && icon.name.match(matchIconName));
51
+ };
52
+
53
+ const defaultIconDimensions = Object.freeze(
54
+ {
55
+ left: 0,
56
+ top: 0,
57
+ width: 16,
58
+ height: 16
59
+ }
60
+ );
61
+ const defaultIconTransformations = Object.freeze({
62
+ rotate: 0,
63
+ vFlip: false,
64
+ hFlip: false
65
+ });
66
+ const defaultIconProps = Object.freeze({
67
+ ...defaultIconDimensions,
68
+ ...defaultIconTransformations
69
+ });
70
+ const defaultExtendedIconProps = Object.freeze({
71
+ ...defaultIconProps,
72
+ body: "",
73
+ hidden: false
74
+ });
75
+
76
+ function mergeIconTransformations(obj1, obj2) {
77
+ const result = {};
78
+ if (!obj1.hFlip !== !obj2.hFlip) {
79
+ result.hFlip = true;
80
+ }
81
+ if (!obj1.vFlip !== !obj2.vFlip) {
82
+ result.vFlip = true;
83
+ }
84
+ const rotate = ((obj1.rotate || 0) + (obj2.rotate || 0)) % 4;
85
+ if (rotate) {
86
+ result.rotate = rotate;
87
+ }
88
+ return result;
89
+ }
90
+
91
+ function mergeIconData(parent, child) {
92
+ const result = mergeIconTransformations(parent, child);
93
+ for (const key in defaultExtendedIconProps) {
94
+ if (key in defaultIconTransformations) {
95
+ if (key in parent && !(key in result)) {
96
+ result[key] = defaultIconTransformations[key];
97
+ }
98
+ } else if (key in child) {
99
+ result[key] = child[key];
100
+ } else if (key in parent) {
101
+ result[key] = parent[key];
102
+ }
103
+ }
104
+ return result;
105
+ }
106
+
107
+ function getIconsTree(data, names) {
108
+ const icons = data.icons;
109
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
110
+ const resolved = /* @__PURE__ */ Object.create(null);
111
+ function resolve(name) {
112
+ if (icons[name]) {
113
+ return resolved[name] = [];
114
+ }
115
+ if (!(name in resolved)) {
116
+ resolved[name] = null;
117
+ const parent = aliases[name] && aliases[name].parent;
118
+ const value = parent && resolve(parent);
119
+ if (value) {
120
+ resolved[name] = [parent].concat(value);
121
+ }
122
+ }
123
+ return resolved[name];
124
+ }
125
+ (names || Object.keys(icons).concat(Object.keys(aliases))).forEach(resolve);
126
+ return resolved;
127
+ }
128
+
129
+ function internalGetIconData(data, name, tree) {
130
+ const icons = data.icons;
131
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
132
+ let currentProps = {};
133
+ function parse(name2) {
134
+ currentProps = mergeIconData(
135
+ icons[name2] || aliases[name2],
136
+ currentProps
137
+ );
138
+ }
139
+ parse(name);
140
+ tree.forEach(parse);
141
+ return mergeIconData(data, currentProps);
142
+ }
143
+
144
+ function parseIconSet(data, callback) {
145
+ const names = [];
146
+ if (typeof data !== "object" || typeof data.icons !== "object") {
147
+ return names;
148
+ }
149
+ if (data.not_found instanceof Array) {
150
+ data.not_found.forEach((name) => {
151
+ callback(name, null);
152
+ names.push(name);
153
+ });
154
+ }
155
+ const tree = getIconsTree(data);
156
+ for (const name in tree) {
157
+ const item = tree[name];
158
+ if (item) {
159
+ callback(name, internalGetIconData(data, name, item));
160
+ names.push(name);
161
+ }
162
+ }
163
+ return names;
164
+ }
165
+
166
+ const optionalPropertyDefaults = {
167
+ provider: "",
168
+ aliases: {},
169
+ not_found: {},
170
+ ...defaultIconDimensions
171
+ };
172
+ function checkOptionalProps(item, defaults) {
173
+ for (const prop in defaults) {
174
+ if (prop in item && typeof item[prop] !== typeof defaults[prop]) {
175
+ return false;
176
+ }
177
+ }
178
+ return true;
179
+ }
180
+ function quicklyValidateIconSet(obj) {
181
+ if (typeof obj !== "object" || obj === null) {
182
+ return null;
183
+ }
184
+ const data = obj;
185
+ if (typeof data.prefix !== "string" || !obj.icons || typeof obj.icons !== "object") {
186
+ return null;
187
+ }
188
+ if (!checkOptionalProps(obj, optionalPropertyDefaults)) {
189
+ return null;
190
+ }
191
+ const icons = data.icons;
192
+ for (const name in icons) {
193
+ const icon = icons[name];
194
+ if (!name.match(matchIconName) || typeof icon.body !== "string" || !checkOptionalProps(
195
+ icon,
196
+ defaultExtendedIconProps
197
+ )) {
198
+ return null;
199
+ }
200
+ }
201
+ const aliases = data.aliases || /* @__PURE__ */ Object.create(null);
202
+ for (const name in aliases) {
203
+ const icon = aliases[name];
204
+ const parent = icon.parent;
205
+ if (!name.match(matchIconName) || typeof parent !== "string" || !icons[parent] && !aliases[parent] || !checkOptionalProps(
206
+ icon,
207
+ defaultExtendedIconProps
208
+ )) {
209
+ return null;
210
+ }
211
+ }
212
+ return data;
213
+ }
214
+
215
+ const dataStorage = /* @__PURE__ */ Object.create(null);
216
+ function newStorage(provider, prefix) {
217
+ return {
218
+ provider,
219
+ prefix,
220
+ icons: /* @__PURE__ */ Object.create(null),
221
+ missing: /* @__PURE__ */ new Set()
222
+ };
223
+ }
224
+ function getStorage(provider, prefix) {
225
+ const providerStorage = dataStorage[provider] || (dataStorage[provider] = /* @__PURE__ */ Object.create(null));
226
+ return providerStorage[prefix] || (providerStorage[prefix] = newStorage(provider, prefix));
227
+ }
228
+ function addIconSet(storage, data) {
229
+ if (!quicklyValidateIconSet(data)) {
230
+ return [];
231
+ }
232
+ return parseIconSet(data, (name, icon) => {
233
+ if (icon) {
234
+ storage.icons[name] = icon;
235
+ } else {
236
+ storage.missing.add(name);
237
+ }
238
+ });
239
+ }
240
+ function addIconToStorage(storage, name, icon) {
241
+ try {
242
+ if (typeof icon.body === "string") {
243
+ storage.icons[name] = { ...icon };
244
+ return true;
245
+ }
246
+ } catch (err) {
247
+ }
248
+ return false;
249
+ }
250
+ function listIcons(provider, prefix) {
251
+ let allIcons = [];
252
+ const providers = typeof provider === "string" ? [provider] : Object.keys(dataStorage);
253
+ providers.forEach((provider2) => {
254
+ const prefixes = typeof provider2 === "string" && typeof prefix === "string" ? [prefix] : Object.keys(dataStorage[provider2] || {});
255
+ prefixes.forEach((prefix2) => {
256
+ const storage = getStorage(provider2, prefix2);
257
+ allIcons = allIcons.concat(
258
+ Object.keys(storage.icons).map(
259
+ (name) => (provider2 !== "" ? "@" + provider2 + ":" : "") + prefix2 + ":" + name
260
+ )
261
+ );
262
+ });
263
+ });
264
+ return allIcons;
265
+ }
266
+
267
+ let simpleNames = false;
268
+ function allowSimpleNames(allow) {
269
+ if (typeof allow === "boolean") {
270
+ simpleNames = allow;
271
+ }
272
+ return simpleNames;
273
+ }
274
+ function getIconData(name) {
275
+ const icon = typeof name === "string" ? stringToIcon(name, true, simpleNames) : name;
276
+ if (icon) {
277
+ const storage = getStorage(icon.provider, icon.prefix);
278
+ const iconName = icon.name;
279
+ return storage.icons[iconName] || (storage.missing.has(iconName) ? null : void 0);
280
+ }
281
+ }
282
+ function addIcon(name, data) {
283
+ const icon = stringToIcon(name, true, simpleNames);
284
+ if (!icon) {
285
+ return false;
286
+ }
287
+ const storage = getStorage(icon.provider, icon.prefix);
288
+ return addIconToStorage(storage, icon.name, data);
289
+ }
290
+ function addCollection(data, provider) {
291
+ if (typeof data !== "object") {
292
+ return false;
293
+ }
294
+ if (typeof provider !== "string") {
295
+ provider = data.provider || "";
296
+ }
297
+ if (simpleNames && !provider && !data.prefix) {
298
+ let added = false;
299
+ if (quicklyValidateIconSet(data)) {
300
+ data.prefix = "";
301
+ parseIconSet(data, (name, icon) => {
302
+ if (icon && addIcon(name, icon)) {
303
+ added = true;
304
+ }
305
+ });
306
+ }
307
+ return added;
308
+ }
309
+ const prefix = data.prefix;
310
+ if (!validateIconName({
311
+ provider,
312
+ prefix,
313
+ name: "a"
314
+ })) {
315
+ return false;
316
+ }
317
+ const storage = getStorage(provider, prefix);
318
+ return !!addIconSet(storage, data);
319
+ }
320
+ function iconLoaded(name) {
321
+ return !!getIconData(name);
322
+ }
323
+ function getIcon(name) {
324
+ const result = getIconData(name);
325
+ return result ? {
326
+ ...defaultIconProps,
327
+ ...result
328
+ } : null;
329
+ }
330
+
331
+ const defaultIconSizeCustomisations = Object.freeze({
332
+ width: null,
333
+ height: null
334
+ });
335
+ const defaultIconCustomisations = Object.freeze({
336
+ // Dimensions
337
+ ...defaultIconSizeCustomisations,
338
+ // Transformations
339
+ ...defaultIconTransformations
340
+ });
341
+
342
+ const unitsSplit = /(-?[0-9.]*[0-9]+[0-9.]*)/g;
343
+ const unitsTest = /^-?[0-9.]*[0-9]+[0-9.]*$/g;
344
+ function calculateSize(size, ratio, precision) {
345
+ if (ratio === 1) {
346
+ return size;
347
+ }
348
+ precision = precision || 100;
349
+ if (typeof size === "number") {
350
+ return Math.ceil(size * ratio * precision) / precision;
351
+ }
352
+ if (typeof size !== "string") {
353
+ return size;
354
+ }
355
+ const oldParts = size.split(unitsSplit);
356
+ if (oldParts === null || !oldParts.length) {
357
+ return size;
358
+ }
359
+ const newParts = [];
360
+ let code = oldParts.shift();
361
+ let isNumber = unitsTest.test(code);
362
+ while (true) {
363
+ if (isNumber) {
364
+ const num = parseFloat(code);
365
+ if (isNaN(num)) {
366
+ newParts.push(code);
367
+ } else {
368
+ newParts.push(Math.ceil(num * ratio * precision) / precision);
369
+ }
370
+ } else {
371
+ newParts.push(code);
372
+ }
373
+ code = oldParts.shift();
374
+ if (code === void 0) {
375
+ return newParts.join("");
376
+ }
377
+ isNumber = !isNumber;
378
+ }
379
+ }
380
+
381
+ function splitSVGDefs(content, tag = "defs") {
382
+ let defs = "";
383
+ const index = content.indexOf("<" + tag);
384
+ while (index >= 0) {
385
+ const start = content.indexOf(">", index);
386
+ const end = content.indexOf("</" + tag);
387
+ if (start === -1 || end === -1) {
388
+ break;
389
+ }
390
+ const endEnd = content.indexOf(">", end);
391
+ if (endEnd === -1) {
392
+ break;
393
+ }
394
+ defs += content.slice(start + 1, end).trim();
395
+ content = content.slice(0, index).trim() + content.slice(endEnd + 1);
396
+ }
397
+ return {
398
+ defs,
399
+ content
400
+ };
401
+ }
402
+ function mergeDefsAndContent(defs, content) {
403
+ return defs ? "<defs>" + defs + "</defs>" + content : content;
404
+ }
405
+ function wrapSVGContent(body, start, end) {
406
+ const split = splitSVGDefs(body);
407
+ return mergeDefsAndContent(split.defs, start + split.content + end);
408
+ }
409
+
410
+ const isUnsetKeyword = (value) => value === "unset" || value === "undefined" || value === "none";
411
+ function iconToSVG(icon, customisations) {
412
+ const fullIcon = {
413
+ ...defaultIconProps,
414
+ ...icon
415
+ };
416
+ const fullCustomisations = {
417
+ ...defaultIconCustomisations,
418
+ ...customisations
419
+ };
420
+ const box = {
421
+ left: fullIcon.left,
422
+ top: fullIcon.top,
423
+ width: fullIcon.width,
424
+ height: fullIcon.height
425
+ };
426
+ let body = fullIcon.body;
427
+ [fullIcon, fullCustomisations].forEach((props) => {
428
+ const transformations = [];
429
+ const hFlip = props.hFlip;
430
+ const vFlip = props.vFlip;
431
+ let rotation = props.rotate;
432
+ if (hFlip) {
433
+ if (vFlip) {
434
+ rotation += 2;
435
+ } else {
436
+ transformations.push(
437
+ "translate(" + (box.width + box.left).toString() + " " + (0 - box.top).toString() + ")"
438
+ );
439
+ transformations.push("scale(-1 1)");
440
+ box.top = box.left = 0;
441
+ }
442
+ } else if (vFlip) {
443
+ transformations.push(
444
+ "translate(" + (0 - box.left).toString() + " " + (box.height + box.top).toString() + ")"
445
+ );
446
+ transformations.push("scale(1 -1)");
447
+ box.top = box.left = 0;
448
+ }
449
+ let tempValue;
450
+ if (rotation < 0) {
451
+ rotation -= Math.floor(rotation / 4) * 4;
452
+ }
453
+ rotation = rotation % 4;
454
+ switch (rotation) {
455
+ case 1:
456
+ tempValue = box.height / 2 + box.top;
457
+ transformations.unshift(
458
+ "rotate(90 " + tempValue.toString() + " " + tempValue.toString() + ")"
459
+ );
460
+ break;
461
+ case 2:
462
+ transformations.unshift(
463
+ "rotate(180 " + (box.width / 2 + box.left).toString() + " " + (box.height / 2 + box.top).toString() + ")"
464
+ );
465
+ break;
466
+ case 3:
467
+ tempValue = box.width / 2 + box.left;
468
+ transformations.unshift(
469
+ "rotate(-90 " + tempValue.toString() + " " + tempValue.toString() + ")"
470
+ );
471
+ break;
472
+ }
473
+ if (rotation % 2 === 1) {
474
+ if (box.left !== box.top) {
475
+ tempValue = box.left;
476
+ box.left = box.top;
477
+ box.top = tempValue;
478
+ }
479
+ if (box.width !== box.height) {
480
+ tempValue = box.width;
481
+ box.width = box.height;
482
+ box.height = tempValue;
483
+ }
484
+ }
485
+ if (transformations.length) {
486
+ body = wrapSVGContent(
487
+ body,
488
+ '<g transform="' + transformations.join(" ") + '">',
489
+ "</g>"
490
+ );
491
+ }
492
+ });
493
+ const customisationsWidth = fullCustomisations.width;
494
+ const customisationsHeight = fullCustomisations.height;
495
+ const boxWidth = box.width;
496
+ const boxHeight = box.height;
497
+ let width;
498
+ let height;
499
+ if (customisationsWidth === null) {
500
+ height = customisationsHeight === null ? "1em" : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
501
+ width = calculateSize(height, boxWidth / boxHeight);
502
+ } else {
503
+ width = customisationsWidth === "auto" ? boxWidth : customisationsWidth;
504
+ height = customisationsHeight === null ? calculateSize(width, boxHeight / boxWidth) : customisationsHeight === "auto" ? boxHeight : customisationsHeight;
505
+ }
506
+ const attributes = {};
507
+ const setAttr = (prop, value) => {
508
+ if (!isUnsetKeyword(value)) {
509
+ attributes[prop] = value.toString();
510
+ }
511
+ };
512
+ setAttr("width", width);
513
+ setAttr("height", height);
514
+ const viewBox = [box.left, box.top, boxWidth, boxHeight];
515
+ attributes.viewBox = viewBox.join(" ");
516
+ return {
517
+ attributes,
518
+ viewBox,
519
+ body
520
+ };
521
+ }
522
+
523
+ const regex = /\sid="(\S+)"/g;
524
+ const randomPrefix = "IconifyId" + Date.now().toString(16) + (Math.random() * 16777216 | 0).toString(16);
525
+ let counter = 0;
526
+ function replaceIDs(body, prefix = randomPrefix) {
527
+ const ids = [];
528
+ let match;
529
+ while (match = regex.exec(body)) {
530
+ ids.push(match[1]);
531
+ }
532
+ if (!ids.length) {
533
+ return body;
534
+ }
535
+ const suffix = "suffix" + (Math.random() * 16777216 | Date.now()).toString(16);
536
+ ids.forEach((id) => {
537
+ const newID = typeof prefix === "function" ? prefix(id) : prefix + (counter++).toString();
538
+ const escapedID = id.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
539
+ body = body.replace(
540
+ // Allowed characters before id: [#;"]
541
+ // Allowed characters after id: [)"], .[a-z]
542
+ new RegExp('([#;"])(' + escapedID + ')([")]|\\.[a-z])', "g"),
543
+ "$1" + newID + suffix + "$3"
544
+ );
545
+ });
546
+ body = body.replace(new RegExp(suffix, "g"), "");
547
+ return body;
548
+ }
549
+
550
+ const storage = /* @__PURE__ */ Object.create(null);
551
+ function setAPIModule(provider, item) {
552
+ storage[provider] = item;
553
+ }
554
+ function getAPIModule(provider) {
555
+ return storage[provider] || storage[""];
556
+ }
557
+
558
+ function createAPIConfig(source) {
559
+ let resources;
560
+ if (typeof source.resources === "string") {
561
+ resources = [source.resources];
562
+ } else {
563
+ resources = source.resources;
564
+ if (!(resources instanceof Array) || !resources.length) {
565
+ return null;
566
+ }
567
+ }
568
+ const result = {
569
+ // API hosts
570
+ resources,
571
+ // Root path
572
+ path: source.path || "/",
573
+ // URL length limit
574
+ maxURL: source.maxURL || 500,
575
+ // Timeout before next host is used.
576
+ rotate: source.rotate || 750,
577
+ // Timeout before failing query.
578
+ timeout: source.timeout || 5e3,
579
+ // Randomise default API end point.
580
+ random: source.random === true,
581
+ // Start index
582
+ index: source.index || 0,
583
+ // Receive data after time out (used if time out kicks in first, then API module sends data anyway).
584
+ dataAfterTimeout: source.dataAfterTimeout !== false
585
+ };
586
+ return result;
587
+ }
588
+ const configStorage = /* @__PURE__ */ Object.create(null);
589
+ const fallBackAPISources = [
590
+ "https://api.simplesvg.com",
591
+ "https://api.unisvg.com"
592
+ ];
593
+ const fallBackAPI = [];
594
+ while (fallBackAPISources.length > 0) {
595
+ if (fallBackAPISources.length === 1) {
596
+ fallBackAPI.push(fallBackAPISources.shift());
597
+ } else {
598
+ if (Math.random() > 0.5) {
599
+ fallBackAPI.push(fallBackAPISources.shift());
600
+ } else {
601
+ fallBackAPI.push(fallBackAPISources.pop());
602
+ }
603
+ }
604
+ }
605
+ configStorage[""] = createAPIConfig({
606
+ resources: ["https://api.iconify.design"].concat(fallBackAPI)
607
+ });
608
+ function addAPIProvider(provider, customConfig) {
609
+ const config = createAPIConfig(customConfig);
610
+ if (config === null) {
611
+ return false;
612
+ }
613
+ configStorage[provider] = config;
614
+ return true;
615
+ }
616
+ function getAPIConfig(provider) {
617
+ return configStorage[provider];
618
+ }
619
+ function listAPIProviders() {
620
+ return Object.keys(configStorage);
621
+ }
622
+
623
+ const detectFetch = () => {
624
+ let callback;
625
+ try {
626
+ callback = fetch;
627
+ if (typeof callback === "function") {
628
+ return callback;
629
+ }
630
+ } catch (err) {
631
+ }
632
+ };
633
+ let fetchModule = detectFetch();
634
+ function setFetch(fetch2) {
635
+ fetchModule = fetch2;
636
+ }
637
+ function getFetch() {
638
+ return fetchModule;
639
+ }
640
+ function calculateMaxLength(provider, prefix) {
641
+ const config = getAPIConfig(provider);
642
+ if (!config) {
643
+ return 0;
644
+ }
645
+ let result;
646
+ if (!config.maxURL) {
647
+ result = 0;
648
+ } else {
649
+ let maxHostLength = 0;
650
+ config.resources.forEach((item) => {
651
+ const host = item;
652
+ maxHostLength = Math.max(maxHostLength, host.length);
653
+ });
654
+ const url = prefix + ".json?icons=";
655
+ result = config.maxURL - maxHostLength - config.path.length - url.length;
656
+ }
657
+ return result;
658
+ }
659
+ function shouldAbort(status) {
660
+ return status === 404;
661
+ }
662
+ const prepare = (provider, prefix, icons) => {
663
+ const results = [];
664
+ const maxLength = calculateMaxLength(provider, prefix);
665
+ const type = "icons";
666
+ let item = {
667
+ type,
668
+ provider,
669
+ prefix,
670
+ icons: []
671
+ };
672
+ let length = 0;
673
+ icons.forEach((name, index) => {
674
+ length += name.length + 1;
675
+ if (length >= maxLength && index > 0) {
676
+ results.push(item);
677
+ item = {
678
+ type,
679
+ provider,
680
+ prefix,
681
+ icons: []
682
+ };
683
+ length = name.length;
684
+ }
685
+ item.icons.push(name);
686
+ });
687
+ results.push(item);
688
+ return results;
689
+ };
690
+ function getPath(provider) {
691
+ if (typeof provider === "string") {
692
+ const config = getAPIConfig(provider);
693
+ if (config) {
694
+ return config.path;
695
+ }
696
+ }
697
+ return "/";
698
+ }
699
+ const send = (host, params, callback) => {
700
+ if (!fetchModule) {
701
+ callback("abort", 424);
702
+ return;
703
+ }
704
+ let path = getPath(params.provider);
705
+ switch (params.type) {
706
+ case "icons": {
707
+ const prefix = params.prefix;
708
+ const icons = params.icons;
709
+ const iconsList = icons.join(",");
710
+ const urlParams = new URLSearchParams({
711
+ icons: iconsList
712
+ });
713
+ path += prefix + ".json?" + urlParams.toString();
714
+ break;
715
+ }
716
+ case "custom": {
717
+ const uri = params.uri;
718
+ path += uri.slice(0, 1) === "/" ? uri.slice(1) : uri;
719
+ break;
720
+ }
721
+ default:
722
+ callback("abort", 400);
723
+ return;
724
+ }
725
+ let defaultError = 503;
726
+ fetchModule(host + path).then((response) => {
727
+ const status = response.status;
728
+ if (status !== 200) {
729
+ setTimeout(() => {
730
+ callback(shouldAbort(status) ? "abort" : "next", status);
731
+ });
732
+ return;
733
+ }
734
+ defaultError = 501;
735
+ return response.json();
736
+ }).then((data) => {
737
+ if (typeof data !== "object" || data === null) {
738
+ setTimeout(() => {
739
+ if (data === 404) {
740
+ callback("abort", data);
741
+ } else {
742
+ callback("next", defaultError);
743
+ }
744
+ });
745
+ return;
746
+ }
747
+ setTimeout(() => {
748
+ callback("success", data);
749
+ });
750
+ }).catch(() => {
751
+ callback("next", defaultError);
752
+ });
753
+ };
754
+ const fetchAPIModule = {
755
+ prepare,
756
+ send
757
+ };
758
+
759
+ function sortIcons(icons) {
760
+ const result = {
761
+ loaded: [],
762
+ missing: [],
763
+ pending: []
764
+ };
765
+ const storage = /* @__PURE__ */ Object.create(null);
766
+ icons.sort((a, b) => {
767
+ if (a.provider !== b.provider) {
768
+ return a.provider.localeCompare(b.provider);
769
+ }
770
+ if (a.prefix !== b.prefix) {
771
+ return a.prefix.localeCompare(b.prefix);
772
+ }
773
+ return a.name.localeCompare(b.name);
774
+ });
775
+ let lastIcon = {
776
+ provider: "",
777
+ prefix: "",
778
+ name: ""
779
+ };
780
+ icons.forEach((icon) => {
781
+ if (lastIcon.name === icon.name && lastIcon.prefix === icon.prefix && lastIcon.provider === icon.provider) {
782
+ return;
783
+ }
784
+ lastIcon = icon;
785
+ const provider = icon.provider;
786
+ const prefix = icon.prefix;
787
+ const name = icon.name;
788
+ const providerStorage = storage[provider] || (storage[provider] = /* @__PURE__ */ Object.create(null));
789
+ const localStorage = providerStorage[prefix] || (providerStorage[prefix] = getStorage(provider, prefix));
790
+ let list;
791
+ if (name in localStorage.icons) {
792
+ list = result.loaded;
793
+ } else if (prefix === "" || localStorage.missing.has(name)) {
794
+ list = result.missing;
795
+ } else {
796
+ list = result.pending;
797
+ }
798
+ const item = {
799
+ provider,
800
+ prefix,
801
+ name
802
+ };
803
+ list.push(item);
804
+ });
805
+ return result;
806
+ }
807
+
808
+ function removeCallback(storages, id) {
809
+ storages.forEach((storage) => {
810
+ const items = storage.loaderCallbacks;
811
+ if (items) {
812
+ storage.loaderCallbacks = items.filter((row) => row.id !== id);
813
+ }
814
+ });
815
+ }
816
+ function updateCallbacks(storage) {
817
+ if (!storage.pendingCallbacksFlag) {
818
+ storage.pendingCallbacksFlag = true;
819
+ setTimeout(() => {
820
+ storage.pendingCallbacksFlag = false;
821
+ const items = storage.loaderCallbacks ? storage.loaderCallbacks.slice(0) : [];
822
+ if (!items.length) {
823
+ return;
824
+ }
825
+ let hasPending = false;
826
+ const provider = storage.provider;
827
+ const prefix = storage.prefix;
828
+ items.forEach((item) => {
829
+ const icons = item.icons;
830
+ const oldLength = icons.pending.length;
831
+ icons.pending = icons.pending.filter((icon) => {
832
+ if (icon.prefix !== prefix) {
833
+ return true;
834
+ }
835
+ const name = icon.name;
836
+ if (storage.icons[name]) {
837
+ icons.loaded.push({
838
+ provider,
839
+ prefix,
840
+ name
841
+ });
842
+ } else if (storage.missing.has(name)) {
843
+ icons.missing.push({
844
+ provider,
845
+ prefix,
846
+ name
847
+ });
848
+ } else {
849
+ hasPending = true;
850
+ return true;
851
+ }
852
+ return false;
853
+ });
854
+ if (icons.pending.length !== oldLength) {
855
+ if (!hasPending) {
856
+ removeCallback([storage], item.id);
857
+ }
858
+ item.callback(
859
+ icons.loaded.slice(0),
860
+ icons.missing.slice(0),
861
+ icons.pending.slice(0),
862
+ item.abort
863
+ );
864
+ }
865
+ });
866
+ });
867
+ }
868
+ }
869
+ let idCounter = 0;
870
+ function storeCallback(callback, icons, pendingSources) {
871
+ const id = idCounter++;
872
+ const abort = removeCallback.bind(null, pendingSources, id);
873
+ if (!icons.pending.length) {
874
+ return abort;
875
+ }
876
+ const item = {
877
+ id,
878
+ icons,
879
+ callback,
880
+ abort
881
+ };
882
+ pendingSources.forEach((storage) => {
883
+ (storage.loaderCallbacks || (storage.loaderCallbacks = [])).push(item);
884
+ });
885
+ return abort;
886
+ }
887
+
888
+ function listToIcons(list, validate = true, simpleNames = false) {
889
+ const result = [];
890
+ list.forEach((item) => {
891
+ const icon = typeof item === "string" ? stringToIcon(item, validate, simpleNames) : item;
892
+ if (icon) {
893
+ result.push(icon);
894
+ }
895
+ });
896
+ return result;
897
+ }
898
+
899
+ // src/config.ts
900
+ var defaultConfig = {
901
+ resources: [],
902
+ index: 0,
903
+ timeout: 2e3,
904
+ rotate: 750,
905
+ random: false,
906
+ dataAfterTimeout: false
907
+ };
908
+
909
+ // src/query.ts
910
+ function sendQuery(config, payload, query, done) {
911
+ const resourcesCount = config.resources.length;
912
+ const startIndex = config.random ? Math.floor(Math.random() * resourcesCount) : config.index;
913
+ let resources;
914
+ if (config.random) {
915
+ let list = config.resources.slice(0);
916
+ resources = [];
917
+ while (list.length > 1) {
918
+ const nextIndex = Math.floor(Math.random() * list.length);
919
+ resources.push(list[nextIndex]);
920
+ list = list.slice(0, nextIndex).concat(list.slice(nextIndex + 1));
921
+ }
922
+ resources = resources.concat(list);
923
+ } else {
924
+ resources = config.resources.slice(startIndex).concat(config.resources.slice(0, startIndex));
925
+ }
926
+ const startTime = Date.now();
927
+ let status = "pending";
928
+ let queriesSent = 0;
929
+ let lastError;
930
+ let timer = null;
931
+ let queue = [];
932
+ let doneCallbacks = [];
933
+ if (typeof done === "function") {
934
+ doneCallbacks.push(done);
935
+ }
936
+ function resetTimer() {
937
+ if (timer) {
938
+ clearTimeout(timer);
939
+ timer = null;
940
+ }
941
+ }
942
+ function abort() {
943
+ if (status === "pending") {
944
+ status = "aborted";
945
+ }
946
+ resetTimer();
947
+ queue.forEach((item) => {
948
+ if (item.status === "pending") {
949
+ item.status = "aborted";
950
+ }
951
+ });
952
+ queue = [];
953
+ }
954
+ function subscribe(callback, overwrite) {
955
+ if (overwrite) {
956
+ doneCallbacks = [];
957
+ }
958
+ if (typeof callback === "function") {
959
+ doneCallbacks.push(callback);
960
+ }
961
+ }
962
+ function getQueryStatus() {
963
+ return {
964
+ startTime,
965
+ payload,
966
+ status,
967
+ queriesSent,
968
+ queriesPending: queue.length,
969
+ subscribe,
970
+ abort
971
+ };
972
+ }
973
+ function failQuery() {
974
+ status = "failed";
975
+ doneCallbacks.forEach((callback) => {
976
+ callback(void 0, lastError);
977
+ });
978
+ }
979
+ function clearQueue() {
980
+ queue.forEach((item) => {
981
+ if (item.status === "pending") {
982
+ item.status = "aborted";
983
+ }
984
+ });
985
+ queue = [];
986
+ }
987
+ function moduleResponse(item, response, data) {
988
+ const isError = response !== "success";
989
+ queue = queue.filter((queued) => queued !== item);
990
+ switch (status) {
991
+ case "pending":
992
+ break;
993
+ case "failed":
994
+ if (isError || !config.dataAfterTimeout) {
995
+ return;
996
+ }
997
+ break;
998
+ default:
999
+ return;
1000
+ }
1001
+ if (response === "abort") {
1002
+ lastError = data;
1003
+ failQuery();
1004
+ return;
1005
+ }
1006
+ if (isError) {
1007
+ lastError = data;
1008
+ if (!queue.length) {
1009
+ if (!resources.length) {
1010
+ failQuery();
1011
+ } else {
1012
+ execNext();
1013
+ }
1014
+ }
1015
+ return;
1016
+ }
1017
+ resetTimer();
1018
+ clearQueue();
1019
+ if (!config.random) {
1020
+ const index = config.resources.indexOf(item.resource);
1021
+ if (index !== -1 && index !== config.index) {
1022
+ config.index = index;
1023
+ }
1024
+ }
1025
+ status = "completed";
1026
+ doneCallbacks.forEach((callback) => {
1027
+ callback(data);
1028
+ });
1029
+ }
1030
+ function execNext() {
1031
+ if (status !== "pending") {
1032
+ return;
1033
+ }
1034
+ resetTimer();
1035
+ const resource = resources.shift();
1036
+ if (resource === void 0) {
1037
+ if (queue.length) {
1038
+ timer = setTimeout(() => {
1039
+ resetTimer();
1040
+ if (status === "pending") {
1041
+ clearQueue();
1042
+ failQuery();
1043
+ }
1044
+ }, config.timeout);
1045
+ return;
1046
+ }
1047
+ failQuery();
1048
+ return;
1049
+ }
1050
+ const item = {
1051
+ status: "pending",
1052
+ resource,
1053
+ callback: (status2, data) => {
1054
+ moduleResponse(item, status2, data);
1055
+ }
1056
+ };
1057
+ queue.push(item);
1058
+ queriesSent++;
1059
+ timer = setTimeout(execNext, config.rotate);
1060
+ query(resource, payload, item.callback);
1061
+ }
1062
+ setTimeout(execNext);
1063
+ return getQueryStatus;
1064
+ }
1065
+
1066
+ // src/index.ts
1067
+ function initRedundancy(cfg) {
1068
+ const config = {
1069
+ ...defaultConfig,
1070
+ ...cfg
1071
+ };
1072
+ let queries = [];
1073
+ function cleanup() {
1074
+ queries = queries.filter((item) => item().status === "pending");
1075
+ }
1076
+ function query(payload, queryCallback, doneCallback) {
1077
+ const query2 = sendQuery(
1078
+ config,
1079
+ payload,
1080
+ queryCallback,
1081
+ (data, error) => {
1082
+ cleanup();
1083
+ if (doneCallback) {
1084
+ doneCallback(data, error);
1085
+ }
1086
+ }
1087
+ );
1088
+ queries.push(query2);
1089
+ return query2;
1090
+ }
1091
+ function find(callback) {
1092
+ return queries.find((value) => {
1093
+ return callback(value);
1094
+ }) || null;
1095
+ }
1096
+ const instance = {
1097
+ query,
1098
+ find,
1099
+ setIndex: (index) => {
1100
+ config.index = index;
1101
+ },
1102
+ getIndex: () => config.index,
1103
+ cleanup
1104
+ };
1105
+ return instance;
1106
+ }
1107
+
1108
+ function emptyCallback$1() {
1109
+ }
1110
+ const redundancyCache = /* @__PURE__ */ Object.create(null);
1111
+ function getRedundancyCache(provider) {
1112
+ if (!redundancyCache[provider]) {
1113
+ const config = getAPIConfig(provider);
1114
+ if (!config) {
1115
+ return;
1116
+ }
1117
+ const redundancy = initRedundancy(config);
1118
+ const cachedReundancy = {
1119
+ config,
1120
+ redundancy
1121
+ };
1122
+ redundancyCache[provider] = cachedReundancy;
1123
+ }
1124
+ return redundancyCache[provider];
1125
+ }
1126
+ function sendAPIQuery(target, query, callback) {
1127
+ let redundancy;
1128
+ let send;
1129
+ if (typeof target === "string") {
1130
+ const api = getAPIModule(target);
1131
+ if (!api) {
1132
+ callback(void 0, 424);
1133
+ return emptyCallback$1;
1134
+ }
1135
+ send = api.send;
1136
+ const cached = getRedundancyCache(target);
1137
+ if (cached) {
1138
+ redundancy = cached.redundancy;
1139
+ }
1140
+ } else {
1141
+ const config = createAPIConfig(target);
1142
+ if (config) {
1143
+ redundancy = initRedundancy(config);
1144
+ const moduleKey = target.resources ? target.resources[0] : "";
1145
+ const api = getAPIModule(moduleKey);
1146
+ if (api) {
1147
+ send = api.send;
1148
+ }
1149
+ }
1150
+ }
1151
+ if (!redundancy || !send) {
1152
+ callback(void 0, 424);
1153
+ return emptyCallback$1;
1154
+ }
1155
+ return redundancy.query(query, send, callback)().abort;
1156
+ }
1157
+
1158
+ const browserCacheVersion = "iconify2";
1159
+ const browserCachePrefix = "iconify";
1160
+ const browserCacheCountKey = browserCachePrefix + "-count";
1161
+ const browserCacheVersionKey = browserCachePrefix + "-version";
1162
+ const browserStorageHour = 36e5;
1163
+ const browserStorageCacheExpiration = 168;
1164
+ const browserStorageLimit = 50;
1165
+
1166
+ function getStoredItem(func, key) {
1167
+ try {
1168
+ return func.getItem(key);
1169
+ } catch (err) {
1170
+ }
1171
+ }
1172
+ function setStoredItem(func, key, value) {
1173
+ try {
1174
+ func.setItem(key, value);
1175
+ return true;
1176
+ } catch (err) {
1177
+ }
1178
+ }
1179
+ function removeStoredItem(func, key) {
1180
+ try {
1181
+ func.removeItem(key);
1182
+ } catch (err) {
1183
+ }
1184
+ }
1185
+
1186
+ function setBrowserStorageItemsCount(storage, value) {
1187
+ return setStoredItem(storage, browserCacheCountKey, value.toString());
1188
+ }
1189
+ function getBrowserStorageItemsCount(storage) {
1190
+ return parseInt(getStoredItem(storage, browserCacheCountKey)) || 0;
1191
+ }
1192
+
1193
+ const browserStorageConfig = {
1194
+ local: true,
1195
+ session: true
1196
+ };
1197
+ const browserStorageEmptyItems = {
1198
+ local: /* @__PURE__ */ new Set(),
1199
+ session: /* @__PURE__ */ new Set()
1200
+ };
1201
+ let browserStorageStatus = false;
1202
+ function setBrowserStorageStatus(status) {
1203
+ browserStorageStatus = status;
1204
+ }
1205
+
1206
+ let _window = typeof window === "undefined" ? {} : window;
1207
+ function getBrowserStorage(key) {
1208
+ const attr = key + "Storage";
1209
+ try {
1210
+ if (_window && _window[attr] && typeof _window[attr].length === "number") {
1211
+ return _window[attr];
1212
+ }
1213
+ } catch (err) {
1214
+ }
1215
+ browserStorageConfig[key] = false;
1216
+ }
1217
+
1218
+ function iterateBrowserStorage(key, callback) {
1219
+ const func = getBrowserStorage(key);
1220
+ if (!func) {
1221
+ return;
1222
+ }
1223
+ const version = getStoredItem(func, browserCacheVersionKey);
1224
+ if (version !== browserCacheVersion) {
1225
+ if (version) {
1226
+ const total2 = getBrowserStorageItemsCount(func);
1227
+ for (let i = 0; i < total2; i++) {
1228
+ removeStoredItem(func, browserCachePrefix + i.toString());
1229
+ }
1230
+ }
1231
+ setStoredItem(func, browserCacheVersionKey, browserCacheVersion);
1232
+ setBrowserStorageItemsCount(func, 0);
1233
+ return;
1234
+ }
1235
+ const minTime = Math.floor(Date.now() / browserStorageHour) - browserStorageCacheExpiration;
1236
+ const parseItem = (index) => {
1237
+ const name = browserCachePrefix + index.toString();
1238
+ const item = getStoredItem(func, name);
1239
+ if (typeof item !== "string") {
1240
+ return;
1241
+ }
1242
+ try {
1243
+ const data = JSON.parse(item);
1244
+ if (typeof data === "object" && typeof data.cached === "number" && data.cached > minTime && typeof data.provider === "string" && typeof data.data === "object" && typeof data.data.prefix === "string" && // Valid item: run callback
1245
+ callback(data, index)) {
1246
+ return true;
1247
+ }
1248
+ } catch (err) {
1249
+ }
1250
+ removeStoredItem(func, name);
1251
+ };
1252
+ let total = getBrowserStorageItemsCount(func);
1253
+ for (let i = total - 1; i >= 0; i--) {
1254
+ if (!parseItem(i)) {
1255
+ if (i === total - 1) {
1256
+ total--;
1257
+ setBrowserStorageItemsCount(func, total);
1258
+ } else {
1259
+ browserStorageEmptyItems[key].add(i);
1260
+ }
1261
+ }
1262
+ }
1263
+ }
1264
+
1265
+ function initBrowserStorage() {
1266
+ if (browserStorageStatus) {
1267
+ return;
1268
+ }
1269
+ setBrowserStorageStatus(true);
1270
+ for (const key in browserStorageConfig) {
1271
+ iterateBrowserStorage(key, (item) => {
1272
+ const iconSet = item.data;
1273
+ const provider = item.provider;
1274
+ const prefix = iconSet.prefix;
1275
+ const storage = getStorage(
1276
+ provider,
1277
+ prefix
1278
+ );
1279
+ if (!addIconSet(storage, iconSet).length) {
1280
+ return false;
1281
+ }
1282
+ const lastModified = iconSet.lastModified || -1;
1283
+ storage.lastModifiedCached = storage.lastModifiedCached ? Math.min(storage.lastModifiedCached, lastModified) : lastModified;
1284
+ return true;
1285
+ });
1286
+ }
1287
+ }
1288
+
1289
+ function updateLastModified(storage, lastModified) {
1290
+ const lastValue = storage.lastModifiedCached;
1291
+ if (
1292
+ // Matches or newer
1293
+ lastValue && lastValue >= lastModified
1294
+ ) {
1295
+ return lastValue === lastModified;
1296
+ }
1297
+ storage.lastModifiedCached = lastModified;
1298
+ if (lastValue) {
1299
+ for (const key in browserStorageConfig) {
1300
+ iterateBrowserStorage(key, (item) => {
1301
+ const iconSet = item.data;
1302
+ return item.provider !== storage.provider || iconSet.prefix !== storage.prefix || iconSet.lastModified === lastModified;
1303
+ });
1304
+ }
1305
+ }
1306
+ return true;
1307
+ }
1308
+ function storeInBrowserStorage(storage, data) {
1309
+ if (!browserStorageStatus) {
1310
+ initBrowserStorage();
1311
+ }
1312
+ function store(key) {
1313
+ let func;
1314
+ if (!browserStorageConfig[key] || !(func = getBrowserStorage(key))) {
1315
+ return;
1316
+ }
1317
+ const set = browserStorageEmptyItems[key];
1318
+ let index;
1319
+ if (set.size) {
1320
+ set.delete(index = Array.from(set).shift());
1321
+ } else {
1322
+ index = getBrowserStorageItemsCount(func);
1323
+ if (index >= browserStorageLimit || !setBrowserStorageItemsCount(func, index + 1)) {
1324
+ return;
1325
+ }
1326
+ }
1327
+ const item = {
1328
+ cached: Math.floor(Date.now() / browserStorageHour),
1329
+ provider: storage.provider,
1330
+ data
1331
+ };
1332
+ return setStoredItem(
1333
+ func,
1334
+ browserCachePrefix + index.toString(),
1335
+ JSON.stringify(item)
1336
+ );
1337
+ }
1338
+ if (data.lastModified && !updateLastModified(storage, data.lastModified)) {
1339
+ return;
1340
+ }
1341
+ if (!Object.keys(data.icons).length) {
1342
+ return;
1343
+ }
1344
+ if (data.not_found) {
1345
+ data = Object.assign({}, data);
1346
+ delete data.not_found;
1347
+ }
1348
+ if (!store("local")) {
1349
+ store("session");
1350
+ }
1351
+ }
1352
+
1353
+ function emptyCallback() {
1354
+ }
1355
+ function loadedNewIcons(storage) {
1356
+ if (!storage.iconsLoaderFlag) {
1357
+ storage.iconsLoaderFlag = true;
1358
+ setTimeout(() => {
1359
+ storage.iconsLoaderFlag = false;
1360
+ updateCallbacks(storage);
1361
+ });
1362
+ }
1363
+ }
1364
+ function loadNewIcons(storage, icons) {
1365
+ if (!storage.iconsToLoad) {
1366
+ storage.iconsToLoad = icons;
1367
+ } else {
1368
+ storage.iconsToLoad = storage.iconsToLoad.concat(icons).sort();
1369
+ }
1370
+ if (!storage.iconsQueueFlag) {
1371
+ storage.iconsQueueFlag = true;
1372
+ setTimeout(() => {
1373
+ storage.iconsQueueFlag = false;
1374
+ const { provider, prefix } = storage;
1375
+ const icons2 = storage.iconsToLoad;
1376
+ delete storage.iconsToLoad;
1377
+ let api;
1378
+ if (!icons2 || !(api = getAPIModule(provider))) {
1379
+ return;
1380
+ }
1381
+ const params = api.prepare(provider, prefix, icons2);
1382
+ params.forEach((item) => {
1383
+ sendAPIQuery(provider, item, (data) => {
1384
+ if (typeof data !== "object") {
1385
+ item.icons.forEach((name) => {
1386
+ storage.missing.add(name);
1387
+ });
1388
+ } else {
1389
+ try {
1390
+ const parsed = addIconSet(
1391
+ storage,
1392
+ data
1393
+ );
1394
+ if (!parsed.length) {
1395
+ return;
1396
+ }
1397
+ const pending = storage.pendingIcons;
1398
+ if (pending) {
1399
+ parsed.forEach((name) => {
1400
+ pending.delete(name);
1401
+ });
1402
+ }
1403
+ storeInBrowserStorage(storage, data);
1404
+ } catch (err) {
1405
+ console.error(err);
1406
+ }
1407
+ }
1408
+ loadedNewIcons(storage);
1409
+ });
1410
+ });
1411
+ });
1412
+ }
1413
+ }
1414
+ const loadIcons = (icons, callback) => {
1415
+ const cleanedIcons = listToIcons(icons, true, allowSimpleNames());
1416
+ const sortedIcons = sortIcons(cleanedIcons);
1417
+ if (!sortedIcons.pending.length) {
1418
+ let callCallback = true;
1419
+ if (callback) {
1420
+ setTimeout(() => {
1421
+ if (callCallback) {
1422
+ callback(
1423
+ sortedIcons.loaded,
1424
+ sortedIcons.missing,
1425
+ sortedIcons.pending,
1426
+ emptyCallback
1427
+ );
1428
+ }
1429
+ });
1430
+ }
1431
+ return () => {
1432
+ callCallback = false;
1433
+ };
1434
+ }
1435
+ const newIcons = /* @__PURE__ */ Object.create(null);
1436
+ const sources = [];
1437
+ let lastProvider, lastPrefix;
1438
+ sortedIcons.pending.forEach((icon) => {
1439
+ const { provider, prefix } = icon;
1440
+ if (prefix === lastPrefix && provider === lastProvider) {
1441
+ return;
1442
+ }
1443
+ lastProvider = provider;
1444
+ lastPrefix = prefix;
1445
+ sources.push(getStorage(provider, prefix));
1446
+ const providerNewIcons = newIcons[provider] || (newIcons[provider] = /* @__PURE__ */ Object.create(null));
1447
+ if (!providerNewIcons[prefix]) {
1448
+ providerNewIcons[prefix] = [];
1449
+ }
1450
+ });
1451
+ sortedIcons.pending.forEach((icon) => {
1452
+ const { provider, prefix, name } = icon;
1453
+ const storage = getStorage(provider, prefix);
1454
+ const pendingQueue = storage.pendingIcons || (storage.pendingIcons = /* @__PURE__ */ new Set());
1455
+ if (!pendingQueue.has(name)) {
1456
+ pendingQueue.add(name);
1457
+ newIcons[provider][prefix].push(name);
1458
+ }
1459
+ });
1460
+ sources.forEach((storage) => {
1461
+ const { provider, prefix } = storage;
1462
+ if (newIcons[provider][prefix].length) {
1463
+ loadNewIcons(storage, newIcons[provider][prefix]);
1464
+ }
1465
+ });
1466
+ return callback ? storeCallback(callback, sortedIcons, sources) : emptyCallback;
1467
+ };
1468
+ const loadIcon = (icon) => {
1469
+ return new Promise((fulfill, reject) => {
1470
+ const iconObj = typeof icon === "string" ? stringToIcon(icon, true) : icon;
1471
+ if (!iconObj) {
1472
+ reject(icon);
1473
+ return;
1474
+ }
1475
+ loadIcons([iconObj || icon], (loaded) => {
1476
+ if (loaded.length && iconObj) {
1477
+ const data = getIconData(iconObj);
1478
+ if (data) {
1479
+ fulfill({
1480
+ ...defaultIconProps,
1481
+ ...data
1482
+ });
1483
+ return;
1484
+ }
1485
+ }
1486
+ reject(icon);
1487
+ });
1488
+ });
1489
+ };
1490
+
1491
+ function toggleBrowserCache(storage, value) {
1492
+ switch (storage) {
1493
+ case "local":
1494
+ case "session":
1495
+ browserStorageConfig[storage] = value;
1496
+ break;
1497
+ case "all":
1498
+ for (const key in browserStorageConfig) {
1499
+ browserStorageConfig[key] = value;
1500
+ }
1501
+ break;
1502
+ }
1503
+ }
1504
+
1505
+ function mergeCustomisations(defaults, item) {
1506
+ const result = {
1507
+ ...defaults
1508
+ };
1509
+ for (const key in item) {
1510
+ const value = item[key];
1511
+ const valueType = typeof value;
1512
+ if (key in defaultIconSizeCustomisations) {
1513
+ if (value === null || value && (valueType === "string" || valueType === "number")) {
1514
+ result[key] = value;
1515
+ }
1516
+ } else if (valueType === typeof result[key]) {
1517
+ result[key] = key === "rotate" ? value % 4 : value;
1518
+ }
1519
+ }
1520
+ return result;
1521
+ }
1522
+
1523
+ const separator = /[\s,]+/;
1524
+ function flipFromString(custom, flip) {
1525
+ flip.split(separator).forEach((str) => {
1526
+ const value = str.trim();
1527
+ switch (value) {
1528
+ case "horizontal":
1529
+ custom.hFlip = true;
1530
+ break;
1531
+ case "vertical":
1532
+ custom.vFlip = true;
1533
+ break;
1534
+ }
1535
+ });
1536
+ }
1537
+
1538
+ function rotateFromString(value, defaultValue = 0) {
1539
+ const units = value.replace(/^-?[0-9.]*/, "");
1540
+ function cleanup(value2) {
1541
+ while (value2 < 0) {
1542
+ value2 += 4;
1543
+ }
1544
+ return value2 % 4;
1545
+ }
1546
+ if (units === "") {
1547
+ const num = parseInt(value);
1548
+ return isNaN(num) ? 0 : cleanup(num);
1549
+ } else if (units !== value) {
1550
+ let split = 0;
1551
+ switch (units) {
1552
+ case "%":
1553
+ split = 25;
1554
+ break;
1555
+ case "deg":
1556
+ split = 90;
1557
+ }
1558
+ if (split) {
1559
+ let num = parseFloat(value.slice(0, value.length - units.length));
1560
+ if (isNaN(num)) {
1561
+ return 0;
1562
+ }
1563
+ num = num / split;
1564
+ return num % 1 === 0 ? cleanup(num) : 0;
1565
+ }
1566
+ }
1567
+ return defaultValue;
1568
+ }
1569
+
1570
+ function iconToHTML(body, attributes) {
1571
+ let renderAttribsHTML = body.indexOf("xlink:") === -1 ? "" : ' xmlns:xlink="http://www.w3.org/1999/xlink"';
1572
+ for (const attr in attributes) {
1573
+ renderAttribsHTML += " " + attr + '="' + attributes[attr] + '"';
1574
+ }
1575
+ return '<svg xmlns="http://www.w3.org/2000/svg"' + renderAttribsHTML + ">" + body + "</svg>";
1576
+ }
1577
+
1578
+ function encodeSVGforURL(svg) {
1579
+ return svg.replace(/"/g, "'").replace(/%/g, "%25").replace(/#/g, "%23").replace(/</g, "%3C").replace(/>/g, "%3E").replace(/\s+/g, " ");
1580
+ }
1581
+ function svgToData(svg) {
1582
+ return "data:image/svg+xml," + encodeSVGforURL(svg);
1583
+ }
1584
+ function svgToURL(svg) {
1585
+ return 'url("' + svgToData(svg) + '")';
1586
+ }
1587
+
1588
+ const defaultExtendedIconCustomisations = {
1589
+ ...defaultIconCustomisations,
1590
+ inline: false,
1591
+ };
1592
+
1593
+ /**
1594
+ * Default SVG attributes
1595
+ */
1596
+ const svgDefaults = {
1597
+ 'xmlns': 'http://www.w3.org/2000/svg',
1598
+ 'xmlns:xlink': 'http://www.w3.org/1999/xlink',
1599
+ 'aria-hidden': true,
1600
+ 'role': 'img',
1601
+ };
1602
+ /**
1603
+ * Style modes
1604
+ */
1605
+ const commonProps = {
1606
+ display: 'inline-block',
1607
+ };
1608
+ const monotoneProps = {
1609
+ backgroundColor: 'currentColor',
1610
+ };
1611
+ const coloredProps = {
1612
+ backgroundColor: 'transparent',
1613
+ };
1614
+ // Dynamically add common props to variables above
1615
+ const propsToAdd = {
1616
+ Image: 'var(--svg)',
1617
+ Repeat: 'no-repeat',
1618
+ Size: '100% 100%',
1619
+ };
1620
+ const propsToAddTo = {
1621
+ webkitMask: monotoneProps,
1622
+ mask: monotoneProps,
1623
+ background: coloredProps,
1624
+ };
1625
+ for (const prefix in propsToAddTo) {
1626
+ const list = propsToAddTo[prefix];
1627
+ for (const prop in propsToAdd) {
1628
+ list[prefix + prop] = propsToAdd[prop];
1629
+ }
1630
+ }
1631
+ /**
1632
+ * Aliases for customisations.
1633
+ * In Vue 'v-' properties are reserved, so v-flip must be renamed
1634
+ */
1635
+ const customisationAliases = {};
1636
+ ['horizontal', 'vertical'].forEach((prefix) => {
1637
+ const attr = prefix.slice(0, 1) + 'Flip';
1638
+ // vertical-flip
1639
+ customisationAliases[prefix + '-flip'] = attr;
1640
+ // v-flip
1641
+ customisationAliases[prefix.slice(0, 1) + '-flip'] = attr;
1642
+ // verticalFlip
1643
+ customisationAliases[prefix + 'Flip'] = attr;
1644
+ });
1645
+ /**
1646
+ * Fix size: add 'px' to numbers
1647
+ */
1648
+ function fixSize(value) {
1649
+ return value + (value.match(/^[-0-9.]+$/) ? 'px' : '');
1650
+ }
1651
+ /**
1652
+ * Render icon
1653
+ */
1654
+ const render = (
1655
+ // Icon must be validated before calling this function
1656
+ icon,
1657
+ // Partial properties
1658
+ props) => {
1659
+ // Split properties
1660
+ const customisations = mergeCustomisations(defaultExtendedIconCustomisations, props);
1661
+ const componentProps = { ...svgDefaults };
1662
+ // Check mode
1663
+ const mode = props.mode || 'svg';
1664
+ // Copy style
1665
+ const style = {};
1666
+ const propsStyle = props.style;
1667
+ const customStyle = typeof propsStyle === 'object' && !(propsStyle instanceof Array)
1668
+ ? propsStyle
1669
+ : {};
1670
+ // Get element properties
1671
+ for (let key in props) {
1672
+ const value = props[key];
1673
+ if (value === void 0) {
1674
+ continue;
1675
+ }
1676
+ switch (key) {
1677
+ // Properties to ignore
1678
+ case 'icon':
1679
+ case 'style':
1680
+ case 'onLoad':
1681
+ case 'mode':
1682
+ break;
1683
+ // Boolean attributes
1684
+ case 'inline':
1685
+ case 'hFlip':
1686
+ case 'vFlip':
1687
+ customisations[key] =
1688
+ value === true || value === 'true' || value === 1;
1689
+ break;
1690
+ // Flip as string: 'horizontal,vertical'
1691
+ case 'flip':
1692
+ if (typeof value === 'string') {
1693
+ flipFromString(customisations, value);
1694
+ }
1695
+ break;
1696
+ // Color: override style
1697
+ case 'color':
1698
+ style.color = value;
1699
+ break;
1700
+ // Rotation as string
1701
+ case 'rotate':
1702
+ if (typeof value === 'string') {
1703
+ customisations[key] = rotateFromString(value);
1704
+ }
1705
+ else if (typeof value === 'number') {
1706
+ customisations[key] = value;
1707
+ }
1708
+ break;
1709
+ // Remove aria-hidden
1710
+ case 'ariaHidden':
1711
+ case 'aria-hidden':
1712
+ // Vue transforms 'aria-hidden' property to 'ariaHidden'
1713
+ if (value !== true && value !== 'true') {
1714
+ delete componentProps['aria-hidden'];
1715
+ }
1716
+ break;
1717
+ default: {
1718
+ const alias = customisationAliases[key];
1719
+ if (alias) {
1720
+ // Aliases for boolean customisations
1721
+ if (value === true || value === 'true' || value === 1) {
1722
+ customisations[alias] = true;
1723
+ }
1724
+ }
1725
+ else if (defaultExtendedIconCustomisations[key] === void 0) {
1726
+ // Copy missing property if it does not exist in customisations
1727
+ componentProps[key] = value;
1728
+ }
1729
+ }
1730
+ }
1731
+ }
1732
+ // Generate icon
1733
+ const item = iconToSVG(icon, customisations);
1734
+ const renderAttribs = item.attributes;
1735
+ // Inline display
1736
+ if (customisations.inline) {
1737
+ style.verticalAlign = '-0.125em';
1738
+ }
1739
+ if (mode === 'svg') {
1740
+ // Add style
1741
+ componentProps.style = {
1742
+ ...style,
1743
+ ...customStyle,
1744
+ };
1745
+ // Add icon stuff
1746
+ Object.assign(componentProps, renderAttribs);
1747
+ // Counter for ids based on "id" property to render icons consistently on server and client
1748
+ let localCounter = 0;
1749
+ let id = props.id;
1750
+ if (typeof id === 'string') {
1751
+ // Convert '-' to '_' to avoid errors in animations
1752
+ id = id.replace(/-/g, '_');
1753
+ }
1754
+ // Add innerHTML and style to props
1755
+ componentProps['innerHTML'] = replaceIDs(item.body, id ? () => id + 'ID' + localCounter++ : 'iconifyVue');
1756
+ // Render icon
1757
+ return h('svg', componentProps);
1758
+ }
1759
+ // Render <span> with style
1760
+ const { body, width, height } = icon;
1761
+ const useMask = mode === 'mask' ||
1762
+ (mode === 'bg' ? false : body.indexOf('currentColor') !== -1);
1763
+ // Generate SVG
1764
+ const html = iconToHTML(body, {
1765
+ ...renderAttribs,
1766
+ width: width + '',
1767
+ height: height + '',
1768
+ });
1769
+ // Generate style
1770
+ componentProps.style = {
1771
+ ...style,
1772
+ '--svg': svgToURL(html),
1773
+ 'width': fixSize(renderAttribs.width),
1774
+ 'height': fixSize(renderAttribs.height),
1775
+ ...commonProps,
1776
+ ...(useMask ? monotoneProps : coloredProps),
1777
+ ...customStyle,
1778
+ };
1779
+ return h('span', componentProps);
1780
+ };
1781
+
1782
+ /**
1783
+ * Enable cache
1784
+ */
1785
+ function enableCache(storage) {
1786
+ toggleBrowserCache(storage, true);
1787
+ }
1788
+ /**
1789
+ * Disable cache
1790
+ */
1791
+ function disableCache(storage) {
1792
+ toggleBrowserCache(storage, false);
1793
+ }
1794
+ /**
1795
+ * Initialise stuff
1796
+ */
1797
+ // Enable short names
1798
+ allowSimpleNames(true);
1799
+ // Set API module
1800
+ setAPIModule('', fetchAPIModule);
1801
+ /**
1802
+ * Browser stuff
1803
+ */
1804
+ if (typeof document !== 'undefined' && typeof window !== 'undefined') {
1805
+ // Set cache and load existing cache
1806
+ initBrowserStorage();
1807
+ const _window = window;
1808
+ // Load icons from global "IconifyPreload"
1809
+ if (_window.IconifyPreload !== void 0) {
1810
+ const preload = _window.IconifyPreload;
1811
+ const err = 'Invalid IconifyPreload syntax.';
1812
+ if (typeof preload === 'object' && preload !== null) {
1813
+ (preload instanceof Array ? preload : [preload]).forEach((item) => {
1814
+ try {
1815
+ if (
1816
+ // Check if item is an object and not null/array
1817
+ typeof item !== 'object' ||
1818
+ item === null ||
1819
+ item instanceof Array ||
1820
+ // Check for 'icons' and 'prefix'
1821
+ typeof item.icons !== 'object' ||
1822
+ typeof item.prefix !== 'string' ||
1823
+ // Add icon set
1824
+ !addCollection(item)) {
1825
+ console.error(err);
1826
+ }
1827
+ }
1828
+ catch (e) {
1829
+ console.error(err);
1830
+ }
1831
+ });
1832
+ }
1833
+ }
1834
+ // Set API from global "IconifyProviders"
1835
+ if (_window.IconifyProviders !== void 0) {
1836
+ const providers = _window.IconifyProviders;
1837
+ if (typeof providers === 'object' && providers !== null) {
1838
+ for (let key in providers) {
1839
+ const err = 'IconifyProviders[' + key + '] is invalid.';
1840
+ try {
1841
+ const value = providers[key];
1842
+ if (typeof value !== 'object' ||
1843
+ !value ||
1844
+ value.resources === void 0) {
1845
+ continue;
1846
+ }
1847
+ if (!addAPIProvider(key, value)) {
1848
+ console.error(err);
1849
+ }
1850
+ }
1851
+ catch (e) {
1852
+ console.error(err);
1853
+ }
1854
+ }
1855
+ }
1856
+ }
1857
+ }
1858
+ /**
1859
+ * Empty icon data, rendered when icon is not available
1860
+ */
1861
+ const emptyIcon = {
1862
+ ...defaultIconProps,
1863
+ body: '',
1864
+ };
1865
+ const Icon = defineComponent({
1866
+ // Do not inherit other attributes: it is handled by render()
1867
+ inheritAttrs: false,
1868
+ // Set initial data
1869
+ data() {
1870
+ return {
1871
+ // Current icon name
1872
+ _name: '',
1873
+ // Loading
1874
+ _loadingIcon: null,
1875
+ // Mounted status
1876
+ iconMounted: false,
1877
+ // Callback counter to trigger re-render
1878
+ counter: 0,
1879
+ };
1880
+ },
1881
+ mounted() {
1882
+ // Mark as mounted
1883
+ this.iconMounted = true;
1884
+ },
1885
+ unmounted() {
1886
+ this.abortLoading();
1887
+ },
1888
+ methods: {
1889
+ abortLoading() {
1890
+ if (this._loadingIcon) {
1891
+ this._loadingIcon.abort();
1892
+ this._loadingIcon = null;
1893
+ }
1894
+ },
1895
+ // Get data for icon to render or null
1896
+ getIcon(icon, onload) {
1897
+ // Icon is an object
1898
+ if (typeof icon === 'object' &&
1899
+ icon !== null &&
1900
+ typeof icon.body === 'string') {
1901
+ // Stop loading
1902
+ this._name = '';
1903
+ this.abortLoading();
1904
+ return {
1905
+ data: icon,
1906
+ };
1907
+ }
1908
+ // Invalid icon?
1909
+ let iconName;
1910
+ if (typeof icon !== 'string' ||
1911
+ (iconName = stringToIcon(icon, false, true)) === null) {
1912
+ this.abortLoading();
1913
+ return null;
1914
+ }
1915
+ // Load icon
1916
+ const data = getIconData(iconName);
1917
+ if (!data) {
1918
+ // Icon data is not available
1919
+ if (!this._loadingIcon || this._loadingIcon.name !== icon) {
1920
+ // New icon to load
1921
+ this.abortLoading();
1922
+ this._name = '';
1923
+ if (data !== null) {
1924
+ // Icon was not loaded
1925
+ this._loadingIcon = {
1926
+ name: icon,
1927
+ abort: loadIcons([iconName], () => {
1928
+ this.counter++;
1929
+ }),
1930
+ };
1931
+ }
1932
+ }
1933
+ return null;
1934
+ }
1935
+ // Icon data is available
1936
+ this.abortLoading();
1937
+ if (this._name !== icon) {
1938
+ this._name = icon;
1939
+ if (onload) {
1940
+ onload(icon);
1941
+ }
1942
+ }
1943
+ // Add classes
1944
+ const classes = ['iconify'];
1945
+ if (iconName.prefix !== '') {
1946
+ classes.push('iconify--' + iconName.prefix);
1947
+ }
1948
+ if (iconName.provider !== '') {
1949
+ classes.push('iconify--' + iconName.provider);
1950
+ }
1951
+ return { data, classes };
1952
+ },
1953
+ },
1954
+ // Render icon
1955
+ render() {
1956
+ // Re-render when counter changes
1957
+ this.counter;
1958
+ const props = this.$attrs;
1959
+ // Get icon data
1960
+ const icon = (this.iconMounted || props.ssr)
1961
+ ? this.getIcon(props.icon, props.onLoad)
1962
+ : null;
1963
+ // Validate icon object
1964
+ if (!icon) {
1965
+ return render(emptyIcon, props);
1966
+ }
1967
+ // Add classes
1968
+ let newProps = props;
1969
+ if (icon.classes) {
1970
+ newProps = {
1971
+ ...props,
1972
+ class: (typeof props['class'] === 'string'
1973
+ ? props['class'] + ' '
1974
+ : '') + icon.classes.join(' '),
1975
+ };
1976
+ }
1977
+ // Render icon
1978
+ return render({
1979
+ ...defaultIconProps,
1980
+ ...icon.data,
1981
+ }, newProps);
1982
+ },
1983
+ });
1984
+ /**
1985
+ * Internal API
1986
+ */
1987
+ const _api = {
1988
+ getAPIConfig,
1989
+ setAPIModule,
1990
+ sendAPIQuery,
1991
+ setFetch,
1992
+ getFetch,
1993
+ listAPIProviders,
1994
+ };
1995
+
1996
+ export { Icon, _api, addAPIProvider, addCollection, addIcon, iconToSVG as buildIcon, calculateSize, disableCache, enableCache, getIcon, iconLoaded as iconExists, iconLoaded, listIcons, loadIcon, loadIcons, replaceIDs };