@wordpress/preferences-persistence 3.0.0 → 3.2.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 (82) hide show
  1. package/build/create/debounce-async.cjs +54 -58
  2. package/build/create/debounce-async.cjs.map +1 -7
  3. package/build/create/index.cjs +73 -79
  4. package/build/create/index.cjs.map +1 -7
  5. package/build/get-newest-data.cjs +50 -39
  6. package/build/get-newest-data.cjs.map +1 -7
  7. package/build/index.cjs +50 -43
  8. package/build/index.cjs.map +1 -7
  9. package/build/is-preferences-data.cjs +16 -25
  10. package/build/is-preferences-data.cjs.map +1 -7
  11. package/build/local-storage.cjs +33 -40
  12. package/build/local-storage.cjs.map +1 -7
  13. package/build/migrations/legacy-local-storage-data/convert-edit-post-panels.cjs +48 -38
  14. package/build/migrations/legacy-local-storage-data/convert-edit-post-panels.cjs.map +1 -7
  15. package/build/migrations/legacy-local-storage-data/index.cjs +93 -83
  16. package/build/migrations/legacy-local-storage-data/index.cjs.map +1 -7
  17. package/build/migrations/legacy-local-storage-data/move-feature-preferences.cjs +105 -77
  18. package/build/migrations/legacy-local-storage-data/move-feature-preferences.cjs.map +1 -7
  19. package/build/migrations/legacy-local-storage-data/move-individual-preference.cjs +69 -58
  20. package/build/migrations/legacy-local-storage-data/move-individual-preference.cjs.map +1 -7
  21. package/build/migrations/legacy-local-storage-data/move-interface-enable-items.cjs +92 -75
  22. package/build/migrations/legacy-local-storage-data/move-interface-enable-items.cjs.map +1 -7
  23. package/build/migrations/legacy-local-storage-data/move-third-party-feature-preferences.cjs +76 -65
  24. package/build/migrations/legacy-local-storage-data/move-third-party-feature-preferences.cjs.map +1 -7
  25. package/build/migrations/legacy-local-storage-data/types.cjs +4 -18
  26. package/build/migrations/preferences-package-data/convert-complementary-areas.cjs +18 -38
  27. package/build/migrations/preferences-package-data/convert-complementary-areas.cjs.map +1 -7
  28. package/build/migrations/preferences-package-data/convert-editor-settings.cjs +58 -72
  29. package/build/migrations/preferences-package-data/convert-editor-settings.cjs.map +1 -7
  30. package/build/migrations/preferences-package-data/index.cjs +27 -31
  31. package/build/migrations/preferences-package-data/index.cjs.map +1 -7
  32. package/build/types.cjs +4 -18
  33. package/build-module/create/debounce-async.mjs +50 -38
  34. package/build-module/create/debounce-async.mjs.map +1 -7
  35. package/build-module/create/index.mjs +48 -53
  36. package/build-module/create/index.mjs.map +1 -7
  37. package/build-module/get-newest-data.mjs +29 -15
  38. package/build-module/get-newest-data.mjs.map +1 -7
  39. package/build-module/index.mjs +23 -15
  40. package/build-module/index.mjs.map +1 -7
  41. package/build-module/is-preferences-data.mjs +12 -5
  42. package/build-module/is-preferences-data.mjs.map +1 -7
  43. package/build-module/local-storage.mjs +28 -15
  44. package/build-module/local-storage.mjs.map +1 -7
  45. package/build-module/migrations/legacy-local-storage-data/convert-edit-post-panels.mjs +44 -18
  46. package/build-module/migrations/legacy-local-storage-data/convert-edit-post-panels.mjs.map +1 -7
  47. package/build-module/migrations/legacy-local-storage-data/index.mjs +63 -51
  48. package/build-module/migrations/legacy-local-storage-data/index.mjs.map +1 -7
  49. package/build-module/migrations/legacy-local-storage-data/move-feature-preferences.mjs +101 -57
  50. package/build-module/migrations/legacy-local-storage-data/move-feature-preferences.mjs.map +1 -7
  51. package/build-module/migrations/legacy-local-storage-data/move-individual-preference.mjs +65 -38
  52. package/build-module/migrations/legacy-local-storage-data/move-individual-preference.mjs.map +1 -7
  53. package/build-module/migrations/legacy-local-storage-data/move-interface-enable-items.mjs +88 -55
  54. package/build-module/migrations/legacy-local-storage-data/move-interface-enable-items.mjs.map +1 -7
  55. package/build-module/migrations/legacy-local-storage-data/move-third-party-feature-preferences.mjs +72 -45
  56. package/build-module/migrations/legacy-local-storage-data/move-third-party-feature-preferences.mjs.map +1 -7
  57. package/build-module/migrations/legacy-local-storage-data/types.mjs +0 -1
  58. package/build-module/migrations/preferences-package-data/convert-complementary-areas.mjs +14 -18
  59. package/build-module/migrations/preferences-package-data/convert-complementary-areas.mjs.map +1 -7
  60. package/build-module/migrations/preferences-package-data/convert-editor-settings.mjs +40 -50
  61. package/build-module/migrations/preferences-package-data/convert-editor-settings.mjs.map +1 -7
  62. package/build-module/migrations/preferences-package-data/index.mjs +7 -8
  63. package/build-module/migrations/preferences-package-data/index.mjs.map +1 -7
  64. package/build-module/types.mjs +0 -1
  65. package/package.json +5 -4
  66. package/src/create/test/{debounce-async.js → debounce-async.ts} +7 -3
  67. package/src/create/test/{index.jsdom.test.js → index.jsdom.test.ts} +8 -5
  68. package/src/migrations/legacy-local-storage-data/test/{index.js → index.ts} +6 -1
  69. package/src/migrations/preferences-package-data/test/{convert-editor-settings.js → convert-editor-settings.ts} +3 -0
  70. package/src/test/{index.jsdom.test.js → index.jsdom.test.ts} +6 -4
  71. package/build/migrations/legacy-local-storage-data/types.cjs.map +0 -7
  72. package/build/types.cjs.map +0 -7
  73. package/build-module/migrations/legacy-local-storage-data/types.mjs.map +0 -7
  74. package/build-module/types.mjs.map +0 -7
  75. /package/src/migrations/legacy-local-storage-data/test/{convert-edit-post-panels.js → convert-edit-post-panels.ts} +0 -0
  76. /package/src/migrations/legacy-local-storage-data/test/{move-feature-preferences.js → move-feature-preferences.ts} +0 -0
  77. /package/src/migrations/legacy-local-storage-data/test/{move-individual-preference.js → move-individual-preference.ts} +0 -0
  78. /package/src/migrations/legacy-local-storage-data/test/{move-interface-enable-items.js → move-interface-enable-items.ts} +0 -0
  79. /package/src/migrations/legacy-local-storage-data/test/{move-third-party-feature-preferences.js → move-third-party-feature-preferences.ts} +0 -0
  80. /package/src/migrations/preferences-package-data/test/{convert-complementary-areas.js → convert-complementary-areas.ts} +0 -0
  81. /package/src/migrations/preferences-package-data/test/{index.js → index.ts} +0 -0
  82. /package/src/test/{local-storage.jsdom.test.js → local-storage.jsdom.test.ts} +0 -0
