@teleporthq/teleport-shared 0.43.62 → 0.43.63

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 (58) hide show
  1. package/__tests__/utils/font-preconnect.ts +62 -0
  2. package/dist/cjs/index.d.ts +4 -1
  3. package/dist/cjs/index.d.ts.map +1 -1
  4. package/dist/cjs/index.js +7 -1
  5. package/dist/cjs/index.js.map +1 -1
  6. package/dist/cjs/page-revalidate/api-route.d.ts +24 -0
  7. package/dist/cjs/page-revalidate/api-route.d.ts.map +1 -0
  8. package/dist/cjs/page-revalidate/api-route.js +30 -0
  9. package/dist/cjs/page-revalidate/api-route.js.map +1 -0
  10. package/dist/cjs/page-revalidate/constants.d.ts +22 -0
  11. package/dist/cjs/page-revalidate/constants.d.ts.map +1 -0
  12. package/dist/cjs/page-revalidate/constants.js +25 -0
  13. package/dist/cjs/page-revalidate/constants.js.map +1 -0
  14. package/dist/cjs/page-revalidate/index.d.ts +3 -0
  15. package/dist/cjs/page-revalidate/index.d.ts.map +1 -0
  16. package/dist/cjs/page-revalidate/index.js +19 -0
  17. package/dist/cjs/page-revalidate/index.js.map +1 -0
  18. package/dist/cjs/tsconfig.tsbuildinfo +1 -1
  19. package/dist/cjs/utils/font-preconnect.d.ts +40 -0
  20. package/dist/cjs/utils/font-preconnect.d.ts.map +1 -0
  21. package/dist/cjs/utils/font-preconnect.js +52 -0
  22. package/dist/cjs/utils/font-preconnect.js.map +1 -0
  23. package/dist/cjs/utils/product-ratings.d.ts +26 -0
  24. package/dist/cjs/utils/product-ratings.d.ts.map +1 -0
  25. package/dist/cjs/utils/product-ratings.js +30 -0
  26. package/dist/cjs/utils/product-ratings.js.map +1 -0
  27. package/dist/esm/index.d.ts +4 -1
  28. package/dist/esm/index.d.ts.map +1 -1
  29. package/dist/esm/index.js +4 -1
  30. package/dist/esm/index.js.map +1 -1
  31. package/dist/esm/page-revalidate/api-route.d.ts +24 -0
  32. package/dist/esm/page-revalidate/api-route.d.ts.map +1 -0
  33. package/dist/esm/page-revalidate/api-route.js +26 -0
  34. package/dist/esm/page-revalidate/api-route.js.map +1 -0
  35. package/dist/esm/page-revalidate/constants.d.ts +22 -0
  36. package/dist/esm/page-revalidate/constants.d.ts.map +1 -0
  37. package/dist/esm/page-revalidate/constants.js +22 -0
  38. package/dist/esm/page-revalidate/constants.js.map +1 -0
  39. package/dist/esm/page-revalidate/index.d.ts +3 -0
  40. package/dist/esm/page-revalidate/index.d.ts.map +1 -0
  41. package/dist/esm/page-revalidate/index.js +3 -0
  42. package/dist/esm/page-revalidate/index.js.map +1 -0
  43. package/dist/esm/tsconfig.tsbuildinfo +1 -1
  44. package/dist/esm/utils/font-preconnect.d.ts +40 -0
  45. package/dist/esm/utils/font-preconnect.d.ts.map +1 -0
  46. package/dist/esm/utils/font-preconnect.js +48 -0
  47. package/dist/esm/utils/font-preconnect.js.map +1 -0
  48. package/dist/esm/utils/product-ratings.d.ts +26 -0
  49. package/dist/esm/utils/product-ratings.d.ts.map +1 -0
  50. package/dist/esm/utils/product-ratings.js +26 -0
  51. package/dist/esm/utils/product-ratings.js.map +1 -0
  52. package/package.json +3 -3
  53. package/src/index.ts +6 -0
  54. package/src/page-revalidate/api-route.ts +77 -0
  55. package/src/page-revalidate/constants.ts +24 -0
  56. package/src/page-revalidate/index.ts +2 -0
  57. package/src/utils/font-preconnect.ts +61 -0
  58. package/src/utils/product-ratings.ts +98 -0
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.generateProductRatingHelperCode = void 0;
4
+ /**
5
+ * The aggregate-rating rule, as ES5 source for embedding into generated runtime
6
+ * code (the data-source product transform) that cannot import from this package.
7
+ *
8
+ * ⚠️ SECOND MIRROR. The editor/canvas copy is teleport-gui's
9
+ * `features/e-commerce/utils/product-ratings.ts`, and the two must agree exactly
10
+ * or the canvas shows one rating and the deployed store shows another — the
11
+ * divergence class that hid the variant picker for a whole release. The GUI's
12
+ * `utils/__tests__/product-rating-parity.spec.ts` and this package's
13
+ * `__tests__/product-ratings.test.ts` run the SAME fixture table against their
14
+ * respective copies.
15
+ *
16
+ * Three rules the whole feature rests on (stated in full in the GUI copy):
17
+ *
18
+ * - Only APPROVED reviews count. The predicate lives in the SQL, never here.
19
+ * - "No reviews" and "we could not look" both render as NOTHING — never as
20
+ * "0.0 ★☆☆☆☆", which reads as a product everyone hated.
21
+ * - The label and the stars round from the SAME number: one decimal for the
22
+ * label, that value snapped to the nearest half for the stars.
23
+ *
24
+ * Everything is prefixed `__pr` so the block can be concatenated into any
25
+ * generated module without colliding with its locals — it is emitted alongside
26
+ * the `__pd` discount helpers and the storefront-tax helpers.
27
+ */
28
+ var generateProductRatingHelperCode = function () { return "\n// \u2500\u2500 Aggregate product ratings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Turns the batched COUNT/AVG of a product's APPROVED reviews into the fields\n// the card and the details page bind: a one-decimal label, a count, a\n// 'true'/'false' gate and five per-slot fill states.\n//\n// Strings throughout (except the two numbers) to match the storefront's\n// string-equality convention: rendering conditions compare operands as TEXT and\n// a bound text node prints its value verbatim.\nvar __PR_MAX_STARS = 5;\n\n// Mean rounded to one decimal, clamped to the 1-5 scale. Clamping is not\n// paranoia: `rating` is a plain integer column and an import or a hand-written\n// UPDATE can put a 7 in it, which would ask for a star slot that does not exist.\nfunction __prRoundAverage(average) {\n var raw = Number(average);\n if (!isFinite(raw) || !(raw > 0)) return 0;\n var clamped = Math.min(__PR_MAX_STARS, raw);\n return Math.round(clamped * 10) / 10;\n}\n\n// The value the STARS are drawn from: the label average snapped to the nearest\n// half, so the stars can never disagree with the number printed beside them.\nfunction __prHalfStar(roundedAverage) {\n return Math.round(roundedAverage * 2) / 2;\n}\n\n// Fill state of one 1-based slot. At 4.5: slots 1-4 full, slot 5 half.\nfunction __prStarFill(slot, halfSnapped) {\n if (halfSnapped >= slot) return 'full';\n if (halfSnapped >= slot - 0.5) return 'half';\n return 'empty';\n}\n\n// Every product carries these keys; this is the \"no reviews\" answer, and it is\n// also what a FAILED lookup returns \u2014 the two are deliberately indistinguishable.\nfunction __prEmptyRatingFields() {\n return {\n ratingAverage: 0,\n ratingCount: 0,\n ratingAverageLabel: '',\n ratingCountLabel: '',\n hasRatings: 'false',\n ratingStar1: 'empty',\n ratingStar2: 'empty',\n ratingStar3: 'empty',\n ratingStar4: 'empty',\n ratingStar5: 'empty'\n };\n}\n\nfunction __prBuildRatingFields(aggregate) {\n var rawCount = aggregate ? Number(aggregate.count) : 0;\n var count = isFinite(rawCount) ? Math.max(0, Math.trunc(rawCount)) : 0;\n var average = __prRoundAverage(aggregate ? aggregate.average : 0);\n\n // A count with no usable average (every row NULL) is not a rating anyone can\n // read, so it degrades to \"no reviews\" rather than to zero stars.\n if (count <= 0 || average <= 0) return __prEmptyRatingFields();\n\n var half = __prHalfStar(average);\n return {\n ratingAverage: average,\n ratingCount: count,\n ratingAverageLabel: average.toFixed(1),\n ratingCountLabel: String(count),\n hasRatings: 'true',\n ratingStar1: __prStarFill(1, half),\n ratingStar2: __prStarFill(2, half),\n ratingStar3: __prStarFill(3, half),\n ratingStar4: __prStarFill(4, half),\n ratingStar5: __prStarFill(5, half)\n };\n}"; };
29
+ exports.generateProductRatingHelperCode = generateProductRatingHelperCode;
30
+ //# sourceMappingURL=product-ratings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-ratings.js","sourceRoot":"","sources":["../../../src/utils/product-ratings.ts"],"names":[],"mappings":";;;AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACI,IAAM,+BAA+B,GAAG,cAAc,OAAA,0hGAyE3D,EAzE2D,CAyE3D,CAAA;AAzEW,QAAA,+BAA+B,mCAyE1C"}
@@ -13,9 +13,12 @@ import * as HtmlContentModel from './utils/html-content-model';
13
13
  import * as StyleDeclarations from './utils/style-declarations';
14
14
  import * as StorefrontTax from './utils/storefront-tax';
15
15
  import * as ProductDiscounts from './utils/product-discounts';
16
+ import * as ProductRatings from './utils/product-ratings';
17
+ import * as FontPreconnect from './utils/font-preconnect';
16
18
  import * as EmailDate from './utils/email-date';
17
19
  import * as RichTextEmbeds from './utils/rich-text-embeds';
18
20
  import * as RichTextEmbedsCodegen from './utils/rich-text-embeds-codegen';
19
21
  import * as DataCache from './cache';
20
- export { Constants, StringUtils, UIDLUtils, GenericUtils, LocalImports, JSIdentifiers, ASTScope, ASTStatementOrder, ASTEffectCleanup, RoutePaths, LayoutTopology, HtmlContentModel, StyleDeclarations, StorefrontTax, ProductDiscounts, EmailDate, RichTextEmbeds, RichTextEmbedsCodegen, DataCache, };
22
+ import * as PageRevalidate from './page-revalidate';
23
+ export { Constants, StringUtils, UIDLUtils, GenericUtils, LocalImports, JSIdentifiers, ASTScope, ASTStatementOrder, ASTEffectCleanup, RoutePaths, LayoutTopology, HtmlContentModel, StyleDeclarations, StorefrontTax, ProductDiscounts, ProductRatings, FontPreconnect, EmailDate, RichTextEmbeds, RichTextEmbedsCodegen, DataCache, PageRevalidate, };
21
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,qBAAqB,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,SAAS,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,SAAS,GACV,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,qBAAqB,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,SAAS,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,SAAS,EACT,cAAc,GACf,CAAA"}
package/dist/esm/index.js CHANGED
@@ -13,9 +13,12 @@ import * as HtmlContentModel from './utils/html-content-model';
13
13
  import * as StyleDeclarations from './utils/style-declarations';
14
14
  import * as StorefrontTax from './utils/storefront-tax';
15
15
  import * as ProductDiscounts from './utils/product-discounts';
16
+ import * as ProductRatings from './utils/product-ratings';
17
+ import * as FontPreconnect from './utils/font-preconnect';
16
18
  import * as EmailDate from './utils/email-date';
