@picked/client 0.0.1-dev.1764632196476 → 0.0.1-dev.1764633009920

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 (29) hide show
  1. package/dist/cjs/index.js +1 -1
  2. package/dist/cjs/plugins/create-experience/index.js +1 -1
  3. package/dist/cjs/plugins/experience-browser-storage/index.js +1 -1
  4. package/dist/cjs/plugins/history-browser-storage/index.js +1 -1
  5. package/dist/cjs/plugins/responses-browser-storage/index.js +1 -1
  6. package/dist/cjs/plugins/responses-indexeddb/index.js +1 -1
  7. package/dist/cjs/server/index.js +1 -1
  8. package/dist/esm/index.js +441 -460
  9. package/dist/esm/plugins/create-experience/index.js +121 -123
  10. package/dist/esm/plugins/experience-browser-storage/index.js +1 -1
  11. package/dist/esm/plugins/history-browser-storage/index.js +8 -8
  12. package/dist/esm/plugins/responses-browser-storage/index.js +6 -6
  13. package/dist/esm/plugins/responses-indexeddb/index.js +1 -1
  14. package/dist/esm/server/index.js +1 -1
  15. package/dist/{experience-instance-DjjpHk0t.cjs → experience-instance-BpQMqclI.cjs} +1 -1
  16. package/dist/{experience-instance-C4INDX6a.js → experience-instance-CMrX6QA2.js} +1 -1
  17. package/dist/types/client.d.ts +0 -31
  18. package/dist/types/client.d.ts.map +1 -1
  19. package/dist/types/entities/experience/experience.d.ts +1 -3
  20. package/dist/types/entities/experience/experience.d.ts.map +1 -1
  21. package/dist/types/picked.d.ts +9 -12
  22. package/dist/types/picked.d.ts.map +1 -1
  23. package/dist/types/plugins/create-experience/create-experience.d.ts +1 -5
  24. package/dist/types/plugins/create-experience/create-experience.d.ts.map +1 -1
  25. package/dist/types/utils/events.d.ts +7 -10
  26. package/dist/types/utils/events.d.ts.map +1 -1
  27. package/dist/types/utils/user-session.d.ts +0 -2
  28. package/dist/types/utils/user-session.d.ts.map +1 -1
  29. package/package.json +1 -1
@@ -1,73 +1,73 @@
1
1
  import { g as p } from "../../../id-BW-g3y32.js";
