Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@giscus/vue

Package Overview
Dependencies
Maintainers
1
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@giscus/vue - npm Package Compare versions

Comparing version 1.0.0 to 1.1.0-beta.1

2

dist/index.cjs.js

@@ -1,1 +0,1 @@

"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o;Object.defineProperty(exports,"__esModule",{value:!0}),exports[Symbol.toStringTag]="Module";var s=require("vue");const c="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function u(e){return`[giscus] An error occurred. Error message: "${e}".`}function d(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function l(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent="\n .giscus, .giscus-frame {\n width: 100%;\n }\n .giscus-frame {\n border: none;\n color-scheme: auto;\n }\n ",document.head.prepend(e)}var f,m={},g={exports:{}};f=g,function(e){if("undefined"!=typeof window){var t,n=0,o=!1,i=!1,r="message".length,a="[iFrameSizer]",s=a.length,c=null,u=window.requestAnimationFrame,d={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},l={},m=null,g={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){T("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},h={};window.jQuery&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){W(n,e)})).end()}):I("","Unable to bind to jQuery, it is not fully loaded.")),f.exports=D(),window.iFrameResize=window.iFrameResize||D()}function p(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,t,n){e.addEventListener(t,n,!1)}function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return a+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function b(e){return l[e]?l[e].log:o}function M(e,t){E("log",e,t,b(e))}function I(e,t){E("info",e,t,b(e))}function T(e,t){E("warn",e,t,!0)}function E(e,t,n,o){!0===o&&"object"==typeof window.console&&console[e](y(t),n)}function O(e){function t(){i("Height"),i("Width"),A((function(){C(B),z(D),y("onResized",B)}),B,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function o(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function i(e){var t=Number(l[D]["max"+e]),n=Number(l[D]["min"+e]),o=e.toLowerCase(),i=Number(B[o]);M(D,"Checking "+o+" is in range "+n+"-"+t),i<n&&(i=n,M(D,"Set "+o+" to min value")),i>t&&(i=t,M(D,"Set "+o+" to max value")),B[o]=""+i}function u(e){return q.substr(q.indexOf(":")+r+e)}function d(e,t){var n,o,i;n=function(){var n,o;P("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),o=B.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:o.height,iframeWidth:o.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(o.top-n.top,10),offsetLeft:parseInt(o.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},o=32,h[i=t]||(h[i]=setTimeout((function(){h[i]=null,n()}),o))}function f(e){var t=e.getBoundingClientRect();return k(D),{x:Math.floor(Number(t.left)+Number(c.x)),y:Math.floor(Number(t.top)+Number(c.y))}}function m(e){var t=e?f(B.iframe):{x:0,y:0},n={x:Number(B.width)+t.x,y:Number(B.height)+t.y};M(D,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):T(D,"Unable to scroll to requested position, window.parentIFrame not found"):(c=n,g(),M(D,"--"))}function g(){!1!==y("onScroll",c)?z(D):R()}function p(e){var t={};if(0===Number(B.width)&&0===Number(B.height)){var n=u(9).split(":");t={x:n[1],y:n[0]}}else t={x:B.width,y:B.height};y(e,{iframe:B.iframe,screenX:Number(t.x),screenY:Number(t.y),type:B.type})}function y(e,t){return S(D,e,t)}var b,E,O,x,W,j,H,q=e.data,B={},D=null;"[iFrameResizerChild]Ready"===q?function(){for(var e in l)P("iFrame requested init",L(e),l[e].iframe,e)}():a===(""+q).substr(0,s)&&q.substr(s).split(":")[0]in l?(x=q.substr(s).split(":"),W=x[1]?parseInt(x[1],10):0,j=l[x[0]]&&l[x[0]].iframe,H=getComputedStyle(j),B={iframe:j,id:x[0],height:W+n(H)+o(H),width:x[2],type:x[3]},D=B.id,l[D]&&(l[D].loaded=!0),(O=B.type in{true:1,false:1,undefined:1})&&M(D,"Ignoring init message from meta parent page"),!O&&(E=!0,l[b=D]||(E=!1,T(B.type+" No settings for "+b+". Message was: "+q)),E)&&(M(D,"Received: "+q),function(){var e=!0;return null===B.iframe&&(T(D,"IFrame ("+B.id+") not found"),e=!1),e}()&&function(){var t,n=e.origin,o=l[D]&&l[D].checkOrigin;if(o&&""+n!="null"&&!(o.constructor===Array?function(){var e=0,t=!1;for(M(D,"Checking connection is from allowed list of origins: "+o);e<o.length;e++)if(o[e]===n){t=!0;break}return t}():(t=l[D]&&l[D].remoteHost,M(D,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+B.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(l[D]&&l[D].firstRun&&l[D]&&(l[D].firstRun=!1),B.type){case"close":N(B.iframe);break;case"message":r=u(6),M(D,"onMessage passed: {iframe: "+B.iframe.id+", message: "+r+"}"),y("onMessage",{iframe:B.iframe,message:JSON.parse(r)}),M(D,"--");break;case"mouseenter":p("onMouseEnter");break;case"mouseleave":p("onMouseLeave");break;case"autoResize":l[D].autoResize=JSON.parse(u(9));break;case"scrollTo":m(!1);break;case"scrollToOffset":m(!0);break;case"pageInfo":d(l[D]&&l[D].iframe,D),function(){function e(e,o){function i(){l[n]?d(l[n].iframe,n):t()}["scroll","resize"].forEach((function(t){M(n,e+t+" listener for sendPageInfo"),o(window,t,i)}))}function t(){e("Remove ",v)}var n=D;e("Add ",w),l[n]&&(l[n].stopPageInfo=t)}();break;case"pageInfoStop":l[D]&&l[D].stopPageInfo&&(l[D].stopPageInfo(),delete l[D].stopPageInfo);break;case"inPageLink":n=u(9).split("#")[1]||"",o=decodeURIComponent(n),(i=document.getElementById(o)||document.getElementsByName(o)[0])?(e=f(i),M(D,"Moving to in page link (#"+n+") at x: "+e.x+" y: "+e.y),c={x:e.x,y:e.y},g(),M(D,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(n):M(D,"In page link #"+n+" not found and window.parentIFrame not found"):M(D,"In page link #"+n+" not found");break;case"reset":F(B);break;case"init":t(),y("onInit",B.iframe);break;default:0===Number(B.width)&&0===Number(B.height)?T("Unsupported message received ("+B.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var e,n,o,i,r}())):I(D,"Ignored: "+q)}function S(e,t,n){var o=null,i=null;if(l[e]){if("function"!=typeof(o=l[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");i=o(n)}return i}function x(e){var t=e.id;delete l[t]}function N(e){var t=e.id;if(!1!==S(t,"onClose",t)){M(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(n){T(n)}S(t,"onClosed",t),M(t,"--"),x(e)}else M(t,"Close iframe cancelled by onClose event")}function k(t){null===c&&M(t,"Get page position: "+(c={x:window.pageXOffset!==e?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==e?window.pageYOffset:document.documentElement.scrollTop}).x+","+c.y)}function z(e){null!==c&&(window.scrollTo(c.x,c.y),M(e,"Set page position: "+c.x+","+c.y),R())}function R(){c=null}function F(e){M(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),k(e.id),A((function(){C(e),P("reset","reset",e.iframe,e.id)}),e,"reset")}function C(e){function t(t){i||"0"!==e[t]||(i=!0,M(o,"Hidden iFrame detected, creating visibility listener"),function(){function e(){function e(e){function t(t){return"0px"===(l[e]&&l[e].iframe.style[t])}function n(e){return null!==e.offsetParent}l[e]&&n(l[e].iframe)&&(t("height")||t("width"))&&P("Visibility change","resize",l[e].iframe,e)}Object.keys(l).forEach((function(t){e(t)}))}function t(t){M("window","Mutation observed: "+t[0].target+" "+t[0].type),j(e,16)}function n(){var e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new o(t).observe(e,n)}var o=p();o&&n()}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",M(e.id,"IFrame ("+o+") "+t+" set to "+e[t]+"px")):M("undefined","messageData id not set")}(n),t(n)}var o=e.iframe.id;l[o]&&(l[o].sizeHeight&&n("height"),l[o].sizeWidth&&n("width"))}function A(e,t,n){n!==t.type&&u&&!window.jasmine?(M(t.id,"Requesting animation frame"),u(e)):e()}function P(e,t,n,o,i){var r,s=!1;o=o||n.id,l[o]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(r=l[o]&&l[o].targetOrigin,M(o,"["+e+"] Sending msg to iframe["+o+"] ("+t+") targetOrigin: "+r),n.contentWindow.postMessage(a+t,r)):T(o,"["+e+"] IFrame("+o+") not found"),i&&l[o]&&l[o].warningTimeout&&(l[o].msgTimeout=setTimeout((function(){!l[o]||l[o].loaded||s||(s=!0,T(o,"IFrame has not responded within "+l[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),l[o].warningTimeout)))}function L(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function W(t,i){function r(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T(v,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a,s,c,u,f,m,h,v=(""===(a=t.id)&&(t.id=(s=i&&i.id||g.id+n++,null!==document.getElementById(s)&&(s+=n++),a=s),o=(i||{}).log,M(a,"Added missing iframe ID: "+a+" ("+t.src+")")),a);v in l&&"iFrameResizer"in t?T(v,"Ignored iFrame, already setup."):(m=(m=i)||{},l[v]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(m),Object.keys(m).forEach(r,m),function(e){for(var t in g)Object.prototype.hasOwnProperty.call(g,t)&&(l[v][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:g[t])}(m),l[v]&&(l[v].targetOrigin=!0===l[v].checkOrigin?""===(h=l[v].remoteHost)||null!==h.match(/^(about:blank|javascript:|file:\/\/)/)?"*":h:"*"),function(){switch(M(v,"IFrame scrolling "+(l[v]&&l[v].scrolling?"enabled":"disabled")+" for "+v),t.style.overflow=!1===(l[v]&&l[v].scrolling)?"hidden":"auto",l[v]&&l[v].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=l[v]?l[v].scrolling:"no"}}(),function(){function e(e){var n=l[v][e];n!==1/0&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,M(v,"Set "+e+" = "+t.style[e]))}function n(e){if(l[v]["min"+e]>l[v]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(l[v]&&l[v].bodyMargin)&&"0"!==(l[v]&&l[v].bodyMargin)||(l[v].bodyMarginV1=l[v].bodyMargin,l[v].bodyMargin=l[v].bodyMargin+"px"),c=L(v),(f=p())&&(u=f,t.parentNode&&new u((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&N(t)}))}))})).observe(t.parentNode,{childList:!0})),w(t,"load",(function(){var n,o;P("iFrame.onload",c,t,e,!0),n=l[v]&&l[v].firstRun,o=l[v]&&l[v].heightCalculationMethod in d,!n&&o&&F({iframe:t,height:0,width:0,type:"init"})})),P("init",c,t,e,!0),l[v]&&(l[v].iframe.iFrameResizer={close:N.bind(null,l[v].iframe),removeListeners:x.bind(null,l[v].iframe),resize:P.bind(null,"Window resize","resize",l[v].iframe),moveToAnchor:function(e){P("Move to anchor","moveToAnchor:"+e,l[v].iframe,v)},sendMessage:function(e){P("Send Message","message:"+(e=JSON.stringify(e)),l[v].iframe,v)}}))}function j(e,t){null===m&&(m=setTimeout((function(){m=null,e()}),t))}function H(){"hidden"!==document.visibilityState&&(M("document","Trigger event: Visiblity change"),j((function(){q("Tab Visable","resize")}),16))}function q(e,t){Object.keys(l).forEach((function(n){(function(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun})(n)&&P(e,t,l[n].iframe,n)}))}function B(){w(window,"message",O),w(window,"resize",(function(){var e;M("window","Trigger event: "+(e="resize")),j((function(){q("Window "+e,"resize")}),16)})),w(document,"visibilitychange",H),w(document,"-webkit-visibilitychange",H)}function D(){function t(e,t){t&&(function(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}(),W(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!u;e+=1)u=window[t[e]+"RequestAnimationFrame"];u?u=u.bind(window):M("setup","RequestAnimationFrame not supported")}(),B(),function(o,i){switch(n=[],function(e){e&&e.enablePublicMethods&&T("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(o),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),t.bind(e,o));break;case"object":t(o,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return n}}}();var h={exports:{}};!function(e){!function(t){if("undefined"!=typeof window){var n=!0,o="",i=0,r="",a=null,s="",c=!1,u={resize:1,click:1},d=128,l=!0,f=1,m="bodyOffset",g=m,h=!0,p="",w={},v=32,y=null,b=!1,M=!1,I="[iFrameSizer]",T=I.length,E="",O={max:1,min:1,bodyScroll:1,documentElementScroll:1},S="child",x=window.parent,N="*",k=0,z=!1,R=null,F=16,C=1,A="scroll",P=A,L=window,W=function(){re("onMessage function not defined")},j=function(){},H=function(){},q={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},B={},D=!1;try{var U=Object.create({},{passive:{get:function(){D=!0}}});window.addEventListener("test",ee,U),window.removeEventListener("test",ee,U)}catch(Ne){}var V,$,J,X,Y,Q,G,K={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return K.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return q.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ve(K))},min:function(){return Math.min.apply(null,ve(K))},grow:function(){return K.max()},lowestElement:function(){return Math.max(K.bodyOffset()||K.documentElementOffset(),we("bottom",be()))},taggedElement:function(){return ye("bottom","data-iframe-height")}},_={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return q.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(_.bodyScroll(),_.documentElementScroll())},max:function(){return Math.max.apply(null,ve(_))},min:function(){return Math.min.apply(null,ve(_))},rightMostElement:function(){return we("right",be())},taggedElement:function(){return ye("right","data-iframe-width")}},Z=(V=Me,Y=null,Q=0,G=function(){Q=Date.now(),Y=null,X=V.apply($,J),Y||($=J=null)},function(){var e=Date.now();Q||(Q=e);var t=F-(e-Q);return $=this,J=arguments,t<=0||t>F?(Y&&(clearTimeout(Y),Y=null),Q=e,X=V.apply($,J),Y||($=J=null)):Y||(Y=setTimeout(G,t)),X});te(window,"message",(function(t){var n={init:function(){p=t.data,x=t.source,ae(),l=!1,setTimeout((function(){h=!1}),d)},reset:function(){h?ie("Page reset ignored by init"):(ie("Page size reset by host page"),Ee("resetPage"))},resize:function(){Ie("resizeParent","Parent window requested size check")},moveToAnchor:function(){w.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();ie("PageInfoFromParent called from parent: "+e),H(JSON.parse(e)),ie(" --")},message:function(){var e=i();ie("onMessage called from parent: "+e),W(JSON.parse(e)),ie(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function a(){var i=o();i in n?n[i]():!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}I===(""+t.data).substr(0,T)&&(!1===l?a():r()?n.init():ie('Ignored message of type "'+o()+'". Received before initialization.'))})),te(window,"readystatechange",xe),xe()}function ee(){}function te(e,t,n,o){e.addEventListener(t,n,!!D&&(o||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e){return I+"["+E+"] "+e}function ie(e){b&&"object"==typeof window.console&&console.log(oe(e))}function re(e){"object"==typeof window.console&&console.warn(oe(e))}function ae(){var e;!function(){function e(e){return"true"===e}var a=p.substr(T).split(":");E=a[0],i=t!==a[1]?Number(a[1]):i,c=t!==a[2]?e(a[2]):c,b=t!==a[3]?e(a[3]):b,v=t!==a[4]?Number(a[4]):v,n=t!==a[6]?e(a[6]):n,r=a[7],g=t!==a[8]?a[8]:g,o=a[9],s=a[10],k=t!==a[11]?Number(a[11]):k,w.enable=t!==a[12]&&e(a[12]),S=t!==a[13]?a[13]:S,P=t!==a[14]?a[14]:P,M=t!==a[15]?Boolean(a[15]):M}(),ie("Initialising iFrame ("+window.location.href+")"),function(){function e(){var e=window.iFrameResizer;ie("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(se,e),W="onMessage"in e?e.onMessage:W,j="onReady"in e?e.onReady:j,N="targetOrigin"in e?e.targetOrigin:N,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,P="widthCalculationMethod"in e?e.widthCalculationMethod:P}function t(e,t){return"function"==typeof e&&(ie("Setup custom "+t+"CalcMethod"),q[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),g=t(g,"height"),P=t(P,"width"));ie("TargetOrigin for parent set to: "+N)}(),function(){t===r&&(r=i+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",r))}(),ce("background",o),ce("padding",s),(e=document.createElement("div")).style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e),fe(),me(),document.documentElement.style.height="",document.body.style.height="",ie('HTML & body height set to "auto"'),ie("Enable public methods"),L.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,ge()):!1===e&&!0===n&&(n=!1,de("remove"),null!==a&&a.disconnect(),clearInterval(y)),Se(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Se(0,0,"close")},getId:function(){return E},getPageInfo:function(e){"function"==typeof e?(H=e,Se(0,0,"pageInfo")):(H=function(){},Se(0,0,"pageInfoStop"))},moveToAnchor:function(e){w.findTarget(e)},reset:function(){Oe("parentIFrame.reset")},scrollTo:function(e,t){Se(t,e,"scrollTo")},scrollToOffset:function(e,t){Se(t,e,"scrollToOffset")},sendMessage:function(e,t){Se(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){P=e,me()},setTargetOrigin:function(e){ie("Set targetOrigin: "+e),N=e},size:function(e,t){Ie("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},function(){if(!0!==M)return;function e(e){Se(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){ie("Add event listener: "+n),te(window.document,t,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}(),ge(),w=function(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,10)+parseInt(o.x,10),y:parseInt(n.top,10)+parseInt(o.y,10)}}function o(e){function o(e){var t=n(e);ie("Moving to in page link (#"+i+") at x: "+t.x+" y: "+t.y),Se(t.y,t.x,"scrollToOffset")}var i=e.split("#")[1]||e,r=decodeURIComponent(i),a=document.getElementById(r)||document.getElementsByName(r)[0];t!==a?o(a):(ie("In page link (#"+i+") not found in iFrame, so sending to parent"),Se(0,0,"inPageLink","#"+i))}function i(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&te(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function a(){te(window,"hashchange",i)}function s(){setTimeout(i,d)}function c(){Array.prototype.forEach&&document.querySelectorAll?(ie("Setting up location.hash handlers"),r(),a(),s()):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}w.enable?c():ie("In page linking not enabled");return{findTarget:o}}(),Ie("init","Init message from host page"),j()}function se(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,ie("Body "+e+' set to "'+n+'"'))}function ue(e){var t={add:function(t){function n(){Ie(e.eventName,e.eventType)}B[t]=n,te(window,t,n,{passive:!0})},remove:function(e){var t,n,o,i=B[e];delete B[e],t=window,n=e,o=i,t.removeEventListener(n,o,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),ie(ne(e.method)+" event listener: "+e.eventType)}function de(e){ue({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),ue({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),ue({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),ue({method:e,eventType:"Input",eventName:"input"}),ue({method:e,eventType:"Mouse Up",eventName:"mouseup"}),ue({method:e,eventType:"Mouse Down",eventName:"mousedown"}),ue({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),ue({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),ue({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),ue({method:e,eventType:"Touch Start",eventName:"touchstart"}),ue({method:e,eventType:"Touch End",eventName:"touchend"}),ue({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),ue({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),ue({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),ue({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===S&&ue({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,o){return t!==e&&(e in n||(re(e+" is not a valid option for "+o+"CalculationMethod."),e=t),ie(o+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,m,K,"height")}function me(){P=le(P,A,_,"width")}function ge(){var e;!0===n?(de("add"),e=0>v,window.MutationObserver||window.WebKitMutationObserver?e?he():a=function(){function e(e){function t(e){!1===e.complete&&(ie("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",r,!1),c.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){c.splice(c.indexOf(e),1)}function n(e){ie("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",r,!1),t(e)}function o(e,t,o){n(e.target),Ie(t,o+": "+e.target.src)}function i(e){o(e,"imageLoad","Image loaded")}function r(e){o(e,"imageLoadFailed","Image load failed")}function a(t){Ie("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}function s(){var e=document.querySelector("body"),t={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return d=new u(a),ie("Create body MutationObserver"),d.observe(e,t),d}var c=[],u=window.MutationObserver||window.WebKitMutationObserver,d=s();return{disconnect:function(){"disconnect"in d&&(ie("Disconnect body MutationObserver"),d.disconnect(),c.forEach(n))}}}():(ie("MutationObserver not supported in this browser!"),he())):ie("Auto Resize disabled")}function he(){0!==v&&(ie("setInterval: "+v+"ms"),y=setInterval((function(){Ie("interval","setInterval: "+v)}),Math.abs(v)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,10)}function we(e,t){for(var n=t.length,o=0,i=0,r=ne(e),a=Date.now(),s=0;s<n;s++)(o=t[s].getBoundingClientRect()[e]+pe("margin"+r,t[s]))>i&&(i=o);return a=Date.now()-a,ie("Parsed "+n+" HTML elements"),ie("Element position calculated in "+a+"ms"),function(e){e>F/2&&ie("Event throttle increased to "+(F=2*e)+"ms")}(a),i}function ve(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function ye(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),we(e,n)}function be(){return document.querySelectorAll("body *")}function Me(e,n,o,i){var r,a;!function(){function e(e,t){return!(Math.abs(e-t)<=k)}return r=t!==o?o:K[g](),a=t!==i?i:_[P](),e(f,r)||c&&e(C,a)}()&&"init"!==e?!(e in{init:1,interval:1,size:1})&&(g in O||c&&P in O)?Oe(n):e in{interval:1}||ie("No change in size detected"):(Te(),Se(f=r,C=a,e))}function Ie(e,t,n,o){z&&e in u?ie("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||ie("Trigger event: "+t),"init"===e?Me(e,t,n,o):Z(e,t,n,o))}function Te(){z||(z=!0,ie("Trigger event lock on")),clearTimeout(R),R=setTimeout((function(){z=!1,ie("Trigger event lock off"),ie("--")}),d)}function Ee(e){f=K[g](),C=_[P](),Se(f,C,e)}function Oe(e){var t=g;g=m,ie("Reset trigger event: "+e),Te(),Ee("reset"),g=t}function Se(e,n,o,i,r){var a;t===r?r=N:ie("Message targetOrigin: "+r),ie("Sending message to host page ("+(a=E+":"+e+":"+n+":"+o+(t!==i?":"+i:""))+")"),x.postMessage(I+a,r)}function xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()}(h);var p=g.exports;m.iframeResize=p,m.iframeResizer=p,m.iframeResizerContentWindow=h.exports;var w=m;const v=s.defineComponent({props:{repo:{type:String,required:!0},repoId:{type:String,required:!0},category:String,categoryId:String,mapping:{type:String,required:!0},term:String,theme:{type:String,default:"light"},reactionsEnabled:{type:String,default:"1"},emitMetadata:{type:String,default:"0"}},setup(e){const f=s.ref(""),m=s.computed((()=>{return function({repo:e,repoId:t,category:n="",categoryId:o="",mapping:i,term:r="",theme:a="light",reactionsEnabled:s="1",emitMetadata:c="0",session:u}){const l={origin:location.href,session:u,theme:a,reactionsEnabled:s,emitMetadata:c,repo:e,repoId:t,category:n,categoryId:o,description:d("description")};switch(i){case"url":l.term=location.href;break;case"title":l.term=document.title;break;case"og:title":l.term=d("title");break;case"specific":l.term=r;break;case"number":l.number=r;break;case"pathname":default:l.term=location.pathname.length<2?"index":location.pathname.substr(1).replace(/\.\w+$/,"")}return`https://giscus.app/widget?${new URLSearchParams(l)}`}((s=((e,t)=>{for(var n in t||(t={}))i.call(t,n)&&a(e,n,t[n]);if(o)for(var n of o(t))r.call(t,n)&&a(e,n,t[n]);return e})({},e),c={session:f.value},t(s,n(c))));var s,c}));s.onMounted((()=>{const e=location.href,t=new URL(e),n=localStorage.getItem("giscus-session");if(f.value=t.searchParams.get("giscus")||"",f.value)localStorage.setItem("giscus-session",JSON.stringify(f.value)),t.searchParams.delete("giscus"),history.replaceState(void 0,document.title,t.toString());else if(n)try{f.value=JSON.parse(n||"")||""}catch(o){f.value="",localStorage.removeItem("giscus-session"),console.warn(`${u(null==o?void 0:o.message)} Session has been cleared.`)}})),s.onMounted(l);const g=(h=()=>f.value="",function(e){var t;if("https://giscus.app"!==e.origin)return;const{data:n}=e;if("object"!=typeof n||!(null==(t=null==n?void 0:n.giscus)?void 0:t.error))return;const o=n.giscus.error;if(o.includes("Bad credentials")||o.includes("Invalid state value")){if(null!==localStorage.getItem("giscus-session"))return localStorage.removeItem("giscus-session"),h(),void console.warn(`${u(o)} Session has been cleared.`);console.error(`${u(o)} No session is stored initially. ${c}`)}o.includes("Discussion not found")?console.warn(`[giscus] ${o}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${u(o)} ${c}`)});var h;s.onMounted((()=>window.addEventListener("message",g))),s.onUnmounted((()=>window.removeEventListener("message",g)));const p=s.ref();return s.onMounted((()=>{p.value&&(p.value=p.value,p.value.src=m.value,p.value.addEventListener("load",(()=>w.iframeResizer({checkOrigin:["https://giscus.app"]},p.value))))})),s.onUnmounted((()=>{var e,t;p.value&&"iFrameResizer"in p.value&&(null==(t=null==(e=p.value)?void 0:e.iFrameResizer)||t.removeListeners())})),()=>s.createVNode("div",{className:"giscus"},[s.createVNode("iframe",{title:"Comments",className:"giscus-frame",ref:p},null)])}}),y={install:e=>e.component("Giscus",v)};exports.Giscus=v,exports.plugin=y;
"use strict";var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,i=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,o)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[n]=o;Object.defineProperty(exports,"__esModule",{value:!0}),exports[Symbol.toStringTag]="Module";var s=require("vue");const c="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function u(e){return`[giscus] An error occurred. Error message: "${e}".`}function d(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function l(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent="\n .giscus, .giscus-frame {\n width: 100%;\n }\n .giscus-frame {\n border: none;\n color-scheme: auto;\n }\n ",document.head.prepend(e)}var f,m={},g={exports:{}};f=g,function(e){if("undefined"!=typeof window){var t,n=0,o=!1,i=!1,r="message".length,a="[iFrameSizer]",s=a.length,c=null,u=window.requestAnimationFrame,d={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},l={},m=null,g={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){T("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},h={};window.jQuery&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){W(n,e)})).end()}):I("","Unable to bind to jQuery, it is not fully loaded.")),f.exports=D(),window.iFrameResize=window.iFrameResize||D()}function p(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function w(e,t,n){e.addEventListener(t,n,!1)}function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return a+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function b(e){return l[e]?l[e].log:o}function M(e,t){E("log",e,t,b(e))}function I(e,t){E("info",e,t,b(e))}function T(e,t){E("warn",e,t,!0)}function E(e,t,n,o){!0===o&&"object"==typeof window.console&&console[e](y(t),n)}function O(e){function t(){i("Height"),i("Width"),A((function(){C(B),z(D),y("onResized",B)}),B,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function o(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function i(e){var t=Number(l[D]["max"+e]),n=Number(l[D]["min"+e]),o=e.toLowerCase(),i=Number(B[o]);M(D,"Checking "+o+" is in range "+n+"-"+t),i<n&&(i=n,M(D,"Set "+o+" to min value")),i>t&&(i=t,M(D,"Set "+o+" to max value")),B[o]=""+i}function u(e){return q.substr(q.indexOf(":")+r+e)}function d(e,t){var n,o,i;n=function(){var n,o;P("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),o=B.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:o.height,iframeWidth:o.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(o.top-n.top,10),offsetLeft:parseInt(o.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},o=32,h[i=t]||(h[i]=setTimeout((function(){h[i]=null,n()}),o))}function f(e){var t=e.getBoundingClientRect();return k(D),{x:Math.floor(Number(t.left)+Number(c.x)),y:Math.floor(Number(t.top)+Number(c.y))}}function m(e){var t=e?f(B.iframe):{x:0,y:0},n={x:Number(B.width)+t.x,y:Number(B.height)+t.y};M(D,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):T(D,"Unable to scroll to requested position, window.parentIFrame not found"):(c=n,g(),M(D,"--"))}function g(){!1!==y("onScroll",c)?z(D):R()}function p(e){var t={};if(0===Number(B.width)&&0===Number(B.height)){var n=u(9).split(":");t={x:n[1],y:n[0]}}else t={x:B.width,y:B.height};y(e,{iframe:B.iframe,screenX:Number(t.x),screenY:Number(t.y),type:B.type})}function y(e,t){return S(D,e,t)}var b,E,O,x,W,j,H,q=e.data,B={},D=null;"[iFrameResizerChild]Ready"===q?function(){for(var e in l)P("iFrame requested init",L(e),l[e].iframe,e)}():a===(""+q).substr(0,s)&&q.substr(s).split(":")[0]in l?(x=q.substr(s).split(":"),W=x[1]?parseInt(x[1],10):0,j=l[x[0]]&&l[x[0]].iframe,H=getComputedStyle(j),B={iframe:j,id:x[0],height:W+n(H)+o(H),width:x[2],type:x[3]},D=B.id,l[D]&&(l[D].loaded=!0),(O=B.type in{true:1,false:1,undefined:1})&&M(D,"Ignoring init message from meta parent page"),!O&&(E=!0,l[b=D]||(E=!1,T(B.type+" No settings for "+b+". Message was: "+q)),E)&&(M(D,"Received: "+q),function(){var e=!0;return null===B.iframe&&(T(D,"IFrame ("+B.id+") not found"),e=!1),e}()&&function(){var t,n=e.origin,o=l[D]&&l[D].checkOrigin;if(o&&""+n!="null"&&!(o.constructor===Array?function(){var e=0,t=!1;for(M(D,"Checking connection is from allowed list of origins: "+o);e<o.length;e++)if(o[e]===n){t=!0;break}return t}():(t=l[D]&&l[D].remoteHost,M(D,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+B.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(l[D]&&l[D].firstRun&&l[D]&&(l[D].firstRun=!1),B.type){case"close":N(B.iframe);break;case"message":r=u(6),M(D,"onMessage passed: {iframe: "+B.iframe.id+", message: "+r+"}"),y("onMessage",{iframe:B.iframe,message:JSON.parse(r)}),M(D,"--");break;case"mouseenter":p("onMouseEnter");break;case"mouseleave":p("onMouseLeave");break;case"autoResize":l[D].autoResize=JSON.parse(u(9));break;case"scrollTo":m(!1);break;case"scrollToOffset":m(!0);break;case"pageInfo":d(l[D]&&l[D].iframe,D),function(){function e(e,o){function i(){l[n]?d(l[n].iframe,n):t()}["scroll","resize"].forEach((function(t){M(n,e+t+" listener for sendPageInfo"),o(window,t,i)}))}function t(){e("Remove ",v)}var n=D;e("Add ",w),l[n]&&(l[n].stopPageInfo=t)}();break;case"pageInfoStop":l[D]&&l[D].stopPageInfo&&(l[D].stopPageInfo(),delete l[D].stopPageInfo);break;case"inPageLink":n=u(9).split("#")[1]||"",o=decodeURIComponent(n),(i=document.getElementById(o)||document.getElementsByName(o)[0])?(e=f(i),M(D,"Moving to in page link (#"+n+") at x: "+e.x+" y: "+e.y),c={x:e.x,y:e.y},g(),M(D,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(n):M(D,"In page link #"+n+" not found and window.parentIFrame not found"):M(D,"In page link #"+n+" not found");break;case"reset":F(B);break;case"init":t(),y("onInit",B.iframe);break;default:0===Number(B.width)&&0===Number(B.height)?T("Unsupported message received ("+B.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var e,n,o,i,r}())):I(D,"Ignored: "+q)}function S(e,t,n){var o=null,i=null;if(l[e]){if("function"!=typeof(o=l[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");i=o(n)}return i}function x(e){var t=e.id;delete l[t]}function N(e){var t=e.id;if(!1!==S(t,"onClose",t)){M(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(n){T(n)}S(t,"onClosed",t),M(t,"--"),x(e)}else M(t,"Close iframe cancelled by onClose event")}function k(t){null===c&&M(t,"Get page position: "+(c={x:window.pageXOffset!==e?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==e?window.pageYOffset:document.documentElement.scrollTop}).x+","+c.y)}function z(e){null!==c&&(window.scrollTo(c.x,c.y),M(e,"Set page position: "+c.x+","+c.y),R())}function R(){c=null}function F(e){M(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),k(e.id),A((function(){C(e),P("reset","reset",e.iframe,e.id)}),e,"reset")}function C(e){function t(t){i||"0"!==e[t]||(i=!0,M(o,"Hidden iFrame detected, creating visibility listener"),function(){function e(){function e(e){function t(t){return"0px"===(l[e]&&l[e].iframe.style[t])}function n(e){return null!==e.offsetParent}l[e]&&n(l[e].iframe)&&(t("height")||t("width"))&&P("Visibility change","resize",l[e].iframe,e)}Object.keys(l).forEach((function(t){e(t)}))}function t(t){M("window","Mutation observed: "+t[0].target+" "+t[0].type),j(e,16)}function n(){var e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new o(t).observe(e,n)}var o=p();o&&n()}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",M(e.id,"IFrame ("+o+") "+t+" set to "+e[t]+"px")):M("undefined","messageData id not set")}(n),t(n)}var o=e.iframe.id;l[o]&&(l[o].sizeHeight&&n("height"),l[o].sizeWidth&&n("width"))}function A(e,t,n){n!==t.type&&u&&!window.jasmine?(M(t.id,"Requesting animation frame"),u(e)):e()}function P(e,t,n,o,i){var r,s=!1;o=o||n.id,l[o]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(r=l[o]&&l[o].targetOrigin,M(o,"["+e+"] Sending msg to iframe["+o+"] ("+t+") targetOrigin: "+r),n.contentWindow.postMessage(a+t,r)):T(o,"["+e+"] IFrame("+o+") not found"),i&&l[o]&&l[o].warningTimeout&&(l[o].msgTimeout=setTimeout((function(){!l[o]||l[o].loaded||s||(s=!0,T(o,"IFrame has not responded within "+l[o].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),l[o].warningTimeout)))}function L(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function W(t,i){function r(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T(v,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a,s,c,u,f,m,h,v=(""===(a=t.id)&&(t.id=(s=i&&i.id||g.id+n++,null!==document.getElementById(s)&&(s+=n++),a=s),o=(i||{}).log,M(a,"Added missing iframe ID: "+a+" ("+t.src+")")),a);v in l&&"iFrameResizer"in t?T(v,"Ignored iFrame, already setup."):(m=(m=i)||{},l[v]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(m),Object.keys(m).forEach(r,m),function(e){for(var t in g)Object.prototype.hasOwnProperty.call(g,t)&&(l[v][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:g[t])}(m),l[v]&&(l[v].targetOrigin=!0===l[v].checkOrigin?""===(h=l[v].remoteHost)||null!==h.match(/^(about:blank|javascript:|file:\/\/)/)?"*":h:"*"),function(){switch(M(v,"IFrame scrolling "+(l[v]&&l[v].scrolling?"enabled":"disabled")+" for "+v),t.style.overflow=!1===(l[v]&&l[v].scrolling)?"hidden":"auto",l[v]&&l[v].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=l[v]?l[v].scrolling:"no"}}(),function(){function e(e){var n=l[v][e];n!==1/0&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,M(v,"Set "+e+" = "+t.style[e]))}function n(e){if(l[v]["min"+e]>l[v]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(l[v]&&l[v].bodyMargin)&&"0"!==(l[v]&&l[v].bodyMargin)||(l[v].bodyMarginV1=l[v].bodyMargin,l[v].bodyMargin=l[v].bodyMargin+"px"),c=L(v),(f=p())&&(u=f,t.parentNode&&new u((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&N(t)}))}))})).observe(t.parentNode,{childList:!0})),w(t,"load",(function(){var n,o;P("iFrame.onload",c,t,e,!0),n=l[v]&&l[v].firstRun,o=l[v]&&l[v].heightCalculationMethod in d,!n&&o&&F({iframe:t,height:0,width:0,type:"init"})})),P("init",c,t,e,!0),l[v]&&(l[v].iframe.iFrameResizer={close:N.bind(null,l[v].iframe),removeListeners:x.bind(null,l[v].iframe),resize:P.bind(null,"Window resize","resize",l[v].iframe),moveToAnchor:function(e){P("Move to anchor","moveToAnchor:"+e,l[v].iframe,v)},sendMessage:function(e){P("Send Message","message:"+(e=JSON.stringify(e)),l[v].iframe,v)}}))}function j(e,t){null===m&&(m=setTimeout((function(){m=null,e()}),t))}function H(){"hidden"!==document.visibilityState&&(M("document","Trigger event: Visiblity change"),j((function(){q("Tab Visable","resize")}),16))}function q(e,t){Object.keys(l).forEach((function(n){(function(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun})(n)&&P(e,t,l[n].iframe,n)}))}function B(){w(window,"message",O),w(window,"resize",(function(){var e;M("window","Trigger event: "+(e="resize")),j((function(){q("Window "+e,"resize")}),16)})),w(document,"visibilitychange",H),w(document,"-webkit-visibilitychange",H)}function D(){function t(e,t){t&&(function(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}(),W(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!u;e+=1)u=window[t[e]+"RequestAnimationFrame"];u?u=u.bind(window):M("setup","RequestAnimationFrame not supported")}(),B(),function(o,i){switch(n=[],function(e){e&&e.enablePublicMethods&&T("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(o),typeof i){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(i||"iframe"),t.bind(e,o));break;case"object":t(o,i);break;default:throw new TypeError("Unexpected data type ("+typeof i+")")}return n}}}();var h={exports:{}};!function(e){!function(t){if("undefined"!=typeof window){var n=!0,o="",i=0,r="",a=null,s="",c=!1,u={resize:1,click:1},d=128,l=!0,f=1,m="bodyOffset",g=m,h=!0,p="",w={},v=32,y=null,b=!1,M=!1,I="[iFrameSizer]",T=I.length,E="",O={max:1,min:1,bodyScroll:1,documentElementScroll:1},S="child",x=window.parent,N="*",k=0,z=!1,R=null,F=16,C=1,A="scroll",P=A,L=window,W=function(){re("onMessage function not defined")},j=function(){},H=function(){},q={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},B={},D=!1;try{var U=Object.create({},{passive:{get:function(){D=!0}}});window.addEventListener("test",ee,U),window.removeEventListener("test",ee,U)}catch(Ne){}var V,$,J,X,Y,Q,G,K={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return K.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return q.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ve(K))},min:function(){return Math.min.apply(null,ve(K))},grow:function(){return K.max()},lowestElement:function(){return Math.max(K.bodyOffset()||K.documentElementOffset(),we("bottom",be()))},taggedElement:function(){return ye("bottom","data-iframe-height")}},_={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return q.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(_.bodyScroll(),_.documentElementScroll())},max:function(){return Math.max.apply(null,ve(_))},min:function(){return Math.min.apply(null,ve(_))},rightMostElement:function(){return we("right",be())},taggedElement:function(){return ye("right","data-iframe-width")}},Z=(V=Me,Y=null,Q=0,G=function(){Q=Date.now(),Y=null,X=V.apply($,J),Y||($=J=null)},function(){var e=Date.now();Q||(Q=e);var t=F-(e-Q);return $=this,J=arguments,t<=0||t>F?(Y&&(clearTimeout(Y),Y=null),Q=e,X=V.apply($,J),Y||($=J=null)):Y||(Y=setTimeout(G,t)),X});te(window,"message",(function(t){var n={init:function(){p=t.data,x=t.source,ae(),l=!1,setTimeout((function(){h=!1}),d)},reset:function(){h?ie("Page reset ignored by init"):(ie("Page size reset by host page"),Ee("resetPage"))},resize:function(){Ie("resizeParent","Parent window requested size check")},moveToAnchor:function(){w.findTarget(i())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=i();ie("PageInfoFromParent called from parent: "+e),H(JSON.parse(e)),ie(" --")},message:function(){var e=i();ie("onMessage called from parent: "+e),W(JSON.parse(e)),ie(" --")}};function o(){return t.data.split("]")[1].split(":")[0]}function i(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function a(){var i=o();i in n?n[i]():!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}I===(""+t.data).substr(0,T)&&(!1===l?a():r()?n.init():ie('Ignored message of type "'+o()+'". Received before initialization.'))})),te(window,"readystatechange",xe),xe()}function ee(){}function te(e,t,n,o){e.addEventListener(t,n,!!D&&(o||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function oe(e){return I+"["+E+"] "+e}function ie(e){b&&"object"==typeof window.console&&console.log(oe(e))}function re(e){"object"==typeof window.console&&console.warn(oe(e))}function ae(){var e;!function(){function e(e){return"true"===e}var a=p.substr(T).split(":");E=a[0],i=t!==a[1]?Number(a[1]):i,c=t!==a[2]?e(a[2]):c,b=t!==a[3]?e(a[3]):b,v=t!==a[4]?Number(a[4]):v,n=t!==a[6]?e(a[6]):n,r=a[7],g=t!==a[8]?a[8]:g,o=a[9],s=a[10],k=t!==a[11]?Number(a[11]):k,w.enable=t!==a[12]&&e(a[12]),S=t!==a[13]?a[13]:S,P=t!==a[14]?a[14]:P,M=t!==a[15]?Boolean(a[15]):M}(),ie("Initialising iFrame ("+window.location.href+")"),function(){function e(){var e=window.iFrameResizer;ie("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(se,e),W="onMessage"in e?e.onMessage:W,j="onReady"in e?e.onReady:j,N="targetOrigin"in e?e.targetOrigin:N,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,P="widthCalculationMethod"in e?e.widthCalculationMethod:P}function t(e,t){return"function"==typeof e&&(ie("Setup custom "+t+"CalcMethod"),q[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),g=t(g,"height"),P=t(P,"width"));ie("TargetOrigin for parent set to: "+N)}(),function(){t===r&&(r=i+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",r))}(),ce("background",o),ce("padding",s),(e=document.createElement("div")).style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e),fe(),me(),document.documentElement.style.height="",document.body.style.height="",ie('HTML & body height set to "auto"'),ie("Enable public methods"),L.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,ge()):!1===e&&!0===n&&(n=!1,de("remove"),null!==a&&a.disconnect(),clearInterval(y)),Se(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Se(0,0,"close")},getId:function(){return E},getPageInfo:function(e){"function"==typeof e?(H=e,Se(0,0,"pageInfo")):(H=function(){},Se(0,0,"pageInfoStop"))},moveToAnchor:function(e){w.findTarget(e)},reset:function(){Oe("parentIFrame.reset")},scrollTo:function(e,t){Se(t,e,"scrollTo")},scrollToOffset:function(e,t){Se(t,e,"scrollToOffset")},sendMessage:function(e,t){Se(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){P=e,me()},setTargetOrigin:function(e){ie("Set targetOrigin: "+e),N=e},size:function(e,t){Ie("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},function(){if(!0!==M)return;function e(e){Se(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){ie("Add event listener: "+n),te(window.document,t,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}(),ge(),w=function(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),o=e();return{x:parseInt(n.left,10)+parseInt(o.x,10),y:parseInt(n.top,10)+parseInt(o.y,10)}}function o(e){function o(e){var t=n(e);ie("Moving to in page link (#"+i+") at x: "+t.x+" y: "+t.y),Se(t.y,t.x,"scrollToOffset")}var i=e.split("#")[1]||e,r=decodeURIComponent(i),a=document.getElementById(r)||document.getElementsByName(r)[0];t!==a?o(a):(ie("In page link (#"+i+") not found in iFrame, so sending to parent"),Se(0,0,"inPageLink","#"+i))}function i(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&o(t)}function r(){function e(e){function t(e){e.preventDefault(),o(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&te(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function a(){te(window,"hashchange",i)}function s(){setTimeout(i,d)}function c(){Array.prototype.forEach&&document.querySelectorAll?(ie("Setting up location.hash handlers"),r(),a(),s()):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}w.enable?c():ie("In page linking not enabled");return{findTarget:o}}(),Ie("init","Init message from host page"),j()}function se(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,ie("Body "+e+' set to "'+n+'"'))}function ue(e){var t={add:function(t){function n(){Ie(e.eventName,e.eventType)}B[t]=n,te(window,t,n,{passive:!0})},remove:function(e){var t,n,o,i=B[e];delete B[e],t=window,n=e,o=i,t.removeEventListener(n,o,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),ie(ne(e.method)+" event listener: "+e.eventType)}function de(e){ue({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),ue({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),ue({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),ue({method:e,eventType:"Input",eventName:"input"}),ue({method:e,eventType:"Mouse Up",eventName:"mouseup"}),ue({method:e,eventType:"Mouse Down",eventName:"mousedown"}),ue({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),ue({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),ue({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),ue({method:e,eventType:"Touch Start",eventName:"touchstart"}),ue({method:e,eventType:"Touch End",eventName:"touchend"}),ue({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),ue({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),ue({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),ue({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===S&&ue({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,o){return t!==e&&(e in n||(re(e+" is not a valid option for "+o+"CalculationMethod."),e=t),ie(o+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,m,K,"height")}function me(){P=le(P,A,_,"width")}function ge(){var e;!0===n?(de("add"),e=0>v,window.MutationObserver||window.WebKitMutationObserver?e?he():a=function(){function e(e){function t(e){!1===e.complete&&(ie("Attach listeners to "+e.src),e.addEventListener("load",i,!1),e.addEventListener("error",r,!1),c.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){c.splice(c.indexOf(e),1)}function n(e){ie("Remove listeners from "+e.src),e.removeEventListener("load",i,!1),e.removeEventListener("error",r,!1),t(e)}function o(e,t,o){n(e.target),Ie(t,o+": "+e.target.src)}function i(e){o(e,"imageLoad","Image loaded")}function r(e){o(e,"imageLoadFailed","Image load failed")}function a(t){Ie("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}function s(){var e=document.querySelector("body"),t={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return d=new u(a),ie("Create body MutationObserver"),d.observe(e,t),d}var c=[],u=window.MutationObserver||window.WebKitMutationObserver,d=s();return{disconnect:function(){"disconnect"in d&&(ie("Disconnect body MutationObserver"),d.disconnect(),c.forEach(n))}}}():(ie("MutationObserver not supported in this browser!"),he())):ie("Auto Resize disabled")}function he(){0!==v&&(ie("setInterval: "+v+"ms"),y=setInterval((function(){Ie("interval","setInterval: "+v)}),Math.abs(v)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,10)}function we(e,t){for(var n=t.length,o=0,i=0,r=ne(e),a=Date.now(),s=0;s<n;s++)(o=t[s].getBoundingClientRect()[e]+pe("margin"+r,t[s]))>i&&(i=o);return a=Date.now()-a,ie("Parsed "+n+" HTML elements"),ie("Element position calculated in "+a+"ms"),function(e){e>F/2&&ie("Event throttle increased to "+(F=2*e)+"ms")}(a),i}function ve(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function ye(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),we(e,n)}function be(){return document.querySelectorAll("body *")}function Me(e,n,o,i){var r,a;!function(){function e(e,t){return!(Math.abs(e-t)<=k)}return r=t!==o?o:K[g](),a=t!==i?i:_[P](),e(f,r)||c&&e(C,a)}()&&"init"!==e?!(e in{init:1,interval:1,size:1})&&(g in O||c&&P in O)?Oe(n):e in{interval:1}||ie("No change in size detected"):(Te(),Se(f=r,C=a,e))}function Ie(e,t,n,o){z&&e in u?ie("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||ie("Trigger event: "+t),"init"===e?Me(e,t,n,o):Z(e,t,n,o))}function Te(){z||(z=!0,ie("Trigger event lock on")),clearTimeout(R),R=setTimeout((function(){z=!1,ie("Trigger event lock off"),ie("--")}),d)}function Ee(e){f=K[g](),C=_[P](),Se(f,C,e)}function Oe(e){var t=g;g=m,ie("Reset trigger event: "+e),Te(),Ee("reset"),g=t}function Se(e,n,o,i,r){var a;t===r?r=N:ie("Message targetOrigin: "+r),ie("Sending message to host page ("+(a=E+":"+e+":"+n+":"+o+(t!==i?":"+i:""))+")"),x.postMessage(I+a,r)}function xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()}(h);var p=g.exports;m.iframeResize=p,m.iframeResizer=p,m.iframeResizerContentWindow=h.exports;var w=m;const v=s.defineComponent({props:{repo:{type:String,required:!0},repoId:{type:String,required:!0},category:String,categoryId:String,mapping:{type:String,required:!0},term:String,lang:{type:String,default:"en"},theme:{type:String,default:"light"},reactionsEnabled:{type:String,default:"1"},emitMetadata:{type:String,default:"0"}},setup(e){const f=s.ref(""),m=s.computed((()=>{return function({repo:e,repoId:t,category:n="",categoryId:o="",mapping:i,term:r="",theme:a="light",reactionsEnabled:s="1",emitMetadata:c="0",lang:u="en",session:l,origin:f=location.href}){const m={origin:f,session:l,theme:a,reactionsEnabled:s,emitMetadata:c,repo:e,repoId:t,category:n,categoryId:o,description:d("description")};switch(i){case"url":m.term=location.href;break;case"title":m.term=document.title;break;case"og:title":m.term=d("title");break;case"specific":m.term=r;break;case"number":m.number=r;break;case"pathname":default:m.term=location.pathname.length<2?"index":location.pathname.substr(1).replace(/\.\w+$/,"")}return`https://giscus.app/${u}/widget?${new URLSearchParams(m)}`}((s=((e,t)=>{for(var n in t||(t={}))i.call(t,n)&&a(e,n,t[n]);if(o)for(var n of o(t))r.call(t,n)&&a(e,n,t[n]);return e})({},e),c={session:f.value},t(s,n(c))));var s,c}));s.onMounted((()=>{const e=location.href,t=new URL(e),n=localStorage.getItem("giscus-session");if(f.value=t.searchParams.get("giscus")||"",f.value)localStorage.setItem("giscus-session",JSON.stringify(f.value)),t.searchParams.delete("giscus"),history.replaceState(void 0,document.title,t.toString());else if(n)try{f.value=JSON.parse(n||"")||""}catch(o){f.value="",localStorage.removeItem("giscus-session"),console.warn(`${u(null==o?void 0:o.message)} Session has been cleared.`)}})),s.onMounted(l);const g=(h=()=>f.value="",function(e){var t;if("https://giscus.app"!==e.origin)return;const{data:n}=e;if("object"!=typeof n||!(null==(t=null==n?void 0:n.giscus)?void 0:t.error))return;const o=n.giscus.error;if(o.includes("Bad credentials")||o.includes("Invalid state value")){if(null!==localStorage.getItem("giscus-session"))return localStorage.removeItem("giscus-session"),h(),void console.warn(`${u(o)} Session has been cleared.`);console.error(`${u(o)} No session is stored initially. ${c}`)}o.includes("Discussion not found")?console.warn(`[giscus] ${o}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${u(o)} ${c}`)});var h;s.onMounted((()=>window.addEventListener("message",g))),s.onUnmounted((()=>window.removeEventListener("message",g)));const p=s.ref();return s.onMounted((()=>{p.value&&(p.value=p.value,p.value.src=m.value,p.value.addEventListener("load",(()=>w.iframeResizer({checkOrigin:["https://giscus.app"]},p.value))))})),s.onUnmounted((()=>{var e,t;p.value&&"iFrameResizer"in p.value&&(null==(t=null==(e=p.value)?void 0:e.iFrameResizer)||t.removeListeners())})),()=>s.createVNode("div",{className:"giscus"},[s.createVNode("iframe",{title:"Comments",className:"giscus-frame",ref:p},null)])}}),y={install:e=>e.component("Giscus",v)};exports.Giscus=v,exports.plugin=y;

@@ -21,2 +21,6 @@ /// <reference types="react" />

term: PropType<string | undefined>;
lang: {
type: PropType<string | undefined>;
default: string;
};
theme: {

@@ -41,2 +45,3 @@ type: PropType<import("@shared/types").Theme | undefined>;

term?: unknown;
lang?: unknown;
theme?: unknown;

@@ -52,2 +57,3 @@ reactionsEnabled?: unknown;

emitMetadata: ("0" | "1") | undefined;
lang: string | undefined;
} & {

@@ -61,2 +67,3 @@ category?: string | undefined;

emitMetadata: ("0" | "1") | undefined;
lang: string | undefined;
}>;

@@ -63,0 +70,0 @@ export declare const plugin: Plugin;

@@ -1,1 +0,1 @@

var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i;import{defineComponent as s,ref as c,computed as u,onMounted as d,onUnmounted as l,createVNode as f}from"vue";const m="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function g(e){return`[giscus] An error occurred. Error message: "${e}".`}function h(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function p(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent="\n .giscus, .giscus-frame {\n width: 100%;\n }\n .giscus-frame {\n border: none;\n color-scheme: auto;\n }\n ",document.head.prepend(e)}var w,v={},y={exports:{}};w=y,function(e){if("undefined"!=typeof window){var t,n=0,i=!1,o=!1,r="message".length,a="[iFrameSizer]",s=a.length,c=null,u=window.requestAnimationFrame,d={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},l={},f=null,m={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){T("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},g={};window.jQuery&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){W(n,e)})).end()}):E("","Unable to bind to jQuery, it is not fully loaded.")),w.exports=D(),window.iFrameResize=window.iFrameResize||D()}function h(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,t,n){e.addEventListener(t,n,!1)}function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return a+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function b(e){return l[e]?l[e].log:i}function I(e,t){O("log",e,t,b(e))}function E(e,t){O("info",e,t,b(e))}function T(e,t){O("warn",e,t,!0)}function O(e,t,n,i){!0===i&&"object"==typeof window.console&&console[e](y(t),n)}function M(e){function t(){o("Height"),o("Width"),A((function(){C(B),N(D),y("onResized",B)}),B,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function i(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function o(e){var t=Number(l[D]["max"+e]),n=Number(l[D]["min"+e]),i=e.toLowerCase(),o=Number(B[i]);I(D,"Checking "+i+" is in range "+n+"-"+t),o<n&&(o=n,I(D,"Set "+i+" to min value")),o>t&&(o=t,I(D,"Set "+i+" to max value")),B[i]=""+o}function u(e){return q.substr(q.indexOf(":")+r+e)}function d(e,t){var n,i,o;n=function(){var n,i;P("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),i=B.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-n.top,10),offsetLeft:parseInt(i.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},i=32,g[o=t]||(g[o]=setTimeout((function(){g[o]=null,n()}),i))}function f(e){var t=e.getBoundingClientRect();return z(D),{x:Math.floor(Number(t.left)+Number(c.x)),y:Math.floor(Number(t.top)+Number(c.y))}}function m(e){var t=e?f(B.iframe):{x:0,y:0},n={x:Number(B.width)+t.x,y:Number(B.height)+t.y};I(D,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):T(D,"Unable to scroll to requested position, window.parentIFrame not found"):(c=n,h(),I(D,"--"))}function h(){!1!==y("onScroll",c)?N(D):R()}function w(e){var t={};if(0===Number(B.width)&&0===Number(B.height)){var n=u(9).split(":");t={x:n[1],y:n[0]}}else t={x:B.width,y:B.height};y(e,{iframe:B.iframe,screenX:Number(t.x),screenY:Number(t.y),type:B.type})}function y(e,t){return S(D,e,t)}var b,O,M,x,W,j,H,q=e.data,B={},D=null;"[iFrameResizerChild]Ready"===q?function(){for(var e in l)P("iFrame requested init",L(e),l[e].iframe,e)}():a===(""+q).substr(0,s)&&q.substr(s).split(":")[0]in l?(x=q.substr(s).split(":"),W=x[1]?parseInt(x[1],10):0,j=l[x[0]]&&l[x[0]].iframe,H=getComputedStyle(j),B={iframe:j,id:x[0],height:W+n(H)+i(H),width:x[2],type:x[3]},D=B.id,l[D]&&(l[D].loaded=!0),(M=B.type in{true:1,false:1,undefined:1})&&I(D,"Ignoring init message from meta parent page"),!M&&(O=!0,l[b=D]||(O=!1,T(B.type+" No settings for "+b+". Message was: "+q)),O)&&(I(D,"Received: "+q),function(){var e=!0;return null===B.iframe&&(T(D,"IFrame ("+B.id+") not found"),e=!1),e}()&&function(){var t,n=e.origin,i=l[D]&&l[D].checkOrigin;if(i&&""+n!="null"&&!(i.constructor===Array?function(){var e=0,t=!1;for(I(D,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===n){t=!0;break}return t}():(t=l[D]&&l[D].remoteHost,I(D,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+B.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(l[D]&&l[D].firstRun&&l[D]&&(l[D].firstRun=!1),B.type){case"close":k(B.iframe);break;case"message":r=u(6),I(D,"onMessage passed: {iframe: "+B.iframe.id+", message: "+r+"}"),y("onMessage",{iframe:B.iframe,message:JSON.parse(r)}),I(D,"--");break;case"mouseenter":w("onMouseEnter");break;case"mouseleave":w("onMouseLeave");break;case"autoResize":l[D].autoResize=JSON.parse(u(9));break;case"scrollTo":m(!1);break;case"scrollToOffset":m(!0);break;case"pageInfo":d(l[D]&&l[D].iframe,D),function(){function e(e,i){function o(){l[n]?d(l[n].iframe,n):t()}["scroll","resize"].forEach((function(t){I(n,e+t+" listener for sendPageInfo"),i(window,t,o)}))}function t(){e("Remove ",v)}var n=D;e("Add ",p),l[n]&&(l[n].stopPageInfo=t)}();break;case"pageInfoStop":l[D]&&l[D].stopPageInfo&&(l[D].stopPageInfo(),delete l[D].stopPageInfo);break;case"inPageLink":n=u(9).split("#")[1]||"",i=decodeURIComponent(n),(o=document.getElementById(i)||document.getElementsByName(i)[0])?(e=f(o),I(D,"Moving to in page link (#"+n+") at x: "+e.x+" y: "+e.y),c={x:e.x,y:e.y},h(),I(D,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(n):I(D,"In page link #"+n+" not found and window.parentIFrame not found"):I(D,"In page link #"+n+" not found");break;case"reset":F(B);break;case"init":t(),y("onInit",B.iframe);break;default:0===Number(B.width)&&0===Number(B.height)?T("Unsupported message received ("+B.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var e,n,i,o,r}())):E(D,"Ignored: "+q)}function S(e,t,n){var i=null,o=null;if(l[e]){if("function"!=typeof(i=l[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");o=i(n)}return o}function x(e){var t=e.id;delete l[t]}function k(e){var t=e.id;if(!1!==S(t,"onClose",t)){I(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(n){T(n)}S(t,"onClosed",t),I(t,"--"),x(e)}else I(t,"Close iframe cancelled by onClose event")}function z(t){null===c&&I(t,"Get page position: "+(c={x:window.pageXOffset!==e?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==e?window.pageYOffset:document.documentElement.scrollTop}).x+","+c.y)}function N(e){null!==c&&(window.scrollTo(c.x,c.y),I(e,"Set page position: "+c.x+","+c.y),R())}function R(){c=null}function F(e){I(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),z(e.id),A((function(){C(e),P("reset","reset",e.iframe,e.id)}),e,"reset")}function C(e){function t(t){o||"0"!==e[t]||(o=!0,I(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){function e(e){function t(t){return"0px"===(l[e]&&l[e].iframe.style[t])}function n(e){return null!==e.offsetParent}l[e]&&n(l[e].iframe)&&(t("height")||t("width"))&&P("Visibility change","resize",l[e].iframe,e)}Object.keys(l).forEach((function(t){e(t)}))}function t(t){I("window","Mutation observed: "+t[0].target+" "+t[0].type),j(e,16)}function n(){var e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new i(t).observe(e,n)}var i=h();i&&n()}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",I(e.id,"IFrame ("+i+") "+t+" set to "+e[t]+"px")):I("undefined","messageData id not set")}(n),t(n)}var i=e.iframe.id;l[i]&&(l[i].sizeHeight&&n("height"),l[i].sizeWidth&&n("width"))}function A(e,t,n){n!==t.type&&u&&!window.jasmine?(I(t.id,"Requesting animation frame"),u(e)):e()}function P(e,t,n,i,o){var r,s=!1;i=i||n.id,l[i]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(r=l[i]&&l[i].targetOrigin,I(i,"["+e+"] Sending msg to iframe["+i+"] ("+t+") targetOrigin: "+r),n.contentWindow.postMessage(a+t,r)):T(i,"["+e+"] IFrame("+i+") not found"),o&&l[i]&&l[i].warningTimeout&&(l[i].msgTimeout=setTimeout((function(){!l[i]||l[i].loaded||s||(s=!0,T(i,"IFrame has not responded within "+l[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),l[i].warningTimeout)))}function L(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function W(t,o){function r(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T(v,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a,s,c,u,f,g,w,v=(""===(a=t.id)&&(t.id=(s=o&&o.id||m.id+n++,null!==document.getElementById(s)&&(s+=n++),a=s),i=(o||{}).log,I(a,"Added missing iframe ID: "+a+" ("+t.src+")")),a);v in l&&"iFrameResizer"in t?T(v,"Ignored iFrame, already setup."):(g=(g=o)||{},l[v]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(g),Object.keys(g).forEach(r,g),function(e){for(var t in m)Object.prototype.hasOwnProperty.call(m,t)&&(l[v][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:m[t])}(g),l[v]&&(l[v].targetOrigin=!0===l[v].checkOrigin?""===(w=l[v].remoteHost)||null!==w.match(/^(about:blank|javascript:|file:\/\/)/)?"*":w:"*"),function(){switch(I(v,"IFrame scrolling "+(l[v]&&l[v].scrolling?"enabled":"disabled")+" for "+v),t.style.overflow=!1===(l[v]&&l[v].scrolling)?"hidden":"auto",l[v]&&l[v].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=l[v]?l[v].scrolling:"no"}}(),function(){function e(e){var n=l[v][e];n!==1/0&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,I(v,"Set "+e+" = "+t.style[e]))}function n(e){if(l[v]["min"+e]>l[v]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(l[v]&&l[v].bodyMargin)&&"0"!==(l[v]&&l[v].bodyMargin)||(l[v].bodyMarginV1=l[v].bodyMargin,l[v].bodyMargin=l[v].bodyMargin+"px"),c=L(v),(f=h())&&(u=f,t.parentNode&&new u((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&k(t)}))}))})).observe(t.parentNode,{childList:!0})),p(t,"load",(function(){var n,i;P("iFrame.onload",c,t,e,!0),n=l[v]&&l[v].firstRun,i=l[v]&&l[v].heightCalculationMethod in d,!n&&i&&F({iframe:t,height:0,width:0,type:"init"})})),P("init",c,t,e,!0),l[v]&&(l[v].iframe.iFrameResizer={close:k.bind(null,l[v].iframe),removeListeners:x.bind(null,l[v].iframe),resize:P.bind(null,"Window resize","resize",l[v].iframe),moveToAnchor:function(e){P("Move to anchor","moveToAnchor:"+e,l[v].iframe,v)},sendMessage:function(e){P("Send Message","message:"+(e=JSON.stringify(e)),l[v].iframe,v)}}))}function j(e,t){null===f&&(f=setTimeout((function(){f=null,e()}),t))}function H(){"hidden"!==document.visibilityState&&(I("document","Trigger event: Visiblity change"),j((function(){q("Tab Visable","resize")}),16))}function q(e,t){Object.keys(l).forEach((function(n){(function(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun})(n)&&P(e,t,l[n].iframe,n)}))}function B(){p(window,"message",M),p(window,"resize",(function(){var e;I("window","Trigger event: "+(e="resize")),j((function(){q("Window "+e,"resize")}),16)})),p(document,"visibilitychange",H),p(document,"-webkit-visibilitychange",H)}function D(){function t(e,t){t&&(function(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}(),W(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!u;e+=1)u=window[t[e]+"RequestAnimationFrame"];u?u=u.bind(window):I("setup","RequestAnimationFrame not supported")}(),B(),function(i,o){switch(n=[],function(e){e&&e.enablePublicMethods&&T("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),t.bind(e,i));break;case"object":t(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return n}}}();var b={exports:{}};!function(e){!function(t){if("undefined"!=typeof window){var n=!0,i="",o=0,r="",a=null,s="",c=!1,u={resize:1,click:1},d=128,l=!0,f=1,m="bodyOffset",g=m,h=!0,p="",w={},v=32,y=null,b=!1,I=!1,E="[iFrameSizer]",T=E.length,O="",M={max:1,min:1,bodyScroll:1,documentElementScroll:1},S="child",x=window.parent,k="*",z=0,N=!1,R=null,F=16,C=1,A="scroll",P=A,L=window,W=function(){re("onMessage function not defined")},j=function(){},H=function(){},q={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},B={},D=!1;try{var U=Object.create({},{passive:{get:function(){D=!0}}});window.addEventListener("test",ee,U),window.removeEventListener("test",ee,U)}catch(ke){}var V,$,J,X,Y,Q,K,G={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return G.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return q.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ve(G))},min:function(){return Math.min.apply(null,ve(G))},grow:function(){return G.max()},lowestElement:function(){return Math.max(G.bodyOffset()||G.documentElementOffset(),we("bottom",be()))},taggedElement:function(){return ye("bottom","data-iframe-height")}},Z={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return q.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Z.bodyScroll(),Z.documentElementScroll())},max:function(){return Math.max.apply(null,ve(Z))},min:function(){return Math.min.apply(null,ve(Z))},rightMostElement:function(){return we("right",be())},taggedElement:function(){return ye("right","data-iframe-width")}},_=(V=Ie,Y=null,Q=0,K=function(){Q=Date.now(),Y=null,X=V.apply($,J),Y||($=J=null)},function(){var e=Date.now();Q||(Q=e);var t=F-(e-Q);return $=this,J=arguments,t<=0||t>F?(Y&&(clearTimeout(Y),Y=null),Q=e,X=V.apply($,J),Y||($=J=null)):Y||(Y=setTimeout(K,t)),X});te(window,"message",(function(t){var n={init:function(){p=t.data,x=t.source,ae(),l=!1,setTimeout((function(){h=!1}),d)},reset:function(){h?oe("Page reset ignored by init"):(oe("Page size reset by host page"),Oe("resetPage"))},resize:function(){Ee("resizeParent","Parent window requested size check")},moveToAnchor:function(){w.findTarget(o())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=o();oe("PageInfoFromParent called from parent: "+e),H(JSON.parse(e)),oe(" --")},message:function(){var e=o();oe("onMessage called from parent: "+e),W(JSON.parse(e)),oe(" --")}};function i(){return t.data.split("]")[1].split(":")[0]}function o(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function a(){var o=i();o in n?n[o]():!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}E===(""+t.data).substr(0,T)&&(!1===l?a():r()?n.init():oe('Ignored message of type "'+i()+'". Received before initialization.'))})),te(window,"readystatechange",xe),xe()}function ee(){}function te(e,t,n,i){e.addEventListener(t,n,!!D&&(i||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ie(e){return E+"["+O+"] "+e}function oe(e){b&&"object"==typeof window.console&&console.log(ie(e))}function re(e){"object"==typeof window.console&&console.warn(ie(e))}function ae(){var e;!function(){function e(e){return"true"===e}var a=p.substr(T).split(":");O=a[0],o=t!==a[1]?Number(a[1]):o,c=t!==a[2]?e(a[2]):c,b=t!==a[3]?e(a[3]):b,v=t!==a[4]?Number(a[4]):v,n=t!==a[6]?e(a[6]):n,r=a[7],g=t!==a[8]?a[8]:g,i=a[9],s=a[10],z=t!==a[11]?Number(a[11]):z,w.enable=t!==a[12]&&e(a[12]),S=t!==a[13]?a[13]:S,P=t!==a[14]?a[14]:P,I=t!==a[15]?Boolean(a[15]):I}(),oe("Initialising iFrame ("+window.location.href+")"),function(){function e(){var e=window.iFrameResizer;oe("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(se,e),W="onMessage"in e?e.onMessage:W,j="onReady"in e?e.onReady:j,k="targetOrigin"in e?e.targetOrigin:k,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,P="widthCalculationMethod"in e?e.widthCalculationMethod:P}function t(e,t){return"function"==typeof e&&(oe("Setup custom "+t+"CalcMethod"),q[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),g=t(g,"height"),P=t(P,"width"));oe("TargetOrigin for parent set to: "+k)}(),function(){t===r&&(r=o+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",r))}(),ce("background",i),ce("padding",s),(e=document.createElement("div")).style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e),fe(),me(),document.documentElement.style.height="",document.body.style.height="",oe('HTML & body height set to "auto"'),oe("Enable public methods"),L.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,ge()):!1===e&&!0===n&&(n=!1,de("remove"),null!==a&&a.disconnect(),clearInterval(y)),Se(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Se(0,0,"close")},getId:function(){return O},getPageInfo:function(e){"function"==typeof e?(H=e,Se(0,0,"pageInfo")):(H=function(){},Se(0,0,"pageInfoStop"))},moveToAnchor:function(e){w.findTarget(e)},reset:function(){Me("parentIFrame.reset")},scrollTo:function(e,t){Se(t,e,"scrollTo")},scrollToOffset:function(e,t){Se(t,e,"scrollToOffset")},sendMessage:function(e,t){Se(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){P=e,me()},setTargetOrigin:function(e){oe("Set targetOrigin: "+e),k=e},size:function(e,t){Ee("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},function(){if(!0!==I)return;function e(e){Se(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){oe("Add event listener: "+n),te(window.document,t,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}(),ge(),w=function(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),i=e();return{x:parseInt(n.left,10)+parseInt(i.x,10),y:parseInt(n.top,10)+parseInt(i.y,10)}}function i(e){function i(e){var t=n(e);oe("Moving to in page link (#"+o+") at x: "+t.x+" y: "+t.y),Se(t.y,t.x,"scrollToOffset")}var o=e.split("#")[1]||e,r=decodeURIComponent(o),a=document.getElementById(r)||document.getElementsByName(r)[0];t!==a?i(a):(oe("In page link (#"+o+") not found in iFrame, so sending to parent"),Se(0,0,"inPageLink","#"+o))}function o(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&i(t)}function r(){function e(e){function t(e){e.preventDefault(),i(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&te(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function a(){te(window,"hashchange",o)}function s(){setTimeout(o,d)}function c(){Array.prototype.forEach&&document.querySelectorAll?(oe("Setting up location.hash handlers"),r(),a(),s()):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}w.enable?c():oe("In page linking not enabled");return{findTarget:i}}(),Ee("init","Init message from host page"),j()}function se(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,oe("Body "+e+' set to "'+n+'"'))}function ue(e){var t={add:function(t){function n(){Ee(e.eventName,e.eventType)}B[t]=n,te(window,t,n,{passive:!0})},remove:function(e){var t,n,i,o=B[e];delete B[e],t=window,n=e,i=o,t.removeEventListener(n,i,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),oe(ne(e.method)+" event listener: "+e.eventType)}function de(e){ue({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),ue({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),ue({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),ue({method:e,eventType:"Input",eventName:"input"}),ue({method:e,eventType:"Mouse Up",eventName:"mouseup"}),ue({method:e,eventType:"Mouse Down",eventName:"mousedown"}),ue({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),ue({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),ue({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),ue({method:e,eventType:"Touch Start",eventName:"touchstart"}),ue({method:e,eventType:"Touch End",eventName:"touchend"}),ue({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),ue({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),ue({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),ue({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===S&&ue({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,i){return t!==e&&(e in n||(re(e+" is not a valid option for "+i+"CalculationMethod."),e=t),oe(i+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,m,G,"height")}function me(){P=le(P,A,Z,"width")}function ge(){var e;!0===n?(de("add"),e=0>v,window.MutationObserver||window.WebKitMutationObserver?e?he():a=function(){function e(e){function t(e){!1===e.complete&&(oe("Attach listeners to "+e.src),e.addEventListener("load",o,!1),e.addEventListener("error",r,!1),c.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){c.splice(c.indexOf(e),1)}function n(e){oe("Remove listeners from "+e.src),e.removeEventListener("load",o,!1),e.removeEventListener("error",r,!1),t(e)}function i(e,t,i){n(e.target),Ee(t,i+": "+e.target.src)}function o(e){i(e,"imageLoad","Image loaded")}function r(e){i(e,"imageLoadFailed","Image load failed")}function a(t){Ee("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}function s(){var e=document.querySelector("body"),t={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return d=new u(a),oe("Create body MutationObserver"),d.observe(e,t),d}var c=[],u=window.MutationObserver||window.WebKitMutationObserver,d=s();return{disconnect:function(){"disconnect"in d&&(oe("Disconnect body MutationObserver"),d.disconnect(),c.forEach(n))}}}():(oe("MutationObserver not supported in this browser!"),he())):oe("Auto Resize disabled")}function he(){0!==v&&(oe("setInterval: "+v+"ms"),y=setInterval((function(){Ee("interval","setInterval: "+v)}),Math.abs(v)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,10)}function we(e,t){for(var n=t.length,i=0,o=0,r=ne(e),a=Date.now(),s=0;s<n;s++)(i=t[s].getBoundingClientRect()[e]+pe("margin"+r,t[s]))>o&&(o=i);return a=Date.now()-a,oe("Parsed "+n+" HTML elements"),oe("Element position calculated in "+a+"ms"),function(e){e>F/2&&oe("Event throttle increased to "+(F=2*e)+"ms")}(a),o}function ve(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function ye(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),we(e,n)}function be(){return document.querySelectorAll("body *")}function Ie(e,n,i,o){var r,a;!function(){function e(e,t){return!(Math.abs(e-t)<=z)}return r=t!==i?i:G[g](),a=t!==o?o:Z[P](),e(f,r)||c&&e(C,a)}()&&"init"!==e?!(e in{init:1,interval:1,size:1})&&(g in M||c&&P in M)?Me(n):e in{interval:1}||oe("No change in size detected"):(Te(),Se(f=r,C=a,e))}function Ee(e,t,n,i){N&&e in u?oe("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||oe("Trigger event: "+t),"init"===e?Ie(e,t,n,i):_(e,t,n,i))}function Te(){N||(N=!0,oe("Trigger event lock on")),clearTimeout(R),R=setTimeout((function(){N=!1,oe("Trigger event lock off"),oe("--")}),d)}function Oe(e){f=G[g](),C=Z[P](),Se(f,C,e)}function Me(e){var t=g;g=m,oe("Reset trigger event: "+e),Te(),Oe("reset"),g=t}function Se(e,n,i,o,r){var a;t===r?r=k:oe("Message targetOrigin: "+r),oe("Sending message to host page ("+(a=O+":"+e+":"+n+":"+i+(t!==o?":"+o:""))+")"),x.postMessage(E+a,r)}function xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()}(b);var I=y.exports;v.iframeResize=I,v.iframeResizer=I,v.iframeResizerContentWindow=b.exports;var E=v;const T=s({props:{repo:{type:String,required:!0},repoId:{type:String,required:!0},category:String,categoryId:String,mapping:{type:String,required:!0},term:String,theme:{type:String,default:"light"},reactionsEnabled:{type:String,default:"1"},emitMetadata:{type:String,default:"0"}},setup(e){const s=c(""),w=u((()=>{return function({repo:e,repoId:t,category:n="",categoryId:i="",mapping:o,term:r="",theme:a="light",reactionsEnabled:s="1",emitMetadata:c="0",session:u}){const d={origin:location.href,session:u,theme:a,reactionsEnabled:s,emitMetadata:c,repo:e,repoId:t,category:n,categoryId:i,description:h("description")};switch(o){case"url":d.term=location.href;break;case"title":d.term=document.title;break;case"og:title":d.term=h("title");break;case"specific":d.term=r;break;case"number":d.number=r;break;case"pathname":default:d.term=location.pathname.length<2?"index":location.pathname.substr(1).replace(/\.\w+$/,"")}return`https://giscus.app/widget?${new URLSearchParams(d)}`}((c=((e,t)=>{for(var n in t||(t={}))o.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))r.call(t,n)&&a(e,n,t[n]);return e})({},e),u={session:s.value},t(c,n(u))));var c,u}));d((()=>{const e=location.href,t=new URL(e),n=localStorage.getItem("giscus-session");if(s.value=t.searchParams.get("giscus")||"",s.value)localStorage.setItem("giscus-session",JSON.stringify(s.value)),t.searchParams.delete("giscus"),history.replaceState(void 0,document.title,t.toString());else if(n)try{s.value=JSON.parse(n||"")||""}catch(i){s.value="",localStorage.removeItem("giscus-session"),console.warn(`${g(null==i?void 0:i.message)} Session has been cleared.`)}})),d(p);const v=(y=()=>s.value="",function(e){var t;if("https://giscus.app"!==e.origin)return;const{data:n}=e;if("object"!=typeof n||!(null==(t=null==n?void 0:n.giscus)?void 0:t.error))return;const i=n.giscus.error;if(i.includes("Bad credentials")||i.includes("Invalid state value")){if(null!==localStorage.getItem("giscus-session"))return localStorage.removeItem("giscus-session"),y(),void console.warn(`${g(i)} Session has been cleared.`);console.error(`${g(i)} No session is stored initially. ${m}`)}i.includes("Discussion not found")?console.warn(`[giscus] ${i}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${g(i)} ${m}`)});var y;d((()=>window.addEventListener("message",v))),l((()=>window.removeEventListener("message",v)));const b=c();return d((()=>{b.value&&(b.value=b.value,b.value.src=w.value,b.value.addEventListener("load",(()=>E.iframeResizer({checkOrigin:["https://giscus.app"]},b.value))))})),l((()=>{var e,t;b.value&&"iFrameResizer"in b.value&&(null==(t=null==(e=b.value)?void 0:e.iFrameResizer)||t.removeListeners())})),()=>f("div",{className:"giscus"},[f("iframe",{title:"Comments",className:"giscus-frame",ref:b},null)])}}),O={install:e=>e.component("Giscus",T)};export{T as Giscus,O as plugin};
var e=Object.defineProperty,t=Object.defineProperties,n=Object.getOwnPropertyDescriptors,i=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable,a=(t,n,i)=>n in t?e(t,n,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[n]=i;import{defineComponent as s,ref as c,computed as u,onMounted as d,onUnmounted as l,createVNode as f}from"vue";const m="Please consider reporting this error at https://github.com/laymonage/giscus/issues/new.";function g(e){return`[giscus] An error occurred. Error message: "${e}".`}function h(e){const t=document.querySelector(`meta[property='og:${e}'],meta[name='${e}']`);return t?t.content:""}function p(){const e=document.getElementById("giscus-css")||document.createElement("style");e.id="giscus-css",e.textContent="\n .giscus, .giscus-frame {\n width: 100%;\n }\n .giscus-frame {\n border: none;\n color-scheme: auto;\n }\n ",document.head.prepend(e)}var w,v={},y={exports:{}};w=y,function(e){if("undefined"!=typeof window){var t,n=0,i=!1,o=!1,r="message".length,a="[iFrameSizer]",s=a.length,c=null,u=window.requestAnimationFrame,d={max:1,scroll:1,bodyScroll:1,documentElementScroll:1},l={},f=null,m={autoResize:!0,bodyBackground:null,bodyMargin:null,bodyMarginV1:8,bodyPadding:null,checkOrigin:!0,inPageLinks:!1,enablePublicMethods:!0,heightCalculationMethod:"bodyOffset",id:"iFrameResizer",interval:32,log:!1,maxHeight:1/0,maxWidth:1/0,minHeight:0,minWidth:0,mouseEvents:!0,resizeFrom:"parent",scrolling:!1,sizeHeight:!0,sizeWidth:!1,warningTimeout:5e3,tolerance:0,widthCalculationMethod:"scroll",onClose:function(){return!0},onClosed:function(){},onInit:function(){},onMessage:function(){T("onMessage function not defined")},onMouseEnter:function(){},onMouseLeave:function(){},onResized:function(){},onScroll:function(){return!0}},g={};window.jQuery&&((t=window.jQuery).fn?t.fn.iFrameResize||(t.fn.iFrameResize=function(e){return this.filter("iframe").each((function(t,n){W(n,e)})).end()}):E("","Unable to bind to jQuery, it is not fully loaded.")),w.exports=D(),window.iFrameResize=window.iFrameResize||D()}function h(){return window.MutationObserver||window.WebKitMutationObserver||window.MozMutationObserver}function p(e,t,n){e.addEventListener(t,n,!1)}function v(e,t,n){e.removeEventListener(t,n,!1)}function y(e){return a+"["+function(e){var t="Host page: "+e;return window.top!==window.self&&(t=window.parentIFrame&&window.parentIFrame.getId?window.parentIFrame.getId()+": "+e:"Nested host page: "+e),t}(e)+"]"}function b(e){return l[e]?l[e].log:i}function I(e,t){O("log",e,t,b(e))}function E(e,t){O("info",e,t,b(e))}function T(e,t){O("warn",e,t,!0)}function O(e,t,n,i){!0===i&&"object"==typeof window.console&&console[e](y(t),n)}function M(e){function t(){o("Height"),o("Width"),A((function(){C(B),N(D),y("onResized",B)}),B,"init")}function n(e){return"border-box"!==e.boxSizing?0:(e.paddingTop?parseInt(e.paddingTop,10):0)+(e.paddingBottom?parseInt(e.paddingBottom,10):0)}function i(e){return"border-box"!==e.boxSizing?0:(e.borderTopWidth?parseInt(e.borderTopWidth,10):0)+(e.borderBottomWidth?parseInt(e.borderBottomWidth,10):0)}function o(e){var t=Number(l[D]["max"+e]),n=Number(l[D]["min"+e]),i=e.toLowerCase(),o=Number(B[i]);I(D,"Checking "+i+" is in range "+n+"-"+t),o<n&&(o=n,I(D,"Set "+i+" to min value")),o>t&&(o=t,I(D,"Set "+i+" to max value")),B[i]=""+o}function u(e){return q.substr(q.indexOf(":")+r+e)}function d(e,t){var n,i,o;n=function(){var n,i;P("Send Page Info","pageInfo:"+(n=document.body.getBoundingClientRect(),i=B.iframe.getBoundingClientRect(),JSON.stringify({iframeHeight:i.height,iframeWidth:i.width,clientHeight:Math.max(document.documentElement.clientHeight,window.innerHeight||0),clientWidth:Math.max(document.documentElement.clientWidth,window.innerWidth||0),offsetTop:parseInt(i.top-n.top,10),offsetLeft:parseInt(i.left-n.left,10),scrollTop:window.pageYOffset,scrollLeft:window.pageXOffset,documentHeight:document.documentElement.clientHeight,documentWidth:document.documentElement.clientWidth,windowHeight:window.innerHeight,windowWidth:window.innerWidth})),e,t)},i=32,g[o=t]||(g[o]=setTimeout((function(){g[o]=null,n()}),i))}function f(e){var t=e.getBoundingClientRect();return z(D),{x:Math.floor(Number(t.left)+Number(c.x)),y:Math.floor(Number(t.top)+Number(c.y))}}function m(e){var t=e?f(B.iframe):{x:0,y:0},n={x:Number(B.width)+t.x,y:Number(B.height)+t.y};I(D,"Reposition requested from iFrame (offset x:"+t.x+" y:"+t.y+")"),window.top!==window.self?window.parentIFrame?window.parentIFrame["scrollTo"+(e?"Offset":"")](n.x,n.y):T(D,"Unable to scroll to requested position, window.parentIFrame not found"):(c=n,h(),I(D,"--"))}function h(){!1!==y("onScroll",c)?N(D):R()}function w(e){var t={};if(0===Number(B.width)&&0===Number(B.height)){var n=u(9).split(":");t={x:n[1],y:n[0]}}else t={x:B.width,y:B.height};y(e,{iframe:B.iframe,screenX:Number(t.x),screenY:Number(t.y),type:B.type})}function y(e,t){return S(D,e,t)}var b,O,M,x,W,j,H,q=e.data,B={},D=null;"[iFrameResizerChild]Ready"===q?function(){for(var e in l)P("iFrame requested init",L(e),l[e].iframe,e)}():a===(""+q).substr(0,s)&&q.substr(s).split(":")[0]in l?(x=q.substr(s).split(":"),W=x[1]?parseInt(x[1],10):0,j=l[x[0]]&&l[x[0]].iframe,H=getComputedStyle(j),B={iframe:j,id:x[0],height:W+n(H)+i(H),width:x[2],type:x[3]},D=B.id,l[D]&&(l[D].loaded=!0),(M=B.type in{true:1,false:1,undefined:1})&&I(D,"Ignoring init message from meta parent page"),!M&&(O=!0,l[b=D]||(O=!1,T(B.type+" No settings for "+b+". Message was: "+q)),O)&&(I(D,"Received: "+q),function(){var e=!0;return null===B.iframe&&(T(D,"IFrame ("+B.id+") not found"),e=!1),e}()&&function(){var t,n=e.origin,i=l[D]&&l[D].checkOrigin;if(i&&""+n!="null"&&!(i.constructor===Array?function(){var e=0,t=!1;for(I(D,"Checking connection is from allowed list of origins: "+i);e<i.length;e++)if(i[e]===n){t=!0;break}return t}():(t=l[D]&&l[D].remoteHost,I(D,"Checking connection is from: "+t),n===t)))throw new Error("Unexpected message received from: "+n+" for "+B.iframe.id+". Message was: "+e.data+". This error can be disabled by setting the checkOrigin: false option or by providing of array of trusted domains.");return!0}()&&function(){switch(l[D]&&l[D].firstRun&&l[D]&&(l[D].firstRun=!1),B.type){case"close":k(B.iframe);break;case"message":r=u(6),I(D,"onMessage passed: {iframe: "+B.iframe.id+", message: "+r+"}"),y("onMessage",{iframe:B.iframe,message:JSON.parse(r)}),I(D,"--");break;case"mouseenter":w("onMouseEnter");break;case"mouseleave":w("onMouseLeave");break;case"autoResize":l[D].autoResize=JSON.parse(u(9));break;case"scrollTo":m(!1);break;case"scrollToOffset":m(!0);break;case"pageInfo":d(l[D]&&l[D].iframe,D),function(){function e(e,i){function o(){l[n]?d(l[n].iframe,n):t()}["scroll","resize"].forEach((function(t){I(n,e+t+" listener for sendPageInfo"),i(window,t,o)}))}function t(){e("Remove ",v)}var n=D;e("Add ",p),l[n]&&(l[n].stopPageInfo=t)}();break;case"pageInfoStop":l[D]&&l[D].stopPageInfo&&(l[D].stopPageInfo(),delete l[D].stopPageInfo);break;case"inPageLink":n=u(9).split("#")[1]||"",i=decodeURIComponent(n),(o=document.getElementById(i)||document.getElementsByName(i)[0])?(e=f(o),I(D,"Moving to in page link (#"+n+") at x: "+e.x+" y: "+e.y),c={x:e.x,y:e.y},h(),I(D,"--")):window.top!==window.self?window.parentIFrame?window.parentIFrame.moveToAnchor(n):I(D,"In page link #"+n+" not found and window.parentIFrame not found"):I(D,"In page link #"+n+" not found");break;case"reset":F(B);break;case"init":t(),y("onInit",B.iframe);break;default:0===Number(B.width)&&0===Number(B.height)?T("Unsupported message received ("+B.type+"), this is likely due to the iframe containing a later version of iframe-resizer than the parent page"):t()}var e,n,i,o,r}())):E(D,"Ignored: "+q)}function S(e,t,n){var i=null,o=null;if(l[e]){if("function"!=typeof(i=l[e][t]))throw new TypeError(t+" on iFrame["+e+"] is not a function");o=i(n)}return o}function x(e){var t=e.id;delete l[t]}function k(e){var t=e.id;if(!1!==S(t,"onClose",t)){I(t,"Removing iFrame: "+t);try{e.parentNode&&e.parentNode.removeChild(e)}catch(n){T(n)}S(t,"onClosed",t),I(t,"--"),x(e)}else I(t,"Close iframe cancelled by onClose event")}function z(t){null===c&&I(t,"Get page position: "+(c={x:window.pageXOffset!==e?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==e?window.pageYOffset:document.documentElement.scrollTop}).x+","+c.y)}function N(e){null!==c&&(window.scrollTo(c.x,c.y),I(e,"Set page position: "+c.x+","+c.y),R())}function R(){c=null}function F(e){I(e.id,"Size reset requested by "+("init"===e.type?"host page":"iFrame")),z(e.id),A((function(){C(e),P("reset","reset",e.iframe,e.id)}),e,"reset")}function C(e){function t(t){o||"0"!==e[t]||(o=!0,I(i,"Hidden iFrame detected, creating visibility listener"),function(){function e(){function e(e){function t(t){return"0px"===(l[e]&&l[e].iframe.style[t])}function n(e){return null!==e.offsetParent}l[e]&&n(l[e].iframe)&&(t("height")||t("width"))&&P("Visibility change","resize",l[e].iframe,e)}Object.keys(l).forEach((function(t){e(t)}))}function t(t){I("window","Mutation observed: "+t[0].target+" "+t[0].type),j(e,16)}function n(){var e=document.querySelector("body"),n={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};new i(t).observe(e,n)}var i=h();i&&n()}())}function n(n){!function(t){e.id?(e.iframe.style[t]=e[t]+"px",I(e.id,"IFrame ("+i+") "+t+" set to "+e[t]+"px")):I("undefined","messageData id not set")}(n),t(n)}var i=e.iframe.id;l[i]&&(l[i].sizeHeight&&n("height"),l[i].sizeWidth&&n("width"))}function A(e,t,n){n!==t.type&&u&&!window.jasmine?(I(t.id,"Requesting animation frame"),u(e)):e()}function P(e,t,n,i,o){var r,s=!1;i=i||n.id,l[i]&&(n&&"contentWindow"in n&&null!==n.contentWindow?(r=l[i]&&l[i].targetOrigin,I(i,"["+e+"] Sending msg to iframe["+i+"] ("+t+") targetOrigin: "+r),n.contentWindow.postMessage(a+t,r)):T(i,"["+e+"] IFrame("+i+") not found"),o&&l[i]&&l[i].warningTimeout&&(l[i].msgTimeout=setTimeout((function(){!l[i]||l[i].loaded||s||(s=!0,T(i,"IFrame has not responded within "+l[i].warningTimeout/1e3+" seconds. Check iFrameResizer.contentWindow.js has been loaded in iFrame. This message can be ignored if everything is working, or you can set the warningTimeout option to a higher value or zero to suppress this warning."))}),l[i].warningTimeout)))}function L(e){return e+":"+l[e].bodyMarginV1+":"+l[e].sizeWidth+":"+l[e].log+":"+l[e].interval+":"+l[e].enablePublicMethods+":"+l[e].autoResize+":"+l[e].bodyMargin+":"+l[e].heightCalculationMethod+":"+l[e].bodyBackground+":"+l[e].bodyPadding+":"+l[e].tolerance+":"+l[e].inPageLinks+":"+l[e].resizeFrom+":"+l[e].widthCalculationMethod+":"+l[e].mouseEvents}function W(t,o){function r(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],T(v,"Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}var a,s,c,u,f,g,w,v=(""===(a=t.id)&&(t.id=(s=o&&o.id||m.id+n++,null!==document.getElementById(s)&&(s+=n++),a=s),i=(o||{}).log,I(a,"Added missing iframe ID: "+a+" ("+t.src+")")),a);v in l&&"iFrameResizer"in t?T(v,"Ignored iFrame, already setup."):(g=(g=o)||{},l[v]={firstRun:!0,iframe:t,remoteHost:t.src&&t.src.split("/").slice(0,3).join("/")},function(e){if("object"!=typeof e)throw new TypeError("Options is not an object")}(g),Object.keys(g).forEach(r,g),function(e){for(var t in m)Object.prototype.hasOwnProperty.call(m,t)&&(l[v][t]=Object.prototype.hasOwnProperty.call(e,t)?e[t]:m[t])}(g),l[v]&&(l[v].targetOrigin=!0===l[v].checkOrigin?""===(w=l[v].remoteHost)||null!==w.match(/^(about:blank|javascript:|file:\/\/)/)?"*":w:"*"),function(){switch(I(v,"IFrame scrolling "+(l[v]&&l[v].scrolling?"enabled":"disabled")+" for "+v),t.style.overflow=!1===(l[v]&&l[v].scrolling)?"hidden":"auto",l[v]&&l[v].scrolling){case"omit":break;case!0:t.scrolling="yes";break;case!1:t.scrolling="no";break;default:t.scrolling=l[v]?l[v].scrolling:"no"}}(),function(){function e(e){var n=l[v][e];n!==1/0&&0!==n&&(t.style[e]="number"==typeof n?n+"px":n,I(v,"Set "+e+" = "+t.style[e]))}function n(e){if(l[v]["min"+e]>l[v]["max"+e])throw new Error("Value for min"+e+" can not be greater than max"+e)}n("Height"),n("Width"),e("maxHeight"),e("minHeight"),e("maxWidth"),e("minWidth")}(),"number"!=typeof(l[v]&&l[v].bodyMargin)&&"0"!==(l[v]&&l[v].bodyMargin)||(l[v].bodyMarginV1=l[v].bodyMargin,l[v].bodyMargin=l[v].bodyMargin+"px"),c=L(v),(f=h())&&(u=f,t.parentNode&&new u((function(e){e.forEach((function(e){Array.prototype.slice.call(e.removedNodes).forEach((function(e){e===t&&k(t)}))}))})).observe(t.parentNode,{childList:!0})),p(t,"load",(function(){var n,i;P("iFrame.onload",c,t,e,!0),n=l[v]&&l[v].firstRun,i=l[v]&&l[v].heightCalculationMethod in d,!n&&i&&F({iframe:t,height:0,width:0,type:"init"})})),P("init",c,t,e,!0),l[v]&&(l[v].iframe.iFrameResizer={close:k.bind(null,l[v].iframe),removeListeners:x.bind(null,l[v].iframe),resize:P.bind(null,"Window resize","resize",l[v].iframe),moveToAnchor:function(e){P("Move to anchor","moveToAnchor:"+e,l[v].iframe,v)},sendMessage:function(e){P("Send Message","message:"+(e=JSON.stringify(e)),l[v].iframe,v)}}))}function j(e,t){null===f&&(f=setTimeout((function(){f=null,e()}),t))}function H(){"hidden"!==document.visibilityState&&(I("document","Trigger event: Visiblity change"),j((function(){q("Tab Visable","resize")}),16))}function q(e,t){Object.keys(l).forEach((function(n){(function(e){return l[e]&&"parent"===l[e].resizeFrom&&l[e].autoResize&&!l[e].firstRun})(n)&&P(e,t,l[n].iframe,n)}))}function B(){p(window,"message",M),p(window,"resize",(function(){var e;I("window","Trigger event: "+(e="resize")),j((function(){q("Window "+e,"resize")}),16)})),p(document,"visibilitychange",H),p(document,"-webkit-visibilitychange",H)}function D(){function t(e,t){t&&(function(){if(!t.tagName)throw new TypeError("Object is not a valid DOM element");if("IFRAME"!==t.tagName.toUpperCase())throw new TypeError("Expected <IFRAME> tag, found <"+t.tagName+">")}(),W(t,e),n.push(t))}var n;return function(){var e,t=["moz","webkit","o","ms"];for(e=0;e<t.length&&!u;e+=1)u=window[t[e]+"RequestAnimationFrame"];u?u=u.bind(window):I("setup","RequestAnimationFrame not supported")}(),B(),function(i,o){switch(n=[],function(e){e&&e.enablePublicMethods&&T("enablePublicMethods option has been removed, public methods are now always available in the iFrame")}(i),typeof o){case"undefined":case"string":Array.prototype.forEach.call(document.querySelectorAll(o||"iframe"),t.bind(e,i));break;case"object":t(i,o);break;default:throw new TypeError("Unexpected data type ("+typeof o+")")}return n}}}();var b={exports:{}};!function(e){!function(t){if("undefined"!=typeof window){var n=!0,i="",o=0,r="",a=null,s="",c=!1,u={resize:1,click:1},d=128,l=!0,f=1,m="bodyOffset",g=m,h=!0,p="",w={},v=32,y=null,b=!1,I=!1,E="[iFrameSizer]",T=E.length,O="",M={max:1,min:1,bodyScroll:1,documentElementScroll:1},S="child",x=window.parent,k="*",z=0,N=!1,R=null,F=16,C=1,A="scroll",P=A,L=window,W=function(){re("onMessage function not defined")},j=function(){},H=function(){},q={height:function(){return re("Custom height calculation function not defined"),document.documentElement.offsetHeight},width:function(){return re("Custom width calculation function not defined"),document.body.scrollWidth}},B={},D=!1;try{var U=Object.create({},{passive:{get:function(){D=!0}}});window.addEventListener("test",ee,U),window.removeEventListener("test",ee,U)}catch(ke){}var $,V,J,X,Y,Q,K,G={bodyOffset:function(){return document.body.offsetHeight+pe("marginTop")+pe("marginBottom")},offset:function(){return G.bodyOffset()},bodyScroll:function(){return document.body.scrollHeight},custom:function(){return q.height()},documentElementOffset:function(){return document.documentElement.offsetHeight},documentElementScroll:function(){return document.documentElement.scrollHeight},max:function(){return Math.max.apply(null,ve(G))},min:function(){return Math.min.apply(null,ve(G))},grow:function(){return G.max()},lowestElement:function(){return Math.max(G.bodyOffset()||G.documentElementOffset(),we("bottom",be()))},taggedElement:function(){return ye("bottom","data-iframe-height")}},Z={bodyScroll:function(){return document.body.scrollWidth},bodyOffset:function(){return document.body.offsetWidth},custom:function(){return q.width()},documentElementScroll:function(){return document.documentElement.scrollWidth},documentElementOffset:function(){return document.documentElement.offsetWidth},scroll:function(){return Math.max(Z.bodyScroll(),Z.documentElementScroll())},max:function(){return Math.max.apply(null,ve(Z))},min:function(){return Math.min.apply(null,ve(Z))},rightMostElement:function(){return we("right",be())},taggedElement:function(){return ye("right","data-iframe-width")}},_=($=Ie,Y=null,Q=0,K=function(){Q=Date.now(),Y=null,X=$.apply(V,J),Y||(V=J=null)},function(){var e=Date.now();Q||(Q=e);var t=F-(e-Q);return V=this,J=arguments,t<=0||t>F?(Y&&(clearTimeout(Y),Y=null),Q=e,X=$.apply(V,J),Y||(V=J=null)):Y||(Y=setTimeout(K,t)),X});te(window,"message",(function(t){var n={init:function(){p=t.data,x=t.source,ae(),l=!1,setTimeout((function(){h=!1}),d)},reset:function(){h?oe("Page reset ignored by init"):(oe("Page size reset by host page"),Oe("resetPage"))},resize:function(){Ee("resizeParent","Parent window requested size check")},moveToAnchor:function(){w.findTarget(o())},inPageLink:function(){this.moveToAnchor()},pageInfo:function(){var e=o();oe("PageInfoFromParent called from parent: "+e),H(JSON.parse(e)),oe(" --")},message:function(){var e=o();oe("onMessage called from parent: "+e),W(JSON.parse(e)),oe(" --")}};function i(){return t.data.split("]")[1].split(":")[0]}function o(){return t.data.substr(t.data.indexOf(":")+1)}function r(){return t.data.split(":")[2]in{true:1,false:1}}function a(){var o=i();o in n?n[o]():!e.exports&&"iFrameResize"in window||"jQuery"in window&&"iFrameResize"in window.jQuery.prototype||r()||re("Unexpected message ("+t.data+")")}E===(""+t.data).substr(0,T)&&(!1===l?a():r()?n.init():oe('Ignored message of type "'+i()+'". Received before initialization.'))})),te(window,"readystatechange",xe),xe()}function ee(){}function te(e,t,n,i){e.addEventListener(t,n,!!D&&(i||{}))}function ne(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ie(e){return E+"["+O+"] "+e}function oe(e){b&&"object"==typeof window.console&&console.log(ie(e))}function re(e){"object"==typeof window.console&&console.warn(ie(e))}function ae(){var e;!function(){function e(e){return"true"===e}var a=p.substr(T).split(":");O=a[0],o=t!==a[1]?Number(a[1]):o,c=t!==a[2]?e(a[2]):c,b=t!==a[3]?e(a[3]):b,v=t!==a[4]?Number(a[4]):v,n=t!==a[6]?e(a[6]):n,r=a[7],g=t!==a[8]?a[8]:g,i=a[9],s=a[10],z=t!==a[11]?Number(a[11]):z,w.enable=t!==a[12]&&e(a[12]),S=t!==a[13]?a[13]:S,P=t!==a[14]?a[14]:P,I=t!==a[15]?Boolean(a[15]):I}(),oe("Initialising iFrame ("+window.location.href+")"),function(){function e(){var e=window.iFrameResizer;oe("Reading data from page: "+JSON.stringify(e)),Object.keys(e).forEach(se,e),W="onMessage"in e?e.onMessage:W,j="onReady"in e?e.onReady:j,k="targetOrigin"in e?e.targetOrigin:k,g="heightCalculationMethod"in e?e.heightCalculationMethod:g,P="widthCalculationMethod"in e?e.widthCalculationMethod:P}function t(e,t){return"function"==typeof e&&(oe("Setup custom "+t+"CalcMethod"),q[t]=e,e="custom"),e}"iFrameResizer"in window&&Object===window.iFrameResizer.constructor&&(e(),g=t(g,"height"),P=t(P,"width"));oe("TargetOrigin for parent set to: "+k)}(),function(){t===r&&(r=o+"px");ce("margin",function(e,t){-1!==t.indexOf("-")&&(re("Negative CSS value ignored for "+e),t="");return t}("margin",r))}(),ce("background",i),ce("padding",s),(e=document.createElement("div")).style.clear="both",e.style.display="block",e.style.height="0",document.body.appendChild(e),fe(),me(),document.documentElement.style.height="",document.body.style.height="",oe('HTML & body height set to "auto"'),oe("Enable public methods"),L.parentIFrame={autoResize:function(e){return!0===e&&!1===n?(n=!0,ge()):!1===e&&!0===n&&(n=!1,de("remove"),null!==a&&a.disconnect(),clearInterval(y)),Se(0,0,"autoResize",JSON.stringify(n)),n},close:function(){Se(0,0,"close")},getId:function(){return O},getPageInfo:function(e){"function"==typeof e?(H=e,Se(0,0,"pageInfo")):(H=function(){},Se(0,0,"pageInfoStop"))},moveToAnchor:function(e){w.findTarget(e)},reset:function(){Me("parentIFrame.reset")},scrollTo:function(e,t){Se(t,e,"scrollTo")},scrollToOffset:function(e,t){Se(t,e,"scrollToOffset")},sendMessage:function(e,t){Se(0,0,"message",JSON.stringify(e),t)},setHeightCalculationMethod:function(e){g=e,fe()},setWidthCalculationMethod:function(e){P=e,me()},setTargetOrigin:function(e){oe("Set targetOrigin: "+e),k=e},size:function(e,t){Ee("size","parentIFrame.size("+(e||"")+(t?","+t:"")+")",e,t)}},function(){if(!0!==I)return;function e(e){Se(0,0,e.type,e.screenY+":"+e.screenX)}function t(t,n){oe("Add event listener: "+n),te(window.document,t,e)}t("mouseenter","Mouse Enter"),t("mouseleave","Mouse Leave")}(),ge(),w=function(){function e(){return{x:window.pageXOffset!==t?window.pageXOffset:document.documentElement.scrollLeft,y:window.pageYOffset!==t?window.pageYOffset:document.documentElement.scrollTop}}function n(t){var n=t.getBoundingClientRect(),i=e();return{x:parseInt(n.left,10)+parseInt(i.x,10),y:parseInt(n.top,10)+parseInt(i.y,10)}}function i(e){function i(e){var t=n(e);oe("Moving to in page link (#"+o+") at x: "+t.x+" y: "+t.y),Se(t.y,t.x,"scrollToOffset")}var o=e.split("#")[1]||e,r=decodeURIComponent(o),a=document.getElementById(r)||document.getElementsByName(r)[0];t!==a?i(a):(oe("In page link (#"+o+") not found in iFrame, so sending to parent"),Se(0,0,"inPageLink","#"+o))}function o(){var e=window.location.hash,t=window.location.href;""!==e&&"#"!==e&&i(t)}function r(){function e(e){function t(e){e.preventDefault(),i(this.getAttribute("href"))}"#"!==e.getAttribute("href")&&te(e,"click",t)}Array.prototype.forEach.call(document.querySelectorAll('a[href^="#"]'),e)}function a(){te(window,"hashchange",o)}function s(){setTimeout(o,d)}function c(){Array.prototype.forEach&&document.querySelectorAll?(oe("Setting up location.hash handlers"),r(),a(),s()):re("In page linking not fully supported in this browser! (See README.md for IE8 workaround)")}w.enable?c():oe("In page linking not enabled");return{findTarget:i}}(),Ee("init","Init message from host page"),j()}function se(e){var t=e.split("Callback");if(2===t.length){var n="on"+t[0].charAt(0).toUpperCase()+t[0].slice(1);this[n]=this[e],delete this[e],re("Deprecated: '"+e+"' has been renamed '"+n+"'. The old method will be removed in the next major version.")}}function ce(e,n){t!==n&&""!==n&&"null"!==n&&(document.body.style[e]=n,oe("Body "+e+' set to "'+n+'"'))}function ue(e){var t={add:function(t){function n(){Ee(e.eventName,e.eventType)}B[t]=n,te(window,t,n,{passive:!0})},remove:function(e){var t,n,i,o=B[e];delete B[e],t=window,n=e,i=o,t.removeEventListener(n,i,!1)}};e.eventNames&&Array.prototype.map?(e.eventName=e.eventNames[0],e.eventNames.map(t[e.method])):t[e.method](e.eventName),oe(ne(e.method)+" event listener: "+e.eventType)}function de(e){ue({method:e,eventType:"Animation Start",eventNames:["animationstart","webkitAnimationStart"]}),ue({method:e,eventType:"Animation Iteration",eventNames:["animationiteration","webkitAnimationIteration"]}),ue({method:e,eventType:"Animation End",eventNames:["animationend","webkitAnimationEnd"]}),ue({method:e,eventType:"Input",eventName:"input"}),ue({method:e,eventType:"Mouse Up",eventName:"mouseup"}),ue({method:e,eventType:"Mouse Down",eventName:"mousedown"}),ue({method:e,eventType:"Orientation Change",eventName:"orientationchange"}),ue({method:e,eventType:"Print",eventName:["afterprint","beforeprint"]}),ue({method:e,eventType:"Ready State Change",eventName:"readystatechange"}),ue({method:e,eventType:"Touch Start",eventName:"touchstart"}),ue({method:e,eventType:"Touch End",eventName:"touchend"}),ue({method:e,eventType:"Touch Cancel",eventName:"touchcancel"}),ue({method:e,eventType:"Transition Start",eventNames:["transitionstart","webkitTransitionStart","MSTransitionStart","oTransitionStart","otransitionstart"]}),ue({method:e,eventType:"Transition Iteration",eventNames:["transitioniteration","webkitTransitionIteration","MSTransitionIteration","oTransitionIteration","otransitioniteration"]}),ue({method:e,eventType:"Transition End",eventNames:["transitionend","webkitTransitionEnd","MSTransitionEnd","oTransitionEnd","otransitionend"]}),"child"===S&&ue({method:e,eventType:"IFrame Resized",eventName:"resize"})}function le(e,t,n,i){return t!==e&&(e in n||(re(e+" is not a valid option for "+i+"CalculationMethod."),e=t),oe(i+' calculation method set to "'+e+'"')),e}function fe(){g=le(g,m,G,"height")}function me(){P=le(P,A,Z,"width")}function ge(){var e;!0===n?(de("add"),e=0>v,window.MutationObserver||window.WebKitMutationObserver?e?he():a=function(){function e(e){function t(e){!1===e.complete&&(oe("Attach listeners to "+e.src),e.addEventListener("load",o,!1),e.addEventListener("error",r,!1),c.push(e))}"attributes"===e.type&&"src"===e.attributeName?t(e.target):"childList"===e.type&&Array.prototype.forEach.call(e.target.querySelectorAll("img"),t)}function t(e){c.splice(c.indexOf(e),1)}function n(e){oe("Remove listeners from "+e.src),e.removeEventListener("load",o,!1),e.removeEventListener("error",r,!1),t(e)}function i(e,t,i){n(e.target),Ee(t,i+": "+e.target.src)}function o(e){i(e,"imageLoad","Image loaded")}function r(e){i(e,"imageLoadFailed","Image load failed")}function a(t){Ee("mutationObserver","mutationObserver: "+t[0].target+" "+t[0].type),t.forEach(e)}function s(){var e=document.querySelector("body"),t={attributes:!0,attributeOldValue:!1,characterData:!0,characterDataOldValue:!1,childList:!0,subtree:!0};return d=new u(a),oe("Create body MutationObserver"),d.observe(e,t),d}var c=[],u=window.MutationObserver||window.WebKitMutationObserver,d=s();return{disconnect:function(){"disconnect"in d&&(oe("Disconnect body MutationObserver"),d.disconnect(),c.forEach(n))}}}():(oe("MutationObserver not supported in this browser!"),he())):oe("Auto Resize disabled")}function he(){0!==v&&(oe("setInterval: "+v+"ms"),y=setInterval((function(){Ee("interval","setInterval: "+v)}),Math.abs(v)))}function pe(e,t){var n=0;return t=t||document.body,n=null!==(n=document.defaultView.getComputedStyle(t,null))?n[e]:0,parseInt(n,10)}function we(e,t){for(var n=t.length,i=0,o=0,r=ne(e),a=Date.now(),s=0;s<n;s++)(i=t[s].getBoundingClientRect()[e]+pe("margin"+r,t[s]))>o&&(o=i);return a=Date.now()-a,oe("Parsed "+n+" HTML elements"),oe("Element position calculated in "+a+"ms"),function(e){e>F/2&&oe("Event throttle increased to "+(F=2*e)+"ms")}(a),o}function ve(e){return[e.bodyOffset(),e.bodyScroll(),e.documentElementOffset(),e.documentElementScroll()]}function ye(e,t){var n=document.querySelectorAll("["+t+"]");return 0===n.length&&(re("No tagged elements ("+t+") found on page"),document.querySelectorAll("body *")),we(e,n)}function be(){return document.querySelectorAll("body *")}function Ie(e,n,i,o){var r,a;!function(){function e(e,t){return!(Math.abs(e-t)<=z)}return r=t!==i?i:G[g](),a=t!==o?o:Z[P](),e(f,r)||c&&e(C,a)}()&&"init"!==e?!(e in{init:1,interval:1,size:1})&&(g in M||c&&P in M)?Me(n):e in{interval:1}||oe("No change in size detected"):(Te(),Se(f=r,C=a,e))}function Ee(e,t,n,i){N&&e in u?oe("Trigger event cancelled: "+e):(e in{reset:1,resetPage:1,init:1}||oe("Trigger event: "+t),"init"===e?Ie(e,t,n,i):_(e,t,n,i))}function Te(){N||(N=!0,oe("Trigger event lock on")),clearTimeout(R),R=setTimeout((function(){N=!1,oe("Trigger event lock off"),oe("--")}),d)}function Oe(e){f=G[g](),C=Z[P](),Se(f,C,e)}function Me(e){var t=g;g=m,oe("Reset trigger event: "+e),Te(),Oe("reset"),g=t}function Se(e,n,i,o,r){var a;t===r?r=k:oe("Message targetOrigin: "+r),oe("Sending message to host page ("+(a=O+":"+e+":"+n+":"+i+(t!==o?":"+o:""))+")"),x.postMessage(E+a,r)}function xe(){"loading"!==document.readyState&&window.parent.postMessage("[iFrameResizerChild]Ready","*")}}()}(b);var I=y.exports;v.iframeResize=I,v.iframeResizer=I,v.iframeResizerContentWindow=b.exports;var E=v;const T=s({props:{repo:{type:String,required:!0},repoId:{type:String,required:!0},category:String,categoryId:String,mapping:{type:String,required:!0},term:String,lang:{type:String,default:"en"},theme:{type:String,default:"light"},reactionsEnabled:{type:String,default:"1"},emitMetadata:{type:String,default:"0"}},setup(e){const s=c(""),w=u((()=>{return function({repo:e,repoId:t,category:n="",categoryId:i="",mapping:o,term:r="",theme:a="light",reactionsEnabled:s="1",emitMetadata:c="0",lang:u="en",session:d,origin:l=location.href}){const f={origin:l,session:d,theme:a,reactionsEnabled:s,emitMetadata:c,repo:e,repoId:t,category:n,categoryId:i,description:h("description")};switch(o){case"url":f.term=location.href;break;case"title":f.term=document.title;break;case"og:title":f.term=h("title");break;case"specific":f.term=r;break;case"number":f.number=r;break;case"pathname":default:f.term=location.pathname.length<2?"index":location.pathname.substr(1).replace(/\.\w+$/,"")}return`https://giscus.app/${u}/widget?${new URLSearchParams(f)}`}((c=((e,t)=>{for(var n in t||(t={}))o.call(t,n)&&a(e,n,t[n]);if(i)for(var n of i(t))r.call(t,n)&&a(e,n,t[n]);return e})({},e),u={session:s.value},t(c,n(u))));var c,u}));d((()=>{const e=location.href,t=new URL(e),n=localStorage.getItem("giscus-session");if(s.value=t.searchParams.get("giscus")||"",s.value)localStorage.setItem("giscus-session",JSON.stringify(s.value)),t.searchParams.delete("giscus"),history.replaceState(void 0,document.title,t.toString());else if(n)try{s.value=JSON.parse(n||"")||""}catch(i){s.value="",localStorage.removeItem("giscus-session"),console.warn(`${g(null==i?void 0:i.message)} Session has been cleared.`)}})),d(p);const v=(y=()=>s.value="",function(e){var t;if("https://giscus.app"!==e.origin)return;const{data:n}=e;if("object"!=typeof n||!(null==(t=null==n?void 0:n.giscus)?void 0:t.error))return;const i=n.giscus.error;if(i.includes("Bad credentials")||i.includes("Invalid state value")){if(null!==localStorage.getItem("giscus-session"))return localStorage.removeItem("giscus-session"),y(),void console.warn(`${g(i)} Session has been cleared.`);console.error(`${g(i)} No session is stored initially. ${m}`)}i.includes("Discussion not found")?console.warn(`[giscus] ${i}. A new discussion will be created if a comment/reaction is submitted.`):console.error(`${g(i)} ${m}`)});var y;d((()=>window.addEventListener("message",v))),l((()=>window.removeEventListener("message",v)));const b=c();return d((()=>{b.value&&(b.value=b.value,b.value.src=w.value,b.value.addEventListener("load",(()=>E.iframeResizer({checkOrigin:["https://giscus.app"]},b.value))))})),l((()=>{var e,t;b.value&&"iFrameResizer"in b.value&&(null==(t=null==(e=b.value)?void 0:e.iFrameResizer)||t.removeListeners())})),()=>f("div",{className:"giscus"},[f("iframe",{title:"Comments",className:"giscus-frame",ref:b},null)])}}),O={install:e=>e.component("Giscus",T)};export{T as Giscus,O as plugin};

@@ -5,3 +5,3 @@ {

"description": "Type-safe Vue component for giscus",
"version": "1.0.0",
"version": "1.1.0-beta.1",
"license": "MIT",

@@ -8,0 +8,0 @@ "main": "dist/index.cjs.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc