@dialpad/dialtone-vue 3.91.0 → 3.92.0

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 (26) hide show
  1. package/CHANGELOG.json +1 -1
  2. package/CHANGELOG.md +14 -0
  3. package/dist/component-documentation.json +1 -1
  4. package/dist/dialtone-vue.cjs +4 -4
  5. package/dist/dialtone-vue.js +12 -11
  6. package/dist/{emoji-131e3eda.js → emoji-83163b7b.js} +6259 -6176
  7. package/dist/emoji-f3e4b2ca.cjs +25 -0
  8. package/dist/emoji.cjs +1 -1
  9. package/dist/emoji.js +2 -2
  10. package/dist/{message_input-4bede2c7.js → message_input-46ebe433.js} +29 -16
  11. package/dist/{message_input-0c6b468f.cjs → message_input-4b60e253.cjs} +2 -2
  12. package/dist/message_input.cjs +1 -1
  13. package/dist/message_input.js +2 -2
  14. package/dist/style.css +1 -1
  15. package/dist/types/components/rich_text_editor/extensions/emoji/EmojiSuggestion.vue.d.ts +2 -2
  16. package/dist/types/components/rich_text_editor/extensions/emoji/emoji.d.ts.map +1 -1
  17. package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts +4 -1
  18. package/dist/types/components/rich_text_editor/extensions/emoji/suggestion.d.ts.map +1 -1
  19. package/dist/types/components/rich_text_editor/extensions/suggestion/SuggestionList.vue.d.ts +1 -0
  20. package/dist/types/components/rich_text_editor/mention_suggestion.d.ts +1 -1
  21. package/dist/types/components/rich_text_editor/rich_text_editor.vue.d.ts +6 -6
  22. package/dist/types/components/tooltip/tooltip.vue.d.ts +20 -4
  23. package/dist/types/components/tooltip/tooltip.vue.d.ts.map +1 -1
  24. package/dist/types/components/tooltip/tooltip_variants.vue.d.ts +1 -0
  25. package/package.json +17 -5
  26. package/dist/emoji-b45991f0.cjs +0 -25
package/dist/emoji.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji-b45991f0.cjs"),n=require("vue"),a={name:"DtEmojiTextWrapper",components:{DtEmoji:e.DtEmoji},inheritAttrs:!1,props:{elementType:{type:String,default:"div"},size:{type:String,default:"500",validator:t=>Object.keys(e.ICON_SIZE_MODIFIERS).includes(t)}},data(){return{loadingEmojiJson:!0}},async created(){this.loadingEmojiJson=!1},methods:{replaceDtEmojis(t,o){const i=new RegExp(`(${t.join("|")})`,"g");return o.split(i).map(r=>t.includes(r)?n.h(e.DtEmoji,{...this.$attrs,class:"d-mx4 d-d-inline-block",size:this.size,code:r}):r)},searchVNodes(t){var i;if(typeof t=="string")return this.searchCodes(t);if(typeof t.type=="symbol")return this.searchCodes(t.children);if((i=t.props)!=null&&i.innerHTML)return this.searchVNodes(t.props.innerHTML);const o=Array.isArray(t.children)?t.children:[t.children];return n.h(t.type,t.props,o.map(s=>this.searchVNodes(s)))},replaceVueComponentVNodeContent(t){},searchCodes(t){const o=e.findShortCodes(t),i=e.findEmojis(t),s=[...o,...i];return s.length===0?t:this.replaceDtEmojis(s,t)}},render(){const t=this.$slots.default?this.$slots.default():[];return n.h(this.elementType,{"data-qa":"emoji-text-wrapper",class:this.$attrs.class},this.loadingEmojiJson?t:t.map(o=>this.searchVNodes(o)))}};exports.CDN_URL=e.CDN_URL;exports.DtEmoji=e.DtEmoji;exports.DtEmojiPicker=e._sfc_main;exports.EMOJIS_PER_ROW=e.EMOJIS_PER_ROW;exports.EMOJI_CATEGORIES=e.EMOJI_CATEGORIES;exports.EMOJI_SKIN_TONE_MODIFIERS=e.EMOJI_SKIN_TONE_MODIFIERS;exports.codeToEmojiData=e.codeToEmojiData;Object.defineProperty(exports,"customEmojiAssetUrl",{enumerable:!0,get:()=>e.customEmojiAssetUrl});exports.defaultEmojiAssetUrl=e.defaultEmojiAssetUrl;Object.defineProperty(exports,"emojiFileExtensionLarge",{enumerable:!0,get:()=>e.emojiFileExtensionLarge});Object.defineProperty(exports,"emojiFileExtensionSmall",{enumerable:!0,get:()=>e.emojiFileExtensionSmall});Object.defineProperty(exports,"emojiImageUrlLarge",{enumerable:!0,get:()=>e.emojiImageUrlLarge});Object.defineProperty(exports,"emojiImageUrlSmall",{enumerable:!0,get:()=>e.emojiImageUrlSmall});exports.emojiJson=e.emojiJson;exports.emojiVersion=e.emojiVersion;exports.filterValidShortCodes=e.filterValidShortCodes;exports.findEmojis=e.findEmojis;exports.findShortCodes=e.findShortCodes;exports.getEmojiData=e.getEmojiData;exports.setCustomEmojiJson=e.setCustomEmojiJson;exports.setCustomEmojiUrl=e.setCustomEmojiUrl;exports.setEmojiAssetUrlLarge=e.setEmojiAssetUrlLarge;exports.setEmojiAssetUrlSmall=e.setEmojiAssetUrlSmall;exports.shortcodeToEmojiData=e.shortcodeToEmojiData;exports.stringToUnicode=e.stringToUnicode;exports.unicodeToString=e.unicodeToString;exports.validateCustomEmojiJson=e.validateCustomEmojiJson;exports.DtEmojiTextWrapper=a;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./emoji-f3e4b2ca.cjs"),n=require("vue"),a={name:"DtEmojiTextWrapper",components:{DtEmoji:e.DtEmoji},inheritAttrs:!1,props:{elementType:{type:String,default:"div"},size:{type:String,default:"500",validator:t=>Object.keys(e.ICON_SIZE_MODIFIERS).includes(t)}},data(){return{loadingEmojiJson:!0}},async created(){this.loadingEmojiJson=!1},methods:{replaceDtEmojis(t,o){const i=new RegExp(`(${t.join("|")})`,"g");return o.split(i).map(r=>t.includes(r)?n.h(e.DtEmoji,{...this.$attrs,class:"d-mx4 d-d-inline-block",size:this.size,code:r}):r)},searchVNodes(t){var i;if(typeof t=="string")return this.searchCodes(t);if(typeof t.type=="symbol")return this.searchCodes(t.children);if((i=t.props)!=null&&i.innerHTML)return this.searchVNodes(t.props.innerHTML);const o=Array.isArray(t.children)?t.children:[t.children];return n.h(t.type,t.props,o.map(s=>this.searchVNodes(s)))},replaceVueComponentVNodeContent(t){},searchCodes(t){const o=e.findShortCodes(t),i=e.findEmojis(t),s=[...o,...i];return s.length===0?t:this.replaceDtEmojis(s,t)}},render(){const t=this.$slots.default?this.$slots.default():[];return n.h(this.elementType,{"data-qa":"emoji-text-wrapper",class:this.$attrs.class},this.loadingEmojiJson?t:t.map(o=>this.searchVNodes(o)))}};exports.CDN_URL=e.CDN_URL;exports.DtEmoji=e.DtEmoji;exports.DtEmojiPicker=e._sfc_main;exports.EMOJIS_PER_ROW=e.EMOJIS_PER_ROW;exports.EMOJI_CATEGORIES=e.EMOJI_CATEGORIES;exports.EMOJI_SKIN_TONE_MODIFIERS=e.EMOJI_SKIN_TONE_MODIFIERS;exports.codeToEmojiData=e.codeToEmojiData;Object.defineProperty(exports,"customEmojiAssetUrl",{enumerable:!0,get:()=>e.customEmojiAssetUrl});exports.defaultEmojiAssetUrl=e.defaultEmojiAssetUrl;Object.defineProperty(exports,"emojiFileExtensionLarge",{enumerable:!0,get:()=>e.emojiFileExtensionLarge});Object.defineProperty(exports,"emojiFileExtensionSmall",{enumerable:!0,get:()=>e.emojiFileExtensionSmall});Object.defineProperty(exports,"emojiImageUrlLarge",{enumerable:!0,get:()=>e.emojiImageUrlLarge});Object.defineProperty(exports,"emojiImageUrlSmall",{enumerable:!0,get:()=>e.emojiImageUrlSmall});exports.emojiJson=e.emojiJson;exports.emojiVersion=e.emojiVersion;exports.filterValidShortCodes=e.filterValidShortCodes;exports.findEmojis=e.findEmojis;exports.findShortCodes=e.findShortCodes;exports.getEmojiData=e.getEmojiData;exports.setCustomEmojiJson=e.setCustomEmojiJson;exports.setCustomEmojiUrl=e.setCustomEmojiUrl;exports.setEmojiAssetUrlLarge=e.setEmojiAssetUrlLarge;exports.setEmojiAssetUrlSmall=e.setEmojiAssetUrlSmall;exports.shortcodeToEmojiData=e.shortcodeToEmojiData;exports.stringToUnicode=e.stringToUnicode;exports.unicodeToString=e.unicodeToString;exports.validateCustomEmojiJson=e.validateCustomEmojiJson;exports.DtEmojiTextWrapper=a;
package/dist/emoji.js CHANGED
@@ -1,5 +1,5 @@
1
- import { o as r, a0 as n, a6 as l, a7 as m } from "./emoji-131e3eda.js";
2
- import { a2 as j, a1 as u, a3 as f, a5 as g, a4 as S, ap as y, aa as I, a9 as D, ae as T, ac as C, ad as _, ab as O, af as J, a8 as U, aq as A, ag as x, ak as M, aj as R, ai as L, ah as $, am as b, ao as k, an as F, al as v } from "./emoji-131e3eda.js";
1
+ import { o as r, a0 as n, a6 as l, a7 as m } from "./emoji-83163b7b.js";
2
+ import { a2 as j, a1 as u, a3 as f, a5 as g, a4 as S, ap as y, aa as I, a9 as D, ae as T, ac as C, ad as _, ab as O, af as J, a8 as U, aq as A, ag as x, ak as M, aj as R, ai as L, ah as $, am as b, ao as k, an as F, al as v } from "./emoji-83163b7b.js";
3
3
  import { h as o } from "vue";
