@brightspot/ui 5.0.1 → 5.0.2

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 (73) hide show
  1. package/dist/custom-elements.json +181 -181
  2. package/dist/storybook/assets/{ActionBar.stories-IDc5Jeit.js → ActionBar.stories-DR8qKNFC.js} +1 -1
  3. package/dist/storybook/assets/{ActionItem.stories-FKbziuZR.js → ActionItem.stories-n0lxOjIK.js} +1 -1
  4. package/dist/storybook/assets/{Avatar.stories-BsAnn4F7.js → Avatar.stories-DWNXboUH.js} +1 -1
  5. package/dist/storybook/assets/{AvatarGroup.stories-BmNNGA4K.js → AvatarGroup.stories-CJy1A8Mq.js} +1 -1
  6. package/dist/storybook/assets/{Badge.stories-BMb_-0Io.js → Badge.stories-BkrU56BA.js} +1 -1
  7. package/dist/storybook/assets/{Button-D3vjfsjz.js → Button-DqChP2U6.js} +1 -1
  8. package/dist/storybook/assets/{Button.stories-VndkwLDv.js → Button.stories-C1SqU1BT.js} +1 -1
  9. package/dist/storybook/assets/{ButtonGroup.stories-BvbNykTx.js → ButtonGroup.stories-CF1Mh2ug.js} +1 -1
  10. package/dist/storybook/assets/{Celebrate.stories-DrrL3txs.js → Celebrate.stories-ClqAmUk2.js} +1 -1
  11. package/dist/storybook/assets/{Checkbox.stories-BS4H3-cO.js → Checkbox.stories-hmxev_eW.js} +1 -1
  12. package/dist/storybook/assets/{CircularProgress.stories-YQfbjx-O.js → CircularProgress.stories-cWJl_EBP.js} +1 -1
  13. package/dist/storybook/assets/{ClipboardMixin.stories-DjsApoGs.js → ClipboardMixin.stories-E6G4v8eu.js} +1 -1
  14. package/dist/storybook/assets/{Color-6BZIO3FS-D23VaL29.js → Color-6BZIO3FS-mGoabL41.js} +1 -1
  15. package/dist/storybook/assets/{Colors.stories-B0Eo-AgP.js → Colors.stories-CjWwNT2v.js} +1 -1
  16. package/dist/storybook/assets/{CombinedEffects.stories-CJv4PhDZ.js → CombinedEffects.stories-DahZszMM.js} +1 -1
  17. package/dist/storybook/assets/{ComponentStatesMixin-Bn8b1Qpq.js → ComponentStatesMixin-iXss03sN.js} +1 -1
  18. package/dist/storybook/assets/{ComponentStatesMixin.stories-CM9Nn1Vr.js → ComponentStatesMixin.stories-C1b3zMgf.js} +1 -1
  19. package/dist/storybook/assets/{CopyToClipboard.stories-DdwTxinQ.js → CopyToClipboard.stories-BEFwR9iw.js} +1 -1
  20. package/dist/storybook/assets/{Debounce.stories-bdqs8xGz.js → Debounce.stories-m7227tf1.js} +1 -1
  21. package/dist/storybook/assets/{DocsRenderer-LL677BLK-CdjX43FI.js → DocsRenderer-LL677BLK-ByZAmSPf.js} +3 -3
  22. package/dist/storybook/assets/{Dropdown.stories-wY7jzy1b.js → Dropdown.stories-CELZm3nV.js} +1 -1
  23. package/dist/storybook/assets/{EmptyState.stories-FpHAx68-.js → EmptyState.stories-DbIlZsvG.js} +1 -1
  24. package/dist/storybook/assets/{Events.stories-gJAakVdu.js → Events.stories-E8SpdK9f.js} +1 -1
  25. package/dist/storybook/assets/{Heading.stories-BqFtaYkf.js → Heading.stories-DIHkdyir.js} +1 -1
  26. package/dist/storybook/assets/{HueRipple.stories-Bk1g8tT8.js → HueRipple.stories-TE5VhBNI.js} +1 -1
  27. package/dist/storybook/assets/{Icon.stories-sxRLpE9W.js → Icon.stories-V9A8zx3l.js} +1 -1
  28. package/dist/storybook/assets/{IconButton.stories-DjmbahEP.js → IconButton.stories-kyYFPqat.js} +1 -1
  29. package/dist/storybook/assets/{LinearProgress.stories-DwJQwdLl.js → LinearProgress.stories-DMQkVCfc.js} +1 -1
  30. package/dist/storybook/assets/{Pagination.stories-Cp-E5mN-.js → Pagination.stories-B4Kikiss.js} +1 -1
  31. package/dist/storybook/assets/{Popover.stories-BRW3tYFh.js → Popover.stories-DKYzeCVX.js} +1 -1
  32. package/dist/storybook/assets/{ReadyMixin-Btxswj_k.js → ReadyMixin-CfbnRH2m.js} +1 -1
  33. package/dist/storybook/assets/{RovingTabindexMixin.stories-CU7heX4w.js → RovingTabindexMixin.stories-B1QUtSUN.js} +1 -1
  34. package/dist/storybook/assets/{Rtc.stories-CGkrXg7-.js → Rtc.stories-DPk94cW8.js} +1 -1
  35. package/dist/storybook/assets/{ScrollShadow.stories-HPqnieYi.js → ScrollShadow.stories-BzsVosZE.js} +1 -1
  36. package/dist/storybook/assets/{Switch.stories-SIix50Dz.js → Switch.stories-2ixJ66i0.js} +1 -1
  37. package/dist/storybook/assets/{Tab.stories-BJ0Dl--1.js → Tab.stories-DjPAaRUe.js} +1 -1
  38. package/dist/storybook/assets/{Tabs.stories-DEV7dhqr.js → Tabs.stories-DNGYpwdL.js} +1 -1
  39. package/dist/storybook/assets/{Throttle.stories-5l5dcEMx.js → Throttle.stories-DqiX39Q4.js} +1 -1
  40. package/dist/storybook/assets/{Tooltip.stories-CJrvBRM9.js → Tooltip.stories-RWvjZUq6.js} +1 -1
  41. package/dist/storybook/assets/{Upload.stories-HAndUW3D.js → Upload.stories-BPImkf-w.js} +1 -1
  42. package/dist/storybook/assets/{UploadItem.stories-B-8IM6rL.js → UploadItem.stories-sF91eklH.js} +1 -1
  43. package/dist/storybook/assets/{Welcome.stories-Cy7QZEXf.js → Welcome.stories-C7T0lxjn.js} +1 -1
  44. package/dist/storybook/assets/{Widget.stories-DyTOXrSZ.js → Widget.stories-hIm4Mgoy.js} +1 -1
  45. package/dist/storybook/assets/{WithTooltip-65CFNBJE-BF-px3XD.js → WithTooltip-65CFNBJE-FBY88pP9.js} +1 -1
  46. package/dist/storybook/assets/{blocks-B-r6Fucc.js → blocks-DNAwNK2O.js} +5 -5
  47. package/dist/storybook/assets/{formatter-EIJCOSYU-BhTCWHea.js → formatter-EIJCOSYU--IWOLjx2.js} +1 -1
  48. package/dist/storybook/assets/if-defined-Cxz6E-2i.js +1 -0
  49. package/dist/storybook/assets/{iframe-XJ17FJi7.js → iframe-apn1Lgr_.js} +4 -4
  50. package/dist/storybook/assets/{index-CQ_bLab5.js → index-BSiX30xx.js} +1 -1
  51. package/dist/storybook/assets/{onFind-RCD4BqgZ.js → onFind-BrtZPfAg.js} +1 -1
  52. package/dist/storybook/assets/{onFind.stories-CD7vXuRn.js → onFind.stories-CdBIAJjT.js} +1 -1
  53. package/dist/storybook/assets/{onRemove.stories-Dm8HrW-w.js → onRemove.stories-BhaBwi44.js} +1 -1
  54. package/dist/storybook/assets/{onVisible.stories-CigtHPTK.js → onVisible.stories-BOsxDhRj.js} +1 -1
  55. package/dist/storybook/assets/{style-map-C3PJ2niZ.js → style-map-CAjfRbcg.js} +1 -1
  56. package/dist/storybook/assets/{syntaxhighlighter-ED5Y7EFY-DIlzdeob.js → syntaxhighlighter-ED5Y7EFY-5ISl-7xc.js} +1 -1
  57. package/dist/storybook/iframe.html +1 -1
  58. package/dist/storybook/project.json +1 -1
  59. package/package.json +1 -1
  60. package/src/legacy/tool-ui/src/ContentInputGroup.css +9 -4
  61. package/src/legacy/tool-ui/src/ContentSummary.css +2 -0
  62. package/src/legacy/tool-ui/src/Conversation.ts +54 -10
  63. package/src/legacy/tool-ui/src/Widget.css +1 -2
  64. package/src/legacy/tool-ui/src/main/webapp/dist/{6216.cf8adc1990ee1111f065.js → 6216.2d532054fcb8e634f96b.js} +1 -1
  65. package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.e8521581e28e90ef6f30.js → RTEProseMirror.945bd28778b1a3e937c7.js} +2 -2
  66. package/src/legacy/tool-ui/src/main/webapp/dist/{v4.de442a0b430071a7803d.js → v4.dc7d7c1a18ddb6117061.js} +3 -3
  67. package/src/legacy/tool-ui/src/main/webapp/dist/{v5.5ce74760f3fb482bec5e.js → v5.7eea426a9a47341f03f8.js} +3 -3
  68. package/src/legacy/tool-ui/src/main/webapp/dist/{v5.68dab4082aba302779ed.css → v5.951c664100c4fb201fd8.css} +1 -1
  69. package/src/legacy/tool-ui/src/main/webapp/v4/rte/plugins/table_manager/views/ProseMirror-table.less +28 -1
  70. package/dist/storybook/assets/if-defined-CxLwFifW.js +0 -1
  71. /package/src/legacy/tool-ui/src/main/webapp/dist/{RTEProseMirror.e8521581e28e90ef6f30.js.LICENSE.txt → RTEProseMirror.945bd28778b1a3e937c7.js.LICENSE.txt} +0 -0
  72. /package/src/legacy/tool-ui/src/main/webapp/dist/{v4.de442a0b430071a7803d.js.LICENSE.txt → v4.dc7d7c1a18ddb6117061.js.LICENSE.txt} +0 -0
  73. /package/src/legacy/tool-ui/src/main/webapp/dist/{v5.5ce74760f3fb482bec5e.js.LICENSE.txt → v5.7eea426a9a47341f03f8.js.LICENSE.txt} +0 -0
