@liquidmetal-ai/raindrop 0.7.0 → 0.8.1

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 (178) hide show
  1. package/README.md +408 -73
  2. package/bin/cjs-shims.js +7 -0
  3. package/bin/run.js +20 -2
  4. package/bundle/chunk-5GH4FS6C.js +12148 -0
  5. package/bundle/chunk-6B4I2CKP.js +231 -0
  6. package/bundle/chunk-6UE75KX2.js +4481 -0
  7. package/bundle/chunk-AU3EGGJP.js +44 -0
  8. package/bundle/chunk-CDQRD3JA.js +75 -0
  9. package/bundle/chunk-CMCEP64V.js +380 -0
  10. package/bundle/chunk-CW5ZHVPX.js +292 -0
  11. package/bundle/chunk-G6NE675D.js +238720 -0
  12. package/bundle/chunk-GLIYVKQA.js +48 -0
  13. package/bundle/chunk-KXEV6E63.js +133 -0
  14. package/bundle/chunk-MCRKUPJY.js +4515 -0
  15. package/bundle/chunk-MGM2L2T3.js +805 -0
  16. package/bundle/chunk-MVQYQJHI.js +502 -0
  17. package/bundle/chunk-NG7CZTTE.js +147 -0
  18. package/bundle/chunk-PU4RCSXF.js +22452 -0
  19. package/bundle/chunk-VXAZKB3J.js +292 -0
  20. package/bundle/chunk-W2L3MYN6.js +4480 -0
  21. package/bundle/chunk-XYJACVNA.js +231 -0
  22. package/bundle/commands/annotation/get.js +153 -0
  23. package/bundle/commands/annotation/list.js +226 -0
  24. package/bundle/commands/annotation/put.js +177 -0
  25. package/bundle/commands/auth/list.js +75 -0
  26. package/bundle/commands/auth/login.js +1654 -0
  27. package/bundle/commands/auth/logout.js +27 -0
  28. package/bundle/commands/auth/select.js +53 -0
  29. package/bundle/commands/bucket/create-credential.js +173 -0
  30. package/bundle/commands/bucket/delete-credential.js +140 -0
  31. package/bundle/commands/bucket/get-credential.js +151 -0
  32. package/bundle/commands/bucket/list-credentials.js +148 -0
  33. package/bundle/commands/build/branch.js +126 -0
  34. package/bundle/commands/build/checkout.js +198 -0
  35. package/bundle/commands/build/clone.js +153 -0
  36. package/bundle/commands/build/delete.js +227 -0
  37. package/bundle/commands/build/deploy.js +160 -0
  38. package/bundle/commands/build/env/get.js +105 -0
  39. package/bundle/commands/build/env/set.js +115 -0
  40. package/bundle/commands/build/find.js +333 -0
  41. package/bundle/commands/build/generate.js +75 -0
  42. package/bundle/commands/build/init.js +76 -0
  43. package/bundle/commands/build/list.js +11 -0
  44. package/bundle/commands/build/sandbox.js +65 -0
  45. package/bundle/commands/build/start.js +84 -0
  46. package/bundle/commands/build/status.js +1839 -0
  47. package/bundle/commands/build/stop.js +84 -0
  48. package/bundle/commands/build/tools/check.js +32 -0
  49. package/bundle/commands/build/tools/fmt.js +49 -0
  50. package/bundle/commands/build/unsandbox.js +65 -0
  51. package/bundle/commands/build/upload.js +83 -0
  52. package/bundle/commands/build/validate.js +71 -0
  53. package/bundle/commands/build/workos/delete.js +86 -0
  54. package/bundle/commands/build/workos/env/attach.js +134 -0
  55. package/bundle/commands/build/workos/env/create.js +176 -0
  56. package/bundle/commands/build/workos/env/delete.js +84 -0
  57. package/bundle/commands/build/workos/env/detach.js +115 -0
  58. package/bundle/commands/build/workos/env/get.js +117 -0
  59. package/bundle/commands/build/workos/env/list.js +139 -0
  60. package/bundle/commands/build/workos/env/set.js +138 -0
  61. package/bundle/commands/build/workos/invite.js +91 -0
  62. package/bundle/commands/build/workos/setup.js +124 -0
  63. package/bundle/commands/build/workos/status.js +93 -0
  64. package/bundle/commands/dns/create.js +128 -0
  65. package/bundle/commands/dns/delete.js +80 -0
  66. package/bundle/commands/dns/get.js +167 -0
  67. package/bundle/commands/dns/list.js +193 -0
  68. package/bundle/commands/dns/records/create.js +150 -0
  69. package/bundle/commands/dns/records/delete.js +76 -0
  70. package/bundle/commands/dns/records/get.js +118 -0
  71. package/bundle/commands/dns/records/list.js +153 -0
  72. package/bundle/commands/dns/records/update.js +146 -0
  73. package/bundle/commands/logs/query.js +237 -0
  74. package/bundle/commands/logs/tail.js +155 -0
  75. package/bundle/commands/mcp/install-claude.js +220 -0
  76. package/bundle/commands/mcp/install-gemini.js +220 -0
  77. package/bundle/commands/mcp/install-goose.js +232 -0
  78. package/bundle/commands/mcp/status.js +153 -0
  79. package/bundle/commands/object/delete.js +180 -0
  80. package/bundle/commands/object/get.js +209 -0
  81. package/bundle/commands/object/list.js +206 -0
  82. package/bundle/commands/object/put.js +211 -0
  83. package/bundle/commands/query/chunk-search.js +123 -0
  84. package/bundle/commands/query/document.js +126 -0
  85. package/bundle/commands/query/events.js +98 -0
  86. package/bundle/commands/query/reindex.js +147 -0
  87. package/bundle/commands/query/search.js +169 -0
  88. package/bundle/commands/tail.js +31 -0
  89. package/bundle/index.js +51 -0
  90. package/dist/base-command.d.ts +6 -0
  91. package/dist/base-command.d.ts.map +1 -1
  92. package/dist/base-command.js +14 -1
  93. package/dist/build.d.ts +2 -1
  94. package/dist/build.d.ts.map +1 -1
  95. package/dist/build.js +169 -51
  96. package/dist/codegen.d.ts +1 -1
  97. package/dist/codegen.d.ts.map +1 -1
  98. package/dist/codegen.js +17 -3
  99. package/dist/codegen.test.js +44 -0
  100. package/dist/commands/build/checkout.d.ts.map +1 -1
  101. package/dist/commands/build/checkout.js +4 -0
  102. package/dist/commands/build/delete.d.ts.map +1 -1
  103. package/dist/commands/build/delete.js +6 -3
  104. package/dist/commands/build/deploy.d.ts.map +1 -1
  105. package/dist/commands/build/deploy.js +10 -2
  106. package/dist/commands/build/find.d.ts +1 -0
  107. package/dist/commands/build/find.d.ts.map +1 -1
  108. package/dist/commands/build/find.js +33 -2
  109. package/dist/commands/build/validate.d.ts.map +1 -1
  110. package/dist/commands/build/validate.js +0 -1
  111. package/dist/commands/build/workos/delete.d.ts +18 -0
  112. package/dist/commands/build/workos/delete.d.ts.map +1 -0
  113. package/dist/commands/build/workos/delete.js +72 -0
  114. package/dist/commands/build/workos/env/attach.d.ts +24 -0
  115. package/dist/commands/build/workos/env/attach.d.ts.map +1 -0
  116. package/dist/commands/build/workos/env/attach.js +111 -0
  117. package/dist/commands/build/workos/env/create.d.ts +26 -0
  118. package/dist/commands/build/workos/env/create.d.ts.map +1 -0
  119. package/dist/commands/build/workos/env/create.js +156 -0
  120. package/dist/commands/build/workos/env/delete.d.ts +20 -0
  121. package/dist/commands/build/workos/env/delete.d.ts.map +1 -0
  122. package/dist/commands/build/workos/env/delete.js +61 -0
  123. package/dist/commands/build/workos/env/detach.d.ts +21 -0
  124. package/dist/commands/build/workos/env/detach.d.ts.map +1 -0
  125. package/dist/commands/build/workos/env/detach.js +94 -0
  126. package/dist/commands/build/workos/env/get.d.ts +20 -0
  127. package/dist/commands/build/workos/env/get.d.ts.map +1 -0
  128. package/dist/commands/build/workos/env/get.js +94 -0
  129. package/dist/commands/build/workos/env/list.d.ts +18 -0
  130. package/dist/commands/build/workos/env/list.d.ts.map +1 -0
  131. package/dist/commands/build/workos/env/list.js +114 -0
  132. package/dist/commands/build/workos/env/set.d.ts +27 -0
  133. package/dist/commands/build/workos/env/set.d.ts.map +1 -0
  134. package/dist/commands/build/workos/env/set.js +115 -0
  135. package/dist/commands/build/workos/invite.d.ts +21 -0
  136. package/dist/commands/build/workos/invite.d.ts.map +1 -0
  137. package/dist/commands/build/workos/invite.js +68 -0
  138. package/dist/commands/build/workos/setup.d.ts +20 -0
  139. package/dist/commands/build/workos/setup.d.ts.map +1 -0
  140. package/dist/commands/build/workos/setup.js +106 -0
  141. package/dist/commands/build/workos/status.d.ts +18 -0
  142. package/dist/commands/build/workos/status.d.ts.map +1 -0
  143. package/dist/commands/build/workos/status.js +70 -0
  144. package/dist/commands/mcp/install-claude.d.ts.map +1 -1
  145. package/dist/commands/mcp/install-claude.js +0 -2
  146. package/dist/commands/mcp/install-gemini.d.ts.map +1 -1
  147. package/dist/commands/mcp/install-gemini.js +0 -2
  148. package/dist/commands/mcp/install-goose.d.ts.map +1 -1
  149. package/dist/commands/mcp/install-goose.js +0 -2
  150. package/dist/deploy.d.ts.map +1 -1
  151. package/dist/deploy.js +2 -2
  152. package/dist/index.d.ts +2 -0
  153. package/dist/index.d.ts.map +1 -1
  154. package/dist/index.js +4 -0
  155. package/oclif.manifest.json +4544 -2466
  156. package/package.json +8 -5
  157. package/templates/claude-code/debug-raindrop-app.md +89 -0
  158. package/templates/claude-code/new-raindrop-app.md +10 -6
  159. package/templates/claude-code/reattach-raindrop-session.md +50 -12
  160. package/templates/claude-code/update-raindrop-app.md +61 -9
  161. package/templates/db/node_modules/.bin/prisma +2 -2
  162. package/templates/db/node_modules/.bin/prisma-kysely +2 -2
  163. package/templates/db/node_modules/.bin/tsc +2 -2
  164. package/templates/db/node_modules/.bin/tsserver +2 -2
  165. package/templates/db/node_modules/.bin/zx +2 -2
  166. package/templates/gemini-code/debug-raindrop-app.toml +86 -0
  167. package/templates/gemini-code/new-raindrop-app.toml +9 -5
  168. package/templates/gemini-code/reattach-raindrop-session.toml +9 -11
  169. package/templates/gemini-code/update-raindrop-app.toml +55 -10
  170. package/templates/goose/debug-raindrop-app.yaml +91 -0
  171. package/templates/goose/new-raindrop-app.yaml +12 -7
  172. package/templates/goose/reattach-raindrop-session.yaml +11 -4
  173. package/templates/goose/update-raindrop-app.yaml +57 -5
  174. package/templates/init/src/_app/auth.ts +18 -0
  175. package/templates/init/src/_app/cors.ts +64 -0
  176. package/dist/tsconfig.tsbuildinfo +0 -1
  177. package/templates/claude-code/raindrop-guidelines.md +0 -322
  178. package/templates/gemini-code/raindrop-guidelines.md +0 -322
