(window.webpackJsonp=window.webpackJsonp||[]).push([[0,171,410,422,444,513,521,528,831],{529:function(c,l,s){"use strict";s.r(l);var i=function(){var h=this,r=h._self._c;return h.hasSlot?r("span",{staticClass:"inline-block"},[r("span",{staticClass:"circle-bg relative"},[r("svg",{staticClass:"absolute inline-block fill-current",attrs:{"aria-hidden":"true",viewBox:"0 0 512 512",focusable:"false"}},[r("path",{attrs:{d:h.path}})]),h._v(" "),r("div",{staticClass:"relative flex text-center"},[h._t("default")],2)])]):r("svg",{staticClass:"inline-block fill-current",attrs:{"aria-hidden":"true",viewBox:"0 0 512 512",focusable:"false"}},[r("path",{attrs:{d:h.path}})])},d=[],f={data:function(){return{hasSlot:this.$slots.default&&this.$slots.default.length,path:"M256 8c137 0 248 111 248 248s-111 248-248 248-248-111-248-248 111-248 248-248z"}}},j=f,g=s(572),y=s(1),P=Object(y.a)(j,i,d,!1,null,"8d659606",null),v=l.default=P.exports},551:function(c,l,s){var i=s(573);i.__esModule&&(i=i.default),typeof i=="string"&&(i=[[c.i,i,""]]),i.locals&&(c.exports=i.locals);var d=s(47).default,f=d("77ca2618",i,!0,{sourceMap:!1})},555:function(c,l,s){"use strict";s.r(l);var i=function(){var o,e=this,t=e._self._c;return e.url?t("div",{staticClass:"image-click flex select-none items-center justify-center",class:{rounded:!e.masonry&&e.rounded,relative:e.relative,selected:e.selectable&&e.localSelected,"cursor-pointer":e.selectable,"media-thumbnail":!e.sizeable},style:e.aspectRatio,on:{click:e.clickHandler,mouseover:e.startPreview,mouseout:e.stopPreview}},[e.localSelected&&e.showSelected?t("IconSelected",{staticClass:"icon-shadow absolute z-10"}):e._e(),e._v(" "),t("transition",{attrs:{name:"fade"}},[e.isVideo&&!e.hidePrivate&&!e.showPreview&&e.canPreview?t("div",{class:[{"h-10 w-10":e.size==="large","h-7 w-7":e.size!=="large"},"pointer-events-none absolute flex items-center justify-center rounded-full bg-black bg-opacity-75"]},[t("IconPlay",{class:[{"h-4 w-4":e.size==="large","h-3 w-3":e.size!=="large"},"ml-0.5 text-white"]})],1):e._e(),e._v(" "),e.isGif&&!e.showPreview&&e.canPreview?t("div",{staticClass:"pointer-events-none absolute rounded-full bg-black bg-opacity-75 px-2 pb-0.5 pt-1 text-sm font-medium text-white"},[e._v(` GIF `)]):e._e()]),e._v(" "),e.media.private?t("IconLock",{staticClass:"icon-shadow absolute left-0 top-0 m-2 w-3 text-white",attrs:{title:"Image is in a private album"}}):e._e(),e._v(" "),e.hidePrivate?t("span",{staticClass:"absolute inset-0 flex items-center justify-center text-color",class:{"text-white":((o=e.media.sizes)===null||o===void 0?void 0:o.colour)==="b"},domProps:{innerHTML:e._s(e.text)}}):e._e(),e._v(" "),e.loaded?e._t("default"):e._e(),e._v(" "),!e.isPhoto&&!e.selectable&&e.canPreview?t("video",{ref:"video",class:e.mediaClasses,attrs:{loading:e.loading,poster:e.url,preload:"none",src:e.videoUrl,loop:e.isGif,muted:"",playsinline:""},domProps:{muted:!0}}):t("img",{staticClass:"pointer-events-none h-full w-full bg-color-dark object-cover",class:{rounded:e.roundedBottom&&!e.masonry&&e.rounded,"rounded-t":!e.roundedBottom&&!e.masonry,"aspect-square":!e.masonry&&e.rounded},attrs:{loading:e.loading,src:e.url},on:{load:e.load}}),e._v(" "),!e.media.moderatedAt&&e.t?t("div",{staticClass:"absolute inset-0 top-auto bg-black bg-opacity-75 py-0.5 text-center text-sm text-white",class:{"bottom-5":e.stats}},[e._v(` `+e._s(e.t.pending_approval)+` `)]):e._e(),e._v(" "),t("transition",{attrs:{name:"fade"}},[e.stats&&typeof e.media.likesCount!="undefined"&&e.loaded&&!e.showPreview?t("div",{staticClass:"stats pointer-events-none flex justify-between text-xs text-white"},[t("div",{staticClass:"absolute bottom-1 left-1 flex items-center rounded bg-black bg-opacity-75 px-1 py-0.5"},[e.stat==="comments"?[t("IconComment",{staticClass:"mr-1 w-3 text-white"}),e._v(" "+e._s(e.media.commentsCount)+" ")]:e._e(),e._v(" "),e.stat==="likes"?[t("IconLike",{staticClass:"mr-1 w-3 text-white"}),e._v(" "+e._s(e.media.likesCount)+" ")]:e._e(),e._v(" "),e.stat==="views"?[e._v(" "+e._s(e.media.viewsText)+" ")]:e._e()],2),e._v(" "),e.isVideo?t("div",{staticClass:"absolute bottom-1 right-1 flex items-center rounded bg-black bg-opacity-75 px-1 py-0.5"},[e._v(` `+e._s(e.media.duration)+` `)]):e._e()]):e._e()])],2):e._e()},d=[],f=s(22),j=s(46),g={name:"MediaThumbnail",props:{canPreview:{type:Boolean,default:!0},canViewPrivate:{type:Boolean,default:!1},gt:{type:Object,default:function(){return this.$store.state.gt.common}},loading:{type:String,default:"lazy"},masonry:{type:Boolean,default:!1},media:{type:Object,required:!0},relative:{type:Boolean,default:!0},rounded:{type:Boolean,default:!0},roundedBottom:{type:Boolean,default:!0},selectable:{type:Boolean,default:!1},selected:{type:Boolean,default:!1},showSelected:{type:Boolean,default:!0},size:{type:String,default:"large-thumbnail"},sizeable:{type:Boolean,default:!1},stat:{type:String,default:"likes",validator:function(o){return["comments","likes","views"].indexOf(o)!==-1}},stats:{type:Boolean,default:!0},t:{type:Object,default:null}},emits:["load"],data:function(){return{showPreview:!1,loaded:!1,localSelected:this.selected,previewPending:!1}},computed:{aspectRatio:function(){return this.masonry?!this.media.aspectRatio||this.size==="large-thumbnail"?"aspect-ratio: 1/1":"aspect-ratio: ".concat(this.media.aspectRatio.w,"/").concat(this.media.aspectRatio.h):""},mediaKey:function(){var o;return(o=this.media)!==null&&o!==void 0&&o.sizes?"sizes":"media"},hidePrivate:function(){return!this.media.sizes||this.media.album&&this.media.album.private&&!this.canViewPrivate||this.isAdult},isAdult:function(){var o;return(o=this.media.sizes)===null||o===void 0?void 0:o.adult},isGif:function(){return this.media.duration==="GIF"},isPhoto:function(){return!this.isVideo&&!this.isGif},isVideo:function(){return this.media.mediaSetId===5&&!this.isGif},mediaClasses:function(){return["pointer-events-none h-full w-full bg-color-dark",{rounded:this.roundedBottom&&!this.masonry,"object-cover":!this.masonry,"rounded-t":!this.roundedBottom&&!this.masonry,"aspect-square":!this.masonry}]},text:function(){return this.hidePrivate?this.isAdult?this.gt.eighteen_over:this.gt.private:""},url:function(){var o,e;if(this.media.sizes){if((this.isVideo||this.isGif)&&!this.isAdult)return this.media.sizes.large_video_thumbnail&&this.size==="large"?this.media.sizes.large_video_thumbnail:this.media.sizes["video-thumbnail"];if(this.media.sizes.large&&this.size==="large")return this.media.sizes.large;if(this.media.sizes["large-thumbnail"]&&this.size==="large-thumbnail")return this.media.sizes["large-thumbnail"];if(this.media.sizes.medium)return this.media.sizes.medium;if(this.media.sizes.smallcover)return this.media.sizes.smallcover}return((o=this.media)===null||o===void 0||(e=o.sizes)===null||e===void 0?void 0:e.medium)||"#"},videoUrl:function(){var o,e,t,a;return(this.size==="large"?(o=this.media)===null||o===void 0||(e=o.sizes)===null||e===void 0?void 0:e["video-480"]:(t=this.media)===null||t===void 0||(a=t.sizes)===null||a===void 0?void 0:a["video-small"])||"#"}},mounted:function(){var o=this;this.$on("reset",function(){o.localSelected=!1,o.$forceUpdate()}),this.isPhoto||(this.loaded=!0)},methods:{clickHandler:function(){this.selectable&&(this.localSelected?this.$emit("media-unselected",this.media):this.$emit("media-selected",this.media),this.localSelected=!this.localSelected)},load:function(){this.$emit("load"),this.loaded=!0},startPreview:function(){var o=this;this.selectable||!this.canPreview||this.isPhoto||(this.previewPending=!0,setTimeout(function(){if(o.previewPending){var e,t;o.showPreview=!0,(e=o.$refs)===null||e===void 0||(t=e.video)===null||t===void 0||t.play().catch(function(){})}},300))},stopPreview:function(){var o,e,t,a;this.previewPending=!1,this.showPreview=!1,(o=this.$refs)===null||o===void 0||(e=o.video)===null||e===void 0||e.pause(),(t=this.$refs)===null||t===void 0||(a=t.video)===null||a===void 0||a.load()}}},y=g,P=s(591),v=s(1),u=Object(v.a)(y,i,d,!1,null,null,null),h=l.default=u.exports;installComponents(u,{IconSelected:s(590).default,IconPlay:s(584).default,IconLock:s(537).default,IconComment:s(206).default,IconLike:s(536).default})},556:function(c,l,s){var i=s(592);i.__esModule&&(i=i.default),typeof i=="string"&&(i=[[c.i,i,""]]),i.locals&&(c.exports=i.locals);var d=s(47).default,f=d("64b85d28",i,!0,{sourceMap:!1})},559:function(c,l,s){"use strict";s.r(l);var i=function(){var r=this,o=r._self._c;return o("IconCircle",{staticClass:"cursor-pointer text-error"},[o("IconTimes",{staticClass:"text-white"})],1)},d=[],f=s(529),j=s(328),g={name:"IconDelete",components:{IconCircle:f.default,IconTimes:j.default}},y=g,P=s(1),v=Object(P.a)(y,i,d,!1,null,null,null),u=l.default=v.exports;installComponents(v,{IconTimes:s(328).default,IconCircle:s(529).default})},572:function(c,l,s){"use strict";var i=s(551),d=s.n(i)},573:function(c,l,s){var i=s(34),d=i(!1);d.push([c.i,".circle-bg[data-v-8d659606],.circle-bg div[data-v-8d659606],.circle-bg svg[data-v-8d659606]{height:32px;width:32px}.circle-bg div[data-v-8d659606]{align-items:center;justify-content:center}.circle-bg div>svg[data-v-8d659606]{height:16px;width:16px}",""]),c.exports=d},580:function(c,l,s){var i=s(628);i.__esModule&&(i=i.default),typeof i=="string"&&(i=[[c.i,i,""]]),i.locals&&(c.exports=i.locals);var d=s(47).default,f=d("77e2503f",i,!0,{sourceMap:!1})},581:function(c,l,s){"use strict";s.r(l);var i=s(18),d=function(){var e=this,t=e._self._c;return t("div",{staticClass:"flex h-56 flex-wrap overflow-y-auto",class:{"menu absolute":e.menu,"right-0 left-auto":e.align==="right","left-0 right-auto":e.align==="left"}},e._l(e.emoji,function(a,p){return t("div",{key:p,staticClass:"flex justify-center items-end min-w-[32px] hover:bg-color-lightest",on:{click:function(O){return O.stopPropagation(),O.preventDefault(),e.$emit("insert",a)}}},[e.useImageEmoji&&a.src?t("img",{staticClass:"cursor-pointer p-1",attrs:{src:a.src}}):a.unicode?t("div",{staticClass:"h-12 w-12 cursor-pointer p-1 text-3xl"},[e._v(` `+e._s(a.unicode)+` `)]):a.type==="sprite"?t("div",{staticClass:"h-12 w-12 cursor-pointer p-1 text-3xl"},[t("i",{class:"emote emote-".concat(a.name)})]):e._e()])}),0)},f=[],j=s(11),g=s(6),y=s(208),P={name:"SiteEmojiPicker",props:{align:{type:String,default:"right"},menu:{default:!0,type:Boolean},useImageEmoji:{type:Boolean,default:!1},useSpriteEmoji:{type:Boolean,default:!0}},data:function(){var e=this;return{emoji:Object(y.b)().filter(function(t){return t.type==="sprite"&&e.useSpriteEmoji?!0:e.useImageEmoji?t.shortcode:t.unicode})}}},v=P,u=s(1),h=Object(u.a)(v,d,f,!1,null,null,null),r=l.default=h.exports},582:function(c,l,s){"use strict";s.r(l);var i=function(){var v=this,u=v._self._c;return u("svg",{staticClass:"inline-block fill-current",attrs:{"aria-hidden":"true",viewBox:"0 0 496 512",focusable:"false"}},[u("path",{attrs:{d:"M248 8C111 8 0 119 0 256s111 248 248 248 248-111 248-248S385 8 248 8zm0 448c-110.3 0-200-89.7-200-200S137.7 56 248 56s200 89.7 200 200-89.7 200-200 200zm-80-216c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm160 0c17.7 0 32-14.3 32-32s-14.3-32-32-32-32 14.3-32 32 14.3 32 32 32zm4 72.6c-20.8 25-51.5 39.4-84 39.4s-63.2-14.3-84-39.4c-8.5-10.2-23.7-11.5-33.8-3.1-10.2 8.5-11.5 23.6-3.1 33.8 30 36 74.1 56.6 120.9 56.6s90.9-20.6 120.9-56.6c8.5-10.2 7.1-25.3-3.1-33.8-10.1-8.4-25.3-7.1-33.8 3.1z"}})])},d=[],f=s(1),j={},g=Object(f.a)(j,i,d,!1,null,null,null),y=l.default=g.exports},583:function(c,l,s){"use strict";s.r(l);var i=function(){var v=this,u=v._self._c;return u("svg",{staticClass:"inline-block fill-current",attrs:{"aria-hidden":"true",viewBox:"0 0 512 512",focusable:"false"}},[u("path",{attrs:{d:"M199.1 32c-24.1 0-45.5 15.4-53.1 38.3l22.8 7.6-22.8-7.6L137.4 96 64 96C28.7 96 0 124.7 0 160L0 416c0 35.3 28.7 64 64 64l384 0c35.3 0 64-28.7 64-64l0-256c0-35.3-28.7-64-64-64l-73.4 0-8.6-25.7C358.4 47.4 337 32 312.9 32L199.1 32zm-7.6 53.5c1.1-3.3 4.1-5.5 7.6-5.5l113.9 0c3.4 0 6.5 2.2 7.6 5.5l14 42.1c3.3 9.8 12.4 16.4 22.8 16.4l90.7 0c8.8 0 16 7.2 16 16l0 256c0 8.8-7.2 16-16 16L64 432c-8.8 0-16-7.2-16-16l0-256c0-8.8 7.2-16 16-16l90.7 0c10.3 0 19.5-6.6 22.8-16.4l14-42.1zM256 400a112 112 0 1 0 0-224 112 112 0 1 0 0 224zM192 288a64 64 0 1 1 128 0 64 64 0 1 1 -128 0z"}})])},d=[],f=s(1),j={},g=Object(f.a)(j,i,d,!1,null,null,null),y=l.default=g.exports},584:function(c,l,s){"use strict";s.r(l);var i=function(){var u=this,h=u._self._c;return h("svg",{staticClass:"inline-block fill-current",attrs:{"aria-hidden":"true",viewBox:"0 0 448 512",focusable:"false"}},[u.title?h("title",[u._v(u._s(u.title))]):u._e(),u._v(" "),h("path",{attrs:{d:"M424.4 214.7L72.4 6.6C43.8-10.3 0 6.1 0 47.9V464c0 37.5 40.7 60.1 72.4 41.3l352-208c31.4-18.5 31.5-64.1 0-82.6z"}})])},d=[],f={props:{title:{default:"",type:String}}},j=f,g=s(1),y=Object(g.a)(j,i,d,!1,null,null,null),P=l.default=y.exports},585:function(c,l,s){"use strict";var i=s(22),d=s.n(i),f=s(11),j=s.n(f),g=s(53),y=s.n(g),P=s(66),v=s.n(P),u=s(157),h=s.n(u),r=s(18),o=s.n(r),e=s(6),t=s.n(e),a=s(21),p=s.n(a),m=s(38),O=s.n(m);l.a={data:function(){return{cursor:{start:null,end:null,node:null},editableElement:null,medias:this.existingMedia||[],showEmojiPicker:!1}},mounted:function(){window.addEventListener("click",this.hideEmoji)},destroyed:function(){window.removeEventListener("click",this.hideEmoji)},methods:{focus:function(){this.editableElement.focus()},focusCursor:function(){var n=this.resetSelection(),_=n.range,E=n.selection;E.addRange(_)},focusEnd:function(){var n=document.createRange();n.selectNodeContents(this.editableElement),n.collapse(!1);var _=window.getSelection();_.removeAllRanges(),_.addRange(n)},insertExternal:function(n){var _=n.type,E=n.url,b=document.createElement("a");b.contentEditable=!1,b.href=E,b.innerText=E,b.dataset.type=_,this.insertElement(b,!1)},insertElement:function(n){var _=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,E=!this.field.$model,b=this.resetSelection(),C=b.range,M=b.selection;C.insertNode(n),C.setStartAfter(n),E&&_&&this.insertText(" ",C,M);for(var S=this.cursor.node||this.editableElement,I=0;I<S.parentNode.childNodes.length;I+=1)S.parentNode.childNodes[I]===n&&M.collapse(S.parentNode.childNodes[I+1]);this.field.$model=this.editableElement.innerHTML,this.vpContent=this.editableElement.innerHTML},insertSprite:function(n){var _=document.createElement("i");_.contentEditable=!1,_.classList.add("emote"),_.classList.add("emote-".concat(n.name)),_.innerHTML=" ",this.insertElement(_)},resetSelection:function(){var n=window.getSelection(),_=document.createRange();return _.setStart(this.cursor.node||this.editableElement,this.cursor.start||0),_.setEnd(this.cursor.node||this.editableElement,this.cursor.end||0),n.removeAllRanges(),n.addRange(_),{range:_,selection:n}},sanitizePaste:function(n){n.preventDefault();var _="";window.clipboardData?_=window.clipboardData.getData("Text"):_=n.clipboardData.getData("text/plain");var E=window.getSelection(),b=E.getRangeAt(0);this.insertText(_,b,E),this.update()},savePosition:function(){var n=window.getSelection();n.anchorNode&&(n.anchorNode===this.editableElement||n.anchorNode.parentNode===this.editableElement||n.anchorNode.parentNode&&n.anchorNode.parentNode.parentNode===this.editableElement)?(this.cursor.start=n.anchorOffset,this.cursor.end=n.focusOffset,this.cursor.node=n.anchorNode):(this.cursor.start=null,this.cursor.end=null,this.cursor.node=null)},showEmoji:function(){this.savePosition(),this.showEmojiPicker=!this.showEmojiPicker},showMediaPicker:function(){this.savePosition(),this.$store.dispatch("showMediaPicker",this.mediaPickerData)},addMedia:function(n){if(n.type){this.insertExternal(n);return}if(this.medias.length+n.length<=this.maxMedia)this.medias=this.medias.concat(n);else{var _,E=this.maxMedia-this.medias.length;this.medias=this.medias.concat(n.slice(0,E)),this.$store.dispatch("notify",{msg:(_=this.gt.common.media_limit)===null||_===void 0?void 0:_.replace("%count",E).replace("%max_media",this.maxMedia)})}var b=this.medias.map(function(C){return C.id});this.medias=this.medias.filter(function(C,M){return b.indexOf(C.id)===M}),this.$emit("update-media",this.medias.map(function(C){return C.id}))},removeMedia:function(n){var _=this.medias.indexOf(n);this.medias.splice(_,1),this.$emit("update-media",this.medias.map(function(E){return E.id}))},resetMedia:function(){this.medias=[]},hideEmoji:function(){this.showEmojiPicker=!1}}}},590:function(c,l,s){"use strict";s.r(l);var i=function(){var r=this,o=r._self._c;return o("IconCircle",{staticClass:"text-black"},[o("IconCheck",{staticClass:"text-white"})],1)},d=[],f=s(202),j=s(529),g={name:"IconSelected",components:{IconCircle:j.default,IconCheck:f.default}},y=g,P=s(1),v=Object(P.a)(y,i,d,!1,null,null,null),u=l.default=v.exports;installComponents(v,{IconCheck:s(202).default,IconCircle:s(529).default})},591:function(c,l,s){"use strict";var i=s(556),d=s.n(i)},592:function(c,l,s){var i=s(34),d=i(!1);d.push([c.i,".media-thumbnail{height:150px;width:150px}.stats img{filter:grayscale(.7)}",""]),c.exports=d},613:function(c,l,s){"use strict";s.r(l);var i=function(){var t=this,a=t._self._c;return a("div",{staticClass:"input relative rounded border text-color",class:{"bg-color":!t.greyBg,"border-transparent bg-color-lightest ":t.greyBg,"border-primary hover:border-primary":t.hasFocus&&!t.secondaryStyling,"border-secondary hover:border-secondary":t.hasFocus&&t.secondaryStyling}},[a("div",{class:{"flex-col":!t.compact,flex:t.compact}},[a("div",{ref:"textbox",staticClass:"input animate-height flex-grow",class:[{"has-value":t.hasFocus||t.field.$model,"px-2 py-1":t.compact,"px-3 pb-1 pt-4":!t.compact},t.height],attrs:{placeholder:t.placeholder,contenteditable:""},on:{change:t.update,paste:t.sanitizePaste,keyup:t.update,click:t.checkPermissions,keydown:function(m){return!m.type.indexOf("key")&&t._k(m.keyCode,"enter",13,m.key,"Enter")?null:t.submit.apply(null,arguments)},focus:function(){t.$emit("focus"),t.hasFocus=!0}}}),t._v(" "),a("label",{staticClass:"pointer-events-none absolute cursor-text rounded px-1 text-color",class:{"compact-label":t.compact}},[t._v(` `+t._s(t.field.label)+` `)]),t._v(" "),a("div",{ref:"textboxButtons",staticClass:"flex cursor-text",on:{click:t.focus}},[t.field.$model&&t.showSend?a("SiteButton",{staticClass:"!px-3 !py-2 text-color-light hover:bg-color-light",attrs:{type:"link"},nativeOn:{click:function(m){return m.stopPropagation(),t.submit.apply(null,arguments)}}},[a("i",{staticClass:"fa fa-share"})]):t._e(),t._v(" "),a("div",{staticClass:"ml-auto flex",class:{buttons:!t.compact}},[t.emojiPicker&&!t.compact?a("SiteButton",{ref:"editorEmoji",staticClass:"relative !px-3 !py-2 text-color-light hover:bg-color-light",attrs:{type:"link"},nativeOn:{click:function(m){return m.preventDefault(),m.stopPropagation(),t.showEmoji.apply(null,arguments)},blur:function(m){t.showEmojiPicker=!1}}},[a("IconSmile"),t._v(" "),t.showEmojiPicker?a("SiteEmojiPicker",{staticClass:"w-64 md:w-96",on:{insert:t.insertEmoji}}):t._e()],1):t._e(),t._v(" "),t.medias.length<t.maxMedia?a("SiteButton",{staticClass:"!px-3 !py-2 text-color-light hover:bg-color-light",attrs:{type:"link"},nativeOn:{click:function(m){return m.preventDefault(),m.stopPropagation(),t.showMediaPicker.apply(null,arguments)}}},[a("IconCameraHollow")],1):t._e()],1)],1)]),t._v(" "),t.medias.length?a("div",{staticClass:"flex flex-wrap"},[t._l(t.medias,function(p){return a("MediaThumbnail",{key:p.id,staticClass:"m-2 h-24 w-24",attrs:{media:p,sizeable:!0,stats:!1,"can-view-adult":!0,"can-view-private":t.showPrivateMedia}},[a("IconDelete",{staticClass:"absolute right-0 top-0",nativeOn:{click:function(O){return t.removeMedia(p)}}})],1)}),t._v(" "),t.medias.length&&t.medias.length<t.maxMedia?a("SiteButton",{staticClass:"m-2 h-24 w-24 text-color-light",nativeOn:{click:function(m){return m.preventDefault(),t.showMediaPicker.apply(null,arguments)}}},[a("IconPlus"),t._v(" "),a("div",[t._v(t._s(t.gt.common.add_media))])],1):t._e()],2):t._e()])},d=[],f=s(53),j=s(199),g=s(5),y=s(585),P={name:"SiteInputTextBox",mixins:[y.a],inject:{showPrivateMedia:{name:"showPrivateMedia",default:!1}},props:{compact:{type:Boolean,default:!1},emojiPicker:{type:Boolean,default:!0},externalImages:{type:Boolean,default:!1},field:{type:Object,required:!0},greyBg:{type:Boolean,default:!1},height:{type:String,default:"medium",validator:function(t){return["tiny","small","medium","large"].indexOf(t)!==-1}},maxMedia:{type:Number,default:6},placeholder:{type:String,default:""},postType:{type:String,default:null},secondaryStyling:{type:Boolean,default:!1},showSend:{type:Boolean,default:!1},showUpload:{type:Boolean,default:!1}},data:function(){return{emojiPosition:"right",hasFocus:!1,medias:[],mediaPickerData:{callback:this.addMedia,emitSelectedOnClick:!1,externalImages:this.externalImages,showPrivate:this.showPrivateMedia,showUpload:this.showUpload}}},computed:Object(g.e)(["gt"]),mounted:function(){this.setContent(this.field.$model),this.editableElement=this.$refs.textbox,document.body.addEventListener("click",this.clickHandler)},destroy:function(){document.body.removeEventListener("click",this.clickHandler)},methods:{clickHandler:function(t){this.$el!==t.target&&!this.$el.contains(t.target)&&(this.$emit("blur"),this.hasFocus=!1)},checkPermissions:function(){this.$emit("check-permissions")},insertText:function(t,a,p){if(document.queryCommandSupported("insertText"))document.execCommand("insertText",!1,t);else{var m=document.createTextNode(t);a.deleteContents(),a.insertNode(m),a.setStartAfter(m),a.collapse(!0),p.removeAllRanges(),p.addRange(a)}},insertUnicode:function(t){var a=this.resetSelection(),p=a.range,m=a.selection;this.insertText("".concat(t.unicode),p,m)},insertEmoji:function(t){this.focus(),t.type==="sprite"?this.insertSprite(t):this.insertUnicode(t),this.update(),this.showEmojiPicker=!1},resetMedia:function(){this.medias=[]},setContent:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"";this.$refs.textbox.innerHTML=t},setEmojiPosition:function(){this.$refs.textboxButtons.offsetLeft===0?this.emojiPosition="left":this.emojiPosition="right"},submit:function(t){!t.shiftKey&&this.compact&&(t.preventDefault(),this.field.$model&&(this.$emit("submit",this.medias.map(function(a){return a.id})),this.medias=[],this.$refs.textbox.blur()))},update:function(){this.$refs.textbox.innerHTML==="<br>"&&this.setContent(),this.$emit("input",this.$refs.textbox.innerHTML),this.field.$model=this.$refs.textbox.innerHTML,this.setEmojiPosition()}}},v=P,u=s(627),h=s(1),r=Object(h.a)(v,i,d,!1,null,"7762c1e8",null),o=l.default=r.exports;installComponents(r,{SiteButton:s(85).default,IconSmile:s(582).default,SiteEmojiPicker:s(581).default,IconCameraHollow:s(583).default,IconDelete:s(559).default,MediaThumbnail:s(555).default,IconPlus:s(207).default})},627:function(c,l,s){"use strict";var i=s(580),d=s.n(i)},628:function(c,l,s){var i=s(34),d=i(!1);d.push([c.i,"label[data-v-7762c1e8]{left:10px;top:12px;transform-origin:left top;transition:transform .15s cubic-bezier(.4,0,.2,1),color .15s cubic-bezier(.4,0,.2,1),width .15s}.compact-label[data-v-7762c1e8]{transform:translateY(-4px)}div.animate-height[data-v-7762c1e8]{transition:min-height .15s ease-in-out,border-color .15s ease-in-out}.input.has-value~label[data-v-7762c1e8],.input:focus~label[data-v-7762c1e8]{transform:translateY(-35%) scale(.75);width:auto}.input[data-v-7762c1e8]{transition:border-color .15s ease-in-out}.input[placeholder][data-v-7762c1e8]:empty:before{color:#888;content:attr(placeholder)}.tiny[data-v-7762c1e8]{min-height:40px}.small[data-v-7762c1e8]{min-height:56px}.medium[data-v-7762c1e8]{min-height:96px}.large[data-v-7762c1e8]{min-height:160px}.input[data-v-7762c1e8]:focus{outline-style:none}button[data-v-7762c1e8]{transition:transform .15s ease-in-out}.buttons button[data-v-7762c1e8]{transform:translateX(-2px) translateY(-2px)}.menu[data-v-7762c1e8]{bottom:50px;height:250px;transition:height .75s}",""]),c.exports=d}}]);