@fluentui-copilot/react-prompt-starter 0.0.0-nightly-20251010-0406-7df7c6d1.1 → 0.0.0-nightly-20251013-0406-7c7739c8.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 (116) hide show
  1. package/CHANGELOG.json +3 -3
  2. package/CHANGELOG.md +4 -4
  3. package/dist/index.d.ts +164 -0
  4. package/lib/PromptStarter.js +1 -0
  5. package/lib/PromptStarter.js.map +1 -0
  6. package/lib/PromptStarterList.js +1 -0
  7. package/lib/PromptStarterList.js.map +1 -0
  8. package/lib/PromptStarterV2.js +1 -0
  9. package/lib/PromptStarterV2.js.map +1 -0
  10. package/lib/components/PromptStarter/PromptStarter.js +12 -0
  11. package/lib/components/PromptStarter/PromptStarter.js.map +1 -0
  12. package/lib/components/PromptStarter/PromptStarter.types.js +3 -0
  13. package/lib/components/PromptStarter/PromptStarter.types.js.map +1 -0
  14. package/lib/components/PromptStarter/index.js +4 -0
  15. package/lib/components/PromptStarter/index.js.map +1 -0
  16. package/lib/components/PromptStarter/renderPromptStarter.js +18 -0
  17. package/lib/components/PromptStarter/renderPromptStarter.js.map +1 -0
  18. package/lib/components/PromptStarter/usePromptStarter.js +53 -0
  19. package/lib/components/PromptStarter/usePromptStarter.js.map +1 -0
  20. package/lib/components/PromptStarter/usePromptStarterStyles.styles.js +138 -0
  21. package/lib/components/PromptStarter/usePromptStarterStyles.styles.js.map +1 -0
  22. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js +94 -0
  23. package/lib/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  24. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js +12 -0
  25. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -0
  26. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +3 -0
  27. package/lib/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -0
  28. package/lib/components/PromptStarterV2/PromptStarter/index.js +4 -0
  29. package/lib/components/PromptStarterV2/PromptStarter/index.js.map +1 -0
  30. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +63 -0
  31. package/lib/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
  32. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +18 -0
  33. package/lib/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -0
  34. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js +73 -0
  35. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -0
  36. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +338 -0
  37. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -0
  38. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +160 -0
  39. package/lib/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  40. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +12 -0
  41. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
  42. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +1 -0
  43. package/lib/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
  44. package/lib/components/PromptStarterV2/PromptStarterList/index.js +4 -0
  45. package/lib/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
  46. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +22 -0
  47. package/lib/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
  48. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +117 -0
  49. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
  50. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +6 -0
  51. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
  52. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +83 -0
  53. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
  54. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +73 -0
  55. package/lib/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -0
  56. package/lib/contexts/PromptStarterListContext.js +7 -0
  57. package/lib/contexts/PromptStarterListContext.js.map +1 -0
  58. package/lib/index.js +3 -0
  59. package/lib/index.js.map +1 -0
  60. package/lib-commonjs/PromptStarter.js +28 -0
  61. package/lib-commonjs/PromptStarter.js.map +1 -0
  62. package/lib-commonjs/PromptStarterList.js +28 -0
  63. package/lib-commonjs/PromptStarterList.js.map +1 -0
  64. package/lib-commonjs/PromptStarterV2.js +28 -0
  65. package/lib-commonjs/PromptStarterV2.js.map +1 -0
  66. package/lib-commonjs/components/PromptStarter/PromptStarter.js +23 -0
  67. package/lib-commonjs/components/PromptStarter/PromptStarter.js.map +1 -0
  68. package/lib-commonjs/components/PromptStarter/PromptStarter.types.js +6 -0
  69. package/lib-commonjs/components/PromptStarter/PromptStarter.types.js.map +1 -0
  70. package/lib-commonjs/components/PromptStarter/index.js +31 -0
  71. package/lib-commonjs/components/PromptStarter/index.js.map +1 -0
  72. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js +28 -0
  73. package/lib-commonjs/components/PromptStarter/renderPromptStarter.js.map +1 -0
  74. package/lib-commonjs/components/PromptStarter/usePromptStarter.js +55 -0
  75. package/lib-commonjs/components/PromptStarter/usePromptStarter.js.map +1 -0
  76. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.js +292 -0
  77. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.js.map +1 -0
  78. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js +112 -0
  79. package/lib-commonjs/components/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  80. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js +23 -0
  81. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.js.map +1 -0
  82. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js +6 -0
  83. package/lib-commonjs/components/PromptStarterV2/PromptStarter/PromptStarter.types.js.map +1 -0
  84. package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js +31 -0
  85. package/lib-commonjs/components/PromptStarterV2/PromptStarter/index.js.map +1 -0
  86. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js +73 -0
  87. package/lib-commonjs/components/PromptStarterV2/PromptStarter/promptStarterMotion.js.map +1 -0
  88. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js +28 -0
  89. package/lib-commonjs/components/PromptStarterV2/PromptStarter/renderPromptStarter.js.map +1 -0
  90. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js +75 -0
  91. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarter.js.map +1 -0
  92. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js +620 -0
  93. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.js.map +1 -0
  94. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js +178 -0
  95. package/lib-commonjs/components/PromptStarterV2/PromptStarter/usePromptStarterStyles.styles.raw.js.map +1 -0
  96. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js +23 -0
  97. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.js.map +1 -0
  98. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js +4 -0
  99. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/PromptStarterList.types.js.map +1 -0
  100. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js +31 -0
  101. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/index.js.map +1 -0
  102. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js +30 -0
  103. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/renderPromptStarterList.js.map +1 -0
  104. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js +120 -0
  105. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterList.js.map +1 -0
  106. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js +16 -0
  107. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListContextValues.js.map +1 -0
  108. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js +126 -0
  109. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.js.map +1 -0
  110. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js +89 -0
  111. package/lib-commonjs/components/PromptStarterV2/PromptStarterList/usePromptStarterListStyles.styles.raw.js.map +1 -0
  112. package/lib-commonjs/contexts/PromptStarterListContext.js +28 -0
  113. package/lib-commonjs/contexts/PromptStarterListContext.js.map +1 -0
  114. package/lib-commonjs/index.js +60 -0
  115. package/lib-commonjs/index.js.map +1 -0
  116. package/package.json +3 -3