@@ -1,29 +1,20 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // packages/preferences-persistence/src/is-preferences-data.ts
21
- var is_preferences_data_exports = {};
22
- __export(is_preferences_data_exports, {
23
- default: () => isPreferencesData
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
24
5
  });
25
- module.exports = __toCommonJS(is_preferences_data_exports);
6
+ // packages/preferences-persistence/src/is-preferences-data.ts
7
+ /**
8
+ * Checks whether persisted data is a preferences object. Empty user meta
9
+ * reaches the client as `[]` or `''`, which must not be used as preferences.
10
+ *
11
+ * @param data The persisted data.
12
+ *
13
+ * @return Whether the data is a preferences object.
14
+ */
26
15
  function isPreferencesData(data) {
27
- return !!data && typeof data === "object" && !Array.isArray(data);
16
+ return !!data && typeof data === "object" && !Array.isArray(data);
28
17
  }
29
- //# sourceMappingURL=is-preferences-data.cjs.map
18
+ exports.default = isPreferencesData;
19
+
20
+ //# sourceMappingURL=is-preferences-data.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/is-preferences-data.ts"],
4
- "sourcesContent": ["import type { PreferencesData } from './types';\n\n/**\n * Checks whether persisted data is a preferences object. Empty user meta\n * reaches the client as `[]` or `''`, which must not be used as preferences.\n *\n * @param data The persisted data.\n *\n * @return Whether the data is a preferences object.\n */\nexport default function isPreferencesData(\n\tdata: unknown\n): data is PreferencesData {\n\treturn !! data && typeof data === 'object' && ! Array.isArray( data );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAUe,SAAR,kBACN,MAC0B;AAC1B,SAAO,CAAC,CAAE,QAAQ,OAAO,SAAS,YAAY,CAAE,MAAM,QAAS,IAAK;AACrE;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"is-preferences-data.cjs","names":[],"sources":["../src/is-preferences-data.ts"],"sourcesContent":["import type { PreferencesData } from './types';\n\n/**\n * Checks whether persisted data is a preferences object. Empty user meta\n * reaches the client as `[]` or `''`, which must not be used as preferences.\n *\n * @param data The persisted data.\n *\n * @return Whether the data is a preferences object.\n */\nexport default function isPreferencesData(\n\tdata: unknown\n): data is PreferencesData {\n\treturn !! data && typeof data === 'object' && ! Array.isArray( data );\n}\n"],"mappings":";;;;;;;;;;;;;;AAUA,SAAwB,kBACvB,MAC0B;CAC1B,OAAO,CAAC,CAAE,QAAQ,OAAO,SAAS,YAAY,CAAE,MAAM,QAAS,IAAK;AACrE"}
@@ -1,46 +1,39 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // packages/preferences-persistence/src/local-storage.ts
21
- var local_storage_exports = {};
22
- __export(local_storage_exports, {
23
- readStoredJSON: () => readStoredJSON,
24
- writeStoredJSON: () => writeStoredJSON
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
25
5
  });
26
- module.exports = __toCommonJS(local_storage_exports);
6
+ // packages/preferences-persistence/src/local-storage.ts
7
+ /**
8
+ * Reads and parses a JSON value from local storage.
9
+ *
10
+ * @param key The local storage key.
11
+ *
12
+ * @return The parsed value, or `null` when the value is missing or invalid,
13
+ * or local storage is unavailable.
14
+ */
27
15
  function readStoredJSON(key) {
28
- try {
29
- const value = window.localStorage.getItem(key);
30
- return value === null ? null : JSON.parse(value);
31
- } catch {
32
- return null;
33
- }
16
+ try {
17
+ const value = window.localStorage.getItem(key);
18
+ return value === null ? null : JSON.parse(value);
19
+ } catch {
20
+ return null;
21
+ }
34
22
  }
23
+ /**
24
+ * Stores a value in local storage as JSON.
25
+ *
26
+ * Failures, such as blocked storage or an exceeded quota, are ignored.
27
+ *
28
+ * @param key The local storage key.
29
+ * @param value The value to store.
30
+ */
35
31
  function writeStoredJSON(key, value) {
36
- try {
37
- window.localStorage.setItem(key, JSON.stringify(value));
38
- } catch {
39
- }
32
+ try {
33
+ window.localStorage.setItem(key, JSON.stringify(value));
34
+ } catch {}
40
35
  }
41
- // Annotate the CommonJS export names for ESM import in node:
42
- 0 && (module.exports = {
43
- readStoredJSON,
44
- writeStoredJSON
45
- });
46
- //# sourceMappingURL=local-storage.cjs.map
36
+ exports.readStoredJSON = readStoredJSON;
37
+ exports.writeStoredJSON = writeStoredJSON;
38
+
39
+ //# sourceMappingURL=local-storage.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/local-storage.ts"],
4
- "sourcesContent": ["/**\n * Reads and parses a JSON value from local storage.\n *\n * @param key The local storage key.\n *\n * @return The parsed value, or `null` when the value is missing or invalid,\n * or local storage is unavailable.\n */\nexport function readStoredJSON( key: string ): unknown {\n\ttry {\n\t\tconst value = window.localStorage.getItem( key );\n\t\treturn value === null ? null : JSON.parse( value );\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/**\n * Stores a value in local storage as JSON.\n *\n * Failures, such as blocked storage or an exceeded quota, are ignored.\n *\n * @param key The local storage key.\n * @param value The value to store.\n */\nexport function writeStoredJSON( key: string, value: unknown ) {\n\ttry {\n\t\twindow.localStorage.setItem( key, JSON.stringify( value ) );\n\t} catch {}\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,SAAS,eAAgB,KAAuB;AACtD,MAAI;AACH,UAAM,QAAQ,OAAO,aAAa,QAAS,GAAI;AAC/C,WAAO,UAAU,OAAO,OAAO,KAAK,MAAO,KAAM;AAAA,EAClD,QAAQ;AACP,WAAO;AAAA,EACR;AACD;AAUO,SAAS,gBAAiB,KAAa,OAAiB;AAC9D,MAAI;AACH,WAAO,aAAa,QAAS,KAAK,KAAK,UAAW,KAAM,CAAE;AAAA,EAC3D,QAAQ;AAAA,EAAC;AACV;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"local-storage.cjs","names":[],"sources":["../src/local-storage.ts"],"sourcesContent":["/**\n * Reads and parses a JSON value from local storage.\n *\n * @param key The local storage key.\n *\n * @return The parsed value, or `null` when the value is missing or invalid,\n * or local storage is unavailable.\n */\nexport function readStoredJSON( key: string ): unknown {\n\ttry {\n\t\tconst value = window.localStorage.getItem( key );\n\t\treturn value === null ? null : JSON.parse( value );\n\t} catch {\n\t\treturn null;\n\t}\n}\n\n/**\n * Stores a value in local storage as JSON.\n *\n * Failures, such as blocked storage or an exceeded quota, are ignored.\n *\n * @param key The local storage key.\n * @param value The value to store.\n */\nexport function writeStoredJSON( key: string, value: unknown ) {\n\ttry {\n\t\twindow.localStorage.setItem( key, JSON.stringify( value ) );\n\t} catch {}\n}\n"],"mappings":";;;;;;;;;;;;;;AAQA,SAAgB,eAAgB,KAAuB;CACtD,IAAI;EACH,MAAM,QAAQ,OAAO,aAAa,QAAS,GAAI;EAC/C,OAAO,UAAU,OAAO,OAAO,KAAK,MAAO,KAAM;CAClD,QAAQ;EACP,OAAO;CACR;AACD;;;;;;;;;AAUA,SAAgB,gBAAiB,KAAa,OAAiB;CAC9D,IAAI;EACH,OAAO,aAAa,QAAS,KAAK,KAAK,UAAW,KAAM,CAAE;CAC3D,QAAQ,CAAC;AACV"}
@@ -1,42 +1,52 @@
1
1
  "use strict";
2
- var __defProp = Object.defineProperty;
3
- var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
- var __getOwnPropNames = Object.getOwnPropertyNames;
5
- var __hasOwnProp = Object.prototype.hasOwnProperty;
6
- var __export = (target, all) => {
7
- for (var name in all)
8
- __defProp(target, name, { get: all[name], enumerable: true });
9
- };
10
- var __copyProps = (to, from, except, desc) => {
11
- if (from && typeof from === "object" || typeof from === "function") {
12
- for (let key of __getOwnPropNames(from))
13
- if (!__hasOwnProp.call(to, key) && key !== except)
14
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
15
- }
16
- return to;
17
- };
18
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
-
20
- // packages/preferences-persistence/src/migrations/legacy-local-storage-data/convert-edit-post-panels.ts
21
- var convert_edit_post_panels_exports = {};
22
- __export(convert_edit_post_panels_exports, {
23
- default: () => convertEditPostPanels
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
24
5
  });
25
- module.exports = __toCommonJS(convert_edit_post_panels_exports);
6
+ // packages/preferences-persistence/src/migrations/legacy-local-storage-data/convert-edit-post-panels.ts
7
+ /**
8
+ * Convert the post editor's panels state from:
9
+ * ```
10
+ * {
11
+ * panels: {
12
+ * tags: {
13
+ * enabled: true,
14
+ * opened: true,
15
+ * },
16
+ * permalinks: {
17
+ * enabled: false,
18
+ * opened: false,
19
+ * },
20
+ * },
21
+ * }
22
+ * ```
23
+ *
24
+ * to a new, more concise data structure:
25
+ * {
26
+ * inactivePanels: [
27
+ * 'permalinks',
28
+ * ],
29
+ * openPanels: [
30
+ * 'tags',
31
+ * ],
32
+ * }
33
+ *
34
+ * @param preferences A preferences object.
35
+ *
36
+ * @return The converted data.
37
+ */
26
38
  function convertEditPostPanels(preferences) {
27
- const panels = preferences?.panels ?? {};
28
- return Object.keys(panels).reduce(
29
- (convertedData, panelName) => {
30
- const panel = panels[panelName];
31
- if (panel?.enabled === false) {
32
- convertedData.inactivePanels.push(panelName);
33
- }
34
- if (panel?.opened === true) {
35
- convertedData.openPanels.push(panelName);
36
- }
37
- return convertedData;
38
- },
39
- { inactivePanels: [], openPanels: [] }
40
- );
39
+ const panels = preferences?.panels ?? {};
40
+ return Object.keys(panels).reduce((convertedData, panelName) => {
41
+ const panel = panels[panelName];
42
+ if (panel?.enabled === false) convertedData.inactivePanels.push(panelName);
43
+ if (panel?.opened === true) convertedData.openPanels.push(panelName);
44
+ return convertedData;
45
+ }, {
46
+ inactivePanels: [],
47
+ openPanels: []
48
+ });
41
49
  }
42
- //# sourceMappingURL=convert-edit-post-panels.cjs.map
50
+ exports.default = convertEditPostPanels;
51
+
52
+ //# sourceMappingURL=convert-edit-post-panels.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/migrations/legacy-local-storage-data/convert-edit-post-panels.ts"],
4
- "sourcesContent": ["import type { ScopePreferences } from '../../types';\nimport type { EditPostPanels, LegacyEditPostPanel } from './types';\n\n/**\n * Convert the post editor's panels state from:\n * ```\n * {\n * panels: {\n * tags: {\n * enabled: true,\n * opened: true,\n * },\n * permalinks: {\n * enabled: false,\n * opened: false,\n * },\n * },\n * }\n * ```\n *\n * to a new, more concise data structure:\n * {\n * inactivePanels: [\n * 'permalinks',\n * ],\n * openPanels: [\n * 'tags',\n * ],\n * }\n *\n * @param preferences A preferences object.\n *\n * @return The converted data.\n */\nexport default function convertEditPostPanels(\n\tpreferences: ScopePreferences\n): EditPostPanels {\n\tconst panels = ( preferences?.panels ?? {} ) as Record<\n\t\tstring,\n\t\tLegacyEditPostPanel | undefined\n\t>;\n\treturn Object.keys( panels ).reduce< EditPostPanels >(\n\t\t( convertedData, panelName ) => {\n\t\t\tconst panel = panels[ panelName ];\n\n\t\t\tif ( panel?.enabled === false ) {\n\t\t\t\tconvertedData.inactivePanels.push( panelName );\n\t\t\t}\n\n\t\t\tif ( panel?.opened === true ) {\n\t\t\t\tconvertedData.openPanels.push( panelName );\n\t\t\t}\n\n\t\t\treturn convertedData;\n\t\t},\n\t\t{ inactivePanels: [], openPanels: [] }\n\t);\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAkCe,SAAR,sBACN,aACiB;AACjB,QAAM,SAAW,aAAa,UAAU,CAAC;AAIzC,SAAO,OAAO,KAAM,MAAO,EAAE;AAAA,IAC5B,CAAE,eAAe,cAAe;AAC/B,YAAM,QAAQ,OAAQ,SAAU;AAEhC,UAAK,OAAO,YAAY,OAAQ;AAC/B,sBAAc,eAAe,KAAM,SAAU;AAAA,MAC9C;AAEA,UAAK,OAAO,WAAW,MAAO;AAC7B,sBAAc,WAAW,KAAM,SAAU;AAAA,MAC1C;AAEA,aAAO;AAAA,IACR;AAAA,IACA,EAAE,gBAAgB,CAAC,GAAG,YAAY,CAAC,EAAE;AAAA,EACtC;AACD;",
6
- "names": []
7
- }
1
+ {"version":3,"file":"convert-edit-post-panels.cjs","names":[],"sources":["../../../src/migrations/legacy-local-storage-data/convert-edit-post-panels.ts"],"sourcesContent":["import type { ScopePreferences } from '../../types';\nimport type { EditPostPanels, LegacyEditPostPanel } from './types';\n\n/**\n * Convert the post editor's panels state from:\n * ```\n * {\n * panels: {\n * tags: {\n * enabled: true,\n * opened: true,\n * },\n * permalinks: {\n * enabled: false,\n * opened: false,\n * },\n * },\n * }\n * ```\n *\n * to a new, more concise data structure:\n * {\n * inactivePanels: [\n * 'permalinks',\n * ],\n * openPanels: [\n * 'tags',\n * ],\n * }\n *\n * @param preferences A preferences object.\n *\n * @return The converted data.\n */\nexport default function convertEditPostPanels(\n\tpreferences: ScopePreferences\n): EditPostPanels {\n\tconst panels = ( preferences?.panels ?? {} ) as Record<\n\t\tstring,\n\t\tLegacyEditPostPanel | undefined\n\t>;\n\treturn Object.keys( panels ).reduce< EditPostPanels >(\n\t\t( convertedData, panelName ) => {\n\t\t\tconst panel = panels[ panelName ];\n\n\t\t\tif ( panel?.enabled === false ) {\n\t\t\t\tconvertedData.inactivePanels.push( panelName );\n\t\t\t}\n\n\t\t\tif ( panel?.opened === true ) {\n\t\t\t\tconvertedData.openPanels.push( panelName );\n\t\t\t}\n\n\t\t\treturn convertedData;\n\t\t},\n\t\t{ inactivePanels: [], openPanels: [] }\n\t);\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAkCA,SAAwB,sBACvB,aACiB;CACjB,MAAM,SAAW,aAAa,UAAU,CAAC;CAIzC,OAAO,OAAO,KAAM,MAAO,CAAC,CAAC,QAC1B,eAAe,cAAe;EAC/B,MAAM,QAAQ,OAAQ;EAEtB,IAAK,OAAO,YAAY,OACvB,cAAc,eAAe,KAAM,SAAU;EAG9C,IAAK,OAAO,WAAW,MACtB,cAAc,WAAW,KAAM,SAAU;EAG1C,OAAO;CACR,GACA;EAAE,gBAAgB,CAAC;EAAG,YAAY,CAAC;CAAE,CACtC;AACD"}
@@ -1,99 +1,109 @@
1
1
  "use strict";
2
+ Object.defineProperties(exports, {
3
+ __esModule: { value: true },
4
+ [Symbol.toStringTag]: { value: "Module" }
5
+ });
6
+ // \0rolldown/runtime.js
2
7
  var __create = Object.create;
3
8
  var __defProp = Object.defineProperty;
4
9
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
10
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
11
  var __getProtoOf = Object.getPrototypeOf;
7
12
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
- var __export = (target, all) => {
9
- for (var name in all)
10
- __defProp(target, name, { get: all[name], enumerable: true });
11
- };
12
13
  var __copyProps = (to, from, except, desc) => {
13
- if (from && typeof from === "object" || typeof from === "function") {
14
- for (let key of __getOwnPropNames(from))
15
- if (!__hasOwnProp.call(to, key) && key !== except)
16
- __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
- }
18
- return to;
14
+ if (from && typeof from === "object" || typeof from === "function") for (var keys = __getOwnPropNames(from), i = 0, n = keys.length, key; i < n; i++) {
15
+ key = keys[i];
16
+ if (!__hasOwnProp.call(to, key) && key !== except) __defProp(to, key, {
17
+ get: ((k) => from[k]).bind(null, key),
18
+ enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
19
+ });
20
+ }
21
+ return to;
19
22
  };
20
- var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
- // If the importer is in node compatibility mode or this is not an ESM
22
- // file that has been converted to a CommonJS file using a Babel-
23
- // compatible transform (i.e. "__esModule" has not been set), then set
24
- // "default" to the CommonJS "module.exports" for node compatibility.
25
- isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
- mod
27
- ));
28
- var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
-
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", {
24
+ value: mod,
25
+ enumerable: true
26
+ }) : target, mod));
27
+ let __move_feature_preferences_ts = require("./move-feature-preferences.cjs");
28
+ __move_feature_preferences_ts = __toESM(__move_feature_preferences_ts);
29
+ let __move_third_party_feature_preferences_ts = require("./move-third-party-feature-preferences.cjs");
30
+ __move_third_party_feature_preferences_ts = __toESM(__move_third_party_feature_preferences_ts);
31
+ let __move_individual_preference_ts = require("./move-individual-preference.cjs");
32
+ __move_individual_preference_ts = __toESM(__move_individual_preference_ts);
33
+ let __move_interface_enable_items_ts = require("./move-interface-enable-items.cjs");
34
+ __move_interface_enable_items_ts = __toESM(__move_interface_enable_items_ts);
35
+ let __convert_edit_post_panels_ts = require("./convert-edit-post-panels.cjs");
36
+ __convert_edit_post_panels_ts = __toESM(__convert_edit_post_panels_ts);
37
+ let ______is_preferences_data_ts = require("../../is-preferences-data.cjs");
38
+ ______is_preferences_data_ts = __toESM(______is_preferences_data_ts);
39
+ let ______local_storage_ts = require("../../local-storage.cjs");
30
40
  // packages/preferences-persistence/src/migrations/legacy-local-storage-data/index.ts