17
19
  import * as RichTextEmbeds from './utils/rich-text-embeds';
18
20
  import * as RichTextEmbedsCodegen from './utils/rich-text-embeds-codegen';
19
21
  import * as DataCache from './cache';
20
- export { Constants, StringUtils, UIDLUtils, GenericUtils, LocalImports, JSIdentifiers, ASTScope, ASTStatementOrder, ASTEffectCleanup, RoutePaths, LayoutTopology, HtmlContentModel, StyleDeclarations, StorefrontTax, ProductDiscounts, EmailDate, RichTextEmbeds, RichTextEmbedsCodegen, DataCache, };
22
+ import * as PageRevalidate from './page-revalidate';
23
+ export { Constants, StringUtils, UIDLUtils, GenericUtils, LocalImports, JSIdentifiers, ASTScope, ASTStatementOrder, ASTEffectCleanup, RoutePaths, LayoutTopology, HtmlContentModel, StyleDeclarations, StorefrontTax, ProductDiscounts, ProductRatings, FontPreconnect, EmailDate, RichTextEmbeds, RichTextEmbedsCodegen, DataCache, PageRevalidate, };
21
24
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,qBAAqB,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,SAAS,MAAM,SAAS,CAAA;AAEpC,OAAO,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,SAAS,GACV,CAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,aAAa,CAAA;AACxC,OAAO,KAAK,WAAW,MAAM,sBAAsB,CAAA;AACnD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,iBAAiB,CAAA;AAC/C,OAAO,KAAK,YAAY,MAAM,uBAAuB,CAAA;AACrD,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,QAAQ,MAAM,mBAAmB,CAAA;AAC7C,OAAO,KAAK,iBAAiB,MAAM,6BAA6B,CAAA;AAChE,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,UAAU,MAAM,qBAAqB,CAAA;AACjD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,gBAAgB,MAAM,4BAA4B,CAAA;AAC9D,OAAO,KAAK,iBAAiB,MAAM,4BAA4B,CAAA;AAC/D,OAAO,KAAK,aAAa,MAAM,wBAAwB,CAAA;AACvD,OAAO,KAAK,gBAAgB,MAAM,2BAA2B,CAAA;AAC7D,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,cAAc,MAAM,yBAAyB,CAAA;AACzD,OAAO,KAAK,SAAS,MAAM,oBAAoB,CAAA;AAC/C,OAAO,KAAK,cAAc,MAAM,0BAA0B,CAAA;AAC1D,OAAO,KAAK,qBAAqB,MAAM,kCAAkC,CAAA;AACzE,OAAO,KAAK,SAAS,MAAM,SAAS,CAAA;AACpC,OAAO,KAAK,cAAc,MAAM,mBAAmB,CAAA;AAEnD,OAAO,EACL,SAAS,EACT,WAAW,EACX,SAAS,EACT,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,QAAQ,EACR,iBAAiB,EACjB,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,cAAc,EACd,cAAc,EACd,SAAS,EACT,cAAc,EACd,qBAAqB,EACrB,SAAS,EACT,cAAc,GACf,CAAA"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * `POST /api/tq-revalidate`
3
+ *
4
+ * Re-runs `getStaticProps` for each given path, so a row an admin just created,
5
+ * edited or deleted reaches the public URL immediately instead of at the end of
6
+ * the page's ISR window. `res.revalidate` is a Pages-Router API-route method, so
7
+ * this route is the only place in a generated project that can do it — which is
8
+ * why the workflow node calls it over HTTP rather than doing the work itself.
9
+ *
10
+ * Reuses the cache secret rather than minting a second one: both endpoints
11
+ * authorise the same actor (the app's own server, mid-workflow) and a project
12
+ * already has this secret provisioned.
13
+ *
14
+ * Fails CLOSED when no secret is configured, for the same reason the cache
15
+ * route does: an unauthenticated rebuild endpoint on every published site is a
16
+ * free way to make a project re-render its pages on demand.
17
+ *
18
+ * Each path is rebuilt inside its OWN try/catch. `res.revalidate` throws for a
19
+ * path that was never generated (a deleted row's URL, a slug that no longer
20
+ * resolves), and one such path must not cost the caller the rebuilds it asked
21
+ * for alongside it — so failures are collected and reported, never thrown.
22
+ */
23
+ export declare const generatePageRevalidateRoute: () => string;
24
+ //# sourceMappingURL=api-route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-route.d.ts","sourceRoot":"","sources":["../../../src/page-revalidate/api-route.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,2BAA2B,QAAO,MAmD9C,CAAA"}
@@ -0,0 +1,26 @@
1
+ import { CACHE_SECRET_ENV } from '../cache/constants';
2
+ import { REVALIDATE_MAX_PATHS } from './constants';
3
+ /**
4
+ * `POST /api/tq-revalidate`
5
+ *
6
+ * Re-runs `getStaticProps` for each given path, so a row an admin just created,
7
+ * edited or deleted reaches the public URL immediately instead of at the end of
8
+ * the page's ISR window. `res.revalidate` is a Pages-Router API-route method, so
9
+ * this route is the only place in a generated project that can do it — which is
10
+ * why the workflow node calls it over HTTP rather than doing the work itself.
11
+ *
12
+ * Reuses the cache secret rather than minting a second one: both endpoints
13
+ * authorise the same actor (the app's own server, mid-workflow) and a project
14
+ * already has this secret provisioned.
15
+ *
16
+ * Fails CLOSED when no secret is configured, for the same reason the cache
17
+ * route does: an unauthenticated rebuild endpoint on every published site is a
18
+ * free way to make a project re-render its pages on demand.
19
+ *
20
+ * Each path is rebuilt inside its OWN try/catch. `res.revalidate` throws for a
21
+ * path that was never generated (a deleted row's URL, a slug that no longer
22
+ * resolves), and one such path must not cost the caller the rebuilds it asked
23
+ * for alongside it — so failures are collected and reported, never thrown.
24
+ */
25
+ export var generatePageRevalidateRoute = function () { return "import crypto from 'crypto'\n\nconst MAX_PATHS = ".concat(REVALIDATE_MAX_PATHS, "\n\nfunction isAuthorized(req) {\n const secret = process.env.").concat(CACHE_SECRET_ENV, "\n const provided = req.headers['x-tq-cache-secret']\n if (!secret || typeof provided !== 'string') {\n return false\n }\n const a = Buffer.from(provided)\n const b = Buffer.from(secret)\n // timingSafeEqual throws on a length mismatch, so the length is compared first.\n if (a.length !== b.length) {\n return false\n }\n return crypto.timingSafeEqual(a, b)\n}\n\nexport default async function handler(req, res) {\n if (req.method !== 'POST') {\n return res.status(405).json({ error: 'Method not allowed' })\n }\n\n if (!isAuthorized(req)) {\n return res.status(401).json({ error: 'Unauthorized' })\n }\n\n const body = typeof req.body === 'string' ? JSON.parse(req.body) : req.body || {}\n const paths = (Array.isArray(body.paths) ? body.paths : [])\n .filter((path) => typeof path === 'string' && path.trim())\n .map((path) => (path.trim().charAt(0) === '/' ? path.trim() : '/' + path.trim()))\n .slice(0, MAX_PATHS)\n\n const revalidated = []\n const failed = []\n\n for (const path of paths) {\n try {\n await res.revalidate(path)\n revalidated.push(path)\n } catch (error) {\n // A path that was never statically generated throws here. That is the\n // normal case for a page whose row was just deleted, so it is reported\n // rather than raised.\n failed.push(path)\n }\n }\n\n return res.status(200).json({ ok: true, revalidated, failed })\n}\n"); };
26
+ //# sourceMappingURL=api-route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api-route.js","sourceRoot":"","sources":["../../../src/page-revalidate/api-route.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAA;AACrD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,IAAM,2BAA2B,GAAG,cAAc,OAAA,2DAErC,oBAAoB,4EAGT,gBAAgB,45CA8C9C,EAnDwD,CAmDxD,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared constants for the generated page-revalidation route.
3
+ *
4
+ * Lives in `teleport-shared` because two generators agree on them — the Next
5
+ * project plugin that emits the route and the `page-revalidate` workflow node
6
+ * that calls it — and a mismatch would be a 404 the node reports only as a
7
+ * warning, so nothing would ever fail loudly.
8
+ */
9
+ /** Emitted API route, relative to the generated project root. */
10
+ export declare const REVALIDATE_API_DIR: string[];
11
+ export declare const REVALIDATE_ROUTE = "tq-revalidate";
12
+ /** The path the workflow node POSTs to. Kept beside the emitted route's name. */
13
+ export declare const REVALIDATE_ROUTE_PATH = "/api/tq-revalidate";
14
+ /**
15
+ * One request may not rebuild more than this many pages.
16
+ *
17
+ * Each path re-runs `getStaticProps`, so an unbounded list is an unbounded
18
+ * serverless invocation triggered by whatever the workflow put in the config.
19
+ * Every wiring the platform generates asks for one or two paths.
20
+ */
21
+ export declare const REVALIDATE_MAX_PATHS = 20;
22
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/page-revalidate/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iEAAiE;AACjE,eAAO,MAAM,kBAAkB,UAAmB,CAAA;AAClD,eAAO,MAAM,gBAAgB,kBAAkB,CAAA;AAE/C,iFAAiF;AACjF,eAAO,MAAM,qBAAqB,uBAAuB,CAAA;AAEzD;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,KAAK,CAAA"}
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Shared constants for the generated page-revalidation route.
3
+ *
4
+ * Lives in `teleport-shared` because two generators agree on them — the Next
5
+ * project plugin that emits the route and the `page-revalidate` workflow node
6
+ * that calls it — and a mismatch would be a 404 the node reports only as a
7
+ * warning, so nothing would ever fail loudly.
8
+ */
9
+ /** Emitted API route, relative to the generated project root. */
10
+ export var REVALIDATE_API_DIR = ['pages', 'api'];
11
+ export var REVALIDATE_ROUTE = 'tq-revalidate';
12
+ /** The path the workflow node POSTs to. Kept beside the emitted route's name. */
13
+ export var REVALIDATE_ROUTE_PATH = '/api/tq-revalidate';
14
+ /**
15
+ * One request may not rebuild more than this many pages.
16
+ *
17
+ * Each path re-runs `getStaticProps`, so an unbounded list is an unbounded
18
+ * serverless invocation triggered by whatever the workflow put in the config.
19
+ * Every wiring the platform generates asks for one or two paths.
20
+ */
21
+ export var REVALIDATE_MAX_PATHS = 20;
22
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.js","sourceRoot":"","sources":["../../../src/page-revalidate/constants.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,iEAAiE;AACjE,MAAM,CAAC,IAAM,kBAAkB,GAAG,CAAC,OAAO,EAAE,KAAK,CAAC,CAAA;AAClD,MAAM,CAAC,IAAM,gBAAgB,GAAG,eAAe,CAAA;AAE/C,iFAAiF;AACjF,MAAM,CAAC,IAAM,qBAAqB,GAAG,oBAAoB,CAAA;AAEzD;;;;;;GAMG;AACH,MAAM,CAAC,IAAM,oBAAoB,GAAG,EAAE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export * from './api-route';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/page-revalidate/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './constants';
2
+ export * from './api-route';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/page-revalidate/index.ts"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAA;AAC3B,cAAc,aAAa,CAAA"}
@@ -1 +1 @@
1
- {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/constants/index.ts","../../src/utils/js-identifiers.ts","../../src/utils/string-utils.ts","../../src/utils/uidl-utils.ts","../../src/utils/generic.ts","../../src/utils/local-imports.ts","../../src/utils/ast-scope.ts","../../src/utils/ast-statement-order.ts","../../src/utils/ast-effect-cleanup.ts","../../src/utils/route-paths.ts","../../src/utils/layout-topology.ts","../../src/utils/html-content-model.ts","../../src/utils/style-declarations.ts","../../src/utils/storefront-tax.ts","../../src/utils/product-discounts.ts","../../src/utils/email-date.ts","../../src/utils/rich-text-embeds.ts","../../src/utils/rich-text-embeds-codegen.ts","../../src/cache/constants.ts","../../src/cache/client-runtime.ts","../../src/cache/server-runtime.ts","../../src/cache/version-store.ts","../../src/cache/api-routes.ts","../../src/cache/index.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14fc7efae8b184b18019a5906c6f6de752823b44ff1acf7924bbdc8877ded21b","d425f386a098d2e07eaffff5651b841c3483be1e237fba01e9c9d3215384eee7","8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","b89124f3badfae5989afdc5c92193da02dee7dbea1b0f265794521bb02ddbe74","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","d9118ed71b9968fea213b070209081a1b1c378b55ddcd026fb1ae8a7f52c15b7","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f",{"version":"11650c5bddaa406f3d38215ee50e9b7ef974a4cd547c232d318e440ec9765b6b","signature":"950376ec316f431002898dc46c9e712d4df602735e79710032f82ff7cb0ff639"},{"version":"a3a7229dea45fec3b66fb3db95ea86b6f79456d53b01124be574234b855e7f33","signature":"9ea2bd139a31e4bcccbaaf18a67b1ffce16768d35396263d271deb29da1d6f3d"},{"version":"c24f079ec435435dcfa36db980f1da9fa965af8458308a1e4a635d33ad1f8a93","signature":"5fe9ca7b6dc98850f1b426855662f868e86c375e86c7f5486ad4692bc2572fde"},{"version":"8a2a94472cdd6a36100128806588f6e7df23e28f062cdc346b8201af7b7317da","signature":"ffebee2a958508484af19fffc046c9c69ae120bdfd7b452f143219e05e97c20b"},{"version":"d36d38e7840bb5eb64570d6a75b4cda6b30f810ff28e788eabbe20f2ca6ec20d","signature":"def6a19b93529e8c08bb970740d56ecfce4d17a3c495a49761636087f6c80c4a"},{"version":"6cd90a046b174d27446a3682bdfdf31b56f0f566796d0345395d3a409dd9284c","signature":"dfda7fae8dc2ce6b5f728ccdf83f252923d50f47cb9535b18e34bc0d34c5a985"},{"version":"d5d7bef99b9b58cb67c8a18f1a1a1a74ad36e707226181dc5306f5fd56875bdf","signature":"b290a1d459a7028ae36165b73a69a4877c73f4dd72af733964b55110882c3216"},{"version":"bf4571325f6084257e36752366f3c2196c4d1489a46e53854fab86f76f700189","signature":"3816fd253a52b0f8dedd04c55eb2d77d0aa4f1c92707fb50cf14a5d1aa3869dd"},{"version":"19c4db2864f00fb2a76efa2f7d8dcf04a2b5a05742e96781166571c6d2250320","signature":"a36f3d868428938cd620deb11cd0747f31fab1c490d54224e99ac8ea6a270220"},{"version":"3805506eba293e77c14ddcbff35b0aa053b4de13137abc9ebed48ce8dca1fe49","signature":"d487aeebf39008a9b79a9c44a4943bfac9131afe5bb67f6f91319c91f0b74d2b"},{"version":"ec521fde10cc9bbb583b13eb7d9f426c715290c9766554e331040bbc208b688e","signature":"d00b4720674bd31c264f1add708dfeedcb80432a76541c91e38f867b434e0331"},{"version":"3385231c8904b943ead6ae26402c71c270c801a1a04dcf711b37d1fc8b1949c6","signature":"448d42608cb5eab83dc8fff0baac2cea61c5bfa654bc4c18b7640c61b4a8a72f"},{"version":"b4a28d604c143417486a5f5edc69c76ad8c7675d2fb453d1cf47d69831400e04","signature":"0dd5553c80b72c9796c41a5cbea3b2d5ad430651569efceaf08b982ccf4a2f5e"},{"version":"85db6d2b55c2d9802a66ecb6ecf1f41889f38e7075d4b77efc3aeeb83608c9f8","signature":"29fed62b94aa759c78d2ade5cf35805b6c4a287c457f92b874bc72a0cb0238ae"},{"version":"402224f379e89fda21400c1e98701843fdde8746bed0fa5b8f8a837ca3a4d224","signature":"e6104a2be1332eb0de3fed325b86aab795be0f618407652cc90f24daacd74a11"},{"version":"ecb1d950b0a0ab1d0fde6552253857281e515dfd00e7f894669c275ad4ae4436","signature":"0ad3df2740f91e7b7a6191972283d1af25d5f544d4a9ab1df9c41427f09d93fa"},{"version":"4bd6366f8de24dde2e31a494273232cc32d7c0ea564592ea8b7610901cf9478b","signature":"51634cb824ba91140770f4ac7311304479e33f151134f3521e088e14cd235dc5"},{"version":"071ad09f6345127de75e27f8379f30c56d02c72e6ab42819dae454e6b47d388f","signature":"7597acbd22e33e358945a8acf664f517c3dac69d9689bceed60cb13716771f95"},{"version":"f1605474f305995c2b2d8e7d48a8cdd72a2ae57ebbb47ed07bc9abfbf49ffeb1","signature":"5b58f892097fb651076e5be6a77a95c8343a5a84d54dab0ffd97a9450aa39c74"},{"version":"d67f5b62fe97d3f8036fb5c46396f7e65c01eb7124a56926ec7fa8f0857f21da","signature":"35fd626998b26ab1272bf57d013b6d133f3bd3a00eabd4a7b9d9c9312026ae8d"},{"version":"cfefe3982eb13d34b267f265850486badb5b7898edef0a829b17b3c258324575","signature":"03cbc47f7121335ef90a6deca986aaeb999a93252f3f7781867bf793e8a8d0e3"},{"version":"61339f04368d0e7c9a6f8719713be60e561adc6fb6587c33b44a4770ce0247e7","signature":"bf2b32b9d75b611ee022f889ba550d13e0bd14c2deeb1e4d89ce22544e23a1d0"},{"version":"e38653fbd95c5f8178b20faad66bf94a138ba8735a4923e92d810f96e9c20fc3","signature":"c4ccebbab1965eb732ff59c5127b9e177f4a5e2213ea8fa086d7ec6ace62d416"},{"version":"a7f1d2060c1ee57d44ea8f97f242e5b41f95ff4db1963660c9e199a22e1824ce","signature":"6d14d871eae84e541ef7c400686573943068eea5f6ccafa6bf7578ba2abc77a6"},{"version":"984124c84459caba50d918a931b5e0fa8583c141dd52ad2132e6783429c947a6","signature":"a31f728ea07e9f70fc32781084c1e3bc59ba57f43834d9612ec35d98f1f42a1e"},"0b4bc32128fda7bb0752cf284730dd3a817aae04a3d7f92e3b2d54bd61362fe1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"5f290ea7efbe9d8431e10df12c0d5672b67988e7c171c2d356749fac70347a55","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"49c89f8fa09d21c161e6a367448639e032f42d77cc2ec8ab54ecb8fa9a3ad59f","affectsGlobalScope":true},"e4b50850c2a62c7750428e452ee24b167180104d514d5e5c0ca691753365f610","304504c854c47a55ab4a89111a27a2daf8a3614740bd787cc1f2c51e5574239c",{"version":"95f9129a37dcace36e17b061a8484952586ecfe928c9c8ce526de1a2f4aaefa7","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","0f9061846236850a872cb44097d071631e93c8749a8b16c191fe3c2a48faede4","e46fa644658c2d6e5c85e954ea76b92c97d63f0851d3ccdab8c2a80d5962aaa9","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","a307d22a0130ac94c1a17fffa6d57ac272deb5838cb966a9420911d259cdf1be","d2e415abf6cb81ac9e2700b4db5ea7be76b997e812285b8e5e1e414eb2750b6e","09d6cebdced6aa1181ac1523c8f22a133f5ed80589678b64051f0602f0518374",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"7c35691dc3972ff1507d8dd279d833f540973d0917bde22e191cf7a8feaac29f","affectsGlobalScope":true},"62662d7a886e5cfa870685720fd27b763743ca4d2cf29326f75d76606a64eadd","b8c670688bd228d3cc9c169690b09b687188c50ff263a94df63b207701105ad9","d8e16905907111390d5a943816306ae997dfe56476f14142166f8b13ee322eea","8068c911a1c40bc6c5ffc58c625b21d807778f6aa6d63a73e6f04f88bcac5b79","a1dbce56ad5f3a37caafb9033c9d190a199217d673f5fa099c8968d471a2fdaa","c6f77efcc19f51c8759779b6b6ee0d88046c15c15dadac8ffed729a6620daf39",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"269d0ea3202820c29a32c1f2a357837a4f1918426844f7e7c90af15ec40d1dc1","66432f885e30cf471573de22a5af5eca9ab46b37b122aec98beadf77e9b7df24","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"034e635df3c014df1d6b1110b724ca0c4d2d324b45a84974c7d6931f9cf95ea7","affectsGlobalScope":true},{"version":"87f9456115554cb0f78f098ddbd585096871c19d2d05274c1b1b4ade3151da78","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","da618f0ea09d95c3b51514de43bf97dab008c85bede58aa57cf95e4984c7c957","48a35b181ecf47dbbc0a7ab4b5ba778d91eaa838ba42bf4aaaead42be77ef39a","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","5195aeb0de306d1c5ca8033457fbcab5987657112fa6d4971cfeb7644493a369","c5dbf0003bc9f0f643e54cd00a3868d1afe85497fecb56be6f2373dc85102924",{"version":"ce73eb199c4bf96c015f069aac161488ed73ebeaea3d87b6d5aa9a968a7b38d4","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","962f105729d5b888c8b70e193f6020ee92c6c8144c827de40f80d65dd188ad7f","ac74e2b754fba690036f8221d978f6debb867462b87af254f24e924b677395d0","80858f6de9af22e53aff221fe3590215ea544c2aeb2cc60cf8e08a9c785c8fef",{"version":"068b8ee5c2cd90d7a50f2efadbbe353cb10196a41189a48bf4b2a867363012b4","affectsGlobalScope":true},{"version":"340659b96782f5813aad6c1f89ea1b83b2f3fa993115c7b30366375d9bae5a4e","affectsGlobalScope":true},"6f44a190351ab5e1811abebe007cf60518044772ccc08244f9f241706afa767f","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"895ca532c15c77cbb6a871af1870b57bcd0ca4f38a1bd69669dd0e95bb58565a","affectsGlobalScope":true},"f2b9440f98d6f94c8105883a2b65aee2fce0248f71f41beafd0a80636f3a565d",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[166,168],[162,163],[162,163,164,165],[167],[169],[75],[111],[112,117,145],[113,124,125,132,142,153],[113,114,124,132],[115,154],[116,117,125,133],[117,142,150],[118,120,124,132],[111,119],[120,121],[124],[122,124],[111,124],[124,125,126,142,153],[124,125,126,139,142,145],[109,158],[120,124,127,132,142,153],[124,125,127,128,132,142,150,153],[127,129,142,150,153],[75,76,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160],[124,130],[131,153,158],[120,124,132,142],[133],[134],[111,135],[136,152,158],[137],[138],[124,139,140],[139,141,154,156],[112,124,142,143,144,145],[112,142,144],[142,143],[145],[146],[111,142],[124,148,149],[148,149],[117,132,142,150],[151],[132,152],[112,127,138,153],[117,154],[142,155],[131,156],[157],[112,117,124,126,135,142,153,156,158],[142,159],[86,90,153],[86,142,153],[81],[83,86,150,153],[132,150],[161],[81,161],[83,86,132,153],[78,79,82,85,112,124,142,153],[78,84],[82,86,112,145,153,161],[112,161],[102,112,161],[80,81,161],[86],[80,81,82,83,84,85,86,87,88,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,107,108],[86,93,94],[84,86,94,95],[85],[78,81,86],[86,90,94,95],[90],[84,86,89,153],[78,83,84,86,90,93],[112,142],[81,86,102,112,158,161],[68],[68,69,70,71,72],[49],[50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,73],[45,56],[45],[49,134],[66],[51],[49,52,74,134],[44,45],[44,46,47,48],[43],[43,44]],"referencedMap":[[169,1],[164,2],[166,3],[165,2],[168,4],[170,5],[75,6],[76,6],[111,7],[112,8],[113,9],[114,10],[115,11],[116,12],[117,13],[118,14],[119,15],[120,16],[121,16],[123,17],[122,18],[124,19],[125,20],[126,21],[110,22],[127,23],[128,24],[129,25],[161,26],[130,27],[131,28],[132,29],[133,30],[134,31],[135,32],[136,33],[137,34],[138,35],[139,36],[140,36],[141,37],[142,38],[144,39],[143,40],[145,41],[146,42],[147,43],[148,44],[149,45],[150,46],[151,47],[152,48],[153,49],[154,50],[155,51],[156,52],[157,53],[158,54],[159,55],[93,56],[100,57],[92,56],[107,58],[84,59],[83,60],[106,61],[101,62],[104,63],[86,64],[85,65],[81,66],[80,67],[103,68],[82,69],[87,70],[91,70],[109,71],[108,70],[95,72],[96,73],[98,74],[94,75],[97,76],[102,61],[89,77],[90,78],[99,79],[79,80],[105,81],[72,82],[69,82],[73,83],[70,82],[71,82],[50,84],[74,85],[58,86],[56,87],[57,86],[54,88],[60,84],[55,84],[67,89],[63,84],[52,90],[62,84],[53,91],[46,92],[49,93],[44,94],[48,95]],"exportedModulesMap":[[169,1],[164,2],[166,3],[165,2],[168,4],[170,5],[75,6],[76,6],[111,7],[112,8],[113,9],[114,10],[115,11],[116,12],[117,13],[118,14],[119,15],[120,16],[121,16],[123,17],[122,18],[124,19],[125,20],[126,21],[110,22],[127,23],[128,24],[129,25],[161,26],[130,27],[131,28],[132,29],[133,30],[134,31],[135,32],[136,33],[137,34],[138,35],[139,36],[140,36],[141,37],[142,38],[144,39],[143,40],[145,41],[146,42],[147,43],[148,44],[149,45],[150,46],[151,47],[152,48],[153,49],[154,50],[155,51],[156,52],[157,53],[158,54],[159,55],[93,56],[100,57],[92,56],[107,58],[84,59],[83,60],[106,61],[101,62],[104,63],[86,64],[85,65],[81,66],[80,67],[103,68],[82,69],[87,70],[91,70],[109,71],[108,70],[95,72],[96,73],[98,74],[94,75],[97,76],[102,61],[89,77],[90,78],[99,79],[79,80],[105,81],[73,83],[50,84],[74,85],[58,87],[56,87],[57,87],[54,84],[60,84],[55,84],[63,84],[62,84],[53,84],[46,92],[49,93],[44,94],[48,95]],"semanticDiagnosticsPerFile":[45,169,162,164,166,165,163,168,167,170,75,76,111,112,113,114,115,116,117,118,119,120,121,123,122,124,125,126,110,160,127,128,129,161,130,131,132,133,134,135,136,137,138,139,140,141,142,144,143,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,77,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,93,100,92,107,84,83,106,101,104,86,85,81,80,103,82,87,88,91,78,109,108,95,96,98,94,97,102,89,90,99,79,105,72,69,68,73,70,71,50,74,58,56,57,65,54,61,51,60,55,64,67,66,59,63,52,62,53,47,46,43,49,44,48]},"version":"4.9.5"}
1
+ {"program":{"fileNames":["../../../../node_modules/typescript/lib/lib.es5.d.ts","../../../../node_modules/typescript/lib/lib.es2015.d.ts","../../../../node_modules/typescript/lib/lib.es2016.d.ts","../../../../node_modules/typescript/lib/lib.es2017.d.ts","../../../../node_modules/typescript/lib/lib.es2018.d.ts","../../../../node_modules/typescript/lib/lib.es2019.d.ts","../../../../node_modules/typescript/lib/lib.es2020.d.ts","../../../../node_modules/typescript/lib/lib.dom.d.ts","../../../../node_modules/typescript/lib/lib.es2015.core.d.ts","../../../../node_modules/typescript/lib/lib.es2015.collection.d.ts","../../../../node_modules/typescript/lib/lib.es2015.generator.d.ts","../../../../node_modules/typescript/lib/lib.es2015.iterable.d.ts","../../../../node_modules/typescript/lib/lib.es2015.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2015.proxy.d.ts","../../../../node_modules/typescript/lib/lib.es2015.reflect.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2016.array.include.d.ts","../../../../node_modules/typescript/lib/lib.es2017.object.d.ts","../../../../node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2017.string.d.ts","../../../../node_modules/typescript/lib/lib.es2017.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","../../../../node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","../../../../node_modules/typescript/lib/lib.es2018.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2018.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2018.regexp.d.ts","../../../../node_modules/typescript/lib/lib.es2019.array.d.ts","../../../../node_modules/typescript/lib/lib.es2019.object.d.ts","../../../../node_modules/typescript/lib/lib.es2019.string.d.ts","../../../../node_modules/typescript/lib/lib.es2019.symbol.d.ts","../../../../node_modules/typescript/lib/lib.es2019.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.bigint.d.ts","../../../../node_modules/typescript/lib/lib.es2020.date.d.ts","../../../../node_modules/typescript/lib/lib.es2020.promise.d.ts","../../../../node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","../../../../node_modules/typescript/lib/lib.es2020.string.d.ts","../../../../node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","../../../../node_modules/typescript/lib/lib.es2020.intl.d.ts","../../../../node_modules/typescript/lib/lib.es2020.number.d.ts","../../../../node_modules/typescript/lib/lib.esnext.intl.d.ts","../../../teleport-types/dist/cjs/helper.d.ts","../../../teleport-types/dist/cjs/uidl.d.ts","../../../../node_modules/@babel/types/lib/index.d.ts","../../../teleport-types/dist/cjs/generators.d.ts","../../../teleport-types/dist/cjs/errors.d.ts","../../../teleport-types/dist/cjs/vuidl.d.ts","../../../teleport-types/dist/cjs/index.d.ts","../../src/constants/index.ts","../../src/utils/js-identifiers.ts","../../src/utils/string-utils.ts","../../src/utils/uidl-utils.ts","../../src/utils/generic.ts","../../src/utils/local-imports.ts","../../src/utils/ast-scope.ts","../../src/utils/ast-statement-order.ts","../../src/utils/ast-effect-cleanup.ts","../../src/utils/route-paths.ts","../../src/utils/layout-topology.ts","../../src/utils/html-content-model.ts","../../src/utils/style-declarations.ts","../../src/utils/storefront-tax.ts","../../src/utils/product-discounts.ts","../../src/utils/product-ratings.ts","../../src/utils/font-preconnect.ts","../../src/utils/email-date.ts","../../src/utils/rich-text-embeds.ts","../../src/utils/rich-text-embeds-codegen.ts","../../src/cache/constants.ts","../../src/cache/client-runtime.ts","../../src/cache/server-runtime.ts","../../src/cache/version-store.ts","../../src/cache/api-routes.ts","../../src/cache/index.ts","../../src/page-revalidate/constants.ts","../../src/page-revalidate/api-route.ts","../../src/page-revalidate/index.ts","../../src/index.ts","../../../../node_modules/@types/node/assert.d.ts","../../../../node_modules/@types/node/assert/strict.d.ts","../../../../node_modules/buffer/index.d.ts","../../../../node_modules/undici-types/header.d.ts","../../../../node_modules/undici-types/readable.d.ts","../../../../node_modules/undici-types/file.d.ts","../../../../node_modules/undici-types/fetch.d.ts","../../../../node_modules/undici-types/formdata.d.ts","../../../../node_modules/undici-types/connector.d.ts","../../../../node_modules/undici-types/client.d.ts","../../../../node_modules/undici-types/errors.d.ts","../../../../node_modules/undici-types/dispatcher.d.ts","../../../../node_modules/undici-types/global-dispatcher.d.ts","../../../../node_modules/undici-types/global-origin.d.ts","../../../../node_modules/undici-types/pool-stats.d.ts","../../../../node_modules/undici-types/pool.d.ts","../../../../node_modules/undici-types/handlers.d.ts","../../../../node_modules/undici-types/balanced-pool.d.ts","../../../../node_modules/undici-types/agent.d.ts","../../../../node_modules/undici-types/mock-interceptor.d.ts","../../../../node_modules/undici-types/mock-agent.d.ts","../../../../node_modules/undici-types/mock-client.d.ts","../../../../node_modules/undici-types/mock-pool.d.ts","../../../../node_modules/undici-types/mock-errors.d.ts","../../../../node_modules/undici-types/proxy-agent.d.ts","../../../../node_modules/undici-types/api.d.ts","../../../../node_modules/undici-types/cookies.d.ts","../../../../node_modules/undici-types/patch.d.ts","../../../../node_modules/undici-types/filereader.d.ts","../../../../node_modules/undici-types/diagnostics-channel.d.ts","../../../../node_modules/undici-types/websocket.d.ts","../../../../node_modules/undici-types/content-type.d.ts","../../../../node_modules/undici-types/cache.d.ts","../../../../node_modules/undici-types/interceptors.d.ts","../../../../node_modules/undici-types/index.d.ts","../../../../node_modules/@types/node/globals.d.ts","../../../../node_modules/@types/node/async_hooks.d.ts","../../../../node_modules/@types/node/buffer.d.ts","../../../../node_modules/@types/node/child_process.d.ts","../../../../node_modules/@types/node/cluster.d.ts","../../../../node_modules/@types/node/console.d.ts","../../../../node_modules/@types/node/constants.d.ts","../../../../node_modules/@types/node/crypto.d.ts","../../../../node_modules/@types/node/dgram.d.ts","../../../../node_modules/@types/node/diagnostics_channel.d.ts","../../../../node_modules/@types/node/dns.d.ts","../../../../node_modules/@types/node/dns/promises.d.ts","../../../../node_modules/@types/node/domain.d.ts","../../../../node_modules/@types/node/dom-events.d.ts","../../../../node_modules/@types/node/events.d.ts","../../../../node_modules/@types/node/fs.d.ts","../../../../node_modules/@types/node/fs/promises.d.ts","../../../../node_modules/@types/node/http.d.ts","../../../../node_modules/@types/node/http2.d.ts","../../../../node_modules/@types/node/https.d.ts","../../../../node_modules/@types/node/inspector.d.ts","../../../../node_modules/@types/node/module.d.ts","../../../../node_modules/@types/node/net.d.ts","../../../../node_modules/@types/node/os.d.ts","../../../../node_modules/@types/node/path.d.ts","../../../../node_modules/@types/node/perf_hooks.d.ts","../../../../node_modules/@types/node/process.d.ts","../../../../node_modules/@types/node/punycode.d.ts","../../../../node_modules/@types/node/querystring.d.ts","../../../../node_modules/@types/node/readline.d.ts","../../../../node_modules/@types/node/readline/promises.d.ts","../../../../node_modules/@types/node/repl.d.ts","../../../../node_modules/@types/node/stream.d.ts","../../../../node_modules/@types/node/stream/promises.d.ts","../../../../node_modules/@types/node/stream/consumers.d.ts","../../../../node_modules/@types/node/stream/web.d.ts","../../../../node_modules/@types/node/string_decoder.d.ts","../../../../node_modules/@types/node/test.d.ts","../../../../node_modules/@types/node/timers.d.ts","../../../../node_modules/@types/node/timers/promises.d.ts","../../../../node_modules/@types/node/tls.d.ts","../../../../node_modules/@types/node/trace_events.d.ts","../../../../node_modules/@types/node/tty.d.ts","../../../../node_modules/@types/node/url.d.ts","../../../../node_modules/@types/node/util.d.ts","../../../../node_modules/@types/node/v8.d.ts","../../../../node_modules/@types/node/vm.d.ts","../../../../node_modules/@types/node/wasi.d.ts","../../../../node_modules/@types/node/worker_threads.d.ts","../../../../node_modules/@types/node/zlib.d.ts","../../../../node_modules/@types/node/globals.global.d.ts","../../../../node_modules/@types/node/index.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/cleanupSemantic.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/diffLines.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/printDiffs.d.ts","../../../../node_modules/@types/jest/node_modules/jest-diff/build/index.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/types.d.ts","../../../../node_modules/@types/jest/node_modules/pretty-format/build/index.d.ts","../../../../node_modules/@types/jest/index.d.ts","../../../../node_modules/@types/jest/ts3.2/index.d.ts"],"fileInfos":[{"version":"8730f4bf322026ff5229336391a18bcaa1f94d4f82416c8b2f3954e2ccaae2ba","affectsGlobalScope":true},"dc47c4fa66b9b9890cf076304de2a9c5201e94b740cffdf09f87296d877d71f6","7a387c58583dfca701b6c85e0adaf43fb17d590fb16d5b2dc0a2fbd89f35c467","8a12173c586e95f4433e0c6dc446bc88346be73ffe9ca6eec7aa63c8f3dca7f9","5f4e733ced4e129482ae2186aae29fde948ab7182844c3a5a51dd346182c7b06","4b421cbfb3a38a27c279dec1e9112c3d1da296f77a1a85ddadf7e7a425d45d18","1fc5ab7a764205c68fa10d381b08417795fc73111d6dd16b5b1ed36badb743d9",{"version":"3aafcb693fe5b5c3bd277bd4c3a617b53db474fe498fc5df067c5603b1eebde7","affectsGlobalScope":true},{"version":"adb996790133eb33b33aadb9c09f15c2c575e71fb57a62de8bf74dbf59ec7dfb","affectsGlobalScope":true},{"version":"8cc8c5a3bac513368b0157f3d8b31cfdcfe78b56d3724f30f80ed9715e404af8","affectsGlobalScope":true},{"version":"cdccba9a388c2ee3fd6ad4018c640a471a6c060e96f1232062223063b0a5ac6a","affectsGlobalScope":true},{"version":"c5c05907c02476e4bde6b7e76a79ffcd948aedd14b6a8f56e4674221b0417398","affectsGlobalScope":true},{"version":"5f406584aef28a331c36523df688ca3650288d14f39c5d2e555c95f0d2ff8f6f","affectsGlobalScope":true},{"version":"22f230e544b35349cfb3bd9110b6ef37b41c6d6c43c3314a31bd0d9652fcec72","affectsGlobalScope":true},{"version":"7ea0b55f6b315cf9ac2ad622b0a7813315bb6e97bf4bb3fbf8f8affbca7dc695","affectsGlobalScope":true},{"version":"3013574108c36fd3aaca79764002b3717da09725a36a6fc02eac386593110f93","affectsGlobalScope":true},{"version":"eb26de841c52236d8222f87e9e6a235332e0788af8c87a71e9e210314300410a","affectsGlobalScope":true},{"version":"3be5a1453daa63e031d266bf342f3943603873d890ab8b9ada95e22389389006","affectsGlobalScope":true},{"version":"17bb1fc99591b00515502d264fa55dc8370c45c5298f4a5c2083557dccba5a2a","affectsGlobalScope":true},{"version":"7ce9f0bde3307ca1f944119f6365f2d776d281a393b576a18a2f2893a2d75c98","affectsGlobalScope":true},{"version":"6a6b173e739a6a99629a8594bfb294cc7329bfb7b227f12e1f7c11bc163b8577","affectsGlobalScope":true},{"version":"81cac4cbc92c0c839c70f8ffb94eb61e2d32dc1c3cf6d95844ca099463cf37ea","affectsGlobalScope":true},{"version":"b0124885ef82641903d232172577f2ceb5d3e60aed4da1153bab4221e1f6dd4e","affectsGlobalScope":true},{"version":"0eb85d6c590b0d577919a79e0084fa1744c1beba6fd0d4e951432fa1ede5510a","affectsGlobalScope":true},{"version":"da233fc1c8a377ba9e0bed690a73c290d843c2c3d23a7bd7ec5cd3d7d73ba1e0","affectsGlobalScope":true},{"version":"d154ea5bb7f7f9001ed9153e876b2d5b8f5c2bb9ec02b3ae0d239ec769f1f2ae","affectsGlobalScope":true},{"version":"bb2d3fb05a1d2ffbca947cc7cbc95d23e1d053d6595391bd325deb265a18d36c","affectsGlobalScope":true},{"version":"c80df75850fea5caa2afe43b9949338ce4e2de086f91713e9af1a06f973872b8","affectsGlobalScope":true},{"version":"9d57b2b5d15838ed094aa9ff1299eecef40b190722eb619bac4616657a05f951","affectsGlobalScope":true},{"version":"6c51b5dd26a2c31dbf37f00cfc32b2aa6a92e19c995aefb5b97a3a64f1ac99de","affectsGlobalScope":true},{"version":"6e7997ef61de3132e4d4b2250e75343f487903ddf5370e7ce33cf1b9db9a63ed","affectsGlobalScope":true},{"version":"2ad234885a4240522efccd77de6c7d99eecf9b4de0914adb9a35c0c22433f993","affectsGlobalScope":true},{"version":"5e5e095c4470c8bab227dbbc61374878ecead104c74ab9960d3adcccfee23205","affectsGlobalScope":true},{"version":"09aa50414b80c023553090e2f53827f007a301bc34b0495bfb2c3c08ab9ad1eb","affectsGlobalScope":true},{"version":"d7f680a43f8cd12a6b6122c07c54ba40952b0c8aa140dcfcf32eb9e6cb028596","affectsGlobalScope":true},{"version":"3787b83e297de7c315d55d4a7c546ae28e5f6c0a361b7a1dcec1f1f50a54ef11","affectsGlobalScope":true},{"version":"e7e8e1d368290e9295ef18ca23f405cf40d5456fa9f20db6373a61ca45f75f40","affectsGlobalScope":true},{"version":"faf0221ae0465363c842ce6aa8a0cbda5d9296940a8e26c86e04cc4081eea21e","affectsGlobalScope":true},{"version":"06393d13ea207a1bfe08ec8d7be562549c5e2da8983f2ee074e00002629d1871","affectsGlobalScope":true},{"version":"2768ef564cfc0689a1b76106c421a2909bdff0acbe87da010785adab80efdd5c","affectsGlobalScope":true},{"version":"b248e32ca52e8f5571390a4142558ae4f203ae2f94d5bac38a3084d529ef4e58","affectsGlobalScope":true},{"version":"52d1bb7ab7a3306fd0375c8bff560feed26ed676a5b0457fa8027b563aecb9a4","affectsGlobalScope":true},"14fc7efae8b184b18019a5906c6f6de752823b44ff1acf7924bbdc8877ded21b","dfdb483de9b11a6a4b821c95b90b899c1db51423f0cd014ea936a048d3ffe8de","8d27e5f73b75340198b2df36f39326f693743e64006bd7b88a925a5f285df628","1adf52df4f197a19525caa1722d6bfd30a883dba759598a24d75c4239c84619f","71a689048584cde03cb508408ae7c3b04ad8f10af887865e8b65c27ed9d91488","d9118ed71b9968fea213b070209081a1b1c378b55ddcd026fb1ae8a7f52c15b7","6ba1631f84ef4507073189c4ada06d6de8bac89375ea3b49e34e49006cc44a3f",{"version":"11650c5bddaa406f3d38215ee50e9b7ef974a4cd547c232d318e440ec9765b6b","signature":"950376ec316f431002898dc46c9e712d4df602735e79710032f82ff7cb0ff639"},{"version":"a3a7229dea45fec3b66fb3db95ea86b6f79456d53b01124be574234b855e7f33","signature":"9ea2bd139a31e4bcccbaaf18a67b1ffce16768d35396263d271deb29da1d6f3d"},{"version":"c24f079ec435435dcfa36db980f1da9fa965af8458308a1e4a635d33ad1f8a93","signature":"5fe9ca7b6dc98850f1b426855662f868e86c375e86c7f5486ad4692bc2572fde"},{"version":"8a2a94472cdd6a36100128806588f6e7df23e28f062cdc346b8201af7b7317da","signature":"ffebee2a958508484af19fffc046c9c69ae120bdfd7b452f143219e05e97c20b"},{"version":"d36d38e7840bb5eb64570d6a75b4cda6b30f810ff28e788eabbe20f2ca6ec20d","signature":"def6a19b93529e8c08bb970740d56ecfce4d17a3c495a49761636087f6c80c4a"},{"version":"6cd90a046b174d27446a3682bdfdf31b56f0f566796d0345395d3a409dd9284c","signature":"dfda7fae8dc2ce6b5f728ccdf83f252923d50f47cb9535b18e34bc0d34c5a985"},{"version":"d5d7bef99b9b58cb67c8a18f1a1a1a74ad36e707226181dc5306f5fd56875bdf","signature":"b290a1d459a7028ae36165b73a69a4877c73f4dd72af733964b55110882c3216"},{"version":"bf4571325f6084257e36752366f3c2196c4d1489a46e53854fab86f76f700189","signature":"3816fd253a52b0f8dedd04c55eb2d77d0aa4f1c92707fb50cf14a5d1aa3869dd"},{"version":"19c4db2864f00fb2a76efa2f7d8dcf04a2b5a05742e96781166571c6d2250320","signature":"a36f3d868428938cd620deb11cd0747f31fab1c490d54224e99ac8ea6a270220"},{"version":"3805506eba293e77c14ddcbff35b0aa053b4de13137abc9ebed48ce8dca1fe49","signature":"d487aeebf39008a9b79a9c44a4943bfac9131afe5bb67f6f91319c91f0b74d2b"},{"version":"ec521fde10cc9bbb583b13eb7d9f426c715290c9766554e331040bbc208b688e","signature":"d00b4720674bd31c264f1add708dfeedcb80432a76541c91e38f867b434e0331"},{"version":"3385231c8904b943ead6ae26402c71c270c801a1a04dcf711b37d1fc8b1949c6","signature":"448d42608cb5eab83dc8fff0baac2cea61c5bfa654bc4c18b7640c61b4a8a72f"},{"version":"b4a28d604c143417486a5f5edc69c76ad8c7675d2fb453d1cf47d69831400e04","signature":"0dd5553c80b72c9796c41a5cbea3b2d5ad430651569efceaf08b982ccf4a2f5e"},{"version":"85db6d2b55c2d9802a66ecb6ecf1f41889f38e7075d4b77efc3aeeb83608c9f8","signature":"29fed62b94aa759c78d2ade5cf35805b6c4a287c457f92b874bc72a0cb0238ae"},{"version":"402224f379e89fda21400c1e98701843fdde8746bed0fa5b8f8a837ca3a4d224","signature":"e6104a2be1332eb0de3fed325b86aab795be0f618407652cc90f24daacd74a11"},{"version":"a5152661651e56d7de6157afbe27b1ce3715b3d9409953a9e297ab12023b6aff","signature":"ea13b757647c1a972e5e2c8fe2d1127c7964a2a304d41b28f611024faba50836"},{"version":"07ef3048fe039893ec7001370abfb9725fd76dbade6ed3a0c6596f402e352df3","signature":"4e1c5b37b16c856d27e2ad000ecc24644d868a279e2c6910d56b9d5a81da2fe6"},{"version":"ecb1d950b0a0ab1d0fde6552253857281e515dfd00e7f894669c275ad4ae4436","signature":"0ad3df2740f91e7b7a6191972283d1af25d5f544d4a9ab1df9c41427f09d93fa"},{"version":"4bd6366f8de24dde2e31a494273232cc32d7c0ea564592ea8b7610901cf9478b","signature":"51634cb824ba91140770f4ac7311304479e33f151134f3521e088e14cd235dc5"},{"version":"071ad09f6345127de75e27f8379f30c56d02c72e6ab42819dae454e6b47d388f","signature":"7597acbd22e33e358945a8acf664f517c3dac69d9689bceed60cb13716771f95"},{"version":"f1605474f305995c2b2d8e7d48a8cdd72a2ae57ebbb47ed07bc9abfbf49ffeb1","signature":"5b58f892097fb651076e5be6a77a95c8343a5a84d54dab0ffd97a9450aa39c74"},{"version":"d67f5b62fe97d3f8036fb5c46396f7e65c01eb7124a56926ec7fa8f0857f21da","signature":"35fd626998b26ab1272bf57d013b6d133f3bd3a00eabd4a7b9d9c9312026ae8d"},{"version":"cfefe3982eb13d34b267f265850486badb5b7898edef0a829b17b3c258324575","signature":"03cbc47f7121335ef90a6deca986aaeb999a93252f3f7781867bf793e8a8d0e3"},{"version":"61339f04368d0e7c9a6f8719713be60e561adc6fb6587c33b44a4770ce0247e7","signature":"bf2b32b9d75b611ee022f889ba550d13e0bd14c2deeb1e4d89ce22544e23a1d0"},{"version":"e38653fbd95c5f8178b20faad66bf94a138ba8735a4923e92d810f96e9c20fc3","signature":"c4ccebbab1965eb732ff59c5127b9e177f4a5e2213ea8fa086d7ec6ace62d416"},{"version":"a7f1d2060c1ee57d44ea8f97f242e5b41f95ff4db1963660c9e199a22e1824ce","signature":"6d14d871eae84e541ef7c400686573943068eea5f6ccafa6bf7578ba2abc77a6"},{"version":"5e95fcbdce633bfd470930f0ab735ee050caa10b2ec17309c2f0525774997c36","signature":"5b3d935d994f5f1e5c16fbe3f5f58dec6747b79ba28db27a1df2d5e7dec42d1d"},{"version":"2ae95932d3dd08cd2cd5a576ac7791317152b430934bdf611717343055eb701f","signature":"c910ef78eae5387ab1df8977cb62753621a62e266c6526752a9b88cee0100248"},{"version":"8e009708e9b57945cd2395a3858a5d79e2234e1559ce2ee349fe584a66c50e00","signature":"5df60b82d73860d9bb138a4c57a390e725c768a52bd69fa1a3001d99466ca99b"},{"version":"1237a3cf81d300296e971c8ee6f0735975aee72f256bafd1560734236f6fe418","signature":"b06949baec5bbacf3662a82a3544a6b6bac693687f8e1aa6326ecd155f99fd5a"},"0b4bc32128fda7bb0752cf284730dd3a817aae04a3d7f92e3b2d54bd61362fe1","7394959e5a741b185456e1ef5d64599c36c60a323207450991e7a42e08911419","4967529644e391115ca5592184d4b63980569adf60ee685f968fd59ab1557188","5929864ce17fba74232584d90cb721a89b7ad277220627cc97054ba15a98ea8f","7180c03fd3cb6e22f911ce9ba0f8a7008b1a6ddbe88ccf16a9c8140ef9ac1686","25c8056edf4314820382a5fdb4bb7816999acdcb929c8f75e3f39473b87e85bc","54cb85a47d760da1c13c00add10d26b5118280d44d58e6908d8e89abbd9d7725","3e4825171442666d31c845aeb47fcd34b62e14041bb353ae2b874285d78482aa","c6fd2c5a395f2432786c9cb8deb870b9b0e8ff7e22c029954fabdd692bff6195","a967bfe3ad4e62243eb604bf956101e4c740f5921277c60debaf325c1320bf88","e9775e97ac4877aebf963a0289c81abe76d1ec9a2a7778dbe637e5151f25c5f3","471e1da5a78350bc55ef8cef24eb3aca6174143c281b8b214ca2beda51f5e04a","cadc8aced301244057c4e7e73fbcae534b0f5b12a37b150d80e5a45aa4bebcbd","385aab901643aa54e1c36f5ef3107913b10d1b5bb8cbcd933d4263b80a0d7f20","9670d44354bab9d9982eca21945686b5c24a3f893db73c0dae0fd74217a4c219","db3435f3525cd785bf21ec6769bf8da7e8a776be1a99e2e7efb5f244a2ef5fee","c3b170c45fc031db31f782e612adf7314b167e60439d304b49e704010e7bafe5","40383ebef22b943d503c6ce2cb2e060282936b952a01bea5f9f493d5fb487cc7","4893a895ea92c85345017a04ed427cbd6a1710453338df26881a6019432febdd","3a84b7cb891141824bd00ef8a50b6a44596aded4075da937f180c90e362fe5f6","13f6f39e12b1518c6650bbb220c8985999020fe0f21d818e28f512b7771d00f9","9b5369969f6e7175740bf51223112ff209f94ba43ecd3bb09eefff9fd675624a","4fe9e626e7164748e8769bbf74b538e09607f07ed17c2f20af8d680ee49fc1da","24515859bc0b836719105bb6cc3d68255042a9f02a6022b3187948b204946bd2","33203609eba548914dc83ddf6cadbc0bcb6e8ef89f6d648ca0908ae887f9fcc5","0db18c6e78ea846316c012478888f33c11ffadab9efd1cc8bcc12daded7a60b6","89167d696a849fce5ca508032aabfe901c0868f833a8625d5a9c6e861ef935d2","e53a3c2a9f624d90f24bf4588aacd223e7bec1b9d0d479b68d2f4a9e6011147f","339dc5265ee5ed92e536a93a04c4ebbc2128f45eeec6ed29f379e0085283542c","9f0a92164925aa37d4a5d9dd3e0134cff8177208dba55fd2310cd74beea40ee2","8bfdb79bf1a9d435ec48d9372dc93291161f152c0865b81fc0b2694aedb4578d","2e85db9e6fd73cfa3d7f28e0ab6b55417ea18931423bd47b409a96e4a169e8e6","c46e079fe54c76f95c67fb89081b3e399da2c7d109e7dca8e4b58d83e332e605","d32275be3546f252e3ad33976caf8c5e842c09cb87d468cb40d5f4cf092d1acc","4a0c3504813a3289f7fb1115db13967c8e004aa8e4f8a9021b95285502221bd1",{"version":"5f290ea7efbe9d8431e10df12c0d5672b67988e7c171c2d356749fac70347a55","affectsGlobalScope":true},"39b1a50d543770780b0409a4caacb87f3ff1d510aedfeb7dc06ed44188256f89",{"version":"49c89f8fa09d21c161e6a367448639e032f42d77cc2ec8ab54ecb8fa9a3ad59f","affectsGlobalScope":true},"e4b50850c2a62c7750428e452ee24b167180104d514d5e5c0ca691753365f610","304504c854c47a55ab4a89111a27a2daf8a3614740bd787cc1f2c51e5574239c",{"version":"95f9129a37dcace36e17b061a8484952586ecfe928c9c8ce526de1a2f4aaefa7","affectsGlobalScope":true},"a40826e8476694e90da94aa008283a7de50d1dafd37beada623863f1901cb7fb","0f9061846236850a872cb44097d071631e93c8749a8b16c191fe3c2a48faede4","e46fa644658c2d6e5c85e954ea76b92c97d63f0851d3ccdab8c2a80d5962aaa9","1c611ff373ce1958aafc40b328048ac2540ba5c7f373cf2897e0d9aeaabe90a0","a307d22a0130ac94c1a17fffa6d57ac272deb5838cb966a9420911d259cdf1be","d2e415abf6cb81ac9e2700b4db5ea7be76b997e812285b8e5e1e414eb2750b6e","09d6cebdced6aa1181ac1523c8f22a133f5ed80589678b64051f0602f0518374",{"version":"ee1ee365d88c4c6c0c0a5a5701d66ebc27ccd0bcfcfaa482c6e2e7fe7b98edf7","affectsGlobalScope":true},{"version":"7c35691dc3972ff1507d8dd279d833f540973d0917bde22e191cf7a8feaac29f","affectsGlobalScope":true},"62662d7a886e5cfa870685720fd27b763743ca4d2cf29326f75d76606a64eadd","b8c670688bd228d3cc9c169690b09b687188c50ff263a94df63b207701105ad9","d8e16905907111390d5a943816306ae997dfe56476f14142166f8b13ee322eea","8068c911a1c40bc6c5ffc58c625b21d807778f6aa6d63a73e6f04f88bcac5b79","a1dbce56ad5f3a37caafb9033c9d190a199217d673f5fa099c8968d471a2fdaa","c6f77efcc19f51c8759779b6b6ee0d88046c15c15dadac8ffed729a6620daf39",{"version":"089867511b37a534ae71f3d9bc97acc0b925b7f5dbec113f98c4b49224c694eb","affectsGlobalScope":true},"269d0ea3202820c29a32c1f2a357837a4f1918426844f7e7c90af15ec40d1dc1","66432f885e30cf471573de22a5af5eca9ab46b37b122aec98beadf77e9b7df24","323506ce173f7f865f42f493885ee3dacd18db6359ea1141d57676d3781ce10c",{"version":"034e635df3c014df1d6b1110b724ca0c4d2d324b45a84974c7d6931f9cf95ea7","affectsGlobalScope":true},{"version":"87f9456115554cb0f78f098ddbd585096871c19d2d05274c1b1b4ade3151da78","affectsGlobalScope":true},"ea3ab3727cd6c222d94003ecafa30e8550c61eadcdabbf59514aee76e86211a5","d3cdd41693c5ed6bec4f1a1c399d9501372b14bd341bc46eedacf2854c5df5a7","2de7a21c92226fb8abbeed7a0a9bd8aa6d37e4c68a8c7ff7938c644267e9fcc1","6d6070c5c81ba0bfe58988c69e3ba3149fc86421fd383f253aeb071cbf29cd41","da618f0ea09d95c3b51514de43bf97dab008c85bede58aa57cf95e4984c7c957","48a35b181ecf47dbbc0a7ab4b5ba778d91eaa838ba42bf4aaaead42be77ef39a","269929a24b2816343a178008ac9ae9248304d92a8ba8e233055e0ed6dbe6ef71","93452d394fdd1dc551ec62f5042366f011a00d342d36d50793b3529bfc9bd633","5195aeb0de306d1c5ca8033457fbcab5987657112fa6d4971cfeb7644493a369","c5dbf0003bc9f0f643e54cd00a3868d1afe85497fecb56be6f2373dc85102924",{"version":"ce73eb199c4bf96c015f069aac161488ed73ebeaea3d87b6d5aa9a968a7b38d4","affectsGlobalScope":true},{"version":"300f8e9de0b0c3482be3e749462b6ebc3dab8a316801f1da0def94aed0cd2018","affectsGlobalScope":true},"4e228e78c1e9b0a75c70588d59288f63a6258e8b1fe4a67b0c53fe03461421d9","962f105729d5b888c8b70e193f6020ee92c6c8144c827de40f80d65dd188ad7f","ac74e2b754fba690036f8221d978f6debb867462b87af254f24e924b677395d0","80858f6de9af22e53aff221fe3590215ea544c2aeb2cc60cf8e08a9c785c8fef",{"version":"068b8ee5c2cd90d7a50f2efadbbe353cb10196a41189a48bf4b2a867363012b4","affectsGlobalScope":true},{"version":"340659b96782f5813aad6c1f89ea1b83b2f3fa993115c7b30366375d9bae5a4e","affectsGlobalScope":true},"6f44a190351ab5e1811abebe007cf60518044772ccc08244f9f241706afa767f","fecdf44bec4ee9c5188e5f2f58c292c9689c02520900dceaaa6e76594de6da90","cf45d0510b661f1da461479851ff902f188edb111777c37055eff12fa986a23a",{"version":"895ca532c15c77cbb6a871af1870b57bcd0ca4f38a1bd69669dd0e95bb58565a","affectsGlobalScope":true},"f2b9440f98d6f94c8105883a2b65aee2fce0248f71f41beafd0a80636f3a565d",{"version":"ab9b9a36e5284fd8d3bf2f7d5fcbc60052f25f27e4d20954782099282c60d23e","affectsGlobalScope":true},"b510d0a18e3db42ac9765d26711083ec1e8b4e21caaca6dc4d25ae6e8623f447","e222104af6cb9415238ad358488b74d76eceeff238c1268ec6e85655b05341da","69da61a7b5093dac77fa3bec8be95dcf9a74c95a0e9161edb98bb24e30e439d2","eba230221317c985ab1953ccc3edc517f248b37db4fef7875cb2c8d08aff7be7","b83e796810e475da3564c6515bc0ae9577070596a33d89299b7d99f94ecfd921","b4439890c168d646357928431100daac5cbdee1d345a34e6bf6eca9f3abe22bc","5d72971a459517c44c1379dab9ed248e87a61ba0a1e0f25c9d67e1e640cd9a09","02d734976af36f4273d930bea88b3e62adf6b078cf120c1c63d49aa8d8427c5c",{"version":"f624e578325b8c58e55b30c998b1f4c3ec1b61a9fa66373da4250c89b7880d44","affectsGlobalScope":true},{"version":"d3002f620eab4bf6476c9da5c0efb2041d46f7df8b3032a5631bd206abef2c75","affectsGlobalScope":true}],"options":{"allowSyntheticDefaultImports":true,"declaration":true,"declarationMap":true,"emitDecoratorMetadata":true,"esModuleInterop":true,"experimentalDecorators":true,"module":99,"noImplicitAny":true,"noUnusedLocals":true,"noUnusedParameters":true,"outDir":"./","sourceMap":true,"target":1},"fileIdsList":[[171,173],[167,168],[167,168,169,170],[172],[174],[80],[116],[117,122,150],[118,129,130,137,147,158],[118,119,129,137],[120,159],[121,122,130,138],[122,147,155],[123,125,129,137],[116,124],[125,126],[129],[127,129],[116,129],[129,130,131,147,158],[129,130,131,144,147,150],[114,163],[125,129,132,137,147,158],[129,130,132,133,137,147,155,158],[132,134,147,155,158],[80,81,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165],[129,135],[136,158,163],[125,129,137,147],[138],[139],[116,140],[141,157,163],[142],[143],[129,144,145],[144,146,159,161],[117,129,147,148,149,150],[117,147,149],[147,148],[150],[151],[116,147],[129,153,154],[153,154],[122,137,147,155],[156],[137,157],[117,132,143,158],[122,159],[147,160],[136,161],[162],[117,122,129,131,140,147,158,161,163],[147,164],[91,95,158],[91,147,158],[86],[88,91,155,158],[137,155],[166],[86,166],[88,91,137,158],[83,84,87,90,117,129,147,158],[83,89],[87,91,117,150,158,166],[117,166],[107,117,166],[85,86,166],[91],[85,86,87,88,89,90,91,92,93,95,96,97,98,99,100,101,102,103,104,105,106,108,109,110,111,112,113],[91,98,99],[89,91,99,100],[90],[83,86,91],[91,95,99,100],[95],[89,91,94,158],[83,88,89,91,95,98],[117,147],[86,91,107,117,163,166],[70],[70,71,72,73,74],[49],[50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,75,78],[70,76],[76,77],[45,56],[45],[49,139],[68],[51],[49,52,79,139],[44,45],[44,46,47,48],[43],[43,44]],"referencedMap":[[174,1],[169,2],[171,3],[170,2],[173,4],[175,5],[80,6],[81,6],[116,7],[117,8],[118,9],[119,10],[120,11],[121,12],[122,13],[123,14],[124,15],[125,16],[126,16],[128,17],[127,18],[129,19],[130,20],[131,21],[115,22],[132,23],[133,24],[134,25],[166,26],[135,27],[136,28],[137,29],[138,30],[139,31],[140,32],[141,33],[142,34],[143,35],[144,36],[145,36],[146,37],[147,38],[149,39],[148,40],[150,41],[151,42],[152,43],[153,44],[154,45],[155,46],[156,47],[157,48],[158,49],[159,50],[160,51],[161,52],[162,53],[163,54],[164,55],[98,56],[105,57],[97,56],[112,58],[89,59],[88,60],[111,61],[106,62],[109,63],[91,64],[90,65],[86,66],[85,67],[108,68],[87,69],[92,70],[96,70],[114,71],[113,70],[100,72],[101,73],[103,74],[99,75],[102,76],[107,61],[94,77],[95,78],[104,79],[84,80],[110,81],[74,82],[71,82],[75,83],[72,82],[73,82],[50,84],[79,85],[77,86],[78,87],[58,88],[56,89],[57,88],[54,90],[60,84],[55,84],[69,91],[63,84],[52,92],[62,84],[53,93],[46,94],[49,95],[44,96],[48,97]],"exportedModulesMap":[[174,1],[169,2],[171,3],[170,2],[173,4],[175,5],[80,6],[81,6],[116,7],[117,8],[118,9],[119,10],[120,11],[121,12],[122,13],[123,14],[124,15],[125,16],[126,16],[128,17],[127,18],[129,19],[130,20],[131,21],[115,22],[132,23],[133,24],[134,25],[166,26],[135,27],[136,28],[137,29],[138,30],[139,31],[140,32],[141,33],[142,34],[143,35],[144,36],[145,36],[146,37],[147,38],[149,39],[148,40],[150,41],[151,42],[152,43],[153,44],[154,45],[155,46],[156,47],[157,48],[158,49],[159,50],[160,51],[161,52],[162,53],[163,54],[164,55],[98,56],[105,57],[97,56],[112,58],[89,59],[88,60],[111,61],[106,62],[109,63],[91,64],[90,65],[86,66],[85,67],[108,68],[87,69],[92,70],[96,70],[114,71],[113,70],[100,72],[101,73],[103,74],[99,75],[102,76],[107,61],[94,77],[95,78],[104,79],[84,80],[110,81],[75,83],[50,84],[79,85],[78,87],[58,89],[56,89],[57,89],[54,84],[60,84],[55,84],[63,84],[62,84],[53,84],[46,94],[49,95],[44,96],[48,97]],"semanticDiagnosticsPerFile":[45,174,167,169,171,170,168,173,172,175,80,81,116,117,118,119,120,121,122,123,124,125,126,128,127,129,130,131,115,165,132,133,134,166,135,136,137,138,139,140,141,142,143,144,145,146,147,149,148,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,82,8,10,9,2,11,12,13,14,15,16,17,18,3,4,22,19,20,21,23,24,25,5,26,27,28,29,6,33,30,31,32,34,7,35,40,41,36,37,38,39,1,42,98,105,97,112,89,88,111,106,109,91,90,86,85,108,87,92,93,96,83,114,113,100,101,103,99,102,107,94,95,104,84,110,74,71,70,75,72,73,50,79,77,76,78,58,56,57,67,66,54,61,51,60,55,64,65,69,68,59,63,52,62,53,47,46,43,49,44,48]},"version":"4.9.5"}
@@ -0,0 +1,40 @@
1
+ /**
2
+ * Preconnect hints for the font hosts a project's stylesheet links point at.
3
+ *
4
+ * ## Why this is worth a `<link>`
5
+ *
6
+ * A Google Fonts stylesheet is a two-hop dependency: the browser fetches the CSS
7
+ * from `fonts.googleapis.com`, parses it, and only THEN discovers the font files
8
+ * on `fonts.gstatic.com` — a second origin, needing its own DNS lookup, TCP
9
+ * handshake and TLS negotiation, all of it starting after the CSS has already
10
+ * come back. On a mobile connection that chain routinely costs a few hundred
11
+ * milliseconds of invisible or fallback text.
12
+ *
13
+ * Two `preconnect` hints in the head let both handshakes run in parallel with
14
+ * the CSS request instead of after it. It is the single cheapest font
15
+ * optimisation there is: two tags, no behaviour change, nothing to configure.
16
+ *
17
+ * ## Why `crossorigin` matters on the gstatic hint
18
+ *
19
+ * Font files are fetched in CORS mode. A preconnect without `crossorigin` opens
20
+ * a connection in the wrong mode, the browser cannot reuse it for the font
21
+ * request, and it opens a SECOND one — so the hint costs a connection instead of
22
+ * saving one. The stylesheet itself is a normal same-mode request and takes the
23
+ * plain hint.
24
+ */
25
+ /** One preconnect hint: an origin, and whether it needs CORS mode. */
26
+ export interface FontPreconnectHint {
27
+ href: string;
28
+ crossorigin: boolean;
29
+ }
30
+ /**
31
+ * The hints a project needs, in head order, or an empty list when it loads no
32
+ * fonts from a known host.
33
+ *
34
+ * Deliberately conservative: a preconnect to an origin the page never uses wastes
35
+ * a connection, so this only answers for hosts whose two-hop behaviour is known.
36
+ * A self-hosted font, or a font already inlined as `@font-face`, needs nothing —
37
+ * its files come from an origin the browser has connected to anyway.
38
+ */
39
+ export declare const resolveFontPreconnectHints: (assetPaths: ReadonlyArray<string | undefined>) => FontPreconnectHint[];
40
+ //# sourceMappingURL=font-preconnect.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-preconnect.d.ts","sourceRoot":"","sources":["../../../src/utils/font-preconnect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,sEAAsE;AACtE,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,OAAO,CAAA;CACrB;AAKD;;;;;;;;GAQG;AACH,eAAO,MAAM,0BAA0B,eACzB,cAAc,MAAM,GAAG,SAAS,CAAC,KAC5C,kBAAkB,EAepB,CAAA"}
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Preconnect hints for the font hosts a project's stylesheet links point at.
3
+ *
4
+ * ## Why this is worth a `<link>`
5
+ *
6
+ * A Google Fonts stylesheet is a two-hop dependency: the browser fetches the CSS
7
+ * from `fonts.googleapis.com`, parses it, and only THEN discovers the font files
8
+ * on `fonts.gstatic.com` — a second origin, needing its own DNS lookup, TCP
9
+ * handshake and TLS negotiation, all of it starting after the CSS has already
10
+ * come back. On a mobile connection that chain routinely costs a few hundred
11
+ * milliseconds of invisible or fallback text.
12
+ *
13
+ * Two `preconnect` hints in the head let both handshakes run in parallel with
14
+ * the CSS request instead of after it. It is the single cheapest font
15
+ * optimisation there is: two tags, no behaviour change, nothing to configure.
16
+ *
17
+ * ## Why `crossorigin` matters on the gstatic hint
18
+ *
19
+ * Font files are fetched in CORS mode. A preconnect without `crossorigin` opens
20
+ * a connection in the wrong mode, the browser cannot reuse it for the font
21
+ * request, and it opens a SECOND one — so the hint costs a connection instead of
22
+ * saving one. The stylesheet itself is a normal same-mode request and takes the
23
+ * plain hint.
24
+ */
25
+ var GOOGLE_FONTS_STYLESHEET_HOST = 'fonts.googleapis.com';
26
+ var GOOGLE_FONTS_FILE_HOST = 'fonts.gstatic.com';
27
+ /**
28
+ * The hints a project needs, in head order, or an empty list when it loads no
29
+ * fonts from a known host.
30
+ *
31
+ * Deliberately conservative: a preconnect to an origin the page never uses wastes
32
+ * a connection, so this only answers for hosts whose two-hop behaviour is known.
33
+ * A self-hosted font, or a font already inlined as `@font-face`, needs nothing —
34
+ * its files come from an origin the browser has connected to anyway.
35
+ */
36
+ export var resolveFontPreconnectHints = function (assetPaths) {
37
+ var usesGoogleFonts = assetPaths.some(function (path) { return typeof path === 'string' && path.includes(GOOGLE_FONTS_STYLESHEET_HOST); });
38
+ if (!usesGoogleFonts) {
39
+ return [];
40
+ }
41
+ return [
42
+ { href: "https://".concat(GOOGLE_FONTS_STYLESHEET_HOST), crossorigin: false },
43
+ // CORS mode — see the note above; without it the connection is not reusable
44
+ // for the font files and the hint becomes a cost rather than a saving.
45
+ { href: "https://".concat(GOOGLE_FONTS_FILE_HOST), crossorigin: true },
46
+ ];
47
+ };
48
+ //# sourceMappingURL=font-preconnect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"font-preconnect.js","sourceRoot":"","sources":["../../../src/utils/font-preconnect.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAQH,IAAM,4BAA4B,GAAG,sBAAsB,CAAA;AAC3D,IAAM,sBAAsB,GAAG,mBAAmB,CAAA;AAElD;;;;;;;;GAQG;AACH,MAAM,CAAC,IAAM,0BAA0B,GAAG,UACxC,UAA6C;IAE7C,IAAM,eAAe,GAAG,UAAU,CAAC,IAAI,CACrC,UAAC,IAAI,IAAK,OAAA,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,CAAC,QAAQ,CAAC,4BAA4B,CAAC,EAAvE,CAAuE,CAClF,CAAA;IAED,IAAI,CAAC,eAAe,EAAE;QACpB,OAAO,EAAE,CAAA;KACV;IAED,OAAO;QACL,EAAE,IAAI,EAAE,kBAAW,4BAA4B,CAAE,EAAE,WAAW,EAAE,KAAK,EAAE;QACvE,4EAA4E;QAC5E,uEAAuE;QACvE,EAAE,IAAI,EAAE,kBAAW,sBAAsB,CAAE,EAAE,WAAW,EAAE,IAAI,EAAE;KACjE,CAAA;AACH,CAAC,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The aggregate-rating rule, as ES5 source for embedding into generated runtime
3
+ * code (the data-source product transform) that cannot import from this package.
4
+ *
5
+ * ⚠️ SECOND MIRROR. The editor/canvas copy is teleport-gui's
6
+ * `features/e-commerce/utils/product-ratings.ts`, and the two must agree exactly
7
+ * or the canvas shows one rating and the deployed store shows another — the
8
+ * divergence class that hid the variant picker for a whole release. The GUI's
9
+ * `utils/__tests__/product-rating-parity.spec.ts` and this package's
10
+ * `__tests__/product-ratings.test.ts` run the SAME fixture table against their
11
+ * respective copies.
12
+ *
13
+ * Three rules the whole feature rests on (stated in full in the GUI copy):
14
+ *
15
+ * - Only APPROVED reviews count. The predicate lives in the SQL, never here.
16
+ * - "No reviews" and "we could not look" both render as NOTHING — never as
17
+ * "0.0 ★☆☆☆☆", which reads as a product everyone hated.
18
+ * - The label and the stars round from the SAME number: one decimal for the
19
+ * label, that value snapped to the nearest half for the stars.
20
+ *
21
+ * Everything is prefixed `__pr` so the block can be concatenated into any
22
+ * generated module without colliding with its locals — it is emitted alongside
23
+ * the `__pd` discount helpers and the storefront-tax helpers.
24
+ */
25
+ export declare const generateProductRatingHelperCode: () => string;
26
+ //# sourceMappingURL=product-ratings.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-ratings.d.ts","sourceRoot":"","sources":["../../../src/utils/product-ratings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,eAAO,MAAM,+BAA+B,QAAO,MAyEjD,CAAA"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * The aggregate-rating rule, as ES5 source for embedding into generated runtime
3
+ * code (the data-source product transform) that cannot import from this package.
4
+ *
5
+ * ⚠️ SECOND MIRROR. The editor/canvas copy is teleport-gui's
6
+ * `features/e-commerce/utils/product-ratings.ts`, and the two must agree exactly
7
+ * or the canvas shows one rating and the deployed store shows another — the
8
+ * divergence class that hid the variant picker for a whole release. The GUI's
9
+ * `utils/__tests__/product-rating-parity.spec.ts` and this package's
10
+ * `__tests__/product-ratings.test.ts` run the SAME fixture table against their
11
+ * respective copies.
12
+ *
13
+ * Three rules the whole feature rests on (stated in full in the GUI copy):
14
+ *
15
+ * - Only APPROVED reviews count. The predicate lives in the SQL, never here.
16
+ * - "No reviews" and "we could not look" both render as NOTHING — never as
17
+ * "0.0 ★☆☆☆☆", which reads as a product everyone hated.
18
+ * - The label and the stars round from the SAME number: one decimal for the
19
+ * label, that value snapped to the nearest half for the stars.
20
+ *
21
+ * Everything is prefixed `__pr` so the block can be concatenated into any
22
+ * generated module without colliding with its locals — it is emitted alongside
23
+ * the `__pd` discount helpers and the storefront-tax helpers.
24
+ */
25
+ export var generateProductRatingHelperCode = function () { return "\n// \u2500\u2500 Aggregate product ratings \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\n// Turns the batched COUNT/AVG of a product's APPROVED reviews into the fields\n// the card and the details page bind: a one-decimal label, a count, a\n// 'true'/'false' gate and five per-slot fill states.\n//\n// Strings throughout (except the two numbers) to match the storefront's\n// string-equality convention: rendering conditions compare operands as TEXT and\n// a bound text node prints its value verbatim.\nvar __PR_MAX_STARS = 5;\n\n// Mean rounded to one decimal, clamped to the 1-5 scale. Clamping is not\n// paranoia: `rating` is a plain integer column and an import or a hand-written\n// UPDATE can put a 7 in it, which would ask for a star slot that does not exist.\nfunction __prRoundAverage(average) {\n var raw = Number(average);\n if (!isFinite(raw) || !(raw > 0)) return 0;\n var clamped = Math.min(__PR_MAX_STARS, raw);\n return Math.round(clamped * 10) / 10;\n}\n\n// The value the STARS are drawn from: the label average snapped to the nearest\n// half, so the stars can never disagree with the number printed beside them.\nfunction __prHalfStar(roundedAverage) {\n return Math.round(roundedAverage * 2) / 2;\n}\n\n// Fill state of one 1-based slot. At 4.5: slots 1-4 full, slot 5 half.\nfunction __prStarFill(slot, halfSnapped) {\n if (halfSnapped >= slot) return 'full';\n if (halfSnapped >= slot - 0.5) return 'half';\n return 'empty';\n}\n\n// Every product carries these keys; this is the \"no reviews\" answer, and it is\n// also what a FAILED lookup returns \u2014 the two are deliberately indistinguishable.\nfunction __prEmptyRatingFields() {\n return {\n ratingAverage: 0,\n ratingCount: 0,\n ratingAverageLabel: '',\n ratingCountLabel: '',\n hasRatings: 'false',\n ratingStar1: 'empty',\n ratingStar2: 'empty',\n ratingStar3: 'empty',\n ratingStar4: 'empty',\n ratingStar5: 'empty'\n };\n}\n\nfunction __prBuildRatingFields(aggregate) {\n var rawCount = aggregate ? Number(aggregate.count) : 0;\n var count = isFinite(rawCount) ? Math.max(0, Math.trunc(rawCount)) : 0;\n var average = __prRoundAverage(aggregate ? aggregate.average : 0);\n\n // A count with no usable average (every row NULL) is not a rating anyone can\n // read, so it degrades to \"no reviews\" rather than to zero stars.\n if (count <= 0 || average <= 0) return __prEmptyRatingFields();\n\n var half = __prHalfStar(average);\n return {\n ratingAverage: average,\n ratingCount: count,\n ratingAverageLabel: average.toFixed(1),\n ratingCountLabel: String(count),\n hasRatings: 'true',\n ratingStar1: __prStarFill(1, half),\n ratingStar2: __prStarFill(2, half),\n ratingStar3: __prStarFill(3, half),\n ratingStar4: __prStarFill(4, half),\n ratingStar5: __prStarFill(5, half)\n };\n}"; };
26
+ //# sourceMappingURL=product-ratings.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"product-ratings.js","sourceRoot":"","sources":["../../../src/utils/product-ratings.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,MAAM,CAAC,IAAM,+BAA+B,GAAG,cAAc,OAAA,0hGAyE3D,EAzE2D,CAyE3D,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teleporthq/teleport-shared",
3
- "version": "0.43.62",
3
+ "version": "0.43.63",
4
4
  "description": "A utility belt for the entire teleportHQ ecosystem",
5
5
  "author": "teleportHQ",
6
6
  "license": "MIT",
@@ -25,9 +25,9 @@
25
25
  },
26
26
  "dependencies": {
27
27
  "@babel/types": "^7.5.5",
28
- "@teleporthq/teleport-types": "^0.43.62",
28
+ "@teleporthq/teleport-types": "^0.43.63",
29
29
  "jss": "^10.0.0",
30
30
  "jss-preset-default": "^10.0.0"
31
31
  },
32
- "gitHead": "7f737c4c1bbabda1d95a0bee8a7d7c488ba17990"
32
+ "gitHead": "2c7a1001dd77ae05f54ff41f44acfa9f89a156b4"
33
33
  }