4
4
  const d = {
5
5
  name: "DtEmojiTextWrapper",
@@ -1,4 +1,4 @@
1
- import { _ as q, ar as nl, as as rl, D as nt, g as tr, a0 as il, at as sl, h as hn, b as pn, x as ol, y as ll, u as al, au as cl, c as dl, av as ul, aw as fl, ax as hl, ay as mn, o as as, az as pl, am as ml, ap as cs, aA as gl, aB as yl, a1 as bl, m as kl, n as Sl } from "./emoji-131e3eda.js";
1
+ import { _ as q, ar as nl, as as rl, D as nt, g as tr, a0 as il, at as sl, h as hn, b as pn, x as ol, y as ll, u as al, au as cl, c as dl, av as ul, aw as fl, ax as hl, ay as mn, o as as, az as pl, am as ml, ap as cs, aA as gl, aB as yl, a1 as bl, m as kl, n as Sl } from "./emoji-83163b7b.js";
2
2
  import { openBlock as w, createElementBlock as B, toDisplayString as Se, createCommentVNode as V, createElementVNode as G, normalizeClass as H, resolveComponent as N, createBlock as F, resolveDynamicComponent as Xe, withCtx as D, mergeProps as St, renderSlot as L, createVNode as _, createTextVNode as Ht, withKeys as Ve, withModifiers as dt, toHandlers as ds, createSlots as xl, renderList as us, Teleport as fs, defineComponent as xt, ref as gn, onMounted as hs, onBeforeUnmount as xr, h as Ke, getCurrentInstance as Cl, watchEffect as wl, nextTick as vl, unref as El, markRaw as yn, reactive as ps, provide as qr, customRef as Ml, withDirectives as Ol, Fragment as ms, vShow as Tl } from "vue";
3
3
  const Ot = {
4
4
  BUSY: "busy",
@@ -14385,10 +14385,17 @@ const pp = {
14385
14385
  return n.key === "ArrowUp" ? (this.upHandler(), !0) : n.key === "ArrowDown" ? (this.downHandler(), !0) : n.key === "Enter" ? (this.enterHandler(), !0) : !1;
14386
14386
  },
14387
14387
  upHandler() {
14388
- this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length;
14388
+ this.selectedIndex = (this.selectedIndex + this.items.length - 1) % this.items.length, this.scrollActiveElementIntoView();
14389
14389
  },
14390
14390
  downHandler() {
14391
- this.selectedIndex = (this.selectedIndex + 1) % this.items.length;
14391
+ this.selectedIndex = (this.selectedIndex + 1) % this.items.length, this.scrollActiveElementIntoView();
14392
+ },
14393
+ scrollActiveElementIntoView() {
14394
+ const n = this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");
14395
+ n && n.scrollIntoView({
14396
+ behaviour: "smooth",
14397
+ block: "center"
14398
+ });
14392
14399
  },
14393
14400
  enterHandler() {
14394
14401
  this.selectItem(this.selectedIndex);
@@ -14397,24 +14404,27 @@ const pp = {
14397
14404
  const e = this.items[n];
14398
14405
  switch (this.itemType) {
14399
14406
  case "emoji":
14400
- this.command({ code: e });
14407
+ this.command(e);
14401
14408
  return;
14402
14409
  case "mention":
14403
- this.command({ name: e.name, contactId: e.contactId, avatarSrc: e.avatarSrc });
14410
+ this.command({ name: e.name, id: e.contactId, avatarSrc: e.avatarSrc });
14404
14411
  break;
14405
14412
  }
14406
14413
  }
14407
14414
  }
14408
- }, mp = { class: "d-popover__dialog" }, gp = { class: "dt-suggestion-list" };
14415
+ }, mp = { class: "d-popover__dialog" }, gp = {
14416
+ ref: "suggestionList",
14417
+ class: "dt-suggestion-list"
14418
+ };
14409
14419
  function yp(n, e, t, r, i, s) {
14410
14420
  const o = N("dt-list-item");
14411
14421
  return w(), B("div", mp, [
14412
14422
  Ol(G("ul", gp, [
14413
14423
  (w(!0), B(ms, null, us(t.items, (l, a) => (w(), F(o, {
14414
- key: a,
14424
+ key: l.id,
14415
14425
  class: H([
14416
14426
  "dt-suggestion-list--item",
14417
- { "is-selected dt-list-item--highlighted": a === i.selectedIndex }
14427
+ { "dt-list-item--highlighted": a === i.selectedIndex }
14418
14428
  ]),
14419
14429
  "navigation-type": "arrow-keys",
14420
14430
  onClick: (c) => s.selectItem(a),
@@ -14438,7 +14448,7 @@ const Xo = /* @__PURE__ */ q(pp, [["render", yp]]), bp = {
14438
14448
  },
14439
14449
  props: {
14440
14450
  item: {
14441
- type: String,
14451
+ type: Object,
14442
14452
  required: !0
14443
14453
  }
14444
14454
  }
@@ -14452,9 +14462,9 @@ function kp(n, e, t, r, i, s) {
14452
14462
  default: D(() => [
14453
14463
  _(o, {
14454
14464
  size: "200",
14455
- code: t.item
14465
+ code: t.item.code
14456
14466
  }, null, 8, ["code"]),
14457
- Ht(" " + Se(t.item), 1)
14467
+ Ht(" " + Se(t.item.code), 1)
14458
14468
  ]),
14459
14469
  _: 1
14460
14470
  });
@@ -14462,7 +14472,7 @@ function kp(n, e, t, r, i, s) {
14462
14472
  const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
14463
14473
  items: ({ query: n }) => n.length < 2 ? [] : Object.values(pl).filter(function(r) {
14464
14474
  return !!r.shortname.substring(1, r.shortname.length - 1).startsWith(n.toLowerCase());
14465
- }).map((r) => r.shortname),
14475
+ }).map((r) => ({ id: r.unicode_character, code: r.shortname })),
14466
14476
  command: ({ editor: n, range: e, props: t }) => {
14467
14477
  var s, o;
14468
14478
  const r = n.view.state.selection.$to.nodeAfter;
@@ -14546,6 +14556,9 @@ const Sp = /* @__PURE__ */ q(bp, [["render", kp]]), xp = {
14546
14556
  return {
14547
14557
  code: {
14548
14558
  default: null
14559
+ },
14560
+ id: {
14561
+ default: null
14549
14562
  }
14550
14563
  };
14551
14564
  },
@@ -14902,7 +14915,7 @@ const jp = /* @__PURE__ */ q(zp, [["render", Vp]]), $p = Fp.extend({
14902
14915
  avatarSrc: {
14903
14916
  default: ""
14904
14917
  },
14905
- contactId: {
14918
+ id: {
14906
14919
  default: ""
14907
14920
  }
14908
14921
  };
@@ -15090,9 +15103,9 @@ const Jp = {
15090
15103
  * The valid keys passed into this object can be found here: https://tiptap.dev/api/utilities/suggestion
15091
15104
  *
15092
15105
  * The only required key is the items function which is used to query the contacts for suggestion.
15093
- * items({ query }) => { return [<ContactObj>]; }
15094
- * ContactObj format:
15095
- * { name: string, avatarSrc: string, contactId: string }
15106
+ * items({ query }) => { return [ContactObject]; }
15107
+ * ContactObject format:
15108
+ * { name: string, avatarSrc: string, id: string }
15096
15109
  *
15097
15110
  * When null, it does not add the plugin.
15098
15111
  */
@@ -1,4 +1,4 @@
1
- "use strict";const C=require("./emoji-b45991f0.cjs"),f=require("vue"),Ue={BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},Li=[Ue.BUSY,Ue.AWAY,Ue.OFFLINE,Ue.ACTIVE],Ho={name:"DtPresence",props:{presence:{type:String,default:Ue.ACTIVE,validator:n=>Li.includes(n)},srText:{type:String,default:null}}},$o=["aria-live"],qo={key:0,"data-qa":"dt-presence-sr-text",class:"sr-only"};function Ko(n,e,t,r,i,s){return f.openBlock(),f.createElementBlock("div",{class:"d-presence","data-qa":"dt-presence",role:"status","aria-live":n.$attrs.ariaLive||"off"},[t.srText?(f.openBlock(),f.createElementBlock("span",qo,f.toDisplayString(t.srText),1)):f.createCommentVNode("",!0),f.createElementVNode("div",{class:f.normalizeClass(["d-presence__inner",{"d-presence__inner--active":t.presence==="active","d-presence__inner--away":t.presence==="away","d-presence__inner--busy":t.presence==="busy","d-presence__inner--offline":t.presence==="offline"}])},null,2)],8,$o)}const Fi=C._export_sfc(Ho,[["render",Ko]]),Pt={xs:"d-avatar--xs",sm:"d-avatar--sm",md:"d-avatar--md",lg:"d-avatar--lg",xl:"d-avatar--xl"},Vi={default:"",icon:"d-avatar__icon",initials:"d-avatar__initials"},zi={md:"d-avatar__presence--md",lg:"d-avatar__presence--lg"},_n={NONE:"",BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},ji={xs:"100",sm:"200",md:"300",lg:"500",xl:"600"},Hi=["100","200","300","400","500","600","700","800","900","1000","1100","1200","1300","1400","1500","1600","1700","1800"],Rn=n=>n>1;function Wo(){return[void 0,...Object.keys(C.dialtoneIcons).map(n=>C.pascalCaseToKebabCase(n))]}const Jo=n=>{if(typeof n!="string"||!n.trim())return"";const e=n.trim().split(/\s+/g);return e.length===1?e.join("").substring(0,2):e.filter((t,r)=>r===0||r===e.length-1).map(t=>t.slice(0,1).toUpperCase()).join("")};const Uo=Wo(),Go={name:"DtAvatar",components:{DtPresence:Fi,DtIcon:C.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return C.getUniqueString()}},seed:{type:String,default:void 0},color:{type:String,default:void 0},size:{type:String,default:"md",validator:n=>Object.keys(Pt).includes(n)},avatarClass:{type:[String,Array,Object],default:""},canvasClass:{type:[String,Array,Object],default:""},iconClass:{type:[String,Array,Object],default:""},presence:{type:String,default:_n.NONE,validator:n=>Object.values(_n).includes(n)},presenceProps:{type:Object,default:()=>({})},group:{type:Number,default:void 0,validator:n=>Rn(n)},overlayIcon:{type:String,default:""},overlayText:{type:String,default:""},overlayClass:{type:[String,Array,Object],default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:""},iconName:{type:String,default:void 0,validator:n=>Uo.includes(n)},iconSize:{type:String,default:"",validator:n=>!n||Object.keys(C.ICON_SIZE_MODIFIERS).includes(n)},fullName:{type:String,default:""},clickable:{type:Boolean,default:!1}},emits:["click"],data(){return{AVATAR_SIZE_MODIFIERS:Pt,AVATAR_KIND_MODIFIERS:Vi,AVATAR_PRESENCE_SIZE_MODIFIERS:zi,AVATAR_ICON_SIZES:ji,imageLoadedSuccessfully:null,formattedInitials:"",initializing:!1}},computed:{isNotIconType(){return!this.iconName},avatarClasses(){return["d-avatar",Pt[this.validatedSize],this.avatarClass,{"d-avatar--group":this.showGroup,[`d-avatar--color-${this.getColor()}`]:this.isNotIconType,"d-avatar--clickable":this.clickable}]},overlayClasses(){return["d-avatar__overlay",this.overlayClass]},showGroup(){return Rn(this.group)},formattedGroup(){return this.group>99?"99+":this.group},validatedSize(){return this.group?"xs":this.size},showImage(){return this.imageLoadedSuccessfully!==!1&&this.imageSrc},buttonAriaLabel(){if(this.clickable)return this.fullName||this.imageAlt||this.$attrs["aria-label"]}},watch:{fullName:{immediate:!0,handler(n){this.formatInitials(n)}},imageSrc(n){this.imageLoadedSuccessfully=null,n&&(this.validateProps(),this.setImageListeners())}},mounted(){this.validateProps(),this.setImageListeners()},methods:{async setImageListeners(){await this.$nextTick();const n=this.$refs.avatarImage;n&&(n.addEventListener("load",()=>this._loadedImageEventHandler(n),{once:!0}),n.addEventListener("error",()=>this._erroredImageEventHandler(n),{once:!0}))},formatInitials(n){const e=Jo(n);this.validatedSize==="xs"?this.formattedInitials="":this.validatedSize==="sm"?this.formattedInitials=e[0]:this.formattedInitials=e},getColor(){return this.color??C.getRandomElement(Hi,this.seed)},_loadedImageEventHandler(n){this.imageLoadedSuccessfully=!0,n.classList.remove("d-d-none")},_erroredImageEventHandler(n){this.imageLoadedSuccessfully=!1,n.classList.add("d-d-none")},validateProps(){if(this.imageSrc&&!(this.fullName||this.imageAlt))throw new Error("full-name or image-alt must be set if image-src is provided")},handleClick(n){this.clickable&&this.$emit("click",n)}}},Yo=["src","alt"],Xo={key:1,class:"d-avatar__overlay-text"},Zo={key:1,class:"d-avatar__count","data-qa":"dt-avatar-count"};function Qo(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-presence");return f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.clickable?"button":"div"),{id:t.id,class:f.normalizeClass(s.avatarClasses),"data-qa":"dt-avatar","aria-label":s.buttonAriaLabel,onClick:s.handleClick},{default:f.withCtx(()=>[f.createElementVNode("div",{ref:"canvas",class:f.normalizeClass([t.canvasClass,"d-avatar__canvas",{"d-avatar--image-loaded":i.imageLoadedSuccessfully}])},[s.showImage?(f.openBlock(),f.createElementBlock("img",{key:0,ref:"avatarImage",class:"d-avatar__image","data-qa":"dt-avatar-image",src:t.imageSrc,alt:t.imageAlt||t.fullName},null,8,Yo)):t.iconName?(f.openBlock(),f.createBlock(o,{key:1,name:t.iconName,size:t.iconSize||i.AVATAR_ICON_SIZES[t.size],class:f.normalizeClass([t.iconClass,i.AVATAR_KIND_MODIFIERS.icon]),"data-qa":"dt-avatar-icon"},null,8,["name","size","class"])):(f.openBlock(),f.createElementBlock("span",{key:2,class:f.normalizeClass([i.AVATAR_KIND_MODIFIERS.initials,"d-ps-absolute d-zi-base d-us-none"])},f.toDisplayString(i.formattedInitials),3))],2),t.overlayIcon||t.overlayText?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(s.overlayClasses)},[t.overlayIcon?(f.openBlock(),f.createBlock(o,{key:0,class:"d-avatar__overlay-icon",name:t.overlayIcon},null,8,["name"])):t.overlayText?(f.openBlock(),f.createElementBlock("p",Xo,f.toDisplayString(t.overlayText),1)):f.createCommentVNode("",!0)],2)):f.createCommentVNode("",!0),s.showGroup?(f.openBlock(),f.createElementBlock("span",Zo,f.toDisplayString(s.formattedGroup),1)):f.createCommentVNode("",!0),t.presence&&!s.showGroup?(f.openBlock(),f.createBlock(l,f.mergeProps({key:2,presence:t.presence,class:["d-avatar__presence",i.AVATAR_PRESENCE_SIZE_MODIFIERS[t.size]]},t.presenceProps,{"data-qa":"dt-presence"}),null,16,["presence","class"])):f.createCommentVNode("",!0)]),_:1},8,["id","class","aria-label","onClick"])}const $i=C._export_sfc(Go,[["render",Qo]]),Gt=["base","error","info","success","warning"],el=["alert","alertdialog","status"],tl=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["error","alert-circle"],["base","bell"]]),nl={name:"DtNoticeIcon",components:{DtIcon:C.DtIcon},props:{kind:{type:String,default:"base",validate(n){return Gt.includes(n)}}},data(){return{hasSlotContent:C.hasSlotContent}},computed:{defaultIcon(){return tl.get(this.kind)}}},rl={key:0,"aria-hidden":"true",class:"d-notice__icon"};function il(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon");return s.defaultIcon||i.hasSlotContent(n.$slots.default)?(f.openBlock(),f.createElementBlock("div",rl,[f.renderSlot(n.$slots,"default",{},()=>[f.createVNode(o,{name:s.defaultIcon,size:"400"},null,8,["name"])])])):f.createCommentVNode("",!0)}const qi=C._export_sfc(nl,[["render",il]]),sl={name:"DtNoticeContent",props:{title:{type:String,default:""},titleId:{type:String,default:void 0},contentId:{type:String,default:void 0}},data(){return{hasSlotContent:C.hasSlotContent}}},ol={class:"d-notice__content","data-qa":"notice-content"},ll=["id"],al=["id"];function cl(n,e,t,r,i,s){return f.openBlock(),f.createElementBlock("div",ol,[t.title||i.hasSlotContent(n.$slots.titleOverride)?(f.openBlock(),f.createElementBlock("p",{key:0,id:t.titleId,class:"d-notice__title","data-qa":"notice-content-title"},[f.renderSlot(n.$slots,"titleOverride",{},()=>[f.createTextVNode(f.toDisplayString(t.title),1)])],8,ll)):f.createCommentVNode("",!0),f.createElementVNode("p",{id:t.contentId,class:"d-notice__message","data-qa":"notice-content-message"},[f.renderSlot(n.$slots,"default")],8,al)])}const Ki=C._export_sfc(sl,[["render",cl]]),Yt={props:{visuallyHiddenClose:{type:Boolean,default:!1},visuallyHiddenCloseLabel:{type:String,default:null}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateVisuallyHiddenCloseProps()}}},computed:{showVisuallyHiddenClose(){return this.visuallyHiddenClose&&this.visuallyHiddenCloseLabel!=null}},methods:{validateVisuallyHiddenCloseProps(){this.visuallyHiddenClose&&!this.visuallyHiddenCloseLabel&&console.error(`If visuallyHiddenClose prop is true, the component includes
1
+ "use strict";const C=require("./emoji-f3e4b2ca.cjs"),f=require("vue"),Ue={BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},Li=[Ue.BUSY,Ue.AWAY,Ue.OFFLINE,Ue.ACTIVE],Ho={name:"DtPresence",props:{presence:{type:String,default:Ue.ACTIVE,validator:n=>Li.includes(n)},srText:{type:String,default:null}}},$o=["aria-live"],qo={key:0,"data-qa":"dt-presence-sr-text",class:"sr-only"};function Ko(n,e,t,r,i,s){return f.openBlock(),f.createElementBlock("div",{class:"d-presence","data-qa":"dt-presence",role:"status","aria-live":n.$attrs.ariaLive||"off"},[t.srText?(f.openBlock(),f.createElementBlock("span",qo,f.toDisplayString(t.srText),1)):f.createCommentVNode("",!0),f.createElementVNode("div",{class:f.normalizeClass(["d-presence__inner",{"d-presence__inner--active":t.presence==="active","d-presence__inner--away":t.presence==="away","d-presence__inner--busy":t.presence==="busy","d-presence__inner--offline":t.presence==="offline"}])},null,2)],8,$o)}const Fi=C._export_sfc(Ho,[["render",Ko]]),Pt={xs:"d-avatar--xs",sm:"d-avatar--sm",md:"d-avatar--md",lg:"d-avatar--lg",xl:"d-avatar--xl"},Vi={default:"",icon:"d-avatar__icon",initials:"d-avatar__initials"},zi={md:"d-avatar__presence--md",lg:"d-avatar__presence--lg"},_n={NONE:"",BUSY:"busy",AWAY:"away",OFFLINE:"offline",ACTIVE:"active"},ji={xs:"100",sm:"200",md:"300",lg:"500",xl:"600"},Hi=["100","200","300","400","500","600","700","800","900","1000","1100","1200","1300","1400","1500","1600","1700","1800"],Rn=n=>n>1;function Wo(){return[void 0,...Object.keys(C.dialtoneIcons).map(n=>C.pascalCaseToKebabCase(n))]}const Jo=n=>{if(typeof n!="string"||!n.trim())return"";const e=n.trim().split(/\s+/g);return e.length===1?e.join("").substring(0,2):e.filter((t,r)=>r===0||r===e.length-1).map(t=>t.slice(0,1).toUpperCase()).join("")};const Uo=Wo(),Go={name:"DtAvatar",components:{DtPresence:Fi,DtIcon:C.DtIcon},inheritAttrs:!1,props:{id:{type:String,default(){return C.getUniqueString()}},seed:{type:String,default:void 0},color:{type:String,default:void 0},size:{type:String,default:"md",validator:n=>Object.keys(Pt).includes(n)},avatarClass:{type:[String,Array,Object],default:""},canvasClass:{type:[String,Array,Object],default:""},iconClass:{type:[String,Array,Object],default:""},presence:{type:String,default:_n.NONE,validator:n=>Object.values(_n).includes(n)},presenceProps:{type:Object,default:()=>({})},group:{type:Number,default:void 0,validator:n=>Rn(n)},overlayIcon:{type:String,default:""},overlayText:{type:String,default:""},overlayClass:{type:[String,Array,Object],default:""},imageSrc:{type:String,default:""},imageAlt:{type:String,default:""},iconName:{type:String,default:void 0,validator:n=>Uo.includes(n)},iconSize:{type:String,default:"",validator:n=>!n||Object.keys(C.ICON_SIZE_MODIFIERS).includes(n)},fullName:{type:String,default:""},clickable:{type:Boolean,default:!1}},emits:["click"],data(){return{AVATAR_SIZE_MODIFIERS:Pt,AVATAR_KIND_MODIFIERS:Vi,AVATAR_PRESENCE_SIZE_MODIFIERS:zi,AVATAR_ICON_SIZES:ji,imageLoadedSuccessfully:null,formattedInitials:"",initializing:!1}},computed:{isNotIconType(){return!this.iconName},avatarClasses(){return["d-avatar",Pt[this.validatedSize],this.avatarClass,{"d-avatar--group":this.showGroup,[`d-avatar--color-${this.getColor()}`]:this.isNotIconType,"d-avatar--clickable":this.clickable}]},overlayClasses(){return["d-avatar__overlay",this.overlayClass]},showGroup(){return Rn(this.group)},formattedGroup(){return this.group>99?"99+":this.group},validatedSize(){return this.group?"xs":this.size},showImage(){return this.imageLoadedSuccessfully!==!1&&this.imageSrc},buttonAriaLabel(){if(this.clickable)return this.fullName||this.imageAlt||this.$attrs["aria-label"]}},watch:{fullName:{immediate:!0,handler(n){this.formatInitials(n)}},imageSrc(n){this.imageLoadedSuccessfully=null,n&&(this.validateProps(),this.setImageListeners())}},mounted(){this.validateProps(),this.setImageListeners()},methods:{async setImageListeners(){await this.$nextTick();const n=this.$refs.avatarImage;n&&(n.addEventListener("load",()=>this._loadedImageEventHandler(n),{once:!0}),n.addEventListener("error",()=>this._erroredImageEventHandler(n),{once:!0}))},formatInitials(n){const e=Jo(n);this.validatedSize==="xs"?this.formattedInitials="":this.validatedSize==="sm"?this.formattedInitials=e[0]:this.formattedInitials=e},getColor(){return this.color??C.getRandomElement(Hi,this.seed)},_loadedImageEventHandler(n){this.imageLoadedSuccessfully=!0,n.classList.remove("d-d-none")},_erroredImageEventHandler(n){this.imageLoadedSuccessfully=!1,n.classList.add("d-d-none")},validateProps(){if(this.imageSrc&&!(this.fullName||this.imageAlt))throw new Error("full-name or image-alt must be set if image-src is provided")},handleClick(n){this.clickable&&this.$emit("click",n)}}},Yo=["src","alt"],Xo={key:1,class:"d-avatar__overlay-text"},Zo={key:1,class:"d-avatar__count","data-qa":"dt-avatar-count"};function Qo(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-presence");return f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.clickable?"button":"div"),{id:t.id,class:f.normalizeClass(s.avatarClasses),"data-qa":"dt-avatar","aria-label":s.buttonAriaLabel,onClick:s.handleClick},{default:f.withCtx(()=>[f.createElementVNode("div",{ref:"canvas",class:f.normalizeClass([t.canvasClass,"d-avatar__canvas",{"d-avatar--image-loaded":i.imageLoadedSuccessfully}])},[s.showImage?(f.openBlock(),f.createElementBlock("img",{key:0,ref:"avatarImage",class:"d-avatar__image","data-qa":"dt-avatar-image",src:t.imageSrc,alt:t.imageAlt||t.fullName},null,8,Yo)):t.iconName?(f.openBlock(),f.createBlock(o,{key:1,name:t.iconName,size:t.iconSize||i.AVATAR_ICON_SIZES[t.size],class:f.normalizeClass([t.iconClass,i.AVATAR_KIND_MODIFIERS.icon]),"data-qa":"dt-avatar-icon"},null,8,["name","size","class"])):(f.openBlock(),f.createElementBlock("span",{key:2,class:f.normalizeClass([i.AVATAR_KIND_MODIFIERS.initials,"d-ps-absolute d-zi-base d-us-none"])},f.toDisplayString(i.formattedInitials),3))],2),t.overlayIcon||t.overlayText?(f.openBlock(),f.createElementBlock("div",{key:0,class:f.normalizeClass(s.overlayClasses)},[t.overlayIcon?(f.openBlock(),f.createBlock(o,{key:0,class:"d-avatar__overlay-icon",name:t.overlayIcon},null,8,["name"])):t.overlayText?(f.openBlock(),f.createElementBlock("p",Xo,f.toDisplayString(t.overlayText),1)):f.createCommentVNode("",!0)],2)):f.createCommentVNode("",!0),s.showGroup?(f.openBlock(),f.createElementBlock("span",Zo,f.toDisplayString(s.formattedGroup),1)):f.createCommentVNode("",!0),t.presence&&!s.showGroup?(f.openBlock(),f.createBlock(l,f.mergeProps({key:2,presence:t.presence,class:["d-avatar__presence",i.AVATAR_PRESENCE_SIZE_MODIFIERS[t.size]]},t.presenceProps,{"data-qa":"dt-presence"}),null,16,["presence","class"])):f.createCommentVNode("",!0)]),_:1},8,["id","class","aria-label","onClick"])}const $i=C._export_sfc(Go,[["render",Qo]]),Gt=["base","error","info","success","warning"],el=["alert","alertdialog","status"],tl=new Map([["info","info"],["success","check-circle"],["warning","alert-triangle"],["error","alert-circle"],["base","bell"]]),nl={name:"DtNoticeIcon",components:{DtIcon:C.DtIcon},props:{kind:{type:String,default:"base",validate(n){return Gt.includes(n)}}},data(){return{hasSlotContent:C.hasSlotContent}},computed:{defaultIcon(){return tl.get(this.kind)}}},rl={key:0,"aria-hidden":"true",class:"d-notice__icon"};function il(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon");return s.defaultIcon||i.hasSlotContent(n.$slots.default)?(f.openBlock(),f.createElementBlock("div",rl,[f.renderSlot(n.$slots,"default",{},()=>[f.createVNode(o,{name:s.defaultIcon,size:"400"},null,8,["name"])])])):f.createCommentVNode("",!0)}const qi=C._export_sfc(nl,[["render",il]]),sl={name:"DtNoticeContent",props:{title:{type:String,default:""},titleId:{type:String,default:void 0},contentId:{type:String,default:void 0}},data(){return{hasSlotContent:C.hasSlotContent}}},ol={class:"d-notice__content","data-qa":"notice-content"},ll=["id"],al=["id"];function cl(n,e,t,r,i,s){return f.openBlock(),f.createElementBlock("div",ol,[t.title||i.hasSlotContent(n.$slots.titleOverride)?(f.openBlock(),f.createElementBlock("p",{key:0,id:t.titleId,class:"d-notice__title","data-qa":"notice-content-title"},[f.renderSlot(n.$slots,"titleOverride",{},()=>[f.createTextVNode(f.toDisplayString(t.title),1)])],8,ll)):f.createCommentVNode("",!0),f.createElementVNode("p",{id:t.contentId,class:"d-notice__message","data-qa":"notice-content-message"},[f.renderSlot(n.$slots,"default")],8,al)])}const Ki=C._export_sfc(sl,[["render",cl]]),Yt={props:{visuallyHiddenClose:{type:Boolean,default:!1},visuallyHiddenCloseLabel:{type:String,default:null}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateVisuallyHiddenCloseProps()}}},computed:{showVisuallyHiddenClose(){return this.visuallyHiddenClose&&this.visuallyHiddenCloseLabel!=null}},methods:{validateVisuallyHiddenCloseProps(){this.visuallyHiddenClose&&!this.visuallyHiddenCloseLabel&&console.error(`If visuallyHiddenClose prop is true, the component includes
2
2
  a visually hidden close button and you must set the visuallyHiddenCloseLabel prop.`)}}},dl={name:"SrOnlyCloseButton",components:{DtIcon:C.DtIcon,DtButton:C.DtButton},props:{visuallyHiddenCloseLabel:{type:String,default:null}},emits:["close"],methods:{close(){this.$emit("close")}}};function ul(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-button");return f.openBlock(),f.createBlock(l,{id:"sr-only-close-button","data-qa":"dt-sr-only-close-button",class:"d-vi-visible-sr","aria-label":t.visuallyHiddenCloseLabel,onClick:s.close,onKeydown:f.withKeys(f.withModifiers(s.close,["prevent","stop"]),["space"])},{default:f.withCtx(()=>[f.createVNode(o,{name:"close"})]),_:1},8,["aria-label","onClick","onKeydown"])}const rr=C._export_sfc(dl,[["render",ul]]),fl={name:"DtNoticeAction",components:{DtIcon:C.DtIcon,DtButton:C.DtButton,SrOnlyCloseButton:rr},mixins:[Yt],props:{closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1}},emits:["close"],created(){!this.hideClose&&!this.closeButtonProps.ariaLabel&&console.error("Invalid props: you must pass in closeButtonProps.ariaLabel if the close button is displayed.")},mounted(){this.hideClose||(this.lastFocusedElement=document.activeElement)},beforeUnmount(){var n;(n=this.lastFocusedElement)==null||n.focus()},methods:{close(){this.$emit("close")}}},hl={class:"d-notice__actions","data-qa":"notice-content-actions"};function pl(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-button"),a=f.resolveComponent("sr-only-close-button");return f.openBlock(),f.createElementBlock("div",hl,[f.renderSlot(n.$slots,"default"),t.hideClose?f.createCommentVNode("",!0):(f.openBlock(),f.createBlock(l,f.mergeProps({key:0,ref:"closeButton","data-qa":"dt-notice-action-close-button",size:"sm",importance:"clear",circle:"","aria-label":t.closeButtonProps.ariaLabel?t.closeButtonProps.ariaLabel:"Close"},t.closeButtonProps,{onClick:s.close}),{icon:f.withCtx(()=>[f.createVNode(o,{name:"close",size:"200"})]),_:1},16,["aria-label","onClick"])),n.showVisuallyHiddenClose?(f.openBlock(),f.createBlock(a,{key:1,"visually-hidden-close-label":n.visuallyHiddenCloseLabel,onClose:s.close},null,8,["visually-hidden-close-label","onClose"])):f.createCommentVNode("",!0)])}const Wi=C._export_sfc(fl,[["render",pl]]),Ji=':not(:disabled):not([aria-disabled="true"]):not([role="presentation"])',ml=`${Ji}:not([tabindex="-1"])`,gl="button,[href],input,select,textarea,details,[tabindex]",Ui={methods:{async getFirstFocusableElement(n){await this.$nextTick();const e=this._getFocusableElements(n,!0);return this._getFirstFocusElement(e)},async focusFirstElement(n){const e=await this.getFirstFocusableElement(n);e==null||e.focus({preventScroll:!0})},_getFirstFocusElement(n){if(!n.length)return;let e=n[0];return e.matches('[type="radio"]:not(:checked)')&&(e=n.find(t=>t.checked&&t.name===e.name)||e),e},_getFocusableElements(n=this.$el,e=!1){return n?[...n.querySelectorAll(gl)].filter(r=>{const i=window.getComputedStyle(r);return i.getPropertyValue("display")!=="none"&&i.getPropertyValue("visibility")!=="hidden"&&r.matches(e?Ji:ml)}):[]},focusTrappedTabPress(n,e){if(!(n.key==="Tab"))return;const r=this._getFocusableElements(e);if(!r.length){n.preventDefault();return}const i=this._getFirstFocusElement(r),s=r[r.length-1];n.shiftKey?document.activeElement===i&&(s.focus(),n.preventDefault()):document.activeElement===s&&(i.focus(),n.preventDefault())}}},yl={name:"DtLink",props:{kind:{type:String,default:"",validator(n){return C.LINK_VARIANTS.includes(n)}}},data(){return{LINK_KIND_MODIFIERS:C.LINK_KIND_MODIFIERS}}},bl=["href"];function kl(n,e,t,r,i,s){return f.openBlock(),f.createElementBlock("a",{class:f.normalizeClass(["d-link",i.LINK_KIND_MODIFIERS[t.kind]]),"data-qa":"dt-link",href:"href"in n.$attrs?n.$attrs.href:"javascript:void(0)"},[f.renderSlot(n.$slots,"default")],10,bl)}const Gi=C._export_sfc(yl,[["render",kl]]),fn={DEFAULT:"default",CUSTOM:"custom"},ut={ARROW_KEYS:"arrow-keys",TAB:"tab",NONE:"none"};const Sl={name:"DtItemLayout",props:{as:{type:String,default:"div"}}},Cl={key:0,"data-qa":"dt-item-layout-left-wrapper",class:"dt-item-layout--left"},xl={"data-qa":"dt-item-layout-content-wrapper",class:"dt-item-layout--content"},wl={key:0,"data-qa":"dt-item-layout-title-wrapper",class:"dt-item-layout--title"},El={key:2,"data-qa":"dt-item-layout-bottom-wrapper",class:"dt-item-layout--bottom"},vl={key:1,"data-qa":"dt-item-layout-right-wrapper",class:"dt-item-layout--right"},Ol={key:2,"data-qa":"dt-item-layout-selected-wrapper",class:"dt-item-layout--selected"};function Ml(n,e,t,r,i,s){return f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.as),{class:"dt-item-layout"},{default:f.withCtx(()=>[n.$slots.left?(f.openBlock(),f.createElementBlock("section",Cl,[f.renderSlot(n.$slots,"left",{},void 0,!0)])):f.createCommentVNode("",!0),f.createElementVNode("section",xl,[n.$slots.default?(f.openBlock(),f.createElementBlock("div",wl,[f.renderSlot(n.$slots,"default",{},void 0,!0)])):f.createCommentVNode("",!0),n.$slots.subtitle?(f.openBlock(),f.createElementBlock("div",{key:1,"data-qa":"dt-item-layout-subtitle-wrapper",class:f.normalizeClass(["dt-item-layout--subtitle",{"d-mtn2":n.$slots.default}])},[f.renderSlot(n.$slots,"subtitle",{},void 0,!0)],2)):f.createCommentVNode("",!0),n.$slots.bottom?(f.openBlock(),f.createElementBlock("div",El,[f.renderSlot(n.$slots,"bottom",{},void 0,!0)])):f.createCommentVNode("",!0)]),n.$slots.right?(f.openBlock(),f.createElementBlock("section",vl,[f.renderSlot(n.$slots,"right",{},void 0,!0)])):f.createCommentVNode("",!0),n.$slots.selected?(f.openBlock(),f.createElementBlock("section",Ol,[f.renderSlot(n.$slots,"selected",{},void 0,!0)])):f.createCommentVNode("",!0)]),_:3})}const Bn=C._export_sfc(Sl,[["render",Ml],["__scopeId","data-v-9afad3c4"]]);const Tl={name:"DtListItem",components:{DtItemLayout:Bn,DtIcon:C.DtIcon},inject:{highlightId:{default:null}},props:{id:{type:String,default(){return C.utils.getUniqueString()}},role:{type:String,default:"listitem"},elementType:{type:String,default:"li"},type:{type:String,default:fn.DEFAULT,validator:n=>Object.values(fn).includes(n)},navigationType:{type:String,default:ut.NONE,validator:n=>Object.values(ut).includes(n)},selected:{type:Boolean,default:!1}},emits:["keydown","mousemove","mouseleave","mousedown"],data(){return{injected:!1,mouseHighlighted:!1}},computed:{listItemType(){switch(this.type){case fn.DEFAULT:return Bn;default:return null}},listItemListeners(){return{keydown:n=>{["enter","space"].includes(n.code.toLowerCase())&&this.onClick(n),this.$emit("keydown",n)},mousemove:n=>{this.onMouseHover(n),this.$emit("mousemove",n)},mouseleave:n=>{this.onMouseLeave(n),this.$emit("mouseleave",n)}}},isHighlighted(){return this.isHoverable?this.highlightId&&this.highlightId()?this.id===this.highlightId():this.mouseHighlighted:!1},isFocusable(){return this.navigationType===ut.TAB},isHoverable(){return this.navigationType!==ut.NONE}},methods:{onClick(n){this.$emit("click",n)},onMouseHover(){this.mouseHighlighted=!0},onMouseLeave(){this.mouseHighlighted=!1}}};function Nl(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon");return f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.elementType),f.mergeProps({id:t.id,class:["dt-list-item",{"dt-list-item--focusable":s.isFocusable,"dt-list-item--highlighted":s.isHighlighted,"dt-list-item--static":!s.isHoverable}],tabindex:s.isFocusable?0:-1,role:t.role,"aria-selected":s.isHighlighted},f.toHandlers(s.listItemListeners)),{default:f.withCtx(()=>[s.listItemType?(f.openBlock(),f.createBlock(f.resolveDynamicComponent(s.listItemType),{key:0},f.createSlots({_:2},[f.renderList(n.$slots,(l,a)=>({name:a,fn:f.withCtx(()=>[f.renderSlot(n.$slots,a)])})),t.selected?{name:"selected",fn:f.withCtx(()=>[f.createVNode(o,{name:"check",size:"400",class:"dt-list-item--selected-icon"})]),key:"0"}:void 0]),1024)):f.renderSlot(n.$slots,"default",{key:1})]),_:3},16,["id","class","tabindex","role","aria-selected"])}const Yi=C._export_sfc(Tl,[["render",Nl]]),Ln={none:void 0,small:"d-p4",medium:"d-p8",large:"d-p16"},Xi={none:void 0,small:"d-pl4",medium:"d-pl8",large:"d-pl16"},Zi=["dialog","menu","listbox","tree","grid"],Qi=["","anchor"],es=["none","dialog","first"],ts=["parent","body"],Dl=[...C.TIPPY_STICKY_VALUES],Al={name:"PopoverHeaderFooter",components:{DtButton:C.DtButton,DtIcon:C.DtIcon},props:{type:{type:String,validator:function(n){return["header","footer"].includes(n)}},contentClass:{type:[String,Array,Object],default:""},showCloseButton:{type:Boolean,default:!1},closeButtonProps:{type:Object,default:()=>{}}},emits:["close"],data(){return{hasSlotContent:C.hasSlotContent}},methods:{focusCloseButton(){var e;const n=(e=this.$refs["popover__close-button"])==null?void 0:e.$el;n==null||n.focus()}}};function Il(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-button");return f.openBlock(),f.createElementBlock("div",{"data-qa":"dt-popover-header-footer",class:f.normalizeClass({"d-popover__header":t.type==="header","d-popover__footer":t.type==="footer"})},[i.hasSlotContent(n.$slots.content)?(f.openBlock(),f.createElementBlock("div",{key:0,"data-qa":"dt-popover-header-footer-content",class:f.normalizeClass(["d-to-ellipsis","d-w100p",t.contentClass])},[f.renderSlot(n.$slots,"content")],2)):f.createCommentVNode("",!0),t.showCloseButton?(f.openBlock(),f.createBlock(l,f.mergeProps({key:1,ref:"popover__close-button","data-qa":"dt-popover-close",class:"d-p6 d-mr6 d-bc-transparent",importance:"outlined",kind:"muted",circle:""},t.closeButtonProps,{onClick:e[0]||(e[0]=a=>n.$emit("close"))}),{icon:f.withCtx(()=>[f.createVNode(o,{name:"close",size:"300"})]),_:1},16)):f.createCommentVNode("",!0)],2)}const Pl=C._export_sfc(Al,[["render",Il]]);const _l={name:"DtPopover",components:{SrOnlyCloseButton:rr,DtLazyShow:C.DtLazyShow,PopoverHeaderFooter:Pl},mixins:[Ui,Yt],props:{open:{type:Boolean,default:null},openOnContext:{type:Boolean,default:!1},elementType:{type:String,default:"div"},transition:{type:String,default:"fade"},role:{type:String,default:"dialog",validator:n=>Zi.includes(n)},ariaLabelledby:{type:String,default:null},ariaLabel:{type:String,default:null},closeButtonProps:{type:Object,default:()=>({})},padding:{type:String,default:"large",validator:n=>Object.keys(Ln).some(e=>e===n)},contentClass:{type:[String,Array,Object],default:""},contentWidth:{type:String,default:"",validator:n=>Qi.includes(n)},contentAppear:{type:Boolean,default:null},contentTabindex:{type:Number||null,default:-1},externalAnchor:{type:String,default:""},id:{type:String,default(){return C.getUniqueString()}},offset:{type:Array,default:()=>[0,4]},hideOnClick:{type:Boolean,default:!0},modal:{type:Boolean,default:!0},fallbackPlacements:{type:Array,default:()=>["auto"]},placement:{type:String,default:"bottom-end"},tether:{type:Boolean,default:!0},sticky:{type:[Boolean,String],default:!1,validator:n=>Dl.includes(n)},maxHeight:{type:String,default:""},maxWidth:{type:String,default:""},showCloseButton:{type:Boolean,default:!1},headerClass:{type:[String,Array,Object],default:""},footerClass:{type:[String,Array,Object],default:""},dialogClass:{type:[String,Array,Object],default:""},initialFocusElement:{type:[String,HTMLElement],default:"first",validator:n=>es.includes(n)||n instanceof HTMLElement||n.startsWith("#")},openWithArrowKeys:{type:Boolean,default:!1},appendTo:{type:[HTMLElement,String],default:"body",validator:n=>ts.includes(n)||n instanceof HTMLElement}},emits:["keydown","update:open","opened"],data(){return{POPOVER_PADDING_CLASSES:Ln,POPOVER_HEADER_FOOTER_PADDING_CLASSES:Xi,intersectionObserver:null,isOutsideViewport:!1,isOpen:!1,toAppear:!1,anchorEl:null,popoverContentEl:null,hasSlotContent:C.hasSlotContent}},computed:{popoverListeners(){return{keydown:n=>{this.onKeydown(n)},"after-leave":n=>{this.onLeaveTransitionComplete()},"after-enter":n=>{this.onEnterTransitionComplete()}}},calculatedMaxHeight(){return this.isOutsideViewport&&this.modal?"calc(100vh - var(--dt-space-300))":this.maxHeight},labelledBy(){return this.ariaLabelledby||!this.ariaLabel&&C.getUniqueString("DtPopover__anchor")}},watch:{$props:{immediate:!0,deep:!0,handler(){this.validateProps()}},modal(n){var e;(e=this.tip)==null||e.setProps({zIndex:n?650:this.calculateAnchorZindex()})},offset(n){var e;(e=this.tip)==null||e.setProps({offset:n})},sticky(n){var e;(e=this.tip)==null||e.setProps({sticky:n})},fallbackPlacements(){var n;(n=this.tip)==null||n.setProps({popperOptions:this.popperOptions()})},tether(){var n;(n=this.tip)==null||n.setProps({popperOptions:this.popperOptions()})},placement(n){var e;(e=this.tip)==null||e.setProps({placement:n})},open:{handler:function(n){n!==null&&(this.isOpen=n),n===!0&&(this.toAppear=!0)},immediate:!0},contentAppear:{handler:function(n){n!==null&&(this.toAppear=n)}},isOpen(n,e){n?(this.initTippyInstance(),this.tip.show()):!n&&e!==n&&(this.removeEventListeners(),this.tip.hide())}},mounted(){const n=this.externalAnchor?this.$refs.anchor.getRootNode().querySelector(`#${this.externalAnchor}`):null;this.anchorEl=n??this.$refs.anchor.children[0],this.popoverContentEl=this.$refs.content.$el,this.isOpen&&(this.initTippyInstance(),this.tip.show()),this.intersectionObserver=new IntersectionObserver(this.hasIntersectedViewport),this.intersectionObserver.observe(this.popoverContentEl)},beforeUnmount(){var n;(n=this.tip)==null||n.destroy(),this.intersectionObserver.disconnect(),this.removeReferences(),this.removeEventListeners()},methods:{hasIntersectedViewport(n){var r;const e=(r=n==null?void 0:n[0])==null?void 0:r.target;if(!e)return;const t=C.isOutOfViewPort(e);this.isOutsideViewport=t.bottom||t.top},popperOptions(){return C.getPopperOptions({fallbackPlacements:this.fallbackPlacements,tether:this.tether,hasHideModifierEnabled:!0})},validateProps(){this.modal&&this.initialFocusElement==="none"&&console.error('If the popover is modal you must set the initialFocusElement prop. Possible values: "dialog", "first", HTMLElement')},calculateAnchorZindex(){var n;return this.$el.getRootNode().querySelector('.d-modal[aria-hidden="false"], .d-modal--transparent[aria-hidden="false"]')||(n=this.anchorEl)!=null&&n.closest(".d-zi-drawer")?650:300},defaultToggleOpen(n){var e,t,r;if(!this.openOnContext&&(this.open===null||this.open===void 0)){if(!((e=this.anchorEl)!=null&&e.contains(n.target))&&!((t=this.anchorEl)!=null&&t.isEqualNode(n.target))||(r=this.anchorEl)!=null&&r.disabled)return;this.toggleOpen()}},async onContext(n){this.openOnContext&&(n.preventDefault(),this.isOpen=!0,await this.$nextTick(),this.tip.setProps({placement:"right-start",getReferenceClientRect:()=>({width:0,height:0,top:n.clientY,bottom:n.clientY,left:n.clientX,right:n.clientX})}))},toggleOpen(){this.isOpen=!this.isOpen},onArrowKeyPress(n){var e;this.open===null&&(this.openWithArrowKeys&&((e=this.anchorEl)!=null&&e.contains(n.target))&&(this.isOpen||(this.isOpen=!0)),this.$emit("keydown",n))},addEventListeners(){window.addEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.addEventListener("resize",this.onResize)},removeEventListeners(){window.removeEventListener("dt-popover-close",this.closePopover),this.contentWidth==="anchor"&&window.removeEventListener("resize",this.onResize)},closePopover(){this.isOpen=!1},preventScrolling(){var n;if(this.modal){const e=(n=this.anchorEl)==null?void 0:n.closest("body, .tippy-box");e.tagName.toLowerCase()==="body"?(e.classList.add("d-of-hidden"),this.tip.setProps({offset:this.offset})):e.classList.add("d-zi-popover")}},enableScrolling(){var e,t;const n=(e=this.anchorEl)==null?void 0:e.closest("body, .tippy-box");n&&(((t=n.tagName)==null?void 0:t.toLowerCase())==="body"?(n.classList.remove("d-of-hidden"),this.tip.setProps({offset:this.offset})):n.classList.remove("d-zi-popover"))},removeReferences(){this.anchorEl=null,this.popoverContentEl=null,this.tip=null},async onShow(){this.contentWidth==="anchor"&&await this.setPopoverContentAnchorWidth(),this.contentWidth===null&&(this.popoverContentEl.style.width="auto"),this.addEventListeners()},async onLeaveTransitionComplete(){var n;this.modal&&(await this.focusFirstElement(this.$refs.anchor),await this.$nextTick(),this.enableScrolling()),(n=this.tip)==null||n.unmount(),this.$emit("opened",!1),this.open!==null&&this.$emit("update:open",!1)},async onEnterTransitionComplete(){this.focusInitialElement(),await this.$nextTick(),this.preventScrolling(),this.$emit("opened",!0,this.$refs.popover__content),this.open!==null&&this.$emit("update:open",!0)},focusInitialElement(){this.initialFocusElement==="dialog"&&this.$refs.content.$el.focus(),this.initialFocusElement.startsWith("#")&&this.focusInitialElementById(),this.initialFocusElement==="first"&&this.focusFirstElementIfNeeded(this.$refs.popover__content),this.initialFocusElement instanceof HTMLElement&&this.initialFocusElement.focus()},focusInitialElementById(){var e,t,r;const n=(t=(e=this.$refs.content)==null?void 0:e.$el)==null?void 0:t.querySelector(this.initialFocusElement);n?n.focus():console.warn('Could not find the element specified in dt-popover prop "initialFocusElement". Defaulting to focusing the dialog.'),n?n.focus():(r=this.$refs.content)==null||r.$el.focus()},onResize(){this.closePopover()},onClickOutside(){if(!this.hideOnClick)return;this.popoverContentEl.querySelector(".d-popover__anchor--opened")||this.closePopover()},onKeydown(n){n.key==="Tab"&&this.modal&&this.focusTrappedTabPress(n,this.popoverContentEl),n.key==="Escape"&&this.closePopover(),this.$emit("keydown",n)},async setPopoverContentAnchorWidth(){var n;await this.$nextTick(),this.popoverContentEl.style.width=`${(n=this.anchorEl)==null?void 0:n.clientWidth}px`},focusFirstElementIfNeeded(n){var t,r;this._getFocusableElements(n,!0).length!==0?this.focusFirstElement(n):this.showCloseButton?(t=this.$refs.popover__header)==null||t.focusCloseButton():(r=this.$refs.content)==null||r.$el.focus()},initTippyInstance(){var n,e;this.tip=C.createTippy(this.anchorEl,{popperOptions:this.popperOptions(),contentElement:this.popoverContentEl,placement:this.placement,offset:this.offset,sticky:this.sticky,appendTo:this.appendTo==="body"?(e=(n=this.anchorEl)==null?void 0:n.getRootNode())==null?void 0:e.querySelector("body"):this.appendTo,interactive:!0,trigger:"manual",hideOnClick:!1,zIndex:this.modal?650:this.calculateAnchorZindex(),onClickOutside:this.onClickOutside,onShow:this.onShow})}}},Rl=["aria-hidden"],Bl=["id","tabindex"];function Ll(n,e,t,r,i,s){const o=f.resolveComponent("popover-header-footer"),l=f.resolveComponent("sr-only-close-button"),a=f.resolveComponent("dt-lazy-show");return f.openBlock(),f.createElementBlock("div",null,[t.modal&&i.isOpen?(f.openBlock(),f.createBlock(f.Teleport,{key:0,to:"body"},[f.createElementVNode("div",{class:"d-modal--transparent","aria-hidden":t.modal&&i.isOpen?"false":"true",onClick:e[0]||(e[0]=f.withModifiers(()=>{},["prevent","stop"]))},null,8,Rl)])):f.createCommentVNode("",!0),(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.elementType),{ref:"popover",class:f.normalizeClass(["d-popover",{"d-popover__anchor--opened":i.isOpen}]),"data-qa":"dt-popover-container"},{default:f.withCtx(()=>[f.createElementVNode("div",{id:!t.ariaLabelledby&&s.labelledBy,ref:"anchor","data-qa":"dt-popover-anchor",tabindex:t.openOnContext?0:void 0,onClickCapture:e[1]||(e[1]=(...c)=>s.defaultToggleOpen&&s.defaultToggleOpen(...c)),onContextmenu:e[2]||(e[2]=(...c)=>s.onContext&&s.onContext(...c)),onKeydown:[e[3]||(e[3]=f.withKeys(f.withModifiers((...c)=>s.onArrowKeyPress&&s.onArrowKeyPress(...c),["prevent"]),["up"])),e[4]||(e[4]=f.withKeys(f.withModifiers((...c)=>s.onArrowKeyPress&&s.onArrowKeyPress(...c),["prevent"]),["down"])),e[6]||(e[6]=f.withKeys(c=>n.$emit("keydown",c),["enter"])),e[7]||(e[7]=f.withKeys(c=>n.$emit("keydown",c),["space"]))],onKeydownCapture:e[5]||(e[5]=f.withKeys((...c)=>s.closePopover&&s.closePopover(...c),["escape"]))},[f.renderSlot(n.$slots,"anchor",{attrs:{"aria-expanded":i.isOpen.toString(),"aria-controls":t.id,"aria-haspopup":t.role}})],40,Bl),f.createVNode(a,f.mergeProps({id:t.id,ref:"content",role:t.role,"data-qa":"dt-popover","aria-hidden":`${!i.isOpen}`,"aria-labelledby":s.labelledBy,"aria-label":t.ariaLabel,"aria-modal":`${!t.modal}`,transition:t.transition,show:i.isOpen,appear:i.toAppear,class:["d-popover__dialog",{"d-popover__dialog--modal":t.modal},t.dialogClass],style:{"max-height":s.calculatedMaxHeight,"max-width":t.maxWidth},css:n.$attrs.css,tabindex:t.contentTabindex},f.toHandlers(s.popoverListeners)),{default:f.withCtx(()=>[i.hasSlotContent(n.$slots.headerContent)||t.showCloseButton?(f.openBlock(),f.createBlock(o,{key:0,ref:"popover__header",class:f.normalizeClass(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),"content-class":t.headerClass,type:"header","show-close-button":t.showCloseButton,"close-button-props":t.closeButtonProps,onClose:s.closePopover},{content:f.withCtx(()=>[f.renderSlot(n.$slots,"headerContent",{close:s.closePopover})]),_:3},8,["class","content-class","show-close-button","close-button-props","onClose"])):f.createCommentVNode("",!0),f.createElementVNode("div",{ref:"popover__content","data-qa":"dt-popover-content",class:f.normalizeClass(["d-popover__content",i.POPOVER_PADDING_CLASSES[t.padding],t.contentClass])},[f.renderSlot(n.$slots,"content",{close:s.closePopover})],2),i.hasSlotContent(n.$slots.footerContent)?(f.openBlock(),f.createBlock(o,{key:1,ref:"popover__footer",type:"footer",class:f.normalizeClass(i.POPOVER_HEADER_FOOTER_PADDING_CLASSES[t.padding]),"content-class":t.footerClass},{content:f.withCtx(()=>[f.renderSlot(n.$slots,"footerContent",{close:s.closePopover})]),_:3},8,["class","content-class"])):f.createCommentVNode("",!0),n.showVisuallyHiddenClose?(f.openBlock(),f.createBlock(l,{key:2,"visually-hidden-close-label":n.visuallyHiddenCloseLabel,onClose:s.closePopover},null,8,["visually-hidden-close-label","onClose"])):f.createCommentVNode("",!0)]),_:3},16,["id","role","aria-hidden","aria-labelledby","aria-label","aria-modal","transition","show","appear","class","style","css","tabindex"])]),_:3},8,["class"]))])}const ns=C._export_sfc(_l,[["render",Ll]]),Fl={name:"DtNotice",components:{DtNoticeIcon:qi,DtNoticeContent:Ki,DtNoticeAction:Wi},mixins:[Yt],props:{titleId:{type:String,default:void 0},contentId:{type:String,default:void 0},title:{type:String,default:""},role:{type:String,default:"status",validate(n){return el.includes(n)}},important:{type:Boolean,default:!1},kind:{type:String,default:"base",validate(n){return Gt.includes(n)}},closeButtonProps:{type:Object,default:()=>({})},hideClose:{type:Boolean,default:!1}},emits:["close","click"],computed:{noticeClass(){return["d-notice",{error:"d-notice--error",info:"d-notice--info",success:"d-notice--success",warning:"d-notice--warning",base:"d-notice--base"}[this.kind],{"d-notice--important":this.important}]}}};function Vl(n,e,t,r,i,s){const o=f.resolveComponent("dt-notice-icon"),l=f.resolveComponent("dt-notice-content"),a=f.resolveComponent("dt-notice-action");return f.openBlock(),f.createElementBlock("aside",{class:f.normalizeClass(s.noticeClass),"data-qa":"notice"},[f.createVNode(o,{kind:t.kind},{default:f.withCtx(()=>[f.renderSlot(n.$slots,"icon")]),_:3},8,["kind"]),f.createVNode(l,{"title-id":t.titleId,"content-id":t.contentId,title:t.title,role:t.role},{titleOverride:f.withCtx(()=>[f.renderSlot(n.$slots,"titleOverride")]),default:f.withCtx(()=>[f.renderSlot(n.$slots,"default")]),_:3},8,["title-id","content-id","title","role"]),f.createVNode(a,{"hide-close":t.hideClose,"close-button-props":t.closeButtonProps,"visually-hidden-close":n.visuallyHiddenClose,"visually-hidden-close-label":n.visuallyHiddenCloseLabel,onClose:e[0]||(e[0]=c=>n.$emit("close"))},{default:f.withCtx(()=>[f.renderSlot(n.$slots,"action")]),_:3},8,["hide-close","close-button-props","visually-hidden-close","visually-hidden-close-label"])],2)}const rs=C._export_sfc(Fl,[["render",Vl]]),Ve={default:"column",column:"column",row:"row","row-reverse":"row-reverse","column-reverse":"column-reverse"},is=["sm","md","lg","xl"],ir=["0","100","200","300","400","500","600"];function vr(n){return n===Ve.default}function Or(n){if(St(n)==="string")return vr(n)?null:Ve[n];if(St(n)==="object"){const{default:e}=n;return vr(e)?null:Ve[e]}else return null}function St(n){return typeof n}function zl(n){return Or(n)?`d-stack--${Ve[Or(n)]}`:null}function jl(n){return St(n)==="object"?[...is.map(e=>n[e]?`d-stack--${e}--${n[e]}`:null)]:null}function Hl(n){return ir.includes(n)?`d-stack--gap-${n}`:null}function $l(n){if(St(n)==="string")return Object.keys(Ve).includes(n);if(St(n)==="object"){const{default:e}=n;return Object.keys(Ve).includes(e)}else return null}function ql(n){return ir.includes(n)}const Kl={name:"DtStack",props:{direction:{type:[String,Object],default:"column",validator:n=>$l(n)},as:{type:String,default:"div"},gap:{type:String,default:"0",validator:n=>ql(n)}},data(){return{DT_STACK_DIRECTION:Ve,DT_STACK_GAP:ir,DT_STACK_RESPONSIVE_BREAKPOINTS:is}},computed:{stackGap(){return Hl(this.gap)},defaultDirection(){return zl(this.direction)},stackResponsive(){return jl(this.direction)}}};function Wl(n,e,t,r,i,s){return f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.as),{class:f.normalizeClass(["d-stack",s.defaultDirection,s.stackResponsive,s.stackGap])},{default:f.withCtx(()=>[f.renderSlot(n.$slots,"default")]),_:3},8,["class"])}const sr=C._export_sfc(Kl,[["render",Wl]]);function z(n){this.content=n}z.prototype={constructor:z,find:function(n){for(var e=0;e<this.content.length;e+=2)if(this.content[e]===n)return e;return-1},get:function(n){var e=this.find(n);return e==-1?void 0:this.content[e+1]},update:function(n,e,t){var r=t&&t!=n?this.remove(t):this,i=r.find(n),s=r.content.slice();return i==-1?s.push(t||n,e):(s[i+1]=e,t&&(s[i]=t)),new z(s)},remove:function(n){var e=this.find(n);if(e==-1)return this;var t=this.content.slice();return t.splice(e,2),new z(t)},addToStart:function(n,e){return new z([n,e].concat(this.remove(n).content))},addToEnd:function(n,e){var t=this.remove(n).content.slice();return t.push(n,e),new z(t)},addBefore:function(n,e,t){var r=this.remove(e),i=r.content.slice(),s=r.find(n);return i.splice(s==-1?i.length:s,0,e,t),new z(i)},forEach:function(n){for(var e=0;e<this.content.length;e+=2)n(this.content[e],this.content[e+1])},prepend:function(n){return n=z.from(n),n.size?new z(n.content.concat(this.subtract(n).content)):this},append:function(n){return n=z.from(n),n.size?new z(this.subtract(n).content.concat(n.content)):this},subtract:function(n){var e=this;n=z.from(n);for(var t=0;t<n.content.length;t+=2)e=e.remove(n.content[t]);return e},toObject:function(){var n={};return this.forEach(function(e,t){n[e]=t}),n},get size(){return this.content.length>>1}};z.from=function(n){if(n instanceof z)return n;var e=[];if(n)for(var t in n)e.push(t,n[t]);return new z(e)};function ss(n,e,t){for(let r=0;;r++){if(r==n.childCount||r==e.childCount)return n.childCount==e.childCount?null:t;let i=n.child(r),s=e.child(r);if(i==s){t+=i.nodeSize;continue}if(!i.sameMarkup(s))return t;if(i.isText&&i.text!=s.text){for(let o=0;i.text[o]==s.text[o];o++)t++;return t}if(i.content.size||s.content.size){let o=ss(i.content,s.content,t+1);if(o!=null)return o}t+=i.nodeSize}}function ls(n,e,t,r){for(let i=n.childCount,s=e.childCount;;){if(i==0||s==0)return i==s?null:{a:t,b:r};let o=n.child(--i),l=e.child(--s),a=o.nodeSize;if(o==l){t-=a,r-=a;continue}if(!o.sameMarkup(l))return{a:t,b:r};if(o.isText&&o.text!=l.text){let c=0,d=Math.min(o.text.length,l.text.length);for(;c<d&&o.text[o.text.length-c-1]==l.text[l.text.length-c-1];)c++,t--,r--;return{a:t,b:r}}if(o.content.size||l.content.size){let c=ls(o.content,l.content,t-1,r-1);if(c)return c}t-=a,r-=a}}class k{constructor(e,t){if(this.content=e,this.size=t||0,t==null)for(let r=0;r<e.length;r++)this.size+=e[r].nodeSize}nodesBetween(e,t,r,i=0,s){for(let o=0,l=0;l<t;o++){let a=this.content[o],c=l+a.nodeSize;if(c>e&&r(a,i+l,s||null,o)!==!1&&a.content.size){let d=l+1;a.nodesBetween(Math.max(0,e-d),Math.min(a.content.size,t-d),r,i+d)}l=c}}descendants(e){this.nodesBetween(0,this.size,e)}textBetween(e,t,r,i){let s="",o=!0;return this.nodesBetween(e,t,(l,a)=>{l.isText?(s+=l.text.slice(Math.max(e,a)-a,t-a),o=!r):l.isLeaf?(i?s+=typeof i=="function"?i(l):i:l.type.spec.leafText&&(s+=l.type.spec.leafText(l)),o=!r):!o&&l.isBlock&&(s+=r,o=!0)},0),s}append(e){if(!e.size)return this;if(!this.size)return e;let t=this.lastChild,r=e.firstChild,i=this.content.slice(),s=0;for(t.isText&&t.sameMarkup(r)&&(i[i.length-1]=t.withText(t.text+r.text),s=1);s<e.content.length;s++)i.push(e.content[s]);return new k(i,this.size+e.size)}cut(e,t=this.size){if(e==0&&t==this.size)return this;let r=[],i=0;if(t>e)for(let s=0,o=0;o<t;s++){let l=this.content[s],a=o+l.nodeSize;a>e&&((o<e||a>t)&&(l.isText?l=l.cut(Math.max(0,e-o),Math.min(l.text.length,t-o)):l=l.cut(Math.max(0,e-o-1),Math.min(l.content.size,t-o-1))),r.push(l),i+=l.nodeSize),o=a}return new k(r,i)}cutByIndex(e,t){return e==t?k.empty:e==0&&t==this.content.length?this:new k(this.content.slice(e,t))}replaceChild(e,t){let r=this.content[e];if(r==t)return this;let i=this.content.slice(),s=this.size+t.nodeSize-r.nodeSize;return i[e]=t,new k(i,s)}addToStart(e){return new k([e].concat(this.content),this.size+e.nodeSize)}addToEnd(e){return new k(this.content.concat(e),this.size+e.nodeSize)}eq(e){if(this.content.length!=e.content.length)return!1;for(let t=0;t<this.content.length;t++)if(!this.content[t].eq(e.content[t]))return!1;return!0}get firstChild(){return this.content.length?this.content[0]:null}get lastChild(){return this.content.length?this.content[this.content.length-1]:null}get childCount(){return this.content.length}child(e){let t=this.content[e];if(!t)throw new RangeError("Index "+e+" out of range for "+this);return t}maybeChild(e){return this.content[e]||null}forEach(e){for(let t=0,r=0;t<this.content.length;t++){let i=this.content[t];e(i,r,t),r+=i.nodeSize}}findDiffStart(e,t=0){return ss(this,e,t)}findDiffEnd(e,t=this.size,r=e.size){return ls(this,e,t,r)}findIndex(e,t=-1){if(e==0)return Dt(0,e);if(e==this.size)return Dt(this.content.length,e);if(e>this.size||e<0)throw new RangeError(`Position ${e} outside of fragment (${this})`);for(let r=0,i=0;;r++){let s=this.child(r),o=i+s.nodeSize;if(o>=e)return o==e||t>0?Dt(r+1,o):Dt(r,i);i=o}}toString(){return"<"+this.toStringInner()+">"}toStringInner(){return this.content.join(", ")}toJSON(){return this.content.length?this.content.map(e=>e.toJSON()):null}static fromJSON(e,t){if(!t)return k.empty;if(!Array.isArray(t))throw new RangeError("Invalid input for Fragment.fromJSON");return new k(t.map(e.nodeFromJSON))}static fromArray(e){if(!e.length)return k.empty;let t,r=0;for(let i=0;i<e.length;i++){let s=e[i];r+=s.nodeSize,i&&s.isText&&e[i-1].sameMarkup(s)?(t||(t=e.slice(0,i)),t[t.length-1]=s.withText(t[t.length-1].text+s.text)):t&&t.push(s)}return new k(t||e,r)}static from(e){if(!e)return k.empty;if(e instanceof k)return e;if(Array.isArray(e))return this.fromArray(e);if(e.attrs)return new k([e],e.nodeSize);throw new RangeError("Can not convert "+e+" to a Fragment"+(e.nodesBetween?" (looks like multiple versions of prosemirror-model were loaded)":""))}}k.empty=new k([],0);const hn={index:0,offset:0};function Dt(n,e){return hn.index=n,hn.offset=e,hn}function Bt(n,e){if(n===e)return!0;if(!(n&&typeof n=="object")||!(e&&typeof e=="object"))return!1;let t=Array.isArray(n);if(Array.isArray(e)!=t)return!1;if(t){if(n.length!=e.length)return!1;for(let r=0;r<n.length;r++)if(!Bt(n[r],e[r]))return!1}else{for(let r in n)if(!(r in e)||!Bt(n[r],e[r]))return!1;for(let r in e)if(!(r in n))return!1}return!0}let P=class Fn{constructor(e,t){this.type=e,this.attrs=t}addToSet(e){let t,r=!1;for(let i=0;i<e.length;i++){let s=e[i];if(this.eq(s))return e;if(this.type.excludes(s.type))t||(t=e.slice(0,i));else{if(s.type.excludes(this.type))return e;!r&&s.type.rank>this.type.rank&&(t||(t=e.slice(0,i)),t.push(this),r=!0),t&&t.push(s)}}return t||(t=e.slice()),r||t.push(this),t}removeFromSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return e.slice(0,t).concat(e.slice(t+1));return e}isInSet(e){for(let t=0;t<e.length;t++)if(this.eq(e[t]))return!0;return!1}eq(e){return this==e||this.type==e.type&&Bt(this.attrs,e.attrs)}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Mark.fromJSON");let r=e.marks[t.type];if(!r)throw new RangeError(`There is no mark type ${t.type} in this schema`);return r.create(t.attrs)}static sameSet(e,t){if(e==t)return!0;if(e.length!=t.length)return!1;for(let r=0;r<e.length;r++)if(!e[r].eq(t[r]))return!1;return!0}static setFrom(e){if(!e||Array.isArray(e)&&e.length==0)return Fn.none;if(e instanceof Fn)return[e];let t=e.slice();return t.sort((r,i)=>r.type.rank-i.type.rank),t}};P.none=[];class Lt extends Error{}class S{constructor(e,t,r){this.content=e,this.openStart=t,this.openEnd=r}get size(){return this.content.size-this.openStart-this.openEnd}insertAt(e,t){let r=cs(this.content,e+this.openStart,t);return r&&new S(r,this.openStart,this.openEnd)}removeBetween(e,t){return new S(as(this.content,e+this.openStart,t+this.openStart),this.openStart,this.openEnd)}eq(e){return this.content.eq(e.content)&&this.openStart==e.openStart&&this.openEnd==e.openEnd}toString(){return this.content+"("+this.openStart+","+this.openEnd+")"}toJSON(){if(!this.content.size)return null;let e={content:this.content.toJSON()};return this.openStart>0&&(e.openStart=this.openStart),this.openEnd>0&&(e.openEnd=this.openEnd),e}static fromJSON(e,t){if(!t)return S.empty;let r=t.openStart||0,i=t.openEnd||0;if(typeof r!="number"||typeof i!="number")throw new RangeError("Invalid input for Slice.fromJSON");return new S(k.fromJSON(e,t.content),r,i)}static maxOpen(e,t=!0){let r=0,i=0;for(let s=e.firstChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.firstChild)r++;for(let s=e.lastChild;s&&!s.isLeaf&&(t||!s.type.spec.isolating);s=s.lastChild)i++;return new S(e,r,i)}}S.empty=new S(k.empty,0,0);function as(n,e,t){let{index:r,offset:i}=n.findIndex(e),s=n.maybeChild(r),{index:o,offset:l}=n.findIndex(t);if(i==e||s.isText){if(l!=t&&!n.child(o).isText)throw new RangeError("Removing non-flat range");return n.cut(0,e).append(n.cut(t))}if(r!=o)throw new RangeError("Removing non-flat range");return n.replaceChild(r,s.copy(as(s.content,e-i-1,t-i-1)))}function cs(n,e,t,r){let{index:i,offset:s}=n.findIndex(e),o=n.maybeChild(i);if(s==e||o.isText)return r&&!r.canReplace(i,i,t)?null:n.cut(0,e).append(t).append(n.cut(e));let l=cs(o.content,e-s-1,t);return l&&n.replaceChild(i,o.copy(l))}function Jl(n,e,t){if(t.openStart>n.depth)throw new Lt("Inserted content deeper than insertion position");if(n.depth-t.openStart!=e.depth-t.openEnd)throw new Lt("Inconsistent open depths");return ds(n,e,t,0)}function ds(n,e,t,r){let i=n.index(r),s=n.node(r);if(i==e.index(r)&&r<n.depth-t.openStart){let o=ds(n,e,t,r+1);return s.copy(s.content.replaceChild(i,o))}else if(t.content.size)if(!t.openStart&&!t.openEnd&&n.depth==r&&e.depth==r){let o=n.parent,l=o.content;return Re(o,l.cut(0,n.parentOffset).append(t.content).append(l.cut(e.parentOffset)))}else{let{start:o,end:l}=Ul(t,n);return Re(s,fs(n,o,l,e,r))}else return Re(s,Ft(n,e,r))}function us(n,e){if(!e.type.compatibleContent(n.type))throw new Lt("Cannot join "+e.type.name+" onto "+n.type.name)}function Vn(n,e,t){let r=n.node(t);return us(r,e.node(t)),r}function _e(n,e){let t=e.length-1;t>=0&&n.isText&&n.sameMarkup(e[t])?e[t]=n.withText(e[t].text+n.text):e.push(n)}function mt(n,e,t,r){let i=(e||n).node(t),s=0,o=e?e.index(t):i.childCount;n&&(s=n.index(t),n.depth>t?s++:n.textOffset&&(_e(n.nodeAfter,r),s++));for(let l=s;l<o;l++)_e(i.child(l),r);e&&e.depth==t&&e.textOffset&&_e(e.nodeBefore,r)}function Re(n,e){return n.type.checkContent(e),n.copy(e)}function fs(n,e,t,r,i){let s=n.depth>i&&Vn(n,e,i+1),o=r.depth>i&&Vn(t,r,i+1),l=[];return mt(null,n,i,l),s&&o&&e.index(i)==t.index(i)?(us(s,o),_e(Re(s,fs(n,e,t,r,i+1)),l)):(s&&_e(Re(s,Ft(n,e,i+1)),l),mt(e,t,i,l),o&&_e(Re(o,Ft(t,r,i+1)),l)),mt(r,null,i,l),new k(l)}function Ft(n,e,t){let r=[];if(mt(null,n,t,r),n.depth>t){let i=Vn(n,e,t+1);_e(Re(i,Ft(n,e,t+1)),r)}return mt(e,null,t,r),new k(r)}function Ul(n,e){let t=e.depth-n.openStart,i=e.node(t).copy(n.content);for(let s=t-1;s>=0;s--)i=e.node(s).copy(k.from(i));return{start:i.resolveNoCache(n.openStart+t),end:i.resolveNoCache(i.content.size-n.openEnd-t)}}class Ct{constructor(e,t,r){this.pos=e,this.path=t,this.parentOffset=r,this.depth=t.length/3-1}resolveDepth(e){return e==null?this.depth:e<0?this.depth+e:e}get parent(){return this.node(this.depth)}get doc(){return this.node(0)}node(e){return this.path[this.resolveDepth(e)*3]}index(e){return this.path[this.resolveDepth(e)*3+1]}indexAfter(e){return e=this.resolveDepth(e),this.index(e)+(e==this.depth&&!this.textOffset?0:1)}start(e){return e=this.resolveDepth(e),e==0?0:this.path[e*3-1]+1}end(e){return e=this.resolveDepth(e),this.start(e)+this.node(e).content.size}before(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position before the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]}after(e){if(e=this.resolveDepth(e),!e)throw new RangeError("There is no position after the top-level node");return e==this.depth+1?this.pos:this.path[e*3-1]+this.path[e*3].nodeSize}get textOffset(){return this.pos-this.path[this.path.length-1]}get nodeAfter(){let e=this.parent,t=this.index(this.depth);if(t==e.childCount)return null;let r=this.pos-this.path[this.path.length-1],i=e.child(t);return r?e.child(t).cut(r):i}get nodeBefore(){let e=this.index(this.depth),t=this.pos-this.path[this.path.length-1];return t?this.parent.child(e).cut(0,t):e==0?null:this.parent.child(e-1)}posAtIndex(e,t){t=this.resolveDepth(t);let r=this.path[t*3],i=t==0?0:this.path[t*3-1]+1;for(let s=0;s<e;s++)i+=r.child(s).nodeSize;return i}marks(){let e=this.parent,t=this.index();if(e.content.size==0)return P.none;if(this.textOffset)return e.child(t).marks;let r=e.maybeChild(t-1),i=e.maybeChild(t);if(!r){let l=r;r=i,i=l}let s=r.marks;for(var o=0;o<s.length;o++)s[o].type.spec.inclusive===!1&&(!i||!s[o].isInSet(i.marks))&&(s=s[o--].removeFromSet(s));return s}marksAcross(e){let t=this.parent.maybeChild(this.index());if(!t||!t.isInline)return null;let r=t.marks,i=e.parent.maybeChild(e.index());for(var s=0;s<r.length;s++)r[s].type.spec.inclusive===!1&&(!i||!r[s].isInSet(i.marks))&&(r=r[s--].removeFromSet(r));return r}sharedDepth(e){for(let t=this.depth;t>0;t--)if(this.start(t)<=e&&this.end(t)>=e)return t;return 0}blockRange(e=this,t){if(e.pos<this.pos)return e.blockRange(this);for(let r=this.depth-(this.parent.inlineContent||this.pos==e.pos?1:0);r>=0;r--)if(e.pos<=this.end(r)&&(!t||t(this.node(r))))return new Vt(this,e,r);return null}sameParent(e){return this.pos-this.parentOffset==e.pos-e.parentOffset}max(e){return e.pos>this.pos?e:this}min(e){return e.pos<this.pos?e:this}toString(){let e="";for(let t=1;t<=this.depth;t++)e+=(e?"/":"")+this.node(t).type.name+"_"+this.index(t-1);return e+":"+this.parentOffset}static resolve(e,t){if(!(t>=0&&t<=e.content.size))throw new RangeError("Position "+t+" out of range");let r=[],i=0,s=t;for(let o=e;;){let{index:l,offset:a}=o.content.findIndex(s),c=s-a;if(r.push(o,l,i+a),!c||(o=o.child(l),o.isText))break;s=c-1,i+=a+1}return new Ct(t,r,s)}static resolveCached(e,t){for(let i=0;i<pn.length;i++){let s=pn[i];if(s.pos==t&&s.doc==e)return s}let r=pn[mn]=Ct.resolve(e,t);return mn=(mn+1)%Gl,r}}let pn=[],mn=0,Gl=12;class Vt{constructor(e,t,r){this.$from=e,this.$to=t,this.depth=r}get start(){return this.$from.before(this.depth+1)}get end(){return this.$to.after(this.depth+1)}get parent(){return this.$from.node(this.depth)}get startIndex(){return this.$from.index(this.depth)}get endIndex(){return this.$to.indexAfter(this.depth)}}const Yl=Object.create(null);let Be=class zn{constructor(e,t,r,i=P.none){this.type=e,this.attrs=t,this.marks=i,this.content=r||k.empty}get nodeSize(){return this.isLeaf?1:2+this.content.size}get childCount(){return this.content.childCount}child(e){return this.content.child(e)}maybeChild(e){return this.content.maybeChild(e)}forEach(e){this.content.forEach(e)}nodesBetween(e,t,r,i=0){this.content.nodesBetween(e,t,r,i,this)}descendants(e){this.nodesBetween(0,this.content.size,e)}get textContent(){return this.isLeaf&&this.type.spec.leafText?this.type.spec.leafText(this):this.textBetween(0,this.content.size,"")}textBetween(e,t,r,i){return this.content.textBetween(e,t,r,i)}get firstChild(){return this.content.firstChild}get lastChild(){return this.content.lastChild}eq(e){return this==e||this.sameMarkup(e)&&this.content.eq(e.content)}sameMarkup(e){return this.hasMarkup(e.type,e.attrs,e.marks)}hasMarkup(e,t,r){return this.type==e&&Bt(this.attrs,t||e.defaultAttrs||Yl)&&P.sameSet(this.marks,r||P.none)}copy(e=null){return e==this.content?this:new zn(this.type,this.attrs,e,this.marks)}mark(e){return e==this.marks?this:new zn(this.type,this.attrs,this.content,e)}cut(e,t=this.content.size){return e==0&&t==this.content.size?this:this.copy(this.content.cut(e,t))}slice(e,t=this.content.size,r=!1){if(e==t)return S.empty;let i=this.resolve(e),s=this.resolve(t),o=r?0:i.sharedDepth(t),l=i.start(o),c=i.node(o).content.cut(i.pos-l,s.pos-l);return new S(c,i.depth-o,s.depth-o)}replace(e,t,r){return Jl(this.resolve(e),this.resolve(t),r)}nodeAt(e){for(let t=this;;){let{index:r,offset:i}=t.content.findIndex(e);if(t=t.maybeChild(r),!t)return null;if(i==e||t.isText)return t;e-=i+1}}childAfter(e){let{index:t,offset:r}=this.content.findIndex(e);return{node:this.content.maybeChild(t),index:t,offset:r}}childBefore(e){if(e==0)return{node:null,index:0,offset:0};let{index:t,offset:r}=this.content.findIndex(e);if(r<e)return{node:this.content.child(t),index:t,offset:r};let i=this.content.child(t-1);return{node:i,index:t-1,offset:r-i.nodeSize}}resolve(e){return Ct.resolveCached(this,e)}resolveNoCache(e){return Ct.resolve(this,e)}rangeHasMark(e,t,r){let i=!1;return t>e&&this.nodesBetween(e,t,s=>(r.isInSet(s.marks)&&(i=!0),!i)),i}get isBlock(){return this.type.isBlock}get isTextblock(){return this.type.isTextblock}get inlineContent(){return this.type.inlineContent}get isInline(){return this.type.isInline}get isText(){return this.type.isText}get isLeaf(){return this.type.isLeaf}get isAtom(){return this.type.isAtom}toString(){if(this.type.spec.toDebugString)return this.type.spec.toDebugString(this);let e=this.type.name;return this.content.size&&(e+="("+this.content.toStringInner()+")"),hs(this.marks,e)}contentMatchAt(e){let t=this.type.contentMatch.matchFragment(this.content,0,e);if(!t)throw new Error("Called contentMatchAt on a node with invalid content");return t}canReplace(e,t,r=k.empty,i=0,s=r.childCount){let o=this.contentMatchAt(e).matchFragment(r,i,s),l=o&&o.matchFragment(this.content,t);if(!l||!l.validEnd)return!1;for(let a=i;a<s;a++)if(!this.type.allowsMarks(r.child(a).marks))return!1;return!0}canReplaceWith(e,t,r,i){if(i&&!this.type.allowsMarks(i))return!1;let s=this.contentMatchAt(e).matchType(r),o=s&&s.matchFragment(this.content,t);return o?o.validEnd:!1}canAppend(e){return e.content.size?this.canReplace(this.childCount,this.childCount,e.content):this.type.compatibleContent(e.type)}check(){this.type.checkContent(this.content);let e=P.none;for(let t=0;t<this.marks.length;t++)e=this.marks[t].addToSet(e);if(!P.sameSet(e,this.marks))throw new RangeError(`Invalid collection of marks for node ${this.type.name}: ${this.marks.map(t=>t.type.name)}`);this.content.forEach(t=>t.check())}toJSON(){let e={type:this.type.name};for(let t in this.attrs){e.attrs=this.attrs;break}return this.content.size&&(e.content=this.content.toJSON()),this.marks.length&&(e.marks=this.marks.map(t=>t.toJSON())),e}static fromJSON(e,t){if(!t)throw new RangeError("Invalid input for Node.fromJSON");let r=null;if(t.marks){if(!Array.isArray(t.marks))throw new RangeError("Invalid mark data for Node.fromJSON");r=t.marks.map(e.markFromJSON)}if(t.type=="text"){if(typeof t.text!="string")throw new RangeError("Invalid text node in JSON");return e.text(t.text,r)}let i=k.fromJSON(e,t.content);return e.nodeType(t.type).create(t.attrs,i,r)}};Be.prototype.text=void 0;class zt extends Be{constructor(e,t,r,i){if(super(e,t,null,i),!r)throw new RangeError("Empty text nodes are not allowed");this.text=r}toString(){return this.type.spec.toDebugString?this.type.spec.toDebugString(this):hs(this.marks,JSON.stringify(this.text))}get textContent(){return this.text}textBetween(e,t){return this.text.slice(e,t)}get nodeSize(){return this.text.length}mark(e){return e==this.marks?this:new zt(this.type,this.attrs,this.text,e)}withText(e){return e==this.text?this:new zt(this.type,this.attrs,e,this.marks)}cut(e=0,t=this.text.length){return e==0&&t==this.text.length?this:this.withText(this.text.slice(e,t))}eq(e){return this.sameMarkup(e)&&this.text==e.text}toJSON(){let e=super.toJSON();return e.text=this.text,e}}function hs(n,e){for(let t=n.length-1;t>=0;t--)e=n[t].type.name+"("+e+")";return e}class ze{constructor(e){this.validEnd=e,this.next=[],this.wrapCache=[]}static parse(e,t){let r=new Xl(e,t);if(r.next==null)return ze.empty;let i=ps(r);r.next&&r.err("Unexpected trailing text");let s=ia(ra(i));return sa(s,r),s}matchType(e){for(let t=0;t<this.next.length;t++)if(this.next[t].type==e)return this.next[t].next;return null}matchFragment(e,t=0,r=e.childCount){let i=this;for(let s=t;i&&s<r;s++)i=i.matchType(e.child(s).type);return i}get inlineContent(){return this.next.length!=0&&this.next[0].type.isInline}get defaultType(){for(let e=0;e<this.next.length;e++){let{type:t}=this.next[e];if(!(t.isText||t.hasRequiredAttrs()))return t}return null}compatible(e){for(let t=0;t<this.next.length;t++)for(let r=0;r<e.next.length;r++)if(this.next[t].type==e.next[r].type)return!0;return!1}fillBefore(e,t=!1,r=0){let i=[this];function s(o,l){let a=o.matchFragment(e,r);if(a&&(!t||a.validEnd))return k.from(l.map(c=>c.createAndFill()));for(let c=0;c<o.next.length;c++){let{type:d,next:u}=o.next[c];if(!(d.isText||d.hasRequiredAttrs())&&i.indexOf(u)==-1){i.push(u);let h=s(u,l.concat(d));if(h)return h}}return null}return s(this,[])}findWrapping(e){for(let r=0;r<this.wrapCache.length;r+=2)if(this.wrapCache[r]==e)return this.wrapCache[r+1];let t=this.computeWrapping(e);return this.wrapCache.push(e,t),t}computeWrapping(e){let t=Object.create(null),r=[{match:this,type:null,via:null}];for(;r.length;){let i=r.shift(),s=i.match;if(s.matchType(e)){let o=[];for(let l=i;l.type;l=l.via)o.push(l.type);return o.reverse()}for(let o=0;o<s.next.length;o++){let{type:l,next:a}=s.next[o];!l.isLeaf&&!l.hasRequiredAttrs()&&!(l.name in t)&&(!i.type||a.validEnd)&&(r.push({match:l.contentMatch,type:l,via:i}),t[l.name]=!0)}}return null}get edgeCount(){return this.next.length}edge(e){if(e>=this.next.length)throw new RangeError(`There's no ${e}th edge in this content match`);return this.next[e]}toString(){let e=[];function t(r){e.push(r);for(let i=0;i<r.next.length;i++)e.indexOf(r.next[i].next)==-1&&t(r.next[i].next)}return t(this),e.map((r,i)=>{let s=i+(r.validEnd?"*":" ")+" ";for(let o=0;o<r.next.length;o++)s+=(o?", ":"")+r.next[o].type.name+"->"+e.indexOf(r.next[o].next);return s}).join(`
3
3
  `)}}ze.empty=new ze(!0);class Xl{constructor(e,t){this.string=e,this.nodeTypes=t,this.inline=null,this.pos=0,this.tokens=e.split(/\s*(?=\b|\W|$)/),this.tokens[this.tokens.length-1]==""&&this.tokens.pop(),this.tokens[0]==""&&this.tokens.shift()}get next(){return this.tokens[this.pos]}eat(e){return this.next==e&&(this.pos++||!0)}err(e){throw new SyntaxError(e+" (in content expression '"+this.string+"')")}}function ps(n){let e=[];do e.push(Zl(n));while(n.eat("|"));return e.length==1?e[0]:{type:"choice",exprs:e}}function Zl(n){let e=[];do e.push(Ql(n));while(n.next&&n.next!=")"&&n.next!="|");return e.length==1?e[0]:{type:"seq",exprs:e}}function Ql(n){let e=na(n);for(;;)if(n.eat("+"))e={type:"plus",expr:e};else if(n.eat("*"))e={type:"star",expr:e};else if(n.eat("?"))e={type:"opt",expr:e};else if(n.eat("{"))e=ea(n,e);else break;return e}function Mr(n){/\D/.test(n.next)&&n.err("Expected number, got '"+n.next+"'");let e=Number(n.next);return n.pos++,e}function ea(n,e){let t=Mr(n),r=t;return n.eat(",")&&(n.next!="}"?r=Mr(n):r=-1),n.eat("}")||n.err("Unclosed braced range"),{type:"range",min:t,max:r,expr:e}}function ta(n,e){let t=n.nodeTypes,r=t[e];if(r)return[r];let i=[];for(let s in t){let o=t[s];o.groups.indexOf(e)>-1&&i.push(o)}return i.length==0&&n.err("No node type or group '"+e+"' found"),i}function na(n){if(n.eat("(")){let e=ps(n);return n.eat(")")||n.err("Missing closing paren"),e}else if(/\W/.test(n.next))n.err("Unexpected token '"+n.next+"'");else{let e=ta(n,n.next).map(t=>(n.inline==null?n.inline=t.isInline:n.inline!=t.isInline&&n.err("Mixing inline and block content"),{type:"name",value:t}));return n.pos++,e.length==1?e[0]:{type:"choice",exprs:e}}}function ra(n){let e=[[]];return i(s(n,0),t()),e;function t(){return e.push([])-1}function r(o,l,a){let c={term:a,to:l};return e[o].push(c),c}function i(o,l){o.forEach(a=>a.to=l)}function s(o,l){if(o.type=="choice")return o.exprs.reduce((a,c)=>a.concat(s(c,l)),[]);if(o.type=="seq")for(let a=0;;a++){let c=s(o.exprs[a],l);if(a==o.exprs.length-1)return c;i(c,l=t())}else if(o.type=="star"){let a=t();return r(l,a),i(s(o.expr,a),a),[r(a)]}else if(o.type=="plus"){let a=t();return i(s(o.expr,l),a),i(s(o.expr,a),a),[r(a)]}else{if(o.type=="opt")return[r(l)].concat(s(o.expr,l));if(o.type=="range"){let a=l;for(let c=0;c<o.min;c++){let d=t();i(s(o.expr,a),d),a=d}if(o.max==-1)i(s(o.expr,a),a);else for(let c=o.min;c<o.max;c++){let d=t();r(a,d),i(s(o.expr,a),d),a=d}return[r(a)]}else{if(o.type=="name")return[r(l,void 0,o.value)];throw new Error("Unknown expr type")}}}}function ms(n,e){return e-n}function Tr(n,e){let t=[];return r(e),t.sort(ms);function r(i){let s=n[i];if(s.length==1&&!s[0].term)return r(s[0].to);t.push(i);for(let o=0;o<s.length;o++){let{term:l,to:a}=s[o];!l&&t.indexOf(a)==-1&&r(a)}}}function ia(n){let e=Object.create(null);return t(Tr(n,0));function t(r){let i=[];r.forEach(o=>{n[o].forEach(({term:l,to:a})=>{if(!l)return;let c;for(let d=0;d<i.length;d++)i[d][0]==l&&(c=i[d][1]);Tr(n,a).forEach(d=>{c||i.push([l,c=[]]),c.indexOf(d)==-1&&c.push(d)})})});let s=e[r.join(",")]=new ze(r.indexOf(n.length-1)>-1);for(let o=0;o<i.length;o++){let l=i[o][1].sort(ms);s.next.push({type:i[o][0],next:e[l.join(",")]||t(l)})}return s}}function sa(n,e){for(let t=0,r=[n];t<r.length;t++){let i=r[t],s=!i.validEnd,o=[];for(let l=0;l<i.next.length;l++){let{type:a,next:c}=i.next[l];o.push(a.name),s&&!(a.isText||a.hasRequiredAttrs())&&(s=!1),r.indexOf(c)==-1&&r.push(c)}s&&e.err("Only non-generatable nodes ("+o.join(", ")+") in a required position (see https://prosemirror.net/docs/guide/#generatable)")}}function gs(n){let e=Object.create(null);for(let t in n){let r=n[t];if(!r.hasDefault)return null;e[t]=r.default}return e}function ys(n,e){let t=Object.create(null);for(let r in n){let i=e&&e[r];if(i===void 0){let s=n[r];if(s.hasDefault)i=s.default;else throw new RangeError("No value supplied for attribute "+r)}t[r]=i}return t}function bs(n){let e=Object.create(null);if(n)for(let t in n)e[t]=new oa(n[t]);return e}let Nr=class ks{constructor(e,t,r){this.name=e,this.schema=t,this.spec=r,this.markSet=null,this.groups=r.group?r.group.split(" "):[],this.attrs=bs(r.attrs),this.defaultAttrs=gs(this.attrs),this.contentMatch=null,this.inlineContent=null,this.isBlock=!(r.inline||e=="text"),this.isText=e=="text"}get isInline(){return!this.isBlock}get isTextblock(){return this.isBlock&&this.inlineContent}get isLeaf(){return this.contentMatch==ze.empty}get isAtom(){return this.isLeaf||!!this.spec.atom}get whitespace(){return this.spec.whitespace||(this.spec.code?"pre":"normal")}hasRequiredAttrs(){for(let e in this.attrs)if(this.attrs[e].isRequired)return!0;return!1}compatibleContent(e){return this==e||this.contentMatch.compatible(e.contentMatch)}computeAttrs(e){return!e&&this.defaultAttrs?this.defaultAttrs:ys(this.attrs,e)}create(e=null,t,r){if(this.isText)throw new Error("NodeType.create can't construct text nodes");return new Be(this,this.computeAttrs(e),k.from(t),P.setFrom(r))}createChecked(e=null,t,r){return t=k.from(t),this.checkContent(t),new Be(this,this.computeAttrs(e),t,P.setFrom(r))}createAndFill(e=null,t,r){if(e=this.computeAttrs(e),t=k.from(t),t.size){let o=this.contentMatch.fillBefore(t);if(!o)return null;t=o.append(t)}let i=this.contentMatch.matchFragment(t),s=i&&i.fillBefore(k.empty,!0);return s?new Be(this,e,t.append(s),P.setFrom(r)):null}validContent(e){let t=this.contentMatch.matchFragment(e);if(!t||!t.validEnd)return!1;for(let r=0;r<e.childCount;r++)if(!this.allowsMarks(e.child(r).marks))return!1;return!0}checkContent(e){if(!this.validContent(e))throw new RangeError(`Invalid content for node ${this.name}: ${e.toString().slice(0,50)}`)}allowsMarkType(e){return this.markSet==null||this.markSet.indexOf(e)>-1}allowsMarks(e){if(this.markSet==null)return!0;for(let t=0;t<e.length;t++)if(!this.allowsMarkType(e[t].type))return!1;return!0}allowedMarks(e){if(this.markSet==null)return e;let t;for(let r=0;r<e.length;r++)this.allowsMarkType(e[r].type)?t&&t.push(e[r]):t||(t=e.slice(0,r));return t?t.length?t:P.none:e}static compile(e,t){let r=Object.create(null);e.forEach((s,o)=>r[s]=new ks(s,t,o));let i=t.spec.topNode||"doc";if(!r[i])throw new RangeError("Schema is missing its top node type ('"+i+"')");if(!r.text)throw new RangeError("Every schema needs a 'text' type");for(let s in r.text.attrs)throw new RangeError("The text node type should not have attributes");return r}};class oa{constructor(e){this.hasDefault=Object.prototype.hasOwnProperty.call(e,"default"),this.default=e.default}get isRequired(){return!this.hasDefault}}class Xt{constructor(e,t,r,i){this.name=e,this.rank=t,this.schema=r,this.spec=i,this.attrs=bs(i.attrs),this.excluded=null;let s=gs(this.attrs);this.instance=s?new P(this,s):null}create(e=null){return!e&&this.instance?this.instance:new P(this,ys(this.attrs,e))}static compile(e,t){let r=Object.create(null),i=0;return e.forEach((s,o)=>r[s]=new Xt(s,i++,t,o)),r}removeFromSet(e){for(var t=0;t<e.length;t++)e[t].type==this&&(e=e.slice(0,t).concat(e.slice(t+1)),t--);return e}isInSet(e){for(let t=0;t<e.length;t++)if(e[t].type==this)return e[t]}excludes(e){return this.excluded.indexOf(e)>-1}}class la{constructor(e){this.cached=Object.create(null);let t=this.spec={};for(let i in e)t[i]=e[i];t.nodes=z.from(e.nodes),t.marks=z.from(e.marks||{}),this.nodes=Nr.compile(this.spec.nodes,this),this.marks=Xt.compile(this.spec.marks,this);let r=Object.create(null);for(let i in this.nodes){if(i in this.marks)throw new RangeError(i+" can not be both a node and a mark");let s=this.nodes[i],o=s.spec.content||"",l=s.spec.marks;s.contentMatch=r[o]||(r[o]=ze.parse(o,this.nodes)),s.inlineContent=s.contentMatch.inlineContent,s.markSet=l=="_"?null:l?Dr(this,l.split(" ")):l==""||!s.inlineContent?[]:null}for(let i in this.marks){let s=this.marks[i],o=s.spec.excludes;s.excluded=o==null?[s]:o==""?[]:Dr(this,o.split(" "))}this.nodeFromJSON=this.nodeFromJSON.bind(this),this.markFromJSON=this.markFromJSON.bind(this),this.topNodeType=this.nodes[this.spec.topNode||"doc"],this.cached.wrappings=Object.create(null)}node(e,t=null,r,i){if(typeof e=="string")e=this.nodeType(e);else if(e instanceof Nr){if(e.schema!=this)throw new RangeError("Node type from different schema used ("+e.name+")")}else throw new RangeError("Invalid node type: "+e);return e.createChecked(t,r,i)}text(e,t){let r=this.nodes.text;return new zt(r,r.defaultAttrs,e,P.setFrom(t))}mark(e,t){return typeof e=="string"&&(e=this.marks[e]),e.create(t)}nodeFromJSON(e){return Be.fromJSON(this,e)}markFromJSON(e){return P.fromJSON(this,e)}nodeType(e){let t=this.nodes[e];if(!t)throw new RangeError("Unknown node type: "+e);return t}}function Dr(n,e){let t=[];for(let r=0;r<e.length;r++){let i=e[r],s=n.marks[i],o=s;if(s)t.push(s);else for(let l in n.marks){let a=n.marks[l];(i=="_"||a.spec.group&&a.spec.group.split(" ").indexOf(i)>-1)&&t.push(o=a)}if(!o)throw new SyntaxError("Unknown mark type: '"+e[r]+"'")}return t}class et{constructor(e,t){this.schema=e,this.rules=t,this.tags=[],this.styles=[],t.forEach(r=>{r.tag?this.tags.push(r):r.style&&this.styles.push(r)}),this.normalizeLists=!this.tags.some(r=>{if(!/^(ul|ol)\b/.test(r.tag)||!r.node)return!1;let i=e.nodes[r.node];return i.contentMatch.matchType(i)})}parse(e,t={}){let r=new Ir(this,t,!1);return r.addAll(e,t.from,t.to),r.finish()}parseSlice(e,t={}){let r=new Ir(this,t,!0);return r.addAll(e,t.from,t.to),S.maxOpen(r.finish())}matchTag(e,t,r){for(let i=r?this.tags.indexOf(r)+1:0;i<this.tags.length;i++){let s=this.tags[i];if(da(e,s.tag)&&(s.namespace===void 0||e.namespaceURI==s.namespace)&&(!s.context||t.matchesContext(s.context))){if(s.getAttrs){let o=s.getAttrs(e);if(o===!1)continue;s.attrs=o||void 0}return s}}}matchStyle(e,t,r,i){for(let s=i?this.styles.indexOf(i)+1:0;s<this.styles.length;s++){let o=this.styles[s],l=o.style;if(!(l.indexOf(e)!=0||o.context&&!r.matchesContext(o.context)||l.length>e.length&&(l.charCodeAt(e.length)!=61||l.slice(e.length+1)!=t))){if(o.getAttrs){let a=o.getAttrs(t);if(a===!1)continue;o.attrs=a||void 0}return o}}}static schemaRules(e){let t=[];function r(i){let s=i.priority==null?50:i.priority,o=0;for(;o<t.length;o++){let l=t[o];if((l.priority==null?50:l.priority)<s)break}t.splice(o,0,i)}for(let i in e.marks){let s=e.marks[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Pr(o)),o.mark||o.ignore||o.clearMark||(o.mark=i)})}for(let i in e.nodes){let s=e.nodes[i].spec.parseDOM;s&&s.forEach(o=>{r(o=Pr(o)),o.node||o.ignore||o.mark||(o.node=i)})}return t}static fromSchema(e){return e.cached.domParser||(e.cached.domParser=new et(e,et.schemaRules(e)))}}const Ss={address:!0,article:!0,aside:!0,blockquote:!0,canvas:!0,dd:!0,div:!0,dl:!0,fieldset:!0,figcaption:!0,figure:!0,footer:!0,form:!0,h1:!0,h2:!0,h3:!0,h4:!0,h5:!0,h6:!0,header:!0,hgroup:!0,hr:!0,li:!0,noscript:!0,ol:!0,output:!0,p:!0,pre:!0,section:!0,table:!0,tfoot:!0,ul:!0},aa={head:!0,noscript:!0,object:!0,script:!0,style:!0,title:!0},Cs={ol:!0,ul:!0},jt=1,Ht=2,gt=4;function Ar(n,e,t){return e!=null?(e?jt:0)|(e==="full"?Ht:0):n&&n.whitespace=="pre"?jt|Ht:t&~gt}class At{constructor(e,t,r,i,s,o,l){this.type=e,this.attrs=t,this.marks=r,this.pendingMarks=i,this.solid=s,this.options=l,this.content=[],this.activeMarks=P.none,this.stashMarks=[],this.match=o||(l&gt?null:e.contentMatch)}findWrapping(e){if(!this.match){if(!this.type)return[];let t=this.type.contentMatch.fillBefore(k.from(e));if(t)this.match=this.type.contentMatch.matchFragment(t);else{let r=this.type.contentMatch,i;return(i=r.findWrapping(e.type))?(this.match=r,i):null}}return this.match.findWrapping(e.type)}finish(e){if(!(this.options&jt)){let r=this.content[this.content.length-1],i;if(r&&r.isText&&(i=/[ \t\r\n\u000c]+$/.exec(r.text))){let s=r;r.text.length==i[0].length?this.content.pop():this.content[this.content.length-1]=s.withText(s.text.slice(0,s.text.length-i[0].length))}}let t=k.from(this.content);return!e&&this.match&&(t=t.append(this.match.fillBefore(k.empty,!0))),this.type?this.type.create(this.attrs,t,this.marks):t}popFromStashMark(e){for(let t=this.stashMarks.length-1;t>=0;t--)if(e.eq(this.stashMarks[t]))return this.stashMarks.splice(t,1)[0]}applyPending(e){for(let t=0,r=this.pendingMarks;t<r.length;t++){let i=r[t];(this.type?this.type.allowsMarkType(i.type):fa(i.type,e))&&!i.isInSet(this.activeMarks)&&(this.activeMarks=i.addToSet(this.activeMarks),this.pendingMarks=i.removeFromSet(this.pendingMarks))}}inlineContext(e){return this.type?this.type.inlineContent:this.content.length?this.content[0].isInline:e.parentNode&&!Ss.hasOwnProperty(e.parentNode.nodeName.toLowerCase())}}class Ir{constructor(e,t,r){this.parser=e,this.options=t,this.isOpen=r,this.open=0;let i=t.topNode,s,o=Ar(null,t.preserveWhitespace,0)|(r?gt:0);i?s=new At(i.type,i.attrs,P.none,P.none,!0,t.topMatch||i.type.contentMatch,o):r?s=new At(null,null,P.none,P.none,!0,null,o):s=new At(e.schema.topNodeType,null,P.none,P.none,!0,null,o),this.nodes=[s],this.find=t.findPositions,this.needsBlock=!1}get top(){return this.nodes[this.open]}addDOM(e){if(e.nodeType==3)this.addTextNode(e);else if(e.nodeType==1){let t=e.getAttribute("style");if(!t)this.addElement(e);else{let r=this.readStyles(ua(t));if(!r)return;let[i,s]=r,o=this.top;for(let l=0;l<s.length;l++)this.removePendingMark(s[l],o);for(let l=0;l<i.length;l++)this.addPendingMark(i[l]);this.addElement(e);for(let l=0;l<i.length;l++)this.removePendingMark(i[l],o);for(let l=0;l<s.length;l++)this.addPendingMark(s[l])}}}addTextNode(e){let t=e.nodeValue,r=this.top;if(r.options&Ht||r.inlineContext(e)||/[^ \t\r\n\u000c]/.test(t)){if(r.options&jt)r.options&Ht?t=t.replace(/\r\n?/g,`
4
4
  `):t=t.replace(/\r?\n|\r/g," ");else if(t=t.replace(/[ \t\r\n\u000c]+/g," "),/^[ \t\r\n\u000c]/.test(t)&&this.open==this.nodes.length-1){let i=r.content[r.content.length-1],s=e.previousSibling;(!i||s&&s.nodeName=="BR"||i.isText&&/[ \t\r\n\u000c]$/.test(i.text))&&(t=t.slice(1))}t&&this.insertNode(this.parser.schema.text(t)),this.findInText(e)}else this.findInside(e)}addElement(e,t){let r=e.nodeName.toLowerCase(),i;Cs.hasOwnProperty(r)&&this.parser.normalizeLists&&ca(e);let s=this.options.ruleFromNode&&this.options.ruleFromNode(e)||(i=this.parser.matchTag(e,this,t));if(s?s.ignore:aa.hasOwnProperty(r))this.findInside(e),this.ignoreFallback(e);else if(!s||s.skip||s.closeParent){s&&s.closeParent?this.open=Math.max(0,this.open-1):s&&s.skip.nodeType&&(e=s.skip);let o,l=this.top,a=this.needsBlock;if(Ss.hasOwnProperty(r))l.content.length&&l.content[0].isInline&&this.open&&(this.open--,l=this.top),o=!0,l.type||(this.needsBlock=!0);else if(!e.firstChild){this.leafFallback(e);return}this.addAll(e),o&&this.sync(l),this.needsBlock=a}else this.addElementByRule(e,s,s.consuming===!1?i:void 0)}leafFallback(e){e.nodeName=="BR"&&this.top.type&&this.top.type.inlineContent&&this.addTextNode(e.ownerDocument.createTextNode(`
@@ -90,4 +90,4 @@ img.ProseMirror-separator {
90
90
 
91
91
  `);return!s||!o?!1:n.chain().command(({tr:l})=>(l.delete(r.pos-2,r.pos),!0)).exitCode().run()},ArrowDown:({editor:n})=>{if(!this.options.exitOnArrowDown)return!1;const{state:e}=n,{selection:t,doc:r}=e,{$from:i,empty:s}=t;if(!s||i.parent.type!==this.type||!(i.parentOffset===i.parent.nodeSize-2))return!1;const l=i.after();return l===void 0||r.nodeAt(l)?!1:n.commands.exitCode()}}},addInputRules(){return[Ai({find:Uf,type:this.type,getAttributes:n=>({language:n[1]})}),Ai({find:Gf,type:this.type,getAttributes:n=>({language:n[1]})})]},addProseMirrorPlugins(){return[new Y({key:new Q("codeBlockVSCodeHandler"),props:{handlePaste:(n,e)=>{if(!e.clipboardData||this.editor.isActive(this.type.name))return!1;const t=e.clipboardData.getData("text/plain"),r=e.clipboardData.getData("vscode-editor-data"),i=r?JSON.parse(r):void 0,s=i==null?void 0:i.mode;if(!t||!s)return!1;const{tr:o}=n.state;return o.replaceSelectionWith(this.type.create({language:s})),o.setSelection(D.near(o.doc.resolve(Math.max(0,o.selection.from-2)))),o.insertText(t.replace(/\r\n?/g,`
92
92
  `)),o.setMeta("paste",!0),n.dispatch(o),!0}}})]}}),Xf=he.create({name:"doc",topNode:!0,content:"block+"}),Zf=he.create({name:"hardBreak",addOptions(){return{keepMarks:!0,HTMLAttributes:{}}},inline:!0,group:"inline",selectable:!1,parseHTML(){return[{tag:"br"}]},renderHTML({HTMLAttributes:n}){return["br",Te(this.options.HTMLAttributes,n)]},renderText(){return`
93
- `},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:s}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&o){const u=a.filter(h=>l.includes(h.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Qf=he.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Te(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),eh=re.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Y({key:new Q("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!t)return null;const s=n.type.createAndFill(),o=(s==null?void 0:s.sameMarkup(n))&&s.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const c=r>=a&&r<=a+l.nodeSize,d=!l.isLeaf&&!l.childCount;if((c||!this.options.showOnlyCurrent)&&d){const u=[this.options.emptyNodeClass];o&&u.push(this.options.emptyEditorClass);const h=Z.node(a,a+l.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),B.create(n,i)}}})]}}),th=he.create({name:"text",group:"inline"}),nh={name:"EmojiComponent",components:{NodeViewWrapper:Po,DtEmoji:C.DtEmoji},props:_o};function rh(n,e,t,r,i,s){const o=f.resolveComponent("dt-emoji"),l=f.resolveComponent("node-view-wrapper");return f.openBlock(),f.createBlock(l,{class:"d-d-inline-block"},{default:f.withCtx(()=>[f.createVNode(o,{size:"300",code:n.node.attrs.code},null,8,["code"])]),_:1})}const ih=C._export_sfc(nh,[["render",rh]]);function sh(n){var e;const{char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:o}=n,l=Hf(t),a=new RegExp(`\\s${l}$`),c=s?"^":"",d=r?new RegExp(`${c}${l}.*?(?=\\s${l}|$)`,"gm"):new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`,"gm"),u=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!u)return null;const h=o.pos-u.length,p=Array.from(u.matchAll(d)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const m=p.input.slice(Math.max(0,p.index-1),p.index),g=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(m);if(i!==null&&!g)return null;const y=h+p.index;let b=y+p[0].length;return r&&a.test(u.slice(b-1,b+1))&&(p[0]+=" ",b+=1),y<o.pos&&b>=o.pos?{range:{from:y,to:b},query:p[0].slice(t.length),text:p[0]}:null}const oh=new Q("suggestion");function Bo({pluginKey:n=oh,editor:e,char:t="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:o="span",decorationClass:l="suggestion",command:a=()=>null,items:c=()=>[],render:d=()=>({}),allow:u=()=>!0}){let h;const p=d==null?void 0:d(),m=new Y({key:n,view(){return{update:async(g,y)=>{var b,E,O,I,N,A,_;const x=(b=this.key)===null||b===void 0?void 0:b.getState(y),R=(E=this.key)===null||E===void 0?void 0:E.getState(g.state),le=x.active&&R.active&&x.range.from!==R.range.from,Tt=!x.active&&R.active,wr=x.active&&!R.active,zo=!Tt&&!wr&&x.query!==R.query,lt=Tt||le,Nt=zo&&!le,dn=wr||le;if(!lt&&!Nt&&!dn)return;const qe=dn&&!lt?x:R,Er=g.dom.querySelector(`[data-decoration-id="${qe.decorationId}"]`);h={editor:e,range:qe.range,query:qe.query,text:qe.text,items:[],command:at=>{a({editor:e,range:qe.range,props:at})},decorationNode:Er,clientRect:Er?()=>{var at;const{decorationId:jo}=(at=this.key)===null||at===void 0?void 0:at.getState(e.state),un=g.dom.querySelector(`[data-decoration-id="${jo}"]`);return(un==null?void 0:un.getBoundingClientRect())||null}:null},lt&&((O=p==null?void 0:p.onBeforeStart)===null||O===void 0||O.call(p,h)),Nt&&((I=p==null?void 0:p.onBeforeUpdate)===null||I===void 0||I.call(p,h)),(Nt||lt)&&(h.items=await c({editor:e,query:qe.query})),dn&&((N=p==null?void 0:p.onExit)===null||N===void 0||N.call(p,h)),Nt&&((A=p==null?void 0:p.onUpdate)===null||A===void 0||A.call(p,h)),lt&&((_=p==null?void 0:p.onStart)===null||_===void 0||_.call(p,h))},destroy:()=>{var g;h&&((g=p==null?void 0:p.onExit)===null||g===void 0||g.call(p,h))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(g,y,b,E){const{isEditable:O}=e,{composing:I}=e.view,{selection:N}=g,{empty:A,from:_}=N,x={...y};if(x.composing=I,O&&(A||e.view.composing)){(_<y.range.from||_>y.range.to)&&!I&&!y.composing&&(x.active=!1);const R=sh({char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:N.$from}),le=`id_${Math.floor(Math.random()*4294967295)}`;R&&u({editor:e,state:E,range:R.range})?(x.active=!0,x.decorationId=y.decorationId?y.decorationId:le,x.range=R.range,x.query=R.query,x.text=R.text):x.active=!1}else x.active=!1;return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(g,y){var b;const{active:E,range:O}=m.getState(g.state);return E&&((b=p==null?void 0:p.onKeyDown)===null||b===void 0?void 0:b.call(p,{view:g,event:y,range:O}))||!1},decorations(g){const{active:y,range:b,decorationId:E}=m.getState(g);return y?B.create(g.doc,[Z.inline(b.from,b.to,{nodeName:o,class:l,"data-decoration-id":E})]):null}}});return m}const lh={name:"SuggestionList",components:{DtListItem:Yi},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:n}){return n.key==="ArrowUp"?(this.upHandler(),!0):n.key==="ArrowDown"?(this.downHandler(),!0):n.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(n){const e=this.items[n];switch(this.itemType){case"emoji":this.command({code:e});return;case"mention":this.command({name:e.name,contactId:e.contactId,avatarSrc:e.avatarSrc});break}}}},ah={class:"d-popover__dialog"},ch={class:"dt-suggestion-list"};function dh(n,e,t,r,i,s){const o=f.resolveComponent("dt-list-item");return f.openBlock(),f.createElementBlock("div",ah,[f.withDirectives(f.createElementVNode("ul",ch,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.items,(l,a)=>(f.openBlock(),f.createBlock(o,{key:a,class:f.normalizeClass(["dt-suggestion-list--item",{"is-selected dt-list-item--highlighted":a===i.selectedIndex}]),"navigation-type":"arrow-keys",onClick:c=>s.selectItem(a),onKeydown:f.withModifiers(s.onKeyDown,["prevent","stop"])},{default:f.withCtx(()=>[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.itemComponent),{item:l},null,8,["item"]))]),_:2},1032,["class","onClick","onKeydown"]))),128))],512),[[f.vShow,t.items.length]])])}const Lo=C._export_sfc(lh,[["render",dh]]),uh={name:"EmojiSuggestion",components:{DtEmoji:C.DtEmoji,DtStack:sr},props:{item:{type:String,required:!0}}};function fh(n,e,t,r,i,s){const o=f.resolveComponent("dt-emoji"),l=f.resolveComponent("dt-stack");return f.openBlock(),f.createBlock(l,{direction:"row",gap:"400"},{default:f.withCtx(()=>[f.createVNode(o,{size:"200",code:t.item},null,8,["code"]),f.createTextVNode(" "+f.toDisplayString(t.item),1)]),_:1})}const hh=C._export_sfc(uh,[["render",fh]]),ph={items:({query:n})=>n.length<2?[]:Object.values(C.emojisIndexed).filter(function(r){return!!r.shortname.substring(1,r.shortname.length-1).startsWith(n.toLowerCase())}).map(r=>r.shortname),command:({editor:n,range:e,props:t})=>{var s,o;const r=n.view.state.selection.$to.nodeAfter;((s=r==null?void 0:r.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:"emoji",attrs:t},{type:"text",text:" "}]).run(),(o=window.getSelection())==null||o.collapseToEnd()},render:()=>{let n,e;return{onStart:t=>{n=new xr(Lo,{props:{itemComponent:f.markRaw(hh),itemType:"emoji",...t},editor:t.editor}),t.clientRect&&(e=C.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",contentElement:null,zIndex:650}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}},mh=new Q("emoji"),gh=/:\w+:$/,yh=/:\w+:/g,bh=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/,kh=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g,_i=n=>{if(n&&C.codeToEmojiData(n[0]))return{index:n.index,text:n[0],match:n}},Sh=n=>[...n.matchAll(yh)].filter(t=>C.codeToEmojiData(t[0])).map(t=>({index:t.index,text:t[0],match:t})),Ch=he.create({addOptions(){return{HTMLAttributes:{},suggestion:{char:":",pluginKey:mh}}},name:"emoji",group:"inline",inline:!0,selectable:!0,addNodeView(){return Ro(ih)},addAttributes(){return{code:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:n}){return n.attrs.code},renderHTML({HTMLAttributes:n}){return["emoji-component",Te(this.options.HTMLAttributes,n),0]},addInputRules(){return[Di({find:n=>{const e=n.match(gh);return _i(e)},type:this.type,getAttributes(n){return{code:n[0]}}}),Di({find:n=>{const e=n.match(bh);return _i(e)},type:this.type,getAttributes(n){const e=C.shortcodeToEmojiData(n[0]).unicode_output;return{code:String.fromCodePoint(parseInt(e,16)),label:"emoji"}}})]},addPasteRules(){return[Ii({find:Sh,type:this.type,getAttributes(n){return{code:n[0]}}}),Ii({find:kh,type:this.type,getAttributes(n){return{code:n[0]}}})]},addProseMirrorPlugins(){return[Bo({editor:this.editor,...this.options.suggestion,...ph})]}});function xh(n,e,t=()=>!0){const r=[];e.lastIndex=0;let i;for(;i=e.exec(n);)t(n,i)&&r.push(i);return r}function wh(n,e){return!["#","@"].includes(n.charAt(e.index))&&!["#","@"].includes(n.charAt(e.index-1))}function Eh(n){const e=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return n.replace(e,"")}function vh(n,e){const t=n.slice(0,e+1).search(/\S+\s*$/),r=n.slice(e).search(/\s/);if(r<0){const i=n.slice(t);return{text:i,from:t,to:t+i.length}}return{text:n.slice(t,r+e),from:t,to:r+e}}function nr(n,e,t,r){const i=vh(n,e);if(r.lastIndex=0,!r.test(i.text))return i;const s=t==="left"?i.from-1:i.to+1;return s<=0||s>=n.length||s===e?i:nr(n,s,t,r)}function Oh(n,e,t,r){const i=Math.max(n.from-1,0),s=Math.min(n.to+1,e.content.size),o=af(i,s,e);for(const l of o)l.mark.type===r&&t.removeMark(l.from,l.to,r)}const Ri=C.getPhoneNumberRegex(1,15);function Bi(n,e,t,r,i,s){if(!n)return;let o=t-e-1;o=o<0?0:o;const l=r-e,a=nr(n,o,"left",Ri),c=nr(n,l,"right",Ri),d=n.slice(a.from,c.to);xh(d,C.linkRegex,wh).forEach(h=>{const p=Eh(h[0]),m=e+a.from+h.index+1,g=m+p.length;i.addMark(m,g,s.create())})}function Mh(n){let e=!1;return new Y({key:new Q("autolink"),appendTransaction:(t,r,i)=>{const s=t.some(d=>d.docChanged)&&!r.doc.eq(i.doc);if(e&&!s)return;const{tr:o}=i,{textContent:l}=i.doc;e||Bi(l,0,0,l.length,o,n.type),e=!0;const a=Yu(r.doc,[...t]);return lf(a).forEach(({oldRange:d,newRange:u})=>{Oh(u,i.doc,o,n.type),Zu(i.doc,u,p=>p.isTextblock).forEach(({node:p,pos:m})=>{Bi(p.textContent,m,d.from,u.to,o,n.type)})}),o}})}const Th={class:"d-link d-c-text d-d-inline-block",rel:"noopener noreferrer nofollow"},Nh=Ot.create({name:"Link",renderHTML({HTMLAttributes:n}){return["a",Te(this.options.HTMLAttributes,n,Th),0]},renderText({node:n}){return n.attrs.text},addProseMirrorPlugins(){return[Mh({type:this.type})]}}),Dh=new Q("mention"),Ah=he.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:n,node:e}){var t;return`${n.suggestion.char}${(t=e.attrs.label)!==null&&t!==void 0?t:e.attrs.id}`},suggestion:{char:"@",pluginKey:Dh,command:({editor:n,range:e,props:t})=>{var r,i;const s=n.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:this.name,attrs:t},{type:"text",text:" "}]).run(),(i=window.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:n,range:e})=>{const t=n.doc.resolve(e.from),r=n.schema.nodes[this.name];return!!t.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:e}){return["span",Te({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:n})]},renderText({node:n}){return this.options.renderLabel({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:e})=>{let t=!1;const{selection:r}=e,{empty:i,anchor:s}=r;return i?(e.doc.nodesBetween(s-1,s,(o,l)=>{if(o.type.name===this.name)return t=!0,n.insertText(this.options.suggestion.char||"",l,l+o.nodeSize),!1}),t):!1})}},addProseMirrorPlugins(){return[Bo({editor:this.editor,...this.options.suggestion})]}});const Ih={name:"MentionComponent",components:{NodeViewWrapper:Po,DtLink:Gi},props:_o,computed:{text(){return"@"+this.$props.node.attrs.name}}};function Ph(n,e,t,r,i,s){const o=f.resolveComponent("dt-link"),l=f.resolveComponent("node-view-wrapper");return f.openBlock(),f.createBlock(l,{class:"d-d-inline-block"},{default:f.withCtx(()=>[f.createVNode(o,{kind:"inverted",class:"dt-link--mention",href:null},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(s.text),1)]),_:1})]),_:1})}const _h=C._export_sfc(Ih,[["render",Ph]]),Rh=Ah.extend({addNodeView(){return Ro(_h)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},contactId:{default:""}}},renderText({node:n}){return"@ "+n.attrs.name},renderHTML({HTMLAttributes:n}){return["mention-component",Te(this.options.HTMLAttributes,n),0]}}),Fo=["text","json","html"],Vo=["start","end","all"],Bh={name:"MentionSuggestion",components:{DtAvatar:$i,DtStack:sr},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc}}};function Lh(n,e,t,r,i,s){const o=f.resolveComponent("dt-avatar"),l=f.resolveComponent("dt-stack");return f.openBlock(),f.createBlock(l,{direction:"row",gap:"400"},{default:f.withCtx(()=>[f.createVNode(o,{"full-name":s.name,"image-src":s.avatarSrc,size:"xs"},null,8,["full-name","image-src"]),f.createTextVNode(" "+f.toDisplayString(s.name),1)]),_:1})}const Fh=C._export_sfc(Bh,[["render",Lh]]),Vh={render:()=>{let n,e;return{onStart:t=>{n=new xr(Lo,{props:{itemComponent:f.markRaw(Fh),itemType:"mention",...t},editor:t.editor}),t.clientRect&&(e=C.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}};const zh={name:"DtRichTextEditor",components:{EditorContent:Wf},props:{modelValue:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(n){return typeof n=="string"?Vo.includes(n):!0}},outputFormat:{type:String,default:"text",validator(n){return Fo.includes(n)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null}},emits:["input","update:modelValue","blur","focus"],data(){return{editor:null,popoverOpened:!1}},computed:{extensions(){const n=[Yf,Xf,Qf,th];if(this.link&&n.push(this.getExtension(Nh,this.link)),n.push(eh.configure({placeholder:this.placeholder})),n.push(Zf.extend({addKeyboardShortcuts(){return{Enter:()=>!0,"Shift-Enter":()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])}}})),this.mentionSuggestion){const e={...this.mentionSuggestion,...Vh};n.push(Rh.configure({suggestion:e}))}return n.push(Ch),n},inputAttrs(){const n={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(n["aria-readonly"]=!0),n}},watch:{editable(n){this.editor.setEditable(n),this.updateEditorAttributes({"aria-readonly":!n})},inputClass(n){this.updateEditorAttributes({class:n})},inputAriaLabel(n){this.updateEditorAttributes({"aria-label":n})},extensions(){this.destroyEditor(),this.createEditor()},modelValue(n){let e=this.getOutput();this.outputFormat==="json"&&(n=JSON.stringify(n),e=JSON.stringify(e)),n!==e&&this.editor.commands.setContent(n,!1)}},created(){this.createEditor()},beforeUnmount(){this.destroyEditor()},methods:{createEditor(){this.editor=new Kf({autofocus:this.autoFocus,content:this.modelValue,editable:this.editable,extensions:this.extensions,editorProps:{attributes:{...this.inputAttrs,class:this.inputClass}}}),this.addEditorListeners()},destroyEditor(){this.editor.destroy()},addEditorListeners(){this.editor.on("update",()=>{const n=this.getOutput();this.$emit("input",n),this.$emit("update:modelValue",n)}),this.editor.on("focus",({event:n})=>{this.$emit("focus",n)}),this.editor.on("blur",({event:n})=>{this.$emit("blur",n)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"text":default:return this.editor.getText()}},getExtension(n,e){var t;return typeof e=="boolean"?n:(t=n.configure)==null?void 0:t.call(n,e)},updateEditorAttributes(n){this.editor.setOptions({editorProps:{attributes:n}})},focusEditor(){this.editor.commands.focus()}}};function jh(n,e,t,r,i,s){const o=f.resolveComponent("editor-content");return f.openBlock(),f.createBlock(o,{editor:i.editor,"data-qa":"dt-rich-text-editor"},null,8,["editor"])}const Hh=C._export_sfc(zh,[["render",jh]]);const $h={name:"DtRecipeMessageInput",components:{DtButton:C.DtButton,DtEmojiPicker:C._sfc_main,DtIcon:C.DtIcon,DtInput:C.DtInput,DtNotice:rs,DtPopover:ns,DtRichTextEditor:Hh,DtTooltip:C.DtTooltip},mixins:[],inheritAttrs:!1,props:{modelValue:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(n){return typeof n=="string"?Vo.includes(n):!0}},outputFormat:{type:String,default:"text",validator(n){return Fo.includes(n)}},link:{type:[Boolean,Object],default:!1},placeholder:{type:String,default:""},disableSend:{type:Boolean,default:!1},hasCharacterLimit:{type:Boolean,default:!0},characterLimitCount:{type:Number,default:1500},characterLimitWarning:{type:Number,default:500},showNotice:{type:Boolean,default:!1},noticeMessage:{type:String,default:""},noticeKind:{type:String,default:"error",validate(n){return Gt.includes(n)}},emojiTabSetLabels:{type:Array,default:()=>["Most recently used","Smileys and people","Nature","Food","Activity","Travel","Objects","Symbols","Flags"]},emojiSkinSelectorButtonTooltipLabel:{type:String,default:"Change default skin tone"},emojiSearchNoResultsLabel:{type:String,default:"No results"},emojiSearchResultsLabel:{type:String,default:"Search results"},emojiSearchPlaceholderLabel:{type:String,default:"Search..."},emojiTooltipMessage:{type:String,default:"Emoji"},emojiButtonAriaLabel:{type:String,default:"emoji button"},imageButtonAriaLabel:{type:String,default:"image button"},imageTooltipLabel:{type:String,default:"Attach Image"},sendButtonAriaLabel:{type:String,default:"send button"},sendTooltipLabel:{type:String,default:"Send"}},emits:["submit","select-media","add-media","notice-close"],data(){return{skinTone:"Default",internalInputValue:this.modelValue,hasFocus:!1,imagePickerFocus:!1,emojiPickerFocus:!1,sendButtonFocus:!1,emojiPickerOpened:!1}},computed:{inputLength(){return this.internalInputValue.length},displayCharacterLimitWarning(){return this.hasCharacterLimit&&this.characterLimitCount-this.inputLength<=this.characterLimitWarning},isSendDisabled(){return this.inputLength===0||this.disableSend||this.hasCharacterLimit&&this.inputLength>this.characterLimitCount},computedCloseButtonProps(){return{ariaLabel:"Close"}},noticeClasses(){return["dt-message-input-notice","d-ps-relative","d-t8","d-bbr0","d-pt4","d-pb8","d-pr12","d-pl16","d-bs-none","d-fs-100","d-wmx-unset"]},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened}},watch:{modelValue(n){this.internalInputValue=n}},methods:{onDrag(n){n.stopPropagation(),n.preventDefault()},onDrop(n){n.stopPropagation(),n.preventDefault();const e=n.dataTransfer,r=Array.from(e.files).map(i=>i.name);this.$emit("add-media",r)},onSelectEmoji(n){if(!n){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:n.shortname}}),this.emojiPickerOpened=!1},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(n){this.$emit("select-media",n)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},noticeClose(){this.$emit("notice-close",!0)},focus(){this.$refs.richTextEditor.focusEditor(),this.hasFocus=!0}}},qh={class:"d-ps-relative d-bar8 d-bgc-white"},Kh={class:"d-of-auto d-mx16 d-mt8 d-mb4 d-hmx40p"},Wh={class:"d-d-flex d-jc-space-between d-mx8 d-my4"},Jh={class:"d-d-flex"},Uh={class:"d-d-flex"},Gh={key:0,class:"d-fc-error d-mr16 d-as-center dt-message-input--remaining-char","data-qa":"dt-message-input-character-limit"},Yh={class:"d-d-flex d-jc-space-between d-h24 d-ai-center"},Xh={"data-qa":"dt-message-input-footer-left"},Zh={"data-qa":"dt-message-input-footer-right"};function Qh(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-notice"),a=f.resolveComponent("dt-rich-text-editor"),c=f.resolveComponent("dt-button"),d=f.resolveComponent("dt-input"),u=f.resolveComponent("dt-tooltip"),h=f.resolveComponent("dt-emoji-picker"),p=f.resolveComponent("dt-popover");return f.openBlock(),f.createElementBlock(f.Fragment,null,[t.showNotice?(f.openBlock(),f.createBlock(l,{key:0,"data-qa":"dt-message-input-error-notice",class:f.normalizeClass(s.noticeClasses),kind:t.noticeKind,"close-button-props":s.computedCloseButtonProps,onClose:s.noticeClose},{icon:f.withCtx(()=>[f.createVNode(o,{size:"300",name:"alert-circle"})]),default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(t.noticeMessage)+" ",1)]),_:1},8,["class","kind","close-button-props","onClose"])):f.createCommentVNode("",!0),f.createElementVNode("div",qh,[f.createElementVNode("div",{"data-qa":"dt-message-input",role:"presentation",class:f.normalizeClass(["d-d-flex d-fd-column d-bar8 d-baw1 d-ba d-c-text",{"d-bc-black-500 d-bs-sm":i.hasFocus,"d-bc-default":!i.hasFocus}]),onClick:e[17]||(e[17]=m=>n.$refs.richTextEditor.focusEditor()),onDragEnter:e[18]||(e[18]=(...m)=>s.onDrag&&s.onDrag(...m)),onDragOver:e[19]||(e[19]=(...m)=>s.onDrag&&s.onDrag(...m)),onDrop:e[20]||(e[20]=(...m)=>s.onDrop&&s.onDrop(...m)),onKeydown:e[21]||(e[21]=f.withKeys(f.withModifiers((...m)=>s.onSend&&s.onSend(...m),["exact"]),["enter"])),onFocusin:e[22]||(e[22]=m=>i.hasFocus=!0),onFocusout:e[23]||(e[23]=m=>i.hasFocus=!1)},[f.createElementVNode("div",Kh,[f.createVNode(a,f.mergeProps({ref:"richTextEditor",modelValue:i.internalInputValue,"onUpdate:modelValue":e[0]||(e[0]=m=>i.internalInputValue=m),editable:t.editable,"input-aria-label":t.inputAriaLabel,"input-class":t.inputClass,"output-format":t.outputFormat,"auto-focus":t.autoFocus,link:t.link,placeholder:t.placeholder},n.$attrs,{onFocus:e[1]||(e[1]=m=>i.hasFocus=!0),onBlur:e[2]||(e[2]=m=>i.hasFocus=!1)}),null,16,["modelValue","editable","input-aria-label","input-class","output-format","auto-focus","link","placeholder"])]),f.renderSlot(n.$slots,"middle"),f.createElementVNode("section",Wh,[f.createElementVNode("div",Jh,[f.createVNode(u,{placement:"top-start",message:t.imageTooltipLabel,offset:[-4,-4]},{anchor:f.withCtx(()=>[f.createVNode(c,{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:i.imagePickerFocus?"default":"muted",importance:"clear","aria-label":t.imageButtonAriaLabel,onClick:s.onSelectImage,onMouseenter:e[3]||(e[3]=m=>i.imagePickerFocus=!0),onMouseleave:e[4]||(e[4]=m=>i.imagePickerFocus=!1),onFocusin:e[5]||(e[5]=m=>i.imagePickerFocus=!0),onFocusout:e[6]||(e[6]=m=>i.imagePickerFocus=!1)},{icon:f.withCtx(()=>[f.createVNode(o,{name:"image",size:"300"})]),_:1},8,["kind","aria-label","onClick"]),f.createVNode(d,{ref:"messageInputImageUpload","data-qa":"dt-message-input-image-input",type:"file",class:"d-ps-absolute",multiple:"",hidden:"",onInput:s.onImageUpload},null,8,["onInput"])]),_:1},8,["message"]),f.createVNode(p,{"data-qa":"dt-message-input-emoji-picker-popover",open:i.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none",onOpened:e[12]||(e[12]=m=>{i.emojiPickerOpened=m})},{anchor:f.withCtx(()=>[f.createVNode(u,{message:t.emojiTooltipMessage,offset:[0,-4]},{anchor:f.withCtx(()=>[f.createVNode(c,{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:s.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":t.emojiButtonAriaLabel,offset:[0,0],onClick:s.toggleEmojiPicker,onMouseenter:e[7]||(e[7]=m=>i.emojiPickerFocus=!0),onMouseleave:e[8]||(e[8]=m=>i.emojiPickerFocus=!1),onFocusin:e[9]||(e[9]=m=>i.emojiPickerFocus=!0),onFocusout:e[10]||(e[10]=m=>i.emojiPickerFocus=!1)},{icon:f.withCtx(()=>[f.createVNode(o,{name:s.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"},null,8,["name"])]),_:1},8,["kind","aria-label","onClick"])]),_:1},8,["message"])]),content:f.withCtx(()=>[f.createVNode(h,{"tab-set-labels":t.emojiTabSetLabels,"skin-selector-button-tooltip-label":t.emojiSkinSelectorButtonTooltipLabel,"search-no-results-label":t.emojiSearchNoResultsLabel,"search-results-label":t.emojiSearchResultsLabel,"search-placeholder-label":t.emojiSearchPlaceholderLabel,"skin-tone":i.skinTone,onSkinTone:e[11]||(e[11]=m=>i.skinTone=m),onSelectedEmoji:s.onSelectEmoji},null,8,["tab-set-labels","skin-selector-button-tooltip-label","search-no-results-label","search-results-label","search-placeholder-label","skin-tone","onSelectedEmoji"])]),_:1},8,["open"])]),f.createElementVNode("div",Uh,[s.displayCharacterLimitWarning?(f.openBlock(),f.createElementBlock("p",Gh,f.toDisplayString(t.characterLimitCount-s.inputLength),1)):f.createCommentVNode("",!0),f.createVNode(u,{placement:"top-end",message:t.sendTooltipLabel,show:!s.isSendDisabled&&i.sendButtonFocus,offset:[6,-4]},{anchor:f.withCtx(()=>[f.createVNode(c,{"data-qa":"dt-message-input-send-btn",size:"sm",kind:s.isSendDisabled?"muted":"default",circle:"",importance:"primary",class:f.normalizeClass({"message-input-button__disabled d-fc-muted":s.isSendDisabled}),"aria-label":t.sendButtonAriaLabel,"aria-disabled":s.isSendDisabled,onClick:s.onSend,onMouseenter:e[13]||(e[13]=m=>i.sendButtonFocus=!0),onMouseleave:e[14]||(e[14]=m=>i.sendButtonFocus=!1),onFocusin:e[15]||(e[15]=m=>i.sendButtonFocus=!0),onFocusout:e[16]||(e[16]=m=>i.sendButtonFocus=!1)},{icon:f.withCtx(()=>[f.createVNode(o,{name:"send",size:"300"})]),_:1},8,["kind","class","aria-label","aria-disabled","onClick"])]),_:1},8,["message","show"])])])],34),f.createElementVNode("section",Yh,[f.createElementVNode("div",Xh,[f.renderSlot(n.$slots,"footerLeft")]),f.createElementVNode("div",Zh,[f.renderSlot(n.$slots,"footerRight")])])])],64)}const ep=C._export_sfc($h,[["render",Qh]]);exports.AVATAR_COLORS=Hi;exports.AVATAR_GROUP_VALIDATOR=Rn;exports.AVATAR_ICON_SIZES=ji;exports.AVATAR_KIND_MODIFIERS=Vi;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=zi;exports.AVATAR_PRESENCE_STATES=_n;exports.AVATAR_SIZE_MODIFIERS=Pt;exports.DtAvatar=$i;exports.DtItemLayout=Bn;exports.DtLink=Gi;exports.DtListItem=Yi;exports.DtNotice=rs;exports.DtNoticeAction=Wi;exports.DtNoticeContent=Ki;exports.DtNoticeIcon=qi;exports.DtPopover=ns;exports.DtPresence=Fi;exports.DtStack=sr;exports.LIST_ITEM_NAVIGATION_TYPES=ut;exports.Modal=Ui;exports.NOTICE_KINDS=Gt;exports.POPOVER_APPEND_TO_VALUES=ts;exports.POPOVER_CONTENT_WIDTHS=Qi;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=Xi;exports.POPOVER_INITIAL_FOCUS_STRINGS=es;exports.POPOVER_PADDING_CLASSES=Ln;exports.POPOVER_ROLES=Zi;exports.PRESENCE_STATES=Ue;exports.PRESENCE_STATES_LIST=Li;exports.SrOnlyCloseButton=rr;exports.SrOnlyCloseButtonMixin=Yt;exports.message_input=ep;
93
+ `},addCommands(){return{setHardBreak:()=>({commands:n,chain:e,state:t,editor:r})=>n.first([()=>n.exitCode(),()=>n.command(()=>{const{selection:i,storedMarks:s}=t;if(i.$from.parent.type.spec.isolating)return!1;const{keepMarks:o}=this.options,{splittableMarks:l}=r.extensionManager,a=s||i.$to.parentOffset&&i.$from.marks();return e().insertContent({type:this.name}).command(({tr:c,dispatch:d})=>{if(d&&a&&o){const u=a.filter(h=>l.includes(h.type.name));c.ensureMarks(u)}return!0}).run()})])}},addKeyboardShortcuts(){return{"Mod-Enter":()=>this.editor.commands.setHardBreak(),"Shift-Enter":()=>this.editor.commands.setHardBreak()}}}),Qf=he.create({name:"paragraph",priority:1e3,addOptions(){return{HTMLAttributes:{}}},group:"block",content:"inline*",parseHTML(){return[{tag:"p"}]},renderHTML({HTMLAttributes:n}){return["p",Te(this.options.HTMLAttributes,n),0]},addCommands(){return{setParagraph:()=>({commands:n})=>n.setNode(this.name)}},addKeyboardShortcuts(){return{"Mod-Alt-0":()=>this.editor.commands.setParagraph()}}}),eh=re.create({name:"placeholder",addOptions(){return{emptyEditorClass:"is-editor-empty",emptyNodeClass:"is-empty",placeholder:"Write something …",showOnlyWhenEditable:!0,showOnlyCurrent:!0,includeChildren:!1}},addProseMirrorPlugins(){return[new Y({key:new Q("placeholder"),props:{decorations:({doc:n,selection:e})=>{const t=this.editor.isEditable||!this.options.showOnlyWhenEditable,{anchor:r}=e,i=[];if(!t)return null;const s=n.type.createAndFill(),o=(s==null?void 0:s.sameMarkup(n))&&s.content.findDiffStart(n.content)===null;return n.descendants((l,a)=>{const c=r>=a&&r<=a+l.nodeSize,d=!l.isLeaf&&!l.childCount;if((c||!this.options.showOnlyCurrent)&&d){const u=[this.options.emptyNodeClass];o&&u.push(this.options.emptyEditorClass);const h=Z.node(a,a+l.nodeSize,{class:u.join(" "),"data-placeholder":typeof this.options.placeholder=="function"?this.options.placeholder({editor:this.editor,node:l,pos:a,hasAnchor:c}):this.options.placeholder});i.push(h)}return this.options.includeChildren}),B.create(n,i)}}})]}}),th=he.create({name:"text",group:"inline"}),nh={name:"EmojiComponent",components:{NodeViewWrapper:Po,DtEmoji:C.DtEmoji},props:_o};function rh(n,e,t,r,i,s){const o=f.resolveComponent("dt-emoji"),l=f.resolveComponent("node-view-wrapper");return f.openBlock(),f.createBlock(l,{class:"d-d-inline-block"},{default:f.withCtx(()=>[f.createVNode(o,{size:"300",code:n.node.attrs.code},null,8,["code"])]),_:1})}const ih=C._export_sfc(nh,[["render",rh]]);function sh(n){var e;const{char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:o}=n,l=Hf(t),a=new RegExp(`\\s${l}$`),c=s?"^":"",d=r?new RegExp(`${c}${l}.*?(?=\\s${l}|$)`,"gm"):new RegExp(`${c}(?:^)?${l}[^\\s${l}]*`,"gm"),u=((e=o.nodeBefore)===null||e===void 0?void 0:e.isText)&&o.nodeBefore.text;if(!u)return null;const h=o.pos-u.length,p=Array.from(u.matchAll(d)).pop();if(!p||p.input===void 0||p.index===void 0)return null;const m=p.input.slice(Math.max(0,p.index-1),p.index),g=new RegExp(`^[${i==null?void 0:i.join("")}\0]?$`).test(m);if(i!==null&&!g)return null;const y=h+p.index;let b=y+p[0].length;return r&&a.test(u.slice(b-1,b+1))&&(p[0]+=" ",b+=1),y<o.pos&&b>=o.pos?{range:{from:y,to:b},query:p[0].slice(t.length),text:p[0]}:null}const oh=new Q("suggestion");function Bo({pluginKey:n=oh,editor:e,char:t="@",allowSpaces:r=!1,allowedPrefixes:i=[" "],startOfLine:s=!1,decorationTag:o="span",decorationClass:l="suggestion",command:a=()=>null,items:c=()=>[],render:d=()=>({}),allow:u=()=>!0}){let h;const p=d==null?void 0:d(),m=new Y({key:n,view(){return{update:async(g,y)=>{var b,E,O,I,N,A,_;const x=(b=this.key)===null||b===void 0?void 0:b.getState(y),R=(E=this.key)===null||E===void 0?void 0:E.getState(g.state),le=x.active&&R.active&&x.range.from!==R.range.from,Tt=!x.active&&R.active,wr=x.active&&!R.active,zo=!Tt&&!wr&&x.query!==R.query,lt=Tt||le,Nt=zo&&!le,dn=wr||le;if(!lt&&!Nt&&!dn)return;const qe=dn&&!lt?x:R,Er=g.dom.querySelector(`[data-decoration-id="${qe.decorationId}"]`);h={editor:e,range:qe.range,query:qe.query,text:qe.text,items:[],command:at=>{a({editor:e,range:qe.range,props:at})},decorationNode:Er,clientRect:Er?()=>{var at;const{decorationId:jo}=(at=this.key)===null||at===void 0?void 0:at.getState(e.state),un=g.dom.querySelector(`[data-decoration-id="${jo}"]`);return(un==null?void 0:un.getBoundingClientRect())||null}:null},lt&&((O=p==null?void 0:p.onBeforeStart)===null||O===void 0||O.call(p,h)),Nt&&((I=p==null?void 0:p.onBeforeUpdate)===null||I===void 0||I.call(p,h)),(Nt||lt)&&(h.items=await c({editor:e,query:qe.query})),dn&&((N=p==null?void 0:p.onExit)===null||N===void 0||N.call(p,h)),Nt&&((A=p==null?void 0:p.onUpdate)===null||A===void 0||A.call(p,h)),lt&&((_=p==null?void 0:p.onStart)===null||_===void 0||_.call(p,h))},destroy:()=>{var g;h&&((g=p==null?void 0:p.onExit)===null||g===void 0||g.call(p,h))}}},state:{init(){return{active:!1,range:{from:0,to:0},query:null,text:null,composing:!1}},apply(g,y,b,E){const{isEditable:O}=e,{composing:I}=e.view,{selection:N}=g,{empty:A,from:_}=N,x={...y};if(x.composing=I,O&&(A||e.view.composing)){(_<y.range.from||_>y.range.to)&&!I&&!y.composing&&(x.active=!1);const R=sh({char:t,allowSpaces:r,allowedPrefixes:i,startOfLine:s,$position:N.$from}),le=`id_${Math.floor(Math.random()*4294967295)}`;R&&u({editor:e,state:E,range:R.range})?(x.active=!0,x.decorationId=y.decorationId?y.decorationId:le,x.range=R.range,x.query=R.query,x.text=R.text):x.active=!1}else x.active=!1;return x.active||(x.decorationId=null,x.range={from:0,to:0},x.query=null,x.text=null),x}},props:{handleKeyDown(g,y){var b;const{active:E,range:O}=m.getState(g.state);return E&&((b=p==null?void 0:p.onKeyDown)===null||b===void 0?void 0:b.call(p,{view:g,event:y,range:O}))||!1},decorations(g){const{active:y,range:b,decorationId:E}=m.getState(g);return y?B.create(g.doc,[Z.inline(b.from,b.to,{nodeName:o,class:l,"data-decoration-id":E})]):null}}});return m}const lh={name:"SuggestionList",components:{DtListItem:Yi},props:{items:{type:Array,required:!0},command:{type:Function,required:!0},itemComponent:{type:Object,required:!0},itemType:{type:String,required:!0}},data(){return{selectedIndex:0}},watch:{items(){this.selectedIndex=0}},methods:{onKeyDown({event:n}){return n.key==="ArrowUp"?(this.upHandler(),!0):n.key==="ArrowDown"?(this.downHandler(),!0):n.key==="Enter"?(this.enterHandler(),!0):!1},upHandler(){this.selectedIndex=(this.selectedIndex+this.items.length-1)%this.items.length,this.scrollActiveElementIntoView()},downHandler(){this.selectedIndex=(this.selectedIndex+1)%this.items.length,this.scrollActiveElementIntoView()},scrollActiveElementIntoView(){const n=this.$refs.suggestionList.querySelector(".dt-list-item--highlighted");n&&n.scrollIntoView({behaviour:"smooth",block:"center"})},enterHandler(){this.selectItem(this.selectedIndex)},selectItem(n){const e=this.items[n];switch(this.itemType){case"emoji":this.command(e);return;case"mention":this.command({name:e.name,id:e.contactId,avatarSrc:e.avatarSrc});break}}}},ah={class:"d-popover__dialog"},ch={ref:"suggestionList",class:"dt-suggestion-list"};function dh(n,e,t,r,i,s){const o=f.resolveComponent("dt-list-item");return f.openBlock(),f.createElementBlock("div",ah,[f.withDirectives(f.createElementVNode("ul",ch,[(f.openBlock(!0),f.createElementBlock(f.Fragment,null,f.renderList(t.items,(l,a)=>(f.openBlock(),f.createBlock(o,{key:l.id,class:f.normalizeClass(["dt-suggestion-list--item",{"dt-list-item--highlighted":a===i.selectedIndex}]),"navigation-type":"arrow-keys",onClick:c=>s.selectItem(a),onKeydown:f.withModifiers(s.onKeyDown,["prevent","stop"])},{default:f.withCtx(()=>[(f.openBlock(),f.createBlock(f.resolveDynamicComponent(t.itemComponent),{item:l},null,8,["item"]))]),_:2},1032,["class","onClick","onKeydown"]))),128))],512),[[f.vShow,t.items.length]])])}const Lo=C._export_sfc(lh,[["render",dh]]),uh={name:"EmojiSuggestion",components:{DtEmoji:C.DtEmoji,DtStack:sr},props:{item:{type:Object,required:!0}}};function fh(n,e,t,r,i,s){const o=f.resolveComponent("dt-emoji"),l=f.resolveComponent("dt-stack");return f.openBlock(),f.createBlock(l,{direction:"row",gap:"400"},{default:f.withCtx(()=>[f.createVNode(o,{size:"200",code:t.item.code},null,8,["code"]),f.createTextVNode(" "+f.toDisplayString(t.item.code),1)]),_:1})}const hh=C._export_sfc(uh,[["render",fh]]),ph={items:({query:n})=>n.length<2?[]:Object.values(C.emojisIndexed).filter(function(r){return!!r.shortname.substring(1,r.shortname.length-1).startsWith(n.toLowerCase())}).map(r=>({id:r.unicode_character,code:r.shortname})),command:({editor:n,range:e,props:t})=>{var s,o;const r=n.view.state.selection.$to.nodeAfter;((s=r==null?void 0:r.text)==null?void 0:s.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:"emoji",attrs:t},{type:"text",text:" "}]).run(),(o=window.getSelection())==null||o.collapseToEnd()},render:()=>{let n,e;return{onStart:t=>{n=new xr(Lo,{props:{itemComponent:f.markRaw(hh),itemType:"emoji",...t},editor:t.editor}),t.clientRect&&(e=C.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start",contentElement:null,zIndex:650}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}},mh=new Q("emoji"),gh=/:\w+:$/,yh=/:\w+:/g,bh=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])$/,kh=/(\u00a9|\u00ae|[\u2000-\u3300]|\ud83c[\ud000-\udfff]|\ud83d[\ud000-\udfff]|\ud83e[\ud000-\udfff])/g,_i=n=>{if(n&&C.codeToEmojiData(n[0]))return{index:n.index,text:n[0],match:n}},Sh=n=>[...n.matchAll(yh)].filter(t=>C.codeToEmojiData(t[0])).map(t=>({index:t.index,text:t[0],match:t})),Ch=he.create({addOptions(){return{HTMLAttributes:{},suggestion:{char:":",pluginKey:mh}}},name:"emoji",group:"inline",inline:!0,selectable:!0,addNodeView(){return Ro(ih)},addAttributes(){return{code:{default:null},id:{default:null}}},parseHTML(){return[{tag:"emoji-component"}]},renderText({node:n}){return n.attrs.code},renderHTML({HTMLAttributes:n}){return["emoji-component",Te(this.options.HTMLAttributes,n),0]},addInputRules(){return[Di({find:n=>{const e=n.match(gh);return _i(e)},type:this.type,getAttributes(n){return{code:n[0]}}}),Di({find:n=>{const e=n.match(bh);return _i(e)},type:this.type,getAttributes(n){const e=C.shortcodeToEmojiData(n[0]).unicode_output;return{code:String.fromCodePoint(parseInt(e,16)),label:"emoji"}}})]},addPasteRules(){return[Ii({find:Sh,type:this.type,getAttributes(n){return{code:n[0]}}}),Ii({find:kh,type:this.type,getAttributes(n){return{code:n[0]}}})]},addProseMirrorPlugins(){return[Bo({editor:this.editor,...this.options.suggestion,...ph})]}});function xh(n,e,t=()=>!0){const r=[];e.lastIndex=0;let i;for(;i=e.exec(n);)t(n,i)&&r.push(i);return r}function wh(n,e){return!["#","@"].includes(n.charAt(e.index))&&!["#","@"].includes(n.charAt(e.index-1))}function Eh(n){const e=new RegExp("(?:"+[`[!?.,:;'"]`,"(?:&|&amp;)(?:lt|gt|quot|apos|raquo|laquo|rsaquo|lsaquo);)+$"].join("|"),"g");return n.replace(e,"")}function vh(n,e){const t=n.slice(0,e+1).search(/\S+\s*$/),r=n.slice(e).search(/\s/);if(r<0){const i=n.slice(t);return{text:i,from:t,to:t+i.length}}return{text:n.slice(t,r+e),from:t,to:r+e}}function nr(n,e,t,r){const i=vh(n,e);if(r.lastIndex=0,!r.test(i.text))return i;const s=t==="left"?i.from-1:i.to+1;return s<=0||s>=n.length||s===e?i:nr(n,s,t,r)}function Oh(n,e,t,r){const i=Math.max(n.from-1,0),s=Math.min(n.to+1,e.content.size),o=af(i,s,e);for(const l of o)l.mark.type===r&&t.removeMark(l.from,l.to,r)}const Ri=C.getPhoneNumberRegex(1,15);function Bi(n,e,t,r,i,s){if(!n)return;let o=t-e-1;o=o<0?0:o;const l=r-e,a=nr(n,o,"left",Ri),c=nr(n,l,"right",Ri),d=n.slice(a.from,c.to);xh(d,C.linkRegex,wh).forEach(h=>{const p=Eh(h[0]),m=e+a.from+h.index+1,g=m+p.length;i.addMark(m,g,s.create())})}function Mh(n){let e=!1;return new Y({key:new Q("autolink"),appendTransaction:(t,r,i)=>{const s=t.some(d=>d.docChanged)&&!r.doc.eq(i.doc);if(e&&!s)return;const{tr:o}=i,{textContent:l}=i.doc;e||Bi(l,0,0,l.length,o,n.type),e=!0;const a=Yu(r.doc,[...t]);return lf(a).forEach(({oldRange:d,newRange:u})=>{Oh(u,i.doc,o,n.type),Zu(i.doc,u,p=>p.isTextblock).forEach(({node:p,pos:m})=>{Bi(p.textContent,m,d.from,u.to,o,n.type)})}),o}})}const Th={class:"d-link d-c-text d-d-inline-block",rel:"noopener noreferrer nofollow"},Nh=Ot.create({name:"Link",renderHTML({HTMLAttributes:n}){return["a",Te(this.options.HTMLAttributes,n,Th),0]},renderText({node:n}){return n.attrs.text},addProseMirrorPlugins(){return[Mh({type:this.type})]}}),Dh=new Q("mention"),Ah=he.create({name:"mention",addOptions(){return{HTMLAttributes:{},renderLabel({options:n,node:e}){var t;return`${n.suggestion.char}${(t=e.attrs.label)!==null&&t!==void 0?t:e.attrs.id}`},suggestion:{char:"@",pluginKey:Dh,command:({editor:n,range:e,props:t})=>{var r,i;const s=n.view.state.selection.$to.nodeAfter;((r=s==null?void 0:s.text)===null||r===void 0?void 0:r.startsWith(" "))&&(e.to+=1),n.chain().focus().insertContentAt(e,[{type:this.name,attrs:t},{type:"text",text:" "}]).run(),(i=window.getSelection())===null||i===void 0||i.collapseToEnd()},allow:({state:n,range:e})=>{const t=n.doc.resolve(e.from),r=n.schema.nodes[this.name];return!!t.parent.type.contentMatch.matchType(r)}}}},group:"inline",inline:!0,selectable:!1,atom:!0,addAttributes(){return{id:{default:null,parseHTML:n=>n.getAttribute("data-id"),renderHTML:n=>n.id?{"data-id":n.id}:{}},label:{default:null,parseHTML:n=>n.getAttribute("data-label"),renderHTML:n=>n.label?{"data-label":n.label}:{}}}},parseHTML(){return[{tag:`span[data-type="${this.name}"]`}]},renderHTML({node:n,HTMLAttributes:e}){return["span",Te({"data-type":this.name},this.options.HTMLAttributes,e),this.options.renderLabel({options:this.options,node:n})]},renderText({node:n}){return this.options.renderLabel({options:this.options,node:n})},addKeyboardShortcuts(){return{Backspace:()=>this.editor.commands.command(({tr:n,state:e})=>{let t=!1;const{selection:r}=e,{empty:i,anchor:s}=r;return i?(e.doc.nodesBetween(s-1,s,(o,l)=>{if(o.type.name===this.name)return t=!0,n.insertText(this.options.suggestion.char||"",l,l+o.nodeSize),!1}),t):!1})}},addProseMirrorPlugins(){return[Bo({editor:this.editor,...this.options.suggestion})]}});const Ih={name:"MentionComponent",components:{NodeViewWrapper:Po,DtLink:Gi},props:_o,computed:{text(){return"@"+this.$props.node.attrs.name}}};function Ph(n,e,t,r,i,s){const o=f.resolveComponent("dt-link"),l=f.resolveComponent("node-view-wrapper");return f.openBlock(),f.createBlock(l,{class:"d-d-inline-block"},{default:f.withCtx(()=>[f.createVNode(o,{kind:"inverted",class:"dt-link--mention",href:null},{default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(s.text),1)]),_:1})]),_:1})}const _h=C._export_sfc(Ih,[["render",Ph]]),Rh=Ah.extend({addNodeView(){return Ro(_h)},parseHTML(){return[{tag:"mention-component"}]},addAttributes(){return{name:{default:""},avatarSrc:{default:""},id:{default:""}}},renderText({node:n}){return"@ "+n.attrs.name},renderHTML({HTMLAttributes:n}){return["mention-component",Te(this.options.HTMLAttributes,n),0]}}),Fo=["text","json","html"],Vo=["start","end","all"],Bh={name:"MentionSuggestion",components:{DtAvatar:$i,DtStack:sr},props:{item:{type:Object,required:!0}},computed:{name(){return this.item.name},avatarSrc(){return this.item.avatarSrc}}};function Lh(n,e,t,r,i,s){const o=f.resolveComponent("dt-avatar"),l=f.resolveComponent("dt-stack");return f.openBlock(),f.createBlock(l,{direction:"row",gap:"400"},{default:f.withCtx(()=>[f.createVNode(o,{"full-name":s.name,"image-src":s.avatarSrc,size:"xs"},null,8,["full-name","image-src"]),f.createTextVNode(" "+f.toDisplayString(s.name),1)]),_:1})}const Fh=C._export_sfc(Bh,[["render",Lh]]),Vh={render:()=>{let n,e;return{onStart:t=>{n=new xr(Lo,{props:{itemComponent:f.markRaw(Fh),itemType:"mention",...t},editor:t.editor}),t.clientRect&&(e=C.tippy("body",{getReferenceClientRect:t.clientRect,appendTo:()=>document.body,content:n.element,showOnCreate:!0,interactive:!0,trigger:"manual",placement:"bottom-start"}))},onUpdate(t){n.updateProps(t),t.clientRect&&e[0].setProps({getReferenceClientRect:t.clientRect})},onKeyDown(t){var r;return t.event.key==="Escape"?(e[0].hide(),!0):(r=n.ref)==null?void 0:r.onKeyDown(t)},onExit(){e[0].destroy(),n.destroy()}}}};const zh={name:"DtRichTextEditor",components:{EditorContent:Wf},props:{modelValue:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(n){return typeof n=="string"?Vo.includes(n):!0}},outputFormat:{type:String,default:"text",validator(n){return Fo.includes(n)}},placeholder:{type:String,default:""},link:{type:[Boolean,Object],default:!1},mentionSuggestion:{type:Object,default:null}},emits:["input","update:modelValue","blur","focus"],data(){return{editor:null,popoverOpened:!1}},computed:{extensions(){const n=[Yf,Xf,Qf,th];if(this.link&&n.push(this.getExtension(Nh,this.link)),n.push(eh.configure({placeholder:this.placeholder})),n.push(Zf.extend({addKeyboardShortcuts(){return{Enter:()=>!0,"Shift-Enter":()=>this.editor.commands.first(({commands:e})=>[()=>e.newlineInCode(),()=>e.createParagraphNear(),()=>e.liftEmptyBlock(),()=>e.splitBlock()])}}})),this.mentionSuggestion){const e={...this.mentionSuggestion,...Vh};n.push(Rh.configure({suggestion:e}))}return n.push(Ch),n},inputAttrs(){const n={"aria-label":this.inputAriaLabel,"aria-multiline":!0,role:"textbox"};return this.editable||(n["aria-readonly"]=!0),n}},watch:{editable(n){this.editor.setEditable(n),this.updateEditorAttributes({"aria-readonly":!n})},inputClass(n){this.updateEditorAttributes({class:n})},inputAriaLabel(n){this.updateEditorAttributes({"aria-label":n})},extensions(){this.destroyEditor(),this.createEditor()},modelValue(n){let e=this.getOutput();this.outputFormat==="json"&&(n=JSON.stringify(n),e=JSON.stringify(e)),n!==e&&this.editor.commands.setContent(n,!1)}},created(){this.createEditor()},beforeUnmount(){this.destroyEditor()},methods:{createEditor(){this.editor=new Kf({autofocus:this.autoFocus,content:this.modelValue,editable:this.editable,extensions:this.extensions,editorProps:{attributes:{...this.inputAttrs,class:this.inputClass}}}),this.addEditorListeners()},destroyEditor(){this.editor.destroy()},addEditorListeners(){this.editor.on("update",()=>{const n=this.getOutput();this.$emit("input",n),this.$emit("update:modelValue",n)}),this.editor.on("focus",({event:n})=>{this.$emit("focus",n)}),this.editor.on("blur",({event:n})=>{this.$emit("blur",n)})},getOutput(){switch(this.outputFormat){case"json":return this.editor.getJSON();case"html":return this.editor.getHTML();case"text":default:return this.editor.getText()}},getExtension(n,e){var t;return typeof e=="boolean"?n:(t=n.configure)==null?void 0:t.call(n,e)},updateEditorAttributes(n){this.editor.setOptions({editorProps:{attributes:n}})},focusEditor(){this.editor.commands.focus()}}};function jh(n,e,t,r,i,s){const o=f.resolveComponent("editor-content");return f.openBlock(),f.createBlock(o,{editor:i.editor,"data-qa":"dt-rich-text-editor"},null,8,["editor"])}const Hh=C._export_sfc(zh,[["render",jh]]);const $h={name:"DtRecipeMessageInput",components:{DtButton:C.DtButton,DtEmojiPicker:C._sfc_main,DtIcon:C.DtIcon,DtInput:C.DtInput,DtNotice:rs,DtPopover:ns,DtRichTextEditor:Hh,DtTooltip:C.DtTooltip},mixins:[],inheritAttrs:!1,props:{modelValue:{type:[Object,String],default:""},editable:{type:Boolean,default:!0},inputAriaLabel:{type:String,required:!0,default:""},inputClass:{type:String,default:""},autoFocus:{type:[Boolean,String,Number],default:!1,validator(n){return typeof n=="string"?Vo.includes(n):!0}},outputFormat:{type:String,default:"text",validator(n){return Fo.includes(n)}},link:{type:[Boolean,Object],default:!1},placeholder:{type:String,default:""},disableSend:{type:Boolean,default:!1},hasCharacterLimit:{type:Boolean,default:!0},characterLimitCount:{type:Number,default:1500},characterLimitWarning:{type:Number,default:500},showNotice:{type:Boolean,default:!1},noticeMessage:{type:String,default:""},noticeKind:{type:String,default:"error",validate(n){return Gt.includes(n)}},emojiTabSetLabels:{type:Array,default:()=>["Most recently used","Smileys and people","Nature","Food","Activity","Travel","Objects","Symbols","Flags"]},emojiSkinSelectorButtonTooltipLabel:{type:String,default:"Change default skin tone"},emojiSearchNoResultsLabel:{type:String,default:"No results"},emojiSearchResultsLabel:{type:String,default:"Search results"},emojiSearchPlaceholderLabel:{type:String,default:"Search..."},emojiTooltipMessage:{type:String,default:"Emoji"},emojiButtonAriaLabel:{type:String,default:"emoji button"},imageButtonAriaLabel:{type:String,default:"image button"},imageTooltipLabel:{type:String,default:"Attach Image"},sendButtonAriaLabel:{type:String,default:"send button"},sendTooltipLabel:{type:String,default:"Send"}},emits:["submit","select-media","add-media","notice-close"],data(){return{skinTone:"Default",internalInputValue:this.modelValue,hasFocus:!1,imagePickerFocus:!1,emojiPickerFocus:!1,sendButtonFocus:!1,emojiPickerOpened:!1}},computed:{inputLength(){return this.internalInputValue.length},displayCharacterLimitWarning(){return this.hasCharacterLimit&&this.characterLimitCount-this.inputLength<=this.characterLimitWarning},isSendDisabled(){return this.inputLength===0||this.disableSend||this.hasCharacterLimit&&this.inputLength>this.characterLimitCount},computedCloseButtonProps(){return{ariaLabel:"Close"}},noticeClasses(){return["dt-message-input-notice","d-ps-relative","d-t8","d-bbr0","d-pt4","d-pb8","d-pr12","d-pl16","d-bs-none","d-fs-100","d-wmx-unset"]},emojiPickerHovered(){return this.emojiPickerFocus||this.emojiPickerOpened}},watch:{modelValue(n){this.internalInputValue=n}},methods:{onDrag(n){n.stopPropagation(),n.preventDefault()},onDrop(n){n.stopPropagation(),n.preventDefault();const e=n.dataTransfer,r=Array.from(e.files).map(i=>i.name);this.$emit("add-media",r)},onSelectEmoji(n){if(!n){this.emojiPickerOpened=!1;return}this.$refs.richTextEditor.editor.commands.insertContent({type:"emoji",attrs:{code:n.shortname}}),this.emojiPickerOpened=!1},onSelectImage(){this.$refs.messageInputImageUpload.$refs.input.click()},onImageUpload(n){this.$emit("select-media",n)},toggleEmojiPicker(){this.emojiPickerOpened=!this.emojiPickerOpened},onSend(){this.isSendDisabled||this.$emit("submit",this.internalInputValue)},noticeClose(){this.$emit("notice-close",!0)},focus(){this.$refs.richTextEditor.focusEditor(),this.hasFocus=!0}}},qh={class:"d-ps-relative d-bar8 d-bgc-white"},Kh={class:"d-of-auto d-mx16 d-mt8 d-mb4 d-hmx40p"},Wh={class:"d-d-flex d-jc-space-between d-mx8 d-my4"},Jh={class:"d-d-flex"},Uh={class:"d-d-flex"},Gh={key:0,class:"d-fc-error d-mr16 d-as-center dt-message-input--remaining-char","data-qa":"dt-message-input-character-limit"},Yh={class:"d-d-flex d-jc-space-between d-h24 d-ai-center"},Xh={"data-qa":"dt-message-input-footer-left"},Zh={"data-qa":"dt-message-input-footer-right"};function Qh(n,e,t,r,i,s){const o=f.resolveComponent("dt-icon"),l=f.resolveComponent("dt-notice"),a=f.resolveComponent("dt-rich-text-editor"),c=f.resolveComponent("dt-button"),d=f.resolveComponent("dt-input"),u=f.resolveComponent("dt-tooltip"),h=f.resolveComponent("dt-emoji-picker"),p=f.resolveComponent("dt-popover");return f.openBlock(),f.createElementBlock(f.Fragment,null,[t.showNotice?(f.openBlock(),f.createBlock(l,{key:0,"data-qa":"dt-message-input-error-notice",class:f.normalizeClass(s.noticeClasses),kind:t.noticeKind,"close-button-props":s.computedCloseButtonProps,onClose:s.noticeClose},{icon:f.withCtx(()=>[f.createVNode(o,{size:"300",name:"alert-circle"})]),default:f.withCtx(()=>[f.createTextVNode(f.toDisplayString(t.noticeMessage)+" ",1)]),_:1},8,["class","kind","close-button-props","onClose"])):f.createCommentVNode("",!0),f.createElementVNode("div",qh,[f.createElementVNode("div",{"data-qa":"dt-message-input",role:"presentation",class:f.normalizeClass(["d-d-flex d-fd-column d-bar8 d-baw1 d-ba d-c-text",{"d-bc-black-500 d-bs-sm":i.hasFocus,"d-bc-default":!i.hasFocus}]),onClick:e[17]||(e[17]=m=>n.$refs.richTextEditor.focusEditor()),onDragEnter:e[18]||(e[18]=(...m)=>s.onDrag&&s.onDrag(...m)),onDragOver:e[19]||(e[19]=(...m)=>s.onDrag&&s.onDrag(...m)),onDrop:e[20]||(e[20]=(...m)=>s.onDrop&&s.onDrop(...m)),onKeydown:e[21]||(e[21]=f.withKeys(f.withModifiers((...m)=>s.onSend&&s.onSend(...m),["exact"]),["enter"])),onFocusin:e[22]||(e[22]=m=>i.hasFocus=!0),onFocusout:e[23]||(e[23]=m=>i.hasFocus=!1)},[f.createElementVNode("div",Kh,[f.createVNode(a,f.mergeProps({ref:"richTextEditor",modelValue:i.internalInputValue,"onUpdate:modelValue":e[0]||(e[0]=m=>i.internalInputValue=m),editable:t.editable,"input-aria-label":t.inputAriaLabel,"input-class":t.inputClass,"output-format":t.outputFormat,"auto-focus":t.autoFocus,link:t.link,placeholder:t.placeholder},n.$attrs,{onFocus:e[1]||(e[1]=m=>i.hasFocus=!0),onBlur:e[2]||(e[2]=m=>i.hasFocus=!1)}),null,16,["modelValue","editable","input-aria-label","input-class","output-format","auto-focus","link","placeholder"])]),f.renderSlot(n.$slots,"middle"),f.createElementVNode("section",Wh,[f.createElementVNode("div",Jh,[f.createVNode(u,{placement:"top-start",message:t.imageTooltipLabel,offset:[-4,-4]},{anchor:f.withCtx(()=>[f.createVNode(c,{"data-qa":"dt-message-input-image-btn",size:"sm",circle:"",kind:i.imagePickerFocus?"default":"muted",importance:"clear","aria-label":t.imageButtonAriaLabel,onClick:s.onSelectImage,onMouseenter:e[3]||(e[3]=m=>i.imagePickerFocus=!0),onMouseleave:e[4]||(e[4]=m=>i.imagePickerFocus=!1),onFocusin:e[5]||(e[5]=m=>i.imagePickerFocus=!0),onFocusout:e[6]||(e[6]=m=>i.imagePickerFocus=!1)},{icon:f.withCtx(()=>[f.createVNode(o,{name:"image",size:"300"})]),_:1},8,["kind","aria-label","onClick"]),f.createVNode(d,{ref:"messageInputImageUpload","data-qa":"dt-message-input-image-input",type:"file",class:"d-ps-absolute",multiple:"",hidden:"",onInput:s.onImageUpload},null,8,["onInput"])]),_:1},8,["message"]),f.createVNode(p,{"data-qa":"dt-message-input-emoji-picker-popover",open:i.emojiPickerOpened,"initial-focus-element":"#searchInput",padding:"none",onOpened:e[12]||(e[12]=m=>{i.emojiPickerOpened=m})},{anchor:f.withCtx(()=>[f.createVNode(u,{message:t.emojiTooltipMessage,offset:[0,-4]},{anchor:f.withCtx(()=>[f.createVNode(c,{"data-qa":"dt-message-input-emoji-picker-btn",size:"sm",circle:"",kind:s.emojiPickerHovered?"default":"muted",importance:"clear","aria-label":t.emojiButtonAriaLabel,offset:[0,0],onClick:s.toggleEmojiPicker,onMouseenter:e[7]||(e[7]=m=>i.emojiPickerFocus=!0),onMouseleave:e[8]||(e[8]=m=>i.emojiPickerFocus=!1),onFocusin:e[9]||(e[9]=m=>i.emojiPickerFocus=!0),onFocusout:e[10]||(e[10]=m=>i.emojiPickerFocus=!1)},{icon:f.withCtx(()=>[f.createVNode(o,{name:s.emojiPickerHovered?"very-satisfied":"satisfied",size:"300"},null,8,["name"])]),_:1},8,["kind","aria-label","onClick"])]),_:1},8,["message"])]),content:f.withCtx(()=>[f.createVNode(h,{"tab-set-labels":t.emojiTabSetLabels,"skin-selector-button-tooltip-label":t.emojiSkinSelectorButtonTooltipLabel,"search-no-results-label":t.emojiSearchNoResultsLabel,"search-results-label":t.emojiSearchResultsLabel,"search-placeholder-label":t.emojiSearchPlaceholderLabel,"skin-tone":i.skinTone,onSkinTone:e[11]||(e[11]=m=>i.skinTone=m),onSelectedEmoji:s.onSelectEmoji},null,8,["tab-set-labels","skin-selector-button-tooltip-label","search-no-results-label","search-results-label","search-placeholder-label","skin-tone","onSelectedEmoji"])]),_:1},8,["open"])]),f.createElementVNode("div",Uh,[s.displayCharacterLimitWarning?(f.openBlock(),f.createElementBlock("p",Gh,f.toDisplayString(t.characterLimitCount-s.inputLength),1)):f.createCommentVNode("",!0),f.createVNode(u,{placement:"top-end",message:t.sendTooltipLabel,show:!s.isSendDisabled&&i.sendButtonFocus,offset:[6,-4]},{anchor:f.withCtx(()=>[f.createVNode(c,{"data-qa":"dt-message-input-send-btn",size:"sm",kind:s.isSendDisabled?"muted":"default",circle:"",importance:"primary",class:f.normalizeClass({"message-input-button__disabled d-fc-muted":s.isSendDisabled}),"aria-label":t.sendButtonAriaLabel,"aria-disabled":s.isSendDisabled,onClick:s.onSend,onMouseenter:e[13]||(e[13]=m=>i.sendButtonFocus=!0),onMouseleave:e[14]||(e[14]=m=>i.sendButtonFocus=!1),onFocusin:e[15]||(e[15]=m=>i.sendButtonFocus=!0),onFocusout:e[16]||(e[16]=m=>i.sendButtonFocus=!1)},{icon:f.withCtx(()=>[f.createVNode(o,{name:"send",size:"300"})]),_:1},8,["kind","class","aria-label","aria-disabled","onClick"])]),_:1},8,["message","show"])])])],34),f.createElementVNode("section",Yh,[f.createElementVNode("div",Xh,[f.renderSlot(n.$slots,"footerLeft")]),f.createElementVNode("div",Zh,[f.renderSlot(n.$slots,"footerRight")])])])],64)}const ep=C._export_sfc($h,[["render",Qh]]);exports.AVATAR_COLORS=Hi;exports.AVATAR_GROUP_VALIDATOR=Rn;exports.AVATAR_ICON_SIZES=ji;exports.AVATAR_KIND_MODIFIERS=Vi;exports.AVATAR_PRESENCE_SIZE_MODIFIERS=zi;exports.AVATAR_PRESENCE_STATES=_n;exports.AVATAR_SIZE_MODIFIERS=Pt;exports.DtAvatar=$i;exports.DtItemLayout=Bn;exports.DtLink=Gi;exports.DtListItem=Yi;exports.DtNotice=rs;exports.DtNoticeAction=Wi;exports.DtNoticeContent=Ki;exports.DtNoticeIcon=qi;exports.DtPopover=ns;exports.DtPresence=Fi;exports.DtStack=sr;exports.LIST_ITEM_NAVIGATION_TYPES=ut;exports.Modal=Ui;exports.NOTICE_KINDS=Gt;exports.POPOVER_APPEND_TO_VALUES=ts;exports.POPOVER_CONTENT_WIDTHS=Qi;exports.POPOVER_HEADER_FOOTER_PADDING_CLASSES=Xi;exports.POPOVER_INITIAL_FOCUS_STRINGS=es;exports.POPOVER_PADDING_CLASSES=Ln;exports.POPOVER_ROLES=Zi;exports.PRESENCE_STATES=Ue;exports.PRESENCE_STATES_LIST=Li;exports.SrOnlyCloseButton=rr;exports.SrOnlyCloseButtonMixin=Yt;exports.message_input=ep;
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./message_input-0c6b468f.cjs");require("./emoji-b45991f0.cjs");require("vue");exports.DtRecipeMessageInput=e.message_input;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./message_input-4b60e253.cjs");require("./emoji-f3e4b2ca.cjs");require("vue");exports.DtRecipeMessageInput=e.message_input;
@@ -1,5 +1,5 @@
1
- import { y as r } from "./message_input-4bede2c7.js";
2
- import "./emoji-131e3eda.js";
1
+ import { y as r } from "./message_input-46ebe433.js";
2
+ import "./emoji-83163b7b.js";
3
3
  import "vue";
4
4
  export {
5
5
  r as DtRecipeMessageInput