31
- var legacy_local_storage_data_exports = {};
32
- __export(legacy_local_storage_data_exports, {
33
- convertLegacyData: () => convertLegacyData,
34
- default: () => convertLegacyLocalStorageData
35
- });
36
- module.exports = __toCommonJS(legacy_local_storage_data_exports);
37
- var import_move_feature_preferences = __toESM(require("./move-feature-preferences.cjs"));
38
- var import_move_third_party_feature_preferences = __toESM(require("./move-third-party-feature-preferences.cjs"));
39
- var import_move_individual_preference = __toESM(require("./move-individual-preference.cjs"));
40
- var import_move_interface_enable_items = __toESM(require("./move-interface-enable-items.cjs"));
41
- var import_convert_edit_post_panels = __toESM(require("./convert-edit-post-panels.cjs"));
42
- var import_is_preferences_data = __toESM(require("../../is-preferences-data.cjs"));
43
- var import_local_storage = require("../../local-storage.cjs");
41
+ /**
42
+ * Gets the legacy local storage data for a given user.
43
+ *
44
+ * @param userId The user id.
45
+ *
46
+ * @return The local storage data.
47
+ */
44
48
  function getLegacyData(userId) {
45
- return (0, import_local_storage.readStoredJSON)(`WP_DATA_USER_${userId}`);
49
+ return (0, ______local_storage_ts.readStoredJSON)(`WP_DATA_USER_${userId}`);
46
50
  }
