decap-cms-backend-github 3.1.0 → 3.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /*! For license information please see decap-cms-backend-github.js.LICENSE.txt */
2
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("decap-cms-lib-util"),require("@emotion/react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendGithub",["react","decap-cms-lib-util","@emotion/react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendGithub=t(require("react"),require("decap-cms-lib-util"),require("@emotion/react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):e.DecapCmsBackendGithub=t(e.React,e.DecapCmsLibUtil,e.DecapCmsDefaultExports.EmotionCore,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsLibAuth,e.DecapCmsUiDefault)}(window,((e,t,r,n,i,o)=>(()=>{var a={8969:e=>{e.exports={__schema:{types:[{kind:"INTERFACE",name:"Node",possibleTypes:[{name:"AddedToProjectEvent"},{name:"App"},{name:"AssignedEvent"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"Blob"},{name:"Bot"},{name:"BranchProtectionRule"},{name:"ClosedEvent"},{name:"CodeOfConduct"},{name:"CommentDeletedEvent"},{name:"Commit"},{name:"CommitComment"},{name:"CommitCommentThread"},{name:"ConvertedNoteToIssueEvent"},{name:"CrossReferencedEvent"},{name:"DemilestonedEvent"},{name:"DeployKey"},{name:"DeployedEvent"},{name:"Deployment"},{name:"DeploymentEnvironmentChangedEvent"},{name:"DeploymentStatus"},{name:"ExternalIdentity"},{name:"Gist"},{name:"GistComment"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"Issue"},{name:"IssueComment"},{name:"Label"},{name:"LabeledEvent"},{name:"Language"},{name:"License"},{name:"LockedEvent"},{name:"Mannequin"},{name:"MarketplaceCategory"},{name:"MarketplaceListing"},{name:"MentionedEvent"},{name:"MergedEvent"},{name:"Milestone"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"Organization"},{name:"OrganizationIdentityProvider"},{name:"OrganizationInvitation"},{name:"PinnedEvent"},{name:"Project"},{name:"ProjectCard"},{name:"ProjectColumn"},{name:"PublicKey"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"},{name:"PullRequestReviewThread"},{name:"PushAllowance"},{name:"Reaction"},{name:"ReadyForReviewEvent"},{name:"Ref"},{name:"ReferencedEvent"},{name:"RegistryPackage"},{name:"RegistryPackageDependency"},{name:"RegistryPackageFile"},{name:"RegistryPackageTag"},{name:"RegistryPackageVersion"},{name:"Release"},{name:"ReleaseAsset"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"Repository"},{name:"RepositoryInvitation"},{name:"RepositoryTopic"},{name:"ReviewDismissalAllowance"},{name:"ReviewDismissedEvent"},{name:"ReviewRequest"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewRequestedEvent"},{name:"SavedReply"},{name:"SecurityAdvisory"},{name:"SponsorsListing"},{name:"Sponsorship"},{name:"Status"},{name:"StatusContext"},{name:"SubscribedEvent"},{name:"Tag"},{name:"Team"},{name:"Topic"},{name:"TransferredEvent"},{name:"Tree"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"},{name:"User"},{name:"UserBlockedEvent"},{name:"UserContentEdit"},{name:"UserStatus"}]},{kind:"INTERFACE",name:"UniformResourceLocatable",possibleTypes:[{name:"Bot"},{name:"ClosedEvent"},{name:"Commit"},{name:"CrossReferencedEvent"},{name:"Gist"},{name:"Issue"},{name:"Mannequin"},{name:"MergedEvent"},{name:"Milestone"},{name:"Organization"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"ReadyForReviewEvent"},{name:"Release"},{name:"Repository"},{name:"RepositoryTopic"},{name:"ReviewDismissedEvent"},{name:"User"}]},{kind:"INTERFACE",name:"Actor",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RegistryPackageOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"ProjectOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"Closable",possibleTypes:[{name:"Issue"},{name:"Milestone"},{name:"Project"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Updatable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"Project"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"UNION",name:"ProjectCardItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Assignable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Comment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"UpdatableComment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Labelable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Lockable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"RegistryPackageSearch",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RepositoryOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"MemberStatusable",possibleTypes:[{name:"Organization"},{name:"Team"}]},{kind:"INTERFACE",name:"ProfileOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"PinnableItem",possibleTypes:[{name:"Gist"},{name:"Repository"}]},{kind:"INTERFACE",name:"Starrable",possibleTypes:[{name:"Gist"},{name:"Repository"},{name:"Topic"}]},{kind:"INTERFACE",name:"RepositoryInfo",possibleTypes:[{name:"Repository"}]},{kind:"INTERFACE",name:"GitObject",possibleTypes:[{name:"Blob"},{name:"Commit"},{name:"Tag"},{name:"Tree"}]},{kind:"INTERFACE",name:"RepositoryNode",possibleTypes:[{name:"CommitComment"},{name:"CommitCommentThread"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Subscribable",possibleTypes:[{name:"Commit"},{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Deletable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"IssueComment"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Reactable",possibleTypes:[{name:"CommitComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"GitSignature",possibleTypes:[{name:"GpgSignature"},{name:"SmimeSignature"},{name:"UnknownSignature"}]},{kind:"UNION",name:"RequestedReviewer",possibleTypes:[{name:"User"},{name:"Team"},{name:"Mannequin"}]},{kind:"UNION",name:"PullRequestTimelineItem",possibleTypes:[{name:"Commit"},{name:"CommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestReviewComment"},{name:"IssueComment"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"MergedEvent"},{name:"ReferencedEvent"},{name:"CrossReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefRestoredEvent"},{name:"HeadRefForcePushedEvent"},{name:"BaseRefForcePushedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewDismissedEvent"},{name:"UserBlockedEvent"}]},{kind:"UNION",name:"Closer",possibleTypes:[{name:"Commit"},{name:"PullRequest"}]},{kind:"UNION",name:"ReferencedSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"Assignee",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"MilestoneItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"RenamedTitleSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"PullRequestTimelineItems",possibleTypes:[{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestRevisionMarker"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"MergedEvent"},{name:"ReviewDismissedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReadyForReviewEvent"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"IssueOrPullRequest",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"IssueTimelineItem",possibleTypes:[{name:"Commit"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"ReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"UserBlockedEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"TransferredEvent"}]},{kind:"UNION",name:"IssueTimelineItems",possibleTypes:[{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"ReviewDismissalAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PushAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PermissionGranter",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Sponsorable",possibleTypes:[{name:"User"}]},{kind:"INTERFACE",name:"Contribution",possibleTypes:[{name:"CreatedCommitContribution"},{name:"CreatedIssueContribution"},{name:"CreatedPullRequestContribution"},{name:"CreatedPullRequestReviewContribution"},{name:"CreatedRepositoryContribution"},{name:"JoinedGitHubContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedRepositoryOrRestrictedContribution",possibleTypes:[{name:"CreatedRepositoryContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedIssueOrRestrictedContribution",possibleTypes:[{name:"CreatedIssueContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedPullRequestOrRestrictedContribution",possibleTypes:[{name:"CreatedPullRequestContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"SearchResultItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"User"},{name:"Organization"},{name:"MarketplaceListing"},{name:"App"}]},{kind:"UNION",name:"CollectionItemContent",possibleTypes:[{name:"Repository"},{name:"Organization"},{name:"User"}]}]}}},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,h=u>0?a-4:a;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8834:(e,t,r)=>{"use strict";const n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=u,t.h2=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(H(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),s(e<0?0:0|d(e))}function f(e){const t=e.length<0?0:0|d(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function R(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function O(e,t,r,n){return W(G(t),e,r,n)}function k(e,t,r,n){return W(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=_));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(H(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==l[e]){o=c[e],a=l[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return R(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const _=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function A(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function q(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function D(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function F(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const L={};function M(e,t,r){L[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function $(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new L.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function Q(e,t){if("number"!=typeof e)throw new L.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new L.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new L.ERR_BUFFER_OUT_OF_BOUNDS;throw new L.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}M("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),M("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},5695:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(a="",r=0;r<u.length;r++){var c=u[r],l=e(t[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return o.splice(s,1),"{"+a+"}"}}(e)}},2678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=o(r(5006)),i=o(r(8019));function o(e){return e&&e.__esModule?e:{default:e}}},8048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return u(e,[])};var n,i=(n=r(8019))&&n.__esModule?n:{default:n};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a=10,s=2;function u(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:u(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(a,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(u(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+u(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},8019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},4560:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(2678))&&n.__esModule?n:{default:n},o=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=o,(0,i.default)(o);var a=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,i.default)(a)},9501:(e,t)=>{"use strict";function r(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function n(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&void 0!==t?t:0}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(e){var t=e.split(/\r\n|[\n\r]/g),i=n(e);if(0!==i)for(var o=1;o<t.length;o++)t[o]=t[o].slice(i);for(var a=0;a<t.length&&r(t[a]);)++a;for(var s=t.length;s>a&&r(t[s-1]);)--s;return t.slice(a,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!n||o||a||r,u="";return!s||n&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}},3083:(e,t,r)=>{"use strict";t.S=function(e){return(0,n.visit)(e,{leave:o})};var n=r(2624),i=r(9501),o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=c("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+c(" = ",n)+c(" ",s(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet,a=c("",t,": ")+r,u=a+c("(",s(n,", "),")");return u.length>80&&(u=a+c("(\n",l(s(n,"\n")),"\n)")),s([u,s(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+c(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",c("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(c("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(c("",s(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+c("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),u(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),FieldDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+": "+n+c(" ",s(i," "))})),InputValueDefinition:a((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,c("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),u(n)]," ")})),EnumValueDefinition:a((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),u(n)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),u(n)]," ")}};function a(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function u(e){return c("{\n",l(s(e,"\n")),"\n}")}function c(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return c(" ",e.replace(/\n/g,"\n "))}function h(e){return-1!==e.indexOf("\n")}function f(e){return null!=e&&e.some(h)}},2624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=void 0,c=Array.isArray(e),l=[e],h=-1,f=[],p=void 0,d=void 0,m=void 0,y=[],v=[],g=e;do{var b=++h===l.length,w=b&&0!==f.length;if(b){if(d=0===v.length?void 0:y[y.length-1],p=m,m=v.pop(),w){if(c)p=p.slice();else{for(var R={},E=0,O=Object.keys(p);E<O.length;E++){var k=O[E];R[k]=p[k]}p=R}for(var S=0,x=0;x<f.length;x++){var _=f[x][0],I=f[x][1];c&&(_-=S),c&&null===I?(p.splice(_,1),S++):p[_]=I}}h=n.index,l=n.keys,f=n.edits,c=n.inArray,n=n.prev}else{if(d=m?c?h:l[h]:void 0,null==(p=m?m[d]:g))continue;m&&y.push(d)}var P,T=void 0;if(!Array.isArray(p)){if(!(0,o.isNode)(p))throw new Error("Invalid AST Node: ".concat((0,i.default)(p),"."));var A=u(t,p.kind,b);if(A){if((T=A.call(t,p,d,m,y,v))===s)break;if(!1===T){if(!b){y.pop();continue}}else if(void 0!==T&&(f.push([d,T]),!b)){if(!(0,o.isNode)(T)){y.pop();continue}p=T}}}void 0===T&&w&&f.push([d,p]),b?y.pop():(n={inArray:c,index:h,keys:l,edits:f,prev:n},l=(c=Array.isArray(p))?p:null!==(P=r[p.kind])&&void 0!==P?P:[],h=-1,f=[],m&&v.push(m),m=p)}while(void 0!==n);return 0!==f.length&&(g=f[f.length-1][1]),g},t.visitInParallel=function(e){var t=new Array(e.length);return{enter:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!1);if(i){var o=i.apply(e[n],arguments);if(!1===o)t[n]=r;else if(o===s)t[n]=s;else if(void 0!==o)return o}}},leave:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!0);if(i){var o=i.apply(e[n],arguments);if(o===s)t[n]=s;else if(void 0!==o&&!1!==o)return o}}else t[n]===r&&(t[n]=null)}}},t.getVisitFn=u,t.BREAK=t.QueryDocumentKeys=void 0;var n,i=(n=r(8048))&&n.__esModule?n:{default:n},o=r(4560),a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};t.QueryDocumentKeys=a;var s=Object.freeze({});function u(e,t,r){var n=e[t];if(n){if(!r&&"function"==typeof n)return n;var i=r?n.leave:n.enter;if("function"==typeof i)return i}else{var o=r?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}t.BREAK=s},2333:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*m}},9612:(e,t,r)=>{var n=r(2118),i=r(6909),o=r(8138),a=r(4174),s=r(7942);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},6504:(e,t,r)=>{var n=r(9413),i=r(3620);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},235:(e,t,r)=>{var n=r(3945),i=r(1846),o=r(8028),a=r(2344),s=r(4769);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},5859:(e,t,r)=>{var n=r(9413),i=r(3620);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},326:(e,t,r)=>{var n=r(8761)(r(7772),"Map");e.exports=n},6738:(e,t,r)=>{var n=r(2411),i=r(6417),o=r(6928),a=r(9493),s=r(4150);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},857:(e,t,r)=>{var n=r(7772).Symbol;e.exports=n},3215:(e,t,r)=>{var n=r(8761)(r(7772),"WeakMap");e.exports=n},9432:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},2517:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},8333:(e,t,r)=>{var n=r(7832);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},343:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},217:e=>{e.exports=function(e){return e.split("")}},2218:(e,t,r)=>{var n=r(1225);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},9413:(e,t,r)=>{var n=r(9259),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},1359:e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},3366:(e,t,r)=>{var n=r(857),i=r(2107),o=r(7157),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},7832:(e,t,r)=>{var n=r(1359),i=r(2195),o=r(6024);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},2195:e=>{e.exports=function(e){return e!=e}},6840:(e,t,r)=>{var n=r(1049),i=r(7394),o=r(9259),a=r(7035),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:s).test(a(e))}},3620:e=>{e.exports=function(){}},6060:(e,t,r)=>{var n=r(3059),i=r(3114),o=r(5251);e.exports=function(e,t){return o(i(e,t,n),e+"")}},4817:(e,t,r)=>{var n=r(3059),i=r(529),o=i?function(e,t){return i.set(e,t),e}:n;e.exports=o},6532:(e,t,r)=>{var n=r(6874),i=r(3043),o=r(3059),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},9872:e=>{e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},1054:(e,t,r)=>{var n=r(857),i=r(343),o=r(6152),a=r(4795),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},1704:(e,t,r)=>{var n=r(2153),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},7297:(e,t,r)=>{var n=r(6152),i=r(1401),o=r(4452),a=r(6188);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},3895:(e,t,r)=>{var n=r(9872);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},768:(e,t,r)=>{var n=r(7832);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},1821:(e,t,r)=>{var n=r(7832);e.exports=function(e,t){for(var r=-1,i=e.length;++r<i&&n(t,e[r],0)>-1;);return r}},1495:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=r.length,l=t(a-s,0),h=Array(c+l),f=!i;++u<c;)h[u]=r[u];for(;++o<s;)(f||o<a)&&(h[n[o]]=e[o]);for(;l--;)h[u++]=e[o++];return h}},152:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=r.length,h=t(a-u,0),f=Array(h+l),p=!i;++o<h;)f[o]=e[o];for(var d=o;++c<l;)f[d+c]=r[c];for(;++s<u;)(p||o<a)&&(f[d+n[s]]=e[o++]);return f}},1522:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},4019:(e,t,r)=>{var n=r(7772)["__core-js_shared__"];e.exports=n},1176:e=>{e.exports=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}},3485:(e,t,r)=>{var n=r(2248),i=r(7772);e.exports=function(e,t,r){var o=1&t,a=n(e);return function t(){return(this&&this!==i&&this instanceof t?a:e).apply(o?r:this,arguments)}}},2248:(e,t,r)=>{var n=r(9413),i=r(9259);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=n(e.prototype),o=e.apply(r,t);return i(o)?o:r}}},8462:(e,t,r)=>{var n=r(9432),i=r(2248),o=r(764),a=r(7891),s=r(3325),u=r(527),c=r(7772);e.exports=function(e,t,r){var l=i(e);return function i(){for(var h=arguments.length,f=Array(h),p=h,d=s(i);p--;)f[p]=arguments[p];var m=h<3&&f[0]!==d&&f[h-1]!==d?[]:u(f,d);return(h-=m.length)<r?a(e,t,o,i.placeholder,void 0,f,m,void 0,void 0,r-h):n(this&&this!==c&&this instanceof i?l:e,this,f)}}},764:(e,t,r)=>{var n=r(1495),i=r(152),o=r(1176),a=r(2248),s=r(7891),u=r(3325),c=r(3418),l=r(527),h=r(7772);e.exports=function e(t,r,f,p,d,m,y,v,g,b){var w=128&r,R=1&r,E=2&r,O=24&r,k=512&r,S=E?void 0:a(t);return function x(){for(var _=arguments.length,I=Array(_),P=_;P--;)I[P]=arguments[P];if(O)var T=u(x),A=o(I,T);if(p&&(I=n(I,p,d,O)),m&&(I=i(I,m,y,O)),_-=A,O&&_<b){var C=l(I,T);return s(t,r,e,x.placeholder,f,I,C,v,g,b-_)}var N=R?f:this,q=E?N[t]:t;return _=I.length,v?I=c(I,v):k&&_>1&&I.reverse(),w&&g<_&&(I.length=g),this&&this!==h&&this instanceof x&&(q=S||a(q)),q.apply(N,I)}}},5468:(e,t,r)=>{var n=r(9432),i=r(2248),o=r(7772);e.exports=function(e,t,r,a){var s=1&t,u=i(e);return function t(){for(var i=-1,c=arguments.length,l=-1,h=a.length,f=Array(h+c),p=this&&this!==o&&this instanceof t?u:e;++l<h;)f[l]=a[l];for(;c--;)f[l++]=arguments[++i];return n(p,s?r:this,f)}}},7891:(e,t,r)=>{var n=r(3735),i=r(9890),o=r(5877);e.exports=function(e,t,r,a,s,u,c,l,h,f){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var d=[e,t,s,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,h,f],m=r.apply(void 0,d);return n(e)&&i(m,d),m.placeholder=a,o(m,e,t)}},7902:(e,t,r)=>{var n=r(4817),i=r(3485),o=r(8462),a=r(764),s=r(5468),u=r(8203),c=r(9e3),l=r(9890),h=r(5877),f=r(8101),p=Math.max;e.exports=function(e,t,r,d,m,y,v,g){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(t&=-97,d=m=void 0),v=void 0===v?v:p(f(v),0),g=void 0===g?g:f(g),w-=m?m.length:0,64&t){var R=d,E=m;d=m=void 0}var O=b?void 0:u(e),k=[e,t,r,d,m,R,E,y,v,g];if(O&&c(k,O),e=k[0],t=k[1],r=k[2],d=k[3],m=k[4],!(g=k[9]=void 0===k[9]?b?0:e.length:p(k[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||16==t?o(e,t,g):32!=t&&33!=t||m.length?a.apply(void 0,k):s(e,t,r,d);else var S=i(e,t,r);return h((O?n:l)(S,k),e,t)}},3043:(e,t,r)=>{var n=r(8761),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},1242:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},8203:(e,t,r)=>{var n=r(529),i=r(4291),o=n?function(e){return n.get(e)}:i;e.exports=o},9350:(e,t,r)=>{var n=r(9212),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},3325:e=>{e.exports=function(e){return e.placeholder}},7937:(e,t,r)=>{var n=r(8304);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},8761:(e,t,r)=>{var n=r(6840),i=r(8109);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},2107:(e,t,r)=>{var n=r(857),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},8109:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},4842:e=>{var t=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var n=e.match(t);return n?n[1].split(r):[]}},3880:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2118:(e,t,r)=>{var n=r(9191);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},6909:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},8138:(e,t,r)=>{var n=r(9191),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},4174:(e,t,r)=>{var n=r(9191),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},7942:(e,t,r)=>{var n=r(9191);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},8442:e=>{var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,r){var n=r.length;if(!n)return e;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+r+"] */\n")}},9045:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},1401:(e,t,r)=>{var n=r(6152),i=r(4795),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},8304:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},3735:(e,t,r)=>{var n=r(6504),i=r(8203),o=r(9350),a=r(8674);e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},7394:(e,t,r)=>{var n,i=r(4019),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},3945:e=>{e.exports=function(){this.__data__=[],this.size=0}},1846:(e,t,r)=>{var n=r(2218),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},8028:(e,t,r)=>{var n=r(2218);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},2344:(e,t,r)=>{var n=r(2218);e.exports=function(e){return n(this.__data__,e)>-1}},4769:(e,t,r)=>{var n=r(2218);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},2411:(e,t,r)=>{var n=r(9612),i=r(235),o=r(326);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},6417:(e,t,r)=>{var n=r(7937);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},6928:(e,t,r)=>{var n=r(7937);e.exports=function(e){return n(this,e).get(e)}},9493:(e,t,r)=>{var n=r(7937);e.exports=function(e){return n(this,e).has(e)}},4150:(e,t,r)=>{var n=r(7937);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},7777:(e,t,r)=>{var n=r(733);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},9e3:(e,t,r)=>{var n=r(1495),i=r(152),o=r(527),a="__lodash_placeholder__",s=Math.min;e.exports=function(e,t){var r=e[1],u=t[1],c=r|u,l=c<131,h=128==u&&8==r||128==u&&256==r&&e[7].length<=t[8]||384==u&&t[7].length<=t[8]&&8==r;if(!l&&!h)return e;1&u&&(e[2]=t[2],c|=1&r?0:4);var f=t[3];if(f){var p=e[3];e[3]=p?n(p,f,t[4]):f,e[4]=p?o(e[3],a):t[4]}return(f=t[5])&&(p=e[5],e[5]=p?i(p,f,t[6]):f,e[6]=p?o(e[5],a):t[6]),(f=t[7])&&(e[7]=f),128&u&&(e[8]=null==e[8]?t[8]:s(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},529:(e,t,r)=>{var n=r(3215),i=n&&new n;e.exports=i},9191:(e,t,r)=>{var n=r(8761)(Object,"create");e.exports=n},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3114:(e,t,r)=>{var n=r(9432),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=r(u),n(e,this,c)}}},9212:e=>{e.exports={}},3418:(e,t,r)=>{var n=r(1522),i=r(9045),o=Math.min;e.exports=function(e,t){for(var r=e.length,a=o(t.length,r),s=n(e);a--;){var u=t[a];e[a]=i(u,r)?s[u]:void 0}return e}},527:e=>{var t="__lodash_placeholder__";e.exports=function(e,r){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var s=e[n];s!==r&&s!==t||(e[n]=t,a[o++]=n)}return a}},7772:(e,t,r)=>{var n=r(1242),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},9890:(e,t,r)=>{var n=r(4817),i=r(7787)(n);e.exports=i},5251:(e,t,r)=>{var n=r(6532),i=r(7787)(n);e.exports=i},5877:(e,t,r)=>{var n=r(4842),i=r(8442),o=r(5251),a=r(6985);e.exports=function(e,t,r){var s=t+"";return o(e,i(s,a(n(s),r)))}},7787:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},6024:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},8435:(e,t,r)=>{var n=r(217),i=r(3880),o=r(3344);e.exports=function(e){return i(e)?o(e):n(e)}},4452:(e,t,r)=>{var n=r(7777),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=a},3812:(e,t,r)=>{var n=r(4795);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7035:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2153:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},3344:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+u+")*",h="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");e.exports=function(e){return e.match(f)||[]}},6985:(e,t,r)=>{var n=r(2517),i=r(8333),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(o,(function(r){var n="_."+r[0];t&r[1]&&!i(e,n)&&e.push(n)})),e.sort()}},7366:(e,t,r)=>{var n=r(6504),i=r(5859),o=r(1522);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},6874:e=>{e.exports=function(e){return function(){return e}}},1225:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3059:e=>{e.exports=function(e){return e}},7613:(e,t,r)=>{var n=r(9872);e.exports=function(e){return null!=e&&e.length?n(e,0,-1):[]}},6152:e=>{var t=Array.isArray;e.exports=t},1049:(e,t,r)=>{var n=r(3366),i=r(9259);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,r)=>{var n=r(3366),i=r(5125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},6974:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},733:(e,t,r)=>{var n=r(6738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},4291:e=>{e.exports=function(){}},3465:(e,t,r)=>{var n=r(6060),i=r(7902),o=r(3325),a=r(527),s=n((function(e,t){var r=a(t,o(s));return i(e,32,void 0,t,r)}));s.placeholder={},e.exports=s},6346:(e,t,r)=>{var n=r(7297),i=r(1049),o=r(3812);e.exports=function(e,t,r){var a=-1,s=(t=n(t,e)).length;for(s||(s=1,e=void 0);++a<s;){var u=null==e?void 0:e[o(t[a])];void 0===u&&(a=s,u=r),e=i(u)?u.call(e):u}return e}},5707:(e,t,r)=>{var n=r(7642);e.exports=function(e){return e?Infinity===(e=n(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8101:(e,t,r)=>{var n=r(5707);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},7642:(e,t,r)=>{var n=r(1704),i=r(9259),o=r(4795),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},6188:(e,t,r)=>{var n=r(1054);e.exports=function(e){return null==e?"":n(e)}},5648:(e,t,r)=>{var n=r(1054),i=r(1704),o=r(3895),a=r(768),s=r(1821),u=r(8435),c=r(6188);e.exports=function(e,t,r){if((e=c(e))&&(r||void 0===t))return i(e);if(!e||!(t=n(t)))return e;var l=u(e),h=u(t),f=s(l,h),p=a(l,h)+1;return o(l,f,p).join("")}},3433:(e,t,r)=>{var n=r(1054),i=r(3895),o=r(1821),a=r(8435),s=r(6188),u=/^\s+/;e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=a(e),l=o(c,a(t));return i(c,l).join("")}},8674:(e,t,r)=>{var n=r(6504),i=r(5859),o=r(3620),a=r(6152),s=r(5125),u=r(7366),c=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(c.call(e,"__wrapped__"))return u(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},1023:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(n=a+"/"+n,i=47===a.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,c=a<u?a:u,l=-1,h=0;h<=c;++h){if(h===c){if(u>c){if(47===r.charCodeAt(s+h))return r.slice(s+h+1);if(0===h)return r.slice(s+h)}else a>c&&(47===e.charCodeAt(i+h)?l=h:0===h&&(l=0));break}var f=e.charCodeAt(i+h);if(f!==r.charCodeAt(s+h))break;47===f&&(l=h)}var p="";for(h=i+l+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(s+l):(s+=l,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(c===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,h=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(r.name=e.slice(1,a),r.base=e.slice(1,u)):(r.name=e.slice(s,a),r.base=e.slice(s,u)),r.ext=e.slice(a,u)),s>0?r.dir=e.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},3252:function(e){!function(t){"use strict";var r=function(e){setTimeout(e,0)};"undefined"!=typeof process&&process&&"function"==typeof process.nextTick&&(r=process.nextTick),e.exports=function(e){var t={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===t.firstHere){t.current++,t.firstHere=!0;var e=1}else e=0;var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var n=t.queue[0];n.n+t.current>t.capacity||(t.queue.shift(),t.current+=n.n,r(n.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}}()},7288:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n}),e=r.hmd(e);const n=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},2394:(e,t,r)=>{e.exports=r(5757).Observable},5757:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}t.Observable=void 0;var o=function(){return"function"==typeof Symbol},a=function(e){return o()&&Boolean(Symbol[e])},s=function(e){return a(e)?Symbol[e]:"@@"+e};o()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var u=s("iterator"),c=s("observable"),l=s("species");function h(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function f(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:E}function p(e){return e instanceof E}function d(e){d.log?d.log(e):setTimeout((function(){throw e}))}function m(e){Promise.resolve().then((function(){try{e()}catch(e){d(e)}}))}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=h(t,"unsubscribe");r&&r.call(t)}}catch(e){d(e)}}function v(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function g(e,t,r){e._state="running";var n=e._observer;try{var i=h(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(v(e),!i)throw r;i.call(n,r);break;case"complete":v(e),i&&i.call(n)}}catch(e){d(e)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function b(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void m((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(g(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void g(e,t,r);e._queue.push({type:t,value:r})}}var w=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new R(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(v(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),R=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){b(this._subscription,"next",e)}},{key:"error",value:function(e){b(this._subscription,"error",e)}},{key:"complete",value:function(){b(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),E=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new w(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this),n=arguments.length>1,i=!1,o=arguments[1];return new r((function(r){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=f(this);return new i((function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=h(t,c);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return p(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(a("iterator")&&(n=h(t,u)))return new r((function(e){m((function(){if(!e.closed){var r=!0,i=!1,o=void 0;try{for(var a,s=n.call(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){m((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)((function(e){m((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))}},{key:l,get:function(){return this}}]),e}();t.Observable=E,o()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:c,hostReportError:d},configurable:!0})},2244:t=>{"use strict";t.exports=e},1756:e=>{"use strict";e.exports=r},2673:e=>{"use strict";e.exports=n},82:e=>{"use strict";e.exports=i},4688:e=>{"use strict";e.exports=t},3327:e=>{"use strict";e.exports=o}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,u),r.loaded=!0,r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendGithub:()=>Sa});var e,t,r=u(2244),n=u.n(r),i=u(3252),o=u.n(i),a=u(3433),s=u.n(a),l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),h=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),f=function(){function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,n))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map((function(e){return"function"==typeof e?e():e})),this.tag}return l(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return this.tag(h,e.apply(void 0,[t].concat(n)))}},{key:"processSubstitutions",value:function(e,t,r){var n=this.transformSubstitution(e.shift(),t);return"".concat(t,n,r)}},{key:"transformString",value:function(e){return this.transformers.reduce((function(e,t){return t.onString?t.onString(e):e}),e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce((function(e,r){return r.onSubstitution?r.onSubstitution(e,t):e}),e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce((function(e,t){return t.onEndResult?t.onEndResult(e):e}),e)}}]),e}();const p=f;var d={separator:"",conjunction:"",serial:!1};const m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=r.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&n>1){var u=t.lastIndexOf(i);t=t.slice(0,u)+(a?i:"")+" "+o+t.slice(u+1)}}return t}}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var r=t.match(/^[^\S\n]*(?=\S)/gm),n=r&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r.map((function(e){return e.length}))));if(n){var i=new RegExp("^.{"+n+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new p(m({separator:","}),y,v),new p(m({separator:",",conjunction:"and"}),y,v),new p(m({separator:",",conjunction:"or"}),y,v);const g=function(e){return{onSubstitution:function(t,r){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var b=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new p(g("\n"),(function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(b):b(e)?e:""}}}),m,y,v);const w=function(e,t){return{onSubstitution:function(r,n){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==r?r:r.toString().replace(e,t)}}};new p(g("\n"),m,y,v,w(/&/g,"&amp;"),w(/</g,"&lt;"),w(/>/g,"&gt;"),w(/"/g,"&quot;"),w(/'/g,"&#x27;"),w(/`/g,"&#x60;"));const R=function(e,t){return{onEndResult:function(r){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return r.replace(e,t)}}},E=new p(R(/(?:\n(?:\s*))+/g," "),v);new p(R(/(?:\n\s*)/g,""),v),new p(m({separator:","}),R(/(?:\s+)/g," "),v),new p(m({separator:",",conjunction:"or"}),R(/(?:\s+)/g," "),v),new p(m({separator:",",conjunction:"and"}),R(/(?:\s+)/g," "),v),new p(m,y,v),new p(m,R(/(?:\s+)/g," "),v);const O=new p(y,v);new p(y("all"),v);var k=u(4688);function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}function x(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var _=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,I=x((function(e){return _.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),P=u(1756),T=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},A={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},C=/[A-Z]|^ms/g,N=/_EMO_([^_]+?)_([^]*?)_EMO_/g,q=function(e){return 45===e.charCodeAt(1)},D=function(e){return null!=e&&"boolean"!=typeof e},F=x((function(e){return q(e)?e:e.replace(C,"-$&").toLowerCase()})),j=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(N,(function(e,t,r){return L={name:t,styles:r,next:L},t}))}return 1===A[e]||q(e)||"number"!=typeof t||0===t?t:t+"px"};function B(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return L={name:r.name,styles:r.styles,next:L},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)L={name:n.name,styles:n.styles,next:L},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=B(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=o+"{"+t[a]+"}":D(a)&&(n+=F(o)+":"+j(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=B(e,t,a);switch(o){case"animation":case"animationName":n+=F(o)+":"+s+";";break;default:n+=o+"{"+s+"}"}}else for(var u=0;u<a.length;u++)D(a[u])&&(n+=F(o)+":"+j(o,a[u])+";")}return n}(e,t,r);case"function":if(void 0!==e){var i=L,o=r(e);return L=i,B(e,t,o)}}if(null==t)return r;var a=t[r];return void 0!==a?a:r}var L,M=/label:\s*([^\s;\n{]+)\s*(;|$)/g,U=!!r.useInsertionEffect&&r.useInsertionEffect,$=U||function(e){return e()},Q=(U||r.useLayoutEffect,I),V=function(e){return"theme"!==e},z=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Q:V},K=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},G=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return T(t,r,n),$((function(){return function(e,t,r){T(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,r,n)})),null},W=function e(t,n){var i,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==n&&(i=n.label,o=n.target);var u=K(t,n,a),c=u||z(s),l=!c("as");return function(){var h=arguments,f=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&f.push("label:"+i+";"),null==h[0]||void 0===h[0].raw)f.push.apply(f,h);else{f.push(h[0][0]);for(var p=h.length,d=1;d<p;d++)f.push(h[d],h[0][d])}var m=(0,P.withEmotionCache)((function(e,t,n){var i,a,h,p,d=l&&e.as||s,m="",y=[],v=e;if(null==e.theme){for(var g in v={},e)v[g]=e[g];v.theme=r.useContext(P.ThemeContext)}"string"==typeof e.className?(i=t.registered,a=y,h=e.className,p="",h.split(" ").forEach((function(e){void 0!==i[e]?a.push(i[e]+";"):p+=e+" "})),m=p):null!=e.className&&(m=e.className+" ");var b=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="";L=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,i+=B(r,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=B(r,t,e[a]),n&&(i+=o[a]);M.lastIndex=0;for(var s,u="";null!==(s=M.exec(i));)u+="-"+s[1];var c=function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:L}}(f.concat(y),t.registered,v);m+=t.key+"-"+b.name,void 0!==o&&(m+=" "+o);var w=l&&void 0===u?z(d):c,R={};for(var E in e)l&&"as"===E||w(E)&&(R[E]=e[E]);return R.className=m,R.ref=n,r.createElement(r.Fragment,null,r.createElement(G,{cache:t,serialized:b,isStringTag:"string"==typeof d}),r.createElement(d,R))}));return m.displayName=void 0!==i?i:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=s,m.__emotion_styles=f,m.__emotion_forwardProp=u,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,S({},n,r,{shouldForwardProp:K(m,r,!0)})).apply(void 0,f)},m}},H=u(2673),J=u.n(H),Y=u(82),X=u(3327);function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}function ee(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const te=W(X.Icon,{target:"e1ko648l2",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"}),re=W("div",{target:"e1ko648l1",label:"ForkApprovalContainer"})({name:"13alw87",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;flex-grow:0.2"}),ne=W("div",{target:"e1ko648l0",label:"ForkButtonsContainer"})({name:"125bg8c",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center"});class ie extends n().Component{constructor(...e){super(...e),ee(this,"state",{}),ee(this,"getPermissionToFork",(()=>new Promise(((e,t)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),e()},refuseFork:()=>{this.setState({requestingFork:!1}),t()}})})))),ee(this,"handleLogin",(e=>{e.preventDefault();const t={base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint},r=new Y.NetlifyAuthenticator(t),{open_authoring:n=!1,auth_scope:i=""}=this.props.config.backend,o=i||(n?"public_repo":"repo");r.authenticate({provider:"github",scope:o},((e,t)=>{if(!e)return n?this.loginWithOpenAuthoring(t).then((()=>this.props.onLogin(t))):void this.props.onLogin(t);this.setState({loginError:e.toString()})}))})),ee(this,"renderLoginButton",(()=>{const{inProgress:e,t}=this.props;return e||this.state.findingFork?t("auth.loggingIn"):(0,P.jsx)(n().Fragment,null,(0,P.jsx)(te,{type:"github"}),t("auth.loginWithGitHub"))}))}loginWithOpenAuthoring(e){const{backend:t}=this.props;return this.setState({findingFork:!0}),t.authenticateWithFork({userData:e,getPermissionToFork:this.getPermissionToFork}).catch((e=>{throw this.setState({findingFork:!1}),console.error(e),e}))}getAuthenticationPageRenderArgs(){const{requestingFork:e}=this.state;if(e){const{approveFork:e,refuseFork:t}=this.state;return{renderPageContent:({LoginButton:r,TextButton:n,showAbortButton:i})=>(0,P.jsx)(re,null,(0,P.jsx)("p",null,"Open Authoring is enabled: we need to use a fork on your github account. (If a fork already exists, we'll use that.)"),(0,P.jsx)(ne,null,(0,P.jsx)(r,{onClick:e},"Fork the repo"),i&&(0,P.jsx)(n,{onClick:t},"Don't fork the repo")))}}return{renderButtonContent:this.renderLoginButton}}render(){const{inProgress:e,config:t,t:r}=this.props,{loginError:n,requestingFork:i,findingFork:o}=this.state;return(0,P.jsx)(X.AuthenticationPage,Z({onLogin:this.handleLogin,loginDisabled:e||o||i,loginErrorMessage:n,logoUrl:t.logo_url,siteUrl:t.site_url},this.getAuthenticationPageRenderArgs(),{t:r}))}}ee(ie,"propTypes",{onLogin:J().func.isRequired,inProgress:J().bool,base_url:J().string,siteId:J().string,authEndpoint:J().string,config:J().object.isRequired,clearHash:J().func,t:J().func.isRequired});var oe=u(5648),ae=u.n(oe),se=u(6346),ue=u.n(se),ce=u(3465),le=u.n(ce),he=u(6974),fe=u.n(he),pe=u(7613),de=u.n(pe),me=u(8834).lW;const ye="3.7.5",ve=ye,ge="function"==typeof atob,be="function"==typeof btoa,we="function"==typeof me,Re="function"==typeof TextDecoder?new TextDecoder:void 0,Ee="function"==typeof TextEncoder?new TextEncoder:void 0,Oe=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ke=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(Oe),Se=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,xe=String.fromCharCode.bind(String),_e="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Ie=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),Pe=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Te=e=>{let t,r,n,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=Oe[t>>18&63]+Oe[t>>12&63]+Oe[t>>6&63]+Oe[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},Ae=be?e=>btoa(e):we?e=>me.from(e,"binary").toString("base64"):Te,Ce=we?e=>me.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(xe.apply(null,e.subarray(r,r+4096)));return Ae(t.join(""))},Ne=(e,t=!1)=>t?Ie(Ce(e)):Ce(e),qe=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?xe(192|t>>>6)+xe(128|63&t):xe(224|t>>>12&15)+xe(128|t>>>6&63)+xe(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return xe(240|t>>>18&7)+xe(128|t>>>12&63)+xe(128|t>>>6&63)+xe(128|63&t)},De=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Fe=e=>e.replace(De,qe),je=we?e=>me.from(e,"utf8").toString("base64"):Ee?e=>Ce(Ee.encode(e)):e=>Ae(Fe(e)),Be=(e,t=!1)=>t?Ie(je(e)):je(e),Le=e=>Be(e,!0),Me=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return xe(55296+(t>>>10))+xe(56320+(1023&t));case 3:return xe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return xe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},$e=e=>e.replace(Me,Ue),Qe=e=>{if(e=e.replace(/\s+/g,""),!Se.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,i="";for(let o=0;o<e.length;)t=ke[e.charAt(o++)]<<18|ke[e.charAt(o++)]<<12|(r=ke[e.charAt(o++)])<<6|(n=ke[e.charAt(o++)]),i+=64===r?xe(t>>16&255):64===n?xe(t>>16&255,t>>8&255):xe(t>>16&255,t>>8&255,255&t);return i},Ve=ge?e=>atob(Pe(e)):we?e=>me.from(e,"base64").toString("binary"):Qe,ze=we?e=>_e(me.from(e,"base64")):e=>_e(Ve(e).split("").map((e=>e.charCodeAt(0)))),Ke=e=>ze(We(e)),Ge=we?e=>me.from(e,"base64").toString("utf8"):Re?e=>Re.decode(ze(e)):e=>$e(Ve(e)),We=e=>Pe(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),He=e=>Ge(We(e)),Je=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Ye=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Je(t));e("fromBase64",(function(){return He(this)})),e("toBase64",(function(e){return Be(this,e)})),e("toBase64URI",(function(){return Be(this,!0)})),e("toBase64URL",(function(){return Be(this,!0)})),e("toUint8Array",(function(){return Ke(this)}))},Xe=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Je(t));e("toBase64",(function(e){return Ne(this,e)})),e("toBase64URI",(function(){return Ne(this,!0)})),e("toBase64URL",(function(){return Ne(this,!0)}))},Ze={version:ye,VERSION:ve,atob:Ve,atobPolyfill:Qe,btoa:Ae,btoaPolyfill:Te,fromBase64:He,toBase64:Be,encode:Be,encodeURI:Le,encodeURL:Le,utob:Fe,btou:$e,decode:He,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:Ne,toUint8Array:Ke,extendString:Ye,extendUint8Array:Xe,extendBuiltins:()=>{Ye(),Xe()}};var et=u(1023);function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(r),!0).forEach((function(t){nt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nt(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const it="GitHub",ot=-1;var at=function(e){return e.Error="error",e.Failure="failure",e.Pending="pending",e.Success="success",e}(at||{});let st=function(e){return e.Open="open",e.Closed="closed",e.All="all",e}({});function ut(e,t){return e.labels.some((e=>(0,k.isCMSLabel)(e.name,t)))}function ct(e){return e.reduce(((e,t)=>("removed"===t.status?e.push({sha:null,path:t.filename}):"renamed"===t.status?(e.push({sha:null,path:t.previous_filename}),e.push({sha:t.sha,path:t.filename})):e.push({sha:t.sha,path:t.filename}),e)),[])}let lt=!1;class ht{constructor(e){nt(this,"apiRoot",void 0),nt(this,"token",void 0),nt(this,"tokenKeyword",void 0),nt(this,"branch",void 0),nt(this,"useOpenAuthoring",void 0),nt(this,"repo",void 0),nt(this,"originRepo",void 0),nt(this,"repoOwner",void 0),nt(this,"repoName",void 0),nt(this,"originRepoOwner",void 0),nt(this,"originRepoName",void 0),nt(this,"repoURL",void 0),nt(this,"originRepoURL",void 0),nt(this,"mergeMethod",void 0),nt(this,"initialWorkflowStatus",void 0),nt(this,"cmsLabelPrefix",void 0),nt(this,"baseUrl",void 0),nt(this,"getUser",void 0),nt(this,"_userPromise",void 0),nt(this,"_metadataSemaphore",void 0),nt(this,"commitAuthor",void 0),nt(this,"filterOpenAuthoringBranches",(async e=>{try{const t=await this.getBranchPullRequest(e),{state:r,merged_at:n}=t;return t.number!==ot&&r===st.Closed&&n?(await this.deleteBranch(e),{branch:e,filter:!1}):{branch:e,filter:!0}}catch(t){return{branch:e,filter:!1}}})),this.apiRoot=e.apiRoot||"https://api.github.com",this.token=e.token||"",this.tokenKeyword=e.tokenKeyword||"token",this.branch=e.branch||"master",this.useOpenAuthoring=e.useOpenAuthoring,this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.repoURL=`/repos/${this.repo}`,this.originRepoURL=`/repos/${this.originRepo}`;const[t,r]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=r[0],this.originRepoName=r[1],this.mergeMethod=e.squashMerges?"squash":"merge",this.cmsLabelPrefix=e.cmsLabelPrefix,this.initialWorkflowStatus=e.initialWorkflowStatus,this.baseUrl=e.baseUrl,this.getUser=e.getUser}user(){return this._userPromise||(this._userPromise=this.getUser({token:this.token})),this._userPromise}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions.push}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}reset(){}requestHeaders(e={}){const t=rt({"Content-Type":"application/json; charset=utf-8"},e);return this.token?(t.Authorization=`${this.tokenKeyword} ${this.token}`,Promise.resolve(t)):Promise.resolve(t)}parseJsonResponse(e){return e.json().then((t=>e.ok?t:Promise.reject(t)))}urlFor(e,t){const r=[];if(t.params)for(const e in t.params)r.push(`${e}=${encodeURIComponent(t.params[e])}`);return r.length&&(e+=`?${r.join("&")}`),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text().then((t=>e.ok?t:Promise.reject(t)))}handleRequestError(e,t){throw new k.APIError(e.message,t,it)}buildRequest(e){return e}async request(e,t={},r=(e=>this.parseResponse(e))){t=rt({cache:"no-cache"},t);const n=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o=500;try{const e=k.unsentRequest.fromFetchArguments(i,rt(rt({},t),{},{headers:n})),a=await(0,k.requestWithBackoff)(this,e);return o=a.status,await r(a)}catch(e){return this.handleRequestError(e,o)}}nextUrlProcessor(){return e=>e}async requestAllPages(e,t={}){t=rt({cache:"no-cache"},t);const r=await this.requestHeaders(t.headers||{}),n=this.urlFor(e,t),i=await(0,k.getAllResponses)(n,rt(rt({},t),{},{headers:r}),"next",this.nextUrlProcessor()),o=await Promise.all(i.map((e=>this.parseResponse(e))));return[].concat(...o)}generateContentKey(e,t){const r=(0,k.generateContentKey)(e,t);return this.useOpenAuthoring?`${this.repo}/${r}`:r}parseContentKey(e){return this.useOpenAuthoring?(0,k.parseContentKey)(e.slice(this.repo.length+1)):(0,k.parseContentKey)(e)}checkMetadataRef(){return this.request(`${this.repoURL}/git/refs/meta/_decap_cms`).then((e=>e.object)).catch((()=>this.uploadBlob({raw:"# Decap CMS\n\nThis tree is used by the Decap CMS to store metadata information for specific files and branches."}).then((e=>this.request(`${this.repoURL}/git/trees`,{method:"POST",body:JSON.stringify({tree:[{path:"README.md",mode:"100644",type:"blob",sha:e.sha}]})}))).then((e=>this.commit("First Commit",e))).then((e=>this.createRef("meta","_decap_cms",e.sha))).then((e=>e.object))))}async storeMetadata(e,t){return this._metadataSemaphore||(this._metadataSemaphore=o()(1)),new Promise(((r,n)=>{var i;return null===(i=this._metadataSemaphore)||void 0===i?void 0:i.take((async()=>{try{var i;const n=await this.checkMetadataRef(),o={path:`${e}.json`,raw:JSON.stringify(t)};await this.uploadBlob(o);const a=await this.updateTree(n.sha,[o]),{sha:s}=await this.commit(`Updating “${e}” metadata`,a);await this.patchRef("meta","_decap_cms",s),await k.localForage.setItem(`gh.meta.${e}`,{expires:Date.now()+3e5,data:t}),null===(i=this._metadataSemaphore)||void 0===i||i.leave(),r()}catch(e){n(e)}}))}))}deleteMetadata(e){return this._metadataSemaphore||(this._metadataSemaphore=o()(1)),new Promise((t=>{var r;return null===(r=this._metadataSemaphore)||void 0===r?void 0:r.take((async()=>{try{var r;const n=await this.checkMetadataRef(),i={path:`${e}.json`,sha:null},o=await this.updateTree(n.sha,[i]),{sha:a}=await this.commit(`Deleting “${e}” metadata`,o);await this.patchRef("meta","_decap_cms",a),null===(r=this._metadataSemaphore)||void 0===r||r.leave(),t()}catch(e){var n;null===(n=this._metadataSemaphore)||void 0===n||n.leave(),t()}}))}))}async retrieveMetadataOld(e){console.log("%c Checking for MetaData files","line-height: 30px;text-align: center;font-weight: bold");const t={params:{ref:"refs/meta/_decap_cms"},headers:{Accept:"application/vnd.github.v3.raw"}};function r(t){throw"Not Found"===t.message&&console.log("%c %s does not have metadata","line-height: 30px;text-align: center;font-weight: bold",e),t}if(!this.useOpenAuthoring)return await this.request(`${this.repoURL}/contents/${e}.json`,t).then((e=>JSON.parse(e))).catch(r);const[n,i]=e.split("/");return this.request(`/repos/${n}/${i}/contents/${e}.json`,t).then((e=>JSON.parse(e))).catch(r)}async getPullRequests(e,t,r){return(await this.requestAllPages(`${this.originRepoURL}/pulls`,{params:rt(rt({},e?{head:await this.getHeadReference(e)}:{}),{},{base:this.branch,state:t,per_page:100})})).filter((e=>e.head.ref.startsWith(`${k.CMS_BRANCH_PREFIX}/`)&&r(e)))}async getOpenAuthoringPullRequest(e,t){const r=await this.getBranch(e).catch((()=>{throw new k.EditorialWorkflowError("content is not under editorial workflow",!0)})),n=t.filter((e=>e.head.sha===r.commit.sha))[0];if(n){n.labels=n.labels.filter((e=>!(0,k.isCMSLabel)(e.name,this.cmsLabelPrefix)));const e=n.state===st.Closed?{name:(0,k.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,k.statusToLabel)("pending_review",this.cmsLabelPrefix)};return n.labels.push(e),n}try{return{head:{sha:r.commit.sha},number:ot,labels:[{name:(0,k.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],state:st.Open}}catch(e){throw new k.EditorialWorkflowError("content is not under editorial workflow",!0)}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getPullRequests(e,st.All,(()=>!0));return this.getOpenAuthoringPullRequest(e,t)}{const t=await this.getPullRequests(e,st.Open,(e=>ut(e,this.cmsLabelPrefix)));if(t.length<=0)throw new k.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}}async getPullRequestCommits(e){if(e===ot)return[];try{return await this.request(`${this.originRepoURL}/pulls/${e}/commits`)}catch(e){return console.log(e),[]}}async getPullRequestAuthor(e){var t;if(null!==(t=e.user)&&void 0!==t&&t.login)try{const e=await this.user();return e.name||e.login}catch{return}}async retrieveUnpublishedEntryData(e){const{collection:t,slug:r}=this.parseContentKey(e),n=(0,k.branchFromContentKey)(e),i=await this.getBranchPullRequest(n),[{files:o},a]=await Promise.all([this.getDifferences(this.branch,i.head.sha),this.getPullRequestAuthor(i)]),s=await Promise.all(o.map((e=>this.diffFromFile(e)))),u=i.labels.find((e=>(0,k.isCMSLabel)(e.name,this.cmsLabelPrefix))),c=(0,k.labelToStatus)(u.name,this.cmsLabelPrefix),l=i.updated_at;return{collection:t,slug:r,status:c,diffs:s.map((e=>({path:e.path,newFile:e.newFile,id:e.sha}))),updatedAt:l,pullRequestAuthor:a}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await this.fetchBlobContent({sha:t,repoURL:n,parseText:i})}async readFileMetadata(e,t){const r=await(0,k.readFileMetadata)(t,(async()=>{try{const t=await this.request(`${this.originRepoURL}/commits`,{params:{path:e,sha:this.branch}}),{commit:r}=t[0];return{author:r.author.name||r.author.email,updatedOn:r.author.date}}catch(e){return{author:"",updatedOn:""}}}),k.localForage);return r}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){const n=await this.request(`${t}/git/blobs/${e}`,{cache:"force-cache"});if(r)return Ze.decode(n.content);{const e=Ze.atob(n.content),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t])}}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const i=ae()(e,"/");try{return(await this.request(`${t}/git/trees/${r}:${i}`,{params:n>1?{recursive:1}:{}})).tree.filter((e=>"blob"===e.type&&e.path.split("/").length<=n)).map((e=>({type:e.type,id:e.sha,name:(0,k.basename)(e.path),path:`${i}/${e.path}`,size:e.size})))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}async migrateToVersion1(e,t){const r=e.head.ref.slice(4),n=`${t.collection}/${r}`,i=`cms/${n}`;await this.getBranch(i).catch((()=>{}))||await this.createBranch(i,e.head.sha);const o=(await this.getPullRequests(i,st.All,(()=>!0)))[0]||await this.createPR(e.title,i),a=rt(rt({},t),{},{pr:{number:o.number,head:o.head.sha},branch:i,version:"1"});return await this.storeMetadata(n,a),await this.closePR(e.number),await this.deleteBranch(e.head.ref),await this.deleteMetadata(r),{metadata:a,pullRequest:o}}async migrateToPullRequestLabels(e,t){await this.setPullRequestStatus(e,t.status);const r=e.head.ref.slice(4);await this.deleteMetadata(r)}async migratePullRequest(e,t){const{number:r}=e;console.log(`Migrating Pull Request '${r}' (${t})`);const n=(0,k.contentKeyFromBranch)(e.head.ref);let i=await this.retrieveMetadataOld(n).catch((()=>{}));if(!i)return void console.log(`Skipped migrating Pull Request '${r}' (${t})`);let o=r;if(!i.version){console.log(`Migrating Pull Request '${r}' to version 1`);try{({metadata:i,pullRequest:e}=await this.migrateToVersion1(e,i))}catch(e){return console.log(`Failed to migrate Pull Request '${r}' to version 1. See error below.`),void console.error(e)}o=e.number,console.log(`Done migrating Pull Request '${r}' to version 1. New pull request '${o}' created.`)}"1"===i.version&&(console.log(`Migrating Pull Request '${o}' to labels`),await this.migrateToPullRequestLabels(e,i),console.log(`Done migrating Pull Request '${o}' to labels`)),console.log(`Done migrating Pull Request '${r===o?o:`${r} => ${o}`}'`)}async getOpenAuthoringBranches(){return await this.requestAllPages(`${this.repoURL}/git/refs/heads/cms/${this.repo}`).catch((()=>[]))}async listUnpublishedBranches(){let e;if(console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),this.useOpenAuthoring){e=(await this.getOpenAuthoringBranches()).map((e=>e.ref.slice(11)));const t=await Promise.all(e.map((e=>this.filterOpenAuthoringBranches(e))));e=t.filter((e=>e.filter)).map((e=>e.branch))}else{const t=await this.getPullRequests(void 0,st.Open,(e=>!e.head.repo.fork&&function(e,t){return e.labels.every((e=>!(0,k.isCMSLabel)(e.name,t)))}(e,this.cmsLabelPrefix)));let r=0;for(const e of t)lt||(lt=!0,alert(E`
2
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("react"),require("decap-cms-lib-util"),require("@emotion/react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):"function"==typeof define&&define.amd?define("DecapCmsBackendGithub",["react","decap-cms-lib-util","@emotion/react","prop-types","decap-cms-lib-auth","decap-cms-ui-default"],t):"object"==typeof exports?exports.DecapCmsBackendGithub=t(require("react"),require("decap-cms-lib-util"),require("@emotion/react"),require("prop-types"),require("decap-cms-lib-auth"),require("decap-cms-ui-default")):e.DecapCmsBackendGithub=t(e.React,e.DecapCmsLibUtil,e.DecapCmsDefaultExports.EmotionCore,e.DecapCmsDefaultExports.PropTypes,e.DecapCmsLibAuth,e.DecapCmsUiDefault)}(window,((e,t,r,n,i,o)=>(()=>{var a={8969:e=>{e.exports={__schema:{types:[{kind:"INTERFACE",name:"Node",possibleTypes:[{name:"AddedToProjectEvent"},{name:"App"},{name:"AssignedEvent"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"Blob"},{name:"Bot"},{name:"BranchProtectionRule"},{name:"ClosedEvent"},{name:"CodeOfConduct"},{name:"CommentDeletedEvent"},{name:"Commit"},{name:"CommitComment"},{name:"CommitCommentThread"},{name:"ConvertedNoteToIssueEvent"},{name:"CrossReferencedEvent"},{name:"DemilestonedEvent"},{name:"DeployKey"},{name:"DeployedEvent"},{name:"Deployment"},{name:"DeploymentEnvironmentChangedEvent"},{name:"DeploymentStatus"},{name:"ExternalIdentity"},{name:"Gist"},{name:"GistComment"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"Issue"},{name:"IssueComment"},{name:"Label"},{name:"LabeledEvent"},{name:"Language"},{name:"License"},{name:"LockedEvent"},{name:"Mannequin"},{name:"MarketplaceCategory"},{name:"MarketplaceListing"},{name:"MentionedEvent"},{name:"MergedEvent"},{name:"Milestone"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"Organization"},{name:"OrganizationIdentityProvider"},{name:"OrganizationInvitation"},{name:"PinnedEvent"},{name:"Project"},{name:"ProjectCard"},{name:"ProjectColumn"},{name:"PublicKey"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"},{name:"PullRequestReviewThread"},{name:"PushAllowance"},{name:"Reaction"},{name:"ReadyForReviewEvent"},{name:"Ref"},{name:"ReferencedEvent"},{name:"RegistryPackage"},{name:"RegistryPackageDependency"},{name:"RegistryPackageFile"},{name:"RegistryPackageTag"},{name:"RegistryPackageVersion"},{name:"Release"},{name:"ReleaseAsset"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"Repository"},{name:"RepositoryInvitation"},{name:"RepositoryTopic"},{name:"ReviewDismissalAllowance"},{name:"ReviewDismissedEvent"},{name:"ReviewRequest"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewRequestedEvent"},{name:"SavedReply"},{name:"SecurityAdvisory"},{name:"SponsorsListing"},{name:"Sponsorship"},{name:"Status"},{name:"StatusContext"},{name:"SubscribedEvent"},{name:"Tag"},{name:"Team"},{name:"Topic"},{name:"TransferredEvent"},{name:"Tree"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"},{name:"User"},{name:"UserBlockedEvent"},{name:"UserContentEdit"},{name:"UserStatus"}]},{kind:"INTERFACE",name:"UniformResourceLocatable",possibleTypes:[{name:"Bot"},{name:"ClosedEvent"},{name:"Commit"},{name:"CrossReferencedEvent"},{name:"Gist"},{name:"Issue"},{name:"Mannequin"},{name:"MergedEvent"},{name:"Milestone"},{name:"Organization"},{name:"PullRequest"},{name:"PullRequestCommit"},{name:"ReadyForReviewEvent"},{name:"Release"},{name:"Repository"},{name:"RepositoryTopic"},{name:"ReviewDismissedEvent"},{name:"User"}]},{kind:"INTERFACE",name:"Actor",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RegistryPackageOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"ProjectOwner",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"User"}]},{kind:"INTERFACE",name:"Closable",possibleTypes:[{name:"Issue"},{name:"Milestone"},{name:"Project"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Updatable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"Project"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"UNION",name:"ProjectCardItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Assignable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Comment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"UpdatableComment",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Labelable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"Lockable",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"INTERFACE",name:"RegistryPackageSearch",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"RepositoryOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"INTERFACE",name:"MemberStatusable",possibleTypes:[{name:"Organization"},{name:"Team"}]},{kind:"INTERFACE",name:"ProfileOwner",possibleTypes:[{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"PinnableItem",possibleTypes:[{name:"Gist"},{name:"Repository"}]},{kind:"INTERFACE",name:"Starrable",possibleTypes:[{name:"Gist"},{name:"Repository"},{name:"Topic"}]},{kind:"INTERFACE",name:"RepositoryInfo",possibleTypes:[{name:"Repository"}]},{kind:"INTERFACE",name:"GitObject",possibleTypes:[{name:"Blob"},{name:"Commit"},{name:"Tag"},{name:"Tree"}]},{kind:"INTERFACE",name:"RepositoryNode",possibleTypes:[{name:"CommitComment"},{name:"CommitCommentThread"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Subscribable",possibleTypes:[{name:"Commit"},{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Deletable",possibleTypes:[{name:"CommitComment"},{name:"GistComment"},{name:"IssueComment"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"Reactable",possibleTypes:[{name:"CommitComment"},{name:"Issue"},{name:"IssueComment"},{name:"PullRequest"},{name:"PullRequestReview"},{name:"PullRequestReviewComment"}]},{kind:"INTERFACE",name:"GitSignature",possibleTypes:[{name:"GpgSignature"},{name:"SmimeSignature"},{name:"UnknownSignature"}]},{kind:"UNION",name:"RequestedReviewer",possibleTypes:[{name:"User"},{name:"Team"},{name:"Mannequin"}]},{kind:"UNION",name:"PullRequestTimelineItem",possibleTypes:[{name:"Commit"},{name:"CommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestReviewComment"},{name:"IssueComment"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"MergedEvent"},{name:"ReferencedEvent"},{name:"CrossReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefRestoredEvent"},{name:"HeadRefForcePushedEvent"},{name:"BaseRefForcePushedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReviewDismissedEvent"},{name:"UserBlockedEvent"}]},{kind:"UNION",name:"Closer",possibleTypes:[{name:"Commit"},{name:"PullRequest"}]},{kind:"UNION",name:"ReferencedSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"Assignee",possibleTypes:[{name:"Bot"},{name:"Mannequin"},{name:"Organization"},{name:"User"}]},{kind:"UNION",name:"MilestoneItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"RenamedTitleSubject",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"PullRequestTimelineItems",possibleTypes:[{name:"PullRequestCommit"},{name:"PullRequestCommitCommentThread"},{name:"PullRequestReview"},{name:"PullRequestReviewThread"},{name:"PullRequestRevisionMarker"},{name:"BaseRefChangedEvent"},{name:"BaseRefForcePushedEvent"},{name:"DeployedEvent"},{name:"DeploymentEnvironmentChangedEvent"},{name:"HeadRefDeletedEvent"},{name:"HeadRefForcePushedEvent"},{name:"HeadRefRestoredEvent"},{name:"MergedEvent"},{name:"ReviewDismissedEvent"},{name:"ReviewRequestedEvent"},{name:"ReviewRequestRemovedEvent"},{name:"ReadyForReviewEvent"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"IssueOrPullRequest",possibleTypes:[{name:"Issue"},{name:"PullRequest"}]},{kind:"UNION",name:"IssueTimelineItem",possibleTypes:[{name:"Commit"},{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"ClosedEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"UnsubscribedEvent"},{name:"ReferencedEvent"},{name:"AssignedEvent"},{name:"UnassignedEvent"},{name:"LabeledEvent"},{name:"UnlabeledEvent"},{name:"UserBlockedEvent"},{name:"MilestonedEvent"},{name:"DemilestonedEvent"},{name:"RenamedTitleEvent"},{name:"LockedEvent"},{name:"UnlockedEvent"},{name:"TransferredEvent"}]},{kind:"UNION",name:"IssueTimelineItems",possibleTypes:[{name:"IssueComment"},{name:"CrossReferencedEvent"},{name:"AddedToProjectEvent"},{name:"AssignedEvent"},{name:"ClosedEvent"},{name:"CommentDeletedEvent"},{name:"ConvertedNoteToIssueEvent"},{name:"DemilestonedEvent"},{name:"LabeledEvent"},{name:"LockedEvent"},{name:"MentionedEvent"},{name:"MilestonedEvent"},{name:"MovedColumnsInProjectEvent"},{name:"PinnedEvent"},{name:"ReferencedEvent"},{name:"RemovedFromProjectEvent"},{name:"RenamedTitleEvent"},{name:"ReopenedEvent"},{name:"SubscribedEvent"},{name:"TransferredEvent"},{name:"UnassignedEvent"},{name:"UnlabeledEvent"},{name:"UnlockedEvent"},{name:"UserBlockedEvent"},{name:"UnpinnedEvent"},{name:"UnsubscribedEvent"}]},{kind:"UNION",name:"ReviewDismissalAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PushAllowanceActor",possibleTypes:[{name:"User"},{name:"Team"}]},{kind:"UNION",name:"PermissionGranter",possibleTypes:[{name:"Organization"},{name:"Repository"},{name:"Team"}]},{kind:"INTERFACE",name:"Sponsorable",possibleTypes:[{name:"User"}]},{kind:"INTERFACE",name:"Contribution",possibleTypes:[{name:"CreatedCommitContribution"},{name:"CreatedIssueContribution"},{name:"CreatedPullRequestContribution"},{name:"CreatedPullRequestReviewContribution"},{name:"CreatedRepositoryContribution"},{name:"JoinedGitHubContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedRepositoryOrRestrictedContribution",possibleTypes:[{name:"CreatedRepositoryContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedIssueOrRestrictedContribution",possibleTypes:[{name:"CreatedIssueContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"CreatedPullRequestOrRestrictedContribution",possibleTypes:[{name:"CreatedPullRequestContribution"},{name:"RestrictedContribution"}]},{kind:"UNION",name:"SearchResultItem",possibleTypes:[{name:"Issue"},{name:"PullRequest"},{name:"Repository"},{name:"User"},{name:"Organization"},{name:"MarketplaceListing"},{name:"App"}]},{kind:"UNION",name:"CollectionItemContent",possibleTypes:[{name:"Repository"},{name:"Organization"},{name:"User"}]}]}}},5766:(e,t)=>{"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],c=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,h=u>0?a-4:a;for(r=0;r<h;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,c[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,c=n-i;s<c;s+=a)o.push(u(e,s,s+a>c?c:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e,t,n){for(var i,o,a=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),a.push(r[(o=i)>>18&63]+r[o>>12&63]+r[o>>6&63]+r[63&o]);return a.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},8834:(e,t,r)=>{"use strict";const n=r(5766),i=r(2333),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.lW=u,t.h2=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return h(e)}return c(e,t,r)}function c(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|m(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(H(e,Uint8Array)){const t=new Uint8Array(e);return p(t.buffer,t.byteOffset,t.byteLength)}return f(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(H(e,ArrayBuffer)||e&&H(e.buffer,ArrayBuffer))return p(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(H(e,SharedArrayBuffer)||e&&H(e.buffer,SharedArrayBuffer)))return p(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|d(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||J(e.length)?s(0):f(e):"Buffer"===e.type&&Array.isArray(e.data)?f(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function h(e){return l(e),s(e<0?0:0|d(e))}function f(e){const t=e.length<0?0:0|d(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function p(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function d(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function m(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||H(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return K(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return G(e).length;default:if(i)return n?-1:K(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return T(this,t,r);case"utf8":case"utf-8":return x(this,t,r);case"ascii":return I(this,t,r);case"latin1":case"binary":return P(this,t,r);case"base64":return S(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function v(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function g(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),J(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function c(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(c(e,o)===c(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(c(e,o+n)!==c(t,n)){r=!1;break}if(r)return o}return-1}function w(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(J(n))return a;e[r+a]=n}return a}function R(e,t,r,n){return W(K(t,e.length-r),e,r,n)}function E(e,t,r,n){return W(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function O(e,t,r,n){return W(G(t),e,r,n)}function k(e,t,r,n){return W(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function S(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function x(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=_)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=_));return r}(n)}u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return c(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return h(e)},u.allocUnsafeSlow=function(e){return h(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),H(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(H(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=m,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)v(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)v(this,t,t+3),v(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)v(this,t,t+7),v(this,t+1,t+6),v(this,t+2,t+5),v(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?x(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.h2;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(H(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),c=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(c[e]!==l[e]){o=c[e],a=l[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return g(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return g(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return w(this,e,t,r);case"utf8":case"utf-8":return R(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return O(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return k(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const _=4096;function I(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function P(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function T(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=Y[e[n]];return i}function A(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function C(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function N(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function q(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function D(e,t,r,n,i){$(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function F(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function j(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function B(e,t,r,n,o){return t=+t,r>>>=0,o||F(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||C(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))})),u.prototype.readBigUInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)})),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||C(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||C(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||C(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||C(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)})),u.prototype.readBigInt64BE=X((function(e){Q(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||V(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)})),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||C(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||C(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||N(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=X((function(e,t=0){return q(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeBigUInt64BE=X((function(e,t=0){return D(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))})),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);N(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o>>0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||N(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=X((function(e,t=0){return q(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeBigInt64BE=X((function(e,t=0){return D(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))})),u.prototype.writeFloatLE=function(e,t,r){return j(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return j(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return B(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return B(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const L={};function M(e,t,r){L[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function U(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function $(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new L.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Q(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||V(t,e.length-(r+1))}(n,i,o)}function Q(e,t){if("number"!=typeof e)throw new L.ERR_INVALID_ARG_TYPE(t,"number",e)}function V(e,t,r){if(Math.floor(e)!==e)throw Q(e,r),new L.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new L.ERR_BUFFER_OUT_OF_BOUNDS;throw new L.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}M("ERR_BUFFER_OUT_OF_BOUNDS",(function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"}),RangeError),M("ERR_INVALID_ARG_TYPE",(function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`}),TypeError),M("ERR_OUT_OF_RANGE",(function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=U(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=U(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n}),RangeError);const z=/[^+/0-9A-Za-z-_]/g;function K(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function G(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(z,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function W(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function H(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function J(e){return e!=e}const Y=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function X(e){return"undefined"==typeof BigInt?Z:e}function Z(){throw new Error("BigInt not supported")}},5695:e=>{"use strict";e.exports=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r,n="boolean"==typeof t.cycles&&t.cycles,i=t.cmp&&(r=t.cmp,function(e){return function(t,n){var i={key:t,value:e[t]},o={key:n,value:e[n]};return r(i,o)}}),o=[];return function e(t){if(t&&t.toJSON&&"function"==typeof t.toJSON&&(t=t.toJSON()),void 0!==t){if("number"==typeof t)return isFinite(t)?""+t:"null";if("object"!=typeof t)return JSON.stringify(t);var r,a;if(Array.isArray(t)){for(a="[",r=0;r<t.length;r++)r&&(a+=","),a+=e(t[r])||"null";return a+"]"}if(null===t)return"null";if(-1!==o.indexOf(t)){if(n)return JSON.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}var s=o.push(t)-1,u=Object.keys(t).sort(i&&i(t));for(a="",r=0;r<u.length;r++){var c=u[r],l=e(t[c]);l&&(a&&(a+=","),a+=JSON.stringify(c)+":"+l)}return o.splice(s,1),"{"+a+"}"}}(e)}},2678:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=e.prototype.toJSON;"function"==typeof t||(0,n.default)(0),e.prototype.inspect=t,i.default&&(e.prototype[i.default]=t)};var n=o(r(5006)),i=o(r(8019));function o(e){return e&&e.__esModule?e:{default:e}}},8048:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){return u(e,[])};var n,i=(n=r(8019))&&n.__esModule?n:{default:n};function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var a=10,s=2;function u(e,t){switch(o(e)){case"string":return JSON.stringify(e);case"function":return e.name?"[function ".concat(e.name,"]"):"[function]";case"object":return null===e?"null":function(e,t){if(-1!==t.indexOf(e))return"[Circular]";var r=[].concat(t,[e]),n=function(e){var t=e[String(i.default)];return"function"==typeof t?t:"function"==typeof e.inspect?e.inspect:void 0}(e);if(void 0!==n){var o=n.call(e);if(o!==e)return"string"==typeof o?o:u(o,r)}else if(Array.isArray(e))return function(e,t){if(0===e.length)return"[]";if(t.length>s)return"[Array]";for(var r=Math.min(a,e.length),n=e.length-r,i=[],o=0;o<r;++o)i.push(u(e[o],t));return 1===n?i.push("... 1 more item"):n>1&&i.push("... ".concat(n," more items")),"["+i.join(", ")+"]"}(e,r);return function(e,t){var r=Object.keys(e);return 0===r.length?"{}":t.length>s?"["+function(e){var t=Object.prototype.toString.call(e).replace(/^\[object /,"").replace(/]$/,"");if("Object"===t&&"function"==typeof e.constructor){var r=e.constructor.name;if("string"==typeof r&&""!==r)return r}return t}(e)+"]":"{ "+r.map((function(r){return r+": "+u(e[r],t)})).join(", ")+" }"}(e,r)}(e,t);default:return String(e)}}},5006:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e,t){if(!Boolean(e))throw new Error(null!=t?t:"Unexpected invariant triggered.")}},8019:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):void 0;t.default=r},4560:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.isNode=function(e){return null!=e&&"string"==typeof e.kind},t.Token=t.Location=void 0;var n,i=(n=r(2678))&&n.__esModule?n:{default:n},o=function(){function e(e,t,r){this.start=e.start,this.end=t.end,this.startToken=e,this.endToken=t,this.source=r}return e.prototype.toJSON=function(){return{start:this.start,end:this.end}},e}();t.Location=o,(0,i.default)(o);var a=function(){function e(e,t,r,n,i,o,a){this.kind=e,this.start=t,this.end=r,this.line=n,this.column=i,this.value=a,this.prev=o,this.next=null}return e.prototype.toJSON=function(){return{kind:this.kind,value:this.value,line:this.line,column:this.column}},e}();t.Token=a,(0,i.default)(a)},9501:(e,t)=>{"use strict";function r(e){for(var t=0;t<e.length;++t)if(" "!==e[t]&&"\t"!==e[t])return!1;return!0}function n(e){for(var t,r=!0,n=!0,i=0,o=null,a=0;a<e.length;++a)switch(e.charCodeAt(a)){case 13:10===e.charCodeAt(a+1)&&++a;case 10:r=!1,n=!0,i=0;break;case 9:case 32:++i;break;default:n&&!r&&(null===o||i<o)&&(o=i),n=!1}return null!==(t=o)&&void 0!==t?t:0}Object.defineProperty(t,"__esModule",{value:!0}),t.dedentBlockStringValue=function(e){var t=e.split(/\r\n|[\n\r]/g),i=n(e);if(0!==i)for(var o=1;o<t.length;o++)t[o]=t[o].slice(i);for(var a=0;a<t.length&&r(t[a]);)++a;for(var s=t.length;s>a&&r(t[s-1]);)--s;return t.slice(a,s).join("\n")},t.getBlockStringIndentation=n,t.printBlockString=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=-1===e.indexOf("\n"),i=" "===e[0]||"\t"===e[0],o='"'===e[e.length-1],a="\\"===e[e.length-1],s=!n||o||a||r,u="";return!s||n&&i||(u+="\n"+t),u+=t?e.replace(/\n/g,"\n"+t):e,s&&(u+="\n"),'"""'+u.replace(/"""/g,'\\"""')+'"""'}},3083:(e,t,r)=>{"use strict";t.S=function(e){return(0,n.visit)(e,{leave:o})};var n=r(2624),i=r(9501),o={Name:function(e){return e.value},Variable:function(e){return"$"+e.name},Document:function(e){return s(e.definitions,"\n\n")+"\n"},OperationDefinition:function(e){var t=e.operation,r=e.name,n=c("(",s(e.variableDefinitions,", "),")"),i=s(e.directives," "),o=e.selectionSet;return r||i||n||"query"!==t?s([t,s([r,n]),i,o]," "):o},VariableDefinition:function(e){var t=e.variable,r=e.type,n=e.defaultValue,i=e.directives;return t+": "+r+c(" = ",n)+c(" ",s(i," "))},SelectionSet:function(e){return u(e.selections)},Field:function(e){var t=e.alias,r=e.name,n=e.arguments,i=e.directives,o=e.selectionSet,a=c("",t,": ")+r,u=a+c("(",s(n,", "),")");return u.length>80&&(u=a+c("(\n",l(s(n,"\n")),"\n)")),s([u,s(i," "),o]," ")},Argument:function(e){return e.name+": "+e.value},FragmentSpread:function(e){return"..."+e.name+c(" ",s(e.directives," "))},InlineFragment:function(e){var t=e.typeCondition,r=e.directives,n=e.selectionSet;return s(["...",c("on ",t),s(r," "),n]," ")},FragmentDefinition:function(e){var t=e.name,r=e.typeCondition,n=e.variableDefinitions,i=e.directives,o=e.selectionSet;return"fragment ".concat(t).concat(c("(",s(n,", "),")")," ")+"on ".concat(r," ").concat(c("",s(i," ")," "))+o},IntValue:function(e){return e.value},FloatValue:function(e){return e.value},StringValue:function(e,t){var r=e.value;return e.block?(0,i.printBlockString)(r,"description"===t?"":" "):JSON.stringify(r)},BooleanValue:function(e){return e.value?"true":"false"},NullValue:function(){return"null"},EnumValue:function(e){return e.value},ListValue:function(e){return"["+s(e.values,", ")+"]"},ObjectValue:function(e){return"{"+s(e.fields,", ")+"}"},ObjectField:function(e){return e.name+": "+e.value},Directive:function(e){return"@"+e.name+c("(",s(e.arguments,", "),")")},NamedType:function(e){return e.name},ListType:function(e){return"["+e.type+"]"},NonNullType:function(e){return e.type+"!"},SchemaDefinition:a((function(e){var t=e.directives,r=e.operationTypes;return s(["schema",s(t," "),u(r)]," ")})),OperationTypeDefinition:function(e){return e.operation+": "+e.type},ScalarTypeDefinition:a((function(e){return s(["scalar",e.name,s(e.directives," ")]," ")})),ObjectTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),FieldDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.type,i=e.directives;return t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+": "+n+c(" ",s(i," "))})),InputValueDefinition:a((function(e){var t=e.name,r=e.type,n=e.defaultValue,i=e.directives;return s([t+": "+r,c("= ",n),s(i," ")]," ")})),InterfaceTypeDefinition:a((function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")})),UnionTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.types;return s(["union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")})),EnumTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.values;return s(["enum",t,s(r," "),u(n)]," ")})),EnumValueDefinition:a((function(e){return s([e.name,s(e.directives," ")]," ")})),InputObjectTypeDefinition:a((function(e){var t=e.name,r=e.directives,n=e.fields;return s(["input",t,s(r," "),u(n)]," ")})),DirectiveDefinition:a((function(e){var t=e.name,r=e.arguments,n=e.repeatable,i=e.locations;return"directive @"+t+(f(r)?c("(\n",l(s(r,"\n")),"\n)"):c("(",s(r,", "),")"))+(n?" repeatable":"")+" on "+s(i," | ")})),SchemaExtension:function(e){var t=e.directives,r=e.operationTypes;return s(["extend schema",s(t," "),u(r)]," ")},ScalarTypeExtension:function(e){return s(["extend scalar",e.name,s(e.directives," ")]," ")},ObjectTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend type",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},InterfaceTypeExtension:function(e){var t=e.name,r=e.interfaces,n=e.directives,i=e.fields;return s(["extend interface",t,c("implements ",s(r," & ")),s(n," "),u(i)]," ")},UnionTypeExtension:function(e){var t=e.name,r=e.directives,n=e.types;return s(["extend union",t,s(r," "),n&&0!==n.length?"= "+s(n," | "):""]," ")},EnumTypeExtension:function(e){var t=e.name,r=e.directives,n=e.values;return s(["extend enum",t,s(r," "),u(n)]," ")},InputObjectTypeExtension:function(e){var t=e.name,r=e.directives,n=e.fields;return s(["extend input",t,s(r," "),u(n)]," ")}};function a(e){return function(t){return s([t.description,e(t)],"\n")}}function s(e){var t,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";return null!==(t=null==e?void 0:e.filter((function(e){return e})).join(r))&&void 0!==t?t:""}function u(e){return c("{\n",l(s(e,"\n")),"\n}")}function c(e,t){return null!=t&&""!==t?e+t+(arguments.length>2&&void 0!==arguments[2]?arguments[2]:""):""}function l(e){return c(" ",e.replace(/\n/g,"\n "))}function h(e){return-1!==e.indexOf("\n")}function f(e){return null!=e&&e.some(h)}},2624:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.visit=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:a,n=void 0,c=Array.isArray(e),l=[e],h=-1,f=[],p=void 0,d=void 0,m=void 0,y=[],v=[],g=e;do{var b=++h===l.length,w=b&&0!==f.length;if(b){if(d=0===v.length?void 0:y[y.length-1],p=m,m=v.pop(),w){if(c)p=p.slice();else{for(var R={},E=0,O=Object.keys(p);E<O.length;E++){var k=O[E];R[k]=p[k]}p=R}for(var S=0,x=0;x<f.length;x++){var _=f[x][0],I=f[x][1];c&&(_-=S),c&&null===I?(p.splice(_,1),S++):p[_]=I}}h=n.index,l=n.keys,f=n.edits,c=n.inArray,n=n.prev}else{if(d=m?c?h:l[h]:void 0,null==(p=m?m[d]:g))continue;m&&y.push(d)}var P,T=void 0;if(!Array.isArray(p)){if(!(0,o.isNode)(p))throw new Error("Invalid AST Node: ".concat((0,i.default)(p),"."));var A=u(t,p.kind,b);if(A){if((T=A.call(t,p,d,m,y,v))===s)break;if(!1===T){if(!b){y.pop();continue}}else if(void 0!==T&&(f.push([d,T]),!b)){if(!(0,o.isNode)(T)){y.pop();continue}p=T}}}void 0===T&&w&&f.push([d,p]),b?y.pop():(n={inArray:c,index:h,keys:l,edits:f,prev:n},l=(c=Array.isArray(p))?p:null!==(P=r[p.kind])&&void 0!==P?P:[],h=-1,f=[],m&&v.push(m),m=p)}while(void 0!==n);return 0!==f.length&&(g=f[f.length-1][1]),g},t.visitInParallel=function(e){var t=new Array(e.length);return{enter:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!1);if(i){var o=i.apply(e[n],arguments);if(!1===o)t[n]=r;else if(o===s)t[n]=s;else if(void 0!==o)return o}}},leave:function(r){for(var n=0;n<e.length;n++)if(null==t[n]){var i=u(e[n],r.kind,!0);if(i){var o=i.apply(e[n],arguments);if(o===s)t[n]=s;else if(void 0!==o&&!1!==o)return o}}else t[n]===r&&(t[n]=null)}}},t.getVisitFn=u,t.BREAK=t.QueryDocumentKeys=void 0;var n,i=(n=r(8048))&&n.__esModule?n:{default:n},o=r(4560),a={Name:[],Document:["definitions"],OperationDefinition:["name","variableDefinitions","directives","selectionSet"],VariableDefinition:["variable","type","defaultValue","directives"],Variable:["name"],SelectionSet:["selections"],Field:["alias","name","arguments","directives","selectionSet"],Argument:["name","value"],FragmentSpread:["name","directives"],InlineFragment:["typeCondition","directives","selectionSet"],FragmentDefinition:["name","variableDefinitions","typeCondition","directives","selectionSet"],IntValue:[],FloatValue:[],StringValue:[],BooleanValue:[],NullValue:[],EnumValue:[],ListValue:["values"],ObjectValue:["fields"],ObjectField:["name","value"],Directive:["name","arguments"],NamedType:["name"],ListType:["type"],NonNullType:["type"],SchemaDefinition:["description","directives","operationTypes"],OperationTypeDefinition:["type"],ScalarTypeDefinition:["description","name","directives"],ObjectTypeDefinition:["description","name","interfaces","directives","fields"],FieldDefinition:["description","name","arguments","type","directives"],InputValueDefinition:["description","name","type","defaultValue","directives"],InterfaceTypeDefinition:["description","name","interfaces","directives","fields"],UnionTypeDefinition:["description","name","directives","types"],EnumTypeDefinition:["description","name","directives","values"],EnumValueDefinition:["description","name","directives"],InputObjectTypeDefinition:["description","name","directives","fields"],DirectiveDefinition:["description","name","arguments","locations"],SchemaExtension:["directives","operationTypes"],ScalarTypeExtension:["name","directives"],ObjectTypeExtension:["name","interfaces","directives","fields"],InterfaceTypeExtension:["name","interfaces","directives","fields"],UnionTypeExtension:["name","directives","types"],EnumTypeExtension:["name","directives","values"],InputObjectTypeExtension:["name","directives","fields"]};t.QueryDocumentKeys=a;var s=Object.freeze({});function u(e,t,r){var n=e[t];if(n){if(!r&&"function"==typeof n)return n;var i=r?n.leave:n.enter;if("function"==typeof i)return i}else{var o=r?e.leave:e.enter;if(o){if("function"==typeof o)return o;var a=o[t];if("function"==typeof a)return a}}}t.BREAK=s},2333:(e,t)=>{t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,c=u>>1,l=-7,h=r?i-1:0,f=r?-1:1,p=e[t+h];for(h+=f,o=p&(1<<-l)-1,p>>=-l,l+=s;l>0;o=256*o+e[t+h],h+=f,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+h],h+=f,l-=8);if(0===o)o=1-c;else{if(o===u)return a?NaN:1/0*(p?-1:1);a+=Math.pow(2,n),o-=c}return(p?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,c=8*o-i-1,l=(1<<c)-1,h=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=n?0:o-1,d=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+h>=1?f/u:f*Math.pow(2,1-h))*u>=2&&(a++,u/=2),a+h>=l?(s=0,a=l):a+h>=1?(s=(t*u-1)*Math.pow(2,i),a+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),a=0));i>=8;e[r+p]=255&s,p+=d,s/=256,i-=8);for(a=a<<i|s,c+=i;c>0;e[r+p]=255&a,p+=d,a/=256,c-=8);e[r+p-d]|=128*m}},9612:(e,t,r)=>{var n=r(2118),i=r(6909),o=r(8138),a=r(4174),s=r(7942);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},6504:(e,t,r)=>{var n=r(9413),i=r(3620);function o(e){this.__wrapped__=e,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=4294967295,this.__views__=[]}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},235:(e,t,r)=>{var n=r(3945),i=r(1846),o=r(8028),a=r(2344),s=r(4769);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},5859:(e,t,r)=>{var n=r(9413),i=r(3620);function o(e,t){this.__wrapped__=e,this.__actions__=[],this.__chain__=!!t,this.__index__=0,this.__values__=void 0}o.prototype=n(i.prototype),o.prototype.constructor=o,e.exports=o},326:(e,t,r)=>{var n=r(8761)(r(7772),"Map");e.exports=n},6738:(e,t,r)=>{var n=r(2411),i=r(6417),o=r(6928),a=r(9493),s=r(4150);function u(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}u.prototype.clear=n,u.prototype.delete=i,u.prototype.get=o,u.prototype.has=a,u.prototype.set=s,e.exports=u},857:(e,t,r)=>{var n=r(7772).Symbol;e.exports=n},3215:(e,t,r)=>{var n=r(8761)(r(7772),"WeakMap");e.exports=n},9432:e=>{e.exports=function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}},2517:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length;++r<n&&!1!==t(e[r],r,e););return e}},8333:(e,t,r)=>{var n=r(7832);e.exports=function(e,t){return!(null==e||!e.length)&&n(e,t,0)>-1}},343:e=>{e.exports=function(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r<n;)i[r]=t(e[r],r,e);return i}},217:e=>{e.exports=function(e){return e.split("")}},2218:(e,t,r)=>{var n=r(1225);e.exports=function(e,t){for(var r=e.length;r--;)if(n(e[r][0],t))return r;return-1}},9413:(e,t,r)=>{var n=r(9259),i=Object.create,o=function(){function e(){}return function(t){if(!n(t))return{};if(i)return i(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();e.exports=o},1359:e=>{e.exports=function(e,t,r,n){for(var i=e.length,o=r+(n?1:-1);n?o--:++o<i;)if(t(e[o],o,e))return o;return-1}},3366:(e,t,r)=>{var n=r(857),i=r(2107),o=r(7157),a=n?n.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":a&&a in Object(e)?i(e):o(e)}},7832:(e,t,r)=>{var n=r(1359),i=r(2195),o=r(6024);e.exports=function(e,t,r){return t==t?o(e,t,r):n(e,i,r)}},2195:e=>{e.exports=function(e){return e!=e}},6840:(e,t,r)=>{var n=r(1049),i=r(7394),o=r(9259),a=r(7035),s=/^\[object .+?Constructor\]$/,u=Function.prototype,c=Object.prototype,l=u.toString,h=c.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!o(e)||i(e))&&(n(e)?f:s).test(a(e))}},3620:e=>{e.exports=function(){}},6060:(e,t,r)=>{var n=r(3059),i=r(3114),o=r(5251);e.exports=function(e,t){return o(i(e,t,n),e+"")}},4817:(e,t,r)=>{var n=r(3059),i=r(529),o=i?function(e,t){return i.set(e,t),e}:n;e.exports=o},6532:(e,t,r)=>{var n=r(6874),i=r(3043),o=r(3059),a=i?function(e,t){return i(e,"toString",{configurable:!0,enumerable:!1,value:n(t),writable:!0})}:o;e.exports=a},9872:e=>{e.exports=function(e,t,r){var n=-1,i=e.length;t<0&&(t=-t>i?0:i+t),(r=r>i?i:r)<0&&(r+=i),i=t>r?0:r-t>>>0,t>>>=0;for(var o=Array(i);++n<i;)o[n]=e[n+t];return o}},1054:(e,t,r)=>{var n=r(857),i=r(343),o=r(6152),a=r(4795),s=n?n.prototype:void 0,u=s?s.toString:void 0;e.exports=function e(t){if("string"==typeof t)return t;if(o(t))return i(t,e)+"";if(a(t))return u?u.call(t):"";var r=t+"";return"0"==r&&1/t==-1/0?"-0":r}},1704:(e,t,r)=>{var n=r(2153),i=/^\s+/;e.exports=function(e){return e?e.slice(0,n(e)+1).replace(i,""):e}},7297:(e,t,r)=>{var n=r(6152),i=r(1401),o=r(4452),a=r(6188);e.exports=function(e,t){return n(e)?e:i(e,t)?[e]:o(a(e))}},3895:(e,t,r)=>{var n=r(9872);e.exports=function(e,t,r){var i=e.length;return r=void 0===r?i:r,!t&&r>=i?e:n(e,t,r)}},768:(e,t,r)=>{var n=r(7832);e.exports=function(e,t){for(var r=e.length;r--&&n(t,e[r],0)>-1;);return r}},1821:(e,t,r)=>{var n=r(7832);e.exports=function(e,t){for(var r=-1,i=e.length;++r<i&&n(t,e[r],0)>-1;);return r}},1495:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=n.length,u=-1,c=r.length,l=t(a-s,0),h=Array(c+l),f=!i;++u<c;)h[u]=r[u];for(;++o<s;)(f||o<a)&&(h[n[o]]=e[o]);for(;l--;)h[u++]=e[o++];return h}},152:e=>{var t=Math.max;e.exports=function(e,r,n,i){for(var o=-1,a=e.length,s=-1,u=n.length,c=-1,l=r.length,h=t(a-u,0),f=Array(h+l),p=!i;++o<h;)f[o]=e[o];for(var d=o;++c<l;)f[d+c]=r[c];for(;++s<u;)(p||o<a)&&(f[d+n[s]]=e[o++]);return f}},1522:e=>{e.exports=function(e,t){var r=-1,n=e.length;for(t||(t=Array(n));++r<n;)t[r]=e[r];return t}},4019:(e,t,r)=>{var n=r(7772)["__core-js_shared__"];e.exports=n},1176:e=>{e.exports=function(e,t){for(var r=e.length,n=0;r--;)e[r]===t&&++n;return n}},3485:(e,t,r)=>{var n=r(2248),i=r(7772);e.exports=function(e,t,r){var o=1&t,a=n(e);return function t(){return(this&&this!==i&&this instanceof t?a:e).apply(o?r:this,arguments)}}},2248:(e,t,r)=>{var n=r(9413),i=r(9259);e.exports=function(e){return function(){var t=arguments;switch(t.length){case 0:return new e;case 1:return new e(t[0]);case 2:return new e(t[0],t[1]);case 3:return new e(t[0],t[1],t[2]);case 4:return new e(t[0],t[1],t[2],t[3]);case 5:return new e(t[0],t[1],t[2],t[3],t[4]);case 6:return new e(t[0],t[1],t[2],t[3],t[4],t[5]);case 7:return new e(t[0],t[1],t[2],t[3],t[4],t[5],t[6])}var r=n(e.prototype),o=e.apply(r,t);return i(o)?o:r}}},8462:(e,t,r)=>{var n=r(9432),i=r(2248),o=r(764),a=r(7891),s=r(3325),u=r(527),c=r(7772);e.exports=function(e,t,r){var l=i(e);return function i(){for(var h=arguments.length,f=Array(h),p=h,d=s(i);p--;)f[p]=arguments[p];var m=h<3&&f[0]!==d&&f[h-1]!==d?[]:u(f,d);return(h-=m.length)<r?a(e,t,o,i.placeholder,void 0,f,m,void 0,void 0,r-h):n(this&&this!==c&&this instanceof i?l:e,this,f)}}},764:(e,t,r)=>{var n=r(1495),i=r(152),o=r(1176),a=r(2248),s=r(7891),u=r(3325),c=r(3418),l=r(527),h=r(7772);e.exports=function e(t,r,f,p,d,m,y,v,g,b){var w=128&r,R=1&r,E=2&r,O=24&r,k=512&r,S=E?void 0:a(t);return function x(){for(var _=arguments.length,I=Array(_),P=_;P--;)I[P]=arguments[P];if(O)var T=u(x),A=o(I,T);if(p&&(I=n(I,p,d,O)),m&&(I=i(I,m,y,O)),_-=A,O&&_<b){var C=l(I,T);return s(t,r,e,x.placeholder,f,I,C,v,g,b-_)}var N=R?f:this,q=E?N[t]:t;return _=I.length,v?I=c(I,v):k&&_>1&&I.reverse(),w&&g<_&&(I.length=g),this&&this!==h&&this instanceof x&&(q=S||a(q)),q.apply(N,I)}}},5468:(e,t,r)=>{var n=r(9432),i=r(2248),o=r(7772);e.exports=function(e,t,r,a){var s=1&t,u=i(e);return function t(){for(var i=-1,c=arguments.length,l=-1,h=a.length,f=Array(h+c),p=this&&this!==o&&this instanceof t?u:e;++l<h;)f[l]=a[l];for(;c--;)f[l++]=arguments[++i];return n(p,s?r:this,f)}}},7891:(e,t,r)=>{var n=r(3735),i=r(9890),o=r(5877);e.exports=function(e,t,r,a,s,u,c,l,h,f){var p=8&t;t|=p?32:64,4&(t&=~(p?64:32))||(t&=-4);var d=[e,t,s,p?u:void 0,p?c:void 0,p?void 0:u,p?void 0:c,l,h,f],m=r.apply(void 0,d);return n(e)&&i(m,d),m.placeholder=a,o(m,e,t)}},7902:(e,t,r)=>{var n=r(4817),i=r(3485),o=r(8462),a=r(764),s=r(5468),u=r(8203),c=r(9e3),l=r(9890),h=r(5877),f=r(8101),p=Math.max;e.exports=function(e,t,r,d,m,y,v,g){var b=2&t;if(!b&&"function"!=typeof e)throw new TypeError("Expected a function");var w=d?d.length:0;if(w||(t&=-97,d=m=void 0),v=void 0===v?v:p(f(v),0),g=void 0===g?g:f(g),w-=m?m.length:0,64&t){var R=d,E=m;d=m=void 0}var O=b?void 0:u(e),k=[e,t,r,d,m,R,E,y,v,g];if(O&&c(k,O),e=k[0],t=k[1],r=k[2],d=k[3],m=k[4],!(g=k[9]=void 0===k[9]?b?0:e.length:p(k[9]-w,0))&&24&t&&(t&=-25),t&&1!=t)S=8==t||16==t?o(e,t,g):32!=t&&33!=t||m.length?a.apply(void 0,k):s(e,t,r,d);else var S=i(e,t,r);return h((O?n:l)(S,k),e,t)}},3043:(e,t,r)=>{var n=r(8761),i=function(){try{var e=n(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=i},1242:(e,t,r)=>{var n="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g;e.exports=n},8203:(e,t,r)=>{var n=r(529),i=r(4291),o=n?function(e){return n.get(e)}:i;e.exports=o},9350:(e,t,r)=>{var n=r(9212),i=Object.prototype.hasOwnProperty;e.exports=function(e){for(var t=e.name+"",r=n[t],o=i.call(n,t)?r.length:0;o--;){var a=r[o],s=a.func;if(null==s||s==e)return a.name}return t}},3325:e=>{e.exports=function(e){return e.placeholder}},7937:(e,t,r)=>{var n=r(8304);e.exports=function(e,t){var r=e.__data__;return n(t)?r["string"==typeof t?"string":"hash"]:r.map}},8761:(e,t,r)=>{var n=r(6840),i=r(8109);e.exports=function(e,t){var r=i(e,t);return n(r)?r:void 0}},2107:(e,t,r)=>{var n=r(857),i=Object.prototype,o=i.hasOwnProperty,a=i.toString,s=n?n.toStringTag:void 0;e.exports=function(e){var t=o.call(e,s),r=e[s];try{e[s]=void 0;var n=!0}catch(e){}var i=a.call(e);return n&&(t?e[s]=r:delete e[s]),i}},8109:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},4842:e=>{var t=/\{\n\/\* \[wrapped with (.+)\] \*/,r=/,? & /;e.exports=function(e){var n=e.match(t);return n?n[1].split(r):[]}},3880:e=>{var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");e.exports=function(e){return t.test(e)}},2118:(e,t,r)=>{var n=r(9191);e.exports=function(){this.__data__=n?n(null):{},this.size=0}},6909:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},8138:(e,t,r)=>{var n=r(9191),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(n){var r=t[e];return"__lodash_hash_undefined__"===r?void 0:r}return i.call(t,e)?t[e]:void 0}},4174:(e,t,r)=>{var n=r(9191),i=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return n?void 0!==t[e]:i.call(t,e)}},7942:(e,t,r)=>{var n=r(9191);e.exports=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=n&&void 0===t?"__lodash_hash_undefined__":t,this}},8442:e=>{var t=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/;e.exports=function(e,r){var n=r.length;if(!n)return e;var i=n-1;return r[i]=(n>1?"& ":"")+r[i],r=r.join(n>2?", ":" "),e.replace(t,"{\n/* [wrapped with "+r+"] */\n")}},9045:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,r){var n=typeof e;return!!(r=null==r?9007199254740991:r)&&("number"==n||"symbol"!=n&&t.test(e))&&e>-1&&e%1==0&&e<r}},1401:(e,t,r)=>{var n=r(6152),i=r(4795),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;e.exports=function(e,t){if(n(e))return!1;var r=typeof e;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=e&&!i(e))||a.test(e)||!o.test(e)||null!=t&&e in Object(t)}},8304:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},3735:(e,t,r)=>{var n=r(6504),i=r(8203),o=r(9350),a=r(8674);e.exports=function(e){var t=o(e),r=a[t];if("function"!=typeof r||!(t in n.prototype))return!1;if(e===r)return!0;var s=i(r);return!!s&&e===s[0]}},7394:(e,t,r)=>{var n,i=r(4019),o=(n=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"";e.exports=function(e){return!!o&&o in e}},3945:e=>{e.exports=function(){this.__data__=[],this.size=0}},1846:(e,t,r)=>{var n=r(2218),i=Array.prototype.splice;e.exports=function(e){var t=this.__data__,r=n(t,e);return!(r<0||(r==t.length-1?t.pop():i.call(t,r,1),--this.size,0))}},8028:(e,t,r)=>{var n=r(2218);e.exports=function(e){var t=this.__data__,r=n(t,e);return r<0?void 0:t[r][1]}},2344:(e,t,r)=>{var n=r(2218);e.exports=function(e){return n(this.__data__,e)>-1}},4769:(e,t,r)=>{var n=r(2218);e.exports=function(e,t){var r=this.__data__,i=n(r,e);return i<0?(++this.size,r.push([e,t])):r[i][1]=t,this}},2411:(e,t,r)=>{var n=r(9612),i=r(235),o=r(326);e.exports=function(){this.size=0,this.__data__={hash:new n,map:new(o||i),string:new n}}},6417:(e,t,r)=>{var n=r(7937);e.exports=function(e){var t=n(this,e).delete(e);return this.size-=t?1:0,t}},6928:(e,t,r)=>{var n=r(7937);e.exports=function(e){return n(this,e).get(e)}},9493:(e,t,r)=>{var n=r(7937);e.exports=function(e){return n(this,e).has(e)}},4150:(e,t,r)=>{var n=r(7937);e.exports=function(e,t){var r=n(this,e),i=r.size;return r.set(e,t),this.size+=r.size==i?0:1,this}},7777:(e,t,r)=>{var n=r(733);e.exports=function(e){var t=n(e,(function(e){return 500===r.size&&r.clear(),e})),r=t.cache;return t}},9e3:(e,t,r)=>{var n=r(1495),i=r(152),o=r(527),a="__lodash_placeholder__",s=Math.min;e.exports=function(e,t){var r=e[1],u=t[1],c=r|u,l=c<131,h=128==u&&8==r||128==u&&256==r&&e[7].length<=t[8]||384==u&&t[7].length<=t[8]&&8==r;if(!l&&!h)return e;1&u&&(e[2]=t[2],c|=1&r?0:4);var f=t[3];if(f){var p=e[3];e[3]=p?n(p,f,t[4]):f,e[4]=p?o(e[3],a):t[4]}return(f=t[5])&&(p=e[5],e[5]=p?i(p,f,t[6]):f,e[6]=p?o(e[5],a):t[6]),(f=t[7])&&(e[7]=f),128&u&&(e[8]=null==e[8]?t[8]:s(e[8],t[8])),null==e[9]&&(e[9]=t[9]),e[0]=t[0],e[1]=c,e}},529:(e,t,r)=>{var n=r(3215),i=n&&new n;e.exports=i},9191:(e,t,r)=>{var n=r(8761)(Object,"create");e.exports=n},7157:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},3114:(e,t,r)=>{var n=r(9432),i=Math.max;e.exports=function(e,t,r){return t=i(void 0===t?e.length-1:t,0),function(){for(var o=arguments,a=-1,s=i(o.length-t,0),u=Array(s);++a<s;)u[a]=o[t+a];a=-1;for(var c=Array(t+1);++a<t;)c[a]=o[a];return c[t]=r(u),n(e,this,c)}}},9212:e=>{e.exports={}},3418:(e,t,r)=>{var n=r(1522),i=r(9045),o=Math.min;e.exports=function(e,t){for(var r=e.length,a=o(t.length,r),s=n(e);a--;){var u=t[a];e[a]=i(u,r)?s[u]:void 0}return e}},527:e=>{var t="__lodash_placeholder__";e.exports=function(e,r){for(var n=-1,i=e.length,o=0,a=[];++n<i;){var s=e[n];s!==r&&s!==t||(e[n]=t,a[o++]=n)}return a}},7772:(e,t,r)=>{var n=r(1242),i="object"==typeof self&&self&&self.Object===Object&&self,o=n||i||Function("return this")();e.exports=o},9890:(e,t,r)=>{var n=r(4817),i=r(7787)(n);e.exports=i},5251:(e,t,r)=>{var n=r(6532),i=r(7787)(n);e.exports=i},5877:(e,t,r)=>{var n=r(4842),i=r(8442),o=r(5251),a=r(6985);e.exports=function(e,t,r){var s=t+"";return o(e,i(s,a(n(s),r)))}},7787:e=>{var t=Date.now;e.exports=function(e){var r=0,n=0;return function(){var i=t(),o=16-(i-n);if(n=i,o>0){if(++r>=800)return arguments[0]}else r=0;return e.apply(void 0,arguments)}}},6024:e=>{e.exports=function(e,t,r){for(var n=r-1,i=e.length;++n<i;)if(e[n]===t)return n;return-1}},8435:(e,t,r)=>{var n=r(217),i=r(3880),o=r(3344);e.exports=function(e){return i(e)?o(e):n(e)}},4452:(e,t,r)=>{var n=r(7777),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,o=/\\(\\)?/g,a=n((function(e){var t=[];return 46===e.charCodeAt(0)&&t.push(""),e.replace(i,(function(e,r,n,i){t.push(n?i.replace(o,"$1"):r||e)})),t}));e.exports=a},3812:(e,t,r)=>{var n=r(4795);e.exports=function(e){if("string"==typeof e||n(e))return e;var t=e+"";return"0"==t&&1/e==-1/0?"-0":t}},7035:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},2153:e=>{var t=/\s/;e.exports=function(e){for(var r=e.length;r--&&t.test(e.charAt(r)););return r}},3344:e=>{var t="\\ud800-\\udfff",r="["+t+"]",n="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",o="[^"+t+"]",a="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+n+"|"+i+")?",c="[\\ufe0e\\ufe0f]?",l=c+u+"(?:\\u200d(?:"+[o,a,s].join("|")+")"+c+u+")*",h="(?:"+[o+n+"?",n,a,s,r].join("|")+")",f=RegExp(i+"(?="+i+")|"+h+l,"g");e.exports=function(e){return e.match(f)||[]}},6985:(e,t,r)=>{var n=r(2517),i=r(8333),o=[["ary",128],["bind",1],["bindKey",2],["curry",8],["curryRight",16],["flip",512],["partial",32],["partialRight",64],["rearg",256]];e.exports=function(e,t){return n(o,(function(r){var n="_."+r[0];t&r[1]&&!i(e,n)&&e.push(n)})),e.sort()}},7366:(e,t,r)=>{var n=r(6504),i=r(5859),o=r(1522);e.exports=function(e){if(e instanceof n)return e.clone();var t=new i(e.__wrapped__,e.__chain__);return t.__actions__=o(e.__actions__),t.__index__=e.__index__,t.__values__=e.__values__,t}},6874:e=>{e.exports=function(e){return function(){return e}}},1225:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},3059:e=>{e.exports=function(e){return e}},7613:(e,t,r)=>{var n=r(9872);e.exports=function(e){return null!=e&&e.length?n(e,0,-1):[]}},6152:e=>{var t=Array.isArray;e.exports=t},1049:(e,t,r)=>{var n=r(3366),i=r(9259);e.exports=function(e){if(!i(e))return!1;var t=n(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},9259:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},5125:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},4795:(e,t,r)=>{var n=r(3366),i=r(5125);e.exports=function(e){return"symbol"==typeof e||i(e)&&"[object Symbol]"==n(e)}},6974:e=>{e.exports=function(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}},733:(e,t,r)=>{var n=r(6738);function i(e,t){if("function"!=typeof e||null!=t&&"function"!=typeof t)throw new TypeError("Expected a function");var r=function(){var n=arguments,i=t?t.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var a=e.apply(this,n);return r.cache=o.set(i,a)||o,a};return r.cache=new(i.Cache||n),r}i.Cache=n,e.exports=i},4291:e=>{e.exports=function(){}},3465:(e,t,r)=>{var n=r(6060),i=r(7902),o=r(3325),a=r(527),s=n((function(e,t){var r=a(t,o(s));return i(e,32,void 0,t,r)}));s.placeholder={},e.exports=s},6346:(e,t,r)=>{var n=r(7297),i=r(1049),o=r(3812);e.exports=function(e,t,r){var a=-1,s=(t=n(t,e)).length;for(s||(s=1,e=void 0);++a<s;){var u=null==e?void 0:e[o(t[a])];void 0===u&&(a=s,u=r),e=i(u)?u.call(e):u}return e}},5707:(e,t,r)=>{var n=r(7642);e.exports=function(e){return e?Infinity===(e=n(e))||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}},8101:(e,t,r)=>{var n=r(5707);e.exports=function(e){var t=n(e),r=t%1;return t==t?r?t-r:t:0}},7642:(e,t,r)=>{var n=r(1704),i=r(9259),o=r(4795),a=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,u=/^0o[0-7]+$/i,c=parseInt;e.exports=function(e){if("number"==typeof e)return e;if(o(e))return NaN;if(i(e)){var t="function"==typeof e.valueOf?e.valueOf():e;e=i(t)?t+"":t}if("string"!=typeof e)return 0===e?e:+e;e=n(e);var r=s.test(e);return r||u.test(e)?c(e.slice(2),r?2:8):a.test(e)?NaN:+e}},6188:(e,t,r)=>{var n=r(1054);e.exports=function(e){return null==e?"":n(e)}},5648:(e,t,r)=>{var n=r(1054),i=r(1704),o=r(3895),a=r(768),s=r(1821),u=r(8435),c=r(6188);e.exports=function(e,t,r){if((e=c(e))&&(r||void 0===t))return i(e);if(!e||!(t=n(t)))return e;var l=u(e),h=u(t),f=s(l,h),p=a(l,h)+1;return o(l,f,p).join("")}},3433:(e,t,r)=>{var n=r(1054),i=r(3895),o=r(1821),a=r(8435),s=r(6188),u=/^\s+/;e.exports=function(e,t,r){if((e=s(e))&&(r||void 0===t))return e.replace(u,"");if(!e||!(t=n(t)))return e;var c=a(e),l=o(c,a(t));return i(c,l).join("")}},8674:(e,t,r)=>{var n=r(6504),i=r(5859),o=r(3620),a=r(6152),s=r(5125),u=r(7366),c=Object.prototype.hasOwnProperty;function l(e){if(s(e)&&!a(e)&&!(e instanceof n)){if(e instanceof i)return e;if(c.call(e,"__wrapped__"))return u(e)}return new i(e)}l.prototype=o.prototype,l.prototype.constructor=l,e.exports=l},1023:e=>{"use strict";function t(e){if("string"!=typeof e)throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}function r(e,t){for(var r,n="",i=0,o=-1,a=0,s=0;s<=e.length;++s){if(s<e.length)r=e.charCodeAt(s);else{if(47===r)break;r=47}if(47===r){if(o===s-1||1===a);else if(o!==s-1&&2===a){if(n.length<2||2!==i||46!==n.charCodeAt(n.length-1)||46!==n.charCodeAt(n.length-2))if(n.length>2){var u=n.lastIndexOf("/");if(u!==n.length-1){-1===u?(n="",i=0):i=(n=n.slice(0,u)).length-1-n.lastIndexOf("/"),o=s,a=0;continue}}else if(2===n.length||1===n.length){n="",i=0,o=s,a=0;continue}t&&(n.length>0?n+="/..":n="..",i=2)}else n.length>0?n+="/"+e.slice(o+1,s):n=e.slice(o+1,s),i=s-o-1;o=s,a=0}else 46===r&&-1!==a?++a:a=-1}return n}var n={resolve:function(){for(var e,n="",i=!1,o=arguments.length-1;o>=-1&&!i;o--){var a;o>=0?a=arguments[o]:(void 0===e&&(e=process.cwd()),a=e),t(a),0!==a.length&&(n=a+"/"+n,i=47===a.charCodeAt(0))}return n=r(n,!i),i?n.length>0?"/"+n:"/":n.length>0?n:"."},normalize:function(e){if(t(e),0===e.length)return".";var n=47===e.charCodeAt(0),i=47===e.charCodeAt(e.length-1);return 0!==(e=r(e,!n)).length||n||(e="."),e.length>0&&i&&(e+="/"),n?"/"+e:e},isAbsolute:function(e){return t(e),e.length>0&&47===e.charCodeAt(0)},join:function(){if(0===arguments.length)return".";for(var e,r=0;r<arguments.length;++r){var i=arguments[r];t(i),i.length>0&&(void 0===e?e=i:e+="/"+i)}return void 0===e?".":n.normalize(e)},relative:function(e,r){if(t(e),t(r),e===r)return"";if((e=n.resolve(e))===(r=n.resolve(r)))return"";for(var i=1;i<e.length&&47===e.charCodeAt(i);++i);for(var o=e.length,a=o-i,s=1;s<r.length&&47===r.charCodeAt(s);++s);for(var u=r.length-s,c=a<u?a:u,l=-1,h=0;h<=c;++h){if(h===c){if(u>c){if(47===r.charCodeAt(s+h))return r.slice(s+h+1);if(0===h)return r.slice(s+h)}else a>c&&(47===e.charCodeAt(i+h)?l=h:0===h&&(l=0));break}var f=e.charCodeAt(i+h);if(f!==r.charCodeAt(s+h))break;47===f&&(l=h)}var p="";for(h=i+l+1;h<=o;++h)h!==o&&47!==e.charCodeAt(h)||(0===p.length?p+="..":p+="/..");return p.length>0?p+r.slice(s+l):(s+=l,47===r.charCodeAt(s)&&++s,r.slice(s))},_makeLong:function(e){return e},dirname:function(e){if(t(e),0===e.length)return".";for(var r=e.charCodeAt(0),n=47===r,i=-1,o=!0,a=e.length-1;a>=1;--a)if(47===(r=e.charCodeAt(a))){if(!o){i=a;break}}else o=!1;return-1===i?n?"/":".":n&&1===i?"//":e.slice(0,i)},basename:function(e,r){if(void 0!==r&&"string"!=typeof r)throw new TypeError('"ext" argument must be a string');t(e);var n,i=0,o=-1,a=!0;if(void 0!==r&&r.length>0&&r.length<=e.length){if(r.length===e.length&&r===e)return"";var s=r.length-1,u=-1;for(n=e.length-1;n>=0;--n){var c=e.charCodeAt(n);if(47===c){if(!a){i=n+1;break}}else-1===u&&(a=!1,u=n+1),s>=0&&(c===r.charCodeAt(s)?-1==--s&&(o=n):(s=-1,o=u))}return i===o?o=u:-1===o&&(o=e.length),e.slice(i,o)}for(n=e.length-1;n>=0;--n)if(47===e.charCodeAt(n)){if(!a){i=n+1;break}}else-1===o&&(a=!1,o=n+1);return-1===o?"":e.slice(i,o)},extname:function(e){t(e);for(var r=-1,n=0,i=-1,o=!0,a=0,s=e.length-1;s>=0;--s){var u=e.charCodeAt(s);if(47!==u)-1===i&&(o=!1,i=s+1),46===u?-1===r?r=s:1!==a&&(a=1):-1!==r&&(a=-1);else if(!o){n=s+1;break}}return-1===r||-1===i||0===a||1===a&&r===i-1&&r===n+1?"":e.slice(r,i)},format:function(e){if(null===e||"object"!=typeof e)throw new TypeError('The "pathObject" argument must be of type Object. Received type '+typeof e);return function(e,t){var r=t.dir||t.root,n=t.base||(t.name||"")+(t.ext||"");return r?r===t.root?r+n:r+"/"+n:n}(0,e)},parse:function(e){t(e);var r={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return r;var n,i=e.charCodeAt(0),o=47===i;o?(r.root="/",n=1):n=0;for(var a=-1,s=0,u=-1,c=!0,l=e.length-1,h=0;l>=n;--l)if(47!==(i=e.charCodeAt(l)))-1===u&&(c=!1,u=l+1),46===i?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);else if(!c){s=l+1;break}return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(r.base=r.name=0===s&&o?e.slice(1,u):e.slice(s,u)):(0===s&&o?(r.name=e.slice(1,a),r.base=e.slice(1,u)):(r.name=e.slice(s,a),r.base=e.slice(s,u)),r.ext=e.slice(a,u)),s>0?r.dir=e.slice(0,s-1):o&&(r.dir="/"),r},sep:"/",delimiter:":",win32:null,posix:null};n.posix=n,e.exports=n},3252:function(e){!function(t){"use strict";var r=function(e){setTimeout(e,0)};"undefined"!=typeof process&&process&&"function"==typeof process.nextTick&&(r=process.nextTick),e.exports=function(e){var t={capacity:e||1,current:0,queue:[],firstHere:!1,take:function(){if(!1===t.firstHere){t.current++,t.firstHere=!0;var e=1}else e=0;var r={n:1};"function"==typeof arguments[0]?r.task=arguments[0]:r.n=arguments[0],arguments.length>=2&&("function"==typeof arguments[1]?r.task=arguments[1]:r.n=arguments[1]);var n=r.task;if(r.task=function(){n(t.leave)},t.current+r.n-e>t.capacity)return 1===e&&(t.current--,t.firstHere=!1),t.queue.push(r);t.current+=r.n-e,r.task(t.leave),1===e&&(t.firstHere=!1)},leave:function(e){if(e=e||1,t.current-=e,t.queue.length){var n=t.queue[0];n.n+t.current>t.capacity||(t.queue.shift(),t.current+=n.n,r(n.task))}else if(t.current<0)throw new Error("leave called too many times.")},available:function(e){return e=e||1,t.current+e<=t.capacity}};return t}}()},7288:(e,t,r)=>{"use strict";r.d(t,{Z:()=>n}),e=r.hmd(e);const n=function(e){var t,r=e.Symbol;return"function"==typeof r?r.observable?t=r.observable:(t=r("observable"),r.observable=t):t="@@observable",t}("undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==r.g?r.g:e)},2394:(e,t,r)=>{e.exports=r(5757).Observable},5757:(e,t)=>{"use strict";function r(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t,r){return t&&n(e.prototype,t),r&&n(e,r),e}t.Observable=void 0;var o=function(){return"function"==typeof Symbol},a=function(e){return o()&&Boolean(Symbol[e])},s=function(e){return a(e)?Symbol[e]:"@@"+e};o()&&!a("observable")&&(Symbol.observable=Symbol("observable"));var u=s("iterator"),c=s("observable"),l=s("species");function h(e,t){var r=e[t];if(null!=r){if("function"!=typeof r)throw new TypeError(r+" is not a function");return r}}function f(e){var t=e.constructor;return void 0!==t&&null===(t=t[l])&&(t=void 0),void 0!==t?t:E}function p(e){return e instanceof E}function d(e){d.log?d.log(e):setTimeout((function(){throw e}))}function m(e){Promise.resolve().then((function(){try{e()}catch(e){d(e)}}))}function y(e){var t=e._cleanup;if(void 0!==t&&(e._cleanup=void 0,t))try{if("function"==typeof t)t();else{var r=h(t,"unsubscribe");r&&r.call(t)}}catch(e){d(e)}}function v(e){e._observer=void 0,e._queue=void 0,e._state="closed"}function g(e,t,r){e._state="running";var n=e._observer;try{var i=h(n,t);switch(t){case"next":i&&i.call(n,r);break;case"error":if(v(e),!i)throw r;i.call(n,r);break;case"complete":v(e),i&&i.call(n)}}catch(e){d(e)}"closed"===e._state?y(e):"running"===e._state&&(e._state="ready")}function b(e,t,r){if("closed"!==e._state){if("buffering"!==e._state)return"ready"!==e._state?(e._state="buffering",e._queue=[{type:t,value:r}],void m((function(){return function(e){var t=e._queue;if(t){e._queue=void 0,e._state="ready";for(var r=0;r<t.length&&(g(e,t[r].type,t[r].value),"closed"!==e._state);++r);}}(e)}))):void g(e,t,r);e._queue.push({type:t,value:r})}}var w=function(){function e(t,n){r(this,e),this._cleanup=void 0,this._observer=t,this._queue=void 0,this._state="initializing";var i=new R(this);try{this._cleanup=n.call(void 0,i)}catch(e){i.error(e)}"initializing"===this._state&&(this._state="ready")}return i(e,[{key:"unsubscribe",value:function(){"closed"!==this._state&&(v(this),y(this))}},{key:"closed",get:function(){return"closed"===this._state}}]),e}(),R=function(){function e(t){r(this,e),this._subscription=t}return i(e,[{key:"next",value:function(e){b(this._subscription,"next",e)}},{key:"error",value:function(e){b(this._subscription,"error",e)}},{key:"complete",value:function(){b(this._subscription,"complete")}},{key:"closed",get:function(){return"closed"===this._subscription._state}}]),e}(),E=function(){function e(t){if(r(this,e),!(this instanceof e))throw new TypeError("Observable cannot be called as a function");if("function"!=typeof t)throw new TypeError("Observable initializer must be a function");this._subscriber=t}return i(e,[{key:"subscribe",value:function(e){return"object"==typeof e&&null!==e||(e={next:e,error:arguments[1],complete:arguments[2]}),new w(e,this._subscriber)}},{key:"forEach",value:function(e){var t=this;return new Promise((function(r,n){if("function"==typeof e)var i=t.subscribe({next:function(t){try{e(t,o)}catch(e){n(e),i.unsubscribe()}},error:n,complete:r});else n(new TypeError(e+" is not a function"));function o(){i.unsubscribe(),r()}}))}},{key:"map",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))((function(r){return t.subscribe({next:function(t){try{t=e(t)}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))}},{key:"filter",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");return new(f(this))((function(r){return t.subscribe({next:function(t){try{if(!e(t))return}catch(e){return r.error(e)}r.next(t)},error:function(e){r.error(e)},complete:function(){r.complete()}})}))}},{key:"reduce",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this),n=arguments.length>1,i=!1,o=arguments[1];return new r((function(r){return t.subscribe({next:function(t){var a=!i;if(i=!0,!a||n)try{o=e(o,t)}catch(e){return r.error(e)}else o=t},error:function(e){r.error(e)},complete:function(){if(!i&&!n)return r.error(new TypeError("Cannot reduce an empty sequence"));r.next(o),r.complete()}})}))}},{key:"concat",value:function(){for(var e=this,t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];var i=f(this);return new i((function(t){var n,o=0;return function e(a){n=a.subscribe({next:function(e){t.next(e)},error:function(e){t.error(e)},complete:function(){o===r.length?(n=void 0,t.complete()):e(i.from(r[o++]))}})}(e),function(){n&&(n.unsubscribe(),n=void 0)}}))}},{key:"flatMap",value:function(e){var t=this;if("function"!=typeof e)throw new TypeError(e+" is not a function");var r=f(this);return new r((function(n){var i=[],o=t.subscribe({next:function(t){if(e)try{t=e(t)}catch(e){return n.error(e)}var o=r.from(t).subscribe({next:function(e){n.next(e)},error:function(e){n.error(e)},complete:function(){var e=i.indexOf(o);e>=0&&i.splice(e,1),a()}});i.push(o)},error:function(e){n.error(e)},complete:function(){a()}});function a(){o.closed&&0===i.length&&n.complete()}return function(){i.forEach((function(e){return e.unsubscribe()})),o.unsubscribe()}}))}},{key:c,value:function(){return this}}],[{key:"from",value:function(t){var r="function"==typeof this?this:e;if(null==t)throw new TypeError(t+" is not an object");var n=h(t,c);if(n){var i=n.call(t);if(Object(i)!==i)throw new TypeError(i+" is not an object");return p(i)&&i.constructor===r?i:new r((function(e){return i.subscribe(e)}))}if(a("iterator")&&(n=h(t,u)))return new r((function(e){m((function(){if(!e.closed){var r=!0,i=!1,o=void 0;try{for(var a,s=n.call(t)[Symbol.iterator]();!(r=(a=s.next()).done);r=!0){var u=a.value;if(e.next(u),e.closed)return}}catch(e){i=!0,o=e}finally{try{r||null==s.return||s.return()}finally{if(i)throw o}}e.complete()}}))}));if(Array.isArray(t))return new r((function(e){m((function(){if(!e.closed){for(var r=0;r<t.length;++r)if(e.next(t[r]),e.closed)return;e.complete()}}))}));throw new TypeError(t+" is not observable")}},{key:"of",value:function(){for(var t=arguments.length,r=new Array(t),n=0;n<t;n++)r[n]=arguments[n];return new("function"==typeof this?this:e)((function(e){m((function(){if(!e.closed){for(var t=0;t<r.length;++t)if(e.next(r[t]),e.closed)return;e.complete()}}))}))}},{key:l,get:function(){return this}}]),e}();t.Observable=E,o()&&Object.defineProperty(E,Symbol("extensions"),{value:{symbol:c,hostReportError:d},configurable:!0})},2244:t=>{"use strict";t.exports=e},1756:e=>{"use strict";e.exports=r},2673:e=>{"use strict";e.exports=n},82:e=>{"use strict";e.exports=i},4688:e=>{"use strict";e.exports=t},3327:e=>{"use strict";e.exports=o}},s={};function u(e){var t=s[e];if(void 0!==t)return t.exports;var r=s[e]={id:e,loaded:!1,exports:{}};return a[e].call(r.exports,r,r.exports,u),r.loaded=!0,r.exports}u.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return u.d(t,{a:t}),t},u.d=(e,t)=>{for(var r in t)u.o(t,r)&&!u.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},u.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),u.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),u.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var c={};return(()=>{"use strict";u.d(c,{DecapCmsBackendGithub:()=>Sa});var e,t,r=u(2244),n=u.n(r),i=u(3252),o=u.n(i),a=u(3433),s=u.n(a),l=function(){function e(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}return function(t,r,n){return r&&e(t.prototype,r),n&&e(t,n),t}}(),h=(e=["",""],t=["",""],Object.freeze(Object.defineProperties(e,{raw:{value:Object.freeze(t)}}))),f=function(){function e(){for(var t=this,r=arguments.length,n=Array(r),i=0;i<r;i++)n[i]=arguments[i];return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.tag=function(e){for(var r=arguments.length,n=Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return"function"==typeof e?t.interimTag.bind(t,e):"string"==typeof e?t.transformEndResult(e):(e=e.map(t.transformString.bind(t)),t.transformEndResult(e.reduce(t.processSubstitutions.bind(t,n))))},n.length>0&&Array.isArray(n[0])&&(n=n[0]),this.transformers=n.map((function(e){return"function"==typeof e?e():e})),this.tag}return l(e,[{key:"interimTag",value:function(e,t){for(var r=arguments.length,n=Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return this.tag(h,e.apply(void 0,[t].concat(n)))}},{key:"processSubstitutions",value:function(e,t,r){var n=this.transformSubstitution(e.shift(),t);return"".concat(t,n,r)}},{key:"transformString",value:function(e){return this.transformers.reduce((function(e,t){return t.onString?t.onString(e):e}),e)}},{key:"transformSubstitution",value:function(e,t){return this.transformers.reduce((function(e,r){return r.onSubstitution?r.onSubstitution(e,t):e}),e)}},{key:"transformEndResult",value:function(e){return this.transformers.reduce((function(e,t){return t.onEndResult?t.onEndResult(e):e}),e)}}]),e}();const p=f;var d={separator:"",conjunction:"",serial:!1};const m=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:d;return{onSubstitution:function(t,r){if(Array.isArray(t)){var n=t.length,i=e.separator,o=e.conjunction,a=e.serial,s=r.match(/(\n?[^\S\n]+)$/);if(t=s?t.join(i+s[1]):t.join(i+" "),o&&n>1){var u=t.lastIndexOf(i);t=t.slice(0,u)+(a?i:"")+" "+o+t.slice(u+1)}}return t}}},y=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"initial";return{onEndResult:function(t){if("initial"===e){var r=t.match(/^[^\S\n]*(?=\S)/gm),n=r&&Math.min.apply(Math,function(e){if(Array.isArray(e)){for(var t=0,r=Array(e.length);t<e.length;t++)r[t]=e[t];return r}return Array.from(e)}(r.map((function(e){return e.length}))));if(n){var i=new RegExp("^.{"+n+"}","gm");return t.replace(i,"")}return t}if("all"===e)return t.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+e)}}},v=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return{onEndResult:function(t){if(""===e)return t.trim();if("start"===(e=e.toLowerCase())||"left"===e)return t.replace(/^\s*/,"");if("end"===e||"right"===e)return t.replace(/\s*$/,"");throw new Error("Side not supported: "+e)}}};new p(m({separator:","}),y,v),new p(m({separator:",",conjunction:"and"}),y,v),new p(m({separator:",",conjunction:"or"}),y,v);const g=function(e){return{onSubstitution:function(t,r){if(null==e||"string"!=typeof e)throw new Error("You need to specify a string character to split by.");return"string"==typeof t&&t.includes(e)&&(t=t.split(e)),t}}};var b=function(e){return null!=e&&!Number.isNaN(e)&&"boolean"!=typeof e};new p(g("\n"),(function(){return{onSubstitution:function(e){return Array.isArray(e)?e.filter(b):b(e)?e:""}}}),m,y,v);const w=function(e,t){return{onSubstitution:function(r,n){if(null==e||null==t)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return null==r?r:r.toString().replace(e,t)}}};new p(g("\n"),m,y,v,w(/&/g,"&amp;"),w(/</g,"&lt;"),w(/>/g,"&gt;"),w(/"/g,"&quot;"),w(/'/g,"&#x27;"),w(/`/g,"&#x60;"));const R=function(e,t){return{onEndResult:function(r){if(null==e||null==t)throw new Error("replaceResultTransformer requires at least 2 arguments.");return r.replace(e,t)}}},E=new p(R(/(?:\n(?:\s*))+/g," "),v);new p(R(/(?:\n\s*)/g,""),v),new p(m({separator:","}),R(/(?:\s+)/g," "),v),new p(m({separator:",",conjunction:"or"}),R(/(?:\s+)/g," "),v),new p(m({separator:",",conjunction:"and"}),R(/(?:\s+)/g," "),v),new p(m,y,v),new p(m,R(/(?:\s+)/g," "),v);const O=new p(y,v);new p(y("all"),v);var k=u(4688);function S(){return S=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},S.apply(this,arguments)}function x(e){var t=Object.create(null);return function(r){return void 0===t[r]&&(t[r]=e(r)),t[r]}}var _=/^((children|dangerouslySetInnerHTML|key|ref|autoFocus|defaultValue|defaultChecked|innerHTML|suppressContentEditableWarning|suppressHydrationWarning|valueLink|abbr|accept|acceptCharset|accessKey|action|allow|allowUserMedia|allowPaymentRequest|allowFullScreen|allowTransparency|alt|async|autoComplete|autoPlay|capture|cellPadding|cellSpacing|challenge|charSet|checked|cite|classID|className|cols|colSpan|content|contentEditable|contextMenu|controls|controlsList|coords|crossOrigin|data|dateTime|decoding|default|defer|dir|disabled|disablePictureInPicture|download|draggable|encType|enterKeyHint|form|formAction|formEncType|formMethod|formNoValidate|formTarget|frameBorder|headers|height|hidden|high|href|hrefLang|htmlFor|httpEquiv|id|inputMode|integrity|is|keyParams|keyType|kind|label|lang|list|loading|loop|low|marginHeight|marginWidth|max|maxLength|media|mediaGroup|method|min|minLength|multiple|muted|name|nonce|noValidate|open|optimum|pattern|placeholder|playsInline|poster|preload|profile|radioGroup|readOnly|referrerPolicy|rel|required|reversed|role|rows|rowSpan|sandbox|scope|scoped|scrolling|seamless|selected|shape|size|sizes|slot|span|spellCheck|src|srcDoc|srcLang|srcSet|start|step|style|summary|tabIndex|target|title|translate|type|useMap|value|width|wmode|wrap|about|datatype|inlist|prefix|property|resource|typeof|vocab|autoCapitalize|autoCorrect|autoSave|color|incremental|fallback|inert|itemProp|itemScope|itemType|itemID|itemRef|on|option|results|security|unselectable|accentHeight|accumulate|additive|alignmentBaseline|allowReorder|alphabetic|amplitude|arabicForm|ascent|attributeName|attributeType|autoReverse|azimuth|baseFrequency|baselineShift|baseProfile|bbox|begin|bias|by|calcMode|capHeight|clip|clipPathUnits|clipPath|clipRule|colorInterpolation|colorInterpolationFilters|colorProfile|colorRendering|contentScriptType|contentStyleType|cursor|cx|cy|d|decelerate|descent|diffuseConstant|direction|display|divisor|dominantBaseline|dur|dx|dy|edgeMode|elevation|enableBackground|end|exponent|externalResourcesRequired|fill|fillOpacity|fillRule|filter|filterRes|filterUnits|floodColor|floodOpacity|focusable|fontFamily|fontSize|fontSizeAdjust|fontStretch|fontStyle|fontVariant|fontWeight|format|from|fr|fx|fy|g1|g2|glyphName|glyphOrientationHorizontal|glyphOrientationVertical|glyphRef|gradientTransform|gradientUnits|hanging|horizAdvX|horizOriginX|ideographic|imageRendering|in|in2|intercept|k|k1|k2|k3|k4|kernelMatrix|kernelUnitLength|kerning|keyPoints|keySplines|keyTimes|lengthAdjust|letterSpacing|lightingColor|limitingConeAngle|local|markerEnd|markerMid|markerStart|markerHeight|markerUnits|markerWidth|mask|maskContentUnits|maskUnits|mathematical|mode|numOctaves|offset|opacity|operator|order|orient|orientation|origin|overflow|overlinePosition|overlineThickness|panose1|paintOrder|pathLength|patternContentUnits|patternTransform|patternUnits|pointerEvents|points|pointsAtX|pointsAtY|pointsAtZ|preserveAlpha|preserveAspectRatio|primitiveUnits|r|radius|refX|refY|renderingIntent|repeatCount|repeatDur|requiredExtensions|requiredFeatures|restart|result|rotate|rx|ry|scale|seed|shapeRendering|slope|spacing|specularConstant|specularExponent|speed|spreadMethod|startOffset|stdDeviation|stemh|stemv|stitchTiles|stopColor|stopOpacity|strikethroughPosition|strikethroughThickness|string|stroke|strokeDasharray|strokeDashoffset|strokeLinecap|strokeLinejoin|strokeMiterlimit|strokeOpacity|strokeWidth|surfaceScale|systemLanguage|tableValues|targetX|targetY|textAnchor|textDecoration|textRendering|textLength|to|transform|u1|u2|underlinePosition|underlineThickness|unicode|unicodeBidi|unicodeRange|unitsPerEm|vAlphabetic|vHanging|vIdeographic|vMathematical|values|vectorEffect|version|vertAdvY|vertOriginX|vertOriginY|viewBox|viewTarget|visibility|widths|wordSpacing|writingMode|x|xHeight|x1|x2|xChannelSelector|xlinkActuate|xlinkArcrole|xlinkHref|xlinkRole|xlinkShow|xlinkTitle|xlinkType|xmlBase|xmlns|xmlnsXlink|xmlLang|xmlSpace|y|y1|y2|yChannelSelector|z|zoomAndPan|for|class|autofocus)|(([Dd][Aa][Tt][Aa]|[Aa][Rr][Ii][Aa]|x)-.*))$/,I=x((function(e){return _.test(e)||111===e.charCodeAt(0)&&110===e.charCodeAt(1)&&e.charCodeAt(2)<91})),P=u(1756),T=function(e,t,r){var n=e.key+"-"+t.name;!1===r&&void 0===e.registered[n]&&(e.registered[n]=t.styles)},A={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1},C=/[A-Z]|^ms/g,N=/_EMO_([^_]+?)_([^]*?)_EMO_/g,q=function(e){return 45===e.charCodeAt(1)},D=function(e){return null!=e&&"boolean"!=typeof e},F=x((function(e){return q(e)?e:e.replace(C,"-$&").toLowerCase()})),j=function(e,t){switch(e){case"animation":case"animationName":if("string"==typeof t)return t.replace(N,(function(e,t,r){return L={name:t,styles:r,next:L},t}))}return 1===A[e]||q(e)||"number"!=typeof t||0===t?t:t+"px"};function B(e,t,r){if(null==r)return"";if(void 0!==r.__emotion_styles)return r;switch(typeof r){case"boolean":return"";case"object":if(1===r.anim)return L={name:r.name,styles:r.styles,next:L},r.name;if(void 0!==r.styles){var n=r.next;if(void 0!==n)for(;void 0!==n;)L={name:n.name,styles:n.styles,next:L},n=n.next;return r.styles+";"}return function(e,t,r){var n="";if(Array.isArray(r))for(var i=0;i<r.length;i++)n+=B(e,t,r[i])+";";else for(var o in r){var a=r[o];if("object"!=typeof a)null!=t&&void 0!==t[a]?n+=o+"{"+t[a]+"}":D(a)&&(n+=F(o)+":"+j(o,a)+";");else if(!Array.isArray(a)||"string"!=typeof a[0]||null!=t&&void 0!==t[a[0]]){var s=B(e,t,a);switch(o){case"animation":case"animationName":n+=F(o)+":"+s+";";break;default:n+=o+"{"+s+"}"}}else for(var u=0;u<a.length;u++)D(a[u])&&(n+=F(o)+":"+j(o,a[u])+";")}return n}(e,t,r);case"function":if(void 0!==e){var i=L,o=r(e);return L=i,B(e,t,o)}}if(null==t)return r;var a=t[r];return void 0!==a?a:r}var L,M=/label:\s*([^\s;\n{]+)\s*(;|$)/g,U=!!r.useInsertionEffect&&r.useInsertionEffect,$=U||function(e){return e()},Q=(U||r.useLayoutEffect,I),V=function(e){return"theme"!==e},z=function(e){return"string"==typeof e&&e.charCodeAt(0)>96?Q:V},K=function(e,t,r){var n;if(t){var i=t.shouldForwardProp;n=e.__emotion_forwardProp&&i?function(t){return e.__emotion_forwardProp(t)&&i(t)}:i}return"function"!=typeof n&&r&&(n=e.__emotion_forwardProp),n},G=function(e){var t=e.cache,r=e.serialized,n=e.isStringTag;return T(t,r,n),$((function(){return function(e,t,r){T(e,t,r);var n=e.key+"-"+t.name;if(void 0===e.inserted[t.name]){var i=t;do{e.insert(t===i?"."+n:"",i,e.sheet,!0),i=i.next}while(void 0!==i)}}(t,r,n)})),null},W=function e(t,n){var i,o,a=t.__emotion_real===t,s=a&&t.__emotion_base||t;void 0!==n&&(i=n.label,o=n.target);var u=K(t,n,a),c=u||z(s),l=!c("as");return function(){var h=arguments,f=a&&void 0!==t.__emotion_styles?t.__emotion_styles.slice(0):[];if(void 0!==i&&f.push("label:"+i+";"),null==h[0]||void 0===h[0].raw)f.push.apply(f,h);else{f.push(h[0][0]);for(var p=h.length,d=1;d<p;d++)f.push(h[d],h[0][d])}var m=(0,P.withEmotionCache)((function(e,t,n){var i,a,h,p,d=l&&e.as||s,m="",y=[],v=e;if(null==e.theme){for(var g in v={},e)v[g]=e[g];v.theme=r.useContext(P.ThemeContext)}"string"==typeof e.className?(i=t.registered,a=y,h=e.className,p="",h.split(" ").forEach((function(e){void 0!==i[e]?a.push(i[e]+";"):p+=e+" "})),m=p):null!=e.className&&(m=e.className+" ");var b=function(e,t,r){if(1===e.length&&"object"==typeof e[0]&&null!==e[0]&&void 0!==e[0].styles)return e[0];var n=!0,i="";L=void 0;var o=e[0];null==o||void 0===o.raw?(n=!1,i+=B(r,t,o)):i+=o[0];for(var a=1;a<e.length;a++)i+=B(r,t,e[a]),n&&(i+=o[a]);M.lastIndex=0;for(var s,u="";null!==(s=M.exec(i));)u+="-"+s[1];var c=function(e){for(var t,r=0,n=0,i=e.length;i>=4;++n,i-=4)t=1540483477*(65535&(t=255&e.charCodeAt(n)|(255&e.charCodeAt(++n))<<8|(255&e.charCodeAt(++n))<<16|(255&e.charCodeAt(++n))<<24))+(59797*(t>>>16)<<16),r=1540483477*(65535&(t^=t>>>24))+(59797*(t>>>16)<<16)^1540483477*(65535&r)+(59797*(r>>>16)<<16);switch(i){case 3:r^=(255&e.charCodeAt(n+2))<<16;case 2:r^=(255&e.charCodeAt(n+1))<<8;case 1:r=1540483477*(65535&(r^=255&e.charCodeAt(n)))+(59797*(r>>>16)<<16)}return(((r=1540483477*(65535&(r^=r>>>13))+(59797*(r>>>16)<<16))^r>>>15)>>>0).toString(36)}(i)+u;return{name:c,styles:i,next:L}}(f.concat(y),t.registered,v);m+=t.key+"-"+b.name,void 0!==o&&(m+=" "+o);var w=l&&void 0===u?z(d):c,R={};for(var E in e)l&&"as"===E||w(E)&&(R[E]=e[E]);return R.className=m,R.ref=n,r.createElement(r.Fragment,null,r.createElement(G,{cache:t,serialized:b,isStringTag:"string"==typeof d}),r.createElement(d,R))}));return m.displayName=void 0!==i?i:"Styled("+("string"==typeof s?s:s.displayName||s.name||"Component")+")",m.defaultProps=t.defaultProps,m.__emotion_real=m,m.__emotion_base=s,m.__emotion_styles=f,m.__emotion_forwardProp=u,Object.defineProperty(m,"toString",{value:function(){return"."+o}}),m.withComponent=function(t,r){return e(t,S({},n,r,{shouldForwardProp:K(m,r,!0)})).apply(void 0,f)},m}},H=u(2673),J=u.n(H),Y=u(82),X=u(3327);function Z(){return Z=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},Z.apply(this,arguments)}function ee(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const te=W(X.Icon,{target:"e1ko648l2",label:"LoginButtonIcon"})({name:"1gnqu05",styles:"margin-right:18px"}),re=W("div",{target:"e1ko648l1",label:"ForkApprovalContainer"})({name:"13alw87",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;flex-grow:0.2"}),ne=W("div",{target:"e1ko648l0",label:"ForkButtonsContainer"})({name:"125bg8c",styles:"display:flex;flex-flow:column nowrap;justify-content:space-around;align-items:center"});class ie extends n().Component{constructor(...e){super(...e),ee(this,"state",{}),ee(this,"getPermissionToFork",(()=>new Promise(((e,t)=>{this.setState({requestingFork:!0,approveFork:()=>{this.setState({requestingFork:!1}),e()},refuseFork:()=>{this.setState({requestingFork:!1}),t()}})})))),ee(this,"handleLogin",(e=>{e.preventDefault();const t={base_url:this.props.base_url,site_id:"localhost"===document.location.host.split(":")[0]?"demo.decapcms.org":this.props.siteId,auth_endpoint:this.props.authEndpoint},r=new Y.NetlifyAuthenticator(t),{open_authoring:n=!1,auth_scope:i=""}=this.props.config.backend,o=i||(n?"public_repo":"repo");r.authenticate({provider:"github",scope:o},((e,t)=>{if(!e)return n?this.loginWithOpenAuthoring(t).then((()=>this.props.onLogin(t))):void this.props.onLogin(t);this.setState({loginError:e.toString()})}))})),ee(this,"renderLoginButton",(()=>{const{inProgress:e,t}=this.props;return e||this.state.findingFork?t("auth.loggingIn"):(0,P.jsx)(n().Fragment,null,(0,P.jsx)(te,{type:"github"}),t("auth.loginWithGitHub"))}))}loginWithOpenAuthoring(e){const{backend:t}=this.props;return this.setState({findingFork:!0}),t.authenticateWithFork({userData:e,getPermissionToFork:this.getPermissionToFork}).catch((e=>{throw this.setState({findingFork:!1}),console.error(e),e}))}getAuthenticationPageRenderArgs(){const{requestingFork:e}=this.state;if(e){const{approveFork:e,refuseFork:t}=this.state;return{renderPageContent:({LoginButton:r,TextButton:n,showAbortButton:i})=>(0,P.jsx)(re,null,(0,P.jsx)("p",null,"Open Authoring is enabled: we need to use a fork on your github account. (If a fork already exists, we'll use that.)"),(0,P.jsx)(ne,null,(0,P.jsx)(r,{onClick:e},"Fork the repo"),i&&(0,P.jsx)(n,{onClick:t},"Don't fork the repo")))}}return{renderButtonContent:this.renderLoginButton}}render(){const{inProgress:e,config:t,t:r}=this.props,{loginError:n,requestingFork:i,findingFork:o}=this.state;return(0,P.jsx)(X.AuthenticationPage,Z({onLogin:this.handleLogin,loginDisabled:e||o||i,loginErrorMessage:n,logoUrl:t.logo_url,siteUrl:t.site_url},this.getAuthenticationPageRenderArgs(),{t:r}))}}ee(ie,"propTypes",{onLogin:J().func.isRequired,inProgress:J().bool,base_url:J().string,siteId:J().string,authEndpoint:J().string,config:J().object.isRequired,clearHash:J().func,t:J().func.isRequired});var oe=u(5648),ae=u.n(oe),se=u(6346),ue=u.n(se),ce=u(3465),le=u.n(ce),he=u(6974),fe=u.n(he),pe=u(7613),de=u.n(pe),me=u(8834).lW;const ye="3.7.5",ve=ye,ge="function"==typeof atob,be="function"==typeof btoa,we="function"==typeof me,Re="function"==typeof TextDecoder?new TextDecoder:void 0,Ee="function"==typeof TextEncoder?new TextEncoder:void 0,Oe=Array.prototype.slice.call("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="),ke=(e=>{let t={};return e.forEach(((e,r)=>t[e]=r)),t})(Oe),Se=/^(?:[A-Za-z\d+\/]{4})*?(?:[A-Za-z\d+\/]{2}(?:==)?|[A-Za-z\d+\/]{3}=?)?$/,xe=String.fromCharCode.bind(String),_e="function"==typeof Uint8Array.from?Uint8Array.from.bind(Uint8Array):e=>new Uint8Array(Array.prototype.slice.call(e,0)),Ie=e=>e.replace(/=/g,"").replace(/[+\/]/g,(e=>"+"==e?"-":"_")),Pe=e=>e.replace(/[^A-Za-z0-9\+\/]/g,""),Te=e=>{let t,r,n,i,o="";const a=e.length%3;for(let a=0;a<e.length;){if((r=e.charCodeAt(a++))>255||(n=e.charCodeAt(a++))>255||(i=e.charCodeAt(a++))>255)throw new TypeError("invalid character found");t=r<<16|n<<8|i,o+=Oe[t>>18&63]+Oe[t>>12&63]+Oe[t>>6&63]+Oe[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o},Ae=be?e=>btoa(e):we?e=>me.from(e,"binary").toString("base64"):Te,Ce=we?e=>me.from(e).toString("base64"):e=>{let t=[];for(let r=0,n=e.length;r<n;r+=4096)t.push(xe.apply(null,e.subarray(r,r+4096)));return Ae(t.join(""))},Ne=(e,t=!1)=>t?Ie(Ce(e)):Ce(e),qe=e=>{if(e.length<2)return(t=e.charCodeAt(0))<128?e:t<2048?xe(192|t>>>6)+xe(128|63&t):xe(224|t>>>12&15)+xe(128|t>>>6&63)+xe(128|63&t);var t=65536+1024*(e.charCodeAt(0)-55296)+(e.charCodeAt(1)-56320);return xe(240|t>>>18&7)+xe(128|t>>>12&63)+xe(128|t>>>6&63)+xe(128|63&t)},De=/[\uD800-\uDBFF][\uDC00-\uDFFFF]|[^\x00-\x7F]/g,Fe=e=>e.replace(De,qe),je=we?e=>me.from(e,"utf8").toString("base64"):Ee?e=>Ce(Ee.encode(e)):e=>Ae(Fe(e)),Be=(e,t=!1)=>t?Ie(je(e)):je(e),Le=e=>Be(e,!0),Me=/[\xC0-\xDF][\x80-\xBF]|[\xE0-\xEF][\x80-\xBF]{2}|[\xF0-\xF7][\x80-\xBF]{3}/g,Ue=e=>{switch(e.length){case 4:var t=((7&e.charCodeAt(0))<<18|(63&e.charCodeAt(1))<<12|(63&e.charCodeAt(2))<<6|63&e.charCodeAt(3))-65536;return xe(55296+(t>>>10))+xe(56320+(1023&t));case 3:return xe((15&e.charCodeAt(0))<<12|(63&e.charCodeAt(1))<<6|63&e.charCodeAt(2));default:return xe((31&e.charCodeAt(0))<<6|63&e.charCodeAt(1))}},$e=e=>e.replace(Me,Ue),Qe=e=>{if(e=e.replace(/\s+/g,""),!Se.test(e))throw new TypeError("malformed base64.");e+="==".slice(2-(3&e.length));let t,r,n,i="";for(let o=0;o<e.length;)t=ke[e.charAt(o++)]<<18|ke[e.charAt(o++)]<<12|(r=ke[e.charAt(o++)])<<6|(n=ke[e.charAt(o++)]),i+=64===r?xe(t>>16&255):64===n?xe(t>>16&255,t>>8&255):xe(t>>16&255,t>>8&255,255&t);return i},Ve=ge?e=>atob(Pe(e)):we?e=>me.from(e,"base64").toString("binary"):Qe,ze=we?e=>_e(me.from(e,"base64")):e=>_e(Ve(e).split("").map((e=>e.charCodeAt(0)))),Ke=e=>ze(We(e)),Ge=we?e=>me.from(e,"base64").toString("utf8"):Re?e=>Re.decode(ze(e)):e=>$e(Ve(e)),We=e=>Pe(e.replace(/[-_]/g,(e=>"-"==e?"+":"/"))),He=e=>Ge(We(e)),Je=e=>({value:e,enumerable:!1,writable:!0,configurable:!0}),Ye=function(){const e=(e,t)=>Object.defineProperty(String.prototype,e,Je(t));e("fromBase64",(function(){return He(this)})),e("toBase64",(function(e){return Be(this,e)})),e("toBase64URI",(function(){return Be(this,!0)})),e("toBase64URL",(function(){return Be(this,!0)})),e("toUint8Array",(function(){return Ke(this)}))},Xe=function(){const e=(e,t)=>Object.defineProperty(Uint8Array.prototype,e,Je(t));e("toBase64",(function(e){return Ne(this,e)})),e("toBase64URI",(function(){return Ne(this,!0)})),e("toBase64URL",(function(){return Ne(this,!0)}))},Ze={version:ye,VERSION:ve,atob:Ve,atobPolyfill:Qe,btoa:Ae,btoaPolyfill:Te,fromBase64:He,toBase64:Be,encode:Be,encodeURI:Le,encodeURL:Le,utob:Fe,btou:$e,decode:He,isValid:e=>{if("string"!=typeof e)return!1;const t=e.replace(/\s+/g,"").replace(/={0,2}$/,"");return!/[^\s0-9a-zA-Z\+/]/.test(t)||!/[^\s0-9a-zA-Z\-_]/.test(t)},fromUint8Array:Ne,toUint8Array:Ke,extendString:Ye,extendUint8Array:Xe,extendBuiltins:()=>{Ye(),Xe()}};var et=u(1023);function tt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function rt(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?tt(Object(r),!0).forEach((function(t){nt(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):tt(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function nt(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const it="GitHub",ot=-1;var at=function(e){return e.Error="error",e.Failure="failure",e.Pending="pending",e.Success="success",e}(at||{});let st=function(e){return e.Open="open",e.Closed="closed",e.All="all",e}({});function ut(e,t){return e.labels.some((e=>(0,k.isCMSLabel)(e.name,t)))}function ct(e){return e.reduce(((e,t)=>("removed"===t.status?e.push({sha:null,path:t.filename}):"renamed"===t.status?(e.push({sha:null,path:t.previous_filename}),e.push({sha:t.sha,path:t.filename})):e.push({sha:t.sha,path:t.filename}),e)),[])}let lt=!1;class ht{constructor(e){nt(this,"apiRoot",void 0),nt(this,"token",void 0),nt(this,"tokenKeyword",void 0),nt(this,"branch",void 0),nt(this,"useOpenAuthoring",void 0),nt(this,"repo",void 0),nt(this,"originRepo",void 0),nt(this,"repoOwner",void 0),nt(this,"repoName",void 0),nt(this,"originRepoOwner",void 0),nt(this,"originRepoName",void 0),nt(this,"repoURL",void 0),nt(this,"originRepoURL",void 0),nt(this,"mergeMethod",void 0),nt(this,"initialWorkflowStatus",void 0),nt(this,"cmsLabelPrefix",void 0),nt(this,"baseUrl",void 0),nt(this,"getUser",void 0),nt(this,"_userPromise",void 0),nt(this,"_metadataSemaphore",void 0),nt(this,"commitAuthor",void 0),nt(this,"filterOpenAuthoringBranches",(async e=>{try{const t=await this.getBranchPullRequest(e),{state:r,merged_at:n}=t;return t.number!==ot&&r===st.Closed&&n?(await this.deleteBranch(e),{branch:e,filter:!1}):{branch:e,filter:!0}}catch(t){return{branch:e,filter:!1}}})),this.apiRoot=e.apiRoot||"https://api.github.com",this.token=e.token||"",this.tokenKeyword=e.tokenKeyword||"token",this.branch=e.branch||"master",this.useOpenAuthoring=e.useOpenAuthoring,this.repo=e.repo||"",this.originRepo=e.originRepo||this.repo,this.repoURL=`/repos/${this.repo}`,this.originRepoURL=`/repos/${this.originRepo}`;const[t,r]=[this.repo.split("/"),this.originRepo.split("/")];this.repoOwner=t[0],this.repoName=t[1],this.originRepoOwner=r[0],this.originRepoName=r[1],this.mergeMethod=e.squashMerges?"squash":"merge",this.cmsLabelPrefix=e.cmsLabelPrefix,this.initialWorkflowStatus=e.initialWorkflowStatus,this.baseUrl=e.baseUrl,this.getUser=e.getUser}user(){return this._userPromise||(this._userPromise=this.getUser({token:this.token})),this._userPromise}async hasWriteAccess(){try{const e=await this.request(this.repoURL);return this.repoOwner=e.owner.login,e.permissions.push}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}reset(){}requestHeaders(e={}){const t=rt({"Content-Type":"application/json; charset=utf-8"},e);return this.token?(t.Authorization=`${this.tokenKeyword} ${this.token}`,Promise.resolve(t)):Promise.resolve(t)}parseJsonResponse(e){return e.json().then((t=>e.ok?t:Promise.reject(t)))}urlFor(e,t){const r=[];if(t.params)for(const e in t.params)r.push(`${e}=${encodeURIComponent(t.params[e])}`);return r.length&&(e+=`?${r.join("&")}`),this.apiRoot+e}parseResponse(e){const t=e.headers.get("Content-Type");return t&&t.match(/json/)?this.parseJsonResponse(e):e.text().then((t=>e.ok?t:Promise.reject(t)))}handleRequestError(e,t){throw new k.APIError(e.message,t,it)}buildRequest(e){return e}async request(e,t={},r=(e=>this.parseResponse(e))){t=rt({cache:"no-cache"},t);const n=await this.requestHeaders(t.headers||{}),i=this.urlFor(e,t);let o=500;try{const e=k.unsentRequest.fromFetchArguments(i,rt(rt({},t),{},{headers:n})),a=await(0,k.requestWithBackoff)(this,e);return o=a.status,await r(a)}catch(e){return this.handleRequestError(e,o)}}nextUrlProcessor(){return e=>e}async requestAllPages(e,t={}){t=rt({cache:"no-cache"},t);const r=await this.requestHeaders(t.headers||{}),n=this.urlFor(e,t),i=await(0,k.getAllResponses)(n,rt(rt({},t),{},{headers:r}),"next",this.nextUrlProcessor()),o=await Promise.all(i.map((e=>this.parseResponse(e))));return[].concat(...o)}generateContentKey(e,t){const r=(0,k.generateContentKey)(e,t);return this.useOpenAuthoring?`${this.repo}/${r}`:r}parseContentKey(e){return this.useOpenAuthoring?(0,k.parseContentKey)(e.slice(this.repo.length+1)):(0,k.parseContentKey)(e)}checkMetadataRef(){return this.request(`${this.repoURL}/git/refs/meta/_decap_cms`).then((e=>e.object)).catch((()=>this.uploadBlob({raw:"# Decap CMS\n\nThis tree is used by the Decap CMS to store metadata information for specific files and branches."}).then((e=>this.request(`${this.repoURL}/git/trees`,{method:"POST",body:JSON.stringify({tree:[{path:"README.md",mode:"100644",type:"blob",sha:e.sha}]})}))).then((e=>this.commit("First Commit",e))).then((e=>this.createRef("meta","_decap_cms",e.sha))).then((e=>e.object))))}async storeMetadata(e,t){return this._metadataSemaphore||(this._metadataSemaphore=o()(1)),new Promise(((r,n)=>{var i;return null===(i=this._metadataSemaphore)||void 0===i?void 0:i.take((async()=>{try{var i;const n=await this.checkMetadataRef(),o={path:`${e}.json`,raw:JSON.stringify(t)};await this.uploadBlob(o);const a=await this.updateTree(n.sha,[o]),{sha:s}=await this.commit(`Updating “${e}” metadata`,a);await this.patchRef("meta","_decap_cms",s),await k.localForage.setItem(`gh.meta.${e}`,{expires:Date.now()+3e5,data:t}),null===(i=this._metadataSemaphore)||void 0===i||i.leave(),r()}catch(e){n(e)}}))}))}deleteMetadata(e){return this._metadataSemaphore||(this._metadataSemaphore=o()(1)),new Promise((t=>{var r;return null===(r=this._metadataSemaphore)||void 0===r?void 0:r.take((async()=>{try{var r;const n=await this.checkMetadataRef(),i={path:`${e}.json`,sha:null},o=await this.updateTree(n.sha,[i]),{sha:a}=await this.commit(`Deleting “${e}” metadata`,o);await this.patchRef("meta","_decap_cms",a),null===(r=this._metadataSemaphore)||void 0===r||r.leave(),t()}catch(e){var n;null===(n=this._metadataSemaphore)||void 0===n||n.leave(),t()}}))}))}async retrieveMetadataOld(e){console.log("%c Checking for MetaData files","line-height: 30px;text-align: center;font-weight: bold");const t={params:{ref:"refs/meta/_decap_cms"},headers:{Accept:"application/vnd.github.v3.raw"}};function r(t){throw"Not Found"===t.message&&console.log("%c %s does not have metadata","line-height: 30px;text-align: center;font-weight: bold",e),t}if(!this.useOpenAuthoring)return await this.request(`${this.repoURL}/contents/${e}.json`,t).then((e=>JSON.parse(e))).catch(r);const[n,i]=e.split("/");return this.request(`/repos/${n}/${i}/contents/${e}.json`,t).then((e=>JSON.parse(e))).catch(r)}async getPullRequests(e,t,r){return(await this.requestAllPages(`${this.originRepoURL}/pulls`,{params:rt(rt({},e?{head:await this.getHeadReference(e)}:{}),{},{base:this.branch,state:t,per_page:100})})).filter((e=>e.head.ref.startsWith(`${k.CMS_BRANCH_PREFIX}/`)&&r(e)))}async getOpenAuthoringPullRequest(e,t){const r=await this.getBranch(e).catch((()=>{throw new k.EditorialWorkflowError("content is not under editorial workflow",!0)})),n=t.filter((e=>e.head.sha===r.commit.sha))[0];if(n){n.labels=n.labels.filter((e=>!(0,k.isCMSLabel)(e.name,this.cmsLabelPrefix)));const e=n.state===st.Closed?{name:(0,k.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}:{name:(0,k.statusToLabel)("pending_review",this.cmsLabelPrefix)};return n.labels.push(e),n}try{return{head:{sha:r.commit.sha},number:ot,labels:[{name:(0,k.statusToLabel)(this.initialWorkflowStatus,this.cmsLabelPrefix)}],state:st.Open}}catch(e){throw new k.EditorialWorkflowError("content is not under editorial workflow",!0)}}async getBranchPullRequest(e){if(this.useOpenAuthoring){const t=await this.getPullRequests(e,st.All,(()=>!0));return this.getOpenAuthoringPullRequest(e,t)}{const t=await this.getPullRequests(e,st.Open,(e=>ut(e,this.cmsLabelPrefix)));if(t.length<=0)throw new k.EditorialWorkflowError("content is not under editorial workflow",!0);return t[0]}}async getPullRequestCommits(e){if(e===ot)return[];try{return await this.request(`${this.originRepoURL}/pulls/${e}/commits`)}catch(e){return console.log(e),[]}}async getPullRequestAuthor(e){var t;if(null!==(t=e.user)&&void 0!==t&&t.login)try{const e=await this.user();return e.name||e.login}catch{return}}async retrieveUnpublishedEntryData(e){const{collection:t,slug:r}=this.parseContentKey(e),n=(0,k.branchFromContentKey)(e),i=await this.getBranchPullRequest(n),[{files:o},a]=await Promise.all([this.getDifferences(this.branch,i.head.sha),this.getPullRequestAuthor(i)]),s=await Promise.all(o.map((e=>this.diffFromFile(e)))),u=i.labels.find((e=>(0,k.isCMSLabel)(e.name,this.cmsLabelPrefix))),c=(0,k.labelToStatus)(u.name,this.cmsLabelPrefix),l=i.updated_at;return{collection:t,slug:r,status:c,diffs:s.map((e=>({path:e.path,newFile:e.newFile,id:e.sha}))),updatedAt:l,pullRequestAuthor:a}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await this.fetchBlobContent({sha:t,repoURL:n,parseText:i})}async readFileMetadata(e,t){const r=await(0,k.readFileMetadata)(t,(async()=>{try{const t=await this.request(`${this.originRepoURL}/commits`,{params:{path:e,sha:this.branch}}),{commit:r}=t[0];return{author:r.author.name||r.author.email,updatedOn:r.author.date}}catch(e){return{author:"",updatedOn:""}}}),k.localForage);return r}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){const n=await this.request(`${t}/git/blobs/${e}`,{cache:"force-cache"});if(r)return Ze.decode(n.content);{const e=Ze.atob(n.content),t=new Uint8Array(e.length);for(let r=0;r<e.length;r++)t[r]=e.charCodeAt(r);return new Blob([t])}}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const i=ae()(e,"/");try{return(await this.request(`${t}/git/trees/${r}:${i}`,{params:n>1?{recursive:1}:{}})).tree.filter((e=>"blob"===e.type&&e.path.split("/").length<=n)).map((e=>({type:e.type,id:e.sha,name:(0,k.basename)(e.path),path:`${i}/${e.path}`,size:e.size})))}catch(e){if(e&&404===e.status)return console.log("This 404 was expected and handled appropriately."),[];throw e}}async migrateToVersion1(e,t){const r=e.head.ref.slice(4),n=`${t.collection}/${r}`,i=`cms/${n}`;await this.getBranch(i).catch((()=>{}))||await this.createBranch(i,e.head.sha);const o=(await this.getPullRequests(i,st.All,(()=>!0)))[0]||await this.createPR(e.title,i),a=rt(rt({},t),{},{pr:{number:o.number,head:o.head.sha},branch:i,version:"1"});return await this.storeMetadata(n,a),await this.closePR(e.number),await this.deleteBranch(e.head.ref),await this.deleteMetadata(r),{metadata:a,pullRequest:o}}async migrateToPullRequestLabels(e,t){await this.setPullRequestStatus(e,t.status);const r=e.head.ref.slice(4);await this.deleteMetadata(r)}async migratePullRequest(e,t){const{number:r}=e;console.log(`Migrating Pull Request '${r}' (${t})`);const n=(0,k.contentKeyFromBranch)(e.head.ref);let i=await this.retrieveMetadataOld(n).catch((()=>{}));if(!i)return void console.log(`Skipped migrating Pull Request '${r}' (${t})`);let o=r;if(!i.version){console.log(`Migrating Pull Request '${r}' to version 1`);try{({metadata:i,pullRequest:e}=await this.migrateToVersion1(e,i))}catch(e){return console.log(`Failed to migrate Pull Request '${r}' to version 1. See error below.`),void console.error(e)}o=e.number,console.log(`Done migrating Pull Request '${r}' to version 1. New pull request '${o}' created.`)}"1"===i.version&&(console.log(`Migrating Pull Request '${o}' to labels`),await this.migrateToPullRequestLabels(e,i),console.log(`Done migrating Pull Request '${o}' to labels`)),console.log(`Done migrating Pull Request '${r===o?o:`${r} => ${o}`}'`)}async getOpenAuthoringBranches(){return await this.requestAllPages(`${this.repoURL}/git/refs/heads/cms/${this.repo}`).catch((()=>[]))}async listUnpublishedBranches(){let e;if(console.log("%c Checking for Unpublished entries","line-height: 30px;text-align: center;font-weight: bold"),this.useOpenAuthoring){e=(await this.getOpenAuthoringBranches()).map((e=>e.ref.slice(11)));const t=await Promise.all(e.map((e=>this.filterOpenAuthoringBranches(e))));e=t.filter((e=>e.filter)).map((e=>e.branch))}else{const t=await this.getPullRequests(void 0,st.Open,(e=>!e.head.repo.fork&&function(e,t){return e.labels.every((e=>!(0,k.isCMSLabel)(e.name,t)))}(e,this.cmsLabelPrefix)));let r=0;for(const e of t)lt||(lt=!0,alert(E`
3
3
  Decap CMS is adding labels to ${t.length} of your Editorial Workflow
4
4
  entries. The "Workflow" tab will be unavailable during this migration. You may use other
5
5
  areas of the CMS during this time. Note that closing the CMS will pause the migration.
@@ -300,7 +300,7 @@
300
300
  }
301
301
  }
302
302
  ${Fo}
303
- `;function ca(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function la(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(r),!0).forEach((function(t){ha(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ca(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ha(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fa="no-cache",pa="cache-first",da=new Xn({introspectionQueryResultData:Si()});function ma(e){return la(la({},e),{},{labels:e.labels.nodes,head:{ref:e.headRefName,sha:e.headRefOid,repo:{fork:e.repository.isFork}},base:{ref:e.baseRefName,sha:e.baseRefOid}})}class ya extends ht{constructor(e){super(e),ha(this,"client",void 0),this.client=this.getApolloClient()}getApolloClient(){const e=(r=(e,{headers:t})=>({headers:la(la({"Content-Type":"application/json; charset=utf-8"},t),{},{authorization:this.token?`${this.tokenKeyword} ${this.token}`:""})}),new $r((function(e,t){var n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,[]);return new Tr((function(i){var o;return Promise.resolve(n).then((function(t){return r(t,e.getContext())})).then(e.setContext).then((function(){o=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})})).catch(i.error.bind(i)),function(){o&&o.unsubscribe()}}))}))),t=Oi({uri:`${this.apiRoot}/graphql`});var r;return new cn({link:e.concat(t),cache:new mi({fragmentMatcher:da}),defaultOptions:{watchQuery:{fetchPolicy:fa,errorPolicy:"ignore"},query:{fetchPolicy:fa,errorPolicy:"all"}}})}reset(){return this.client.resetStore()}async getRepository(e,t){const{data:r}=await this.query({query:Ko,variables:{owner:e,name:t},fetchPolicy:pa});return r.repository}query(e){return this.client.query(e).catch((e=>{throw new k.APIError(e.message,500,"GitHub")}))}async mutate(e){try{return await this.client.mutate(e)}catch(u){const c=u.graphQLErrors;if(Array.isArray(c)&&c.some((e=>"Ref cannot be created."===e.message))){var t,r;const n=(null==e||null===(t=e.variables)||void 0===t||null===(r=t.createRefInput)||void 0===r?void 0:r.name)||"",i=s()(n,"refs/heads/");i&&await(0,k.throwOnConflictingBranches)(i,(e=>this.getBranch(e)),it)}else if(Array.isArray(c)&&c.some((e=>new RegExp(`A ref named "refs/heads/${k.CMS_BRANCH_PREFIX}/.+?" already exists in the repository.`).test(e.message)))){var n,i,o,a;const t=(null==e||null===(n=e.variables)||void 0===n||null===(i=n.createRefInput)||void 0===i?void 0:i.name)||"",r=(null==e||null===(o=e.variables)||void 0===o||null===(a=o.createRefInput)||void 0===a?void 0:a.oid)||"",u=s()(t,"refs/heads/");if(u&&u.startsWith(`${k.CMS_BRANCH_PREFIX}/`)&&r)try{return await this.backupBranch(u),await this.deleteBranch(u),await this.client.mutate(e)}catch(e){console.log(e)}}throw new k.APIError(u.message,500,"GitHub")}}async hasWriteAccess(){const{repoOwner:e,repoName:t}=this;try{const{data:r}=await this.query({query:Bo,variables:{owner:e,name:t},fetchPolicy:pa}),{viewerPermission:n}=r.repository;return["ADMIN","MAINTAIN","WRITE"].includes(n)}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}async user(){const{data:e}=await this.query({query:Lo,fetchPolicy:pa});return e.viewer}async retrieveBlobObject(e,t,r,n={}){const{data:i}=await this.query(la({query:Mo,variables:{owner:e,name:t,expression:r}},n));if(i.repository.object){const{is_binary:e,text:t}=i.repository.object;return{isNull:!1,isBinary:e,text:t}}return{isNull:!0}}getOwnerAndNameFromRepoUrl(e){let{repoOwner:t,repoName:r}=this;return e===this.originRepoURL&&({originRepoOwner:t,originRepoName:r}=this),{owner:t,name:r}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await(0,k.readFile)(t,(()=>this.fetchBlobContent({sha:t,repoURL:n,parseText:i})),k.localForage,i)}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){if(!r)return super.fetchBlobContent({sha:e,repoURL:t,parseText:r});const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{isNull:o,isBinary:a,text:s}=await this.retrieveBlobObject(n,i,e,{fetchPolicy:pa});if(o)throw new k.APIError("Not Found",404,"GitHub");return a?super.fetchBlobContent({sha:e,repoURL:t,parseText:r}):s}async getPullRequestAuthor(e){const t=e.user;return(null==t?void 0:t.name)||(null==t?void 0:t.login)}async getPullRequests(e,t,r){const{originRepoOwner:n,originRepoName:i}=this;let o;o=t===st.Open?["OPEN"]:t===st.Closed?["CLOSED","MERGED"]:["OPEN","CLOSED","MERGED"];const{data:a}=await this.query({query:Ho,variables:la(la({owner:n,name:i},e?{head:e}:{}),{},{states:o})}),{pullRequests:s}=a.repository;return s.nodes.map(ma).filter((e=>e.head.ref.startsWith(`${k.CMS_BRANCH_PREFIX}/`)&&r(e)))}async getOpenAuthoringBranches(){const{repoOwner:e,repoName:t}=this,{data:r}=await this.query({query:zo,variables:{owner:e,name:t,refPrefix:`refs/heads/cms/${this.repo}/`}});return r.repository.refs.nodes.map((({name:e,prefix:t})=>({ref:`${t}${e}`})))}async getStatuses(e,t){const r=this.generateContentKey(e,t),n=(0,k.branchFromContentKey)(r),i=(await this.getBranchPullRequest(n)).head.sha,{originRepoOwner:o,originRepoName:a}=this,{data:s}=await this.query({query:Uo,variables:{owner:o,name:a,sha:i}});if(s.repository.object){const{status:e}=s.repository.object,{contexts:t}=e||{contexts:[]};return t}return[]}getAllFiles(e,t){return e.reduce(((e,r)=>{if("tree"===r.type){var n;const i=(null===(n=r.object)||void 0===n?void 0:n.entries)||[];return[...e,...this.getAllFiles(i,`${t}/${r.name}`)]}return"blob"===r.type?[...e,{name:r.name,type:r.type,id:r.sha,path:`${t}/${r.name}`,size:r.blob?r.blob.size:0}]:e}),[])}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const{owner:i,name:o}=this.getOwnerAndNameFromRepoUrl(t),a=ae()(e,"/"),{data:s}=await this.query({query:$o(n),variables:{owner:i,name:o,expression:`${r}:${a}`}});return s.repository.object?this.getAllFiles(s.repository.object.entries,a):[]}getBranchQualifiedName(e){return`refs/heads/${e}`}getBranchQuery(e,t,r){return{query:Vo,variables:{owner:t,name:r,qualifiedName:this.getBranchQualifiedName(e)}}}async getDefaultBranch(){const{data:e}=await this.query(la({},this.getBranchQuery(this.branch,this.originRepoOwner,this.originRepoName)));return e.repository.branch}async getBranch(e){const{data:t}=await this.query(la(la({},this.getBranchQuery(e,this.repoOwner,this.repoName)),{},{fetchPolicy:pa}));if(!t.repository.branch)throw new k.APIError("Branch not found",404,it);return t.repository.branch}async patchRef(e,t,r,n={}){if("heads"!==e)return super.patchRef(e,t,r,n);const i=n.force||!1,o=await this.getBranch(t),{data:a}=await this.mutate({mutation:Xo,variables:{input:{oid:r,refId:o.id,force:i}}});return a.updateRef.branch}async deleteBranch(e){const t=await this.getBranch(e),{data:r}=await this.mutate({mutation:ea,variables:{deleteRefInput:{refId:t.id}},update:e=>e.data.delete(fi(t))});return r.deleteRef}getPullRequestQuery(e){const{originRepoOwner:t,originRepoName:r}=this;return{query:Wo,variables:{owner:t,name:r,number:e}}}async getPullRequest(e){const{data:t}=await this.query(la(la({},this.getPullRequestQuery(e)),{},{fetchPolicy:pa})),r="OPEN"===t.repository.pullRequest.state?st.Open:st.Closed;return la(la({},t.repository.pullRequest),{},{state:r})}getPullRequestAndBranchQuery(e,t){const{repoOwner:r,repoName:n}=this,{originRepoOwner:i,originRepoName:o}=this;return{query:Jo,variables:{owner:r,name:n,originRepoOwner:i,originRepoName:o,number:t,qualifiedName:this.getBranchQualifiedName(e)}}}async getPullRequestAndBranch(e,t){const{data:r}=await this.query(la(la({},this.getPullRequestAndBranchQuery(e,t)),{},{fetchPolicy:pa})),{repository:n,origin:i}=r;return{branch:n.branch,pullRequest:i.pullRequest}}async openPR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:ua,variables:{reopenPullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.reopenPullRequest,n={repository:la(la({},r.repository),{},{pullRequest:r})};e.writeQuery(la(la({},this.getPullRequestQuery(r.number)),{},{data:n}))}});return r.reopenPullRequest}async closePR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:ra,variables:{closePullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.closePullRequest,n={repository:la(la({},r.repository),{},{pullRequest:r})};e.writeQuery(la(la({},this.getPullRequestQuery(r.number)),{},{data:n}))}});return r.closePullRequest}async deleteUnpublishedEntry(e,t){try{const r=this.generateContentKey(e,t),n=(0,k.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);if(i.number!==ot){const{branch:e,pullRequest:t}=await this.getPullRequestAndBranch(n,i.number),{data:r}=await this.mutate({mutation:na,variables:{deleteRefInput:{refId:e.id},closePullRequestInput:{pullRequestId:t.id}},update:r=>{r.data.delete(fi(e)),r.data.delete(fi(t))}});return r.closePullRequest}return await this.deleteBranch(n)}catch(e){const{graphQLErrors:t}=e;if(t&&t.length>0){const e=t.some((e=>"NOT_FOUND"===e.type));if(e)return}throw e}}async createPR(e,t){const[r,n]=await Promise.all([this.getRepository(this.originRepoOwner,this.originRepoName),this.useOpenAuthoring?`${(await this.user()).login}:${t}`:t]),{data:i}=await this.mutate({mutation:oa,variables:{createPullRequestInput:{baseRefName:this.branch,body:k.DEFAULT_PR_BODY,title:e,headRefName:n,repositoryId:r.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.createPullRequest,n={repository:la(la({},r.repository),{},{pullRequest:r})};e.writeQuery(la(la({},this.getPullRequestQuery(r.number)),{},{data:n}))}}),{pullRequest:o}=i.createPullRequest;return la(la({},o),{},{head:{sha:o.headRefOid}})}async createBranch(e,t){const r=this.repoOwner,n=this.repoName,i=await this.getRepository(r,n),{data:o}=await this.mutate({mutation:aa,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:i.id}},update:(t,{data:i})=>{const{branch:o}=i.createRef,a={repository:la(la({},o.repository),{},{branch:o})};t.writeQuery(la(la({},this.getBranchQuery(e,r,n)),{},{data:a}))}}),{branch:a}=o.createRef;return la(la({},a),{},{ref:`${a.prefix}${a.name}`})}async createBranchAndPullRequest(e,t,r){const n=this.originRepoOwner,i=this.originRepoName,o=await this.getRepository(n,i),{data:a}=await this.mutate({mutation:sa,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:o.id},createPullRequestInput:{baseRefName:this.branch,body:k.DEFAULT_PR_BODY,title:r,headRefName:e,repositoryId:o.id}},update:(t,{data:r})=>{const{branch:o}=r.createRef,{pullRequest:a}=r.createPullRequest,s={repository:la(la({},o.repository),{},{branch:o})},u={repository:la(la({},a.repository),{},{branch:o}),origin:la(la({},a.repository),{},{pullRequest:a})};t.writeQuery(la(la({},this.getBranchQuery(e,n,i)),{},{data:s})),t.writeQuery(la(la({},this.getPullRequestAndBranchQuery(e,a.number)),{},{data:u}))}}),{pullRequest:s}=a.createPullRequest;return ma(s)}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{data:o}=await this.query({query:Yo,variables:{owner:n,name:i,expression:`${r}:${e}`}});if(o.repository.file)return o.repository.file.sha;throw new k.APIError("Not Found",404,it)}}function va(){return va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},va.apply(this,arguments)}function ga(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ba(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(r),!0).forEach((function(t){wa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ga(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wa(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const{fetchWithTimeout:Ra}=k.unsentRequest,Ea="https://www.githubstatus.com",Oa=`${Ea}/api/v2/components.json`,ka=["API Requests","Issues, Pull Requests, Projects"],Sa={GitHubBackend:class{constructor(e,t={}){var r;if(wa(this,"lock",void 0),wa(this,"api",void 0),wa(this,"options",void 0),wa(this,"originRepo",void 0),wa(this,"repo",void 0),wa(this,"openAuthoringEnabled",void 0),wa(this,"useOpenAuthoring",void 0),wa(this,"alwaysForkEnabled",void 0),wa(this,"branch",void 0),wa(this,"apiRoot",void 0),wa(this,"mediaFolder",void 0),wa(this,"previewContext",void 0),wa(this,"token",void 0),wa(this,"tokenKeyword",void 0),wa(this,"squashMerges",void 0),wa(this,"cmsLabelPrefix",void 0),wa(this,"useGraphql",void 0),wa(this,"baseUrl",void 0),wa(this,"bypassWriteAccessCheckForAppTokens",!1),wa(this,"_currentUserPromise",void 0),wa(this,"_userIsOriginMaintainerPromises",void 0),wa(this,"_mediaDisplayURLSem",void 0),wa(this,"getCursorAndFiles",((e,t)=>{const r=e.length,n=Math.ceil(e.length/20),i=[];return t>1&&(i.push("prev"),i.push("first")),t<n&&(i.push("next"),i.push("last")),{cursor:k.Cursor.create({actions:i,meta:{page:t,count:r,pageSize:20,pageCount:n},data:{files:e}}),files:e.slice(20*(t-1),20*t)}})),this.options=ba({proxied:!1,API:null,initialWorkflowStatus:""},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The GitHub backend needs a "repo" in the backend configuration.');if(this.api=this.options.API||null,this.openAuthoringEnabled=e.backend.open_authoring||!1,this.openAuthoringEnabled){if(!this.options.useWorkflow)throw new Error("backend.open_authoring is true but publish_mode is not set to editorial_workflow.");this.originRepo=e.backend.repo||""}else this.repo=this.originRepo=e.backend.repo||"";this.alwaysForkEnabled=e.backend.always_fork||!1,this.branch=(null===(r=e.backend.branch)||void 0===r?void 0:r.trim())||"master",this.apiRoot=e.backend.api_root||"https://api.github.com",this.token="",this.tokenKeyword="token",this.baseUrl=e.backend.base_url,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.useGraphql=e.backend.use_graphql||!1,this.mediaFolder=e.media_folder,this.previewContext=e.backend.preview_context||"",this.lock=(0,k.asyncLock)()}isGitBackend(){return!0}async status(){const e=await Ra(Oa).then((e=>e.json())).then((e=>e.components.filter((e=>ka.includes(e.name))).every((e=>"operational"===e.status)))).catch((e=>(console.warn("Failed getting GitHub status",e),!0)));let t=!1;var r,n;return e&&(t=await(null===(r=this.api)||void 0===r?void 0:r.getUser({token:null!==(n=this.token)&&void 0!==n?n:""}).then((e=>!!e)).catch((e=>(console.warn("Failed getting GitHub user",e),!1))))||!1),{auth:{status:t},api:{status:e,statusPage:Ea}}}authComponent(){const e=e=>(0,P.jsx)(ie,va({},e,{backend:this}));return e.displayName="AuthenticationPage",e}restoreUser(e){return this.openAuthoringEnabled?this.authenticateWithFork({userData:e,getPermissionToFork:()=>!0}).then((()=>this.authenticate(e))):this.authenticate(e)}async pollUntilForkExists({repo:e,token:t}){let r=!1;for(;!r;)r=await Ra(`${this.apiRoot}/repos/${e}`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then((()=>!0)).catch((e=>e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),!1):Promise.reject(e))),r||await new Promise((e=>setTimeout(e,250)));return Promise.resolve()}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=Ra(`${this.apiRoot}/user`,{headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then((e=>e.json()))),this._currentUserPromise}async userIsOriginMaintainer({username:e,token:t}){const r=e||(await this.currentUser({token:t})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=Ra(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then((e=>e.json())).then((({permission:e})=>"admin"===e||"write"===e))),this._userIsOriginMaintainerPromises[r]}async forkExists({token:e}){try{const t=await this.currentUser({token:e}),r=this.originRepo.split("/")[1],n=await Ra(`${this.apiRoot}/repos/${t.login}/${r}`,{method:"GET",headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then((e=>e.json()));return!0===n.fork&&n.parent&&n.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async authenticateWithFork({userData:e,getPermissionToFork:t}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const r=e.token;if(!this.alwaysForkEnabled&&await this.userIsOriginMaintainer({token:r}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();const n=await this.currentUser({token:r}),i=this.originRepo.split("/")[1];if(this.repo=`${n.login}/${i}`,this.useOpenAuthoring=!0,await this.forkExists({token:r}))return Ra(`${this.apiRoot}/repos/${this.repo}/merge-upstream`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`},body:JSON.stringify({branch:this.branch})});{await t();const e=await Ra(`${this.apiRoot}/repos/${this.originRepo}/forks`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`}}).then((e=>e.json()));return this.pollUntilForkExists({repo:e.full_name,token:r})}}async authenticate(e){this.token=e.token;const t=this.useGraphql?ya:ht;this.api=new t({token:this.token,tokenKeyword:this.tokenKeyword,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,useOpenAuthoring:this.useOpenAuthoring,initialWorkflowStatus:this.options.initialWorkflowStatus,baseUrl:this.baseUrl,getUser:this.currentUser});const r=await this.api.user();if(!await this.api.hasWriteAccess().catch((e=>{throw e.message=O`
303
+ `;function ca(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function la(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ca(Object(r),!0).forEach((function(t){ha(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ca(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function ha(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const fa="no-cache",pa="cache-first",da=new Xn({introspectionQueryResultData:Si()});function ma(e){return la(la({},e),{},{labels:e.labels.nodes,head:{ref:e.headRefName,sha:e.headRefOid,repo:{fork:e.repository.isFork}},base:{ref:e.baseRefName,sha:e.baseRefOid}})}class ya extends ht{constructor(e){super(e),ha(this,"client",void 0),this.client=this.getApolloClient()}getApolloClient(){const e=(r=(e,{headers:t})=>({headers:la(la({"Content-Type":"application/json; charset=utf-8"},t),{},{authorization:this.token?`${this.tokenKeyword} ${this.token}`:""})}),new $r((function(e,t){var n=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i<n.length;i++)t.indexOf(n[i])<0&&Object.prototype.propertyIsEnumerable.call(e,n[i])&&(r[n[i]]=e[n[i]])}return r}(e,[]);return new Tr((function(i){var o;return Promise.resolve(n).then((function(t){return r(t,e.getContext())})).then(e.setContext).then((function(){o=t(e).subscribe({next:i.next.bind(i),error:i.error.bind(i),complete:i.complete.bind(i)})})).catch(i.error.bind(i)),function(){o&&o.unsubscribe()}}))}))),t=Oi({uri:`${this.apiRoot}/graphql`});var r;return new cn({link:e.concat(t),cache:new mi({fragmentMatcher:da}),defaultOptions:{watchQuery:{fetchPolicy:fa,errorPolicy:"ignore"},query:{fetchPolicy:fa,errorPolicy:"all"}}})}reset(){return this.client.resetStore()}async getRepository(e,t){const{data:r}=await this.query({query:Ko,variables:{owner:e,name:t},fetchPolicy:pa});return r.repository}query(e){return this.client.query(e).catch((e=>{throw new k.APIError(e.message,500,"GitHub")}))}async mutate(e){try{return await this.client.mutate(e)}catch(u){const c=u.graphQLErrors;if(Array.isArray(c)&&c.some((e=>"Ref cannot be created."===e.message))){var t,r;const n=(null==e||null===(t=e.variables)||void 0===t||null===(r=t.createRefInput)||void 0===r?void 0:r.name)||"",i=s()(n,"refs/heads/");i&&await(0,k.throwOnConflictingBranches)(i,(e=>this.getBranch(e)),it)}else if(Array.isArray(c)&&c.some((e=>new RegExp(`A ref named "refs/heads/${k.CMS_BRANCH_PREFIX}/.+?" already exists in the repository.`).test(e.message)))){var n,i,o,a;const t=(null==e||null===(n=e.variables)||void 0===n||null===(i=n.createRefInput)||void 0===i?void 0:i.name)||"",r=(null==e||null===(o=e.variables)||void 0===o||null===(a=o.createRefInput)||void 0===a?void 0:a.oid)||"",u=s()(t,"refs/heads/");if(u&&u.startsWith(`${k.CMS_BRANCH_PREFIX}/`)&&r)try{return await this.backupBranch(u),await this.deleteBranch(u),await this.client.mutate(e)}catch(e){console.log(e)}}throw new k.APIError(u.message,500,"GitHub")}}async hasWriteAccess(){const{repoOwner:e,repoName:t}=this;try{const{data:r}=await this.query({query:Bo,variables:{owner:e,name:t},fetchPolicy:pa}),{viewerPermission:n}=r.repository;return["ADMIN","MAINTAIN","WRITE"].includes(n)}catch(e){throw console.error("Problem fetching repo data from GitHub"),e}}async user(){const{data:e}=await this.query({query:Lo,fetchPolicy:pa});return e.viewer}async retrieveBlobObject(e,t,r,n={}){const{data:i}=await this.query(la({query:Mo,variables:{owner:e,name:t,expression:r}},n));if(i.repository.object){const{is_binary:e,text:t}=i.repository.object;return{isNull:!1,isBinary:e,text:t}}return{isNull:!0}}getOwnerAndNameFromRepoUrl(e){let{repoOwner:t,repoName:r}=this;return e===this.originRepoURL&&({originRepoOwner:t,originRepoName:r}=this),{owner:t,name:r}}async readFile(e,t,{branch:r=this.branch,repoURL:n=this.repoURL,parseText:i=!0}={}){return t||(t=await this.getFileSha(e,{repoURL:n,branch:r})),await(0,k.readFile)(t,(()=>this.fetchBlobContent({sha:t,repoURL:n,parseText:i})),k.localForage,i)}async fetchBlobContent({sha:e,repoURL:t,parseText:r}){if(!r)return super.fetchBlobContent({sha:e,repoURL:t,parseText:r});const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{isNull:o,isBinary:a,text:s}=await this.retrieveBlobObject(n,i,e,{fetchPolicy:pa});if(o)throw new k.APIError("Not Found",404,"GitHub");return a?super.fetchBlobContent({sha:e,repoURL:t,parseText:r}):s}async getPullRequestAuthor(e){const t=e.user;return(null==t?void 0:t.name)||(null==t?void 0:t.login)}async getPullRequests(e,t,r){const{originRepoOwner:n,originRepoName:i}=this;let o;o=t===st.Open?["OPEN"]:t===st.Closed?["CLOSED","MERGED"]:["OPEN","CLOSED","MERGED"];const{data:a}=await this.query({query:Ho,variables:la(la({owner:n,name:i},e?{head:e}:{}),{},{states:o})}),{pullRequests:s}=a.repository;return s.nodes.map(ma).filter((e=>e.head.ref.startsWith(`${k.CMS_BRANCH_PREFIX}/`)&&r(e)))}async getOpenAuthoringBranches(){const{repoOwner:e,repoName:t}=this,{data:r}=await this.query({query:zo,variables:{owner:e,name:t,refPrefix:`refs/heads/cms/${this.repo}/`}});return r.repository.refs.nodes.map((({name:e,prefix:t})=>({ref:`${t}${e}`})))}async getStatuses(e,t){const r=this.generateContentKey(e,t),n=(0,k.branchFromContentKey)(r),i=(await this.getBranchPullRequest(n)).head.sha,{originRepoOwner:o,originRepoName:a}=this,{data:s}=await this.query({query:Uo,variables:{owner:o,name:a,sha:i}});if(s.repository.object){const{status:e}=s.repository.object,{contexts:t}=e||{contexts:[]};return t}return[]}getAllFiles(e,t){return e.reduce(((e,r)=>{if("tree"===r.type){var n;const i=(null===(n=r.object)||void 0===n?void 0:n.entries)||[];return[...e,...this.getAllFiles(i,`${t}/${r.name}`)]}return"blob"===r.type?[...e,{name:r.name,type:r.type,id:r.sha,path:`${t}/${r.name}`,size:r.blob?r.blob.size:0}]:e}),[])}async listFiles(e,{repoURL:t=this.repoURL,branch:r=this.branch,depth:n=1}={}){const{owner:i,name:o}=this.getOwnerAndNameFromRepoUrl(t),a=ae()(e,"/"),{data:s}=await this.query({query:$o(n),variables:{owner:i,name:o,expression:`${r}:${a}`}});return s.repository.object?this.getAllFiles(s.repository.object.entries,a):[]}getBranchQualifiedName(e){return`refs/heads/${e}`}getBranchQuery(e,t,r){return{query:Vo,variables:{owner:t,name:r,qualifiedName:this.getBranchQualifiedName(e)}}}async getDefaultBranch(){const{data:e}=await this.query(la({},this.getBranchQuery(this.branch,this.originRepoOwner,this.originRepoName)));return e.repository.branch}async getBranch(e){const{data:t}=await this.query(la(la({},this.getBranchQuery(e,this.repoOwner,this.repoName)),{},{fetchPolicy:pa}));if(!t.repository.branch)throw new k.APIError("Branch not found",404,it);return t.repository.branch}async patchRef(e,t,r,n={}){if("heads"!==e)return super.patchRef(e,t,r,n);const i=n.force||!1,o=await this.getBranch(t),{data:a}=await this.mutate({mutation:Xo,variables:{input:{oid:r,refId:o.id,force:i}}});return a.updateRef.branch}async deleteBranch(e){const t=await this.getBranch(e),{data:r}=await this.mutate({mutation:ea,variables:{deleteRefInput:{refId:t.id}},update:e=>e.data.delete(fi(t))});return r.deleteRef}getPullRequestQuery(e){const{originRepoOwner:t,originRepoName:r}=this;return{query:Wo,variables:{owner:t,name:r,number:e}}}async getPullRequest(e){const{data:t}=await this.query(la(la({},this.getPullRequestQuery(e)),{},{fetchPolicy:pa})),r="OPEN"===t.repository.pullRequest.state?st.Open:st.Closed;return la(la({},t.repository.pullRequest),{},{state:r})}getPullRequestAndBranchQuery(e,t){const{repoOwner:r,repoName:n}=this,{originRepoOwner:i,originRepoName:o}=this;return{query:Jo,variables:{owner:r,name:n,originRepoOwner:i,originRepoName:o,number:t,qualifiedName:this.getBranchQualifiedName(e)}}}async getPullRequestAndBranch(e,t){const{data:r}=await this.query(la(la({},this.getPullRequestAndBranchQuery(e,t)),{},{fetchPolicy:pa})),{repository:n,origin:i}=r;return{branch:n.branch,pullRequest:i.pullRequest}}async openPR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:ua,variables:{reopenPullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.reopenPullRequest,n={repository:la(la({},r.repository),{},{pullRequest:r})};e.writeQuery(la(la({},this.getPullRequestQuery(r.number)),{},{data:n}))}});return r.reopenPullRequest}async closePR(e){const t=await this.getPullRequest(e),{data:r}=await this.mutate({mutation:ra,variables:{closePullRequestInput:{pullRequestId:t.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.closePullRequest,n={repository:la(la({},r.repository),{},{pullRequest:r})};e.writeQuery(la(la({},this.getPullRequestQuery(r.number)),{},{data:n}))}});return r.closePullRequest}async deleteUnpublishedEntry(e,t){try{const r=this.generateContentKey(e,t),n=(0,k.branchFromContentKey)(r),i=await this.getBranchPullRequest(n);if(i.number!==ot){const{branch:e,pullRequest:t}=await this.getPullRequestAndBranch(n,i.number),{data:r}=await this.mutate({mutation:na,variables:{deleteRefInput:{refId:e.id},closePullRequestInput:{pullRequestId:t.id}},update:r=>{r.data.delete(fi(e)),r.data.delete(fi(t))}});return r.closePullRequest}return await this.deleteBranch(n)}catch(e){const{graphQLErrors:t}=e;if(t&&t.length>0){const e=t.some((e=>"NOT_FOUND"===e.type));if(e)return}throw e}}async createPR(e,t){const[r,n]=await Promise.all([this.getRepository(this.originRepoOwner,this.originRepoName),this.useOpenAuthoring?`${(await this.user()).login}:${t}`:t]),{data:i}=await this.mutate({mutation:oa,variables:{createPullRequestInput:{baseRefName:this.branch,body:k.DEFAULT_PR_BODY,title:e,headRefName:n,repositoryId:r.id}},update:(e,{data:t})=>{const{pullRequest:r}=t.createPullRequest,n={repository:la(la({},r.repository),{},{pullRequest:r})};e.writeQuery(la(la({},this.getPullRequestQuery(r.number)),{},{data:n}))}}),{pullRequest:o}=i.createPullRequest;return la(la({},o),{},{head:{sha:o.headRefOid}})}async createBranch(e,t){const r=this.repoOwner,n=this.repoName,i=await this.getRepository(r,n),{data:o}=await this.mutate({mutation:aa,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:i.id}},update:(t,{data:i})=>{const{branch:o}=i.createRef,a={repository:la(la({},o.repository),{},{branch:o})};t.writeQuery(la(la({},this.getBranchQuery(e,r,n)),{},{data:a}))}}),{branch:a}=o.createRef;return la(la({},a),{},{ref:`${a.prefix}${a.name}`})}async createBranchAndPullRequest(e,t,r){const n=this.originRepoOwner,i=this.originRepoName,o=await this.getRepository(n,i),{data:a}=await this.mutate({mutation:sa,variables:{createRefInput:{name:this.getBranchQualifiedName(e),oid:t,repositoryId:o.id},createPullRequestInput:{baseRefName:this.branch,body:k.DEFAULT_PR_BODY,title:r,headRefName:e,repositoryId:o.id}},update:(t,{data:r})=>{const{branch:o}=r.createRef,{pullRequest:a}=r.createPullRequest,s={repository:la(la({},o.repository),{},{branch:o})},u={repository:la(la({},a.repository),{},{branch:o}),origin:la(la({},a.repository),{},{pullRequest:a})};t.writeQuery(la(la({},this.getBranchQuery(e,n,i)),{},{data:s})),t.writeQuery(la(la({},this.getPullRequestAndBranchQuery(e,a.number)),{},{data:u}))}}),{pullRequest:s}=a.createPullRequest;return ma(s)}async getFileSha(e,{repoURL:t=this.repoURL,branch:r=this.branch}={}){const{owner:n,name:i}=this.getOwnerAndNameFromRepoUrl(t),{data:o}=await this.query({query:Yo,variables:{owner:n,name:i,expression:`${r}:${e}`}});if(o.repository.file)return o.repository.file.sha;throw new k.APIError("Not Found",404,it)}}function va(){return va=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},va.apply(this,arguments)}function ga(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function ba(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ga(Object(r),!0).forEach((function(t){wa(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ga(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function wa(e,t,r){var n;return(t="symbol"==typeof(n=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(t))?n:String(n))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const{fetchWithTimeout:Ra}=k.unsentRequest,Ea="https://www.githubstatus.com",Oa=`${Ea}/api/v2/components.json`,ka=["API Requests","Issues, Pull Requests, Projects"],Sa={GitHubBackend:class{constructor(e,t={}){var r;if(wa(this,"lock",void 0),wa(this,"api",void 0),wa(this,"options",void 0),wa(this,"originRepo",void 0),wa(this,"isBranchConfigured",void 0),wa(this,"repo",void 0),wa(this,"openAuthoringEnabled",void 0),wa(this,"useOpenAuthoring",void 0),wa(this,"alwaysForkEnabled",void 0),wa(this,"branch",void 0),wa(this,"apiRoot",void 0),wa(this,"mediaFolder",void 0),wa(this,"previewContext",void 0),wa(this,"token",void 0),wa(this,"tokenKeyword",void 0),wa(this,"squashMerges",void 0),wa(this,"cmsLabelPrefix",void 0),wa(this,"useGraphql",void 0),wa(this,"baseUrl",void 0),wa(this,"bypassWriteAccessCheckForAppTokens",!1),wa(this,"_currentUserPromise",void 0),wa(this,"_userIsOriginMaintainerPromises",void 0),wa(this,"_mediaDisplayURLSem",void 0),wa(this,"getCursorAndFiles",((e,t)=>{const r=e.length,n=Math.ceil(e.length/20),i=[];return t>1&&(i.push("prev"),i.push("first")),t<n&&(i.push("next"),i.push("last")),{cursor:k.Cursor.create({actions:i,meta:{page:t,count:r,pageSize:20,pageCount:n},data:{files:e}}),files:e.slice(20*(t-1),20*t)}})),this.options=ba({proxied:!1,API:null,initialWorkflowStatus:""},t),!this.options.proxied&&(null===e.backend.repo||void 0===e.backend.repo))throw new Error('The GitHub backend needs a "repo" in the backend configuration.');if(this.api=this.options.API||null,this.isBranchConfigured=!!e.backend.branch,this.openAuthoringEnabled=e.backend.open_authoring||!1,this.openAuthoringEnabled){if(!this.options.useWorkflow)throw new Error("backend.open_authoring is true but publish_mode is not set to editorial_workflow.");this.originRepo=e.backend.repo||""}else this.repo=this.originRepo=e.backend.repo||"";this.alwaysForkEnabled=e.backend.always_fork||!1,this.branch=(null===(r=e.backend.branch)||void 0===r?void 0:r.trim())||"master",this.apiRoot=e.backend.api_root||"https://api.github.com",this.token="",this.tokenKeyword="token",this.baseUrl=e.backend.base_url,this.squashMerges=e.backend.squash_merges||!1,this.cmsLabelPrefix=e.backend.cms_label_prefix||"",this.useGraphql=e.backend.use_graphql||!1,this.mediaFolder=e.media_folder,this.previewContext=e.backend.preview_context||"",this.lock=(0,k.asyncLock)()}isGitBackend(){return!0}async status(){const e=await Ra(Oa).then((e=>e.json())).then((e=>e.components.filter((e=>ka.includes(e.name))).every((e=>"operational"===e.status)))).catch((e=>(console.warn("Failed getting GitHub status",e),!0)));let t=!1;var r,n;return e&&(t=await(null===(r=this.api)||void 0===r?void 0:r.getUser({token:null!==(n=this.token)&&void 0!==n?n:""}).then((e=>!!e)).catch((e=>(console.warn("Failed getting GitHub user",e),!1))))||!1),{auth:{status:t},api:{status:e,statusPage:Ea}}}authComponent(){const e=e=>(0,P.jsx)(ie,va({},e,{backend:this}));return e.displayName="AuthenticationPage",e}restoreUser(e){return this.openAuthoringEnabled?this.authenticateWithFork({userData:e,getPermissionToFork:()=>!0}).then((()=>this.authenticate(e))):this.authenticate(e)}async pollUntilForkExists({repo:e,token:t}){let r=!1;for(;!r;)r=await Ra(`${this.apiRoot}/repos/${e}`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then((()=>!0)).catch((e=>e&&404===e.status?(console.log("This 404 was expected and handled appropriately."),!1):Promise.reject(e))),r||await new Promise((e=>setTimeout(e,250)));return Promise.resolve()}async currentUser({token:e}){return this._currentUserPromise||(this._currentUserPromise=Ra(`${this.apiRoot}/user`,{headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then((e=>e.json()))),this._currentUserPromise}async userIsOriginMaintainer({username:e,token:t}){const r=e||(await this.currentUser({token:t})).login;return this._userIsOriginMaintainerPromises=this._userIsOriginMaintainerPromises||{},this._userIsOriginMaintainerPromises[r]||(this._userIsOriginMaintainerPromises[r]=Ra(`${this.apiRoot}/repos/${this.originRepo}/collaborators/${r}/permission`,{headers:{Authorization:`${this.tokenKeyword} ${t}`}}).then((e=>e.json())).then((({permission:e})=>"admin"===e||"write"===e))),this._userIsOriginMaintainerPromises[r]}async forkExists({token:e}){try{const t=await this.currentUser({token:e}),r=this.originRepo.split("/")[1],n=await Ra(`${this.apiRoot}/repos/${t.login}/${r}`,{method:"GET",headers:{Authorization:`${this.tokenKeyword} ${e}`}}).then((e=>e.json()));return!0===n.fork&&n.parent&&n.parent.full_name.toLowerCase()===this.originRepo.toLowerCase()}catch{return!1}}async authenticateWithFork({userData:e,getPermissionToFork:t}){if(!this.openAuthoringEnabled)throw new Error("Cannot authenticate with fork; Open Authoring is turned off.");const r=e.token;if(!this.alwaysForkEnabled&&await this.userIsOriginMaintainer({token:r}))return this.repo=this.originRepo,this.useOpenAuthoring=!1,Promise.resolve();const n=await this.currentUser({token:r}),i=this.originRepo.split("/")[1];if(this.repo=`${n.login}/${i}`,this.useOpenAuthoring=!0,await this.forkExists({token:r}))return Ra(`${this.apiRoot}/repos/${this.repo}/merge-upstream`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`},body:JSON.stringify({branch:this.branch})});{await t();const e=await Ra(`${this.apiRoot}/repos/${this.originRepo}/forks`,{method:"POST",headers:{Authorization:`${this.tokenKeyword} ${r}`}}).then((e=>e.json()));return this.pollUntilForkExists({repo:e.full_name,token:r})}}async authenticate(e){if(this.token=e.token,!this.isBranchConfigured){const e=await Ra(`${this.apiRoot}/repos/${this.originRepo}`,{headers:{Authorization:`token ${this.token}`}}).then((e=>e.json())).catch((()=>null));e&&e.default_branch&&(this.branch=e.default_branch)}const t=this.useGraphql?ya:ht;this.api=new t({token:this.token,tokenKeyword:this.tokenKeyword,branch:this.branch,repo:this.repo,originRepo:this.originRepo,apiRoot:this.apiRoot,squashMerges:this.squashMerges,cmsLabelPrefix:this.cmsLabelPrefix,useOpenAuthoring:this.useOpenAuthoring,initialWorkflowStatus:this.options.initialWorkflowStatus,baseUrl:this.baseUrl,getUser:this.currentUser});const r=await this.api.user();if(!await this.api.hasWriteAccess().catch((e=>{throw e.message=O`
304
304
  Repo "${this.repo}" not found.
305
305
 
306
306
  Please ensure the repo information is spelled correctly.