@@ -0,0 +1,112 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ promptStarterClassNames: function() {
13
+ return promptStarterClassNames;
14
+ },
15
+ usePromptStarterStyles_unstable: function() {
16
+ return usePromptStarterStyles_unstable;
17
+ }
18
+ });
19
+ const _reactcomponents = require("@fluentui/react-components");
20
+ const _tokens = require("@fluentui-copilot/tokens");
21
+ const promptStarterClassNames = {
22
+ root: 'fai-PromptStarter',
23
+ category: 'fai-PromptStarter__category',
24
+ icon: 'fai-PromptStarter__icon',
25
+ prompt: 'fai-PromptStarter__prompt',
26
+ badge: 'fai-PromptStarter__badge'
27
+ };
28
+ const useRootResetStyles = (0, _reactcomponents.makeResetStyles)({
29
+ position: 'relative',
30
+ display: 'grid',
31
+ gridTemplateColumns: 'auto 1fr',
32
+ gridTemplateRows: 'auto auto',
33
+ gridTemplateAreas: `
34
+ "icon category"
35
+ ". prompt"
36
+ `,
37
+ backgroundColor: _tokens.tokens.colorNeutralBackground1,
38
+ color: _tokens.tokens.colorNeutralForeground1,
39
+ fontFamily: _tokens.tokens.fontFamilyBase,
40
+ cursor: 'pointer',
41
+ outlineStyle: 'none',
42
+ textAlign: 'left',
43
+ gap: '0px 8px',
44
+ padding: '6px 8px 8px 8px',
45
+ ..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStroke1),
46
+ borderRadius: _tokens.tokens.borderRadiusMedium,
47
+ '&:hover': {
48
+ backgroundColor: _tokens.tokens.colorNeutralBackground1Hover,
49
+ ..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStroke1Hover)
50
+ },
51
+ '&:active': {
52
+ backgroundColor: _tokens.tokens.colorNeutralBackground1Pressed,
53
+ ..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStroke1Pressed)
54
+ },
55
+ ...(0, _reactcomponents.createFocusOutlineStyle)()
56
+ });
57
+ const useStyles = (0, _reactcomponents.makeStyles)({
58
+ disabled: {
59
+ cursor: 'not-allowed',
60
+ backgroundColor: _tokens.tokens.colorNeutralBackgroundDisabled,
61
+ ..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStrokeDisabled),
62
+ '&:hover': {
63
+ backgroundColor: _tokens.tokens.colorNeutralBackgroundDisabled,
64
+ ..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStrokeDisabled)
65
+ },
66
+ '&:active': {
67
+ backgroundColor: _tokens.tokens.colorNeutralBackgroundDisabled,
68
+ ..._reactcomponents.shorthands.border(_tokens.tokens.strokeWidthThin, 'solid', _tokens.tokens.colorNeutralStrokeDisabled)
69
+ }
70
+ },
71
+ icon: {
72
+ gridArea: 'icon',
73
+ display: 'flex',
74
+ alignSelf: 'center'
75
+ },
76
+ category: {
77
+ ..._reactcomponents.typographyStyles.body1Strong,
78
+ gridArea: 'category'
79
+ },
80
+ prompt: {
81
+ ..._reactcomponents.typographyStyles.body1,
82
+ gridArea: 'prompt'
83
+ },
84
+ disabledText: {
85
+ color: _tokens.tokens.colorNeutralForegroundDisabled
86
+ },
87
+ disabledBadge: {
88
+ opacity: '40%'
89
+ }
90
+ });
91
+ const useNextStyles = (0, _reactcomponents.makeStyles)({
92
+ root: {
93
+ borderRadius: _tokens.tokens.borderRadiusXLarge
94
+ }
95
+ });
96
+ const usePromptStarterStyles_unstable = (state)=>{
97
+ 'use no memo';
98
+ const { designVersion } = state;
99
+ const styles = useStyles();
100
+ const nextStyles = useNextStyles();
101
+ const rootResetStyles = useRootResetStyles();
102
+ state.root.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.root, rootResetStyles, designVersion === 'next' && nextStyles.root, state.root.disabled && styles.disabled, state.root.className);
103
+ state.icon.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.icon, styles.icon, state.root.disabled && styles.disabledText, state.icon.className);
104
+ state.category.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.category, styles.category, state.category.className, state.root.disabled && styles.disabledText);
105
+ if (state.prompt) {
106
+ state.prompt.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.prompt, styles.prompt, state.root.disabled && styles.disabledText, state.prompt.className);
107
+ }
108
+ if (state.badge) {
109
+ state.badge.className = (0, _reactcomponents.mergeClasses)(promptStarterClassNames.badge, state.root.disabled && styles.disabledBadge, state.badge.className);
110
+ }
111
+ return state;
112
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["usePromptStarterStyles.styles.ts"],"sourcesContent":["import {\n makeStyles,\n makeResetStyles,\n mergeClasses,\n shorthands,\n typographyStyles,\n createFocusOutlineStyle,\n} from '@fluentui/react-components';\nimport { tokens } from '@fluentui-copilot/tokens';\nimport type { PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nimport type { SlotClassNames } from '@fluentui/react-components';\n\nexport const promptStarterClassNames: SlotClassNames<PromptStarterSlots> = {\n root: 'fai-PromptStarter',\n category: 'fai-PromptStarter__category',\n icon: 'fai-PromptStarter__icon',\n prompt: 'fai-PromptStarter__prompt',\n badge: 'fai-PromptStarter__badge',\n};\n\nconst useRootResetStyles = makeResetStyles({\n position: 'relative',\n display: 'grid',\n gridTemplateColumns: 'auto 1fr',\n gridTemplateRows: 'auto auto',\n gridTemplateAreas: `\n \"icon category\"\n \". prompt\"\n `,\n backgroundColor: tokens.colorNeutralBackground1,\n color: tokens.colorNeutralForeground1,\n fontFamily: tokens.fontFamilyBase,\n cursor: 'pointer',\n outlineStyle: 'none',\n textAlign: 'left',\n gap: '0px 8px',\n padding: '6px 8px 8px 8px',\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1),\n borderRadius: tokens.borderRadiusMedium,\n '&:hover': {\n backgroundColor: tokens.colorNeutralBackground1Hover,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Hover),\n },\n '&:active': {\n backgroundColor: tokens.colorNeutralBackground1Pressed,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStroke1Pressed),\n },\n ...createFocusOutlineStyle(),\n});\n\nconst useStyles = makeStyles({\n disabled: {\n cursor: 'not-allowed',\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n '&:hover': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n },\n '&:active': {\n backgroundColor: tokens.colorNeutralBackgroundDisabled,\n ...shorthands.border(tokens.strokeWidthThin, 'solid', tokens.colorNeutralStrokeDisabled),\n },\n },\n icon: { gridArea: 'icon', display: 'flex', alignSelf: 'center' },\n\n category: {\n ...typographyStyles.body1Strong,\n gridArea: 'category',\n },\n prompt: { ...typographyStyles.body1, gridArea: 'prompt' },\n disabledText: {\n color: tokens.colorNeutralForegroundDisabled,\n },\n disabledBadge: {\n opacity: '40%',\n },\n});\n\nconst useNextStyles = makeStyles({ root: { borderRadius: tokens.borderRadiusXLarge } });\n\nexport const usePromptStarterStyles_unstable = (state: PromptStarterState): PromptStarterState => {\n 'use no memo';\n\n const { designVersion } = state;\n\n const styles = useStyles();\n const nextStyles = useNextStyles();\n const rootResetStyles = useRootResetStyles();\n state.root.className = mergeClasses(\n promptStarterClassNames.root,\n rootResetStyles,\n designVersion === 'next' && nextStyles.root,\n state.root.disabled && styles.disabled,\n state.root.className,\n );\n state.icon.className = mergeClasses(\n promptStarterClassNames.icon,\n styles.icon,\n state.root.disabled && styles.disabledText,\n state.icon.className,\n );\n state.category.className = mergeClasses(\n promptStarterClassNames.category,\n styles.category,\n state.category.className,\n state.root.disabled && styles.disabledText,\n );\n if (state.prompt) {\n state.prompt.className = mergeClasses(\n promptStarterClassNames.prompt,\n styles.prompt,\n state.root.disabled && styles.disabledText,\n state.prompt.className,\n );\n }\n if (state.badge) {\n state.badge.className = mergeClasses(\n promptStarterClassNames.badge,\n state.root.disabled && styles.disabledBadge,\n state.badge.className,\n );\n }\n\n return state;\n};\n"],"names":["promptStarterClassNames","usePromptStarterStyles_unstable","root","category","icon","prompt","badge","useRootResetStyles","makeResetStyles","position","display","gridTemplateColumns","gridTemplateRows","gridTemplateAreas","backgroundColor","tokens","colorNeutralBackground1","color","colorNeutralForeground1","fontFamily","fontFamilyBase","cursor","outlineStyle","textAlign","gap","padding","shorthands","border","strokeWidthThin","colorNeutralStroke1","borderRadius","borderRadiusMedium","colorNeutralBackground1Hover","colorNeutralStroke1Hover","colorNeutralBackground1Pressed","colorNeutralStroke1Pressed","createFocusOutlineStyle","useStyles","makeStyles","disabled","colorNeutralBackgroundDisabled","colorNeutralStrokeDisabled","gridArea","alignSelf","typographyStyles","body1Strong","body1","disabledText","colorNeutralForegroundDisabled","disabledBadge","opacity","useNextStyles","borderRadiusXLarge","state","designVersion","styles","nextStyles","rootResetStyles","className","mergeClasses"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAYaA,uBAAAA;eAAAA;;IAqEAC,+BAAAA;eAAAA;;;iCA1EN;wBACgB;AAIhB,MAAMD,0BAA8D;IACzEE,MAAM;IACNC,UAAU;IACVC,MAAM;IACNC,QAAQ;IACRC,OAAO;AACT;AAEA,MAAMC,qBAAqBC,IAAAA,gCAAAA,EAAgB;IACzCC,UAAU;IACVC,SAAS;IACTC,qBAAqB;IACrBC,kBAAkB;IAClBC,mBAAmB,CAAC;;;EAGpB,CAAC;IACDC,iBAAiBC,cAAAA,CAAOC,uBAAuB;IAC/CC,OAAOF,cAAAA,CAAOG,uBAAuB;IACrCC,YAAYJ,cAAAA,CAAOK,cAAc;IACjCC,QAAQ;IACRC,cAAc;IACdC,WAAW;IACXC,KAAK;IACLC,SAAS;IACT,GAAGC,2BAAAA,CAAWC,MAAM,CAACZ,cAAAA,CAAOa,eAAe,EAAE,SAASb,cAAAA,CAAOc,mBAAmB,CAAC;IACjFC,cAAcf,cAAAA,CAAOgB,kBAAkB;IACvC,WAAW;QACTjB,iBAAiBC,cAAAA,CAAOiB,4BAA4B;QACpD,GAAGN,2BAAAA,CAAWC,MAAM,CA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AEzB;IAEA,OAAOL;AACT"}
@@ -0,0 +1,23 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PromptStarter", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PromptStarter;
9
+ }
10
+ });
11
+ const _interop_require_wildcard = require("@swc/helpers/_/_interop_require_wildcard");
12
+ const _react = /*#__PURE__*/ _interop_require_wildcard._(require("react"));
13
+ const _usePromptStarter = require("./usePromptStarter");
14
+ const _renderPromptStarter = require("./renderPromptStarter");
15
+ const _usePromptStarterStylesstyles = require("./usePromptStarterStyles.styles");
16
+ const _reactprovider = require("@fluentui-copilot/react-provider");
17
+ const PromptStarter = /*#__PURE__*/ _react.forwardRef((props, ref)=>{
18
+ const state = (0, _usePromptStarter.usePromptStarter_unstable)(props, ref);
19
+ (0, _usePromptStarterStylesstyles.usePromptStarterStyles_unstable)(state);
20
+ (0, _reactprovider.useCustomStyleHook)('usePromptStarterStyles')(state);
21
+ return (0, _renderPromptStarter.renderPromptStarter_unstable)(state);
22
+ });
23
+ PromptStarter.displayName = 'PromptStarter';
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarter.tsx"],"sourcesContent":["import * as React from 'react';\nimport { usePromptStarter_unstable } from './usePromptStarter';\nimport { renderPromptStarter_unstable } from './renderPromptStarter';\nimport { usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\nimport { useCustomStyleHook } from '@fluentui-copilot/react-provider';\nimport type { PromptStarterProps } from './PromptStarter.types';\nimport type { ForwardRefComponent } from '@fluentui/react-components';\n\nexport const PromptStarter: ForwardRefComponent<PromptStarterProps> = React.forwardRef((props, ref) => {\n const state = usePromptStarter_unstable(props, ref);\n\n usePromptStarterStyles_unstable(state);\n useCustomStyleHook('usePromptStarterStyles')(state);\n\n return renderPromptStarter_unstable(state);\n});\n\nPromptStarter.displayName = 'PromptStarter';\n"],"names":["PromptStarter","React","forwardRef","props","ref","state","usePromptStarter_unstable","usePromptStarterStyles_unstable","useCustomStyleHook","renderPromptStarter_unstable","displayName"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAQaA;;;eAAAA;;;;iEARU;kCACmB;qCACG;8CACG;+BACb;AAI5B,MAAMA,gBAAAA,WAAAA,GAAyDC,OAAMC,UAAU,CAAC,CAACC,OAAOC;IAC7F,MAAMC,QAAQC,IAAAA,2CAAAA,EAA0BH,OAAOC;IAE/CG,IAAAA,6DAAAA,EAAgCF;IAChCG,IAAAA,iCAAAA,EAAmB,0BAA0BH;IAE7C,OAAOI,IAAAA,iDAAAA,EAA6BJ;AACtC;AAEAL,cAAcU,WAAW,GAAG"}
@@ -0,0 +1,6 @@
1
+ /**
2
+ * State used in rendering PromptStarter
3
+ */ "use strict";
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["PromptStarter.types.ts"],"sourcesContent":["import type { ComponentProps, ComponentState, Slot } from '@fluentui/react-components';\n\nexport type PromptStarterSlots = {\n root: NonNullable<Slot<'div'>>;\n primaryAction: NonNullable<Slot<'button'>>;\n icon?: Slot<'span'>;\n category?: Slot<'span'>;\n prompt: NonNullable<Slot<'span'>>;\n reasonMarker?: Slot<'span'>;\n actions?: Slot<'span'>;\n};\n\n/**\n * PromptStarter Props\n */\nexport type PromptStarterProps = Omit<ComponentProps<PromptStarterSlots>, 'disabled'>;\n\n/**\n * State used in rendering PromptStarter\n */\nexport type PromptStarterState = ComponentState<PromptStarterSlots> & {\n isSingleColumn?: boolean;\n};\n"],"names":[],"rangeMappings":";;","mappings":"AAiBA;;CAEC"}
@@ -0,0 +1,31 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ function _export(target, all) {
6
+ for(var name in all)Object.defineProperty(target, name, {
7
+ enumerable: true,
8
+ get: all[name]
9
+ });
10
+ }
11
+ _export(exports, {
12
+ PromptStarter: function() {
13
+ return _PromptStarter.PromptStarter;
14
+ },
15
+ promptStarterClassNames: function() {
16
+ return _usePromptStarterStylesstyles.promptStarterClassNames;
17
+ },
18
+ renderPromptStarter_unstable: function() {
19
+ return _renderPromptStarter.renderPromptStarter_unstable;
20
+ },
21
+ usePromptStarterStyles_unstable: function() {
22
+ return _usePromptStarterStylesstyles.usePromptStarterStyles_unstable;
23
+ },
24
+ usePromptStarter_unstable: function() {
25
+ return _usePromptStarter.usePromptStarter_unstable;
26
+ }
27
+ });
28
+ const _PromptStarter = require("./PromptStarter");
29
+ const _renderPromptStarter = require("./renderPromptStarter");
30
+ const _usePromptStarter = require("./usePromptStarter");
31
+ const _usePromptStarterStylesstyles = require("./usePromptStarterStyles.styles");
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["index.ts"],"sourcesContent":["export { PromptStarter } from './PromptStarter';\nexport type { PromptStarterProps, PromptStarterSlots, PromptStarterState } from './PromptStarter.types';\nexport { renderPromptStarter_unstable } from './renderPromptStarter';\nexport { usePromptStarter_unstable } from './usePromptStarter';\nexport { promptStarterClassNames, usePromptStarterStyles_unstable } from './usePromptStarterStyles.styles';\n"],"names":["PromptStarter","promptStarterClassNames","renderPromptStarter_unstable","usePromptStarterStyles_unstable","usePromptStarter_unstable"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;;;;;;;;IAASA,aAAa;eAAbA,4BAAa;;IAIbC,uBAAuB;eAAvBA,qDAAuB;;IAFvBC,4BAA4B;eAA5BA,iDAA4B;;IAEHC,+BAA+B;eAA/BA,6DAA+B;;IADxDC,yBAAyB;eAAzBA,2CAAyB;;;+BAHJ;qCAEe;kCACH;8CAC+B"}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "PromptStarterMotion", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return PromptStarterMotion;
9
+ }
10
+ });
11
+ const _reactcomponents = require("@fluentui/react-components");
12
+ const PromptStarterMotion = (0, _reactcomponents.createPresenceComponent)(({ index, numberOfColumns })=>{
13
+ const isFirstRow = index < numberOfColumns;
14
+ const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;
15
+ const opacityDuration = 100;
16
+ const opacityOffset = delay / (delay + opacityDuration);
17
+ const opacityEasing = 'linear';
18
+ const scaleDuration = 500;
19
+ const scaleOffset = delay / (delay + scaleDuration);
20
+ const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;
21
+ const opacityExitDuration = 200;
22
+ return {
23
+ enter: [
24
+ {
25
+ keyframes: [
26
+ {
27
+ opacity: 0
28
+ },
29
+ {
30
+ opacity: 0,
31
+ offset: opacityOffset
32
+ },
33
+ {
34
+ opacity: 1
35
+ }
36
+ ],
37
+ easing: opacityEasing,
38
+ duration: opacityDuration + delay
39
+ },
40
+ {
41
+ keyframes: [
42
+ {
43
+ transform: 'scale(0.9)'
44
+ },
45
+ {
46
+ transform: 'scale(0.9)',
47
+ offset: scaleOffset
48
+ },
49
+ {
50
+ transform: 'scale(1)'
51
+ }
52
+ ],
53
+ easing: scaleEasing,
54
+ duration: scaleDuration + delay
55
+ }
56
+ ],
57
+ exit: {
58
+ keyframes: [
59
+ {
60
+ opacity: 1
61
+ },
62
+ {
63
+ opacity: 1
64
+ },
65
+ {
66
+ opacity: 0
67
+ }
68
+ ],
69
+ easing: opacityEasing,
70
+ duration: opacityExitDuration
71
+ }
72
+ };
73
+ });
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["promptStarterMotion.ts"],"sourcesContent":["import { createPresenceComponent } from '@fluentui/react-components';\n\nexport type PromptStarterMotionParams = { index: number; numberOfColumns: number };\n\nexport const PromptStarterMotion: ReturnType<typeof createPresenceComponent<PromptStarterMotionParams>> =\n createPresenceComponent<PromptStarterMotionParams>(({ index, numberOfColumns }) => {\n const isFirstRow = index < numberOfColumns;\n const delay = isFirstRow ? index * 50 : (index - numberOfColumns) * 50;\n\n const opacityDuration = 100;\n const opacityOffset = delay / (delay + opacityDuration);\n const opacityEasing = 'linear';\n\n const scaleDuration = 500;\n const scaleOffset = delay / (delay + scaleDuration);\n const scaleEasing = `cubic-bezier(0.22, 1.59, 0.46, 1)`;\n\n const opacityExitDuration = 200;\n\n return {\n enter: [\n {\n keyframes: [{ opacity: 0 }, { opacity: 0, offset: opacityOffset }, { opacity: 1 }],\n easing: opacityEasing,\n duration: opacityDuration + delay,\n },\n {\n keyframes: [\n { transform: 'scale(0.9)' },\n { transform: 'scale(0.9)', offset: scaleOffset },\n { transform: 'scale(1)' },\n ],\n easing: scaleEasing,\n duration: scaleDuration + delay,\n },\n ],\n exit: {\n keyframes: [{ opacity: 1 }, { opacity: 1 }, { opacity: 0 }],\n easing: opacityEasing,\n duration: opacityExitDuration,\n },\n };\n });\n"],"names":["PromptStarterMotion","createPresenceComponent","index","numberOfColumns","isFirstRow","delay","opacityDuration","opacityOffset","opacityEasing","scaleDuration","scaleOffset","scaleEasing","opacityExitDuration","enter","keyframes","opacity","offset","easing","duration","transform","exit"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAIaA;;;eAAAA;;;iCAJ2B;AAIjC,MAAMA,sBACXC,IAAAA,wCAAAA,EAAmD,CAAC,EAAEC,KAAK,EAAEC,eAAe,EAAE;IAC5E,MAAMC,aAAaF,QAAQC;IAC3B,MAAME,QAAQD,aAAaF,QAAQ,KAAK,AAACA,CAAAA,QAAQC,eAAAA,IAAmB;IAEpE,MAAMG,kBAAkB;IACxB,MAAMC,gBAAgBF,QAASA,CAAAA,QAAQC,eAAAA;IACvC,MAAME,gBAAgB;IAEtB,MAAMC,gBAAgB;IACtB,MAAMC,cAAcL,QAASA,CAAAA,QAAQI,aAAAA;IACrC,MAAME,cAAc,CAAC,iCAAiC,CAAC;IAEvD,MAAMC,sBAAsB;IAE5B,OAAO;QACLC,OAAO;YACL;gBACEC,WAAW;oBAAC;wBAAEC,SAAS;oBAAE;oBAAG;wBAAEA,SAAS;wBAAGC,QAAQT;oBAAc;oBAAG;wBAAEQ,SAAS;oBAAE;iBAAE;gBAClFE,QAAQT;gBACRU,UAAUZ,kBAAkBD;YAC9B;YACA;gBACES,WAAW;oBACT;wBAAEK,WAAW;oBAAa;oBAC1B;wBAAEA,WAAW;wBAAcH,QAAQN;oBAAY;oBAC/C;wBAAES,WAAW;oBAAW;iBACzB;gBACDF,QAAQN;gBACRO,UAAUT,gBAAgBJ;YAC5B;SACD;QACDe,MAAM;YACJN,WAAW;gBAAC;oBAAEC,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;gBAAG;oBAAEA,SAAS;gBAAE;aAAE;YAC3DE,QAAQT;YACRU,UAAUN;QACZ;IACF;AACF"}
@@ -0,0 +1,28 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "renderPromptStarter_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return renderPromptStarter_unstable;
9
+ }
10
+ });
11
+ const _jsxruntime = require("@fluentui/react-jsx-runtime/jsx-runtime");
12
+ const _reactcomponents = require("@fluentui/react-components");
13
+ const renderPromptStarter_unstable = (state)=>{
14
+ (0, _reactcomponents.assertSlots)(state);
15
+ return /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.root, {
16
+ children: [
17
+ /*#__PURE__*/ (0, _jsxruntime.jsxs)(state.primaryAction, {
18
+ children: [
19
+ state.icon && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.icon, {}),
20
+ state.category && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.category, {}),
21
+ /*#__PURE__*/ (0, _jsxruntime.jsx)(state.prompt, {}),
22
+ state.reasonMarker && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.reasonMarker, {})
23
+ ]
24
+ }),
25
+ state.actions && /*#__PURE__*/ (0, _jsxruntime.jsx)(state.actions, {})
26
+ ]
27
+ });
28
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["renderPromptStarter.tsx"],"sourcesContent":["/** @jsxRuntime automatic */\n/** @jsxImportSource @fluentui/react-jsx-runtime */\n\nimport { assertSlots } from '@fluentui/react-components';\nimport type { JSXElement } from '@fluentui/react-components';\nimport type { PromptStarterState, PromptStarterSlots } from './PromptStarter.types';\n\nexport const renderPromptStarter_unstable = (state: PromptStarterState): JSXElement => {\n assertSlots<PromptStarterSlots>(state);\n\n return (\n <state.root>\n <state.primaryAction>\n {state.icon && <state.icon />}\n {state.category && <state.category />}\n <state.prompt />\n {state.reasonMarker && <state.reasonMarker />}\n </state.primaryAction>\n {state.actions && <state.actions />}\n </state.root>\n );\n};\n"],"names":["renderPromptStarter_unstable","state","assertSlots","_jsxs","root","primaryAction","icon","_jsx","category","prompt","reasonMarker","actions"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAOaA;;;eAAAA;;;4BANb;iCAE4B;AAIrB,MAAMA,+BAA+B,CAACC;IAC3CC,IAAAA,4BAAAA,EAAgCD;IAEhC,OAAA,WAAA,GACEE,IAAAA,gBAAA,EAACF,MAAMG,IAAI,EAAA;;0BACTD,IAAAA,gBAAA,EAACF,MAAMI,aAAa,EAAA;;oBACjBJ,MAAMK,IAAI,IAAA,WAAA,GAAIC,IAAAA,eAAA,EAACN,MAAMK,IAAI,EAAA,CAAA;oBACzBL,MAAMO,QAAQ,IAAA,WAAA,GAAID,IAAAA,eAAA,EAACN,MAAMO,QAAQ,EAAA,CAAA;kCAClCD,IAAAA,eAAA,EAACN,MAAMQ,MAAM,EAAA,CAAA;oBACZR,MAAMS,YAAY,IAAA,WAAA,GAAIH,IAAAA,eAAA,EAACN,MAAMS,YAAY,EAAA,CAAA;;;YAE3CT,MAAMU,OAAO,IAAA,WAAA,GAAIJ,IAAAA,eAAA,EAACN,MAAMU,OAAO,EAAA,CAAA;;;AAGtC"}
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", {
3
+ value: true
4
+ });
5
+ Object.defineProperty(exports, "usePromptStarter_unstable", {
6
+ enumerable: true,
7
+ get: function() {
8
+ return usePromptStarter_unstable;
9
+ }
10
+ });
11
+ const _reactcomponents = require("@fluentui/react-components");
12
+ const _PromptStarterListContext = require("../../../contexts/PromptStarterListContext");
13
+ const usePromptStarter_unstable = (props, ref)=>{
14
+ const id = (0, _reactcomponents.useId)('prompt-starter');
15
+ const focusAttrs = (0, _reactcomponents.useFocusableGroup)();
16
+ const numberOfColumns = (0, _PromptStarterListContext.usePromptStarterListContext)((ctx)=>ctx.numberOfColumns);
17
+ // if this is defined, the context exists and the Prompt is within PromptStarterList
18
+ const isWithinList = typeof numberOfColumns === 'number';
19
+ const isSingleColumn = numberOfColumns === 1;
20
+ const state = {
21
+ isSingleColumn,
22
+ components: {
23
+ root: 'div',
24
+ primaryAction: 'button',
25
+ icon: 'span',
26
+ category: 'span',
27
+ prompt: 'span',
28
+ reasonMarker: 'span',
29
+ actions: 'span'
30
+ },
31
+ root: _reactcomponents.slot.always((0, _reactcomponents.getIntrinsicElementProps)('div', {
32
+ ref,
33
+ role: isWithinList ? 'listitem' : undefined,
34
+ ...focusAttrs,
35
+ ...props
36
+ }), {
37
+ elementType: 'div'
38
+ }),
39
+ primaryAction: _reactcomponents.slot.always(props.primaryAction, {
40
+ defaultProps: {
41
+ 'aria-labelledby': `${id}-category ${id}-prompt`,
42
+ 'aria-describedby': `${id}-icon ${id}-reasonMarker`
43
+ },
44
+ elementType: 'button'
45
+ }),
46
+ icon: !isSingleColumn ? _reactcomponents.slot.optional(props.icon, {
47
+ defaultProps: {
48
+ id: `${id}-icon`
49
+ },
50
+ elementType: 'span'
51
+ }) : undefined,
52
+ category: !isSingleColumn ? _reactcomponents.slot.optional(props.category, {
53
+ defaultProps: {
54
+ id: `${id}-category`
55
+ },
56
+ elementType: 'span'
57
+ }) : undefined,
58
+ prompt: _reactcomponents.slot.always(props.prompt, {
59
+ defaultProps: {
60
+ id: `${id}-prompt`
61
+ },
62
+ elementType: 'span'
63
+ }),
64
+ reasonMarker: !isSingleColumn ? _reactcomponents.slot.optional(props.reasonMarker, {
65
+ defaultProps: {
66
+ id: `${id}-reasonMarker`
67
+ },
68
+ elementType: 'span'
69
+ }) : undefined,
70
+ actions: !isSingleColumn ? _reactcomponents.slot.optional(props.actions, {
71
+ elementType: 'span'
72
+ }) : undefined
73
+ };
74
+ return state;
75
+ };
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["usePromptStarter.ts"],"sourcesContent":["import { getIntrinsicElementProps, slot, useFocusableGroup, useId } from '@fluentui/react-components';\nimport { usePromptStarterListContext } from '../../../contexts/PromptStarterListContext';\nimport type { PromptStarterProps, PromptStarterState } from './PromptStarter.types';\n\n/**\n * Create the state required to render PromptStarter.\n *\n * The returned state can be modified with hooks such as usePromptStarterStyles_unstable,\n * before being passed to renderPromptStarter_unstable.\n *\n * @param props - props from this instance of PromptStarter\n * @param ref - reference to root HTMLElement of PromptStarter\n */\nexport const usePromptStarter_unstable = (\n props: PromptStarterProps,\n ref: React.Ref<HTMLDivElement>,\n): PromptStarterState => {\n const id = useId('prompt-starter');\n const focusAttrs = useFocusableGroup();\n\n const numberOfColumns = usePromptStarterListContext(ctx => ctx.numberOfColumns);\n // if this is defined, the context exists and the Prompt is within PromptStarterList\n const isWithinList = typeof numberOfColumns === 'number';\n\n const isSingleColumn = numberOfColumns === 1;\n\n const state: PromptStarterState = {\n isSingleColumn,\n components: {\n root: 'div',\n primaryAction: 'button',\n icon: 'span',\n category: 'span',\n prompt: 'span',\n reasonMarker: 'span',\n actions: 'span',\n },\n root: slot.always(\n getIntrinsicElementProps('div', {\n ref,\n role: isWithinList ? 'listitem' : undefined,\n ...focusAttrs,\n ...props,\n }),\n { elementType: 'div' },\n ),\n primaryAction: slot.always(props.primaryAction, {\n defaultProps: {\n 'aria-labelledby': `${id}-category ${id}-prompt`,\n 'aria-describedby': `${id}-icon ${id}-reasonMarker`,\n },\n elementType: 'button',\n }),\n icon: !isSingleColumn\n ? slot.optional(props.icon, {\n defaultProps: { id: `${id}-icon` },\n elementType: 'span',\n })\n : undefined,\n category: !isSingleColumn\n ? slot.optional(props.category, {\n defaultProps: { id: `${id}-category` },\n elementType: 'span',\n })\n : undefined,\n prompt: slot.always(props.prompt, {\n defaultProps: { id: `${id}-prompt` },\n elementType: 'span',\n }),\n reasonMarker: !isSingleColumn\n ? slot.optional(props.reasonMarker, {\n defaultProps: { id: `${id}-reasonMarker` },\n elementType: 'span',\n })\n : undefined,\n actions: !isSingleColumn ? slot.optional(props.actions, { elementType: 'span' }) : undefined,\n };\n\n return state;\n};\n"],"names":["usePromptStarter_unstable","props","ref","id","useId","focusAttrs","useFocusableGroup","numberOfColumns","usePromptStarterListContext","ctx","isWithinList","isSingleColumn","state","components","root","primaryAction","icon","category","prompt","reasonMarker","actions","slot","always","getIntrinsicElementProps","role","undefined","elementType","defaultProps","optional"],"rangeMappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;","mappings":";;;;+BAaaA;;;eAAAA;;;iCAb4D;0CAC7B;AAYrC,MAAMA,4BAA4B,CACvCC,OACAC;IAEA,MAAMC,KAAKC,IAAAA,sBAAAA,EAAM;IACjB,MAAMC,aAAaC,IAAAA,kCAAAA;IAEnB,MAAMC,kBAAkBC,IAAAA,qDAAAA,EAA4BC,CAAAA,MAAOA,IAAIF,eAAe;IAC9E,oFAAoF;IACpF,MAAMG,eAAe,OAAOH,oBAAoB;IAEhD,MAAMI,iBAAiBJ,oBAAoB;IAE3C,MAAMK,QAA4B;QAChCD;QACAE,YAAY;YACVC,MAAM;YACNC,eAAe;YACfC,MAAM;YACNC,UAAU;YACVC,QAAQ;YACRC,cAAc;YACdC,SAAS;QACX;QACAN,MAAMO,qBAAAA,CAAKC,MAAM,CACfC,IAAAA,yCAAAA,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