1
0
mirror of https://github.com/StarGazer114/stargazer114.github.io.git synced 2025-01-08 14:28:17 +08:00
stargazer114.github.io/pluginsSrc/disqusjs/dist/browser/disqusjs.es2015.umd.min.js

2 lines
39 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):(e="undefined"!=typeof globalThis?globalThis:e||self).DisqusJS=t()}(this,function(){"use strict";function e(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function t(t){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter(function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable}))),o.forEach(function(n){e(t,n,r[n])})}return t}var n,r,o,l,i,u,c,a,s,f={},d=[],h=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function p(e,t){for(var n in t)e[n]=t[n];return e}function m(e){var t=e.parentNode;t&&t.removeChild(e)}function v(e,t,n){var r,o,i,u={};for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:u[i]=t[i];if(arguments.length>2&&(u.children=arguments.length>3?l.call(arguments,2):n),"function"==typeof e&&null!=e.defaultProps)for(i in e.defaultProps)void 0===u[i]&&(u[i]=e.defaultProps[i]);return y(e,u,r,o,null)}function y(e,t,n,r,o){var l={type:e,props:t,key:n,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=i.vnode&&i.vnode(l),l}function $(){return{current:null}}function g(e){return e.children}function b(e,t){this.props=e,this.context=t}function S(e,t){if(null==t)return e.__?S(e.__,e.__.__k.indexOf(e)+1):null;for(var n;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e)return n.__e;return"function"==typeof e.type?S(e):null}function E(e){var t,n;if(null!=(e=e.__)&&null!=e.__c){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if(null!=(n=e.__k[t])&&null!=n.__e){e.__e=e.__c.base=n.__e;break}return E(e)}}function N(e){(!e.__d&&(e.__d=!0)&&c.push(e)&&!k.__r++||a!==i.debounceRendering)&&((a=i.debounceRendering)||setTimeout)(k)}function k(){for(var e;k.__r=c.length;)e=c.sort(function(e,t){return e.__v.__b-t.__v.__b}),c=[],e.some(function(e){var t,n,r,o,l,i;e.__d&&(l=(o=(t=e).__v).__e,(i=t.__P)&&(n=[],(r=p({},o)).__v=o.__v+1,U(i,o,r,t.__n,void 0!==i.ownerSVGElement,null!=o.__h?[l]:null,n,null==l?S(o):l,o.__h),H(n,o),o.__e!=l&&E(o)))})}function C(e,t,n,r,o,l,i,u,c,a){var s,h,p,m,v,$,b,E=r&&r.__k||d,N=E.length;for(n.__k=[],s=0;s<t.length;s++)if(null!=(m=n.__k[s]=null==(m=t[s])||"boolean"==typeof m?null:"string"==typeof m||"number"==typeof m||"bigint"==typeof m?y(null,m,null,null,m):Array.isArray(m)?y(g,{children:m},null,null,null):m.__b>0?y(m.type,m.props,m.key,null,m.__v):m)){if(m.__=n,m.__b=n.__b+1,null===(p=E[s])||p&&m.key==p.key&&m.type===p.type)E[s]=void 0;else for(h=0;h<N;h++){if((p=E[h])&&m.key==p.key&&m.type===p.type){E[h]=void 0;break}p=null}U(e,m,p=p||f,o,l,i,u,c,a),v=m.__e,(h=m.ref)&&p.ref!=h&&(b||(b=[]),p.ref&&b.push(p.ref,null,m),b.push(h,m.__c||v,m)),null!=v?(null==$&&($=v),"function"==typeof m.type&&m.__k===p.__k?m.__d=c=_(m,c,e):c=x(e,m,p,E,v,c),"function"==typeof n.type&&(n.__d=c)):c&&p.__e==c&&c.parentNode!=e&&(c=S(p))}for(n.__e=$,s=N;s--;)null!=E[s]&&("function"==typeof n.type&&null!=E[s].__e&&E[s].__e==n.__d&&(n.__d=S(r,s+1)),I(E[s],E[s]));if(b)for(s=0;s<b.length;s++)M(b[s],b[++s],b[++s])}function _(e,t,n){for(var r,o=e.__k,l=0;o&&l<o.length;l++)(r=o[l])&&(r.__=e,t="function"==typeof r.type?_(r,t,n):x(n,r,r,o,r.__e,t));return t}function P(e,t){return t=t||[],null==e||"boolean"==typeof e||(Array.isArray(e)?e.some(function(e){P(e,t)}):t.push(e)),t}function x(e,t,n,r,o,l){var i,u,c;if(void 0!==t.__d)i=t.__d,t.__d=void 0;else if(null==n||o!=l||null==o.parentNode)n:if(null==l||l.parentNode!==e)e.appendChild(o),i=null;else{for(u=l,c=0;(u=u.nextSibling)&&c<r.length;c+=2)if(u==o)break n;e.insertBefore(o,l),i=l}return void 0!==i?i:o.nextSibling}function w(e,t,n){"-"===t[0]?e.setProperty(t,n):e[t]=null==n?"":"number"!=typeof n||h.test(t)?n:n+"px"}function D(e,t,n,r,o){var l;n:if("style"===t){if("string"==typeof n)e.style.cssText=n;else{if("string"==typeof r&&(e.style.cssText=r=""),r)for(t in r)n&&t in n||w(e.style,t,"");if(n)for(t in n)r&&n[t]===r[t]||w(e.style,t,n[t])}}else if("o"===t[0]&&"n"===t[1])l=t!==(t=t.replace(/Capture$/,"")),t=t.toLowerCase() in e?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+l]=n,n?r||e.addEventListener(t,l?O:T,l):e.removeEventListener(t,l?O:T,l);else if("dangerouslySetInnerHTML"!==t){if(o)t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("href"!==t&&"list"!==t&&"form"!==t&&"tabIndex"!==t&&"download"!==t&&t in e)try{e[t]=null==n?"":n;break n}catch(i){}"function"==typeof n||(null!=n&&(!1!==n||"a"===t[0]&&"r"===t[1])?e.setAttribute(t,n):e.removeAttribute(t))}}function T(e){this.l[e.type+!1](i.event?i.event(e):e)}function O(e){this.l[e.type+!0](i.event?i.event(e):e)}function U(e,t,n,r,o,l,u,c,a){var s,f,d,h,m,v,y,$,S,E,N,k,_,P=t.type;if(void 0!==t.constructor)return null;null!=n.__h&&(a=n.__h,c=t.__e=n.__e,t.__h=null,l=[c]),(s=i.__b)&&s(t);try{n:if("function"==typeof P){if($=t.props,S=(s=P.contextType)&&r[s.__c],E=s?S?S.props.value:s.__:r,n.__c?y=(f=t.__c=n.__c).__=f.__E:("prototype"in P&&P.prototype.render?t.__c=f=new P($,E):(t.__c=f=new b($,E),f.constructor=P,f.render=R),S&&S.sub(f),f.props=$,f.state||(f.state={}),f.context=E,f.__n=r,d=f.__d=!0,f.__h=[]),null==f.__s&&(f.__s=f.state),null!=P.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,P.getDerivedStateFromProps($,f.__s))),h=f.props,m=f.state,d)null==P.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==P.getDerivedStateFromProps&&$!==h&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps($,E),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate($,f.__s,E)||t.__v===n.__v){f.props=$,f.state=f.__s,t.__v!==n.__v&&(f.__d=!1),f.__v=t,t.__e=n.__e,t.__k=n.__k,t.__k.forEach(function(e){e&&(e.__=t)}),f.__h.length&&u.push(f);break n}null!=f.componentWillUpdate&&f.componentWillUpdate($,f.__s,E),null!=f.componentDidUpdate&&f.__h.push(function(){f.componentDidUpdate(h,m,v)})}if(f.context=E,f.props=$,f.__v=t,f.__P=e,N=i.__r,k=0,"prototype"in P&&P.prototype.render)f.state=f.__s,f.__d=!1,N&&N(t),s=f.render(f.props,f.state,f.context);else do f.__d=!1,N&&N(t),s=f.render(f.props,f.state,f.context),f.state=f.__s;while(f.__d&&++k<25);f.state=f.__s,null!=f.getChildContext&&(r=p(p({},r),f.getChildContext())),d||null==f.getSnapshotBeforeUpdate||(v=f.getSnapshotBeforeUpdate(h,m)),_=null!=s&&s.type===g&&null==s.key?s.props.children:s,C(e,Array.isArray(_)?_:[_],t,n,r,o,l,u,c,a),f.base=t.__e,t.__h=null,f.__h.length&&u.push(f),y&&(f.__E=f.__=null),f.__e=!1}else null==l&&t.__v===n.__v?(t.__k=n.__k,t.__e=n.__e):t.__e=L(n.__e,t,n,r,o,l,u,a);(s=i.diffed)&&s(t)}catch(x){t.__v=null,(a||null!=l)&&(t.__e=c,t.__h=!!a,l[l.indexOf(c)]=null),i.__e(x,t,n)}}function H(e,t){i.__c&&i.__c(t,e),e.some(function(t){try{e=t.__h,t.__h=[],e.some(function(e){e.call(t)})}catch(n){i.__e(n,t.__v)}})}function L(e,t,n,r,o,i,u,c){var a,s,d,h=n.props,p=t.props,v=t.type,y=0;if("svg"===v&&(o=!0),null!=i){for(;y<i.length;y++)if((a=i[y])&&"setAttribute"in a==!!v&&(v?a.localName===v:3===a.nodeType)){e=a,i[y]=null;break}}if(null==e){if(null===v)return document.createTextNode(p);e=o?document.createElementNS("http://www.w3.org/2000/svg",v):document.createElement(v,p.is&&p),i=null,c=!1}if(null===v)h===p||c&&e.data===p||(e.data=p);else{if(i=i&&l.call(e.childNodes),s=(h=n.props||f).dangerouslySetInnerHTML,d=p.dangerouslySetInnerHTML,!c){if(null!=i)for(h={},y=0;y<e.attributes.length;y++)h[e.attributes[y].name]=e.attributes[y].value;(d||s)&&(d&&(s&&d.__html==s.__html||d.__html===e.innerHTML)||(e.innerHTML=d&&d.__html||""))}if(function(e,t,n,r,o){var l;for(l in n)"children"===l||"key"===l||l in t||D(e,l,null,n[l],r);for(l in t)o&&"function"!=typeof t[l]||"children"===l||"key"===l||"value"===l||"checked"===l||n[l]===t[l]||D(e,l,t[l],n[l],r)}(e,p,h,o,c),d)t.__k=[];else if(C(e,Array.isArray(y=t.props.children)?y:[y],t,n,r,o&&"foreignObject"!==v,i,u,i?i[0]:n.__k&&S(n,0),c),null!=i)for(y=i.length;y--;)null!=i[y]&&m(i[y]);c||("value"in p&&void 0!==(y=p.value)&&(y!==e.value||"progress"===v&&!y||"option"===v&&y!==h.value)&&D(e,"value",y,h.value,!1),"checked"in p&&void 0!==(y=p.checked)&&y!==e.checked&&D(e,"checked",y,h.checked,!1))}return e}function M(e,t,n){try{"function"==typeof e?e(t):e.current=t}catch(r){i.__e(r,n)}}function I(e,t,n){var r,o;if(i.unmount&&i.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||M(r,null,t)),null!=(r=e.__c)){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(l){i.__e(l,t)}r.base=r.__P=null}if(r=e.__k)for(o=0;o<r.length;o++)r[o]&&I(r[o],t,"function"!=typeof e.type);n||null==e.__e||m(e.__e),e.__e=e.__d=void 0}function R(e,t,n){return this.constructor(e,n)}function A(e,t,n){var r,o,u;i.__&&i.__(e,t),o=(r="function"==typeof n)?null:n&&n.__k||t.__k,u=[],U(t,e=(!r&&n||t).__k=v(g,null,[e]),o||f,f,void 0!==t.ownerSVGElement,!r&&n?[n]:o?null:t.firstChild?l.call(t.childNodes):null,u,!r&&n?n:o?o.__e:t.firstChild,r),H(u,e)}function V(e,t,n){var r,o,i,u=p({},e.props);for(i in t)"key"==i?r=t[i]:"ref"==i?o=t[i]:u[i]=t[i];return arguments.length>2&&(u.children=arguments.length>3?l.call(arguments,2):n),y(e.type,u,r||e.key,o||e.ref,null)}function W(e,t){var n={__c:t="__cC"+s++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,r;return this.getChildContext||(n=[],(r={})[t]=this,this.getChildContext=function(){return r},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(N)},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}l=d.slice,i={__e:function(e,t,n,r){for(var o,l,i;t=t.__;)if((o=t.__c)&&!o.__)try{if((l=o.constructor)&&null!=l.getDerivedStateFromError&&(o.setState(l.getDerivedStateFromError(e)),i=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,r||{}),i=o.__d),i)return o.__E=o}catch(u){e=u}throw e}},u=0,b.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},n),this.props)),e&&p(n,e),null!=e&&this.__v&&(t&&this.__h.push(t),N(this))},b.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),N(this))},b.prototype.render=g,c=[],k.__r=0,s=0;var q,F,B,z,j=0,Q=[],Y=[],G=i.__b,Z=i.__r,J=i.diffed,K=i.__c,X=i.unmount;function ee(e,t){i.__h&&i.__h(F,e,j||t),j=0;var n=F.__H||(F.__H={__:[],__h:[]});return e>=n.__.length&&n.__.push({__V:Y}),n.__[e]}function et(e){return j=1,en(em,e)}function en(e,t,n){var r=ee(q++,2);if(r.t=e,!r.__c&&(r.__=[n?n(t):em(void 0,t),function(e){var t=r.__N?r.__N[0]:r.__[0],n=r.t(t,e);t!==n&&(r.__N=[n,r.__[1]],r.__c.setState({}))}],r.__c=F,!F.u)){F.u=!0;var o=F.shouldComponentUpdate;F.shouldComponentUpdate=function(e,t,n){if(!r.__c.__H)return!0;var l=r.__c.__H.__.filter(function(e){return e.__c});if(l.every(function(e){return!e.__N}))return!o||o.call(this,e,t,n);var i=!1;return l.forEach(function(e){if(e.__N){var t=e.__[0];e.__=e.__N,e.__N=void 0,t!==e.__[0]&&(i=!0)}}),!!i&&(!o||o.call(this,e,t,n))}}return r.__N||r.__}function er(e,t){var n=ee(q++,3);!i.__s&&ep(n.__H,t)&&(n.__=e,n.i=t,F.__H.__h.push(n))}function eo(e,t){var n=ee(q++,4);!i.__s&&ep(n.__H,t)&&(n.__=e,n.i=t,F.__h.push(n))}function el(e){return j=5,e8(function(){return{current:e}},[])}function ei(e,t,n){j=6,eo(function(){return"function"==typeof e?(e(t()),function(){return e(null)}):e?(e.current=t(),function(){return e.current=null}):void 0},null==n?n:n.concat(e))}function e8(e,t){var n=ee(q++,7);return ep(n.__H,t)?(n.__V=e(),n.i=t,n.__h=e,n.__V):n.__}function eu(e,t){return j=8,e8(function(){return e},t)}function ec(e){var t=F.context[e.__c],n=ee(q++,9);return n.c=e,t?(null==n.__&&(n.__=!0,t.sub(F)),t.props.value):e.__}function ea(e,t){i.useDebugValue&&i.useDebugValue(t?t(e):e)}function es(){for(var e;e=Q.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(ed),e.__H.__h.forEach(eh),e.__H.__h=[]}catch(t){e.__H.__h=[],i.__e(t,e.__v)}}i.__b=function(e){F=null,G&&G(e)},i.__r=function(e){Z&&Z(e),q=0;var t=(F=e.__c).__H;t&&(B===F?(t.__h=[],F.__h=[],t.__.forEach(function(e){e.__N&&(e.__=e.__N),e.__V=Y,e.__N=e.i=void 0})):(t.__h.forEach(ed),t.__h.forEach(eh),t.__h=[])),B=F},i.diffed=function(e){J&&J(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(1!==Q.push(t)&&z===i.requestAnimationFrame||((z=i.requestAnimationFrame)||function(e){var t,n=function(){clearTimeout(r),ef&&cancelAnimationFrame(t),setTimeout(e)},r=setTimeout(n,100);ef&&(t=requestAnimationFrame(n))})(es)),t.__H.__.forEach(function(e){e.i&&(e.__H=e.i),e.__V!==Y&&(e.__=e.__V),e.i=void 0,e.__V=Y})),B=F=null},i.__c=function(e,t){t.some(function(e){try{e.__h.forEach(ed),e.__h=e.__h.filter(function(e){return!e.__||eh(e)})}catch(n){t.some(function(e){e.__h&&(e.__h=[])}),t=[],i.__e(n,e.__v)}}),K&&K(e,t)},i.unmount=function(e){X&&X(e);var t,n=e.__c;n&&n.__H&&(n.__H.__.forEach(function(e){try{ed(e)}catch(n){t=n}}),t&&i.__e(t,n.__v))};var ef="function"==typeof requestAnimationFrame;function ed(e){var t=F,n=e.__c;"function"==typeof n&&(e.__c=void 0,n()),F=t}function eh(e){var t=F;e.__c=e.__(),F=t}function ep(e,t){return!e||e.length!==t.length||t.some(function(t,n){return t!==e[n]})}function em(e,t){return"function"==typeof t?t(e):t}function ev(e,t){for(var n in t)e[n]=t[n];return e}function ey(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function e$(e){this.props=e}function eg(e,t){function n(e){var n=this.props.ref,r=n==e.ref;return!r&&n&&(n.call?n(null):n.current=null),t?!t(this.props,e)||!r:ey(this.props,e)}function r(t){return this.shouldComponentUpdate=n,v(e,t)}return r.displayName="Memo("+(e.displayName||e.name)+")",r.prototype.isReactComponent=!0,r.__f=!0,r}(e$.prototype=new b).isPureReactComponent=!0,e$.prototype.shouldComponentUpdate=function(e,t){return ey(this.props,e)||ey(this.state,t)};var eb=i.__b;i.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),eb&&eb(e)};var eS="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function eE(e){function t(t){var n=ev({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=eS,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var eN=function(e,t){return null==e?null:P(P(e).map(t))},ek={map:eN,forEach:eN,count:function(e){return e?P(e).length:0},only:function(e){var t=P(e);if(1!==t.length)throw"Children.only";return t[0]},toArray:P},eC=i.__e;i.__e=function(e,t,n,r){if(e.then){for(var o,l=t;l=l.__;)if((o=l.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t)}eC(e,t,n,r)};var e_=i.unmount;function eP(){this.__u=0,this.t=null,this.__b=null}function ex(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function ew(e){var t,n,r;function o(o){if(t||(t=e()).then(function(e){n=e.default||e},function(e){r=e}),r)throw r;if(!n)throw t;return v(n,o)}return o.displayName="Lazy",o.__f=!0,o}function eD(){this.u=null,this.o=null}i.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),e_&&e_(e)},(eP.prototype=new b).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=ex(r.__v),l=!1,i=function(){l||(l=!0,n.__R=null,o?o(u):u())};n.__R=i;var u=function(){if(!--r.__u){if(r.state.__a){var e,t=r.state.__a;r.__v.__k[0]=function e(t,n,r){return t&&(t.__v=null,t.__k=t.__k&&t.__k.map(function(t){return e(t,n,r)}),t.__c&&t.__c.__P===n&&(t.__e&&r.insertBefore(t.__e,t.__d),t.__c.__e=!0,t.__c.__P=r)),t}(t,t.__c.__P,t.__c.__O)}for(r.setState({__a:r.__b=null});e=r.t.pop();)e.forceUpdate()}},c=!0===t.__h;r.__u++||c||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},eP.prototype.componentWillUnmount=function(){this.t=[]},eP.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var n=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=function e(t,n,r){return t&&(t.__c&&t.__c.__H&&(t.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),t.__c.__H=null),null!=(t=ev({},t)).__c&&(t.__c.__P===r&&(t.__c.__P=n),t.__c=null),t.__k=t.__k&&t.__k.map(function(t){return e(t,n,r)})),t}(this.__b,n,r.__O=r.__P)}this.__b=null}var o=t.__a&&v(g,null,e.fallback);return o&&(o.__h=null),[v(g,null,t.__a?null:e.children),o]};var eT=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]<n[0])break;e.u=n=n[2]}};function eO(e){return this.getChildContext=function(){return e.context},e.children}function eU(e){var t=this,n=e.i;t.componentWillUnmount=function(){A(null,t.l),t.l=null,t.i=null},t.i&&t.i!==n&&t.componentWillUnmount(),e.__v?(t.l||(t.i=n,t.l={nodeType:1,parentNode:n,childNodes:[],appendChild:function(e){this.childNodes.push(e),t.i.appendChild(e)},insertBefore:function(e,n){this.childNodes.push(e),t.i.appendChild(e)},removeChild:function(e){this.childNodes.splice(this.childNodes.indexOf(e)>>>1,1),t.i.removeChild(e)}}),A(v(eO,{context:t.context},e.__v),t.l)):t.l&&t.componentWillUnmount()}function eH(e,t){var n=v(eU,{__v:e,i:t});return n.containerInfo=t,n}(eD.prototype=new b).__a=function(e){var t=this,n=ex(t.__v),r=t.o.get(e);return r[0]++,function(o){var l=function(){t.props.revealOrder?(r.push(o),eT(t,e,r)):o()};n?n(l):l()}},eD.prototype.render=function(e){this.u=null,this.o=new Map;var t=P(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&t.reverse();for(var n=t.length;n--;)this.o.set(t[n],this.u=[1,0,this.u]);return e.children},eD.prototype.componentDidUpdate=eD.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){eT(e,n,t)})};var eL="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,eM=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,eI="undefined"!=typeof document;function eR(e,t,n){return null==t.__k&&(t.textContent=""),A(e,t),"function"==typeof n&&n(),e?e.__c:null}function e9(e,t,n){return function e(t,n){A(t,n,e)}(e,t),"function"==typeof n&&n(),e?e.__c:null}b.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(b.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var eA=i.event;function eV(){}function eW(){return this.cancelBubble}function eq(){return this.defaultPrevented}i.event=function(e){return eA&&(e=eA(e)),e.persist=eV,e.isPropagationStopped=eW,e.isDefaultPrevented=eq,e.nativeEvent=e};var eF,eB={configurable:!0,get:function(){return this.class}},e0=i.vnode;i.vnode=function(e){var t=e.type,n=e.props,r=n;if("string"==typeof t){var o=-1===t.indexOf("-");for(var l in r={},n){var i,u=n[l];eI&&"children"===l&&"noscript"===t||"value"===l&&"defaultValue"in n&&null==u||("defaultValue"===l&&"value"in n&&null==n.value?l="value":"download"===l&&!0===u?u="":/ondoubleclick/i.test(l)?l="ondblclick":/^onchange(textarea|input)/i.test(l+t)&&(i=n.type,!("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(i))?l="oninput":/^onfocus$/i.test(l)?l="onfocusin":/^onblur$/i.test(l)?l="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(l)?l=l.toLowerCase():o&&eM.test(l)?l=l.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===u&&(u=void 0),/^oninput$/i.test(l)&&r[l=l.toLowerCase()]&&(l="oninputCapture"),r[l]=u)}"select"==t&&r.multiple&&Array.isArray(r.value)&&(r.value=P(n.children).forEach(function(e){e.props.selected=-1!=r.value.indexOf(e.props.value)})),"select"==t&&null!=r.defaultValue&&(r.value=P(n.children).forEach(function(e){e.props.selected=r.multiple?-1!=r.defaultValue.indexOf(e.props.value):r.defaultValue==e.props.value})),e.props=r,n.class!=n.className&&(eB.enumerable="className"in n,null!=n.className&&(r.class=n.className),Object.defineProperty(r,"className",eB))}e.$$typeof=eL,e0&&e0(e)};var e1=i.__r;i.__r=function(e){e1&&e1(e),eF=e.__c};var ez={ReactCurrentDispatcher:{current:{readContext:function(e){return eF.__n[e.__c].props.value}}}};function ej(e){return v.bind(null,e)}function eQ(e){return!!e&&e.$$typeof===eL}function eY(e){return eQ(e)?V.apply(null,arguments):e}function e4(e){return!!e.__k&&(A(null,e),!0)}function e7(e){return e&&(e.base||1===e.nodeType&&e)||null}var eG=function(e,t){return e(t)},eZ=function(e,t){return e(t)};function e2(e){e()}function e3(e){return e}function eJ(){return[!1,e2]}function e5(e,t){var n=t(),r=et({s:{__:n,h:t}}),o=r[0].s,l=r[1];return eo(function(){o.__=n,o.h=t,o.__!==t()&&l({s:o})},[e,n,t]),er(function(){return o.__!==o.h()&&l({s:o}),e(function(){o.__!==o.h()&&l({s:o})})},[e]),n}var e6=Object.freeze({__proto__:null,default:{useState:et,useReducer:en,useEffect:er,useLayoutEffect:eo,useInsertionEffect:eo,useTransition:eJ,useDeferredValue:e3,useSyncExternalStore:e5,startTransition:e2,useRef:el,useImperativeHandle:ei,useMemo:e8,useCallback:eu,useContext:ec,useDebugValue:ea,version:"17.0.2",Children:ek,render:eR,hydrate:e9,unmountComponentAtNode:e4,createPortal:eH,createElement:v,createContext:W,createFactory:ej,cloneElement:eY,createRef:$,Fragment:g,isValidElement:eQ,findDOMNode:e7,Component:b,PureComponent:e$,memo:eg,forwardRef:eE,flushSync:eZ,unstable_batchedUpdates:eG,StrictMode:g,Suspense:eP,SuspenseList:eD,lazy:ew,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ez},startTransition:e2,useDeferredValue:e3,useTransition:eJ,useInsertionEffect:eo,useSyncExternalStore:e5,version:"17.0.2",Children:ek,render:eR,hydrate:e9,unmountComponentAtNode:e4,createPortal:eH,createFactory:ej,cloneElement:eY,isValidElement:eQ,findDOMNode:e7,PureComponent:e$,memo:eg,forwardRef:eE,flushSync:eZ,unstable_batchedUpdates:eG,StrictMode:g,Suspense:eP,SuspenseList:eD,lazy:ew,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:ez,createElement:v,createContext:W,createRef:$,Fragment:g,Component:b,useState:et,useReducer:en,useEffect:er,useLayoutEffect:eo,useRef:el,useImperativeHandle:ei,useMemo:e8,useCallback:eu,useContext:ec,useDebugValue:ea,useErrorBoundary:function(e){var t=ee(q++,10),n=et();return t.__=e,F.componentDidCatch||(F.componentDidCatch=function(e){t.__&&t.__(e),n[1](e)}),[n[0],function(){n[1](void 0)}]}}),eK=0;function eX(e,t,n,r,o){var l,u,c={};for(u in t)"ref"==u?l=t[u]:c[u]=t[u];var a={type:e,props:c,key:n,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--eK,__source:o,__self:r};if("function"==typeof e&&(l=e.defaultProps))for(u in l)void 0===c[u]&&(c[u]=l[u]);return i.vnode&&i.vnode(a),a}function te(e,t){return t=null!=t?t:{},Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)):(function(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n.push.apply(n,r)}return n})(Object(t)).forEach(function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(t,n))}),e}function tt(e,t){if(null==e)return{};var n,r,o=function(e,t){if(null==e)return{};var n,r,o={},l=Object.keys(e);for(r=0;r<l.length;r++)n=l[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}(e,t);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);for(r=0;r<l.length;r++)n=l[r],!(t.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(e,n)&&(o[n]=e[n])}return o}function tn(e,t,n,r,o,l,i){try{var u=e[l](i),c=u.value}catch(a){n(a);return}u.done?t(c):Promise.resolve(c).then(r,o)}function tr(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var l=e.apply(t,n);function i(e){tn(l,r,o,i,u,"next",e)}function u(e){tn(l,r,o,i,u,"throw",e)}i(void 0)})}}let to=(e,t)=>{let n=new URL(t);return n.searchParams.set("api_key",e),fetch(n.toString()).then(e=>e.json())},tl=e=>new Date(e).getTime(),ti=e=>e.replace(/a\.disquscdn\.com/g,"c.disquscdn.com"),t8=null,tu=e=>{let t=ti(e).replace(/https?:\/\/disq.us\/url\?url=(.+)%3A[\w-]+&amp;cuid=\d+/gm,(e,t)=>decodeURIComponent(t));t8||(t8=new DOMParser);let n=t8.parseFromString(t,"text/html");return n.querySelectorAll("script").forEach(e=>e.remove()),n.querySelectorAll("a").forEach(e=>{e.target="_blank",e.rel="external noopener nofollow noreferrer"}),n.body.innerHTML},tc=new Date().getTimezoneOffset(),ta=e=>String(e).padStart(2,"0"),ts=e=>{let t=tl(e),n=new Date(t-6e4*tc);return`${n.getFullYear()}-${ta(n.getMonth()+1)}-${ta(n.getDate())} ${ta(n.getHours())}:${ta(n.getMinutes())}`},tf=e=>new Promise((t,n)=>{let r=new Image,o=()=>{r.onload=null,r.onerror=null,r.remove()},l=setTimeout(()=>{o(),n()},3e3);r.onerror=()=>{clearTimeout(l),o(),n()},r.onload=()=>{clearTimeout(l),o(),t()},r.src=`https://${e}/favicon.ico?${+new Date}=${+new Date}`}),td=e=>{let t,n=new Set,r=(e,r)=>{let o="function"==typeof e?e(t):e;if(o!==t){let l=t;t=(null!=r?r:"object"!=typeof o)?o:Object.assign({},t,o),n.forEach(e=>e(t,l))}},o=()=>t,l=e=>(n.add(e),()=>n.delete(e)),i=()=>n.clear(),u={setState:r,getState:o,subscribe:l,destroy:i};return t=e(r,o,u),u},th=e=>e?td(e):td;var tp,tm,tv={exports:{}},ty={},t$=function(e){var t=e.default;if("function"==typeof t){var n=function(){return t.apply(this,arguments)};n.prototype=t.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(e).forEach(function(t){var r=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(n,t,r.get?r:{enumerable:!0,get:function(){return e[t]}})}),n}(e6),tg={exports:{}},tb={};(tp=tv).exports=function(){if(o)return ty;o=1;var e,t=t$,l=r?tg.exports:(r=1,(e=tg).exports=function(){if(n)return tb;n=1;var e=t$,t="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},r=e.useState,o=e.useEffect,l=e.useLayoutEffect,i=e.useDebugValue;function u(e){var n=e.getSnapshot;e=e.value;try{var r=n();return!t(e,r)}catch(o){return!0}}function c(e,t){return t()}var a=void 0===window.document||void 0===window.document.createElement?c:function(e,t){var n=t(),c=r({inst:{value:n,getSnapshot:t}}),a=c[0].inst,s=c[1];return l(function(){a.value=n,a.getSnapshot=t,u(a)&&s({inst:a})},[e,n,t]),o(function(){return u(a)&&s({inst:a}),e(function(){u(a)&&s({inst:a})})},[e]),i(n),n};return tb.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:a,tb}(),tg.exports),i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},u=l.useSyncExternalStore,c=t.useRef,a=t.useEffect,s=t.useMemo,f=t.useDebugValue;return ty.useSyncExternalStoreWithSelector=function(e,t,n,r,o){var l=c(null);if(null===l.current){var d={hasValue:!1,value:null};l.current=d}else d=l.current;l=s(function(){function e(e){if(!c){if(c=!0,l=e,e=r(e),void 0!==o&&d.hasValue){var t=d.value;if(o(t,e))return u=t}return u=e}if(t=u,i(l,e))return t;var n=r(e);return void 0!==o&&o(t,n)?t:(l=e,u=n)}var l,u,c=!1,a=void 0===n?null:n;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]},[t,n,r,o]);var h=u(e,l[0],l[1]);return a(function(){d.hasValue=!0,d.value=h},[h]),f(h),h},ty}();var tS,tE=(tm=tv.exports)&&tm.__esModule&&Object.prototype.hasOwnProperty.call(tm,"default")?tm.default:tm;let{useSyncExternalStoreWithSelector:tN}=tE,tk=e=>{let t="function"==typeof e?th(e):e,n=(e,n)=>(function(e,t=e.getState,n){let r=tN(e.subscribe,e.getState,e.getServerState||e.getState,t,n);return ea(r),r})(t,e,n);return Object.assign(n,t),n},tC={mode:(()=>{{let e=localStorage.getItem("dsqjs_mode");if("dsqjs"===e||"disqus"===e)return e}return null})(),sortType:(()=>{{let e=localStorage.getItem("dsqjs_sort");if("popular"===e||"asc"===e||"desc"===e)return e}return null})(),error:!1,msg:null,thread:null,posts:[],loadingPosts:!1,morePostsError:!1},t_=(tS=(e,n)=>te(t({},tC),{setMode(t){e({mode:t}),t&&Promise.resolve().then(()=>{null===t?localStorage.removeItem("dsqjs_mode"):localStorage.setItem("dsqjs_mode",t)})},checkMode(t){e({msg:"正在检查 Disqus 能否访问..."}),Promise.all(["disqus.com",`${t}.disqus.com`].map(tf)).then(()=>{e({mode:"disqus"}),localStorage.setItem("dsqjs_mode","disqus")},()=>{e({mode:"dsqjs"}),localStorage.setItem("dsqjs_mode","dsqjs")})},setSortType(t){e({sortType:t}),t&&Promise.resolve().then(()=>{localStorage.setItem("dsqjs_sort",t)})},setError(t){e({error:t})},setMsg(t){e({msg:t})},fetchThread(t,n,r,o="https://disqus.skk.moe/disqus/"){return tr(function*(){try{let l=yield to(r,`${o}3.0/threads/list.json?forum=${encodeURIComponent(t)}&thread=${encodeURIComponent("ident:"+n)}`);0===l.code?e({thread:l}):e({error:!0})}catch(i){e({error:!0})}})()},fetchMorePosts(r,o,l,i="https://disqus.skk.moe/disqus/",u=!1){return tr(function*(){if(!o)return;e(te(t({},u&&{posts:[]}),{loadingPosts:!0,morePostsError:!1}));let c=u?[]:n().posts,a=n().sortType,s=c.at(-1);if(s&&!s.cursor.hasNext)return;let f=`${i}3.0/threads/listPostsThreaded?forum=${r}&thread=${o}&order=${null!=a?a:"desc"}${0!==c.length&&(null==s?void 0:s.cursor.next)?"&cursor="+encodeURIComponent(s.cursor.next):""}`,d=()=>{0===c.length?e({error:!0,loadingPosts:!1}):e({morePostsError:!0,loadingPosts:!1})};try{let h=yield to(l,f);0===h.code?e(e=>({posts:e.posts.concat(h),loadingPosts:!1})):d()}catch(p){d()}})()},reset(){e(t({},tC))}}))?tk(tS):tk,tP=eg(e=>{let{isError:n,isLoading:r}=e,o=tt(e,["isError","isLoading"]);return eX("a",te(t({},o),{id:"dsqjs-load-more",className:"dsqjs-load-more "+(n?"is-error":""),role:"button",children:n?"加载失败,请重试":r?"正在加载...":"加载更多评论"}))}),tx=eg(e=>{let t=t_(e=>e.setMode),n=eu(()=>t("disqus"),[t]);return eX("a",{id:"dsqjs-force-disqus",className:"dsqjs-msg-btn",onClick:n,children:e.children})}),tw=eg(e=>{let t=t_(e=>e.setMode),n=eu(()=>t(null),[t]);return eX("a",{id:"dsqjs-test-disqus",className:"dsqjs-msg-btn",onClick:n,children:e.children})}),tD=eg(e=>{let t=t_(e=>e.setMode),n=eu(()=>t("dsqjs"),[t]);return eX("a",{id:"dsqjs-force-dsqjs",className:"dsqjs-msg-btn",onClick:n,children:e.children})}),tT=eg(e=>{let t=t_(e=>e.setError),n=eu(()=>{t(!1)},[t]);return eX("a",{id:"dsqjs-reload-dsqjs",className:"dsqjs-msg-btn",onClick:n,children:e.children})}),tO="disqus_thread",tU="dsq-embed-scr",tH=eg(e=>{let t=t_(e=>e.setMsg),[n,r]=et(!1);return er(()=>{t(null);{let n=()=>{{var e;window.disqus_config=void 0;let t=document.getElementById(tU);t&&(document.head.removeChild(t),t.remove()),null===(e=window.DISQUS)||void 0===e||e.reset({});try{delete window.DISQUS}catch(n){window.DISQUS=void 0}let r=document.getElementById(tO);if(r)for(;r.hasChildNodes();)r.removeChild(r.firstChild);document.querySelectorAll('link[href*="disquscdn.com/next"], link[href*="disqus.com/next"], script[src*="disquscdn.com/next/embed"], script[src*="disqus.com/count-data.js"], iframe[title="Disqus"]').forEach(e=>{var t,n;null===(t=e.parentNode)||void 0===t||t.removeChild(e),null===(n=e.parentElement)||void 0===n||n.removeChild(e),e.remove()})}};window.disqus_shortname!==e.shortname&&n();let o=()=>function(){e.identifier&&(this.page.identifier=e.identifier),e.url&&(this.page.url=e.url),e.title&&(this.page.title=e.title),this.callbacks.onReady=[()=>{r(!0)}]};if(window.DISQUS&&document.getElementById(tU))window.DISQUS.reset({reload:!0,config:o()});else{window.disqus_config=o(),window.disqus_shortname=e.shortname;let l=document.createElement("script");l.id=tU,l.src=`https://${e.shortname}.disqus.com/embed.js`,l.async=!0,document.head.appendChild(l)}return n}},[e.shortname,e.identifier,e.url,e.title,t]),eX(g,{children:[eX("div",{id:tO,children:["评论完整模式加载中... 如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或切换至 ",eX(tD,{children:"评论基础模式"})]}),!n&&eX("div",{id:"dsqjs-msg",children:["评论完整模式加载中... 如果长时间无法加载,请针对 disq.us | disquscdn.com | disqus.com 启用代理,或切换至 ",eX(tD,{children:"评论基础模式"})]})]})}),tL=eg(()=>eX("div",{id:"dsqjs-msg",children:["评论基础模式加载失败,请"," ",eX(tT,{children:"重载"})," ","或"," ",eX(tw,{children:"尝试完整 Disqus 模式"})]})),tM=eg(()=>eX("div",{id:"dsqjs-msg",children:["当前 Thread 尚未创建。是否切换至"," ",eX(tx,{children:"完整 Disqus 模式"}),""]})),tI=eg(e=>eX("p",{className:"dsqjs-no-comment",children:e.text}));function tR(e){let n=e.comment.author.profileUrl,r=tu(e.comment.author.avatar.cache);return eX("li",{id:"comment-"+e.comment.id,children:[eX("div",{className:"dsqjs-post-item dsqjs-clearfix",children:[eX("div",{className:"dsqjs-post-avatar",children:n?eX("a",{href:n,target:"_blank",rel:"noreferrer noopenner nofollow external",children:eX("img",{alt:e.comment.author.username,src:r})}):eX("img",{alt:e.comment.author.username,src:r})}),eX("div",{className:"dsqjs-post-body",children:[eX("div",{className:"dsqjs-post-header",children:[n?eX("span",{className:"dsqjs-post-author",children:eX("a",{href:n,target:"_blank",rel:"noreferrer noopenner nofollow external",children:e.comment.author.name})}):eX("span",{className:"dsqjs-post-author",children:e.comment.author.name}),e.admin===e.comment.author.username&&eX("span",{className:"dsqjs-admin-badge",children:e.adminLabel})," ",eX("span",{className:"dsqjs-bullet"})," ",e.comment.createdAt&&eX("span",{className:"dsqjs-meta",children:eX("time",{children:ts(e.comment.createdAt)})})]}),e.comment.isDeleted?eX("div",{className:"dsqjs-post-content",children:eX("small",{children:"此评论已被删除"})}):eX("div",{className:"dsqjs-post-content",dangerouslySetInnerHTML:{__html:tu(e.comment.message)}})]})]}),eX(t9,te(t({},e),{currentNesting:e.nesting})),e.comment.hasMore&&eX("p",{className:"dsqjs-has-more",children:["切换至 ",eX(tx,{children:"完整 Disqus 模式"})," 显示更多回复"]})]})}function t9(e){var n,r;return e.children&&0!==e.children.length?eX("ul",{className:"dsqjs-post-list "+((null!==(n=e.currentNesting)&&void 0!==n?n:1)<(null!==(r=e.nestingSetting)&&void 0!==r?r:4)?"dsqjs-children":""),children:e.children.map(n=>v(tR,te(t({},n),{admin:e.admin,adminLabel:e.adminLabel,key:n.comment.id})))}):null}function tA(e,t,n){let r={comment:e,children:tV(t,Number(e.id),n+1),nesting:n+1};return r}function tV(e,t,n){if(0===e.length)return null;let r=[];return e.forEach(o=>{o.parent===t&&r.unshift(tA(o,e,n))}),r}let tW=e=>{let n=e8(()=>{let t=[],n=[],r=e.comments.slice();return r.map((e,t)=>({i:t,p:e.parent,d:tl(e.createdAt)})).sort((e,t)=>e.p&&t.p?e.d-t.d:0).map(({i:e})=>r[e]).forEach(e=>(e.parent?n:t).push(e)),t.map(e=>tA(e,n,0))},[e.comments]);return eX("ul",{className:"dsqjs-post-list",id:"dsqjs-post-container",children:n.map(n=>v(tR,te(t({},n),{key:n.comment.id,admin:e.admin,adminLabel:e.adminLabel})))})},tq=e=>e8(()=>{if(Array.isArray(e)){var t;return e[Math.random()*((t=e.length-1)-0+1)+0|0]}return e},[e]),tF=e=>eX(g,{children:[eX("input",{className:"dsqjs-order-radio",id:"dsqjs-order-"+e.sortType,type:"radio",name:"comment-order",value:e.sortType,onChange:e.onChange,checked:e.checked}),eX("label",{className:"dsqjs-order-label",htmlFor:"dsqjs-order-"+e.sortType,title:e.title,children:e.label})]}),tB=eg(()=>{let e=t_(e=>e.sortType),t=t_(e=>e.setSortType),n=eu(e=>()=>t(e),[t]);return eX("div",{className:"dsqjs-order",children:[eX(tF,{checked:"desc"===e||null===e,sortType:"desc",title:"按从新到旧",label:"最新",onChange:n("desc")}),eX(tF,{checked:"asc"===e,sortType:"asc",title:"按从旧到新",label:"最早",onChange:n("asc")}),eX(tF,{checked:"popular"===e,sortType:"popular",title:"按评分从高到低",label:"最佳",onChange:n("popular")})]})}),t0=eg(e=>eX("header",{className:"dsqjs-header",id:"dsqjs-header",children:eX("nav",{className:"dsqjs-nav dsqjs-clearfix",children:[eX("ul",{children:[eX("li",{className:"dsqjs-nav-tab dsqjs-tab-active",children:eX("span",{children:[e.totalComments," Comments"]})}),eX("li",{className:"dsqjs-nav-tab",children:e.siteName})]}),eX(tB,{})]})})),t1=e=>{let t=el(tq(e.apikey)),n=t_(e=>e.posts),r=t_(e=>e.sortType),o=el(r),l=t_(e=>e.morePostsError),i=t_(e=>e.loadingPosts),u=t_(e=>e.fetchMorePosts),c=el(null),a=eu(()=>u(e.shortname,e.id,t.current,e.api,!0),[u,e.api,e.id,e.shortname]),s=eu(()=>u(e.shortname,e.id,t.current,e.api,!1),[u,e.api,e.id,e.shortname]);if(er(()=>{c.current!==e.id?(c.current=e.id,a()):o.current!==r&&(o.current=r,c.current=e.id,a())},[n,a,e.id,i,r]),n.length>0){var f;return eX(g,{children:[eX(tW,{comments:n.filter(Boolean).map(e=>e.response).flat(),admin:e.admin,adminLabel:e.adminLabel}),(null===(f=n.at(-1))||void 0===f?void 0:f.cursor.hasNext)&&eX(tP,{isLoading:i,isError:l,onClick:i?void 0:s})]})}return null},tz=e=>{var n,r,o,l;let i=el(tq(e.apikey)),u=t_(e=>e.thread),c=t_(e=>e.fetchThread),a=t_(e=>e.setMsg),s=el(null),f=null!==(n=e.identifier)&&void 0!==n?n:document.location.origin+document.location.pathname+document.location.search;return(er(()=>{s.current!==f?(a(eX(g,{children:["评论基础模式加载中... 如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 ",eX(tw,{children:"尝试完整 Disqus 模式"})," | ",eX(tx,{children:"强制完整 Disqus 模式"})]})),s.current=f,c(e.shortname,f,i.current,e.api)):a(eX(g,{children:["你可能无法访问 Disqus已启用评论基础模式。如需完整体验请针对 disq.us | disquscdn.com | disqus.com 启用代理并 ",eX(tw,{children:"尝试完整 Disqus 模式"})," | ",eX(tx,{children:"强制完整 Disqus 模式"})]}))},[u,c,f,a,e.shortname,e.api]),u)?1===u.response.length?0===u.response[0].posts?eX(g,{children:[eX(t0,{totalComments:0,siteName:null!==(r=e.siteName)&&void 0!==r?r:""}),eX(tI,{text:null!==(o=e.nocomment)&&void 0!==o?o:"这里空荡荡的,一个人都没有"})]}):eX(g,{children:[eX(t0,{totalComments:u.response[0].posts,siteName:null!==(l=e.siteName)&&void 0!==l?l:""}),eX(t1,te(t({},e),{id:u.response[0].id}))]}):eX(tM,{}):null},tj=eg(()=>eX("footer",{className:"dsqjs-footer-container",children:eX("p",{className:"dsqjs-footer",children:["Powered by ",eX("a",{className:"dsqjs-disqus-logo",href:"https://disqus.com",target:"_blank",rel:"external nofollow noopener noreferrer"})," ","&"," ",eX("a",{className:"dsqjs-dsqjs-logo",href:"https://disqusjs.skk.moe",target:"_blank",rel:"noreferrer",children:"DisqusJS"})]})}));var tQ={dsqjs:"__dsqjs_oc95o1"};let tY=e=>{let n=t_(e=>e.mode),r=t_(e=>e.checkMode);return(er(()=>{"disqus"!==n&&"dsqjs"!==n&&r(e.shortname)},[r,n,e.shortname]),"disqus"===n)?eX(tH,{shortname:e.shortname,identifier:e.identifier,url:e.url,title:e.title}):"dsqjs"===n?eX(tz,t({},e)):null},t4=eE((e,n)=>{let r=t_(e=>e.msg),o=t_(e=>e.error),{shortname:l,siteName:i,identifier:u,url:c,title:a,api:s,apikey:f,nesting:d,nocomment:h,admin:p,adminLabel:m,className:v}=e,y=tt(e,["shortname","siteName","identifier","url","title","api","apikey","nesting","nocomment","admin","adminLabel","className"]),[$,b]=et(!1);return(er(()=>{b(!0)},[]),$)?eX("div",te(t({ref:n},y),{className:`${tQ.dsqjs} ${null!=v?v:""}`,children:eX("section",{id:"dsqjs",children:[o?eX(tL,{}):eX(g,{children:[r&&eX("div",{id:"dsqjs-msg",children:r}),eX(tY,t({},{shortname:l,siteName:i,identifier:u,url:c,title:a,api:s,apikey:f,nesting:d,nocomment:h,admin:p,adminLabel:m}))]}),eX(tj,{})]})})):null}),t7=e=>e?"string"==typeof e?document.querySelector(e):e:document.getElementById("disqusjs");return class{render(e){let n=t7(e);n&&(this.container=n,A(eX(t4,t({},this.config)),n))}destroy(){this.container&&A(null,this.container)}constructor(e){this.config=e}}})