tj
2025-06-05 bba272999cc546f65781bf3d20245a3f819af67f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
(self["webpackChunklin_cms_vue"]=self["webpackChunklin_cms_vue"]||[]).push([[1789,4620],{40377:function(e,t){var n,o,r;
/** @license
 * eventsource.js
 * Available under MIT License (MIT)
 * https://github.com/Yaffle/EventSource/
 */(function(i){"use strict";var a=i.setTimeout,s=i.clearTimeout,c=i.XMLHttpRequest,u=i.XDomainRequest,d=i.ActiveXObject,f=i.EventSource,l=i.document,h=i.Promise,p=i.fetch,v=i.Response,y=i.TextDecoder,g=i.TextEncoder,w=i.AbortController;if("undefined"===typeof window||"undefined"===typeof l||"readyState"in l||null!=l.body||(l.readyState="loading",window.addEventListener("load",(function(e){l.readyState="complete"}),!1)),null==c&&null!=d&&(c=function(){return new d("Microsoft.XMLHTTP")}),void 0==Object.create&&(Object.create=function(e){function t(){}return t.prototype=e,new t}),Date.now||(Date.now=function(){return(new Date).getTime()}),void 0==w){var m=p;p=function(e,t){var n=t.signal;return m(e,{headers:t.headers,credentials:t.credentials,cache:t.cache}).then((function(e){var t=e.body.getReader();return n._reader=t,n._aborted&&n._reader.cancel(),{status:e.status,statusText:e.statusText,headers:e.headers,body:{getReader:function(){return t}}}}))},w=function(){this.signal={_reader:null,_aborted:!1},this.abort=function(){null!=this.signal._reader&&this.signal._reader.cancel(),this.signal._aborted=!0}}}function C(){this.bitsNeeded=0,this.codePoint=0}C.prototype.decode=function(e){function t(e,t,n){if(1===n)return e>=128>>t&&e<<t<=2047;if(2===n)return e>=2048>>t&&e<<t<=55295||e>=57344>>t&&e<<t<=65535;if(3===n)return e>=65536>>t&&e<<t<=1114111;throw new Error}function n(e,t){if(6===e)return t>>6>15?3:t>31?2:1;if(12===e)return t>15?3:2;if(18===e)return 3;throw new Error}for(var o=65533,r="",i=this.bitsNeeded,a=this.codePoint,s=0;s<e.length;s+=1){var c=e[s];0!==i&&(c<128||c>191||!t(a<<6|63&c,i-6,n(i,a)))&&(i=0,a=o,r+=String.fromCharCode(a)),0===i?(c>=0&&c<=127?(i=0,a=c):c>=192&&c<=223?(i=6,a=31&c):c>=224&&c<=239?(i=12,a=15&c):c>=240&&c<=247?(i=18,a=7&c):(i=0,a=o),0===i||t(a,i,n(i,a))||(i=0,a=o)):(i-=6,a=a<<6|63&c),0===i&&(a<=65535?r+=String.fromCharCode(a):(r+=String.fromCharCode(55296+(a-65535-1>>10)),r+=String.fromCharCode(56320+(a-65535-1&1023))))}return this.bitsNeeded=i,this.codePoint=a,r};var E=function(){try{return"test"===(new y).decode((new g).encode("test"),{stream:!0})}catch(e){console.debug("TextDecoder does not support streaming option. Using polyfill instead: "+e)}return!1};void 0!=y&&void 0!=g&&E()||(y=C);var b=function(){};function T(e){this.withCredentials=!1,this.readyState=0,this.status=0,this.statusText="",this.responseText="",this.onprogress=b,this.onload=b,this.onerror=b,this.onreadystatechange=b,this._contentType="",this._xhr=e,this._sendTimeout=0,this._abort=b}function S(e){return e.replace(/[A-Z]/g,(function(e){return String.fromCharCode(e.charCodeAt(0)+32)}))}function _(e){for(var t=Object.create(null),n=e.split("\r\n"),o=0;o<n.length;o+=1){var r=n[o],i=r.split(": "),a=i.shift(),s=i.join(": ");t[S(a)]=s}this._map=t}function x(){}function A(e){this._headers=e}function R(){}function k(){this._listeners=Object.create(null)}function D(e){a((function(){throw e}),0)}function O(e){this.type=e,this.target=void 0}function N(e,t){O.call(this,e),this.data=t.data,this.lastEventId=t.lastEventId}function I(e,t){O.call(this,e),this.status=t.status,this.statusText=t.statusText,this.headers=t.headers}function H(e,t){O.call(this,e),this.error=t.error}T.prototype.open=function(e,t){this._abort(!0);var n=this,o=this._xhr,r=1,i=0;this._abort=function(e){0!==n._sendTimeout&&(s(n._sendTimeout),n._sendTimeout=0),1!==r&&2!==r&&3!==r||(r=4,o.onload=b,o.onerror=b,o.onabort=b,o.onprogress=b,o.onreadystatechange=b,o.abort(),0!==i&&(s(i),i=0),e||(n.readyState=4,n.onabort(null),n.onreadystatechange())),r=0};var u=function(){if(1===r){var e=0,t="",i=void 0;if("contentType"in o)e=200,t="OK",i=o.contentType;else try{e=o.status,t=o.statusText,i=o.getResponseHeader("Content-Type")}catch(a){e=0,t="",i=void 0}0!==e&&(r=2,n.readyState=2,n.status=e,n.statusText=t,n._contentType=i,n.onreadystatechange())}},d=function(){if(u(),2===r||3===r){r=3;var e="";try{e=o.responseText}catch(t){}n.readyState=3,n.responseText=e,n.onprogress()}},f=function(e,t){if(null!=t&&null!=t.preventDefault||(t={preventDefault:b}),d(),1===r||2===r||3===r){if(r=4,0!==i&&(s(i),i=0),n.readyState=4,"load"===e)n.onload(t);else if("error"===e)n.onerror(t);else{if("abort"!==e)throw new TypeError;n.onabort(t)}n.onreadystatechange()}},l=function(e){void 0!=o&&(4===o.readyState?"onload"in o&&"onerror"in o&&"onabort"in o||f(""===o.responseText?"error":"load",e):3===o.readyState?"onprogress"in o||d():2===o.readyState&&u())},h=function(){i=a((function(){h()}),500),3===o.readyState&&d()};"onload"in o&&(o.onload=function(e){f("load",e)}),"onerror"in o&&(o.onerror=function(e){f("error",e)}),"onabort"in o&&(o.onabort=function(e){f("abort",e)}),"onprogress"in o&&(o.onprogress=d),"onreadystatechange"in o&&(o.onreadystatechange=function(e){l(e)}),!("contentType"in o)&&"ontimeout"in c.prototype||(t+=(-1===t.indexOf("?")?"?":"&")+"padding=true"),o.open(e,t,!0),"readyState"in o&&(i=a((function(){h()}),0))},T.prototype.abort=function(){this._abort(!1)},T.prototype.getResponseHeader=function(e){return this._contentType},T.prototype.setRequestHeader=function(e,t){var n=this._xhr;"setRequestHeader"in n&&n.setRequestHeader(e,t)},T.prototype.getAllResponseHeaders=function(){return void 0!=this._xhr.getAllResponseHeaders&&this._xhr.getAllResponseHeaders()||""},T.prototype.send=function(){if("ontimeout"in c.prototype&&("sendAsBinary"in c.prototype||"mozAnon"in c.prototype)||void 0==l||void 0==l.readyState||"complete"===l.readyState){var e=this._xhr;"withCredentials"in e&&(e.withCredentials=this.withCredentials);try{e.send(void 0)}catch(n){throw n}}else{var t=this;t._sendTimeout=a((function(){t._sendTimeout=0,t.send()}),4)}},_.prototype.get=function(e){return this._map[S(e)]},null!=c&&null==c.HEADERS_RECEIVED&&(c.HEADERS_RECEIVED=2),x.prototype.open=function(e,t,n,o,r,i,a){e.open("GET",r);var s=0;for(var u in e.onprogress=function(){var t=e.responseText,o=t.slice(s);s+=o.length,n(o)},e.onerror=function(e){e.preventDefault(),o(new Error("NetworkError"))},e.onload=function(){o(null)},e.onabort=function(){o(null)},e.onreadystatechange=function(){if(e.readyState===c.HEADERS_RECEIVED){var n=e.status,o=e.statusText,r=e.getResponseHeader("Content-Type"),i=e.getAllResponseHeaders();t(n,o,r,new _(i))}},e.withCredentials=i,a)Object.prototype.hasOwnProperty.call(a,u)&&e.setRequestHeader(u,a[u]);return e.send(),e},A.prototype.get=function(e){return this._headers.get(e)},R.prototype.open=function(e,t,n,o,r,i,a){var s=null,c=new w,u=c.signal,d=new y;return p(r,{headers:a,credentials:i?"include":"same-origin",signal:u,cache:"no-store"}).then((function(e){return s=e.body.getReader(),t(e.status,e.statusText,e.headers.get("Content-Type"),new A(e.headers)),new h((function(e,t){var o=function(){s.read().then((function(t){if(t.done)e(void 0);else{var r=d.decode(t.value,{stream:!0});n(r),o()}}))["catch"]((function(e){t(e)}))};o()}))}))["catch"]((function(e){return"AbortError"===e.name?void 0:e})).then((function(e){o(e)})),{abort:function(){null!=s&&s.cancel(),c.abort()}}},k.prototype.dispatchEvent=function(e){e.target=this;var t=this._listeners[e.type];if(void 0!=t)for(var n=t.length,o=0;o<n;o+=1){var r=t[o];try{"function"===typeof r.handleEvent?r.handleEvent(e):r.call(this,e)}catch(i){D(i)}}},k.prototype.addEventListener=function(e,t){e=String(e);var n=this._listeners,o=n[e];void 0==o&&(o=[],n[e]=o);for(var r=!1,i=0;i<o.length;i+=1)o[i]===t&&(r=!0);r||o.push(t)},k.prototype.removeEventListener=function(e,t){e=String(e);var n=this._listeners,o=n[e];if(void 0!=o){for(var r=[],i=0;i<o.length;i+=1)o[i]!==t&&r.push(o[i]);0===r.length?delete n[e]:n[e]=r}},N.prototype=Object.create(O.prototype),I.prototype=Object.create(O.prototype),H.prototype=Object.create(O.prototype);var j=-1,P=0,L=1,B=2,M=-1,U=0,q=1,G=2,J=3,X=/^text\/event\-stream(;.*)?$/i,V=1e3,z=18e6,F=function(e,t){var n=null==e?t:parseInt(e,10);return n!==n&&(n=t),K(n)},K=function(e){return Math.min(Math.max(e,V),z)},Z=function(e,t,n){try{"function"===typeof t&&t.call(e,n)}catch(o){D(o)}};function Q(e,t){k.call(this),t=t||{},this.onopen=void 0,this.onmessage=void 0,this.onerror=void 0,this.url=void 0,this.readyState=void 0,this.withCredentials=void 0,this.headers=void 0,this._close=void 0,Y(this,e,t)}function $(){return void 0!=c&&"withCredentials"in c.prototype||void 0==u?new c:new u}var W=void 0!=p&&void 0!=v&&"body"in v.prototype;function Y(e,t,n){t=String(t);var o=Boolean(n.withCredentials),r=n.lastEventIdQueryParameterName||"lastEventId",i=K(1e3),c=F(n.heartbeatTimeout,45e3),u="",d=i,f=!1,l=0,h=n.headers||{},p=n.Transport,v=W&&void 0==p?void 0:new T(void 0!=p?new p:$()),y=null!=p&&"string"!==typeof p?new p:void 0==v?new R:new x,g=void 0,w=0,m=j,C="",E="",b="",S="",_=U,A=0,k=0,D=function(t,n,o,r){if(m===P)if(200===t&&void 0!=o&&X.test(o)){m=L,f=Date.now(),d=i,e.readyState=L;var a=new I("open",{status:t,statusText:n,headers:r});e.dispatchEvent(a),Z(e,e.onopen,a)}else{var s="";200!==t?(n&&(n=n.replace(/\s+/g," ")),s="EventSource's response has a status "+t+" "+n+" that is not 200. Aborting the connection."):s="EventSource's response has a Content-Type specifying an unsupported type: "+(void 0==o?"-":o.replace(/\s+/g," "))+". Aborting the connection.",z();a=new I("error",{status:t,statusText:n,headers:r});e.dispatchEvent(a),Z(e,e.onerror,a),console.error(s)}},O=function(t){if(m===L){for(var n=-1,o=0;o<t.length;o+=1){var r=t.charCodeAt(o);r!=="\n".charCodeAt(0)&&r!=="\r".charCodeAt(0)||(n=o)}var h=(-1!==n?S:"")+t.slice(0,n+1);S=(-1===n?S:"")+t.slice(n+1),""!==t&&(f=Date.now(),l+=t.length);for(var p=0;p<h.length;p+=1){r=h.charCodeAt(p);if(_===M&&r==="\n".charCodeAt(0))_=U;else if(_===M&&(_=U),r==="\r".charCodeAt(0)||r==="\n".charCodeAt(0)){if(_!==U){_===q&&(k=p+1);var v=h.slice(A,k-1),y=h.slice(k+(k<p&&h.charCodeAt(k)===" ".charCodeAt(0)?1:0),p);"data"===v?(C+="\n",C+=y):"id"===v?E=y:"event"===v?b=y:"retry"===v?(i=F(y,i),d=i):"heartbeatTimeout"===v&&(c=F(y,c),0!==w&&(s(w),w=a((function(){Q()}),c)))}if(_===U){if(""!==C){u=E,""===b&&(b="message");var g=new N(b,{data:C.slice(1),lastEventId:E});if(e.dispatchEvent(g),"open"===b?Z(e,e.onopen,g):"message"===b?Z(e,e.onmessage,g):"error"===b&&Z(e,e.onerror,g),m===B)return}C="",b=""}_=r==="\r".charCodeAt(0)?M:U}else _===U&&(A=p,_=q),_===q?r===":".charCodeAt(0)&&(k=p+1,_=G):_===G&&(_=J)}}},V=function(t){if(m===L||m===P){m=j,0!==w&&(s(w),w=0),w=a((function(){Q()}),d),d=K(Math.min(16*i,2*d)),e.readyState=P;var n=new H("error",{error:t});e.dispatchEvent(n),Z(e,e.onerror,n),void 0!=t&&console.error(t)}},z=function(){m=B,void 0!=g&&(g.abort(),g=void 0),0!==w&&(s(w),w=0),e.readyState=B},Q=function(){if(w=0,m===j){f=!1,l=0,w=a((function(){Q()}),c),m=P,C="",b="",E=u,S="",A=0,k=0,_=U;var n=t;if("data:"!==t.slice(0,5)&&"blob:"!==t.slice(0,5)&&""!==u){var o=t.indexOf("?");n=-1===o?t:t.slice(0,o+1)+t.slice(o+1).replace(/(?:^|&)([^=&]*)(?:=[^&]*)?/g,(function(e,t){return t===r?"":e})),n+=(-1===t.indexOf("?")?"?":"&")+r+"="+encodeURIComponent(u)}var i=e.withCredentials,s={Accept:"text/event-stream"},d=e.headers;if(void 0!=d)for(var h in d)Object.prototype.hasOwnProperty.call(d,h)&&(s[h]=d[h]);try{g=y.open(v,D,O,V,n,i,s)}catch(T){throw z(),T}}else if(f||void 0==g){var p=Math.max((f||Date.now())+c-Date.now(),1);f=!1,w=a((function(){Q()}),p)}else V(new Error("No activity within "+c+" milliseconds. "+(m===P?"No response received.":l+" chars received.")+" Reconnecting.")),void 0!=g&&(g.abort(),g=void 0)};e.url=t,e.readyState=P,e.withCredentials=o,e.headers=h,e._close=z,Q()}Q.prototype=Object.create(k.prototype),Q.prototype.CONNECTING=P,Q.prototype.OPEN=L,Q.prototype.CLOSED=B,Q.prototype.close=function(){this._close()},Q.CONNECTING=P,Q.OPEN=L,Q.CLOSED=B,Q.prototype.withCredentials=void 0;var ee=f;void 0==c||void 0!=f&&"withCredentials"in f.prototype||(ee=Q),function(i){if("object"===typeof e.exports){var a=i(t);void 0!==a&&(e.exports=a)}else o=[t],n=i,r="function"===typeof n?n.apply(t,o):n,void 0===r||(e.exports=r)}((function(e){e.EventSourcePolyfill=Q,e.NativeEventSource=f,e.EventSource=ee}))})("undefined"===typeof globalThis?"undefined"!==typeof window?window:"undefined"!==typeof self?self:this:globalThis)},12215:function(e,t,n){var o,r;
/*!
 * JavaScript Cookie v2.2.1
 * https://github.com/js-cookie/js-cookie
 *
 * Copyright 2006, 2015 Klaus Hartl & Fagner Brack
 * Released under the MIT license
 */(function(i){var a;if(o=i,r="function"===typeof o?o.call(t,n,t,e):o,void 0===r||(e.exports=r),a=!0,e.exports=i(),a=!0,!a){var s=window.Cookies,c=window.Cookies=i();c.noConflict=function(){return window.Cookies=s,c}}})((function(){function e(){for(var e=0,t={};e<arguments.length;e++){var n=arguments[e];for(var o in n)t[o]=n[o]}return t}function t(e){return e.replace(/(%[0-9A-Z]{2})+/g,decodeURIComponent)}function n(o){function r(){}function i(t,n,i){if("undefined"!==typeof document){i=e({path:"/"},r.defaults,i),"number"===typeof i.expires&&(i.expires=new Date(1*new Date+864e5*i.expires)),i.expires=i.expires?i.expires.toUTCString():"";try{var a=JSON.stringify(n);/^[\{\[]/.test(a)&&(n=a)}catch(u){}n=o.write?o.write(n,t):encodeURIComponent(String(n)).replace(/%(23|24|26|2B|3A|3C|3E|3D|2F|3F|40|5B|5D|5E|60|7B|7D|7C)/g,decodeURIComponent),t=encodeURIComponent(String(t)).replace(/%(23|24|26|2B|5E|60|7C)/g,decodeURIComponent).replace(/[\(\)]/g,escape);var s="";for(var c in i)i[c]&&(s+="; "+c,!0!==i[c]&&(s+="="+i[c].split(";")[0]));return document.cookie=t+"="+n+s}}function a(e,n){if("undefined"!==typeof document){for(var r={},i=document.cookie?document.cookie.split("; "):[],a=0;a<i.length;a++){var s=i[a].split("="),c=s.slice(1).join("=");n||'"'!==c.charAt(0)||(c=c.slice(1,-1));try{var u=t(s[0]);if(c=(o.read||o)(c,u)||t(c),n)try{c=JSON.parse(c)}catch(d){}if(r[u]=c,e===u)break}catch(d){}}return e?r[e]:r}}return r.set=i,r.get=function(e){return a(e,!1)},r.getJSON=function(e){return a(e,!0)},r.remove=function(t,n){i(t,"",e(n,{expires:-1}))},r.defaults={},r.withConverter=n,r}return n((function(){}))}))},54620:function(e,t,n){"use strict";n.r(t),n.d(t,{getToken:function(){return s},removeToken:function(){return c},saveAccessToken:function(){return a},saveTokens:function(){return i}});var o=n(12215),r=n.n(o);function i(e,t){r().set("access_token","Bearer ".concat(e)),r().set("refresh_token","Bearer ".concat(t))}function a(e){r().set("access_token","Bearer ".concat(e))}function s(e){return r().get(e)}function c(){r().remove("access_token"),r().remove("refresh_token"),sessionStorage.removeItem("flag"),sessionStorage.clear(),localStorage.clear()}},61789:function(e,t,n){"use strict";n.r(t),n.d(t,{default:function(){return u}});var o=n(25026),r=n(69492),i=n(23772),a=(n(79432),n(26099),n(23500),n(20163)),s=(n(40377),n(54620)),c=n(55129),u=function(){function e(t,n){var r=this;(0,o.A)(this,e),(0,i.A)(this,"source",null),console.log(t,n),this.source=new EventSourcePolyfill(t,{headers:{Authorization:(0,s.getToken)("access_token")}}),this.open(),n.forEach((function(e){r.addEventListener(e)}))}return(0,r.A)(e,[{key:"open",value:function(){this.source.onopen=function(e){console.log("sse opened",e)}}},{key:"error",value:function(){this.source.onerror=function(e){console.log("error",e)}}},{key:"addEventListener",value:function(e){this.source.addEventListener(e,(function(e){c["default"].commit("MARK_UNREAD_MESSAGE",{data:e.data,id:e.lastEventId}),a.nk.warning(JSON.parse(e.data).message)}))}}])}()}}]);
//# sourceMappingURL=1789-legacy.332576f7.js.map