1(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3295],{58601:function(r,e,n){(window.__NEXT_P=window.__NEXT_P||[]).push(["/auth/upload/blog/preview",function(){return n(11749)}])},63733:function(r,e,n){"use strict";var t=n(828),i=n(85893),o=n(67294),l=n(60253),c=n(79912),a=n(22318),s=n(40570);e.Z=function(r){var e=r.autoLink,n=r.maxHeight,d=r.text,u=r.style,f=(0,l.$G)().t,h=o.useRef(null),p=(0,t.Z)(o.useState(!1),2),x=p[0],v=p[1],g=(0,t.Z)(o.useState(!1),2),m=g[0],y=g[1],j=n||80,b=o.useMemo((function(){var r=d||"";return e?r.split(/(https?:\/\/[-a-zA-Z0-9@:%._+~#=]{1,256}\.[a-zA-Z0-9()]{1,6}\b(?:[-a-zA-Z0-9()@:%_+.~#?&//=]*))/).map((function(r,e){return e%2===0?(0,i.jsx)("span",{children:r},e):(0,i.jsx)("a",{href:r,target:"_blank",rel:"noopener noreferrer nofollow",children:r},e)})):r}),[e,d]);o.useEffect((function(){var r;((null===(r=h.current)||void 0===r?void 0:r.scrollHeight)||0)>j&&y(!0)}),[j]);var Z=o.useCallback((function(){return v((function(r){return!r}))}),[]);return(0,i.jsx)(i.Fragment,{children:(0,i.jsxs)(c.Z,{style:u,children:[(0,i.jsx)(a.Z,{ref:h,component:"p",variant:"body2",style:{position:"relative",maxHeight:m&&!x?"".concat(j,"px"):"none",overflow:"hidden",whiteSpace:"pre-wrap",overflowWrap:"break-word"},children:b}),m&&(0,i.jsx)("div",{style:{margin:"0 0 -16px -4px"},children:(0,i.jsx)(s.Z,{size:"small",onClick:Z,children:f(x?"show-less":"read-more")})})]})})}},59940:function(r,e,n){"use strict";var t=n(828),i=n(85893),o=n(67294);e.Z=function(r){var e=r.timestamp,n=(0,t.Z)(o.useState((function(){if(!e)return null;var r=new Date(e),n=function(r){return"0".concat(r).slice(-2)};return"".concat(r.getUTCFullYear(),"/").concat(n(r.getUTCMonth()+1),"/").concat(n(r.getUTCDate())," ").concat(n(r.getUTCHours()),":").concat(n(r.getUTCMinutes()))})),2),l=n[0],c=n[1];return o.useEffect((function(){if(e){var r=new Date(e),n=function(r){return"0".concat(r).slice(-2)};c("".concat(r.getFullYear(),"/").concat(n(r.getMonth()+1),"/").concat(n(r.getDate())," ").concat(n(r.getHours()),":").concat(n(r.getMinutes())))}}),[e]),l?(0,i.jsx)(i.Fragment,{children:l}):null}},59746:function(r,e,n){"use strict";n.d(e,{Z:function(){return b}});var t=n(828),i=n(85893),o=n(60357),l=n.n(o),c=n(67294),a=n(5152),s=n.n(a),d=n(26042),u=n(69396),f=n(29815),h=n(57555),p=function(r){var e=r.type,n=r.attrs,t=r.marks,i=r.content,o=[];if(i&&!(0,h.yD)(i)&&(o=i.map((function(r){return p(r)}))),"text"===e){for(var l=r.text||"",c=(t||[]).length-1;c>=0;c-=1){var a=null===t||void 0===t?void 0:t[c];"string"===typeof a?l={inline:!0,type:a,children:[l]}:a&&(l={inline:!0,type:a.type,attrs:a.attrs,children:[l]})}return l}return{inline:!1,type:e,attrs:n,children:o}},x=function(r,e){var n,t;return"string"!==typeof r&&"string"!==typeof e&&(!(!r.inline||!e.inline)&&(r.type===e.type&&(("link"!==r.type||(null===(n=r.attrs)||void 0===n?void 0:n.href)===(null===(t=e.attrs)||void 0===t?void 0:t.href))&&(0,u.Z)((0,d.Z)({},r),{children:(0,f.Z)(r.children).concat((0,f.Z)(e.children))}))))},v=function(r){if("string"!==typeof r){for(var e=r.children.length-2;e>=0;e-=1){var n=r.children[e],t=r.children[e+1],i=x(n,t);i&&r.children.splice(e,2,i)}for(var o=r.children.length-1;o>=0;o-=1)v(r.children[o])}},g={bold:function(r){var e=r.children;return(0,i.jsx)("strong",{children:e})},italic:function(r){var e=r.children;return(0,i.jsx)("em",{children:e})},link:function(r){var e,n=r.children,t=r.el;return"string"===typeof t||"string"!==typeof(null===(e=t.attrs)||void 0===e?void 0:e.href)?null:(0,i.jsx)("a",{href:t.attrs.href,target:"_blank",rel:"noopener noreferrer nofollow",children:n})},strike:function(r){var e=r.children;return(0,i.jsx)("s",{children:e})},underline:function(r){var e=r.children;return(0,i.jsx)("u",{children:e})},hard_break:function(){return(0,i.jsx)("br",{})},image:function(r){var e,n=r.el;return"string"===typeof n||"string"!==typeof(null===(e=n.attrs)||void 0===e?void 0:e.src)?null:(0,i.jsx)("img",{src:n.attrs.src,alt:""})},blockquote:function(r){var e=r.children;return(0,i.jsx)("blockquote",{children:e})},heading:function(r){var e,n=r.children,t=r.el;if("string"===typeof t)return null;switch(null===(e=t.attrs)||void 0===e?void 0:e.level){case 4:return(0,i.jsx)("h4",{children:n});case 5:return(0,i.jsx)("h5",{children:n});case 6:return(0,i.jsx)("h6",{children:n});default:return(0,i.jsx)("h3",{children:n})}},paragraph:function(r){var e=r.children;return(0,i.jsxs)("p",{children:[e,(0,i.jsx)("br",{})]})},code_block:function(r){var e=r.children;return(0,i.jsx)("pre",{spellCheck:!1,children:(0,i.jsx)("code",{children:e})})},bulletList:function(r){var e=r.children;return(0,i.jsx)("ul",{children:e})},orderedList:function(r){var e=r.children;return(0,i.jsx)("ol",{children:e})},listItem:function(r){var e=r.children;return(0,i.jsx)("li",{children:e})},ruby:function(r){var e=r.children;return(0,i.jsx)("ruby",{children:e})},rp:function(r){var e=r.children;return(0,i.jsx)("rp",{children:e})},rt:function(r){var e=r.children;return(0,i.jsx)("rt",{children:e})}},m=function(r){var e=r.el;if("string"===typeof e)return(0,i.jsx)(i.Fragment,{children:e});var n=e.children.map((function(r,e){return(0,i.jsx)(m,{el:r},e)})),t=g[e.type];return t?t({children:n,el:e}):(0,i.jsx)(i.Fragment,{children:n})},y=function(r){var e=r.body,n=c.useMemo((function(){var r=JSON.parse(e),n=p(r);return v(n),n}),[e]);if("string"===typeof n)return(0,i.jsx)(i.Fragment,{children:n});var t=n.children.map((function(r,e){return(0,i.jsx)(m,{el:r},e)}));return(0,i.jsx)("div",{className:"remirror-editor",children:t})},j=s()((function(){return Promise.all([n.e(6911),n.e(3726),n.e(7333),n.e(4885),n.e(1969)]).then(n.bind(n,51969))}),{loadableGenerated:{webpack:function(){return[51969]}},ssr:!1}),b=function(r){var e=r.body,n=(0,t.Z)(c.useState(!0),2),o=n[0],a=n[1],s=c.useCallback((function(){a(!1)}),[]);return(0,i.jsxs)(i.Fragment,{children:[o&&(0,i.jsx)(y,{body:e}),(0,i.jsx)("div",{className:"jsx-ff089504f0c8fb09 "+l().dynamic([["d97fd12200f9e0ef",[o?"none":"block"]]])+" container",children:(0,i.jsx)(j,{body:e,onReady:s})}),(0,i.jsx)(l(),{id:"d97fd12200f9e0ef",dynamic:[o?"none":"block"],children:".container.__jsx-style-dynamic-selector{display:".concat(o?"none":"block","}")}),(0,i.jsx)(l(),{id:"ff089504f0c8fb09",children:".remirror-editor{outline:none;overflow-wrap:break-word}.remirror-editor p{line-height:1.8;white-space:pre-wrap}.remirror-editor blockquote{margin:4px 0;padding:8px 0 8px 8px;
1border-left:8px solid#ccc;font-style:italic}.remirror-editor blockquote p{color:#888}.remirror-editor code{display:inline-block;padding:2px 3px 1px;border:1px solid rgba(29,28,29,.13);-webkit-border-radius:3px;-moz-border-radius:3px;border-radius:3px;background-color:rgba(29,28,29,.04);color:#e01e5a;font-family:monospace,monospace}.remirror-editor pre code{display:block;padding:8px}.remirror-editor h1{margin:16px 0 8px;font-size:22px}.remirror-editor h2{margin:16px 0 8px;font-size:22px}.remirror-editor h3{margin:16px 0 8px;font-size:22px}.remirror-editor h4{margin:16px 0 8px;font-size:20px}.remirror-editor h5{margin:16px 0 8px;font-size:20px}.remirror-editor h6{margin:16px 0 8px;font-size:20px}.remirror-editor img{display:block;width:100%;max-height:50vh;margin:16px 0;background-color:#f5f5f5;-o-object-fit:contain;object-fit:contain}.remirror-editor p{margin:0;font-size:18px}.remirror-editor ol{margin:0;padding:0 0 0 28px}.remirror-editor ol>li::marker{font-size:18px}.remirror-editor ul{margin:0;padding:0 0 0 28px}"})]})}},11749:function(r,e,n){"use strict";n.r(e),n.d(e,{__N_SSG:function(){return A}});var t=n(47568),i=n(828),o=n(20414),l=n(85893),c=n(67294),a=n(9008),s=n.n(a),d=n(11163),u=n(60253),f=n(72091),h=n(32427),p=n(18463),x=n(79912),v=n(33681),g=n(22318),m=n(8936),y=n(49384),j=n(61164),b=n(13048),Z=n(92674),k=n(1436),_=n(51189),w=n(15125),D=n(32265),S=n(62284),E=n(29077),C=n(86263),T=n(73844),z=n(35250),I=n(59746),N=(0,h.Z)((function(){return{root:{marginBottom:"16px",fontWeight:"bold",fontSize:"22px","@media (min-width: 728px)":{fontSize:"30px"}}}})),A=!0;e.default=function(){var r,e,n=(0,d.useRouter)().query,a="string"===typeof n.id?n.id:"",h=(0,b.Z)(a?"/auth/content/".concat(a,"?for=preview"):null),A=h.data,B=h.mutate,F=(0,u.$G)().t,L=N(),U=(0,f.Ds)().enqueueSnackbar,q=(0,Z.Z)(),H=(0,i.Z)((0,j.o)(),2),M=H[0].disabled,G=H[1],O=(0,i.Z)(c.useState(!1),2),P=O[0],R=O[1],W=null===A||void 0===A||null===(r=A.Collabo)||void 0===r?void 0:r.Original,X=null===A||void 0===A?void 0:A.Pages,Y=null===X||void 0===X?void 0:X[0],$='{"type":"doc","content":[{"type":"paragraph"}]}',J=(null===Y||void 0===Y?void 0:Y.Body)||$,K=!(null===X||void 0===X?void 0:X.length)||1===X.length&&J===$,Q=c.useCallback((function(){return R(!1)}),[]),V=c.useCallback((function(){return G({type:"SET_DISABLED",payload:!0})}),[G]),rr=c.useCallback((function(){return G({type:"SET_DISABLED",payload:!1})}),[G]),er=c.useCallback(function(){var r=(0,t.Z)((function(r){var e;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,B(r,!1)];case 1:return n.sent(),[3,3];case 2:return e=n.sent(),(0,y.kg)(e),[3,3];case 3:return[2]}}
1))}));return function(e){return r.apply(this,arguments)}}(),[B]),nr=c.useCallback((0,t.Z)((function(){var r,e;return(0,o.__generator)(this,(function(n){switch(n.label){case 0:if(K)return U(F("content-is-empty"),{variant:"error"}),[2];G({type:"SET_DISABLED",payload:!0}),n.label=1;case 1:if(n.trys.push([1,3,,4]),!(null===A||void 0===A?void 0:A.ID))throw new Error("content.ID is undefined");return[4,q("/auth/content/".concat(A.ID,"?for=validation"),{method:"GET"})];case 2:return(null===(r=n.sent())||void 0===r?void 0:r.isEmpty)?(U(F("content-is-empty"),{variant:"error"}),G({type:"SET_DISABLED",payload:!1}),[2]):[3,4];case 3:return e=n.sent(),(0,y.kg)(e),[3,4];case 4:return G({type:"SET_DISABLED",payload:!1}),R(!0),[2]}}))})),[null===A||void 0===A?void 0:A.ID,G,U,q,K,F]);return c.useEffect((function(){G({type:"SET_ON_PUBLISH",payload:nr})}),[G,nr]),(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(s(),{children:(0,l.jsx)("title",{children:"Baskadia"})}),!A&&(0,l.jsx)(v.Z,{}),A&&(0,l.jsxs)(S.Z,{component:"main",style:{margin:"16px auto"},children:[(0,l.jsxs)(C.Z,{children:[(0,l.jsx)(T.Z,{children:(0,l.jsx)(w.Z,{content:A})}),(null===W||void 0===W?void 0:W.ID)&&W.ID!==A.ID&&!W.DeletedAt&&(0,l.jsx)(T.Z,{children:(0,l.jsx)(_.Z,{collabo:A.Collabo})}),K&&(0,l.jsx)(T.Z,{children:(0,l.jsx)(m.Z,{severity:"error",variant:"filled",children:F("content-is-empty")})}),!K&&1===X.length&&(0,l.jsx)(T.Z,{children:(0,l.jsxs)(p.Z,{children:[A.Img&&(0,l.jsx)(z.Z,{content:A}),(0,l.jsxs)(x.Z,{children:[(null===Y||void 0===Y?void 0:Y.Title)&&(0,l.jsx)(g.Z,{classes:L,component:"h3",variant:"h5",children:Y.Title}),(0,l.jsx)(I.Z,{body:J})]})]})}),((null===X||void 0===X?void 0:X.length)||0)>1&&(0,l.jsx)(T.Z,{children:(0,l.jsx)(k.Z,{content:A})}),!!(null===A||void 0===A||null===(e=A.Tags)||void 0===e?void 0:e.length)&&(0,l.jsx)(T.Z,{children:(0,l.jsx)(D.Z,{tags:A.Tags})})]}),(0,l.jsx)(E.Z,{content:A,disabled:M,open:P,onClose:Q,onDisable:V,onEnable:rr,onContentUpdate:er})]})]})}}},function(r){r.O(0,[3576,4116,3138,2387,4794,9803,3322,3518,5992,7555,9920,8477,9717,9774,2888,179],(function(){return e=58601,r(r.s=e);var e}));var e=r.O();_N_E=e}]);
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.