@@ -0,0 +1,4481 @@
1
+ import {
2
+ __commonJS,
3
+ __require,
4
+ __toESM,
5
+ init_cjs_shims,
6
+ require_source_map,
7
+ valueOf
8
+ } from "./chunk-G6NE675D.js";
9
+
10
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js
11
+ var require_utils = __commonJS({
12
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/utils.js"(exports) {
13
+ "use strict";
14
+ init_cjs_shims();
15
+ exports.__esModule = true;
16
+ exports.extend = extend;
17
+ exports.indexOf = indexOf;
18
+ exports.escapeExpression = escapeExpression;
19
+ exports.isEmpty = isEmpty;
20
+ exports.createFrame = createFrame;
21
+ exports.blockParams = blockParams;
22
+ exports.appendContextPath = appendContextPath;
23
+ var escape = {
24
+ "&": "&",
25
+ "<": "&lt;",
26
+ ">": "&gt;",
27
+ '"': "&quot;",
28
+ "'": "&#x27;",
29
+ "`": "&#x60;",
30
+ "=": "&#x3D;"
31
+ };
32
+ var badChars = /[&<>"'`=]/g;
33
+ var possible = /[&<>"'`=]/;
34
+ function escapeChar(chr) {
35
+ return escape[chr];
36
+ }
37
+ function extend(obj) {
38
+ for (var i = 1; i < arguments.length; i++) {
39
+ for (var key in arguments[i]) {
40
+ if (Object.prototype.hasOwnProperty.call(arguments[i], key)) {
41
+ obj[key] = arguments[i][key];
42
+ }
43
+ }
44
+ }
45
+ return obj;
46
+ }
47
+ var toString = Object.prototype.toString;
48
+ exports.toString = toString;
49
+ var isFunction = function isFunction2(value) {
50
+ return typeof value === "function";
51
+ };
52
+ if (isFunction(/x/)) {
53
+ exports.isFunction = isFunction = function(value) {
54
+ return typeof value === "function" && toString.call(value) === "[object Function]";
55
+ };
56
+ }
57
+ exports.isFunction = isFunction;
58
+ var isArray = Array.isArray || function(value) {
59
+ return value && typeof value === "object" ? toString.call(value) === "[object Array]" : false;
60
+ };
61
+ exports.isArray = isArray;
62
+ function indexOf(array, value) {
63
+ for (var i = 0, len = array.length; i < len; i++) {
64
+ if (array[i] === value) {
65
+ return i;
66
+ }
67
+ }
68
+ return -1;
69
+ }
70
+ function escapeExpression(string) {
71
+ if (typeof string !== "string") {
72
+ if (string && string.toHTML) {
73
+ return string.toHTML();
74
+ } else if (string == null) {
75
+ return "";
76
+ } else if (!string) {
77
+ return string + "";
78
+ }
79
+ string = "" + string;
80
+ }
81
+ if (!possible.test(string)) {
82
+ return string;
83
+ }
84
+ return string.replace(badChars, escapeChar);
85
+ }
86
+ function isEmpty(value) {
87
+ if (!value && value !== 0) {
88
+ return true;
89
+ } else if (isArray(value) && value.length === 0) {
90
+ return true;
91
+ } else {
92
+ return false;
93
+ }
94
+ }
95
+ function createFrame(object) {
96
+ var frame = extend({}, object);
97
+ frame._parent = object;
98
+ return frame;
99
+ }
100
+ function blockParams(params, ids) {
101
+ params.path = ids;
102
+ return params;
103
+ }
104
+ function appendContextPath(contextPath, id) {
105
+ return (contextPath ? contextPath + "." : "") + id;
106
+ }
107
+ }
108
+ });
109
+
110
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/exception.js
111
+ var require_exception = __commonJS({
112
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/exception.js"(exports, module) {
113
+ "use strict";
114
+ init_cjs_shims();
115
+ exports.__esModule = true;
116
+ var errorProps = ["description", "fileName", "lineNumber", "endLineNumber", "message", "name", "number", "stack"];
117
+ function Exception(message, node) {
118
+ var loc = node && node.loc, line = void 0, endLineNumber = void 0, column = void 0, endColumn = void 0;
119
+ if (loc) {
120
+ line = loc.start.line;
121
+ endLineNumber = loc.end.line;
122
+ column = loc.start.column;
123
+ endColumn = loc.end.column;
124
+ message += " - " + line + ":" + column;
125
+ }
126
+ var tmp = Error.prototype.constructor.call(this, message);
127
+ for (var idx = 0; idx < errorProps.length; idx++) {
128
+ this[errorProps[idx]] = tmp[errorProps[idx]];
129
+ }
130
+ if (Error.captureStackTrace) {
131
+ Error.captureStackTrace(this, Exception);
132
+ }
133
+ try {
134
+ if (loc) {
135
+ this.lineNumber = line;
136
+ this.endLineNumber = endLineNumber;
137
+ if (Object.defineProperty) {
138
+ Object.defineProperty(this, "column", {
139
+ value: column,
140
+ enumerable: true
141
+ });
142
+ Object.defineProperty(this, "endColumn", {
143
+ value: endColumn,
144
+ enumerable: true
145
+ });
146
+ } else {
147
+ this.column = column;
148
+ this.endColumn = endColumn;
149
+ }
150
+ }
151
+ } catch (nop) {
152
+ }
153
+ }
154
+ Exception.prototype = new Error();
155
+ exports["default"] = Exception;
156
+ module.exports = exports["default"];
157
+ }
158
+ });
159
+
160
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js
161
+ var require_block_helper_missing = __commonJS({
162
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/block-helper-missing.js"(exports, module) {
163
+ "use strict";
164
+ init_cjs_shims();
165
+ exports.__esModule = true;
166
+ var _utils = require_utils();
167
+ exports["default"] = function(instance) {
168
+ instance.registerHelper("blockHelperMissing", function(context, options) {
169
+ var inverse = options.inverse, fn = options.fn;
170
+ if (context === true) {
171
+ return fn(this);
172
+ } else if (context === false || context == null) {
173
+ return inverse(this);
174
+ } else if (_utils.isArray(context)) {
175
+ if (context.length > 0) {
176
+ if (options.ids) {
177
+ options.ids = [options.name];
178
+ }
179
+ return instance.helpers.each(context, options);
180
+ } else {
181
+ return inverse(this);
182
+ }
183
+ } else {
184
+ if (options.data && options.ids) {
185
+ var data = _utils.createFrame(options.data);
186
+ data.contextPath = _utils.appendContextPath(options.data.contextPath, options.name);
187
+ options = { data };
188
+ }
189
+ return fn(context, options);
190
+ }
191
+ });
192
+ };
193
+ module.exports = exports["default"];
194
+ }
195
+ });
196
+
197
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js
198
+ var require_each = __commonJS({
199
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/each.js"(exports, module) {
200
+ "use strict";
201
+ init_cjs_shims();
202
+ exports.__esModule = true;
203
+ function _interopRequireDefault(obj) {
204
+ return obj && obj.__esModule ? obj : { "default": obj };
205
+ }
206
+ var _utils = require_utils();
207
+ var _exception = require_exception();
208
+ var _exception2 = _interopRequireDefault(_exception);
209
+ exports["default"] = function(instance) {
210
+ instance.registerHelper("each", function(context, options) {
211
+ if (!options) {
212
+ throw new _exception2["default"]("Must pass iterator to #each");
213
+ }
214
+ var fn = options.fn, inverse = options.inverse, i = 0, ret = "", data = void 0, contextPath = void 0;
215
+ if (options.data && options.ids) {
216
+ contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]) + ".";
217
+ }
218
+ if (_utils.isFunction(context)) {
219
+ context = context.call(this);
220
+ }
221
+ if (options.data) {
222
+ data = _utils.createFrame(options.data);
223
+ }
224
+ function execIteration(field, index, last) {
225
+ if (data) {
226
+ data.key = field;
227
+ data.index = index;
228
+ data.first = index === 0;
229
+ data.last = !!last;
230
+ if (contextPath) {
231
+ data.contextPath = contextPath + field;
232
+ }
233
+ }
234
+ ret = ret + fn(context[field], {
235
+ data,
236
+ blockParams: _utils.blockParams([context[field], field], [contextPath + field, null])
237
+ });
238
+ }
239
+ if (context && typeof context === "object") {
240
+ if (_utils.isArray(context)) {
241
+ for (var j = context.length; i < j; i++) {
242
+ if (i in context) {
243
+ execIteration(i, i, i === context.length - 1);
244
+ }
245
+ }
246
+ } else if (typeof Symbol === "function" && context[Symbol.iterator]) {
247
+ var newContext = [];
248
+ var iterator = context[Symbol.iterator]();
249
+ for (var it = iterator.next(); !it.done; it = iterator.next()) {
250
+ newContext.push(it.value);
251
+ }
252
+ context = newContext;
253
+ for (var j = context.length; i < j; i++) {
254
+ execIteration(i, i, i === context.length - 1);
255
+ }
256
+ } else {
257
+ (function() {
258
+ var priorKey = void 0;
259
+ Object.keys(context).forEach(function(key) {
260
+ if (priorKey !== void 0) {
261
+ execIteration(priorKey, i - 1);
262
+ }
263
+ priorKey = key;
264
+ i++;
265
+ });
266
+ if (priorKey !== void 0) {
267
+ execIteration(priorKey, i - 1, true);
268
+ }
269
+ })();
270
+ }
271
+ }
272
+ if (i === 0) {
273
+ ret = inverse(this);
274
+ }
275
+ return ret;
276
+ });
277
+ };
278
+ module.exports = exports["default"];
279
+ }
280
+ });
281
+
282
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js
283
+ var require_helper_missing = __commonJS({
284
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/helper-missing.js"(exports, module) {
285
+ "use strict";
286
+ init_cjs_shims();
287
+ exports.__esModule = true;
288
+ function _interopRequireDefault(obj) {
289
+ return obj && obj.__esModule ? obj : { "default": obj };
290
+ }
291
+ var _exception = require_exception();
292
+ var _exception2 = _interopRequireDefault(_exception);
293
+ exports["default"] = function(instance) {
294
+ instance.registerHelper("helperMissing", function() {
295
+ if (arguments.length === 1) {
296
+ return void 0;
297
+ } else {
298
+ throw new _exception2["default"]('Missing helper: "' + arguments[arguments.length - 1].name + '"');
299
+ }
300
+ });
301
+ };
302
+ module.exports = exports["default"];
303
+ }
304
+ });
305
+
306
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js
307
+ var require_if = __commonJS({
308
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/if.js"(exports, module) {
309
+ "use strict";
310
+ init_cjs_shims();
311
+ exports.__esModule = true;
312
+ function _interopRequireDefault(obj) {
313
+ return obj && obj.__esModule ? obj : { "default": obj };
314
+ }
315
+ var _utils = require_utils();
316
+ var _exception = require_exception();
317
+ var _exception2 = _interopRequireDefault(_exception);
318
+ exports["default"] = function(instance) {
319
+ instance.registerHelper("if", function(conditional, options) {
320
+ if (arguments.length != 2) {
321
+ throw new _exception2["default"]("#if requires exactly one argument");
322
+ }
323
+ if (_utils.isFunction(conditional)) {
324
+ conditional = conditional.call(this);
325
+ }
326
+ if (!options.hash.includeZero && !conditional || _utils.isEmpty(conditional)) {
327
+ return options.inverse(this);
328
+ } else {
329
+ return options.fn(this);
330
+ }
331
+ });
332
+ instance.registerHelper("unless", function(conditional, options) {
333
+ if (arguments.length != 2) {
334
+ throw new _exception2["default"]("#unless requires exactly one argument");
335
+ }
336
+ return instance.helpers["if"].call(this, conditional, {
337
+ fn: options.inverse,
338
+ inverse: options.fn,
339
+ hash: options.hash
340
+ });
341
+ });
342
+ };
343
+ module.exports = exports["default"];
344
+ }
345
+ });
346
+
347
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js
348
+ var require_log = __commonJS({
349
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/log.js"(exports, module) {
350
+ "use strict";
351
+ init_cjs_shims();
352
+ exports.__esModule = true;
353
+ exports["default"] = function(instance) {
354
+ instance.registerHelper("log", function() {
355
+ var args = [void 0], options = arguments[arguments.length - 1];
356
+ for (var i = 0; i < arguments.length - 1; i++) {
357
+ args.push(arguments[i]);
358
+ }
359
+ var level = 1;
360
+ if (options.hash.level != null) {
361
+ level = options.hash.level;
362
+ } else if (options.data && options.data.level != null) {
363
+ level = options.data.level;
364
+ }
365
+ args[0] = level;
366
+ instance.log.apply(instance, args);
367
+ });
368
+ };
369
+ module.exports = exports["default"];
370
+ }
371
+ });
372
+
373
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js
374
+ var require_lookup = __commonJS({
375
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/lookup.js"(exports, module) {
376
+ "use strict";
377
+ init_cjs_shims();
378
+ exports.__esModule = true;
379
+ exports["default"] = function(instance) {
380
+ instance.registerHelper("lookup", function(obj, field, options) {
381
+ if (!obj) {
382
+ return obj;
383
+ }
384
+ return options.lookupProperty(obj, field);
385
+ });
386
+ };
387
+ module.exports = exports["default"];
388
+ }
389
+ });
390
+
391
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js
392
+ var require_with = __commonJS({
393
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers/with.js"(exports, module) {
394
+ "use strict";
395
+ init_cjs_shims();
396
+ exports.__esModule = true;
397
+ function _interopRequireDefault(obj) {
398
+ return obj && obj.__esModule ? obj : { "default": obj };
399
+ }
400
+ var _utils = require_utils();
401
+ var _exception = require_exception();
402
+ var _exception2 = _interopRequireDefault(_exception);
403
+ exports["default"] = function(instance) {
404
+ instance.registerHelper("with", function(context, options) {
405
+ if (arguments.length != 2) {
406
+ throw new _exception2["default"]("#with requires exactly one argument");
407
+ }
408
+ if (_utils.isFunction(context)) {
409
+ context = context.call(this);
410
+ }
411
+ var fn = options.fn;
412
+ if (!_utils.isEmpty(context)) {
413
+ var data = options.data;
414
+ if (options.data && options.ids) {
415
+ data = _utils.createFrame(options.data);
416
+ data.contextPath = _utils.appendContextPath(options.data.contextPath, options.ids[0]);
417
+ }
418
+ return fn(context, {
419
+ data,
420
+ blockParams: _utils.blockParams([context], [data && data.contextPath])
421
+ });
422
+ } else {
423
+ return options.inverse(this);
424
+ }
425
+ });
426
+ };
427
+ module.exports = exports["default"];
428
+ }
429
+ });
430
+
431
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers.js
432
+ var require_helpers = __commonJS({
433
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/helpers.js"(exports) {
434
+ "use strict";
435
+ init_cjs_shims();
436
+ exports.__esModule = true;
437
+ exports.registerDefaultHelpers = registerDefaultHelpers;
438
+ exports.moveHelperToHooks = moveHelperToHooks;
439
+ function _interopRequireDefault(obj) {
440
+ return obj && obj.__esModule ? obj : { "default": obj };
441
+ }
442
+ var _helpersBlockHelperMissing = require_block_helper_missing();
443
+ var _helpersBlockHelperMissing2 = _interopRequireDefault(_helpersBlockHelperMissing);
444
+ var _helpersEach = require_each();
445
+ var _helpersEach2 = _interopRequireDefault(_helpersEach);
446
+ var _helpersHelperMissing = require_helper_missing();
447
+ var _helpersHelperMissing2 = _interopRequireDefault(_helpersHelperMissing);
448
+ var _helpersIf = require_if();
449
+ var _helpersIf2 = _interopRequireDefault(_helpersIf);
450
+ var _helpersLog = require_log();
451
+ var _helpersLog2 = _interopRequireDefault(_helpersLog);
452
+ var _helpersLookup = require_lookup();
453
+ var _helpersLookup2 = _interopRequireDefault(_helpersLookup);
454
+ var _helpersWith = require_with();
455
+ var _helpersWith2 = _interopRequireDefault(_helpersWith);
456
+ function registerDefaultHelpers(instance) {
457
+ _helpersBlockHelperMissing2["default"](instance);
458
+ _helpersEach2["default"](instance);
459
+ _helpersHelperMissing2["default"](instance);
460
+ _helpersIf2["default"](instance);
461
+ _helpersLog2["default"](instance);
462
+ _helpersLookup2["default"](instance);
463
+ _helpersWith2["default"](instance);
464
+ }
465
+ function moveHelperToHooks(instance, helperName, keepHelper) {
466
+ if (instance.helpers[helperName]) {
467
+ instance.hooks[helperName] = instance.helpers[helperName];
468
+ if (!keepHelper) {
469
+ delete instance.helpers[helperName];
470
+ }
471
+ }
472
+ }
473
+ }
474
+ });
475
+
476
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js
477
+ var require_inline = __commonJS({
478
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators/inline.js"(exports, module) {
479
+ "use strict";
480
+ init_cjs_shims();
481
+ exports.__esModule = true;
482
+ var _utils = require_utils();
483
+ exports["default"] = function(instance) {
484
+ instance.registerDecorator("inline", function(fn, props, container, options) {
485
+ var ret = fn;
486
+ if (!props.partials) {
487
+ props.partials = {};
488
+ ret = function(context, options2) {
489
+ var original = container.partials;
490
+ container.partials = _utils.extend({}, original, props.partials);
491
+ var ret2 = fn(context, options2);
492
+ container.partials = original;
493
+ return ret2;
494
+ };
495
+ }
496
+ props.partials[options.args[0]] = options.fn;
497
+ return ret;
498
+ });
499
+ };
500
+ module.exports = exports["default"];
501
+ }
502
+ });
503
+
504
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators.js
505
+ var require_decorators = __commonJS({
506
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/decorators.js"(exports) {
507
+ "use strict";
508
+ init_cjs_shims();
509
+ exports.__esModule = true;
510
+ exports.registerDefaultDecorators = registerDefaultDecorators;
511
+ function _interopRequireDefault(obj) {
512
+ return obj && obj.__esModule ? obj : { "default": obj };
513
+ }
514
+ var _decoratorsInline = require_inline();
515
+ var _decoratorsInline2 = _interopRequireDefault(_decoratorsInline);
516
+ function registerDefaultDecorators(instance) {
517
+ _decoratorsInline2["default"](instance);
518
+ }
519
+ }
520
+ });
521
+
522
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/logger.js
523
+ var require_logger = __commonJS({
524
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/logger.js"(exports, module) {
525
+ "use strict";
526
+ init_cjs_shims();
527
+ exports.__esModule = true;
528
+ var _utils = require_utils();
529
+ var logger = {
530
+ methodMap: ["debug", "info", "warn", "error"],
531
+ level: "info",
532
+ // Maps a given level value to the `methodMap` indexes above.
533
+ lookupLevel: function lookupLevel(level) {
534
+ if (typeof level === "string") {
535
+ var levelMap = _utils.indexOf(logger.methodMap, level.toLowerCase());
536
+ if (levelMap >= 0) {
537
+ level = levelMap;
538
+ } else {
539
+ level = parseInt(level, 10);
540
+ }
541
+ }
542
+ return level;
543
+ },
544
+ // Can be overridden in the host environment
545
+ log: function log(level) {
546
+ level = logger.lookupLevel(level);
547
+ if (typeof console !== "undefined" && logger.lookupLevel(logger.level) <= level) {
548
+ var method = logger.methodMap[level];
549
+ if (!console[method]) {
550
+ method = "log";
551
+ }
552
+ for (var _len = arguments.length, message = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
553
+ message[_key - 1] = arguments[_key];
554
+ }
555
+ console[method].apply(console, message);
556
+ }
557
+ }
558
+ };
559
+ exports["default"] = logger;
560
+ module.exports = exports["default"];
561
+ }
562
+ });
563
+
564
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js
565
+ var require_create_new_lookup_object = __commonJS({
566
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/create-new-lookup-object.js"(exports) {
567
+ "use strict";
568
+ init_cjs_shims();
569
+ exports.__esModule = true;
570
+ exports.createNewLookupObject = createNewLookupObject;
571
+ var _utils = require_utils();
572
+ function createNewLookupObject() {
573
+ for (var _len = arguments.length, sources = Array(_len), _key = 0; _key < _len; _key++) {
574
+ sources[_key] = arguments[_key];
575
+ }
576
+ return _utils.extend.apply(void 0, [/* @__PURE__ */ Object.create(null)].concat(sources));
577
+ }
578
+ }
579
+ });
580
+
581
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js
582
+ var require_proto_access = __commonJS({
583
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/proto-access.js"(exports) {
584
+ "use strict";
585
+ init_cjs_shims();
586
+ exports.__esModule = true;
587
+ exports.createProtoAccessControl = createProtoAccessControl;
588
+ exports.resultIsAllowed = resultIsAllowed;
589
+ exports.resetLoggedProperties = resetLoggedProperties;
590
+ function _interopRequireDefault(obj) {
591
+ return obj && obj.__esModule ? obj : { "default": obj };
592
+ }
593
+ var _createNewLookupObject = require_create_new_lookup_object();
594
+ var _logger = require_logger();
595
+ var _logger2 = _interopRequireDefault(_logger);
596
+ var loggedProperties = /* @__PURE__ */ Object.create(null);
597
+ function createProtoAccessControl(runtimeOptions) {
598
+ var defaultMethodWhiteList = /* @__PURE__ */ Object.create(null);
599
+ defaultMethodWhiteList["constructor"] = false;
600
+ defaultMethodWhiteList["__defineGetter__"] = false;
601
+ defaultMethodWhiteList["__defineSetter__"] = false;
602
+ defaultMethodWhiteList["__lookupGetter__"] = false;
603
+ var defaultPropertyWhiteList = /* @__PURE__ */ Object.create(null);
604
+ defaultPropertyWhiteList["__proto__"] = false;
605
+ return {
606
+ properties: {
607
+ whitelist: _createNewLookupObject.createNewLookupObject(defaultPropertyWhiteList, runtimeOptions.allowedProtoProperties),
608
+ defaultValue: runtimeOptions.allowProtoPropertiesByDefault
609
+ },
610
+ methods: {
611
+ whitelist: _createNewLookupObject.createNewLookupObject(defaultMethodWhiteList, runtimeOptions.allowedProtoMethods),
612
+ defaultValue: runtimeOptions.allowProtoMethodsByDefault
613
+ }
614
+ };
615
+ }
616
+ function resultIsAllowed(result, protoAccessControl, propertyName) {
617
+ if (typeof result === "function") {
618
+ return checkWhiteList(protoAccessControl.methods, propertyName);
619
+ } else {
620
+ return checkWhiteList(protoAccessControl.properties, propertyName);
621
+ }
622
+ }
623
+ function checkWhiteList(protoAccessControlForType, propertyName) {
624
+ if (protoAccessControlForType.whitelist[propertyName] !== void 0) {
625
+ return protoAccessControlForType.whitelist[propertyName] === true;
626
+ }
627
+ if (protoAccessControlForType.defaultValue !== void 0) {
628
+ return protoAccessControlForType.defaultValue;
629
+ }
630
+ logUnexpecedPropertyAccessOnce(propertyName);
631
+ return false;
632
+ }
633
+ function logUnexpecedPropertyAccessOnce(propertyName) {
634
+ if (loggedProperties[propertyName] !== true) {
635
+ loggedProperties[propertyName] = true;
636
+ _logger2["default"].log("error", 'Handlebars: Access has been denied to resolve the property "' + propertyName + '" because it is not an "own property" of its parent.\nYou can add a runtime option to disable the check or this warning:\nSee https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details');
637
+ }
638
+ }
639
+ function resetLoggedProperties() {
640
+ Object.keys(loggedProperties).forEach(function(propertyName) {
641
+ delete loggedProperties[propertyName];
642
+ });
643
+ }
644
+ }
645
+ });
646
+
647
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/base.js
648
+ var require_base = __commonJS({
649
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/base.js"(exports) {
650
+ "use strict";
651
+ init_cjs_shims();
652
+ exports.__esModule = true;
653
+ exports.HandlebarsEnvironment = HandlebarsEnvironment;
654
+ function _interopRequireDefault(obj) {
655
+ return obj && obj.__esModule ? obj : { "default": obj };
656
+ }
657
+ var _utils = require_utils();
658
+ var _exception = require_exception();
659
+ var _exception2 = _interopRequireDefault(_exception);
660
+ var _helpers = require_helpers();
661
+ var _decorators = require_decorators();
662
+ var _logger = require_logger();
663
+ var _logger2 = _interopRequireDefault(_logger);
664
+ var _internalProtoAccess = require_proto_access();
665
+ var VERSION = "4.7.8";
666
+ exports.VERSION = VERSION;
667
+ var COMPILER_REVISION = 8;
668
+ exports.COMPILER_REVISION = COMPILER_REVISION;
669
+ var LAST_COMPATIBLE_COMPILER_REVISION = 7;
670
+ exports.LAST_COMPATIBLE_COMPILER_REVISION = LAST_COMPATIBLE_COMPILER_REVISION;
671
+ var REVISION_CHANGES = {
672
+ 1: "<= 1.0.rc.2",
673
+ // 1.0.rc.2 is actually rev2 but doesn't report it
674
+ 2: "== 1.0.0-rc.3",
675
+ 3: "== 1.0.0-rc.4",
676
+ 4: "== 1.x.x",
677
+ 5: "== 2.0.0-alpha.x",
678
+ 6: ">= 2.0.0-beta.1",
679
+ 7: ">= 4.0.0 <4.3.0",
680
+ 8: ">= 4.3.0"
681
+ };
682
+ exports.REVISION_CHANGES = REVISION_CHANGES;
683
+ var objectType = "[object Object]";
684
+ function HandlebarsEnvironment(helpers, partials, decorators) {
685
+ this.helpers = helpers || {};
686
+ this.partials = partials || {};
687
+ this.decorators = decorators || {};
688
+ _helpers.registerDefaultHelpers(this);
689
+ _decorators.registerDefaultDecorators(this);
690
+ }
691
+ HandlebarsEnvironment.prototype = {
692
+ constructor: HandlebarsEnvironment,
693
+ logger: _logger2["default"],
694
+ log: _logger2["default"].log,
695
+ registerHelper: function registerHelper(name, fn) {
696
+ if (_utils.toString.call(name) === objectType) {
697
+ if (fn) {
698
+ throw new _exception2["default"]("Arg not supported with multiple helpers");
699
+ }
700
+ _utils.extend(this.helpers, name);
701
+ } else {
702
+ this.helpers[name] = fn;
703
+ }
704
+ },
705
+ unregisterHelper: function unregisterHelper(name) {
706
+ delete this.helpers[name];
707
+ },
708
+ registerPartial: function registerPartial(name, partial) {
709
+ if (_utils.toString.call(name) === objectType) {
710
+ _utils.extend(this.partials, name);
711
+ } else {
712
+ if (typeof partial === "undefined") {
713
+ throw new _exception2["default"]('Attempting to register a partial called "' + name + '" as undefined');
714
+ }
715
+ this.partials[name] = partial;
716
+ }
717
+ },
718
+ unregisterPartial: function unregisterPartial(name) {
719
+ delete this.partials[name];
720
+ },
721
+ registerDecorator: function registerDecorator(name, fn) {
722
+ if (_utils.toString.call(name) === objectType) {
723
+ if (fn) {
724
+ throw new _exception2["default"]("Arg not supported with multiple decorators");
725
+ }
726
+ _utils.extend(this.decorators, name);
727
+ } else {
728
+ this.decorators[name] = fn;
729
+ }
730
+ },
731
+ unregisterDecorator: function unregisterDecorator(name) {
732
+ delete this.decorators[name];
733
+ },
734
+ /**
735
+ * Reset the memory of illegal property accesses that have already been logged.
736
+ * @deprecated should only be used in handlebars test-cases
737
+ */
738
+ resetLoggedPropertyAccesses: function resetLoggedPropertyAccesses() {
739
+ _internalProtoAccess.resetLoggedProperties();
740
+ }
741
+ };
742
+ var log = _logger2["default"].log;
743
+ exports.log = log;
744
+ exports.createFrame = _utils.createFrame;
745
+ exports.logger = _logger2["default"];
746
+ }
747
+ });
748
+
749
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/safe-string.js
750
+ var require_safe_string = __commonJS({
751
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/safe-string.js"(exports, module) {
752
+ "use strict";
753
+ init_cjs_shims();
754
+ exports.__esModule = true;
755
+ function SafeString(string) {
756
+ this.string = string;
757
+ }
758
+ SafeString.prototype.toString = SafeString.prototype.toHTML = function() {
759
+ return "" + this.string;
760
+ };
761
+ exports["default"] = SafeString;
762
+ module.exports = exports["default"];
763
+ }
764
+ });
765
+
766
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js
767
+ var require_wrapHelper = __commonJS({
768
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/internal/wrapHelper.js"(exports) {
769
+ "use strict";
770
+ init_cjs_shims();
771
+ exports.__esModule = true;
772
+ exports.wrapHelper = wrapHelper;
773
+ function wrapHelper(helper, transformOptionsFn) {
774
+ if (typeof helper !== "function") {
775
+ return helper;
776
+ }
777
+ var wrapper = function wrapper2() {
778
+ var options = arguments[arguments.length - 1];
779
+ arguments[arguments.length - 1] = transformOptionsFn(options);
780
+ return helper.apply(this, arguments);
781
+ };
782
+ return wrapper;
783
+ }
784
+ }
785
+ });
786
+
787
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/runtime.js
788
+ var require_runtime = __commonJS({
789
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/runtime.js"(exports) {
790
+ "use strict";
791
+ init_cjs_shims();
792
+ exports.__esModule = true;
793
+ exports.checkRevision = checkRevision;
794
+ exports.template = template;
795
+ exports.wrapProgram = wrapProgram;
796
+ exports.resolvePartial = resolvePartial;
797
+ exports.invokePartial = invokePartial;
798
+ exports.noop = noop;
799
+ function _interopRequireDefault(obj) {
800
+ return obj && obj.__esModule ? obj : { "default": obj };
801
+ }
802
+ function _interopRequireWildcard(obj) {
803
+ if (obj && obj.__esModule) {
804
+ return obj;
805
+ } else {
806
+ var newObj = {};
807
+ if (obj != null) {
808
+ for (var key in obj) {
809
+ if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
810
+ }
811
+ }
812
+ newObj["default"] = obj;
813
+ return newObj;
814
+ }
815
+ }
816
+ var _utils = require_utils();
817
+ var Utils = _interopRequireWildcard(_utils);
818
+ var _exception = require_exception();
819
+ var _exception2 = _interopRequireDefault(_exception);
820
+ var _base = require_base();
821
+ var _helpers = require_helpers();
822
+ var _internalWrapHelper = require_wrapHelper();
823
+ var _internalProtoAccess = require_proto_access();
824
+ function checkRevision(compilerInfo) {
825
+ var compilerRevision = compilerInfo && compilerInfo[0] || 1, currentRevision = _base.COMPILER_REVISION;
826
+ if (compilerRevision >= _base.LAST_COMPATIBLE_COMPILER_REVISION && compilerRevision <= _base.COMPILER_REVISION) {
827
+ return;
828
+ }
829
+ if (compilerRevision < _base.LAST_COMPATIBLE_COMPILER_REVISION) {
830
+ var runtimeVersions = _base.REVISION_CHANGES[currentRevision], compilerVersions = _base.REVISION_CHANGES[compilerRevision];
831
+ throw new _exception2["default"]("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version (" + runtimeVersions + ") or downgrade your runtime to an older version (" + compilerVersions + ").");
832
+ } else {
833
+ throw new _exception2["default"]("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version (" + compilerInfo[1] + ").");
834
+ }
835
+ }
836
+ function template(templateSpec, env) {
837
+ if (!env) {
838
+ throw new _exception2["default"]("No environment passed to template");
839
+ }
840
+ if (!templateSpec || !templateSpec.main) {
841
+ throw new _exception2["default"]("Unknown template object: " + typeof templateSpec);
842
+ }
843
+ templateSpec.main.decorator = templateSpec.main_d;
844
+ env.VM.checkRevision(templateSpec.compiler);
845
+ var templateWasPrecompiledWithCompilerV7 = templateSpec.compiler && templateSpec.compiler[0] === 7;
846
+ function invokePartialWrapper(partial, context, options) {
847
+ if (options.hash) {
848
+ context = Utils.extend({}, context, options.hash);
849
+ if (options.ids) {
850
+ options.ids[0] = true;
851
+ }
852
+ }
853
+ partial = env.VM.resolvePartial.call(this, partial, context, options);
854
+ var extendedOptions = Utils.extend({}, options, {
855
+ hooks: this.hooks,
856
+ protoAccessControl: this.protoAccessControl
857
+ });
858
+ var result = env.VM.invokePartial.call(this, partial, context, extendedOptions);
859
+ if (result == null && env.compile) {
860
+ options.partials[options.name] = env.compile(partial, templateSpec.compilerOptions, env);
861
+ result = options.partials[options.name](context, extendedOptions);
862
+ }
863
+ if (result != null) {
864
+ if (options.indent) {
865
+ var lines = result.split("\n");
866
+ for (var i = 0, l = lines.length; i < l; i++) {
867
+ if (!lines[i] && i + 1 === l) {
868
+ break;
869
+ }
870
+ lines[i] = options.indent + lines[i];
871
+ }
872
+ result = lines.join("\n");
873
+ }
874
+ return result;
875
+ } else {
876
+ throw new _exception2["default"]("The partial " + options.name + " could not be compiled when running in runtime-only mode");
877
+ }
878
+ }
879
+ var container = {
880
+ strict: function strict(obj, name, loc) {
881
+ if (!obj || !(name in obj)) {
882
+ throw new _exception2["default"]('"' + name + '" not defined in ' + obj, {
883
+ loc
884
+ });
885
+ }
886
+ return container.lookupProperty(obj, name);
887
+ },
888
+ lookupProperty: function lookupProperty(parent, propertyName) {
889
+ var result = parent[propertyName];
890
+ if (result == null) {
891
+ return result;
892
+ }
893
+ if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {
894
+ return result;
895
+ }
896
+ if (_internalProtoAccess.resultIsAllowed(result, container.protoAccessControl, propertyName)) {
897
+ return result;
898
+ }
899
+ return void 0;
900
+ },
901
+ lookup: function lookup(depths, name) {
902
+ var len = depths.length;
903
+ for (var i = 0; i < len; i++) {
904
+ var result = depths[i] && container.lookupProperty(depths[i], name);
905
+ if (result != null) {
906
+ return depths[i][name];
907
+ }
908
+ }
909
+ },
910
+ lambda: function lambda(current, context) {
911
+ return typeof current === "function" ? current.call(context) : current;
912
+ },
913
+ escapeExpression: Utils.escapeExpression,
914
+ invokePartial: invokePartialWrapper,
915
+ fn: function fn(i) {
916
+ var ret2 = templateSpec[i];
917
+ ret2.decorator = templateSpec[i + "_d"];
918
+ return ret2;
919
+ },
920
+ programs: [],
921
+ program: function program(i, data, declaredBlockParams, blockParams, depths) {
922
+ var programWrapper = this.programs[i], fn = this.fn(i);
923
+ if (data || depths || blockParams || declaredBlockParams) {
924
+ programWrapper = wrapProgram(this, i, fn, data, declaredBlockParams, blockParams, depths);
925
+ } else if (!programWrapper) {
926
+ programWrapper = this.programs[i] = wrapProgram(this, i, fn);
927
+ }
928
+ return programWrapper;
929
+ },
930
+ data: function data(value, depth) {
931
+ while (value && depth--) {
932
+ value = value._parent;
933
+ }
934
+ return value;
935
+ },
936
+ mergeIfNeeded: function mergeIfNeeded(param, common) {
937
+ var obj = param || common;
938
+ if (param && common && param !== common) {
939
+ obj = Utils.extend({}, common, param);
940
+ }
941
+ return obj;
942
+ },
943
+ // An empty object to use as replacement for null-contexts
944
+ nullContext: Object.seal({}),
945
+ noop: env.VM.noop,
946
+ compilerInfo: templateSpec.compiler
947
+ };
948
+ function ret(context) {
949
+ var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1];
950
+ var data = options.data;
951
+ ret._setup(options);
952
+ if (!options.partial && templateSpec.useData) {
953
+ data = initData(context, data);
954
+ }
955
+ var depths = void 0, blockParams = templateSpec.useBlockParams ? [] : void 0;
956
+ if (templateSpec.useDepths) {
957
+ if (options.depths) {
958
+ depths = context != options.depths[0] ? [context].concat(options.depths) : options.depths;
959
+ } else {
960
+ depths = [context];
961
+ }
962
+ }
963
+ function main(context2) {
964
+ return "" + templateSpec.main(container, context2, container.helpers, container.partials, data, blockParams, depths);
965
+ }
966
+ main = executeDecorators(templateSpec.main, main, container, options.depths || [], data, blockParams);
967
+ return main(context, options);
968
+ }
969
+ ret.isTop = true;
970
+ ret._setup = function(options) {
971
+ if (!options.partial) {
972
+ var mergedHelpers = Utils.extend({}, env.helpers, options.helpers);
973
+ wrapHelpersToPassLookupProperty(mergedHelpers, container);
974
+ container.helpers = mergedHelpers;
975
+ if (templateSpec.usePartial) {
976
+ container.partials = container.mergeIfNeeded(options.partials, env.partials);
977
+ }
978
+ if (templateSpec.usePartial || templateSpec.useDecorators) {
979
+ container.decorators = Utils.extend({}, env.decorators, options.decorators);
980
+ }
981
+ container.hooks = {};
982
+ container.protoAccessControl = _internalProtoAccess.createProtoAccessControl(options);
983
+ var keepHelperInHelpers = options.allowCallsToHelperMissing || templateWasPrecompiledWithCompilerV7;
984
+ _helpers.moveHelperToHooks(container, "helperMissing", keepHelperInHelpers);
985
+ _helpers.moveHelperToHooks(container, "blockHelperMissing", keepHelperInHelpers);
986
+ } else {
987
+ container.protoAccessControl = options.protoAccessControl;
988
+ container.helpers = options.helpers;
989
+ container.partials = options.partials;
990
+ container.decorators = options.decorators;
991
+ container.hooks = options.hooks;
992
+ }
993
+ };
994
+ ret._child = function(i, data, blockParams, depths) {
995
+ if (templateSpec.useBlockParams && !blockParams) {
996
+ throw new _exception2["default"]("must pass block params");
997
+ }
998
+ if (templateSpec.useDepths && !depths) {
999
+ throw new _exception2["default"]("must pass parent depths");
1000
+ }
1001
+ return wrapProgram(container, i, templateSpec[i], data, 0, blockParams, depths);
1002
+ };
1003
+ return ret;
1004
+ }
1005
+ function wrapProgram(container, i, fn, data, declaredBlockParams, blockParams, depths) {
1006
+ function prog(context) {
1007
+ var options = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1];
1008
+ var currentDepths = depths;
1009
+ if (depths && context != depths[0] && !(context === container.nullContext && depths[0] === null)) {
1010
+ currentDepths = [context].concat(depths);
1011
+ }
1012
+ return fn(container, context, container.helpers, container.partials, options.data || data, blockParams && [options.blockParams].concat(blockParams), currentDepths);
1013
+ }
1014
+ prog = executeDecorators(fn, prog, container, depths, data, blockParams);
1015
+ prog.program = i;
1016
+ prog.depth = depths ? depths.length : 0;
1017
+ prog.blockParams = declaredBlockParams || 0;
1018
+ return prog;
1019
+ }
1020
+ function resolvePartial(partial, context, options) {
1021
+ if (!partial) {
1022
+ if (options.name === "@partial-block") {
1023
+ partial = options.data["partial-block"];
1024
+ } else {
1025
+ partial = options.partials[options.name];
1026
+ }
1027
+ } else if (!partial.call && !options.name) {
1028
+ options.name = partial;
1029
+ partial = options.partials[partial];
1030
+ }
1031
+ return partial;
1032
+ }
1033
+ function invokePartial(partial, context, options) {
1034
+ var currentPartialBlock = options.data && options.data["partial-block"];
1035
+ options.partial = true;
1036
+ if (options.ids) {
1037
+ options.data.contextPath = options.ids[0] || options.data.contextPath;
1038
+ }
1039
+ var partialBlock = void 0;
1040
+ if (options.fn && options.fn !== noop) {
1041
+ (function() {
1042
+ options.data = _base.createFrame(options.data);
1043
+ var fn = options.fn;
1044
+ partialBlock = options.data["partial-block"] = function partialBlockWrapper(context2) {
1045
+ var options2 = arguments.length <= 1 || arguments[1] === void 0 ? {} : arguments[1];
1046
+ options2.data = _base.createFrame(options2.data);
1047
+ options2.data["partial-block"] = currentPartialBlock;
1048
+ return fn(context2, options2);
1049
+ };
1050
+ if (fn.partials) {
1051
+ options.partials = Utils.extend({}, options.partials, fn.partials);
1052
+ }
1053
+ })();
1054
+ }
1055
+ if (partial === void 0 && partialBlock) {
1056
+ partial = partialBlock;
1057
+ }
1058
+ if (partial === void 0) {
1059
+ throw new _exception2["default"]("The partial " + options.name + " could not be found");
1060
+ } else if (partial instanceof Function) {
1061
+ return partial(context, options);
1062
+ }
1063
+ }
1064
+ function noop() {
1065
+ return "";
1066
+ }
1067
+ function initData(context, data) {
1068
+ if (!data || !("root" in data)) {
1069
+ data = data ? _base.createFrame(data) : {};
1070
+ data.root = context;
1071
+ }
1072
+ return data;
1073
+ }
1074
+ function executeDecorators(fn, prog, container, depths, data, blockParams) {
1075
+ if (fn.decorator) {
1076
+ var props = {};
1077
+ prog = fn.decorator(prog, props, container, depths && depths[0], data, blockParams, depths);
1078
+ Utils.extend(prog, props);
1079
+ }
1080
+ return prog;
1081
+ }
1082
+ function wrapHelpersToPassLookupProperty(mergedHelpers, container) {
1083
+ Object.keys(mergedHelpers).forEach(function(helperName) {
1084
+ var helper = mergedHelpers[helperName];
1085
+ mergedHelpers[helperName] = passLookupPropertyOption(helper, container);
1086
+ });
1087
+ }
1088
+ function passLookupPropertyOption(helper, container) {
1089
+ var lookupProperty = container.lookupProperty;
1090
+ return _internalWrapHelper.wrapHelper(helper, function(options) {
1091
+ return Utils.extend({ lookupProperty }, options);
1092
+ });
1093
+ }
1094
+ }
1095
+ });
1096
+
1097
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js
1098
+ var require_no_conflict = __commonJS({
1099
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/no-conflict.js"(exports, module) {
1100
+ "use strict";
1101
+ init_cjs_shims();
1102
+ exports.__esModule = true;
1103
+ exports["default"] = function(Handlebars2) {
1104
+ (function() {
1105
+ if (typeof globalThis === "object") return;
1106
+ Object.prototype.__defineGetter__("__magic__", function() {
1107
+ return this;
1108
+ });
1109
+ __magic__.globalThis = __magic__;
1110
+ delete Object.prototype.__magic__;
1111
+ })();
1112
+ var $Handlebars = globalThis.Handlebars;
1113
+ Handlebars2.noConflict = function() {
1114
+ if (globalThis.Handlebars === Handlebars2) {
1115
+ globalThis.Handlebars = $Handlebars;
1116
+ }
1117
+ return Handlebars2;
1118
+ };
1119
+ };
1120
+ module.exports = exports["default"];
1121
+ }
1122
+ });
1123
+
1124
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.runtime.js
1125
+ var require_handlebars_runtime = __commonJS({
1126
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.runtime.js"(exports, module) {
1127
+ "use strict";
1128
+ init_cjs_shims();
1129
+ exports.__esModule = true;
1130
+ function _interopRequireDefault(obj) {
1131
+ return obj && obj.__esModule ? obj : { "default": obj };
1132
+ }
1133
+ function _interopRequireWildcard(obj) {
1134
+ if (obj && obj.__esModule) {
1135
+ return obj;
1136
+ } else {
1137
+ var newObj = {};
1138
+ if (obj != null) {
1139
+ for (var key in obj) {
1140
+ if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
1141
+ }
1142
+ }
1143
+ newObj["default"] = obj;
1144
+ return newObj;
1145
+ }
1146
+ }
1147
+ var _handlebarsBase = require_base();
1148
+ var base = _interopRequireWildcard(_handlebarsBase);
1149
+ var _handlebarsSafeString = require_safe_string();
1150
+ var _handlebarsSafeString2 = _interopRequireDefault(_handlebarsSafeString);
1151
+ var _handlebarsException = require_exception();
1152
+ var _handlebarsException2 = _interopRequireDefault(_handlebarsException);
1153
+ var _handlebarsUtils = require_utils();
1154
+ var Utils = _interopRequireWildcard(_handlebarsUtils);
1155
+ var _handlebarsRuntime = require_runtime();
1156
+ var runtime = _interopRequireWildcard(_handlebarsRuntime);
1157
+ var _handlebarsNoConflict = require_no_conflict();
1158
+ var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
1159
+ function create() {
1160
+ var hb = new base.HandlebarsEnvironment();
1161
+ Utils.extend(hb, base);
1162
+ hb.SafeString = _handlebarsSafeString2["default"];
1163
+ hb.Exception = _handlebarsException2["default"];
1164
+ hb.Utils = Utils;
1165
+ hb.escapeExpression = Utils.escapeExpression;
1166
+ hb.VM = runtime;
1167
+ hb.template = function(spec) {
1168
+ return runtime.template(spec, hb);
1169
+ };
1170
+ return hb;
1171
+ }
1172
+ var inst = create();
1173
+ inst.create = create;
1174
+ _handlebarsNoConflict2["default"](inst);
1175
+ inst["default"] = inst;
1176
+ exports["default"] = inst;
1177
+ module.exports = exports["default"];
1178
+ }
1179
+ });
1180
+
1181
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js
1182
+ var require_ast = __commonJS({
1183
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/ast.js"(exports, module) {
1184
+ "use strict";
1185
+ init_cjs_shims();
1186
+ exports.__esModule = true;
1187
+ var AST = {
1188
+ // Public API used to evaluate derived attributes regarding AST nodes
1189
+ helpers: {
1190
+ // a mustache is definitely a helper if:
1191
+ // * it is an eligible helper, and
1192
+ // * it has at least one parameter or hash segment
1193
+ helperExpression: function helperExpression(node) {
1194
+ return node.type === "SubExpression" || (node.type === "MustacheStatement" || node.type === "BlockStatement") && !!(node.params && node.params.length || node.hash);
1195
+ },
1196
+ scopedId: function scopedId(path2) {
1197
+ return /^\.|this\b/.test(path2.original);
1198
+ },
1199
+ // an ID is simple if it only has one part, and that part is not
1200
+ // `..` or `this`.
1201
+ simpleId: function simpleId(path2) {
1202
+ return path2.parts.length === 1 && !AST.helpers.scopedId(path2) && !path2.depth;
1203
+ }
1204
+ }
1205
+ };
1206
+ exports["default"] = AST;
1207
+ module.exports = exports["default"];
1208
+ }
1209
+ });
1210
+
1211
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js
1212
+ var require_parser = __commonJS({
1213
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/parser.js"(exports, module) {
1214
+ "use strict";
1215
+ init_cjs_shims();
1216
+ exports.__esModule = true;
1217
+ var handlebars = function() {
1218
+ var parser = {
1219
+ trace: function trace() {
1220
+ },
1221
+ yy: {},
1222
+ symbols_: { "error": 2, "root": 3, "program": 4, "EOF": 5, "program_repetition0": 6, "statement": 7, "mustache": 8, "block": 9, "rawBlock": 10, "partial": 11, "partialBlock": 12, "content": 13, "COMMENT": 14, "CONTENT": 15, "openRawBlock": 16, "rawBlock_repetition0": 17, "END_RAW_BLOCK": 18, "OPEN_RAW_BLOCK": 19, "helperName": 20, "openRawBlock_repetition0": 21, "openRawBlock_option0": 22, "CLOSE_RAW_BLOCK": 23, "openBlock": 24, "block_option0": 25, "closeBlock": 26, "openInverse": 27, "block_option1": 28, "OPEN_BLOCK": 29, "openBlock_repetition0": 30, "openBlock_option0": 31, "openBlock_option1": 32, "CLOSE": 33, "OPEN_INVERSE": 34, "openInverse_repetition0": 35, "openInverse_option0": 36, "openInverse_option1": 37, "openInverseChain": 38, "OPEN_INVERSE_CHAIN": 39, "openInverseChain_repetition0": 40, "openInverseChain_option0": 41, "openInverseChain_option1": 42, "inverseAndProgram": 43, "INVERSE": 44, "inverseChain": 45, "inverseChain_option0": 46, "OPEN_ENDBLOCK": 47, "OPEN": 48, "mustache_repetition0": 49, "mustache_option0": 50, "OPEN_UNESCAPED": 51, "mustache_repetition1": 52, "mustache_option1": 53, "CLOSE_UNESCAPED": 54, "OPEN_PARTIAL": 55, "partialName": 56, "partial_repetition0": 57, "partial_option0": 58, "openPartialBlock": 59, "OPEN_PARTIAL_BLOCK": 60, "openPartialBlock_repetition0": 61, "openPartialBlock_option0": 62, "param": 63, "sexpr": 64, "OPEN_SEXPR": 65, "sexpr_repetition0": 66, "sexpr_option0": 67, "CLOSE_SEXPR": 68, "hash": 69, "hash_repetition_plus0": 70, "hashSegment": 71, "ID": 72, "EQUALS": 73, "blockParams": 74, "OPEN_BLOCK_PARAMS": 75, "blockParams_repetition_plus0": 76, "CLOSE_BLOCK_PARAMS": 77, "path": 78, "dataName": 79, "STRING": 80, "NUMBER": 81, "BOOLEAN": 82, "UNDEFINED": 83, "NULL": 84, "DATA": 85, "pathSegments": 86, "SEP": 87, "$accept": 0, "$end": 1 },
1223
+ terminals_: { 2: "error", 5: "EOF", 14: "COMMENT", 15: "CONTENT", 18: "END_RAW_BLOCK", 19: "OPEN_RAW_BLOCK", 23: "CLOSE_RAW_BLOCK", 29: "OPEN_BLOCK", 33: "CLOSE", 34: "OPEN_INVERSE", 39: "OPEN_INVERSE_CHAIN", 44: "INVERSE", 47: "OPEN_ENDBLOCK", 48: "OPEN", 51: "OPEN_UNESCAPED", 54: "CLOSE_UNESCAPED", 55: "OPEN_PARTIAL", 60: "OPEN_PARTIAL_BLOCK", 65: "OPEN_SEXPR", 68: "CLOSE_SEXPR", 72: "ID", 73: "EQUALS", 75: "OPEN_BLOCK_PARAMS", 77: "CLOSE_BLOCK_PARAMS", 80: "STRING", 81: "NUMBER", 82: "BOOLEAN", 83: "UNDEFINED", 84: "NULL", 85: "DATA", 87: "SEP" },
1224
+ productions_: [0, [3, 2], [4, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [7, 1], [13, 1], [10, 3], [16, 5], [9, 4], [9, 4], [24, 6], [27, 6], [38, 6], [43, 2], [45, 3], [45, 1], [26, 3], [8, 5], [8, 5], [11, 5], [12, 3], [59, 5], [63, 1], [63, 1], [64, 5], [69, 1], [71, 3], [74, 3], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [20, 1], [56, 1], [56, 1], [79, 2], [78, 1], [86, 3], [86, 1], [6, 0], [6, 2], [17, 0], [17, 2], [21, 0], [21, 2], [22, 0], [22, 1], [25, 0], [25, 1], [28, 0], [28, 1], [30, 0], [30, 2], [31, 0], [31, 1], [32, 0], [32, 1], [35, 0], [35, 2], [36, 0], [36, 1], [37, 0], [37, 1], [40, 0], [40, 2], [41, 0], [41, 1], [42, 0], [42, 1], [46, 0], [46, 1], [49, 0], [49, 2], [50, 0], [50, 1], [52, 0], [52, 2], [53, 0], [53, 1], [57, 0], [57, 2], [58, 0], [58, 1], [61, 0], [61, 2], [62, 0], [62, 1], [66, 0], [66, 2], [67, 0], [67, 1], [70, 1], [70, 2], [76, 1], [76, 2]],
1225
+ performAction: function anonymous(yytext, yyleng, yylineno, yy, yystate, $$, _$) {
1226
+ var $0 = $$.length - 1;
1227
+ switch (yystate) {
1228
+ case 1:
1229
+ return $$[$0 - 1];
1230
+ break;
1231
+ case 2:
1232
+ this.$ = yy.prepareProgram($$[$0]);
1233
+ break;
1234
+ case 3:
1235
+ this.$ = $$[$0];
1236
+ break;
1237
+ case 4:
1238
+ this.$ = $$[$0];
1239
+ break;
1240
+ case 5:
1241
+ this.$ = $$[$0];
1242
+ break;
1243
+ case 6:
1244
+ this.$ = $$[$0];
1245
+ break;
1246
+ case 7:
1247
+ this.$ = $$[$0];
1248
+ break;
1249
+ case 8:
1250
+ this.$ = $$[$0];
1251
+ break;
1252
+ case 9:
1253
+ this.$ = {
1254
+ type: "CommentStatement",
1255
+ value: yy.stripComment($$[$0]),
1256
+ strip: yy.stripFlags($$[$0], $$[$0]),
1257
+ loc: yy.locInfo(this._$)
1258
+ };
1259
+ break;
1260
+ case 10:
1261
+ this.$ = {
1262
+ type: "ContentStatement",
1263
+ original: $$[$0],
1264
+ value: $$[$0],
1265
+ loc: yy.locInfo(this._$)
1266
+ };
1267
+ break;
1268
+ case 11:
1269
+ this.$ = yy.prepareRawBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
1270
+ break;
1271
+ case 12:
1272
+ this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1] };
1273
+ break;
1274
+ case 13:
1275
+ this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], false, this._$);
1276
+ break;
1277
+ case 14:
1278
+ this.$ = yy.prepareBlock($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0], true, this._$);
1279
+ break;
1280
+ case 15:
1281
+ this.$ = { open: $$[$0 - 5], path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
1282
+ break;
1283
+ case 16:
1284
+ this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
1285
+ break;
1286
+ case 17:
1287
+ this.$ = { path: $$[$0 - 4], params: $$[$0 - 3], hash: $$[$0 - 2], blockParams: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 5], $$[$0]) };
1288
+ break;
1289
+ case 18:
1290
+ this.$ = { strip: yy.stripFlags($$[$0 - 1], $$[$0 - 1]), program: $$[$0] };
1291
+ break;
1292
+ case 19:
1293
+ var inverse = yy.prepareBlock($$[$0 - 2], $$[$0 - 1], $$[$0], $$[$0], false, this._$), program = yy.prepareProgram([inverse], $$[$0 - 1].loc);
1294
+ program.chained = true;
1295
+ this.$ = { strip: $$[$0 - 2].strip, program, chain: true };
1296
+ break;
1297
+ case 20:
1298
+ this.$ = $$[$0];
1299
+ break;
1300
+ case 21:
1301
+ this.$ = { path: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 2], $$[$0]) };
1302
+ break;
1303
+ case 22:
1304
+ this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
1305
+ break;
1306
+ case 23:
1307
+ this.$ = yy.prepareMustache($$[$0 - 3], $$[$0 - 2], $$[$0 - 1], $$[$0 - 4], yy.stripFlags($$[$0 - 4], $$[$0]), this._$);
1308
+ break;
1309
+ case 24:
1310
+ this.$ = {
1311
+ type: "PartialStatement",
1312
+ name: $$[$0 - 3],
1313
+ params: $$[$0 - 2],
1314
+ hash: $$[$0 - 1],
1315
+ indent: "",
1316
+ strip: yy.stripFlags($$[$0 - 4], $$[$0]),
1317
+ loc: yy.locInfo(this._$)
1318
+ };
1319
+ break;
1320
+ case 25:
1321
+ this.$ = yy.preparePartialBlock($$[$0 - 2], $$[$0 - 1], $$[$0], this._$);
1322
+ break;
1323
+ case 26:
1324
+ this.$ = { path: $$[$0 - 3], params: $$[$0 - 2], hash: $$[$0 - 1], strip: yy.stripFlags($$[$0 - 4], $$[$0]) };
1325
+ break;
1326
+ case 27:
1327
+ this.$ = $$[$0];
1328
+ break;
1329
+ case 28:
1330
+ this.$ = $$[$0];
1331
+ break;
1332
+ case 29:
1333
+ this.$ = {
1334
+ type: "SubExpression",
1335
+ path: $$[$0 - 3],
1336
+ params: $$[$0 - 2],
1337
+ hash: $$[$0 - 1],
1338
+ loc: yy.locInfo(this._$)
1339
+ };
1340
+ break;
1341
+ case 30:
1342
+ this.$ = { type: "Hash", pairs: $$[$0], loc: yy.locInfo(this._$) };
1343
+ break;
1344
+ case 31:
1345
+ this.$ = { type: "HashPair", key: yy.id($$[$0 - 2]), value: $$[$0], loc: yy.locInfo(this._$) };
1346
+ break;
1347
+ case 32:
1348
+ this.$ = yy.id($$[$0 - 1]);
1349
+ break;
1350
+ case 33:
1351
+ this.$ = $$[$0];
1352
+ break;
1353
+ case 34:
1354
+ this.$ = $$[$0];
1355
+ break;
1356
+ case 35:
1357
+ this.$ = { type: "StringLiteral", value: $$[$0], original: $$[$0], loc: yy.locInfo(this._$) };
1358
+ break;
1359
+ case 36:
1360
+ this.$ = { type: "NumberLiteral", value: Number($$[$0]), original: Number($$[$0]), loc: yy.locInfo(this._$) };
1361
+ break;
1362
+ case 37:
1363
+ this.$ = { type: "BooleanLiteral", value: $$[$0] === "true", original: $$[$0] === "true", loc: yy.locInfo(this._$) };
1364
+ break;
1365
+ case 38:
1366
+ this.$ = { type: "UndefinedLiteral", original: void 0, value: void 0, loc: yy.locInfo(this._$) };
1367
+ break;
1368
+ case 39:
1369
+ this.$ = { type: "NullLiteral", original: null, value: null, loc: yy.locInfo(this._$) };
1370
+ break;
1371
+ case 40:
1372
+ this.$ = $$[$0];
1373
+ break;
1374
+ case 41:
1375
+ this.$ = $$[$0];
1376
+ break;
1377
+ case 42:
1378
+ this.$ = yy.preparePath(true, $$[$0], this._$);
1379
+ break;
1380
+ case 43:
1381
+ this.$ = yy.preparePath(false, $$[$0], this._$);
1382
+ break;
1383
+ case 44:
1384
+ $$[$0 - 2].push({ part: yy.id($$[$0]), original: $$[$0], separator: $$[$0 - 1] });
1385
+ this.$ = $$[$0 - 2];
1386
+ break;
1387
+ case 45:
1388
+ this.$ = [{ part: yy.id($$[$0]), original: $$[$0] }];
1389
+ break;
1390
+ case 46:
1391
+ this.$ = [];
1392
+ break;
1393
+ case 47:
1394
+ $$[$0 - 1].push($$[$0]);
1395
+ break;
1396
+ case 48:
1397
+ this.$ = [];
1398
+ break;
1399
+ case 49:
1400
+ $$[$0 - 1].push($$[$0]);
1401
+ break;
1402
+ case 50:
1403
+ this.$ = [];
1404
+ break;
1405
+ case 51:
1406
+ $$[$0 - 1].push($$[$0]);
1407
+ break;
1408
+ case 58:
1409
+ this.$ = [];
1410
+ break;
1411
+ case 59:
1412
+ $$[$0 - 1].push($$[$0]);
1413
+ break;
1414
+ case 64:
1415
+ this.$ = [];
1416
+ break;
1417
+ case 65:
1418
+ $$[$0 - 1].push($$[$0]);
1419
+ break;
1420
+ case 70:
1421
+ this.$ = [];
1422
+ break;
1423
+ case 71:
1424
+ $$[$0 - 1].push($$[$0]);
1425
+ break;
1426
+ case 78:
1427
+ this.$ = [];
1428
+ break;
1429
+ case 79:
1430
+ $$[$0 - 1].push($$[$0]);
1431
+ break;
1432
+ case 82:
1433
+ this.$ = [];
1434
+ break;
1435
+ case 83:
1436
+ $$[$0 - 1].push($$[$0]);
1437
+ break;
1438
+ case 86:
1439
+ this.$ = [];
1440
+ break;
1441
+ case 87:
1442
+ $$[$0 - 1].push($$[$0]);
1443
+ break;
1444
+ case 90:
1445
+ this.$ = [];
1446
+ break;
1447
+ case 91:
1448
+ $$[$0 - 1].push($$[$0]);
1449
+ break;
1450
+ case 94:
1451
+ this.$ = [];
1452
+ break;
1453
+ case 95:
1454
+ $$[$0 - 1].push($$[$0]);
1455
+ break;
1456
+ case 98:
1457
+ this.$ = [$$[$0]];
1458
+ break;
1459
+ case 99:
1460
+ $$[$0 - 1].push($$[$0]);
1461
+ break;
1462
+ case 100:
1463
+ this.$ = [$$[$0]];
1464
+ break;
1465
+ case 101:
1466
+ $$[$0 - 1].push($$[$0]);
1467
+ break;
1468
+ }
1469
+ },
1470
+ table: [{ 3: 1, 4: 2, 5: [2, 46], 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 1: [3] }, { 5: [1, 4] }, { 5: [2, 2], 7: 5, 8: 6, 9: 7, 10: 8, 11: 9, 12: 10, 13: 11, 14: [1, 12], 15: [1, 20], 16: 17, 19: [1, 23], 24: 15, 27: 16, 29: [1, 21], 34: [1, 22], 39: [2, 2], 44: [2, 2], 47: [2, 2], 48: [1, 13], 51: [1, 14], 55: [1, 18], 59: 19, 60: [1, 24] }, { 1: [2, 1] }, { 5: [2, 47], 14: [2, 47], 15: [2, 47], 19: [2, 47], 29: [2, 47], 34: [2, 47], 39: [2, 47], 44: [2, 47], 47: [2, 47], 48: [2, 47], 51: [2, 47], 55: [2, 47], 60: [2, 47] }, { 5: [2, 3], 14: [2, 3], 15: [2, 3], 19: [2, 3], 29: [2, 3], 34: [2, 3], 39: [2, 3], 44: [2, 3], 47: [2, 3], 48: [2, 3], 51: [2, 3], 55: [2, 3], 60: [2, 3] }, { 5: [2, 4], 14: [2, 4], 15: [2, 4], 19: [2, 4], 29: [2, 4], 34: [2, 4], 39: [2, 4], 44: [2, 4], 47: [2, 4], 48: [2, 4], 51: [2, 4], 55: [2, 4], 60: [2, 4] }, { 5: [2, 5], 14: [2, 5], 15: [2, 5], 19: [2, 5], 29: [2, 5], 34: [2, 5], 39: [2, 5], 44: [2, 5], 47: [2, 5], 48: [2, 5], 51: [2, 5], 55: [2, 5], 60: [2, 5] }, { 5: [2, 6], 14: [2, 6], 15: [2, 6], 19: [2, 6], 29: [2, 6], 34: [2, 6], 39: [2, 6], 44: [2, 6], 47: [2, 6], 48: [2, 6], 51: [2, 6], 55: [2, 6], 60: [2, 6] }, { 5: [2, 7], 14: [2, 7], 15: [2, 7], 19: [2, 7], 29: [2, 7], 34: [2, 7], 39: [2, 7], 44: [2, 7], 47: [2, 7], 48: [2, 7], 51: [2, 7], 55: [2, 7], 60: [2, 7] }, { 5: [2, 8], 14: [2, 8], 15: [2, 8], 19: [2, 8], 29: [2, 8], 34: [2, 8], 39: [2, 8], 44: [2, 8], 47: [2, 8], 48: [2, 8], 51: [2, 8], 55: [2, 8], 60: [2, 8] }, { 5: [2, 9], 14: [2, 9], 15: [2, 9], 19: [2, 9], 29: [2, 9], 34: [2, 9], 39: [2, 9], 44: [2, 9], 47: [2, 9], 48: [2, 9], 51: [2, 9], 55: [2, 9], 60: [2, 9] }, { 20: 25, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 36, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 37, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 4: 38, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 15: [2, 48], 17: 39, 18: [2, 48] }, { 20: 41, 56: 40, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 44, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 5: [2, 10], 14: [2, 10], 15: [2, 10], 18: [2, 10], 19: [2, 10], 29: [2, 10], 34: [2, 10], 39: [2, 10], 44: [2, 10], 47: [2, 10], 48: [2, 10], 51: [2, 10], 55: [2, 10], 60: [2, 10] }, { 20: 45, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 46, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 47, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 41, 56: 48, 64: 42, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [2, 78], 49: 49, 65: [2, 78], 72: [2, 78], 80: [2, 78], 81: [2, 78], 82: [2, 78], 83: [2, 78], 84: [2, 78], 85: [2, 78] }, { 23: [2, 33], 33: [2, 33], 54: [2, 33], 65: [2, 33], 68: [2, 33], 72: [2, 33], 75: [2, 33], 80: [2, 33], 81: [2, 33], 82: [2, 33], 83: [2, 33], 84: [2, 33], 85: [2, 33] }, { 23: [2, 34], 33: [2, 34], 54: [2, 34], 65: [2, 34], 68: [2, 34], 72: [2, 34], 75: [2, 34], 80: [2, 34], 81: [2, 34], 82: [2, 34], 83: [2, 34], 84: [2, 34], 85: [2, 34] }, { 23: [2, 35], 33: [2, 35], 54: [2, 35], 65: [2, 35], 68: [2, 35], 72: [2, 35], 75: [2, 35], 80: [2, 35], 81: [2, 35], 82: [2, 35], 83: [2, 35], 84: [2, 35], 85: [2, 35] }, { 23: [2, 36], 33: [2, 36], 54: [2, 36], 65: [2, 36], 68: [2, 36], 72: [2, 36], 75: [2, 36], 80: [2, 36], 81: [2, 36], 82: [2, 36], 83: [2, 36], 84: [2, 36], 85: [2, 36] }, { 23: [2, 37], 33: [2, 37], 54: [2, 37], 65: [2, 37], 68: [2, 37], 72: [2, 37], 75: [2, 37], 80: [2, 37], 81: [2, 37], 82: [2, 37], 83: [2, 37], 84: [2, 37], 85: [2, 37] }, { 23: [2, 38], 33: [2, 38], 54: [2, 38], 65: [2, 38], 68: [2, 38], 72: [2, 38], 75: [2, 38], 80: [2, 38], 81: [2, 38], 82: [2, 38], 83: [2, 38], 84: [2, 38], 85: [2, 38] }, { 23: [2, 39], 33: [2, 39], 54: [2, 39], 65: [2, 39], 68: [2, 39], 72: [2, 39], 75: [2, 39], 80: [2, 39], 81: [2, 39], 82: [2, 39], 83: [2, 39], 84: [2, 39], 85: [2, 39] }, { 23: [2, 43], 33: [2, 43], 54: [2, 43], 65: [2, 43], 68: [2, 43], 72: [2, 43], 75: [2, 43], 80: [2, 43], 81: [2, 43], 82: [2, 43], 83: [2, 43], 84: [2, 43], 85: [2, 43], 87: [1, 50] }, { 72: [1, 35], 86: 51 }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 52: 52, 54: [2, 82], 65: [2, 82], 72: [2, 82], 80: [2, 82], 81: [2, 82], 82: [2, 82], 83: [2, 82], 84: [2, 82], 85: [2, 82] }, { 25: 53, 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 54, 47: [2, 54] }, { 28: 59, 43: 60, 44: [1, 58], 47: [2, 56] }, { 13: 62, 15: [1, 20], 18: [1, 61] }, { 33: [2, 86], 57: 63, 65: [2, 86], 72: [2, 86], 80: [2, 86], 81: [2, 86], 82: [2, 86], 83: [2, 86], 84: [2, 86], 85: [2, 86] }, { 33: [2, 40], 65: [2, 40], 72: [2, 40], 80: [2, 40], 81: [2, 40], 82: [2, 40], 83: [2, 40], 84: [2, 40], 85: [2, 40] }, { 33: [2, 41], 65: [2, 41], 72: [2, 41], 80: [2, 41], 81: [2, 41], 82: [2, 41], 83: [2, 41], 84: [2, 41], 85: [2, 41] }, { 20: 64, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 65, 47: [1, 66] }, { 30: 67, 33: [2, 58], 65: [2, 58], 72: [2, 58], 75: [2, 58], 80: [2, 58], 81: [2, 58], 82: [2, 58], 83: [2, 58], 84: [2, 58], 85: [2, 58] }, { 33: [2, 64], 35: 68, 65: [2, 64], 72: [2, 64], 75: [2, 64], 80: [2, 64], 81: [2, 64], 82: [2, 64], 83: [2, 64], 84: [2, 64], 85: [2, 64] }, { 21: 69, 23: [2, 50], 65: [2, 50], 72: [2, 50], 80: [2, 50], 81: [2, 50], 82: [2, 50], 83: [2, 50], 84: [2, 50], 85: [2, 50] }, { 33: [2, 90], 61: 70, 65: [2, 90], 72: [2, 90], 80: [2, 90], 81: [2, 90], 82: [2, 90], 83: [2, 90], 84: [2, 90], 85: [2, 90] }, { 20: 74, 33: [2, 80], 50: 71, 63: 72, 64: 75, 65: [1, 43], 69: 73, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 72: [1, 79] }, { 23: [2, 42], 33: [2, 42], 54: [2, 42], 65: [2, 42], 68: [2, 42], 72: [2, 42], 75: [2, 42], 80: [2, 42], 81: [2, 42], 82: [2, 42], 83: [2, 42], 84: [2, 42], 85: [2, 42], 87: [1, 50] }, { 20: 74, 53: 80, 54: [2, 84], 63: 81, 64: 75, 65: [1, 43], 69: 82, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 26: 83, 47: [1, 66] }, { 47: [2, 55] }, { 4: 84, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 39: [2, 46], 44: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 47: [2, 20] }, { 20: 85, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 4: 86, 6: 3, 14: [2, 46], 15: [2, 46], 19: [2, 46], 29: [2, 46], 34: [2, 46], 47: [2, 46], 48: [2, 46], 51: [2, 46], 55: [2, 46], 60: [2, 46] }, { 26: 87, 47: [1, 66] }, { 47: [2, 57] }, { 5: [2, 11], 14: [2, 11], 15: [2, 11], 19: [2, 11], 29: [2, 11], 34: [2, 11], 39: [2, 11], 44: [2, 11], 47: [2, 11], 48: [2, 11], 51: [2, 11], 55: [2, 11], 60: [2, 11] }, { 15: [2, 49], 18: [2, 49] }, { 20: 74, 33: [2, 88], 58: 88, 63: 89, 64: 75, 65: [1, 43], 69: 90, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 65: [2, 94], 66: 91, 68: [2, 94], 72: [2, 94], 80: [2, 94], 81: [2, 94], 82: [2, 94], 83: [2, 94], 84: [2, 94], 85: [2, 94] }, { 5: [2, 25], 14: [2, 25], 15: [2, 25], 19: [2, 25], 29: [2, 25], 34: [2, 25], 39: [2, 25], 44: [2, 25], 47: [2, 25], 48: [2, 25], 51: [2, 25], 55: [2, 25], 60: [2, 25] }, { 20: 92, 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 31: 93, 33: [2, 60], 63: 94, 64: 75, 65: [1, 43], 69: 95, 70: 76, 71: 77, 72: [1, 78], 75: [2, 60], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 66], 36: 96, 63: 97, 64: 75, 65: [1, 43], 69: 98, 70: 76, 71: 77, 72: [1, 78], 75: [2, 66], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 22: 99, 23: [2, 52], 63: 100, 64: 75, 65: [1, 43], 69: 101, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 20: 74, 33: [2, 92], 62: 102, 63: 103, 64: 75, 65: [1, 43], 69: 104, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 105] }, { 33: [2, 79], 65: [2, 79], 72: [2, 79], 80: [2, 79], 81: [2, 79], 82: [2, 79], 83: [2, 79], 84: [2, 79], 85: [2, 79] }, { 33: [2, 81] }, { 23: [2, 27], 33: [2, 27], 54: [2, 27], 65: [2, 27], 68: [2, 27], 72: [2, 27], 75: [2, 27], 80: [2, 27], 81: [2, 27], 82: [2, 27], 83: [2, 27], 84: [2, 27], 85: [2, 27] }, { 23: [2, 28], 33: [2, 28], 54: [2, 28], 65: [2, 28], 68: [2, 28], 72: [2, 28], 75: [2, 28], 80: [2, 28], 81: [2, 28], 82: [2, 28], 83: [2, 28], 84: [2, 28], 85: [2, 28] }, { 23: [2, 30], 33: [2, 30], 54: [2, 30], 68: [2, 30], 71: 106, 72: [1, 107], 75: [2, 30] }, { 23: [2, 98], 33: [2, 98], 54: [2, 98], 68: [2, 98], 72: [2, 98], 75: [2, 98] }, { 23: [2, 45], 33: [2, 45], 54: [2, 45], 65: [2, 45], 68: [2, 45], 72: [2, 45], 73: [1, 108], 75: [2, 45], 80: [2, 45], 81: [2, 45], 82: [2, 45], 83: [2, 45], 84: [2, 45], 85: [2, 45], 87: [2, 45] }, { 23: [2, 44], 33: [2, 44], 54: [2, 44], 65: [2, 44], 68: [2, 44], 72: [2, 44], 75: [2, 44], 80: [2, 44], 81: [2, 44], 82: [2, 44], 83: [2, 44], 84: [2, 44], 85: [2, 44], 87: [2, 44] }, { 54: [1, 109] }, { 54: [2, 83], 65: [2, 83], 72: [2, 83], 80: [2, 83], 81: [2, 83], 82: [2, 83], 83: [2, 83], 84: [2, 83], 85: [2, 83] }, { 54: [2, 85] }, { 5: [2, 13], 14: [2, 13], 15: [2, 13], 19: [2, 13], 29: [2, 13], 34: [2, 13], 39: [2, 13], 44: [2, 13], 47: [2, 13], 48: [2, 13], 51: [2, 13], 55: [2, 13], 60: [2, 13] }, { 38: 55, 39: [1, 57], 43: 56, 44: [1, 58], 45: 111, 46: 110, 47: [2, 76] }, { 33: [2, 70], 40: 112, 65: [2, 70], 72: [2, 70], 75: [2, 70], 80: [2, 70], 81: [2, 70], 82: [2, 70], 83: [2, 70], 84: [2, 70], 85: [2, 70] }, { 47: [2, 18] }, { 5: [2, 14], 14: [2, 14], 15: [2, 14], 19: [2, 14], 29: [2, 14], 34: [2, 14], 39: [2, 14], 44: [2, 14], 47: [2, 14], 48: [2, 14], 51: [2, 14], 55: [2, 14], 60: [2, 14] }, { 33: [1, 113] }, { 33: [2, 87], 65: [2, 87], 72: [2, 87], 80: [2, 87], 81: [2, 87], 82: [2, 87], 83: [2, 87], 84: [2, 87], 85: [2, 87] }, { 33: [2, 89] }, { 20: 74, 63: 115, 64: 75, 65: [1, 43], 67: 114, 68: [2, 96], 69: 116, 70: 76, 71: 77, 72: [1, 78], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 33: [1, 117] }, { 32: 118, 33: [2, 62], 74: 119, 75: [1, 120] }, { 33: [2, 59], 65: [2, 59], 72: [2, 59], 75: [2, 59], 80: [2, 59], 81: [2, 59], 82: [2, 59], 83: [2, 59], 84: [2, 59], 85: [2, 59] }, { 33: [2, 61], 75: [2, 61] }, { 33: [2, 68], 37: 121, 74: 122, 75: [1, 120] }, { 33: [2, 65], 65: [2, 65], 72: [2, 65], 75: [2, 65], 80: [2, 65], 81: [2, 65], 82: [2, 65], 83: [2, 65], 84: [2, 65], 85: [2, 65] }, { 33: [2, 67], 75: [2, 67] }, { 23: [1, 123] }, { 23: [2, 51], 65: [2, 51], 72: [2, 51], 80: [2, 51], 81: [2, 51], 82: [2, 51], 83: [2, 51], 84: [2, 51], 85: [2, 51] }, { 23: [2, 53] }, { 33: [1, 124] }, { 33: [2, 91], 65: [2, 91], 72: [2, 91], 80: [2, 91], 81: [2, 91], 82: [2, 91], 83: [2, 91], 84: [2, 91], 85: [2, 91] }, { 33: [2, 93] }, { 5: [2, 22], 14: [2, 22], 15: [2, 22], 19: [2, 22], 29: [2, 22], 34: [2, 22], 39: [2, 22], 44: [2, 22], 47: [2, 22], 48: [2, 22], 51: [2, 22], 55: [2, 22], 60: [2, 22] }, { 23: [2, 99], 33: [2, 99], 54: [2, 99], 68: [2, 99], 72: [2, 99], 75: [2, 99] }, { 73: [1, 108] }, { 20: 74, 63: 125, 64: 75, 65: [1, 43], 72: [1, 35], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 23], 14: [2, 23], 15: [2, 23], 19: [2, 23], 29: [2, 23], 34: [2, 23], 39: [2, 23], 44: [2, 23], 47: [2, 23], 48: [2, 23], 51: [2, 23], 55: [2, 23], 60: [2, 23] }, { 47: [2, 19] }, { 47: [2, 77] }, { 20: 74, 33: [2, 72], 41: 126, 63: 127, 64: 75, 65: [1, 43], 69: 128, 70: 76, 71: 77, 72: [1, 78], 75: [2, 72], 78: 26, 79: 27, 80: [1, 28], 81: [1, 29], 82: [1, 30], 83: [1, 31], 84: [1, 32], 85: [1, 34], 86: 33 }, { 5: [2, 24], 14: [2, 24], 15: [2, 24], 19: [2, 24], 29: [2, 24], 34: [2, 24], 39: [2, 24], 44: [2, 24], 47: [2, 24], 48: [2, 24], 51: [2, 24], 55: [2, 24], 60: [2, 24] }, { 68: [1, 129] }, { 65: [2, 95], 68: [2, 95], 72: [2, 95], 80: [2, 95], 81: [2, 95], 82: [2, 95], 83: [2, 95], 84: [2, 95], 85: [2, 95] }, { 68: [2, 97] }, { 5: [2, 21], 14: [2, 21], 15: [2, 21], 19: [2, 21], 29: [2, 21], 34: [2, 21], 39: [2, 21], 44: [2, 21], 47: [2, 21], 48: [2, 21], 51: [2, 21], 55: [2, 21], 60: [2, 21] }, { 33: [1, 130] }, { 33: [2, 63] }, { 72: [1, 132], 76: 131 }, { 33: [1, 133] }, { 33: [2, 69] }, { 15: [2, 12], 18: [2, 12] }, { 14: [2, 26], 15: [2, 26], 19: [2, 26], 29: [2, 26], 34: [2, 26], 47: [2, 26], 48: [2, 26], 51: [2, 26], 55: [2, 26], 60: [2, 26] }, { 23: [2, 31], 33: [2, 31], 54: [2, 31], 68: [2, 31], 72: [2, 31], 75: [2, 31] }, { 33: [2, 74], 42: 134, 74: 135, 75: [1, 120] }, { 33: [2, 71], 65: [2, 71], 72: [2, 71], 75: [2, 71], 80: [2, 71], 81: [2, 71], 82: [2, 71], 83: [2, 71], 84: [2, 71], 85: [2, 71] }, { 33: [2, 73], 75: [2, 73] }, { 23: [2, 29], 33: [2, 29], 54: [2, 29], 65: [2, 29], 68: [2, 29], 72: [2, 29], 75: [2, 29], 80: [2, 29], 81: [2, 29], 82: [2, 29], 83: [2, 29], 84: [2, 29], 85: [2, 29] }, { 14: [2, 15], 15: [2, 15], 19: [2, 15], 29: [2, 15], 34: [2, 15], 39: [2, 15], 44: [2, 15], 47: [2, 15], 48: [2, 15], 51: [2, 15], 55: [2, 15], 60: [2, 15] }, { 72: [1, 137], 77: [1, 136] }, { 72: [2, 100], 77: [2, 100] }, { 14: [2, 16], 15: [2, 16], 19: [2, 16], 29: [2, 16], 34: [2, 16], 44: [2, 16], 47: [2, 16], 48: [2, 16], 51: [2, 16], 55: [2, 16], 60: [2, 16] }, { 33: [1, 138] }, { 33: [2, 75] }, { 33: [2, 32] }, { 72: [2, 101], 77: [2, 101] }, { 14: [2, 17], 15: [2, 17], 19: [2, 17], 29: [2, 17], 34: [2, 17], 39: [2, 17], 44: [2, 17], 47: [2, 17], 48: [2, 17], 51: [2, 17], 55: [2, 17], 60: [2, 17] }],
1471
+ defaultActions: { 4: [2, 1], 54: [2, 55], 56: [2, 20], 60: [2, 57], 73: [2, 81], 82: [2, 85], 86: [2, 18], 90: [2, 89], 101: [2, 53], 104: [2, 93], 110: [2, 19], 111: [2, 77], 116: [2, 97], 119: [2, 63], 122: [2, 69], 135: [2, 75], 136: [2, 32] },
1472
+ parseError: function parseError(str, hash) {
1473
+ throw new Error(str);
1474
+ },
1475
+ parse: function parse(input) {
1476
+ var self = this, stack = [0], vstack = [null], lstack = [], table = this.table, yytext = "", yylineno = 0, yyleng = 0, recovering = 0, TERROR = 2, EOF = 1;
1477
+ this.lexer.setInput(input);
1478
+ this.lexer.yy = this.yy;
1479
+ this.yy.lexer = this.lexer;
1480
+ this.yy.parser = this;
1481
+ if (typeof this.lexer.yylloc == "undefined") this.lexer.yylloc = {};
1482
+ var yyloc = this.lexer.yylloc;
1483
+ lstack.push(yyloc);
1484
+ var ranges = this.lexer.options && this.lexer.options.ranges;
1485
+ if (typeof this.yy.parseError === "function") this.parseError = this.yy.parseError;
1486
+ function popStack(n) {
1487
+ stack.length = stack.length - 2 * n;
1488
+ vstack.length = vstack.length - n;
1489
+ lstack.length = lstack.length - n;
1490
+ }
1491
+ function lex() {
1492
+ var token;
1493
+ token = self.lexer.lex() || 1;
1494
+ if (typeof token !== "number") {
1495
+ token = self.symbols_[token] || token;
1496
+ }
1497
+ return token;
1498
+ }
1499
+ var symbol, preErrorSymbol, state, action, a, r, yyval = {}, p, len, newState, expected;
1500
+ while (true) {
1501
+ state = stack[stack.length - 1];
1502
+ if (this.defaultActions[state]) {
1503
+ action = this.defaultActions[state];
1504
+ } else {
1505
+ if (symbol === null || typeof symbol == "undefined") {
1506
+ symbol = lex();
1507
+ }
1508
+ action = table[state] && table[state][symbol];
1509
+ }
1510
+ if (typeof action === "undefined" || !action.length || !action[0]) {
1511
+ var errStr = "";
1512
+ if (!recovering) {
1513
+ expected = [];
1514
+ for (p in table[state]) if (this.terminals_[p] && p > 2) {
1515
+ expected.push("'" + this.terminals_[p] + "'");
1516
+ }
1517
+ if (this.lexer.showPosition) {
1518
+ errStr = "Parse error on line " + (yylineno + 1) + ":\n" + this.lexer.showPosition() + "\nExpecting " + expected.join(", ") + ", got '" + (this.terminals_[symbol] || symbol) + "'";
1519
+ } else {
1520
+ errStr = "Parse error on line " + (yylineno + 1) + ": Unexpected " + (symbol == 1 ? "end of input" : "'" + (this.terminals_[symbol] || symbol) + "'");
1521
+ }
1522
+ this.parseError(errStr, { text: this.lexer.match, token: this.terminals_[symbol] || symbol, line: this.lexer.yylineno, loc: yyloc, expected });
1523
+ }
1524
+ }
1525
+ if (action[0] instanceof Array && action.length > 1) {
1526
+ throw new Error("Parse Error: multiple actions possible at state: " + state + ", token: " + symbol);
1527
+ }
1528
+ switch (action[0]) {
1529
+ case 1:
1530
+ stack.push(symbol);
1531
+ vstack.push(this.lexer.yytext);
1532
+ lstack.push(this.lexer.yylloc);
1533
+ stack.push(action[1]);
1534
+ symbol = null;
1535
+ if (!preErrorSymbol) {
1536
+ yyleng = this.lexer.yyleng;
1537
+ yytext = this.lexer.yytext;
1538
+ yylineno = this.lexer.yylineno;
1539
+ yyloc = this.lexer.yylloc;
1540
+ if (recovering > 0) recovering--;
1541
+ } else {
1542
+ symbol = preErrorSymbol;
1543
+ preErrorSymbol = null;
1544
+ }
1545
+ break;
1546
+ case 2:
1547
+ len = this.productions_[action[1]][1];
1548
+ yyval.$ = vstack[vstack.length - len];
1549
+ yyval._$ = { first_line: lstack[lstack.length - (len || 1)].first_line, last_line: lstack[lstack.length - 1].last_line, first_column: lstack[lstack.length - (len || 1)].first_column, last_column: lstack[lstack.length - 1].last_column };
1550
+ if (ranges) {
1551
+ yyval._$.range = [lstack[lstack.length - (len || 1)].range[0], lstack[lstack.length - 1].range[1]];
1552
+ }
1553
+ r = this.performAction.call(yyval, yytext, yyleng, yylineno, this.yy, action[1], vstack, lstack);
1554
+ if (typeof r !== "undefined") {
1555
+ return r;
1556
+ }
1557
+ if (len) {
1558
+ stack = stack.slice(0, -1 * len * 2);
1559
+ vstack = vstack.slice(0, -1 * len);
1560
+ lstack = lstack.slice(0, -1 * len);
1561
+ }
1562
+ stack.push(this.productions_[action[1]][0]);
1563
+ vstack.push(yyval.$);
1564
+ lstack.push(yyval._$);
1565
+ newState = table[stack[stack.length - 2]][stack[stack.length - 1]];
1566
+ stack.push(newState);
1567
+ break;
1568
+ case 3:
1569
+ return true;
1570
+ }
1571
+ }
1572
+ return true;
1573
+ }
1574
+ };
1575
+ var lexer = function() {
1576
+ var lexer2 = {
1577
+ EOF: 1,
1578
+ parseError: function parseError(str, hash) {
1579
+ if (this.yy.parser) {
1580
+ this.yy.parser.parseError(str, hash);
1581
+ } else {
1582
+ throw new Error(str);
1583
+ }
1584
+ },
1585
+ setInput: function setInput(input) {
1586
+ this._input = input;
1587
+ this._more = this._less = this.done = false;
1588
+ this.yylineno = this.yyleng = 0;
1589
+ this.yytext = this.matched = this.match = "";
1590
+ this.conditionStack = ["INITIAL"];
1591
+ this.yylloc = { first_line: 1, first_column: 0, last_line: 1, last_column: 0 };
1592
+ if (this.options.ranges) this.yylloc.range = [0, 0];
1593
+ this.offset = 0;
1594
+ return this;
1595
+ },
1596
+ input: function input() {
1597
+ var ch = this._input[0];
1598
+ this.yytext += ch;
1599
+ this.yyleng++;
1600
+ this.offset++;
1601
+ this.match += ch;
1602
+ this.matched += ch;
1603
+ var lines = ch.match(/(?:\r\n?|\n).*/g);
1604
+ if (lines) {
1605
+ this.yylineno++;
1606
+ this.yylloc.last_line++;
1607
+ } else {
1608
+ this.yylloc.last_column++;
1609
+ }
1610
+ if (this.options.ranges) this.yylloc.range[1]++;
1611
+ this._input = this._input.slice(1);
1612
+ return ch;
1613
+ },
1614
+ unput: function unput(ch) {
1615
+ var len = ch.length;
1616
+ var lines = ch.split(/(?:\r\n?|\n)/g);
1617
+ this._input = ch + this._input;
1618
+ this.yytext = this.yytext.substr(0, this.yytext.length - len - 1);
1619
+ this.offset -= len;
1620
+ var oldLines = this.match.split(/(?:\r\n?|\n)/g);
1621
+ this.match = this.match.substr(0, this.match.length - 1);
1622
+ this.matched = this.matched.substr(0, this.matched.length - 1);
1623
+ if (lines.length - 1) this.yylineno -= lines.length - 1;
1624
+ var r = this.yylloc.range;
1625
+ this.yylloc = {
1626
+ first_line: this.yylloc.first_line,
1627
+ last_line: this.yylineno + 1,
1628
+ first_column: this.yylloc.first_column,
1629
+ last_column: lines ? (lines.length === oldLines.length ? this.yylloc.first_column : 0) + oldLines[oldLines.length - lines.length].length - lines[0].length : this.yylloc.first_column - len
1630
+ };
1631
+ if (this.options.ranges) {
1632
+ this.yylloc.range = [r[0], r[0] + this.yyleng - len];
1633
+ }
1634
+ return this;
1635
+ },
1636
+ more: function more() {
1637
+ this._more = true;
1638
+ return this;
1639
+ },
1640
+ less: function less(n) {
1641
+ this.unput(this.match.slice(n));
1642
+ },
1643
+ pastInput: function pastInput() {
1644
+ var past = this.matched.substr(0, this.matched.length - this.match.length);
1645
+ return (past.length > 20 ? "..." : "") + past.substr(-20).replace(/\n/g, "");
1646
+ },
1647
+ upcomingInput: function upcomingInput() {
1648
+ var next = this.match;
1649
+ if (next.length < 20) {
1650
+ next += this._input.substr(0, 20 - next.length);
1651
+ }
1652
+ return (next.substr(0, 20) + (next.length > 20 ? "..." : "")).replace(/\n/g, "");
1653
+ },
1654
+ showPosition: function showPosition() {
1655
+ var pre = this.pastInput();
1656
+ var c = new Array(pre.length + 1).join("-");
1657
+ return pre + this.upcomingInput() + "\n" + c + "^";
1658
+ },
1659
+ next: function next() {
1660
+ if (this.done) {
1661
+ return this.EOF;
1662
+ }
1663
+ if (!this._input) this.done = true;
1664
+ var token, match, tempMatch, index, col, lines;
1665
+ if (!this._more) {
1666
+ this.yytext = "";
1667
+ this.match = "";
1668
+ }
1669
+ var rules = this._currentRules();
1670
+ for (var i = 0; i < rules.length; i++) {
1671
+ tempMatch = this._input.match(this.rules[rules[i]]);
1672
+ if (tempMatch && (!match || tempMatch[0].length > match[0].length)) {
1673
+ match = tempMatch;
1674
+ index = i;
1675
+ if (!this.options.flex) break;
1676
+ }
1677
+ }
1678
+ if (match) {
1679
+ lines = match[0].match(/(?:\r\n?|\n).*/g);
1680
+ if (lines) this.yylineno += lines.length;
1681
+ this.yylloc = {
1682
+ first_line: this.yylloc.last_line,
1683
+ last_line: this.yylineno + 1,
1684
+ first_column: this.yylloc.last_column,
1685
+ last_column: lines ? lines[lines.length - 1].length - lines[lines.length - 1].match(/\r?\n?/)[0].length : this.yylloc.last_column + match[0].length
1686
+ };
1687
+ this.yytext += match[0];
1688
+ this.match += match[0];
1689
+ this.matches = match;
1690
+ this.yyleng = this.yytext.length;
1691
+ if (this.options.ranges) {
1692
+ this.yylloc.range = [this.offset, this.offset += this.yyleng];
1693
+ }
1694
+ this._more = false;
1695
+ this._input = this._input.slice(match[0].length);
1696
+ this.matched += match[0];
1697
+ token = this.performAction.call(this, this.yy, this, rules[index], this.conditionStack[this.conditionStack.length - 1]);
1698
+ if (this.done && this._input) this.done = false;
1699
+ if (token) return token;
1700
+ else return;
1701
+ }
1702
+ if (this._input === "") {
1703
+ return this.EOF;
1704
+ } else {
1705
+ return this.parseError("Lexical error on line " + (this.yylineno + 1) + ". Unrecognized text.\n" + this.showPosition(), { text: "", token: null, line: this.yylineno });
1706
+ }
1707
+ },
1708
+ lex: function lex() {
1709
+ var r = this.next();
1710
+ if (typeof r !== "undefined") {
1711
+ return r;
1712
+ } else {
1713
+ return this.lex();
1714
+ }
1715
+ },
1716
+ begin: function begin(condition) {
1717
+ this.conditionStack.push(condition);
1718
+ },
1719
+ popState: function popState() {
1720
+ return this.conditionStack.pop();
1721
+ },
1722
+ _currentRules: function _currentRules() {
1723
+ return this.conditions[this.conditionStack[this.conditionStack.length - 1]].rules;
1724
+ },
1725
+ topState: function topState() {
1726
+ return this.conditionStack[this.conditionStack.length - 2];
1727
+ },
1728
+ pushState: function begin(condition) {
1729
+ this.begin(condition);
1730
+ }
1731
+ };
1732
+ lexer2.options = {};
1733
+ lexer2.performAction = function anonymous(yy, yy_, $avoiding_name_collisions, YY_START) {
1734
+ function strip(start, end) {
1735
+ return yy_.yytext = yy_.yytext.substring(start, yy_.yyleng - end + start);
1736
+ }
1737
+ var YYSTATE = YY_START;
1738
+ switch ($avoiding_name_collisions) {
1739
+ case 0:
1740
+ if (yy_.yytext.slice(-2) === "\\\\") {
1741
+ strip(0, 1);
1742
+ this.begin("mu");
1743
+ } else if (yy_.yytext.slice(-1) === "\\") {
1744
+ strip(0, 1);
1745
+ this.begin("emu");
1746
+ } else {
1747
+ this.begin("mu");
1748
+ }
1749
+ if (yy_.yytext) return 15;
1750
+ break;
1751
+ case 1:
1752
+ return 15;
1753
+ break;
1754
+ case 2:
1755
+ this.popState();
1756
+ return 15;
1757
+ break;
1758
+ case 3:
1759
+ this.begin("raw");
1760
+ return 15;
1761
+ break;
1762
+ case 4:
1763
+ this.popState();
1764
+ if (this.conditionStack[this.conditionStack.length - 1] === "raw") {
1765
+ return 15;
1766
+ } else {
1767
+ strip(5, 9);
1768
+ return "END_RAW_BLOCK";
1769
+ }
1770
+ break;
1771
+ case 5:
1772
+ return 15;
1773
+ break;
1774
+ case 6:
1775
+ this.popState();
1776
+ return 14;
1777
+ break;
1778
+ case 7:
1779
+ return 65;
1780
+ break;
1781
+ case 8:
1782
+ return 68;
1783
+ break;
1784
+ case 9:
1785
+ return 19;
1786
+ break;
1787
+ case 10:
1788
+ this.popState();
1789
+ this.begin("raw");
1790
+ return 23;
1791
+ break;
1792
+ case 11:
1793
+ return 55;
1794
+ break;
1795
+ case 12:
1796
+ return 60;
1797
+ break;
1798
+ case 13:
1799
+ return 29;
1800
+ break;
1801
+ case 14:
1802
+ return 47;
1803
+ break;
1804
+ case 15:
1805
+ this.popState();
1806
+ return 44;
1807
+ break;
1808
+ case 16:
1809
+ this.popState();
1810
+ return 44;
1811
+ break;
1812
+ case 17:
1813
+ return 34;
1814
+ break;
1815
+ case 18:
1816
+ return 39;
1817
+ break;
1818
+ case 19:
1819
+ return 51;
1820
+ break;
1821
+ case 20:
1822
+ return 48;
1823
+ break;
1824
+ case 21:
1825
+ this.unput(yy_.yytext);
1826
+ this.popState();
1827
+ this.begin("com");
1828
+ break;
1829
+ case 22:
1830
+ this.popState();
1831
+ return 14;
1832
+ break;
1833
+ case 23:
1834
+ return 48;
1835
+ break;
1836
+ case 24:
1837
+ return 73;
1838
+ break;
1839
+ case 25:
1840
+ return 72;
1841
+ break;
1842
+ case 26:
1843
+ return 72;
1844
+ break;
1845
+ case 27:
1846
+ return 87;
1847
+ break;
1848
+ case 28:
1849
+ break;
1850
+ case 29:
1851
+ this.popState();
1852
+ return 54;
1853
+ break;
1854
+ case 30:
1855
+ this.popState();
1856
+ return 33;
1857
+ break;
1858
+ case 31:
1859
+ yy_.yytext = strip(1, 2).replace(/\\"/g, '"');
1860
+ return 80;
1861
+ break;
1862
+ case 32:
1863
+ yy_.yytext = strip(1, 2).replace(/\\'/g, "'");
1864
+ return 80;
1865
+ break;
1866
+ case 33:
1867
+ return 85;
1868
+ break;
1869
+ case 34:
1870
+ return 82;
1871
+ break;
1872
+ case 35:
1873
+ return 82;
1874
+ break;
1875
+ case 36:
1876
+ return 83;
1877
+ break;
1878
+ case 37:
1879
+ return 84;
1880
+ break;
1881
+ case 38:
1882
+ return 81;
1883
+ break;
1884
+ case 39:
1885
+ return 75;
1886
+ break;
1887
+ case 40:
1888
+ return 77;
1889
+ break;
1890
+ case 41:
1891
+ return 72;
1892
+ break;
1893
+ case 42:
1894
+ yy_.yytext = yy_.yytext.replace(/\\([\\\]])/g, "$1");
1895
+ return 72;
1896
+ break;
1897
+ case 43:
1898
+ return "INVALID";
1899
+ break;
1900
+ case 44:
1901
+ return 5;
1902
+ break;
1903
+ }
1904
+ };
1905
+ lexer2.rules = [/^(?:[^\x00]*?(?=(\{\{)))/, /^(?:[^\x00]+)/, /^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/, /^(?:\{\{\{\{(?=[^/]))/, /^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/, /^(?:[^\x00]+?(?=(\{\{\{\{)))/, /^(?:[\s\S]*?--(~)?\}\})/, /^(?:\()/, /^(?:\))/, /^(?:\{\{\{\{)/, /^(?:\}\}\}\})/, /^(?:\{\{(~)?>)/, /^(?:\{\{(~)?#>)/, /^(?:\{\{(~)?#\*?)/, /^(?:\{\{(~)?\/)/, /^(?:\{\{(~)?\^\s*(~)?\}\})/, /^(?:\{\{(~)?\s*else\s*(~)?\}\})/, /^(?:\{\{(~)?\^)/, /^(?:\{\{(~)?\s*else\b)/, /^(?:\{\{(~)?\{)/, /^(?:\{\{(~)?&)/, /^(?:\{\{(~)?!--)/, /^(?:\{\{(~)?![\s\S]*?\}\})/, /^(?:\{\{(~)?\*?)/, /^(?:=)/, /^(?:\.\.)/, /^(?:\.(?=([=~}\s\/.)|])))/, /^(?:[\/.])/, /^(?:\s+)/, /^(?:\}(~)?\}\})/, /^(?:(~)?\}\})/, /^(?:"(\\["]|[^"])*")/, /^(?:'(\\[']|[^'])*')/, /^(?:@)/, /^(?:true(?=([~}\s)])))/, /^(?:false(?=([~}\s)])))/, /^(?:undefined(?=([~}\s)])))/, /^(?:null(?=([~}\s)])))/, /^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/, /^(?:as\s+\|)/, /^(?:\|)/, /^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)|]))))/, /^(?:\[(\\\]|[^\]])*\])/, /^(?:.)/, /^(?:$)/];
1906
+ lexer2.conditions = { "mu": { "rules": [7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44], "inclusive": false }, "emu": { "rules": [2], "inclusive": false }, "com": { "rules": [6], "inclusive": false }, "raw": { "rules": [3, 4, 5], "inclusive": false }, "INITIAL": { "rules": [0, 1, 44], "inclusive": true } };
1907
+ return lexer2;
1908
+ }();
1909
+ parser.lexer = lexer;
1910
+ function Parser() {
1911
+ this.yy = {};
1912
+ }
1913
+ Parser.prototype = parser;
1914
+ parser.Parser = Parser;
1915
+ return new Parser();
1916
+ }();
1917
+ exports["default"] = handlebars;
1918
+ module.exports = exports["default"];
1919
+ }
1920
+ });
1921
+
1922
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js
1923
+ var require_visitor = __commonJS({
1924
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/visitor.js"(exports, module) {
1925
+ "use strict";
1926
+ init_cjs_shims();
1927
+ exports.__esModule = true;
1928
+ function _interopRequireDefault(obj) {
1929
+ return obj && obj.__esModule ? obj : { "default": obj };
1930
+ }
1931
+ var _exception = require_exception();
1932
+ var _exception2 = _interopRequireDefault(_exception);
1933
+ function Visitor() {
1934
+ this.parents = [];
1935
+ }
1936
+ Visitor.prototype = {
1937
+ constructor: Visitor,
1938
+ mutating: false,
1939
+ // Visits a given value. If mutating, will replace the value if necessary.
1940
+ acceptKey: function acceptKey(node, name) {
1941
+ var value = this.accept(node[name]);
1942
+ if (this.mutating) {
1943
+ if (value && !Visitor.prototype[value.type]) {
1944
+ throw new _exception2["default"]('Unexpected node type "' + value.type + '" found when accepting ' + name + " on " + node.type);
1945
+ }
1946
+ node[name] = value;
1947
+ }
1948
+ },
1949
+ // Performs an accept operation with added sanity check to ensure
1950
+ // required keys are not removed.
1951
+ acceptRequired: function acceptRequired(node, name) {
1952
+ this.acceptKey(node, name);
1953
+ if (!node[name]) {
1954
+ throw new _exception2["default"](node.type + " requires " + name);
1955
+ }
1956
+ },
1957
+ // Traverses a given array. If mutating, empty respnses will be removed
1958
+ // for child elements.
1959
+ acceptArray: function acceptArray(array) {
1960
+ for (var i = 0, l = array.length; i < l; i++) {
1961
+ this.acceptKey(array, i);
1962
+ if (!array[i]) {
1963
+ array.splice(i, 1);
1964
+ i--;
1965
+ l--;
1966
+ }
1967
+ }
1968
+ },
1969
+ accept: function accept(object) {
1970
+ if (!object) {
1971
+ return;
1972
+ }
1973
+ if (!this[object.type]) {
1974
+ throw new _exception2["default"]("Unknown type: " + object.type, object);
1975
+ }
1976
+ if (this.current) {
1977
+ this.parents.unshift(this.current);
1978
+ }
1979
+ this.current = object;
1980
+ var ret = this[object.type](object);
1981
+ this.current = this.parents.shift();
1982
+ if (!this.mutating || ret) {
1983
+ return ret;
1984
+ } else if (ret !== false) {
1985
+ return object;
1986
+ }
1987
+ },
1988
+ Program: function Program(program) {
1989
+ this.acceptArray(program.body);
1990
+ },
1991
+ MustacheStatement: visitSubExpression,
1992
+ Decorator: visitSubExpression,
1993
+ BlockStatement: visitBlock,
1994
+ DecoratorBlock: visitBlock,
1995
+ PartialStatement: visitPartial,
1996
+ PartialBlockStatement: function PartialBlockStatement(partial) {
1997
+ visitPartial.call(this, partial);
1998
+ this.acceptKey(partial, "program");
1999
+ },
2000
+ ContentStatement: function ContentStatement() {
2001
+ },
2002
+ CommentStatement: function CommentStatement() {
2003
+ },
2004
+ SubExpression: visitSubExpression,
2005
+ PathExpression: function PathExpression() {
2006
+ },
2007
+ StringLiteral: function StringLiteral() {
2008
+ },
2009
+ NumberLiteral: function NumberLiteral() {
2010
+ },
2011
+ BooleanLiteral: function BooleanLiteral() {
2012
+ },
2013
+ UndefinedLiteral: function UndefinedLiteral() {
2014
+ },
2015
+ NullLiteral: function NullLiteral() {
2016
+ },
2017
+ Hash: function Hash(hash) {
2018
+ this.acceptArray(hash.pairs);
2019
+ },
2020
+ HashPair: function HashPair(pair) {
2021
+ this.acceptRequired(pair, "value");
2022
+ }
2023
+ };
2024
+ function visitSubExpression(mustache) {
2025
+ this.acceptRequired(mustache, "path");
2026
+ this.acceptArray(mustache.params);
2027
+ this.acceptKey(mustache, "hash");
2028
+ }
2029
+ function visitBlock(block) {
2030
+ visitSubExpression.call(this, block);
2031
+ this.acceptKey(block, "program");
2032
+ this.acceptKey(block, "inverse");
2033
+ }
2034
+ function visitPartial(partial) {
2035
+ this.acceptRequired(partial, "name");
2036
+ this.acceptArray(partial.params);
2037
+ this.acceptKey(partial, "hash");
2038
+ }
2039
+ exports["default"] = Visitor;
2040
+ module.exports = exports["default"];
2041
+ }
2042
+ });
2043
+
2044
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js
2045
+ var require_whitespace_control = __commonJS({
2046
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/whitespace-control.js"(exports, module) {
2047
+ "use strict";
2048
+ init_cjs_shims();
2049
+ exports.__esModule = true;
2050
+ function _interopRequireDefault(obj) {
2051
+ return obj && obj.__esModule ? obj : { "default": obj };
2052
+ }
2053
+ var _visitor = require_visitor();
2054
+ var _visitor2 = _interopRequireDefault(_visitor);
2055
+ function WhitespaceControl() {
2056
+ var options = arguments.length <= 0 || arguments[0] === void 0 ? {} : arguments[0];
2057
+ this.options = options;
2058
+ }
2059
+ WhitespaceControl.prototype = new _visitor2["default"]();
2060
+ WhitespaceControl.prototype.Program = function(program) {
2061
+ var doStandalone = !this.options.ignoreStandalone;
2062
+ var isRoot = !this.isRootSeen;
2063
+ this.isRootSeen = true;
2064
+ var body = program.body;
2065
+ for (var i = 0, l = body.length; i < l; i++) {
2066
+ var current = body[i], strip = this.accept(current);
2067
+ if (!strip) {
2068
+ continue;
2069
+ }
2070
+ var _isPrevWhitespace = isPrevWhitespace(body, i, isRoot), _isNextWhitespace = isNextWhitespace(body, i, isRoot), openStandalone = strip.openStandalone && _isPrevWhitespace, closeStandalone = strip.closeStandalone && _isNextWhitespace, inlineStandalone = strip.inlineStandalone && _isPrevWhitespace && _isNextWhitespace;
2071
+ if (strip.close) {
2072
+ omitRight(body, i, true);
2073
+ }
2074
+ if (strip.open) {
2075
+ omitLeft(body, i, true);
2076
+ }
2077
+ if (doStandalone && inlineStandalone) {
2078
+ omitRight(body, i);
2079
+ if (omitLeft(body, i)) {
2080
+ if (current.type === "PartialStatement") {
2081
+ current.indent = /([ \t]+$)/.exec(body[i - 1].original)[1];
2082
+ }
2083
+ }
2084
+ }
2085
+ if (doStandalone && openStandalone) {
2086
+ omitRight((current.program || current.inverse).body);
2087
+ omitLeft(body, i);
2088
+ }
2089
+ if (doStandalone && closeStandalone) {
2090
+ omitRight(body, i);
2091
+ omitLeft((current.inverse || current.program).body);
2092
+ }
2093
+ }
2094
+ return program;
2095
+ };
2096
+ WhitespaceControl.prototype.BlockStatement = WhitespaceControl.prototype.DecoratorBlock = WhitespaceControl.prototype.PartialBlockStatement = function(block) {
2097
+ this.accept(block.program);
2098
+ this.accept(block.inverse);
2099
+ var program = block.program || block.inverse, inverse = block.program && block.inverse, firstInverse = inverse, lastInverse = inverse;
2100
+ if (inverse && inverse.chained) {
2101
+ firstInverse = inverse.body[0].program;
2102
+ while (lastInverse.chained) {
2103
+ lastInverse = lastInverse.body[lastInverse.body.length - 1].program;
2104
+ }
2105
+ }
2106
+ var strip = {
2107
+ open: block.openStrip.open,
2108
+ close: block.closeStrip.close,
2109
+ // Determine the standalone candiacy. Basically flag our content as being possibly standalone
2110
+ // so our parent can determine if we actually are standalone
2111
+ openStandalone: isNextWhitespace(program.body),
2112
+ closeStandalone: isPrevWhitespace((firstInverse || program).body)
2113
+ };
2114
+ if (block.openStrip.close) {
2115
+ omitRight(program.body, null, true);
2116
+ }
2117
+ if (inverse) {
2118
+ var inverseStrip = block.inverseStrip;
2119
+ if (inverseStrip.open) {
2120
+ omitLeft(program.body, null, true);
2121
+ }
2122
+ if (inverseStrip.close) {
2123
+ omitRight(firstInverse.body, null, true);
2124
+ }
2125
+ if (block.closeStrip.open) {
2126
+ omitLeft(lastInverse.body, null, true);
2127
+ }
2128
+ if (!this.options.ignoreStandalone && isPrevWhitespace(program.body) && isNextWhitespace(firstInverse.body)) {
2129
+ omitLeft(program.body);
2130
+ omitRight(firstInverse.body);
2131
+ }
2132
+ } else if (block.closeStrip.open) {
2133
+ omitLeft(program.body, null, true);
2134
+ }
2135
+ return strip;
2136
+ };
2137
+ WhitespaceControl.prototype.Decorator = WhitespaceControl.prototype.MustacheStatement = function(mustache) {
2138
+ return mustache.strip;
2139
+ };
2140
+ WhitespaceControl.prototype.PartialStatement = WhitespaceControl.prototype.CommentStatement = function(node) {
2141
+ var strip = node.strip || {};
2142
+ return {
2143
+ inlineStandalone: true,
2144
+ open: strip.open,
2145
+ close: strip.close
2146
+ };
2147
+ };
2148
+ function isPrevWhitespace(body, i, isRoot) {
2149
+ if (i === void 0) {
2150
+ i = body.length;
2151
+ }
2152
+ var prev = body[i - 1], sibling = body[i - 2];
2153
+ if (!prev) {
2154
+ return isRoot;
2155
+ }
2156
+ if (prev.type === "ContentStatement") {
2157
+ return (sibling || !isRoot ? /\r?\n\s*?$/ : /(^|\r?\n)\s*?$/).test(prev.original);
2158
+ }
2159
+ }
2160
+ function isNextWhitespace(body, i, isRoot) {
2161
+ if (i === void 0) {
2162
+ i = -1;
2163
+ }
2164
+ var next = body[i + 1], sibling = body[i + 2];
2165
+ if (!next) {
2166
+ return isRoot;
2167
+ }
2168
+ if (next.type === "ContentStatement") {
2169
+ return (sibling || !isRoot ? /^\s*?\r?\n/ : /^\s*?(\r?\n|$)/).test(next.original);
2170
+ }
2171
+ }
2172
+ function omitRight(body, i, multiple) {
2173
+ var current = body[i == null ? 0 : i + 1];
2174
+ if (!current || current.type !== "ContentStatement" || !multiple && current.rightStripped) {
2175
+ return;
2176
+ }
2177
+ var original = current.value;
2178
+ current.value = current.value.replace(multiple ? /^\s+/ : /^[ \t]*\r?\n?/, "");
2179
+ current.rightStripped = current.value !== original;
2180
+ }
2181
+ function omitLeft(body, i, multiple) {
2182
+ var current = body[i == null ? body.length - 1 : i - 1];
2183
+ if (!current || current.type !== "ContentStatement" || !multiple && current.leftStripped) {
2184
+ return;
2185
+ }
2186
+ var original = current.value;
2187
+ current.value = current.value.replace(multiple ? /\s+$/ : /[ \t]+$/, "");
2188
+ current.leftStripped = current.value !== original;
2189
+ return current.leftStripped;
2190
+ }
2191
+ exports["default"] = WhitespaceControl;
2192
+ module.exports = exports["default"];
2193
+ }
2194
+ });
2195
+
2196
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js
2197
+ var require_helpers2 = __commonJS({
2198
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/helpers.js"(exports) {
2199
+ "use strict";
2200
+ init_cjs_shims();
2201
+ exports.__esModule = true;
2202
+ exports.SourceLocation = SourceLocation;
2203
+ exports.id = id;
2204
+ exports.stripFlags = stripFlags;
2205
+ exports.stripComment = stripComment;
2206
+ exports.preparePath = preparePath;
2207
+ exports.prepareMustache = prepareMustache;
2208
+ exports.prepareRawBlock = prepareRawBlock;
2209
+ exports.prepareBlock = prepareBlock;
2210
+ exports.prepareProgram = prepareProgram;
2211
+ exports.preparePartialBlock = preparePartialBlock;
2212
+ function _interopRequireDefault(obj) {
2213
+ return obj && obj.__esModule ? obj : { "default": obj };
2214
+ }
2215
+ var _exception = require_exception();
2216
+ var _exception2 = _interopRequireDefault(_exception);
2217
+ function validateClose(open, close) {
2218
+ close = close.path ? close.path.original : close;
2219
+ if (open.path.original !== close) {
2220
+ var errorNode = { loc: open.path.loc };
2221
+ throw new _exception2["default"](open.path.original + " doesn't match " + close, errorNode);
2222
+ }
2223
+ }
2224
+ function SourceLocation(source, locInfo) {
2225
+ this.source = source;
2226
+ this.start = {
2227
+ line: locInfo.first_line,
2228
+ column: locInfo.first_column
2229
+ };
2230
+ this.end = {
2231
+ line: locInfo.last_line,
2232
+ column: locInfo.last_column
2233
+ };
2234
+ }
2235
+ function id(token) {
2236
+ if (/^\[.*\]$/.test(token)) {
2237
+ return token.substring(1, token.length - 1);
2238
+ } else {
2239
+ return token;
2240
+ }
2241
+ }
2242
+ function stripFlags(open, close) {
2243
+ return {
2244
+ open: open.charAt(2) === "~",
2245
+ close: close.charAt(close.length - 3) === "~"
2246
+ };
2247
+ }
2248
+ function stripComment(comment) {
2249
+ return comment.replace(/^\{\{~?!-?-?/, "").replace(/-?-?~?\}\}$/, "");
2250
+ }
2251
+ function preparePath(data, parts, loc) {
2252
+ loc = this.locInfo(loc);
2253
+ var original = data ? "@" : "", dig = [], depth = 0;
2254
+ for (var i = 0, l = parts.length; i < l; i++) {
2255
+ var part = parts[i].part, isLiteral = parts[i].original !== part;
2256
+ original += (parts[i].separator || "") + part;
2257
+ if (!isLiteral && (part === ".." || part === "." || part === "this")) {
2258
+ if (dig.length > 0) {
2259
+ throw new _exception2["default"]("Invalid path: " + original, { loc });
2260
+ } else if (part === "..") {
2261
+ depth++;
2262
+ }
2263
+ } else {
2264
+ dig.push(part);
2265
+ }
2266
+ }
2267
+ return {
2268
+ type: "PathExpression",
2269
+ data,
2270
+ depth,
2271
+ parts: dig,
2272
+ original,
2273
+ loc
2274
+ };
2275
+ }
2276
+ function prepareMustache(path2, params, hash, open, strip, locInfo) {
2277
+ var escapeFlag = open.charAt(3) || open.charAt(2), escaped = escapeFlag !== "{" && escapeFlag !== "&";
2278
+ var decorator = /\*/.test(open);
2279
+ return {
2280
+ type: decorator ? "Decorator" : "MustacheStatement",
2281
+ path: path2,
2282
+ params,
2283
+ hash,
2284
+ escaped,
2285
+ strip,
2286
+ loc: this.locInfo(locInfo)
2287
+ };
2288
+ }
2289
+ function prepareRawBlock(openRawBlock, contents, close, locInfo) {
2290
+ validateClose(openRawBlock, close);
2291
+ locInfo = this.locInfo(locInfo);
2292
+ var program = {
2293
+ type: "Program",
2294
+ body: contents,
2295
+ strip: {},
2296
+ loc: locInfo
2297
+ };
2298
+ return {
2299
+ type: "BlockStatement",
2300
+ path: openRawBlock.path,
2301
+ params: openRawBlock.params,
2302
+ hash: openRawBlock.hash,
2303
+ program,
2304
+ openStrip: {},
2305
+ inverseStrip: {},
2306
+ closeStrip: {},
2307
+ loc: locInfo
2308
+ };
2309
+ }
2310
+ function prepareBlock(openBlock, program, inverseAndProgram, close, inverted, locInfo) {
2311
+ if (close && close.path) {
2312
+ validateClose(openBlock, close);
2313
+ }
2314
+ var decorator = /\*/.test(openBlock.open);
2315
+ program.blockParams = openBlock.blockParams;
2316
+ var inverse = void 0, inverseStrip = void 0;
2317
+ if (inverseAndProgram) {
2318
+ if (decorator) {
2319
+ throw new _exception2["default"]("Unexpected inverse block on decorator", inverseAndProgram);
2320
+ }
2321
+ if (inverseAndProgram.chain) {
2322
+ inverseAndProgram.program.body[0].closeStrip = close.strip;
2323
+ }
2324
+ inverseStrip = inverseAndProgram.strip;
2325
+ inverse = inverseAndProgram.program;
2326
+ }
2327
+ if (inverted) {
2328
+ inverted = inverse;
2329
+ inverse = program;
2330
+ program = inverted;
2331
+ }
2332
+ return {
2333
+ type: decorator ? "DecoratorBlock" : "BlockStatement",
2334
+ path: openBlock.path,
2335
+ params: openBlock.params,
2336
+ hash: openBlock.hash,
2337
+ program,
2338
+ inverse,
2339
+ openStrip: openBlock.strip,
2340
+ inverseStrip,
2341
+ closeStrip: close && close.strip,
2342
+ loc: this.locInfo(locInfo)
2343
+ };
2344
+ }
2345
+ function prepareProgram(statements, loc) {
2346
+ if (!loc && statements.length) {
2347
+ var firstLoc = statements[0].loc, lastLoc = statements[statements.length - 1].loc;
2348
+ if (firstLoc && lastLoc) {
2349
+ loc = {
2350
+ source: firstLoc.source,
2351
+ start: {
2352
+ line: firstLoc.start.line,
2353
+ column: firstLoc.start.column
2354
+ },
2355
+ end: {
2356
+ line: lastLoc.end.line,
2357
+ column: lastLoc.end.column
2358
+ }
2359
+ };
2360
+ }
2361
+ }
2362
+ return {
2363
+ type: "Program",
2364
+ body: statements,
2365
+ strip: {},
2366
+ loc
2367
+ };
2368
+ }
2369
+ function preparePartialBlock(open, program, close, locInfo) {
2370
+ validateClose(open, close);
2371
+ return {
2372
+ type: "PartialBlockStatement",
2373
+ name: open.path,
2374
+ params: open.params,
2375
+ hash: open.hash,
2376
+ program,
2377
+ openStrip: open.strip,
2378
+ closeStrip: close && close.strip,
2379
+ loc: this.locInfo(locInfo)
2380
+ };
2381
+ }
2382
+ }
2383
+ });
2384
+
2385
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js
2386
+ var require_base2 = __commonJS({
2387
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/base.js"(exports) {
2388
+ "use strict";
2389
+ init_cjs_shims();
2390
+ exports.__esModule = true;
2391
+ exports.parseWithoutProcessing = parseWithoutProcessing;
2392
+ exports.parse = parse;
2393
+ function _interopRequireWildcard(obj) {
2394
+ if (obj && obj.__esModule) {
2395
+ return obj;
2396
+ } else {
2397
+ var newObj = {};
2398
+ if (obj != null) {
2399
+ for (var key in obj) {
2400
+ if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key];
2401
+ }
2402
+ }
2403
+ newObj["default"] = obj;
2404
+ return newObj;
2405
+ }
2406
+ }
2407
+ function _interopRequireDefault(obj) {
2408
+ return obj && obj.__esModule ? obj : { "default": obj };
2409
+ }
2410
+ var _parser = require_parser();
2411
+ var _parser2 = _interopRequireDefault(_parser);
2412
+ var _whitespaceControl = require_whitespace_control();
2413
+ var _whitespaceControl2 = _interopRequireDefault(_whitespaceControl);
2414
+ var _helpers = require_helpers2();
2415
+ var Helpers = _interopRequireWildcard(_helpers);
2416
+ var _utils = require_utils();
2417
+ exports.parser = _parser2["default"];
2418
+ var yy = {};
2419
+ _utils.extend(yy, Helpers);
2420
+ function parseWithoutProcessing(input, options) {
2421
+ if (input.type === "Program") {
2422
+ return input;
2423
+ }
2424
+ _parser2["default"].yy = yy;
2425
+ yy.locInfo = function(locInfo) {
2426
+ return new yy.SourceLocation(options && options.srcName, locInfo);
2427
+ };
2428
+ var ast = _parser2["default"].parse(input);
2429
+ return ast;
2430
+ }
2431
+ function parse(input, options) {
2432
+ var ast = parseWithoutProcessing(input, options);
2433
+ var strip = new _whitespaceControl2["default"](options);
2434
+ return strip.accept(ast);
2435
+ }
2436
+ }
2437
+ });
2438
+
2439
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js
2440
+ var require_compiler = __commonJS({
2441
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/compiler.js"(exports) {
2442
+ "use strict";
2443
+ init_cjs_shims();
2444
+ exports.__esModule = true;
2445
+ exports.Compiler = Compiler;
2446
+ exports.precompile = precompile;
2447
+ exports.compile = compile;
2448
+ function _interopRequireDefault(obj) {
2449
+ return obj && obj.__esModule ? obj : { "default": obj };
2450
+ }
2451
+ var _exception = require_exception();
2452
+ var _exception2 = _interopRequireDefault(_exception);
2453
+ var _utils = require_utils();
2454
+ var _ast = require_ast();
2455
+ var _ast2 = _interopRequireDefault(_ast);
2456
+ var slice = [].slice;
2457
+ function Compiler() {
2458
+ }
2459
+ Compiler.prototype = {
2460
+ compiler: Compiler,
2461
+ equals: function equals(other) {
2462
+ var len = this.opcodes.length;
2463
+ if (other.opcodes.length !== len) {
2464
+ return false;
2465
+ }
2466
+ for (var i = 0; i < len; i++) {
2467
+ var opcode = this.opcodes[i], otherOpcode = other.opcodes[i];
2468
+ if (opcode.opcode !== otherOpcode.opcode || !argEquals(opcode.args, otherOpcode.args)) {
2469
+ return false;
2470
+ }
2471
+ }
2472
+ len = this.children.length;
2473
+ for (var i = 0; i < len; i++) {
2474
+ if (!this.children[i].equals(other.children[i])) {
2475
+ return false;
2476
+ }
2477
+ }
2478
+ return true;
2479
+ },
2480
+ guid: 0,
2481
+ compile: function compile2(program, options) {
2482
+ this.sourceNode = [];
2483
+ this.opcodes = [];
2484
+ this.children = [];
2485
+ this.options = options;
2486
+ this.stringParams = options.stringParams;
2487
+ this.trackIds = options.trackIds;
2488
+ options.blockParams = options.blockParams || [];
2489
+ options.knownHelpers = _utils.extend(/* @__PURE__ */ Object.create(null), {
2490
+ helperMissing: true,
2491
+ blockHelperMissing: true,
2492
+ each: true,
2493
+ "if": true,
2494
+ unless: true,
2495
+ "with": true,
2496
+ log: true,
2497
+ lookup: true
2498
+ }, options.knownHelpers);
2499
+ return this.accept(program);
2500
+ },
2501
+ compileProgram: function compileProgram(program) {
2502
+ var childCompiler = new this.compiler(), result = childCompiler.compile(program, this.options), guid = this.guid++;
2503
+ this.usePartial = this.usePartial || result.usePartial;
2504
+ this.children[guid] = result;
2505
+ this.useDepths = this.useDepths || result.useDepths;
2506
+ return guid;
2507
+ },
2508
+ accept: function accept(node) {
2509
+ if (!this[node.type]) {
2510
+ throw new _exception2["default"]("Unknown type: " + node.type, node);
2511
+ }
2512
+ this.sourceNode.unshift(node);
2513
+ var ret = this[node.type](node);
2514
+ this.sourceNode.shift();
2515
+ return ret;
2516
+ },
2517
+ Program: function Program(program) {
2518
+ this.options.blockParams.unshift(program.blockParams);
2519
+ var body = program.body, bodyLength = body.length;
2520
+ for (var i = 0; i < bodyLength; i++) {
2521
+ this.accept(body[i]);
2522
+ }
2523
+ this.options.blockParams.shift();
2524
+ this.isSimple = bodyLength === 1;
2525
+ this.blockParams = program.blockParams ? program.blockParams.length : 0;
2526
+ return this;
2527
+ },
2528
+ BlockStatement: function BlockStatement(block) {
2529
+ transformLiteralToPath(block);
2530
+ var program = block.program, inverse = block.inverse;
2531
+ program = program && this.compileProgram(program);
2532
+ inverse = inverse && this.compileProgram(inverse);
2533
+ var type = this.classifySexpr(block);
2534
+ if (type === "helper") {
2535
+ this.helperSexpr(block, program, inverse);
2536
+ } else if (type === "simple") {
2537
+ this.simpleSexpr(block);
2538
+ this.opcode("pushProgram", program);
2539
+ this.opcode("pushProgram", inverse);
2540
+ this.opcode("emptyHash");
2541
+ this.opcode("blockValue", block.path.original);
2542
+ } else {
2543
+ this.ambiguousSexpr(block, program, inverse);
2544
+ this.opcode("pushProgram", program);
2545
+ this.opcode("pushProgram", inverse);
2546
+ this.opcode("emptyHash");
2547
+ this.opcode("ambiguousBlockValue");
2548
+ }
2549
+ this.opcode("append");
2550
+ },
2551
+ DecoratorBlock: function DecoratorBlock(decorator) {
2552
+ var program = decorator.program && this.compileProgram(decorator.program);
2553
+ var params = this.setupFullMustacheParams(decorator, program, void 0), path2 = decorator.path;
2554
+ this.useDecorators = true;
2555
+ this.opcode("registerDecorator", params.length, path2.original);
2556
+ },
2557
+ PartialStatement: function PartialStatement(partial) {
2558
+ this.usePartial = true;
2559
+ var program = partial.program;
2560
+ if (program) {
2561
+ program = this.compileProgram(partial.program);
2562
+ }
2563
+ var params = partial.params;
2564
+ if (params.length > 1) {
2565
+ throw new _exception2["default"]("Unsupported number of partial arguments: " + params.length, partial);
2566
+ } else if (!params.length) {
2567
+ if (this.options.explicitPartialContext) {
2568
+ this.opcode("pushLiteral", "undefined");
2569
+ } else {
2570
+ params.push({ type: "PathExpression", parts: [], depth: 0 });
2571
+ }
2572
+ }
2573
+ var partialName = partial.name.original, isDynamic = partial.name.type === "SubExpression";
2574
+ if (isDynamic) {
2575
+ this.accept(partial.name);
2576
+ }
2577
+ this.setupFullMustacheParams(partial, program, void 0, true);
2578
+ var indent = partial.indent || "";
2579
+ if (this.options.preventIndent && indent) {
2580
+ this.opcode("appendContent", indent);
2581
+ indent = "";
2582
+ }
2583
+ this.opcode("invokePartial", isDynamic, partialName, indent);
2584
+ this.opcode("append");
2585
+ },
2586
+ PartialBlockStatement: function PartialBlockStatement(partialBlock) {
2587
+ this.PartialStatement(partialBlock);
2588
+ },
2589
+ MustacheStatement: function MustacheStatement(mustache) {
2590
+ this.SubExpression(mustache);
2591
+ if (mustache.escaped && !this.options.noEscape) {
2592
+ this.opcode("appendEscaped");
2593
+ } else {
2594
+ this.opcode("append");
2595
+ }
2596
+ },
2597
+ Decorator: function Decorator(decorator) {
2598
+ this.DecoratorBlock(decorator);
2599
+ },
2600
+ ContentStatement: function ContentStatement(content) {
2601
+ if (content.value) {
2602
+ this.opcode("appendContent", content.value);
2603
+ }
2604
+ },
2605
+ CommentStatement: function CommentStatement() {
2606
+ },
2607
+ SubExpression: function SubExpression(sexpr) {
2608
+ transformLiteralToPath(sexpr);
2609
+ var type = this.classifySexpr(sexpr);
2610
+ if (type === "simple") {
2611
+ this.simpleSexpr(sexpr);
2612
+ } else if (type === "helper") {
2613
+ this.helperSexpr(sexpr);
2614
+ } else {
2615
+ this.ambiguousSexpr(sexpr);
2616
+ }
2617
+ },
2618
+ ambiguousSexpr: function ambiguousSexpr(sexpr, program, inverse) {
2619
+ var path2 = sexpr.path, name = path2.parts[0], isBlock = program != null || inverse != null;
2620
+ this.opcode("getContext", path2.depth);
2621
+ this.opcode("pushProgram", program);
2622
+ this.opcode("pushProgram", inverse);
2623
+ path2.strict = true;
2624
+ this.accept(path2);
2625
+ this.opcode("invokeAmbiguous", name, isBlock);
2626
+ },
2627
+ simpleSexpr: function simpleSexpr(sexpr) {
2628
+ var path2 = sexpr.path;
2629
+ path2.strict = true;
2630
+ this.accept(path2);
2631
+ this.opcode("resolvePossibleLambda");
2632
+ },
2633
+ helperSexpr: function helperSexpr(sexpr, program, inverse) {
2634
+ var params = this.setupFullMustacheParams(sexpr, program, inverse), path2 = sexpr.path, name = path2.parts[0];
2635
+ if (this.options.knownHelpers[name]) {
2636
+ this.opcode("invokeKnownHelper", params.length, name);
2637
+ } else if (this.options.knownHelpersOnly) {
2638
+ throw new _exception2["default"]("You specified knownHelpersOnly, but used the unknown helper " + name, sexpr);
2639
+ } else {
2640
+ path2.strict = true;
2641
+ path2.falsy = true;
2642
+ this.accept(path2);
2643
+ this.opcode("invokeHelper", params.length, path2.original, _ast2["default"].helpers.simpleId(path2));
2644
+ }
2645
+ },
2646
+ PathExpression: function PathExpression(path2) {
2647
+ this.addDepth(path2.depth);
2648
+ this.opcode("getContext", path2.depth);
2649
+ var name = path2.parts[0], scoped = _ast2["default"].helpers.scopedId(path2), blockParamId = !path2.depth && !scoped && this.blockParamIndex(name);
2650
+ if (blockParamId) {
2651
+ this.opcode("lookupBlockParam", blockParamId, path2.parts);
2652
+ } else if (!name) {
2653
+ this.opcode("pushContext");
2654
+ } else if (path2.data) {
2655
+ this.options.data = true;
2656
+ this.opcode("lookupData", path2.depth, path2.parts, path2.strict);
2657
+ } else {
2658
+ this.opcode("lookupOnContext", path2.parts, path2.falsy, path2.strict, scoped);
2659
+ }
2660
+ },
2661
+ StringLiteral: function StringLiteral(string) {
2662
+ this.opcode("pushString", string.value);
2663
+ },
2664
+ NumberLiteral: function NumberLiteral(number) {
2665
+ this.opcode("pushLiteral", number.value);
2666
+ },
2667
+ BooleanLiteral: function BooleanLiteral(bool) {
2668
+ this.opcode("pushLiteral", bool.value);
2669
+ },
2670
+ UndefinedLiteral: function UndefinedLiteral() {
2671
+ this.opcode("pushLiteral", "undefined");
2672
+ },
2673
+ NullLiteral: function NullLiteral() {
2674
+ this.opcode("pushLiteral", "null");
2675
+ },
2676
+ Hash: function Hash(hash) {
2677
+ var pairs = hash.pairs, i = 0, l = pairs.length;
2678
+ this.opcode("pushHash");
2679
+ for (; i < l; i++) {
2680
+ this.pushParam(pairs[i].value);
2681
+ }
2682
+ while (i--) {
2683
+ this.opcode("assignToHash", pairs[i].key);
2684
+ }
2685
+ this.opcode("popHash");
2686
+ },
2687
+ // HELPERS
2688
+ opcode: function opcode(name) {
2689
+ this.opcodes.push({
2690
+ opcode: name,
2691
+ args: slice.call(arguments, 1),
2692
+ loc: this.sourceNode[0].loc
2693
+ });
2694
+ },
2695
+ addDepth: function addDepth(depth) {
2696
+ if (!depth) {
2697
+ return;
2698
+ }
2699
+ this.useDepths = true;
2700
+ },
2701
+ classifySexpr: function classifySexpr(sexpr) {
2702
+ var isSimple = _ast2["default"].helpers.simpleId(sexpr.path);
2703
+ var isBlockParam = isSimple && !!this.blockParamIndex(sexpr.path.parts[0]);
2704
+ var isHelper = !isBlockParam && _ast2["default"].helpers.helperExpression(sexpr);
2705
+ var isEligible = !isBlockParam && (isHelper || isSimple);
2706
+ if (isEligible && !isHelper) {
2707
+ var _name = sexpr.path.parts[0], options = this.options;
2708
+ if (options.knownHelpers[_name]) {
2709
+ isHelper = true;
2710
+ } else if (options.knownHelpersOnly) {
2711
+ isEligible = false;
2712
+ }
2713
+ }
2714
+ if (isHelper) {
2715
+ return "helper";
2716
+ } else if (isEligible) {
2717
+ return "ambiguous";
2718
+ } else {
2719
+ return "simple";
2720
+ }
2721
+ },
2722
+ pushParams: function pushParams(params) {
2723
+ for (var i = 0, l = params.length; i < l; i++) {
2724
+ this.pushParam(params[i]);
2725
+ }
2726
+ },
2727
+ pushParam: function pushParam(val) {
2728
+ var value = val.value != null ? val.value : val.original || "";
2729
+ if (this.stringParams) {
2730
+ if (value.replace) {
2731
+ value = value.replace(/^(\.?\.\/)*/g, "").replace(/\//g, ".");
2732
+ }
2733
+ if (val.depth) {
2734
+ this.addDepth(val.depth);
2735
+ }
2736
+ this.opcode("getContext", val.depth || 0);
2737
+ this.opcode("pushStringParam", value, val.type);
2738
+ if (val.type === "SubExpression") {
2739
+ this.accept(val);
2740
+ }
2741
+ } else {
2742
+ if (this.trackIds) {
2743
+ var blockParamIndex = void 0;
2744
+ if (val.parts && !_ast2["default"].helpers.scopedId(val) && !val.depth) {
2745
+ blockParamIndex = this.blockParamIndex(val.parts[0]);
2746
+ }
2747
+ if (blockParamIndex) {
2748
+ var blockParamChild = val.parts.slice(1).join(".");
2749
+ this.opcode("pushId", "BlockParam", blockParamIndex, blockParamChild);
2750
+ } else {
2751
+ value = val.original || value;
2752
+ if (value.replace) {
2753
+ value = value.replace(/^this(?:\.|$)/, "").replace(/^\.\//, "").replace(/^\.$/, "");
2754
+ }
2755
+ this.opcode("pushId", val.type, value);
2756
+ }
2757
+ }
2758
+ this.accept(val);
2759
+ }
2760
+ },
2761
+ setupFullMustacheParams: function setupFullMustacheParams(sexpr, program, inverse, omitEmpty) {
2762
+ var params = sexpr.params;
2763
+ this.pushParams(params);
2764
+ this.opcode("pushProgram", program);
2765
+ this.opcode("pushProgram", inverse);
2766
+ if (sexpr.hash) {
2767
+ this.accept(sexpr.hash);
2768
+ } else {
2769
+ this.opcode("emptyHash", omitEmpty);
2770
+ }
2771
+ return params;
2772
+ },
2773
+ blockParamIndex: function blockParamIndex(name) {
2774
+ for (var depth = 0, len = this.options.blockParams.length; depth < len; depth++) {
2775
+ var blockParams = this.options.blockParams[depth], param = blockParams && _utils.indexOf(blockParams, name);
2776
+ if (blockParams && param >= 0) {
2777
+ return [depth, param];
2778
+ }
2779
+ }
2780
+ }
2781
+ };
2782
+ function precompile(input, options, env) {
2783
+ if (input == null || typeof input !== "string" && input.type !== "Program") {
2784
+ throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.precompile. You passed " + input);
2785
+ }
2786
+ options = options || {};
2787
+ if (!("data" in options)) {
2788
+ options.data = true;
2789
+ }
2790
+ if (options.compat) {
2791
+ options.useDepths = true;
2792
+ }
2793
+ var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options);
2794
+ return new env.JavaScriptCompiler().compile(environment, options);
2795
+ }
2796
+ function compile(input, options, env) {
2797
+ if (options === void 0) options = {};
2798
+ if (input == null || typeof input !== "string" && input.type !== "Program") {
2799
+ throw new _exception2["default"]("You must pass a string or Handlebars AST to Handlebars.compile. You passed " + input);
2800
+ }
2801
+ options = _utils.extend({}, options);
2802
+ if (!("data" in options)) {
2803
+ options.data = true;
2804
+ }
2805
+ if (options.compat) {
2806
+ options.useDepths = true;
2807
+ }
2808
+ var compiled = void 0;
2809
+ function compileInput() {
2810
+ var ast = env.parse(input, options), environment = new env.Compiler().compile(ast, options), templateSpec = new env.JavaScriptCompiler().compile(environment, options, void 0, true);
2811
+ return env.template(templateSpec);
2812
+ }
2813
+ function ret(context, execOptions) {
2814
+ if (!compiled) {
2815
+ compiled = compileInput();
2816
+ }
2817
+ return compiled.call(this, context, execOptions);
2818
+ }
2819
+ ret._setup = function(setupOptions) {
2820
+ if (!compiled) {
2821
+ compiled = compileInput();
2822
+ }
2823
+ return compiled._setup(setupOptions);
2824
+ };
2825
+ ret._child = function(i, data, blockParams, depths) {
2826
+ if (!compiled) {
2827
+ compiled = compileInput();
2828
+ }
2829
+ return compiled._child(i, data, blockParams, depths);
2830
+ };
2831
+ return ret;
2832
+ }
2833
+ function argEquals(a, b) {
2834
+ if (a === b) {
2835
+ return true;
2836
+ }
2837
+ if (_utils.isArray(a) && _utils.isArray(b) && a.length === b.length) {
2838
+ for (var i = 0; i < a.length; i++) {
2839
+ if (!argEquals(a[i], b[i])) {
2840
+ return false;
2841
+ }
2842
+ }
2843
+ return true;
2844
+ }
2845
+ }
2846
+ function transformLiteralToPath(sexpr) {
2847
+ if (!sexpr.path.parts) {
2848
+ var literal = sexpr.path;
2849
+ sexpr.path = {
2850
+ type: "PathExpression",
2851
+ data: false,
2852
+ depth: 0,
2853
+ parts: [literal.original + ""],
2854
+ original: literal.original + "",
2855
+ loc: literal.loc
2856
+ };
2857
+ }
2858
+ }
2859
+ }
2860
+ });
2861
+
2862
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js
2863
+ var require_code_gen = __commonJS({
2864
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/code-gen.js"(exports, module) {
2865
+ "use strict";
2866
+ init_cjs_shims();
2867
+ exports.__esModule = true;
2868
+ var _utils = require_utils();
2869
+ var SourceNode = void 0;
2870
+ try {
2871
+ if (typeof define !== "function" || !define.amd) {
2872
+ SourceMap = require_source_map();
2873
+ SourceNode = SourceMap.SourceNode;
2874
+ }
2875
+ } catch (err) {
2876
+ }
2877
+ var SourceMap;
2878
+ if (!SourceNode) {
2879
+ SourceNode = function(line, column, srcFile, chunks) {
2880
+ this.src = "";
2881
+ if (chunks) {
2882
+ this.add(chunks);
2883
+ }
2884
+ };
2885
+ SourceNode.prototype = {
2886
+ add: function add(chunks) {
2887
+ if (_utils.isArray(chunks)) {
2888
+ chunks = chunks.join("");
2889
+ }
2890
+ this.src += chunks;
2891
+ },
2892
+ prepend: function prepend(chunks) {
2893
+ if (_utils.isArray(chunks)) {
2894
+ chunks = chunks.join("");
2895
+ }
2896
+ this.src = chunks + this.src;
2897
+ },
2898
+ toStringWithSourceMap: function toStringWithSourceMap() {
2899
+ return { code: this.toString() };
2900
+ },
2901
+ toString: function toString() {
2902
+ return this.src;
2903
+ }
2904
+ };
2905
+ }
2906
+ function castChunk(chunk, codeGen, loc) {
2907
+ if (_utils.isArray(chunk)) {
2908
+ var ret = [];
2909
+ for (var i = 0, len = chunk.length; i < len; i++) {
2910
+ ret.push(codeGen.wrap(chunk[i], loc));
2911
+ }
2912
+ return ret;
2913
+ } else if (typeof chunk === "boolean" || typeof chunk === "number") {
2914
+ return chunk + "";
2915
+ }
2916
+ return chunk;
2917
+ }
2918
+ function CodeGen(srcFile) {
2919
+ this.srcFile = srcFile;
2920
+ this.source = [];
2921
+ }
2922
+ CodeGen.prototype = {
2923
+ isEmpty: function isEmpty() {
2924
+ return !this.source.length;
2925
+ },
2926
+ prepend: function prepend(source, loc) {
2927
+ this.source.unshift(this.wrap(source, loc));
2928
+ },
2929
+ push: function push(source, loc) {
2930
+ this.source.push(this.wrap(source, loc));
2931
+ },
2932
+ merge: function merge() {
2933
+ var source = this.empty();
2934
+ this.each(function(line) {
2935
+ source.add([" ", line, "\n"]);
2936
+ });
2937
+ return source;
2938
+ },
2939
+ each: function each(iter) {
2940
+ for (var i = 0, len = this.source.length; i < len; i++) {
2941
+ iter(this.source[i]);
2942
+ }
2943
+ },
2944
+ empty: function empty() {
2945
+ var loc = this.currentLocation || { start: {} };
2946
+ return new SourceNode(loc.start.line, loc.start.column, this.srcFile);
2947
+ },
2948
+ wrap: function wrap(chunk) {
2949
+ var loc = arguments.length <= 1 || arguments[1] === void 0 ? this.currentLocation || { start: {} } : arguments[1];
2950
+ if (chunk instanceof SourceNode) {
2951
+ return chunk;
2952
+ }
2953
+ chunk = castChunk(chunk, this, loc);
2954
+ return new SourceNode(loc.start.line, loc.start.column, this.srcFile, chunk);
2955
+ },
2956
+ functionCall: function functionCall(fn, type, params) {
2957
+ params = this.generateList(params);
2958
+ return this.wrap([fn, type ? "." + type + "(" : "(", params, ")"]);
2959
+ },
2960
+ quotedString: function quotedString(str) {
2961
+ return '"' + (str + "").replace(/\\/g, "\\\\").replace(/"/g, '\\"').replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\u2028/g, "\\u2028").replace(/\u2029/g, "\\u2029") + '"';
2962
+ },
2963
+ objectLiteral: function objectLiteral(obj) {
2964
+ var _this = this;
2965
+ var pairs = [];
2966
+ Object.keys(obj).forEach(function(key) {
2967
+ var value = castChunk(obj[key], _this);
2968
+ if (value !== "undefined") {
2969
+ pairs.push([_this.quotedString(key), ":", value]);
2970
+ }
2971
+ });
2972
+ var ret = this.generateList(pairs);
2973
+ ret.prepend("{");
2974
+ ret.add("}");
2975
+ return ret;
2976
+ },
2977
+ generateList: function generateList(entries) {
2978
+ var ret = this.empty();
2979
+ for (var i = 0, len = entries.length; i < len; i++) {
2980
+ if (i) {
2981
+ ret.add(",");
2982
+ }
2983
+ ret.add(castChunk(entries[i], this));
2984
+ }
2985
+ return ret;
2986
+ },
2987
+ generateArray: function generateArray(entries) {
2988
+ var ret = this.generateList(entries);
2989
+ ret.prepend("[");
2990
+ ret.add("]");
2991
+ return ret;
2992
+ }
2993
+ };
2994
+ exports["default"] = CodeGen;
2995
+ module.exports = exports["default"];
2996
+ }
2997
+ });
2998
+
2999
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js
3000
+ var require_javascript_compiler = __commonJS({
3001
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/javascript-compiler.js"(exports, module) {
3002
+ "use strict";
3003
+ init_cjs_shims();
3004
+ exports.__esModule = true;
3005
+ function _interopRequireDefault(obj) {
3006
+ return obj && obj.__esModule ? obj : { "default": obj };
3007
+ }
3008
+ var _base = require_base();
3009
+ var _exception = require_exception();
3010
+ var _exception2 = _interopRequireDefault(_exception);
3011
+ var _utils = require_utils();
3012
+ var _codeGen = require_code_gen();
3013
+ var _codeGen2 = _interopRequireDefault(_codeGen);
3014
+ function Literal(value) {
3015
+ this.value = value;
3016
+ }
3017
+ function JavaScriptCompiler() {
3018
+ }
3019
+ JavaScriptCompiler.prototype = {
3020
+ // PUBLIC API: You can override these methods in a subclass to provide
3021
+ // alternative compiled forms for name lookup and buffering semantics
3022
+ nameLookup: function nameLookup(parent, name) {
3023
+ return this.internalNameLookup(parent, name);
3024
+ },
3025
+ depthedLookup: function depthedLookup(name) {
3026
+ return [this.aliasable("container.lookup"), "(depths, ", JSON.stringify(name), ")"];
3027
+ },
3028
+ compilerInfo: function compilerInfo() {
3029
+ var revision = _base.COMPILER_REVISION, versions = _base.REVISION_CHANGES[revision];
3030
+ return [revision, versions];
3031
+ },
3032
+ appendToBuffer: function appendToBuffer(source, location, explicit) {
3033
+ if (!_utils.isArray(source)) {
3034
+ source = [source];
3035
+ }
3036
+ source = this.source.wrap(source, location);
3037
+ if (this.environment.isSimple) {
3038
+ return ["return ", source, ";"];
3039
+ } else if (explicit) {
3040
+ return ["buffer += ", source, ";"];
3041
+ } else {
3042
+ source.appendToBuffer = true;
3043
+ return source;
3044
+ }
3045
+ },
3046
+ initializeBuffer: function initializeBuffer() {
3047
+ return this.quotedString("");
3048
+ },
3049
+ // END PUBLIC API
3050
+ internalNameLookup: function internalNameLookup(parent, name) {
3051
+ this.lookupPropertyFunctionIsUsed = true;
3052
+ return ["lookupProperty(", parent, ",", JSON.stringify(name), ")"];
3053
+ },
3054
+ lookupPropertyFunctionIsUsed: false,
3055
+ compile: function compile(environment, options, context, asObject) {
3056
+ this.environment = environment;
3057
+ this.options = options;
3058
+ this.stringParams = this.options.stringParams;
3059
+ this.trackIds = this.options.trackIds;
3060
+ this.precompile = !asObject;
3061
+ this.name = this.environment.name;
3062
+ this.isChild = !!context;
3063
+ this.context = context || {
3064
+ decorators: [],
3065
+ programs: [],
3066
+ environments: []
3067
+ };
3068
+ this.preamble();
3069
+ this.stackSlot = 0;
3070
+ this.stackVars = [];
3071
+ this.aliases = {};
3072
+ this.registers = { list: [] };
3073
+ this.hashes = [];
3074
+ this.compileStack = [];
3075
+ this.inlineStack = [];
3076
+ this.blockParams = [];
3077
+ this.compileChildren(environment, options);
3078
+ this.useDepths = this.useDepths || environment.useDepths || environment.useDecorators || this.options.compat;
3079
+ this.useBlockParams = this.useBlockParams || environment.useBlockParams;
3080
+ var opcodes = environment.opcodes, opcode = void 0, firstLoc = void 0, i = void 0, l = void 0;
3081
+ for (i = 0, l = opcodes.length; i < l; i++) {
3082
+ opcode = opcodes[i];
3083
+ this.source.currentLocation = opcode.loc;
3084
+ firstLoc = firstLoc || opcode.loc;
3085
+ this[opcode.opcode].apply(this, opcode.args);
3086
+ }
3087
+ this.source.currentLocation = firstLoc;
3088
+ this.pushSource("");
3089
+ if (this.stackSlot || this.inlineStack.length || this.compileStack.length) {
3090
+ throw new _exception2["default"]("Compile completed with content left on stack");
3091
+ }
3092
+ if (!this.decorators.isEmpty()) {
3093
+ this.useDecorators = true;
3094
+ this.decorators.prepend(["var decorators = container.decorators, ", this.lookupPropertyFunctionVarDeclaration(), ";\n"]);
3095
+ this.decorators.push("return fn;");
3096
+ if (asObject) {
3097
+ this.decorators = Function.apply(this, ["fn", "props", "container", "depth0", "data", "blockParams", "depths", this.decorators.merge()]);
3098
+ } else {
3099
+ this.decorators.prepend("function(fn, props, container, depth0, data, blockParams, depths) {\n");
3100
+ this.decorators.push("}\n");
3101
+ this.decorators = this.decorators.merge();
3102
+ }
3103
+ } else {
3104
+ this.decorators = void 0;
3105
+ }
3106
+ var fn = this.createFunctionContext(asObject);
3107
+ if (!this.isChild) {
3108
+ var ret = {
3109
+ compiler: this.compilerInfo(),
3110
+ main: fn
3111
+ };
3112
+ if (this.decorators) {
3113
+ ret.main_d = this.decorators;
3114
+ ret.useDecorators = true;
3115
+ }
3116
+ var _context = this.context;
3117
+ var programs = _context.programs;
3118
+ var decorators = _context.decorators;
3119
+ for (i = 0, l = programs.length; i < l; i++) {
3120
+ if (programs[i]) {
3121
+ ret[i] = programs[i];
3122
+ if (decorators[i]) {
3123
+ ret[i + "_d"] = decorators[i];
3124
+ ret.useDecorators = true;
3125
+ }
3126
+ }
3127
+ }
3128
+ if (this.environment.usePartial) {
3129
+ ret.usePartial = true;
3130
+ }
3131
+ if (this.options.data) {
3132
+ ret.useData = true;
3133
+ }
3134
+ if (this.useDepths) {
3135
+ ret.useDepths = true;
3136
+ }
3137
+ if (this.useBlockParams) {
3138
+ ret.useBlockParams = true;
3139
+ }
3140
+ if (this.options.compat) {
3141
+ ret.compat = true;
3142
+ }
3143
+ if (!asObject) {
3144
+ ret.compiler = JSON.stringify(ret.compiler);
3145
+ this.source.currentLocation = { start: { line: 1, column: 0 } };
3146
+ ret = this.objectLiteral(ret);
3147
+ if (options.srcName) {
3148
+ ret = ret.toStringWithSourceMap({ file: options.destName });
3149
+ ret.map = ret.map && ret.map.toString();
3150
+ } else {
3151
+ ret = ret.toString();
3152
+ }
3153
+ } else {
3154
+ ret.compilerOptions = this.options;
3155
+ }
3156
+ return ret;
3157
+ } else {
3158
+ return fn;
3159
+ }
3160
+ },
3161
+ preamble: function preamble() {
3162
+ this.lastContext = 0;
3163
+ this.source = new _codeGen2["default"](this.options.srcName);
3164
+ this.decorators = new _codeGen2["default"](this.options.srcName);
3165
+ },
3166
+ createFunctionContext: function createFunctionContext(asObject) {
3167
+ var _this = this;
3168
+ var varDeclarations = "";
3169
+ var locals = this.stackVars.concat(this.registers.list);
3170
+ if (locals.length > 0) {
3171
+ varDeclarations += ", " + locals.join(", ");
3172
+ }
3173
+ var aliasCount = 0;
3174
+ Object.keys(this.aliases).forEach(function(alias) {
3175
+ var node = _this.aliases[alias];
3176
+ if (node.children && node.referenceCount > 1) {
3177
+ varDeclarations += ", alias" + ++aliasCount + "=" + alias;
3178
+ node.children[0] = "alias" + aliasCount;
3179
+ }
3180
+ });
3181
+ if (this.lookupPropertyFunctionIsUsed) {
3182
+ varDeclarations += ", " + this.lookupPropertyFunctionVarDeclaration();
3183
+ }
3184
+ var params = ["container", "depth0", "helpers", "partials", "data"];
3185
+ if (this.useBlockParams || this.useDepths) {
3186
+ params.push("blockParams");
3187
+ }
3188
+ if (this.useDepths) {
3189
+ params.push("depths");
3190
+ }
3191
+ var source = this.mergeSource(varDeclarations);
3192
+ if (asObject) {
3193
+ params.push(source);
3194
+ return Function.apply(this, params);
3195
+ } else {
3196
+ return this.source.wrap(["function(", params.join(","), ") {\n ", source, "}"]);
3197
+ }
3198
+ },
3199
+ mergeSource: function mergeSource(varDeclarations) {
3200
+ var isSimple = this.environment.isSimple, appendOnly = !this.forceBuffer, appendFirst = void 0, sourceSeen = void 0, bufferStart = void 0, bufferEnd = void 0;
3201
+ this.source.each(function(line) {
3202
+ if (line.appendToBuffer) {
3203
+ if (bufferStart) {
3204
+ line.prepend(" + ");
3205
+ } else {
3206
+ bufferStart = line;
3207
+ }
3208
+ bufferEnd = line;
3209
+ } else {
3210
+ if (bufferStart) {
3211
+ if (!sourceSeen) {
3212
+ appendFirst = true;
3213
+ } else {
3214
+ bufferStart.prepend("buffer += ");
3215
+ }
3216
+ bufferEnd.add(";");
3217
+ bufferStart = bufferEnd = void 0;
3218
+ }
3219
+ sourceSeen = true;
3220
+ if (!isSimple) {
3221
+ appendOnly = false;
3222
+ }
3223
+ }
3224
+ });
3225
+ if (appendOnly) {
3226
+ if (bufferStart) {
3227
+ bufferStart.prepend("return ");
3228
+ bufferEnd.add(";");
3229
+ } else if (!sourceSeen) {
3230
+ this.source.push('return "";');
3231
+ }
3232
+ } else {
3233
+ varDeclarations += ", buffer = " + (appendFirst ? "" : this.initializeBuffer());
3234
+ if (bufferStart) {
3235
+ bufferStart.prepend("return buffer + ");
3236
+ bufferEnd.add(";");
3237
+ } else {
3238
+ this.source.push("return buffer;");
3239
+ }
3240
+ }
3241
+ if (varDeclarations) {
3242
+ this.source.prepend("var " + varDeclarations.substring(2) + (appendFirst ? "" : ";\n"));
3243
+ }
3244
+ return this.source.merge();
3245
+ },
3246
+ lookupPropertyFunctionVarDeclaration: function lookupPropertyFunctionVarDeclaration() {
3247
+ return "\n lookupProperty = container.lookupProperty || function(parent, propertyName) {\n if (Object.prototype.hasOwnProperty.call(parent, propertyName)) {\n return parent[propertyName];\n }\n return undefined\n }\n ".trim();
3248
+ },
3249
+ // [blockValue]
3250
+ //
3251
+ // On stack, before: hash, inverse, program, value
3252
+ // On stack, after: return value of blockHelperMissing
3253
+ //
3254
+ // The purpose of this opcode is to take a block of the form
3255
+ // `{{#this.foo}}...{{/this.foo}}`, resolve the value of `foo`, and
3256
+ // replace it on the stack with the result of properly
3257
+ // invoking blockHelperMissing.
3258
+ blockValue: function blockValue(name) {
3259
+ var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)];
3260
+ this.setupHelperArgs(name, 0, params);
3261
+ var blockName = this.popStack();
3262
+ params.splice(1, 0, blockName);
3263
+ this.push(this.source.functionCall(blockHelperMissing, "call", params));
3264
+ },
3265
+ // [ambiguousBlockValue]
3266
+ //
3267
+ // On stack, before: hash, inverse, program, value
3268
+ // Compiler value, before: lastHelper=value of last found helper, if any
3269
+ // On stack, after, if no lastHelper: same as [blockValue]
3270
+ // On stack, after, if lastHelper: value
3271
+ ambiguousBlockValue: function ambiguousBlockValue() {
3272
+ var blockHelperMissing = this.aliasable("container.hooks.blockHelperMissing"), params = [this.contextName(0)];
3273
+ this.setupHelperArgs("", 0, params, true);
3274
+ this.flushInline();
3275
+ var current = this.topStack();
3276
+ params.splice(1, 0, current);
3277
+ this.pushSource(["if (!", this.lastHelper, ") { ", current, " = ", this.source.functionCall(blockHelperMissing, "call", params), "}"]);
3278
+ },
3279
+ // [appendContent]
3280
+ //
3281
+ // On stack, before: ...
3282
+ // On stack, after: ...
3283
+ //
3284
+ // Appends the string value of `content` to the current buffer
3285
+ appendContent: function appendContent(content) {
3286
+ if (this.pendingContent) {
3287
+ content = this.pendingContent + content;
3288
+ } else {
3289
+ this.pendingLocation = this.source.currentLocation;
3290
+ }
3291
+ this.pendingContent = content;
3292
+ },
3293
+ // [append]
3294
+ //
3295
+ // On stack, before: value, ...
3296
+ // On stack, after: ...
3297
+ //
3298
+ // Coerces `value` to a String and appends it to the current buffer.
3299
+ //
3300
+ // If `value` is truthy, or 0, it is coerced into a string and appended
3301
+ // Otherwise, the empty string is appended
3302
+ append: function append() {
3303
+ if (this.isInline()) {
3304
+ this.replaceStack(function(current) {
3305
+ return [" != null ? ", current, ' : ""'];
3306
+ });
3307
+ this.pushSource(this.appendToBuffer(this.popStack()));
3308
+ } else {
3309
+ var local = this.popStack();
3310
+ this.pushSource(["if (", local, " != null) { ", this.appendToBuffer(local, void 0, true), " }"]);
3311
+ if (this.environment.isSimple) {
3312
+ this.pushSource(["else { ", this.appendToBuffer("''", void 0, true), " }"]);
3313
+ }
3314
+ }
3315
+ },
3316
+ // [appendEscaped]
3317
+ //
3318
+ // On stack, before: value, ...
3319
+ // On stack, after: ...
3320
+ //
3321
+ // Escape `value` and append it to the buffer
3322
+ appendEscaped: function appendEscaped() {
3323
+ this.pushSource(this.appendToBuffer([this.aliasable("container.escapeExpression"), "(", this.popStack(), ")"]));
3324
+ },
3325
+ // [getContext]
3326
+ //
3327
+ // On stack, before: ...
3328
+ // On stack, after: ...
3329
+ // Compiler value, after: lastContext=depth
3330
+ //
3331
+ // Set the value of the `lastContext` compiler value to the depth
3332
+ getContext: function getContext(depth) {
3333
+ this.lastContext = depth;
3334
+ },
3335
+ // [pushContext]
3336
+ //
3337
+ // On stack, before: ...
3338
+ // On stack, after: currentContext, ...
3339
+ //
3340
+ // Pushes the value of the current context onto the stack.
3341
+ pushContext: function pushContext() {
3342
+ this.pushStackLiteral(this.contextName(this.lastContext));
3343
+ },
3344
+ // [lookupOnContext]
3345
+ //
3346
+ // On stack, before: ...
3347
+ // On stack, after: currentContext[name], ...
3348
+ //
3349
+ // Looks up the value of `name` on the current context and pushes
3350
+ // it onto the stack.
3351
+ lookupOnContext: function lookupOnContext(parts, falsy, strict, scoped) {
3352
+ var i = 0;
3353
+ if (!scoped && this.options.compat && !this.lastContext) {
3354
+ this.push(this.depthedLookup(parts[i++]));
3355
+ } else {
3356
+ this.pushContext();
3357
+ }
3358
+ this.resolvePath("context", parts, i, falsy, strict);
3359
+ },
3360
+ // [lookupBlockParam]
3361
+ //
3362
+ // On stack, before: ...
3363
+ // On stack, after: blockParam[name], ...
3364
+ //
3365
+ // Looks up the value of `parts` on the given block param and pushes
3366
+ // it onto the stack.
3367
+ lookupBlockParam: function lookupBlockParam(blockParamId, parts) {
3368
+ this.useBlockParams = true;
3369
+ this.push(["blockParams[", blockParamId[0], "][", blockParamId[1], "]"]);
3370
+ this.resolvePath("context", parts, 1);
3371
+ },
3372
+ // [lookupData]
3373
+ //
3374
+ // On stack, before: ...
3375
+ // On stack, after: data, ...
3376
+ //
3377
+ // Push the data lookup operator
3378
+ lookupData: function lookupData(depth, parts, strict) {
3379
+ if (!depth) {
3380
+ this.pushStackLiteral("data");
3381
+ } else {
3382
+ this.pushStackLiteral("container.data(data, " + depth + ")");
3383
+ }
3384
+ this.resolvePath("data", parts, 0, true, strict);
3385
+ },
3386
+ resolvePath: function resolvePath(type, parts, i, falsy, strict) {
3387
+ var _this2 = this;
3388
+ if (this.options.strict || this.options.assumeObjects) {
3389
+ this.push(strictLookup(this.options.strict && strict, this, parts, i, type));
3390
+ return;
3391
+ }
3392
+ var len = parts.length;
3393
+ for (; i < len; i++) {
3394
+ this.replaceStack(function(current) {
3395
+ var lookup = _this2.nameLookup(current, parts[i], type);
3396
+ if (!falsy) {
3397
+ return [" != null ? ", lookup, " : ", current];
3398
+ } else {
3399
+ return [" && ", lookup];
3400
+ }
3401
+ });
3402
+ }
3403
+ },
3404
+ // [resolvePossibleLambda]
3405
+ //
3406
+ // On stack, before: value, ...
3407
+ // On stack, after: resolved value, ...
3408
+ //
3409
+ // If the `value` is a lambda, replace it on the stack by
3410
+ // the return value of the lambda
3411
+ resolvePossibleLambda: function resolvePossibleLambda() {
3412
+ this.push([this.aliasable("container.lambda"), "(", this.popStack(), ", ", this.contextName(0), ")"]);
3413
+ },
3414
+ // [pushStringParam]
3415
+ //
3416
+ // On stack, before: ...
3417
+ // On stack, after: string, currentContext, ...
3418
+ //
3419
+ // This opcode is designed for use in string mode, which
3420
+ // provides the string value of a parameter along with its
3421
+ // depth rather than resolving it immediately.
3422
+ pushStringParam: function pushStringParam(string, type) {
3423
+ this.pushContext();
3424
+ this.pushString(type);
3425
+ if (type !== "SubExpression") {
3426
+ if (typeof string === "string") {
3427
+ this.pushString(string);
3428
+ } else {
3429
+ this.pushStackLiteral(string);
3430
+ }
3431
+ }
3432
+ },
3433
+ emptyHash: function emptyHash(omitEmpty) {
3434
+ if (this.trackIds) {
3435
+ this.push("{}");
3436
+ }
3437
+ if (this.stringParams) {
3438
+ this.push("{}");
3439
+ this.push("{}");
3440
+ }
3441
+ this.pushStackLiteral(omitEmpty ? "undefined" : "{}");
3442
+ },
3443
+ pushHash: function pushHash() {
3444
+ if (this.hash) {
3445
+ this.hashes.push(this.hash);
3446
+ }
3447
+ this.hash = { values: {}, types: [], contexts: [], ids: [] };
3448
+ },
3449
+ popHash: function popHash() {
3450
+ var hash = this.hash;
3451
+ this.hash = this.hashes.pop();
3452
+ if (this.trackIds) {
3453
+ this.push(this.objectLiteral(hash.ids));
3454
+ }
3455
+ if (this.stringParams) {
3456
+ this.push(this.objectLiteral(hash.contexts));
3457
+ this.push(this.objectLiteral(hash.types));
3458
+ }
3459
+ this.push(this.objectLiteral(hash.values));
3460
+ },
3461
+ // [pushString]
3462
+ //
3463
+ // On stack, before: ...
3464
+ // On stack, after: quotedString(string), ...
3465
+ //
3466
+ // Push a quoted version of `string` onto the stack
3467
+ pushString: function pushString(string) {
3468
+ this.pushStackLiteral(this.quotedString(string));
3469
+ },
3470
+ // [pushLiteral]
3471
+ //
3472
+ // On stack, before: ...
3473
+ // On stack, after: value, ...
3474
+ //
3475
+ // Pushes a value onto the stack. This operation prevents
3476
+ // the compiler from creating a temporary variable to hold
3477
+ // it.
3478
+ pushLiteral: function pushLiteral(value) {
3479
+ this.pushStackLiteral(value);
3480
+ },
3481
+ // [pushProgram]
3482
+ //
3483
+ // On stack, before: ...
3484
+ // On stack, after: program(guid), ...
3485
+ //
3486
+ // Push a program expression onto the stack. This takes
3487
+ // a compile-time guid and converts it into a runtime-accessible
3488
+ // expression.
3489
+ pushProgram: function pushProgram(guid) {
3490
+ if (guid != null) {
3491
+ this.pushStackLiteral(this.programExpression(guid));
3492
+ } else {
3493
+ this.pushStackLiteral(null);
3494
+ }
3495
+ },
3496
+ // [registerDecorator]
3497
+ //
3498
+ // On stack, before: hash, program, params..., ...
3499
+ // On stack, after: ...
3500
+ //
3501
+ // Pops off the decorator's parameters, invokes the decorator,
3502
+ // and inserts the decorator into the decorators list.
3503
+ registerDecorator: function registerDecorator(paramSize, name) {
3504
+ var foundDecorator = this.nameLookup("decorators", name, "decorator"), options = this.setupHelperArgs(name, paramSize);
3505
+ this.decorators.push(["fn = ", this.decorators.functionCall(foundDecorator, "", ["fn", "props", "container", options]), " || fn;"]);
3506
+ },
3507
+ // [invokeHelper]
3508
+ //
3509
+ // On stack, before: hash, inverse, program, params..., ...
3510
+ // On stack, after: result of helper invocation
3511
+ //
3512
+ // Pops off the helper's parameters, invokes the helper,
3513
+ // and pushes the helper's return value onto the stack.
3514
+ //
3515
+ // If the helper is not found, `helperMissing` is called.
3516
+ invokeHelper: function invokeHelper(paramSize, name, isSimple) {
3517
+ var nonHelper = this.popStack(), helper = this.setupHelper(paramSize, name);
3518
+ var possibleFunctionCalls = [];
3519
+ if (isSimple) {
3520
+ possibleFunctionCalls.push(helper.name);
3521
+ }
3522
+ possibleFunctionCalls.push(nonHelper);
3523
+ if (!this.options.strict) {
3524
+ possibleFunctionCalls.push(this.aliasable("container.hooks.helperMissing"));
3525
+ }
3526
+ var functionLookupCode = ["(", this.itemsSeparatedBy(possibleFunctionCalls, "||"), ")"];
3527
+ var functionCall = this.source.functionCall(functionLookupCode, "call", helper.callParams);
3528
+ this.push(functionCall);
3529
+ },
3530
+ itemsSeparatedBy: function itemsSeparatedBy(items, separator) {
3531
+ var result = [];
3532
+ result.push(items[0]);
3533
+ for (var i = 1; i < items.length; i++) {
3534
+ result.push(separator, items[i]);
3535
+ }
3536
+ return result;
3537
+ },
3538
+ // [invokeKnownHelper]
3539
+ //
3540
+ // On stack, before: hash, inverse, program, params..., ...
3541
+ // On stack, after: result of helper invocation
3542
+ //
3543
+ // This operation is used when the helper is known to exist,
3544
+ // so a `helperMissing` fallback is not required.
3545
+ invokeKnownHelper: function invokeKnownHelper(paramSize, name) {
3546
+ var helper = this.setupHelper(paramSize, name);
3547
+ this.push(this.source.functionCall(helper.name, "call", helper.callParams));
3548
+ },
3549
+ // [invokeAmbiguous]
3550
+ //
3551
+ // On stack, before: hash, inverse, program, params..., ...
3552
+ // On stack, after: result of disambiguation
3553
+ //
3554
+ // This operation is used when an expression like `{{foo}}`
3555
+ // is provided, but we don't know at compile-time whether it
3556
+ // is a helper or a path.
3557
+ //
3558
+ // This operation emits more code than the other options,
3559
+ // and can be avoided by passing the `knownHelpers` and
3560
+ // `knownHelpersOnly` flags at compile-time.
3561
+ invokeAmbiguous: function invokeAmbiguous(name, helperCall) {
3562
+ this.useRegister("helper");
3563
+ var nonHelper = this.popStack();
3564
+ this.emptyHash();
3565
+ var helper = this.setupHelper(0, name, helperCall);
3566
+ var helperName = this.lastHelper = this.nameLookup("helpers", name, "helper");
3567
+ var lookup = ["(", "(helper = ", helperName, " || ", nonHelper, ")"];
3568
+ if (!this.options.strict) {
3569
+ lookup[0] = "(helper = ";
3570
+ lookup.push(" != null ? helper : ", this.aliasable("container.hooks.helperMissing"));
3571
+ }
3572
+ this.push(["(", lookup, helper.paramsInit ? ["),(", helper.paramsInit] : [], "),", "(typeof helper === ", this.aliasable('"function"'), " ? ", this.source.functionCall("helper", "call", helper.callParams), " : helper))"]);
3573
+ },
3574
+ // [invokePartial]
3575
+ //
3576
+ // On stack, before: context, ...
3577
+ // On stack after: result of partial invocation
3578
+ //
3579
+ // This operation pops off a context, invokes a partial with that context,
3580
+ // and pushes the result of the invocation back.
3581
+ invokePartial: function invokePartial(isDynamic, name, indent) {
3582
+ var params = [], options = this.setupParams(name, 1, params);
3583
+ if (isDynamic) {
3584
+ name = this.popStack();
3585
+ delete options.name;
3586
+ }
3587
+ if (indent) {
3588
+ options.indent = JSON.stringify(indent);
3589
+ }
3590
+ options.helpers = "helpers";
3591
+ options.partials = "partials";
3592
+ options.decorators = "container.decorators";
3593
+ if (!isDynamic) {
3594
+ params.unshift(this.nameLookup("partials", name, "partial"));
3595
+ } else {
3596
+ params.unshift(name);
3597
+ }
3598
+ if (this.options.compat) {
3599
+ options.depths = "depths";
3600
+ }
3601
+ options = this.objectLiteral(options);
3602
+ params.push(options);
3603
+ this.push(this.source.functionCall("container.invokePartial", "", params));
3604
+ },
3605
+ // [assignToHash]
3606
+ //
3607
+ // On stack, before: value, ..., hash, ...
3608
+ // On stack, after: ..., hash, ...
3609
+ //
3610
+ // Pops a value off the stack and assigns it to the current hash
3611
+ assignToHash: function assignToHash(key) {
3612
+ var value = this.popStack(), context = void 0, type = void 0, id = void 0;
3613
+ if (this.trackIds) {
3614
+ id = this.popStack();
3615
+ }
3616
+ if (this.stringParams) {
3617
+ type = this.popStack();
3618
+ context = this.popStack();
3619
+ }
3620
+ var hash = this.hash;
3621
+ if (context) {
3622
+ hash.contexts[key] = context;
3623
+ }
3624
+ if (type) {
3625
+ hash.types[key] = type;
3626
+ }
3627
+ if (id) {
3628
+ hash.ids[key] = id;
3629
+ }
3630
+ hash.values[key] = value;
3631
+ },
3632
+ pushId: function pushId(type, name, child) {
3633
+ if (type === "BlockParam") {
3634
+ this.pushStackLiteral("blockParams[" + name[0] + "].path[" + name[1] + "]" + (child ? " + " + JSON.stringify("." + child) : ""));
3635
+ } else if (type === "PathExpression") {
3636
+ this.pushString(name);
3637
+ } else if (type === "SubExpression") {
3638
+ this.pushStackLiteral("true");
3639
+ } else {
3640
+ this.pushStackLiteral("null");
3641
+ }
3642
+ },
3643
+ // HELPERS
3644
+ compiler: JavaScriptCompiler,
3645
+ compileChildren: function compileChildren(environment, options) {
3646
+ var children = environment.children, child = void 0, compiler = void 0;
3647
+ for (var i = 0, l = children.length; i < l; i++) {
3648
+ child = children[i];
3649
+ compiler = new this.compiler();
3650
+ var existing = this.matchExistingProgram(child);
3651
+ if (existing == null) {
3652
+ this.context.programs.push("");
3653
+ var index = this.context.programs.length;
3654
+ child.index = index;
3655
+ child.name = "program" + index;
3656
+ this.context.programs[index] = compiler.compile(child, options, this.context, !this.precompile);
3657
+ this.context.decorators[index] = compiler.decorators;
3658
+ this.context.environments[index] = child;
3659
+ this.useDepths = this.useDepths || compiler.useDepths;
3660
+ this.useBlockParams = this.useBlockParams || compiler.useBlockParams;
3661
+ child.useDepths = this.useDepths;
3662
+ child.useBlockParams = this.useBlockParams;
3663
+ } else {
3664
+ child.index = existing.index;
3665
+ child.name = "program" + existing.index;
3666
+ this.useDepths = this.useDepths || existing.useDepths;
3667
+ this.useBlockParams = this.useBlockParams || existing.useBlockParams;
3668
+ }
3669
+ }
3670
+ },
3671
+ matchExistingProgram: function matchExistingProgram(child) {
3672
+ for (var i = 0, len = this.context.environments.length; i < len; i++) {
3673
+ var environment = this.context.environments[i];
3674
+ if (environment && environment.equals(child)) {
3675
+ return environment;
3676
+ }
3677
+ }
3678
+ },
3679
+ programExpression: function programExpression(guid) {
3680
+ var child = this.environment.children[guid], programParams = [child.index, "data", child.blockParams];
3681
+ if (this.useBlockParams || this.useDepths) {
3682
+ programParams.push("blockParams");
3683
+ }
3684
+ if (this.useDepths) {
3685
+ programParams.push("depths");
3686
+ }
3687
+ return "container.program(" + programParams.join(", ") + ")";
3688
+ },
3689
+ useRegister: function useRegister(name) {
3690
+ if (!this.registers[name]) {
3691
+ this.registers[name] = true;
3692
+ this.registers.list.push(name);
3693
+ }
3694
+ },
3695
+ push: function push(expr) {
3696
+ if (!(expr instanceof Literal)) {
3697
+ expr = this.source.wrap(expr);
3698
+ }
3699
+ this.inlineStack.push(expr);
3700
+ return expr;
3701
+ },
3702
+ pushStackLiteral: function pushStackLiteral(item) {
3703
+ this.push(new Literal(item));
3704
+ },
3705
+ pushSource: function pushSource(source) {
3706
+ if (this.pendingContent) {
3707
+ this.source.push(this.appendToBuffer(this.source.quotedString(this.pendingContent), this.pendingLocation));
3708
+ this.pendingContent = void 0;
3709
+ }
3710
+ if (source) {
3711
+ this.source.push(source);
3712
+ }
3713
+ },
3714
+ replaceStack: function replaceStack(callback) {
3715
+ var prefix = ["("], stack = void 0, createdStack = void 0, usedLiteral = void 0;
3716
+ if (!this.isInline()) {
3717
+ throw new _exception2["default"]("replaceStack on non-inline");
3718
+ }
3719
+ var top = this.popStack(true);
3720
+ if (top instanceof Literal) {
3721
+ stack = [top.value];
3722
+ prefix = ["(", stack];
3723
+ usedLiteral = true;
3724
+ } else {
3725
+ createdStack = true;
3726
+ var _name = this.incrStack();
3727
+ prefix = ["((", this.push(_name), " = ", top, ")"];
3728
+ stack = this.topStack();
3729
+ }
3730
+ var item = callback.call(this, stack);
3731
+ if (!usedLiteral) {
3732
+ this.popStack();
3733
+ }
3734
+ if (createdStack) {
3735
+ this.stackSlot--;
3736
+ }
3737
+ this.push(prefix.concat(item, ")"));
3738
+ },
3739
+ incrStack: function incrStack() {
3740
+ this.stackSlot++;
3741
+ if (this.stackSlot > this.stackVars.length) {
3742
+ this.stackVars.push("stack" + this.stackSlot);
3743
+ }
3744
+ return this.topStackName();
3745
+ },
3746
+ topStackName: function topStackName() {
3747
+ return "stack" + this.stackSlot;
3748
+ },
3749
+ flushInline: function flushInline() {
3750
+ var inlineStack = this.inlineStack;
3751
+ this.inlineStack = [];
3752
+ for (var i = 0, len = inlineStack.length; i < len; i++) {
3753
+ var entry = inlineStack[i];
3754
+ if (entry instanceof Literal) {
3755
+ this.compileStack.push(entry);
3756
+ } else {
3757
+ var stack = this.incrStack();
3758
+ this.pushSource([stack, " = ", entry, ";"]);
3759
+ this.compileStack.push(stack);
3760
+ }
3761
+ }
3762
+ },
3763
+ isInline: function isInline() {
3764
+ return this.inlineStack.length;
3765
+ },
3766
+ popStack: function popStack(wrapped) {
3767
+ var inline = this.isInline(), item = (inline ? this.inlineStack : this.compileStack).pop();
3768
+ if (!wrapped && item instanceof Literal) {
3769
+ return item.value;
3770
+ } else {
3771
+ if (!inline) {
3772
+ if (!this.stackSlot) {
3773
+ throw new _exception2["default"]("Invalid stack pop");
3774
+ }
3775
+ this.stackSlot--;
3776
+ }
3777
+ return item;
3778
+ }
3779
+ },
3780
+ topStack: function topStack() {
3781
+ var stack = this.isInline() ? this.inlineStack : this.compileStack, item = stack[stack.length - 1];
3782
+ if (item instanceof Literal) {
3783
+ return item.value;
3784
+ } else {
3785
+ return item;
3786
+ }
3787
+ },
3788
+ contextName: function contextName(context) {
3789
+ if (this.useDepths && context) {
3790
+ return "depths[" + context + "]";
3791
+ } else {
3792
+ return "depth" + context;
3793
+ }
3794
+ },
3795
+ quotedString: function quotedString(str) {
3796
+ return this.source.quotedString(str);
3797
+ },
3798
+ objectLiteral: function objectLiteral(obj) {
3799
+ return this.source.objectLiteral(obj);
3800
+ },
3801
+ aliasable: function aliasable(name) {
3802
+ var ret = this.aliases[name];
3803
+ if (ret) {
3804
+ ret.referenceCount++;
3805
+ return ret;
3806
+ }
3807
+ ret = this.aliases[name] = this.source.wrap(name);
3808
+ ret.aliasable = true;
3809
+ ret.referenceCount = 1;
3810
+ return ret;
3811
+ },
3812
+ setupHelper: function setupHelper(paramSize, name, blockHelper) {
3813
+ var params = [], paramsInit = this.setupHelperArgs(name, paramSize, params, blockHelper);
3814
+ var foundHelper = this.nameLookup("helpers", name, "helper"), callContext = this.aliasable(this.contextName(0) + " != null ? " + this.contextName(0) + " : (container.nullContext || {})");
3815
+ return {
3816
+ params,
3817
+ paramsInit,
3818
+ name: foundHelper,
3819
+ callParams: [callContext].concat(params)
3820
+ };
3821
+ },
3822
+ setupParams: function setupParams(helper, paramSize, params) {
3823
+ var options = {}, contexts = [], types = [], ids = [], objectArgs = !params, param = void 0;
3824
+ if (objectArgs) {
3825
+ params = [];
3826
+ }
3827
+ options.name = this.quotedString(helper);
3828
+ options.hash = this.popStack();
3829
+ if (this.trackIds) {
3830
+ options.hashIds = this.popStack();
3831
+ }
3832
+ if (this.stringParams) {
3833
+ options.hashTypes = this.popStack();
3834
+ options.hashContexts = this.popStack();
3835
+ }
3836
+ var inverse = this.popStack(), program = this.popStack();
3837
+ if (program || inverse) {
3838
+ options.fn = program || "container.noop";
3839
+ options.inverse = inverse || "container.noop";
3840
+ }
3841
+ var i = paramSize;
3842
+ while (i--) {
3843
+ param = this.popStack();
3844
+ params[i] = param;
3845
+ if (this.trackIds) {
3846
+ ids[i] = this.popStack();
3847
+ }
3848
+ if (this.stringParams) {
3849
+ types[i] = this.popStack();
3850
+ contexts[i] = this.popStack();
3851
+ }
3852
+ }
3853
+ if (objectArgs) {
3854
+ options.args = this.source.generateArray(params);
3855
+ }
3856
+ if (this.trackIds) {
3857
+ options.ids = this.source.generateArray(ids);
3858
+ }
3859
+ if (this.stringParams) {
3860
+ options.types = this.source.generateArray(types);
3861
+ options.contexts = this.source.generateArray(contexts);
3862
+ }
3863
+ if (this.options.data) {
3864
+ options.data = "data";
3865
+ }
3866
+ if (this.useBlockParams) {
3867
+ options.blockParams = "blockParams";
3868
+ }
3869
+ return options;
3870
+ },
3871
+ setupHelperArgs: function setupHelperArgs(helper, paramSize, params, useRegister) {
3872
+ var options = this.setupParams(helper, paramSize, params);
3873
+ options.loc = JSON.stringify(this.source.currentLocation);
3874
+ options = this.objectLiteral(options);
3875
+ if (useRegister) {
3876
+ this.useRegister("options");
3877
+ params.push("options");
3878
+ return ["options=", options];
3879
+ } else if (params) {
3880
+ params.push(options);
3881
+ return "";
3882
+ } else {
3883
+ return options;
3884
+ }
3885
+ }
3886
+ };
3887
+ (function() {
3888
+ var reservedWords = "break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield await null true false".split(" ");
3889
+ var compilerWords = JavaScriptCompiler.RESERVED_WORDS = {};
3890
+ for (var i = 0, l = reservedWords.length; i < l; i++) {
3891
+ compilerWords[reservedWords[i]] = true;
3892
+ }
3893
+ })();
3894
+ JavaScriptCompiler.isValidJavaScriptVariableName = function(name) {
3895
+ return !JavaScriptCompiler.RESERVED_WORDS[name] && /^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(name);
3896
+ };
3897
+ function strictLookup(requireTerminal, compiler, parts, i, type) {
3898
+ var stack = compiler.popStack(), len = parts.length;
3899
+ if (requireTerminal) {
3900
+ len--;
3901
+ }
3902
+ for (; i < len; i++) {
3903
+ stack = compiler.nameLookup(stack, parts[i], type);
3904
+ }
3905
+ if (requireTerminal) {
3906
+ return [compiler.aliasable("container.strict"), "(", stack, ", ", compiler.quotedString(parts[i]), ", ", JSON.stringify(compiler.source.currentLocation), " )"];
3907
+ } else {
3908
+ return stack;
3909
+ }
3910
+ }
3911
+ exports["default"] = JavaScriptCompiler;
3912
+ module.exports = exports["default"];
3913
+ }
3914
+ });
3915
+
3916
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.js
3917
+ var require_handlebars = __commonJS({
3918
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars.js"(exports, module) {
3919
+ "use strict";
3920
+ init_cjs_shims();
3921
+ exports.__esModule = true;
3922
+ function _interopRequireDefault(obj) {
3923
+ return obj && obj.__esModule ? obj : { "default": obj };
3924
+ }
3925
+ var _handlebarsRuntime = require_handlebars_runtime();
3926
+ var _handlebarsRuntime2 = _interopRequireDefault(_handlebarsRuntime);
3927
+ var _handlebarsCompilerAst = require_ast();
3928
+ var _handlebarsCompilerAst2 = _interopRequireDefault(_handlebarsCompilerAst);
3929
+ var _handlebarsCompilerBase = require_base2();
3930
+ var _handlebarsCompilerCompiler = require_compiler();
3931
+ var _handlebarsCompilerJavascriptCompiler = require_javascript_compiler();
3932
+ var _handlebarsCompilerJavascriptCompiler2 = _interopRequireDefault(_handlebarsCompilerJavascriptCompiler);
3933
+ var _handlebarsCompilerVisitor = require_visitor();
3934
+ var _handlebarsCompilerVisitor2 = _interopRequireDefault(_handlebarsCompilerVisitor);
3935
+ var _handlebarsNoConflict = require_no_conflict();
3936
+ var _handlebarsNoConflict2 = _interopRequireDefault(_handlebarsNoConflict);
3937
+ var _create = _handlebarsRuntime2["default"].create;
3938
+ function create() {
3939
+ var hb = _create();
3940
+ hb.compile = function(input, options) {
3941
+ return _handlebarsCompilerCompiler.compile(input, options, hb);
3942
+ };
3943
+ hb.precompile = function(input, options) {
3944
+ return _handlebarsCompilerCompiler.precompile(input, options, hb);
3945
+ };
3946
+ hb.AST = _handlebarsCompilerAst2["default"];
3947
+ hb.Compiler = _handlebarsCompilerCompiler.Compiler;
3948
+ hb.JavaScriptCompiler = _handlebarsCompilerJavascriptCompiler2["default"];
3949
+ hb.Parser = _handlebarsCompilerBase.parser;
3950
+ hb.parse = _handlebarsCompilerBase.parse;
3951
+ hb.parseWithoutProcessing = _handlebarsCompilerBase.parseWithoutProcessing;
3952
+ return hb;
3953
+ }
3954
+ var inst = create();
3955
+ inst.create = create;
3956
+ _handlebarsNoConflict2["default"](inst);
3957
+ inst.Visitor = _handlebarsCompilerVisitor2["default"];
3958
+ inst["default"] = inst;
3959
+ exports["default"] = inst;
3960
+ module.exports = exports["default"];
3961
+ }
3962
+ });
3963
+
3964
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js
3965
+ var require_printer = __commonJS({
3966
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/dist/cjs/handlebars/compiler/printer.js"(exports) {
3967
+ "use strict";
3968
+ init_cjs_shims();
3969
+ exports.__esModule = true;
3970
+ exports.print = print;
3971
+ exports.PrintVisitor = PrintVisitor;
3972
+ function _interopRequireDefault(obj) {
3973
+ return obj && obj.__esModule ? obj : { "default": obj };
3974
+ }
3975
+ var _visitor = require_visitor();
3976
+ var _visitor2 = _interopRequireDefault(_visitor);
3977
+ function print(ast) {
3978
+ return new PrintVisitor().accept(ast);
3979
+ }
3980
+ function PrintVisitor() {
3981
+ this.padding = 0;
3982
+ }
3983
+ PrintVisitor.prototype = new _visitor2["default"]();
3984
+ PrintVisitor.prototype.pad = function(string) {
3985
+ var out = "";
3986
+ for (var i = 0, l = this.padding; i < l; i++) {
3987
+ out += " ";
3988
+ }
3989
+ out += string + "\n";
3990
+ return out;
3991
+ };
3992
+ PrintVisitor.prototype.Program = function(program) {
3993
+ var out = "", body = program.body, i = void 0, l = void 0;
3994
+ if (program.blockParams) {
3995
+ var blockParams = "BLOCK PARAMS: [";
3996
+ for (i = 0, l = program.blockParams.length; i < l; i++) {
3997
+ blockParams += " " + program.blockParams[i];
3998
+ }
3999
+ blockParams += " ]";
4000
+ out += this.pad(blockParams);
4001
+ }
4002
+ for (i = 0, l = body.length; i < l; i++) {
4003
+ out += this.accept(body[i]);
4004
+ }
4005
+ this.padding--;
4006
+ return out;
4007
+ };
4008
+ PrintVisitor.prototype.MustacheStatement = function(mustache) {
4009
+ return this.pad("{{ " + this.SubExpression(mustache) + " }}");
4010
+ };
4011
+ PrintVisitor.prototype.Decorator = function(mustache) {
4012
+ return this.pad("{{ DIRECTIVE " + this.SubExpression(mustache) + " }}");
4013
+ };
4014
+ PrintVisitor.prototype.BlockStatement = PrintVisitor.prototype.DecoratorBlock = function(block) {
4015
+ var out = "";
4016
+ out += this.pad((block.type === "DecoratorBlock" ? "DIRECTIVE " : "") + "BLOCK:");
4017
+ this.padding++;
4018
+ out += this.pad(this.SubExpression(block));
4019
+ if (block.program) {
4020
+ out += this.pad("PROGRAM:");
4021
+ this.padding++;
4022
+ out += this.accept(block.program);
4023
+ this.padding--;
4024
+ }
4025
+ if (block.inverse) {
4026
+ if (block.program) {
4027
+ this.padding++;
4028
+ }
4029
+ out += this.pad("{{^}}");
4030
+ this.padding++;
4031
+ out += this.accept(block.inverse);
4032
+ this.padding--;
4033
+ if (block.program) {
4034
+ this.padding--;
4035
+ }
4036
+ }
4037
+ this.padding--;
4038
+ return out;
4039
+ };
4040
+ PrintVisitor.prototype.PartialStatement = function(partial) {
4041
+ var content = "PARTIAL:" + partial.name.original;
4042
+ if (partial.params[0]) {
4043
+ content += " " + this.accept(partial.params[0]);
4044
+ }
4045
+ if (partial.hash) {
4046
+ content += " " + this.accept(partial.hash);
4047
+ }
4048
+ return this.pad("{{> " + content + " }}");
4049
+ };
4050
+ PrintVisitor.prototype.PartialBlockStatement = function(partial) {
4051
+ var content = "PARTIAL BLOCK:" + partial.name.original;
4052
+ if (partial.params[0]) {
4053
+ content += " " + this.accept(partial.params[0]);
4054
+ }
4055
+ if (partial.hash) {
4056
+ content += " " + this.accept(partial.hash);
4057
+ }
4058
+ content += " " + this.pad("PROGRAM:");
4059
+ this.padding++;
4060
+ content += this.accept(partial.program);
4061
+ this.padding--;
4062
+ return this.pad("{{> " + content + " }}");
4063
+ };
4064
+ PrintVisitor.prototype.ContentStatement = function(content) {
4065
+ return this.pad("CONTENT[ '" + content.value + "' ]");
4066
+ };
4067
+ PrintVisitor.prototype.CommentStatement = function(comment) {
4068
+ return this.pad("{{! '" + comment.value + "' }}");
4069
+ };
4070
+ PrintVisitor.prototype.SubExpression = function(sexpr) {
4071
+ var params = sexpr.params, paramStrings = [], hash = void 0;
4072
+ for (var i = 0, l = params.length; i < l; i++) {
4073
+ paramStrings.push(this.accept(params[i]));
4074
+ }
4075
+ params = "[" + paramStrings.join(", ") + "]";
4076
+ hash = sexpr.hash ? " " + this.accept(sexpr.hash) : "";
4077
+ return this.accept(sexpr.path) + " " + params + hash;
4078
+ };
4079
+ PrintVisitor.prototype.PathExpression = function(id) {
4080
+ var path2 = id.parts.join("/");
4081
+ return (id.data ? "@" : "") + "PATH:" + path2;
4082
+ };
4083
+ PrintVisitor.prototype.StringLiteral = function(string) {
4084
+ return '"' + string.value + '"';
4085
+ };
4086
+ PrintVisitor.prototype.NumberLiteral = function(number) {
4087
+ return "NUMBER{" + number.value + "}";
4088
+ };
4089
+ PrintVisitor.prototype.BooleanLiteral = function(bool) {
4090
+ return "BOOLEAN{" + bool.value + "}";
4091
+ };
4092
+ PrintVisitor.prototype.UndefinedLiteral = function() {
4093
+ return "UNDEFINED";
4094
+ };
4095
+ PrintVisitor.prototype.NullLiteral = function() {
4096
+ return "NULL";
4097
+ };
4098
+ PrintVisitor.prototype.Hash = function(hash) {
4099
+ var pairs = hash.pairs, joinedPairs = [];
4100
+ for (var i = 0, l = pairs.length; i < l; i++) {
4101
+ joinedPairs.push(this.accept(pairs[i]));
4102
+ }
4103
+ return "HASH{" + joinedPairs.join(", ") + "}";
4104
+ };
4105
+ PrintVisitor.prototype.HashPair = function(pair) {
4106
+ return pair.key + "=" + this.accept(pair.value);
4107
+ };
4108
+ }
4109
+ });
4110
+
4111
+ // ../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/lib/index.js
4112
+ var require_lib = __commonJS({
4113
+ "../../node_modules/.pnpm/handlebars@4.7.8/node_modules/handlebars/lib/index.js"(exports, module) {
4114
+ init_cjs_shims();
4115
+ var handlebars = require_handlebars()["default"];
4116
+ var printer = require_printer();
4117
+ handlebars.PrintVisitor = printer.PrintVisitor;
4118
+ handlebars.print = printer.print;
4119
+ module.exports = handlebars;
4120
+ function extension(module2, filename) {
4121
+ var fs2 = __require("fs");
4122
+ var templateString = fs2.readFileSync(filename, "utf8");
4123
+ module2.exports = handlebars.compile(templateString);
4124
+ }
4125
+ if (typeof __require !== "undefined" && __require.extensions) {
4126
+ __require.extensions[".handlebars"] = extension;
4127
+ __require.extensions[".hbs"] = extension;
4128
+ }
4129
+ }
4130
+ });
4131
+
4132
+ // src/codegen.ts
4133
+ init_cjs_shims();
4134
+ var import_handlebars = __toESM(require_lib(), 1);
4135
+ import fs from "node:fs/promises";
4136
+ import path from "node:path";
4137
+ import { fileURLToPath } from "node:url";
4138
+ var TOOL_NAME = "raindrop build";
4139
+ var TEMPLATES_DIR = path.join(path.dirname(fileURLToPath(import.meta.url)), "..", "templates");
4140
+ var TEMPLATE_INIT = "init";
4141
+ var GENERATED_EXTENSION = ".gen";
4142
+ var HANDLERS_DIR = "src";
4143
+ var COMMON_DIR = "common";
4144
+ var DB_DIR = "db";
4145
+ var PRISMA_DIR = "prisma";
4146
+ var DB_SCRIPT_DIR = "scripts";
4147
+ var RAINDROP_TYPES_FILENAME = "raindrop.gen.ts";
4148
+ var TEMPLATE_BUCKET_EVENT_NOTIFICATION = path.join("handlers", "bucket-event-notification");
4149
+ var TEMPLATE_QUEUE_CONSUMER = path.join("handlers", "queue-consumer");
4150
+ var TEMPLATE_HTTP_SERVICE = path.join("handlers", "http-service");
4151
+ var TEMPLATE_MCP_SERVICE = path.join("handlers", "mcp-service");
4152
+ var TEMPLATE_ACTOR = path.join("handlers", "actor");
4153
+ var TEMPLATE_TASK = path.join("handlers", "task");
4154
+ var TEMPLATE_DB = "db";
4155
+ var TEMPLATE_DB_DB = path.join("db", "db");
4156
+ var TEMPLATE_DB_COMMON = path.join("db", "common");
4157
+ var TEMPLATE_DB_PRISMA = path.join("db", "prisma");
4158
+ var TEMPLATE_DB_SCRIPT = path.join("db", "scripts");
4159
+ var TEMPLATE_EXTENSION = ".hbs";
4160
+ var SCAFFOLDING_PREFIX = "__";
4161
+ var PACKAGE_JSON = "package.json";
4162
+ var HANDLEBARS_RENDER_OPTS = {
4163
+ strict: true,
4164
+ // Fail on missing variables
4165
+ noEscape: true
4166
+ // Do not escape HTML
4167
+ };
4168
+ function trimTemplateSuffix(filename) {
4169
+ return filename.replace(new RegExp(`${TEMPLATE_EXTENSION}$`), "");
4170
+ }
4171
+ function renderTemplateFromString(template, context) {
4172
+ const compiledTemplate = import_handlebars.default.compile(template, HANDLEBARS_RENDER_OPTS);
4173
+ return compiledTemplate(context);
4174
+ }
4175
+ async function handlePackageJson(templatePath, outputPath) {
4176
+ const templateJson = JSON.parse(await fs.readFile(templatePath, "utf-8"));
4177
+ const existingJson = JSON.parse(await fs.readFile(outputPath, "utf-8"));
4178
+ const mergedJson = {
4179
+ ...existingJson,
4180
+ dependencies: { ...existingJson.dependencies, ...templateJson.dependencies },
4181
+ devDependencies: { ...existingJson.devDependencies, ...templateJson.devDependencies },
4182
+ scripts: { ...existingJson.scripts, ...templateJson.scripts }
4183
+ };
4184
+ await fs.writeFile(outputPath, JSON.stringify(mergedJson, null, 2));
4185
+ }
4186
+ async function renderTemplatesFromDirectory({
4187
+ templatePath,
4188
+ outPath,
4189
+ context,
4190
+ opts
4191
+ }) {
4192
+ const visit = async (relPath) => {
4193
+ try {
4194
+ if (!shouldWriteTemplate(opts, relPath)) {
4195
+ return;
4196
+ }
4197
+ const fullTemplatePath = relPath ? path.join(templatePath, relPath) : templatePath;
4198
+ relPath = relPath ? relPath : path.basename(templatePath);
4199
+ const outputFilename = trimTemplateSuffix(relPath);
4200
+ const outputFilePath = path.join(outPath, outputFilename);
4201
+ if (!relPath.endsWith(TEMPLATE_EXTENSION) && outputFilename === PACKAGE_JSON && opts?.mergePackageJson) {
4202
+ await handlePackageJson(fullTemplatePath, outputFilePath);
4203
+ return;
4204
+ }
4205
+ await fs.mkdir(path.dirname(outputFilePath), { recursive: true });
4206
+ const rawContent = await fs.readFile(fullTemplatePath, "utf-8");
4207
+ const content = relPath.endsWith(TEMPLATE_EXTENSION) ? renderTemplateFromString(rawContent, context) : rawContent;
4208
+ const alreadyExists = await fileExists(outputFilePath);
4209
+ if (alreadyExists && !opts?.overwrite) {
4210
+ return;
4211
+ }
4212
+ await fs.writeFile(outputFilePath, content);
4213
+ } catch (err) {
4214
+ console.error(`Error processing file ${relPath}: ${err}`);
4215
+ }
4216
+ };
4217
+ if (await fs.lstat(templatePath).then((stats) => stats.isFile())) {
4218
+ await visit("");
4219
+ return;
4220
+ }
4221
+ return await dirWalk(templatePath, visit);
4222
+ }
4223
+ function templateType(relPath) {
4224
+ if (path.basename(relPath).startsWith(SCAFFOLDING_PREFIX)) {
4225
+ return "scaffolding";
4226
+ }
4227
+ if (path.basename(relPath).includes(GENERATED_EXTENSION)) {
4228
+ return "non-user-modifiable";
4229
+ }
4230
+ return "user-modifiable";
4231
+ }
4232
+ function shouldWriteTemplate(opts, relPath) {
4233
+ const type = templateType(relPath);
4234
+ if (type == "scaffolding" && !opts?.renderScaffoldingCode) {
4235
+ return false;
4236
+ }
4237
+ if (type == "non-user-modifiable" && !opts?.renderNonUserModifiableCode) {
4238
+ return false;
4239
+ }
4240
+ if (!["scaffolding", "non-user-modifiable"].includes(type) && !opts?.renderUserModifiableCode) {
4241
+ return false;
4242
+ }
4243
+ return true;
4244
+ }
4245
+ async function renderCodegenPlan(plan, outPath = void 0, opts, context = {}) {
4246
+ const templateContext = {
4247
+ ...context,
4248
+ toolName: TOOL_NAME
4249
+ };
4250
+ for (const task of plan) {
4251
+ await renderTemplatesFromDirectory({
4252
+ templatePath: task.templateName,
4253
+ outPath: outPath ? path.join(outPath, task.outPath) : task.outPath,
4254
+ context: { ...templateContext, ...task.context },
4255
+ opts
4256
+ });
4257
+ }
4258
+ }
4259
+ function codegenPlan(apps) {
4260
+ const plan = [];
4261
+ plan.push({
4262
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_INIT),
4263
+ outPath: ""
4264
+ });
4265
+ for (const app of apps) {
4266
+ for (const observer of app.observer) {
4267
+ const primeSource = observer.source[0];
4268
+ const templateName = primeSource?.bucket ? TEMPLATE_BUCKET_EVENT_NOTIFICATION : TEMPLATE_QUEUE_CONSUMER;
4269
+ plan.push({
4270
+ templateName: path.join(TEMPLATES_DIR, templateName),
4271
+ outPath: path.join(HANDLERS_DIR, valueOf(observer.name)),
4272
+ context: { observerName: valueOf(observer.name) }
4273
+ });
4274
+ }
4275
+ for (const service of app.service) {
4276
+ plan.push({
4277
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_HTTP_SERVICE),
4278
+ outPath: path.join(HANDLERS_DIR, valueOf(service.name)),
4279
+ context: { serviceName: valueOf(service.name) }
4280
+ });
4281
+ }
4282
+ for (const service of app.mcpService) {
4283
+ plan.push({
4284
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_MCP_SERVICE),
4285
+ outPath: path.join(HANDLERS_DIR, valueOf(service.name)),
4286
+ context: { serviceName: valueOf(service.name) }
4287
+ });
4288
+ }
4289
+ for (const actor of app.actor) {
4290
+ plan.push({
4291
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_ACTOR),
4292
+ outPath: path.join(HANDLERS_DIR, valueOf(actor.name)),
4293
+ context: { actorClassName: kebabCaseToUpperCamelCase(valueOf(actor.name)) }
4294
+ });
4295
+ }
4296
+ for (const task of app.task) {
4297
+ plan.push({
4298
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_TASK),
4299
+ outPath: path.join(HANDLERS_DIR, valueOf(task.name)),
4300
+ context: { taskClassName: kebabCaseToUpperCamelCase(valueOf(task.name)) }
4301
+ });
4302
+ }
4303
+ for (const db of app.sqlDatabase) {
4304
+ plan.push({
4305
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_DB, "package.json"),
4306
+ outPath: path.join("./")
4307
+ });
4308
+ plan.push({
4309
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_DB_DB),
4310
+ outPath: path.join(DB_DIR, valueOf(db.name)),
4311
+ context: { dbName: valueOf(db.name) }
4312
+ });
4313
+ plan.push({
4314
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_DB_COMMON),
4315
+ outPath: path.join(HANDLERS_DIR, COMMON_DIR),
4316
+ context: { dbName: valueOf(db.name) }
4317
+ });
4318
+ if (db.disable_prisma === void 0 || !valueOf(db.disable_prisma)) {
4319
+ plan.push({
4320
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_DB_PRISMA),
4321
+ outPath: path.join(PRISMA_DIR, valueOf(db.name)),
4322
+ context: { dbName: kebabCaseToCamelCase(valueOf(db.name)) }
4323
+ });
4324
+ }
4325
+ plan.push({
4326
+ templateName: path.join(TEMPLATES_DIR, TEMPLATE_DB_SCRIPT),
4327
+ outPath: path.join(DB_SCRIPT_DIR),
4328
+ context: { dbName: valueOf(db.name) }
4329
+ });
4330
+ }
4331
+ }
4332
+ return plan;
4333
+ }
4334
+ var TYPE_DEFINITIONS_TEMPLATE = import_handlebars.default.compile(
4335
+ `// Code generated by {{ toolName }}, DO NOT EDIT.
4336
+ import { {{#each imports}}{{this}}, {{/each}} } from '@liquidmetal-ai/raindrop-framework';
4337
+
4338
+ export interface Env {
4339
+ _raindrop: {
4340
+ app: App;
4341
+ };
4342
+ {{#each resources}}
4343
+ {{this.name}}: {{{this.type}}};
4344
+ {{/each}}
4345
+ }
4346
+ `,
4347
+ HANDLEBARS_RENDER_OPTS
4348
+ );
4349
+ function gatherEnvForHandler(handler, app) {
4350
+ const bindings = {};
4351
+ const types = /* @__PURE__ */ new Set();
4352
+ for (const appService of app.service) {
4353
+ if (appService !== handler) {
4354
+ bindings[kebabCaseToConstantCase(valueOf(appService.name))] = `ServiceStub<import('../${valueOf(appService.name)}/index.js').default>`;
4355
+ types.add("ServiceStub");
4356
+ }
4357
+ }
4358
+ for (const appActor of app.actor) {
4359
+ const actorName = valueOf(appActor.name);
4360
+ const actorClass = kebabCaseToUpperCamelCase(actorName);
4361
+ if (appActor === handler) {
4362
+ bindings[kebabCaseToConstantCase(valueOf(appActor.name))] = `ActorNamespace<import('./index.js').${actorClass}>`;
4363
+ } else {
4364
+ bindings[kebabCaseToConstantCase(valueOf(appActor.name))] = `ActorNamespace<import('../${actorName}/index.js').${actorClass}>`;
4365
+ }
4366
+ types.add("ActorNamespace");
4367
+ }
4368
+ for (const appObserver of app.observer) {
4369
+ if (appObserver === handler) {
4370
+ continue;
4371
+ }
4372
+ for (const source of appObserver.source) {
4373
+ if (source.queue) {
4374
+ bindings[kebabCaseToConstantCase(valueOf(source.queue))] = `Queue<import('../${valueOf(appObserver.name)}').Body>`;
4375
+ types.add("Queue");
4376
+ }
4377
+ }
4378
+ }
4379
+ for (const appBucket of app.bucket) {
4380
+ bindings[kebabCaseToConstantCase(valueOf(appBucket.name))] = "Bucket";
4381
+ types.add("Bucket");
4382
+ }
4383
+ for (const appSqlDatabase of app.sqlDatabase) {
4384
+ bindings[kebabCaseToConstantCase(valueOf(appSqlDatabase.name))] = "SqlDatabase";
4385
+ types.add("SqlDatabase");
4386
+ }
4387
+ for (const appVectorizeIndex of app.vectorIndex) {
4388
+ bindings[kebabCaseToConstantCase(valueOf(appVectorizeIndex.name))] = "VectorIndex";
4389
+ types.add("VectorIndex");
4390
+ }
4391
+ for (const appKvCache of app.kvCache) {
4392
+ bindings[kebabCaseToConstantCase(valueOf(appKvCache.name))] = "KvCache";
4393
+ types.add("KvCache");
4394
+ }
4395
+ for (const appSmartBucket of app.smartBucket) {
4396
+ bindings[kebabCaseToConstantCase(valueOf(appSmartBucket.name))] = "SmartBucket";
4397
+ types.add("SmartBucket");
4398
+ }
4399
+ for (const appSmartMemory of app.smartMemory) {
4400
+ bindings[kebabCaseToConstantCase(valueOf(appSmartMemory.name))] = "SmartMemory";
4401
+ types.add("SmartMemory");
4402
+ }
4403
+ for (const appSmartSql of app.smartSql) {
4404
+ bindings[kebabCaseToConstantCase(valueOf(appSmartSql.name))] = "SmartSql";
4405
+ types.add("SmartSql");
4406
+ }
4407
+ for (const env of app.env) {
4408
+ bindings[kebabCaseToConstantCase(valueOf(env.name))] = "string";
4409
+ }
4410
+ for (const env of handler.env) {
4411
+ bindings[kebabCaseToConstantCase(valueOf(env.name))] = "string";
4412
+ }
4413
+ bindings["WORKOS_ENVIRONMENT"] = "string | undefined";
4414
+ if ("visibility" in handler && handler.visibility && valueOf(handler.visibility) === "protected") {
4415
+ bindings["LM_AUTH_ALLOWED_ORIGINS"] = "string";
4416
+ bindings["LM_AUTH_ALLOWED_ISSUERS"] = "string";
4417
+ bindings["LM_PROVIDER_WORKOS_ORG_ID?"] = "string";
4418
+ bindings["LM_PROVIDER_WORKOS_CLIENT_ID?"] = "string";
4419
+ bindings["LM_PROVIDER_WORKOS_API_KEY?"] = "string";
4420
+ bindings["jwt?"] = "JWTVerifyResult";
4421
+ types.add("JWTVerifyResult");
4422
+ }
4423
+ bindings["AI"] = "Ai";
4424
+ types.add("Ai");
4425
+ bindings["annotation"] = `Annotation<Omit<MRNObject, 'type' | 'applicationName' | 'versionId'>>`;
4426
+ types.add("Annotation");
4427
+ types.add("MRNObject");
4428
+ bindings["mem"] = "KvCache";
4429
+ types.add("KvCache");
4430
+ bindings["logger"] = "Logger";
4431
+ types.add("Logger");
4432
+ bindings["tracer"] = "Tracer";
4433
+ types.add("Tracer");
4434
+ types.add("App");
4435
+ return TYPE_DEFINITIONS_TEMPLATE({
4436
+ toolName: TOOL_NAME,
4437
+ resources: Object.entries(bindings).map(([name, type]) => ({ name, type })).sort((a, b) => a.name.localeCompare(b.name)),
4438
+ imports: Array.from(types).sort()
4439
+ });
4440
+ }
4441
+ async function fileExists(path2) {
4442
+ try {
4443
+ await fs.lstat(path2);
4444
+ return true;
4445
+ } catch {
4446
+ return false;
4447
+ }
4448
+ }
4449
+ async function dirWalk(dir, visitFn, relativeBase = "") {
4450
+ const entries = await fs.readdir(dir, { withFileTypes: true });
4451
+ const tasks = entries.map(async (entry) => {
4452
+ const relativePath = relativeBase ? path.join(relativeBase, entry.name) : entry.name;
4453
+ if (entry.isDirectory()) {
4454
+ await dirWalk(path.join(dir, entry.name), visitFn, relativePath);
4455
+ } else {
4456
+ await visitFn(relativePath);
4457
+ }
4458
+ });
4459
+ const settled = await Promise.allSettled(tasks);
4460
+ if (settled.some((p) => p.status === "rejected")) {
4461
+ throw new Error("Failed to process all files");
4462
+ }
4463
+ }
4464
+ function kebabCaseToConstantCase(s) {
4465
+ return s.toUpperCase().replace(/-/g, "_");
4466
+ }
4467
+ function kebabCaseToCamelCase(s) {
4468
+ return s.replace(/-([a-z])/g, (_, c) => c.toUpperCase());
4469
+ }
4470
+ function kebabCaseToUpperCamelCase(s) {
4471
+ return kebabCaseToCamelCase(s).replace(/^[a-z]/, (c) => c.toUpperCase());
4472
+ }
4473
+
4474
+ export {
4475
+ HANDLERS_DIR,
4476
+ RAINDROP_TYPES_FILENAME,
4477
+ renderCodegenPlan,
4478
+ codegenPlan,
4479
+ gatherEnvForHandler,
4480
+ fileExists
4481
+ };