51
+ /**
52
+ * Converts data from the old `@wordpress/data` package format.
53
+ *
54
+ * @param data The legacy data in its original format.
55
+ *
56
+ * @return The converted data or `undefined` if there was
57
+ * nothing to convert.
58
+ */
47
59
  function convertLegacyData(data) {
48
- if (!data) {
49
- return;
50
- }
51
- data = (0, import_move_feature_preferences.default)(data, "core/edit-widgets");
52
- data = (0, import_move_feature_preferences.default)(data, "core/customize-widgets");
53
- data = (0, import_move_feature_preferences.default)(data, "core/edit-post");
54
- data = (0, import_move_feature_preferences.default)(data, "core/edit-site");
55
- data = (0, import_move_third_party_feature_preferences.default)(data);
56
- data = (0, import_move_interface_enable_items.default)(data);
57
- data = (0, import_move_individual_preference.default)(
58
- data,
59
- { from: "core/edit-post", to: "core/edit-post" },
60
- "hiddenBlockTypes"
61
- );
62
- data = (0, import_move_individual_preference.default)(
63
- data,
64
- { from: "core/edit-post", to: "core/edit-post" },
65
- "editorMode"
66
- );
67
- data = (0, import_move_individual_preference.default)(
68
- data,
69
- { from: "core/edit-post", to: "core/edit-post" },
70
- "panels",
71
- import_convert_edit_post_panels.default
72
- );
73
- data = (0, import_move_individual_preference.default)(
74
- data,
75
- { from: "core/editor", to: "core" },
76
- "isPublishSidebarEnabled"
77
- );
78
- data = (0, import_move_individual_preference.default)(
79
- data,
80
- { from: "core/edit-post", to: "core" },
81
- "isPublishSidebarEnabled"
82
- );
83
- data = (0, import_move_individual_preference.default)(
84
- data,
85
- { from: "core/edit-site", to: "core/edit-site" },
86
- "editorMode"
87
- );
88
- const preferences = data?.["core/preferences"]?.preferences;
89
- return (0, import_is_preferences_data.default)(preferences) ? preferences : void 0;
60
+ if (!data) return;
61
+ data = (0, __move_feature_preferences_ts.default)(data, "core/edit-widgets");
62
+ data = (0, __move_feature_preferences_ts.default)(data, "core/customize-widgets");
63
+ data = (0, __move_feature_preferences_ts.default)(data, "core/edit-post");
64
+ data = (0, __move_feature_preferences_ts.default)(data, "core/edit-site");
65
+ data = (0, __move_third_party_feature_preferences_ts.default)(data);
66
+ data = (0, __move_interface_enable_items_ts.default)(data);
67
+ data = (0, __move_individual_preference_ts.default)(data, {
68
+ from: "core/edit-post",
69
+ to: "core/edit-post"
70
+ }, "hiddenBlockTypes");
71
+ data = (0, __move_individual_preference_ts.default)(data, {
72
+ from: "core/edit-post",
73
+ to: "core/edit-post"
74
+ }, "editorMode");
75
+ data = (0, __move_individual_preference_ts.default)(data, {
76
+ from: "core/edit-post",
77
+ to: "core/edit-post"
78
+ }, "panels", __convert_edit_post_panels_ts.default);
79
+ data = (0, __move_individual_preference_ts.default)(data, {
80
+ from: "core/editor",
81
+ to: "core"
82
+ }, "isPublishSidebarEnabled");
83
+ data = (0, __move_individual_preference_ts.default)(data, {
84
+ from: "core/edit-post",
85
+ to: "core"
86
+ }, "isPublishSidebarEnabled");
87
+ data = (0, __move_individual_preference_ts.default)(data, {
88
+ from: "core/edit-site",
89
+ to: "core/edit-site"
90
+ }, "editorMode");
91
+ const preferences = data?.["core/preferences"]?.preferences;
92
+ return (0, ______is_preferences_data_ts.default)(preferences) ? preferences : void 0;
90
93
  }
