PageSourceSearch

https://app.pvadeals.com/6962.bundle.4a997fa9.js

js pvadeals.com collected 2026-10-09 00:04:31 UTC 25,729 bytes, 1 lines download raw bytes

1"use strict";(globalThis.webpackChunkpvadeal_v3=globalThis.webpackChunkpvadeal_v3||[]).push([[6962],{69337(e,t,n){n.d(t,{A:()=>s});var r=n(31601),i=n.n(r),o=n(76314),a=n.n(o)()(i());a.push([e.id,".rich-text-editor{border:1px solid var(--color-border-input, #ced2d9);border-radius:6px;overflow:hidden}.rich-text-editor:focus-within{border-color:var(--color-brand-primary-strong, #2453B2)}.rich-text-editor__toolbar{display:flex;flex-wrap:wrap;gap:2px;padding:8px;border-bottom:1px solid var(--color-border-subtle, #D9E2F1);background:var(--color-surface-muted, #F3F5F9)}.rich-text-editor__toolbar button{display:inline-flex;align-items:center;justify-content:center;width:30px;height:30px;padding:0;border:none;border-radius:4px;background:transparent;color:var(--color-text-muted, #5b6478);cursor:pointer;transition:background-color .12s ease,color .12s ease}.rich-text-editor__toolbar button:hover{background:var(--color-surface-action, #dae2f2);color:var(--color-text-body, #212529)}.rich-text-editor__toolbar button.is-active{background:var(--color-surface-action, #dae2f2);color:var(--color-brand-primary, #1d3f91)}.rich-text-editor__toolbar .toolbar-divider{width:1px;margin:2px 4px;background:var(--color-border-subtle, #D9E2F1)}.rich-text-editor .tiptap{padding:12px;min-height:200px;outline:none;font-size:14px;line-height:1.6}.rich-text-editor .tiptap p{margin:0 0 8px}.rich-text-editor .tiptap p:last-child{margin-bottom:0}.rich-text-editor .tiptap ul,.rich-text-editor .tiptap ol{padding-left:40px;margin:0 0 8px}.rich-text-editor .tiptap ul li{list-style-type:inherit}.rich-text-editor .tiptap ol li{list-style-type:decimal}.rich-text-editor .tiptap blockquote{border-left:3px solid var(--color-border-subtle, #D9E2F1);padding-left:12px;margin:0 0 8px;color:var(--color-text-muted, #666)}.rich-text-editor .tiptap a{color:var(--color-brand-primary-strong, #2453B2);text-decoration:underline}.emoji-picker__grid{display:grid;grid-template-columns:repeat(8, 1fr);gap:2px;padding:8px;max-height:220px;overflow-y:auto;background:var(--color-surface-base, #ffffff)}.emoji-picker__item{display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:0;border:none;border-radius:4px;background:transparent;font-size:20px;line-height:1;cursor:pointer}.emoji-picker__item:hover{background:var(--color-surface-action, #dae2f2)}",""]);const s=a},23052(e,t,n){n.d(t,{A:()=>m});var r=n(87937),i=n(3304),o=n(86480),a=n(29945),s=n(90197),l=n(87503),c=n(30029),u=n(14283),d=function(){return d=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},d.apply(this,arguments)},p=function(e,t,n,r){return new(n||(n=Promise))(function(i,o){function a(e){try{l(r.next(e))}catch(e){o(e)}}function s(e){try{l(r.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n(function(e){e(t)})).then(a,s)}l((r=r.apply(e,t||[])).next())})},f=function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}};const m=function(e){var t=e.queryDocument,n=e.redirectTo,m=e.responseKey,h=e.successMessage,g
1=e.handleCallback,v=e.isAmountUpdate,y=e.handleError,b=e.suppressInsufficientFundsModal,x=(0,i.dh)().enqueue,T=(0,o.jE)(),I=(0,r.Zp)(),C=(0,o.n_)(function(e){return p(void 0,void 0,void 0,function(){return f(this,function(n){switch(n.label){case 0:return[4,(0,s.FdL)(t,e)];case 1:return[2,n.sent()]}})})}),j=C.mutateAsync,w=C.isLoading,M=function(e,t){var n={};for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&t.indexOf(r)<0&&(n[r]=e[r]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(r=Object.getOwnPropertySymbols(e);i<r.length;i++)t.indexOf(r[i])<0&&Object.prototype.propertyIsEnumerable.call(e,r[i])&&(n[r[i]]=e[r[i]])}return n}(C,["mutateAsync","isLoading"]),k=/^[a-f\d]{24}$/i;return d({handleMutation:function(e){return p(void 0,void 0,void 0,function(){var t,r,i,o,s,d,p;return f(this,function(f){switch(f.label){case 0:return f.trys.push([0,2,,3]),[4,j(e)];case 1:if(t=f.sent(),null==g||g(t,e),t.status&&(r=t.data,v&&T.invalidateQueries("me"),h&&(0,u.T)(x,null==h?void 0:h(t)),n)){if(i=function(e,t){var r;if(!m)return"";var i=Boolean(null==n?void 0:n.includes("/client/request/")),o=null==e?void 0:e[m];if(!o)return"";var a=function(e){var t=function(e){var t=String(e).trim();return t?i&&!k.test(t)?"":t:""};if("string"==typeof e||"number"==typeof e)return t(e);if(e&&"object"==typeof e){var n=e;if("string"==typeof n.$oid)return t(n.$oid);if("string"==typeof n.oid)return t(n.oid);if("string"==typeof n.id||"number"==typeof n.id)return t(n.id);if("function"==typeof e.toString){var r=String(e).trim();if(r&&"[object Object]"!==r)return t(r)}}return""},s=["_id","requestId","id","ticketId","transactionId"],l=["_doc","node","data","request","result"],c=function(e,t){if(!e||t>3)return"";var n=a(e);if(n)return n;if("object"!=typeof e)return"";for(var r=e,i=0,o=s;i<o.length;i++){var u=a(r[o[i]]);if(u)return u}for(var d=0,p=l;d<p.length;d++){var f=c(r[p[d]],t+1);if(f)return f}return""},u=c(o,0);if(u)return u;var d=c(e,0);if(d)return d;var p=(null==t?void 0:t.requestId)||(null===(r=null==t?void 0:t.input)||void 0===r?void 0:r.requestId);return a(p)}(r,e),m&&!i)return[2];o=m?"".concat(n).concat(i):n,setTimeout(function(){I({to:o})},1500)}return[3,3];case 2:return s=f.sent(),d=(0,c.bn)(s)||a.hE.GENERIC_ERROR,p=(0,c.BP)(s),null==y||y((0,c.dC)(s)),!b&&function(e,t){if("INSUFFICIENT_BALANCE"===e)return!0;if(!t)return!1;var n=t.toLowerCase();return n.includes("insufficient fund")||n.includes("insufficient balance")}(p,d)?l.Bh.getState().open():(0,u.Q)(x,d),[3,3];case 3:return[2]}})})},isLoading:w,enqueue:x,mutateAsync:j,navigate:I},M)}},27485(e,t,n){n.d(t,{A:()=>R});var r=n(74848),i=n(99713),o=n(65571),a=n(334),s=n(37594),l=n(96540),c=n(86480),u=n(30037),d=n(85072),p=n.n(d),f=n(97825),m=n.n(f),h=n(77659),g=n.n(h),v=n(55056),y=n.n(v),b=n(10540),x=n.n(b),T=n(41113),I=n.n(T),C=n(69337),j={};j.styleTagTransform=I(),j.setAttributes=y(),j.insert=g().bind(null,"head"),j.domAPI=m(),j.insertStyleElement=x(),p()(C.A,j),C.A&&C.A.locals&&C.A.locals;var w=n(90197),M=n(52781),k=n(47616),A=n(5338),_=function(){return _=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},_.apply(this,arguments)},S={root:{display:"flex",minWidth:480,maxWidth:600,maxHeight:360,background:"var(--color-surface-base, #ffffff)",border:"1px solid var(--color-border-subtle, rgba(0,0,0,0.12))",borderRadius:8,boxShadow:"0 10px 30px rgba(0,0,0,0.18)",overflow:"hidden",fontFamily:"inherit",fontSize:13,color:"var(--color-text-primary, #1a1a1a)",zIndex:9999},sidebar:{width:140,borderRight:"1px solid var(--color-border-subtle, rgba(0,0,0,0.12))",background:"var(--color-surface-elevated, #fafafa)",overflowY:"auto",padding:"6px 0"},sidebarItem:{padding:"6px 10px",cursor:"pointer",fontSize:12,color:"var(--color-text-secondary, #4a4a4a)"},sidebarItemActive:{background:"var(--color-brand-primary-soft, #e7eefc)",color:"var(--color-brand-primary, #2563eb)",fontWeight:600},body:{flex:1,display:"flex",flexDirection:"column",minWidth:0},list:{flex:1,overflowY:"auto",padding:4},empty:{padding:16,color:"var(--color-text-muted, #6b7280)",fontSize:12},item:{padding:"8px 10px",borderRadius:4,cursor:"pointer",display:"flex",flexDirection:"column",gap:2},itemActive:{background:"var(--color-brand-primary-soft, #e7eefc)"},itemName:{fontWeight:600,fontSize:13},itemNameMatch:{color:"var(--color-brand-primary, #2563eb)"},itemDescription:{fontSize:11,color:"var(--color-text-muted, #6b7280)",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},hintBar:{borderTop:"1px solid var(--color-border-subtle, rgba(0,0,0,0.12))",padding:"6px 10px",fontSize:11,color:"var(--color-text-muted, #6b7280)",display:"flex",gap:12,background:"var(--color-surface-elevated, #fafafa)"}};function O(e){var t=e.categories,n=e.filteredTemplates,i=e.selectedIndex,o=e.activeCategoryId,a=e.query,s=e.onSelectTemplate,l=e.onSelectCategory,c=e.onHoverItem,u=function(e,t,n){if(n||2===arguments.length)for(var r,i=0,o=t.length;i<o;i++)!r&&i in t||(r||(r=Array.prototype.slice.call(t,0,i)),r[i]=t[i]);return e.concat(r||Array.prototype.slice.call(t))}([],t,!0).sort(function(e,t){return e.order-t.order||e.name.localeCompare(t.name)});return(0,r.jsxs)("div",{style:S.root,role:"dialog","aria-label":"Insert macro",children:[(0,r.jsxs)("div",{style:S.sidebar,children:[(0,r.jsxs)("div",{style:_(_({},S.sidebarItem),null===o?S.sidebarItemActive:{}),onMouseDown:function(e){e.preventDefault(),l(null)},children:["All (",n.length,")"]}),u.map(function(e){var t=n.filter(function(t){return t.categoryId===e._id}).length,i=o===e._id;return(0,r.jsxs)("div",{style:_(_({},S.sidebarItem),i?S.sidebarItemActive:{}),onMouseDown:function(t){t.preventDefault(),l(e._id)},title:"# ".concat(e.name),children:["# ",e.name," (",t,")"]},e._id)})]}),(0,r.jsxs)("div",{style:S.body,children:[(0,r.jsx)("div",{style:S.list,children:0===n.length?(0,r.jsx)("div",{style:S.empty,children:a?'No templates match "'.concat(a,'"'):"No templates available."}):n.map(function(e,t){var n,o=t===i,a=(n=e.body,n.replace(/<[^>]+>/g," ").replace(/\s+/g," ").trim()).slice(0,90);return(0,r.jsxs)("div",{style:_(_({},S.item),o?S.itemActive:{}),onMouseDown:function(t){t.preventDefault(),s(e)},onMouseEnter:function(){return c(t)},children:[(0,r.jsxs)("div",{style:S.itemName,children:[(0,r.jsx)("span",{style:S.itemNameMatch,children:"/"}),e.name,e.description?(0,r.jsxs)("span",{style:{marginLeft:6,fontWeight:400,color:"var(--color-text-muted, #6b7280)"},children:["— ",e.description]}):null]}),(0,r.jsx)("div",{style:S.itemDescription,children:a})]},e._id)})}),(0,r.jsxs)("div",{style:S.hintBar,children:[(0,r.jsx)("span",{children:"↑↓ navigate"}),(0,r.jsx)("span",{children:"Enter select"}),(0,r.jsx)("span",{children:"Esc close"})]})]})]})}var $=function(){return $=Object.assign||function(e){for(var t,n=1,r=arguments.length;n<r;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},$.apply(this,arguments)};function E(e,t,n){var r=t.trim().toLowerCase();return e.filter(function(e){return!n||e.categoryId===n}).filter(function(e){var t;return!r||!!e.name.toLowerCase().includes(r)||!!(null!==(t=e.description)&&void 0!==t?t:"").toLowerCase().includes(r)||e.body.toLowerCase().includes(r)}).sort(function(e,t){var n=e.name.toLowerCase().startsWith(r);return n!==t.name.toLowerCase().startsWith(r)?n?-1:1:e.name.localeCompare(t.name)}).slice(0,25)}var N=function(){function e(){this.root=null,this.container=null,this.selectedIndex=0,this.activeCategoryId=null,this.query="",this.categories=[],this.allTemplates=[],this.filteredTemplates=[],this.command=null}return e.prototype.start=function(e){this.command=function(t){return e.command(t)},this.refreshData(e),this.mount(e)},e.prototype.update=function(e){this.command=function(t){return e.command(t)},this.refreshData(e),this.render(e)},e.prototype.exit=function(){this.root&&(this.root.unmount(),this.root=null),this.container&&this.container.parentNode&&this.container.parentNode.removeChild(this.container),this.container=null,this.command=null},e.prototype.onKeyDown=function(e){var t=e.event.key;if("ArrowDown"===t)return this.selectedIndex=(this.selectedIndex+1)%Math.max(1,this.filteredTemplates.length),this.rerender(),!0;if("ArrowUp"===t){var n=Math.max(1,this.filteredTemplates.length);return this.selectedIndex=(this.selectedIndex-1+n)%n,this.rerender(),!0}if("Enter"===t||"Tab"===t){var r=this.filteredTemplates[this.selectedIndex];return r&&this.command&&this.command(r),!0}return!1},e.prototype.refreshData=function(e){this.query=e.query,this.categories=this.categoriesFromProps(e),this.allTemplates=this.templatesFromProps(e),this.filteredTemplates=E(this.allTemplates,this.query,this.activeCategoryId),this.selectedIndex>=this.filteredTemplates.length&&(this.selectedIndex=0)},e.prototype.categoriesFromProps=function(e){var t,n,r=null===(t=e.editor.extensionManager.extensions.find(function(e){return"macroSuggestion"===e.name}))||void 0===t?void 0:t.options;return null!==(n=null==r?void 0:r.dataSource.getCategories())&&void 0!==n?n:[]},e.prototype.templatesFromProps=function(e){var t,n,r=null===(t=e.editor.extensionManager.extensions.find(function(e){return"macroSuggestion"===e.name}))||void 0===t?void 0:t.options;return null!==(n=null==r?void 0:r.dataSource.getTemplates())&&void 0!==n?n:[]},e.prototype.mount=function(e){this.container=document.createElement("div"),this.container.style.position="fixed",this.container.style.zIndex="9999",document.body.appendChild(this.container),this.positionContainer(e),this.root=(0,A.H)(this.container),this.render(e)},e.prototype.render=function(e){var t=this;this.root&&this.container&&(this.positionContainer(e),this.root.render((0,r.jsx)(O,{categories:this.categories,templates:this.allTemplates,filteredTemplates:this.filteredTemplates,selectedIndex:this.selectedIndex,activeCategoryId:this.activeCategoryId,query:this.query,onSelectTemplate:function(e){t.command&&t.command(e)},onSelectCategory:function(e){t.activeCategoryId=e,t.filteredTemplates=E(t.allTemplates,t.query,t.activeCategoryId),t.selectedIndex=0,t.rerender()},onHoverItem:function(e){t.selectedIndex=e,t.rerender()}})))},e.prototype.rerender=function(){var e=this;this.root&&this.container&&this.root.render((0,r.jsx)(O,{categories:this.categories,templates:this.allTemplates,filteredTemplates:this.filteredTemplates,selectedIndex:this.selectedIndex,activeCategoryId:this.activeCategoryId,query:this.query,onSelectTemplate:function(t){e.command&&e.command(t)},onSelectCategory:function(t){e.activeCategoryId=t,e.filteredTemplates=E(e.allTemplates,e.query,e.activeCategoryId),e.selectedIndex=0,e.rerender()},onHoverItem:function(t){e.selectedIndex=t,e.rerender()}}))},e.prototype.positionContainer=function(e){var t;if(this.container){var n=null===(t=e.clientRect)||void 0===t?void 0:t.call(e);n&&(this.container.style.top="".concat(n.bottom+6,"px"),this.container.style.left="".concat(n.left,"px"))}},e}(),q=M.YY.create({name:"macroSuggestion",addOptions:function(){return{dataSource:{getCategories:function(){return[]},getTemplates:function(){return[]}},getVariables:function(){return{}}}},addProseMirrorPlugins:function(){var e={char:"/",allowSpaces:!1,startOfLine:!1,command:function(e){var t,n,r,i=e.editor,o=e.range,a=e.props,s=null===(t=i.extensionManager.extensions.find(function(e){return"macroSuggestion"===e.name}))||void 0===t?void 0:t.options,l=function(e,t){if(!e||!t)return e;for(var n=e,r=function(e,t){if(!e)return"continue";var r=new RegExp("\\{\\s*".concat(function(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}(e),"\\s*\\}"),"gi");n=n.replace(r,function(){return function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;")}(null!=t?t:"")})},i=0,o=Object.entries(t);i<o.length;i++){var a=o[i];r(a[0],a[1])}return n}(a.body,null!==(r=null===(n=null==s?void 0:s.getVariables)||void 0===n?void 0:n.call(s))&&void 0!==r?r:{});i.chain().focus().insertContentAt(o,l).run()},items:function(e){var t,n,r=e.query,i=null===(t=e.editor.extensionManager.extensions.find(function(e){return"macroSuggestion"===e.name}))||void 0===t?void 0:t.options;return E(null!==(n=null==i?void 0:i.dataSource.getTemplates())&&void 0!==n?n:[],r,null)},render:function(){var e=new N;return{onStart:function(t){return e.start(t)},onUpdate:function(t){return e.update(t)},onKeyDown:function(t){return e.onKeyDown(t)},onExit:function(){return e.exit()}}}};return[(0,k.Ay)($({editor:this.editor},e))]}});const D=q;var L=n(88073),z=n(30793),P=["🙂","😊","😀","😃","😄","😁","😉","😍","🥰","😎","🤩","🙃","😂","🤣","😅","😇","🤗","🤔","😐","🙄","😴","😢","😭","😔","😟","😬","😳","🥺","😮","😤","👍","👎","👌","🙏","👏","🙌","🤝","👋","✌️","🤞","💪","👀","🫶","🤙","❤️","🧡","💛","💚","💙","💜","🖤","💔","💖","💕","✅","❌","⚠️","❓","❗","ℹ️","💡","⭐","🌟","✨","💯","🔥","🎉","🎊","🚀","📌","📎","🔒","⏰","📅","📧","💳","💰","🎁"];function F(e){var t=e.onSelect;return(0,r.jsx)(L.A,{placement:z.El.bottomRight,content:function(e){var n=e.close;return(0,r.jsx)("div",{className:"emoji-picker__grid",children:P.map(function(e){return(0,r.jsx)("button",{type:"button",className:"emoji-picker__item","aria-label":"Insert ".concat(e),onClick:function(){t(e),n()},children:e},e)})})},children:(0,r.jsx)("button",{type:"button",title:"Insert emoji","aria-label":"Insert emoji",children:(0,r.jsx)(u.Cbw,{size:16})})})}var U=n(55813);function B(e){var t=e.editor,n=e.enableEmoji;if(!t)return null;var i=16;return(0,r.jsxs)("div",{className:"rich-text-editor__toolbar",children:[(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleBold().run()},className:t.isActive("bold")?"is-active":"",title:"Bold",children:(0,r.jsx)(u.lcf,{size:i})}),(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleItalic().run()},className:t.isActive("italic")?"is-active":"",title:"Italic",children:(0,r.jsx)(u.uXv,{size:i})}),(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleUnderline().run()},className:t.isActive("underline")?"is-active":"",title:"Underline",children:(0,r.jsx)(u.oci,{size:i})}),(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleStrike().run()}
1,className:t.isActive("strike")?"is-active":"",title:"Strikethrough",children:(0,r.jsx)(u.FkO,{size:i})}),(0,r.jsx)("div",{className:"toolbar-divider"}),(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleBulletList().run()},className:t.isActive("bulletList")?"is-active":"",title:"Bullet list",children:(0,r.jsx)(u.mz3,{size:i})}),(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleOrderedList().run()},className:t.isActive("orderedList")?"is-active":"",title:"Numbered list",children:(0,r.jsx)(u.ZN1,{size:i})}),(0,r.jsx)("div",{className:"toolbar-divider"}),(0,r.jsx)("button",{type:"button",onClick:function(){return t.chain().focus().toggleBlockquote().run()},className:t.isActive("blockquote")?"is-active":"",title:"Block quote",children:(0,r.jsx)(u.O$U,{size:i})}),(0,r.jsx)("button",{type:"button",onClick:function(){var e=window.prompt("Enter URL");e&&t.chain().focus().setLink({href:e}).run()},className:t.isActive("link")?"is-active":"",title:"Add link",children:(0,r.jsx)(u.GPF,{size:i})}),n&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)("div",{className:"toolbar-divider"}),(0,r.jsx)(F,{onSelect:function(e){return t.chain().focus().insertContent(e).run()}})]})]})}function R(e){var t=this,n=e.value,u=e.onChange,d=e.minHeight,p=void 0===d?200:d,f=e.enableMacros,m=void 0!==f&&f,h=e.enableEmoji,g=void 0!==h&&h,v=e.hideToolbar,y=void 0!==v&&v,b=e.macroVariables,x=(0,c.jE)(),T=(0,l.useRef)({categories:[],templates:[]}),I=(0,l.useRef)({});I.current=null!=b?b:{},(0,c.IT)(U.Zo,function(){return e=t,n=void 0,i=function(){return function(e,t){var n,r,i,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]},a=Object.create(("function"==typeof Iterator?Iterator:Object).prototype);return a.next=s(0),a.throw=s(1),a.return=s(2),"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}(this,function(e){switch(e.label){case 0:return[4,(0,w.FdL)(U.VB,{})];case 1:return[2,e.sent().data.getMessageTemplateConfig]}})},new((r=void 0)||(r=Promise))(function(t,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var n;e.done?t(e.value):(n=e.value,n instanceof r?n:new r(function(e){e(n)})).then(a,s)}l((i=i.apply(e,n||[])).next())});var e,n,r,i},{enabled:m}),l.useEffect(function(){if(m){var e=function(){return x.getQueryData(U.Zo)},t=x.getQueryCache().subscribe(function(){var t=e();t&&(T.current=t)}),n=e();return n&&(T.current=n),function(){return t()}}},[m,x]);var C=(0,l.useMemo)(function(){var e=[o.A,s.A,a.Ay.configure({openOnClick:!1,HTMLAttributes:{target:"_blank",rel:"noopener noreferrer"}})];return m&&e.push(D.configure({dataSource:{getCategories:function(){return T.current.categories},getTemplates:function(){return T.current.templates}},getVariables:function(){return I.current}})),e},[m]),j=(0,i.hG)({extensions:C,content:n,onUpdate:function(e){var t=e.editor.getHTML();u("<p></p>"===t?"":t)}});return(0,l.useEffect)(function(){j&&n!==j.getHTML()&&n!==("<p></p>"===j.getHTML()?"":j.getHTML())&&j.commands.setContent(n||"")},[n,j]),(0,r.jsxs)("div",{className:"rich-text-editor",children:[!y&&(0,r.jsx)(B,{editor:j,enableEmoji:g}),(0,r.jsx)(i.$Z,{editor:j,style:{minHeight:p}})]})}},55813(e,t,n){n.d(t,{$n:()=>y,Pu:()=>h,VB:()=>f,VR:()=>b,Zo:()=>p,eT:()=>m,h0:()=>g,q6:()=>v});var r,i,o,a,s,l,c,u=n(2135),d=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},p=["messageTemplateConfig"],f=(0,u.J1)(r||(r=d(["\n  query GetMe
1ssageTemplateConfig {\n    getMessageTemplateConfig {\n      categories {\n        _id\n        name\n        description\n        order\n        createdAt\n        updatedAt\n      }\n      templates {\n        _id\n        name\n        categoryId\n        body\n        description\n        createdAt\n        updatedAt\n      }\n    }\n  }\n"],["\n  query GetMessageTemplateConfig {\n    getMessageTemplateConfig {\n      categories {\n        _id\n        name\n        description\n        order\n        createdAt\n        updatedAt\n      }\n      templates {\n        _id\n        name\n        categoryId\n        body\n        description\n        createdAt\n        updatedAt\n      }\n    }\n  }\n"]))),m=(0,u.J1)(i||(i=d(["\n  mutation CreateMessageTemplateCategory($input: CreateMacroCategoryInputType!) {\n    createMessageTemplateCategory(input: $input) {\n      _id\n    }\n  }\n"],["\n  mutation CreateMessageTemplateCategory($input: CreateMacroCategoryInputType!) {\n    createMessageTemplateCategory(input: $input) {\n      _id\n    }\n  }\n"]))),h=(0,u.J1)(o||(o=d(["\n  mutation UpdateMessageTemplateCategory($input: UpdateMacroCategoryInputType!) {\n    updateMessageTemplateCategory(input: $input) {\n      _id\n    }\n  }\n"],["\n  mutation UpdateMessageTemplateCategory($input: UpdateMacroCategoryInputType!) {\n    updateMessageTemplateCategory(input: $input) {\n      _id\n    }\n  }\n"]))),g=(0,u.J1)(a||(a=d(["\n  mutation DeleteMessageTemplateCategory($categoryId: String!) {\n    deleteMessageTemplateCategory(categoryId: $categoryId)\n  }\n"],["\n  mutation DeleteMessageTemplateCategory($categoryId: String!) {\n    deleteMessageTemplateCategory(categoryId: $categoryId)\n  }\n"]))),v=(0,u.J1)(s||(s=d(["\n  mutation CreateMessageTemplate($input: CreateMacroTemplateInputType!) {\n    createMessageTemplate(input: $input) {\n      _id\n    }\n  }\n"],["\n  mutation CreateMessageTemplate($input: CreateMacroTemplateInputType!) {\n    createMessageTemplate(input: $input) {\n      _id\n    }\n  }\n"]))),y=(0,u.J1)(l||(l=d(["\n  mutation UpdateMessageTemplate($input: UpdateMacroTemplateInputType!) {\n    updateMessageTemplate(input: $input) {\n      _id\n    }\n  }\n"],["\n  mutation UpdateMessageTemplate($input: UpdateMacroTemplateInputType!) {\n    updateMessageTemplate(input: $input) {\n      _id\n    }\n  }\n"]))),b=(0,u.J1)(c||(c=d(["\n  mutation DeleteMessageTemplate($templateId: String!) {\n    deleteMessageTemplate(templateId: $templateId)\n  }\n"],["\n  mutation DeleteMessageTemplate($templateId: String!) {\n    deleteMessageTemplate(templateId: $templateId)\n  }\n"])))}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.