2
- const r = {
2
+ const a = {
3
3
  serialize(i) {
4
4
  return JSON.stringify(i);
5
5
  },
6
6
  deserialize(i) {
7
7
  return JSON.parse(i);
8
8
  }
9
- }, v = (i) => ({
9
+ }, x = (i) => ({
10
10
  name: "create-experience",
11
- setup: (o) => {
12
- i.experiences.forEach((d) => {
13
- const s = d.serialize(), n = r.deserialize(s);
14
- n.component = d.component, o.registerExperience(n), n.fields.forEach((f) => {
15
- o.registerField(f);
11
+ setup: (d) => {
12
+ i.experiences.forEach((l) => {
13
+ const s = l.serialize(), o = a.deserialize(s);
14
+ o.component = l.component, d.registerExperience(o), o.fields.forEach((f) => {
15
+ d.registerField(f);
16
16
  });
17
17
  });
18
18
  }
19
- }), g = (i, o) => ({
19
+ }), m = (i, d) => ({
20
20
  id: p("node"),
21
21
  position: [0, 0],
22
- experience: o,
22
+ experience: d,
23
23
  type: "action",
24
24
  action: i.action,
25
25
  addNext(s) {
26
26
  if (!s.node) throw new Error("Cannot connect to node");
27
- const n = c(
27
+ const o = c(
28
28
  { sourceNode: this, destinationNode: s.node, sourceNodeHandle: null },
29
- o
29
+ d
30
30
  );
31
- o.edges.push(n);
31
+ d.edges.push(o);
32
32
  },
33
33
  onSuccess(s) {
34
34
  if (!s.node) throw new Error("Cannot connect to node");
35
- const n = c(
35
+ const o = c(
36
36
  { sourceNode: this, destinationNode: s.node, sourceNodeHandle: "true" },
37
- o
37
+ d
38
38
  );
39
- o.edges.push(n);
39
+ d.edges.push(o);
40
40
  },
41
41
  onFail(s) {
42
42
  if (!s.node) throw new Error("Cannot connect to node");
43
- const n = c(
43
+ const o = c(
44
44
  { sourceNode: this, destinationNode: s.node, sourceNodeHandle: "false" },
45
- o
45
+ d
46
46
  );
47
- o.edges.push(n);
47
+ d.edges.push(o);
48
48
  },
49
49
  serialize() {
50
- return r.serialize({
50
+ return a.serialize({
51
51
  id: this.id,
52
52
  type: this.type,
53
53
  action: this.action,
54
54
  position: this.position
55
55
  });
56
56
  }
57
- }), E = (i) => ({
57
+ }), v = (i) => ({
58
58
  id: i.id ?? p("step"),
59
59
  label: i.label,
60
60
  fields: i.fields ?? [],
61
- addField(o) {
62
- var s, n;
63
- const d = "serialize" in o ? o : m(o);
64
- return (s = this.fields) != null && s.includes(d) || (n = this.fields) == null || n.push(d), d;
61
+ addField(d) {
62
+ var s, o;
63
+ const l = "serialize" in d ? d : N(d);
64
+ return (s = this.fields) != null && s.includes(l) || (o = this.fields) == null || o.push(l), l;
65
65
  }
66
- }), y = (i, o) => {
67
- const d = {
66
+ }), g = (i, d) => {
67
+ const l = {
68
68
  id: i.id ?? p("step"),
69
69
  label: i.label,
70
- experience: o,
70
+ experience: d,
71
71
  fields: i.fields ?? [],
72
72
  node: null,
73
73
  nextStep(s) {
@@ -83,27 +83,27 @@ const r = {
83
83
  return this.experience.addField(s, this);
84
84
  },
85
85
  serialize() {
86
- return r.serialize({
86
+ return a.serialize({
87
87
  id: this.id,
88
88
  label: this.label,
89
89
  fieldIds: this.fields.map((s) => s.id)
90
90
  });
91
91
  }
92
92
  };
93
- return h({ step: d, type: "step" }, o), d;
94
- }, z = () => [0, 0], h = (i, o) => {
95
- const d = {
93
+ return h({ step: l, type: "step" }, d), l;
94
+ }, y = () => [0, 0], h = (i, d) => {
95
+ const l = {
96
96
  id: p("node"),
97
- position: z(),
98
- experience: o
97
+ position: y(),
98
+ experience: d
99
99
  };
100
100
  if (i.type === "step") {
101
- const n = {
102
- ...d,
101
+ const o = {
102
+ ...l,
103
103
  type: "step",
104
104
  connectedStep: i.step,
105
105
  serialize() {
106
- return r.serialize({
106
+ return a.serialize({
107
107
  id: this.id,
108
108
  type: this.type,
109
109
  stepId: this.connectedStep.id,
@@ -112,15 +112,15 @@ const r = {
112
112
  });
113
113
  }
114
114
  };
115
- return n.connectedStep.node = n, n;
115
+ return o.connectedStep.node = o, o;
116
116
  }
117
117
  if (i.type === "conditional") {
118
- const n = {
119
- ...d,
118
+ const o = {
119
+ ...l,
120
120
  type: "conditional",
121
121
  connectedConditional: i.conditional,
122
122
  serialize() {
123
- return r.serialize({
123
+ return a.serialize({
124
124
  id: this.id,
125
125
  type: this.type,
126
126
  conditionalId: this.connectedConditional.id,
@@ -128,14 +128,14 @@ const r = {
128
128
  });
129
129
  }
130
130
  };
131
- return n.connectedConditional.node = n, n;
131
+ return o.connectedConditional.node = o, o;
132
132
  }
133
133
  return i.type === "experience" ? {
134
- ...d,
134
+ ...l,
135
135
  type: "experience",
136
136
  connectedExperience: i.experience,
137
137
  serialize() {
138
- return r.serialize({
138
+ return a.serialize({
139
139
  id: this.id,
140
140
  type: this.type,
141
141
  experienceId: this.connectedExperience.id,
@@ -143,64 +143,64 @@ const r = {
143
143
  });
144
144
  }
145
145
  } : {
146
- ...d,
146
+ ...l,
147
147
  type: "origin",
148
148
  serialize() {
149
- return r.serialize({
149
+ return a.serialize({
150
150
  id: this.id,
151
151
  type: this.type,
152
152
  position: this.position
153
153
  });
154
154
  }
155
155
  };
156
- }, c = (i, o) => ({
156
+ }, c = (i, d) => ({
157
157
  id: p("edge"),
158
158
  sourceNode: i.sourceNode,
159
159
  sourceNodeHandle: i.sourceNodeHandle,
160
160
  destinationNode: i.destinationNode,
161
- experience: o,
161
+ experience: d,
162
162
  serialize() {
163
- return r.serialize({
163
+ return a.serialize({
164
164
  id: this.id,
165
165
  sourceNodeHandle: this.sourceNodeHandle ?? void 0,
166
166
  sourceNodeId: this.sourceNode.id,
167
167
  destinationNodeId: this.destinationNode.id
168
168
  });
169
169
  }
170
- }), b = (i, o) => {
171
- const d = {
170
+ }), z = (i, d) => {
171
+ const l = {
172
172
  id: p("conditional"),
173
173
  condition: i.condition,
174
174
  node: null,
175
- experience: o,
175
+ experience: d,
176
176
  addTrue(s) {
177
177
  if (!this.node || !s.node)
178
178
  throw new Error("todo no node");
179
- const n = c(
179
+ const o = c(
180
180
  { sourceNode: this.node, destinationNode: s.node, sourceNodeHandle: "true" },
181
181
  this.experience
182
182
  );
183
- this.experience.edges.push(n);
183
+ this.experience.edges.push(o);
184
184
  },
185
185
  addFalse(s) {
186
186
  if (!this.node || !s.node)
187
187
  throw new Error("todo no node");
188
- const n = c(
188
+ const o = c(
189
189
  { sourceNode: this.node, destinationNode: s.node, sourceNodeHandle: "false" },
190
190
  this.experience
191
191
  );
192
- this.experience.edges.push(n);
192
+ this.experience.edges.push(o);
193
193
  },
194
194
  serialize() {
195
- return r.serialize({
195
+ return a.serialize({
196
196
  id: this.id,
197
197
  condition: this.condition
198
198
  });
199
199
  }
200
200
  };
201
- return h({ conditional: d, type: "conditional" }, o), d;
202
- }, m = (i) => {
203
- var d;
201
+ return h({ conditional: l, type: "conditional" }, d), l;
202
+ }, N = (i) => {
203
+ var l;
204
204
  return {
205
205
  id: i.id,
206
206
  name: i.name,
@@ -214,7 +214,7 @@ const r = {
214
214
  validation: i.validation ?? {},
215
215
  condition: i.condition,
216
216
  required: i.required,
217
- options: ((d = i.options) == null ? void 0 : d.map((s) => ({
217
+ options: ((l = i.options) == null ? void 0 : l.map((s) => ({
218
218
  ...s
219
219
  }))) ?? null,
220
220
  policies: i.policies,
@@ -230,7 +230,7 @@ const r = {
230
230
  validation: this.validation,
231
231
  condition: this.condition,
232
232
  policies: this.policies
233
- }, n = typeof this.defaultValue == "string" ? this.defaultValue : void 0, f = typeof this.defaultValue == "number" ? this.defaultValue : void 0, N = typeof this.defaultValue == "boolean" ? this.defaultValue : void 0;
233
+ }, o = typeof this.defaultValue == "string" ? this.defaultValue : void 0, f = typeof this.defaultValue == "number" ? this.defaultValue : void 0, n = typeof this.defaultValue == "boolean" ? this.defaultValue : void 0;
234
234
  switch (this.type) {
235
235
  case "text":
236
236
  if (this.multiple) {
@@ -241,7 +241,7 @@ const r = {
241
241
  typeof t == "string" && e.push(t);
242
242
  e.length === 0 && (e = void 0);
243
243
  }
244
- return r.serialize({
244
+ return a.serialize({
245
245
  ...s,
246
246
  type: "text",
247
247
  multiple: !0,
@@ -254,11 +254,11 @@ const r = {
254
254
  })) : null
255
255
  });
256
256
  }
257
- return r.serialize({
257
+ return a.serialize({
258
258
  ...s,
259
259
  type: "text",
260
260
  multiple: !1,
261
- defaultValue: n,
261
+ defaultValue: o,
262
262
  options: this.options ? this.options.map((e) => ({
263
263
  id: e.id,
264
264
  label: e.label,
@@ -275,7 +275,7 @@ const r = {
275
275
  typeof t == "number" && e.push(t);
276
276
  e.length === 0 && (e = void 0);
277
277
  }
278
- return r.serialize({
278
+ return a.serialize({
279
279
  ...s,
280
280
  type: "number",
281
281
  multiple: !0,
@@ -288,7 +288,7 @@ const r = {
288
288
  })) : null
289
289
  });
290
290
  }
291
- return r.serialize({
291
+ return a.serialize({
292
292
  ...s,
293
293
  type: "number",
294
294
  multiple: !1,
@@ -309,7 +309,7 @@ const r = {
309
309
  typeof t == "boolean" && e.push(t);
310
310
  e.length === 0 && (e = void 0);
311
311
  }
312
- return r.serialize({
312
+ return a.serialize({
313
313
  ...s,
314
314
  type: "boolean",
315
315
  multiple: !0,
@@ -322,11 +322,11 @@ const r = {
322
322
  })) : null
323
323
  });
324
324
  }
325
- return r.serialize({
325
+ return a.serialize({
326
326
  ...s,
327
327
  type: "boolean",
328
328
  multiple: !1,
329
- defaultValue: N,
329
+ defaultValue: n,
330
330
  options: this.options ? this.options.map((e) => ({
331
331
  id: e.id,
332
332
  label: e.label,
@@ -357,113 +357,111 @@ const r = {
357
357
  }
358
358
  }
359
359
  };
360
- }, V = (i) => {
361
- const o = [], d = [], s = [], n = [], f = [], N = i.condition ?? i.decide;
360
+ }, E = (i) => {
361
+ const d = [], l = [], s = [], o = [], f = [];
362
362
  return {
363
363
  id: i.id,
364
364
  component: i.component,
365
365
  name: i.name,
366
366
  initializeOpen: i.initializeOpen,
367
- condition: N,
368
367
  decide: i.decide,
369
368
  targets: i.targets,
370
- steps: o,
371
- nodes: d,
369
+ steps: d,
370
+ nodes: l,
372
371
  edges: s,
373
372
  fields: f,
374
- conditionals: n,
375
- addStep(e, t) {
376
- let l = t == null ? void 0 : t.node;
377
- this.nodes.length === 0 && (l = h({ type: "origin" }, this), this.nodes.push(l));
378
- const a = "serialize" in e ? e : y(e, this);
379
- if (l) {
380
- if (!a.node)
373
+ conditionals: o,
374
+ addStep(n, e) {
375
+ let t = e == null ? void 0 : e.node;
376
+ this.nodes.length === 0 && (t = h({ type: "origin" }, this), this.nodes.push(t));
377
+ const r = "serialize" in n ? n : g(n, this);
378
+ if (t) {
379
+ if (!r.node)
381
380
  throw new Error("todo no node");
382
381
  const u = c(
383
- { sourceNode: l, destinationNode: a.node, sourceNodeHandle: null },
382
+ { sourceNode: t, destinationNode: r.node, sourceNodeHandle: null },
384
383
  this
385
384
  );
386
385
  this.edges.push(u);
387
386
  }
388
- return a.fields.length > 0 && a.fields.forEach((u) => {
387
+ return r.fields.length > 0 && r.fields.forEach((u) => {
389
388
  this.fields.includes(u) || this.fields.push(u);
390
- }), this.steps.includes(a) || (this.steps.push(a), a.node && this.nodes.push(a.node)), a;
389
+ }), this.steps.includes(r) || (this.steps.push(r), r.node && this.nodes.push(r.node)), r;
391
390
  },
392
- addAction(e, t) {
393
- let l = t == null ? void 0 : t.node;
394
- this.nodes.length === 0 && (l = h({ type: "origin" }, this), this.nodes.push(l));
395
- const a = "serialize" in e ? e : g(e, this);
396
- if (l) {
391
+ addAction(n, e) {
392
+ let t = e == null ? void 0 : e.node;
393
+ this.nodes.length === 0 && (t = h({ type: "origin" }, this), this.nodes.push(t));
394
+ const r = "serialize" in n ? n : m(n, this);
395
+ if (t) {
397
396
  const u = c(
398
- { sourceNode: l, destinationNode: a, sourceNodeHandle: null },
397
+ { sourceNode: t, destinationNode: r, sourceNodeHandle: null },
399
398
  this
400
399
  );
401
400
  this.edges.push(u);
402
401
  }
403
- return this.nodes.push(a), a;
402
+ return this.nodes.push(r), r;
404
403
  },
405
- addConditional(e, t) {
406
- let l = t == null ? void 0 : t.node;
407
- this.nodes.length === 0 && (l = h({ type: "origin" }, this), this.nodes.push(l));
408
- const a = "serialize" in e ? e : b(e, this);
409
- if (l) {
410
- if (!a.node)
404
+ addConditional(n, e) {
405
+ let t = e == null ? void 0 : e.node;
406
+ this.nodes.length === 0 && (t = h({ type: "origin" }, this), this.nodes.push(t));
407
+ const r = "serialize" in n ? n : z(n, this);
408
+ if (t) {
409
+ if (!r.node)
411
410
  throw new Error("todo no node");
412
411
  const u = c(
413
- { sourceNode: l, destinationNode: a.node, sourceNodeHandle: null },
412
+ { sourceNode: t, destinationNode: r.node, sourceNodeHandle: null },
414
413
  this
415
414
  );
416
415
  this.edges.push(u);
417
416
  }
418
- return this.conditionals.includes(a) || (this.conditionals.push(a), a.node && this.nodes.push(a.node)), a;
417
+ return this.conditionals.includes(r) || (this.conditionals.push(r), r.node && this.nodes.push(r.node)), r;
419
418
  },
420
- addExperience(e, t) {
421
- let l = t == null ? void 0 : t.node;
422
- this.nodes.length === 0 && (l = h({ type: "origin" }, this), this.nodes.push(l));
423
- const a = h(
424
- { type: "experience", experience: e },
419
+ addExperience(n, e) {
420
+ let t = e == null ? void 0 : e.node;
421
+ this.nodes.length === 0 && (t = h({ type: "origin" }, this), this.nodes.push(t));
422
+ const r = h(
423
+ { type: "experience", experience: n },
425
424
  this
426
425
  );
427
- if (this.nodes.push(a), l) {
426
+ if (this.nodes.push(r), t) {
428
427
  const u = c(
429
- { sourceNode: l, destinationNode: a, sourceNodeHandle: null },
428
+ { sourceNode: t, destinationNode: r, sourceNodeHandle: null },
430
429
  this
431
430
  );
432
431
  this.edges.push(u);
433
432
  }
434
- return e;
433
+ return n;
435
434
  },
436
- addField(e, t) {
437
- const l = "serialize" in e ? e : m(e);
438
- return t && t.fields.push(l), this.fields.includes(l) || this.fields.push(l), l;
435
+ addField(n, e) {
436
+ const t = "serialize" in n ? n : N(n);
437
+ return e && e.fields.push(t), this.fields.includes(t) || this.fields.push(t), t;
439
438
  },
440
439
  serialize() {
441
- return r.serialize({
440
+ return a.serialize({
442
441
  id: this.id,
443
442
  component: this.component,
444
443
  name: this.name,
445
444
  initializeOpen: this.initializeOpen,
446
- condition: this.condition ?? this.decide,
447
445
  decide: this.decide,
448
446
  targets: this.targets,
449
- steps: this.steps.map((e) => r.deserialize(e.serialize())),
450
- nodes: this.nodes.map((e) => r.deserialize(e.serialize())),
451
- edges: this.edges.map((e) => r.deserialize(e.serialize())),
447
+ steps: this.steps.map((n) => a.deserialize(n.serialize())),
448
+ nodes: this.nodes.map((n) => a.deserialize(n.serialize())),
449
+ edges: this.edges.map((n) => a.deserialize(n.serialize())),
452
450
  conditionals: this.conditionals.map(
453
- (e) => r.deserialize(e.serialize())
451
+ (n) => a.deserialize(n.serialize())
454
452
  ),
455
- fields: this.fields.map((e) => r.deserialize(e.serialize()))
453
+ fields: this.fields.map((n) => a.deserialize(n.serialize()))
456
454
  });
457
455
  }
458
456
  };
459
457
  };
460
458
  export {
461
- b as createConditional,
459
+ z as createConditional,
462
460
  c as createEdge,
463
- V as createExperience,
464
- v as createExperiencePlugin,
465
- m as createField,
461
+ E as createExperience,
462
+ x as createExperiencePlugin,
463
+ N as createField,
466
464
  h as createNode,
467
- E as createStep,
468
- r as serialization
465
+ v as createStep,
466
+ a as serialization
469
467
  };
@@ -16,7 +16,7 @@ const y = ({
16
16
  });
17
17
  i({
18
18
  source: n.eventBus,
19
- filter: (e) => e.type === "experience_initialize" && "experienceInstance" in e,
19
+ filter: (e) => e.type === "experience_initialized" && "experienceInstance" in e,
20
20
  // @ts-ignore todo
21
21
  fn: (e) => e.experienceInstance,
22
22
  target: p
@@ -4,19 +4,19 @@ const a = l("history", "global"), f = ({
4
4
  storage: i = "local"
5
5
  } = {}) => ({
6
6
  name: "history-browser-storage-plugin",
7
- setup: (o) => {
8
- const e = i === "local" ? y : g, n = s(async () => {
9
- const t = e.get(a).json();
10
- t && o.history.restore({ entries: t });
7
+ setup: (e) => {
8
+ const o = i === "local" ? y : g, n = s(async () => {
9
+ const t = o.get(a).json();
10
+ t && e.history.restore({ entries: t });
11
11
  }), c = s(async (t) => {
12
- e.set(a, t);
12
+ o.set(a, t);
13
13
  });
14
14
  r({
15
- source: o.eventBus,
16
- filter: (t) => t.type === "load",
15
+ source: e.eventBus,
16
+ filter: (t) => t.type === "initialized",
17
17
  target: n
18
18
  }), r({
19
- source: o.history.entriesStore,
19
+ source: e.history.entriesStore,
20
20
  target: c
21
21
  });
22
22
  }
@@ -9,26 +9,26 @@ const p = b("responses", "global"), y = ({
9
9
  const s = n.get(p).json();
10
10
  if (!s)
11
11
  return null;
12
- Object.entries(s).forEach(([r, o]) => {
13
- e.responses.register(r, o);
12
+ Object.entries(s).forEach(([t, o]) => {
13
+ e.responses.register(t, o);
14
14
  });
15
15
  }), f = m({
16
16
  source: {
17
17
  responses: e.responses.getAllStore,
18
18
  fields: e.fields.listStore
19
19
  },
20
- effect: ({ responses: s, fields: r }) => {
20
+ effect: ({ responses: s, fields: t }) => {
21
21
  const o = {};
22
22
  Object.entries(s).forEach(([a, g]) => {
23
23
  var c;
24
- const t = r.find((S) => S.id === a);
25
- !((c = t == null ? void 0 : t.policies) != null && c.doNotStoreValue) && (o[a] = g);
24
+ const r = t.find((S) => S.id === a);
25
+ !((c = r == null ? void 0 : r.policies) != null && c.doNotStoreValue) && (o[a] = g);
26
26
  }), n.set(p, o);
27
27
  }
28
28
  });
29
29
  l({
30
30
  source: e.eventBus,
31
- filter: (s) => s.type === "load",
31
+ filter: (s) => s.type === "initialized",
32
32
  target: u
33
33
  }), l({
34
34
  source: e.responses.getAllStore,
@@ -77,7 +77,7 @@ const u = "responses", w = { storeName: u, keyPath: "fieldId" }, I = () => ({
77
77
  });
78
78
  p({
79
79
  source: r.eventBus,
80
- filter: (t) => t.type === "load",
80
+ filter: (t) => t.type === "initialized",
81
81
  target: o
82
82
  }), p({
83
83
  clock: r.responses.listStore,
@@ -1,5 +1,5 @@
1
1
  import { createEvent as i, createStore as v, createEffect as C, sample as n, attach as S } from "effector";
2
- import { h as F } from "../../experience-instance-C4INDX6a.js";
2
+ import { h as F } from "../../experience-instance-CMrX6QA2.js";
3
3
  function R() {
4
4
  let c, p;
5
5
  return {