94
+ /**
95
+ * Gets the legacy local storage data for the given user and returns the
96
+ * data converted to the new format.
97
+ *
98
+ * @param userId The user id.
99
+ *
100
+ * @return The converted data or undefined if no local
101
+ * storage data could be found.
102
+ */
91
103
  function convertLegacyLocalStorageData(userId) {
92
- const data = getLegacyData(userId);
93
- return convertLegacyData(data);
104
+ return convertLegacyData(getLegacyData(userId));
94
105
  }
95
- // Annotate the CommonJS export names for ESM import in node:
96
- 0 && (module.exports = {
97
- convertLegacyData
98
- });
99
- //# sourceMappingURL=index.cjs.map
106
+ exports.convertLegacyData = convertLegacyData;
107
+ exports.default = convertLegacyLocalStorageData;
108
+
109
+ //# sourceMappingURL=index.cjs.map
@@ -1,7 +1 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../../src/migrations/legacy-local-storage-data/index.ts"],
4
- "sourcesContent": ["import moveFeaturePreferences from './move-feature-preferences';\nimport moveThirdPartyFeaturePreferences from './move-third-party-feature-preferences';\nimport moveIndividualPreference from './move-individual-preference';\nimport moveInterfaceEnableItems from './move-interface-enable-items';\nimport convertEditPostPanels from './convert-edit-post-panels';\nimport isPreferencesData from '../../is-preferences-data';\nimport { readStoredJSON } from '../../local-storage';\nimport type { ScopedPreferences } from '../../types';\nimport type { LegacyData } from './types';\n\n/**\n * Gets the legacy local storage data for a given user.\n *\n * @param userId The user id.\n *\n * @return The local storage data.\n */\nfunction getLegacyData( userId: string | number ): LegacyData | null {\n\treturn readStoredJSON( `WP_DATA_USER_${ userId }` ) as LegacyData | null;\n}\n\n/**\n * Converts data from the old `@wordpress/data` package format.\n *\n * @param data The legacy data in its original format.\n *\n * @return The converted data or `undefined` if there was\n * nothing to convert.\n */\nexport function convertLegacyData(\n\tdata: LegacyData | null | undefined\n): ScopedPreferences | undefined {\n\tif ( ! data ) {\n\t\treturn;\n\t}\n\n\t// Move boolean feature preferences from each editor into the\n\t// preferences store data structure.\n\tdata = moveFeaturePreferences( data, 'core/edit-widgets' );\n\tdata = moveFeaturePreferences( data, 'core/customize-widgets' );\n\tdata = moveFeaturePreferences( data, 'core/edit-post' );\n\tdata = moveFeaturePreferences( data, 'core/edit-site' );\n\n\t// Move third party boolean feature preferences from the interface package\n\t// to the preferences store data structure.\n\tdata = moveThirdPartyFeaturePreferences( data );\n\n\t// Move and convert the interface store's `enableItems` data into the\n\t// preferences data structure.\n\tdata = moveInterfaceEnableItems( data );\n\n\t// Move individual ad-hoc preferences from various packages into the\n\t// preferences store data structure.\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'hiddenBlockTypes'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'editorMode'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'panels',\n\t\tconvertEditPostPanels\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/editor', to: 'core' },\n\t\t'isPublishSidebarEnabled'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core' },\n\t\t'isPublishSidebarEnabled'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-site', to: 'core/edit-site' },\n\t\t'editorMode'\n\t);\n\n\t// The new system is only concerned with persisting\n\t// 'core/preferences' preferences reducer, so only return that.\n\tconst preferences = data?.[ 'core/preferences' ]?.preferences;\n\treturn isPreferencesData( preferences ) ? preferences : undefined;\n}\n\n/**\n * Gets the legacy local storage data for the given user and returns the\n * data converted to the new format.\n *\n * @param userId The user id.\n *\n * @return The converted data or undefined if no local\n * storage data could be found.\n */\nexport default function convertLegacyLocalStorageData(\n\tuserId: string | number\n): ScopedPreferences | undefined {\n\tconst data = getLegacyData( userId );\n\treturn convertLegacyData( data );\n}\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,sCAAmC;AACnC,kDAA6C;AAC7C,wCAAqC;AACrC,yCAAqC;AACrC,sCAAkC;AAClC,iCAA8B;AAC9B,2BAA+B;AAW/B,SAAS,cAAe,QAA6C;AACpE,aAAO,qCAAgB,gBAAiB,MAAO,EAAG;AACnD;AAUO,SAAS,kBACf,MACgC;AAChC,MAAK,CAAE,MAAO;AACb;AAAA,EACD;AAIA,aAAO,gCAAAA,SAAwB,MAAM,mBAAoB;AACzD,aAAO,gCAAAA,SAAwB,MAAM,wBAAyB;AAC9D,aAAO,gCAAAA,SAAwB,MAAM,gBAAiB;AACtD,aAAO,gCAAAA,SAAwB,MAAM,gBAAiB;AAItD,aAAO,4CAAAC,SAAkC,IAAK;AAI9C,aAAO,mCAAAC,SAA0B,IAAK;AAItC,aAAO,kCAAAC;AAAA,IACN;AAAA,IACA,EAAE,MAAM,kBAAkB,IAAI,iBAAiB;AAAA,IAC/C;AAAA,EACD;AACA,aAAO,kCAAAA;AAAA,IACN;AAAA,IACA,EAAE,MAAM,kBAAkB,IAAI,iBAAiB;AAAA,IAC/C;AAAA,EACD;AACA,aAAO,kCAAAA;AAAA,IACN;AAAA,IACA,EAAE,MAAM,kBAAkB,IAAI,iBAAiB;AAAA,IAC/C;AAAA,IACA,gCAAAC;AAAA,EACD;AACA,aAAO,kCAAAD;AAAA,IACN;AAAA,IACA,EAAE,MAAM,eAAe,IAAI,OAAO;AAAA,IAClC;AAAA,EACD;AACA,aAAO,kCAAAA;AAAA,IACN;AAAA,IACA,EAAE,MAAM,kBAAkB,IAAI,OAAO;AAAA,IACrC;AAAA,EACD;AACA,aAAO,kCAAAA;AAAA,IACN;AAAA,IACA,EAAE,MAAM,kBAAkB,IAAI,iBAAiB;AAAA,IAC/C;AAAA,EACD;AAIA,QAAM,cAAc,OAAQ,kBAAmB,GAAG;AAClD,aAAO,2BAAAE,SAAmB,WAAY,IAAI,cAAc;AACzD;AAWe,SAAR,8BACN,QACgC;AAChC,QAAM,OAAO,cAAe,MAAO;AACnC,SAAO,kBAAmB,IAAK;AAChC;",
6
- "names": ["moveFeaturePreferences", "moveThirdPartyFeaturePreferences", "moveInterfaceEnableItems", "moveIndividualPreference", "convertEditPostPanels", "isPreferencesData"]
7
- }
1
+ {"version":3,"file":"index.cjs","names":["readStoredJSON","moveFeaturePreferences","moveThirdPartyFeaturePreferences","moveInterfaceEnableItems","moveIndividualPreference","convertEditPostPanels","isPreferencesData"],"sources":["../../../src/migrations/legacy-local-storage-data/index.ts"],"sourcesContent":["import moveFeaturePreferences from './move-feature-preferences';\nimport moveThirdPartyFeaturePreferences from './move-third-party-feature-preferences';\nimport moveIndividualPreference from './move-individual-preference';\nimport moveInterfaceEnableItems from './move-interface-enable-items';\nimport convertEditPostPanels from './convert-edit-post-panels';\nimport isPreferencesData from '../../is-preferences-data';\nimport { readStoredJSON } from '../../local-storage';\nimport type { ScopedPreferences } from '../../types';\nimport type { LegacyData } from './types';\n\n/**\n * Gets the legacy local storage data for a given user.\n *\n * @param userId The user id.\n *\n * @return The local storage data.\n */\nfunction getLegacyData( userId: string | number ): LegacyData | null {\n\treturn readStoredJSON( `WP_DATA_USER_${ userId }` ) as LegacyData | null;\n}\n\n/**\n * Converts data from the old `@wordpress/data` package format.\n *\n * @param data The legacy data in its original format.\n *\n * @return The converted data or `undefined` if there was\n * nothing to convert.\n */\nexport function convertLegacyData(\n\tdata: LegacyData | null | undefined\n): ScopedPreferences | undefined {\n\tif ( ! data ) {\n\t\treturn;\n\t}\n\n\t// Move boolean feature preferences from each editor into the\n\t// preferences store data structure.\n\tdata = moveFeaturePreferences( data, 'core/edit-widgets' );\n\tdata = moveFeaturePreferences( data, 'core/customize-widgets' );\n\tdata = moveFeaturePreferences( data, 'core/edit-post' );\n\tdata = moveFeaturePreferences( data, 'core/edit-site' );\n\n\t// Move third party boolean feature preferences from the interface package\n\t// to the preferences store data structure.\n\tdata = moveThirdPartyFeaturePreferences( data );\n\n\t// Move and convert the interface store's `enableItems` data into the\n\t// preferences data structure.\n\tdata = moveInterfaceEnableItems( data );\n\n\t// Move individual ad-hoc preferences from various packages into the\n\t// preferences store data structure.\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'hiddenBlockTypes'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'editorMode'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core/edit-post' },\n\t\t'panels',\n\t\tconvertEditPostPanels\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/editor', to: 'core' },\n\t\t'isPublishSidebarEnabled'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-post', to: 'core' },\n\t\t'isPublishSidebarEnabled'\n\t);\n\tdata = moveIndividualPreference(\n\t\tdata,\n\t\t{ from: 'core/edit-site', to: 'core/edit-site' },\n\t\t'editorMode'\n\t);\n\n\t// The new system is only concerned with persisting\n\t// 'core/preferences' preferences reducer, so only return that.\n\tconst preferences = data?.[ 'core/preferences' ]?.preferences;\n\treturn isPreferencesData( preferences ) ? preferences : undefined;\n}\n\n/**\n * Gets the legacy local storage data for the given user and returns the\n * data converted to the new format.\n *\n * @param userId The user id.\n *\n * @return The converted data or undefined if no local\n * storage data could be found.\n */\nexport default function convertLegacyLocalStorageData(\n\tuserId: string | number\n): ScopedPreferences | undefined {\n\tconst data = getLegacyData( userId );\n\treturn convertLegacyData( data );\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiBA,SAAS,cAAe,QAA6C;CACpE,QAAA,GAAOA,uBAAAA,eAAAA,CAAgB,gBAAiB,QAAU;AACnD;;;;;;;;;AAUA,SAAgB,kBACf,MACgC;CAChC,IAAK,CAAE,MACN;CAKD,QAAA,GAAOC,8BAAAA,QAAAA,CAAwB,MAAM,mBAAoB;CACzD,QAAA,GAAOA,8BAAAA,QAAAA,CAAwB,MAAM,wBAAyB;CAC9D,QAAA,GAAOA,8BAAAA,QAAAA,CAAwB,MAAM,gBAAiB;CACtD,QAAA,GAAOA,8BAAAA,QAAAA,CAAwB,MAAM,gBAAiB;CAItD,QAAA,GAAOC,0CAAAA,QAAAA,CAAkC,IAAK;CAI9C,QAAA,GAAOC,iCAAAA,QAAAA,CAA0B,IAAK;CAItC,QAAA,GAAOC,gCAAAA,QAAAA,CACN,MACA;EAAE,MAAM;EAAkB,IAAI;CAAiB,GAC/C,kBACD;CACA,QAAA,GAAOA,gCAAAA,QAAAA,CACN,MACA;EAAE,MAAM;EAAkB,IAAI;CAAiB,GAC/C,YACD;CACA,QAAA,GAAOA,gCAAAA,QAAAA,CACN,MACA;EAAE,MAAM;EAAkB,IAAI;CAAiB,GAC/C,UACAC,8BAAAA,OACD;CACA,QAAA,GAAOD,gCAAAA,QAAAA,CACN,MACA;EAAE,MAAM;EAAe,IAAI;CAAO,GAClC,yBACD;CACA,QAAA,GAAOA,gCAAAA,QAAAA,CACN,MACA;EAAE,MAAM;EAAkB,IAAI;CAAO,GACrC,yBACD;CACA,QAAA,GAAOA,gCAAAA,QAAAA,CACN,MACA;EAAE,MAAM;EAAkB,IAAI;CAAiB,GAC/C,YACD;CAIA,MAAM,cAAc,OAAQ,mBAAoB,EAAE;CAClD,QAAA,GAAOE,6BAAAA,QAAAA,CAAmB,WAAY,IAAI,cAAc,KAAA;AACzD;;;;;;;;;;AAWA,SAAwB,8BACvB,QACgC;CAEhC,OAAO,kBADM,cAAe,MACC,CAAE;AAChC"}