@@ -456,7 +456,8 @@ onFind(
456
456
  onFind(
457
457
  '.Popup[name="conversation-edit-post"] .icon-action-delete',
458
458
  (post: HTMLAnchorElement) => {
459
- post.addEventListener('click', async () => {
459
+ post.addEventListener('click', async (evt) => {
460
+ evt.preventDefault()
460
461
  const headers = new Headers()
461
462
  const cookie = Cookies.get('bsp.csrf')
462
463
 
@@ -474,22 +475,65 @@ onFind(
474
475
  if (postId) body.append('postId', postId)
475
476
  if (overlayId) body.append('overlayId', overlayId)
476
477
 
477
- await fetch(window.CONTEXT_PATH + 'conversation/delete-post', {
478
- method: 'post',
479
- credentials: 'include',
480
- headers,
481
- body,
482
- })
478
+ const response = await fetch(
479
+ window.CONTEXT_PATH + 'conversation/delete-post',
480
+ {
481
+ method: 'post',
482
+ credentials: 'include',
483
+ headers,
484
+ body,
485
+ },
486
+ )
483
487
 
484
- const popup = post.closest('.Popup')
488
+ if (!response.ok) {
489
+ console.error(
490
+ `Failed to delete post: ${response.status} ${response.statusText}`,
491
+ )
492
+ return
493
+ }
485
494
 
486
- if (popup) {
487
- ;($(popup) as any).popup('close')
495
+ // Cleanup — close the edit popup, and also close any conversation-reply
496
+ // popup it was opened from (the source traces back to the opener element).
497
+ const editPopup = post.closest('.Popup')
498
+ const replyPopup = editPopup
499
+ ? (
500
+ ($(editPopup) as any).popup('source')[0] as HTMLElement
501
+ )?.closest<HTMLElement>('.Popup[name^="conversation-reply"]')
502
+ : null
503
+
504
+ if (postId) {
505
+ document.getElementById(postId)?.remove()
506
+ }
507
+
508
+ if (editPopup) {
509
+ ;($(editPopup) as any).popup('close')
510
+ }
511
+
512
+ if (replyPopup) {
513
+ ;($(replyPopup) as any).popup('close')
488
514
  }
489
515
  })
490
516
  },
491
517
  )
492
518
 
519
+ // When the main post in a conversation-reply dialog is deleted, Posts.java emits
520
+ // a close-popup-marker — close the surrounding popup when we see it.
521
+ onFind(
522
+ '.close-popup-marker[data-close-popup="true"]',
523
+ (marker: HTMLElement) => {
524
+ const popup = marker.closest<HTMLElement>(
525
+ '.Popup[name^="conversation-reply"]',
526
+ )
527
+ if (popup) {
528
+ const parentId = marker.dataset.parentId
529
+ if (parentId) {
530
+ document.getElementById(parentId)?.remove()
531
+ }
532
+ ;($(popup) as any).popup('close')
533
+ }
534
+ },
535
+ )
536
+
493
537
  onFind('.Conversation-pinned-container', (container) => {
494
538
  if (!(container instanceof HTMLElement)) return
495
539
  const pinnedHeader = find(container, 'h1')
@@ -102,8 +102,7 @@
102
102
 
103
103
  .Widget .is-readOnly .UrlsWidget-itemLabel a,
104
104
  .widget .is-readOnly .RCIG-title:after,
105
- .widget .is-readOnly .ContentSummary-info,
106
- .widget .is-readOnly .ContentSelector-edit {
105
+ .widget .is-readOnly .ContentSummary-info {
107
106
  @apply pointer-events-auto cursor-pointer;
108
107
  }
109
108
 
@@ -1 +1 @@
1
- "use strict";(self.webpackChunkbrightspot_cms=self.webpackChunkbrightspot_cms||[]).push([[6216],{27183(r,e,o){o.d(e,{A:()=>l});var i=o(64664),t=o.n(i),a=o(25243),n=o.n(a)()(t());n.push([r.id,'.ProseMirror-tableContainer{position:relative}[dir] .ProseMirror-tableContainer{background:var(--color-gray1);margin:var(--Text-height) calc(0px - var(--gap-m));padding:var(--gap-m)}.ProseMirror-tableContainer .ProsemirrorEnhancementMenu{position:static;top:0;visibility:visible;z-index:1}[dir] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu{margin-bottom:0}[dir=ltr] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu{left:0}[dir=rtl] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu{right:0}[dir=ltr] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu ul{padding-left:0}[dir=rtl] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu ul{padding-right:0}.ProseMirror-tableHeading{--Icon-size:var(--iconSize-s);--Text-height:var(--lineHeight-s);font-size:var(--fontSize-s);line-height:var(--lineHeight-s);align-items:center;display:flex;justify-content:space-between}.ProseMirror-tableTitle:before{--Icon-fill:"FILL" 1;display:inline-block;font-family:Material Symbols Outlined;font-feature-settings:"liga";font-size:var(--Icon-size);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-variation-settings:var(--Icon-fill);font-weight:400;letter-spacing:normal;line-height:1;position:relative;text-rendering:optimizeLegibility;text-transform:none;top:calc((var(--Text-height) - var(--Icon-size)) / 2);vertical-align:top;white-space:nowrap;word-wrap:normal;content:"border_all"}[dir] .ProseMirror-tableTitle:before{transform:var(--Icon-transform)}[dir=ltr] .ProseMirror-tableTitle:before{direction:ltr;margin-right:var(--gap-xs)}[dir=rtl] .ProseMirror-tableTitle:before{direction:rtl;margin-left:var(--gap-xs)}[dir] .ProseMirror .ProseMirror-tableSubmenuList{margin:0;padding:0}.ProseMirror .ProseMirror-tableSubmenuList li{display:inline-block}.ProseMirror .ProseMirror-tableSubmenuList li a{display:block;text-decoration:none!important}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]{--Link-color:var(--color-black);--Link-hoverColor:var(--color-dominant5);--Link-hoverDecoration:none;color:var(--Link-color);display:inline-block;height:calc(var(--gap-s) * 2 + var(--Icon-size));overflow:hidden;position:relative;vertical-align:middle;width:calc(var(--gap-s) * 2 + var(--Icon-size))}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]{cursor:pointer}[dir] button.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]{background:transparent;border:0;padding:0}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{--Icon-fill:"FILL" 1;display:inline-block;font-family:Material Symbols Outlined;font-feature-settings:"liga";font-size:var(--Icon-size);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-variation-settings:var(--Icon-fill);font-weight:400;letter-spacing:normal;line-height:1;position:relative;text-rendering:optimizeLegibility;text-transform:none;top:calc((var(--Text-height) - var(--Icon-size)) / 2);vertical-align:top;white-space:nowrap;word-wrap:normal;content:var(--IconButton-name,attr(data-icon-button-name));height:var(--Icon-size);top:0;width:var(--Icon-size)}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{transform:var(--Icon-transform)}[dir=ltr] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{direction:ltr;padding:var(--gap-s) 100px 100px var(--gap-s)}[dir=rtl] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{direction:rtl;padding:var(--gap-s) var(--gap-s) 100px 100px}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{content:"";height:100%;opacity:0;position:absolute;top:0;transition:opacity var(--time-xs) var(--ease-in),transform var(--time-s) var(--ease-out);width:100%}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{background:var(--Link-color);border-radius:calc(var(--gap-s) + var(--Icon-size) / 2);transform:scale(0)}[dir=ltr] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{left:0}[dir=rtl] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{right:0}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:focus:before,.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:hover:before{color:var(--Link-hoverColor);position:relative;z-index:10}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:focus:after,.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:hover:after{opacity:.08}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:focus:after,[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:hover:after{transform:none}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{content:attr(data-icon)}.ProseMirror .ProseMirror-tableSubmenuList li a.remove{--Link-color:var(--color-red6);--Link-hoverColor:var(--color-red5);--Link-decoration:none}.ProseMirror-tableMenu{--Link-color:var(--color-black);--Link-hoverColor:var(--color-black);--Link-decoration:none;--Dropdown-markerSize:0px;--Link-hoverDecoration:none;max-height:45vh;max-width:45vw;opacity:0;overflow:auto;position:fixed;transition:opacity var(--time-xs) var(--ease-in),transform var(--time-s) var(--ease-out),visibility var(--time-s);visibility:hidden;z-index:2000000}[dir] .ProseMirror-tableMenu{background:var(--color-white);box-shadow:var(--shadow-3);padding:var(--gap-s) 0;transform:scaleY(0);transform-origin:top}.ProseMirror-tableMenu[data-tether-rx=l]{left:var(--Tether-rl)}.ProseMirror-tableMenu[data-tether-rx=r]{right:calc(100vw - var(--Tether-rl) - var(--Tether-rw))}.ProseMirror-tableMenu[data-tether-ry=t]{max-height:calc(100vh - var(--Tether-rt) - var(--Tether-rh) - var(--gap-xl));top:calc(var(--Tether-rt) + var(--Tether-rh) + var(--Dropdown-markerSize))}[dir] .ProseMirror-tableMenu[data-tether-ry=t]{transform-origin:top}.ProseMirror-tableMenu[data-tether-ry=b]{bottom:calc(100vh - var(--Tether-rt) + var(--Dropdown-markerSize));max-height:calc(var(--Tether-rt) - var(--Page-headerBottom) - var(--gap-xl))}[dir] .ProseMirror-tableMenu[data-tether-ry=b]{transform-origin:bottom}.ProseMirror-tableMenu.is-open{opacity:1;visibility:visible}[dir] .ProseMirror-tableMenu.is-open{transform:none}[dir] .ProseMirror-tableMenu.is-open:not(:hover) [role=menuitem]:focus{background:var(--color-dominant1)}.ProseMirror-tableMenu .ProseMirror-tableMenuList{list-style-type:none}[dir] .ProseMirror-tableMenu .ProseMirror-tableMenuList{margin:0;padding:0}.ProseMirror-tableMenu .ProseMirror-tableMenuList>li{display:block;font-size:inherit;width:100%}[dir] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li{background:transparent;padding:var(--gap-s) var(--gap-l);cursor:pointer}[dir=ltr] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li{text-align:left}[dir=rtl] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li{text-align:right}[dir] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li:hover{background:var(--color-dominant1)}.ProseMirror-tableMenu .ProseMirror-tableMenuList>li[disabled]{opacity:.5;pointer-events:none}.ProseMirror-tableMenu .ProseMirror-tableMenuList>li>a{display:block;width:100%}.ProseMirror-table{border-collapse:separate;border-spacing:1px;overflow-x:auto;position:relative;table-layout:fixed;width:100%}[dir] .ProseMirror-table{margin-top:calc(var(--gap-m) - 1px)}.ProseMirror-table tbody{width:100%}.ProseMirror-table td{position:relative}[dir] .ProseMirror-table td{background:var(--color-white);border:1px solid var(--Input-borderColor);padding:var(--gap-xs) var(--gap-s)}[dir=ltr] .ProseMirror-table td .Enhancement,[dir=ltr] .ProseMirror-table td .Enhancement-preview,[dir=rtl] .ProseMirror-table td .Enhancement,[dir=rtl] .ProseMirror-table td .Enhancement-preview{margin-left:0;margin-right:0}[dir] .ProseMirror-table td.is-selected-cell,[dir] .ProseMirror-table td.selectedCell{border:1px solid var(--color-blue5)}.ProseMirror-table td .ProsemirrorEnhancementMenu-container-button:is(.edit,.arrow_upward,.arrow_downward,.open_with){display:none}',""]);const l=7717==o.j?n:null},76216(r,e,o){o.r(e),o.d(e,{default:()=>h});var i=o(96291),t=o.n(i),a=o(96918),n=o.n(a),l=o(77322),s=o.n(l),d=o(55800),b=o.n(d),c=o(10207),M=o.n(c),u=o(37746),v=o.n(u),m=o(27183),p={};p.styleTagTransform=v(),p.setAttributes=b(),p.insert=s().bind(null,"head"),p.domAPI=n(),p.insertStyleElement=M(),t()(m.A,p);const h=m.A&&m.A.locals?m.A.locals:void 0}}]);
1
+ "use strict";(self.webpackChunkbrightspot_cms=self.webpackChunkbrightspot_cms||[]).push([[6216],{27183(r,e,o){o.d(e,{A:()=>l});var i=o(64664),t=o.n(i),a=o(25243),n=o.n(a)()(t());n.push([r.id,'.ProseMirror-tableContainer{position:relative}[dir] .ProseMirror-tableContainer{background:var(--color-gray1);margin:var(--Text-height) calc(0px - var(--gap-m));padding:var(--gap-m)}.ProseMirror-tableContainer .ProsemirrorEnhancementMenu{position:static;top:0;visibility:visible;z-index:1}[dir] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu{margin-bottom:0}[dir=ltr] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu{left:0}[dir=rtl] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu{right:0}[dir=ltr] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu ul{padding-left:0}[dir=rtl] .ProseMirror-tableContainer .ProsemirrorEnhancementMenu ul{padding-right:0}.ProseMirror-tableHeading{--Icon-size:var(--iconSize-s);--Text-height:var(--lineHeight-s);font-size:var(--fontSize-s);line-height:var(--lineHeight-s);align-items:center;display:flex;justify-content:space-between}.ProseMirror-tableTitle:before{--Icon-fill:"FILL" 1;display:inline-block;font-family:Material Symbols Outlined;font-feature-settings:"liga";font-size:var(--Icon-size);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-variation-settings:var(--Icon-fill);font-weight:400;letter-spacing:normal;line-height:1;position:relative;text-rendering:optimizeLegibility;text-transform:none;top:calc((var(--Text-height) - var(--Icon-size)) / 2);vertical-align:top;white-space:nowrap;word-wrap:normal;content:"border_all"}[dir] .ProseMirror-tableTitle:before{transform:var(--Icon-transform)}[dir=ltr] .ProseMirror-tableTitle:before{direction:ltr;margin-right:var(--gap-xs)}[dir=rtl] .ProseMirror-tableTitle:before{direction:rtl;margin-left:var(--gap-xs)}[dir] .ProseMirror .ProseMirror-tableSubmenuList{margin:0;padding:0}.ProseMirror .ProseMirror-tableSubmenuList li{display:inline-block}.ProseMirror .ProseMirror-tableSubmenuList li a{display:block;text-decoration:none!important}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]{--Link-color:var(--color-black);--Link-hoverColor:var(--color-dominant5);--Link-hoverDecoration:none;color:var(--Link-color);display:inline-block;height:calc(var(--gap-s) * 2 + var(--Icon-size));overflow:hidden;position:relative;vertical-align:middle;width:calc(var(--gap-s) * 2 + var(--Icon-size))}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]{cursor:pointer}[dir] button.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]{background:transparent;border:0;padding:0}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{--Icon-fill:"FILL" 1;display:inline-block;font-family:Material Symbols Outlined;font-feature-settings:"liga";font-size:var(--Icon-size);-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-style:normal;font-variation-settings:var(--Icon-fill);font-weight:400;letter-spacing:normal;line-height:1;position:relative;text-rendering:optimizeLegibility;text-transform:none;top:calc((var(--Text-height) - var(--Icon-size)) / 2);vertical-align:top;white-space:nowrap;word-wrap:normal;content:var(--IconButton-name,attr(data-icon-button-name));height:var(--Icon-size);top:0;width:var(--Icon-size)}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{transform:var(--Icon-transform)}[dir=ltr] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{direction:ltr;padding:var(--gap-s) 100px 100px var(--gap-s)}[dir=rtl] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{direction:rtl;padding:var(--gap-s) var(--gap-s) 100px 100px}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{content:"";height:100%;opacity:0;position:absolute;top:0;transition:opacity var(--time-xs) var(--ease-in),transform var(--time-s) var(--ease-out);width:100%}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{background:var(--Link-color);border-radius:calc(var(--gap-s) + var(--Icon-size) / 2);transform:scale(0)}[dir=ltr] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{left:0}[dir=rtl] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:after{right:0}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:focus:before,.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:hover:before{color:var(--Link-hoverColor);position:relative;z-index:10}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:focus:after,.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:hover:after{opacity:.08}[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:focus:after,[dir] .ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:hover:after{transform:none}.ProseMirror .ProseMirror-tableSubmenuList li a[data-icon]:before{content:attr(data-icon)}.ProseMirror .ProseMirror-tableSubmenuList li a.remove{--Link-color:var(--color-red6);--Link-hoverColor:var(--color-red5);--Link-decoration:none}.ProseMirror-tableMenu{--Link-color:var(--color-black);--Link-hoverColor:var(--color-black);--Link-decoration:none;--Dropdown-markerSize:0px;--Link-hoverDecoration:none;max-height:45vh;max-width:45vw;opacity:0;overflow:auto;position:fixed;transition:opacity var(--time-xs) var(--ease-in),transform var(--time-s) var(--ease-out),visibility var(--time-s);visibility:hidden;z-index:2000000}[dir] .ProseMirror-tableMenu{background:var(--color-white);box-shadow:var(--shadow-3);padding:var(--gap-s) 0;transform:scaleY(0);transform-origin:top}.ProseMirror-tableMenu[data-tether-rx=l]{left:var(--Tether-rl)}.ProseMirror-tableMenu[data-tether-rx=r]{right:calc(100vw - var(--Tether-rl) - var(--Tether-rw))}.ProseMirror-tableMenu[data-tether-ry=t]{max-height:calc(100vh - var(--Tether-rt) - var(--Tether-rh) - var(--gap-xl));top:calc(var(--Tether-rt) + var(--Tether-rh) + var(--Dropdown-markerSize))}[dir] .ProseMirror-tableMenu[data-tether-ry=t]{transform-origin:top}.ProseMirror-tableMenu[data-tether-ry=b]{bottom:calc(100vh - var(--Tether-rt) + var(--Dropdown-markerSize));max-height:calc(var(--Tether-rt) - var(--Page-headerBottom) - var(--gap-xl))}[dir] .ProseMirror-tableMenu[data-tether-ry=b]{transform-origin:bottom}.ProseMirror-tableMenu.is-open{opacity:1;visibility:visible}[dir] .ProseMirror-tableMenu.is-open{transform:none}[dir] .ProseMirror-tableMenu.is-open:not(:hover) [role=menuitem]:focus{background:var(--color-dominant1)}.ProseMirror-tableMenu .ProseMirror-tableMenuList{list-style-type:none}[dir] .ProseMirror-tableMenu .ProseMirror-tableMenuList{margin:0;padding:0}.ProseMirror-tableMenu .ProseMirror-tableMenuList>li{display:block;font-size:inherit;width:100%}[dir] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li{background:transparent;padding:var(--gap-s) var(--gap-l);cursor:pointer}[dir=ltr] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li{text-align:left}[dir=rtl] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li{text-align:right}[dir] .ProseMirror-tableMenu .ProseMirror-tableMenuList>li:hover{background:var(--color-dominant1)}.ProseMirror-tableMenu .ProseMirror-tableMenuList>li[disabled]{opacity:.5;pointer-events:none}.ProseMirror-tableMenu .ProseMirror-tableMenuList>li>a{display:block;width:100%}.ProseMirror-table{border-collapse:separate;border-spacing:1px;overflow-x:auto;position:relative;table-layout:fixed;width:100%}[dir] .ProseMirror-table{margin-top:calc(var(--gap-m) - 1px)}.ProseMirror-table tbody{width:100%}.ProseMirror-table td{position:relative}[dir] .ProseMirror-table td{background:var(--color-white);border:1px solid var(--Input-borderColor);padding:var(--gap-xs) var(--gap-s)}[dir=ltr] .ProseMirror-table td .Enhancement,[dir=ltr] .ProseMirror-table td .Enhancement-preview,[dir=rtl] .ProseMirror-table td .Enhancement,[dir=rtl] .ProseMirror-table td .Enhancement-preview{margin-left:0;margin-right:0}[dir] .ProseMirror-table td.is-selected-cell,[dir] .ProseMirror-table td.selectedCell{border:1px solid var(--color-blue5)}.ProseMirror-table td .ProsemirrorEnhancementMenu-container-button:is(.arrow_upward,.arrow_downward,.open_with){display:none}.ProseMirror-table td .Enhancement.readOnly{align-items:center;display:flex;flex-wrap:wrap;overflow:hidden}.ProseMirror-table td .Enhancement-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}[dir=ltr] .ProseMirror-table td .ProsemirrorEnhancementMenu{margin-left:auto}[dir=rtl] .ProseMirror-table td .ProsemirrorEnhancementMenu{margin-right:auto}.ProseMirror-table td .ProsemirrorEnhancementMenu-container.is-block{position:static}.ProseMirror-table td .Enhancement-initialBody,.ProseMirror-table td .Enhancement-preview{flex:1 1 100%;min-width:0}',""]);const l=7717==o.j?n:null},76216(r,e,o){o.r(e),o.d(e,{default:()=>h});var i=o(96291),t=o.n(i),a=o(96918),n=o.n(a),l=o(77322),s=o.n(l),d=o(55800),c=o.n(d),b=o(10207),M=o.n(b),m=o(37746),u=o.n(m),v=o(27183),p={};p.styleTagTransform=u(),p.setAttributes=c(),p.insert=s().bind(null,"head"),p.domAPI=n(),p.insertStyleElement=M(),t()(v.A,p);const h=v.A&&v.A.locals?v.A.locals:void 0}}]);
@@ -1,4 +1,4 @@
1
- /*! For license information please see RTEProseMirror.e8521581e28e90ef6f30.js.LICENSE.txt */
1
+ /*! For license information please see RTEProseMirror.945bd28778b1a3e937c7.js.LICENSE.txt */
2
2
  (self.webpackChunkbrightspot_cms=self.webpackChunkbrightspot_cms||[]).push([[1386],{20429(e,t,a){var n={"./af":24832,"./af.js":24832,"./ar":61860,"./ar-dz":84546,"./ar-dz.js":84546,"./ar-kw":38853,"./ar-kw.js":38853,"./ar-ly":44370,"./ar-ly.js":44370,"./ar-ma":8053,"./ar-ma.js":8053,"./ar-sa":52783,"./ar-sa.js":52783,"./ar-tn":65425,"./ar-tn.js":65425,"./ar.js":61860,"./az":39980,"./az.js":39980,"./be":61878,"./be.js":61878,"./bg":70936,"./bg.js":70936,"./bm":50734,"./bm.js":50734,"./bn":47337,"./bn-bd":44906,"./bn-bd.js":44906,"./bn.js":47337,"./bo":13328,"./bo.js":13328,"./br":28901,"./br.js":28901,"./bs":91196,"./bs.js":91196,"./ca":26693,"./ca.js":26693,"./cs":93035,"./cs.js":93035,"./cv":81750,"./cv.js":81750,"./cy":717,"./cy.js":717,"./da":94772,"./da.js":94772,"./de":29568,"./de-at":22864,"./de-at.js":22864,"./de-ch":30706,"./de-ch.js":30706,"./de.js":29568,"./dv":29023,"./dv.js":29023,"./el":26818,"./el.js":26818,"./en-au":42741,"./en-au.js":42741,"./en-ca":47887,"./en-ca.js":47887,"./en-gb":85900,"./en-gb.js":85900,"./en-ie":45997,"./en-ie.js":45997,"./en-il":84716,"./en-il.js":84716,"./en-in":50394,"./en-in.js":50394,"./en-nz":40471,"./en-nz.js":40471,"./en-sg":1709,"./en-sg.js":1709,"./eo":85341,"./eo.js":85341,"./es":70097,"./es-do":19495,"./es-do.js":19495,"./es-mx":71043,"./es-mx.js":71043,"./es-us":12820,"./es-us.js":12820,"./es.js":70097,"./et":19418,"./et.js":19418,"./eu":65067,"./eu.js":65067,"./fa":38782,"./fa.js":38782,"./fi":5446,"./fi.js":5446,"./fil":73988,"./fil.js":73988,"./fo":11260,"./fo.js":11260,"./fr":6025,"./fr-ca":80628,"./fr-ca.js":80628,"./fr-ch":41509,"./fr-ch.js":41509,"./fr.js":6025,"./fy":51094,"./fy.js":51094,"./ga":23337,"./ga.js":23337,"./gd":11236,"./gd.js":11236,"./gl":73004,"./gl.js":73004,"./gom-deva":3879,"./gom-deva.js":3879,"./gom-latn":31678,"./gom-latn.js":31678,"./gu":23677,"./gu.js":23677,"./he":52444,"./he.js":52444,"./hi":59552,"./hi.js":59552,"./hr":15271,"./hr.js":15271,"./hu":55148,"./hu.js":55148,"./hy-am":75505,"./hy-am.js":75505,"./id":14774,"./id.js":14774,"./is":59717,"./is.js":59717,"./it":42950,"./it-ch":95832,"./it-ch.js":95832,"./it.js":42950,"./ja":85938,"./ja.js":85938,"./jv":90425,"./jv.js":90425,"./ka":18365,"./ka.js":18365,"./kk":15387,"./kk.js":15387,"./km":417,"./km.js":417,"./kn":67142,"./kn.js":67142,"./ko":78679,"./ko.js":78679,"./ku":79401,"./ku.js":79401,"./ky":30037,"./ky.js":30037,"./lb":30795,"./lb.js":30795,"./lo":42446,"./lo.js":42446,"./lt":76193,"./lt.js":76193,"./lv":66359,"./lv.js":66359,"./me":80499,"./me.js":80499,"./mi":74583,"./mi.js":74583,"./mk":29601,"./mk.js":29601,"./ml":85034,"./ml.js":85034,"./mn":59068,"./mn.js":59068,"./mr":88176,"./mr.js":88176,"./ms":85161,"./ms-my":80522,"./ms-my.js":80522,"./ms.js":85161,"./mt":68626,"./mt.js":68626,"./my":64423,"./my.js":64423,"./nb":52081,"./nb.js":52081,"./ne":57178,"./ne.js":57178,"./nl":86851,"./nl-be":61773,"./nl-be.js":61773,"./nl.js":86851,"./nn":65805,"./nn.js":65805,"./oc-lnc":32941,"./oc-lnc.js":32941,"./pa-in":2942,"./pa-in.js":2942,"./pl":93029,"./pl.js":93029,"./pt":80109,"./pt-br":4444,"./pt-br.js":4444,"./pt.js":80109,"./ro":93696,"./ro.js":93696,"./ru":5526,"./ru.js":5526,"./sd":31179,"./sd.js":31179,"./se":11633,"./se.js":11633,"./si":55981,"./si.js":55981,"./sk":93379,"./sk.js":93379,"./sl":21200,"./sl.js":21200,"./sq":93861,"./sq.js":93861,"./sr":18058,"./sr-cyrl":44579,"./sr-cyrl.js":44579,"./sr.js":18058,"./ss":26747,"./ss.js":26747,"./sv":91590,"./sv.js":91590,"./sw":7607,"./sw.js":7607,"./ta":36452,"./ta.js":36452,"./te":64048,"./te.js":64048,"./tet":65018,"./tet.js":65018,"./tg":75278,"./tg.js":75278,"./th":16053,"./th.js":16053,"./tk":6554,"./tk.js":6554,"./tl-ph":6432,"./tl-ph.js":6432,"./tlh":40941,"./tlh.js":40941,"./tr":44595,"./tr.js":44595,"./tzl":19351,"./tzl.js":19351,"./tzm":7814,"./tzm-latn":94126,"./tzm-latn.js":94126,"./tzm.js":7814,"./ug-cn":85675,"./ug-cn.js":85675,"./uk":71113,"./uk.js":71113,"./ur":34344,"./ur.js":34344,"./uz":21984,"./uz-latn":4872,"./uz-latn.js":4872,"./uz.js":21984,"./vi":59030,"./vi.js":59030,"./x-pseudo":62154,"./x-pseudo.js":62154,"./yo":35929,"./yo.js":35929,"./zh-cn":21197,"./zh-cn.js":21197,"./zh-hk":38073,"./zh-hk.js":38073,"./zh-mo":20346,"./zh-mo.js":20346,"./zh-tw":20126,"./zh-tw.js":20126};function s(e){var t=i(e);return a(t)}function i(e){if(!a.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}s.keys=function(){return Object.keys(n)},s.resolve=i,e.exports=s,s.id=20429},7620(e,t,a){var n={"./af":89225,"./af.js":89225,"./ar":26253,"./ar-dz":97772,"./ar-dz.js":97772,"./ar-kw":26044,"./ar-kw.js":26044,"./ar-ly":57179,"./ar-ly.js":57179,"./ar-ma":95244,"./ar-ma.js":95244,"./ar-sa":39974,"./ar-sa.js":39974,"./ar-tn":52616,"./ar-tn.js":52616,"./ar.js":26253,"./az":52789,"./az.js":52789,"./be":74687,"./be.js":74687,"./bg":83745,"./bg.js":83745,"./bm":63543,"./bm.js":63543,"./bn":82944,"./bn-bd":73907,"./bn-bd.js":73907,"./bn.js":82944,"./bo":26137,"./bo.js":26137,"./br":16092,"./br.js":16092,"./bs":4005,"./bs.js":4005,"./ca":13884,"./ca.js":13884,"./cs":80226,"./cs.js":80226,"./cv":94559,"./cv.js":94559,"./cy":71556,"./cy.js":71556,"./da":7581,"./da.js":7581,"./de":42377,"./de-at":35673,"./de-at.js":35673,"./de-ch":95099,"./de-ch.js":95099,"./de.js":42377,"./dv":16214,"./dv.js":16214,"./el":39627,"./el.js":39627,"./en-au":29932,"./en-au.js":29932,"./en-ca":83494,"./en-ca.js":83494,"./en-gb":66645,"./en-gb.js":66645,"./en-ie":81604,"./en-ie.js":81604,"./en-il":97525,"./en-il.js":97525,"./en-in":30979,"./en-in.js":30979,"./en-nz":27662,"./en-nz.js":27662,"./en-sg":88900,"./en-sg.js":88900,"./eo":72532,"./eo.js":72532,"./es":57288,"./es-do":6686,"./es-do.js":6686,"./es-mx":68077,"./es-mx.js":68077,"./es-us":25629,"./es-us.js":25629,"./es.js":57288,"./et":3,"./et.js":3,"./eu":52258,"./eu.js":52258,"./fa":3175,"./fa.js":3175,"./fi":18255,"./fi.js":18255,"./fil":86797,"./fil.js":86797,"./fo":24069,"./fo.js":24069,"./fr":41632,"./fr-ca":9789,"./fr-ca.js":9789,"./fr-ch":28700,"./fr-ch.js":28700,"./fr.js":41632,"./fy":63903,"./fy.js":63903,"./ga":58944,"./ga.js":58944,"./gd":75629,"./gd.js":75629,"./gl":85813,"./gl.js":85813,"./gom-deva":91070,"./gom-deva.js":91070,"./gom-latn":96071,"./gom-latn.js":96071,"./gu":10868,"./gu.js":10868,"./he":65253,"./he.js":65253,"./hi":72361,"./hi.js":72361,"./hr":2462,"./hr.js":2462,"./hu":19541,"./hu.js":19541,"./hy-am":62696,"./hy-am.js":62696,"./id":27583,"./id.js":27583,"./is":46908,"./is.js":46908,"./it":7343,"./it-ch":60225,"./it-ch.js":60225,"./it.js":7343,"./ja":50331,"./ja.js":50331,"./jv":77616,"./jv.js":77616,"./ka":5556,"./ka.js":5556,"./kk":2578,"./kk.js":2578,"./km":36024,"./km.js":36024,"./kn":79951,"./kn.js":79951,"./ko":65870,"./ko.js":65870,"./ku":15008,"./ku.js":15008,"./ky":17228,"./ky.js":17228,"./lb":17986,"./lb.js":17986,"./lo":55255,"./lo.js":55255,"./lt":11800,"./lt.js":11800,"./lv":53550,"./lv.js":53550,"./me":67850,"./me.js":67850,"./mi":61774,"./mi.js":61774,"./mk":16792,"./mk.js":16792,"./ml":14035,"./ml.js":14035,"./mn":71877,"./mn.js":71877,"./mr":985,"./mr.js":985,"./ms":72352,"./ms-my":9523,"./ms-my.js":9523,"./ms.js":72352,"./mt":33019,"./mt.js":33019,"./my":35262,"./my.js":35262,"./nb":39272,"./nb.js":39272,"./ne":86179,"./ne.js":86179,"./nl":57850,"./nl-be":97380,"./nl-be.js":97380,"./nl.js":57850,"./nn":52996,"./nn.js":52996,"./oc-lnc":20132,"./oc-lnc.js":20132,"./pa-in":67335,"./pa-in.js":67335,"./pl":80220,"./pl.js":80220,"./pt":15716,"./pt-br":17253,"./pt-br.js":17253,"./pt.js":15716,"./ro":6505,"./ro.js":6505,"./ru":18335,"./ru.js":18335,"./sd":40334,"./sd.js":40334,"./se":98824,"./se.js":98824,"./si":43172,"./si.js":43172,"./sk":64378,"./sk.js":64378,"./sl":34009,"./sl.js":34009,"./sq":64700,"./sq.js":64700,"./sr":47059,"./sr-cyrl":63994,"./sr-cyrl.js":63994,"./sr.js":47059,"./ss":62354,"./ss.js":62354,"./sv":55983,"./sv.js":55983,"./sw":94798,"./sw.js":94798,"./ta":49261,"./ta.js":49261,"./te":76857,"./te.js":76857,"./tet":45603,"./tet.js":45603,"./tg":88087,"./tg.js":88087,"./th":51660,"./th.js":51660,"./tk":19203,"./tk.js":19203,"./tl-ph":70825,"./tl-ph.js":70825,"./tlh":60196,"./tlh.js":60196,"./tr":15594,"./tr.js":15594,"./tzl":6542,"./tzl.js":6542,"./tzm":20623,"./tzm-latn":6935,"./tzm-latn.js":6935,"./tzm.js":20623,"./ug-cn":72866,"./ug-cn.js":72866,"./uk":6720,"./uk.js":6720,"./ur":47153,"./ur.js":47153,"./uz":86377,"./uz-latn":17681,"./uz-latn.js":17681,"./uz.js":86377,"./vi":71839,"./vi.js":71839,"./x-pseudo":91155,"./x-pseudo.js":91155,"./yo":23120,"./yo.js":23120,"./zh-cn":56804,"./zh-cn.js":56804,"./zh-hk":25264,"./zh-hk.js":25264,"./zh-mo":84579,"./zh-mo.js":84579,"./zh-tw":68584,"./zh-tw.js":68584};function s(e){var t=i(e);return a(t)}function i(e){if(!a.o(n,e)){var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}return n[e]}s.keys=function(){return Object.keys(n)},s.resolve=i,e.exports=s,s.id=7620},1359(e,t,a){"use strict";a.d(t,{A:()=>D}),a(50144);var n=a(38745),s=a(26594),i=a(56155),r=a(88903),o=(a(44764),a(84978),a(25809),a(91672),a(29171)),l=a(17319),c=a(80133),d=a(66556);function u(){u=function(){return e};var e={elementsDefinitionOrder:[["method"],["field"]],initializeInstanceElements:function(e,t){["method","field"].forEach(function(a){t.forEach(function(t){t.kind===a&&"own"===t.placement&&this.defineClassElement(e,t)},this)},this)},initializeClassElements:function(e,t){var a=e.prototype;["method","field"].forEach(function(n){t.forEach(function(t){var s=t.placement;if(t.kind===n&&("static"===s||"prototype"===s)){var i="static"===s?e:a;this.defineClassElement(i,t)}},this)},this)},defineClassElement:function(e,t){var a=t.descriptor;if("field"===t.kind){var n=t.initializer;a={enumerable:a.enumerable,writable:a.writable,configurable:a.configurable,value:void 0===n?void 0:n.call(e)}}Object.defineProperty(e,t.key,a)},decorateClass:function(e,t){var a=[],n=[],s={static:[],prototype:[],own:[]};if(e.forEach(function(e){this.addElementPlacement(e,s)},this),e.forEach(function(e){if(!m(e))return a.push(e);var t=this.decorateElement(e,s);a.push(t.element),a.push.apply(a,t.extras),n.push.apply(n,t.finishers)},this),!t)return{elements:a,finishers:n};var i=this.decorateConstructor(a,t);return n.push.apply(n,i.finishers),i.finishers=n,i},addElementPlacement:function(e,t,a){var n=t[e.placement];if(!a&&-1!==n.indexOf(e.key))throw new TypeError("Duplicated element ("+e.key+")");n.push(e.key)},decorateElement:function(e,t){for(var a=[],n=[],s=e.decorators,i=s.length-1;i>=0;i--){var r=t[e.placement];r.splice(r.indexOf(e.key),1);var o=this.fromElementDescriptor(e),l=this.toElementFinisherExtras((0,s[i])(o)||o);e=l.element,this.addElementPlacement(e,t),l.finisher&&n.push(l.finisher);var c=l.extras;if(c){for(var d=0;d<c.length;d++)this.addElementPlacement(c[d],t);a.push.apply(a,c)}}return{element:e,finishers:n,extras:a}},decorateConstructor:function(e,t){for(var a=[],n=t.length-1;n>=0;n--){var s=this.fromClassDescriptor(e),i=this.toClassDescriptor((0,t[n])(s)||s);if(void 0!==i.finisher&&a.push(i.finisher),void 0!==i.elements){e=i.elements;for(var r=0;r<e.length-1;r++)for(var o=r+1;o<e.length;o++)if(e[r].key===e[o].key&&e[r].placement===e[o].placement)throw new TypeError("Duplicated element ("+e[r].key+")")}}return{elements:e,finishers:a}},fromElementDescriptor:function(e){var t={kind:e.kind,key:e.key,placement:e.placement,descriptor:e.descriptor};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),"field"===e.kind&&(t.initializer=e.initializer),t},toElementDescriptors:function(e){if(void 0!==e)return(t=e,function(e){if(Array.isArray(e))return e}(t)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var a={}.toString.call(e).slice(8,-1);return"Object"===a&&e.constructor&&(a=e.constructor.name),"Map"===a||"Set"===a?Array.from(e):"Arguments"===a||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(a)?b(e,t):void 0}}(t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()).map(function(e){var t=this.toElementDescriptor(e);return this.disallowProperty(e,"finisher","An element descriptor"),this.disallowProperty(e,"extras","An element descriptor"),t},this);var t},toElementDescriptor:function(e){var t=e.kind+"";if("method"!==t&&"field"!==t)throw new TypeError('An element descriptor\'s .kind property must be either "method" or "field", but a decorator created an element descriptor with .kind "'+t+'"');var a=v(e.key),n=e.placement+"";if("static"!==n&&"prototype"!==n&&"own"!==n)throw new TypeError('An element descriptor\'s .placement property must be one of "static", "prototype" or "own", but a decorator created an element descriptor with .placement "'+n+'"');var s=e.descriptor;this.disallowProperty(e,"elements","An element descriptor");var i={kind:t,key:a,placement:n,descriptor:Object.assign({},s)};return"field"!==t?this.disallowProperty(e,"initializer","A method descriptor"):(this.disallowProperty(s,"get","The property descriptor of a field descriptor"),this.disallowProperty(s,"set","The property descriptor of a field descriptor"),this.disallowProperty(s,"value","The property descriptor of a field descriptor"),i.initializer=e.initializer),i},toElementFinisherExtras:function(e){return{element:this.toElementDescriptor(e),finisher:g(e,"finisher"),extras:this.toElementDescriptors(e.extras)}},fromClassDescriptor:function(e){var t={kind:"class",elements:e.map(this.fromElementDescriptor,this)};return Object.defineProperty(t,Symbol.toStringTag,{value:"Descriptor",configurable:!0}),t},toClassDescriptor:function(e){var t=e.kind+"";if("class"!==t)throw new TypeError('A class descriptor\'s .kind property must be "class", but a decorator created a class descriptor with .kind "'+t+'"');this.disallowProperty(e,"key","A class descriptor"),this.disallowProperty(e,"placement","A class descriptor"),this.disallowProperty(e,"descriptor","A class descriptor"),this.disallowProperty(e,"initializer","A class descriptor"),this.disallowProperty(e,"extras","A class descriptor");var a=g(e,"finisher");return{elements:this.toElementDescriptors(e.elements),finisher:a}},runClassFinishers:function(e,t){for(var a=0;a<t.length;a++){var n=(0,t[a])(e);if(void 0!==n){if("function"!=typeof n)throw new TypeError("Finishers must return a constructor.");e=n}}return e},disallowProperty:function(e,t,a){if(void 0!==e[t])throw new TypeError(a+" can't have a ."+t+" property.")}};return e}function p(e){var t,a=v(e.key);"method"===e.kind?t={value:e.value,writable:!0,configurable:!0,enumerable:!1}:"get"===e.kind?t={get:e.value,configurable:!0,enumerable:!1}:"set"===e.kind?t={set:e.value,configurable:!0,enumerable:!1}:"field"===e.kind&&(t={configurable:!0,writable:!0,enumerable:!0});var n={kind:"field"===e.kind?"field":"method",key:a,placement:e.static?"static":"field"===e.kind?"own":"prototype",descriptor:t};return e.decorators&&(n.decorators=e.decorators),"field"===e.kind&&(n.initializer=e.value),n}function h(e,t){void 0!==e.descriptor.get?t.descriptor.get=e.descriptor.get:t.descriptor.set=e.descriptor.set}function m(e){return e.decorators&&e.decorators.length}function f(e){return void 0!==e&&!(void 0===e.value&&void 0===e.writable)}function g(e,t){var a=e[t];if(void 0!==a&&"function"!=typeof a)throw new TypeError("Expected '"+t+"' to be a function");return a}function v(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var a=t.call(e,"string");if("object"!=typeof a)return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var a=0,n=Array(t);a<t;a++)n[a]=e[a];return n}function C(e,t,a,n){var s=w(y(1&n?e.prototype:e),t,a);return 2&n&&"function"==typeof s?function(e){return s.apply(a,e)}:s}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,a){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=y(e)););return e}(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(arguments.length<3?e:a):s.value}},w.apply(null,arguments)}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}let A=(E=[(0,l.EM)("btu-dropdown")],S=(0,c.m)(o.WF),I=u(),T=function(e,t){class a extends t{constructor(...t){super(...t),e(this)}}return{F:a,d:[{kind:"field",decorators:[(0,l.nJ)(".Dropdown-container")],key:"_dropdownContainer",value:void 0},{kind:"field",decorators:[(0,l.MZ)({type:Boolean})],key:"isEmpty",value:()=>!1},{kind:"method",key:"connectedCallback",value:function(){C(a,"connectedCallback",this,3)([]),this._dropdownContainer?.then(e=>{if(!e)return;const t=e.querySelector(".Dropdown-button"),a=e.querySelector(".Dropdown"),n=window.BRIGHTSPOT?.ui.cms.enableV5UI;n&&a?.setAttribute("popover",""),t?.addEventListener("click",()=>{(0,d.AM)(a,t),(0,d.D1)(a,t),n&&a?.togglePopover()})})}},{kind:"method",key:"disconnectedCallback",value:function(){C(a,"disconnectedCallback",this,3)([]),this._dropdownContainer?.then(e=>{if(!e)return;const t=e.querySelector(".Dropdown-button"),a=e.querySelector(".Dropdown");t?.removeEventListener("click",()=>{(0,d.AM)(a,t),(0,d.D1)(a,t)})})}},{kind:"method",key:"firstUpdated",value:function(){this._dropdownContainer?.then(e=>{this.querySelectorAll(":scope > li").forEach(e=>{this._addDropdownItem(e)});const t=e.querySelector(".Dropdown");this.isEmpty=0===t?.children.length})}},{kind:"method",key:"_addDropdownItem",value:function(e){e?.childNodes.length&&this._dropdownContainer?.then(t=>{const a=t.querySelector(".Dropdown"),n=e.querySelector(":scope > a, :scope > button");n?.classList.add("Dropdown-item"),n?.setAttribute("role","menuitem"),a?.appendChild(e)})}},{kind:"method",key:"createRenderRoot",value:function(){return this}},{kind:"method",key:"render",value:function(){return this.isEmpty?o.s6:o.qy`<div class="Dropdown-container">
3
3
  <button
4
4
  class="Dropdown-button"
@@ -29,7 +29,7 @@
29
29
  aria-orientation="vertical"
30
30
  aria-label=${window.BRIGHTSPOT?.ui.tooltips.actions?.actions}
31
31
  ></ul>
32
- </div>`}}]}}(function(e){I.initializeInstanceElements(e,k.elements)},S),k=I.decorateClass(function(e){for(var t=[],a=function(e){return"method"===e.kind&&e.key===i.key&&e.placement===i.placement},n=0;n<e.length;n++){var s,i=e[n];if("method"===i.kind&&(s=t.find(a)))if(f(i.descriptor)||f(s.descriptor)){if(m(i)||m(s))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");s.descriptor=i.descriptor}else{if(m(i)){if(m(s))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");s.decorators=i.decorators}h(i,s)}else t.push(i)}return t}(T.d.map(p)),E),I.initializeClassElements(T.F,k.elements),I.runClassFinishers(T.F,k.finishers));var E,S,I,T,k,M=a(55408),L=a(88630);class D{constructor(e,t){this._element=void 0,this._options=void 0,this._loadableTypes=void 0,this._node=void 0,this._editorView=void 0,this._element=e,this._options=t,this._loadableTypes=t.loadableTypes,this._node=t.node,this._editorView=t.editorView,this._update=(0,s.A)(this._update.bind(this)),this._update()}_update(){if(!this._element||this._element.closest(".is-gridItem")||this._element.closest(".is-listItem"))return;const e=new A;if(this._node){const e=(0,n.A)("ul",{className:"Dropdown",role:"menu","aria-label":window.BRIGHTSPOT?.ui.tooltips.actions?.contentSelector,"aria-orientation":"vertical"});if(this._element.addEventListener("click",()=>{const t=this._element.nextSibling;t instanceof HTMLElement&&M.A.toggle(this._element,t,()=>(this._element.classList.toggle("is-active",t.classList.toggle("is-open")),e.setAttribute("aria-expanded",t.classList.contains("is-open").valueOf().toString()),!0))}),this._loadableTypes){const t=JSON.parse(this._loadableTypes);for(const a in t){const t=(0,n.A)("li",{className:"Dropdown-item","aria-label":a,role:"menuitem"},a);e.appendChild(t),t.addEventListener("click",()=>{const e=new CustomEvent("interchange",{detail:this._options});if(this._loadableTypes){const t=JSON.parse(this._loadableTypes);this._node&&(this._node.attrs.attributes["data-convert-target"]=t[a]),this._editorView?.dispatchEvent(e)}})}}return void this._element.after(e)}const t=this._element.parentElement,a=t?.parentElement;if(!t||!a)return;const s=P(t,".objectId-edit"),r=P(t,".objectId-clear"),o=P(t,".RCIG-swap")||P(t,".EIG-swap"),l=P(t,".removeButton"),c=P(t,".MultiSortable-buttonToggle"),d=P(t,".convertButton"),u=P(t,".copyButton"),p=t.closest("form"),h=this._element.dataset.objectId,m=a.closest("[data-name]")?.dataset.name,f=a.dataset.fieldName,g=a.dataset.containerId,v=a.dataset.typeId,b=a.dataset.recordTypeId,C=a.dataset.sortableValidItemTypes,w=a.dataset.isSwappable,y=new FormData;m&&y.set("inputName",m),f&&y.set("fieldName",f),g&&y.set("containerId",g),v&&y.set("containerTypeId",v),b&&y.set("recordTypeId",b),C&&y.set("validTypes",C),w&&y.set("isSwappable",w);const E=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});if(s||r||o||l){if((c||t.classList.contains("Sortable-item")&&t.classList.contains("RCIG-item"))&&t.classList.add("toggleVisible"),this._element.after(e),s.length&&e._addDropdownItem((0,n.A)("li",s)),r.length&&e._addDropdownItem((0,n.A)("li",r)),o.length&&(e._addDropdownItem((0,n.A)("li",o)),o[0].ariaLabel=o[0].textContent),u.length&&(e._addDropdownItem((0,n.A)("li",u)),u[0].ariaLabel=u[0].textContent),d.length)for(const s of d)e._addDropdownItem((0,n.A)("li",s)),s.ariaLabel=s.textContent,s.addEventListener("click",()=>{if(p&&h){const e=x(t,p,h);if(e){const n=JSON.parse(e)._type,r=s.dataset.targetType,o=t.cloneNode(!1);n&&y.append("typeId",n),r&&y.append("targetTypeId",r),y.append("itemState",e),y.append("isConvert","true"),_(y,"/cms/drawer/item-interchange").then(e=>{o.innerHTML=e;const n=t.closest(".plugin-repeatable");n&&L(n).data("repeatable").itemLoad(t).then(()=>{L(n).data("repeatable").initItem(o),L(o).trigger("create"),a?.replaceChild(o,t),(0,i.A)(o,":scope > .repeatableLabel",e=>{o.classList.contains("is-collapsed")&&e.dispatchEvent(E),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{e.classList.contains("RCIG-title")&&e.focus()})})})})})}}});u.length&&u[0].addEventListener("click",()=>{if(p&&h){const e=x(t,p,h);if(e){const t=JSON.parse(e)._type;t&&y.append("typeId",t),y.append("itemState",e),_(y,"/cms/copy-record").then(e=>{const t=(new DOMParser).parseFromString(e,"text/html").body.firstChild;if(t){a?.appendChild(t);const e=t.closest(".plugin-repeatable");e&&L(e).data("repeatable").itemLoad(t).then(()=>{L(e).data("repeatable").initItem(t),(0,i.A)(t,":scope > .repeatableLabel",e=>{t.classList.contains("is-collapsed")&&e.dispatchEvent(E),t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),window.requestAnimationFrame(()=>{e.classList.contains("RCIG-title")&&e.focus()})})})}})}}})}}}const P=(e,t)=>{const a=Array.prototype.filter.call(e.children,function(e){return e.matches(t)});return a.length>0?a:[]},_=async(e,t)=>{const a=new Headers,n=r.A.get("bsp.csrf");n&&a.append("Brightspot-CSRF",n);const s=await fetch(t,{method:"POST",credentials:"include",body:e,headers:a});return await s.text()},x=(e,t,a)=>{const n=L(t).data("brightspot-content-state");if(n){const e=JSON.parse(n),t=O(e,a);if(t)return JSON.stringify(t)}return e.dataset.state},O=(e,t)=>{if(e._id===t)return e;{const a=Object.keys(e);for(const n of a){const a=e[n];if(a&&"object"==typeof a){const e=O(a,t);if(e)return e}}}}},80133(e,t,a){"use strict";a.d(t,{m:()=>n});const n=e=>class extends e{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-brightspot-element-connected",{}),e=>this.emit("btu-brightspot-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-brightspot-element-disconnected")}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}))}}},67324(e,t,a){"use strict";a.d(t,{m:()=>n});const n=e=>class extends e{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-brightspot-element-connected",{}),e=>this.emit("btu-brightspot-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-brightspot-element-disconnected")}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}))}}},1607(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(38745);if(7717==a.j)var s=a(68243);class i{static onFindFunction(e,t){return a=>{const n=new i(e,t,parseInt(a.style.getPropertyValue("--progress")));(0,s.A)(n.getElement(),a),a.hidden=!0}}constructor(e,t,a=0){this._circumference=void 0,this._element=void 0,this._value=0;const s=(0,n.A)("div"),i=e/2,r=i-t/2;if(this._circumference=2*Math.PI*r,s.innerHTML=`\n <svg class="RPB" viewBox="0 0 ${e} ${e}">\n <circle\n class="RPB-bg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t-1}"\n />\n <circle\n class="RPB-fg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t}"\n stroke-dasharray="${this._circumference}"\n stroke-dashoffset="${this._circumference}"\n />\n </svg>\n `,!(s.firstElementChild instanceof SVGElement))throw new Error("SVG not found");this._element=s.firstElementChild,this.setValue(a)}getElement(){return this._element}getValue(){return this._value}setValue(e){this._value=e,this._element.querySelector(":scope > .RPB-fg")?.setAttribute("stroke-dashoffset",""+this._circumference*(1-e/100))}}},88798(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(25936);if(3324==a.j)var s=a(39242);class i{static onFindFunction(e,t){return a=>{const n=new i(e,t,parseInt(a.style.getPropertyValue("--progress")));(0,s.A)(n.getElement(),a),a.hidden=!0}}constructor(e,t,a=0){this._circumference=void 0,this._element=void 0,this._value=0;const s=(0,n.A)("div"),i=e/2,r=i-t/2;if(this._circumference=2*Math.PI*r,s.innerHTML=`\n <svg class="RPB" viewBox="0 0 ${e} ${e}">\n <circle\n class="RPB-bg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t-1}"\n />\n <circle\n class="RPB-fg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t}"\n stroke-dasharray="${this._circumference}"\n stroke-dashoffset="${this._circumference}"\n />\n </svg>\n `,!(s.firstElementChild instanceof SVGElement))throw new Error("SVG not found");this._element=s.firstElementChild,this.setValue(a)}getElement(){return this._element}getValue(){return this._value}setValue(e){this._value=e,this._element.querySelector(":scope > .RPB-fg")?.setAttribute("stroke-dashoffset",""+this._circumference*(1-e/100))}}},25734(e,t,a){"use strict";a.d(t,{iP:()=>o,tK:()=>c,wC:()=>r}),a(44764);var n=a(56155);if(7717==a.j)var s=a(27170);var i=a(33582);function r(e,t){return e.replace(/_{3}/g,(a=0,e=>t[a++]));var a}function o(e,t){let a=document.getElementById("aria-live-container");a||(a=document.createElement("div"),a.setAttribute("id","aria-live-container"),document.body.appendChild(a));const n=document.createElement("div"),s="speak-"+Date.now();n.setAttribute("id",s),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.classList.add("screen-reader-only"),t&&t.length&&(e=r(`${e}`,t)),a.appendChild(n),setTimeout(()=>{const t=document.getElementById(s);t&&(t.innerHTML=e)},150),!0===window.BRIGHTSPOT?.ariaDebug&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(s)?.remove()},2e3)}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("btu-announce",e=>{e instanceof CustomEvent&&o(e.detail)})});const l=[];(0,n.A)("[data-aria-announce]",e=>{l.push(e),setTimeout(()=>{if(l.length>0){const e=l.map(e=>"true"===e.dataset.ariaAnnounce?e.textContent:e.dataset.ariaAnnounce).join(", ");l.length=0,o(e)}},2500)}),(0,i.A)([".addButton",".Workflow-addState",".Workflow-addTransition",".calendarButton",".ComboInput"],e=>{const t=e.closest(".CIG-row");if(!t)return;const a=t.querySelector(".Message.is-error");if(!a)return;const n=a.getAttribute("id");n&&(e.setAttribute("aria-describedby",n),e.setAttribute("aria-invalid","true"))}),(0,i.A)('a[role="button"]',e=>{e.addEventListener("keydown",t=>{"Space"===t.code&&(t.preventDefault(),e.click())})});const c=e=>{(0,s.A)(1e3,()=>o(e))}},90127(e,t,a){"use strict";a.d(t,{iP:()=>o,tK:()=>c,wC:()=>r}),a(57573);var n=a(91762);if(3324==a.j)var s=a(39979);var i=a(46391);function r(e,t){return e.replace(/_{3}/g,(a=0,e=>t[a++]));var a}function o(e,t){let a=document.getElementById("aria-live-container");a||(a=document.createElement("div"),a.setAttribute("id","aria-live-container"),document.body.appendChild(a));const n=document.createElement("div"),s="speak-"+Date.now();n.setAttribute("id",s),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.classList.add("screen-reader-only"),t&&t.length&&(e=r(`${e}`,t)),a.appendChild(n),setTimeout(()=>{const t=document.getElementById(s);t&&(t.innerHTML=e)},150),!0===window.BRIGHTSPOT?.ariaDebug&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(s)?.remove()},2e3)}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("btu-announce",e=>{e instanceof CustomEvent&&o(e.detail)})});const l=[];(0,n.A)("[data-aria-announce]",e=>{l.push(e),setTimeout(()=>{if(l.length>0){const e=l.map(e=>"true"===e.dataset.ariaAnnounce?e.textContent:e.dataset.ariaAnnounce).join(", ");l.length=0,o(e)}},2500)}),(0,i.A)([".addButton",".Workflow-addState",".Workflow-addTransition",".calendarButton",".ComboInput"],e=>{const t=e.closest(".CIG-row");if(!t)return;const a=t.querySelector(".Message.is-error");if(!a)return;const n=a.getAttribute("id");n&&(e.setAttribute("aria-describedby",n),e.setAttribute("aria-invalid","true"))}),(0,i.A)('a[role="button"]',e=>{e.addEventListener("keydown",t=>{"Space"===t.code&&(t.preventDefault(),e.click())})});const c=e=>{(0,s.A)(1e3,()=>o(e))}},68243(e,t,a){"use strict";function n(e,t){return t?.parentNode?.insertBefore(e,t),e}a.d(t,{A:()=>n})},39242(e,t,a){"use strict";function n(e,t){return t?.parentNode?.insertBefore(e,t),e}a.d(t,{A:()=>n})},33582(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(56155);let s=0;function i(e,t){const a="_ovc"+s++,i=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){const e=n.target,s=e.classList;s.contains(a)||(s.add(a),i.unobserve(e),t(e))}});(0,n.A)(e,e=>{i.observe(e)})}},46391(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(91762);let s=0;function i(e,t){const a="_ovc"+s++,i=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){const e=n.target,s=e.classList;s.contains(a)||(s.add(a),i.unobserve(e),t(e))}});(0,n.A)(e,e=>{i.observe(e)})}},89561(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(83394)},76752(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(96203)},10013(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(33582)},97204(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(46391)},3315(e,t,a){"use strict";if(a.d(t,{K:()=>s}),7717==a.j)var n=a(83043);function s(e,t){if(e&&t)try{const a=(window.BRIGHTSPOT?.icons?.materialToLucide||{})[e]??e,s=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=n[s];i?.encodedCode&&t.style.setProperty("--compat-icon",`'${i.encodedCode}'`),document.dispatchEvent(new CustomEvent("btu-resolve-icon",{detail:{name:a,element:t}}))}catch(t){console.error(`[resolveIconCompat] Failed to resolve icon "${e}":`,t)}}},22730(e,t,a){"use strict";if(a.d(t,{K:()=>s}),3324==a.j)var n=a(54042);function s(e,t){if(e&&t)try{const a=(window.BRIGHTSPOT?.icons?.materialToLucide||{})[e]??e,s=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=n[s];i?.encodedCode&&t.style.setProperty("--compat-icon",`'${i.encodedCode}'`),document.dispatchEvent(new CustomEvent("btu-resolve-icon",{detail:{name:a,element:t}}))}catch(t){console.error(`[resolveIconCompat] Failed to resolve icon "${e}":`,t)}}},52215(e,t,a){"use strict";a.r(t),a.d(t,{default:()=>n.A});var n=a(26791)},23054(e,t,a){"use strict";a.r(t),a.d(t,{default:()=>n.A});var n=a(75230)},73061(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{RTE:()=>w}),a(44764),a(50144),a(84978),a(13722),a(25809),a(91672),a(92280);var s=a(27791),i=a(26173);if(7717==a.j)var r=a(17283);var o=a(46929),l=a(90458),c=a(55053),d=a(77281),u=a(52215);if(7717==a.j)var p=a(24455);if(7717==a.j)var h=a(40320);if(7717==a.j)var m=a(13333);if(a(22628),7717==a.j)var f=a(36500);a(65210);var g=a(92),v=a(25734),b=a(1439),C=e([s,i,l,c,d]);[s,i,l,c,d]=C.then?(await C)():C,window.BRIGHTSPOT?.ui.cms.enableV5UI?await a.e(2111).then(a.bind(a,92111)):(await Promise.resolve().then(a.bind(a,65210)),await a.e(9576).then(a.bind(a,99576)),await a.e(7863).then(a.bind(a,77863)));class w{constructor(e,t,a,n,r,c,d,h,C,w){this.setValue=e=>{const{state:t,dispatch:a}=this.view;(0,i.y6)(t,e,this.compliantTagNameMap,a,!0,!0,!1)},this.setMinHeight=()=>{this.view.dom.style.setProperty("--ProseMirror-numLines",this.numLines)},this.hideLoader=()=>{const e=this.view.dom.parentElement.previousSibling;e&&(e.classList.add("hide"),e.style.minHeight=0),this.view.dom.parentElement.classList.remove("hide")},this.handlePlaceholderUpdate=e=>{const{state:t,dispatch:a,dom:n}=this.view,r=this.ctx.getAttribute("placeholder"),o=l.wM.serialize(t.doc.content,this.compliantTagNameMap);e?.clearOnChange||n.parentElement.classList.contains(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)||""===o&&o!==r?(0,i.y6)(t,r,this.compliantTagNameMap,a,!1,!0):o===r&&this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)},this.getInitialContent=()=>{let e=this.ctx.value;!e&&this.ctx.hasAttribute("placeholder")&&(e=this.ctx.getAttribute("placeholder"));const t="com.psddev.conversation.Post"===this.ctx.closest(".CIG")?.dataset?.type,a=document.createElement("div");return a.innerHTML=(0,o.n)(e,this.schema,this.compliantTagNameMap,!1,t),m.S4.fromSchema(this.schema).parse(a,{preserveWhitespace:"full"})},this.buildView=(e,t,a,n,r)=>{const o=(0,i.Gu)(e,this.menuItems,s.eu,this.schema,this.userId,this.userLabel,t,a,n,r,this.isCollab,this.ctx,this.compliantTagNameMap);if(this.view=this.getView(o),ENABLE_PROSE_MIRROR_SPELL_CHECK&&(this.view.dom.spellcheck=!1),this.setMinHeight(),this.hideLoader(),this.view.submenu=document.createElement("div"),this.view.submenu.className="ProsemirrorEnhancementMenuContainer",this.view.dom.parentNode.append(this.view.submenu),this.initialPayload){const e=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);this.ctx.value=e;const t=document.createEvent("HTMLEvents");t.initEvent("input",!0,!1),this.ctx.dispatchEvent(t)}this.loaded=!0,this.ctx.getAttributeNames().filter(e=>e.startsWith("aria-")).forEach(e=>{this.view.dom.setAttribute(e,this.ctx.getAttribute(e))});const c=this.view.dom.closest(".CIG-row");if(c){const e=c.querySelector(".Message.is-error");if(e){const t=e.getAttribute("id");t&&(this.view.dom.setAttribute("aria-describedby",t),this.view.dom.setAttribute("aria-invalid","true"))}}!this.ctx.hasAttribute("placeholder")||this.ctx.getAttribute("placeholder")!==this.ctx.value&&this.ctx.value||this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT),this.$ctx.on("placeholderUpdate",(e,t)=>{this.handlePlaceholderUpdate(t)}),new ResizeObserver(()=>{this.view&&this.view.props&&this.view.props.props&&this.view.props.props.resizeCallbacks&&this.view.props.props.resizeCallbacks.forEach(e=>{e.callback&&e.callback()})}).observe(this.view.dom),PubSub.publish("rteLoaded",this)},this.createLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"lockOnly",clientId:this.userId,lockedId:e})},this.removeLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"unlockOnly",clientId:this.userId,lockedId:e})},this.createNewRecord=e=>{this.pendingRequest=(0,f.A)(),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"create",rangeList:JSON.stringify([]),requestId:this.pendingRequest,doc:JSON.stringify(e.toJSON())})},this.createRecord=(e,t)=>{if(this.pendingRequest)return void(this.hasQueuedRequest=!0);if(this.pendingRequest=(0,f.A)(),!e||!t)return void(this.hasCursorState&&(u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!1));const a=(0,p._X)(t),{anchor:n,ranges:s,empty:i}=t.selection;if(a){const e=JSON.stringify(t.doc.toJSON());u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,stepsList:JSON.stringify(a.steps),doc:e,version:a.version,clientId:this.userId,anchor:JSON.stringify({[this.userId]:n}),type:"steps",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0}else if(i)u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0;else{const e=[];s.forEach(t=>{const{$from:a,$to:n}=t,s=a.pos,i=n.pos;e.push({from:s,to:i,clientId:this.userId,requestId:this.pendingRequest})}),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"range",rangeList:JSON.stringify(e),requestId:this.pendingRequest}),this.hasCursorState=!0}},this.setUpWordCount=()=>{this.view.wordCount=document.createElement("div");const e=this.view.wordCount;e.className="CIG-wordCount",e.setAttribute("role","status"),e.setAttribute("aria-live","off"),this.toolbarWrapper.appendChild(e);const t=this.toolbarWrapper.querySelectorAll("[data-rte-style='rte2-toolbar-find'], [data-rte-style='rte2-toolbar-fullscreen'], [data-rte-style='rte2-toolbar-ai-inline']").length;this.toolbarWrapper.dataset.sidebarIconCount=t,3===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithThreeIcons)":2===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithTwoIcons)":1===t&&(e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithOneIcon)")},this.handleWordCount=()=>{this.view.wordCount&&(this.wordCountScheduled||(this.wordCountScheduled=!0,requestAnimationFrame(()=>{this.wordCountScheduled=!1,this.calculateWordCount()})))},this.calculateWordCount=()=>{if(!this.view.wordCount)return;const e=/[0-9_'-\u0027\u2019\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+/g;let t=0,a=0;const n=new Set(["del","comment","html"]);this.parentElement.classList.contains("isPlaceholderContent")&&!this.ctx.hasAttribute("data-editable-placeholder")||this.view.state.doc.descendants((s,i)=>{if(s.isText&&!s.marks.some(e=>n.has(e.type.name))){t+=s.text.length;const n=s.text.match(e);n&&(a+=n.length)}}),this.updateWordCountDisplay(a,t)},this.updateWordCountDisplay=(e,t)=>{const a=+this.ctx.dataset.suggestedMinimum,n=+this.ctx.dataset.suggestedMaximum,s=t<a?this.ctx.dataset.suggestedMinimumMessage:t>n?this.ctx.dataset.suggestedMaximumMessage:"",i=s||`${e}w ${t}c`;i!==this.lastDisplayText&&(this.lastDisplayText=i,this.view.wordCount.innerText=i,this.view.wordCount.setAttribute("aria-label",(0,g.QX)(e,t,s)),requestAnimationFrame(()=>{const e=this.view.wordCount.clientWidth;e!==this.lastMeasuredWidth&&(this.lastMeasuredWidth=e,this.toolbarWrapper.style.setProperty("--ProseMirror-wordCount",`${e}px`))}),(0,v.tK)((0,g.y)(e,t,a,n,this.ctx.dataset.suggestedMinimumMessage,this.ctx.dataset.suggestedMaximumMessage)))},e.setAttribute("style",s.AA.STYLES.DISPLAY_NONE),this.ctx=e,this.$ctx=b(e),this.schema=(0,s.e$)(t,c,C),this.pendingRequest=null,this.userId=r,this.userLabel=n,this.compliantTagNameMap=C,this.menuItems=(0,s.OF)(t,this.schema,a,n,r,c);const y=document.createElement("div");if(y.className="ProseMirrorContainer hide",this.ctx.parentNode.appendChild(y),h){const e=document.createElement("div");e.className=s.AA.CLASSES.PM_AVATAR_WRAPPER,y.appendChild(e)}this.toolbarWrapper=document.createElement("div"),this.toolbarWrapper.className="ProseMirrorToolbar",y.appendChild(this.toolbarWrapper),this.numLines=w,this.fieldName=d,this.isCollab=h,this.loaded=!1,this.hasCursorState=!1,this.parentElement=y,this.wordCountScheduled=!1,this.lastDisplayText="",this.lastMeasuredWidth=0,y.addEventListener("click",e=>{"A"!==e.target.tagName&&"LI"!==e.target.tagName||e.target.setAttribute("data-leave-popup-open","true")}),y.addEventListener("dragstart",e=>{e.preventDefault()}),y.addEventListener("com.psddev.cms.rte.clear",()=>{const{state:e,dispatch:t}=this.view;(0,i.y6)(e,"",this.compliantTagNameMap,t,!1,!0)}),this.isCollab&&(u.default.execute("com.psddev.cms.rte.RichTextCollabUserAction",{fieldName:this.fieldName}),window.addEventListener("click",e=>{if(!this.view||!this.view.dom)return;let t=e.target,a=!1;for(;t;){if(this.view.dom.parentNode===t){a=!0;break}t=t.parentElement}a||this.createRecord()}),window.addEventListener("unload",e=>{this.createRecord()}),PubSub.subscribe("collabLock",e=>{const{id:t}=e;this.createLockRecord(t)}),PubSub.subscribe("collabUnlock",e=>{const{id:t}=e;this.removeLockRecord(t)}))}init(){if(this.isCollab)u.default.initialize("com.psddev.cms.rte.RichTextCollabItemState",{fieldName:this.fieldName},()=>{if(this.loaded)return;let e,t=0,a={},n=[],s=this.lockedList={};this.initialPayload?(t=parseInt(this.initialPayload.version),e=this.schema.nodeFromJSON(JSON.parse(this.initialPayload.doc)),a=this.initialPayload.anchorMap,n=this.initialPayload.rangeList,s=this.initialPayload.lockedList||{}):(e=this.getInitialContent(),this.createNewRecord(e)),this.buildView(e,t,a,n,s),this.setUpWordCount(),this.handleWordCount()}),u.default.receive("com.psddev.cms.rte.RichTextCollabItemBroadcast",e=>{if(e.fieldName!==this.fieldName)return;if(!this.loaded)return void(this.initialPayload=e);(e.resolvedRequestIds[this.pendingRequest]||0===e.version)&&(this.pendingRequest=null);const t=(0,p.HF)(this.view.state);e.wasRejected&&this.createRecord(this.view.state.tr,this.view.state);const a=e.stepsList,n=e.clientList,s=a.slice(t),i=n.slice(t);try{let t=(0,p.kq)(this.view.state,s.map(e=>h.pn.fromJSON(this.schema,e)),i,{mapSelectionBackward:!0});t.type="received",t.setMeta("collabManager$",{anchorMap:e.anchorMap,rangeList:e.rangeList,lockedList:e.lockedList||{}}),this.dispatchAction(t),this.hasQueuedRequest&&(this.hasQueuedRequest=!1,this.createRecord(this.view.state.tr,this.view.state))}catch(e){console.log(e)}});else{const e=this.getInitialContent();let t=0,a={},n=[];this.buildView(e,t,a,n),this.setUpWordCount(),this.handleWordCount()}}dispatchAction(e){const t=this.view.state.apply(e);if(this.view.updateState(t),"received"!==e.type&&this.isCollab&&this.createRecord(e,t),e.docChanged){const t=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);if(this.ctx.getAttribute("placeholder")&&t===this.ctx.getAttribute("placeholder")?(this.ctx.value="",this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)):(this.ctx.value=t,this.parentElement.classList.remove(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)),this.handleWordCount(),!e.getMeta("disableNativeEvent")){const e=document.createEvent("HTMLEvents");e.initEvent("input",!0,!1),this.ctx.dispatchEvent(e)}}}getView(e){const t={};RICH_TEXT_ELEMENTS_PM.filter(e=>e.popup&&"table"!==e.tag&&"tr"!==e.tag&&"td"!==e.tag&&"ul"!==e.tag&&"ol"!==e.tag).forEach(e=>{t[e.tag]=(e,t,a)=>new c.G(e,t,a,this.lockedList,this.isCollab)});const a=m.ZF.fromSchema(e.config.schema),n=new m.ZF(Object.assign({},a.nodes,{line:function(e){return["p",e.attrs,0]}}),a.marks),s=!this.ctx.closest(".is-readOnly");return new r.Lz(this.parentElement,{state:e,editable:()=>s,attributes:{tabIndex:"0"},dispatchTransaction:this.dispatchAction.bind(this),nodeViews:{inlineEnhancement:(e,t,a)=>new c.G(e,t,a),blockEnhancement:(e,t,a)=>new c.G(e,t,a),table:(e,t,a)=>new d.Q(e,t,a),...t},clipboardSerializer:n,props:{ctx:this.ctx,isFullScreen:!1,resizeCallbacks:[]}})}}n()}catch(e){n(e)}},1)},60252(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{RTE:()=>w}),a(57573),a(62953),a(49371),a(42723),a(96648),a(56065),a(56673);var s=a(14982),i=a(13364);if(3324==a.j)var r=a(88282);var o=a(34120),l=a(19459),c=a(42244),d=a(64472),u=a(23054);if(3324==a.j)var p=a(11646);if(3324==a.j)var h=a(53129);if(3324==a.j)var m=a(48940);if(a(87021),3324==a.j)var f=a(49309);a(61685);var g=a(88420),v=a(90127),b=a(88630),C=e([s,i,l,c,d]);[s,i,l,c,d]=C.then?(await C)():C,window.BRIGHTSPOT?.ui.cms.enableV5UI?await a.e(7718).then(a.bind(a,27718)):(await Promise.resolve().then(a.bind(a,61685)),await a.e(7923).then(a.bind(a,77923)),await a.e(4168).then(a.bind(a,64168)));class w{constructor(e,t,a,n,r,c,d,h,C,w){this.setValue=e=>{const{state:t,dispatch:a}=this.view;(0,i.y6)(t,e,this.compliantTagNameMap,a,!0,!0,!1)},this.setMinHeight=()=>{this.view.dom.style.setProperty("--ProseMirror-numLines",this.numLines)},this.hideLoader=()=>{const e=this.view.dom.parentElement.previousSibling;e&&(e.classList.add("hide"),e.style.minHeight=0),this.view.dom.parentElement.classList.remove("hide")},this.handlePlaceholderUpdate=e=>{const{state:t,dispatch:a,dom:n}=this.view,r=this.ctx.getAttribute("placeholder"),o=l.wM.serialize(t.doc.content,this.compliantTagNameMap);e?.clearOnChange||n.parentElement.classList.contains(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)||""===o&&o!==r?(0,i.y6)(t,r,this.compliantTagNameMap,a,!1,!0):o===r&&this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)},this.getInitialContent=()=>{let e=this.ctx.value;!e&&this.ctx.hasAttribute("placeholder")&&(e=this.ctx.getAttribute("placeholder"));const t="com.psddev.conversation.Post"===this.ctx.closest(".CIG")?.dataset?.type,a=document.createElement("div");return a.innerHTML=(0,o.n)(e,this.schema,this.compliantTagNameMap,!1,t),m.S4.fromSchema(this.schema).parse(a,{preserveWhitespace:"full"})},this.buildView=(e,t,a,n,r)=>{const o=(0,i.Gu)(e,this.menuItems,s.eu,this.schema,this.userId,this.userLabel,t,a,n,r,this.isCollab,this.ctx,this.compliantTagNameMap);if(this.view=this.getView(o),ENABLE_PROSE_MIRROR_SPELL_CHECK&&(this.view.dom.spellcheck=!1),this.setMinHeight(),this.hideLoader(),this.view.submenu=document.createElement("div"),this.view.submenu.className="ProsemirrorEnhancementMenuContainer",this.view.dom.parentNode.append(this.view.submenu),this.initialPayload){const e=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);this.ctx.value=e;const t=document.createEvent("HTMLEvents");t.initEvent("input",!0,!1),this.ctx.dispatchEvent(t)}this.loaded=!0,this.ctx.getAttributeNames().filter(e=>e.startsWith("aria-")).forEach(e=>{this.view.dom.setAttribute(e,this.ctx.getAttribute(e))});const c=this.view.dom.closest(".CIG-row");if(c){const e=c.querySelector(".Message.is-error");if(e){const t=e.getAttribute("id");t&&(this.view.dom.setAttribute("aria-describedby",t),this.view.dom.setAttribute("aria-invalid","true"))}}!this.ctx.hasAttribute("placeholder")||this.ctx.getAttribute("placeholder")!==this.ctx.value&&this.ctx.value||this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT),this.$ctx.on("placeholderUpdate",(e,t)=>{this.handlePlaceholderUpdate(t)}),new ResizeObserver(()=>{this.view&&this.view.props&&this.view.props.props&&this.view.props.props.resizeCallbacks&&this.view.props.props.resizeCallbacks.forEach(e=>{e.callback&&e.callback()})}).observe(this.view.dom),PubSub.publish("rteLoaded",this)},this.createLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"lockOnly",clientId:this.userId,lockedId:e})},this.removeLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"unlockOnly",clientId:this.userId,lockedId:e})},this.createNewRecord=e=>{this.pendingRequest=(0,f.A)(),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"create",rangeList:JSON.stringify([]),requestId:this.pendingRequest,doc:JSON.stringify(e.toJSON())})},this.createRecord=(e,t)=>{if(this.pendingRequest)return void(this.hasQueuedRequest=!0);if(this.pendingRequest=(0,f.A)(),!e||!t)return void(this.hasCursorState&&(u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!1));const a=(0,p._X)(t),{anchor:n,ranges:s,empty:i}=t.selection;if(a){const e=JSON.stringify(t.doc.toJSON());u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,stepsList:JSON.stringify(a.steps),doc:e,version:a.version,clientId:this.userId,anchor:JSON.stringify({[this.userId]:n}),type:"steps",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0}else if(i)u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0;else{const e=[];s.forEach(t=>{const{$from:a,$to:n}=t,s=a.pos,i=n.pos;e.push({from:s,to:i,clientId:this.userId,requestId:this.pendingRequest})}),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"range",rangeList:JSON.stringify(e),requestId:this.pendingRequest}),this.hasCursorState=!0}},this.setUpWordCount=()=>{this.view.wordCount=document.createElement("div");const e=this.view.wordCount;e.className="CIG-wordCount",e.setAttribute("role","status"),e.setAttribute("aria-live","off"),this.toolbarWrapper.appendChild(e);const t=this.toolbarWrapper.querySelectorAll("[data-rte-style='rte2-toolbar-find'], [data-rte-style='rte2-toolbar-fullscreen'], [data-rte-style='rte2-toolbar-ai-inline']").length;this.toolbarWrapper.dataset.sidebarIconCount=t,3===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithThreeIcons)":2===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithTwoIcons)":1===t&&(e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithOneIcon)")},this.handleWordCount=()=>{this.view.wordCount&&(this.wordCountScheduled||(this.wordCountScheduled=!0,requestAnimationFrame(()=>{this.wordCountScheduled=!1,this.calculateWordCount()})))},this.calculateWordCount=()=>{if(!this.view.wordCount)return;const e=/[0-9_'-\u0027\u2019\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+/g;let t=0,a=0;const n=new Set(["del","comment","html"]);this.parentElement.classList.contains("isPlaceholderContent")&&!this.ctx.hasAttribute("data-editable-placeholder")||this.view.state.doc.descendants((s,i)=>{if(s.isText&&!s.marks.some(e=>n.has(e.type.name))){t+=s.text.length;const n=s.text.match(e);n&&(a+=n.length)}}),this.updateWordCountDisplay(a,t)},this.updateWordCountDisplay=(e,t)=>{const a=+this.ctx.dataset.suggestedMinimum,n=+this.ctx.dataset.suggestedMaximum,s=t<a?this.ctx.dataset.suggestedMinimumMessage:t>n?this.ctx.dataset.suggestedMaximumMessage:"",i=s||`${e}w ${t}c`;i!==this.lastDisplayText&&(this.lastDisplayText=i,this.view.wordCount.innerText=i,this.view.wordCount.setAttribute("aria-label",(0,g.QX)(e,t,s)),requestAnimationFrame(()=>{const e=this.view.wordCount.clientWidth;e!==this.lastMeasuredWidth&&(this.lastMeasuredWidth=e,this.toolbarWrapper.style.setProperty("--ProseMirror-wordCount",`${e}px`))}),(0,v.tK)((0,g.y)(e,t,a,n,this.ctx.dataset.suggestedMinimumMessage,this.ctx.dataset.suggestedMaximumMessage)))},e.setAttribute("style",s.AA.STYLES.DISPLAY_NONE),this.ctx=e,this.$ctx=b(e),this.schema=(0,s.e$)(t,c,C),this.pendingRequest=null,this.userId=r,this.userLabel=n,this.compliantTagNameMap=C,this.menuItems=(0,s.OF)(t,this.schema,a,n,r,c);const y=document.createElement("div");if(y.className="ProseMirrorContainer hide",this.ctx.parentNode.appendChild(y),h){const e=document.createElement("div");e.className=s.AA.CLASSES.PM_AVATAR_WRAPPER,y.appendChild(e)}this.toolbarWrapper=document.createElement("div"),this.toolbarWrapper.className="ProseMirrorToolbar",y.appendChild(this.toolbarWrapper),this.numLines=w,this.fieldName=d,this.isCollab=h,this.loaded=!1,this.hasCursorState=!1,this.parentElement=y,this.wordCountScheduled=!1,this.lastDisplayText="",this.lastMeasuredWidth=0,y.addEventListener("click",e=>{"A"!==e.target.tagName&&"LI"!==e.target.tagName||e.target.setAttribute("data-leave-popup-open","true")}),y.addEventListener("dragstart",e=>{e.preventDefault()}),y.addEventListener("com.psddev.cms.rte.clear",()=>{const{state:e,dispatch:t}=this.view;(0,i.y6)(e,"",this.compliantTagNameMap,t,!1,!0)}),this.isCollab&&(u.default.execute("com.psddev.cms.rte.RichTextCollabUserAction",{fieldName:this.fieldName}),window.addEventListener("click",e=>{if(!this.view||!this.view.dom)return;let t=e.target,a=!1;for(;t;){if(this.view.dom.parentNode===t){a=!0;break}t=t.parentElement}a||this.createRecord()}),window.addEventListener("unload",e=>{this.createRecord()}),PubSub.subscribe("collabLock",e=>{const{id:t}=e;this.createLockRecord(t)}),PubSub.subscribe("collabUnlock",e=>{const{id:t}=e;this.removeLockRecord(t)}))}init(){if(this.isCollab)u.default.initialize("com.psddev.cms.rte.RichTextCollabItemState",{fieldName:this.fieldName},()=>{if(this.loaded)return;let e,t=0,a={},n=[],s=this.lockedList={};this.initialPayload?(t=parseInt(this.initialPayload.version),e=this.schema.nodeFromJSON(JSON.parse(this.initialPayload.doc)),a=this.initialPayload.anchorMap,n=this.initialPayload.rangeList,s=this.initialPayload.lockedList||{}):(e=this.getInitialContent(),this.createNewRecord(e)),this.buildView(e,t,a,n,s),this.setUpWordCount(),this.handleWordCount()}),u.default.receive("com.psddev.cms.rte.RichTextCollabItemBroadcast",e=>{if(e.fieldName!==this.fieldName)return;if(!this.loaded)return void(this.initialPayload=e);(e.resolvedRequestIds[this.pendingRequest]||0===e.version)&&(this.pendingRequest=null);const t=(0,p.HF)(this.view.state);e.wasRejected&&this.createRecord(this.view.state.tr,this.view.state);const a=e.stepsList,n=e.clientList,s=a.slice(t),i=n.slice(t);try{let t=(0,p.kq)(this.view.state,s.map(e=>h.pn.fromJSON(this.schema,e)),i,{mapSelectionBackward:!0});t.type="received",t.setMeta("collabManager$",{anchorMap:e.anchorMap,rangeList:e.rangeList,lockedList:e.lockedList||{}}),this.dispatchAction(t),this.hasQueuedRequest&&(this.hasQueuedRequest=!1,this.createRecord(this.view.state.tr,this.view.state))}catch(e){console.log(e)}});else{const e=this.getInitialContent();let t=0,a={},n=[];this.buildView(e,t,a,n),this.setUpWordCount(),this.handleWordCount()}}dispatchAction(e){const t=this.view.state.apply(e);if(this.view.updateState(t),"received"!==e.type&&this.isCollab&&this.createRecord(e,t),e.docChanged){const t=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);if(this.ctx.getAttribute("placeholder")&&t===this.ctx.getAttribute("placeholder")?(this.ctx.value="",this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)):(this.ctx.value=t,this.parentElement.classList.remove(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)),this.handleWordCount(),!e.getMeta("disableNativeEvent")){const e=document.createEvent("HTMLEvents");e.initEvent("input",!0,!1),this.ctx.dispatchEvent(e)}}}getView(e){const t={};RICH_TEXT_ELEMENTS_PM.filter(e=>e.popup&&"table"!==e.tag&&"tr"!==e.tag&&"td"!==e.tag&&"ul"!==e.tag&&"ol"!==e.tag).forEach(e=>{t[e.tag]=(e,t,a)=>new c.G(e,t,a,this.lockedList,this.isCollab)});const a=m.ZF.fromSchema(e.config.schema),n=new m.ZF(Object.assign({},a.nodes,{line:function(e){return["p",e.attrs,0]}}),a.marks),s=!this.ctx.closest(".is-readOnly");return new r.Lz(this.parentElement,{state:e,editable:()=>s,attributes:{tabIndex:"0"},dispatchTransaction:this.dispatchAction.bind(this),nodeViews:{inlineEnhancement:(e,t,a)=>new c.G(e,t,a),blockEnhancement:(e,t,a)=>new c.G(e,t,a),table:(e,t,a)=>new d.Q(e,t,a),...t},clipboardSerializer:n,props:{ctx:this.ctx,isFullScreen:!1,resizeCallbacks:[]}})}}n()}catch(e){n(e)}},1)},46929(e,t,a){"use strict";a.d(t,{n:()=>i}),a(44764),a(84978),a(25809),a(92280);var n=a(22628),s=a(5292);const i=(e,t,a,i,l)=>{const c=new Set,d=new Set;a.forEach((t,a)=>{const n=new RegExp(a,"g");e=e.replace(n,t)}),Object.keys(t.nodes).forEach(e=>{const a=t.nodes[e].isBlock;t.nodes[e].spec.hasOwnProperty("parseDOM")&&t.nodes[e].spec.parseDOM.forEach(e=>{d.add(e.tag),a&&"br"!==e.tag&&c.add(e.tag)})}),Object.keys(t.marks).forEach(e=>{t.marks[e].spec.hasOwnProperty("parseDOM")&&t.marks[e].spec.parseDOM.forEach(e=>{d.add(e.tag)})});const u=document.createElement("div");u.innerHTML=l?n.A.sanitize(e,{CUSTOM_ELEMENT_HANDLING:{tagNameCheck:()=>!0,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}}):e,function(e,t,a){const n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){const n=(e.className?e.className.toString().split(" "):[]).some(e=>t.has(`.${e}`));return t.has(e.nodeName.toLowerCase())||n||a?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;i.nextNode();)n.push(i.currentNode);n.forEach(e=>{const t=e.parentNode,a=(0,s.A)("code",e.outerHTML.slice(0,e.outerHTML.indexOf(">")+1)),n=(0,s.A)("code",`</${e.nodeName.toLowerCase()}>`);for(t.insertBefore(a,e);e.firstChild;)t.insertBefore(e.firstChild,e);t.insertBefore(n,e),t.removeChild(e)})}(u,d,i);const p=r([...u.childNodes],c);return o(p,c).innerHTML},r=(e,t)=>{let a=null;const n=[];let s=-1;return e.forEach(e=>{const i=e.nodeName.toLowerCase();if(t.has(a)&&"#text"===i&&0===e.wholeText.trim().length)return;const r=e.className?e.className.split(" "):[];let o=r.some(e=>t.has(`.${e}`));if(-1!==r.indexOf("rte2-style-ins-delete")||-1!==r.indexOf("rte2-style-ins-insert")||-1!==r.indexOf("rte2-style-ins-ai")||"ai"===i||"del"===i||"ins"===i){const a=e.children;if([...a].some(e=>{const a=e.nodeName.toLowerCase();return t.has(a)||"br"===a})&&(o=!0,e.childNodes.length>1))for(let e of a)"br"===e.nodeName.toLowerCase()&&e.remove()}t.has(i)||o?(s++,n[s]=[],n[s].push(e),n[s].isBlock=!0):"br"===i||null!==a&&"br"!==a&&!t.has(a)?"br"!==i&&"br"!==a?(n[s].isBlock&&(s++,n[s]=[]),n[s].push(e)):"br"===i&&null===a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0,n[s].isFirst=!0):"br"===i&&"br"!==a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0):"br"===i&&"br"===a&&n[s].push(e):(s++,n[s]=[],n[s].push(e)),a=i}),n},o=(e,t)=>{const a=document.createElement("div");let n=!1;return e.forEach((s,i)=>{if(s.isBreaks&&s.isFirst)s.forEach((e,t)=>{if(0===t&&e.length>1)return;const n=document.createElement("bsp-line");a.appendChild(n)}),n=!1;else if(s.isBreaks&&i===e.length-1){const e=document.createElement("bsp-line");a.appendChild(e)}else if(s.isBreaks)s.forEach((e,t)=>{if(0===t&&!n)return;const s=document.createElement("bsp-line");a.appendChild(s)}),n=!1;else if(s.isBlock)s.forEach(e=>{const n=r([...e.childNodes],t);let s=o(n,t);e.innerHTML="",[...s.childNodes].forEach(t=>{e.appendChild(t)}),a.appendChild(e)}),n=!0;else{const e=document.createElement("bsp-line");s.forEach(t=>{e.appendChild(t)}),a.appendChild(e),n=!1}}),a}},34120(e,t,a){"use strict";a.d(t,{n:()=>i}),a(57573),a(49371),a(96648),a(56673);var n=a(87021),s=a(18101);const i=(e,t,a,i,l)=>{const c=new Set,d=new Set;a.forEach((t,a)=>{const n=new RegExp(a,"g");e=e.replace(n,t)}),Object.keys(t.nodes).forEach(e=>{const a=t.nodes[e].isBlock;t.nodes[e].spec.hasOwnProperty("parseDOM")&&t.nodes[e].spec.parseDOM.forEach(e=>{d.add(e.tag),a&&"br"!==e.tag&&c.add(e.tag)})}),Object.keys(t.marks).forEach(e=>{t.marks[e].spec.hasOwnProperty("parseDOM")&&t.marks[e].spec.parseDOM.forEach(e=>{d.add(e.tag)})});const u=document.createElement("div");u.innerHTML=l?n.A.sanitize(e,{CUSTOM_ELEMENT_HANDLING:{tagNameCheck:()=>!0,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}}):e,function(e,t,a){const n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){const n=(e.className?e.className.toString().split(" "):[]).some(e=>t.has(`.${e}`));return t.has(e.nodeName.toLowerCase())||n||a?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;i.nextNode();)n.push(i.currentNode);n.forEach(e=>{const t=e.parentNode,a=(0,s.A)("code",e.outerHTML.slice(0,e.outerHTML.indexOf(">")+1)),n=(0,s.A)("code",`</${e.nodeName.toLowerCase()}>`);for(t.insertBefore(a,e);e.firstChild;)t.insertBefore(e.firstChild,e);t.insertBefore(n,e),t.removeChild(e)})}(u,d,i);const p=r([...u.childNodes],c);return o(p,c).innerHTML},r=(e,t)=>{let a=null;const n=[];let s=-1;return e.forEach(e=>{const i=e.nodeName.toLowerCase();if(t.has(a)&&"#text"===i&&0===e.wholeText.trim().length)return;const r=e.className?e.className.split(" "):[];let o=r.some(e=>t.has(`.${e}`));if(-1!==r.indexOf("rte2-style-ins-delete")||-1!==r.indexOf("rte2-style-ins-insert")||-1!==r.indexOf("rte2-style-ins-ai")||"ai"===i||"del"===i||"ins"===i){const a=e.children;if([...a].some(e=>{const a=e.nodeName.toLowerCase();return t.has(a)||"br"===a})&&(o=!0,e.childNodes.length>1))for(let e of a)"br"===e.nodeName.toLowerCase()&&e.remove()}t.has(i)||o?(s++,n[s]=[],n[s].push(e),n[s].isBlock=!0):"br"===i||null!==a&&"br"!==a&&!t.has(a)?"br"!==i&&"br"!==a?(n[s].isBlock&&(s++,n[s]=[]),n[s].push(e)):"br"===i&&null===a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0,n[s].isFirst=!0):"br"===i&&"br"!==a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0):"br"===i&&"br"===a&&n[s].push(e):(s++,n[s]=[],n[s].push(e)),a=i}),n},o=(e,t)=>{const a=document.createElement("div");let n=!1;return e.forEach((s,i)=>{if(s.isBreaks&&s.isFirst)s.forEach((e,t)=>{if(0===t&&e.length>1)return;const n=document.createElement("bsp-line");a.appendChild(n)}),n=!1;else if(s.isBreaks&&i===e.length-1){const e=document.createElement("bsp-line");a.appendChild(e)}else if(s.isBreaks)s.forEach((e,t)=>{if(0===t&&!n)return;const s=document.createElement("bsp-line");a.appendChild(s)}),n=!1;else if(s.isBlock)s.forEach(e=>{const n=r([...e.childNodes],t);let s=o(n,t);e.innerHTML="",[...s.childNodes].forEach(t=>{e.appendChild(t)}),a.appendChild(e)}),n=!0;else{const e=document.createElement("bsp-line");s.forEach(t=>{e.appendChild(t)}),a.appendChild(e),n=!1}}),a}},15281(e,t,a){"use strict";if(a.d(t,{d:()=>o}),a(67219),a(84978),a(39589),7717==a.j)var n=a(13333);var s=a(88903);if(7717==a.j)var i=a(72065);var r=a(22176);const o=e=>new i.k_({key:new i.hs("interchangeable"),props:{handleDOMEvents:{interchange:(t,a)=>{const o="/cms/drawer/item-interchange",l=a.detail;if(l.loadableTypes){const e=l.node,a=e.attrs.meta,n=e.attrs.attributes,i=t.state.tr,r=new URLSearchParams;r.set("typeId",a.typeId),r.set("targetTypeId",n["data-convert-target"]),r.set("itemState",n["data-state"]),r.set("isRte","true"),r.set("isConvert","true");const c=new Headers,d=s.A.get("bsp.csrf");return d&&c.append("Brightspot-CSRF",d),void fetch(`${o}`,{method:"POST",credentials:"include",body:r,headers:c}).then(s=>{s.text().then(s=>{const r={...JSON.parse(s)};n["data-state"]=r["data-state"],n["data-loadable-types"]=r["data-loadable-types"];const o=e.type.create({attributes:r,typeId:n["data-convert-target"],meta:a,id:e.attrs.id});i.replaceSelectionWith(o),t.dispatch(i)})})}const c=a.detail.to.dataset.sortableValidItemTypes.split(" "),d=a.detail.items.length>0?a.detail.items:[a.detail.item];!async function(e,t,a,o,l){for(const c in a){const d=a[c];let u;const p=d.dataset.sortableLoadTypes?.split(" ")||[],h=d.dataset.id,m=p.find(e=>l.includes(e)),f=new URLSearchParams;f.set("id",h||""),f.set("targetTypeId",m||""),f.set("isRte","true");const g=new Headers,v=s.A.get("bsp.csrf");v&&g.append("Brightspot-CSRF",v),await fetch(`${o}`,{method:"POST",credentials:"include",body:f,headers:g}).then(async s=>{const o=await s.text(),l={...JSON.parse(o)},c=l.label,d=window.RICH_TEXT_ELEMENTS;if(d instanceof Array&&(u=d.find(e=>e.tag===l.tagName)),u){let s,o;const d=e.state.selection,p=d.ranges[0].$to.pos;let f=p;const g=e.state.tr;if(!d.empty){const e=g.doc.resolve(p);g.setSelection(i.U3.near(e))}if("a"===u.tag){s=t.marks[u.tag],o=s.create({label:c,attributes:l,typeId:m,meta:u,id:h});const e=document.createElement("div");e.innerHTML=c||"",a.length>1&&e.append(document.createElement("br"));const r=n.S4.fromSchema(t).parseSlice(e,{preserveWhitespace:"full"});f=p+r.size,g.replaceSelection(r).addMark(p,f,o);const d=g.doc.resolve(f);g.setSelection(i.U3.near(d))}else{s=t.nodes[u.tag],o=s.create({label:"bsp-module"!==u.tag?c:null,attributes:l,typeId:m,meta:u,id:h});const e=g.doc.resolve(p),a=e.parent,n=a.isTextblock&&e.parentOffset===a.content.size;let r;if(a.isTextblock&&n){const a=e.depth>1?e.depth-1:e.depth,n=e.after(a);g.insert(n,o);const s=n+o.nodeSize;if(s>=g.doc.content.size){const e=t.nodes.line;e?(g.insert(s,e.create()),r=s+1):r=s}else r=s}else g.replaceSelectionWith(o),r=p+o.nodeSize;const d=g.doc.resolve(r);g.setSelection(i.U3.near(d,1))}g.setMeta("enhancementManager$",{remove:{id:h}}),e.dom.parentElement?.classList.contains(r.A.CLASSES.IS_PLACEHOLDER_CONTENT)&&e.dom.parentElement?.classList.remove(r.A.CLASSES.IS_PLACEHOLDER_CONTENT);try{e.dispatch(g)}catch(e){}}}).catch(()=>{})}}(t,e,d,o,c)}}}})},2472(e,t,a){"use strict";if(a.d(t,{d:()=>o}),a(86634),a(49371),a(26780),3324==a.j)var n=a(48940);var s=a(24510);if(3324==a.j)var i=a(59256);var r=a(34985);const o=e=>new i.k_({key:new i.hs("interchangeable"),props:{handleDOMEvents:{interchange:(t,a)=>{const o="/cms/drawer/item-interchange",l=a.detail;if(l.loadableTypes){const e=l.node,a=e.attrs.meta,n=e.attrs.attributes,i=t.state.tr,r=new URLSearchParams;r.set("typeId",a.typeId),r.set("targetTypeId",n["data-convert-target"]),r.set("itemState",n["data-state"]),r.set("isRte","true"),r.set("isConvert","true");const c=new Headers,d=s.A.get("bsp.csrf");return d&&c.append("Brightspot-CSRF",d),void fetch(`${o}`,{method:"POST",credentials:"include",body:r,headers:c}).then(s=>{s.text().then(s=>{const r={...JSON.parse(s)};n["data-state"]=r["data-state"],n["data-loadable-types"]=r["data-loadable-types"];const o=e.type.create({attributes:r,typeId:n["data-convert-target"],meta:a,id:e.attrs.id});i.replaceSelectionWith(o),t.dispatch(i)})})}const c=a.detail.to.dataset.sortableValidItemTypes.split(" "),d=a.detail.items.length>0?a.detail.items:[a.detail.item];!async function(e,t,a,o,l){for(const c in a){const d=a[c];let u;const p=d.dataset.sortableLoadTypes?.split(" ")||[],h=d.dataset.id,m=p.find(e=>l.includes(e)),f=new URLSearchParams;f.set("id",h||""),f.set("targetTypeId",m||""),f.set("isRte","true");const g=new Headers,v=s.A.get("bsp.csrf");v&&g.append("Brightspot-CSRF",v),await fetch(`${o}`,{method:"POST",credentials:"include",body:f,headers:g}).then(async s=>{const o=await s.text(),l={...JSON.parse(o)},c=l.label,d=window.RICH_TEXT_ELEMENTS;if(d instanceof Array&&(u=d.find(e=>e.tag===l.tagName)),u){let s,o;const d=e.state.selection,p=d.ranges[0].$to.pos;let f=p;const g=e.state.tr;if(!d.empty){const e=g.doc.resolve(p);g.setSelection(i.U3.near(e))}if("a"===u.tag){s=t.marks[u.tag],o=s.create({label:c,attributes:l,typeId:m,meta:u,id:h});const e=document.createElement("div");e.innerHTML=c||"",a.length>1&&e.append(document.createElement("br"));const r=n.S4.fromSchema(t).parseSlice(e,{preserveWhitespace:"full"});f=p+r.size,g.replaceSelection(r).addMark(p,f,o);const d=g.doc.resolve(f);g.setSelection(i.U3.near(d))}else{s=t.nodes[u.tag],o=s.create({label:"bsp-module"!==u.tag?c:null,attributes:l,typeId:m,meta:u,id:h});const e=g.doc.resolve(p),a=e.parent,n=a.isTextblock&&e.parentOffset===a.content.size;let r;if(a.isTextblock&&n){const a=e.depth>1?e.depth-1:e.depth,n=e.after(a);g.insert(n,o);const s=n+o.nodeSize;if(s>=g.doc.content.size){const e=t.nodes.line;e?(g.insert(s,e.create()),r=s+1):r=s}else r=s}else g.replaceSelectionWith(o),r=p+o.nodeSize;const d=g.doc.resolve(r);g.setSelection(i.U3.near(d,1))}g.setMeta("enhancementManager$",{remove:{id:h}}),e.dom.parentElement?.classList.contains(r.A.CLASSES.IS_PLACEHOLDER_CONTENT)&&e.dom.parentElement?.classList.remove(r.A.CLASSES.IS_PLACEHOLDER_CONTENT);try{e.dispatch(g)}catch(e){}}}).catch(()=>{})}}(t,e,d,o,c)}}}})},6087(e,t,a){"use strict";if(a.d(t,{l:()=>c}),7717==a.j)var n=a(68243);var s=a(1439),i=a.n(s);if(7717==a.j)var r=a(13333);if(7717==a.j)var o=a(72065);if(7717==a.j)var l=a(15483);const c=e=>{const t=document.querySelector("template#rte-mention-input");let a;return t&&(a=document.createElement("form"),a.className="Mention",a.appendChild(t.content.cloneNode(!0)),(0,n.A)(a,e),i()(a).trigger("create")),new o.k_({props:{handleTextInput:(e,t,n,s)=>{if(!a)return!1;if("@"!==s)return!1;if(1!==t){let a=e.state.doc.textBetween(t-1,n);if(!/\s/.test(a)&&""!==a)return!1}const i=a.querySelector(".ContentSelector-select");if(!i)return!1;i.value="",i.dispatchEvent(new CustomEvent("change",{bubbles:!0}));const o=a.offsetParent.getBoundingClientRect();a.style.left=e.coordsAtPos(t).left-o.left+"px",a.style.top=e.domAtPos(t).node.getBoundingClientRect().top-o.top+"px",a.style.visibility="visible";const c=(0,l.Kr)(a)[0];c.focus(),c.click();const d=()=>{i.removeEventListener("change",d);const a=i.value;if(!a)return;const s=document.createElement("bsp-mention");s.setAttribute("user-id",a),s.innerText="@"+Array.prototype.filter.call(i,e=>e.value===a)[0].label;const o=document.createElement("div");o.appendChild(s),o.appendChild(document.createTextNode(" "));const l=e.state;e.dispatch(l.tr.replaceRange(t,n+1,r.S4.fromSchema(l.config.schema).parseSlice(o,{preserveWhitespace:!0})))},u=()=>{i.removeEventListener("combo-input:hide",u),e.focus(),a.style.visibility="hidden"};return i.addEventListener("change",d),i.addEventListener("combo-input:hide",u),!1}}})}},41694(e,t,a){"use strict";if(a.d(t,{l:()=>c}),3324==a.j)var n=a(39242);var s=a(88630),i=a.n(s);if(3324==a.j)var r=a(48940);if(3324==a.j)var o=a(59256);if(3324==a.j)var l=a(2674);const c=e=>{const t=document.querySelector("template#rte-mention-input");let a;return t&&(a=document.createElement("form"),a.className="Mention",a.appendChild(t.content.cloneNode(!0)),(0,n.A)(a,e),i()(a).trigger("create")),new o.k_({props:{handleTextInput:(e,t,n,s)=>{if(!a)return!1;if("@"!==s)return!1;if(1!==t){let a=e.state.doc.textBetween(t-1,n);if(!/\s/.test(a)&&""!==a)return!1}const i=a.querySelector(".ContentSelector-select");if(!i)return!1;i.value="",i.dispatchEvent(new CustomEvent("change",{bubbles:!0}));const o=a.offsetParent.getBoundingClientRect();a.style.left=e.coordsAtPos(t).left-o.left+"px",a.style.top=e.domAtPos(t).node.getBoundingClientRect().top-o.top+"px",a.style.visibility="visible";const c=(0,l.Kr)(a)[0];c.focus(),c.click();const d=()=>{i.removeEventListener("change",d);const a=i.value;if(!a)return;const s=document.createElement("bsp-mention");s.setAttribute("user-id",a),s.innerText="@"+Array.prototype.filter.call(i,e=>e.value===a)[0].label;const o=document.createElement("div");o.appendChild(s),o.appendChild(document.createTextNode(" "));const l=e.state;e.dispatch(l.tr.replaceRange(t,n+1,r.S4.fromSchema(l.config.schema).parseSlice(o,{preserveWhitespace:!0})))},u=()=>{i.removeEventListener("combo-input:hide",u),e.focus(),a.style.visibility="hidden"};return i.addEventListener("change",d),i.addEventListener("combo-input:hide",u),!1}}})}},50844(e,t,a){"use strict";a.a(e,async(e,n)=>{try{if(a.d(t,{x:()=>$}),a(67219),a(44764),7717==a.j)var s=a(72065);if(7717==a.j)var i=a(46388);if(7717==a.j)var r=a(17755);var o=a(341),l=a(38607),c=a(2583),d=a(55864),u=a(51369),p=a(831);if(7717==a.j)var h=a(47401);var m=a(10968),f=a(21932),g=a(34375),v=a(19552);if(7717==a.j)var b=a(75869);if(7717==a.j)var C=a(93970);var w=a(70434);if(7717==a.j)var y=a(24455);var A=a(12536),E=a(35140),S=a(63511),I=a(47045);if(7717==a.j)var T=a(22377);var k=a(27808),M=a(6087),L=a(15281),D=a(46052),P=a(61827),_=e([o,l,c,d,u,f,w,A,E,S,I,k,P]);[o,l,c,d,u,f,w,A,E,S,I,k,P]=_.then?(await _)():_;const x=e=>(0,g.D8)(e),O=()=>{const e=[T.P8];return(0,T.sM)({rules:e})};function $(e){let t=[(0,I.e)(e.compliantTagNameMap),(0,E.o)(e.ctx,e.compliantTagNameMap),(0,h.b6)(),(0,d.s)(),(0,c.bS)(e.schema),(0,f.N_)(e.schema,e.userLabel,e.userId),(0,m.lt)(e.schema,e.userLabel,e.ctx),(0,b.A)(),(0,C.z)(),(0,g.LF)(),(0,v.J)(),(0,l.XC)(e.ctx,e.compliantTagNameMap),(0,w.F)(),(0,r.w)({Tab:x(1),"Shift-Tab":(0,g.D8)(-1)}),(0,r.w)(e.buildKeymap(e)),(0,r.w)(i.RV),(0,k.i)(e.ctx,e.compliantTagNameMap),(0,p.G)(),(0,S.hI)(),O(),(0,o.B)(e.menuItems),(0,L.d)(e.schema)];window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED&&t.unshift((0,D.M)(e.schema,e.userLabel,e.userId,e.compliantTagNameMap),(0,P.t)(e.userLabel,e.userId,e.compliantTagNameMap));try{const a=e.ctx.dataset.rteTags;a&&JSON.parse(a).includes("bsp-mention")&&t.push((0,M.l)(e.ctx))}catch{}return ENABLE_PROSE_MIRROR_SPELL_CHECK&&t.push((0,u.k)()),e.isCollab&&(t.push((0,y.Qr)({version:e.version,clientID:e.userId})),t.push((0,A.H)(e.schema,e.userId,e.anchorMap,e.rangeList,e.lockedList))),t.concat(new s.k_({key:new s.hs("pluginProvider"),props:{attributes:{class:"ProseMirror-setup-style",role:"textbox","aria-multiline":"true"}}}))}n()}catch(R){n(R)}})},63653(e,t,a){"use strict";a.a(e,async(e,n)=>{try{if(a.d(t,{x:()=>$}),a(86634),a(57573),3324==a.j)var s=a(59256);if(3324==a.j)var i=a(59197);if(3324==a.j)var r=a(3743);var o=a(87532),l=a(74214),c=a(89774),d=a(68673),u=a(38560),p=a(88022);if(3324==a.j)var h=a(70112);var m=a(75361),f=a(86325),g=a(21566),v=a(83945);if(3324==a.j)var b=a(63060);if(3324==a.j)var C=a(58363);var w=a(83243);if(3324==a.j)var y=a(11646);var A=a(25345),E=a(99533),S=a(50702),I=a(34236);if(3324==a.j)var T=a(9568);var k=a(40617),M=a(41694),L=a(2472),D=a(10445),P=a(32826),_=e([o,l,c,d,u,f,w,A,E,S,I,k,P]);[o,l,c,d,u,f,w,A,E,S,I,k,P]=_.then?(await _)():_;const x=e=>(0,g.D8)(e),O=()=>{const e=[T.P8];return(0,T.sM)({rules:e})};function $(e){let t=[(0,I.e)(e.compliantTagNameMap),(0,E.o)(e.ctx,e.compliantTagNameMap),(0,h.b6)(),(0,d.s)(),(0,c.bS)(e.schema),(0,f.N_)(e.schema,e.userLabel,e.userId),(0,m.lt)(e.schema,e.userLabel,e.ctx),(0,b.A)(),(0,C.z)(),(0,g.LF)(),(0,v.J)(),(0,l.XC)(e.ctx,e.compliantTagNameMap),(0,w.F)(),(0,r.w)({Tab:x(1),"Shift-Tab":(0,g.D8)(-1)}),(0,r.w)(e.buildKeymap(e)),(0,r.w)(i.RV),(0,k.i)(e.ctx,e.compliantTagNameMap),(0,p.G)(),(0,S.hI)(),O(),(0,o.B)(e.menuItems),(0,L.d)(e.schema)];window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED&&t.unshift((0,D.M)(e.schema,e.userLabel,e.userId,e.compliantTagNameMap),(0,P.t)(e.userLabel,e.userId,e.compliantTagNameMap));try{const a=e.ctx.dataset.rteTags;a&&JSON.parse(a).includes("bsp-mention")&&t.push((0,M.l)(e.ctx))}catch{}return ENABLE_PROSE_MIRROR_SPELL_CHECK&&t.push((0,u.k)()),e.isCollab&&(t.push((0,y.Qr)({version:e.version,clientID:e.userId})),t.push((0,A.H)(e.schema,e.userId,e.anchorMap,e.rangeList,e.lockedList))),t.concat(new s.k_({key:new s.hs("pluginProvider"),props:{attributes:{class:"ProseMirror-setup-style",role:"textbox","aria-multiline":"true"}}}))}n()}catch(R){n(R)}})},61827(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{E:()=>u,t:()=>d});var s=a(72065),i=a(96410);if(7717==a.j)var r=a(17283);var o=e([i]),l=o.then?(await o)():o;i=l[0];const c=new s.hs("aiInline"),d=(e,t,a)=>new s.k_({key:c,view(n){const s=new i.F(n,c.get(n.state).key,e,t,a),r=n.dom.parentNode?.querySelector(".ProseMirrorToolbar");if(r){const e=s.dom;e&&r.appendChild(e)}return s},state:{init(e){const t=new Map,a=new Map,n=new Map,s=new Map;return a.set("toggleAIInline",!1),t.set("activeStates",a),t.set("disabledStates",n),t.set("metaData",s),t},apply(e,t,a,n){const s=t,i=e.getMeta(c);if(i?.toggleAIInline){const e=s.get("activeStates"),t=e.get("toggleAIInline");e.set("toggleAIInline",!t)}return s}},props:{decorations(e){const t=this.getState(e);if(!t)return r.zF.empty;if(!t.get("activeStates").get("toggleAIInline"))return r.zF.empty;const{from:a,to:n}=e.selection;if(a===n)return r.zF.empty;const s=r.NZ.inline(a,n,{class:"rte2-style-ai-inline-highlight"});return r.zF.create(e.doc,[s])}}}),u=()=>function(e,t,a){return t(e.tr.setMeta(c,{toggleAIInline:!0})),a?.dom.classList.toggle("ProseMirror-aiInlinePreviewMode"),!0};n()}catch(e){n(e)}})},32826(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{E:()=>u,t:()=>d});var s=a(59256),i=a(76995);if(3324==a.j)var r=a(88282);var o=e([i]),l=o.then?(await o)():o;i=l[0];const c=new s.hs("aiInline"),d=(e,t,a)=>new s.k_({key:c,view(n){const s=new i.F(n,c.get(n.state).key,e,t,a),r=n.dom.parentNode?.querySelector(".ProseMirrorToolbar");if(r){const e=s.dom;e&&r.appendChild(e)}return s},state:{init(e){const t=new Map,a=new Map,n=new Map,s=new Map;return a.set("toggleAIInline",!1),t.set("activeStates",a),t.set("disabledStates",n),t.set("metaData",s),t},apply(e,t,a,n){const s=t,i=e.getMeta(c);if(i?.toggleAIInline){const e=s.get("activeStates"),t=e.get("toggleAIInline");e.set("toggleAIInline",!t)}return s}},props:{decorations(e){const t=this.getState(e);if(!t)return r.zF.empty;if(!t.get("activeStates").get("toggleAIInline"))return r.zF.empty;const{from:a,to:n}=e.selection;if(a===n)return r.zF.empty;const s=r.NZ.inline(a,n,{class:"rte2-style-ai-inline-highlight"});return r.zF.create(e.doc,[s])}}}),u=()=>function(e,t,a){return t(e.tr.setMeta(c,{toggleAIInline:!0})),a?.dom.classList.toggle("ProseMirror-aiInlinePreviewMode"),!0};n()}catch(e){n(e)}})},96410(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{F:()=>T}),a(44764),a(84978),a(25809),a(91672),a(92280);var s=a(26173),i=a(99666);if(7717==a.j)var r=a(13333);var o=a(46929),l=a(38745),c=a(63110),d=a.n(c),u=a(88903),p=a(22628),h=e([s]),m=h.then?(await h)():h;s=m[0],window.BRIGHTSPOT?.ui.cms.enableV5UI||await a.e(2456).then(a.bind(a,42456));const f="ProseMirrorAIInline-container",g=window.RTE_PROMPT_PLACEHOLDER,v=window.RTE_PROMPT_PREFIX,b=window.RTE_PROMPT_RETRY,C=window.RTE_WORKING_ON_IT,w=window.RTE_ACCEPT,y=window.RTE_DISCARD,A=window.RTE_TRY_AGAIN,E="collapsed",S=window.BRIGHTSPOT?.web?.pagePaths?.["com.psddev.ai.chat.ChatPageResponses"],I=window.BRIGHTSPOT?.web?.pagePaths?.["com.psddev.ai.chat.PromptPage"];class T{constructor(e,t,a,n,s){this.focused=!1,this.isLoading=!1,this.retry=!1,this.suggestionsFetched=!1,this.editorView=void 0,this.myKey=void 0,this.userLabel=void 0,this.userId=void 0,this.compliantTagNameMap=void 0,this.dom=void 0,this.field=void 0,this.textArea=void 0,this.loadingOverlay=void 0,this.loadingPromptEle=void 0,this.objectId=void 0,this.typeId=void 0,this.contentState=void 0,this.inputEle=void 0,this.submitButtonEle=void 0,this.acceptRejectContainerEle=void 0,this.suggestionsContainer=null,this.sendTrackingEvent=void 0,this.chatId=void 0,this.responseId=void 0,this.lastPrompt=void 0,this.lastSelectedContent=void 0,this.lastSelectionFrom=void 0,this.lastSelectionTo=void 0,this.template=()=>i.qy`
32
+ </div>`}}]}}(function(e){I.initializeInstanceElements(e,k.elements)},S),k=I.decorateClass(function(e){for(var t=[],a=function(e){return"method"===e.kind&&e.key===i.key&&e.placement===i.placement},n=0;n<e.length;n++){var s,i=e[n];if("method"===i.kind&&(s=t.find(a)))if(f(i.descriptor)||f(s.descriptor)){if(m(i)||m(s))throw new ReferenceError("Duplicated methods ("+i.key+") can't be decorated.");s.descriptor=i.descriptor}else{if(m(i)){if(m(s))throw new ReferenceError("Decorators can't be placed on different accessors with for the same property ("+i.key+").");s.decorators=i.decorators}h(i,s)}else t.push(i)}return t}(T.d.map(p)),E),I.initializeClassElements(T.F,k.elements),I.runClassFinishers(T.F,k.finishers));var E,S,I,T,k,M=a(55408),L=a(88630);class D{constructor(e,t){this._element=void 0,this._options=void 0,this._loadableTypes=void 0,this._node=void 0,this._editorView=void 0,this._element=e,this._options=t,this._loadableTypes=t.loadableTypes,this._node=t.node,this._editorView=t.editorView,this._update=(0,s.A)(this._update.bind(this)),this._update()}_update(){if(!this._element||this._element.closest(".is-gridItem")||this._element.closest(".is-listItem"))return;const e=new A;if(this._node){const e=(0,n.A)("ul",{className:"Dropdown",role:"menu","aria-label":window.BRIGHTSPOT?.ui.tooltips.actions?.contentSelector,"aria-orientation":"vertical"});if(this._element.addEventListener("click",()=>{const t=this._element.nextSibling;t instanceof HTMLElement&&M.A.toggle(this._element,t,()=>(this._element.classList.toggle("is-active",t.classList.toggle("is-open")),e.setAttribute("aria-expanded",t.classList.contains("is-open").valueOf().toString()),!0))}),this._loadableTypes){const t=JSON.parse(this._loadableTypes);for(const a in t){const t=(0,n.A)("li",{className:"Dropdown-item","aria-label":a,role:"menuitem"},a);e.appendChild(t),t.addEventListener("click",()=>{const e=new CustomEvent("interchange",{detail:this._options});if(this._loadableTypes){const t=JSON.parse(this._loadableTypes);this._node&&(this._node.attrs.attributes["data-convert-target"]=t[a]),this._editorView?.dispatchEvent(e)}})}}return void this._element.after(e)}const t=this._element.parentElement,a=t?.parentElement;if(!t||!a)return;const s=P(t,".objectId-edit"),r=P(t,".objectId-clear"),o=P(t,".RCIG-swap")||P(t,".EIG-swap"),l=P(t,".removeButton"),c=P(t,".MultiSortable-buttonToggle"),d=P(t,".convertButton"),u=P(t,".copyButton"),p=t.closest("form"),h=this._element.dataset.objectId,m=a.closest("[data-name]")?.dataset.name,f=a.dataset.fieldName,g=a.dataset.containerId,v=a.dataset.typeId,b=a.dataset.recordTypeId,C=a.dataset.sortableValidItemTypes,w=a.dataset.isSwappable,y=new FormData;m&&y.set("inputName",m),f&&y.set("fieldName",f),g&&y.set("containerId",g),v&&y.set("containerTypeId",v),b&&y.set("recordTypeId",b),C&&y.set("validTypes",C),w&&y.set("isSwappable",w);const E=new MouseEvent("click",{bubbles:!0,cancelable:!0,view:window});if(s||r||o||l){if((c||t.classList.contains("Sortable-item")&&t.classList.contains("RCIG-item"))&&t.classList.add("toggleVisible"),this._element.after(e),s.length&&e._addDropdownItem((0,n.A)("li",s)),r.length&&e._addDropdownItem((0,n.A)("li",r)),o.length&&(e._addDropdownItem((0,n.A)("li",o)),o[0].ariaLabel=o[0].textContent),u.length&&(e._addDropdownItem((0,n.A)("li",u)),u[0].ariaLabel=u[0].textContent),d.length)for(const s of d)e._addDropdownItem((0,n.A)("li",s)),s.ariaLabel=s.textContent,s.addEventListener("click",()=>{if(p&&h){const e=x(t,p,h);if(e){const n=JSON.parse(e)._type,r=s.dataset.targetType,o=t.cloneNode(!1);n&&y.append("typeId",n),r&&y.append("targetTypeId",r),y.append("itemState",e),y.append("isConvert","true"),_(y,"/cms/drawer/item-interchange").then(e=>{o.innerHTML=e;const n=t.closest(".plugin-repeatable");n&&L(n).data("repeatable").itemLoad(t).then(()=>{L(n).data("repeatable").initItem(o),L(o).trigger("create"),a?.replaceChild(o,t),(0,i.A)(o,":scope > .repeatableLabel",e=>{o.classList.contains("is-collapsed")&&e.dispatchEvent(E),window.requestAnimationFrame(()=>{window.requestAnimationFrame(()=>{e.classList.contains("RCIG-title")&&e.focus()})})})})})}}});u.length&&u[0].addEventListener("click",()=>{if(p&&h){const e=x(t,p,h);if(e){const t=JSON.parse(e)._type;t&&y.append("typeId",t),y.append("itemState",e),_(y,"/cms/copy-record").then(e=>{const t=(new DOMParser).parseFromString(e,"text/html").body.firstChild;if(t){a?.appendChild(t);const e=t.closest(".plugin-repeatable");e&&L(e).data("repeatable").itemLoad(t).then(()=>{L(e).data("repeatable").initItem(t),(0,i.A)(t,":scope > .repeatableLabel",e=>{t.classList.contains("is-collapsed")&&e.dispatchEvent(E),t.scrollIntoView({behavior:"smooth",block:"start",inline:"nearest"}),window.requestAnimationFrame(()=>{e.classList.contains("RCIG-title")&&e.focus()})})})}})}}})}}}const P=(e,t)=>{const a=Array.prototype.filter.call(e.children,function(e){return e.matches(t)});return a.length>0?a:[]},_=async(e,t)=>{const a=new Headers,n=r.A.get("bsp.csrf");n&&a.append("Brightspot-CSRF",n);const s=await fetch(t,{method:"POST",credentials:"include",body:e,headers:a});return await s.text()},x=(e,t,a)=>{const n=L(t).data("brightspot-content-state");if(n){const e=JSON.parse(n),t=O(e,a);if(t)return JSON.stringify(t)}return e.dataset.state},O=(e,t)=>{if(e._id===t)return e;{const a=Object.keys(e);for(const n of a){const a=e[n];if(a&&"object"==typeof a){const e=O(a,t);if(e)return e}}}}},80133(e,t,a){"use strict";a.d(t,{m:()=>n});const n=e=>class extends e{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-brightspot-element-connected",{}),e=>this.emit("btu-brightspot-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-brightspot-element-disconnected")}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}))}}},67324(e,t,a){"use strict";a.d(t,{m:()=>n});const n=e=>class extends e{connectedCallback(){super.connectedCallback(),Promise.resolve().then(()=>this.emit("btu-brightspot-element-connected",{}),e=>this.emit("btu-brightspot-element-error",{error:e}))}disconnectedCallback(){super.disconnectedCallback(),this.emit("btu-brightspot-element-disconnected")}emit(e,t){return this.dispatchEvent(new CustomEvent(e,{bubbles:!0,cancelable:!1,composed:!0,detail:t}))}}},1607(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(38745);if(7717==a.j)var s=a(68243);class i{static onFindFunction(e,t){return a=>{const n=new i(e,t,parseInt(a.style.getPropertyValue("--progress")));(0,s.A)(n.getElement(),a),a.hidden=!0}}constructor(e,t,a=0){this._circumference=void 0,this._element=void 0,this._value=0;const s=(0,n.A)("div"),i=e/2,r=i-t/2;if(this._circumference=2*Math.PI*r,s.innerHTML=`\n <svg class="RPB" viewBox="0 0 ${e} ${e}">\n <circle\n class="RPB-bg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t-1}"\n />\n <circle\n class="RPB-fg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t}"\n stroke-dasharray="${this._circumference}"\n stroke-dashoffset="${this._circumference}"\n />\n </svg>\n `,!(s.firstElementChild instanceof SVGElement))throw new Error("SVG not found");this._element=s.firstElementChild,this.setValue(a)}getElement(){return this._element}getValue(){return this._value}setValue(e){this._value=e,this._element.querySelector(":scope > .RPB-fg")?.setAttribute("stroke-dashoffset",""+this._circumference*(1-e/100))}}},88798(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(25936);if(3324==a.j)var s=a(39242);class i{static onFindFunction(e,t){return a=>{const n=new i(e,t,parseInt(a.style.getPropertyValue("--progress")));(0,s.A)(n.getElement(),a),a.hidden=!0}}constructor(e,t,a=0){this._circumference=void 0,this._element=void 0,this._value=0;const s=(0,n.A)("div"),i=e/2,r=i-t/2;if(this._circumference=2*Math.PI*r,s.innerHTML=`\n <svg class="RPB" viewBox="0 0 ${e} ${e}">\n <circle\n class="RPB-bg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t-1}"\n />\n <circle\n class="RPB-fg"\n cx="${i}"\n cy="${i}"\n r="${r}"\n stroke-width="${t}"\n stroke-dasharray="${this._circumference}"\n stroke-dashoffset="${this._circumference}"\n />\n </svg>\n `,!(s.firstElementChild instanceof SVGElement))throw new Error("SVG not found");this._element=s.firstElementChild,this.setValue(a)}getElement(){return this._element}getValue(){return this._value}setValue(e){this._value=e,this._element.querySelector(":scope > .RPB-fg")?.setAttribute("stroke-dashoffset",""+this._circumference*(1-e/100))}}},25734(e,t,a){"use strict";a.d(t,{iP:()=>o,tK:()=>c,wC:()=>r}),a(44764);var n=a(56155);if(7717==a.j)var s=a(27170);var i=a(33582);function r(e,t){return e.replace(/_{3}/g,(a=0,e=>t[a++]));var a}function o(e,t){let a=document.getElementById("aria-live-container");a||(a=document.createElement("div"),a.setAttribute("id","aria-live-container"),document.body.appendChild(a));const n=document.createElement("div"),s="speak-"+Date.now();n.setAttribute("id",s),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.classList.add("screen-reader-only"),t&&t.length&&(e=r(`${e}`,t)),a.appendChild(n),setTimeout(()=>{const t=document.getElementById(s);t&&(t.innerHTML=e)},150),!0===window.BRIGHTSPOT?.ariaDebug&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(s)?.remove()},2e3)}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("btu-announce",e=>{e instanceof CustomEvent&&o(e.detail)})});const l=[];(0,n.A)("[data-aria-announce]",e=>{l.push(e),setTimeout(()=>{if(l.length>0){const e=l.map(e=>"true"===e.dataset.ariaAnnounce?e.textContent:e.dataset.ariaAnnounce).join(", ");l.length=0,o(e)}},2500)}),(0,i.A)([".addButton",".Workflow-addState",".Workflow-addTransition",".calendarButton",".ComboInput"],e=>{const t=e.closest(".CIG-row");if(!t)return;const a=t.querySelector(".Message.is-error");if(!a)return;const n=a.getAttribute("id");n&&(e.setAttribute("aria-describedby",n),e.setAttribute("aria-invalid","true"))}),(0,i.A)('a[role="button"]',e=>{e.addEventListener("keydown",t=>{"Space"===t.code&&(t.preventDefault(),e.click())})});const c=e=>{(0,s.A)(1e3,()=>o(e))}},90127(e,t,a){"use strict";a.d(t,{iP:()=>o,tK:()=>c,wC:()=>r}),a(57573);var n=a(91762);if(3324==a.j)var s=a(39979);var i=a(46391);function r(e,t){return e.replace(/_{3}/g,(a=0,e=>t[a++]));var a}function o(e,t){let a=document.getElementById("aria-live-container");a||(a=document.createElement("div"),a.setAttribute("id","aria-live-container"),document.body.appendChild(a));const n=document.createElement("div"),s="speak-"+Date.now();n.setAttribute("id",s),n.setAttribute("aria-atomic","true"),n.setAttribute("aria-live","polite"),n.classList.add("screen-reader-only"),t&&t.length&&(e=r(`${e}`,t)),a.appendChild(n),setTimeout(()=>{const t=document.getElementById(s);t&&(t.innerHTML=e)},150),!0===window.BRIGHTSPOT?.ariaDebug&&console.log(`ARIA Announced: "${e}"`),setTimeout(()=>{document.getElementById(s)?.remove()},2e3)}document.addEventListener("DOMContentLoaded",()=>{document.body.addEventListener("btu-announce",e=>{e instanceof CustomEvent&&o(e.detail)})});const l=[];(0,n.A)("[data-aria-announce]",e=>{l.push(e),setTimeout(()=>{if(l.length>0){const e=l.map(e=>"true"===e.dataset.ariaAnnounce?e.textContent:e.dataset.ariaAnnounce).join(", ");l.length=0,o(e)}},2500)}),(0,i.A)([".addButton",".Workflow-addState",".Workflow-addTransition",".calendarButton",".ComboInput"],e=>{const t=e.closest(".CIG-row");if(!t)return;const a=t.querySelector(".Message.is-error");if(!a)return;const n=a.getAttribute("id");n&&(e.setAttribute("aria-describedby",n),e.setAttribute("aria-invalid","true"))}),(0,i.A)('a[role="button"]',e=>{e.addEventListener("keydown",t=>{"Space"===t.code&&(t.preventDefault(),e.click())})});const c=e=>{(0,s.A)(1e3,()=>o(e))}},68243(e,t,a){"use strict";function n(e,t){return t?.parentNode?.insertBefore(e,t),e}a.d(t,{A:()=>n})},39242(e,t,a){"use strict";function n(e,t){return t?.parentNode?.insertBefore(e,t),e}a.d(t,{A:()=>n})},33582(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(56155);let s=0;function i(e,t){const a="_ovc"+s++,i=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){const e=n.target,s=e.classList;s.contains(a)||(s.add(a),i.unobserve(e),t(e))}});(0,n.A)(e,e=>{i.observe(e)})}},46391(e,t,a){"use strict";a.d(t,{A:()=>i});var n=a(91762);let s=0;function i(e,t){const a="_ovc"+s++,i=new IntersectionObserver(e=>{for(const n of e)if(n.isIntersecting){const e=n.target,s=e.classList;s.contains(a)||(s.add(a),i.unobserve(e),t(e))}});(0,n.A)(e,e=>{i.observe(e)})}},89561(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(83394)},76752(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(96203)},10013(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(33582)},97204(e,t,a){"use strict";a.d(t,{A:()=>n.A});var n=a(46391)},3315(e,t,a){"use strict";if(a.d(t,{K:()=>s}),7717==a.j)var n=a(83043);function s(e,t){if(e&&t)try{const a=(window.BRIGHTSPOT?.icons?.materialToLucide||{})[e]??e,s=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=n[s];i?.encodedCode&&t.style.setProperty("--compat-icon",`'${i.encodedCode}'`),document.dispatchEvent(new CustomEvent("btu-resolve-icon",{detail:{name:a,element:t}}))}catch(t){console.error(`[resolveIconCompat] Failed to resolve icon "${e}":`,t)}}},22730(e,t,a){"use strict";if(a.d(t,{K:()=>s}),3324==a.j)var n=a(54042);function s(e,t){if(e&&t)try{const a=(window.BRIGHTSPOT?.icons?.materialToLucide||{})[e]??e,s=a.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),i=n[s];i?.encodedCode&&t.style.setProperty("--compat-icon",`'${i.encodedCode}'`),document.dispatchEvent(new CustomEvent("btu-resolve-icon",{detail:{name:a,element:t}}))}catch(t){console.error(`[resolveIconCompat] Failed to resolve icon "${e}":`,t)}}},52215(e,t,a){"use strict";a.r(t),a.d(t,{default:()=>n.A});var n=a(26791)},23054(e,t,a){"use strict";a.r(t),a.d(t,{default:()=>n.A});var n=a(75230)},73061(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{RTE:()=>w}),a(44764),a(50144),a(84978),a(13722),a(25809),a(91672),a(92280);var s=a(27791),i=a(26173);if(7717==a.j)var r=a(17283);var o=a(46929),l=a(90458),c=a(55053),d=a(77281),u=a(52215);if(7717==a.j)var p=a(24455);if(7717==a.j)var h=a(40320);if(7717==a.j)var m=a(13333);if(a(22628),7717==a.j)var f=a(36500);a(65210);var g=a(92),v=a(25734),b=a(1439),C=e([s,i,l,c,d]);[s,i,l,c,d]=C.then?(await C)():C,window.BRIGHTSPOT?.ui.cms.enableV5UI?await a.e(2111).then(a.bind(a,92111)):(await Promise.resolve().then(a.bind(a,65210)),await a.e(9576).then(a.bind(a,99576)),await a.e(7863).then(a.bind(a,77863)));class w{constructor(e,t,a,n,r,c,d,h,C,w){this.setValue=e=>{const{state:t,dispatch:a}=this.view;(0,i.y6)(t,e,this.compliantTagNameMap,a,!0,!0,!1)},this.setMinHeight=()=>{this.view.dom.style.setProperty("--ProseMirror-numLines",this.numLines)},this.hideLoader=()=>{const e=this.view.dom.parentElement.previousSibling;e&&(e.classList.add("hide"),e.style.minHeight=0),this.view.dom.parentElement.classList.remove("hide")},this.handlePlaceholderUpdate=e=>{const{state:t,dispatch:a,dom:n}=this.view,r=this.ctx.getAttribute("placeholder"),o=l.wM.serialize(t.doc.content,this.compliantTagNameMap);e?.clearOnChange||n.parentElement.classList.contains(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)||""===o&&o!==r?((0,i.y6)(t,r,this.compliantTagNameMap,a,!1,!0),this.ctx.value="",this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)):o===r&&this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)},this.getInitialContent=()=>{let e=this.ctx.value;!e&&this.ctx.hasAttribute("placeholder")&&(e=this.ctx.getAttribute("placeholder"));const t="com.psddev.conversation.Post"===this.ctx.closest(".CIG")?.dataset?.type,a=document.createElement("div");return a.innerHTML=(0,o.n)(e,this.schema,this.compliantTagNameMap,!1,t),m.S4.fromSchema(this.schema).parse(a,{preserveWhitespace:"full"})},this.buildView=(e,t,a,n,r)=>{const o=(0,i.Gu)(e,this.menuItems,s.eu,this.schema,this.userId,this.userLabel,t,a,n,r,this.isCollab,this.ctx,this.compliantTagNameMap);if(this.view=this.getView(o),ENABLE_PROSE_MIRROR_SPELL_CHECK&&(this.view.dom.spellcheck=!1),this.setMinHeight(),this.hideLoader(),this.view.submenu=document.createElement("div"),this.view.submenu.className="ProsemirrorEnhancementMenuContainer",this.view.dom.parentNode.append(this.view.submenu),this.initialPayload){const e=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);this.ctx.value=e;const t=document.createEvent("HTMLEvents");t.initEvent("input",!0,!1),this.ctx.dispatchEvent(t)}this.loaded=!0,this.ctx.getAttributeNames().filter(e=>e.startsWith("aria-")).forEach(e=>{this.view.dom.setAttribute(e,this.ctx.getAttribute(e))});const c=this.view.dom.closest(".CIG-row");if(c){const e=c.querySelector(".Message.is-error");if(e){const t=e.getAttribute("id");t&&(this.view.dom.setAttribute("aria-describedby",t),this.view.dom.setAttribute("aria-invalid","true"))}}!this.ctx.hasAttribute("placeholder")||this.ctx.getAttribute("placeholder")!==this.ctx.value&&this.ctx.value||this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT),this.$ctx.on("placeholderUpdate",(e,t)=>{this.handlePlaceholderUpdate(t)}),new ResizeObserver(()=>{this.view&&this.view.props&&this.view.props.props&&this.view.props.props.resizeCallbacks&&this.view.props.props.resizeCallbacks.forEach(e=>{e.callback&&e.callback()})}).observe(this.view.dom),PubSub.publish("rteLoaded",this)},this.createLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"lockOnly",clientId:this.userId,lockedId:e})},this.removeLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"unlockOnly",clientId:this.userId,lockedId:e})},this.createNewRecord=e=>{this.pendingRequest=(0,f.A)(),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"create",rangeList:JSON.stringify([]),requestId:this.pendingRequest,doc:JSON.stringify(e.toJSON())})},this.createRecord=(e,t)=>{if(this.pendingRequest)return void(this.hasQueuedRequest=!0);if(this.pendingRequest=(0,f.A)(),!e||!t)return void(this.hasCursorState&&(u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!1));const a=(0,p._X)(t),{anchor:n,ranges:s,empty:i}=t.selection;if(a){const e=JSON.stringify(t.doc.toJSON());u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,stepsList:JSON.stringify(a.steps),doc:e,version:a.version,clientId:this.userId,anchor:JSON.stringify({[this.userId]:n}),type:"steps",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0}else if(i)u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0;else{const e=[];s.forEach(t=>{const{$from:a,$to:n}=t,s=a.pos,i=n.pos;e.push({from:s,to:i,clientId:this.userId,requestId:this.pendingRequest})}),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"range",rangeList:JSON.stringify(e),requestId:this.pendingRequest}),this.hasCursorState=!0}},this.setUpWordCount=()=>{this.view.wordCount=document.createElement("div");const e=this.view.wordCount;e.className="CIG-wordCount",e.setAttribute("role","status"),e.setAttribute("aria-live","off"),this.toolbarWrapper.appendChild(e);const t=this.toolbarWrapper.querySelectorAll("[data-rte-style='rte2-toolbar-find'], [data-rte-style='rte2-toolbar-fullscreen'], [data-rte-style='rte2-toolbar-ai-inline']").length;this.toolbarWrapper.dataset.sidebarIconCount=t,3===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithThreeIcons)":2===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithTwoIcons)":1===t&&(e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithOneIcon)")},this.handleWordCount=()=>{this.view.wordCount&&(this.wordCountScheduled||(this.wordCountScheduled=!0,requestAnimationFrame(()=>{this.wordCountScheduled=!1,this.calculateWordCount()})))},this.calculateWordCount=()=>{if(!this.view.wordCount)return;const e=/[0-9_'-\u0027\u2019\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+/g;let t=0,a=0;const n=new Set(["del","comment","html"]);this.parentElement.classList.contains("isPlaceholderContent")&&!this.ctx.hasAttribute("data-editable-placeholder")||this.view.state.doc.descendants((s,i)=>{if(s.isText&&!s.marks.some(e=>n.has(e.type.name))){t+=s.text.length;const n=s.text.match(e);n&&(a+=n.length)}}),this.updateWordCountDisplay(a,t)},this.updateWordCountDisplay=(e,t)=>{const a=+this.ctx.dataset.suggestedMinimum,n=+this.ctx.dataset.suggestedMaximum,s=t<a?this.ctx.dataset.suggestedMinimumMessage:t>n?this.ctx.dataset.suggestedMaximumMessage:"",i=s||`${e}w ${t}c`;i!==this.lastDisplayText&&(this.lastDisplayText=i,this.view.wordCount.innerText=i,this.view.wordCount.setAttribute("aria-label",(0,g.QX)(e,t,s)),requestAnimationFrame(()=>{const e=this.view.wordCount.clientWidth;e!==this.lastMeasuredWidth&&(this.lastMeasuredWidth=e,this.toolbarWrapper.style.setProperty("--ProseMirror-wordCount",`${e}px`))}),(0,v.tK)((0,g.y)(e,t,a,n,this.ctx.dataset.suggestedMinimumMessage,this.ctx.dataset.suggestedMaximumMessage)))},e.setAttribute("style",s.AA.STYLES.DISPLAY_NONE),this.ctx=e,this.$ctx=b(e),this.schema=(0,s.e$)(t,c,C),this.pendingRequest=null,this.userId=r,this.userLabel=n,this.compliantTagNameMap=C,this.menuItems=(0,s.OF)(t,this.schema,a,n,r,c);const y=document.createElement("div");if(y.className="ProseMirrorContainer hide",this.ctx.parentNode.appendChild(y),h){const e=document.createElement("div");e.className=s.AA.CLASSES.PM_AVATAR_WRAPPER,y.appendChild(e)}this.toolbarWrapper=document.createElement("div"),this.toolbarWrapper.className="ProseMirrorToolbar",y.appendChild(this.toolbarWrapper),this.numLines=w,this.fieldName=d,this.isCollab=h,this.loaded=!1,this.hasCursorState=!1,this.parentElement=y,this.wordCountScheduled=!1,this.lastDisplayText="",this.lastMeasuredWidth=0,y.addEventListener("click",e=>{"A"!==e.target.tagName&&"LI"!==e.target.tagName||e.target.setAttribute("data-leave-popup-open","true")}),y.addEventListener("dragstart",e=>{e.preventDefault()}),y.addEventListener("com.psddev.cms.rte.clear",()=>{const{state:e,dispatch:t}=this.view;(0,i.y6)(e,"",this.compliantTagNameMap,t,!1,!0)}),this.isCollab&&(u.default.execute("com.psddev.cms.rte.RichTextCollabUserAction",{fieldName:this.fieldName}),window.addEventListener("click",e=>{if(!this.view||!this.view.dom)return;let t=e.target,a=!1;for(;t;){if(this.view.dom.parentNode===t){a=!0;break}t=t.parentElement}a||this.createRecord()}),window.addEventListener("unload",e=>{this.createRecord()}),PubSub.subscribe("collabLock",e=>{const{id:t}=e;this.createLockRecord(t)}),PubSub.subscribe("collabUnlock",e=>{const{id:t}=e;this.removeLockRecord(t)}))}init(){if(this.isCollab)u.default.initialize("com.psddev.cms.rte.RichTextCollabItemState",{fieldName:this.fieldName},()=>{if(this.loaded)return;let e,t=0,a={},n=[],s=this.lockedList={};this.initialPayload?(t=parseInt(this.initialPayload.version),e=this.schema.nodeFromJSON(JSON.parse(this.initialPayload.doc)),a=this.initialPayload.anchorMap,n=this.initialPayload.rangeList,s=this.initialPayload.lockedList||{}):(e=this.getInitialContent(),this.createNewRecord(e)),this.buildView(e,t,a,n,s),this.setUpWordCount(),this.handleWordCount()}),u.default.receive("com.psddev.cms.rte.RichTextCollabItemBroadcast",e=>{if(e.fieldName!==this.fieldName)return;if(!this.loaded)return void(this.initialPayload=e);(e.resolvedRequestIds[this.pendingRequest]||0===e.version)&&(this.pendingRequest=null);const t=(0,p.HF)(this.view.state);e.wasRejected&&this.createRecord(this.view.state.tr,this.view.state);const a=e.stepsList,n=e.clientList,s=a.slice(t),i=n.slice(t);try{let t=(0,p.kq)(this.view.state,s.map(e=>h.pn.fromJSON(this.schema,e)),i,{mapSelectionBackward:!0});t.type="received",t.setMeta("collabManager$",{anchorMap:e.anchorMap,rangeList:e.rangeList,lockedList:e.lockedList||{}}),this.dispatchAction(t),this.hasQueuedRequest&&(this.hasQueuedRequest=!1,this.createRecord(this.view.state.tr,this.view.state))}catch(e){console.log(e)}});else{const e=this.getInitialContent();let t=0,a={},n=[];this.buildView(e,t,a,n),this.setUpWordCount(),this.handleWordCount()}}dispatchAction(e){const t=this.view.state.apply(e);if(this.view.updateState(t),"received"!==e.type&&this.isCollab&&this.createRecord(e,t),e.docChanged){const t=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);if(this.ctx.getAttribute("placeholder")&&t===this.ctx.getAttribute("placeholder")?(this.ctx.value="",this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)):(this.ctx.value=t,this.parentElement.classList.remove(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)),this.handleWordCount(),!e.getMeta("disableNativeEvent")){const e=document.createEvent("HTMLEvents");e.initEvent("input",!0,!1),this.ctx.dispatchEvent(e)}}}getView(e){const t={};RICH_TEXT_ELEMENTS_PM.filter(e=>e.popup&&"table"!==e.tag&&"tr"!==e.tag&&"td"!==e.tag&&"ul"!==e.tag&&"ol"!==e.tag).forEach(e=>{t[e.tag]=(e,t,a)=>new c.G(e,t,a,this.lockedList,this.isCollab)});const a=m.ZF.fromSchema(e.config.schema),n=new m.ZF(Object.assign({},a.nodes,{line:function(e){return["p",e.attrs,0]}}),a.marks),s=!this.ctx.closest(".is-readOnly");return new r.Lz(this.parentElement,{state:e,editable:()=>s,attributes:{tabIndex:"0"},dispatchTransaction:this.dispatchAction.bind(this),nodeViews:{inlineEnhancement:(e,t,a)=>new c.G(e,t,a),blockEnhancement:(e,t,a)=>new c.G(e,t,a),table:(e,t,a)=>new d.Q(e,t,a),...t},clipboardSerializer:n,props:{ctx:this.ctx,isFullScreen:!1,resizeCallbacks:[]}})}}n()}catch(e){n(e)}},1)},60252(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{RTE:()=>w}),a(57573),a(62953),a(49371),a(42723),a(96648),a(56065),a(56673);var s=a(14982),i=a(13364);if(3324==a.j)var r=a(88282);var o=a(34120),l=a(19459),c=a(42244),d=a(64472),u=a(23054);if(3324==a.j)var p=a(11646);if(3324==a.j)var h=a(53129);if(3324==a.j)var m=a(48940);if(a(87021),3324==a.j)var f=a(49309);a(61685);var g=a(88420),v=a(90127),b=a(88630),C=e([s,i,l,c,d]);[s,i,l,c,d]=C.then?(await C)():C,window.BRIGHTSPOT?.ui.cms.enableV5UI?await a.e(7718).then(a.bind(a,27718)):(await Promise.resolve().then(a.bind(a,61685)),await a.e(7923).then(a.bind(a,77923)),await a.e(4168).then(a.bind(a,64168)));class w{constructor(e,t,a,n,r,c,d,h,C,w){this.setValue=e=>{const{state:t,dispatch:a}=this.view;(0,i.y6)(t,e,this.compliantTagNameMap,a,!0,!0,!1)},this.setMinHeight=()=>{this.view.dom.style.setProperty("--ProseMirror-numLines",this.numLines)},this.hideLoader=()=>{const e=this.view.dom.parentElement.previousSibling;e&&(e.classList.add("hide"),e.style.minHeight=0),this.view.dom.parentElement.classList.remove("hide")},this.handlePlaceholderUpdate=e=>{const{state:t,dispatch:a,dom:n}=this.view,r=this.ctx.getAttribute("placeholder"),o=l.wM.serialize(t.doc.content,this.compliantTagNameMap);e?.clearOnChange||n.parentElement.classList.contains(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)||""===o&&o!==r?((0,i.y6)(t,r,this.compliantTagNameMap,a,!1,!0),this.ctx.value="",this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)):o===r&&this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)},this.getInitialContent=()=>{let e=this.ctx.value;!e&&this.ctx.hasAttribute("placeholder")&&(e=this.ctx.getAttribute("placeholder"));const t="com.psddev.conversation.Post"===this.ctx.closest(".CIG")?.dataset?.type,a=document.createElement("div");return a.innerHTML=(0,o.n)(e,this.schema,this.compliantTagNameMap,!1,t),m.S4.fromSchema(this.schema).parse(a,{preserveWhitespace:"full"})},this.buildView=(e,t,a,n,r)=>{const o=(0,i.Gu)(e,this.menuItems,s.eu,this.schema,this.userId,this.userLabel,t,a,n,r,this.isCollab,this.ctx,this.compliantTagNameMap);if(this.view=this.getView(o),ENABLE_PROSE_MIRROR_SPELL_CHECK&&(this.view.dom.spellcheck=!1),this.setMinHeight(),this.hideLoader(),this.view.submenu=document.createElement("div"),this.view.submenu.className="ProsemirrorEnhancementMenuContainer",this.view.dom.parentNode.append(this.view.submenu),this.initialPayload){const e=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);this.ctx.value=e;const t=document.createEvent("HTMLEvents");t.initEvent("input",!0,!1),this.ctx.dispatchEvent(t)}this.loaded=!0,this.ctx.getAttributeNames().filter(e=>e.startsWith("aria-")).forEach(e=>{this.view.dom.setAttribute(e,this.ctx.getAttribute(e))});const c=this.view.dom.closest(".CIG-row");if(c){const e=c.querySelector(".Message.is-error");if(e){const t=e.getAttribute("id");t&&(this.view.dom.setAttribute("aria-describedby",t),this.view.dom.setAttribute("aria-invalid","true"))}}!this.ctx.hasAttribute("placeholder")||this.ctx.getAttribute("placeholder")!==this.ctx.value&&this.ctx.value||this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT),this.$ctx.on("placeholderUpdate",(e,t)=>{this.handlePlaceholderUpdate(t)}),new ResizeObserver(()=>{this.view&&this.view.props&&this.view.props.props&&this.view.props.props.resizeCallbacks&&this.view.props.props.resizeCallbacks.forEach(e=>{e.callback&&e.callback()})}).observe(this.view.dom),PubSub.publish("rteLoaded",this)},this.createLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"lockOnly",clientId:this.userId,lockedId:e})},this.removeLockRecord=e=>{u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,type:"unlockOnly",clientId:this.userId,lockedId:e})},this.createNewRecord=e=>{this.pendingRequest=(0,f.A)(),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"create",rangeList:JSON.stringify([]),requestId:this.pendingRequest,doc:JSON.stringify(e.toJSON())})},this.createRecord=(e,t)=>{if(this.pendingRequest)return void(this.hasQueuedRequest=!0);if(this.pendingRequest=(0,f.A)(),!e||!t)return void(this.hasCursorState&&(u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:null}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!1));const a=(0,p._X)(t),{anchor:n,ranges:s,empty:i}=t.selection;if(a){const e=JSON.stringify(t.doc.toJSON());u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,stepsList:JSON.stringify(a.steps),doc:e,version:a.version,clientId:this.userId,anchor:JSON.stringify({[this.userId]:n}),type:"steps",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0}else if(i)u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"anchorOnly",rangeList:JSON.stringify([]),requestId:this.pendingRequest}),this.hasCursorState=!0;else{const e=[];s.forEach(t=>{const{$from:a,$to:n}=t,s=a.pos,i=n.pos;e.push({from:s,to:i,clientId:this.userId,requestId:this.pendingRequest})}),u.default.execute("com.psddev.cms.rte.RichTextCollabItemAction",{fieldName:this.fieldName,anchor:JSON.stringify({[this.userId]:n}),type:"range",rangeList:JSON.stringify(e),requestId:this.pendingRequest}),this.hasCursorState=!0}},this.setUpWordCount=()=>{this.view.wordCount=document.createElement("div");const e=this.view.wordCount;e.className="CIG-wordCount",e.setAttribute("role","status"),e.setAttribute("aria-live","off"),this.toolbarWrapper.appendChild(e);const t=this.toolbarWrapper.querySelectorAll("[data-rte-style='rte2-toolbar-find'], [data-rte-style='rte2-toolbar-fullscreen'], [data-rte-style='rte2-toolbar-ai-inline']").length;this.toolbarWrapper.dataset.sidebarIconCount=t,3===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithThreeIcons)":2===t?e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithTwoIcons)":1===t&&(e.style["inset-inline-end"]="var(--ProseMirror-wordCountSpacingWithOneIcon)")},this.handleWordCount=()=>{this.view.wordCount&&(this.wordCountScheduled||(this.wordCountScheduled=!0,requestAnimationFrame(()=>{this.wordCountScheduled=!1,this.calculateWordCount()})))},this.calculateWordCount=()=>{if(!this.view.wordCount)return;const e=/[0-9_'-\u0027\u2019\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+/g;let t=0,a=0;const n=new Set(["del","comment","html"]);this.parentElement.classList.contains("isPlaceholderContent")&&!this.ctx.hasAttribute("data-editable-placeholder")||this.view.state.doc.descendants((s,i)=>{if(s.isText&&!s.marks.some(e=>n.has(e.type.name))){t+=s.text.length;const n=s.text.match(e);n&&(a+=n.length)}}),this.updateWordCountDisplay(a,t)},this.updateWordCountDisplay=(e,t)=>{const a=+this.ctx.dataset.suggestedMinimum,n=+this.ctx.dataset.suggestedMaximum,s=t<a?this.ctx.dataset.suggestedMinimumMessage:t>n?this.ctx.dataset.suggestedMaximumMessage:"",i=s||`${e}w ${t}c`;i!==this.lastDisplayText&&(this.lastDisplayText=i,this.view.wordCount.innerText=i,this.view.wordCount.setAttribute("aria-label",(0,g.QX)(e,t,s)),requestAnimationFrame(()=>{const e=this.view.wordCount.clientWidth;e!==this.lastMeasuredWidth&&(this.lastMeasuredWidth=e,this.toolbarWrapper.style.setProperty("--ProseMirror-wordCount",`${e}px`))}),(0,v.tK)((0,g.y)(e,t,a,n,this.ctx.dataset.suggestedMinimumMessage,this.ctx.dataset.suggestedMaximumMessage)))},e.setAttribute("style",s.AA.STYLES.DISPLAY_NONE),this.ctx=e,this.$ctx=b(e),this.schema=(0,s.e$)(t,c,C),this.pendingRequest=null,this.userId=r,this.userLabel=n,this.compliantTagNameMap=C,this.menuItems=(0,s.OF)(t,this.schema,a,n,r,c);const y=document.createElement("div");if(y.className="ProseMirrorContainer hide",this.ctx.parentNode.appendChild(y),h){const e=document.createElement("div");e.className=s.AA.CLASSES.PM_AVATAR_WRAPPER,y.appendChild(e)}this.toolbarWrapper=document.createElement("div"),this.toolbarWrapper.className="ProseMirrorToolbar",y.appendChild(this.toolbarWrapper),this.numLines=w,this.fieldName=d,this.isCollab=h,this.loaded=!1,this.hasCursorState=!1,this.parentElement=y,this.wordCountScheduled=!1,this.lastDisplayText="",this.lastMeasuredWidth=0,y.addEventListener("click",e=>{"A"!==e.target.tagName&&"LI"!==e.target.tagName||e.target.setAttribute("data-leave-popup-open","true")}),y.addEventListener("dragstart",e=>{e.preventDefault()}),y.addEventListener("com.psddev.cms.rte.clear",()=>{const{state:e,dispatch:t}=this.view;(0,i.y6)(e,"",this.compliantTagNameMap,t,!1,!0)}),this.isCollab&&(u.default.execute("com.psddev.cms.rte.RichTextCollabUserAction",{fieldName:this.fieldName}),window.addEventListener("click",e=>{if(!this.view||!this.view.dom)return;let t=e.target,a=!1;for(;t;){if(this.view.dom.parentNode===t){a=!0;break}t=t.parentElement}a||this.createRecord()}),window.addEventListener("unload",e=>{this.createRecord()}),PubSub.subscribe("collabLock",e=>{const{id:t}=e;this.createLockRecord(t)}),PubSub.subscribe("collabUnlock",e=>{const{id:t}=e;this.removeLockRecord(t)}))}init(){if(this.isCollab)u.default.initialize("com.psddev.cms.rte.RichTextCollabItemState",{fieldName:this.fieldName},()=>{if(this.loaded)return;let e,t=0,a={},n=[],s=this.lockedList={};this.initialPayload?(t=parseInt(this.initialPayload.version),e=this.schema.nodeFromJSON(JSON.parse(this.initialPayload.doc)),a=this.initialPayload.anchorMap,n=this.initialPayload.rangeList,s=this.initialPayload.lockedList||{}):(e=this.getInitialContent(),this.createNewRecord(e)),this.buildView(e,t,a,n,s),this.setUpWordCount(),this.handleWordCount()}),u.default.receive("com.psddev.cms.rte.RichTextCollabItemBroadcast",e=>{if(e.fieldName!==this.fieldName)return;if(!this.loaded)return void(this.initialPayload=e);(e.resolvedRequestIds[this.pendingRequest]||0===e.version)&&(this.pendingRequest=null);const t=(0,p.HF)(this.view.state);e.wasRejected&&this.createRecord(this.view.state.tr,this.view.state);const a=e.stepsList,n=e.clientList,s=a.slice(t),i=n.slice(t);try{let t=(0,p.kq)(this.view.state,s.map(e=>h.pn.fromJSON(this.schema,e)),i,{mapSelectionBackward:!0});t.type="received",t.setMeta("collabManager$",{anchorMap:e.anchorMap,rangeList:e.rangeList,lockedList:e.lockedList||{}}),this.dispatchAction(t),this.hasQueuedRequest&&(this.hasQueuedRequest=!1,this.createRecord(this.view.state.tr,this.view.state))}catch(e){console.log(e)}});else{const e=this.getInitialContent();let t=0,a={},n=[];this.buildView(e,t,a,n),this.setUpWordCount(),this.handleWordCount()}}dispatchAction(e){const t=this.view.state.apply(e);if(this.view.updateState(t),"received"!==e.type&&this.isCollab&&this.createRecord(e,t),e.docChanged){const t=l.wM.serialize(this.view.state.doc.content,this.compliantTagNameMap);if(this.ctx.getAttribute("placeholder")&&t===this.ctx.getAttribute("placeholder")?(this.ctx.value="",this.parentElement.classList.add(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)):(this.ctx.value=t,this.parentElement.classList.remove(s.AA.CLASSES.IS_PLACEHOLDER_CONTENT)),this.handleWordCount(),!e.getMeta("disableNativeEvent")){const e=document.createEvent("HTMLEvents");e.initEvent("input",!0,!1),this.ctx.dispatchEvent(e)}}}getView(e){const t={};RICH_TEXT_ELEMENTS_PM.filter(e=>e.popup&&"table"!==e.tag&&"tr"!==e.tag&&"td"!==e.tag&&"ul"!==e.tag&&"ol"!==e.tag).forEach(e=>{t[e.tag]=(e,t,a)=>new c.G(e,t,a,this.lockedList,this.isCollab)});const a=m.ZF.fromSchema(e.config.schema),n=new m.ZF(Object.assign({},a.nodes,{line:function(e){return["p",e.attrs,0]}}),a.marks),s=!this.ctx.closest(".is-readOnly");return new r.Lz(this.parentElement,{state:e,editable:()=>s,attributes:{tabIndex:"0"},dispatchTransaction:this.dispatchAction.bind(this),nodeViews:{inlineEnhancement:(e,t,a)=>new c.G(e,t,a),blockEnhancement:(e,t,a)=>new c.G(e,t,a),table:(e,t,a)=>new d.Q(e,t,a),...t},clipboardSerializer:n,props:{ctx:this.ctx,isFullScreen:!1,resizeCallbacks:[]}})}}n()}catch(e){n(e)}},1)},46929(e,t,a){"use strict";a.d(t,{n:()=>i}),a(44764),a(84978),a(25809),a(92280);var n=a(22628),s=a(5292);const i=(e,t,a,i,l)=>{const c=new Set,d=new Set;a.forEach((t,a)=>{const n=new RegExp(a,"g");e=e.replace(n,t)}),Object.keys(t.nodes).forEach(e=>{const a=t.nodes[e].isBlock;t.nodes[e].spec.hasOwnProperty("parseDOM")&&t.nodes[e].spec.parseDOM.forEach(e=>{d.add(e.tag),a&&"br"!==e.tag&&c.add(e.tag)})}),Object.keys(t.marks).forEach(e=>{t.marks[e].spec.hasOwnProperty("parseDOM")&&t.marks[e].spec.parseDOM.forEach(e=>{d.add(e.tag)})});const u=document.createElement("div");u.innerHTML=l?n.A.sanitize(e,{CUSTOM_ELEMENT_HANDLING:{tagNameCheck:()=>!0,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}}):e,function(e,t,a){const n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){const n=(e.className?e.className.toString().split(" "):[]).some(e=>t.has(`.${e}`));return t.has(e.nodeName.toLowerCase())||n||a?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;i.nextNode();)n.push(i.currentNode);n.forEach(e=>{const t=e.parentNode,a=(0,s.A)("code",e.outerHTML.slice(0,e.outerHTML.indexOf(">")+1)),n=(0,s.A)("code",`</${e.nodeName.toLowerCase()}>`);for(t.insertBefore(a,e);e.firstChild;)t.insertBefore(e.firstChild,e);t.insertBefore(n,e),t.removeChild(e)})}(u,d,i);const p=r([...u.childNodes],c);return o(p,c).innerHTML},r=(e,t)=>{let a=null;const n=[];let s=-1;return e.forEach(e=>{const i=e.nodeName.toLowerCase();if(t.has(a)&&"#text"===i&&0===e.wholeText.trim().length)return;const r=e.className?e.className.split(" "):[];let o=r.some(e=>t.has(`.${e}`));if(-1!==r.indexOf("rte2-style-ins-delete")||-1!==r.indexOf("rte2-style-ins-insert")||-1!==r.indexOf("rte2-style-ins-ai")||"ai"===i||"del"===i||"ins"===i){const a=e.children;if([...a].some(e=>{const a=e.nodeName.toLowerCase();return t.has(a)||"br"===a})&&(o=!0,e.childNodes.length>1))for(let e of a)"br"===e.nodeName.toLowerCase()&&e.remove()}t.has(i)||o?(s++,n[s]=[],n[s].push(e),n[s].isBlock=!0):"br"===i||null!==a&&"br"!==a&&!t.has(a)?"br"!==i&&"br"!==a?(n[s].isBlock&&(s++,n[s]=[]),n[s].push(e)):"br"===i&&null===a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0,n[s].isFirst=!0):"br"===i&&"br"!==a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0):"br"===i&&"br"===a&&n[s].push(e):(s++,n[s]=[],n[s].push(e)),a=i}),n},o=(e,t)=>{const a=document.createElement("div");let n=!1;return e.forEach((s,i)=>{if(s.isBreaks&&s.isFirst)s.forEach((e,t)=>{if(0===t&&e.length>1)return;const n=document.createElement("bsp-line");a.appendChild(n)}),n=!1;else if(s.isBreaks&&i===e.length-1){const e=document.createElement("bsp-line");a.appendChild(e)}else if(s.isBreaks)s.forEach((e,t)=>{if(0===t&&!n)return;const s=document.createElement("bsp-line");a.appendChild(s)}),n=!1;else if(s.isBlock)s.forEach(e=>{const n=r([...e.childNodes],t);let s=o(n,t);e.innerHTML="",[...s.childNodes].forEach(t=>{e.appendChild(t)}),a.appendChild(e)}),n=!0;else{const e=document.createElement("bsp-line");s.forEach(t=>{e.appendChild(t)}),a.appendChild(e),n=!1}}),a}},34120(e,t,a){"use strict";a.d(t,{n:()=>i}),a(57573),a(49371),a(96648),a(56673);var n=a(87021),s=a(18101);const i=(e,t,a,i,l)=>{const c=new Set,d=new Set;a.forEach((t,a)=>{const n=new RegExp(a,"g");e=e.replace(n,t)}),Object.keys(t.nodes).forEach(e=>{const a=t.nodes[e].isBlock;t.nodes[e].spec.hasOwnProperty("parseDOM")&&t.nodes[e].spec.parseDOM.forEach(e=>{d.add(e.tag),a&&"br"!==e.tag&&c.add(e.tag)})}),Object.keys(t.marks).forEach(e=>{t.marks[e].spec.hasOwnProperty("parseDOM")&&t.marks[e].spec.parseDOM.forEach(e=>{d.add(e.tag)})});const u=document.createElement("div");u.innerHTML=l?n.A.sanitize(e,{CUSTOM_ELEMENT_HANDLING:{tagNameCheck:()=>!0,attributeNameCheck:null,allowCustomizedBuiltInElements:!0}}):e,function(e,t,a){const n=[],i=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:function(e){const n=(e.className?e.className.toString().split(" "):[]).some(e=>t.has(`.${e}`));return t.has(e.nodeName.toLowerCase())||n||a?NodeFilter.FILTER_REJECT:NodeFilter.FILTER_ACCEPT}});for(;i.nextNode();)n.push(i.currentNode);n.forEach(e=>{const t=e.parentNode,a=(0,s.A)("code",e.outerHTML.slice(0,e.outerHTML.indexOf(">")+1)),n=(0,s.A)("code",`</${e.nodeName.toLowerCase()}>`);for(t.insertBefore(a,e);e.firstChild;)t.insertBefore(e.firstChild,e);t.insertBefore(n,e),t.removeChild(e)})}(u,d,i);const p=r([...u.childNodes],c);return o(p,c).innerHTML},r=(e,t)=>{let a=null;const n=[];let s=-1;return e.forEach(e=>{const i=e.nodeName.toLowerCase();if(t.has(a)&&"#text"===i&&0===e.wholeText.trim().length)return;const r=e.className?e.className.split(" "):[];let o=r.some(e=>t.has(`.${e}`));if(-1!==r.indexOf("rte2-style-ins-delete")||-1!==r.indexOf("rte2-style-ins-insert")||-1!==r.indexOf("rte2-style-ins-ai")||"ai"===i||"del"===i||"ins"===i){const a=e.children;if([...a].some(e=>{const a=e.nodeName.toLowerCase();return t.has(a)||"br"===a})&&(o=!0,e.childNodes.length>1))for(let e of a)"br"===e.nodeName.toLowerCase()&&e.remove()}t.has(i)||o?(s++,n[s]=[],n[s].push(e),n[s].isBlock=!0):"br"===i||null!==a&&"br"!==a&&!t.has(a)?"br"!==i&&"br"!==a?(n[s].isBlock&&(s++,n[s]=[]),n[s].push(e)):"br"===i&&null===a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0,n[s].isFirst=!0):"br"===i&&"br"!==a?(s++,n[s]=[],n[s].push(e),n[s].isBreaks=!0):"br"===i&&"br"===a&&n[s].push(e):(s++,n[s]=[],n[s].push(e)),a=i}),n},o=(e,t)=>{const a=document.createElement("div");let n=!1;return e.forEach((s,i)=>{if(s.isBreaks&&s.isFirst)s.forEach((e,t)=>{if(0===t&&e.length>1)return;const n=document.createElement("bsp-line");a.appendChild(n)}),n=!1;else if(s.isBreaks&&i===e.length-1){const e=document.createElement("bsp-line");a.appendChild(e)}else if(s.isBreaks)s.forEach((e,t)=>{if(0===t&&!n)return;const s=document.createElement("bsp-line");a.appendChild(s)}),n=!1;else if(s.isBlock)s.forEach(e=>{const n=r([...e.childNodes],t);let s=o(n,t);e.innerHTML="",[...s.childNodes].forEach(t=>{e.appendChild(t)}),a.appendChild(e)}),n=!0;else{const e=document.createElement("bsp-line");s.forEach(t=>{e.appendChild(t)}),a.appendChild(e),n=!1}}),a}},15281(e,t,a){"use strict";if(a.d(t,{d:()=>o}),a(67219),a(84978),a(39589),7717==a.j)var n=a(13333);var s=a(88903);if(7717==a.j)var i=a(72065);var r=a(22176);const o=e=>new i.k_({key:new i.hs("interchangeable"),props:{handleDOMEvents:{interchange:(t,a)=>{const o="/cms/drawer/item-interchange",l=a.detail;if(l.loadableTypes){const e=l.node,a=e.attrs.meta,n=e.attrs.attributes,i=t.state.tr,r=new URLSearchParams;r.set("typeId",a.typeId),r.set("targetTypeId",n["data-convert-target"]),r.set("itemState",n["data-state"]),r.set("isRte","true"),r.set("isConvert","true");const c=new Headers,d=s.A.get("bsp.csrf");return d&&c.append("Brightspot-CSRF",d),void fetch(`${o}`,{method:"POST",credentials:"include",body:r,headers:c}).then(s=>{s.text().then(s=>{const r={...JSON.parse(s)};n["data-state"]=r["data-state"],n["data-loadable-types"]=r["data-loadable-types"];const o=e.type.create({attributes:r,typeId:n["data-convert-target"],meta:a,id:e.attrs.id});i.replaceSelectionWith(o),t.dispatch(i)})})}const c=a.detail.to.dataset.sortableValidItemTypes.split(" "),d=a.detail.items.length>0?a.detail.items:[a.detail.item];!async function(e,t,a,o,l){for(const c in a){const d=a[c];let u;const p=d.dataset.sortableLoadTypes?.split(" ")||[],h=d.dataset.id,m=p.find(e=>l.includes(e)),f=new URLSearchParams;f.set("id",h||""),f.set("targetTypeId",m||""),f.set("isRte","true");const g=new Headers,v=s.A.get("bsp.csrf");v&&g.append("Brightspot-CSRF",v),await fetch(`${o}`,{method:"POST",credentials:"include",body:f,headers:g}).then(async s=>{const o=await s.text(),l={...JSON.parse(o)},c=l.label,d=window.RICH_TEXT_ELEMENTS;if(d instanceof Array&&(u=d.find(e=>e.tag===l.tagName)),u){let s,o;const d=e.state.selection,p=d.ranges[0].$to.pos;let f=p;const g=e.state.tr;if(!d.empty){const e=g.doc.resolve(p);g.setSelection(i.U3.near(e))}if("a"===u.tag){s=t.marks[u.tag],o=s.create({label:c,attributes:l,typeId:m,meta:u,id:h});const e=document.createElement("div");e.innerHTML=c||"",a.length>1&&e.append(document.createElement("br"));const r=n.S4.fromSchema(t).parseSlice(e,{preserveWhitespace:"full"});f=p+r.size,g.replaceSelection(r).addMark(p,f,o);const d=g.doc.resolve(f);g.setSelection(i.U3.near(d))}else{s=t.nodes[u.tag],o=s.create({label:"bsp-module"!==u.tag?c:null,attributes:l,typeId:m,meta:u,id:h});const e=g.doc.resolve(p),a=e.parent,n=a.isTextblock&&e.parentOffset===a.content.size;let r;if(a.isTextblock&&n){const a=e.depth>1?e.depth-1:e.depth,n=e.after(a);g.insert(n,o);const s=n+o.nodeSize;if(s>=g.doc.content.size){const e=t.nodes.line;e?(g.insert(s,e.create()),r=s+1):r=s}else r=s}else g.replaceSelectionWith(o),r=p+o.nodeSize;const d=g.doc.resolve(r);g.setSelection(i.U3.near(d,1))}g.setMeta("enhancementManager$",{remove:{id:h}}),e.dom.parentElement?.classList.contains(r.A.CLASSES.IS_PLACEHOLDER_CONTENT)&&e.dom.parentElement?.classList.remove(r.A.CLASSES.IS_PLACEHOLDER_CONTENT);try{e.dispatch(g)}catch(e){}}}).catch(()=>{})}}(t,e,d,o,c)}}}})},2472(e,t,a){"use strict";if(a.d(t,{d:()=>o}),a(86634),a(49371),a(26780),3324==a.j)var n=a(48940);var s=a(24510);if(3324==a.j)var i=a(59256);var r=a(34985);const o=e=>new i.k_({key:new i.hs("interchangeable"),props:{handleDOMEvents:{interchange:(t,a)=>{const o="/cms/drawer/item-interchange",l=a.detail;if(l.loadableTypes){const e=l.node,a=e.attrs.meta,n=e.attrs.attributes,i=t.state.tr,r=new URLSearchParams;r.set("typeId",a.typeId),r.set("targetTypeId",n["data-convert-target"]),r.set("itemState",n["data-state"]),r.set("isRte","true"),r.set("isConvert","true");const c=new Headers,d=s.A.get("bsp.csrf");return d&&c.append("Brightspot-CSRF",d),void fetch(`${o}`,{method:"POST",credentials:"include",body:r,headers:c}).then(s=>{s.text().then(s=>{const r={...JSON.parse(s)};n["data-state"]=r["data-state"],n["data-loadable-types"]=r["data-loadable-types"];const o=e.type.create({attributes:r,typeId:n["data-convert-target"],meta:a,id:e.attrs.id});i.replaceSelectionWith(o),t.dispatch(i)})})}const c=a.detail.to.dataset.sortableValidItemTypes.split(" "),d=a.detail.items.length>0?a.detail.items:[a.detail.item];!async function(e,t,a,o,l){for(const c in a){const d=a[c];let u;const p=d.dataset.sortableLoadTypes?.split(" ")||[],h=d.dataset.id,m=p.find(e=>l.includes(e)),f=new URLSearchParams;f.set("id",h||""),f.set("targetTypeId",m||""),f.set("isRte","true");const g=new Headers,v=s.A.get("bsp.csrf");v&&g.append("Brightspot-CSRF",v),await fetch(`${o}`,{method:"POST",credentials:"include",body:f,headers:g}).then(async s=>{const o=await s.text(),l={...JSON.parse(o)},c=l.label,d=window.RICH_TEXT_ELEMENTS;if(d instanceof Array&&(u=d.find(e=>e.tag===l.tagName)),u){let s,o;const d=e.state.selection,p=d.ranges[0].$to.pos;let f=p;const g=e.state.tr;if(!d.empty){const e=g.doc.resolve(p);g.setSelection(i.U3.near(e))}if("a"===u.tag){s=t.marks[u.tag],o=s.create({label:c,attributes:l,typeId:m,meta:u,id:h});const e=document.createElement("div");e.innerHTML=c||"",a.length>1&&e.append(document.createElement("br"));const r=n.S4.fromSchema(t).parseSlice(e,{preserveWhitespace:"full"});f=p+r.size,g.replaceSelection(r).addMark(p,f,o);const d=g.doc.resolve(f);g.setSelection(i.U3.near(d))}else{s=t.nodes[u.tag],o=s.create({label:"bsp-module"!==u.tag?c:null,attributes:l,typeId:m,meta:u,id:h});const e=g.doc.resolve(p),a=e.parent,n=a.isTextblock&&e.parentOffset===a.content.size;let r;if(a.isTextblock&&n){const a=e.depth>1?e.depth-1:e.depth,n=e.after(a);g.insert(n,o);const s=n+o.nodeSize;if(s>=g.doc.content.size){const e=t.nodes.line;e?(g.insert(s,e.create()),r=s+1):r=s}else r=s}else g.replaceSelectionWith(o),r=p+o.nodeSize;const d=g.doc.resolve(r);g.setSelection(i.U3.near(d,1))}g.setMeta("enhancementManager$",{remove:{id:h}}),e.dom.parentElement?.classList.contains(r.A.CLASSES.IS_PLACEHOLDER_CONTENT)&&e.dom.parentElement?.classList.remove(r.A.CLASSES.IS_PLACEHOLDER_CONTENT);try{e.dispatch(g)}catch(e){}}}).catch(()=>{})}}(t,e,d,o,c)}}}})},6087(e,t,a){"use strict";if(a.d(t,{l:()=>c}),7717==a.j)var n=a(68243);var s=a(1439),i=a.n(s);if(7717==a.j)var r=a(13333);if(7717==a.j)var o=a(72065);if(7717==a.j)var l=a(15483);const c=e=>{const t=document.querySelector("template#rte-mention-input");let a;return t&&(a=document.createElement("form"),a.className="Mention",a.appendChild(t.content.cloneNode(!0)),(0,n.A)(a,e),i()(a).trigger("create")),new o.k_({props:{handleTextInput:(e,t,n,s)=>{if(!a)return!1;if("@"!==s)return!1;if(1!==t){let a=e.state.doc.textBetween(t-1,n);if(!/\s/.test(a)&&""!==a)return!1}const i=a.querySelector(".ContentSelector-select");if(!i)return!1;i.value="",i.dispatchEvent(new CustomEvent("change",{bubbles:!0}));const o=a.offsetParent.getBoundingClientRect();a.style.left=e.coordsAtPos(t).left-o.left+"px",a.style.top=e.domAtPos(t).node.getBoundingClientRect().top-o.top+"px",a.style.visibility="visible";const c=(0,l.Kr)(a)[0];c.focus(),c.click();const d=()=>{i.removeEventListener("change",d);const a=i.value;if(!a)return;const s=document.createElement("bsp-mention");s.setAttribute("user-id",a),s.innerText="@"+Array.prototype.filter.call(i,e=>e.value===a)[0].label;const o=document.createElement("div");o.appendChild(s),o.appendChild(document.createTextNode(" "));const l=e.state;e.dispatch(l.tr.replaceRange(t,n+1,r.S4.fromSchema(l.config.schema).parseSlice(o,{preserveWhitespace:!0})))},u=()=>{i.removeEventListener("combo-input:hide",u),e.focus(),a.style.visibility="hidden"};return i.addEventListener("change",d),i.addEventListener("combo-input:hide",u),!1}}})}},41694(e,t,a){"use strict";if(a.d(t,{l:()=>c}),3324==a.j)var n=a(39242);var s=a(88630),i=a.n(s);if(3324==a.j)var r=a(48940);if(3324==a.j)var o=a(59256);if(3324==a.j)var l=a(2674);const c=e=>{const t=document.querySelector("template#rte-mention-input");let a;return t&&(a=document.createElement("form"),a.className="Mention",a.appendChild(t.content.cloneNode(!0)),(0,n.A)(a,e),i()(a).trigger("create")),new o.k_({props:{handleTextInput:(e,t,n,s)=>{if(!a)return!1;if("@"!==s)return!1;if(1!==t){let a=e.state.doc.textBetween(t-1,n);if(!/\s/.test(a)&&""!==a)return!1}const i=a.querySelector(".ContentSelector-select");if(!i)return!1;i.value="",i.dispatchEvent(new CustomEvent("change",{bubbles:!0}));const o=a.offsetParent.getBoundingClientRect();a.style.left=e.coordsAtPos(t).left-o.left+"px",a.style.top=e.domAtPos(t).node.getBoundingClientRect().top-o.top+"px",a.style.visibility="visible";const c=(0,l.Kr)(a)[0];c.focus(),c.click();const d=()=>{i.removeEventListener("change",d);const a=i.value;if(!a)return;const s=document.createElement("bsp-mention");s.setAttribute("user-id",a),s.innerText="@"+Array.prototype.filter.call(i,e=>e.value===a)[0].label;const o=document.createElement("div");o.appendChild(s),o.appendChild(document.createTextNode(" "));const l=e.state;e.dispatch(l.tr.replaceRange(t,n+1,r.S4.fromSchema(l.config.schema).parseSlice(o,{preserveWhitespace:!0})))},u=()=>{i.removeEventListener("combo-input:hide",u),e.focus(),a.style.visibility="hidden"};return i.addEventListener("change",d),i.addEventListener("combo-input:hide",u),!1}}})}},50844(e,t,a){"use strict";a.a(e,async(e,n)=>{try{if(a.d(t,{x:()=>$}),a(67219),a(44764),7717==a.j)var s=a(72065);if(7717==a.j)var i=a(46388);if(7717==a.j)var r=a(17755);var o=a(341),l=a(38607),c=a(2583),d=a(55864),u=a(51369),p=a(831);if(7717==a.j)var h=a(47401);var m=a(10968),f=a(21932),g=a(34375),v=a(19552);if(7717==a.j)var b=a(75869);if(7717==a.j)var C=a(93970);var w=a(70434);if(7717==a.j)var y=a(24455);var A=a(12536),E=a(35140),S=a(63511),I=a(47045);if(7717==a.j)var T=a(22377);var k=a(27808),M=a(6087),L=a(15281),D=a(46052),P=a(61827),_=e([o,l,c,d,u,f,w,A,E,S,I,k,P]);[o,l,c,d,u,f,w,A,E,S,I,k,P]=_.then?(await _)():_;const x=e=>(0,g.D8)(e),O=()=>{const e=[T.P8];return(0,T.sM)({rules:e})};function $(e){let t=[(0,I.e)(e.compliantTagNameMap),(0,E.o)(e.ctx,e.compliantTagNameMap),(0,h.b6)(),(0,d.s)(),(0,c.bS)(e.schema),(0,f.N_)(e.schema,e.userLabel,e.userId),(0,m.lt)(e.schema,e.userLabel,e.ctx),(0,b.A)(),(0,C.z)(),(0,g.LF)(),(0,v.J)(),(0,l.XC)(e.ctx,e.compliantTagNameMap),(0,w.F)(),(0,r.w)({Tab:x(1),"Shift-Tab":(0,g.D8)(-1)}),(0,r.w)(e.buildKeymap(e)),(0,r.w)(i.RV),(0,k.i)(e.ctx,e.compliantTagNameMap),(0,p.G)(),(0,S.hI)(),O(),(0,o.B)(e.menuItems),(0,L.d)(e.schema)];window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED&&t.unshift((0,D.M)(e.schema,e.userLabel,e.userId,e.compliantTagNameMap),(0,P.t)(e.userLabel,e.userId,e.compliantTagNameMap));try{const a=e.ctx.dataset.rteTags;a&&JSON.parse(a).includes("bsp-mention")&&t.push((0,M.l)(e.ctx))}catch{}return ENABLE_PROSE_MIRROR_SPELL_CHECK&&t.push((0,u.k)()),e.isCollab&&(t.push((0,y.Qr)({version:e.version,clientID:e.userId})),t.push((0,A.H)(e.schema,e.userId,e.anchorMap,e.rangeList,e.lockedList))),t.concat(new s.k_({key:new s.hs("pluginProvider"),props:{attributes:{class:"ProseMirror-setup-style",role:"textbox","aria-multiline":"true"}}}))}n()}catch(R){n(R)}})},63653(e,t,a){"use strict";a.a(e,async(e,n)=>{try{if(a.d(t,{x:()=>$}),a(86634),a(57573),3324==a.j)var s=a(59256);if(3324==a.j)var i=a(59197);if(3324==a.j)var r=a(3743);var o=a(87532),l=a(74214),c=a(89774),d=a(68673),u=a(38560),p=a(88022);if(3324==a.j)var h=a(70112);var m=a(75361),f=a(86325),g=a(21566),v=a(83945);if(3324==a.j)var b=a(63060);if(3324==a.j)var C=a(58363);var w=a(83243);if(3324==a.j)var y=a(11646);var A=a(25345),E=a(99533),S=a(50702),I=a(34236);if(3324==a.j)var T=a(9568);var k=a(40617),M=a(41694),L=a(2472),D=a(10445),P=a(32826),_=e([o,l,c,d,u,f,w,A,E,S,I,k,P]);[o,l,c,d,u,f,w,A,E,S,I,k,P]=_.then?(await _)():_;const x=e=>(0,g.D8)(e),O=()=>{const e=[T.P8];return(0,T.sM)({rules:e})};function $(e){let t=[(0,I.e)(e.compliantTagNameMap),(0,E.o)(e.ctx,e.compliantTagNameMap),(0,h.b6)(),(0,d.s)(),(0,c.bS)(e.schema),(0,f.N_)(e.schema,e.userLabel,e.userId),(0,m.lt)(e.schema,e.userLabel,e.ctx),(0,b.A)(),(0,C.z)(),(0,g.LF)(),(0,v.J)(),(0,l.XC)(e.ctx,e.compliantTagNameMap),(0,w.F)(),(0,r.w)({Tab:x(1),"Shift-Tab":(0,g.D8)(-1)}),(0,r.w)(e.buildKeymap(e)),(0,r.w)(i.RV),(0,k.i)(e.ctx,e.compliantTagNameMap),(0,p.G)(),(0,S.hI)(),O(),(0,o.B)(e.menuItems),(0,L.d)(e.schema)];window.BRIGHTSPOT?.ai?.AI_CHAT_ENABLED&&t.unshift((0,D.M)(e.schema,e.userLabel,e.userId,e.compliantTagNameMap),(0,P.t)(e.userLabel,e.userId,e.compliantTagNameMap));try{const a=e.ctx.dataset.rteTags;a&&JSON.parse(a).includes("bsp-mention")&&t.push((0,M.l)(e.ctx))}catch{}return ENABLE_PROSE_MIRROR_SPELL_CHECK&&t.push((0,u.k)()),e.isCollab&&(t.push((0,y.Qr)({version:e.version,clientID:e.userId})),t.push((0,A.H)(e.schema,e.userId,e.anchorMap,e.rangeList,e.lockedList))),t.concat(new s.k_({key:new s.hs("pluginProvider"),props:{attributes:{class:"ProseMirror-setup-style",role:"textbox","aria-multiline":"true"}}}))}n()}catch(R){n(R)}})},61827(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{E:()=>u,t:()=>d});var s=a(72065),i=a(96410);if(7717==a.j)var r=a(17283);var o=e([i]),l=o.then?(await o)():o;i=l[0];const c=new s.hs("aiInline"),d=(e,t,a)=>new s.k_({key:c,view(n){const s=new i.F(n,c.get(n.state).key,e,t,a),r=n.dom.parentNode?.querySelector(".ProseMirrorToolbar");if(r){const e=s.dom;e&&r.appendChild(e)}return s},state:{init(e){const t=new Map,a=new Map,n=new Map,s=new Map;return a.set("toggleAIInline",!1),t.set("activeStates",a),t.set("disabledStates",n),t.set("metaData",s),t},apply(e,t,a,n){const s=t,i=e.getMeta(c);if(i?.toggleAIInline){const e=s.get("activeStates"),t=e.get("toggleAIInline");e.set("toggleAIInline",!t)}return s}},props:{decorations(e){const t=this.getState(e);if(!t)return r.zF.empty;if(!t.get("activeStates").get("toggleAIInline"))return r.zF.empty;const{from:a,to:n}=e.selection;if(a===n)return r.zF.empty;const s=r.NZ.inline(a,n,{class:"rte2-style-ai-inline-highlight"});return r.zF.create(e.doc,[s])}}}),u=()=>function(e,t,a){return t(e.tr.setMeta(c,{toggleAIInline:!0})),a?.dom.classList.toggle("ProseMirror-aiInlinePreviewMode"),!0};n()}catch(e){n(e)}})},32826(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{E:()=>u,t:()=>d});var s=a(59256),i=a(76995);if(3324==a.j)var r=a(88282);var o=e([i]),l=o.then?(await o)():o;i=l[0];const c=new s.hs("aiInline"),d=(e,t,a)=>new s.k_({key:c,view(n){const s=new i.F(n,c.get(n.state).key,e,t,a),r=n.dom.parentNode?.querySelector(".ProseMirrorToolbar");if(r){const e=s.dom;e&&r.appendChild(e)}return s},state:{init(e){const t=new Map,a=new Map,n=new Map,s=new Map;return a.set("toggleAIInline",!1),t.set("activeStates",a),t.set("disabledStates",n),t.set("metaData",s),t},apply(e,t,a,n){const s=t,i=e.getMeta(c);if(i?.toggleAIInline){const e=s.get("activeStates"),t=e.get("toggleAIInline");e.set("toggleAIInline",!t)}return s}},props:{decorations(e){const t=this.getState(e);if(!t)return r.zF.empty;if(!t.get("activeStates").get("toggleAIInline"))return r.zF.empty;const{from:a,to:n}=e.selection;if(a===n)return r.zF.empty;const s=r.NZ.inline(a,n,{class:"rte2-style-ai-inline-highlight"});return r.zF.create(e.doc,[s])}}}),u=()=>function(e,t,a){return t(e.tr.setMeta(c,{toggleAIInline:!0})),a?.dom.classList.toggle("ProseMirror-aiInlinePreviewMode"),!0};n()}catch(e){n(e)}})},96410(e,t,a){"use strict";a.a(e,async(e,n)=>{try{a.d(t,{F:()=>T}),a(44764),a(84978),a(25809),a(91672),a(92280);var s=a(26173),i=a(99666);if(7717==a.j)var r=a(13333);var o=a(46929),l=a(38745),c=a(63110),d=a.n(c),u=a(88903),p=a(22628),h=e([s]),m=h.then?(await h)():h;s=m[0],window.BRIGHTSPOT?.ui.cms.enableV5UI||await a.e(2456).then(a.bind(a,42456));const f="ProseMirrorAIInline-container",g=window.RTE_PROMPT_PLACEHOLDER,v=window.RTE_PROMPT_PREFIX,b=window.RTE_PROMPT_RETRY,C=window.RTE_WORKING_ON_IT,w=window.RTE_ACCEPT,y=window.RTE_DISCARD,A=window.RTE_TRY_AGAIN,E="collapsed",S=window.BRIGHTSPOT?.web?.pagePaths?.["com.psddev.ai.chat.ChatPageResponses"],I=window.BRIGHTSPOT?.web?.pagePaths?.["com.psddev.ai.chat.PromptPage"];class T{constructor(e,t,a,n,s){this.focused=!1,this.isLoading=!1,this.retry=!1,this.suggestionsFetched=!1,this.editorView=void 0,this.myKey=void 0,this.userLabel=void 0,this.userId=void 0,this.compliantTagNameMap=void 0,this.dom=void 0,this.field=void 0,this.textArea=void 0,this.loadingOverlay=void 0,this.loadingPromptEle=void 0,this.objectId=void 0,this.typeId=void 0,this.contentState=void 0,this.inputEle=void 0,this.submitButtonEle=void 0,this.acceptRejectContainerEle=void 0,this.suggestionsContainer=null,this.sendTrackingEvent=void 0,this.chatId=void 0,this.responseId=void 0,this.lastPrompt=void 0,this.lastSelectedContent=void 0,this.lastSelectionFrom=void 0,this.lastSelectionTo=void 0,this.template=()=>i.qy`
33
33
  <div class="${f}-inputContainer">
34
34
  <input
35
35
  class="${f}-inputContainer-input"