313 lines
2.2 MiB
313 lines
2.2 MiB
;!function(){try { var e="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof global?global:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&((e._debugIds|| (e._debugIds={}))[n]="d3fdb713-ca50-5974-073b-c13bf434b585")}catch(e){}}();
|
||
module.exports=[195884,e=>{"use strict";let t={dateFNSKey:"en-US",translations:{authentication:{account:"Account",accountOfCurrentUser:"Account of current user",accountVerified:"Account verified successfully.",alreadyActivated:"Already Activated",alreadyLoggedIn:"Already logged in",apiKey:"API Key",authenticated:"Authenticated",backToLogin:"Back to login",beginCreateFirstUser:"To begin, create your first user.",changePassword:"Change Password",checkYourEmailForPasswordReset:"If the email address is associated with an account, you will receive instructions to reset your password shortly. Please check your spam or junk mail folder if you don't see the email in your inbox.",confirmGeneration:"Confirm Generation",confirmPassword:"Confirm Password",createFirstUser:"Create first user",emailNotValid:"The email provided is not valid",emailOrUsername:"Email or Username",emailSent:"Email Sent",emailVerified:"Email verified successfully.",enableAPIKey:"Enable API Key",failedToUnlock:"Failed to unlock",forceUnlock:"Force Unlock",forgotPassword:"Forgot Password",forgotPasswordEmailInstructions:"Please enter your email below. You will receive an email message with instructions on how to reset your password.",forgotPasswordUsernameInstructions:"Please enter your username below. Instructions on how to reset your password will be sent to email address associated with your username.",usernameNotValid:"The username provided is not valid",forgotPasswordQuestion:"Forgot password?",generate:"Generate",generateNewAPIKey:"Generate new API key",generatingNewAPIKeyWillInvalidate:"Generating a new API key will <1>invalidate</1> the previous key. Are you sure you wish to continue?",lockUntil:"Lock Until",logBackIn:"Log back in",loggedIn:"To log in with another user, you should <0>log out</0> first.",loggedInChangePassword:"To change your password, go to your <0>account</0> and edit your password there.",loggedOutInactivity:"You have been logged out due to inactivity.",loggedOutSuccessfully:"You have been logged out successfully.",loggingOut:"Logging out...",login:"Login",loginAttempts:"Login Attempts",loginUser:"Login user",loginWithAnotherUser:"To log in with another user, you should <0>log out</0> first.",logOut:"Log out",logout:"Logout",logoutSuccessful:"Logout successful.",logoutUser:"Logout user",newAccountCreated:'A new account has just been created for you to access <a href="{{serverURL}}">{{serverURL}}</a> Please click on the following link or paste the URL below into your browser to verify your email: <a href="{{verificationURL}}">{{verificationURL}}</a><br> After verifying your email, you will be able to log in successfully.',newAPIKeyGenerated:"New API Key Generated.",newPassword:"New Password",passed:"Authentication Passed",passwordResetSuccessfully:"Password reset successfully.",resetPassword:"Reset Password",resetPasswordExpiration:"Reset Password Expiration",resetPasswordToken:"Reset Password Token",resetYourPassword:"Reset Your Password",stayLoggedIn:"Stay logged in",successfullyRegisteredFirstUser:"Successfully registered first user.",successfullyUnlocked:"Successfully unlocked",tokenRefreshSuccessful:"Token refresh successful.",unableToVerify:"Unable to Verify",username:"Username",verified:"Verified",verifiedSuccessfully:"Verified Successfully",verify:"Verify",verifyUser:"Verify User",verifyYourEmail:"Verify your email",youAreInactive:"You haven't been active in a little while and will shortly be automatically logged out for your own security. Would you like to stay logged in?",youAreReceivingResetPassword:"You are receiving this because you (or someone else) have requested the reset of the password for your account. Please click on the following link, or paste this into your browser to complete the process:",youDidNotRequestPassword:"If you did not request this, please ignore this email and your password will remain unchanged."},dashboard:{addButton:"Add +",addWidget:"Add Widget",deleteWidget:"Delete widget {{id}}",discardConfirmLabel:"Discard",discardMessage:"You have unsaved changes to your dashboard layout. Are you sure you want to discard them?",discardTitle:"Discard changes?",editDashboard:"Edit Dashboard",editingDashboard:"Editing Dashboard",noItems:'There are no widgets on your dashboard. You can add them from the "Dashboard" menu located in the top bar.',resetLayout:"Reset Layout",searchWidgets:"Search widgets..."},error:{accountAlreadyActivated:"This account has already been activated.",autosaving:"There was a problem while autosaving this document.",correctInvalidFields:"Please correct invalid fields.",deletingFile:"There was an error deleting file.",deletingTitle:"There was an error while deleting {{title}}. Please check your connection and try again.",documentNotFound:"The document with ID {{id}} could not be found. It may have been deleted or never existed, or you may not have access to it.",emailOrPasswordIncorrect:"The email or password provided is incorrect.",failedToResetLayout:"Failed to reset layout.",failedToSaveLayout:"Failed to save layout.",followingFieldsInvalid_one:"The following field is invalid:",followingFieldsInvalid_other:"The following fields are invalid:",incorrectCollection:"Incorrect Collection",insufficientClipboardPermissions:"Clipboard access denied. Please check your clipboard permissions.",invalidClipboardData:"Invalid clipboard data.",invalidFileType:"Invalid file type",invalidFileTypeValue:"Invalid file type: {{value}}",invalidRequestArgs:"Invalid arguments passed in request: {{args}}",loadingDocument:"There was a problem loading the document with ID of {{id}}.",localesNotSaved_one:"The following locale could not be saved:",localesNotSaved_other:"The following locales could not be saved:",logoutFailed:"Logout failed.",missingEmail:"Missing email.",missingIDOfDocument:"Missing ID of document to update.",missingIDOfVersion:"Missing ID of version.",missingRequiredData:"Missing required data.",noFilesUploaded:"No files were uploaded.",noMatchedField:'No matched field found for "{{label}}"',notAllowedToAccessPage:"You are not allowed to access this page.",notAllowedToPerformAction:"You are not allowed to perform this action.",notFound:"The requested resource was not found.",noUser:"No User",previewing:"There was a problem previewing this document.",problemUploadingFile:"There was a problem while uploading the file.",restoringTitle:"There was an error while restoring {{title}}. Please check your connection and try again.",revertingDocument:"There was a problem while reverting this document.",tokenInvalidOrExpired:"Token is either invalid or has expired.",tokenNotProvided:"Token not provided.",unableToCopy:"Unable to copy.",unableToDeleteCount:"Unable to delete {{count}} out of {{total}} {{label}}.",unableToReindexCollection:"Error reindexing collection {{collection}}. Operation aborted.",unableToUpdateCount:"Unable to update {{count}} out of {{total}} {{label}}.",unauthorized:"Unauthorized, you must be logged in to make this request.",unauthorizedAdmin:"Unauthorized, this user does not have access to the admin panel.",unknown:"An unknown error has occurred.",unPublishingDocument:"There was a problem while un-publishing this document.",unspecific:"An error has occurred.",unverifiedEmail:"Please verify your email before logging in.",userEmailAlreadyRegistered:"A user with the given email is already registered.",userLocked:"This user is locked due to having too many failed login attempts.",usernameAlreadyRegistered:"A user with the given username is already registered.",usernameOrPasswordIncorrect:"The username or password provided is incorrect.",valueMustBeUnique:"Value must be unique",verificationTokenInvalid:"Verification token is invalid."},fields:{addLabel:"Add {{label}}",addLink:"Add Link",addNew:"Add new",addNewLabel:"Add new {{label}}",addRelationship:"Add Relationship",addUpload:"Add Upload",block:"Block",blocks:"blocks",blockType:"Block Type",chooseBetweenCustomTextOrDocument:"Choose between entering a custom text URL or linking to another document.",chooseDocumentToLink:"Choose a document to link to",chooseFromExisting:"Choose from existing",chooseLabel:"Choose {{label}}",collapseAll:"Collapse All",customURL:"Custom URL",editLabelData:"Edit {{label}} data",editLink:"Edit Link",editRelationship:"Edit Relationship",enterURL:"Enter a URL",internalLink:"Internal Link",itemsAndMore:"{{items}} and {{count}} more",labelRelationship:"{{label}} Relationship",latitude:"Latitude",linkedTo:"Linked to <0>{{label}}</0>",linkType:"Link Type",longitude:"Longitude",newLabel:"New {{label}}",openInNewTab:"Open in new tab",passwordsDoNotMatch:"Passwords do not match.",relatedDocument:"Related Document",relationTo:"Relation To",removeRelationship:"Remove Relationship",removeUpload:"Remove Upload",saveChanges:"Save changes",searchForBlock:"Search for a block",searchForLanguage:"Search for a language",selectExistingLabel:"Select existing {{label}}",selectFieldsToEdit:"Select fields to edit",showAll:"Show All",swapRelationship:"Swap Relationship",swapUpload:"Swap Upload",textToDisplay:"Text to display",toggleBlock:"Toggle block",uploadNewLabel:"Upload new {{label}}"},folder:{browseByFolder:"Browse by Folder",byFolder:"By Folder",deleteFolder:"Delete Folder",folderName:"Folder Name",folders:"Folders",folderTypeDescription:"Select which type of collection documents should be allowed in this folder.",itemHasBeenMoved:"{{title}} has been moved to {{folderName}}",itemHasBeenMovedToRoot:"{{title}} has been moved to the root folder",itemsMovedToFolder:"{{title}} moved to {{folderName}}",itemsMovedToRoot:"{{title}} moved to the root folder",moveFolder:"Move Folder",moveItemsToFolderConfirmation:"You are about to move <1>{{count}} {{label}}</1> to <2>{{toFolder}}</2>. Are you sure?",moveItemsToRootConfirmation:"You are about to move <1>{{count}} {{label}}</1> to the root folder. Are you sure?",moveItemToFolderConfirmation:"You are about to move <1>{{title}}</1> to <2>{{toFolder}}</2>. Are you sure?",moveItemToRootConfirmation:"You are about to move <1>{{title}}</1> to the root folder. Are you sure?",movingFromFolder:"Moving {{title}} from {{fromFolder}}",newFolder:"New Folder",noFolder:"No Folder",renameFolder:"Rename Folder",searchByNameInFolder:"Search by Name in {{folderName}}",selectFolderForItem:"Select folder for {{title}}"},general:{name:"Name",aboutToDelete:"You are about to delete the {{label}} <1>{{title}}</1>. Are you sure?",aboutToDeleteCount_many:"You are about to delete {{count}} {{label}}",aboutToDeleteCount_one:"You are about to delete {{count}} {{label}}",aboutToDeleteCount_other:"You are about to delete {{count}} {{label}}",aboutToPermanentlyDelete:"You are about to permanently delete the {{label}} <1>{{title}}</1>. Are you sure?",aboutToPermanentlyDeleteTrash:"You are about to permanently delete <0>{{count}}</0> <1>{{label}}</1> from the trash. Are you sure?",aboutToRestore:"You are about to restore the {{label}} <1>{{title}}</1>. Are you sure?",aboutToRestoreAsDraft:"You are about to restore the {{label}} <1>{{title}}</1> as a draft. Are you sure?",aboutToRestoreAsDraftCount:"You are about to restore {{count}} {{label}} as draft",aboutToRestoreCount:"You are about to restore {{count}} {{label}}",aboutToTrash:"You are about to move the {{label}} <1>{{title}}</1> to the trash. Are you sure?",aboutToTrashCount:"You are about to move {{count}} {{label}} to the trash",addBelow:"Add Below",addFilter:"Add Filter",adminTheme:"Admin Theme",all:"All",allCollections:"All Collections",allLocales:"All locales",and:"And",anotherUser:"Another user",anotherUserTakenOver:"Another user has taken over editing this document.",applyChanges:"Apply Changes",ascending:"Ascending",automatic:"Automatic",backToDashboard:"Back to Dashboard",cancel:"Cancel",changesNotSaved:"Your changes have not been saved. If you leave now, you will lose your changes.",clear:"Clear",clearAll:"Clear All",close:"Close",collapse:"Collapse",collections:"Collections",columns:"Columns",columnToSort:"Column to Sort",confirm:"Confirm",confirmCopy:"Confirm copy",confirmDeletion:"Confirm deletion",confirmDuplication:"Confirm duplication",confirmMove:"Confirm move",confirmReindex:"Reindex all {{collections}}?",confirmReindexAll:"Reindex all collections?",confirmReindexDescription:"This will remove existing indexes and reindex documents in the {{collections}} collections.",confirmReindexDescriptionAll:"This will remove existing indexes and reindex documents in all collections.",confirmRestoration:"Confirm restoration",copied:"Copied",copy:"Copy",copyField:"Copy Field",copying:"Copying",copyRow:"Copy Row",copyWarning:"You are about to overwrite {{to}} with {{from}} for {{label}} {{title}}. Are you sure?",create:"Create",created:"Created",createdAt:"Created At",createNew:"Create New",createNewLabel:"Create new {{label}}",creating:"Creating",creatingNewLabel:"Creating new {{label}}",currentlyEditing:"is currently editing this document. If you take over, they will be blocked from continuing to edit, and may also lose unsaved changes.",custom:"Custom",dark:"Dark",dashboard:"Dashboard",delete:"Delete",deleted:"Deleted",deletedAt:"Deleted At",deletedCountSuccessfully:"Deleted {{count}} {{label}} successfully.",deletedSuccessfully:"Deleted successfully.",deleteLabel:"Delete {{label}}",deletePermanently:"Skip trash and delete permanently",deleting:"Deleting...",depth:"Depth",descending:"Descending",deselectAllRows:"Deselect all rows",document:"Document",documentIsTrashed:"This {{label}} is trashed and is read-only.",documentLocked:"Document locked",documentModified:"Document modified",documentOutOfDate:"This document was recently updated by another user. Your view is out of date.",documents:"Documents",duplicate:"Duplicate",duplicateWithoutSaving:"Duplicate without saving changes",edit:"Edit",editAll:"Edit all",editedSince:"Edited since",editing:"Editing",editingLabel_many:"Editing {{count}} {{label}}",editingLabel_one:"Editing {{count}} {{label}}",editingLabel_other:"Editing {{count}} {{label}}",editingTakenOver:"Editing taken over",editLabel:"Edit {{label}}",email:"Email",emailAddress:"Email Address",emptyTrash:"Empty trash",emptyTrashLabel:"Empty {{label}} trash",enterAValue:"Enter a value",error:"Error",errors:"Errors",exitLivePreview:"Exit Live Preview",export:"Export",fallbackToDefaultLocale:"Fallback to default locale",false:"False",filter:"Filter",filters:"Filters",filterWhere:"Filter {{label}} where",globals:"Globals",goBack:"Go back",groupByLabel:"Group by {{label}}",import:"Import",isEditing:"is editing",item:"Item",items:"items",language:"Language",lastModified:"Last Modified",layout:"Layout",leaveAnyway:"Leave anyway",leaveWithoutSaving:"Leave without saving",light:"Light",livePreview:"Live Preview",loading:"Loading",locale:"Locale",locales:"Locales",lock:"Lock",menu:"Menu",moreOptions:"More options",move:"Move",moveConfirm:"You are about to move {{count}} {{label}} to <1>{{destination}}</1>. Are you sure?",moveCount:"Move {{count}} {{label}}",moveDown:"Move Down",moveUp:"Move Up",moving:"Moving",movingCount:"Moving {{count}} {{label}}",newLabel:"New {{label}}",newPassword:"New Password",next:"Next",no:"No",noDateSelected:"No date selected",noFiltersSet:"No filters set",noLabel:"<No {{label}}>",none:"None",noOptions:"No options",noResults:"No {{label}} found. Either no {{label}} exist yet or none match the filters you've specified above.",noResultsDescription:"Either none exist or none match the filters you've specified above.",noResultsFound:"No Results.",notFound:"Not Found",nothingFound:"Nothing found",noTrashResults:"No {{label}} in trash.",noUpcomingEventsScheduled:"No upcoming events scheduled.",noValue:"No value",of:"of",only:"Only",open:"Open",or:"Or",order:"Order",overwriteExistingData:"Overwrite existing field data",pageNotFound:"Page not found",password:"Password",pasteField:"Paste Field",pasteRow:"Paste Row",payloadSettings:"Payload Settings",permanentlyDelete:"Permanently Delete",permanentlyDeletedCountSuccessfully:"Permanently deleted {{count}} {{label}} successfully.",perPage:"Per Page: {{limit}}",previous:"Previous",reindex:"Reindex",reindexingAll:"Reindexing all {{collections}}.",reloadDocument:"Reload document",remove:"Remove",rename:"Rename",reset:"Reset",resetPreferences:"Reset Preferences",resetPreferencesDescription:"This will reset all of your preferences to their default settings.",resettingPreferences:"Resetting Preferences.",restore:"Restore",restoreAsPublished:"Restore as published version",restoredCountSuccessfully:"Restored {{count}} {{label}} successfully.",restoring:"Restoring...",row:"Row",rows:"Rows",save:"Save",saveChanges:"Save Changes",saving:"Saving...",schedulePublishFor:"Schedule publish for {{title}}",searchBy:"Search by {{label}}",select:"Select",selectAll:"Select all {{count}} {{label}}",selectAllRows:"Select all rows",selectedCount:"{{count}} {{label}} selected",selectLabel:"Select {{label}}",selectValue:"Select a value",showAllLabel:"Show all {{label}}",sorryNotFound:"Sorry—there is nothing to correspond with your request.",sort:"Sort",sortByLabelDirection:"Sort by {{label}} {{direction}}",stayOnThisPage:"Stay on this page",submissionSuccessful:"Submission Successful.",submit:"Submit",submitting:"Submitting...",success:"Success",successfullyCreated:"{{label}} successfully created.",successfullyDuplicated:"{{label}} successfully duplicated.",successfullyReindexed:"Successfully reindexed {{count}} of {{total}} documents from {{collections}} and skipped {{skips}} drafts.",takeOver:"Take over",thisLanguage:"English",time:"Time",timezone:"Timezone",titleDeleted:'{{label}} "{{title}}" successfully deleted.',titleRestored:'{{label}} "{{title}}" successfully restored.',titleTrashed:'{{label}} "{{title}}" moved to trash.',trash:"Trash",trashedCountSuccessfully:"{{count}} {{label}} moved to trash.",true:"True",unauthorized:"Unauthorized",unlock:"Unlock",unsavedChanges:"You have unsaved changes. Save or discard before continuing.",unsavedChangesDuplicate:"You have unsaved changes. Would you like to continue to duplicate?",untitled:"Untitled",upcomingEvents:"Upcoming Events",updatedAt:"Updated At",updatedCountSuccessfully:"Updated {{count}} {{label}} successfully.",updatedLabelSuccessfully:"Updated {{label}} successfully.",updatedSuccessfully:"Updated successfully.",updateForEveryone:"Update for everyone",updating:"Updating",uploading:"Uploading",uploadingBulk:"Uploading {{current}} of {{total}}",user:"User",username:"Username",users:"Users",value:"Value",viewing:"Viewing",viewReadOnly:"View read-only",welcome:"Welcome",yes:"Yes"},localization:{cannotCopySameLocale:"Cannot copy to the same locale",copyFrom:"Copy from",copyFromTo:"Copying from {{from}} to {{to}}",copyTo:"Copy to",copyToLocale:"Copy to locale",localeToPublish:"Locale to publish",selectedLocales:"Selected Locales",selectLocaleToCopy:"Select locale to copy",selectLocaleToDuplicate:"Select locales to duplicate"},operators:{contains:"contains",equals:"equals",exists:"exists",intersects:"intersects",isGreaterThan:"is greater than",isGreaterThanOrEqualTo:"is greater than or equal to",isIn:"is in",isLessThan:"is less than",isLessThanOrEqualTo:"is less than or equal to",isLike:"is like",isNotEqualTo:"is not equal to",isNotIn:"is not in",isNotLike:"is not like",near:"near",within:"within"},upload:{addFile:"Add file",addFiles:"Add files",bulkUpload:"Bulk Upload",crop:"Crop",cropToolDescription:"Drag the corners of the selected area, draw a new area or adjust the values below.",download:"Download",dragAndDrop:"Drag and drop a file",dragAndDropHere:"or drag and drop a file here",editImage:"Edit Image",fileName:"File Name",fileSize:"File Size",filesToUpload:"Files to Upload",fileToUpload:"File to Upload",focalPoint:"Focal Point",focalPointDescription:"Drag the focal point directly on the preview or adjust the values below.",height:"Height",lessInfo:"Less info",moreInfo:"More info",noFile:"No file",pasteURL:"Paste URL",previewSizes:"Preview Sizes",selectCollectionToBrowse:"Select a Collection to Browse",selectFile:"Select a file",setCropArea:"Set crop area",setFocalPoint:"Set focal point",sizes:"Sizes",sizesFor:"Sizes for {{label}}",width:"Width"},validation:{emailAddress:"Please enter a valid email address.",enterNumber:"Please enter a valid number.",fieldHasNo:"This field has no {{label}}",greaterThanMax:"{{value}} is greater than the max allowed {{label}} of {{max}}.",invalidBlock:'The block "{{block}}" is not allowed.',invalidBlocks:"This field contains blocks that are no longer allowed: {{blocks}}.",invalidInput:"This field has an invalid input.",invalidSelection:"This field has an invalid selection.",invalidSelections:"This field has the following invalid selections:",latitudeOutOfBounds:"Latitude must be between -90 and 90.",lessThanMin:"{{value}} is less than the min allowed {{label}} of {{min}}.",limitReached:"Limit reached, only {{max}} items can be added.",longerThanMin:"This value must be longer than the minimum length of {{minLength}} characters.",longitudeOutOfBounds:"Longitude must be between -180 and 180.",notValidDate:'"{{value}}" is not a valid date.',required:"This field is required.",requiresAtLeast:"This field requires at least {{count}} {{label}}.",requiresNoMoreThan:"This field requires no more than {{count}} {{label}}.",requiresTwoNumbers:"This field requires two numbers.",shorterThanMax:"This value must be shorter than the max length of {{maxLength}} characters.",timezoneRequired:"A timezone is required.",trueOrFalse:"This field can only be equal to true or false.",username:"Please enter a valid username. Can contain letters, numbers, hyphens, periods and underscores.",validUploadID:"This field is not a valid upload ID."},version:{type:"Type",aboutToPublishSelection:"You are about to publish all {{label}} in the selection. Are you sure?",aboutToRestore:"You are about to restore this {{label}} document to the state that it was in on {{versionDate}}.",aboutToRestoreGlobal:"You are about to restore the global {{label}} to the state that it was in on {{versionDate}}.",aboutToRevertToPublished:"You are about to revert this document's changes to its published state. Are you sure?",aboutToUnpublish:"You are about to unpublish this document. Are you sure?",aboutToUnpublishIn:"You are about to unpublish this document in {{locale}}. Are you sure?",aboutToUnpublishSelection:"You are about to unpublish all {{label}} in the selection. Are you sure?",autosave:"Autosave",autosavedSuccessfully:"Autosaved successfully.",autosavedVersion:"Autosaved version",changed:"Changed",changedFieldsCount_one:"{{count}} changed field",changedFieldsCount_other:"{{count}} changed fields",compareVersion:"Compare version against:",compareVersions:"Compare Versions",comparingAgainst:"Comparing against",confirmPublish:"Confirm publish",confirmRevertToSaved:"Confirm revert to saved",confirmUnpublish:"Confirm unpublish",confirmVersionRestoration:"Confirm Version Restoration",currentDocumentStatus:"Current {{docStatus}} document",currentDraft:"Current Draft",currentlyPublished:"Currently Published",currentlyViewing:"Currently viewing",currentPublishedVersion:"Current Published Version",draft:"Draft",draftHasPublishedVersion:"Draft (has published version)",draftSavedSuccessfully:"Draft saved successfully.",lastSavedAgo:"Last saved {{distance}} ago",modifiedOnly:"Modified only",moreVersions:"More versions...",noFurtherVersionsFound:"No further versions found",noLabelGroup:"Unnamed Group",noRowsFound:"No {{label}} found",noRowsSelected:"No {{label}} selected",preview:"Preview",previouslyDraft:"Previously a Draft",previouslyPublished:"Previously Published",previousVersion:"Previous Version",problemRestoringVersion:"There was a problem restoring this version",publish:"Publish",publishAllLocales:"Publish all locales",publishChanges:"Publish changes",published:"Published",publishIn:"Publish in {{locale}}",publishing:"Publishing",restoreAsDraft:"Restore as draft",restoredSuccessfully:"Restored Successfully.",restoreThisVersion:"Restore this version",restoring:"Restoring...",reverting:"Reverting...",revertToPublished:"Revert to published",revertUnsuccessful:"Revert unsuccessful. No previously published version found.",saveDraft:"Save Draft",scheduledSuccessfully:"Scheduled successfully.",schedulePublish:"Schedule Publish",selectLocales:"Select locales to display",selectVersionToCompare:"Select a version to compare",showingVersionsFor:"Showing versions for:",showLocales:"Show locales:",specificVersion:"Specific Version",status:"Status",unpublish:"Unpublish",unpublished:"Unpublished",unpublishedSuccessfully:"Unpublished successfully.",unpublishIn:"Unpublish in {{locale}}",unpublishing:"Unpublishing...",version:"Version",versionAgo:"{{distance}} ago",versionCount_many:"{{count}} versions found",versionCount_none:"No versions found",versionCount_one:"{{count}} version found",versionCount_other:"{{count}} versions found",versionID:"Version ID",versions:"Versions",viewingVersion:"Viewing version for the {{entityLabel}} {{documentTitle}}",viewingVersionGlobal:"Viewing version for the global {{entityLabel}}",viewingVersions:"Viewing versions for the {{entityLabel}} {{documentTitle}}",viewingVersionsGlobal:"Viewing versions for the global {{entityLabel}}"}}};e.s(["en",0,t])},542327,e=>{"use strict";function t(e,i){let r={...e};for(let n in i)Object.prototype.hasOwnProperty.call(i,n)&&("object"==typeof i[n]&&!Array.isArray(i[n])&&e[n]?r[n]=t(e[n],i[n]):r[n]=i[n]);return r}e.s(["deepMergeSimple",()=>t])},700859,792367,10188,785867,e=>{"use strict";var t={"1xx":"Informational","1xx_NAME":"INFORMATIONAL","1xx_MESSAGE":"Indicates an interim response for communicating connection status or request progress prior to completing the requested action and sending a final response.",INFORMATIONAL:"1xx","2xx":"Successful","2xx_NAME":"SUCCESSFUL","2xx_MESSAGE":"Indicates that the client's request was successfully received, understood, and accepted.",SUCCESSFUL:"2xx","3xx":"Redirection","3xx_NAME":"REDIRECTION","3xx_MESSAGE":"Indicates that further action needs to be taken by the user agent in order to fulfill the request.",REDIRECTION:"3xx","4xx":"Client Error","4xx_NAME":"CLIENT_ERROR","4xx_MESSAGE":"Indicates that the client seems to have erred.",CLIENT_ERROR:"4xx","5xx":"Server Error","5xx_NAME":"SERVER_ERROR","5xx_MESSAGE":"Indicates that the server is aware that it has erred or is incapable of performing the requested method.",SERVER_ERROR:"5xx"},i={classes:t,100:"Continue","100_NAME":"CONTINUE","100_MESSAGE":"The server has received the request headers and the client should proceed to send the request body.","100_CLASS":t.INFORMATIONAL,CONTINUE:100,101:"Switching Protocols","101_NAME":"SWITCHING_PROTOCOLS","101_MESSAGE":"The requester has asked the server to switch protocols and the server has agreed to do so.","101_CLASS":t.INFORMATIONAL,SWITCHING_PROTOCOLS:101,102:"Processing","102_NAME":"PROCESSING","102_MESSAGE":"A WebDAV request may contain many sub-requests involving file operations, requiring a long time to complete the request. This code indicates that the server has received and is processing the request, but no response is available yet.[7] This prevents the client from timing out and assuming the request was lost.","102_CLASS":t.INFORMATIONAL,PROCESSING:102,103:"Early Hints","103_NAME":"EARLY_HINTS","103_MESSAGE":"Used to return some response headers before final HTTP message.","103_CLASS":t.INFORMATIONAL,EARLY_HINTS:103,200:"OK","200_NAME":"OK","200_MESSAGE":"Standard response for successful HTTP requests.","200_CLASS":t.SUCCESSFUL,OK:200,201:"Created","201_NAME":"CREATED","201_MESSAGE":"The request has been fulfilled, resulting in the creation of a new resource.","201_CLASS":t.SUCCESSFUL,CREATED:201,202:"Accepted","202_NAME":"ACCEPTED","202_MESSAGE":"The request has been accepted for processing, but the processing has not been completed.","202_CLASS":t.SUCCESSFUL,ACCEPTED:202,203:"Non-Authoritative Information","203_NAME":"NON_AUTHORITATIVE_INFORMATION","203_MESSAGE":"The server is a transforming proxy (e.g. a Web accelerator) that received a 200 OK from its origin, but is returning a modified version of the origin's response.","203_CLASS":t.SUCCESSFUL,NON_AUTHORITATIVE_INFORMATION:203,204:"No Content","204_NAME":"NO_CONTENT","204_MESSAGE":"The server successfully processed the request and is not returning any content.","204_CLASS":t.SUCCESSFUL,NO_CONTENT:204,205:"Reset Content","205_NAME":"RESET_CONTENT","205_MESSAGE":"The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester reset the document view.","205_CLASS":t.SUCCESSFUL,RESET_CONTENT:205,206:"Partial Content","206_NAME":"PARTIAL_CONTENT","206_MESSAGE":"The server is delivering only part of the resource (byte serving) due to a range header sent by the client.","206_CLASS":t.SUCCESSFUL,PARTIAL_CONTENT:206,207:"Multi Status","207_NAME":"MULTI_STATUS","207_MESSAGE":"The message body that follows is by default an XML message and can contain a number of separate response codes, depending on how many sub-requests were made.","207_CLASS":t.SUCCESSFUL,MULTI_STATUS:207,208:"Already Reported","208_NAME":"ALREADY_REPORTED","208_MESSAGE":"The members of a DAV binding have already been enumerated in a preceding part of the (multistatus) response, and are not being included again.","208_CLASS":t.SUCCESSFUL,ALREADY_REPORTED:208,226:"IM Used","226_NAME":"IM_USED","226_MESSAGE":"The server has fulfilled a request for the resource, and the response is a representation of the result of one or more instance-manipulations applied to the current instance.","226_CLASS":t.SUCCESSFUL,IM_USED:226,300:"Multiple Choices","300_NAME":"MULTIPLE_CHOICES","300_MESSAGE":"Indicates multiple options for the resource from which the client may choose.","300_CLASS":t.REDIRECTION,MULTIPLE_CHOICES:300,301:"Moved Permanently","301_NAME":"MOVED_PERMANENTLY","301_MESSAGE":"This and all future requests should be directed to the given URI.","301_CLASS":t.REDIRECTION,MOVED_PERMANENTLY:301,302:"Found","302_NAME":"FOUND","302_MESSAGE":'This is an example of industry practice contradicting the standard. The HTTP/1.0 specification (RFC 1945) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented 302 with the functionality of a 303 See Other. Therefore, HTTP/1.1 added status codes 303 and 307 to distinguish between the two behaviours.',"302_CLASS":t.REDIRECTION,FOUND:302,303:"See Other","303_NAME":"SEE_OTHER","303_MESSAGE":"The response to the request can be found under another URI using the GET method.","303_CLASS":t.REDIRECTION,SEE_OTHER:303,304:"Not Modified","304_NAME":"NOT_MODIFIED","304_MESSAGE":"Indicates that the resource has not been modified since the version specified by the request headers If-Modified-Since or If-None-Match.","304_CLASS":t.REDIRECTION,NOT_MODIFIED:304,305:"Use Proxy","305_NAME":"USE_PROXY","305_MESSAGE":"The requested resource is available only through a proxy, the address for which is provided in the response.","305_CLASS":t.REDIRECTION,USE_PROXY:305,306:"Switch Proxy","306_NAME":"SWITCH_PROXY","306_MESSAGE":'No longer used. Originally meant "Subsequent requests should use the specified proxy.',"306_CLASS":t.REDIRECTION,SWITCH_PROXY:306,307:"Temporary Redirect","307_NAME":"TEMPORARY_REDIRECT","307_MESSAGE":"In this case, the request should be repeated with another URI; however, future requests should still use the original URI.","307_CLASS":t.REDIRECTION,TEMPORARY_REDIRECT:307,308:"Permanent Redirect","308_NAME":"PERMANENT_REDIRECT","308_MESSAGE":"The request and all future requests should be repeated using another URI.","308_CLASS":t.REDIRECTION,PERMANENT_REDIRECT:308,400:"Bad Request","400_NAME":"BAD_REQUEST","400_MESSAGE":"The server cannot or will not process the request due to an apparent client error.","400_CLASS":t.CLIENT_ERROR,BAD_REQUEST:400,401:"Unauthorized","401_NAME":"UNAUTHORIZED","401_MESSAGE":"Similar to 403 Forbidden, but specifically for use when authentication is required and has failed or has not yet been provided.","401_CLASS":t.CLIENT_ERROR,UNAUTHORIZED:401,402:"Payment Required","402_NAME":"PAYMENT_REQUIRED","402_MESSAGE":"Reserved for future use. The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, as proposed for example by GNU Taler, but that has not yet happened, and this code is not usually used.","402_CLASS":t.CLIENT_ERROR,PAYMENT_REQUIRED:402,403:"Forbidden","403_NAME":"FORBIDDEN","403_MESSAGE":"The request was valid, but the server is refusing action.","403_CLASS":t.CLIENT_ERROR,FORBIDDEN:403,404:"Not Found","404_NAME":"NOT_FOUND","404_MESSAGE":"The requested resource could not be found but may be available in the future. Subsequent requests by the client are permissible.","404_CLASS":t.CLIENT_ERROR,NOT_FOUND:404,405:"Method Not Allowed","405_NAME":"METHOD_NOT_ALLOWED","405_MESSAGE":"A request method is not supported for the requested resource.","405_CLASS":t.CLIENT_ERROR,METHOD_NOT_ALLOWED:405,406:"Not Acceptable","406_NAME":"NOT_ACCEPTABLE","406_MESSAGE":"The requested resource is capable of generating only content not acceptable according to the Accept headers sent in the request.","406_CLASS":t.CLIENT_ERROR,NOT_ACCEPTABLE:406,407:"Proxy Authentication Required","407_NAME":"PROXY_AUTHENTICATION_REQUIRED","407_MESSAGE":"The client must first authenticate itself with the proxy.","407_CLASS":t.CLIENT_ERROR,PROXY_AUTHENTICATION_REQUIRED:407,408:"Request Time-out","408_NAME":"REQUEST_TIMEOUT","408_MESSAGE":"The server timed out waiting for the request.","408_CLASS":t.CLIENT_ERROR,REQUEST_TIMEOUT:408,409:"Conflict","409_NAME":"CONFLICT","409_MESSAGE":"Indicates that the request could not be processed because of conflict in the request, such as an edit conflict between multiple simultaneous updates.","409_CLASS":t.CLIENT_ERROR,CONFLICT:409,410:"Gone","410_NAME":"GONE","410_MESSAGE":"Indicates that the resource requested is no longer available and will not be available again.","410_CLASS":t.CLIENT_ERROR,GONE:410,411:"Length Required","411_NAME":"LENGTH_REQUIRED","411_MESSAGE":"The request did not specify the length of its content, which is required by the requested resource.","411_CLASS":t.CLIENT_ERROR,LENGTH_REQUIRED:411,412:"Precondition Failed","412_NAME":"PRECONDITION_FAILED","412_MESSAGE":"The server does not meet one of the preconditions that the requester put on the request.","412_CLASS":t.CLIENT_ERROR,PRECONDITION_FAILED:412,413:"Request Entity Too Large","413_NAME":"REQUEST_ENTITY_TOO_LARGE","413_MESSAGE":'The request is larger than the server is willing or able to process. Previously called "Request Entity Too Large".',"413_CLASS":t.CLIENT_ERROR,REQUEST_ENTITY_TOO_LARGE:413,414:"Request-URI Too Large","414_NAME":"REQUEST_URI_TOO_LONG","414_MESSAGE":"The URI provided was too long for the server to process.","414_CLASS":t.CLIENT_ERROR,REQUEST_URI_TOO_LONG:414,415:"Unsupported Media Type","415_NAME":"UNSUPPORTED_MEDIA_TYPE","415_MESSAGE":"The request entity has a media type which the server or resource does not support.","415_CLASS":t.CLIENT_ERROR,UNSUPPORTED_MEDIA_TYPE:415,416:"Requested Range not Satisfiable","416_NAME":"REQUESTED_RANGE_NOT_SATISFIABLE","416_MESSAGE":"The client has asked for a portion of the file (byte serving), but the server cannot supply that portion.","416_CLASS":t.CLIENT_ERROR,REQUESTED_RANGE_NOT_SATISFIABLE:416,417:"Expectation Failed","417_NAME":"EXPECTATION_FAILED","417_MESSAGE":"The server cannot meet the requirements of the Expect request-header field.","417_CLASS":t.CLIENT_ERROR,EXPECTATION_FAILED:417,418:"I'm a teapot","418_NAME":"IM_A_TEAPOT","418_MESSAGE":'Any attempt to brew coffee with a teapot should result in the error code "418 I\'m a teapot". The resulting entity body MAY be short and stout.',"418_CLASS":t.CLIENT_ERROR,IM_A_TEAPOT:418,421:"Misdirected Request","421_NAME":"MISDIRECTED_REQUEST","421_MESSAGE":"The request was directed at a server that is not able to produce a response.","421_CLASS":t.CLIENT_ERROR,MISDIRECTED_REQUEST:421,422:"Unprocessable Entity","422_NAME":"UNPROCESSABLE_ENTITY","422_MESSAGE":"The request was well-formed but was unable to be followed due to semantic errors.","422_CLASS":t.CLIENT_ERROR,UNPROCESSABLE_ENTITY:422,423:"Locked","423_NAME":"LOCKED","423_MESSAGE":"The resource that is being accessed is locked.","423_CLASS":t.CLIENT_ERROR,LOCKED:423,424:"Failed Dependency","424_NAME":"FAILED_DEPENDENCY","424_MESSAGE":"The request failed because it depended on another request and that request failed.","424_CLASS":t.CLIENT_ERROR,FAILED_DEPENDENCY:424,425:"Too Early","425_NAME":"TOO_EARLY","425_MESSAGE":"The server is unwilling to risk processing a request that might be replayed.","425_CLASS":t.CLIENT_ERROR,TOO_EARLY:425,426:"Upgrade Required","426_NAME":"UPGRADE_REQUIRED","426_MESSAGE":"The client should switch to a different protocol such as TLS/1.0, given in the Upgrade header field.","426_CLASS":t.CLIENT_ERROR,UPGRADE_REQUIRED:426,428:"Precondition Required","428_NAME":"PRECONDITION_REQUIRED","428_MESSAGE":"The origin server requires the request to be conditional.","428_CLASS":t.CLIENT_ERROR,PRECONDITION_REQUIRED:428,429:"Too Many Requests","429_NAME":"TOO_MANY_REQUESTS","429_MESSAGE":"The user has sent too many requests in a given amount of time.","429_CLASS":t.CLIENT_ERROR,TOO_MANY_REQUESTS:429,431:"Request Header Fields Too Large","431_NAME":"REQUEST_HEADER_FIELDS_TOO_LARGE","431_MESSAGE":"The server is unwilling to process the request because either an individual header field, or all the header fields collectively, are too large.","431_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_FIELDS_TOO_LARGE:431,451:"Unavailable For Legal Reasons","451_NAME":"UNAVAILABLE_FOR_LEGAL_REASONS","451_MESSAGE":"A server operator has received a legal demand to deny access to a resource or to a set of resources that includes the requested resource.","451_CLASS":t.CLIENT_ERROR,UNAVAILABLE_FOR_LEGAL_REASONS:451,500:"Internal Server Error","500_NAME":"INTERNAL_SERVER_ERROR","500_MESSAGE":"A generic error message, given when an unexpected condition was encountered and no more specific message is suitable.","500_CLASS":t.SERVER_ERROR,INTERNAL_SERVER_ERROR:500,501:"Not Implemented","501_NAME":"NOT_IMPLEMENTED","501_MESSAGE":"The server either does not recognize the request method, or it lacks the ability to fulfil the request. Usually this implies future availability.","501_CLASS":t.SERVER_ERROR,NOT_IMPLEMENTED:501,502:"Bad Gateway","502_NAME":"BAD_GATEWAY","502_MESSAGE":"The server was acting as a gateway or proxy and received an invalid response from the upstream server.","502_CLASS":t.SERVER_ERROR,BAD_GATEWAY:502,503:"Service Unavailable","503_NAME":"SERVICE_UNAVAILABLE","503_MESSAGE":"The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.","503_CLASS":t.SERVER_ERROR,SERVICE_UNAVAILABLE:503,504:"Gateway Time-out","504_NAME":"GATEWAY_TIMEOUT","504_MESSAGE":"The server was acting as a gateway or proxy and did not receive a timely response from the upstream server.","504_CLASS":t.SERVER_ERROR,GATEWAY_TIMEOUT:504,505:"HTTP Version not Supported","505_NAME":"HTTP_VERSION_NOT_SUPPORTED","505_MESSAGE":"The server does not support the HTTP protocol version used in the request.","505_CLASS":t.SERVER_ERROR,HTTP_VERSION_NOT_SUPPORTED:505,506:"Variant Also Negotiates","506_NAME":"VARIANT_ALSO_NEGOTIATES","506_MESSAGE":"Transparent content negotiation for the request results in a circular reference.","506_CLASS":t.SERVER_ERROR,VARIANT_ALSO_NEGOTIATES:506,507:"Insufficient Storage","507_NAME":"INSUFFICIENT_STORAGE","507_MESSAGE":"The server is unable to store the representation needed to complete the request.","507_CLASS":t.SERVER_ERROR,INSUFFICIENT_STORAGE:507,508:"Loop Detected","508_NAME":"LOOP_DETECTED","508_MESSAGE":"The server detected an infinite loop while processing the request.","508_CLASS":t.SERVER_ERROR,LOOP_DETECTED:508,510:"Not Extended","510_NAME":"NOT_EXTENDED","510_MESSAGE":"Further extensions to the request are required for the server to fulfil it.","510_CLASS":t.SERVER_ERROR,NOT_EXTENDED:510,511:"Network Authentication Required","511_NAME":"NETWORK_AUTHENTICATION_REQUIRED","511_MESSAGE":"The client needs to authenticate to gain network access. Intended for use by intercepting proxies used to control access to the network.","511_CLASS":t.SERVER_ERROR,NETWORK_AUTHENTICATION_REQUIRED:511,extra:{unofficial:{103:"Checkpoint","103_NAME":"CHECKPOINT","103_MESSAGE":"Used in the resumable requests proposal to resume aborted PUT or POST requests.","103_CLASS":t.INFORMATIONAL,CHECKPOINT:103,419:"Page Expired","419_NAME":"PAGE_EXPIRED","419_MESSAGE":"Used by the Laravel Framework when a CSRF Token is missing or expired.","419_CLASS":t.CLIENT_ERROR,PAGE_EXPIRED:419,218:"This is fine","218_NAME":"THIS_IS_FINE","218_MESSAGE":"Used as a catch-all error condition for allowing response bodies to flow through Apache when ProxyErrorOverride is enabled. When ProxyErrorOverride is enabled in Apache, response bodies that contain a status code of 4xx or 5xx are automatically discarded by Apache in favor of a generic response or a custom response specified by the ErrorDocument directive.","218_CLASS":t.SUCCESSFUL,THIS_IS_FINE:218,420:"Enhance Your Calm","420_NAME":"ENHANCE_YOUR_CALM","420_MESSAGE":"Returned by version 1 of the Twitter Search and Trends API when the client is being rate limited; versions 1.1 and later use the 429 Too Many Requests response code instead.","420_CLASS":t.CLIENT_ERROR,ENHANCE_YOUR_CALM:420,450:"Blocked by Windows Parental Controls","450_NAME":"BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS","450_MESSAGE":"The Microsoft extension code indicated when Windows Parental Controls are turned on and are blocking access to the requested webpage.","450_CLASS":t.CLIENT_ERROR,BLOCKED_BY_WINDOWS_PARENTAL_CONTROLS:450,498:"Invalid Token","498_NAME":"INVALID_TOKEN","498_MESSAGE":"Returned by ArcGIS for Server. Code 498 indicates an expired or otherwise invalid token.","498_CLASS":t.CLIENT_ERROR,INVALID_TOKEN:498,499:"Token Required","499_NAME":"TOKEN_REQUIRED","499_MESSAGE":"Returned by ArcGIS for Server. Code 499 indicates that a token is required but was not submitted.","499_CLASS":t.CLIENT_ERROR,TOKEN_REQUIRED:499,509:"Bandwidth Limit Exceeded","509_NAME":"BANDWIDTH_LIMIT_EXCEEDED","509_MESSAGE":"The server has exceeded the bandwidth specified by the server administrator.","509_CLASS":t.SERVER_ERROR,BANDWIDTH_LIMIT_EXCEEDED:509,530:"Site is frozen","530_NAME":"SITE_IS_FROZEN","530_MESSAGE":"Used by the Pantheon web platform to indicate a site that has been frozen due to inactivity.","530_CLASS":t.SERVER_ERROR,SITE_IS_FROZEN:530,598:"Network read timeout error","598_NAME":"NETWORK_READ_TIMEOUT_ERROR","598_MESSAGE":"Used by some HTTP proxies to signal a network read timeout behind the proxy to a client in front of the proxy.","598_CLASS":t.SERVER_ERROR,NETWORK_READ_TIMEOUT_ERROR:598},iis:{440:"Login Time-out","440_NAME":"LOGIN_TIME_OUT","440_MESSAGE":"The client's session has expired and must log in again.","440_CLASS":t.CLIENT_ERROR,LOGIN_TIME_OUT:440,449:"Retry With","449_NAME":"RETRY_WITH","449_MESSAGE":"The server cannot honour the request because the user has not provided the required information.","449_CLASS":t.CLIENT_ERROR,RETRY_WITH:449,451:"Redirect","451_NAME":"REDIRECT","451_MESSAGE":"Used in Exchange ActiveSync when either a more efficient server is available or the server cannot access the users' mailbox.","451_CLASS":t.CLIENT_ERROR,REDIRECT:451},nginx:{444:"No Response","444_NAME":"NO_RESPONSE","444_MESSAGE":"Used internally to instruct the server to return no information to the client and close the connection immediately.","444_CLASS":t.CLIENT_ERROR,NO_RESPONSE:444,494:"Request header too large","494_NAME":"REQUEST_HEADER_TOO_LARGE","494_MESSAGE":"Client sent too large request or too long header line.","494_CLASS":t.CLIENT_ERROR,REQUEST_HEADER_TOO_LARGE:494,495:"SSL Certificate Error","495_NAME":"SSL_CERTIFICATE_ERROR","495_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has provided an invalid client certificate.","495_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_ERROR:495,496:"SSL Certificate Required","496_NAME":"SSL_CERTIFICATE_REQUIRED","496_MESSAGE":"An expansion of the 400 Bad Request response code, used when a client certificate is required but not provided.","496_CLASS":t.CLIENT_ERROR,SSL_CERTIFICATE_REQUIRED:496,497:"HTTP Request Sent to HTTPS Port","497_NAME":"HTTP_REQUEST_SENT_TO_HTTPS_PORT","497_MESSAGE":"An expansion of the 400 Bad Request response code, used when the client has made a HTTP request to a port listening for HTTPS requests.","497_CLASS":t.CLIENT_ERROR,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,499:"Client Closed Request","499_NAME":"CLIENT_CLOSED_REQUEST","499_MESSAGE":"Used when the client has closed the request before the server could send a response.","499_CLASS":t.CLIENT_ERROR,CLIENT_CLOSED_REQUEST:499},cloudflare:{520:"Unknown Error","520_NAME":"UNKNOWN_ERROR","520_MESSAGE":'The 520 error is used as a "catch-all response for when the origin server returns something unexpected", listing connection resets, large headers, and empty or invalid responses as common triggers.',"520_CLASS":t.SERVER_ERROR,UNKNOWN_ERROR:520,521:"Web Server Is Down","521_NAME":"WEB_SERVER_IS_DOWN","521_MESSAGE":"The origin server has refused the connection from Cloudflare.","521_CLASS":t.SERVER_ERROR,WEB_SERVER_IS_DOWN:521,522:"Connection Timed Out","522_NAME":"CONNECTION_TIMED_OUT","522_MESSAGE":"Cloudflare could not negotiate a TCP handshake with the origin server.","522_CLASS":t.SERVER_ERROR,CONNECTION_TIMED_OUT:522,523:"Origin Is Unreachable","523_NAME":"ORIGIN_IS_UNREACHABLE","523_MESSAGE":"Cloudflare could not reach the origin server.","523_CLASS":t.SERVER_ERROR,ORIGIN_IS_UNREACHABLE:523,524:"A Timeout Occurred","524_NAME":"A_TIMEOUT_OCCURRED","524_MESSAGE":"Cloudflare was able to complete a TCP connection to the origin server, but did not receive a timely HTTP response.","524_CLASS":t.SERVER_ERROR,A_TIMEOUT_OCCURRED:524,525:"SSL Handshake Failed","525_NAME":"SSL_HANDSHAKE_FAILED","525_MESSAGE":"Cloudflare could not negotiate a SSL/TLS handshake with the origin server.","525_CLASS":t.SERVER_ERROR,SSL_HANDSHAKE_FAILED:525,526:"Invalid SSL Certificate","526_NAME":"INVALID_SSL_CERTIFICATE","526_MESSAGE":"Cloudflare could not validate the SSL/TLS certificate that the origin server presented.","526_CLASS":t.SERVER_ERROR,INVALID_SSL_CERTIFICATE:526,527:"Railgun Error","527_NAME":"RAILGUN_ERROR","527_MESSAGE":"Error 527 indicates that the request timed out or failed after the WAN connection had been established.","527_CLASS":t.SERVER_ERROR,RAILGUN_ERROR:527}}},r=i;e.s(["a",()=>i,"b",()=>r],792367),e.s([],10188),e.s(["status",()=>i],785867);let n="APIError";class s extends Error{data;isOperational;isPublic;status;constructor(e,t,i,r){super(e,{cause:i}),n=this.constructor.name,this.name=this.constructor.name,this.message=e,this.status=t,this.data=i,this.isPublic=r,this.isOperational=!0,Error.captureStackTrace(this,this.constructor)}}class a extends s{constructor(e,t=i.INTERNAL_SERVER_ERROR,r=null,n){super(e,t,r,"boolean"==typeof n?n:t!==i.INTERNAL_SERVER_ERROR)}}e.s(["APIError",()=>a,"APIErrorName",()=>n],700859)},456937,(e,t,i)=>{"use strict";function r(e,t,i,r,n){for(let s=0;s<n;++s)if(e[t+s]!==i[r+s])return!1;return!0}class n{constructor(e,t){if("function"!=typeof t)throw Error("Missing match callback");if("string"==typeof e)e=Buffer.from(e);else if(!Buffer.isBuffer(e))throw Error(`Expected Buffer for needle, got ${typeof e}`);const i=e.length;if(this.maxMatches=1/0,this.matches=0,this._cb=t,this._lookbehindSize=0,this._needle=e,this._bufPos=0,this._lookbehind=Buffer.allocUnsafe(i),this._occ=[i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i,i],i>1)for(let t=0;t<i-1;++t)this._occ[e[t]]=i-1-t}reset(){this.matches=0,this._lookbehindSize=0,this._bufPos=0}push(e,t){let i;Buffer.isBuffer(e)||(e=Buffer.from(e,"latin1"));let r=e.length;for(this._bufPos=t||0;i!==r&&this.matches<this.maxMatches;)i=s(this,e);return i}destroy(){let e=this._lookbehindSize;e&&this._cb(!1,this._lookbehind,0,e,!1),this.reset()}}function s(e,t){let i=t.length,n=e._needle,s=n.length,o=-e._lookbehindSize,l=s-1,c=n[l],d=i-s,u=e._occ,h=e._lookbehind;if(o<0){for(;o<0&&o<=d;){let i=o+l,r=i<0?h[e._lookbehindSize+i]:t[i];if(r===c&&a(e,t,o,l))return e._lookbehindSize=0,++e.matches,o>-e._lookbehindSize?e._cb(!0,h,0,e._lookbehindSize+o,!1):e._cb(!0,void 0,0,0,!0),e._bufPos=o+s;o+=u[r]}for(;o<0&&!a(e,t,o,i-o);)++o;if(o<0){let r=e._lookbehindSize+o;return r>0&&e._cb(!1,h,0,r,!1),e._lookbehindSize-=r,h.copy(h,0,r,e._lookbehindSize),h.set(t,e._lookbehindSize),e._lookbehindSize+=i,e._bufPos=i,i}e._cb(!1,h,0,e._lookbehindSize,!1),e._lookbehindSize=0}o+=e._bufPos;let A=n[0];for(;o<=d;){let i=t[o+l];if(i===c&&t[o]===A&&r(n,0,t,o,l))return++e.matches,o>0?e._cb(!0,t,e._bufPos,o,!0):e._cb(!0,void 0,0,0,!0),e._bufPos=o+s;o+=u[i]}for(;o<i;){if(t[o]!==A||!r(t,o,n,0,i-o)){++o;continue}t.copy(h,0,o,i),e._lookbehindSize=i-o;break}return o>0&&e._cb(!1,t,e._bufPos,o<i?o:i,!0),e._bufPos=i,i}function a(e,t,i,r){let n=e._lookbehind,s=e._lookbehindSize,a=e._needle;for(let e=0;e<r;++e,++i)if((i<0?n[s+i]:t[i])!==a[e])return!1;return!0}t.exports=n},24947,(e,t,i)=>{"use strict";function r(e,t,i){for(;t<e.length;){let r,n;for(;t<e.length;++t){let i=e.charCodeAt(t);if(32!==i&&9!==i)break}if(t===e.length)break;if(59!==e.charCodeAt(t++))return;for(;t<e.length;++t){let i=e.charCodeAt(t);if(32!==i&&9!==i)break}if(t===e.length)return;let s=t;for(;t<e.length;++t){let i=e.charCodeAt(t);if(1!==l[i]){if(61!==i)return;break}}if(t===e.length||(r=e.slice(s,t),++t===e.length))return;let a="";if(34===e.charCodeAt(t)){n=++t;let i=!1;for(;t<e.length;++t){let r=e.charCodeAt(t);if(92===r){i?(n=t,i=!1):(a+=e.slice(n,t),i=!0);continue}if(34===r){if(i){n=t,i=!1;continue}a+=e.slice(n,t);break}if(i&&(n=t-1,i=!1),1!==c[r])return}if(t===e.length)return;++t}else{for(n=t;t<e.length;++t)if(1!==l[e.charCodeAt(t)]){if(t===n)return;break}a=e.slice(n,t)}void 0===i[r=r.toLowerCase()]&&(i[r]=a)}return i}function n(e,t,i,r){for(;t<e.length;){let n,s,a;for(;t<e.length;++t){let i=e.charCodeAt(t);if(32!==i&&9!==i)break}if(t===e.length)break;if(59!==e.charCodeAt(t++))return;for(;t<e.length;++t){let i=e.charCodeAt(t);if(32!==i&&9!==i)break}if(t===e.length)return;let A=t;for(;t<e.length;++t){let i=e.charCodeAt(t);if(1!==l[i]){if(61===i)break;return}}if(t===e.length)return;let p="";if(42===(n=e.slice(A,t)).charCodeAt(n.length-1)){let i=++t;for(;t<e.length;++t){let i=e.charCodeAt(t);if(1!==d[i]){if(39!==i)return;break}}if(t===e.length)return;for(a=e.slice(i,t),++t;t<e.length&&39!==e.charCodeAt(t);++t);if(t===e.length||++t===e.length)return;s=t;let r=0;for(;t<e.length;++t){let i=e.charCodeAt(t);if(1!==u[i]){if(37===i){let i,n;if(t+2<e.length&&-1!==(i=h[e.charCodeAt(t+1)])&&-1!==(n=h[e.charCodeAt(t+2)])){let a=(i<<4)+n;p+=e.slice(s,t),p+=String.fromCharCode(a),t+=2,s=t+1,a>=128?r=2:0===r&&(r=1);continue}return}break}}if(p+=e.slice(s,t),void 0===(p=o(p,a,r)))return}else{if(++t===e.length)return;if(34===e.charCodeAt(t)){s=++t;let i=!1;for(;t<e.length;++t){let r=e.charCodeAt(t);if(92===r){i?(s=t,i=!1):(p+=e.slice(s,t),i=!0);continue}if(34===r){if(i){s=t,i=!1;continue}p+=e.slice(s,t);break}if(i&&(s=t-1,i=!1),1!==c[r])return}if(t===e.length)return;++t}else{for(s=t;t<e.length;++t)if(1!==l[e.charCodeAt(t)]){if(t===s)return;break}p=e.slice(s,t)}if(void 0===(p=r(p,2)))return}void 0===i[n=n.toLowerCase()]&&(i[n]=p)}return i}function s(e){let t;for(;;)switch(e){case"utf-8":case"utf8":return a.utf8;case"latin1":case"ascii":case"us-ascii":case"iso-8859-1":case"iso8859-1":case"iso88591":case"iso_8859-1":case"windows-1252":case"iso_8859-1:1987":case"cp1252":case"x-cp1252":return a.latin1;case"utf16le":case"utf-16le":case"ucs2":case"ucs-2":return a.utf16le;case"base64":return a.base64;default:if(void 0===t){t=!0,e=e.toLowerCase();continue}return a.other.bind(e)}}let a={utf8:(e,t)=>{if(0===e.length)return"";if("string"==typeof e){if(t<2)return e;e=Buffer.from(e,"latin1")}return e.utf8Slice(0,e.length)},latin1:(e,t)=>0===e.length?"":"string"==typeof e?e:e.latin1Slice(0,e.length),utf16le:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.ucs2Slice(0,e.length)),base64:(e,t)=>0===e.length?"":("string"==typeof e&&(e=Buffer.from(e,"latin1")),e.base64Slice(0,e.length)),other:(t,i)=>{if(0===t.length)return"";"string"==typeof t&&(t=Buffer.from(t,"latin1"));try{return new TextDecoder(e.e).decode(t)}catch{}}};function o(e,t,i){let r=s(t);if(r)return r(e,i)}let l=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],c=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1],d=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,0,0,0,0,1,0,1,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],u=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,0,1,0,0,0,0,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],h=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];t.exports={basename:function(e){if("string"!=typeof e)return"";for(let t=e.length-1;t>=0;--t)switch(e.charCodeAt(t)){case 47:case 92:return".."===(e=e.slice(t+1))||"."===e?"":e}return".."===e||"."===e?"":e},convertToUTF8:o,getDecoder:s,parseContentType:function(e){if(0===e.length)return;let t=Object.create(null),i=0;for(;i<e.length;++i){let t=e.charCodeAt(i);if(1!==l[t]){if(47!==t||0===i)return;break}}if(i===e.length)return;let n=e.slice(0,i).toLowerCase(),s=++i;for(;i<e.length;++i)if(1!==l[e.charCodeAt(i)]){if(i===s||void 0===r(e,i,t))return;break}if(i!==s)return{type:n,subtype:e.slice(s,i).toLowerCase(),params:t}},parseDisposition:function(e,t){if(0===e.length)return;let i=Object.create(null),r=0;for(;r<e.length;++r)if(1!==l[e.charCodeAt(r)]){if(void 0===n(e,r,i,t))return;break}return{type:e.slice(0,r).toLowerCase(),params:i}}}},590812,(e,t,i)=>{"use strict";let{Readable:r,Writable:n}=e.r(688947),s=e.r(456937),{basename:a,convertToUTF8:o,getDecoder:l,parseContentType:c,parseDisposition:d}=e.r(24947),u=Buffer.from("\r\n"),h=Buffer.from("\r"),A=Buffer.from("-");function p(){}let f=2e3,g=16384,m=0,y=1,b=2;class E{constructor(e){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=m,this.name="",this.value="",this.crlf=0,this.cb=e}reset(){this.header=Object.create(null),this.pairCount=0,this.byteCount=0,this.state=m,this.name="",this.value="",this.crlf=0}push(e,t,i){let r=t;for(;t<i;)switch(this.state){case m:{let n=!1;for(;t<i;++t){if(this.byteCount===g)return -1;++this.byteCount;let i=e[t];if(1!==S[i]){if(58!==i||(this.name+=e.latin1Slice(r,t),0===this.name.length))return -1;++t,n=!0,this.state=y;break}}if(!n){this.name+=e.latin1Slice(r,t);break}}case y:{let n=!1;for(;t<i;++t){if(this.byteCount===g)return -1;++this.byteCount;let i=e[t];if(32!==i&&9!==i){r=t,n=!0,this.state=b;break}}if(!n)break}case b:switch(this.crlf){case 0:for(;t<i;++t){if(this.byteCount===g)return -1;++this.byteCount;let i=e[t];if(1!==k[i]){if(13!==i)return -1;++this.crlf;break}}this.value+=e.latin1Slice(r,t++);break;case 1:if(this.byteCount===g||(++this.byteCount,10!==e[t++]))return -1;++this.crlf;break;case 2:{if(this.byteCount===g)return -1;++this.byteCount;let i=e[t];32===i||9===i?(r=t,this.crlf=0):(++this.pairCount<f&&(this.name=this.name.toLowerCase(),void 0===this.header[this.name]?this.header[this.name]=[this.value]:this.header[this.name].push(this.value)),13===i?(++this.crlf,++t):(r=t,this.crlf=0,this.state=m,this.name="",this.value=""));break}case 3:{if(this.byteCount===g||(++this.byteCount,10!==e[t++]))return -1;let i=this.header;return this.reset(),this.cb(i),t}}}return t}}class C extends r{constructor(e,t){super(e),this.truncated=!1,this._readcb=null,this.once("end",()=>{if(this._read(),0==--t._fileEndsLeft&&t._finalcb){let e=t._finalcb;t._finalcb=null,process.nextTick(e)}})}_read(e){let t=this._readcb;t&&(this._readcb=null,t())}}let w={push:(e,t)=>{},destroy:()=>{}};function I(e,t){let i=e._writecb;e._writecb=null,t?e.destroy(t):i&&i()}function v(e,t){return e}class B extends n{constructor(e){let t,i,r,n,f;if(super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.highWaterMark?e.highWaterMark:void 0}),!e.conType.params||"string"!=typeof e.conType.params.boundary)throw Error("Multipart: Boundary not found");const g=e.conType.params.boundary,m="string"==typeof e.defParamCharset&&e.defParamCharset?l(e.defParamCharset):v,y=e.defCharset||"utf8",b=e.preservePath,I={autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.fileHwm?e.fileHwm:void 0},B=e.limits,Q=B&&"number"==typeof B.fieldSize?B.fieldSize:1048576,x=B&&"number"==typeof B.fileSize?B.fileSize:1/0,S=B&&"number"==typeof B.files?B.files:1/0,k=B&&"number"==typeof B.fields?B.fields:1/0,T=B&&"number"==typeof B.parts?B.parts:1/0;let N=-1,D=0,_=0,R=!1;this._fileEndsLeft=0,this._fileStream=void 0,this._complete=!1;let L=0,F=0,M=!1,O=!1,U=!1;this._hparser=null;const P=new E(e=>{let s;if(this._hparser=null,R=!1,n="text/plain",i=y,r="7bit",f=void 0,M=!1,!e["content-disposition"]){R=!0;return}let o=d(e["content-disposition"][0],m);if(!o||"form-data"!==o.type){R=!0;return}if(o.params&&(o.params.name&&(f=o.params.name),o.params["filename*"]?s=o.params["filename*"]:o.params.filename&&(s=o.params.filename),void 0===s||b||(s=a(s))),e["content-type"]){let t=c(e["content-type"][0]);t&&(n=`${t.type}/${t.subtype}`,t.params&&"string"==typeof t.params.charset&&(i=t.params.charset.toLowerCase()))}if(e["content-transfer-encoding"]&&(r=e["content-transfer-encoding"][0].toLowerCase()),"application/octet-stream"===n||void 0!==s){if(_===S){O||(O=!0,this.emit("filesLimit")),R=!0;return}if(++_,0===this.listenerCount("file")){R=!0;return}L=0,this._fileStream=new C(I,this),++this._fileEndsLeft,this.emit("file",f,this._fileStream,{filename:s,encoding:r,mimeType:n})}else{if(D===k){U||(U=!0,this.emit("fieldsLimit")),R=!0;return}if(++D,0===this.listenerCount("field")){R=!0;return}t=[],F=0}});let $=0;const j=(e,s,a,l,c)=>{for(;s;){if(null!==this._hparser){let e=this._hparser.push(s,a,l);if(-1===e){this._hparser=null,P.reset(),this.emit("error",Error("Malformed part header"));break}a=e}if(a===l)break;if(0!==$){if(1===$){switch(s[a]){case 45:$=2,++a;break;case 13:$=3,++a;break;default:$=0}if(a===l)return}if(2===$){if($=0,45===s[a]){this._complete=!0,this._bparser=w;return}let e=this._writecb;this._writecb=p,j(!1,A,0,1,!1),this._writecb=e}else if(3===$){if($=0,10===s[a]){if(++a,N>=T||(this._hparser=P,a===l))break;continue}{let e=this._writecb;this._writecb=p,j(!1,h,0,1,!1),this._writecb=e}}}if(!R){if(this._fileStream){let e,t=Math.min(l-a,x-L);c?e=s.slice(a,a+t):(e=Buffer.allocUnsafe(t),s.copy(e,0,a,a+t)),(L+=e.length)===x?(e.length>0&&this._fileStream.push(e),this._fileStream.emit("limit"),this._fileStream.truncated=!0,R=!0):this._fileStream.push(e)||(this._writecb&&(this._fileStream._readcb=this._writecb),this._writecb=null)}else if(void 0!==t){let e,i=Math.min(l-a,Q-F);c?e=s.slice(a,a+i):(e=Buffer.allocUnsafe(i),s.copy(e,0,a,a+i)),F+=i,t.push(e),F===Q&&(R=!0,M=!0)}}break}if(e){if($=1,this._fileStream)this._fileStream.push(null),this._fileStream=null;else if(void 0!==t){let e;switch(t.length){case 0:e="";break;case 1:e=o(t[0],i,0);break;default:e=o(Buffer.concat(t,F),i,0)}t=void 0,F=0,this.emit("field",f,e,{nameTruncated:!1,valueTruncated:M,encoding:r,mimeType:n})}++N===T&&this.emit("partsLimit")}};this._bparser=new s(`\r
|
||
--${g}`,j),this._writecb=null,this._finalcb=null,this.write(u)}static detect(e){return"multipart"===e.type&&"form-data"===e.subtype}_write(e,t,i){this._writecb=i,this._bparser.push(e,0),this._writecb&&I(this)}_destroy(e,t){this._hparser=null,this._bparser=w,e||(e=x(this));let i=this._fileStream;i&&(this._fileStream=null,i.destroy(e)),t(e)}_final(e){if(this._bparser.destroy(),!this._complete)return e(Error("Unexpected end of form"));this._fileEndsLeft?this._finalcb=Q.bind(null,this,e):Q(this,e)}}function Q(e,t,i){if(i)return t(i);t(i=x(e))}function x(e){if(e._hparser)return Error("Malformed part header");let t=e._fileStream;if(t&&(e._fileStream=null,t.destroy(Error("Unexpected end of file"))),!e._complete)return Error("Unexpected end of form")}let S=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k=[0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1];t.exports=B},274177,(e,t,i)=>{"use strict";let{Writable:r}=e.r(688947),{getDecoder:n}=e.r(24947);class s extends r{constructor(e){super({autoDestroy:!0,emitClose:!0,highWaterMark:"number"==typeof e.highWaterMark?e.highWaterMark:void 0});let t=e.defCharset||"utf8";e.conType.params&&"string"==typeof e.conType.params.charset&&(t=e.conType.params.charset),this.charset=t;const i=e.limits;this.fieldSizeLimit=i&&"number"==typeof i.fieldSize?i.fieldSize:1048576,this.fieldsLimit=i&&"number"==typeof i.fields?i.fields:1/0,this.fieldNameSizeLimit=i&&"number"==typeof i.fieldNameSize?i.fieldNameSize:100,this._inKey=!0,this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,this._fields=0,this._key="",this._val="",this._byte=-2,this._lastPos=0,this._encode=0,this._decoder=n(t)}static detect(e){return"application"===e.type&&"x-www-form-urlencoded"===e.subtype}_write(e,t,i){if(this._fields>=this.fieldsLimit)return i();let r=0,n=e.length;if(this._lastPos=0,-2!==this._byte){if(-1===(r=a(this,e,r,n)))return i(Error("Malformed urlencoded form"));if(r>=n)return i();this._inKey?++this._bytesKey:++this._bytesVal}e:for(;r<n;)if(this._inKey){for(r=o(this,e,r,n);r<n;){switch(e[r]){case 61:this._lastPos<r&&(this._key+=e.latin1Slice(this._lastPos,r)),this._lastPos=++r,this._key=this._decoder(this._key,this._encode),this._encode=0,this._inKey=!1;continue e;case 38:if(this._lastPos<r&&(this._key+=e.latin1Slice(this._lastPos,r)),this._lastPos=++r,this._key=this._decoder(this._key,this._encode),this._encode=0,this._bytesKey>0&&this.emit("field",this._key,"",{nameTruncated:this._keyTrunc,valueTruncated:!1,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),i();continue;case 43:this._lastPos<r&&(this._key+=e.latin1Slice(this._lastPos,r)),this._key+=" ",this._lastPos=r+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<r&&(this._key+=e.latin1Slice(this._lastPos,r)),this._lastPos=r+1,this._byte=-1,-1===(r=a(this,e,r+1,n)))return i(Error("Malformed urlencoded form"));if(r>=n)return i();++this._bytesKey,r=o(this,e,r,n);continue}++r,++this._bytesKey,r=o(this,e,r,n)}this._lastPos<r&&(this._key+=e.latin1Slice(this._lastPos,r))}else{for(r=l(this,e,r,n);r<n;){switch(e[r]){case 38:if(this._lastPos<r&&(this._val+=e.latin1Slice(this._lastPos,r)),this._lastPos=++r,this._inKey=!0,this._val=this._decoder(this._val,this._encode),this._encode=0,(this._bytesKey>0||this._bytesVal>0)&&this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"}),this._key="",this._val="",this._keyTrunc=!1,this._valTrunc=!1,this._bytesKey=0,this._bytesVal=0,++this._fields>=this.fieldsLimit)return this.emit("fieldsLimit"),i();continue e;case 43:this._lastPos<r&&(this._val+=e.latin1Slice(this._lastPos,r)),this._val+=" ",this._lastPos=r+1;break;case 37:if(0===this._encode&&(this._encode=1),this._lastPos<r&&(this._val+=e.latin1Slice(this._lastPos,r)),this._lastPos=r+1,this._byte=-1,-1===(r=a(this,e,r+1,n)))return i(Error("Malformed urlencoded form"));if(r>=n)return i();++this._bytesVal,r=l(this,e,r,n);continue}++r,++this._bytesVal,r=l(this,e,r,n)}this._lastPos<r&&(this._val+=e.latin1Slice(this._lastPos,r))}i()}_final(e){if(-2!==this._byte)return e(Error("Malformed urlencoded form"));(!this._inKey||this._bytesKey>0||this._bytesVal>0)&&(this._inKey?this._key=this._decoder(this._key,this._encode):this._val=this._decoder(this._val,this._encode),this.emit("field",this._key,this._val,{nameTruncated:this._keyTrunc,valueTruncated:this._valTrunc,encoding:this.charset,mimeType:"text/plain"})),e()}}function a(e,t,i,r){if(i>=r)return r;if(-1===e._byte){let n=c[t[i++]];if(-1===n)return -1;if(n>=8&&(e._encode=2),i<r){let r=c[t[i++]];if(-1===r)return -1;e._inKey?e._key+=String.fromCharCode((n<<4)+r):e._val+=String.fromCharCode((n<<4)+r),e._byte=-2,e._lastPos=i}else e._byte=n}else{let r=c[t[i++]];if(-1===r)return -1;e._inKey?e._key+=String.fromCharCode((e._byte<<4)+r):e._val+=String.fromCharCode((e._byte<<4)+r),e._byte=-2,e._lastPos=i}return i}function o(e,t,i,r){if(e._bytesKey>e.fieldNameSizeLimit){for(!e._keyTrunc&&e._lastPos<i&&(e._key+=t.latin1Slice(e._lastPos,i-1)),e._keyTrunc=!0;i<r;++i){let r=t[i];if(61===r||38===r)break;++e._bytesKey}e._lastPos=i}return i}function l(e,t,i,r){if(e._bytesVal>e.fieldSizeLimit){for(!e._valTrunc&&e._lastPos<i&&(e._val+=t.latin1Slice(e._lastPos,i-1)),e._valTrunc=!0;i<r&&38!==t[i];++i)++e._bytesVal;e._lastPos=i}return i}let c=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,2,3,4,5,6,7,8,9,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,10,11,12,13,14,15,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1];t.exports=s},489725,(e,t,i)=>{"use strict";let{parseContentType:r}=e.r(24947);function n(e){let t=e.headers,i=r(t["content-type"]);if(!i)throw Error("Malformed content type");for(let r of s){if(!r.detect(i))continue;let n={limits:e.limits,headers:t,conType:i,highWaterMark:void 0,fileHwm:void 0,defCharset:void 0,defParamCharset:void 0,preservePath:!1};return e.highWaterMark&&(n.highWaterMark=e.highWaterMark),e.fileHwm&&(n.fileHwm=e.fileHwm),n.defCharset=e.defCharset,n.defParamCharset=e.defParamCharset,n.preservePath=e.preservePath,new r(n)}throw Error(`Unsupported content type: ${t["content-type"]}`)}let s=[e.r(590812),e.r(274177)].filter(function(e){return"function"==typeof e.detect});t.exports=e=>{if(("object"!=typeof e||null===e)&&(e={}),"object"!=typeof e.headers||null===e.headers||"string"!=typeof e.headers["content-type"])throw Error("Missing Content-Type");return n(e)}},510322,e=>{"use strict";let t=({fallbackLocale:e,locale:t,localization:i})=>{if(null==e){if(i&&i.fallback){let e=i.locales.length?i.locales.find(e=>e.code===t)?.fallbackLocale:void 0;return e||i.defaultLocale}}else if(Array.isArray(e))return e.filter(e=>i.localeCodes.includes(e));else if(e){if(["false","none","null"].includes(e))return!1;if(i.localeCodes.includes(e))return e}return!1};e.s(["sanitizeFallbackLocale",0,t])},490046,680381,e=>{"use strict";var t=e.i(510322);function i(e){let{data:t,payload:{config:i}}=e;if(t){let n,s,a=e.locale,o=e.fallbackLocale;if(!a&&t?.locale&&"string"==typeof t.locale&&(n=t.locale),!o&&(t?.["fallback-locale"]&&"string"==typeof t?.["fallback-locale"]&&(s=t["fallback-locale"]),t?.fallbackLocale&&"string"==typeof t?.fallbackLocale&&(s=t.fallbackLocale)),!a||!o){let{fallbackLocale:t,locale:a}=r({fallbackLocale:s,locale:n,localization:i.localization});n&&(e.locale=a),s&&(e.fallbackLocale=t)}}}let r=({fallbackLocale:e,locale:i,localization:r})=>(r&&(e=(0,t.sanitizeFallbackLocale)({fallbackLocale:e,locale:i,localization:r})),["*","all"].includes(i)?i="all":r&&!r.localeCodes.includes(i)&&r.fallback&&(i=r.defaultLocale),{fallbackLocale:e,locale:i});e.s(["addLocalesToRequestFromData",()=>i,"sanitizeLocales",0,r],490046);let n=({headers:e,req:t})=>{let i=t?.payload?.config.cors,r=t?.headers?.get("Origin");if(i){let t=["Origin","X-Requested-With","Content-Type","Accept","Authorization","Content-Encoding","x-apollo-tracing","X-Payload-HTTP-Method-Override"];e.has("Access-Control-Allow-Methods")||e.set("Access-Control-Allow-Methods","PUT, PATCH, POST, GET, DELETE, OPTIONS"),e.has("Access-Control-Allow-Headers")||("object"==typeof i&&"headers"in i?e.set("Access-Control-Allow-Headers",[...t,...i.headers].filter(Boolean).join(", ")):e.set("Access-Control-Allow-Headers",t.join(", "))),!e.has("Access-Control-Allow-Origin")&&("*"===i||"object"==typeof i&&"origins"in i&&"*"===i.origins?e.set("Access-Control-Allow-Origin","*"):(Array.isArray(i)&&i.indexOf(r)>-1||!Array.isArray(i)&&"object"==typeof i&&"origins"in i&&i.origins.indexOf(r)>-1)&&(e.set("Access-Control-Allow-Credentials","true"),e.set("Access-Control-Allow-Origin",r)))}return e};e.s(["headersWithCors",0,n],680381)},893961,e=>{"use strict";async function t(e){let{payload:t,transactionID:i}=e;if(i&&!(i instanceof Promise)){try{await t.db.rollbackTransaction(e.transactionID)}catch(e){}delete e.transactionID}}e.s(["killTransaction",()=>t])},72004,(e,t,i)=>{"use strict";let r=e.r(316444),n=process.env;function s(e){return"string"==typeof e?!!n[e]:"env"in e?n[e.env]&&n[e.env].includes(e.includes):"any"in e?e.any.some(function(e){return!!n[e]}):Object.keys(e).every(function(t){return n[t]===e[t]})}function a(e){switch(typeof e.pr){case"string":return!!n[e.pr];case"object":if("env"in e.pr)if("any"in e.pr)return e.pr.any.some(function(t){return n[e.pr.env]===t});else return e.pr.env in n&&n[e.pr.env]!==e.pr.ne;if("any"in e.pr)return e.pr.any.some(function(e){return!!n[e]});return s(e.pr);default:return null}}Object.defineProperty(i,"_vendors",{value:r.map(function(e){return e.constant})}),i.name=null,i.isPR=null,i.id=null,"false"!==n.CI&&r.forEach(function(e){let t=(Array.isArray(e.env)?e.env:[e.env]).every(function(e){return s(e)});i[e.constant]=t,t&&(i.name=e.name,i.isPR=a(e),i.id=e.constant)}),i.isCI=!!("false"!==n.CI&&(n.BUILD_ID||n.BUILD_NUMBER||n.CI||n.CI_APP_ID||n.CI_BUILD_ID||n.CI_BUILD_NUMBER||n.CI_NAME||n.CONTINUOUS_INTEGRATION||n.RUN_ID||i.name))},876474,e=>{"use strict";var t=e.i(522734),i=e.i(814747);function r({condition:e,dir:t,fileNames:r}){let{root:n}=i.default.parse(t);for(;;){if(r?.length){let a=!1;for(let n of r){let r=i.default.join(t,n);if(s(r)){if(!e)return r;a=!0;break}}if(!a&&t!==n){t=i.default.dirname(t);continue}}let a=e?.(t);if(!0===a)return t;if("string"==typeof a&&a?.length)return a;if(t===n)return null;t=i.default.dirname(t)}}async function n({condition:e,dir:t,fileNames:r}){let{root:n}=i.default.parse(t);for(;;){if(r?.length){let s=!1;for(let n of r){let r=i.default.resolve(t,n);if(await a(r)){if(!e)return r;s=!0;break}}if(!s&&t!==n){t=i.default.dirname(t);continue}}let s=await e?.(t);if(!0===s)return t;if("string"==typeof s&&s?.length)return s;if(t===n)return null;t=i.default.dirname(t)}}function s(e){try{return t.default.accessSync(e),!0}catch{return!1}}async function a(e){try{return await t.default.promises.access(e),!0}catch{return!1}}e.s(["findUp",()=>n,"findUpSync",()=>r])},117993,750716,e=>{"use strict";var t=e.i(233405),i=e.i(72004),r=e.i(254799),n=e.i(522734),s=e.i(814747),a=e.i(792509),o=e.i(876474),l=e.i(57328),c=e.i(902157),d=e.i(750227),u=e.i(660526),h=d,A=e.i(59639);let p=u.default.homedir(),f=u.default.tmpdir(),{env:g}=A.default,m=e=>{let t=h.default.join(p,"Library");return{cache:h.default.join(t,"Caches",e),config:h.default.join(t,"Preferences",e),data:h.default.join(t,"Application Support",e),log:h.default.join(t,"Logs",e),temp:h.default.join(f,e)}},y=e=>{let t=g.APPDATA||h.default.join(p,"AppData","Roaming"),i=g.LOCALAPPDATA||h.default.join(p,"AppData","Local");return{cache:h.default.join(i,e,"Cache"),config:h.default.join(t,e,"Config"),data:h.default.join(i,e,"Data"),log:h.default.join(i,e,"Log"),temp:h.default.join(f,e)}},b=e=>{let t=h.default.basename(p);return{cache:h.default.join(g.XDG_CACHE_HOME||h.default.join(p,".cache"),e),config:h.default.join(g.XDG_CONFIG_HOME||h.default.join(p,".config"),e),data:h.default.join(g.XDG_DATA_HOME||h.default.join(p,".local","share"),e),log:h.default.join(g.XDG_STATE_HOME||h.default.join(p,".local","state"),e),temp:h.default.join(f,t,e)}};function E(e,{suffix:t="nodejs"}={}){if("string"!=typeof e)throw TypeError(`Expected a string, got ${typeof e}`);return(t&&(e+=`-${t}`),"darwin"===A.default.platform)?m(e):"win32"===A.default.platform?y(e):b(e)}let C=()=>Object.create(null),w=(e,t)=>{let i=new Set(["function","symbol","undefined"]),r=typeof t;if(i.has(r))throw TypeError(`Setting a value of type \`${r}\` for key \`${e}\` is not allowed as it's not supported by JSON`)};class I{#e;_deserialize=e=>JSON.parse(e);_serialize=e=>JSON.stringify(e,void 0," ");events;path;constructor(){const e={configFileMode:438,configName:"config",fileExtension:"json",projectSuffix:"nodejs"},t=E("payload",{suffix:e.projectSuffix}).config;this.#e=e,this.events=new EventTarget;const i=e.fileExtension?`.${e.fileExtension}`:"";this.path=d.default.resolve(t,`${e.configName??"config"}${i}`);const r=this.store,n=Object.assign(C(),r);try{l.default.deepEqual(r,n)}catch{this.store=n}}_ensureDirectory(){c.default.mkdirSync(d.default.dirname(this.path),{recursive:!0})}_write(e){let t=this._serialize(e);c.default.writeFileSync(this.path,t,{mode:this.#e.configFileMode})}delete(e){let{store:t}=this;delete t[e],this.store=t}get(e){let{store:t}=this;return t[e]}set(e,t){if("string"!=typeof e&&"object"!=typeof e)throw TypeError(`Expected \`key\` to be of type \`string\` or \`object\`, got ${typeof e}`);if("object"!=typeof e&&void 0===t)throw TypeError("Use `delete()` to clear values");let{store:i}=this,r=(e,t)=>{w(e,t),i[e]=t};if("object"==typeof e)for(let[t,i]of Object.entries(e))r(t,i);else r(e,t);this.store=i}*[Symbol.iterator](){for(let[e,t]of Object.entries(this.store))yield[e,t]}get size(){return Object.keys(this.store).length}get store(){try{let e=c.default.readFileSync(this.path,"utf8"),t=this._deserialize(e);return Object.assign(C(),t)}catch(e){if(e?.code==="ENOENT")return this._ensureDirectory(),C();throw e}}set store(e){this._ensureDirectory(),this._write(e),this.events.dispatchEvent(new Event("change"))}}var v=r;let B=(e,t)=>{let i=(0,v.createHash)("sha256");return i.update(t),i.update(e),i.digest("hex")};e.s(["oneWayHash",0,B],750716);let Q={get url(){return`file://${e.P("node_modules/.pnpm/payload@3.81.0_graphql@16.13.2_typescript@5.9.3/node_modules/payload/dist/utilities/telemetry/index.js")}`}},x=null,S=async({event:e,payload:t})=>{try{if(!1!==t.config.telemetry){let{packageJSON:r,packageJSONPath:n}=await D();if(!x){let{projectID:e,source:n}=T(t,r);x={ciName:i.default.isCI?i.default.name:null,envID:k(),isCI:i.default.isCI,nodeEnv:"production",nodeVersion:process.version,payloadVersion:R(r),projectID:e,projectIDSource:n,...L(t),dbAdapter:t.db.name,emailAdapter:t.email?.name||null,uploadAdapters:t.config.upload.adapters}}if(process.env.PAYLOAD_TELEMETRY_DEBUG)return void t.logger.info({event:{...x,...e,packageJSONPath:n},msg:"Telemetry Event"});await fetch("https://telemetry.payloadcms.com/events",{body:JSON.stringify({...x,...e}),headers:{"Content-Type":"application/json"},method:"post"})}}catch(e){}},k=()=>{let e=new I,t="envID",i=e.get(t);if(i)return i;let n=(0,r.randomBytes)(32).toString("hex");return e.set(t,n),n},T=(e,t)=>{let i=N(e);if(i)return{projectID:B(i,e.secret),source:"git"};let r=_(e,t);if(r)return{projectID:B(r,e.secret),source:"packageJSON"};let n=e.config.serverURL;return n?{projectID:B(n,e.secret),source:"serverURL"}:{projectID:B(process.cwd(),e.secret),source:"cwd"}},N=e=>{try{let i=(0,t.execSync)("git config --local --get remote.origin.url",{stdio:"pipe",timeout:1e3});return B(String(i).trim(),e.secret)}catch(e){return null}},D=async()=>{let e=s.default.resolve(process.cwd(),"package.json");if(!n.default.existsSync(e)){let t=(0,a.fileURLToPath)(Q.url),i=s.default.dirname(t);e=await (0,o.findUp)({dir:i,fileNames:["package.json"]})}return{packageJSON:JSON.parse(await n.default.promises.readFile(e,"utf-8")),packageJSONPath:e}},_=(e,t)=>B(t.name,e.secret),R=e=>e?.dependencies?.payload??"",L=e=>e.config.localization?{locales:e.config.localization.localeCodes,localizationDefaultLocale:e.config.localization.defaultLocale,localizationEnabled:!0}:{locales:[],localizationDefaultLocale:null,localizationEnabled:!1};e.s(["sendEvent",0,S],117993)},617997,144832,e=>{"use strict";function t(e){return e&&"object"==typeof e}e.s(["hasWhereAccessResult",()=>t],144832);let i=(e,i)=>{if(!e&&!i)return{};let r=e?[e]:[];return t(i)&&r.push(i),{and:r}};e.s(["combineQueries",0,i],617997)},186725,e=>{"use strict";function t(e){return null!==e&&"object"==typeof e&&"relationTo"in e&&"value"in e}function i(e){return"group"===e.type||"array"===e.type||"row"===e.type||"collapsible"===e.type}function r(e){return"object"==typeof e}function n(e){return"select"===e.type||"relationship"===e.type||"upload"===e.type}function s(e){return("upload"===e.type||"relationship"===e.type||"join"===e.type)&&"number"==typeof e.maxDepth}function a(e){return"ui"===e.type}function o(e){return"name"in e&&"id"===e.name}function l(e){return"hidden"in e&&e.hidden||"admin"in e&&"disabled"in e.admin&&e.admin.disabled}function c(e){return"name"in e&&!a(e)}function d(e){return"name"in e}function u(e){return"localized"in e&&e.localized}function h({field:e,parentIsLocalized:t}){return"localized"in e&&e.localized&&(!t||"true"===process.env.NEXT_PUBLIC_PAYLOAD_COMPATIBILITY_allowLocalizedWithinLocalized)}function A(e){return"virtual"in e&&!!e.virtual}e.s(["fieldAffectsData",()=>c,"fieldHasMaxDepth",()=>s,"fieldHasSubFields",()=>i,"fieldIsHiddenOrDisabled",()=>l,"fieldIsID",()=>o,"fieldIsLocalized",()=>u,"fieldIsPresentationalOnly",()=>a,"fieldIsVirtual",()=>A,"fieldShouldBeLocalized",()=>h,"fieldSupportsMany",()=>n,"optionIsObject",()=>r,"tabHasName",()=>d,"valueIsValueWithRelation",()=>t])},809175,e=>{"use strict";var t=e.i(224361),i=e.i(617997);async function r({id:e,slug:t,entityType:r,locale:n,operation:s,req:a,where:o}){if("global"===r){let e=await a.payload.db.findGlobal({slug:t,locale:n,req:a,select:{},where:o});return!!(e&&Object.keys(e).length>0)}return"collection"===r&&!!e&&("readVersions"===s?(await a.payload.db.countVersions({collection:t,locale:n,req:a,where:(0,i.combineQueries)(o,{parent:{equals:e}})})).totalDocs>0:(await a.payload.db.count({collection:t,locale:n,req:a,where:(0,i.combineQueries)(o,{id:{equals:e}})})).totalDocs>0)}var n=e.i(186725);let s=e=>null!=e&&"function"==typeof e.then,a=(e,t,i,r)=>{if(s(i)){let n={permission:i};e[t]=n;let s=i.then(e=>{n.permission=e});r.push(s)}else e[t]={permission:i}},o=({id:e,blockReferencesPermissions:t,data:i,fields:r,operations:l,parentPermissionsObject:c,permissionsObject:d,promises:u,req:h})=>{for(let A of r){for(let t of l){let r=c[t]?.permission;if("delete"!==t&&"readVersions"!==t&&"unlock"!==t&&"name"in A&&A.name){d[A.name]||(d[A.name]={});let n=d[A.name];if("access"in A&&A.access&&"function"==typeof A.access[t]){let r=A.access[t]({id:e,data:i,doc:i,req:h});s(r)?a(n,t,r.then(e=>!!e),u):a(n,t,!!r,u)}else a(n,t,r,u)}}if("name"in A&&A.name){let r=d[A.name];if("fields"in A&&A.fields&&(r.fields||(r.fields={}),o({id:e,blockReferencesPermissions:t,data:i,fields:A.fields,operations:l,parentPermissionsObject:r,permissionsObject:r.fields,promises:u,req:h})),"blocks"in A&&A.blocks?.length||"blockReferences"in A&&A.blockReferences?.length){r.blocks||(r.blocks={});let n=r.blocks;for(let e of l){if("delete"===e||"readVersions"===e||"unlock"===e)continue;let i=c[e]?.permission;for(let s of A.blockReferences??A.blocks){let o="string"==typeof s?h.payload.blocks[s]:s;if(!o)continue;if("string"==typeof s){let e=t[s];if(e){n[o.slug]=e;continue}}n[o.slug]||(n[o.slug]={});let l=n[o.slug];if(!l[e]){let t=r[e]?.permission??i;a(l,e,t,u)}}}let s=new Set;for(let r of A.blockReferences??A.blocks){let a="string"==typeof r?h.payload.blocks[r]:r;if(!a||s.has(a.slug))continue;s.add(a.slug);let c=n[a.slug];c&&(c.fields||(c.fields={}),"string"!=typeof r||t[r]||(t[r]=c),o({id:e,blockReferencesPermissions:t,data:i,fields:a.fields,operations:l,parentPermissionsObject:c,permissionsObject:c.fields,promises:u,req:h}))}}}if("fields"in A&&A.fields&&!("name"in A&&A.name)&&o({id:e,blockReferencesPermissions:t,data:i,fields:A.fields,operations:l,parentPermissionsObject:c,permissionsObject:d,promises:u,req:h}),"tabs"===A.type){for(let e of l){if("delete"===e||"readVersions"===e||"unlock"===e)continue;let t=c[e]?.permission;for(let i of A.tabs)if((0,n.tabHasName)(i)){d[i.name]||(d[i.name]={fields:{}});let r=d[i.name];r[e]||a(r,e,t,u)}}for(let r of A.tabs)if((0,n.tabHasName)(r)){let n=d[r.name];n.fields||(n.fields={}),o({id:e,blockReferencesPermissions:t,data:i,fields:r.fields,operations:l,parentPermissionsObject:n,permissionsObject:n.fields,promises:u,req:h})}else o({id:e,blockReferencesPermissions:t,data:i,fields:r.fields,operations:l,parentPermissionsObject:c,permissionsObject:d,promises:u,req:h})}}},l=["create","delete","read","readVersions","update","unlock"],c=["read","readVersions","update"];async function d(e){let{id:t,blockReferencesPermissions:i,data:r,entity:n,entityType:s,fetchData:a,operations:d,req:h}=e,{locale:A,user:p}=h,f=A||void 0;if(a&&"collection"===s&&!t)throw Error("ID is required when fetching data for a collection");let g=r&&Object.keys(r).length>0?r:a?await (async()=>"global"===s?h.payload.findGlobal({slug:n.slug,depth:0,fallbackLocale:null,locale:f,overrideAccess:!0,req:h}):"collection"===s?h.payload.findByID({id:t,collection:n.slug,depth:0,fallbackLocale:null,locale:f,overrideAccess:!0,req:h,trash:!0}):void 0)():void 0,m=!!p,y={},b={fields:y},E=[],C=[];for(let e of d){let i=e,r=n.access[i];("collection"===s&&l.includes(i)||"global"===s&&c.includes(i))&&("function"==typeof r?C.push({operation:i,result:Promise.resolve(r({id:t,data:g,req:h}))}):b[i]={permission:m})}let w=await Promise.all(C.map(async e=>({operation:e.operation,result:await e.result}))),I=[],v=[];for(let{operation:e,result:i}of w)"object"==typeof i?u({id:t,slug:n.slug,accessResult:i,entityPermissions:b,entityType:s,fetchData:a,locale:f,operation:e,req:h,wherePromises:v,whereQueryCache:I}):b[e]?.permission!==!1&&(b[e]={permission:!!i});await Promise.all(v),o({blockReferencesPermissions:i,data:g,fields:n.fields,operations:d,parentPermissionsObject:b,permissionsObject:y,promises:E,req:h});let B=0;for(;E.length>0;){let e=E.splice(0,E.length);if(await Promise.all(e),++B>=100)throw Error("Infinite getEntityPermissions promise loop detected.")}return b}let u=({id:e,slug:i,accessResult:n,entityPermissions:s,entityType:a,fetchData:o,locale:l,operation:c,req:d,wherePromises:u,whereQueryCache:h})=>{if(o){let o=h.find(e=>(0,t.isDeepStrictEqual)(e.where,n));o||(o={result:r({id:e,slug:i,entityType:a,locale:l,operation:c,req:d,where:n}),where:n},h.push(o)),u.push(o.result.then(e=>{s[c]={permission:e,where:n}}))}else s[c]={permission:!0,where:n}};e.s(["getEntityPermissions",()=>d],809175)},684442,892779,e=>{"use strict";var t=e.i(809175);function i(e){let t=!0;for(let i in e)"object"==typeof e[i]?r(e[i])?e[i]=!0:t=!1:!0!==e[i]&&(t=!1);return t}function r(e){let t=e,r=!0;if("blocks"in t&&t.blocks){for(let e in t.blocks)if("object"==typeof t.blocks[e]){for(let s in t.blocks[e])if("fields"===s)t.blocks[e].fields&&(i(t.blocks[e].fields)?t.blocks[e].fields=!0:r=!1);else if("object"==typeof t.blocks[e][s])if(n(t.blocks[e][s]))if(!0!==t.blocks[e][s].permission||"where"in t.blocks[e][s])if(!0===t.blocks[e][s].permission&&"where"in t.blocks[e][s])r=!1;else{r=!1,t.blocks[e][s]=!1,delete t.blocks[e][s];continue}else{t.blocks[e][s]=!0;continue}else throw Error("Unexpected object in block permissions")}else!0!==t.blocks[e]&&(r=!1,delete t.blocks[e]);r&&(t.blocks=!0)}let s=!0;t.fields&&(i(t.fields)?t.fields=!0:s=!1);let a=!0;for(let e in t)if("fields"!==e&&"blocks"!==e)if("object"==typeof t[e])if(n(t[e]))if(!0!==t[e].permission||"where"in t[e])if(!0===t[e].permission&&"where"in t[e])a=!1;else{a=!1,t[e]=!1,delete t[e];continue}else{t[e]=!0;continue}else throw console.error("Unexpected object in fields permissions",t,"key:",e),Error("Unexpected object in fields permissions");else!0!==t[e]&&(a=!1);return s&&r&&a}function n(e){return"object"==typeof e&&"permission"in e&&"boolean"==typeof e.permission}function s(e){Object.keys(e).forEach(t=>{"object"==typeof e[t]&&null!==e[t]?(s(e[t]),0===Object.keys(e[t]).length&&delete e[t]):(null===e[t]||void 0===e[t])&&delete e[t]})}function a(e){if("object"==typeof e)for(let t of Object.values(e))r(t)}function o(e){if("object"==typeof e)for(let t of Object.values(e))r(t)}function l(e){return!1===e.canAccessAdmin&&delete e.canAccessAdmin,e.collections&&a(e.collections),e.globals&&o(e.globals),s(e),e}async function c({req:e}){let i={collections:{},globals:{}},{payload:r,user:n}=e,s=!!n,a=n&&n.collection?r?.collections?.[n.collection]?.config:null;a&&r.config.admin.user===n?.collection?i.canAccessAdmin=a.access.admin?await a.access.admin({req:e}):s:i.canAccessAdmin=!1;let o={};return await Promise.all(r.config.collections.map(async r=>{let n=["create","read","update","delete"];r.auth&&void 0!==r.auth.maxLoginAttempts&&0!==r.auth.maxLoginAttempts&&n.push("unlock"),r.versions&&n.push("readVersions");let s=await (0,t.getEntityPermissions)({blockReferencesPermissions:o,entity:r,entityType:"collection",fetchData:!1,operations:n,req:e});i.collections[r.slug]=s})),await Promise.all(r.config.globals.map(async r=>{let n=["read","update"];r.versions&&n.push("readVersions");let s=await (0,t.getEntityPermissions)({blockReferencesPermissions:o,entity:r,entityType:"global",fetchData:!1,operations:n,req:e});i.globals[r.slug]=s})),l(i)}e.s(["sanitizePermissions",()=>l],892779),e.s(["getAccessResults",()=>c],684442)},452968,311462,e=>{"use strict";async function t(e){let{payload:t,transactionID:i}=e;await t.db.commitTransaction(i),delete e.transactionID}async function i(e){let{payload:t,transactionID:i}=e;return i instanceof Promise?(await i,!1):!i&&"function"==typeof t.db.beginTransaction&&(e.transactionID=t.db.beginTransaction().then(t=>(t&&(e.transactionID=t),t)),!!await e.transactionID)}e.s(["commitTransaction",()=>t],452968),e.s(["initTransaction",()=>i],311462)},852995,e=>{"use strict";function t(e){return null!=e&&("string"!=typeof e||""!==e.trim())&&!Number.isNaN(Number(e))}e.s(["isNumber",()=>t])},546712,e=>{"use strict";var t=e.i(195884);e.i(10188);var i=e.i(785867),r=e.i(700859);let n="ValidationError";class s extends r.APIError{constructor(e,r){const s=r?r("error:followingFieldsInvalid",{count:e.errors.length}):1===e.errors.length?t.en.translations.error.followingFieldsInvalid_one:t.en.translations.error.followingFieldsInvalid_other,a=e.req;delete e.req,super(`${s} ${e.errors.map(e=>{if(e.label)return"function"==typeof e.label?a&&a.i18n&&a.t?e.label({i18n:a.i18n,t:a.t}):e.path:"object"==typeof e.label?a?.i18n?.language?e.label[a.i18n.language]:e.label[Object.keys(e.label)[0]]:e.label;return e.path}).join(", ")}`,i.status.BAD_REQUEST,e),n=this.constructor.name}}e.s(["ValidationError",()=>s,"ValidationErrorName",()=>n])},553095,e=>{"use strict";let t=e=>{for(let i in e){let r=e[i];if(!1===r)return"exclude";if("object"==typeof r)return t(r)}return"include"};e.s(["getSelectMode",0,t])},743977,(e,t,i)=>{for(var r=Math.floor(0xffffff*Math.random()),n=h.index=parseInt(0xffffff*Math.random(),10),s=("u"<typeof process||"number"!=typeof process.pid?Math.floor(1e5*Math.random()):process.pid)%65535,a=(()=>{try{return _Buffer}catch(e){try{return Buffer}catch(e){return null}}})(),o=function(e){return!!(null!=e&&e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e))},l=[],c=0;c<256;c++)l[c]=(c<=15?"0":"")+c.toString(16);var d=RegExp("^[0-9a-fA-F]{24}$"),u=[];for(c=0;c<10;)u[48+c]=c++;for(;c<16;)u[55+c]=u[87+c]=c++;function h(e){if(!(this instanceof h))return new h(e);if(e&&(e instanceof h||"ObjectID"===e._bsontype))return e;if(this._bsontype="ObjectID",null==e||"number"==typeof e){this.id=this.generate(e);return}var t=h.isValid(e);if(t||null==e)if(t&&"string"==typeof e&&24===e.length)return h.createFromHexString(e);else if(null!=e&&12===e.length)this.id=e;else if(null!=e&&"function"==typeof e.toHexString)return e;else throw Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");else throw Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters")}function A(){return n=(n+1)%0xffffff}function p(e,t){return(t=t.toString(16)).length===e?t:"00000000".substring(t.length,e)+t}t.exports=h,h.default=h,h.createFromTime=function(e){return new h(p(8,e=parseInt(e,10)%0xffffffff)+"0000000000000000")},h.createFromHexString=function(e){if(void 0===e||null!=e&&24!==e.length)throw Error("Argument passed in must be a single String of 12 bytes or a string of 24 hex characters");for(var t="",i=0;i<24;)t+=String.fromCharCode(u[e.charCodeAt(i++)]<<4|u[e.charCodeAt(i++)]);return new h(t)},h.isValid=function(e){return null!=e&&("number"==typeof e||("string"==typeof e?12===e.length||24===e.length&&d.test(e):e instanceof h||(o(e)?h.isValid(e.toString("hex")):"function"==typeof e.toHexString&&!!a&&(e.id instanceof a||"string"==typeof e.id)&&(12===e.id.length||24===e.id.length&&d.test(e.id)))))},h.prototype={constructor:h,toHexString:function(){if(!this.id||!this.id.length)throw Error("invalid ObjectId, ObjectId.id must be either a string or a Buffer, but is ["+JSON.stringify(this.id)+"]");if(24===this.id.length)return this.id;if(o(this.id))return this.id.toString("hex");for(var e="",t=0;t<this.id.length;t++)e+=l[this.id.charCodeAt(t)];return e},equals:function(e){if(e instanceof h)return this.toString()===e.toString();if("string"==typeof e&&h.isValid(e)&&12===e.length&&o(this.id))return e===this.id.toString("binary");if("string"==typeof e&&h.isValid(e)&&24===e.length)return e.toLowerCase()===this.toHexString();if("string"==typeof e&&h.isValid(e)&&12===e.length)return e===this.id;if(null!=e&&(e instanceof h||e.toHexString))return e.toHexString()===this.toHexString();else return!1},getTimestamp:function(){var e,t=new Date;return e=o(this.id)?this.id[3]|this.id[2]<<8|this.id[1]<<16|this.id[0]<<24:this.id.charCodeAt(3)|this.id.charCodeAt(2)<<8|this.id.charCodeAt(1)<<16|this.id.charCodeAt(0)<<24,t.setTime(1e3*Math.floor(e)),t},generate:function(e){"number"!=typeof e&&(e=~~(Date.now()/1e3)),e=parseInt(e,10)%0xffffffff;var t=A();return String.fromCharCode(e>>24&255,e>>16&255,e>>8&255,255&e,r>>16&255,r>>8&255,255&r,s>>8&255,255&s,t>>16&255,t>>8&255,255&t)}};var f=Symbol&&Symbol.for&&Symbol.for("nodejs.util.inspect.custom")||"inspect";h.prototype[f]=function(){return"ObjectID("+this+")"},h.prototype.toJSON=h.prototype.toHexString,h.prototype.toString=h.prototype.toHexString},271607,747846,e=>{"use strict";var t=e.i(403158),i=e.i(743977);let r="default"in i.default?i.default.default:i.default,n=(e,t)=>{if("text"===t&&e){if(["object","string"].includes(typeof e)){let t=r.isValid(e);return"string"==typeof e||t}return!1}return!("number"!==t||"number"!=typeof e||Number.isNaN(e))||"ObjectID"===t&&r.isValid(String(e))};e.s(["isValidID",0,n],747846);let s=e=>async t=>{let{payload:i}=e,r=t.map(()=>null),s={};for(let e of t){let[t,r,a,o,l,c,d,u,h,A,p,f]=JSON.parse(e),g=JSON.stringify([t,r,o,l,c,d,u,h,A,p,f]),m=i.collections?.[r]?.customIDType||i.db.defaultIDType,y="number"===m?parseFloat(a):a;n(y,m)&&(s[g]=[...s[g]||[],y])}for(let[n,a]of Object.entries(s)){let[s,o,c,d,u,h,A,p,f,g,m]=JSON.parse(n);e.transactionID=s;let y=!!i.collections?.[o]?.config?.trash,b=y&&g?{...g,deletedAt:!0}:g;for(let n of(await i.find({collection:o,currentDepth:d,depth:c,disableErrors:!0,draft:f,fallbackLocale:h,locale:u,overrideAccess:!!A,pagination:!1,populate:m,req:e,select:b,showHiddenFields:!!p,...y?{trash:!0}:{},where:{id:{in:a}}})).docs){let i=l({collectionSlug:o,currentDepth:d,depth:c,docID:n.id,draft:f,fallbackLocale:h,locale:u,overrideAccess:A,populate:m,select:g,showHiddenFields:p,transactionID:e.transactionID}),s=t.findIndex(e=>e===i);s>-1&&(r[s]=n)}}return r},a=e=>{let i=new Map,r=new t.default(s(e));return r.find=t=>{let r=o(t),n=i.get(r);if(n)return n;let s=e.payload.find(t);return i.set(r,s),s},r},o=({collection:e,currentDepth:t,depth:i,disableErrors:r,draft:n,includeLockStatus:s,joins:a,limit:o,overrideAccess:l,page:c,pagination:d,populate:u,req:h,select:A,showHiddenFields:p,sort:f,where:g})=>JSON.stringify([e,t,i,r,n,s,a,o,l,c,d,u,h?.locale,h?.fallbackLocale,h?.user?.id,h?.transactionID,A,p,f,g]),l=({collectionSlug:e,currentDepth:t,depth:i,docID:r,draft:n,fallbackLocale:s,locale:a,overrideAccess:o,populate:l,select:c,showHiddenFields:d,transactionID:u})=>JSON.stringify([u,e,r,i,t,a,s,o,d,n,c,l]);e.s(["createDataloaderCacheKey",0,l,"getDataLoader",0,a],271607)},883999,674921,735412,813449,7651,744237,951020,285547,e=>{"use strict";e.s(["traverseFields",()=>w],883999);var t=e.i(186725),i=e.i(700859);class r extends i.APIError{constructor(e){super(`RichText field${(0,t.fieldAffectsData)(e)?` "${e.name}"`:""} is missing the editor prop. For sub-richText fields, the editor props is required, as it would otherwise create infinite recursion.`)}}e.s(["MissingEditorProp",()=>r],674921);let n=({block:e,select:t,selectMode:i})=>{if("object"==typeof t){let r=i,n={...t}[e.slug];return"exclude"===i&&!1===n?(r="include",n={id:!0,blockType:!0}):"include"===i&&(n||(n={}),"object"==typeof n&&((n={...n}).id=!0,n.blockType=!0)),{blockSelect:n,blockSelectMode:r}}return{blockSelect:t,blockSelectMode:i}};e.s(["getBlockSelect",0,n],735412);var s=t;let a=({field:e,select:t,selectMode:i,siblingDoc:r})=>{let n=!0;return(0,s.fieldAffectsData)(e)&&t&&i&&e.name&&("include"!==i||t[e.name]||(delete r[e.name],n=!1),"exclude"===i&&!1===t[e.name]&&(delete r[e.name],n=!1)),n};e.s(["stripUnselectedFields",0,a],813449);var o=t;function l(e){return e instanceof Buffer?Buffer.from(e):new e.constructor(e.buffer.slice(),e.byteOffset,e.length)}let c=new Map;c.set(Date,e=>new Date(e)),c.set(Map,(e,t)=>new Map(u(Array.from(e),t))),c.set(Set,(e,t)=>new Set(u(Array.from(e),t))),c.set(RegExp,e=>new RegExp(e.source,e.flags));let d=null;function u(e,t){let i=Object.keys(e),r=Array(i.length);for(let n=0;n<i.length;n++){let s=i[n],a=e[s];"object"!=typeof a||null===a?r[s]=a:a instanceof RegExp?r[s]=new RegExp(a.source,a.flags):a.constructor!==Object&&(d=c.get(a.constructor))?r[s]=d(a,t):ArrayBuffer.isView(a)?r[s]=l(a):r[s]=t(a)}return r}function h(e,t=!1){if("object"!=typeof e||null===e)return e;{if(Array.isArray(e))return e.map(e=>"object"!=typeof e||null===e?e:h(e,t));if(e instanceof Date)return new Date(e);let i={};for(let r in e){let n=e[r];t&&void 0===n||(i[r]="object"!=typeof n||null===n?n:h(n,t))}return i}}e.s(["deepCopyObjectSimple",()=>h],7651);let A=async({defaultValue:e,locale:t,req:i,user:r,value:n})=>void 0!==n?n:e&&"function"==typeof e?await e({locale:t,req:i,user:r}):"object"==typeof e?h(e):e;function p({field:e,index:t,parentIndexPath:i,parentPath:r="",parentSchemaPath:n}){let s=r.split("."),a=s?.[s.length-1]?.startsWith("_index-"),o=a?s.slice(0,-1).join("."):r,l=a?o:r;if("name"in e)return{indexPath:"",path:`${l?l+".":""}${e.name}`,schemaPath:`${n?n+".":""}${e.name}`};let c=`_index-${i?i+"-":""}${t}`,d=n.split(".");return{indexPath:`${i?i+"-":""}${t}`,path:`${l?l+".":""}${c}`,schemaPath:d?.[d.length-1]?.startsWith("_index-")?`${n}-${t}`:`${n?n+".":""}${c}`}}e.s(["getDefaultValue",0,A],744237),e.s(["getFieldPaths",()=>p],951020);var f=e.i(271607),g=t;let m=async({currentDepth:e,data:t,dataReference:i,depth:r,draft:n,fallbackLocale:s,field:a,index:o,key:l,locale:c,overrideAccess:d,populateArg:u,req:h,showHiddenFields:A})=>{let p,g=i;p="join"===a.type?Array.isArray(a.collection)?t.relationTo:a.collection:Array.isArray(a.relationTo)?t.relationTo:a.relationTo;let m=h.payload.collections[p];if(m){let i,p;i="join"===a.type&&Array.isArray(a.collection)||"join"!==a.type&&Array.isArray(a.relationTo)?t.value:t;let y=r&&e<=r;"string"!=typeof i&&"number"!=typeof i&&"function"==typeof i?.toString&&"object"!=typeof i&&(i=i.toString()),y&&(p=await h.payloadDataLoader.load((0,f.createDataloaderCacheKey)({collectionSlug:m.config.slug,currentDepth:e+1,depth:r,docID:i,draft:n,fallbackLocale:s,locale:c,overrideAccess:d,populate:u,select:u?.[m.config.slug]??m.config.defaultPopulate,showHiddenFields:A,transactionID:h.transactionID}))),m.config.trash&&p?p.deletedAt&&(p=null):p||(p=i),"number"==typeof o&&"string"==typeof l?"join"!==a.type&&Array.isArray(a.relationTo)||"join"===a.type&&Array.isArray(a.collection)?g[a.name][l][o].value=p:g[a.name][l][o]=p:"number"==typeof o||"string"==typeof l?"join"===a.type?Array.isArray(a.collection)?g[a.name].docs[o??l].value=p:g[a.name].docs[o??l]=p:Array.isArray(a.relationTo)?g[a.name][o??l].value=p:g[a.name][o??l]=p:"join"!==a.type&&Array.isArray(a.relationTo)||"join"===a.type&&Array.isArray(a.collection)?g[a.name].value=p:g[a.name]=p}},y=async({currentDepth:e,depth:t,draft:i,fallbackLocale:r,field:n,locale:s,overrideAccess:a,parentIsLocalized:o,populate:l,req:c,showHiddenFields:d,siblingDoc:u})=>{let h=u,A=(0,g.fieldHasMaxDepth)(n)&&n.maxDepth<t?n.maxDepth:t,p=[];if("join"===n.type||(0,g.fieldSupportsMany)(n)&&n.hasMany?(0,g.fieldShouldBeLocalized)({field:n,parentIsLocalized:o})&&"all"===s&&"object"==typeof u[n.name]&&null!==u[n.name]?Object.keys(u[n.name]).forEach(t=>{Array.isArray(u[n.name][t])&&u[n.name][t].forEach((o,f)=>{let g=async()=>{await m({currentDepth:e,data:u[n.name][t][f],dataReference:h,depth:A,draft:i,fallbackLocale:r,field:n,index:f,key:t,locale:s,overrideAccess:a,populateArg:l,req:c,showHiddenFields:d})};p.push(g())})}):(Array.isArray(u[n.name])||Array.isArray(u[n.name]?.docs))&&(Array.isArray(u[n.name])?u[n.name]:u[n.name].docs).forEach((t,o)=>{let u=async()=>{t&&await m({currentDepth:e,data:!("join"===n.type&&Array.isArray(n.collection))&&t?.id?t.id:t,dataReference:h,depth:A,draft:i,fallbackLocale:r,field:n,index:o,locale:s,overrideAccess:a,populateArg:l,req:c,showHiddenFields:d})};p.push(u())}):n.localized&&"all"===s&&"object"==typeof u[n.name]&&null!==u[n.name]?(Object.keys(u[n.name]).forEach(t=>{let o=async()=>{await m({currentDepth:e,data:u[n.name][t],dataReference:h,depth:A,draft:i,fallbackLocale:r,field:n,key:t,locale:s,overrideAccess:a,populateArg:l,req:c,showHiddenFields:d})};p.push(o())}),await Promise.all(p)):u[n.name]&&await m({currentDepth:e,data:u[n.name],dataReference:h,depth:A,draft:i,fallbackLocale:r,field:n,locale:s,overrideAccess:a,populateArg:l,req:c,showHiddenFields:d}),await Promise.all(p),"join"!==n.type&&(0,g.fieldSupportsMany)(n)&&n.hasMany){let e=Array.isArray(n.relationTo)?e=>null!==e&&e?.value!==null:e=>null!==e;if((0,g.fieldShouldBeLocalized)({field:n,parentIsLocalized:o})&&"all"===s&&"object"==typeof h[n.name]&&null!==h[n.name])for(let t of Object.keys(h[n.name]))Array.isArray(h[n.name][t])&&(h[n.name][t]=h[n.name][t].filter(e));else Array.isArray(h[n.name])&&(h[n.name]=h[n.name].filter(e))}};e.s(["relationshipPopulationPromise",0,y],285547);var b=f;let E=async({name:e,draft:t,fallbackLocale:i,fields:r,hasMany:n,locale:s,overrideAccess:a,ref:o,req:l,segments:c,showHiddenFields:d,siblingDoc:u})=>{let h=c.shift();if(!h)return;let A=o[h];if(void 0===A)return;if(0===c.length)return void(n?(Array.isArray(u[e])||(u[e]=[]),u[e].push(A)):u[e]=A);let p=r.find(e=>e.name===h);if(p){if("group"===p.type||"tab"===p.type){if(!A||"object"!=typeof A)return;return E({name:e,draft:t,fallbackLocale:i,fields:p.flattenedFields,locale:s,overrideAccess:a,ref:A,req:l,segments:c,showHiddenFields:d,siblingDoc:u})}if(("relationship"===p.type||"upload"===p.type)&&"string"==typeof p.relationTo){let r,o={},h=o,f=l.payload.collections[p.relationTo]?.config.flattenedFields;for(let e=0;e<c.length;e++){let t=f?.find(t=>t.name===c[e]),i=e===c.length-1||t?.type==="relationship"||t?.type==="upload";if(h[c[e]]=!!i||{},h=h[c[e]],i)break}if(p.hasMany){if(!Array.isArray(A))return;let r=A.map(e=>e?"object"==typeof e?e.id:e:null).filter(e=>"string"==typeof e||"number"==typeof e);if("id"===c[0]&&0===c.length){u[e]=r;return}let n=p.relationTo;for(let h of(await Promise.all(r.map(e=>l.payloadDataLoader.load((0,b.createDataloaderCacheKey)({collectionSlug:n,currentDepth:0,depth:0,docID:e,draft:t,fallbackLocale:i,locale:s,overrideAccess:a,select:o,showHiddenFields:d,transactionID:l.transactionID}))))))h&&await E({name:e,draft:t,fallbackLocale:i,fields:l.payload.collections[p.relationTo].config.flattenedFields,hasMany:!0,locale:s,overrideAccess:a,ref:h,req:l,segments:[...c],showHiddenFields:d,siblingDoc:u});return}if(r="object"==typeof A&&A?A.id:A,"id"===c[0]&&0===c.length){u[e]=r;return}if("string"!=typeof r&&"number"!=typeof r)return;let g=await l.payloadDataLoader.load((0,b.createDataloaderCacheKey)({collectionSlug:p.relationTo,currentDepth:0,depth:0,docID:r,draft:t,fallbackLocale:i,locale:s,overrideAccess:a,select:o,showHiddenFields:d,transactionID:l.transactionID}));if(!g)return;return E({name:e,draft:t,fallbackLocale:i,fields:l.payload.collections[p.relationTo].config.flattenedFields,hasMany:n,locale:s,overrideAccess:a,ref:g,req:l,segments:c,showHiddenFields:d,siblingDoc:u})}}},C=async({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,field:h,fieldDepth:f,fieldIndex:g,fieldPromises:m,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:Q,parentIsLocalized:x,parentPath:S,parentSchemaPath:k,populate:T,populationPromises:N,req:D,select:_,selectMode:R,showHiddenFields:L,siblingDoc:F,siblingFields:M,triggerAccessControl:O=!0,triggerHooks:U=!0})=>{let{indexPath:P,path:$,schemaPath:j}=p({field:h,index:g,parentIndexPath:Q,parentPath:S,parentSchemaPath:k}),H=(0,o.fieldAffectsData)(h),q=$?$.split("."):[],z=j?j.split("."):[],V=P?P.split("-").filter(Boolean)?.map(Number):[],G=!1,Y=H&&"id"===h.name&&0===f;if(H&&h.hidden&&void 0!==F[h.name]&&!L&&!Y&&(G=!0,delete F[h.name]),"id"!==$&&!a({field:h,select:_,selectMode:R,siblingDoc:F}))return;let W=(0,o.fieldShouldBeLocalized)({field:h,parentIsLocalized:x}),J=!!(C&&H&&"object"==typeof F[h.name]&&null!==F[h.name]&&W&&"all"!==v&&D.payload.config.localization);if(H&&J){let e=F[h.name][v],t=e;if(u&&u!==v){let i,r=null==e;if(Array.isArray(u))for(let e of u){let t=F[h.name]?.[e];if(null!=t&&""!==t){i=t;break}}else i=F[h.name][u];if(i)switch(h.type){case"text":case"textarea":(""===e||r)&&(t=i);break;default:r&&(t=i)}}F[h.name]=t}switch(h.type){case"group":H&&void 0===F[h.name]&&(F[h.name]={});break;case"point":{let e=F[h.name];Array.isArray(e?.coordinates)&&2===e.coordinates.length?F[h.name]=e.coordinates:F[h.name]=void 0;break}case"richText":if(!h?.editor)throw new r(h);if("function"==typeof h?.editor)throw Error("Attempted to access unsanitized rich text editor.");break;case"tabs":h.tabs.forEach(e=>{(0,o.tabHasName)(e)&&(void 0===F[e.name]||null===F[e.name])&&(F[e.name]={})})}let K="all"===v&&"name"in h&&"string"==typeof h.name&&!J&&W&&"object"==typeof F[h.name];if(H){if(U&&"hooks"in h&&h.hooks?.afterRead)for(let r of h.hooks.afterRead)if(K){let n=Object.entries(F[h.name]);await Promise.all(n.map(async([n,a])=>{let o=await r({blockData:e,collection:t,context:i,currentDepth:s,data:c,depth:l,draft:d,field:h,findMany:b,global:I,indexPath:V,operation:"read",originalDoc:c,overrideAccess:B,path:q,req:D,schemaPath:z,showHiddenFields:L,siblingData:F,siblingFields:M,value:a});void 0!==o&&(F[h.name][n]=o)}))}else{let n=await r({blockData:e,collection:t,context:i,currentDepth:s,data:c,depth:l,draft:d,field:h,findMany:b,global:I,indexPath:V,operation:"read",originalDoc:c,overrideAccess:B,path:q,req:D,schemaPath:z,showHiddenFields:L,siblingData:F,siblingFields:M,value:F[h.name]});void 0!==n&&(F[h.name]=n)}"virtual"in h&&"string"==typeof h.virtual&&(!h.hidden||L)&&N.push(E({name:h.name,draft:d,fallbackLocale:u,fields:(t||I).flattenedFields,locale:v,overrideAccess:B,ref:c,req:D,segments:h.virtual.split("."),showHiddenFields:L,siblingDoc:F}));let r=!0;O&&h.access&&h.access.read&&(B||await h.access.read({id:c.id,blockData:e,data:c,doc:c,req:D,siblingData:F})||(r=!1,delete F[h.name])),!G&&r&&void 0===F[h.name]&&void 0!==h.defaultValue&&(F[h.name]=await A({defaultValue:h.defaultValue,locale:v,req:D,user:D.user,value:F[h.name]})),("relationship"===h.type||"upload"===h.type||"join"===h.type)&&N.push(y({currentDepth:s,depth:l,draft:d,fallbackLocale:u,field:h,locale:v,overrideAccess:B,parentIsLocalized:x,populate:T,req:D,showHiddenFields:L,siblingDoc:F}))}switch(h.type){case"array":{let r=F[h.name],n=_?.[h.name];"include"===R&&"object"==typeof n&&(n={...n,id:!0}),Array.isArray(r)&&r.length>0?r.forEach((r,a)=>{w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$+"."+a,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:"object"==typeof n?n:void 0,selectMode:R,showHiddenFields:L,siblingDoc:r||{},triggerAccessControl:O,triggerHooks:U})}):J||"object"!=typeof r||null===r?J&&(!r||0===r.length)?F[h.name]=null:(!0!==h.hidden||!0===L)&&(F[h.name]=[]):Object.values(r).forEach(r=>{Array.isArray(r)&&r.forEach((r,n)=>{w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$+"."+n,parentSchemaPath:j,populate:T,populationPromises:N,req:D,showHiddenFields:L,siblingDoc:r||{},triggerAccessControl:O,triggerHooks:U})})});break}case"blocks":{let e=F[h.name];Array.isArray(e)&&e.length>0?e.forEach((e,r)=>{let a=e.blockType,o=D.payload.blocks[a]??(h.blockReferences??h.blocks).find(e=>"string"!=typeof e&&e.slug===a),{blockSelect:A,blockSelectMode:p}=n({block:o,select:_?.[h.name],selectMode:R});o&&w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:o.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$+"."+r,parentSchemaPath:j+"."+o.slug,populate:T,populationPromises:N,req:D,select:"object"==typeof A?A:void 0,selectMode:p,showHiddenFields:L,siblingDoc:e||{},triggerAccessControl:O,triggerHooks:U})}):J||"object"!=typeof e||null===e?J&&(!e||0===e.length)?F[h.name]=null:(!0!==h.hidden||!0===L)&&(F[h.name]=[]):Object.values(e).forEach(e=>{Array.isArray(e)&&e.forEach((e,r)=>{let n=e.blockType,a=D.payload.blocks[n]??(h.blockReferences??h.blocks).find(e=>"string"!=typeof e&&e.slug===n);a&&w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:a.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$+"."+r,parentSchemaPath:j+"."+a.slug,populate:T,populationPromises:N,req:D,showHiddenFields:L,siblingDoc:e||{},triggerAccessControl:O,triggerHooks:U})})});break}case"collapsible":case"row":w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:P,parentIsLocalized:x,parentPath:S,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:_,selectMode:R,showHiddenFields:L,siblingDoc:F,triggerAccessControl:O,triggerHooks:U});break;case"group":if(H){let r="object"==typeof _?.[h.name]?_?.[h.name]:void 0;W&&!J?Object.values(F[h.name]||{}).forEach(n=>{w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:r,selectMode:R,showHiddenFields:L,siblingDoc:n||{},triggerAccessControl:O,triggerHooks:U})}):w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:r,selectMode:R,showHiddenFields:L,siblingDoc:"object"!=typeof F[h.name]?{}:F[h.name],triggerAccessControl:O,triggerHooks:U})}else w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:P,parentIsLocalized:x,parentPath:S,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:_,selectMode:R,showHiddenFields:L,siblingDoc:F,triggerAccessControl:O,triggerHooks:U});break;case"richText":{if(!h?.editor)throw new r(h);if("function"==typeof h?.editor)throw Error("Attempted to access unsanitized rich text editor.");let e=h?.editor;if(e?.hooks?.afterRead?.length)for(let r of e.hooks.afterRead)if(K){let e=Object.entries(F[h.name]);await Promise.all(e.map(async([e,n])=>{let a=await r({collection:t,context:i,currentDepth:s,data:c,depth:l,draft:d,fallbackLocale:u,field:h,fieldPromises:m,findMany:b,flattenLocales:C,global:I,indexPath:V,locale:e,operation:"read",originalDoc:c,overrideAccess:B,parentIsLocalized:x,path:q,populate:T,populationPromises:N,req:D,schemaPath:z,showHiddenFields:L,siblingData:F,triggerAccessControl:O,triggerHooks:U,value:n});void 0!==a&&(F[h.name][e]=a)}))}else{let e=await r({collection:t,context:i,currentDepth:s,data:c,depth:l,draft:d,fallbackLocale:u,field:h,fieldPromises:m,findMany:b,flattenLocales:C,global:I,indexPath:V,locale:v,operation:"read",originalDoc:c,overrideAccess:B,parentIsLocalized:x,path:q,populate:T,populationPromises:N,req:D,schemaPath:z,showHiddenFields:L,siblingData:F,triggerAccessControl:O,triggerHooks:U,value:F[h.name]});void 0!==e&&(F[h.name]=e)}break}case"tab":{let r=F,n=(0,o.tabHasName)(h);if(n){let r="object"==typeof _?.[h.name]?_?.[h.name]:void 0;W&&!J?Object.values(F[h.name]||{}).forEach(n=>{w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:r,selectMode:R,showHiddenFields:L,siblingDoc:n||{},triggerAccessControl:O,triggerHooks:U})}):w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f+1,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:"",parentIsLocalized:x||h.localized,parentPath:$,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:r,selectMode:R,showHiddenFields:L,siblingDoc:"object"!=typeof F[h.name]?{}:F[h.name],triggerAccessControl:O,triggerHooks:U})}else w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f,fieldPromises:m,fields:h.fields,findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:n?"":P,parentIsLocalized:x||h.localized,parentPath:n?$:S,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:_,selectMode:R,showHiddenFields:L,siblingDoc:r,triggerAccessControl:O,triggerHooks:U});break}case"tabs":w({blockData:e,collection:t,context:i,currentDepth:s,depth:l,doc:c,draft:d,fallbackLocale:u,fieldDepth:f,fieldPromises:m,fields:h.tabs.map(e=>({...e,type:"tab"})),findMany:b,flattenLocales:C,global:I,locale:v,overrideAccess:B,parentIndexPath:P,parentIsLocalized:x,parentPath:$,parentSchemaPath:j,populate:T,populationPromises:N,req:D,select:_,selectMode:R,showHiddenFields:L,siblingDoc:F,triggerAccessControl:O,triggerHooks:U})}},w=({blockData:e,collection:t,context:i,currentDepth:r,depth:n,doc:s,draft:a,fallbackLocale:o,fieldDepth:l=0,fieldPromises:c,fields:d,findMany:u,flattenLocales:h,global:A,locale:p,overrideAccess:f,parentIndexPath:g,parentIsLocalized:m,parentPath:y,parentSchemaPath:b,populate:E,populationPromises:w,req:I,select:v,selectMode:B,showHiddenFields:Q,siblingDoc:x,triggerAccessControl:S=!0,triggerHooks:k=!0})=>{d.forEach((T,N)=>{c.push(C({blockData:e,collection:t,context:i,currentDepth:r,depth:n,doc:s,draft:a,fallbackLocale:o,field:T,fieldDepth:l,fieldIndex:N,fieldPromises:c,findMany:u,flattenLocales:h,global:A,locale:p,overrideAccess:f,parentIndexPath:g,parentIsLocalized:m,parentPath:y,parentSchemaPath:b,populate:E,populationPromises:w,req:I,select:v,selectMode:B,showHiddenFields:Q,siblingDoc:x,siblingFields:d,triggerAccessControl:S,triggerHooks:k}))})}},256085,e=>{"use strict";var t=e.i(666680);let i={randomUUID:t.default.randomUUID};var r=t;let n=new Uint8Array(256),s=n.length;function a(){return s>n.length-16&&(r.default.randomFillSync(n),s=0),n.slice(s,s+=16)}let o=[];for(let e=0;e<256;++e)o.push((e+256).toString(16).slice(1));function l(e,t=0){return(o[e[t+0]]+o[e[t+1]]+o[e[t+2]]+o[e[t+3]]+"-"+o[e[t+4]]+o[e[t+5]]+"-"+o[e[t+6]]+o[e[t+7]]+"-"+o[e[t+8]]+o[e[t+9]]+"-"+o[e[t+10]]+o[e[t+11]]+o[e[t+12]]+o[e[t+13]]+o[e[t+14]]+o[e[t+15]]).toLowerCase()}let c=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();let n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return l(n)};e.s(["v4",0,c],256085)},947753,252016,668473,516808,839875,541046,427510,488889,9051,234209,378541,250488,195420,275388,392826,698844,153118,747582,237278,78201,259470,323428,908993,273475,911909,406583,120116,981676,96038,e=>{"use strict";var t=e.i(254799);e.i(10188);var i=e.i(785867);let r=async e=>{let{args:t,collection:i,operation:r,overrideAccess:n,result:s}=e,a=s;if(t.collection.config.hooks?.afterOperation?.length)for(let e of t.collection.config.hooks.afterOperation){let s=await e({args:t,collection:i,operation:r,overrideAccess:n,req:t.req,result:a});void 0!==s&&(a=s)}return a};e.s(["buildAfterOperation",0,r],252016);let n={count:"count",countVersions:"countVersions",create:"create",delete:"delete",deleteByID:"delete",find:"read",findByID:"read",findDistinct:"readDistinct",findVersionByID:"read",findVersions:"read",forgotPassword:"forgotPassword",login:"login",read:"read",readDistinct:"readDistinct",refresh:"refresh",resetPassword:"resetPassword",restoreVersion:"restoreVersion",unlock:"unlock",update:"update",updateByID:"update"};async function s(e){let{args:t,collection:i,operation:r,overrideAccess:s}=e,a=t;if(t.collection.config.hooks?.beforeOperation?.length){let e=n[r];for(let r of t.collection.config.hooks.beforeOperation){let n=await r({args:a,collection:i,context:t.req.context,operation:e,overrideAccess:s,req:t.req});void 0!==n&&(a=n)}}return a}e.s(["buildBeforeOperation",()=>s],668473);var a=e.i(700859),o=e.i(295694);let l=({deletedAtPath:e="deletedAt",enableTrash:t,trash:i,where:r})=>{if(!t||i)return r;let n={[e]:{exists:!1}};return r?.and?{...r,and:[...r.and,n]}:{and:[n,...r?[r]:[]]}};e.s(["appendNonTrashedFilter",0,l],516808);var c=e.i(452968);let d=e=>{let{adminRoute:t,apiRoute:i,includeBasePath:r,path:n="",relative:s=!1,serverURL:a}=e,o=process.env.NEXT_BASE_PATH||e.basePath||"",l=t||i,c=[l&&"/"!==l&&l,n&&n].filter(Boolean).join("")||"/",d=(o+c).replace(/\/$/,"")||"/",u=r??!t;if(s||!a)return u&&o?d:c;let h=new URL(a);return new URL(d,h.origin).toString()};e.s(["formatAdminURL",0,d],839875);let u=e=>{let t=new Set,{cors:i,csrf:r}=e;if("*"===i)return null;if(Array.isArray(i))i.forEach(e=>t.add(e));else if(i&&"object"==typeof i){let e=i.origins;if("*"===e)return null;Array.isArray(e)&&e.forEach(e=>t.add(e))}return Array.isArray(r)&&r.forEach(e=>t.add(e)),[...t]},h=({config:e,req:t})=>{if(null!==e.serverURL&&""!==e.serverURL)return e.serverURL;let i="";try{let e=new URL(t.url).protocol,r=t.headers?.get("host");r&&(i=`${e}//${r}`)}catch{}let r=u(e);return null!==r&&i&&r.includes(i)?i:(t.payload.logger.warn(`Request origin "${i}" is not in the CORS/CSRF allowlist. Falling back to empty string as request origin. It is recommended to explicitly set the serverURL in the config to avoid this warning and ensure correct request origin is used.`),"")};e.s(["getRequestOrigin",0,h],541046);var A=e.i(311462),p=e.i(893961);let f=e=>({canLoginWithEmail:!e||e.allowEmailLogin,canLoginWithUsername:!!e});e.s(["getLoginOptions",0,f],427510);let g=async e=>{let n=e.collection.config.auth.loginWithUsername,{data:u,overrideAccess:g}=e,{canLoginWithEmail:m,canLoginWithUsername:y}=f(n),b=m&&(e.data.email||"").toLowerCase().trim()||null,E="username"in u&&"string"==typeof u?.username?u.username.toLowerCase().trim():null,C=e;if(e.collection.config.auth.disableLocalStrategy)throw new o.Forbidden(e.req.t);if(!b&&!E)throw new a.APIError(`Missing ${n?"username":"email"}.`,i.status.BAD_REQUEST);try{let e=await (0,A.initTransaction)(C.req),{collection:{config:o},disableEmail:u,expiration:p,req:{payload:{config:f,email:w},payload:I},req:v}=C=await s({args:C,collection:C.collection.config,operation:"forgotPassword",overrideAccess:g}),B=t.default.randomBytes(20).toString("hex");if(!b&&!E)throw new a.APIError(`Missing ${n?"username":"email"}.`,i.status.BAD_REQUEST);let Q={};m&&b?Q={email:{equals:b}}:y&&E&&(Q={username:{equals:E}}),Q=l({enableTrash:o.trash,trash:!1,where:Q});let x=await I.db.findOne({collection:o.slug,req:v,where:Q});if(!x)return await (0,c.commitTransaction)(C.req),null;let S=new Date(Date.now()+(o.auth?.forgotPassword?.expiration??p??36e5)).toISOString();if(x=await I.update({id:x.id,collection:o.slug,data:{resetPasswordExpiration:S,resetPasswordToken:B},req:v}),!u&&x.email){let e=h({config:f,req:v}),t=d({adminRoute:f.routes.admin,path:`${f.admin.routes.reset}/${B}`,serverURL:e}),i=`${v.t("authentication:youAreReceivingResetPassword")}
|
||
<a href="${t}">${t}</a>
|
||
${v.t("authentication:youDidNotRequestPassword")}`;"function"==typeof o.auth.forgotPassword?.generateEmailHTML&&(i=await o.auth.forgotPassword.generateEmailHTML({req:v,token:B,user:x}));let r=v.t("authentication:resetYourPassword");"function"==typeof o.auth.forgotPassword?.generateEmailSubject&&(r=await o.auth.forgotPassword.generateEmailSubject({req:v,token:B,user:x})),await w.sendEmail({from:`"${w.defaultFromName}" <${w.defaultFromAddress}>`,html:i,subject:r,to:x.email})}if(o.hooks?.afterForgotPassword?.length)for(let e of o.hooks.afterForgotPassword)await e({args:C,collection:C.collection?.config,context:v.context});return B=await r({args:C,collection:C.collection?.config,operation:"forgotPassword",overrideAccess:g,result:B}),e&&await (0,c.commitTransaction)(v),B}catch(e){throw await (0,p.killTransaction)(C.req),e}};e.s(["forgotPasswordOperation",0,g],947753);var m=e.i(195884),y=i,b=a;class E extends b.APIError{constructor(e,t){super(e?`${e(t?"error:usernameOrPasswordIncorrect":"error:emailOrPasswordIncorrect")}`:m.en.translations.error.emailOrPasswordIncorrect,y.status.UNAUTHORIZED)}}var C=m,w=i,I=a;class v extends I.APIError{constructor(e){super(e?e("error:userLocked"):C.en.translations.error.userLocked,w.status.UNAUTHORIZED)}}var B=m,Q=i,x=a;class S extends x.APIError{constructor({t:e}){super(e?e("error:unverifiedEmail"):B.en.translations.error.unverifiedEmail,Q.status.FORBIDDEN)}}var k=e.i(546712),T=e.i(553095),N=e.i(883999);async function D(e){let{collection:t,context:i,currentDepth:r,depth:n,doc:s,draft:a,fallbackLocale:o,findMany:l,flattenLocales:c=!0,global:d,locale:u,overrideAccess:h,populate:A,req:p,select:f,showHiddenFields:g}=e,m=[],y=[],b=n||0===n?parseInt(String(n),10):p.payload.config.defaultDepth;b>p.payload.config.maxDepth&&(b=p.payload.config.maxDepth);let E=r||1;(0,N.traverseFields)({collection:t,context:i,currentDepth:E,depth:b,doc:s,draft:a,fallbackLocale:o,fieldDepth:0,fieldPromises:m,fields:t?.fields||d?.fields,findMany:l,flattenLocales:c,global:d,locale:u,overrideAccess:h,parentIndexPath:"",parentIsLocalized:!1,parentPath:"",parentSchemaPath:"",populate:A,populationPromises:y,req:p,select:f,selectMode:f?(0,T.getSelectMode)(f):void 0,showHiddenFields:g,siblingDoc:s});let C=0;for(;m.length>0||y.length>0;){let e=m.splice(0,m.length),t=y.splice(0,y.length);if(await Promise.all(e),await Promise.all(t),++C>=100)throw Error("Infinite afterRead promise loop detected. A hook is likely adding field promises in an infinitely recursive way.")}return s}e.s(["afterRead",()=>D],488889);var _=c,R=o,L=A,F=p;let M=e=>{let t={};for(let i in e){let r=e[i];"_id"===i?t.id=r:"__v"!==i&&(t[i]=r)}return t};e.s(["sanitizeInternalFields",0,M],9051);var O=e.i(186725);let U=({data:e,fields:t,result:i})=>(t.forEach(t=>{switch(t.type){case"collapsible":case"row":U({data:e,fields:t.fields,result:i});break;case"group":if((0,O.fieldAffectsData)(t)){let r,n=e[t.name]??{};"string"==typeof t.saveToJWT?(r=t.saveToJWT,i[t.saveToJWT]=n):t.saveToJWT&&(r=t.name,i[t.name]=n);let s=r?i[r]:i;U({data:n,fields:t.fields,result:s});break}U({data:e,fields:t.fields,result:i});break;case"tab":if((0,O.tabHasName)(t)){let r,n=e[t.name]??{};"string"==typeof t.saveToJWT?(r=t.saveToJWT,i[t.saveToJWT]=n):t.saveToJWT&&(r=t.name,i[t.name]=n);let s=r?i[r]:i;U({data:n,fields:t.fields,result:s})}else U({data:e,fields:t.fields,result:i});break;case"tabs":U({data:e,fields:t.tabs.map(e=>({...e,type:"tab"})),result:i});break;default:(0,O.fieldAffectsData)(t)&&(t.saveToJWT?"string"==typeof t.saveToJWT?(i[t.saveToJWT]=e[t.name],delete i[t.name]):i[t.name]=e[t.name]:!1===t.saveToJWT&&delete i[t.name])}}),i),P=e=>{let{collectionConfig:t,email:i,sid:r,user:n}=e,s={id:n?.id,collection:t.slug,email:i};return r&&(s.sid=r),U({data:n,fields:t.fields,result:s}),s};e.s(["getFieldsToSign",0,P],234209);let $=e=>!!e&&e.getTime()>Date.now();var j=e.i(951615);let H=new TextEncoder,q=new TextDecoder;function z(...e){let t=new Uint8Array(e.reduce((e,{length:t})=>e+t,0)),i=0;for(let r of e)t.set(r,i),i+=r.length;return t}function V(e){let t=e;return t instanceof Uint8Array&&(t=q.decode(t)),t}e.s(["concat",()=>z,"decoder",0,q,"encoder",0,H],378541);let G=e=>j.Buffer.from(e).toString("base64url"),Y=e=>new Uint8Array(j.Buffer.from(V(e),"base64url"));e.s(["decode",0,Y,"encode",()=>G],250488);var W=e.i(666680),J=e.i(812057);class K extends Error{static code="ERR_JOSE_GENERIC";code="ERR_JOSE_GENERIC";constructor(e,t){super(e,t),this.name=this.constructor.name,Error.captureStackTrace?.(this,this.constructor)}}class Z extends K{static code="ERR_JWT_CLAIM_VALIDATION_FAILED";code="ERR_JWT_CLAIM_VALIDATION_FAILED";claim;reason;payload;constructor(e,t,i="unspecified",r="unspecified"){super(e,{cause:{claim:i,reason:r,payload:t}}),this.claim=i,this.reason=r,this.payload=t}}class X extends K{static code="ERR_JWT_EXPIRED";code="ERR_JWT_EXPIRED";claim;reason;payload;constructor(e,t,i="unspecified",r="unspecified"){super(e,{cause:{claim:i,reason:r,payload:t}}),this.claim=i,this.reason=r,this.payload=t}}class ee extends K{static code="ERR_JOSE_ALG_NOT_ALLOWED";code="ERR_JOSE_ALG_NOT_ALLOWED"}class et extends K{static code="ERR_JOSE_NOT_SUPPORTED";code="ERR_JOSE_NOT_SUPPORTED"}class ei extends K{static code="ERR_JWS_INVALID";code="ERR_JWS_INVALID"}class er extends K{static code="ERR_JWT_INVALID";code="ERR_JWT_INVALID"}class en extends K{[Symbol.asyncIterator];static code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";code="ERR_JWKS_MULTIPLE_MATCHING_KEYS";constructor(e="multiple matching keys found in the JSON Web Key Set",t){super(e,t)}}class es extends K{static code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";code="ERR_JWS_SIGNATURE_VERIFICATION_FAILED";constructor(e="signature verification failed",t){super(e,t)}}function ea(e){switch(e){case"PS256":case"RS256":case"ES256":case"ES256K":return"sha256";case"PS384":case"RS384":case"ES384":return"sha384";case"PS512":case"RS512":case"ES512":return"sha512";case"Ed25519":case"EdDSA":return;default:throw new et(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}function eo(e){switch(e){case"HS256":return"sha256";case"HS384":return"sha384";case"HS512":return"sha512";default:throw new et(`alg ${e} is not supported either by JOSE or your javascript runtime`)}}e.s(["JOSEAlgNotAllowed",()=>ee,"JOSENotSupported",()=>et,"JWSInvalid",()=>ei,"JWSSignatureVerificationFailed",()=>es,"JWTClaimValidationFailed",()=>Z,"JWTExpired",()=>X,"JWTInvalid",()=>er],195420),e.s(["default",()=>ea],275388);var el=W,ec=W,ed=J;let eu=W.webcrypto,eh=e=>ed.types.isCryptoKey(e);var eA=J;let ep=e=>eA.types.isKeyObject(e);function ef(e,t,...i){if((i=i.filter(Boolean)).length>2){let t=i.pop();e+=`one of type ${i.join(", ")}, or ${t}.`}else 2===i.length?e+=`one of type ${i[0]} or ${i[1]}.`:e+=`of type ${i[0]}.`;return null==t?e+=` Received ${t}`:"function"==typeof t&&t.name?e+=` Received function ${t.name}`:"object"==typeof t&&null!=t&&t.constructor?.name&&(e+=` Received an instance of ${t.constructor.name}`),e}let eg=(e,...t)=>ef("Key must be ",e,...t);function em(e,t,...i){return ef(`Key for the ${e} algorithm must be `,t,...i)}let ey=e=>ep(e)||eh(e),eb=["KeyObject"];function eE(e){return"object"==typeof e&&null!==e}function eC(e){if(!eE(e)||"[object Object]"!==Object.prototype.toString.call(e))return!1;if(null===Object.getPrototypeOf(e))return!0;let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function ew(e){return eC(e)&&"string"==typeof e.kty}function eI(e){return"oct"!==e.kty&&"string"==typeof e.d}function ev(e){return"oct"!==e.kty&&void 0===e.d}function eB(e){return ew(e)&&"oct"===e.kty&&"string"==typeof e.k}(globalThis.CryptoKey||eu?.CryptoKey)&&eb.push("CryptoKey"),e.s(["default",()=>eC],392826),e.s(["isJWK",()=>ew,"isPrivateJWK",()=>eI,"isPublicJWK",()=>ev,"isSecretJWK",()=>eB],698844),new WeakMap;let eQ=e=>{switch(e){case"prime256v1":return"P-256";case"secp384r1":return"P-384";case"secp521r1":return"P-521";case"secp256k1":return"secp256k1";default:throw new et("Unsupported key curve for this operation")}},ex=(e,t)=>{let i;if(eh(e))i=ec.KeyObject.from(e);else if(ep(e))i=e;else if(ew(e))return e.crv;else throw TypeError(eg(e,...eb));if("secret"===i.type)throw TypeError('only "private" or "public" type keys can be used for this operation');switch(i.asymmetricKeyType){case"ed25519":case"ed448":return`Ed${i.asymmetricKeyType.slice(2)}`;case"x25519":case"x448":return`X${i.asymmetricKeyType.slice(1)}`;case"ec":{let e=i.asymmetricKeyDetails.namedCurve;if(t)return e;return eQ(e)}default:throw TypeError("Invalid asymmetric key type for this operation")}};var eS=W;let ek=(e,t)=>{let i;try{i=e instanceof eS.KeyObject?e.asymmetricKeyDetails?.modulusLength:Buffer.from(e.n,"base64url").byteLength<<3}catch{}if("number"!=typeof i||i<2048)throw TypeError(`${t} requires key modulusLength to be 2048 bits or larger`)},eT=new Map([["ES256","P-256"],["ES256K","secp256k1"],["ES384","P-384"],["ES512","P-521"]]);function eN(e,t){let i,r,n,s;if(t instanceof el.KeyObject)i=t.asymmetricKeyType,r=t.asymmetricKeyDetails;else switch(n=!0,t.kty){case"RSA":i="rsa";break;case"EC":i="ec";break;case"OKP":if("Ed25519"===t.crv){i="ed25519";break}if("Ed448"===t.crv){i="ed448";break}throw TypeError("Invalid key for this operation, its crv must be Ed25519 or Ed448");default:throw TypeError("Invalid key for this operation, its kty must be RSA, OKP, or EC")}switch(e){case"Ed25519":if("ed25519"!==i)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519");break;case"EdDSA":if(!["ed25519","ed448"].includes(i))throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ed25519 or ed448");break;case"RS256":case"RS384":case"RS512":if("rsa"!==i)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa");ek(t,e);break;case"PS256":case"PS384":case"PS512":if("rsa-pss"===i){let{hashAlgorithm:t,mgf1HashAlgorithm:i,saltLength:n}=r,s=parseInt(e.slice(-3),10);if(void 0!==t&&(t!==`sha${s}`||i!==t))throw TypeError(`Invalid key for this operation, its RSA-PSS parameters do not meet the requirements of "alg" ${e}`);if(void 0!==n&&n>s>>3)throw TypeError(`Invalid key for this operation, its RSA-PSS parameter saltLength does not meet the requirements of "alg" ${e}`)}else if("rsa"!==i)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be rsa or rsa-pss");ek(t,e),s={padding:el.constants.RSA_PKCS1_PSS_PADDING,saltLength:el.constants.RSA_PSS_SALTLEN_DIGEST};break;case"ES256":case"ES256K":case"ES384":case"ES512":{if("ec"!==i)throw TypeError("Invalid key for this operation, its asymmetricKeyType must be ec");let r=ex(t),n=eT.get(e);if(r!==n)throw TypeError(`Invalid key curve for the algorithm, its curve must be ${n}, got ${r}`);s={dsaEncoding:"ieee-p1363"};break}default:throw new et(`alg ${e} is not supported either by JOSE or your javascript runtime`)}return n?{format:"jwk",key:t,...s}:s?{...s,key:t}:t}e.s(["default",()=>eN],153118);var eD=W;function e_(e,t="algorithm.name"){return TypeError(`CryptoKey does not support this operation, its ${t} must be ${e}`)}function eR(e,t){return e.name===t}function eL(e){return parseInt(e.name.slice(4),10)}function eF(e){switch(e){case"ES256":return"P-256";case"ES384":return"P-384";case"ES512":return"P-521";default:throw Error("unreachable")}}function eM(e,t){if(t.length&&!t.some(t=>e.usages.includes(t))){let e="CryptoKey does not support this operation, its usages must include ";if(t.length>2){let i=t.pop();e+=`one of ${t.join(", ")}, or ${i}.`}else 2===t.length?e+=`one of ${t[0]} or ${t[1]}.`:e+=`${t[0]}.`;throw TypeError(e)}}function eO(e,t,...i){switch(t){case"HS256":case"HS384":case"HS512":{if(!eR(e.algorithm,"HMAC"))throw e_("HMAC");let i=parseInt(t.slice(2),10);if(eL(e.algorithm.hash)!==i)throw e_(`SHA-${i}`,"algorithm.hash");break}case"RS256":case"RS384":case"RS512":{if(!eR(e.algorithm,"RSASSA-PKCS1-v1_5"))throw e_("RSASSA-PKCS1-v1_5");let i=parseInt(t.slice(2),10);if(eL(e.algorithm.hash)!==i)throw e_(`SHA-${i}`,"algorithm.hash");break}case"PS256":case"PS384":case"PS512":{if(!eR(e.algorithm,"RSA-PSS"))throw e_("RSA-PSS");let i=parseInt(t.slice(2),10);if(eL(e.algorithm.hash)!==i)throw e_(`SHA-${i}`,"algorithm.hash");break}case"EdDSA":if("Ed25519"!==e.algorithm.name&&"Ed448"!==e.algorithm.name)throw e_("Ed25519 or Ed448");break;case"Ed25519":if(!eR(e.algorithm,"Ed25519"))throw e_("Ed25519");break;case"ES256":case"ES384":case"ES512":{if(!eR(e.algorithm,"ECDSA"))throw e_("ECDSA");let i=eF(t);if(e.algorithm.namedCurve!==i)throw e_(i,"algorithm.namedCurve");break}default:throw TypeError("CryptoKey does not support this operation")}eM(e,i)}function eU(e,t,i){if(t instanceof Uint8Array){if(!e.startsWith("HS"))throw TypeError(eg(t,...eb));return(0,eD.createSecretKey)(t)}if(t instanceof eD.KeyObject)return t;if(eh(t))return eO(t,e,i),eD.KeyObject.from(t);if(ew(t))return e.startsWith("HS")?(0,eD.createSecretKey)(Buffer.from(t.k,"base64url")):t;throw TypeError(eg(t,...eb,"Uint8Array","JSON Web Key"))}e.s(["default",()=>eU],747582);let eP=(0,J.promisify)(W.sign),e$=async(e,t,i)=>{let r=eU(e,t,"sign");if(e.startsWith("HS")){let t=W.createHmac(eo(e),r);return t.update(i),t.digest()}return eP(ea(e),i,eN(e,r))};e.s(["default",0,e$],237278);let ej=(...e)=>{let t,i=e.filter(Boolean);if(0===i.length||1===i.length)return!0;for(let e of i){let i=Object.keys(e);if(!t||0===t.size){t=new Set(i);continue}for(let e of i){if(t.has(e))return!1;t.add(e)}}return!0};e.s(["default",0,ej],78201);let eH=e=>e?.[Symbol.toStringTag],eq=(e,t,i)=>{if(void 0!==t.use&&"sig"!==t.use)throw TypeError("Invalid key for this operation, when present its use must be sig");if(void 0!==t.key_ops&&t.key_ops.includes?.(i)!==!0)throw TypeError(`Invalid key for this operation, when present its key_ops must include ${i}`);if(void 0!==t.alg&&t.alg!==e)throw TypeError(`Invalid key for this operation, when present its alg must be ${e}`);return!0},ez=(e,t,i,r)=>{if(!(t instanceof Uint8Array)){if(r&&ew(t)){if(eB(t)&&eq(e,t,i))return;throw TypeError('JSON Web Key for symmetric algorithms must have JWK "kty" (Key Type) equal to "oct" and the JWK "k" (Key Value) present')}if(!ey(t))throw TypeError(em(e,t,...eb,"Uint8Array",r?"JSON Web Key":null));if("secret"!==t.type)throw TypeError(`${eH(t)} instances for symmetric algorithms must be of type "secret"`)}},eV=(e,t,i,r)=>{if(r&&ew(t))switch(i){case"sign":if(eI(t)&&eq(e,t,i))return;throw TypeError("JSON Web Key for this operation be a private JWK");case"verify":if(ev(t)&&eq(e,t,i))return;throw TypeError("JSON Web Key for this operation be a public JWK")}if(!ey(t))throw TypeError(em(e,t,...eb,r?"JSON Web Key":null));if("secret"===t.type)throw TypeError(`${eH(t)} instances for asymmetric algorithms must not be of type "secret"`);if("sign"===i&&"public"===t.type)throw TypeError(`${eH(t)} instances for asymmetric algorithm signing must be of type "private"`);if("decrypt"===i&&"public"===t.type)throw TypeError(`${eH(t)} instances for asymmetric algorithm decryption must be of type "private"`);if(t.algorithm&&"verify"===i&&"private"===t.type)throw TypeError(`${eH(t)} instances for asymmetric algorithm verifying must be of type "public"`);if(t.algorithm&&"encrypt"===i&&"private"===t.type)throw TypeError(`${eH(t)} instances for asymmetric algorithm encryption must be of type "public"`)};function eG(e,t,i,r){t.startsWith("HS")||"dir"===t||t.startsWith("PBES2")||/^A\d{3}(?:GCM)?KW$/.test(t)?ez(t,i,r,e):eV(t,i,r,e)}eG.bind(void 0,!1);let eY=eG.bind(void 0,!0);e.s(["checkKeyTypeWithJwk",0,eY],259470);let eW=function(e,t,i,r,n){let s;if(void 0!==n.crit&&r?.crit===void 0)throw new e('"crit" (Critical) Header Parameter MUST be integrity protected');if(!r||void 0===r.crit)return new Set;if(!Array.isArray(r.crit)||0===r.crit.length||r.crit.some(e=>"string"!=typeof e||0===e.length))throw new e('"crit" (Critical) Header Parameter MUST be an array of non-empty strings when present');for(let a of(s=void 0!==i?new Map([...Object.entries(i),...t.entries()]):t,r.crit)){if(!s.has(a))throw new et(`Extension Header Parameter "${a}" is not recognized`);if(void 0===n[a])throw new e(`Extension Header Parameter "${a}" is missing`);if(s.get(a)&&void 0===r[a])throw new e(`Extension Header Parameter "${a}" MUST be integrity protected`)}return new Set(r.crit)};e.s(["default",0,eW],323428);class eJ{_payload;_protectedHeader;_unprotectedHeader;constructor(e){if(!(e instanceof Uint8Array))throw TypeError("payload must be an instance of Uint8Array");this._payload=e}setProtectedHeader(e){if(this._protectedHeader)throw TypeError("setProtectedHeader can only be called once");return this._protectedHeader=e,this}setUnprotectedHeader(e){if(this._unprotectedHeader)throw TypeError("setUnprotectedHeader can only be called once");return this._unprotectedHeader=e,this}async sign(e,t){let i;if(!this._protectedHeader&&!this._unprotectedHeader)throw new ei("either setProtectedHeader or setUnprotectedHeader must be called before #sign()");if(!ej(this._protectedHeader,this._unprotectedHeader))throw new ei("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let r={...this._protectedHeader,...this._unprotectedHeader},n=eW(ei,new Map([["b64",!0]]),t?.crit,this._protectedHeader,r),s=!0;if(n.has("b64")&&"boolean"!=typeof(s=this._protectedHeader.b64))throw new ei('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:a}=r;if("string"!=typeof a||!a)throw new ei('JWS "alg" (Algorithm) Header Parameter missing or invalid');eY(a,e,"sign");let o=this._payload;s&&(o=H.encode(G(o)));let l=z(i=this._protectedHeader?H.encode(G(JSON.stringify(this._protectedHeader))):H.encode(""),H.encode("."),o),c={signature:G(await e$(a,e,l)),payload:""};return s&&(c.payload=q.decode(o)),this._unprotectedHeader&&(c.header=this._unprotectedHeader),this._protectedHeader&&(c.protected=q.decode(i)),c}}class eK{_flattened;constructor(e){this._flattened=new eJ(e)}setProtectedHeader(e){return this._flattened.setProtectedHeader(e),this}async sign(e,t){let i=await this._flattened.sign(e,t);if(void 0===i.payload)throw TypeError("use the flattened module for creating JWS with b64: false");return`${i.protected}.${i.payload}.${i.signature}`}}let eZ=e=>Math.floor(e.getTime()/1e3);e.s(["default",0,eZ],908993);let eX=60,e0=3600,e1=86400,e2=604800,e4=0x1e187e0,e5=/^(\+|\-)? ?(\d+|\d+\.\d+) ?(seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)(?: (ago|from now))?$/i,e3=e=>{let t,i=e5.exec(e);if(!i||i[4]&&i[1])throw TypeError("Invalid time period format");let r=parseFloat(i[2]);switch(i[3].toLowerCase()){case"sec":case"secs":case"second":case"seconds":case"s":t=Math.round(r);break;case"minute":case"minutes":case"min":case"mins":case"m":t=Math.round(r*eX);break;case"hour":case"hours":case"hr":case"hrs":case"h":t=Math.round(r*e0);break;case"day":case"days":case"d":t=Math.round(r*e1);break;case"week":case"weeks":case"w":t=Math.round(r*e2);break;default:t=Math.round(r*e4)}return"-"===i[1]||"ago"===i[4]?-t:t};function e8(e,t){if(!Number.isFinite(t))throw TypeError(`Invalid ${e} input`);return t}e.s(["default",0,e3],273475);class e9{_payload;constructor(e={}){if(!eC(e))throw TypeError("JWT Claims Set MUST be an object");this._payload=e}setIssuer(e){return this._payload={...this._payload,iss:e},this}setSubject(e){return this._payload={...this._payload,sub:e},this}setAudience(e){return this._payload={...this._payload,aud:e},this}setJti(e){return this._payload={...this._payload,jti:e},this}setNotBefore(e){return"number"==typeof e?this._payload={...this._payload,nbf:e8("setNotBefore",e)}:e instanceof Date?this._payload={...this._payload,nbf:e8("setNotBefore",eZ(e))}:this._payload={...this._payload,nbf:eZ(new Date)+e3(e)},this}setExpirationTime(e){return"number"==typeof e?this._payload={...this._payload,exp:e8("setExpirationTime",e)}:e instanceof Date?this._payload={...this._payload,exp:e8("setExpirationTime",eZ(e))}:this._payload={...this._payload,exp:eZ(new Date)+e3(e)},this}setIssuedAt(e){return void 0===e?this._payload={...this._payload,iat:eZ(new Date)}:e instanceof Date?this._payload={...this._payload,iat:e8("setIssuedAt",eZ(e))}:"string"==typeof e?this._payload={...this._payload,iat:e8("setIssuedAt",eZ(new Date)+e3(e))}:this._payload={...this._payload,iat:e8("setIssuedAt",e)},this}}class e6 extends e9{_protectedHeader;setProtectedHeader(e){return this._protectedHeader=e,this}async sign(e,t){let i=new eK(H.encode(JSON.stringify(this._payload)));if(i.setProtectedHeader(this._protectedHeader),Array.isArray(this._protectedHeader?.crit)&&this._protectedHeader.crit.includes("b64")&&!1===this._protectedHeader.b64)throw new er("JWTs MUST NOT use unencoded payload");return i.sign(e,t)}}let e7=async({fieldsToSign:e,secret:t,tokenExpiration:i})=>{let r=new TextEncoder().encode(t),n=Math.floor(Date.now()/1e3),s=n+i,a=await new e6(e).setProtectedHeader({alg:"HS256",typ:"JWT"}).setIssuedAt(n).setExpirationTime(s).sign(r);return{exp:s,token:a}};e.s(["jwtSign",0,e7],911909);var te=e.i(256085);let tt=e=>{let t=new Date;return e.filter(({expiresAt:e})=>(e instanceof Date?e:new Date(e))>t)},ti=async({collectionConfig:e,payload:t,req:i,user:r})=>{let n;if(e.auth.useSessions){n=(0,te.v4)();let s=new Date,a=1e3*e.auth.tokenExpiration,o=new Date(s.getTime()+a),l={id:n,createdAt:s,expiresAt:o};r.sessions?.length?(r.sessions=tt(r.sessions),r.sessions.push(l)):r.sessions=[l],r.updatedAt=null,await t.db.updateOne({id:r.id,collection:e.slug,data:r,req:i,returning:!1}),r.collection=e.slug,r._strategy="local-jwt"}return{sid:n}},tr=async({collectionConfig:e,payload:t,req:i,sid:r,user:n})=>{e.auth.useSessions&&n&&n.sessions?.length&&(n.sessions=n.sessions.filter(e=>e.id!==r),await t.db.updateOne({id:n.id,collection:e.slug,data:n,req:i,returning:!1}))};e.s(["addSessionToUser",0,ti,"removeExpiredSessions",0,tt,"revokeSession",0,tr],406583);var tn=t;let ts=async({doc:e,password:t})=>{try{let{hash:i,salt:r}=e;if("string"==typeof r&&"string"==typeof i)return await new Promise((n,s)=>{tn.default.pbkdf2(t,r,25e3,512,"sha256",(t,r)=>{t&&s(t);let a=Buffer.from(i,"hex");r.length===a.length&&tn.default.timingSafeEqual(r,a)?n(e):s(Error("Invalid password"))})});return null}catch(e){return null}};e.s(["authenticateLocalStrategy",0,ts],120116);let ta=async({collection:e,payload:t,user:i})=>{let{auth:{lockTime:r,maxLoginAttempts:n}}=e,s=Date.now(),a=null,o=null;if(i.lockUntil&&!$(new Date(i.lockUntil))){let r=await t.db.updateOne({id:i.id,collection:e.slug,data:{lockUntil:null,loginAttempts:1},select:{lockUntil:!0,loginAttempts:!0}});a=r.lockUntil,o=r.loginAttempts,i.lockUntil=a}else{let l={loginAttempts:{$inc:1}};"number"==typeof i.loginAttempts&&i.loginAttempts+1>=n&&(l.lockUntil=new Date(s+r).toISOString());let c=await t.db.updateOne({id:i.id,collection:e.slug,data:l,select:{lockUntil:!0,loginAttempts:!0}});a=c.lockUntil,o=c.loginAttempts}if(null===o)throw Error("Failed to update login attempts or lockUntil for user");let l="number"==typeof o&&o-1>=n,c="number"==typeof o&&o>=n;if(l&&(i.lockUntil=a),i.loginAttempts=o-1,c&&(!a||!$(new Date(a)))){let n=new Date(s+r).toISOString();if(await t.db.updateOne({id:i.id,collection:e.slug,data:{lockUntil:n},returning:!1}),l&&(i.lockUntil=n),e.auth.useSessions){let r=await t.db.findOne({collection:e.slug,select:{sessions:!0},where:{id:{equals:i.id}}});r?.sessions?.length&&(r.sessions=r.sessions.filter(e=>new Date(e.createdAt)<=new Date(s-2e4)),i.sessions=r.sessions,i.updatedAt=new Date().toISOString(),await t.db.updateOne({id:i.id,collection:e.slug,data:i,returning:!1}))}}},to=async({collection:e,doc:t,payload:i,req:r})=>{("lockUntil"in t&&"string"==typeof t.lockUntil||"loginAttempts"in t&&0!==t.loginAttempts)&&await i.db.updateOne({id:t.id,collection:e.slug,data:{lockUntil:null,loginAttempts:0},req:r,returning:!1})};e.s(["resetLoginAttempts",0,to],981676);let tl=({loggingInWithUsername:e,req:t,user:i})=>{if(!i)throw new E(t.t,!!e);if($(new Date(i.lockUntil)))throw new v(t.t)},tc=async e=>{let t,i=e;if(i.collection.config.auth.disableLocalStrategy)throw new R.Forbidden(i.req.t);let{collection:{config:n},data:a,depth:o,overrideAccess:c=!1,req:d,req:{fallbackLocale:u,locale:h,payload:A,payload:{secret:p}},showHiddenFields:g}=i=await s({args:i,collection:i.collection.config,operation:"login",overrideAccess:i.overrideAccess}),{email:m,password:y}=a,b=n.auth.loginWithUsername,C="string"==typeof m?m.toLowerCase().trim():null,w="username"in a&&"string"==typeof a?.username?a.username.toLowerCase().trim():null,{canLoginWithEmail:I,canLoginWithUsername:v}=f(b);if(!I&&!w)throw new k.ValidationError({collection:n.slug,errors:[{message:d.i18n.t("validation:required"),path:"username"}]});if(!v&&!C)throw new k.ValidationError({collection:n.slug,errors:[{message:d.i18n.t("validation:required"),path:"email"}]});if(!w&&!C)throw new k.ValidationError({collection:n.slug,errors:[{message:d.i18n.t("validation:required"),path:"email"},{message:d.i18n.t("validation:required"),path:"username"}]});if("string"!=typeof y||""===y.trim())throw new k.ValidationError({collection:n.slug,errors:[{message:d.i18n.t("validation:required"),path:"password"}]});let B={},Q={email:{equals:C}},x={username:{equals:w}};I&&v&&(w||C)?B=w?{or:[x,{email:{equals:w}}]}:{or:[Q,{username:{equals:C}}]}:I&&C?B=Q:v&&w&&(B=x),B=l({enableTrash:n.trash,trash:!1,where:B});let T=await A.db.findOne({collection:n.slug,req:d,where:B});tl({loggingInWithUsername:!!(v&&w),req:d,user:T}),T.collection=n.slug,T._strategy="local-jwt";let N=await ts({doc:T,password:y});T=M(T);let O=i.collection.config.auth.maxLoginAttempts>0;if(!N)throw O&&(await ta({collection:n,payload:d.payload,user:T}),tl({loggingInWithUsername:!!(v&&w),req:d,user:T})),new E(d.t);if(n.auth.verify&&!1===T._verified)throw new S({t:d.t});let U=await (0,L.initTransaction)(i.req);try{if(O){let{lockUntil:e,loginAttempts:t}=await A.db.findOne({collection:n.slug,req:d,select:{lockUntil:!0,loginAttempts:!0},where:{id:{equals:T.id}}});T.lockUntil=e,T.loginAttempts=t,tl({req:d,user:T})}let e={collectionConfig:n,email:C,user:T};(t=(await ti({collectionConfig:n,payload:A,req:d,user:T})).sid)&&(e.sid=t);let s=P(e);if(O&&await to({collection:n,doc:T,payload:d.payload,req:d}),n.hooks?.beforeLogin?.length)for(let e of n.hooks.beforeLogin)T=await e({collection:i.collection?.config,context:i.req.context,req:i.req,user:T})||T;let{exp:a,token:l}=await e7({fieldsToSign:s,secret:p,tokenExpiration:n.auth.tokenExpiration});if(d.user=T,n.hooks?.afterLogin?.length)for(let e of n.hooks.afterLogin)T=await e({collection:i.collection?.config,context:i.req.context,req:i.req,token:l,user:T})||T;if(T=await D({collection:n,context:d.context,depth:o,doc:T,draft:void 0,fallbackLocale:u,global:null,locale:h,overrideAccess:c,req:d,showHiddenFields:g}),n.hooks?.afterRead?.length)for(let e of n.hooks.afterRead)T=await e({collection:i.collection?.config,context:d.context,doc:T,overrideAccess:c,req:d})||T;let f={exp:a,token:l,user:T};return f=await r({args:i,collection:i.collection?.config,operation:"login",overrideAccess:i.overrideAccess,result:f}),U&&await (0,_.commitTransaction)(d),f}catch(e){throw t&&await tr({collectionConfig:n,payload:A,req:d,sid:t,user:T}),await (0,F.killTransaction)(i.req),e}};e.s(["loginOperation",0,tc],96038)},762823,276212,e=>{"use strict";let t=e=>{let t=new Map,i=e.get("Cookie");return i&&i.split(";").forEach(e=>{let i=e.split("="),r=i.shift()?.trim(),n=i.join("=");try{let e=decodeURI(n);t.set(r,e)}catch{}}),t};e.s(["parseCookies",0,t],276212);let i={Bearer:({headers:e})=>{let t=e.get("Authorization");return t?.startsWith("Bearer ")?t.replace("Bearer ",""):null},cookie:({headers:e,payload:i})=>{let r=t(e),n=`${i.config.cookiePrefix}-token`,s=r.get(n);if(!s)return null;let a=e.get("Origin");if(a)return 0===i.config.csrf.length||i.config.csrf.includes(a)?s:null;if(0===i.config.csrf.length)return s;let o=e.get("Sec-Fetch-Site");return"same-origin"===o||"same-site"===o||"none"===o?s:null},JWT:({headers:e})=>{let t=e.get("Authorization");return t?.startsWith("JWT ")?t.replace("JWT ",""):null}},r=e=>{let{headers:t,payload:r}=e;for(let e of r.config.auth.jwtOrder){let n=i[e]({headers:t,payload:r});if(n)return n}return null};e.s(["extractJWT",0,r],762823)},685147,e=>{"use strict";var t=e.i(546712);let i=({authOptions:{disableLocalStrategy:e,loginWithUsername:i},collectionSlug:r,data:n,operation:s,originalDoc:a,req:o})=>{if(!e&&i&&!i.requireEmail&&!i.requireUsername){let e=!1;if("create"!==s||n.email||n.username?"update"===s&&("email"in n&&!n.email&&"username"in n&&!n.username&&(e=!0),"email"in n&&!n.email&&!a.username&&!n?.username&&(e=!0),"username"in n&&!n.username&&!a.email&&!n?.email&&(e=!0)):e=!0,e)throw new t.ValidationError({collection:r,errors:[{message:"Username or email is required",path:"username"},{message:"Username or email is required",path:"email"}]},o.t)}};e.s(["ensureUsernameOrEmail",0,i])},277875,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.regexpCode=i.getEsmExportName=i.getProperty=i.safeStringify=i.stringify=i.strConcat=i.addCodeArg=i.str=i._=i.nil=i._Code=i.Name=i.IDENTIFIER=i._CodeOrName=void 0;class r{}i._CodeOrName=r,i.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!i.IDENTIFIER.test(e))throw Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}i.Name=n;class s extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;let e=this._items[0];return""===e||'""'===e}get str(){var e;return null!=(e=this._str)?e:this._str=this._items.reduce((e,t)=>`${e}${t}`,"")}get names(){var e;return null!=(e=this._names)?e:this._names=this._items.reduce((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e),{})}}function a(e,...t){let i=[e[0]],r=0;for(;r<t.length;)c(i,t[r]),i.push(e[++r]);return new s(i)}i._Code=s,i.nil=new s(""),i._=a;let o=new s("+");function l(e,...t){let i=[A(e[0])],r=0;for(;r<t.length;)i.push(o),c(i,t[r]),i.push(o,A(e[++r]));return d(i),new s(i)}function c(e,t){t instanceof s?e.push(...t._items):t instanceof n?e.push(t):e.push(h(t))}function d(e){let t=1;for(;t<e.length-1;){if(e[t]===o){let i=u(e[t-1],e[t+1]);if(void 0!==i){e.splice(t-1,3,i);continue}e[t++]="+"}t++}}function u(e,t){return'""'===t?e:'""'===e?t:"string"==typeof e?t instanceof n||'"'!==e[e.length-1]?void 0:"string"!=typeof t?`${e.slice(0,-1)}${t}"`:'"'===t[0]?e.slice(0,-1)+t.slice(1):void 0:"string"!=typeof t||'"'!==t[0]||e instanceof n?void 0:`"${e}${t.slice(1)}`}function h(e){return"number"==typeof e||"boolean"==typeof e||null===e?e:A(Array.isArray(e)?e.join(","):e)}function A(e){return JSON.stringify(e).replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")}function p(e){return"string"==typeof e&&i.IDENTIFIER.test(e)?new s(`.${e}`):a`[${e}]`}function f(e){if("string"==typeof e&&i.IDENTIFIER.test(e))return new s(`${e}`);throw Error(`CodeGen: invalid export name: ${e}, use explicit $id name mapping`)}i.str=l,i.addCodeArg=c,i.strConcat=function(e,t){return t.emptyStr()?e:e.emptyStr()?t:l`${e}${t}`},i.stringify=function(e){return new s(A(e))},i.safeStringify=A,i.getProperty=p,i.getEsmExportName=f,i.regexpCode=function(e){return new s(e.toString())}},580004,(e,t,i)=>{"use strict";var r;Object.defineProperty(i,"__esModule",{value:!0}),i.ValueScope=i.ValueScopeName=i.Scope=i.varKinds=i.UsedValueState=void 0;let n=e.r(277875);class s extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(r||(i.UsedValueState=r={})),i.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){let t=this._names[e]||this._nameGroup(e);return`${e}${t.index++}`}_nameGroup(e){var t,i;if((null==(i=null==(t=this._parent)?void 0:t._prefixes)?void 0:i.has(e))||this._prefixes&&!this._prefixes.has(e))throw Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}i.Scope=a;class o extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:i}){this.value=e,this.scopePath=(0,n._)`.${new n.Name(t)}[${i}]`}}i.ValueScopeName=o;let l=(0,n._)`\n`;class c extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new o(e,this._newName(e))}value(e,t){var i;if(void 0===t.ref)throw Error("CodeGen: ref must be passed in value");let r=this.toName(e),{prefix:n}=r,s=null!=(i=t.key)?i:t.ref,a=this._values[n];if(a){let e=a.get(s);if(e)return e}else a=this._values[n]=new Map;a.set(s,r);let o=this._scope[n]||(this._scope[n]=[]),l=o.length;return o[l]=t.ref,r.setValue(t,{property:n,itemIndex:l}),r}getValue(e,t){let i=this._values[e];if(i)return i.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,t=>{if(void 0===t.scopePath)throw Error(`CodeGen: name "${t}" has no value`);return(0,n._)`${e}${t.scopePath}`})}scopeCode(e=this._values,t,i){return this._reduceValues(e,e=>{if(void 0===e.value)throw Error(`CodeGen: name "${e}" has no value`);return e.value.code},t,i)}_reduceValues(e,t,a={},o){let l=n.nil;for(let c in e){let d=e[c];if(!d)continue;let u=a[c]=a[c]||new Map;d.forEach(e=>{if(u.has(e))return;u.set(e,r.Started);let a=t(e);if(a){let t=this.opts.es5?i.varKinds.var:i.varKinds.const;l=(0,n._)`${l}${t} ${e} = ${a};${this.opts._n}`}else if(a=null==o?void 0:o(e))l=(0,n._)`${l}${a}${this.opts._n}`;else throw new s(e);u.set(e,r.Completed)})}return l}}i.ValueScope=c},776902,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.or=i.and=i.not=i.CodeGen=i.operators=i.varKinds=i.ValueScopeName=i.ValueScope=i.Scope=i.Name=i.regexpCode=i.stringify=i.getProperty=i.nil=i.strConcat=i.str=i._=void 0;let r=e.r(277875),n=e.r(580004);var s=e.r(277875);Object.defineProperty(i,"_",{enumerable:!0,get:function(){return s._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return s.str}}),Object.defineProperty(i,"strConcat",{enumerable:!0,get:function(){return s.strConcat}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return s.nil}}),Object.defineProperty(i,"getProperty",{enumerable:!0,get:function(){return s.getProperty}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return s.stringify}}),Object.defineProperty(i,"regexpCode",{enumerable:!0,get:function(){return s.regexpCode}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return s.Name}});var a=e.r(580004);Object.defineProperty(i,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(i,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(i,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(i,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),i.operators={GT:new r._Code(">"),GTE:new r._Code(">="),LT:new r._Code("<"),LTE:new r._Code("<="),EQ:new r._Code("==="),NEQ:new r._Code("!=="),NOT:new r._Code("!"),OR:new r._Code("||"),AND:new r._Code("&&"),ADD:new r._Code("+")};class o{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends o{constructor(e,t,i){super(),this.varKind=e,this.name=t,this.rhs=i}render({es5:e,_n:t}){let i=e?n.varKinds.var:this.varKind,r=void 0===this.rhs?"":` = ${this.rhs}`;return`${i} ${this.name}${r};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=D(this.rhs,e,t)),this}get names(){return this.rhs instanceof r._CodeOrName?this.rhs.names:{}}}class c extends o{constructor(e,t,i){super(),this.lhs=e,this.rhs=t,this.sideEffects=i}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof r.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=D(this.rhs,e,t),this}get names(){return N(this.lhs instanceof r.Name?{}:{...this.lhs.names},this.rhs)}}class d extends c{constructor(e,t,i,r){super(e,i,r),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class u extends o{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class h extends o{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){let t=this.label?` ${this.label}`:"";return`break${t};`+e}}class A extends o{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class p extends o{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=D(this.code,e,t),this}get names(){return this.code instanceof r._CodeOrName?this.code.names:{}}}class f extends o{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce((t,i)=>t+i.render(e),"")}optimizeNodes(){let{nodes:e}=this,t=e.length;for(;t--;){let i=e[t].optimizeNodes();Array.isArray(i)?e.splice(t,1,...i):i?e[t]=i:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){let{nodes:i}=this,r=i.length;for(;r--;){let n=i[r];n.optimizeNames(e,t)||(_(e,n.names),i.splice(r,1))}return i.length>0?this:void 0}get names(){return this.nodes.reduce((e,t)=>T(e,t.names),{})}}class g extends f{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class m extends f{}class y extends g{}y.kind="else";class b extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();let e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){let e=t.optimizeNodes();t=this.else=Array.isArray(e)?new y(e):e}return t?!1===e?t instanceof b?t:t.nodes:this.nodes.length?this:new b(R(e),t instanceof b?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var i;if(this.else=null==(i=this.else)?void 0:i.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=D(this.condition,e,t),this}get names(){let e=super.names;return N(e,this.condition),this.else&&T(e,this.else.names),e}}b.kind="if";class E extends g{}E.kind="for";class C extends E{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=D(this.iteration,e,t),this}get names(){return T(super.names,this.iteration.names)}}class w extends E{constructor(e,t,i,r){super(),this.varKind=e,this.name=t,this.from=i,this.to=r}render(e){let t=e.es5?n.varKinds.var:this.varKind,{name:i,from:r,to:s}=this;return`for(${t} ${i}=${r}; ${i}<${s}; ${i}++)`+super.render(e)}get names(){let e=N(super.names,this.from);return N(e,this.to)}}class I extends E{constructor(e,t,i,r){super(),this.loop=e,this.varKind=t,this.name=i,this.iterable=r}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=D(this.iterable,e,t),this}get names(){return T(super.names,this.iterable.names)}}class v extends g{constructor(e,t,i){super(),this.name=e,this.args=t,this.async=i}render(e){let t=this.async?"async ":"";return`${t}function ${this.name}(${this.args})`+super.render(e)}}v.kind="func";class B extends f{render(e){return"return "+super.render(e)}}B.kind="return";class Q extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null==(e=this.catch)||e.optimizeNodes(),null==(t=this.finally)||t.optimizeNodes(),this}optimizeNames(e,t){var i,r;return super.optimizeNames(e,t),null==(i=this.catch)||i.optimizeNames(e,t),null==(r=this.finally)||r.optimizeNames(e,t),this}get names(){let e=super.names;return this.catch&&T(e,this.catch.names),this.finally&&T(e,this.finally.names),e}}class x extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}x.kind="catch";class S extends g{render(e){return"finally"+super.render(e)}}S.kind="finally";class k{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new n.Scope({parent:e}),this._nodes=[new m]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){let i=this._extScope.value(e,t);return(this._values[i.prefix]||(this._values[i.prefix]=new Set)).add(i),i}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,i,r){let n=this._scope.toName(t);return void 0!==i&&r&&(this._constants[n.str]=i),this._leafNode(new l(e,n,i)),n}const(e,t,i){return this._def(n.varKinds.const,e,t,i)}let(e,t,i){return this._def(n.varKinds.let,e,t,i)}var(e,t,i){return this._def(n.varKinds.var,e,t,i)}assign(e,t,i){return this._leafNode(new c(e,t,i))}add(e,t){return this._leafNode(new d(e,i.operators.ADD,t))}code(e){return"function"==typeof e?e():e!==r.nil&&this._leafNode(new p(e)),this}object(...e){let t=["{"];for(let[i,n]of e)t.length>1&&t.push(","),t.push(i),(i!==n||this.opts.es5)&&(t.push(":"),(0,r.addCodeArg)(t,n));return t.push("}"),new r._Code(t)}if(e,t,i){if(this._blockNode(new b(e)),t&&i)this.code(t).else().code(i).endIf();else if(t)this.code(t).endIf();else if(i)throw Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new b(e))}else(){return this._elseNode(new y)}endIf(){return this._endBlockNode(b,y)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new C(e),t)}forRange(e,t,i,r,s=this.opts.es5?n.varKinds.var:n.varKinds.let){let a=this._scope.toName(e);return this._for(new w(s,a,t,i),()=>r(a))}forOf(e,t,i,s=n.varKinds.const){let a=this._scope.toName(e);if(this.opts.es5){let e=t instanceof r.Name?t:this.var("_arr",t);return this.forRange("_i",0,(0,r._)`${e}.length`,t=>{this.var(a,(0,r._)`${e}[${t}]`),i(a)})}return this._for(new I("of",s,a,t),()=>i(a))}forIn(e,t,i,s=this.opts.es5?n.varKinds.var:n.varKinds.const){if(this.opts.ownProperties)return this.forOf(e,(0,r._)`Object.keys(${t})`,i);let a=this._scope.toName(e);return this._for(new I("in",s,a,t),()=>i(a))}endFor(){return this._endBlockNode(E)}label(e){return this._leafNode(new u(e))}break(e){return this._leafNode(new h(e))}return(e){let t=new B;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw Error('CodeGen: "return" should have one node');return this._endBlockNode(B)}try(e,t,i){if(!t&&!i)throw Error('CodeGen: "try" without "catch" and "finally"');let r=new Q;if(this._blockNode(r),this.code(e),t){let e=this.name("e");this._currNode=r.catch=new x(e),t(e)}return i&&(this._currNode=r.finally=new S,this.code(i)),this._endBlockNode(x,S)}throw(e){return this._leafNode(new A(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){let t=this._blockStarts.pop();if(void 0===t)throw Error("CodeGen: not in self-balancing block");let i=this._nodes.length-t;if(i<0||void 0!==e&&i!==e)throw Error(`CodeGen: wrong number of nodes: ${i} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=r.nil,i,n){return this._blockNode(new v(e,t,i)),n&&this.code(n).endFunc(),this}endFunc(){return this._endBlockNode(v)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){let i=this._currNode;if(i instanceof e||t&&i instanceof t)return this._nodes.pop(),this;throw Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){let t=this._currNode;if(!(t instanceof b))throw Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){let e=this._nodes;return e[e.length-1]}set _currNode(e){let t=this._nodes;t[t.length-1]=e}}function T(e,t){for(let i in t)e[i]=(e[i]||0)+(t[i]||0);return e}function N(e,t){return t instanceof r._CodeOrName?T(e,t.names):e}function D(e,t,i){if(e instanceof r.Name)return n(e);if(!s(e))return e;return new r._Code(e._items.reduce((e,t)=>(t instanceof r.Name&&(t=n(t)),t instanceof r._Code?e.push(...t._items):e.push(t),e),[]));function n(e){let r=i[e.str];return void 0===r||1!==t[e.str]?e:(delete t[e.str],r)}function s(e){return e instanceof r._Code&&e._items.some(e=>e instanceof r.Name&&1===t[e.str]&&void 0!==i[e.str])}}function _(e,t){for(let i in t)e[i]=(e[i]||0)-(t[i]||0)}function R(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:(0,r._)`!${O(e)}`}i.CodeGen=k,i.not=R;let L=M(i.operators.AND);i.and=function(...e){return e.reduce(L)};let F=M(i.operators.OR);function M(e){return(t,i)=>t===r.nil?i:i===r.nil?t:(0,r._)`${O(t)} ${e} ${O(i)}`}function O(e){return e instanceof r.Name?e:(0,r._)`(${e})`}i.or=function(...e){return e.reduce(F)}},335431,(e,t,i)=>{"use strict";var r;Object.defineProperty(i,"__esModule",{value:!0}),i.checkStrictMode=i.getErrorPath=i.Type=i.useFunc=i.setEvaluated=i.evaluatedPropsToName=i.mergeEvaluated=i.eachItem=i.unescapeJsonPointer=i.escapeJsonPointer=i.escapeFragment=i.unescapeFragment=i.schemaRefOrVal=i.schemaHasRulesButRef=i.schemaHasRules=i.checkUnknownRules=i.alwaysValidSchema=i.toHash=void 0;let n=e.r(776902),s=e.r(277875);function a(e,t=e.schema){let{opts:i,self:r}=e;if(!i.strictSchema||"boolean"==typeof t)return;let n=r.RULES.keywords;for(let i in t)n[i]||p(e,`unknown keyword: "${i}"`)}function o(e,t){if("boolean"==typeof e)return!e;for(let i in e)if(t[i])return!0;return!1}function l(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function c(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function d({mergeNames:e,mergeToName:t,mergeValues:i,resultToName:r}){return(s,a,o,l)=>{let c=void 0===o?a:o instanceof n.Name?(a instanceof n.Name?e(s,a,o):t(s,a,o),o):a instanceof n.Name?(t(s,o,a),a):i(a,o);return l!==n.Name||c instanceof n.Name?c:r(s,c)}}function u(e,t){if(!0===t)return e.var("props",!0);let i=e.var("props",(0,n._)`{}`);return void 0!==t&&h(e,i,t),i}function h(e,t,i){Object.keys(i).forEach(i=>e.assign((0,n._)`${t}${(0,n.getProperty)(i)}`,!0))}i.toHash=function(e){let t={};for(let i of e)t[i]=!0;return t},i.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(a(e,t),!o(t,e.self.RULES.all))},i.checkUnknownRules=a,i.schemaHasRules=o,i.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(let i in e)if("$ref"!==i&&t.all[i])return!0;return!1},i.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},i,r,s){if(!s){if("number"==typeof i||"boolean"==typeof i)return i;if("string"==typeof i)return(0,n._)`${i}`}return(0,n._)`${e}${t}${(0,n.getProperty)(r)}`},i.unescapeFragment=function(e){return c(decodeURIComponent(e))},i.escapeFragment=function(e){return encodeURIComponent(l(e))},i.escapeJsonPointer=l,i.unescapeJsonPointer=c,i.eachItem=function(e,t){if(Array.isArray(e))for(let i of e)t(i);else t(e)},i.mergeEvaluated={props:d({mergeNames:(e,t,i)=>e.if((0,n._)`${i} !== true && ${t} !== undefined`,()=>{e.if((0,n._)`${t} === true`,()=>e.assign(i,!0),()=>e.assign(i,(0,n._)`${i} || {}`).code((0,n._)`Object.assign(${i}, ${t})`))}),mergeToName:(e,t,i)=>e.if((0,n._)`${i} !== true`,()=>{!0===t?e.assign(i,!0):(e.assign(i,(0,n._)`${i} || {}`),h(e,i,t))}),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:d({mergeNames:(e,t,i)=>e.if((0,n._)`${i} !== true && ${t} !== undefined`,()=>e.assign(i,(0,n._)`${t} === true ? true : ${i} > ${t} ? ${i} : ${t}`)),mergeToName:(e,t,i)=>e.if((0,n._)`${i} !== true`,()=>e.assign(i,!0===t||(0,n._)`${i} > ${t} ? ${i} : ${t}`)),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},i.evaluatedPropsToName=u,i.setEvaluated=h;let A={};function p(e,t,i=e.opts.strictSchema){if(i){if(t=`strict mode: ${t}`,!0===i)throw Error(t);e.self.logger.warn(t)}}i.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:A[t.code]||(A[t.code]=new s._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(r||(i.Type=r={})),i.getErrorPath=function(e,t,i){if(e instanceof n.Name){let s=t===r.Num;return i?s?(0,n._)`"[" + ${e} + "]"`:(0,n._)`"['" + ${e} + "']"`:s?(0,n._)`"/" + ${e}`:(0,n._)`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return i?(0,n.getProperty)(e).toString():"/"+l(e)},i.checkStrictMode=p},515301,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902);i.default={data:new r.Name("data"),valCxt:new r.Name("valCxt"),instancePath:new r.Name("instancePath"),parentData:new r.Name("parentData"),parentDataProperty:new r.Name("parentDataProperty"),rootData:new r.Name("rootData"),dynamicAnchors:new r.Name("dynamicAnchors"),vErrors:new r.Name("vErrors"),errors:new r.Name("errors"),this:new r.Name("this"),self:new r.Name("self"),scope:new r.Name("scope"),json:new r.Name("json"),jsonPos:new r.Name("jsonPos"),jsonLen:new r.Name("jsonLen"),jsonPart:new r.Name("jsonPart")}},164294,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.extendErrors=i.resetErrorsCount=i.reportExtraError=i.reportError=i.keyword$DataError=i.keywordError=void 0;let r=e.r(776902),n=e.r(335431),s=e.r(515301);function a(e,t=i.keywordError,n,s){let{it:o}=e,{gen:d,compositeRule:h,allErrors:A}=o,p=u(e,t,n);(null!=s?s:h||A)?l(d,p):c(o,(0,r._)`[${p}]`)}function o(e,t=i.keywordError,r){let{it:n}=e,{gen:a,compositeRule:d,allErrors:h}=n;l(a,u(e,t,r)),d||h||c(n,s.default.vErrors)}function l(e,t){let i=e.const("err",t);e.if((0,r._)`${s.default.vErrors} === null`,()=>e.assign(s.default.vErrors,(0,r._)`[${i}]`),(0,r._)`${s.default.vErrors}.push(${i})`),e.code((0,r._)`${s.default.errors}++`)}function c(e,t){let{gen:i,validateName:n,schemaEnv:s}=e;s.$async?i.throw((0,r._)`new ${e.ValidationError}(${t})`):(i.assign((0,r._)`${n}.errors`,t),i.return(!1))}i.keywordError={message:({keyword:e})=>(0,r.str)`must pass "${e}" keyword validation`},i.keyword$DataError={message:({keyword:e,schemaType:t})=>t?(0,r.str)`"${e}" keyword must be ${t} ($data)`:(0,r.str)`"${e}" keyword is invalid ($data)`},i.reportError=a,i.reportExtraError=o,i.resetErrorsCount=function(e,t){e.assign(s.default.errors,t),e.if((0,r._)`${s.default.vErrors} !== null`,()=>e.if(t,()=>e.assign((0,r._)`${s.default.vErrors}.length`,t),()=>e.assign(s.default.vErrors,null)))},i.extendErrors=function({gen:e,keyword:t,schemaValue:i,data:n,errsCount:a,it:o}){if(void 0===a)throw Error("ajv implementation error");let l=e.name("err");e.forRange("i",a,s.default.errors,a=>{e.const(l,(0,r._)`${s.default.vErrors}[${a}]`),e.if((0,r._)`${l}.instancePath === undefined`,()=>e.assign((0,r._)`${l}.instancePath`,(0,r.strConcat)(s.default.instancePath,o.errorPath))),e.assign((0,r._)`${l}.schemaPath`,(0,r.str)`${o.errSchemaPath}/${t}`),o.opts.verbose&&(e.assign((0,r._)`${l}.schema`,i),e.assign((0,r._)`${l}.data`,n))})};let d={keyword:new r.Name("keyword"),schemaPath:new r.Name("schemaPath"),params:new r.Name("params"),propertyName:new r.Name("propertyName"),message:new r.Name("message"),schema:new r.Name("schema"),parentSchema:new r.Name("parentSchema")};function u(e,t,i){let{createErrors:n}=e.it;return!1===n?(0,r._)`{}`:h(e,t,i)}function h(e,t,i={}){let{gen:r,it:n}=e,s=[A(n,i),p(e,i)];return f(e,t,s),r.object(...s)}function A({errorPath:e},{instancePath:t}){let i=t?(0,r.str)`${e}${(0,n.getErrorPath)(t,n.Type.Str)}`:e;return[s.default.instancePath,(0,r.strConcat)(s.default.instancePath,i)]}function p({keyword:e,it:{errSchemaPath:t}},{schemaPath:i,parentSchema:s}){let a=s?t:(0,r.str)`${t}/${e}`;return i&&(a=(0,r.str)`${a}${(0,n.getErrorPath)(i,n.Type.Str)}`),[d.schemaPath,a]}function f(e,{params:t,message:i},n){let{keyword:a,data:o,schemaValue:l,it:c}=e,{opts:u,propertyName:h,topSchemaRef:A,schemaPath:p}=c;n.push([d.keyword,a],[d.params,"function"==typeof t?t(e):t||(0,r._)`{}`]),u.messages&&n.push([d.message,"function"==typeof i?i(e):i]),u.verbose&&n.push([d.schema,l],[d.parentSchema,(0,r._)`${A}${p}`],[s.default.data,o]),h&&n.push([d.propertyName,h])}},188725,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.boolOrEmptySchema=i.topBoolOrEmptySchema=void 0;let r=e.r(164294),n=e.r(776902),s=e.r(515301),a={message:"boolean schema is false"};function o(e,t){let{gen:i,data:n}=e,s={gen:i,keyword:"false schema",data:n,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,r.reportError)(s,a,void 0,t)}i.topBoolOrEmptySchema=function(e){let{gen:t,schema:i,validateName:r}=e;!1===i?o(e,!1):"object"==typeof i&&!0===i.$async?t.return(s.default.data):(t.assign((0,n._)`${r}.errors`,null),t.return(!0))},i.boolOrEmptySchema=function(e,t){let{gen:i,schema:r}=e;!1===r?(i.var(t,!1),o(e)):i.var(t,!0)}},226514,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getRules=i.isJSONType=void 0;let r=new Set(["string","number","integer","boolean","null","object","array"]);i.isJSONType=function(e){return"string"==typeof e&&r.has(e)},i.getRules=function(){let e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},28196,(e,t,i)=>{"use strict";function r(e,t){return t.rules.some(t=>n(e,t))}function n(e,t){var i;return void 0!==e[t.keyword]||(null==(i=t.definition.implements)?void 0:i.some(t=>void 0!==e[t]))}Object.defineProperty(i,"__esModule",{value:!0}),i.shouldUseRule=i.shouldUseGroup=i.schemaHasRulesForType=void 0,i.schemaHasRulesForType=function({schema:e,self:t},i){let n=t.RULES.types[i];return n&&!0!==n&&r(e,n)},i.shouldUseGroup=r,i.shouldUseRule=n},814484,(e,t,i)=>{"use strict";var r;Object.defineProperty(i,"__esModule",{value:!0}),i.reportTypeError=i.checkDataTypes=i.checkDataType=i.coerceAndCheckDataType=i.getJSONTypes=i.getSchemaTypes=i.DataType=void 0;let n=e.r(226514),s=e.r(28196),a=e.r(164294),o=e.r(776902),l=e.r(335431);function c(e){let t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(r||(i.DataType=r={})),i.getSchemaTypes=function(e){let t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},i.getJSONTypes=c,i.coerceAndCheckDataType=function(e,t){let{gen:i,data:n,opts:a}=e,o=u(t,a.coerceTypes),l=t.length>0&&!(0===o.length&&1===t.length&&(0,s.schemaHasRulesForType)(e,t[0]));if(l){let s=f(t,n,a.strictNumbers,r.Wrong);i.if(s,()=>{o.length?h(e,t,o):m(e)})}return l};let d=new Set(["string","number","integer","boolean","null"]);function u(e,t){return t?e.filter(e=>d.has(e)||"array"===t&&"array"===e):[]}function h(e,t,i){let{gen:r,data:n,opts:s}=e,a=r.let("dataType",(0,o._)`typeof ${n}`),l=r.let("coerced",(0,o._)`undefined`);for(let e of("array"===s.coerceTypes&&r.if((0,o._)`${a} == 'object' && Array.isArray(${n}) && ${n}.length == 1`,()=>r.assign(n,(0,o._)`${n}[0]`).assign(a,(0,o._)`typeof ${n}`).if(f(t,n,s.strictNumbers),()=>r.assign(l,n))),r.if((0,o._)`${l} !== undefined`),i))(d.has(e)||"array"===e&&"array"===s.coerceTypes)&&c(e);function c(e){switch(e){case"string":r.elseIf((0,o._)`${a} == "number" || ${a} == "boolean"`).assign(l,(0,o._)`"" + ${n}`).elseIf((0,o._)`${n} === null`).assign(l,(0,o._)`""`);return;case"number":r.elseIf((0,o._)`${a} == "boolean" || ${n} === null
|
||
|| (${a} == "string" && ${n} && ${n} == +${n})`).assign(l,(0,o._)`+${n}`);return;case"integer":r.elseIf((0,o._)`${a} === "boolean" || ${n} === null
|
||
|| (${a} === "string" && ${n} && ${n} == +${n} && !(${n} % 1))`).assign(l,(0,o._)`+${n}`);return;case"boolean":r.elseIf((0,o._)`${n} === "false" || ${n} === 0 || ${n} === null`).assign(l,!1).elseIf((0,o._)`${n} === "true" || ${n} === 1`).assign(l,!0);return;case"null":r.elseIf((0,o._)`${n} === "" || ${n} === 0 || ${n} === false`),r.assign(l,null);return;case"array":r.elseIf((0,o._)`${a} === "string" || ${a} === "number"
|
||
|| ${a} === "boolean" || ${n} === null`).assign(l,(0,o._)`[${n}]`)}}r.else(),m(e),r.endIf(),r.if((0,o._)`${l} !== undefined`,()=>{r.assign(n,l),A(e,l)})}function A({gen:e,parentData:t,parentDataProperty:i},r){e.if((0,o._)`${t} !== undefined`,()=>e.assign((0,o._)`${t}[${i}]`,r))}function p(e,t,i,n=r.Correct){let s,a=n===r.Correct?o.operators.EQ:o.operators.NEQ;switch(e){case"null":return(0,o._)`${t} ${a} null`;case"array":s=(0,o._)`Array.isArray(${t})`;break;case"object":s=(0,o._)`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":s=l((0,o._)`!(${t} % 1) && !isNaN(${t})`);break;case"number":s=l();break;default:return(0,o._)`typeof ${t} ${a} ${e}`}return n===r.Correct?s:(0,o.not)(s);function l(e=o.nil){return(0,o.and)((0,o._)`typeof ${t} == "number"`,e,i?(0,o._)`isFinite(${t})`:o.nil)}}function f(e,t,i,r){let n;if(1===e.length)return p(e[0],t,i,r);let s=(0,l.toHash)(e);if(s.array&&s.object){let e=(0,o._)`typeof ${t} != "object"`;n=s.null?e:(0,o._)`!${t} || ${e}`,delete s.null,delete s.array,delete s.object}else n=o.nil;for(let e in s.number&&delete s.integer,s)n=(0,o.and)(n,p(e,t,i,r));return n}i.checkDataType=p,i.checkDataTypes=f;let g={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?(0,o._)`{type: ${e}}`:(0,o._)`{type: ${t}}`};function m(e){let t=y(e);(0,a.reportError)(t,g)}function y(e){let{gen:t,data:i,schema:r}=e,n=(0,l.schemaRefOrVal)(e,r,"type");return{gen:t,keyword:"type",data:i,schema:r.type,schemaCode:n,schemaValue:n,parentSchema:r,params:{},it:e}}i.reportTypeError=m},867029,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.assignDefaults=void 0;let r=e.r(776902),n=e.r(335431);function s(e,t,i){let{gen:s,compositeRule:a,data:o,opts:l}=e;if(void 0===i)return;let c=(0,r._)`${o}${(0,r.getProperty)(t)}`;if(a)return void(0,n.checkStrictMode)(e,`default is ignored for: ${c}`);let d=(0,r._)`${c} === undefined`;"empty"===l.useDefaults&&(d=(0,r._)`${d} || ${c} === null || ${c} === ""`),s.if(d,(0,r._)`${c} = ${(0,r.stringify)(i)}`)}i.assignDefaults=function(e,t){let{properties:i,items:r}=e.schema;if("object"===t&&i)for(let t in i)s(e,t,i[t].default);else"array"===t&&Array.isArray(r)&&r.forEach((t,i)=>s(e,i,t.default))}},905378,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.validateUnion=i.validateArray=i.usePattern=i.callValidateCode=i.schemaProperties=i.allSchemaProperties=i.noPropertyInData=i.propertyInData=i.isOwnProperty=i.hasPropFunc=i.reportMissingProp=i.checkMissingProp=i.checkReportMissingProp=void 0;let r=e.r(776902),n=e.r(335431),s=e.r(515301),a=e.r(335431);function o(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:(0,r._)`Object.prototype.hasOwnProperty`})}function l(e,t,i){return(0,r._)`${o(e)}.call(${t}, ${i})`}function c(e,t,i,n){let s=(0,r._)`${t}${(0,r.getProperty)(i)} === undefined`;return n?(0,r.or)(s,(0,r.not)(l(e,t,i))):s}function d(e){return e?Object.keys(e).filter(e=>"__proto__"!==e):[]}i.checkReportMissingProp=function(e,t){let{gen:i,data:n,it:s}=e;i.if(c(i,n,t,s.opts.ownProperties),()=>{e.setParams({missingProperty:(0,r._)`${t}`},!0),e.error()})},i.checkMissingProp=function({gen:e,data:t,it:{opts:i}},n,s){return(0,r.or)(...n.map(n=>(0,r.and)(c(e,t,n,i.ownProperties),(0,r._)`${s} = ${n}`)))},i.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},i.hasPropFunc=o,i.isOwnProperty=l,i.propertyInData=function(e,t,i,n){let s=(0,r._)`${t}${(0,r.getProperty)(i)} !== undefined`;return n?(0,r._)`${s} && ${l(e,t,i)}`:s},i.noPropertyInData=c,i.allSchemaProperties=d,i.schemaProperties=function(e,t){return d(t).filter(i=>!(0,n.alwaysValidSchema)(e,t[i]))},i.callValidateCode=function({schemaCode:e,data:t,it:{gen:i,topSchemaRef:n,schemaPath:a,errorPath:o},it:l},c,d,u){let h=u?(0,r._)`${e}, ${t}, ${n}${a}`:t,A=[[s.default.instancePath,(0,r.strConcat)(s.default.instancePath,o)],[s.default.parentData,l.parentData],[s.default.parentDataProperty,l.parentDataProperty],[s.default.rootData,s.default.rootData]];l.opts.dynamicRef&&A.push([s.default.dynamicAnchors,s.default.dynamicAnchors]);let p=(0,r._)`${h}, ${i.object(...A)}`;return d!==r.nil?(0,r._)`${c}.call(${d}, ${p})`:(0,r._)`${c}(${p})`};let u=(0,r._)`new RegExp`;i.usePattern=function({gen:e,it:{opts:t}},i){let n=t.unicodeRegExp?"u":"",{regExp:s}=t.code,o=s(i,n);return e.scopeValue("pattern",{key:o.toString(),ref:o,code:(0,r._)`${"new RegExp"===s.code?u:(0,a.useFunc)(e,s)}(${i}, ${n})`})},i.validateArray=function(e){let{gen:t,data:i,keyword:s,it:a}=e,o=t.name("valid");if(a.allErrors){let e=t.let("valid",!0);return l(()=>t.assign(e,!1)),e}return t.var(o,!0),l(()=>t.break()),o;function l(a){let l=t.const("len",(0,r._)`${i}.length`);t.forRange("i",0,l,i=>{e.subschema({keyword:s,dataProp:i,dataPropType:n.Type.Num},o),t.if((0,r.not)(o),a)})}},i.validateUnion=function(e){let{gen:t,schema:i,keyword:s,it:a}=e;if(!Array.isArray(i))throw Error("ajv implementation error");if(i.some(e=>(0,n.alwaysValidSchema)(a,e))&&!a.opts.unevaluated)return;let o=t.let("valid",!1),l=t.name("_valid");t.block(()=>i.forEach((i,n)=>{let a=e.subschema({keyword:s,schemaProp:n,compositeRule:!0},l);t.assign(o,(0,r._)`${o} || ${l}`),e.mergeValidEvaluated(a,l)||t.if((0,r.not)(o))})),e.result(o,()=>e.reset(),()=>e.error(!0))}},687571,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.validateKeywordUsage=i.validSchemaType=i.funcKeywordCode=i.macroKeywordCode=void 0;let r=e.r(776902),n=e.r(515301),s=e.r(905378),a=e.r(164294);function o(e){let{gen:t,data:i,it:n}=e;t.if(n.parentData,()=>t.assign(i,(0,r._)`${n.parentData}[${n.parentDataProperty}]`))}function l(e,t){let{gen:i}=e;i.if((0,r._)`Array.isArray(${t})`,()=>{i.assign(n.default.vErrors,(0,r._)`${n.default.vErrors} === null ? ${t} : ${n.default.vErrors}.concat(${t})`).assign(n.default.errors,(0,r._)`${n.default.vErrors}.length`),(0,a.extendErrors)(e)},()=>e.error())}function c({schemaEnv:e},t){if(t.async&&!e.$async)throw Error("async keyword in sync schema")}function d(e,t,i){if(void 0===i)throw Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof i?{ref:i}:{ref:i,code:(0,r.stringify)(i)})}i.macroKeywordCode=function(e,t){let{gen:i,keyword:n,schema:s,parentSchema:a,it:o}=e,l=t.macro.call(o.self,s,a,o),c=d(i,n,l);!1!==o.opts.validateSchema&&o.self.validateSchema(l,!0);let u=i.name("valid");e.subschema({schema:l,schemaPath:r.nil,errSchemaPath:`${o.errSchemaPath}/${n}`,topSchemaRef:c,compositeRule:!0},u),e.pass(u,()=>e.error(!0))},i.funcKeywordCode=function(e,t){var i;let{gen:a,keyword:u,schema:h,parentSchema:A,$data:p,it:f}=e;c(f,t);let g=d(a,u,!p&&t.compile?t.compile.call(f.self,h,A,f):t.validate),m=a.let("valid");function y(){if(!1===t.errors)C(),t.modifying&&o(e),w(()=>e.error());else{let i=t.async?b():E();t.modifying&&o(e),w(()=>l(e,i))}}function b(){let e=a.let("ruleErrs",null);return a.try(()=>C((0,r._)`await `),t=>a.assign(m,!1).if((0,r._)`${t} instanceof ${f.ValidationError}`,()=>a.assign(e,(0,r._)`${t}.errors`),()=>a.throw(t))),e}function E(){let e=(0,r._)`${g}.errors`;return a.assign(e,null),C(r.nil),e}function C(i=t.async?(0,r._)`await `:r.nil){let o=f.opts.passContext?n.default.this:n.default.self,l=!("compile"in t&&!p||!1===t.schema);a.assign(m,(0,r._)`${i}${(0,s.callValidateCode)(e,g,o,l)}`,t.modifying)}function w(e){var i;a.if((0,r.not)(null!=(i=t.valid)?i:m),e)}e.block$data(m,y),e.ok(null!=(i=t.valid)?i:m)},i.validSchemaType=function(e,t,i=!1){return!t.length||t.some(t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||i&&void 0===e)},i.validateKeywordUsage=function({schema:e,opts:t,self:i,errSchemaPath:r},n,s){if(Array.isArray(n.keyword)?!n.keyword.includes(s):n.keyword!==s)throw Error("ajv implementation error");let a=n.dependencies;if(null==a?void 0:a.some(t=>!Object.prototype.hasOwnProperty.call(e,t)))throw Error(`parent schema must have dependencies of ${s}: ${a.join(",")}`);if(n.validateSchema&&!n.validateSchema(e[s])){let e=`keyword "${s}" value is invalid at path "${r}": `+i.errorsText(n.validateSchema.errors);if("log"===t.validateSchema)i.logger.error(e);else throw Error(e)}}},419586,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.extendSubschemaMode=i.extendSubschemaData=i.getSubschema=void 0;let r=e.r(776902),n=e.r(335431);i.getSubschema=function(e,{keyword:t,schemaProp:i,schema:s,schemaPath:a,errSchemaPath:o,topSchemaRef:l}){if(void 0!==t&&void 0!==s)throw Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){let s=e.schema[t];return void 0===i?{schema:s,schemaPath:(0,r._)`${e.schemaPath}${(0,r.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:s[i],schemaPath:(0,r._)`${e.schemaPath}${(0,r.getProperty)(t)}${(0,r.getProperty)(i)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,n.escapeFragment)(i)}`}}if(void 0!==s){if(void 0===a||void 0===o||void 0===l)throw Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:s,schemaPath:a,topSchemaRef:l,errSchemaPath:o}}throw Error('either "keyword" or "schema" must be passed')},i.extendSubschemaData=function(e,t,{dataProp:i,dataPropType:s,data:a,dataTypes:o,propertyName:l}){if(void 0!==a&&void 0!==i)throw Error('both "data" and "dataProp" passed, only one allowed');let{gen:c}=t;if(void 0!==i){let{errorPath:a,dataPathArr:o,opts:l}=t;d(c.let("data",(0,r._)`${t.data}${(0,r.getProperty)(i)}`,!0)),e.errorPath=(0,r.str)`${a}${(0,n.getErrorPath)(i,s,l.jsPropertySyntax)}`,e.parentDataProperty=(0,r._)`${i}`,e.dataPathArr=[...o,e.parentDataProperty]}function d(i){e.data=i,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,i]}void 0!==a&&(d(a instanceof r.Name?a:c.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),o&&(e.dataTypes=o)},i.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:i,compositeRule:r,createErrors:n,allErrors:s}){void 0!==r&&(e.compositeRule=r),void 0!==n&&(e.createErrors=n),void 0!==s&&(e.allErrors=s),e.jtdDiscriminator=t,e.jtdMetadata=i}},519573,(e,t,i)=>{"use strict";t.exports=function e(t,i){if(t===i)return!0;if(t&&i&&"object"==typeof t&&"object"==typeof i){if(t.constructor!==i.constructor)return!1;if(Array.isArray(t)){if((r=t.length)!=i.length)return!1;for(n=r;0!=n--;)if(!e(t[n],i[n]))return!1;return!0}if(t.constructor===RegExp)return t.source===i.source&&t.flags===i.flags;if(t.valueOf!==Object.prototype.valueOf)return t.valueOf()===i.valueOf();if(t.toString!==Object.prototype.toString)return t.toString()===i.toString();if((r=(s=Object.keys(t)).length)!==Object.keys(i).length)return!1;for(n=r;0!=n--;)if(!Object.prototype.hasOwnProperty.call(i,s[n]))return!1;for(n=r;0!=n--;){var r,n,s,a=s[n];if(!e(t[a],i[a]))return!1}return!0}return t!=t&&i!=i}},306919,(e,t,i)=>{"use strict";var r=t.exports=function(e,t,i){"function"==typeof t&&(i=t,t={});var r="function"==typeof(i=t.cb||i)?i:i.pre||function(){};n(t,r,i.post||function(){},e,"",e)};function n(e,t,i,a,o,l,c,d,u,h){if(a&&"object"==typeof a&&!Array.isArray(a)){for(var A in t(a,o,l,c,d,u,h),a){var p=a[A];if(Array.isArray(p)){if(A in r.arrayKeywords)for(var f=0;f<p.length;f++)n(e,t,i,p[f],o+"/"+A+"/"+f,l,o,A,a,f)}else if(A in r.propsKeywords){if(p&&"object"==typeof p)for(var g in p)n(e,t,i,p[g],o+"/"+A+"/"+s(g),l,o,A,a,g)}else(A in r.keywords||e.allKeys&&!(A in r.skipKeywords))&&n(e,t,i,p,o+"/"+A,l,o,A,a)}i(a,o,l,c,d,u,h)}}function s(e){return e.replace(/~/g,"~0").replace(/\//g,"~1")}r.keywords={additionalItems:!0,items:!0,contains:!0,additionalProperties:!0,propertyNames:!0,not:!0,if:!0,then:!0,else:!0},r.arrayKeywords={items:!0,allOf:!0,anyOf:!0,oneOf:!0},r.propsKeywords={$defs:!0,definitions:!0,properties:!0,patternProperties:!0,dependencies:!0},r.skipKeywords={default:!0,enum:!0,const:!0,required:!0,maximum:!0,minimum:!0,exclusiveMaximum:!0,exclusiveMinimum:!0,multipleOf:!0,maxLength:!0,minLength:!0,pattern:!0,format:!0,maxItems:!0,minItems:!0,uniqueItems:!0,maxProperties:!0,minProperties:!0}},896336,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getSchemaRefs=i.resolveUrl=i.normalizeId=i._getFullPath=i.getFullPath=i.inlineRef=void 0;let r=e.r(335431),n=e.r(519573),s=e.r(306919),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);i.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};let o=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(let t in e){if(o.has(t))return!0;let i=e[t];if(Array.isArray(i)&&i.some(l)||"object"==typeof i&&l(i))return!0}return!1}function c(e){let t=0;for(let i in e)if("$ref"===i||(t++,!a.has(i)&&("object"==typeof e[i]&&(0,r.eachItem)(e[i],e=>t+=c(e)),t===1/0)))return 1/0;return t}function d(e,t="",i){!1!==i&&(t=A(t));let r=e.parse(t);return u(e,r)}function u(e,t){return e.serialize(t).split("#")[0]+"#"}i.getFullPath=d,i._getFullPath=u;let h=/#\/?$/;function A(e){return e?e.replace(h,""):""}i.normalizeId=A,i.resolveUrl=function(e,t,i){return i=A(i),e.resolve(t,i)};let p=/^[a-z_][-a-z0-9._]*$/i;i.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};let{schemaId:i,uriResolver:r}=this.opts,a=A(e[i]||t),o={"":a},l=d(r,a,!1),c={},u=new Set;return s(e,{allKeys:!0},(e,t,r,n)=>{if(void 0===n)return;let s=l+t,a=o[n];function d(t){let i=this.opts.uriResolver.resolve;if(t=A(a?i(a,t):t),u.has(t))throw f(t);u.add(t);let r=this.refs[t];return"string"==typeof r&&(r=this.refs[r]),"object"==typeof r?h(e,r.schema,t):t!==A(s)&&("#"===t[0]?(h(e,c[t],t),c[t]=e):this.refs[t]=s),t}function g(e){if("string"==typeof e){if(!p.test(e))throw Error(`invalid anchor "${e}"`);d.call(this,`#${e}`)}}"string"==typeof e[i]&&(a=d.call(this,e[i])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),o[t]=a}),c;function h(e,t,i){if(void 0!==t&&!n(e,t))throw f(i)}function f(e){return Error(`reference "${e}" resolves to more than one schema`)}}},819291,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getData=i.KeywordCxt=i.validateFunctionCode=void 0;let r=e.r(188725),n=e.r(814484),s=e.r(28196),a=e.r(814484),o=e.r(867029),l=e.r(687571),c=e.r(419586),d=e.r(776902),u=e.r(515301),h=e.r(896336),A=e.r(335431),p=e.r(164294);function f({gen:e,validateName:t,schema:i,schemaEnv:r,opts:n},s){n.code.es5?e.func(t,(0,d._)`${u.default.data}, ${u.default.valCxt}`,r.$async,()=>{e.code((0,d._)`"use strict"; ${E(i,n)}`),m(e,n),e.code(s)}):e.func(t,(0,d._)`${u.default.data}, ${g(n)}`,r.$async,()=>e.code(E(i,n)).code(s))}function g(e){return(0,d._)`{${u.default.instancePath}="", ${u.default.parentData}, ${u.default.parentDataProperty}, ${u.default.rootData}=${u.default.data}${e.dynamicRef?(0,d._)`, ${u.default.dynamicAnchors}={}`:d.nil}}={}`}function m(e,t){e.if(u.default.valCxt,()=>{e.var(u.default.instancePath,(0,d._)`${u.default.valCxt}.${u.default.instancePath}`),e.var(u.default.parentData,(0,d._)`${u.default.valCxt}.${u.default.parentData}`),e.var(u.default.parentDataProperty,(0,d._)`${u.default.valCxt}.${u.default.parentDataProperty}`),e.var(u.default.rootData,(0,d._)`${u.default.valCxt}.${u.default.rootData}`),t.dynamicRef&&e.var(u.default.dynamicAnchors,(0,d._)`${u.default.valCxt}.${u.default.dynamicAnchors}`)},()=>{e.var(u.default.instancePath,(0,d._)`""`),e.var(u.default.parentData,(0,d._)`undefined`),e.var(u.default.parentDataProperty,(0,d._)`undefined`),e.var(u.default.rootData,u.default.data),t.dynamicRef&&e.var(u.default.dynamicAnchors,(0,d._)`{}`)})}function y(e){let{schema:t,opts:i,gen:r}=e;f(e,()=>{i.$comment&&t.$comment&&N(e),S(e),r.let(u.default.vErrors,null),r.let(u.default.errors,0),i.unevaluated&&b(e),Q(e),D(e)})}function b(e){let{gen:t,validateName:i}=e;e.evaluated=t.const("evaluated",(0,d._)`${i}.evaluated`),t.if((0,d._)`${e.evaluated}.dynamicProps`,()=>t.assign((0,d._)`${e.evaluated}.props`,(0,d._)`undefined`)),t.if((0,d._)`${e.evaluated}.dynamicItems`,()=>t.assign((0,d._)`${e.evaluated}.items`,(0,d._)`undefined`))}function E(e,t){let i="object"==typeof e&&e[t.schemaId];return i&&(t.code.source||t.code.process)?(0,d._)`/*# sourceURL=${i} */`:d.nil}function C(e,t){I(e)&&(B(e),w(e))?v(e,t):(0,r.boolOrEmptySchema)(e,t)}function w({schema:e,self:t}){if("boolean"==typeof e)return!e;for(let i in e)if(t.RULES.all[i])return!0;return!1}function I(e){return"boolean"!=typeof e.schema}function v(e,t){let{schema:i,gen:r,opts:n}=e;n.$comment&&i.$comment&&N(e),k(e),T(e);let s=r.const("_errs",u.default.errors);Q(e,s),r.var(t,(0,d._)`${s} === ${u.default.errors}`)}function B(e){(0,A.checkUnknownRules)(e),x(e)}function Q(e,t){if(e.opts.jtd)return R(e,[],!1,t);let i=(0,n.getSchemaTypes)(e.schema),r=(0,n.coerceAndCheckDataType)(e,i);R(e,i,!r,t)}function x(e){let{schema:t,errSchemaPath:i,opts:r,self:n}=e;t.$ref&&r.ignoreKeywordsWithRef&&(0,A.schemaHasRulesButRef)(t,n.RULES)&&n.logger.warn(`$ref: keywords ignored in schema at path "${i}"`)}function S(e){let{schema:t,opts:i}=e;void 0!==t.default&&i.useDefaults&&i.strictSchema&&(0,A.checkStrictMode)(e,"default is ignored in the schema root")}function k(e){let t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,h.resolveUrl)(e.opts.uriResolver,e.baseId,t))}function T(e){if(e.schema.$async&&!e.schemaEnv.$async)throw Error("async schema in sync schema")}function N({gen:e,schemaEnv:t,schema:i,errSchemaPath:r,opts:n}){let s=i.$comment;if(!0===n.$comment)e.code((0,d._)`${u.default.self}.logger.log(${s})`);else if("function"==typeof n.$comment){let i=(0,d.str)`${r}/$comment`,n=e.scopeValue("root",{ref:t.root});e.code((0,d._)`${u.default.self}.opts.$comment(${s}, ${i}, ${n}.schema)`)}}function D(e){let{gen:t,schemaEnv:i,validateName:r,ValidationError:n,opts:s}=e;i.$async?t.if((0,d._)`${u.default.errors} === 0`,()=>t.return(u.default.data),()=>t.throw((0,d._)`new ${n}(${u.default.vErrors})`)):(t.assign((0,d._)`${r}.errors`,u.default.vErrors),s.unevaluated&&_(e),t.return((0,d._)`${u.default.errors} === 0`))}function _({gen:e,evaluated:t,props:i,items:r}){i instanceof d.Name&&e.assign((0,d._)`${t}.props`,i),r instanceof d.Name&&e.assign((0,d._)`${t}.items`,r)}function R(e,t,i,r){let{gen:n,schema:o,data:l,allErrors:c,opts:h,self:p}=e,{RULES:f}=p;if(o.$ref&&(h.ignoreKeywordsWithRef||!(0,A.schemaHasRulesButRef)(o,f)))return void n.block(()=>z(e,"$ref",f.all.$ref.definition));function g(A){(0,s.shouldUseGroup)(o,A)&&(A.type?(n.if((0,a.checkDataType)(A.type,l,h.strictNumbers)),L(e,A),1===t.length&&t[0]===A.type&&i&&(n.else(),(0,a.reportTypeError)(e)),n.endIf()):L(e,A),c||n.if((0,d._)`${u.default.errors} === ${r||0}`))}h.jtd||F(e,t),n.block(()=>{for(let e of f.rules)g(e);g(f.post)})}function L(e,t){let{gen:i,schema:r,opts:{useDefaults:n}}=e;n&&(0,o.assignDefaults)(e,t.type),i.block(()=>{for(let i of t.rules)(0,s.shouldUseRule)(r,i)&&z(e,i.keyword,i.definition,t.type)})}function F(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(M(e,t),e.opts.allowUnionTypes||O(e,t),U(e,e.dataTypes))}function M(e,t){if(t.length){if(!e.dataTypes.length){e.dataTypes=t;return}t.forEach(t=>{$(e.dataTypes,t)||H(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)}),j(e,t)}}function O(e,t){t.length>1&&!(2===t.length&&t.includes("null"))&&H(e,"use allowUnionTypes to allow union type keyword")}function U(e,t){let i=e.self.RULES.all;for(let r in i){let n=i[r];if("object"==typeof n&&(0,s.shouldUseRule)(e.schema,n)){let{type:i}=n.definition;i.length&&!i.some(e=>P(t,e))&&H(e,`missing type "${i.join(",")}" for keyword "${r}"`)}}}function P(e,t){return e.includes(t)||"number"===t&&e.includes("integer")}function $(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function j(e,t){let i=[];for(let r of e.dataTypes)$(t,r)?i.push(r):t.includes("integer")&&"number"===r&&i.push("integer");e.dataTypes=i}function H(e,t){let i=e.schemaEnv.baseId+e.errSchemaPath;t+=` at "${i}" (strictTypes)`,(0,A.checkStrictMode)(e,t,e.opts.strictTypes)}i.validateFunctionCode=function(e){I(e)&&(B(e),w(e))?y(e):f(e,()=>(0,r.topBoolOrEmptySchema)(e))};class q{constructor(e,t,i){if((0,l.validateKeywordUsage)(e,t,i),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=i,this.data=e.data,this.schema=e.schema[i],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,A.schemaRefOrVal)(e,this.schema,i,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",Y(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw Error(`${i} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",u.default.errors))}result(e,t,i){this.failResult((0,d.not)(e),t,i)}failResult(e,t,i){this.gen.if(e),i?i():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,d.not)(e),void 0,t)}fail(e){if(void 0===e){this.error(),this.allErrors||this.gen.if(!1);return}this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);let{schemaCode:t}=this;this.fail((0,d._)`${t} !== undefined && (${(0,d.or)(this.invalid$data(),e)})`)}error(e,t,i){if(t){this.setParams(t),this._error(e,i),this.setParams({});return}this._error(e,i)}_error(e,t){(e?p.reportExtraError:p.reportError)(this,this.def.error,t)}$dataError(){(0,p.reportError)(this,this.def.$dataError||p.keyword$DataError)}reset(){if(void 0===this.errsCount)throw Error('add "trackErrors" to keyword definition');(0,p.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,i=d.nil){this.gen.block(()=>{this.check$data(e,i),t()})}check$data(e=d.nil,t=d.nil){if(!this.$data)return;let{gen:i,schemaCode:r,schemaType:n,def:s}=this;i.if((0,d.or)((0,d._)`${r} === undefined`,t)),e!==d.nil&&i.assign(e,!0),(n.length||s.validateSchema)&&(i.elseIf(this.invalid$data()),this.$dataError(),e!==d.nil&&i.assign(e,!1)),i.else()}invalid$data(){let{gen:e,schemaCode:t,schemaType:i,def:r,it:n}=this;return(0,d.or)(s(),o());function s(){if(i.length){if(!(t instanceof d.Name))throw Error("ajv implementation error");let e=Array.isArray(i)?i:[i];return(0,d._)`${(0,a.checkDataTypes)(e,t,n.opts.strictNumbers,a.DataType.Wrong)}`}return d.nil}function o(){if(r.validateSchema){let i=e.scopeValue("validate$data",{ref:r.validateSchema});return(0,d._)`!${i}(${t})`}return d.nil}}subschema(e,t){let i=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(i,this.it,e),(0,c.extendSubschemaMode)(i,e);let r={...this.it,...i,items:void 0,props:void 0};return C(r,t),r}mergeEvaluated(e,t){let{it:i,gen:r}=this;i.opts.unevaluated&&(!0!==i.props&&void 0!==e.props&&(i.props=A.mergeEvaluated.props(r,e.props,i.props,t)),!0!==i.items&&void 0!==e.items&&(i.items=A.mergeEvaluated.items(r,e.items,i.items,t)))}mergeValidEvaluated(e,t){let{it:i,gen:r}=this;if(i.opts.unevaluated&&(!0!==i.props||!0!==i.items))return r.if(t,()=>this.mergeEvaluated(e,d.Name)),!0}}function z(e,t,i,r){let n=new q(e,i,t);"code"in i?i.code(n,r):n.$data&&i.validate?(0,l.funcKeywordCode)(n,i):"macro"in i?(0,l.macroKeywordCode)(n,i):(i.compile||i.validate)&&(0,l.funcKeywordCode)(n,i)}i.KeywordCxt=q;let V=/^\/(?:[^~]|~0|~1)*$/,G=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function Y(e,{dataLevel:t,dataNames:i,dataPathArr:r}){let n,s;if(""===e)return u.default.rootData;if("/"===e[0]){if(!V.test(e))throw Error(`Invalid JSON-pointer: ${e}`);n=e,s=u.default.rootData}else{let a=G.exec(e);if(!a)throw Error(`Invalid JSON-pointer: ${e}`);let l=+a[1];if("#"===(n=a[2])){if(l>=t)throw Error(o("property/index",l));return r[t-l]}if(l>t)throw Error(o("data",l));if(s=i[t-l],!n)return s}let a=s;for(let e of n.split("/"))e&&(s=(0,d._)`${s}${(0,d.getProperty)((0,A.unescapeJsonPointer)(e))}`,a=(0,d._)`${a} && ${s}`);return a;function o(e,i){return`Cannot access ${e} ${i} levels up, current level is ${t}`}}i.getData=Y},892540,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}i.default=r},757075,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(896336);class n extends Error{constructor(e,t,i,n){super(n||`can't resolve reference ${i} from id ${t}`),this.missingRef=(0,r.resolveUrl)(e,t,i),this.missingSchema=(0,r.normalizeId)((0,r.getFullPath)(e,this.missingRef))}}i.default=n},699811,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.resolveSchema=i.getCompilingSchema=i.resolveRef=i.compileSchema=i.SchemaEnv=void 0;let r=e.r(776902),n=e.r(892540),s=e.r(515301),a=e.r(896336),o=e.r(335431),l=e.r(819291);class c{constructor(e){var t;let i;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(i=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!=(t=e.baseId)?t:(0,a.normalizeId)(null==i?void 0:i[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==i?void 0:i.$async,this.refs={}}}function d(e){let t,i,o=h.call(this,e);if(o)return o;let c=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:d,lines:u}=this.opts.code,{ownProperties:A}=this.opts,p=new r.CodeGen(this.scope,{es5:d,lines:u,ownProperties:A});e.$async&&(t=p.scopeValue("Error",{ref:n.default,code:(0,r._)`require("ajv/dist/runtime/validation_error").default`}));let f=p.scopeName("validate");e.validateName=f;let g={gen:p,allErrors:this.opts.allErrors,data:s.default.data,parentData:s.default.parentData,parentDataProperty:s.default.parentDataProperty,dataNames:[s.default.data],dataPathArr:[r.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:p.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,r.stringify)(e.schema)}:{ref:e.schema}),validateName:f,ValidationError:t,schema:e.schema,schemaEnv:e,rootId:c,baseId:e.baseId||c,schemaPath:r.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:(0,r._)`""`,opts:this.opts,self:this};try{this._compilations.add(e),(0,l.validateFunctionCode)(g),p.optimize(this.opts.code.optimize);let t=p.toString();i=`${p.scopeRefs(s.default.scope)}return ${t}`,this.opts.code.process&&(i=this.opts.code.process(i,e));let n=Function(`${s.default.self}`,`${s.default.scope}`,i)(this,this.scope.get());if(this.scope.value(f,{ref:n}),n.errors=null,n.schema=e.schema,n.schemaEnv=e,e.$async&&(n.$async=!0),!0===this.opts.code.source&&(n.source={validateName:f,validateCode:t,scopeValues:p._values}),this.opts.unevaluated){let{props:e,items:t}=g;n.evaluated={props:e instanceof r.Name?void 0:e,items:t instanceof r.Name?void 0:t,dynamicProps:e instanceof r.Name,dynamicItems:t instanceof r.Name},n.source&&(n.source.evaluated=(0,r.stringify)(n.evaluated))}return e.validate=n,e}catch(t){throw delete e.validate,delete e.validateName,i&&this.logger.error("Error compiling schema, function code:",i),t}finally{this._compilations.delete(e)}}function u(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:d.call(this,e)}function h(e){for(let t of this._compilations)if(A(t,e))return t}function A(e,t){return e.schema===t.schema&&e.root===t.root&&e.baseId===t.baseId}function p(e,t){let i;for(;"string"==typeof(i=this.refs[t]);)t=i;return i||this.schemas[t]||f.call(this,e,t)}function f(e,t){let i=this.opts.uriResolver.parse(t),r=(0,a._getFullPath)(this.opts.uriResolver,i),n=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&r===n)return m.call(this,i,e);let s=(0,a.normalizeId)(r),o=this.refs[s]||this.schemas[s];if("string"==typeof o){let t=f.call(this,e,o);if("object"!=typeof(null==t?void 0:t.schema))return;return m.call(this,i,t)}if("object"==typeof(null==o?void 0:o.schema)){if(o.validate||d.call(this,o),s===(0,a.normalizeId)(t)){let{schema:t}=o,{schemaId:i}=this.opts,r=t[i];return r&&(n=(0,a.resolveUrl)(this.opts.uriResolver,n,r)),new c({schema:t,schemaId:i,root:e,baseId:n})}return m.call(this,i,o)}}i.SchemaEnv=c,i.compileSchema=d,i.resolveRef=function(e,t,i){var r;i=(0,a.resolveUrl)(this.opts.uriResolver,t,i);let n=e.refs[i];if(n)return n;let s=p.call(this,e,i);if(void 0===s){let n=null==(r=e.localRefs)?void 0:r[i],{schemaId:a}=this.opts;n&&(s=new c({schema:n,schemaId:a,root:e,baseId:t}))}if(void 0!==s)return e.refs[i]=u.call(this,s)},i.getCompilingSchema=h,i.resolveSchema=f;let g=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function m(e,{baseId:t,schema:i,root:r}){var n;let s;if((null==(n=e.fragment)?void 0:n[0])!=="/")return;for(let r of e.fragment.slice(1).split("/")){if("boolean"==typeof i)return;let e=i[(0,o.unescapeFragment)(r)];if(void 0===e)return;let n="object"==typeof(i=e)&&i[this.opts.schemaId];!g.has(r)&&n&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,n))}if("boolean"!=typeof i&&i.$ref&&!(0,o.schemaHasRulesButRef)(i,this.RULES)){let e=(0,a.resolveUrl)(this.opts.uriResolver,t,i.$ref);s=f.call(this,r,e)}let{schemaId:l}=this.opts;if((s=s||new c({schema:i,schemaId:l,root:r,baseId:t})).schema!==s.root.schema)return s}},468713,(e,t,i)=>{"use strict";let r=RegExp.prototype.test.bind(/^[\da-f]{8}-[\da-f]{4}-[\da-f]{4}-[\da-f]{4}-[\da-f]{12}$/iu),n=RegExp.prototype.test.bind(/^(?:(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)\.){3}(?:25[0-5]|2[0-4]\d|1\d{2}|[1-9]\d|\d)$/u);function s(e){let t="",i=0,r=0;for(r=0;r<e.length;r++)if(48!==(i=e[r].charCodeAt(0))){if(!(i>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";t+=e[r];break}for(r+=1;r<e.length;r++){if(!((i=e[r].charCodeAt(0))>=48&&i<=57||i>=65&&i<=70||i>=97&&i<=102))return"";t+=e[r]}return t}function a(e){return e.length=0,!0}function o(e,t,i){if(e.length){let r=s(e);if(""===r)return i.error=!0,!1;t.push(r),e.length=0}return!0}function l(e){let t=0,i={error:!1,address:"",zone:""},r=[],n=[],l=!1,c=!1,d=o;for(let s=0;s<e.length;s++){let o=e[s];if("["!==o&&"]"!==o)if(":"===o){if(!0===l&&(c=!0),!d(n,r,i))break;if(++t>7){i.error=!0;break}s>0&&":"===e[s-1]&&(l=!0),r.push(":");continue}else if("%"===o){if(!d(n,r,i))break;d=a}else{n.push(o);continue}}return n.length&&(d===a?i.zone=n.join(""):c?r.push(n.join("")):r.push(s(n))),i.address=r.join(""),i}function c(e){if(2>d(e,":"))return{host:e,isIPV6:!1};let t=l(e);if(t.error)return{host:e,isIPV6:!1};{let e=t.address,i=t.address;return t.zone&&(e+="%"+t.zone,i+="%25"+t.zone),{host:e,isIPV6:!0,escapedHost:i}}}function d(e,t){let i=0;for(let r=0;r<e.length;r++)e[r]===t&&i++;return i}function u(e){let t=e,i=[],r=-1,n=0;for(;n=t.length;){if(1===n)if("."===t)break;else if("/"===t){i.push("/");break}else{i.push(t);break}if(2===n){if("."===t[0]){if("."===t[1])break;else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&("."===t[1]||"/"===t[1])){i.push("/");break}}else if(3===n&&"/.."===t){0!==i.length&&i.pop(),i.push("/");break}if("."===t[0]){if("."===t[1]){if("/"===t[2]){t=t.slice(3);continue}}else if("/"===t[1]){t=t.slice(2);continue}}else if("/"===t[0]&&"."===t[1]){if("/"===t[2]){t=t.slice(2);continue}else if("."===t[2]&&"/"===t[3]){t=t.slice(3),0!==i.length&&i.pop();continue}}if(-1===(r=t.indexOf("/",1))){i.push(t);break}i.push(t.slice(0,r)),t=t.slice(r)}return i.join("")}function h(e,t){let i=!0!==t?escape:unescape;return void 0!==e.scheme&&(e.scheme=i(e.scheme)),void 0!==e.userinfo&&(e.userinfo=i(e.userinfo)),void 0!==e.host&&(e.host=i(e.host)),void 0!==e.path&&(e.path=i(e.path)),void 0!==e.query&&(e.query=i(e.query)),void 0!==e.fragment&&(e.fragment=i(e.fragment)),e}function A(e){let t=[];if(void 0!==e.userinfo&&(t.push(e.userinfo),t.push("@")),void 0!==e.host){let i=unescape(e.host);if(!n(i)){let t=c(i);i=!0===t.isIPV6?`[${t.escapedHost}]`:e.host}t.push(i)}return("number"==typeof e.port||"string"==typeof e.port)&&(t.push(":"),t.push(String(e.port))),t.length?t.join(""):void 0}t.exports={nonSimpleDomain:RegExp.prototype.test.bind(/[^!"$&'()*+,\-.;=_`a-z{}~]/u),recomposeAuthority:A,normalizeComponentEncoding:h,removeDotSegments:u,isIPv4:n,isUUID:r,normalizeIPv6:c,stringArrayToHexStripped:s}},76906,(e,t,i)=>{"use strict";let{isUUID:r}=e.r(468713),n=/([\da-z][\d\-a-z]{0,31}):((?:[\w!$'()*+,\-.:;=@]|%[\da-f]{2})+)/iu,s=["http","https","ws","wss","urn","urn:uuid"];function a(e){return -1!==s.indexOf(e)}function o(e){return!0===e.secure||!1!==e.secure&&!!e.scheme&&3===e.scheme.length&&("w"===e.scheme[0]||"W"===e.scheme[0])&&("s"===e.scheme[1]||"S"===e.scheme[1])&&("s"===e.scheme[2]||"S"===e.scheme[2])}function l(e){return e.host||(e.error=e.error||"HTTP URIs must have a host."),e}function c(e){let t="https"===String(e.scheme).toLowerCase();return(e.port===(t?443:80)||""===e.port)&&(e.port=void 0),e.path||(e.path="/"),e}function d(e){return e.secure=o(e),e.resourceName=(e.path||"/")+(e.query?"?"+e.query:""),e.path=void 0,e.query=void 0,e}function u(e){if((e.port===(o(e)?443:80)||""===e.port)&&(e.port=void 0),"boolean"==typeof e.secure&&(e.scheme=e.secure?"wss":"ws",e.secure=void 0),e.resourceName){let[t,i]=e.resourceName.split("?");e.path=t&&"/"!==t?t:void 0,e.query=i,e.resourceName=void 0}return e.fragment=void 0,e}function h(e,t){if(!e.path)return e.error="URN can not be parsed",e;let i=e.path.match(n);if(i){let r=t.scheme||e.scheme||"urn";e.nid=i[1].toLowerCase(),e.nss=i[2];let n=C(`${r}:${t.nid||e.nid}`);e.path=void 0,n&&(e=n.parse(e,t))}else e.error=e.error||"URN can not be parsed.";return e}function A(e,t){if(void 0===e.nid)throw Error("URN without nid cannot be serialized");let i=t.scheme||e.scheme||"urn",r=e.nid.toLowerCase(),n=C(`${i}:${t.nid||r}`);n&&(e=n.serialize(e,t));let s=e,a=e.nss;return s.path=`${r||t.nid}:${a}`,t.skipEscape=!0,s}function p(e,t){let i=e;return i.uuid=i.nss,i.nss=void 0,t.tolerant||i.uuid&&r(i.uuid)||(i.error=i.error||"UUID is not valid."),i}function f(e){let t=e;return t.nss=(e.uuid||"").toLowerCase(),t}let g={scheme:"http",domainHost:!0,parse:l,serialize:c},m={scheme:"https",domainHost:g.domainHost,parse:l,serialize:c},y={scheme:"ws",domainHost:!0,parse:d,serialize:u},b={scheme:"wss",domainHost:y.domainHost,parse:y.parse,serialize:y.serialize},E={http:g,https:m,ws:y,wss:b,urn:{scheme:"urn",parse:h,serialize:A,skipNormalize:!0},"urn:uuid":{scheme:"urn:uuid",parse:p,serialize:f,skipNormalize:!0}};function C(e){return e&&(E[e]||E[e.toLowerCase()])||void 0}Object.setPrototypeOf(E,null),t.exports={wsIsSecure:o,SCHEMES:E,isValidSchemeName:a,getSchemeHandler:C}},40485,(e,t,i)=>{"use strict";let{normalizeIPv6:r,removeDotSegments:n,recomposeAuthority:s,normalizeComponentEncoding:a,isIPv4:o,nonSimpleDomain:l}=e.r(468713),{SCHEMES:c,getSchemeHandler:d}=e.r(76906);function u(e,t,i,r){let s={};return r||(e=p(h(e,i),i),t=p(h(t,i),i)),!(i=i||{}).tolerant&&t.scheme?(s.scheme=t.scheme,s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=n(t.path||""),s.query=t.query):(void 0!==t.userinfo||void 0!==t.host||void 0!==t.port?(s.userinfo=t.userinfo,s.host=t.host,s.port=t.port,s.path=n(t.path||""),s.query=t.query):(t.path?("/"===t.path[0]?s.path=n(t.path):(void 0===e.userinfo&&void 0===e.host&&void 0===e.port||e.path?e.path?s.path=e.path.slice(0,e.path.lastIndexOf("/")+1)+t.path:s.path=t.path:s.path="/"+t.path,s.path=n(s.path)),s.query=t.query):(s.path=e.path,void 0!==t.query?s.query=t.query:s.query=e.query),s.userinfo=e.userinfo,s.host=e.host,s.port=e.port),s.scheme=e.scheme),s.fragment=t.fragment,s}function h(e,t){let i={host:e.host,scheme:e.scheme,userinfo:e.userinfo,port:e.port,path:e.path,query:e.query,nid:e.nid,nss:e.nss,uuid:e.uuid,fragment:e.fragment,reference:e.reference,resourceName:e.resourceName,secure:e.secure,error:""},r=Object.assign({},t),a=[],o=d(r.scheme||i.scheme);o&&o.serialize&&o.serialize(i,r),void 0!==i.path&&(r.skipEscape?i.path=unescape(i.path):(i.path=escape(i.path),void 0!==i.scheme&&(i.path=i.path.split("%3A").join(":")))),"suffix"!==r.reference&&i.scheme&&a.push(i.scheme,":");let l=s(i);if(void 0!==l&&("suffix"!==r.reference&&a.push("//"),a.push(l),i.path&&"/"!==i.path[0]&&a.push("/")),void 0!==i.path){let e=i.path;r.absolutePath||o&&o.absolutePath||(e=n(e)),void 0===l&&"/"===e[0]&&"/"===e[1]&&(e="/%2F"+e.slice(2)),a.push(e)}return void 0!==i.query&&a.push("?",i.query),void 0!==i.fragment&&a.push("#",i.fragment),a.join("")}let A=/^(?:([^#/:?]+):)?(?:\/\/((?:([^#/?@]*)@)?(\[[^#/?\]]+\]|[^#/:?]*)(?::(\d*))?))?([^#?]*)(?:\?([^#]*))?(?:#((?:.|[\n\r])*))?/u;function p(e,t){let i=Object.assign({},t),n={scheme:void 0,userinfo:void 0,host:"",port:void 0,path:"",query:void 0,fragment:void 0},s=!1;"suffix"===i.reference&&(e=i.scheme?i.scheme+":"+e:"//"+e);let a=e.match(A);if(a){if(n.scheme=a[1],n.userinfo=a[3],n.host=a[4],n.port=parseInt(a[5],10),n.path=a[6]||"",n.query=a[7],n.fragment=a[8],isNaN(n.port)&&(n.port=a[5]),n.host)if(!1===o(n.host)){let e=r(n.host);n.host=e.host.toLowerCase(),s=e.isIPV6}else s=!0;void 0!==n.scheme||void 0!==n.userinfo||void 0!==n.host||void 0!==n.port||void 0!==n.query||n.path?void 0===n.scheme?n.reference="relative":void 0===n.fragment?n.reference="absolute":n.reference="uri":n.reference="same-document",i.reference&&"suffix"!==i.reference&&i.reference!==n.reference&&(n.error=n.error||"URI is not a "+i.reference+" reference.");let t=d(i.scheme||n.scheme);if(!i.unicodeSupport&&(!t||!t.unicodeSupport)&&n.host&&(i.domainHost||t&&t.domainHost)&&!1===s&&l(n.host))try{n.host=URL.domainToASCII(n.host.toLowerCase())}catch(e){n.error=n.error||"Host's domain name can not be converted to ASCII: "+e}(!t||t&&!t.skipNormalize)&&(-1!==e.indexOf("%")&&(void 0!==n.scheme&&(n.scheme=unescape(n.scheme)),void 0!==n.host&&(n.host=unescape(n.host))),n.path&&(n.path=escape(unescape(n.path))),n.fragment&&(n.fragment=encodeURI(decodeURIComponent(n.fragment)))),t&&t.parse&&t.parse(n,i)}else n.error=n.error||"URI can not be parsed.";return n}let f={SCHEMES:c,normalize:function(e,t){return"string"==typeof e?e=h(p(e,t),t):"object"==typeof e&&(e=p(h(e,t),t)),e},resolve:function(e,t,i){let r=i?Object.assign({scheme:"null"},i):{scheme:"null"},n=u(p(e,r),p(t,r),r,!0);return r.skipEscape=!0,h(n,r)},resolveComponent:u,equal:function(e,t,i){return"string"==typeof e?e=h(a(p(e=unescape(e),i),!0),{...i,skipEscape:!0}):"object"==typeof e&&(e=h(a(e,!0),{...i,skipEscape:!0})),"string"==typeof t?t=h(a(p(t=unescape(t),i),!0),{...i,skipEscape:!0}):"object"==typeof t&&(t=h(a(t,!0),{...i,skipEscape:!0})),e.toLowerCase()===t.toLowerCase()},serialize:h,parse:p};t.exports=f,t.exports.default=f,t.exports.fastUri=f},538426,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(40485);r.code='require("ajv/dist/runtime/uri").default',i.default=r},7522,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.CodeGen=i.Name=i.nil=i.stringify=i.str=i._=i.KeywordCxt=void 0;var r=e.r(819291);Object.defineProperty(i,"KeywordCxt",{enumerable:!0,get:function(){return r.KeywordCxt}});var n=e.r(776902);Object.defineProperty(i,"_",{enumerable:!0,get:function(){return n._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return n.str}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return n.stringify}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return n.nil}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return n.Name}}),Object.defineProperty(i,"CodeGen",{enumerable:!0,get:function(){return n.CodeGen}});let s=e.r(892540),a=e.r(757075),o=e.r(226514),l=e.r(699811),c=e.r(776902),d=e.r(896336),u=e.r(814484),h=e.r(335431),A=e.r(69659),p=e.r(538426),f=(e,t)=>new RegExp(e,t);f.code="new RegExp";let g=["removeAdditional","useDefaults","coerceTypes"],m=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),y={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},b={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'},E=200;function C(e){var t,i,r,n,s,a,o,l,c,d,u,h,A,g,m,y,b,C,w,I,v,B,Q,x,S;let k=e.strict,T=null==(t=e.code)?void 0:t.optimize,N=!0===T||void 0===T?1:T||0,D=null!=(r=null==(i=e.code)?void 0:i.regExp)?r:f,_=null!=(n=e.uriResolver)?n:p.default;return{strictSchema:null==(a=null!=(s=e.strictSchema)?s:k)||a,strictNumbers:null==(l=null!=(o=e.strictNumbers)?o:k)||l,strictTypes:null!=(d=null!=(c=e.strictTypes)?c:k)?d:"log",strictTuples:null!=(h=null!=(u=e.strictTuples)?u:k)?h:"log",strictRequired:null!=(g=null!=(A=e.strictRequired)?A:k)&&g,code:e.code?{...e.code,optimize:N,regExp:D}:{optimize:N,regExp:D},loopRequired:null!=(m=e.loopRequired)?m:E,loopEnum:null!=(y=e.loopEnum)?y:E,meta:null==(b=e.meta)||b,messages:null==(C=e.messages)||C,inlineRefs:null==(w=e.inlineRefs)||w,schemaId:null!=(I=e.schemaId)?I:"$id",addUsedSchema:null==(v=e.addUsedSchema)||v,validateSchema:null==(B=e.validateSchema)||B,validateFormats:null==(Q=e.validateFormats)||Q,unicodeRegExp:null==(x=e.unicodeRegExp)||x,int32range:null==(S=e.int32range)||S,uriResolver:_}}class w{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...C(e)};const{es5:t,lines:i}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:m,es5:t,lines:i}),this.logger=T(e.logger);const r=e.validateFormats;e.validateFormats=!1,this.RULES=(0,o.getRules)(),I.call(this,y,e,"NOT SUPPORTED"),I.call(this,b,e,"DEPRECATED","warn"),this._metaOpts=S.call(this),e.formats&&Q.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&x.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),B.call(this),e.validateFormats=r}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){let{$data:e,meta:t,schemaId:i}=this.opts,r=A;"id"===i&&((r={...A}).id=r.$id,delete r.$id),t&&e&&this.addMetaSchema(r,r[i],!1)}defaultMeta(){let{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let i;if("string"==typeof e){if(!(i=this.getSchema(e)))throw Error(`no schema with key or ref "${e}"`)}else i=this.compile(e);let r=i(t);return"$async"in i||(this.errors=i.errors),r}compile(e,t){let i=this._addSchema(e,t);return i.validate||this._compileSchemaEnv(i)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw Error("options.loadSchema should be a function");let{loadSchema:i}=this.opts;return r.call(this,e,t);async function r(e,t){await n.call(this,e.$schema);let i=this._addSchema(e,t);return i.validate||s.call(this,i)}async function n(e){e&&!this.getSchema(e)&&await r.call(this,{$ref:e},!0)}async function s(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return o.call(this,t),await l.call(this,t.missingSchema),s.call(this,e)}}function o({missingSchema:e,missingRef:t}){if(this.refs[e])throw Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){let i=await c.call(this,e);this.refs[e]||await n.call(this,i.$schema),this.refs[e]||this.addSchema(i,e,t)}async function c(e){let t=this._loading[e];if(t)return t;try{return await (this._loading[e]=i(e))}finally{delete this._loading[e]}}}addSchema(e,t,i,r=this.opts.validateSchema){let n;if(Array.isArray(e)){for(let t of e)this.addSchema(t,void 0,i,r);return this}if("object"==typeof e){let{schemaId:t}=this.opts;if(void 0!==(n=e[t])&&"string"!=typeof n)throw Error(`schema ${t} must be string`)}return t=(0,d.normalizeId)(t||n),this._checkUnique(t),this.schemas[t]=this._addSchema(e,i,t,r,!0),this}addMetaSchema(e,t,i=this.opts.validateSchema){return this.addSchema(e,t,!0,i),this}validateSchema(e,t){let i;if("boolean"==typeof e)return!0;if(void 0!==(i=e.$schema)&&"string"!=typeof i)throw Error("$schema must be a string");if(!(i=i||this.opts.defaultMeta||this.defaultMeta()))return this.logger.warn("meta-schema not available"),this.errors=null,!0;let r=this.validate(i,e);if(!r&&t){let e="schema is invalid: "+this.errorsText();if("log"===this.opts.validateSchema)this.logger.error(e);else throw Error(e)}return r}getSchema(e){let t;for(;"string"==typeof(t=v.call(this,e));)e=t;if(void 0===t){let{schemaId:i}=this.opts,r=new l.SchemaEnv({schema:{},schemaId:i});if(!(t=l.resolveSchema.call(this,r,e)))return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{let t=v.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{let t=e;this._cache.delete(t);let i=e[this.opts.schemaId];return i&&(i=(0,d.normalizeId)(i),delete this.schemas[i],delete this.refs[i]),this}default:throw Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(let t of e)this.addKeyword(t);return this}addKeyword(e,t){let i;if("string"==typeof e)i=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=i);else if("object"==typeof e&&void 0===t){if(Array.isArray(i=(t=e).keyword)&&!i.length)throw Error("addKeywords: keyword must be string or non-empty array")}else throw Error("invalid addKeywords parameters");if(D.call(this,i,t),!t)return(0,h.eachItem)(i,e=>_.call(this,e)),this;L.call(this,t);let r={...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)};return(0,h.eachItem)(i,0===r.type.length?e=>_.call(this,e,r):e=>r.type.forEach(t=>_.call(this,e,r,t))),this}getKeyword(e){let t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){let{RULES:t}=this;for(let i of(delete t.keywords[e],delete t.all[e],t.rules)){let t=i.rules.findIndex(t=>t.keyword===e);t>=0&&i.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:i="data"}={}){return e&&0!==e.length?e.map(e=>`${i}${e.instancePath} ${e.message}`).reduce((e,i)=>e+t+i):"No errors"}$dataMetaSchema(e,t){let i=this.RULES.all;for(let r of(e=JSON.parse(JSON.stringify(e)),t)){let t=r.split("/").slice(1),n=e;for(let e of t)n=n[e];for(let e in i){let t=i[e];if("object"!=typeof t)continue;let{$data:r}=t.definition,s=n[e];r&&s&&(n[e]=M(s))}}return e}_removeAllSchemas(e,t){for(let i in e){let r=e[i];(!t||t.test(i))&&("string"==typeof r?delete e[i]:r&&!r.meta&&(this._cache.delete(r.schema),delete e[i]))}}_addSchema(e,t,i,r=this.opts.validateSchema,n=this.opts.addUsedSchema){let s,{schemaId:a}=this.opts;if("object"==typeof e)s=e[a];else if(this.opts.jtd)throw Error("schema must be object");else if("boolean"!=typeof e)throw Error("schema must be object or boolean");let o=this._cache.get(e);if(void 0!==o)return o;i=(0,d.normalizeId)(s||i);let c=d.getSchemaRefs.call(this,e,i);return o=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:i,localRefs:c}),this._cache.set(o.schema,o),n&&!i.startsWith("#")&&(i&&this._checkUnique(i),this.refs[i]=o),r&&this.validateSchema(e,!0),o}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw Error("ajv implementation error");return e.validate}_compileMetaSchema(e){let t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function I(e,t,i,r="error"){for(let n in e){let s=n;s in t&&this.logger[r](`${i}: option ${n}. ${e[s]}`)}}function v(e){return e=(0,d.normalizeId)(e),this.schemas[e]||this.refs[e]}function B(){let e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(let t in e)this.addSchema(e[t],t)}function Q(){for(let e in this.opts.formats){let t=this.opts.formats[e];t&&this.addFormat(e,t)}}function x(e){if(Array.isArray(e))return void this.addVocabulary(e);for(let t in this.logger.warn("keywords option as map is deprecated, pass array"),e){let i=e[t];i.keyword||(i.keyword=t),this.addKeyword(i)}}function S(){let e={...this.opts};for(let t of g)delete e[t];return e}w.ValidationError=s.default,w.MissingRefError=a.default,i.default=w;let k={log(){},warn(){},error(){}};function T(e){if(!1===e)return k;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw Error("logger must implement log, warn and error methods")}let N=/^[a-z_$][a-z0-9_$:-]*$/i;function D(e,t){let{RULES:i}=this;if((0,h.eachItem)(e,e=>{if(i.keywords[e])throw Error(`Keyword ${e} is already defined`);if(!N.test(e))throw Error(`Keyword ${e} has invalid name`)}),t&&t.$data&&!("code"in t||"validate"in t))throw Error('$data keyword must have "code" or "validate" function')}function _(e,t,i){var r;let n=null==t?void 0:t.post;if(i&&n)throw Error('keyword with "post" flag cannot have "type"');let{RULES:s}=this,a=n?s.post:s.rules.find(({type:e})=>e===i);if(a||(a={type:i,rules:[]},s.rules.push(a)),s.keywords[e]=!0,!t)return;let o={keyword:e,definition:{...t,type:(0,u.getJSONTypes)(t.type),schemaType:(0,u.getJSONTypes)(t.schemaType)}};t.before?R.call(this,a,o,t.before):a.rules.push(o),s.all[e]=o,null==(r=t.implements)||r.forEach(e=>this.addKeyword(e))}function R(e,t,i){let r=e.rules.findIndex(e=>e.keyword===i);r>=0?e.rules.splice(r,0,t):(e.rules.push(t),this.logger.warn(`rule ${i} is not defined`))}function L(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=M(t)),e.validateSchema=this.compile(t,!0))}let F={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function M(e){return{anyOf:[e,F]}}},342774,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default={keyword:"id",code(){throw Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}}},593560,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.callRef=i.getValidate=void 0;let r=e.r(757075),n=e.r(905378),s=e.r(776902),a=e.r(515301),o=e.r(699811),l=e.r(335431),c={keyword:"$ref",schemaType:"string",code(e){let{gen:t,schema:i,it:n}=e,{baseId:a,schemaEnv:l,validateName:c,opts:h,self:A}=n,{root:p}=l;if(("#"===i||"#/"===i)&&a===p.baseId)return g();let f=o.resolveRef.call(A,p,a,i);if(void 0===f)throw new r.default(n.opts.uriResolver,a,i);if(f instanceof o.SchemaEnv)return m(f);return y(f);function g(){if(l===p)return u(e,c,l,l.$async);let i=t.scopeValue("root",{ref:p});return u(e,(0,s._)`${i}.validate`,p,p.$async)}function m(t){let i=d(e,t);u(e,i,t,t.$async)}function y(r){let n=t.scopeValue("schema",!0===h.code.source?{ref:r,code:(0,s.stringify)(r)}:{ref:r}),a=t.name("valid"),o=e.subschema({schema:r,dataTypes:[],schemaPath:s.nil,topSchemaRef:n,errSchemaPath:i},a);e.mergeEvaluated(o),e.ok(a)}}};function d(e,t){let{gen:i}=e;return t.validate?i.scopeValue("validate",{ref:t.validate}):(0,s._)`${i.scopeValue("wrapper",{ref:t})}.validate`}function u(e,t,i,r){let{gen:o,it:c}=e,{allErrors:d,schemaEnv:u,opts:h}=c,A=h.passContext?a.default.this:s.nil;function p(){if(!u.$async)throw Error("async schema referenced by sync schema");let i=o.let("valid");o.try(()=>{o.code((0,s._)`await ${(0,n.callValidateCode)(e,t,A)}`),m(t),d||o.assign(i,!0)},e=>{o.if((0,s._)`!(${e} instanceof ${c.ValidationError})`,()=>o.throw(e)),g(e),d||o.assign(i,!1)}),e.ok(i)}function f(){e.result((0,n.callValidateCode)(e,t,A),()=>m(t),()=>g(t))}function g(e){let t=(0,s._)`${e}.errors`;o.assign(a.default.vErrors,(0,s._)`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),o.assign(a.default.errors,(0,s._)`${a.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;let r=null==(t=null==i?void 0:i.validate)?void 0:t.evaluated;if(!0!==c.props)if(r&&!r.dynamicProps)void 0!==r.props&&(c.props=l.mergeEvaluated.props(o,r.props,c.props));else{let t=o.var("props",(0,s._)`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(o,t,c.props,s.Name)}if(!0!==c.items)if(r&&!r.dynamicItems)void 0!==r.items&&(c.items=l.mergeEvaluated.items(o,r.items,c.items));else{let t=o.var("items",(0,s._)`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(o,t,c.items,s.Name)}}r?p():f()}i.getValidate=d,i.callRef=u,i.default=c},259714,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(342774),n=e.r(593560);i.default=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",r.default,n.default]},28490,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=r.operators,s={maximum:{okStr:"<=",ok:n.LTE,fail:n.GT},minimum:{okStr:">=",ok:n.GTE,fail:n.LT},exclusiveMaximum:{okStr:"<",ok:n.LT,fail:n.GTE},exclusiveMinimum:{okStr:">",ok:n.GT,fail:n.LTE}},a={message:({keyword:e,schemaCode:t})=>(0,r.str)`must be ${s[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>(0,r._)`{comparison: ${s[e].okStr}, limit: ${t}}`};i.default={keyword:Object.keys(s),type:"number",schemaType:"number",$data:!0,error:a,code(e){let{keyword:t,data:i,schemaCode:n}=e;e.fail$data((0,r._)`${i} ${s[t].fail} ${n} || isNaN(${i})`)}}},844066,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902);i.default={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must be multiple of ${e}`,params:({schemaCode:e})=>(0,r._)`{multipleOf: ${e}}`},code(e){let{gen:t,data:i,schemaCode:n,it:s}=e,a=s.opts.multipleOfPrecision,o=t.let("res"),l=a?(0,r._)`Math.abs(Math.round(${o}) - ${o}) > 1e-${a}`:(0,r._)`${o} !== parseInt(${o})`;e.fail$data((0,r._)`(${n} === 0 || (${o} = ${i}/${n}, ${l}))`)}}},405321,(e,t,i)=>{"use strict";function r(e){let t,i=e.length,r=0,n=0;for(;n<i;)r++,(t=e.charCodeAt(n++))>=55296&&t<=56319&&n<i&&(64512&(t=e.charCodeAt(n)))==56320&&n++;return r}Object.defineProperty(i,"__esModule",{value:!0}),i.default=r,r.code='require("ajv/dist/runtime/ucs2length").default'},506433,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431),s=e.r(405321);i.default={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){let i="maxLength"===e?"more":"fewer";return(0,r.str)`must NOT have ${i} than ${t} characters`},params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:i,schemaCode:a,it:o}=e,l="maxLength"===t?r.operators.GT:r.operators.LT,c=!1===o.opts.unicode?(0,r._)`${i}.length`:(0,r._)`${(0,n.useFunc)(e.gen,s.default)}(${i})`;e.fail$data((0,r._)`${c} ${l} ${a}`)}}},322927,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(905378),n=e.r(335431),s=e.r(776902);i.default={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,s.str)`must match pattern "${e}"`,params:({schemaCode:e})=>(0,s._)`{pattern: ${e}}`},code(e){let{gen:t,data:i,$data:a,schema:o,schemaCode:l,it:c}=e,d=c.opts.unicodeRegExp?"u":"";if(a){let{regExp:r}=c.opts.code,a="new RegExp"===r.code?(0,s._)`new RegExp`:(0,n.useFunc)(t,r),o=t.let("valid");t.try(()=>t.assign(o,(0,s._)`${a}(${l}, ${d}).test(${i})`),()=>t.assign(o,!1)),e.fail$data((0,s._)`!${o}`)}else{let t=(0,r.usePattern)(e,o);e.fail$data((0,s._)`!${t}.test(${i})`)}}}},186219,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902);i.default={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){let i="maxProperties"===e?"more":"fewer";return(0,r.str)`must NOT have ${i} than ${t} properties`},params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:i,schemaCode:n}=e,s="maxProperties"===t?r.operators.GT:r.operators.LT;e.fail$data((0,r._)`Object.keys(${i}).length ${s} ${n}`)}}},829136,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(905378),n=e.r(776902),s=e.r(335431);i.default={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>(0,n.str)`must have required property '${e}'`,params:({params:{missingProperty:e}})=>(0,n._)`{missingProperty: ${e}}`},code(e){let{gen:t,schema:i,schemaCode:a,data:o,$data:l,it:c}=e,{opts:d}=c;if(!l&&0===i.length)return;let u=i.length>=d.loopRequired;if(c.allErrors?h():A(),d.strictRequired){let t=e.parentSchema.properties,{definedProperties:r}=e.it;for(let e of i)if((null==t?void 0:t[e])===void 0&&!r.has(e)){let t=c.schemaEnv.baseId+c.errSchemaPath,i=`required property "${e}" is not defined at "${t}" (strictRequired)`;(0,s.checkStrictMode)(c,i,c.opts.strictRequired)}}function h(){if(u||l)e.block$data(n.nil,p);else for(let t of i)(0,r.checkReportMissingProp)(e,t)}function A(){let n=t.let("missing");if(u||l){let i=t.let("valid",!0);e.block$data(i,()=>f(n,i)),e.ok(i)}else t.if((0,r.checkMissingProp)(e,i,n)),(0,r.reportMissingProp)(e,n),t.else()}function p(){t.forOf("prop",a,i=>{e.setParams({missingProperty:i}),t.if((0,r.noPropertyInData)(t,o,i,d.ownProperties),()=>e.error())})}function f(i,s){e.setParams({missingProperty:i}),t.forOf(i,a,()=>{t.assign(s,(0,r.propertyInData)(t,o,i,d.ownProperties)),t.if((0,n.not)(s),()=>{e.error(),t.break()})},n.nil)}}}},44753,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902);i.default={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){let i="maxItems"===e?"more":"fewer";return(0,r.str)`must NOT have ${i} than ${t} items`},params:({schemaCode:e})=>(0,r._)`{limit: ${e}}`},code(e){let{keyword:t,data:i,schemaCode:n}=e,s="maxItems"===t?r.operators.GT:r.operators.LT;e.fail$data((0,r._)`${i}.length ${s} ${n}`)}}},349397,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(519573);r.code='require("ajv/dist/runtime/equal").default',i.default=r},233484,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(814484),n=e.r(776902),s=e.r(335431),a=e.r(349397);i.default={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>(0,n.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>(0,n._)`{i: ${e}, j: ${t}}`},code(e){let{gen:t,data:i,$data:o,schema:l,parentSchema:c,schemaCode:d,it:u}=e;if(!o&&!l)return;let h=t.let("valid"),A=c.items?(0,r.getSchemaTypes)(c.items):[];function p(){let r=t.let("i",(0,n._)`${i}.length`),s=t.let("j");e.setParams({i:r,j:s}),t.assign(h,!0),t.if((0,n._)`${r} > 1`,()=>(f()?g:m)(r,s))}function f(){return A.length>0&&!A.some(e=>"object"===e||"array"===e)}function g(s,a){let o=t.name("item"),l=(0,r.checkDataTypes)(A,o,u.opts.strictNumbers,r.DataType.Wrong),c=t.const("indices",(0,n._)`{}`);t.for((0,n._)`;${s}--;`,()=>{t.let(o,(0,n._)`${i}[${s}]`),t.if(l,(0,n._)`continue`),A.length>1&&t.if((0,n._)`typeof ${o} == "string"`,(0,n._)`${o} += "_"`),t.if((0,n._)`typeof ${c}[${o}] == "number"`,()=>{t.assign(a,(0,n._)`${c}[${o}]`),e.error(),t.assign(h,!1).break()}).code((0,n._)`${c}[${o}] = ${s}`)})}function m(r,o){let l=(0,s.useFunc)(t,a.default),c=t.name("outer");t.label(c).for((0,n._)`;${r}--;`,()=>t.for((0,n._)`${o} = ${r}; ${o}--;`,()=>t.if((0,n._)`${l}(${i}[${r}], ${i}[${o}])`,()=>{e.error(),t.assign(h,!1).break(c)})))}e.block$data(h,p,(0,n._)`${d} === false`),e.ok(h)}}},903056,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431),s=e.r(349397);i.default={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>(0,r._)`{allowedValue: ${e}}`},code(e){let{gen:t,data:i,$data:a,schemaCode:o,schema:l}=e;a||l&&"object"==typeof l?e.fail$data((0,r._)`!${(0,n.useFunc)(t,s.default)}(${i}, ${o})`):e.fail((0,r._)`${l} !== ${i}`)}}},889231,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431),s=e.r(349397);i.default={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>(0,r._)`{allowedValues: ${e}}`},code(e){let t,i,{gen:a,data:o,$data:l,schema:c,schemaCode:d,it:u}=e;if(!l&&0===c.length)throw Error("enum must have non-empty array");let h=c.length>=u.opts.loopEnum,A=()=>null!=t?t:t=(0,n.useFunc)(a,s.default);if(h||l)i=a.let("valid"),e.block$data(i,p);else{if(!Array.isArray(c))throw Error("ajv implementation error");let e=a.const("vSchema",d);i=(0,r.or)(...c.map((t,i)=>f(e,i)))}function p(){a.assign(i,!1),a.forOf("v",d,e=>a.if((0,r._)`${A()}(${o}, ${e})`,()=>a.assign(i,!0).break()))}function f(e,t){let i=c[t];return"object"==typeof i&&null!==i?(0,r._)`${A()}(${o}, ${e}[${t}])`:(0,r._)`${o} === ${i}`}e.pass(i)}}},528619,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(28490),n=e.r(844066),s=e.r(506433),a=e.r(322927),o=e.r(186219),l=e.r(829136),c=e.r(44753),d=e.r(233484),u=e.r(903056),h=e.r(889231);i.default=[r.default,n.default,s.default,a.default,o.default,l.default,c.default,d.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},u.default,h.default]},564004,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.validateAdditionalItems=void 0;let r=e.r(776902),n=e.r(335431),s={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`},code(e){let{parentSchema:t,it:i}=e,{items:r}=t;Array.isArray(r)?a(e,r):(0,n.checkStrictMode)(i,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){let{gen:i,schema:s,data:a,keyword:o,it:l}=e;l.items=!0;let c=i.const("len",(0,r._)`${a}.length`);if(!1===s)e.setParams({len:t.length}),e.pass((0,r._)`${c} <= ${t.length}`);else if("object"==typeof s&&!(0,n.alwaysValidSchema)(l,s)){let n=i.var("valid",(0,r._)`${c} <= ${t.length}`);i.if((0,r.not)(n),()=>d(n)),e.ok(n)}function d(s){i.forRange("i",t.length,c,t=>{e.subschema({keyword:o,dataProp:t,dataPropType:n.Type.Num},s),l.allErrors||i.if((0,r.not)(s),()=>i.break())})}}i.validateAdditionalItems=a,i.default=s},656945,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.validateTuple=void 0;let r=e.r(776902),n=e.r(335431),s=e.r(905378),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){let{schema:t,it:i}=e;if(Array.isArray(t))return o(e,"additionalItems",t);i.items=!0,(0,n.alwaysValidSchema)(i,t)||e.ok((0,s.validateArray)(e))}};function o(e,t,i=e.schema){let{gen:s,parentSchema:a,data:l,keyword:c,it:d}=e;A(a),d.opts.unevaluated&&i.length&&!0!==d.items&&(d.items=n.mergeEvaluated.items(s,i.length,d.items));let u=s.name("valid"),h=s.const("len",(0,r._)`${l}.length`);function A(e){let{opts:r,errSchemaPath:s}=d,a=i.length,o=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(r.strictTuples&&!o){let e=`"${c}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${s}"`;(0,n.checkStrictMode)(d,e,r.strictTuples)}}i.forEach((t,i)=>{(0,n.alwaysValidSchema)(d,t)||(s.if((0,r._)`${h} > ${i}`,()=>e.subschema({keyword:c,schemaProp:i,dataProp:i},u)),e.ok(u))})}i.validateTuple=o,i.default=a},498575,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(656945);i.default={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,r.validateTuple)(e,"items")}},571537,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431),s=e.r(905378),a=e.r(564004);i.default={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>(0,r.str)`must NOT have more than ${e} items`,params:({params:{len:e}})=>(0,r._)`{limit: ${e}}`},code(e){let{schema:t,parentSchema:i,it:r}=e,{prefixItems:o}=i;r.items=!0,(0,n.alwaysValidSchema)(r,t)||(o?(0,a.validateAdditionalItems)(e,o):e.ok((0,s.validateArray)(e)))}}},329953,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431);i.default={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?(0,r.str)`must contain at least ${e} valid item(s)`:(0,r.str)`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?(0,r._)`{minContains: ${e}}`:(0,r._)`{minContains: ${e}, maxContains: ${t}}`},code(e){let t,i,{gen:s,schema:a,parentSchema:o,data:l,it:c}=e,{minContains:d,maxContains:u}=o;c.opts.next?(t=void 0===d?1:d,i=u):t=1;let h=s.const("len",(0,r._)`${l}.length`);if(e.setParams({min:t,max:i}),void 0===i&&0===t)return void(0,n.checkStrictMode)(c,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==i&&t>i){(0,n.checkStrictMode)(c,'"minContains" > "maxContains" is always invalid'),e.fail();return}if((0,n.alwaysValidSchema)(c,a)){let n=(0,r._)`${h} >= ${t}`;void 0!==i&&(n=(0,r._)`${n} && ${h} <= ${i}`),e.pass(n);return}c.items=!0;let A=s.name("valid");function p(){let e=s.name("_valid"),t=s.let("count",0);f(e,()=>s.if(e,()=>g(t)))}function f(t,i){s.forRange("i",0,h,r=>{e.subschema({keyword:"contains",dataProp:r,dataPropType:n.Type.Num,compositeRule:!0},t),i()})}function g(e){s.code((0,r._)`${e}++`),void 0===i?s.if((0,r._)`${e} >= ${t}`,()=>s.assign(A,!0).break()):(s.if((0,r._)`${e} > ${i}`,()=>s.assign(A,!1).break()),1===t?s.assign(A,!0):s.if((0,r._)`${e} >= ${t}`,()=>s.assign(A,!0)))}void 0===i&&1===t?f(A,()=>s.if(A,()=>s.break())):0===t?(s.let(A,!0),void 0!==i&&s.if((0,r._)`${l}.length > 0`,p)):(s.let(A,!1),p()),e.result(A,()=>e.reset())}}},897503,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.validateSchemaDeps=i.validatePropertyDeps=i.error=void 0;let r=e.r(776902),n=e.r(335431),s=e.r(905378);i.error={message:({params:{property:e,depsCount:t,deps:i}})=>{let n=1===t?"property":"properties";return(0,r.str)`must have ${n} ${i} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:i,missingProperty:n}})=>(0,r._)`{property: ${e},
|
||
missingProperty: ${n},
|
||
depsCount: ${t},
|
||
deps: ${i}}`};let a={keyword:"dependencies",type:"object",schemaType:"object",error:i.error,code(e){let[t,i]=o(e);l(e,t),c(e,i)}};function o({schema:e}){let t={},i={};for(let r in e)"__proto__"!==r&&((Array.isArray(e[r])?t:i)[r]=e[r]);return[t,i]}function l(e,t=e.schema){let{gen:i,data:n,it:a}=e;if(0===Object.keys(t).length)return;let o=i.let("missing");for(let l in t){let c=t[l];if(0===c.length)continue;let d=(0,s.propertyInData)(i,n,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?i.if(d,()=>{for(let t of c)(0,s.checkReportMissingProp)(e,t)}):(i.if((0,r._)`${d} && (${(0,s.checkMissingProp)(e,c,o)})`),(0,s.reportMissingProp)(e,o),i.else())}}function c(e,t=e.schema){let{gen:i,data:r,keyword:a,it:o}=e,l=i.name("valid");for(let c in t)(0,n.alwaysValidSchema)(o,t[c])||(i.if((0,s.propertyInData)(i,r,c,o.opts.ownProperties),()=>{let t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)},()=>i.var(l,!0)),e.ok(l))}i.validatePropertyDeps=l,i.validateSchemaDeps=c,i.default=a},957054,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431);i.default={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>(0,r._)`{propertyName: ${e.propertyName}}`},code(e){let{gen:t,schema:i,data:s,it:a}=e;if((0,n.alwaysValidSchema)(a,i))return;let o=t.name("valid");t.forIn("key",s,i=>{e.setParams({propertyName:i}),e.subschema({keyword:"propertyNames",data:i,dataTypes:["string"],propertyName:i,compositeRule:!0},o),t.if((0,r.not)(o),()=>{e.error(!0),a.allErrors||t.break()})}),e.ok(o)}}},182894,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(905378),n=e.r(776902),s=e.r(515301),a=e.r(335431);i.default={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>(0,n._)`{additionalProperty: ${e.additionalProperty}}`},code(e){let{gen:t,schema:i,parentSchema:o,data:l,errsCount:c,it:d}=e;if(!c)throw Error("ajv implementation error");let{allErrors:u,opts:h}=d;if(d.props=!0,"all"!==h.removeAdditional&&(0,a.alwaysValidSchema)(d,i))return;let A=(0,r.allSchemaProperties)(o.properties),p=(0,r.allSchemaProperties)(o.patternProperties);function f(i){let s;if(A.length>8){let e=(0,a.schemaRefOrVal)(d,o.properties,"properties");s=(0,r.isOwnProperty)(t,e,i)}else s=A.length?(0,n.or)(...A.map(e=>(0,n._)`${i} === ${e}`)):n.nil;return p.length&&(s=(0,n.or)(s,...p.map(t=>(0,n._)`${(0,r.usePattern)(e,t)}.test(${i})`))),(0,n.not)(s)}function g(e){t.code((0,n._)`delete ${l}[${e}]`)}function m(r){if("all"===h.removeAdditional||h.removeAdditional&&!1===i)return void g(r);if(!1===i){e.setParams({additionalProperty:r}),e.error(),u||t.break();return}if("object"==typeof i&&!(0,a.alwaysValidSchema)(d,i)){let i=t.name("valid");"failing"===h.removeAdditional?(y(r,i,!1),t.if((0,n.not)(i),()=>{e.reset(),g(r)})):(y(r,i),u||t.if((0,n.not)(i),()=>t.break()))}}function y(t,i,r){let n={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===r&&Object.assign(n,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(n,i)}(function e(){t.forIn("key",l,e=>{A.length||p.length?t.if(f(e),()=>m(e)):m(e)})})(),e.ok((0,n._)`${c} === ${s.default.errors}`)}}},797436,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(819291),n=e.r(905378),s=e.r(335431),a=e.r(182894);i.default={keyword:"properties",type:"object",schemaType:"object",code(e){let{gen:t,schema:i,parentSchema:o,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===o.additionalProperties&&a.default.code(new r.KeywordCxt(c,a.default,"additionalProperties"));let d=(0,n.allSchemaProperties)(i);for(let e of d)c.definedProperties.add(e);c.opts.unevaluated&&d.length&&!0!==c.props&&(c.props=s.mergeEvaluated.props(t,(0,s.toHash)(d),c.props));let u=d.filter(e=>!(0,s.alwaysValidSchema)(c,i[e]));if(0===u.length)return;let h=t.name("valid");for(let i of u)A(i)?p(i):(t.if((0,n.propertyInData)(t,l,i,c.opts.ownProperties)),p(i),c.allErrors||t.else().var(h,!0),t.endIf()),e.it.definedProperties.add(i),e.ok(h);function A(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==i[e].default}function p(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},h)}}}},940671,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(905378),n=e.r(776902),s=e.r(335431),a=e.r(335431);i.default={keyword:"patternProperties",type:"object",schemaType:"object",code(e){let{gen:t,schema:i,data:o,parentSchema:l,it:c}=e,{opts:d}=c,u=(0,r.allSchemaProperties)(i),h=u.filter(e=>(0,s.alwaysValidSchema)(c,i[e]));if(0===u.length||h.length===u.length&&(!c.opts.unevaluated||!0===c.props))return;let A=d.strictSchema&&!d.allowMatchingProperties&&l.properties,p=t.name("valid");!0===c.props||c.props instanceof n.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));let{props:f}=c;function g(e){for(let t in A)new RegExp(e).test(t)&&(0,s.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function m(i){t.forIn("key",o,s=>{t.if((0,n._)`${(0,r.usePattern)(e,i)}.test(${s})`,()=>{let r=h.includes(i);r||e.subschema({keyword:"patternProperties",schemaProp:i,dataProp:s,dataPropType:a.Type.Str},p),c.opts.unevaluated&&!0!==f?t.assign((0,n._)`${f}[${s}]`,!0):r||c.allErrors||t.if((0,n.not)(p),()=>t.break())})})}(function e(){for(let e of u)A&&g(e),c.allErrors?m(e):(t.var(p,!0),m(e),t.if(p))})()}}},909782,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(335431);i.default={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){let{gen:t,schema:i,it:n}=e;if((0,r.alwaysValidSchema)(n,i))return void e.fail();let s=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},s),e.failResult(s,()=>e.reset(),()=>e.error())},error:{message:"must NOT be valid"}}},643184,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:e.r(905378).validateUnion,error:{message:"must match a schema in anyOf"}}},870609,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431);i.default={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>(0,r._)`{passingSchemas: ${e.passing}}`},code(e){let{gen:t,schema:i,parentSchema:s,it:a}=e;if(!Array.isArray(i))throw Error("ajv implementation error");if(a.opts.discriminator&&s.discriminator)return;let o=i,l=t.let("valid",!1),c=t.let("passing",null),d=t.name("_valid");function u(){o.forEach((i,s)=>{let o;(0,n.alwaysValidSchema)(a,i)?t.var(d,!0):o=e.subschema({keyword:"oneOf",schemaProp:s,compositeRule:!0},d),s>0&&t.if((0,r._)`${d} && ${l}`).assign(l,!1).assign(c,(0,r._)`[${c}, ${s}]`).else(),t.if(d,()=>{t.assign(l,!0),t.assign(c,s),o&&e.mergeEvaluated(o,r.Name)})})}e.setParams({passing:c}),t.block(u),e.result(l,()=>e.reset(),()=>e.error(!0))}}},245178,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(335431);i.default={keyword:"allOf",schemaType:"array",code(e){let{gen:t,schema:i,it:n}=e;if(!Array.isArray(i))throw Error("ajv implementation error");let s=t.name("valid");i.forEach((t,i)=>{if((0,r.alwaysValidSchema)(n,t))return;let a=e.subschema({keyword:"allOf",schemaProp:i},s);e.ok(s),e.mergeEvaluated(a)})}}},84477,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(335431);function s(e,t){let i=e.schema[t];return void 0!==i&&!(0,n.alwaysValidSchema)(e,i)}i.default={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>(0,r.str)`must match "${e.ifClause}" schema`,params:({params:e})=>(0,r._)`{failingKeyword: ${e.ifClause}}`},code(e){let{gen:t,parentSchema:i,it:a}=e;void 0===i.then&&void 0===i.else&&(0,n.checkStrictMode)(a,'"if" without "then" and "else" is ignored');let o=s(a,"then"),l=s(a,"else");if(!o&&!l)return;let c=t.let("valid",!0),d=t.name("_valid");if(u(),e.reset(),o&&l){let i=t.let("ifClause");e.setParams({ifClause:i}),t.if(d,h("then",i),h("else",i))}else o?t.if(d,h("then")):t.if((0,r.not)(d),h("else"));function u(){let t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},d);e.mergeEvaluated(t)}function h(i,n){return()=>{let s=e.subschema({keyword:i},d);t.assign(c,d),e.mergeValidEvaluated(s,c),n?t.assign(n,(0,r._)`${i}`):e.setParams({ifClause:i})}}e.pass(c,()=>e.error(!0))}}},677959,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(335431);i.default={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:i}){void 0===t.if&&(0,r.checkStrictMode)(i,`"${e}" without "if" is ignored`)}}},403758,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(564004),n=e.r(498575),s=e.r(656945),a=e.r(571537),o=e.r(329953),l=e.r(897503),c=e.r(957054),d=e.r(182894),u=e.r(797436),h=e.r(940671),A=e.r(909782),p=e.r(643184),f=e.r(870609),g=e.r(245178),m=e.r(84477),y=e.r(677959);i.default=function(e=!1){let t=[A.default,p.default,f.default,g.default,m.default,y.default,c.default,d.default,l.default,u.default,h.default];return e?t.push(n.default,a.default):t.push(r.default,s.default),t.push(o.default),t}},568874,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902);i.default={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>(0,r.str)`must match format "${e}"`,params:({schemaCode:e})=>(0,r._)`{format: ${e}}`},code(e,t){let{gen:i,data:n,$data:s,schema:a,schemaCode:o,it:l}=e,{opts:c,errSchemaPath:d,schemaEnv:u,self:h}=l;function A(){let s=i.scopeValue("formats",{ref:h.formats,code:c.code.formats}),a=i.const("fDef",(0,r._)`${s}[${o}]`),l=i.let("fType"),d=i.let("format");function A(){return!1===c.strictSchema?r.nil:(0,r._)`${o} && !${d}`}function p(){let e=u.$async?(0,r._)`(${a}.async ? await ${d}(${n}) : ${d}(${n}))`:(0,r._)`${d}(${n})`,i=(0,r._)`(typeof ${d} == "function" ? ${e} : ${d}.test(${n}))`;return(0,r._)`${d} && ${d} !== true && ${l} === ${t} && !${i}`}i.if((0,r._)`typeof ${a} == "object" && !(${a} instanceof RegExp)`,()=>i.assign(l,(0,r._)`${a}.type || "string"`).assign(d,(0,r._)`${a}.validate`),()=>i.assign(l,(0,r._)`"string"`).assign(d,a)),e.fail$data((0,r.or)(A(),p()))}function p(){let s=h.formats[a];if(!s)return void p();if(!0===s)return;let[o,l,A]=f(s);function p(){if(!1===c.strictSchema)return void h.logger.warn(e());throw Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${d}"`}}function f(e){let t=e instanceof RegExp?(0,r.regexpCode)(e):c.code.formats?(0,r._)`${c.code.formats}${(0,r.getProperty)(a)}`:void 0,n=i.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,n]:[e.type||"string",e.validate,(0,r._)`${n}.validate`]}function g(){if("object"==typeof s&&!(s instanceof RegExp)&&s.async){if(!u.$async)throw Error("async format in sync schema");return(0,r._)`await ${A}(${n})`}return"function"==typeof l?(0,r._)`${A}(${n})`:(0,r._)`${A}.test(${n})`}o===t&&e.pass(g())}c.validateFormats&&(s?A():p())}}},949490,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=[e.r(568874).default]},966876,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.contentVocabulary=i.metadataVocabulary=void 0,i.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],i.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},347490,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(259714),n=e.r(528619),s=e.r(403758),a=e.r(949490),o=e.r(966876);i.default=[r.default,n.default,(0,s.default)(),a.default,o.metadataVocabulary,o.contentVocabulary]},420119,(e,t,i)=>{"use strict";var r;Object.defineProperty(i,"__esModule",{value:!0}),i.DiscrError=void 0,function(e){e.Tag="tag",e.Mapping="mapping"}(r||(i.DiscrError=r={}))},561339,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(776902),n=e.r(420119),s=e.r(699811),a=e.r(757075),o=e.r(335431);i.default={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===n.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:i}})=>(0,r._)`{error: ${e}, tag: ${i}, tagValue: ${t}}`},code(e){let{gen:t,data:i,schema:l,parentSchema:c,it:d}=e,{oneOf:u}=c;if(!d.opts.discriminator)throw Error("discriminator: requires discriminator option");let h=l.propertyName;if("string"!=typeof h)throw Error("discriminator: requires propertyName");if(l.mapping)throw Error("discriminator: mapping is not supported");if(!u)throw Error("discriminator: requires oneOf keyword");let A=t.let("valid",!1),p=t.const("tag",(0,r._)`${i}${(0,r.getProperty)(h)}`);function f(){let i=m();for(let e in t.if(!1),i)t.elseIf((0,r._)`${p} === ${e}`),t.assign(A,g(i[e]));t.else(),e.error(!1,{discrError:n.DiscrError.Mapping,tag:p,tagName:h}),t.endIf()}function g(i){let n=t.name("valid"),s=e.subschema({keyword:"oneOf",schemaProp:i},n);return e.mergeEvaluated(s,r.Name),n}function m(){var e;let t={},i=n(c),r=!0;for(let t=0;t<u.length;t++){let c=u[t];if((null==c?void 0:c.$ref)&&!(0,o.schemaHasRulesButRef)(c,d.self.RULES)){let e=c.$ref;if((c=s.resolveRef.call(d.self,d.schemaEnv.root,d.baseId,e))instanceof s.SchemaEnv&&(c=c.schema),void 0===c)throw new a.default(d.opts.uriResolver,d.baseId,e)}let A=null==(e=null==c?void 0:c.properties)?void 0:e[h];if("object"!=typeof A)throw Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${h}"`);r=r&&(i||n(c)),l(A,t)}if(!r)throw Error(`discriminator: "${h}" must be required`);return t;function n({required:e}){return Array.isArray(e)&&e.includes(h)}function l(e,t){if(e.const)A(e.const,t);else if(e.enum)for(let i of e.enum)A(i,t);else throw Error(`discriminator: "properties/${h}" must have "const" or "enum"`)}function A(e,i){if("string"!=typeof e||e in t)throw Error(`discriminator: "${h}" values must be unique strings`);t[e]=i}}t.if((0,r._)`typeof ${p} == "string"`,()=>f(),()=>e.error(!1,{discrError:n.DiscrError.Tag,tag:p,tagName:h})),e.ok(A)}}},849918,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.MissingRefError=i.ValidationError=i.CodeGen=i.Name=i.nil=i.stringify=i.str=i._=i.KeywordCxt=i.Ajv=void 0;let r=e.r(7522),n=e.r(347490),s=e.r(561339),a=e.r(810729),o=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends r.default{_addVocabularies(){super._addVocabularies(),n.default.forEach(e=>this.addVocabulary(e)),this.opts.discriminator&&this.addKeyword(s.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;let e=this.opts.$data?this.$dataMetaSchema(a,o):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}i.Ajv=c,t.exports=i=c,t.exports.Ajv=c,Object.defineProperty(i,"__esModule",{value:!0}),i.default=c;var d=e.r(819291);Object.defineProperty(i,"KeywordCxt",{enumerable:!0,get:function(){return d.KeywordCxt}});var u=e.r(776902);Object.defineProperty(i,"_",{enumerable:!0,get:function(){return u._}}),Object.defineProperty(i,"str",{enumerable:!0,get:function(){return u.str}}),Object.defineProperty(i,"stringify",{enumerable:!0,get:function(){return u.stringify}}),Object.defineProperty(i,"nil",{enumerable:!0,get:function(){return u.nil}}),Object.defineProperty(i,"Name",{enumerable:!0,get:function(){return u.Name}}),Object.defineProperty(i,"CodeGen",{enumerable:!0,get:function(){return u.CodeGen}});var h=e.r(892540);Object.defineProperty(i,"ValidationError",{enumerable:!0,get:function(){return h.default}});var A=e.r(757075);Object.defineProperty(i,"MissingRefError",{enumerable:!0,get:function(){return A.default}})},350261,e=>{"use strict";var t=e.i(849918),i=e.i(743977),r=e.i(852995),n=e.i(747846);let s="default"in i.default?i.default.default:i.default,a=(e,{maxLength:t,minLength:i=3,req:{payload:{config:r},t:n},required:s})=>{let a;return("number"==typeof r?.defaultMaxTextLength&&(a=r.defaultMaxTextLength),"number"==typeof t&&(a=t),e&&a&&e.length>a)?n("validation:shorterThanMax",{maxLength:a}):e&&i&&e.length<i?n("validation:longerThanMin",{minLength:i}):!s||!!e||n("validation:required")},o=(e,{collectionSlug:t,req:{payload:{collections:i,config:r},t:n},required:s,siblingData:a})=>{if(t){let s=i?.[t]?.config??r.collections.find(({slug:e})=>e===t);if(s.auth.loginWithUsername&&!s.auth.loginWithUsername?.requireUsername&&!s.auth.loginWithUsername?.requireEmail&&!e&&!a?.username)return n("validation:required")}let o=/^(?!.*\.\.)[\w!#$%&'*+/=?^`{|}~-](?:[\w!#$%&'*+/=?^`{|}~.-]*[\w!#$%&'*+/=?^`{|}~-])?@[a-z0-9](?:[a-z0-9-]*[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]*[a-z0-9])?)*\.[a-z]{2,}$/i;return(!e||!!o.test(e))&&(!!e||!s)||n("validation:emailAddress")},l=(e,{collectionSlug:t,req:{payload:{collections:i,config:r},t:n},required:s,siblingData:a})=>{let o;if(t){let s=i?.[t]?.config??r.collections.find(({slug:e})=>e===t);if(s.auth.loginWithUsername&&!s.auth.loginWithUsername?.requireUsername&&!s.auth.loginWithUsername?.requireEmail&&!e&&!a?.email)return n("validation:required")}return("number"==typeof r?.defaultMaxTextLength&&(o=r.defaultMaxTextLength),e&&o&&e.length>o)?n("validation:shorterThanMax",{maxLength:o}):!!e||!s||n("validation:required")},c=(e,t)=>{let{maxRows:i,minRows:r,required:n,t:s}=t,a=Array.isArray(e)?e.length:e||0;return!n&&0===a||(r&&a<r?s("validation:requiresAtLeast",{count:r,label:s("general:rows")}):i&&a>i?s("validation:requiresNoMoreThan",{count:i,label:s("general:rows")}):!n||!!a||s("validation:requiresAtLeast",{count:1,label:s("general:row")}))};async function d({id:e,data:t,filterOptions:i,req:r,siblingData:n,value:s}){let a,o=Array.isArray(s)?s.map(e=>e.blockType).filter(e=>!!e):[];if("function"==typeof i){let s=await i({id:e,data:t,req:r,siblingData:n,user:r.user});!0!==s&&Array.isArray(s)&&(a=s)}else Array.isArray(i)&&(a=i);let l=[];if(a)for(let e of o)a.includes(e)||l.push(e);return{allBlockSlugs:o,allowedBlockSlugs:a,invalidBlockSlugs:l}}let u=async(e,{id:t,blockData:i,data:r,filterOptions:n,relationTo:a,req:o,req:{t:l,user:c},siblingData:d})=>{if(void 0!==n&&e){let u={},h=[],A=Array.isArray(a)?a:[a],p=Array.isArray(e)?e:[e];for(let e of A)try{let a="function"==typeof n?await n({id:t,blockData:i,data:r,relationTo:e,req:o,siblingData:d,user:c}):n;!0===a&&(a=null);let l=[];if(p.forEach(e=>{"object"==typeof e&&(e?.value?l.push(e.value):s.isValid(e)&&l.push(new s(e).toHexString())),("string"==typeof e||"number"==typeof e)&&l.push(e)}),l.length>0){let t={and:[{id:{in:l}}]};a&&!0!==a&&t.and?.push(a),!1===a&&h.push(e);let i=await o.payloadDataLoader.find({collection:e,depth:0,limit:0,pagination:!1,req:o,where:t});u[e]=i.docs.map(e=>e.id)}else u[e]=[]}catch(t){o.payload.logger.error({err:t,msg:`Error validating filter options for collection ${e}`}),u[e]=[]}let f=p.filter(e=>{let t,i;return"string"==typeof a&&(t=a,("string"==typeof e||"number"==typeof e)&&(i=e),"object"==typeof e&&s.isValid(e)&&(i=new s(e).toHexString())),Array.isArray(a)&&"object"==typeof e&&e?.relationTo&&(t=e.relationTo,i=e.value),!!h.find(e=>a===e)||!u[t]||-1===u[t].indexOf(i)});if(f.length>0)return f.reduce((e,t,i)=>`${e} ${JSON.stringify(t)}${f.length===i+1?",":""} `,l("validation:invalidSelections"))}return!0},h={array:(e,{maxRows:t,minRows:i,req:{t:r},required:n})=>c(e,{maxRows:t,minRows:i,required:n,t:r}),blocks:async(e,{id:t,data:i,filterOptions:r,maxRows:n,minRows:s,req:{t:a},req:o,required:l,siblingData:u})=>{let h=c(e,{maxRows:n,minRows:s,required:l,t:a});if("string"==typeof h)return h;if(r){let{invalidBlockSlugs:n}=await d({id:t,data:i,filterOptions:r,req:o,siblingData:u,value:e});if(n?.length)return a("validation:invalidBlocks",{blocks:n.join(", ")})}return!0},checkbox:(e,{req:{t},required:i})=>(!e||"boolean"==typeof e)&&(!i||"boolean"==typeof e)||t("validation:trueOrFalse"),code:(e,{req:{t},required:i})=>!i||void 0!==e||t("validation:required"),confirmPassword:(e,{req:{t},required:i,siblingData:r})=>i&&!e?t("validation:required"):!e||e===r.password||t("fields:passwordsDoNotMatch"),date:(e,{name:t,req:{t:i},required:r,siblingData:n,timezone:s})=>{let a=e&&!isNaN(Date.parse(e.toString())),o=s&&r,l=n?.[`${t}_tz`],c=!o||!!l;return!!a&&!!c||(a&&!c?i("validation:timezoneRequired"):e?i("validation:notValidDate",{value:e}):!r||i("validation:required"))},email:o,json:(e,{jsonError:i,jsonSchema:r,req:{t:n},required:s})=>{let a=e=>!(null==e||Array.isArray(e)&&0===e.length)&&("object"!=typeof e||0!==Object.keys(e).length),o=({schema:e,uri:t})=>t&&e?e:fetch(t).then(e=>{if(!e.ok)throw Error("Network response was not ok");return e.json()}).then(e=>{let t=e,i={id:void 0,$id:t.id,$schema:"http://json-schema.org/draft-07/schema#"};return Object.assign(t,i)});if(s&&!e)return n("validation:required");if(void 0!==i)return n("validation:invalidInput");if(r&&a(e))try{r.schema=o(r);let{schema:i}=r,n=new t.default;if(!n.validate(i,e))return n.errorsText()}catch(e){return e instanceof Error?e.message:"Unknown error"}return!0},number:(e,{hasMany:t,max:i,maxRows:n,min:s,minRows:a,req:{t:o},required:l})=>{if(!0===t){let t=c(e,{maxRows:n,minRows:a,required:l,t:o});if("string"==typeof t)return t}if(!e&&!(0,r.isNumber)(e)){if(l)return o("validation:required");if(!l)return!0}for(let t of Array.isArray(e)?e:[e]){if(!(0,r.isNumber)(t))return o("validation:enterNumber");let n=parseFloat(t);if("number"==typeof i&&n>i)return o("validation:greaterThanMax",{label:o("general:value"),max:i,value:e});if("number"==typeof s&&n<s)return o("validation:lessThanMin",{label:o("general:value"),min:s,value:e})}return!0},password:a,point:(e=["",""],{req:{t},required:i})=>{if(null===e)return!i||t("validation:required");let r=parseFloat(String(e[0])),n=parseFloat(String(e[1]));return i&&(e[0]&&e[1]&&"number"!=typeof r&&"number"!=typeof n||Number.isNaN(r)||Number.isNaN(n)||Array.isArray(e)&&2!==e.length)?t("validation:requiresTwoNumbers"):e[1]&&Number.isNaN(r)||e[0]&&Number.isNaN(n)?t("validation:invalidInput"):e[0]&&!Number.isNaN(r)&&(r<-180||r>180)?t("validation:longitudeOutOfBounds"):!e[1]||!!Number.isNaN(n)||!(n<-90)&&!(n>90)||t("validation:latitudeOutOfBounds")},radio:(e,{options:t,req:{t:i},required:r})=>e?t.some(t=>t===e||"string"!=typeof t&&t.value===e)||i("validation:invalidSelection"):!r||i("validation:required"),relationship:async(e,t)=>{let{event:i,maxRows:r,minRows:s,relationTo:a,req:{payload:o,t:l},required:c}=t;if((!e&&"number"!=typeof e||Array.isArray(e)&&0===e.length)&&c)return l("validation:required");if(Array.isArray(e)&&e.length>0){if(s&&e.length<s)return l("validation:lessThanMin",{label:l("general:rows"),min:s,value:e.length});if(r&&e.length>r)return l("validation:greaterThanMax",{label:l("general:rows"),max:r,value:e.length})}if(null!=e){let t=(Array.isArray(e)?e:[e]).filter(e=>{let t,i;if("string"==typeof a&&(t=a,(e||"number"==typeof e)&&(i=e)),Array.isArray(a)&&"object"==typeof e&&e?.relationTo&&(t=e.relationTo,i=e.value),null===i)return!1;let r=o.collections[t]?.customIDType||o?.db?.defaultIDType||"text";return!(0,n.isValidID)(i,r)});if(t.length>0)return`This relationship field has the following invalid relationships: ${t.map((e,t)=>`${e} ${JSON.stringify(t)}`).join(", ")}`}return"onChange"===i||u(e,t)},richText:async(e,t)=>{if(!t?.editor)throw Error("richText field has no editor property.");if("function"==typeof t?.editor)throw Error("Attempted to access unsanitized rich text editor.");return(t?.editor).validate(e,t)},select:(e,{data:t,filterOptions:i,hasMany:r,options:n,req:s,req:{t:a},required:o,siblingData:l})=>{let c="function"==typeof i?i({data:t,options:n,req:s,siblingData:l}):n;if(Array.isArray(e)&&e.some(e=>!c.some(t=>t===e||"string"!=typeof t&&t?.value===e)))return a("validation:invalidSelection");if(r&&Array.isArray(e)&&e.length>1){let t=new Map;for(let i of e)t.set(i,(t.get(i)||0)+1);let i=[];for(let[e,r]of t.entries())if(r>1)for(let t=0;t<r;t++)i.push(e);if(i.length>0)return i.reduce((e,t,r)=>`${e} ${JSON.stringify(t)}${r<i.length-1?",":""}`,a("validation:invalidSelections"))}return"string"!=typeof e||c.some(t=>t===e||"string"!=typeof t&&t.value===e)?!(o&&(null==e||r&&Array.isArray(e)&&e?.length===0))||a("validation:required"):a("validation:invalidSelection")},text:(e,{hasMany:t,maxLength:i,maxRows:r,minLength:n,minRows:s,req:{payload:{config:a},t:o},required:l})=>{let d;if(!l&&null==e)return!0;if(!0===t){let t=c(e,{maxRows:r,minRows:s,required:l,t:o});if("string"==typeof t)return t}for(let t of("number"==typeof a?.defaultMaxTextLength&&(d=a.defaultMaxTextLength),"number"==typeof i&&(d=i),Array.isArray(e)?e:[e])){let e=t?.length||0;if("number"==typeof d&&e>d)return o("validation:shorterThanMax",{label:o("general:value"),maxLength:d,stringValue:t});if("number"==typeof n&&e<n)return o("validation:longerThanMin",{label:o("general:value"),minLength:n,stringValue:t})}return!(l&&(!e||("string"==typeof e||Array.isArray(e))&&0===e.length))||o("validation:required")},textarea:(e,{maxLength:t,minLength:i,req:{payload:{config:r},t:n},required:s})=>{let a;return("number"==typeof r?.defaultMaxTextLength&&(a=r.defaultMaxTextLength),"number"==typeof t&&(a=t),e&&a&&e.length>a)?n("validation:shorterThanMax",{maxLength:a}):e&&i&&e.length<i?n("validation:longerThanMin",{minLength:i}):!s||!!e||n("validation:required")},upload:async(e,t)=>{let{event:i,maxRows:r,minRows:s,relationTo:a,req:{payload:o,t:l},required:c}=t;if((!e&&"number"!=typeof e||Array.isArray(e)&&0===e.length)&&c)return l("validation:required");if(Array.isArray(e)&&e.length>0){if(s&&e.length<s)return l("validation:lessThanMin",{label:l("general:rows"),min:s,value:e.length});if(r&&e.length>r)return l("validation:greaterThanMax",{label:l("general:rows"),max:r,value:e.length})}if(null!=e){let t=(Array.isArray(e)?e:[e]).filter(e=>{let t,i;if("string"==typeof a&&(t=a,(e||"number"==typeof e)&&(i=e)),Array.isArray(a)&&"object"==typeof e&&e?.relationTo&&(t=e.relationTo,i=e.value),null===i)return!1;let r=o.collections[t]?.customIDType||o?.db?.defaultIDType||"text";return!(0,n.isValidID)(i,r)});if(t.length>0)return`This relationship field has the following invalid relationships: ${t.map((e,t)=>`${e} ${JSON.stringify(t)}`).join(", ")}`}return"onChange"===i||u(e,t)}};e.s(["email",0,o,"password",0,a,"username",0,l,"validateBlocksFilterOptions",()=>d,"validations",0,h])},416190,911908,42625,494310,682896,e=>{"use strict";e.i(10188);var t=e.i(785867),i=e.i(252016),r=e.i(668473),n=e.i(700859),s=e.i(295694),a=e.i(516808),o=e.i(452968),l=e.i(311462),c=e.i(893961),d=e.i(234209),u=e.i(911909),h=e.i(406583),A=e.i(120116),p=e.i(254799),f=e.i(546712),g=e.i(350261);function m(){return new Promise((e,t)=>p.default.randomBytes(32,(i,r)=>i?t(i):e(r)))}function y(e,t){return new Promise((i,r)=>p.default.pbkdf2(e,t,25e3,512,"sha256",(e,t)=>e?r(e):i(t)))}let b=async({collection:e,password:t,req:i})=>{let r=(0,g.password)(t,{name:"password",type:"text",blockData:{},data:{},event:"submit",path:["password"],preferences:{fields:{}},req:i,required:!0,siblingData:{}});if("string"==typeof r)throw new f.ValidationError({collection:e?.slug,errors:[{message:r,path:"password"}]});let n=(await m()).toString("hex");return{hash:(await y(t,n)).toString("hex"),salt:n}};e.s(["generatePasswordSaltHash",0,b],911908);let E=async e=>{let p,{collection:{config:f},data:g,depth:m,overrideAccess:y,req:{payload:{secret:E},payload:C},req:w}=e;if(!Object.prototype.hasOwnProperty.call(g,"token")||!Object.prototype.hasOwnProperty.call(g,"password"))throw new n.APIError("Missing required data.",t.status.BAD_REQUEST);if(f.auth.disableLocalStrategy)throw new s.Forbidden(w.t);let I=null;try{let s=await (0,l.initTransaction)(w);e=await (0,r.buildBeforeOperation)({args:e,collection:e.collection.config,operation:"resetPassword",overrideAccess:y});let c=(0,a.appendNonTrashedFilter)({enableTrash:!!f.trash,trash:!1,where:{resetPasswordExpiration:{greater_than:new Date().toISOString()},resetPasswordToken:{equals:g.token}}});if(!(I=await C.db.findOne({collection:f.slug,req:w,where:c})))throw new n.APIError("Token is either invalid or has expired.",t.status.FORBIDDEN);let{hash:v,salt:B}=await b({collection:f,password:g.password,req:w});if(I.salt=B,I.hash=v,I.resetPasswordExpiration=new Date().toISOString(),f.auth.verify&&(I._verified=!!I._verified),f.hooks?.beforeValidate?.length)for(let t of f.hooks.beforeValidate)await t({collection:e.collection?.config,context:w.context,data:I,operation:"update",req:w});I.updatedAt=new Date().toISOString();let Q=await C.db.updateOne({id:I.id,collection:f.slug,data:I,req:w});await (0,A.authenticateLocalStrategy)({doc:Q,password:g.password});let x={collectionConfig:f,email:I.email,user:I};(p=(await (0,h.addSessionToUser)({collectionConfig:f,payload:C,req:w,user:I})).sid)&&(x.sid=p);let S=(0,d.getFieldsToSign)(x),k=I;if(f.hooks?.beforeLogin?.length)for(let t of f.hooks.beforeLogin)k=await t({collection:e.collection?.config,context:e.req.context,req:e.req,user:k})||k;let{token:T}=await (0,u.jwtSign)({fieldsToSign:S,secret:E,tokenExpiration:f.auth.tokenExpiration});if(w.user=k,f.hooks?.afterLogin?.length)for(let t of f.hooks.afterLogin)k=await t({collection:e.collection?.config,context:e.req.context,req:e.req,token:T,user:k})||k;let N=await C.findByID({id:I.id,collection:f.slug,depth:m,overrideAccess:y,req:w,trash:!1});s&&await (0,o.commitTransaction)(w),N&&(N.collection=f.slug,N._strategy="local-jwt");let D={token:T,user:N};return D=await (0,i.buildAfterOperation)({args:e,collection:e.collection?.config,operation:"resetPassword",overrideAccess:y,result:D})}catch(e){throw p&&await (0,h.revokeSession)({collectionConfig:f,payload:C,req:w,sid:p,user:I}),await (0,c.killTransaction)(w),e}};e.s(["resetPasswordOperation",0,E],416190);var C=t,w=i,I=r,v=n,B=e.i(617997),Q=s,x=a,S=o,k=l,T=c,N=s;let D=async({id:e,data:t,disableErrors:i,isReadingStaticFile:r=!1,req:n},s)=>{if(s){let a=await s({id:e,data:t,isReadingStaticFile:r,req:n});if(!a&&!i)throw new N.Forbidden(n.t);return a}if(n.user)return!0;if(!i)throw new N.Forbidden(n.t);return!1};e.s(["executeAccess",0,D],42625);var _=e.i(427510),R=e.i(981676);let L=async e=>{let{collection:{config:t},overrideAccess:i,req:{locale:r},req:n}=e,s=t.auth.loginWithUsername,{canLoginWithEmail:a,canLoginWithUsername:o}=(0,_.getLoginOptions)(s),l=a&&(e.data?.email||"").toLowerCase().trim(),c=o&&"username"in e.data&&"string"==typeof e.data.username&&e.data.username.toLowerCase().trim()||null;if(t.auth.disableLocalStrategy)throw new Q.Forbidden(n.t);if(!l&&!c)throw new v.APIError(`Missing ${t.auth.loginWithUsername?"username":"email"}.`,C.status.BAD_REQUEST);try{e=await (0,I.buildBeforeOperation)({args:e,collection:e.collection.config,operation:"unlock",overrideAccess:i});let s=await (0,k.initTransaction)(n),d={};if(!i){let e=await D({req:n},t.access.unlock);e&&"object"==typeof e&&(d=e)}a&&l?d=(0,B.combineQueries)(d,{email:{equals:l}}):o&&c&&(d=(0,B.combineQueries)(d,{username:{equals:c}})),d=(0,x.appendNonTrashedFilter)({enableTrash:!!t.trash,trash:!1,where:d});let u=await n.payload.db.findOne({collection:t.slug,locale:r,req:n,where:d}),h=null;if(u)await (0,R.resetLoginAttempts)({collection:t,doc:u,payload:n.payload,req:n}),h=!0;else throw h=null,new Q.Forbidden(n.t);return s&&await (0,S.commitTransaction)(n),!!(h=await (0,w.buildAfterOperation)({args:e,collection:e.collection.config,operation:"unlock",overrideAccess:i,result:h}))}catch(e){throw await (0,T.killTransaction)(n),e}};e.s(["unlockOperation",0,L],494310);var F=t,M=n,O=s,U=a,P=o,$=l,j=c;let H=async e=>{let{collection:t,req:i,token:r}=e;if(t.config.auth.disableLocalStrategy)throw new O.Forbidden(i.t);if(!Object.prototype.hasOwnProperty.call(e,"token"))throw new M.APIError("Missing required data.",F.status.BAD_REQUEST);try{let e=await (0,$.initTransaction)(i),n=(0,U.appendNonTrashedFilter)({enableTrash:!!t.config.trash,trash:!1,where:{_verificationToken:{equals:r}}}),s=await i.payload.db.findOne({collection:t.config.slug,req:i,where:n});if(!s)throw new M.APIError("Verification token is invalid.",F.status.FORBIDDEN);return s.updatedAt=new Date().toISOString(),await i.payload.db.updateOne({id:s.id,collection:t.config.slug,data:{...s,_verificationToken:null,_verified:!0},req:i,returning:!1}),e&&await (0,P.commitTransaction)(i),!0}catch(e){throw await (0,j.killTransaction)(i),e}};e.s(["verifyEmailOperation",0,H],682896)},540875,e=>{"use strict";let t=({req:{user:e}})=>!!e;e.s(["defaultAccess",0,t])},267522,e=>{"use strict";e.i(10188);var t=e.i(785867),i=e.i(700859);class r extends i.APIError{constructor(e){super(e,t.status.INTERNAL_SERVER_ERROR)}}e.s(["InvalidConfiguration",()=>r])},526415,(e,t,i)=>{!function(e,i){t.exports=i()}(e.e,function(){var e=[],t=[],i={},r={},n={};function s(e){return"string"==typeof e?RegExp("^"+e+"$","i"):e}function a(e,t){return e===t?t:e===e.toLowerCase()?t.toLowerCase():e===e.toUpperCase()?t.toUpperCase():e[0]===e[0].toUpperCase()?t.charAt(0).toUpperCase()+t.substr(1).toLowerCase():t.toLowerCase()}function o(e,t){return e.replace(/\$(\d{1,2})/g,function(e,i){return t[i]||""})}function l(e,t){return e.replace(t[0],function(i,r){var n=o(t[1],arguments);return""===i?a(e[r-1],n):a(i,n)})}function c(e,t,r){if(!e.length||i.hasOwnProperty(e))return t;for(var n=r.length;n--;){var s=r[n];if(s[0].test(t))return l(t,s)}return t}function d(e,t,i){return function(r){var n=r.toLowerCase();return t.hasOwnProperty(n)?a(r,n):e.hasOwnProperty(n)?a(r,e[n]):c(n,r,i)}}function u(e,t,i,r){return function(r){var n=r.toLowerCase();return!!t.hasOwnProperty(n)||!e.hasOwnProperty(n)&&c(n,n,i)===n}}function h(e,t,i){var r=1===t?h.singular(e):h.plural(e);return(i?t+" ":"")+r}return h.plural=d(n,r,e),h.isPlural=u(n,r,e),h.singular=d(r,n,t),h.isSingular=u(r,n,t),h.addPluralRule=function(t,i){e.push([s(t),i])},h.addSingularRule=function(e,i){t.push([s(e),i])},h.addUncountableRule=function(e){if("string"==typeof e){i[e.toLowerCase()]=!0;return}h.addPluralRule(e,"$0"),h.addSingularRule(e,"$0")},h.addIrregularRule=function(e,t){t=t.toLowerCase(),n[e=e.toLowerCase()]=t,r[t]=e},[["I","we"],["me","us"],["he","they"],["she","they"],["them","them"],["myself","ourselves"],["yourself","yourselves"],["itself","themselves"],["herself","themselves"],["himself","themselves"],["themself","themselves"],["is","are"],["was","were"],["has","have"],["this","these"],["that","those"],["echo","echoes"],["dingo","dingoes"],["volcano","volcanoes"],["tornado","tornadoes"],["torpedo","torpedoes"],["genus","genera"],["viscus","viscera"],["stigma","stigmata"],["stoma","stomata"],["dogma","dogmata"],["lemma","lemmata"],["schema","schemata"],["anathema","anathemata"],["ox","oxen"],["axe","axes"],["die","dice"],["yes","yeses"],["foot","feet"],["eave","eaves"],["goose","geese"],["tooth","teeth"],["quiz","quizzes"],["human","humans"],["proof","proofs"],["carve","carves"],["valve","valves"],["looey","looies"],["thief","thieves"],["groove","grooves"],["pickaxe","pickaxes"],["passerby","passersby"]].forEach(function(e){return h.addIrregularRule(e[0],e[1])}),[[/s?$/i,"s"],[/[^\u0000-\u007F]$/i,"$0"],[/([^aeiou]ese)$/i,"$1"],[/(ax|test)is$/i,"$1es"],[/(alias|[^aou]us|t[lm]as|gas|ris)$/i,"$1es"],[/(e[mn]u)s?$/i,"$1s"],[/([^l]ias|[aeiou]las|[ejzr]as|[iu]am)$/i,"$1"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1i"],[/(alumn|alg|vertebr)(?:a|ae)$/i,"$1ae"],[/(seraph|cherub)(?:im)?$/i,"$1im"],[/(her|at|gr)o$/i,"$1oes"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|automat|quor)(?:a|um)$/i,"$1a"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)(?:a|on)$/i,"$1a"],[/sis$/i,"ses"],[/(?:(kni|wi|li)fe|(ar|l|ea|eo|oa|hoo)f)$/i,"$1$2ves"],[/([^aeiouy]|qu)y$/i,"$1ies"],[/([^ch][ieo][ln])ey$/i,"$1ies"],[/(x|ch|ss|sh|zz)$/i,"$1es"],[/(matr|cod|mur|sil|vert|ind|append)(?:ix|ex)$/i,"$1ices"],[/\b((?:tit)?m|l)(?:ice|ouse)$/i,"$1ice"],[/(pe)(?:rson|ople)$/i,"$1ople"],[/(child)(?:ren)?$/i,"$1ren"],[/eaux$/i,"$0"],[/m[ae]n$/i,"men"],["thou","you"]].forEach(function(e){return h.addPluralRule(e[0],e[1])}),[[/s$/i,""],[/(ss)$/i,"$1"],[/(wi|kni|(?:after|half|high|low|mid|non|night|[^\w]|^)li)ves$/i,"$1fe"],[/(ar|(?:wo|[ae])l|[eo][ao])ves$/i,"$1f"],[/ies$/i,"y"],[/\b([pl]|zomb|(?:neck|cross)?t|coll|faer|food|gen|goon|group|lass|talk|goal|cut)ies$/i,"$1ie"],[/\b(mon|smil)ies$/i,"$1ey"],[/\b((?:tit)?m|l)ice$/i,"$1ouse"],[/(seraph|cherub)im$/i,"$1"],[/(x|ch|ss|sh|zz|tto|go|cho|alias|[^aou]us|t[lm]as|gas|(?:her|at|gr)o|[aeiou]ris)(?:es)?$/i,"$1"],[/(analy|diagno|parenthe|progno|synop|the|empha|cri|ne)(?:sis|ses)$/i,"$1sis"],[/(movie|twelve|abuse|e[mn]u)s$/i,"$1"],[/(test)(?:is|es)$/i,"$1is"],[/(alumn|syllab|vir|radi|nucle|fung|cact|stimul|termin|bacill|foc|uter|loc|strat)(?:us|i)$/i,"$1us"],[/(agend|addend|millenni|dat|extrem|bacteri|desiderat|strat|candelabr|errat|ov|symposi|curricul|quor)a$/i,"$1um"],[/(apheli|hyperbat|periheli|asyndet|noumen|phenomen|criteri|organ|prolegomen|hedr|automat)a$/i,"$1on"],[/(alumn|alg|vertebr)ae$/i,"$1a"],[/(cod|mur|sil|vert|ind)ices$/i,"$1ex"],[/(matr|append)ices$/i,"$1ix"],[/(pe)(rson|ople)$/i,"$1rson"],[/(child)ren$/i,"$1"],[/(eau)x?$/i,"$1"],[/men$/i,"man"]].forEach(function(e){return h.addSingularRule(e[0],e[1])}),["adulthood","advice","agenda","aid","aircraft","alcohol","ammo","analytics","anime","athletics","audio","bison","blood","bream","buffalo","butter","carp","cash","chassis","chess","clothing","cod","commerce","cooperation","corps","debris","diabetes","digestion","elk","energy","equipment","excretion","expertise","firmware","flounder","fun","gallows","garbage","graffiti","hardware","headquarters","health","herpes","highjinks","homework","housework","information","jeans","justice","kudos","labour","literature","machinery","mackerel","mail","media","mews","moose","music","mud","manga","news","only","personnel","pike","plankton","pliers","police","pollution","premises","rain","research","rice","salmon","scissors","series","sewage","shambles","shrimp","software","species","staff","swine","tennis","traffic","transportation","trout","tuna","wealth","welfare","whiting","wildebeest","wildlife","you",/pok[eé]mon$/i,/[^aeiou]ese$/i,/deer$/i,/fish$/i,/measles$/i,/o[iu]s$/i,/pox$/i,/sheep$/i].forEach(h.addUncountableRule),h})},346997,e=>{"use strict";var t=e.i(526415);let{isPlural:i,singular:r}=t.default,n=e=>e.charAt(0).toUpperCase()+e.slice(1),s=(e,t=!1)=>{let i=(e||"").trim().split(/[\s-]/),r=[];return i.forEach(e=>{if(""!==e){let t=e.split(/(?=[A-Z])/).join(" ");r.push(n(t))}}),t?r.join("").replace(/\s/g,""):r.join(" ")},a=e=>{let n=s(e);return i(e)?{plural:n,singular:r(n)}:{plural:(0,t.default)(n),singular:n}},o=e=>{let n=s(e,!0);return i(e)?{plural:n,singular:r(n)}:{plural:(0,t.default)(n),singular:n}};e.s(["formatLabels",()=>a,"formatNames",()=>o,"toWords",()=>s])},783334,e=>{"use strict";let t=({config:e,fields:i,includeRelationships:r=!1,localizedPath:n="",path:s})=>{let a=i,o=null,l=s.split("."),c=!1;for(;l.length>0;){let i=l.shift();n=`${n?`${n}.`:""}${i}`;let s=a.find(e=>e.name===i);if(!s)return null;if(s.localized&&(c=!0,n=`${n}.<locale>`),"flattenedFields"in s&&(a=s.flattenedFields),e&&r&&("relationship"===s.type||"upload"===s.type)&&!Array.isArray(s.relationTo)){let t=e.collections.find(e=>e.slug===s.relationTo)?.flattenedFields;if(t&&(a=t),1===l.length&&"id"===l[0])return{field:s,localizedPath:n,pathHasLocalized:c}}if("blocks"in s&&l.length>0){let i=l[0],a=s.blocks.find(e=>e.slug===i);if(a){if(l.shift(),n=`${n}.${i}`,0===l.length)return null;return t({config:e,fields:a.flattenedFields,includeRelationships:r,localizedPath:n,path:l.join(".")})}}o=s}return o?{field:o,localizedPath:n,pathHasLocalized:c}:null};e.s(["getFieldByPath",0,t])},277412,143647,27568,598289,119942,e=>{"use strict";var t=e.i(542327),i=e.i(700859);class r extends i.APIError{constructor(e){super(`A field with the name '${e}' was found multiple times on the same level. Field names must be unique.`)}}var n=e.i(267522),s=i;class a extends s.APIError{constructor(e,t){super(`Field ${e.label} has invalid name '${t}'. Field names can not include periods (.) and must be alphanumeric.`)}}var o=i;class l extends o.APIError{constructor(e,t){super(`Field ${e.label} has invalid relationship '${t}'.`)}}var c=e.i(674921),d=e.i(186725),u=i;class h extends u.APIError{constructor(e){super(`Field${(0,d.fieldAffectsData)(e)?` "${e.name}"`:""} is either missing a field type or it does not match an available field type`)}}var A=i;class p extends A.APIError{constructor(e,t){super(`Field ${e.label} has reserved name '${t}'.`)}}var f=d;let g=({block:e})=>({...e,flattenedFields:y({fields:e.fields})}),m=new Map,y=({cache:e,fields:t})=>{if(e){let e=m.get(t);if(e)return e}let i=[];for(let e of t)switch(e.type){case"array":case"group":if((0,f.fieldAffectsData)(e))i.push({...e,flattenedFields:y({fields:e.fields})});else for(let t of y({fields:e.fields}))i.push(t);break;case"blocks":{let t,r=[];if(e.blockReferences)for(let i of(t=[],e.blockReferences)){if("string"==typeof i){t.push(i);continue}t.push(g({block:i}))}else for(let t of e.blocks){if("string"==typeof t){r.push(t);continue}r.push(g({block:t}))}let n={...e,blockReferences:t,blocks:r};i.push(n);break}case"collapsible":case"row":for(let t of y({fields:e.fields}))i.push(t);break;case"join":i.push(e);break;case"tabs":for(let t of e.tabs)if((0,f.tabHasName)(t))i.push({...t,type:"tab",flattenedFields:y({fields:t.fields})});else for(let e of y({fields:t.fields}))i.push(e);break;default:"ui"!==e.type&&i.push(e)}return m.set(t,i),i};e.s(["flattenAllFields",0,y,"flattenBlock",0,g],143647);var b=e.i(346997),E=n;let C=e=>{let t=e.match(/^([+-])(\d{2}):(\d{2})$/);if(!t)return!1;let i="+"===t[1]?1:-1,r=parseInt(t[2],10),n=parseInt(t[3],10);if(n>59)return!1;let s=i*(60*r+n);return s>=-720&&s<=840},w=e=>{if("UTC"===e)return!0;if(e.startsWith("+")||e.startsWith("-"))return C(e);try{return new Intl.DateTimeFormat("en-US",{timeZone:e}),!0}catch{}return!!("function"==typeof Intl.supportedValuesOf&&Intl.supportedValuesOf("timeZone").includes(e))||!1},I=({source:e,timezones:t})=>{if(t?.length){for(let i of t)if(!w(i.value)){let t=e?` in ${e}`:"";throw new E.InvalidConfiguration(`Timezone ${i.value}${t} is not supported by the current runtime via the Intl API.`)}}};e.s(["validateTimezones",0,I],27568);var v=e.i(743977);let B="default"in v.default?v.default.default:v.default,Q={name:"id",type:"text",admin:{hidden:!0},defaultValue:()=>new B().toHexString(),hooks:{beforeChange:[({value:e})=>e||new B().toHexString()],beforeDuplicate:[()=>new B().toHexString()]},label:"ID"},x=[Q,{name:"blockName",type:"text",admin:{disabled:!0},label:"Block Name",required:!1}];e.s(["baseBlockFields",0,x],598289);let S=({name:e,defaultValue:t,label:i,options:r,required:n})=>({name:e,type:"select",admin:{hidden:!0},defaultValue:t,label:i,options:r,required:n}),k=[{label:"(UTC-11:00) Midway Island, Samoa",value:"Pacific/Midway"},{label:"(UTC-11:00) Niue",value:"Pacific/Niue"},{label:"(UTC-10:00) Hawaii",value:"Pacific/Honolulu"},{label:"(UTC-10:00) Cook Islands",value:"Pacific/Rarotonga"},{label:"(UTC-09:00) Alaska",value:"America/Anchorage"},{label:"(UTC-09:00) Gambier Islands",value:"Pacific/Gambier"},{label:"(UTC-08:00) Pacific Time (US & Canada)",value:"America/Los_Angeles"},{label:"(UTC-08:00) Tijuana, Baja California",value:"America/Tijuana"},{label:"(UTC-07:00) Mountain Time (US & Canada)",value:"America/Denver"},{label:"(UTC-07:00) Arizona (No DST)",value:"America/Phoenix"},{label:"(UTC-06:00) Central Time (US & Canada)",value:"America/Chicago"},{label:"(UTC-06:00) Central America",value:"America/Guatemala"},{label:"(UTC-05:00) Eastern Time (US & Canada)",value:"America/New_York"},{label:"(UTC-05:00) Bogota, Lima, Quito",value:"America/Bogota"},{label:"(UTC-04:00) Caracas",value:"America/Caracas"},{label:"(UTC-04:00) Santiago",value:"America/Santiago"},{label:"(UTC-03:00) Buenos Aires",value:"America/Buenos_Aires"},{label:"(UTC-03:00) Brasilia",value:"America/Sao_Paulo"},{label:"(UTC-02:00) South Georgia",value:"Atlantic/South_Georgia"},{label:"(UTC-01:00) Azores",value:"Atlantic/Azores"},{label:"(UTC-01:00) Cape Verde",value:"Atlantic/Cape_Verde"},{label:"(UTC+00:00) London (GMT)",value:"Europe/London"},{label:"(UTC+01:00) Berlin, Paris",value:"Europe/Berlin"},{label:"(UTC+01:00) Lagos",value:"Africa/Lagos"},{label:"(UTC+02:00) Athens, Bucharest",value:"Europe/Athens"},{label:"(UTC+02:00) Cairo",value:"Africa/Cairo"},{label:"(UTC+03:00) Moscow, St. Petersburg",value:"Europe/Moscow"},{label:"(UTC+03:00) Riyadh",value:"Asia/Riyadh"},{label:"(UTC+04:00) Dubai",value:"Asia/Dubai"},{label:"(UTC+04:00) Baku",value:"Asia/Baku"},{label:"(UTC+05:00) Islamabad, Karachi",value:"Asia/Karachi"},{label:"(UTC+05:00) Tashkent",value:"Asia/Tashkent"},{label:"(UTC+05:30) Chennai, Kolkata, Mumbai, New Delhi",value:"Asia/Calcutta"},{label:"(UTC+06:00) Dhaka",value:"Asia/Dhaka"},{label:"(UTC+06:00) Almaty",value:"Asia/Almaty"},{label:"(UTC+07:00) Jakarta",value:"Asia/Jakarta"},{label:"(UTC+07:00) Bangkok",value:"Asia/Bangkok"},{label:"(UTC+08:00) Beijing, Shanghai",value:"Asia/Shanghai"},{label:"(UTC+08:00) Singapore",value:"Asia/Singapore"},{label:"(UTC+09:00) Tokyo, Osaka, Sapporo",value:"Asia/Tokyo"},{label:"(UTC+09:00) Seoul",value:"Asia/Seoul"},{label:"(UTC+10:00) Brisbane",value:"Australia/Brisbane"},{label:"(UTC+10:00) Sydney, Melbourne",value:"Australia/Sydney"},{label:"(UTC+10:00) Guam, Port Moresby",value:"Pacific/Guam"},{label:"(UTC+11:00) New Caledonia",value:"Pacific/Noumea"},{label:"(UTC+12:00) Auckland, Wellington",value:"Pacific/Auckland"},{label:"(UTC+12:00) Fiji",value:"Pacific/Fiji"}];e.s(["defaultTimezones",0,k],119942);var T=e.i(951020),N=d;let D=e=>"string"==typeof e&&""!==e.trim(),_=({value:e})=>D(e)?`${e} - Copy`:void 0,R=({req:e,value:t})=>D(t)?`${t} - ${e?.t("general:copy")??"Copy"}`:void 0,L=(e,t)=>{("required"in e&&e.required||e.unique)&&"hooks"in e&&(!e.hooks?.beforeDuplicate||Array.isArray(e.hooks.beforeDuplicate)&&0===e.hooks.beforeDuplicate.length)&&e.unique&&(["email","number","point","relationship","select","upload"].includes(e.type)?e.hooks.beforeDuplicate=[()=>void 0]:["code","json","text","textarea"].includes(e.type)&&(e.hooks.beforeDuplicate=(0,N.fieldShouldBeLocalized)({field:e,parentIsLocalized:t})?[R]:[_]))};var F=e.i(350261);let M=["salt","hash"],O=[],U=[],P=["file"];var $=i,j=i;class H extends j.APIError{constructor(e){super(`Invalid join field ${e.name}. The config does not have a field '${e.on}' in collection '${e.collection}'.`)}}var q=e.i(783334);let z=({config:e,field:t,joinPath:i,joins:r,parentIsLocalized:n,polymorphicJoins:s,validateOnly:a})=>{if(void 0===r)throw new $.APIError("Join fields cannot be added to arrays, blocks or globals.");void 0===t.maxDepth&&(t.maxDepth=1);let o={field:t,joinPath:`${i?i+".":""}${t.name}`,parentIsLocalized:n,targetField:void 0};if(Array.isArray(t.collection)){for(let a of t.collection)z({config:e,field:{...t,collection:a},joinPath:i,joins:r,parentIsLocalized:n,polymorphicJoins:s,validateOnly:!0});Array.isArray(s)&&s.push(o);return}let l=e.collections?.find(e=>e.slug===t.collection);if(!l)throw new H(t);let c=(0,q.getFieldByPath)({fields:y({cache:!0,fields:l.fields}),path:t.on});if(!c||"relationship"!==c.field.type&&"upload"!==c.field.type)throw new H(o.field);c.pathHasLocalized&&(o.getForeignPath=({locale:e})=>c.localizedPath.replace("<locale>",e)),c.field.index||c.field.unique||(c.field.index=!0),a||(o.targetField=c.field,t.localized=c.field.localized,t.hasMany=c.field.hasMany,t.targetField=o.targetField,r[t.collection]?r[t.collection]?.push(o):r[t.collection]=[o])};var V=d;let G=async({collectionConfig:e,config:i,existingFieldNames:s=new Set,fields:o,globalConfig:d,isTopLevelField:u=!0,joinPath:A="",joins:f,parentIndexPath:g="",parentIsLocalized:m,parentSchemaPath:E="",polymorphicJoins:C,requireFieldLevelRichTextEditor:w=!1,richTextSanitizationPromises:v,validRelationships:B})=>{if(!o)return[];for(let N=0;N<o.length;N++){let D=o[N];if("_sanitized"in D&&!0===D._sanitized)continue;if("_sanitized"in D&&(D._sanitized=!0),!D.type)throw new h(D);let _=(0,V.fieldAffectsData)(D),{indexPath:R,schemaPath:$}=(0,T.getFieldPaths)({field:D,index:N,parentIndexPath:g,parentSchemaPath:E});if(u&&_&&D.name){if(e&&e.upload&&P.includes(D.name))throw new p(D,D.name);if(e&&e.auth&&"object"==typeof e.auth&&!e.auth.disableLocalStrategy&&(M.includes(D.name)||e.auth.verify&&(U.includes(D.name)||O.includes(D.name))))throw new p(D,D.name)}if(_&&D.name.includes("."))throw new a(D,D.name);if("name"in D&&D.name&&"object"!=typeof D.label&&"string"!=typeof D.label&&"function"!=typeof D.label&&!1!==D.label&&(D.label=(0,b.toWords)(D.name)),"checkbox"===D.type&&void 0===D.defaultValue&&!0===D.required&&(D.defaultValue=!1),"join"===D.type&&z({config:i,field:D,joinPath:A,joins:f,parentIsLocalized:m,polymorphicJoins:C}),"relationship"===D.type||"upload"===D.type){if(Array.isArray(D.relationTo)&&0===D.relationTo.length)throw Error(`Field "${D.name}" of type "${D.type}" has an empty relationTo array. At least one collection must be specified.`);B&&(Array.isArray(D.relationTo)?D.relationTo:[D.relationTo]).forEach(e=>{if(!B.includes(e))throw new l(D,e)}),D.min&&!D.minRows&&(console.warn(`(payload): The "min" property is deprecated for the Relationship field "${D.name}" and will be removed in a future version. Please use "minRows" instead.`),D.minRows=D.min),D.max&&!D.maxRows&&(console.warn(`(payload): The "max" property is deprecated for the Relationship field "${D.name}" and will be removed in a future version. Please use "maxRows" instead.`),D.maxRows=D.max)}if("upload"!==D.type||D.admin&&"isSortable"in D.admin||(D.admin={isSortable:!0,...D.admin}),"array"===D.type&&D.fields&&(D.fields.some(e=>"name"in e&&"id"===e.name)||D.fields.push(Q)),("blocks"===D.type||"array"===D.type)&&D.label&&(D.labels=D.labels||(0,b.formatLabels)(D.name)),_){if(s.has(D.name))throw new r(D.name);if(["blockName","id"].includes(D.name)||s.add(D.name),void 0!==D.localized){let e=!i.localization;"true"!==process.env.NEXT_PUBLIC_PAYLOAD_COMPATIBILITY_allowLocalizedWithinLocalized&&m&&"true"!==process.env.PAYLOAD_DO_NOT_SANITIZE_LOCALIZED_PROPERTY&&(e=!0),e&&delete D.localized}if(void 0===D.validate){let e=F.validations[D.type];e?D.validate=(t,i)=>e(t,{...D,...i}):D.validate=()=>!0}D.hooks||(D.hooks={}),D.access||(D.access={}),L(D,m)}if(D.admin||(D.admin={}),"richText"===D.type){let e=async e=>{if(!D.editor)if(e.editor&&!w)D.editor=e.editor;else throw new c.MissingEditorProp(D);"function"==typeof D.editor&&(D.editor=await D.editor({config:e,isRoot:w,parentIsLocalized:m||D.localized})),D.editor.i18n&&Object.keys(D.editor.i18n).length>=0&&(i.i18n.translations=(0,t.deepMergeSimple)(i.i18n.translations,D.editor.i18n))};v?v.push(e):await e(i)}if("blocks"===D.type&&D.blocks){if(D.blockReferences&&D.blocks?.length)throw Error("You cannot have both blockReferences and blocks in the same blocks field");let t=[];for(let n of D.blockReferences??D.blocks){let s="string"==typeof n?n:n.slug;if(t.includes(s))throw new r(s);t.push(s),"string"!=typeof n&&!0!==n._sanitized&&(n._sanitized=!0,n.fields=n.fields.concat(x),n.labels=n.labels?n.labels:(0,b.formatLabels)(n.slug),n.fields=await G({collectionConfig:e,config:i,existingFieldNames:new Set,fields:n.fields,isTopLevelField:!1,parentIndexPath:"",parentIsLocalized:m||D.localized,parentSchemaPath:$+"."+n.slug,requireFieldLevelRichTextEditor:w,richTextSanitizationPromises:v,validRelationships:B}))}}if("fields"in D&&D.fields&&(D.fields=await G({collectionConfig:e,config:i,existingFieldNames:_?new Set:s,fields:D.fields,isTopLevelField:u&&!_,joinPath:_?`${A?A+".":""}${D.name}`:A,joins:f,parentIndexPath:_?"":R,parentIsLocalized:m||(0,V.fieldIsLocalized)(D),parentSchemaPath:$,polymorphicJoins:C,requireFieldLevelRichTextEditor:w,richTextSanitizationPromises:v,validRelationships:B})),"tabs"===D.type)for(let t=0;t<D.tabs.length;t++){let r=D.tabs[t],n=(0,V.tabHasName)(r);n&&void 0===r.label&&(r.label=(0,b.toWords)(r.name));let{indexPath:a,schemaPath:o}=(0,T.getFieldPaths)({field:r,index:t,parentIndexPath:R,parentSchemaPath:$});"admin"in r&&r.admin?.condition&&"function"==typeof r.admin.condition&&!r.id&&(r.id=o),r.fields=await G({collectionConfig:e,config:i,existingFieldNames:n?new Set:s,fields:r.fields,isTopLevelField:u&&!n,joinPath:n?`${A?A+".":""}${r.name}`:A,joins:f,parentIndexPath:n?"":a,parentIsLocalized:m||n&&r.localized,parentSchemaPath:o,polymorphicJoins:C,requireFieldLevelRichTextEditor:w,richTextSanitizationPromises:v,validRelationships:B}),D.tabs[t]=r}if("ui"===D.type&&void 0===D.admin.disableBulkEdit&&(D.admin.disableBulkEdit=!0),o[N]=D,"date"===D.type&&D.timezone){let e=D.name+"_tz",t=D.timezone&&"object"==typeof D.timezone?D.timezone.defaultTimezone:i.admin?.timezones?.defaultTimezone,r=D.required||D.timezone&&"object"==typeof D.timezone&&D.timezone.required,n=D.timezone&&"object"==typeof D.timezone&&D.timezone.supportedTimezones?D.timezone.supportedTimezones:i.admin?.timezones?.supportedTimezones,s="function"==typeof n?n({defaultTimezones:k}):n;I({source:`field "${D.name}" timezone.supportedTimezones`,timezones:s}),s&&1===s.length&&s[0]?.value&&(t=s[0].value);let a="string"==typeof D.label?`${D.label} Tz`:(0,b.toWords)(e),l=S({name:e,defaultValue:t,label:a,options:s,required:r}),c="object"==typeof D.timezone&&"function"==typeof D.timezone.override?D.timezone.override({baseField:l}):l;o.splice(++N,0,c)}if("virtual"in D&&"string"==typeof D.virtual){let t=D,r=(e||d)?.fields;if(r){let s=y({fields:r}),a=D.virtual.split("."),o=!1;for(let[r,l]of a.entries()){let c=s.find(e=>e.name===l);if(!c)break;if("group"===c.type||"tab"===c.type||"array"===c.type)s=c.flattenedFields;else if(("relationship"===c.type||"upload"===c.type)&&r!==a.length-1&&"string"==typeof c.relationTo){if(c.hasMany&&("text"===t.type||"number"===t.type||"select"===t.type)){if(o)throw new n.InvalidConfiguration(`Virtual field ${t.name} in ${d?`global ${d.slug}`:`collection ${e?.slug}`} references 2 or more hasMany relationships on the path ${t.virtual} which is not allowed.`);o=!0,t.hasMany=!0}let r=i.collections?.find(e=>e.slug===c.relationTo);r&&(s=y({fields:r.fields}))}}}}}return o};e.s(["sanitizeFields",0,G],277412)},248836,(e,t,i)=>{"use strict";var r=function(e){return n(e)&&!s(e)};function n(e){return!!e&&"object"==typeof e}function s(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||o(e)}var a="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function o(e){return e.$$typeof===a}function l(e){return Array.isArray(e)?[]:{}}function c(e,t){return!1!==t.clone&&t.isMergeableObject(e)?m(l(e),e,t):e}function d(e,t,i){return e.concat(t).map(function(e){return c(e,i)})}function u(e,t){if(!t.customMerge)return m;var i=t.customMerge(e);return"function"==typeof i?i:m}function h(e){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(e).filter(function(t){return Object.propertyIsEnumerable.call(e,t)}):[]}function A(e){return Object.keys(e).concat(h(e))}function p(e,t){try{return t in e}catch(e){return!1}}function f(e,t){return p(e,t)&&!(Object.hasOwnProperty.call(e,t)&&Object.propertyIsEnumerable.call(e,t))}function g(e,t,i){var r={};return i.isMergeableObject(e)&&A(e).forEach(function(t){r[t]=c(e[t],i)}),A(t).forEach(function(n){f(e,n)||(p(e,n)&&i.isMergeableObject(t[n])?r[n]=u(n,i)(e[n],t[n],i):r[n]=c(t[n],i))}),r}function m(e,t,i){(i=i||{}).arrayMerge=i.arrayMerge||d,i.isMergeableObject=i.isMergeableObject||r,i.cloneUnlessOtherwiseSpecified=c;var n=Array.isArray(t);return n!==Array.isArray(e)?c(t,i):n?i.arrayMerge(e,t,i):g(e,t,i)}m.all=function(e,t){if(!Array.isArray(e))throw Error("first argument should be an array");return e.reduce(function(e,i){return m(e,i,t)},{})},t.exports=m},190050,(e,t,i)=>{i.read=function(e,t,i,r,n){var s,a,o=8*n-r-1,l=(1<<o)-1,c=l>>1,d=-7,u=i?n-1:0,h=i?-1:1,A=e[t+u];for(u+=h,s=A&(1<<-d)-1,A>>=-d,d+=o;d>0;s=256*s+e[t+u],u+=h,d-=8);for(a=s&(1<<-d)-1,s>>=-d,d+=r;d>0;a=256*a+e[t+u],u+=h,d-=8);if(0===s)s=1-c;else{if(s===l)return a?NaN:1/0*(A?-1:1);a+=Math.pow(2,r),s-=c}return(A?-1:1)*a*Math.pow(2,s-r)},i.write=function(e,t,i,r,n,s){var a,o,l,c=8*s-n-1,d=(1<<c)-1,u=d>>1,h=5960464477539062e-23*(23===n),A=r?0:s-1,p=r?1:-1,f=+(t<0||0===t&&1/t<0);for(isNaN(t=Math.abs(t))||t===1/0?(o=+!!isNaN(t),a=d):(a=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-a))<1&&(a--,l*=2),a+u>=1?t+=h/l:t+=h*Math.pow(2,1-u),t*l>=2&&(a++,l/=2),a+u>=d?(o=0,a=d):a+u>=1?(o=(t*l-1)*Math.pow(2,n),a+=u):(o=t*Math.pow(2,u-1)*Math.pow(2,n),a=0));n>=8;e[i+A]=255&o,A+=p,o/=256,n-=8);for(a=a<<n|o,c+=n;c>0;e[i+A]=255&a,A+=p,a/=256,c-=8);e[i+A-p]|=128*f}},527577,(e,t,i)=>{var r=1e3,n=6e4,s=36e5,a=864e5,o=6048e5,l=315576e5;function c(e){if(!((e=String(e)).length>100)){var t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var i=parseFloat(t[1]),c=(t[2]||"ms").toLowerCase();switch(c){case"years":case"year":case"yrs":case"yr":case"y":return i*l;case"weeks":case"week":case"w":return i*o;case"days":case"day":case"d":return i*a;case"hours":case"hour":case"hrs":case"hr":case"h":return i*s;case"minutes":case"minute":case"mins":case"min":case"m":return i*n;case"seconds":case"second":case"secs":case"sec":case"s":return i*r;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return i;default:return}}}}function d(e){var t=Math.abs(e);return t>=a?Math.round(e/a)+"d":t>=s?Math.round(e/s)+"h":t>=n?Math.round(e/n)+"m":t>=r?Math.round(e/r)+"s":e+"ms"}function u(e){var t=Math.abs(e);return t>=a?h(e,t,a,"day"):t>=s?h(e,t,s,"hour"):t>=n?h(e,t,n,"minute"):t>=r?h(e,t,r,"second"):e+" ms"}function h(e,t,i,r){var n=t>=1.5*i;return Math.round(e/i)+" "+r+(n?"s":"")}t.exports=function(e,t){t=t||{};var i=typeof e;if("string"===i&&e.length>0)return c(e);if("number"===i&&isFinite(e))return t.long?u(e):d(e);throw Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},378343,(e,t,i)=>{t.exports=function(t){function i(e){let t=0;for(let i=0;i<e.length;i++)t=(t<<5)-t+e.charCodeAt(i)|0;return r.colors[Math.abs(t)%r.colors.length]}function r(e){let t,i,s,a=null;function o(...e){if(!o.enabled)return;let i=o,n=Number(new Date);i.diff=n-(t||n),i.prev=t,i.curr=n,t=n,e[0]=r.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(t,n)=>{if("%%"===t)return"%";s++;let a=r.formatters[n];if("function"==typeof a){let r=e[s];t=a.call(i,r),e.splice(s,1),s--}return t}),r.formatArgs.call(i,e),(i.log||r.log).apply(i,e)}return o.namespace=e,o.useColors=r.useColors(),o.color=r.selectColor(e),o.extend=n,o.destroy=r.destroy,Object.defineProperty(o,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==a?a:(i!==r.namespaces&&(i=r.namespaces,s=r.enabled(e)),s),set:e=>{a=e}}),"function"==typeof r.init&&r.init(o),o}function n(e,t){let i=r(this.namespace+(void 0===t?":":t)+e);return i.log=this.log,i}function s(e){for(let t of(r.save(e),r.namespaces=e,r.names=[],r.skips=[],("string"==typeof e?e:"").trim().replace(/\s+/g,",").split(",").filter(Boolean)))"-"===t[0]?r.skips.push(t.slice(1)):r.names.push(t)}function a(e,t){let i=0,r=0,n=-1,s=0;for(;i<e.length;)if(r<t.length&&(t[r]===e[i]||"*"===t[r]))"*"===t[r]?(n=r,s=i):i++,r++;else{if(-1===n)return!1;r=n+1,i=++s}for(;r<t.length&&"*"===t[r];)r++;return r===t.length}function o(){let e=[...r.names,...r.skips.map(e=>"-"+e)].join(",");return r.enable(""),e}function l(e){for(let t of r.skips)if(a(e,t))return!1;for(let t of r.names)if(a(e,t))return!0;return!1}function c(e){return e instanceof Error?e.stack||e.message:e}function d(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return r.debug=r,r.default=r,r.coerce=c,r.disable=o,r.enable=s,r.enabled=l,r.humanize=e.r(527577),r.destroy=d,Object.keys(t).forEach(e=>{r[e]=t[e]}),r.names=[],r.skips=[],r.formatters={},r.selectColor=i,r.enable(r.load()),r}},41530,(e,t,i)=>{"use strict";t.exports=(e,t=process.argv)=>{let i=e.startsWith("-")?"":1===e.length?"-":"--",r=t.indexOf(i+e),n=t.indexOf("--");return -1!==r&&(-1===n||r<n)}},209596,(e,t,i)=>{"use strict";let r;e.r(446786);let n=e.r(870722),s=e.r(41530),{env:a}=process;function o(e){return 0!==e&&{level:e,hasBasic:!0,has256:e>=2,has16m:e>=3}}function l(e,t){if(0===r)return 0;if(s("color=16m")||s("color=full")||s("color=truecolor"))return 3;if(s("color=256"))return 2;if(e&&!t&&void 0===r)return 0;let i=r||0;if("dumb"===a.TERM)return i;if("CI"in a)return["TRAVIS","CIRCLECI","APPVEYOR","GITLAB_CI","GITHUB_ACTIONS","BUILDKITE"].some(e=>e in a)||"codeship"===a.CI_NAME?1:i;if("TEAMCITY_VERSION"in a)return+!!/^(9\.(0*[1-9]\d*)\.|\d{2,}\.)/.test(a.TEAMCITY_VERSION);if("truecolor"===a.COLORTERM)return 3;if("TERM_PROGRAM"in a){let e=parseInt((a.TERM_PROGRAM_VERSION||"").split(".")[0],10);switch(a.TERM_PROGRAM){case"iTerm.app":return e>=3?3:2;case"Apple_Terminal":return 2}}return/-256(color)?$/i.test(a.TERM)?2:/^screen|^xterm|^vt100|^vt220|^rxvt|color|ansi|cygwin|linux/i.test(a.TERM)||"COLORTERM"in a?1:i}s("no-color")||s("no-colors")||s("color=false")||s("color=never")?r=0:(s("color")||s("colors")||s("color=true")||s("color=always"))&&(r=1),"FORCE_COLOR"in a&&(r="true"===a.FORCE_COLOR?1:"false"===a.FORCE_COLOR?0:0===a.FORCE_COLOR.length?1:Math.min(parseInt(a.FORCE_COLOR,10),3)),t.exports={supportsColor:function(e){return o(l(e,e&&e.isTTY))},stdout:o(l(!0,n.isatty(1))),stderr:o(l(!0,n.isatty(2)))}},294430,(e,t,i)=>{let r=e.r(870722),n=e.r(224361);i.init=u,i.log=l,i.formatArgs=a,i.save=c,i.load=d,i.useColors=s,i.destroy=n.deprecate(()=>{},"Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."),i.colors=[6,2,3,4,5,1];try{let t=e.r(209596);t&&(t.stderr||t).level>=2&&(i.colors=[20,21,26,27,32,33,38,39,40,41,42,43,44,45,56,57,62,63,68,69,74,75,76,77,78,79,80,81,92,93,98,99,112,113,128,129,134,135,148,149,160,161,162,163,164,165,166,167,168,169,170,171,172,173,178,179,184,185,196,197,198,199,200,201,202,203,204,205,206,207,208,209,214,215,220,221])}catch(e){}function s(){return"colors"in i.inspectOpts?!!i.inspectOpts.colors:r.isatty(process.stderr.fd)}function a(e){let{namespace:i,useColors:r}=this;if(r){let r=this.color,n="\x1b[3"+(r<8?r:"8;5;"+r),s=` ${n};1m${i} \u001B[0m`;e[0]=s+e[0].split("\n").join("\n"+s),e.push(n+"m+"+t.exports.humanize(this.diff)+"\x1b[0m")}else e[0]=o()+i+" "+e[0]}function o(){return i.inspectOpts.hideDate?"":new Date().toISOString()+" "}function l(...e){return process.stderr.write(n.formatWithOptions(i.inspectOpts,...e)+"\n")}function c(e){e?process.env.DEBUG=e:delete process.env.DEBUG}function d(){return process.env.DEBUG}function u(e){e.inspectOpts={};let t=Object.keys(i.inspectOpts);for(let r=0;r<t.length;r++)e.inspectOpts[t[r]]=i.inspectOpts[t[r]]}i.inspectOpts=Object.keys(process.env).filter(e=>/^debug_/i.test(e)).reduce((e,t)=>{let i=t.substring(6).toLowerCase().replace(/_([a-z])/g,(e,t)=>t.toUpperCase()),r=process.env[t];return r=!!/^(yes|on|true|enabled)$/i.test(r)||!/^(no|off|false|disabled)$/i.test(r)&&("null"===r?null:Number(r)),e[i]=r,e},{}),t.exports=e.r(378343)(i);let{formatters:h}=t.exports;h.o=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts).split("\n").map(e=>e.trim()).join(" ")},h.O=function(e){return this.inspectOpts.colors=this.useColors,n.inspect(e,this.inspectOpts)}},970992,(e,t,i)=>{function r(){let e;return!("u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("u">typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"u">typeof navigator&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&parseInt(e[1],10)>=31||"u">typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))}function n(e){try{e?i.storage.setItem("debug",e):i.storage.removeItem("debug")}catch(e){}}function s(){let e;try{e=i.storage.getItem("debug")||i.storage.getItem("DEBUG")}catch(e){}return!e&&"u">typeof process&&"env"in process&&(e=process.env.DEBUG),e}function a(){try{return localStorage}catch(e){}}i.formatArgs=function e(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),!this.useColors)return;let i="color: "+this.color;e.splice(1,0,i,"color: inherit");let r=0,n=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(r++,"%c"===e&&(n=r))}),e.splice(n,0,i)},i.save=n,i.load=s,i.useColors=r,i.storage=a(),i.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),i.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],i.log=console.debug||console.log||(()=>{}),t.exports=e.r(378343)(i);let{formatters:o}=t.exports;o.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},567259,(e,t,i)=>{"u"<typeof process||"renderer"===process.type||process.__nwjs?t.exports=e.r(970992):t.exports=e.r(294430)},192516,799811,e=>{"use strict";let t;var i=e.i(418352),r=e.i(81111),n=e.i(912714),s=e.i(902157),a=n;let o="End-Of-Stream";class l extends Error{constructor(){super(o),this.name="EndOfStreamError"}}class c extends Error{constructor(e="The operation was aborted"){super(e),this.name="AbortError"}}class d{constructor(){this.resolve=()=>null,this.reject=()=>null,this.promise=new Promise((e,t)=>{this.reject=t,this.resolve=e})}}class u{constructor(){this.endOfStream=!1,this.interrupted=!1,this.peekQueue=[]}async peek(e,t=!1){let i=await this.read(e,t);return this.peekQueue.push(e.subarray(0,i)),i}async read(e,t=!1){if(0===e.length)return 0;let i=this.readFromPeekBuffer(e);if(this.endOfStream||(i+=await this.readRemainderFromStream(e.subarray(i),t)),0===i&&!t)throw new l;return i}readFromPeekBuffer(e){let t=e.length,i=0;for(;this.peekQueue.length>0&&t>0;){let r=this.peekQueue.pop();if(!r)throw Error("peekData should be defined");let n=Math.min(r.length,t);e.set(r.subarray(0,n),i),i+=n,t-=n,n<r.length&&this.peekQueue.push(r.subarray(n))}return i}async readRemainderFromStream(e,t){let i=0;for(;i<e.length&&!this.endOfStream;){if(this.interrupted)throw new c;let r=await this.readFromStream(e.subarray(i),t);if(0===r)break;i+=r}if(!t&&i<e.length)throw new l;return i}}class h extends u{constructor(e){if(super(),this.s=e,this.deferred=null,!e.read||!e.once)throw Error("Expected an instance of stream.Readable");this.s.once("end",()=>{this.endOfStream=!0,this.deferred&&this.deferred.resolve(0)}),this.s.once("error",e=>this.reject(e)),this.s.once("close",()=>this.abort())}async readFromStream(e,t){if(0===e.length)return 0;let i=this.s.read(e.length);if(i)return e.set(i),i.length;let r={buffer:e,mayBeLess:t,deferred:new d};return this.deferred=r.deferred,this.s.once("readable",()=>{this.readDeferred(r)}),r.deferred.promise}readDeferred(e){let t=this.s.read(e.buffer.length);t?(e.buffer.set(t),e.deferred.resolve(t.length),this.deferred=null):this.s.once("readable",()=>{this.readDeferred(e)})}reject(e){this.interrupted=!0,this.deferred&&(this.deferred.reject(e),this.deferred=null)}async abort(){this.reject(new c)}async close(){return this.abort()}}class A extends u{constructor(e){super(),this.reader=e}async abort(){return this.close()}async close(){this.reader.releaseLock()}}class p extends A{async readFromStream(e,t){if(0===e.length)return 0;let i=await this.reader.read(new Uint8Array(e.length),{min:t?void 0:e.length});return(i.done&&(this.endOfStream=i.done),i.value)?(e.set(i.value),i.value.length):0}}class f extends u{constructor(e){super(),this.reader=e,this.buffer=null}writeChunk(e,t){let i=Math.min(t.length,e.length);return e.set(t.subarray(0,i)),i<t.length?this.buffer=t.subarray(i):this.buffer=null,i}async readFromStream(e,t){if(0===e.length)return 0;let i=0;for(this.buffer&&(i+=this.writeChunk(e,this.buffer));i<e.length&&!this.endOfStream;){let t=await this.reader.read();if(t.done){this.endOfStream=!0;break}t.value&&(i+=this.writeChunk(e.subarray(i),t.value))}if(!t&&0===i&&this.endOfStream)throw new l;return i}abort(){return this.interrupted=!0,this.reader.cancel()}async close(){await this.abort(),this.reader.releaseLock()}}function g(e){try{let t=e.getReader({mode:"byob"});if(t instanceof ReadableStreamDefaultReader)return new f(t);return new p(t)}catch(t){if(t instanceof TypeError)return new f(e.getReader());throw t}}class m{constructor(e){this.numBuffer=new Uint8Array(8),this.position=0,this.onClose=e?.onClose,e?.abortSignal&&e.abortSignal.addEventListener("abort",()=>{this.abort()})}async readToken(e,t=this.position){let i=new Uint8Array(e.len);if(await this.readBuffer(i,{position:t})<e.len)throw new l;return e.get(i,0)}async peekToken(e,t=this.position){let i=new Uint8Array(e.len);if(await this.peekBuffer(i,{position:t})<e.len)throw new l;return e.get(i,0)}async readNumber(e){if(await this.readBuffer(this.numBuffer,{length:e.len})<e.len)throw new l;return e.get(this.numBuffer,0)}async peekNumber(e){if(await this.peekBuffer(this.numBuffer,{length:e.len})<e.len)throw new l;return e.get(this.numBuffer,0)}async ignore(e){if(e<0)throw RangeError("ignore length must be ≥ 0 bytes");if(void 0!==this.fileInfo.size){let t=this.fileInfo.size-this.position;if(e>t)return this.position+=t,t}return this.position+=e,e}async close(){await this.abort(),await this.onClose?.()}normalizeOptions(e,t){if(!this.supportsRandomAccess()&&t&&void 0!==t.position&&t.position<this.position)throw Error("`options.position` must be equal or greater than `tokenizer.position`");return{...{mayBeLess:!1,offset:0,length:e.length,position:this.position},...t}}abort(){return Promise.resolve()}}let y=256e3;class b extends m{constructor(e,t){super(t),this.streamReader=e,this.fileInfo=t?.fileInfo??{}}async readBuffer(e,t){let i=this.normalizeOptions(e,t),r=i.position-this.position;if(r>0)return await this.ignore(r),this.readBuffer(e,t);if(r<0)throw Error("`options.position` must be equal or greater than `tokenizer.position`");if(0===i.length)return 0;let n=await this.streamReader.read(e.subarray(0,i.length),i.mayBeLess);if(this.position+=n,(!t||!t.mayBeLess)&&n<i.length)throw new l;return n}async peekBuffer(e,t){let i=this.normalizeOptions(e,t),r=0;if(i.position){let t=i.position-this.position;if(t>0){let n=new Uint8Array(i.length+t);return r=await this.peekBuffer(n,{mayBeLess:i.mayBeLess}),e.set(n.subarray(t)),r-t}if(t<0)throw Error("Cannot peek from a negative offset in a stream")}if(i.length>0){try{r=await this.streamReader.peek(e.subarray(0,i.length),i.mayBeLess)}catch(e){if(t?.mayBeLess&&e instanceof l)return 0;throw e}if(!i.mayBeLess&&r<i.length)throw new l}return r}async ignore(e){if(e<0)throw RangeError("ignore length must be ≥ 0 bytes");let t=Math.min(y,e),i=new Uint8Array(t),r=0;for(;r<e;){let n=e-r,s=await this.readBuffer(i,{length:Math.min(t,n)});if(s<0)return s;r+=s}return r}abort(){return this.streamReader.abort()}async close(){return this.streamReader.close()}supportsRandomAccess(){return!1}}class E extends m{constructor(e,t){super(t),this.uint8Array=e,this.fileInfo={...t?.fileInfo??{},...{size:e.length}}}async readBuffer(e,t){t?.position&&(this.position=t.position);let i=await this.peekBuffer(e,t);return this.position+=i,i}async peekBuffer(e,t){let i=this.normalizeOptions(e,t),r=Math.min(this.uint8Array.length-i.position,i.length);if(!i.mayBeLess&&r<i.length)throw new l;return e.set(this.uint8Array.subarray(i.position,i.position+r)),r}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}}class C extends m{constructor(e,t){super(t),this.blob=e,this.fileInfo={...t?.fileInfo??{},...{size:e.size,mimeType:e.type}}}async readBuffer(e,t){t?.position&&(this.position=t.position);let i=await this.peekBuffer(e,t);return this.position+=i,i}async peekBuffer(e,t){let i=this.normalizeOptions(e,t),r=Math.min(this.blob.size-i.position,i.length);if(!i.mayBeLess&&r<i.length)throw new l;let n=await this.blob.slice(i.position,i.position+r).arrayBuffer();return e.set(new Uint8Array(n)),r}close(){return super.close()}supportsRandomAccess(){return!0}setPosition(e){this.position=e}}function w(e,t){let i=new h(e),r=t??{},n=r.onClose;return r.onClose=async()=>{if(await i.close(),n)return n()},new b(i,r)}function I(e,t){let i=g(e),r=t??{},n=r.onClose;return r.onClose=async()=>{if(await i.close(),n)return n()},new b(i,r)}function v(e,t){return new E(e,t)}function B(e,t){return new C(e,t)}e.s(["fromBlob",()=>B,"fromBuffer",()=>v,"fromStream",()=>w,"fromWebStream",()=>I],554435);var Q=n;class x extends m{static async fromFile(e){let t=await (0,Q.open)(e,"r"),i=await t.stat();return new x(t,{fileInfo:{path:e,size:i.size}})}constructor(e,t){super(t),this.fileHandle=e,this.fileInfo=t.fileInfo}async readBuffer(e,t){let i=this.normalizeOptions(e,t);if(this.position=i.position,0===i.length)return 0;let r=await this.fileHandle.read(e,0,i.length,i.position);if(this.position+=r.bytesRead,r.bytesRead<i.length&&(!t||!t.mayBeLess))throw new l;return r.bytesRead}async peekBuffer(e,t){let i=this.normalizeOptions(e,t),r=await this.fileHandle.read(e,0,i.length,i.position);if(!i.mayBeLess&&r.bytesRead<i.length)throw new l;return r.bytesRead}async close(){return await this.fileHandle.close(),super.close()}setPosition(e){this.position=e}supportsRandomAccess(){return!0}}async function S(e,t){let i=w(e,t);if(e.path){let t=await (0,a.stat)(e.path);i.fileInfo.path=e.path,i.fileInfo.size=t.size}return i}x.fromFile,e.i(554435),e.i(190050);let k={128:"€",130:"‚",131:"ƒ",132:"„",133:"…",134:"†",135:"‡",136:"ˆ",137:"‰",138:"Š",139:"‹",140:"Œ",142:"Ž",145:"‘",146:"’",147:"“",148:"”",149:"•",150:"–",151:"—",152:"˜",153:"™",154:"š",155:"›",156:"œ",158:"ž",159:"Ÿ"},T={};for(let[e,t]of Object.entries(k))T[t]=Number.parseInt(e,10);function N(){if(void 0!==globalThis.TextDecoder)return null!=t?t:t=new globalThis.TextDecoder("utf-8")}let D=32768,_=65533;function R(e,t="utf-8"){switch(t.toLowerCase()){case"utf-8":case"utf8":{let t=N();return t?t.decode(e):O(e)}case"utf-16le":return U(e);case"us-ascii":case"ascii":return P(e);case"latin1":case"iso-8859-1":return $(e);case"windows-1252":return j(e);default:throw RangeError(`Encoding '${t}' not supported`)}}function L(e,t){0!==t.length&&(e.push(String.fromCharCode.apply(null,t)),t.length=0)}function F(e,t,i){t.push(i),t.length>=D&&L(e,t)}function M(e,t,i){i<=65535?F(e,t,i):(F(e,t,55296+((i-=65536)>>10)),F(e,t,56320+(1023&i)))}function O(e){let t=[],i=[],r=0;for(e.length>=3&&239===e[0]&&187===e[1]&&191===e[2]&&(r=3);r<e.length;){let n=e[r];if(n<=127){F(t,i,n),r++;continue}if(n<194||n>244){F(t,i,_),r++;continue}if(n<=223){if(r+1>=e.length){F(t,i,_),r++;continue}let s=e[r+1];if((192&s)!=128){F(t,i,_),r++;continue}F(t,i,(31&n)<<6|63&s),r+=2;continue}if(n<=239){if(r+2>=e.length){F(t,i,_),r++;continue}let s=e[r+1],a=e[r+2];if((192&s)!=128||(192&a)!=128||224===n&&s<160||237===n&&s>=160){F(t,i,_),r++;continue}F(t,i,(15&n)<<12|(63&s)<<6|63&a),r+=3;continue}if(r+3>=e.length){F(t,i,_),r++;continue}let s=e[r+1],a=e[r+2],o=e[r+3];if((192&s)!=128||(192&a)!=128||(192&o)!=128||240===n&&s<144||244===n&&s>143){F(t,i,_),r++;continue}M(t,i,(7&n)<<18|(63&s)<<12|(63&a)<<6|63&o),r+=4}return L(t,i),t.join("")}function U(e){let t=[],i=[],r=e.length,n=0;for(;n+1<r;){let s=e[n]|e[n+1]<<8;if(n+=2,s>=55296&&s<=56319){if(n+1<r){let r=e[n]|e[n+1]<<8;r>=56320&&r<=57343?(F(t,i,s),F(t,i,r),n+=2):F(t,i,_)}else F(t,i,_);continue}if(s>=56320&&s<=57343){F(t,i,_);continue}F(t,i,s)}return n<r&&F(t,i,_),L(t,i),t.join("")}function P(e){let t=[];for(let i=0;i<e.length;i+=D){let r=Math.min(e.length,i+D),n=Array(r-i);for(let t=i,s=0;t<r;t++,s++)n[s]=127&e[t];t.push(String.fromCharCode.apply(null,n))}return t.join("")}function $(e){let t=[];for(let i=0;i<e.length;i+=D){let r=Math.min(e.length,i+D),n=Array(r-i);for(let t=i,s=0;t<r;t++,s++)n[s]=e[t];t.push(String.fromCharCode.apply(null,n))}return t.join("")}function j(e){let t=[],i="";for(let r=0;r<e.length;r++){let n=e[r],s=n>=128&&n<=159?k[n]:void 0;(i+=null!=s?s:String.fromCharCode(n)).length>=D&&(t.push(i),i="")}return i&&t.push(i),t.join("")}function H(e){return new DataView(e.buffer,e.byteOffset)}let q={len:1,get:(e,t)=>H(e).getUint8(t),put:(e,t,i)=>(H(e).setUint8(t,i),t+1)},z={len:2,get:(e,t)=>H(e).getUint16(t,!0),put:(e,t,i)=>(H(e).setUint16(t,i,!0),t+2)},V={len:2,get:(e,t)=>H(e).getUint16(t),put:(e,t,i)=>(H(e).setUint16(t,i),t+2)},G={len:4,get:(e,t)=>H(e).getUint32(t,!0),put:(e,t,i)=>(H(e).setUint32(t,i,!0),t+4)},Y={len:4,get:(e,t)=>H(e).getUint32(t),put:(e,t,i)=>(H(e).setUint32(t,i),t+4)},W={len:4,get:(e,t)=>H(e).getInt32(t),put:(e,t,i)=>(H(e).setInt32(t,i),t+4)},J={len:8,get:(e,t)=>H(e).getBigUint64(t,!0),put:(e,t,i)=>(H(e).setBigUint64(t,i,!0),t+8)};class K{constructor(e,t){this.len=e,this.encoding=t}get(e,t=0){return R(e.subarray(t,t+this.len),this.encoding)}}var Z=e.i(567259);let X=0x4034b50,ee=0x8074b50,et=0x2014b50,ei=0x6054b50,er={get:e=>({signature:G.get(e,0),compressedSize:G.get(e,8),uncompressedSize:G.get(e,12)}),len:16},en={get(e){let t=z.get(e,6);return{signature:G.get(e,0),minVersion:z.get(e,4),dataDescriptor:!!(8&t),compressedMethod:z.get(e,8),compressedSize:G.get(e,18),uncompressedSize:G.get(e,22),filenameLength:z.get(e,26),extraFieldLength:z.get(e,28),filename:null}},len:30},es={get:e=>({signature:G.get(e,0),nrOfThisDisk:z.get(e,4),nrOfThisDiskWithTheStart:z.get(e,6),nrOfEntriesOnThisDisk:z.get(e,8),nrOfEntriesOfSize:z.get(e,10),sizeOfCd:G.get(e,12),offsetOfStartOfCd:G.get(e,16),zipFileCommentLength:z.get(e,20)}),len:22},ea={get(e){let t=z.get(e,8);return{signature:G.get(e,0),minVersion:z.get(e,6),dataDescriptor:!!(8&t),compressedMethod:z.get(e,10),compressedSize:G.get(e,20),uncompressedSize:G.get(e,24),filenameLength:z.get(e,28),extraFieldLength:z.get(e,30),fileCommentLength:z.get(e,32),relativeOffsetOfLocalHeader:G.get(e,42),filename:null}},len:46};function eo(e){let t=new Uint8Array(G.len);return G.put(t,0,e),t}let el=(0,Z.default)("tokenizer:inflate"),ec=262144,ed=eo(ee),eu=eo(ei);class eh{constructor(e){this.tokenizer=e,this.syncBuffer=new Uint8Array(ec)}async isZip(){return await this.peekSignature()===X}peekSignature(){return this.tokenizer.peekToken(G)}async findEndOfCentralDirectoryLocator(){let e=this.tokenizer,t=Math.min(16384,e.fileInfo.size),i=this.syncBuffer.subarray(0,t);await this.tokenizer.readBuffer(i,{position:e.fileInfo.size-t});for(let r=i.length-4;r>=0;r--)if(i[r]===eu[0]&&i[r+1]===eu[1]&&i[r+2]===eu[2]&&i[r+3]===eu[3])return e.fileInfo.size-t+r;return -1}async readCentralDirectory(){if(!this.tokenizer.supportsRandomAccess())return void el("Cannot reading central-directory without random-read support");el("Reading central-directory...");let e=this.tokenizer.position,t=await this.findEndOfCentralDirectoryLocator();if(t>0){el("Central-directory 32-bit signature found");let i=await this.tokenizer.readToken(es,t),r=[];this.tokenizer.setPosition(i.offsetOfStartOfCd);for(let e=0;e<i.nrOfEntriesOfSize;++e){let t=await this.tokenizer.readToken(ea);if(t.signature!==et)throw Error("Expected Central-File-Header signature");t.filename=await this.tokenizer.readToken(new K(t.filenameLength,"utf-8")),await this.tokenizer.ignore(t.extraFieldLength),await this.tokenizer.ignore(t.fileCommentLength),r.push(t),el(`Add central-directory file-entry: n=${e+1}/${r.length}: filename=${r[e].filename}`)}return this.tokenizer.setPosition(e),r}this.tokenizer.setPosition(e)}async unzip(e){let t=await this.readCentralDirectory();if(t)return this.iterateOverCentralDirectory(t,e);let i=!1;do{let t,r=await this.readLocalFileHeader();if(!r)break;let n=e(r);if(i=!!n.stop,await this.tokenizer.ignore(r.extraFieldLength),r.dataDescriptor&&0===r.compressedSize){let e=[],t=ec;el("Compressed-file-size unknown, scanning for next data-descriptor-signature....");let i=-1;for(;i<0&&t===ec;){t=await this.tokenizer.peekBuffer(this.syncBuffer,{mayBeLess:!0});let r=(i=eA(this.syncBuffer.subarray(0,t),ed))>=0?i:t;if(n.handler){let t=new Uint8Array(r);await this.tokenizer.readBuffer(t),e.push(t)}else await this.tokenizer.ignore(r)}el(`Found data-descriptor-signature at pos=${this.tokenizer.position}`),n.handler&&await this.inflate(r,ep(e),n.handler)}else n.handler?(el(`Reading compressed-file-data: ${r.compressedSize} bytes`),t=new Uint8Array(r.compressedSize),await this.tokenizer.readBuffer(t),await this.inflate(r,t,n.handler)):(el(`Ignoring compressed-file-data: ${r.compressedSize} bytes`),await this.tokenizer.ignore(r.compressedSize));if(el(`Reading data-descriptor at pos=${this.tokenizer.position}`),r.dataDescriptor&&0x8074b50!==(await this.tokenizer.readToken(er)).signature)throw Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-er.len}`)}while(!i)}async iterateOverCentralDirectory(e,t){for(let i of e){let e=t(i);if(e.handler){this.tokenizer.setPosition(i.relativeOffsetOfLocalHeader);let t=await this.readLocalFileHeader();if(t){await this.tokenizer.ignore(t.extraFieldLength);let r=new Uint8Array(i.compressedSize);await this.tokenizer.readBuffer(r),await this.inflate(t,r,e.handler)}}if(e.stop)break}}async inflate(e,t,i){if(0===e.compressedMethod)return i(t);if(8!==e.compressedMethod)throw Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);return el(`Decompress filename=${e.filename}, compressed-size=${t.length}`),i(await eh.decompressDeflateRaw(t))}static async decompressDeflateRaw(e){let t=new ReadableStream({start(t){t.enqueue(e),t.close()}}),i=new DecompressionStream("deflate-raw"),r=t.pipeThrough(i);try{let e=new Response(r),t=await e.arrayBuffer();return new Uint8Array(t)}catch(e){throw TypeError(e instanceof Error?`Failed to deflate ZIP entry: ${e.message}`:"Unknown decompression error in ZIP entry")}}async readLocalFileHeader(){let e=await this.tokenizer.peekToken(G);if(e===X){let e=await this.tokenizer.readToken(en);return e.filename=await this.tokenizer.readToken(new K(e.filenameLength,"utf-8")),e}if(e===et)return!1;if(0xe011cfd0===e)throw Error("Encrypted ZIP");throw Error("Unexpected signature")}}function eA(e,t){let i=e.length,r=t.length;if(r>i)return -1;for(let n=0;n<=i-r;n++){let i=!0;for(let s=0;s<r;s++)if(e[n+s]!==t[s]){i=!1;break}if(i)return n}return -1}function ep(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let r of e)t.set(r,i),i+=r.length;return t}class ef{constructor(e){this.tokenizer=e}inflate(){let e=this.tokenizer;return new ReadableStream({async pull(t){let i=new Uint8Array(1024),r=await e.readBuffer(i,{mayBeLess:!0});0===r?t.close():t.enqueue(i.subarray(0,r))}}).pipeThrough(new DecompressionStream("gzip"))}}function eg(e){let{byteLength:t}=e;return 6===t?0x100000000*e.getUint16(0)+e.getUint32(2):5===t?0x100000000*e.getUint8(0)+e.getUint32(1):4===t?e.getUint32(0):3===t?65536*e.getUint8(0)+e.getUint16(1):2===t?e.getUint16(0):1===t?e.getUint8(0):void 0}function em(e,t){if("utf-16le"===t){let t=[];for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);t.push(255&r,r>>8&255)}return t}if("utf-16be"===t){let t=[];for(let i=0;i<e.length;i++){let r=e.charCodeAt(i);t.push(r>>8&255,255&r)}return t}return[...e].map(e=>e.charCodeAt(0))}function ey(e,t=0){let i=Number.parseInt(new K(6).get(e,148).replace(/\0.*$/,"").trim(),8);if(Number.isNaN(i))return!1;let r=256;for(let i=t;i<t+148;i++)r+=e[i];for(let i=t+156;i<t+512;i++)r+=e[i];return i===r}Object.prototype.toString,new globalThis.TextDecoder("utf8"),new globalThis.TextEncoder,Array.from({length:256},(e,t)=>t.toString(16).padStart(2,"0"));let eb={get:(e,t)=>127&e[t+3]|e[t+2]<<7|e[t+1]<<14|e[t]<<21,len:4},eE=4100,eC=4098,ew=1048576,eI=1024,ev=0x80000000-1,eB=0x1000000,eQ=1048576,ex=0x1000000,eS=1,ek=100,eT=0x1000000,eN=64,eD=1048576,e_=256,eR=512,eL=0x1000000,eF=512,eM=512,eO=256,eU=1048576,eP=1048576,e$=1048576,ej=0x1000000,eH=new Set(["Unexpected signature","Encrypted ZIP","Expected Central-File-Header signature"]),eq=["ZIP entry count exceeds ","Unsupported ZIP compression method:","ZIP entry compressed data exceeds ","ZIP entry decompressed data exceeds ","Expected data-descriptor-signature at position "],ez=new Set(["Z_BUF_ERROR","Z_DATA_ERROR","ERR_INVALID_STATE"]);class eV extends Error{}function eG(e){let t=e?.streamReader;if(t?.constructor?.name!=="WebStreamByobReader")return e;let{reader:i}=t,r=async()=>{await i.cancel(),i.releaseLock()};return t.close=r,t.abort=async()=>{t.interrupted=!0,await r()},e}function eY(e,t,i){if(!Number.isFinite(e)||e<0||e>t)throw new eV(`${i} has invalid size ${e} (maximum ${t} bytes)`);return e}async function eW(e,t,{maximumLength:i=eB,reason:r="skip"}={}){let n=eY(t,i,r);await e.ignore(n)}async function eJ(e,t,i,{maximumLength:r=t.length,reason:n="read"}={}){let s=eY(i?.length??t.length,r,n);return e.readBuffer(t,{...i,length:s})}async function eK(e,{maximumLength:t=ew}={}){let i=new ReadableStream({start(t){t.enqueue(e),t.close()}}).pipeThrough(new DecompressionStream("deflate-raw")).getReader(),r=[],n=0;try{for(;;){let{done:e,value:s}=await i.read();if(e)break;if((n+=s.length)>t)throw await i.cancel(),Error(`ZIP entry decompressed data exceeds ${t} bytes`);r.push(s)}}finally{i.releaseLock()}let s=new Uint8Array(n),a=0;for(let e of r)s.set(e,a),a+=e.length;return s}let eZ=0x8074b50,eX=16,e0=15;function e1(e,t){if(e.length<eX)return -1;let i=e.length-eX;for(let r=0;r<=i;r++)if(G.get(e,r)===eZ&&G.get(e,r+8)===t+r)return r;return -1}function e2(e){return(32&e.codePointAt(0))!=0}function e4(e,t){let i=new Uint8Array(t),r=0;for(let t of e)i.set(t,r),r+=t.length;return i}async function e5(e,{shouldBuffer:t,maximumLength:i=ew}={}){let{syncBuffer:r}=e,{length:n}=r,s=[],a=0;for(;;){let o=await e.tokenizer.peekBuffer(r,{mayBeLess:!0}),l=e1(r.subarray(0,o),a),c=l>=0?0:o===n?Math.min(e0,o-1):0,d=l>=0?l:o-c;if(0===d)break;if((a+=d)>i)throw Error(`ZIP entry compressed data exceeds ${i} bytes`);if(t){let t=new Uint8Array(d);await e.tokenizer.readBuffer(t),s.push(t)}else await e.tokenizer.ignore(d);if(l>=0)break}if(ts(e.tokenizer)||(e.knownSizeDescriptorScannedBytes+=a),t)return e4(s,a)}function e3(e,t){return ts(e.tokenizer)?Math.max(0,eB-(e.tokenizer.position-t)):Math.max(0,ew-e.knownSizeDescriptorScannedBytes)}async function e8(e,t,{shouldBuffer:i,maximumDescriptorLength:r=ew}={}){if(t.dataDescriptor&&0===t.compressedSize)return e5(e,{shouldBuffer:i,maximumLength:r});if(!i)return void await eW(e.tokenizer,t.compressedSize,{maximumLength:ts(e.tokenizer)?ew:e.tokenizer.fileInfo.size,reason:"ZIP entry compressed data"});let n=to(e.tokenizer);if(!Number.isFinite(t.compressedSize)||t.compressedSize<0||t.compressedSize>n)throw Error(`ZIP entry compressed data exceeds ${n} bytes`);let s=new Uint8Array(t.compressedSize);return await e.tokenizer.readBuffer(s),s}function e9(e,t){let i=e.getReader(),r=0,n=!1,s=!1,a=async e=>{n||s||(s=!0,await i.cancel(e))};return new ReadableStream({async pull(e){if(r>=t){e.close(),await a();return}let{done:s,value:o}=await i.read();if(s||!o){n=!0,e.close();return}let l=t-r;if(o.length>l){e.enqueue(o.subarray(0,l)),r+=l,e.close(),await a();return}e.enqueue(o),r+=o.length},async cancel(e){await a(e)}})}async function e6(e,t){return new tp(t).fromBuffer(e)}function e7(e){switch(e=e.toLowerCase()){case"application/epub+zip":return{ext:"epub",mime:e};case"application/vnd.oasis.opendocument.text":return{ext:"odt",mime:e};case"application/vnd.oasis.opendocument.text-template":return{ext:"ott",mime:e};case"application/vnd.oasis.opendocument.spreadsheet":return{ext:"ods",mime:e};case"application/vnd.oasis.opendocument.spreadsheet-template":return{ext:"ots",mime:e};case"application/vnd.oasis.opendocument.presentation":return{ext:"odp",mime:e};case"application/vnd.oasis.opendocument.presentation-template":return{ext:"otp",mime:e};case"application/vnd.oasis.opendocument.graphics":return{ext:"odg",mime:e};case"application/vnd.oasis.opendocument.graphics-template":return{ext:"otg",mime:e};case"application/vnd.openxmlformats-officedocument.presentationml.slideshow":return{ext:"ppsx",mime:e};case"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet":return{ext:"xlsx",mime:e};case"application/vnd.ms-excel.sheet.macroenabled":return{ext:"xlsm",mime:"application/vnd.ms-excel.sheet.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.spreadsheetml.template":return{ext:"xltx",mime:e};case"application/vnd.ms-excel.template.macroenabled":return{ext:"xltm",mime:"application/vnd.ms-excel.template.macroenabled.12"};case"application/vnd.ms-powerpoint.slideshow.macroenabled":return{ext:"ppsm",mime:"application/vnd.ms-powerpoint.slideshow.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.document":return{ext:"docx",mime:e};case"application/vnd.ms-word.document.macroenabled":return{ext:"docm",mime:"application/vnd.ms-word.document.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.wordprocessingml.template":return{ext:"dotx",mime:e};case"application/vnd.ms-word.template.macroenabledtemplate":return{ext:"dotm",mime:"application/vnd.ms-word.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.template":return{ext:"potx",mime:e};case"application/vnd.ms-powerpoint.template.macroenabled":return{ext:"potm",mime:"application/vnd.ms-powerpoint.template.macroenabled.12"};case"application/vnd.openxmlformats-officedocument.presentationml.presentation":return{ext:"pptx",mime:e};case"application/vnd.ms-powerpoint.presentation.macroenabled":return{ext:"pptm",mime:"application/vnd.ms-powerpoint.presentation.macroenabled.12"};case"application/vnd.ms-visio.drawing":return{ext:"vsdx",mime:"application/vnd.visio"};case"application/vnd.ms-package.3dmanufacturing-3dmodel+xml":return{ext:"3mf",mime:"model/3mf"}}}function te(e,t,i){for(let[r,n]of(i={offset:0,...i},t.entries()))if(i.mask){if(n!==(i.mask[r]&e[r+i.offset]))return!1}else if(n!==e[r+i.offset])return!1;return!0}function tt(e){return Number.isFinite(e)?Math.max(1,Math.trunc(e)):eE}function ti(e,t,i){return void 0===i?e.read(t):(i.throwIfAborted(),new Promise((r,n)=>{let s=()=>{i.removeEventListener("abort",a)},a=()=>{let t=i.reason;s(),(async()=>{try{await e.cancel(t)}catch{}})(),n(t)};i.addEventListener("abort",a,{once:!0}),(async()=>{try{let i=await e.read(t);s(),r(i)}catch(e){s(),n(e)}})()}))}function tr(e){return Number.isFinite(e)?Math.max(0,Math.min(eC,Math.trunc(e))):0}function tn(e){return Number.isFinite(e)?Math.max(0,e):Number.MAX_SAFE_INTEGER}function ts(e){let t=e.fileInfo.size;return!Number.isFinite(t)||t===Number.MAX_SAFE_INTEGER}function ta(e,t,i){return ts(e)&&e.position-t>i}function to(e){let t=e.fileInfo.size;return Math.min(Number.isFinite(t)?Math.max(0,t-e.position):Number.MAX_SAFE_INTEGER,ev)}function tl(e){if(e instanceof l||e instanceof eV)return!0;if(!(e instanceof Error))return!1;if(eH.has(e.message)||ez.has(e.code))return!0;for(let t of eq)if(e.message.startsWith(t))return!0;return!1}function tc(e,t=ew){for(let i of[e.compressedSize,e.uncompressedSize])if(!Number.isFinite(i)||i<0||i>t)return!1;return!0}function td(){return{hasContentTypesEntry:!1,hasParsedContentTypesEntry:!1,isParsingContentTypes:!1,hasUnparseableContentTypes:!1,hasWordDirectory:!1,hasPresentationDirectory:!1,hasSpreadsheetDirectory:!1,hasThreeDimensionalModelEntry:!1}}function tu(e,t){t.startsWith("word/")&&(e.hasWordDirectory=!0),t.startsWith("ppt/")&&(e.hasPresentationDirectory=!0),t.startsWith("xl/")&&(e.hasSpreadsheetDirectory=!0),t.startsWith("3D/")&&t.endsWith(".model")&&(e.hasThreeDimensionalModelEntry=!0)}function th(e){if(e.hasContentTypesEntry&&!e.hasUnparseableContentTypes&&!e.isParsingContentTypes&&!e.hasParsedContentTypesEntry){if(e.hasWordDirectory)return{ext:"docx",mime:"application/vnd.openxmlformats-officedocument.wordprocessingml.document"};if(e.hasPresentationDirectory)return{ext:"pptx",mime:"application/vnd.openxmlformats-officedocument.presentationml.presentation"};if(e.hasSpreadsheetDirectory)return{ext:"xlsx",mime:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"};if(e.hasThreeDimensionalModelEntry)return{ext:"3mf",mime:"model/3mf"}}}function tA(e){let t=e.indexOf('.main+xml"');if(-1===t){let t="application/vnd.ms-package.3dmanufacturing-3dmodel+xml";return e.includes(`ContentType="${t}"`)?t:void 0}let i=e.slice(0,t),r=i.lastIndexOf('"');return i.slice(r+1)}eh.prototype.inflate=async function(e,t,i){if(0===e.compressedMethod)return i(t);if(8!==e.compressedMethod)throw Error(`Unsupported ZIP compression method: ${e.compressedMethod}`);return i(await eK(t,{maximumLength:ew}))},eh.prototype.unzip=async function(e){let t=!1,i=0,r=this.tokenizer.position;this.knownSizeDescriptorScannedBytes=0;do{if(ta(this.tokenizer,r,eB))throw new eV(`ZIP stream probing exceeds ${eB} bytes`);let n=await this.readLocalFileHeader();if(!n)break;if(++i>eI)throw Error(`ZIP entry count exceeds ${eI}`);let s=e(n);t=!!s.stop,await this.tokenizer.ignore(n.extraFieldLength);let a=await e8(this,n,{shouldBuffer:!!s.handler,maximumDescriptorLength:Math.min(ew,e3(this,r))});if(s.handler&&await this.inflate(n,a,s.handler),n.dataDescriptor){let e=new Uint8Array(eX);if(await this.tokenizer.readBuffer(e),G.get(e,0)!==eZ)throw Error(`Expected data-descriptor-signature at position ${this.tokenizer.position-e.length}`)}if(ta(this.tokenizer,r,eB))throw new eV(`ZIP stream probing exceeds ${eB} bytes`)}while(!t)};class tp{constructor(e){const t=tr(e?.mpegOffsetTolerance);this.options={...e,mpegOffsetTolerance:t},this.detectors=[...this.options.customDetectors??[],{id:"core",detect:this.detectConfident},{id:"core.imprecise",detect:this.detectImprecise}],this.tokenizerOptions={abortSignal:this.options.signal},this.gzipProbeDepth=0}getTokenizerOptions(){return{...this.tokenizerOptions}}createTokenizerFromWebStream(e){return eG(I(e,this.getTokenizerOptions()))}async parseTokenizer(e,t=0){this.detectionReentryCount=t;let i=e.position;for(let t of this.detectors){let r;try{r=await t.detect(e)}catch(e){if(e instanceof l||e instanceof eV)return;throw e}if(r)return r;if(i!==e.position)return}}async fromTokenizer(e){try{return await this.parseTokenizer(e)}finally{await e.close()}}async fromBuffer(e){if(!(e instanceof Uint8Array||e instanceof ArrayBuffer))throw TypeError(`Expected the \`input\` argument to be of type \`Uint8Array\` or \`ArrayBuffer\`, got \`${typeof e}\``);let t=e instanceof Uint8Array?e:new Uint8Array(e);if(t?.length>1)return this.fromTokenizer(v(t,this.getTokenizerOptions()))}async fromBlob(e){this.options.signal?.throwIfAborted();let t=B(e,this.getTokenizerOptions());return this.fromTokenizer(t)}async fromStream(e){this.options.signal?.throwIfAborted();let t=this.createTokenizerFromWebStream(e);return this.fromTokenizer(t)}async toDetectionStream(e,t){let i,r,n=tt(t?.sampleSize??eE),s=e.getReader({mode:"byob"});try{let{value:e,done:t}=await ti(s,new Uint8Array(n),this.options.signal);if(r=e,!t&&e)try{i=await this.fromBuffer(e.subarray(0,n))}catch(e){if(!(e instanceof l))throw e;i=void 0}r=e}finally{s.releaseLock()}let a=new TransformStream({async start(e){e.enqueue(r)},transform(e,t){t.enqueue(e)}}),o=e.pipeThrough(a);return o.fileType=i,o}async detectGzip(e){let t,i,r,n;if(this.gzipProbeDepth>=eS)return{ext:"gz",mime:"application/gzip"};let s=e9(new ef(e).inflate(),ex),a=ts(e);if(a){let e=new AbortController;t=setTimeout(()=>{e.abort(new DOMException(`Operation timed out after ${ek} ms`,"TimeoutError"))},ek),i=void 0===this.options.signal?e.signal:AbortSignal.any([this.options.signal,e.signal]),(r=new tp({...this.options,signal:i})).gzipProbeDepth=this.gzipProbeDepth+1}else this.gzipProbeDepth++;try{n=await (r??this).fromStream(s)}catch(e){if(e?.name==="AbortError"&&i?.reason?.name!=="TimeoutError")throw e}finally{clearTimeout(t),!a&&this.gzipProbeDepth--}return n?.ext==="tar"?{ext:"tar.gz",mime:"application/gzip"}:{ext:"gz",mime:"application/gzip"}}check(e,t){return te(this.buffer,e,t)}checkString(e,t){return this.check(em(e,t?.encoding),t)}detectConfident=async e=>{if(this.buffer=new Uint8Array(eE),void 0===e.fileInfo.size&&(e.fileInfo.size=Number.MAX_SAFE_INTEGER),this.tokenizer=e,ts(e)&&(await e.peekBuffer(this.buffer,{length:3,mayBeLess:!0}),this.check([31,139,8])))return this.detectGzip(e);if(await e.peekBuffer(this.buffer,{length:32,mayBeLess:!0}),this.check([66,77]))return{ext:"bmp",mime:"image/bmp"};if(this.check([11,119]))return{ext:"ac3",mime:"audio/vnd.dolby.dd-raw"};if(this.check([120,1]))return{ext:"dmg",mime:"application/x-apple-diskimage"};if(this.check([77,90]))return{ext:"exe",mime:"application/x-msdownload"};if(this.check([37,33]))return(await e.peekBuffer(this.buffer,{length:24,mayBeLess:!0}),this.checkString("PS-Adobe-",{offset:2})&&this.checkString(" EPSF-",{offset:14}))?{ext:"eps",mime:"application/eps"}:{ext:"ps",mime:"application/postscript"};if(this.check([31,160])||this.check([31,157]))return{ext:"Z",mime:"application/x-compress"};if(this.check([199,113]))return{ext:"cpio",mime:"application/x-cpio"};if(this.check([96,234]))return{ext:"arj",mime:"application/x-arj"};if(this.check([239,187,191])){if(this.detectionReentryCount>=eO)return;return this.detectionReentryCount++,await this.tokenizer.ignore(3),this.detectConfident(e)}if(this.check([71,73,70]))return{ext:"gif",mime:"image/gif"};if(this.check([73,73,188]))return{ext:"jxr",mime:"image/vnd.ms-photo"};if(this.check([31,139,8]))return this.detectGzip(e);if(this.check([66,90,104]))return{ext:"bz2",mime:"application/x-bzip2"};if(this.checkString("ID3")){await eW(e,6,{maximumLength:6,reason:"ID3 header prefix"});let t=await e.readToken(eb),i=ts(e);if(!Number.isFinite(t)||t<0||i&&(t>eT||e.position+t>eT))return;if(e.position+t>e.fileInfo.size){if(i)return;return{ext:"mp3",mime:"audio/mpeg"}}try{await eW(e,t,{maximumLength:i?eT:e.fileInfo.size,reason:"ID3 payload"})}catch(e){if(e instanceof l)return;throw e}if(this.detectionReentryCount>=eO)return;return this.detectionReentryCount++,this.parseTokenizer(e,this.detectionReentryCount)}if(this.checkString("MP+"))return{ext:"mpc",mime:"audio/x-musepack"};if((67===this.buffer[0]||70===this.buffer[0])&&this.check([87,83],{offset:1}))return{ext:"swf",mime:"application/x-shockwave-flash"};if(this.check([255,216,255]))return this.check([247],{offset:3})?{ext:"jls",mime:"image/jls"}:{ext:"jpg",mime:"image/jpeg"};if(this.check([79,98,106,1]))return{ext:"avro",mime:"application/avro"};if(this.checkString("FLIF"))return{ext:"flif",mime:"image/flif"};if(this.checkString("8BPS"))return{ext:"psd",mime:"image/vnd.adobe.photoshop"};if(this.checkString("MPCK"))return{ext:"mpc",mime:"audio/x-musepack"};if(this.checkString("FORM"))return{ext:"aif",mime:"audio/aiff"};if(this.checkString("icns",{offset:0}))return{ext:"icns",mime:"image/icns"};if(this.check([80,75,3,4])){let t,i=td();try{await new eh(e).unzip(e=>{tu(i,e.filename);let r="[Content_Types].xml"===e.filename,n=th(i);if(!r&&n)return t=n,{stop:!0};switch(e.filename){case"META-INF/mozilla.rsa":return t={ext:"xpi",mime:"application/x-xpinstall"},{stop:!0};case"META-INF/MANIFEST.MF":return t={ext:"jar",mime:"application/java-archive"},{stop:!0};case"mimetype":if(!tc(e,eQ))return{};return{async handler(e){let i=new TextDecoder("utf-8").decode(e).trim();t=e7(i)},stop:!0};case"[Content_Types].xml":if(i.hasContentTypesEntry=!0,!tc(e,eQ))return i.hasUnparseableContentTypes=!0,{};return i.isParsingContentTypes=!0,{async handler(e){let r=new TextDecoder("utf-8").decode(e),n=tA(r);n&&(t=e7(n)),i.hasParsedContentTypesEntry=!0,i.isParsingContentTypes=!1},stop:!0};default:if(/classes\d*\.dex/.test(e.filename))return t={ext:"apk",mime:"application/vnd.android.package-archive"},{stop:!0};return{}}})}catch(e){if(!tl(e))throw e;i.isParsingContentTypes&&(i.isParsingContentTypes=!1,i.hasUnparseableContentTypes=!0)}return t??th(i)??{ext:"zip",mime:"application/zip"}}if(this.checkString("OggS")){await e.ignore(28);let t=new Uint8Array(8);return(await e.readBuffer(t),te(t,[79,112,117,115,72,101,97,100]))?{ext:"opus",mime:"audio/ogg; codecs=opus"}:te(t,[128,116,104,101,111,114,97])?{ext:"ogv",mime:"video/ogg"}:te(t,[1,118,105,100,101,111,0])?{ext:"ogm",mime:"video/ogg"}:te(t,[127,70,76,65,67])?{ext:"oga",mime:"audio/ogg"}:te(t,[83,112,101,101,120,32,32])?{ext:"spx",mime:"audio/ogg"}:te(t,[1,118,111,114,98,105,115])?{ext:"ogg",mime:"audio/ogg"}:{ext:"ogx",mime:"application/ogg"}}if(this.check([80,75])&&(3===this.buffer[2]||5===this.buffer[2]||7===this.buffer[2])&&(4===this.buffer[3]||6===this.buffer[3]||8===this.buffer[3]))return{ext:"zip",mime:"application/zip"};if(this.checkString("MThd"))return{ext:"mid",mime:"audio/midi"};if(this.checkString("wOFF")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff",mime:"font/woff"};if(this.checkString("wOF2")&&(this.check([0,1,0,0],{offset:4})||this.checkString("OTTO",{offset:4})))return{ext:"woff2",mime:"font/woff2"};if(this.check([212,195,178,161])||this.check([161,178,195,212]))return{ext:"pcap",mime:"application/vnd.tcpdump.pcap"};if(this.checkString("DSD "))return{ext:"dsf",mime:"audio/x-dsf"};if(this.checkString("LZIP"))return{ext:"lz",mime:"application/x-lzip"};if(this.checkString("fLaC"))return{ext:"flac",mime:"audio/flac"};if(this.check([66,80,71,251]))return{ext:"bpg",mime:"image/bpg"};if(this.checkString("wvpk"))return{ext:"wv",mime:"audio/wavpack"};if(this.checkString("%PDF"))return{ext:"pdf",mime:"application/pdf"};if(this.check([0,97,115,109]))return{ext:"wasm",mime:"application/wasm"};if(this.check([73,73])){let e=await this.readTiffHeader(!1);if(e)return e}if(this.check([77,77])){let e=await this.readTiffHeader(!0);if(e)return e}if(this.checkString("MAC "))return{ext:"ape",mime:"audio/ape"};if(this.check([26,69,223,163])){async function t(){let t=await e.peekNumber(q),i=128,r=0;for(;(t&i)==0&&0!==i;)++r,i>>=1;let n=new Uint8Array(r+1);return await eJ(e,n,void 0,{maximumLength:n.length,reason:"EBML field"}),n}async function i(){let e=await t(),i=await t();i[0]^=128>>i.length-1;let r=Math.min(6,i.length),n=new DataView(e.buffer),s=new DataView(i.buffer,i.length-r,r);return{id:eg(n),len:eg(s)}}async function r(t){let r=0;for(;t>0;){if(++r>e_||ta(e,s,eB))return;let n=e.position,a=await i();if(17026===a.id){if(a.len>eN)return;let t=eY(a.len,eN,"EBML DocType");return(await e.readToken(new K(t))).replaceAll(/\00.*$/g,"")}if(ts(e)&&(!Number.isFinite(a.len)||a.len<0||a.len>eD)||(await eW(e,a.len,{maximumLength:ts(e)?eD:e.fileInfo.size,reason:"EBML payload"}),--t,e.position<=n))return}}let n=await i(),s=e.position;switch(await r(n.len)){case"webm":return{ext:"webm",mime:"video/webm"};case"matroska":return{ext:"mkv",mime:"video/matroska"};default:return}}if(this.checkString("SQLi"))return{ext:"sqlite",mime:"application/x-sqlite3"};if(this.check([78,69,83,26]))return{ext:"nes",mime:"application/x-nintendo-nes-rom"};if(this.checkString("Cr24"))return{ext:"crx",mime:"application/x-google-chrome-extension"};if(this.checkString("MSCF")||this.checkString("ISc("))return{ext:"cab",mime:"application/vnd.ms-cab-compressed"};if(this.check([237,171,238,219]))return{ext:"rpm",mime:"application/x-rpm"};if(this.check([197,208,211,198]))return{ext:"eps",mime:"application/eps"};if(this.check([40,181,47,253]))return{ext:"zst",mime:"application/zstd"};if(this.check([127,69,76,70]))return{ext:"elf",mime:"application/x-elf"};if(this.check([33,66,68,78]))return{ext:"pst",mime:"application/vnd.ms-outlook"};if(this.checkString("PAR1")||this.checkString("PARE"))return{ext:"parquet",mime:"application/vnd.apache.parquet"};if(this.checkString("ttcf"))return{ext:"ttc",mime:"font/collection"};if(this.check([254,237,250,206])||this.check([254,237,250,207])||this.check([206,250,237,254])||this.check([207,250,237,254]))return{ext:"macho",mime:"application/x-mach-binary"};if(this.check([4,34,77,24]))return{ext:"lz4",mime:"application/x-lz4"};if(this.checkString("regf"))return{ext:"dat",mime:"application/x-ft-windows-registry-hive"};if(this.checkString("$FL2")||this.checkString("$FL3"))return{ext:"sav",mime:"application/x-spss-sav"};if(this.check([79,84,84,79,0]))return{ext:"otf",mime:"font/otf"};if(this.checkString("#!AMR"))return{ext:"amr",mime:"audio/amr"};if(this.checkString("{\\rtf"))return{ext:"rtf",mime:"application/rtf"};if(this.check([70,76,86,1]))return{ext:"flv",mime:"video/x-flv"};if(this.checkString("IMPM"))return{ext:"it",mime:"audio/x-it"};if(this.checkString("-lh0-",{offset:2})||this.checkString("-lh1-",{offset:2})||this.checkString("-lh2-",{offset:2})||this.checkString("-lh3-",{offset:2})||this.checkString("-lh4-",{offset:2})||this.checkString("-lh5-",{offset:2})||this.checkString("-lh6-",{offset:2})||this.checkString("-lh7-",{offset:2})||this.checkString("-lzs-",{offset:2})||this.checkString("-lz4-",{offset:2})||this.checkString("-lz5-",{offset:2})||this.checkString("-lhd-",{offset:2}))return{ext:"lzh",mime:"application/x-lzh-compressed"};if(this.check([0,0,1,186])){if(this.check([33],{offset:4,mask:[241]}))return{ext:"mpg",mime:"video/MP1S"};if(this.check([68],{offset:4,mask:[196]}))return{ext:"mpg",mime:"video/MP2P"}}if(this.checkString("ITSF"))return{ext:"chm",mime:"application/vnd.ms-htmlhelp"};if(this.check([202,254,186,190])){let e=Y.get(this.buffer,4),t=V.get(this.buffer,6);if(e>0&&e<=30)return{ext:"macho",mime:"application/x-mach-binary"};if(t>30)return{ext:"class",mime:"application/java-vm"}}if(this.checkString(".RMF"))return{ext:"rm",mime:"application/vnd.rn-realmedia"};if(this.checkString("DRACO"))return{ext:"drc",mime:"application/vnd.google.draco"};if(this.check([253,55,122,88,90,0]))return{ext:"xz",mime:"application/x-xz"};if(this.checkString("<?xml "))return{ext:"xml",mime:"application/xml"};if(this.check([55,122,188,175,39,28]))return{ext:"7z",mime:"application/x-7z-compressed"};if(this.check([82,97,114,33,26,7])&&(0===this.buffer[6]||1===this.buffer[6]))return{ext:"rar",mime:"application/x-rar-compressed"};if(this.checkString("solid "))return{ext:"stl",mime:"model/stl"};if(this.checkString("AC")){let e=new K(4,"latin1").get(this.buffer,2);if(e.match("^d*")&&e>=1e3&&e<=1050)return{ext:"dwg",mime:"image/vnd.dwg"}}if(this.checkString("070707"))return{ext:"cpio",mime:"application/x-cpio"};if(this.checkString("BLENDER"))return{ext:"blend",mime:"application/x-blender"};if(this.checkString("!<arch>"))return(await e.ignore(8),"debian-binary"===await e.readToken(new K(13,"ascii")))?{ext:"deb",mime:"application/x-deb"}:{ext:"ar",mime:"application/x-unix-archive"};if(this.checkString("WEBVTT")&&["\n","\r"," "," ","\0"].some(e=>this.checkString(e,{offset:6})))return{ext:"vtt",mime:"text/vtt"};if(this.check([137,80,78,71,13,10,26,10])){let t={ext:"png",mime:"image/png"},i={ext:"apng",mime:"image/apng"};async function n(){return{length:await e.readToken(W),type:await e.readToken(new K(4,"latin1"))}}await e.ignore(8);let r=ts(e),s=e.position,a=0,o=!1;do{if(++a>eR||ta(e,s,eL))break;let c=e.position,d=await n();if(d.length<0)return;if("IHDR"===d.type){if(13!==d.length)return;o=!0}switch(d.type){case"IDAT":return t;case"acTL":return i;default:if(!o&&"CgBI"!==d.type)return;if(r&&d.length>eU)return o&&e2(d.type)?t:void 0;try{await eW(e,d.length+4,{maximumLength:r?eU+4:e.fileInfo.size,reason:"PNG chunk payload"})}catch(e){if(!r&&(e instanceof eV||e instanceof l))return t;throw e}}if(e.position<=c)break}while(e.position+8<e.fileInfo.size)return t}if(this.check([65,82,82,79,87,49,0,0]))return{ext:"arrow",mime:"application/vnd.apache.arrow.file"};if(this.check([103,108,84,70,2,0,0,0]))return{ext:"glb",mime:"model/gltf-binary"};if(this.check([102,114,101,101],{offset:4})||this.check([109,100,97,116],{offset:4})||this.check([109,111,111,118],{offset:4})||this.check([119,105,100,101],{offset:4}))return{ext:"mov",mime:"video/quicktime"};if(this.check([73,73,82,79,8,0,0,0,24]))return{ext:"orf",mime:"image/x-olympus-orf"};if(this.checkString("gimp xcf "))return{ext:"xcf",mime:"image/x-xcf"};if(this.checkString("ftyp",{offset:4})&&(96&this.buffer[8])!=0){let e=new K(4,"latin1").get(this.buffer,8).replace("\0"," ").trim();switch(e){case"avif":case"avis":return{ext:"avif",mime:"image/avif"};case"mif1":return{ext:"heic",mime:"image/heif"};case"msf1":return{ext:"heic",mime:"image/heif-sequence"};case"heic":case"heix":return{ext:"heic",mime:"image/heic"};case"hevc":case"hevx":return{ext:"heic",mime:"image/heic-sequence"};case"qt":return{ext:"mov",mime:"video/quicktime"};case"M4V":case"M4VH":case"M4VP":return{ext:"m4v",mime:"video/x-m4v"};case"M4P":return{ext:"m4p",mime:"video/mp4"};case"M4B":return{ext:"m4b",mime:"audio/mp4"};case"M4A":return{ext:"m4a",mime:"audio/x-m4a"};case"F4V":return{ext:"f4v",mime:"video/mp4"};case"F4P":return{ext:"f4p",mime:"video/mp4"};case"F4A":return{ext:"f4a",mime:"audio/mp4"};case"F4B":return{ext:"f4b",mime:"audio/mp4"};case"crx":return{ext:"cr3",mime:"image/x-canon-cr3"};default:if(e.startsWith("3g")){if(e.startsWith("3g2"))return{ext:"3g2",mime:"video/3gpp2"};return{ext:"3gp",mime:"video/3gpp"}}return{ext:"mp4",mime:"video/mp4"}}}if(this.checkString("REGEDIT4\r\n"))return{ext:"reg",mime:"application/x-ms-regedit"};if(this.check([82,73,70,70])){if(this.checkString("WEBP",{offset:8}))return{ext:"webp",mime:"image/webp"};if(this.check([65,86,73],{offset:8}))return{ext:"avi",mime:"video/vnd.avi"};if(this.check([87,65,86,69],{offset:8}))return{ext:"wav",mime:"audio/wav"};if(this.check([81,76,67,77],{offset:8}))return{ext:"qcp",mime:"audio/qcelp"}}if(this.check([73,73,85,0,24,0,0,0,136,231,116,216]))return{ext:"rw2",mime:"image/x-panasonic-rw2"};if(this.check([48,38,178,117,142,102,207,17,166,217])){let t=!1;try{async function s(){let t=new Uint8Array(16);return await eJ(e,t,void 0,{maximumLength:t.length,reason:"ASF header GUID"}),{id:t,size:Number(await e.readToken(J))}}await eW(e,30,{maximumLength:30,reason:"ASF header prelude"});let i=ts(e),r=e.position,n=0;for(;e.position+24<e.fileInfo.size&&!(++n>eF||ta(e,r,eB));){let r=e.position,n=await s(),a=n.size-24;if(!Number.isFinite(a)||a<0){t=!0;break}if(te(n.id,[145,7,220,183,183,169,207,17,142,230,0,192,12,32,83,101])){let t=new Uint8Array(16);if(a-=await eJ(e,t,void 0,{maximumLength:t.length,reason:"ASF stream type GUID"}),te(t,[64,158,105,248,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"audio/x-ms-asf"};if(te(t,[192,239,25,188,77,91,207,17,168,253,0,128,95,92,68,43]))return{ext:"asf",mime:"video/x-ms-asf"};break}if(i&&a>eP||(await eW(e,a,{maximumLength:i?eP:e.fileInfo.size,reason:"ASF header payload"}),e.position<=r)){t=!0;break}}}catch(i){if(i instanceof l||i instanceof eV)ts(e)&&(t=!0);else throw i}if(t)return;return{ext:"asf",mime:"application/vnd.ms-asf"}}if(this.check([171,75,84,88,32,49,49,187,13,10,26,10]))return{ext:"ktx",mime:"image/ktx"};if((this.check([126,16,4])||this.check([126,24,4]))&&this.check([48,77,73,69],{offset:4}))return{ext:"mie",mime:"application/x-mie"};if(this.check([39,10,0,0,0,0,0,0,0,0,0,0],{offset:2}))return{ext:"shp",mime:"application/x-esri-shape"};if(this.check([255,79,255,81]))return{ext:"j2c",mime:"image/j2c"};if(this.check([0,0,0,12,106,80,32,32,13,10,135,10]))switch(await e.ignore(20),await e.readToken(new K(4,"ascii"))){case"jp2 ":return{ext:"jp2",mime:"image/jp2"};case"jpx ":return{ext:"jpx",mime:"image/jpx"};case"jpm ":return{ext:"jpm",mime:"image/jpm"};case"mjp2":return{ext:"mj2",mime:"image/mj2"};default:return}if(this.check([255,10])||this.check([0,0,0,12,74,88,76,32,13,10,135,10]))return{ext:"jxl",mime:"image/jxl"};if(this.check([254,255]))return this.checkString("<?xml ",{offset:2,encoding:"utf-16be"})?{ext:"xml",mime:"application/xml"}:void 0;if(this.check([208,207,17,224,161,177,26,225]))return{ext:"cfb",mime:"application/x-cfb"};if(await e.peekBuffer(this.buffer,{length:Math.min(256,e.fileInfo.size),mayBeLess:!0}),this.check([97,99,115,112],{offset:36}))return{ext:"icc",mime:"application/vnd.iccprofile"};if(this.checkString("**ACE",{offset:7})&&this.checkString("**",{offset:12}))return{ext:"ace",mime:"application/x-ace-compressed"};if(this.checkString("BEGIN:")){if(this.checkString("VCARD",{offset:6}))return{ext:"vcf",mime:"text/vcard"};if(this.checkString("VCALENDAR",{offset:6}))return{ext:"ics",mime:"text/calendar"}}if(this.checkString("FUJIFILMCCD-RAW"))return{ext:"raf",mime:"image/x-fujifilm-raf"};if(this.checkString("Extended Module:"))return{ext:"xm",mime:"audio/x-xm"};if(this.checkString("Creative Voice File"))return{ext:"voc",mime:"audio/x-voc"};if(this.check([4,0,0,0])&&this.buffer.length>=16){let e=new DataView(this.buffer.buffer).getUint32(12,!0);if(e>12&&this.buffer.length>=e+16)try{let t=new TextDecoder().decode(this.buffer.subarray(16,e+16));if(JSON.parse(t).files)return{ext:"asar",mime:"application/x-asar"}}catch{}}if(this.check([6,14,43,52,2,5,1,1,13,1,2,1,1,2]))return{ext:"mxf",mime:"application/mxf"};if(this.checkString("SCRM",{offset:44}))return{ext:"s3m",mime:"audio/x-s3m"};if(this.check([71])&&this.check([71],{offset:188})||this.check([71],{offset:4})&&this.check([71],{offset:196}))return{ext:"mts",mime:"video/mp2t"};if(this.check([66,79,79,75,77,79,66,73],{offset:60}))return{ext:"mobi",mime:"application/x-mobipocket-ebook"};if(this.check([68,73,67,77],{offset:128}))return{ext:"dcm",mime:"application/dicom"};if(this.check([76,0,0,0,1,20,2,0,0,0,0,0,192,0,0,0,0,0,0,70]))return{ext:"lnk",mime:"application/x.ms.shortcut"};if(this.check([98,111,111,107,0,0,0,0,109,97,114,107,0,0,0,0]))return{ext:"alias",mime:"application/x.apple.alias"};if(this.checkString("Kaydara FBX Binary \0"))return{ext:"fbx",mime:"application/x.autodesk.fbx"};if(this.check([76,80],{offset:34})&&(this.check([0,0,1],{offset:8})||this.check([1,0,2],{offset:8})||this.check([2,0,2],{offset:8})))return{ext:"eot",mime:"application/vnd.ms-fontobject"};if(this.check([6,6,237,245,216,29,70,229,189,49,239,231,254,116,183,29]))return{ext:"indd",mime:"application/x-indesign"};if(this.check([255,255,0,0,7,0,0,0,4,0,0,0,1,0,1,0])||this.check([0,0,255,255,0,0,0,7,0,0,0,4,0,1,0,1]))return{ext:"jmp",mime:"application/x-jmp-data"};if(await e.peekBuffer(this.buffer,{length:Math.min(512,e.fileInfo.size),mayBeLess:!0}),this.checkString("ustar",{offset:257})&&(this.checkString("\0",{offset:262})||this.checkString(" ",{offset:262}))||this.check([0,0,0,0,0,0],{offset:257})&&ey(this.buffer))return{ext:"tar",mime:"application/x-tar"};if(this.check([255,254])){let e="utf-16le";return this.checkString("<?xml ",{offset:2,encoding:e})?{ext:"xml",mime:"application/xml"}:this.check([255,14],{offset:2})&&this.checkString("SketchUp Model",{offset:4,encoding:e})?{ext:"skp",mime:"application/vnd.sketchup.skp"}:this.checkString("Windows Registry Editor Version 5.00\r\n",{offset:2,encoding:e})?{ext:"reg",mime:"application/x-ms-regedit"}:void 0}if(this.checkString("-----BEGIN PGP MESSAGE-----"))return{ext:"pgp",mime:"application/pgp-encrypted"}};detectImprecise=async e=>{this.buffer=new Uint8Array(eE);let t=tn(e.fileInfo.size);if(await e.peekBuffer(this.buffer,{length:Math.min(8,t),mayBeLess:!0}),this.check([0,0,1,186])||this.check([0,0,1,179]))return{ext:"mpg",mime:"video/mpeg"};if(this.check([0,1,0,0,0]))return{ext:"ttf",mime:"font/ttf"};if(this.check([0,0,1,0]))return{ext:"ico",mime:"image/x-icon"};if(this.check([0,0,2,0]))return{ext:"cur",mime:"image/x-icon"};if(await e.peekBuffer(this.buffer,{length:Math.min(2+this.options.mpegOffsetTolerance,t),mayBeLess:!0}),this.buffer.length>=2+this.options.mpegOffsetTolerance)for(let e=0;e<=this.options.mpegOffsetTolerance;++e){let t=this.scanMpeg(e);if(t)return t}};async readTiffTag(e){let t=await this.tokenizer.readToken(e?V:z);switch(await this.tokenizer.ignore(10),t){case 50341:return{ext:"arw",mime:"image/x-sony-arw"};case 50706:return{ext:"dng",mime:"image/x-adobe-dng"}}}async readTiffIFD(e){let t=await this.tokenizer.readToken(e?V:z);if(!(t>eM)&&(!ts(this.tokenizer)||!(2+12*t>ej)))for(let i=0;i<t;++i){let t=await this.readTiffTag(e);if(t)return t}}async readTiffHeader(e){let t={ext:"tif",mime:"image/tiff"},i=(e?V:z).get(this.buffer,2),r=(e?Y:G).get(this.buffer,4);if(42===i){let i;if(r>=6){if(this.checkString("CR",{offset:8}))return{ext:"cr2",mime:"image/x-canon-cr2"};if(r>=8){let t=(e?V:z).get(this.buffer,8),i=(e?V:z).get(this.buffer,10);if(28===t&&254===i||31===t&&11===i)return{ext:"nef",mime:"image/x-nikon-nef"}}}if(ts(this.tokenizer)&&r>e$)return t;let n=ts(this.tokenizer)?ej:this.tokenizer.fileInfo.size;try{await eW(this.tokenizer,r,{maximumLength:n,reason:"TIFF IFD offset"})}catch(e){if(e instanceof l)return;throw e}try{i=await this.readTiffIFD(e)}catch(e){if(e instanceof l)return;throw e}return i??t}if(43===i)return t}scanMpeg(e){if(this.check([255,224],{offset:e,mask:[255,224]})){if(this.check([16],{offset:e+1,mask:[22]}))return this.check([8],{offset:e+1,mask:[8]}),{ext:"aac",mime:"audio/aac"};if(this.check([2],{offset:e+1,mask:[6]}))return{ext:"mp3",mime:"audio/mpeg"};if(this.check([4],{offset:e+1,mask:[6]}))return{ext:"mp2",mime:"audio/mpeg"};if(this.check([6],{offset:e+1,mask:[6]}))return{ext:"mp1",mime:"audio/mpeg"}}}}function tf(e){return e instanceof RangeError&&"offset is out of bounds"===e.message&&"string"==typeof e.stack&&/strtok3[/\\]lib[/\\]stream[/\\]/.test(e.stack)}e.s(["FileTypeParser",()=>tp,"fileTypeFromBuffer",()=>e6,"normalizeSampleSize",()=>tt,"reasonableDetectionSizeInBytes",0,eE],799811);class tg extends tp{async fromStream(e){this.options.signal?.throwIfAborted();let t=await (e instanceof i.ReadableStream?this.createTokenizerFromWebStream(e):S(e,this.getTokenizerOptions()));try{return await super.fromTokenizer(t)}catch(e){if(tf(e))return;throw e}finally{e instanceof r.Readable&&!e.destroyed&&e.destroy()}}async fromFile(e){this.options.signal?.throwIfAborted();let t=await n.default.open(e,s.constants.O_RDONLY|s.constants.O_NONBLOCK),i=await t.stat();if(!i.isFile())return void await t.close();let r=new x(t,{...this.getTokenizerOptions(),fileInfo:{path:e,size:i.size}});return super.fromTokenizer(r)}async toDetectionStream(e,t={}){if(!(e instanceof r.Readable))return super.toDetectionStream(e,t);let{sampleSize:i=eE}=t,{signal:n}=this.options,s=tt(i);return n?.throwIfAborted(),new Promise((t,i)=>{let a=!1,o=()=>{e.off("error",d),e.off("readable",h),n?.removeEventListener("abort",u)},c=(e,t)=>{a||(a=!0,o(),e(t))},d=e=>{c(i,e)},u=()=>{e.destroyed||e.destroy(),c(i,n.reason)},h=()=>{(async()=>{try{let n=new r.PassThrough,a=r.pipeline?(0,r.pipeline)(e,n,()=>{}):e.pipe(n),o=e.read(s)??e.read()??new Uint8Array(0);try{n.fileType=await this.fromBuffer(o)}catch(e){e instanceof l?n.fileType=void 0:c(i,e)}c(t,a)}catch(e){c(i,e)}})()};e.on("error",d),e.once("readable",h),n?.addEventListener("abort",u,{once:!0})})}}async function tm(e,t){return new tg(t).fromFile(e,t)}e.s(["fileTypeFromFile",()=>tm],192516)},132659,e=>{"use strict";let t={css:"text/css",csv:"text/csv",htm:"text/html",html:"text/html",js:"application/javascript",json:"application/json",md:"text/markdown",svg:"image/svg+xml",xml:"application/xml",yml:"application/x-yaml"},i=e=>{let i=e.split(".").pop()||"txt";return{ext:i,mime:t[i]||"text/plain"}};e.s(["getFileTypeFallback",0,i])},473466,(e,t,i)=>{"use strict";function r(e){for(var t=e.map(n).sort(o),i=0,r=1;r<t.length;r++){var l=t[r],c=t[i];l.start>c.end+1?t[++i]=l:l.end>c.end&&(c.end=l.end,c.index=Math.min(c.index,l.index))}t.length=i+1;var d=t.sort(a).map(s);return d.type=e.type,d}function n(e,t){return{start:e.start,end:e.end,index:t}}function s(e){return{start:e.start,end:e.end}}function a(e,t){return e.index-t.index}function o(e,t){return e.start-t.start}t.exports=function e(e,t,i){if("string"!=typeof t)throw TypeError("argument str must be a string");var n=t.indexOf("=");if(-1===n)return -2;var s=t.slice(n+1).split(","),a=[];a.type=t.slice(0,n);for(var o=0;o<s.length;o++){var l=s[o].split("-"),c=parseInt(l[0],10),d=parseInt(l[1],10);isNaN(c)?(c=e-d,d=e-1):isNaN(d)&&(d=e-1),d>e-1&&(d=e-1),isNaN(c)||isNaN(d)||c>d||c<0||a.push({start:c,end:d})}return a.length<1?-1:i&&i.combine?r(a):a}},902525,(e,t,i)=>{!function(e){"use strict";let i="(0?\\d+|0x[a-f0-9]+)",r={fourOctet:RegExp(`^${i}\\.${i}\\.${i}\\.${i}$`,"i"),threeOctet:RegExp(`^${i}\\.${i}\\.${i}$`,"i"),twoOctet:RegExp(`^${i}\\.${i}$`,"i"),longValue:RegExp(`^${i}$`,"i")},n=RegExp("^0[0-7]+$","i"),s=RegExp("^0x[a-f0-9]+$","i"),a="%[0-9a-z]{1,}",o="(?:[0-9a-f]+::?)+",l={zoneIndex:RegExp(a,"i"),native:RegExp(`^(::)?(${o})?([0-9a-f]+)?(::)?(${a})?$`,"i"),deprecatedTransitional:RegExp(`^(?:::)(${i}\\.${i}\\.${i}\\.${i}(${a})?)$`,"i"),transitional:RegExp(`^((?:${o})|(?:::)(?:${o})?)${i}\\.${i}\\.${i}\\.${i}(${a})?$`,"i")};function c(e,t){let i,r;if(e.indexOf("::")!==e.lastIndexOf("::"))return null;let n=0,s=-1,a=(e.match(l.zoneIndex)||[])[0];for(a&&(a=a.substring(1),e=e.replace(/%.+$/,""));(s=e.indexOf(":",s+1))>=0;)n++;if("::"===e.substr(0,2)&&n--,"::"===e.substr(-2,2)&&n--,n>t)return null;for(r=t-n,i=":";r--;)i+="0:";return":"===(e=e.replace("::",i))[0]&&(e=e.slice(1)),":"===e[e.length-1]&&(e=e.slice(0,-1)),{parts:t=function(){let t=e.split(":"),i=[];for(let e=0;e<t.length;e++)i.push(parseInt(t[e],16));return i}(),zoneId:a}}function d(e,t,i,r){let n;if(e.length!==t.length)throw Error("ipaddr: cannot match CIDR for objects with different lengths");let s=0;for(;r>0;){if((n=i-r)<0&&(n=0),e[s]>>n!=t[s]>>n)return!1;r-=i,s+=1}return!0}function u(e){if(s.test(e))return parseInt(e,16);if("0"===e[0]&&!isNaN(parseInt(e[1],10))){if(n.test(e))return parseInt(e,8);throw Error(`ipaddr: cannot parse ${e} as octal`)}return parseInt(e,10)}function h(e,t){for(;e.length<t;)e=`0${e}`;return e}let A={};A.IPv4=function(){function e(e){let t,i;if(4!==e.length)throw Error("ipaddr: ipv4 octet count should be 4");for(t=0;t<e.length;t++)if(!(0<=(i=e[t])&&i<=255))throw Error("ipaddr: ipv4 octet should fit in 8 bits");this.octets=e}return e.prototype.SpecialRanges={unspecified:[[new e([0,0,0,0]),8]],broadcast:[[new e([255,255,255,255]),32]],multicast:[[new e([224,0,0,0]),4]],linkLocal:[[new e([169,254,0,0]),16]],loopback:[[new e([127,0,0,0]),8]],carrierGradeNat:[[new e([100,64,0,0]),10]],private:[[new e([10,0,0,0]),8],[new e([172,16,0,0]),12],[new e([192,168,0,0]),16]],reserved:[[new e([192,0,0,0]),24],[new e([192,0,2,0]),24],[new e([192,88,99,0]),24],[new e([198,18,0,0]),15],[new e([198,51,100,0]),24],[new e([203,0,113,0]),24],[new e([240,0,0,0]),4]],as112:[[new e([192,175,48,0]),24],[new e([192,31,196,0]),24]],amt:[[new e([192,52,193,0]),24]]},e.prototype.kind=function(){return"ipv4"},e.prototype.match=function(e,t){let i;if(void 0===t&&(e=(i=e)[0],t=i[1]),"ipv4"!==e.kind())throw Error("ipaddr: cannot match ipv4 address with non-ipv4 one");return d(this.octets,e.octets,8,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e,t,i,r=0,n=!1,s={0:8,128:7,192:6,224:5,240:4,248:3,252:2,254:1,255:0};for(e=3;e>=0;e-=1){if(!((t=this.octets[e])in s)||(i=s[t],n&&0!==i))return null;8!==i&&(n=!0),r+=i}return 32-r},e.prototype.range=function(){return A.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){return this.octets.slice(0)},e.prototype.toIPv4MappedAddress=function(){return A.IPv6.parse(`::ffff:${this.toString()}`)},e.prototype.toNormalizedString=function(){return this.toString()},e.prototype.toString=function(){return this.octets.join(".")},e}(),A.IPv4.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),i=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[],s=0;for(;s<4;)n.push(parseInt(i[s],10)|255^parseInt(r[s],10)),s++;return new this(n)}catch(e){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},A.IPv4.isIPv4=function(e){return null!==this.parser(e)},A.IPv4.isValid=function(e){try{return new this(this.parser(e)),!0}catch(e){return!1}},A.IPv4.isValidCIDR=function(e){try{return this.parseCIDR(e),!0}catch(e){return!1}},A.IPv4.isValidFourPartDecimal=function(e){return!!(A.IPv4.isValid(e)&&e.match(/^(0|[1-9]\d*)(\.(0|[1-9]\d*)){3}$/))},A.IPv4.networkAddressFromCIDR=function(e){let t,i,r,n,s;try{for(r=(t=this.parseCIDR(e))[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[],i=0;i<4;)n.push(parseInt(r[i],10)&parseInt(s[i],10)),i++;return new this(n)}catch(e){throw Error("ipaddr: the address does not have IPv4 CIDR format")}},A.IPv4.parse=function(e){let t=this.parser(e);if(null===t)throw Error("ipaddr: string is not formatted like an IPv4 Address");return new this(t)},A.IPv4.parseCIDR=function(e){let t;if(t=e.match(/^(.+)\/(\d+)$/)){let e=parseInt(t[2]);if(e>=0&&e<=32){let i=[this.parse(t[1]),e];return Object.defineProperty(i,"toString",{value:function(){return this.join("/")}}),i}}throw Error("ipaddr: string is not formatted like an IPv4 CIDR range")},A.IPv4.parser=function(e){let t,i;if(t=e.match(r.fourOctet))return function(){let e=t.slice(1,6),i=[];for(let t=0;t<e.length;t++)i.push(u(e[t]));return i}();if(t=e.match(r.longValue)){if((i=u(t[1]))>0xffffffff||i<0)throw Error("ipaddr: address outside defined range");return(function(){let e,t=[];for(e=0;e<=24;e+=8)t.push(i>>e&255);return t})().reverse()}return(t=e.match(r.twoOctet))?function(){let e=t.slice(1,4),r=[];if((i=u(e[1]))>0xffffff||i<0)throw Error("ipaddr: address outside defined range");return r.push(u(e[0])),r.push(i>>16&255),r.push(i>>8&255),r.push(255&i),r}():(t=e.match(r.threeOctet))?function(){let e=t.slice(1,5),r=[];if((i=u(e[2]))>65535||i<0)throw Error("ipaddr: address outside defined range");return r.push(u(e[0])),r.push(u(e[1])),r.push(i>>8&255),r.push(255&i),r}():null},A.IPv4.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>32)throw Error("ipaddr: invalid IPv4 prefix length");let t=[0,0,0,0],i=0,r=Math.floor(e/8);for(;i<r;)t[i]=255,i++;return r<4&&(t[r]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},A.IPv6=function(){function e(e,t){let i,r;if(16===e.length)for(i=0,this.parts=[];i<=14;i+=2)this.parts.push(e[i]<<8|e[i+1]);else if(8===e.length)this.parts=e;else throw Error("ipaddr: ipv6 part count should be 8 or 16");for(i=0;i<this.parts.length;i++)if(!(0<=(r=this.parts[i])&&r<=65535))throw Error("ipaddr: ipv6 part should fit in 16 bits");t&&(this.zoneId=t)}return e.prototype.SpecialRanges={unspecified:[new e([0,0,0,0,0,0,0,0]),128],linkLocal:[new e([65152,0,0,0,0,0,0,0]),10],multicast:[new e([65280,0,0,0,0,0,0,0]),8],loopback:[new e([0,0,0,0,0,0,0,1]),128],uniqueLocal:[new e([64512,0,0,0,0,0,0,0]),7],ipv4Mapped:[new e([0,0,0,0,0,65535,0,0]),96],discard:[new e([256,0,0,0,0,0,0,0]),64],rfc6145:[new e([0,0,0,0,65535,0,0,0]),96],rfc6052:[new e([100,65435,0,0,0,0,0,0]),96],"6to4":[new e([8194,0,0,0,0,0,0,0]),16],teredo:[new e([8193,0,0,0,0,0,0,0]),32],benchmarking:[new e([8193,2,0,0,0,0,0,0]),48],amt:[new e([8193,3,0,0,0,0,0,0]),32],as112v6:[[new e([8193,4,274,0,0,0,0,0]),48],[new e([9760,79,32768,0,0,0,0,0]),48]],deprecated:[new e([8193,16,0,0,0,0,0,0]),28],orchid2:[new e([8193,32,0,0,0,0,0,0]),28],droneRemoteIdProtocolEntityTags:[new e([8193,48,0,0,0,0,0,0]),28],reserved:[[new e([8193,0,0,0,0,0,0,0]),23],[new e([8193,3512,0,0,0,0,0,0]),32]]},e.prototype.isIPv4MappedAddress=function(){return"ipv4Mapped"===this.range()},e.prototype.kind=function(){return"ipv6"},e.prototype.match=function(e,t){let i;if(void 0===t&&(e=(i=e)[0],t=i[1]),"ipv6"!==e.kind())throw Error("ipaddr: cannot match ipv6 address with non-ipv6 one");return d(this.parts,e.parts,16,t)},e.prototype.prefixLengthFromSubnetMask=function(){let e,t,i=0,r=!1,n={0:16,32768:15,49152:14,57344:13,61440:12,63488:11,64512:10,65024:9,65280:8,65408:7,65472:6,65504:5,65520:4,65528:3,65532:2,65534:1,65535:0};for(let s=7;s>=0;s-=1){if(!((e=this.parts[s])in n)||(t=n[e],r&&0!==t))return null;16!==t&&(r=!0),i+=t}return 128-i},e.prototype.range=function(){return A.subnetMatch(this,this.SpecialRanges)},e.prototype.toByteArray=function(){let e,t=[],i=this.parts;for(let r=0;r<i.length;r++)t.push((e=i[r])>>8),t.push(255&e);return t},e.prototype.toFixedLengthString=function(){let e=(function(){let e=[];for(let t=0;t<this.parts.length;t++)e.push(h(this.parts[t].toString(16),4));return e}).call(this).join(":"),t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toIPv4Address=function(){if(!this.isIPv4MappedAddress())throw Error("ipaddr: trying to convert a generic ipv6 address to ipv4");let e=this.parts.slice(-2),t=e[0],i=e[1];return new A.IPv4([t>>8,255&t,i>>8,255&i])},e.prototype.toNormalizedString=function(){let e=(function(){let e=[];for(let t=0;t<this.parts.length;t++)e.push(this.parts[t].toString(16));return e}).call(this).join(":"),t="";return this.zoneId&&(t=`%${this.zoneId}`),e+t},e.prototype.toRFC5952String=function(){let e,t=/((^|:)(0(:|$)){2,})/g,i=this.toNormalizedString(),r=0,n=-1;for(;e=t.exec(i);)e[0].length>n&&(r=e.index,n=e[0].length);return n<0?i:`${i.substring(0,r)}::${i.substring(r+n)}`},e.prototype.toString=function(){return this.toRFC5952String()},e}(),A.IPv6.broadcastAddressFromCIDR=function(e){try{let t=this.parseCIDR(e),i=t[0].toByteArray(),r=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[],s=0;for(;s<16;)n.push(parseInt(i[s],10)|255^parseInt(r[s],10)),s++;return new this(n)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},A.IPv6.isIPv6=function(e){return null!==this.parser(e)},A.IPv6.isValid=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{let t=this.parser(e);return new this(t.parts,t.zoneId),!0}catch(e){return!1}},A.IPv6.isValidCIDR=function(e){if("string"==typeof e&&-1===e.indexOf(":"))return!1;try{return this.parseCIDR(e),!0}catch(e){return!1}},A.IPv6.networkAddressFromCIDR=function(e){let t,i,r,n,s;try{for(r=(t=this.parseCIDR(e))[0].toByteArray(),s=this.subnetMaskFromPrefixLength(t[1]).toByteArray(),n=[],i=0;i<16;)n.push(parseInt(r[i],10)&parseInt(s[i],10)),i++;return new this(n)}catch(e){throw Error(`ipaddr: the address does not have IPv6 CIDR format (${e})`)}},A.IPv6.parse=function(e){let t=this.parser(e);if(null===t.parts)throw Error("ipaddr: string is not formatted like an IPv6 Address");return new this(t.parts,t.zoneId)},A.IPv6.parseCIDR=function(e){let t,i,r;if((i=e.match(/^(.+)\/(\d+)$/))&&(t=parseInt(i[2]))>=0&&t<=128)return Object.defineProperty(r=[this.parse(i[1]),t],"toString",{value:function(){return this.join("/")}}),r;throw Error("ipaddr: string is not formatted like an IPv6 CIDR range")},A.IPv6.parser=function(e){let t,i,r,n,s,a;if(r=e.match(l.deprecatedTransitional))return this.parser(`::ffff:${r[1]}`);if(l.native.test(e))return c(e,8);if((r=e.match(l.transitional))&&(a=r[6]||"",t=r[1],r[1].endsWith("::")||(t=t.slice(0,-1)),(t=c(t+a,6)).parts)){for(i=0,s=[parseInt(r[2]),parseInt(r[3]),parseInt(r[4]),parseInt(r[5])];i<s.length;i++)if(!(0<=(n=s[i])&&n<=255))return null;return t.parts.push(s[0]<<8|s[1]),t.parts.push(s[2]<<8|s[3]),{parts:t.parts,zoneId:t.zoneId}}return null},A.IPv6.subnetMaskFromPrefixLength=function(e){if((e=parseInt(e))<0||e>128)throw Error("ipaddr: invalid IPv6 prefix length");let t=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],i=0,r=Math.floor(e/8);for(;i<r;)t[i]=255,i++;return r<16&&(t[r]=Math.pow(2,e%8)-1<<8-e%8),new this(t)},A.fromByteArray=function(e){let t=e.length;if(4===t)return new A.IPv4(e);if(16===t)return new A.IPv6(e);throw Error("ipaddr: the binary input is neither an IPv6 nor IPv4 address")},A.isValid=function(e){return A.IPv6.isValid(e)||A.IPv4.isValid(e)},A.isValidCIDR=function(e){return A.IPv6.isValidCIDR(e)||A.IPv4.isValidCIDR(e)},A.parse=function(e){if(A.IPv6.isValid(e))return A.IPv6.parse(e);if(A.IPv4.isValid(e))return A.IPv4.parse(e);throw Error("ipaddr: the address has neither IPv6 nor IPv4 format")},A.parseCIDR=function(e){try{return A.IPv6.parseCIDR(e)}catch(t){try{return A.IPv4.parseCIDR(e)}catch(e){throw Error("ipaddr: the address has neither IPv6 nor IPv4 CIDR format")}}},A.process=function(e){let t=this.parse(e);return"ipv6"===t.kind()&&t.isIPv4MappedAddress()?t.toIPv4Address():t},A.subnetMatch=function(e,t,i){let r,n,s,a;for(n in null==i&&(i="unicast"),t)if(Object.prototype.hasOwnProperty.call(t,n)){for(!(s=t[n])[0]||s[0]instanceof Array||(s=[s]),r=0;r<s.length;r++)if(a=s[r],e.kind()===a[0].kind()&&e.match.apply(e,a))return n}return i},t.exports?t.exports=A:e.ipaddr=A}(e.e)},954673,(e,t,i)=>{"use strict";t.exports={kClose:Symbol("close"),kDestroy:Symbol("destroy"),kDispatch:Symbol("dispatch"),kUrl:Symbol("url"),kWriting:Symbol("writing"),kResuming:Symbol("resuming"),kQueue:Symbol("queue"),kConnect:Symbol("connect"),kConnecting:Symbol("connecting"),kKeepAliveDefaultTimeout:Symbol("default keep alive timeout"),kKeepAliveMaxTimeout:Symbol("max keep alive timeout"),kKeepAliveTimeoutThreshold:Symbol("keep alive timeout threshold"),kKeepAliveTimeoutValue:Symbol("keep alive timeout"),kKeepAlive:Symbol("keep alive"),kHeadersTimeout:Symbol("headers timeout"),kBodyTimeout:Symbol("body timeout"),kServerName:Symbol("server name"),kLocalAddress:Symbol("local address"),kHost:Symbol("host"),kNoRef:Symbol("no ref"),kBodyUsed:Symbol("used"),kBody:Symbol("abstracted request body"),kRunning:Symbol("running"),kBlocking:Symbol("blocking"),kPending:Symbol("pending"),kSize:Symbol("size"),kBusy:Symbol("busy"),kQueued:Symbol("queued"),kFree:Symbol("free"),kConnected:Symbol("connected"),kClosed:Symbol("closed"),kNeedDrain:Symbol("need drain"),kReset:Symbol("reset"),kDestroyed:Symbol.for("nodejs.stream.destroyed"),kResume:Symbol("resume"),kOnError:Symbol("on error"),kMaxHeadersSize:Symbol("max headers size"),kRunningIdx:Symbol("running index"),kPendingIdx:Symbol("pending index"),kError:Symbol("error"),kClients:Symbol("clients"),kClient:Symbol("client"),kParser:Symbol("parser"),kOnDestroyed:Symbol("destroy callbacks"),kPipelining:Symbol("pipelining"),kSocket:Symbol("socket"),kHostHeader:Symbol("host header"),kConnector:Symbol("connector"),kStrictContentLength:Symbol("strict content length"),kMaxRedirections:Symbol("maxRedirections"),kMaxRequests:Symbol("maxRequestsPerClient"),kProxy:Symbol("proxy agent options"),kCounter:Symbol("socket request counter"),kMaxResponseSize:Symbol("max response size"),kHTTP2Session:Symbol("http2Session"),kHTTP2SessionState:Symbol("http2Session state"),kRetryHandlerDefaultRetry:Symbol("retry agent default retry"),kConstruct:Symbol("constructable"),kListeners:Symbol("listeners"),kHTTPContext:Symbol("http context"),kMaxConcurrentStreams:Symbol("max concurrent streams"),kHTTP2InitialWindowSize:Symbol("http2 initial window size"),kHTTP2ConnectionWindowSize:Symbol("http2 connection window size"),kEnableConnectProtocol:Symbol("http2session connect protocol"),kRemoteSettings:Symbol("http2session remote settings"),kHTTP2Stream:Symbol("http2session client stream"),kPingInterval:Symbol("ping interval"),kNoProxyAgent:Symbol("no proxy agent"),kHttpProxyAgent:Symbol("http proxy agent"),kHttpsProxyAgent:Symbol("https proxy agent"),kSocks5ProxyAgent:Symbol("socks5 proxy agent")}},469775,(e,t,i)=>{"use strict";let r,n=0,s=1e3,a=499,o=Symbol("kFastTimer"),l=[],c=-2,d=-1,u=0,h=1;function A(){n+=a;let e=0,t=l.length;for(;e<t;){let i=l[e];i._state===u?(i._idleStart=n-a,i._state=h):i._state===h&&n>=i._idleStart+i._idleTimeout&&(i._state=d,i._idleStart=-1,i._onTimeout(i._timerArg)),i._state===d?(i._state=c,0!=--t&&(l[e]=l[t])):++e}l.length=t,0!==l.length&&p()}function p(){r?.refresh?r.refresh():(clearTimeout(r),r=setTimeout(A,a),r?.unref())}class f{[o]=!0;_state=c;_idleTimeout=-1;_idleStart=-1;_onTimeout;_timerArg;constructor(e,t,i){this._onTimeout=e,this._idleTimeout=t,this._timerArg=i,this.refresh()}refresh(){this._state===c&&l.push(this),r&&1!==l.length||p(),this._state=u}clear(){this._state=d,this._idleStart=-1}}t.exports={setTimeout:(e,t,i)=>t<=s?setTimeout(e,t,i):new f(e,t,i),clearTimeout(e){e[o]?e.clear():clearTimeout(e)},setFastTimeout:(e,t,i)=>new f(e,t,i),clearFastTimeout(e){e.clear()},now:()=>n,tick(e=0){n+=e-s+1,A(),A()},reset(){n=0,l.length=0,clearTimeout(r),r=null},kFastTimer:o}},450178,(e,t,i)=>{"use strict";let r=Symbol.for("undici.error.UND_ERR");class n extends Error{constructor(e,t){super(e,t),this.name="UndiciError",this.code="UND_ERR"}static[Symbol.hasInstance](e){return e&&!0===e[r]}get[r](){return!0}}let s=Symbol.for("undici.error.UND_ERR_CONNECT_TIMEOUT");class a extends n{constructor(e){super(e),this.name="ConnectTimeoutError",this.message=e||"Connect Timeout Error",this.code="UND_ERR_CONNECT_TIMEOUT"}static[Symbol.hasInstance](e){return e&&!0===e[s]}get[s](){return!0}}let o=Symbol.for("undici.error.UND_ERR_HEADERS_TIMEOUT");class l extends n{constructor(e){super(e),this.name="HeadersTimeoutError",this.message=e||"Headers Timeout Error",this.code="UND_ERR_HEADERS_TIMEOUT"}static[Symbol.hasInstance](e){return e&&!0===e[o]}get[o](){return!0}}let c=Symbol.for("undici.error.UND_ERR_HEADERS_OVERFLOW");class d extends n{constructor(e){super(e),this.name="HeadersOverflowError",this.message=e||"Headers Overflow Error",this.code="UND_ERR_HEADERS_OVERFLOW"}static[Symbol.hasInstance](e){return e&&!0===e[c]}get[c](){return!0}}let u=Symbol.for("undici.error.UND_ERR_BODY_TIMEOUT");class h extends n{constructor(e){super(e),this.name="BodyTimeoutError",this.message=e||"Body Timeout Error",this.code="UND_ERR_BODY_TIMEOUT"}static[Symbol.hasInstance](e){return e&&!0===e[u]}get[u](){return!0}}let A=Symbol.for("undici.error.UND_ERR_INVALID_ARG");class p extends n{constructor(e){super(e),this.name="InvalidArgumentError",this.message=e||"Invalid Argument Error",this.code="UND_ERR_INVALID_ARG"}static[Symbol.hasInstance](e){return e&&!0===e[A]}get[A](){return!0}}let f=Symbol.for("undici.error.UND_ERR_INVALID_RETURN_VALUE");class g extends n{constructor(e){super(e),this.name="InvalidReturnValueError",this.message=e||"Invalid Return Value Error",this.code="UND_ERR_INVALID_RETURN_VALUE"}static[Symbol.hasInstance](e){return e&&!0===e[f]}get[f](){return!0}}let m=Symbol.for("undici.error.UND_ERR_ABORT");class y extends n{constructor(e){super(e),this.name="AbortError",this.message=e||"The operation was aborted",this.code="UND_ERR_ABORT"}static[Symbol.hasInstance](e){return e&&!0===e[m]}get[m](){return!0}}let b=Symbol.for("undici.error.UND_ERR_ABORTED");class E extends y{constructor(e){super(e),this.name="AbortError",this.message=e||"Request aborted",this.code="UND_ERR_ABORTED"}static[Symbol.hasInstance](e){return e&&!0===e[b]}get[b](){return!0}}let C=Symbol.for("undici.error.UND_ERR_INFO");class w extends n{constructor(e){super(e),this.name="InformationalError",this.message=e||"Request information",this.code="UND_ERR_INFO"}static[Symbol.hasInstance](e){return e&&!0===e[C]}get[C](){return!0}}let I=Symbol.for("undici.error.UND_ERR_REQ_CONTENT_LENGTH_MISMATCH");class v extends n{constructor(e){super(e),this.name="RequestContentLengthMismatchError",this.message=e||"Request body length does not match content-length header",this.code="UND_ERR_REQ_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&!0===e[I]}get[I](){return!0}}let B=Symbol.for("undici.error.UND_ERR_RES_CONTENT_LENGTH_MISMATCH");class Q extends n{constructor(e){super(e),this.name="ResponseContentLengthMismatchError",this.message=e||"Response body length does not match content-length header",this.code="UND_ERR_RES_CONTENT_LENGTH_MISMATCH"}static[Symbol.hasInstance](e){return e&&!0===e[B]}get[B](){return!0}}let x=Symbol.for("undici.error.UND_ERR_DESTROYED");class S extends n{constructor(e){super(e),this.name="ClientDestroyedError",this.message=e||"The client is destroyed",this.code="UND_ERR_DESTROYED"}static[Symbol.hasInstance](e){return e&&!0===e[x]}get[x](){return!0}}let k=Symbol.for("undici.error.UND_ERR_CLOSED");class T extends n{constructor(e){super(e),this.name="ClientClosedError",this.message=e||"The client is closed",this.code="UND_ERR_CLOSED"}static[Symbol.hasInstance](e){return e&&!0===e[k]}get[k](){return!0}}let N=Symbol.for("undici.error.UND_ERR_SOCKET");class D extends n{constructor(e,t){super(e),this.name="SocketError",this.message=e||"Socket error",this.code="UND_ERR_SOCKET",this.socket=t}static[Symbol.hasInstance](e){return e&&!0===e[N]}get[N](){return!0}}let _=Symbol.for("undici.error.UND_ERR_NOT_SUPPORTED");class R extends n{constructor(e){super(e),this.name="NotSupportedError",this.message=e||"Not supported error",this.code="UND_ERR_NOT_SUPPORTED"}static[Symbol.hasInstance](e){return e&&!0===e[_]}get[_](){return!0}}let L=Symbol.for("undici.error.UND_ERR_BPL_MISSING_UPSTREAM");class F extends n{constructor(e){super(e),this.name="MissingUpstreamError",this.message=e||"No upstream has been added to the BalancedPool",this.code="UND_ERR_BPL_MISSING_UPSTREAM"}static[Symbol.hasInstance](e){return e&&!0===e[L]}get[L](){return!0}}let M=Symbol.for("undici.error.UND_ERR_HTTP_PARSER");class O extends Error{constructor(e,t,i){super(e),this.name="HTTPParserError",this.code=t?`HPE_${t}`:void 0,this.data=i?i.toString():void 0}static[Symbol.hasInstance](e){return e&&!0===e[M]}get[M](){return!0}}let U=Symbol.for("undici.error.UND_ERR_RES_EXCEEDED_MAX_SIZE");class P extends n{constructor(e){super(e),this.name="ResponseExceededMaxSizeError",this.message=e||"Response content exceeded max size",this.code="UND_ERR_RES_EXCEEDED_MAX_SIZE"}static[Symbol.hasInstance](e){return e&&!0===e[U]}get[U](){return!0}}let $=Symbol.for("undici.error.UND_ERR_REQ_RETRY");class j extends n{constructor(e,t,{headers:i,data:r}){super(e),this.name="RequestRetryError",this.message=e||"Request retry error",this.code="UND_ERR_REQ_RETRY",this.statusCode=t,this.data=r,this.headers=i}static[Symbol.hasInstance](e){return e&&!0===e[$]}get[$](){return!0}}let H=Symbol.for("undici.error.UND_ERR_RESPONSE");class q extends n{constructor(e,t,{headers:i,body:r}){super(e),this.name="ResponseError",this.message=e||"Response error",this.code="UND_ERR_RESPONSE",this.statusCode=t,this.body=r,this.headers=i}static[Symbol.hasInstance](e){return e&&!0===e[H]}get[H](){return!0}}let z=Symbol.for("undici.error.UND_ERR_PRX_TLS");class V extends n{constructor(e,t,i={}){super(t,{cause:e,...i}),this.name="SecureProxyConnectionError",this.message=t||"Secure Proxy Connection failed",this.code="UND_ERR_PRX_TLS",this.cause=e}static[Symbol.hasInstance](e){return e&&!0===e[z]}get[z](){return!0}}let G=Symbol.for("undici.error.UND_ERR_MAX_ORIGINS_REACHED");class Y extends n{constructor(e){super(e),this.name="MaxOriginsReachedError",this.message=e||"Maximum allowed origins reached",this.code="UND_ERR_MAX_ORIGINS_REACHED"}static[Symbol.hasInstance](e){return e&&!0===e[G]}get[G](){return!0}}class W extends n{constructor(e,t){super(e),this.name="Socks5ProxyError",this.message=e||"SOCKS5 proxy error",this.code=t||"UND_ERR_SOCKS5"}}let J=Symbol.for("undici.error.UND_ERR_WS_MESSAGE_SIZE_EXCEEDED");class K extends n{constructor(e){super(e),this.name="MessageSizeExceededError",this.message=e||"Max decompressed message size exceeded",this.code="UND_ERR_WS_MESSAGE_SIZE_EXCEEDED"}static[Symbol.hasInstance](e){return e&&!0===e[J]}get[J](){return!0}}t.exports={AbortError:y,HTTPParserError:O,UndiciError:n,HeadersTimeoutError:l,HeadersOverflowError:d,BodyTimeoutError:h,RequestContentLengthMismatchError:v,ConnectTimeoutError:a,InvalidArgumentError:p,InvalidReturnValueError:g,RequestAbortedError:E,ClientDestroyedError:S,ClientClosedError:T,InformationalError:w,SocketError:D,NotSupportedError:R,ResponseContentLengthMismatchError:Q,BalancedPoolMissingUpstreamError:F,ResponseExceededMaxSizeError:P,RequestRetryError:j,ResponseError:q,SecureProxyConnectionError:V,MaxOriginsReachedError:Y,Socks5ProxyError:W,MessageSizeExceededError:K}},623057,(e,t,i)=>{"use strict";let r=["Accept","Accept-Encoding","Accept-Language","Accept-Ranges","Access-Control-Allow-Credentials","Access-Control-Allow-Headers","Access-Control-Allow-Methods","Access-Control-Allow-Origin","Access-Control-Expose-Headers","Access-Control-Max-Age","Access-Control-Request-Headers","Access-Control-Request-Method","Age","Allow","Alt-Svc","Alt-Used","Authorization","Cache-Control","Clear-Site-Data","Connection","Content-Disposition","Content-Encoding","Content-Language","Content-Length","Content-Location","Content-Range","Content-Security-Policy","Content-Security-Policy-Report-Only","Content-Type","Cookie","Cross-Origin-Embedder-Policy","Cross-Origin-Opener-Policy","Cross-Origin-Resource-Policy","Date","Device-Memory","Downlink","ECT","ETag","Expect","Expect-CT","Expires","Forwarded","From","Host","If-Match","If-Modified-Since","If-None-Match","If-Range","If-Unmodified-Since","Keep-Alive","Last-Modified","Link","Location","Max-Forwards","Origin","Permissions-Policy","Pragma","Proxy-Authenticate","Proxy-Authorization","RTT","Range","Referer","Referrer-Policy","Refresh","Retry-After","Sec-WebSocket-Accept","Sec-WebSocket-Extensions","Sec-WebSocket-Key","Sec-WebSocket-Protocol","Sec-WebSocket-Version","Server","Server-Timing","Service-Worker-Allowed","Service-Worker-Navigation-Preload","Set-Cookie","SourceMap","Strict-Transport-Security","Supports-Loading-Mode","TE","Timing-Allow-Origin","Trailer","Transfer-Encoding","Upgrade","Upgrade-Insecure-Requests","User-Agent","Vary","Via","WWW-Authenticate","X-Content-Type-Options","X-DNS-Prefetch-Control","X-Frame-Options","X-Permitted-Cross-Domain-Policies","X-Powered-By","X-Requested-With","X-XSS-Protection"],n={};Object.setPrototypeOf(n,null);let s={};function a(e){let t=s[e];return void 0===t&&(t=Buffer.from(e)),t}Object.setPrototypeOf(s,null);for(let e=0;e<r.length;++e){let t=r[e],i=t.toLowerCase();n[t]=n[i]=i}t.exports={wellknownHeaderNames:r,headerNameLowerCasedRecord:n,getHeaderNameAsBuffer:a}},544348,(e,t,i)=>{"use strict";let{wellknownHeaderNames:r,headerNameLowerCasedRecord:n}=e.r(623057);class s{value=null;left=null;middle=null;right=null;code;constructor(e,t,i){if(void 0===i||i>=e.length)throw TypeError("Unreachable");if((this.code=e.charCodeAt(i))>127)throw TypeError("key must be ascii string");e.length!==++i?this.middle=new s(e,t,i):this.value=t}add(e,t){let i=e.length;if(0===i)throw TypeError("Unreachable");let r=0,n=this;for(;;){let a=e.charCodeAt(r);if(a>127)throw TypeError("key must be ascii string");if(n.code===a)if(i===++r){n.value=t;break}else if(null!==n.middle)n=n.middle;else{n.middle=new s(e,t,r);break}else if(n.code<a)if(null!==n.left)n=n.left;else{n.left=new s(e,t,r);break}else if(null!==n.right)n=n.right;else{n.right=new s(e,t,r);break}}}search(e){let t=e.length,i=0,r=this;for(;null!==r&&i<t;){let n=e[i];for(n<=90&&n>=65&&(n|=32);null!==r;){if(n===r.code){if(t===++i)return r;r=r.middle;break}r=r.code<n?r.left:r.right}}return null}}class a{node=null;insert(e,t){null===this.node?this.node=new s(e,t,0):this.node.add(e,t)}lookup(e){return this.node?.search(e)?.value??null}}let o=new a;for(let e=0;e<r.length;++e){let t=n[r[e]];o.insert(t,t)}t.exports={TernarySearchTree:a,tree:o}},122857,(e,t,i)=>{"use strict";let r=e.r(57328),{kDestroyed:n,kBodyUsed:s,kListeners:a,kBody:o}=e.r(954673),{IncomingMessage:l}=e.r(347299),c=e.r(81111),d=e.r(761095),{stringify:u}=e.r(483324),{EventEmitter:h}=e.r(687769),A=e.r(469775),{InvalidArgumentError:p,ConnectTimeoutError:f}=e.r(450178),{headerNameLowerCasedRecord:g}=e.r(623057),{tree:m}=e.r(544348),[y,b]=process.versions.node.split(".",2).map(e=>Number(e));class E{constructor(e){this[o]=e,this[s]=!1}async *[Symbol.asyncIterator](){r(!this[s],"disturbed"),this[s]=!0,yield*this[o]}}function C(){}function w(e){return I(e)?(0===M(e)&&e.on("data",function(){r(!1)}),"boolean"!=typeof e.readableDidRead&&(e[s]=!1,h.prototype.on.call(e,"data",function(){this[s]=!0})),e):e&&"function"==typeof e.pipeTo?new E(e):e&&Z(e)?e:e&&"string"!=typeof e&&!ArrayBuffer.isView(e)&&L(e)?new E(e):e}function I(e){return e&&"object"==typeof e&&"function"==typeof e.pipe&&"function"==typeof e.on}function v(e){if(null===e)return!1;{if(e instanceof Blob)return!0;if("object"!=typeof e)return!1;let t=e[Symbol.toStringTag];return("Blob"===t||"File"===t)&&("stream"in e&&"function"==typeof e.stream||"arrayBuffer"in e&&"function"==typeof e.arrayBuffer)}}function B(e){return e.includes("?")||e.includes("#")}function Q(e,t){if(B(e))throw Error('Query params cannot be passed when url already contains "?" or "#".');let i=u(t);return i&&(e+="?"+i),e}function x(e){let t=parseInt(e,10);return t===Number(e)&&t>=0&&t<=65535}function S(e){return null!=e&&"h"===e[0]&&"t"===e[1]&&"t"===e[2]&&"p"===e[3]&&(":"===e[4]||"s"===e[4]&&":"===e[5])}function k(e){if("string"==typeof e){if(!S((e=new URL(e)).origin||e.protocol))throw new p("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}if(!e||"object"!=typeof e)throw new p("Invalid URL: The URL argument must be a non-null object.");if(!(e instanceof URL)){if(null!=e.port&&""!==e.port&&!1===x(e.port))throw new p("Invalid URL: port must be a valid integer or a string representation of an integer.");if(null!=e.path&&"string"!=typeof e.path)throw new p("Invalid URL path: the path must be a string or null/undefined.");if(null!=e.pathname&&"string"!=typeof e.pathname)throw new p("Invalid URL pathname: the pathname must be a string or null/undefined.");if(null!=e.hostname&&"string"!=typeof e.hostname)throw new p("Invalid URL hostname: the hostname must be a string or null/undefined.");if(null!=e.origin&&"string"!=typeof e.origin)throw new p("Invalid URL origin: the origin must be a string or null/undefined.");if(!S(e.origin||e.protocol))throw new p("Invalid URL protocol: the URL must start with `http:` or `https:`.");let t=null!=e.port?e.port:"https:"===e.protocol?443:80,i=null!=e.origin?e.origin:`${e.protocol||""}//${e.hostname||""}:${t}`,r=null!=e.path?e.path:`${e.pathname||""}${e.search||""}`;return"/"===i[i.length-1]&&(i=i.slice(0,i.length-1)),r&&"/"!==r[0]&&(r=`/${r}`),new URL(`${i}${r}`)}if(!S(e.origin||e.protocol))throw new p("Invalid URL protocol: the URL must start with `http:` or `https:`.");return e}function T(e){if("/"!==(e=k(e)).pathname||e.search||e.hash)throw new p("invalid url");return e}function N(e){if("["===e[0]){let t=e.indexOf("]");return r(-1!==t),e.substring(1,t)}let t=e.indexOf(":");return -1===t?e:e.substring(0,t)}function D(e){if(!e)return null;r("string"==typeof e);let t=N(e);return d.isIP(t)?"":t}function _(e){return JSON.parse(JSON.stringify(e))}function R(e){return null!=e&&"function"==typeof e[Symbol.asyncIterator]}function L(e){return null!=e&&("function"==typeof e[Symbol.iterator]||"function"==typeof e[Symbol.asyncIterator])}function F(e){let t=Object.getPrototypeOf(e);return Object.prototype.hasOwnProperty.call(e,Symbol.iterator)||null!=t&&t!==Object.prototype&&"function"==typeof e[Symbol.iterator]}function M(e){if(null==e)return 0;if(I(e)){let t=e._readableState;return t&&!1===t.objectMode&&!0===t.ended&&Number.isFinite(t.length)?t.length:null}return v(e)?null!=e.size?e.size:null:G(e)?e.byteLength:null}function O(e){return e&&!!(e.destroyed||e[n]||c.isDestroyed?.(e))}function U(e,t){null==e||!I(e)||O(e)||("function"==typeof e.destroy?(Object.getPrototypeOf(e).constructor===l&&(e.socket=null),e.destroy(t)):t&&queueMicrotask(()=>{e.emit("error",t)}),!0!==e.destroyed&&(e[n]=!0))}let P=/timeout=(\d+)/;function $(e){let t=e.match(P);return t?1e3*parseInt(t[1],10):null}function j(e){return"string"==typeof e?g[e]??e.toLowerCase():m.lookup(e)??e.toString("latin1").toLowerCase()}function H(e){return m.lookup(e)??e.toString("latin1").toLowerCase()}function q(e,t){void 0===t&&(t={});for(let i=0;i<e.length;i+=2){let r=j(e[i]),n=t[r];if(n)"string"==typeof n&&(n=[n],t[r]=n),n.push(e[i+1].toString("latin1"));else{let n=e[i+1];"string"==typeof n?t[r]=n:t[r]=Array.isArray(n)?n.map(e=>e.toString("latin1")):n.toString("latin1")}}return t}function z(e){let t,i,r=e.length,n=Array(r);for(let s=0;s<r;s+=2)t=e[s],i=e[s+1],"string"!=typeof t&&(t=t.toString()),"string"!=typeof i&&(i=i.toString("latin1")),n[s]=t,n[s+1]=i;return n}function V(e){if(!Array.isArray(e))throw TypeError("expected headers to be an array");return e.map(e=>Buffer.from(e))}function G(e){return e instanceof Uint8Array||Buffer.isBuffer(e)}function Y(e,t,i){if(!e||"object"!=typeof e)throw new p("handler must be an object");if("function"!=typeof e.onRequestStart){if("function"!=typeof e.onConnect)throw new p("invalid onConnect method");if("function"!=typeof e.onError)throw new p("invalid onError method");if("function"!=typeof e.onBodySent&&void 0!==e.onBodySent)throw new p("invalid onBodySent method");if(i||"CONNECT"===t){if("function"!=typeof e.onUpgrade)throw new p("invalid onUpgrade method")}else{if("function"!=typeof e.onHeaders)throw new p("invalid onHeaders method");if("function"!=typeof e.onData)throw new p("invalid onData method");if("function"!=typeof e.onComplete)throw new p("invalid onComplete method")}}}function W(e){return!!(e&&(c.isDisturbed(e)||e[s]))}function J(e){return{localAddress:e.localAddress,localPort:e.localPort,remoteAddress:e.remoteAddress,remotePort:e.remotePort,remoteFamily:e.remoteFamily,timeout:e.timeout,bytesWritten:e.bytesWritten,bytesRead:e.bytesRead}}function K(e){let t;return new ReadableStream({start(){t=e[Symbol.asyncIterator]()},pull(e){return t.next().then(({done:t,value:i})=>{if(t)return queueMicrotask(()=>{e.close(),e.byobRequest?.respond(0)});{let t=Buffer.isBuffer(i)?i:Buffer.from(i);return t.byteLength?e.enqueue(new Uint8Array(t)):this.pull(e)}})},cancel:()=>t.return(),type:"bytes"})}function Z(e){return e&&"object"==typeof e&&"function"==typeof e.append&&"function"==typeof e.delete&&"function"==typeof e.get&&"function"==typeof e.getAll&&"function"==typeof e.has&&"function"==typeof e.set&&"FormData"===e[Symbol.toStringTag]}function X(e,t){return"addEventListener"in e?(e.addEventListener("abort",t,{once:!0}),()=>e.removeEventListener("abort",t)):(e.once("abort",t),()=>e.removeListener("abort",t))}let ee=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]);function et(e){return 1===ee[e]}let ei=/^[\^_`a-zA-Z\-0-9!#$%&'*+.|~]+$/;function er(e){if(e.length>=12)return ei.test(e);if(0===e.length)return!1;for(let t=0;t<e.length;t++)if(1!==ee[e.charCodeAt(t)])return!1;return!0}let en=/[^\t\x20-\x7e\x80-\xff]/;function es(e){return!en.test(e)}let ea=/^bytes (\d+)-(\d+)\/(\d+)?$/;function eo(e){if(null==e||""===e)return{start:0,end:null,size:null};let t=e?e.match(ea):null;return t?{start:parseInt(t[1]),end:t[2]?parseInt(t[2]):null,size:t[3]?parseInt(t[3]):null}:null}function el(e,t,i){return(e[a]??=[]).push([t,i]),e.on(t,i),e}function ec(e){if(null!=e[a]){for(let[t,i]of e[a])e.removeListener(t,i);e[a]=null}return e}function ed(e,t,i){try{t.onError(i),r(t.aborted)}catch(t){e.emit("error",t)}}let eu=(e,t)=>{if(!t.timeout)return C;let i=null,r=A.setFastTimeout(()=>{i=setImmediate(()=>{eh(e.deref(),t)})},t.timeout);return()=>{A.clearFastTimeout(r),clearImmediate(i)}};function eh(e,t){if(null==e)return;let i="Connect Timeout Error";Array.isArray(e.autoSelectFamilyAttemptedAddresses)?i+=` (attempted addresses: ${e.autoSelectFamilyAttemptedAddresses.join(", ")},`:i+=` (attempted address: ${t.hostname}:${t.port},`,U(e,new f(i+=` timeout: ${t.timeout}ms)`))}function eA(e){if("h"===e[0]&&"t"===e[1]&&"t"===e[2]&&"p"===e[3])switch(e[4]){case":":return"http:";case"s":if(":"===e[5])return"https:"}return e.slice(0,e.indexOf(":")+1)}let ep=Object.create(null);ep.enumerable=!0;let ef={delete:"DELETE",DELETE:"DELETE",get:"GET",GET:"GET",head:"HEAD",HEAD:"HEAD",options:"OPTIONS",OPTIONS:"OPTIONS",post:"POST",POST:"POST",put:"PUT",PUT:"PUT"},eg={...ef,patch:"patch",PATCH:"PATCH"};Object.setPrototypeOf(ef,null),Object.setPrototypeOf(eg,null),t.exports={kEnumerableProperty:ep,isDisturbed:W,isBlobLike:v,parseOrigin:T,parseURL:k,getServerName:D,isStream:I,isIterable:L,hasSafeIterator:F,isAsyncIterable:R,isDestroyed:O,headerNameToString:j,bufferToLowerCasedHeaderName:H,addListener:el,removeAllListeners:ec,errorRequest:ed,parseRawHeaders:z,encodeRawHeaders:V,parseHeaders:q,parseKeepAliveTimeout:$,destroy:U,bodyLength:M,deepClone:_,ReadableStreamFrom:K,isBuffer:G,assertRequestHandler:Y,getSocketInfo:J,isFormDataLike:Z,pathHasQueryOrFragment:B,serializePathWithQuery:Q,addAbortListener:X,isValidHTTPToken:er,isValidHeaderValue:es,isTokenCharCode:et,parseRangeHeader:eo,normalizedMethodRecordsBase:ef,normalizedMethodRecords:eg,isValidPort:x,isHttpOrHttpsPrefixed:S,nodeMajor:y,nodeMinor:b,safeHTTPMethods:Object.freeze(["GET","HEAD","OPTIONS","TRACE"]),wrapRequestBody:w,setupConnectTimeout:eu,getProtocolFromUrlString:eA}},889926,(e,t,i)=>{"use strict";let{kConnected:r,kPending:n,kRunning:s,kSize:a,kFree:o,kQueued:l}=e.r(954673);class c{constructor(e){this.connected=e[r],this.pending=e[n],this.running=e[s],this.size=e[a]}}class d{constructor(e){this.connected=e[r],this.free=e[o],this.pending=e[n],this.queued=e[l],this.running=e[s],this.size=e[a]}}t.exports={ClientStats:c,PoolStats:d}},500078,(e,t,i)=>{"use strict";let r=e.r(677652),n=e.r(812057),s=n.debuglog("undici"),a=n.debuglog("fetch"),o=n.debuglog("websocket"),l={beforeConnect:r.channel("undici:client:beforeConnect"),connected:r.channel("undici:client:connected"),connectError:r.channel("undici:client:connectError"),sendHeaders:r.channel("undici:client:sendHeaders"),create:r.channel("undici:request:create"),bodySent:r.channel("undici:request:bodySent"),bodyChunkSent:r.channel("undici:request:bodyChunkSent"),bodyChunkReceived:r.channel("undici:request:bodyChunkReceived"),headers:r.channel("undici:request:headers"),trailers:r.channel("undici:request:trailers"),error:r.channel("undici:request:error"),open:r.channel("undici:websocket:open"),close:r.channel("undici:websocket:close"),socketError:r.channel("undici:websocket:socket_error"),ping:r.channel("undici:websocket:ping"),pong:r.channel("undici:websocket:pong"),proxyConnected:r.channel("undici:proxy:connected")},c=!1;function d(e=s){if(!c){if(l.beforeConnect.hasSubscribers||l.connected.hasSubscribers||l.connectError.hasSubscribers||l.sendHeaders.hasSubscribers){c=!0;return}c=!0,r.subscribe("undici:client:beforeConnect",t=>{let{connectParams:{version:i,protocol:r,port:n,host:s}}=t;e("connecting to %s%s using %s%s",s,n?`:${n}`:"",r,i)}),r.subscribe("undici:client:connected",t=>{let{connectParams:{version:i,protocol:r,port:n,host:s}}=t;e("connected to %s%s using %s%s",s,n?`:${n}`:"",r,i)}),r.subscribe("undici:client:connectError",t=>{let{connectParams:{version:i,protocol:r,port:n,host:s},error:a}=t;e("connection to %s%s using %s%s errored - %s",s,n?`:${n}`:"",r,i,a.message)}),r.subscribe("undici:client:sendHeaders",t=>{let{request:{method:i,path:r,origin:n}}=t;e("sending request to %s %s%s",i,n,r)})}}let u=!1;function h(e=s){if(!u){if(l.headers.hasSubscribers||l.trailers.hasSubscribers||l.error.hasSubscribers){u=!0;return}u=!0,r.subscribe("undici:request:headers",t=>{let{request:{method:i,path:r,origin:n},response:{statusCode:s}}=t;e("received response to %s %s%s - HTTP %d",i,n,r,s)}),r.subscribe("undici:request:trailers",t=>{let{request:{method:i,path:r,origin:n}}=t;e("trailers received from %s %s%s",i,n,r)}),r.subscribe("undici:request:error",t=>{let{request:{method:i,path:r,origin:n},error:s}=t;e("request to %s %s%s errored - %s",i,n,r,s.message)})}}let A=!1;function p(e=o){if(!A){if(l.open.hasSubscribers||l.close.hasSubscribers||l.socketError.hasSubscribers||l.ping.hasSubscribers||l.pong.hasSubscribers){A=!0;return}A=!0,r.subscribe("undici:websocket:open",t=>{let{address:{address:i,port:r}}=t;e("connection opened %s%s",i,r?`:${r}`:"")}),r.subscribe("undici:websocket:close",t=>{let{websocket:i,code:r,reason:n}=t;e("closed connection to %s - %s %s",i.url,r,n)}),r.subscribe("undici:websocket:socket_error",t=>{e("connection errored - %s",t.message)}),r.subscribe("undici:websocket:ping",t=>{e("ping received")}),r.subscribe("undici:websocket:pong",t=>{e("pong received")})}}(s.enabled||a.enabled)&&(d(a.enabled?a:s),h(a.enabled?a:s)),o.enabled&&(d(s.enabled?s:o),p(o)),t.exports={channels:l}},753375,(e,t,i)=>{"use strict";let{InvalidArgumentError:r,NotSupportedError:n}=e.r(450178),s=e.r(57328),{isValidHTTPToken:a,isValidHeaderValue:o,isStream:l,destroy:c,isBuffer:d,isFormDataLike:u,isIterable:h,hasSafeIterator:A,isBlobLike:p,serializePathWithQuery:f,assertRequestHandler:g,getServerName:m,normalizedMethodRecords:y,getProtocolFromUrlString:b}=e.r(122857),{channels:E}=e.r(500078),{headerNameLowerCasedRecord:C}=e.r(623057),w=/[^\u0021-\u00ff]/,I=Symbol("handler");class v{constructor(e,{path:t,method:i,body:n,headers:s,query:C,idempotent:v,blocking:Q,upgrade:x,headersTimeout:S,bodyTimeout:k,reset:T,expectContinue:N,servername:D,throwOnError:_,maxRedirections:R,typeOfService:L},F){if("string"!=typeof t)throw new r("path must be a string");if("/"===t[0]||t.startsWith("http://")||t.startsWith("https://")||"CONNECT"===i){if(w.test(t))throw new r("invalid request path")}else throw new r("path must be an absolute URL or start with a slash");if("string"!=typeof i)throw new r("method must be a string");if(void 0===y[i]&&!a(i))throw new r("invalid request method");if(x&&"string"!=typeof x)throw new r("upgrade must be a string");if(x&&!o(x))throw new r("invalid upgrade header");if(null!=S&&(!Number.isFinite(S)||S<0))throw new r("invalid headersTimeout");if(null!=k&&(!Number.isFinite(k)||k<0))throw new r("invalid bodyTimeout");if(null!=T&&"boolean"!=typeof T)throw new r("invalid reset");if(null!=N&&"boolean"!=typeof N)throw new r("invalid expectContinue");if(null!=_)throw new r("invalid throwOnError");if(null!=R&&0!==R)throw new r("maxRedirections is not supported, use the redirect interceptor");if(null!=L&&(!Number.isInteger(L)||L<0||L>255))throw new r("typeOfService must be an integer between 0 and 255");if(this.headersTimeout=S,this.bodyTimeout=k,this.method=i,this.typeOfService=L??0,this.abort=null,null==n)this.body=null;else if(l(n)){this.body=n;const e=this.body._readableState;e&&e.autoDestroy||(this.endHandler=function(){c(this)},this.body.on("end",this.endHandler)),this.errorHandler=e=>{this.abort?this.abort(e):this.error=e},this.body.on("error",this.errorHandler)}else if(d(n))this.body=n.byteLength?n:null;else if(ArrayBuffer.isView(n))this.body=n.buffer.byteLength?Buffer.from(n.buffer,n.byteOffset,n.byteLength):null;else if(n instanceof ArrayBuffer)this.body=n.byteLength?Buffer.from(n):null;else if("string"==typeof n)this.body=n.length?Buffer.from(n):null;else if(u(n)||h(n)||p(n))this.body=n;else throw new r("body must be a string, a Buffer, a Readable stream, an iterable, or an async iterable");if(this.completed=!1,this.aborted=!1,this.upgrade=x||null,this.path=C?f(t,C):t,this.origin=e,this.protocol=b(e),this.idempotent=null==v?"HEAD"===i||"GET"===i:v,this.blocking=Q??"HEAD"!==this.method,this.reset=null==T?null:T,this.host=null,this.contentLength=null,this.contentType=null,this.headers=[],this.expectContinue=null!=N&&N,Array.isArray(s)){if(s.length%2!=0)throw new r("headers array must be even");for(let e=0;e<s.length;e+=2)B(this,s[e],s[e+1])}else if(s&&"object"==typeof s)if(A(s))for(const e of s){if(!Array.isArray(e)||2!==e.length)throw new r("headers must be in key-value pair format");B(this,e[0],e[1])}else{const e=Object.keys(s);for(let t=0;t<e.length;++t)B(this,e[t],s[e[t]])}else if(null!=s)throw new r("headers must be an object or an array");g(F,i,x),this.servername=D||m(this.host)||null,this[I]=F,E.create.hasSubscribers&&E.create.publish({request:this})}onBodySent(e){if(E.bodyChunkSent.hasSubscribers&&E.bodyChunkSent.publish({request:this,chunk:e}),this[I].onBodySent)try{return this[I].onBodySent(e)}catch(e){this.abort(e)}}onRequestSent(){if(E.bodySent.hasSubscribers&&E.bodySent.publish({request:this}),this[I].onRequestSent)try{return this[I].onRequestSent()}catch(e){this.abort(e)}}onConnect(e){if(s(!this.aborted),s(!this.completed),!this.error)return this.abort=e,this[I].onConnect(e);e(this.error)}onResponseStarted(){return this[I].onResponseStarted?.()}onHeaders(e,t,i,r){s(!this.aborted),s(!this.completed),E.headers.hasSubscribers&&E.headers.publish({request:this,response:{statusCode:e,headers:t,statusText:r}});try{return this[I].onHeaders(e,t,i,r)}catch(e){this.abort(e)}}onData(e){s(!this.aborted),s(!this.completed),E.bodyChunkReceived.hasSubscribers&&E.bodyChunkReceived.publish({request:this,chunk:e});try{return this[I].onData(e)}catch(e){return this.abort(e),!1}}onUpgrade(e,t,i){return s(!this.aborted),s(!this.completed),this[I].onUpgrade(e,t,i)}onComplete(e){this.onFinally(),s(!this.aborted),s(!this.completed),this.completed=!0,E.trailers.hasSubscribers&&E.trailers.publish({request:this,trailers:e});try{return this[I].onComplete(e)}catch(e){this.onError(e)}}onError(e){if(this.onFinally(),E.error.hasSubscribers&&E.error.publish({request:this,error:e}),!this.aborted)return this.aborted=!0,this[I].onError(e)}onFinally(){this.errorHandler&&(this.body.off("error",this.errorHandler),this.errorHandler=null),this.endHandler&&(this.body.off("end",this.endHandler),this.endHandler=null)}addHeader(e,t){return B(this,e,t),this}}function B(e,t,i){if(i&&"object"==typeof i&&!Array.isArray(i))throw new r(`invalid ${t} header`);if(void 0===i)return;let s=C[t];if(void 0===s&&void 0===C[s=t.toLowerCase()]&&!a(s))throw new r("invalid header key");if(Array.isArray(i)){let e=[];for(let n=0;n<i.length;n++)if("string"==typeof i[n]){if(!o(i[n]))throw new r(`invalid ${t} header`);e.push(i[n])}else if(null===i[n])e.push("");else if("object"==typeof i[n])throw new r(`invalid ${t} header`);else e.push(`${i[n]}`);i=e}else if("string"==typeof i){if(!o(i))throw new r(`invalid ${t} header`)}else i=null===i?"":`${i}`;if("host"===s){if(null!==e.host)throw new r("duplicate host header");if("string"!=typeof i)throw new r("invalid host header");e.host=i}else if("content-length"===s){if(null!==e.contentLength)throw new r("duplicate content-length header");if(e.contentLength=parseInt(i,10),!Number.isFinite(e.contentLength))throw new r("invalid content-length header")}else if(null===e.contentType&&"content-type"===s)e.contentType=i,e.headers.push(t,i);else if("transfer-encoding"===s||"keep-alive"===s||"upgrade"===s)throw new r(`invalid ${s} header`);else if("connection"===s){let t="string"==typeof i?i.toLowerCase():null;if("close"!==t&&"keep-alive"!==t)throw new r("invalid connection header");"close"===t&&(e.reset=!0)}else if("expect"===s)throw new n("expect header not supported");else e.headers.push(t,i)}t.exports=v},54128,(e,t,i)=>{"use strict";let{InvalidArgumentError:r}=e.r(450178);function n(e){return Array.isArray(e)?e.map(e=>Buffer.from(e,"latin1")):Buffer.from(e,"latin1")}t.exports=class e{#t;constructor(e){this.#t=e}static wrap(t){return t.onRequestStart?t:new e(t)}onConnect(e,t){return this.#t.onConnect?.(e,t)}onResponseStarted(){return this.#t.onResponseStarted?.()}onHeaders(e,t,i,r){return this.#t.onHeaders?.(e,t,i,r)}onUpgrade(e,t,i){return this.#t.onUpgrade?.(e,t,i)}onData(e){return this.#t.onData?.(e)}onComplete(e){return this.#t.onComplete?.(e)}onError(e){if(!this.#t.onError)throw e;return this.#t.onError?.(e)}onRequestStart(e,t){this.#t.onConnect?.(t=>e.abort(t),t)}onRequestUpgrade(e,t,i,r){let s=[];for(let[e,t]of Object.entries(i))s.push(Buffer.from(e,"latin1"),n(t));this.#t.onUpgrade?.(t,s,r)}onResponseStart(e,t,i,r){let s=[];for(let[e,t]of Object.entries(i))s.push(Buffer.from(e,"latin1"),n(t));this.#t.onHeaders?.(t,s,()=>e.resume(),r)===!1&&e.pause()}onResponseData(e,t){this.#t.onData?.(t)===!1&&e.pause()}onResponseEnd(e,t){let i=[];for(let[e,r]of Object.entries(t))i.push(Buffer.from(e,"latin1"),n(r));this.#t.onComplete?.(i)}onResponseError(e,t){if(!this.#t.onError)throw new r("invalid onError method");this.#t.onError?.(t)}}},10918,(e,t,i)=>{"use strict";let r=e.r(687769),n=e.r(54128),s=e=>(t,i)=>e(t,n.wrap(i));class a extends r{dispatch(){throw Error("not implemented")}close(){throw Error("not implemented")}destroy(){throw Error("not implemented")}compose(...e){let t=Array.isArray(e[0])?e[0]:e,i=this.dispatch.bind(this);for(let e of t)if(null!=e){if("function"!=typeof e)throw TypeError(`invalid interceptor, expected function received ${typeof e}`);if(i=e(i),i=s(i),null==i||"function"!=typeof i||2!==i.length)throw TypeError("invalid interceptor")}return new Proxy(this,{get:(e,t)=>"dispatch"===t?i:e[t]})}}t.exports=a},600740,(e,t,i)=>{"use strict";let{parseHeaders:r}=e.r(122857),{InvalidArgumentError:n}=e.r(450178),s=Symbol("resume");class a{#i=!1;#r=null;#n=!1;#s;[s]=null;constructor(e){this.#s=e}pause(){this.#i=!0}resume(){this.#i&&(this.#i=!1,this[s]?.())}abort(e){this.#n||(this.#n=!0,this.#r=e,this.#s(e))}get aborted(){return this.#n}get reason(){return this.#r}get paused(){return this.#i}}t.exports=class e{#t;#a;constructor(e){this.#t=e}static unwrap(t){return t.onRequestStart?new e(t):t}onConnect(e,t){this.#a=new a(e),this.#t.onRequestStart?.(this.#a,t)}onResponseStarted(){return this.#t.onResponseStarted?.()}onUpgrade(e,t,i){this.#t.onRequestUpgrade?.(this.#a,e,r(t),i)}onHeaders(e,t,i,n){return this.#a[s]=i,this.#t.onResponseStart?.(this.#a,e,r(t),n),!this.#a.paused}onData(e){return this.#t.onResponseData?.(this.#a,e),!this.#a.paused}onComplete(e){this.#t.onResponseEnd?.(this.#a,r(e))}onError(e){if(!this.#t.onResponseError)throw new n("invalid onError method");this.#t.onResponseError?.(this.#a,e)}}},127205,(e,t,i)=>{"use strict";let r=e.r(10918),n=e.r(600740),{ClientDestroyedError:s,ClientClosedError:a,InvalidArgumentError:o}=e.r(450178),{kDestroy:l,kClose:c,kClosed:d,kDestroyed:u,kDispatch:h}=e.r(954673),A=Symbol("onDestroyed"),p=Symbol("onClosed");class f extends r{[u]=!1;[A]=null;[d]=!1;[p]=null;get destroyed(){return this[u]}get closed(){return this[d]}close(e){if(void 0===e)return new Promise((e,t)=>{this.close((i,r)=>i?t(i):e(r))});if("function"!=typeof e)throw new o("invalid callback");if(this[u]){let t=new s;queueMicrotask(()=>e(t,null));return}if(this[d])return void(this[p]?this[p].push(e):queueMicrotask(()=>e(null,null)));this[d]=!0,this[p]??=[],this[p].push(e);let t=()=>{let e=this[p];this[p]=null;for(let t=0;t<e.length;t++)e[t](null,null)};this[c]().then(()=>this.destroy()).then(()=>queueMicrotask(t))}destroy(e,t){if("function"==typeof e&&(t=e,e=null),void 0===t)return new Promise((t,i)=>{this.destroy(e,(e,r)=>e?i(e):t(r))});if("function"!=typeof t)throw new o("invalid callback");if(this[u])return void(this[A]?this[A].push(t):queueMicrotask(()=>t(null,null)));e||(e=new s),this[u]=!0,this[A]??=[],this[A].push(t);let i=()=>{let e=this[A];this[A]=null;for(let t=0;t<e.length;t++)e[t](null,null)};this[l](e).then(()=>queueMicrotask(i))}dispatch(e,t){if(!t||"object"!=typeof t)throw new o("handler must be an object");t=n.unwrap(t);try{if(!e||"object"!=typeof e)throw new o("opts must be an object.");if(this[u]||this[A])throw new s;if(this[d])throw new a;return this[h](e,t)}catch(e){if("function"!=typeof t.onError)throw e;return t.onError(e),!1}}}t.exports=f},977155,(e,t,i)=>{"use strict";let r,n=e.r(761095),s=e.r(57328),a=e.r(122857),{InvalidArgumentError:o}=e.r(450178),l=class{constructor(e){this._maxCachedSessions=e,this._sessionCache=new Map,this._sessionRegistry=new FinalizationRegistry(e=>{if(this._sessionCache.size<this._maxCachedSessions)return;let t=this._sessionCache.get(e);void 0!==t&&void 0===t.deref()&&this._sessionCache.delete(e)})}get(e){let t=this._sessionCache.get(e);return t?t.deref():null}set(e,t){0!==this._maxCachedSessions&&(this._sessionCache.set(e,new WeakRef(t)),this._sessionRegistry.register(t,e))}};t.exports=function({allowH2:t,useH2c:i,maxCachedSessions:c,socketPath:d,timeout:u,session:h,...A}){if(null!=c&&(!Number.isInteger(c)||c<0))throw new o("maxCachedSessions must be a positive integer or zero");let p={path:d,...A},f=new l(null==c?100:c);return u=null==u?1e4:u,t=null!=t&&t,function({hostname:o,host:l,protocol:c,port:d,servername:A,localAddress:g,httpSocket:m},y){let b;if("https:"===c){r||(r=e.r(685560));let i=(A=A||p.servername||a.getServerName(l)||null)||o;s(i);let n=h||f.get(i)||null;d=d||443,(b=r.connect({highWaterMark:16384,...p,servername:A,session:n,localAddress:g,ALPNProtocols:t?["http/1.1","h2"]:["http/1.1"],socket:m,port:d,host:o})).on("session",function(e){f.set(i,e)})}else s(!m,"httpSocket can only be sent on TLS update"),d=d||80,b=n.connect({highWaterMark:65536,...p,localAddress:g,port:d,host:o}),!0===i&&(b.alpnProtocol="h2");if(null==p.keepAlive||p.keepAlive){let e=void 0===p.keepAliveInitialDelay?6e4:p.keepAliveInitialDelay;b.setKeepAlive(!0,e)}let E=a.setupConnectTimeout(new WeakRef(b),{timeout:u,hostname:o,port:d});return b.setNoDelay(!0).once("https:"===c?"secureConnect":"connect",function(){if(queueMicrotask(E),y){let e=y;y=null,e(null,this)}}).on("error",function(e){if(queueMicrotask(E),y){let t=y;y=null,t(e)}}),b}}},133038,(e,t,i)=>{"use strict";function r(e,t=[],i=[]){let n=(t?.length??0)===0,s=(i?.length??0)===0;return Object.fromEntries(Object.entries(e).filter(([,e])=>"number"==typeof e&&(n||t.includes(e))&&(s||!i.includes(e))))}Object.defineProperty(i,"__esModule",{value:!0}),i.enumToMap=r},930443,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.SPECIAL_HEADERS=i.MINOR=i.MAJOR=i.HTAB_SP_VCHAR_OBS_TEXT=i.QUOTED_STRING=i.CONNECTION_TOKEN_CHARS=i.HEADER_CHARS=i.TOKEN=i.HEX=i.URL_CHAR=i.USERINFO_CHARS=i.MARK=i.ALPHANUM=i.NUM=i.HEX_MAP=i.NUM_MAP=i.ALPHA=i.STATUSES_HTTP=i.H_METHOD_MAP=i.METHOD_MAP=i.METHODS_RTSP=i.METHODS_ICE=i.METHODS_HTTP=i.HEADER_STATE=i.FINISH=i.STATUSES=i.METHODS=i.LENIENT_FLAGS=i.FLAGS=i.TYPE=i.ERROR=void 0;let r=e.r(133038);i.ERROR={OK:0,INTERNAL:1,STRICT:2,CR_EXPECTED:25,LF_EXPECTED:3,UNEXPECTED_CONTENT_LENGTH:4,UNEXPECTED_SPACE:30,CLOSED_CONNECTION:5,INVALID_METHOD:6,INVALID_URL:7,INVALID_CONSTANT:8,INVALID_VERSION:9,INVALID_HEADER_TOKEN:10,INVALID_CONTENT_LENGTH:11,INVALID_CHUNK_SIZE:12,INVALID_STATUS:13,INVALID_EOF_STATE:14,INVALID_TRANSFER_ENCODING:15,CB_MESSAGE_BEGIN:16,CB_HEADERS_COMPLETE:17,CB_MESSAGE_COMPLETE:18,CB_CHUNK_HEADER:19,CB_CHUNK_COMPLETE:20,PAUSED:21,PAUSED_UPGRADE:22,PAUSED_H2_UPGRADE:23,USER:24,CB_URL_COMPLETE:26,CB_STATUS_COMPLETE:27,CB_METHOD_COMPLETE:32,CB_VERSION_COMPLETE:33,CB_HEADER_FIELD_COMPLETE:28,CB_HEADER_VALUE_COMPLETE:29,CB_CHUNK_EXTENSION_NAME_COMPLETE:34,CB_CHUNK_EXTENSION_VALUE_COMPLETE:35,CB_RESET:31,CB_PROTOCOL_COMPLETE:38},i.TYPE={BOTH:0,REQUEST:1,RESPONSE:2},i.FLAGS={CONNECTION_KEEP_ALIVE:1,CONNECTION_CLOSE:2,CONNECTION_UPGRADE:4,CHUNKED:8,UPGRADE:16,CONTENT_LENGTH:32,SKIPBODY:64,TRAILING:128,TRANSFER_ENCODING:512},i.LENIENT_FLAGS={HEADERS:1,CHUNKED_LENGTH:2,KEEP_ALIVE:4,TRANSFER_ENCODING:8,VERSION:16,DATA_AFTER_CLOSE:32,OPTIONAL_LF_AFTER_CR:64,OPTIONAL_CRLF_AFTER_CHUNK:128,OPTIONAL_CR_BEFORE_LF:256,SPACES_AFTER_CHUNK_SIZE:512},i.METHODS={DELETE:0,GET:1,HEAD:2,POST:3,PUT:4,CONNECT:5,OPTIONS:6,TRACE:7,COPY:8,LOCK:9,MKCOL:10,MOVE:11,PROPFIND:12,PROPPATCH:13,SEARCH:14,UNLOCK:15,BIND:16,REBIND:17,UNBIND:18,ACL:19,REPORT:20,MKACTIVITY:21,CHECKOUT:22,MERGE:23,"M-SEARCH":24,NOTIFY:25,SUBSCRIBE:26,UNSUBSCRIBE:27,PATCH:28,PURGE:29,MKCALENDAR:30,LINK:31,UNLINK:32,SOURCE:33,PRI:34,DESCRIBE:35,ANNOUNCE:36,SETUP:37,PLAY:38,PAUSE:39,TEARDOWN:40,GET_PARAMETER:41,SET_PARAMETER:42,REDIRECT:43,RECORD:44,FLUSH:45,QUERY:46},i.STATUSES={CONTINUE:100,SWITCHING_PROTOCOLS:101,PROCESSING:102,EARLY_HINTS:103,RESPONSE_IS_STALE:110,REVALIDATION_FAILED:111,DISCONNECTED_OPERATION:112,HEURISTIC_EXPIRATION:113,MISCELLANEOUS_WARNING:199,OK:200,CREATED:201,ACCEPTED:202,NON_AUTHORITATIVE_INFORMATION:203,NO_CONTENT:204,RESET_CONTENT:205,PARTIAL_CONTENT:206,MULTI_STATUS:207,ALREADY_REPORTED:208,TRANSFORMATION_APPLIED:214,IM_USED:226,MISCELLANEOUS_PERSISTENT_WARNING:299,MULTIPLE_CHOICES:300,MOVED_PERMANENTLY:301,FOUND:302,SEE_OTHER:303,NOT_MODIFIED:304,USE_PROXY:305,SWITCH_PROXY:306,TEMPORARY_REDIRECT:307,PERMANENT_REDIRECT:308,BAD_REQUEST:400,UNAUTHORIZED:401,PAYMENT_REQUIRED:402,FORBIDDEN:403,NOT_FOUND:404,METHOD_NOT_ALLOWED:405,NOT_ACCEPTABLE:406,PROXY_AUTHENTICATION_REQUIRED:407,REQUEST_TIMEOUT:408,CONFLICT:409,GONE:410,LENGTH_REQUIRED:411,PRECONDITION_FAILED:412,PAYLOAD_TOO_LARGE:413,URI_TOO_LONG:414,UNSUPPORTED_MEDIA_TYPE:415,RANGE_NOT_SATISFIABLE:416,EXPECTATION_FAILED:417,IM_A_TEAPOT:418,PAGE_EXPIRED:419,ENHANCE_YOUR_CALM:420,MISDIRECTED_REQUEST:421,UNPROCESSABLE_ENTITY:422,LOCKED:423,FAILED_DEPENDENCY:424,TOO_EARLY:425,UPGRADE_REQUIRED:426,PRECONDITION_REQUIRED:428,TOO_MANY_REQUESTS:429,REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL:430,REQUEST_HEADER_FIELDS_TOO_LARGE:431,LOGIN_TIMEOUT:440,NO_RESPONSE:444,RETRY_WITH:449,BLOCKED_BY_PARENTAL_CONTROL:450,UNAVAILABLE_FOR_LEGAL_REASONS:451,CLIENT_CLOSED_LOAD_BALANCED_REQUEST:460,INVALID_X_FORWARDED_FOR:463,REQUEST_HEADER_TOO_LARGE:494,SSL_CERTIFICATE_ERROR:495,SSL_CERTIFICATE_REQUIRED:496,HTTP_REQUEST_SENT_TO_HTTPS_PORT:497,INVALID_TOKEN:498,CLIENT_CLOSED_REQUEST:499,INTERNAL_SERVER_ERROR:500,NOT_IMPLEMENTED:501,BAD_GATEWAY:502,SERVICE_UNAVAILABLE:503,GATEWAY_TIMEOUT:504,HTTP_VERSION_NOT_SUPPORTED:505,VARIANT_ALSO_NEGOTIATES:506,INSUFFICIENT_STORAGE:507,LOOP_DETECTED:508,BANDWIDTH_LIMIT_EXCEEDED:509,NOT_EXTENDED:510,NETWORK_AUTHENTICATION_REQUIRED:511,WEB_SERVER_UNKNOWN_ERROR:520,WEB_SERVER_IS_DOWN:521,CONNECTION_TIMEOUT:522,ORIGIN_IS_UNREACHABLE:523,TIMEOUT_OCCURED:524,SSL_HANDSHAKE_FAILED:525,INVALID_SSL_CERTIFICATE:526,RAILGUN_ERROR:527,SITE_IS_OVERLOADED:529,SITE_IS_FROZEN:530,IDENTITY_PROVIDER_AUTHENTICATION_ERROR:561,NETWORK_READ_TIMEOUT:598,NETWORK_CONNECT_TIMEOUT:599},i.FINISH={SAFE:0,SAFE_WITH_CB:1,UNSAFE:2},i.HEADER_STATE={GENERAL:0,CONNECTION:1,CONTENT_LENGTH:2,TRANSFER_ENCODING:3,UPGRADE:4,CONNECTION_KEEP_ALIVE:5,CONNECTION_CLOSE:6,CONNECTION_UPGRADE:7,TRANSFER_ENCODING_CHUNKED:8},i.METHODS_HTTP=[i.METHODS.DELETE,i.METHODS.GET,i.METHODS.HEAD,i.METHODS.POST,i.METHODS.PUT,i.METHODS.CONNECT,i.METHODS.OPTIONS,i.METHODS.TRACE,i.METHODS.COPY,i.METHODS.LOCK,i.METHODS.MKCOL,i.METHODS.MOVE,i.METHODS.PROPFIND,i.METHODS.PROPPATCH,i.METHODS.SEARCH,i.METHODS.UNLOCK,i.METHODS.BIND,i.METHODS.REBIND,i.METHODS.UNBIND,i.METHODS.ACL,i.METHODS.REPORT,i.METHODS.MKACTIVITY,i.METHODS.CHECKOUT,i.METHODS.MERGE,i.METHODS["M-SEARCH"],i.METHODS.NOTIFY,i.METHODS.SUBSCRIBE,i.METHODS.UNSUBSCRIBE,i.METHODS.PATCH,i.METHODS.PURGE,i.METHODS.MKCALENDAR,i.METHODS.LINK,i.METHODS.UNLINK,i.METHODS.PRI,i.METHODS.SOURCE,i.METHODS.QUERY],i.METHODS_ICE=[i.METHODS.SOURCE],i.METHODS_RTSP=[i.METHODS.OPTIONS,i.METHODS.DESCRIBE,i.METHODS.ANNOUNCE,i.METHODS.SETUP,i.METHODS.PLAY,i.METHODS.PAUSE,i.METHODS.TEARDOWN,i.METHODS.GET_PARAMETER,i.METHODS.SET_PARAMETER,i.METHODS.REDIRECT,i.METHODS.RECORD,i.METHODS.FLUSH,i.METHODS.GET,i.METHODS.POST],i.METHOD_MAP=(0,r.enumToMap)(i.METHODS),i.H_METHOD_MAP=Object.fromEntries(Object.entries(i.METHODS).filter(([e])=>e.startsWith("H"))),i.STATUSES_HTTP=[i.STATUSES.CONTINUE,i.STATUSES.SWITCHING_PROTOCOLS,i.STATUSES.PROCESSING,i.STATUSES.EARLY_HINTS,i.STATUSES.RESPONSE_IS_STALE,i.STATUSES.REVALIDATION_FAILED,i.STATUSES.DISCONNECTED_OPERATION,i.STATUSES.HEURISTIC_EXPIRATION,i.STATUSES.MISCELLANEOUS_WARNING,i.STATUSES.OK,i.STATUSES.CREATED,i.STATUSES.ACCEPTED,i.STATUSES.NON_AUTHORITATIVE_INFORMATION,i.STATUSES.NO_CONTENT,i.STATUSES.RESET_CONTENT,i.STATUSES.PARTIAL_CONTENT,i.STATUSES.MULTI_STATUS,i.STATUSES.ALREADY_REPORTED,i.STATUSES.TRANSFORMATION_APPLIED,i.STATUSES.IM_USED,i.STATUSES.MISCELLANEOUS_PERSISTENT_WARNING,i.STATUSES.MULTIPLE_CHOICES,i.STATUSES.MOVED_PERMANENTLY,i.STATUSES.FOUND,i.STATUSES.SEE_OTHER,i.STATUSES.NOT_MODIFIED,i.STATUSES.USE_PROXY,i.STATUSES.SWITCH_PROXY,i.STATUSES.TEMPORARY_REDIRECT,i.STATUSES.PERMANENT_REDIRECT,i.STATUSES.BAD_REQUEST,i.STATUSES.UNAUTHORIZED,i.STATUSES.PAYMENT_REQUIRED,i.STATUSES.FORBIDDEN,i.STATUSES.NOT_FOUND,i.STATUSES.METHOD_NOT_ALLOWED,i.STATUSES.NOT_ACCEPTABLE,i.STATUSES.PROXY_AUTHENTICATION_REQUIRED,i.STATUSES.REQUEST_TIMEOUT,i.STATUSES.CONFLICT,i.STATUSES.GONE,i.STATUSES.LENGTH_REQUIRED,i.STATUSES.PRECONDITION_FAILED,i.STATUSES.PAYLOAD_TOO_LARGE,i.STATUSES.URI_TOO_LONG,i.STATUSES.UNSUPPORTED_MEDIA_TYPE,i.STATUSES.RANGE_NOT_SATISFIABLE,i.STATUSES.EXPECTATION_FAILED,i.STATUSES.IM_A_TEAPOT,i.STATUSES.PAGE_EXPIRED,i.STATUSES.ENHANCE_YOUR_CALM,i.STATUSES.MISDIRECTED_REQUEST,i.STATUSES.UNPROCESSABLE_ENTITY,i.STATUSES.LOCKED,i.STATUSES.FAILED_DEPENDENCY,i.STATUSES.TOO_EARLY,i.STATUSES.UPGRADE_REQUIRED,i.STATUSES.PRECONDITION_REQUIRED,i.STATUSES.TOO_MANY_REQUESTS,i.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE_UNOFFICIAL,i.STATUSES.REQUEST_HEADER_FIELDS_TOO_LARGE,i.STATUSES.LOGIN_TIMEOUT,i.STATUSES.NO_RESPONSE,i.STATUSES.RETRY_WITH,i.STATUSES.BLOCKED_BY_PARENTAL_CONTROL,i.STATUSES.UNAVAILABLE_FOR_LEGAL_REASONS,i.STATUSES.CLIENT_CLOSED_LOAD_BALANCED_REQUEST,i.STATUSES.INVALID_X_FORWARDED_FOR,i.STATUSES.REQUEST_HEADER_TOO_LARGE,i.STATUSES.SSL_CERTIFICATE_ERROR,i.STATUSES.SSL_CERTIFICATE_REQUIRED,i.STATUSES.HTTP_REQUEST_SENT_TO_HTTPS_PORT,i.STATUSES.INVALID_TOKEN,i.STATUSES.CLIENT_CLOSED_REQUEST,i.STATUSES.INTERNAL_SERVER_ERROR,i.STATUSES.NOT_IMPLEMENTED,i.STATUSES.BAD_GATEWAY,i.STATUSES.SERVICE_UNAVAILABLE,i.STATUSES.GATEWAY_TIMEOUT,i.STATUSES.HTTP_VERSION_NOT_SUPPORTED,i.STATUSES.VARIANT_ALSO_NEGOTIATES,i.STATUSES.INSUFFICIENT_STORAGE,i.STATUSES.LOOP_DETECTED,i.STATUSES.BANDWIDTH_LIMIT_EXCEEDED,i.STATUSES.NOT_EXTENDED,i.STATUSES.NETWORK_AUTHENTICATION_REQUIRED,i.STATUSES.WEB_SERVER_UNKNOWN_ERROR,i.STATUSES.WEB_SERVER_IS_DOWN,i.STATUSES.CONNECTION_TIMEOUT,i.STATUSES.ORIGIN_IS_UNREACHABLE,i.STATUSES.TIMEOUT_OCCURED,i.STATUSES.SSL_HANDSHAKE_FAILED,i.STATUSES.INVALID_SSL_CERTIFICATE,i.STATUSES.RAILGUN_ERROR,i.STATUSES.SITE_IS_OVERLOADED,i.STATUSES.SITE_IS_FROZEN,i.STATUSES.IDENTITY_PROVIDER_AUTHENTICATION_ERROR,i.STATUSES.NETWORK_READ_TIMEOUT,i.STATUSES.NETWORK_CONNECT_TIMEOUT],i.ALPHA=[];for(let e=65;e<=90;e++)i.ALPHA.push(String.fromCharCode(e)),i.ALPHA.push(String.fromCharCode(e+32));i.NUM_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9},i.HEX_MAP={0:0,1:1,2:2,3:3,4:4,5:5,6:6,7:7,8:8,9:9,A:10,B:11,C:12,D:13,E:14,F:15,a:10,b:11,c:12,d:13,e:14,f:15},i.NUM=["0","1","2","3","4","5","6","7","8","9"],i.ALPHANUM=i.ALPHA.concat(i.NUM),i.MARK=["-","_",".","!","~","*","'","(",")"],i.USERINFO_CHARS=i.ALPHANUM.concat(i.MARK).concat(["%",";",":","&","=","+","$",","]),i.URL_CHAR=["!",'"',"$","%","&","'","(",")","*","+",",","-",".","/",":",";","<","=",">","@","[","\\","]","^","_","`","{","|","}","~"].concat(i.ALPHANUM),i.HEX=i.NUM.concat(["a","b","c","d","e","f","A","B","C","D","E","F"]),i.TOKEN=["!","#","$","%","&","'","*","+","-",".","^","_","`","|","~"].concat(i.ALPHANUM),i.HEADER_CHARS=[" "];for(let e=32;e<=255;e++)127!==e&&i.HEADER_CHARS.push(e);i.CONNECTION_TOKEN_CHARS=i.HEADER_CHARS.filter(e=>44!==e),i.QUOTED_STRING=[" "," "];for(let e=33;e<=255;e++)34!==e&&92!==e&&i.QUOTED_STRING.push(e);i.HTAB_SP_VCHAR_OBS_TEXT=[" "," "];for(let e=33;e<=126;e++)i.HTAB_SP_VCHAR_OBS_TEXT.push(e);for(let e=128;e<=255;e++)i.HTAB_SP_VCHAR_OBS_TEXT.push(e);i.MAJOR=i.NUM_MAP,i.MINOR=i.MAJOR,i.SPECIAL_HEADERS={connection:i.HEADER_STATE.CONNECTION,"content-length":i.HEADER_STATE.CONTENT_LENGTH,"proxy-connection":i.HEADER_STATE.CONNECTION,"transfer-encoding":i.HEADER_STATE.TRANSFER_ENCODING,upgrade:i.HEADER_STATE.UPGRADE},i.default={ERROR:i.ERROR,TYPE:i.TYPE,FLAGS:i.FLAGS,LENIENT_FLAGS:i.LENIENT_FLAGS,METHODS:i.METHODS,STATUSES:i.STATUSES,FINISH:i.FINISH,HEADER_STATE:i.HEADER_STATE,ALPHA:i.ALPHA,NUM_MAP:i.NUM_MAP,HEX_MAP:i.HEX_MAP,NUM:i.NUM,ALPHANUM:i.ALPHANUM,MARK:i.MARK,USERINFO_CHARS:i.USERINFO_CHARS,URL_CHAR:i.URL_CHAR,HEX:i.HEX,TOKEN:i.TOKEN,HEADER_CHARS:i.HEADER_CHARS,CONNECTION_TOKEN_CHARS:i.CONNECTION_TOKEN_CHARS,QUOTED_STRING:i.QUOTED_STRING,HTAB_SP_VCHAR_OBS_TEXT:i.HTAB_SP_VCHAR_OBS_TEXT,MAJOR:i.MAJOR,MINOR:i.MINOR,SPECIAL_HEADERS:i.SPECIAL_HEADERS,METHODS_HTTP:i.METHODS_HTTP,METHODS_ICE:i.METHODS_ICE,METHODS_RTSP:i.METHODS_RTSP,METHOD_MAP:i.METHOD_MAP,H_METHOD_MAP:i.H_METHOD_MAP,STATUSES_HTTP:i.STATUSES_HTTP}},662151,(e,t,i)=>{"use strict";let r,{Buffer:n}=e.r(951615),s="AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmVhc29uABsXbGxodHRwX3NldF9lcnJvcl9yZWFzb24AHBRsbGh0dHBfZ2V0X2Vycm9yX3BvcwAdEWxsaHR0cF9lcnJub19uYW1lAB4SbGxodHRwX21ldGhvZF9uYW1lAB8SbGxodHRwX3N0YXR1c19uYW1lACAabGxodHRwX3NldF9sZW5pZW50X2hlYWRlcnMAISFsbGh0dHBfc2V0X2xlbmllbnRfY2h1bmtlZF9sZW5ndGgAIh1sbGh0dHBfc2V0X2xlbmllbnRfa2VlcF9hbGl2ZQAjJGxsaHR0cF9zZXRfbGVuaWVudF90cmFuc2Zlcl9lbmNvZGluZwAkGmxsaHR0cF9zZXRfbGVuaWVudF92ZXJzaW9uACUjbGxodHRwX3NldF9sZW5pZW50X2RhdGFfYWZ0ZXJfY2xvc2UAJidsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfbGZfYWZ0ZXJfY3IAJyxsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfY3JsZl9hZnRlcl9jaHVuawAoKGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcl9iZWZvcmVfbGYAKSpsbGh0dHBfc2V0X2xlbmllbnRfc3BhY2VzX2FmdGVyX2NodW5rX3NpemUAKhhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YANgkYAQBBAQsSAQIDBAUKBgcyNDMuKy8tLDAxCq/ZAjQWAEHA1QAoAgAEQAALQcDVAEEBNgIACxQAIAAQOCAAIAI2AjggACABOgAoCxQAIAAgAC8BNCAALQAwIAAQNxAACx4BAX9BwAAQOiIBEDggAUGACDYCOCABIAA6ACggAQuPDAEHfwJAIABFDQAgAEEIayIBIABBBGsoAgAiAEF4cSIEaiEFAkAgAEEBcQ0AIABBA3FFDQEgASABKAIAIgBrIgFB1NUAKAIASQ0BIAAgBGohBAJAAkBB2NUAKAIAIAFHBEAgAEH/AU0EQCAAQQN2IQMgASgCCCIAIAEoAgwiAkYEQEHE1QBBxNUAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgASgCGCEGIAEgASgCDCIARwRAIAAgASgCCCICNgIIIAIgADYCDAwDCyABQRRqIgMoAgAiAkUEQCABKAIQIgJFDQIgAUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSgCBCIAQQNxQQNHDQIgBSAAQX5xNgIEQczVACAENgIAIAUgBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgASgCHCICQQJ0QfTXAGoiAygCACABRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAFGG2ogADYCACAARQ0BCyAAIAY2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgAUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBU8NACAFKAIEIgBBAXFFDQACQAJAAkACQCAAQQJxRQRAQdzVACgCACAFRgRAQdzVACABNgIAQdDVAEHQ1QAoAgAgBGoiADYCACABIABBAXI2AgQgAUHY1QAoAgBHDQZBzNUAQQA2AgBB2NUAQQA2AgAMBgtB2NUAKAIAIAVGBEBB2NUAIAE2AgBBzNUAQczVACgCACAEaiIANgIAIAEgAEEBcjYCBCAAIAFqIAA2AgAMBgsgAEF4cSAEaiEEIABB/wFNBEAgAEEDdiEDIAUoAggiACAFKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwFCyACIAA2AgggACACNgIMDAQLIAUoAhghBiAFIAUoAgwiAEcEQEHU1QAoAgAaIAAgBSgCCCICNgIIIAIgADYCDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgL5YUCAgd/A34gASACaiEEAkAgACIDKAIMIgANACADKAIEBEAgAyABNgIECyMAQRBrIgkkAAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAygCHCICQQJrDvwBAfkBAgMEBQYHCAkKCwwNDg8QERL4ARP3ARQV9gEWF/UBGBkaGxwdHh8g/QH7ASH0ASIjJCUmJygpKivzASwtLi8wMTLyAfEBMzTwAe8BNTY3ODk6Ozw9Pj9AQUJDREVGR0hJSktMTU5P+gFQUVJT7gHtAVTsAVXrAVZXWFla6gFbXF1eX2BhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ent8fX5/gAGBAYIBgwGEAYUBhgGHAYgBiQGKAYsBjAGNAY4BjwGQAZEBkgGTAZQBlQGWAZcBmAGZAZoBmwGcAZ0BngGfAaABoQGiAaMBpAGlAaYBpwGoAakBqgGrAawBrQGuAa8BsAGxAbIBswG0AbUBtgG3AbgBuQG6AbsBvAG9Ab4BvwHAAcEBwgHDAcQBxQHGAccByAHJAcoBywHMAc0BzgHpAegBzwHnAdAB5gHRAdIB0wHUAeUB1QHWAdcB2AHZAdoB2wHcAd0B3gHfAeAB4QHiAeMBAPwBC0EADOMBC0EODOIBC0ENDOEBC0EPDOABC0EQDN8BC0ETDN4BC0EUDN0BC0EVDNwBC0EWDNsBC0EXDNoBC0EYDNkBC0EZDNgBC0EaDNcBC0EbDNYBC0EcDNUBC0EdDNQBC0EeDNMBC0EfDNIBC0EgDNEBC0EhDNABC0EIDM8BC0EiDM4BC0EkDM0BC0EjDMwBC0EHDMsBC0ElDMoBC0EmDMkBC0EnDMgBC0EoDMcBC0ESDMYBC0ERDMUBC0EpDMQBC0EqDMMBC0ErDMIBC0EsDMEBC0HeAQzAAQtBLgy/AQtBLwy+AQtBMAy9AQtBMQy8AQtBMgy7AQtBMwy6AQtBNAy5AQtB3wEMuAELQTUMtwELQTkMtgELQQwMtQELQTYMtAELQTcMswELQTgMsgELQT4MsQELQToMsAELQeABDK8BC0ELDK4BC0E/DK0BC0E7DKwBC0EKDKsBC0E8DKoBC0E9DKkBC0HhAQyoAQtBwQAMpwELQcAADKYBC0HCAAylAQtBCQykAQtBLQyjAQtBwwAMogELQcQADKEBC0HFAAygAQtBxgAMnwELQccADJ4BC0HIAAydAQtByQAMnAELQcoADJsBC0HLAAyaAQtBzAAMmQELQc0ADJgBC0HOAAyXAQtBzwAMlgELQdAADJUBC0HRAAyUAQtB0gAMkwELQdMADJIBC0HVAAyRAQtB1AAMkAELQdYADI8BC0HXAAyOAQtB2AAMjQELQdkADIwBC0HaAAyLAQtB2wAMigELQdwADIkBC0HdAAyIAQtB3gAMhwELQd8ADIYBC0HgAAyFAQtB4QAMhAELQeIADIMBC0HjAAyCAQtB5AAMgQELQeUADIABC0HiAQx/C0HmAAx+C0HnAAx9C0EGDHwLQegADHsLQQUMegtB6QAMeQtBBAx4C0HqAAx3C0HrAAx2C0HsAAx1C0HtAAx0C0EDDHMLQe4ADHILQe8ADHELQfAADHALQfIADG8LQfEADG4LQfMADG0LQfQADGwLQfUADGsLQfYADGoLQQIMaQtB9wAMaAtB+AAMZwtB+QAMZgtB+gAMZQtB+wAMZAtB/AAMYwtB/QAMYgtB/gAMYQtB/wAMYAtBgAEMXwtBgQEMXgtBggEMXQtBgwEMXAtBhAEMWwtBhQEMWgtBhgEMWQtBhwEMWAtBiAEMVwtBiQEMVgtBigEMVQtBiwEMVAtBjAEMUwtBjQEMUgtBjgEMUQtBjwEMUAtBkAEMTwtBkQEMTgtBkgEMTQtBkwEMTAtBlAEMSwtBlQEMSgtBlgEMSQtBlwEMSAtBmAEMRwtBmQEMRgtBmgEMRQtBmwEMRAtBnAEMQwtBnQEMQgtBngEMQQtBnwEMQAtBoAEMPwtBoQEMPgtBogEMPQtBowEMPAtBpAEMOwtBpQEMOgtBpgEMOQtBpwEMOAtBqAEMNwtBqQEMNgtBqgEMNQtBqwEMNAtBrAEMMwtBrQEMMgtBrgEMMQtBrwEMMAtBsAEMLwtBsQEMLgtBsgEMLQtBswEMLAtBtAEMKwtBtQEMKgtBtgEMKQtBtwEMKAtBuAEMJwtBuQEMJgtBugEMJQtBuwEMJAtBvAEMIwtBvQEMIgtBvgEMIQtBvwEMIAtBwAEMHwtBwQEMHgtBwgEMHQtBAQwcC0HDAQwbC0HEAQwaC0HFAQwZC0HGAQwYC0HHAQwXC0HIAQwWC0HJAQwVC0HKAQwUC0HLAQwTC0HMAQwSC0HNAQwRC0HOAQwQC0HPAQwPC0HQAQwOC0HRAQwNC0HSAQwMC0HTAQwLC0HUAQwKC0HVAQwJC0HWAQwIC0HjAQwHC0HXAQwGC0HYAQwFC0HZAQwEC0HaAQwDC0HbAQwCC0HdAQwBC0HcAQshAgNAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQAJ/AkACQAJAAn8CQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAg7jAQABAgMEBQYHCAkKCwwNDg8QERITFBUWFxgZGhscHR4fICEjJCUnKCmeA5sDmgORA4oDgwOAA/0C+wL4AvIC8QLvAu0C6ALnAuYC5QLkAtwC2wLaAtkC2ALXAtYC1QLPAs4CzALLAsoCyQLIAscCxgLEAsMCvgK8AroCuQK4ArcCtgK1ArQCswKyArECsAKuAq0CqQKoAqcCpgKlAqQCowKiAqECoAKfApgCkAKMAosCigKBAv4B/QH8AfsB+gH5AfgB9wH1AfMB8AHrAekB6AHnAeYB5QHkAeMB4gHhAeAB3wHeAd0B3AHaAdkB2AHXAdYB1QHUAdMB0gHRAdABzwHOAc0BzAHLAcoByQHIAccBxgHFAcQBwwHCAcEBwAG/Ab4BvQG8AbsBugG5AbgBtwG2AbUBtAGzAbIBsQGwAa8BrgGtAawBqwGqAakBqAGnAaYBpQGkAaMBogGfAZ4BmQGYAZcBlgGVAZQBkwGSAZEBkAGPAY0BjAGHAYYBhQGEAYMBggF9fHt6eXZ1dFBRUlNUVQsgASAERw1yQf0BIQIMvgMLIAEgBEcNmAFB2wEhAgy9AwsgASAERw3xAUGOASECDLwDCyABIARHDfwBQYQBIQIMuwMLIAEgBEcNigJB/wAhAgy6AwsgASAERw2RAkH9ACECDLkDCyABIARHDZQCQfsAIQIMuAMLIAEgBEcNHkEeIQIMtwMLIAEgBEcNGUEYIQIMtgMLIAEgBEcNygJBzQAhAgy1AwsgASAERw3VAkHGACECDLQDCyABIARHDdYCQcMAIQIMswMLIAEgBEcN3AJBOCECDLIDCyADLQAwQQFGDa0DDIkDC0EAIQACQAJAAkAgAy0AKkUNACADLQArRQ0AIAMvATIiAkECcUUNAQwCCyADLwEyIgJBAXFFDQELQQEhACADLQAoQQFGDQAgAy8BNCIGQeQAa0HkAEkNACAGQcwBRg0AIAZBsAJGDQAgAkHAAHENAEEAIQAgAkGIBHFBgARGDQAgAkEocUEARyEACyADQQA7ATIgA0EAOgAxAkAgAEUEQCADQQA6ADEgAy0ALkEEcQ0BDLEDCyADQgA3AyALIANBADoAMSADQQE6ADYMSAtBACEAAkAgAygCOCICRQ0AIAIoAjAiAkUNACADIAIRAAAhAAsgAEUNSCAAQRVHDWIgA0EENgIcIAMgATYCFCADQdIbNgIQIANBFTYCDEEAIQIMrwMLIAEgBEYEQEEGIQIMrwMLIAEtAABBCkcNGSABQQFqIQEMGgsgA0IANwMgQRIhAgyUAwsgASAERw2KA0EjIQIMrAMLIAEgBEYEQEEHIQIMrAMLAkACQCABLQAAQQprDgQBGBgAGAsgAUEBaiEBQRAhAgyTAwsgAUEBaiEBIANBL2otAABBAXENF0EAIQIgA0EANgIcIAMgATYCFCADQZkgNgIQIANBGTYCDAyrAwsgAyADKQMgIgwgBCABa60iCn0iC0IAIAsgDFgbNwMgIAogDFoNGEEIIQIMqgMLIAEgBEcEQCADQQk2AgggAyABNgIEQRQhAgyRAwtBCSECDKkDCyADKQMgUA2uAgxDCyABIARGBEBBCyECDKgDCyABLQAAQQpHDRYgAUEBaiEBDBcLIANBL2otAABBAXFFDRkMJgtBACEAAkAgAygCOCICRQ0AIAIoAlAiAkUNACADIAIRAAAhAAsgAA0ZDEILQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANGgwkC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADRsMMgsgA0Evai0AAEEBcUUNHAwiC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADRwMQgtBACEAAkAgAygCOCICRQ0AIAIoAlQiAkUNACADIAIRAAAhAAsgAA0dDCALIAEgBEYEQEETIQIMoAMLAkAgAS0AACIAQQprDgQfIyMAIgsgAUEBaiEBDB8LQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANIgxCCyABIARGBEBBFiECDJ4DCyABLQAAQcDBAGotAABBAUcNIwyDAwsCQANAIAEtAABBsDtqLQAAIgBBAUcEQAJAIABBAmsOAgMAJwsgAUEBaiEBQSEhAgyGAwsgBCABQQFqIgFHDQALQRghAgydAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAFBAWoiARA0IgANIQxBC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADSMMKgsgASAERgRAQRwhAgybAwsgA0EKNgIIIAMgATYCBEEAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADSVBJCECDIEDCyABIARHBEADQCABLQAAQbA9ai0AACIAQQNHBEAgAEEBaw4FGBomggMlJgsgBCABQQFqIgFHDQALQRshAgyaAwtBGyECDJkDCwNAIAEtAABBsD9qLQAAIgBBA0cEQCAAQQFrDgUPEScTJicLIAQgAUEBaiIBRw0AC0EeIQIMmAMLIAEgBEcEQCADQQs2AgggAyABNgIEQQchAgz/AgtBHyECDJcDCyABIARGBEBBICECDJcDCwJAIAEtAABBDWsOFC4/Pz8/Pz8/Pz8/Pz8/Pz8/Pz8APwtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQMlgMLIANBL2ohAgNAIAEgBEYEQEEhIQIMlwMLAkACQAJAIAEtAAAiAEEJaw4YAgApKQEpKSkpKSkpKSkpKSkpKSkpKSkCJwsgAUEBaiEBIANBL2otAABBAXFFDQoMGAsgAUEBaiEBDBcLIAFBAWohASACLQAAQQJxDQALQQAhAiADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMDJUDCyADLQAuQYABcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUN5gIgAEEVRgRAIANBJDYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDJQDC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAyTAwtBACECIANBADYCHCADIAE2AhQgA0G+IDYCECADQQI2AgwMkgMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABIAynaiIBEDIiAEUNKyADQQc2AhwgAyABNgIUIAMgADYCDAyRAwsgAy0ALkHAAHFFDQELQQAhAAJAIAMoAjgiAkUNACACKAJYIgJFDQAgAyACEQAAIQALIABFDSsgAEEVRgRAIANBCjYCHCADIAE2AhQgA0HrGTYCECADQRU2AgxBACECDJADC0EAIQIgA0EANgIcIAMgATYCFCADQZMMNgIQIANBEzYCDAyPAwtBACECIANBADYCHCADIAE2AhQgA0GCFTYCECADQQI2AgwMjgMLQQAhAiADQQA2AhwgAyABNgIUIANB3RQ2AhAgA0EZNgIMDI0DC0EAIQIgA0EANgIcIAMgATYCFCADQeYdNgIQIANBGTYCDAyMAwsgAEEVRg09QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIsDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFDSggA0ENNgIcIAMgATYCFCADIAA2AgwMigMLIABBFUYNOkEAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAyJAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwoCyADQQ42AhwgAyAANgIMIAMgAUEBajYCFAyIAwsgAEEVRg03QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIcDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCcLIANBDzYCHCADIAA2AgwgAyABQQFqNgIUDIYDC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAyFAwsgAEEVRg0zQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIQDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFDSUgA0ERNgIcIAMgATYCFCADIAA2AgwMgwMLIABBFUYNMEEAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAyCAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwlCyADQRI2AhwgAyAANgIMIAMgAUEBajYCFAyBAwsgA0Evai0AAEEBcUUNAQtBFyECDOYCC0EAIQIgA0EANgIcIAMgATYCFCADQeIXNgIQIANBGTYCDAz+AgsgAEE7Rw0AIAFBAWohAQwMC0EAIQIgA0EANgIcIAMgATYCFCADQZIYNgIQIANBAjYCDAz8AgsgAEEVRg0oQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDPsCCyADQRQ2AhwgAyABNgIUIAMgADYCDAz6AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQz1AgsgA0EVNgIcIAMgADYCDCADIAFBAWo2AhQM+QILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEM8wILIANBFzYCHCADIAA2AgwgAyABQQFqNgIUDPgCCyAAQRVGDSNBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM9wILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEMHQsgA0EZNgIcIAMgADYCDCADIAFBAWo2AhQM9gILIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUEQCABQQFqIQEM7wILIANBGjYCHCADIAA2AgwgAyABQQFqNgIUDPUCCyAAQRVGDR9BACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwM9AILIAMoAgQhACADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQwbCyADQRw2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8wILIAMoAgQhACADQQA2AgQgAyAAIAEQMyIARQRAIAFBAWohAQzrAgsgA0EdNgIcIAMgADYCDCADIAFBAWo2AhRBACECDPICCyAAQTtHDQEgAUEBaiEBC0EmIQIM1wILQQAhAiADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMDO8CCyABIARHBEADQCABLQAAQSBHDYQCIAQgAUEBaiIBRw0AC0EsIQIM7wILQSwhAgzuAgsgASAERgRAQTQhAgzuAgsCQAJAA0ACQCABLQAAQQprDgQCAAADAAsgBCABQQFqIgFHDQALQTQhAgzvAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDZ8CIANBMjYCHCADIAE2AhQgAyAANgIMQQAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDJ8CCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM7QILIAEgBEcEQAJAA0AgAS0AAEEwayIAQf8BcUEKTwRAQTohAgzXAgsgAykDICILQpmz5syZs+bMGVYNASADIAtCCn4iCjcDICAKIACtQv8BgyILQn+FVg0BIAMgCiALfDcDICAEIAFBAWoiAUcNAAtBwAAhAgzuAgsgAygCBCEAIANBADYCBCADIAAgAUEBaiIBEDEiAA0XDOICC0HAACECDOwCCyABIARGBEBByQAhAgzsAgsCQANAAkAgAS0AAEEJaw4YAAKiAqICqQKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogIAogILIAQgAUEBaiIBRw0AC0HJACECDOwCCyABQQFqIQEgA0Evai0AAEEBcQ2lAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgzrAgsgASAERwRAA0AgAS0AAEEgRw0VIAQgAUEBaiIBRw0AC0H4ACECDOsCC0H4ACECDOoCCyADQQI6ACgMOAtBACECIANBADYCHCADQb8LNgIQIANBAjYCDCADIAFBAWo2AhQM6AILQQAhAgzOAgtBDSECDM0CC0ETIQIMzAILQRUhAgzLAgtBFiECDMoCC0EYIQIMyQILQRkhAgzIAgtBGiECDMcCC0EbIQIMxgILQRwhAgzFAgtBHSECDMQCC0EeIQIMwwILQR8hAgzCAgtBICECDMECC0EiIQIMwAILQSMhAgy/AgtBJSECDL4CC0HlACECDL0CCyADQT02AhwgAyABNgIUIAMgADYCDEEAIQIM1QILIANBGzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDNQCCyADQSA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzTAgsgA0ETNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0gILIANBCzYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNECCyADQRA2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzQAgsgA0EgNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzwILIANBCzYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM4CCyADQQw2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzNAgtBACECIANBADYCHCADIAE2AhQgA0HdDjYCECADQRI2AgwMzAILAkADQAJAIAEtAABBCmsOBAACAgACCyAEIAFBAWoiAUcNAAtB/QEhAgzMAgsCQAJAIAMtADZBAUcNAEEAIQACQCADKAI4IgJFDQAgAigCYCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUcNASADQfwBNgIcIAMgATYCFCADQdwZNgIQIANBFTYCDEEAIQIMzQILQdwBIQIMswILIANBADYCHCADIAE2AhQgA0H5CzYCECADQR82AgxBACECDMsCCwJAAkAgAy0AKEEBaw4CBAEAC0HbASECDLICC0HUASECDLECCyADQQI6ADFBACEAAkAgAygCOCICRQ0AIAIoAgAiAkUNACADIAIRAAAhAAsgAEUEQEHdASECDLECCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQbQMNgIQIANBEDYCDEEAIQIMygILIANB+wE2AhwgAyABNgIUIANBgRo2AhAgA0EVNgIMQQAhAgzJAgsgASAERgRAQfoBIQIMyQILIAEtAABByABGDQEgA0EBOgAoC0HAASECDK4CC0HaASECDK0CCyABIARHBEAgA0EMNgIIIAMgATYCBEHZASECDK0CC0H5ASECDMUCCyABIARGBEBB+AEhAgzFAgsgAS0AAEHIAEcNBCABQQFqIQFB2AEhAgyrAgsgASAERgRAQfcBIQIMxAILAkACQCABLQAAQcUAaw4QAAUFBQUFBQUFBQUFBQUFAQULIAFBAWohAUHWASECDKsCCyABQQFqIQFB1wEhAgyqAgtB9gEhAiABIARGDcICIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbrVAGotAABHDQMgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMMCCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIARQRAQeMBIQIMqgILIANB9QE2AhwgAyABNgIUIAMgADYCDEEAIQIMwgILQfQBIQIgASAERg3BAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEG41QBqLQAARw0CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzCAgsgA0GBBDsBKCADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQLiIADQMMAgsgA0EANgIAC0EAIQIgA0EANgIcIAMgATYCFCADQeUfNgIQIANBCDYCDAy/AgtB1QEhAgylAgsgA0HzATYCHCADIAE2AhQgAyAANgIMQQAhAgy9AgtBACEAAkAgAygCOCICRQ0AIAIoAkAiAkUNACADIAIRAAAhAAsgAEUNbiAAQRVHBEAgA0EANgIcIAMgATYCFCADQYIPNgIQIANBIDYCDEEAIQIMvQILIANBjwE2AhwgAyABNgIUIANB7Bs2AhAgA0EVNgIMQQAhAgy8AgsgASAERwRAIANBDTYCCCADIAE2AgRB0wEhAgyjAgtB8gEhAgy7AgsgASAERgRAQfEBIQIMuwILAkACQAJAIAEtAABByABrDgsAAQgICAgICAgIAggLIAFBAWohAUHQASECDKMCCyABQQFqIQFB0QEhAgyiAgsgAUEBaiEBQdIBIQIMoQILQfABIQIgASAERg25AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBtdUAai0AAEcNBCAAQQJGDQMgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuQILQe8BIQIgASAERg24AiADKAIAIgAgBCABa2ohBiABIABrQQFqIQUDQCABLQAAIABBs9UAai0AAEcNAyAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMuAILQe4BIQIgASAERg23AiADKAIAIgAgBCABa2ohBiABIABrQQJqIQUDQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAY2AgAMtwILIAMoAgQhACADQgA3AwAgAyAAIAVBAWoiARArIgBFDQIgA0HsATYCHCADIAE2AhQgAyAANgIMQQAhAgy2AgsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNnAIgA0HtATYCHCADIAE2AhQgAyAANgIMQQAhAgy0AgtBzwEhAgyaAgtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDLQCC0HOASECDJoCCyADQesBNgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMsgILIAEgBEYEQEHrASECDLICCyABLQAAQS9GBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GyODYCECADQQg2AgxBACECDLECC0HNASECDJcCCyABIARHBEAgA0EONgIIIAMgATYCBEHMASECDJcCC0HqASECDK8CCyABIARGBEBB6QEhAgyvAgsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFBywEhAgyWAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZcCIANB6AE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAEgBEYEQEHnASECDK4CCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5gE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILQcoBIQIMlAILIAEgBEYEQEHlASECDK0CC0EAIQBBASEFQQEhB0EAIQICQAJAAkACQAJAAn8CQAJAAkACQAJAAkACQCABLQAAQTBrDgoKCQABAgMEBQYICwtBAgwGC0EDDAULQQQMBAtBBQwDC0EGDAILQQcMAQtBCAshAkEAIQVBACEHDAILQQkhAkEBIQBBACEFQQAhBwwBC0EAIQVBASECCyADIAI6ACsgAUEBaiEBAkACQCADLQAuQRBxDQACQAJAAkAgAy0AKg4DAQACBAsgB0UNAwwCCyAADQEMAgsgBUUNAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDQIgA0HiATYCHCADIAE2AhQgAyAANgIMQQAhAgyvAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZoCIANB4wE2AhwgAyABNgIUIAMgADYCDEEAIQIMrgILIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ2YAiADQeQBNgIcIAMgATYCFCADIAA2AgwMrQILQckBIQIMkwILQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgytAgtByAEhAgyTAgsgA0HhATYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDKsCCyABIARGBEBB4QEhAgyrAgsCQCABLQAAQSBGBEAgA0EAOwE0IAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBmRE2AhAgA0EJNgIMQQAhAgyrAgtBxwEhAgyRAgsgASAERgRAQeABIQIMqgILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyrAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqgILQcYBIQIMkAILIAEgBEYEQEHfASECDKkCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqgILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKkCC0HFASECDI8CCyABIARGBEBB3gEhAgyoAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKkCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyoAgtBxAEhAgyOAgsgASAERgRAQd0BIQIMpwILAkACQAJAAkAgAS0AAEEKaw4XAgMDAAMDAwMDAwMDAwMDAwMDAwMDAwEDCyABQQFqDAULIAFBAWohAUHDASECDI8CCyABQQFqIQEgA0Evai0AAEEBcQ0IIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKcCCyADQQA2AhwgAyABNgIUIANBjQs2AhAgA0ENNgIMQQAhAgymAgsgASAERwRAIANBDzYCCCADIAE2AgRBASECDI0CC0HcASECDKUCCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtB2wEhAgymAgsgAygCBCEAIANBADYCBCADIAAgARAtIgBFBEAgAUEBaiEBDAQLIANB2gE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMpQILIAMoAgQhACADQQA2AgQgAyAAIAEQLSIADQEgAUEBagshAUHBASECDIoCCyADQdkBNgIcIAMgADYCDCADIAFBAWo2AhRBACECDKICC0HCASECDIgCCyADQS9qLQAAQQFxDQEgA0EANgIcIAMgATYCFCADQeQcNgIQIANBGTYCDEEAIQIMoAILIAEgBEYEQEHZASECDKACCwJAAkACQCABLQAAQQprDgQBAgIAAgsgAUEBaiEBDAILIAFBAWohAQwBCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAjwiAkUNACADIAIRAAAhAAsgAEUNoAEgAEEVRgRAIANB2QA2AhwgAyABNgIUIANBtxo2AhAgA0EVNgIMQQAhAgyfAgsgA0EANgIcIAMgATYCFCADQYANNgIQIANBGzYCDEEAIQIMngILIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDJ0CCyABIARHBEAgA0EMNgIIIAMgATYCBEG/ASECDIQCC0HYASECDJwCCyABIARGBEBB1wEhAgycAgsCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBwQBrDhUAAQIDWgQFBlpaWgcICQoLDA0ODxBaCyABQQFqIQFB+wAhAgySAgsgAUEBaiEBQfwAIQIMkQILIAFBAWohAUGBASECDJACCyABQQFqIQFBhQEhAgyPAgsgAUEBaiEBQYYBIQIMjgILIAFBAWohAUGJASECDI0CCyABQQFqIQFBigEhAgyMAgsgAUEBaiEBQY0BIQIMiwILIAFBAWohAUGWASECDIoCCyABQQFqIQFBlwEhAgyJAgsgAUEBaiEBQZgBIQIMiAILIAFBAWohAUGlASECDIcCCyABQQFqIQFBpgEhAgyGAgsgAUEBaiEBQawBIQIMhQILIAFBAWohAUG0ASECDIQCCyABQQFqIQFBtwEhAgyDAgsgAUEBaiEBQb4BIQIMggILIAEgBEYEQEHWASECDJsCCyABLQAAQc4ARw1IIAFBAWohAUG9ASECDIECCyABIARGBEBB1QEhAgyaAgsCQAJAAkAgAS0AAEHCAGsOEgBKSkpKSkpKSkoBSkpKSkpKAkoLIAFBAWohAUG4ASECDIICCyABQQFqIQFBuwEhAgyBAgsgAUEBaiEBQbwBIQIMgAILQdQBIQIgASAERg2YAiADKAIAIgAgBCABa2ohBSABIABrQQdqIQYCQANAIAEtAAAgAEGo1QBqLQAARw1FIABBB0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAgsgA0EANgIAIAZBAWohAUEbDEULIAEgBEYEQEHTASECDJgCCwJAAkAgAS0AAEHJAGsOBwBHR0dHRwFHCyABQQFqIQFBuQEhAgz/AQsgAUEBaiEBQboBIQIM/gELQdIBIQIgASAERg2WAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw1DIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyXAgsgA0EANgIAIAZBAWohAUEPDEMLQdEBIQIgASAERg2VAiADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw1CIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyWAgsgA0EANgIAIAZBAWohAUEgDEILQdABIQIgASAERg2UAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw1BIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyVAgsgA0EANgIAIAZBAWohAUESDEELIAEgBEYEQEHPASECDJQCCwJAAkAgAS0AAEHFAGsODgBDQ0NDQ0NDQ0NDQ0MBQwsgAUEBaiEBQbUBIQIM+wELIAFBAWohAUG2ASECDPoBC0HOASECIAEgBEYNkgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBntUAai0AAEcNPyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkwILIANBADYCACAGQQFqIQFBBww/C0HNASECIAEgBEYNkQIgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBmNUAai0AAEcNPiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkgILIANBADYCACAGQQFqIQFBKAw+CyABIARGBEBBzAEhAgyRAgsCQAJAAkAgAS0AAEHFAGsOEQBBQUFBQUFBQUEBQUFBQUECQQsgAUEBaiEBQbEBIQIM+QELIAFBAWohAUGyASECDPgBCyABQQFqIQFBswEhAgz3AQtBywEhAiABIARGDY8CIAMoAgAiACAEIAFraiEFIAEgAGtBBmohBgJAA0AgAS0AACAAQZHVAGotAABHDTwgAEEGRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJACCyADQQA2AgAgBkEBaiEBQRoMPAtBygEhAiABIARGDY4CIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQY3VAGotAABHDTsgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADI8CCyADQQA2AgAgBkEBaiEBQSEMOwsgASAERgRAQckBIQIMjgILAkACQCABLQAAQcEAaw4UAD09PT09PT09PT09PT09PT09PQE9CyABQQFqIQFBrQEhAgz1AQsgAUEBaiEBQbABIQIM9AELIAEgBEYEQEHIASECDI0CCwJAAkAgAS0AAEHVAGsOCwA8PDw8PDw8PDwBPAsgAUEBaiEBQa4BIQIM9AELIAFBAWohAUGvASECDPMBC0HHASECIAEgBEYNiwIgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNOCAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjAILIANBADYCACAGQQFqIQFBKgw4CyABIARGBEBBxgEhAgyLAgsgAS0AAEHQAEcNOCABQQFqIQFBJQw3C0HFASECIAEgBEYNiQIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBgdUAai0AAEcNNiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMigILIANBADYCACAGQQFqIQFBDgw2CyABIARGBEBBxAEhAgyJAgsgAS0AAEHFAEcNNiABQQFqIQFBqwEhAgzvAQsgASAERgRAQcMBIQIMiAILAkACQAJAAkAgAS0AAEHCAGsODwABAjk5OTk5OTk5OTk5AzkLIAFBAWohAUGnASECDPEBCyABQQFqIQFBqAEhAgzwAQsgAUEBaiEBQakBIQIM7wELIAFBAWohAUGqASECDO4BC0HCASECIAEgBEYNhgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB/tQAai0AAEcNMyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhwILIANBADYCACAGQQFqIQFBFAwzC0HBASECIAEgBEYNhQIgAygCACIAIAQgAWtqIQUgASAAa0EEaiEGAkADQCABLQAAIABB+dQAai0AAEcNMiAAQQRGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhgILIANBADYCACAGQQFqIQFBKwwyC0HAASECIAEgBEYNhAIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABB9tQAai0AAEcNMSAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhQILIANBADYCACAGQQFqIQFBLAwxC0G/ASECIAEgBEYNgwIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBodUAai0AAEcNMCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMhAILIANBADYCACAGQQFqIQFBEQwwC0G+ASECIAEgBEYNggIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB8tQAai0AAEcNLyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMgwILIANBADYCACAGQQFqIQFBLgwvCyABIARGBEBBvQEhAgyCAgsCQAJAAkACQAJAIAEtAABBwQBrDhUANDQ0NDQ0NDQ0NAE0NAI0NAM0NAQ0CyABQQFqIQFBmwEhAgzsAQsgAUEBaiEBQZwBIQIM6wELIAFBAWohAUGdASECDOoBCyABQQFqIQFBogEhAgzpAQsgAUEBaiEBQaQBIQIM6AELIAEgBEYEQEG8ASECDIECCwJAAkAgAS0AAEHSAGsOAwAwATALIAFBAWohAUGjASECDOgBCyABQQFqIQFBBAwtC0G7ASECIAEgBEYN/wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB8NQAai0AAEcNLCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMgAILIANBADYCACAGQQFqIQFBHQwsCyABIARGBEBBugEhAgz/AQsCQAJAIAEtAABByQBrDgcBLi4uLi4ALgsgAUEBaiEBQaEBIQIM5gELIAFBAWohAUEiDCsLIAEgBEYEQEG5ASECDP4BCyABLQAAQdAARw0rIAFBAWohAUGgASECDOQBCyABIARGBEBBuAEhAgz9AQsCQAJAIAEtAABBxgBrDgsALCwsLCwsLCwsASwLIAFBAWohAUGeASECDOQBCyABQQFqIQFBnwEhAgzjAQtBtwEhAiABIARGDfsBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQezUAGotAABHDSggAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPwBCyADQQA2AgAgBkEBaiEBQQ0MKAtBtgEhAiABIARGDfoBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDScgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPsBCyADQQA2AgAgBkEBaiEBQQwMJwtBtQEhAiABIARGDfkBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQerUAGotAABHDSYgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPoBCyADQQA2AgAgBkEBaiEBQQMMJgtBtAEhAiABIARGDfgBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQejUAGotAABHDSUgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPkBCyADQQA2AgAgBkEBaiEBQSYMJQsgASAERgRAQbMBIQIM+AELAkACQCABLQAAQdQAaw4CAAEnCyABQQFqIQFBmQEhAgzfAQsgAUEBaiEBQZoBIQIM3gELQbIBIQIgASAERg32ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHm1ABqLQAARw0jIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz3AQsgA0EANgIAIAZBAWohAUEnDCMLQbEBIQIgASAERg31ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHk1ABqLQAARw0iIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz2AQsgA0EANgIAIAZBAWohAUEcDCILQbABIQIgASAERg30ASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHe1ABqLQAARw0hIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz1AQsgA0EANgIAIAZBAWohAUEGDCELQa8BIQIgASAERg3zASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEHZ1ABqLQAARw0gIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAz0AQsgA0EANgIAIAZBAWohAUEZDCALIAEgBEYEQEGuASECDPMBCwJAAkACQAJAIAEtAABBLWsOIwAkJCQkJCQkJCQkJCQkJCQkJCQkJCQkJAEkJCQkJAIkJCQDJAsgAUEBaiEBQY4BIQIM3AELIAFBAWohAUGPASECDNsBCyABQQFqIQFBlAEhAgzaAQsgAUEBaiEBQZUBIQIM2QELQa0BIQIgASAERg3xASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHX1ABqLQAARw0eIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzyAQsgA0EANgIAIAZBAWohAUELDB4LIAEgBEYEQEGsASECDPEBCwJAAkAgAS0AAEHBAGsOAwAgASALIAFBAWohAUGQASECDNgBCyABQQFqIQFBkwEhAgzXAQsgASAERgRAQasBIQIM8AELAkACQCABLQAAQcEAaw4PAB8fHx8fHx8fHx8fHx8BHwsgAUEBaiEBQZEBIQIM1wELIAFBAWohAUGSASECDNYBCyABIARGBEBBqgEhAgzvAQsgAS0AAEHMAEcNHCABQQFqIQFBCgwbC0GpASECIAEgBEYN7QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABB0dQAai0AAEcNGiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7gELIANBADYCACAGQQFqIQFBHgwaC0GoASECIAEgBEYN7AEgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBytQAai0AAEcNGSAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7QELIANBADYCACAGQQFqIQFBFQwZC0GnASECIAEgBEYN6wEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBx9QAai0AAEcNGCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM7AELIANBADYCACAGQQFqIQFBFwwYC0GmASECIAEgBEYN6gEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBwdQAai0AAEcNFyAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6wELIANBADYCACAGQQFqIQFBGAwXCyABIARGBEBBpQEhAgzqAQsCQAJAIAEtAABByQBrDgcAGRkZGRkBGQsgAUEBaiEBQYsBIQIM0QELIAFBAWohAUGMASECDNABC0GkASECIAEgBEYN6AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBptUAai0AAEcNFSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6QELIANBADYCACAGQQFqIQFBCQwVC0GjASECIAEgBEYN5wEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBpNUAai0AAEcNFCAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM6AELIANBADYCACAGQQFqIQFBHwwUC0GiASECIAEgBEYN5gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBvtQAai0AAEcNEyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5wELIANBADYCACAGQQFqIQFBAgwTC0GhASECIAEgBEYN5QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGA0AgAS0AACAAQbzUAGotAABHDREgAEEBRg0CIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADOUBCyABIARGBEBBoAEhAgzlAQtBASABLQAAQd8ARw0RGiABQQFqIQFBhwEhAgzLAQsgA0EANgIAIAZBAWohAUGIASECDMoBC0GfASECIAEgBEYN4gEgAygCACIAIAQgAWtqIQUgASAAa0EIaiEGAkADQCABLQAAIABBhNUAai0AAEcNDyAAQQhGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4wELIANBADYCACAGQQFqIQFBKQwPC0GeASECIAEgBEYN4QEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBuNQAai0AAEcNDiAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM4gELIANBADYCACAGQQFqIQFBLQwOCyABIARGBEBBnQEhAgzhAQsgAS0AAEHFAEcNDiABQQFqIQFBhAEhAgzHAQsgASAERgRAQZwBIQIM4AELAkACQCABLQAAQcwAaw4IAA8PDw8PDwEPCyABQQFqIQFBggEhAgzHAQsgAUEBaiEBQYMBIQIMxgELQZsBIQIgASAERg3eASADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEGz1ABqLQAARw0LIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzfAQsgA0EANgIAIAZBAWohAUEjDAsLQZoBIQIgASAERg3dASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGw1ABqLQAARw0KIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzeAQsgA0EANgIAIAZBAWohAUEADAoLIAEgBEYEQEGZASECDN0BCwJAAkAgAS0AAEHIAGsOCAAMDAwMDAwBDAsgAUEBaiEBQf0AIQIMxAELIAFBAWohAUGAASECDMMBCyABIARGBEBBmAEhAgzcAQsCQAJAIAEtAABBzgBrDgMACwELCyABQQFqIQFB/gAhAgzDAQsgAUEBaiEBQf8AIQIMwgELIAEgBEYEQEGXASECDNsBCyABLQAAQdkARw0IIAFBAWohAUEIDAcLQZYBIQIgASAERg3ZASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEGs1ABqLQAARw0GIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzaAQsgA0EANgIAIAZBAWohAUEFDAYLQZUBIQIgASAERg3YASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGm1ABqLQAARw0FIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzZAQsgA0EANgIAIAZBAWohAUEWDAULQZQBIQIgASAERg3XASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0EIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzYAQsgA0EANgIAIAZBAWohAUEQDAQLIAEgBEYEQEGTASECDNcBCwJAAkAgAS0AAEHDAGsODAAGBgYGBgYGBgYGAQYLIAFBAWohAUH5ACECDL4BCyABQQFqIQFB+gAhAgy9AQtBkgEhAiABIARGDdUBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQaDUAGotAABHDQIgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNYBCyADQQA2AgAgBkEBaiEBQSQMAgsgA0EANgIADAILIAEgBEYEQEGRASECDNQBCyABLQAAQcwARw0BIAFBAWohAUETCzoAKSADKAIEIQAgA0EANgIEIAMgACABEC4iAA0CDAELQQAhAiADQQA2AhwgAyABNgIUIANB/h82AhAgA0EGNgIMDNEBC0H4ACECDLcBCyADQZABNgIcIAMgATYCFCADIAA2AgxBACECDM8BC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ0AIABBFUYNASADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgzOAQtB9wAhAgy0AQsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDMwBCyABIARGBEBBjwEhAgzMAQsCQCABLQAAQSBGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GbHzYCECADQQY2AgxBACECDMwBC0ECIQIMsgELA0AgAS0AAEEgRw0CIAQgAUEBaiIBRw0AC0GOASECDMoBCyABIARGBEBBjQEhAgzKAQsCQCABLQAAQQlrDgRKAABKAAtB9QAhAgywAQsgAy0AKUEFRgRAQfYAIQIMsAELQfQAIQIMrwELIAEgBEYEQEGMASECDMgBCyADQRA2AgggAyABNgIEDAoLIAEgBEYEQEGLASECDMcBCwJAIAEtAABBCWsOBEcAAEcAC0HzACECDK0BCyABIARHBEAgA0EQNgIIIAMgATYCBEHxACECDK0BC0GKASECDMUBCwJAIAEgBEcEQANAIAEtAABBoNAAai0AACIAQQNHBEACQCAAQQFrDgJJAAQLQfAAIQIMrwELIAQgAUEBaiIBRw0AC0GIASECDMYBC0GIASECDMUBCyADQQA2AhwgAyABNgIUIANB2yA2AhAgA0EHNgIMQQAhAgzEAQsgASAERgRAQYkBIQIMxAELAkACQAJAIAEtAABBoNIAai0AAEEBaw4DRgIAAQtB8gAhAgysAQsgA0EANgIcIAMgATYCFCADQbQSNgIQIANBBzYCDEEAIQIMxAELQeoAIQIMqgELIAEgBEcEQCABQQFqIQFB7wAhAgyqAQtBhwEhAgzCAQsgBCABIgBGBEBBhgEhAgzCAQsgAC0AACIBQS9GBEAgAEEBaiEBQe4AIQIMqQELIAFBCWsiAkEXSw0BIAAhAUEBIAJ0QZuAgARxDUEMAQsgBCABIgBGBEBBhQEhAgzBAQsgAC0AAEEvRw0AIABBAWohAQwDC0EAIQIgA0EANgIcIAMgADYCFCADQdsgNgIQIANBBzYCDAy/AQsCQAJAAkACQAJAA0AgAS0AAEGgzgBqLQAAIgBBBUcEQAJAAkAgAEEBaw4IRwUGBwgABAEIC0HrACECDK0BCyABQQFqIQFB7QAhAgysAQsgBCABQQFqIgFHDQALQYQBIQIMwwELIAFBAWoMFAsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgzBAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgzAAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDR4gA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy/AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMvgELIAEgBEYEQEGDASECDL4BCwJAIAEtAABBoM4Aai0AAEEBaw4IPgQFBgAIAgMHCyABQQFqIQELQQMhAgyjAQsgAUEBagwNC0EAIQIgA0EANgIcIANB0RI2AhAgA0EHNgIMIAMgAUEBajYCFAy6AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgy5AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgy4AQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDRYgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgy3AQsgA0EANgIcIAMgATYCFCADQfkPNgIQIANBBzYCDEEAIQIMtgELQewAIQIMnAELIAEgBEYEQEGCASECDLUBCyABQQFqDAILIAEgBEYEQEGBASECDLQBCyABQQFqDAELIAEgBEYNASABQQFqCyEBQQQhAgyYAQtBgAEhAgywAQsDQCABLQAAQaDMAGotAAAiAEECRwRAIABBAUcEQEHpACECDJkBCwwxCyAEIAFBAWoiAUcNAAtB/wAhAgyvAQsgASAERgRAQf4AIQIMrwELAkAgAS0AAEEJaw43LwMGLwQGBgYGBgYGBgYGBgYGBgYGBgYFBgYCBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGAAYLIAFBAWoLIQFBBSECDJQBCyABQQFqDAYLIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0IIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIANBADYCHCADIAE2AhQgA0GNFDYCECADQQc2AgxBACECDKgBCwJAAkACQAJAA0AgAS0AAEGgygBqLQAAIgBBBUcEQAJAIABBAWsOBi4DBAUGAAYLQegAIQIMlAELIAQgAUEBaiIBRw0AC0H9ACECDKsBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQdsANgIcIAMgATYCFCADIAA2AgxBACECDKoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDKkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNByADQfoANgIcIAMgATYCFCADIAA2AgxBACECDKgBCyADQQA2AhwgAyABNgIUIANB5Ag2AhAgA0EHNgIMQQAhAgynAQsgASAERg0BIAFBAWoLIQFBBiECDIwBC0H8ACECDKQBCwJAAkACQAJAA0AgAS0AAEGgyABqLQAAIgBBBUcEQCAAQQFrDgQpAgMEBQsgBCABQQFqIgFHDQALQfsAIQIMpwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMpgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMpQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0DIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMpAELIANBADYCHCADIAE2AhQgA0G8CjYCECADQQc2AgxBACECDKMBC0HPACECDIkBC0HRACECDIgBC0HnACECDIcBCyABIARGBEBB+gAhAgygAQsCQCABLQAAQQlrDgQgAAAgAAsgAUEBaiEBQeYAIQIMhgELIAEgBEYEQEH5ACECDJ8BCwJAIAEtAABBCWsOBB8AAB8AC0EAIQACQCADKAI4IgJFDQAgAigCOCICRQ0AIAMgAhEAACEACyAARQRAQeIBIQIMhgELIABBFUcEQCADQQA2AhwgAyABNgIUIANByQ02AhAgA0EaNgIMQQAhAgyfAQsgA0H4ADYCHCADIAE2AhQgA0HqGjYCECADQRU2AgxBACECDJ4BCyABIARHBEAgA0ENNgIIIAMgATYCBEHkACECDIUBC0H3ACECDJ0BCyABIARGBEBB9gAhAgydAQsCQAJAAkAgAS0AAEHIAGsOCwABCwsLCwsLCwsCCwsgAUEBaiEBQd0AIQIMhQELIAFBAWohAUHgACECDIQBCyABQQFqIQFB4wAhAgyDAQtB9QAhAiABIARGDZsBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbXVAGotAABHDQggAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJwBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIABEAgA0H0ADYCHCADIAE2AhQgAyAANgIMQQAhAgycAQtB4gAhAgyCAQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJwBC0HhACECDIIBCyADQfMANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMmgELIAMtACkiAEEja0ELSQ0JAkAgAEEGSw0AQQEgAHRBygBxRQ0ADAoLQQAhAiADQQA2AhwgAyABNgIUIANB7Qk2AhAgA0EINgIMDJkBC0HyACECIAEgBEYNmAEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABBs9UAai0AAEcNBSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMmQELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfEANgIcIAMgATYCFCADIAA2AgxBACECDJkBC0HfACECDH8LQQAhAAJAIAMoAjgiAkUNACACKAI0IgJFDQAgAyACEQAAIQALAkAgAARAIABBFUYNASADQQA2AhwgAyABNgIUIANB6g02AhAgA0EmNgIMQQAhAgyZAQtB3gAhAgx/CyADQfAANgIcIAMgATYCFCADQYAbNgIQIANBFTYCDEEAIQIMlwELIAMtAClBIUYNBiADQQA2AhwgAyABNgIUIANBkQo2AhAgA0EINgIMQQAhAgyWAQtB7wAhAiABIARGDZUBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDVAGotAABHDQIgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYBCyADKAIEIQAgA0IANwMAIAMgACAGQQFqIgEQKyIARQ0CIANB7QA2AhwgAyABNgIUIAMgADYCDEEAIQIMlQELIANBADYCAAsgAygCBCEAIANBADYCBCADIAAgARArIgBFDYABIANB7gA2AhwgAyABNgIUIAMgADYCDEEAIQIMkwELQdwAIQIMeQtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJMBC0HbACECDHkLIANB7AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyRAQsgAy0AKSIAQSNJDQAgAEEuRg0AIANBADYCHCADIAE2AhQgA0HJCTYCECADQQg2AgxBACECDJABC0HaACECDHYLIAEgBEYEQEHrACECDI8BCwJAIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMjwELQdkAIQIMdQsgASAERwRAIANBDjYCCCADIAE2AgRB2AAhAgx1C0HqACECDI0BCyABIARGBEBB6QAhAgyNAQsgAS0AAEEwayIAQf8BcUEKSQRAIAMgADoAKiABQQFqIQFB1wAhAgx0CyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeiADQegANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyABIARGBEBB5wAhAgyMAQsCQCABLQAAQS5GBEAgAUEBaiEBDAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELQdYAIQIMcgsgASAERgRAQeUAIQIMiwELQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIANgIcIAMgATYCFCADIAA2AgxBACECDI0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNfSADQeMANgIcIAMgATYCFCADIAA2AgxBACECDIwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNeyADQeQANgIcIAMgATYCFCADIAA2AgwMiwELQdQAIQIMcQsgAy0AKUEiRg2GAUHTACECDHALQQAhAAJAIAMoAjgiAkUNACACKAJEIgJFDQAgAyACEQAAIQALIABFBEBB1QAhAgxwCyAAQRVHBEAgA0EANgIcIAMgATYCFCADQaQNNgIQIANBITYCDEEAIQIMiQELIANB4QA2AhwgAyABNgIUIANB0Bo2AhAgA0EVNgIMQQAhAgyIAQsgASAERgRAQeAAIQIMiAELAkACQAJAAkACQCABLQAAQQprDgQBBAQABAsgAUEBaiEBDAELIAFBAWohASADQS9qLQAAQQFxRQ0BC0HSACECDHALIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIgBCyADQQA2AhwgAyABNgIUIANBthE2AhAgA0EJNgIMQQAhAgyHAQsgASAERgRAQd8AIQIMhwELIAEtAABBCkYEQCABQQFqIQEMCQsgAy0ALkHAAHENCCADQQA2AhwgAyABNgIUIANBthE2AhAgA0ECNgIMQQAhAgyGAQsgASAERgRAQd0AIQIMhgELIAEtAAAiAkENRgRAIAFBAWohAUHQACECDG0LIAEhACACQQlrDgQFAQEFAQsgBCABIgBGBEBB3AAhAgyFAQsgAC0AAEEKRw0AIABBAWoMAgtBACECIANBADYCHCADIAA2AhQgA0HKLTYCECADQQc2AgwMgwELIAEgBEYEQEHbACECDIMBCwJAIAEtAABBCWsOBAMAAAMACyABQQFqCyEBQc4AIQIMaAsgASAERgRAQdoAIQIMgQELIAEtAABBCWsOBAABAQABC0EAIQIgA0EANgIcIANBmhI2AhAgA0EHNgIMIAMgAUEBajYCFAx/CyADQYASOwEqQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2QA2AhwgAyABNgIUIANB6ho2AhAgA0EVNgIMQQAhAgx+C0HNACECDGQLIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDHwLIAEgBEYEQEHZACECDHwLIAEtAABBIEcNPSABQQFqIQEgAy0ALkEBcQ09IANBADYCHCADIAE2AhQgA0HCHDYCECADQR42AgxBACECDHsLIAEgBEYEQEHYACECDHsLAkACQAJAAkACQCABLQAAIgBBCmsOBAIDAwABCyABQQFqIQFBLCECDGULIABBOkcNASADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgx9CyABQQFqIQEgA0Evai0AAEEBcUUNcyADLQAyQYABcUUEQCADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALAkACQCAADhZNTEsBAQEBAQEBAQEBAQEBAQEBAQEAAQsgA0EpNgIcIAMgATYCFCADQawZNgIQIANBFTYCDEEAIQIMfgsgA0EANgIcIAMgATYCFCADQeULNgIQIANBETYCDEEAIQIMfQtBACEAAkAgAygCOCICRQ0AIAIoAlwiAkUNACADIAIRAAAhAAsgAEUNWSAAQRVHDQEgA0EFNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMfAtBywAhAgxiC0EAIQIgA0EANgIcIAMgATYCFCADQZAONgIQIANBFDYCDAx6CyADIAMvATJBgAFyOwEyDDsLIAEgBEcEQCADQRE2AgggAyABNgIEQcoAIQIMYAtB1wAhAgx4CyABIARGBEBB1gAhAgx4CwJAAkACQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxQeMAaw4TAEBAQEBAQEBAQEBAQAFAQEACA0ALIAFBAWohAUHGACECDGELIAFBAWohAUHHACECDGALIAFBAWohAUHIACECDF8LIAFBAWohAUHJACECDF4LQdUAIQIgBCABIgBGDXYgBCABayADKAIAIgFqIQYgACABa0EFaiEHA0AgAUGQyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0IQQQgAUEFRg0KGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAx2C0HUACECIAQgASIARg11IAQgAWsgAygCACIBaiEGIAAgAWtBD2ohBwNAIAFBgMgAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNB0EDIAFBD0YNCRogAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMdQtB0wAhAiAEIAEiAEYNdCAEIAFrIAMoAgAiAWohBiAAIAFrQQ5qIQcDQCABQeLHAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQYgAUEORg0HIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHQLQdIAIQIgBCABIgBGDXMgBCABayADKAIAIgFqIQUgACABa0EBaiEGA0AgAUHgxwBqLQAAIAAtAAAiB0EgciAHIAdBwQBrQf8BcUEaSRtB/wFxRw0FIAFBAUYNAiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBTYCAAxzCyABIARGBEBB0QAhAgxzCwJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB7gBrDgcAOTk5OTkBOQsgAUEBaiEBQcMAIQIMWgsgAUEBaiEBQcQAIQIMWQsgA0EANgIAIAZBAWohAUHFACECDFgLQdAAIQIgBCABIgBGDXAgBCABayADKAIAIgFqIQYgACABa0EJaiEHA0AgAUHWxwBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0CQQIgAUEJRg0EGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxwC0HPACECIAQgASIARg1vIAQgAWsgAygCACIBaiEGIAAgAWtBBWohBwNAIAFB0McAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQVGDQIgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMbwsgACEBIANBADYCAAwzC0EBCzoALCADQQA2AgAgB0EBaiEBC0EtIQIMUgsCQANAIAEtAABB0MUAai0AAEEBRw0BIAQgAUEBaiIBRw0AC0HNACECDGsLQcIAIQIMUQsgASAERgRAQcwAIQIMagsgAS0AAEE6RgRAIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0zIANBywA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMagsgA0EANgIcIAMgATYCFCADQecRNgIQIANBCjYCDEEAIQIMaQsCQAJAIAMtACxBAmsOAgABJwsgA0Ezai0AAEECcUUNJiADLQAuQQJxDSYgA0EANgIcIAMgATYCFCADQaYUNgIQIANBCzYCDEEAIQIMaQsgAy0AMkEgcUUNJSADLQAuQQJxDSUgA0EANgIcIAMgATYCFCADQb0TNgIQIANBDzYCDEEAIQIMaAtBACEAAkAgAygCOCICRQ0AIAIoAkgiAkUNACADIAIRAAAhAAsgAEUEQEHBACECDE8LIABBFUcEQCADQQA2AhwgAyABNgIUIANBpg82AhAgA0EcNgIMQQAhAgxoCyADQcoANgIcIAMgATYCFCADQYUcNgIQIANBFTYCDEEAIQIMZwsgASAERwRAA0AgAS0AAEHAwQBqLQAAQQFHDRcgBCABQQFqIgFHDQALQcQAIQIMZwtBxAAhAgxmCyABIARHBEADQAJAIAEtAAAiAEEgciAAIABBwQBrQf8BcUEaSRtB/wFxIgBBCUYNACAAQSBGDQACQAJAAkACQCAAQeMAaw4TAAMDAwMDAwMBAwMDAwMDAwMDAgMLIAFBAWohAUE2IQIMUgsgAUEBaiEBQTchAgxRCyABQQFqIQFBOCECDFALDBULIAQgAUEBaiIBRw0AC0E8IQIMZgtBPCECDGULIAEgBEYEQEHIACECDGULIANBEjYCCCADIAE2AgQCQAJAAkACQAJAIAMtACxBAWsOBBQAAQIJCyADLQAyQSBxDQNB4AEhAgxPCwJAIAMvATIiAEEIcUUNACADLQAoQQFHDQAgAy0ALkEIcUUNAgsgAyAAQff7A3FBgARyOwEyDAsLIAMgAy8BMkEQcjsBMgwECyADQQA2AgQgAyABIAEQMSIABEAgA0HBADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxmCyABQQFqIQEMWAsgA0EANgIcIAMgATYCFCADQfQTNgIQIANBBDYCDEEAIQIMZAtBxwAhAiABIARGDWMgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCAAQcDFAGotAAAgAS0AAEEgckcNASAAQQZGDUogAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMZAsgA0EANgIADAULAkAgASAERwRAA0AgAS0AAEHAwwBqLQAAIgBBAUcEQCAAQQJHDQMgAUEBaiEBDAULIAQgAUEBaiIBRw0AC0HFACECDGQLQcUAIQIMYwsLIANBADoALAwBC0ELIQIMRwtBPyECDEYLAkACQANAIAEtAAAiAEEgRwRAAkAgAEEKaw4EAwUFAwALIABBLEYNAwwECyAEIAFBAWoiAUcNAAtBxgAhAgxgCyADQQg6ACwMDgsgAy0AKEEBRw0CIAMtAC5BCHENAiADKAIEIQAgA0EANgIEIAMgACABEDEiAARAIANBwgA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMXwsgAUEBaiEBDFALQTshAgxECwJAA0AgAS0AACIAQSBHIABBCUdxDQEgBCABQQFqIgFHDQALQcMAIQIMXQsLQTwhAgxCCwJAAkAgASAERwRAA0AgAS0AACIAQSBHBEAgAEEKaw4EAwQEAwQLIAQgAUEBaiIBRw0AC0E/IQIMXQtBPyECDFwLIAMgAy8BMkEgcjsBMgwKCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNTiADQT42AhwgAyABNgIUIAMgADYCDEEAIQIMWgsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkYNAwwMCyAEIAFBAWoiAUcNAAtBNyECDFsLQTchAgxaCyABQQFqIQEMBAtBOyECIAQgASIARg1YIAQgAWsgAygCACIBaiEGIAAgAWtBBWohBwJAA0AgAUGQyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYEQEEHIQEMPwsgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMWQsgA0EANgIAIAAhAQwFC0E6IQIgBCABIgBGDVcgBCABayADKAIAIgFqIQYgACABa0EIaiEHAkADQCABQbTBAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAUEIRgRAQQUhAQw+CyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxYCyADQQA2AgAgACEBDAQLQTkhAiAEIAEiAEYNViAEIAFrIAMoAgAiAWohBiAAIAFrQQNqIQcCQANAIAFBsMEAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQNGBEBBBiEBDD0LIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADFcLIANBADYCACAAIQEMAwsCQANAIAEtAAAiAEEgRwRAIABBCmsOBAcEBAcCCyAEIAFBAWoiAUcNAAtBOCECDFYLIABBLEcNASABQQFqIQBBASEBAkACQAJAAkACQCADLQAsQQVrDgQDAQIEAAsgACEBDAQLQQIhAQwBC0EEIQELIANBAToALCADIAMvATIgAXI7ATIgACEBDAELIAMgAy8BMkEIcjsBMiAAIQELQT4hAgw7CyADQQA6ACwLQTkhAgw5CyABIARGBEBBNiECDFILAkACQAJAAkACQCABLQAAQQprDgQAAgIBAgsgAygCBCEAIANBADYCBCADIAAgARAxIgBFDQIgA0EzNgIcIAMgATYCFCADIAA2AgxBACECDFULIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQRAIAFBAWohAQwGCyADQTI2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMVAsgAy0ALkEBcQRAQd8BIQIMOwsgAygCBCEAIANBADYCBCADIAAgARAxIgANAQxJC0E0IQIMOQsgA0E1NgIcIAMgATYCFCADIAA2AgxBACECDFELQTUhAgw3CyADQS9qLQAAQQFxDQAgA0EANgIcIAMgATYCFCADQesWNgIQIANBGTYCDEEAIQIMTwtBMyECDDULIAEgBEYEQEEyIQIMTgsCQCABLQAAQQpGBEAgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GSFzYCECADQQM2AgxBACECDE4LQTIhAgw0CyABIARGBEBBMSECDE0LAkAgAS0AACIAQQlGDQAgAEEgRg0AQQEhAgJAIAMtACxBBWsOBAYEBQANCyADIAMvATJBCHI7ATIMDAsgAy0ALkEBcUUNASADLQAsQQhHDQAgA0EAOgAsC0E9IQIMMgsgA0EANgIcIAMgATYCFCADQcIWNgIQIANBCjYCDEEAIQIMSgtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgwGCyABIARGBEBBMCECDEcLIAEtAABBCkYEQCABQQFqIQEMAQsgAy0ALkEBcQ0AIANBADYCHCADIAE2AhQgA0HcKDYCECADQQI2AgxBACECDEYLQTAhAgwsCyABQQFqIQFBMSECDCsLIAEgBEYEQEEvIQIMRAsgAS0AACIAQQlHIABBIEdxRQRAIAFBAWohASADLQAuQQFxDQEgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDEEAIQIMRAtBASECAkACQAJAAkACQAJAIAMtACxBAmsOBwUEBAMBAgAECyADIAMvATJBCHI7ATIMAwtBAiECDAELQQQhAgsgA0EBOgAsIAMgAy8BMiACcjsBMgtBLyECDCsLIANBADYCHCADIAE2AhQgA0GEEzYCECADQQs2AgxBACECDEMLQeEBIQIMKQsgASAERgRAQS4hAgxCCyADQQA2AgQgA0ESNgIIIAMgASABEDEiAA0BC0EuIQIMJwsgA0EtNgIcIAMgATYCFCADIAA2AgxBACECDD8LQQAhAAJAIAMoAjgiAkUNACACKAJMIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB2AA2AhwgAyABNgIUIANBsxs2AhAgA0EVNgIMQQAhAgw+C0HMACECDCQLIANBADYCHCADIAE2AhQgA0GzDjYCECADQR02AgxBACECDDwLIAEgBEYEQEHOACECDDwLIAEtAAAiAEEgRg0CIABBOkYNAQsgA0EAOgAsQQkhAgwhCyADKAIEIQAgA0EANgIEIAMgACABEDAiAA0BDAILIAMtAC5BAXEEQEHeASECDCALIAMoAgQhACADQQA2AgQgAyAAIAEQMCIARQ0CIANBKjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgw4CyADQcsANgIcIAMgADYCDCADIAFBAWo2AhRBACECDDcLIAFBAWohAUHAACECDB0LIAFBAWohAQwsCyABIARGBEBBKyECDDULAkAgAS0AAEEKRgRAIAFBAWohAQwBCyADLQAuQcAAcUUNBgsgAy0AMkGAAXEEQEEAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ0SIABBFUYEQCADQQU2AhwgAyABNgIUIANBmxs2AhAgA0EVNgIMQQAhAgw2CyADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMQQAhAgw1CyADQTJqIQIgAxA1QQAhAAJAIAMoAjgiBkUNACAGKAIoIgZFDQAgAyAGEQAAIQALIAAOFgIBAAQEBAQEBAQEBAQEBAQEBAQEBAMECyADQQE6ADALIAIgAi8BAEHAAHI7AQALQSshAgwYCyADQSk2AhwgAyABNgIUIANBrBk2AhAgA0EVNgIMQQAhAgwwCyADQQA2AhwgAyABNgIUIANB5Qs2AhAgA0ERNgIMQQAhAgwvCyADQQA2AhwgAyABNgIUIANBpQs2AhAgA0ECNgIMQQAhAgwuC0EBIQcgAy8BMiIFQQhxRQRAIAMpAyBCAFIhBwsCQCADLQAwBEBBASEAIAMtAClBBUYNASAFQcAAcUUgB3FFDQELAkAgAy0AKCICQQJGBEBBASEAIAMvATQiBkHlAEYNAkEAIQAgBUHAAHENAiAGQeQARg0CIAZB5gBrQQJJDQIgBkHMAUYNAiAGQbACRg0CDAELQQAhACAFQcAAcQ0BC0ECIQAgBUEIcQ0AIAVBgARxBEACQCACQQFHDQAgAy0ALkEKcQ0AQQUhAAwCC0EEIQAMAQsgBUEgcUUEQCADEDZBAEdBAnQhAAwBC0EAQQMgAykDIFAbIQALIABBAWsOBQIABwEDBAtBESECDBMLIANBAToAMQwpC0EAIQICQCADKAI4IgBFDQAgACgCMCIARQ0AIAMgABEAACECCyACRQ0mIAJBFUYEQCADQQM2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgwrC0EAIQIgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDAwqCyADQQA2AhwgAyABNgIUIANB+SA2AhAgA0EPNgIMQQAhAgwpC0EAIQACQCADKAI4IgJFDQAgAigCMCICRQ0AIAMgAhEAACEACyAADQELQQ4hAgwOCyAAQRVGBEAgA0ECNgIcIAMgATYCFCADQdIbNgIQIANBFTYCDEEAIQIMJwsgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDEEAIQIMJgtBKiECDAwLIAEgBEcEQCADQQk2AgggAyABNgIEQSkhAgwMC0EmIQIMJAsgAyADKQMgIgwgBCABa60iCn0iC0IAIAsgDFgbNwMgIAogDFQEQEElIQIMJAsgAygCBCEAIANBADYCBCADIAAgASAMp2oiARAyIgBFDQAgA0EFNgIcIAMgATYCFCADIAA2AgxBACECDCMLQQ8hAgwJC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43FxYAAQIDBAUGBxQUFBQUFBQICQoLDA0UFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFA4PEBESExQLQgIhCgwWC0IDIQoMFQtCBCEKDBQLQgUhCgwTC0IGIQoMEgtCByEKDBELQgghCgwQC0IJIQoMDwtCCiEKDA4LQgshCgwNC0IMIQoMDAtCDSEKDAsLQg4hCgwKC0IPIQoMCQtCCiEKDAgLQgshCgwHC0IMIQoMBgtCDSEKDAULQg4hCgwEC0IPIQoMAwsgA0EANgIcIAMgATYCFCADQZ8VNgIQIANBDDYCDEEAIQIMIQsgASAERgRAQSIhAgwhC0IAIQoCQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAEtAABBMGsONxUUAAECAwQFBgcWFhYWFhYWCAkKCwwNFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYODxAREhMWC0ICIQoMFAtCAyEKDBMLQgQhCgwSC0IFIQoMEQtCBiEKDBALQgchCgwPC0IIIQoMDgtCCSEKDA0LQgohCgwMC0ILIQoMCwtCDCEKDAoLQg0hCgwJC0IOIQoMCAtCDyEKDAcLQgohCgwGC0ILIQoMBQtCDCEKDAQLQg0hCgwDC0IOIQoMAgtCDyEKDAELQgEhCgsgAUEBaiEBIAMpAyAiC0L//////////w9YBEAgAyALQgSGIAqENwMgDAILIANBADYCHCADIAE2AhQgA0G1CTYCECADQQw2AgxBACECDB4LQSchAgwEC0EoIQIMAwsgAyABOgAsIANBADYCACAHQQFqIQFBDCECDAILIANBADYCACAGQQFqIQFBCiECDAELIAFBAWohAUEIIQIMAAsAC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwXC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwWC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwVC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwUC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwTC0EAIQIgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDAwSC0EAIQIgA0EANgIcIAMgATYCFCADQYMRNgIQIANBCTYCDAwRC0EAIQIgA0EANgIcIAMgATYCFCADQd8KNgIQIANBCTYCDAwQC0EAIQIgA0EANgIcIAMgATYCFCADQe0QNgIQIANBCTYCDAwPC0EAIQIgA0EANgIcIAMgATYCFCADQdIRNgIQIANBCTYCDAwOC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwNC0EAIQIgA0EANgIcIAMgATYCFCADQbkXNgIQIANBDzYCDAwMC0EAIQIgA0EANgIcIAMgATYCFCADQZkTNgIQIANBCzYCDAwLC0EAIQIgA0EANgIcIAMgATYCFCADQZ0JNgIQIANBCzYCDAwKC0EAIQIgA0EANgIcIAMgATYCFCADQZcQNgIQIANBCjYCDAwJC0EAIQIgA0EANgIcIAMgATYCFCADQbEQNgIQIANBCjYCDAwIC0EAIQIgA0EANgIcIAMgATYCFCADQbsdNgIQIANBAjYCDAwHC0EAIQIgA0EANgIcIAMgATYCFCADQZYWNgIQIANBAjYCDAwGC0EAIQIgA0EANgIcIAMgATYCFCADQfkYNgIQIANBAjYCDAwFC0EAIQIgA0EANgIcIAMgATYCFCADQcQYNgIQIANBAjYCDAwECyADQQI2AhwgAyABNgIUIANBqR42AhAgA0EWNgIMQQAhAgwDC0HeACECIAEgBEYNAiAJQQhqIQcgAygCACEFAkACQCABIARHBEAgBUGWyABqIQggBCAFaiABayEGIAVBf3NBCmoiBSABaiEAA0AgAS0AACAILQAARwRAQQIhCAwDCyAFRQRAQQAhCCAAIQEMAwsgBUEBayEFIAhBAWohCCAEIAFBAWoiAUcNAAsgBiEFIAQhAQsgB0EBNgIAIAMgBTYCAAwBCyADQQA2AgAgByAINgIACyAHIAE2AgQgCSgCDCEAAkACQCAJKAIIQQFrDgIEAQALIANBADYCHCADQcIeNgIQIANBFzYCDCADIABBAWo2AhRBACECDAMLIANBADYCHCADIAA2AhQgA0HXHjYCECADQQk2AgxBACECDAILIAEgBEYEQEEoIQIMAgsgA0EJNgIIIAMgATYCBEEnIQIMAQsgASAERgRAQQEhAgwBCwNAAkACQAJAIAEtAABBCmsOBAABAQABCyABQQFqIQEMAQsgAUEBaiEBIAMtAC5BIHENAEEAIQIgA0EANgIcIAMgATYCFCADQaEhNgIQIANBBTYCDAwCC0EBIQIgASAERw0ACwsgCUEQaiQAIAJFBEAgAygCDCEADAELIAMgAjYCHEEAIQAgAygCBCIBRQ0AIAMgASAEIAMoAggRAQAiAUUNACADIAQ2AhQgAyABNgIMIAEhAAsgAAu+AgECfyAAQQA6AAAgAEHkAGoiAUEBa0EAOgAAIABBADoAAiAAQQA6AAEgAUEDa0EAOgAAIAFBAmtBADoAACAAQQA6AAMgAUEEa0EAOgAAQQAgAGtBA3EiASAAaiIAQQA2AgBB5AAgAWtBfHEiAiAAaiIBQQRrQQA2AgACQCACQQlJDQAgAEEANgIIIABBADYCBCABQQhrQQA2AgAgAUEMa0EANgIAIAJBGUkNACAAQQA2AhggAEEANgIUIABBADYCECAAQQA2AgwgAUEQa0EANgIAIAFBFGtBADYCACABQRhrQQA2AgAgAUEca0EANgIAIAIgAEEEcUEYciICayIBQSBJDQAgACACaiEAA0AgAEIANwMYIABCADcDECAAQgA3AwggAEIANwMAIABBIGohACABQSBrIgFBH0sNAAsLC1YBAX8CQCAAKAIMDQACQAJAAkACQCAALQAxDgMBAAMCCyAAKAI4IgFFDQAgASgCMCIBRQ0AIAAgAREAACIBDQMLQQAPCwALIABByhk2AhBBDiEBCyABCxoAIAAoAgxFBEAgAEHeHzYCECAAQRU2AgwLCxQAIAAoAgxBFUYEQCAAQQA2AgwLCxQAIAAoAgxBFkYEQCAAQQA2AgwLCwcAIAAoAgwLBwAgACgCEAsJACAAIAE2AhALBwAgACgCFAsrAAJAIABBJ08NAEL//////wkgAK2IQgGDUA0AIABBAnRB0DhqKAIADwsACxcAIABBL08EQAALIABBAnRB7DlqKAIAC78JAQF/QfQtIQECQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCAAQeQAaw70A2NiAAFhYWFhYWECAwQFYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYQYHCAkKCwwNDg9hYWFhYRBhYWFhYWFhYWFhYRFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWESExQVFhcYGRobYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRwdHh8gISIjJCUmJygpKissLS4vMDEyMzQ1NmE3ODk6YWFhYWFhYWE7YWFhPGFhYWE9Pj9hYWFhYWFhYUBhYUFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFCQ0RFRkdISUpLTE1OT1BRUlNhYWFhYWFhYVRVVldYWVpbYVxdYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhXmFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYV9gYQtB6iwPC0GYJg8LQe0xDwtBoDcPC0HJKQ8LQbQpDwtBli0PC0HrKw8LQaI1DwtB2zQPC0HgKQ8LQeMkDwtB1SQPC0HuJA8LQeYlDwtByjQPC0HQNw8LQao1DwtB9SwPC0H2Jg8LQYIiDwtB8jMPC0G+KA8LQec3DwtBzSEPC0HAIQ8LQbglDwtByyUPC0GWJA8LQY80DwtBzTUPC0HdKg8LQe4zDwtBnDQPC0GeMQ8LQfQ1DwtB5SIPC0GvJQ8LQZkxDwtBsjYPC0H5Ng8LQcQyDwtB3SwPC0GCMQ8LQcExDwtBjTcPC0HJJA8LQew2DwtB5yoPC0HIIw8LQeIhDwtByTcPC0GlIg8LQZQiDwtB2zYPC0HeNQ8LQYYmDwtBvCsPC0GLMg8LQaAjDwtB9jAPC0GALA8LQYkrDwtBpCYPC0HyIw8LQYEoDwtBqzIPC0HrJw8LQcI2DwtBoiQPC0HPKg8LQdwjDwtBhycPC0HkNA8LQbciDwtBrTEPC0HVIg8LQa80DwtB3iYPC0HWMg8LQfQ0DwtBgTgPC0H0Nw8LQZI2DwtBnScPC0GCKQ8LQY0jDwtB1zEPC0G9NQ8LQbQ3DwtB2DAPC0G2Jw8LQZo4DwtBpyoPC0HEJw8LQa4jDwtB9SIPCwALQcomIQELIAELFwAgACAALwEuQf7/A3EgAUEAR3I7AS4LGgAgACAALwEuQf3/A3EgAUEAR0EBdHI7AS4LGgAgACAALwEuQfv/A3EgAUEAR0ECdHI7AS4LGgAgACAALwEuQff/A3EgAUEAR0EDdHI7AS4LGgAgACAALwEuQe//A3EgAUEAR0EEdHI7AS4LGgAgACAALwEuQd//A3EgAUEAR0EFdHI7AS4LGgAgACAALwEuQb//A3EgAUEAR0EGdHI7AS4LGgAgACAALwEuQf/+A3EgAUEAR0EHdHI7AS4LGgAgACAALwEuQf/9A3EgAUEAR0EIdHI7AS4LGgAgACAALwEuQf/7A3EgAUEAR0EJdHI7AS4LPgECfwJAIAAoAjgiA0UNACADKAIEIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHhEjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIIIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH8ETYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIMIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHsCjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIQIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH6HjYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIUIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHLEDYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIYIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEG3HzYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIcIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEG/FTYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIsIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEH+CDYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIgIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEGMHTYCEEEYIQQLIAQLPgECfwJAIAAoAjgiA0UNACADKAIkIgNFDQAgACABIAIgAWsgAxEBACIEQX9HDQAgAEHmFTYCEEEYIQQLIAQLOAAgAAJ/IAAvATJBFHFBFEYEQEEBIAAtAChBAUYNARogAC8BNEHlAEYMAQsgAC0AKUEFRgs6ADALWQECfwJAIAAtAChBAUYNACAALwE0IgFB5ABrQeQASQ0AIAFBzAFGDQAgAUGwAkYNACAALwEyIgBBwABxDQBBASECIABBiARxQYAERg0AIABBKHFFIQILIAILjAEBAn8CQAJAAkAgAC0AKkUNACAALQArRQ0AIAAvATIiAUECcUUNAQwCCyAALwEyIgFBAXFFDQELQQEhAiAALQAoQQFGDQAgAC8BNCIAQeQAa0HkAEkNACAAQcwBRg0AIABBsAJGDQAgAUHAAHENAEEAIQIgAUGIBHFBgARGDQAgAUEocUEARyECCyACC1cAIABBGGpCADcDACAAQgA3AwAgAEE4akIANwMAIABBMGpCADcDACAAQShqQgA3AwAgAEEgakIANwMAIABBEGpCADcDACAAQQhqQgA3AwAgAEH9ATYCHAsGACAAEDoLmi0BC38jAEEQayIKJABB3NUAKAIAIglFBEBBnNkAKAIAIgVFBEBBqNkAQn83AgBBoNkAQoCAhICAgMAANwIAQZzZACAKQQhqQXBxQdiq1aoFcyIFNgIAQbDZAEEANgIAQYDZAEEANgIAC0GE2QBBwNkENgIAQdTVAEHA2QQ2AgBB6NUAIAU2AgBB5NUAQX82AgBBiNkAQcCmAzYCAANAIAFBgNYAaiABQfTVAGoiAjYCACACIAFB7NUAaiIDNgIAIAFB+NUAaiADNgIAIAFBiNYAaiABQfzVAGoiAzYCACADIAI2AgAgAUGQ1gBqIAFBhNYAaiICNgIAIAIgAzYCACABQYzWAGogAjYCACABQSBqIgFBgAJHDQALQczZBEGBpgM2AgBB4NUAQazZACgCADYCAEHQ1QBBgKYDNgIAQdzVAEHI2QQ2AgBBzP8HQTg2AgBByNkEIQkLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAU0EQEHE1QAoAgAiBkEQIABBE2pBcHEgAEELSRsiBEEDdiIAdiIBQQNxBEACQCABQQFxIAByQQFzIgJBA3QiAEHs1QBqIgEgAEH01QBqKAIAIgAoAggiA0YEQEHE1QAgBkF+IAJ3cTYCAAwBCyABIAM2AgggAyABNgIMCyAAQQhqIQEgACACQQN0IgJBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMEQtBzNUAKAIAIgggBE8NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgBBA3QiAkHs1QBqIgEgAkH01QBqKAIAIgIoAggiA0YEQEHE1QAgBkF+IAB3cSIGNgIADAELIAEgAzYCCCADIAE2AgwLIAIgBEEDcjYCBCAAQQN0IgAgBGshBSAAIAJqIAU2AgAgAiAEaiIEIAVBAXI2AgQgCARAIAhBeHFB7NUAaiEAQdjVACgCACEDAn9BASAIQQN2dCIBIAZxRQRAQcTVACABIAZyNgIAIAAMAQsgACgCCAsiASADNgIMIAAgAzYCCCADIAA2AgwgAyABNgIICyACQQhqIQFB2NUAIAQ2AgBBzNUAIAU2AgAMEQtByNUAKAIAIgtFDQEgC2hBAnRB9NcAaigCACIAKAIEQXhxIARrIQUgACECA0ACQCACKAIQIgFFBEAgAkEUaigCACIBRQ0BCyABKAIEQXhxIARrIgMgBUkhAiADIAUgAhshBSABIAAgAhshACABIQIMAQsLIAAoAhghCSAAKAIMIgMgAEcEQEHU1QAoAgAaIAMgACgCCCIBNgIIIAEgAzYCDAwQCyAAQRRqIgIoAgAiAUUEQCAAKAIQIgFFDQMgAEEQaiECCwNAIAIhByABIgNBFGoiAigCACIBDQAgA0EQaiECIAMoAhAiAQ0ACyAHQQA2AgAMDwtBfyEEIABBv39LDQAgAEETaiIBQXBxIQRByNUAKAIAIghFDQBBACAEayEFAkACQAJAAn9BACAEQYACSQ0AGkEfIARB////B0sNABogBEEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+agsiBkECdEH01wBqKAIAIgJFBEBBACEBQQAhAwwBC0EAIQEgBEEZIAZBAXZrQQAgBkEfRxt0IQBBACEDA0ACQCACKAIEQXhxIARrIgcgBU8NACACIQMgByIFDQBBACEFIAIhAQwDCyABIAJBFGooAgAiByAHIAIgAEEddkEEcWpBEGooAgAiAkYbIAEgBxshASAAQQF0IQAgAg0ACwsgASADckUEQEEAIQNBAiAGdCIAQQAgAGtyIAhxIgBFDQMgAGhBAnRB9NcAaigCACEBCyABRQ0BCwNAIAEoAgRBeHEgBGsiAiAFSSEAIAIgBSAAGyEFIAEgAyAAGyEDIAEoAhAiAAR/IAAFIAFBFGooAgALIgENAAsLIANFDQAgBUHM1QAoAgAgBGtPDQAgAygCGCEHIAMgAygCDCIARwRAQdTVACgCABogACADKAIIIgE2AgggASAANgIMDA4LIANBFGoiAigCACIBRQRAIAMoAhAiAUUNAyADQRBqIQILA0AgAiEGIAEiAEEUaiICKAIAIgENACAAQRBqIQIgACgCECIBDQALIAZBADYCAAwNC0HM1QAoAgAiAyAETwRAQdjVACgCACEBAkAgAyAEayICQRBPBEAgASAEaiIAIAJBAXI2AgQgASADaiACNgIAIAEgBEEDcjYCBAwBCyABIANBA3I2AgQgASADaiIAIAAoAgRBAXI2AgRBACEAQQAhAgtBzNUAIAI2AgBB2NUAIAA2AgAgAUEIaiEBDA8LQdDVACgCACIDIARLBEAgBCAJaiIAIAMgBGsiAUEBcjYCBEHc1QAgADYCAEHQ1QAgATYCACAJIARBA3I2AgQgCUEIaiEBDA8LQQAhASAEAn9BnNkAKAIABEBBpNkAKAIADAELQajZAEJ/NwIAQaDZAEKAgISAgIDAADcCAEGc2QAgCkEMakFwcUHYqtWqBXM2AgBBsNkAQQA2AgBBgNkAQQA2AgBBgIAECyIAIARBxwBqIgVqIgZBACAAayIHcSICTwRAQbTZAEEwNgIADA8LAkBB/NgAKAIAIgFFDQBB9NgAKAIAIgggAmohACAAIAFNIAAgCEtxDQBBACEBQbTZAEEwNgIADA8LQYDZAC0AAEEEcQ0EAkACQCAJBEBBhNkAIQEDQCABKAIAIgAgCU0EQCAAIAEoAgRqIAlLDQMLIAEoAggiAQ0ACwtBABA7IgBBf0YNBSACIQZBoNkAKAIAIgFBAWsiAyAAcQRAIAIgAGsgACADakEAIAFrcWohBgsgBCAGTw0FIAZB/v///wdLDQVB/NgAKAIAIgMEQEH02AAoAgAiByAGaiEBIAEgB00NBiABIANLDQYLIAYQOyIBIABHDQEMBwsgBiADayAHcSIGQf7///8HSw0EIAYQOyEAIAAgASgCACABKAIEakYNAyAAIQELAkAgBiAEQcgAak8NACABQX9GDQBBpNkAKAIAIgAgBSAGa2pBACAAa3EiAEH+////B0sEQCABIQAMBwsgABA7QX9HBEAgACAGaiEGIAEhAAwHC0EAIAZrEDsaDAQLIAEiAEF/Rw0FDAMLQQAhAwwMC0EAIQAMCgsgAEF/Rw0CC0GA2QBBgNkAKAIAQQRyNgIACyACQf7///8HSw0BIAIQOyEAQQAQOyEBIABBf0YNASABQX9GDQEgACABTw0BIAEgAGsiBiAEQThqTQ0BC0H02ABB9NgAKAIAIAZqIgE2AgBB+NgAKAIAIAFJBEBB+NgAIAE2AgALAkACQAJAQdzVACgCACICBEBBhNkAIQEDQCAAIAEoAgAiAyABKAIEIgVqRg0CIAEoAggiAQ0ACwwCC0HU1QAoAgAiAUEARyAAIAFPcUUEQEHU1QAgADYCAAtBACEBQYjZACAGNgIAQYTZACAANgIAQeTVAEF/NgIAQejVAEGc2QAoAgA2AgBBkNkAQQA2AgADQCABQYDWAGogAUH01QBqIgI2AgAgAiABQezVAGoiAzYCACABQfjVAGogAzYCACABQYjWAGogAUH81QBqIgM2AgAgAyACNgIAIAFBkNYAaiABQYTWAGoiAjYCACACIAM2AgAgAUGM1gBqIAI2AgAgAUEgaiIBQYACRw0AC0F4IABrQQ9xIgEgAGoiAiAGQThrIgMgAWsiAUEBcjYCBEHg1QBBrNkAKAIANgIAQdDVACABNgIAQdzVACACNgIAIAAgA2pBODYCBAwCCyAAIAJNDQAgAiADSQ0AIAEoAgxBCHENAEF4IAJrQQ9xIgAgAmoiA0HQ1QAoAgAgBmoiByAAayIAQQFyNgIEIAEgBSAGajYCBEHg1QBBrNkAKAIANgIAQdDVACAANgIAQdzVACADNgIAIAIgB2pBODYCBAwBCyAAQdTVACgCAEkEQEHU1QAgADYCAAsgACAGaiEDQYTZACEBAkACQAJAA0AgAyABKAIARwRAIAEoAggiAQ0BDAILCyABLQAMQQhxRQ0BC0GE2QAhAQNAIAEoAgAiAyACTQRAIAMgASgCBGoiBSACSw0DCyABKAIIIQEMAAsACyABIAA2AgAgASABKAIEIAZqNgIEIABBeCAAa0EPcWoiCSAEQQNyNgIEIANBeCADa0EPcWoiBiAEIAlqIgRrIQEgAiAGRgRAQdzVACAENgIAQdDVAEHQ1QAoAgAgAWoiADYCACAEIABBAXI2AgQMCAtB2NUAKAIAIAZGBEBB2NUAIAQ2AgBBzNUAQczVACgCACABaiIANgIAIAQgAEEBcjYCBCAAIARqIAA2AgAMCAsgBigCBCIFQQNxQQFHDQYgBUF4cSEIIAVB/wFNBEAgBUEDdiEDIAYoAggiACAGKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwHCyACIAA2AgggACACNgIMDAYLIAYoAhghByAGIAYoAgwiAEcEQCAAIAYoAggiAjYCCCACIAA2AgwMBQsgBkEUaiICKAIAIgVFBEAgBigCECIFRQ0EIAZBEGohAgsDQCACIQMgBSIAQRRqIgIoAgAiBQ0AIABBEGohAiAAKAIQIgUNAAsgA0EANgIADAQLQXggAGtBD3EiASAAaiIHIAZBOGsiAyABayIBQQFyNgIEIAAgA2pBODYCBCACIAVBNyAFa0EPcWpBP2siAyADIAJBEGpJGyIDQSM2AgRB4NUAQazZACgCADYCAEHQ1QAgATYCAEHc1QAgBzYCACADQRBqQYzZACkCADcCACADQYTZACkCADcCCEGM2QAgA0EIajYCAEGI2QAgBjYCAEGE2QAgADYCAEGQ2QBBADYCACADQSRqIQEDQCABQQc2AgAgBSABQQRqIgFLDQALIAIgA0YNACADIAMoAgRBfnE2AgQgAyADIAJrIgU2AgAgAiAFQQFyNgIEIAVB/wFNBEAgBUF4cUHs1QBqIQACf0HE1QAoAgAiAUEBIAVBA3Z0IgNxRQRAQcTVACABIANyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRB9NcAaiEAQcjVACgCACIDQQEgAXQiBnFFBEAgACACNgIAQcjVACADIAZyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhAwJAA0AgAyIAKAIEQXhxIAVGDQEgAUEddiEDIAFBAXQhASAAIANBBHFqQRBqIgYoAgAiAw0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIIC0HQ1QAoAgAiASAETQ0AQdzVACgCACIAIARqIgIgASAEayIBQQFyNgIEQdDVACABNgIAQdzVACACNgIAIAAgBEEDcjYCBCAAQQhqIQEMCAtBACEBQbTZAEEwNgIADAcLQQAhAAsgB0UNAAJAIAYoAhwiAkECdEH01wBqIgMoAgAgBkYEQCADIAA2AgAgAA0BQcjVAEHI1QAoAgBBfiACd3E2AgAMAgsgB0EQQRQgBygCECAGRhtqIAA2AgAgAEUNAQsgACAHNgIYIAYoAhAiAgRAIAAgAjYCECACIAA2AhgLIAZBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIAhqIQEgBiAIaiIGKAIEIQULIAYgBUF+cTYCBCABIARqIAE2AgAgBCABQQFyNgIEIAFB/wFNBEAgAUF4cUHs1QBqIQACf0HE1QAoAgAiAkEBIAFBA3Z0IgFxRQRAQcTVACABIAJyNgIAIAAMAQsgACgCCAsiASAENgIMIAAgBDYCCCAEIAA2AgwgBCABNgIIDAELQR8hBSABQf///wdNBEAgAUEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+aiEFCyAEIAU2AhwgBEIANwIQIAVBAnRB9NcAaiEAQcjVACgCACICQQEgBXQiA3FFBEAgACAENgIAQcjVACACIANyNgIAIAQgADYCGCAEIAQ2AgggBCAENgIMDAELIAFBGSAFQQF2a0EAIAVBH0cbdCEFIAAoAgAhAAJAA0AgACICKAIEQXhxIAFGDQEgBUEddiEAIAVBAXQhBSACIABBBHFqQRBqIgMoAgAiAA0ACyADIAQ2AgAgBCACNgIYIAQgBDYCDCAEIAQ2AggMAQsgAigCCCIAIAQ2AgwgAiAENgIIIARBADYCGCAEIAI2AgwgBCAANgIICyAJQQhqIQEMAgsCQCAHRQ0AAkAgAygCHCIBQQJ0QfTXAGoiAigCACADRgRAIAIgADYCACAADQFByNUAIAhBfiABd3EiCDYCAAwCCyAHQRBBFCAHKAIQIANGG2ogADYCACAARQ0BCyAAIAc2AhggAygCECIBBEAgACABNgIQIAEgADYCGAsgA0EUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkAgBUEPTQRAIAMgBCAFaiIAQQNyNgIEIAAgA2oiACAAKAIEQQFyNgIEDAELIAMgBGoiAiAFQQFyNgIEIAMgBEEDcjYCBCACIAVqIAU2AgAgBUH/AU0EQCAFQXhxQezVAGohAAJ/QcTVACgCACIBQQEgBUEDdnQiBXFFBEBBxNUAIAEgBXI2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEH01wBqIQBBASABdCIEIAhxRQRAIAAgAjYCAEHI1QAgBCAIcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQQCQANAIAQiACgCBEF4cSAFRg0BIAFBHXYhBCABQQF0IQEgACAEQQRxakEQaiIGKAIAIgQNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAsgA0EIaiEBDAELAkAgCUUNAAJAIAAoAhwiAUECdEH01wBqIgIoAgAgAEYEQCACIAM2AgAgAw0BQcjVACALQX4gAXdxNgIADAILIAlBEEEUIAkoAhAgAEYbaiADNgIAIANFDQELIAMgCTYCGCAAKAIQIgEEQCADIAE2AhAgASADNgIYCyAAQRRqKAIAIgFFDQAgA0EUaiABNgIAIAEgAzYCGAsCQCAFQQ9NBEAgACAEIAVqIgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMAQsgACAEaiIHIAVBAXI2AgQgACAEQQNyNgIEIAUgB2ogBTYCACAIBEAgCEF4cUHs1QBqIQFB2NUAKAIAIQMCf0EBIAhBA3Z0IgIgBnFFBEBBxNUAIAIgBnI2AgAgAQwBCyABKAIICyICIAM2AgwgASADNgIIIAMgATYCDCADIAI2AggLQdjVACAHNgIAQczVACAFNgIACyAAQQhqIQELIApBEGokACABC0MAIABFBEA/AEEQdA8LAkAgAEH//wNxDQAgAEEASA0AIABBEHZAACIAQX9GBEBBtNkAQTA2AgBBfw8LIABBEHQPCwALC5lCIgBBgAgLDQEAAAAAAAAAAgAAAAMAQZgICwUEAAAABQBBqAgLCQYAAAAHAAAACABB5AgLwjJJbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBFeHBlY3RlZCBMRiBhZnRlciBoZWFkZXJzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3Byb3RvY29sX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fcHJvdG9jb2wARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgAVHJhbnNmZXItRW5jb2RpbmcgY2FuJ3QgYmUgcHJlc2VudCB3aXRoIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgc2l6ZQBFeHBlY3RlZCBMRiBhZnRlciBjaHVuayBzaXplAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBVbmV4cGVjdGVkIHdoaXRlc3BhY2UgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBjaHVuayBleHRlbnNpb24gdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIHF1b3RlZC1wYWlyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fcHJvdG9jb2xfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciByZXNwb25zZSBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgZXh0ZW5zaW9uIG5hbWUASW52YWxpZCBzdGF0dXMgY29kZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABNaXNzaW5nIGV4cGVjdGVkIENSIGFmdGVyIGNodW5rIGRhdGEARXhwZWN0ZWQgTEYgYWZ0ZXIgY2h1bmsgZGF0YQBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AARGF0YSBhZnRlciBgQ29ubmVjdGlvbjogY2xvc2VgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBRVUVSWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAEV4cGVjdGVkIExGIGFmdGVyIENSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX1BST1RPQ09MX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8sIFJUU1AvIG9yIElDRS8A5xUAAK8VAACkEgAAkhoAACYWAACeFAAA2xkAAHkVAAB+EgAA/hQAADYVAAALFgAA2BYAAPMSAABCGAAArBYAABIVAAAUFwAA7xcAAEgUAABxFwAAshoAAGsZAAB+GQAANRQAAIIaAABEFwAA/RYAAB4YAACHFwAAqhkAAJMSAAAHGAAALBcAAMoXAACkFwAA5xUAAOcVAABYFwAAOxgAAKASAAAtHAAAwxEAAEgRAADeEgAAQhMAAKQZAAD9EAAA9xUAAKUVAADvFgAA+BkAAEoWAABWFgAA9RUAAAoaAAAIGgAAARoAAKsVAABCEgAA1xAAAEwRAAAFGQAAVBYAAB4RAADKGQAAyBkAAE4WAAD/GAAAcRQAAPAVAADuFQAAlBkAAPwVAAC/GQAAmxkAAHwUAABDEQAAcBgAAJUUAAAnFAAAGRQAANUSAADUGQAARBYAAPcQAEG5OwsBAQBB0DsL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBuj0LBAEAAAIAQdE9C14DBAMDAwMDAAADAwADAwADAwMDAwMDAwMDAAUAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAwADAEG6PwsEAQAAAgBB0T8LXgMAAwMDAwMAAAMDAAMDAAMDAwMDAwMDAwMABAAFAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwADAAMAQbDBAAsNbG9zZWVlcC1hbGl2ZQBBycEACwEBAEHgwQAL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBycMACwEBAEHgwwAL5wEBAQEBAQEBAQEBAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAWNodW5rZWQAQfHFAAteAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBB0McACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQYDIAAsgcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQpTTQ0KDQoAQanIAAsFAQIAAQMAQcDIAAtfBAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==";Object.defineProperty(t,"exports",{get:()=>r||(r=n.from(s,"base64"))})},922429,(e,t,i)=>{"use strict";let r,{Buffer:n}=e.r(951615),s="AGFzbQEAAAABJwdgAX8Bf2ADf39/AX9gAn9/AGABfwBgBH9/f38Bf2AAAGADf39/AALLAQgDZW52GHdhc21fb25faGVhZGVyc19jb21wbGV0ZQAEA2VudhV3YXNtX29uX21lc3NhZ2VfYmVnaW4AAANlbnYLd2FzbV9vbl91cmwAAQNlbnYOd2FzbV9vbl9zdGF0dXMAAQNlbnYUd2FzbV9vbl9oZWFkZXJfZmllbGQAAQNlbnYUd2FzbV9vbl9oZWFkZXJfdmFsdWUAAQNlbnYMd2FzbV9vbl9ib2R5AAEDZW52GHdhc21fb25fbWVzc2FnZV9jb21wbGV0ZQAAAzU0BQYAAAMAAAAAAAADAQMAAwMDAAACAAAAAAICAgICAgICAgIBAQEBAQEBAQEBAwAAAwAAAAQFAXABExMFAwEAAgYIAX8BQcDZBAsHxQcoBm1lbW9yeQIAC19pbml0aWFsaXplAAgZX19pbmRpcmVjdF9mdW5jdGlvbl90YWJsZQEAC2xsaHR0cF9pbml0AAkYbGxodHRwX3Nob3VsZF9rZWVwX2FsaXZlADcMbGxodHRwX2FsbG9jAAsGbWFsbG9jADkLbGxodHRwX2ZyZWUADARmcmVlAAwPbGxodHRwX2dldF90eXBlAA0VbGxodHRwX2dldF9odHRwX21ham9yAA4VbGxodHRwX2dldF9odHRwX21pbm9yAA8RbGxodHRwX2dldF9tZXRob2QAEBZsbGh0dHBfZ2V0X3N0YXR1c19jb2RlABESbGxodHRwX2dldF91cGdyYWRlABIMbGxodHRwX3Jlc2V0ABMObGxodHRwX2V4ZWN1dGUAFBRsbGh0dHBfc2V0dGluZ3NfaW5pdAAVDWxsaHR0cF9maW5pc2gAFgxsbGh0dHBfcGF1c2UAFw1sbGh0dHBfcmVzdW1lABgbbGxodHRwX3Jlc3VtZV9hZnRlcl91cGdyYWRlABkQbGxodHRwX2dldF9lcnJubwAaF2xsaHR0cF9nZXRfZXJyb3JfcmVhc29uABsXbGxodHRwX3NldF9lcnJvcl9yZWFzb24AHBRsbGh0dHBfZ2V0X2Vycm9yX3BvcwAdEWxsaHR0cF9lcnJub19uYW1lAB4SbGxodHRwX21ldGhvZF9uYW1lAB8SbGxodHRwX3N0YXR1c19uYW1lACAabGxodHRwX3NldF9sZW5pZW50X2hlYWRlcnMAISFsbGh0dHBfc2V0X2xlbmllbnRfY2h1bmtlZF9sZW5ndGgAIh1sbGh0dHBfc2V0X2xlbmllbnRfa2VlcF9hbGl2ZQAjJGxsaHR0cF9zZXRfbGVuaWVudF90cmFuc2Zlcl9lbmNvZGluZwAkGmxsaHR0cF9zZXRfbGVuaWVudF92ZXJzaW9uACUjbGxodHRwX3NldF9sZW5pZW50X2RhdGFfYWZ0ZXJfY2xvc2UAJidsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfbGZfYWZ0ZXJfY3IAJyxsbGh0dHBfc2V0X2xlbmllbnRfb3B0aW9uYWxfY3JsZl9hZnRlcl9jaHVuawAoKGxsaHR0cF9zZXRfbGVuaWVudF9vcHRpb25hbF9jcl9iZWZvcmVfbGYAKSpsbGh0dHBfc2V0X2xlbmllbnRfc3BhY2VzX2FmdGVyX2NodW5rX3NpemUAKhhsbGh0dHBfbWVzc2FnZV9uZWVkc19lb2YANgkYAQBBAQsSAQIDBAUKBgcyNDMuKy8tLDAxCuzaAjQWAEHA1QAoAgAEQAALQcDVAEEBNgIACxQAIAAQOCAAIAI2AjggACABOgAoCxQAIAAgAC8BNCAALQAwIAAQNxAACx4BAX9BwAAQOiIBEDggAUGACDYCOCABIAA6ACggAQuPDAEHfwJAIABFDQAgAEEIayIBIABBBGsoAgAiAEF4cSIEaiEFAkAgAEEBcQ0AIABBA3FFDQEgASABKAIAIgBrIgFB1NUAKAIASQ0BIAAgBGohBAJAAkBB2NUAKAIAIAFHBEAgAEH/AU0EQCAAQQN2IQMgASgCCCIAIAEoAgwiAkYEQEHE1QBBxNUAKAIAQX4gA3dxNgIADAULIAIgADYCCCAAIAI2AgwMBAsgASgCGCEGIAEgASgCDCIARwRAIAAgASgCCCICNgIIIAIgADYCDAwDCyABQRRqIgMoAgAiAkUEQCABKAIQIgJFDQIgAUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSgCBCIAQQNxQQNHDQIgBSAAQX5xNgIEQczVACAENgIAIAUgBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgASgCHCICQQJ0QfTXAGoiAygCACABRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAFGG2ogADYCACAARQ0BCyAAIAY2AhggASgCECICBEAgACACNgIQIAIgADYCGAsgAUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBU8NACAFKAIEIgBBAXFFDQACQAJAAkACQCAAQQJxRQRAQdzVACgCACAFRgRAQdzVACABNgIAQdDVAEHQ1QAoAgAgBGoiADYCACABIABBAXI2AgQgAUHY1QAoAgBHDQZBzNUAQQA2AgBB2NUAQQA2AgAMBgtB2NUAKAIAIAVGBEBB2NUAIAE2AgBBzNUAQczVACgCACAEaiIANgIAIAEgAEEBcjYCBCAAIAFqIAA2AgAMBgsgAEF4cSAEaiEEIABB/wFNBEAgAEEDdiEDIAUoAggiACAFKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwFCyACIAA2AgggACACNgIMDAQLIAUoAhghBiAFIAUoAgwiAEcEQEHU1QAoAgAaIAAgBSgCCCICNgIIIAIgADYCDAwDCyAFQRRqIgMoAgAiAkUEQCAFKAIQIgJFDQIgBUEQaiEDCwNAIAMhByACIgBBFGoiAygCACICDQAgAEEQaiEDIAAoAhAiAg0ACyAHQQA2AgAMAgsgBSAAQX5xNgIEIAEgBGogBDYCACABIARBAXI2AgQMAwtBACEACyAGRQ0AAkAgBSgCHCICQQJ0QfTXAGoiAygCACAFRgRAIAMgADYCACAADQFByNUAQcjVACgCAEF+IAJ3cTYCAAwCCyAGQRBBFCAGKAIQIAVGG2ogADYCACAARQ0BCyAAIAY2AhggBSgCECICBEAgACACNgIQIAIgADYCGAsgBUEUaigCACICRQ0AIABBFGogAjYCACACIAA2AhgLIAEgBGogBDYCACABIARBAXI2AgQgAUHY1QAoAgBHDQBBzNUAIAQ2AgAMAQsgBEH/AU0EQCAEQXhxQezVAGohAAJ/QcTVACgCACICQQEgBEEDdnQiA3FFBEBBxNUAIAIgA3I2AgAgAAwBCyAAKAIICyICIAE2AgwgACABNgIIIAEgADYCDCABIAI2AggMAQtBHyECIARB////B00EQCAEQSYgBEEIdmciAGt2QQFxIABBAXRrQT5qIQILIAEgAjYCHCABQgA3AhAgAkECdEH01wBqIQACQEHI1QAoAgAiA0EBIAJ0IgdxRQRAIAAgATYCAEHI1QAgAyAHcjYCACABIAA2AhggASABNgIIIAEgATYCDAwBCyAEQRkgAkEBdmtBACACQR9HG3QhAiAAKAIAIQACQANAIAAiAygCBEF4cSAERg0BIAJBHXYhACACQQF0IQIgAyAAQQRxakEQaiIHKAIAIgANAAsgByABNgIAIAEgAzYCGCABIAE2AgwgASABNgIIDAELIAMoAggiACABNgIMIAMgATYCCCABQQA2AhggASADNgIMIAEgADYCCAtB5NUAQeTVACgCAEEBayIAQX8gABs2AgALCwcAIAAtACgLBwAgAC0AKgsHACAALQArCwcAIAAtACkLBwAgAC8BNAsHACAALQAwC0ABBH8gACgCGCEBIAAvAS4hAiAALQAoIQMgACgCOCEEIAAQOCAAIAQ2AjggACADOgAoIAAgAjsBLiAAIAE2AhgLhocCAwd/A34BeyABIAJqIQQCQCAAIgMoAgwiAA0AIAMoAgQEQCADIAE2AgQLIwBBEGsiCSQAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCADKAIcIgJBAmsO/AEB+QECAwQFBgcICQoLDA0ODxAREvgBE/cBFBX2ARYX9QEYGRobHB0eHyD9AfsBIfQBIiMkJSYnKCkqK/MBLC0uLzAxMvIB8QEzNPAB7wE1Njc4OTo7PD0+P0BBQkNERUZHSElKS0xNTk/6AVBRUlPuAe0BVOwBVesBVldYWVrqAVtcXV5fYGFiY2RlZmdoaWprbG1ub3BxcnN0dXZ3eHl6e3x9fn+AAYEBggGDAYQBhQGGAYcBiAGJAYoBiwGMAY0BjgGPAZABkQGSAZMBlAGVAZYBlwGYAZkBmgGbAZwBnQGeAZ8BoAGhAaIBowGkAaUBpgGnAagBqQGqAasBrAGtAa4BrwGwAbEBsgGzAbQBtQG2AbcBuAG5AboBuwG8Ab0BvgG/AcABwQHCAcMBxAHFAcYBxwHIAckBygHLAcwBzQHOAekB6AHPAecB0AHmAdEB0gHTAdQB5QHVAdYB1wHYAdkB2gHbAdwB3QHeAd8B4AHhAeIB4wEA/AELQQAM4wELQQ4M4gELQQ0M4QELQQ8M4AELQRAM3wELQRMM3gELQRQM3QELQRUM3AELQRYM2wELQRcM2gELQRgM2QELQRkM2AELQRoM1wELQRsM1gELQRwM1QELQR0M1AELQR4M0wELQR8M0gELQSAM0QELQSEM0AELQQgMzwELQSIMzgELQSQMzQELQSMMzAELQQcMywELQSUMygELQSYMyQELQScMyAELQSgMxwELQRIMxgELQREMxQELQSkMxAELQSoMwwELQSsMwgELQSwMwQELQd4BDMABC0EuDL8BC0EvDL4BC0EwDL0BC0ExDLwBC0EyDLsBC0EzDLoBC0E0DLkBC0HfAQy4AQtBNQy3AQtBOQy2AQtBDAy1AQtBNgy0AQtBNwyzAQtBOAyyAQtBPgyxAQtBOgywAQtB4AEMrwELQQsMrgELQT8MrQELQTsMrAELQQoMqwELQTwMqgELQT0MqQELQeEBDKgBC0HBAAynAQtBwAAMpgELQcIADKUBC0EJDKQBC0EtDKMBC0HDAAyiAQtBxAAMoQELQcUADKABC0HGAAyfAQtBxwAMngELQcgADJ0BC0HJAAycAQtBygAMmwELQcsADJoBC0HMAAyZAQtBzQAMmAELQc4ADJcBC0HPAAyWAQtB0AAMlQELQdEADJQBC0HSAAyTAQtB0wAMkgELQdUADJEBC0HUAAyQAQtB1gAMjwELQdcADI4BC0HYAAyNAQtB2QAMjAELQdoADIsBC0HbAAyKAQtB3AAMiQELQd0ADIgBC0HeAAyHAQtB3wAMhgELQeAADIUBC0HhAAyEAQtB4gAMgwELQeMADIIBC0HkAAyBAQtB5QAMgAELQeIBDH8LQeYADH4LQecADH0LQQYMfAtB6AAMewtBBQx6C0HpAAx5C0EEDHgLQeoADHcLQesADHYLQewADHULQe0ADHQLQQMMcwtB7gAMcgtB7wAMcQtB8AAMcAtB8gAMbwtB8QAMbgtB8wAMbQtB9AAMbAtB9QAMawtB9gAMagtBAgxpC0H3AAxoC0H4AAxnC0H5AAxmC0H6AAxlC0H7AAxkC0H8AAxjC0H9AAxiC0H+AAxhC0H/AAxgC0GAAQxfC0GBAQxeC0GCAQxdC0GDAQxcC0GEAQxbC0GFAQxaC0GGAQxZC0GHAQxYC0GIAQxXC0GJAQxWC0GKAQxVC0GLAQxUC0GMAQxTC0GNAQxSC0GOAQxRC0GPAQxQC0GQAQxPC0GRAQxOC0GSAQxNC0GTAQxMC0GUAQxLC0GVAQxKC0GWAQxJC0GXAQxIC0GYAQxHC0GZAQxGC0GaAQxFC0GbAQxEC0GcAQxDC0GdAQxCC0GeAQxBC0GfAQxAC0GgAQw/C0GhAQw+C0GiAQw9C0GjAQw8C0GkAQw7C0GlAQw6C0GmAQw5C0GnAQw4C0GoAQw3C0GpAQw2C0GqAQw1C0GrAQw0C0GsAQwzC0GtAQwyC0GuAQwxC0GvAQwwC0GwAQwvC0GxAQwuC0GyAQwtC0GzAQwsC0G0AQwrC0G1AQwqC0G2AQwpC0G3AQwoC0G4AQwnC0G5AQwmC0G6AQwlC0G7AQwkC0G8AQwjC0G9AQwiC0G+AQwhC0G/AQwgC0HAAQwfC0HBAQweC0HCAQwdC0EBDBwLQcMBDBsLQcQBDBoLQcUBDBkLQcYBDBgLQccBDBcLQcgBDBYLQckBDBULQcoBDBQLQcsBDBMLQcwBDBILQc0BDBELQc4BDBALQc8BDA8LQdABDA4LQdEBDA0LQdIBDAwLQdMBDAsLQdQBDAoLQdUBDAkLQdYBDAgLQeMBDAcLQdcBDAYLQdgBDAULQdkBDAQLQdoBDAMLQdsBDAILQd0BDAELQdwBCyECA0ACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIAMCfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAAn8CQAJAAkACfwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAwJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCACDuMBAAECAwQFBgcICQoLDA0ODxAREhMUFRYXGBkaGxwdHh8gISMkJScoKZ4DmwOaA5EDigODA4AD/QL7AvgC8gLxAu8C7QLoAucC5gLlAuQC3ALbAtoC2QLYAtcC1gLVAs8CzgLMAssCygLJAsgCxwLGAsQCwwK+ArwCugK5ArgCtwK2ArUCtAKzArICsQKwAq4CrQKpAqgCpwKmAqUCpAKjAqICoQKgAp8CmAKQAowCiwKKAoEC/gH9AfwB+wH6AfkB+AH3AfUB8wHwAesB6QHoAecB5gHlAeQB4wHiAeEB4AHfAd4B3QHcAdoB2QHYAdcB1gHVAdQB0wHSAdEB0AHPAc4BzQHMAcsBygHJAcgBxwHGAcUBxAHDAcIBwQHAAb8BvgG9AbwBuwG6AbkBuAG3AbYBtQG0AbMBsgGxAbABrwGuAa0BrAGrAaoBqQGoAacBpgGlAaQBowGiAZ8BngGZAZgBlwGWAZUBlAGTAZIBkQGQAY8BjQGMAYcBhgGFAYQBgwGCAX18e3p5dnV0UFFSU1RVCyABIARHDXJB/QEhAgy+AwsgASAERw2YAUHbASECDL0DCyABIARHDfEBQY4BIQIMvAMLIAEgBEcN/AFBhAEhAgy7AwsgASAERw2KAkH/ACECDLoDCyABIARHDZECQf0AIQIMuQMLIAEgBEcNlAJB+wAhAgy4AwsgASAERw0eQR4hAgy3AwsgASAERw0ZQRghAgy2AwsgASAERw3KAkHNACECDLUDCyABIARHDdUCQcYAIQIMtAMLIAEgBEcN1gJBwwAhAgyzAwsgASAERw3cAkE4IQIMsgMLIAMtADBBAUYNrQMMiQMLQQAhAAJAAkACQCADLQAqRQ0AIAMtACtFDQAgAy8BMiICQQJxRQ0BDAILIAMvATIiAkEBcUUNAQtBASEAIAMtAChBAUYNACADLwE0IgZB5ABrQeQASQ0AIAZBzAFGDQAgBkGwAkYNACACQcAAcQ0AQQAhACACQYgEcUGABEYNACACQShxQQBHIQALIANBADsBMiADQQA6ADECQCAARQRAIANBADoAMSADLQAuQQRxDQEMsQMLIANCADcDIAsgA0EAOgAxIANBAToANgxIC0EAIQACQCADKAI4IgJFDQAgAigCMCICRQ0AIAMgAhEAACEACyAARQ1IIABBFUcNYiADQQQ2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgyvAwsgASAERgRAQQYhAgyvAwsgAS0AAEEKRw0ZIAFBAWohAQwaCyADQgA3AyBBEiECDJQDCyABIARHDYoDQSMhAgysAwsgASAERgRAQQchAgysAwsCQAJAIAEtAABBCmsOBAEYGAAYCyABQQFqIQFBECECDJMDCyABQQFqIQEgA0Evai0AAEEBcQ0XQQAhAiADQQA2AhwgAyABNgIUIANBmSA2AhAgA0EZNgIMDKsDCyADIAMpAyAiDCAEIAFrrSIKfSILQgAgCyAMWBs3AyAgCiAMWg0YQQghAgyqAwsgASAERwRAIANBCTYCCCADIAE2AgRBFCECDJEDC0EJIQIMqQMLIAMpAyBQDa4CDEMLIAEgBEYEQEELIQIMqAMLIAEtAABBCkcNFiABQQFqIQEMFwsgA0Evai0AAEEBcUUNGQwmC0EAIQACQCADKAI4IgJFDQAgAigCUCICRQ0AIAMgAhEAACEACyAADRkMQgtBACEAAkAgAygCOCICRQ0AIAIoAlAiAkUNACADIAIRAAAhAAsgAA0aDCQLQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANGwwyCyADQS9qLQAAQQFxRQ0cDCILQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANHAxCC0EAIQACQCADKAI4IgJFDQAgAigCVCICRQ0AIAMgAhEAACEACyAADR0MIAsgASAERgRAQRMhAgygAwsCQCABLQAAIgBBCmsOBB8jIwAiCyABQQFqIQEMHwtBACEAAkAgAygCOCICRQ0AIAIoAlQiAkUNACADIAIRAAAhAAsgAA0iDEILIAEgBEYEQEEWIQIMngMLIAEtAABBwMEAai0AAEEBRw0jDIMDCwJAA0AgAS0AAEGwO2otAAAiAEEBRwRAAkAgAEECaw4CAwAnCyABQQFqIQFBISECDIYDCyAEIAFBAWoiAUcNAAtBGCECDJ0DCyADKAIEIQBBACECIANBADYCBCADIAAgAUEBaiIBEDQiAA0hDEELQQAhAAJAIAMoAjgiAkUNACACKAJUIgJFDQAgAyACEQAAIQALIAANIwwqCyABIARGBEBBHCECDJsDCyADQQo2AgggAyABNgIEQQAhAAJAIAMoAjgiAkUNACACKAJQIgJFDQAgAyACEQAAIQALIAANJUEkIQIMgQMLIAEgBEcEQANAIAEtAABBsD1qLQAAIgBBA0cEQCAAQQFrDgUYGiaCAyUmCyAEIAFBAWoiAUcNAAtBGyECDJoDC0EbIQIMmQMLA0AgAS0AAEGwP2otAAAiAEEDRwRAIABBAWsOBQ8RJxMmJwsgBCABQQFqIgFHDQALQR4hAgyYAwsgASAERwRAIANBCzYCCCADIAE2AgRBByECDP8CC0EfIQIMlwMLIAEgBEYEQEEgIQIMlwMLAkAgAS0AAEENaw4ULj8/Pz8/Pz8/Pz8/Pz8/Pz8/PwA/C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAyWAwsgA0EvaiECA0AgASAERgRAQSEhAgyXAwsCQAJAAkAgAS0AACIAQQlrDhgCACkpASkpKSkpKSkpKSkpKSkpKSkpKQInCyABQQFqIQEgA0Evai0AAEEBcUUNCgwYCyABQQFqIQEMFwsgAUEBaiEBIAItAABBAnENAAtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwMlQMLIAMtAC5BgAFxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ3mAiAAQRVGBEAgA0EkNgIcIAMgATYCFCADQZsbNgIQIANBFTYCDEEAIQIMlAMLQQAhAiADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMDJMDC0EAIQIgA0EANgIcIAMgATYCFCADQb4gNgIQIANBAjYCDAySAwsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEgDKdqIgEQMiIARQ0rIANBBzYCHCADIAE2AhQgAyAANgIMDJEDCyADLQAuQcAAcUUNAQtBACEAAkAgAygCOCICRQ0AIAIoAlgiAkUNACADIAIRAAAhAAsgAEUNKyAAQRVGBEAgA0EKNgIcIAMgATYCFCADQesZNgIQIANBFTYCDEEAIQIMkAMLQQAhAiADQQA2AhwgAyABNgIUIANBkww2AhAgA0ETNgIMDI8DC0EAIQIgA0EANgIcIAMgATYCFCADQYIVNgIQIANBAjYCDAyOAwtBACECIANBADYCHCADIAE2AhQgA0HdFDYCECADQRk2AgwMjQMLQQAhAiADQQA2AhwgAyABNgIUIANB5h02AhAgA0EZNgIMDIwDCyAAQRVGDT1BACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwMiwMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUNKCADQQ02AhwgAyABNgIUIAMgADYCDAyKAwsgAEEVRg06QQAhAiADQQA2AhwgAyABNgIUIANB0A82AhAgA0EiNgIMDIkDCyADKAIEIQBBACECIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDCgLIANBDjYCHCADIAA2AgwgAyABQQFqNgIUDIgDCyAAQRVGDTdBACECIANBADYCHCADIAE2AhQgA0HQDzYCECADQSI2AgwMhwMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDMiAEUEQCABQQFqIQEMJwsgA0EPNgIcIAMgADYCDCADIAFBAWo2AhQMhgMLQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDIUDCyAAQRVGDTNBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwMhAMLIAMoAgQhAEEAIQIgA0EANgIEIAMgACABEDQiAEUNJSADQRE2AhwgAyABNgIUIAMgADYCDAyDAwsgAEEVRg0wQQAhAiADQQA2AhwgAyABNgIUIANB1gw2AhAgA0EjNgIMDIIDCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDCULIANBEjYCHCADIAA2AgwgAyABQQFqNgIUDIEDCyADQS9qLQAAQQFxRQ0BC0EXIQIM5gILQQAhAiADQQA2AhwgAyABNgIUIANB4hc2AhAgA0EZNgIMDP4CCyAAQTtHDQAgAUEBaiEBDAwLQQAhAiADQQA2AhwgAyABNgIUIANBkhg2AhAgA0ECNgIMDPwCCyAAQRVGDShBACECIANBADYCHCADIAE2AhQgA0HWDDYCECADQSM2AgwM+wILIANBFDYCHCADIAE2AhQgAyAANgIMDPoCCyADKAIEIQBBACECIANBADYCBCADIAAgARA0IgBFBEAgAUEBaiEBDPUCCyADQRU2AhwgAyAANgIMIAMgAUEBajYCFAz5AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzzAgsgA0EXNgIcIAMgADYCDCADIAFBAWo2AhQM+AILIABBFUYNI0EAIQIgA0EANgIcIAMgATYCFCADQdYMNgIQIANBIzYCDAz3AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQwdCyADQRk2AhwgAyAANgIMIAMgAUEBajYCFAz2AgsgAygCBCEAQQAhAiADQQA2AgQgAyAAIAEQNCIARQRAIAFBAWohAQzvAgsgA0EaNgIcIAMgADYCDCADIAFBAWo2AhQM9QILIABBFUYNH0EAIQIgA0EANgIcIAMgATYCFCADQdAPNgIQIANBIjYCDAz0AgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDBsLIANBHDYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgzzAgsgAygCBCEAIANBADYCBCADIAAgARAzIgBFBEAgAUEBaiEBDOsCCyADQR02AhwgAyAANgIMIAMgAUEBajYCFEEAIQIM8gILIABBO0cNASABQQFqIQELQSYhAgzXAgtBACECIANBADYCHCADIAE2AhQgA0GfFTYCECADQQw2AgwM7wILIAEgBEcEQANAIAEtAABBIEcNhAIgBCABQQFqIgFHDQALQSwhAgzvAgtBLCECDO4CCyABIARGBEBBNCECDO4CCwJAAkADQAJAIAEtAABBCmsOBAIAAAMACyAEIAFBAWoiAUcNAAtBNCECDO8CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNnwIgA0EyNgIcIAMgATYCFCADIAA2AgxBACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUEQCABQQFqIQEMnwILIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgztAgsgASAERwRAAkADQCABLQAAQTBrIgBB/wFxQQpPBEBBOiECDNcCCyADKQMgIgtCmbPmzJmz5swZVg0BIAMgC0IKfiIKNwMgIAogAK1C/wGDIgtCf4VWDQEgAyAKIAt8NwMgIAQgAUEBaiIBRw0AC0HAACECDO4CCyADKAIEIQAgA0EANgIEIAMgACABQQFqIgEQMSIADRcM4gILQcAAIQIM7AILIAEgBEYEQEHJACECDOwCCwJAA0ACQCABLQAAQQlrDhgAAqICogKpAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAqICogKiAgCiAgsgBCABQQFqIgFHDQALQckAIQIM7AILIAFBAWohASADQS9qLQAAQQFxDaUCIANBADYCHCADIAE2AhQgA0GXEDYCECADQQo2AgxBACECDOsCCyABIARHBEADQCABLQAAQSBHDRUgBCABQQFqIgFHDQALQfgAIQIM6wILQfgAIQIM6gILIANBAjoAKAw4C0EAIQIgA0EANgIcIANBvws2AhAgA0ECNgIMIAMgAUEBajYCFAzoAgtBACECDM4CC0ENIQIMzQILQRMhAgzMAgtBFSECDMsCC0EWIQIMygILQRghAgzJAgtBGSECDMgCC0EaIQIMxwILQRshAgzGAgtBHCECDMUCC0EdIQIMxAILQR4hAgzDAgtBHyECDMICC0EgIQIMwQILQSIhAgzAAgtBIyECDL8CC0ElIQIMvgILQeUAIQIMvQILIANBPTYCHCADIAE2AhQgAyAANgIMQQAhAgzVAgsgA0EbNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIM1AILIANBIDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNMCCyADQRM2AhwgAyABNgIUIANBmBo2AhAgA0EVNgIMQQAhAgzSAgsgA0ELNgIcIAMgATYCFCADQZgaNgIQIANBFTYCDEEAIQIM0QILIANBEDYCHCADIAE2AhQgA0GYGjYCECADQRU2AgxBACECDNACCyADQSA2AhwgAyABNgIUIANBpBw2AhAgA0EVNgIMQQAhAgzPAgsgA0ELNgIcIAMgATYCFCADQaQcNgIQIANBFTYCDEEAIQIMzgILIANBDDYCHCADIAE2AhQgA0GkHDYCECADQRU2AgxBACECDM0CC0EAIQIgA0EANgIcIAMgATYCFCADQd0ONgIQIANBEjYCDAzMAgsCQANAAkAgAS0AAEEKaw4EAAICAAILIAQgAUEBaiIBRw0AC0H9ASECDMwCCwJAAkAgAy0ANkEBRw0AQQAhAAJAIAMoAjgiAkUNACACKAJgIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRw0BIANB/AE2AhwgAyABNgIUIANB3Bk2AhAgA0EVNgIMQQAhAgzNAgtB3AEhAgyzAgsgA0EANgIcIAMgATYCFCADQfkLNgIQIANBHzYCDEEAIQIMywILAkACQCADLQAoQQFrDgIEAQALQdsBIQIMsgILQdQBIQIMsQILIANBAjoAMUEAIQACQCADKAI4IgJFDQAgAigCACICRQ0AIAMgAhEAACEACyAARQRAQd0BIQIMsQILIABBFUcEQCADQQA2AhwgAyABNgIUIANBtAw2AhAgA0EQNgIMQQAhAgzKAgsgA0H7ATYCHCADIAE2AhQgA0GBGjYCECADQRU2AgxBACECDMkCCyABIARGBEBB+gEhAgzJAgsgAS0AAEHIAEYNASADQQE6ACgLQcABIQIMrgILQdoBIQIMrQILIAEgBEcEQCADQQw2AgggAyABNgIEQdkBIQIMrQILQfkBIQIMxQILIAEgBEYEQEH4ASECDMUCCyABLQAAQcgARw0EIAFBAWohAUHYASECDKsCCyABIARGBEBB9wEhAgzEAgsCQAJAIAEtAABBxQBrDhAABQUFBQUFBQUFBQUFBQUBBQsgAUEBaiEBQdYBIQIMqwILIAFBAWohAUHXASECDKoCC0H2ASECIAEgBEYNwgIgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABButUAai0AAEcNAyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMwwILIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgBFBEBB4wEhAgyqAgsgA0H1ATYCHCADIAE2AhQgAyAANgIMQQAhAgzCAgtB9AEhAiABIARGDcECIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQbjVAGotAABHDQIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADMICCyADQYEEOwEoIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARAuIgANAwwCCyADQQA2AgALQQAhAiADQQA2AhwgAyABNgIUIANB5R82AhAgA0EINgIMDL8CC0HVASECDKUCCyADQfMBNgIcIAMgATYCFCADIAA2AgxBACECDL0CC0EAIQACQCADKAI4IgJFDQAgAigCQCICRQ0AIAMgAhEAACEACyAARQ1uIABBFUcEQCADQQA2AhwgAyABNgIUIANBgg82AhAgA0EgNgIMQQAhAgy9AgsgA0GPATYCHCADIAE2AhQgA0HsGzYCECADQRU2AgxBACECDLwCCyABIARHBEAgA0ENNgIIIAMgATYCBEHTASECDKMCC0HyASECDLsCCyABIARGBEBB8QEhAgy7AgsCQAJAAkAgAS0AAEHIAGsOCwABCAgICAgICAgCCAsgAUEBaiEBQdABIQIMowILIAFBAWohAUHRASECDKICCyABQQFqIQFB0gEhAgyhAgtB8AEhAiABIARGDbkCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEG11QBqLQAARw0EIABBAkYNAyAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy5AgtB7wEhAiABIARGDbgCIAMoAgAiACAEIAFraiEGIAEgAGtBAWohBQNAIAEtAAAgAEGz1QBqLQAARw0DIABBAUYNAiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy4AgtB7gEhAiABIARGDbcCIAMoAgAiACAEIAFraiEGIAEgAGtBAmohBQNAIAEtAAAgAEGw1QBqLQAARw0CIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBjYCAAy3AgsgAygCBCEAIANCADcDACADIAAgBUEBaiIBECsiAEUNAiADQewBNgIcIAMgATYCFCADIAA2AgxBACECDLYCCyADQQA2AgALIAMoAgQhACADQQA2AgQgAyAAIAEQKyIARQ2cAiADQe0BNgIcIAMgATYCFCADIAA2AgxBACECDLQCC0HPASECDJoCC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMtAILQc4BIQIMmgILIANB6wE2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyyAgsgASAERgRAQesBIQIMsgILIAEtAABBL0YEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQbI4NgIQIANBCDYCDEEAIQIMsQILQc0BIQIMlwILIAEgBEcEQCADQQ42AgggAyABNgIEQcwBIQIMlwILQeoBIQIMrwILIAEgBEYEQEHpASECDK8CCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHLASECDJYCCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNlwIgA0HoATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgASAERgRAQecBIQIMrgILAkAgAS0AAEEuRgRAIAFBAWohAQwBCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmAIgA0HmATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgtBygEhAgyUAgsgASAERgRAQeUBIQIMrQILQQAhAEEBIQVBASEHQQAhAgJAAkACQAJAAkACfwJAAkACQAJAAkACQAJAIAEtAABBMGsOCgoJAAECAwQFBggLC0ECDAYLQQMMBQtBBAwEC0EFDAMLQQYMAgtBBwwBC0EICyECQQAhBUEAIQcMAgtBCSECQQEhAEEAIQVBACEHDAELQQAhBUEBIQILIAMgAjoAKyABQQFqIQECQAJAIAMtAC5BEHENAAJAAkACQCADLQAqDgMBAAIECyAHRQ0DDAILIAANAQwCCyAFRQ0BCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNAiADQeIBNgIcIAMgATYCFCADIAA2AgxBACECDK8CCyADKAIEIQAgA0EANgIEIAMgACABEC8iAEUNmgIgA0HjATYCHCADIAE2AhQgAyAANgIMQQAhAgyuAgsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDZgCIANB5AE2AhwgAyABNgIUIAMgADYCDAytAgtByQEhAgyTAgtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GkDTYCECADQSE2AgxBACECDK0CC0HIASECDJMCCyADQeEBNgIcIAMgATYCFCADQdAaNgIQIANBFTYCDEEAIQIMqwILIAEgBEYEQEHhASECDKsCCwJAIAEtAABBIEYEQCADQQA7ATQgAUEBaiEBDAELIANBADYCHCADIAE2AhQgA0GZETYCECADQQk2AgxBACECDKsCC0HHASECDJECCyABIARGBEBB4AEhAgyqAgsCQCABLQAAQTBrQf8BcSICQQpJBEAgAUEBaiEBAkAgAy8BNCIAQZkzSw0AIAMgAEEKbCIAOwE0IABB/v8DcSACQf//A3NLDQAgAyAAIAJqOwE0DAILQQAhAiADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMDKsCCyADQQA2AhwgAyABNgIUIANBlR42AhAgA0ENNgIMQQAhAgyqAgtBxgEhAgyQAgsgASAERgRAQd8BIQIMqQILAkAgAS0AAEEwa0H/AXEiAkEKSQRAIAFBAWohAQJAIAMvATQiAEGZM0sNACADIABBCmwiADsBNCAAQf7/A3EgAkH//wNzSw0AIAMgACACajsBNAwCC0EAIQIgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDAyqAgsgA0EANgIcIAMgATYCFCADQZUeNgIQIANBDTYCDEEAIQIMqQILQcUBIQIMjwILIAEgBEYEQEHeASECDKgCCwJAIAEtAABBMGtB/wFxIgJBCkkEQCABQQFqIQECQCADLwE0IgBBmTNLDQAgAyAAQQpsIgA7ATQgAEH+/wNxIAJB//8Dc0sNACADIAAgAmo7ATQMAgtBACECIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgwMqQILIANBADYCHCADIAE2AhQgA0GVHjYCECADQQ02AgxBACECDKgCC0HEASECDI4CCyABIARGBEBB3QEhAgynAgsCQAJAAkACQCABLQAAQQprDhcCAwMAAwMDAwMDAwMDAwMDAwMDAwMDAQMLIAFBAWoMBQsgAUEBaiEBQcMBIQIMjwILIAFBAWohASADQS9qLQAAQQFxDQggA0EANgIcIAMgATYCFCADQY0LNgIQIANBDTYCDEEAIQIMpwILIANBADYCHCADIAE2AhQgA0GNCzYCECADQQ02AgxBACECDKYCCyABIARHBEAgA0EPNgIIIAMgATYCBEEBIQIMjQILQdwBIQIMpQILAkACQANAAkAgAS0AAEEKaw4EAgAAAwALIAQgAUEBaiIBRw0AC0HbASECDKYCCyADKAIEIQAgA0EANgIEIAMgACABEC0iAEUEQCABQQFqIQEMBAsgA0HaATYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgylAgsgAygCBCEAIANBADYCBCADIAAgARAtIgANASABQQFqCyEBQcEBIQIMigILIANB2QE2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMogILQcIBIQIMiAILIANBL2otAABBAXENASADQQA2AhwgAyABNgIUIANB5Bw2AhAgA0EZNgIMQQAhAgygAgsgASAERgRAQdkBIQIMoAILAkACQAJAIAEtAABBCmsOBAECAgACCyABQQFqIQEMAgsgAUEBaiEBDAELIAMtAC5BwABxRQ0BC0EAIQACQCADKAI4IgJFDQAgAigCPCICRQ0AIAMgAhEAACEACyAARQ2gASAAQRVGBEAgA0HZADYCHCADIAE2AhQgA0G3GjYCECADQRU2AgxBACECDJ8CCyADQQA2AhwgAyABNgIUIANBgA02AhAgA0EbNgIMQQAhAgyeAgsgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMnQILIAEgBEcEQCADQQw2AgggAyABNgIEQb8BIQIMhAILQdgBIQIMnAILIAEgBEYEQEHXASECDJwCCwJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEHBAGsOFQABAgNaBAUGWlpaBwgJCgsMDQ4PEFoLIAFBAWohAUH7ACECDJICCyABQQFqIQFB/AAhAgyRAgsgAUEBaiEBQYEBIQIMkAILIAFBAWohAUGFASECDI8CCyABQQFqIQFBhgEhAgyOAgsgAUEBaiEBQYkBIQIMjQILIAFBAWohAUGKASECDIwCCyABQQFqIQFBjQEhAgyLAgsgAUEBaiEBQZYBIQIMigILIAFBAWohAUGXASECDIkCCyABQQFqIQFBmAEhAgyIAgsgAUEBaiEBQaUBIQIMhwILIAFBAWohAUGmASECDIYCCyABQQFqIQFBrAEhAgyFAgsgAUEBaiEBQbQBIQIMhAILIAFBAWohAUG3ASECDIMCCyABQQFqIQFBvgEhAgyCAgsgASAERgRAQdYBIQIMmwILIAEtAABBzgBHDUggAUEBaiEBQb0BIQIMgQILIAEgBEYEQEHVASECDJoCCwJAAkACQCABLQAAQcIAaw4SAEpKSkpKSkpKSgFKSkpKSkoCSgsgAUEBaiEBQbgBIQIMggILIAFBAWohAUG7ASECDIECCyABQQFqIQFBvAEhAgyAAgtB1AEhAiABIARGDZgCIAMoAgAiACAEIAFraiEFIAEgAGtBB2ohBgJAA0AgAS0AACAAQajVAGotAABHDUUgAEEHRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJkCCyADQQA2AgAgBkEBaiEBQRsMRQsgASAERgRAQdMBIQIMmAILAkACQCABLQAAQckAaw4HAEdHR0dHAUcLIAFBAWohAUG5ASECDP8BCyABQQFqIQFBugEhAgz+AQtB0gEhAiABIARGDZYCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQabVAGotAABHDUMgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJcCCyADQQA2AgAgBkEBaiEBQQ8MQwtB0QEhAiABIARGDZUCIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQaTVAGotAABHDUIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJYCCyADQQA2AgAgBkEBaiEBQSAMQgtB0AEhAiABIARGDZQCIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDUEgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADJUCCyADQQA2AgAgBkEBaiEBQRIMQQsgASAERgRAQc8BIQIMlAILAkACQCABLQAAQcUAaw4OAENDQ0NDQ0NDQ0NDQwFDCyABQQFqIQFBtQEhAgz7AQsgAUEBaiEBQbYBIQIM+gELQc4BIQIgASAERg2SAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGe1QBqLQAARw0/IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyTAgsgA0EANgIAIAZBAWohAUEHDD8LQc0BIQIgASAERg2RAiADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEGY1QBqLQAARw0+IABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAySAgsgA0EANgIAIAZBAWohAUEoDD4LIAEgBEYEQEHMASECDJECCwJAAkACQCABLQAAQcUAaw4RAEFBQUFBQUFBQQFBQUFBQQJBCyABQQFqIQFBsQEhAgz5AQsgAUEBaiEBQbIBIQIM+AELIAFBAWohAUGzASECDPcBC0HLASECIAEgBEYNjwIgAygCACIAIAQgAWtqIQUgASAAa0EGaiEGAkADQCABLQAAIABBkdUAai0AAEcNPCAAQQZGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMkAILIANBADYCACAGQQFqIQFBGgw8C0HKASECIAEgBEYNjgIgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABBjdUAai0AAEcNOyAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMjwILIANBADYCACAGQQFqIQFBIQw7CyABIARGBEBByQEhAgyOAgsCQAJAIAEtAABBwQBrDhQAPT09PT09PT09PT09PT09PT09AT0LIAFBAWohAUGtASECDPUBCyABQQFqIQFBsAEhAgz0AQsgASAERgRAQcgBIQIMjQILAkACQCABLQAAQdUAaw4LADw8PDw8PDw8PAE8CyABQQFqIQFBrgEhAgz0AQsgAUEBaiEBQa8BIQIM8wELQccBIQIgASAERg2LAiADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw04IABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyMAgsgA0EANgIAIAZBAWohAUEqDDgLIAEgBEYEQEHGASECDIsCCyABLQAAQdAARw04IAFBAWohAUElDDcLQcUBIQIgASAERg2JAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGB1QBqLQAARw02IABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyKAgsgA0EANgIAIAZBAWohAUEODDYLIAEgBEYEQEHEASECDIkCCyABLQAAQcUARw02IAFBAWohAUGrASECDO8BCyABIARGBEBBwwEhAgyIAgsCQAJAAkACQCABLQAAQcIAaw4PAAECOTk5OTk5OTk5OTkDOQsgAUEBaiEBQacBIQIM8QELIAFBAWohAUGoASECDPABCyABQQFqIQFBqQEhAgzvAQsgAUEBaiEBQaoBIQIM7gELQcIBIQIgASAERg2GAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH+1ABqLQAARw0zIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyHAgsgA0EANgIAIAZBAWohAUEUDDMLQcEBIQIgASAERg2FAiADKAIAIgAgBCABa2ohBSABIABrQQRqIQYCQANAIAEtAAAgAEH51ABqLQAARw0yIABBBEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyGAgsgA0EANgIAIAZBAWohAUErDDILQcABIQIgASAERg2EAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEH21ABqLQAARw0xIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyFAgsgA0EANgIAIAZBAWohAUEsDDELQb8BIQIgASAERg2DAiADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEGh1QBqLQAARw0wIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyEAgsgA0EANgIAIAZBAWohAUERDDALQb4BIQIgASAERg2CAiADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEHy1ABqLQAARw0vIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyDAgsgA0EANgIAIAZBAWohAUEuDC8LIAEgBEYEQEG9ASECDIICCwJAAkACQAJAAkAgAS0AAEHBAGsOFQA0NDQ0NDQ0NDQ0ATQ0AjQ0AzQ0BDQLIAFBAWohAUGbASECDOwBCyABQQFqIQFBnAEhAgzrAQsgAUEBaiEBQZ0BIQIM6gELIAFBAWohAUGiASECDOkBCyABQQFqIQFBpAEhAgzoAQsgASAERgRAQbwBIQIMgQILAkACQCABLQAAQdIAaw4DADABMAsgAUEBaiEBQaMBIQIM6AELIAFBAWohAUEEDC0LQbsBIQIgASAERg3/ASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEHw1ABqLQAARw0sIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyAAgsgA0EANgIAIAZBAWohAUEdDCwLIAEgBEYEQEG6ASECDP8BCwJAAkAgAS0AAEHJAGsOBwEuLi4uLgAuCyABQQFqIQFBoQEhAgzmAQsgAUEBaiEBQSIMKwsgASAERgRAQbkBIQIM/gELIAEtAABB0ABHDSsgAUEBaiEBQaABIQIM5AELIAEgBEYEQEG4ASECDP0BCwJAAkAgAS0AAEHGAGsOCwAsLCwsLCwsLCwBLAsgAUEBaiEBQZ4BIQIM5AELIAFBAWohAUGfASECDOMBC0G3ASECIAEgBEYN+wEgAygCACIAIAQgAWtqIQUgASAAa0EDaiEGAkADQCABLQAAIABB7NQAai0AAEcNKCAAQQNGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM/AELIANBADYCACAGQQFqIQFBDQwoC0G2ASECIAEgBEYN+gEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBodUAai0AAEcNJyAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+wELIANBADYCACAGQQFqIQFBDAwnC0G1ASECIAEgBEYN+QEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB6tQAai0AAEcNJiAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+gELIANBADYCACAGQQFqIQFBAwwmC0G0ASECIAEgBEYN+AEgAygCACIAIAQgAWtqIQUgASAAa0EBaiEGAkADQCABLQAAIABB6NQAai0AAEcNJSAAQQFGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM+QELIANBADYCACAGQQFqIQFBJgwlCyABIARGBEBBswEhAgz4AQsCQAJAIAEtAABB1ABrDgIAAScLIAFBAWohAUGZASECDN8BCyABQQFqIQFBmgEhAgzeAQtBsgEhAiABIARGDfYBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQebUAGotAABHDSMgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPcBCyADQQA2AgAgBkEBaiEBQScMIwtBsQEhAiABIARGDfUBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQeTUAGotAABHDSIgAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPYBCyADQQA2AgAgBkEBaiEBQRwMIgtBsAEhAiABIARGDfQBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQd7UAGotAABHDSEgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPUBCyADQQA2AgAgBkEBaiEBQQYMIQtBrwEhAiABIARGDfMBIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQdnUAGotAABHDSAgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPQBCyADQQA2AgAgBkEBaiEBQRkMIAsgASAERgRAQa4BIQIM8wELAkACQAJAAkAgAS0AAEEtaw4jACQkJCQkJCQkJCQkJCQkJCQkJCQkJCQkASQkJCQkAiQkJAMkCyABQQFqIQFBjgEhAgzcAQsgAUEBaiEBQY8BIQIM2wELIAFBAWohAUGUASECDNoBCyABQQFqIQFBlQEhAgzZAQtBrQEhAiABIARGDfEBIAMoAgAiACAEIAFraiEFIAEgAGtBAWohBgJAA0AgAS0AACAAQdfUAGotAABHDR4gAEEBRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADPIBCyADQQA2AgAgBkEBaiEBQQsMHgsgASAERgRAQawBIQIM8QELAkACQCABLQAAQcEAaw4DACABIAsgAUEBaiEBQZABIQIM2AELIAFBAWohAUGTASECDNcBCyABIARGBEBBqwEhAgzwAQsCQAJAIAEtAABBwQBrDg8AHx8fHx8fHx8fHx8fHwEfCyABQQFqIQFBkQEhAgzXAQsgAUEBaiEBQZIBIQIM1gELIAEgBEYEQEGqASECDO8BCyABLQAAQcwARw0cIAFBAWohAUEKDBsLQakBIQIgASAERg3tASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHR1ABqLQAARw0aIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzuAQsgA0EANgIAIAZBAWohAUEeDBoLQagBIQIgASAERg3sASADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIAEtAAAgAEHK1ABqLQAARw0ZIABBBkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAztAQsgA0EANgIAIAZBAWohAUEVDBkLQacBIQIgASAERg3rASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEHH1ABqLQAARw0YIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzsAQsgA0EANgIAIAZBAWohAUEXDBgLQaYBIQIgASAERg3qASADKAIAIgAgBCABa2ohBSABIABrQQVqIQYCQANAIAEtAAAgAEHB1ABqLQAARw0XIABBBUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzrAQsgA0EANgIAIAZBAWohAUEYDBcLIAEgBEYEQEGlASECDOoBCwJAAkAgAS0AAEHJAGsOBwAZGRkZGQEZCyABQQFqIQFBiwEhAgzRAQsgAUEBaiEBQYwBIQIM0AELQaQBIQIgASAERg3oASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGm1QBqLQAARw0VIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzpAQsgA0EANgIAIAZBAWohAUEJDBULQaMBIQIgASAERg3nASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGk1QBqLQAARw0UIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzoAQsgA0EANgIAIAZBAWohAUEfDBQLQaIBIQIgASAERg3mASADKAIAIgAgBCABa2ohBSABIABrQQJqIQYCQANAIAEtAAAgAEG+1ABqLQAARw0TIABBAkYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAznAQsgA0EANgIAIAZBAWohAUECDBMLQaEBIQIgASAERg3lASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYDQCABLQAAIABBvNQAai0AAEcNESAAQQFGDQIgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM5QELIAEgBEYEQEGgASECDOUBC0EBIAEtAABB3wBHDREaIAFBAWohAUGHASECDMsBCyADQQA2AgAgBkEBaiEBQYgBIQIMygELQZ8BIQIgASAERg3iASADKAIAIgAgBCABa2ohBSABIABrQQhqIQYCQANAIAEtAAAgAEGE1QBqLQAARw0PIABBCEYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAzjAQsgA0EANgIAIAZBAWohAUEpDA8LQZ4BIQIgASAERg3hASADKAIAIgAgBCABa2ohBSABIABrQQNqIQYCQANAIAEtAAAgAEG41ABqLQAARw0OIABBA0YNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAziAQsgA0EANgIAIAZBAWohAUEtDA4LIAEgBEYEQEGdASECDOEBCyABLQAAQcUARw0OIAFBAWohAUGEASECDMcBCyABIARGBEBBnAEhAgzgAQsCQAJAIAEtAABBzABrDggADw8PDw8PAQ8LIAFBAWohAUGCASECDMcBCyABQQFqIQFBgwEhAgzGAQtBmwEhAiABIARGDd4BIAMoAgAiACAEIAFraiEFIAEgAGtBBGohBgJAA0AgAS0AACAAQbPUAGotAABHDQsgAEEERg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN8BCyADQQA2AgAgBkEBaiEBQSMMCwtBmgEhAiABIARGDd0BIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQbDUAGotAABHDQogAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADN4BCyADQQA2AgAgBkEBaiEBQQAMCgsgASAERgRAQZkBIQIM3QELAkACQCABLQAAQcgAaw4IAAwMDAwMDAEMCyABQQFqIQFB/QAhAgzEAQsgAUEBaiEBQYABIQIMwwELIAEgBEYEQEGYASECDNwBCwJAAkAgAS0AAEHOAGsOAwALAQsLIAFBAWohAUH+ACECDMMBCyABQQFqIQFB/wAhAgzCAQsgASAERgRAQZcBIQIM2wELIAEtAABB2QBHDQggAUEBaiEBQQgMBwtBlgEhAiABIARGDdkBIAMoAgAiACAEIAFraiEFIAEgAGtBA2ohBgJAA0AgAS0AACAAQazUAGotAABHDQYgAEEDRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNoBCyADQQA2AgAgBkEBaiEBQQUMBgtBlQEhAiABIARGDdgBIAMoAgAiACAEIAFraiEFIAEgAGtBBWohBgJAA0AgAS0AACAAQabUAGotAABHDQUgAEEFRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNkBCyADQQA2AgAgBkEBaiEBQRYMBQtBlAEhAiABIARGDdcBIAMoAgAiACAEIAFraiEFIAEgAGtBAmohBgJAA0AgAS0AACAAQaHVAGotAABHDQQgAEECRg0BIABBAWohACAEIAFBAWoiAUcNAAsgAyAFNgIADNgBCyADQQA2AgAgBkEBaiEBQRAMBAsgASAERgRAQZMBIQIM1wELAkACQCABLQAAQcMAaw4MAAYGBgYGBgYGBgYBBgsgAUEBaiEBQfkAIQIMvgELIAFBAWohAUH6ACECDL0BC0GSASECIAEgBEYN1QEgAygCACIAIAQgAWtqIQUgASAAa0EFaiEGAkADQCABLQAAIABBoNQAai0AAEcNAiAAQQVGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAM1gELIANBADYCACAGQQFqIQFBJAwCCyADQQA2AgAMAgsgASAERgRAQZEBIQIM1AELIAEtAABBzABHDQEgAUEBaiEBQRMLOgApIAMoAgQhACADQQA2AgQgAyAAIAEQLiIADQIMAQtBACECIANBADYCHCADIAE2AhQgA0H+HzYCECADQQY2AgwM0QELQfgAIQIMtwELIANBkAE2AhwgAyABNgIUIAMgADYCDEEAIQIMzwELQQAhAAJAIAMoAjgiAkUNACACKAJAIgJFDQAgAyACEQAAIQALIABFDQAgAEEVRg0BIANBADYCHCADIAE2AhQgA0GCDzYCECADQSA2AgxBACECDM4BC0H3ACECDLQBCyADQY8BNgIcIAMgATYCFCADQewbNgIQIANBFTYCDEEAIQIMzAELIAEgBEYEQEGPASECDMwBCwJAIAEtAABBIEYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZsfNgIQIANBBjYCDEEAIQIMzAELQQIhAgyyAQsDQCABLQAAQSBHDQIgBCABQQFqIgFHDQALQY4BIQIMygELIAEgBEYEQEGNASECDMoBCwJAIAEtAABBCWsOBEoAAEoAC0H1ACECDLABCyADLQApQQVGBEBB9gAhAgywAQtB9AAhAgyvAQsgASAERgRAQYwBIQIMyAELIANBEDYCCCADIAE2AgQMCgsgASAERgRAQYsBIQIMxwELAkAgAS0AAEEJaw4ERwAARwALQfMAIQIMrQELIAEgBEcEQCADQRA2AgggAyABNgIEQfEAIQIMrQELQYoBIQIMxQELAkAgASAERwRAA0AgAS0AAEGg0ABqLQAAIgBBA0cEQAJAIABBAWsOAkkABAtB8AAhAgyvAQsgBCABQQFqIgFHDQALQYgBIQIMxgELQYgBIQIMxQELIANBADYCHCADIAE2AhQgA0HbIDYCECADQQc2AgxBACECDMQBCyABIARGBEBBiQEhAgzEAQsCQAJAAkAgAS0AAEGg0gBqLQAAQQFrDgNGAgABC0HyACECDKwBCyADQQA2AhwgAyABNgIUIANBtBI2AhAgA0EHNgIMQQAhAgzEAQtB6gAhAgyqAQsgASAERwRAIAFBAWohAUHvACECDKoBC0GHASECDMIBCyAEIAEiAEYEQEGGASECDMIBCyAALQAAIgFBL0YEQCAAQQFqIQFB7gAhAgypAQsgAUEJayICQRdLDQEgACEBQQEgAnRBm4CABHENQQwBCyAEIAEiAEYEQEGFASECDMEBCyAALQAAQS9HDQAgAEEBaiEBDAMLQQAhAiADQQA2AhwgAyAANgIUIANB2yA2AhAgA0EHNgIMDL8BCwJAAkACQAJAAkADQCABLQAAQaDOAGotAAAiAEEFRwRAAkACQCAAQQFrDghHBQYHCAAEAQgLQesAIQIMrQELIAFBAWohAUHtACECDKwBCyAEIAFBAWoiAUcNAAtBhAEhAgzDAQsgAUEBagwUCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDMEBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDMABCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNHiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDL8BCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy+AQsgASAERgRAQYMBIQIMvgELAkAgAS0AAEGgzgBqLQAAQQFrDgg+BAUGAAgCAwcLIAFBAWohAQtBAyECDKMBCyABQQFqDA0LQQAhAiADQQA2AhwgA0HREjYCECADQQc2AgwgAyABQQFqNgIUDLoBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQdsANgIcIAMgATYCFCADIAA2AgxBACECDLkBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQd0ANgIcIAMgATYCFCADIAA2AgxBACECDLgBCyADKAIEIQAgA0EANgIEIAMgACABECwiAEUNFiADQfoANgIcIAMgATYCFCADIAA2AgxBACECDLcBCyADQQA2AhwgAyABNgIUIANB+Q82AhAgA0EHNgIMQQAhAgy2AQtB7AAhAgycAQsgASAERgRAQYIBIQIMtQELIAFBAWoMAgsgASAERgRAQYEBIQIMtAELIAFBAWoMAQsgASAERg0BIAFBAWoLIQFBBCECDJgBC0GAASECDLABCwNAIAEtAABBoMwAai0AACIAQQJHBEAgAEEBRwRAQekAIQIMmQELDDELIAQgAUEBaiIBRw0AC0H/ACECDK8BCyABIARGBEBB/gAhAgyvAQsCQCABLQAAQQlrDjcvAwYvBAYGBgYGBgYGBgYGBgYGBgYGBgUGBgIGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYGBgYABgsgAUEBagshAUEFIQIMlAELIAFBAWoMBgsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgyrAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgyqAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQggA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgypAQsgA0EANgIcIAMgATYCFCADQY0UNgIQIANBBzYCDEEAIQIMqAELAkACQAJAAkADQCABLQAAQaDKAGotAAAiAEEFRwRAAkAgAEEBaw4GLgMEBQYABgtB6AAhAgyUAQsgBCABQQFqIgFHDQALQf0AIQIMqwELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB2wA2AhwgAyABNgIUIAMgADYCDEEAIQIMqgELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB3QA2AhwgAyABNgIUIAMgADYCDEEAIQIMqQELIAMoAgQhACADQQA2AgQgAyAAIAEQLCIARQ0HIANB+gA2AhwgAyABNgIUIAMgADYCDEEAIQIMqAELIANBADYCHCADIAE2AhQgA0HkCDYCECADQQc2AgxBACECDKcBCyABIARGDQEgAUEBagshAUEGIQIMjAELQfwAIQIMpAELAkACQAJAAkADQCABLQAAQaDIAGotAAAiAEEFRwRAIABBAWsOBCkCAwQFCyAEIAFBAWoiAUcNAAtB+wAhAgynAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HbADYCHCADIAE2AhQgAyAANgIMQQAhAgymAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0HdADYCHCADIAE2AhQgAyAANgIMQQAhAgylAQsgAygCBCEAIANBADYCBCADIAAgARAsIgBFDQMgA0H6ADYCHCADIAE2AhQgAyAANgIMQQAhAgykAQsgA0EANgIcIAMgATYCFCADQbwKNgIQIANBBzYCDEEAIQIMowELQc8AIQIMiQELQdEAIQIMiAELQecAIQIMhwELIAEgBEYEQEH6ACECDKABCwJAIAEtAABBCWsOBCAAACAACyABQQFqIQFB5gAhAgyGAQsgASAERgRAQfkAIQIMnwELAkAgAS0AAEEJaw4EHwAAHwALQQAhAAJAIAMoAjgiAkUNACACKAI4IgJFDQAgAyACEQAAIQALIABFBEBB4gEhAgyGAQsgAEEVRwRAIANBADYCHCADIAE2AhQgA0HJDTYCECADQRo2AgxBACECDJ8BCyADQfgANgIcIAMgATYCFCADQeoaNgIQIANBFTYCDEEAIQIMngELIAEgBEcEQCADQQ02AgggAyABNgIEQeQAIQIMhQELQfcAIQIMnQELIAEgBEYEQEH2ACECDJ0BCwJAAkACQCABLQAAQcgAaw4LAAELCwsLCwsLCwILCyABQQFqIQFB3QAhAgyFAQsgAUEBaiEBQeAAIQIMhAELIAFBAWohAUHjACECDIMBC0H1ACECIAEgBEYNmwEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBtdUAai0AAEcNCCAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMnAELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgAEQCADQfQANgIcIAMgATYCFCADIAA2AgxBACECDJwBC0HiACECDIIBC0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMnAELQeEAIQIMggELIANB8wA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyaAQsgAy0AKSIAQSNrQQtJDQkCQCAAQQZLDQBBASAAdEHKAHFFDQAMCgtBACECIANBADYCHCADIAE2AhQgA0HtCTYCECADQQg2AgwMmQELQfIAIQIgASAERg2YASADKAIAIgAgBCABa2ohBSABIABrQQFqIQYCQANAIAEtAAAgAEGz1QBqLQAARw0FIABBAUYNASAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAyZAQsgAygCBCEAIANCADcDACADIAAgBkEBaiIBECsiAARAIANB8QA2AhwgAyABNgIUIAMgADYCDEEAIQIMmQELQd8AIQIMfwtBACEAAkAgAygCOCICRQ0AIAIoAjQiAkUNACADIAIRAAAhAAsCQCAABEAgAEEVRg0BIANBADYCHCADIAE2AhQgA0HqDTYCECADQSY2AgxBACECDJkBC0HeACECDH8LIANB8AA2AhwgAyABNgIUIANBgBs2AhAgA0EVNgIMQQAhAgyXAQsgAy0AKUEhRg0GIANBADYCHCADIAE2AhQgA0GRCjYCECADQQg2AgxBACECDJYBC0HvACECIAEgBEYNlQEgAygCACIAIAQgAWtqIQUgASAAa0ECaiEGAkADQCABLQAAIABBsNUAai0AAEcNAiAAQQJGDQEgAEEBaiEAIAQgAUEBaiIBRw0ACyADIAU2AgAMlgELIAMoAgQhACADQgA3AwAgAyAAIAZBAWoiARArIgBFDQIgA0HtADYCHCADIAE2AhQgAyAANgIMQQAhAgyVAQsgA0EANgIACyADKAIEIQAgA0EANgIEIAMgACABECsiAEUNgAEgA0HuADYCHCADIAE2AhQgAyAANgIMQQAhAgyTAQtB3AAhAgx5C0EAIQACQCADKAI4IgJFDQAgAigCNCICRQ0AIAMgAhEAACEACwJAIAAEQCAAQRVGDQEgA0EANgIcIAMgATYCFCADQeoNNgIQIANBJjYCDEEAIQIMkwELQdsAIQIMeQsgA0HsADYCHCADIAE2AhQgA0GAGzYCECADQRU2AgxBACECDJEBCyADLQApIgBBI0kNACAAQS5GDQAgA0EANgIcIAMgATYCFCADQckJNgIQIANBCDYCDEEAIQIMkAELQdoAIQIMdgsgASAERgRAQesAIQIMjwELAkAgAS0AAEEvRgRAIAFBAWohAQwBCyADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMQQAhAgyPAQtB2QAhAgx1CyABIARHBEAgA0EONgIIIAMgATYCBEHYACECDHULQeoAIQIMjQELIAEgBEYEQEHpACECDI0BCyABLQAAQTBrIgBB/wFxQQpJBEAgAyAAOgAqIAFBAWohAUHXACECDHQLIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ16IANB6AA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAEgBEYEQEHnACECDIwBCwJAIAEtAABBLkYEQCABQQFqIQEMAQsgAygCBCEAIANBADYCBCADIAAgARAvIgBFDXsgA0HmADYCHCADIAE2AhQgAyAANgIMQQAhAgyMAQtB1gAhAgxyCyABIARGBEBB5QAhAgyLAQtBACEAQQEhBUEBIQdBACECAkACQAJAAkACQAJ/AkACQAJAAkACQAJAAkAgAS0AAEEwaw4KCgkAAQIDBAUGCAsLQQIMBgtBAwwFC0EEDAQLQQUMAwtBBgwCC0EHDAELQQgLIQJBACEFQQAhBwwCC0EJIQJBASEAQQAhBUEAIQcMAQtBACEFQQEhAgsgAyACOgArIAFBAWohAQJAAkAgAy0ALkEQcQ0AAkACQAJAIAMtACoOAwEAAgQLIAdFDQMMAgsgAA0BDAILIAVFDQELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ0CIANB4gA2AhwgAyABNgIUIAMgADYCDEEAIQIMjQELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ19IANB4wA2AhwgAyABNgIUIAMgADYCDEEAIQIMjAELIAMoAgQhACADQQA2AgQgAyAAIAEQLyIARQ17IANB5AA2AhwgAyABNgIUIAMgADYCDAyLAQtB1AAhAgxxCyADLQApQSJGDYYBQdMAIQIMcAtBACEAAkAgAygCOCICRQ0AIAIoAkQiAkUNACADIAIRAAAhAAsgAEUEQEHVACECDHALIABBFUcEQCADQQA2AhwgAyABNgIUIANBpA02AhAgA0EhNgIMQQAhAgyJAQsgA0HhADYCHCADIAE2AhQgA0HQGjYCECADQRU2AgxBACECDIgBCyABIARGBEBB4AAhAgyIAQsCQAJAAkACQAJAIAEtAABBCmsOBAEEBAAECyABQQFqIQEMAQsgAUEBaiEBIANBL2otAABBAXFFDQELQdIAIQIMcAsgA0EANgIcIAMgATYCFCADQbYRNgIQIANBCTYCDEEAIQIMiAELIANBADYCHCADIAE2AhQgA0G2ETYCECADQQk2AgxBACECDIcBCyABIARGBEBB3wAhAgyHAQsgAS0AAEEKRgRAIAFBAWohAQwJCyADLQAuQcAAcQ0IIANBADYCHCADIAE2AhQgA0G2ETYCECADQQI2AgxBACECDIYBCyABIARGBEBB3QAhAgyGAQsgAS0AACICQQ1GBEAgAUEBaiEBQdAAIQIMbQsgASEAIAJBCWsOBAUBAQUBCyAEIAEiAEYEQEHcACECDIUBCyAALQAAQQpHDQAgAEEBagwCC0EAIQIgA0EANgIcIAMgADYCFCADQcotNgIQIANBBzYCDAyDAQsgASAERgRAQdsAIQIMgwELAkAgAS0AAEEJaw4EAwAAAwALIAFBAWoLIQFBzgAhAgxoCyABIARGBEBB2gAhAgyBAQsgAS0AAEEJaw4EAAEBAAELQQAhAiADQQA2AhwgA0GaEjYCECADQQc2AgwgAyABQQFqNgIUDH8LIANBgBI7ASpBACEAAkAgAygCOCICRQ0AIAIoAjgiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HZADYCHCADIAE2AhQgA0HqGjYCECADQRU2AgxBACECDH4LQc0AIQIMZAsgA0EANgIcIAMgATYCFCADQckNNgIQIANBGjYCDEEAIQIMfAsgASAERgRAQdkAIQIMfAsgAS0AAEEgRw09IAFBAWohASADLQAuQQFxDT0gA0EANgIcIAMgATYCFCADQcIcNgIQIANBHjYCDEEAIQIMewsgASAERgRAQdgAIQIMewsCQAJAAkACQAJAIAEtAAAiAEEKaw4EAgMDAAELIAFBAWohAUEsIQIMZQsgAEE6Rw0BIANBADYCHCADIAE2AhQgA0HnETYCECADQQo2AgxBACECDH0LIAFBAWohASADQS9qLQAAQQFxRQ1zIAMtADJBgAFxRQRAIANBMmohAiADEDVBACEAAkAgAygCOCIGRQ0AIAYoAigiBkUNACADIAYRAAAhAAsCQAJAIAAOFk1MSwEBAQEBAQEBAQEBAQEBAQEBAQABCyADQSk2AhwgAyABNgIUIANBrBk2AhAgA0EVNgIMQQAhAgx+CyADQQA2AhwgAyABNgIUIANB5Qs2AhAgA0ERNgIMQQAhAgx9C0EAIQACQCADKAI4IgJFDQAgAigCXCICRQ0AIAMgAhEAACEACyAARQ1ZIABBFUcNASADQQU2AhwgAyABNgIUIANBmxs2AhAgA0EVNgIMQQAhAgx8C0HLACECDGILQQAhAiADQQA2AhwgAyABNgIUIANBkA42AhAgA0EUNgIMDHoLIAMgAy8BMkGAAXI7ATIMOwsgASAERwRAIANBETYCCCADIAE2AgRBygAhAgxgC0HXACECDHgLIAEgBEYEQEHWACECDHgLAkACQAJAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXFB4wBrDhMAQEBAQEBAQEBAQEBAAUBAQAIDQAsgAUEBaiEBQcYAIQIMYQsgAUEBaiEBQccAIQIMYAsgAUEBaiEBQcgAIQIMXwsgAUEBaiEBQckAIQIMXgtB1QAhAiAEIAEiAEYNdiAEIAFrIAMoAgAiAWohBiAAIAFrQQVqIQcDQCABQZDIAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQhBBCABQQVGDQoaIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHYLQdQAIQIgBCABIgBGDXUgBCABayADKAIAIgFqIQYgACABa0EPaiEHA0AgAUGAyABqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0HQQMgAUEPRg0JGiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAx1C0HTACECIAQgASIARg10IAQgAWsgAygCACIBaiEGIAAgAWtBDmohBwNAIAFB4scAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNBiABQQ5GDQcgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMdAtB0gAhAiAEIAEiAEYNcyAEIAFrIAMoAgAiAWohBSAAIAFrQQFqIQYDQCABQeDHAGotAAAgAC0AACIHQSByIAcgB0HBAGtB/wFxQRpJG0H/AXFHDQUgAUEBRg0CIAFBAWohASAEIABBAWoiAEcNAAsgAyAFNgIADHMLIAEgBEYEQEHRACECDHMLAkACQCABLQAAIgBBIHIgACAAQcEAa0H/AXFBGkkbQf8BcUHuAGsOBwA5OTk5OQE5CyABQQFqIQFBwwAhAgxaCyABQQFqIQFBxAAhAgxZCyADQQA2AgAgBkEBaiEBQcUAIQIMWAtB0AAhAiAEIAEiAEYNcCAEIAFrIAMoAgAiAWohBiAAIAFrQQlqIQcDQCABQdbHAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQJBAiABQQlGDQQaIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADHALQc8AIQIgBCABIgBGDW8gBCABayADKAIAIgFqIQYgACABa0EFaiEHA0AgAUHQxwBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBBUYNAiABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxvCyAAIQEgA0EANgIADDMLQQELOgAsIANBADYCACAHQQFqIQELQS0hAgxSCwJAA0AgAS0AAEHQxQBqLQAAQQFHDQEgBCABQQFqIgFHDQALQc0AIQIMawtBwgAhAgxRCyABIARGBEBBzAAhAgxqCyABLQAAQTpGBEAgAygCBCEAIANBADYCBCADIAAgARAwIgBFDTMgA0HLADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxqCyADQQA2AhwgAyABNgIUIANB5xE2AhAgA0EKNgIMQQAhAgxpCwJAAkAgAy0ALEECaw4CAAEnCyADQTNqLQAAQQJxRQ0mIAMtAC5BAnENJiADQQA2AhwgAyABNgIUIANBphQ2AhAgA0ELNgIMQQAhAgxpCyADLQAyQSBxRQ0lIAMtAC5BAnENJSADQQA2AhwgAyABNgIUIANBvRM2AhAgA0EPNgIMQQAhAgxoC0EAIQACQCADKAI4IgJFDQAgAigCSCICRQ0AIAMgAhEAACEACyAARQRAQcEAIQIMTwsgAEEVRwRAIANBADYCHCADIAE2AhQgA0GmDzYCECADQRw2AgxBACECDGgLIANBygA2AhwgAyABNgIUIANBhRw2AhAgA0EVNgIMQQAhAgxnCyABIARHBEAgASECA0AgBCACIgFrQRBOBEAgAUEQaiEC/Qz/////////////////////IAH9AAAAIg1BB/1sIA39DODg4ODg4ODg4ODg4ODg4OD9bv0MX19fX19fX19fX19fX19fX/0mIA39DAkJCQkJCQkJCQkJCQkJCQn9I/1Q/VL9ZEF/c2giAEEQRg0BIAAgAWohAQwYCyABIARGBEBBxAAhAgxpCyABLQAAQcDBAGotAABBAUcNFyAEIAFBAWoiAkcNAAtBxAAhAgxnC0HEACECDGYLIAEgBEcEQANAAkAgAS0AACIAQSByIAAgAEHBAGtB/wFxQRpJG0H/AXEiAEEJRg0AIABBIEYNAAJAAkACQAJAIABB4wBrDhMAAwMDAwMDAwEDAwMDAwMDAwMCAwsgAUEBaiEBQTYhAgxSCyABQQFqIQFBNyECDFELIAFBAWohAUE4IQIMUAsMFQsgBCABQQFqIgFHDQALQTwhAgxmC0E8IQIMZQsgASAERgRAQcgAIQIMZQsgA0ESNgIIIAMgATYCBAJAAkACQAJAAkAgAy0ALEEBaw4EFAABAgkLIAMtADJBIHENA0HgASECDE8LAkAgAy8BMiIAQQhxRQ0AIAMtAChBAUcNACADLQAuQQhxRQ0CCyADIABB9/sDcUGABHI7ATIMCwsgAyADLwEyQRByOwEyDAQLIANBADYCBCADIAEgARAxIgAEQCADQcEANgIcIAMgADYCDCADIAFBAWo2AhRBACECDGYLIAFBAWohAQxYCyADQQA2AhwgAyABNgIUIANB9BM2AhAgA0EENgIMQQAhAgxkC0HHACECIAEgBEYNYyADKAIAIgAgBCABa2ohBSABIABrQQZqIQYCQANAIABBwMUAai0AACABLQAAQSByRw0BIABBBkYNSiAAQQFqIQAgBCABQQFqIgFHDQALIAMgBTYCAAxkCyADQQA2AgAMBQsCQCABIARHBEADQCABLQAAQcDDAGotAAAiAEEBRwRAIABBAkcNAyABQQFqIQEMBQsgBCABQQFqIgFHDQALQcUAIQIMZAtBxQAhAgxjCwsgA0EAOgAsDAELQQshAgxHC0E/IQIMRgsCQAJAA0AgAS0AACIAQSBHBEACQCAAQQprDgQDBQUDAAsgAEEsRg0DDAQLIAQgAUEBaiIBRw0AC0HGACECDGALIANBCDoALAwOCyADLQAoQQFHDQIgAy0ALkEIcQ0CIAMoAgQhACADQQA2AgQgAyAAIAEQMSIABEAgA0HCADYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxfCyABQQFqIQEMUAtBOyECDEQLAkADQCABLQAAIgBBIEcgAEEJR3ENASAEIAFBAWoiAUcNAAtBwwAhAgxdCwtBPCECDEILAkACQCABIARHBEADQCABLQAAIgBBIEcEQCAAQQprDgQDBAQDBAsgBCABQQFqIgFHDQALQT8hAgxdC0E/IQIMXAsgAyADLwEyQSByOwEyDAoLIAMoAgQhACADQQA2AgQgAyAAIAEQMSIARQ1OIANBPjYCHCADIAE2AhQgAyAANgIMQQAhAgxaCwJAIAEgBEcEQANAIAEtAABBwMMAai0AACIAQQFHBEAgAEECRg0DDAwLIAQgAUEBaiIBRw0AC0E3IQIMWwtBNyECDFoLIAFBAWohAQwEC0E7IQIgBCABIgBGDVggBCABayADKAIAIgFqIQYgACABa0EFaiEHAkADQCABQZDIAGotAAAgAC0AACIFQSByIAUgBUHBAGtB/wFxQRpJG0H/AXFHDQEgAUEFRgRAQQchAQw/CyABQQFqIQEgBCAAQQFqIgBHDQALIAMgBjYCAAxZCyADQQA2AgAgACEBDAULQTohAiAEIAEiAEYNVyAEIAFrIAMoAgAiAWohBiAAIAFrQQhqIQcCQANAIAFBtMEAai0AACAALQAAIgVBIHIgBSAFQcEAa0H/AXFBGkkbQf8BcUcNASABQQhGBEBBBSEBDD4LIAFBAWohASAEIABBAWoiAEcNAAsgAyAGNgIADFgLIANBADYCACAAIQEMBAtBOSECIAQgASIARg1WIAQgAWsgAygCACIBaiEGIAAgAWtBA2ohBwJAA0AgAUGwwQBqLQAAIAAtAAAiBUEgciAFIAVBwQBrQf8BcUEaSRtB/wFxRw0BIAFBA0YEQEEGIQEMPQsgAUEBaiEBIAQgAEEBaiIARw0ACyADIAY2AgAMVwsgA0EANgIAIAAhAQwDCwJAA0AgAS0AACIAQSBHBEAgAEEKaw4EBwQEBwILIAQgAUEBaiIBRw0AC0E4IQIMVgsgAEEsRw0BIAFBAWohAEEBIQECQAJAAkACQAJAIAMtACxBBWsOBAMBAgQACyAAIQEMBAtBAiEBDAELQQQhAQsgA0EBOgAsIAMgAy8BMiABcjsBMiAAIQEMAQsgAyADLwEyQQhyOwEyIAAhAQtBPiECDDsLIANBADoALAtBOSECDDkLIAEgBEYEQEE2IQIMUgsCQAJAAkACQAJAIAEtAABBCmsOBAACAgECCyADKAIEIQAgA0EANgIEIAMgACABEDEiAEUNAiADQTM2AhwgAyABNgIUIAMgADYCDEEAIQIMVQsgAygCBCEAIANBADYCBCADIAAgARAxIgBFBEAgAUEBaiEBDAYLIANBMjYCHCADIAA2AgwgAyABQQFqNgIUQQAhAgxUCyADLQAuQQFxBEBB3wEhAgw7CyADKAIEIQAgA0EANgIEIAMgACABEDEiAA0BDEkLQTQhAgw5CyADQTU2AhwgAyABNgIUIAMgADYCDEEAIQIMUQtBNSECDDcLIANBL2otAABBAXENACADQQA2AhwgAyABNgIUIANB6xY2AhAgA0EZNgIMQQAhAgxPC0EzIQIMNQsgASAERgRAQTIhAgxOCwJAIAEtAABBCkYEQCABQQFqIQEMAQsgA0EANgIcIAMgATYCFCADQZIXNgIQIANBAzYCDEEAIQIMTgtBMiECDDQLIAEgBEYEQEExIQIMTQsCQCABLQAAIgBBCUYNACAAQSBGDQBBASECAkAgAy0ALEEFaw4EBgQFAA0LIAMgAy8BMkEIcjsBMgwMCyADLQAuQQFxRQ0BIAMtACxBCEcNACADQQA6ACwLQT0hAgwyCyADQQA2AhwgAyABNgIUIANBwhY2AhAgA0EKNgIMQQAhAgxKC0ECIQIMAQtBBCECCyADQQE6ACwgAyADLwEyIAJyOwEyDAYLIAEgBEYEQEEwIQIMRwsgAS0AAEEKRgRAIAFBAWohAQwBCyADLQAuQQFxDQAgA0EANgIcIAMgATYCFCADQdwoNgIQIANBAjYCDEEAIQIMRgtBMCECDCwLIAFBAWohAUExIQIMKwsgASAERgRAQS8hAgxECyABLQAAIgBBCUcgAEEgR3FFBEAgAUEBaiEBIAMtAC5BAXENASADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMQQAhAgxEC0EBIQICQAJAAkACQAJAAkAgAy0ALEECaw4HBQQEAwECAAQLIAMgAy8BMkEIcjsBMgwDC0ECIQIMAQtBBCECCyADQQE6ACwgAyADLwEyIAJyOwEyC0EvIQIMKwsgA0EANgIcIAMgATYCFCADQYQTNgIQIANBCzYCDEEAIQIMQwtB4QEhAgwpCyABIARGBEBBLiECDEILIANBADYCBCADQRI2AgggAyABIAEQMSIADQELQS4hAgwnCyADQS02AhwgAyABNgIUIAMgADYCDEEAIQIMPwtBACEAAkAgAygCOCICRQ0AIAIoAkwiAkUNACADIAIRAAAhAAsgAEUNACAAQRVHDQEgA0HYADYCHCADIAE2AhQgA0GzGzYCECADQRU2AgxBACECDD4LQcwAIQIMJAsgA0EANgIcIAMgATYCFCADQbMONgIQIANBHTYCDEEAIQIMPAsgASAERgRAQc4AIQIMPAsgAS0AACIAQSBGDQIgAEE6Rg0BCyADQQA6ACxBCSECDCELIAMoAgQhACADQQA2AgQgAyAAIAEQMCIADQEMAgsgAy0ALkEBcQRAQd4BIQIMIAsgAygCBCEAIANBADYCBCADIAAgARAwIgBFDQIgA0EqNgIcIAMgADYCDCADIAFBAWo2AhRBACECDDgLIANBywA2AhwgAyAANgIMIAMgAUEBajYCFEEAIQIMNwsgAUEBaiEBQcAAIQIMHQsgAUEBaiEBDCwLIAEgBEYEQEErIQIMNQsCQCABLQAAQQpGBEAgAUEBaiEBDAELIAMtAC5BwABxRQ0GCyADLQAyQYABcQRAQQAhAAJAIAMoAjgiAkUNACACKAJcIgJFDQAgAyACEQAAIQALIABFDRIgAEEVRgRAIANBBTYCHCADIAE2AhQgA0GbGzYCECADQRU2AgxBACECDDYLIANBADYCHCADIAE2AhQgA0GQDjYCECADQRQ2AgxBACECDDULIANBMmohAiADEDVBACEAAkAgAygCOCIGRQ0AIAYoAigiBkUNACADIAYRAAAhAAsgAA4WAgEABAQEBAQEBAQEBAQEBAQEBAQEAwQLIANBAToAMAsgAiACLwEAQcAAcjsBAAtBKyECDBgLIANBKTYCHCADIAE2AhQgA0GsGTYCECADQRU2AgxBACECDDALIANBADYCHCADIAE2AhQgA0HlCzYCECADQRE2AgxBACECDC8LIANBADYCHCADIAE2AhQgA0GlCzYCECADQQI2AgxBACECDC4LQQEhByADLwEyIgVBCHFFBEAgAykDIEIAUiEHCwJAIAMtADAEQEEBIQAgAy0AKUEFRg0BIAVBwABxRSAHcUUNAQsCQCADLQAoIgJBAkYEQEEBIQAgAy8BNCIGQeUARg0CQQAhACAFQcAAcQ0CIAZB5ABGDQIgBkHmAGtBAkkNAiAGQcwBRg0CIAZBsAJGDQIMAQtBACEAIAVBwABxDQELQQIhACAFQQhxDQAgBUGABHEEQAJAIAJBAUcNACADLQAuQQpxDQBBBSEADAILQQQhAAwBCyAFQSBxRQRAIAMQNkEAR0ECdCEADAELQQBBAyADKQMgUBshAAsgAEEBaw4FAgAHAQMEC0ERIQIMEwsgA0EBOgAxDCkLQQAhAgJAIAMoAjgiAEUNACAAKAIwIgBFDQAgAyAAEQAAIQILIAJFDSYgAkEVRgRAIANBAzYCHCADIAE2AhQgA0HSGzYCECADQRU2AgxBACECDCsLQQAhAiADQQA2AhwgAyABNgIUIANB3Q42AhAgA0ESNgIMDCoLIANBADYCHCADIAE2AhQgA0H5IDYCECADQQ82AgxBACECDCkLQQAhAAJAIAMoAjgiAkUNACACKAIwIgJFDQAgAyACEQAAIQALIAANAQtBDiECDA4LIABBFUYEQCADQQI2AhwgAyABNgIUIANB0hs2AhAgA0EVNgIMQQAhAgwnCyADQQA2AhwgAyABNgIUIANB3Q42AhAgA0ESNgIMQQAhAgwmC0EqIQIMDAsgASAERwRAIANBCTYCCCADIAE2AgRBKSECDAwLQSYhAgwkCyADIAMpAyAiDCAEIAFrrSIKfSILQgAgCyAMWBs3AyAgCiAMVARAQSUhAgwkCyADKAIEIQAgA0EANgIEIAMgACABIAynaiIBEDIiAEUNACADQQU2AhwgAyABNgIUIAMgADYCDEEAIQIMIwtBDyECDAkLQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQCABLQAAQTBrDjcXFgABAgMEBQYHFBQUFBQUFAgJCgsMDRQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUDg8QERITFAtCAiEKDBYLQgMhCgwVC0IEIQoMFAtCBSEKDBMLQgYhCgwSC0IHIQoMEQtCCCEKDBALQgkhCgwPC0IKIQoMDgtCCyEKDA0LQgwhCgwMC0INIQoMCwtCDiEKDAoLQg8hCgwJC0IKIQoMCAtCCyEKDAcLQgwhCgwGC0INIQoMBQtCDiEKDAQLQg8hCgwDCyADQQA2AhwgAyABNgIUIANBnxU2AhAgA0EMNgIMQQAhAgwhCyABIARGBEBBIiECDCELQgAhCgJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAS0AAEEwaw43FRQAAQIDBAUGBxYWFhYWFhYICQoLDA0WFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFg4PEBESExYLQgIhCgwUC0IDIQoMEwtCBCEKDBILQgUhCgwRC0IGIQoMEAtCByEKDA8LQgghCgwOC0IJIQoMDQtCCiEKDAwLQgshCgwLC0IMIQoMCgtCDSEKDAkLQg4hCgwIC0IPIQoMBwtCCiEKDAYLQgshCgwFC0IMIQoMBAtCDSEKDAMLQg4hCgwCC0IPIQoMAQtCASEKCyABQQFqIQEgAykDICILQv//////////D1gEQCADIAtCBIYgCoQ3AyAMAgsgA0EANgIcIAMgATYCFCADQbUJNgIQIANBDDYCDEEAIQIMHgtBJyECDAQLQSghAgwDCyADIAE6ACwgA0EANgIAIAdBAWohAUEMIQIMAgsgA0EANgIAIAZBAWohAUEKIQIMAQsgAUEBaiEBQQghAgwACwALQQAhAiADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMDBcLQQAhAiADQQA2AhwgAyABNgIUIANBgxE2AhAgA0EJNgIMDBYLQQAhAiADQQA2AhwgAyABNgIUIANB3wo2AhAgA0EJNgIMDBULQQAhAiADQQA2AhwgAyABNgIUIANB7RA2AhAgA0EJNgIMDBQLQQAhAiADQQA2AhwgAyABNgIUIANB0hE2AhAgA0EJNgIMDBMLQQAhAiADQQA2AhwgAyABNgIUIANBsjg2AhAgA0EINgIMDBILQQAhAiADQQA2AhwgAyABNgIUIANBgxE2AhAgA0EJNgIMDBELQQAhAiADQQA2AhwgAyABNgIUIANB3wo2AhAgA0EJNgIMDBALQQAhAiADQQA2AhwgAyABNgIUIANB7RA2AhAgA0EJNgIMDA8LQQAhAiADQQA2AhwgAyABNgIUIANB0hE2AhAgA0EJNgIMDA4LQQAhAiADQQA2AhwgAyABNgIUIANBuRc2AhAgA0EPNgIMDA0LQQAhAiADQQA2AhwgAyABNgIUIANBuRc2AhAgA0EPNgIMDAwLQQAhAiADQQA2AhwgAyABNgIUIANBmRM2AhAgA0ELNgIMDAsLQQAhAiADQQA2AhwgAyABNgIUIANBnQk2AhAgA0ELNgIMDAoLQQAhAiADQQA2AhwgAyABNgIUIANBlxA2AhAgA0EKNgIMDAkLQQAhAiADQQA2AhwgAyABNgIUIANBsRA2AhAgA0EKNgIMDAgLQQAhAiADQQA2AhwgAyABNgIUIANBux02AhAgA0ECNgIMDAcLQQAhAiADQQA2AhwgAyABNgIUIANBlhY2AhAgA0ECNgIMDAYLQQAhAiADQQA2AhwgAyABNgIUIANB+Rg2AhAgA0ECNgIMDAULQQAhAiADQQA2AhwgAyABNgIUIANBxBg2AhAgA0ECNgIMDAQLIANBAjYCHCADIAE2AhQgA0GpHjYCECADQRY2AgxBACECDAMLQd4AIQIgASAERg0CIAlBCGohByADKAIAIQUCQAJAIAEgBEcEQCAFQZbIAGohCCAEIAVqIAFrIQYgBUF/c0EKaiIFIAFqIQADQCABLQAAIAgtAABHBEBBAiEIDAMLIAVFBEBBACEIIAAhAQwDCyAFQQFrIQUgCEEBaiEIIAQgAUEBaiIBRw0ACyAGIQUgBCEBCyAHQQE2AgAgAyAFNgIADAELIANBADYCACAHIAg2AgALIAcgATYCBCAJKAIMIQACQAJAIAkoAghBAWsOAgQBAAsgA0EANgIcIANBwh42AhAgA0EXNgIMIAMgAEEBajYCFEEAIQIMAwsgA0EANgIcIAMgADYCFCADQdceNgIQIANBCTYCDEEAIQIMAgsgASAERgRAQSghAgwCCyADQQk2AgggAyABNgIEQSchAgwBCyABIARGBEBBASECDAELA0ACQAJAAkAgAS0AAEEKaw4EAAEBAAELIAFBAWohAQwBCyABQQFqIQEgAy0ALkEgcQ0AQQAhAiADQQA2AhwgAyABNgIUIANBoSE2AhAgA0EFNgIMDAILQQEhAiABIARHDQALCyAJQRBqJAAgAkUEQCADKAIMIQAMAQsgAyACNgIcQQAhACADKAIEIgFFDQAgAyABIAQgAygCCBEBACIBRQ0AIAMgBDYCFCADIAE2AgwgASEACyAAC74CAQJ/IABBADoAACAAQeQAaiIBQQFrQQA6AAAgAEEAOgACIABBADoAASABQQNrQQA6AAAgAUECa0EAOgAAIABBADoAAyABQQRrQQA6AABBACAAa0EDcSIBIABqIgBBADYCAEHkACABa0F8cSICIABqIgFBBGtBADYCAAJAIAJBCUkNACAAQQA2AgggAEEANgIEIAFBCGtBADYCACABQQxrQQA2AgAgAkEZSQ0AIABBADYCGCAAQQA2AhQgAEEANgIQIABBADYCDCABQRBrQQA2AgAgAUEUa0EANgIAIAFBGGtBADYCACABQRxrQQA2AgAgAiAAQQRxQRhyIgJrIgFBIEkNACAAIAJqIQADQCAAQgA3AxggAEIANwMQIABCADcDCCAAQgA3AwAgAEEgaiEAIAFBIGsiAUEfSw0ACwsLVgEBfwJAIAAoAgwNAAJAAkACQAJAIAAtADEOAwEAAwILIAAoAjgiAUUNACABKAIwIgFFDQAgACABEQAAIgENAwtBAA8LAAsgAEHKGTYCEEEOIQELIAELGgAgACgCDEUEQCAAQd4fNgIQIABBFTYCDAsLFAAgACgCDEEVRgRAIABBADYCDAsLFAAgACgCDEEWRgRAIABBADYCDAsLBwAgACgCDAsHACAAKAIQCwkAIAAgATYCEAsHACAAKAIUCysAAkAgAEEnTw0AQv//////CSAArYhCAYNQDQAgAEECdEHQOGooAgAPCwALFwAgAEEvTwRAAAsgAEECdEHsOWooAgALvwkBAX9B9C0hAQJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAIABB5ABrDvQDY2IAAWFhYWFhYQIDBAVhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhBgcICQoLDA0OD2FhYWFhEGFhYWFhYWFhYWFhEWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYRITFBUWFxgZGhthYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhHB0eHyAhIiMkJSYnKCkqKywtLi8wMTIzNDU2YTc4OTphYWFhYWFhYTthYWE8YWFhYT0+P2FhYWFhYWFhQGFhQWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYUJDREVGR0hJSktMTU5PUFFSU2FhYWFhYWFhVFVWV1hZWlthXF1hYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFeYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhX2BhC0HqLA8LQZgmDwtB7TEPC0GgNw8LQckpDwtBtCkPC0GWLQ8LQesrDwtBojUPC0HbNA8LQeApDwtB4yQPC0HVJA8LQe4kDwtB5iUPC0HKNA8LQdA3DwtBqjUPC0H1LA8LQfYmDwtBgiIPC0HyMw8LQb4oDwtB5zcPC0HNIQ8LQcAhDwtBuCUPC0HLJQ8LQZYkDwtBjzQPC0HNNQ8LQd0qDwtB7jMPC0GcNA8LQZ4xDwtB9DUPC0HlIg8LQa8lDwtBmTEPC0GyNg8LQfk2DwtBxDIPC0HdLA8LQYIxDwtBwTEPC0GNNw8LQckkDwtB7DYPC0HnKg8LQcgjDwtB4iEPC0HJNw8LQaUiDwtBlCIPC0HbNg8LQd41DwtBhiYPC0G8Kw8LQYsyDwtBoCMPC0H2MA8LQYAsDwtBiSsPC0GkJg8LQfIjDwtBgSgPC0GrMg8LQesnDwtBwjYPC0GiJA8LQc8qDwtB3CMPC0GHJw8LQeQ0DwtBtyIPC0GtMQ8LQdUiDwtBrzQPC0HeJg8LQdYyDwtB9DQPC0GBOA8LQfQ3DwtBkjYPC0GdJw8LQYIpDwtBjSMPC0HXMQ8LQb01DwtBtDcPC0HYMA8LQbYnDwtBmjgPC0GnKg8LQcQnDwtBriMPC0H1Ig8LAAtByiYhAQsgAQsXACAAIAAvAS5B/v8DcSABQQBHcjsBLgsaACAAIAAvAS5B/f8DcSABQQBHQQF0cjsBLgsaACAAIAAvAS5B+/8DcSABQQBHQQJ0cjsBLgsaACAAIAAvAS5B9/8DcSABQQBHQQN0cjsBLgsaACAAIAAvAS5B7/8DcSABQQBHQQR0cjsBLgsaACAAIAAvAS5B3/8DcSABQQBHQQV0cjsBLgsaACAAIAAvAS5Bv/8DcSABQQBHQQZ0cjsBLgsaACAAIAAvAS5B//4DcSABQQBHQQd0cjsBLgsaACAAIAAvAS5B//0DcSABQQBHQQh0cjsBLgsaACAAIAAvAS5B//sDcSABQQBHQQl0cjsBLgs+AQJ/AkAgACgCOCIDRQ0AIAMoAgQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQeESNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAggiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQfwRNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAgwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQewKNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhAiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQfoeNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQcsQNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhgiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQbcfNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAhwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQb8VNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiwiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQf4INgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiAiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQYwdNgIQQRghBAsgBAs+AQJ/AkAgACgCOCIDRQ0AIAMoAiQiA0UNACAAIAEgAiABayADEQEAIgRBf0cNACAAQeYVNgIQQRghBAsgBAs4ACAAAn8gAC8BMkEUcUEURgRAQQEgAC0AKEEBRg0BGiAALwE0QeUARgwBCyAALQApQQVGCzoAMAtZAQJ/AkAgAC0AKEEBRg0AIAAvATQiAUHkAGtB5ABJDQAgAUHMAUYNACABQbACRg0AIAAvATIiAEHAAHENAEEBIQIgAEGIBHFBgARGDQAgAEEocUUhAgsgAguMAQECfwJAAkACQCAALQAqRQ0AIAAtACtFDQAgAC8BMiIBQQJxRQ0BDAILIAAvATIiAUEBcUUNAQtBASECIAAtAChBAUYNACAALwE0IgBB5ABrQeQASQ0AIABBzAFGDQAgAEGwAkYNACABQcAAcQ0AQQAhAiABQYgEcUGABEYNACABQShxQQBHIQILIAILcwAgAEEQav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAP0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEEwav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEEgav0MAAAAAAAAAAAAAAAAAAAAAP0LAwAgAEH9ATYCHAsGACAAEDoLmi0BC38jAEEQayIKJABB3NUAKAIAIglFBEBBnNkAKAIAIgVFBEBBqNkAQn83AgBBoNkAQoCAhICAgMAANwIAQZzZACAKQQhqQXBxQdiq1aoFcyIFNgIAQbDZAEEANgIAQYDZAEEANgIAC0GE2QBBwNkENgIAQdTVAEHA2QQ2AgBB6NUAIAU2AgBB5NUAQX82AgBBiNkAQcCmAzYCAANAIAFBgNYAaiABQfTVAGoiAjYCACACIAFB7NUAaiIDNgIAIAFB+NUAaiADNgIAIAFBiNYAaiABQfzVAGoiAzYCACADIAI2AgAgAUGQ1gBqIAFBhNYAaiICNgIAIAIgAzYCACABQYzWAGogAjYCACABQSBqIgFBgAJHDQALQczZBEGBpgM2AgBB4NUAQazZACgCADYCAEHQ1QBBgKYDNgIAQdzVAEHI2QQ2AgBBzP8HQTg2AgBByNkEIQkLAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAgAEHsAU0EQEHE1QAoAgAiBkEQIABBE2pBcHEgAEELSRsiBEEDdiIAdiIBQQNxBEACQCABQQFxIAByQQFzIgJBA3QiAEHs1QBqIgEgAEH01QBqKAIAIgAoAggiA0YEQEHE1QAgBkF+IAJ3cTYCAAwBCyABIAM2AgggAyABNgIMCyAAQQhqIQEgACACQQN0IgJBA3I2AgQgACACaiIAIAAoAgRBAXI2AgQMEQtBzNUAKAIAIgggBE8NASABBEACQEECIAB0IgJBACACa3IgASAAdHFoIgBBA3QiAkHs1QBqIgEgAkH01QBqKAIAIgIoAggiA0YEQEHE1QAgBkF+IAB3cSIGNgIADAELIAEgAzYCCCADIAE2AgwLIAIgBEEDcjYCBCAAQQN0IgAgBGshBSAAIAJqIAU2AgAgAiAEaiIEIAVBAXI2AgQgCARAIAhBeHFB7NUAaiEAQdjVACgCACEDAn9BASAIQQN2dCIBIAZxRQRAQcTVACABIAZyNgIAIAAMAQsgACgCCAsiASADNgIMIAAgAzYCCCADIAA2AgwgAyABNgIICyACQQhqIQFB2NUAIAQ2AgBBzNUAIAU2AgAMEQtByNUAKAIAIgtFDQEgC2hBAnRB9NcAaigCACIAKAIEQXhxIARrIQUgACECA0ACQCACKAIQIgFFBEAgAkEUaigCACIBRQ0BCyABKAIEQXhxIARrIgMgBUkhAiADIAUgAhshBSABIAAgAhshACABIQIMAQsLIAAoAhghCSAAKAIMIgMgAEcEQEHU1QAoAgAaIAMgACgCCCIBNgIIIAEgAzYCDAwQCyAAQRRqIgIoAgAiAUUEQCAAKAIQIgFFDQMgAEEQaiECCwNAIAIhByABIgNBFGoiAigCACIBDQAgA0EQaiECIAMoAhAiAQ0ACyAHQQA2AgAMDwtBfyEEIABBv39LDQAgAEETaiIBQXBxIQRByNUAKAIAIghFDQBBACAEayEFAkACQAJAAn9BACAEQYACSQ0AGkEfIARB////B0sNABogBEEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+agsiBkECdEH01wBqKAIAIgJFBEBBACEBQQAhAwwBC0EAIQEgBEEZIAZBAXZrQQAgBkEfRxt0IQBBACEDA0ACQCACKAIEQXhxIARrIgcgBU8NACACIQMgByIFDQBBACEFIAIhAQwDCyABIAJBFGooAgAiByAHIAIgAEEddkEEcWpBEGooAgAiAkYbIAEgBxshASAAQQF0IQAgAg0ACwsgASADckUEQEEAIQNBAiAGdCIAQQAgAGtyIAhxIgBFDQMgAGhBAnRB9NcAaigCACEBCyABRQ0BCwNAIAEoAgRBeHEgBGsiAiAFSSEAIAIgBSAAGyEFIAEgAyAAGyEDIAEoAhAiAAR/IAAFIAFBFGooAgALIgENAAsLIANFDQAgBUHM1QAoAgAgBGtPDQAgAygCGCEHIAMgAygCDCIARwRAQdTVACgCABogACADKAIIIgE2AgggASAANgIMDA4LIANBFGoiAigCACIBRQRAIAMoAhAiAUUNAyADQRBqIQILA0AgAiEGIAEiAEEUaiICKAIAIgENACAAQRBqIQIgACgCECIBDQALIAZBADYCAAwNC0HM1QAoAgAiAyAETwRAQdjVACgCACEBAkAgAyAEayICQRBPBEAgASAEaiIAIAJBAXI2AgQgASADaiACNgIAIAEgBEEDcjYCBAwBCyABIANBA3I2AgQgASADaiIAIAAoAgRBAXI2AgRBACEAQQAhAgtBzNUAIAI2AgBB2NUAIAA2AgAgAUEIaiEBDA8LQdDVACgCACIDIARLBEAgBCAJaiIAIAMgBGsiAUEBcjYCBEHc1QAgADYCAEHQ1QAgATYCACAJIARBA3I2AgQgCUEIaiEBDA8LQQAhASAEAn9BnNkAKAIABEBBpNkAKAIADAELQajZAEJ/NwIAQaDZAEKAgISAgIDAADcCAEGc2QAgCkEMakFwcUHYqtWqBXM2AgBBsNkAQQA2AgBBgNkAQQA2AgBBgIAECyIAIARBxwBqIgVqIgZBACAAayIHcSICTwRAQbTZAEEwNgIADA8LAkBB/NgAKAIAIgFFDQBB9NgAKAIAIgggAmohACAAIAFNIAAgCEtxDQBBACEBQbTZAEEwNgIADA8LQYDZAC0AAEEEcQ0EAkACQCAJBEBBhNkAIQEDQCABKAIAIgAgCU0EQCAAIAEoAgRqIAlLDQMLIAEoAggiAQ0ACwtBABA7IgBBf0YNBSACIQZBoNkAKAIAIgFBAWsiAyAAcQRAIAIgAGsgACADakEAIAFrcWohBgsgBCAGTw0FIAZB/v///wdLDQVB/NgAKAIAIgMEQEH02AAoAgAiByAGaiEBIAEgB00NBiABIANLDQYLIAYQOyIBIABHDQEMBwsgBiADayAHcSIGQf7///8HSw0EIAYQOyEAIAAgASgCACABKAIEakYNAyAAIQELAkAgBiAEQcgAak8NACABQX9GDQBBpNkAKAIAIgAgBSAGa2pBACAAa3EiAEH+////B0sEQCABIQAMBwsgABA7QX9HBEAgACAGaiEGIAEhAAwHC0EAIAZrEDsaDAQLIAEiAEF/Rw0FDAMLQQAhAwwMC0EAIQAMCgsgAEF/Rw0CC0GA2QBBgNkAKAIAQQRyNgIACyACQf7///8HSw0BIAIQOyEAQQAQOyEBIABBf0YNASABQX9GDQEgACABTw0BIAEgAGsiBiAEQThqTQ0BC0H02ABB9NgAKAIAIAZqIgE2AgBB+NgAKAIAIAFJBEBB+NgAIAE2AgALAkACQAJAQdzVACgCACICBEBBhNkAIQEDQCAAIAEoAgAiAyABKAIEIgVqRg0CIAEoAggiAQ0ACwwCC0HU1QAoAgAiAUEARyAAIAFPcUUEQEHU1QAgADYCAAtBACEBQYjZACAGNgIAQYTZACAANgIAQeTVAEF/NgIAQejVAEGc2QAoAgA2AgBBkNkAQQA2AgADQCABQYDWAGogAUH01QBqIgI2AgAgAiABQezVAGoiAzYCACABQfjVAGogAzYCACABQYjWAGogAUH81QBqIgM2AgAgAyACNgIAIAFBkNYAaiABQYTWAGoiAjYCACACIAM2AgAgAUGM1gBqIAI2AgAgAUEgaiIBQYACRw0AC0F4IABrQQ9xIgEgAGoiAiAGQThrIgMgAWsiAUEBcjYCBEHg1QBBrNkAKAIANgIAQdDVACABNgIAQdzVACACNgIAIAAgA2pBODYCBAwCCyAAIAJNDQAgAiADSQ0AIAEoAgxBCHENAEF4IAJrQQ9xIgAgAmoiA0HQ1QAoAgAgBmoiByAAayIAQQFyNgIEIAEgBSAGajYCBEHg1QBBrNkAKAIANgIAQdDVACAANgIAQdzVACADNgIAIAIgB2pBODYCBAwBCyAAQdTVACgCAEkEQEHU1QAgADYCAAsgACAGaiEDQYTZACEBAkACQAJAA0AgAyABKAIARwRAIAEoAggiAQ0BDAILCyABLQAMQQhxRQ0BC0GE2QAhAQNAIAEoAgAiAyACTQRAIAMgASgCBGoiBSACSw0DCyABKAIIIQEMAAsACyABIAA2AgAgASABKAIEIAZqNgIEIABBeCAAa0EPcWoiCSAEQQNyNgIEIANBeCADa0EPcWoiBiAEIAlqIgRrIQEgAiAGRgRAQdzVACAENgIAQdDVAEHQ1QAoAgAgAWoiADYCACAEIABBAXI2AgQMCAtB2NUAKAIAIAZGBEBB2NUAIAQ2AgBBzNUAQczVACgCACABaiIANgIAIAQgAEEBcjYCBCAAIARqIAA2AgAMCAsgBigCBCIFQQNxQQFHDQYgBUF4cSEIIAVB/wFNBEAgBUEDdiEDIAYoAggiACAGKAIMIgJGBEBBxNUAQcTVACgCAEF+IAN3cTYCAAwHCyACIAA2AgggACACNgIMDAYLIAYoAhghByAGIAYoAgwiAEcEQCAAIAYoAggiAjYCCCACIAA2AgwMBQsgBkEUaiICKAIAIgVFBEAgBigCECIFRQ0EIAZBEGohAgsDQCACIQMgBSIAQRRqIgIoAgAiBQ0AIABBEGohAiAAKAIQIgUNAAsgA0EANgIADAQLQXggAGtBD3EiASAAaiIHIAZBOGsiAyABayIBQQFyNgIEIAAgA2pBODYCBCACIAVBNyAFa0EPcWpBP2siAyADIAJBEGpJGyIDQSM2AgRB4NUAQazZACgCADYCAEHQ1QAgATYCAEHc1QAgBzYCACADQRBqQYzZACkCADcCACADQYTZACkCADcCCEGM2QAgA0EIajYCAEGI2QAgBjYCAEGE2QAgADYCAEGQ2QBBADYCACADQSRqIQEDQCABQQc2AgAgBSABQQRqIgFLDQALIAIgA0YNACADIAMoAgRBfnE2AgQgAyADIAJrIgU2AgAgAiAFQQFyNgIEIAVB/wFNBEAgBUF4cUHs1QBqIQACf0HE1QAoAgAiAUEBIAVBA3Z0IgNxRQRAQcTVACABIANyNgIAIAAMAQsgACgCCAsiASACNgIMIAAgAjYCCCACIAA2AgwgAiABNgIIDAELQR8hASAFQf///wdNBEAgBUEmIAVBCHZnIgBrdkEBcSAAQQF0a0E+aiEBCyACIAE2AhwgAkIANwIQIAFBAnRB9NcAaiEAQcjVACgCACIDQQEgAXQiBnFFBEAgACACNgIAQcjVACADIAZyNgIAIAIgADYCGCACIAI2AgggAiACNgIMDAELIAVBGSABQQF2a0EAIAFBH0cbdCEBIAAoAgAhAwJAA0AgAyIAKAIEQXhxIAVGDQEgAUEddiEDIAFBAXQhASAAIANBBHFqQRBqIgYoAgAiAw0ACyAGIAI2AgAgAiAANgIYIAIgAjYCDCACIAI2AggMAQsgACgCCCIBIAI2AgwgACACNgIIIAJBADYCGCACIAA2AgwgAiABNgIIC0HQ1QAoAgAiASAETQ0AQdzVACgCACIAIARqIgIgASAEayIBQQFyNgIEQdDVACABNgIAQdzVACACNgIAIAAgBEEDcjYCBCAAQQhqIQEMCAtBACEBQbTZAEEwNgIADAcLQQAhAAsgB0UNAAJAIAYoAhwiAkECdEH01wBqIgMoAgAgBkYEQCADIAA2AgAgAA0BQcjVAEHI1QAoAgBBfiACd3E2AgAMAgsgB0EQQRQgBygCECAGRhtqIAA2AgAgAEUNAQsgACAHNgIYIAYoAhAiAgRAIAAgAjYCECACIAA2AhgLIAZBFGooAgAiAkUNACAAQRRqIAI2AgAgAiAANgIYCyABIAhqIQEgBiAIaiIGKAIEIQULIAYgBUF+cTYCBCABIARqIAE2AgAgBCABQQFyNgIEIAFB/wFNBEAgAUF4cUHs1QBqIQACf0HE1QAoAgAiAkEBIAFBA3Z0IgFxRQRAQcTVACABIAJyNgIAIAAMAQsgACgCCAsiASAENgIMIAAgBDYCCCAEIAA2AgwgBCABNgIIDAELQR8hBSABQf///wdNBEAgAUEmIAFBCHZnIgBrdkEBcSAAQQF0a0E+aiEFCyAEIAU2AhwgBEIANwIQIAVBAnRB9NcAaiEAQcjVACgCACICQQEgBXQiA3FFBEAgACAENgIAQcjVACACIANyNgIAIAQgADYCGCAEIAQ2AgggBCAENgIMDAELIAFBGSAFQQF2a0EAIAVBH0cbdCEFIAAoAgAhAAJAA0AgACICKAIEQXhxIAFGDQEgBUEddiEAIAVBAXQhBSACIABBBHFqQRBqIgMoAgAiAA0ACyADIAQ2AgAgBCACNgIYIAQgBDYCDCAEIAQ2AggMAQsgAigCCCIAIAQ2AgwgAiAENgIIIARBADYCGCAEIAI2AgwgBCAANgIICyAJQQhqIQEMAgsCQCAHRQ0AAkAgAygCHCIBQQJ0QfTXAGoiAigCACADRgRAIAIgADYCACAADQFByNUAIAhBfiABd3EiCDYCAAwCCyAHQRBBFCAHKAIQIANGG2ogADYCACAARQ0BCyAAIAc2AhggAygCECIBBEAgACABNgIQIAEgADYCGAsgA0EUaigCACIBRQ0AIABBFGogATYCACABIAA2AhgLAkAgBUEPTQRAIAMgBCAFaiIAQQNyNgIEIAAgA2oiACAAKAIEQQFyNgIEDAELIAMgBGoiAiAFQQFyNgIEIAMgBEEDcjYCBCACIAVqIAU2AgAgBUH/AU0EQCAFQXhxQezVAGohAAJ/QcTVACgCACIBQQEgBUEDdnQiBXFFBEBBxNUAIAEgBXI2AgAgAAwBCyAAKAIICyIBIAI2AgwgACACNgIIIAIgADYCDCACIAE2AggMAQtBHyEBIAVB////B00EQCAFQSYgBUEIdmciAGt2QQFxIABBAXRrQT5qIQELIAIgATYCHCACQgA3AhAgAUECdEH01wBqIQBBASABdCIEIAhxRQRAIAAgAjYCAEHI1QAgBCAIcjYCACACIAA2AhggAiACNgIIIAIgAjYCDAwBCyAFQRkgAUEBdmtBACABQR9HG3QhASAAKAIAIQQCQANAIAQiACgCBEF4cSAFRg0BIAFBHXYhBCABQQF0IQEgACAEQQRxakEQaiIGKAIAIgQNAAsgBiACNgIAIAIgADYCGCACIAI2AgwgAiACNgIIDAELIAAoAggiASACNgIMIAAgAjYCCCACQQA2AhggAiAANgIMIAIgATYCCAsgA0EIaiEBDAELAkAgCUUNAAJAIAAoAhwiAUECdEH01wBqIgIoAgAgAEYEQCACIAM2AgAgAw0BQcjVACALQX4gAXdxNgIADAILIAlBEEEUIAkoAhAgAEYbaiADNgIAIANFDQELIAMgCTYCGCAAKAIQIgEEQCADIAE2AhAgASADNgIYCyAAQRRqKAIAIgFFDQAgA0EUaiABNgIAIAEgAzYCGAsCQCAFQQ9NBEAgACAEIAVqIgFBA3I2AgQgACABaiIBIAEoAgRBAXI2AgQMAQsgACAEaiIHIAVBAXI2AgQgACAEQQNyNgIEIAUgB2ogBTYCACAIBEAgCEF4cUHs1QBqIQFB2NUAKAIAIQMCf0EBIAhBA3Z0IgIgBnFFBEBBxNUAIAIgBnI2AgAgAQwBCyABKAIICyICIAM2AgwgASADNgIIIAMgATYCDCADIAI2AggLQdjVACAHNgIAQczVACAFNgIACyAAQQhqIQELIApBEGokACABC0MAIABFBEA/AEEQdA8LAkAgAEH//wNxDQAgAEEASA0AIABBEHZAACIAQX9GBEBBtNkAQTA2AgBBfw8LIABBEHQPCwALC5lCIgBBgAgLDQEAAAAAAAAAAgAAAAMAQZgICwUEAAAABQBBqAgLCQYAAAAHAAAACABB5AgLwjJJbnZhbGlkIGNoYXIgaW4gdXJsIHF1ZXJ5AFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fYm9keQBDb250ZW50LUxlbmd0aCBvdmVyZmxvdwBDaHVuayBzaXplIG92ZXJmbG93AEludmFsaWQgbWV0aG9kIGZvciBIVFRQL3gueCByZXF1ZXN0AEludmFsaWQgbWV0aG9kIGZvciBSVFNQL3gueCByZXF1ZXN0AEV4cGVjdGVkIFNPVVJDRSBtZXRob2QgZm9yIElDRS94LnggcmVxdWVzdABJbnZhbGlkIGNoYXIgaW4gdXJsIGZyYWdtZW50IHN0YXJ0AEV4cGVjdGVkIGRvdABTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3N0YXR1cwBJbnZhbGlkIHJlc3BvbnNlIHN0YXR1cwBFeHBlY3RlZCBMRiBhZnRlciBoZWFkZXJzAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMAVXNlciBjYWxsYmFjayBlcnJvcgBgb25fcmVzZXRgIGNhbGxiYWNrIGVycm9yAGBvbl9jaHVua19oZWFkZXJgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2JlZ2luYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX3ZhbHVlYCBjYWxsYmFjayBlcnJvcgBgb25fc3RhdHVzX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fdmVyc2lvbl9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3VybF9jb21wbGV0ZWAgY2FsbGJhY2sgZXJyb3IAYG9uX3Byb3RvY29sX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9oZWFkZXJfdmFsdWVfY29tcGxldGVgIGNhbGxiYWNrIGVycm9yAGBvbl9tZXNzYWdlX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fbWV0aG9kX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25faGVhZGVyX2ZpZWxkX2NvbXBsZXRlYCBjYWxsYmFjayBlcnJvcgBgb25fY2h1bmtfZXh0ZW5zaW9uX25hbWVgIGNhbGxiYWNrIGVycm9yAFVuZXhwZWN0ZWQgY2hhciBpbiB1cmwgc2VydmVyAEludmFsaWQgaGVhZGVyIHZhbHVlIGNoYXIASW52YWxpZCBoZWFkZXIgZmllbGQgY2hhcgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3ZlcnNpb24ASW52YWxpZCBtaW5vciB2ZXJzaW9uAEludmFsaWQgbWFqb3IgdmVyc2lvbgBFeHBlY3RlZCBzcGFjZSBhZnRlciB2ZXJzaW9uAEV4cGVjdGVkIENSTEYgYWZ0ZXIgdmVyc2lvbgBJbnZhbGlkIEhUVFAgdmVyc2lvbgBJbnZhbGlkIGhlYWRlciB0b2tlbgBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX3VybABJbnZhbGlkIGNoYXJhY3RlcnMgaW4gdXJsAFVuZXhwZWN0ZWQgc3RhcnQgY2hhciBpbiB1cmwARG91YmxlIEAgaW4gdXJsAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fcHJvdG9jb2wARW1wdHkgQ29udGVudC1MZW5ndGgASW52YWxpZCBjaGFyYWN0ZXIgaW4gQ29udGVudC1MZW5ndGgAVHJhbnNmZXItRW5jb2RpbmcgY2FuJ3QgYmUgcHJlc2VudCB3aXRoIENvbnRlbnQtTGVuZ3RoAER1cGxpY2F0ZSBDb250ZW50LUxlbmd0aABJbnZhbGlkIGNoYXIgaW4gdXJsIHBhdGgAQ29udGVudC1MZW5ndGggY2FuJ3QgYmUgcHJlc2VudCB3aXRoIFRyYW5zZmVyLUVuY29kaW5nAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgc2l6ZQBFeHBlY3RlZCBMRiBhZnRlciBjaHVuayBzaXplAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIHNpemUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfdmFsdWUAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9jaHVua19leHRlbnNpb25fdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyB2YWx1ZQBVbmV4cGVjdGVkIHdoaXRlc3BhY2UgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgaGVhZGVyIHZhbHVlAE1pc3NpbmcgZXhwZWN0ZWQgTEYgYWZ0ZXIgaGVhZGVyIHZhbHVlAEludmFsaWQgYFRyYW5zZmVyLUVuY29kaW5nYCBoZWFkZXIgdmFsdWUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciBjaHVuayBleHRlbnNpb24gdmFsdWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBxdW90ZSB2YWx1ZQBJbnZhbGlkIHF1b3RlZC1wYWlyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAEludmFsaWQgY2hhcmFjdGVyIGluIGNodW5rIGV4dGVuc2lvbnMgcXVvdGVkIHZhbHVlAFBhdXNlZCBieSBvbl9oZWFkZXJzX2NvbXBsZXRlAEludmFsaWQgRU9GIHN0YXRlAG9uX3Jlc2V0IHBhdXNlAG9uX2NodW5rX2hlYWRlciBwYXVzZQBvbl9tZXNzYWdlX2JlZ2luIHBhdXNlAG9uX2NodW5rX2V4dGVuc2lvbl92YWx1ZSBwYXVzZQBvbl9zdGF0dXNfY29tcGxldGUgcGF1c2UAb25fdmVyc2lvbl9jb21wbGV0ZSBwYXVzZQBvbl91cmxfY29tcGxldGUgcGF1c2UAb25fcHJvdG9jb2xfY29tcGxldGUgcGF1c2UAb25fY2h1bmtfY29tcGxldGUgcGF1c2UAb25faGVhZGVyX3ZhbHVlX2NvbXBsZXRlIHBhdXNlAG9uX21lc3NhZ2VfY29tcGxldGUgcGF1c2UAb25fbWV0aG9kX2NvbXBsZXRlIHBhdXNlAG9uX2hlYWRlcl9maWVsZF9jb21wbGV0ZSBwYXVzZQBvbl9jaHVua19leHRlbnNpb25fbmFtZSBwYXVzZQBVbmV4cGVjdGVkIHNwYWNlIGFmdGVyIHN0YXJ0IGxpbmUATWlzc2luZyBleHBlY3RlZCBDUiBhZnRlciByZXNwb25zZSBsaW5lAFNwYW4gY2FsbGJhY2sgZXJyb3IgaW4gb25fY2h1bmtfZXh0ZW5zaW9uX25hbWUASW52YWxpZCBjaGFyYWN0ZXIgaW4gY2h1bmsgZXh0ZW5zaW9ucyBuYW1lAE1pc3NpbmcgZXhwZWN0ZWQgQ1IgYWZ0ZXIgY2h1bmsgZXh0ZW5zaW9uIG5hbWUASW52YWxpZCBzdGF0dXMgY29kZQBQYXVzZSBvbiBDT05ORUNUL1VwZ3JhZGUAUGF1c2Ugb24gUFJJL1VwZ3JhZGUARXhwZWN0ZWQgSFRUUC8yIENvbm5lY3Rpb24gUHJlZmFjZQBTcGFuIGNhbGxiYWNrIGVycm9yIGluIG9uX21ldGhvZABFeHBlY3RlZCBzcGFjZSBhZnRlciBtZXRob2QAU3BhbiBjYWxsYmFjayBlcnJvciBpbiBvbl9oZWFkZXJfZmllbGQAUGF1c2VkAEludmFsaWQgd29yZCBlbmNvdW50ZXJlZABJbnZhbGlkIG1ldGhvZCBlbmNvdW50ZXJlZABNaXNzaW5nIGV4cGVjdGVkIENSIGFmdGVyIGNodW5rIGRhdGEARXhwZWN0ZWQgTEYgYWZ0ZXIgY2h1bmsgZGF0YQBVbmV4cGVjdGVkIGNoYXIgaW4gdXJsIHNjaGVtYQBSZXF1ZXN0IGhhcyBpbnZhbGlkIGBUcmFuc2Zlci1FbmNvZGluZ2AARGF0YSBhZnRlciBgQ29ubmVjdGlvbjogY2xvc2VgAFNXSVRDSF9QUk9YWQBVU0VfUFJPWFkATUtBQ1RJVklUWQBVTlBST0NFU1NBQkxFX0VOVElUWQBRVUVSWQBDT1BZAE1PVkVEX1BFUk1BTkVOVExZAFRPT19FQVJMWQBOT1RJRlkARkFJTEVEX0RFUEVOREVOQ1kAQkFEX0dBVEVXQVkAUExBWQBQVVQAQ0hFQ0tPVVQAR0FURVdBWV9USU1FT1VUAFJFUVVFU1RfVElNRU9VVABORVRXT1JLX0NPTk5FQ1RfVElNRU9VVABDT05ORUNUSU9OX1RJTUVPVVQATE9HSU5fVElNRU9VVABORVRXT1JLX1JFQURfVElNRU9VVABQT1NUAE1JU0RJUkVDVEVEX1JFUVVFU1QAQ0xJRU5UX0NMT1NFRF9SRVFVRVNUAENMSUVOVF9DTE9TRURfTE9BRF9CQUxBTkNFRF9SRVFVRVNUAEJBRF9SRVFVRVNUAEhUVFBfUkVRVUVTVF9TRU5UX1RPX0hUVFBTX1BPUlQAUkVQT1JUAElNX0FfVEVBUE9UAFJFU0VUX0NPTlRFTlQATk9fQ09OVEVOVABQQVJUSUFMX0NPTlRFTlQASFBFX0lOVkFMSURfQ09OU1RBTlQASFBFX0NCX1JFU0VUAEdFVABIUEVfU1RSSUNUAENPTkZMSUNUAFRFTVBPUkFSWV9SRURJUkVDVABQRVJNQU5FTlRfUkVESVJFQ1QAQ09OTkVDVABNVUxUSV9TVEFUVVMASFBFX0lOVkFMSURfU1RBVFVTAFRPT19NQU5ZX1JFUVVFU1RTAEVBUkxZX0hJTlRTAFVOQVZBSUxBQkxFX0ZPUl9MRUdBTF9SRUFTT05TAE9QVElPTlMAU1dJVENISU5HX1BST1RPQ09MUwBWQVJJQU5UX0FMU09fTkVHT1RJQVRFUwBNVUxUSVBMRV9DSE9JQ0VTAElOVEVSTkFMX1NFUlZFUl9FUlJPUgBXRUJfU0VSVkVSX1VOS05PV05fRVJST1IAUkFJTEdVTl9FUlJPUgBJREVOVElUWV9QUk9WSURFUl9BVVRIRU5USUNBVElPTl9FUlJPUgBTU0xfQ0VSVElGSUNBVEVfRVJST1IASU5WQUxJRF9YX0ZPUldBUkRFRF9GT1IAU0VUX1BBUkFNRVRFUgBHRVRfUEFSQU1FVEVSAEhQRV9VU0VSAFNFRV9PVEhFUgBIUEVfQ0JfQ0hVTktfSEVBREVSAEV4cGVjdGVkIExGIGFmdGVyIENSAE1LQ0FMRU5EQVIAU0VUVVAAV0VCX1NFUlZFUl9JU19ET1dOAFRFQVJET1dOAEhQRV9DTE9TRURfQ09OTkVDVElPTgBIRVVSSVNUSUNfRVhQSVJBVElPTgBESVNDT05ORUNURURfT1BFUkFUSU9OAE5PTl9BVVRIT1JJVEFUSVZFX0lORk9STUFUSU9OAEhQRV9JTlZBTElEX1ZFUlNJT04ASFBFX0NCX01FU1NBR0VfQkVHSU4AU0lURV9JU19GUk9aRU4ASFBFX0lOVkFMSURfSEVBREVSX1RPS0VOAElOVkFMSURfVE9LRU4ARk9SQklEREVOAEVOSEFOQ0VfWU9VUl9DQUxNAEhQRV9JTlZBTElEX1VSTABCTE9DS0VEX0JZX1BBUkVOVEFMX0NPTlRST0wATUtDT0wAQUNMAEhQRV9JTlRFUk5BTABSRVFVRVNUX0hFQURFUl9GSUVMRFNfVE9PX0xBUkdFX1VOT0ZGSUNJQUwASFBFX09LAFVOTElOSwBVTkxPQ0sAUFJJAFJFVFJZX1dJVEgASFBFX0lOVkFMSURfQ09OVEVOVF9MRU5HVEgASFBFX1VORVhQRUNURURfQ09OVEVOVF9MRU5HVEgARkxVU0gAUFJPUFBBVENIAE0tU0VBUkNIAFVSSV9UT09fTE9ORwBQUk9DRVNTSU5HAE1JU0NFTExBTkVPVVNfUEVSU0lTVEVOVF9XQVJOSU5HAE1JU0NFTExBTkVPVVNfV0FSTklORwBIUEVfSU5WQUxJRF9UUkFOU0ZFUl9FTkNPRElORwBFeHBlY3RlZCBDUkxGAEhQRV9JTlZBTElEX0NIVU5LX1NJWkUATU9WRQBDT05USU5VRQBIUEVfQ0JfU1RBVFVTX0NPTVBMRVRFAEhQRV9DQl9IRUFERVJTX0NPTVBMRVRFAEhQRV9DQl9WRVJTSU9OX0NPTVBMRVRFAEhQRV9DQl9VUkxfQ09NUExFVEUASFBFX0NCX1BST1RPQ09MX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19DT01QTEVURQBIUEVfQ0JfSEVBREVSX1ZBTFVFX0NPTVBMRVRFAEhQRV9DQl9DSFVOS19FWFRFTlNJT05fVkFMVUVfQ09NUExFVEUASFBFX0NCX0NIVU5LX0VYVEVOU0lPTl9OQU1FX0NPTVBMRVRFAEhQRV9DQl9NRVNTQUdFX0NPTVBMRVRFAEhQRV9DQl9NRVRIT0RfQ09NUExFVEUASFBFX0NCX0hFQURFUl9GSUVMRF9DT01QTEVURQBERUxFVEUASFBFX0lOVkFMSURfRU9GX1NUQVRFAElOVkFMSURfU1NMX0NFUlRJRklDQVRFAFBBVVNFAE5PX1JFU1BPTlNFAFVOU1VQUE9SVEVEX01FRElBX1RZUEUAR09ORQBOT1RfQUNDRVBUQUJMRQBTRVJWSUNFX1VOQVZBSUxBQkxFAFJBTkdFX05PVF9TQVRJU0ZJQUJMRQBPUklHSU5fSVNfVU5SRUFDSEFCTEUAUkVTUE9OU0VfSVNfU1RBTEUAUFVSR0UATUVSR0UAUkVRVUVTVF9IRUFERVJfRklFTERTX1RPT19MQVJHRQBSRVFVRVNUX0hFQURFUl9UT09fTEFSR0UAUEFZTE9BRF9UT09fTEFSR0UASU5TVUZGSUNJRU5UX1NUT1JBR0UASFBFX1BBVVNFRF9VUEdSQURFAEhQRV9QQVVTRURfSDJfVVBHUkFERQBTT1VSQ0UAQU5OT1VOQ0UAVFJBQ0UASFBFX1VORVhQRUNURURfU1BBQ0UAREVTQ1JJQkUAVU5TVUJTQ1JJQkUAUkVDT1JEAEhQRV9JTlZBTElEX01FVEhPRABOT1RfRk9VTkQAUFJPUEZJTkQAVU5CSU5EAFJFQklORABVTkFVVEhPUklaRUQATUVUSE9EX05PVF9BTExPV0VEAEhUVFBfVkVSU0lPTl9OT1RfU1VQUE9SVEVEAEFMUkVBRFlfUkVQT1JURUQAQUNDRVBURUQATk9UX0lNUExFTUVOVEVEAExPT1BfREVURUNURUQASFBFX0NSX0VYUEVDVEVEAEhQRV9MRl9FWFBFQ1RFRABDUkVBVEVEAElNX1VTRUQASFBFX1BBVVNFRABUSU1FT1VUX09DQ1VSRUQAUEFZTUVOVF9SRVFVSVJFRABQUkVDT05ESVRJT05fUkVRVUlSRUQAUFJPWFlfQVVUSEVOVElDQVRJT05fUkVRVUlSRUQATkVUV09SS19BVVRIRU5USUNBVElPTl9SRVFVSVJFRABMRU5HVEhfUkVRVUlSRUQAU1NMX0NFUlRJRklDQVRFX1JFUVVJUkVEAFVQR1JBREVfUkVRVUlSRUQAUEFHRV9FWFBJUkVEAFBSRUNPTkRJVElPTl9GQUlMRUQARVhQRUNUQVRJT05fRkFJTEVEAFJFVkFMSURBVElPTl9GQUlMRUQAU1NMX0hBTkRTSEFLRV9GQUlMRUQATE9DS0VEAFRSQU5TRk9STUFUSU9OX0FQUExJRUQATk9UX01PRElGSUVEAE5PVF9FWFRFTkRFRABCQU5EV0lEVEhfTElNSVRfRVhDRUVERUQAU0lURV9JU19PVkVSTE9BREVEAEhFQUQARXhwZWN0ZWQgSFRUUC8sIFJUU1AvIG9yIElDRS8A5xUAAK8VAACkEgAAkhoAACYWAACeFAAA2xkAAHkVAAB+EgAA/hQAADYVAAALFgAA2BYAAPMSAABCGAAArBYAABIVAAAUFwAA7xcAAEgUAABxFwAAshoAAGsZAAB+GQAANRQAAIIaAABEFwAA/RYAAB4YAACHFwAAqhkAAJMSAAAHGAAALBcAAMoXAACkFwAA5xUAAOcVAABYFwAAOxgAAKASAAAtHAAAwxEAAEgRAADeEgAAQhMAAKQZAAD9EAAA9xUAAKUVAADvFgAA+BkAAEoWAABWFgAA9RUAAAoaAAAIGgAAARoAAKsVAABCEgAA1xAAAEwRAAAFGQAAVBYAAB4RAADKGQAAyBkAAE4WAAD/GAAAcRQAAPAVAADuFQAAlBkAAPwVAAC/GQAAmxkAAHwUAABDEQAAcBgAAJUUAAAnFAAAGRQAANUSAADUGQAARBYAAPcQAEG5OwsBAQBB0DsL4AEBAQIBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEDAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBuj0LBAEAAAIAQdE9C14DBAMDAwMDAAADAwADAwADAwMDAwMDAwMDAAUAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAwADAEG6PwsEAQAAAgBB0T8LXgMAAwMDAwMAAAMDAAMDAAMDAwMDAwMDAwMABAAFAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwADAAMAQbDBAAsNbG9zZWVlcC1hbGl2ZQBBycEACwEBAEHgwQAL4AEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQBBycMACwEBAEHgwwAL5wEBAQEBAQEBAQEBAQECAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAWNodW5rZWQAQfHFAAteAQABAQEBAQAAAQEAAQEAAQEBAQEBAQEBAQAAAAAAAAABAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQAAAAEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAQEBAAEAAQBB0McACyFlY3Rpb25lbnQtbGVuZ3Rob25yb3h5LWNvbm5lY3Rpb24AQYDIAAsgcmFuc2Zlci1lbmNvZGluZ3BncmFkZQ0KDQpTTQ0KDQoAQanIAAsFAQIAAQMAQcDIAAtfBAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanKAAsFAQIAAQMAQcDKAAtfBAUFBgUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAQanMAAsEAQAAAQBBwcwAC14CAgACAgICAgICAgICAgICAgICAgICAgICAgICAgIAAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAEGpzgALBQECAAEDAEHAzgALXwQFAAAFBQUFBQUFBQUFBQYFBQUFBQUFBQUFBQUABQAHCAUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQAFAAUABQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUFBQUAAAAFAEGp0AALBQEBAAEBAEHA0AALAQEAQdrQAAtBAgAAAAAAAAMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAAAAAAAAAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAQanSAAsFAQEAAQEAQcDSAAsBAQBBytIACwYCAAAAAAIAQeHSAAs6AwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMAAAAAAAADAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwMDAwBBoNQAC50BTk9VTkNFRUNLT1VUTkVDVEVURUNSSUJFTFVTSEVURUFEU0VBUkNIUkdFQ1RJVklUWUxFTkRBUlZFT1RJRllQVElPTlNDSFNFQVlTVEFUQ0hHRVVFUllPUkRJUkVDVE9SVFJDSFBBUkFNRVRFUlVSQ0VCU0NSSUJFQVJET1dOQUNFSU5ETktDS1VCU0NSSUJFVFRQQ0VUU1BBRFRQLw==";Object.defineProperty(t,"exports",{get:()=>r||(r=n.from(s,"base64"))})},267267,(e,t,i)=>{"use strict";let r=["GET","HEAD","POST"],n=new Set(r),s=[101,204,205,304],a=[301,302,303,307,308],o=new Set(a),l=["1","7","9","11","13","15","17","19","20","21","22","23","25","37","42","43","53","69","77","79","87","95","101","102","103","104","109","110","111","113","115","117","119","123","135","137","139","143","161","179","389","427","465","512","513","514","515","526","530","531","532","540","548","554","556","563","587","601","636","989","990","993","995","1719","1720","1723","2049","3659","4045","4190","5060","5061","6000","6566","6665","6666","6667","6668","6669","6679","6697","10080"],c=new Set(l),d=["no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"],u=["",...d],h=new Set(d),A=["follow","manual","error"],p=["GET","HEAD","OPTIONS","TRACE"],f=new Set(p),g=["navigate","same-origin","no-cors","cors"],m=["omit","same-origin","include"],y=["default","no-store","reload","no-cache","force-cache","only-if-cached"],b=["content-encoding","content-language","content-location","content-type","content-length"],E=["half"],C=["CONNECT","TRACE","TRACK"],w=new Set(C),I=["audio","audioworklet","font","image","manifest","paintworklet","script","style","track","video","xslt",""],v=new Set(I);t.exports={subresource:I,forbiddenMethods:C,requestBodyHeader:b,referrerPolicy:u,requestRedirect:A,requestMode:g,requestCredentials:m,requestCache:y,redirectStatus:a,corsSafeListedMethods:r,nullBodyStatus:s,safeMethods:p,badPorts:l,requestDuplex:E,subresourceSet:v,badPortsSet:c,redirectStatusSet:o,corsSafeListedMethodsSet:n,safeMethodsSet:f,forbiddenMethodsSet:w,referrerPolicyTokens:h}},364065,(e,t,i)=>{"use strict";let r=Symbol.for("undici.globalOrigin.1");t.exports={getGlobalOrigin:function(){return globalThis[r]},setGlobalOrigin:function(e){if(void 0===e)return void Object.defineProperty(globalThis,r,{value:void 0,writable:!0,enumerable:!1,configurable:!1});let t=new URL(e);if("http:"!==t.protocol&&"https:"!==t.protocol)throw TypeError(`Only http & https urls are allowed, received ${t.protocol}`);Object.defineProperty(globalThis,r,{value:t,writable:!0,enumerable:!1,configurable:!1})}}},107944,(e,t,i)=>{"use strict";let r=new TextDecoder;t.exports={utf8DecodeBytes:function(e){return 0===e.length?"":(239===e[0]&&187===e[1]&&191===e[2]&&(e=e.subarray(3)),r.decode(e))}}},142677,(e,t,i)=>{"use strict";let r=e.r(57328),{utf8DecodeBytes:n}=e.r(107944),s=/[\u0009\u000A\u000C\u000D\u0020]/g;function a(e){return 9===e||10===e||12===e||13===e||32===e}let o=/[^\x00-\xFF]/;function l(e,t=!0,i=!0){return c(e,t,i,a)}function c(e,t,i,r){let n=0,s=e.length-1;if(t)for(;n<e.length&&r(e.charCodeAt(n));)n++;if(i)for(;s>0&&r(e.charCodeAt(s));)s--;return 0===n&&s===e.length-1?e:e.slice(n,s+1)}t.exports={collectASequenceOfCodePoints:function(e,t,i){let r="";for(;i.position<t.length&&e(t[i.position]);)r+=t[i.position],i.position++;return r},collectASequenceOfCodePointsFast:function(e,t,i){let r=t.indexOf(e,i.position),n=i.position;return -1===r?(i.position=t.length,t.slice(n)):(i.position=r,t.slice(n,i.position))},forgivingBase64:function(e){let t=(e=e.replace(s,"")).length;if(t%4==0&&61===e.charCodeAt(t-1)&&(--t,61===e.charCodeAt(t-1)&&--t),t%4==1||/[^+/0-9A-Za-z]/.test(e.length===t?e:e.substring(0,t)))return"failure";let i=Buffer.from(e,"base64");return new Uint8Array(i.buffer,i.byteOffset,i.byteLength)},isASCIIWhitespace:a,isomorphicDecode:function(e){let t=e.length;if(65535>t)return String.fromCharCode.apply(null,e);let i="",r=0,n=65535;for(;r<t;)r+n>t&&(n=t-r),i+=String.fromCharCode.apply(null,e.subarray(r,r+=n));return i},isomorphicEncode:function(e){return r(!o.test(e)),e},parseJSONFromBytes:function(e){return JSON.parse(n(e))},removeASCIIWhitespace:l,removeChars:c,serializeJavascriptValueToJSONString:function(e){let t=JSON.stringify(e);if(void 0===t)throw TypeError("Value is not JSON serializable");return r("string"==typeof t),t}}},441628,(e,t,i)=>{"use strict";let r=e.r(57328),{forgivingBase64:n,collectASequenceOfCodePoints:s,collectASequenceOfCodePointsFast:a,isomorphicDecode:o,removeASCIIWhitespace:l,removeChars:c}=e.r(142677),d=new TextEncoder,u=/^[-!#$%&'*+.^_|~A-Za-z0-9]+$/u,h=/[\u000A\u000D\u0009\u0020]/u,A=/^[\u0009\u0020-\u007E\u0080-\u00FF]+$/u;function p(e,t=!1){if(!t)return e.href;let i=e.href,r=e.hash.length,n=0===r?i:i.substring(0,i.length-r);return!r&&i.endsWith("#")?n.slice(0,-1):n}function f(e){return y(d.encode(e))}function g(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function m(e){return e>=48&&e<=57?e-48:(223&e)-55}function y(e){let t=e.length,i=new Uint8Array(t),r=0,n=0;for(;n<t;){let t=e[n];37!==t?i[r++]=t:37!==t||g(e[n+1])&&g(e[n+2])?(i[r++]=m(e[n+1])<<4|m(e[n+2]),n+=2):i[r++]=37,++n}return t===r?i:i.subarray(0,r)}function b(e){e=w(e,!0,!0);let t={position:0},i=a("/",e,t);if(0===i.length||!u.test(i)||t.position>=e.length)return"failure";t.position++;let r=a(";",e,t);if(0===(r=w(r,!1,!0)).length||!u.test(r))return"failure";let n=i.toLowerCase(),o=r.toLowerCase(),l={type:n,subtype:o,parameters:new Map,essence:`${n}/${o}`};for(;t.position<e.length;){t.position++,s(e=>h.test(e),e,t);let i=s(e=>";"!==e&&"="!==e,e,t);if(i=i.toLowerCase(),t.position<e.length){if(";"===e[t.position])continue;t.position++}if(t.position>=e.length)break;let r=null;if('"'===e[t.position])r=E(e,t,!0),a(";",e,t);else if(0===(r=w(r=a(";",e,t),!1,!0)).length)continue;0!==i.length&&u.test(i)&&(0===r.length||A.test(r))&&!l.parameters.has(i)&&l.parameters.set(i,r)}return l}function E(e,t,i=!1){let n=t.position,a="";for(r('"'===e[t.position]),t.position++;a+=s(e=>'"'!==e&&"\\"!==e,e,t),!(t.position>=e.length);){let i=e[t.position];if(t.position++,"\\"===i){if(t.position>=e.length){a+="\\";break}a+=e[t.position],t.position++}else{r('"'===i);break}}return i?a:e.slice(n,t.position)}function C(e){return 13===e||10===e||9===e||32===e}function w(e,t=!0,i=!0){return c(e,t,i,C)}t.exports={dataURLProcessor:function(e){r("data:"===e.protocol);let t=p(e,!0);t=t.slice(5);let i={position:0},s=a(",",t,i),c=s.length;if(s=l(s,!0,!0),i.position>=t.length)return"failure";i.position++;let d=f(t.slice(c+1));if(/;(?:\u0020*)base64$/ui.test(s)){if("failure"===(d=n(o(d))))return"failure";s=(s=(s=s.slice(0,-6)).replace(/(\u0020+)$/u,"")).slice(0,-1)}s.startsWith(";")&&(s="text/plain"+s);let u=b(s);return"failure"===u&&(u=b("text/plain;charset=US-ASCII")),{mimeType:u,body:d}},URLSerializer:p,stringPercentDecode:f,parseMIMEType:b,collectAnHTTPQuotedString:E,serializeAMimeType:function(e){r("failure"!==e);let{parameters:t,essence:i}=e,n=i;for(let[e,i]of t.entries())n+=";",n+=e,n+="=",u.test(i)||(i='"'+(i=i.replace(/[\\"]/ug,"\\$&"))+'"'),n+=i;return n},removeHTTPWhitespace:w,minimizeSupportedMimeType:function(e){switch(e.essence){case"application/ecmascript":case"application/javascript":case"application/x-ecmascript":case"application/x-javascript":case"text/ecmascript":case"text/javascript":case"text/javascript1.0":case"text/javascript1.1":case"text/javascript1.2":case"text/javascript1.3":case"text/javascript1.4":case"text/javascript1.5":case"text/jscript":case"text/livescript":case"text/x-ecmascript":case"text/x-javascript":return"text/javascript";case"application/json":case"text/json":return"application/json";case"image/svg+xml":return"image/svg+xml";case"text/xml":case"application/xml":return"application/xml"}return e.subtype.endsWith("+json")?"application/json":e.subtype.endsWith("+xml")?"application/xml":""},HTTP_TOKEN_CODEPOINTS:u}},350022,(e,t,i)=>{"use strict";let r={__proto__:null,"node:crypto":()=>e.r(666680),"node:sqlite":()=>(()=>{let e=Error("Cannot find module 'node:sqlite': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})(),"node:worker_threads":()=>e.r(925127),"node:zlib":()=>e.r(727028)};function n(e){try{return r[e](),!0}catch(e){if("ERR_UNKNOWN_BUILTIN_MODULE"!==e.code&&"ERR_NO_CRYPTO"!==e.code)throw e;return!1}}function s(e,t){return void 0!==r[e]()[t]}let a=["markAsUncloneable","zstd"],o={markAsUncloneable:["node:worker_threads","markAsUncloneable"],zstd:["node:zlib","createZstdDecompress"]},l=["crypto","sqlite"],c=[...l,...a];function d(e){if(l.includes(e))return n(`node:${e}`);if(a.includes(e)){let[t,i]=o[e];return s(t,i)}throw TypeError(`unknown feature: ${e}`)}class u{#o=new Map;clear(){this.#o.clear()}has(e){return this.#o.get(e)??this.#l(e)}set(e,t){if(!1===c.includes(e))throw TypeError(`unknown feature: ${e}`);this.#o.set(e,t)}#l(e){let t=d(e);return this.#o.set(e,t),t}}let h=new u;t.exports.runtimeFeatures=h,t.exports.default=h},192321,(e,t,i)=>{"use strict";let r=e.r(57328),{types:n,inspect:s}=e.r(812057),{runtimeFeatures:a}=e.r(350022),o=1,l=2,c=3,d=4,u=5,h=6,A=7,p=8,f=Function.call.bind(Function.prototype[Symbol.hasInstance]),g={converters:{},util:{},errors:{},is:{}};g.errors.exception=function(e){return TypeError(`${e.header}: ${e.message}`)},g.errors.conversionFailed=function(e){let t=1===e.types.length?"":" one of",i=`${e.argument} could not be converted to${t}: ${e.types.join(", ")}.`;return g.errors.exception({header:e.prefix,message:i})},g.errors.invalidArgument=function(e){return g.errors.exception({header:e.prefix,message:`"${e.value}" is an invalid ${e.type}.`})},g.brandCheck=function(e,t){if(!f(t,e)){let e=TypeError("Illegal invocation");throw e.code="ERR_INVALID_THIS",e}},g.brandCheckMultiple=function(e){let t=e.map(e=>g.util.MakeTypeAssertion(e));return e=>{if(t.every(t=>!t(e))){let e=TypeError("Illegal invocation");throw e.code="ERR_INVALID_THIS",e}}},g.argumentLengthCheck=function({length:e},t,i){if(e<t)throw g.errors.exception({message:`${t} argument${1!==t?"s":""} required, but${e?" only":""} ${e} found.`,header:i})},g.illegalConstructor=function(){throw g.errors.exception({header:"TypeError",message:"Illegal constructor"})},g.util.MakeTypeAssertion=function(e){return t=>f(e,t)},g.util.Type=function(e){switch(typeof e){case"undefined":return o;case"boolean":return l;case"string":return c;case"symbol":return d;case"number":return u;case"bigint":return h;case"function":case"object":if(null===e)return A;return p}},g.util.Types={UNDEFINED:o,BOOLEAN:l,STRING:c,SYMBOL:d,NUMBER:u,BIGINT:h,NULL:A,OBJECT:p},g.util.TypeValueToString=function(e){switch(g.util.Type(e)){case o:return"Undefined";case l:return"Boolean";case c:return"String";case d:return"Symbol";case u:return"Number";case h:return"BigInt";case A:return"Null";case p:return"Object"}},g.util.markAsUncloneable=a.has("markAsUncloneable")?e.r(925127).markAsUncloneable:()=>{},g.util.ConvertToInt=function(e,t,i,r){let n,s;64===t?(n=0x1fffffffffffff,s="unsigned"===i?0:-0x1fffffffffffff):"unsigned"===i?(s=0,n=Math.pow(2,t)-1):(s=Math.pow(-2,t)-1,n=Math.pow(2,t-1)-1);let a=Number(e);if(0===a&&(a=0),g.util.HasFlag(r,g.attributes.EnforceRange)){if(Number.isNaN(a)||a===1/0||a===-1/0)throw g.errors.exception({header:"Integer conversion",message:`Could not convert ${g.util.Stringify(e)} to an integer.`});if((a=g.util.IntegerPart(a))<s||a>n)throw g.errors.exception({header:"Integer conversion",message:`Value must be between ${s}-${n}, got ${a}.`});return a}return!Number.isNaN(a)&&g.util.HasFlag(r,g.attributes.Clamp)?a=Math.floor(a=Math.min(Math.max(a,s),n))%2==0?Math.floor(a):Math.ceil(a):Number.isNaN(a)||0===a&&Object.is(0,a)||a===1/0||a===-1/0?0:(a=g.util.IntegerPart(a)%Math.pow(2,t),"signed"===i&&a>=Math.pow(2,t)-1)?a-Math.pow(2,t):a},g.util.IntegerPart=function(e){let t=Math.floor(Math.abs(e));return e<0?-1*t:t},g.util.Stringify=function(e){switch(g.util.Type(e)){case d:return`Symbol(${e.description})`;case p:return s(e);case c:return`"${e}"`;case h:return`${e}n`;default:return`${e}`}},g.util.IsResizableArrayBuffer=function(e){if(n.isArrayBuffer(e))return e.resizable;if(n.isSharedArrayBuffer(e))return e.growable;throw g.errors.exception({header:"IsResizableArrayBuffer",message:`"${g.util.Stringify(e)}" is not an array buffer.`})},g.util.HasFlag=function(e,t){return"number"==typeof e&&(e&t)===t},g.sequenceConverter=function(e){return(t,i,r,n)=>{if(g.util.Type(t)!==p)throw g.errors.exception({header:i,message:`${r} (${g.util.Stringify(t)}) is not iterable.`});let s="function"==typeof n?n():t?.[Symbol.iterator]?.(),a=[],o=0;if(void 0===s||"function"!=typeof s.next)throw g.errors.exception({header:i,message:`${r} is not iterable.`});for(;;){let{done:t,value:n}=s.next();if(t)break;a.push(e(n,i,`${r}[${o++}]`))}return a}},g.recordConverter=function(e,t){return(i,r,s)=>{if(g.util.Type(i)!==p)throw g.errors.exception({header:r,message:`${s} ("${g.util.TypeValueToString(i)}") is not an Object.`});let a={};if(!n.isProxy(i)){for(let n of[...Object.getOwnPropertyNames(i),...Object.getOwnPropertySymbols(i)]){let o=g.util.Stringify(n),l=e(n,r,`Key ${o} in ${s}`),c=t(i[n],r,`${s}[${o}]`);a[l]=c}return a}for(let n of Reflect.ownKeys(i)){let o=Reflect.getOwnPropertyDescriptor(i,n);if(o?.enumerable){let o=e(n,r,s),l=t(i[n],r,s);a[o]=l}}return a}},g.interfaceConverter=function(e,t){return(i,r,n)=>{if(!e(i))throw g.errors.exception({header:r,message:`Expected ${n} ("${g.util.Stringify(i)}") to be an instance of ${t}.`});return i}},g.dictionaryConverter=function(e){return e.sort((e,t)=>(e.key>t.key)-(e.key<t.key)),(t,i,r)=>{let n={};if(null!=t&&g.util.Type(t)!==p)throw g.errors.exception({header:i,message:`Expected ${t} to be one of: Null, Undefined, Object.`});for(let s of e){let{key:e,defaultValue:a,required:o,converter:l}=s;if(!0===o&&(null==t||!Object.hasOwn(t,e)))throw g.errors.exception({header:i,message:`Missing required key "${e}".`});let c=t?.[e],d=void 0!==a;if(d&&void 0===c&&(c=a()),o||d||void 0!==c){if(c=l(c,i,`${r}.${e}`),s.allowedValues&&!s.allowedValues.includes(c))throw g.errors.exception({header:i,message:`${c} is not an accepted type. Expected one of ${s.allowedValues.join(", ")}.`});n[e]=c}}return n}},g.nullableConverter=function(e){return(t,i,r)=>null===t?t:e(t,i,r)},g.is.USVString=function(e){return"string"==typeof e&&e.isWellFormed()},g.is.ReadableStream=g.util.MakeTypeAssertion(ReadableStream),g.is.Blob=g.util.MakeTypeAssertion(Blob),g.is.URLSearchParams=g.util.MakeTypeAssertion(URLSearchParams),g.is.File=g.util.MakeTypeAssertion(File),g.is.URL=g.util.MakeTypeAssertion(URL),g.is.AbortSignal=g.util.MakeTypeAssertion(AbortSignal),g.is.MessagePort=g.util.MakeTypeAssertion(MessagePort),g.is.BufferSource=function(e){return n.isArrayBuffer(e)||ArrayBuffer.isView(e)&&n.isArrayBuffer(e.buffer)},g.util.getCopyOfBytesHeldByBufferSource=function(e){let t=e,i=t,s=0,a=0;if(n.isTypedArray(t)||n.isDataView(t)?(i=t.buffer,s=t.byteOffset):r(n.isAnyArrayBuffer(t)),a=t.byteLength,i.detached)return new Uint8Array(0);let o=new Uint8Array(a),l=new Uint8Array(i,s,a);return o.set(l),o},g.converters.DOMString=function(e,t,i,r){if(null===e&&g.util.HasFlag(r,g.attributes.LegacyNullToEmptyString))return"";if("symbol"==typeof e)throw g.errors.exception({header:t,message:`${i} is a symbol, which cannot be converted to a DOMString.`});return String(e)},g.converters.ByteString=function(e,t,i){if("symbol"==typeof e)throw g.errors.exception({header:t,message:`${i} is a symbol, which cannot be converted to a ByteString.`});let r=String(e);for(let e=0;e<r.length;e++)if(r.charCodeAt(e)>255)throw TypeError(`Cannot convert argument to a ByteString because the character at index ${e} has a value of ${r.charCodeAt(e)} which is greater than 255.`);return r},g.converters.USVString=function(e){return"string"==typeof e?e.toWellFormed():`${e}`.toWellFormed()},g.converters.boolean=function(e){return!!e},g.converters.any=function(e){return e},g.converters["long long"]=function(e,t,i){return g.util.ConvertToInt(e,64,"signed",0,t,i)},g.converters["unsigned long long"]=function(e,t,i){return g.util.ConvertToInt(e,64,"unsigned",0,t,i)},g.converters["unsigned long"]=function(e,t,i){return g.util.ConvertToInt(e,32,"unsigned",0,t,i)},g.converters["unsigned short"]=function(e,t,i,r){return g.util.ConvertToInt(e,16,"unsigned",r,t,i)},g.converters.ArrayBuffer=function(e,t,i,r){if(g.util.Type(e)!==p||!n.isArrayBuffer(e))throw g.errors.conversionFailed({prefix:t,argument:`${i} ("${g.util.Stringify(e)}")`,types:["ArrayBuffer"]});if(!g.util.HasFlag(r,g.attributes.AllowResizable)&&g.util.IsResizableArrayBuffer(e))throw g.errors.exception({header:t,message:`${i} cannot be a resizable ArrayBuffer.`});return e},g.converters.SharedArrayBuffer=function(e,t,i,r){if(g.util.Type(e)!==p||!n.isSharedArrayBuffer(e))throw g.errors.conversionFailed({prefix:t,argument:`${i} ("${g.util.Stringify(e)}")`,types:["SharedArrayBuffer"]});if(!g.util.HasFlag(r,g.attributes.AllowResizable)&&g.util.IsResizableArrayBuffer(e))throw g.errors.exception({header:t,message:`${i} cannot be a resizable SharedArrayBuffer.`});return e},g.converters.TypedArray=function(e,t,i,r,s){if(g.util.Type(e)!==p||!n.isTypedArray(e)||e.constructor.name!==t.name)throw g.errors.conversionFailed({prefix:i,argument:`${r} ("${g.util.Stringify(e)}")`,types:[t.name]});if(!g.util.HasFlag(s,g.attributes.AllowShared)&&n.isSharedArrayBuffer(e.buffer))throw g.errors.exception({header:i,message:`${r} cannot be a view on a shared array buffer.`});if(!g.util.HasFlag(s,g.attributes.AllowResizable)&&g.util.IsResizableArrayBuffer(e.buffer))throw g.errors.exception({header:i,message:`${r} cannot be a view on a resizable array buffer.`});return e},g.converters.DataView=function(e,t,i,r){if(g.util.Type(e)!==p||!n.isDataView(e))throw g.errors.conversionFailed({prefix:t,argument:`${i} ("${g.util.Stringify(e)}")`,types:["DataView"]});if(!g.util.HasFlag(r,g.attributes.AllowShared)&&n.isSharedArrayBuffer(e.buffer))throw g.errors.exception({header:t,message:`${i} cannot be a view on a shared array buffer.`});if(!g.util.HasFlag(r,g.attributes.AllowResizable)&&g.util.IsResizableArrayBuffer(e.buffer))throw g.errors.exception({header:t,message:`${i} cannot be a view on a resizable array buffer.`});return e},g.converters.ArrayBufferView=function(e,t,i,r){if(g.util.Type(e)!==p||!n.isArrayBufferView(e))throw g.errors.conversionFailed({prefix:t,argument:`${i} ("${g.util.Stringify(e)}")`,types:["ArrayBufferView"]});if(!g.util.HasFlag(r,g.attributes.AllowShared)&&n.isSharedArrayBuffer(e.buffer))throw g.errors.exception({header:t,message:`${i} cannot be a view on a shared array buffer.`});if(!g.util.HasFlag(r,g.attributes.AllowResizable)&&g.util.IsResizableArrayBuffer(e.buffer))throw g.errors.exception({header:t,message:`${i} cannot be a view on a resizable array buffer.`});return e},g.converters.BufferSource=function(e,t,i,r){if(n.isArrayBuffer(e))return g.converters.ArrayBuffer(e,t,i,r);if(n.isArrayBufferView(e))return r&=~g.attributes.AllowShared,g.converters.ArrayBufferView(e,t,i,r);if(n.isSharedArrayBuffer(e))throw g.errors.exception({header:t,message:`${i} cannot be a SharedArrayBuffer.`});throw g.errors.conversionFailed({prefix:t,argument:`${i} ("${g.util.Stringify(e)}")`,types:["ArrayBuffer","ArrayBufferView"]})},g.converters.AllowSharedBufferSource=function(e,t,i,r){if(n.isArrayBuffer(e))return g.converters.ArrayBuffer(e,t,i,r);if(n.isSharedArrayBuffer(e))return g.converters.SharedArrayBuffer(e,t,i,r);if(n.isArrayBufferView(e))return r|=g.attributes.AllowShared,g.converters.ArrayBufferView(e,t,i,r);throw g.errors.conversionFailed({prefix:t,argument:`${i} ("${g.util.Stringify(e)}")`,types:["ArrayBuffer","SharedArrayBuffer","ArrayBufferView"]})},g.converters["sequence<ByteString>"]=g.sequenceConverter(g.converters.ByteString),g.converters["sequence<sequence<ByteString>>"]=g.sequenceConverter(g.converters["sequence<ByteString>"]),g.converters["record<ByteString, ByteString>"]=g.recordConverter(g.converters.ByteString,g.converters.ByteString),g.converters.Blob=g.interfaceConverter(g.is.Blob,"Blob"),g.converters.AbortSignal=g.interfaceConverter(g.is.AbortSignal,"AbortSignal"),g.converters.EventHandlerNonNull=function(e){return g.util.Type(e)!==p?null:"function"==typeof e?e:()=>{}},g.attributes={Clamp:1,EnforceRange:2,AllowShared:4,AllowResizable:8,LegacyNullToEmptyString:16},t.exports={webidl:g}},402649,(e,t,i)=>{"use strict";let{Transform:r}=e.r(81111),n=e.r(727028),{redirectStatusSet:s,referrerPolicyTokens:a,badPortsSet:o}=e.r(267267),{getGlobalOrigin:l}=e.r(364065),{collectAnHTTPQuotedString:c,parseMIMEType:d}=e.r(441628),{performance:u}=e.r(874096),{ReadableStreamFrom:h,isValidHTTPToken:A,normalizedMethodRecordsBase:p}=e.r(122857),f=e.r(57328),{isUint8Array:g}=e.r(107417),{webidl:m}=e.r(192321),{isomorphicEncode:y,collectASequenceOfCodePoints:b,removeChars:E}=e.r(142677);function C(e){let t=e.urlList,i=t.length;return 0===i?null:t[i-1].toString()}function w(e,t){if(!s.has(e.status))return null;let i=e.headersList.get("location",!0);return null!==i&&T(i)&&(I(i)||(i=v(i)),i=new URL(i,C(e))),i&&!i.hash&&(i.hash=t),i}function I(e){for(let t=0;t<e.length;++t){let i=e.charCodeAt(t);if(i>126||i<32)return!1}return!0}function v(e){return Buffer.from(e,"binary").toString("utf8")}function B(e){return e.urlList[e.urlList.length-1]}function Q(e){let t=B(e);return ed(t)&&o.has(t.port)?"blocked":"allowed"}function x(e){return e instanceof Error||e?.constructor?.name==="Error"||e?.constructor?.name==="DOMException"}function S(e){for(let t=0;t<e.length;++t){let i=e.charCodeAt(t);if(!(9===i||i>=32&&i<=126||i>=128&&i<=255))return!1}return!0}let k=A;function T(e){return!1===(" "===e[0]||" "===e[0]||" "===e[e.length-1]||" "===e[e.length-1]||e.includes("\n")||e.includes("\r")||e.includes("\0"))}function N(e){let t=(e.headersList.get("referrer-policy",!0)??"").split(","),i="";if(t.length)for(let e=t.length;0!==e;e--){let r=t[e-1].trim();if(a.has(r)){i=r;break}}return i}function D(e,t){let i=N(t);""!==i&&(e.referrerPolicy=i)}function _(){return"allowed"}function R(){return"success"}function L(){return"success"}function F(e){let t=null;t=e.mode,e.headersList.set("sec-fetch-mode",t,!0)}function M(e){let t=e.origin;if("client"!==t&&void 0!==t){if("cors"===e.responseTainting||"websocket"===e.mode)e.headersList.append("origin",t,!0);else if("GET"!==e.method&&"HEAD"!==e.method){switch(e.referrerPolicy){case"no-referrer":t=null;break;case"no-referrer-when-downgrade":case"strict-origin":case"strict-origin-when-cross-origin":e.origin&&ec(e.origin)&&!ec(B(e))&&(t=null);break;case"same-origin":Z(e,B(e))||(t=null)}e.headersList.append("origin",t,!0)}}}function O(e,t){return e}function U(e,t,i){return!e?.startTime||e.startTime<t?{domainLookupStartTime:t,domainLookupEndTime:t,connectionStartTime:t,connectionEndTime:t,secureConnectionStartTime:t,ALPNNegotiatedProtocol:e?.ALPNNegotiatedProtocol}:{domainLookupStartTime:O(e.domainLookupStartTime,i),domainLookupEndTime:O(e.domainLookupEndTime,i),connectionStartTime:O(e.connectionStartTime,i),connectionEndTime:O(e.connectionEndTime,i),secureConnectionStartTime:O(e.secureConnectionStartTime,i),ALPNNegotiatedProtocol:e.ALPNNegotiatedProtocol}}function P(e){return O(u.now(),e)}function $(e){return{startTime:e.startTime??0,redirectStartTime:0,redirectEndTime:0,postRedirectStartTime:e.startTime??0,finalServiceWorkerStartTime:0,finalNetworkResponseStartTime:0,finalNetworkRequestStartTime:0,endTime:0,encodedBodySize:0,decodedBodySize:0,finalConnectionTimingInfo:null}}function j(){return{referrerPolicy:"strict-origin-when-cross-origin"}}function H(e){return{referrerPolicy:e.referrerPolicy}}function q(e){let t=e.referrerPolicy;f(t);let i=null;if("client"===e.referrer){let e=l();if(!e||"null"===e.origin)return"no-referrer";i=new URL(e)}else m.is.URL(e.referrer)&&(i=e.referrer);let r=z(i),n=z(i,!0);switch(r.toString().length>4096&&(r=n),t){case"no-referrer":return"no-referrer";case"origin":if(null!=n)return n;return z(i,!0);case"unsafe-url":return r;case"strict-origin":{let t=B(e);if(J(r)&&!J(t))return"no-referrer";return n}case"strict-origin-when-cross-origin":{let t=B(e);if(Z(r,t))return r;if(J(r)&&!J(t))return"no-referrer";return n}case"same-origin":if(Z(e,r))return r;return"no-referrer";case"origin-when-cross-origin":if(Z(e,r))return r;return n;case"no-referrer-when-downgrade":{let t=B(e);if(J(r)&&!J(t))return"no-referrer";return r}}}function z(e,t=!1){return(f(m.is.URL(e)),el(e=new URL(e)))?"no-referrer":(e.username="",e.password="",e.hash="",!0===t&&(e.pathname="",e.search=""),e)}let V=RegExp.prototype.test.bind(/^127\.(?:(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)\.){2}(?:25[0-5]|2[0-4]\d|1\d\d|[1-9]\d|\d)$/),G=RegExp.prototype.test.bind(/^(?:(?:0{1,4}:){7}|(?:0{1,4}:){1,6}:|::)0{0,3}1$/);function Y(e){return e.includes(":")?("["===e[0]&&"]"===e[e.length-1]&&(e=e.slice(1,-1)),G(e)):V(e)}function W(e){return null!=e&&"null"!==e&&(!!("https:"===(e=new URL(e)).protocol||"wss:"===e.protocol||Y(e.hostname)||"localhost"===e.hostname||"localhost."===e.hostname||e.hostname.endsWith(".localhost")||e.hostname.endsWith(".localhost."))||"file:"===e.protocol)}function J(e){return!!m.is.URL(e)&&("about:blank"===e.href||"about:srcdoc"===e.href||"data:"===e.protocol||"blob:"===e.protocol||W(e.origin))}function K(e){}function Z(e,t){return e.origin===t.origin&&"null"===e.origin||e.protocol===t.protocol&&e.hostname===t.hostname&&e.port===t.port}function X(e){return"aborted"===e.controller.state}function ee(e){return"aborted"===e.controller.state||"terminated"===e.controller.state}function et(e){return p[e.toLowerCase()]??e}let ei=Object.getPrototypeOf(Object.getPrototypeOf([][Symbol.iterator]()));function er(e,t,i=0,r=1){class n{#c;#d;#u;constructor(e,t){this.#c=e,this.#d=t,this.#u=0}next(){let n;if("object"!=typeof this||this===null||!(#c in this))throw TypeError(`'next' called on an object that does not implement interface ${e} Iterator.`);let s=this.#u,a=t(this.#c);if(s>=a.length)return{value:void 0,done:!0};let{[i]:o,[r]:l}=a[s];switch(this.#u=s+1,this.#d){case"key":n=o;break;case"value":n=l;break;case"key+value":n=[o,l]}return{value:n,done:!1}}}return delete n.prototype.constructor,Object.setPrototypeOf(n.prototype,ei),Object.defineProperties(n.prototype,{[Symbol.toStringTag]:{writable:!1,enumerable:!1,configurable:!0,value:`${e} Iterator`},next:{writable:!0,enumerable:!0,configurable:!0}}),function(e,t){return new n(e,t)}}function en(e,t,i,r=0,n=1){let s=er(e,i,r,n),a={keys:{writable:!0,enumerable:!0,configurable:!0,value:function(){return m.brandCheck(this,t),s(this,"key")}},values:{writable:!0,enumerable:!0,configurable:!0,value:function(){return m.brandCheck(this,t),s(this,"value")}},entries:{writable:!0,enumerable:!0,configurable:!0,value:function(){return m.brandCheck(this,t),s(this,"key+value")}},forEach:{writable:!0,enumerable:!0,configurable:!0,value:function(i,r=globalThis){if(m.brandCheck(this,t),m.argumentLengthCheck(arguments,1,`${e}.forEach`),"function"!=typeof i)throw TypeError(`Failed to execute 'forEach' on '${e}': parameter 1 is not of type 'Function'.`);for(let{0:e,1:t}of s(this,"key+value"))i.call(r,t,e,this)}}};return Object.defineProperties(t.prototype,{...a,[Symbol.iterator]:{writable:!0,enumerable:!1,configurable:!0,value:a.entries.value}})}function es(e,t,i){let r=t,n=i;try{let t=e.stream.getReader();eo(t,r,n)}catch(e){n(e)}}function ea(e){try{e.close(),e.byobRequest?.respond(0)}catch(e){if(!e.message.includes("Controller is already closed")&&!e.message.includes("ReadableStream is already closed"))throw e}}async function eo(e,t,i){try{let r=[],n=0;for(;;){let{done:s,value:a}=await e.read();if(s)return void t(Buffer.concat(r,n));if(!g(a))return void i(TypeError("Received non-Uint8Array chunk"));r.push(a),n+=a.length}}catch(e){i(e)}}function el(e){f("protocol"in e);let t=e.protocol;return"about:"===t||"blob:"===t||"data:"===t}function ec(e){return"string"==typeof e&&":"===e[5]&&"h"===e[0]&&"t"===e[1]&&"t"===e[2]&&"p"===e[3]&&"s"===e[4]||"https:"===e.protocol}function ed(e){f("protocol"in e);let t=e.protocol;return"http:"===t||"https:"===t}function eu(e,t){let i=e;if(!i.startsWith("bytes"))return"failure";let r={position:5};if(t&&b(e=>" "===e||" "===e,i,r),61!==i.charCodeAt(r.position))return"failure";r.position++,t&&b(e=>" "===e||" "===e,i,r);let n=b(e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},i,r),s=n.length?Number(n):null;if(t&&b(e=>" "===e||" "===e,i,r),45!==i.charCodeAt(r.position))return"failure";r.position++,t&&b(e=>" "===e||" "===e,i,r);let a=b(e=>{let t=e.charCodeAt(0);return t>=48&&t<=57},i,r),o=a.length?Number(a):null;return r.position<i.length||null===o&&null===s||s>o?"failure":{rangeStartValue:s,rangeEndValue:o}}function eh(e,t,i){let r="bytes ";return r+=y(`${e}`),r+="-",r+=y(`${t}`),r+="/",r+=y(`${i}`)}class eA extends r{#h;constructor(e){super(),this.#h=e}_transform(e,t,i){if(!this._inflateStream){if(0===e.length)return void i();this._inflateStream=(15&e[0])==8?n.createInflate(this.#h):n.createInflateRaw(this.#h),this._inflateStream.on("data",this.push.bind(this)),this._inflateStream.on("end",()=>this.push(null)),this._inflateStream.on("error",e=>this.destroy(e))}this._inflateStream.write(e,t,i)}_final(e){this._inflateStream&&(this._inflateStream.end(),this._inflateStream=null),e()}}function ep(e){return new eA(e)}function ef(e){let t=null,i=null,r=null,n=em("content-type",e);if(null===n)return"failure";for(let e of n){let n=d(e);"failure"!==n&&"*/*"!==n.essence&&((r=n).essence!==i?(t=null,r.parameters.has("charset")&&(t=r.parameters.get("charset")),i=r.essence):r.parameters.has("charset")||null===t||r.parameters.set("charset",t))}return null==r?"failure":r}function eg(e){let t=e,i={position:0},r=[],n="";for(;i.position<t.length;){if(n+=b(e=>'"'!==e&&","!==e,t,i),i.position<t.length)if(34===t.charCodeAt(i.position)){if(n+=c(t,i),i.position<t.length)continue}else f(44===t.charCodeAt(i.position)),i.position++;n=E(n,!0,!0,e=>9===e||32===e),r.push(n),n=""}return r}function em(e,t){let i=t.get(e,!0);return null===i?null:eg(i)}function ey(e){return!1}function eb(e){return!!(e.username||e.password)}function eE(e){return!0}class eC{get baseUrl(){return l()}get origin(){return this.baseUrl?.origin}policyContainer=j()}class ew{settingsObject=new eC}t.exports={isAborted:X,isCancelled:ee,isValidEncodedURL:I,ReadableStreamFrom:h,tryUpgradeRequestToAPotentiallyTrustworthyURL:K,clampAndCoarsenConnectionTimingInfo:U,coarsenedSharedCurrentTime:P,determineRequestsReferrer:q,makePolicyContainer:j,clonePolicyContainer:H,appendFetchMetadata:F,appendRequestOriginHeader:M,TAOCheck:L,corsCheck:R,crossOriginResourcePolicyCheck:_,createOpaqueTimingInfo:$,setRequestReferrerPolicyOnRedirect:D,isValidHTTPToken:A,requestBadPort:Q,requestCurrentURL:B,responseURL:C,responseLocationURL:w,isURLPotentiallyTrustworthy:J,isValidReasonPhrase:S,sameOrigin:Z,normalizeMethod:et,iteratorMixin:en,createIterator:er,isValidHeaderName:k,isValidHeaderValue:T,isErrorLike:x,fullyReadBody:es,readableStreamClose:ea,urlIsLocal:el,urlHasHttpsScheme:ec,urlIsHttpHttpsScheme:ed,readAllBytes:eo,simpleRangeHeaderValue:eu,buildContentRange:eh,createInflate:ep,extractMimeType:ef,getDecodeSplit:em,environmentSettingsObject:new ew,isOriginIPPotentiallyTrustworthy:Y,hasAuthenticationEntry:ey,includesCredentials:eb,isTraversableNavigable:eE}},943159,(e,t,i)=>{"use strict";let{iteratorMixin:r}=e.r(402649),{kEnumerableProperty:n}=e.r(122857),{webidl:s}=e.r(192321),a=e.r(812057);class o{#A=[];constructor(e){if(s.util.markAsUncloneable(this),void 0!==e)throw s.errors.conversionFailed({prefix:"FormData constructor",argument:"Argument 1",types:["undefined"]})}append(e,t,i){s.brandCheck(this,o);let r="FormData.append";s.argumentLengthCheck(arguments,2,r),e=s.converters.USVString(e),3==arguments.length||s.is.Blob(t)?(t=s.converters.Blob(t,r,"value"),void 0!==i&&(i=s.converters.USVString(i))):t=s.converters.USVString(t);let n=d(e,t,i);this.#A.push(n)}delete(e){s.brandCheck(this,o);let t="FormData.delete";s.argumentLengthCheck(arguments,1,t),e=s.converters.USVString(e),this.#A=this.#A.filter(t=>t.name!==e)}get(e){s.brandCheck(this,o);let t="FormData.get";s.argumentLengthCheck(arguments,1,t),e=s.converters.USVString(e);let i=this.#A.findIndex(t=>t.name===e);return -1===i?null:this.#A[i].value}getAll(e){s.brandCheck(this,o);let t="FormData.getAll";return s.argumentLengthCheck(arguments,1,t),e=s.converters.USVString(e),this.#A.filter(t=>t.name===e).map(e=>e.value)}has(e){s.brandCheck(this,o);let t="FormData.has";return s.argumentLengthCheck(arguments,1,t),e=s.converters.USVString(e),-1!==this.#A.findIndex(t=>t.name===e)}set(e,t,i){s.brandCheck(this,o);let r="FormData.set";s.argumentLengthCheck(arguments,2,r),e=s.converters.USVString(e),3==arguments.length||s.is.Blob(t)?(t=s.converters.Blob(t,r,"value"),void 0!==i&&(i=s.converters.USVString(i))):t=s.converters.USVString(t);let n=d(e,t,i),a=this.#A.findIndex(t=>t.name===e);-1!==a?this.#A=[...this.#A.slice(0,a),n,...this.#A.slice(a+1).filter(t=>t.name!==e)]:this.#A.push(n)}[a.inspect.custom](e,t){let i=this.#A.reduce((e,t)=>(e[t.name]?Array.isArray(e[t.name])?e[t.name].push(t.value):e[t.name]=[e[t.name],t.value]:e[t.name]=t.value,e),{__proto__:null});t.depth??=e,t.colors??=!0;let r=a.formatWithOptions(t,i);return`FormData ${r.slice(r.indexOf("]")+2)}`}static getFormDataState(e){return e.#A}static setFormDataState(e,t){e.#A=t}}let{getFormDataState:l,setFormDataState:c}=o;function d(e,t,i){if("string"==typeof t);else if(s.is.File(t)||(t=new File([t],"blob",{type:t.type})),void 0!==i){let e={type:t.type,lastModified:t.lastModified};t=new File([t],i,e)}return{name:e,value:t}}Reflect.deleteProperty(o,"getFormDataState"),Reflect.deleteProperty(o,"setFormDataState"),r("FormData",o,l,"name","value"),Object.defineProperties(o.prototype,{append:n,delete:n,get:n,getAll:n,has:n,set:n,[Symbol.toStringTag]:{value:"FormData",configurable:!0}}),s.is.FormData=s.util.MakeTypeAssertion(o),t.exports={FormData:o,makeEntry:d,setFormDataState:c}},19373,(e,t,i)=>{"use strict";let{bufferToLowerCasedHeaderName:r}=e.r(122857),{HTTP_TOKEN_CODEPOINTS:n}=e.r(441628),{makeEntry:s}=e.r(943159),{webidl:a}=e.r(192321),o=e.r(57328),{isomorphicDecode:l}=e.r(142677),{utf8DecodeBytes:c}=e.r(107944),d=Buffer.from("--"),u=new TextDecoder;function h(e){for(let t=0;t<e.length;++t)if((-128&e.charCodeAt(t))!=0)return!1;return!0}function A(e,t){let i;59===e[t.position]&&t.position++,f(e=>32===e||9===e,e,t);let r=f(e=>C(e)&&61!==e&&42!==e,e,t);if(0===r.length)return null;let n=r.toString("ascii").toLowerCase(),s=42===e[t.position];if(s&&t.position++,61!==e[t.position])return null;if(t.position++,f(e=>32===e||9===e,e,t),s){let r=f(e=>32!==e&&13!==e&&10!==e&&59!==e,e,t);if(117!==r[0]&&85!==r[0]||116!==r[1]&&84!==r[1]||102!==r[2]&&70!==r[2]||45!==r[3]||56!==r[4])throw y("unknown encoding, expected utf-8''");i=decodeURIComponent(u.decode(r.subarray(7)))}else if(34===e[t.position]){t.position++;let r=f(e=>10!==e&&13!==e&&34!==e,e,t);if(34!==e[t.position])throw y("Closing quote not found");t.position++,i=u.decode(r).replace(/%0A/ig,"\n").replace(/%0D/ig,"\r").replace(/%22/g,'"')}else{let r=f(e=>C(e)&&59!==e,e,t);i=u.decode(r)}return{name:n,value:i}}function p(e,t){let i=null,s=null,a=null,o=null;for(;;){if(13===e[t.position]&&10===e[t.position+1]){if(null===i)throw y("header name is null");return{name:i,filename:s,contentType:a,encoding:o}}let c=f(e=>10!==e&&13!==e&&58!==e,e,t);if(c=g(c,!0,!0,e=>9===e||32===e),!n.test(c.toString()))throw y("header name does not match the field-name token production");if(58!==e[t.position])throw y("expected :");switch(t.position++,f(e=>32===e||9===e,e,t),r(c)){case"content-disposition":if(i=s=null,"form-data"!==f(e=>C(e),e,t).toString("ascii").toLowerCase())throw y("expected form-data for content-disposition header");for(;t.position<e.length&&13!==e[t.position]&&10!==e[t.position+1];){let r=A(e,t);if(!r)break;"name"===r.name?i=r.value:"filename"===r.name&&(s=r.value)}if(null===i)throw y("name attribute is required in content-disposition header");break;case"content-type":{let i=f(e=>10!==e&&13!==e,e,t);a=l(i=g(i,!1,!0,e=>9===e||32===e));break}case"content-transfer-encoding":{let i=f(e=>10!==e&&13!==e,e,t);o=l(i=g(i,!1,!0,e=>9===e||32===e));break}default:f(e=>10!==e&&13!==e,e,t)}if(13!==e[t.position]&&10!==e[t.position+1])throw y("expected CRLF");t.position+=2}}function f(e,t,i){let r=i.position;for(;r<t.length&&e(t[r]);)++r;return t.subarray(i.position,i.position=r)}function g(e,t,i,r){let n=0,s=e.length-1;if(t)for(;n<e.length&&r(e[n]);)n++;if(i)for(;s>0&&r(e[s]);)s--;return 0===n&&s===e.length-1?e:e.subarray(n,s+1)}function m(e,t,i){if(e.length<t.length)return!1;for(let r=0;r<t.length;r++)if(t[r]!==e[i.position+r])return!1;return!0}function y(e){return TypeError("Failed to parse body as FormData.",{cause:TypeError(e)})}function b(e){return e<=31||127===e}function E(e){return 40===e||41===e||60===e||62===e||64===e||44===e||59===e||58===e||92===e||34===e||47===e||91===e||93===e||63===e||61===e}function C(e){return e<=127&&32!==e&&9!==e&&!b(e)&&!E(e)}t.exports={multipartFormDataParser:function(e,t){o("failure"!==t&&"multipart/form-data"===t.essence);let i=t.parameters.get("boundary");if(void 0===i)throw y("missing boundary in content-type header");let r=Buffer.from(`--${i}`,"utf8"),n=[],l={position:0},u=e.indexOf(r);if(-1===u)throw y("no boundary found in multipart body");for(l.position=u;;){let t,i;if(e.subarray(l.position,l.position+r.length).equals(r))l.position+=r.length;else throw y("expected a value starting with -- and the boundary");if(m(e,d,l))return n;if(13!==e[l.position]||10!==e[l.position+1])throw y("expected CRLF");l.position+=2;let{name:u,filename:A,contentType:f,encoding:g}=p(e,l);l.position+=2;{let i=e.indexOf(r.subarray(2),l.position);if(-1===i)throw y("expected boundary after body");t=e.subarray(l.position,i-4),l.position+=t.length,"base64"===g&&(t=Buffer.from(t.toString(),"base64"))}if(13!==e[l.position]||10!==e[l.position+1])throw y("expected CRLF");l.position+=2,null!==A?(h(f??="text/plain")||(f=""),i=new File([t],A,{type:f})):i=c(Buffer.from(t)),o(a.is.USVString(u)),o("string"==typeof i&&a.is.USVString(i)||a.is.File(i)),n.push(s(u,i,A))}},validateBoundary:function(e){let t=e.length;if(t<27||t>70)return!1;for(let i=0;i<t;++i){let t=e.charCodeAt(i);if(!(t>=48&&t<=57||t>=65&&t<=90||t>=97&&t<=122||39===t||45===t||95===t))return!1}return!0}}},493578,(e,t,i)=>{"use strict";t.exports={createDeferredPromise:function(){let e,t;return{promise:new Promise((i,r)=>{e=i,t=r}),resolve:e,reject:t}}}},154718,(e,t,i)=>{"use strict";let r=e.r(122857),{ReadableStreamFrom:n,readableStreamClose:s,fullyReadBody:a,extractMimeType:o}=e.r(402649),{FormData:l,setFormDataState:c}=e.r(943159),{webidl:d}=e.r(192321),u=e.r(57328),{isErrored:h,isDisturbed:A}=e.r(81111),{isUint8Array:p}=e.r(107417),{serializeAMimeType:f}=e.r(441628),{multipartFormDataParser:g}=e.r(19373),{createDeferredPromise:m}=e.r(493578),{parseJSONFromBytes:y}=e.r(142677),{utf8DecodeBytes:b}=e.r(107944),{runtimeFeatures:E}=e.r(350022),C=E.has("crypto")?e.r(666680).randomInt:e=>Math.floor(Math.random()*e),w=new TextEncoder;function I(){}function v(e,t=!1){let i=null,a=null;i=d.is.ReadableStream(e)?e:d.is.Blob(e)?e.stream():new ReadableStream({pull(){},start(e){a=e},cancel(){},type:"bytes"}),u(d.is.ReadableStream(i));let o=null,l=null,c=null,A=null;if("string"==typeof e)l=e,A="text/plain;charset=UTF-8";else if(d.is.URLSearchParams(e))l=e.toString(),A="application/x-www-form-urlencoded;charset=UTF-8";else if(d.is.BufferSource(e))l=d.util.getCopyOfBytesHeldByBufferSource(e);else if(d.is.FormData(e)){let t=`----formdata-undici-0${`${C(1e11)}`.padStart(11,"0")}`,i=`--${t}\r
|
||
Content-Disposition: form-data`,r=e=>e.replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),n=e=>e.replace(/\r?\n|\r/g,"\r\n"),s=[],a=new Uint8Array([13,10]);c=0;let d=!1;for(let[t,o]of e)if("string"==typeof o){let e=w.encode(i+`; name="${r(n(t))}"`+`\r
|
||
\r
|
||
${n(o)}\r
|
||
`);s.push(e),c+=e.byteLength}else{let e=w.encode(`${i}; name="${r(n(t))}"`+(o.name?`; filename="${r(o.name)}"`:"")+"\r\n"+`Content-Type: ${o.type||"application/octet-stream"}\r
|
||
\r
|
||
`);s.push(e,o,a),"number"==typeof o.size?c+=e.byteLength+o.size+a.byteLength:d=!0}let u=w.encode(`--${t}--\r
|
||
`);s.push(u),c+=u.byteLength,d&&(c=null),l=e,o=async function*(){for(let e of s)e.stream?yield*e.stream():yield e},A=`multipart/form-data; boundary=${t}`}else if(d.is.Blob(e))l=e,c=e.size,e.type&&(A=e.type);else if("function"==typeof e[Symbol.asyncIterator]){if(t)throw TypeError("keepalive");if(r.isDisturbed(e)||e.locked)throw TypeError("Response body object should not be disturbed or locked");i=d.is.ReadableStream(e)?e:n(e)}return("string"==typeof l||p(l))&&(o=()=>(c="string"==typeof l?Buffer.byteLength(l):l.length,l)),null!=o&&(async()=>{let e=o(),t=e?.[Symbol.asyncIterator]?.();if(t)for await(let e of t){if(h(i))break;e.length&&a.enqueue(new Uint8Array(e))}else e?.length&&!h(i)&&a.enqueue("string"==typeof e?w.encode(e):new Uint8Array(e));queueMicrotask(()=>s(a))})(),[{stream:i,source:l,length:c},A]}function B(e,t=!1){return d.is.ReadableStream(e)&&(u(!r.isDisturbed(e),"The body has already been consumed."),u(!e.locked,"The stream is locked.")),v(e,t)}function Q(e,t){return{blob(){return x(this,e=>{let i=k(t(this));return null===i?i="":i&&(i=f(i)),new Blob([e],{type:i})},e,t)},arrayBuffer(){return x(this,e=>new Uint8Array(e).buffer,e,t)},text(){return x(this,b,e,t)},json(){return x(this,y,e,t)},formData(){return x(this,e=>{let i=k(t(this));if(null!==i)switch(i.essence){case"multipart/form-data":{let t=g(e,i),r=new l;return c(r,t),r}case"application/x-www-form-urlencoded":{let t=new URLSearchParams(e.toString()),i=new l;for(let[e,r]of t)i.append(e,r);return i}}throw TypeError('Content-Type was not one of "multipart/form-data" or "application/x-www-form-urlencoded".')},e,t)},bytes(){return x(this,e=>new Uint8Array(e),e,t)}}}function x(e,t,i,r){try{d.brandCheck(e,i)}catch(e){return Promise.reject(e)}if(S(e=r(e)))return Promise.reject(TypeError("Body is unusable: Body has already been read"));let n=m(),s=n.reject,o=e=>{try{n.resolve(t(e))}catch(e){s(e)}};return null==e.body?o(Buffer.allocUnsafe(0)):a(e.body,o,s),n.promise}function S(e){let t=e.body;return null!=t&&(t.stream.locked||r.isDisturbed(t.stream))}function k(e){let t=o(e.headersList);return"failure"===t?null:t}t.exports={extractBody:v,safelyExtractBody:B,cloneBody:function(e){let{0:t,1:i}=e.stream.tee();return e.stream=t,{stream:i,length:e.length,source:e.source}},mixinBody:function(e,t){Object.assign(e.prototype,Q(e,t))},streamRegistry:new FinalizationRegistry(e=>{let t=e.deref();!t||t.locked||A(t)||h(t)||t.cancel("Response object has been garbage collected").catch(I)}),bodyUnusable:S}},357551,(e,t,i)=>{"use strict";let r,n=e.r(57328),s=e.r(122857),{channels:a}=e.r(500078),o=e.r(469775),{RequestContentLengthMismatchError:l,ResponseContentLengthMismatchError:c,RequestAbortedError:d,HeadersTimeoutError:u,HeadersOverflowError:h,SocketError:A,InformationalError:p,BodyTimeoutError:f,HTTPParserError:g,ResponseExceededMaxSizeError:m}=e.r(450178),{kUrl:y,kReset:b,kClient:E,kParser:C,kBlocking:w,kRunning:I,kPending:v,kSize:B,kWriting:Q,kQueue:x,kNoRef:S,kKeepAliveDefaultTimeout:k,kHostHeader:T,kPendingIdx:N,kRunningIdx:D,kError:_,kPipelining:R,kSocket:L,kKeepAliveTimeoutValue:F,kMaxHeadersSize:M,kKeepAliveMaxTimeout:O,kKeepAliveTimeoutThreshold:U,kHeadersTimeout:P,kBodyTimeout:$,kStrictContentLength:j,kMaxRequests:H,kCounter:q,kMaxResponseSize:z,kOnError:V,kResume:G,kHTTPContext:Y,kClosed:W}=e.r(954673),J=e.r(930443),K=Buffer.alloc(0),Z=Buffer[Symbol.species],X=s.removeAllListeners;function ee(){let t,i=process.env.JEST_WORKER_ID?e.r(662151):void 0,r="ppc64"!==process.arch;if("1"===process.env.UNDICI_NO_WASM_SIMD?r=!0:"0"===process.env.UNDICI_NO_WASM_SIMD&&(r=!1),r)try{t=new WebAssembly.Module(e.r(922429))}catch{}return t||(t=new WebAssembly.Module(i||e.r(662151))),new WebAssembly.Instance(t,{env:{wasm_on_url:(e,t,i)=>0,wasm_on_status:(e,t,i)=>{n(ei.ptr===e);let r=t-es+er.byteOffset;return ei.onStatus(new Z(er.buffer,r,i))},wasm_on_message_begin:e=>(n(ei.ptr===e),ei.onMessageBegin()),wasm_on_header_field:(e,t,i)=>{n(ei.ptr===e);let r=t-es+er.byteOffset;return ei.onHeaderField(new Z(er.buffer,r,i))},wasm_on_header_value:(e,t,i)=>{n(ei.ptr===e);let r=t-es+er.byteOffset;return ei.onHeaderValue(new Z(er.buffer,r,i))},wasm_on_headers_complete:(e,t,i,r)=>(n(ei.ptr===e),ei.onHeadersComplete(t,1===i,1===r)),wasm_on_body:(e,t,i)=>{n(ei.ptr===e);let r=t-es+er.byteOffset;return ei.onBody(new Z(er.buffer,r,i))},wasm_on_message_complete:e=>(n(ei.ptr===e),ei.onMessageComplete())}})}let et=null,ei=null,er=null,en=0,es=null,ea=1,eo=3,el=5,ec=8;class ed{constructor(e,t,{exports:i}){this.llhttp=i,this.ptr=this.llhttp.llhttp_alloc(J.TYPE.RESPONSE),this.client=e,this.socket=t,this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.statusCode=0,this.statusText="",this.upgrade=!1,this.headers=[],this.headersSize=0,this.headersMaxSize=e[M],this.shouldKeepAlive=!1,this.paused=!1,this.resume=this.resume.bind(this),this.bytesRead=0,this.keepAlive="",this.contentLength="",this.connection="",this.maxResponseSize=e[z]}setTimeout(e,t){e!==this.timeoutValue||t&ea^this.timeoutType&ea?(this.timeout&&(o.clearTimeout(this.timeout),this.timeout=null),e&&(t&ea?this.timeout=o.setFastTimeout(eu,e,new WeakRef(this)):(this.timeout=setTimeout(eu,e,new WeakRef(this)),this.timeout?.unref())),this.timeoutValue=e):this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.timeoutType=t}resume(){!this.socket.destroyed&&this.paused&&(n(null!=this.ptr),n(null===ei),this.llhttp.llhttp_resume(this.ptr),n(this.timeoutType===el),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),this.paused=!1,this.execute(this.socket.read()||K),this.readMore())}readMore(){for(;!this.paused&&this.ptr;){let e=this.socket.read();if(null===e)break;this.execute(e)}}execute(e){n(null===ei),n(null!=this.ptr),n(!this.paused);let{socket:t,llhttp:i}=this;e.length>en&&(es&&i.free(es),en=4096*Math.ceil(e.length/4096),es=i.malloc(en)),new Uint8Array(i.memory.buffer,es,en).set(e);try{let r;try{er=e,ei=this,r=i.llhttp_execute(this.ptr,es,e.length)}finally{ei=null,er=null}if(r!==J.ERROR.OK){let n=e.subarray(i.llhttp_get_error_pos(this.ptr)-es);if(r===J.ERROR.PAUSED_UPGRADE)this.onUpgrade(n);else if(r===J.ERROR.PAUSED)this.paused=!0,t.unshift(n);else{let e=i.llhttp_get_error_reason(this.ptr),t="";if(e){let r=new Uint8Array(i.memory.buffer,e).indexOf(0);t="Response does not match the HTTP/1.1 protocol ("+Buffer.from(i.memory.buffer,e,r).toString()+")"}throw new g(t,J.ERROR[r],n)}}}catch(e){s.destroy(t,e)}}destroy(){n(null===ei),n(null!=this.ptr),this.llhttp.llhttp_free(this.ptr),this.ptr=null,this.timeout&&o.clearTimeout(this.timeout),this.timeout=null,this.timeoutValue=null,this.timeoutType=null,this.paused=!1}onStatus(e){return this.statusText=e.toString(),0}onMessageBegin(){let{socket:e,client:t}=this;if(e.destroyed)return -1;let i=t[x][t[D]];return i?(i.onResponseStarted(),0):-1}onHeaderField(e){let t=this.headers.length;return(1&t)==0?this.headers.push(e):this.headers[t-1]=Buffer.concat([this.headers[t-1],e]),this.trackHeader(e.length),0}onHeaderValue(e){let t=this.headers.length;(1&t)==1?(this.headers.push(e),t+=1):this.headers[t-1]=Buffer.concat([this.headers[t-1],e]);let i=this.headers[t-2];if(10===i.length){let t=s.bufferToLowerCasedHeaderName(i);"keep-alive"===t?this.keepAlive+=e.toString():"connection"===t&&(this.connection+=e.toString())}else 14===i.length&&"content-length"===s.bufferToLowerCasedHeaderName(i)&&(this.contentLength+=e.toString());return this.trackHeader(e.length),0}trackHeader(e){this.headersSize+=e,this.headersSize>=this.headersMaxSize&&s.destroy(this.socket,new h)}onUpgrade(e){let{upgrade:t,client:i,socket:r,headers:a,statusCode:o}=this;n(t),n(i[L]===r),n(!r.destroyed),n(!this.paused),n((1&a.length)==0);let l=i[x][i[D]];n(l),n(l.upgrade||"CONNECT"===l.method),this.statusCode=0,this.statusText="",this.shouldKeepAlive=!1,this.headers=[],this.headersSize=0,r.unshift(e),r[C].destroy(),r[C]=null,r[E]=null,r[_]=null,X(r),i[L]=null,i[Y]=null,i[x][i[D]++]=null,i.emit("disconnect",i[y],[i],new p("upgrade"));try{l.onUpgrade(o,a,r)}catch(e){s.destroy(r,e)}i[G]()}onHeadersComplete(e,t,i){let{client:r,socket:a,headers:o,statusText:l}=this;if(a.destroyed)return -1;let c=r[x][r[D]];if(!c)return -1;if(n(!this.upgrade),n(this.statusCode<200),100===e)return s.destroy(a,new A("bad response",s.getSocketInfo(a))),-1;if(t&&!c.upgrade)return s.destroy(a,new A("bad upgrade",s.getSocketInfo(a))),-1;if(n(this.timeoutType===eo),this.statusCode=e,this.shouldKeepAlive=i||"HEAD"===c.method&&!a[b]&&"keep-alive"===this.connection.toLowerCase(),this.statusCode>=200){let e=null!=c.bodyTimeout?c.bodyTimeout:r[$];this.setTimeout(e,el)}else this.timeout&&this.timeout.refresh&&this.timeout.refresh();if("CONNECT"===c.method||t)return n(1===r[I]),this.upgrade=!0,2;if(n((1&this.headers.length)==0),this.headers=[],this.headersSize=0,this.shouldKeepAlive&&r[R]){let e=this.keepAlive?s.parseKeepAliveTimeout(this.keepAlive):null;if(null!=e){let t=Math.min(e-r[U],r[O]);t<=0?a[b]=!0:r[F]=t}else r[F]=r[k]}else a[b]=!0;let d=!1===c.onHeaders(e,o,this.resume,l);return c.aborted?-1:"HEAD"===c.method||e<200?1:(a[w]&&(a[w]=!1,r[G]()),d?J.ERROR.PAUSED:0)}onBody(e){let{client:t,socket:i,statusCode:r,maxResponseSize:a}=this;if(i.destroyed)return -1;let o=t[x][t[D]];return(n(o),n(this.timeoutType===el),this.timeout&&this.timeout.refresh&&this.timeout.refresh(),n(r>=200),a>-1&&this.bytesRead+e.length>a)?(s.destroy(i,new m),-1):(this.bytesRead+=e.length,!1===o.onData(e))?J.ERROR.PAUSED:0}onMessageComplete(){let{client:e,socket:t,statusCode:i,upgrade:r,headers:a,contentLength:o,bytesRead:l,shouldKeepAlive:d}=this;if(t.destroyed&&(!i||d))return -1;if(r)return 0;n(i>=100),n((1&this.headers.length)==0);let u=e[x][e[D]];return(n(u),this.statusCode=0,this.statusText="",this.bytesRead=0,this.contentLength="",this.keepAlive="",this.connection="",this.headers=[],this.headersSize=0,i<200)?0:"HEAD"!==u.method&&o&&l!==parseInt(o,10)?(s.destroy(t,new c),-1):(u.onComplete(a),e[x][e[D]++]=null,t[Q])?(n(0===e[I]),s.destroy(t,new p("reset")),J.ERROR.PAUSED):d?t[b]&&0===e[I]?(s.destroy(t,new p("reset")),J.ERROR.PAUSED):(null==e[R]||1===e[R]?setImmediate(e[G]):e[G](),0):(s.destroy(t,new p("reset")),J.ERROR.PAUSED)}}function eu(e){let t=e.deref();if(!t)return;let{socket:i,timeoutType:r,client:a,paused:o}=t;r===eo?(!i[Q]||i.writableNeedDrain||a[I]>1)&&(n(!o,"cannot be paused while waiting for headers"),s.destroy(i,new u)):r===el?o||s.destroy(i,new f):r===ec&&(n(0===a[I]&&a[F]),s.destroy(i,new p("socket idle timeout")))}function eh(e,t){if(e[L]=t,et||(et=ee()),t.errored)throw t.errored;if(t.destroyed)throw new A("destroyed");return t[S]=!1,t[Q]=!1,t[b]=!1,t[w]=!1,t[C]=new ed(e,t,et),s.addListener(t,"error",eA),s.addListener(t,"readable",ep),s.addListener(t,"end",ef),s.addListener(t,"close",eg),t[W]=!1,t.on("close",em),{version:"h1",defaultPipelining:1,write:t=>eE(e,t),resume(){ey(e)},destroy(e,i){t[W]?queueMicrotask(i):(t.on("close",i),t.destroy(e))},get destroyed(){return t.destroyed},busy:i=>!!(t[Q]||t[b]||t[w]||i&&(e[I]>0&&!i.idempotent||e[I]>0&&(i.upgrade||"CONNECT"===i.method)||e[I]>0&&0!==s.bodyLength(i.body)&&(s.isStream(i.body)||s.isAsyncIterable(i.body)||s.isFormDataLike(i.body))))||!1}}function eA(e){n("ERR_TLS_CERT_ALTNAME_INVALID"!==e.code);let t=this[C];"ECONNRESET"===e.code&&t.statusCode&&!t.shouldKeepAlive?t.onMessageComplete():(this[_]=e,this[E][V](e))}function ep(){this[C]?.readMore()}function ef(){let e=this[C];e.statusCode&&!e.shouldKeepAlive?e.onMessageComplete():s.destroy(this,new A("other side closed",s.getSocketInfo(this)))}function eg(){let e=this[C];e&&(this[_]||!e.statusCode||e.shouldKeepAlive||e.onMessageComplete(),this[C].destroy(),this[C]=null);let t=this[_]||new A("closed",s.getSocketInfo(this)),i=this[E];if(i[L]=null,i[Y]=null,i.destroyed){n(0===i[v]);let e=i[x].splice(i[D]);for(let r=0;r<e.length;r++){let n=e[r];s.errorRequest(i,n,t)}}else if(i[I]>0&&"UND_ERR_INFO"!==t.code){let e=i[x][i[D]];i[x][i[D]++]=null,s.errorRequest(i,e,t)}i[N]=i[D],n(0===i[I]),i.emit("disconnect",i[y],[i],t),i[G]()}function em(){this[W]=!0}function ey(e){let t=e[L];if(t&&!t.destroyed){if(0===e[B]?!t[S]&&t.unref&&(t.unref(),t[S]=!0):t[S]&&t.ref&&(t.ref(),t[S]=!1),0===e[B])t[C].timeoutType!==ec&&t[C].setTimeout(e[F],ec);else if(e[I]>0&&t[C].statusCode<200&&t[C].timeoutType!==eo){let i=e[x][e[D]],r=null!=i.headersTimeout?i.headersTimeout:e[P];t[C].setTimeout(r,eo)}}}function eb(e){return"GET"!==e&&"HEAD"!==e&&"OPTIONS"!==e&&"TRACE"!==e&&"CONNECT"!==e}function eE(t,i){let{method:o,path:c,host:u,upgrade:h,blocking:A,reset:f}=i,{body:g,headers:m,contentLength:y}=i,E="PUT"===o||"POST"===o||"PATCH"===o||"QUERY"===o||"PROPFIND"===o||"PROPPATCH"===o;if(s.isFormDataLike(g)){r||(r=e.r(154718).extractBody);let[t,n]=r(g);null==i.contentType&&m.push("content-type",n),g=t.stream,y=t.length}else s.isBlobLike(g)&&null==i.contentType&&g.type&&m.push("content-type",g.type);g&&"function"==typeof g.read&&g.read(0);let C=s.bodyLength(g);if(null===(y=C??y)&&(y=i.contentLength),0!==y||E||(y=null),eb(o)&&y>0&&null!==i.contentLength&&i.contentLength!==y){if(t[j])return s.errorRequest(t,i,new l),!1;process.emitWarning(new l)}let I=t[L],v=e=>{i.aborted||i.completed||(s.errorRequest(t,i,e||new d),s.destroy(g),s.destroy(I,new p("aborted")))};try{i.onConnect(v)}catch(e){s.errorRequest(t,i,e)}if(i.aborted)return!1;"HEAD"===o&&(I[b]=!0),(h||"CONNECT"===o)&&(I[b]=!0),null!=f&&(I[b]=f),t[H]&&I[q]++>=t[H]&&(I[b]=!0),A&&(I[w]=!0),I.setTypeOfService&&I.setTypeOfService(i.typeOfService);let B=`${o} ${c} HTTP/1.1\r
|
||
`;if("string"==typeof u?B+=`host: ${u}\r
|
||
`:B+=t[T],h?B+=`connection: upgrade\r
|
||
upgrade: ${h}\r
|
||
`:t[R]&&!I[b]?B+="connection: keep-alive\r\n":B+="connection: close\r\n",Array.isArray(m))for(let e=0;e<m.length;e+=2){let t=m[e+0],i=m[e+1];if(Array.isArray(i))for(let e=0;e<i.length;e++)B+=`${t}: ${i[e]}\r
|
||
`;else B+=`${t}: ${i}\r
|
||
`}return a.sendHeaders.hasSubscribers&&a.sendHeaders.publish({request:i,headers:B,socket:I}),g&&0!==C?s.isBuffer(g)?ew(v,g,t,i,I,y,B,E):s.isBlobLike(g)?"function"==typeof g.stream?ev(v,g.stream(),t,i,I,y,B,E):eI(v,g,t,i,I,y,B,E):s.isStream(g)?eC(v,g,t,i,I,y,B,E):s.isIterable(g)?ev(v,g,t,i,I,y,B,E):n(!1):ew(v,null,t,i,I,y,B,E),!0}function eC(e,t,i,r,a,o,l,c){n(0!==o||0===i[I],"stream body cannot be pipelined");let u=!1,h=new eB({abort:e,socket:a,request:r,contentLength:o,client:i,expectsPayload:c,header:l}),A=function(e){if(!u)try{!h.write(e)&&this.pause&&this.pause()}catch(e){s.destroy(this,e)}},p=function(){!u&&t.resume&&t.resume()},f=function(){if(queueMicrotask(()=>{t.removeListener("error",g)}),!u){let e=new d;queueMicrotask(()=>g(e))}},g=function(e){if(!u){if(u=!0,n(a.destroyed||a[Q]&&i[I]<=1),a.off("drain",p).off("error",g),t.removeListener("data",A).removeListener("end",g).removeListener("close",f),!e)try{h.end()}catch(t){e=t}h.destroy(e),e&&("UND_ERR_INFO"!==e.code||"reset"!==e.message)?s.destroy(t,e):s.destroy(t)}};t.on("data",A).on("end",g).on("error",g).on("close",f),t.resume&&t.resume(),a.on("drain",p).on("error",g),t.errorEmitted??t.errored?setImmediate(g,t.errored):(t.endEmitted??t.readableEnded)&&setImmediate(g,null),(t.closeEmitted??t.closed)&&setImmediate(f)}function ew(e,t,i,r,a,o,l,c){try{t?s.isBuffer(t)&&(n(o===t.byteLength,"buffer body must have content length"),a.cork(),a.write(`${l}content-length: ${o}\r
|
||
\r
|
||
`,"latin1"),a.write(t),a.uncork(),r.onBodySent(t),c||!1===r.reset||(a[b]=!0)):0===o?a.write(`${l}content-length: 0\r
|
||
\r
|
||
`,"latin1"):(n(null===o,"no body must not have content length"),a.write(`${l}\r
|
||
`,"latin1")),r.onRequestSent(),i[G]()}catch(t){e(t)}}async function eI(e,t,i,r,s,a,o,c){n(a===t.size,"blob body must have content length");try{if(null!=a&&a!==t.size)throw new l;let e=Buffer.from(await t.arrayBuffer());s.cork(),s.write(`${o}content-length: ${a}\r
|
||
\r
|
||
`,"latin1"),s.write(e),s.uncork(),r.onBodySent(e),r.onRequestSent(),c||!1===r.reset||(s[b]=!0),i[G]()}catch(t){e(t)}}async function ev(e,t,i,r,s,a,o,l){n(0!==a||0===i[I],"iterator body cannot be pipelined");let c=null;function d(){if(c){let e=c;c=null,e()}}let u=()=>new Promise((e,t)=>{n(null===c),s[_]?t(s[_]):c=e});s.on("close",d).on("drain",d);let h=new eB({abort:e,socket:s,request:r,contentLength:a,client:i,expectsPayload:l,header:o});try{for await(let e of t){if(s[_])throw s[_];h.write(e)||await u()}h.end()}catch(e){h.destroy(e)}finally{s.off("close",d).off("drain",d)}}class eB{constructor({abort:e,socket:t,request:i,contentLength:r,client:n,expectsPayload:s,header:a}){this.socket=t,this.request=i,this.contentLength=r,this.client=n,this.bytesWritten=0,this.expectsPayload=s,this.header=a,this.abort=e,t[Q]=!0}write(e){let{socket:t,request:i,contentLength:r,client:n,bytesWritten:s,expectsPayload:a,header:o}=this;if(t[_])throw t[_];if(t.destroyed)return!1;let c=Buffer.byteLength(e);if(!c)return!0;if(null!==r&&s+c>r){if(n[j])throw new l;process.emitWarning(new l)}t.cork(),0===s&&(a||!1===i.reset||(t[b]=!0),null===r?t.write(`${o}transfer-encoding: chunked\r
|
||
`,"latin1"):t.write(`${o}content-length: ${r}\r
|
||
\r
|
||
`,"latin1")),null===r&&t.write(`\r
|
||
${c.toString(16)}\r
|
||
`,"latin1"),this.bytesWritten+=c;let d=t.write(e);return t.uncork(),i.onBodySent(e),!d&&t[C].timeout&&t[C].timeoutType===eo&&t[C].timeout.refresh&&t[C].timeout.refresh(),d}end(){let{socket:e,contentLength:t,client:i,bytesWritten:r,expectsPayload:n,header:s,request:a}=this;if(a.onRequestSent(),e[Q]=!1,e[_])throw e[_];if(!e.destroyed){if(0===r?n?e.write(`${s}content-length: 0\r
|
||
\r
|
||
`,"latin1"):e.write(`${s}\r
|
||
`,"latin1"):null===t&&e.write("\r\n0\r\n\r\n","latin1"),null!==t&&r!==t)if(i[j])throw new l;else process.emitWarning(new l);e[C].timeout&&e[C].timeoutType===eo&&e[C].timeout.refresh&&e[C].timeout.refresh(),i[G]()}}destroy(e){let{socket:t,client:i,abort:r}=this;t[Q]=!1,e&&(n(i[I]<=1,"pipeline should only contain this request"),r(e))}}t.exports=eh},411686,(e,t,i)=>{"use strict";let r,n,s=e.r(57328),{pipeline:a}=e.r(81111),o=e.r(122857),{RequestContentLengthMismatchError:l,RequestAbortedError:c,SocketError:d,InformationalError:u,InvalidArgumentError:h}=e.r(450178),{kUrl:A,kReset:p,kClient:f,kRunning:g,kPending:m,kQueue:y,kPendingIdx:b,kRunningIdx:E,kError:C,kSocket:w,kStrictContentLength:I,kOnError:v,kMaxConcurrentStreams:B,kPingInterval:Q,kHTTP2Session:x,kHTTP2InitialWindowSize:S,kHTTP2ConnectionWindowSize:k,kResume:T,kSize:N,kHTTPContext:D,kClosed:_,kBodyTimeout:R,kEnableConnectProtocol:L,kRemoteSettings:F,kHTTP2Stream:M,kHTTP2SessionState:O}=e.r(954673),{channels:U}=e.r(500078),P=Symbol("open streams");try{n=e.r(246479)}catch{n={constants:{}}}let{constants:{HTTP2_HEADER_AUTHORITY:$,HTTP2_HEADER_METHOD:j,HTTP2_HEADER_PATH:H,HTTP2_HEADER_SCHEME:q,HTTP2_HEADER_CONTENT_LENGTH:z,HTTP2_HEADER_EXPECT:V,HTTP2_HEADER_STATUS:G,HTTP2_HEADER_PROTOCOL:Y,NGHTTP2_REFUSED_STREAM:W,NGHTTP2_CANCEL:J}}=n;function K(e){let t=[];for(let[i,r]of Object.entries(e))if(Array.isArray(r))for(let e of r)t.push(Buffer.from(i),Buffer.from(e));else t.push(Buffer.from(i),Buffer.from(r));return t}function Z(e){let t=e[w];t?.destroyed===!1&&(0===e[N]||0===e[B]?(t.unref(),e[x].unref()):(t.ref(),e[x].ref()))}function X(e){try{"function"==typeof this.setLocalWindowSize&&this.setLocalWindowSize(e)}catch{}}function ee(e){if(this[f][B]=e.maxConcurrentStreams??this[f][B],!0===this[F]&&!0===this[L]&&!1===e.enableConnectProtocol){let e=new u("HTTP/2: Server disabled extended CONNECT protocol against RFC-8441");this[w][C]=e,this[f][v](e);return}this[L]=e.enableConnectProtocol??this[L],this[F]=!0,this[f][T]()}function et(e){let t=e[O];if((e.closed||e.destroyed)&&null!=t.ping.interval){clearInterval(t.ping.interval),t.ping.interval=null;return}function i(e,t){let i=this[f],r=this[f];if(null!=e){let t=new u(`HTTP/2: "PING" errored - type ${e.message}`);r[C]=t,i[v](t)}else i.emit("ping",t)}e.ping(i.bind(e))}function ei(e){s("ERR_TLS_CERT_ALTNAME_INVALID"!==e.code),this[w][C]=e,this[f][v](e)}function er(e,t,i){if(0===i){let i=new u(`HTTP/2: "frameError" received - type ${e}, code ${t}`);this[w][C]=i,this[f][v](i)}}function en(){let e=new d("other side closed",o.getSocketInfo(this[w]));this.destroy(e),o.destroy(this[w],e)}function es(e){let t=this[C]||new d(`HTTP/2: "GOAWAY" frame received with code ${e}`,o.getSocketInfo(this[w])),i=this[f];if(i[w]=null,i[D]=null,this.close(),this[x]=null,o.destroy(this[w],t),i[E]<i[y].length){let e=i[y][i[E]];i[y][i[E]++]=null,o.errorRequest(i,e,t),i[b]=i[E]}s(0===i[g]),i.emit("disconnect",i[A],[i],t),i.emit("connectionError",i[A],[i],t),i[T]()}function ea(){let{[f]:e,[O]:t}=this,{[w]:i}=e,r=this[w][C]||this[C]||new d("closed",o.getSocketInfo(i));if(e[w]=null,e[D]=null,null!=t.ping.interval&&(clearInterval(t.ping.interval),t.ping.interval=null),e.destroyed){s(0===e[m]);let t=e[y].splice(e[E]);for(let i=0;i<t.length;i++){let n=t[i];o.errorRequest(e,n,r)}}}function eo(){let e=this[C]||new d("closed",o.getSocketInfo(this)),t=this[x][f];t[w]=null,t[D]=null,null!==this[x]&&this[x].destroy(e),t[b]=t[E],s(0===t[g]),t.emit("disconnect",t[A],[t],e),t[T]()}function el(e){s("ERR_TLS_CERT_ALTNAME_INVALID"!==e.code),this[C]=e,this[f][v](e)}function ec(){o.destroy(this,new d("other side closed",o.getSocketInfo(this)))}function ed(){this[_]=!0}function eu(e){return"GET"!==e&&"HEAD"!==e&&"OPTIONS"!==e&&"TRACE"!==e&&"CONNECT"!==e}function eh(t,i){let n=i.bodyTimeout??t[R],a=t[x],{method:d,path:p,host:f,upgrade:g,expectContinue:m,signal:C,protocol:B,headers:Q}=i,{body:S}=i;if(null!=g&&"websocket"!==g)return o.errorRequest(t,i,new h(`Custom upgrade "${g}" not supported over HTTP/2`)),!1;let k={};for(let e=0;e<Q.length;e+=2){let t=Q[e+0],i=Q[e+1];if("cookie"===t){null!=k[t]?k[t]=Array.isArray(k[t])?(k[t].push(i),k[t]):[k[t],i]:k[t]=i;continue}if(Array.isArray(i))for(let e=0;e<i.length;e++)k[t]?k[t]+=`, ${i[e]}`:k[t]=i[e];else k[t]?k[t]+=`, ${i}`:k[t]=i}let N=null,{hostname:D,port:_}=t[A];k[$]=f||`${D}${_?`:${_}`:""}`,k[j]=d;let F=e=>{i.aborted||i.completed||(e=e||new c,o.errorRequest(t,i,e),null!=N&&(N.removeAllListeners("data"),N.close(),t[v](e),t[T]()),o.destroy(S,e))};try{i.onConnect(F)}catch(e){o.errorRequest(t,i,e)}if(i.aborted)return!1;if(g||"CONNECT"===d)return(a.ref(),"websocket"===g)?!1===a[L]?(o.errorRequest(t,i,new u("HTTP/2: Extended CONNECT protocol not supported by server")),a.unref(),!1):(k[j]="CONNECT",k[Y]="websocket",k[H]=p,"ws:"===B||"wss:"===B?k[q]="ws:"===B?"http":"https":k[q]="http:"===B?"http":"https",(N=a.request(k,{endStream:!1,signal:C}))[M]=!0,N.once("response",(e,r)=>{let{[G]:n,...s}=e;i.onUpgrade(n,K(s),N),++a[P],t[y][t[E]++]=null}),N.on("error",()=>{(N.rstCode===W||N.rstCode===J)&&F(new u(`HTTP/2: "stream error" received - code ${N.rstCode}`))}),N.once("close",()=>{a[P]-=1,0===a[P]&&a.unref()}),N.setTimeout(n),!0):((N=a.request(k,{endStream:!1,signal:C}))[M]=!0,N.on("response",e=>{let{[G]:r,...n}=e;i.onUpgrade(r,K(n),N),++a[P],t[y][t[E]++]=null}),N.once("close",()=>{a[P]-=1,0===a[P]&&a.unref()}),N.setTimeout(n),!0);k[H]=p,k[q]="http:"===B?"http":"https";let O="PUT"===d||"POST"===d||"PATCH"===d;S&&"function"==typeof S.read&&S.read(0);let Z=o.bodyLength(S);if(o.isFormDataLike(S)){let[t,i]=(r??=e.r(154718).extractBody)(S);k["content-type"]=i,S=t.stream,Z=t.length}if(null==Z&&(Z=i.contentLength),O||(Z=null),eu(d)&&Z>0&&null!=i.contentLength&&i.contentLength!==Z){if(t[I])return o.errorRequest(t,i,new l),!1;process.emitWarning(new l)}if(null!=Z&&(s(S||0===Z,"no body must not have content length"),k[z]=`${Z}`),a.ref(),U.sendHeaders.hasSubscribers){let e="";for(let t in k)e+=`${t}: ${k[t]}\r
|
||
`;U.sendHeaders.publish({request:i,headers:e,socket:a[w]})}let X="GET"===d||"HEAD"===d||null===S;m?(k[V]="100-continue",(N=a.request(k,{endStream:X,signal:C}))[M]=!0,N.once("continue",et)):((N=a.request(k,{endStream:X,signal:C}))[M]=!0,et()),++a[P],N.setTimeout(n);let ee=!1;return N.once("response",e=>{let{[G]:t,...r}=e;(i.onResponseStarted(),ee=!0,i.aborted)?N.removeAllListeners("data"):(!1===i.onHeaders(Number(t),K(r),N.resume.bind(N),"")&&N.pause(),N.on("data",e=>{i.aborted||i.completed||!1===i.onData(e)&&N.pause()}))}),N.once("end",()=>{N.removeAllListeners("data"),ee?(i.aborted||i.completed||i.onComplete({}),t[y][t[E]++]=null):(F(new u("HTTP/2: stream half-closed (remote)")),t[y][t[E]++]=null,t[b]=t[E]),t[T]()}),N.once("close",()=>{N.removeAllListeners("data"),a[P]-=1,0===a[P]&&a.unref()}),N.once("error",function(e){N.removeAllListeners("data"),F(e)}),N.once("frameError",(e,t)=>{N.removeAllListeners("data"),F(new u(`HTTP/2: "frameError" received - type ${e}, code ${t}`))}),N.on("aborted",()=>{N.removeAllListeners("data")}),N.on("timeout",()=>{let e=new u(`HTTP/2: "stream timeout after ${n}"`);N.removeAllListeners("data"),a[P]-=1,0===a[P]&&a.unref(),F(e)}),N.once("trailers",e=>{i.aborted||i.completed||(N.removeAllListeners("data"),i.onComplete(e))}),!0;function et(){S&&0!==Z?o.isBuffer(S)?eA(F,N,S,t,i,t[w],Z,O):o.isBlobLike(S)?"function"==typeof S.stream?eg(F,N,S.stream(),t,i,t[w],Z,O):ef(F,N,S,t,i,t[w],Z,O):o.isStream(S)?ep(F,t[w],O,N,S,t,i,Z):o.isIterable(S)?eg(F,N,S,t,i,t[w],Z,O):s(!1):eA(F,N,null,t,i,t[w],Z,O)}}function eA(e,t,i,r,n,a,l,c){try{null!=i&&o.isBuffer(i)&&(s(l===i.byteLength,"buffer body must have content length"),t.cork(),t.write(i),t.uncork(),t.end(),n.onBodySent(i)),c||(a[p]=!0),n.onRequestSent(),r[T]()}catch(t){e(t)}}function ep(e,t,i,r,n,l,c,d){s(0!==d||0===l[g],"stream body cannot be pipelined");let u=a(n,r,r=>{r?(o.destroy(u,r),e(r)):(o.removeAllListeners(u),c.onRequestSent(),i||(t[p]=!0),l[T]())});function h(e){c.onBodySent(e)}o.addListener(u,"data",h)}async function ef(e,t,i,r,n,a,o,c){s(o===i.size,"blob body must have content length");try{if(null!=o&&o!==i.size)throw new l;let e=Buffer.from(await i.arrayBuffer());t.cork(),t.write(e),t.uncork(),t.end(),n.onBodySent(e),n.onRequestSent(),c||(a[p]=!0),r[T]()}catch(t){e(t)}}async function eg(e,t,i,r,n,a,o,l){s(0!==o||0===r[g],"iterator body cannot be pipelined");let c=null;function d(){if(c){let e=c;c=null,e()}}let u=()=>new Promise((e,t)=>{s(null===c),a[C]?t(a[C]):c=e});t.on("close",d).on("drain",d);try{for await(let e of i){if(a[C])throw a[C];let i=t.write(e);n.onBodySent(e),i||await u()}t.end(),n.onRequestSent(),l||(a[p]=!0),r[T]()}catch(t){e(t)}finally{t.off("close",d).off("drain",d)}}t.exports=function(e,t){e[w]=t;let i=e[S],r=e[k],s=n.connect(e[A],{createConnection:()=>t,peerMaxConcurrentStreams:e[B],settings:{enablePush:!1,...null!=i?{initialWindowSize:i}:null}});return e[w]=t,s[P]=0,s[f]=e,s[w]=t,s[O]={ping:{interval:0===e[Q]?null:setInterval(et,e[Q],s).unref()}},s[L]=!1,s[F]=!1,r&&o.addListener(s,"connect",X.bind(s,r)),o.addListener(s,"error",ei),o.addListener(s,"frameError",er),o.addListener(s,"end",en),o.addListener(s,"goaway",es),o.addListener(s,"close",ea),o.addListener(s,"remoteSettings",ee),s.unref(),e[x]=s,t[x]=s,o.addListener(t,"error",el),o.addListener(t,"end",ec),o.addListener(t,"close",eo),t[_]=!1,t.on("close",ed),{version:"h2",defaultPipelining:1/0,write:t=>eh(e,t),resume(){Z(e)},destroy(e,i){t[_]?queueMicrotask(i):t.destroy(e).on("close",i)},get destroyed(){return t.destroyed},busy(t){if(null!=t){if(!(e[g]>0))return("websocket"===t.upgrade||"CONNECT"===t.method)&&!1===s[F];else if(!1===t.idempotent||("websocket"===t.upgrade||"CONNECT"===t.method)&&!1===s[F]||0!==o.bodyLength(t.body)&&(o.isStream(t.body)||o.isAsyncIterable(t.body)||o.isFormDataLike(t.body)))return!0}return!1}}}},217365,(e,t,i)=>{"use strict";let r=e.r(57328),n=e.r(761095),s=e.r(347299),a=e.r(122857),{ClientStats:o}=e.r(889926),{channels:l}=e.r(500078),c=e.r(753375),d=e.r(127205),{InvalidArgumentError:u,InformationalError:h,ClientDestroyedError:A}=e.r(450178),p=e.r(977155),{kUrl:f,kServerName:g,kClient:m,kBusy:y,kConnect:b,kResuming:E,kRunning:C,kPending:w,kSize:I,kQueue:v,kConnected:B,kConnecting:Q,kNeedDrain:x,kKeepAliveDefaultTimeout:S,kHostHeader:k,kPendingIdx:T,kRunningIdx:N,kError:D,kPipelining:_,kKeepAliveTimeoutValue:R,kMaxHeadersSize:L,kKeepAliveMaxTimeout:F,kKeepAliveTimeoutThreshold:M,kHeadersTimeout:O,kBodyTimeout:U,kStrictContentLength:P,kConnector:$,kMaxRequests:j,kCounter:H,kClose:q,kDestroy:z,kDispatch:V,kLocalAddress:G,kMaxResponseSize:Y,kOnError:W,kHTTPContext:J,kMaxConcurrentStreams:K,kHTTP2InitialWindowSize:Z,kHTTP2ConnectionWindowSize:X,kResume:ee,kPingInterval:et}=e.r(954673),ei=e.r(357551),er=e.r(411686),en=Symbol("kClosedResolve"),es=s&&s.maxHeaderSize&&Number.isInteger(s.maxHeaderSize)&&s.maxHeaderSize>0?()=>s.maxHeaderSize:()=>{throw new u("http module not available or http.maxHeaderSize invalid")},ea=()=>{};function eo(e){return e[_]??e[J]?.defaultPipelining??1}class el extends d{constructor(e,{maxHeaderSize:t,headersTimeout:i,socketTimeout:r,requestTimeout:s,connectTimeout:o,bodyTimeout:l,idleTimeout:c,keepAlive:d,keepAliveTimeout:h,maxKeepAliveTimeout:A,keepAliveMaxTimeout:m,keepAliveTimeoutThreshold:y,socketPath:b,pipelining:C,tls:w,strictContentLength:I,maxCachedSessions:B,connect:Q,maxRequestsPerClient:D,localAddress:H,maxResponseSize:q,autoSelectFamily:z,autoSelectFamilyAttemptTimeout:V,maxConcurrentStreams:ei,allowH2:er,useH2c:ea,initialWindowSize:eo,connectionWindowSize:el,pingInterval:ed}={}){if(void 0!==d)throw new u("unsupported keepAlive, use pipelining=0 instead");if(void 0!==r)throw new u("unsupported socketTimeout, use headersTimeout & bodyTimeout instead");if(void 0!==s)throw new u("unsupported requestTimeout, use headersTimeout & bodyTimeout instead");if(void 0!==c)throw new u("unsupported idleTimeout, use keepAliveTimeout instead");if(void 0!==A)throw new u("unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead");if(null!=t){if(!Number.isInteger(t)||t<1)throw new u("invalid maxHeaderSize")}else t=es();if(null!=b&&"string"!=typeof b)throw new u("invalid socketPath");if(null!=o&&(!Number.isFinite(o)||o<0))throw new u("invalid connectTimeout");if(null!=h&&(!Number.isFinite(h)||h<=0))throw new u("invalid keepAliveTimeout");if(null!=m&&(!Number.isFinite(m)||m<=0))throw new u("invalid keepAliveMaxTimeout");if(null!=y&&!Number.isFinite(y))throw new u("invalid keepAliveTimeoutThreshold");if(null!=i&&(!Number.isInteger(i)||i<0))throw new u("headersTimeout must be a positive integer or zero");if(null!=l&&(!Number.isInteger(l)||l<0))throw new u("bodyTimeout must be a positive integer or zero");if(null!=Q&&"function"!=typeof Q&&"object"!=typeof Q)throw new u("connect must be a function or an object");if(null!=D&&(!Number.isInteger(D)||D<0))throw new u("maxRequestsPerClient must be a positive number");if(null!=H&&("string"!=typeof H||0===n.isIP(H)))throw new u("localAddress must be valid string IP address");if(null!=q&&(!Number.isInteger(q)||q<-1))throw new u("maxResponseSize must be a positive number");if(null!=V&&(!Number.isInteger(V)||V<-1))throw new u("autoSelectFamilyAttemptTimeout must be a positive number");if(null!=er&&"boolean"!=typeof er)throw new u("allowH2 must be a valid boolean value");if(null!=ei&&("number"!=typeof ei||ei<1))throw new u("maxConcurrentStreams must be a positive integer, greater than 0");if(null!=ea&&"boolean"!=typeof ea)throw new u("useH2c must be a valid boolean value");if(null!=eo&&(!Number.isInteger(eo)||eo<1))throw new u("initialWindowSize must be a positive integer, greater than 0");if(null!=el&&(!Number.isInteger(el)||el<1))throw new u("connectionWindowSize must be a positive integer, greater than 0");if(null!=ed&&("number"!=typeof ed||!Number.isInteger(ed)||ed<0))throw new u("pingInterval must be a positive integer, greater or equal to 0");if(super(),"function"!=typeof Q)Q=p({...w,maxCachedSessions:B,allowH2:er,useH2c:ea,socketPath:b,timeout:o,..."boolean"==typeof z?{autoSelectFamily:z,autoSelectFamilyAttemptTimeout:V}:void 0,...Q});else if(null!=b){const e=Q;Q=(t,i)=>e({...t,socketPath:b},i)}this[f]=a.parseOrigin(e),this[$]=Q,this[_]=null!=C?C:1,this[L]=t,this[S]=null==h?4e3:h,this[F]=null==m?6e5:m,this[M]=null==y?2e3:y,this[R]=this[S],this[g]=null,this[G]=null!=H?H:null,this[E]=0,this[x]=0,this[k]=`host: ${this[f].hostname}${this[f].port?`:${this[f].port}`:""}\r
|
||
`,this[U]=null!=l?l:3e5,this[O]=null!=i?i:3e5,this[P]=null==I||I,this[j]=D,this[en]=null,this[Y]=q>-1?q:-1,this[J]=null,this[K]=null!=ei?ei:100,this[Z]=null!=eo?eo:262144,this[X]=null!=el?el:524288,this[et]=null!=ed?ed:6e4,this[v]=[],this[N]=0,this[T]=0,this[ee]=e=>eA(this,e),this[W]=e=>ec(this,e)}get pipelining(){return this[_]}set pipelining(e){this[_]=e,this[ee](!0)}get stats(){return new o(this)}get[w](){return this[v].length-this[T]}get[C](){return this[T]-this[N]}get[I](){return this[v].length-this[N]}get[B](){return!!this[J]&&!this[Q]&&!this[J].destroyed}get[y](){return!!(this[J]?.busy(null)||this[I]>=(eo(this)||1)||this[w]>0)}[b](e){ed(this),this.once("connect",e)}[V](e,t){let i=new c(this[f].origin,e,t);return this[v].push(i),this[E]||(null==a.bodyLength(i.body)&&a.isIterable(i.body)?(this[E]=1,queueMicrotask(()=>eA(this))):this[ee](!0)),this[E]&&2!==this[x]&&this[y]&&(this[x]=2),this[x]<2}[q](){return new Promise(e=>{this[I]?this[en]=e:e(null)})}[z](e){return new Promise(t=>{let i=this[v].splice(this[T]);for(let t=0;t<i.length;t++){let r=i[t];a.errorRequest(this,r,e)}let r=()=>{this[en]&&(this[en](),this[en]=null),t(null)};this[J]?(this[J].destroy(e,r),this[J]=null):queueMicrotask(r),this[ee]()})}}function ec(e,t){if(0===e[C]&&"UND_ERR_INFO"!==t.code&&"UND_ERR_SOCKET"!==t.code){r(e[T]===e[N]);let i=e[v].splice(e[N]);for(let r=0;r<i.length;r++){let n=i[r];a.errorRequest(e,n,t)}r(0===e[I])}}function ed(e){r(!e[Q]),r(!e[J]);let{host:t,hostname:i,protocol:s,port:o}=e[f];if("["===i[0]){let e=i.indexOf("]");r(-1!==e);let t=i.substring(1,e);r(n.isIPv6(t)),i=t}e[Q]=!0,l.beforeConnect.hasSubscribers&&l.beforeConnect.publish({connectParams:{host:t,hostname:i,protocol:s,port:o,version:e[J]?.version,servername:e[g],localAddress:e[G]},connector:e[$]}),e[$]({host:t,hostname:i,protocol:s,port:o,servername:e[g],localAddress:e[G]},(n,c)=>{if(n){eu(e,n,{host:t,hostname:i,protocol:s,port:o}),e[ee]();return}if(e.destroyed){a.destroy(c.on("error",ea),new A),e[ee]();return}r(c);try{e[J]="h2"===c.alpnProtocol?er(e,c):ei(e,c)}catch(r){c.destroy().on("error",ea),eu(e,r,{host:t,hostname:i,protocol:s,port:o}),e[ee]();return}e[Q]=!1,c[H]=0,c[j]=e[j],c[m]=e,c[D]=null,l.connected.hasSubscribers&&l.connected.publish({connectParams:{host:t,hostname:i,protocol:s,port:o,version:e[J]?.version,servername:e[g],localAddress:e[G]},connector:e[$],socket:c}),e.emit("connect",e[f],[e]),e[ee]()})}function eu(e,t,{host:i,hostname:n,protocol:s,port:o}){if(!e.destroyed){if(e[Q]=!1,l.connectError.hasSubscribers&&l.connectError.publish({connectParams:{host:i,hostname:n,protocol:s,port:o,version:e[J]?.version,servername:e[g],localAddress:e[G]},connector:e[$],error:t}),"ERR_TLS_CERT_ALTNAME_INVALID"===t.code)for(r(0===e[C]);e[w]>0&&e[v][e[T]].servername===e[g];){let i=e[v][e[T]++];a.errorRequest(e,i,t)}else ec(e,t);e.emit("connectionError",e[f],[e],t)}}function eh(e){e[x]=0,e.emit("drain",e[f],[e])}function eA(e,t){2!==e[E]&&(e[E]=2,ep(e,t),e[E]=0,e[N]>256&&(e[v].splice(0,e[N]),e[T]-=e[N],e[N]=0))}function ep(e,t){for(;;){if(e.destroyed)return void r(0===e[w]);if(e[en]&&!e[I]){e[en](),e[en]=null;return}if(e[J]&&e[J].resume(),e[y])e[x]=2;else if(2===e[x]){t?(e[x]=1,queueMicrotask(()=>eh(e))):eh(e);continue}if(0===e[w]||e[C]>=(eo(e)||1))return;let i=e[v][e[T]];if(null===i)return;if("https:"===e[f].protocol&&e[g]!==i.servername){if(e[C]>0)return;e[g]=i.servername,e[J]?.destroy(new h("servername changed"),()=>{e[J]=null,eA(e)})}if(e[Q])return;if(!e[J])return void ed(e);if(e[J].destroyed||e[J].busy(i))return;!i.aborted&&e[J].write(i)?e[T]++:e[v].splice(e[T],1)}}t.exports=el},636528,(e,t,i)=>{"use strict";let r=2048,n=2047;class s{bottom=0;top=0;list=Array(r).fill(void 0);next=null;isEmpty(){return this.top===this.bottom}isFull(){return(this.top+1&n)===this.bottom}push(e){this.list[this.top]=e,this.top=this.top+1&n}shift(){let e=this.list[this.bottom];return void 0===e?null:(this.list[this.bottom]=void 0,this.bottom=this.bottom+1&n,e)}}t.exports=class{constructor(){this.head=this.tail=new s}isEmpty(){return this.head.isEmpty()}push(e){this.head.isFull()&&(this.head=this.head.next=new s),this.head.push(e)}shift(){let e=this.tail,t=e.shift();return e.isEmpty()&&null!==e.next&&(this.tail=e.next,e.next=null),t}}},749530,(e,t,i)=>{"use strict";let{PoolStats:r}=e.r(889926),n=e.r(127205),s=e.r(636528),{kConnected:a,kSize:o,kRunning:l,kPending:c,kQueued:d,kBusy:u,kFree:h,kUrl:A,kClose:p,kDestroy:f,kDispatch:g}=e.r(954673),m=Symbol("clients"),y=Symbol("needDrain"),b=Symbol("queue"),E=Symbol("closed resolve"),C=Symbol("onDrain"),w=Symbol("onConnect"),I=Symbol("onDisconnect"),v=Symbol("onConnectionError"),B=Symbol("get dispatcher"),Q=Symbol("add client"),x=Symbol("remove client");class S extends n{[b]=new s;[d]=0;[m]=[];[y]=!1;[C](e,t,i){let r=this[b],n=!1;for(;!n;){let t=r.shift();if(!t)break;this[d]--,n=!e.dispatch(t.opts,t.handler)}if(e[y]=n,!n&&this[y]&&(this[y]=!1,this.emit("drain",t,[this,...i])),this[E]&&r.isEmpty()){let e=[];for(let t=0;t<this[m].length;t++){let i=this[m][t];i.destroyed||e.push(i.close())}return Promise.all(e).then(this[E])}}[w]=(e,t)=>{this.emit("connect",e,[this,...t])};[I]=(e,t,i)=>{this.emit("disconnect",e,[this,...t],i)};[v]=(e,t,i)=>{this.emit("connectionError",e,[this,...t],i)};get[u](){return this[y]}get[a](){let e=0;for(let{[a]:t}of this[m])e+=t;return e}get[h](){let e=0;for(let{[a]:t,[y]:i}of this[m])e+=t&&!i;return e}get[c](){let e=this[d];for(let{[c]:t}of this[m])e+=t;return e}get[l](){let e=0;for(let{[l]:t}of this[m])e+=t;return e}get[o](){let e=this[d];for(let{[o]:t}of this[m])e+=t;return e}get stats(){return new r(this)}[p](){if(!this[b].isEmpty())return new Promise(e=>{this[E]=e});{let e=[];for(let t=0;t<this[m].length;t++){let i=this[m][t];i.destroyed||e.push(i.close())}return Promise.all(e)}}[f](e){for(;;){let t=this[b].shift();if(!t)break;t.handler.onError(e)}let t=Array(this[m].length);for(let i=0;i<this[m].length;i++)t[i]=this[m][i].destroy(e);return Promise.all(t)}[g](e,t){let i=this[B]();return i?i.dispatch(e,t)||(i[y]=!0,this[y]=!this[B]()):(this[y]=!0,this[b].push({opts:e,handler:t}),this[d]++),!this[y]}[Q](e){return e.on("drain",this[C].bind(this,e)).on("connect",this[w]).on("disconnect",this[I]).on("connectionError",this[v]),this[m].push(e),this[y]&&queueMicrotask(()=>{this[y]&&this[C](e,e[A],[e,this])}),this}[x](e){e.close(()=>{let t=this[m].indexOf(e);-1!==t&&this[m].splice(t,1)}),this[y]=this[m].some(e=>!e[y]&&!0!==e.closed&&!0!==e.destroyed)}}t.exports={PoolBase:S,kClients:m,kNeedDrain:y,kAddClient:Q,kRemoveClient:x,kGetDispatcher:B}},682850,(e,t,i)=>{"use strict";let{PoolBase:r,kClients:n,kNeedDrain:s,kAddClient:a,kGetDispatcher:o,kRemoveClient:l}=e.r(749530),c=e.r(217365),{InvalidArgumentError:d}=e.r(450178),u=e.r(122857),{kUrl:h}=e.r(954673),A=e.r(977155),p=Symbol("options"),f=Symbol("connections"),g=Symbol("factory");function m(e,t){return new c(e,t)}class y extends r{constructor(e,{connections:t,factory:i=m,connect:r,connectTimeout:s,tls:a,maxCachedSessions:o,socketPath:l,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:y,allowH2:b,clientTtl:E,...C}={}){if(null!=t&&(!Number.isFinite(t)||t<0))throw new d("invalid connections");if("function"!=typeof i)throw new d("factory must be a function.");if(null!=r&&"function"!=typeof r&&"object"!=typeof r)throw new d("connect must be a function or an object");"function"!=typeof r&&(r=A({...a,maxCachedSessions:o,allowH2:b,socketPath:l,timeout:s,..."boolean"==typeof c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:y}:void 0,...r})),super(),this[f]=t||null,this[h]=u.parseOrigin(e),this[p]={...u.deepClone(C),connect:r,allowH2:b,clientTtl:E,socketPath:l},this[p].interceptors=C.interceptors?{...C.interceptors}:void 0,this[g]=i,this.on("connect",(e,t)=>{if(null!=E&&E>0)for(let e of t)Object.assign(e,{ttl:Date.now()})}),this.on("connectionError",(e,t,i)=>{for(let e of t){let t=this[n].indexOf(e);-1!==t&&this[n].splice(t,1)}})}[o](){let e=this[p].clientTtl;for(let t of this[n])if(null!=e&&e>0&&t.ttl&&Date.now()-t.ttl>e)this[l](t);else if(!t[s])return t;if(!this[f]||this[n].length<this[f]){let e=this[g](this[h],this[p]);return this[a](e),e}}}t.exports=y},524013,(e,t,i)=>{"use strict";let{BalancedPoolMissingUpstreamError:r,InvalidArgumentError:n}=e.r(450178),{PoolBase:s,kClients:a,kNeedDrain:o,kAddClient:l,kRemoveClient:c,kGetDispatcher:d}=e.r(749530),u=e.r(682850),{kUrl:h}=e.r(954673),A=e.r(122857),p=Symbol("factory"),f=Symbol("options"),g=Symbol("kGreatestCommonDivisor"),m=Symbol("kCurrentWeight"),y=Symbol("kIndex"),b=Symbol("kWeight"),E=Symbol("kMaxWeightPerServer"),C=Symbol("kErrorPenalty");function w(e,t){if(0===e)return t;for(;0!==t;){let i=t;t=e%t,e=i}return e}function I(e,t){return new u(e,t)}class v extends s{constructor(e=[],{factory:t=I,...i}={}){if("function"!=typeof t)throw new n("factory must be a function.");for(const r of(super(),this[f]={...A.deepClone(i)},this[f].interceptors=i.interceptors?{...i.interceptors}:void 0,this[y]=-1,this[m]=0,this[E]=this[f].maxWeightPerServer||100,this[C]=this[f].errorPenalty||15,Array.isArray(e)||(e=[e]),this[p]=t,e))this.addUpstream(r);this._updateBalancedPoolStats()}addUpstream(e){let t=A.parseOrigin(e).origin;if(this[a].find(e=>e[h].origin===t&&!0!==e.closed&&!0!==e.destroyed))return this;let i=this[p](t,this[f]);for(let e of(this[l](i),i.on("connect",()=>{i[b]=Math.min(this[E],i[b]+this[C])}),i.on("connectionError",()=>{i[b]=Math.max(1,i[b]-this[C]),this._updateBalancedPoolStats()}),i.on("disconnect",(...e)=>{let t=e[2];t&&"UND_ERR_SOCKET"===t.code&&(i[b]=Math.max(1,i[b]-this[C]),this._updateBalancedPoolStats())}),this[a]))e[b]=this[E];return this._updateBalancedPoolStats(),this}_updateBalancedPoolStats(){let e=0;for(let t=0;t<this[a].length;t++)e=w(this[a][t][b],e);this[g]=e}removeUpstream(e){let t=A.parseOrigin(e).origin,i=this[a].find(e=>e[h].origin===t&&!0!==e.closed&&!0!==e.destroyed);return i&&this[c](i),this}getUpstream(e){let t=A.parseOrigin(e).origin;return this[a].find(e=>e[h].origin===t&&!0!==e.closed&&!0!==e.destroyed)}get upstreams(){return this[a].filter(e=>!0!==e.closed&&!0!==e.destroyed).map(e=>e[h].origin)}[d](){if(0===this[a].length)throw new r;if(!this[a].find(e=>!e[o]&&!0!==e.closed&&!0!==e.destroyed)||this[a].map(e=>e[o]).reduce((e,t)=>e&&t,!0))return;let e=0,t=this[a].findIndex(e=>!e[o]);for(;e++<this[a].length;){this[y]=(this[y]+1)%this[a].length;let e=this[a][this[y]];if(e[b]>this[a][t][b]&&!e[o]&&(t=this[y]),0===this[y]&&(this[m]=this[m]-this[g],this[m]<=0&&(this[m]=this[E])),e[b]>=this[m]&&!e[o])return e}return this[m]=this[a][t][b],this[y]=t,this[a][t]}}t.exports=v},753108,(e,t,i)=>{"use strict";let{PoolBase:r,kClients:n,kNeedDrain:s,kAddClient:a,kGetDispatcher:o,kRemoveClient:l}=e.r(749530),c=e.r(217365),{InvalidArgumentError:d}=e.r(450178),u=e.r(122857),{kUrl:h}=e.r(954673),A=e.r(977155),p=Symbol("options"),f=Symbol("connections"),g=Symbol("factory"),m=Symbol("index");function y(e,t){return new c(e,t)}class b extends r{constructor(e,{connections:t,factory:i=y,connect:r,connectTimeout:s,tls:a,maxCachedSessions:o,socketPath:l,autoSelectFamily:c,autoSelectFamilyAttemptTimeout:b,allowH2:E,clientTtl:C,...w}={}){if(null!=t&&(!Number.isFinite(t)||t<0))throw new d("invalid connections");if("function"!=typeof i)throw new d("factory must be a function.");if(null!=r&&"function"!=typeof r&&"object"!=typeof r)throw new d("connect must be a function or an object");"function"!=typeof r&&(r=A({...a,maxCachedSessions:o,allowH2:E,socketPath:l,timeout:s,..."boolean"==typeof c?{autoSelectFamily:c,autoSelectFamilyAttemptTimeout:b}:void 0,...r})),super(),this[f]=t||null,this[h]=u.parseOrigin(e),this[p]={...u.deepClone(w),connect:r,allowH2:E,clientTtl:C,socketPath:l},this[p].interceptors=w.interceptors?{...w.interceptors}:void 0,this[g]=i,this[m]=-1,this.on("connect",(e,t)=>{if(null!=C&&C>0)for(let e of t)Object.assign(e,{ttl:Date.now()})}),this.on("connectionError",(e,t,i)=>{for(let e of t){let t=this[n].indexOf(e);-1!==t&&this[n].splice(t,1)}})}[o](){let e=this[p].clientTtl,t=this[n].length;if(0===t){let e=this[g](this[h],this[p]);return this[a](e),e}let i=0;for(;i<t;){this[m]=(this[m]+1)%t;let r=this[n][this[m]];if(null!=e&&e>0&&r.ttl&&Date.now()-r.ttl>e){this[l](r),i++;continue}if(!r[s])return r;i++}if(!this[f]||t<this[f]){let e=this[g](this[h],this[p]);return this[a](e),e}}}t.exports=b},542122,(e,t,i)=>{"use strict";let{InvalidArgumentError:r,MaxOriginsReachedError:n}=e.r(450178),{kClients:s,kRunning:a,kClose:o,kDestroy:l,kDispatch:c,kUrl:d}=e.r(954673),u=e.r(127205),h=e.r(682850),A=e.r(217365),p=e.r(122857),f=Symbol("onConnect"),g=Symbol("onDisconnect"),m=Symbol("onConnectionError"),y=Symbol("onDrain"),b=Symbol("factory"),E=Symbol("options"),C=Symbol("origins");function w(e,t){return t&&1===t.connections?new A(e,t):new h(e,t)}class I extends u{constructor({factory:e=w,maxOrigins:t=1/0,connect:i,...n}={}){if("function"!=typeof e)throw new r("factory must be a function.");if(null!=i&&"function"!=typeof i&&"object"!=typeof i)throw new r("connect must be a function or an object");if("number"!=typeof t||Number.isNaN(t)||t<=0)throw new r("maxOrigins must be a number greater than 0");super(),i&&"function"!=typeof i&&(i={...i}),this[E]={...p.deepClone(n),maxOrigins:t,connect:i},this[b]=e,this[s]=new Map,this[C]=new Set,this[y]=(e,t)=>{this.emit("drain",e,[this,...t])},this[f]=(e,t)=>{this.emit("connect",e,[this,...t])},this[g]=(e,t,i)=>{this.emit("disconnect",e,[this,...t],i)},this[m]=(e,t,i)=>{this.emit("connectionError",e,[this,...t],i)}}get[a](){let e=0;for(let{dispatcher:t}of this[s].values())e+=t[a];return e}[c](e,t){let i;if(e.origin&&("string"==typeof e.origin||e.origin instanceof URL))i=String(e.origin);else throw new r("opts.origin must be a non-empty string or URL.");if(this[C].size>=this[E].maxOrigins&&!this[C].has(i))throw new n;let a=this[s].get(i),o=a&&a.dispatcher;if(!o){let t=e=>{let t=this[s].get(i);t&&(e&&(t.count-=1),t.count<=0&&(this[s].delete(i),t.dispatcher.destroyed||t.dispatcher.close()),this[C].delete(i))};o=this[b](e.origin,this[E]).on("drain",this[y]).on("connect",(e,t)=>{let r=this[s].get(i);r&&(r.count+=1),this[f](e,t)}).on("disconnect",(e,i,r)=>{t(!0),this[g](e,i,r)}).on("connectionError",(e,i,r)=>{t(!1),this[m](e,i,r)}),this[s].set(i,{count:0,dispatcher:o}),this[C].add(i)}return o.dispatch(e,t)}[o](){let e=[];for(let{dispatcher:t}of this[s].values())e.push(t.close());return this[s].clear(),Promise.all(e)}[l](e){let t=[];for(let{dispatcher:i}of this[s].values())t.push(i.destroy(e));return this[s].clear(),Promise.all(t)}get stats(){let e={};for(let{dispatcher:t}of this[s].values())t.stats&&(e[t[d].origin]=t.stats);return e}}t.exports=I},233378,(e,t,i)=>{"use strict";let{Buffer:r}=e.r(951615),n=e.r(761095),{InvalidArgumentError:s}=e.r(450178);function a(e){let t=r.alloc(16),i=e.split(":"),n=0,s=0,a=e.indexOf("::");if(-1!==a){let e=8-i.filter(e=>e.length>0).length;for(let r=0;r<i.length;r++)if(""===i[r]&&r===a/3)s+=2*e;else if(""!==i[r]){let e=parseInt(i[r],16);t.writeUInt16BE(e,s),s+=2}}else for(let e of i){if(""===e)continue;let i=parseInt(e,16);t.writeUInt16BE(i,2*n),n++}return t}t.exports={parseAddress:function(e){if(n.isIPv4(e)){let t=e.split(".").map(Number);return{type:1,buffer:r.from(t)}}if(n.isIPv6(e))return{type:4,buffer:a(e)};let t=r.from(e,"utf8");if(t.length>255)throw new s("Domain name too long (max 255 bytes)");return{type:3,buffer:r.concat([r.from([t.length]),t])}},parseIPv6:a,buildAddressBuffer:function(e,t,i){let n=r.allocUnsafe(2);return n.writeUInt16BE(i,0),r.concat([r.from([e]),t,n])},parseResponseAddress:function(e,t=0){let i;if(e.length<t+1)throw new s("Buffer too small to contain address type");let r=e[t],n=t+1;switch(r){case 1:if(e.length<n+6)throw new s("Buffer too small for IPv4 address");i=Array.from(e.subarray(n,n+4)).join("."),n+=4;break;case 3:{if(e.length<n+1)throw new s("Buffer too small for domain length");let t=e[n];if(n+=1,e.length<n+t+2)throw new s("Buffer too small for domain address");i=e.subarray(n,n+t).toString("utf8"),n+=t;break}case 4:{if(e.length<n+18)throw new s("Buffer too small for IPv6 address");let t=[];for(let i=0;i<8;i++){let r=e.readUInt16BE(n+2*i);t.push(r.toString(16))}i=t.join(":"),n+=16;break}default:throw new s(`Invalid address type: ${r}`)}if(e.length<n+2)throw new s("Buffer too small for port");return{address:i,port:e.readUInt16BE(n),bytesRead:(n+=2)-t}},createReplyError:function(e){let t=Error({1:"General SOCKS server failure",2:"Connection not allowed by ruleset",3:"Network unreachable",4:"Host unreachable",5:"Connection refused",6:"TTL expired",7:"Command not supported",8:"Address type not supported"}[e]||`Unknown SOCKS5 error code: ${e}`);return t.code=`SOCKS5_${e}`,t}}},396246,(e,t,i)=>{"use strict";let{EventEmitter:r}=e.r(687769),{Buffer:n}=e.r(951615),{InvalidArgumentError:s,Socks5ProxyError:a}=e.r(450178),{debuglog:o}=e.r(812057),{parseAddress:l}=e.r(233378),c=o("undici:socks5"),d=5,u={NO_AUTH:0,GSSAPI:1,USERNAME_PASSWORD:2,NO_ACCEPTABLE:255},h={CONNECT:1,BIND:2,UDP_ASSOCIATE:3},A={IPV4:1,DOMAIN:3,IPV6:4},p={SUCCEEDED:0,GENERAL_FAILURE:1,CONNECTION_NOT_ALLOWED:2,NETWORK_UNREACHABLE:3,HOST_UNREACHABLE:4,CONNECTION_REFUSED:5,TTL_EXPIRED:6,COMMAND_NOT_SUPPORTED:7,ADDRESS_TYPE_NOT_SUPPORTED:8},f={INITIAL:"initial",HANDSHAKING:"handshaking",AUTHENTICATING:"authenticating",CONNECTING:"connecting",CONNECTED:"connected",ERROR:"error",CLOSED:"closed"};class g extends r{constructor(e,t={}){if(super(),!e)throw new s("socket is required");this.socket=e,this.options=t,this.state=f.INITIAL,this.buffer=n.alloc(0),this.authMethods=[],t.username&&t.password&&this.authMethods.push(u.USERNAME_PASSWORD),this.authMethods.push(u.NO_AUTH),this.socket.on("data",this.onData.bind(this)),this.socket.on("error",this.onError.bind(this)),this.socket.on("close",this.onClose.bind(this))}onData(e){c("received data",e.length,"bytes in state",this.state),this.buffer=n.concat([this.buffer,e]);try{switch(this.state){case f.HANDSHAKING:this.handleHandshakeResponse();break;case f.AUTHENTICATING:this.handleAuthResponse();break;case f.CONNECTING:this.handleConnectResponse()}}catch(e){this.onError(e)}}onError(e){c("socket error",e),this.state=f.ERROR,this.emit("error",e),this.destroy()}onClose(){c("socket closed"),this.state=f.CLOSED,this.emit("close")}destroy(){this.socket&&!this.socket.destroyed&&this.socket.destroy()}handshake(){if(this.state!==f.INITIAL)throw new s("Handshake already started");c("starting handshake with",this.authMethods.length,"auth methods"),this.state=f.HANDSHAKING;let e=n.alloc(2+this.authMethods.length);e[0]=d,e[1]=this.authMethods.length,this.authMethods.forEach((t,i)=>{e[2+i]=t}),this.socket.write(e)}handleHandshakeResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],t=this.buffer[1];if(e!==d)throw new a(`Invalid SOCKS version: ${e}`,"UND_ERR_SOCKS5_VERSION");if(t===u.NO_ACCEPTABLE)throw new a("No acceptable authentication method","UND_ERR_SOCKS5_AUTH_REJECTED");if(this.buffer=this.buffer.subarray(2),c("server selected auth method",t),t===u.NO_AUTH)this.emit("authenticated");else if(t===u.USERNAME_PASSWORD)this.state=f.AUTHENTICATING,this.sendAuthRequest();else throw new a(`Unsupported authentication method: ${t}`,"UND_ERR_SOCKS5_AUTH_METHOD")}sendAuthRequest(){let{username:e,password:t}=this.options;if(!e||!t)throw new s("Username and password required for authentication");c("sending username/password auth");let i=n.from(e),r=n.from(t);if(i.length>255||r.length>255)throw new s("Username or password too long");let a=n.alloc(3+i.length+r.length);a[0]=1,a[1]=i.length,i.copy(a,2),a[2+i.length]=r.length,r.copy(a,3+i.length),this.socket.write(a)}handleAuthResponse(){if(this.buffer.length<2)return;let e=this.buffer[0],t=this.buffer[1];if(1!==e)throw new a(`Invalid auth sub-negotiation version: ${e}`,"UND_ERR_SOCKS5_AUTH_VERSION");if(0!==t)throw new a("Authentication failed","UND_ERR_SOCKS5_AUTH_FAILED");this.buffer=this.buffer.subarray(2),c("authentication successful"),this.emit("authenticated")}connect(e,t){if(this.state===f.CONNECTED)throw new s("Already connected");c("connecting to",e,t),this.state=f.CONNECTING;let i=this.buildConnectRequest(h.CONNECT,e,t);this.socket.write(i)}buildConnectRequest(e,t,i){let{type:r,buffer:s}=l(t),a=n.alloc(4+s.length+2);return a[0]=d,a[1]=e,a[2]=0,a[3]=r,s.copy(a,4),a.writeUInt16BE(i,4+s.length),a}handleConnectResponse(){let e;if(this.buffer.length<4)return;let t=this.buffer[0],i=this.buffer[1],r=this.buffer[3];if(t!==d)throw new a(`Invalid SOCKS version in reply: ${t}`,"UND_ERR_SOCKS5_REPLY_VERSION");let n=4;if(r===A.IPV4)n+=6;else if(r===A.DOMAIN){if(this.buffer.length<5)return;n+=1+this.buffer[4]+2}else if(r===A.IPV6)n+=18;else throw new a(`Invalid address type in reply: ${r}`,"UND_ERR_SOCKS5_ADDR_TYPE");if(this.buffer.length<n)return;if(i!==p.SUCCEEDED){let e=this.getReplyErrorMessage(i);throw new a(`SOCKS5 connection failed: ${e}`,`UND_ERR_SOCKS5_REPLY_${i}`)}let s=4;if(r===A.IPV4)e=Array.from(this.buffer.subarray(s,s+4)).join("."),s+=4;else if(r===A.DOMAIN){let t=this.buffer[s];s+=1,e=this.buffer.subarray(s,s+t).toString(),s+=t}else if(r===A.IPV6){let t=[];for(let e=0;e<8;e++){let i=this.buffer.readUInt16BE(s+2*e);t.push(i.toString(16))}e=t.join(":"),s+=16}let o=this.buffer.readUInt16BE(s);this.buffer=this.buffer.subarray(n),this.state=f.CONNECTED,c("connected, bound address:",e,"port:",o),this.emit("connected",{address:e,port:o})}getReplyErrorMessage(e){switch(e){case p.GENERAL_FAILURE:return"General SOCKS server failure";case p.CONNECTION_NOT_ALLOWED:return"Connection not allowed by ruleset";case p.NETWORK_UNREACHABLE:return"Network unreachable";case p.HOST_UNREACHABLE:return"Host unreachable";case p.CONNECTION_REFUSED:return"Connection refused";case p.TTL_EXPIRED:return"TTL expired";case p.COMMAND_NOT_SUPPORTED:return"Command not supported";case p.ADDRESS_TYPE_NOT_SUPPORTED:return"Address type not supported";default:return`Unknown error code: ${e}`}}}t.exports={Socks5Client:g,AUTH_METHODS:u,COMMANDS:h,ADDRESS_TYPES:A,REPLY_CODES:p,STATES:f}},334806,(e,t,i)=>{"use strict";let r,n=e.r(761095),{URL:s}=e.r(857764),a=e.r(127205),{InvalidArgumentError:o}=e.r(450178),{Socks5Client:l}=e.r(396246),{kDispatch:c,kClose:d,kDestroy:u}=e.r(954673),h=e.r(682850),A=e.r(977155),{debuglog:p}=e.r(812057),f=p("undici:socks5-proxy"),g=Symbol("proxy url"),m=Symbol("proxy headers"),y=Symbol("proxy auth"),b=Symbol("pool"),E=Symbol("connector"),C=!1;class w extends a{constructor(e,t={}){if(super(),C||(process.emitWarning("SOCKS5 proxy support is experimental and subject to change","ExperimentalWarning"),C=!0),!e)throw new o("Proxy URL is mandatory");const i="string"==typeof e?new s(e):e;if("socks5:"!==i.protocol&&"socks:"!==i.protocol)throw new o("Proxy URL must use socks5:// or socks:// protocol");this[g]=i,this[m]=t.headers||{},this[y]={username:t.username||(i.username?decodeURIComponent(i.username):null),password:t.password||(i.password?decodeURIComponent(i.password):null)},this[E]=t.connect||A({...t.proxyTls,servername:t.proxyTls?.servername||i.hostname}),this[b]=null}async createSocks5Connection(e,t){let i=this[g].hostname,r=parseInt(this[g].port)||1080;f("creating SOCKS5 connection to",i,r);let s=await new Promise((e,t)=>{let s=()=>{o.removeListener("error",a),e(o)},a=e=>{o.removeListener("connect",s),t(e)},o=n.connect({host:i,port:r});o.once("connect",s),o.once("error",a)}),a=new l(s,this[y]);return a.on("error",e=>{f("SOCKS5 error:",e),s.destroy()}),await a.handshake(),await new Promise((e,t)=>{let i=setTimeout(()=>{t(Error("SOCKS5 authentication timeout"))},5e3),r=()=>{clearTimeout(i),a.removeListener("error",n),e()},n=e=>{clearTimeout(i),a.removeListener("authenticated",r),t(e)};"authenticated"===a.state?(clearTimeout(i),e()):(a.once("authenticated",r),a.once("error",n))}),await a.connect(e,t),await new Promise((i,r)=>{let n=setTimeout(()=>{r(Error("SOCKS5 connection timeout"))},5e3),s=r=>{f("SOCKS5 tunnel established to",e,t,"via",r),clearTimeout(n),a.removeListener("error",o),i()},o=e=>{clearTimeout(n),a.removeListener("connected",s),r(e)};a.once("connected",s),a.once("error",o)}),s}async [c](t,i){let{origin:n}=t;f("dispatching request to",n,"via SOCKS5");try{return(!this[b]||this[b].destroyed||this[b].closed)&&(this[b]=new h(n,{pipelining:t.pipelining,connections:t.connections,connect:async(t,i)=>{try{let a=new s(n),o=a.hostname,l=parseInt(a.port)||("https:"===a.protocol?443:80);f("establishing SOCKS5 connection to",o,l);let c=await this.createSocks5Connection(o,l),d=c;"https:"===a.protocol&&(r||(r=e.r(685560)),f("upgrading to TLS"),d=r.connect({socket:c,servername:o,...t.tls||{}}),await new Promise((e,t)=>{d.once("secureConnect",e),d.once("error",t)})),i(null,d)}catch(e){f("SOCKS5 connection error:",e),i(e)}}})),this[b][c](t,i)}catch(e){if(f("dispatch error:",e),"function"==typeof i.onError)i.onError(e);else throw e}}async [d](){this[b]&&await this[b].close()}async [u](e){this[b]&&await this[b].destroy(e)}}t.exports=w},469494,(e,t,i)=>{"use strict";let{kProxy:r,kClose:n,kDestroy:s,kDispatch:a}=e.r(954673),o=e.r(542122),l=e.r(682850),c=e.r(127205),{InvalidArgumentError:d,RequestAbortedError:u,SecureProxyConnectionError:h}=e.r(450178),A=e.r(977155),p=e.r(217365),{channels:f}=e.r(500078),g=e.r(334806),m=Symbol("proxy agent"),y=Symbol("proxy client"),b=Symbol("proxy headers"),E=Symbol("request tls settings"),C=Symbol("proxy tls settings"),w=Symbol("connect endpoint function"),I=Symbol("tunnel proxy");function v(e){return"https:"===e?443:80}function B(e,t){return new l(e,t)}let Q=()=>{};function x(e,t){return 1===t.connections?new p(e,t):new l(e,t)}class S extends c{#p;constructor(e,{headers:t={},connect:i,factory:r}){if(!e)throw new d("Proxy URL is mandatory");super(),this[b]=t,r?this.#p=r(e,{connect:i}):this.#p=new p(e,{connect:i})}[a](e,t){let i=t.onHeaders;t.onHeaders=function(e,r,n){if(407===e){"function"==typeof t.onError&&t.onError(new d("Proxy Authentication Required (407)"));return}i&&i.call(this,e,r,n)};let{origin:r,path:n="/",headers:s={}}=e;if(e.path=r+n,!("host"in s)&&!("Host"in s)){let{host:e}=new URL(r);s.host=e}return e.headers={...this[b],...s},this.#p[a](e,t)}[n](){return this.#p.close()}[s](e){return this.#p.destroy(e)}}class k extends c{constructor(e){if(!e||"object"==typeof e&&!(e instanceof URL)&&!e.uri)throw new d("Proxy uri is mandatory");const{clientFactory:t=B}=e;if("function"!=typeof t)throw new d("Proxy opts.clientFactory must be a function.");const{proxyTunnel:i=!0}=e;super();const n=this.#f(e),{href:s,origin:a,port:l,protocol:c,username:p,password:k,hostname:T}=n;if(this[r]={uri:s,protocol:c},this[E]=e.requestTls,this[C]=e.proxyTls,this[b]=e.headers||{},this[I]=i,e.auth&&e.token)throw new d("opts.auth cannot be used in combination with opts.token");e.auth?this[b]["proxy-authorization"]=`Basic ${e.auth}`:e.token?this[b]["proxy-authorization"]=e.token:p&&k&&(this[b]["proxy-authorization"]=`Basic ${Buffer.from(`${decodeURIComponent(p)}:${decodeURIComponent(k)}`).toString("base64")}`);const N=A({...e.proxyTls});this[w]=A({...e.requestTls});const D=e.factory||x,_=(t,i)=>{let{protocol:n}=new URL(t);return"socks5:"===this[r].protocol||"socks:"===this[r].protocol?new g(this[r].uri,{headers:this[b],connect:N,factory:D,username:e.username||p,password:e.password||k,proxyTls:e.proxyTls}):this[I]||"http:"!==n||"http:"!==this[r].protocol?D(t,i):new S(this[r].uri,{headers:this[b],connect:N,factory:D})};"socks5:"===c||"socks:"===c?this[y]=null:this[y]=t(n,{connect:N}),this[m]=new o({...e,factory:_,connect:async(e,t)=>{if(!this[y])return void t(new d("Cannot establish tunnel connection without a proxy client"));let i=e.host;e.port||(i+=`:${v(e.protocol)}`);try{let r,n={origin:a,port:l,path:i,signal:e.signal,headers:{...this[b],host:e.host,...null==e.connections||e.connections>0?{"proxy-connection":"keep-alive"}:{}},servername:this[C]?.servername||T},{socket:s,statusCode:o}=await this[y].connect(n);if(200!==o){s.on("error",Q).destroy(),t(new u(`Proxy response (${o}) !== 200 when HTTP Tunneling`));return}if(f.proxyConnected.hasSubscribers&&f.proxyConnected.publish({socket:s,connectParams:n}),"https:"!==e.protocol)return void t(null,s);r=this[E]?this[E].servername:e.servername,this[w]({...e,servername:r,httpSocket:s},t)}catch(e){t("ERR_TLS_CERT_ALTNAME_INVALID"===e.code?new h(e):e)}}})}dispatch(e,t){let i=T(e.headers);if(N(i),i&&!("host"in i)&&!("Host"in i)){let{host:t}=new URL(e.origin);i.host=t}return this[m].dispatch({...e,headers:i},t)}#f(e){return"string"==typeof e?new URL(e):e instanceof URL?e:new URL(e.uri)}[n](){let e=[this[m].close()];return this[y]&&e.push(this[y].close()),Promise.all(e)}[s](){let e=[this[m].destroy()];return this[y]&&e.push(this[y].destroy()),Promise.all(e)}}function T(e){if(Array.isArray(e)){let t={};for(let i=0;i<e.length;i+=2)t[e[i]]=e[i+1];return t}return e}function N(e){if(e&&Object.keys(e).find(e=>"proxy-authorization"===e.toLowerCase()))throw new d("Proxy-Authorization should be sent in ProxyAgent constructor")}t.exports=k},410974,(e,t,i)=>{"use strict";let r=e.r(127205),{kClose:n,kDestroy:s,kClosed:a,kDestroyed:o,kDispatch:l,kNoProxyAgent:c,kHttpProxyAgent:d,kHttpsProxyAgent:u}=e.r(954673),h=e.r(469494),A=e.r(542122),p={"http:":80,"https:":443};class f extends r{#g=null;#m=null;#y=null;constructor(e={}){super(),this.#y=e;const{httpProxy:t,httpsProxy:i,noProxy:r,...n}=e;this[c]=new A(n);const s=t??process.env.http_proxy??process.env.HTTP_PROXY;s?this[d]=new h({...n,uri:s}):this[d]=this[c];const a=i??process.env.https_proxy??process.env.HTTPS_PROXY;a?this[u]=new h({...n,uri:a}):this[u]=this[d],this.#b()}[l](e,t){let i=new URL(e.origin);return this.#E(i).dispatch(e,t)}[n](){return Promise.all([this[c].close(),!this[d][a]&&this[d].close(),!this[u][a]&&this[u].close()])}[s](e){return Promise.all([this[c].destroy(e),!this[d][o]&&this[d].destroy(e),!this[u][o]&&this[u].destroy(e)])}#E(e){let{protocol:t,host:i,port:r}=e;return(i=i.replace(/:\d*$/,"").toLowerCase(),r=Number.parseInt(r,10)||p[t]||0,this.#C(i,r))?"https:"===t?this[u]:this[d]:this[c]}#C(e,t){if(this.#w&&this.#b(),0===this.#m.length)return!0;if("*"===this.#g)return!1;for(let i=0;i<this.#m.length;i++){let r=this.#m[i];if((!r.port||r.port===t)&&(e===r.hostname||e.slice(-(r.hostname.length+1))===`.${r.hostname}`))return!1}return!0}#b(){let e=this.#y.noProxy??this.#I,t=e.split(/[,\s]/),i=[];for(let e=0;e<t.length;e++){let r=t[e];if(!r)continue;let n=r.match(/^(.+):(\d+)$/);i.push({hostname:(n?n[1]:r).replace(/^\*?\./,"").toLowerCase(),port:n?Number.parseInt(n[2],10):0})}this.#g=e,this.#m=i}get #w(){return void 0===this.#y.noProxy&&this.#g!==this.#I}get #I(){return process.env.no_proxy??process.env.NO_PROXY??""}}t.exports=f},335221,(e,t,i)=>{"use strict";let r=e.r(57328),{kRetryHandlerDefaultRetry:n}=e.r(954673),{RequestRetryError:s}=e.r(450178),a=e.r(54128),{isDisturbed:o,parseRangeHeader:l,wrapRequestBody:c}=e.r(122857);function d(e){let t=new Date(e).getTime();return isNaN(t)?0:t-Date.now()}class u{constructor(e,{dispatch:t,handler:i}){const{retryOptions:r,...s}=e,{retry:o,maxRetries:l,maxTimeout:d,minTimeout:h,timeoutFactor:A,methods:p,errorCodes:f,retryAfter:g,statusCodes:m,throwOnError:y}=r??{};this.error=null,this.dispatch=t,this.handler=a.wrap(i),this.opts={...s,body:c(e.body)},this.retryOpts={throwOnError:y??!0,retry:o??u[n],retryAfter:g??!0,maxTimeout:d??3e4,minTimeout:h??500,timeoutFactor:A??2,maxRetries:l??5,methods:p??["GET","HEAD","OPTIONS","PUT","DELETE","TRACE"],statusCodes:m??[500,502,503,504,429],errorCodes:f??["ECONNRESET","ECONNREFUSED","ENOTFOUND","ENETDOWN","ENETUNREACH","EHOSTDOWN","EHOSTUNREACH","EPIPE","UND_ERR_SOCKET"]},this.retryCount=0,this.retryCountCheckpoint=0,this.headersSent=!1,this.start=0,this.end=null,this.etag=null}onResponseStartWithRetry(e,t,i,r,n){if(this.retryOpts.throwOnError)return void(!1===this.retryOpts.statusCodes.includes(t)?(this.headersSent=!0,this.handler.onResponseStart?.(e,t,i,r)):this.error=n);if(o(this.opts.body)){this.headersSent=!0,this.handler.onResponseStart?.(e,t,i,r);return}function s(s){if(s){this.headersSent=!0,this.handler.onResponseStart?.(e,t,i,r),e.resume();return}this.error=n,e.resume()}e.pause(),this.retryOpts.retry(n,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},s.bind(this))}onRequestStart(e,t){this.headersSent||this.handler.onRequestStart?.(e,t)}onRequestUpgrade(e,t,i,r){this.handler.onRequestUpgrade?.(e,t,i,r)}static[n](e,{state:t,opts:i},r){let{statusCode:n,code:s,headers:a}=e,{method:o,retryOptions:l}=i,{maxRetries:c,minTimeout:u,maxTimeout:h,timeoutFactor:A,statusCodes:p,errorCodes:f,methods:g}=l,{counter:m}=t;if(s&&"UND_ERR_REQ_RETRY"!==s&&!f.includes(s)||Array.isArray(g)&&!g.includes(o)||null!=n&&Array.isArray(p)&&!p.includes(n)||m>c)return void r(e);let y=a?.["retry-after"];y&&(y=Number.isNaN(y=Number(y))?d(a["retry-after"]):1e3*y),setTimeout(()=>r(null),y>0?Math.min(y,h):Math.min(u*A**(m-1),h))}onResponseStart(e,t,i,n){if(this.error=null,this.retryCount+=1,t>=300){let r=new s("Request failed",t,{headers:i,data:{count:this.retryCount}});this.onResponseStartWithRetry(e,t,i,n,r);return}if(this.headersSent){if(206!==t&&(this.start>0||200!==t))throw new s("server does not support the range header and the payload was partially consumed",t,{headers:i,data:{count:this.retryCount}});let e=l(i["content-range"]);if(!e)throw new s("Content-Range mismatch",t,{headers:i,data:{count:this.retryCount}});if(null!=this.etag&&this.etag!==i.etag)throw new s("ETag mismatch",t,{headers:i,data:{count:this.retryCount}});let{start:n,size:a,end:o=a?a-1:null}=e;r(this.start===n,"content-range mismatch"),r(null==this.end||this.end===o,"content-range mismatch");return}if(null==this.end){if(206===t){let s=l(i["content-range"]);if(null==s){this.headersSent=!0,this.handler.onResponseStart?.(e,t,i,n);return}let{start:a,size:o,end:c=o?o-1:null}=s;r(null!=a&&Number.isFinite(a),"content-range mismatch"),r(null!=c&&Number.isFinite(c),"invalid content-length"),this.start=a,this.end=c}if(null==this.end){let e=i["content-length"];this.end=null!=e?Number(e)-1:null}r(Number.isFinite(this.start)),r(null==this.end||Number.isFinite(this.end),"invalid content-length"),this.resume=!0,this.etag=null!=i.etag?i.etag:null,null!=this.etag&&"W"===this.etag[0]&&"/"===this.etag[1]&&(this.etag=null),this.headersSent=!0,this.handler.onResponseStart?.(e,t,i,n)}else throw new s("Request failed",t,{headers:i,data:{count:this.retryCount}})}onResponseData(e,t){this.error||(this.start+=t.length,this.handler.onResponseData?.(e,t))}onResponseEnd(e,t){if(this.error&&this.retryOpts.throwOnError)throw this.error;if(!this.error)return this.retryCount=0,this.handler.onResponseEnd?.(e,t);this.retry(e)}retry(e){if(0!==this.start){let e={range:`bytes=${this.start}-${this.end??""}`};null!=this.etag&&(e["if-match"]=this.etag),this.opts={...this.opts,headers:{...this.opts.headers,...e}}}try{this.retryCountCheckpoint=this.retryCount,this.dispatch(this.opts,this)}catch(t){this.handler.onResponseError?.(e,t)}}onResponseError(e,t){if(e?.aborted||o(this.opts.body))return void this.handler.onResponseError?.(e,t);function i(t){t?this.handler?.onResponseError?.(e,t):this.retry(e)}this.retryCount-this.retryCountCheckpoint>0?this.retryCount=this.retryCountCheckpoint+(this.retryCount-this.retryCountCheckpoint):this.retryCount+=1,this.retryOpts.retry(t,{state:{counter:this.retryCount},opts:{retryOptions:this.retryOpts,...this.opts}},i.bind(this))}}t.exports=u},567934,(e,t,i)=>{"use strict";let r=e.r(10918),n=e.r(335221);class s extends r{#v=null;#e=null;constructor(e,t={}){super(t),this.#v=e,this.#e=t}dispatch(e,t){let i=new n({...e,retryOptions:this.#e},{dispatch:this.#v.dispatch.bind(this.#v),handler:t});return this.#v.dispatch(e,i)}close(){return this.#v.close()}destroy(){return this.#v.destroy()}}t.exports=s},889567,(e,t,i)=>{"use strict";let{InvalidArgumentError:r}=e.r(450178),n=e.r(217365);class s extends n{constructor(e,t){if("string"==typeof e&&(e=new URL(e)),"http:"!==e.protocol)throw new r("h2c-client: Only h2c protocol is supported");const{connect:i,maxConcurrentStreams:n,pipelining:s,...a}=t??{};let o=100,l=100;if(null!=n&&Number.isInteger(n)&&n>0&&(o=n),null!=s&&Number.isInteger(s)&&s>0&&(l=s),l>o)throw new r("h2c-client: pipelining cannot be greater than maxConcurrentStreams");super(e,{...a,maxConcurrentStreams:o,pipelining:l,allowH2:!0,useH2c:!0})}}t.exports=s},444664,(e,t,i)=>{"use strict";let r=e.r(57328),{Readable:n}=e.r(81111),{RequestAbortedError:s,NotSupportedError:a,InvalidArgumentError:o,AbortError:l}=e.r(450178),c=e.r(122857),{ReadableStreamFrom:d}=e.r(122857),u=Symbol("kConsume"),h=Symbol("kReading"),A=Symbol("kBody"),p=Symbol("kAbort"),f=Symbol("kContentType"),g=Symbol("kContentLength"),m=Symbol("kUsed"),y=Symbol("kBytesRead"),b=()=>{};class E extends n{constructor({resume:e,abort:t,contentType:i="",contentLength:r,highWaterMark:n=65536}){super({autoDestroy:!0,read:e,highWaterMark:n}),this._readableState.dataEmitted=!1,this[p]=t,this[u]=null,this[y]=0,this[A]=null,this[m]=!1,this[f]=i,this[g]=Number.isFinite(r)?r:null,this[h]=!1}_destroy(e,t){e||this._readableState.endEmitted||(e=new s),e&&this[p](),this[m]?t(e):setImmediate(t,e)}on(e,t){return("data"===e||"readable"===e)&&(this[h]=!0,this[m]=!0),super.on(e,t)}addListener(e,t){return this.on(e,t)}off(e,t){let i=super.off(e,t);return("data"===e||"readable"===e)&&(this[h]=this.listenerCount("data")>0||this.listenerCount("readable")>0),i}removeListener(e,t){return this.off(e,t)}push(e){return e&&(this[y]+=e.length,this[u])?(S(this[u],e),!this[h]||super.push(e)):super.push(e)}text(){return I(this,"text")}json(){return I(this,"json")}blob(){return I(this,"blob")}bytes(){return I(this,"bytes")}arrayBuffer(){return I(this,"arrayBuffer")}async formData(){throw new a}get bodyUsed(){return c.isDisturbed(this)}get body(){return!this[A]&&(this[A]=d(this),this[u]&&(this[A].getReader(),r(this[A].locked))),this[A]}dump(e){let t=e?.signal;if(null!=t&&("object"!=typeof t||!("aborted"in t)))return Promise.reject(new o("signal must be an AbortSignal"));let i=e?.limit&&Number.isFinite(e.limit)?e.limit:131072;return t?.aborted?Promise.reject(t.reason??new l):this._readableState.closeEmitted?Promise.resolve(null):new Promise((e,r)=>{if((this[g]&&this[g]>i||this[y]>i)&&this.destroy(new l),t){let i=()=>{this.destroy(t.reason??new l)};t.addEventListener("abort",i),this.on("close",function(){t.removeEventListener("abort",i),t.aborted?r(t.reason??new l):e(null)})}else this.on("close",e);this.on("error",b).on("data",()=>{this[y]>i&&this.destroy()}).resume()})}setEncoding(e){return Buffer.isEncoding(e)&&(this._readableState.encoding=e),this}}function C(e){return e[A]?.locked===!0||null!==e[u]}function w(e){return c.isDisturbed(e)||C(e)}function I(e,t){return r(!e[u]),new Promise((i,r)=>{if(w(e)){let t=e._readableState;t.destroyed&&!1===t.closeEmitted?e.on("error",r).on("close",()=>{r(TypeError("unusable"))}):r(t.errored??TypeError("unusable"))}else queueMicrotask(()=>{e[u]={type:t,stream:e,resolve:i,reject:r,length:0,body:[]},e.on("error",function(e){k(this[u],e)}).on("close",function(){null!==this[u].body&&k(this[u],new s)}),v(e[u])})})}function v(e){if(null===e.body)return;let{_readableState:t}=e.stream;if(t.bufferIndex){let i=t.bufferIndex,r=t.buffer.length;for(let n=i;n<r;n++)S(e,t.buffer[n])}else for(let i of t.buffer)S(e,i);for(t.endEmitted?x(this[u],this._readableState.encoding):e.stream.on("end",function(){x(this[u],this._readableState.encoding)}),e.stream.resume();null!=e.stream.read(););}function B(e,t,i){if(0===e.length||0===t)return"";let r=1===e.length?e[0]:Buffer.concat(e,t),n=r.length,s=3*(n>2&&239===r[0]&&187===r[1]&&191===r[2]);return i&&"utf8"!==i&&"utf-8"!==i?r.subarray(s,n).toString(i):r.utf8Slice(s,n)}function Q(e,t){if(0===e.length||0===t)return new Uint8Array(0);if(1===e.length)return new Uint8Array(e[0]);let i=new Uint8Array(Buffer.allocUnsafeSlow(t).buffer),r=0;for(let t=0;t<e.length;++t){let n=e[t];i.set(n,r),r+=n.length}return i}function x(e,t){let{type:i,body:r,resolve:n,stream:s,length:a}=e;try{"text"===i?n(B(r,a,t)):"json"===i?n(JSON.parse(B(r,a,t))):"arrayBuffer"===i?n(Q(r,a).buffer):"blob"===i?n(new Blob(r,{type:s[f]})):"bytes"===i&&n(Q(r,a)),k(e)}catch(e){s.destroy(e)}}function S(e,t){e.length+=t.length,e.body.push(t)}function k(e,t){null!==e.body&&(t?e.reject(t):e.resolve(),e.type=null,e.stream=null,e.resolve=null,e.reject=null,e.length=0,e.body=null)}t.exports={Readable:E,chunksDecode:B}},749037,(e,t,i)=>{"use strict";let r=e.r(57328),{AsyncResource:n}=e.r(478500),{Readable:s}=e.r(444664),{InvalidArgumentError:a,RequestAbortedError:o}=e.r(450178),l=e.r(122857);function c(){}class d extends n{constructor(e,t){if(!e||"object"!=typeof e)throw new a("invalid opts");const{signal:i,method:r,opaque:n,body:s,onInfo:d,responseHeaders:u,highWaterMark:h}=e;try{if("function"!=typeof t)throw new a("invalid callback");if(h&&("number"!=typeof h||h<0))throw new a("invalid highWaterMark");if(i&&"function"!=typeof i.on&&"function"!=typeof i.addEventListener)throw new a("signal must be an EventEmitter or EventTarget");if("CONNECT"===r)throw new a("invalid method");if(d&&"function"!=typeof d)throw new a("invalid onInfo callback");super("UNDICI_REQUEST")}catch(e){throw l.isStream(s)&&l.destroy(s.on("error",c),e),e}this.method=r,this.responseHeaders=u||null,this.opaque=n||null,this.callback=t,this.res=null,this.abort=null,this.body=s,this.trailers={},this.context=null,this.onInfo=d||null,this.highWaterMark=h,this.reason=null,this.removeAbortListener=null,i?.aborted?this.reason=i.reason??new o:i&&(this.removeAbortListener=l.addAbortListener(i,()=>{this.reason=i.reason??new o,this.res?l.destroy(this.res.on("error",c),this.reason):this.abort&&this.abort(this.reason)}))}onConnect(e,t){this.reason?e(this.reason):(r(this.callback),this.abort=e,this.context=t)}onHeaders(e,t,i,r){let{callback:n,opaque:a,abort:o,context:d,responseHeaders:u,highWaterMark:h}=this,A="raw"===u?l.parseRawHeaders(t):l.parseHeaders(t);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:A});return}let p="raw"===u?l.parseHeaders(t):A,f=p["content-type"],g=p["content-length"],m=new s({resume:i,abort:o,contentType:f,contentLength:"HEAD"!==this.method&&g?Number(g):null,highWaterMark:h});if(this.removeAbortListener&&(m.on("close",this.removeAbortListener),this.removeAbortListener=null),this.callback=null,this.res=m,null!==n)try{this.runInAsyncScope(n,null,null,{statusCode:e,statusText:r,headers:A,trailers:this.trailers,opaque:a,body:m,context:d})}catch(e){this.res=null,l.destroy(m.on("error",c),e),queueMicrotask(()=>{throw e})}}onData(e){return this.res.push(e)}onComplete(e){l.parseHeaders(e,this.trailers),this.res.push(null)}onError(e){let{res:t,callback:i,body:r,opaque:n}=this;i&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(i,null,e,{opaque:n})})),t&&(this.res=null,queueMicrotask(()=>{l.destroy(t.on("error",c),e)})),r&&(this.body=null,l.isStream(r)&&(r.on("error",c),l.destroy(r,e))),this.removeAbortListener&&(this.removeAbortListener(),this.removeAbortListener=null)}}function u(e,t){if(void 0===t)return new Promise((t,i)=>{u.call(this,e,(e,r)=>e?i(e):t(r))});try{let i=new d(e,t);this.dispatch(e,i)}catch(r){if("function"!=typeof t)throw r;let i=e?.opaque;queueMicrotask(()=>t(r,{opaque:i}))}}t.exports=u,t.exports.RequestHandler=d},655778,(e,t,i)=>{"use strict";let{addAbortListener:r}=e.r(122857),{RequestAbortedError:n}=e.r(450178),s=Symbol("kListener"),a=Symbol("kSignal");function o(e){e.abort?e.abort(e[a]?.reason):e.reason=e[a]?.reason??new n,l(e)}function l(e){e[a]&&("removeEventListener"in e[a]?e[a].removeEventListener("abort",e[s]):e[a].removeListener("abort",e[s]),e[a]=null,e[s]=null)}t.exports={addSignal:function(e,t){if(e.reason=null,e[a]=null,e[s]=null,t){if(t.aborted)return void o(e);e[a]=t,e[s]=()=>{o(e)},r(e[a],e[s])}},removeSignal:l}},301954,(e,t,i)=>{"use strict";let r=e.r(57328),{finished:n}=e.r(81111),{AsyncResource:s}=e.r(478500),{InvalidArgumentError:a,InvalidReturnValueError:o}=e.r(450178),l=e.r(122857),{addSignal:c,removeSignal:d}=e.r(655778);function u(){}class h extends s{constructor(e,t,i){if(!e||"object"!=typeof e)throw new a("invalid opts");const{signal:r,method:n,opaque:s,body:o,onInfo:d,responseHeaders:h}=e;try{if("function"!=typeof i)throw new a("invalid callback");if("function"!=typeof t)throw new a("invalid factory");if(r&&"function"!=typeof r.on&&"function"!=typeof r.addEventListener)throw new a("signal must be an EventEmitter or EventTarget");if("CONNECT"===n)throw new a("invalid method");if(d&&"function"!=typeof d)throw new a("invalid onInfo callback");super("UNDICI_STREAM")}catch(e){throw l.isStream(o)&&l.destroy(o.on("error",u),e),e}this.responseHeaders=h||null,this.opaque=s||null,this.factory=t,this.callback=i,this.res=null,this.abort=null,this.context=null,this.trailers=null,this.body=o,this.onInfo=d||null,l.isStream(o)&&o.on("error",e=>{this.onError(e)}),c(this,r)}onConnect(e,t){this.reason?e(this.reason):(r(this.callback),this.abort=e,this.context=t)}onHeaders(e,t,i,r){let{factory:s,opaque:a,context:c,responseHeaders:d}=this,u="raw"===d?l.parseRawHeaders(t):l.parseHeaders(t);if(e<200){this.onInfo&&this.onInfo({statusCode:e,headers:u});return}if(this.factory=null,null===s)return;let h=this.runInAsyncScope(s,null,{statusCode:e,headers:u,opaque:a,context:c});if(!h||"function"!=typeof h.write||"function"!=typeof h.end||"function"!=typeof h.on)throw new o("expected Writable");return n(h,{readable:!1},e=>{let{callback:t,res:i,opaque:r,trailers:n,abort:s}=this;this.res=null,(e||!i?.readable)&&l.destroy(i,e),this.callback=null,this.runInAsyncScope(t,null,e||null,{opaque:r,trailers:n}),e&&s()}),h.on("drain",i),this.res=h,!0!==(void 0!==h.writableNeedDrain?h.writableNeedDrain:h._writableState?.needDrain)}onData(e){let{res:t}=this;return!t||t.write(e)}onComplete(e){let{res:t}=this;d(this),t&&(this.trailers=l.parseHeaders(e),t.end())}onError(e){let{res:t,callback:i,opaque:r,body:n}=this;d(this),this.factory=null,t?(this.res=null,l.destroy(t,e)):i&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(i,null,e,{opaque:r})})),n&&(this.body=null,l.destroy(n,e))}}function A(e,t,i){if(void 0===i)return new Promise((i,r)=>{A.call(this,e,t,(e,t)=>e?r(e):i(t))});try{let r=new h(e,t,i);this.dispatch(e,r)}catch(r){if("function"!=typeof i)throw r;let t=e?.opaque;queueMicrotask(()=>i(r,{opaque:t}))}}t.exports=A},55497,(e,t,i)=>{"use strict";let{Readable:r,Duplex:n,PassThrough:s}=e.r(81111),a=e.r(57328),{AsyncResource:o}=e.r(478500),{InvalidArgumentError:l,InvalidReturnValueError:c,RequestAbortedError:d}=e.r(450178),u=e.r(122857),{addSignal:h,removeSignal:A}=e.r(655778);function p(){}let f=Symbol("resume");class g extends r{constructor(){super({autoDestroy:!0}),this[f]=null}_read(){let{[f]:e}=this;e&&(this[f]=null,e())}_destroy(e,t){this._read(),t(e)}}class m extends r{constructor(e){super({autoDestroy:!0}),this[f]=e}_read(){this[f]()}_destroy(e,t){e||this._readableState.endEmitted||(e=new d),t(e)}}class y extends o{constructor(e,t){if(!e||"object"!=typeof e)throw new l("invalid opts");if("function"!=typeof t)throw new l("invalid handler");const{signal:i,method:r,opaque:s,onInfo:a,responseHeaders:o}=e;if(i&&"function"!=typeof i.on&&"function"!=typeof i.addEventListener)throw new l("signal must be an EventEmitter or EventTarget");if("CONNECT"===r)throw new l("invalid method");if(a&&"function"!=typeof a)throw new l("invalid onInfo callback");super("UNDICI_PIPELINE"),this.opaque=s||null,this.responseHeaders=o||null,this.handler=t,this.abort=null,this.context=null,this.onInfo=a||null,this.req=new g().on("error",p),this.ret=new n({readableObjectMode:e.objectMode,autoDestroy:!0,read:()=>{let{body:e}=this;e?.resume&&e.resume()},write:(e,t,i)=>{let{req:r}=this;r.push(e,t)||r._readableState.destroyed?i():r[f]=i},destroy:(e,t)=>{let{body:i,req:r,res:n,ret:s,abort:a}=this;e||s._readableState.endEmitted||(e=new d),a&&e&&a(),u.destroy(i,e),u.destroy(r,e),u.destroy(n,e),A(this),t(e)}}).on("prefinish",()=>{let{req:e}=this;e.push(null)}),this.res=null,h(this,i)}onConnect(e,t){let{res:i}=this;this.reason?e(this.reason):(a(!i,"pipeline cannot be retried"),this.abort=e,this.context=t)}onHeaders(e,t,i){let r,{opaque:n,handler:s,context:a}=this;if(e<200){if(this.onInfo){let i="raw"===this.responseHeaders?u.parseRawHeaders(t):u.parseHeaders(t);this.onInfo({statusCode:e,headers:i})}return}this.res=new m(i);try{this.handler=null;let i="raw"===this.responseHeaders?u.parseRawHeaders(t):u.parseHeaders(t);r=this.runInAsyncScope(s,null,{statusCode:e,headers:i,opaque:n,body:this.res,context:a})}catch(e){throw this.res.on("error",p),e}if(!r||"function"!=typeof r.on)throw new c("expected Readable");r.on("data",e=>{let{ret:t,body:i}=this;!t.push(e)&&i.pause&&i.pause()}).on("error",e=>{let{ret:t}=this;u.destroy(t,e)}).on("end",()=>{let{ret:e}=this;e.push(null)}).on("close",()=>{let{ret:e}=this;e._readableState.ended||u.destroy(e,new d)}),this.body=r}onData(e){let{res:t}=this;return t.push(e)}onComplete(e){let{res:t}=this;t.push(null)}onError(e){let{ret:t}=this;this.handler=null,u.destroy(t,e)}}t.exports=function(e,t){try{let i=new y(e,t);return this.dispatch({...e,body:i.req},i),i.ret}catch(e){return new s().destroy(e)}}},193038,(e,t,i)=>{"use strict";let{InvalidArgumentError:r,SocketError:n}=e.r(450178),{AsyncResource:s}=e.r(478500),a=e.r(57328),o=e.r(122857),{kHTTP2Stream:l}=e.r(954673),{addSignal:c,removeSignal:d}=e.r(655778);class u extends s{constructor(e,t){if(!e||"object"!=typeof e)throw new r("invalid opts");if("function"!=typeof t)throw new r("invalid callback");const{signal:i,opaque:n,responseHeaders:s}=e;if(i&&"function"!=typeof i.on&&"function"!=typeof i.addEventListener)throw new r("signal must be an EventEmitter or EventTarget");super("UNDICI_UPGRADE"),this.responseHeaders=s||null,this.opaque=n||null,this.callback=t,this.abort=null,this.context=null,c(this,i)}onConnect(e,t){this.reason?e(this.reason):(a(this.callback),this.abort=e,this.context=null)}onHeaders(){throw new n("bad upgrade",null)}onUpgrade(e,t,i){a(!0===i[l]?200===e:101===e);let{callback:r,opaque:n,context:s}=this;d(this),this.callback=null;let c="raw"===this.responseHeaders?o.parseRawHeaders(t):o.parseHeaders(t);this.runInAsyncScope(r,null,null,{headers:c,socket:i,opaque:n,context:s})}onError(e){let{callback:t,opaque:i}=this;d(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,e,{opaque:i})}))}}function h(e,t){if(void 0===t)return new Promise((t,i)=>{h.call(this,e,(e,r)=>e?i(e):t(r))});try{let i=new u(e,t),r={...e,method:e.method||"GET",upgrade:e.protocol||"Websocket"};this.dispatch(r,i)}catch(r){if("function"!=typeof t)throw r;let i=e?.opaque;queueMicrotask(()=>t(r,{opaque:i}))}}t.exports=h},965139,(e,t,i)=>{"use strict";let r=e.r(57328),{AsyncResource:n}=e.r(478500),{InvalidArgumentError:s,SocketError:a}=e.r(450178),o=e.r(122857),{addSignal:l,removeSignal:c}=e.r(655778);class d extends n{constructor(e,t){if(!e||"object"!=typeof e)throw new s("invalid opts");if("function"!=typeof t)throw new s("invalid callback");const{signal:i,opaque:r,responseHeaders:n}=e;if(i&&"function"!=typeof i.on&&"function"!=typeof i.addEventListener)throw new s("signal must be an EventEmitter or EventTarget");super("UNDICI_CONNECT"),this.opaque=r||null,this.responseHeaders=n||null,this.callback=t,this.abort=null,l(this,i)}onConnect(e,t){this.reason?e(this.reason):(r(this.callback),this.abort=e,this.context=t)}onHeaders(){throw new a("bad connect",null)}onUpgrade(e,t,i){let{callback:r,opaque:n,context:s}=this;c(this),this.callback=null;let a=t;null!=a&&(a="raw"===this.responseHeaders?o.parseRawHeaders(t):o.parseHeaders(t)),this.runInAsyncScope(r,null,null,{statusCode:e,headers:a,socket:i,opaque:n,context:s})}onError(e){let{callback:t,opaque:i}=this;c(this),t&&(this.callback=null,queueMicrotask(()=>{this.runInAsyncScope(t,null,e,{opaque:i})}))}}function u(e,t){if(void 0===t)return new Promise((t,i)=>{u.call(this,e,(e,r)=>e?i(e):t(r))});try{let i=new d(e,t),r={...e,method:"CONNECT"};this.dispatch(r,i)}catch(r){if("function"!=typeof t)throw r;let i=e?.opaque;queueMicrotask(()=>t(r,{opaque:i}))}}t.exports=u},222611,(e,t,i)=>{"use strict";t.exports.request=e.r(749037),t.exports.stream=e.r(301954),t.exports.pipeline=e.r(55497),t.exports.upgrade=e.r(193038),t.exports.connect=e.r(965139)},491433,(e,t,i)=>{"use strict";let{UndiciError:r}=e.r(450178),n=Symbol.for("undici.error.UND_MOCK_ERR_MOCK_NOT_MATCHED");class s extends r{constructor(e){super(e),this.name="MockNotMatchedError",this.message=e||"The request does not match any registered mock dispatches",this.code="UND_MOCK_ERR_MOCK_NOT_MATCHED"}static[Symbol.hasInstance](e){return e&&!0===e[n]}get[n](){return!0}}t.exports={MockNotMatchedError:s}},688525,(e,t,i)=>{"use strict";t.exports={kAgent:Symbol("agent"),kOptions:Symbol("options"),kFactory:Symbol("factory"),kDispatches:Symbol("dispatches"),kDispatchKey:Symbol("dispatch key"),kDefaultHeaders:Symbol("default headers"),kDefaultTrailers:Symbol("default trailers"),kContentLength:Symbol("content length"),kMockAgent:Symbol("mock agent"),kMockAgentSet:Symbol("mock agent set"),kMockAgentGet:Symbol("mock agent get"),kMockDispatch:Symbol("mock dispatch"),kClose:Symbol("close"),kOriginalClose:Symbol("original agent close"),kOriginalDispatch:Symbol("original dispatch"),kOrigin:Symbol("origin"),kIsMockActive:Symbol("is mock active"),kNetConnect:Symbol("net connect"),kGetNetConnect:Symbol("get net connect"),kConnected:Symbol("connected"),kIgnoreTrailingSlash:Symbol("ignore trailing slash"),kMockAgentMockCallHistoryInstance:Symbol("mock agent mock call history name"),kMockAgentRegisterCallHistory:Symbol("mock agent register mock call history"),kMockAgentAddCallHistoryLog:Symbol("mock agent add call history log"),kMockAgentIsCallHistoryEnabled:Symbol("mock agent is call history enabled"),kMockAgentAcceptsNonStandardSearchParameters:Symbol("mock agent accepts non standard search parameters"),kMockCallHistoryAddLog:Symbol("mock call history add log")}},682708,(e,t,i)=>{"use strict";let{MockNotMatchedError:r}=e.r(491433),{kDispatches:n,kMockAgent:s,kOriginalDispatch:a,kOrigin:o,kGetNetConnect:l}=e.r(688525),{serializePathWithQuery:c}=e.r(122857),{STATUS_CODES:d}=e.r(347299),{types:{isPromise:u}}=e.r(812057),{InvalidArgumentError:h}=e.r(450178);function A(e,t){return"string"==typeof e?e===t:e instanceof RegExp?e.test(t):"function"==typeof e&&!0===e(t)}function p(e){return Object.fromEntries(Object.entries(e).map(([e,t])=>[e.toLocaleLowerCase(),t]))}function f(e,t){if(Array.isArray(e)){for(let i=0;i<e.length;i+=2)if(e[i].toLocaleLowerCase()===t.toLocaleLowerCase())return e[i+1];return}return"function"==typeof e.get?e.get(t):p(e)[t.toLocaleLowerCase()]}function g(e){let t=e.slice(),i=[];for(let e=0;e<t.length;e+=2)i.push([t[e],t[e+1]]);return Object.fromEntries(i)}function m(e,t){if("function"==typeof e.headers)return Array.isArray(t)&&(t=g(t)),e.headers(t?p(t):{});if(void 0===e.headers)return!0;if("object"!=typeof t||"object"!=typeof e.headers)return!1;for(let[i,r]of Object.entries(e.headers))if(!A(r,f(t,i)))return!1;return!0}function y(e){if("string"!=typeof e)return e;let t=e.split("?",3);if(2!==t.length)return e;let i=new URLSearchParams(t.pop());return i.sort(),[...t,i.toString()].join("?")}function b(e,{path:t,method:i,body:r,headers:n}){let s=A(e.path,t),a=A(e.method,i),o=void 0===e.body||A(e.body,r),l=m(e,n);return s&&a&&o&&l}function E(e){if(Buffer.isBuffer(e)||e instanceof Uint8Array)return e;if(e instanceof ArrayBuffer)return e;if("object"==typeof e)return JSON.stringify(e);if(e)return e.toString();else return""}function C(e,t){let i=t.query?c(t.path,t.query):t.path,n="string"==typeof i?y(i):i,s=I(n),a=e.filter(({consumed:e})=>!e).filter(({path:e,ignoreTrailingSlash:t})=>t?A(I(y(e)),s):A(y(e),n));if(0===a.length)throw new r(`Mock dispatch not matched for path '${n}'`);if(0===(a=a.filter(({method:e})=>A(e,t.method))).length)throw new r(`Mock dispatch not matched for method '${t.method}' on path '${n}'`);if(0===(a=a.filter(({body:e})=>void 0===e||A(e,t.body))).length)throw new r(`Mock dispatch not matched for body '${t.body}' on path '${n}'`);if(0===(a=a.filter(e=>m(e,t.headers))).length){let e="object"==typeof t.headers?JSON.stringify(t.headers):t.headers;throw new r(`Mock dispatch not matched for headers '${e}' on path '${n}'`)}return a[0]}function w(e,t){let i=e.findIndex(e=>!!e.consumed&&b(e,t));-1!==i&&e.splice(i,1)}function I(e){for(;e.endsWith("/");)e=e.slice(0,-1);return 0===e.length&&(e="/"),e}function v(e){let{path:t,method:i,body:r,headers:n,query:s}=e;return{path:t,method:i,body:r,headers:n,query:s}}function B(e){let t=Object.keys(e),i=[];for(let r=0;r<t.length;++r){let n=t[r],s=e[n],a=Buffer.from(`${n}`);if(Array.isArray(s))for(let e=0;e<s.length;++e)i.push(a,Buffer.from(`${s[e]}`));else i.push(a,Buffer.from(`${s}`))}return i}function Q(e){return d[e]||"unknown"}function x(e,t){let i=v(e),r=C(this[n],i);r.timesInvoked++,r.data.callback&&(r.data={...r.data,...r.data.callback(e)});let{data:{statusCode:s,data:a,headers:o,trailers:l,error:c},delay:d,persist:h}=r,{timesInvoked:A,times:p}=r;if(r.consumed=!h&&A>=p,r.pending=A<p,null!==c)return w(this[n],i),t.onError(c),!0;let f=!1,m=null;function y(e){f||(f=!0,null!==m&&(clearTimeout(m),m=null),t.onError(e))}function b(r,n=a){if(f)return;let c=Array.isArray(e.headers)?g(e.headers):e.headers,d="function"==typeof n?n({...e,headers:c}):n;if(u(d))return d.then(e=>b(r,e));if(f)return;let h=E(d),A=B(o),p=B(l);t.onHeaders?.(s,A,I,Q(s)),t.onData?.(Buffer.from(h)),t.onComplete?.(p),w(r,i)}function I(){}return t.onConnect?.(y,null),"number"==typeof d&&d>0?m=setTimeout(()=>{m=null,b(this[n])},d):b(this[n]),!0}function S(){let e=this[s],t=this[o],i=this[a];return function(n,s){if(e.isMockActive)try{x.call(this,n,s)}catch(a){if("UND_MOCK_ERR_MOCK_NOT_MATCHED"===a.code){let o=e[l]();if(!1===o)throw new r(`${a.message}: subsequent request to origin ${t} was not allowed (net.connect disabled)`);if(k(o,t))i.call(this,n,s);else throw new r(`${a.message}: subsequent request to origin ${t} was not allowed (net.connect is not enabled for this origin)`)}else throw a}else i.call(this,n,s)}}function k(e,t){let i=new URL(t);return!0===e||!!(Array.isArray(e)&&e.some(e=>A(e,i.host)))}t.exports={getResponseData:E,getMockDispatch:C,addMockDispatch:function(e,t,i,r){let n={timesInvoked:0,times:1,persist:!1,consumed:!1,...r},s="function"==typeof i?{callback:i}:{...i},a={...n,...t,pending:!0,data:{error:null,...s}};return e.push(a),a},deleteMockDispatch:w,buildKey:v,generateKeyValues:B,matchValue:A,getResponse:async function(e){let t=[];for await(let i of e)t.push(i);return Buffer.concat(t).toString("utf8")},getStatusText:Q,mockDispatch:x,buildMockDispatch:S,checkNetConnect:k,buildAndValidateMockOptions:function(e){let{agent:t,...i}=e;if("enableCallHistory"in i&&"boolean"!=typeof i.enableCallHistory)throw new h("options.enableCallHistory must to be a boolean");if("acceptNonStandardSearchParameters"in i&&"boolean"!=typeof i.acceptNonStandardSearchParameters)throw new h("options.acceptNonStandardSearchParameters must to be a boolean");if("ignoreTrailingSlash"in i&&"boolean"!=typeof i.ignoreTrailingSlash)throw new h("options.ignoreTrailingSlash must to be a boolean");return i},getHeaderByName:f,buildHeadersFromArray:g,normalizeSearchParams:function(e){if("string"!=typeof e)return e;let t=new URLSearchParams(e),i=new URLSearchParams;for(let[e,r]of t.entries()){if(e=e.replace("[]",""),/^(['"]).*\1$/.test(r)){i.append(e,r);continue}if(r.includes(",")){for(let t of r.split(","))i.append(e,t);continue}i.append(e,r)}return i},normalizeOrigin:function(e){return"string"==typeof e||e instanceof URL?e instanceof URL?e.origin:e.toLowerCase():e}}},862710,(e,t,i)=>{"use strict";let{getResponseData:r,buildKey:n,addMockDispatch:s}=e.r(682708),{kDispatches:a,kDispatchKey:o,kDefaultHeaders:l,kDefaultTrailers:c,kContentLength:d,kMockDispatch:u,kIgnoreTrailingSlash:h}=e.r(688525),{InvalidArgumentError:A}=e.r(450178),{serializePathWithQuery:p}=e.r(122857);class f{constructor(e){this[u]=e}delay(e){if("number"!=typeof e||!Number.isInteger(e)||e<=0)throw new A("waitInMs must be a valid integer > 0");return this[u].delay=e,this}persist(){return this[u].persist=!0,this}times(e){if("number"!=typeof e||!Number.isInteger(e)||e<=0)throw new A("repeatTimes must be a valid integer > 0");return this[u].times=e,this}}class g{constructor(e,t){if("object"!=typeof e)throw new A("opts must be an object");if(void 0===e.path)throw new A("opts.path must be defined");if(void 0===e.method&&(e.method="GET"),"string"==typeof e.path)if(e.query)e.path=p(e.path,e.query);else{const t=new URL(e.path,"data://");e.path=t.pathname+t.search}"string"==typeof e.method&&(e.method=e.method.toUpperCase()),this[o]=n(e),this[a]=t,this[h]=e.ignoreTrailingSlash??!1,this[l]={},this[c]={},this[d]=!1}createMockScopeDispatchData({statusCode:e,data:t,responseOptions:i}){let n=r(t),s=this[d]?{"content-length":n.length}:{};return{statusCode:e,data:t,headers:{...this[l],...s,...i.headers},trailers:{...this[c],...i.trailers}}}validateReplyParameters(e){if(void 0===e.statusCode)throw new A("statusCode must be defined");if("object"!=typeof e.responseOptions||null===e.responseOptions)throw new A("responseOptions must be an object")}reply(e){if("function"==typeof e){let t=t=>{let i=e(t);if("object"!=typeof i||null===i)throw new A("reply options callback must return an object");let r={data:"",responseOptions:{},...i};return this.validateReplyParameters(r),{...this.createMockScopeDispatchData(r)}};return new f(s(this[a],this[o],t,{ignoreTrailingSlash:this[h]}))}let t={statusCode:e,data:void 0===arguments[1]?"":arguments[1],responseOptions:void 0===arguments[2]?{}:arguments[2]};this.validateReplyParameters(t);let i=this.createMockScopeDispatchData(t);return new f(s(this[a],this[o],i,{ignoreTrailingSlash:this[h]}))}replyWithError(e){if(void 0===e)throw new A("error must be defined");return new f(s(this[a],this[o],{error:e},{ignoreTrailingSlash:this[h]}))}defaultReplyHeaders(e){if(void 0===e)throw new A("headers must be defined");return this[l]=e,this}defaultReplyTrailers(e){if(void 0===e)throw new A("trailers must be defined");return this[c]=e,this}replyContentLength(){return this[d]=!0,this}}t.exports.MockInterceptor=g,t.exports.MockScope=f},102729,(e,t,i)=>{"use strict";let{promisify:r}=e.r(812057),n=e.r(217365),{buildMockDispatch:s}=e.r(682708),{kDispatches:a,kMockAgent:o,kClose:l,kOriginalClose:c,kOrigin:d,kOriginalDispatch:u,kConnected:h,kIgnoreTrailingSlash:A}=e.r(688525),{MockInterceptor:p}=e.r(862710),f=e.r(954673),{InvalidArgumentError:g}=e.r(450178);class m extends n{constructor(e,t){if(!t||!t.agent||"function"!=typeof t.agent.dispatch)throw new g("Argument opts.agent must implement Agent");super(e,t),this[o]=t.agent,this[d]=e,this[A]=t.ignoreTrailingSlash??!1,this[a]=[],this[h]=1,this[u]=this.dispatch,this[c]=this.close.bind(this),this.dispatch=s.call(this),this.close=this[l]}get[f.kConnected](){return this[h]}intercept(e){return new p(e&&{ignoreTrailingSlash:this[A],...e},this[a])}cleanMocks(){this[a]=[]}async [l](){await r(this[c])(),this[h]=0,this[o][f.kClients].delete(this[d])}}t.exports=m},406177,(e,t,i)=>{"use strict";let{kMockCallHistoryAddLog:r}=e.r(688525),{InvalidArgumentError:n}=e.r(450178);function s(e,t,i,r){switch(t.operator){case"OR":return r.push(...i(e)),r;case"AND":return i.call({logs:r},e);default:throw new n("options.operator must to be a case insensitive string equal to 'OR' or 'AND'")}}function a(e={}){let t={};if("operator"in e){if("string"!=typeof e.operator||"OR"!==e.operator.toUpperCase()&&"AND"!==e.operator.toUpperCase())throw new n("options.operator must to be a case insensitive string equal to 'OR' or 'AND'");return{...t,operator:e.operator.toUpperCase()}}return t}function o(e){return t=>{if("string"==typeof t||null==t)return this.logs.filter(i=>i[e]===t);if(t instanceof RegExp)return this.logs.filter(i=>t.test(i[e]));throw new n(`${e} parameter should be one of string, regexp, undefined or null`)}}function l(e){try{let t=new URL(e.path,e.origin);if(0!==t.search.length)return t;return t.search=new URLSearchParams(e.query).toString(),t}catch(e){throw new n("An error occurred when computing MockCallHistoryLog.url",{cause:e})}}class c{constructor(e={}){this.body=e.body,this.headers=e.headers,this.method=e.method;const t=l(e);this.fullUrl=t.toString(),this.origin=t.origin,this.path=t.pathname,this.searchParams=Object.fromEntries(t.searchParams),this.protocol=t.protocol,this.host=t.host,this.port=t.port,this.hash=t.hash}toMap(){return new Map([["protocol",this.protocol],["host",this.host],["port",this.port],["origin",this.origin],["path",this.path],["hash",this.hash],["searchParams",this.searchParams],["fullUrl",this.fullUrl],["method",this.method],["body",this.body],["headers",this.headers]])}toString(){let e="->",t="|",i="";return this.toMap().forEach((r,n)=>{("string"==typeof r||null==r)&&(i=`${i}${n}${e}${r}${t}`),("object"==typeof r&&null!==r||Array.isArray(r))&&(i=`${i}${n}${e}${JSON.stringify(r)}${t}`)}),i.slice(0,-1)}}class d{logs=[];calls(){return this.logs}firstCall(){return this.logs.at(0)}lastCall(){return this.logs.at(-1)}nthCall(e){if("number"!=typeof e)throw new n("nthCall must be called with a number");if(!Number.isInteger(e))throw new n("nthCall must be called with an integer");if(1!==Math.sign(e))throw new n("nthCall must be called with a positive value. use firstCall or lastCall instead");return this.logs.at(e-1)}filterCalls(e,t){if(0===this.logs.length)return this.logs;if("function"==typeof e)return this.logs.filter(e);if(e instanceof RegExp)return this.logs.filter(t=>e.test(t.toString()));if("object"==typeof e&&null!==e){if(0===Object.keys(e).length)return this.logs;let i={operator:"OR",...a(t)},r=[];return"protocol"in e&&(r=s(e.protocol,i,this.filterCallsByProtocol,r)),"host"in e&&(r=s(e.host,i,this.filterCallsByHost,r)),"port"in e&&(r=s(e.port,i,this.filterCallsByPort,r)),"origin"in e&&(r=s(e.origin,i,this.filterCallsByOrigin,r)),"path"in e&&(r=s(e.path,i,this.filterCallsByPath,r)),"hash"in e&&(r=s(e.hash,i,this.filterCallsByHash,r)),"fullUrl"in e&&(r=s(e.fullUrl,i,this.filterCallsByFullUrl,r)),"method"in e&&(r=s(e.method,i,this.filterCallsByMethod,r)),[...new Set(r)]}throw new n("criteria parameter should be one of function, regexp, or object")}filterCallsByProtocol=o.call(this,"protocol");filterCallsByHost=o.call(this,"host");filterCallsByPort=o.call(this,"port");filterCallsByOrigin=o.call(this,"origin");filterCallsByPath=o.call(this,"path");filterCallsByHash=o.call(this,"hash");filterCallsByFullUrl=o.call(this,"fullUrl");filterCallsByMethod=o.call(this,"method");clear(){this.logs=[]}[r](e){let t=new c(e);return this.logs.push(t),t}*[Symbol.iterator](){for(let e of this.calls())yield e}}t.exports.MockCallHistory=d,t.exports.MockCallHistoryLog=c},509805,(e,t,i)=>{"use strict";let{promisify:r}=e.r(812057),n=e.r(682850),{buildMockDispatch:s}=e.r(682708),{kDispatches:a,kMockAgent:o,kClose:l,kOriginalClose:c,kOrigin:d,kOriginalDispatch:u,kConnected:h,kIgnoreTrailingSlash:A}=e.r(688525),{MockInterceptor:p}=e.r(862710),f=e.r(954673),{InvalidArgumentError:g}=e.r(450178);class m extends n{constructor(e,t){if(!t||!t.agent||"function"!=typeof t.agent.dispatch)throw new g("Argument opts.agent must implement Agent");super(e,t),this[o]=t.agent,this[d]=e,this[A]=t.ignoreTrailingSlash??!1,this[a]=[],this[h]=1,this[u]=this.dispatch,this[c]=this.close.bind(this),this.dispatch=s.call(this),this.close=this[l]}get[f.kConnected](){return this[h]}intercept(e){return new p(e&&{ignoreTrailingSlash:this[A],...e},this[a])}cleanMocks(){this[a]=[]}async [l](){await r(this[c])(),this[h]=0,this[o][f.kClients].delete(this[d])}}t.exports=m},200781,(e,t,i)=>{"use strict";let{Transform:r}=e.r(81111),{Console:n}=e.r(241293),s=process.versions.icu?"✅":"Y ",a=process.versions.icu?"❌":"N ";t.exports=class{constructor({disableColors:e}={}){this.transform=new r({transform(e,t,i){i(null,e)}}),this.logger=new n({stdout:this.transform,inspectOptions:{colors:!e&&!process.env.CI}})}format(e){let t=e.map(({method:e,path:t,data:{statusCode:i},persist:r,times:n,timesInvoked:o,origin:l})=>({Method:e,Origin:l,Path:t,"Status code":i,Persistent:r?s:a,Invocations:o,Remaining:r?1/0:n-o}));return this.logger.table(t),this.transform.read().toString()}}},665015,(e,t,i)=>{"use strict";let{kClients:r}=e.r(954673),n=e.r(542122),{kAgent:s,kMockAgentSet:a,kMockAgentGet:o,kDispatches:l,kIsMockActive:c,kNetConnect:d,kGetNetConnect:u,kOptions:h,kFactory:A,kMockAgentRegisterCallHistory:p,kMockAgentIsCallHistoryEnabled:f,kMockAgentAddCallHistoryLog:g,kMockAgentMockCallHistoryInstance:m,kMockAgentAcceptsNonStandardSearchParameters:y,kMockCallHistoryAddLog:b,kIgnoreTrailingSlash:E}=e.r(688525),C=e.r(102729),w=e.r(509805),{matchValue:I,normalizeSearchParams:v,buildAndValidateMockOptions:B,normalizeOrigin:Q}=e.r(682708),{InvalidArgumentError:x,UndiciError:S}=e.r(450178),k=e.r(10918),T=e.r(200781),{MockCallHistory:N}=e.r(406177);class D extends k{constructor(e={}){super(e);const t=B(e);if(this[d]=!0,this[c]=!0,this[f]=t.enableCallHistory??!1,this[y]=t.acceptNonStandardSearchParameters??!1,this[E]=t.ignoreTrailingSlash??!1,e?.agent&&"function"!=typeof e.agent.dispatch)throw new x("Argument opts.agent must implement Agent");const i=e?.agent?e.agent:new n(e);this[s]=i,this[r]=i[r],this[h]=t,this[f]&&this[p]()}get(e){let t=Q(e),i=this[E]?t.replace(/\/$/,""):t,r=this[o](i);return r||(r=this[A](i),this[a](i,r)),r}dispatch(e,t){e.origin=Q(e.origin),this.get(e.origin),this[g](e);let i=this[y],r={...e};if(i&&r.path){let[e,t]=r.path.split("?"),n=v(t,i);r.path=`${e}?${n}`}return this[s].dispatch(r,t)}async close(){this.clearCallHistory(),await this[s].close(),this[r].clear()}deactivate(){this[c]=!1}activate(){this[c]=!0}enableNetConnect(e){if("string"==typeof e||"function"==typeof e||e instanceof RegExp)Array.isArray(this[d])?this[d].push(e):this[d]=[e];else if(void 0===e)this[d]=!0;else throw new x("Unsupported matcher. Must be one of String|Function|RegExp.")}disableNetConnect(){this[d]=!1}enableCallHistory(){return this[f]=!0,this}disableCallHistory(){return this[f]=!1,this}getCallHistory(){return this[m]}clearCallHistory(){void 0!==this[m]&&this[m].clear()}get isMockActive(){return this[c]}[p](){void 0===this[m]&&(this[m]=new N)}[g](e){this[f]&&(this[p](),this[m][b](e))}[a](e,t){this[r].set(e,{count:0,dispatcher:t})}[A](e){let t=Object.assign({agent:this},this[h]);return this[h]&&1===this[h].connections?new C(e,t):new w(e,t)}[o](e){let t=this[r].get(e);if(t?.dispatcher)return t.dispatcher;if("string"!=typeof e){let t=this[A]("http://localhost:9999");return this[a](e,t),t}for(let[t,i]of Array.from(this[r]))if(i&&"string"!=typeof t&&I(t,e)){let t=this[A](e);return this[a](e,t),t[l]=i.dispatcher[l],t}}[u](){return this[d]}pendingInterceptors(){return Array.from(this[r].entries()).flatMap(([e,t])=>t.dispatcher[l].map(t=>({...t,origin:e}))).filter(({pending:e})=>e)}assertNoPendingInterceptors({pendingInterceptorsFormatter:e=new T}={}){let t=this.pendingInterceptors();if(0!==t.length)throw new S(1===t.length?`1 interceptor is pending:
|
||
|
||
${e.format(t)}`.trim():`${t.length} interceptors are pending:
|
||
|
||
${e.format(t)}`.trim())}}t.exports=D},38544,(e,t,i)=>{"use strict";let{InvalidArgumentError:r}=e.r(450178),{runtimeFeatures:n}=e.r(350022);function s(e={}){let{ignoreHeaders:t=[],excludeHeaders:i=[],matchHeaders:r=[],caseSensitive:n=!1}=e;return{ignore:new Set(t.map(e=>n?e:e.toLowerCase())),exclude:new Set(i.map(e=>n?e:e.toLowerCase())),match:new Set(r.map(e=>n?e:e.toLowerCase()))}}let a=n.has("crypto")?e.r(666680):null,o=a?.hash?e=>a.hash("sha256",e,"base64url"):e=>Buffer.from(e).toString("base64url");function l(e){return Array.isArray(e)&&(1&e.length)==0}function c(e){let t={};if(!e)return t;if(l(e)){for(let i=0;i<e.length;i+=2){let r=e[i],n=e[i+1];if(r&&void 0!==n){let e=Buffer.isBuffer(r)?r.toString():r,i=Buffer.isBuffer(n)?n.toString():n;t[e.toLowerCase()]=i}}return t}if(e&&"object"==typeof e)for(let[i,r]of Object.entries(e))i&&"string"==typeof i&&(t[i.toLowerCase()]=Array.isArray(r)?r.join(", "):String(r));return t}let d=["record","playback","update"];t.exports={createHeaderFilters:s,hashId:o,isUndiciHeaders:l,normalizeHeaders:c,isUrlExcludedFactory:function(e=[]){return 0===e.length?()=>!1:function(t){let i;for(let r of e)if("string"==typeof r){if(i||(i=t.toLowerCase()),i.includes(r.toLowerCase()))return!0}else if(r instanceof RegExp&&r.test(t))return!0;return!1}},validateSnapshotMode:function(e){if(!d.includes(e))throw new r(`Invalid snapshot mode: ${e}. Must be one of: ${d.join(", ")}`)}}},466020,(e,t,i)=>{"use strict";let{writeFile:r,readFile:n,mkdir:s}=e.r(912714),{dirname:a,resolve:o}=e.r(750227),{setTimeout:l,clearTimeout:c}=e.r(26910),{InvalidArgumentError:d,UndiciError:u}=e.r(450178),{hashId:h,isUrlExcludedFactory:A,normalizeHeaders:p,createHeaderFilters:f}=e.r(38544);function g(e,t,i={}){let r=new URL(e.path,e.origin),n=e._normalizedHeaders||p(e.headers);return e._normalizedHeaders||(e._normalizedHeaders=n),{method:e.method||"GET",url:!1!==i.matchQuery?r.toString():`${r.origin}${r.pathname}`,headers:m(n,t,i),body:!1!==i.matchBody&&e.body?String(e.body):""}}function m(e,t,i={}){if(!e||"object"!=typeof e)return{};let{caseSensitive:r=!1}=i,n={},{ignore:s,exclude:a,match:o}=t;for(let[t,i]of Object.entries(e)){let e=r?t:t.toLowerCase();!(a.has(e)||s.has(e))&&(0===o.size||o.has(e))&&(n[e]=i)}return n}function y(e,t,i={}){if(!e||"object"!=typeof e)return{};let{caseSensitive:r=!1}=i,n={},{exclude:s}=t;for(let[t,i]of Object.entries(e)){let e=r?t:t.toLowerCase();s.has(e)||(n[e]=i)}return n}function b(e){let t=[e.method,e.url];if(e.headers&&"object"==typeof e.headers)for(let i of Object.keys(e.headers).sort()){let r=Array.isArray(e.headers[i])?e.headers[i]:[e.headers[i]];for(let e of(t.push(i),r.sort()))t.push(String(e))}return t.push(e.body),h(t.join("|"))}class E{#B;#Q;#x=new Map;#S;#k=1/0;#T=!1;#N;constructor(e={}){this.#S=e.snapshotPath,this.#k=e.maxSnapshots||1/0,this.#T=e.autoFlush||!1,this.flushInterval=e.flushInterval||3e4,this._flushTimer=null,this.matchOptions={matchHeaders:e.matchHeaders||[],ignoreHeaders:e.ignoreHeaders||[],excludeHeaders:e.excludeHeaders||[],matchBody:!1!==e.matchBody,matchQuery:!1!==e.matchQuery,caseSensitive:e.caseSensitive||!1},this.#N=f(this.matchOptions),this.shouldRecord=e.shouldRecord||(()=>!0),this.shouldPlayback=e.shouldPlayback||(()=>!0),this.#Q=A(e.excludeUrls),this.#T&&this.#S&&this.#D()}async record(e,t){if(!this.shouldRecord(e)||this.isUrlExcluded(e))return;let i=g(e,this.#N,this.matchOptions),r=b(i),n=p(t.headers),s={statusCode:t.statusCode,headers:y(n,this.#N,this.matchOptions),body:Buffer.isBuffer(t.body)?t.body.toString("base64"):Buffer.from(String(t.body||"")).toString("base64"),trailers:t.trailers};if(this.#x.size>=this.#k&&!this.#x.has(r)){let e=this.#x.keys().next().value;this.#x.delete(e)}let a=this.#x.get(r);a&&a.responses?(a.responses.push(s),a.timestamp=new Date().toISOString()):this.#x.set(r,{request:i,responses:[s],callCount:0,timestamp:new Date().toISOString()}),this.#T&&this.#S&&this.#_()}isUrlExcluded(e){let t=new URL(e.path,e.origin).toString();return this.#Q(t)}findSnapshot(e){if(!this.shouldPlayback(e)||this.isUrlExcluded(e))return;let t=b(g(e,this.#N,this.matchOptions)),i=this.#x.get(t);if(!i)return;let r=i.callCount||0,n=Math.min(r,i.responses.length-1);return i.callCount=r+1,{...i,response:i.responses[n]}}async loadSnapshots(e){let t=e||this.#S;if(!t)throw new d("Snapshot path is required");try{let e=await n(o(t),"utf8"),i=JSON.parse(e);if(Array.isArray(i))for(let{hash:e,snapshot:t}of(this.#x.clear(),i))this.#x.set(e,t);else this.#x=new Map(Object.entries(i))}catch(e){if("ENOENT"===e.code)this.#x.clear();else throw new u(`Failed to load snapshots from ${t}`,{cause:e})}}async saveSnapshots(e){let t=e||this.#S;if(!t)throw new d("Snapshot path is required");let i=o(t);await s(a(i),{recursive:!0});let n=Array.from(this.#x.entries()).map(([e,t])=>({hash:e,snapshot:t}));await r(i,JSON.stringify(n,null,2),{flush:!0})}clear(){this.#x.clear()}getSnapshots(){return Array.from(this.#x.values())}size(){return this.#x.size}resetCallCounts(){for(let e of this.#x.values())e.callCount=0}deleteSnapshot(e){let t=b(g(e,this.#N,this.matchOptions));return this.#x.delete(t)}getSnapshotInfo(e){let t=b(g(e,this.#N,this.matchOptions)),i=this.#x.get(t);return i?{hash:t,request:i.request,responseCount:i.responses?i.responses.length:+!!i.response,callCount:i.callCount||0,timestamp:i.timestamp}:null}replaceSnapshots(e){if(this.#x.clear(),Array.isArray(e))for(let{hash:t,snapshot:i}of e)this.#x.set(t,i);else e&&"object"==typeof e&&(this.#x=new Map(Object.entries(e)))}#D(){return this.#_()}#R(){this.#B&&(c(this.#B),this.saveSnapshots().catch(()=>{}),this.#B=null)}#_(){this.#B=l(()=>{this.saveSnapshots().catch(()=>{}),this.#T?this.#B?.refresh():this.#B=null},1e3)}destroy(){this.#R(),this.#B&&(c(this.#B),this.#B=null)}async close(){this.#S&&0!==this.#x.size&&await this.saveSnapshots(),this.destroy()}}t.exports={SnapshotRecorder:E,formatRequestKey:g,createRequestHash:b,filterHeadersForMatching:m,filterHeadersForStorage:y,createHeaderFilters:f}},525281,(e,t,i)=>{"use strict";let r=e.r(542122),n=e.r(665015),{SnapshotRecorder:s}=e.r(466020),a=e.r(54128),{InvalidArgumentError:o,UndiciError:l}=e.r(450178),{validateSnapshotMode:c}=e.r(38544),d=Symbol("kSnapshotRecorder"),u=Symbol("kSnapshotMode"),h=Symbol("kSnapshotPath"),A=Symbol("kSnapshotLoaded"),p=Symbol("kRealAgent"),f=!1;class g extends n{constructor(e={}){f||(process.emitWarning("SnapshotAgent is experimental and subject to change","ExperimentalWarning"),f=!0);const{mode:t="record",snapshotPath:i=null,...n}=e;if(super(n),c(t),("playback"===t||"update"===t)&&!i)throw new o(`snapshotPath is required when mode is '${t}'`);this[u]=t,this[h]=i,this[d]=new s({snapshotPath:this[h],mode:this[u],maxSnapshots:e.maxSnapshots,autoFlush:e.autoFlush,flushInterval:e.flushInterval,matchHeaders:e.matchHeaders,ignoreHeaders:e.ignoreHeaders,excludeHeaders:e.excludeHeaders,matchBody:e.matchBody,matchQuery:e.matchQuery,caseSensitive:e.caseSensitive,shouldRecord:e.shouldRecord,shouldPlayback:e.shouldPlayback,excludeUrls:e.excludeUrls}),this[A]=!1,("record"===this[u]||"update"===this[u]||"playback"===this[u]&&e.excludeUrls&&e.excludeUrls.length>0)&&(this[p]=new r(e)),("playback"===this[u]||"update"===this[u])&&this[h]&&this.loadSnapshots().catch(()=>{})}dispatch(e,t){t=a.wrap(t);let i=this[u];if(this[d].isUrlExcluded(e))return this[p].dispatch(e,t);if("playback"===i||"update"===i){if(!this[A])return this.#L(e,t);let r=this[d].findSnapshot(e);if(r)return this.#F(r,t);{if("update"===i)return this.#M(e,t);let r=new l(`No snapshot found for ${e.method||"GET"} ${e.path}`);if(t.onError)return void t.onError(r);throw r}}if("record"===i)return this.#M(e,t)}async #L(e,t){return await this.loadSnapshots(),this.dispatch(e,t)}#M(e,t){let i={statusCode:null,headers:{},trailers:{},body:[]},r=this,n={onRequestStart(e,i){return t.onRequestStart(e,{...i,history:this.history})},onRequestUpgrade:(e,i,r,n)=>t.onRequestUpgrade(e,i,r,n),onResponseStart:(e,r,n,s)=>(i.statusCode=r,i.headers=n,t.onResponseStart(e,r,n,s)),onResponseData:(e,r)=>(i.body.push(r),t.onResponseData(e,r)),onResponseEnd(n,s){i.trailers=s;let a=Buffer.concat(i.body);r[d].record(e,{statusCode:i.statusCode,headers:i.headers,body:a,trailers:i.trailers}).then(()=>t.onResponseEnd(n,s)).catch(e=>t.onResponseError(n,e))}};return this[p].dispatch(e,n)}#F(e,t){try{let{response:i}=e,r={pause(){},resume(){},abort(e){this.aborted=!0,this.reason=e},aborted:!1,paused:!1};t.onRequestStart(r),t.onResponseStart(r,i.statusCode,i.headers);let n=Buffer.from(i.body,"base64");t.onResponseData(r,n),t.onResponseEnd(r,i.trailers)}catch(e){t.onError?.(e)}}async loadSnapshots(e){await this[d].loadSnapshots(e||this[h]),this[A]=!0,"playback"===this[u]&&this.#O()}async saveSnapshots(e){return this[d].saveSnapshots(e||this[h])}#O(){for(let e of this[d].getSnapshots()){let{request:t,responses:i,response:r}=e,n=new URL(t.url),s=this.get(n.origin),a=i?i[0]:r;a&&s.intercept({path:n.pathname+n.search,method:t.method,headers:t.headers,body:t.body}).reply(a.statusCode,a.body,{headers:a.headers,trailers:a.trailers}).persist()}}getRecorder(){return this[d]}getMode(){return this[u]}clearSnapshots(){this[d].clear()}resetCallCounts(){this[d].resetCallCounts()}deleteSnapshot(e){return this[d].deleteSnapshot(e)}getSnapshotInfo(e){return this[d].getSnapshotInfo(e)}replaceSnapshots(e){this[d].replaceSnapshots(e)}async close(){await this[d].close(),await this[p]?.close(),await super.close()}}t.exports=g},312706,(e,t,i)=>{"use strict";let r=Symbol.for("undici.globalDispatcher.1"),{InvalidArgumentError:n}=e.r(450178),s=e.r(542122);function a(e){if(!e||"function"!=typeof e.dispatch)throw new n("Argument agent must implement Agent");Object.defineProperty(globalThis,r,{value:e,writable:!0,enumerable:!1,configurable:!1})}function o(){return globalThis[r]}void 0===o()&&a(new s),t.exports={setGlobalDispatcher:a,getGlobalDispatcher:o,installedExports:["fetch","Headers","Response","Request","FormData","WebSocket","CloseEvent","ErrorEvent","MessageEvent","EventSource"]}},201443,(e,t,i)=>{"use strict";let r=e.r(57328),n=e.r(54128);t.exports=class{#t;#U=!1;#P=!1;#$=!1;constructor(e){if("object"!=typeof e||null===e)throw TypeError("handler must be an object");this.#t=n.wrap(e)}onRequestStart(...e){this.#t.onRequestStart?.(...e)}onRequestUpgrade(...e){return r(!this.#U),r(!this.#P),this.#t.onRequestUpgrade?.(...e)}onResponseStart(...e){return r(!this.#U),r(!this.#P),r(!this.#$),this.#$=!0,this.#t.onResponseStart?.(...e)}onResponseData(...e){return r(!this.#U),r(!this.#P),this.#t.onResponseData?.(...e)}onResponseEnd(...e){return r(!this.#U),r(!this.#P),this.#U=!0,this.#t.onResponseEnd?.(...e)}onResponseError(...e){return this.#P=!0,this.#t.onResponseError?.(...e)}onBodySent(){}}},408050,(e,t,i)=>{"use strict";let r=e.r(122857),{kBodyUsed:n}=e.r(954673),s=e.r(57328),{InvalidArgumentError:a}=e.r(450178),o=e.r(687769),l=[300,301,302,303,307,308],c=Symbol("body"),d=()=>{};class u{constructor(e){this[c]=e,this[n]=!1}async *[Symbol.asyncIterator](){s(!this[n],"disturbed"),this[n]=!0,yield*this[c]}}class h{static buildDispatch(e,t){if(null!=t&&(!Number.isInteger(t)||t<0))throw new a("maxRedirections must be a positive number");let i=e.dispatch.bind(e);return(e,r)=>i(e,new h(i,t,e,r))}constructor(e,t,i,l){if(null!=t&&(!Number.isInteger(t)||t<0))throw new a("maxRedirections must be a positive number");this.dispatch=e,this.location=null;const{maxRedirections:c,...d}=i;this.opts=d,this.maxRedirections=t,this.handler=l,this.history=[],r.isStream(this.opts.body)?(0===r.bodyLength(this.opts.body)&&this.opts.body.on("data",function(){s(!1)}),"boolean"!=typeof this.opts.body.readableDidRead&&(this.opts.body[n]=!1,o.prototype.on.call(this.opts.body,"data",function(){this[n]=!0}))):this.opts.body&&"function"==typeof this.opts.body.pipeTo?this.opts.body=new u(this.opts.body):this.opts.body&&"string"!=typeof this.opts.body&&!ArrayBuffer.isView(this.opts.body)&&r.isIterable(this.opts.body)&&!r.isFormDataLike(this.opts.body)&&(this.opts.body=new u(this.opts.body))}onRequestStart(e,t){this.handler.onRequestStart?.(e,{...t,history:this.history})}onRequestUpgrade(e,t,i,r){this.handler.onRequestUpgrade?.(e,t,i,r)}onResponseStart(e,t,i,n){if(this.opts.throwOnMaxRedirect&&this.history.length>=this.maxRedirections)throw Error("max redirects");if((301===t||302===t)&&"POST"===this.opts.method&&(this.opts.method="GET",r.isStream(this.opts.body)&&r.destroy(this.opts.body.on("error",d)),this.opts.body=null),303===t&&"HEAD"!==this.opts.method&&(this.opts.method="GET",r.isStream(this.opts.body)&&r.destroy(this.opts.body.on("error",d)),this.opts.body=null),this.location=this.history.length>=this.maxRedirections||r.isDisturbed(this.opts.body)||-1===l.indexOf(t)?null:i.location,this.opts.origin&&this.history.push(new URL(this.opts.path,this.opts.origin)),!this.location)return void this.handler.onResponseStart?.(e,t,i,n);let{origin:s,pathname:o,search:c}=r.parseURL(new URL(this.location,this.opts.origin&&new URL(this.opts.path,this.opts.origin))),u=c?`${o}${c}`:o,h=`${s}${u}`;for(let e of this.history)if(e.toString()===h)throw new a(`Redirect loop detected. Cannot redirect to ${s}. This typically happens when using a Client or Pool with cross-origin redirects. Use an Agent for cross-origin redirects.`);this.opts.headers=p(this.opts.headers,303===t,this.opts.origin!==s),this.opts.path=u,this.opts.origin=s,this.opts.query=null}onResponseData(e,t){this.location||this.handler.onResponseData?.(e,t)}onResponseEnd(e,t){this.location?this.dispatch(this.opts,this):this.handler.onResponseEnd(e,t)}onResponseError(e,t){this.handler.onResponseError?.(e,t)}}function A(e,t,i){if(4===e.length)return"host"===r.headerNameToString(e);if(t&&r.headerNameToString(e).startsWith("content-"))return!0;if(i&&(13===e.length||6===e.length||19===e.length)){let t=r.headerNameToString(e);return"authorization"===t||"cookie"===t||"proxy-authorization"===t}return!1}function p(e,t,i){let n=[];if(Array.isArray(e))for(let r=0;r<e.length;r+=2)A(e[r],t,i)||n.push(e[r],e[r+1]);else if(e&&"object"==typeof e)for(let[s,a]of r.hasSafeIterator(e)?e:Object.entries(e))A(s,t,i)||n.push(s,a);else s(null==e,"headers must be an object or an array");return n}t.exports=h},539424,(e,t,i)=>{"use strict";let r=e.r(408050);t.exports=function({maxRedirections:e}={}){return t=>function(i,n){let{maxRedirections:s=e,...a}=i;if(null==s||0===s)return t(i,n);let o={...a},l=new r(t,s,o,n);return t(o,l)}}},391607,(e,t,i)=>{"use strict";let r=e.r(201443),{ResponseError:n}=e.r(450178);class s extends r{#j;#H;#q;#z;#V;constructor(e,{handler:t}){super(t)}#G(e){return 0===(this.#H??"").indexOf(e)}onRequestStart(e,t){return this.#j=0,this.#H=null,this.#q=null,this.#z=null,this.#V="",super.onRequestStart(e,t)}onResponseStart(e,t,i,r){if(this.#j=t,this.#z=i,this.#H=i["content-type"],this.#j<400)return super.onResponseStart(e,t,i,r);(this.#G("application/json")||this.#G("text/plain"))&&(this.#q=new TextDecoder("utf-8"))}onResponseData(e,t){if(this.#j<400)return super.onResponseData(e,t);this.#V+=this.#q?.decode(t,{stream:!0})??""}onResponseEnd(e,t){if(this.#j>=400){let t;if(this.#V+=this.#q?.decode(void 0,{stream:!1})??"",this.#G("application/json"))try{this.#V=JSON.parse(this.#V)}catch{}let i=Error.stackTraceLimit;Error.stackTraceLimit=0;try{t=new n("Response Error",this.#j,{body:this.#V,headers:this.#z})}finally{Error.stackTraceLimit=i}super.onResponseError(e,t)}else super.onResponseEnd(e,t)}onResponseError(e,t){super.onResponseError(e,t)}}t.exports=()=>e=>function(t,i){return e(t,new s(t,{handler:i}))}},27814,(e,t,i)=>{"use strict";let r=e.r(335221);t.exports=e=>t=>function(i,n){return t(i,new r({...i,retryOptions:{...e,...i.retryOptions}},{handler:n,dispatch:t}))}},234412,(e,t,i)=>{"use strict";let{InvalidArgumentError:r,RequestAbortedError:n}=e.r(450178),s=e.r(201443);class a extends s{#Y=1048576;#W=!1;#J=0;#a=null;aborted=!1;reason=!1;constructor({maxSize:e,signal:t},i){if(null!=e&&(!Number.isFinite(e)||e<1))throw new r("maxSize must be a number greater than 0");super(i),this.#Y=e??this.#Y}#s(e){this.aborted=!0,this.reason=e}onRequestStart(e,t){return e.abort=this.#s.bind(this),this.#a=e,super.onRequestStart(e,t)}onResponseStart(e,t,i,r){let s=i["content-length"];if(null!=s&&s>this.#Y)throw new n(`Response size (${s}) larger than maxSize (${this.#Y})`);return!0===this.aborted||super.onResponseStart(e,t,i,r)}onResponseError(e,t){this.#W||(t=this.#a?.reason??t,super.onResponseError(e,t))}onResponseData(e,t){return this.#J=this.#J+t.length,this.#J>=this.#Y&&(this.#W=!0,!0===this.aborted?super.onResponseError(e,this.reason):super.onResponseEnd(e,{})),!0}onResponseEnd(e,t){if(!this.#W){if(!0===this.#a.aborted)return void super.onResponseError(e,this.reason);super.onResponseEnd(e,t)}}}t.exports=function({maxSize:e}={maxSize:1048576}){return t=>function(i,r){let{dumpMaxSize:n=e}=i,s=new a({maxSize:n,signal:i.signal},r);return t(i,s)}}},884656,(e,t,i)=>{"use strict";let{isIP:r}=e.r(761095),{lookup:n}=e.r(495879),s=e.r(201443),{InvalidArgumentError:a,InformationalError:o}=e.r(450178),l=0x7fffffff;function c(e){let t=Object.getPrototypeOf(e);return Object.prototype.hasOwnProperty.call(e,Symbol.iterator)||null!=t&&t!==Object.prototype&&"function"==typeof e[Symbol.iterator]}function d(e){return"string"==typeof e&&"host"===e.toLowerCase()}function u(e){if(null==e)return null;if(Array.isArray(e)){if(0===e.length||!Array.isArray(e[0]))return e;let t=[];for(let i of e)Array.isArray(i)&&2===i.length?t.push(i[0],i[1]):t.push(i);return t}if("object"==typeof e&&c(e)){let t=[];for(let i of e)Array.isArray(i)&&2===i.length?t.push(i[0],i[1]):t.push(i);return t}return e}function h(e){if(null==e)return!1;if(Array.isArray(e)){if(0===e.length)return!1;for(let t=0;t<e.length;t+=2)if(d(e[t]))return!0;return!1}if("object"==typeof e){for(let t in e)if(d(t))return!0}return!1}function A(e,t){let i=u(t);return h(i)?i:Array.isArray(i)?["host",e,...i]:i&&"object"==typeof i?{host:e,...i}:{host:e}}class p{#K=0;#Z=new Map;constructor(e){this.#K=e.maxItems}get size(){return this.#Z.size}get(e){return this.#Z.get(e)??null}set(e,t){this.#Z.set(e,t)}delete(e){this.#Z.delete(e)}full(){return this.size>=this.#K}}class f{#X=0;#K=0;dualStack=!0;affinity=null;lookup=null;pick=null;storage=null;constructor(e){this.#X=e.maxTTL,this.#K=e.maxItems,this.dualStack=e.dualStack,this.affinity=e.affinity,this.lookup=e.lookup??this.#ee,this.pick=e.pick??this.#et,this.storage=e.storage??new p(e)}runLookup(e,t,i){let r=this.storage.get(e.hostname);if(null==r&&this.storage.full())return void i(null,e);let n={affinity:this.affinity,dualStack:this.dualStack,lookup:this.lookup,pick:this.pick,...t.dns,maxTTL:this.#X,maxItems:this.#K};if(null==r)this.lookup(e,n,(t,r)=>{let s;if(t||null==r||0===r.length)return void i(t??new o("No DNS entries found"));this.setRecords(e,r);let a=this.storage.get(e.hostname),l=this.pick(e,a,n.affinity);s="number"==typeof l.port?`:${l.port}`:""!==e.port?`:${e.port}`:"",i(null,new URL(`${e.protocol}//${6===l.family?`[${l.address}]`:l.address}${s}`))});else{let s,a=this.pick(e,r,n.affinity);if(null==a){this.storage.delete(e.hostname),this.runLookup(e,t,i);return}s="number"==typeof a.port?`:${a.port}`:""!==e.port?`:${e.port}`:"",i(null,new URL(`${e.protocol}//${6===a.family?`[${a.address}]`:a.address}${s}`))}}#ee(e,t,i){n(e.hostname,{all:!0,family:!1===this.dualStack?this.affinity:0,order:"ipv4first"},(e,t)=>{if(e)return i(e);let r=new Map;for(let e of t)r.set(`${e.address}:${e.family}`,e);i(null,r.values())})}#et(e,t,i){let r,n=null,{records:s,offset:a}=t;if(this.dualStack?(null==i&&(null==a||a===l?(t.offset=0,i=4):(t.offset++,i=(1&t.offset)==1?6:4)),r=null!=s[i]&&s[i].ips.length>0?s[i]:s[4===i?6:4]):r=s[i],null==r||0===r.ips.length)return n;null==r.offset||r.offset===l?r.offset=0:r.offset++;let o=r.offset%r.ips.length;return null==(n=r.ips[o]??null)?n:Date.now()-n.timestamp>n.ttl?(r.ips.splice(o,1),this.pick(e,t,i)):n}pickFamily(e,t){let i=this.storage.get(e.hostname)?.records;if(!i)return null;let r=i[t];if(!r)return null;null==r.offset||r.offset===l?r.offset=0:r.offset++;let n=r.offset%r.ips.length,s=r.ips[n]??null;return null==s||Date.now()-s.timestamp>s.ttl&&r.ips.splice(n,1),s}setRecords(e,t){let i=Date.now(),r={records:{4:null,6:null}},n=this.#X;for(let e of t){e.timestamp=i,"number"==typeof e.ttl?(e.ttl=Math.min(e.ttl,this.#X),n=Math.min(n,e.ttl)):e.ttl=this.#X;let t=r.records[e.family]??{ips:[]};t.ips.push(e),r.records[e.family]=t}this.storage.set(e.hostname,r,{ttl:n})}deleteRecords(e){this.storage.delete(e.hostname)}getHandler(e,t){return new g(this,e,t)}}class g extends s{#A=null;#y=null;#ei=null;#er=null;#a=null;#en=null;#es=!0;constructor(e,{origin:t,handler:i,dispatch:r,newOrigin:n},s){super(i),this.#er=t,this.#en=n,this.#y={...s},this.#A=e,this.#ei=r}onResponseError(e,t){switch(t.code){case"ETIMEDOUT":case"ECONNREFUSED":if(this.#A.dualStack){let i;if(!this.#es)return void super.onResponseError(e,t);this.#es=!1;let r="["===this.#en.hostname[0]?4:6,n=this.#A.pickFamily(this.#er,r);if(null==n)return void super.onResponseError(e,t);i="number"==typeof n.port?`:${n.port}`:""!==this.#er.port?`:${this.#er.port}`:"";let s={...this.#y,origin:`${this.#er.protocol}//${6===n.family?`[${n.address}]`:n.address}${i}`,headers:A(this.#er.host,this.#y.headers)};this.#ei(s,this);return}super.onResponseError(e,t);break;case"ENOTFOUND":this.#A.deleteRecords(this.#er),super.onResponseError(e,t);break;default:super.onResponseError(e,t)}}}t.exports=e=>{let t;if(e?.maxTTL!=null&&("number"!=typeof e?.maxTTL||e?.maxTTL<0))throw new a("Invalid maxTTL. Must be a positive number");if(e?.maxItems!=null&&("number"!=typeof e?.maxItems||e?.maxItems<1))throw new a("Invalid maxItems. Must be a positive number and greater than zero");if(e?.affinity!=null&&e?.affinity!==4&&e?.affinity!==6)throw new a("Invalid affinity. Must be either 4 or 6");if(e?.dualStack!=null&&"boolean"!=typeof e?.dualStack)throw new a("Invalid dualStack. Must be a boolean");if(e?.lookup!=null&&"function"!=typeof e?.lookup)throw new a("Invalid lookup. Must be a function");if(e?.pick!=null&&"function"!=typeof e?.pick)throw new a("Invalid pick. Must be a function");if(e?.storage!=null&&("function"!=typeof e?.storage?.get||"function"!=typeof e?.storage?.set||"function"!=typeof e?.storage?.full||"function"!=typeof e?.storage?.delete))throw new a("Invalid storage. Must be a object with methods: { get, set, full, delete }");let i=e?.dualStack??!0;t=i?e?.affinity??null:e?.affinity??4;let n=new f({maxTTL:e?.maxTTL??1e4,lookup:e?.lookup??null,pick:e?.pick??null,dualStack:i,affinity:t,maxItems:e?.maxItems??1/0,storage:e?.storage});return e=>function(t,i){let s=t.origin.constructor===URL?t.origin:new URL(t.origin);return 0!==r(s.hostname)?e(t,i):(n.runLookup(s,t,(r,a)=>{if(r)return i.onResponseError(null,r);e({...t,servername:s.hostname,origin:a.origin,headers:A(s.host,t.headers)},n.getHandler({origin:s,dispatch:e,handler:i,newOrigin:a},t))}),!0)}}},618763,(e,t,i)=>{"use strict";let{safeHTTPMethods:r,pathHasQueryOrFragment:n,hasSafeIterator:s}=e.r(122857),{serializePathWithQuery:a}=e.r(122857);t.exports={makeCacheKey:function(e){if(!e.origin)throw Error("opts.origin is undefined");let t=e.path||"/";return e.query&&!n(e.path)&&(t=a(t,e.query)),{origin:e.origin.toString(),method:e.method,path:t,headers:e.headers}},normalizeHeaders:function(e){let t;if(null==e.headers)t={};else if("object"==typeof e.headers)if(t={},s(e.headers))for(let i of e.headers){if(!Array.isArray(i))throw Error("opts.headers is not a valid header map");let[e,r]=i;if("string"!=typeof e||"string"!=typeof r)throw Error("opts.headers is not a valid header map");t[e.toLowerCase()]=r}else for(let i of Object.keys(e.headers))t[i.toLowerCase()]=e.headers[i];else throw Error("opts.headers is not an object");return t},assertCacheKey:function(e){if("object"!=typeof e)throw TypeError(`expected key to be object, got ${typeof e}`);for(let t of["origin","method","path"])if("string"!=typeof e[t])throw TypeError(`expected key.${t} to be string, got ${typeof e[t]}`);if(void 0!==e.headers&&"object"!=typeof e.headers)throw TypeError(`expected headers to be object, got ${typeof e}`)},assertCacheValue:function(e){if("object"!=typeof e)throw TypeError(`expected value to be object, got ${typeof e}`);for(let t of["statusCode","cachedAt","staleAt","deleteAt"])if("number"!=typeof e[t])throw TypeError(`expected value.${t} to be number, got ${typeof e[t]}`);if("string"!=typeof e.statusMessage)throw TypeError(`expected value.statusMessage to be string, got ${typeof e.statusMessage}`);if(null!=e.headers&&"object"!=typeof e.headers)throw TypeError(`expected value.rawHeaders to be object, got ${typeof e.headers}`);if(void 0!==e.vary&&"object"!=typeof e.vary)throw TypeError(`expected value.vary to be object, got ${typeof e.vary}`);if(void 0!==e.etag&&"string"!=typeof e.etag)throw TypeError(`expected value.etag to be string, got ${typeof e.etag}`)},parseCacheControlHeader:function(e){let t,i={};if(Array.isArray(e))for(let i of(t=[],e))t.push(...i.split(","));else t=e.split(",");for(let e=0;e<t.length;e++){let r,n,s=t[e].toLowerCase(),a=s.indexOf("=");switch(-1!==a?(r=s.substring(0,a).trimStart(),n=s.substring(a+1)):r=s.trim(),r){case"min-fresh":case"max-stale":case"max-age":case"s-maxage":case"stale-while-revalidate":case"stale-if-error":{if(void 0===n||" "===n[0])continue;n.length>=2&&'"'===n[0]&&'"'===n[n.length-1]&&(n=n.substring(1,n.length-1));let e=parseInt(n,10);if(e!=e||"max-age"===r&&r in i&&i[r]>=e)continue;i[r]=e;break}case"private":case"no-cache":if(n){if('"'===n[0]){let s=[n.substring(1)],a='"'===n[n.length-1];if(!a)for(let i=e+1;i<t.length;i++){let e=t[i],r=e.length;if(s.push(e.trim()),0!==r&&'"'===e[r-1]){a=!0;break}}if(a){let e=s[s.length-1];'"'===e[e.length-1]&&(e=e.substring(0,e.length-1),s[s.length-1]=e),r in i?i[r]=i[r].concat(s):i[r]=s}}else r in i?i[r]=i[r].concat(n):i[r]=[n];break}case"public":case"no-store":case"must-revalidate":case"proxy-revalidate":case"immutable":case"no-transform":case"must-understand":case"only-if-cached":if(n)continue;i[r]=!0;break;default:continue}}return i},parseVaryHeader:function(e,t){if("string"==typeof e&&e.includes("*"))return t;let i={};for(let r of"string"==typeof e?e.split(","):e){let e=r.trim().toLowerCase();i[e]=t[e]??null}return i},isEtagUsable:function(e){return!(e.length<=2)&&('"'===e[0]&&'"'===e[e.length-1]?!('"'===e[1]||e.startsWith('"W/')):!!e.startsWith('W/"')&&'"'===e[e.length-1]&&4!==e.length)},assertCacheMethods:function(e,t="CacheMethods"){if(!Array.isArray(e))throw TypeError(`expected type of ${t} needs to be an array, got ${null===e?"null":typeof e}`);if(0===e.length)throw TypeError(`${t} needs to have at least one method`);for(let i of e)if(!r.includes(i))throw TypeError(`element of ${t}-array needs to be one of following values: ${r.join(", ")}, got ${i}`)},assertCacheStore:function(e,t="CacheStore"){if("object"!=typeof e||null===e)throw TypeError(`expected type of ${t} to be a CacheStore, got ${null===e?"null":typeof e}`);for(let i of["get","createWriteStream","delete"])if("function"!=typeof e[i])throw TypeError(`${t} needs to have a \`${i}()\` function`)},makeDeduplicationKey:function(e,t){let i=`${e.origin}:${e.method}:${e.path}`;if(e.headers)for(let r of Object.keys(e.headers).sort()){if(t?.has(r.toLowerCase()))continue;let n=e.headers[r];i+=`:${r}=${Array.isArray(n)?n.join(","):n}`}return i}}},575749,(e,t,i)=>{"use strict";function r(e){if(29!==e.length||" "!==e[4]||" "!==e[7]||" "!==e[11]||" "!==e[16]||":"!==e[19]||":"!==e[22]||" "!==e[25]||"G"!==e[26]||"M"!==e[27]||"T"!==e[28])return;let t=-1;if("S"===e[0]&&"u"===e[1]&&"n"===e[2])t=0;else if("M"===e[0]&&"o"===e[1]&&"n"===e[2])t=1;else if("T"===e[0]&&"u"===e[1]&&"e"===e[2])t=2;else if("W"===e[0]&&"e"===e[1]&&"d"===e[2])t=3;else if("T"===e[0]&&"h"===e[1]&&"u"===e[2])t=4;else if("F"===e[0]&&"r"===e[1]&&"i"===e[2])t=5;else{if("S"!==e[0]||"a"!==e[1]||"t"!==e[2])return;t=6}let i=0;if("0"===e[5]){let t=e.charCodeAt(6);if(t<49||t>57)return;i=t-48}else{let t=e.charCodeAt(5);if(t<49||t>51)return;let r=e.charCodeAt(6);if(r<48||r>57)return;i=(t-48)*10+(r-48)}let r=-1;if("J"===e[8]&&"a"===e[9]&&"n"===e[10])r=0;else if("F"===e[8]&&"e"===e[9]&&"b"===e[10])r=1;else if("M"===e[8]&&"a"===e[9])if("r"===e[10])r=2;else{if("y"!==e[10])return;r=4}else if("J"===e[8])if("a"===e[9]&&"n"===e[10])r=0;else if("u"!==e[9])return;else if("n"===e[10])r=5;else{if("l"!==e[10])return;r=6}else if("A"===e[8])if("p"===e[9]&&"r"===e[10])r=3;else{if("u"!==e[9]||"g"!==e[10])return;r=7}else if("S"===e[8]&&"e"===e[9]&&"p"===e[10])r=8;else if("O"===e[8]&&"c"===e[9]&&"t"===e[10])r=9;else if("N"===e[8]&&"o"===e[9]&&"v"===e[10])r=10;else{if("D"!==e[8]||"e"!==e[9]||"c"!==e[10])return;r=11}let n=e.charCodeAt(12);if(n<48||n>57)return;let s=e.charCodeAt(13);if(s<48||s>57)return;let a=e.charCodeAt(14);if(a<48||a>57)return;let o=e.charCodeAt(15);if(o<48||o>57)return;let l=(n-48)*1e3+(s-48)*100+(a-48)*10+(o-48),c=0;if("0"===e[17]){let t=e.charCodeAt(18);if(t<48||t>57)return;c=t-48}else{let t=e.charCodeAt(17);if(t<48||t>50)return;let i=e.charCodeAt(18);if(i<48||i>57||50===t&&i>51)return;c=(t-48)*10+(i-48)}let d=0;if("0"===e[20]){let t=e.charCodeAt(21);if(t<48||t>57)return;d=t-48}else{let t=e.charCodeAt(20);if(t<48||t>53)return;let i=e.charCodeAt(21);if(i<48||i>57)return;d=(t-48)*10+(i-48)}let u=0;if("0"===e[23]){let t=e.charCodeAt(24);if(t<48||t>57)return;u=t-48}else{let t=e.charCodeAt(23);if(t<48||t>53)return;let i=e.charCodeAt(24);if(i<48||i>57)return;u=(t-48)*10+(i-48)}let h=new Date(Date.UTC(l,r,i,c,d,u));return h.getUTCDay()===t?h:void 0}function n(e){if(24!==e.length||" "!==e[7]||" "!==e[10]||" "!==e[19])return;let t=-1;if("S"===e[0]&&"u"===e[1]&&"n"===e[2])t=0;else if("M"===e[0]&&"o"===e[1]&&"n"===e[2])t=1;else if("T"===e[0]&&"u"===e[1]&&"e"===e[2])t=2;else if("W"===e[0]&&"e"===e[1]&&"d"===e[2])t=3;else if("T"===e[0]&&"h"===e[1]&&"u"===e[2])t=4;else if("F"===e[0]&&"r"===e[1]&&"i"===e[2])t=5;else{if("S"!==e[0]||"a"!==e[1]||"t"!==e[2])return;t=6}let i=-1;if("J"===e[4]&&"a"===e[5]&&"n"===e[6])i=0;else if("F"===e[4]&&"e"===e[5]&&"b"===e[6])i=1;else if("M"===e[4]&&"a"===e[5])if("r"===e[6])i=2;else{if("y"!==e[6])return;i=4}else if("J"===e[4])if("a"===e[5]&&"n"===e[6])i=0;else if("u"!==e[5])return;else if("n"===e[6])i=5;else{if("l"!==e[6])return;i=6}else if("A"===e[4])if("p"===e[5]&&"r"===e[6])i=3;else{if("u"!==e[5]||"g"!==e[6])return;i=7}else if("S"===e[4]&&"e"===e[5]&&"p"===e[6])i=8;else if("O"===e[4]&&"c"===e[5]&&"t"===e[6])i=9;else if("N"===e[4]&&"o"===e[5]&&"v"===e[6])i=10;else{if("D"!==e[4]||"e"!==e[5]||"c"!==e[6])return;i=11}let r=0;if(" "===e[8]){let t=e.charCodeAt(9);if(t<49||t>57)return;r=t-48}else{let t=e.charCodeAt(8);if(t<49||t>51)return;let i=e.charCodeAt(9);if(i<48||i>57)return;r=(t-48)*10+(i-48)}let n=0;if("0"===e[11]){let t=e.charCodeAt(12);if(t<48||t>57)return;n=t-48}else{let t=e.charCodeAt(11);if(t<48||t>50)return;let i=e.charCodeAt(12);if(i<48||i>57||50===t&&i>51)return;n=(t-48)*10+(i-48)}let s=0;if("0"===e[14]){let t=e.charCodeAt(15);if(t<48||t>57)return;s=t-48}else{let t=e.charCodeAt(14);if(t<48||t>53)return;let i=e.charCodeAt(15);if(i<48||i>57)return;s=(t-48)*10+(i-48)}let a=0;if("0"===e[17]){let t=e.charCodeAt(18);if(t<48||t>57)return;a=t-48}else{let t=e.charCodeAt(17);if(t<48||t>53)return;let i=e.charCodeAt(18);if(i<48||i>57)return;a=(t-48)*10+(i-48)}let o=e.charCodeAt(20);if(o<48||o>57)return;let l=e.charCodeAt(21);if(l<48||l>57)return;let c=e.charCodeAt(22);if(c<48||c>57)return;let d=e.charCodeAt(23);if(d<48||d>57)return;let u=new Date(Date.UTC((o-48)*1e3+(l-48)*100+(c-48)*10+(d-48),i,r,n,s,a));return u.getUTCDay()===t?u:void 0}function s(e){let t=-1,i=-1;if("S"===e[0])"u"===e[1]&&"n"===e[2]&&"d"===e[3]&&"a"===e[4]&&"y"===e[5]?(i=0,t=6):"a"===e[1]&&"t"===e[2]&&"u"===e[3]&&"r"===e[4]&&"d"===e[5]&&"a"===e[6]&&"y"===e[7]&&(i=6,t=8);else if("M"===e[0]&&"o"===e[1]&&"n"===e[2]&&"d"===e[3]&&"a"===e[4]&&"y"===e[5])i=1,t=6;else if("T"===e[0])"u"===e[1]&&"e"===e[2]&&"s"===e[3]&&"d"===e[4]&&"a"===e[5]&&"y"===e[6]?(i=2,t=7):"h"===e[1]&&"u"===e[2]&&"r"===e[3]&&"s"===e[4]&&"d"===e[5]&&"a"===e[6]&&"y"===e[7]&&(i=4,t=8);else if("W"===e[0]&&"e"===e[1]&&"d"===e[2]&&"n"===e[3]&&"e"===e[4]&&"s"===e[5]&&"d"===e[6]&&"a"===e[7]&&"y"===e[8])i=3,t=9;else{if("F"!==e[0]||"r"!==e[1]||"i"!==e[2]||"d"!==e[3]||"a"!==e[4]||"y"!==e[5])return;i=5,t=6}if(","!==e[t]||e.length-t-1!=23||" "!==e[t+1]||"-"!==e[t+4]||"-"!==e[t+8]||" "!==e[t+11]||":"!==e[t+14]||":"!==e[t+17]||" "!==e[t+20]||"G"!==e[t+21]||"M"!==e[t+22]||"T"!==e[t+23])return;let r=0;if("0"===e[t+2]){let i=e.charCodeAt(t+3);if(i<49||i>57)return;r=i-48}else{let i=e.charCodeAt(t+2);if(i<49||i>51)return;let n=e.charCodeAt(t+3);if(n<48||n>57)return;r=(i-48)*10+(n-48)}let n=-1;if("J"===e[t+5]&&"a"===e[t+6]&&"n"===e[t+7])n=0;else if("F"===e[t+5]&&"e"===e[t+6]&&"b"===e[t+7])n=1;else if("M"===e[t+5]&&"a"===e[t+6]&&"r"===e[t+7])n=2;else if("A"===e[t+5]&&"p"===e[t+6]&&"r"===e[t+7])n=3;else if("M"===e[t+5]&&"a"===e[t+6]&&"y"===e[t+7])n=4;else if("J"===e[t+5]&&"u"===e[t+6]&&"n"===e[t+7])n=5;else if("J"===e[t+5]&&"u"===e[t+6]&&"l"===e[t+7])n=6;else if("A"===e[t+5]&&"u"===e[t+6]&&"g"===e[t+7])n=7;else if("S"===e[t+5]&&"e"===e[t+6]&&"p"===e[t+7])n=8;else if("O"===e[t+5]&&"c"===e[t+6]&&"t"===e[t+7])n=9;else if("N"===e[t+5]&&"o"===e[t+6]&&"v"===e[t+7])n=10;else{if("D"!==e[t+5]||"e"!==e[t+6]||"c"!==e[t+7])return;n=11}let s=e.charCodeAt(t+9);if(s<48||s>57)return;let a=e.charCodeAt(t+10);if(a<48||a>57)return;let o=(s-48)*10+(a-48);o+=o<70?2e3:1900;let l=0;if("0"===e[t+12]){let i=e.charCodeAt(t+13);if(i<48||i>57)return;l=i-48}else{let i=e.charCodeAt(t+12);if(i<48||i>50)return;let r=e.charCodeAt(t+13);if(r<48||r>57||50===i&&r>51)return;l=(i-48)*10+(r-48)}let c=0;if("0"===e[t+15]){let i=e.charCodeAt(t+16);if(i<48||i>57)return;c=i-48}else{let i=e.charCodeAt(t+15);if(i<48||i>53)return;let r=e.charCodeAt(t+16);if(r<48||r>57)return;c=(i-48)*10+(r-48)}let d=0;if("0"===e[t+18]){let i=e.charCodeAt(t+19);if(i<48||i>57)return;d=i-48}else{let i=e.charCodeAt(t+18);if(i<48||i>53)return;let r=e.charCodeAt(t+19);if(r<48||r>57)return;d=(i-48)*10+(r-48)}let u=new Date(Date.UTC(o,n,r,l,c,d));return u.getUTCDay()===i?u:void 0}t.exports={parseHttpDate:function(e){switch(e[3]){case",":return r(e);case" ":return n(e);default:return s(e)}}}},620645,(e,t,i)=>{"use strict";let r=e.r(122857),{parseCacheControlHeader:n,parseVaryHeader:s,isEtagUsable:a}=e.r(618763),{parseHttpDate:o}=e.r(575749);function l(){}let c=[200,203,204,206,300,301,308,404,405,410,414,501],d=[206],u=2147483647e3;class h{#ea;#eo;#el;#ec;#t;#ed;constructor({store:e,type:t,cacheByDefault:i},r,n){this.#ec=e,this.#eo=t,this.#el=i,this.#ea=r,this.#t=n}onRequestStart(e,t){this.#ed?.destroy(),this.#ed=void 0,this.#t.onRequestStart?.(e,t)}onRequestUpgrade(e,t,i,r){this.#t.onRequestUpgrade?.(e,t,i,r)}onResponseStart(e,t,i,d){let h,y=()=>this.#t.onResponseStart?.(e,t,i,d),b=this;if(!r.safeHTTPMethods.includes(this.#ea.method)&&t>=200&&t<=399){try{this.#ec.delete(this.#ea)?.catch?.(l)}catch{}return y()}let E=i["cache-control"],C=i["last-modified"]&&c.includes(t);if(!E&&!i.expires&&!C&&!this.#el)return y();let w=E?n(E):{};if(!A(this.#eo,t,i,w))return y();let I=Date.now(),v=i.age?p(i.age):void 0;if(v&&v>=u)return y();let B="string"==typeof i.date?o(i.date):void 0,Q=f(this.#eo,I,v,i,B,w)??this.#el;if(void 0===Q||v&&v>Q)return y();let x=B?B.getTime():I,S=Q+x;if(I>=S||this.#ea.headers&&i.vary&&!(h=s(i.vary,this.#ea.headers)))return y();let k=g(x,w,S),T=m(i,w),N={statusCode:t,statusMessage:d,headers:T,vary:h,cacheControlDirectives:w,cachedAt:v?I-v:I,staleAt:S,deleteAt:k};if(304===t){let t=t=>{if(!t)return y();if(N.statusCode=t.statusCode,N.statusMessage=t.statusMessage,N.etag=t.etag,N.headers={...t.headers,...T},y(),this.#ed=this.#ec.createWriteStream(this.#ea,N),this.#ed&&t?.body)if("function"==typeof t.body.values){let i=t.body.values(),r=()=>{for(let t of i){let i=!1===this.#ed.write(t);if(this.#t.onResponseData?.(e,t),i)break}};this.#ed.on("error",function(){b.#ed=void 0,b.#ec.delete(b.#ea)}).on("drain",()=>{r()}).on("close",function(){b.#ed===this&&(b.#ed=void 0)}),r()}else"function"==typeof t.body.on&&(t.body.on("data",t=>{this.#ed.write(t),this.#t.onResponseData?.(e,t)}).on("end",()=>{this.#ed.end()}).on("error",()=>{this.#ed=void 0,this.#ec.delete(this.#ea)}),this.#ed.on("error",function(){b.#ed=void 0,b.#ec.delete(b.#ea)}).on("close",function(){b.#ed===this&&(b.#ed=void 0)}))},i=this.#ec.get(this.#ea);i&&"function"==typeof i.then?i.then(t):t(i)}else{if("string"==typeof i.etag&&a(i.etag)&&(N.etag=i.etag),this.#ed=this.#ec.createWriteStream(this.#ea,N),!this.#ed)return y();this.#ed.on("drain",()=>e.resume()).on("error",function(){b.#ed=void 0,b.#ec.delete(b.#ea)}).on("close",function(){b.#ed===this&&(b.#ed=void 0),e.resume()}),y()}}onResponseData(e,t){this.#ed?.write(t)===!1&&e.pause(),this.#t.onResponseData?.(e,t)}onResponseEnd(e,t){this.#ed?.end(),this.#t.onResponseEnd?.(e,t)}onResponseError(e,t){this.#ed?.destroy(t),this.#ed=void 0,this.#t.onResponseError?.(e,t)}}function A(e,t,i,r){return!(t<200||d.includes(t)||!c.includes(t)&&!i.expires&&!r.public&&void 0===r["max-age"]&&!(r.private&&"private"===e)&&(void 0===r["s-maxage"]||"shared"!==e)||r["no-store"]||"shared"===e&&!0===r.private||i.vary?.includes("*")||i.authorization&&(!r.public||"string"!=typeof i.authorization||Array.isArray(r["no-cache"])&&r["no-cache"].includes("authorization")||Array.isArray(r.private)&&r.private.includes("authorization")))&&!0}function p(e){let t=parseInt(Array.isArray(e)?e[0]:e);return isNaN(t)?void 0:1e3*t}function f(e,t,i,r,n,s){if("shared"===e){let e=s["s-maxage"];if(void 0!==e)return e>0?1e3*e:void 0}let a=s["max-age"];if(void 0!==a)return a>0?1e3*a:void 0;if("string"==typeof r.expires){let e=o(r.expires);if(e){if(t>=e.getTime()||n&&(n>=e||void 0!==i&&i>e-n))return;return e.getTime()-t}}if("string"==typeof r["last-modified"]){let e=new Date(r["last-modified"]);if(y(e)){if(e.getTime()>=t)return;return .1*(t-e.getTime())}}if(s.immutable)return 31536e3}function g(e,t,i){let r=-1/0,n=-1/0,s=-1/0;return t["stale-while-revalidate"]&&(r=i+1e3*t["stale-while-revalidate"]),t["stale-if-error"]&&(n=i+1e3*t["stale-if-error"]),r===-1/0&&n===-1/0&&(s=e+31536e6),Math.max(i,r,n,s)}function m(e,t){let i,r=["connection","proxy-authenticate","proxy-authentication-info","proxy-authorization","proxy-connection","te","transfer-encoding","upgrade","age"];for(let n of(e.connection&&(Array.isArray(e.connection)?r.push(...e.connection.map(e=>e.trim())):r.push(...e.connection.split(",").map(e=>e.trim()))),Array.isArray(t["no-cache"])&&r.push(...t["no-cache"]),Array.isArray(t.private)&&r.push(...t.private),r))e[n]&&(i??={...e},delete i[n]);return i??e}function y(e){return e instanceof Date&&Number.isFinite(e.valueOf())}t.exports=h},29867,(e,t,i)=>{"use strict";let{Writable:r}=e.r(81111),{EventEmitter:n}=e.r(687769),{assertCacheKey:s,assertCacheValue:a}=e.r(618763);class o extends n{#eu=1024;#Y=0x6400000;#eh=5242880;#J=0;#eA=0;#ep=new Map;#ef=!1;constructor(e){if(super(),e){if("object"!=typeof e)throw TypeError("MemoryCacheStore options must be an object");if(void 0!==e.maxCount){if("number"!=typeof e.maxCount||!Number.isInteger(e.maxCount)||e.maxCount<0)throw TypeError("MemoryCacheStore options.maxCount must be a non-negative integer");this.#eu=e.maxCount}if(void 0!==e.maxSize){if("number"!=typeof e.maxSize||!Number.isInteger(e.maxSize)||e.maxSize<0)throw TypeError("MemoryCacheStore options.maxSize must be a non-negative integer");this.#Y=e.maxSize}if(void 0!==e.maxEntrySize){if("number"!=typeof e.maxEntrySize||!Number.isInteger(e.maxEntrySize)||e.maxEntrySize<0)throw TypeError("MemoryCacheStore options.maxEntrySize must be a non-negative integer");this.#eh=e.maxEntrySize}}}get size(){return this.#J}isFull(){return this.#J>=this.#Y||this.#eA>=this.#eu}get(e){s(e);let t=`${e.origin}:${e.path}`,i=Date.now(),r=this.#ep.get(t),n=r?l(e,r,i):null;return null==n?void 0:{statusMessage:n.statusMessage,statusCode:n.statusCode,headers:n.headers,body:n.body,vary:n.vary?n.vary:void 0,etag:n.etag,cacheControlDirectives:n.cacheControlDirectives,cachedAt:n.cachedAt,staleAt:n.staleAt,deleteAt:n.deleteAt}}createWriteStream(e,t){s(e),a(t);let i=`${e.origin}:${e.path}`,n=this,o={...e,...t,body:[],size:0};return new r({write(e,t,i){"string"==typeof e&&(e=Buffer.from(e,t)),o.size+=e.byteLength,o.size>=n.#eh?this.destroy():o.body.push(e),i(null)},final(t){let r=n.#ep.get(i);r||(r=[],n.#ep.set(i,r));let s=l(e,r,Date.now());if(s){let e=r.indexOf(s);r.splice(e,1,o),n.#J-=s.size}else r.push(o),n.#eA+=1;if(n.#J+=o.size,n.#J>n.#Y||n.#eA>n.#eu){for(let[e,t]of(n.#ef||(n.emit("maxSizeExceeded",{size:n.#J,maxSize:n.#Y,count:n.#eA,maxCount:n.#eu}),n.#ef=!0),n.#ep)){for(let e of t.splice(0,t.length/2))n.#J-=e.size,n.#eA-=1;0===t.length&&n.#ep.delete(e)}n.#J<n.#Y&&n.#eA<n.#eu&&(n.#ef=!1)}t(null)}})}delete(e){if("object"!=typeof e)throw TypeError(`expected key to be object, got ${typeof e}`);let t=`${e.origin}:${e.path}`;for(let e of this.#ep.get(t)??[])this.#J-=e.size,this.#eA-=1;this.#ep.delete(t)}}function l(e,t,i){return t.find(t=>t.deleteAt>i&&t.method===e.method&&(null==t.vary||Object.keys(t.vary).every(i=>null===t.vary[i]?void 0===e.headers[i]:t.vary[i]===e.headers[i])))}t.exports=o},72324,(e,t,i)=>{"use strict";let r=e.r(57328);class n{#eg=!1;#em;#t;#ey;#eb;constructor(e,t,i){if("function"!=typeof e)throw TypeError("callback must be a function");this.#em=e,this.#t=t,this.#eb=i}onRequestStart(e,t){this.#eg=!1,this.#ey=t}onRequestUpgrade(e,t,i,r){this.#t.onRequestUpgrade?.(e,t,i,r)}onResponseStart(e,t,i,n){if(r(null!=this.#em),this.#eg=304===t||this.#eb&&t>=500&&t<=504,this.#em(this.#eg,this.#ey),this.#em=null,this.#eg)return!0;this.#t.onRequestStart?.(e,this.#ey),this.#t.onResponseStart?.(e,t,i,n)}onResponseData(e,t){if(!this.#eg)return this.#t.onResponseData?.(e,t)}onResponseEnd(e,t){this.#eg||this.#t.onResponseEnd?.(e,t)}onResponseError(e,t){if(!this.#eg)if(this.#em&&(this.#em(!1),this.#em=null),"function"==typeof this.#t.onResponseError)this.#t.onResponseError(e,t);else throw t}}t.exports=n},207639,(e,t,i)=>{"use strict";let r=e.r(57328),{Readable:n}=e.r(81111),s=e.r(122857),a=e.r(620645),o=e.r(29867),l=e.r(72324),{assertCacheStore:c,assertCacheMethods:d,makeCacheKey:u,normalizeHeaders:h,parseCacheControlHeader:A}=e.r(618763),{AbortError:p}=e.r(450178);function f(e,t){if(void 0!==e){if(!Array.isArray(e))throw TypeError(`expected ${t} to be an array or undefined, got ${typeof e}`);for(let i=0;i<e.length;i++){let r=e[i];if("string"!=typeof r&&!(r instanceof RegExp))throw TypeError(`expected ${t}[${i}] to be a string or RegExp, got ${typeof r}`)}}}let g=()=>{};function m(e,t,{headers:i={}}){return!!(t?.["no-cache"]||e.cacheControlDirectives?.["no-cache"]&&!Array.isArray(e.cacheControlDirectives["no-cache"]))||!!i["if-modified-since"]||!!i["if-none-match"]}function y(e,t){let i=Date.now();return i>e.staleAt?!t?.["max-stale"]||i>e.staleAt+1e3*t["max-stale"]:!!t?.["min-fresh"]&&e.staleAt-i<=1e3*t["min-fresh"]}function b(e){let t=e.cacheControlDirectives?.["stale-while-revalidate"];return!!t&&Date.now()<=e.staleAt+1e3*t}function E(e,t,i,r,n,s){if(s?.["only-if-cached"]){let e=!1;try{if("function"==typeof r.onConnect&&(r.onConnect(()=>{e=!0}),e)||"function"==typeof r.onHeaders&&(r.onHeaders(504,[],g,"Gateway Timeout"),e))return;"function"==typeof r.onComplete&&r.onComplete([])}catch(e){"function"==typeof r.onError&&r.onError(e)}return!0}return e(n,new a(t,i,r))}function C(e,t,i,a,o,l){let c=s.isStream(i.body)?i.body:n.from(i.body??[]);r(!c.destroyed,"stream should not be destroyed"),r(!c.readableDidRead,"stream should not be readableDidRead");let d={resume(){c.resume()},pause(){c.pause()},get paused(){return c.isPaused()},get aborted(){return c.destroyed},get reason(){return c.errored},abort(e){c.destroy(e??new p)}};if(c.on("error",function(t){if(!this.readableEnded)if("function"==typeof e.onResponseError)e.onResponseError(d,t);else throw t}).on("close",function(){this.errored||e.onResponseEnd?.(d,{})}),e.onRequestStart?.(d,o),c.destroyed)return;let u={...i.headers,age:String(a)};l&&(u.warning='110 - "response is stale"'),e.onResponseStart?.(d,i.statusCode,u,i.statusMessage),"HEAD"===t.method?c.destroy():c.on("data",function(t){e.onResponseData?.(d,t)})}function w(e,t,i,r,n,o,c){if(!c)return E(e,t,i,r,n,o);let d=Date.now();if(d>c.deleteAt)return e(n,new a(t,i,r));let u=Math.round((d-c.cachedAt)/1e3);if(o?.["max-age"]&&u>=o["max-age"])return e(n,r);let h=y(c,o),A=m(c,o,n);if(h||A){if(s.isStream(n.body)&&0!==s.bodyLength(n.body))return e(n,new a(t,i,r));if(!A&&b(c))return C(r,n,c,u,null,!0),queueMicrotask(()=>{let r={...n.headers,"if-modified-since":new Date(c.cachedAt).toUTCString()};if(c.etag&&(r["if-none-match"]=c.etag),c.vary)for(let e in c.vary)null!=c.vary[e]&&(r[e]=c.vary[e]);e({...n,headers:r},new a(t,i,{onRequestStart(){},onRequestUpgrade(){},onResponseStart(){},onResponseData(){},onResponseEnd(){},onResponseError(){}}))}),!0;let p=!1,f=c.cacheControlDirectives["stale-if-error"]??o?.["stale-if-error"];f&&(p=d<c.staleAt+1e3*f);let m={...n.headers,"if-modified-since":new Date(c.cachedAt).toUTCString()};if(c.etag&&(m["if-none-match"]=c.etag),c.vary)for(let e in c.vary)null!=c.vary[e]&&(m[e]=c.vary[e]);return e({...n,headers:m},new l((e,t)=>{e?C(r,n,c,u,t,h):s.isStream(c.body)&&c.body.on("error",g).destroy()},new a(t,i,r),p))}s.isStream(n.body)&&n.body.on("error",g).destroy(),C(r,n,c,u,null,!1)}t.exports=(e={})=>{let{store:t=new o,methods:i=["GET"],cacheByDefault:r,type:n="shared",origins:a}=e;if("object"!=typeof e||null===e)throw TypeError(`expected type of opts to be an Object, got ${null===e?"null":typeof e}`);if(c(t,"opts.store"),d(i,"opts.methods"),f(a,"opts.origins"),void 0!==r&&"number"!=typeof r)throw TypeError(`expected opts.cacheByDefault to be number or undefined, got ${typeof r}`);if(void 0!==n&&"shared"!==n&&"private"!==n)throw TypeError(`expected opts.type to be shared, private, or undefined, got ${typeof n}`);let l={store:t,methods:i,cacheByDefault:r,type:n},p=s.safeHTTPMethods.filter(e=>!1===i.includes(e));return e=>(i,r)=>{if(!i.origin||p.includes(i.method))return e(i,r);if(void 0!==a){let t=i.origin.toString().toLowerCase(),n=!1;for(let e=0;e<a.length;e++){let i=a[e];if("string"==typeof i){if(i.toLowerCase()===t){n=!0;break}}else if(i.test(t)){n=!0;break}}if(!n)return e(i,r)}i={...i,headers:h(i)};let n=i.headers?.["cache-control"]?A(i.headers["cache-control"]):void 0;if(n?.["no-store"])return e(i,r);let s=u(i),o=t.get(s);return o&&"function"==typeof o.then?o.then(t=>w(e,l,s,r,i,n,t)):w(e,l,s,r,i,n,o)}}},707755,(e,t,i)=>{"use strict";let{createInflate:r,createGunzip:n,createBrotliDecompress:s,createZstdDecompress:a}=e.r(727028),{pipeline:o}=e.r(81111),l=e.r(201443),{runtimeFeatures:c}=e.r(350022),d={gzip:n,"x-gzip":n,br:s,deflate:r,compress:r,"x-compress":r,...c.has("zstd")?{zstd:a}:{}},u=[204,304],h=!1;class A extends l{#eE=[];#eC;#ew;constructor(e,{skipStatusCodes:t=u,skipErrorResponses:i=!0}={}){super(e),this.#eC=t,this.#ew=i}#eI(e,t){return!!(!e||t<200||this.#eC.includes(t))||!!this.#ew&&!!(t>=400)}#ev(e){let t=e.split(","),i=5;if(t.length>i)throw Error(`too many content-encodings in response: ${t.length}, maximum allowed is ${i}`);let r=[];for(let e=t.length-1;e>=0;e--){let i=t[e].trim();if(i){if(!d[i])return r.length=0,r;r.push(d[i]())}}return r}#eB(e,t){e.on("readable",()=>{let i;for(;null!==(i=e.read())&&!1!==super.onResponseData(t,i););}),e.on("error",e=>{super.onResponseError(t,e)})}#eQ(e){let t=this.#eE[0];this.#eB(t,e),t.on("end",()=>{super.onResponseEnd(e,{})})}#ex(e){let t=this.#eE[this.#eE.length-1];this.#eB(t,e),o(this.#eE,t=>{t?super.onResponseError(e,t):super.onResponseEnd(e,{})})}#eS(){this.#eE.length=0}onResponseStart(e,t,i,r){let n=i["content-encoding"];if(this.#eI(n,t))return super.onResponseStart(e,t,i,r);let s=this.#ev(n.toLowerCase());if(0===s.length)return this.#eS(),super.onResponseStart(e,t,i,r);this.#eE=s;let{"content-encoding":a,"content-length":o,...l}=i;return 1===this.#eE.length?this.#eQ(e):this.#ex(e),super.onResponseStart(e,t,l,r)}onResponseData(e,t){this.#eE.length>0?this.#eE[0].write(t):super.onResponseData(e,t)}onResponseEnd(e,t){if(this.#eE.length>0){this.#eE[0].end(),this.#eS();return}super.onResponseEnd(e,t)}onResponseError(e,t){if(this.#eE.length>0){for(let e of this.#eE)e.destroy(t);this.#eS()}super.onResponseError(e,t)}}t.exports=function(e={}){return h||(process.emitWarning("DecompressInterceptor is experimental and subject to change","ExperimentalWarning"),h=!0),t=>(i,r)=>t(i,new A(r,e))}},848217,(e,t,i)=>{"use strict";let{RequestAbortedError:r}=e.r(450178),n=5242880;class s{#ek;#eT=[];#eN=n;#j=0;#z={};#eD="";#n=!1;#e_=!1;#eR=!1;#eL=!1;#a=null;#eF=null;constructor(e,t,i=n){this.#ek=e,this.#eF=t,this.#eN=i}addWaitingHandler(e){if(this.#eL||this.#eR)return!1;let t=this.#eM(e),i=t.controller;try{if(e.onRequestStart?.(i,null),i.aborted)return t.done=!0,!0;this.#e_&&e.onResponseStart?.(i,this.#j,this.#z,this.#eD)}catch{return t.done=!0,!0}return i.aborted||this.#eT.push(t),!0}onRequestStart(e,t){this.#a=e,this.#ek.onRequestStart?.(e,t)}onRequestUpgrade(e,t,i,r){this.#ek.onRequestUpgrade?.(e,t,i,r)}onResponseStart(e,t,i,r){for(let n of(this.#e_=!0,this.#j=t,this.#z=i,this.#eD=r,this.#ek.onResponseStart?.(e,t,i,r),this.#eT)){let{handler:e,controller:s}=n;if(n.done||s.aborted){n.done=!0;continue}try{e.onResponseStart?.(s,t,i,r)}catch{}s.aborted&&(n.done=!0)}this.#eO()}onResponseData(e,t){if(!this.#n&&!this.#eL){for(let i of(this.#eR=!0,this.#ek.onResponseData?.(e,t),this.#eT)){let{handler:e,controller:r}=i;if(i.done||r.aborted){i.done=!0;continue}if(r.paused){this.#eU(i,t);continue}try{e.onResponseData?.(r,t)}catch{}r.aborted&&(i.done=!0,i.bufferedChunks=[],i.bufferedBytes=0)}this.#eO()}}onResponseEnd(e,t){if(!this.#n&&!this.#eL){for(let i of(this.#eL=!0,this.#ek.onResponseEnd?.(e,t),this.#eT)){if(i.done||i.controller.aborted||(this.#eP(i),i.done||i.controller.aborted)){i.done=!0;continue}if(i.controller.paused&&i.bufferedChunks.length>0){i.pendingTrailers=t;continue}try{i.handler.onResponseEnd?.(i.controller,t)}catch{}i.done=!0}this.#eO(),this.#eF?.()}}onResponseError(e,t){if(!this.#eL){for(let i of(this.#n=!0,this.#eL=!0,this.#ek.onResponseError?.(e,t),this.#eT))this.#e$(i,t);this.#eT=[],this.#eF?.()}}#eM(e){let t={handler:e,controller:null,bufferedChunks:[],bufferedBytes:0,pendingTrailers:null,done:!1},i={aborted:!1,paused:!1,reason:null};return t.controller={resume:()=>{if(!i.aborted){if(i.paused=!1,this.#eP(t),this.#eL&&t.pendingTrailers&&0===t.bufferedChunks.length&&!i.paused&&!i.aborted){try{t.handler.onResponseEnd?.(t.controller,t.pendingTrailers)}catch{}t.pendingTrailers=null,t.done=!0}this.#eO()}},pause:()=>{i.aborted||(i.paused=!0)},get paused(){return i.paused},get aborted(){return i.aborted},get reason(){return i.reason},abort:e=>{i.aborted=!0,i.reason=e??null,t.done=!0,t.pendingTrailers=null,t.bufferedChunks=[],t.bufferedBytes=0}},t}#eU(e,t){if(e.done||e.controller.aborted){e.done=!0,e.bufferedChunks=[],e.bufferedBytes=0;return}let i=Buffer.from(t);if(e.bufferedChunks.push(i),e.bufferedBytes+=i.length,e.bufferedBytes>this.#eN){let t=new r(`Deduplicated waiting handler exceeded maxBufferSize (${this.#eN} bytes) while paused`);this.#e$(e,t)}}#eP(e){let{handler:t,controller:i}=e;for(;!e.done&&!i.aborted&&!i.paused&&e.bufferedChunks.length>0;){let r=e.bufferedChunks.shift();e.bufferedBytes-=r.length;try{t.onResponseData?.(i,r)}catch{}if(i.aborted){e.done=!0,e.pendingTrailers=null,e.bufferedChunks=[],e.bufferedBytes=0;break}}}#e$(e,t){if(!e.done){e.done=!0,e.pendingTrailers=null,e.bufferedChunks=[],e.bufferedBytes=0;try{e.controller.abort(t),e.handler.onResponseError?.(e.controller,t)}catch{}}}#eO(){this.#eT=this.#eT.filter(e=>!1===e.done)}}t.exports=s},380308,(e,t,i)=>{"use strict";let r=e.r(677652),n=e.r(122857),s=e.r(848217),{normalizeHeaders:a,makeCacheKey:o,makeDeduplicationKey:l}=e.r(618763),c=r.channel("undici:request:pending-requests");t.exports=(e={})=>{let{methods:t=["GET"],skipHeaderNames:i=[],excludeHeaderNames:r=[],maxBufferSize:d=5242880}=e;if("object"!=typeof e||null===e)throw TypeError(`expected type of opts to be an Object, got ${null===e?"null":typeof e}`);if(!Array.isArray(t))throw TypeError(`expected opts.methods to be an array, got ${typeof t}`);for(let e of t)if(!n.safeHTTPMethods.includes(e))throw TypeError(`expected opts.methods to only contain safe HTTP methods, got ${e}`);if(!Array.isArray(i))throw TypeError(`expected opts.skipHeaderNames to be an array, got ${typeof i}`);if(!Array.isArray(r))throw TypeError(`expected opts.excludeHeaderNames to be an array, got ${typeof r}`);if(!Number.isFinite(d)||d<=0)throw TypeError(`expected opts.maxBufferSize to be a positive finite number, got ${d}`);let u=new Set(i.map(e=>e.toLowerCase())),h=new Set(r.map(e=>e.toLowerCase())),A=new Map;return e=>(i,r)=>{if(!i.origin||!1===t.includes(i.method))return e(i,r);if(i={...i,headers:a(i)},u.size>0){for(let t of Object.keys(i.headers))if(u.has(t.toLowerCase()))return e(i,r)}let n=l(o(i),h),p=A.get(n);if(p)return!!p.addWaitingHandler(r)||e(i,r);let f=new s(r,()=>{A.delete(n),c.hasSubscribers&&c.publish({size:A.size,key:n,type:"removed"})},d);return A.set(n,f),c.hasSubscribers&&c.publish({size:A.size,key:n,type:"added"}),e(i,f)}}},269140,(e,t,i)=>{"use strict";let r,{Writable:n}=e.r(81111),{assertCacheKey:s,assertCacheValue:a}=e.r(618763),o=3,l=2e9;function c(e,t){return null==e&&null==t||(null!=e||null==t)&&(null==e||null!=t)&&(Array.isArray(e)&&Array.isArray(t)?e.length===t.length&&e.every((e,i)=>e===t[i]):e===t)}t.exports=class{#eh=l;#eu=1/0;#ej;#eH;#eq;#ez;#eV;#eG;#eY;#eW;constructor(e){if(e){if("object"!=typeof e)throw TypeError("SqliteCacheStore options must be an object");if(void 0!==e.maxEntrySize){if("number"!=typeof e.maxEntrySize||!Number.isInteger(e.maxEntrySize)||e.maxEntrySize<0)throw TypeError("SqliteCacheStore options.maxEntrySize must be a non-negative integer");if(e.maxEntrySize>l)throw TypeError("SqliteCacheStore options.maxEntrySize must be less than 2gb");this.#eh=e.maxEntrySize}if(void 0!==e.maxCount){if("number"!=typeof e.maxCount||!Number.isInteger(e.maxCount)||e.maxCount<0)throw TypeError("SqliteCacheStore options.maxCount must be a non-negative integer");this.#eu=e.maxCount}}r||(r=(()=>{let e=Error("Cannot find module 'node:sqlite': Unsupported external type Url for commonjs reference");throw e.code="MODULE_NOT_FOUND",e})().DatabaseSync),this.#ej=new r(e?.location??":memory:"),this.#ej.exec(`
|
||
PRAGMA journal_mode = WAL;
|
||
PRAGMA synchronous = NORMAL;
|
||
PRAGMA temp_store = memory;
|
||
PRAGMA optimize;
|
||
|
||
CREATE TABLE IF NOT EXISTS cacheInterceptorV${o} (
|
||
-- Data specific to us
|
||
id INTEGER PRIMARY KEY AUTOINCREMENT,
|
||
url TEXT NOT NULL,
|
||
method TEXT NOT NULL,
|
||
|
||
-- Data returned to the interceptor
|
||
body BUF NULL,
|
||
deleteAt INTEGER NOT NULL,
|
||
statusCode INTEGER NOT NULL,
|
||
statusMessage TEXT NOT NULL,
|
||
headers TEXT NULL,
|
||
cacheControlDirectives TEXT NULL,
|
||
etag TEXT NULL,
|
||
vary TEXT NULL,
|
||
cachedAt INTEGER NOT NULL,
|
||
staleAt INTEGER NOT NULL
|
||
);
|
||
|
||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${o}_getValuesQuery ON cacheInterceptorV${o}(url, method, deleteAt);
|
||
CREATE INDEX IF NOT EXISTS idx_cacheInterceptorV${o}_deleteByUrlQuery ON cacheInterceptorV${o}(deleteAt);
|
||
`),this.#eH=this.#ej.prepare(`
|
||
SELECT
|
||
id,
|
||
body,
|
||
deleteAt,
|
||
statusCode,
|
||
statusMessage,
|
||
headers,
|
||
etag,
|
||
cacheControlDirectives,
|
||
vary,
|
||
cachedAt,
|
||
staleAt
|
||
FROM cacheInterceptorV${o}
|
||
WHERE
|
||
url = ?
|
||
AND method = ?
|
||
ORDER BY
|
||
deleteAt ASC
|
||
`),this.#eq=this.#ej.prepare(`
|
||
UPDATE cacheInterceptorV${o} SET
|
||
body = ?,
|
||
deleteAt = ?,
|
||
statusCode = ?,
|
||
statusMessage = ?,
|
||
headers = ?,
|
||
etag = ?,
|
||
cacheControlDirectives = ?,
|
||
cachedAt = ?,
|
||
staleAt = ?
|
||
WHERE
|
||
id = ?
|
||
`),this.#ez=this.#ej.prepare(`
|
||
INSERT INTO cacheInterceptorV${o} (
|
||
url,
|
||
method,
|
||
body,
|
||
deleteAt,
|
||
statusCode,
|
||
statusMessage,
|
||
headers,
|
||
etag,
|
||
cacheControlDirectives,
|
||
vary,
|
||
cachedAt,
|
||
staleAt
|
||
) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)
|
||
`),this.#eG=this.#ej.prepare(`DELETE FROM cacheInterceptorV${o} WHERE url = ?`),this.#eY=this.#ej.prepare(`SELECT COUNT(*) AS total FROM cacheInterceptorV${o}`),this.#eV=this.#ej.prepare(`DELETE FROM cacheInterceptorV${o} WHERE deleteAt <= ?`),this.#eW=this.#eu===1/0?null:this.#ej.prepare(`
|
||
DELETE FROM cacheInterceptorV${o}
|
||
WHERE id IN (
|
||
SELECT
|
||
id
|
||
FROM cacheInterceptorV${o}
|
||
ORDER BY cachedAt DESC
|
||
LIMIT ?
|
||
)
|
||
`)}close(){this.#ej.close()}get(e){s(e);let t=this.#eJ(e);return t?{body:t.body?Buffer.from(t.body.buffer,t.body.byteOffset,t.body.byteLength):void 0,statusCode:t.statusCode,statusMessage:t.statusMessage,headers:t.headers?JSON.parse(t.headers):void 0,etag:t.etag?t.etag:void 0,vary:t.vary?JSON.parse(t.vary):void 0,cacheControlDirectives:t.cacheControlDirectives?JSON.parse(t.cacheControlDirectives):void 0,cachedAt:t.cachedAt,staleAt:t.staleAt,deleteAt:t.deleteAt}:void 0}set(e,t){s(e);let i=this.#eK(e),r=Array.isArray(t.body)?Buffer.concat(t.body):t.body,n=r?.byteLength;if(n&&n>this.#eh)return;let a=this.#eJ(e,!0);a?this.#eq.run(r,t.deleteAt,t.statusCode,t.statusMessage,t.headers?JSON.stringify(t.headers):null,t.etag?t.etag:null,t.cacheControlDirectives?JSON.stringify(t.cacheControlDirectives):null,t.cachedAt,t.staleAt,a.id):(this.#eZ(),this.#ez.run(i,e.method,r,t.deleteAt,t.statusCode,t.statusMessage,t.headers?JSON.stringify(t.headers):null,t.etag?t.etag:null,t.cacheControlDirectives?JSON.stringify(t.cacheControlDirectives):null,t.vary?JSON.stringify(t.vary):null,t.cachedAt,t.staleAt))}createWriteStream(e,t){s(e),a(t);let i=0,r=[],o=this;return new n({decodeStrings:!0,write(e,t,n){(i+=e.byteLength)<o.#eh?r.push(e):this.destroy(),n()},final(i){o.set(e,{...t,body:r}),i()}})}delete(e){if("object"!=typeof e)throw TypeError(`expected key to be object, got ${typeof e}`);this.#eG.run(this.#eK(e))}#eZ(){if(Number.isFinite(this.#eu)&&this.size<=this.#eu)return 0;{let e=this.#eV.run(Date.now()).changes;if(e)return e}{let e=this.#eW?.run(Math.max(Math.floor(.1*this.#eu),1)).changes;if(e)return e}return 0}get size(){let{total:e}=this.#eY.get();return e}#eK(e){return`${e.origin}/${e.path}`}#eJ(e,t=!1){let i=this.#eK(e),{headers:r,method:n}=e,s=this.#eH.all(i,n);if(0===s.length)return;let a=Date.now();for(let e of s){if(a>=e.deleteAt&&!t)break;let i=!0;if(e.vary){let t=JSON.parse(e.vary);for(let e in t)if(!c(r[e],t[e])){i=!1;break}}if(i)return e}}}},302260,(e,t,i)=>{"use strict";let{kConstruct:r}=e.r(954673),{kEnumerableProperty:n}=e.r(122857),{iteratorMixin:s,isValidHeaderName:a,isValidHeaderValue:o}=e.r(402649),{webidl:l}=e.r(192321),c=e.r(57328),d=e.r(812057);function u(e){return 10===e||13===e||9===e||32===e}function h(e){let t=0,i=e.length;for(;i>t&&u(e.charCodeAt(i-1));)--i;for(;i>t&&u(e.charCodeAt(t));)++t;return 0===t&&i===e.length?e:e.substring(t,i)}function A(e,t){if(Array.isArray(t))for(let i=0;i<t.length;++i){let r=t[i];if(2!==r.length)throw l.errors.exception({header:"Headers constructor",message:`expected name/value pair to be length 2, found ${r.length}.`});p(e,r[0],r[1])}else if("object"==typeof t&&null!==t){let i=Object.keys(t);for(let r=0;r<i.length;++r)p(e,i[r],t[i[r]])}else throw l.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})}function p(e,t,i){if(i=h(i),a(t)){if(!o(i))throw l.errors.invalidArgument({prefix:"Headers.append",value:i,type:"header value"})}else throw l.errors.invalidArgument({prefix:"Headers.append",value:t,type:"header name"});if("immutable"===b(e))throw TypeError("immutable");return C(e).append(t,i,!1)}function f(e){let t=C(e);if(!t)return[];if(t.sortedMap)return t.sortedMap;let i=[],r=t.toSortedArray(),n=t.cookies;if(null===n||1===n.length)return t.sortedMap=r;for(let e=0;e<r.length;++e){let{0:t,1:s}=r[e];if("set-cookie"===t)for(let e=0;e<n.length;++e)i.push([t,n[e]]);else i.push([t,s])}return t.sortedMap=i}function g(e,t){return e[0]<t[0]?-1:1}class m{cookies=null;sortedMap;headersMap;constructor(e){e instanceof m?(this.headersMap=new Map(e.headersMap),this.sortedMap=e.sortedMap,this.cookies=null===e.cookies?null:[...e.cookies]):(this.headersMap=new Map(e),this.sortedMap=null)}contains(e,t){return this.headersMap.has(t?e:e.toLowerCase())}clear(){this.headersMap.clear(),this.sortedMap=null,this.cookies=null}append(e,t,i){this.sortedMap=null;let r=i?e:e.toLowerCase(),n=this.headersMap.get(r);if(n){let e="cookie"===r?"; ":", ";this.headersMap.set(r,{name:n.name,value:`${n.value}${e}${t}`})}else this.headersMap.set(r,{name:e,value:t});"set-cookie"===r&&(this.cookies??=[]).push(t)}set(e,t,i){this.sortedMap=null;let r=i?e:e.toLowerCase();"set-cookie"===r&&(this.cookies=[t]),this.headersMap.set(r,{name:e,value:t})}delete(e,t){this.sortedMap=null,t||(e=e.toLowerCase()),"set-cookie"===e&&(this.cookies=null),this.headersMap.delete(e)}get(e,t){return this.headersMap.get(t?e:e.toLowerCase())?.value??null}*[Symbol.iterator](){for(let{0:e,1:{value:t}}of this.headersMap)yield[e,t]}get entries(){let e={};if(0!==this.headersMap.size)for(let{name:t,value:i}of this.headersMap.values())e[t]=i;return e}rawValues(){return this.headersMap.values()}get entriesList(){let e=[];if(0!==this.headersMap.size)for(let{0:t,1:{name:i,value:r}}of this.headersMap)if("set-cookie"===t)for(let t of this.cookies)e.push([i,t]);else e.push([i,r]);return e}toSortedArray(){let e=this.headersMap.size,t=Array(e);if(e<=32){if(0===e)return t;let i=this.headersMap[Symbol.iterator](),r=i.next().value;t[0]=[r[0],r[1].value],c(null!==r[1].value);for(let r=1,n=0,s=0,a=0,o=0,l,d;r<e;++r){for(d=i.next().value,c(null!==(l=t[r]=[d[0],d[1].value])[1]),a=0,s=r;a<s;)t[o=a+(s-a>>1)][0]<=l[0]?a=o+1:s=o;if(r!==o){for(n=r;n>a;)t[n]=t[--n];t[a]=l}}if(!i.next().done)throw TypeError("Unreachable");return t}{let e=0;for(let{0:i,1:{value:r}}of this.headersMap)t[e++]=[i,r],c(null!==r);return t.sort(g)}}}class y{#eX;#e0;constructor(e){if(l.util.markAsUncloneable(this),e===r)return;this.#e0=new m,this.#eX="none",void 0!==e&&A(this,e=l.converters.HeadersInit(e,"Headers constructor","init"))}append(e,t){l.brandCheck(this,y),l.argumentLengthCheck(arguments,2,"Headers.append");let i="Headers.append";return e=l.converters.ByteString(e,i,"name"),t=l.converters.ByteString(t,i,"value"),p(this,e,t)}delete(e){l.brandCheck(this,y),l.argumentLengthCheck(arguments,1,"Headers.delete");let t="Headers.delete";if(!a(e=l.converters.ByteString(e,t,"name")))throw l.errors.invalidArgument({prefix:"Headers.delete",value:e,type:"header name"});if("immutable"===this.#eX)throw TypeError("immutable");this.#e0.contains(e,!1)&&this.#e0.delete(e,!1)}get(e){l.brandCheck(this,y),l.argumentLengthCheck(arguments,1,"Headers.get");let t="Headers.get";if(!a(e=l.converters.ByteString(e,t,"name")))throw l.errors.invalidArgument({prefix:t,value:e,type:"header name"});return this.#e0.get(e,!1)}has(e){l.brandCheck(this,y),l.argumentLengthCheck(arguments,1,"Headers.has");let t="Headers.has";if(!a(e=l.converters.ByteString(e,t,"name")))throw l.errors.invalidArgument({prefix:t,value:e,type:"header name"});return this.#e0.contains(e,!1)}set(e,t){l.brandCheck(this,y),l.argumentLengthCheck(arguments,2,"Headers.set");let i="Headers.set";if(e=l.converters.ByteString(e,i,"name"),t=h(t=l.converters.ByteString(t,i,"value")),a(e)){if(!o(t))throw l.errors.invalidArgument({prefix:i,value:t,type:"header value"})}else throw l.errors.invalidArgument({prefix:i,value:e,type:"header name"});if("immutable"===this.#eX)throw TypeError("immutable");this.#e0.set(e,t,!1)}getSetCookie(){l.brandCheck(this,y);let e=this.#e0.cookies;return e?[...e]:[]}[d.inspect.custom](e,t){return t.depth??=e,`Headers ${d.formatWithOptions(t,this.#e0.entries)}`}static getHeadersGuard(e){return e.#eX}static setHeadersGuard(e,t){e.#eX=t}static getHeadersList(e){return e.#e0}static setHeadersList(e,t){e.#e0=t}}let{getHeadersGuard:b,setHeadersGuard:E,getHeadersList:C,setHeadersList:w}=y;Reflect.deleteProperty(y,"getHeadersGuard"),Reflect.deleteProperty(y,"setHeadersGuard"),Reflect.deleteProperty(y,"getHeadersList"),Reflect.deleteProperty(y,"setHeadersList"),s("Headers",y,f,0,1),Object.defineProperties(y.prototype,{append:n,delete:n,get:n,has:n,set:n,getSetCookie:n,[Symbol.toStringTag]:{value:"Headers",configurable:!0},[d.inspect.custom]:{enumerable:!1}}),l.converters.HeadersInit=function(e,t,i){if(l.util.Type(e)===l.util.Types.OBJECT){let r=Reflect.get(e,Symbol.iterator);if(!d.types.isProxy(e)&&r===y.prototype.entries)try{return C(e).entriesList}catch{}return"function"==typeof r?l.converters["sequence<sequence<ByteString>>"](e,t,i,r.bind(e)):l.converters["record<ByteString, ByteString>"](e,t,i)}throw l.errors.conversionFailed({prefix:"Headers constructor",argument:"Argument 1",types:["sequence<sequence<ByteString>>","record<ByteString, ByteString>"]})},t.exports={fill:A,compareHeaderName:g,Headers:y,HeadersList:m,getHeadersGuard:b,setHeadersGuard:E,setHeadersList:w,getHeadersList:C}},144796,(e,t,i)=>{"use strict";let{Headers:r,HeadersList:n,fill:s,getHeadersGuard:a,setHeadersGuard:o,setHeadersList:l}=e.r(302260),{extractBody:c,cloneBody:d,mixinBody:u,streamRegistry:h,bodyUnusable:A}=e.r(154718),p=e.r(122857),f=e.r(812057),{kEnumerableProperty:g}=p,{isValidReasonPhrase:m,isCancelled:y,isAborted:b,isErrorLike:E,environmentSettingsObject:C}=e.r(402649),{redirectStatusSet:w,nullBodyStatus:I}=e.r(267267),{webidl:v}=e.r(192321),{URLSerializer:B}=e.r(441628),{kConstruct:Q}=e.r(954673),x=e.r(57328),{isomorphicEncode:S,serializeJavascriptValueToJSONString:k}=e.r(142677),T=new TextEncoder("utf-8");class N{#z;#A;static error(){return q(O(),"immutable")}static json(e,t){v.argumentLengthCheck(arguments,1,"Response.json"),null!==t&&(t=v.converters.ResponseInit(t));let i=c(T.encode(k(e))),r=q(M({}),"response");return H(r,t,{body:i[0],type:"application/json"}),r}static redirect(e,t=302){let i;v.argumentLengthCheck(arguments,1,"Response.redirect"),e=v.converters.USVString(e),t=v.converters["unsigned short"](t);try{i=new URL(e,C.settingsObject.baseUrl)}catch(t){throw TypeError(`Failed to parse URL from ${e}`,{cause:t})}if(!w.has(t))throw RangeError(`Invalid status code ${t}`);let r=q(M({}),"immutable");r.#A.status=t;let n=S(B(i));return r.#A.headersList.append("location",n,!0),r}constructor(e=null,t){if(v.util.markAsUncloneable(this),e===Q)return;null!==e&&(e=v.converters.BodyInit(e,"Response","body")),t=v.converters.ResponseInit(t),this.#A=M({}),this.#z=new r(Q),o(this.#z,"response"),l(this.#z,this.#A.headersList);let i=null;if(null!=e){const[t,r]=c(e);i={body:t,type:r}}H(this,t,i)}get type(){return v.brandCheck(this,N),this.#A.type}get url(){v.brandCheck(this,N);let e=this.#A.urlList,t=e[e.length-1]??null;return null===t?"":B(t,!0)}get redirected(){return v.brandCheck(this,N),this.#A.urlList.length>1}get status(){return v.brandCheck(this,N),this.#A.status}get ok(){return v.brandCheck(this,N),this.#A.status>=200&&this.#A.status<=299}get statusText(){return v.brandCheck(this,N),this.#A.statusText}get headers(){return v.brandCheck(this,N),this.#z}get body(){return v.brandCheck(this,N),this.#A.body?this.#A.body.stream:null}get bodyUsed(){return v.brandCheck(this,N),!!this.#A.body&&p.isDisturbed(this.#A.body.stream)}clone(){if(v.brandCheck(this,N),A(this.#A))throw v.errors.exception({header:"Response.clone",message:"Body has already been consumed."});let e=F(this.#A);return 0!==this.#A.urlList.length&&this.#A.body?.stream&&h.register(this,new WeakRef(this.#A.body.stream)),q(e,a(this.#z))}[f.inspect.custom](e,t){null===t.depth&&(t.depth=2),t.colors??=!0;let i={status:this.status,statusText:this.statusText,headers:this.headers,body:this.body,bodyUsed:this.bodyUsed,ok:this.ok,redirected:this.redirected,type:this.type,url:this.url};return`Response ${f.formatWithOptions(t,i)}`}static getResponseHeaders(e){return e.#z}static setResponseHeaders(e,t){e.#z=t}static getResponseState(e){return e.#A}static setResponseState(e,t){e.#A=t}}let{getResponseHeaders:D,setResponseHeaders:_,getResponseState:R,setResponseState:L}=N;function F(e){if(e.internalResponse)return $(F(e.internalResponse),e.type);let t=M({...e,body:null});return null!=e.body&&(t.body=d(e.body)),t}function M(e){return{aborted:!1,rangeRequested:!1,timingAllowPassed:!1,requestIncludesCredentials:!1,type:"default",status:200,timingInfo:null,cacheState:"",statusText:"",...e,headersList:e?.headersList?new n(e?.headersList):new n,urlList:e?.urlList?[...e.urlList]:[]}}function O(e){return M({type:"error",status:0,error:E(e)?e:Error(e?String(e):e),aborted:e&&"AbortError"===e.name})}function U(e){return"error"===e.type&&0===e.status}function P(e,t){return t={internalResponse:e,...t},new Proxy(e,{get:(e,i)=>i in t?t[i]:e[i],set:(e,i,r)=>(x(!(i in t)),e[i]=r,!0)})}function $(e,t){return"basic"===t?P(e,{type:"basic",headersList:e.headersList}):"cors"===t?P(e,{type:"cors",headersList:e.headersList}):"opaque"===t?P(e,{type:"opaque",urlList:[],status:0,statusText:"",body:null}):"opaqueredirect"===t?P(e,{type:"opaqueredirect",status:0,statusText:"",headersList:[],body:null}):void x(!1)}function j(e,t=null){return x(y(e)),b(e)?O(Object.assign(new DOMException("The operation was aborted.","AbortError"),{cause:t})):O(Object.assign(new DOMException("Request was cancelled."),{cause:t}))}function H(e,t,i){if(null!==t.status&&(t.status<200||t.status>599))throw RangeError('init["status"] must be in the range of 200 to 599, inclusive.');if("statusText"in t&&null!=t.statusText&&!m(String(t.statusText)))throw TypeError("Invalid statusText");if("status"in t&&null!=t.status&&(R(e).status=t.status),"statusText"in t&&null!=t.statusText&&(R(e).statusText=t.statusText),"headers"in t&&null!=t.headers&&s(D(e),t.headers),i){if(I.includes(e.status))throw v.errors.exception({header:"Response constructor",message:`Invalid response status code ${e.status}`});R(e).body=i.body,null==i.type||R(e).headersList.contains("content-type",!0)||R(e).headersList.append("content-type",i.type,!0)}}function q(e,t){let i=new N(Q);L(i,e);let n=new r(Q);return _(i,n),l(n,e.headersList),o(n,t),0!==e.urlList.length&&e.body?.stream&&h.register(i,new WeakRef(e.body.stream)),i}Reflect.deleteProperty(N,"getResponseHeaders"),Reflect.deleteProperty(N,"setResponseHeaders"),Reflect.deleteProperty(N,"getResponseState"),Reflect.deleteProperty(N,"setResponseState"),u(N,R),Object.defineProperties(N.prototype,{type:g,url:g,status:g,ok:g,redirected:g,statusText:g,headers:g,clone:g,body:g,bodyUsed:g,[Symbol.toStringTag]:{value:"Response",configurable:!0}}),Object.defineProperties(N,{json:g,redirect:g,error:g}),v.converters.XMLHttpRequestBodyInit=function(e,t,i){return"string"==typeof e?v.converters.USVString(e,t,i):v.is.Blob(e)||v.is.BufferSource(e)||v.is.FormData(e)||v.is.URLSearchParams(e)?e:v.converters.DOMString(e,t,i)},v.converters.BodyInit=function(e,t,i){return v.is.ReadableStream(e)||e?.[Symbol.asyncIterator]?e:v.converters.XMLHttpRequestBodyInit(e,t,i)},v.converters.ResponseInit=v.dictionaryConverter([{key:"status",converter:v.converters["unsigned short"],defaultValue:()=>200},{key:"statusText",converter:v.converters.ByteString,defaultValue:()=>""},{key:"headers",converter:v.converters.HeadersInit}]),v.is.Response=v.util.MakeTypeAssertion(N),t.exports={isNetworkError:U,makeNetworkError:O,makeResponse:M,makeAppropriateNetworkError:j,filterResponse:$,Response:N,cloneResponse:F,fromInnerResponse:q,getResponseState:R}},625461,(e,t,i)=>{"use strict";let r,{extractBody:n,mixinBody:s,cloneBody:a,bodyUnusable:o}=e.r(154718),{Headers:l,fill:c,HeadersList:d,setHeadersGuard:u,getHeadersGuard:h,setHeadersList:A,getHeadersList:p}=e.r(302260),f=e.r(122857),g=e.r(812057),{isValidHTTPToken:m,sameOrigin:y,environmentSettingsObject:b}=e.r(402649),{forbiddenMethodsSet:E,corsSafeListedMethodsSet:C,referrerPolicy:w,requestRedirect:I,requestMode:v,requestCredentials:B,requestCache:Q,requestDuplex:x}=e.r(267267),{kEnumerableProperty:S,normalizedMethodRecordsBase:k,normalizedMethodRecords:T}=f,{webidl:N}=e.r(192321),{URLSerializer:D}=e.r(441628),{kConstruct:_}=e.r(954673),R=e.r(57328),{getMaxListeners:L,setMaxListeners:F,defaultMaxListeners:M}=e.r(687769),O=Symbol("abortController"),U=new FinalizationRegistry(({signal:e,abort:t})=>{e.removeEventListener("abort",t)}),P=new WeakMap;try{r=L(new AbortController().signal)>0}catch{r=!1}function $(e){return t;function t(){let i=e.deref();if(void 0!==i){U.unregister(t),this.removeEventListener("abort",t),i.abort(this.reason);let e=P.get(i.signal);if(void 0!==e){if(0!==e.size){for(let t of e){let e=t.deref();void 0!==e&&e.abort(this.reason)}e.clear()}P.delete(i.signal)}}}}let j=!1;class H{#e1;#e2;#z;#A;constructor(e,t){let i;if(N.util.markAsUncloneable(this),e===_)return;const s="Request constructor";N.argumentLengthCheck(arguments,1,s),e=N.converters.RequestInfo(e),t=N.converters.RequestInit(t);let a=null,h=null;const g=b.settingsObject.baseUrl;let w=null;if("string"==typeof e){let i;this.#e2=t.dispatcher;try{i=new URL(e,g)}catch(t){throw TypeError("Failed to parse URL from "+e,{cause:t})}if(i.username||i.password)throw TypeError("Request cannot be constructed from a URL that includes credentials: "+e);a=J({urlList:[i]}),h="cors"}else R(N.is.Request(e)),a=e.#A,w=e.#e1,this.#e2=t.dispatcher||e.#e2;const I=b.settingsObject.origin;let v="client";if(a.window?.constructor?.name==="EnvironmentSettingsObject"&&y(a.window,I)&&(v=a.window),null!=t.window)throw TypeError(`'window' option '${v}' must be null`);"window"in t&&(v="no-window"),a=J({method:a.method,headersList:a.headersList,unsafeRequest:a.unsafeRequest,client:b.settingsObject,window:v,priority:a.priority,origin:a.origin,referrer:a.referrer,referrerPolicy:a.referrerPolicy,mode:a.mode,credentials:a.credentials,cache:a.cache,redirect:a.redirect,integrity:a.integrity,keepalive:a.keepalive,reloadNavigation:a.reloadNavigation,historyNavigation:a.historyNavigation,urlList:[...a.urlList]});const B=0!==Object.keys(t).length;if(B&&("navigate"===a.mode&&(a.mode="same-origin"),a.reloadNavigation=!1,a.historyNavigation=!1,a.origin="client",a.referrer="client",a.referrerPolicy="",a.url=a.urlList[a.urlList.length-1],a.urlList=[a.url]),void 0!==t.referrer){const e=t.referrer;if(""===e)a.referrer="no-referrer";else{let t;try{t=new URL(e,g)}catch(t){throw TypeError(`Referrer "${e}" is not a valid URL.`,{cause:t})}"about:"===t.protocol&&"client"===t.hostname||I&&!y(t,b.settingsObject.baseUrl)?a.referrer="client":a.referrer=t}}if(void 0!==t.referrerPolicy&&(a.referrerPolicy=t.referrerPolicy),"navigate"===(i=void 0!==t.mode?t.mode:h))throw N.errors.exception({header:"Request constructor",message:"invalid request mode navigate."});if(null!=i&&(a.mode=i),void 0!==t.credentials&&(a.credentials=t.credentials),void 0!==t.cache&&(a.cache=t.cache),"only-if-cached"===a.cache&&"same-origin"!==a.mode)throw TypeError("'only-if-cached' can be set only with 'same-origin' mode");if(void 0!==t.redirect&&(a.redirect=t.redirect),null!=t.integrity&&(a.integrity=String(t.integrity)),void 0!==t.keepalive&&(a.keepalive=!!t.keepalive),void 0!==t.method){let e=t.method;const i=T[e];if(void 0!==i)a.method=i;else{if(!m(e))throw TypeError(`'${e}' is not a valid HTTP method.`);const t=e.toUpperCase();if(E.has(t))throw TypeError(`'${e}' HTTP method is unsupported.`);e=k[t]??e,a.method=e}j||"patch"!==a.method||(process.emitWarning("Using `patch` is highly likely to result in a `405 Method Not Allowed`. `PATCH` is much more likely to succeed.",{code:"UNDICI-FETCH-patch"}),j=!0)}void 0!==t.signal&&(w=t.signal),this.#A=a;const Q=new AbortController;if(this.#e1=Q.signal,null!=w)if(w.aborted)Q.abort(w.reason);else{this[O]=Q;const e=$(new WeakRef(Q));r&&L(w)===M&&F(1500,w),f.addAbortListener(w,e),U.register(Q,{signal:w,abort:e},e)}if(this.#z=new l(_),A(this.#z,a.headersList),u(this.#z,"request"),"no-cors"===i){if(!C.has(a.method))throw TypeError(`'${a.method} is unsupported in no-cors mode.`);u(this.#z,"request-no-cors")}if(B){const e=p(this.#z),i=void 0!==t.headers?t.headers:new d(e);if(e.clear(),i instanceof d){for(const{name:t,value:r}of i.rawValues())e.append(t,r,!1);e.cookies=i.cookies}else c(this.#z,i)}const x=N.is.Request(e)?e.#A.body:null;if((null!=t.body||null!=x)&&("GET"===a.method||"HEAD"===a.method))throw TypeError("Request with GET/HEAD method cannot have body.");let S=null;if(null!=t.body){const[e,i]=n(t.body,a.keepalive);S=e,i&&!p(this.#z).contains("content-type",!0)&&this.#z.append("content-type",i,!0)}const D=S??x;if(null!=D&&null==D.source){if(null!=S&&null==t.duplex)throw TypeError("RequestInit: duplex option is required when sending a body.");if("same-origin"!==a.mode&&"cors"!==a.mode)throw TypeError('If request is made from ReadableStream, mode should be "same-origin" or "cors"');a.useCORSPreflightFlag=!0}let P=D;if(null==S&&null!=x){if(o(e.#A))throw TypeError("Cannot construct a Request with a Request object that has already been used.");const t=new TransformStream;x.stream.pipeThrough(t),P={source:x.source,length:x.length,stream:t.readable}}this.#A.body=P}get method(){return N.brandCheck(this,H),this.#A.method}get url(){return N.brandCheck(this,H),D(this.#A.url)}get headers(){return N.brandCheck(this,H),this.#z}get destination(){return N.brandCheck(this,H),this.#A.destination}get referrer(){return(N.brandCheck(this,H),"no-referrer"===this.#A.referrer)?"":"client"===this.#A.referrer?"about:client":this.#A.referrer.toString()}get referrerPolicy(){return N.brandCheck(this,H),this.#A.referrerPolicy}get mode(){return N.brandCheck(this,H),this.#A.mode}get credentials(){return N.brandCheck(this,H),this.#A.credentials}get cache(){return N.brandCheck(this,H),this.#A.cache}get redirect(){return N.brandCheck(this,H),this.#A.redirect}get integrity(){return N.brandCheck(this,H),this.#A.integrity}get keepalive(){return N.brandCheck(this,H),this.#A.keepalive}get isReloadNavigation(){return N.brandCheck(this,H),this.#A.reloadNavigation}get isHistoryNavigation(){return N.brandCheck(this,H),this.#A.historyNavigation}get signal(){return N.brandCheck(this,H),this.#e1}get body(){return N.brandCheck(this,H),this.#A.body?this.#A.body.stream:null}get bodyUsed(){return N.brandCheck(this,H),!!this.#A.body&&f.isDisturbed(this.#A.body.stream)}get duplex(){return N.brandCheck(this,H),"half"}clone(){if(N.brandCheck(this,H),o(this.#A))throw TypeError("unusable");let e=K(this.#A),t=new AbortController;if(this.signal.aborted)t.abort(this.signal.reason);else{let e=P.get(this.signal);void 0===e&&(e=new Set,P.set(this.signal,e));let i=new WeakRef(t);e.add(i),f.addAbortListener(t.signal,$(i))}return Z(e,this.#e2,t.signal,h(this.#z))}[g.inspect.custom](e,t){null===t.depth&&(t.depth=2),t.colors??=!0;let i={method:this.method,url:this.url,headers:this.headers,destination:this.destination,referrer:this.referrer,referrerPolicy:this.referrerPolicy,mode:this.mode,credentials:this.credentials,cache:this.cache,redirect:this.redirect,integrity:this.integrity,keepalive:this.keepalive,isReloadNavigation:this.isReloadNavigation,isHistoryNavigation:this.isHistoryNavigation,signal:this.signal};return`Request ${g.formatWithOptions(t,i)}`}static setRequestSignal(e,t){return e.#e1=t,e}static getRequestDispatcher(e){return e.#e2}static setRequestDispatcher(e,t){e.#e2=t}static setRequestHeaders(e,t){e.#z=t}static getRequestState(e){return e.#A}static setRequestState(e,t){e.#A=t}}let{setRequestSignal:q,getRequestDispatcher:z,setRequestDispatcher:V,setRequestHeaders:G,getRequestState:Y,setRequestState:W}=H;function J(e){return{method:e.method??"GET",localURLsOnly:e.localURLsOnly??!1,unsafeRequest:e.unsafeRequest??!1,body:e.body??null,client:e.client??null,reservedClient:e.reservedClient??null,replacesClientId:e.replacesClientId??"",window:e.window??"client",keepalive:e.keepalive??!1,serviceWorkers:e.serviceWorkers??"all",initiator:e.initiator??"",destination:e.destination??"",priority:e.priority??null,origin:e.origin??"client",policyContainer:e.policyContainer??"client",referrer:e.referrer??"client",referrerPolicy:e.referrerPolicy??"",mode:e.mode??"no-cors",useCORSPreflightFlag:e.useCORSPreflightFlag??!1,credentials:e.credentials??"same-origin",useCredentials:e.useCredentials??!1,cache:e.cache??"default",redirect:e.redirect??"follow",integrity:e.integrity??"",cryptoGraphicsNonceMetadata:e.cryptoGraphicsNonceMetadata??"",parserMetadata:e.parserMetadata??"",reloadNavigation:e.reloadNavigation??!1,historyNavigation:e.historyNavigation??!1,userActivation:e.userActivation??!1,taintedOrigin:e.taintedOrigin??!1,redirectCount:e.redirectCount??0,responseTainting:e.responseTainting??"basic",preventNoCacheCacheControlHeaderModification:e.preventNoCacheCacheControlHeaderModification??!1,done:e.done??!1,timingAllowFailed:e.timingAllowFailed??!1,useURLCredentials:e.useURLCredentials??void 0,traversableForUserPrompts:e.traversableForUserPrompts??"client",urlList:e.urlList,url:e.urlList[0],headersList:e.headersList?new d(e.headersList):new d}}function K(e){let t=J({...e,body:null});return null!=e.body&&(t.body=a(e.body)),t}function Z(e,t,i,r){let n=new H(_);W(n,e),V(n,t),q(n,i);let s=new l(_);return G(n,s),A(s,e.headersList),u(s,r),n}Reflect.deleteProperty(H,"setRequestSignal"),Reflect.deleteProperty(H,"getRequestDispatcher"),Reflect.deleteProperty(H,"setRequestDispatcher"),Reflect.deleteProperty(H,"setRequestHeaders"),Reflect.deleteProperty(H,"getRequestState"),Reflect.deleteProperty(H,"setRequestState"),s(H,Y),Object.defineProperties(H.prototype,{method:S,url:S,headers:S,redirect:S,clone:S,signal:S,duplex:S,destination:S,body:S,bodyUsed:S,isHistoryNavigation:S,isReloadNavigation:S,keepalive:S,integrity:S,cache:S,credentials:S,attribute:S,referrerPolicy:S,referrer:S,mode:S,[Symbol.toStringTag]:{value:"Request",configurable:!0}}),N.is.Request=N.util.MakeTypeAssertion(H),N.converters.RequestInfo=function(e){return"string"==typeof e?N.converters.USVString(e):N.is.Request(e)?e:N.converters.USVString(e)},N.converters.RequestInit=N.dictionaryConverter([{key:"method",converter:N.converters.ByteString},{key:"headers",converter:N.converters.HeadersInit},{key:"body",converter:N.nullableConverter(N.converters.BodyInit)},{key:"referrer",converter:N.converters.USVString},{key:"referrerPolicy",converter:N.converters.DOMString,allowedValues:w},{key:"mode",converter:N.converters.DOMString,allowedValues:v},{key:"credentials",converter:N.converters.DOMString,allowedValues:B},{key:"cache",converter:N.converters.DOMString,allowedValues:Q},{key:"redirect",converter:N.converters.DOMString,allowedValues:I},{key:"integrity",converter:N.converters.DOMString},{key:"keepalive",converter:N.converters.boolean},{key:"signal",converter:N.nullableConverter(e=>N.converters.AbortSignal(e,"RequestInit","signal"))},{key:"window",converter:N.converters.any},{key:"duplex",converter:N.converters.DOMString,allowedValues:x},{key:"dispatcher",converter:N.converters.any},{key:"priority",converter:N.converters.DOMString,allowedValues:["high","low","auto"],defaultValue:()=>"auto"}]),t.exports={Request:H,makeRequest:J,fromInnerRequest:Z,cloneRequest:K,getRequestDispatcher:z,getRequestState:Y}},839086,(e,t,i)=>{"use strict";let r,n=e.r(57328),{runtimeFeatures:s}=e.r(350022),a=new Map([["sha256",0],["sha384",1],["sha512",2]]);if(s.has("crypto")){let t=(r=e.r(666680)).getHashes();for(let e of(0===t.length&&a.clear(),a.keys()))!1===t.includes(e)&&a.delete(e)}else a.clear();let o=Map.prototype.get.bind(a),l=Map.prototype.has.bind(a),c=!1===s.has("crypto")||0===a.size?()=>!0:(e,t)=>{let i=u(t);if(0===i.length)return!0;for(let t of d(i)){let i=t.alg,r=t.val;if(A(h(i,e),r))return!0}return!1};function d(e){let t=[],i=null;for(let r of e){if(n(l(r.alg),"Invalid SRI hash algorithm token"),0===t.length){t.push(r),i=r;continue}let e=o(i.alg),s=o(r.alg);s<e||(s>e?(i=r,t[0]=r,t.length=1):t.push(r))}return t}function u(e){let t=[];for(let i of e.split(" ")){let e=i.split("?",1)[0],r="",n=[e.slice(0,6),e.slice(7)],s=n[0];if(!l(s))continue;n[1]&&(r=n[1]);let a={alg:s,val:r};t.push(a)}return t}let h=(e,t)=>r.hash(e,t,"base64");function A(e,t){let i=e.length;0!==i&&"="===e[i-1]&&(i-=1),0!==i&&"="===e[i-1]&&(i-=1);let r=t.length;if(0!==r&&"="===t[r-1]&&(r-=1),0!==r&&"="===t[r-1]&&(r-=1),i!==r)return!1;for(let r=0;r<i;++r)if(e[r]!==t[r]&&("+"!==e[r]||"-"!==t[r])&&("/"!==e[r]||"_"!==t[r]))return!1;return!0}t.exports={applyAlgorithmToBytes:h,bytesMatch:c,caseSensitiveMatch:A,isValidSRIHashAlgorithm:l,getStrongestMetadata:d,parseMetadata:u}},258548,(e,t,i)=>{"use strict";let r,{makeNetworkError:n,makeAppropriateNetworkError:s,filterResponse:a,makeResponse:o,fromInnerResponse:l,getResponseState:c}=e.r(144796),{HeadersList:d}=e.r(302260),{Request:u,cloneRequest:h,getRequestDispatcher:A,getRequestState:p}=e.r(625461),f=e.r(727028),{makePolicyContainer:g,clonePolicyContainer:m,requestBadPort:y,TAOCheck:b,appendRequestOriginHeader:E,responseLocationURL:C,requestCurrentURL:w,setRequestReferrerPolicyOnRedirect:I,tryUpgradeRequestToAPotentiallyTrustworthyURL:v,createOpaqueTimingInfo:B,appendFetchMetadata:Q,corsCheck:x,crossOriginResourcePolicyCheck:S,determineRequestsReferrer:k,coarsenedSharedCurrentTime:T,sameOrigin:N,isCancelled:D,isAborted:_,isErrorLike:R,fullyReadBody:L,readableStreamClose:F,urlIsLocal:M,urlIsHttpHttpsScheme:O,urlHasHttpsScheme:U,clampAndCoarsenConnectionTimingInfo:P,simpleRangeHeaderValue:$,buildContentRange:j,createInflate:H,extractMimeType:q,hasAuthenticationEntry:z,includesCredentials:V,isTraversableNavigable:G}=e.r(402649),Y=e.r(57328),{safelyExtractBody:W,extractBody:J}=e.r(154718),{redirectStatusSet:K,nullBodyStatus:Z,safeMethodsSet:X,requestBodyHeader:ee,subresourceSet:et}=e.r(267267),ei=e.r(687769),{Readable:er,pipeline:en,finished:es,isErrored:ea,isReadable:eo}=e.r(81111),{addAbortListener:el,bufferToLowerCasedHeaderName:ec}=e.r(122857),{dataURLProcessor:ed,serializeAMimeType:eu,minimizeSupportedMimeType:eh}=e.r(441628),{getGlobalDispatcher:eA}=e.r(312706),{webidl:ep}=e.r(192321),{STATUS_CODES:ef}=e.r(347299),{bytesMatch:eg}=e.r(839086),{createDeferredPromise:em}=e.r(493578),{isomorphicEncode:ey}=e.r(142677),{runtimeFeatures:eb}=e.r(350022),eE=eb.has("zstd"),eC=["GET","HEAD"],ew="u">typeof __UNDICI_IS_NODE__||"u">typeof esbuildDetection?"node":"undici";class eI extends ei{constructor(e){super(),this.dispatcher=e,this.connection=null,this.dump=!1,this.state="ongoing"}terminate(e){"ongoing"===this.state&&(this.state="terminated",this.connection?.destroy(e),this.emit("terminated",e))}abort(e){"ongoing"===this.state&&(this.state="aborted",e||(e=new DOMException("The operation was aborted.","AbortError")),this.serializedAbortReason=e,this.connection?.destroy(e),this.emit("terminated",e))}}function ev(e){eQ(e,"fetch")}function eB(e,t){let i;ep.argumentLengthCheck(arguments,1,"globalThis.fetch");let r=em();try{i=new u(e,t)}catch(e){return r.reject(e),r.promise}let n=p(i);if(i.signal.aborted)return eS(r,n,null,i.signal.reason,null),r.promise;let s=n.client.globalObject;s?.constructor?.name==="ServiceWorkerGlobalScope"&&(n.serviceWorkers="none");let a=null,o=!1,c=null;el(i.signal,()=>{o=!0,Y(null!=c),c.abort(i.signal.reason);let e=a?.deref();eS(r,n,e,i.signal.reason,c.controller)});let d=e=>{if(!o){if(e.aborted)return void eS(r,n,a,c.serializedAbortReason,c.controller);if("error"===e.type)return void r.reject(TypeError("fetch failed",{cause:e.error}));a=new WeakRef(l(e,"immutable")),r.resolve(a.deref()),r=null}};return c=ek({request:n,processResponseEndOfBody:ev,processResponse:d,dispatcher:A(i),requestObject:i}),r.promise}function eQ(e,t="other"){if("error"===e.type&&e.aborted||!e.urlList?.length)return;let i=e.urlList[0],r=e.timingInfo,n=e.cacheState;O(i)&&null!==r&&(e.timingAllowPassed||(r=B({startTime:r.startTime}),n=""),r.endTime=T(),e.timingInfo=r,ex(r,i.href,t,globalThis,n,"",e.status))}let ex=performance.markResourceTiming;function eS(e,t,i,r,n){if(e&&e.reject(r),t.body?.stream!=null&&eo(t.body.stream)&&t.body.stream.cancel(r).catch(e=>{if("ERR_INVALID_STATE"!==e.code)throw e}),null==i)return;let s=c(i);s.body?.stream!=null&&eo(s.body.stream)&&n.error(r)}function ek({request:e,processRequestBodyChunkLength:t,processRequestEndOfBody:i,processResponse:r,processResponseEndOfBody:n,processResponseConsumeBody:s,useParallelQueue:a=!1,dispatcher:o=eA(),requestObject:l=null}){Y(o);let c=null,d=!1;null!=e.client&&(c=e.client.globalObject,d=e.client.crossOriginIsolatedCapability);let u=B({startTime:T(d)}),h={controller:new eI(o),request:e,timingInfo:u,processRequestBodyChunkLength:t,processRequestEndOfBody:i,processResponse:r,processResponseConsumeBody:s,processResponseEndOfBody:n,taskDestination:c,crossOriginIsolatedCapability:d,requestObject:l};if(Y(!e.body||e.body.stream),"client"===e.window&&(e.window=e.client?.globalObject?.constructor?.name==="Window"?e.client:"no-window"),"client"===e.origin&&(e.origin=e.client.origin),"client"===e.policyContainer&&(null!=e.client?e.policyContainer=m(e.client.policyContainer):e.policyContainer=g()),!e.headersList.contains("accept",!0)){let t="*/*";e.headersList.append("accept",t,!0)}return e.headersList.contains("accept-language",!0)||e.headersList.append("accept-language","*",!0),e.priority,et.has(e.destination),eT(h,!1),h.controller}async function eT(e,t){try{let i=e.request,r=null;if(i.localURLsOnly&&!M(w(i))&&(r=n("local URLs only")),v(i),"blocked"===y(i)&&(r=n("bad port")),""===i.referrerPolicy&&(i.referrerPolicy=i.policyContainer.referrerPolicy),"no-referrer"!==i.referrer&&(i.referrer=k(i)),null===r){let t=w(i);N(t,i.url)&&"basic"===i.responseTainting||"data:"===t.protocol||"navigate"===i.mode||"websocket"===i.mode?(i.responseTainting="basic",r=await eN(e)):"same-origin"===i.mode?r=n('request mode cannot be "same-origin"'):"no-cors"===i.mode?"follow"!==i.redirect?r=n('redirect mode cannot be "follow" for "no-cors" request'):(i.responseTainting="opaque",r=await eN(e)):O(w(i))?(i.responseTainting="cors",r=await eR(e)):r=n("URL scheme must be a HTTP(S) scheme")}if(t)return r;0===r.status||r.internalResponse||(i.responseTainting,"basic"===i.responseTainting?r=a(r,"basic"):"cors"===i.responseTainting?r=a(r,"cors"):"opaque"===i.responseTainting?r=a(r,"opaque"):Y(!1));let s=0===r.status?r:r.internalResponse;if(0===s.urlList.length&&s.urlList.push(...i.urlList),i.timingAllowFailed||(r.timingAllowPassed=!0),"opaque"===r.type&&206===s.status&&s.rangeRequested&&!i.headers.contains("range",!0)&&(r=s=n()),0!==r.status&&("HEAD"===i.method||"CONNECT"===i.method||Z.includes(s.status))&&(s.body=null,e.controller.dump=!0),i.integrity){let t=t=>e_(e,n(t));if("opaque"===i.responseTainting||null==r.body)return void t(r.error);let s=n=>{eg(n,i.integrity)?(r.body=W(n)[0],e_(e,r)):t("integrity mismatch")};L(r.body,s,t)}else e_(e,r)}catch(t){e.controller.terminate(t)}}function eN(t){if(D(t)&&0===t.request.redirectCount)return Promise.resolve(s(t));let{request:i}=t,{protocol:a}=w(i);switch(a){case"about:":return Promise.resolve(n("about scheme is not supported"));case"blob:":{r||(r=e.r(951615).resolveObjectURL);let t=w(i);if(0!==t.search.length)return Promise.resolve(n("NetworkError when attempting to fetch resource."));let s=r(t.toString());if("GET"!==i.method||!ep.is.Blob(s))return Promise.resolve(n("invalid method"));let a=o(),l=s.size,c=ey(`${l}`),d=s.type;if(i.headersList.contains("range",!0)){a.rangeRequested=!0;let e=$(i.headersList.get("range",!0),!0);if("failure"===e)return Promise.resolve(n("failed to fetch the data URL"));let{rangeStartValue:t,rangeEndValue:r}=e;if(null===t)r=(t=l-r)+r-1;else{if(t>=l)return Promise.resolve(n("Range start is greater than the blob's size."));(null===r||r>=l)&&(r=l-1)}let o=s.slice(t,r+1,d);a.body=J(o)[0];let c=ey(`${o.size}`),u=j(t,r,l);a.status=206,a.statusText="Partial Content",a.headersList.set("content-length",c,!0),a.headersList.set("content-type",d,!0),a.headersList.set("content-range",u,!0)}else{let e=J(s);a.statusText="OK",a.body=e[0],a.headersList.set("content-length",c,!0),a.headersList.set("content-type",d,!0)}return Promise.resolve(a)}case"data:":{let e=ed(w(i));if("failure"===e)return Promise.resolve(n("failed to fetch the data URL"));return Promise.resolve(o({statusText:"OK",headersList:[["content-type",{name:"Content-Type",value:eu(e.mimeType)}]],body:W(e.body)[0]}))}case"file:":return Promise.resolve(n("not implemented... yet..."));case"http:":case"https:":return eR(t).catch(e=>n(e));default:return Promise.resolve(n("unknown scheme"))}}function eD(e,t){e.request.done=!0,null!=e.processResponseDone&&queueMicrotask(()=>e.processResponseDone(t))}function e_(e,t){let i=e.timingInfo,r=()=>{let r=Date.now();"document"===e.request.destination&&(e.controller.fullTimingInfo=i),e.controller.reportTimingSteps=()=>{if(!O(e.request.url))return;i.endTime=r;let n=t.cacheState,s=t.bodyInfo;t.timingAllowPassed||(i=B(i),n="");let a=0;if("navigator"!==e.request.mode||!t.hasCrossOriginRedirects){a=t.status;let e=q(t.headersList);"failure"!==e&&(s.contentType=eh(e))}null!=e.request.initiatorType&&ex(i,e.request.url.href,e.request.initiatorType,globalThis,n,s,a)};let n=()=>{e.request.done=!0,null!=e.processResponseEndOfBody&&queueMicrotask(()=>e.processResponseEndOfBody(t)),null!=e.request.initiatorType&&e.controller.reportTimingSteps()};queueMicrotask(()=>n())};null!=e.processResponse&&queueMicrotask(()=>{e.processResponse(t),e.processResponse=null});let n="error"===t.type?t:t.internalResponse??t;null==n.body?r():es(n.body.stream,()=>{r()})}async function eR(e){let t=e.request,i=null,r=null,s=e.timingInfo;if(t.serviceWorkers,null===i){if("follow"===t.redirect&&(t.serviceWorkers="none"),r=i=await eF(e),"cors"===t.responseTainting&&"failure"===x(t,i))return n("cors failure");"failure"===b(t,i)&&(t.timingAllowFailed=!0)}return("opaque"===t.responseTainting||"opaque"===i.type)&&"blocked"===S(t.origin,t.client,t.destination,r)?n("blocked"):(K.has(r.status)&&("manual"!==t.redirect&&e.controller.connection.destroy(void 0,!1),"error"===t.redirect?i=n("unexpected redirect"):"manual"===t.redirect?i=r:"follow"===t.redirect?i=await eL(e,i):Y(!1)),i.timingInfo=s,i)}function eL(e,t){let i,r=e.request,s=t.internalResponse?t.internalResponse:t;try{if(i=C(s,w(r).hash),null==i)return t}catch(e){return Promise.resolve(n(e))}if(!O(i))return Promise.resolve(n("URL scheme must be a HTTP(S) scheme"));if(20===r.redirectCount)return Promise.resolve(n("redirect count exceeded"));if(r.redirectCount+=1,"cors"===r.mode&&(i.username||i.password)&&!N(r,i))return Promise.resolve(n('cross origin not allowed for request mode "cors"'));if("cors"===r.responseTainting&&(i.username||i.password))return Promise.resolve(n('URL cannot contain credentials for request mode "cors"'));if(303!==s.status&&null!=r.body&&null==r.body.source)return Promise.resolve(n());if([301,302].includes(s.status)&&"POST"===r.method||303===s.status&&!eC.includes(r.method))for(let e of(r.method="GET",r.body=null,ee))r.headersList.delete(e);N(w(r),i)||(r.headersList.delete("authorization",!0),r.headersList.delete("proxy-authorization",!0),r.headersList.delete("cookie",!0),r.headersList.delete("host",!0)),null!=r.body&&(Y(null!=r.body.source),r.body=W(r.body.source)[0]);let a=e.timingInfo;return a.redirectEndTime=a.postRedirectStartTime=T(e.crossOriginIsolatedCapability),0===a.redirectStartTime&&(a.redirectStartTime=a.startTime),r.urlList.push(i),I(r,s),eT(e,!0)}async function eF(e,t=!1,i=!1){let r=e.request,a=null,o=null,l=null,c=null,d=!1;"no-window"===r.window&&"error"===r.redirect?(a=e,o=r):(o=h(r),(a={...e}).request=o);let u="include"===r.credentials||"same-origin"===r.credentials&&"basic"===r.responseTainting,A=o.body?o.body.length:null,p=null;if(null==o.body&&["POST","PUT"].includes(o.method)&&(p="0"),null!=A&&(p=ey(`${A}`)),null!=p&&o.headersList.append("content-length",p,!0),null!=A&&o.keepalive,ep.is.URL(o.referrer)&&o.headersList.append("referer",ey(o.referrer.href),!0),E(o),Q(o),o.headersList.contains("user-agent",!0)||o.headersList.append("user-agent",ew,!0),"default"===o.cache&&(o.headersList.contains("if-modified-since",!0)||o.headersList.contains("if-none-match",!0)||o.headersList.contains("if-unmodified-since",!0)||o.headersList.contains("if-match",!0)||o.headersList.contains("if-range",!0))&&(o.cache="no-store"),"no-cache"!==o.cache||o.preventNoCacheCacheControlHeaderModification||o.headersList.contains("cache-control",!0)||o.headersList.append("cache-control","max-age=0",!0),("no-store"===o.cache||"reload"===o.cache)&&(o.headersList.contains("pragma",!0)||o.headersList.append("pragma","no-cache",!0),o.headersList.contains("cache-control",!0)||o.headersList.append("cache-control","no-cache",!0)),o.headersList.contains("range",!0)&&o.headersList.append("accept-encoding","identity",!0),o.headersList.contains("accept-encoding",!0)||(U(w(o))?o.headersList.append("accept-encoding","br, gzip, deflate",!0):o.headersList.append("accept-encoding","gzip, deflate",!0)),o.headersList.delete("host",!0),u&&!o.headersList.contains("authorization",!0)){let e=null;if(z(o)&&(void 0===o.useURLCredentials||!V(w(o))));else if(V(w(o))&&t){let{username:t,password:i}=w(o);e=`Basic ${Buffer.from(`${t}:${i}`).toString("base64")}`}null!==e&&o.headersList.append("Authorization",e,!1)}if(null==c&&(o.cache="no-store"),"no-store"!==o.cache&&o.cache,null==l){if("only-if-cached"===o.cache)return n("only if cached");let e=await eM(a,u,i);!X.has(o.method)&&e.status>=200&&e.status,d&&e.status,null==l&&(l=e)}if(l.urlList=[...o.urlList],o.headersList.contains("range",!0)&&(l.rangeRequested=!0),l.requestIncludesCredentials=u,401===l.status&&"cors"!==o.responseTainting&&u&&G(r.traversableForUserPrompts)){if(null!=r.body){if(null==r.body.source)return n("expected non-null body source");r.body=W(r.body.source)[0]}if(void 0===r.useURLCredentials||t)return D(e)?s(e):l;e.controller.connection.destroy(),l=await eF(e,!0)}if(407===l.status)return"no-window"===r.window?n():D(e)?s(e):n("proxy authentication required");if(421===l.status&&!i&&(null==r.body||null!=r.body.source)){if(D(e))return s(e);e.controller.connection.destroy(),l=await eF(e,t,!0)}return l}async function eM(e,t=!1,i=!1){Y(!e.controller.connection||e.controller.connection.destroyed),e.controller.connection={abort:null,destroyed:!1,destroy(e,t=!0){!this.destroyed&&(this.destroyed=!0,t&&this.abort?.(e??new DOMException("The operation was aborted.","AbortError")))}};let r=e.request,a=null,l=e.timingInfo;r.cache="no-store",r.mode;let c=null;if(null==r.body&&e.processRequestEndOfBody)queueMicrotask(()=>e.processRequestEndOfBody());else if(null!=r.body){let t=async function*(t){D(e)||(yield t,e.processRequestBodyChunkLength?.(t.byteLength))},i=()=>{!D(e)&&e.processRequestEndOfBody&&e.processRequestEndOfBody()},n=t=>{D(e)||("AbortError"===t.name?e.controller.abort():e.controller.terminate(t))};c=async function*(){try{for await(let e of r.body.stream)yield*t(e);i()}catch(e){n(e)}}()}try{let{body:t,status:i,statusText:r,headersList:n,socket:s}=await A({body:c});if(s)a=o({status:i,statusText:r,headersList:n,socket:s});else{let s=t[Symbol.asyncIterator]();e.controller.next=()=>s.next(),a=o({status:i,statusText:r,headersList:n})}}catch(t){if("AbortError"===t.name)return e.controller.connection.destroy(),s(e,t);return n(t)}let u=new ReadableStream({start(t){e.controller.controller=t},pull:()=>e.controller.resume(),cancel:t=>{D(e)||e.controller.abort(t)},type:"bytes"});function h(t){_(e)?(a.aborted=!0,eo(u)&&e.controller.controller.error(e.controller.serializedAbortReason)):eo(u)&&e.controller.controller.error(TypeError("terminated",{cause:R(t)?t:void 0})),e.controller.connection.destroy()}return a.body={stream:u,source:null,length:null},e.controller.resume||e.controller.on("terminated",h),e.controller.resume=async()=>{for(;;){let t,i;try{let{done:i,value:r}=await e.controller.next();if(_(e))break;t=i?void 0:r}catch(r){e.controller.ended&&!l.encodedBodySize?t=void 0:(t=r,i=!0)}if(void 0===t){F(e.controller.controller),eD(e,a);return}if(l.decodedBodySize+=t?.byteLength??0,i)return void e.controller.terminate(t);let r=new Uint8Array(t);if(r.byteLength&&e.controller.controller.enqueue(r),ea(u))return void e.controller.terminate();if(e.controller.controller.desiredSize<=0)return}},a;function A({body:t}){let i=w(r),n=e.controller.dispatcher,s=i.pathname+i.search,a=0===i.search.length&&"?"===i.href[i.href.length-i.hash.length-1];return new Promise((o,c)=>n.dispatch({path:a?`${s}?`:s,origin:i.origin,method:r.method,body:n.isMockActive?r.body&&(r.body.source||r.body.stream):t,headers:r.headersList.entries,maxRedirections:0,upgrade:"websocket"===r.mode?"websocket":void 0},{body:null,abort:null,onConnect(t){let{connection:i}=e.controller;l.finalConnectionTimingInfo=P(void 0,l.postRedirectStartTime,e.crossOriginIsolatedCapability),i.destroyed?t(new DOMException("The operation was aborted.","AbortError")):(e.controller.on("terminated",t),this.abort=i.abort=t),l.finalNetworkRequestStartTime=T(e.crossOriginIsolatedCapability)},onResponseStarted(){l.finalNetworkResponseStartTime=T(e.crossOriginIsolatedCapability)},onHeaders(e,t,i,n){if(e<200)return!1;let s=new d;for(let e=0;e<t.length;e+=2)s.append(ec(t[e]),t[e+1].toString("latin1"),!0);let a=s.get("location",!0);this.body=new er({read:i});let l=a&&"follow"===r.redirect&&K.has(e),u=[];if("HEAD"!==r.method&&"CONNECT"!==r.method&&!Z.includes(e)&&!l){let e=s.get("content-encoding",!0),t=e?e.toLowerCase().split(","):[],i=5;if(t.length>i)return c(Error(`too many content-encodings in response: ${t.length}, maximum allowed is ${i}`)),!0;for(let e=t.length-1;e>=0;--e){let i=t[e].trim();if("x-gzip"===i||"gzip"===i)u.push(f.createGunzip({flush:f.constants.Z_SYNC_FLUSH,finishFlush:f.constants.Z_SYNC_FLUSH}));else if("deflate"===i)u.push(H({flush:f.constants.Z_SYNC_FLUSH,finishFlush:f.constants.Z_SYNC_FLUSH}));else if("br"===i)u.push(f.createBrotliDecompress({flush:f.constants.BROTLI_OPERATION_FLUSH,finishFlush:f.constants.BROTLI_OPERATION_FLUSH}));else if("zstd"===i&&eE)u.push(f.createZstdDecompress({flush:f.constants.ZSTD_e_continue,finishFlush:f.constants.ZSTD_e_end}));else{u.length=0;break}}}let h=this.onError.bind(this);return o({status:e,statusText:n,headersList:s,body:u.length?en(this.body,...u,e=>{e&&this.onError(e)}).on("error",h):this.body.on("error",h)}),!0},onData(t){if(e.controller.dump)return;let i=t;return l.encodedBodySize+=i.byteLength,this.body.push(i)},onComplete(){this.abort&&e.controller.off("terminated",this.abort),e.controller.ended=!0,this.body.push(null)},onError(t){this.abort&&e.controller.off("terminated",this.abort),this.body?.destroy(t),e.controller.terminate(t),c(t)},onRequestUpgrade(e,t,i,r){if(null!=r.session&&200!==t||null==r.session&&101!==t)return!1;let n=new d;for(let[e,t]of Object.entries(i)){if(null==t)continue;let i=e.toLowerCase();if(Array.isArray(t))for(let e of t)n.append(i,String(e),!0);else n.append(i,String(t),!0)}return o({status:t,statusText:ef[t],headersList:n,socket:r}),!0},onUpgrade(e,t,i){if(null!=i.session&&200!==e||null==i.session&&101!==e)return!1;let r=new d;for(let e=0;e<t.length;e+=2)r.append(ec(t[e]),t[e+1].toString("latin1"),!0);return o({status:e,statusText:ef[e],headersList:r,socket:i}),!0}}))}}t.exports={fetch:eB,Fetch:eI,fetching:ek,finalizeAndReportTiming:eQ}},576801,(e,t,i)=>{"use strict";let r=e.r(57328),{URLSerializer:n}=e.r(441628),{isValidHeaderName:s}=e.r(402649);t.exports={urlEquals:function(e,t,i=!1){return n(e,i)===n(t,i)},getFieldValues:function(e){r(null!==e);let t=[];for(let i of e.split(","))s(i=i.trim())&&t.push(i);return t}}},947769,(e,t,i)=>{"use strict";let r=e.r(57328),{kConstruct:n}=e.r(954673),{urlEquals:s,getFieldValues:a}=e.r(576801),{kEnumerableProperty:o,isDisturbed:l}=e.r(122857),{webidl:c}=e.r(192321),{cloneResponse:d,fromInnerResponse:u,getResponseState:h}=e.r(144796),{Request:A,fromInnerRequest:p,getRequestState:f}=e.r(625461),{fetching:g}=e.r(258548),{urlIsHttpHttpsScheme:m,readAllBytes:y}=e.r(402649),{createDeferredPromise:b}=e.r(493578);class E{#e4;constructor(){arguments[0]!==n&&c.illegalConstructor(),c.util.markAsUncloneable(this),this.#e4=arguments[1]}async match(e,t={}){c.brandCheck(this,E);let i="Cache.match";c.argumentLengthCheck(arguments,1,i),e=c.converters.RequestInfo(e),t=c.converters.CacheQueryOptions(t,i,"options");let r=this.#e5(e,t,1);if(0!==r.length)return r[0]}async matchAll(e,t={}){c.brandCheck(this,E);let i="Cache.matchAll";return void 0!==e&&(e=c.converters.RequestInfo(e)),t=c.converters.CacheQueryOptions(t,i,"options"),this.#e5(e,t)}async add(e){c.brandCheck(this,E);let t="Cache.add";c.argumentLengthCheck(arguments,1,t);let i=[e=c.converters.RequestInfo(e)],r=this.addAll(i);return await r}async addAll(e){c.brandCheck(this,E);let t="Cache.addAll";c.argumentLengthCheck(arguments,1,t);let i=[],r=[];for(let i of e){if(void 0===i)throw c.errors.conversionFailed({prefix:t,argument:"Argument 1",types:["undefined is not allowed"]});if("string"==typeof(i=c.converters.RequestInfo(i)))continue;let e=f(i);if(!m(e.url)||"GET"!==e.method)throw c.errors.exception({header:t,message:"Expected http/s scheme when method is not GET."})}let n=[];for(let s of e){let e=f(new A(s));if(!m(e.url))throw c.errors.exception({header:t,message:"Expected http/s scheme."});e.initiator="fetch",e.destination="subresource",r.push(e);let o=b();n.push(g({request:e,processResponse(e){if("error"===e.type||206===e.status||e.status<200||e.status>299)o.reject(c.errors.exception({header:"Cache.addAll",message:"Received an invalid status code or the request failed."}));else if(e.headersList.contains("vary")){for(let t of a(e.headersList.get("vary")))if("*"===t){for(let e of(o.reject(c.errors.exception({header:"Cache.addAll",message:"invalid vary field value"})),n))e.abort();return}}},processResponseEndOfBody(e){e.aborted?o.reject(new DOMException("aborted","AbortError")):o.resolve(e)}})),i.push(o.promise)}let s=Promise.all(i),o=await s,l=[],d=0;for(let e of o){let t={type:"put",request:r[d],response:e};l.push(t),d++}let u=b(),h=null;try{this.#e3(l)}catch(e){h=e}return queueMicrotask(()=>{null===h?u.resolve(void 0):u.reject(h)}),u.promise}async put(e,t){c.brandCheck(this,E);let i="Cache.put";c.argumentLengthCheck(arguments,2,i),e=c.converters.RequestInfo(e),t=c.converters.Response(t,i,"response");let r=null;if(!m((r=c.is.Request(e)?f(e):f(new A(e))).url)||"GET"!==r.method)throw c.errors.exception({header:i,message:"Expected an http/s scheme when method is not GET"});let n=h(t);if(206===n.status)throw c.errors.exception({header:i,message:"Got 206 status"});if(n.headersList.contains("vary")){for(let e of a(n.headersList.get("vary")))if("*"===e)throw c.errors.exception({header:i,message:"Got * vary field value"})}if(n.body&&(l(n.body.stream)||n.body.stream.locked))throw c.errors.exception({header:i,message:"Response body is locked or disturbed"});let s=d(n),o=b();null!=n.body?y(n.body.stream.getReader(),o.resolve,o.reject):o.resolve(void 0);let u=[],p={type:"put",request:r,response:s};u.push(p);let g=await o.promise;null!=s.body&&(s.body.source=g);let C=b(),w=null;try{this.#e3(u)}catch(e){w=e}return queueMicrotask(()=>{null===w?C.resolve():C.reject(w)}),C.promise}async delete(e,t={}){let i;c.brandCheck(this,E);let n="Cache.delete";c.argumentLengthCheck(arguments,1,n),e=c.converters.RequestInfo(e),t=c.converters.CacheQueryOptions(t,n,"options");let s=null;if(c.is.Request(e)){if("GET"!==(s=f(e)).method&&!t.ignoreMethod)return!1}else r("string"==typeof e),s=f(new A(e));let a=[],o={type:"delete",request:s,options:t};a.push(o);let l=b(),d=null;try{i=this.#e3(a)}catch(e){d=e}return queueMicrotask(()=>{null===d?l.resolve(!!i?.length):l.reject(d)}),l.promise}async keys(e,t={}){c.brandCheck(this,E);let i="Cache.keys";void 0!==e&&(e=c.converters.RequestInfo(e)),t=c.converters.CacheQueryOptions(t,i,"options");let r=null;if(void 0!==e)if(c.is.Request(e)){if("GET"!==(r=f(e)).method&&!t.ignoreMethod)return[]}else"string"==typeof e&&(r=f(new A(e)));let n=b(),s=[];if(void 0===e)for(let e of this.#e4)s.push(e[0]);else for(let e of this.#e8(r,t))s.push(e[0]);return queueMicrotask(()=>{let e=[];for(let t of s){let i=p(t,void 0,new AbortController().signal,"immutable");e.push(i)}n.resolve(Object.freeze(e))}),n.promise}#e3(e){let t=this.#e4,i=[...t],n=[],s=[];try{for(let i of e){let e;if("delete"!==i.type&&"put"!==i.type)throw c.errors.exception({header:"Cache.#batchCacheOperations",message:'operation type does not match "delete" or "put"'});if("delete"===i.type&&null!=i.response)throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"delete operation should not have an associated response"});if(this.#e8(i.request,i.options,n).length)throw new DOMException("???","InvalidStateError");if("delete"===i.type){if(e=this.#e8(i.request,i.options),0===e.length)return[];for(let i of e){let e=t.indexOf(i);r(-1!==e),t.splice(e,1)}}else if("put"===i.type){if(null==i.response)throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"put operation should have an associated response"});let s=i.request;if(!m(s.url))throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"expected http or https scheme"});if("GET"!==s.method)throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"not get method"});if(null!=i.options)throw c.errors.exception({header:"Cache.#batchCacheOperations",message:"options must not be defined"});for(let n of e=this.#e8(i.request)){let e=t.indexOf(n);r(-1!==e),t.splice(e,1)}t.push([i.request,i.response]),n.push([i.request,i.response])}s.push([i.request,i.response])}return s}catch(e){throw this.#e4.length=0,this.#e4=i,e}}#e8(e,t,i){let r=[];for(let n of i??this.#e4){let[i,s]=n;this.#e9(e,i,s,t)&&r.push(n)}return r}#e9(e,t,i=null,r){let n=new URL(e.url),o=new URL(t.url);if(r?.ignoreSearch&&(o.search="",n.search=""),!s(n,o,!0))return!1;if(null==i||r?.ignoreVary||!i.headersList.contains("vary"))return!0;for(let r of a(i.headersList.get("vary")))if("*"===r||t.headersList.get(r)!==e.headersList.get(r))return!1;return!0}#e5(e,t,i=1/0){let r=null;if(void 0!==e)if(c.is.Request(e)){if("GET"!==(r=f(e)).method&&!t.ignoreMethod)return[]}else"string"==typeof e&&(r=f(new A(e)));let n=[];if(void 0===e)for(let e of this.#e4)n.push(e[1]);else for(let e of this.#e8(r,t))n.push(e[1]);let s=[];for(let e of n){let t=u(d(e),"immutable");if(s.push(t),s.length>=i)break}return Object.freeze(s)}}Object.defineProperties(E.prototype,{[Symbol.toStringTag]:{value:"Cache",configurable:!0},match:o,matchAll:o,add:o,addAll:o,put:o,delete:o,keys:o});let C=[{key:"ignoreSearch",converter:c.converters.boolean,defaultValue:()=>!1},{key:"ignoreMethod",converter:c.converters.boolean,defaultValue:()=>!1},{key:"ignoreVary",converter:c.converters.boolean,defaultValue:()=>!1}];c.converters.CacheQueryOptions=c.dictionaryConverter(C),c.converters.MultiCacheQueryOptions=c.dictionaryConverter([...C,{key:"cacheName",converter:c.converters.DOMString}]),c.converters.Response=c.interfaceConverter(c.is.Response,"Response"),c.converters["sequence<RequestInfo>"]=c.sequenceConverter(c.converters.RequestInfo),t.exports={Cache:E}},446161,(e,t,i)=>{"use strict";let{Cache:r}=e.r(947769),{webidl:n}=e.r(192321),{kEnumerableProperty:s}=e.r(122857),{kConstruct:a}=e.r(954673);class o{#e6=new Map;constructor(){arguments[0]!==a&&n.illegalConstructor(),n.util.markAsUncloneable(this)}async match(e,t={}){if(n.brandCheck(this,o),n.argumentLengthCheck(arguments,1,"CacheStorage.match"),e=n.converters.RequestInfo(e),null!=(t=n.converters.MultiCacheQueryOptions(t)).cacheName){if(this.#e6.has(t.cacheName)){let i=new r(a,this.#e6.get(t.cacheName));return await i.match(e,t)}}else for(let i of this.#e6.values()){let n=new r(a,i),s=await n.match(e,t);if(void 0!==s)return s}}async has(e){n.brandCheck(this,o);let t="CacheStorage.has";return n.argumentLengthCheck(arguments,1,t),e=n.converters.DOMString(e,t,"cacheName"),this.#e6.has(e)}async open(e){n.brandCheck(this,o);let t="CacheStorage.open";if(n.argumentLengthCheck(arguments,1,t),e=n.converters.DOMString(e,t,"cacheName"),this.#e6.has(e))return new r(a,this.#e6.get(e));let i=[];return this.#e6.set(e,i),new r(a,i)}async delete(e){n.brandCheck(this,o);let t="CacheStorage.delete";return n.argumentLengthCheck(arguments,1,t),e=n.converters.DOMString(e,t,"cacheName"),this.#e6.delete(e)}async keys(){return n.brandCheck(this,o),[...this.#e6.keys()]}}Object.defineProperties(o.prototype,{[Symbol.toStringTag]:{value:"CacheStorage",configurable:!0},match:s,has:s,open:s,delete:s,keys:s}),t.exports={CacheStorage:o}},839599,(e,t,i)=>{"use strict";t.exports={maxAttributeValueSize:1024,maxNameValuePairSize:4096}},756139,(e,t,i)=>{"use strict";function r(e){for(let t=0;t<e.length;++t){let i=e.charCodeAt(t);if(i>=0&&i<=8||i>=10&&i<=31||127===i)return!0}return!1}function n(e){for(let t=0;t<e.length;++t){let i=e.charCodeAt(t);if(i<33||i>126||34===i||40===i||41===i||60===i||62===i||64===i||44===i||59===i||58===i||92===i||47===i||91===i||93===i||63===i||61===i||123===i||125===i)throw Error("Invalid cookie name")}}function s(e){let t=e.length,i=0;if('"'===e[0]){if(1===t||'"'!==e[t-1])throw Error("Invalid cookie value");--t,++i}for(;i<t;){let t=e.charCodeAt(i++);if(t<33||t>126||34===t||44===t||59===t||92===t)throw Error("Invalid cookie value")}}function a(e){for(let t=0;t<e.length;++t){let i=e.charCodeAt(t);if(i<32||127===i||59===i)throw Error("Invalid cookie path")}}function o(e){if(e.startsWith("-")||e.endsWith(".")||e.endsWith("-"))throw Error("Invalid cookie domain")}let l=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],c=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],d=Array(61).fill(0).map((e,t)=>t.toString().padStart(2,"0"));function u(e){return"number"==typeof e&&(e=new Date(e)),`${l[e.getUTCDay()]}, ${d[e.getUTCDate()]} ${c[e.getUTCMonth()]} ${e.getUTCFullYear()} ${d[e.getUTCHours()]}:${d[e.getUTCMinutes()]}:${d[e.getUTCSeconds()]} GMT`}function h(e){if(e<0)throw Error("Invalid cookie max-age")}function A(e){if(0===e.name.length)return null;n(e.name),s(e.value);let t=[`${e.name}=${e.value}`];for(let i of(e.name.startsWith("__Secure-")&&(e.secure=!0),e.name.startsWith("__Host-")&&(e.secure=!0,e.domain=null,e.path="/"),e.secure&&t.push("Secure"),e.httpOnly&&t.push("HttpOnly"),"number"==typeof e.maxAge&&(h(e.maxAge),t.push(`Max-Age=${e.maxAge}`)),e.domain&&(o(e.domain),t.push(`Domain=${e.domain}`)),e.path&&(a(e.path),t.push(`Path=${e.path}`)),e.expires&&"Invalid Date"!==e.expires.toString()&&t.push(`Expires=${u(e.expires)}`),e.sameSite&&t.push(`SameSite=${e.sameSite}`),e.unparsed)){if(!i.includes("="))throw Error("Invalid unparsed");let[e,...r]=i.split("=");t.push(`${e.trim()}=${r.join("=")}`)}return t.join("; ")}t.exports={isCTLExcludingHtab:r,validateCookieName:n,validateCookiePath:a,validateCookieValue:s,toIMFDate:u,stringify:A}},1796,(e,t,i)=>{"use strict";let{collectASequenceOfCodePointsFast:r}=e.r(142677),{maxNameValuePairSize:n,maxAttributeValueSize:s}=e.r(839599),{isCTLExcludingHtab:a}=e.r(756139),o=e.r(57328),{unescape:l}=e.r(483324);function c(e,t={}){if(0===e.length)return t;o(";"===e[0]);let i="";(e=e.slice(1)).includes(";")?(i=r(";",e,{position:0}),e=e.slice(i.length)):(i=e,e="");let n="",a="";if(i.includes("=")){let e={position:0};n=r("=",i,e),a=i.slice(e.position+1)}else n=i;if(n=n.trim(),(a=a.trim()).length>s)return c(e,t);let l=n.toLowerCase();if("expires"===l)t.expires=new Date(a);else if("max-age"===l){let i=a.charCodeAt(0);if((i<48||i>57)&&"-"!==a[0]||!/^\d+$/.test(a))return c(e,t);t.maxAge=Number(a)}else if("domain"===l){let e=a;"."===e[0]&&(e=e.slice(1)),t.domain=e=e.toLowerCase()}else if("path"===l){let e="";t.path=e=0===a.length||"/"!==a[0]?"/":a}else if("secure"===l)t.secure=!0;else if("httponly"===l)t.httpOnly=!0;else if("samesite"===l){let e="Default",i=a.toLowerCase();i.includes("none")&&(e="None"),i.includes("strict")&&(e="Strict"),i.includes("lax")&&(e="Lax"),t.sameSite=e}else t.unparsed??=[],t.unparsed.push(`${n}=${a}`);return c(e,t)}t.exports={parseSetCookie:function(e){if(a(e))return null;let t="",i="",s="",o="";if(e.includes(";")){let n={position:0};t=r(";",e,n),i=e.slice(n.position)}else t=e;if(t.includes("=")){let e={position:0};s=r("=",t,e),o=t.slice(e.position+1)}else o=t;return(s=s.trim(),o=o.trim(),s.length+o.length>n)?null:{name:s,value:l(o),...c(i)}},parseUnparsedAttributes:c}},929077,(e,t,i)=>{"use strict";let{parseSetCookie:r}=e.r(1796),{stringify:n}=e.r(756139),{webidl:s}=e.r(192321),{Headers:a}=e.r(302260),o=s.brandCheckMultiple([a,globalThis.Headers].filter(Boolean));function l(e){s.argumentLengthCheck(arguments,1,"getCookies"),o(e);let t=e.get("cookie"),i={};if(!t)return i;for(let e of t.split(";")){let[t,...r]=e.split("=");i[t.trim()]=r.join("=")}return i}function c(e,t,i){o(e);let r="deleteCookie";s.argumentLengthCheck(arguments,2,r),t=s.converters.DOMString(t,r,"name"),i=s.converters.DeleteCookieAttributes(i),h(e,{name:t,value:"",expires:new Date(0),...i})}function d(e){s.argumentLengthCheck(arguments,1,"getSetCookies"),o(e);let t=e.getSetCookie();return t?t.map(e=>r(e)):[]}function u(e){return r(e=s.converters.DOMString(e))}function h(e,t){s.argumentLengthCheck(arguments,2,"setCookie"),o(e);let i=n(t=s.converters.Cookie(t));i&&e.append("set-cookie",i,!0)}s.converters.DeleteCookieAttributes=s.dictionaryConverter([{converter:s.nullableConverter(s.converters.DOMString),key:"path",defaultValue:()=>null},{converter:s.nullableConverter(s.converters.DOMString),key:"domain",defaultValue:()=>null}]),s.converters.Cookie=s.dictionaryConverter([{converter:s.converters.DOMString,key:"name"},{converter:s.converters.DOMString,key:"value"},{converter:s.nullableConverter(e=>"number"==typeof e?s.converters["unsigned long long"](e):new Date(e)),key:"expires",defaultValue:()=>null},{converter:s.nullableConverter(s.converters["long long"]),key:"maxAge",defaultValue:()=>null},{converter:s.nullableConverter(s.converters.DOMString),key:"domain",defaultValue:()=>null},{converter:s.nullableConverter(s.converters.DOMString),key:"path",defaultValue:()=>null},{converter:s.nullableConverter(s.converters.boolean),key:"secure",defaultValue:()=>null},{converter:s.nullableConverter(s.converters.boolean),key:"httpOnly",defaultValue:()=>null},{converter:s.converters.USVString,key:"sameSite",allowedValues:["Strict","Lax","None"]},{converter:s.sequenceConverter(s.converters.DOMString),key:"unparsed",defaultValue:()=>[]}]),t.exports={getCookies:l,deleteCookie:c,getSetCookies:d,setCookie:h,parseCookie:u}},925087,(e,t,i)=>{"use strict";let{webidl:r}=e.r(192321),{kEnumerableProperty:n}=e.r(122857),{kConstruct:s}=e.r(954673);class a extends Event{#e7;constructor(e,t={}){if(e===s){super(arguments[1],arguments[2]),r.util.markAsUncloneable(this);return}const i="MessageEvent constructor";r.argumentLengthCheck(arguments,1,i),super(e=r.converters.DOMString(e,i,"type"),t=r.converters.MessageEventInit(t,i,"eventInitDict")),this.#e7=t,r.util.markAsUncloneable(this)}get data(){return r.brandCheck(this,a),this.#e7.data}get origin(){return r.brandCheck(this,a),this.#e7.origin}get lastEventId(){return r.brandCheck(this,a),this.#e7.lastEventId}get source(){return r.brandCheck(this,a),this.#e7.source}get ports(){return r.brandCheck(this,a),Object.isFrozen(this.#e7.ports)||Object.freeze(this.#e7.ports),this.#e7.ports}initMessageEvent(e,t=!1,i=!1,n=null,s="",o="",l=null,c=[]){return r.brandCheck(this,a),r.argumentLengthCheck(arguments,1,"MessageEvent.initMessageEvent"),new a(e,{bubbles:t,cancelable:i,data:n,origin:s,lastEventId:o,source:l,ports:c})}static createFastMessageEvent(e,t){let i=new a(s,e,t);return i.#e7=t,i.#e7.data??=null,i.#e7.origin??="",i.#e7.lastEventId??="",i.#e7.source??=null,i.#e7.ports??=[],i}}let{createFastMessageEvent:o}=a;delete a.createFastMessageEvent;class l extends Event{#e7;constructor(e,t={}){const i="CloseEvent constructor";r.argumentLengthCheck(arguments,1,i),super(e=r.converters.DOMString(e,i,"type"),t=r.converters.CloseEventInit(t)),this.#e7=t,r.util.markAsUncloneable(this)}get wasClean(){return r.brandCheck(this,l),this.#e7.wasClean}get code(){return r.brandCheck(this,l),this.#e7.code}get reason(){return r.brandCheck(this,l),this.#e7.reason}}class c extends Event{#e7;constructor(e,t){const i="ErrorEvent constructor";r.argumentLengthCheck(arguments,1,i),super(e,t),r.util.markAsUncloneable(this),e=r.converters.DOMString(e,i,"type"),t=r.converters.ErrorEventInit(t??{}),this.#e7=t}get message(){return r.brandCheck(this,c),this.#e7.message}get filename(){return r.brandCheck(this,c),this.#e7.filename}get lineno(){return r.brandCheck(this,c),this.#e7.lineno}get colno(){return r.brandCheck(this,c),this.#e7.colno}get error(){return r.brandCheck(this,c),this.#e7.error}}Object.defineProperties(a.prototype,{[Symbol.toStringTag]:{value:"MessageEvent",configurable:!0},data:n,origin:n,lastEventId:n,source:n,ports:n,initMessageEvent:n}),Object.defineProperties(l.prototype,{[Symbol.toStringTag]:{value:"CloseEvent",configurable:!0},reason:n,code:n,wasClean:n}),Object.defineProperties(c.prototype,{[Symbol.toStringTag]:{value:"ErrorEvent",configurable:!0},message:n,filename:n,lineno:n,colno:n,error:n}),r.converters.MessagePort=r.interfaceConverter(r.is.MessagePort,"MessagePort"),r.converters["sequence<MessagePort>"]=r.sequenceConverter(r.converters.MessagePort);let d=[{key:"bubbles",converter:r.converters.boolean,defaultValue:()=>!1},{key:"cancelable",converter:r.converters.boolean,defaultValue:()=>!1},{key:"composed",converter:r.converters.boolean,defaultValue:()=>!1}];r.converters.MessageEventInit=r.dictionaryConverter([...d,{key:"data",converter:r.converters.any,defaultValue:()=>null},{key:"origin",converter:r.converters.USVString,defaultValue:()=>""},{key:"lastEventId",converter:r.converters.DOMString,defaultValue:()=>""},{key:"source",converter:r.nullableConverter(r.converters.MessagePort),defaultValue:()=>null},{key:"ports",converter:r.converters["sequence<MessagePort>"],defaultValue:()=>[]}]),r.converters.CloseEventInit=r.dictionaryConverter([...d,{key:"wasClean",converter:r.converters.boolean,defaultValue:()=>!1},{key:"code",converter:r.converters["unsigned short"],defaultValue:()=>0},{key:"reason",converter:r.converters.USVString,defaultValue:()=>""}]),r.converters.ErrorEventInit=r.dictionaryConverter([...d,{key:"message",converter:r.converters.DOMString,defaultValue:()=>""},{key:"filename",converter:r.converters.USVString,defaultValue:()=>""},{key:"lineno",converter:r.converters["unsigned long"],defaultValue:()=>0},{key:"colno",converter:r.converters["unsigned long"],defaultValue:()=>0},{key:"error",converter:r.converters.any}]),t.exports={MessageEvent:a,CloseEvent:l,ErrorEvent:c,createFastMessageEvent:o}},984741,(e,t,i)=>{"use strict";let r="258EAFA5-E914-47DA-95CA-C5AB0DC85B11",n={enumerable:!0,writable:!1,configurable:!1},s={CONNECTING:0,OPEN:1,CLOSING:2,CLOSED:3},a={SENT:1,RECEIVED:2},o={CONTINUATION:0,TEXT:1,BINARY:2,CLOSE:8,PING:9,PONG:10},l=65535,c={INFO:0,PAYLOADLENGTH_16:2,PAYLOADLENGTH_64:3,READ_DATA:4};t.exports={uid:r,sentCloseFrameState:a,staticPropertyDescriptors:n,states:s,opcodes:o,maxUnsigned16Bit:l,parserStates:c,emptyBuffer:Buffer.allocUnsafe(0),sendHints:{text:1,typedArray:2,arrayBuffer:3,blob:4}}},459977,(e,t,i)=>{"use strict";let{states:r,opcodes:n}=e.r(984741),{isUtf8:s}=e.r(951615),{removeHTTPWhitespace:a}=e.r(441628),{collectASequenceOfCodePointsFast:o}=e.r(142677);function l(e){return e.byteLength===e.buffer.byteLength?e.buffer:new Uint8Array(e).buffer}function c(e){return e===n.CLOSE||e===n.PING||e===n.PONG}function d(e){return e===n.CONTINUATION}function u(e){return e===n.TEXT||e===n.BINARY}function h(e){return u(e)||d(e)||c(e)}function A(e){let t={position:0},i=new Map;for(;t.position<e.length;){let[r,n=""]=o(";",e,t).split("=",2);i.set(a(r,!0,!1),a(n,!1,!0)),t.position++}return i}function p(e){if(0===e.length)return!1;for(let t=0;t<e.length;t++){let i=e.charCodeAt(t);if(i<48||i>57)return!1}let t=Number.parseInt(e,10);return t>=8&&t<=15}function f(e,t){let i;try{i=new URL(e,t)}catch(e){throw new DOMException(e,"SyntaxError")}if("http:"===i.protocol?i.protocol="ws:":"https:"===i.protocol&&(i.protocol="wss:"),"ws:"!==i.protocol&&"wss:"!==i.protocol)throw new DOMException("expected a ws: or wss: url","SyntaxError");if(i.hash.length||i.href.endsWith("#"))throw new DOMException("hash","SyntaxError");return i}function g(e,t){if(null!==e&&1e3!==e&&(e<3e3||e>4999))throw new DOMException("invalid code","InvalidAccessError");if(null!==t){let e=Buffer.byteLength(t);if(e>123)throw new DOMException(`Reason must be less than 123 bytes; received ${e}`,"SyntaxError")}}t.exports={isConnecting:function e(e){return e===r.CONNECTING},isEstablished:function e(e){return e===r.OPEN},isClosing:function e(e){return e===r.CLOSING},isClosed:function e(e){return e===r.CLOSED},fireEvent:function e(t,i,r=(e,t)=>new Event(e,t),n={}){let s=r(t,n);i.dispatchEvent(s)},isValidSubprotocol:function e(e){if(0===e.length)return!1;for(let t=0;t<e.length;++t){let i=e.charCodeAt(t);if(i<33||i>126||34===i||40===i||41===i||44===i||47===i||58===i||59===i||60===i||61===i||62===i||63===i||64===i||91===i||92===i||93===i||123===i||125===i)return!1}return!0},isValidStatusCode:function e(e){return e>=1e3&&e<1015?1004!==e&&1005!==e&&1006!==e:e>=3e3&&e<=4999},websocketMessageReceived:function e(e,t,i){e.onMessage(t,i)},utf8Decode:(()=>{if("string"==typeof process.versions.icu){let e=new TextDecoder("utf-8",{fatal:!0});return e.decode.bind(e)}return function(e){if(s(e))return e.toString("utf-8");throw TypeError("Invalid utf-8 received.")}})(),isControlFrame:c,isContinuationFrame:d,isTextBinaryFrame:u,isValidOpcode:h,parseExtensions:A,isValidClientWindowBits:p,toArrayBuffer:l,getURLRecord:f,validateCloseCodeAndReason:g}},714257,(e,t,i)=>{"use strict";let{runtimeFeatures:r}=e.r(350022),{maxUnsigned16Bit:n,opcodes:s}=e.r(984741),a=8192,o=null,l=8192,c=r.has("crypto")?e.r(666680).randomFillSync:function(e,t,i){for(let t=0;t<e.length;++t)e[t]=255*Math.random()|0;return e};function d(){return l===a&&(l=0,c(o??=Buffer.allocUnsafeSlow(a),0,a)),[o[l++],o[l++],o[l++],o[l++]]}class u{constructor(e){this.frameData=e}createFrame(e){let t=this.frameData,i=d(),r=t?.byteLength??0,s=r,a=6;r>n?(a+=8,s=127):r>125&&(a+=2,s=126);let o=Buffer.allocUnsafe(r+a);o[0]=o[1]=0,o[0]|=128,o[0]=(240&o[0])+e,o[a-4]=i[0],o[a-3]=i[1],o[a-2]=i[2],o[a-1]=i[3],o[1]=s,126===s?o.writeUInt16BE(r,2):127===s&&(o[2]=o[3]=0,o.writeUIntBE(r,4,6)),o[1]|=128;for(let e=0;e<r;++e)o[a+e]=t[e]^i[3&e];return o}static createFastTextFrame(e){let t=d(),i=e.length;for(let r=0;r<i;++r)e[r]^=t[3&r];let r=i,a=6;i>n?(a+=8,r=127):i>125&&(a+=2,r=126);let o=Buffer.allocUnsafeSlow(a);return o[0]=128|s.TEXT,o[1]=128|r,o[a-4]=t[0],o[a-3]=t[1],o[a-2]=t[2],o[a-1]=t[3],126===r?o.writeUInt16BE(i,2):127===r&&(o[2]=o[3]=0,o.writeUIntBE(i,4,6)),[o,e]}}t.exports={WebsocketFrameSend:u,generateMask:d}},469344,(e,t,i)=>{"use strict";let{uid:r,states:n,sentCloseFrameState:s,emptyBuffer:a,opcodes:o}=e.r(984741),{parseExtensions:l,isClosed:c,isClosing:d,isEstablished:u,isConnecting:h,validateCloseCodeAndReason:A}=e.r(459977),{makeRequest:p}=e.r(625461),{fetching:f}=e.r(258548),{Headers:g,getHeadersList:m}=e.r(302260),{getDecodeSplit:y}=e.r(402649),{WebsocketFrameSend:b}=e.r(714257),E=e.r(57328),{runtimeFeatures:C}=e.r(350022),w=C.has("crypto")?e.r(666680):null,I=!1;function v(e,t,i,r=!1){if(t??=null,i??="",r&&A(t,i),c(e.readyState)||d(e.readyState));else if(u(e.readyState))if(e.closeState.has(s.SENT)||e.closeState.has(s.RECEIVED))e.readyState=n.CLOSING;else{let r=new b;0!==i.length&&null===t&&(t=1e3),E(null===t||Number.isInteger(t)),null===t&&0===i.length?r.frameData=a:null!==t&&null===i?(r.frameData=Buffer.allocUnsafe(2),r.frameData.writeUInt16BE(t,0)):null!==t&&null!==i?(r.frameData=Buffer.allocUnsafe(2+Buffer.byteLength(i)),r.frameData.writeUInt16BE(t,0),r.frameData.write(i,2,"utf-8")):r.frameData=a,e.socket.write(r.createFrame(o.CLOSE)),e.closeState.add(s.SENT),e.readyState=n.CLOSING}else B(e),e.readyState=n.CLOSING}function B(e,t,i,r){u(e.readyState)&&v(e,t,i,!1),e.controller.abort(),h(e.readyState)?e.onSocketClose():e.socket?.destroyed===!1&&e.socket.destroy()}t.exports={establishWebSocketConnection:function(e,t,i,n,s){let a=e;a.protocol="ws:"===e.protocol?"http:":"https:";let o=p({urlList:[a],client:i,serviceWorkers:"none",referrer:"no-referrer",mode:"websocket",credentials:"include",cache:"no-store",redirect:"error",useURLCredentials:!0});s.headers&&(o.headersList=m(new g(s.headers)));let c=w.randomBytes(16).toString("base64");for(let e of(o.headersList.append("sec-websocket-key",c,!0),o.headersList.append("sec-websocket-version","13",!0),t))o.headersList.append("sec-websocket-protocol",e,!0);let d="permessage-deflate; client_max_window_bits";return o.headersList.append("sec-websocket-extensions",d,!0),f({request:o,useParallelQueue:!0,dispatcher:s.dispatcher,processResponse(e){let i;if("error"===e.type||101!==e.status){if(e.socket?.session==null)return void B(n,1002,"Received network error or non-101 status code.",e.error);if(200!==e.status)return void B(n,1002,"Received network error or non-200 status code.",e.error)}if(!1===I&&e.socket?.session!=null&&(process.emitWarning("WebSocket over HTTP2 is experimental, and subject to change.","ExperimentalWarning"),I=!0),0!==t.length&&!e.headersList.get("Sec-WebSocket-Protocol"))return void B(n,1002,"Server did not respond with sent protocols.");if(null==e.socket.session&&e.headersList.get("Upgrade")?.toLowerCase()!=="websocket")return void B(n,1002,'Server did not set Upgrade header to "websocket".');if(null==e.socket.session&&e.headersList.get("Connection")?.toLowerCase()!=="upgrade")return void B(n,1002,'Server did not set Connection header to "upgrade".');if(e.headersList.get("Sec-WebSocket-Accept")!==w.hash("sha1",c+r,"base64"))return void B(n,1002,"Incorrect hash received in Sec-WebSocket-Accept header.");let s=e.headersList.get("Sec-WebSocket-Extensions");if(null!==s&&!(i=l(s)).has("permessage-deflate"))return void B(n,1002,"Sec-WebSocket-Extensions header does not match.");let a=e.headersList.get("Sec-WebSocket-Protocol");null===a||y("sec-websocket-protocol",o.headersList).includes(a)?(e.socket.on("data",n.onSocketData),e.socket.on("close",n.onSocketClose),e.socket.on("error",n.onSocketError),n.wasEverConnected=!0,n.onConnectionEstablished(e,i)):B(n,1002,"Protocol was not set in the opening handshake.")}})},failWebsocketConnection:B,closeWebSocketConnection:v}},938904,(e,t,i)=>{"use strict";let{createInflateRaw:r,Z_DEFAULT_WINDOWBITS:n}=e.r(727028),{isValidClientWindowBits:s}=e.r(459977),{MessageSizeExceededError:a}=e.r(450178),o=Buffer.from([0,0,255,255]),l=Symbol("kBuffer"),c=Symbol("kLength"),d=4194304;class u{#te;#e={};#n=!1;#tt=null;constructor(e){this.#e.serverNoContextTakeover=e.has("server_no_context_takeover"),this.#e.serverMaxWindowBits=e.get("server_max_window_bits")}decompress(e,t,i){if(this.#n)return void i(new a);if(!this.#te){let e=n;if(this.#e.serverMaxWindowBits){if(!s(this.#e.serverMaxWindowBits))return void i(Error("Invalid server_max_window_bits"));e=Number.parseInt(this.#e.serverMaxWindowBits)}try{this.#te=r({windowBits:e})}catch(e){i(e);return}this.#te[l]=[],this.#te[c]=0,this.#te.on("data",e=>{if(!this.#n){if(this.#te[c]+=e.length,this.#te[c]>d){if(this.#n=!0,this.#te.removeAllListeners(),this.#te.destroy(),this.#te=null,this.#tt){let e=this.#tt;this.#tt=null,e(new a)}return}this.#te[l].push(e)}}),this.#te.on("error",e=>{this.#te=null,i(e)})}this.#tt=i,this.#te.write(e),t&&this.#te.write(o),this.#te.flush(()=>{if(this.#n||!this.#te)return;let e=Buffer.concat(this.#te[l],this.#te[c]);this.#te[l].length=0,this.#te[c]=0,this.#tt=null,i(null,e)})}}t.exports={PerMessageDeflate:u}},139180,(e,t,i)=>{"use strict";let{Writable:r}=e.r(81111),n=e.r(57328),{parserStates:s,opcodes:a,states:o,emptyBuffer:l,sentCloseFrameState:c}=e.r(984741),{isValidStatusCode:d,isValidOpcode:u,websocketMessageReceived:h,utf8Decode:A,isControlFrame:p,isTextBinaryFrame:f,isContinuationFrame:g}=e.r(459977),{failWebsocketConnection:m}=e.r(469344),{WebsocketFrameSend:y}=e.r(714257),{PerMessageDeflate:b}=e.r(938904),{MessageSizeExceededError:E}=e.r(450178);class C extends r{#ti=[];#tr=0;#tn=0;#ts=!1;#A=s.INFO;#ta={};#to=[];#tl;#t;constructor(e,t){super(),this.#t=e,this.#tl=null==t?new Map:t,this.#tl.has("permessage-deflate")&&this.#tl.set("permessage-deflate",new b(t))}_write(e,t,i){this.#ti.push(e),this.#tn+=e.length,this.#ts=!0,this.run(i)}run(e){for(;this.#ts;)if(this.#A===s.INFO){if(this.#tn<2)return e();let t=this.consume(2),i=(128&t[0])!=0,r=15&t[0],n=(128&t[1])==128,o=!i&&r!==a.CONTINUATION,l=127&t[1],c=64&t[0],d=32&t[0],h=16&t[0];if(!u(r))return m(this.#t,1002,"Invalid opcode received"),e();if(n)return m(this.#t,1002,"Frame cannot be masked"),e();if(0!==c&&!this.#tl.has("permessage-deflate"))return void m(this.#t,1002,"Expected RSV1 to be clear.");if(0!==d||0!==h)return void m(this.#t,1002,"RSV1, RSV2, RSV3 must be clear");if(o&&!f(r))return void m(this.#t,1002,"Invalid frame type was fragmented.");if(f(r)&&this.#to.length>0)return void m(this.#t,1002,"Expected continuation frame");if(this.#ta.fragmented&&o)return void m(this.#t,1002,"Fragmented frame exceeded 125 bytes.");if((l>125||o)&&p(r))return void m(this.#t,1002,"Control frame either too large or fragmented");if(g(r)&&0===this.#to.length&&!this.#ta.compressed)return void m(this.#t,1002,"Unexpected continuation frame");l<=125?(this.#ta.payloadLength=l,this.#A=s.READ_DATA):126===l?this.#A=s.PAYLOADLENGTH_16:127===l&&(this.#A=s.PAYLOADLENGTH_64),f(r)&&(this.#ta.binaryType=r,this.#ta.compressed=0!==c),this.#ta.opcode=r,this.#ta.masked=n,this.#ta.fin=i,this.#ta.fragmented=o}else if(this.#A===s.PAYLOADLENGTH_16){if(this.#tn<2)return e();let t=this.consume(2);this.#ta.payloadLength=t.readUInt16BE(0),this.#A=s.READ_DATA}else if(this.#A===s.PAYLOADLENGTH_64){if(this.#tn<8)return e();let t=this.consume(8),i=t.readUInt32BE(0),r=t.readUInt32BE(4);if(0!==i||r>0x80000000-1)return void m(this.#t,1009,"Received payload length > 2^31 bytes.");this.#ta.payloadLength=r,this.#A=s.READ_DATA}else if(this.#A===s.READ_DATA){if(this.#tn<this.#ta.payloadLength)return e();let t=this.consume(this.#ta.payloadLength);if(p(this.#ta.opcode))this.#ts=this.parseControlFrame(t),this.#A=s.INFO;else if(this.#ta.compressed){this.#tl.get("permessage-deflate").decompress(t,this.#ta.fin,(t,i)=>{if(t){let e=t instanceof E?1009:1007;m(this.#t,e,t.message);return}if(this.writeFragments(i),!this.#ta.fin){this.#A=s.INFO,this.#ts=!0,this.run(e);return}h(this.#t,this.#ta.binaryType,this.consumeFragments()),this.#ts=!0,this.#A=s.INFO,this.run(e)}),this.#ts=!1;break}else this.writeFragments(t),!this.#ta.fragmented&&this.#ta.fin&&h(this.#t,this.#ta.binaryType,this.consumeFragments()),this.#A=s.INFO}}consume(e){if(e>this.#tn)throw Error("Called consume() before buffers satiated.");if(0===e)return l;this.#tn-=e;let t=this.#ti[0];if(t.length>e)return this.#ti[0]=t.subarray(e,t.length),t.subarray(0,e);{if(t.length===e)return this.#ti.shift();let i=0,r=Buffer.allocUnsafeSlow(e);for(;i!==e;){let t=this.#ti[0],n=t.length;if(n+i===e){r.set(this.#ti.shift(),i);break}if(n+i>e){r.set(t.subarray(0,e-i),i),this.#ti[0]=t.subarray(e-i);break}r.set(this.#ti.shift(),i),i+=n}return r}}writeFragments(e){this.#tr+=e.length,this.#to.push(e)}consumeFragments(){let e=this.#to;if(1===e.length)return this.#tr=0,e.shift();let t=0,i=Buffer.allocUnsafeSlow(this.#tr);for(let r=0;r<e.length;++r){let n=e[r];i.set(n,t),t+=n.length}return this.#to=[],this.#tr=0,i}parseCloseBody(e){let t;if(n(1!==e.length),e.length>=2&&(t=e.readUInt16BE(0)),void 0!==t&&!d(t))return{code:1002,reason:"Invalid status code",error:!0};let i=e.subarray(2);239===i[0]&&187===i[1]&&191===i[2]&&(i=i.subarray(3));try{i=A(i)}catch{return{code:1007,reason:"Invalid UTF-8",error:!0}}return{code:t,reason:i,error:!1}}parseControlFrame(e){let{opcode:t,payloadLength:i}=this.#ta;if(t===a.CLOSE){if(1===i)return m(this.#t,1002,"Received close frame with a 1-byte body."),!1;if(this.#ta.closeInfo=this.parseCloseBody(e),this.#ta.closeInfo.error){let{code:e,reason:t}=this.#ta.closeInfo;return m(this.#t,e,t),!1}if(!this.#t.closeState.has(c.SENT)&&!this.#t.closeState.has(c.RECEIVED)){let e=l;this.#ta.closeInfo.code&&(e=Buffer.allocUnsafe(2)).writeUInt16BE(this.#ta.closeInfo.code,0);let t=new y(e);this.#t.socket.write(t.createFrame(a.CLOSE)),this.#t.closeState.add(c.SENT)}return this.#t.readyState=o.CLOSING,this.#t.closeState.add(c.RECEIVED),!1}if(t===a.PING){if(!this.#t.closeState.has(c.RECEIVED)){let t=new y(e);this.#t.socket.write(t.createFrame(a.PONG)),this.#t.onPing(e)}}else t===a.PONG&&this.#t.onPong(e);return!0}get closingInfo(){return this.#ta.closeInfo}}t.exports={ByteParser:C}},184641,(e,t,i)=>{"use strict";let{WebsocketFrameSend:r}=e.r(714257),{opcodes:n,sendHints:s}=e.r(984741),a=e.r(636528);class o{#tc=new a;#td=!1;#tu;constructor(e){this.#tu=e}add(e,t,i){if(i!==s.blob){if(this.#td){let r={promise:null,callback:t,frame:l(e,i)};this.#tc.push(r)}else if(i===s.text){let{0:i,1:n}=r.createFastTextFrame(e);this.#tu.cork(),this.#tu.write(i),this.#tu.write(n,t),this.#tu.uncork()}else this.#tu.write(l(e,i),t);return}let n={promise:e.arrayBuffer().then(e=>{n.promise=null,n.frame=l(e,i)}),callback:t,frame:null};this.#tc.push(n),this.#td||this.#th()}async #th(){this.#td=!0;let e=this.#tc;for(;!e.isEmpty();){let t=e.shift();null!==t.promise&&await t.promise,this.#tu.write(t.frame,t.callback),t.callback=t.frame=null}this.#td=!1}}function l(e,t){return new r(c(e,t)).createFrame(t===s.text?n.TEXT:n.BINARY)}function c(e,t){switch(t){case s.text:case s.typedArray:return new Uint8Array(e.buffer,e.byteOffset,e.byteLength);case s.arrayBuffer:case s.blob:return new Uint8Array(e)}}t.exports={SendQueue:o}},697150,(e,t,i)=>{"use strict";let{isArrayBuffer:r}=e.r(107417),{webidl:n}=e.r(192321),{URLSerializer:s}=e.r(441628),{environmentSettingsObject:a}=e.r(402649),{staticPropertyDescriptors:o,states:l,sentCloseFrameState:c,sendHints:d,opcodes:u}=e.r(984741),{isConnecting:h,isEstablished:A,isClosing:p,isClosed:f,isValidSubprotocol:g,fireEvent:m,utf8Decode:y,toArrayBuffer:b,getURLRecord:E}=e.r(459977),{establishWebSocketConnection:C,closeWebSocketConnection:w,failWebsocketConnection:I}=e.r(469344),{ByteParser:v}=e.r(139180),{kEnumerableProperty:B}=e.r(122857),{getGlobalDispatcher:Q}=e.r(312706),{ErrorEvent:x,CloseEvent:S,createFastMessageEvent:k}=e.r(925087),{SendQueue:T}=e.r(184641),{WebsocketFrameSend:N}=e.r(714257),{channels:D}=e.r(500078);class _ extends EventTarget{#tA={open:null,error:null,close:null,message:null};#tp=0;#tf="";#tl="";#tg;#t={onConnectionEstablished:(e,t)=>this.#tm(e,t),onMessage:(e,t)=>this.#ty(e,t),onParserError:e=>I(this.#t,null,e.message),onParserDrain:()=>this.#tb(),onSocketData:e=>{this.#tE.write(e)||this.#t.socket.pause()},onSocketError:e=>{this.#t.readyState=l.CLOSING,D.socketError.hasSubscribers&&D.socketError.publish(e),this.#t.socket.destroy()},onSocketClose:()=>this.#tC(),onPing:e=>{D.ping.hasSubscribers&&D.ping.publish({payload:e,websocket:this})},onPong:e=>{D.pong.hasSubscribers&&D.pong.publish({payload:e,websocket:this})},readyState:l.CONNECTING,socket:null,closeState:new Set,controller:null,wasEverConnected:!1};#tw;#tI;#tE;constructor(e,t=[]){super(),n.util.markAsUncloneable(this);const i="WebSocket constructor";n.argumentLengthCheck(arguments,1,i);const r=n.converters["DOMString or sequence<DOMString> or WebSocketInit"](t,i,"options");e=n.converters.USVString(e),t=r.protocols;const s=E(e,a.settingsObject.baseUrl);if("string"==typeof t&&(t=[t]),t.length!==new Set(t.map(e=>e.toLowerCase())).size||t.length>0&&!t.every(e=>g(e)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");this.#tw=new URL(s.href);const o=a.settingsObject;this.#t.controller=C(s,t,o,this.#t,r),this.#t.readyState=_.CONNECTING,this.#tI="blob"}close(e,t){n.brandCheck(this,_);let i="WebSocket.close";void 0!==e&&(e=n.converters["unsigned short"](e,i,"code",n.attributes.Clamp)),void 0!==t&&(t=n.converters.USVString(t)),e??=null,t??="",w(this.#t,e,t,!0)}send(e){n.brandCheck(this,_);let t="WebSocket.send";if(n.argumentLengthCheck(arguments,1,t),e=n.converters.WebSocketSendData(e,t,"data"),h(this.#t.readyState))throw new DOMException("Sent before connected.","InvalidStateError");if(!(!A(this.#t.readyState)||p(this.#t.readyState)))if("string"==typeof e){let t=Buffer.from(e);this.#tp+=t.byteLength,this.#tg.add(t,()=>{this.#tp-=t.byteLength},d.text)}else r(e)?(this.#tp+=e.byteLength,this.#tg.add(e,()=>{this.#tp-=e.byteLength},d.arrayBuffer)):ArrayBuffer.isView(e)?(this.#tp+=e.byteLength,this.#tg.add(e,()=>{this.#tp-=e.byteLength},d.typedArray)):n.is.Blob(e)&&(this.#tp+=e.size,this.#tg.add(e,()=>{this.#tp-=e.size},d.blob))}get readyState(){return n.brandCheck(this,_),this.#t.readyState}get bufferedAmount(){return n.brandCheck(this,_),this.#tp}get url(){return n.brandCheck(this,_),s(this.#tw)}get extensions(){return n.brandCheck(this,_),this.#tl}get protocol(){return n.brandCheck(this,_),this.#tf}get onopen(){return n.brandCheck(this,_),this.#tA.open}set onopen(e){n.brandCheck(this,_),this.#tA.open&&this.removeEventListener("open",this.#tA.open);let t=n.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("open",t),this.#tA.open=e):this.#tA.open=null}get onerror(){return n.brandCheck(this,_),this.#tA.error}set onerror(e){n.brandCheck(this,_),this.#tA.error&&this.removeEventListener("error",this.#tA.error);let t=n.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("error",t),this.#tA.error=e):this.#tA.error=null}get onclose(){return n.brandCheck(this,_),this.#tA.close}set onclose(e){n.brandCheck(this,_),this.#tA.close&&this.removeEventListener("close",this.#tA.close);let t=n.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("close",t),this.#tA.close=e):this.#tA.close=null}get onmessage(){return n.brandCheck(this,_),this.#tA.message}set onmessage(e){n.brandCheck(this,_),this.#tA.message&&this.removeEventListener("message",this.#tA.message);let t=n.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("message",t),this.#tA.message=e):this.#tA.message=null}get binaryType(){return n.brandCheck(this,_),this.#tI}set binaryType(e){n.brandCheck(this,_),"blob"!==e&&"arraybuffer"!==e?this.#tI="blob":this.#tI=e}#tm(e,t){this.#t.socket=e.socket;let i=new v(this.#t,t);i.on("drain",()=>this.#t.onParserDrain()),i.on("error",e=>this.#t.onParserError(e)),this.#tE=i,this.#tg=new T(e.socket),this.#t.readyState=l.OPEN;let r=e.headersList.get("sec-websocket-extensions");null!==r&&(this.#tl=r);let n=e.headersList.get("sec-websocket-protocol");if(null!==n&&(this.#tf=n),m("open",this),D.open.hasSubscribers){let t=e.headersList.entries;D.open.publish({address:e.socket.address(),protocol:this.#tf,extensions:this.#tl,websocket:this,handshakeResponse:{status:e.status,statusText:e.statusText,headers:t}})}}#ty(e,t){let i;if(this.#t.readyState===l.OPEN){if(e===u.TEXT)try{i=y(t)}catch{I(this.#t,1007,"Received invalid UTF-8 in text frame.");return}else e===u.BINARY&&(i="blob"===this.#tI?new Blob([t]):b(t));m("message",this,k,{origin:this.#tw.origin,data:i})}}#tb(){this.#t.socket.resume()}#tC(){let e=this.#t.closeState.has(c.SENT)&&this.#t.closeState.has(c.RECEIVED),t=1005,i="",r=this.#tE?.closingInfo;r&&!r.error&&(t=r.code??1005,i=r.reason),this.#t.readyState=l.CLOSED,this.#t.closeState.has(c.RECEIVED)||(t=1006,m("error",this,(e,t)=>new x(e,t),{error:TypeError(i)})),m("close",this,(e,t)=>new S(e,t),{wasClean:e,code:t,reason:i}),D.close.hasSubscribers&&D.close.publish({websocket:this,code:t,reason:i})}static ping(e,t){if(Buffer.isBuffer(t)){if(t.length>125)throw TypeError("A PING frame cannot have a body larger than 125 bytes.")}else if(void 0!==t)throw TypeError("Expected buffer payload");let i=e.#t.readyState;if(A(i)&&!p(i)&&!f(i)){let i=new N(t);e.#t.socket.write(i.createFrame(u.PING))}}}let{ping:R}=_;Reflect.deleteProperty(_,"ping"),_.CONNECTING=_.prototype.CONNECTING=l.CONNECTING,_.OPEN=_.prototype.OPEN=l.OPEN,_.CLOSING=_.prototype.CLOSING=l.CLOSING,_.CLOSED=_.prototype.CLOSED=l.CLOSED,Object.defineProperties(_.prototype,{CONNECTING:o,OPEN:o,CLOSING:o,CLOSED:o,url:B,readyState:B,bufferedAmount:B,onopen:B,onerror:B,onclose:B,close:B,onmessage:B,binaryType:B,send:B,extensions:B,protocol:B,[Symbol.toStringTag]:{value:"WebSocket",writable:!1,enumerable:!1,configurable:!0}}),Object.defineProperties(_,{CONNECTING:o,OPEN:o,CLOSING:o,CLOSED:o}),n.converters["sequence<DOMString>"]=n.sequenceConverter(n.converters.DOMString),n.converters["DOMString or sequence<DOMString>"]=function(e,t,i){return n.util.Type(e)===n.util.Types.OBJECT&&Symbol.iterator in e?n.converters["sequence<DOMString>"](e):n.converters.DOMString(e,t,i)},n.converters.WebSocketInit=n.dictionaryConverter([{key:"protocols",converter:n.converters["DOMString or sequence<DOMString>"],defaultValue:()=>[]},{key:"dispatcher",converter:n.converters.any,defaultValue:()=>Q()},{key:"headers",converter:n.nullableConverter(n.converters.HeadersInit)}]),n.converters["DOMString or sequence<DOMString> or WebSocketInit"]=function(e){return n.util.Type(e)!==n.util.Types.OBJECT||Symbol.iterator in e?{protocols:n.converters["DOMString or sequence<DOMString>"](e)}:n.converters.WebSocketInit(e)},n.converters.WebSocketSendData=function(e){return n.util.Type(e)===n.util.Types.OBJECT&&(n.is.Blob(e)||n.is.BufferSource(e))?e:n.converters.USVString(e)},t.exports={WebSocket:_,ping:R}},894026,(e,t,i)=>{"use strict";let{webidl:r}=e.r(192321),{validateCloseCodeAndReason:n}=e.r(459977),{kConstruct:s}=e.r(954673),{kEnumerableProperty:a}=e.r(122857);function o(){class e extends DOMException{get reason(){return""}}return void 0!==new e().reason?DOMException:new Proxy(DOMException,{construct(e,t,i){let r=Reflect.construct(e,t,e);return Object.setPrototypeOf(r,i.prototype),r}})}class l extends o(){#tv;#r;constructor(e="",t){if(super(e=r.converters.DOMString(e,"WebSocketError","message"),"WebSocketError"),t===s)return;null!==t&&(t=r.converters.WebSocketCloseInfo(t));let i=t.closeCode??null;const a=t.reason??"";n(i,a),0!==a.length&&null===i&&(i=1e3),this.#tv=i,this.#r=a}get closeCode(){return this.#tv}get reason(){return this.#r}static createUnvalidatedWebSocketError(e,t,i){let r=new l(e,s);return r.#tv=t,r.#r=i,r}}let{createUnvalidatedWebSocketError:c}=l;delete l.createUnvalidatedWebSocketError,Object.defineProperties(l.prototype,{closeCode:a,reason:a,[Symbol.toStringTag]:{value:"WebSocketError",writable:!1,enumerable:!1,configurable:!0}}),r.is.WebSocketError=r.util.MakeTypeAssertion(l),t.exports={WebSocketError:l,createUnvalidatedWebSocketError:c}},103565,(e,t,i)=>{"use strict";let{createDeferredPromise:r}=e.r(493578),{environmentSettingsObject:n}=e.r(402649),{states:s,opcodes:a,sentCloseFrameState:o}=e.r(984741),{webidl:l}=e.r(192321),{getURLRecord:c,isValidSubprotocol:d,isEstablished:u,utf8Decode:h}=e.r(459977),{establishWebSocketConnection:A,failWebsocketConnection:p,closeWebSocketConnection:f}=e.r(469344),{channels:g}=e.r(500078),{WebsocketFrameSend:m}=e.r(714257),{ByteParser:y}=e.r(139180),{WebSocketError:b,createUnvalidatedWebSocketError:E}=e.r(894026),{kEnumerableProperty:C}=e.r(122857),{utf8DecodeBytes:w}=e.r(107944),I=!1;class v{#tw;#tB;#tQ;#tx;#tS;#tk;#tT=!1;#t={onConnectionEstablished:(e,t)=>this.#tm(e,t),onMessage:(e,t)=>this.#ty(e,t),onParserError:e=>p(this.#t,null,e.message),onParserDrain:()=>this.#t.socket.resume(),onSocketData:e=>{this.#tE.write(e)||this.#t.socket.pause()},onSocketError:e=>{this.#t.readyState=s.CLOSING,g.socketError.hasSubscribers&&g.socketError.publish(e),this.#t.socket.destroy()},onSocketClose:()=>this.#tC(),onPing:()=>{},onPong:()=>{},readyState:s.CONNECTING,socket:null,closeState:new Set,controller:null,wasEverConnected:!1};#tE;constructor(e,t){I||(process.emitWarning("WebSocketStream is experimental! Expect it to change at any time.",{code:"UNDICI-WSS"}),I=!0),l.argumentLengthCheck(arguments,1,"WebSocket"),e=l.converters.USVString(e),null!==t&&(t=l.converters.WebSocketStreamOptions(t));const i=c(e,n.settingsObject.baseUrl),a=t.protocols;if(a.length!==new Set(a.map(e=>e.toLowerCase())).size||a.length>0&&!a.every(e=>d(e)))throw new DOMException("Invalid Sec-WebSocket-Protocol value","SyntaxError");if(this.#tw=i.toString(),this.#tB=r(),this.#tQ=r(),null!=t.signal){const e=t.signal;if(e.aborted){this.#tB.reject(e.reason),this.#tQ.reject(e.reason);return}e.addEventListener("abort",()=>{u(this.#t.readyState)||(p(this.#t),this.#t.readyState=s.CLOSING,this.#tB.reject(e.reason),this.#tQ.reject(e.reason),this.#tT=!0)},{once:!0})}const o=n.settingsObject;this.#t.controller=A(i,a,o,this.#t,t)}get url(){return this.#tw.toString()}get opened(){return this.#tB.promise}get closed(){return this.#tQ.promise}close(e){null!==e&&(e=l.converters.WebSocketCloseInfo(e));let t=e.closeCode??null,i=e.reason;f(this.#t,t,i,!0)}#tN(e){e=l.converters.WebSocketStreamWrite(e);let t=r(),i=null,n=null;if(l.is.BufferSource(e))i=new Uint8Array(ArrayBuffer.isView(e)?new Uint8Array(e.buffer,e.byteOffset,e.byteLength):e.slice()),n=a.BINARY;else{let r;try{r=l.converters.DOMString(e)}catch(e){return t.reject(e),t.promise}i=new TextEncoder().encode(r),n=a.TEXT}if(!this.#t.closeState.has(o.SENT)&&!this.#t.closeState.has(o.RECEIVED)){let e=new m(i);this.#t.socket.write(e.createFrame(n),()=>{t.resolve(void 0)})}return t.promise}#tm(e,t){this.#t.socket=e.socket;let i=new y(this.#t,t);i.on("drain",()=>this.#t.onParserDrain()),i.on("error",e=>this.#t.onParserError(e)),this.#tE=i,this.#t.readyState=s.OPEN;let r=t??"",n=e.headersList.get("sec-websocket-protocol")??"",a=new ReadableStream({start:e=>{this.#tS=e},pull(t){let i;for(;t.desiredSize>0&&null!==(i=e.socket.read());)t.enqueue(i)},cancel:e=>this.#tD(e)}),o=new WritableStream({write:e=>this.#tN(e),close:()=>f(this.#t,null,null),abort:e=>this.#t_(e)});this.#tx=a,this.#tk=o,this.#tB.resolve({extensions:r,protocol:n,readable:a,writable:o})}#ty(e,t){let i;if(this.#t.readyState===s.OPEN){if(e===a.TEXT)try{i=h(t)}catch{p(this.#t,"Received invalid UTF-8 in text frame.");return}else e===a.BINARY&&(i=new Uint8Array(t.buffer,t.byteOffset,t.byteLength));this.#tS.enqueue(i)}}#tC(){let e=this.#t.closeState.has(o.SENT)&&this.#t.closeState.has(o.RECEIVED);if(this.#t.readyState=s.CLOSED,this.#tT)return;this.#t.wasEverConnected||this.#tB.reject(new b("Socket never opened"));let t=this.#tE?.closingInfo,i=t?.code??1005;this.#t.closeState.has(o.SENT)||this.#t.closeState.has(o.RECEIVED)||(i=1006);let r=t?.reason==null?"":w(Buffer.from(t.reason));if(e)this.#tS.close(),this.#tk.locked||this.#tk.abort(new DOMException("A closed WebSocketStream cannot be written to","InvalidStateError")),this.#tQ.resolve({closeCode:i,reason:r});else{let e=E("unclean close",i,r);this.#tS?.error(e),this.#tk?.abort(e),this.#tQ.reject(e)}}#t_(e){let t=null,i="";l.is.WebSocketError(e)&&(t=e.closeCode,i=e.reason),f(this.#t,t,i)}#tD(e){this.#t_(e)}}Object.defineProperties(v.prototype,{url:C,opened:C,closed:C,close:C,[Symbol.toStringTag]:{value:"WebSocketStream",writable:!1,enumerable:!1,configurable:!0}}),l.converters.WebSocketStreamOptions=l.dictionaryConverter([{key:"protocols",converter:l.sequenceConverter(l.converters.USVString),defaultValue:()=>[]},{key:"signal",converter:l.nullableConverter(l.converters.AbortSignal),defaultValue:()=>null}]),l.converters.WebSocketCloseInfo=l.dictionaryConverter([{key:"closeCode",converter:e=>l.converters["unsigned short"](e,l.attributes.EnforceRange)},{key:"reason",converter:l.converters.USVString,defaultValue:()=>""}]),l.converters.WebSocketStreamWrite=function(e){return"string"==typeof e?l.converters.USVString(e):l.converters.BufferSource(e)},t.exports={WebSocketStream:v}},694414,(e,t,i)=>{"use strict";t.exports={isValidLastEventId:function(e){return -1===e.indexOf("\0")},isASCIINumber:function(e){if(0===e.length)return!1;for(let t=0;t<e.length;t++)if(48>e.charCodeAt(t)||e.charCodeAt(t)>57)return!1;return!0}}},911214,(e,t,i)=>{"use strict";let{Transform:r}=e.r(81111),{isASCIINumber:n,isValidLastEventId:s}=e.r(694414),a=[239,187,191],o=10,l=13,c=58,d=32;class u extends r{state;checkBOM=!0;crlfCheck=!1;eventEndCheck=!1;buffer=null;pos=0;event={data:void 0,event:void 0,id:void 0,retry:void 0};constructor(e={}){e.readableObjectMode=!0,super(e),this.state=e.eventSourceSettings||{},e.push&&(this.push=e.push)}_transform(e,t,i){if(0===e.length)return void i();if(this.buffer?this.buffer=Buffer.concat([this.buffer,e]):this.buffer=e,this.checkBOM)switch(this.buffer.length){case 1:if(this.buffer[0]===a[0])return void i();this.checkBOM=!1,i();return;case 2:if(this.buffer[0]===a[0]&&this.buffer[1]===a[1])return void i();this.checkBOM=!1;break;case 3:if(this.buffer[0]===a[0]&&this.buffer[1]===a[1]&&this.buffer[2]===a[2]){this.buffer=Buffer.alloc(0),this.checkBOM=!1,i();return}this.checkBOM=!1;break;default:this.buffer[0]===a[0]&&this.buffer[1]===a[1]&&this.buffer[2]===a[2]&&(this.buffer=this.buffer.subarray(3)),this.checkBOM=!1}for(;this.pos<this.buffer.length;){if(this.eventEndCheck){if(this.crlfCheck){if(this.buffer[this.pos]===o){this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.crlfCheck=!1;continue}this.crlfCheck=!1}if(this.buffer[this.pos]===o||this.buffer[this.pos]===l){this.buffer[this.pos]===l&&(this.crlfCheck=!0),this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,(void 0!==this.event.data||this.event.event||void 0!==this.event.id||this.event.retry)&&this.processEvent(this.event),this.clearEvent();continue}this.eventEndCheck=!1;continue}if(this.buffer[this.pos]===o||this.buffer[this.pos]===l){this.buffer[this.pos]===l&&(this.crlfCheck=!0),this.parseLine(this.buffer.subarray(0,this.pos),this.event),this.buffer=this.buffer.subarray(this.pos+1),this.pos=0,this.eventEndCheck=!0;continue}this.pos++}i()}parseLine(e,t){if(0===e.length)return;let i=e.indexOf(c);if(0===i)return;let r="",a="";if(-1!==i){r=e.subarray(0,i).toString("utf8");let t=i+1;e[t]===d&&++t,a=e.subarray(t).toString("utf8")}else r=e.toString("utf8"),a="";switch(r){case"data":void 0===t[r]?t[r]=a:t[r]+=`
|
||
${a}`;break;case"retry":n(a)&&(t[r]=a);break;case"id":s(a)&&(t[r]=a);break;case"event":a.length>0&&(t[r]=a)}}processEvent(e){e.retry&&n(e.retry)&&(this.state.reconnectionTime=parseInt(e.retry,10)),void 0!==e.id&&s(e.id)&&(this.state.lastEventId=e.id),void 0!==e.data&&this.push({type:e.event||"message",options:{data:e.data,lastEventId:this.state.lastEventId,origin:this.state.origin}})}clearEvent(){this.event={data:void 0,event:void 0,id:void 0,retry:void 0}}}t.exports={EventSourceStream:u}},287413,(e,t,i)=>{"use strict";let{pipeline:r}=e.r(81111),{fetching:n}=e.r(258548),{makeRequest:s}=e.r(625461),{webidl:a}=e.r(192321),{EventSourceStream:o}=e.r(911214),{parseMIMEType:l}=e.r(441628),{createFastMessageEvent:c}=e.r(925087),{isNetworkError:d}=e.r(144796),{kEnumerableProperty:u}=e.r(122857),{environmentSettingsObject:h}=e.r(402649),A=!1,p=3e3,f=0,g=1,m=2,y="anonymous",b="use-credentials";class E extends EventTarget{#tA={open:null,error:null,message:null};#tw;#tR=!1;#tL=f;#tF=null;#a=null;#e2;#A;constructor(e,t={}){let i;super(),a.util.markAsUncloneable(this);const r="EventSource constructor";a.argumentLengthCheck(arguments,1,r),A||(A=!0,process.emitWarning("EventSource is experimental, expect them to change at any time.",{code:"UNDICI-ES"})),e=a.converters.USVString(e),t=a.converters.EventSourceInitDict(t,r,"eventSourceInitDict"),this.#e2=t.node.dispatcher||t.dispatcher,this.#A={lastEventId:"",reconnectionTime:t.node.reconnectionTime};const n=h;try{i=new URL(e,n.settingsObject.baseUrl),this.#A.origin=i.origin}catch(e){throw new DOMException(e,"SyntaxError")}this.#tw=i.href;let o=y;!0===t.withCredentials&&(o=b,this.#tR=!0);const l={redirect:"follow",keepalive:!0,mode:"cors",credentials:"anonymous"===o?"same-origin":"omit",referrer:"no-referrer"};l.client=h.settingsObject,l.headersList=[["accept",{name:"accept",value:"text/event-stream"}]],l.cache="no-store",l.initiator="other",l.urlList=[new URL(this.#tw)],this.#tF=s(l),this.#tM()}get readyState(){return this.#tL}get url(){return this.#tw}get withCredentials(){return this.#tR}#tM(){if(this.#tL===m)return;this.#tL=f;let e={request:this.#tF,dispatcher:this.#e2};e.processResponseEndOfBody=e=>{if(!d(e))return this.#tO()},e.processResponse=e=>{if(d(e))if(!e.aborted)return void this.#tO();else{this.close(),this.dispatchEvent(new Event("error"));return}let t=e.headersList.get("content-type",!0),i=null!==t?l(t):"failure",n="failure"!==i&&"text/event-stream"===i.essence;if(200!==e.status||!1===n){this.close(),this.dispatchEvent(new Event("error"));return}this.#tL=g,this.dispatchEvent(new Event("open")),this.#A.origin=e.urlList[e.urlList.length-1].origin;let s=new o({eventSourceSettings:this.#A,push:e=>{this.dispatchEvent(c(e.type,e.options))}});r(e.body.stream,s,e=>{e?.aborted===!1&&(this.close(),this.dispatchEvent(new Event("error")))})},this.#a=n(e)}#tO(){this.#tL!==m&&(this.#tL=f,this.dispatchEvent(new Event("error")),setTimeout(()=>{this.#tL===f&&(this.#A.lastEventId.length&&this.#tF.headersList.set("last-event-id",this.#A.lastEventId,!0),this.#tM())},this.#A.reconnectionTime)?.unref())}close(){a.brandCheck(this,E),this.#tL!==m&&(this.#tL=m,this.#a.abort(),this.#tF=null)}get onopen(){return this.#tA.open}set onopen(e){this.#tA.open&&this.removeEventListener("open",this.#tA.open);let t=a.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("open",t),this.#tA.open=e):this.#tA.open=null}get onmessage(){return this.#tA.message}set onmessage(e){this.#tA.message&&this.removeEventListener("message",this.#tA.message);let t=a.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("message",t),this.#tA.message=e):this.#tA.message=null}get onerror(){return this.#tA.error}set onerror(e){this.#tA.error&&this.removeEventListener("error",this.#tA.error);let t=a.converters.EventHandlerNonNull(e);null!==t?(this.addEventListener("error",t),this.#tA.error=e):this.#tA.error=null}}let C={CONNECTING:{__proto__:null,configurable:!1,enumerable:!0,value:f,writable:!1},OPEN:{__proto__:null,configurable:!1,enumerable:!0,value:g,writable:!1},CLOSED:{__proto__:null,configurable:!1,enumerable:!0,value:m,writable:!1}};Object.defineProperties(E,C),Object.defineProperties(E.prototype,C),Object.defineProperties(E.prototype,{close:u,onerror:u,onmessage:u,onopen:u,readyState:u,url:u,withCredentials:u}),a.converters.EventSourceInitDict=a.dictionaryConverter([{key:"withCredentials",converter:a.converters.boolean,defaultValue:()=>!1},{key:"dispatcher",converter:a.converters.any},{key:"node",converter:a.dictionaryConverter([{key:"reconnectionTime",converter:a.converters["unsigned long"],defaultValue:()=>p},{key:"dispatcher",converter:a.converters.any}]),defaultValue:()=>({})}]),t.exports={EventSource:E,defaultReconnectionTime:p}},169959,(e,t,i)=>{"use strict";let r=e.r(217365),n=e.r(10918),s=e.r(682850),a=e.r(524013),o=e.r(753108),l=e.r(542122),c=e.r(469494),d=e.r(334806),u=e.r(410974),h=e.r(567934),A=e.r(889567),p=e.r(450178),f=e.r(122857),{InvalidArgumentError:g}=p,m=e.r(222611),y=e.r(977155),b=e.r(102729),{MockCallHistory:E,MockCallHistoryLog:C}=e.r(406177),w=e.r(665015),I=e.r(509805),v=e.r(525281),B=e.r(491433),Q=e.r(335221),{getGlobalDispatcher:x,setGlobalDispatcher:S}=e.r(312706),k=e.r(201443),T=e.r(408050);Object.assign(n.prototype,m),t.exports.Dispatcher=n,t.exports.Client=r,t.exports.Pool=s,t.exports.BalancedPool=a,t.exports.RoundRobinPool=o,t.exports.Agent=l,t.exports.ProxyAgent=c,t.exports.Socks5ProxyAgent=d,t.exports.EnvHttpProxyAgent=u,t.exports.RetryAgent=h,t.exports.H2CClient=A,t.exports.RetryHandler=Q,t.exports.DecoratorHandler=k,t.exports.RedirectHandler=T,t.exports.interceptors={redirect:e.r(539424),responseError:e.r(391607),retry:e.r(27814),dump:e.r(234412),dns:e.r(884656),cache:e.r(207639),decompress:e.r(707755),deduplicate:e.r(380308)},t.exports.cacheStores={MemoryCacheStore:e.r(29867)};let N=e.r(269140);function D(e){return(t,i,r)=>{if("function"==typeof i&&(r=i,i=null),!t||"string"!=typeof t&&"object"!=typeof t&&!(t instanceof URL))throw new g("invalid url");if(null!=i&&"object"!=typeof i)throw new g("invalid opts");if(i&&null!=i.path){if("string"!=typeof i.path)throw new g("invalid opts.path");let e=i.path;i.path.startsWith("/")||(e=`/${e}`),t=new URL(f.parseOrigin(t).origin+e)}else i||(i="object"==typeof t?t:{}),t=f.parseURL(t);let{agent:n,dispatcher:s=x()}=i;if(n)throw new g("unsupported opts.agent. Did you mean opts.client?");return e.call(s,{...i,origin:t.origin,path:t.search?`${t.pathname}${t.search}`:t.pathname,method:i.method||(i.body?"PUT":"GET")},r)}}t.exports.cacheStores.SqliteCacheStore=N,t.exports.buildConnector=y,t.exports.errors=p,t.exports.util={parseHeaders:f.parseHeaders,headerNameToString:f.headerNameToString},t.exports.setGlobalDispatcher=S,t.exports.getGlobalDispatcher=x;let _=e.r(258548).fetch,R="/ROOT/node_modules/.pnpm/undici@7.24.4/node_modules/undici/index.js";function L(e,t){if(!e||"object"!=typeof e)return;let i="string"==typeof e.stack?e.stack:"",r=t.replace(/\\/g,"/");if(i&&(i.includes(t)||i.includes(r)))return;let n={};if(Error.captureStackTrace(n,L),!n.stack)return;let s=n.stack.split("\n").slice(1).join("\n");e.stack=i?`${i}
|
||
${s}`:n.stack}t.exports.fetch=function(e,i){return _(e,i).catch(e=>{throw R?L(e,R):e&&"object"==typeof e&&Error.captureStackTrace(e,t.exports.fetch),e})},t.exports.Headers=e.r(302260).Headers,t.exports.Response=e.r(144796).Response,t.exports.Request=e.r(625461).Request,t.exports.FormData=e.r(943159).FormData;let{setGlobalOrigin:F,getGlobalOrigin:M}=e.r(364065);t.exports.setGlobalOrigin=F,t.exports.getGlobalOrigin=M;let{CacheStorage:O}=e.r(446161),{kConstruct:U}=e.r(954673);t.exports.caches=new O(U);let{deleteCookie:P,getCookies:$,getSetCookies:j,setCookie:H,parseCookie:q}=e.r(929077);t.exports.deleteCookie=P,t.exports.getCookies=$,t.exports.getSetCookies=j,t.exports.setCookie=H,t.exports.parseCookie=q;let{parseMIMEType:z,serializeAMimeType:V}=e.r(441628);t.exports.parseMIMEType=z,t.exports.serializeAMimeType=V;let{CloseEvent:G,ErrorEvent:Y,MessageEvent:W}=e.r(925087),{WebSocket:J,ping:K}=e.r(697150);t.exports.WebSocket=J,t.exports.CloseEvent=G,t.exports.ErrorEvent=Y,t.exports.MessageEvent=W,t.exports.ping=K,t.exports.WebSocketStream=e.r(103565).WebSocketStream,t.exports.WebSocketError=e.r(894026).WebSocketError,t.exports.request=D(m.request),t.exports.stream=D(m.stream),t.exports.pipeline=D(m.pipeline),t.exports.connect=D(m.connect),t.exports.upgrade=D(m.upgrade),t.exports.MockClient=b,t.exports.MockCallHistory=E,t.exports.MockCallHistoryLog=C,t.exports.MockPool=I,t.exports.MockAgent=w,t.exports.SnapshotAgent=v,t.exports.mockErrors=B;let{EventSource:Z}=e.r(287413);function X(){globalThis.fetch=t.exports.fetch,globalThis.Headers=t.exports.Headers,globalThis.Response=t.exports.Response,globalThis.Request=t.exports.Request,globalThis.FormData=t.exports.FormData,globalThis.WebSocket=t.exports.WebSocket,globalThis.CloseEvent=t.exports.CloseEvent,globalThis.ErrorEvent=t.exports.ErrorEvent,globalThis.MessageEvent=t.exports.MessageEvent,globalThis.EventSource=t.exports.EventSource}t.exports.EventSource=Z,t.exports.install=X},786559,265943,e=>{"use strict";let t=(e,t)=>{try{let i=new URL(e);return t.some(e=>Object.entries(e).every(([e,t])=>{if(!t)return!0;if("protocol"===e)return"string"==typeof t&&i.protocol===`${t}:`;if("pathname"===e){let e=t.replace(/\*\*/g,".*").replace(/\*/g,"[^/]*").replace(/\/$/,"(/)?");return RegExp(`^${e}$`).test(i.pathname)}return i[e]===t}))}catch{return!1}};e.s(["isURLAllowed",0,t],786559);var i=e.i(679594),r=e.i(902525),n=e.i(169959);let s={lookup:i.lookup},a=e=>{try{if(!e||!r.default.isValid(e))return!1;let t=r.default.parse(e).range();if("unicast"!==t)return!1}catch(e){return!1}return!0},o=(e,t,i)=>{s.lookup(e,t,(t,r,n)=>{if(t)i(t,r,n);else{let t=[];if((t=Array.isArray(r)?r.map(e=>e.address):[r]).some(e=>!a(e)))return void i(Error(`Blocked unsafe attempt to ${e}`),r,n);i(null,r,n)}})},l=new n.Agent({connect:{lookup:o}}),c=async(...e)=>{let[t,i]=e;try{let e=new URL(t),s=e.hostname;if(s.startsWith("[")&&s.endsWith("]")&&(s=s.slice(1,-1)),r.default.isValid(s)&&!a(s))throw Error(`Blocked unsafe attempt to ${s}`);return await (0,n.fetch)(e,{...i,dispatcher:l,redirect:"manual"})}catch(e){if(e instanceof Error)if(e.cause instanceof Error&&e.cause.message.includes("unsafe"))throw Error(e.cause.message);else{let i;throw"string"==typeof t?i=t:t instanceof URL?i=t.toString():t instanceof Request&&(i=t.url),Error(`Failed to fetch from ${i}, ${e.message}`)}throw e}};e.s(["safeFetch",0,c],265943)},438635,e=>{"use strict";let t=(e,t)=>0===t.length||t.map(e=>e.replace("*","")).some(t=>e.startsWith(t));e.s(["validateMimeType",0,t])},74460,e=>{"use strict";let t=[{label:({t:e})=>e("version:draft"),value:"draft"},{label:({t:e})=>e("version:published"),value:"published"}],i=({localized:e})=>[{name:"_status",type:"select",admin:{components:{Field:!1},disableBulkEdit:!0},defaultValue:"draft",index:!0,label:({t:e})=>e("version:status"),localized:!!e,options:t}],r={name:"snapshot",type:"checkbox",admin:{disableBulkEdit:!0,disabled:!0},index:!0};e.s(["baseVersionFields",0,i,"versionSnapshotField",0,r])},88665,799028,e=>{"use strict";e.i(10188);var t=e.i(785867),i=e.i(700859);class r extends i.APIError{constructor(e){const i=`The following path${1===e.length?"":"s"} cannot be queried:`;super(`${i} ${e.map(e=>e.path).join(", ")}`,t.status.BAD_REQUEST,e)}}e.s(["QueryError",()=>r],88665);let n=new Set(["equals","contains","not_equals","in","all","not_in","exists","greater_than","greater_than_equal","less_than","less_than_equal","like","not_like","within","intersects","near"]),s=/^\w+(?:\.\w+)*$/;e.s(["SAFE_FIELD_PATH_REGEX",0,s,"validOperatorSet",0,n],799028)},837209,451038,90602,e=>{"use strict";var t=e.i(42625),i=e.i(617997);e.s(["validateQueryPaths",()=>p],451038);var r=e.i(88665),n=e.i(799028),s=e.i(186725),a=n,o=e.i(809175),l=e.i(393203),c=s,d=e.i(700859),u=n;function h({collectionSlug:e,fields:t,globalSlug:i,incomingPath:r,locale:n,overrideAccess:s=!1,parentIsLocalized:a,payload:o}){let l=r.split("."),A=o.config.localization,p=[{collectionSlug:e,complete:!1,field:void 0,fields:t,globalSlug:i,invalid:!1,parentIsLocalized:a,path:""}];for(let e=0;e<l.length;e+=1){let t=l[e],r=p.find(({complete:e})=>!e);if(r){let f,g,{path:m}=r,y=m?`${m}.${t}`:t,b=a;if(r?.field?.type==="blocks")if("blockType"===t)g={name:"blockType",type:"text"};else for(let e of r.field.blockReferences??r.field.blocks){let i;if(g=(i="string"==typeof e?o.blocks[e]:e).flattenedFields.find(e=>e.name===t))break}else f=r?.field&&"flattenedFields"in r.field?r.field.flattenedFields:r.fields,b=a||r.field?.localized,g=f.find(e=>e.name===t);if(r.field=g,"globalType"===y&&i)return r.path=y,r.complete=!0,r.field={name:"globalType",type:"text"},p;if("relationTo"===y)return r.path=y,r.complete=!0,r.field={name:"relationTo",type:"select",options:Object.keys(o.collections)},p;if(!g&&"id"===y&&e===l.length-1)return r.path=y,r.field={name:"id",type:o.db.defaultIDType},r.complete=!0,p;if(g){"hidden"in g&&g.hidden&&!s&&(r.invalid=!0);let t=l[e+1],a=(0,c.fieldShouldBeLocalized)({field:g,parentIsLocalized:b}),f=A&&A.localeCodes.includes(t)&&a;switch(f?(e+=1,y=`${y}.${t}`):A&&a&&(y=`${y}.${n}`),g.type){case"join":case"relationship":case"upload":if("join"!==g.type&&"string"!=typeof g.relationTo)r.path=l.join("."),[g.name,"relationTo","value"].includes(l.at(-1))?r.complete=!0:r.invalid=!0;else{r.complete=!0,r.path=y;let t=l.slice(f?e+2:e+1).join(".");if(t){let e;if("join"===g.type){if(Array.isArray(g.collection))throw new d.APIError("Not supported");e=o.collections[g.collection].config}else e=o.collections[g.relationTo].config;p=[...p,...h({collectionSlug:e.slug,fields:e.flattenedFields,globalSlug:i,incomingPath:t,locale:n,parentIsLocalized:!1,payload:o})]}return p}break;case"json":case"richText":{let t=l.slice(e+1).join(".");return l.forEach(e=>{u.SAFE_FIELD_PATH_REGEX.test(e)||(r.invalid=!0)}),r.complete=!0,r.path=t?`${y}.${t}`:y,p}default:e+1===l.length&&(r.complete=!0),r.path=y}}else{r.invalid=!0,r.path=y;break}}}return p}async function A({collectionConfig:e,constraint:t,errors:i,fields:r,globalConfig:n,operator:c,overrideAccess:d,parentIsLocalized:u,path:A,policies:f,polymorphicJoin:g,req:m,val:y,versionFields:b}){let E;E="_id"===A?"id":A.replace(/__/g,".");let C=[],{slug:w}=e||n,I={};n&&!f.globals[w]&&(f.globals[w]=await (0,o.getEntityPermissions)({blockReferencesPermissions:I,entity:n,entityType:"global",fetchData:!1,operations:["read"],req:m})),"id"!==E&&(C=h({collectionSlug:e?.slug,fields:r,globalSlug:n?.slug,incomingPath:E,locale:m.locale,overrideAccess:d,parentIsLocalized:u,payload:m.payload}));let v=[];if(C.at(-1)?.path==="id"){let e=C.at(-2)?.field;e&&("relationship"===e.type||"upload"===e.type)&&"string"==typeof e.relationTo&&C.pop()}v.push(...C.map(async({collectionSlug:r,field:u,invalid:h,path:E},w)=>{if(h){g&&a.SAFE_FIELD_PATH_REGEX.test(A)||i.push({path:E});return}if("join"===u.type&&E===A&&(t[`${E}.id`]=t[E],delete t[E]),"virtual"in u&&u.virtual&&!0===u.virtual&&i.push({path:E}),!g||"relationTo"!==E){if(!d&&(0,s.fieldAffectsData)(u)){let t;r&&(f.collections[r]||(f.collections[r]=await (0,o.getEntityPermissions)({blockReferencesPermissions:I,entity:m.payload.collections[r].config,entityType:"collection",fetchData:!1,operations:["read"],req:(0,l.isolateObjectProperty)(m,"transactionID")})),["hash","salt"].includes(A)&&e.auth&&!e.auth?.disableLocalStrategy&&i.push({path:A}));let s=E;E.endsWith(`.${m.locale}`)&&(s=E.slice(0,-(m.locale.length+1))),("relationship"===u.type||"upload"===u.type)&&Array.isArray(u.relationTo)&&(s=s.replace(".value",""));let a=n?"globals":"collections",c=r||n.slug,d=s.split(".");b?(t=f[a][c].fields,("parent"===d[0]||"version"===d[0]||"snapshot"===d[0]||"latest"===d[0])&&d.shift()):t=f[a][c].fields,d.length&&(d.forEach(e=>{t[e]&&(t="fields"in t[e]?t[e].fields:t[e])}),t?.read?.permission||i.push({path:s}))}w>1&&C.slice(1).reverse().forEach(({collectionSlug:e,path:t},r)=>{0===r&&v.push(p({collectionConfig:m.payload.collections[e].config,errors:i,globalConfig:void 0,overrideAccess:d,policies:f,req:m,where:{[t]:{[c]:y}}}))})}})),await Promise.all(v)}async function p({collectionConfig:e,errors:t=[],globalConfig:i,overrideAccess:s,policies:a={collections:{},globals:{}},polymorphicJoin:o,req:l,versionFields:c,where:d}){let u=c||(i||e).flattenedFields;if("object"==typeof d){let h=[];for(let r in d){let f=d[r];if(("and"===r||"or"===r)&&Array.isArray(f))for(let r of f)e?h.push(p({collectionConfig:e,errors:t,overrideAccess:s,policies:a,polymorphicJoin:o,req:l,versionFields:c,where:r})):h.push(p({errors:t,globalConfig:i,overrideAccess:s,policies:a,polymorphicJoin:o,req:l,versionFields:c,where:r}));else if(!Array.isArray(f))for(let p in f){let g=f[p];n.validOperatorSet.has(p)?h.push(A({collectionConfig:e,constraint:d,errors:t,fields:u,globalConfig:i,operator:p,overrideAccess:s,path:r,policies:a,polymorphicJoin:o,req:l,val:g,versionFields:c})):t.push({path:`${r}.${p}`})}}if(await Promise.all(h),t.length>0)throw new r.QueryError(t)}}let f=({fields:e,payload:t,where:i})=>{for(let r in i){let n=i[r];if(["and","or"].includes(r.toLowerCase())&&Array.isArray(n)){for(let i of n)f({fields:e,payload:t,where:i});continue}let s=r.split("."),a=!1,o=e;for(let e=0;e<s.length;e++){let i=s[e],r=o.find(e=>e.name===i);if(!r)break;if("virtual"in r&&r.virtual&&"string"==typeof r.virtual&&(s[e]=r.virtual,a=!0),"flattenedFields"in r&&(o=r.flattenedFields),("relationship"===r.type||"upload"===r.type)&&"string"==typeof r.relationTo){let e=t.collections[r.relationTo];e&&(o=e.config.flattenedFields)}}a&&(i[s.join(".")]=i[r],delete i[r])}};e.s(["sanitizeWhereQuery",0,f],90602);var g=e.i(516808),m=e.i(893961),y=e.i(252016),b=e.i(668473);let E=async e=>{let r=e;try{let e,n,{collection:{config:s},disableErrors:a,overrideAccess:o,req:l,trash:c=!1,where:d}=r=await (0,b.buildBeforeOperation)({args:r,collection:r.collection.config,operation:"count",overrideAccess:r.overrideAccess}),{payload:u}=l;if(!o&&(e=await (0,t.executeAccess)({disableErrors:a,req:l},s.access.read),!1===e))return{totalDocs:0};let h=(0,i.combineQueries)(d,e);return f({fields:s.flattenedFields,payload:u,where:h}),h=(0,g.appendNonTrashedFilter)({enableTrash:s.trash,trash:c,where:h}),await p({collectionConfig:s,overrideAccess:o,req:l,where:d}),n=await u.db.count({collection:s.slug,req:l,where:h}),n=await (0,y.buildAfterOperation)({args:r,collection:s,operation:"count",overrideAccess:o,result:n})}catch(e){throw await (0,m.killTransaction)(r.req),e}};e.s(["countOperation",0,E],837209)},303539,55115,709926,843385,e=>{"use strict";var t=e.i(248836);let i=Symbol.for("react.client.reference");function r(e){return"function"==typeof e&&e.$$typeof!==i}function n(e){return"function"==typeof e}function s(e){return!n(e)&&"object"==typeof e&&null!==e&&!(e instanceof RegExp)&&!(e instanceof Date)}function a(e,i){return(0,t.default)(e,i,{arrayMerge:(e,t)=>t})}function o(e,i){return(0,t.default)(e,i,{isMergeableObject:s})}e.s(["isReactComponentOrFunction",()=>n,"isReactServerComponentOrFunction",()=>r],55115),e.s(["isPlainObject",()=>s],709926),e.s(["deepMergeWithReactComponents",()=>o,"deepMergeWithSourceArrays",()=>a],303539);let l=(e,t)=>{if("object"==typeof e&&!Object.prototype.hasOwnProperty.call(e,"$$typeof")){if(e[t.language])return e[t.language];let i=[];"string"==typeof t.fallbackLanguage?i=[t.fallbackLanguage]:Array.isArray(t.fallbackLanguage)&&(i=t.fallbackLanguage);let r=i.find(t=>e[t]);return r&&e[r]?e[r]:e[Object.keys(e)[0]]}return"function"==typeof e?e({i18n:t,t:t.t}):e};e.s(["getTranslation",0,l],843385)},974605,145908,e=>{"use strict";let t={autosaveInterval:2e3};e.s(["versionDefaults",0,t],145908);let i=e=>!!(e?.versions&&"object"==typeof e.versions&&e.versions.drafts),r=e=>!!(e?.versions&&"object"==typeof e.versions&&e.versions.drafts&&"object"==typeof e.versions.drafts&&e.versions.drafts.localizeStatus),n=e=>!!(e?.versions&&"object"==typeof e.versions&&e.versions.drafts&&"object"==typeof e.versions.drafts&&e.versions.drafts.autosave),s=e=>!!(e?.versions&&"object"==typeof e.versions&&e.versions.drafts&&"object"==typeof e.versions.drafts&&e.versions.drafts.validate),a=e=>!!(e?.versions&&"object"==typeof e.versions&&e.versions.drafts&&"object"==typeof e.versions.drafts&&e.versions.drafts.schedulePublish),o=e=>e?.versions&&"object"==typeof e.versions?"maxPerDoc"in e.versions?e.versions.maxPerDoc??100:"max"in e.versions?e.versions.max??100:0:0;e.s(["getVersionsMax",0,o,"hasAutosaveEnabled",0,n,"hasDraftValidationEnabled",0,s,"hasDraftsEnabled",0,i,"hasLocalizeStatusEnabled",0,r,"hasScheduledPublishEnabled",0,a],974605)},747016,e=>{"use strict";e.s(["traverseFields",()=>s],747016);var t=e.i(674921),i=e.i(186725),r=e.i(951020);let n=async({blockData:e,collection:n,context:a,data:o,doc:l,field:c,fieldIndex:d,global:u,operation:h,parentIndexPath:A,parentIsLocalized:p,parentPath:f,parentSchemaPath:g,previousDoc:m,previousSiblingDoc:y,req:b,siblingData:E,siblingDoc:C,siblingFields:w})=>{let{indexPath:I,path:v,schemaPath:B}=(0,r.getFieldPaths)({field:c,index:d,parentIndexPath:A,parentPath:f,parentSchemaPath:g}),Q=v?v.split("."):[],x=B?B.split("."):[],S=I?I.split("-").filter(Boolean)?.map(Number):[],k=(e,t)=>t.reduce((e,t)=>e&&void 0!==e[t]?e[t]:void 0,e),T=y&&Object.keys(y).length>0?y:m;if((0,i.fieldAffectsData)(c)&&"hooks"in c&&c.hooks?.afterChange)for(let t of c.hooks.afterChange){let i=await t({blockData:e,collection:n,context:a,data:o,field:c,global:u,indexPath:S,operation:h,originalDoc:l,path:Q,previousDoc:m,previousSiblingDoc:y,previousValue:k(T,Q)??T?.[c.name],req:b,schemaPath:x,siblingData:E,siblingFields:w,value:k(C,Q)??C?.[c.name]});void 0!==i&&(C[c.name]=i)}switch(c.type){case"array":{let t=C[c.name];if(Array.isArray(t)){let i=[];t.forEach((t,r)=>{i.push(s({blockData:e,collection:n,context:a,data:o,doc:l,fields:c.fields,global:u,operation:h,parentIndexPath:"",parentIsLocalized:p||c.localized,parentPath:v+"."+r,parentSchemaPath:B,previousDoc:m,previousSiblingDoc:m?.[c.name]?.[r]||{},req:b,siblingData:E?.[c.name]?.[r]||{},siblingDoc:t?{...t}:{}}))}),await Promise.all(i)}break}case"blocks":{let e=C[c.name];if(Array.isArray(e)){let t=[];e.forEach((e,i)=>{let r=e.blockType,d=b.payload.blocks[r]??(c.blockReferences??c.blocks).find(e=>"string"!=typeof e&&e.slug===r);d&&t.push(s({blockData:E?.[c.name]?.[i],collection:n,context:a,data:o,doc:l,fields:d.fields,global:u,operation:h,parentIndexPath:"",parentIsLocalized:p||c.localized,parentPath:v+"."+i,parentSchemaPath:B+"."+d.slug,previousDoc:m,previousSiblingDoc:T?.[c.name]?.[i]||{},req:b,siblingData:E?.[c.name]?.[i]||{},siblingDoc:e?{...e}:{}}))}),await Promise.all(t)}break}case"collapsible":case"row":await s({blockData:e,collection:n,context:a,data:o,doc:l,fields:c.fields,global:u,operation:h,parentIndexPath:I,parentIsLocalized:p,parentPath:f,parentSchemaPath:B,previousDoc:m,previousSiblingDoc:{...y},req:b,siblingData:E||{},siblingDoc:{...C}});break;case"group":(0,i.fieldAffectsData)(c)?await s({blockData:e,collection:n,context:a,data:o,doc:l,fields:c.fields,global:u,operation:h,parentIndexPath:"",parentIsLocalized:p||c.localized,parentPath:v,parentSchemaPath:B,previousDoc:m,previousSiblingDoc:m?.[c.name]||{},req:b,siblingData:E?.[c.name]||{},siblingDoc:C?.[c.name]||{}}):await s({blockData:e,collection:n,context:a,data:o,doc:l,fields:c.fields,global:u,operation:h,parentIndexPath:I,parentIsLocalized:p,parentPath:f,parentSchemaPath:B,previousDoc:m,previousSiblingDoc:{...y},req:b,siblingData:E||{},siblingDoc:{...C}});break;case"richText":{if(!c?.editor)throw new t.MissingEditorProp(c);if("function"==typeof c.editor)throw Error("Attempted to access unsanitized rich text editor.");let e=c.editor;if(e?.hooks?.afterChange?.length)for(let t of e.hooks.afterChange){let e=await t({collection:n,context:a,data:o,field:c,global:u,indexPath:S,operation:h,originalDoc:l,parentIsLocalized:p,path:Q,previousDoc:m,previousSiblingDoc:y,previousValue:k(T,Q)??T?.[c.name],req:b,schemaPath:x,siblingData:E,value:C?.[c.name]});void 0!==e&&(C[c.name]=e)}break}case"tab":{let t=E,r=C,d={...m},A=(0,i.tabHasName)(c);A&&(t=E?.[c.name]??{},r=C?.[c.name]??{},d=y?.[c.name]??{}),await s({blockData:e,collection:n,context:a,data:o,doc:l,fields:c.fields,global:u,operation:h,parentIndexPath:A?"":I,parentIsLocalized:p||c.localized,parentPath:A?v:f,parentSchemaPath:B,previousDoc:m,previousSiblingDoc:d,req:b,siblingData:t,siblingDoc:r});break}case"tabs":await s({blockData:e,collection:n,context:a,data:o,doc:l,fields:c.tabs.map(e=>({...e,type:"tab"})),global:u,operation:h,parentIndexPath:I,parentIsLocalized:p,parentPath:v,parentSchemaPath:B,previousDoc:m,previousSiblingDoc:{...y},req:b,siblingData:E||{},siblingDoc:{...C}})}},s=async({blockData:e,collection:t,context:i,data:r,doc:s,fields:a,global:o,operation:l,parentIndexPath:c,parentIsLocalized:d,parentPath:u,parentSchemaPath:h,previousDoc:A,previousSiblingDoc:p,req:f,siblingData:g,siblingDoc:m,siblingFields:y})=>{let b=[];a.forEach((a,E)=>{b.push(n({blockData:e,collection:t,context:i,data:r,doc:s,field:a,fieldIndex:E,global:o,operation:l,parentIndexPath:c,parentIsLocalized:d,parentPath:u,parentSchemaPath:h,previousDoc:A,previousSiblingDoc:p,req:f,siblingData:g,siblingDoc:m,siblingFields:y}))}),await Promise.all(b)}},875798,731161,494663,e=>{"use strict";e.s(["traverseFields",()=>u],875798);var t=e.i(674921),i=e.i(350261),r=e.i(303539),n=e.i(843385);let s=(e,t)=>"function"==typeof e?e({i18n:t,t:t.t}):"object"==typeof e?(0,n.getTranslation)(e,t):e;e.s(["getTranslatedLabel",0,s],731161);var a=e.i(186725),o=e.i(951020);let l=(e,t)=>{if(e.id&&Array.isArray(t)){let i=t.find(t=>"object"==typeof t&&"id"in t&&t.id===e.id&&t);if(i)return i}return{}};function c(e,t){if(!t)return e;let i=t.charAt(0).toUpperCase()+t.slice(1);return e&&i?`${e} > ${i}`:i||e}let d=async({id:e,blockData:n,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,field:m,fieldIndex:y,fieldLabelPath:b,global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:v,parentIsLocalized:B,parentPath:Q,parentSchemaPath:x,req:S,siblingData:k,siblingDoc:T,siblingDocWithLocales:N,siblingFields:D,skipValidation:_})=>{let{indexPath:R,path:L,schemaPath:F}=(0,o.getFieldPaths)({field:m,index:y,parentIndexPath:v,parentPath:Q,parentSchemaPath:x}),{localization:M}=S.payload.config,O=M?M?.defaultLocale:"en",U=S.locale||O,P=L?L.split("."):[],$=F?F.split("."):[],j=R?R.split("-").filter(Boolean)?.map(Number):[],H=!m.admin?.condition||!!m.admin.condition(A,k,{blockData:n,operation:w,path:P,user:S.user}),q=_||!H;if((0,a.fieldAffectsData)(m)){if((0,a.fieldShouldBeLocalized)({field:m,parentIsLocalized:B})&&U!==O&&["array","blocks"].includes(m.type)&&null===k[m.name]&&(q=!0),"hooks"in m&&m.hooks?.beforeChange)for(let e of m.hooks.beforeChange){let t=await e({blockData:n,collection:d,context:h,data:A,field:m,global:E,indexPath:j,operation:w,originalDoc:p,path:P,previousSiblingDoc:T,previousValue:T[m.name],req:S,schemaPath:$,siblingData:k,siblingDocWithLocales:N,siblingFields:D,value:k[m.name]});void 0!==t&&(k[m.name]=t)}if(!q&&"validate"in m&&m.validate){let t,a=k[m.name];if("json"===m.type&&"string"==typeof k[m.name])try{JSON.parse(k[m.name])}catch(e){t=e}let o=m.validate,l=await o(a,{...m,id:e,blockData:n,collectionSlug:d?.slug,data:(0,r.deepMergeWithSourceArrays)(p,A),event:"submit",jsonError:t,operation:w,overrideAccess:I,path:P,preferences:{fields:{}},previousValue:T[m.name],req:S,siblingData:(0,r.deepMergeWithSourceArrays)(T,k)});if("string"==typeof l){let t=!1;if("blocks"===m.type&&m.filterOptions){let r=await (0,i.validateBlocksFilterOptions)({id:e,data:A,filterOptions:m.filterOptions,req:S,siblingData:k,value:k[m.name]});if(r?.invalidBlockSlugs?.length){t=!0;let e=-1;for(let t of k[m.name])if(e++,r.invalidBlockSlugs.includes(t.blockType)){let i=(m.blockReferences??m.blocks).find(e=>"string"==typeof e?e===t.blockType:e.slug===t.blockType),r="string"!=typeof i?i:S.payload.config?.blocks?.[i],n=m?.label===!1?b:c(b,`${s(m?.label||m?.name,S.i18n)} > ${S.t("fields:block")} ${e+1} (${s(r?.labels?.singular||t.blockType,S.i18n)})`);g.push({label:n,message:S.t("validation:invalidBlock",{block:t.blockType}),path:`${L}.${e}.id`})}}}if(!t){let e=c(b,s(m?.label||m?.name,S.i18n));g.push({label:e,message:l,path:L})}}}M&&(0,a.fieldShouldBeLocalized)({field:m,parentIsLocalized:B})&&C.push(()=>{let e={};for(let t of M.localeCodes){let i=t===S.locale?k[m.name]:N?.[m.name]?.[t];void 0!==i&&(e[t]=i)}Object.keys(e).length>0&&(k[m.name]=e)})}switch(m.type){case"array":{let t=k[m.name];if(Array.isArray(t)){let i=[];t.forEach((t,r)=>{i.push(u({id:e,blockData:n,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,fieldLabelPath:m?.label===!1?b:c(b,`${s(m?.label||m?.name,S.i18n)} ${r+1}`),fields:m.fields,global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:"",parentIsLocalized:B||m.localized,parentPath:L+"."+r,parentSchemaPath:F,req:S,siblingData:t,siblingDoc:l(t,T[m.name]),siblingDocWithLocales:l(t,N?.[m.name]),skipValidation:q}))}),await Promise.all(i)}break}case"blocks":{let t=k[m.name];if(Array.isArray(t)){let i=[];t.forEach((t,r)=>{let n=l(t,T[m.name]),a=l(t,N?N[m.name]:{}),o=t.blockType||n.blockType,y=S.payload.blocks[o]??(m.blockReferences??m.blocks).find(e=>"string"!=typeof e&&e.slug===o),v=m?.label===!1?b:c(b,`${s(m?.label||m?.name,S.i18n)} > ${S.t("fields:block")} ${r+1} (${s(y?.labels?.singular||o,S.i18n)})`);y&&i.push(u({id:e,blockData:t,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,fieldLabelPath:v,fields:y.fields,global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:"",parentIsLocalized:B||m.localized,parentPath:L+"."+r,parentSchemaPath:F+"."+y.slug,req:S,siblingData:t,siblingDoc:n,siblingDocWithLocales:a,skipValidation:q}))}),await Promise.all(i)}break}case"collapsible":case"row":await u({id:e,blockData:n,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,fieldLabelPath:"row"===m.type||m?.label===!1?b:c(b,s(m?.label||m?.type,S.i18n)),fields:m.fields,global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:R,parentIsLocalized:B,parentPath:Q,parentSchemaPath:F,req:S,siblingData:k,siblingDoc:T,siblingDocWithLocales:N,skipValidation:q});break;case"group":{let t=k,i=T,r=N,o=(0,a.fieldAffectsData)(m);o&&("object"!=typeof k[m.name]&&(k[m.name]={}),"object"!=typeof T[m.name]&&(T[m.name]={}),"object"!=typeof N[m.name]&&(N[m.name]={}),"object"!=typeof k[m.name]&&(k[m.name]={}),"object"!=typeof T[m.name]&&(T[m.name]={}),"object"!=typeof N[m.name]&&(N[m.name]={}),t=k[m.name],i=T[m.name],r=N[m.name]);let l=m?.label||(o?m.name:m?.type);await u({id:e,blockData:n,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,fieldLabelPath:m?.label===!1?b:c(b,s(l,S.i18n)),fields:m.fields,global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:o?"":R,parentIsLocalized:B||m.localized,parentPath:o?L:Q,parentSchemaPath:F,req:S,siblingData:t,siblingDoc:i,siblingDocWithLocales:r,skipValidation:q});break}case"point":Array.isArray(k[m.name])&&null!==k[m.name][0]&&null!==k[m.name][1]&&(k[m.name]={type:"Point",coordinates:[parseFloat(k[m.name][0]),parseFloat(k[m.name][1])]});break;case"richText":{if(!m?.editor)throw new t.MissingEditorProp(m);if("function"==typeof m?.editor)throw Error("Attempted to access unsanitized rich text editor.");let e=m?.editor;if(e?.hooks?.beforeChange?.length)for(let t of e.hooks.beforeChange){let e=await t({collection:d,context:h,data:A,docWithLocales:f,errors:g,field:m,fieldLabelPath:m?.label===!1?b:c(b,s(m?.label||m?.name,S.i18n)),global:E,indexPath:j,mergeLocaleActions:C,operation:w,originalDoc:p,overrideAccess:I,parentIsLocalized:B,path:P,previousSiblingDoc:T,previousValue:T[m.name],req:S,schemaPath:$,siblingData:k,siblingDocWithLocales:N,skipValidation:_,value:k[m.name]});void 0!==e&&(k[m.name]=e)}break}case"tab":{let t=k,i=T,r=N,o=(0,a.tabHasName)(m);o&&("object"!=typeof k[m.name]&&(k[m.name]={}),"object"!=typeof T[m.name]&&(T[m.name]={}),"object"!=typeof N[m.name]&&(N[m.name]={}),t=k[m.name],i=T[m.name],r=N[m.name]),await u({id:e,blockData:n,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,fieldLabelPath:m?.label===!1?b:c(b,s(m?.label||m.name,S.i18n)),fields:m.fields,global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:o?"":R,parentIsLocalized:B||m.localized,parentPath:o?L:Q,parentSchemaPath:F,req:S,siblingData:t,siblingDoc:i,siblingDocWithLocales:r,skipValidation:q});break}case"tabs":await u({id:e,blockData:n,collection:d,context:h,data:A,doc:p,docWithLocales:f,errors:g,fieldLabelPath:m?.label===!1?b:c(b,s(m?.label||"",S.i18n)),fields:m.tabs.map(e=>({...e,type:"tab"})),global:E,mergeLocaleActions:C,operation:w,overrideAccess:I,parentIndexPath:R,parentIsLocalized:B,parentPath:L,parentSchemaPath:F,req:S,siblingData:k,siblingDoc:T,siblingDocWithLocales:N,skipValidation:q})}},u=async({id:e,blockData:t,collection:i,context:r,data:n,doc:s,docWithLocales:a,errors:o,fieldLabelPath:l,fields:c,global:u,mergeLocaleActions:h,operation:A,overrideAccess:p,parentIndexPath:f,parentIsLocalized:g,parentPath:m,parentSchemaPath:y,req:b,siblingData:E,siblingDoc:C,siblingDocWithLocales:w,skipValidation:I})=>{let v=[];c.forEach((B,Q)=>{v.push(d({id:e,blockData:t,collection:i,context:r,data:n,doc:s,docWithLocales:a,errors:o,field:B,fieldIndex:Q,fieldLabelPath:l,global:u,mergeLocaleActions:h,operation:A,overrideAccess:p,parentIndexPath:f,parentIsLocalized:g,parentPath:m,parentSchemaPath:y,req:b,siblingData:E,siblingDoc:C,siblingDocWithLocales:w,siblingFields:c,skipValidation:I}))}),await Promise.all(v)};e.s(["traverseFields",()=>b],494663);var h=t,A=a,p=o,f=e.i(744237);let g=e=>Array.isArray(e)?e.map(e=>"object"==typeof e&&null!=e?{...e}:e):"object"==typeof e&&null!==e?{...e}:e;async function m({field:e,req:t,siblingDoc:i}){let r;return"name"in e&&e.name&&(void 0!==i[e.name]?r=g(i[e.name]):"defaultValue"in e&&void 0!==e.defaultValue&&(r=await (0,f.getDefaultValue)({defaultValue:e.defaultValue,locale:t.locale||"",req:t,user:t.user}))),r}let y=async({id:e,blockData:t,collection:i,context:r,data:n,doc:s,field:a,fieldIndex:o,global:c,operation:d,overrideAccess:u,parentIndexPath:f,parentIsLocalized:g,parentPath:y,parentSchemaPath:E,req:C,siblingData:w,siblingDoc:I,siblingFields:v})=>{let{indexPath:B,path:Q,schemaPath:x}=(0,p.getFieldPaths)({field:a,index:o,parentIndexPath:f,parentPath:y,parentSchemaPath:E}),S=Q?Q.split("."):[],k=x?x.split("."):[],T=B?B.split("-").filter(Boolean)?.map(Number):[];if((0,A.fieldAffectsData)(a)){if("id"===a.name){if("number"===a.type&&"string"==typeof w[a.name]){let e=w[a.name];w[a.name]=parseFloat(e)}"text"===a.type&&"function"==typeof w[a.name]?.toString&&"string"!=typeof w[a.name]&&(w[a.name]=w[a.name].toString())}switch(a.type){case"array":case"blocks":("0"===w[a.name]||0===w[a.name])&&(w[a.name]=[]);break;case"checkbox":"true"===w[a.name]&&(w[a.name]=!0),"false"===w[a.name]&&(w[a.name]=!1),""===w[a.name]&&(w[a.name]=!1);break;case"number":if("string"==typeof w[a.name]){let e=w[a.name].trim();w[a.name]=0===e.length?null:parseFloat(e)}break;case"point":Array.isArray(w[a.name])&&(w[a.name]=w[a.name].map((e,t)=>{if("string"==typeof e){let e=w[a.name][t].trim();return 0===e.length?null:parseFloat(e)}return e}));break;case"relationship":case"upload":{(""===w[a.name]||"none"===w[a.name]||"null"===w[a.name]||null===w[a.name])&&(!0===a.hasMany?w[a.name]=[]:w[a.name]=null);let e=w[a.name];if(Array.isArray(a.relationTo)){if(Array.isArray(e)&&e.forEach((e,t)=>{let i=C.payload.collections?.[e.relationTo]?.config;if("object"==typeof e.value&&e.value&&"id"in e.value&&(e.value=e.value.id),i?.fields){let r=i.fields.find(e=>(0,A.fieldAffectsData)(e)&&"id"===e.name);r?.type==="number"&&(w[a.name][t]={...e,value:parseFloat(e.value)})}}),!0!==a.hasMany&&(0,A.valueIsValueWithRelation)(e)){let t=C.payload.collections?.[e.relationTo]?.config;if("object"==typeof e.value&&e.value&&"id"in e.value&&(e.value=e.value.id),t?.fields){let i=t.fields.find(e=>(0,A.fieldAffectsData)(e)&&"id"===e.name);i?.type==="number"&&(w[a.name]={...e,value:parseFloat(e.value)})}}}else if(Array.isArray(e)&&e.forEach((t,i)=>{let r=Array.isArray(a.relationTo)?void 0:C.payload.collections?.[a.relationTo]?.config;if("object"==typeof t&&t&&"id"in t&&(e[i]=t.id),r?.fields){let e=r.fields.find(e=>(0,A.fieldAffectsData)(e)&&"id"===e.name);e?.type==="number"&&(w[a.name][i]=parseFloat(t))}}),!0!==a.hasMany&&e){let t=C.payload.collections?.[a.relationTo]?.config;if("object"==typeof e&&e&&"id"in e&&(w[a.name]=e.id),t?.fields){let i=t.fields.find(e=>(0,A.fieldAffectsData)(e)&&"id"===e.name);i?.type==="number"&&(w[a.name]=parseFloat(e))}}break}case"richText":if("string"==typeof w[a.name])try{let e=JSON.parse(w[a.name]);w[a.name]=e}catch{}}let o={executed:!1,value:void 0};if(void 0===w[a.name]&&(o.value=await m({field:a,req:C,siblingDoc:I}),o.executed=!0),"hooks"in a&&a.hooks?.beforeValidate)for(let e of a.hooks.beforeValidate){let l=await e({blockData:t,collection:i,context:r,data:n,field:a,global:c,indexPath:T,operation:d,originalDoc:s,overrideAccess:u,path:S,previousSiblingDoc:I,previousValue:I[a.name],req:C,schemaPath:k,siblingData:w,siblingFields:v,value:void 0===w[a.name]?o.value:w[a.name]});void 0!==l&&(w[a.name]=l)}a.access&&a.access[d]&&(u||await a.access[d]({id:e,blockData:t,data:n,doc:s,req:C,siblingData:w})||delete w[a.name]),void 0===w[a.name]&&(w[a.name]=o.executed?o.value:await m({field:a,req:C,siblingDoc:I}))}switch(a.type){case"array":{let o=w[a.name];if(Array.isArray(o)){let h=[];o.forEach((o,A)=>{h.push(b({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:a.fields,global:c,operation:d,overrideAccess:u,parentIndexPath:"",parentIsLocalized:g||a.localized,parentPath:Q+"."+A,parentSchemaPath:x,req:C,siblingData:o,siblingDoc:l(o,I[a.name])}))}),await Promise.all(h)}break}case"blocks":{let t=w[a.name];if(Array.isArray(t)){let o=[];t.forEach((t,h)=>{let A=l(t,I[a.name]),p=t.blockType||A.blockType,f=C.payload.blocks[p]??(a.blockReferences??a.blocks).find(e=>"string"!=typeof e&&e.slug===p);f&&(t.blockType=p,o.push(b({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:f.fields,global:c,operation:d,overrideAccess:u,parentIndexPath:"",parentIsLocalized:g||a.localized,parentPath:Q+"."+h,parentSchemaPath:x+"."+f.slug,req:C,siblingData:t,siblingDoc:A})))}),await Promise.all(o)}break}case"collapsible":case"row":await b({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:a.fields,global:c,operation:d,overrideAccess:u,parentIndexPath:B,parentIsLocalized:g,parentPath:y,parentSchemaPath:x,req:C,siblingData:w,siblingDoc:I});break;case"group":{let o=w,l=I,h=(0,A.fieldAffectsData)(a);h&&("object"!=typeof w[a.name]&&(w[a.name]={}),"object"!=typeof I[a.name]&&(I[a.name]={}),o=w[a.name],l=I[a.name]),await b({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:a.fields,global:c,operation:d,overrideAccess:u,parentIndexPath:h?"":B,parentIsLocalized:g||a.localized,parentPath:h?Q:y,parentSchemaPath:x,req:C,siblingData:o,siblingDoc:l});break}case"richText":{if(!a?.editor)throw new h.MissingEditorProp(a);if("function"==typeof a?.editor)throw Error("Attempted to access unsanitized rich text editor.");let e=a?.editor;if(e?.hooks?.beforeValidate?.length)for(let t of e.hooks.beforeValidate){let e=await t({collection:i,context:r,data:n,field:a,global:c,indexPath:T,operation:d,originalDoc:s,overrideAccess:u,parentIsLocalized:g,path:S,previousSiblingDoc:I,previousValue:w[a.name],req:C,schemaPath:k,siblingData:w,value:w[a.name]});void 0!==e&&(w[a.name]=e)}break}case"tab":{let o,l,h=(0,A.tabHasName)(a);h?("object"!=typeof w[a.name]&&(w[a.name]={}),"object"!=typeof I[a.name]&&(I[a.name]={}),o=w[a.name],l=I[a.name]):(o=w,l=I),await b({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:a.fields,global:c,operation:d,overrideAccess:u,parentIndexPath:h?"":B,parentIsLocalized:g||a.localized,parentPath:h?Q:y,parentSchemaPath:x,req:C,siblingData:o,siblingDoc:l});break}case"tabs":await b({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:a.tabs.map(e=>({...e,type:"tab"})),global:c,operation:d,overrideAccess:u,parentIndexPath:B,parentIsLocalized:g,parentPath:Q,parentSchemaPath:x,req:C,siblingData:w,siblingDoc:I})}},b=async({id:e,blockData:t,collection:i,context:r,data:n,doc:s,fields:a,global:o,operation:l,overrideAccess:c,parentIndexPath:d,parentIsLocalized:u,parentPath:h,parentSchemaPath:A,req:p,siblingData:f,siblingDoc:g})=>{let m=[];a.forEach((b,E)=>{m.push(y({id:e,blockData:t,collection:i,context:r,data:n,doc:s,field:b,fieldIndex:E,global:o,operation:l,overrideAccess:c,parentIndexPath:d,parentIsLocalized:u,parentPath:h,parentSchemaPath:A,req:p,siblingData:f,siblingDoc:g,siblingFields:a}))}),await Promise.all(m)}},833131,(e,t,i)=>{"use strict";function r(e){return e>=55296&&e<=56319}function n(e){return e>=56320&&e<=57343}t.exports=function(e,t,i){if("string"!=typeof t)throw Error("Input must be string");for(var s,a,o=t.length,l=0,c=0;c<o;c+=1){if(s=t.charCodeAt(c),a=t[c],r(s)&&n(t.charCodeAt(c+1))&&(c+=1,a+=t[c]),(l+=e(a))===i)return t.slice(0,c+1);if(l>i)return t.slice(0,c-a.length+1)}return t}},881816,(e,t,i)=>{"use strict";var r=e.r(833131),n=Buffer.byteLength.bind(Buffer);t.exports=r.bind(null,n)},370167,(e,t,i)=>{"use strict";var r=e.r(881816),n=/[\/\?<>\\:\*\|"]/g,s=/[\x00-\x1f\x80-\x9f]/g,a=/^\.+$/,o=/^(con|prn|aux|nul|com[0-9]|lpt[0-9])(\..*)?$/i,l=/[\. ]+$/;function c(e,t){if("string"!=typeof e)throw Error("Input must be string");return r(e.replace(n,t).replace(s,t).replace(a,t).replace(o,t).replace(l,t),255)}t.exports=function(e,t){var i=t&&t.replacement||"",r=c(e,i);return""===i?r:c(r,"")}},453028,464639,743699,371031,749591,117429,212329,148968,830263,999733,999676,7244,994674,71457,e=>{"use strict";var t=e.i(839875),i=e.i(541046);async function r(e){let{collection:{config:r},config:n,disableEmail:s,email:a,req:o,token:l,user:c}=e;if(!s){let e=(0,i.getRequestOrigin)({config:n,req:o}),s=(0,t.formatAdminURL)({adminRoute:n.routes.admin,path:`/${r.slug}/verify/${l}`,serverURL:e}),d=`${o.t("authentication:newAccountCreated",{serverURL:n.serverURL,verificationURL:s})}`,u=r.auth.verify;"function"==typeof u.generateEmailHTML&&(d=await u.generateEmailHTML({req:o,token:l,user:c}));let h=o.t("authentication:verifyYourEmail");"function"==typeof u.generateEmailSubject&&(h=await u.generateEmailSubject({req:o,token:l,user:c})),await a.sendEmail({from:`"${a.defaultFromName}" <${a.defaultFromAddress}>`,html:d,subject:h,to:c.email})}}e.s(["sendVerificationEmail",()=>r],453028);var n=e.i(546712),s=e.i(427510),a=e.i(911908);let o=async({collection:e,doc:t,password:i,payload:r,req:o})=>{let l,c=e?.auth?.loginWithUsername,{canLoginWithEmail:d,canLoginWithUsername:u}=(0,s.getLoginOptions)(c);if(u?(l={or:[]},d&&t.email&&l.or?.push({email:{equals:t.email}}),t.username&&l.or?.push({username:{equals:t.username}})):l={email:{equals:t.email}},(await r.find({collection:e.slug,depth:0,limit:1,pagination:!1,req:o,where:l})).docs.length>0)throw new n.ValidationError({collection:e.slug,errors:[u?{message:o.t("error:usernameAlreadyRegistered"),path:"username"}:{message:o.t("error:userEmailAlreadyRegistered"),path:"email"}]});let{hash:h,salt:A}=await (0,a.generatePasswordSaltHash)({collection:e,password:i,req:o}),p={...t};return p.password&&delete p.password,r.db.create({collection:e.slug,data:{...p,hash:h,salt:A},req:o})};e.s(["registerLocalStrategy",0,o],464639);var l=e.i(42625),c=e.i(144832),d=e.i(617997),u=e.i(295694),h=e.i(195884);e.i(10188);var A=e.i(785867),p=e.i(700859);class f extends p.APIError{constructor(e){super(e?e("general:notFound"):h.en.translations.general.notFound,A.status.NOT_FOUND)}}e.s(["NotFound",()=>f],743699);var g=e.i(488889),m=e.i(186725),y=e.i(951020);let b=async({id:e,blockData:t,collection:i,context:r,doc:n,field:s,fieldIndex:a,overrideAccess:o,parentIndexPath:l,parentIsLocalized:c,parentPath:d,parentSchemaPath:u,req:h,siblingDoc:A,siblingFields:p})=>{let{indexPath:f,path:g,schemaPath:b}=(0,y.getFieldPaths)({field:s,index:a,parentIndexPath:l,parentPath:d,parentSchemaPath:u}),{localization:C}=h.payload.config,w=g?g.split("."):[],I=b?b.split("."):[],v=f?f.split("-").filter(Boolean)?.map(Number):[];if((0,m.fieldAffectsData)(s)){let a=A?.[s.name],l=C&&(0,m.fieldShouldBeLocalized)({field:s,parentIsLocalized:c});if(Array.isArray("hooks"in s&&s.hooks?.beforeDuplicate))if(l){let e={};for(let a of C.localeCodes){let o,l={blockData:t,collection:i,context:r,data:n,field:s,global:void 0,indexPath:v,path:w,previousSiblingDoc:A,previousValue:A[s.name]?.[a],req:h,schemaPath:I,siblingData:A,siblingDocWithLocales:A,siblingFields:p,value:A[s.name]?.[a]};if("hooks"in s&&s.hooks?.beforeDuplicate)for(let e of s.hooks.beforeDuplicate)o=await e(l);void 0!==o&&(e[a]=o)}A[s.name]=e}else{let e,a={blockData:t,collection:i,context:r,data:n,field:s,global:void 0,indexPath:v,path:w,previousSiblingDoc:A,previousValue:A[s.name],req:h,schemaPath:I,siblingData:A,siblingDocWithLocales:A,siblingFields:p,value:A[s.name]};if("hooks"in s&&s.hooks?.beforeDuplicate)for(let t of s.hooks.beforeDuplicate)e=await t(a);void 0!==e&&(A[s.name]=e)}if(l){("object"!=typeof a||null===a)&&(A[s.name]={},a=A[s.name]);let l=[];C.localeCodes.forEach(d=>{if(a[d])switch(s.type){case"array":{let l=a[d];if(Array.isArray(l)){let a=[];l.forEach((l,d)=>{a.push(E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g+"."+d,parentSchemaPath:b,req:h,siblingDoc:l}))})}break}case"blocks":{let t=a[d];if(Array.isArray(t)){let a=[];t.forEach((t,l)=>{let d=t.blockType,u=h.payload.blocks[d]??(s.blockReferences??s.blocks).find(e=>"string"!=typeof e&&e.slug===d);a.push(E({id:e,blockData:t,collection:i,context:r,doc:n,fields:u.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g+"."+l,parentSchemaPath:b+"."+u.slug,req:h,siblingDoc:t}))})}break}case"group":case"tab":l.push(E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g,parentSchemaPath:b,req:h,siblingDoc:a[d]}))}}),await Promise.all(l)}else switch(s.type){case"array":{let a=A[s.name];if(Array.isArray(a)){let l=[];a.forEach((a,d)=>{l.push(E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g+"."+d,parentSchemaPath:b,req:h,siblingDoc:a}))}),await Promise.all(l)}break}case"blocks":{let t=A[s.name];if(Array.isArray(t)){let a=[];t.forEach((t,l)=>{let d=t.blockType,u=h.payload.blocks[d]??(s.blockReferences??s.blocks).find(e=>"string"!=typeof e&&e.slug===d);u&&(t.blockType=d,a.push(E({id:e,blockData:t,collection:i,context:r,doc:n,fields:u.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g+"."+l,parentSchemaPath:b+"."+u.slug,req:h,siblingDoc:t})))}),await Promise.all(a)}break}case"group":{"object"!=typeof A[s.name]&&(A[s.name]={});let a=A[s.name];await E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g,parentSchemaPath:b,req:h,siblingDoc:a});break}case"tab":{"object"!=typeof A[s.name]&&(A[s.name]={});let a=A[s.name];await E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.fields,overrideAccess:o,parentIndexPath:"",parentIsLocalized:c||s.localized,parentPath:g,parentSchemaPath:b,req:h,siblingDoc:a})}}}else switch(s.type){case"collapsible":case"group":case"row":case"tab":await E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.fields,overrideAccess:o,parentIndexPath:f,parentIsLocalized:c,parentPath:d,parentSchemaPath:b,req:h,siblingDoc:A});break;case"tabs":await E({id:e,blockData:t,collection:i,context:r,doc:n,fields:s.tabs.map(e=>({...e,type:"tab"})),overrideAccess:o,parentIndexPath:f,parentIsLocalized:c,parentPath:g,parentSchemaPath:b,req:h,siblingDoc:A})}},E=async({id:e,blockData:t,collection:i,context:r,doc:n,fields:s,overrideAccess:a,parentIndexPath:o,parentIsLocalized:l,parentPath:c,parentSchemaPath:d,req:u,siblingDoc:h})=>{let A=[];s.forEach((p,f)=>{A.push(b({id:e,blockData:t,collection:i,context:r,doc:n,field:p,fieldIndex:f,overrideAccess:a,parentIndexPath:o,parentIsLocalized:l,parentPath:c,parentSchemaPath:d,req:u,siblingDoc:h,siblingFields:s}))}),await Promise.all(A)},C=async({id:e,collection:t,context:i,doc:r,overrideAccess:n,req:s})=>(await E({id:e,collection:t,context:i,doc:r,fields:t.fields,overrideAccess:n,parentIndexPath:"",parentIsLocalized:!1,parentPath:"",parentSchemaPath:"",req:s,siblingDoc:r}),r);var w=e.i(7651),I=m;function v({configBlockReferences:e,docWithLocales:t,fields:i,parentIsLocalized:r=!1,selectedLocales:n}){if(!t||"object"!=typeof t)return t;let s={};for(let a of i)if((0,I.fieldAffectsData)(a)){let i=(0,I.fieldShouldBeLocalized)({field:a,parentIsLocalized:r});switch(a.type){case"array":Array.isArray(t[a.name])&&(s[a.name]=t[a.name].map(t=>v({configBlockReferences:e,docWithLocales:t,fields:a.fields,parentIsLocalized:i,selectedLocales:n})));break;case"blocks":a.name in t&&Array.isArray(t[a.name])&&(s[a.name]=t[a.name].map(t=>{let r;if(e&&a.blockReferences)for(let i of a.blockReferences)r="string"==typeof i?e.find(e=>e.slug===t.blockType):i;else a.blocks&&(r=a.blocks.find(e=>e.slug===t.blockType));if(r){let s=v({configBlockReferences:e,docWithLocales:t,fields:r?.fields||[],parentIsLocalized:i,selectedLocales:n});return s.blockType=t.blockType,s.id=t.id,s.blockName=t.blockName,s}return t}));break;case"group":(0,I.fieldAffectsData)(a)&&a.name in t&&"object"==typeof t[a.name]?s[a.name]=v({configBlockReferences:e,docWithLocales:t[a.name],fields:a.fields,parentIsLocalized:i,selectedLocales:n}):Object.assign(s,v({configBlockReferences:e,docWithLocales:t,fields:a.fields,parentIsLocalized:r,selectedLocales:n}));break;default:if(a.name in t){let e=t[a.name];if(i&&e&&"object"==typeof e&&!Array.isArray(e))if(n&&n.length>0){let t={};for(let i of n)i in e&&(t[i]=e[i]);Object.keys(t).length>0&&(s[a.name]=t)}else s[a.name]=e;else s[a.name]=e}}}else switch(a.type){case"collapsible":case"row":Object.assign(s,v({configBlockReferences:e,docWithLocales:t,fields:a.fields,parentIsLocalized:r,selectedLocales:n}));break;case"tabs":for(let i of a.tabs)(0,I.tabHasName)(i)?i.name in t&&"object"==typeof t[i.name]&&(s[i.name]=v({configBlockReferences:e,docWithLocales:t[i.name],fields:i.fields,parentIsLocalized:r,selectedLocales:n})):Object.assign(s,v({configBlockReferences:e,docWithLocales:t,fields:i.fields,parentIsLocalized:r,selectedLocales:n}))}return s}var B=d,Q=e.i(974605),x=e.i(212827);let S=async({id:e,config:t,payload:i,published:r,query:n,req:s})=>{let a,o=r?{and:[{parent:{equals:e}},{"version._status":{equals:"published"}}]}:{and:[{parent:{equals:e}},{latest:{equals:!0}}]};if((0,Q.hasDraftsEnabled)(t)){let{docs:e}=await i.db.findVersions({collection:t.slug,limit:1,locale:s?.locale||n.locale,pagination:!1,req:s,sort:"-updatedAt",where:(0,B.combineQueries)((0,x.appendVersionToQueryKey)(n.where),o)});a=e[0]}return a?(a.version.id=e,a.version):r?void 0:await i.db.findOne({...n,req:s})??void 0};e.s(["getLatestCollectionVersion",0,S],371031);let k=async({id:e,collectionConfig:t,draftArg:i,overrideAccess:r,req:n,selectedLocales:s})=>{let{payload:a}=n,o=!!r||await (0,l.executeAccess)({id:e,req:n},t.access.read),h=(0,c.hasWhereAccessResult)(o),A={collection:t.slug,locale:n.locale,req:n,where:(0,d.combineQueries)({id:{equals:e}},o)},p=await S({id:e,config:t,payload:a,query:A,req:n});if(s&&s.length>0&&p&&(p=v({configBlockReferences:a.config.blocks,docWithLocales:p,fields:t.fields,selectedLocales:s})),!p&&!h)throw new f(n.t);if(!p&&h)throw new u.Forbidden(n.t);return"createdAt"in p&&delete p.createdAt,"id"in p&&delete p.id,p=await C({id:e,collection:t,context:n.context,doc:p,overrideAccess:r,req:n}),{duplicatedFromDoc:await (0,g.afterRead)({collection:t,context:n.context,depth:0,doc:(0,w.deepCopyObjectSimple)(p),draft:i,fallbackLocale:null,global:null,locale:n.locale,overrideAccess:!0,req:n,showHiddenFields:!0}),duplicatedFromDocWithLocales:p}};e.s(["getDuplicateDocumentData",0,k],749591);var T=e.i(747016);let N=async({collection:e,context:t,data:i,doc:r,global:n,operation:s,previousDoc:a,req:o})=>(await (0,T.traverseFields)({collection:e,context:t,data:i,doc:r,fields:e?.fields||n?.fields,global:n,operation:s,parentIndexPath:"",parentIsLocalized:!1,parentPath:"",parentSchemaPath:"",previousDoc:a,previousSiblingDoc:a,req:o,siblingData:i,siblingDoc:r}),r);e.s(["afterChange",0,N],117429);var D=n,_=w,R=e.i(875798);let L=async({id:e,collection:t,context:i,data:r,doc:n,docWithLocales:s,global:a,operation:o,overrideAccess:l,req:c,skipValidation:d})=>{let u=(0,_.deepCopyObjectSimple)(r),h=[],A=[];if(await (0,R.traverseFields)({id:e,collection:t,context:i,data:u,doc:n,docWithLocales:s,errors:A,fieldLabelPath:"",fields:t?.fields||a?.fields,global:a,mergeLocaleActions:h,operation:o,overrideAccess:l,parentIndexPath:"",parentIsLocalized:!1,parentPath:"",parentSchemaPath:"",req:c,siblingData:u,siblingDoc:n,siblingDocWithLocales:s,skipValidation:d}),A.length>0)throw new D.ValidationError({id:e,collection:t?.slug,errors:A,global:a?.slug,req:c},c.t);for(let e of h)await e();return u};e.s(["beforeChange",0,L],212329);var F=e.i(494663);let M=async({id:e,collection:t,context:i,data:r,doc:n,global:s,operation:a,overrideAccess:o,req:l})=>(await (0,F.traverseFields)({id:e,collection:t,context:i,data:r,doc:n,fields:t?.fields||s?.fields,global:s,operation:a,overrideAccess:o,parentIndexPath:"",parentIsLocalized:!1,parentPath:"",parentSchemaPath:"",req:l,siblingData:r,siblingDoc:n}),r);e.s(["beforeValidate",0,M],148968);var O=w,U=Q,P=e.i(9051),$=e.i(553095);let j=({select:e})=>e?"include"===(0,$.getSelectMode)(e)?{parent:!0,version:e}:{version:e}:void 0;e.s(["getQueryDraftsSelect",0,j],830263);let H=async({id:e,collection:t,global:i,max:r,payload:n,req:s})=>{let a=t?"collection":"global",o=t?t.slug:i?.slug;try{let a,l={};if(t){l.parent={equals:e};let i=await n.db.findVersions({collection:t.slug,limit:1,page:r+1,pagination:!1,req:s,sort:"-updatedAt",where:l});[a]=i.docs}else if(i){let e=await n.db.findGlobalVersions({global:i.slug,limit:1,page:r+1,pagination:!1,req:s,sort:"-updatedAt",where:l});[a]=e.docs}if(a?.updatedAt){let r={updatedAt:{less_than_equal:a.updatedAt}};t&&(r.parent={equals:e});let l={req:s,where:r};i?l.globalSlug=o:l.collection=o,await n.db.deleteVersions(l)}}catch(e){n.logger.error(e),n.logger.error(`There was an error cleaning up old versions for the ${a} ${o}`)}};var q=w;let z=async({id:e,autosave:t,collection:i,data:r,global:n,payload:s,publishSpecificLocale:a,req:o,select:l})=>{let c=(0,q.deepCopyObjectSimple)(r||{});c._id&&delete c._id;let d=new Date().toISOString(),u={autosave:!!t,createdAt:d,publishedLocale:a||void 0,req:o,returning:!1,select:j({select:l}),updatedAt:d,versionData:c};return i&&e?s.db.createVersion({...u,collectionSlug:i.slug,parent:e,snapshot:!0}):n?s.db.createGlobalVersion({...u,globalSlug:n.slug,snapshot:!0}):void 0};async function V({id:e,collection:t,global:i,now:r,payload:n,req:s,shouldUpdate:a=()=>!0,versionData:o}){let l,c={limit:1,pagination:!1,req:s,sort:"-updatedAt"};t?{docs:l}=await n.db.findVersions({...c,collection:t.slug,where:{parent:{equals:e}}}):{docs:l}=await n.db.findGlobalVersions({...c,global:i.slug});let[d]=l;if(!d||!a(d))return;let u={id:d.id,req:s,versionData:{createdAt:new Date(d.createdAt).toISOString(),latest:!0,parent:e,updatedAt:r,version:{...o}}};return t?await n.db.updateVersion({...u,collection:t.slug,req:s}):await n.db.updateGlobalVersion({...u,global:i.slug,req:s})}async function G({id:e,autosave:t,collection:i,docWithLocales:r,draft:n,global:s,operation:a,payload:o,publishSpecificLocale:l,req:c,returning:d,select:u,snapshot:h,unpublish:A}){let p,f=!1,g=new Date().toISOString(),m=(0,O.deepCopyObjectSimple)(r);(i?.timestamps||s)&&n&&(m.updatedAt=g),m._id&&delete m._id;try{if((A||t)&&(p=await V({id:e,collection:i,global:s,now:g,payload:o,req:c,shouldUpdate:t?e=>"autosave"in e&&!0===e.autosave:void 0,versionData:m})),!p){f=!0;let r={autosave:!!t,collectionSlug:void 0,createdAt:"restoreVersion"===a?m.createdAt:g,globalSlug:void 0,parent:i?e:void 0,publishedLocale:l||void 0,req:c,returning:d,select:j({select:u}),updatedAt:g,versionData:m};i&&(r.collectionSlug=i.slug,p=await o.db.createVersion(r)),s&&(r.globalSlug=s.slug,p=await o.db.createGlobalVersion(r)),h&&await z({id:e,autosave:t,collection:i,data:h,global:s,payload:o,publishSpecificLocale:l,req:c,select:u})}}catch(r){let t;i&&(t=`There was an error while saving a version for the ${"string"==typeof i.labels.singular?i.labels.singular:i.slug} with ID ${e}.`),s&&(t=`There was an error while saving a version for the global ${"string"==typeof s.label?s.label:s.slug}.`),o.logger.error({err:r,msg:t});return}let y=(0,U.getVersionsMax)(i||s);if(f&&y>0&&await H({id:e,collection:i,global:s,max:y,payload:o,req:c}),!1===d)return null;let b=p.version;return(b=(0,P.sanitizeInternalFields)(b)).id=p.parent,b}e.s(["saveVersion",()=>G],999733);var Y=A,W=p;class J extends W.APIError{constructor(e,t){let i=e?e("error:problemUploadingFile"):"There was a problem while retrieving the file.";t&&(i+=` ${t}`),super(i,Y.status.INTERNAL_SERVER_ERROR)}}e.s(["FileRetrievalError",()=>J],999676);var K=h,Z=A,X=p;class ee extends X.APIError{constructor(e){super(e?e("error:problemUploadingFile"):K.en.translations.error.problemUploadingFile,Z.status.BAD_REQUEST)}}e.s(["FileUploadError",()=>ee],7244);var et=h,ei=A,er=p;class en extends er.APIError{constructor(e){super(e?e("error:noFilesUploaded"):et.en.translations.error.noFilesUploaded,ei.status.BAD_REQUEST)}}function es(e){return["image/jpeg","image/png","image/gif","image/webp","image/tiff","image/avif"].indexOf(e)>-1}e.s(["MissingFile",()=>en],994674),e.s(["canResizeImage",()=>es],71457)},420186,143706,e=>{"use strict";function t(e){if(!e.subarray(0,8).toString("latin1").startsWith("%PDF-"))return!1;let t=Math.min(1024,e.length),i=e.subarray(e.length-t).toString("latin1");return!!i.includes("%%EOF")&&!!i.includes("xref")}function i(e){try{let t=2048,i=e.toString("utf8",0,Math.min(e.length,t)),r=i.match(/^<\?xml[^>]*encoding=["']([^"']+)["']/i),n=r?.[1]?.toLowerCase();if(n&&!["ascii","utf-8","utf8"].includes(n))return!1;let s=i.replace(/<\?xml[^>]*\?>/gi,"").replace(/<!--[\s\S]*?-->/g,"").replace(/<\?[^>]*\?>/g,"").trim().match(/^<(\w+)(?:\s|>)/);if(!s||"svg"!==s[1]||!/xmlns=["']http:\/\/www\.w3\.org\/2000\/svg["']/.test(i)||!i.match(/<svg[\s>]/))return!1;return!0}catch(e){return!1}}e.s(["validatePDF",()=>t],420186),e.s(["detectSvgFromXml",()=>i],143706)},918935,72073,910680,e=>{"use strict";var t=e.i(799811),i=e.i(546712),r=e.i(438635),n=e.i(420186),s=e.i(143706),a=e.i(132659);function o(e){try{let t=e.toString("utf8");for(let e of[/<script[\s>]/i,/<\/script>/i,/\son\w+\s*=/i,/javascript:/i,/data:text\/html/i,/<foreignObject[\s>]/i,/<iframe[\s>]/i,/<object[\s>]/i,/<embed[\s>]/i,/data:image\/svg\+xml;base64,[\w+/]*PHNjcmlwdA/i,/xlink:href\s*=\s*["']javascript:/i,/@import/i,/<!ENTITY/i,/<!DOCTYPE[^>]*\[/i,/<!\[CDATA\[[\s\S]*<script/i])if(e.test(t))return!1;return!0}catch(e){return!1}}let l=[{extensions:["exe","dll"],mimeType:"application/x-msdownload"},{extensions:["exe","com","app","action"],mimeType:"application/x-executable"},{extensions:["bat","cmd"],mimeType:"application/x-msdos-program"},{extensions:["exe","com"],mimeType:"application/x-ms-dos-executable"},{extensions:["dmg"],mimeType:"application/x-apple-diskimage"},{extensions:["deb"],mimeType:"application/x-debian-package"},{extensions:["rpm"],mimeType:"application/x-redhat-package-manager"},{extensions:["exe","dll"],mimeType:"application/vnd.microsoft.portable-executable"},{extensions:["msi"],mimeType:"application/x-msi"},{extensions:["jar","ear","war"],mimeType:"application/java-archive"},{extensions:["desktop"],mimeType:"application/x-desktop"},{extensions:["cpl"],mimeType:"application/x-cpl"},{extensions:["lnk"],mimeType:"application/x-ms-shortcut"},{extensions:["pkg"],mimeType:"application/x-apple-installer"},{extensions:["htm","html","shtml","xhtml"],mimeType:"text/html"},{extensions:["php","phtml"],mimeType:"application/x-httpd-php"},{extensions:["js","jse"],mimeType:"text/javascript"},{extensions:["jsp"],mimeType:"application/x-jsp"},{extensions:["py"],mimeType:"text/x-python"},{extensions:["rb"],mimeType:"text/x-ruby"},{extensions:["pl"],mimeType:"text/x-perl"},{extensions:["ps1","psc1","psd1","psh","psm1"],mimeType:"application/x-powershell"},{extensions:["vbe","vbs"],mimeType:"application/x-vbscript"},{extensions:["ws","wsc","wsf","wsh"],mimeType:"application/x-ms-wsh"},{extensions:["scr"],mimeType:"application/x-msdownload"},{extensions:["asp","aspx"],mimeType:"application/x-asp"},{extensions:["hta"],mimeType:"application/x-hta"},{extensions:["reg"],mimeType:"application/x-registry"},{extensions:["url"],mimeType:"application/x-url"},{extensions:["workflow"],mimeType:"application/x-workflow"},{extensions:["command"],mimeType:"application/x-command"}],c=async({collection:e,file:c,req:d})=>{let u=[],{upload:h}=e,A=d?.payload?.config?.upload?.useTempFiles??!1,p=h&&"object"==typeof h&&"mimeTypes"in h&&Array.isArray(h.mimeTypes)?h.mimeTypes:[],f=!!h&&"object"==typeof h&&"allowRestrictedFileTypes"in h&&h.allowRestrictedFileTypes,g=e=>!["/svg","image/svg+xml","image/x-xbitmap","image/x-xpixmap"].includes(e)&&(e.startsWith("image/")||e.startsWith("video/")||e.startsWith("audio/")||"application/pdf"===e);if(!f){if(p.length>0){let e=await (0,t.fileTypeFromBuffer)(c.data),i=c.name.split(".").pop()||"";if(e?.mime==="application/xml"&&p.some(e=>e.includes("image/")&&(e.includes("svg")||"image/*"===e))&&(0,s.detectSvgFromXml)(c.data)&&(e={ext:"svg",mime:"image/svg+xml"}),!e&&!A){let e=(0,a.getFileTypeFallback)(c.name).mime;(0,r.validateMimeType)(e,p)?("svg"===i.toLowerCase()&&(o(c.data)||u.push("SVG file contains potentially harmful content.")),"application/pdf"===e&&((0,n.validatePDF)(c.data)||u.push("Invalid or corrupted PDF file."))):u.push(`File type ${e} (from extension ${i}) is not allowed.`),g(e)&&d.payload.logger.warn(`File buffer returned no detectable MIME type for ${c.name}. Falling back to extension-based validation.`)}let l=e?.mime&&(0,r.validateMimeType)(e.mime,p);l&&e?.mime==="application/pdf"&&((0,n.validatePDF)(c?.data)||u.push("Invalid PDF file.")),e&&!l&&u.push(`Invalid MIME type: ${e.mime}.`)}else l.some(e=>{let t=e.extensions.some(e=>c.name.toLowerCase().endsWith(e)),i=e.mimeType===c.mimetype;return t||i})&&u.push(`File type '${c.mimetype}' not allowed ${c.name}: Restricted file type detected -- set 'allowRestrictedFileTypes' to true to skip this check for this Collection.`);if(u.length>0)throw d.payload.logger.error(u.join(", ")),new i.ValidationError({errors:[{message:u.join(", "),path:"file"}]})}};async function d({req:e,sharpFile:t,withMetadata:i}){let r=await t.metadata();return!0===i||"function"==typeof i&&await i({metadata:r,req:e})?t.withMetadata():t}e.s(["checkFileRestrictions",0,c],918935),e.s(["optionallyAppendMetadata",()=>d],72073);let u=(e,t)=>Math.floor(e/100*t);async function h({cropData:e,dimensions:t,file:i,heightInPixels:r,req:n,sharp:s,widthInPixels:a,withMetadata:o}){try{let{x:l,y:c}=e,h=i,A=["image/avif","image/gif","image/webp"].includes(h.mimetype),p={};A&&(p.animated=!0);let{height:f,width:g}=t,m=Number(a),y=Number(r);if(g===m&&f===y){let e=f;if(A){let t=await s(h.tempFilePath||h.data,p).metadata();e=t.pages?t.height:f}return{data:h.data,info:{height:e,size:h.size,width:g}}}let b={height:Number(r),left:u(l,t.width),top:u(c,t.height),width:Number(a)},E=s(h.tempFilePath||h.data,p).extract(b);return E=await d({req:n,sharpFile:E,withMetadata:o}),await E.toBuffer({resolveWithObject:!0})}catch(e){throw console.error("Error cropping image:",e),e}}e.s(["cropImage",()=>h],910680)},525465,e=>{"use strict";var t=e.i(700859),i=e.i(786559),r=e.i(265943);let n=async({data:e,req:n,uploadConfig:s})=>{let{filename:a,url:o}=e,l=!0;if("string"==typeof o){let e,c=o;if(!o.startsWith("http")){l=!1;let e=n.headers.get("origin")||`${n.protocol}://${n.headers.get("host")}`;c=`${e}${o}`}let d=(n.headers.get("cookie")??"").split(";");l&&(d=d.filter(e=>!e.trim().startsWith(n.payload.config.cookiePrefix)));let u=s.externalFileHeaderFilter?s.externalFileHeaderFilter(Object.fromEntries(new Headers(n.headers))):{cookie:d.join(";")},h=0,A=3;for(;h<=A;){let n=!0===s.skipSafeFetch?s.skipSafeFetch:Array.isArray(s.skipSafeFetch)&&(0,i.isURLAllowed)(c,s.skipSafeFetch),a=s.pasteURL&&s.pasteURL.allowList&&(0,i.isURLAllowed)(c,s.pasteURL.allowList);if((e=n||a?await fetch(c,{credentials:"include",headers:u,method:"GET",redirect:"manual"}):await (0,r.safeFetch)(c,{credentials:"include",headers:u,method:"GET"})).status>=300&&e.status<400){if(++h>A)throw new t.APIError(`Too many redirects (max ${A})`,403);let r=e.headers.get("location");if(r){if(c=new URL(r,c).toString(),s.pasteURL&&s.pasteURL.allowList&&!(0,i.isURLAllowed)(c,s.pasteURL.allowList))throw new t.APIError("Redirect target is not allowed.",400);continue}}break}if(!e||!e.ok)throw new t.APIError(`Failed to fetch file from ${c}`,e?.status);let p=await e.arrayBuffer();return{name:a,data:Buffer.from(p),mimetype:e.headers.get("content-type")||void 0,size:Number(e.headers.get("content-length"))||0}}throw new t.APIError("Invalid file url",400)};e.s(["getExternalFile",0,n])},429653,e=>{"use strict";var t=e.i(192516),i=e.i(924868),r=e.i(814747);let n={svg:"image/svg+xml"},s=async e=>{if("string"!=typeof e)return;let s=r.default.basename(e),a=r.default.extname(e).slice(1),[o,l,c]=await Promise.all([i.default.readFile(e),i.default.stat(e),(0,t.fileTypeFromFile)(e)]);return{name:s,data:o,mimetype:c?.mime||n[a],size:l.size}};e.s(["getFileByPath",0,s])},15487,563646,361492,49703,904937,725740,62696,542299,585993,e=>{"use strict";var t=e.i(254799),i=e.i(685147),r=e.i(42625),n=e.i(453028),s=e.i(464639),a=e.i(749591),o=e.i(117429),l=e.i(488889),c=e.i(212329),d=e.i(148968),u=e.i(999733),h=e.i(799811),A=e.i(924868),p=e.i(370167),f=e.i(999676),g=e.i(7244),m=e.i(295694),y=e.i(994674),b=e.i(852995),E=e.i(71457),C=e.i(918935),w=e.i(910680),I=e.i(525465),v=e.i(429653),B=A,Q=new TextDecoder,x=(e,t=0,i=e.length)=>Q.decode(e.slice(t,i)),S=(e,t=0,i=e.length)=>e.slice(t,i).reduce((e,t)=>e+`0${t.toString(16)}`.slice(-2),""),k=(e,t)=>new DataView(e.buffer,e.byteOffset+t),T=(e,t=0)=>k(e,t).getInt16(0,!0),N=(e,t=0)=>k(e,t).getUint16(0,!1),D=(e,t=0)=>k(e,t).getUint16(0,!0),_=(e,t=0)=>{let i=k(e,t);return i.getUint16(0,!0)+(i.getUint8(2)<<16)},R=(e,t=0)=>k(e,t).getInt32(0,!0),L=(e,t=0)=>k(e,t).getUint32(0,!1),F=(e,t=0)=>k(e,t).getUint32(0,!0),M=(e,t,i)=>k(e,t).getBigUint64(0,!i),O={readUInt16BE:N,readUInt16LE:D,readUInt32BE:L,readUInt32LE:F};function U(e,t,i=0,r=!1){let n=r?"BE":"LE";return O[`readUInt${t}${n}`](e,i)}function P(e,t){if(e.length-t<4)return;let i=L(e,t);if(!(e.length-t<i))return{name:x(e,4+t,8+t),offset:t,size:i}}function $(e,t,i){for(;i<e.length;){let r=P(e,i);if(!r)break;if(r.name===t)return r;i+=r.size>0?r.size:8}}var j={validate:e=>"BM"===x(e,0,2),calculate:e=>({height:Math.abs(R(e,22)),width:F(e,18)})},H=1,q=6,z=16;function V(e,t){let i=e[t];return 0===i?256:i}function G(e,t){let i=q+t*z;return{height:V(e,i+1),width:V(e,i)}}var Y={validate(e){let t=D(e,0),i=D(e,4);return 0===t&&0!==i&&D(e,2)===H},calculate(e){let t=D(e,4),i=G(e,0);if(1===t)return i;let r=[];for(let i=0;i<t;i+=1)r.push(G(e,i));return{width:i.width,height:i.height,images:r}}},W=2,J={validate(e){let t=D(e,0),i=D(e,4);return 0===t&&0!==i&&D(e,2)===W},calculate:e=>Y.calculate(e)},K={validate:e=>0x20534444===F(e,0),calculate:e=>({height:F(e,12),width:F(e,16)})},Z=/^GIF8[79]a/,X={validate:e=>Z.test(x(e,0,6)),calculate:e=>({height:D(e,8),width:D(e,6)})},ee={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"},et={validate(e){if("ftyp"!==x(e,4,8))return!1;let t=$(e,"ftyp",0);return!!t&&x(e,t.offset+8,t.offset+12)in ee},calculate(e){let t=$(e,"meta",0),i=t&&$(e,"iprp",t.offset+12),r=i&&$(e,"ipco",i.offset+8);if(!r)throw TypeError("Invalid HEIF, no ipco box found");let n=x(e,8,12),s=[],a=r.offset+8;for(;a<r.offset+r.size;){let t=$(e,"ispe",a);if(!t)break;let i=L(e,t.offset+12),n=L(e,t.offset+16),o=$(e,"clap",a),l=i,c=n;o&&o.offset<r.offset+r.size&&(l=i-L(e,o.offset+12)),s.push({height:c,width:l}),a=t.offset+t.size}if(0===s.length)throw TypeError("Invalid HEIF, no sizes found");return{width:s[0].width,height:s[0].height,type:n,...s.length>1?{images:s}:{}}}},ei=8,er=4,en=4,es={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function ea(e,t){let i=t+en;return[x(e,t,i),L(e,i)]}function eo(e){let t=es[e];return{width:t,height:t,type:e}}var el={validate:e=>"icns"===x(e,0,4),calculate(e){let t=e.length,i=L(e,er),r=ei,n=[];for(;r<i&&r<t;){let t=ea(e,r),i=eo(t[0]);n.push(i),r+=t[1]}if(0===n.length)throw TypeError("Invalid ICNS, no sizes found");return{width:n[0].width,height:n[0].height,...n.length>1?{images:n}:{}}}},ec={validate:e=>0xff4fff51===L(e,0),calculate:e=>({height:L(e,12),width:L(e,8)})},ed={validate(e){if("jP "!==x(e,4,8))return!1;let t=$(e,"ftyp",0);return!!t&&"jp2 "===x(e,t.offset+8,t.offset+12)},calculate(e){let t=$(e,"jp2h",0),i=t&&$(e,"ihdr",t.offset+8);if(i)return{height:L(e,i.offset+8),width:L(e,i.offset+12)};throw TypeError("Unsupported JPEG 2000 format")}},eu="45786966",eh=2,eA=6,ep=2,ef="4d4d",eg="4949",em=12,ey=2;function eb(e){return S(e,2,6)===eu}function eE(e,t){return{height:N(e,t),width:N(e,t+2)}}function eC(e,t){let i=eA+8,r=U(e,16,i,t);for(let n=0;n<r;n++){let r=i+ey+n*em,s=r+em;if(r>e.length)return;let a=e.slice(r,s);if(274===U(a,16,0,t)){if(3!==U(a,16,2,t)||1!==U(a,32,4,t))return;return U(a,16,8,t)}}}function ew(e,t){let i=e.slice(eh,t),r=S(i,eA,eA+ep),n=r===ef,s=r===eg;if(n||s)return eC(i,n)}function eI(e,t){if(t>e.length)throw TypeError("Corrupt JPG, exceeded buffer limits")}var ev={validate:e=>"ffd8"===S(e,0,2),calculate(e){let t,i,r=e.slice(4);for(;r.length;){let e=N(r,0);if(eI(r,e),255!==r[e]){r=r.slice(1);continue}if(eb(r)&&(t=ew(r,e)),192===(i=r[e+1])||193===i||194===i){let i=eE(r,e+5);if(!t)return i;return{height:i.height,orientation:t,width:i.width}}r=r.slice(e+2)}throw TypeError("Invalid JPG, no size found")}},eB=class{constructor(e,t){this.input=e,this.endianness=t,this.byteOffset=2,this.bitOffset=0}getBits(e=1){let t=0,i=0;for(;i<e;){if(this.byteOffset>=this.input.length)throw Error("Reached end of input");let r=this.input[this.byteOffset],n=Math.min(e-i,8-this.bitOffset);if("little-endian"===this.endianness){let e=(1<<n)-1;t|=(r>>this.bitOffset&e)<<i}else{let e=(r&(1<<n)-1<<8-this.bitOffset-n)>>8-this.bitOffset-n;t=t<<n|e}i+=n,this.bitOffset+=n,8===this.bitOffset&&(this.byteOffset++,this.bitOffset=0)}return t}};function eQ(e,t){if(t)return 8*(1+e.getBits(5));let i=[9,13,18,30][e.getBits(2)];return 1+e.getBits(i)}function ex(e,t,i,r){return t&&0===i?8*(1+e.getBits(5)):0===i?eQ(e,!1):Math.floor(r*[1,1.2,4/3,1.5,16/9,5/4,2][i-1])}var eS={validate:e=>"ff0a"===S(e,0,2),calculate(e){let t=new eB(e,"little-endian"),i=1===t.getBits(1),r=eQ(t,i),n=t.getBits(3);return{width:ex(t,i,n,r),height:r}}};function ek(e){let t=$(e,"jxlc",0);if(t)return e.slice(t.offset+8,t.offset+t.size);let i=eT(e);if(i.length>0)return eN(i)}function eT(e){let t=[],i=0;for(;i<e.length;){let r=$(e,"jxlp",i);if(!r)break;t.push(e.slice(r.offset+12,r.offset+r.size)),i=r.offset+r.size}return t}function eN(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let r of e)t.set(r,i),i+=r.length;return t}var eD={validate:e=>{if("JXL "!==x(e,4,8))return!1;let t=$(e,"ftyp",0);return!!t&&"jxl "===x(e,t.offset+8,t.offset+12)},calculate(e){let t=ek(e);if(t)return eS.calculate(t);throw Error("No codestream found in JXL container")}},e_={validate:e=>["KTX 11","KTX 20"].includes(x(e,1,7)),calculate:e=>{let t=49===e[5]?"ktx":"ktx2",i="ktx"===t?36:20;return{height:F(e,i+4),width:F(e,i),type:t}}},eR="PNG\r\n\x1a\n",eL="IHDR",eF="CgBI",eM={validate(e){if(eR===x(e,1,8)){let t=x(e,12,16);if(t===eF&&(t=x(e,28,32)),t!==eL)throw TypeError("Invalid PNG");return!0}return!1},calculate:e=>x(e,12,16)===eF?{height:L(e,36),width:L(e,32)}:{height:L(e,20),width:L(e,16)}},eO={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},eU={default:e=>{let t=[];for(;e.length>0;){let i=e.shift();if("#"!==i[0]){t=i.split(" ");break}}if(2===t.length)return{height:Number.parseInt(t[1],10),width:Number.parseInt(t[0],10)};throw TypeError("Invalid PNM")},pam:e=>{let t={};for(;e.length>0;){let i=e.shift();if(i.length>16||i.charCodeAt(0)>128)continue;let[r,n]=i.split(" ");if(r&&n&&(t[r.toLowerCase()]=Number.parseInt(n,10)),t.height&&t.width)break}if(t.height&&t.width)return{height:t.height,width:t.width};throw TypeError("Invalid PAM")}},eP={validate:e=>x(e,0,2)in eO,calculate(e){let t=eO[x(e,0,2)],i=x(e,3).split(/[\r\n]+/);return(eU[t]||eU.default)(i)}},e$={validate:e=>"8BPS"===x(e,0,4),calculate:e=>({height:L(e,14),width:L(e,18)})},ej=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,eH=/\sheight=(['"])([^%]+?)\1/,eq=ej,ez=/\sviewBox=(['"])(.+?)\1/i,eV=/\swidth=(['"])([^%]+?)\1/,eG={in:96,cm:37.79527559055118,em:16,ex:8,m:37.79527559055118*100,mm:37.79527559055118/10,pc:96/72/12,pt:96/72,px:1},eY=RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(eG).join("|")})?$`);function eW(e){let t=eY.exec(e);if(t)return Math.round(Number(t[1])*(eG[t[2]]||1))}function eJ(e){let t=e.split(" ");return{height:eW(t[3]),width:eW(t[2])}}function eK(e){let t=e.match(eV),i=e.match(eH),r=e.match(ez);return{height:i&&eW(i[2]),viewbox:r&&eJ(r[2]),width:t&&eW(t[2])}}function eZ(e){return{height:e.height,width:e.width}}function eX(e,t){let i=t.width/t.height;return e.width?{height:Math.floor(e.width/i),width:e.width}:e.height?{height:e.height,width:Math.floor(e.height*i)}:{height:t.height,width:t.width}}var e0={validate:e=>ej.test(x(e,0,1e3)),calculate(e){let t=x(e).match(eq);if(t){let e=eK(t[0]);if(e.width&&e.height)return eZ(e);if(e.viewbox)return eX(e,e.viewbox)}throw TypeError("Invalid SVG")}},e1={validate:e=>0===D(e,0)&&0===D(e,4),calculate:e=>({height:D(e,14),width:D(e,12)})},e2=256,e4=257,e5=259,e3=3,e8=4,e9=16,e6=12,e7=20,te=2,tt=8;function ti(e,{isBigEndian:t,isBigTiff:i}){let r=i?Number(M(e,8,t)):U(e,32,4,t),n=i?tt:te;return e.slice(r+n)}function tr(e,t,i,r){switch(t){case e3:return U(e,16,i,r);case e8:return U(e,32,i,r);case e9:{let t=Number(M(e,i,r));if(t>Number.MAX_SAFE_INTEGER)throw TypeError("Value too large");return t}default:return 0}}function tn(e,t){let i=t?e7:e6;if(e.length>i)return e.slice(i)}function ts(e,{isBigEndian:t,isBigTiff:i}){let r={},n=e;for(;n?.length;){let e=U(n,16,0,t),s=U(n,16,2,t),a=i?Number(M(n,4,t)):U(n,32,4,t);if(0===e)break;if(1===a&&(s===e3||s===e8||i&&s===e9)){let a=i?12:8;r[e]=tr(n,s,a,t)}n=tn(n,i)}return r}function ta(e){let t=x(e,0,2),i=U(e,16,2,"MM"===t);return{isBigEndian:"MM"===t,isBigTiff:43===i}}function to(e,t){let i=U(e,16,4,t),r=U(e,16,6,t);if(8!==i||0!==r)throw TypeError("Invalid BigTIFF header")}var tl=new Set(["49492a00","4d4d002a","49492b00","4d4d002b"]);function tc(e){return{height:1+_(e,7),width:1+_(e,4)}}function td(e){return{height:1+((15&e[4])<<10|e[3]<<2|(192&e[2])>>6),width:1+((63&e[2])<<8|e[1])}}function tu(e){return{height:16383&T(e,8),width:16383&T(e,6)}}var th=new Map([["bmp",j],["cur",J],["dds",K],["gif",X],["heif",et],["icns",el],["ico",Y],["j2c",ec],["jp2",ed],["jpg",ev],["jxl",eD],["jxl-stream",eS],["ktx",e_],["png",eM],["pnm",eP],["psd",e$],["svg",e0],["tga",e1],["tiff",{validate:e=>{let t=S(e,0,4);return tl.has(t)},calculate(e){let t=ta(e);t.isBigTiff&&to(e,t.isBigEndian);let i=ts(ti(e,t),t),r={height:i[e4],width:i[e2],type:t.isBigTiff?"bigtiff":"tiff"};if(i[e5]&&(r.compression=i[e5]),!r.width||!r.height)throw TypeError("Invalid Tiff. Missing tags");return r}}],["webp",{validate(e){let t="RIFF"===x(e,0,4),i="WEBP"===x(e,8,12),r="VP8"===x(e,12,15);return t&&i&&r},calculate(e){let t=x(e,12,16),i=e.slice(20,30);if("VP8X"===t){let e=i[0],t=(192&e)==0,r=(1&e)==0;if(t&&r)return tc(i);throw TypeError("Invalid WebP")}if("VP8 "===t&&47!==i[0])return tu(i);let r=S(i,3,6);if("VP8L"===t&&"9d012a"!==r)return td(i);throw TypeError("Invalid WebP")}}]]),tA=Array.from(th.keys()),tp=new Map([[0,"heif"],[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);function tf(e){let t=e[0],i=tp.get(t);return i&&th.get(i).validate(e)?i:tA.find(t=>th.get(t).validate(e))}var tg=[];function tm(e){let t=tf(e);if(void 0!==t){if(tg.indexOf(t)>-1)throw TypeError(`disabled file type: ${t}`);let i=th.get(t).calculate(e);if(void 0!==i){if(i.type=i.type??t,i.images&&i.images.length>1){let e=i.images.reduce((e,t)=>t.width*t.height>e.width*e.height?t:e,i.images[0]);i.width=e.width,i.height=e.height}return i}}throw TypeError(`unsupported file type: ${t}`)}var ty=e.i(902157),tb=e.i(750227),tE=new TextDecoder,tC=(e,t=0,i=e.length)=>tE.decode(e.slice(t,i)),tw=(e,t=0,i=e.length)=>e.slice(t,i).reduce((e,t)=>e+`0${t.toString(16)}`.slice(-2),""),tI=(e,t)=>new DataView(e.buffer,e.byteOffset+t),tv=(e,t=0)=>tI(e,t).getInt16(0,!0),tB=(e,t=0)=>tI(e,t).getUint16(0,!1),tQ=(e,t=0)=>tI(e,t).getUint16(0,!0),tx=(e,t=0)=>{let i=tI(e,t);return i.getUint16(0,!0)+(i.getUint8(2)<<16)},tS=(e,t=0)=>tI(e,t).getInt32(0,!0),tk=(e,t=0)=>tI(e,t).getUint32(0,!1),tT=(e,t=0)=>tI(e,t).getUint32(0,!0),tN=(e,t,i)=>tI(e,t).getBigUint64(0,!i),tD={readUInt16BE:tB,readUInt16LE:tQ,readUInt32BE:tk,readUInt32LE:tT};function t_(e,t,i=0,r=!1){let n=r?"BE":"LE";return tD[`readUInt${t}${n}`](e,i)}function tR(e,t){if(e.length-t<4)return;let i=tk(e,t);if(!(e.length-t<i))return{name:tC(e,4+t,8+t),offset:t,size:i}}function tL(e,t,i){for(;i<e.length;){let r=tR(e,i);if(!r)break;if(r.name===t)return r;i+=r.size>0?r.size:8}}var tF={validate:e=>"BM"===tC(e,0,2),calculate:e=>({height:Math.abs(tS(e,22)),width:tT(e,18)})},tM=1,tO=6,tU=16;function tP(e,t){let i=e[t];return 0===i?256:i}function t$(e,t){let i=tO+t*tU;return{height:tP(e,i+1),width:tP(e,i)}}var tj={validate(e){let t=tQ(e,0),i=tQ(e,4);return 0===t&&0!==i&&tQ(e,2)===tM},calculate(e){let t=tQ(e,4),i=t$(e,0);if(1===t)return i;let r=[];for(let i=0;i<t;i+=1)r.push(t$(e,i));return{width:i.width,height:i.height,images:r}}},tH=2,tq={validate(e){let t=tQ(e,0),i=tQ(e,4);return 0===t&&0!==i&&tQ(e,2)===tH},calculate:e=>tj.calculate(e)},tz={validate:e=>0x20534444===tT(e,0),calculate:e=>({height:tT(e,12),width:tT(e,16)})},tV=/^GIF8[79]a/,tG={validate:e=>tV.test(tC(e,0,6)),calculate:e=>({height:tQ(e,8),width:tQ(e,6)})},tY={avif:"avif",mif1:"heif",msf1:"heif",heic:"heic",heix:"heic",hevc:"heic",hevx:"heic"},tW={validate(e){if("ftyp"!==tC(e,4,8))return!1;let t=tL(e,"ftyp",0);return!!t&&tC(e,t.offset+8,t.offset+12)in tY},calculate(e){let t=tL(e,"meta",0),i=t&&tL(e,"iprp",t.offset+12),r=i&&tL(e,"ipco",i.offset+8);if(!r)throw TypeError("Invalid HEIF, no ipco box found");let n=tC(e,8,12),s=[],a=r.offset+8;for(;a<r.offset+r.size;){let t=tL(e,"ispe",a);if(!t)break;let i=tk(e,t.offset+12),n=tk(e,t.offset+16),o=tL(e,"clap",a),l=i,c=n;o&&o.offset<r.offset+r.size&&(l=i-tk(e,o.offset+12)),s.push({height:c,width:l}),a=t.offset+t.size}if(0===s.length)throw TypeError("Invalid HEIF, no sizes found");return{width:s[0].width,height:s[0].height,type:n,...s.length>1?{images:s}:{}}}},tJ=8,tK=4,tZ=4,tX={ICON:32,"ICN#":32,"icm#":16,icm4:16,icm8:16,"ics#":16,ics4:16,ics8:16,is32:16,s8mk:16,icp4:16,icl4:32,icl8:32,il32:32,l8mk:32,icp5:32,ic11:32,ich4:48,ich8:48,ih32:48,h8mk:48,icp6:64,ic12:32,it32:128,t8mk:128,ic07:128,ic08:256,ic13:256,ic09:512,ic14:512,ic10:1024};function t0(e,t){let i=t+tZ;return[tC(e,t,i),tk(e,i)]}function t1(e){let t=tX[e];return{width:t,height:t,type:e}}var t2={validate:e=>"icns"===tC(e,0,4),calculate(e){let t=e.length,i=tk(e,tK),r=tJ,n=[];for(;r<i&&r<t;){let t=t0(e,r),i=t1(t[0]);n.push(i),r+=t[1]}if(0===n.length)throw TypeError("Invalid ICNS, no sizes found");return{width:n[0].width,height:n[0].height,...n.length>1?{images:n}:{}}}},t4={validate:e=>0xff4fff51===tk(e,0),calculate:e=>({height:tk(e,12),width:tk(e,8)})},t5={validate(e){if("jP "!==tC(e,4,8))return!1;let t=tL(e,"ftyp",0);return!!t&&"jp2 "===tC(e,t.offset+8,t.offset+12)},calculate(e){let t=tL(e,"jp2h",0),i=t&&tL(e,"ihdr",t.offset+8);if(i)return{height:tk(e,i.offset+8),width:tk(e,i.offset+12)};throw TypeError("Unsupported JPEG 2000 format")}},t3="45786966",t8=2,t9=6,t6=2,t7="4d4d",ie="4949",it=12,ii=2;function ir(e){return tw(e,2,6)===t3}function is(e,t){return{height:tB(e,t),width:tB(e,t+2)}}function ia(e,t){let i=t9+8,r=t_(e,16,i,t);for(let n=0;n<r;n++){let r=i+ii+n*it,s=r+it;if(r>e.length)return;let a=e.slice(r,s);if(274===t_(a,16,0,t)){if(3!==t_(a,16,2,t)||1!==t_(a,32,4,t))return;return t_(a,16,8,t)}}}function io(e,t){let i=e.slice(t8,t),r=tw(i,t9,t9+t6),n=r===t7,s=r===ie;if(n||s)return ia(i,n)}function il(e,t){if(t>e.length)throw TypeError("Corrupt JPG, exceeded buffer limits")}var ic={validate:e=>"ffd8"===tw(e,0,2),calculate(e){let t,i,r=e.slice(4);for(;r.length;){let e=tB(r,0);if(il(r,e),255!==r[e]){r=r.slice(1);continue}if(ir(r)&&(t=io(r,e)),192===(i=r[e+1])||193===i||194===i){let i=is(r,e+5);if(!t)return i;return{height:i.height,orientation:t,width:i.width}}r=r.slice(e+2)}throw TypeError("Invalid JPG, no size found")}},id=class{constructor(e,t){this.input=e,this.endianness=t,this.byteOffset=2,this.bitOffset=0}getBits(e=1){let t=0,i=0;for(;i<e;){if(this.byteOffset>=this.input.length)throw Error("Reached end of input");let r=this.input[this.byteOffset],n=Math.min(e-i,8-this.bitOffset);if("little-endian"===this.endianness){let e=(1<<n)-1;t|=(r>>this.bitOffset&e)<<i}else{let e=(r&(1<<n)-1<<8-this.bitOffset-n)>>8-this.bitOffset-n;t=t<<n|e}i+=n,this.bitOffset+=n,8===this.bitOffset&&(this.byteOffset++,this.bitOffset=0)}return t}};function iu(e,t){if(t)return 8*(1+e.getBits(5));let i=[9,13,18,30][e.getBits(2)];return 1+e.getBits(i)}function ih(e,t,i,r){return t&&0===i?8*(1+e.getBits(5)):0===i?iu(e,!1):Math.floor(r*[1,1.2,4/3,1.5,16/9,5/4,2][i-1])}var iA={validate:e=>"ff0a"===tw(e,0,2),calculate(e){let t=new id(e,"little-endian"),i=1===t.getBits(1),r=iu(t,i),n=t.getBits(3);return{width:ih(t,i,n,r),height:r}}};function ip(e){let t=tL(e,"jxlc",0);if(t)return e.slice(t.offset+8,t.offset+t.size);let i=ig(e);if(i.length>0)return im(i)}function ig(e){let t=[],i=0;for(;i<e.length;){let r=tL(e,"jxlp",i);if(!r)break;t.push(e.slice(r.offset+12,r.offset+r.size)),i=r.offset+r.size}return t}function im(e){let t=new Uint8Array(e.reduce((e,t)=>e+t.length,0)),i=0;for(let r of e)t.set(r,i),i+=r.length;return t}var iy={validate:e=>{if("JXL "!==tC(e,4,8))return!1;let t=tL(e,"ftyp",0);return!!t&&"jxl "===tC(e,t.offset+8,t.offset+12)},calculate(e){let t=ip(e);if(t)return iA.calculate(t);throw Error("No codestream found in JXL container")}},ib={validate:e=>["KTX 11","KTX 20"].includes(tC(e,1,7)),calculate:e=>{let t=49===e[5]?"ktx":"ktx2",i="ktx"===t?36:20;return{height:tT(e,i+4),width:tT(e,i),type:t}}},iE="PNG\r\n\x1a\n",iC="IHDR",iw="CgBI",iI={validate(e){if(iE===tC(e,1,8)){let t=tC(e,12,16);if(t===iw&&(t=tC(e,28,32)),t!==iC)throw TypeError("Invalid PNG");return!0}return!1},calculate:e=>tC(e,12,16)===iw?{height:tk(e,36),width:tk(e,32)}:{height:tk(e,20),width:tk(e,16)}},iv={P1:"pbm/ascii",P2:"pgm/ascii",P3:"ppm/ascii",P4:"pbm",P5:"pgm",P6:"ppm",P7:"pam",PF:"pfm"},iB={default:e=>{let t=[];for(;e.length>0;){let i=e.shift();if("#"!==i[0]){t=i.split(" ");break}}if(2===t.length)return{height:Number.parseInt(t[1],10),width:Number.parseInt(t[0],10)};throw TypeError("Invalid PNM")},pam:e=>{let t={};for(;e.length>0;){let i=e.shift();if(i.length>16||i.charCodeAt(0)>128)continue;let[r,n]=i.split(" ");if(r&&n&&(t[r.toLowerCase()]=Number.parseInt(n,10)),t.height&&t.width)break}if(t.height&&t.width)return{height:t.height,width:t.width};throw TypeError("Invalid PAM")}},iQ={validate:e=>tC(e,0,2)in iv,calculate(e){let t=iv[tC(e,0,2)],i=tC(e,3).split(/[\r\n]+/);return(iB[t]||iB.default)(i)}},ix={validate:e=>"8BPS"===tC(e,0,4),calculate:e=>({height:tk(e,14),width:tk(e,18)})},iS=/<svg\s([^>"']|"[^"]*"|'[^']*')*>/,ik=/\sheight=(['"])([^%]+?)\1/,iT=iS,iN=/\sviewBox=(['"])(.+?)\1/i,iD=/\swidth=(['"])([^%]+?)\1/,i_={in:96,cm:37.79527559055118,em:16,ex:8,m:37.79527559055118*100,mm:37.79527559055118/10,pc:96/72/12,pt:96/72,px:1},iR=RegExp(`^([0-9.]+(?:e\\d+)?)(${Object.keys(i_).join("|")})?$`);function iL(e){let t=iR.exec(e);if(t)return Math.round(Number(t[1])*(i_[t[2]]||1))}function iF(e){let t=e.split(" ");return{height:iL(t[3]),width:iL(t[2])}}function iM(e){let t=e.match(iD),i=e.match(ik),r=e.match(iN);return{height:i&&iL(i[2]),viewbox:r&&iF(r[2]),width:t&&iL(t[2])}}function iO(e){return{height:e.height,width:e.width}}function iU(e,t){let i=t.width/t.height;return e.width?{height:Math.floor(e.width/i),width:e.width}:e.height?{height:e.height,width:Math.floor(e.height*i)}:{height:t.height,width:t.width}}var iP={validate:e=>iS.test(tC(e,0,1e3)),calculate(e){let t=tC(e).match(iT);if(t){let e=iM(t[0]);if(e.width&&e.height)return iO(e);if(e.viewbox)return iU(e,e.viewbox)}throw TypeError("Invalid SVG")}},i$={validate:e=>0===tQ(e,0)&&0===tQ(e,4),calculate:e=>({height:tQ(e,14),width:tQ(e,12)})},ij=256,iH=257,iq=259,iz=3,iV=4,iG=16,iY=12,iW=20,iJ=2,iK=8;function iZ(e,{isBigEndian:t,isBigTiff:i}){let r=i?Number(tN(e,8,t)):t_(e,32,4,t),n=i?iK:iJ;return e.slice(r+n)}function iX(e,t,i,r){switch(t){case iz:return t_(e,16,i,r);case iV:return t_(e,32,i,r);case iG:{let t=Number(tN(e,i,r));if(t>Number.MAX_SAFE_INTEGER)throw TypeError("Value too large");return t}default:return 0}}function i0(e,t){let i=t?iW:iY;if(e.length>i)return e.slice(i)}function i1(e,{isBigEndian:t,isBigTiff:i}){let r={},n=e;for(;n?.length;){let e=t_(n,16,0,t),s=t_(n,16,2,t),a=i?Number(tN(n,4,t)):t_(n,32,4,t);if(0===e)break;if(1===a&&(s===iz||s===iV||i&&s===iG)){let a=i?12:8;r[e]=iX(n,s,a,t)}n=i0(n,i)}return r}function i2(e){let t=tC(e,0,2),i=t_(e,16,2,"MM"===t);return{isBigEndian:"MM"===t,isBigTiff:43===i}}function i4(e,t){let i=t_(e,16,4,t),r=t_(e,16,6,t);if(8!==i||0!==r)throw TypeError("Invalid BigTIFF header")}var i5=new Set(["49492a00","4d4d002a","49492b00","4d4d002b"]);function i3(e){return{height:1+tx(e,7),width:1+tx(e,4)}}function i8(e){return{height:1+((15&e[4])<<10|e[3]<<2|(192&e[2])>>6),width:1+((63&e[2])<<8|e[1])}}function i9(e){return{height:16383&tv(e,8),width:16383&tv(e,6)}}var i6=new Map([["bmp",tF],["cur",tq],["dds",tz],["gif",tG],["heif",tW],["icns",t2],["ico",tj],["j2c",t4],["jp2",t5],["jpg",ic],["jxl",iy],["jxl-stream",iA],["ktx",ib],["png",iI],["pnm",iQ],["psd",ix],["svg",iP],["tga",i$],["tiff",{validate:e=>{let t=tw(e,0,4);return i5.has(t)},calculate(e){let t=i2(e);t.isBigTiff&&i4(e,t.isBigEndian);let i=i1(iZ(e,t),t),r={height:i[iH],width:i[ij],type:t.isBigTiff?"bigtiff":"tiff"};if(i[iq]&&(r.compression=i[iq]),!r.width||!r.height)throw TypeError("Invalid Tiff. Missing tags");return r}}],["webp",{validate(e){let t="RIFF"===tC(e,0,4),i="WEBP"===tC(e,8,12),r="VP8"===tC(e,12,15);return t&&i&&r},calculate(e){let t=tC(e,12,16),i=e.slice(20,30);if("VP8X"===t){let e=i[0],t=(192&e)==0,r=(1&e)==0;if(t&&r)return i3(i);throw TypeError("Invalid WebP")}if("VP8 "===t&&47!==i[0])return i9(i);let r=tw(i,3,6);if("VP8L"===t&&"9d012a"!==r)return i8(i);throw TypeError("Invalid WebP")}}]]),i7=Array.from(i6.keys()),re=new Map([[0,"heif"],[56,"psd"],[66,"bmp"],[68,"dds"],[71,"gif"],[73,"tiff"],[77,"tiff"],[82,"webp"],[105,"icns"],[137,"png"],[255,"jpg"]]);function rt(e){let t=e[0],i=re.get(t);return i&&i6.get(i).validate(e)?i:i7.find(t=>i6.get(t).validate(e))}var ri=[];function rr(e){let t=rt(e);if(void 0!==t){if(ri.indexOf(t)>-1)throw TypeError(`disabled file type: ${t}`);let i=i6.get(t).calculate(e);if(void 0!==i){if(i.type=i.type??t,i.images&&i.images.length>1){let e=i.images.reduce((e,t)=>t.width*t.height>e.width*e.height?t:e,i.images[0]);i.width=e.width,i.height=e.height}return i}}throw TypeError(`unsupported file type: ${t}`)}var rn=524288,rs=[],ra=100,ro=async()=>{let e=rs.splice(0,ra).map(async({filePath:e,resolve:t,reject:i})=>{let r;try{r=await ty.promises.open(tb.resolve(e),"r")}catch(e){return i(e)}try{let{size:e}=await r.stat();if(e<=0)throw Error("Empty file");let i=Math.min(e,rn),n=new Uint8Array(i);await r.read(n,0,i,0),t(rr(n))}catch(e){i(e)}finally{await r.close()}});await Promise.allSettled(e),rs.length&&setTimeout(ro,100)},rl=async e=>new Promise((t,i)=>{rs.push({filePath:e,resolve:t,reject:i}),ro()}),rc=A,rd=e.i(660526),ru=tb,rh=e.i(256085);async function rA(e,t){try{return await t(e)}finally{await rc.default.rm(e,{force:!0,maxRetries:2,recursive:!0})}}let rp=async(e,t={})=>rA(await rf(t),e);async function rf(e){if(e.name){if(void 0!==e.extension&&null!==e.extension)throw Error("The `name` and `extension` options are mutually exclusive");return ru.default.join(await rg(),e.name)}return await rm()+(void 0===e.extension||null===e.extension?"":"."+e.extension.replace(/^\./,""))}async function rg({prefix:e=""}={}){let t=await rm(e);return await rc.default.mkdir(t),t}async function rm(e=""){let t=await rc.default.realpath(rd.default.tmpdir());return ru.default.join(t,e+(0,rh.v4)())}async function ry(e){return e?.tempFilePath?rl(e.tempFilePath):e?.mimetype==="image/tiff"?await rp(async t=>(await B.default.writeFile(t,e.data),rl(t)),{extension:"tiff"}):tm(e.data)}var rb=p;let rE=async({collectionSlug:e,filename:t,prefix:i,req:r})=>{let n={filename:{equals:t}};return i&&(n.prefix={equals:i}),!!await r.payload.db.findOne({collection:e,req:r,where:n})};var rC=A;let rw=async e=>{try{return await rC.default.stat(e),!0}catch(e){return!1}},rI=e=>{let t=e.split(".").pop(),i=(0,rb.default)(e.substring(0,e.lastIndexOf("."))||e),r=i,n=/(.*)-(\d+)$/,s=i.match(n);if(null===s)r+="-1";else{let e=s[1],t=Number(s[2])+1;r=`${e}-${t}`}return`${r}.${t}`};async function rv({collectionSlug:e,desiredFilename:t,prefix:i,req:r,staticPath:n}){let s=t;for(;await rE({collectionSlug:e,filename:s,path:n,prefix:i,req:r})||await rw(`${n}/${s}`);)s=rI(s);return s}var rB=h,rQ=A,rx=e.i(72073);let rS=({filename:e=null,filesize:t=null,height:i=null,mimeType:r=null,url:n=null,width:s=null})=>({filename:e,filesize:t,height:i,mimeType:r,url:n,width:s});function rk(e){return e?.pages?e.height/e.pages:e.height}let rT=({extension:e,height:t,outputImageName:i,width:r})=>`${i}-${r}x${t}.${e}`;var rN=b;let rD=({dimensions:e,hasFocalPoint:t,imageResizeConfig:i})=>{let{fit:r,withoutEnlargement:n,withoutReduction:s}=i,a=i.width,o=i.height;if(o&&a){let t=e.width<a&&e.height<o;if(void 0===n&&t)return"omit"}if(void 0===n&&(!a||!o)&&(a&&e.width<a||o&&e.height<o))return"omit";let l=e.width<a||e.height<o;if("contain"===r||"inside"===r||!(0,rN.isNumber)(o)&&!(0,rN.isNumber)(a))return"resize";let c=a/o;return e.width/e.height===c||n&&l||s&&!l?"resize":t?"resizeWithFocalPoint":"resize"};var r_=p;let rR=e=>{let t=e.split(".").pop();return{name:(0,r_.default)(e.substring(0,e.lastIndexOf("."))||e),ext:t}},rL=e=>e.withoutReduction?{...e,fit:e?.fit||"contain",position:e?.position||"left top"}:e;async function rF({config:e,dimensions:t,file:i,focalPoint:r,mimeType:n,req:s,savedFilename:a,sharp:o,staticPath:l,withMetadata:c}){let{imageSizes:d}=e.upload;if(!d||!o)return{sizeData:{},sizesToSave:[]};let u=["image/avif","image/gif","image/webp"].includes(i.mimetype),h={};u&&(h.animated=!0);let A=o(i.tempFilePath||i.data,h).rotate(),p=await A.metadata(),f={...t};[5,6,7,8].includes(p.orientation)&&(f={...t,height:t.width,width:t.height});let g={height:p.height,width:p.width},m={},y=[];return await Promise.all(d.map(async e=>{let i=rD({dimensions:t,hasFocalPoint:!!r,imageResizeConfig:e=rL(e)});if("omit"===i){m[e.name]=rS({});return}let o=A.clone(),d=o;if("resizeWithFocalPoint"===i){let{height:t,width:i}=e,n=f.width/f.height;t&&!i&&(i=Math.round(t*n)),i&&!t&&(t=Math.round(i/n)),t||(t=g.height),i||(i=g.width);let a=i/t<n;d=o.resize({fastShrinkOnLoad:!1,height:a?t:void 0,width:a?void 0:i});let l=await (0,rx.optionallyAppendMetadata)({req:s,sharpFile:d,withMetadata:c}),{info:u}=await l.toBuffer({resolveWithObject:!0});g.height=rk({...p,height:u.height}),g.width=u.width;let h=i/2,A=g.width*(r.x/100),m=A+h,y=A-h;m>g.width&&(y=g.width-i),y<0&&(y=0);let b=t/2,E=g.height*(r.y/100),C=E+b,w=E-b;C>g.height&&(w=g.height-t),w<0&&(w=0),d=d.extract({height:t,left:Math.floor(y),top:Math.floor(w),width:i})}else d=o.resize(e);e.formatOptions&&(d=d.toFormat(e.formatOptions.format,e.formatOptions.options)),e.trimOptions&&(d=d.trim(e.trimOptions));let h=await (0,rx.optionallyAppendMetadata)({req:s,sharpFile:d,withMetadata:c}),{data:b,info:E}=await h.toBuffer({resolveWithObject:!0}),{name:C,ext:w}=rR(a);s.payloadUploadSizes&&(s.payloadUploadSizes[e.name]=b);let I=await (0,rB.fileTypeFromBuffer)(b),v=e.generateImageName?e.generateImageName({extension:I?.ext||w,height:rk({...p,height:E.height}),originalName:C,sizeName:e.name,width:E.width}):rT({extension:I?.ext||w,height:rk({...p,height:E.height}),outputImageName:C,width:E.width}),B=`${l}/${v}`;if(await rw(B))try{await rQ.default.unlink(B)}catch{}let{height:Q,size:x,width:S}=E;m[e.name]=rS({filename:v,filesize:x,height:u&&p.pages?Q/p.pages:Q,mimeType:I?.mime||n,width:S}),y.push({buffer:b,path:B})})),{sizeData:m,sizesToSave:y}}function rM(e){return["image/jpeg","image/png","image/gif","image/svg+xml","image/webp","image/avif","image/jxl"].indexOf(e)>-1}var rO=rx;let rU=(e,t)=>{if(!t)return!1;if(e.crop||e.heightInPixels||e.widthInPixels)return!0;if(e.focalPoint){let i=e.focalPoint.x,r=e.focalPoint.y,n="focalX"in t&&t.focalX,s="focalY"in t&&t.focalY;return i!==n||r!==s}return!1},rP=async({collection:{config:e},data:t,isDuplicating:i,operation:r,originalDoc:n,overwriteExistingFiles:s,req:a,throwOnMissingFile:o})=>{if(!e.upload)return{data:t,files:[]};let{serverURL:l,sharp:c}=a.payload.config,d=i?void 0:a.file,u=r$({data:t,isDuplicating:i,operation:r,originalDoc:n,req:a}),{constructorOptions:B,disableLocalStorage:Q,focalPoint:x=!0,formatOptions:S,imageSizes:k,resizeOptions:T,staticDir:N,trimOptions:D,withMetadata:_}=e.upload,R=N,L=i?n:t,F=!1;if(!d&&(i||rU(u,L))){let{filename:t,url:i}=L;if(t&&(t.includes("../")||t.includes("..\\")))throw new m.Forbidden(a.t);(l&&i?.startsWith(l)||i?.startsWith("/"))&&(F=!0);try{if(!Q&&F){let e=`${R}/${t}`;d=await (0,v.getFileByPath)(e),s=!0}else t&&i&&(d=await (0,I.getExternalFile)({data:L,req:a,uploadConfig:e.upload}),s=!0)}catch(e){throw new f.FileRetrievalError(a.t,e instanceof Error?e.message:void 0)}}if(i&&(s=!1),!d){if(o)throw new y.MissingFile(a.t);return{data:L,files:[]}}await (0,C.checkFileRestrictions)({collection:e,file:d,req:a}),Q||await A.default.mkdir(R,{recursive:!0});let M=L,O=[],U={},P=["image/avif","image/gif","image/webp"].includes(d.mimetype),$="object"==typeof u&&"crop"in u?u.crop:void 0;try{let i,r,n,o,l,f,g=(0,E.canResizeImage)(d.mimetype),m=g&&!!(T||S||D||B||d.tempFilePath),y={...B};if(P&&(y.animated=!0),c&&(P||m)&&(r=d.tempFilePath?c(d.tempFilePath,y).rotate():c(d.data,y).rotate(),m&&(T&&(r=r.resize(T)),S&&(r=r.toFormat(S.format,S.options)),D&&(r=r.trim(D)))),(g||rM(d.mimetype))&&(U.width=(n=await ry(d)).width,U.height=n.height),r){let e=await r.metadata();r=await (0,rO.optionallyAppendMetadata)({req:a,sharpFile:r,withMetadata:_}),o=await r.toBuffer({resolveWithObject:!0}),({ext:l,mime:f}=await (0,h.fileTypeFromBuffer)(o.data)),U.width=o.info.width,U.height=o.info.height,U.filesize=o.info.size,e.pages&&(U.height=o.info.height/e.pages,U.filesize=o.data.length)}else f=d.mimetype,U.filesize=d.size,l=d.name.includes(".")?d.name.split(".").pop()?.split("?")[0]:"";"application/xml"===f&&"svg"===l&&(f="image/svg+xml"),U.mimeType=f;let C=(0,p.default)(d.name.substring(0,d.name.lastIndexOf("."))||d.name);if(i=`${C}${l?`.${l}`:""}`,!s){let r=t?.prefix;i=await rv({collectionSlug:e.slug,desiredFilename:i,prefix:r,req:a,staticPath:R})}U.filename=i;let I=d;if($&&c){let{data:e,info:t}=await (0,w.cropImage)({cropData:$,dimensions:n,file:d,heightInPixels:u.heightInPixels,req:a,sharp:c,widthInPixels:u.widthInPixels,withMetadata:_});if(T&&!T.withoutEnlargement){let t=await c(e).resize({fit:T?.fit||"cover",height:T?.height,position:T?.position||"center",width:T?.width}).toBuffer({resolveWithObject:!0});if(O.push({buffer:t.data,path:`${R}/${i}`}),I={...I,data:t.data,size:t.info.size},U.width=t.info.width,U.height=t.info.height,P){let e=await r.metadata();U.height=e.pages?t.info.height/e.pages:t.info.height}U.filesize=t.info.size}else{if(O.push({buffer:e,path:`${R}/${i}`}),I={...d,data:e,size:t.size},U.width=t.width,U.height=t.height,P){let e=await r.metadata();U.height=e.pages?t.height/e.pages:t.height}U.filesize=t.size}d.tempFilePath?await A.default.writeFile(d.tempFilePath,e):a.file=I}else{let e;e=o?.data?o.data:d.tempFilePath?await A.default.readFile(d.tempFilePath):d.data,O.push({buffer:e,path:`${R}/${i}`}),(o?.data||e.length>0)&&(d.tempFilePath?await A.default.writeFile(d.tempFilePath,o?.data||e):a.file={...d,data:o?.data||e,size:o?.info.size})}if(g&&(Array.isArray(k)||!1!==x)){a.payloadUploadSizes={};let t=x&&u?.focalPoint?{x:(0,b.isNumber)(u.focalPoint.x)?Math.round(u.focalPoint.x):50,y:(0,b.isNumber)(u.focalPoint.y)?Math.round(u.focalPoint.y):50}:void 0,{sizeData:r,sizesToSave:s}=await rF({config:e,dimensions:$?{...n,height:U.height,width:U.width}:n,file:I,focalPoint:t,mimeType:U.mimeType,req:a,savedFilename:i||d.name,sharp:c,staticPath:R,withMetadata:_});U.sizes=r,U.focalX=t?.x,U.focalY=t?.y,O.push(...s)}}catch(e){throw a.payload.logger.error(e),new g.FileUploadError(a.t)}return{data:M={...M,...U},files:O}};function r$(e){let{data:t,isDuplicating:i,operation:r,originalDoc:n,req:s}=e,a=s.query?.uploadEdits&&"object"==typeof s.query.uploadEdits?s.query.uploadEdits:{};if(a.focalPoint)return a;let o=t,l=n;if(l&&"focalX"in l&&"focalY"in l){if(o.focalX===l.focalX&&o.focalY===l.focalY)return;if(i)return a.focalPoint={x:o?.focalX||l.focalX,y:o?.focalY||l.focalY},a}return o?.focalX&&o?.focalY?a.focalPoint={x:o.focalX,y:o.focalY}:"create"===r&&(a.focalPoint={x:50,y:50}),a}e.s(["generateFileData",0,rP],563646);var rj=A;async function rH(e,t){return Promise.all(e.map(t))}let rq=async({collectionConfig:e,config:t,req:i})=>{if(t.upload?.useTempFiles&&e.upload){let{file:e}=i,t=[{file:e}];await rH(t,async({file:e})=>{e?.tempFilePath&&await rj.default.unlink(e.tempFilePath)})}};e.s(["unlinkTempFiles",0,rq],361492);var rz=g,rV=A,rG=e.i(688947);let rY=async(e,t)=>{let i=e,r=new rG.Readable;return r._read=()=>{r.push(i),i=null},await rV.default.writeFile(t,e)},rW=async(e,t,i)=>{try{await Promise.all(t.map(async({buffer:e,path:t})=>{await rY(e,t)}))}catch(t){throw e.logger.error(t),new rz.FileUploadError(i.t)}};e.s(["uploadFiles",0,rW],49703);var rJ=e.i(452968),rK=e.i(974605),rZ=e.i(311462),rX=e.i(893961),r0=e.i(9051),r1=e.i(542327),r2=e.i(553095);let r4=({fields:e,path:t,versions:i})=>{let r=[];if(i){r.push("version");let t=e.find(e=>"version"===e.name);t&&"group"===t.type&&(e=t.flattenedFields)}for(let i of t.split(".")){let t=e.find(e=>e.name===i);if(t&&(r.push(i),"relationship"===t.type||"upload"===t.type))break}return r.join(".")},r5=({fields:e})=>{let t=[];for(let i of e)if("virtual"in i&&"string"==typeof i.virtual)t.push(i.virtual);else if("group"===i.type||"tab"===i.type)for(let e of r5({fields:i.flattenedFields}))t.push(e);return t},r3=({fields:e,selectValue:t,topLevelFields:i,versions:r})=>{let n=[];if(!0===t)for(let t of r5({fields:e}))n.push(r4({fields:i,path:t,versions:r}));else for(let s in t){let a=e.find(e=>e.name===s);if(a){if("virtual"in a&&"string"==typeof a.virtual)n.push(r4({fields:i,path:a.virtual,versions:r}));else if("group"===a.type||"tab"===a.type)for(let e of r3({fields:a.flattenedFields,selectValue:t[s],topLevelFields:i,versions:r}))n.push(r4({fields:i,path:e,versions:r}))}}return n},r8=({fields:e,forceSelect:t,select:i,versions:r})=>{if(!i||"exclude"===(0,r2.getSelectMode)(i))return i;if(t&&(i=(0,r1.deepMergeSimple)(i,t)),i)for(let t of r3({fields:e,selectValue:i,topLevelFields:e,versions:r??!1})){let e=i,r=t.split(".");for(let t=0;t<r.length;t++){let i=r.length-1===t,n=r[t];i?e[n]=!0:n in e||(e[n]={},e=e[n])}}return i};e.s(["sanitizeSelect",0,r8],904937);var r9=e.i(252016),r6=e.i(668473);let r7=async e=>{let h=e;try{let e,A=!h.disableTransaction&&await (0,rZ.initTransaction)(h.req);(0,i.ensureUsernameOrEmail)({authOptions:h.collection.config.auth,collectionSlug:h.collection.config.slug,data:h.data,operation:"create",req:h.req}),(h=await (0,r6.buildBeforeOperation)({args:h,collection:h.collection.config,operation:"create",overrideAccess:h.overrideAccess})).publishSpecificLocale&&(h.req.locale=h.publishSpecificLocale);let{autosave:p=!1,collection:{config:f},collection:g,depth:m,disableVerificationEmail:y,draft:b=!1,duplicateFromID:E,overrideAccess:C,overwriteExistingFiles:w=!1,populate:I,publishAllLocales:v,publishSpecificLocale:B,req:{fallbackLocale:Q,locale:x,payload:S,payload:{config:k}},req:T,select:N,selectedLocales:D,showHiddenFields:_}=h,{data:R}=h,L=!b&&(v??!(0,rK.hasLocalizeStatusEnabled)(f)),F=!!(b&&(0,rK.hasDraftsEnabled)(f)&&!L);F&&(R._status="draft");let M={},O={};if(E){let e=await (0,a.getDuplicateDocumentData)({id:E,collectionConfig:f,draftArg:F,overrideAccess:C,req:T,selectedLocales:D});O=e.duplicatedFromDoc,M=e.duplicatedFromDocWithLocales}C||await (0,r.executeAccess)({data:R,req:T},f.access.create);let{data:U,files:P}=await rP({collection:g,config:k,data:R,isDuplicating:!!E,operation:"create",originalDoc:O,overwriteExistingFiles:w,req:T,throwOnMissingFile:!F&&!1!==g.config.upload.filesRequiredOnCreate});if(R=U,R=await (0,d.beforeValidate)({collection:f,context:T.context,data:R,doc:O,global:null,operation:"create",overrideAccess:C,req:T}),f.hooks.beforeValidate?.length)for(let e of f.hooks.beforeValidate)R=await e({collection:f,context:T.context,data:R,operation:"create",originalDoc:O,req:T})||R;if(f.hooks?.beforeChange?.length)for(let e of f.hooks.beforeChange)R=await e({collection:f,context:T.context,data:R,operation:"create",originalDoc:O,req:T})||R;let $=await (0,c.beforeChange)({collection:f,context:T.context,data:R,doc:O,docWithLocales:M,global:null,operation:"create",overrideAccess:C,req:T,skipValidation:F&&!(0,rK.hasDraftValidationEnabled)(f)});if(k.localization&&f.versions&&f.versions.drafts&&f.versions.drafts.localizeStatus&&L){let e=k.localization.localeCodes;for(let t of(k.localization.filterAvailableLocales&&(e=(await k.localization.filterAvailableLocales({locales:k.localization.locales,req:T})).map(e=>"string"==typeof e?e:e.code)),("object"!=typeof $._status||null===$._status)&&($._status={}),e))$._status[t]="published"}f.upload.disableLocalStorage||await rW(S,P,T);let j=r8({fields:f.flattenedFields,forceSelect:f.forceSelect,select:N});f.auth&&!f.auth.disableLocalStrategy?(f.auth.verify&&($._verified=!!$._verified,$._verificationToken=t.default.randomBytes(20).toString("hex")),e=await (0,s.registerLocalStrategy)({collection:f,doc:$,password:R.password,payload:T.payload,req:T})):e=await S.db.create({collection:f.slug,data:$,req:T});let H=e._verificationToken,q=(0,r0.sanitizeInternalFields)(e);if(f.auth&&(q={...q,collection:f.slug}),f.versions&&await (0,u.saveVersion)({id:q.id,autosave:p,collection:f,docWithLocales:q,operation:"create",payload:S,publishSpecificLocale:B,req:T,returning:!1}),f.auth&&f.auth.verify&&q.email&&await (0,n.sendVerificationEmail)({collection:{config:f},config:S.config,disableEmail:y,email:S.email,req:T,token:H,user:q}),q=await (0,l.afterRead)({collection:f,context:T.context,depth:m,doc:q,draft:b,fallbackLocale:Q,global:null,locale:x,overrideAccess:C,populate:I,req:T,select:j,showHiddenFields:_}),f.hooks?.afterRead?.length)for(let e of f.hooks.afterRead)q=await e({collection:f,context:T.context,doc:q,overrideAccess:C,req:T})||q;if(q=await (0,o.afterChange)({collection:f,context:T.context,data:R,doc:q,global:null,operation:"create",previousDoc:{},req:T}),f.hooks?.afterChange?.length)for(let e of f.hooks.afterChange)q=await e({collection:f,context:T.context,data:R,doc:q,operation:"create",overrideAccess:C,previousDoc:{},req:h.req})||q;return q=await (0,r9.buildAfterOperation)({args:h,collection:f,operation:"create",overrideAccess:h.overrideAccess,result:q}),await rq({collectionConfig:f,config:k,req:T}),A&&await (0,rJ.commitTransaction)(T),q}catch(e){throw await (0,rX.killTransaction)(h.req),e}};e.s(["createOperation",0,r7],15487),e.s(["getPreferencesCollection",()=>ng,"preferencesCollectionSlug",()=>nf],725740),e.i(10188);var ne=e.i(785867),nt=e.i(743699),ni=e.i(195884),nr=ne,nn=e.i(700859);class ns extends nn.APIError{constructor(e){super(e?e("error:unauthorized"):ni.en.translations.error.unauthorized,nr.status.UNAUTHORIZED)}}async function na(e){let{key:t,req:{payload:i},req:r,user:n}=e;if(!n)throw new ns(r.t);let s={and:[{key:{equals:t}},{"user.value":{equals:n.id}},{"user.relationTo":{equals:n.collection}}]},a=await i.db.deleteOne({collection:nf,req:r,where:s});if(a)return a;throw new nt.NotFound(r.t)}let no=async e=>{let t;try{t=await e.json?.()}catch(e){t={}}let i=e;t&&(i.data=t,i.json=()=>Promise.resolve(t));let r=await na({key:i.routeParams?.key,req:i,user:i.user});return Response.json({...r,message:i.t("general:deletedSuccessfully")},{status:ne.status.OK})};var nl=ne;async function nc(e){let{key:t,req:{payload:i},req:r,user:n}=e;if(!n)return null;let s={and:[{key:{equals:t}},{"user.value":{equals:n.id}},{"user.relationTo":{equals:n.collection}}]},{docs:a}=await i.db.find({collection:nf,limit:1,pagination:!1,req:r,sort:"-updatedAt",where:s});return a?.[0]||null}let nd=async e=>{let t;try{t=await e.json?.()}catch(e){t={}}let i=e;t&&(i.data=t,i.json=()=>Promise.resolve(t));let r=await nc({key:i.routeParams?.key,req:i,user:i.user});return Response.json({...r||{message:i.t("general:notFound"),value:null}},{status:nl.status.OK})};var nu=ne;async function nh(e){let{key:t,req:{payload:i},req:r,user:n,value:s}=e;if(!n)throw new ns(r.t);let a={and:[{key:{equals:t}},{"user.value":{equals:n.id}},{"user.relationTo":{equals:n.collection}}]},o={key:t,user:{relationTo:n.collection,value:n.id},value:s};return await i.db.upsert({collection:nf,data:o,req:r,where:a})}let nA=async e=>{let t;try{t=await e.json?.()}catch(e){t={}}let i=e;t&&(i.data=t,i.json=()=>Promise.resolve(t));let r=await nh({key:i.routeParams?.key,req:i,user:i?.user,value:i.data?.value||i.data});return Response.json({doc:r,message:i.t("general:updatedSuccessfully")},{status:nu.status.OK})},np=({req:e})=>!!e.user&&{and:[{"user.value":{equals:e.user.id}},{"user.relationTo":{equals:e.user.collection}}]},nf="payload-preferences",ng=e=>({slug:nf,access:{delete:np,read:np},admin:{hidden:!0},endpoints:[{handler:nd,method:"get",path:"/:key"},{handler:no,method:"delete",path:"/:key"},{handler:nA,method:"post",path:"/:key"}],fields:[{name:"user",type:"relationship",hooks:{beforeValidate:[({req:e})=>e?.user?{relationTo:e?.user.collection,value:e?.user.id}:null]},index:!0,relationTo:e.collections.filter(e=>e.auth).map(e=>e.slug),required:!0},{name:"key",type:"text",index:!0},{name:"value",type:"json",validate:e=>{if(e)try{JSON.parse(JSON.stringify(e))}catch{return"Invalid JSON"}return!0}}],lockDocuments:!1}),nm=async({collectionConfig:e,ids:t,payload:i,req:r})=>{e.auth?await i.db.deleteMany({collection:nf,req:r,where:{or:[{and:[{"user.value":{in:t}},{"user.relationTo":{equals:e.slug}}]},{key:{in:t.map(t=>`collection-${e.slug}-${t}`)}}]}}):await i.db.deleteMany({collection:nf,req:r,where:{key:{in:t.map(t=>`collection-${e.slug}-${t}`)}}})};e.s(["deleteUserPreferences",0,nm],62696);var ny=A,nb=ni,nE=ne,nC=nn;class nw extends nC.APIError{constructor(e){super(e?e("error:deletingFile"):nb.en.translations.error.deletingFile,nE.status.INTERNAL_SERVER_ERROR)}}let nI=async({collectionConfig:e,doc:t,files:i=[],overrideDelete:r,req:n})=>{if(e.upload&&(r||i.length>0)){let{staticDir:i}=e.upload,r=`${i}/${t.filename}`;try{await rw(r)&&await ny.default.unlink(r)}catch(e){throw new nw(n.t)}if(t.sizes)for(let e of Object.values(t.sizes)){let t=`${i}/${e.filename}`;try{await rw(t)&&await ny.default.unlink(t)}catch(e){throw new nw(n.t)}}}};e.s(["deleteAssociatedFiles",0,nI],542299);var nv=ne,nB=nn;class nQ extends nB.APIError{constructor(e){super(e,nv.status.LOCKED)}}e.s(["Locked",()=>nQ],585993)},248615,__turbopack_context__=>{"use strict";var __TURBOPACK__imported__module__814747__=__turbopack_context__.i(814747),__TURBOPACK__imported__module__792509__=__turbopack_context__.i(792509);async function dynamicImport(modulePathOrSpecifier){let importPath=__TURBOPACK__imported__module__814747__.default.isAbsolute(modulePathOrSpecifier)?(0,__TURBOPACK__imported__module__792509__.pathToFileURL)(modulePathOrSpecifier).href:modulePathOrSpecifier;return process.env.VITEST?await import(importPath):await eval(`import('${importPath}')`)}__turbopack_context__.s(["dynamicImport",()=>dynamicImport])},295694,393203,479573,899777,416995,172527,279339,523174,381692,e=>{"use strict";var t=e.i(195884);e.i(10188);var i=e.i(785867),r=e.i(700859);class n extends r.APIError{constructor(e){super(e?e("error:notAllowedToPerformAction"):t.en.translations.error.notAllowedToPerformAction,i.status.FORBIDDEN)}}function s(e,t){let i=Array.isArray(t)?t:[t],r={};for(let t of i)t in e&&(r[t]=e[t]);return new Proxy(e,{deleteProperty:(e,t)=>Reflect.deleteProperty(i.includes(t)?r:e,t),get:(e,t,n)=>i.includes(t)?Reflect.get(r,t,n):Reflect.get(e,t,e),has:(e,t)=>Reflect.has(i.includes(t)?r:e,t),set:(e,t,n,s)=>i.includes(t)?Reflect.set(r,t,n):Reflect.set(e,t,n,e)})}function a(e,t,i,r,n,s,o,l){return a.fromTZ(a.tp(e,t,i,r,n,s,o),l)}function o(e,t=new Date){let i=t.toLocaleString("en-US",{timeZone:e,timeZoneName:"shortOffset"}).split(" ").slice(-1)[0],r=t.toLocaleString("en-US").replace(/[\u202f]/," ");return Date.parse(`${r} GMT`)-Date.parse(`${r} ${i}`)}function l(e,t){let i=new Date(Date.parse(e));if(isNaN(i))throw Error("minitz: Invalid ISO8601 passed to parser.");let r=e.substring(9);return e.includes("Z")||r.includes("-")||r.includes("+")?a.tp(i.getUTCFullYear(),i.getUTCMonth()+1,i.getUTCDate(),i.getUTCHours(),i.getUTCMinutes(),i.getUTCSeconds(),"Etc/UTC"):a.tp(i.getFullYear(),i.getMonth()+1,i.getDate(),i.getHours(),i.getMinutes(),i.getSeconds(),t)}e.s(["Forbidden",()=>n],295694),e.s(["isolateObjectProperty",()=>s],393203),e.s(["getDefaultJobsCollection",()=>ea,"jobAfterRead",()=>eo,"jobsCollectionSlug",()=>es],381692),a.fromTZISO=(e,t,i)=>a.fromTZ(l(e,t),i),a.fromTZ=function(e,t){let i=new Date(Date.UTC(e.y,e.m-1,e.d,e.h,e.i,e.s)),r=o(e.tz,i),n=new Date(i.getTime()-r),s=o(e.tz,n);if(s-r==0)return n;{let r=new Date(i.getTime()-s),a=o(e.tz,r);if(a-s==0||!t&&a-s>0)return r;if(t)throw Error("Invalid date passed to fromTZ()");return n}},a.toTZ=function(e,t){let i=new Date(e.toLocaleString("en-US",{timeZone:t}).replace(/[\u202f]/," "));return{y:i.getFullYear(),m:i.getMonth()+1,d:i.getDate(),h:i.getHours(),i:i.getMinutes(),s:i.getSeconds(),tz:t}},a.tp=(e,t,i,r,n,s,a)=>({y:e,m:t,d:i,h:r,i:n,s:s,tz:a}),a.minitz=a;var c=32,d=63,u=[1,2,4,8,16],h=class{pattern;timezone;second;minute;hour;day;month;dayOfWeek;lastDayOfMonth;starDOM;starDOW;constructor(e,t){this.pattern=e,this.timezone=t,this.second=Array(60).fill(0),this.minute=Array(60).fill(0),this.hour=Array(24).fill(0),this.day=Array(31).fill(0),this.month=Array(12).fill(0),this.dayOfWeek=Array(7).fill(0),this.lastDayOfMonth=!1,this.starDOM=!1,this.starDOW=!1,this.parse()}parse(){if(!("string"==typeof this.pattern||this.pattern instanceof String))throw TypeError("CronPattern: Pattern has to be of type string.");this.pattern.indexOf("@")>=0&&(this.pattern=this.handleNicknames(this.pattern).trim());let e=this.pattern.replace(/\s+/g," ").split(" ");if(e.length<5||e.length>6)throw TypeError("CronPattern: invalid configuration format ('"+this.pattern+"'), exactly five or six space separated parts are required.");if(5===e.length&&e.unshift("0"),e[3].indexOf("L")>=0&&(e[3]=e[3].replace("L",""),this.lastDayOfMonth=!0),"*"==e[3]&&(this.starDOM=!0),e[4].length>=3&&(e[4]=this.replaceAlphaMonths(e[4])),e[5].length>=3&&(e[5]=this.replaceAlphaDays(e[5])),"*"==e[5]&&(this.starDOW=!0),this.pattern.indexOf("?")>=0){let t=new f(new Date,this.timezone).getDate(!0);e[0]=e[0].replace("?",t.getSeconds().toString()),e[1]=e[1].replace("?",t.getMinutes().toString()),e[2]=e[2].replace("?",t.getHours().toString()),this.starDOM||(e[3]=e[3].replace("?",t.getDate().toString())),e[4]=e[4].replace("?",(t.getMonth()+1).toString()),this.starDOW||(e[5]=e[5].replace("?",t.getDay().toString()))}this.throwAtIllegalCharacters(e),this.partToArray("second",e[0],0,1),this.partToArray("minute",e[1],0,1),this.partToArray("hour",e[2],0,1),this.partToArray("day",e[3],-1,1),this.partToArray("month",e[4],-1,1),this.partToArray("dayOfWeek",e[5],0,d),this.dayOfWeek[7]&&(this.dayOfWeek[0]=this.dayOfWeek[7])}partToArray(e,t,i,r){let n=this[e],s="day"===e&&this.lastDayOfMonth;if(""===t&&!s)throw TypeError("CronPattern: configuration entry "+e+" ("+t+") is empty, check for trailing spaces.");if("*"===t)return n.fill(r);let a=t.split(",");if(a.length>1)for(let t=0;t<a.length;t++)this.partToArray(e,a[t],i,r);else -1!==t.indexOf("-")&&-1!==t.indexOf("/")?this.handleRangeWithStepping(t,e,i,r):-1!==t.indexOf("-")?this.handleRange(t,e,i,r):-1!==t.indexOf("/")?this.handleStepping(t,e,i,r):""!==t&&this.handleNumber(t,e,i,r)}throwAtIllegalCharacters(e){for(let t=0;t<e.length;t++)if((5===t?/[^/*0-9,\-#L]+/:/[^/*0-9,-]+/).test(e[t]))throw TypeError("CronPattern: configuration entry "+t+" ("+e[t]+") contains illegal characters.")}handleNumber(e,t,i,r){let n=this.extractNth(e,t),s=parseInt(n[0],10)+i;if(isNaN(s))throw TypeError("CronPattern: "+t+" is not a number: '"+e+"'");this.setPart(t,s,n[1]||r)}setPart(e,t,i){if(!Object.prototype.hasOwnProperty.call(this,e))throw TypeError("CronPattern: Invalid part specified: "+e);if("dayOfWeek"===e){if(7===t&&(t=0),t<0||t>6)throw RangeError("CronPattern: Invalid value for dayOfWeek: "+t);this.setNthWeekdayOfMonth(t,i);return}if("second"===e||"minute"===e){if(t<0||t>=60)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("hour"===e){if(t<0||t>=24)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("day"===e){if(t<0||t>=31)throw RangeError("CronPattern: Invalid value for "+e+": "+t)}else if("month"===e&&(t<0||t>=12))throw RangeError("CronPattern: Invalid value for "+e+": "+t);this[e][t]=i}handleRangeWithStepping(e,t,i,r){let n=this.extractNth(e,t),s=n[0].match(/^(\d+)-(\d+)\/(\d+)$/);if(null===s)throw TypeError("CronPattern: Syntax error, illegal range with stepping: '"+e+"'");let[,a,o,l]=s,c=parseInt(a,10)+i,d=parseInt(o,10)+i,u=parseInt(l,10);if(isNaN(c))throw TypeError("CronPattern: Syntax error, illegal lower range (NaN)");if(isNaN(d))throw TypeError("CronPattern: Syntax error, illegal upper range (NaN)");if(isNaN(u))throw TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");if(0===u)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(u>this[t].length)throw TypeError("CronPattern: Syntax error, steps cannot be greater than maximum value of part ("+this[t].length+")");if(c>d)throw TypeError("CronPattern: From value is larger than to value: '"+e+"'");for(let e=c;e<=d;e+=u)this.setPart(t,e,n[1]||r)}extractNth(e,t){let i=e,r;if(i.includes("#")){if("dayOfWeek"!==t)throw Error("CronPattern: nth (#) only allowed in day-of-week field");r=i.split("#")[1],i=i.split("#")[0]}return[i,r]}handleRange(e,t,i,r){let n=this.extractNth(e,t),s=n[0].split("-");if(2!==s.length)throw TypeError("CronPattern: Syntax error, illegal range: '"+e+"'");let a=parseInt(s[0],10)+i,o=parseInt(s[1],10)+i;if(isNaN(a))throw TypeError("CronPattern: Syntax error, illegal lower range (NaN)");if(isNaN(o))throw TypeError("CronPattern: Syntax error, illegal upper range (NaN)");if(a>o)throw TypeError("CronPattern: From value is larger than to value: '"+e+"'");for(let e=a;e<=o;e++)this.setPart(t,e,n[1]||r)}handleStepping(e,t,i,r){let n=this.extractNth(e,t),s=n[0].split("/");if(2!==s.length)throw TypeError("CronPattern: Syntax error, illegal stepping: '"+e+"'");""===s[0]&&(s[0]="*");let a=0;"*"!==s[0]&&(a=parseInt(s[0],10)+i);let o=parseInt(s[1],10);if(isNaN(o))throw TypeError("CronPattern: Syntax error, illegal stepping: (NaN)");if(0===o)throw TypeError("CronPattern: Syntax error, illegal stepping: 0");if(o>this[t].length)throw TypeError("CronPattern: Syntax error, max steps for part is ("+this[t].length+")");for(let e=a;e<this[t].length;e+=o)this.setPart(t,e,n[1]||r)}replaceAlphaDays(e){return e.replace(/-sun/gi,"-7").replace(/sun/gi,"0").replace(/mon/gi,"1").replace(/tue/gi,"2").replace(/wed/gi,"3").replace(/thu/gi,"4").replace(/fri/gi,"5").replace(/sat/gi,"6")}replaceAlphaMonths(e){return e.replace(/jan/gi,"1").replace(/feb/gi,"2").replace(/mar/gi,"3").replace(/apr/gi,"4").replace(/may/gi,"5").replace(/jun/gi,"6").replace(/jul/gi,"7").replace(/aug/gi,"8").replace(/sep/gi,"9").replace(/oct/gi,"10").replace(/nov/gi,"11").replace(/dec/gi,"12")}handleNicknames(e){let t=e.trim().toLowerCase();return"@yearly"===t||"@annually"===t?"0 0 1 1 *":"@monthly"===t?"0 0 1 * *":"@weekly"===t?"0 0 * * 0":"@daily"===t?"0 0 * * *":"@hourly"===t?"0 * * * *":e}setNthWeekdayOfMonth(e,t){if("number"!=typeof t&&"L"===t)this.dayOfWeek[e]=this.dayOfWeek[e]|c;else if(t===d)this.dayOfWeek[e]=d;else if(t<6&&t>0)this.dayOfWeek[e]=this.dayOfWeek[e]|u[t-1];else throw TypeError(`CronPattern: nth weekday out of range, should be 1-5 or L. Value: ${t}, Type: ${typeof t}`)}},A=[31,28,31,30,31,30,31,31,30,31,30,31],p=[["month","year",0],["day","month",-1],["hour","day",0],["minute","hour",0],["second","minute",0]],f=class e{tz;ms;second;minute;hour;day;month;year;constructor(t,i){if(this.tz=i,t&&t instanceof Date)if(isNaN(t))throw TypeError("CronDate: Invalid date passed to CronDate constructor");else this.fromDate(t);else if(void 0===t)this.fromDate(new Date);else if(t&&"string"==typeof t)this.fromString(t);else if(t instanceof e)this.fromCronDate(t);else throw TypeError("CronDate: Invalid type ("+typeof t+") passed to CronDate constructor")}isNthWeekdayOfMonth(e,t,i,r){let n=new Date(Date.UTC(e,t,i)).getUTCDay(),s=0;for(let r=1;r<=i;r++)new Date(Date.UTC(e,t,r)).getUTCDay()===n&&s++;if(r&d&&u[s-1]&r)return!0;if(r&c){let r=new Date(Date.UTC(e,t+1,0)).getUTCDate();for(let s=i+1;s<=r;s++)if(new Date(Date.UTC(e,t,s)).getUTCDay()===n)return!1;return!0}return!1}fromDate(e){if(void 0!==this.tz)if("number"==typeof this.tz)this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes()+this.tz,this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),this.apply();else{let t=a.toTZ(e,this.tz);this.ms=e.getMilliseconds(),this.second=t.s,this.minute=t.i,this.hour=t.h,this.day=t.d,this.month=t.m-1,this.year=t.y}else this.ms=e.getMilliseconds(),this.second=e.getSeconds(),this.minute=e.getMinutes(),this.hour=e.getHours(),this.day=e.getDate(),this.month=e.getMonth(),this.year=e.getFullYear()}fromCronDate(e){this.tz=e.tz,this.year=e.year,this.month=e.month,this.day=e.day,this.hour=e.hour,this.minute=e.minute,this.second=e.second,this.ms=e.ms}apply(){if(!(this.month>11)&&!(this.day>A[this.month])&&!(this.hour>59)&&!(this.minute>59)&&!(this.second>59)&&!(this.hour<0)&&!(this.minute<0)&&!(this.second<0))return!1;{let e=new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms));return this.ms=e.getUTCMilliseconds(),this.second=e.getUTCSeconds(),this.minute=e.getUTCMinutes(),this.hour=e.getUTCHours(),this.day=e.getUTCDate(),this.month=e.getUTCMonth(),this.year=e.getUTCFullYear(),!0}}fromString(e){if("number"!=typeof this.tz)return this.fromDate(a.fromTZISO(e,this.tz));{let t=a.fromTZISO(e);this.ms=t.getUTCMilliseconds(),this.second=t.getUTCSeconds(),this.minute=t.getUTCMinutes(),this.hour=t.getUTCHours(),this.day=t.getUTCDate(),this.month=t.getUTCMonth(),this.year=t.getUTCFullYear(),this.apply()}}findNext(e,t,i,r){let n=this[t],s;i.lastDayOfMonth&&(s=1!==this.month?A[this.month]:new Date(Date.UTC(this.year,this.month+1,0,0,0,0,0)).getUTCDate());let a=i.starDOW||"day"!=t?void 0:new Date(Date.UTC(this.year,this.month,1,0,0,0,0)).getUTCDay();for(let o=this[t]+r;o<i[t].length;o++){let l=i[t][o];if("day"===t&&i.lastDayOfMonth&&o-r==s&&(l=1),"day"===t&&!i.starDOW){let t=i.dayOfWeek[(a+(o-r-1))%7];if(t&&t&d)t=+!!this.isNthWeekdayOfMonth(this.year,this.month,o-r,t);else if(t)throw Error(`CronDate: Invalid value for dayOfWeek encountered. ${t}`);l=e.legacyMode&&!i.starDOM?l||t:l&&t}if(l)return this[t]=o-r,n!==this[t]?2:1}return 3}recurse(e,t,i){let r=this.findNext(t,p[i][0],e,p[i][2]);if(r>1){let n=i+1;for(;n<p.length;)this[p[n][0]]=-p[n][2],n++;if(3===r)return this[p[i][1]]++,this[p[i][0]]=-p[i][2],this.apply(),this.recurse(e,t,0);if(this.apply())return this.recurse(e,t,i-1)}return(i+=1)>=p.length?this:this.year>=3e3?null:this.recurse(e,t,i)}increment(e,t,i){return this.second+=void 0!==t.interval&&t.interval>1&&i?t.interval:1,this.ms=0,this.apply(),this.recurse(e,t,0)}getDate(e){return e||void 0===this.tz?new Date(this.year,this.month,this.day,this.hour,this.minute,this.second,this.ms):"number"==typeof this.tz?new Date(Date.UTC(this.year,this.month,this.day,this.hour,this.minute-this.tz,this.second,this.ms)):a.fromTZ(a.tp(this.year,this.month+1,this.day,this.hour,this.minute,this.second,this.tz),!1)}getTime(){return this.getDate(!1).getTime()}};function g(e){if(void 0===e&&(e={}),delete e.name,e.legacyMode=void 0===e.legacyMode||e.legacyMode,e.paused=void 0!==e.paused&&e.paused,e.maxRuns=void 0===e.maxRuns?1/0:e.maxRuns,e.catch=void 0!==e.catch&&e.catch,e.interval=void 0===e.interval?0:parseInt(e.interval.toString(),10),e.utcOffset=void 0===e.utcOffset?void 0:parseInt(e.utcOffset.toString(),10),e.unref=void 0!==e.unref&&e.unref,e.startAt&&(e.startAt=new f(e.startAt,e.timezone)),e.stopAt&&(e.stopAt=new f(e.stopAt,e.timezone)),null!==e.interval){if(isNaN(e.interval))throw Error("CronOptions: Supplied value for interval is not a number");if(e.interval<0)throw Error("CronOptions: Supplied value for interval can not be negative")}if(void 0!==e.utcOffset){if(isNaN(e.utcOffset))throw Error("CronOptions: Invalid value passed for utcOffset, should be number representing minutes offset from UTC.");if(e.utcOffset<-870||e.utcOffset>870)throw Error("CronOptions: utcOffset out of bounds.");if(void 0!==e.utcOffset&&e.timezone)throw Error("CronOptions: Combining 'utcOffset' with 'timezone' is not allowed.")}if(!0!==e.unref&&!1!==e.unref)throw Error("CronOptions: Unref should be either true, false or undefined(false).");return e}function m(e){return"[object Function]"===Object.prototype.toString.call(e)||"function"==typeof e||e instanceof Function}function y(e){return m(e)}function b(e){"u">typeof Deno&&"u">typeof Deno.unrefTimer?Deno.unrefTimer(e):e&&"u">typeof e.unref&&e.unref()}var E=3e4,C=[],w=class{name;options;_states;fn;constructor(e,t,i){let r,n;if(m(t))n=t;else if("object"==typeof t)r=t;else if(void 0!==t)throw Error("Cron: Invalid argument passed for optionsIn. Should be one of function, or object (options).");if(m(i))n=i;else if("object"==typeof i)r=i;else if(void 0!==i)throw Error("Cron: Invalid argument passed for funcIn. Should be one of function, or object (options).");if(this.name=r?.name,this.options=g(r),this._states={kill:!1,blocking:!1,previousRun:void 0,currentRun:void 0,once:void 0,currentTimeout:void 0,maxRuns:r?r.maxRuns:void 0,paused:!!r&&r.paused,pattern:new h("* * * * *")},e&&(e instanceof Date||"string"==typeof e&&e.indexOf(":")>0)?this._states.once=new f(e,this.options.timezone||this.options.utcOffset):this._states.pattern=new h(e,this.options.timezone),this.name){if(C.find(e=>e.name===this.name))throw Error("Cron: Tried to initialize new named job '"+this.name+"', but name already taken.");C.push(this)}return void 0!==n&&y(n)&&(this.fn=n,this.schedule()),this}nextRun(e){let t=this._next(e);return t?t.getDate(!1):null}nextRuns(e,t){void 0!==this._states.maxRuns&&e>this._states.maxRuns&&(e=this._states.maxRuns);let i=[],r=t||this._states.currentRun||void 0;for(;e--&&(r=this.nextRun(r));)i.push(r);return i}getPattern(){return this._states.pattern?this._states.pattern.pattern:void 0}isRunning(){let e=this.nextRun(this._states.currentRun),t=!this._states.paused,i=void 0!==this.fn,r=!this._states.kill;return t&&i&&r&&null!==e}isStopped(){return this._states.kill}isBusy(){return this._states.blocking}currentRun(){return this._states.currentRun?this._states.currentRun.getDate():null}previousRun(){return this._states.previousRun?this._states.previousRun.getDate():null}msToNext(e){let t=this._next(e);return t?e instanceof f||e instanceof Date?t.getTime()-e.getTime():t.getTime()-new f(e).getTime():null}stop(){this._states.kill=!0,this._states.currentTimeout&&clearTimeout(this._states.currentTimeout);let e=C.indexOf(this);e>=0&&C.splice(e,1)}pause(){return this._states.paused=!0,!this._states.kill}resume(){return this._states.paused=!1,!this._states.kill}schedule(e){if(e&&this.fn)throw Error("Cron: It is not allowed to schedule two functions using the same Croner instance.");e&&(this.fn=e);let t=this.msToNext(),i=this.nextRun(this._states.currentRun);return null==t||isNaN(t)||null===i||(t>E&&(t=E),this._states.currentTimeout=setTimeout(()=>this._checkTrigger(i),t),this._states.currentTimeout&&this.options.unref&&b(this._states.currentTimeout)),this}async _trigger(e){if(this._states.blocking=!0,this._states.currentRun=new f(void 0,this.options.timezone||this.options.utcOffset),this.options.catch)try{void 0!==this.fn&&await this.fn(this,this.options.context)}catch(e){m(this.options.catch)&&this.options.catch(e,this)}else void 0!==this.fn&&await this.fn(this,this.options.context);this._states.previousRun=new f(e,this.options.timezone||this.options.utcOffset),this._states.blocking=!1}async trigger(){await this._trigger()}runsLeft(){return this._states.maxRuns}_checkTrigger(e){let t=new Date,i=!this._states.paused&&t.getTime()>=e.getTime(),r=this._states.blocking&&this.options.protect;i&&!r?(void 0!==this._states.maxRuns&&this._states.maxRuns--,this._trigger()):i&&r&&m(this.options.protect)&&setTimeout(()=>this.options.protect(this),0),this.schedule()}_next(e){let t=!!(e||this._states.currentRun),i=!1;!e&&this.options.startAt&&this.options.interval&&([e,t]=this._calculatePreviousRun(e,t),i=!e),e=new f(e,this.options.timezone||this.options.utcOffset),this.options.startAt&&e&&e.getTime()<this.options.startAt.getTime()&&(e=this.options.startAt);let r=this._states.once||new f(e,this.options.timezone||this.options.utcOffset);return i||r===this._states.once||(r=r.increment(this._states.pattern,this.options,t)),this._states.once&&this._states.once.getTime()<=e.getTime()||null===r||void 0!==this._states.maxRuns&&this._states.maxRuns<=0||this._states.kill||this.options.stopAt&&r.getTime()>=this.options.stopAt.getTime()?null:r}_calculatePreviousRun(e,t){let i=new f(void 0,this.options.timezone||this.options.utcOffset),r=e;if(this.options.startAt.getTime()<=i.getTime()){let e=(r=this.options.startAt).getTime()+1e3*this.options.interval;for(;e<=i.getTime();)e=(r=new f(r,this.options.timezone||this.options.utcOffset).increment(this._states.pattern,this.options,!0)).getTime()+1e3*this.options.interval;t=!0}return null===r&&(r=void 0),[r,t]}};e.s(["Cron",()=>w],479573);let I="payload-jobs-stats",v=e=>({slug:I,admin:{group:"System",hidden:!0},fields:[{name:"stats",type:"json"}]});e.s(["getJobStatsGlobal",0,v,"jobStatsGlobalSlug",0,I],899777);let B={getCurrentDate:()=>new Date,shouldAutoRun:!0,shouldAutoSchedule:!0},Q=()=>B.getCurrentDate();e.s(["_internal_jobSystemGlobals",0,B,"getCurrentDate",0,Q],416995);let x=async({jobStats:e,queueable:t,req:i})=>{let r={...e?.stats?.scheduledRuns?.queues?.[t.scheduleConfig.queue]||{}};t.taskConfig?(r.tasks??={})[t.taskConfig.slug]={lastScheduledRun:Q().toISOString()}:t.workflowConfig&&((r.workflows??={})[t.workflowConfig.slug]={lastScheduledRun:Q().toISOString()}),e?await i.payload.db.updateGlobal({slug:I,data:{...e||{},stats:{...e?.stats||{},scheduledRuns:{...e?.stats?.scheduledRuns||{},queues:{...e?.stats?.scheduledRuns?.queues||{},[t.scheduleConfig.queue]:r}}},updatedAt:new Date().toISOString()},req:i,returning:!1}):await i.payload.db.createGlobal({slug:I,data:{createdAt:Q().toISOString(),stats:{scheduledRuns:{queues:{[t.scheduleConfig.queue]:r}}}},req:i,returning:!1})};async function S({onlyScheduled:e=!1,queue:t,req:i,taskSlug:r,workflowSlug:n}){let s=[{queue:{equals:t}},{completedAt:{exists:!1}},{error:{exists:!1}}];return r?s.push({taskSlug:{equals:r}}):n&&s.push({workflowSlug:{equals:n}}),e&&s.push({"meta.scheduled":{equals:!0}}),(await i.payload.db.count({collection:"payload-jobs",req:i,where:{and:s}})).totalDocs}let k=async({queueable:e,req:t})=>({input:{},shouldSchedule:0===await S({onlyScheduled:!0,queue:e.scheduleConfig.queue,req:t,taskSlug:e.taskConfig?.slug,workflowSlug:e.workflowConfig?.slug}),waitUntil:e.waitUntil}),T=({jobsConfig:e})=>{let t=e.tasks?.filter(e=>e.schedule?.length)??[],i=e.workflows?.filter(e=>e.schedule?.length)??[],r={};for(let e of t)for(let t of e.schedule??[])(r[t.queue]??={schedules:[]}).schedules.push({scheduleConfig:t,taskConfig:e});for(let e of i)for(let t of e.schedule??[])(r[t.queue]??={schedules:[]}).schedules.push({scheduleConfig:t,workflowConfig:e});return r};async function N({allQueues:e=!1,queue:t,req:i}){let r=t??"default",n=T({jobsConfig:i.payload.config.jobs});if(0===Object.keys(n).length)return{errored:[],queued:[],skipped:[]};let s=await i.payload.db.findGlobal({slug:I,req:i}),a=[];for(let[t,{schedules:i}]of Object.entries(n))if(e||t===r)for(let e of i){let i=D({queue:t,scheduleConfig:e.scheduleConfig,stats:s,taskConfig:e.taskConfig,workflowConfig:e.workflowConfig});i&&a.push(i)}let o=[],l=[],c=[];for(let e of a){let{status:t}=await _({queueable:e,req:i,stats:s});switch(t){case"error":c.push(e);break;case"skipped":l.push(e);break;case"success":o.push(e)}}return{errored:c,queued:o,skipped:l}}function D({queue:e,scheduleConfig:t,stats:i,taskConfig:r,workflowConfig:n}){let s=i?.stats?.scheduledRuns?.queues?.[e],a=r?s?.tasks?.[r.slug]?.lastScheduledRun:s?.workflows?.[n?.slug??""]?.lastScheduledRun,o=new w(t.cron).nextRun(a??void 0);return!!o&&{scheduleConfig:t,taskConfig:r,waitUntil:o,workflowConfig:n}}async function _({queueable:e,req:t,stats:i}){if(!e.taskConfig&&!e.workflowConfig)return{status:"error"};let r=e.scheduleConfig.hooks?.beforeSchedule,n=e.scheduleConfig.hooks?.afterSchedule;try{let s=await (r??k)({defaultBeforeSchedule:r?k:null,jobStats:i,queueable:e,req:t});if(!s.shouldSchedule)return await (n??x)({defaultAfterSchedule:n?x:null,jobStats:i,queueable:e,req:t,status:"skipped"}),{status:"skipped"};let a=await t.payload.jobs.queue({input:s.input??{},meta:{scheduled:!0},queue:e.scheduleConfig.queue,req:t,task:e?.taskConfig?.slug,waitUntil:s.waitUntil,workflow:e.workflowConfig?.slug});return await (n??x)({defaultAfterSchedule:n?x:null,job:a,jobStats:i,queueable:e,req:t,status:"success"}),{status:"success"}}catch(r){return await (n??x)({defaultAfterSchedule:n?x:null,error:r,jobStats:i,queueable:e,req:t,status:"error"}),{status:"error"}}}e.s(["handleSchedules",()=>N],172527),e.s(["runJobs",()=>ee],523174);class R extends Error{args;constructor(e){super(e.message),this.args=e}}class L extends Error{args;constructor(e){super(e.message),this.args=e}}class F extends Error{constructor(e){super(e)}}async function M(e){let t=await O(e);if(t)return t[0]}async function O({id:e,data:t,depth:i,disableTransaction:r,limit:n,req:s,returning:a,sort:o,where:l}){let c=e?1:n,d=e?{id:{equals:e}}:l;if(i||s.payload.config?.jobs?.runHooks){let n=await s.payload.update({id:e,collection:es,data:t,depth:i,disableTransaction:r,limit:c,req:s,where:d});return!1!==a&&n?n.docs:null}let u={transactionID:"mongoose"!==s.payload.db.name?await s.payload.db.beginTransaction():void 0};void 0===t.updatedAt&&(t.updatedAt=new Date().toISOString());let h=e?{id:e,data:t,req:u,returning:a}:{data:t,limit:c,req:u,returning:a,sort:o,where:d},A=await s.payload.db.updateJobs(h);return("mongoose"!==s.payload.db.name&&u.transactionID&&await s.payload.db.commitTransaction(u.transactionID),!1!==a&&A?.length)?A.map(e=>eo({config:s.payload.config,doc:e})):null}function U(e,t){return async i=>{let r=await M({id:e.id,data:i,depth:t.payload.config.jobs.depth,disableTransaction:!0,req:t});if(!r)return e;for(let t in r)if("log"===t)for(let t of r?.log??[])e.log&&e.log.some(e=>e.id===t.id)||(e.log??=[]).push(t);else e[t]=r[t];if(r?.error?.cancelled)throw new F(`Job ${e.id} was cancelled`);return r}}e.s(["updateJob",()=>M,"updateJobs",()=>O],279339);var P=e.i(248615);async function $(e){let t,i,[r,n]=e.split("#");try{i=await (0,P.dynamicImport)(r)}catch(t){throw Error(`Error importing job queue handler module for path ${e}. This is an advanced feature that may require a sophisticated build pipeline, especially when using it in production or within Next.js, e.g. by calling opening the /api/payload-jobs/run endpoint. You will have to transpile the handler files separately and ensure they are available in the same location when the job is run. If you're using an endpoint to execute your jobs, it's recommended to define your handlers as functions directly in your Payload Config, or use import paths handlers outside of Next.js. Import Error:
|
||
${t instanceof Error?t.message:"Unknown error"}`)}return n&&i[n]&&(t=i[n]),!t&&i.default&&(t=i.default),t||(t=i),t}async function j(e){if(!e)throw Error("Task config is required to get the task handler");return"function"==typeof e.handler?e.handler:await $(e.handler)}var H=e.i(743977);function q({retriesConfig:e,totalTried:t}){let i=Q();if("object"==typeof e&&e.backoff){if("fixed"===e.backoff.type)i=e.backoff.delay?new Date(Q().getTime()+e.backoff.delay):Q();else if("exponential"===e.backoff.type){let r=e.backoff.delay?e.backoff.delay:0;i=new Date(Q().getTime()+Math.pow(2,t)*r)}}return i}function z({job:e,retriesConfig:t}){let i="object"==typeof t?t.attempts:t;return null!=i&&e.totalTried>=i?{hasFinalError:!0,maxWorkflowRetries:i}:t?{hasFinalError:!1,maxWorkflowRetries:i,waitUntil:q({retriesConfig:t,totalTried:e.totalTried??0})}:{hasFinalError:!1,maxWorkflowRetries:void 0,waitUntil:void 0}}let V="default"in H.default?H.default.default:H.default;async function G({error:e,req:t,silent:i=!1,updateJob:r}){let{executedAt:n,input:s,job:a,output:o,parent:l,retriesConfig:c,taskConfig:d,taskID:u,taskSlug:h,taskStatus:A,workflowConfig:p}=e.args;d?.onFail&&await d.onFail({input:s,job:a,req:t,taskStatus:A});let f={name:e.name,cancelled:!!("cancelled"in e&&e.cancelled),message:e.message,stack:e.stack},g=Q();a.waitUntil&&new Date(a.waitUntil)<g&&delete a.waitUntil;let m=0;m=c?.attempts===void 0||c?.attempts===null?void 0!==p.retries&&null!==p.retries?"object"==typeof p.retries?"number"==typeof p.retries.attempts?p.retries.attempts:0:p.retries:0:c.attempts;let y={id:new V().toHexString(),completedAt:g.toISOString(),error:f,executedAt:n.toISOString(),input:s,output:o??{},parent:t.payload.config.jobs.addParentToTaskLog?l:void 0,state:"failed",taskID:u,taskSlug:h};if(!A?.complete&&(A?.totalTried??0)>=m)return await r({error:f,hasError:!0,log:{$push:y},processing:!1,totalTried:(a.totalTried??0)+1,waitUntil:a.waitUntil}),i&&("object"!=typeof i||i.error)||t.payload.logger.error({err:e,job:a,msg:`Error running task ${u}. Attempt ${a.totalTried} - max retries reached`,taskSlug:h}),{hasFinalError:!0};let b=q({retriesConfig:c,totalTried:A?.totalTried??0});(!a.waitUntil||b>new Date(a.waitUntil))&&(a.waitUntil=b.toISOString());let{hasFinalError:E,maxWorkflowRetries:C,waitUntil:w}=z({job:a,retriesConfig:p.retries});return i&&("object"!=typeof i||i.error)||t.payload.logger.error({err:e,job:a,msg:`Error running task ${u}. Attempt ${a.totalTried+1}${void 0!==C?"/"+(C+1):""}`,taskSlug:h}),w&&(!a.waitUntil||w>new Date(a.waitUntil))&&(a.waitUntil=w.toISOString()),await r({error:E?f:void 0,hasError:E,log:{$push:y},processing:!1,totalTried:(a.totalTried??0)+1,waitUntil:a.waitUntil}),{hasFinalError:E}}async function Y({error:e,req:t,silent:i=!1,updateJob:r}){let{job:n,workflowConfig:s}=e.args,a={name:e.name,cancelled:!!("cancelled"in e&&e.cancelled),message:e.message,stack:e.stack},{hasFinalError:o,maxWorkflowRetries:l,waitUntil:c}=z({job:n,retriesConfig:s.retries});!o&&(n.waitUntil&&new Date(n.waitUntil)<Q()&&delete n.waitUntil,c&&(!n.waitUntil||c>new Date(n.waitUntil))&&(n.waitUntil=c.toISOString()));let d=n.workflowSlug||`Task: ${n.taskSlug}`;return i&&("object"!=typeof i||i.error)||t.payload.logger.error({err:e,msg:`Error running job ${d} id: ${n.id} attempt ${n.totalTried+1}${void 0!==l?"/"+(l+1):""}`}),await r({error:a,hasError:o,processing:!1,totalTried:(n.totalTried??0)+1,waitUntil:n.waitUntil}),{hasFinalError:o}}var W=H;let J="default"in W.default?W.default.default:W.default,K=(e,t,i,r,n,s)=>{let a=i.payload.config.jobs,o=o=>async(l,{input:c,retries:d,task:u})=>{let h,A,p=Q();if(!r&&!(h=a.tasks?.length&&a.tasks.find(e=>e.slug===o)))throw Error(`Task ${o} not found in workflow ${e.workflowSlug}`);let f=void 0==d||null==d?{}:"number"==typeof d?{attempts:d}:d,g={...h?"number"==typeof h.retries?{attempts:h.retries}:h.retries:{},...f},m=e?.taskStatus?.[o]?e.taskStatus[o][l]:null;if(m&&!0===m.complete){let t=!0;if(g?.shouldRestore===!1?t=!1:"function"==typeof g?.shouldRestore&&(t=await g.shouldRestore({input:c,job:e,req:i,taskStatus:m})),t)return m.output}let y=r?u:await j(h);if(!y||"function"!=typeof y)throw new R({executedAt:p,input:c,job:e,message:r?`Inline task with ID ${l} does not have a valid handler.`:`Task with slug ${o} in workflow ${e.workflowSlug} does not have a valid handler.`,parent:s,retriesConfig:g,taskConfig:h,taskID:l,taskSlug:o,taskStatus:m,workflowConfig:t});let b={};try{A=await y({inlineTask:K(e,t,i,!0,n,{taskID:l,taskSlug:o}),input:c,job:e,req:i,tasks:K(e,t,i,!1,n,{taskID:l,taskSlug:o})})}catch(i){if(i instanceof F)throw i;throw new R({executedAt:p,input:c,job:e,message:i.message||"Task handler threw an error",output:b,parent:s,retriesConfig:g,taskConfig:h,taskID:l,taskSlug:o,taskStatus:m,workflowConfig:t})}if("failed"===A.state)throw new R({executedAt:p,input:c,job:e,message:A.errorMessage??"Task handler returned a failed state",output:b,parent:s,retriesConfig:g,taskConfig:h,taskID:l,taskSlug:o,taskStatus:m,workflowConfig:t});b=A.output,h?.onSuccess&&await h.onSuccess({input:c,job:e,req:i,taskStatus:m});let E={id:new J().toHexString(),completedAt:Q().toISOString(),executedAt:p.toISOString(),input:c,output:b,parent:a.addParentToTaskLog?s:void 0,state:"succeeded",taskID:l,taskSlug:o};return await n({log:{$push:E},updatedAt:null}),b};if(r)return o("inline");{let e={};for(let t of a.tasks??[])e[t.slug]=o(t.slug);return e}},Z=async({job:e,req:t,silent:i,updateJob:r,workflowConfig:n,workflowHandler:s})=>{try{await s({inlineTask:K(e,n,t,!0,r),job:e,req:t,tasks:K(e,n,t,!1,r)})}catch(a){if(a instanceof F)throw a;if(a instanceof R){let{hasFinalError:e}=await G({error:a,req:t,silent:i,updateJob:r});return{status:e?"error-reached-max-retries":"error"}}let{hasFinalError:s}=await Y({error:a instanceof L?a:new L({job:e,message:"object"==typeof a&&a&&"message"in a?a.message:"An unhandled error occurred",workflowConfig:n}),req:t,silent:i,updateJob:r});return{status:s?"error-reached-max-retries":"error"}}return await r({completedAt:Q().toISOString(),processing:!1,totalTried:(e.totalTried??0)+1}),{status:"success"}},X=async({job:e,req:t,silent:i=!1,updateJob:r,workflowConfig:n,workflowHandler:s})=>{let a=[];for(let t of s){if("task"in t){if(e?.taskStatus?.[t.task]?.[t.id]?.complete)continue}else if(e?.taskStatus?.inline?.[t.id]?.complete)continue;(!t.condition||t.condition({job:e}))&&a.push(t)}let o=K(e,n,t,!1,r),l=K(e,n,t,!0,r);try{await Promise.all(a.map(async t=>{"task"in t?await o[t.task](t.id,{input:t.input?t.input({job:e}):{},retries:t.retries}):await l(t.id,{retries:t.retries,task:t.inlineTask})}))}catch(a){let{hasFinalError:s}=await Y({error:a instanceof L?a:new L({job:e,message:"object"==typeof a&&a&&"message"in a?a.message:"An unhandled error occurred",workflowConfig:n}),silent:i,req:t,updateJob:r});return{status:s?"error-reached-max-retries":"error"}}let c=!1;for(let[t,i]of Object.entries(e.taskStatus))for(let[e,r]of Object.entries(i))if(r.complete){let i=s.find(i=>"task"in i?i.task===t&&i.id===e:i.id===e&&"inline"===t);if(i?.completesJob){c=!0;break}}return c?(await r({completedAt:Q().toISOString(),processing:!1,totalTried:(e.totalTried??0)+1}),{status:"success"}):await X({job:e,req:t,updateJob:r,workflowConfig:n,workflowHandler:s})},ee=async e=>{let{id:t,allQueues:i=!1,limit:r=10,overrideAccess:a,processingOrder:o,queue:l="default",req:c,req:{payload:d,payload:{config:{jobs:u}}},sequential:h,silent:A=!1,where:p}=e;if(!a){let e=u?.access?.run??(()=>!0);if(!await e({req:c}))throw new n(c.t)}let f=[{completedAt:{exists:!1}},{hasError:{not_equals:!0}},{processing:{equals:!1}},{or:[{waitUntil:{exists:!1}},{waitUntil:{less_than:Q().toISOString()}}]}];if(!0!==i&&f.push({queue:{equals:l??"default"}}),p&&f.push(p),u.enableConcurrencyControl){let e=await d.db.find({collection:es,limit:0,pagination:!1,req:{transactionID:void 0},select:{concurrencyKey:!0},where:{and:[{processing:{equals:!0}},{concurrencyKey:{exists:!0}}]}}),t=new Set;if(e?.docs)for(let i of e.docs){let e=i.concurrencyKey;e&&t.add(e)}t.size>0&&f.push({or:[{concurrencyKey:{exists:!1}},{concurrencyKey:{not_in:[...t]}}]})}let g=[];if(t){let e=await M({id:t,data:{processing:!0},depth:u.depth,disableTransaction:!0,req:c,returning:!0});e&&(g=[e])}else{let t=d.collections[es]?.config.defaultSort??"createdAt",n=u.processingOrder;"function"==typeof n?t=await n(e):"object"!=typeof n||Array.isArray(n)?"string"==typeof n&&(t=n):!i&&l&&n.queues&&n.queues[l]?t=n.queues[l]:n.default&&(t=n.default);let s=await O({data:{processing:!0},depth:u.depth,disableTransaction:!0,limit:r,req:c,returning:!0,sort:o??t,where:{and:f}});s&&(g=s)}if(!g.length)return{noJobsRemaining:!0,remainingJobsFromQueried:0};if(u.enableConcurrencyControl){let e=new Set,t=[],i=[];for(let r of g)r.concurrencyKey?e.has(r.concurrencyKey)?i.push(r):(e.add(r.concurrencyKey),t.push(r)):t.push(r);if(i.length>0){let e=i.map(e=>e.id);await O({data:{processing:!1},disableTransaction:!0,req:c,returning:!1,where:{id:{in:e}}})}g=t}if(!g.length)return{noJobsRemaining:!1,remainingJobsFromQueried:0};let{existingJobs:m,newJobs:y}=g.reduce((e,t)=>(t.totalTried>0?e.existingJobs.push(t):e.newJobs.push(t),e),{existingJobs:[],newJobs:[]});A&&("object"!=typeof A||A.info)||d.logger.info({msg:`Running ${g.length} jobs.`,new:y?.length,retrying:m?.length});let b=[],E=async e=>{if(!e.workflowSlug&&!e.taskSlug)throw Error("Job must have either a workflowSlug or a taskSlug");let t=s(c,"transactionID"),i=e.workflowSlug&&u.workflows?.length?u.workflows.find(({slug:t})=>t===e.workflowSlug):{slug:"singleTask",handler:async({job:e,tasks:t})=>{await t[e.taskSlug]("1",{input:e.input})}};if(!i)return{id:e.id,result:{status:"error"}};try{let r,n=U(e,t);if("function"==typeof i.handler||"object"==typeof i.handler&&Array.isArray(i.handler))r=i.handler;else if(!(r=await $(i.handler))){let t=e.workflowSlug||`Task: ${e.taskSlug}`,r=`Can't find runner while importing with the path ${i.handler} in job type ${t}.`;return A&&("object"!=typeof A||A.error)||d.logger.error(r),await n({error:{error:r},hasError:!0,processing:!1}),{id:e.id,result:{status:"error-reached-max-retries"}}}if("function"==typeof r){let s=await Z({job:e,req:t,silent:A,updateJob:n,workflowConfig:i,workflowHandler:r});return"success"===s.status&&b.push(e.id),{id:e.id,result:s}}{let s=await X({job:e,req:t,silent:A,updateJob:n,workflowConfig:i,workflowHandler:r});return"success"===s.status&&b.push(e.id),{id:e.id,result:s}}}catch(t){if(t instanceof F)return(!e.error?.cancelled||!e.hasError||e.processing||e.completedAt||e.waitUntil)&&await M({id:e.id,data:{completedAt:null,error:{cancelled:!0,message:t.message},hasError:!0,processing:!1,waitUntil:null},depth:0,disableTransaction:!0,req:c,returning:!1}),{id:e.id,result:{status:"error-reached-max-retries"}};throw t}},C=[];if(h)for(let e of g){let t=await E(e);t&&C.push(t)}else{let e=g.map(E);C=await Promise.all(e)}if(u.deleteJobOnComplete&&b.length)try{u.runHooks?await d.delete({collection:es,depth:0,disableTransaction:!0,where:{id:{in:b}}}):await d.db.deleteMany({collection:es,where:{id:{in:b}}})}catch(e){A&&("object"!=typeof A||A.error)||d.logger.error({err:e,msg:`Failed to delete jobs ${b.join(", ")} on complete`})}let w=C.reduce((e,t)=>(null!==t&&(e[t.id]=t.result),e),{}),I=0;for(let e in w){let t=w[e];t?.status==="error"&&I++}return{jobStatus:w,remainingJobsFromQueried:I}},et={handler:async e=>{let t=e.payload.config.jobs;if(!ei(t))return Response.json({message:"No jobs to run."},{status:200});let i=t.access?.run??(()=>!0);if(!await i({req:e}))return Response.json({message:e.i18n.t("error:unauthorized")},{status:401});let{allQueues:r,disableScheduling:n,limit:s,queue:a,silent:o}=e.query,l="true"===o,c=r&&("string"!=typeof r||"false"!==r);"true"!==n&&t.scheduling&&await e.payload.jobs.handleSchedules({allQueues:c,queue:a,req:e});let d={queue:a,req:e,allQueues:c,overrideAccess:!0,silent:l};"string"==typeof a&&(d.queue=a);let u=Number(s);isNaN(u)||(d.limit=u);let h=!1,A=0;try{let e=await ee(d);h=!!e.noJobsRemaining,A=e.remainingJobsFromQueried}catch(t){return e.payload.logger.error({err:t,msg:"There was an error running jobs:",queue:d.queue}),Response.json({message:e.i18n.t("error:unknown"),noJobsRemaining:!0,remainingJobsFromQueried:A},{status:500})}return Response.json({message:e.i18n.t("general:success"),noJobsRemaining:h,remainingJobsFromQueried:A},{status:200})},method:"get",path:"/run"},ei=e=>!!(e.tasks?.length||e.workflows?.length),er={handler:async e=>{let t=e.payload.config.jobs;if(!ei(t))return Response.json({message:"No jobs to schedule."},{status:200});let i=t.access?.run??(()=>!0);if(!await i({req:e}))return Response.json({message:e.i18n.t("error:unauthorized")},{status:401});if(!t.scheduling)return Response.json({message:"Cannot handle schedules because no tasks or workflows with schedules are defined."},{status:500});let{allQueues:r,queue:n}=e.query,s=r&&("string"!=typeof r||"false"!==r),{errored:a,queued:o,skipped:l}=await N({allQueues:s,queue:n,req:e});return Response.json({errored:a,message:e.i18n.t("general:success"),queued:o,skipped:l},{status:200})},method:"get",path:"/handle-schedules"},en=({jobLog:e})=>{let t={};if(!e||!Array.isArray(e))return t;for(let i of e)if(t[i.taskSlug]||(t[i.taskSlug]={}),t[i.taskSlug]?.[i.taskID]){let e=t[i.taskSlug][i.taskID];e.totalTried+=1,"succeeded"===i.state&&(e.complete=!0,e.output=i.output,e.input=i.input,e.taskSlug=i.taskSlug),t[i.taskSlug][i.taskID]=e}else t[i.taskSlug][i.taskID]={complete:"succeeded"===i.state,input:i.input,output:i.output,taskSlug:i.taskSlug,totalTried:1};return t},es="payload-jobs",ea=e=>{let t=new Set,i=new Set(["inline"]);e.workflows?.length&&e.workflows.forEach(i=>{if(t.add(i.slug),i.concurrency&&!e.enableConcurrencyControl)throw Error(`Workflow "${i.slug}" uses concurrency controls but "jobs.enableConcurrencyControl" is not enabled. Set "jobs.enableConcurrencyControl: true" in your Payload config to use concurrency controls. Note: This adds a new indexed field to the jobs collection schema and may require a database migration.`)}),e.tasks?.length&&e.tasks.forEach(r=>{if(t.has(r.slug))throw Error(`Task slug "${r.slug}" is already used by a workflow. No tasks are allowed to have the same slug as a workflow.`);if(r.concurrency&&!e.enableConcurrencyControl)throw Error(`Task "${r.slug}" uses concurrency controls but "jobs.enableConcurrencyControl" is not enabled. Set "jobs.enableConcurrencyControl: true" in your Payload config to use concurrency controls. Note: This adds a new indexed field to the jobs collection schema and may require a database migration.`);i.add(r.slug)});let r=[{name:"executedAt",type:"date",required:!0},{name:"completedAt",type:"date",required:!0},{name:"taskSlug",type:"select",options:[...i],required:!0},{name:"taskID",type:"text",required:!0},{name:"input",type:"json"},{name:"output",type:"json"},{name:"state",type:"radio",options:["failed","succeeded"],required:!0},{name:"error",type:"json",admin:{condition:(e,t)=>"failed"===t.state},required:!0}];e.addParentToTaskLog&&r.push({name:"parent",type:"group",fields:[{name:"taskSlug",type:"select",options:[...i]},{name:"taskID",type:"text"}]});let n={slug:es,admin:{group:"System",hidden:!0},endpoints:[et,er],fields:[{name:"input",type:"json",admin:{description:"Input data provided to the job"}},{name:"taskStatus",type:"json",virtual:!0},{type:"tabs",tabs:[{fields:[{name:"completedAt",type:"date",index:!0},{name:"totalTried",type:"number",defaultValue:0,index:!0},{name:"hasError",type:"checkbox",admin:{description:"If hasError is true this job will not be retried"},defaultValue:!1,index:!0},{name:"error",type:"json",admin:{condition:e=>e.hasError,description:"If hasError is true, this is the error that caused it"}},{name:"log",type:"array",admin:{description:"Task execution log"},fields:r}],label:"Status"}]},...t.size>0?[{name:"workflowSlug",type:"select",admin:{position:"sidebar"},index:!0,options:[...t]}]:[],{name:"taskSlug",type:"select",admin:{position:"sidebar"},index:!0,options:[...i],required:!1},{name:"queue",type:"text",admin:{position:"sidebar"},defaultValue:"default",index:!0},{name:"waitUntil",type:"date",admin:{date:{pickerAppearance:"dayAndTime"}},index:!0},{name:"processing",type:"checkbox",admin:{position:"sidebar"},defaultValue:!1,index:!0},...e.enableConcurrencyControl?[{name:"concurrencyKey",type:"text",admin:{description:"Used for concurrency control. Jobs with the same key are subject to exclusive/supersedes rules.",position:"sidebar",readOnly:!0},index:!0}]:[]],hooks:{afterRead:[({doc:e,req:t})=>eo({config:t.payload.config,doc:e})],beforeChange:[({data:e,originalDoc:t})=>(t?.error?.cancelled&&(e.processing=!1,e.hasError=!0,delete e.completedAt,delete e.waitUntil),e)]},lockDocuments:!1};return e.stats&&n.fields.push({name:"meta",type:"json"}),n};function eo({config:e,doc:t}){return t.taskStatus=en({jobLog:t.log||[]}),t.input=t.input||{},t.taskStatus=t.taskStatus||{},t}},391033,e=>{"use strict";var t=e.i(974605),i=e.i(74460);let r=(e,r,n)=>{let s=[{name:"parent",type:"relationship",index:!0,relationTo:r.slug},{name:"version",type:"group",fields:r.fields.filter(e=>!("name"in e)||"id"!==e.name),...n&&{flattenedFields:r.flattenedFields.filter(e=>"id"!==e.name)}},{name:"createdAt",type:"date",admin:{disabled:!0},index:!0},{name:"updatedAt",type:"date",admin:{disabled:!0},index:!0}];return(0,t.hasDraftsEnabled)(r)&&(e.localization&&(s.push(i.versionSnapshotField),s.push({name:"publishedLocale",type:"select",admin:{disableBulkEdit:!0,disabled:!0},index:!0,options:e.localization.locales.map(e=>"string"==typeof e?e:e.code)})),s.push({name:"latest",type:"checkbox",admin:{disabled:!0},index:!0}),(0,t.hasAutosaveEnabled)(r)&&s.push({name:"autosave",type:"checkbox",index:!0})),s};e.s(["buildVersionCollectionFields",0,r])},212827,79579,e=>{"use strict";let t=(e={})=>Object.entries(e).reduce((e,[i,r])=>["AND","and","OR","or"].includes(i)&&Array.isArray(r)?{...e,[i.toLowerCase()]:r.map(e=>t(e))}:"id"!==i?{...e,[`version.${i}`]:r}:{...e,parent:r},{});e.s(["appendVersionToQueryKey",0,t],212827);let i=({collectionConfig:e,sort:t})=>(t||(t=e.defaultSort?e.defaultSort:"-createdAt"),"string"==typeof t&&(t=[t]),t.map(e=>{let t,i="";return("-"===e[0]?(t=e.substring(1),i="-"):t=e,"id"===t)?`${i}parent`:`${i}version.${t}`}));e.s(["getQueryDraftsSort",0,i],79579)},201803,e=>{"use strict";var t=e.i(974605),i=e.i(74460);let r=(e,r,n)=>{let s=[{name:"version",type:"group",fields:r.fields,...n&&{flattenedFields:r.flattenedFields}},{name:"createdAt",type:"date",admin:{disabled:!0},index:!0},{name:"updatedAt",type:"date",admin:{disabled:!0},index:!0}];return(0,t.hasDraftsEnabled)(r)&&(e.localization&&(s.push(i.versionSnapshotField),s.push({name:"publishedLocale",type:"select",admin:{disableBulkEdit:!0,disabled:!0},index:!0,options:e.localization.locales.map(e=>"string"==typeof e?e:e.code)})),s.push({name:"latest",type:"checkbox",admin:{disabled:!0},index:!0}),(0,t.hasAutosaveEnabled)(r)&&s.push({name:"autosave",type:"checkbox",index:!0})),s};e.s(["buildVersionGlobalFields",0,r])},24722,289481,686543,753866,22540,905713,921819,107409,644561,944329,521077,e=>{"use strict";var t=e.i(700859),i=t;let r=/multipart\/['"()+-_]+(?:; ?['"()+-_]*)+$/i,n=new Set(["CONNECT","DELETE","GET","HEAD","OPTIONS","TRACE"]),s=e=>!!(e.headers.get("transfer-encoding")||e.headers.get("content-length")&&"0"!==e.headers.get("content-length")),a=e=>!n.has(e.method),o=e=>{let t=e.headers.get("content-type");return t.includes("boundary=")&&r.test(t)},l=e=>{try{return s(e)&&a(e)&&o(e)}catch(e){return!1}};var c=e.i(489725);e.i(10188);var d=e.i(785867),u=t,h=e.i(522734),A=e.i(814747),p=e.i(688947);let f=/[^\w-]/g,g=3,m=65536,y="tmp",b=0,E=(e,t)=>!!(e||{}).debug&&(console.log(`Next-file-upload: ${t}`),!0),C=(e=y)=>(b=b>=m?1:b+1,`${e}-${b}-${Date.now()}`),w=e=>"function"==typeof e,I=(e,t)=>w(t)?t:e,v=(e,t)=>{let i=!1;return r=>{if(!i)return i=!0,r?I(e,t)(r):e()}},B=Object.getOwnPropertyNames(Object.prototype),Q=Object.getOwnPropertyNames(Array.prototype),x=(e,t)=>{let i=e instanceof Array&&Q.includes(t),r=B.includes(t);return!i&&!r},S=(e,t,i)=>(null!=i&&x(e=e||Object.create(null),t)&&(e[t]?e[t]instanceof Array?e[t].push(i):e[t]=[e[t],i]:e[t]=i),e),k=(e,t)=>{if(!e.createParentPath)return!1;let i=A.default.dirname(A.default.resolve(t));return h.default.existsSync(i)||h.default.mkdirSync(i,{recursive:!0}),h.default.existsSync(i)},T=(e,t)=>h.default.unlink(e,t),N=(e,t,i)=>{let r=!1,n=e=>{r||(r=!0,i(e))},s=h.default.createReadStream(e);s.on("error",n);let a=h.default.createWriteStream(t);a.on("error",e=>{s.destroy(),n(e)}),a.on("close",()=>n()),s.pipe(a)},D=(e,t,i)=>h.default.rename(e,t,r=>{r?N(e,t,t=>t?i(t):T(e,i)):i(null,!0)}),_=(e,t,i)=>{if(!Buffer.isBuffer(e))return i(Error("buffer variable should be type of Buffer!"));let r=e,n=new p.Readable;n._read=()=>{n.push(r),r=null};let s=h.default.createWriteStream(t);s.on("error",e=>{i(e)}),s.on("close",()=>{i()}),n.pipe(s)},R=(e,t)=>{if(!e||!e.uriDecodeFileNames)return t;try{return decodeURIComponent(t)}catch(i){let e=/(%[a-f\d]{2})/gi;return t.split(e).map(e=>{try{return decodeURIComponent(e)}catch(e){return""}}).join("")}},L=(e,t)=>{let i={name:t,extension:""};if(!e)return i;let r="boolean"==typeof e?g:e,n=t.split(".");if(n.length<2)return i;let s=n.pop();return s.length>r&&r>0&&(n[n.length-1]+="."+s.substr(0,s.length-r),s=s.substr(-r)),{name:n.join("."),extension:r?s:""}},F=(e,t)=>{if(!t||"string"!=typeof t)return C();let i=t.length<=255?t:t.substr(0,255);if(i=R(e,i),!e.safeFileNames)return i;let r="object"==typeof e.safeFileNames&&e.safeFileNames instanceof RegExp?e.safeFileNames:f,n=L(e.preserveExtension,i);return n.extension.length&&(n.extension="."+n.extension.replace(r,"")),n.name.replace(r,"").concat(n.extension)},M=(e,t,i)=>(r,n)=>{E(i,`Moving temporary file ${t.tempFilePath} to ${e}`),D(t.tempFilePath,e,v(r,n))},O=(e,t,i)=>(r,n)=>{E(i,`Moving uploaded buffer to ${e}`),_(t.buffer,e,v(r,n))},U=(e,t)=>({name:e.name,data:e.buffer,encoding:e.encoding,md5:e.hash,mimetype:e.mimetype,mv:(i,r)=>{let n=t.useTempFiles?M(i,e,t):O(i,e,t);k(t,i);let s=()=>void 0;return w(r)?n(r,s):new Promise(n)},size:e.size,tempFilePath:e.tempFilePath,truncated:e.truncated});var P=e.i(254799),$=h,j=A;let H=(e,t,i)=>{let r=j.default.resolve(e.tempFileDir,C());k({createParentPath:!0},r),E(e,`Temporary file path is ${r}`);let n=P.default.createHash("md5"),s=0,a=!1;E(e,`Opening write stream for ${t}->${i}...`);let o=$.default.createWriteStream(r),l=new Promise((t,i)=>{o.on("finish",()=>t(!0)),o.on("error",t=>{E(e,`Error write temp file: ${t}`),i(t)})});return{cleanup:()=>{a=!0,E(e,`Cleaning up temporary file ${r}...`),o.end(),T(r,t=>t?E(e,`Cleaning up temporary file ${r} failed: ${t}`):E(e,`Cleaning up temporary file ${r} done.`))},complete:()=>(a=!0,E(e,`Upload ${t}->${i} completed, bytes:${s}.`),o instanceof $.WriteStream&&o.end(),Buffer.concat([])),dataHandler:r=>{!0===a?E(e,`Error: got ${t}->${i} data chunk for completed upload!`):(o.write(r),n.update(r),s+=r.length,E(e,`Uploading ${t}->${i}, bytes:${s}...`))},getFilePath:()=>r,getFileSize:()=>s,getHash:()=>n.digest("hex"),getWritePromise:()=>l}},q=(e,t,i)=>{let r=[],n=P.default.createHash("md5"),s=0,a=!1,o=()=>Buffer.concat(r,s);return{cleanup:()=>{a=!0},complete:()=>(E(e,`Upload ${t}->${i} completed, bytes:${s}.`),a=!0,o()),dataHandler:o=>{!0===a?E(e,`Error: got ${t}->${i} data chunk for completed upload!`):(r.push(o),n.update(o),s+=o.length,E(e,`Uploading ${t}->${i}, bytes:${s}...`))},getFilePath:()=>"",getFileSize:()=>s,getHash:()=>n.digest("hex"),getWritePromise:()=>Promise.resolve(!0)}},z=function(e){if(!e||e.length<1)return Object.create(null);let t=Object.create(null),i=Object.keys(e);for(let r=0;r<i.length;r++){let n=i[r],s=n?.replace(new RegExp(/\[/g),".").replace(new RegExp(/\]/g),"").split("."),a=e[n],o=t;for(let e=0;e<s.length;e++){let t=s[e];x(o,t)&&(e>=s.length-1?o[t]=a:(o[t]||(o[t]=s[e+1]?Object.create(null):[]),o=o[t]))}}return t},V=(e=0,t=()=>{})=>{let i=null,r=()=>{clearTimeout(i)},n=()=>!!e&&(r(),i=setTimeout(t,e),!0);return{clear:r,set:n}},G=Symbol("wait flush property symbol"),Y=async({options:e,request:t})=>{let i,r,n=!0,s=!1,a=0,o=0,l=new Promise((e,t)=>{i=e,r=t}),h={fields:void 0,files:void 0},A={};t.headers.forEach((e,t)=>{A[t]=e});let p=t.body?.getReader(),f=(0,c.default)({...e,headers:A});function g(e,t){e.destroy(),s=!0,r(t)}for(f.on("field",(e,t)=>{h.fields=S(h.fields,e,t)}),f.on("file",(n,s,l)=>{a+=1;let{encoding:c,filename:A,mimeType:p}=l,m=F(e,A),y=m&&m.endsWith(".glb")&&"model/gltf-binary"||m&&m.endsWith(".gltf")&&"model/gltf+json"||p,{cleanup:b,complete:C,dataHandler:I,getFilePath:v,getFileSize:B,getHash:Q,getWritePromise:x}=e.useTempFiles?H(e,n,m):q(e,n,m),k=e.useTempFiles?x().catch(()=>{f.end(),b()}):x(),T=V(e.uploadTimeout,()=>g(s,new u.APIError(`Upload timeout for ${n}->${m}, bytes:${B()}`)));s.on("limit",()=>{E(e,`Size limit reached for ${n}->${m}, bytes:${B()}`),T.clear(),w(e.limitHandler)&&e.limitHandler({request:t,size:B()}),e.abortOnLimit&&(E(e,`Upload file size limit reached ${n}->${m}.`),b(),g(s,new u.APIError(e.responseOnLimit,d.status.REQUEST_ENTITY_TOO_LARGE,{size:B()})))}),s.on("data",e=>{T.set(),I(e)}),s.on("end",()=>{let r=B();if(E(e,`Upload finished ${n}->${m}, bytes:${r}`),T.clear(),!A&&0===r)return a-=1,e.useTempFiles&&(b(),E(e,`Removing the empty file ${n}->${m}`)),E(e,"Don't add file instance if original name and size are empty");o+=1,h.files=S(h.files,n,U({name:m,buffer:C(),encoding:c,hash:Q(),mimetype:y,size:r,tempFilePath:v(),truncated:!!("truncated"in s&&s.truncated)},e)),t[G]||(t[G]=[]),t[G].push(k),o===a&&i()}),s.on("error",t=>{T.clear(),E(e,`File Error: ${t.message}`),b(),r(t)}),E(e,`New upload started ${n}->${m}, bytes:${B()}`),T.set()}),f.on("finish",async()=>{if(E(e,"Busboy finished parsing request."),e.parseNested&&(h.fields=z(h.fields),h.files=z(h.files)),t[G])try{await Promise.all(t[G]).then(()=>{delete t[G]})}catch(t){E(e,`Error waiting for file write promises: ${t}`)}return h}),f.on("error",(t=new u.APIError("Busboy error parsing multipart request",d.status.BAD_REQUEST))=>{throw E(e,"Busboy error"),t});n;){let{done:e,value:t}=await p.read();e&&(n=!1),t&&!s&&f.write(t)}return 0!==a&&await l.catch(e=>{throw e}),h},W={abortOnLimit:!1,createParentPath:!1,debug:!1,defParamCharset:"utf8",limitHandler:!1,parseNested:!1,preserveExtension:!1,responseOnLimit:"File size limit has been reached",safeFileNames:!1,tempFileDir:"tmp",uploadTimeout:6e4,uriDecodeFileNames:!1,useTempFiles:!1},J=async({options:e,request:t})=>{let r={...W,...e};return l(t)?Y({options:r,request:t}):(E(r,"Request is not eligible for file upload!"),{error:new i.APIError("Request is not eligible for file upload",500),fields:void 0,files:void 0})},K=async e=>{let{body:i,headers:r,method:n,payload:s}=e;if(n&&["PATCH","POST","PUT"].includes(n.toUpperCase())&&i){let[i]=(r.get("Content-Type")||"").split(";",1),n=parseInt(e.headers.get("Content-Length")||"0",10);if("application/json"===i)try{let t=await e.text?.(),i=t?JSON.parse(t):{};e.data=i,e.json=()=>Promise.resolve(i)}catch(i){if(i instanceof SyntaxError)throw new t.APIError("Invalid JSON",400);throw e.payload.logger.error(i),i}else if(n&&i?.includes("multipart/")){let{error:i,fields:r,files:n}=await J({options:{...s.config.bodyParser||{},...s.config.upload||{}},request:e});if(i)throw new t.APIError(i.message);if(n?.file&&(e.file=n.file),r?._payload&&"string"==typeof r._payload&&(e.data=JSON.parse(r._payload)),!e.file&&r?.file&&"string"==typeof r?.file){let i,n,a,o,l,c;try{({clientUploadContext:i,collectionSlug:n,filename:a,mimeType:o,size:l}=JSON.parse(r.file))}catch{throw new t.APIError("A file name is required.",400)}let d=e.payload.collections[n].config.upload;if(!d.handlers)throw new t.APIError("uploadConfig.handlers is not present for "+n);let u=null;for(let t of d.handlers)try{let r=await t(e,{doc:null,params:{clientUploadContext:i,collection:n,filename:a}});r&&(u=r)}catch(e){c=e}if(!u)throw c&&s.logger.error(c),new t.APIError("Expected response from the upload handler.");e.file={name:a,clientUploadContext:i,data:Buffer.from(await u.arrayBuffer()),mimetype:u.headers.get("Content-Type")||o,size:l}}}}};e.s(["addDataAndFileToRequest",0,K],24722);var Z=e.i(893961),X=e.i(117993),ee=e.i(750716);let et=({headers:e,payload:t,user:i})=>{let r,n,s=e.get("host");s&&(r=(0,ee.oneWayHash)(s,t.secret)),i?.id&&(n=(0,ee.oneWayHash)(String(i.id),t.secret)),(0,X.sendEvent)({event:{type:"admin-init",domainID:r,userID:n},payload:t})};var ei=e.i(684442);let er=async e=>{let{req:t}=e;et(t);try{return(0,ei.getAccessResults)({req:t})}catch(e){throw await (0,Z.killTransaction)(t),e}};e.s(["accessOperation",0,er],289481);var en=e.i(516808);let es=async e=>{let{collection:t,req:i}=e,r=i.payload.config.collections?.find(e=>e.slug===t),n=(0,en.appendNonTrashedFilter)({enableTrash:!!r?.trash,trash:!1,where:{}});return!!await i.payload.db.findOne({collection:t,req:i,where:n})};e.s(["initOperation",0,es],686543);let ea=e=>{let{name:t,domain:i,expires:r,httpOnly:n,maxAge:s,path:a,returnCookieAsObject:o,sameSite:l,secure:c,value:d}=e,u=`${t}=${d||""}`,h={name:t,value:d},A=c||"None"===l;return r&&(o?h.expires=r.toUTCString():u+=`; Expires=${r.toUTCString()}`),s&&(o?h.maxAge=s:u+=`; Max-Age=${s.toString()}`),i&&(o?h.domain=i:u+=`; Domain=${i}`),a&&(o?h.path=a:u+=`; Path=${a}`),A&&(o?h.secure=A:u+=`; Secure=${A}`),n&&(o?h.httpOnly=n:u+=`; HttpOnly=${n}`),l&&(o?h.sameSite=l:u+=`; SameSite=${l}`),o?h:u},eo=({seconds:e=7200})=>{let t=new Date;return t.setSeconds(t.getSeconds()+e),t},el=({collectionAuthConfig:e,cookiePrefix:t,returnCookieAsObject:i=!1,token:r})=>{let n="string"==typeof e.cookies.sameSite?e.cookies.sameSite:e.cookies.sameSite?"Strict":void 0;return ea({name:`${t}-token`,domain:e.cookies.domain??void 0,expires:eo({seconds:e.tokenExpiration}),httpOnly:!0,path:"/",returnCookieAsObject:i,sameSite:n,secure:e.cookies.secure,value:r})},ec=({collectionAuthConfig:e,cookiePrefix:t,returnCookieAsObject:i=!1})=>{let r="string"==typeof e.cookies.sameSite?e.cookies.sameSite:e.cookies.sameSite?"Strict":void 0,n=new Date(Date.now()-1e3);return ea({name:`${t}-token`,domain:e.cookies.domain??void 0,expires:n,httpOnly:!0,path:"/",returnCookieAsObject:i,sameSite:r,secure:e.cookies.secure})};e.s(["generateExpiredPayloadCookie",0,ec,"generatePayloadCookie",0,el],753866);var ed=d,eu=t,eh=en,eA=e.i(452968),ep=e.i(311462),ef=Z;let eg=async e=>{let t=e,{allSessions:i,collection:{config:r},req:{user:n},req:s}=e;if(!n)throw new eu.APIError("No User",ed.status.BAD_REQUEST);if(n.collection!==r.slug)throw new eu.APIError("Incorrect collection",ed.status.FORBIDDEN);let a=await (0,ep.initTransaction)(s);try{if(r.hooks?.afterLogout?.length)for(let e of r.hooks.afterLogout)t=await e({collection:t.collection?.config,context:s.context,req:s})||t;if(!0!==r.auth.disableLocalStrategy&&r.auth.useSessions){let e=(0,eh.appendNonTrashedFilter)({enableTrash:!!r.trash,trash:!1,where:{id:{equals:n.id}}}),t=await s.payload.db.findOne({collection:r.slug,req:s,where:e});if(!t)throw new eu.APIError("No User",ed.status.BAD_REQUEST);if(i)t.sessions=[];else{let e=(t?.sessions||[]).filter(e=>e.id!==s?.user?._sid);t.sessions=e}t.updatedAt=null,await s.payload.db.updateOne({id:n.id,collection:r.slug,data:t,req:s,returning:!1})}return a&&await (0,eA.commitTransaction)(s),!0}catch(e){throw await (0,ef.killTransaction)(s),e}};e.s(["logoutOperation",0,eg],22540);var em=e.i(250488);em.encode;let ey=em.decode;var eb=e.i(378541),eE=e.i(392826),eC=e.i(195420);function ew(e){let t,i;if("string"!=typeof e)throw new eC.JWTInvalid("JWTs must use Compact JWS serialization, JWT must be a string");let{1:r,length:n}=e.split(".");if(5===n)throw new eC.JWTInvalid("Only JWTs using Compact JWS serialization can be decoded");if(3!==n)throw new eC.JWTInvalid("Invalid JWT");if(!r)throw new eC.JWTInvalid("JWTs must contain a payload");try{t=ey(r)}catch{throw new eC.JWTInvalid("Failed to base64url decode the payload")}try{i=JSON.parse(eb.decoder.decode(t))}catch{throw new eC.JWTInvalid("Failed to parse the decoded payload as JSON")}if(!(0,eE.default)(i))throw new eC.JWTInvalid("Invalid JWT Claims Set");return i}let eI=async e=>{let{collection:t,currentToken:i,depth:r,draft:n,joins:s,populate:a,req:o,select:l}=e,c={user:null};if(o.user){if(o.user.collection!==t.config.slug)return{user:null};let{pathname:d}=o,u=d===`/api${o.payload.config.routes.graphQL}`,h=await o.payload.findByID({id:o.user.id,collection:t.config.slug,depth:u?0:r??t.config.auth.depth,draft:n,joins:s,overrideAccess:!1,populate:a,req:o,select:l,showHiddenFields:!1});for(let i of(h&&(h.collection=t.config.slug,h._strategy=o.user._strategy),t.config.hooks.me)){let t=await i({args:e,user:h});if(t){c.user=t.user,c.exp=t.exp;break}}if(c.collection=o.user.collection,c.strategy=o.user._strategy,!c.user&&(c.user=h,i)){let e=ew(i);e&&(c.exp=e.exp),t.config.auth.removeTokenFromResponses||(c.token=i)}}if(t.config.hooks?.afterMe?.length)for(let e of t.config.hooks.afterMe)c=await e({collection:t?.config,context:o.context,req:o,response:c})||c;return c};e.s(["meOperation",0,eI],905713);var ev=e.i(252016),eB=e.i(668473),eQ=e.i(295694),ex=eA,eS=ep,ek=Z,eT=e.i(234209),eN=e.i(911909),eD=e.i(406583);let e_=async e=>{let t=e;try{let e,i=await (0,eS.initTransaction)(t.req),{collection:{config:r},req:n,req:{payload:{config:s,secret:a}}}=t=await (0,eB.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"refresh",overrideAccess:!1});if(!t.req.user)throw new eQ.Forbidden(t.req.t);let o=new URL(t.req.url).pathname===s.routes.graphQL,l=await n.payload.db.findOne({collection:r.slug,req:n,where:{id:{equals:t.req.user.id}}}),c=t.req.user._sid;if(r.auth.useSessions&&!r.auth.disableLocalStrategy){if(!Array.isArray(l.sessions)||!c)throw new eQ.Forbidden(t.req.t);let e=l.sessions.find(({id:e})=>e===c),i=new Date,s=1e3*r.auth.tokenExpiration;e.expiresAt=new Date(i.getTime()+s),l.updatedAt=null,await n.payload.db.updateOne({id:l.id,collection:r.slug,data:{...l,sessions:(0,eD.removeExpiredSessions)(l.sessions)},req:n,returning:!1})}for(let i of((l=await n.payload.findByID({id:l.id,collection:r.slug,depth:o?0:t.collection.config.auth.depth,req:t.req}))&&(l.collection=t.req.user.collection,l._strategy=t.req.user._strategy),t.collection.config.hooks.refresh)){let r=await i({args:t,user:l});if(r){e=r;break}}if(!e){let i=(0,eT.getFieldsToSign)({collectionConfig:r,email:l?.email,sid:c,user:t?.req?.user}),{exp:n,token:s}=await (0,eN.jwtSign)({fieldsToSign:i,secret:a,tokenExpiration:r.auth.tokenExpiration});e={exp:n,refreshedToken:s,setCookie:!0,strategy:t.req.user._strategy,user:l}}if(r.hooks?.afterRefresh?.length)for(let i of r.hooks.afterRefresh)e=await i({collection:t.collection?.config,context:t.req.context,exp:e.exp,req:t.req,token:e.refreshedToken})||e;return e=await (0,ev.buildAfterOperation)({args:t,collection:t.collection?.config,operation:"refresh",overrideAccess:!1,result:e}),i&&await (0,ex.commitTransaction)(n),e}catch(e){throw await (0,ek.killTransaction)(t.req),e}};e.s(["refreshOperation",0,e_],921819);var eR=e.i(809175),eL=Z,eF=e.i(892779);let eM=["create","read","update","delete"];async function eO(e){let{id:t,collection:{config:i},data:r,req:n}=e,s=[...eM];i.auth&&void 0!==i.auth.maxLoginAttempts&&0!==i.auth.maxLoginAttempts&&s.push("unlock"),i.versions&&s.push("readVersions");try{let e=await (0,eR.getEntityPermissions)({id:t,blockReferencesPermissions:{},data:r,entity:i,entityType:"collection",fetchData:!!t,operations:s,req:n}),a=(0,eF.sanitizePermissions)({collections:{[i.slug]:e}});return a?.collections?.[i.slug]??{fields:{}}}catch(e){throw await (0,eL.killTransaction)(n),e}}e.s(["docAccessOperation",()=>eO],107409);var eU=e.i(843385),eP=e.i(186725);function e$(e=[],t){let{i18n:i,keepPresentationalFields:r,labelPrefix:n,moveSubFieldsToTop:s=!1,pathPrefix:a}="boolean"==typeof t?{keepPresentationalFields:t}:t??{};return e.reduce((e,o)=>{if("group"===o.type&&"fields"in o)if(s){let t="name"in o&&"string"==typeof o.name&&!!o.name,l="name"in o?o.name:void 0,c="label"in o&&o.label&&i?(0,eU.getTranslation)(o.label,i):void 0,d=n?`${n} > ${c??l}`:c??l,u="name"in o&&o.name?a?`${a}.${o.name}`:o.name:a;e.push(o,...e$(o.fields,{i18n:i,keepPresentationalFields:r,labelPrefix:t?d:n,moveSubFieldsToTop:s,pathPrefix:t?u:a}))}else(0,eP.fieldAffectsData)(o)?e.push(o):e.push(...e$(o.fields,t));else if("tabs"===o.type&&"tabs"in o)return[...e,...o.tabs.reduce((e,o)=>{if(!(0,eP.tabHasName)(o))return[...e,...e$(o.fields,t)];if(!s)return[...e,{...o,type:"tab"}];{let t="label"in o&&o.label&&i?(0,eU.getTranslation)(o.label,i):void 0,l=n?`${n} > ${t??o.name}`:t??o.name,c=o.name?a?`${a}.${o.name}`:o.name:a;return[...e,...e$(o.fields,{i18n:i,keepPresentationalFields:r,labelPrefix:l,moveSubFieldsToTop:s,pathPrefix:c})]}},[])];else if((0,eP.fieldHasSubFields)(o)&&["collapsible","row"].includes(o.type))e.push(...e$(o.fields,t));else if((0,eP.fieldAffectsData)(o)||r&&(0,eP.fieldIsPresentationalOnly)(o)){if("id"===o.name&&void 0!==n)return e;let t="label"in o&&o.label&&i?(0,eU.getTranslation)(o.label,i):void 0,r="name"in o?o.name:void 0,l=void 0!==a||void 0!==n;e.push({...o,...s&&l&&{accessor:a&&r?`${a}.${r}`:r??"",labelWithPrefix:n?`${n} > ${t??r}`:t??r}})}return e},[])}e.s(["flattenTopLevelFields",()=>e$],644561);var ej=eR,eH=Z,eq=eF;let ez=async e=>{let{data:t,globalConfig:i,req:r}=e,n=["read","update"];i.versions&&n.push("readVersions");try{let e=await (0,ej.getEntityPermissions)({id:void 0,blockReferencesPermissions:{},data:t,entity:i,entityType:"global",fetchData:!0,operations:n,req:r}),s=(0,eq.sanitizePermissions)({globals:{[i.slug]:e}});return s?.globals?.[i.slug]??{fields:{}}}catch(e){throw await (0,eH.killTransaction)(r),e}};e.s(["docAccessOperation",0,ez],944329);var eV=e.i(885923);e.s(["restoreVersionOperationGlobal",()=>eV.restoreVersionOperation],521077)},64183,350947,371552,283078,723310,990569,921065,919915,322929,713278,360918,565058,397903,215010,826948,885923,964530,e=>{"use strict";e.i(10188);var t=e.i(785867),i=e.i(42625),r=e.i(617997),n=e.i(451038),s=e.i(90602),a=e.i(700859),o=e.i(488889),l=e.i(62696),c=e.i(542299),d=e.i(516808),u=e.i(585993),h=e.i(540875);let A="payload-locked-documents",p=e=>{let t=e.collections.filter(e=>!1!==e.lockDocuments).map(e=>e.slug),i=e.globals?e.globals.filter(e=>!1!==e.lockDocuments):[],r=e.collections.filter(e=>e.auth).map(e=>e.slug);if(0===t.length&&0===i.length||0===r.length)return null;let n=[];return t.length>0&&n.push({name:"document",type:"relationship",index:!0,maxDepth:0,relationTo:t}),n.push({name:"globalSlug",type:"text",index:!0}),n.push({name:"user",type:"relationship",maxDepth:1,relationTo:r,required:!0}),{slug:A,access:{create:h.defaultAccess,delete:h.defaultAccess,read:h.defaultAccess,update:h.defaultAccess},admin:{hidden:!0},fields:n,lockDocuments:!1}};e.s(["getLockedDocumentsCollection",0,p,"lockedDocumentsCollectionSlug",0,A],350947);let f=async({id:e,collectionSlug:t,globalSlug:i,lockDurationDefault:r=300,lockErrorMessage:n,overrideLock:s=!0,req:a})=>{let{payload:o}=a;if(!o.collections?.[A])return;let l=t?o.collections?.[t]?.config?.lockDocuments:o.config?.globals?.find(e=>e.slug===i)?.lockDocuments,c=!1!==l,d={};if(t)d={and:[{"document.relationTo":{equals:t}},{"document.value":{equals:e}}]};else if(i)d={globalSlug:{equals:i}};else throw Error("Either collectionSlug or globalSlug must be provided.");if(c){if(!s){let s=t?`Document with ID ${e} is currently locked by another user and cannot be modified.`:`Global document with slug "${i}" is currently locked by another user and cannot be modified.`,c=n||s,h=await o.db.find({collection:A,limit:1,pagination:!1,sort:"-updatedAt",where:d}),p=h?.docs[0];if(p){let e=new Date(p?.updatedAt).getTime(),t=new Date().getTime(),i=1e3*("object"==typeof l?l.duration:r),n=a.user?.id;if(p.user?.value!==n&&t-e<=i)throw new u.Locked(c)}}await o.db.deleteMany({collection:A,req:"mongoose"===o.db.name?void 0:a,where:d})}};var g=e.i(452968),m=e.i(974605),y=e.i(311462),b=t;function E(e,t){let i=e;return!!t.debug||!0===i.isPublic||!1!==i.isPublic&&!!i.status&&i.status!==b.status.INTERNAL_SERVER_ERROR}e.s(["isErrorPublic",()=>E],371552);var C=e.i(893961),w=e.i(904937);let I=async({id:e,slug:t,payload:i,req:r})=>{try{await i.db.deleteVersions({collection:t,req:r,where:{parent:{equals:e}}})}catch(r){i.logger.error({err:r,msg:`There was an error removing versions for the deleted ${t} document with ID ${e}.`})}};var v=e.i(381692);let B=async({id:e,slug:t,payload:i,req:r})=>{try{await i.db.deleteMany({collection:v.jobsCollectionSlug,req:r,where:{and:[{completedAt:{exists:!1}},{processing:{equals:!1}},{"input.doc.value":{equals:e}},{"input.doc.relationTo":{equals:t}},{taskSlug:{equals:"schedulePublish"}}]}})}catch(r){i.logger.error({err:r,msg:`There was an error deleting scheduled publish jobs from the queue for ${t} document with ID ${e}.`})}};var Q=e.i(252016),x=e.i(668473);let S=async e=>{let u=e;try{let e,h,A=!u.disableTransaction&&await (0,y.initTransaction)(u.req),{collection:{config:p},depth:b,overrideAccess:v,overrideLock:S,populate:k,req:{fallbackLocale:T,locale:N,payload:{config:D},payload:_},req:R,select:L,showHiddenFields:F,trash:M=!1,where:O}=u=await (0,x.buildBeforeOperation)({args:u,collection:u.collection.config,operation:"delete",overrideAccess:u.overrideAccess});if(!O)throw new a.APIError("Missing 'where' query of documents to delete.",t.status.BAD_REQUEST);v||(e=await (0,i.executeAccess)({req:R},p.access.delete)),await (0,n.validateQueryPaths)({collectionConfig:p,overrideAccess:v,req:R,where:O});let U=(0,r.combineQueries)(O,e);U=(0,d.appendNonTrashedFilter)({enableTrash:p.trash,trash:M,where:U}),(0,s.sanitizeWhereQuery)({fields:p.flattenedFields,payload:_,where:U});let P=(0,w.sanitizeSelect)({fields:p.flattenedFields,forceSelect:p.forceSelect,select:L}),{docs:$}=await _.db.find({collection:p.slug,locale:N,req:R,select:P,where:U}),j=[],H=$.map(async e=>{let t,{id:i}=e;try{let r=!1;if(R.payload.db.bulkOperationsSingleTransaction&&(r=await (0,y.initTransaction)(R)),await f({id:i,collectionSlug:p.slug,lockErrorMessage:`Document with ID ${i} is currently locked and cannot be deleted.`,overrideLock:S,req:R}),p.hooks?.beforeDelete?.length)for(let e of p.hooks.beforeDelete)await e({id:i,collection:p,context:R.context,req:R});if(await (0,c.deleteAssociatedFiles)({collectionConfig:p,config:D,doc:e,overrideDelete:!0,req:R}),p.versions&&await I({id:i,slug:p.slug,payload:_,req:R}),(0,m.hasScheduledPublishEnabled)(p)&&await B({id:i,slug:p.slug,payload:_,req:R}),await _.db.deleteOne({collection:p.slug,req:R,returning:!1,where:{id:{equals:i}}}),t=await (0,o.afterRead)({collection:p,context:R.context,depth:b,doc:t||e,draft:void 0,fallbackLocale:T,global:null,locale:N,overrideAccess:v,populate:k,req:R,select:P,showHiddenFields:F}),p.auth&&(t={...t,collection:p.slug}),p.hooks?.afterRead?.length)for(let i of p.hooks.afterRead)t=await i({collection:p,context:R.context,doc:t||e,overrideAccess:v,req:R})||t;if(p.hooks?.afterDelete?.length)for(let e of p.hooks.afterDelete)t=await e({id:i,collection:p,context:R.context,doc:t,req:R})||t;return r&&await (0,g.commitTransaction)(R),t}catch(i){let t=i instanceof Error&&E(i,D);R.payload.db.bulkOperationsSingleTransaction&&await (0,C.killTransaction)(R),j.push({id:e.id,isPublic:t,message:i instanceof Error?i.message:"Unknown error"})}return null});if(R.payload.db.bulkOperationsSingleTransaction)for(let e of(h=[],H))h.push(await e);else h=await Promise.all(H);await (0,l.deleteUserPreferences)({collectionConfig:p,ids:$.map(({id:e})=>e),payload:_,req:R});let q={docs:h.filter(Boolean),errors:j};return q=await (0,Q.buildAfterOperation)({args:u,collection:p,operation:"delete",overrideAccess:v,result:q}),A&&await (0,g.commitTransaction)(R),q}catch(e){throw await (0,C.killTransaction)(u.req),e}};e.s(["deleteOperation",0,S],64183);var k=i,T=e.i(144832),N=r,D=e.i(295694),_=e.i(743699),R=o,L=l,F=c,M=d,O=g,U=m,P=y,$=C,j=w,H=Q,q=x;let z=async e=>{let t=e;try{let e=!t.disableTransaction&&await (0,P.initTransaction)(t.req),{id:i,collection:{config:r},depth:n,overrideAccess:s,overrideLock:a,populate:o,req:{fallbackLocale:l,locale:c,payload:{config:d},payload:u},req:h,select:A,showHiddenFields:p,trash:g=!1}=t=await (0,q.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"delete",overrideAccess:t.overrideAccess}),m=!!s||await (0,k.executeAccess)({id:i,req:h},r.access.delete),y=(0,T.hasWhereAccessResult)(m);if(r.hooks?.beforeDelete?.length)for(let e of r.hooks.beforeDelete)await e({id:i,collection:r,context:h.context,req:h});let b=(0,N.combineQueries)({id:{equals:i}},m);b=(0,M.appendNonTrashedFilter)({enableTrash:r.trash,trash:g,where:b});let E=await h.payload.db.findOne({collection:r.slug,locale:h.locale,req:h,where:b});if(!E&&!y)throw new _.NotFound(h.t);if(!E&&y)throw new D.Forbidden(h.t);await f({id:i,collectionSlug:r.slug,lockErrorMessage:`Document with ID ${i} is currently locked and cannot be deleted.`,overrideLock:a,req:h}),await (0,F.deleteAssociatedFiles)({collectionConfig:r,config:d,doc:E,overrideDelete:!0,req:h}),r.versions&&await I({id:i,slug:r.slug,payload:u,req:h}),(0,U.hasScheduledPublishEnabled)(r)&&await B({id:i,slug:r.slug,payload:u,req:h});let C=(0,j.sanitizeSelect)({fields:r.flattenedFields,forceSelect:r.forceSelect,select:A}),w=await h.payload.db.deleteOne({collection:r.slug,req:h,select:C,where:{id:{equals:i}}});if(r.auth&&(w={...w,collection:r.slug}),await (0,L.deleteUserPreferences)({collectionConfig:r,ids:[i],payload:u,req:h}),w=await (0,R.afterRead)({collection:r,context:h.context,depth:n,doc:w,draft:void 0,fallbackLocale:l,global:null,locale:c,overrideAccess:s,populate:o,req:h,select:C,showHiddenFields:p}),r.hooks?.afterRead?.length)for(let e of r.hooks.afterRead)w=await e({collection:r,context:h.context,doc:w,overrideAccess:s,req:h})||w;if(r.hooks?.afterDelete?.length)for(let e of r.hooks.afterDelete)w=await e({id:i,collection:r,context:h.context,doc:w,req:h})||w;return w=await (0,H.buildAfterOperation)({args:t,collection:r,operation:"deleteByID",overrideAccess:s,result:w}),e&&await (0,O.commitTransaction)(h),w}catch(e){throw await (0,$.killTransaction)(t.req),e}};e.s(["deleteByIDOperation",0,z],283078);var V=e.i(15487);let G=async e=>{let{id:t,...i}=e;return(0,V.createOperation)({...i,data:e?.data||{},duplicateFromID:t})};e.s(["duplicateOperation",0,G],723310);var Y=i,W=r,J=n,K=i,Z=e.i(88665),X=r,ee=n,et=s;let ei=async({collectionSlug:e,errors:t,join:i,joinsQuery:r,overrideAccess:n,promises:s,req:a})=>{let{joinPath:o}=i;if(!1===r[o])return;let l=a.payload.collections[e].config,c=!!n||await (0,K.executeAccess)({disableErrors:!0,req:a},l.access.read);if(!1===c){r[o]=!1;return}r[o]||(r[o]={});let d=r[o];d.where||(d.where={}),i.field.where&&(d.where=(0,X.combineQueries)(d.where,i.field.where)),s.push((0,ee.validateQueryPaths)({collectionConfig:l,errors:t,overrideAccess:n,polymorphicJoin:Array.isArray(i.field.collection),req:a,where:d.where})),"object"==typeof c&&((0,et.sanitizeWhereQuery)({fields:l.flattenedFields,payload:a.payload,where:c}),d.where=(0,X.combineQueries)(d.where,c))},er=async({collectionConfig:e,joins:t,overrideAccess:i,req:r})=>{if(!1===t)return!1;t||(t={});let n=[],s=[];for(let a in e.joins)for(let o of e.joins[a])await ei({collectionSlug:a,errors:n,join:o,joinsQuery:t,overrideAccess:i,promises:s,req:r});for(let a of e.polymorphicJoins)for(let e of a.field.collection)await ei({collectionSlug:e,errors:n,join:a,joinsQuery:t,overrideAccess:i,promises:s,req:r});if(await Promise.all(s),n.length>0)throw new Z.QueryError(n);return t};var en=s,es=o,ea=d,eo=m,el=C,ec=w,ed=e.i(391033),eu=e.i(212827),eh=e.i(830263),eA=e.i(79579),ep=Q,ef=x;let eg=({fields:e,sort:t})=>{let i=t,r=!1;for(let n of(0===t.indexOf("-")&&(r=!0,i=i.substring(1)),i.split("."))){let t=e.find(e=>e.name===n);if(!t)break;if("fields"in t){e=t.flattenedFields;continue}if("virtual"in t&&"string"==typeof t.virtual)return`${r?"-":""}${t.virtual}`}return t},em=({fields:e,sort:t})=>{if(t)return Array.isArray(t)?t.map(t=>eg({fields:e,sort:t})):eg({fields:e,sort:t})},ey=300,eb=async e=>{let t=e;try{let e,i,{collection:{config:r},collection:n,currentDepth:s,depth:a,disableErrors:o,draft:l,includeLockStatus:c,joins:d,limit:u,overrideAccess:h,page:p,pagination:f=!0,populate:g,select:m,showHiddenFields:y,sort:b,trash:E=!1,where:C}=t=await (0,ef.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"read",overrideAccess:t.overrideAccess}),w=t.req,I=c&&w.payload.collections?.[A],{fallbackLocale:v,locale:B,payload:Q}=w,x=(0,ec.sanitizeSelect)({fields:r.flattenedFields,forceSelect:r.forceSelect,select:m});if(!h&&(e=await (0,Y.executeAccess)({disableErrors:o,req:w},r.access.read),!1===e))return{docs:[],hasNextPage:!1,hasPrevPage:!1,limit:u,nextPage:null,page:1,pagingCounter:1,prevPage:null,totalDocs:0,totalPages:1};let S=f&&0!==u,k=u??10*!!S,T=p||1,N=(0,W.combineQueries)(C,e);(0,en.sanitizeWhereQuery)({fields:r.flattenedFields,payload:Q,where:N}),N=(0,ea.appendNonTrashedFilter)({enableTrash:r.trash,trash:E,where:N});let D=em({fields:n.config.flattenedFields,sort:b}),_=await er({collectionConfig:r,joins:d,overrideAccess:h,req:w});if((0,eo.hasDraftsEnabled)(r)&&l?(N=(0,eu.appendVersionToQueryKey)(N),await (0,J.validateQueryPaths)({collectionConfig:n.config,overrideAccess:h,req:w,versionFields:(0,ed.buildVersionCollectionFields)(Q.config,n.config,!0),where:(0,eu.appendVersionToQueryKey)(C)}),i=await Q.db.queryDrafts({collection:r.slug,joins:"GraphQL"!==w.payloadAPI&&_,limit:k,locale:B,page:T,pagination:S,req:w,select:(0,eh.getQueryDraftsSelect)({select:x}),sort:(0,eA.getQueryDraftsSort)({collectionConfig:r,sort:D}),where:N})):(await (0,J.validateQueryPaths)({collectionConfig:r,overrideAccess:h,req:w,where:C}),i=await Q.db.find({collection:r.slug,draftsEnabled:l,joins:"GraphQL"!==w.payloadAPI&&_,limit:k,locale:B,page:T,pagination:f,req:w,select:x,sort:D,where:N})),r.auth&&(i.docs=i.docs.map(e=>({...e,collection:r.slug}))),I)try{let e=r?.lockDocuments,t="object"==typeof e?e.duration:ey,n=1e3*t,s=new Date().getTime(),a=await Q.find({collection:A,depth:1,limit:k,overrideAccess:!1,pagination:!1,req:w,where:{and:[{"document.relationTo":{equals:r.slug}},{"document.value":{in:i.docs.map(e=>e.id)}},{updatedAt:{greater_than:new Date(s-n)}}]}}),o=(Array.isArray(a?.docs)?a.docs:[]).filter(e=>new Date(e?.updatedAt).getTime()+n>s);for(let e of i.docs){let t=o.find(t=>t?.document?.value===e.id);e._isLocked=!!t,e._userEditing=t?t?.user?.value:null}}catch(e){for(let e of i.docs)e._isLocked=!1,e._userEditing=null}return r?.hooks?.beforeRead?.length&&(i.docs=await Promise.all(i.docs.map(async e=>{let t=e;for(let e of r.hooks.beforeRead)t=await e({collection:r,context:w.context,doc:t,overrideAccess:h,query:N,req:w})||t;return t}))),i.docs=await Promise.all(i.docs.map(async e=>(0,es.afterRead)({collection:r,context:w.context,currentDepth:s,depth:a,doc:e,draft:l,fallbackLocale:v,findMany:!0,global:null,locale:B,overrideAccess:h,populate:g,req:w,select:x,showHiddenFields:y}))),r?.hooks?.afterRead?.length&&(i.docs=await Promise.all(i.docs.map(async e=>{let t=e;for(let e of r.hooks.afterRead)t=await e({collection:r,context:w.context,doc:t,findMany:!0,overrideAccess:h,query:N,req:w})||t;return t}))),i=await (0,ep.buildAfterOperation)({args:t,collection:r,operation:"find",overrideAccess:h,result:i})}catch(e){throw await (0,el.killTransaction)(t.req),e}};e.s(["findOperation",0,eb],990569);var eE=i,eC=r,ew=s,eI=_,ev=o,eB=n,eQ=d,ex=e.i(553095),eS=m,ek=C,eT=w,eN=T,eD=r;function e_(e){return e?.createdAt&&e?.updatedAt}var eR=m,eL=e.i(9051),eF=eu,eM=eh;let eO=async({accessResult:e,doc:t,entity:i,entityType:r,req:n,select:s})=>{let a,o,{locale:l,payload:c}=n,d={and:[{"version._status":{equals:"draft"}}]};(0,eR.hasLocalizeStatusEnabled)(i)&&("all"===l?d={and:[{or:(c.config.localization&&c.config.localization.localeCodes||[]).map(e=>({[`version._status.${e}`]:{equals:"draft"}}))}]}:l&&(d={and:[{[`version._status.${l}`]:{equals:"draft"}}]})),"collection"===r&&d.and.push({parent:{equals:t.id}}),e_(t)&&d.and.push({or:[{updatedAt:{greater_than:t.updatedAt}},{latest:{equals:!0}}]}),(0,eN.hasWhereAccessResult)(e)&&(a=(0,eF.appendVersionToQueryKey)(e));let u={collection:i.slug,global:i.slug,limit:1,locale:l,pagination:!1,req:n,select:(0,eM.getQueryDraftsSelect)({select:s}),sort:"-updatedAt",where:(0,eD.combineQueries)(d,a)},h=(o="global"===r?(await n.payload.db.findGlobalVersions(u)).docs:(await n.payload.db.findVersions(u)).docs)[0];return h?(h=(0,eL.sanitizeInternalFields)(h),"global"===r&&"globalType"in t&&(h.version.globalType=t.globalType),h.version||(h.version={}),h.version.id=t.id,h.version):t};var eU=Q,eP=x;let e$=async e=>{let t=e;try{let{id:e,collection:{config:i},currentDepth:r,depth:n,disableErrors:s,draft:a=!1,flattenLocales:o,includeLockStatus:l,joins:c,overrideAccess:d=!1,populate:u,req:{fallbackLocale:h,locale:p,t:f},req:g,select:m,showHiddenFields:y,trash:b=!1}=t=await (0,eP.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"read",overrideAccess:t.overrideAccess}),E=l&&g.payload.collections?.[A],C=(0,eT.sanitizeSelect)({fields:i.flattenedFields,forceSelect:i.forceSelect,select:m}),w=!!d||await (0,eE.executeAccess)({id:e,disableErrors:s,req:g},i.access.read);if(!1===w)return null;let I={id:{equals:e}},v=(0,eC.combineQueries)(I,w);v=(0,eQ.appendNonTrashedFilter)({enableTrash:i.trash,trash:b,where:v}),(0,ew.sanitizeWhereQuery)({fields:i.flattenedFields,payload:t.req.payload,where:v});let B=await er({collectionConfig:i,joins:c,overrideAccess:d,req:g});g.payload.collections[i.slug].customIDType&&await (0,eB.validateQueryPaths)({collectionConfig:i,overrideAccess:d,req:g,where:I});let Q=C;i.versions?.drafts&&a&&C&&"include"===(0,ex.getSelectMode)(C)&&(Q={...C,createdAt:!0,updatedAt:!0});let x={collection:i.slug,draftsEnabled:a,joins:"GraphQL"!==g.payloadAPI&&B,locale:p,req:{transactionID:g.transactionID},select:Q,where:v};if(!x.where?.and?.[0]?.id)throw new eI.NotFound(f);let S=await g.payload.db.findOne(x);if(!S&&!t.data){if(!s)throw new eI.NotFound(g.t);return null}let k=t.data??S;if(i.auth&&(k={...k,collection:i.slug}),E&&e){let t=null;try{let r=i?.lockDocuments,n=300,s="object"==typeof r?r.duration:n,a=1e3*s,o=await g.payload.find({collection:A,depth:1,limit:1,overrideAccess:!1,pagination:!1,req:g,where:{and:[{"document.relationTo":{equals:i.slug}},{"document.value":{equals:e}},{updatedAt:{greater_than:new Date(new Date().getTime()-a)}}]}});o&&o.docs.length>0&&(t=o.docs[0])}catch{}k._isLocked=!!t,k._userEditing=t?.user?.value??null}if(a&&(0,eS.hasDraftsEnabled)(i)&&(k=await eO({accessResult:w,doc:k,entity:i,entityType:"collection",overrideAccess:d,req:g,select:C})),i.hooks?.beforeRead?.length)for(let e of i.hooks.beforeRead)k=await e({collection:i,context:g.context,doc:k,overrideAccess:d,query:x.where,req:g})||k;if(k=await (0,ev.afterRead)({collection:i,context:g.context,currentDepth:r,depth:n,doc:k,draft:a,fallbackLocale:h,flattenLocales:o,global:null,locale:p,overrideAccess:d,populate:u,req:g,select:C,showHiddenFields:y}),i.hooks?.afterRead?.length)for(let e of i.hooks.afterRead)k=await e({collection:i,context:g.context,doc:k,overrideAccess:d,query:x.where,req:g})||k;return k=await (0,eU.buildAfterOperation)({args:t,collection:i,operation:"findByID",overrideAccess:d,result:k})}catch(e){throw await (0,ek.killTransaction)(t.req),e}};e.s(["findByIDOperation",0,e$],921065);var ej=t,eH=i,eq=r,ez=a,eV=D,eG=_,eY=o,eW=d,eJ=C,eK=w,eZ=ed,eX=eh,e0=Q,e1=x;let e2=async e=>{let{id:t,collection:{config:i},currentDepth:r,depth:n,disableErrors:s,overrideAccess:a,populate:o,req:{fallbackLocale:l,locale:c,payload:d},req:u,select:h,showHiddenFields:A,trash:p=!1}=e;if(!t)throw new ez.APIError("Missing ID of version.",ej.status.BAD_REQUEST);try{e=await (0,e1.buildBeforeOperation)({args:e,collection:i,operation:"findVersionByID",overrideAccess:a});let f=!!a||await (0,eH.executeAccess)({id:t,disableErrors:s,req:u},i.access.readVersions);if(!1===f)return null;let g="object"==typeof f,m={id:{equals:t}},y=(0,eq.combineQueries)(m,f);y=(0,eW.appendNonTrashedFilter)({deletedAtPath:"version.deletedAt",enableTrash:i.trash,trash:p,where:y});let b=(0,eK.sanitizeSelect)({fields:(0,eZ.buildVersionCollectionFields)(d.config,i,!0),forceSelect:(0,eX.getQueryDraftsSelect)({select:i.forceSelect}),select:h,versions:!0}),E=(await d.db.findVersions({collection:i.slug,limit:1,locale:c,pagination:!1,req:u,select:b,where:y})).docs[0];if(!E){if(!s){if(!g)throw new eG.NotFound(u.t);if(g)throw new eV.Forbidden(u.t)}return null}if(E.version||(E.version={}),i.hooks?.beforeRead?.length)for(let e of i.hooks.beforeRead)E.version=await e({collection:i,context:u.context,doc:E.version,overrideAccess:a,query:y,req:u})||E.version;if(E.version=await (0,eY.afterRead)({collection:i,context:u.context,currentDepth:r,depth:n,doc:E.version,draft:void 0,fallbackLocale:l,global:null,locale:c,overrideAccess:a,populate:o,req:u,select:"object"==typeof b?.version?b.version:void 0,showHiddenFields:A}),i.hooks?.afterRead?.length)for(let e of i.hooks.afterRead)E.version=await e({collection:i,context:u.context,doc:E.version,overrideAccess:a,query:y,req:u})||E.version;return E=await (0,e0.buildAfterOperation)({args:e,collection:i,operation:"findVersionByID",overrideAccess:a,result:E})}catch(e){throw await (0,eJ.killTransaction)(u),e}};e.s(["findVersionByIDOperation",0,e2],919915);var e4=i,e5=r,e3=n,e8=s,e9=o,e6=d,e7=C,te=eL,tt=w,ti=ed,tr=eh,tn=Q,ts=x;let ta=async e=>{try{let t,{collection:{config:i},depth:r,limit:n,overrideAccess:s,page:a,pagination:o=!0,populate:l,select:c,showHiddenFields:d,sort:u,trash:h=!1,where:A}=e=await (0,ts.buildBeforeOperation)({args:e,collection:e.collection.config,operation:"findVersions",overrideAccess:e.overrideAccess}),p=e.req,{fallbackLocale:f,locale:g,payload:m}=p;s||(t=await (0,e4.executeAccess)({req:p},i.access.readVersions));let y=(0,ti.buildVersionCollectionFields)(m.config,i,!0);await (0,e3.validateQueryPaths)({collectionConfig:i,overrideAccess:s,req:p,versionFields:y,where:A});let b=(0,e5.combineQueries)(A,t);b=(0,e6.appendNonTrashedFilter)({deletedAtPath:"version.deletedAt",enableTrash:i.trash,trash:h,where:b}),(0,e8.sanitizeWhereQuery)({fields:y,payload:m,where:b});let E=(0,tt.sanitizeSelect)({fields:y,forceSelect:(0,tr.getQueryDraftsSelect)({select:i.forceSelect}),select:c,versions:!0}),C=o&&0!==n,w=n??10*!!C,I=a||1,v=await m.db.findVersions({collection:i.slug,limit:w,locale:g,page:I,pagination:o,req:p,select:E,sort:u,where:b}),B=v;return B.docs=await Promise.all(v.docs.map(async e=>{let t=e;if(t.version||(t.version={}),i.hooks?.beforeRead?.length)for(let e of i.hooks.beforeRead)t.version=await e({collection:i,context:p.context,doc:t.version,overrideAccess:s,query:b,req:p})||t.version;return t})),B.docs=await Promise.all(B.docs.map(async e=>(e.version=await (0,e9.afterRead)({collection:i,context:p.context,depth:r,doc:e.version,draft:void 0,fallbackLocale:f,findMany:!0,global:null,locale:g,overrideAccess:s,populate:l,req:p,select:"object"==typeof E?.version?E.version:void 0,showHiddenFields:d}),e))),i.hooks.afterRead?.length&&(B.docs=await Promise.all(B.docs.map(async e=>{let t=e;for(let r of i.hooks.afterRead)t.version=await r({collection:i,context:p.context,doc:e.version,findMany:!0,overrideAccess:s,query:b,req:p})||e.version;return t}))),B.docs=B.docs.map(e=>(0,te.sanitizeInternalFields)(e)),B=await (0,tn.buildAfterOperation)({args:e,collection:i,operation:"findVersions",overrideAccess:s,result:B})}catch(t){throw await (0,e7.killTransaction)(e.req),t}};e.s(["findVersionsOperation",0,ta],322929);var to=t,tl=i,tc=T,td=r,tu=a,th=D,tA=_,tp=e.i(117429),tf=o,tg=e.i(212329),tm=e.i(148968),ty=g,tb=e.i(7651),tE=m,tC=y,tw=C,tI=w,tv=e.i(371031),tB=e.i(999733),tQ=Q,tx=x;let tS=async e=>{let{id:t,collection:{config:i},depth:r,draft:n=!1,overrideAccess:s=!1,populate:a,req:o,req:{fallbackLocale:l,locale:c,payload:d},select:u,showHiddenFields:h}=e;try{let A=!e.disableTransaction&&await (0,tC.initTransaction)(e.req);if(e=await (0,tx.buildBeforeOperation)({args:e,collection:e.collection.config,operation:"restoreVersion",overrideAccess:s}),!t)throw new tu.APIError("Missing ID of version to restore.",to.status.BAD_REQUEST);let{docs:p}=await o.payload.db.findVersions({collection:i.slug,limit:1,locale:"all",pagination:!1,req:o,where:{id:{equals:t}}}),[f]=p;if(!f)throw new tA.NotFound(o.t);let{parent:g,version:m}=f,y=!!s||await (0,tl.executeAccess)({id:g,req:o},i.access.update),b=(0,tc.hasWhereAccessResult)(y),E={collection:i.slug,locale:"all",req:o,where:(0,td.combineQueries)({id:{equals:g}},y)},C=await o.payload.db.findOne(E);if(!C&&!b)throw new tA.NotFound(o.t);if(!C&&b)throw new th.Forbidden(o.t);if(i.trash&&C?.deletedAt)throw new tu.APIError(`Cannot restore a version of a trashed document (ID: ${g}). Restore the document first.`,to.status.FORBIDDEN);let w=await (0,tv.getLatestCollectionVersion)({id:g,config:i,payload:d,query:E,req:o}),I=d.config.localization?d.config.localization.defaultLocale:c,v=await (0,tf.afterRead)({collection:i,context:o.context,depth:0,doc:(0,tb.deepCopyObjectSimple)(w),draft:n,fallbackLocale:null,global:null,locale:I,overrideAccess:!0,req:o,showHiddenFields:!0}),B=await (0,tf.afterRead)({collection:i,context:o.context,depth:0,doc:(0,tb.deepCopyObjectSimple)(f.version),draft:n,fallbackLocale:null,global:null,locale:I,overrideAccess:!0,req:o,showHiddenFields:!0}),Q=Object.assign(Object.create(o),o,{fallbackLocale:null,locale:I}),x=await (0,tm.beforeValidate)({id:g,collection:i,context:o.context,data:(0,tb.deepCopyObjectSimple)(B),doc:v,global:null,operation:"update",overrideAccess:s,req:Q});if(i.hooks?.beforeValidate?.length)for(let e of i.hooks.beforeValidate)x=await e({collection:i,context:o.context,data:x,operation:"update",originalDoc:v,req:Q})||x;if(i.hooks?.beforeChange?.length)for(let e of i.hooks.beforeChange)x=await e({collection:i,context:o.context,data:x,operation:"update",originalDoc:v,req:Q})||x;let S=await (0,tg.beforeChange)({id:g,collection:i,context:o.context,data:{...x,id:g},doc:v,docWithLocales:m,global:null,operation:"update",overrideAccess:s,req:Q,skipValidation:n&&!(0,tE.hasDraftValidationEnabled)(i)}),k=(0,tI.sanitizeSelect)({fields:i.flattenedFields,forceSelect:i.forceSelect,select:u});if(S.updatedAt=new Date().toISOString(),S._status=n?"draft":S._status,n||(S=await o.payload.db.updateOne({id:g,collection:i.slug,data:S,req:Q,select:k})),S=await (0,tB.saveVersion)({id:g,autosave:!1,collection:i,docWithLocales:S,draft:n,operation:"restoreVersion",payload:d,req:Q,select:k}),S=await (0,tf.afterRead)({collection:i,context:o.context,depth:r,doc:S,draft:void 0,fallbackLocale:l,global:null,locale:c,overrideAccess:s,populate:a,req:o,select:k,showHiddenFields:h}),i.hooks?.afterRead?.length)for(let e of i.hooks.afterRead)S=await e({collection:i,context:o.context,doc:S,overrideAccess:s,req:o})||S;if(S=await (0,tp.afterChange)({collection:i,context:o.context,data:S,doc:S,global:null,operation:"update",previousDoc:w,req:o}),i.hooks?.afterChange?.length)for(let e of i.hooks.afterChange)S=await e({collection:i,context:o.context,data:S,doc:S,operation:"update",overrideAccess:s,previousDoc:w,req:o})||S;return S=await (0,tQ.buildAfterOperation)({args:e,collection:i,operation:"restoreVersion",overrideAccess:s,result:S}),A&&await (0,ty.commitTransaction)(o),S}catch(e){throw await (0,tw.killTransaction)(o),e}};e.s(["restoreVersionOperation",0,tS],713278);var tk=t,tT=i,tN=r,tD=n,t_=s,tR=a,tL=tb,tF=e.i(563646),tM=e.i(361492),tO=d,tU=g,tP=m,t$=y,tj=C,tH=w,tq=ed,tz=eu,tV=eA,tG=Q,tY=x,tW=e.i(685147),tJ=e.i(911908),tK=tp,tZ=o,tX=tg,t0=tm,t1=tb,t2=tv,t4=tB,t5=c,t3=e.i(49703),t8=m,t9=e.i(186725);function t6(e){let t=new Set;for(let i of e)if((0,t9.fieldAffectsData)(i))t.add(i.name);else if("fields"in i&&Array.isArray(i.fields))for(let e of t6(i.fields))t.add(e);else if("tabs"===i.type)for(let e of i.tabs)if((0,t9.tabHasName)(e))t.add(e.name);else for(let i of t6(e.fields))t.add(i);return t}function t7({configBlockReferences:e,dataWithLocales:t,docWithLocales:i,fields:r,parentIsLocalized:n=!1,selectedLocales:s}){if(!i||"object"!=typeof i)return t||i;let a={...i};for(let o of r)if((0,t9.fieldAffectsData)(o)){if(n&&t[o.name]){a[o.name]=t[o.name];continue}let r=(0,t9.fieldShouldBeLocalized)({field:o,parentIsLocalized:n});switch(o.type){case"array":if(o.name in t){let l=t[o.name],c=i[o.name];if(r)if(l&&"object"==typeof l&&!Array.isArray(l)){let e={...c||{}};for(let t of s)t in l&&(e[t]=l[t]);a[o.name]=e}else a[o.name]=c;else Array.isArray(l)&&(a[o.name]=l.map((t,i)=>t7({configBlockReferences:e,dataWithLocales:t,docWithLocales:c?.[i]||{},fields:o.fields,parentIsLocalized:n,selectedLocales:s})))}break;case"blocks":if(o.name in t){let l=t[o.name],c=i[o.name];if(r)if(l&&"object"==typeof l&&!Array.isArray(l)){let e={...c||{}};for(let t of s)t in l&&(e[t]=l[t]);a[o.name]=e}else a[o.name]=c;else Array.isArray(l)&&(a[o.name]=l.map((t,i)=>{let r;if(e&&o.blockReferences)for(let i of o.blockReferences)r="string"==typeof i?e.find(e=>e.slug===t.blockType):i;else o.blocks&&(r=o.blocks.find(e=>e.slug===t.blockType));if(r){let a=t7({configBlockReferences:e,dataWithLocales:t,docWithLocales:Array.isArray(c)&&c[i]?c[i]:{},fields:r?.fields||[],parentIsLocalized:n,selectedLocales:s});return a.blockType=t.blockType,a.id=t.id,a.blockName=t.blockName,a}return t}))}break;case"group":if((0,t9.fieldAffectsData)(o)&&o.name&&o.name in t){let l=t[o.name],c=i[o.name];if(r)if(l&&"object"==typeof l&&!Array.isArray(l)){let e={...c||{}};for(let t of s)t in l&&"object"==typeof l[t]&&(e[t]=l[t]);a[o.name]=e}else a[o.name]=c;else"object"!=typeof l||Array.isArray(l)||(a[o.name]=t7({configBlockReferences:e,dataWithLocales:l,docWithLocales:c||{},fields:o.fields,parentIsLocalized:n,selectedLocales:s}))}break;default:if(r){if(o.name in t){let e=t[o.name],r=i[o.name]||{};if(e&&"object"==typeof e&&!Array.isArray(e)){let t={...r};for(let i of s)i in e&&(t[i]=e[i]);a[o.name]=t}else n?a[o.name]=e:a[o.name]=r}}else n?a[o.name]=t[o.name]:a[o.name]=o.name in t?t[o.name]:i[o.name]}}else switch(o.type){case"collapsible":case"group":case"row":{let r=t7({configBlockReferences:e,dataWithLocales:t,docWithLocales:i,fields:o.fields,parentIsLocalized:n,selectedLocales:s});for(let e of t6(o.fields))e in r&&(a[e]=r[e]);break}case"tabs":for(let r of o.tabs)if((0,t9.tabHasName)(r)){let o=(0,t9.fieldShouldBeLocalized)({field:r,parentIsLocalized:n});if(r.name in t){let l=t[r.name],c=i[r.name];if(o)if(l&&"object"==typeof l&&!Array.isArray(l)){let e={...c||{}};for(let t of s)t in l&&"object"==typeof l[t]&&(e[t]=l[t]);a[r.name]=e}else a[r.name]=c;else"object"!=typeof l||Array.isArray(l)||(a[r.name]=t7({configBlockReferences:e,dataWithLocales:l,docWithLocales:c||{},fields:r.fields,parentIsLocalized:n,selectedLocales:s}))}}else{let o=t7({configBlockReferences:e,dataWithLocales:t,docWithLocales:i,fields:r.fields,parentIsLocalized:n,selectedLocales:s});for(let e of t6(r.fields))e in o&&(a[e]=o[e])}}return a}let ie=async({id:e,autosave:t,collectionConfig:i,config:r,data:n,depth:s,docWithLocales:a,draftArg:o,fallbackLocale:l,filesToUpload:c,locale:d,overrideAccess:u,overrideLock:h,payload:A,populate:p,publishAllLocales:g,publishSpecificLocale:m,req:y,select:b,showHiddenFields:E,unpublishAllLocales:C})=>{let w,I=n?.password,v=!o&&(g??!(0,t8.hasLocalizeStatusEnabled)(i)),B="string"==typeof C?"true"===C:!!C,Q=!!(o&&(0,t8.hasDraftsEnabled)(i))&&"published"!==n._status&&!v,x=!!(I&&i.auth&&(!i.auth.disableLocalStrategy||"object"==typeof i.auth.disableLocalStrategy&&i.auth.disableLocalStrategy.enableFields)&&!Q);Q&&(n._status="draft"),await f({id:e,collectionSlug:i.slug,lockErrorMessage:`Document with ID ${e} is currently locked by another user and cannot be updated.`,overrideLock:h,req:y});let S=await (0,tZ.afterRead)({collection:i,context:y.context,depth:0,doc:(0,t1.deepCopyObjectSimple)(a),draft:o,fallbackLocale:e?null:l,global:null,locale:d,overrideAccess:!0,req:y,showHiddenFields:!0}),k=!!S?.deletedAt&&n?._status!=="published";if(i.auth&&(0,tW.ensureUsernameOrEmail)({authOptions:i.auth,collectionSlug:i.slug,data:n,operation:"update",originalDoc:S,req:y}),await (0,t5.deleteAssociatedFiles)({collectionConfig:i,config:r,doc:a,files:c,overrideDelete:!1,req:y}),n=await (0,t0.beforeValidate)({id:e,collection:i,context:y.context,data:n,doc:S,global:null,operation:"update",overrideAccess:u,req:y}),i.hooks?.beforeValidate?.length)for(let e of i.hooks.beforeValidate)n=await e({collection:i,context:y.context,data:n,operation:"update",originalDoc:S,req:y})||n;if(i.upload.disableLocalStorage||await (0,t3.uploadFiles)(A,c,y),i.hooks?.beforeChange?.length)for(let e of i.hooks.beforeChange)n=await e({collection:i,context:y.context,data:n,operation:"update",originalDoc:S,req:y})||n;let T={id:e,collection:i,context:y.context,data:{...n,id:e},doc:S,docWithLocales:a,global:null,operation:"update",overrideAccess:u,req:y,skipValidation:Q&&!(0,t8.hasDraftValidationEnabled)(i)||i.trash&&(!!n?.deletedAt||k)},N=await (0,tX.beforeChange)(T);if(r.localization&&i.versions){let t,n;if(i.versions.drafts&&i.versions.drafts.localizeStatus)if(v||B){let e=r.localization.localeCodes;for(let t of(r.localization.filterAvailableLocales&&(e=(await r.localization.filterAvailableLocales({locales:r.localization.locales,req:y})).map(e=>"string"==typeof e?e:e.code)),("object"!=typeof N._status||null===N._status)&&(N._status={}),e))N._status[t]=B?"draft":"published"}else Q||(n=await A.db.findOne({collection:i.slug,req:y,where:{id:{equals:e}}}),t=N);else m&&(n=await (0,t2.getLatestCollectionVersion)({id:e,config:i,payload:A,published:!0,query:{collection:i.slug,locale:"all",req:y,where:{id:{equals:e}}},req:y}),t={...N,_status:"draft"});t&&(w=(0,t1.deepCopyObjectSimple)(t||{}),N=t7({configBlockReferences:r.blocks,dataWithLocales:N||{},docWithLocales:n||{},fields:i.fields,selectedLocales:[d]}))}let D={...N};if(x&&"string"==typeof I){let{hash:e,salt:t}=await (0,tJ.generatePasswordSaltHash)({collection:i,password:I,req:y});D.salt=t,D.hash=e,delete D.password,delete n.password}if(Q||(D.updatedAt=new Date().toISOString(),N=await y.payload.db.updateOne({id:e,collection:i.slug,data:D,locale:d,req:y})),i.versions&&(N=await (0,t4.saveVersion)({id:e,autosave:t,collection:i,docWithLocales:N,draft:Q,operation:"update",payload:A,publishSpecificLocale:m,req:y,snapshot:w,unpublish:B})),N=await (0,tZ.afterRead)({collection:i,context:y.context,depth:s,doc:N,draft:o,fallbackLocale:l,global:null,locale:d,overrideAccess:u,populate:p,req:y,select:b,showHiddenFields:E}),i.hooks?.afterRead?.length)for(let e of i.hooks.afterRead)N=await e({collection:i,context:y.context,doc:N,overrideAccess:u,req:y})||N;if(N=await (0,tK.afterChange)({collection:i,context:y.context,data:n,doc:N,global:null,operation:"update",previousDoc:S,req:y}),i.hooks?.afterChange?.length)for(let e of i.hooks.afterChange)N=await e({collection:i,context:y.context,data:n,doc:N,operation:"update",overrideAccess:u,previousDoc:S,req:y})||N;return N},it=async e=>{let t=e;if(t.collection.config.disableBulkEdit&&!t.overrideAccess)throw new tR.APIError(`Collection ${t.collection.config.slug} has disabled bulk edit`,403);try{let e,i,r,n=!t.disableTransaction&&await (0,t$.initTransaction)(t.req),{autosave:s=!1,collection:{config:a},collection:o,depth:l,draft:c=!1,limit:d=0,overrideAccess:u,overrideLock:h,overwriteExistingFiles:A=!1,populate:p,publishAllLocales:f,publishSpecificLocale:g,req:{fallbackLocale:m,locale:y,payload:{config:b},payload:C},req:w,select:I,showHiddenFields:v,sort:B,trash:Q=!1,unpublishAllLocales:x,where:S}=t=await (0,tY.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"update",overrideAccess:t.overrideAccess});if(!S)throw new tR.APIError("Missing 'where' query of documents to update.",tk.status.BAD_REQUEST);let{data:k}=t,T=!!(c&&(0,tP.hasDraftsEnabled)(a));u||(e=await (0,tT.executeAccess)({req:w},a.access.update)),await (0,tD.validateQueryPaths)({collectionConfig:a,overrideAccess:u,req:w,where:S});let N=(0,tN.combineQueries)(S,e),D=a.trash&&"object"==typeof k&&null!==k&&"deletedAt"in k&&null!=k.deletedAt;if(D&&!u){let e=await (0,tT.executeAccess)({data:k,req:w},a.access.delete);N=(0,tN.combineQueries)(N,e)}N=(0,tO.appendNonTrashedFilter)({enableTrash:a.trash,trash:Q,where:N}),(0,t_.sanitizeWhereQuery)({fields:a.flattenedFields,payload:C,where:N});let _=em({fields:o.config.flattenedFields,sort:B});if((0,tP.hasDraftsEnabled)(a)&&(T||D)){let e=(0,tz.appendVersionToQueryKey)(N);await (0,tD.validateQueryPaths)({collectionConfig:o.config,overrideAccess:u,req:w,versionFields:(0,tq.buildVersionCollectionFields)(C.config,o.config,!0),where:(0,tz.appendVersionToQueryKey)(S)}),i=(await C.db.queryDrafts({collection:a.slug,limit:d,locale:y,pagination:!1,req:w,sort:(0,tV.getQueryDraftsSort)({collectionConfig:a,sort:_}),where:e})).docs}else i=(await C.db.find({collection:a.slug,limit:d,locale:y,pagination:!1,req:w,sort:_,where:N})).docs;let{data:R,files:L}=await (0,tF.generateFileData)({collection:o,config:b,data:k,operation:"update",overwriteExistingFiles:A,req:w,throwOnMissingFile:!1}),F=[],M=i.map(async e=>{let{id:t}=e;try{let i=!1;w.payload.db.bulkOperationsSingleTransaction&&(i=await (0,t$.initTransaction)(w));let r=(0,tH.sanitizeSelect)({fields:a.flattenedFields,forceSelect:a.forceSelect,select:I}),n=await ie({id:t,autosave:s,collectionConfig:a,config:b,data:(0,tL.deepCopyObjectSimple)(R),depth:l,docWithLocales:e,draftArg:c,fallbackLocale:m,filesToUpload:L,locale:y,overrideAccess:u,overrideLock:h,payload:C,populate:p,publishAllLocales:f,publishSpecificLocale:g,req:w,select:r,showHiddenFields:v,unpublishAllLocales:x});return a.auth&&(n={...n,collection:a.slug}),i&&await (0,tU.commitTransaction)(w),n}catch(i){let e=i instanceof Error&&E(i,b);w.payload.db.bulkOperationsSingleTransaction&&await (0,tj.killTransaction)(w),F.push({id:t,isPublic:e,message:i instanceof Error?i.message:"Unknown error"})}return null});if(await (0,tM.unlinkTempFiles)({collectionConfig:a,config:b,req:w}),w.payload.db.bulkOperationsSingleTransaction)for(let e of(r=[],M))r.push(await e);else r=await Promise.all(M);let O={docs:r.filter(Boolean),errors:F};return O=await (0,tG.buildAfterOperation)({args:t,collection:a,operation:"update",overrideAccess:u,result:O}),n&&await (0,tU.commitTransaction)(w),O}catch(e){throw await (0,tj.killTransaction)(t.req),e}};e.s(["updateOperation",0,it],360918);var ii=t,ir=i,is=T,ia=r,io=a,il=D,ic=_,id=tb,iu=tF,ih=tM,iA=d,ip=g,ig=y,im=C,iy=w,ib=tv,iE=Q,iC=x;let iw=async e=>{let t=e;try{let e=!t.disableTransaction&&await (0,ig.initTransaction)(t.req);(t=await (0,iC.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"update",overrideAccess:t.overrideAccess})).publishSpecificLocale&&(t.req.locale=t.publishSpecificLocale);let{id:i,autosave:r=!1,collection:{config:n},collection:s,depth:a,draft:o=!1,overrideAccess:l,overrideLock:c,overwriteExistingFiles:d=!1,populate:u,publishAllLocales:h,publishSpecificLocale:A,req:{fallbackLocale:p,locale:f,payload:{config:g},payload:m},req:y,select:b,showHiddenFields:E,trash:C=!1,unpublishAllLocales:w}=t;if(!i)throw new io.APIError("Missing ID of document to update.",ii.status.BAD_REQUEST);let{data:I}=t,v=!!l||await (0,ir.executeAccess)({id:i,data:I,req:y},n.access.update),B=(0,is.hasWhereAccessResult)(v),Q={id:{equals:i}},x=(0,ia.combineQueries)(Q,v);if(n.trash&&"object"==typeof I&&null!==I&&"deletedAt"in I&&null!=I.deletedAt&&!l){let e=await (0,ir.executeAccess)({data:I,req:y},n.access.delete);x=(0,ia.combineQueries)(x,e)}x=(0,iA.appendNonTrashedFilter)({enableTrash:n.trash,trash:C,where:x});let S={collection:n.slug,locale:f,req:y,where:x},k=await (0,ib.getLatestCollectionVersion)({id:i,config:n,payload:m,query:S,req:y});if(!k&&!B)throw new ic.NotFound(y.t);if(!k&&B)throw new il.Forbidden(y.t);if(!k)throw new ic.NotFound(y.t);let{data:T,files:N}=await (0,iu.generateFileData)({collection:s,config:g,data:I,operation:"update",overwriteExistingFiles:d,req:y,throwOnMissingFile:!1}),D=(0,iy.sanitizeSelect)({fields:n.flattenedFields,forceSelect:n.forceSelect,select:b}),_=await ie({id:i,autosave:r,collectionConfig:n,config:g,data:(0,id.deepCopyObjectSimple)(T),depth:a,docWithLocales:k,draftArg:o,fallbackLocale:p,filesToUpload:N,locale:f,overrideAccess:l,overrideLock:c,payload:m,populate:u,publishAllLocales:h,publishSpecificLocale:A,req:y,select:D,showHiddenFields:E,unpublishAllLocales:w});return n.auth&&(_={..._,collection:n.slug}),await (0,ih.unlinkTempFiles)({collectionConfig:n,config:g,req:y}),_=await (0,iE.buildAfterOperation)({args:t,collection:n,operation:"updateByID",overrideAccess:l,result:_}),e&&await (0,ip.commitTransaction)(y),_}catch(e){throw await (0,im.killTransaction)(t.req),e}};e.s(["updateByIDOperation",0,iw],565058);var iI=i,iv=_,iB=o,iQ=ex,ix=m,iS=C,ik=w;let iT=async e=>{let{slug:t,depth:i,draft:r=!1,flattenLocales:n,globalConfig:s,includeLockStatus:a,overrideAccess:o=!1,populate:l,req:{fallbackLocale:c,locale:d},req:u,select:h,showHiddenFields:p}=e,f=a&&u.payload.collections?.[A];try{let a;if(s.hooks?.beforeOperation?.length)for(let t of s.hooks.beforeOperation)e=await t({args:e,context:e.req.context,global:s,operation:"read",overrideAccess:o,req:e.req})||e;if(o||(a=await (0,iI.executeAccess)({req:u},s.access.read)),!1===a)throw new iv.NotFound(u.t);let g=(0,ik.sanitizeSelect)({fields:s.flattenedFields,forceSelect:s.forceSelect,select:h}),m=g;s.versions?.drafts&&r&&g&&"include"===(0,iQ.getSelectMode)(g)&&(m={...g,createdAt:!0,updatedAt:!0});let y=await u.payload.db.findGlobal({slug:t,locale:d,req:u,select:m,where:o?void 0:a}),b=y&&Object.keys(y).length>0;if(!b&&!e.data&&!o&&!0!==a)return{};let E=e.data??(b?y:null)??{};if(f&&t){let e=null;try{let i=s?.lockDocuments,r=300,n="object"==typeof i?i.duration:r,a=1e3*n,o=await u.payload.find({collection:A,depth:1,limit:1,overrideAccess:!1,pagination:!1,req:u,where:{and:[{globalSlug:{equals:t}},{updatedAt:{greater_than:new Date(new Date().getTime()-a)}}]}});o&&o.docs.length>0&&(e=o.docs[0])}catch{}E._isLocked=!!e,E._userEditing=e?.user?.value??null}if(r&&(0,ix.hasDraftsEnabled)(s)&&(E=await eO({accessResult:a,doc:E,entity:s,entityType:"global",overrideAccess:o,req:u,select:g})),s.hooks?.beforeRead?.length)for(let e of s.hooks.beforeRead)E=await e({context:u.context,doc:E,global:s,overrideAccess:o,req:u})||E;if(g&&E.globalType){let e=(0,iQ.getSelectMode)(g);("include"!==e||g.globalType)&&("exclude"!==e||!1!==g.globalType)||delete E.globalType}if(E=await (0,iB.afterRead)({collection:null,context:u.context,depth:i,doc:E,draft:r,fallbackLocale:c,flattenLocales:n,global:s,locale:d,overrideAccess:o,populate:l,req:u,select:g,showHiddenFields:p}),s.hooks?.afterRead?.length)for(let e of s.hooks.afterRead)E=await e({context:u.context,doc:E,global:s,overrideAccess:o,req:u})||E;return E}catch(e){throw await (0,iS.killTransaction)(u),e}};e.s(["findOneOperation",0,iT],397903);var iN=i,iD=r,i_=D,iR=_,iL=o,iF=tb,iM=C,iO=w,iU=e.i(201803),iP=eh;let i$=async e=>{let{id:t,currentDepth:i,depth:r,disableErrors:n,globalConfig:s,overrideAccess:a,populate:o,req:{fallbackLocale:l,locale:c,payload:d},req:u,select:h,showHiddenFields:A}=e;try{let e=!!a||await (0,iN.executeAccess)({id:t,disableErrors:n,req:u},s.access.readVersions);if(!1===e)return null;let p="object"==typeof e,f=(0,iO.sanitizeSelect)({fields:(0,iU.buildVersionGlobalFields)(d.config,s,!0),forceSelect:(0,iP.getQueryDraftsSelect)({select:s.forceSelect}),select:h,versions:!0}),g={global:s.slug,limit:1,locale:c,req:u,select:f,where:(0,iD.combineQueries)({id:{equals:t}},e)};if(!g.where?.and?.[0]?.id)throw new iR.NotFound(u.t);let{docs:m}=await d.db.findGlobalVersions(g);if(!m||m?.length===0){if(!n){if(!p)throw new iR.NotFound(u.t);if(p)throw new i_.Forbidden(u.t)}return null}let y=(0,iF.deepCopyObjectSimple)(m[0]);if(y.version||(y.version={}),y.version.globalType=s.slug,s.hooks?.beforeRead?.length)for(let e of s.hooks.beforeRead)y=await e({context:u.context,doc:y.version,global:s,overrideAccess:a,req:u})||y.version;if(y.version=await (0,iL.afterRead)({collection:null,context:u.context,currentDepth:i,depth:r,doc:y.version,draft:void 0,fallbackLocale:l,global:s,locale:c,overrideAccess:a,populate:o,req:u,select:"object"==typeof f?.version?f.version:void 0,showHiddenFields:A}),s.hooks?.afterRead?.length)for(let e of s.hooks.afterRead)y.version=await e({context:u.context,doc:y.version,global:s,overrideAccess:a,query:g.where,req:u})||y.version;return y}catch(e){throw await (0,iM.killTransaction)(u),e}};e.s(["findVersionByIDOperation",0,i$],215010);var ij=i,iH=r,iq=n,iz=o,iV=C,iG=eL,iY=w,iW=iU,iJ=eh;let iK=async e=>{let{depth:t,globalConfig:i,limit:r,overrideAccess:n,page:s,pagination:a=!0,populate:o,select:l,showHiddenFields:c,sort:d,where:u}=e,h=e.req,{fallbackLocale:A,locale:p,payload:f}=h,g=(0,iW.buildVersionGlobalFields)(f.config,i,!0);try{let e=!!n||await (0,ij.executeAccess)({req:h},i.access.readVersions);await (0,iq.validateQueryPaths)({globalConfig:i,overrideAccess:n,req:h,versionFields:g,where:u});let m=(0,iH.combineQueries)(u,e),y=(0,iY.sanitizeSelect)({fields:(0,iW.buildVersionGlobalFields)(f.config,i,!0),forceSelect:(0,iJ.getQueryDraftsSelect)({select:i.forceSelect}),select:l,versions:!0}),b=a&&0!==r,E=r??10*!!b,C=s||1,w=await f.db.findGlobalVersions({global:i.slug,limit:E,locale:p,page:C,pagination:a,req:h,select:y,sort:d,where:m}),I={...w,docs:await Promise.all(w.docs.map(async e=>(e.version||(e.version={}),{...e,version:await (0,iz.afterRead)({collection:null,context:h.context,depth:t,doc:{...e.version,globalType:i.slug},draft:void 0,fallbackLocale:A,findMany:!0,global:i,locale:p,overrideAccess:n,populate:o,req:h,select:y,showHiddenFields:c})})))};return i.hooks?.afterRead?.length&&(I.docs=await Promise.all(I.docs.map(async e=>{let t=e;for(let r of i.hooks.afterRead)t.version=await r({context:h.context,doc:e.version,findMany:!0,global:i,overrideAccess:n,query:m,req:h})||e.version;return t}))),I={...I,docs:I.docs.map(e=>(0,iG.sanitizeInternalFields)(e))}}catch(e){throw await (0,iV.killTransaction)(h),e}};e.s(["findVersionsOperation",0,iK],826948);var iZ=i,iX=_,i0=tp,i1=o,i2=g,i4=y,i5=C;let i3=async e=>{let{id:t,depth:i,draft:r,globalConfig:n,overrideAccess:s,populate:a,showHiddenFields:o}=e,l=e.req,{fallbackLocale:c,locale:d,payload:u}=l;try{let h=await (0,i4.initTransaction)(l);if(n.hooks?.beforeOperation?.length)for(let t of n.hooks.beforeOperation)e=await t({args:e,context:l.context,global:n,operation:"restoreVersion",overrideAccess:s,req:l})||e;s||await (0,iZ.executeAccess)({req:l},n.access.update);let{docs:A}=await u.db.findGlobalVersions({global:n.slug,limit:1,req:l,where:{id:{equals:t}}});if(!A||0===A.length)throw new iX.NotFound(l.t);let p=A[0];p.version.globalType=n.slug,r&&(p.version._status="draft");let f=await u.findGlobal({slug:n.slug,depth:i,req:l}),g=await u.db.findGlobal({slug:n.slug,req:l}),m=p.version;if(g){m.updatedAt=new Date().toISOString(),m=await u.db.updateGlobal({slug:n.slug,data:m,req:l});let e=new Date().toISOString();m=await u.db.createGlobalVersion({autosave:!1,createdAt:m.createdAt?new Date(m.createdAt).toISOString():e,globalSlug:n.slug,req:l,updatedAt:r?e:new Date(m.updatedAt).toISOString(),versionData:m})}else m=await u.db.createGlobal({slug:n.slug,data:m,req:l});if(m=await (0,i1.afterRead)({collection:null,context:l.context,depth:i,doc:m,draft:void 0,fallbackLocale:c,global:n,locale:d,overrideAccess:s,populate:a,req:l,showHiddenFields:o}),n.hooks?.afterRead?.length)for(let e of n.hooks.afterRead)m=await e({context:l.context,doc:m,global:n,overrideAccess:s,req:l})||m;if(m=await (0,i0.afterChange)({collection:null,context:l.context,data:m,doc:m,global:n,operation:"update",previousDoc:f,req:l}),n.hooks?.afterChange?.length)for(let e of n.hooks.afterChange)m=await e({context:l.context,data:m,doc:m,global:n,overrideAccess:s,previousDoc:f,req:l})||m;return h&&await (0,i2.commitTransaction)(l),m}catch(e){throw await (0,i5.killTransaction)(l),e}};e.s(["restoreVersionOperation",0,i3],885923);var i8=i,i9=tp,i6=o,i7=tg,re=tm,rt=tb,ri=g,rr=ex,rn=m,rs=y,ra=C,ro=w,rl=m;let rc=async({slug:e,config:t,locale:i,payload:r,published:n,req:s,where:a})=>{let o,l=n?{"version._status":{equals:"published"}}:{latest:{equals:!0}};(0,rl.hasDraftsEnabled)(t)&&(o=(await r.db.findGlobalVersions({global:e,limit:1,locale:i||s?.locale||void 0,pagination:!1,req:s,where:l})).docs[0]);let c=await r.db.findGlobal({slug:e,locale:i,req:s,where:a}),d=!!c;return o?(o.version.createdAt||(o.version.createdAt=o.createdAt),o.version.updatedAt||(o.version.updatedAt=o.updatedAt),{global:o.version,globalExists:d}):{global:c,globalExists:d}};var rd=tB;let ru=async e=>{e.publishSpecificLocale&&(e.req.locale=e.publishSpecificLocale);let{slug:t,autosave:i,depth:r,disableTransaction:n,draft:s,globalConfig:a,overrideAccess:o,overrideLock:l,populate:c,publishAllLocales:d,publishSpecificLocale:u,req:{fallbackLocale:h,locale:A,payload:p,payload:{config:g}={}},req:m,select:y,showHiddenFields:b,unpublishAllLocales:E}=e;try{let C,w=!n&&await (0,rs.initTransaction)(m);if(a.hooks?.beforeOperation?.length)for(let t of a.hooks.beforeOperation)e=await t({args:e,context:e.req.context,global:a,operation:"update",overrideAccess:o,req:e.req})||e;let{data:I}=e,v=!s&&(d??!(0,rn.hasLocalizeStatusEnabled)(a)),B="string"==typeof E?"true"===E:!!E,Q=!!(s&&(0,rn.hasDraftsEnabled)(a))&&"published"!==I._status&&!v;Q&&(I._status="draft");let x=!!o||await (0,i8.executeAccess)({data:I,req:m},a.access.update),S=o?void 0:x,k=await rc({slug:t,config:a,locale:A,payload:p,req:m,where:S}),{global:T,globalExists:N}=k||{},D={};k&&k.global&&(D=(0,rt.deepCopyObjectSimple)(T))._id&&delete D._id;let _=await (0,i6.afterRead)({collection:null,context:m.context,depth:0,doc:(0,rt.deepCopyObjectSimple)(D),draft:s,fallbackLocale:h,global:a,locale:A,overrideAccess:!0,req:m,showHiddenFields:b});if(await f({globalSlug:t,lockErrorMessage:`Global with slug "${t}" is currently locked by another user and cannot be updated.`,overrideLock:l,req:m}),I=await (0,re.beforeValidate)({collection:null,context:m.context,data:I,doc:_,global:a,operation:"update",overrideAccess:o,req:m}),a.hooks?.beforeValidate?.length)for(let e of a.hooks.beforeValidate)I=await e({context:m.context,data:I,global:a,originalDoc:_,overrideAccess:o,req:m})||I;if(a.hooks?.beforeChange?.length)for(let e of a.hooks.beforeChange)I=await e({context:m.context,data:I,global:a,originalDoc:_,overrideAccess:o,req:m})||I;let R={collection:null,context:m.context,data:I,doc:_,docWithLocales:D,global:a,operation:"update",req:m,skipValidation:Q&&!(0,rn.hasDraftValidationEnabled)(a)},L=await (0,i7.beforeChange)(R);if(g&&g.localization&&a.versions){let e,i=null;if(a.versions.drafts&&a.versions.drafts.localizeStatus)if(v||B){let e=g.localization.localeCodes;for(let t of(g.localization.filterAvailableLocales&&(e=(await g.localization.filterAvailableLocales({locales:g.localization.locales,req:m})).map(e=>"string"==typeof e?e:e.code)),("object"!=typeof L._status||null===L._status)&&(L._status={}),e))L._status[t]=B?"draft":"published"}else Q||(i=await p.db.findGlobal({slug:a.slug,req:m,where:S}),e=L);else u&&(i=(await rc({slug:t,config:a,payload:p,published:!0,req:m,where:S})).global,e={...L,_status:"draft"});e&&(C=(0,rt.deepCopyObjectSimple)(e),L=t7({configBlockReferences:g.blocks,dataWithLocales:L||{},docWithLocales:i||{},fields:a.fields,selectedLocales:[A]}))}let F=(0,ro.sanitizeSelect)({fields:a.flattenedFields,forceSelect:a.forceSelect,select:y});if(!Q){let e=new Date().toISOString();L.createdAt||(L.createdAt=e),L.updatedAt=e,L=N?await p.db.updateGlobal({slug:t,data:L,req:m,select:F}):await p.db.createGlobal({slug:t,data:L,req:m})}if(a.versions){let{globalType:e}=L;L={...L=await (0,rd.saveVersion)({autosave:i,docWithLocales:L,draft:Q,global:a,operation:"update",payload:p,publishSpecificLocale:u,req:m,select:F,snapshot:C,unpublish:B}),globalType:e}}if(F&&L.globalType){let e=(0,rr.getSelectMode)(F);("include"!==e||F.globalType)&&("exclude"!==e||!1!==F.globalType)||delete L.globalType}if(L=await (0,i6.afterRead)({collection:null,context:m.context,depth:r,doc:L,draft:s,fallbackLocale:null,global:a,locale:A,overrideAccess:o,populate:c,req:m,select:F,showHiddenFields:b}),a.hooks?.afterRead?.length)for(let e of a.hooks.afterRead)L=await e({context:m.context,doc:L,global:a,overrideAccess:o,req:m})||L;if(L=await (0,i9.afterChange)({collection:null,context:m.context,data:I,doc:L,global:a,operation:"update",previousDoc:_,req:m}),a.hooks?.afterChange?.length)for(let e of a.hooks.afterChange)L=await e({context:m.context,data:I,doc:L,global:a,overrideAccess:o,previousDoc:_,req:m})||L;return w&&await (0,ri.commitTransaction)(m),L}catch(e){throw await (0,ra.killTransaction)(m),e}};e.s(["updateOperation",0,ru],964530)},682988,373250,e=>{"use strict";let t=async t=>{let i;switch(t){case"ar":i=(await e.A(116489)).ar;break;case"az":i=(await e.A(520922)).az;break;case"bg":i=(await e.A(310708)).bg;break;case"bn-BD":case"bn-IN":i=(await e.A(947654)).bn;break;case"ca":i=(await e.A(42361)).ca;break;case"cs":i=(await e.A(966547)).cs;break;case"da":i=(await e.A(158493)).da;break;case"de":i=(await e.A(18874)).de;break;case"en-US":i=(await e.A(597146)).enUS;break;case"es":i=(await e.A(347915)).es;break;case"et":i=(await e.A(443935)).et;break;case"fa-IR":i=(await e.A(459206)).faIR;break;case"fr":i=(await e.A(246116)).fr;break;case"he":i=(await e.A(435896)).he;break;case"hr":i=(await e.A(842338)).hr;break;case"hu":i=(await e.A(999282)).hu;break;case"id":i=(await e.A(30426)).id;break;case"is":i=(await e.A(447801)).is;break;case"it":i=(await e.A(74536)).it;break;case"ja":i=(await e.A(88904)).ja;break;case"ko":i=(await e.A(798815)).ko;break;case"lt":i=(await e.A(746586)).lt;break;case"lv":i=(await e.A(420975)).lv;break;case"nb":i=(await e.A(116621)).nb;break;case"nl":i=(await e.A(963516)).nl;break;case"pl":i=(await e.A(845334)).pl;break;case"pt":i=(await e.A(679062)).pt;break;case"ro":i=(await e.A(755034)).ro;break;case"rs":i=(await e.A(867626)).sr;break;case"rs-Latin":i=(await e.A(184533)).srLatn;break;case"ru":i=(await e.A(495983)).ru;break;case"sk":i=(await e.A(146717)).sk;break;case"sl-SI":i=(await e.A(873832)).sl;break;case"sv":i=(await e.A(422442)).sv;break;case"ta":i=(await e.A(245980)).ta;break;case"th":i=(await e.A(504813)).th;break;case"tr":i=(await e.A(266624)).tr;break;case"uk":i=(await e.A(571506)).uk;break;case"vi":i=(await e.A(127865)).vi;break;case"zh-CN":i=(await e.A(143719)).zhCN;break;case"zh-TW":i=(await e.A(67076)).zhTW}return i?.default?i.default:i};var i=e.i(542327);let r=["authentication:account","authentication:accountOfCurrentUser","authentication:accountVerified","authentication:alreadyActivated","authentication:alreadyLoggedIn","authentication:apiKey","authentication:authenticated","authentication:backToLogin","authentication:beginCreateFirstUser","authentication:changePassword","authentication:checkYourEmailForPasswordReset","authentication:confirmGeneration","authentication:confirmPassword","authentication:createFirstUser","authentication:emailNotValid","authentication:usernameNotValid","authentication:emailOrUsername","authentication:emailSent","authentication:emailVerified","authentication:enableAPIKey","authentication:failedToUnlock","authentication:forceUnlock","authentication:forgotPassword","authentication:forgotPasswordEmailInstructions","authentication:forgotPasswordUsernameInstructions","authentication:forgotPasswordQuestion","authentication:generate","authentication:generateNewAPIKey","authentication:generatingNewAPIKeyWillInvalidate","authentication:logBackIn","authentication:loggedOutInactivity","authentication:loggedOutSuccessfully","authentication:loggingOut","authentication:login","authentication:logOut","authentication:loggedIn","authentication:loggedInChangePassword","authentication:logout","authentication:logoutUser","authentication:logoutSuccessful","authentication:newAPIKeyGenerated","authentication:newPassword","authentication:passed","authentication:passwordResetSuccessfully","authentication:resetPassword","authentication:stayLoggedIn","authentication:successfullyRegisteredFirstUser","authentication:successfullyUnlocked","authentication:username","authentication:unableToVerify","authentication:tokenRefreshSuccessful","authentication:verified","authentication:verifiedSuccessfully","authentication:verify","authentication:verifyUser","authentication:youAreInactive","dashboard:addWidget","dashboard:deleteWidget","dashboard:searchWidgets","dashboard:editDashboard","dashboard:editingDashboard","dashboard:resetLayout","dashboard:addButton","dashboard:discardConfirmLabel","dashboard:discardMessage","dashboard:discardTitle","dashboard:noItems","error:autosaving","error:correctInvalidFields","error:deletingTitle","error:documentNotFound","error:emailOrPasswordIncorrect","error:usernameOrPasswordIncorrect","error:loadingDocument","error:insufficientClipboardPermissions","error:invalidClipboardData","error:invalidRequestArgs","error:invalidFileType","error:logoutFailed","error:noMatchedField","error:notAllowedToAccessPage","error:notAllowedToPerformAction","error:previewing","error:unableToCopy","error:unableToDeleteCount","error:unableToReindexCollection","error:unableToUpdateCount","error:unauthorized","error:unauthorizedAdmin","error:unknown","error:unspecific","error:unverifiedEmail","error:userEmailAlreadyRegistered","error:usernameAlreadyRegistered","error:tokenNotProvided","error:unPublishingDocument","error:revertingDocument","error:problemUploadingFile","error:restoringTitle","error:failedToSaveLayout","error:failedToResetLayout","fields:addLabel","fields:addLink","fields:addNew","fields:addNewLabel","fields:addRelationship","fields:addUpload","fields:block","fields:blocks","fields:blockType","fields:chooseBetweenCustomTextOrDocument","fields:customURL","fields:chooseDocumentToLink","fields:openInNewTab","fields:enterURL","fields:internalLink","fields:chooseFromExisting","fields:linkType","fields:textToDisplay","fields:searchForLanguage","fields:collapseAll","fields:editLink","fields:editRelationship","fields:itemsAndMore","fields:labelRelationship","fields:latitude","fields:linkedTo","fields:longitude","fields:passwordsDoNotMatch","fields:removeRelationship","fields:removeUpload","fields:saveChanges","fields:searchForBlock","fields:selectFieldsToEdit","fields:showAll","fields:swapRelationship","fields:swapUpload","fields:toggleBlock","fields:uploadNewLabel","folder:byFolder","folder:browseByFolder","folder:deleteFolder","folder:folders","folder:folderTypeDescription","folder:folderName","folder:itemsMovedToFolder","folder:itemsMovedToRoot","folder:itemHasBeenMoved","folder:itemHasBeenMovedToRoot","folder:moveFolder","folder:movingFromFolder","folder:moveItemsToFolderConfirmation","folder:moveItemsToRootConfirmation","folder:moveItemToFolderConfirmation","folder:moveItemToRootConfirmation","folder:noFolder","folder:newFolder","folder:renameFolder","folder:searchByNameInFolder","folder:selectFolderForItem","general:all","general:aboutToDeleteCount","general:aboutToDelete","general:aboutToPermanentlyDelete","general:aboutToPermanentlyDeleteTrash","general:aboutToRestore","general:aboutToRestoreAsDraft","general:aboutToRestoreAsDraftCount","general:aboutToRestoreCount","general:aboutToTrash","general:aboutToTrashCount","general:addBelow","general:addFilter","general:adminTheme","general:allCollections","general:and","general:anotherUser","general:anotherUserTakenOver","general:applyChanges","general:ascending","general:automatic","general:backToDashboard","general:cancel","general:changesNotSaved","general:close","general:collapse","general:collections","general:confirmMove","general:yes","general:no","general:columns","general:columnToSort","general:confirm","general:confirmCopy","general:confirmDeletion","general:confirmDuplication","general:confirmReindex","general:confirmReindexAll","general:confirmReindexDescription","general:confirmReindexDescriptionAll","general:confirmRestoration","general:copied","general:clear","general:clearAll","general:copy","general:copyField","general:copyRow","general:copyWarning","general:copying","general:create","general:created","general:createdAt","general:createNew","general:createNewLabel","general:creating","general:creatingNewLabel","general:currentlyEditing","general:custom","general:dark","general:dashboard","general:delete","general:deleted","general:deletedAt","general:deletePermanently","general:deleteLabel","general:deletedSuccessfully","general:deletedCountSuccessfully","general:deleting","general:descending","general:depth","general:deselectAllRows","general:document","general:documentIsTrashed","general:documentLocked","general:documentModified","general:documentOutOfDate","general:documents","general:duplicate","general:duplicateWithoutSaving","general:edit","general:editAll","general:editing","general:editingLabel","general:editingTakenOver","general:editLabel","general:editedSince","general:email","general:emailAddress","general:emptyTrash","general:emptyTrashLabel","general:enterAValue","general:error","general:errors","general:fallbackToDefaultLocale","general:false","general:filters","general:filterWhere","general:globals","general:goBack","general:groupByLabel","general:isEditing","general:item","general:items","general:language","general:lastModified","general:layout","general:leaveAnyway","general:leaveWithoutSaving","general:light","general:livePreview","general:lock","general:exitLivePreview","general:loading","general:locale","general:locales","general:menu","general:moreOptions","general:move","general:moveConfirm","general:moveCount","general:moveDown","general:moveUp","general:moving","general:movingCount","general:name","general:next","general:newLabel","general:noDateSelected","general:noFiltersSet","general:noLabel","general:none","general:noOptions","general:noResults","general:noResultsDescription","general:noResultsFound","general:notFound","general:nothingFound","general:noTrashResults","general:noUpcomingEventsScheduled","general:noValue","general:of","general:open","general:only","general:or","general:order","general:overwriteExistingData","general:pageNotFound","general:password","general:pasteField","general:pasteRow","general:payloadSettings","general:permanentlyDelete","general:permanentlyDeletedCountSuccessfully","general:perPage","general:previous","general:reindex","general:reindexingAll","general:reloadDocument","general:remove","general:rename","general:reset","general:resetPreferences","general:resetPreferencesDescription","general:resettingPreferences","general:restore","general:restoreAsPublished","general:restoredCountSuccessfully","general:restoring","general:row","general:rows","general:save","general:saveChanges","general:schedulePublishFor","general:saving","general:searchBy","general:select","general:selectAll","general:selectAllRows","general:selectedCount","general:selectLabel","general:selectValue","general:showAllLabel","general:sorryNotFound","general:sort","general:sortByLabelDirection","general:stayOnThisPage","general:submissionSuccessful","general:submit","general:submitting","general:success","general:successfullyCreated","general:successfullyDuplicated","general:successfullyReindexed","general:takeOver","general:thisLanguage","general:time","general:timezone","general:titleDeleted","general:titleTrashed","general:titleRestored","general:trash","general:trashedCountSuccessfully","general:import","general:export","general:allLocales","general:true","general:upcomingEvents","general:users","general:user","general:username","general:unauthorized","general:unlock","general:unsavedChanges","general:unsavedChangesDuplicate","general:untitled","general:updatedAt","general:updatedLabelSuccessfully","general:updatedCountSuccessfully","general:updateForEveryone","general:updatedSuccessfully","general:updating","general:value","general:viewing","general:viewReadOnly","general:uploading","general:uploadingBulk","general:welcome","localization:localeToPublish","localization:copyToLocale","localization:copyFromTo","localization:selectedLocales","localization:selectLocaleToCopy","localization:selectLocaleToDuplicate","localization:cannotCopySameLocale","localization:copyFrom","localization:copyTo","operators:equals","operators:exists","operators:isNotIn","operators:isIn","operators:contains","operators:isLike","operators:isNotLike","operators:isNotEqualTo","operators:near","operators:isGreaterThan","operators:isLessThan","operators:isGreaterThanOrEqualTo","operators:isLessThanOrEqualTo","operators:within","operators:intersects","upload:addFile","upload:addFiles","upload:bulkUpload","upload:crop","upload:cropToolDescription","upload:dragAndDrop","upload:editImage","upload:fileToUpload","upload:filesToUpload","upload:focalPoint","upload:focalPointDescription","upload:height","upload:pasteURL","upload:previewSizes","upload:selectCollectionToBrowse","upload:selectFile","upload:setCropArea","upload:setFocalPoint","upload:sizesFor","upload:sizes","upload:width","upload:fileName","upload:fileSize","upload:noFile","upload:download","validation:emailAddress","validation:enterNumber","validation:fieldHasNo","validation:greaterThanMax","validation:invalidInput","validation:invalidSelection","validation:invalidSelections","validation:latitudeOutOfBounds","validation:lessThanMin","validation:limitReached","validation:longitudeOutOfBounds","validation:invalidBlock","validation:invalidBlocks","validation:longerThanMin","validation:notValidDate","validation:required","validation:requiresAtLeast","validation:requiresNoMoreThan","validation:requiresTwoNumbers","validation:shorterThanMax","validation:trueOrFalse","validation:timezoneRequired","validation:username","validation:validUploadID","version:aboutToPublishSelection","version:aboutToRestore","version:aboutToRestoreGlobal","version:aboutToRevertToPublished","version:aboutToUnpublish","version:aboutToUnpublishIn","version:aboutToUnpublishSelection","version:autosave","version:autosavedSuccessfully","version:autosavedVersion","version:versionAgo","version:moreVersions","version:changed","version:changedFieldsCount","version:confirmRevertToSaved","version:compareVersions","version:comparingAgainst","version:currentlyViewing","version:confirmPublish","version:confirmUnpublish","version:confirmVersionRestoration","version:currentDraft","version:currentPublishedVersion","version:currentlyPublished","version:draft","version:draftHasPublishedVersion","version:draftSavedSuccessfully","version:lastSavedAgo","version:modifiedOnly","version:noFurtherVersionsFound","version:noLabelGroup","version:noRowsFound","version:noRowsSelected","version:preview","version:previouslyDraft","version:previouslyPublished","version:previousVersion","version:problemRestoringVersion","version:publish","version:publishAllLocales","version:publishChanges","version:published","version:publishIn","version:publishing","version:restoreAsDraft","version:restoredSuccessfully","version:restoreThisVersion","version:restoring","version:reverting","version:revertUnsuccessful","version:revertToPublished","version:saveDraft","version:scheduledSuccessfully","version:schedulePublish","version:selectLocales","version:selectVersionToCompare","version:showLocales","version:specificVersion","version:status","version:type","version:unpublish","version:unpublished","version:unpublishIn","version:unpublishing","version:unpublishedSuccessfully","version:versionID","version:version","version:versions","version:viewingVersion","version:viewingVersionGlobal","version:viewingVersions","version:viewingVersionsGlobal"];function n(e,t="",i){let r={};for(let[s,a]of Object.entries(e)){if("$schema"===s){r[s]=a;continue}if("object"==typeof a){let e=n(a,s,i);Object.keys(e).length>0&&(r[s]=e)}else for(let e of i){let[i,n]=e.split(":");t===i&&(s===n?r[n]=a:["zero","one","two","few","many","other"].forEach(e=>{s===`${n}_${e}`&&(r[`${n}_${e}`]=a)}))}}return r}function s(e){let t={};return Object.keys(e).sort().forEach(i=>{"object"==typeof e[i]?t[i]=s(e[i]):t[i]=e[i]}),t}let a=(e,t)=>"client"===t?s(n(e.translations,"",r)):e.translations,o=({count:e,key:t,translations:i})=>{let r=t.split(":"),n="",s=r.reduce((t,i,s)=>{if("string"==typeof t)return t;"number"==typeof e&&(0===e&&`${i}_zero`in t?n="_zero":1===e&&`${i}_one`in t?n="_one":2===e&&`${i}_two`in t?n="_two":e>5&&`${i}_many`in t?n="_many":e>2&&e<=5&&`${i}_few`in t?n="_few":`${i}_other`in t&&(n="_other"));let a=i;if(s===r.length-1&&n&&(a=`${i}${n}`),t&&a in t)return t[a]},i);return s||console.log("key not found:",t),s||t},l=({translationString:e,vars:t})=>e.split(/(\{\{.*?\}\})/).map(e=>{if(!(e.startsWith("{{")&&e.endsWith("}}")))return e;{let i=t[e.substring(2,e.length-2).trim()];return null!=i?i:e}}).join("");function c({key:e,translations:t,vars:i}){let r=o({count:"number"==typeof i?.count?i.count:void 0,key:e,translations:t});return i&&(r=l({translationString:r,vars:i})),r||(r=e),r}let d=e=>{let{config:t,language:r,translations:n}=e,s=r&&t?.translations?.[r]?(0,i.deepMergeSimple)(n,t.translations[r]):n;return{t:(e,t)=>c({key:e,translations:s,vars:t}),translations:s}},u=function(e,t){let i=new Map;return async r=>{let n=t.reduce((e,t)=>e+String(r[t]),"");if(!i.has(n)){let t=await e(r);i.set(n,t)}return i.get(n)}}(async({config:e,context:i,language:r=e.fallbackLanguage})=>{if(!r||!e.supportedLanguages?.[r])throw Error(`Language ${r} not supported`);let n=a(e.supportedLanguages?.[r],i),{t:s,translations:o}=d({config:e,language:r||e.fallbackLanguage,translations:n}),l=e.supportedLanguages[r]?.dateFNSKey||"en-US";return{dateFNS:await t(l),dateFNSKey:l,fallbackLanguage:e.fallbackLanguage,language:r||e.fallbackLanguage,t:s,translations:o}},["language","context"]);e.s(["initI18n",0,u],373250);let h=async({config:e,language:t})=>u({config:e.i18n,context:"api",language:t});e.s(["getLocalI18n",0,h],682988)},680110,e=>{"use strict";var t=e.i(271607),i=e.i(682988),r=e.i(510322);function n(e={context:null},t={}){return e.context?0===Object.keys(e.context).length&&e.context.constructor===Object?t:{...e.context,...t}:t}let s=(e,t)=>{let i;function r(){if(i)return i;let r=`http://${e.host||"localhost"}${t||""}`,n=e?.url||(e.payload?.config?.serverURL?`${e.payload?.config.serverURL}${t||""}`:r);try{i=new URL(n)}catch(t){e.payload?.logger.error(`Failed to create URL object from URL: ${n}, falling back to ${r}`),i=new URL(r)}return i}e.host||(e.host=r().host),e.protocol||(e.protocol=r().protocol),e.pathname||(e.pathname=r().pathname),e.searchParams||(e.searchParams=r().searchParams),e.origin||(e.origin=r().origin),e?.url||(e.url=r().href)},a=async({context:e,depth:a,fallbackLocale:o,locale:l,req:c={},urlSuffix:d,user:u},h)=>{let A=h.config?.localization;if(A){let e="*"===l?"all":l,t=A.defaultLocale,i=e||c?.locale||c?.query?.locale;c.locale=i&&"string"==typeof i?i:t;let n=(0,r.sanitizeFallbackLocale)({fallbackLocale:o,locale:c.locale,localization:A});c.fallbackLocale=n}let p=c?.i18n||await (0,i.getLocalI18n)({config:h.config,language:h.config.i18n.fallbackLanguage});return c.headers||(c.headers=new Headers),c.context=n(c,e),c.payloadAPI=c?.payloadAPI||"local",c.payload=h,c.i18n=p,c.t=p.t,c.user=u||c?.user||null,c.user&&!c.user.collection&&(c.user={...c.user,collection:h.config.admin.user}),c.payloadDataLoader=c?.payloadDataLoader||(0,t.getDataLoader)(c),c.routeParams=c?.routeParams||{},c.query=c?.query||{},void 0!==a&&(c.query.depth=a),s(c,d),c};e.s(["createLocalReq",0,a])},581848,e=>{"use strict";function t(e,i="and"){if(0===e.length)return{};let r=e.reduce((e,t)=>(t&&"object"==typeof t&&Object.keys(t).length>0&&(i in t?e[i]=[...e[i],...t[i]]:e[i]?.push(t)),e),{[i]:[]});return r[i]?.length===0?{}:r}e.s(["combineWhereConstraints",()=>t])},142262,e=>{"use strict";var t=e.i(186725);let i=({callback:e,callbackStack:t,config:i,data:n,field:s,fillEmpty:a,leavesFirst:o,parentIsLocalized:l,parentPath:c,parentRef:d})=>{if(a){if("array"===s.type&&r({callback:e,callbackStack:t,config:i,fields:s.fields,isTopLevel:!1,leavesFirst:o,parentIsLocalized:l||s.localized,parentPath:`${c}${s.name}.`,parentRef:d}),"blocks"===s.type)for(let n of s.blockReferences??s.blocks){let a="string"==typeof n?i?.blocks?.find(e=>e.slug===n):n;a&&r({callback:e,callbackStack:t,config:i,fields:a.fields,isTopLevel:!1,leavesFirst:o,parentIsLocalized:l||s.localized,parentPath:`${c}${s.name}.`,parentRef:d})}return}for(let u of n){let n;if("blocks"===s.type&&"string"==typeof u?.blockType){let e=s.blockReferences?i?.blocks?.find(e=>e.slug===u.blockType)??s.blockReferences.find(e=>"string"!=typeof e&&e.slug===u.blockType):s.blocks.find(e=>e.slug===u.blockType);n=e?.fields}else"array"===s.type&&(n=s.fields);n&&r({callback:e,callbackStack:t,config:i,fields:n,fillEmpty:a,isTopLevel:!1,leavesFirst:o,parentIsLocalized:l||s.localized,parentPath:`${c}${s.name}.`,parentRef:d,ref:u})}},r=({callback:e,callbackStack:n=[],config:s,fields:a,fillEmpty:o=!0,isTopLevel:l=!0,leavesFirst:c=!1,parentIsLocalized:d,parentPath:u="",parentRef:h={},ref:A={}})=>{!a.some(a=>{let p=[];l||(p=n);let f=!1,g=()=>{f=!0};if(!A||"object"!=typeof A)return;if(!c&&e&&e({field:a,next:g,parentIsLocalized:d,parentPath:u,parentRef:h,ref:A}))return!0;if(c&&p.push(()=>e({field:a,next:g,parentIsLocalized:d,parentPath:u,parentRef:h,ref:A})),f)return!1;let m=A,y=h;if("tabs"===a.type&&"tabs"in a){for(let i of a.tabs){let n=A;if(f)return!1;if("name"in i&&i.name){if(!A[i.name]||"object"!=typeof A[i.name])if(!o)continue;else i.localized?A[i.name]={en:{}}:A[i.name]={};if(e&&!c&&e({field:{...i,type:"tab"},next:g,parentIsLocalized:d,parentPath:u,parentRef:y,ref:n}))return!0;if(c&&p.push(()=>e({field:{...i,type:"tab"},next:g,parentIsLocalized:d,parentPath:u,parentRef:y,ref:n})),n=n[i.name],i.localized)for(let t in n)n[t]&&"object"==typeof n[t]&&r({callback:e,callbackStack:p,config:s,fields:i.fields,fillEmpty:o,isTopLevel:!1,leavesFirst:c,parentIsLocalized:!0,parentPath:`${u}${i.name}.`,parentRef:y,ref:n[t]})}else{if(e&&!c&&e({field:{...i,type:"tab"},next:g,parentIsLocalized:d,parentPath:u,parentRef:y,ref:n}))return!0;c&&p.push(()=>e({field:{...i,type:"tab"},next:g,parentIsLocalized:d,parentPath:u,parentRef:y,ref:n}))}if(i.localized||r({callback:e,callbackStack:p,config:s,fields:i.fields,fillEmpty:o,isTopLevel:!1,leavesFirst:c,parentIsLocalized:!1,parentPath:(0,t.tabHasName)(i)?`${u}${i.name}.`:u,parentRef:y,ref:n}),f)return!1}return}if("tab"===a.type||(0,t.fieldHasSubFields)(a)||"blocks"===a.type){if("name"in a&&a.name){if(y=m,!A[a.name])if(!o)return;else"group"===a.type||"tab"===a.type?(0,t.fieldShouldBeLocalized)({field:a,parentIsLocalized:d})?A[a.name]={en:{}}:A[a.name]={}:("array"===a.type||"blocks"===a.type)&&((0,t.fieldShouldBeLocalized)({field:a,parentIsLocalized:d})?A[a.name]={en:[]}:A[a.name]=[]);m=A[a.name]}if(("tab"===a.type||"group"===a.type)&&(0,t.fieldShouldBeLocalized)({field:a,parentIsLocalized:d})&&m&&"object"==typeof m){if((0,t.fieldAffectsData)(a))for(let t in m)m[t]&&r({callback:e,callbackStack:p,config:s,fields:a.fields,fillEmpty:o,isTopLevel:!1,leavesFirst:c,parentIsLocalized:!0,parentPath:a.name?`${u}${a.name}.`:u,parentRef:y,ref:m[t]});else r({callback:e,callbackStack:p,config:s,fields:a.fields,fillEmpty:o,isTopLevel:!1,leavesFirst:c,parentIsLocalized:d,parentRef:y,ref:m});return}if(("blocks"===a.type||"array"===a.type)&&m&&"object"==typeof m)if((0,t.fieldShouldBeLocalized)({field:a,parentIsLocalized:d??!1}))if(Array.isArray(m))i({callback:e,callbackStack:p,config:s,data:m,field:a,fillEmpty:o,leavesFirst:c,parentIsLocalized:!0,parentPath:u,parentRef:y});else for(let t in m){let r=m[t];Array.isArray(r)&&i({callback:e,callbackStack:p,config:s,data:r,field:a,fillEmpty:o,leavesFirst:c,parentIsLocalized:!0,parentPath:u,parentRef:y})}else Array.isArray(m)&&i({callback:e,callbackStack:p,config:s,data:m,field:a,fillEmpty:o,leavesFirst:c,parentIsLocalized:d,parentPath:u,parentRef:y});else m&&"object"==typeof m&&"fields"in a&&r({callback:e,callbackStack:p,config:s,fields:a.fields,fillEmpty:o,isTopLevel:!1,leavesFirst:c,parentIsLocalized:d,parentPath:"name"in a&&a.name?`${u}${a.name}.`:u,parentRef:y,ref:m})}l&&p.reverse().forEach(e=>{e()})})&&A&&"object"==typeof A&&Object.keys(A).forEach(t=>{if(t.includes(".")){let i=t.indexOf("."),l=t.substring(0,i),p=t.substring(i+1);A[l]||(A[l]={}),A[l][p]=A[t],delete A[t],r({callback:e,callbackStack:n,config:s,fields:a,fillEmpty:o,isTopLevel:!1,leavesFirst:c,parentIsLocalized:d,parentPath:u,parentRef:h,ref:A})}})};e.s(["traverseFields",0,r])},678721,e=>{"use strict";var t=e.i(195884),i=e.i(542327);let r={slug:"users",admin:{useAsTitle:"email"},auth:{tokenExpiration:7200},fields:[],labels:{plural:({t:e})=>e("general:users"),singular:({t:e})=>e("general:user")}};var n=e.i(24722),s=e.i(490046);let a=e=>e.map(e=>{let t=e.handler;return["patch","post"].includes(e.method)&&(e.handler=async e=>(await (0,n.addDataAndFileToRequest)(e),(0,s.addLocalesToRequestFromData)(e),t(e))),e});e.i(10188);var o=e.i(785867),l=e.i(680381),c=e.i(289481);let d=async e=>{let t=(0,l.headersWithCors)({headers:new Headers,req:e});try{let i=await (0,c.accessOperation)({req:e});return Response.json(i,{headers:t,status:o.status.OK})}catch(e){return Response.json({error:e},{headers:t,status:o.status.INTERNAL_SERVER_ERROR})}};var u=o,h=e.i(700859);let A=e=>{let t=e.routeParams?.collection;if("string"!=typeof t)throw new h.APIError("No collection was specified",400);let i=e.payload.collections[t];if(!i)throw new h.APIError(`Collection with the slug ${t} was not found`,404);return i},p=(e,{disableSanitize:t,optionalID:i}={})=>{let r=A(e),n=e.routeParams?.id;if("string"!=typeof n){if(i)return{id:void 0,collection:r};throw new h.APIError("ID was not specified",400)}if(!0===t)return{id:n,collection:r};let s=n,a="number"===e.payload.db.defaultIDType;return a&&"text"===r.customIDType&&(a=!1),a&&(s=parseFloat(s)),{id:s,collection:r}},f=e=>{let t=e.routeParams?.global;if("string"!=typeof t)throw new h.APIError("No global was specified",400);let i=e.payload.globals.config.find(e=>e.slug===t);if(!i)throw new h.APIError(`Global with the slug ${t} was not found`,404);return i};var g=l,m=e.i(947753);let y=async e=>{let{t}=e,i=A(e),r=i.config.auth?.loginWithUsername?{email:"string"==typeof e.data?.email?e.data.email:"",username:"string"==typeof e.data?.username?e.data.username:""}:{email:"string"==typeof e.data?.email?e.data.email:""};return await (0,m.forgotPasswordOperation)({collection:i,data:r,req:e}),Response.json({message:t("general:success")},{headers:(0,g.headersWithCors)({headers:new Headers,req:e}),status:u.status.OK})};var b=l,E=e.i(686543);let C=async e=>{let t=await (0,E.initOperation)({collection:A(e).config.slug,req:e});return Response.json({initialized:t},{headers:(0,b.headersWithCors)({headers:new Headers,req:e})})};var w=o,I=l,v=e.i(852995),B=e.i(753866),Q=e.i(96038);let x=async e=>{let t=A(e),{searchParams:i,t:r}=e,n=i.get("depth"),s=t.config.auth?.loginWithUsername!==!1?{email:"string"==typeof e.data?.email?e.data.email:"",password:"string"==typeof e.data?.password?e.data.password:"",username:"string"==typeof e.data?.username?e.data.username:""}:{email:"string"==typeof e.data?.email?e.data.email:"",password:"string"==typeof e.data?.password?e.data.password:""},a=await (0,Q.loginOperation)({collection:t,data:s,depth:(0,v.isNumber)(n)?Number(n):void 0,req:e}),o=(0,B.generatePayloadCookie)({collectionAuthConfig:t.config.auth,cookiePrefix:e.payload.config.cookiePrefix,token:a.token});return t.config.auth.removeTokenFromResponses&&delete a.token,Response.json({message:r("authentication:passed"),...a},{headers:(0,I.headersWithCors)({headers:new Headers({"Set-Cookie":o}),req:e}),status:w.status.OK})};var S=o,k=l,T=B,N=e.i(22540);let D=async e=>{let t=A(e),{searchParams:i,t:r}=e,n=await (0,N.logoutOperation)({allSessions:"true"===i.get("allSessions"),collection:t,req:e}),s=(0,k.headersWithCors)({headers:new Headers,req:e});if(!n)return Response.json({message:r("error:logoutFailed")},{headers:s,status:S.status.BAD_REQUEST});let a=(0,T.generateExpiredPayloadCookie)({collectionAuthConfig:t.config.auth,config:e.payload.config,cookiePrefix:e.payload.config.cookiePrefix});return s.set("Set-Cookie",a),Response.json({message:r("authentication:logoutSuccessful")},{headers:s,status:S.status.OK})};var _=o,R=l,L=v,F=v;let M=(e={})=>{let t={},i=e;return Object.keys(i).forEach(e=>{"false"===i[e]||!1===i[e]?t[e]=!1:t[e]={count:"true"===i[e].count,limit:(0,F.isNumber)(i[e]?.limit)?Number(i[e].limit):void 0,page:(0,F.isNumber)(i[e]?.page)?Number(i[e].page):void 0,sort:i[e]?.sort?i[e].sort:void 0,where:i[e]?.where?i[e].where:void 0}}),t},O=e=>{if(e&&"object"==typeof e)for(let t in e){let i=t;"true"===e[i]?e[i]=!0:"false"===e[i]?e[i]=!1:"object"==typeof e[i]&&O(e[i])}return e},U=e=>{if(e&&"object"==typeof e){for(let t in e)e[t]=O(e[t]);return e}};var P=e.i(762823),$=e.i(905713);let j=async e=>{let{searchParams:t}=e,i=A(e),r=(0,P.extractJWT)(e),n=t.get("depth"),s=t.get("depth"),{depth:a,draft:o,joins:l,populate:c,select:d}=e.query,u=a||n,h=o||s,p=await (0,$.meOperation)({collection:i,currentToken:r,depth:(0,L.isNumber)(u)?Number(u):void 0,draft:"true"===h,joins:M(l),populate:U(c),req:e,select:O(d)});return i.config.auth.removeTokenFromResponses&&delete p.token,Response.json({...p,message:e.t("authentication:account")},{headers:(0,R.headersWithCors)({headers:new Headers,req:e}),status:_.status.OK})};var H=o,q=l,z=B,V=e.i(921819);let G=async e=>{let t=A(e),{t:i}=e,r=(0,q.headersWithCors)({headers:new Headers,req:e}),n=await (0,V.refreshOperation)({collection:t,req:e});if(n.setCookie){let i=(0,z.generatePayloadCookie)({collectionAuthConfig:t.config.auth,cookiePrefix:e.payload.config.cookiePrefix,token:n.refreshedToken});t.config.auth.removeTokenFromResponses&&delete n.refreshedToken,r.set("Set-Cookie",i)}return Response.json({message:i("authentication:tokenRefreshSuccessful"),...n},{headers:r,status:H.status.OK})};var Y=o,W=l,J=B,K=e.i(295694),Z=e.i(516808),X=e.i(452968),ee=e.i(311462),et=e.i(893961),ei=e.i(685147);let er=async e=>{let{collection:{config:t,config:{slug:i,auth:{verify:r}}},data:n,req:s,req:{payload:a}}=e;if(t.auth.disableLocalStrategy)throw new K.Forbidden(s.t);try{let o=await (0,ee.initTransaction)(s);(0,ei.ensureUsernameOrEmail)({authOptions:t.auth,collectionSlug:i,data:n,operation:"create",req:s});let l=(0,Z.appendNonTrashedFilter)({enableTrash:!!t.trash,trash:!1,where:{}});if(await a.db.findOne({collection:t.slug,req:s,where:l}))throw new K.Forbidden(s.t);let c=await a.create({collection:i,data:n,overrideAccess:!0,req:s});r&&await a.update({id:c.id,collection:i,data:{_verified:!0},req:s});let{exp:d,token:u}=await a.login({...e,collection:i,req:s});return c.collection=i,c._strategy="local-jwt",o&&await (0,X.commitTransaction)(s),{exp:d,token:u,user:c}}catch(e){throw await (0,et.killTransaction)(s),e}},en=async e=>{let t=A(e),{data:i,t:r}=e,n=t.config.auth?.loginWithUsername?{email:"string"==typeof e.data?.email?e.data.email:"",password:"string"==typeof e.data?.password?e.data.password:"",username:"string"==typeof e.data?.username?e.data.username:""}:{email:"string"==typeof e.data?.email?e.data.email:"",password:"string"==typeof e.data?.password?e.data.password:""},s=await er({collection:t,data:{...i,...n},req:e}),a=(0,J.generatePayloadCookie)({collectionAuthConfig:t.config.auth,cookiePrefix:e.payload.config.cookiePrefix,token:s.token});return Response.json({exp:s.exp,message:r("authentication:successfullyRegisteredFirstUser"),token:s.token,user:s.user},{headers:(0,W.headersWithCors)({headers:new Headers({"Set-Cookie":a}),req:e}),status:Y.status.OK})};var es=o,ea=l,eo=B,el=e.i(416190);let ec=async e=>{let t=A(e),{searchParams:i,t:r}=e,n=i.get("depth"),s=await (0,el.resetPasswordOperation)({collection:t,data:{password:"string"==typeof e.data?.password?e.data.password:"",token:"string"==typeof e.data?.token?e.data.token:""},depth:n?Number(n):void 0,req:e}),a=(0,eo.generatePayloadCookie)({collectionAuthConfig:t.config.auth,cookiePrefix:e.payload.config.cookiePrefix,token:s.token});return t.config.auth.removeTokenFromResponses&&delete s.token,Response.json({message:r("authentication:passwordResetSuccessfully"),...s},{headers:(0,ea.headersWithCors)({headers:new Headers({"Set-Cookie":a}),req:e}),status:es.status.OK})};var ed=o,eu=l,eh=e.i(494310);let eA=async e=>{let t=A(e),{t:i}=e,r=t.config.auth?.loginWithUsername!==!1?{email:"string"==typeof e.data?.email?e.data.email:"",username:"string"==typeof e.data?.username?e.data.username:""}:{email:"string"==typeof e.data?.email?e.data.email:""};return await (0,eh.unlockOperation)({collection:t,data:r,req:e}),Response.json({message:i("general:success")},{headers:(0,eu.headersWithCors)({headers:new Headers,req:e}),status:ed.status.OK})};var ep=o,ef=l,eg=e.i(682896);let em=async e=>{let{id:t,collection:i}=p(e,{disableSanitize:!0}),{t:r}=e;return await (0,eg.verifyEmailOperation)({collection:i,req:e,token:t}),Response.json({message:r("authentication:accountVerified")},{headers:(0,ef.headersWithCors)({headers:new Headers,req:e}),status:ep.status.OK})},ey=a([{handler:d,method:"get",path:"/access"}]),eb=a([{handler:y,method:"post",path:"/forgot-password"},{handler:C,method:"get",path:"/init"},{handler:x,method:"post",path:"/login"},{handler:D,method:"post",path:"/logout"},{handler:j,method:"get",path:"/me"},{handler:G,method:"post",path:"/refresh-token"},{handler:en,method:"post",path:"/first-register"},{handler:ec,method:"post",path:"/reset-password"},{handler:eA,method:"post",path:"/unlock"},{handler:em,method:"post",path:"/verify/:id"}]),eE=[{name:"loginAttempts",type:"number",access:{create:()=>!1,update:()=>!1},defaultValue:0,hidden:!0},{name:"lockUntil",type:"date",access:{create:()=>!1,update:()=>!1},hidden:!0}];var eC=e.i(254799);let ew=[{name:"enableAPIKey",type:"checkbox",admin:{components:{Field:!1}},label:({t:e})=>e("authentication:enableAPIKey")},{name:"apiKey",type:"text",admin:{components:{Field:!1}},hooks:{afterRead:[({req:e,value:t})=>t?e.payload.decrypt(t):void 0],beforeChange:[({req:e,value:t})=>t?e.payload.encrypt(t):null]},label:({t:e})=>e("authentication:apiKey")},{name:"apiKeyIndex",type:"text",admin:{disabled:!0},hidden:!0,hooks:{beforeValidate:[({data:e,req:t,value:i})=>e?.apiKey===!1||e?.apiKey===null||e?.enableAPIKey===!1||e?.enableAPIKey===null?null:e?.apiKey?eC.default.createHmac("sha256",t.payload.secret).update(e.apiKey).digest("hex"):i]}}],eI=[{name:"resetPasswordToken",type:"text",access:{create:()=>!1,update:()=>!1},hidden:!0},{name:"resetPasswordExpiration",type:"date",access:{create:()=>!1,update:()=>!1},hidden:!0},{name:"salt",type:"text",access:{create:()=>!1,update:()=>!1},hidden:!0},{name:"hash",type:"text",access:{create:()=>!1,update:()=>!1},hidden:!0}];var ev=e.i(350261);let eB={name:"email",type:"email",admin:{components:{Field:!1}},hooks:{beforeChange:[({value:e})=>{if(e)return e.toLowerCase().trim()}]},label:({t:e})=>e("general:email"),required:!0,unique:!0,validate:ev.email},eQ={name:"sessions",type:"array",access:{read:({doc:e,req:{user:t}})=>t?.id===e?.id,update:()=>!1},admin:{disabled:!0},fields:[{name:"id",type:"text",required:!0},{name:"createdAt",type:"date",defaultValue:()=>new Date},{name:"expiresAt",type:"date",required:!0}]},ex={name:"username",type:"text",admin:{components:{Field:!1}},hooks:{beforeChange:[({value:e})=>{if(e)return e.toLowerCase().trim()}]},label:({t:e})=>e("authentication:username"),required:!0,unique:!0,validate:ev.username};var eS=e.i(540875);let ek=({data:e,operation:t,originalDoc:i,value:r})=>"update"===t&&e?._verified===!0&&i?._verified===!1?null:r,eT=[{name:"_verified",type:"checkbox",access:{create:eS.defaultAccess,read:eS.defaultAccess,update:eS.defaultAccess},admin:{components:{Field:!1}},label:({t:e})=>e("authentication:verified")},{name:"_verificationToken",type:"text",access:{create:()=>!1,update:()=>!1},hidden:!0,hooks:{beforeChange:[ek]}}],eN=e=>{let t=[];if(e.useAPIKey&&t.push(...ew),!e.disableLocalStrategy||"object"==typeof e.disableLocalStrategy&&e.disableLocalStrategy.enableFields){let i,r={...eB};e.loginWithUsername&&(i={...ex},"object"==typeof e.loginWithUsername&&(!1===e.loginWithUsername.requireEmail&&(r.required=!1),!1===e.loginWithUsername.requireUsername&&(i.required=!1),!1===e.loginWithUsername.allowEmailLogin&&(r.unique=!1))),t.push(r),i&&t.push(i),t.push(...eI),e.verify&&t.push(...eT),e?.maxLoginAttempts&&e.maxLoginAttempts>0&&t.push(...eE),e.useSessions&&t.push(eQ)}return t};var eD=h;class e_ extends eD.APIError{constructor(e){super(`Timestamps are required in the collection ${e.slug} because you have opted in to Versions.`)}}var eR=e.i(277412),eL=e.i(186725),eF=e.i(303539),eM=eL;let eO=(e,t)=>{let i=[...e||[]];return t.forEach(e=>{let t=null;if((0,eM.fieldAffectsData)(e)){let r=i.find((i,r)=>!!(0,eM.fieldAffectsData)(i)&&i.name===e.name&&(t=r,!0));if(r){let n={...r};i.splice(t,1);let s=(0,eF.deepMergeWithReactComponents)(e,n);(0,eM.fieldHasSubFields)(e)&&(0,eM.fieldHasSubFields)(n)&&(s.fields=eO(n.fields,e.fields)),i.push(s)}else i.push(e)}}),i};var eU=e.i(192516),eP=e.i(924868),e$=o,ej=e.i(814747),eH=h,eq=e.i(42625),ez=K;let eV=async({collection:e,filename:t,req:i})=>{if(t.includes("../")||t.includes("..\\"))throw new ez.Forbidden(i.t);let{config:r}=e,n=await (0,eq.executeAccess)({data:{filename:t},isReadingStaticFile:!0,req:i},r.access.read);if("object"==typeof n){let e={and:[{or:[{filename:{equals:t}}]},n]};r.upload.imageSizes&&r.upload.imageSizes.forEach(({name:i})=>{e.and?.[0]?.or?.push({[`sizes.${i}.filename`]:{equals:t}})});let s=await i.payload.db.findOne({collection:r.slug,req:i,where:e});if(!s)throw new ez.Forbidden(i.t);return s}};var eG=e.i(522734);function eY(e){return new ReadableStream({async pull(t){let{done:i,value:r}=await e.next();i?t.close():t.enqueue(r)}})}async function*eW(e){for await(let t of e)yield new Uint8Array(t)}function eJ({filePath:e,options:t}){return eY(eW(eG.default.createReadStream(e,t)))}var eK=e.i(132659),eZ=e.i(473466);function eX({fileSize:e,rangeHeader:t}){if(!t)return{type:"full",range:null};let i=(0,eZ.default)(e,t);if(-1===i||-2===i||"bytes"!==i.type||0===i.length)return{type:"invalid",range:null};let r=i[0];return r?{type:"partial",range:{end:r.end,start:r.start}}:{type:"invalid",range:null}}var e0=l;let e1=async e=>{let t,i,r,n=A(e),s=e.routeParams?.filename;if(!n.config.upload)throw new eH.APIError(`This collection is not an upload collection: ${n.config.slug}`,e$.status.BAD_REQUEST);let a=await eV({collection:n,filename:s,req:e});if(a instanceof Response)return a;if(n.config.upload.handlers?.length){let t=null,i=new Headers;for(let r of n.config.upload.handlers)if((t=await r(e,{doc:a,headers:i,params:{collection:n.config.slug,filename:s}}))&&t instanceof Response)break;if(t instanceof Response)return t}let o=n.config.upload?.staticDir||n.config.slug,l=ej.default.resolve(o),c=ej.default.resolve(l,s);if(!c.startsWith(l+ej.default.sep))throw new eH.APIError("Invalid filename.",e$.status.BAD_REQUEST);try{t=await eP.default.stat(c)}catch(t){if("ENOENT"===t.code)return e.payload.logger.error(`File ${s} for collection ${n.config.slug} is missing on the disk. Expected path: ${c}`),Response.json({errors:[{message:"Something went wrong."}]},{headers:(0,e0.headersWithCors)({headers:new Headers,req:e}),status:500});throw t}let d=await (0,eU.fileTypeFromFile)(c)||(0,eK.getFileTypeFallback)(c),u=d.mime;c.endsWith(".svg")&&"application/xml"===d.mime&&(u="image/svg+xml");let h=e.headers.get("range"),p=eX({fileSize:t.size,rangeHeader:h});if("invalid"===p.type){let i=new Headers;return i.set("Content-Range",`bytes */${t.size}`),i=n.config.upload?.modifyResponseHeaders&&n.config.upload.modifyResponseHeaders({headers:i})||i,new Response(null,{headers:(0,e0.headersWithCors)({headers:i,req:e}),status:e$.status.REQUESTED_RANGE_NOT_SATISFIABLE})}let f=new Headers;f.set("Content-Type",u),f.set("Accept-Ranges","bytes"),"image/svg+xml"===u&&f.set("Content-Security-Policy","script-src 'none'");let g="partial"===p.type,m=p.range;if(g&&m){let e=m.end-m.start+1;f.set("Content-Length",String(e)),f.set("Content-Range",`bytes ${m.start}-${m.end}/${t.size}`),i=eJ({filePath:c,options:{end:m.end,start:m.start}}),r=e$.status.PARTIAL_CONTENT}else f.set("Content-Length",String(t.size)),i=eJ({filePath:c}),r=e$.status.OK;return f=n.config.upload?.modifyResponseHeaders&&n.config.upload.modifyResponseHeaders({headers:f})||f,new Response(i,{headers:(0,e0.headersWithCors)({headers:f,req:e}),status:r})};var e2=eq,e4=h,e5=K,e3=e.i(786559),e8=h;function e9(e){let t=e.replace(/\\/g,"/"),i=t.lastIndexOf("/");if(-1!==i&&(t=t.slice(i+1)),("."===t||".."===t)&&(t=""),!(t=t.replace(/[\x00-\x1f\x80-\x9f]/g,"")))throw new e8.APIError("Invalid filename",400);return t}var e6=e.i(265943);let e7=a([{handler:async e=>{let t,i,{id:r,collection:n}=p(e,{optionalID:!0});if(!e.user)throw new e5.Forbidden(e.t);let s=n?.config;if(!s.upload?.pasteURL)throw new e4.APIError("Pasting from URL is not enabled for this collection.",400);if(r){if(!await (0,e2.executeAccess)({req:e},s.access.update))throw new e5.Forbidden(e.t)}else if(!await (0,e2.executeAccess)({req:e},s.access?.create))throw new e5.Forbidden(e.t);if(!e.url)throw new e4.APIError("Request URL is missing.",400);let{searchParams:a}=new URL(e.url),o=a.get("src");if(!o||"string"!=typeof o)throw new e4.APIError("A valid URL string is required.",400);let l="object"==typeof s.upload.pasteURL&&Array.isArray(s.upload.pasteURL.allowList);try{t=new URL(o).href}catch{throw new e4.APIError("A valid URL string is required.",400)}if(l&&!(0,e3.isURLAllowed)(t,s.upload.pasteURL.allowList))throw new e4.APIError("The provided URL is not allowed.",400);let c=0,d=3;for(;;){if((i=l&&(0,e3.isURLAllowed)(t,s.upload.pasteURL.allowList)?await fetch(t,{headers:{"Accept-Encoding":"identity"},redirect:"manual",signal:AbortSignal.timeout(3e4)}):await (0,e6.safeFetch)(t,{headers:{"Accept-Encoding":"identity"},signal:AbortSignal.timeout(3e4)})).status>=300&&i.status<400){if(++c>d)throw new e4.APIError("Too many redirects.",403);let e=i.headers.get("location");if(e){if(t=new URL(e,t).href,l&&!(0,e3.isURLAllowed)(t,s.upload.pasteURL.allowList))throw new e4.APIError("The provided URL is not allowed.",400);continue}}break}if(!i.ok)throw new e4.APIError("Failed to fetch the file from the provided URL.",i.status);let u=e9(decodeURIComponent(new URL(t).pathname.split("/").pop()||"")),h=encodeURIComponent(u).replace(/['()]/g,e=>`%${e.charCodeAt(0).toString(16).toUpperCase()}`),A=u.replace(/["\\\r\n]/g,"_");return new Response(i.body,{headers:{"Content-Disposition":`attachment; filename="${A}"; filename*=UTF-8''${h}`,"Content-Length":i.headers.get("content-length")||"","Content-Type":i.headers.get("content-type")||"application/octet-stream"}})},method:"get",path:"/paste-url/:id?"},{handler:e1,method:"get",path:"/file/:filename"}]);var te=e.i(839875);function tt({collectionSlug:e,config:t,filename:i,relative:r,serverURL:n,urlOrPath:s}){return!s||s.startsWith("/")||s.startsWith(n||"")?i?(0,te.formatAdminURL)({apiRoute:t.routes?.api||"",path:`/${e}/file/${encodeURIComponent(i)}`,relative:r,serverURL:t.serverURL}):null:s}var ti=e.i(438635);let tr=e=>(t,{siblingData:i})=>!i.filename||(t?!!(0,ti.validateMimeType)(t,e)||`Invalid file type: '${t}'`:"Invalid file type"),tn=({collection:e,config:t})=>{let i="object"==typeof e.upload?e.upload:{},r={name:"mimeType",type:"text",admin:{hidden:!0,readOnly:!0},label:"MIME Type"},n={name:"thumbnailURL",type:"text",admin:{hidden:!0,readOnly:!0},hooks:{afterRead:[({originalDoc:i,req:r})=>{let n="boolean"!=typeof e.upload?e.upload?.adminThumbnail:void 0;return"function"==typeof n?n({doc:i}):tt({collectionSlug:e.slug,config:t,filename:"string"==typeof n?i.sizes?.[n]?.filename:void 0,relative:!1,serverURL:r.payload.config.serverURL,urlOrPath:"string"==typeof n?i.sizes?.[n]?.url:void 0})}]},label:"Thumbnail URL"},s={name:"width",type:"number",admin:{hidden:!0,readOnly:!0},label:({t:e})=>e("upload:width")},a={name:"height",type:"number",admin:{hidden:!0,readOnly:!0},label:({t:e})=>e("upload:height")},o={name:"filesize",type:"number",admin:{hidden:!0,readOnly:!0},label:({t:e})=>e("upload:fileSize")},l={name:"filename",type:"text",admin:{disableBulkEdit:!0,hidden:!0,readOnly:!0},index:!0,label:({t:e})=>e("upload:fileName")};!0!==e.upload&&("object"!=typeof e.upload||e.upload.filenameCompoundIndex)||(l.unique=!0);let c={name:"url",type:"text",admin:{hidden:!0,readOnly:!0},label:"URL"},d=[{...c,hooks:{afterRead:[({data:i,originalDoc:r,req:n,value:s})=>tt({collectionSlug:e.slug,config:t,filename:i?.filename||r?.filename,relative:!1,serverURL:n.payload.config.serverURL,urlOrPath:s})],beforeChange:[({collection:e,data:i,originalDoc:r,req:n,value:s})=>tt({collectionSlug:e?.slug,config:t,filename:i?.filename||r?.filename,relative:!0,serverURL:n.payload.config.serverURL,urlOrPath:s})]}},n,l,r,o,s,a];return(!1!==i.focalPoint||i.imageSizes||i.resizeOptions)&&(d=d.concat(["focalX","focalY"].map(e=>({name:e,type:"number",admin:{disableGroupBy:!0,disableListColumn:!0,disableListFilter:!0,hidden:!0}})))),i.mimeTypes&&(r.validate=tr(i.mimeTypes)),i.imageSizes&&(d=d.concat([{name:"sizes",type:"group",admin:{hidden:!0},fields:i.imageSizes.map(e=>({name:e.name,type:"group",admin:{hidden:!0,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}},fields:[{...c,admin:{...c.admin,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}},hooks:{afterRead:[({collection:i,data:r,originalDoc:n,req:s,value:a})=>tt({collectionSlug:i?.slug,config:t,filename:r?.sizes?.[e.name]?.filename||n?.sizes?.[e.name]?.filename,relative:!1,serverURL:s.payload.config.serverURL,urlOrPath:a})],beforeChange:[({collection:i,data:r,originalDoc:n,req:s,value:a})=>tt({collectionSlug:i?.slug,config:t,filename:r?.sizes?.[e.name]?.filename||n?.sizes?.[e.name]?.filename,relative:!0,serverURL:s.payload.config.serverURL,urlOrPath:a})]}},{...s,admin:{...s.admin,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}}},{...a,admin:{...a.admin,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}}},{...r,admin:{...r.admin,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}}},{...o,admin:{...o.admin,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}}},{...l,admin:{...l.admin,...e.admin?.disableGroupBy&&{disableGroupBy:!0},...e.admin?.disableListColumn&&{disableListColumn:!0},...e.admin?.disableListFilter&&{disableListFilter:!0}},unique:!1}],label:e.name})),label:({t:e})=>e("upload:sizes")}])),d};var ts=e.i(143647),ta=e.i(346997);let to={blue:"\x1b[34m",bold:"\x1b[1m",cyan:"\x1b[36m",dim:"\x1b[2m",green:"\x1b[32m",magenta:"\x1b[35m",red:"\x1b[31m",reset:"\x1b[0m",underline:"\x1b[4m",white:"\x1b[37m",yellow:"\x1b[33m"};function tl(e,...t){let i=t.map(e=>to[e]||"").join("");return`${i}${e}${to.reset}`}let tc=e=>tl(e,"yellow","bold"),td=e=>{for(let t of e){if("localized"in t&&t.localized)return!0;switch(t.type){case"array":case"collapsible":case"group":case"row":if(t.fields&&td(t.fields))return!0;break;case"blocks":if(t.blocks){for(let e of t.blocks)if(e.fields&&td(e.fields))return!0}break;case"tabs":if(t.tabs){for(let e of t.tabs)if("localized"in e&&e.localized||"fields"in e&&e.fields&&td(e.fields))return!0}}}return!1};var tu=e.i(74460),th=e.i(145908),tA=o,tp=v;let tf=e=>"boolean"==typeof e?e:"true"===e||"false"!==e&&void 0,tg=e=>"string"==typeof e?e.split(","):Array.isArray(e)&&e.every(e=>"string"==typeof e)?e:void 0,tm=["autosave","draft","trash","overrideLock","pagination","flattenLocales"],ty=["depth","limit","page"],tb=e=>{let t=e||{};for(let i of tm)i in e&&(t[i]=tf(e[i]));for(let i of ty)i in e&&(0,tp.isNumber)(e[i])&&(t[i]=Number(e[i]));return"populate"in e&&(t.populate=U(e.populate)),"select"in e&&(t.select=O(e.select)),"joins"in e&&(t.joins=M(e.joins)),"sort"in e&&(t.sort=tg(e.sort)),"data"in e&&"string"==typeof e.data&&e.data.length>0&&(t.data=JSON.parse(e.data)),t};var tE=e.i(837209);let tC=async e=>{let t=A(e),{trash:i,where:r}=tb(e.query),n=await (0,tE.countOperation)({collection:t,req:e,trash:i,where:r});return Response.json(n,{status:tA.status.OK})};var tw=e.i(843385),tI=o,tv=l,tB=e.i(15487);let tQ=async e=>{let t=A(e),{autosave:i,depth:r,draft:n,populate:s,publishAllLocales:a,select:o}=tb(e.query),l=e.query.publishSpecificLocale,c=await (0,tB.createOperation)({autosave:i,collection:t,data:e.data,depth:r,draft:n,populate:s,publishAllLocales:a,publishSpecificLocale:l,req:e,select:o});return Response.json({doc:c,message:e.t("general:successfullyCreated",{label:(0,tw.getTranslation)(t.config.labels.singular,e.i18n)})},{headers:(0,tv.headersWithCors)({headers:new Headers,req:e}),status:tI.status.CREATED})};var tx=tw,tS=o,tk=l,tT=e.i(64183);let tN=async e=>{let t=A(e),{depth:i,overrideLock:r,populate:n,select:s,trash:a,where:o}=tb(e.query),l=await (0,tT.deleteOperation)({collection:t,depth:i,overrideLock:r??!1,populate:n,req:e,select:s,trash:a,where:o}),c=(0,tk.headersWithCors)({headers:new Headers,req:e});if(0===l.errors.length){let i=e.t("general:deletedCountSuccessfully",{count:l.docs.length,label:(0,tx.getTranslation)(t.config.labels[1===l.docs.length?"singular":"plural"],e.i18n)});return Response.json({...l,message:i},{headers:c,status:tS.status.OK})}l.errors=l.errors.map(e=>e.isPublic?e:{...e,message:"Something went wrong."});let d=l.docs.length+l.errors.length,u=e.t("error:unableToDeleteCount",{count:l.errors.length,label:(0,tx.getTranslation)(t.config.labels[1===d?"singular":"plural"],e.i18n),total:d});return Response.json({...l,message:u},{headers:c,status:tS.status.BAD_REQUEST})};var tD=o,t_=l,tR=e.i(283078);let tL=async e=>{let{id:t,collection:i}=p(e),{depth:r,overrideLock:n,populate:s,select:a,trash:o}=tb(e.query),l=await (0,tR.deleteByIDOperation)({id:t,collection:i,depth:r,overrideLock:n??!1,populate:s,req:e,select:a,trash:o}),c=(0,t_.headersWithCors)({headers:new Headers,req:e});return l?Response.json({doc:l,message:e.t("general:deletedSuccessfully")},{headers:c,status:tD.status.OK}):Response.json({message:e.t("general:notFound")},{headers:c,status:tD.status.NOT_FOUND})};var tF=o,tM=l,tO=e.i(107409);let tU=async e=>{let{id:t,collection:i}=p(e,{optionalID:!0}),r=await (0,tO.docAccessOperation)({id:t,collection:i,data:e.data,req:e});return Response.json(r,{headers:(0,tM.headersWithCors)({headers:new Headers,req:e}),status:tF.status.OK})};var tP=tw,t$=o,tj=l,tH=e.i(723310);let tq=async e=>{let{id:t,collection:i}=p(e),{depth:r,draft:n=!0,populate:s,select:a,selectedLocales:o}=tb(e.query),l=await (0,tH.duplicateOperation)({id:t,collection:i,data:e.data,depth:r,draft:n,populate:s,req:e,select:a,selectedLocales:o}),c=e.t("general:successfullyDuplicated",{label:(0,tP.getTranslation)(i.config.labels.singular,e.i18n)});return Response.json({doc:l,message:c},{headers:(0,tj.headersWithCors)({headers:new Headers,req:e}),status:t$.status.OK})};var tz=o,tV=l,tG=e.i(990569);let tY=async e=>{let t=A(e),{depth:i,draft:r,joins:n,limit:s,page:a,pagination:o,populate:l,select:c,sort:d,trash:u,where:h}=tb(e.query),p=await (0,tG.findOperation)({collection:t,depth:i,draft:r,joins:n,limit:s,page:a,pagination:o,populate:l,req:e,select:c,sort:d,trash:u,where:h});return Response.json(p,{headers:(0,tV.headersWithCors)({headers:new Headers,req:e}),status:tz.status.OK})};var tW=o,tJ=l,tK=e.i(921065);let tZ=async e=>{let{data:t}=e,{id:i,collection:r}=p(e),{data:n,depth:s,draft:a,flattenLocales:o,joins:l,populate:c,select:d,trash:u}=tb({...e.query,...t}),h=await (0,tK.findByIDOperation)({id:i,collection:r,data:n,depth:s,draft:a,flattenLocales:o,joins:l,populate:c,req:e,select:d,trash:u});return Response.json(h,{headers:(0,tJ.headersWithCors)({headers:new Headers,req:e}),status:tW.status.OK})};var tX=o,t0=l,t1=e.i(919915);let t2=async e=>{let{depth:t,populate:i,select:r,trash:n}=tb(e.query),{id:s,collection:a}=p(e),o=await (0,t1.findVersionByIDOperation)({id:s,collection:a,depth:t,populate:i,req:e,select:r,trash:n});return Response.json(o,{headers:(0,t0.headersWithCors)({headers:new Headers,req:e}),status:tX.status.OK})};var t4=o,t5=l,t3=e.i(322929);let t8=async e=>{let t=A(e),{depth:i,limit:r,page:n,pagination:s,populate:a,select:o,sort:l,trash:c,where:d}=tb(e.query),u=await (0,t3.findVersionsOperation)({collection:t,depth:i,limit:r,page:n,pagination:s,populate:a,req:e,select:o,sort:l,trash:c,where:d});return Response.json(u,{headers:(0,t5.headersWithCors)({headers:new Headers,req:e}),status:t4.status.OK})};var t9=o,t6=l,t7=e.i(713278);let ie=async e=>{let{id:t,collection:i}=p(e),{depth:r,draft:n,populate:s}=tb(e.query),a=await (0,t7.restoreVersionOperation)({id:t,collection:i,depth:r,draft:n,populate:s,req:e});return Response.json({...a,message:e.t("version:restoredSuccessfully")},{headers:(0,t6.headersWithCors)({headers:new Headers,req:e}),status:t9.status.OK})};var it=tw,ii=o,ir=l,is=e.i(360918);let ia=async e=>{let t=A(e),{depth:i,draft:r,limit:n,overrideLock:s,populate:a,publishAllLocales:o,select:l,sort:c,trash:d,unpublishAllLocales:u,where:h}=tb(e.query),p=await (0,is.updateOperation)({collection:t,data:e.data,depth:i,draft:r,limit:n,overrideLock:s??!1,populate:a,publishAllLocales:o,req:e,select:l,sort:c,trash:d,unpublishAllLocales:u,where:h}),f=(0,ir.headersWithCors)({headers:new Headers,req:e});if(0===p.errors.length){let i=e.t("general:updatedCountSuccessfully",{count:p.docs.length,label:(0,it.getTranslation)(t.config.labels[1===p.docs.length?"singular":"plural"],e.i18n)});return Response.json({...p,message:i},{headers:f,status:ii.status.OK})}p.errors=p.errors.map(e=>e.isPublic?e:{...e,message:"Something went wrong."});let g=p.docs.length+p.errors.length,m=e.t("error:unableToUpdateCount",{count:p.errors.length,label:(0,it.getTranslation)(t.config.labels[1===g?"singular":"plural"],e.i18n),total:g});return Response.json({...p,message:m},{headers:f,status:ii.status.BAD_REQUEST})};var io=o,il=l,ic=e.i(565058);let id=[...a([{handler:tC,method:"get",path:"/count"},{handler:tQ,method:"post",path:"/"},{handler:tN,method:"delete",path:"/"},{handler:tL,method:"delete",path:"/:id"},{handler:tU,method:"post",path:"/access/:id?"},{handler:t8,method:"get",path:"/versions"},{handler:tq,method:"post",path:"/:id/duplicate"},{handler:tY,method:"get",path:"/"},{handler:tZ,method:"get",path:"/:id"},{handler:t2,method:"get",path:"/versions/:id"},{handler:ie,method:"post",path:"/versions/:id"},{handler:ia,method:"patch",path:"/"},{handler:async e=>{let{id:t,collection:i}=p(e),{autosave:r,depth:n,draft:s,overrideLock:a,populate:o,publishAllLocales:l,publishSpecificLocale:c,select:d,trash:u,unpublishAllLocales:h}=tb(e.query),A=await (0,ic.updateByIDOperation)({id:t,autosave:r,collection:i,data:e.data,depth:n,draft:s,overrideLock:a??!1,populate:o,publishAllLocales:l,publishSpecificLocale:c,req:e,select:d,trash:u,unpublishAllLocales:h}),f=e.t("general:updatedSuccessfully");return s&&(f=e.t("version:draftSavedSuccessfully")),r&&(f=e.t("version:autosavedSuccessfully")),Response.json({doc:A,message:f},{headers:(0,il.headersWithCors)({headers:new Headers,req:e}),status:io.status.OK})},method:"patch",path:"/:id"}])];var iu=eS;iu.defaultAccess,iu.defaultAccess,iu.defaultAccess,iu.defaultAccess,iu.defaultAccess;let ih=e=>(e.access={create:iu.defaultAccess,delete:iu.defaultAccess,read:iu.defaultAccess,unlock:iu.defaultAccess,update:iu.defaultAccess,...e.access||{}},e.admin={components:{},custom:{},enableRichTextLink:!0,enableRichTextRelationship:!0,useAsTitle:"id",...e.admin||{},pagination:{defaultLimit:10,limits:[5,10,25,50,100],...e.admin?.pagination||{}}},e.auth=e.auth??!1,e.custom=e.custom??{},e.endpoints=e.endpoints??[],e.fields=e.fields??[],e.folders=e.folders??!1,e.hooks={afterChange:[],afterDelete:[],afterForgotPassword:[],afterLogin:[],afterLogout:[],afterMe:[],afterOperation:[],afterRead:[],afterRefresh:[],beforeChange:[],beforeDelete:[],beforeLogin:[],beforeOperation:[],beforeRead:[],beforeValidate:[],me:[],refresh:[],...e.hooks||{}},e.timestamps=e.timestamps??!0,e.upload=e.upload??!1,e.versions=e.versions??!1,e.indexes=e.indexes??[],e),iA=e=>(e.cookies={sameSite:"Lax",secure:!1,...e.cookies||{}},e.forgotPassword=e.forgotPassword??{},e.lockTime=e.lockTime??6e5,e.loginWithUsername=e.loginWithUsername??!1,e.maxLoginAttempts=e.maxLoginAttempts??5,e.tokenExpiration=e.tokenExpiration??7200,e.useSessions=e.useSessions??!0,e.verify=e.verify??!1,e.strategies=e.strategies??[],e.disableLocalStrategy||!0!==e.verify||(e.verify={}),e),ip=e=>({allowEmailLogin:!1,requireEmail:!1,requireUsername:!0,...e||{}});var ig=e.i(267522),im=e.i(783334);let iy=({fields:e,indexes:t})=>{let i=[];for(let r of t){let t={fields:[],unique:r.unique??!1};for(let i of r.fields){let r=(0,im.getFieldByPath)({fields:e,path:i});if(!r)throw new ig.InvalidConfiguration(`Field ${i} was not found`);let{field:n,localizedPath:s,pathHasLocalized:a}=r;if(["array","blocks","group","tab"].includes(n.type))throw new ig.InvalidConfiguration(`Compound index on ${n.type} cannot be set. Path: ${s}`);t.fields.push({field:n,localizedPath:s,path:i,pathHasLocalized:a})}i.push(t)}return i};var ib=ig,iE=eL,iC=e.i(644561);let iw=e=>{if(e.admin?.useAsTitle?.includes("."))throw new ib.InvalidConfiguration(`"useAsTitle" cannot be a nested field. Please specify a top-level field in the collection "${e.slug}"`);if(e?.admin&&e.admin?.useAsTitle&&"id"!==e.admin.useAsTitle){let t=(0,iC.flattenTopLevelFields)(e.fields).find(t=>!!(0,iE.fieldAffectsData)(t)&&!!e.admin&&t.name===e.admin.useAsTitle);if(e.auth){if("email"!==e.admin.useAsTitle&&!t)throw new ib.InvalidConfiguration(`The field "${e.admin.useAsTitle}" specified in "admin.useAsTitle" does not exist in the collection "${e.slug}"`)}else{if(t&&"virtual"in t&&!0===t.virtual)throw new ib.InvalidConfiguration(`The field "${e.admin.useAsTitle}" specified in "admin.useAsTitle" in the collection "${e.slug}" is virtual. A virtual field can be used as the title only when linked to a relationship field.`);if(!t)throw new ib.InvalidConfiguration(`The field "${e.admin.useAsTitle}" specified in "admin.useAsTitle" does not exist in the collection "${e.slug}"`)}}},iI=async(e,t,i,r)=>{if(t._sanitized)return t;t._sanitized=!0;let n=ih(t),s=r??e.collections.map(e=>e.slug)??[],a={},o=[];if(n.fields=await (0,eR.sanitizeFields)({collectionConfig:n,config:e,fields:n.fields,joinPath:"",joins:a,parentIsLocalized:!1,polymorphicJoins:o,richTextSanitizationPromises:i,validRelationships:s}),!1!==n.endpoints){if(n.endpoints||(n.endpoints=[]),n.auth)for(let e of eb)n.endpoints.push(e);if(n.upload)for(let e of e7)n.endpoints.push(e);for(let e of id)n.endpoints.push(e)}if(!1!==n.timestamps){let e=null,t=null,i=null;n.fields.some(r=>((0,eL.fieldAffectsData)(r)&&("updatedAt"===r.name&&(e=!0),"createdAt"===r.name&&(t=!0),"deletedAt"===r.name&&(i=!0)),t&&e&&(!n.trash||i))),e||n.fields.push({name:"updatedAt",type:"date",admin:{disableBulkEdit:!0,hidden:!0},index:!0,label:({t:e})=>e("general:updatedAt")}),t||n.fields.push({name:"createdAt",admin:{disableBulkEdit:!0,hidden:!0},type:"date",index:!0,label:({t:e})=>e("general:createdAt")}),n.trash&&!i&&n.fields.push({name:"deletedAt",type:"date",admin:{disableBulkEdit:!0,hidden:!0},index:!0,label:({t:e})=>e("general:deletedAt")})}let l=(0,ta.formatLabels)(n.slug);if(n.labels={plural:n.labels?.plural||l.plural,singular:n.labels?.singular||l.singular},n.versions){if(!1===n.timestamps)throw new e_(t);if(!0===n.versions&&(n.versions={drafts:!1,maxPerDoc:100}),n.versions.maxPerDoc="number"==typeof n.versions.maxPerDoc?n.versions.maxPerDoc:100,n.versions.drafts){!0===n.versions.drafts&&(n.versions.drafts={autosave:!1,validate:!1});let t=td(n.fields);e.localization&&t&&void 0===n.versions.drafts.localizeStatus&&(n.versions.drafts.localizeStatus=!1),n.versions.drafts.localizeStatus&&!e.experimental?.localizeStatus&&(n.versions.drafts.localizeStatus=!1,console.log(tc('Warning: "localizeStatus" for drafts is an experimental feature. To enable, set "experimental.localizeStatus" to true in your Payload config.'))),!0===n.versions.drafts.autosave&&(n.versions.drafts.autosave={interval:th.versionDefaults.autosaveInterval}),void 0===n.versions.drafts.validate&&(n.versions.drafts.validate=!1),n.fields=eO(n.fields,(0,tu.baseVersionFields)({localized:n.versions.drafts.localizeStatus??!1}))}}else delete n.versions;if(!0===n.folders?n.folders={browseByFolder:!0}:n.folders&&(n.folders.browseByFolder=n.folders.browseByFolder??!0),n.upload){!0===n.upload&&(n.upload={}),n.upload.cacheTags=n.upload?.cacheTags??!0,n.upload.bulkUpload=n.upload?.bulkUpload??!0,n.upload.staticDir=n.upload.staticDir||n.slug,n.admin.useAsTitle=n.admin?.useAsTitle&&"id"!==n.admin.useAsTitle?n.admin.useAsTitle:"filename";let t=tn({collection:n,config:e});n.fields=eO(n.fields,t)}if(n.auth){if(n.auth=iA("boolean"==typeof n.auth?{}:n.auth),n.disableDuplicate=n.disableDuplicate??!0,n.auth.loginWithUsername)if(!0===n.auth.loginWithUsername)n.auth.loginWithUsername=ip({});else{let e=ip(n.auth.loginWithUsername);!1===e.allowEmailLogin&&(e.requireUsername=!0),n.auth.loginWithUsername=e}else n.auth.loginWithUsername=!1;t?.admin?.useAsTitle||(n.admin.useAsTitle=n.auth.loginWithUsername?"username":"email"),n.fields=eO(n.fields,eN(n.auth))}t?.admin?.pagination?.limits?.length&&(n.admin.pagination.limits=t.admin.pagination.limits),iw(n);let c=n;return c.joins=a,c.polymorphicJoins=o,c.flattenedFields=(0,ts.flattenAllFields)({fields:c.fields}),c.sanitizedIndexes=iy({fields:c.flattenedFields,indexes:c.indexes}),c},iv={slug:"payload-migrations",admin:{hidden:!0},endpoints:!1,fields:[{name:"name",type:"text"},{name:"batch",type:"number"}],graphQL:!1,lockDocuments:!1};var iB=h;class iQ extends iB.APIError{constructor(e,t){super(`Collection ${e} already in use: "${t}"`)}}var ix=ig,iS=e.i(119942),ik=eS;let iT=e=>"string"==typeof e||"number"==typeof e?e:e.id,iN=({collectionSpecific:e,folderFieldName:t,folderSlug:i,overrides:r={}})=>{let n={name:t,type:"relationship",admin:{},hasMany:!1,index:!0,label:"Folder",relationTo:i,validate:async(t,{collectionSlug:r,data:n,overrideAccess:s,previousValue:a,req:o})=>{if(!e||!t)return!0;let l=iT(t);if(a&&iT(a)===l)return!0;{let e=null;if(("string"==typeof t||"number"==typeof t)&&(e=await o.payload.findByID({id:l,collection:i,depth:0,overrideAccess:s,req:o,select:{folderType:!0},user:o.user})),!e||!r)return`Folder with ID ${l} not found in collection ${i}`;{let t=e.folderType||[];if(0===t.length)return!0;if(r===i){let e=("folderType"in n?n.folderType:[]).filter(e=>!t.includes(e));return 0===e.length||`Folder with ID ${l} does not allow documents of type ${e.join(", ")}`}return!!t.includes(r)||`Folder with ID ${l} does not allow documents of type ${r}`}}}};return r?.admin&&(n.admin={...n.admin,...r.admin||{}},r.admin.components&&(n.admin.components={...n.admin.components,...r.admin.components||{}})),n},iD=({folderFieldName:e,folderSlug:t})=>async({id:i,req:r})=>{await r.payload.delete({collection:t,req:r,where:{[e]:{equals:i}}})},i_=({collectionSlugs:e,folderFieldName:t})=>async({id:i,req:r})=>{for(let n of e)await r.payload.update({collection:n,data:{[t]:null},req:r,where:{[t]:{equals:i}}})};var iR=h,iL=e.i(731161);let iF=({foldersSlug:e})=>async({data:t,originalDoc:i,req:r})=>{let n=iT(i||{}),s=iT(t?.folder||i?.folder||{});if(Array.isArray(t?.folderType)&&t.folderType.length>0){let s=t.folderType,a=Array.isArray(i?.folderType)&&i.folderType.length>0?i.folderType:void 0,o=a?a.filter(e=>!s.includes(e)):s;if(o&&o.length>0){let s=!1;("string"==typeof n||"number"==typeof n)&&(s=(await r.payload.findByID({id:n,collection:e,joins:{documentsAndFolders:{limit:1e8,where:{or:[{relationTo:{in:o}}]}}},overrideAccess:!0,req:r})).documentsAndFolders.docs.length>0);let a=!1;if(s||"string"!=typeof n&&"number"!=typeof n||(a=(await r.payload.find({collection:e,limit:1,req:r,where:{and:[{folderType:{in:o}},{folder:{equals:n}}]}})).totalDocs>0),s||a){let e=o.map(e=>r.payload.collections[e]?.config.labels.singular?(0,iL.getTranslatedLabel)(r.payload.collections[e]?.config.labels.plural,r.i18n):e);throw new iR.APIError(`The folder "${t.name||i.name}" contains ${s?"documents":"folders"} that still belong to the following collections: ${e.join(", ")}`,400)}}}else if((t?.folderType===null||Array.isArray(t?.folderType)&&t?.folderType.length===0)&&s){let n;if("string"==typeof s||"number"==typeof s)try{n=await r.payload.findByID({id:s,collection:e,overrideAccess:!0,req:r,select:{name:!0,folderType:!0},user:r.user})}catch(e){}if(n&&n?.folderType&&Array.isArray(n.folderType)&&n.folderType.length>0)throw new iR.APIError(`The folder "${t?.name||i.name}" must have folder-type set since its parent folder ${n?.name?`"${n?.name}" `:""}has a folder-type set.`,400)}return t};async function iM({folderCollectionSlug:e,folderFieldName:t,folderID:i,parentIDToFind:r,payload:n}){let s=await n.findByID({id:i,collection:e}),a=s[t]?iT(s[t]):void 0;return!!a&&(a===r||iM({folderCollectionSlug:e,folderFieldName:t,folderID:a,parentIDToFind:r,payload:n}))}let iO=({folderFieldName:e})=>async({doc:t,previousDoc:i,req:r})=>{if(i[e]!==t[e]&&t[e]&&r.payload.config.folders){let n=iT(t[e]);n&&await iM({folderCollectionSlug:r.payload.config.folders.slug,folderFieldName:e,folderID:n,parentIDToFind:t.id,payload:r.payload})&&await r.payload.update({id:n,collection:r.payload.config.folders.slug,data:{[e]:i[e]?iT(i[e]):null},req:r})}},iU=({slug:e,collectionSpecific:t,debug:i,folderEnabledCollections:r,folderFieldName:n})=>{let{collectionOptions:s,collectionSlugs:a}=r.reduce((e,t)=>(e.collectionSlugs.push(t.slug),e.collectionOptions.push({label:t.labels?.plural||t.slug,value:t.slug}),e),{collectionOptions:[],collectionSlugs:[]});return{slug:e,access:{create:ik.defaultAccess,delete:ik.defaultAccess,read:ik.defaultAccess,readVersions:ik.defaultAccess,update:ik.defaultAccess},admin:{hidden:!i,useAsTitle:"name"},fields:[{name:"name",type:"text",index:!0,required:!0},iN({collectionSpecific:t,folderFieldName:n,folderSlug:e,overrides:{admin:{hidden:!i}}}),{name:"documentsAndFolders",type:"join",admin:{hidden:!i},collection:[e,...a],hasMany:!0,on:n},...t?[{name:"folderType",type:"select",admin:{components:{Field:{path:"@payloadcms/next/client#FolderTypeField"}},position:"sidebar"},hasMany:!0,options:s}]:[]],hooks:{afterChange:[iO({folderFieldName:n})],afterDelete:[i_({collectionSlugs:a,folderFieldName:n})],beforeDelete:[iD({folderFieldName:n,folderSlug:e})],beforeValidate:[...t?[iF({foldersSlug:e})]:[]]},labels:{plural:"Folders",singular:"Folder"},typescript:{interface:"FolderInterface"}}};async function iP({collectionSpecific:e,config:t,folderEnabledCollections:i,richTextSanitizationPromises:r=[],validRelationships:n=[]}){if(!1===t.folders)return;let s=iU({slug:t.folders.slug,collectionSpecific:e,debug:t.folders.debug,folderEnabledCollections:i,folderFieldName:t.folders.fieldName}),a=t.collections.push(s);if(Array.isArray(t.folders?.collectionOverrides)&&t?.folders.collectionOverrides.length)for(let e of t.folders.collectionOverrides)s=await e({collection:s});let o=await iI(t,s,r,n);t.collections[a-1]=o}let i$=({collection:e,collectionSpecific:t,folderFieldName:i,folderSlug:r})=>{e.fields.push(iN({collectionSpecific:t,folderFieldName:i,folderSlug:r,overrides:{admin:{allowCreate:!1,allowEdit:!1,components:{Cell:"@payloadcms/next/rsc#FolderTableCell",Field:"@payloadcms/next/rsc#FolderField"}}}}))};var ij=eS,iH=eR,iq=eL,iz=ts,iV=ta,iG=tu,iY=th,iW=o,iJ=l,iK=e.i(944329);let iZ=async e=>{let t=f(e),i=await (0,iK.docAccessOperation)({data:e.data,globalConfig:t,req:e});return Response.json(i,{headers:(0,iJ.headersWithCors)({headers:new Headers,req:e}),status:iW.status.OK})};var iX=o,i0=l,i1=v,i2=e.i(397903);let i4=async e=>{let t=f(e),{data:i,searchParams:r}=e,n=i?i.depth:r.get("depth"),s=i?i.flattenLocales:r.has("flattenLocales")?"true"===r.get("flattenLocales"):void 0,a=await (0,i2.findOneOperation)({slug:t.slug,data:i?i?.data:r.get("data")?JSON.parse(r.get("data")):void 0,depth:(0,i1.isNumber)(n)?Number(n):void 0,draft:i?i.draft:"true"===r.get("draft"),flattenLocales:s,globalConfig:t,populate:U(e.query.populate),req:e,select:O(e.query.select)});return Response.json(a,{headers:(0,i0.headersWithCors)({headers:new Headers,req:e}),status:iX.status.OK})};var i5=o,i3=l,i8=v,i9=e.i(215010);let i6=async e=>{let t=f(e),{searchParams:i}=e,r=i.get("depth"),n=await (0,i9.findVersionByIDOperation)({id:e.routeParams.id,depth:(0,i8.isNumber)(r)?Number(r):void 0,globalConfig:t,populate:U(e.query.populate),req:e,select:O(e.query.select)});return Response.json(n,{headers:(0,i3.headersWithCors)({headers:new Headers,req:e}),status:i5.status.OK})};var i7=o,re=l,rt=v,ri=e.i(826948);let rr=async e=>{let t=f(e),{depth:i,limit:r,page:n,pagination:s,populate:a,select:o,sort:l,where:c}=e.query,d=await (0,ri.findVersionsOperation)({depth:(0,rt.isNumber)(i)?Number(i):void 0,globalConfig:t,limit:(0,rt.isNumber)(r)?Number(r):void 0,page:(0,rt.isNumber)(n)?Number(n):void 0,pagination:"false"!==s&&void 0,populate:U(a),req:e,select:O(o),sort:tg(l),where:c});return Response.json(d,{headers:(0,re.headersWithCors)({headers:new Headers,req:e}),status:i7.status.OK})};var rn=o,rs=e.i(521077),ra=l,ro=v;let rl=async e=>{let t=f(e),{searchParams:i}=e,r=i.get("depth"),n=i.get("draft"),s=await (0,rs.restoreVersionOperationGlobal)({id:e.routeParams.id,depth:(0,ro.isNumber)(r)?Number(r):void 0,draft:"true"===n||void 0,globalConfig:t,populate:U(e.query.populate),req:e});return Response.json({doc:s,message:e.t("version:restoredSuccessfully")},{headers:(0,ra.headersWithCors)({headers:new Headers,req:e}),status:rn.status.OK})};var rc=o,rd=l,ru=v,rh=e.i(964530);let rA=a([{handler:iZ,method:"post",path:"/access"},{handler:i4,method:"get",path:"/"},{handler:i6,method:"get",path:"/versions/:id"},{handler:rr,method:"get",path:"/versions"},{handler:rl,method:"post",path:"/versions/:id"},{handler:async e=>{let t=f(e),{searchParams:i}=e,r=i.get("depth"),n="true"===i.get("draft"),s="true"===i.get("autosave"),a=e.query.publishSpecificLocale,o="true"===i.get("publishAllLocales"),l="true"===i.get("unpublishAllLocales"),c=await (0,rh.updateOperation)({slug:t.slug,autosave:s,data:e.data,depth:(0,ru.isNumber)(r)?Number(r):void 0,draft:n,globalConfig:t,populate:U(e.query.populate),publishAllLocales:o,publishSpecificLocale:a,req:e,select:O(e.query.select),unpublishAllLocales:l}),d=e.t("general:updatedSuccessfully");return n&&(d=e.t("version:draftSavedSuccessfully")),s&&(d=e.t("version:autosavedSuccessfully")),Response.json({message:d,result:c},{headers:(0,rd.headersWithCors)({headers:new Headers,req:e}),status:rc.status.OK})},method:"post",path:"/"}]),rp=async(e,t,i,r)=>{if(t._sanitized)return t;t._sanitized=!0,t.label=t.label||(0,iV.toWords)(t.slug),t.endpoints=t.endpoints??[],t.hooks||(t.hooks={}),t.access||(t.access={}),t.admin||(t.admin={}),t.access.read||(t.access.read=ij.defaultAccess),t.access.update||(t.access.update=ij.defaultAccess),t.hooks.beforeValidate||(t.hooks.beforeValidate=[]),t.hooks.beforeChange||(t.hooks.beforeChange=[]),t.hooks.afterChange||(t.hooks.afterChange=[]),t.hooks.beforeRead||(t.hooks.beforeRead=[]),t.hooks.afterRead||(t.hooks.afterRead=[]);let n=r??e.collections?.map(e=>e.slug)??[];if(t.fields=await (0,iH.sanitizeFields)({config:e,fields:t.fields,globalConfig:t,parentIsLocalized:!1,richTextSanitizationPromises:i,validRelationships:n}),!1!==t.endpoints)for(let e of(t.endpoints||(t.endpoints=[]),rA))t.endpoints.push(e);if(t.versions&&(!0===t.versions&&(t.versions={drafts:!1,max:100}),t.versions.max="number"==typeof t.versions.max?t.versions.max:100,t.versions.drafts)){!0===t.versions.drafts&&(t.versions.drafts={autosave:!1,validate:!1});let i=td(t.fields);e.localization&&i&&void 0===t.versions.drafts.localizeStatus&&(t.versions.drafts.localizeStatus=!1),t.versions.drafts.localizeStatus=!!e.experimental?.localizeStatus&&t.versions.drafts.localizeStatus,!0===t.versions.drafts.autosave&&(t.versions.drafts.autosave={interval:iY.versionDefaults.autosaveInterval}),void 0===t.versions.drafts.validate&&(t.versions.drafts.validate=!1),t.fields=eO(t.fields,(0,iG.baseVersionFields)({localized:t.versions.drafts.localizeStatus??!1}))}t.custom||(t.custom={});let s=null,a=null;return t.fields.some(e=>((0,iq.fieldAffectsData)(e)&&("updatedAt"===e.name&&(s=!0),"createdAt"===e.name&&(a=!0)),a&&s)),s||t.fields.push({name:"updatedAt",type:"date",admin:{disableBulkEdit:!0,hidden:!0},label:({t:e})=>e("general:updatedAt")}),a||t.fields.push({name:"createdAt",type:"date",admin:{disableBulkEdit:!0,hidden:!0},label:({t:e})=>e("general:createdAt")}),t.flattenedFields=(0,iz.flattenAllFields)({fields:t.fields}),t};var rf=e.i(598289),rg=ta,rm=eR,ry=e.i(350947),rb=e.i(725740);let rE=e=>e?e.or&&!e.and?{or:e.or.map(e=>e.and?e:{and:[e]})}:e.and&&!e.or?{or:[{and:e.and}]}:e.or||e.and?e:{or:[{and:[e]}]}:{};var rC=e.i(799028);let rw=e=>!!(e?.or&&(e?.or?.length===0||e?.or?.length>0&&e?.or?.[0]?.and&&e?.or?.[0]?.and?.length>0))&&e.or.every(e=>!!(e.and&&Array.isArray(e.and))&&e.and.every(e=>{if("object"!=typeof e)return!1;let t=Object.keys(e);if(0===t.length)return!1;for(let i of t){let t=Object.keys(e[i])[0];if(!t||!rC.validOperatorSet.has(t))return!1}return!0}));var rI=eS;let rv=["delete","read","update","create"],rB={create:rI.defaultAccess,delete:rI.defaultAccess,read:rI.defaultAccess,unlock:rI.defaultAccess,update:rI.defaultAccess},rQ=e=>rv.reduce((t,i)=>(t[i]=async t=>{let{req:r}=t,n=e?.queryPresets?.access?.[i]?await e.queryPresets.access[i](t):!rB?.[i]||rB[i](t);return!1!==n&&("create"===i?n:{and:[{or:[...r?.user?[{and:[{[`access.${i}.users`]:{in:[r.user.id]}},{[`access.${i}.constraint`]:{in:["onlyMe","specificUsers"]}}]}]:[],{[`access.${i}.constraint`]:{equals:"everyone"}},...await Promise.all((e?.queryPresets?.constraints?.[i]||[]).map(async e=>{let r=e.access?await e.access(t):void 0;return{and:[..."object"==typeof r?[r]:!1===r?[{id:{equals:null}}]:[],{[`access.${i}.constraint`]:{equals:e.value}}]}}))]},..."object"==typeof n?[n]:[]]})},t),{});var rx=tw,rS=eL,rk=ta,rT=h,rN=e.i(680110),rD=ee,r_=et;let rR=async(e,{data:t,overrideAccess:i,req:r})=>{if(!r.context._preventLockout&&!i){let e=await (0,rN.createLocalReq)({context:{_preventLockout:!0},req:{user:r.user}},r.payload),i=await (0,rD.initTransaction)(e),n=await e.payload.create({collection:rO,data:{...t,isTemp:!0},req:e}),s=!1,a=!1;try{await e.payload.findByID({id:n.id,collection:rO,overrideAccess:!1,req:e,user:e.user}),a=!0,await e.payload.update({id:n.id,collection:rO,data:n,overrideAccess:!1,req:e,user:e.user}),s=!0}catch(e){if(!a||!s)throw new rT.APIError("This action will lock you out of this preset.",403,{},!0)}finally{i?await (0,r_.killTransaction)(e):await e.payload.delete({id:n.id,collection:rO,req:e})}}return!0},rL=["read","update","delete"],rF=[{label:"Everyone",value:"everyone"},{label:"Only Me",value:"onlyMe"},{label:"Specific Users",value:"specificUsers"}],rM=e=>({name:"access",type:"group",admin:{components:{Cell:"@payloadcms/next/client#QueryPresetsAccessCell"},condition:e=>!!e?.isShared},fields:rL.map(t=>({type:"collapsible",fields:[{name:t,type:"group",admin:{hideGutter:!0},fields:[{name:"constraint",type:"select",defaultValue:"onlyMe",filterOptions:t=>"function"==typeof e?.queryPresets?.filterConstraints?e.queryPresets.filterConstraints(t):t.options,label:({i18n:i})=>`Specify who can ${t} this ${(0,rx.getTranslation)(e.queryPresets?.labels?.singular||"Preset",i)}`,options:[...rF,...e?.queryPresets?.constraints?.[t]?.map(e=>({label:e.label,value:e.value}))||[]]},{name:"users",type:"relationship",admin:{condition:e=>e?.access?.[t]?.constraint==="specificUsers"},hasMany:!0,hooks:{beforeChange:[({data:e,req:i})=>e?.access?.[t]?.constraint==="onlyMe"&&i.user?[i.user.id]:e?.access?.[t]?.constraint==="specificUsers"&&i.user?[...e?.access?.[t]?.users||[],i.user.id]:void 0]},relationTo:e.admin?.user??"users"},...e?.queryPresets?.constraints?.[t]?.reduce((e,i)=>(i.fields?.forEach((r,n)=>{e.push({...r}),(0,rS.fieldAffectsData)(r)&&(e[n].admin={...e[n]?.admin||{},condition:e=>e?.access?.[t]?.constraint===i.value})}),e),[])||[]],label:!1}],label:()=>(0,rk.toWords)(t)})),label:"Sharing settings",validate:rR}),rO="payload-query-presets",rU=e=>({slug:rO,access:rQ(e),admin:{defaultColumns:["title","isShared","access","where","columns","groupBy"],hidden:!0,useAsTitle:"title"},fields:[{name:"title",type:"text",required:!0},{name:"isShared",type:"checkbox",defaultValue:!1,validate:(e,{data:t})=>{let i=t;if(i?.access){let t=Object.values(i.access).some(e=>"onlyMe"!==e.constraint);if(!e&&t)return'If any constraint is not "onlyMe", the preset must be shared'}return!0}},rM(e),{name:"where",type:"json",admin:{components:{Cell:"@payloadcms/next/client#QueryPresetsWhereCell",Field:"@payloadcms/next/client#QueryPresetsWhereField"}},hooks:{beforeValidate:[({data:e})=>{if(e?.where)if(rw(e.where))return e.where;else return rE(e.where);return e?.where}]},label:"Filters"},{name:"columns",type:"json",admin:{components:{Cell:"@payloadcms/next/client#QueryPresetsColumnsCell",Field:"@payloadcms/next/client#QueryPresetsColumnField"}},validate:e=>{if(e)try{JSON.parse(JSON.stringify(e))}catch{return"Invalid JSON"}return!0}},{name:"groupBy",type:"text",admin:{components:{Cell:"@payloadcms/next/client#QueryPresetsGroupByCell",Field:"@payloadcms/next/client#QueryPresetsGroupByField"}},label:"Group By"},{name:"relatedCollection",type:"select",admin:{hidden:!0},options:e.collections?e.collections.reduce((e,t)=>(t.enableQueryPresets&&e.push({label:t.labels?.plural||t.slug,value:t.slug}),e),[]):[],required:!0},{name:"isTemp",type:"checkbox",admin:{description:"This is a temporary field used to determine if updating the preset would remove the user's access to it. When `true`, this record will be deleted after running the preset's `validate` function.",disabled:!0,hidden:!0}}],hooks:{beforeValidate:[({data:e,operation:t})=>{let i=e;if(("create"===t||"update"===t)&&(rL.forEach(e=>{i.access||(i.access={}),i.access?.[e]||(i[e]={}),i.access[e]?.constraint||(i.access[e]={...i.access[e],constraint:"onlyMe"})}),i?.access)){let e=Object.values(i.access).some(e=>"onlyMe"!==e.constraint);i.isShared=e}return i}]},labels:{plural:"Presets",singular:"Preset",...e.queryPresets?.labels||{}},lockDocuments:!1});var rP=e.i(381692),r$=e.i(899777),rj=ts,rH=e.i(974605),rq=e.i(27568);let rz=({adminUserSlug:e,collections:t,globals:i})=>({slug:"schedulePublish",handler:async({input:t,req:i})=>{let r,n=t?.type!=="publish"&&t?.type?"draft":"published",s=t.user,a=null;return s&&((a=await i.payload.findByID({id:s,collection:e,depth:0})).collection=e),t?.type==="publish"&&t.locale&&i.payload.config.localization&&i.payload.config.localization.locales.find(({code:e})=>e===t.locale)&&(r=t.locale),t.doc&&await i.payload.update({id:t.doc.value,collection:t.doc.relationTo,data:{_status:n},depth:0,overrideAccess:null===a,publishSpecificLocale:r,user:a}),t.global&&await i.payload.updateGlobal({slug:t.global,data:{_status:n},depth:0,overrideAccess:null===a,publishSpecificLocale:r,user:a}),{output:{}}},inputSchema:[{name:"type",type:"radio",defaultValue:"publish",options:["publish","unpublish"]},{name:"locale",type:"text"},...t.length>0?[{name:"doc",type:"relationship",relationTo:t}]:[],{name:"global",type:"select",options:i},{name:"user",type:"relationship",relationTo:e}]});var rV=eS;let rG="payload-folders",rY="folder",rW={};class rJ{payload;collectionSlug;constructor(e,t){this.payload=e,this.collectionSlug=t}async clear(){await this.payload.db.deleteMany({collection:this.collectionSlug,req:rW,where:{}})}async delete(e){await this.payload.db.deleteOne({collection:this.collectionSlug,req:rW,where:{key:{equals:e}}})}async get(e){let t=await this.payload.db.findOne({collection:this.collectionSlug,joins:!1,req:rW,select:{data:!0,key:!0},where:{key:{equals:e}}});return null===t?null:t.data}async has(e){let{totalDocs:t}=await this.payload.db.count({collection:this.collectionSlug,req:rW,where:{key:{equals:e}}});return t>0}async keys(){return(await this.payload.db.find({collection:this.collectionSlug,limit:0,pagination:!1,req:rW,select:{key:!0}})).docs.map(e=>e.key)}async set(e,t){await this.payload.db.upsert({collection:this.collectionSlug,data:{data:t,key:e},joins:!1,req:rW,select:{},where:{key:{equals:e}}})}}let rK=(e={})=>{let t=e.kvCollectionOverrides?.slug??"payload-kv";return{init:({payload:e})=>new rJ(e,t),kvCollection:{slug:t,access:{create:()=>!1,delete:()=>!1,read:()=>!1,update:()=>!1},admin:{hidden:!0},fields:[{name:"key",type:"text",index:!0,required:!0,unique:!0},{name:"data",type:"json",required:!0}],lockDocuments:!1,timestamps:!1,...e.kvCollectionOverrides}}};"function"==typeof process?.cwd&&process.cwd(),"function"==typeof process?.cwd&&process.cwd(),rV.defaultAccess,rV.defaultAccess,rV.defaultAccess,"function"==typeof process?.cwd&&process.cwd();let rZ=e=>(e.admin={avatar:"gravatar",components:{},custom:{},dateFormat:"MMMM do yyyy, h:mm a",dependencies:{},theme:"all",...e.admin||{},importMap:{baseDir:`${"function"==typeof process?.cwd?process.cwd():""}`,...e?.admin?.importMap||{}},meta:{defaultOGImageType:"dynamic",robots:"noindex, nofollow",titleSuffix:"- Payload",...e?.admin?.meta||{}},routes:{account:"/account",browseByFolder:"/browse-by-folder",createFirstUser:"/create-first-user",forgot:"/forgot",inactivity:"/logout-inactivity",login:"/login",logout:"/logout",reset:"/reset",unauthorized:"/unauthorized",...e?.admin?.routes||{}}},e.bin=e.bin??[],e.collections=e.collections??[],e.cookiePrefix=e.cookiePrefix??"payload",e.cors=e.cors??[],e.csrf=e.csrf??[],e.custom=e.custom??{},e.defaultDepth=e.defaultDepth??2,e.defaultMaxTextLength=e.defaultMaxTextLength??4e4,e.endpoints=e.endpoints??[],e.globals=e.globals??[],e.graphQL={disableIntrospectionInProduction:!0,disablePlaygroundInProduction:!0,maxComplexity:1e3,schemaOutputFile:`${"function"==typeof process?.cwd?process.cwd():""}/schema.graphql`,...e.graphQL||{}},e.hooks=e.hooks??{},e.i18n=e.i18n??{},e.jobs={deleteJobOnComplete:!0,depth:0,...e.jobs||{},access:{cancel:rV.defaultAccess,queue:rV.defaultAccess,run:rV.defaultAccess,...e.jobs?.access||{}}},e.localization=e.localization??!1,e.maxDepth=e.maxDepth??10,e.routes={admin:"/admin",api:"/api",graphQL:"/graphql",graphQLPlayground:"/graphql-playground",...e.routes||{}},e.serverURL=e.serverURL??"",e.telemetry=e.telemetry??!0,e.typescript={autoGenerate:!0,outputFile:`${"function"==typeof process?.cwd?process.cwd():""}/payload-types.ts`,...e.typescript||{}},e.upload=e.upload??{},e.auth={jwtOrder:["JWT","Bearer","cookie"],...e.auth||{}},e.kv=e.kv??rK(),e.kv?.kvCollection&&e.collections.push(e.kv.kvCollection),!1!==e.folders&&e.collections.some(e=>!!e.folders)?e.folders={slug:e.folders?.slug??rG,browseByFolder:e.folders?.browseByFolder??!0,collectionOverrides:e.folders?.collectionOverrides||void 0,collectionSpecific:e.folders?.collectionSpecific??!0,debug:e.folders?.debug??!1,fieldName:e.folders?.fieldName??rY}:e.folders=!1,e);var rX=o,r0=eq,r1=h,r2=e.i(581848),r4=X,r5=ee,r3=et,r8=e.i(142262);let r9="0123456789abcdefghijklmnopqrstuvwxyz";function r6(e,t,i){let r=i[0];if(null!=t&&e>=t)throw Error(e+" >= "+t);if(e.slice(-1)===r||t&&t.slice(-1)===r)throw Error("trailing zero");if(t){let n=0;for(;(e[n]||r)===t[n];)n++;if(n>0)return t.slice(0,n)+r6(e.slice(n),t.slice(n),i)}let n=e?i.indexOf(e[0]):0,s=null!=t?i.indexOf(t[0]):i.length;return s-n>1?i[Math.round(.5*(n+s))]:t&&t.length>1?t.slice(0,1):i[n]+r6(e.slice(1),null,i)}function r7(e){if(e.length!==ne(e[0]))throw Error("invalid integer part of order key: "+e)}function ne(e){if(e>="0"&&e<="9")return 11-(e.charCodeAt(0)-48);if(e>="a"&&e<="z")return e.charCodeAt(0)-97+2;if(e>="A"&&e<="Z")return 90-e.charCodeAt(0)+2;throw Error("invalid order key head: "+e)}function nt(e){let t=ne(e[0]);if(t>e.length)throw Error("invalid order key: "+e);return e.slice(0,t)}let ni="0"+r9[0].repeat(10);function nr(e,t){if(e===ni||e==="A"+t[0].repeat(26))throw Error("invalid order key: "+e);let i=nt(e);if(e.slice(i.length).slice(-1)===t[0])throw Error("invalid order key: "+e)}function nn(e,t){r7(e);let[i,...r]=e.split(""),n=!0;for(let e=r.length-1;n&&e>=0;e--){let i=t.indexOf(r[e])+1;i===t.length?r[e]=t[0]:(r[e]=t[i],n=!1)}if(!n)return i+r.join("");{let e;if("9"===i||"Z"===i)return"a"+t[0];if("z"===i)return null;if(i>="0"&&i<="8")e=String.fromCharCode(i.charCodeAt(0)+1),r.pop();else if(i>="a"&&i<="y")e=String.fromCharCode(i.charCodeAt(0)+1),r.push(t[0]);else if(i>="A"&&i<="Y")e=String.fromCharCode(i.charCodeAt(0)+1),r.pop();else throw Error("invalid head: "+i);return e+r.join("")}}function ns(e,t){r7(e);let[i,...r]=e.split(""),n=!0;for(let e=r.length-1;n&&e>=0;e--){let i=t.indexOf(r[e])-1;-1===i?r[e]=t.slice(-1):(r[e]=t[i],n=!1)}if(!n)return i+r.join("");{let e;if("a"===i)return"9"+t.slice(-1);if("0"===i)return null;if(i>="1"&&i<="9")e=String.fromCharCode(i.charCodeAt(0)-1),r.push(t.slice(-1));else if(i>="b"&&i<="z")e=String.fromCharCode(i.charCodeAt(0)-1),r.pop();else if(i>="B"&&i<="Z")e=String.fromCharCode(i.charCodeAt(0)-1),r.push(t.slice(-1));else if("A"===i)return null;else throw Error("invalid head: "+i);return e+r.join("")}}function na(e,t,i=r9){if(null!=e&&nr(e,i),null!=t&&nr(t,i),null!=e&&null!=t&&e>=t)throw Error(e+" >= "+t);if(null==e){if(null==t)return"a"+i[0];let e=nt(t),r=t.slice(e.length);if(e===ni||e==="A"+i[0].repeat(26))return e+r6("",r,i);if(e<t)return e;let n=ns(e,i);if(null==n)throw Error("cannot decrement any more");return n}if(null==t){let t=nt(e),r=e.slice(t.length),n=nn(t,i);return null==n?t+r6(r,null,i):n}let r=nt(e),n=e.slice(r.length),s=nt(t),a=t.slice(s.length);if(r===s)return r+r6(n,a,i);let o=nn(r,i);if(null==o)throw Error("cannot increment any more");return o<t?o:r+r6(n,null,i)}function no(e,t,i,r=r9){if(0===i)return[];if(1===i)return[na(e,t,r)];if(null==t){let n=na(e,t,r),s=[n];for(let e=0;e<i-1;e++)s.push(n=na(n,t,r));return s}if(null==e){let n=na(e,t,r),s=[n];for(let t=0;t<i-1;t++)s.push(n=na(e,n,r));return s.reverse(),s}let n=Math.floor(i/2),s=na(e,t,r);return[...no(e,s,n,r),s,...no(s,t,i-n-1,r)]}function nl(e){let{joinOnFieldPath:t,scopeValue:i}=e;if(void 0===i)return null;if(Array.isArray(i))return nl({joinOnFieldPath:t,scopeValue:i[0]});if(i&&"object"==typeof i&&"relationTo"in i&&"value"in i){let e=i.relationTo,r=i.value;return void 0===e||void 0===r?null:{and:[{[`${t}.relationTo`]:{equals:e}},{[`${t}.value`]:{equals:r}}]}}return{[t]:{equals:i}}}function nc(e,t){if(!e||"object"!=typeof e)return;let i=t.split("."),r=e;for(let e of i){if(!r||"object"!=typeof r)return;r=r[e]}return r}async function nd(e){let{collectionSlug:t,joinFieldPathsByCollection:i,orderableFieldName:r,req:n,target:s}=e,a=i.get(t)?.get(r),o=null;if("object"==typeof s&&s&&"id"in s&&(a||"key"in s&&"pending"===s.key)){let e=s.id;("number"==typeof e||"string"==typeof e)&&(o=await n.payload.findByID({id:e,collection:t,depth:0,req:n,select:{...a?{[a]:!0}:{},[r]:!0}}))}if(!a)return{joinScopeWhere:null,targetDoc:o};let l=nc(o,a);return{joinScopeWhere:nl({joinOnFieldPath:a,scopeValue:l}),targetDoc:o}}function nu(e){let{collectionSlug:t,data:i,joinFieldPathsByCollection:r,orderableFieldName:n,originalDoc:s}=e,a=r?.get(t)?.get(n);if(!a)return null;let o=nc(i,a)??nc(s,a);return nl({joinOnFieldPath:a,scopeValue:o})}async function nh(e){let{collectionSlug:t,orderableFieldName:i,req:r,targetDoc:n,targetID:s,targetKey:a}=e;if("pending"!==a)return a;let o=n?.[i];if("string"==typeof o)return o;let l=await r.payload.findByID({id:s,collection:t,depth:0,req:r,select:{[i]:!0}});return l?.[i]||null}let nA=e=>{let t=new Map,i=new Map;e.collections.forEach(r=>{if(r.orderable){let e=t.get(r)||[];t.set(r,[...e,"_order"]),r.defaultSort=r.defaultSort??"_order"}(0,r8.traverseFields)({callback:({field:r,parentRef:n,ref:s})=>{if("array"===r.type||"blocks"===r.type)return!1;if("group"===r.type||"tab"===r.type){let e=n?.prefix?`${n.prefix}_`:"";s.prefix=`${e}${r.name}`}if("join"===r.type&&!0===r.orderable){if(Array.isArray(r.collection))throw new r1.APIError("Orderable joins must target a single collection",rX.status.BAD_REQUEST,{},!0);let s=e.collections.find(e=>e.slug===r.collection);if(!s)return!1;r.defaultSort=r.defaultSort??`_${r.collection}_${r.name}_order`;let a=t.get(s)||[],o=n?.prefix?`${n.prefix}_`:"",l=`_${r.collection}_${o}${r.name}_order`;t.set(s,[...a,l]);let c=i.get(s.slug)||new Map;c.set(l,r.on),i.set(s.slug,c)}},fields:r.fields})}),Array.from(t.entries()).forEach(([e,t])=>{np(e,t,i)}),t.size>0&&nf(e,i)},np=(e,t,i)=>{t.forEach(t=>{let i={name:t,type:"text",admin:{disableBulkEdit:!0,disabled:!0,disableGroupBy:!0,disableListColumn:!0,disableListFilter:!0,hidden:!0,readOnly:!0},hooks:{beforeDuplicate:[({siblingData:e})=>{delete e[t]}]},index:!0};e.fields.unshift(i)}),e.hooks||(e.hooks={}),e.hooks.beforeChange||(e.hooks.beforeChange=[]);let r=async({data:r,originalDoc:n,req:s})=>{for(let a of t)if(!r[a]&&!n?.[a]){let t=nu({collectionSlug:e.slug,data:r,joinFieldPathsByCollection:i,orderableFieldName:a,originalDoc:n}),o=await s.payload.find({collection:e.slug,depth:0,limit:1,pagination:!1,req:s,select:{[a]:!0},sort:`-${a}`,where:(0,r2.combineWhereConstraints)([{[a]:{exists:!0}},t??void 0])}),l=o.docs[0]?.[a]||null;r[a]=na(l,null)}return r};e.hooks.beforeChange.push(r)},nf=(e,t)=>{let i={handler:async i=>{let{collectionSlug:r,docsToMove:n,newKeyWillBe:s,orderableFieldName:a,target:o}=await i.json?.();if(!Array.isArray(n)||0===n.length)return new Response(JSON.stringify({error:"docsToMove must be a non-empty array"}),{headers:{"Content-Type":"application/json"},status:400});if("greater"!==s&&"less"!==s)return new Response(JSON.stringify({error:'newKeyWillBe must be "greater" or "less"'}),{headers:{"Content-Type":"application/json"},status:400});let l=e.collections.find(e=>e.slug===r);if(!l)return new Response(JSON.stringify({error:`Collection ${r} not found`}),{headers:{"Content-Type":"application/json"},status:400});if("string"!=typeof a)return new Response(JSON.stringify({error:"orderableFieldName must be a string"}),{headers:{"Content-Type":"application/json"},status:400});let{joinScopeWhere:c,targetDoc:d}=await nd({collectionSlug:l.slug,joinFieldPathsByCollection:t,orderableFieldName:a,req:i,target:o});if(l.access?.update&&await (0,r0.executeAccess)({id:n[0],data:{},req:i},l.access.update),!o.key){let{docs:e}=await i.payload.find({collection:l.slug,depth:0,limit:0,req:i,select:{[a]:!0},where:(0,r2.combineWhereConstraints)([{[a]:{exists:!1}},c??void 0])});await (0,r5.initTransaction)(i);try{for(let t of e)await i.payload.update({id:t.id,collection:l.slug,data:{},depth:0,req:i}),await (0,r4.commitTransaction)(i)}catch(e){if(await (0,r3.killTransaction)(i),e instanceof Error)throw new r1.APIError(e.message,rX.status.INTERNAL_SERVER_ERROR)}return new Response(JSON.stringify({message:"initial migration",success:!0}),{headers:{"Content-Type":"application/json"},status:200})}if("object"!=typeof o||void 0===o.id||"string"!=typeof o.key)return new Response(JSON.stringify({error:"target must be an object with id"}),{headers:{"Content-Type":"application/json"},status:400});let u=o.id,h=await nh({collectionSlug:l.slug,orderableFieldName:a,req:i,targetDoc:d,targetID:u,targetKey:o.key}),A=await i.payload.find({collection:l.slug,depth:0,limit:1,pagination:!1,select:{[a]:!0},sort:"greater"===s?a:`-${a}`,where:(0,r2.combineWhereConstraints)([{[a]:{["greater"===s?"greater_than":"less_than"]:h}},c??void 0])}),p=A.docs?.[0]?.[a]||null,f="greater"===s?no(h,p,n.length):no(p,h,n.length);for(let[e,t]of n.entries())await i.payload.update({id:t,collection:l.slug,data:{[a]:f[e]},depth:0,req:i});return new Response(JSON.stringify({orderValues:f,success:!0}),{headers:{"Content-Type":"application/json"},status:200})},method:"post",path:"/reorder"};e.endpoints||(e.endpoints=[]),e.endpoints.push(i)},ng=e=>{let t={...e};if(e?.compatibility?.allowLocalizedWithinLocalized&&(process.env.NEXT_PUBLIC_PAYLOAD_COMPATIBILITY_allowLocalizedWithinLocalized="true"),t.loggingLevels={Forbidden:"info",Locked:"info",MissingFile:"info",NotFound:"info",ValidationError:"info",...t.loggingLevels||{}},(t.admin.dashboard??={widgets:[]}).widgets.push({slug:"collections",Component:"@payloadcms/next/rsc#CollectionCards",minWidth:"full"}),t.admin.dashboard.defaultLayout??=[{widgetSlug:"collections",width:"full"}],!t?.admin?.user){let e=t.collections.find(({auth:e})=>!!e);e?t.admin.user=e.slug:(t.admin.user=r.slug,t.collections.push(r))}let i=t.collections.find(({slug:e})=>e===t.admin.user);if(!i||!i.auth)throw new ix.InvalidConfiguration(`${t.admin.user} is not a valid admin user collection`);return t?.admin?.timezones?("function"==typeof e?.admin?.timezones?.supportedTimezones&&(t.admin.timezones.supportedTimezones=e.admin.timezones.supportedTimezones({defaultTimezones:iS.defaultTimezones})),t?.admin?.timezones?.supportedTimezones||(t.admin.timezones.supportedTimezones=iS.defaultTimezones)):t.admin.timezones={supportedTimezones:iS.defaultTimezones},(0,rq.validateTimezones)({source:"admin.timezones.supportedTimezones",timezones:t.admin.timezones.supportedTimezones}),t},nm=async e=>{let r=rZ(e),n=ng(r);for(let e of(nA(n),n.endpoints||(n.endpoints=[]),ey))n.endpoints.push(e);n.localization&&n.localization.locales?.length>0&&("string"==typeof n.localization.locales[0]?(n.localization.localeCodes=[...n.localization.locales],n.localization.locales=n.localization.locales.map(e=>({code:e,label:e,rtl:!1,toString:()=>e}))):(n.localization.localeCodes=n.localization.locales.map(e=>e.code),n.localization.locales=n.localization.locales.map(e=>({...e,toString:()=>e.code}))),n.localization.fallback=n.localization?.fallback??!0);let s={fallbackLanguage:"en",supportedLanguages:{en:t.en},translations:{}};if(e?.i18n){s.supportedLanguages=e.i18n?.supportedLanguages||s.supportedLanguages;let t=Object.keys(s.supportedLanguages),i=e.i18n?.fallbackLanguage||s.fallbackLanguage;s.fallbackLanguage=t.includes(i)?i:t[0],s.translations=e.i18n?.translations||s.translations}n.i18n=s;let a=[],o=[],l=[],c=[],d=new Set,u=[...n.collections?.map(e=>e.slug)??[],rP.jobsCollectionSlug,ry.lockedDocumentsCollectionSlug,rb.preferencesCollectionSlug];for(let e of(!1!==n.folders&&u.push(n.folders.slug),n.admin?.dashboard?.widgets??[]))e.fields?.length&&(e.fields=await (0,rm.sanitizeFields)({config:n,existingFieldNames:new Set,fields:e.fields,parentIsLocalized:!1,richTextSanitizationPromises:a,validRelationships:u}));if(n.blocks=[],e.blocks?.length)for(let t of e.blocks){let e=t;if(!0===e._sanitized)continue;e._sanitized=!0,e.fields=e.fields.concat(rf.baseBlockFields),e.labels=e.labels?e.labels:(0,rg.formatLabels)(e.slug),e.fields=await (0,rm.sanitizeFields)({config:n,existingFieldNames:new Set,fields:e.fields,parentIsLocalized:!1,richTextSanitizationPromises:a,validRelationships:u});let i=(0,rj.flattenBlock)({block:t});n.blocks.push(i)}let h=[];for(let e=0;e<n.collections.length;e++){if(d.has(n.collections[e].slug))throw new iQ("slug",n.collections[e].slug);d.add(n.collections[e].slug);let t=n.collections[e]?.versions?.drafts;"object"==typeof t&&t.schedulePublish&&o.push(n.collections[e].slug),n.collections[e].enableQueryPresets&&(l.push(n.collections[e].slug),u.includes(rO)||u.push(rO)),!1!==n.folders&&n.collections[e].folders&&i$({collection:n.collections[e],collectionSpecific:n.folders.collectionSpecific,folderFieldName:n.folders.fieldName,folderSlug:n.folders.slug}),n.collections[e]=await iI(n,n.collections[e],a,u),!1!==n.folders&&n.collections[e].folders&&h.push(n.collections[e])}if(n.globals.length>0)for(let e=0;e<n.globals.length;e++)(0,rH.hasScheduledPublishEnabled)(n.globals[e])&&c.push(n.globals[e].slug),n.globals[e]=await rp(n,n.globals[e],a,u);if((o.length||c.length)&&((n.jobs??={}).tasks??=[]).push(rz({adminUserSlug:n.admin.user,collections:o,globals:c})),(n.jobs??={}).enabled=!!(Array.isArray(r.jobs?.tasks)&&r.jobs?.tasks?.length||Array.isArray(r.jobs?.workflows)&&r.jobs?.workflows?.length),n.jobs.enabled){(n?.jobs?.tasks?.length&&n.jobs.tasks.some(e=>e.schedule)||n?.jobs?.workflows?.length&&n.jobs.workflows.some(e=>e.schedule))&&(n.jobs.scheduling=!0,(n.globals??=[]).push(await rp(n,(0,r$.getJobStatsGlobal)(n),a,u)),n.jobs.stats=!0);let e=(0,rP.getDefaultJobsCollection)(n.jobs);if("function"==typeof n.jobs.jobsCollectionOverrides){e=n.jobs.jobsCollectionOverrides({defaultJobsCollection:e});let t=e?.hooks;if(t&&n?.jobs?.runHooks!==!0)for(let[e,i]of Object.entries(t)){let t=+("afterRead"===e||"beforeChange"===e);if(i.length>t){console.warn(`The jobsCollectionOverrides function is returning a collection with an additional ${e} hook defined. These hooks will not run unless the jobs.runHooks option is set to true. Setting this option to true will negatively impact performance.`);break}}}let t=await iI(n,e,a,u);(n.collections??=[]).push(t)}!1!==n.folders&&h.length&&await iP({collectionSpecific:n.folders.collectionSpecific,config:n,folderEnabledCollections:h,richTextSanitizationPromises:a,validRelationships:u});let A=(0,ry.getLockedDocumentsCollection)(n);A&&r.collections.push(await iI(n,A,a,u)),r.collections.push(await iI(n,(0,rb.getPreferencesCollection)(n),a,u));let p=await iI(n,iv,a,u);n?.db?.indexSortableFields&&(p.indexes=[{fields:["batch","name"],unique:!1}]),r.collections.push(p),l.length>0&&r.collections.push(await iI(n,rU(n),a,u)),""!==n.serverURL&&n.csrf.push(n.serverURL);let f=new Set;for(let e of n.collections)e.upload?.adapter&&f.add(e.upload.adapter);n.upload||(n.upload={adapters:[]}),n.upload.adapters=Array.from(new Set(n.collections.map(e=>e.upload?.adapter).filter(Boolean))),e.email&&(n.email=e.email),"function"==typeof e.editor&&(n.editor=await e.editor({config:n,isRoot:!0,parentIsLocalized:!1}),n.editor.i18n&&Object.keys(n.editor.i18n).length>=0&&(n.i18n.translations=(0,i.deepMergeSimple)(n.i18n.translations,n.editor.i18n)));let g=[];for(let e of a)g.push(e(n));return await Promise.all(g),n};async function ny(e){if(Array.isArray(e.plugins)){let t=e;for(let i of e.plugins)t=await i(t);return await nm(t)}return await nm(e)}e.s(["buildConfig",()=>ny],678721)},423121,700341,e=>{"use strict";var t=e.i(254799);let i={randomUUID:t.default.randomUUID};var r=t;let n=new Uint8Array(256),s=n.length;function a(){return s>n.length-16&&(r.default.randomFillSync(n),s=0),n.slice(s,s+=16)}let o=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i,l=function(e){return"string"==typeof e&&o.test(e)};e.s(["default",0,l],700341);let c=[];for(let e=0;e<256;++e)c.push((e+256).toString(16).slice(1));function d(e,t=0){return(c[e[t+0]]+c[e[t+1]]+c[e[t+2]]+c[e[t+3]]+"-"+c[e[t+4]]+c[e[t+5]]+"-"+c[e[t+6]]+c[e[t+7]]+"-"+c[e[t+8]]+c[e[t+9]]+"-"+c[e[t+10]]+c[e[t+11]]+c[e[t+12]]+c[e[t+13]]+c[e[t+14]]+c[e[t+15]]).toLowerCase()}let u=function(e,t,r){if(i.randomUUID&&!t&&!e)return i.randomUUID();let n=(e=e||{}).random||(e.rng||a)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(let e=0;e<16;++e)t[r+e]=n[e];return t}return d(n)};e.s(["v4",0,u],423121)},398613,e=>{"use strict";var t=e.i(423121);let i=async function(e){let i;try{let r,n,s,a;i=(0,t.v4)(),await this.initializing;let o=this.drizzle.transaction(async e=>{s=e,await new Promise((e,t)=>{n=()=>(e(),o),r=()=>(t(),o),a()})},e||this.transactionOptions).catch(()=>{});await new Promise(e=>a=e),this.sessions[i]={db:s,reject:r,resolve:n}}catch(e){throw this.payload.logger.error({err:e,msg:`Error: cannot begin transaction: ${e.message}`}),Error(`Error: cannot begin transaction: ${e.message}`)}return i};e.s(["beginTransaction",0,i])},766859,e=>{"use strict";let t;var i,r,n,s,a,o=e.i(750227),l=e.i(902157),c=e.i(844376);let d=e=>null!==e&&"object"==typeof e,u=(e,t)=>Object.assign(Error(`[${e}]: ${t}`),{code:e}),h="ERR_INVALID_PACKAGE_CONFIG",A="ERR_INVALID_PACKAGE_TARGET",p="ERR_PACKAGE_PATH_NOT_EXPORTED",f=/^\d+$/,g=/^(\.{1,2}|node_modules)$/i,m=/\/|\\/;var y=((t=y||{}).Export="exports",t.Import="imports",t);let b=(e,t,i,r,n)=>{if(null==t)return[];if("string"==typeof t){let[i,...r]=t.split(m);if(".."===i||r.some(e=>g.test(e)))throw u(A,`Invalid "${e}" target "${t}" defined in the package config`);return[n?t.replace(/\*/g,n):t]}if(Array.isArray(t))return t.flatMap(t=>b(e,t,i,r,n));if(d(t)){for(let s of Object.keys(t)){if(f.test(s))throw u(h,"Cannot contain numeric property keys");if("default"===s||r.includes(s))return b(e,t[s],i,r,n)}return[]}throw u(A,`Invalid "${e}" target "${t}"`)},E="*",C=(e,t)=>{let i=e.indexOf(E),r=t.indexOf(E);return i===r?t.length>e.length:r>i};function w(e,t){let i,r;if(!t.includes(E)&&e.hasOwnProperty(t))return[t];for(let n of Object.keys(e))if(n.includes(E)){let[e,s,a]=n.split(E);if(void 0===a&&t.startsWith(e)&&t.endsWith(s)){let a=t.slice(e.length,-s.length||void 0);a&&(!i||C(i,n))&&(i=n,r=a)}}return[i,r]}let I=e=>Object.keys(e).reduce((e,t)=>{let i=""===t||"."!==t[0];if(void 0===e||e===i)return i;throw u(h,'"exports" cannot contain some keys starting with "." and some not')},void 0),v=/^\w+:/,B=(e,t,i)=>{if(!e)throw Error('"exports" is required');t=""===t?".":`./${t}`,("string"==typeof e||Array.isArray(e)||d(e)&&I(e))&&(e={".":e});let[r,n]=w(e,t),s=b(y.Export,e[r],t,i,n);if(0===s.length)throw u(p,"."===t?'No "exports" main defined':`Package subpath '${t}' is not defined by "exports"`);for(let e of s)if(!e.startsWith("./")&&!v.test(e))throw u(A,`Invalid "exports" target "${e}" defined in the package config`);return s};var Q=e.i(522734),x=Object.defineProperty,S=(e,t)=>x(e,"name",{value:t,configurable:!0});function k(e){return e.startsWith("\\\\?\\")?e:e.replace(/\\/g,"/")}S(k,"slash");let T=S(e=>{let t=l.default[e];return(i,...r)=>{let n=`${e}:${r.join(":")}`,s=null==i?void 0:i.get(n);return void 0===s&&(s=Reflect.apply(t,l.default,r),null==i||i.set(n,s)),s}},"cacheFs"),N=T("existsSync"),D=T("readFileSync"),_=T("statSync"),R=S((e,t,i)=>{for(;;){let r=o.default.posix.join(e,t);if(N(i,r))return r;let n=o.default.dirname(e);if(n===e)return;e=n}},"findUp"),L=/^\.{1,2}(\/.*)?$/,F=S(e=>{let t=k(e);return L.test(t)?t:`./${t}`},"normalizeRelativePath");function M(e,t=!1){let i=e.length,r=0,n="",s=0,a=16,o=0,l=0,c=0,d=0,u=0;function h(t,i){let n=0,s=0;for(;n<t||!i;){let t=e.charCodeAt(r);if(t>=48&&t<=57)s=16*s+t-48;else if(t>=65&&t<=70)s=16*s+t-65+10;else if(t>=97&&t<=102)s=16*s+t-97+10;else break;r++,n++}return n<t&&(s=-1),s}function A(e){r=e,n="",s=0,a=16,u=0}function p(){let t=r;if(48===e.charCodeAt(r))r++;else for(r++;r<e.length&&P(e.charCodeAt(r));)r++;if(r<e.length&&46===e.charCodeAt(r))if(!(++r<e.length&&P(e.charCodeAt(r))))return u=3,e.substring(t,r);else for(r++;r<e.length&&P(e.charCodeAt(r));)r++;let i=r;if(r<e.length&&(69===e.charCodeAt(r)||101===e.charCodeAt(r)))if((++r<e.length&&43===e.charCodeAt(r)||45===e.charCodeAt(r))&&r++,r<e.length&&P(e.charCodeAt(r))){for(r++;r<e.length&&P(e.charCodeAt(r));)r++;i=r}else u=3;return e.substring(t,i)}function f(){let t="",n=r;for(;;){if(r>=i){t+=e.substring(n,r),u=2;break}let s=e.charCodeAt(r);if(34===s){t+=e.substring(n,r),r++;break}if(92===s){if(t+=e.substring(n,r),++r>=i){u=2;break}switch(e.charCodeAt(r++)){case 34:t+='"';break;case 92:t+="\\";break;case 47:t+="/";break;case 98:t+="\b";break;case 102:t+="\f";break;case 110:t+=`
|
||
`;break;case 114:t+="\r";break;case 116:t+=" ";break;case 117:let s=h(4,!0);s>=0?t+=String.fromCharCode(s):u=4;break;default:u=5}n=r;continue}if(s>=0&&s<=31)if(U(s)){t+=e.substring(n,r),u=2;break}else u=6;r++}return t}function g(){if(n="",u=0,s=r,l=o,d=c,r>=i)return s=i,a=17;let t=e.charCodeAt(r);if(O(t)){do r++,n+=String.fromCharCode(t),t=e.charCodeAt(r);while(O(t))return a=15}if(U(t))return r++,n+=String.fromCharCode(t),13===t&&10===e.charCodeAt(r)&&(r++,n+=`
|
||
`),o++,c=r,a=14;switch(t){case 123:return r++,a=1;case 125:return r++,a=2;case 91:return r++,a=3;case 93:return r++,a=4;case 58:return r++,a=6;case 44:return r++,a=5;case 34:return r++,n=f(),a=10;case 47:let h=r-1;if(47===e.charCodeAt(r+1)){for(r+=2;r<i&&!U(e.charCodeAt(r));)r++;return n=e.substring(h,r),a=12}if(42===e.charCodeAt(r+1)){r+=2;let t=i-1,s=!1;for(;r<t;){let t=e.charCodeAt(r);if(42===t&&47===e.charCodeAt(r+1)){r+=2,s=!0;break}r++,U(t)&&(13===t&&10===e.charCodeAt(r)&&r++,o++,c=r)}return s||(r++,u=1),n=e.substring(h,r),a=13}return n+=String.fromCharCode(t),r++,a=16;case 45:if(n+=String.fromCharCode(t),++r===i||!P(e.charCodeAt(r)))return a=16;case 48:case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return n+=p(),a=11;default:for(;r<i&&m(t);)r++,t=e.charCodeAt(r);if(s!==r){switch(n=e.substring(s,r)){case"true":return a=8;case"false":return a=9;case"null":return a=7}return a=16}return n+=String.fromCharCode(t),r++,a=16}}function m(e){if(O(e)||U(e))return!1;switch(e){case 125:case 93:case 123:case 91:case 34:case 58:case 44:case 47:return!1}return!0}function y(){let e;do e=g();while(e>=12&&e<=15)return e}return S(h,"scanHexDigits"),S(A,"setPosition"),S(p,"scanNumber"),S(f,"scanString"),S(g,"scanNext"),S(m,"isUnknownContentCharacter"),S(y,"scanNextNonTrivia"),{setPosition:A,getPosition:S(()=>r,"getPosition"),scan:t?y:g,getToken:S(()=>a,"getToken"),getTokenValue:S(()=>n,"getTokenValue"),getTokenOffset:S(()=>s,"getTokenOffset"),getTokenLength:S(()=>r-s,"getTokenLength"),getTokenStartLine:S(()=>l,"getTokenStartLine"),getTokenStartCharacter:S(()=>s-d,"getTokenStartCharacter"),getTokenError:S(()=>u,"getTokenError")}}function O(e){return 32===e||9===e}function U(e){return 10===e||13===e}function P(e){return e>=48&&e<=57}S(M,"createScanner"),S(O,"isWhiteSpace"),S(U,"isLineBreak"),S(P,"isDigit"),function(e){e[e.lineFeed=10]="lineFeed",e[e.carriageReturn=13]="carriageReturn",e[e.space=32]="space",e[e._0=48]="_0",e[e._1=49]="_1",e[e._2=50]="_2",e[e._3=51]="_3",e[e._4=52]="_4",e[e._5=53]="_5",e[e._6=54]="_6",e[e._7=55]="_7",e[e._8=56]="_8",e[e._9=57]="_9",e[e.a=97]="a",e[e.b=98]="b",e[e.c=99]="c",e[e.d=100]="d",e[e.e=101]="e",e[e.f=102]="f",e[e.g=103]="g",e[e.h=104]="h",e[e.i=105]="i",e[e.j=106]="j",e[e.k=107]="k",e[e.l=108]="l",e[e.m=109]="m",e[e.n=110]="n",e[e.o=111]="o",e[e.p=112]="p",e[e.q=113]="q",e[e.r=114]="r",e[e.s=115]="s",e[e.t=116]="t",e[e.u=117]="u",e[e.v=118]="v",e[e.w=119]="w",e[e.x=120]="x",e[e.y=121]="y",e[e.z=122]="z",e[e.A=65]="A",e[e.B=66]="B",e[e.C=67]="C",e[e.D=68]="D",e[e.E=69]="E",e[e.F=70]="F",e[e.G=71]="G",e[e.H=72]="H",e[e.I=73]="I",e[e.J=74]="J",e[e.K=75]="K",e[e.L=76]="L",e[e.M=77]="M",e[e.N=78]="N",e[e.O=79]="O",e[e.P=80]="P",e[e.Q=81]="Q",e[e.R=82]="R",e[e.S=83]="S",e[e.T=84]="T",e[e.U=85]="U",e[e.V=86]="V",e[e.W=87]="W",e[e.X=88]="X",e[e.Y=89]="Y",e[e.Z=90]="Z",e[e.asterisk=42]="asterisk",e[e.backslash=92]="backslash",e[e.closeBrace=125]="closeBrace",e[e.closeBracket=93]="closeBracket",e[e.colon=58]="colon",e[e.comma=44]="comma",e[e.dot=46]="dot",e[e.doubleQuote=34]="doubleQuote",e[e.minus=45]="minus",e[e.openBrace=123]="openBrace",e[e.openBracket=91]="openBracket",e[e.plus=43]="plus",e[e.slash=47]="slash",e[e.formFeed=12]="formFeed",e[e.tab=9]="tab"}(i||(i={})),Array(20).fill(0).map((e,t)=>" ".repeat(t));let $=200;function j(e,t=[],i=r.DEFAULT){let n=null,s=[],a=[];function o(e){Array.isArray(s)?s.push(e):null!==n&&(s[n]=e)}return S(o,"onValue"),H(e,{onObjectBegin:S(()=>{let e={};o(e),a.push(s),s=e,n=null},"onObjectBegin"),onObjectProperty:S(e=>{n=e},"onObjectProperty"),onObjectEnd:S(()=>{s=a.pop()},"onObjectEnd"),onArrayBegin:S(()=>{let e=[];o(e),a.push(s),s=e,n=null},"onArrayBegin"),onArrayEnd:S(()=>{s=a.pop()},"onArrayEnd"),onLiteralValue:o,onError:S((e,i,r)=>{t.push({error:e,offset:i,length:r})},"onError")},i),s[0]}function H(e,t,i=r.DEFAULT){let n=M(e,!1),s=[];function a(e){return e?()=>e(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function o(e){return e?()=>e(n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>s.slice()):()=>!0}function l(e){return e?t=>e(t,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter()):()=>!0}function c(e){return e?t=>e(t,n.getTokenOffset(),n.getTokenLength(),n.getTokenStartLine(),n.getTokenStartCharacter(),()=>s.slice()):()=>!0}S(a,"toNoArgVisit"),S(o,"toNoArgVisitWithPath"),S(l,"toOneArgVisit"),S(c,"toOneArgVisitWithPath");let d=o(t.onObjectBegin),u=c(t.onObjectProperty),h=a(t.onObjectEnd),A=o(t.onArrayBegin),p=a(t.onArrayEnd),f=c(t.onLiteralValue),g=l(t.onSeparator),m=a(t.onComment),y=l(t.onError),b=i&&i.disallowComments,E=i&&i.allowTrailingComma;function C(){for(;;){let e=n.scan();switch(n.getTokenError()){case 4:w(14);break;case 5:w(15);break;case 3:w(13);break;case 1:b||w(11);break;case 2:w(12);break;case 6:w(16)}switch(e){case 12:case 13:b?w(10):m();break;case 16:w(1);break;case 15:case 14:break;default:return e}}}function w(e,t=[],i=[]){if(y(e),t.length+i.length>0){let e=n.getToken();for(;17!==e;){if(-1!==t.indexOf(e)){C();break}if(-1!==i.indexOf(e))break;e=C()}}}function I(e){let t=n.getTokenValue();return e?f(t):(u(t),s.push(t)),C(),!0}function v(){switch(n.getToken()){case 11:let e=Number(n.getTokenValue());isNaN(e)&&(w(2),e=0),f(e);break;case 7:f(null);break;case 8:f(!0);break;case 9:f(!1);break;default:return!1}return C(),!0}function B(){return 10!==n.getToken()?(w(3,[],[2,5]),!1):(I(!1),6===n.getToken()?(g(":"),C(),k()||w(4,[],[2,5])):w(5,[],[2,5]),s.pop(),!0)}function Q(){d(),C();let e=!1;for(;2!==n.getToken()&&17!==n.getToken();){if(5===n.getToken()){if(e||w(4,[],[]),g(","),C(),2===n.getToken()&&E)break}else e&&w(6,[],[]);B()||w(4,[],[2,5]),e=!0}return h(),2!==n.getToken()?w(7,[2],[]):C(),!0}function x(){A(),C();let e=!0,t=!1;for(;4!==n.getToken()&&17!==n.getToken();){if(5===n.getToken()){if(t||w(4,[],[]),g(","),C(),4===n.getToken()&&E)break}else t&&w(6,[],[]);e?(s.push(0),e=!1):s[s.length-1]++,k()||w(4,[],[4,5]),t=!0}return p(),e||s.pop(),4!==n.getToken()?w(8,[4],[]):C(),!0}function k(){switch(n.getToken()){case 3:return x();case 1:return Q();case 10:return I(!0);default:return v()}}return S(C,"scanNext"),S(w,"handleError"),S(I,"parseString"),S(v,"parseLiteral"),S(B,"parseProperty"),S(Q,"parseObject"),S(x,"parseArray"),S(k,"parseValue"),C(),17===n.getToken()?!!i.allowEmptyContent||(w(4,[],[]),!1):k()?(17!==n.getToken()&&w(9,[],[]),!0):(w(4,[],[]),!1)}Array(200).fill(0).map((e,t)=>`
|
||
`+" ".repeat(t)),Array($).fill(0).map((e,t)=>"\r"+" ".repeat(t)),Array($).fill(0).map((e,t)=>`\r
|
||
`+" ".repeat(t)),Array($).fill(0).map((e,t)=>`
|
||
`+" ".repeat(t)),Array($).fill(0).map((e,t)=>"\r"+" ".repeat(t)),Array($).fill(0).map((e,t)=>`\r
|
||
`+" ".repeat(t)),function(e){e.DEFAULT={allowTrailingComma:!1}}(r||(r={})),S(j,"parse$1"),S(H,"visit"),function(e){e[e.None=0]="None",e[e.UnexpectedEndOfComment=1]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=2]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=3]="UnexpectedEndOfNumber",e[e.InvalidUnicode=4]="InvalidUnicode",e[e.InvalidEscapeCharacter=5]="InvalidEscapeCharacter",e[e.InvalidCharacter=6]="InvalidCharacter"}(n||(n={})),function(e){e[e.OpenBraceToken=1]="OpenBraceToken",e[e.CloseBraceToken=2]="CloseBraceToken",e[e.OpenBracketToken=3]="OpenBracketToken",e[e.CloseBracketToken=4]="CloseBracketToken",e[e.CommaToken=5]="CommaToken",e[e.ColonToken=6]="ColonToken",e[e.NullKeyword=7]="NullKeyword",e[e.TrueKeyword=8]="TrueKeyword",e[e.FalseKeyword=9]="FalseKeyword",e[e.StringLiteral=10]="StringLiteral",e[e.NumericLiteral=11]="NumericLiteral",e[e.LineCommentTrivia=12]="LineCommentTrivia",e[e.BlockCommentTrivia=13]="BlockCommentTrivia",e[e.LineBreakTrivia=14]="LineBreakTrivia",e[e.Trivia=15]="Trivia",e[e.Unknown=16]="Unknown",e[e.EOF=17]="EOF"}(s||(s={}));let q=j;!function(e){e[e.InvalidSymbol=1]="InvalidSymbol",e[e.InvalidNumberFormat=2]="InvalidNumberFormat",e[e.PropertyNameExpected=3]="PropertyNameExpected",e[e.ValueExpected=4]="ValueExpected",e[e.ColonExpected=5]="ColonExpected",e[e.CommaExpected=6]="CommaExpected",e[e.CloseBraceExpected=7]="CloseBraceExpected",e[e.CloseBracketExpected=8]="CloseBracketExpected",e[e.EndOfFileExpected=9]="EndOfFileExpected",e[e.InvalidCommentToken=10]="InvalidCommentToken",e[e.UnexpectedEndOfComment=11]="UnexpectedEndOfComment",e[e.UnexpectedEndOfString=12]="UnexpectedEndOfString",e[e.UnexpectedEndOfNumber=13]="UnexpectedEndOfNumber",e[e.InvalidUnicode=14]="InvalidUnicode",e[e.InvalidEscapeCharacter=15]="InvalidEscapeCharacter",e[e.InvalidCharacter=16]="InvalidCharacter"}(a||(a={}));let z=S((e,t)=>q(D(t,e,"utf8")),"readJsonc"),V=Symbol("implicitBaseUrl"),G="${configDir}",Y=S(()=>{let{findPnpApi:e}=c.default;return e&&e(process.cwd())},"getPnpApi"),W=S((e,t,i,r)=>{let n=`resolveFromPackageJsonPath:${e}:${t}:${i}`;if(null!=r&&r.has(n))return r.get(n);let s=z(e,r);if(!s)return;let a=t||"tsconfig.json";if(!i&&s.exports)try{let[e]=B(s.exports,t,["require","types"]);a=e}catch{return!1}else!t&&s.tsconfig&&(a=s.tsconfig);return a=o.default.join(e,"..",a),null==r||r.set(n,a),a},"resolveFromPackageJsonPath"),J="package.json",K="tsconfig.json",Z=S((e,t,i)=>{let r=e;if(".."===e&&(r=o.default.join(r,K)),"."===e[0]&&(r=o.default.resolve(t,r)),o.default.isAbsolute(r)){if(N(i,r)){if(_(i,r).isFile())return r}else if(!r.endsWith(".json")){let e=`${r}.json`;if(N(i,e))return e}return}let[n,...s]=e.split("/"),a="@"===n[0]?`${n}/${s.shift()}`:n,l=s.join("/"),c=Y();if(c){let{resolveRequest:r}=c;try{if(a===e){let e=r(o.default.join(a,J),t);if(e){let t=W(e,l,!1,i);if(t&&N(i,t))return t}}else{let i;try{i=r(e,t,{extensions:[".json"]})}catch{i=r(o.default.join(e,K),t)}if(i)return i}}catch{}}let d=R(o.default.resolve(t),o.default.join("node_modules",a),i);if(!d||!_(i,d).isDirectory())return;let u=o.default.join(d,J);if(N(i,u)){let e=W(u,l,!1,i);if(!1===e)return;if(e&&N(i,e)&&_(i,e).isFile())return e}let h=o.default.join(d,l),A=h.endsWith(".json");if(!A){let e=`${h}.json`;if(N(i,e))return e}if(N(i,h)){if(_(i,h).isDirectory()){let e=o.default.join(h,J);if(N(i,e)){let t=W(e,"",!0,i);if(t&&N(i,t))return t}let t=o.default.join(h,K);if(N(i,t))return t}else if(A)return h}},"resolveExtendsPath"),X=S((e,t)=>F(o.default.relative(e,t)),"pathRelative"),ee=["files","include","exclude"],et=S((e,t,i,r)=>{let n=Z(e,t,r);if(!n)throw Error(`File '${e}' not found.`);if(i.has(n))throw Error(`Circularity detected while resolving configuration: ${n}`);i.add(n);let s=o.default.dirname(n),a=er(n,r,i);delete a.references;let{compilerOptions:l}=a;if(l){let{baseUrl:e}=l;e&&!e.startsWith(G)&&(l.baseUrl=k(o.default.relative(t,o.default.join(s,e)))||"./");let{outDir:i}=l;i&&(i.startsWith(G)||(i=o.default.relative(t,o.default.join(s,i))),l.outDir=k(i)||"./")}for(let e of ee){let i=a[e];i&&(a[e]=i.map(e=>e.startsWith(G)?e:k(o.default.relative(t,o.default.join(s,e)))))}return a},"resolveExtends"),ei=["outDir","declarationDir"],er=S((e,t,i=new Set)=>{let r;try{r=z(e,t)||{}}catch{throw Error(`Cannot resolve tsconfig at path: ${e}`)}if("object"!=typeof r)throw SyntaxError(`Failed to parse tsconfig at: ${e}`);let n=o.default.dirname(e);if(r.compilerOptions){let{compilerOptions:e}=r;e.paths&&!e.baseUrl&&(e[V]=n)}if(r.extends){let e=Array.isArray(r.extends)?r.extends:[r.extends];for(let s of(delete r.extends,e.reverse())){let e=et(s,n,new Set(i),t),a={...e,...r,compilerOptions:{...e.compilerOptions,...r.compilerOptions}};e.watchOptions&&(a.watchOptions={...e.watchOptions,...r.watchOptions}),r=a}}if(r.compilerOptions){let{compilerOptions:e}=r;for(let t of["baseUrl","rootDir"]){let i=e[t];if(i&&!i.startsWith(G)){let r=o.default.resolve(n,i),s=X(n,r);e[t]=s}}for(let t of ei){let i=e[t];i&&(Array.isArray(r.exclude)||(r.exclude=[]),r.exclude.includes(i)||r.exclude.push(i),i.startsWith(G)||(i=F(i)),e[t]=i)}}else r.compilerOptions={};if(r.include?(r.include=r.include.map(k),r.files&&delete r.files):r.files&&(r.files=r.files.map(e=>e.startsWith(G)?e:F(e))),r.watchOptions){let{watchOptions:e}=r;e.excludeDirectories&&(e.excludeDirectories=e.excludeDirectories.map(e=>k(o.default.resolve(n,e))))}return r},"_parseTsconfig"),en=S((e,t)=>{if(e.startsWith(G))return k(o.default.join(t,e.slice(G.length)))},"interpolateConfigDir"),es=["outDir","declarationDir","outFile","rootDir","baseUrl","tsBuildInfoFile"],ea=S((e,t=new Map)=>{let i=o.default.resolve(e),r=er(i,t),n=o.default.dirname(i),{compilerOptions:s}=r;if(s){for(let e of es){let t=s[e];if(t){let i=en(t,n);s[e]=i?X(n,i):t}}for(let e of["rootDirs","typeRoots"]){let t=s[e];t&&(s[e]=t.map(e=>{let t=en(e,n);return t?X(n,t):e}))}let{paths:e}=s;if(e)for(let t of Object.keys(e))e[t]=e[t].map(e=>{var t;return null!=(t=en(e,n))?t:e})}for(let e of ee){let t=r[e];t&&(r[e]=t.map(e=>{var t;return null!=(t=en(e,n))?t:e}))}return r},"parseTsconfig"),eo=S((e=process.cwd(),t="tsconfig.json",i=new Map)=>{let r=R(k(e),t,i);if(!r)return null;let n=ea(r,i);return{path:r,config:n}},"getTsconfig"),el=/\*/g,ec=S((e,t)=>{let i=e.match(el);if(i&&i.length>1)throw Error(t)},"assertStarCount"),ed=S(e=>{if(e.includes("*")){let[t,i]=e.split("*");return{prefix:t,suffix:i}}return e},"parsePattern"),eu=S(({prefix:e,suffix:t},i)=>i.startsWith(e)&&i.endsWith(t),"isPatternMatch"),eh=S((e,t,i)=>Object.entries(e).map(([e,r])=>(ec(e,`Pattern '${e}' can have at most one '*' character.`),{pattern:ed(e),substitutions:r.map(r=>{if(ec(r,`Substitution '${r}' in pattern '${e}' can have at most one '*' character.`),!t&&!L.test(r))throw Error("Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?");return o.default.resolve(i,r)})})),"parsePaths"),eA=(S(e=>{let{compilerOptions:t}=e.config;if(!t)return null;let{baseUrl:i,paths:r}=t;if(!i&&!r)return null;let n=V in t&&t[V],s=o.default.resolve(o.default.dirname(e.path),i||n||"."),a=r?eh(r,i,s):[];return e=>{if(L.test(e))return[];let t=[];for(let i of a){if(i.pattern===e)return i.substitutions.map(k);"string"!=typeof i.pattern&&t.push(i)}let r,n=-1;for(let i of t)eu(i.pattern,e)&&i.pattern.prefix.length>n&&(n=i.pattern.prefix.length,r=i);if(!r)return i?[k(o.default.join(s,e))]:[];let l=e.slice(r.pattern.prefix.length,e.length-r.pattern.suffix.length);return r.substitutions.map(e=>k(e.replace("*",l)))}},"createPathsMatcher"),S(e=>{let t="";for(let i=0;i<e.length;i+=1){let r=e[i],n=r.toUpperCase();t+=r===n?r.toLowerCase():n}return t},"s")),ep=65,ef=97,eg=S(()=>Math.floor(26*Math.random()),"m"),em=S(e=>Array.from({length:e},()=>String.fromCodePoint(eg()+(Math.random()>.5?ep:ef))).join(""),"S"),ey=S((e=Q.default)=>{let t=process.execPath;if(e.existsSync(t))return!e.existsSync(eA(t));let i=`/${em(10)}`;e.writeFileSync(i,"");let r=!e.existsSync(eA(i));return e.unlinkSync(i),r},"l"),{join:eb}=o.default.posix,eE=[".ts",".tsx",".d.ts"],eC=[".cts",".d.cts"],ew=[".mts",".d.mts"],eI=S(e=>{let t=[...eE],i=[...eC],r=[...ew];return null!=e&&e.allowJs&&(t.push(".js",".jsx"),i.push(".cjs"),r.push(".mjs")),[...t,...i,...r]},"getSupportedExtensions"),ev=S(e=>{let t=[];if(!e)return t;let{outDir:i,declarationDir:r}=e;return i&&t.push(i),r&&t.push(r),t},"getDefaultExcludeSpec"),eB=S(e=>e.replaceAll(/[.*+?^${}()|[\]\\]/g,String.raw`\$&`),"escapeForRegexp"),eQ=["node_modules","bower_components","jspm_packages"],ex=`(?!(${eQ.join("|")})(/|$))`,eS=/(?:^|\/)[^.*?]+$/,ek="**/*",eT="[^/]",eN="[^./]",eD="win32"===process.platform;S(({config:e,path:t},i=ey())=>{if("extends"in e)throw Error("tsconfig#extends must be resolved. Use getTsconfig or parseTsconfig to resolve it.");if(!o.default.isAbsolute(t))throw Error("The tsconfig path must be absolute");eD&&(t=k(t));let r=o.default.dirname(t),{files:n,include:s,exclude:a,compilerOptions:l}=e,c=null==n?void 0:n.map(e=>eb(r,e)),d=eI(l),u=i?"":"i",h=(a||ev(l)).map(e=>{let t=eB(eb(r,e)).replaceAll(String.raw`\*\*/`,"(.+/)?").replaceAll(String.raw`\*`,`${eT}*`).replaceAll(String.raw`\?`,eT);return RegExp(`^${t}($|/)`,u)}),A=n||s?s:[ek],p=A?A.map(e=>{let t=eb(r,e);eS.test(t)&&(t=eb(t,ek));let i=eB(t).replaceAll(String.raw`/\*\*`,`(/${ex}${eN}${eT}*)*?`).replaceAll(/(\/)?\\\*/g,(e,t)=>{let i=`(${eN}|(\\.(?!min\\.js$))?)*`;return t?`/${ex}${eN}${i}`:i}).replaceAll(/(\/)?\\\?/g,(e,t)=>{let i=eT;return t?`/${ex}${i}`:i});return RegExp(`^${i}$`,u)}):void 0;return t=>{if(!o.default.isAbsolute(t))throw Error("filePath must be absolute");if(eD&&(t=k(t)),null!=c&&c.includes(t)||!(!d.some(e=>t.endsWith(e))||h.some(e=>e.test(t)))&&p&&p.some(e=>e.test(t)))return e}},"createFilesMatcher"),e.s(["getTsconfig",()=>eo],766859)},407631,e=>{"use strict";var t=e.i(522734),i=e.i(766859),r=e.i(814747);let n=e=>t.default.readdirSync(e).filter(e=>(e.endsWith(".ts")||e.endsWith(".js"))&&"index.ts"!==e&&"index.js"!==e).sort(),s=e=>{let t=(0,i.getTsconfig)(),r=t?.config?.compilerOptions?.moduleResolution==="NodeNext"?".js":"",n="",s="export const migrations = [\n";return e.forEach((t,i)=>{let a=t.replace(/\.[^/.]+$/,"");n+=`import * as migration_${a} from './${a}${r}';
|
||
`,s+=` {
|
||
up: migration_${a}.up,
|
||
down: migration_${a}.down,
|
||
name: '${a}'${i!==e.length-1?",":""}
|
||
},
|
||
`}),s+="];\n",n+"\n"+s},a=e=>{let i=s(n(e.migrationsDir));t.default.writeFileSync(r.default.join(e.migrationsDir,"index.ts"),i)};e.s(["writeMigrationIndex",0,a])},646693,(e,t,i)=>{"use strict";let{FORCE_COLOR:r,NODE_DISABLE_COLORS:n,TERM:s}=process.env,a={enabled:!n&&"dumb"!==s&&"0"!==r,reset:c(0,0),bold:c(1,22),dim:c(2,22),italic:c(3,23),underline:c(4,24),inverse:c(7,27),hidden:c(8,28),strikethrough:c(9,29),black:c(30,39),red:c(31,39),green:c(32,39),yellow:c(33,39),blue:c(34,39),magenta:c(35,39),cyan:c(36,39),white:c(37,39),gray:c(90,39),grey:c(90,39),bgBlack:c(40,49),bgRed:c(41,49),bgGreen:c(42,49),bgYellow:c(43,49),bgBlue:c(44,49),bgMagenta:c(45,49),bgCyan:c(46,49),bgWhite:c(47,49)};function o(e,t){let i=0,r,n="",s="";for(;i<e.length;i++)n+=(r=e[i]).open,s+=r.close,t.includes(r.close)&&(t=t.replace(r.rgx,r.close+r.open));return n+t+s}function l(e,t){let i={has:e,keys:t};return i.reset=a.reset.bind(i),i.bold=a.bold.bind(i),i.dim=a.dim.bind(i),i.italic=a.italic.bind(i),i.underline=a.underline.bind(i),i.inverse=a.inverse.bind(i),i.hidden=a.hidden.bind(i),i.strikethrough=a.strikethrough.bind(i),i.black=a.black.bind(i),i.red=a.red.bind(i),i.green=a.green.bind(i),i.yellow=a.yellow.bind(i),i.blue=a.blue.bind(i),i.magenta=a.magenta.bind(i),i.cyan=a.cyan.bind(i),i.white=a.white.bind(i),i.gray=a.gray.bind(i),i.grey=a.grey.bind(i),i.bgBlack=a.bgBlack.bind(i),i.bgRed=a.bgRed.bind(i),i.bgGreen=a.bgGreen.bind(i),i.bgYellow=a.bgYellow.bind(i),i.bgBlue=a.bgBlue.bind(i),i.bgMagenta=a.bgMagenta.bind(i),i.bgCyan=a.bgCyan.bind(i),i.bgWhite=a.bgWhite.bind(i),i}function c(e,t){let i={open:`\x1b[${e}m`,close:`\x1b[${t}m`,rgx:RegExp(`\\x1b\\[${t}m`,"g")};return function(t){return void 0!==this&&void 0!==this.has?(this.has.includes(e)||(this.has.push(e),this.keys.push(i)),void 0===t?this:a.enabled?o(this.keys,t+""):t+""):void 0===t?l([e],[i]):a.enabled?o([i],t+""):t+""}}t.exports=a},959047,(e,t,i)=>{"use strict";t.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name||"d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},215456,(e,t,i)=>{"use strict";t.exports=e=>{let t=RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))","g");return"string"==typeof e?e.replace(t,""):e}},915362,(e,t,i)=>{"use strict";let r="\x1b",n=`${r}[`,s="\x07",a={to:(e,t)=>t?`${n}${t+1};${e+1}H`:`${n}${e+1}G`,move(e,t){let i="";return e<0?i+=`${n}${-e}D`:e>0&&(i+=`${n}${e}C`),t<0?i+=`${n}${-t}A`:t>0&&(i+=`${n}${t}B`),i},up:(e=1)=>`${n}${e}A`,down:(e=1)=>`${n}${e}B`,forward:(e=1)=>`${n}${e}C`,backward:(e=1)=>`${n}${e}D`,nextLine:(e=1)=>`${n}E`.repeat(e),prevLine:(e=1)=>`${n}F`.repeat(e),left:`${n}G`,hide:`${n}?25l`,show:`${n}?25h`,save:`${r}7`,restore:`${r}8`},o={up:(e=1)=>`${n}S`.repeat(e),down:(e=1)=>`${n}T`.repeat(e)},l={screen:`${n}2J`,up:(e=1)=>`${n}1J`.repeat(e),down:(e=1)=>`${n}J`.repeat(e),line:`${n}2K`,lineEnd:`${n}K`,lineStart:`${n}1K`,lines(e){let t="";for(let i=0;i<e;i++)t+=this.line+(i<e-1?a.up():"");return e&&(t+=a.left),t}};t.exports={cursor:a,scroll:o,erase:l,beep:s}},199302,(e,t,i)=>{"use strict";let r=e.r(215456),{erase:n,cursor:s}=e.r(915362),a=e=>[...r(e)].length;t.exports=function(e,t){if(!t)return n.line+s.to(0);let i=0;for(let r of e.split(/\r?\n/))i+=1+Math.floor(Math.max(a(r)-1,0)/t);return n.lines(i)}},941562,(e,t,i)=>{"use strict";let r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};r.arrowUp,r.arrowDown,r.arrowLeft,r.arrowRight,t.exports=r},222630,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(941562),s=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),a=e=>s[e]||s.default,o=Object.freeze({aborted:r.red(n.cross),done:r.green(n.tick),exited:r.yellow(n.cross),default:r.cyan("?")}),l=(e,t,i)=>t?o.aborted:i?o.exited:e?o.done:o.default;t.exports={styles:s,render:a,symbols:o,symbol:l,delimiter:e=>r.gray(e?n.ellipsis:n.pointerSmall),item:(e,t)=>r.gray(e?t?n.pointerSmall:"+":n.line)}},966689,(e,t,i)=>{"use strict";let r=e.r(215456);t.exports=function(e,t){let i=String(r(e)||"").split(/\r?\n/);return t?i.map(e=>Math.ceil(e.length/t)).reduce((e,t)=>e+t):i.length}},275948,(e,t,i)=>{"use strict";t.exports=(e,t={})=>{let i=Number.isSafeInteger(parseInt(t.margin))?Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",r=t.width;return(e||"").split(/\r?\n/g).map(e=>e.split(/\s+/g).reduce((e,t)=>(t.length+i.length>=r||e[e.length-1].length+t.length+1<r?e[e.length-1]+=` ${t}`:e.push(`${i}${t}`),e),[i]).join("\n")).join("\n")}},690063,(e,t,i)=>{"use strict";t.exports=(e,t,i)=>{i=i||t;let r=Math.min(t-i,e-Math.floor(i/2));r<0&&(r=0);let n=Math.min(r+i,t);return{startIndex:r,endIndex:n}}},221511,(e,t,i)=>{"use strict";t.exports={action:e.r(959047),clear:e.r(199302),style:e.r(222630),strip:e.r(215456),figures:e.r(941562),lines:e.r(966689),wrap:e.r(275948),entriesToDisplay:e.r(690063)}},189078,(e,t,i)=>{"use strict";let r=e.r(319668),{action:n}=e.r(221511),s=e.r(427699),{beep:a,cursor:o}=e.r(915362),l=e.r(646693);class c extends s{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>void 0)).bind(this);const t=r.createInterface({input:this.in,escapeCodeTimeout:50});r.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(e,t)=>{let r=n(t,i);!1===r?this._&&this._(e,t):"function"==typeof this[r]?this[r](t):this.bell()};this.close=()=>{this.out.write(o.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(a)}render(){this.onRender(l),this.firstRender&&(this.firstRender=!1)}}t.exports=c},528127,(e,t,i)=>{let r=e.r(646693),n=e.r(189078),{erase:s,cursor:a}=e.r(915362),{style:o,clear:l,lines:c,figures:d}=e.r(221511);class u extends n{constructor(e={}){super(e),this.transform=o.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=l("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=r.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(this.value=this.value||this.initial,this.cursorOffset=0,this.cursor=this.rendered.length,await this.validate(),this.error){this.red=!0,this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${e}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(a.down(c(this.outputError,this.out.columns)-1)+l(this.outputError,this.out.columns)),this.out.write(l(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),r.bold(this.msg),o.delimiter(this.done),this.red?r.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
||
`).reduce((e,t,i)=>e+`
|
||
${i?" ":d.pointerSmall} ${r.red().italic(t)}`,"")),this.out.write(s.line+a.to(0)+this.outputText+a.save+this.outputError+a.restore+a.move(this.cursorOffset,0)))}}t.exports=u},720525,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(189078),{style:s,clear:a,figures:o,wrap:l,entriesToDisplay:c}=e.r(221511),{cursor:d}=e.r(915362);class u extends n{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=a("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(d.hide):this.out.write(a(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=c(this.cursor,this.choices.length,this.optionsPerPage);if(this.outputText=[s.symbol(this.done,this.aborted),r.bold(this.msg),s.delimiter(!1),this.done?this.selection.title:this.selection.disabled?r.yellow(this.warn):r.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let i=e;i<t;i++){let n,s,a="",c=this.choices[i];s=i===e&&e>0?o.arrowUp:i===t-1&&t<this.choices.length?o.arrowDown:" ",c.disabled?(n=this.cursor===i?r.gray().underline(c.title):r.strikethrough().gray(c.title),s=(this.cursor===i?r.bold().gray(o.pointer)+" ":" ")+s):(n=this.cursor===i?r.cyan().underline(c.title):c.title,s=(this.cursor===i?r.cyan(o.pointer)+" ":" ")+s,c.description&&this.cursor===i&&(a=` - ${c.description}`,(s.length+n.length+a.length>=this.out.columns||c.description.split(/\r?\n/).length>1)&&(a="\n"+l(c.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${n}${r.gray(a)}
|
||
`}}this.out.write(this.outputText)}}t.exports=u},321821,(e,t,i)=>{let r=e.r(646693),n=e.r(189078),{style:s,clear:a}=e.r(221511),{cursor:o,erase:l}=e.r(915362);class c extends n{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(o.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),r.bold(this.msg),s.delimiter(this.done),this.value?this.inactive:r.cyan().underline(this.inactive),r.gray("/"),this.value?r.cyan().underline(this.active):this.active].join(" "),this.out.write(l.line+o.to(0)+this.outputText))}}t.exports=c},93161,(e,t,i)=>{"use strict";class r{constructor({token:e,date:t,parts:i,locales:r}){this.token=e,this.date=t||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,i)=>i>e&&t instanceof r)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((e,i)=>i>t&&e instanceof r)}toString(){return String(this.date)}}t.exports=r},186463,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}t.exports=n},683502,(e,t,i)=>{"use strict";let r=e.r(93161),n=e=>1==(e%=10)?"st":2===e?"nd":3===e?"rd":"th";class s extends r{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+n(e):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e}}t.exports=s},7162,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}t.exports=n},378033,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=n},463319,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}t.exports=n},946423,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}t.exports=n},9056,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}t.exports=n},132854,(e,t,i)=>{"use strict";let r=e.r(93161);class n extends r{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}t.exports=n},885189,(e,t,i)=>{"use strict";t.exports={DatePart:e.r(93161),Meridiem:e.r(186463),Day:e.r(683502),Hours:e.r(7162),Milliseconds:e.r(378033),Minutes:e.r(463319),Month:e.r(946423),Seconds:e.r(9056),Year:e.r(132854)}},215848,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(189078),{style:s,clear:a,figures:o}=e.r(221511),{erase:l,cursor:c}=e.r(915362),{DatePart:d,Meridiem:u,Day:h,Hours:A,Milliseconds:p,Minutes:f,Month:g,Seconds:m,Year:y}=e.r(885189),b=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,E={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new h(e),3:e=>new g(e),4:e=>new y(e),5:e=>new u(e),6:e=>new A(e),7:e=>new f(e),8:e=>new m(e),9:e=>new p(e)},C={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class w extends n{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(C,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=a("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=b.exec(e);){let e=t.shift(),i=t.findIndex(e=>null!=e);this.parts.push(i in E?E[i]({token:t[i]||e,date:this.date,parts:this.parts,locales:this.locales}):t[i]||e)}let i=this.parts.reduce((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof d)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(e=>e instanceof d)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),r.bold(this.msg),s.delimiter(!1),this.parts.reduce((e,t,i)=>e.concat(i!==this.cursor||this.done?t:r.cyan().underline(t.toString())),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce((e,t,i)=>e+`
|
||
${i?" ":o.pointerSmall} ${r.red().italic(t)}`,"")),this.out.write(l.line+c.to(0)+this.outputText))}}t.exports=w},67169,(e,t,i)=>{let r=e.r(646693),n=e.r(189078),{cursor:s,erase:a}=e.r(915362),{style:o,figures:l,clear:c,lines:d}=e.r(221511),u=/[0-9]/,h=e=>void 0!==e,A=(e,t)=>{let i=Math.pow(10,t);return Math.round(e*i)/i};class p extends n{constructor(e={}){super(e),this.transform=o.render(e.style),this.msg=e.message,this.initial=h(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=h(e.min)?e.min:-1/0,this.max=h(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${A(e,this.round)}`),this._value=A(e,this.round)):(this.placeholder=!0,this.rendered=r.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||u.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
||
`),this.close()}async validate(){let e=await this.validator(this.value);"string"==typeof e&&(this.errorMsg=e,e=!1),this.error=!e}async submit(){if(await this.validate(),this.error){this.color="red",this.fire(),this.render();return}let e=this.value;this.value=""!==e?e:this.initial,this.done=!0,this.aborted=!1,this.error=!1,this.fire(),this.render(),this.out.write(`
|
||
`),this.close()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=i,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(s.down(d(this.outputError,this.out.columns)-1)+c(this.outputError,this.out.columns)),this.out.write(c(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[o.symbol(this.done,this.aborted),r.bold(this.msg),o.delimiter(this.done),!this.done||!this.done&&!this.placeholder?r[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
||
`).reduce((e,t,i)=>e+`
|
||
${i?" ":l.pointerSmall} ${r.red().italic(t)}`,"")),this.out.write(a.line+s.to(0)+this.outputText+s.save+this.outputError+s.restore))}}t.exports=p},192255,(e,t,i)=>{"use strict";let r=e.r(646693),{cursor:n}=e.r(915362),s=e.r(189078),{clear:a,figures:o,style:l,wrap:c,entriesToDisplay:d}=e.r(221511);class u extends s{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled})),this.clear=a("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){let e=this.value.filter(e=>e.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(e=>!e.disabled).forEach(t=>t.selected=e),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`
|
||
Instructions:
|
||
${o.arrowUp}/${o.arrowDown}: Highlight option
|
||
${o.arrowLeft}/${o.arrowRight}/[space]: Toggle selection
|
||
`+(void 0===this.maxChoices?` a: Toggle all
|
||
`:"")+" enter/return: Complete answer":""}renderOption(e,t,i,n){let s,a,l=(t.selected?r.green(o.radioOn):o.radioOff)+" "+n+" ";return t.disabled?s=e===i?r.gray().underline(t.title):r.strikethrough().gray(t.title):(s=e===i?r.cyan().underline(t.title):t.title,e===i&&t.description&&(a=` - ${t.description}`,(l.length+s.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a="\n"+c(t.description,{margin:l.length,width:this.out.columns})))),l+s+r.gray(a||"")}paginateOptions(e){if(0===e.length)return r.red("No matches for this query.");let{startIndex:t,endIndex:i}=d(this.cursor,e.length,this.optionsPerPage),n,s=[];for(let r=t;r<i;r++)n=r===t&&t>0?o.arrowUp:r===i-1&&i<e.length?o.arrowDown:" ",s.push(this.renderOption(this.cursor,e[r],r,n));return"\n"+s.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(e=>e.selected).map(e=>e.title).join(", ");let e=[r.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(r.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[l.symbol(this.done,this.aborted),r.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=r.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}t.exports=u},652400,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(189078),{erase:s,cursor:a}=e.r(915362),{style:o,clear:l,figures:c,wrap:d,entriesToDisplay:u}=e.r(221511),h=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),A=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),p=(e,t)=>{let i=e.findIndex(e=>e.value===t||e.title===t);return i>-1?i:void 0};class f extends n{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:p(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=o.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=l("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=h(this.suggestions,e):this.value=this.fallback.value,this.fire()}async complete(e){let t=this.completing=this.suggest(this.input,this.choices),i=await t;if(this.completing!==t)return;this.suggestions=i.map((e,t,i)=>({title:A(i,t),value:h(i,t),description:e.description})),this.completing=!1;let r=Math.max(i.length-1,0);this.moveSelect(Math.min(r,this.select)),e&&e()}reset(){this.input="",this.complete(()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${e}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,i,n){let s,a=i?c.arrowUp:n?c.arrowDown:" ",o=t?r.cyan().underline(e.title):e.title;return a=(t?r.cyan(c.pointer)+" ":" ")+a,e.description&&(s=` - ${e.description}`,(a.length+o.length+s.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(s="\n"+d(e.description,{margin:3,width:this.out.columns}))),a+" "+o+r.gray(s||"")}render(){if(this.closed)return;this.firstRender?this.out.write(a.hide):this.out.write(l(this.outputText,this.out.columns)),super.render();let{startIndex:e,endIndex:t}=u(this.select,this.choices.length,this.limit);if(this.outputText=[o.symbol(this.done,this.aborted,this.exited),r.bold(this.msg),o.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let i=this.suggestions.slice(e,t).map((i,r)=>this.renderOption(i,this.select===r+e,0===r&&e>0,r+e===t-1&&t<this.choices.length)).join("\n");this.outputText+=`
|
||
`+(i||r.gray(this.fallback.title))}this.out.write(s.line+a.to(0)+this.outputText)}}t.exports=f},389995,(e,t,i)=>{"use strict";let r=e.r(646693),{cursor:n}=e.r(915362),s=e.r(192255),{clear:a,style:o,figures:l}=e.r(221511);class c extends s{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=a("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(e=>!this.inputValue||!!("string"==typeof e.title&&e.title.toLowerCase().includes(this.inputValue.toLowerCase())||"string"==typeof e.value&&e.value.toLowerCase().includes(this.inputValue.toLowerCase())));let t=this.filteredOptions.findIndex(t=>t===e);this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`
|
||
Instructions:
|
||
${l.arrowUp}/${l.arrowDown}: Highlight option
|
||
${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection
|
||
[a,b,c]/delete: Filter choices
|
||
enter/return: Complete answer
|
||
`:""}renderCurrentInput(){return`
|
||
Filtered results for: ${this.inputValue?this.inputValue:r.gray("Enter something to filter")}
|
||
`}renderOption(e,t,i){let n;return n=t.disabled?e===i?r.gray().underline(t.title):r.strikethrough().gray(t.title):e===i?r.cyan().underline(t.title):t.title,(t.selected?r.green(l.radioOn):l.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter(e=>e.selected).map(e=>e.title).join(", ");let e=[r.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(r.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[o.symbol(this.done,this.aborted),r.bold(this.msg),o.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=r.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=a(e,this.out.columns)}}t.exports=c},951990,(e,t,i)=>{let r=e.r(646693),n=e.r(189078),{style:s,clear:a}=e.r(221511),{erase:o,cursor:l}=e.r(915362);class c extends n{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(l.hide):this.out.write(a(this.outputText,this.out.columns)),super.render(),this.outputText=[s.symbol(this.done,this.aborted),r.bold(this.msg),s.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:r.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(o.line+l.to(0)+this.outputText))}}t.exports=c},587149,(e,t,i)=>{"use strict";t.exports={TextPrompt:e.r(528127),SelectPrompt:e.r(720525),TogglePrompt:e.r(321821),DatePrompt:e.r(215848),NumberPrompt:e.r(67169),MultiselectPrompt:e.r(192255),AutocompletePrompt:e.r(652400),AutocompleteMultiselectPrompt:e.r(389995),ConfirmPrompt:e.r(951990)}},598640,(e,t,i)=>{"use strict";let r=i,n=e.r(587149),s=e=>e;function a(e,t,i={}){return new Promise((r,a)=>{let o=new n[e](t),l=i.onAbort||s,c=i.onSubmit||s,d=i.onExit||s;o.on("state",t.onState||s),o.on("submit",e=>r(c(e))),o.on("exit",e=>r(d(e))),o.on("abort",e=>a(l(e)))})}r.text=e=>a("TextPrompt",e),r.password=e=>(e.style="password",r.text(e)),r.invisible=e=>(e.style="invisible",r.text(e)),r.number=e=>a("NumberPrompt",e),r.date=e=>a("DatePrompt",e),r.confirm=e=>a("ConfirmPrompt",e),r.list=e=>{let t=e.separator||",";return a("TextPrompt",e,{onSubmit:e=>e.split(t).map(e=>e.trim())})},r.toggle=e=>a("TogglePrompt",e),r.select=e=>a("SelectPrompt",e),r.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=e=>e.filter(e=>e.selected).map(e=>e.value);return a("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},r.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=e=>e.filter(e=>e.selected).map(e=>e.value);return a("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};let o=(e,t)=>Promise.resolve(t.filter(t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));r.autocomplete=e=>(e.suggest=e.suggest||o,e.choices=[].concat(e.choices||[]),a("AutocompletePrompt",e))},474661,(e,t,i)=>{"use strict";let r=e.r(598640),n=["suggest","format","onState","validate","onRender","type"],s=()=>{};async function a(e=[],{onSubmit:t=s,onCancel:i=s}={}){let l,c,d,u,h,A,p={},f=a._override||{};e=[].concat(e);let g=async(e,t,i=!1)=>{if(i||!e.validate||!0===e.validate(t))return e.format?await e.format(t,p):t};for(c of e)if({name:u,type:h}=c,"function"==typeof h&&(h=await h(l,{...p},c),c.type=h),h){for(let e in c){if(n.includes(e))continue;let t=c[e];c[e]="function"==typeof t?await t(l,{...p},A):t}if(A=c,"string"!=typeof c.message)throw Error("prompt message is required");if({name:u,type:h}=c,void 0===r[h])throw Error(`prompt type (${h}) is not defined`);if(void 0!==f[c.name]&&void 0!==(l=await g(c,f[c.name]))){p[u]=l;continue}try{l=a._injected?o(a._injected,c.initial):await r[h](c),p[u]=l=await g(c,l,!0),d=await t(c,l,p)}catch(e){d=!await i(c,p)}if(d)break}return p}function o(e,t){let i=e.shift();if(i instanceof Error)throw i;return void 0===i?t:i}function l(e){a._injected=(a._injected||[]).concat(e)}function c(e){a._override=Object.assign({},e)}t.exports=Object.assign(a,{prompt:a,prompts:r,inject:l,override:c})},432161,(e,t,i)=>{"use strict";t.exports=(e,t)=>{if(!e.meta||"escape"===e.name){if(e.ctrl){if("a"===e.name)return"first";if("c"===e.name||"d"===e.name)return"abort";if("e"===e.name)return"last";if("g"===e.name)return"reset"}if(t){if("j"===e.name)return"down";if("k"===e.name)return"up"}return"return"===e.name||"enter"===e.name?"submit":"backspace"===e.name?"delete":"delete"===e.name?"deleteForward":"abort"===e.name?"abort":"escape"===e.name?"exit":"tab"===e.name?"next":"pagedown"===e.name?"nextPage":"pageup"===e.name?"prevPage":"home"===e.name?"home":"end"===e.name?"end":"up"===e.name?"up":"down"===e.name?"down":"right"===e.name?"right":"left"===e.name&&"left"}}},714118,(e,t,i)=>{"use strict";t.exports=e=>{let t=RegExp("[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)|(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PRZcf-ntqry=><~]))","g");return"string"==typeof e?e.replace(t,""):e}},737660,(e,t,i)=>{"use strict";function r(e,t){var i="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=n(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,s=function(){};return{s:s,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:s}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return o=e.done,e},e:function(e){l=!0,a=e},f:function(){try{o||null==i.return||i.return()}finally{if(l)throw a}}}}function n(e,t){if(e){if("string"==typeof e)return s(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return s(e,t)}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}let a=e.r(714118),o=e.r(915362),l=o.erase,c=o.cursor,d=e=>[...a(e)].length;t.exports=function(e,t){if(!t)return l.line+c.to(0);let i=0;var n,s=r(e.split(/\r?\n/));try{for(s.s();!(n=s.n()).done;){let e=n.value;i+=1+Math.floor(Math.max(d(e)-1,0)/t)}}catch(e){s.e(e)}finally{s.f()}return l.lines(i)}},820955,(e,t,i)=>{"use strict";let r={arrowUp:"↑",arrowDown:"↓",arrowLeft:"←",arrowRight:"→",radioOn:"◉",radioOff:"◯",tick:"✔",cross:"✖",ellipsis:"…",pointerSmall:"›",line:"─",pointer:"❯"};r.arrowUp,r.arrowDown,r.arrowLeft,r.arrowRight,t.exports=r},966633,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(820955),s=Object.freeze({password:{scale:1,render:e=>"*".repeat(e.length)},emoji:{scale:2,render:e=>"😃".repeat(e.length)},invisible:{scale:0,render:e=>""},default:{scale:1,render:e=>`${e}`}}),a=e=>s[e]||s.default,o=Object.freeze({aborted:r.red(n.cross),done:r.green(n.tick),exited:r.yellow(n.cross),default:r.cyan("?")}),l=(e,t,i)=>t?o.aborted:i?o.exited:e?o.done:o.default;t.exports={styles:s,render:a,symbols:o,symbol:l,delimiter:e=>r.gray(e?n.ellipsis:n.pointerSmall),item:(e,t)=>r.gray(e?t?n.pointerSmall:"+":n.line)}},416387,(e,t,i)=>{"use strict";let r=e.r(714118);t.exports=function(e,t){let i=String(r(e)||"").split(/\r?\n/);return t?i.map(e=>Math.ceil(e.length/t)).reduce((e,t)=>e+t):i.length}},370860,(e,t,i)=>{"use strict";t.exports=(e,t={})=>{let i=Number.isSafeInteger(parseInt(t.margin))?Array(parseInt(t.margin)).fill(" ").join(""):t.margin||"",r=t.width;return(e||"").split(/\r?\n/g).map(e=>e.split(/\s+/g).reduce((e,t)=>(t.length+i.length>=r||e[e.length-1].length+t.length+1<r?e[e.length-1]+=` ${t}`:e.push(`${i}${t}`),e),[i]).join("\n")).join("\n")}},909317,(e,t,i)=>{"use strict";t.exports=(e,t,i)=>{i=i||t;let r=Math.min(t-i,e-Math.floor(i/2));r<0&&(r=0);let n=Math.min(r+i,t);return{startIndex:r,endIndex:n}}},480708,(e,t,i)=>{"use strict";t.exports={action:e.r(432161),clear:e.r(737660),style:e.r(966633),strip:e.r(714118),figures:e.r(820955),lines:e.r(416387),wrap:e.r(370860),entriesToDisplay:e.r(909317)}},287874,(e,t,i)=>{"use strict";let r=e.r(319668),n=e.r(480708).action,s=e.r(427699),a=e.r(915362),o=a.beep,l=a.cursor,c=e.r(646693);class d extends s{constructor(e={}){super(),this.firstRender=!0,this.in=e.stdin||process.stdin,this.out=e.stdout||process.stdout,this.onRender=(e.onRender||(()=>void 0)).bind(this);const t=r.createInterface({input:this.in,escapeCodeTimeout:50});r.emitKeypressEvents(this.in,t),this.in.isTTY&&this.in.setRawMode(!0);const i=["SelectPrompt","MultiselectPrompt"].indexOf(this.constructor.name)>-1,s=(e,t)=>{let r=n(t,i);!1===r?this._&&this._(e,t):"function"==typeof this[r]?this[r](t):this.bell()};this.close=()=>{this.out.write(l.show),this.in.removeListener("keypress",s),this.in.isTTY&&this.in.setRawMode(!1),t.close(),this.emit(this.aborted?"abort":this.exited?"exit":"submit",this.value),this.closed=!0},this.in.on("keypress",s)}fire(){this.emit("state",{value:this.value,aborted:!!this.aborted,exited:!!this.exited})}bell(){this.out.write(o)}render(){this.onRender(c),this.firstRender&&(this.firstRender=!1)}}t.exports=d},403723,(e,t,i)=>{"use strict";function r(e,t,i,r,n,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}o.done?t(l):Promise.resolve(l).then(r,n)}function n(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var a=e.apply(t,i);function o(e){r(a,n,s,o,l,"next",e)}function l(e){r(a,n,s,o,l,"throw",e)}o(void 0)})}}let s=e.r(646693),a=e.r(287874),o=e.r(915362),l=o.erase,c=o.cursor,d=e.r(480708),u=d.style,h=d.clear,A=d.lines,p=d.figures;class f extends a{constructor(e={}){super(e),this.transform=u.render(e.style),this.scale=this.transform.scale,this.msg=e.message,this.initial=e.initial||"",this.validator=e.validate||(()=>!0),this.value="",this.errorMsg=e.error||"Please Enter A Valid Value",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.clear=h("",this.out.columns),this.render()}set value(e){!e&&this.initial?(this.placeholder=!0,this.rendered=s.gray(this.transform.render(this.initial))):(this.placeholder=!1,this.rendered=this.transform.render(e)),this._value=e,this.fire()}get value(){return this._value}reset(){this.value="",this.cursor=Number(!!this.initial),this.cursorOffset=0,this.fire(),this.render()}exit(){this.abort()}abort(){this.value=this.value||this.initial,this.done=this.aborted=!0,this.error=!1,this.red=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return n(function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return n(function*(){if(e.value=e.value||e.initial,e.cursorOffset=0,e.cursor=e.rendered.length,yield e.validate(),e.error){e.red=!0,e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()})()}next(){if(!this.placeholder)return this.bell();this.value=this.initial,this.cursor=this.rendered.length,this.fire(),this.render()}moveCursor(e){this.placeholder||(this.cursor=this.cursor+e,this.cursorOffset+=e)}_(e,t){let i=this.value.slice(0,this.cursor),r=this.value.slice(this.cursor);this.value=`${i}${e}${r}`,this.red=!1,this.cursor=this.placeholder?0:i.length+1,this.render()}delete(){if(this.isCursorAtStart())return this.bell();let e=this.value.slice(0,this.cursor-1),t=this.value.slice(this.cursor);this.value=`${e}${t}`,this.red=!1,this.isCursorAtStart()?this.cursorOffset=0:(this.cursorOffset++,this.moveCursor(-1)),this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();let e=this.value.slice(0,this.cursor),t=this.value.slice(this.cursor+1);this.value=`${e}${t}`,this.red=!1,this.isCursorAtEnd()?this.cursorOffset=0:this.cursorOffset++,this.render()}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length,this.render()}left(){if(this.cursor<=0||this.placeholder)return this.bell();this.moveCursor(-1),this.render()}right(){if(this.cursor*this.scale>=this.rendered.length||this.placeholder)return this.bell();this.moveCursor(1),this.render()}isCursorAtStart(){return 0===this.cursor||this.placeholder&&1===this.cursor}isCursorAtEnd(){return this.cursor===this.rendered.length||this.placeholder&&this.cursor===this.rendered.length+1}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(c.down(A(this.outputError,this.out.columns)-1)+h(this.outputError,this.out.columns)),this.out.write(h(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),this.red?s.red(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
||
`).reduce((e,t,i)=>e+`
|
||
${i?" ":p.pointerSmall} ${s.red().italic(t)}`,"")),this.out.write(l.line+c.to(0)+this.outputText+c.save+this.outputError+c.restore+c.move(this.cursorOffset,0)))}}t.exports=f},708354,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(287874),s=e.r(480708),a=s.style,o=s.clear,l=s.figures,c=s.wrap,d=s.entriesToDisplay,u=e.r(915362).cursor;class h extends n{constructor(e={}){super(e),this.msg=e.message,this.hint=e.hint||"- Use arrow-keys. Return to submit.",this.warn=e.warn||"- This option is disabled",this.cursor=e.initial||0,this.choices=e.choices.map((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),value:e&&(void 0===e.value?t:e.value),description:e&&e.description,selected:e&&e.selected,disabled:e&&e.disabled})),this.optionsPerPage=e.optionsPerPage||10,this.value=(this.choices[this.cursor]||{}).value,this.clear=o("",this.out.columns),this.render()}moveCursor(e){this.cursor=e,this.value=this.choices[e].value,this.fire()}reset(){this.moveCursor(0),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.selection.disabled?this.bell():(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.moveCursor(0),this.render()}last(){this.moveCursor(this.choices.length-1),this.render()}up(){0===this.cursor?this.moveCursor(this.choices.length-1):this.moveCursor(this.cursor-1),this.render()}down(){this.cursor===this.choices.length-1?this.moveCursor(0):this.moveCursor(this.cursor+1),this.render()}next(){this.moveCursor((this.cursor+1)%this.choices.length),this.render()}_(e,t){if(" "===e)return this.submit()}get selection(){return this.choices[this.cursor]}render(){if(this.closed)return;this.firstRender?this.out.write(u.hide):this.out.write(o(this.outputText,this.out.columns)),super.render();let e=d(this.cursor,this.choices.length,this.optionsPerPage),t=e.startIndex,i=e.endIndex;if(this.outputText=[a.symbol(this.done,this.aborted),r.bold(this.msg),a.delimiter(!1),this.done?this.selection.title:this.selection.disabled?r.yellow(this.warn):r.gray(this.hint)].join(" "),!this.done){this.outputText+="\n";for(let e=t;e<i;e++){let n,s,a="",o=this.choices[e];s=e===t&&t>0?l.arrowUp:e===i-1&&i<this.choices.length?l.arrowDown:" ",o.disabled?(n=this.cursor===e?r.gray().underline(o.title):r.strikethrough().gray(o.title),s=(this.cursor===e?r.bold().gray(l.pointer)+" ":" ")+s):(n=this.cursor===e?r.cyan().underline(o.title):o.title,s=(this.cursor===e?r.cyan(l.pointer)+" ":" ")+s,o.description&&this.cursor===e&&(a=` - ${o.description}`,(s.length+n.length+a.length>=this.out.columns||o.description.split(/\r?\n/).length>1)&&(a="\n"+c(o.description,{margin:3,width:this.out.columns})))),this.outputText+=`${s} ${n}${r.gray(a)}
|
||
`}}this.out.write(this.outputText)}}t.exports=h},211130,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(287874),s=e.r(480708),a=s.style,o=s.clear,l=e.r(915362),c=l.cursor,d=l.erase;class u extends n{constructor(e={}){super(e),this.msg=e.message,this.value=!!e.initial,this.active=e.active||"on",this.inactive=e.inactive||"off",this.initialValue=this.value,this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}deactivate(){if(!1===this.value)return this.bell();this.value=!1,this.render()}activate(){if(!0===this.value)return this.bell();this.value=!0,this.render()}delete(){this.deactivate()}left(){this.deactivate()}right(){this.activate()}down(){this.deactivate()}up(){this.activate()}next(){this.value=!this.value,this.fire(),this.render()}_(e,t){if(" "===e)this.value=!this.value;else if("1"===e)this.value=!0;else{if("0"!==e)return this.bell();this.value=!1}this.render()}render(){this.closed||(this.firstRender?this.out.write(c.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[a.symbol(this.done,this.aborted),r.bold(this.msg),a.delimiter(this.done),this.value?this.inactive:r.cyan().underline(this.inactive),r.gray("/"),this.value?r.cyan().underline(this.active):this.active].join(" "),this.out.write(d.line+c.to(0)+this.outputText))}}t.exports=u},135071,(e,t,i)=>{"use strict";class r{constructor({token:e,date:t,parts:i,locales:r}){this.token=e,this.date=t||new Date,this.parts=i||[this],this.locales=r||{}}up(){}down(){}next(){let e=this.parts.indexOf(this);return this.parts.find((t,i)=>i>e&&t instanceof r)}setTo(e){}prev(){let e=[].concat(this.parts).reverse(),t=e.indexOf(this);return e.find((e,i)=>i>t&&e instanceof r)}toString(){return String(this.date)}}t.exports=r},625299,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setHours((this.date.getHours()+12)%24)}down(){this.up()}toString(){let e=this.date.getHours()>12?"pm":"am";return/\A/.test(this.token)?e.toUpperCase():e}}t.exports=n},816169,(e,t,i)=>{"use strict";let r=e.r(135071),n=e=>1==(e%=10)?"st":2===e?"nd":3===e?"rd":"th";class s extends r{constructor(e={}){super(e)}up(){this.date.setDate(this.date.getDate()+1)}down(){this.date.setDate(this.date.getDate()-1)}setTo(e){this.date.setDate(parseInt(e.substr(-2)))}toString(){let e=this.date.getDate(),t=this.date.getDay();return"DD"===this.token?String(e).padStart(2,"0"):"Do"===this.token?e+n(e):"d"===this.token?t+1:"ddd"===this.token?this.locales.weekdaysShort[t]:"dddd"===this.token?this.locales.weekdays[t]:e}}t.exports=s},320834,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setHours(this.date.getHours()+1)}down(){this.date.setHours(this.date.getHours()-1)}setTo(e){this.date.setHours(parseInt(e.substr(-2)))}toString(){let e=this.date.getHours();return/h/.test(this.token)&&(e=e%12||12),this.token.length>1?String(e).padStart(2,"0"):e}}t.exports=n},501754,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setMilliseconds(this.date.getMilliseconds()+1)}down(){this.date.setMilliseconds(this.date.getMilliseconds()-1)}setTo(e){this.date.setMilliseconds(parseInt(e.substr(-this.token.length)))}toString(){return String(this.date.getMilliseconds()).padStart(4,"0").substr(0,this.token.length)}}t.exports=n},50476,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setMinutes(this.date.getMinutes()+1)}down(){this.date.setMinutes(this.date.getMinutes()-1)}setTo(e){this.date.setMinutes(parseInt(e.substr(-2)))}toString(){let e=this.date.getMinutes();return this.token.length>1?String(e).padStart(2,"0"):e}}t.exports=n},932619,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setMonth(this.date.getMonth()+1)}down(){this.date.setMonth(this.date.getMonth()-1)}setTo(e){e=parseInt(e.substr(-2))-1,this.date.setMonth(e<0?0:e)}toString(){let e=this.date.getMonth(),t=this.token.length;return 2===t?String(e+1).padStart(2,"0"):3===t?this.locales.monthsShort[e]:4===t?this.locales.months[e]:String(e+1)}}t.exports=n},80281,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setSeconds(this.date.getSeconds()+1)}down(){this.date.setSeconds(this.date.getSeconds()-1)}setTo(e){this.date.setSeconds(parseInt(e.substr(-2)))}toString(){let e=this.date.getSeconds();return this.token.length>1?String(e).padStart(2,"0"):e}}t.exports=n},994549,(e,t,i)=>{"use strict";let r=e.r(135071);class n extends r{constructor(e={}){super(e)}up(){this.date.setFullYear(this.date.getFullYear()+1)}down(){this.date.setFullYear(this.date.getFullYear()-1)}setTo(e){this.date.setFullYear(e.substr(-4))}toString(){let e=String(this.date.getFullYear()).padStart(4,"0");return 2===this.token.length?e.substr(-2):e}}t.exports=n},813661,(e,t,i)=>{"use strict";t.exports={DatePart:e.r(135071),Meridiem:e.r(625299),Day:e.r(816169),Hours:e.r(320834),Milliseconds:e.r(501754),Minutes:e.r(50476),Month:e.r(932619),Seconds:e.r(80281),Year:e.r(994549)}},8105,(e,t,i)=>{"use strict";function r(e,t,i,r,n,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}o.done?t(l):Promise.resolve(l).then(r,n)}function n(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var a=e.apply(t,i);function o(e){r(a,n,s,o,l,"next",e)}function l(e){r(a,n,s,o,l,"throw",e)}o(void 0)})}}let s=e.r(646693),a=e.r(287874),o=e.r(480708),l=o.style,c=o.clear,d=o.figures,u=e.r(915362),h=u.erase,A=u.cursor,p=e.r(813661),f=p.DatePart,g=p.Meridiem,m=p.Day,y=p.Hours,b=p.Milliseconds,E=p.Minutes,C=p.Month,w=p.Seconds,I=p.Year,v=/\\(.)|"((?:\\["\\]|[^"])+)"|(D[Do]?|d{3,4}|d)|(M{1,4})|(YY(?:YY)?)|([aA])|([Hh]{1,2})|(m{1,2})|(s{1,2})|(S{1,4})|./g,B={1:({token:e})=>e.replace(/\\(.)/g,"$1"),2:e=>new m(e),3:e=>new C(e),4:e=>new I(e),5:e=>new g(e),6:e=>new y(e),7:e=>new E(e),8:e=>new w(e),9:e=>new b(e)},Q={months:"January,February,March,April,May,June,July,August,September,October,November,December".split(","),monthsShort:"Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),weekdays:"Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),weekdaysShort:"Sun,Mon,Tue,Wed,Thu,Fri,Sat".split(",")};class x extends a{constructor(e={}){super(e),this.msg=e.message,this.cursor=0,this.typed="",this.locales=Object.assign(Q,e.locales),this._date=e.initial||new Date,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.mask=e.mask||"YYYY-MM-DD HH:mm:ss",this.clear=c("",this.out.columns),this.render()}get value(){return this.date}get date(){return this._date}set date(e){e&&this._date.setTime(e.getTime())}set mask(e){let t;for(this.parts=[];t=v.exec(e);){let e=t.shift(),i=t.findIndex(e=>null!=e);this.parts.push(i in B?B[i]({token:t[i]||e,date:this.date,parts:this.parts,locales:this.locales}):t[i]||e)}let i=this.parts.reduce((e,t)=>("string"==typeof t&&"string"==typeof e[e.length-1]?e[e.length-1]+=t:e.push(t),e),[]);this.parts.splice(0),this.parts.push(...i),this.reset()}moveCursor(e){this.typed="",this.cursor=e,this.fire()}reset(){this.moveCursor(this.parts.findIndex(e=>e instanceof f)),this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}validate(){var e=this;return n(function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return n(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}e.done=!0,e.aborted=!1,e.fire(),e.render(),e.out.write("\n"),e.close()})()}up(){this.typed="",this.parts[this.cursor].up(),this.render()}down(){this.typed="",this.parts[this.cursor].down(),this.render()}left(){let e=this.parts[this.cursor].prev();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}right(){let e=this.parts[this.cursor].next();if(null==e)return this.bell();this.moveCursor(this.parts.indexOf(e)),this.render()}next(){let e=this.parts[this.cursor].next();this.moveCursor(e?this.parts.indexOf(e):this.parts.findIndex(e=>e instanceof f)),this.render()}_(e){/\d/.test(e)&&(this.typed+=e,this.parts[this.cursor].setTo(this.typed),this.render())}render(){this.closed||(this.firstRender?this.out.write(A.hide):this.out.write(c(this.outputText,this.out.columns)),super.render(),this.outputText=[l.symbol(this.done,this.aborted),s.bold(this.msg),l.delimiter(!1),this.parts.reduce((e,t,i)=>e.concat(i!==this.cursor||this.done?t:s.cyan().underline(t.toString())),[]).join("")].join(" "),this.error&&(this.outputText+=this.errorMsg.split("\n").reduce((e,t,i)=>e+`
|
||
${i?" ":d.pointerSmall} ${s.red().italic(t)}`,"")),this.out.write(h.line+A.to(0)+this.outputText))}}t.exports=x},570383,(e,t,i)=>{"use strict";function r(e,t,i,r,n,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}o.done?t(l):Promise.resolve(l).then(r,n)}function n(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var a=e.apply(t,i);function o(e){r(a,n,s,o,l,"next",e)}function l(e){r(a,n,s,o,l,"throw",e)}o(void 0)})}}let s=e.r(646693),a=e.r(287874),o=e.r(915362),l=o.cursor,c=o.erase,d=e.r(480708),u=d.style,h=d.figures,A=d.clear,p=d.lines,f=/[0-9]/,g=e=>void 0!==e,m=(e,t)=>{let i=Math.pow(10,t);return Math.round(e*i)/i};class y extends a{constructor(e={}){super(e),this.transform=u.render(e.style),this.msg=e.message,this.initial=g(e.initial)?e.initial:"",this.float=!!e.float,this.round=e.round||2,this.inc=e.increment||1,this.min=g(e.min)?e.min:-1/0,this.max=g(e.max)?e.max:1/0,this.errorMsg=e.error||"Please Enter A Valid Value",this.validator=e.validate||(()=>!0),this.color="cyan",this.value="",this.typed="",this.lastHit=0,this.render()}set value(e){e||0===e?(this.placeholder=!1,this.rendered=this.transform.render(`${m(e,this.round)}`),this._value=m(e,this.round)):(this.placeholder=!0,this.rendered=s.gray(this.transform.render(`${this.initial}`)),this._value=""),this.fire()}get value(){return this._value}parse(e){return this.float?parseFloat(e):parseInt(e)}valid(e){return"-"===e||"."===e&&this.float||f.test(e)}reset(){this.typed="",this.value="",this.fire(),this.render()}exit(){this.abort()}abort(){let e=this.value;this.value=""!==e?e:this.initial,this.done=this.aborted=!0,this.error=!1,this.fire(),this.render(),this.out.write(`
|
||
`),this.close()}validate(){var e=this;return n(function*(){let t=yield e.validator(e.value);"string"==typeof t&&(e.errorMsg=t,t=!1),e.error=!t})()}submit(){var e=this;return n(function*(){if(yield e.validate(),e.error){e.color="red",e.fire(),e.render();return}let t=e.value;e.value=""!==t?t:e.initial,e.done=!0,e.aborted=!1,e.error=!1,e.fire(),e.render(),e.out.write(`
|
||
`),e.close()})()}up(){if(this.typed="",""===this.value&&(this.value=this.min-this.inc),this.value>=this.max)return this.bell();this.value+=this.inc,this.color="cyan",this.fire(),this.render()}down(){if(this.typed="",""===this.value&&(this.value=this.min+this.inc),this.value<=this.min)return this.bell();this.value-=this.inc,this.color="cyan",this.fire(),this.render()}delete(){let e=this.value.toString();if(0===e.length)return this.bell();this.value=this.parse(e=e.slice(0,-1))||"",""!==this.value&&this.value<this.min&&(this.value=this.min),this.color="cyan",this.fire(),this.render()}next(){this.value=this.initial,this.fire(),this.render()}_(e,t){if(!this.valid(e))return this.bell();let i=Date.now();if(i-this.lastHit>1e3&&(this.typed=""),this.typed+=e,this.lastHit=i,this.color="cyan","."===e)return this.fire();this.value=Math.min(this.parse(this.typed),this.max),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min),this.fire(),this.render()}render(){this.closed||(this.firstRender||(this.outputError&&this.out.write(l.down(p(this.outputError,this.out.columns)-1)+A(this.outputError,this.out.columns)),this.out.write(A(this.outputText,this.out.columns))),super.render(),this.outputError="",this.outputText=[u.symbol(this.done,this.aborted),s.bold(this.msg),u.delimiter(this.done),!this.done||!this.done&&!this.placeholder?s[this.color]().underline(this.rendered):this.rendered].join(" "),this.error&&(this.outputError+=this.errorMsg.split(`
|
||
`).reduce((e,t,i)=>e+`
|
||
${i?" ":h.pointerSmall} ${s.red().italic(t)}`,"")),this.out.write(c.line+l.to(0)+this.outputText+l.save+this.outputError+l.restore))}}t.exports=y},468589,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(915362).cursor,s=e.r(287874),a=e.r(480708),o=a.clear,l=a.figures,c=a.style,d=a.wrap,u=a.entriesToDisplay;class h extends s{constructor(e={}){super(e),this.msg=e.message,this.cursor=e.cursor||0,this.scrollIndex=e.cursor||0,this.hint=e.hint||"",this.warn=e.warn||"- This option is disabled -",this.minSelected=e.min,this.showMinError=!1,this.maxChoices=e.max,this.instructions=e.instructions,this.optionsPerPage=e.optionsPerPage||10,this.value=e.choices.map((e,t)=>("string"==typeof e&&(e={title:e,value:t}),{title:e&&(e.title||e.value||e),description:e&&e.description,value:e&&(void 0===e.value?t:e.value),selected:e&&e.selected,disabled:e&&e.disabled})),this.clear=o("",this.out.columns),e.overrideRender||this.render()}reset(){this.value.map(e=>!e.selected),this.cursor=0,this.fire(),this.render()}selected(){return this.value.filter(e=>e.selected)}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){let e=this.value.filter(e=>e.selected);this.minSelected&&e.length<this.minSelected?(this.showMinError=!0,this.render()):(this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}first(){this.cursor=0,this.render()}last(){this.cursor=this.value.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.value.length,this.render()}up(){0===this.cursor?this.cursor=this.value.length-1:this.cursor--,this.render()}down(){this.cursor===this.value.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.value[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.value[this.cursor].selected=!0,this.render()}handleSpaceToggle(){let e=this.value[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}toggleAll(){if(void 0!==this.maxChoices||this.value[this.cursor].disabled)return this.bell();let e=!this.value[this.cursor].selected;this.value.filter(e=>!e.disabled).forEach(t=>t.selected=e),this.render()}_(e,t){if(" "===e)this.handleSpaceToggle();else{if("a"!==e)return this.bell();this.toggleAll()}}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`
|
||
Instructions:
|
||
${l.arrowUp}/${l.arrowDown}: Highlight option
|
||
${l.arrowLeft}/${l.arrowRight}/[space]: Toggle selection
|
||
`+(void 0===this.maxChoices?` a: Toggle all
|
||
`:"")+" enter/return: Complete answer":""}renderOption(e,t,i,n){let s,a,o=(t.selected?r.green(l.radioOn):l.radioOff)+" "+n+" ";return t.disabled?s=e===i?r.gray().underline(t.title):r.strikethrough().gray(t.title):(s=e===i?r.cyan().underline(t.title):t.title,e===i&&t.description&&(a=` - ${t.description}`,(o.length+s.length+a.length>=this.out.columns||t.description.split(/\r?\n/).length>1)&&(a="\n"+d(t.description,{margin:o.length,width:this.out.columns})))),o+s+r.gray(a||"")}paginateOptions(e){if(0===e.length)return r.red("No matches for this query.");let t=u(this.cursor,e.length,this.optionsPerPage),i=t.startIndex,n=t.endIndex,s,a=[];for(let t=i;t<n;t++)s=t===i&&i>0?l.arrowUp:t===n-1&&n<e.length?l.arrowDown:" ",a.push(this.renderOption(this.cursor,e[t],t,s));return"\n"+a.join("\n")}renderOptions(e){return this.done?"":this.paginateOptions(e)}renderDoneOrInstructions(){if(this.done)return this.value.filter(e=>e.selected).map(e=>e.title).join(", ");let e=[r.gray(this.hint),this.renderInstructions()];return this.value[this.cursor].disabled&&e.push(r.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[c.symbol(this.done,this.aborted),r.bold(this.msg),c.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=r.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.value),this.out.write(this.clear+e),this.clear=o(e,this.out.columns)}}t.exports=h},125105,(e,t,i)=>{"use strict";function r(e,t,i,r,n,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}o.done?t(l):Promise.resolve(l).then(r,n)}function n(e){return function(){var t=this,i=arguments;return new Promise(function(n,s){var a=e.apply(t,i);function o(e){r(a,n,s,o,l,"next",e)}function l(e){r(a,n,s,o,l,"throw",e)}o(void 0)})}}let s=e.r(646693),a=e.r(287874),o=e.r(915362),l=o.erase,c=o.cursor,d=e.r(480708),u=d.style,h=d.clear,A=d.figures,p=d.wrap,f=d.entriesToDisplay,g=(e,t)=>e[t]&&(e[t].value||e[t].title||e[t]),m=(e,t)=>e[t]&&(e[t].title||e[t].value||e[t]),y=(e,t)=>{let i=e.findIndex(e=>e.value===t||e.title===t);return i>-1?i:void 0};class b extends a{constructor(e={}){super(e),this.msg=e.message,this.suggest=e.suggest,this.choices=e.choices,this.initial="number"==typeof e.initial?e.initial:y(e.choices,e.initial),this.select=this.initial||e.cursor||0,this.i18n={noMatches:e.noMatches||"no matches found"},this.fallback=e.fallback||this.initial,this.clearFirst=e.clearFirst||!1,this.suggestions=[],this.input="",this.limit=e.limit||10,this.cursor=0,this.transform=u.render(e.style),this.scale=this.transform.scale,this.render=this.render.bind(this),this.complete=this.complete.bind(this),this.clear=h("",this.out.columns),this.complete(this.render),this.render()}set fallback(e){this._fb=Number.isSafeInteger(parseInt(e))?parseInt(e):e}get fallback(){let e;return"number"==typeof this._fb?e=this.choices[this._fb]:"string"==typeof this._fb&&(e={title:this._fb}),e||this._fb||{title:this.i18n.noMatches}}moveSelect(e){this.select=e,this.suggestions.length>0?this.value=g(this.suggestions,e):this.value=this.fallback.value,this.fire()}complete(e){var t=this;return n(function*(){let i=t.completing=t.suggest(t.input,t.choices),r=yield i;if(t.completing!==i)return;t.suggestions=r.map((e,t,i)=>({title:m(i,t),value:g(i,t),description:e.description})),t.completing=!1;let n=Math.max(r.length-1,0);t.moveSelect(Math.min(n,t.select)),e&&e()})()}reset(){this.input="",this.complete(()=>{this.moveSelect(void 0!==this.initial?this.initial:0),this.render()}),this.render()}exit(){this.clearFirst&&this.input.length>0?this.reset():(this.done=this.exited=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close())}abort(){this.done=this.aborted=!0,this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.done=!0,this.aborted=this.exited=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){let i=this.input.slice(0,this.cursor),r=this.input.slice(this.cursor);this.input=`${i}${e}${r}`,this.cursor=i.length+1,this.complete(this.render),this.render()}delete(){if(0===this.cursor)return this.bell();let e=this.input.slice(0,this.cursor-1),t=this.input.slice(this.cursor);this.input=`${e}${t}`,this.complete(this.render),this.cursor=this.cursor-1,this.render()}deleteForward(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();let e=this.input.slice(0,this.cursor),t=this.input.slice(this.cursor+1);this.input=`${e}${t}`,this.complete(this.render),this.render()}first(){this.moveSelect(0),this.render()}last(){this.moveSelect(this.suggestions.length-1),this.render()}up(){0===this.select?this.moveSelect(this.suggestions.length-1):this.moveSelect(this.select-1),this.render()}down(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}next(){this.select===this.suggestions.length-1?this.moveSelect(0):this.moveSelect(this.select+1),this.render()}nextPage(){this.moveSelect(Math.min(this.select+this.limit,this.suggestions.length-1)),this.render()}prevPage(){this.moveSelect(Math.max(this.select-this.limit,0)),this.render()}left(){if(this.cursor<=0)return this.bell();this.cursor=this.cursor-1,this.render()}right(){if(this.cursor*this.scale>=this.rendered.length)return this.bell();this.cursor=this.cursor+1,this.render()}renderOption(e,t,i,r){let n,a=i?A.arrowUp:r?A.arrowDown:" ",o=t?s.cyan().underline(e.title):e.title;return a=(t?s.cyan(A.pointer)+" ":" ")+a,e.description&&(n=` - ${e.description}`,(a.length+o.length+n.length>=this.out.columns||e.description.split(/\r?\n/).length>1)&&(n="\n"+p(e.description,{margin:3,width:this.out.columns}))),a+" "+o+s.gray(n||"")}render(){if(this.closed)return;this.firstRender?this.out.write(c.hide):this.out.write(h(this.outputText,this.out.columns)),super.render();let e=f(this.select,this.choices.length,this.limit),t=e.startIndex,i=e.endIndex;if(this.outputText=[u.symbol(this.done,this.aborted,this.exited),s.bold(this.msg),u.delimiter(this.completing),this.done&&this.suggestions[this.select]?this.suggestions[this.select].title:this.rendered=this.transform.render(this.input)].join(" "),!this.done){let e=this.suggestions.slice(t,i).map((e,r)=>this.renderOption(e,this.select===r+t,0===r&&t>0,r+t===i-1&&i<this.choices.length)).join("\n");this.outputText+=`
|
||
`+(e||s.gray(this.fallback.title))}this.out.write(l.line+c.to(0)+this.outputText)}}t.exports=b},511417,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(915362).cursor,s=e.r(468589),a=e.r(480708),o=a.clear,l=a.style,c=a.figures;class d extends s{constructor(e={}){e.overrideRender=!0,super(e),this.inputValue="",this.clear=o("",this.out.columns),this.filteredOptions=this.value,this.render()}last(){this.cursor=this.filteredOptions.length-1,this.render()}next(){this.cursor=(this.cursor+1)%this.filteredOptions.length,this.render()}up(){0===this.cursor?this.cursor=this.filteredOptions.length-1:this.cursor--,this.render()}down(){this.cursor===this.filteredOptions.length-1?this.cursor=0:this.cursor++,this.render()}left(){this.filteredOptions[this.cursor].selected=!1,this.render()}right(){if(this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();this.filteredOptions[this.cursor].selected=!0,this.render()}delete(){this.inputValue.length&&(this.inputValue=this.inputValue.substr(0,this.inputValue.length-1),this.updateFilteredOptions())}updateFilteredOptions(){let e=this.filteredOptions[this.cursor];this.filteredOptions=this.value.filter(e=>!this.inputValue||!!("string"==typeof e.title&&e.title.toLowerCase().includes(this.inputValue.toLowerCase())||"string"==typeof e.value&&e.value.toLowerCase().includes(this.inputValue.toLowerCase())));let t=this.filteredOptions.findIndex(t=>t===e);this.cursor=t<0?0:t,this.render()}handleSpaceToggle(){let e=this.filteredOptions[this.cursor];if(e.selected)e.selected=!1,this.render();else{if(e.disabled||this.value.filter(e=>e.selected).length>=this.maxChoices)return this.bell();e.selected=!0,this.render()}}handleInputChange(e){this.inputValue=this.inputValue+e,this.updateFilteredOptions()}_(e,t){" "===e?this.handleSpaceToggle():this.handleInputChange(e)}renderInstructions(){return void 0===this.instructions||this.instructions?"string"==typeof this.instructions?this.instructions:`
|
||
Instructions:
|
||
${c.arrowUp}/${c.arrowDown}: Highlight option
|
||
${c.arrowLeft}/${c.arrowRight}/[space]: Toggle selection
|
||
[a,b,c]/delete: Filter choices
|
||
enter/return: Complete answer
|
||
`:""}renderCurrentInput(){return`
|
||
Filtered results for: ${this.inputValue?this.inputValue:r.gray("Enter something to filter")}
|
||
`}renderOption(e,t,i){let n;return n=t.disabled?e===i?r.gray().underline(t.title):r.strikethrough().gray(t.title):e===i?r.cyan().underline(t.title):t.title,(t.selected?r.green(c.radioOn):c.radioOff)+" "+n}renderDoneOrInstructions(){if(this.done)return this.value.filter(e=>e.selected).map(e=>e.title).join(", ");let e=[r.gray(this.hint),this.renderInstructions(),this.renderCurrentInput()];return this.filteredOptions.length&&this.filteredOptions[this.cursor].disabled&&e.push(r.yellow(this.warn)),e.join(" ")}render(){if(this.closed)return;this.firstRender&&this.out.write(n.hide),super.render();let e=[l.symbol(this.done,this.aborted),r.bold(this.msg),l.delimiter(!1),this.renderDoneOrInstructions()].join(" ");this.showMinError&&(e+=r.red(`You must select a minimum of ${this.minSelected} choices.`),this.showMinError=!1),e+=this.renderOptions(this.filteredOptions),this.out.write(this.clear+e),this.clear=o(e,this.out.columns)}}t.exports=d},104571,(e,t,i)=>{"use strict";let r=e.r(646693),n=e.r(287874),s=e.r(480708),a=s.style,o=s.clear,l=e.r(915362),c=l.erase,d=l.cursor;class u extends n{constructor(e={}){super(e),this.msg=e.message,this.value=e.initial,this.initialValue=!!e.initial,this.yesMsg=e.yes||"yes",this.yesOption=e.yesOption||"(Y/n)",this.noMsg=e.no||"no",this.noOption=e.noOption||"(y/N)",this.render()}reset(){this.value=this.initialValue,this.fire(),this.render()}exit(){this.abort()}abort(){this.done=this.aborted=!0,this.fire(),this.render(),this.out.write("\n"),this.close()}submit(){this.value=this.value||!1,this.done=!0,this.aborted=!1,this.fire(),this.render(),this.out.write("\n"),this.close()}_(e,t){return"y"===e.toLowerCase()?(this.value=!0,this.submit()):"n"===e.toLowerCase()?(this.value=!1,this.submit()):this.bell()}render(){this.closed||(this.firstRender?this.out.write(d.hide):this.out.write(o(this.outputText,this.out.columns)),super.render(),this.outputText=[a.symbol(this.done,this.aborted),r.bold(this.msg),a.delimiter(this.done),this.done?this.value?this.yesMsg:this.noMsg:r.gray(this.initialValue?this.yesOption:this.noOption)].join(" "),this.out.write(c.line+d.to(0)+this.outputText))}}t.exports=u},579400,(e,t,i)=>{"use strict";t.exports={TextPrompt:e.r(403723),SelectPrompt:e.r(708354),TogglePrompt:e.r(211130),DatePrompt:e.r(8105),NumberPrompt:e.r(570383),MultiselectPrompt:e.r(468589),AutocompletePrompt:e.r(125105),AutocompleteMultiselectPrompt:e.r(511417),ConfirmPrompt:e.r(104571)}},275127,(e,t,i)=>{"use strict";let r=i,n=e.r(579400),s=e=>e;function a(e,t,i={}){return new Promise((r,a)=>{let o=new n[e](t),l=i.onAbort||s,c=i.onSubmit||s,d=i.onExit||s;o.on("state",t.onState||s),o.on("submit",e=>r(c(e))),o.on("exit",e=>r(d(e))),o.on("abort",e=>a(l(e)))})}r.text=e=>a("TextPrompt",e),r.password=e=>(e.style="password",r.text(e)),r.invisible=e=>(e.style="invisible",r.text(e)),r.number=e=>a("NumberPrompt",e),r.date=e=>a("DatePrompt",e),r.confirm=e=>a("ConfirmPrompt",e),r.list=e=>{let t=e.separator||",";return a("TextPrompt",e,{onSubmit:e=>e.split(t).map(e=>e.trim())})},r.toggle=e=>a("TogglePrompt",e),r.select=e=>a("SelectPrompt",e),r.multiselect=e=>{e.choices=[].concat(e.choices||[]);let t=e=>e.filter(e=>e.selected).map(e=>e.value);return a("MultiselectPrompt",e,{onAbort:t,onSubmit:t})},r.autocompleteMultiselect=e=>{e.choices=[].concat(e.choices||[]);let t=e=>e.filter(e=>e.selected).map(e=>e.value);return a("AutocompleteMultiselectPrompt",e,{onAbort:t,onSubmit:t})};let o=(e,t)=>Promise.resolve(t.filter(t=>t.title.slice(0,e.length).toLowerCase()===e.toLowerCase()));r.autocomplete=e=>(e.suggest=e.suggest||o,e.choices=[].concat(e.choices||[]),a("AutocompletePrompt",e))},213161,(e,t,i)=>{"use strict";function r(e,t){var i=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),i.push.apply(i,r)}return i}function n(e){for(var t=1;t<arguments.length;t++){var i=null!=arguments[t]?arguments[t]:{};t%2?r(Object(i),!0).forEach(function(t){s(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function s(e,t,i){return t in e?Object.defineProperty(e,t,{value:i,enumerable:!0,configurable:!0,writable:!0}):e[t]=i,e}function a(e,t){var i="u">typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!i){if(Array.isArray(e)||(i=o(e))||t&&e&&"number"==typeof e.length){i&&(e=i);var r=0,n=function(){};return{s:n,n:function(){return r>=e.length?{done:!0}:{done:!1,value:e[r++]}},e:function(e){throw e},f:n}}throw TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){i=i.call(e)},n:function(){var e=i.next();return a=e.done,e},e:function(e){l=!0,s=e},f:function(){try{a||null==i.return||i.return()}finally{if(l)throw s}}}}function o(e,t){if(e){if("string"==typeof e)return l(e,t);var i=Object.prototype.toString.call(e).slice(8,-1);if("Object"===i&&e.constructor&&(i=e.constructor.name),"Map"===i||"Set"===i)return Array.from(e);if("Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i))return l(e,t)}}function l(e,t){(null==t||t>e.length)&&(t=e.length);for(var i=0,r=Array(t);i<t;i++)r[i]=e[i];return r}function c(e,t,i,r,n,s,a){try{var o=e[s](a),l=o.value}catch(e){i(e);return}o.done?t(l):Promise.resolve(l).then(r,n)}function d(e){return function(){var t=this,i=arguments;return new Promise(function(r,n){var s=e.apply(t,i);function a(e){c(s,r,n,a,o,"next",e)}function o(e){c(s,r,n,a,o,"throw",e)}a(void 0)})}}let u=e.r(275127),h=["suggest","format","onState","validate","onRender","type"],A=()=>{};function p(){return f.apply(this,arguments)}function f(){return(f=d(function*(e=[],{onSubmit:t=A,onCancel:i=A}={}){let r,s,o,l,c,f,m={},y=p._override||{};e=[].concat(e);let b=function(){var e=d(function*(e,t,i=!1){if(i||!e.validate||!0===e.validate(t))return e.format?yield e.format(t,m):t});return function(t,i){return e.apply(this,arguments)}}();var E,C=a(e);try{for(C.s();!(E=C.n()).done;){var w=s=E.value;if(l=w.name,c=w.type,"function"==typeof c&&(c=yield c(r,n({},m),s),s.type=c),c){for(let e in s){if(h.includes(e))continue;let t=s[e];s[e]="function"==typeof t?yield t(r,n({},m),f):t}if(f=s,"string"!=typeof s.message)throw Error("prompt message is required");var I=s;if(l=I.name,c=I.type,void 0===u[c])throw Error(`prompt type (${c}) is not defined`);if(void 0!==y[s.name]&&(r=yield b(s,y[s.name]),void 0!==r)){m[l]=r;continue}try{r=p._injected?g(p._injected,s.initial):yield u[c](s),m[l]=r=yield b(s,r,!0),o=yield t(s,r,m)}catch(e){o=!(yield i(s,m))}if(o)return m}}}catch(e){C.e(e)}finally{C.f()}return m})).apply(this,arguments)}function g(e,t){let i=e.shift();if(i instanceof Error)throw i;return void 0===i?t:i}function m(e){p._injected=(p._injected||[]).concat(e)}function y(e){p._override=Object.assign({},e)}t.exports=Object.assign(p,{prompt:p,prompts:u,inject:m,override:y})},822730,(e,t,i)=>{t.exports=!function(e){e=(Array.isArray(e)?e:e.split(".")).map(Number);let t=0,i=process.versions.node.split(".").map(Number);for(;t<e.length&&!(i[t]>e[t]);t++)if(e[t]>i[t])return!0;return!1}("8.6.0")?e.r(474661):e.r(213161)},94102,e=>{"use strict";var t=e.i(522734),i=e.i(814747),r=t,n=i,s=e.i(248615);let a=async({dirname:e,file:t,migrationName:i,payload:a})=>{let o=t??i;if(o?.startsWith("@payloadcms/db-")){let t=o.split("/").slice(2).join("/"),i=n.default.join(e,`./predefinedMigrations/${t}`);r.default.existsSync(`${i}.mjs`)?i=`${i}.mjs`:r.default.existsSync(`${i}.js`)?i=`${i}.js`:r.default.existsSync(`${i}.ts`)?i=`${i}.ts`:(a.logger.error({msg:`Canned migration ${t} not found.`}),process.exit(1)),i=i.replaceAll("\\","/");try{let{downSQL:e,dynamic:t,imports:r,upSQL:n}=await (0,s.dynamicImport)(i);return{downSQL:e,dynamic:t,imports:r,upSQL:n}}catch(e){a.logger.error({err:e,msg:`Error loading predefined migration ${t}`}),process.exit(1)}}else if(o)try{let{downSQL:e,dynamic:t,imports:i,upSQL:r}=await (0,s.dynamicImport)(o);return{downSQL:e,dynamic:t,imports:i,upSQL:r}}catch(e){if(o?.includes("/"))throw Error(`Error importing migration file from ${o}`)}return{}};var o=e.i(407631),l=e.i(822730);let c=e=>e.split("\n").map(e=>` ${e}`).join("\n"),d=({downSQL:e,imports:t,packageName:i,upSQL:r})=>`import { MigrateUpArgs, MigrateDownArgs, sql } from '${i}'
|
||
${t?`${t}
|
||
`:""}
|
||
export async function up({ db, payload, req }: MigrateUpArgs): Promise<void> {
|
||
${c(r)}
|
||
}
|
||
|
||
export async function down({ db, payload, req }: MigrateDownArgs): Promise<void> {
|
||
${c(e)}
|
||
}
|
||
`,u=({executeMethod:e,filename:r,sanitizeStatements:n})=>{let s=i.default.dirname(r);return async function({file:i,forceAcceptWarning:r,migrationName:c,payload:u,skipEmpty:h}){let A,p,f=u.db.migrationDir;t.default.existsSync(f)||t.default.mkdirSync(f);let{generateDrizzleJson:g,generateMigration:m,upSnapshot:y}=this.requireDrizzleKit(),b=await g(this.schema),[E,C]=new Date().toISOString().split("T"),w=E.replace(/\D/g,""),I=C.split(".")[0].replace(/\D/g,""),v="",B=await a({dirname:s,file:i,migrationName:c,payload:u});v=B.imports,A=B.downSQL,p=B.upSQL;let Q=`${w}_${I}`,x=c||i?.split("/").slice(2).join("/"),S=`${Q}${x?`_${x.replace(/\W/g,"_")}`:""}`,k=`${f}/${S}`;if("function"==typeof B.dynamic){let e=await B.dynamic({filePath:k,payload:u});e.upSQL&&(p=e.upSQL),e.downSQL&&(A=e.downSQL),e.imports&&(v=e.imports)}let T=this.defaultDrizzleSnapshot;if(this.schemaName&&(T.schemas={[this.schemaName]:this.schemaName}),!p){let i=t.default.readdirSync(f).filter(e=>e.endsWith(".json")).sort().reverse()?.[0];i&&(T=JSON.parse(t.default.readFileSync(`${f}/${i}`,"utf8")),y&&T.version<b.version&&(T=y(T))),u.logger.info("Starting migration: generating UP statements...");let s=await m(T,b);u.logger.info("Migration UP complete. Generating DOWN statements...");let a=await m(b,T);u.logger.info("Migration DOWN statements generation complete.");let o=`await db.${e}(sql\``;if(s?.length&&(p=n({sqlExecute:o,statements:s})),a?.length&&(A=n({sqlExecute:o,statements:a})),!p?.length&&!A?.length&&!r){h&&process.exit(0);let{confirm:e}=await (0,l.default)({name:"confirm",type:"confirm",initial:!1,message:"No schema changes detected. Would you like to create a blank migration file?"},{onCancel:()=>{process.exit(0)}});e||process.exit(0)}t.default.writeFileSync(`${k}.json`,JSON.stringify(b,null,2))}let N=d({downSQL:A||" // Migration code",imports:v,packageName:u.db.packageName,upSQL:p||" // Migration code"}),D=`${k}.ts`;t.default.writeFileSync(D,N),(0,o.writeMigrationIndex)({migrationsDir:u.db.migrationDir}),u.logger.info({msg:`Migration created at ${D}`})}};e.s(["buildCreateMigration",0,u],94102)},692453,e=>{"use strict";let t=async function(e=""){let t=e instanceof Promise?await e:e;if(!this.sessions[t])return;let i=this.sessions[t];delete this.sessions[t];try{await i.resolve()}catch(e){await i.reject()}};e.s(["commitTransaction",0,t])},109844,(e,t,i)=>{t.exports=a;var r=/\s/,n=/(_|-|\.|:)/,s=/([a-z][A-Z]|[A-Z][a-z])/;function a(e){return r.test(e)?e.toLowerCase():n.test(e)?(l(e)||e).toLowerCase():s.test(e)?d(e).toLowerCase():e.toLowerCase()}var o=/[\W_]+(.|$)/g;function l(e){return e.replace(o,function(e,t){return t?" "+t:""})}var c=/(.)([A-Z]+)/g;function d(e){return e.replace(c,function(e,t,i){return t+" "+i.toLowerCase().split("").join(" ")})}},12128,(e,t,i)=>{var r=e.r(109844);t.exports=function e(e){return r(e).replace(/[\W_]+(.|$)/g,function(e,t){return t?" "+t:""}).trim()}},477426,(e,t,i)=>{var r=e.r(12128);t.exports=function e(e){return r(e).replace(/\s/g,"_")}},990866,e=>{"use strict";let t=Symbol.for("drizzle:entityKind");function i(e,i){if(!e||"object"!=typeof e)return!1;if(e instanceof i)return!0;if(!Object.prototype.hasOwnProperty.call(i,t))throw Error(`Class "${i.name??"<unknown>"}" doesn't look like a Drizzle entity. If this is incorrect and the class is provided by Drizzle, please report this as a bug.`);let r=Object.getPrototypeOf(e).constructor;if(r)for(;r;){if(t in r&&r[t]===i[t])return!0;r=Object.getPrototypeOf(r)}return!1}Symbol.for("drizzle:hasOwnEntityKind"),e.s(["entityKind",()=>t,"is",()=>i])},266226,e=>{"use strict";function t(e,...i){return e(...i)}e.s(["iife",()=>t])},509840,586210,224483,581996,756974,635536,e=>{"use strict";var t=e.i(990866),i=t;class r{static [i.entityKind]="ColumnBuilder";config;constructor(e,t,i){this.config={name:e,keyAsName:""===e,notNull:!1,default:void 0,hasDefault:!1,primaryKey:!1,isUnique:!1,uniqueName:void 0,uniqueType:void 0,dataType:t,columnType:i,generated:void 0}}$type(){return this}notNull(){return this.config.notNull=!0,this}default(e){return this.config.default=e,this.config.hasDefault=!0,this}$defaultFn(e){return this.config.defaultFn=e,this.config.hasDefault=!0,this}$default=this.$defaultFn;$onUpdateFn(e){return this.config.onUpdateFn=e,this.config.hasDefault=!0,this}$onUpdate=this.$onUpdateFn;primaryKey(){return this.config.primaryKey=!0,this.config.notNull=!0,this}setName(e){""===this.config.name&&(this.config.name=e)}}var n=t;class s{constructor(e,t){this.table=e,this.config=t,this.name=t.name,this.keyAsName=t.keyAsName,this.notNull=t.notNull,this.default=t.default,this.defaultFn=t.defaultFn,this.onUpdateFn=t.onUpdateFn,this.hasDefault=t.hasDefault,this.primary=t.primaryKey,this.isUnique=t.isUnique,this.uniqueName=t.uniqueName,this.uniqueType=t.uniqueType,this.dataType=t.dataType,this.columnType=t.columnType,this.generated=t.generated,this.generatedIdentity=t.generatedIdentity}static [n.entityKind]="Column";name;keyAsName;primary;notNull;default;defaultFn;onUpdateFn;hasDefault;isUnique;uniqueName;uniqueType;dataType;columnType;enumValues=void 0;generated=void 0;generatedIdentity=void 0;config;mapFromDriverValue(e){return e}mapToDriverValue(e){return e}shouldDisableInsert(){return void 0!==this.config.generated&&"byDefault"!==this.config.generated.type}}e.s(["Column",()=>s],586210);var a=t,o=t;let l=Symbol.for("drizzle:Name");e.s(["TableName",()=>l],224483);class c{static [o.entityKind]="PgForeignKeyBuilder";reference;_onUpdate="no action";_onDelete="no action";constructor(e,t){this.reference=()=>{let{name:t,columns:i,foreignColumns:r}=e();return{name:t,columns:i,foreignTable:r[0].table,foreignColumns:r}},t&&(this._onUpdate=t.onUpdate,this._onDelete=t.onDelete)}onUpdate(e){return this._onUpdate=void 0===e?"no action":e,this}onDelete(e){return this._onDelete=void 0===e?"no action":e,this}build(e){return new d(e,this)}}class d{constructor(e,t){this.table=e,this.reference=t.reference,this.onUpdate=t._onUpdate,this.onDelete=t._onDelete}static [o.entityKind]="PgForeignKey";reference;onUpdate;onDelete;getName(){let{name:e,columns:t,foreignColumns:i}=this.reference(),r=t.map(e=>e.name),n=i.map(e=>e.name),s=[this.table[l],...r,i[0].table[l],...n];return e??`${s.join("_")}_fk`}}function u(e){return new c(function(){let{name:t,columns:i,foreignColumns:r}=e;return{name:t,columns:i,foreignColumns:r}})}e.s(["ForeignKeyBuilder",()=>c,"foreignKey",()=>u],581996);var h=e.i(266226),A=t;function p(e,t){return`${e[l]}_${t.join("_")}_unique`}class f{constructor(e,t){this.name=t,this.columns=e}static [A.entityKind]="PgUniqueConstraintBuilder";columns;nullsNotDistinctConfig=!1;nullsNotDistinct(){return this.nullsNotDistinctConfig=!0,this}build(e){return new m(e,this.columns,this.nullsNotDistinctConfig,this.name)}}class g{static [A.entityKind]="PgUniqueOnConstraintBuilder";name;constructor(e){this.name=e}on(...e){return new f(e,this.name)}}class m{constructor(e,t,i,r){this.table=e,this.columns=t,this.name=r??p(this.table,this.columns.map(e=>e.name)),this.nullsNotDistinct=i}static [A.entityKind]="PgUniqueConstraint";columns;name;nullsNotDistinct=!1;getName(){return this.name}}function y(e,t,i){for(let r=t;r<e.length;r++){let n=e[r];if("\\"===n){r++;continue}if('"'===n)return[e.slice(t,r).replace(/\\/g,""),r+1];if(!i&&(","===n||"}"===n))return[e.slice(t,r).replace(/\\/g,""),r]}return[e.slice(t).replace(/\\/g,""),e.length]}function b(e,t=0){let i=[],r=t,n=!1;for(;r<e.length;){let s=e[r];if(","===s){(n||r===t)&&i.push(""),n=!0,r++;continue}if(n=!1,"\\"===s){r+=2;continue}if('"'===s){let[t,n]=y(e,r+1,!0);i.push(t),r=n;continue}if("}"===s)return[i,r+1];if("{"===s){let[t,n]=b(e,r+1);i.push(t),r=n;continue}let[a,o]=y(e,r,!1);i.push(a),r=o}return[i,r]}function E(e){let[t]=b(e,1);return t}function C(e){return`{${e.map(e=>Array.isArray(e)?C(e):"string"==typeof e?`"${e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}"`:`${e}`).join(",")}}`}e.s(["UniqueConstraintBuilder",()=>f,"uniqueKeyName",()=>p],756974);class w extends r{foreignKeyConfigs=[];static [a.entityKind]="PgColumnBuilder";array(e){return new Q(this.config.name,this,e)}references(e,t={}){return this.foreignKeyConfigs.push({ref:e,actions:t}),this}unique(e,t){return this.config.isUnique=!0,this.config.uniqueName=e,this.config.uniqueType=t?.nulls,this}generatedAlwaysAs(e){return this.config.generated={as:e,type:"always",mode:"stored"},this}buildForeignKeys(e,t){return this.foreignKeyConfigs.map(({ref:i,actions:r})=>(0,h.iife)((i,r)=>{let n=new c(()=>({columns:[e],foreignColumns:[i()]}));return r.onUpdate&&n.onUpdate(r.onUpdate),r.onDelete&&n.onDelete(r.onDelete),n.build(t)},i,r))}buildExtraConfigColumn(e){return new v(e,this.config)}}class I extends s{constructor(e,t){t.uniqueName||(t.uniqueName=p(e,[t.name])),super(e,t),this.table=e}static [a.entityKind]="PgColumn"}class v extends I{static [a.entityKind]="ExtraConfigColumn";getSQLType(){return this.getSQLType()}indexConfig={order:this.config.order??"asc",nulls:this.config.nulls??"last",opClass:this.config.opClass};defaultConfig={order:"asc",nulls:"last",opClass:void 0};asc(){return this.indexConfig.order="asc",this}desc(){return this.indexConfig.order="desc",this}nullsFirst(){return this.indexConfig.nulls="first",this}nullsLast(){return this.indexConfig.nulls="last",this}op(e){return this.indexConfig.opClass=e,this}}class B{static [a.entityKind]="IndexedColumn";constructor(e,t,i,r){this.name=e,this.keyAsName=t,this.type=i,this.indexConfig=r}name;keyAsName;type;indexConfig}class Q extends w{static [a.entityKind]="PgArrayBuilder";constructor(e,t,i){super(e,"array","PgArray"),this.config.baseBuilder=t,this.config.size=i}build(e){let t=this.config.baseBuilder.build(e);return new x(e,this.config,t)}}class x extends I{constructor(e,t,i,r){super(e,t),this.baseColumn=i,this.range=r,this.size=t.size}size;static [a.entityKind]="PgArray";getSQLType(){return`${this.baseColumn.getSQLType()}[${"number"==typeof this.size?this.size:""}]`}mapFromDriverValue(e){return"string"==typeof e&&(e=E(e)),e.map(e=>this.baseColumn.mapFromDriverValue(e))}mapToDriverValue(e,t=!1){let i=e.map(e=>null===e?null:(0,a.is)(this.baseColumn,x)?this.baseColumn.mapToDriverValue(e,!0):this.baseColumn.mapToDriverValue(e));return t?i:C(i)}}e.s(["IndexedColumn",()=>B,"PgColumn",()=>I,"PgColumnBuilder",()=>w],635536);class S extends w{static [t.entityKind]="PgEnumObjectColumnBuilder";constructor(e,t){super(e,"string","PgEnumObjectColumn"),this.config.enum=t}build(e){return new k(e,this.config)}}class k extends I{static [t.entityKind]="PgEnumObjectColumn";enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}}let T=Symbol.for("drizzle:isPgEnum");function N(e){return!!e&&"function"==typeof e&&T in e&&!0===e[T]}class D extends w{static [t.entityKind]="PgEnumColumnBuilder";constructor(e,t){super(e,"string","PgEnumColumn"),this.config.enum=t}build(e){return new _(e,this.config)}}class _ extends I{static [t.entityKind]="PgEnumColumn";enum=this.config.enum;enumValues=this.config.enum.enumValues;constructor(e,t){super(e,t),this.enum=t.enum}getSQLType(){return this.enum.enumName}}function R(e,t){return Array.isArray(t)?L(e,[...t],void 0):F(e,t,void 0)}function L(e,t,i){let r=Object.assign(e=>new D(e??"",r),{enumName:e,enumValues:t,schema:i,[T]:!0});return r}function F(e,t,i){let r=Object.assign(e=>new S(e??"",r),{enumName:e,enumValues:Object.values(t),schema:i,[T]:!0});return r}e.s(["isPgEnum",()=>N,"pgEnum",()=>R,"pgEnumObjectWithSchema",()=>F,"pgEnumWithSchema",()=>L],509840)},309402,e=>{"use strict";let t,i;var r=e.i(266226),n="0.44.7";let s={startActiveSpan:(e,s)=>t?(i||(i=t.trace.getTracer("drizzle-orm",n)),(0,r.iife)((t,i)=>i.startActiveSpan(e,e=>{try{return s(e)}catch(i){throw e.setStatus({code:t.SpanStatusCode.ERROR,message:i instanceof Error?i.message:"Unknown error"}),i}finally{e.end()}}),t,i)):s()};e.s(["tracer",()=>s],309402)},65054,489508,509331,959694,e=>{"use strict";var t=e.i(990866),i=e.i(509840),r=t;class n{static [r.entityKind]="Subquery";constructor(e,t,i,r=!1,n=[]){this._={brand:"Subquery",sql:e,selectedFields:t,alias:i,isWith:r,usedTables:n}}}class s extends n{static [r.entityKind]="WithSubquery"}e.s(["Subquery",()=>n,"WithSubquery",()=>s],489508);var a=e.i(309402);let o=Symbol.for("drizzle:ViewBaseConfig");e.s(["ViewBaseConfig",()=>o],509331);var l=e.i(586210),c=t,d=e.i(224483);let u=Symbol.for("drizzle:Schema"),h=Symbol.for("drizzle:Columns"),A=Symbol.for("drizzle:ExtraConfigColumns"),p=Symbol.for("drizzle:OriginalName"),f=Symbol.for("drizzle:BaseName"),g=Symbol.for("drizzle:IsAlias"),m=Symbol.for("drizzle:ExtraConfigBuilder"),y=Symbol.for("drizzle:IsDrizzleTable");class b{static [c.entityKind]="Table";static Symbol={Name:d.TableName,Schema:u,OriginalName:p,Columns:h,ExtraConfigColumns:A,BaseName:f,IsAlias:g,ExtraConfigBuilder:m};[d.TableName];[p];[u];[h];[A];[f];[g]=!1;[y]=!0;[m]=void 0;constructor(e,t,i){this[d.TableName]=this[p]=e,this[u]=t,this[f]=i}}function E(e){return e[d.TableName]}function C(e){return`${e[u]??"public"}.${e[d.TableName]}`}e.s(["Columns",()=>h,"IsAlias",()=>g,"Schema",()=>u,"Table",()=>b,"getTableName",()=>E,"getTableUniqueName",()=>C],959694);class w{static [t.entityKind]="FakePrimitiveParam"}function I(e){return null!=e&&"function"==typeof e.getSQL}function v(e){let t={sql:"",params:[]};for(let i of e)t.sql+=i.sql,t.params.push(...i.params),i.typings?.length&&(t.typings||(t.typings=[]),t.typings.push(...i.typings));return t}class B{static [t.entityKind]="StringChunk";value;constructor(e){this.value=Array.isArray(e)?e:[e]}getSQL(){return new Q([this])}}class Q{constructor(e){for(const i of(this.queryChunks=e,e))if((0,t.is)(i,b)){const e=i[b.Symbol.Schema];this.usedTables.push(void 0===e?i[b.Symbol.Name]:e+"."+i[b.Symbol.Name])}}static [t.entityKind]="SQL";decoder=k;shouldInlineParams=!1;usedTables=[];append(e){return this.queryChunks.push(...e.queryChunks),this}toQuery(e){return a.tracer.startActiveSpan("drizzle.buildSQL",t=>{let i=this.buildQueryFromSourceParams(this.queryChunks,e);return t?.setAttributes({"drizzle.query.text":i.sql,"drizzle.query.params":JSON.stringify(i.params)}),i})}buildQueryFromSourceParams(e,r){let s=Object.assign({},r,{inlineParams:r.inlineParams||this.shouldInlineParams,paramStartIndex:r.paramStartIndex||{value:0}}),{casing:a,escapeName:c,escapeParam:d,prepareTyping:u,inlineParams:h,paramStartIndex:A}=s;return v(e.map(e=>{if((0,t.is)(e,B))return{sql:e.value.join(""),params:[]};if((0,t.is)(e,x))return{sql:c(e.value),params:[]};if(void 0===e)return{sql:"",params:[]};if(Array.isArray(e)){let t=[new B("(")];for(let[i,r]of e.entries())t.push(r),i<e.length-1&&t.push(new B(", "));return t.push(new B(")")),this.buildQueryFromSourceParams(t,s)}if((0,t.is)(e,Q))return this.buildQueryFromSourceParams(e.queryChunks,{...s,inlineParams:h||e.shouldInlineParams});if((0,t.is)(e,b)){let t=e[b.Symbol.Schema],i=e[b.Symbol.Name];return{sql:void 0===t||e[g]?c(i):c(t)+"."+c(i),params:[]}}if((0,t.is)(e,l.Column)){let t=a.getColumnCasing(e);if("indexes"===r.invokeSource)return{sql:c(t),params:[]};let i=e.table[b.Symbol.Schema];return{sql:e.table[g]||void 0===i?c(e.table[b.Symbol.Name])+"."+c(t):c(i)+"."+c(e.table[b.Symbol.Name])+"."+c(t),params:[]}}if((0,t.is)(e,F)){let t=e[o].schema,i=e[o].name;return{sql:void 0===t||e[o].isAlias?c(i):c(t)+"."+c(i),params:[]}}if((0,t.is)(e,N)){if((0,t.is)(e.value,_))return{sql:d(A.value++,e),params:[e],typings:["none"]};let i=null===e.value?null:e.encoder.mapToDriverValue(e.value);if((0,t.is)(i,Q))return this.buildQueryFromSourceParams([i],s);if(h)return{sql:this.mapInlineParam(i,s),params:[]};let r=["none"];return u&&(r=[u(e.encoder)]),{sql:d(A.value++,i),params:[i],typings:r}}return(0,t.is)(e,_)?{sql:d(A.value++,e),params:[e],typings:["none"]}:(0,t.is)(e,Q.Aliased)&&void 0!==e.fieldAlias?{sql:c(e.fieldAlias),params:[]}:(0,t.is)(e,n)?e._.isWith?{sql:c(e._.alias),params:[]}:this.buildQueryFromSourceParams([new B("("),e._.sql,new B(") "),new x(e._.alias)],s):(0,i.isPgEnum)(e)?e.schema?{sql:c(e.schema)+"."+c(e.enumName),params:[]}:{sql:c(e.enumName),params:[]}:I(e)?e.shouldOmitSQLParens?.()?this.buildQueryFromSourceParams([e.getSQL()],s):this.buildQueryFromSourceParams([new B("("),e.getSQL(),new B(")")],s):h?{sql:this.mapInlineParam(e,s),params:[]}:{sql:d(A.value++,e),params:[e],typings:["none"]}}))}mapInlineParam(e,{escapeString:t}){if(null===e)return"null";if("number"==typeof e||"boolean"==typeof e)return e.toString();if("string"==typeof e)return t(e);if("object"==typeof e){let i=e.toString();return"[object Object]"===i?t(JSON.stringify(e)):t(i)}throw Error("Unexpected param value: "+e)}getSQL(){return this}as(e){return void 0===e?this:new Q.Aliased(this,e)}mapWith(e){return this.decoder="function"==typeof e?{mapFromDriverValue:e}:e,this}inlineParams(){return this.shouldInlineParams=!0,this}if(e){return e?this:void 0}}class x{constructor(e){this.value=e}static [t.entityKind]="Name";brand;getSQL(){return new Q([this])}}function S(e){return"object"==typeof e&&null!==e&&"mapToDriverValue"in e&&"function"==typeof e.mapToDriverValue}let k={mapFromDriverValue:e=>e},T={mapToDriverValue:e=>e};({...k,...T});class N{constructor(e,t=T){this.value=e,this.encoder=t}static [t.entityKind]="Param";brand;getSQL(){return new Q([this])}}function D(e,...t){let i=[];for(let[r,n]of((t.length>0||e.length>0&&""!==e[0])&&i.push(new B(e[0])),t.entries()))i.push(n,new B(e[r+1]));return new Q(i)}(e=>{e.empty=function(){return new Q([])},e.fromList=function(e){return new Q(e)},e.raw=function(e){return new Q([new B(e)])},e.join=function(e,t){let i=[];for(let[r,n]of e.entries())r>0&&void 0!==t&&i.push(t),i.push(n);return new Q(i)},e.identifier=function(e){return new x(e)},e.placeholder=function(e){return new _(e)},e.param=function(e,t){return new N(e,t)}})(D||(D={})),(e=>{class i{constructor(e,t){this.sql=e,this.fieldAlias=t}static [t.entityKind]="SQL.Aliased";isSelectionField=!1;getSQL(){return this.sql}clone(){return new i(this.sql,this.fieldAlias)}}e.Aliased=i})(Q||(Q={}));class _{constructor(e){this.name=e}static [t.entityKind]="Placeholder";getSQL(){return new Q([this])}}function R(e,i){return e.map(e=>{if((0,t.is)(e,_)){if(!(e.name in i))throw Error(`No value for placeholder "${e.name}" was provided`);return i[e.name]}if((0,t.is)(e,N)&&(0,t.is)(e.value,_)){if(!(e.value.name in i))throw Error(`No value for placeholder "${e.value.name}" was provided`);return e.encoder.mapToDriverValue(i[e.value.name])}return e})}let L=Symbol.for("drizzle:IsDrizzleView");class F{static [t.entityKind]="View";[o];[L]=!0;constructor({name:e,schema:t,selectedFields:i,query:r}){this[o]={name:e,originalName:e,schema:t,selectedFields:i,query:r,isExisting:!r,isAlias:!1}}getSQL(){return new Q([this])}}l.Column.prototype.getSQL=function(){return new Q([this])},b.prototype.getSQL=function(){return new Q([this])},n.prototype.getSQL=function(){return new Q([this])},e.s(["Param",()=>N,"Placeholder",()=>_,"SQL",()=>Q,"StringChunk",()=>B,"View",()=>F,"fillPlaceholders",()=>R,"isDriverValueEncoder",()=>S,"isSQLWrapper",()=>I,"sql",()=>D],65054)},878719,e=>{"use strict";var t=e.i(65054);function i(e){return t.sql`${e} asc`}function r(e){return t.sql`${e} desc`}e.s(["asc",()=>i,"desc",()=>r])},226836,e=>{"use strict";var t=e.i(586210),i=e.i(990866),r=e.i(959694),n=e.i(65054);function s(e,s){return!(0,n.isDriverValueEncoder)(s)||(0,n.isSQLWrapper)(e)||(0,i.is)(e,n.Param)||(0,i.is)(e,n.Placeholder)||(0,i.is)(e,t.Column)||(0,i.is)(e,r.Table)||(0,i.is)(e,n.View)?e:new n.Param(e,s)}let a=(e,t)=>n.sql`${e} = ${s(t,e)}`,o=(e,t)=>n.sql`${e} <> ${s(t,e)}`;function l(...e){let t=e.filter(e=>void 0!==e);if(0!==t.length)return new n.SQL(1===t.length?t:[new n.StringChunk("("),n.sql.join(t,new n.StringChunk(" and ")),new n.StringChunk(")")])}function c(...e){let t=e.filter(e=>void 0!==e);if(0!==t.length)return new n.SQL(1===t.length?t:[new n.StringChunk("("),n.sql.join(t,new n.StringChunk(" or ")),new n.StringChunk(")")])}function d(e){return n.sql`not ${e}`}let u=(e,t)=>n.sql`${e} > ${s(t,e)}`,h=(e,t)=>n.sql`${e} >= ${s(t,e)}`,A=(e,t)=>n.sql`${e} < ${s(t,e)}`,p=(e,t)=>n.sql`${e} <= ${s(t,e)}`;function f(e,t){return Array.isArray(t)?0===t.length?n.sql`false`:n.sql`${e} in ${t.map(t=>s(t,e))}`:n.sql`${e} in ${s(t,e)}`}function g(e,t){return Array.isArray(t)?0===t.length?n.sql`true`:n.sql`${e} not in ${t.map(t=>s(t,e))}`:n.sql`${e} not in ${s(t,e)}`}function m(e){return n.sql`${e} is null`}function y(e){return n.sql`${e} is not null`}function b(e){return n.sql`exists ${e}`}function E(e){return n.sql`not exists ${e}`}function C(e,t,i){return n.sql`${e} between ${s(t,e)} and ${s(i,e)}`}function w(e,t,i){return n.sql`${e} not between ${s(t,e)} and ${s(i,e)}`}function I(e,t){return n.sql`${e} like ${t}`}function v(e,t){return n.sql`${e} not like ${t}`}function B(e,t){return n.sql`${e} ilike ${t}`}function Q(e,t){return n.sql`${e} not ilike ${t}`}e.s(["and",()=>l,"between",()=>C,"eq",()=>a,"exists",()=>b,"gt",()=>u,"gte",()=>h,"ilike",()=>B,"inArray",()=>f,"isNotNull",()=>y,"isNull",()=>m,"like",()=>I,"lt",()=>A,"lte",()=>p,"ne",()=>o,"not",()=>d,"notBetween",()=>w,"notExists",()=>E,"notIlike",()=>Q,"notInArray",()=>g,"notLike",()=>v,"or",()=>c])},207976,e=>{"use strict";var t=e.i(186725);let i=e=>{let{fields:r,parentIsLocalized:n,prefix:s=""}=e;return r.reduce((e,r)=>{let a=s;return["array","blocks","relationship","upload"].includes(r.type)||"hasMany"in r&&!0===r.hasMany?e:(0,t.fieldHasSubFields)(r)?(a="name"in r?`${s}${r.name}_`:s,[...e,...i({fields:r.fields,parentIsLocalized:n||"localized"in r&&r.localized,prefix:a})]):"tabs"===r.type?[...e,...r.tabs.reduce((e,r)=>(a="name"in r?`${s}_${r.name}`:s,[...e,...(0,t.tabHasName)(r)?[{...r,type:"tab"}]:i({fields:r.fields,parentIsLocalized:n||r.localized,prefix:a})]),[])]:(0,t.fieldAffectsData)(r)?[...e,{name:`${a}${r.name}`,localized:(0,t.fieldShouldBeLocalized)({field:r,parentIsLocalized:n})}]:e},[])},r=({block:e,localized:t,parentIsLocalized:r,table:n,tableLocales:s})=>{let a=i({fields:e.fields,parentIsLocalized:r||t});return!(a.find(({name:e,localized:t})=>-1===Object.keys((t&&s?s:n).columns).indexOf(e))||Object.keys(n).find(e=>{if(!["_locale","_order","_parentID","_path","_uuid"].includes(e))return -1===a.findIndex(e=>e.name)}))&&!!t==!!n.columns._locale},n=Symbol("InternalBlockTableNameIndex"),s=(e,t)=>{e[n]=t},a=(e,t)=>e[n]?`${t}_${e[n]}`:t;e.s(["InternalBlockTableNameIndex",0,n,"resolveBlockTableName",0,a,"setInternalBlockIndex",0,s,"validateExistingBlockIsIdentical",0,r])},303812,e=>{"use strict";var t=e.i(586210),i=e.i(990866),r=e.i(65054),n=e.i(959694),s=e.i(509331);class a{constructor(e){this.table=e}static [i.entityKind]="ColumnAliasProxyHandler";get(e,t){return"table"===t?this.table:e[t]}}class o{constructor(e,t){this.alias=e,this.replaceOriginalName=t}static [i.entityKind]="TableAliasProxyHandler";get(e,r){if(r===n.Table.Symbol.IsAlias)return!0;if(r===n.Table.Symbol.Name||this.replaceOriginalName&&r===n.Table.Symbol.OriginalName)return this.alias;if(r===s.ViewBaseConfig)return{...e[s.ViewBaseConfig],name:this.alias,isAlias:!0};if(r===n.Table.Symbol.Columns){let t=e[n.Table.Symbol.Columns];if(!t)return t;let i={};return Object.keys(t).map(r=>{i[r]=new Proxy(t[r],new a(new Proxy(e,this)))}),i}let o=e[r];return(0,i.is)(o,t.Column)?new Proxy(o,new a(new Proxy(e,this))):o}}class l{constructor(e){this.alias=e}static [i.entityKind]="RelationTableAliasProxyHandler";get(e,t){return"sourceTable"===t?c(e.sourceTable,this.alias):e[t]}}function c(e,t){return new Proxy(e,new o(t,!1))}function d(e,t){return new Proxy(e,new a(new Proxy(e.table,new o(t,!1))))}function u(e,t){return new r.SQL.Aliased(h(e.sql,t),e.fieldAlias)}function h(e,n){return r.sql.join(e.queryChunks.map(e=>(0,i.is)(e,t.Column)?d(e,n):(0,i.is)(e,r.SQL)?h(e,n):(0,i.is)(e,r.SQL.Aliased)?u(e,n):e))}e.s(["ColumnAliasProxyHandler",()=>a,"TableAliasProxyHandler",()=>o,"aliasedTable",()=>c,"aliasedTableColumn",()=>d,"mapColumnsInAliasedSQLToAlias",()=>u,"mapColumnsInSQLToAlias",()=>h])},820874,e=>{"use strict";var t=e.i(990866),i=e.i(65054),r=e.i(635536);class n extends r.PgColumnBuilder{static [t.entityKind]="PgUUIDBuilder";constructor(e){super(e,"string","PgUUID")}defaultRandom(){return this.default(i.sql`gen_random_uuid()`)}build(e){return new s(e,this.config)}}class s extends r.PgColumn{static [t.entityKind]="PgUUID";getSQLType(){return"uuid"}}function a(e){return new n(e??"")}e.s(["PgUUID",()=>s,"uuid",()=>a])},306e3,e=>{"use strict";var t=e.i(700859);let i=/^[\w @.\-+:]*$/,r=e=>{if(null===e)return null;if("number"==typeof e||"boolean"==typeof e)return e;if("string"!=typeof e)throw Error("Invalid value type");if(!i.test(e))throw new t.APIError(`${e} is not allowed as a JSON query value`,400);return e.replace(/\\/g,"\\\\").replace(/"/g,'\\"')};e.s(["SAFE_STRING_REGEX",0,i,"escapeSQLValue",0,r])},326421,154136,689978,59489,791106,e=>{"use strict";var t=e.i(878719),i=e.i(959694);let r=e=>(0,i.getTableName)(e);e.s(["getNameFromDrizzleTable",0,r],154136);var n=e.i(226836),s=i,a=e.i(65054),o=e.i(700859),l=e.i(783334),c=e.i(186725),d=e.i(477426),u=e.i(700341),u=u;let h=e=>e&&"object"==typeof e&&"relationTo"in e&&"string"==typeof e.relationTo&&"value"in e;var A=a,p=o;let f=/^\w+$/;function g(e,t){return"sqlite"===e.name?A.sql`coalesce(json_group_array(${t}), '[]')`:A.sql`coalesce(json_agg(${t}), '[]'::json)`}function m(e,t){let i=[];return(Object.entries(t).forEach(([e,t])=>{if(!f.test(e))throw new p.APIError("Unsafe key passed to jsonBuildObject. Only alphanumeric characters and underscores are allowed.",500);i.length>0&&i.push(A.sql.raw(",")),i.push(A.sql.raw(`'${e}',`)),i.push(A.sql`${t}`)}),"sqlite"===e.name)?A.sql`json_object(${A.sql.join(i)})`:A.sql`json_build_object(${A.sql.join(i)})`}let y=(e,t)=>g(e,m(e,t));e.s(["jsonAggBuildObject",0,y,"jsonBuildObject",()=>m],689978);let b=Symbol("RawConstraint"),E=Symbol("DistinctSymbol"),C=e=>({type:b,value:e}),w=e=>e&&"object"==typeof e&&"type"in e&&e.type===b;e.s(["DistinctSymbol",0,E,"isRawConstraint",0,w,"rawConstraint",0,C],59489);var I=e.i(207976);let v=({type:e,condition:t,isOneToMany:i,joins:n,queryPath:s,table:a})=>{let o=r(a);n.some(e=>r(e.table)===o)||n.push({type:e,condition:t,isOneToMany:i,queryPath:s,table:a})};var B=e.i(303812);function Q(e,t){return new Proxy(e,new B.TableAliasProxyHandler(t,!1))}var x=B;function S(e,t){return new Proxy(e,new x.TableAliasProxyHandler(t,!1))}var k=d,T=e.i(423121);let N=({adapter:e,tableName:t})=>{let i,r=(0,k.default)((0,T.v4)());return"postgres"===e.name&&(i=Q(e.tables[t],r)),"sqlite"===e.name&&(i=S(e.tables[t],r)),{newAliasTable:i,newAliasTableName:r}};e.s(["getTableAlias",0,N],791106);let D=({adapter:e,aliasTable:t,collectionPath:i,columnPrefix:r="",constraintPath:A,constraints:p=[],fields:f,joins:g,locale:y,parentAliasTable:b,parentIsLocalized:C,pathSegments:w,rootTableName:B,selectFields:Q,selectLocale:x,tableName:S,tableNameSuffix:k="",value:T})=>{let _=w[0],R=y,L=B||S,F=A||"",M=f.find(e=>e.name===_),O=S;if(!M&&"id"===_)return Q.id=e.tables[O].id,{columnName:"id",constraints:p,field:{name:"id",type:"uuid"===e.idType?"text":"number"},table:e.tables[O]};let U=!1;if(M){let A=[...w],f=(0,c.fieldShouldBeLocalized)({field:M,parentIsLocalized:C});if(f&&e.payload.config.localization){let t=e.payload.config.localization.localeCodes.find(e=>e===A[1]);t&&(R=t,U=!0,A.splice(1,1))}switch(M.type){case"array":{O=e.tableNameMap.get(`${S}_${k}${(0,d.default)(M.name)}`);let r=t||e.tables[S];if(F=`${F}${M.name}.%.`,R&&f&&e.payload.config.localization){let t=[(0,n.eq)(r.id,e.tables[O]._parentID)];x&&(Q._locale=e.tables[O]._locale),"all"!==R&&t.push((0,n.eq)(e.tables[O]._locale,R)),v({condition:(0,n.and)(...t),isOneToMany:!0,joins:g,table:e.tables[O]})}else v({condition:(0,n.eq)(r.id,e.tables[O]._parentID),isOneToMany:!0,joins:g,table:e.tables[O]});return D({adapter:e,collectionPath:i,constraintPath:F,constraints:p,fields:M.flattenedFields,joins:g,locale:R,parentAliasTable:t,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),rootTableName:L,selectFields:Q,selectLocale:x,tableName:O,value:T})}case"blocks":{let r,s;if(e.blocksAsJSON)break;if("blockType"===A[1])return(Array.isArray(T)?T:[T]).forEach(t=>{let i=e.payload.blocks[t]??(M.blockReferences??M.blocks).find(e=>"string"!=typeof e&&e.slug===t);s=(0,I.resolveBlockTableName)(i,e.tableNameMap.get(`${S}_blocks_${(0,d.default)(i.slug)}`));let{newAliasTable:r}=N({adapter:e,tableName:s});g.push({condition:(0,n.eq)(e.tables[S].id,r._parentID),table:r}),p.push({columnName:"_path",table:r,value:`${F}${A[0]}`})}),{constraints:p,field:M,getNotNullColumnByValue:()=>"id",table:e.tables[S]};if((M.blockReferences??M.blocks).some(a=>{let o,l,c="string"==typeof a?e.payload.blocks[a]:a;s=(0,I.resolveBlockTableName)(c,e.tableNameMap.get(`${S}_blocks_${(0,d.default)(c.slug)}`)),F=`${F}${M.name}.%.`;let u=[],h={};if(f&&e.payload.config.localization){let i=[(0,n.eq)((t||e.tables[S]).id,e.tables[s]._parentID)];"all"!==R&&i.push((0,n.eq)(e.tables[s]._locale,R)),l={condition:(0,n.and)(...i),table:e.tables[s]}}else l={condition:(0,n.eq)((t||e.tables[S]).id,e.tables[s]._parentID),table:e.tables[s]};let m=[...g];try{o=D({adapter:e,collectionPath:i,constraintPath:F,constraints:u,fields:c.flattenedFields,joins:m,locale:R,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),rootTableName:L,selectFields:h,selectLocale:x,tableName:s,value:T})}catch(e){}if(!o)return;r=o,p=p.concat(u),Q={...Q,...h};let y=g.length;if(g.push(l),m.length>y)for(let e=y;e<m.length;e++)g.push(m[e]);return!0}))return{columnName:r.columnName,constraints:p,field:r.field,pathSegments:A.slice(1),rawColumn:r.rawColumn,table:r.table};break}case"group":if(R&&f&&e.payload.config.localization){O=`${S}${e.localesSuffix}`;let t=(0,n.eq)(e.tables[S].id,e.tables[O]._parentID);"all"!==R&&(t=(0,n.and)(t,(0,n.eq)(e.tables[O]._locale,R))),v({condition:t,joins:g,table:e.tables[O]})}return D({adapter:e,aliasTable:t,collectionPath:i,columnPrefix:`${r}${M.name}_`,constraintPath:`${F}${M.name}.`,constraints:p,fields:M.flattenedFields,joins:g,locale:R,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),rootTableName:L,selectFields:Q,selectLocale:x,tableName:O,tableNameSuffix:`${k}${(0,d.default)(M.name)}_`,value:T});case"join":{if(Array.isArray(M.collection))throw new o.APIError("Not supported");let i=A.slice(1).join(".");if(M.hasMany){let t=`${e.tableNameMap.get((0,d.default)(M.collection))}${e.relationshipsSuffix}`,r=g.find(e=>e.queryPath===`${F}${M.name}._rels`),s=r?.table??N({adapter:e,tableName:t}).newAliasTable,a=(0,l.getFieldByPath)({fields:e.payload.collections[M.collection].config.flattenedFields,path:M.on});if(!a)throw new o.APIError("Relationship was not found");if(r||v({condition:(0,n.and)((0,n.eq)(e.tables[L].id,s[`${a.field.relationTo}ID`]),(0,n.like)(s.path,M.on)),joins:g,queryPath:`${F}${M.name}._rels`,table:s}),"id"===i)return{columnName:"parent",constraints:p,field:{name:"id",type:"uuid"===e.idType?"text":"number"},table:s};let c=e.payload.collections[M.collection].config,u=e.tableNameMap.get((0,d.default)(c.slug)),h=c.flattenedFields,f=g.find(e=>e.queryPath===`${F}${M.name}`),m=f?.table??N({adapter:e,tableName:u}).newAliasTable;return f||g.push({condition:(0,n.eq)(s.parent,m.id),queryPath:`${F}${M.name}`,table:m}),D({adapter:e,aliasTable:m,collectionPath:i,constraints:p,fields:h,joins:g,locale:R,parentIsLocalized:!1,pathSegments:A.slice(1),rootTableName:u,selectFields:Q,selectLocale:x,tableName:u,value:T})}let r=e.tableNameMap.get((0,d.default)(e.payload.collections[M.collection].config.slug)),s=g.find(e=>e.queryPath===`${F}${M.name}`)?.table,a=s||N({adapter:e,tableName:r}).newAliasTable;if(!s){let i=M.on.split("."),s=e.payload.collections[M.collection].config.flattenedFields,o=i.length>1?s.find(e=>e.name===i[0]):null,l=o?.type==="array"?e.tableNameMap.get(`${r}_${(0,d.default)(i[0])}`):void 0;if(l){let{newAliasTable:r}=N({adapter:e,tableName:l});g.push({condition:(0,n.eq)(r[i.slice(1).join("_")],t?t.id:e.tables[S].id),queryPath:`${F}${M.name}._array`,table:r}),g.push({condition:(0,n.eq)(a.id,r._parentID),queryPath:`${F}${M.name}`,table:a})}else g.push({condition:(0,n.eq)(a[M.on.replaceAll(".","_")],t?t.id:e.tables[S].id),queryPath:`${F}${M.name}`,table:a})}if("id"===i)return{columnName:"id",constraints:p,field:{name:"id",type:"uuid"===e.idType?"text":"number"},table:a};return D({adapter:e,aliasTable:a,collectionPath:i,constraintPath:"",constraints:p,fields:e.payload.collections[M.collection].config.flattenedFields,joins:g,locale:R,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),selectFields:Q,tableName:r,value:T})}case"number":case"text":if(M.hasMany){let t="texts",i="text";"number"===M.type&&(t="numbers",i="number"),O=`${L}_${t}`;let r=g.find(e=>e.queryPath===`${F}${M.name}`),s=r?.table??N({adapter:e,tableName:O}).newAliasTable,a=[(0,n.eq)(e.tables[L].id,s.parent),(0,n.like)(s.path,`${F}${M.name}`)];if(R&&f&&e.payload.config.localization){let e=[...a];"all"!==R&&e.push((0,n.eq)(s._locale,R)),v({condition:(0,n.and)(...e),joins:g,queryPath:`${F}${M.name}`,table:s})}else v({condition:(0,n.and)(...a),joins:g,queryPath:`${F}${M.name}`,table:s});return{columnName:i,constraints:p,field:M,table:s}}break;case"relationship":case"upload":{let i=A.slice(1).join(".");if(Array.isArray(M.relationTo)||M.hasMany){let r,l,c,y,C=`${L}${e.relationshipsSuffix}`,w=g.find(e=>e.queryPath===`${F}.${M.name}`);if(w)l=w.table,c=(0,s.getTableName)(w.table);else{let t=N({adapter:e,tableName:C});l=t.newAliasTable,c=t.newAliasTableName}if(x&&f&&e.payload.config.localization&&(Q._locale=l.locale),R&&f&&e.payload.config.localization){let i=[(0,n.eq)((b||t||e.tables[L]).id,l.parent),(0,n.like)(l.path,`${F}${M.name}`)];"all"!==R&&i.push((0,n.eq)(l.locale,R)),v({condition:(0,n.and)(...i),joins:g,queryPath:`${F}.${M.name}`,table:l})}else v({condition:(0,n.and)((0,n.eq)((b||t||e.tables[L]).id,l.parent),(0,n.like)(l.path,`${F}${M.name}`)),joins:g,queryPath:`${F}.${M.name}`,table:l});if(Q[`${C}.path`]=l.path,"string"==typeof M.relationTo){let t=e.payload.collections[M.relationTo].config;if(O=e.tableNameMap.get((0,d.default)(t.slug)),r=t.flattenedFields,{newAliasTable:y}=N({adapter:e,tableName:O}),g.push({condition:(0,n.eq)(y.id,l[`${M.relationTo}ID`]),table:y}),""===i||"id"===i)return{columnName:`${M.relationTo}ID`,constraints:p,field:M,table:l}}else if("value"===i){let t=M.relationTo.some(t=>!!e.payload.collections[t].customIDType);return{columns:M.relationTo.map(i=>{let r="uuid"===e.idType?"uuid":"number",{customIDType:n}=e.payload.collections[i];n&&(r=n);let s="text"===r||"uuid"===r;if("number"==typeof T&&s||Array.isArray(T)&&T.every(e=>"number"==typeof e)&&s||T&&!Array.isArray(T)&&"uuid"===r&&t&&!(0,u.default)(T)||Array.isArray(T)&&"uuid"===r&&t&&!T.some(e=>(0,u.default)(e)))return null;let o=e.tableNameMap.get((0,d.default)(e.payload.collections[i].config.slug));return{idType:r,rawColumn:a.sql.raw(`"${c}"."${o}_id"`)}}).filter(Boolean),constraints:p,field:M,table:l}}else if("relationTo"===i){let e=Array.isArray(M.relationTo)?M.relationTo:[M.relationTo];return{constraints:p,field:M,getNotNullColumnByValue:t=>{let i=e.find(e=>e===t);if(i)return`${i}ID`},table:l}}else if(h(T)){let{relationTo:t}=T,i=e.tableNameMap.get((0,d.default)(e.payload.collections[t].config.slug));return{constraints:p,field:M,rawColumn:a.sql.raw(`"${c}"."${i}_id"`),table:l}}else if(T===E){let t={};M.relationTo.forEach(i=>{let r=e.tableNameMap.get((0,d.default)(e.payload.collections[i].config.slug));t[i]=a.sql.raw(`"${c}"."${r}_id"`)});let i=m(e,t);return"postgres"===e.name&&(i=a.sql`${i}::text`),{constraints:p,field:M,rawColumn:i,table:l}}else throw new o.APIError("Not supported");return D({adapter:e,aliasTable:y,collectionPath:i,constraints:p,fields:r,joins:g,locale:R,parentIsLocalized:!1,pathSegments:A.slice(1),rootTableName:O,selectFields:Q,selectLocale:x,tableName:O,value:T})}if(A.length>1&&(2!==A.length||"id"!==A[1])){let s=`${r}${M.name}`,a=e.tableNameMap.get((0,d.default)(e.payload.collections[M.relationTo].config.slug)),{newAliasTable:o}=N({adapter:e,tableName:a});if(f&&e.payload.config.localization){let{newAliasTable:t}=N({adapter:e,tableName:`${L}${e.localesSuffix}`}),i=[(0,n.eq)(t._parentID,e.tables[L].id)];x&&(Q._locale=t._locale),"all"!==R&&i.push((0,n.eq)(t._locale,R));let r=e.tables[`${L}${e.localesSuffix}`];v({condition:(0,n.and)(...i),joins:g,table:r}),g.push({condition:(0,n.eq)(r[s],o.id),table:o})}else g.push({condition:(0,n.eq)(o.id,t?t[s]:e.tables[S][s]),table:o});return D({adapter:e,aliasTable:o,collectionPath:i,constraintPath:"",constraints:p,fields:e.payload.collections[M.relationTo].config.flattenedFields,joins:g,locale:R,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),selectFields:Q,tableName:a,value:T})}break}case"select":if(M.hasMany){let i=e.tableNameMap.get(`${S}_${k}${(0,d.default)(M.name)}`),r=(t??e.tables[S]).id;if(R&&f&&e.payload.config.localization){let t=[(0,n.eq)(r,e.tables[i].parent),(0,n.eq)(e.tables[i]._locale,R)];"all"!==R&&t.push((0,n.eq)(e.tables[i]._locale,R)),v({condition:(0,n.and)(...t),joins:g,table:e.tables[i]})}else v({condition:(0,n.eq)(r,e.tables[i].parent),joins:g,table:e.tables[i]});return{columnName:"value",constraints:p,field:M,table:e.tables[i]}}break;case"tab":if((0,c.tabHasName)(M))return D({adapter:e,aliasTable:t,collectionPath:i,columnPrefix:`${r}${M.name}_`,constraintPath:`${F}${M.name}.`,constraints:p,fields:M.flattenedFields,joins:g,locale:R,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),rootTableName:L,selectFields:Q,selectLocale:x,tableName:O,tableNameSuffix:`${k}${(0,d.default)(M.name)}_`,value:T});return D({adapter:e,aliasTable:t,collectionPath:i,columnPrefix:r,constraintPath:F,constraints:p,fields:M.flattenedFields,joins:g,locale:R,parentIsLocalized:C||M.localized,pathSegments:A.slice(1),rootTableName:L,selectFields:Q,selectLocale:x,tableName:O,tableNameSuffix:k,value:T})}let y=e.tables[O];if(f&&e.payload.config.localization){let i=t||e.tables[S];if(O=`${S}${e.localesSuffix}`,U){let{newAliasTable:t}=N({adapter:e,tableName:O});y=t}else y=e.tables[O];let r=(0,n.eq)(i.id,y._parentID);"all"!==R&&(r=(0,n.and)(r,(0,n.eq)(y._locale,R))),x&&(Q._locale=y._locale),v({condition:r,joins:g,table:y}),t=void 0}let B=t||y;return Q[`${O}.${r}${M.name}`]=B[`${r}${M.name}`],{columnName:`${r}${M.name}`,constraints:p,field:M,pathSegments:A,table:B}}throw new o.APIError(`Cannot find field for path at ${_}`)},_=({adapter:e,aliasTable:i,fields:n,joins:s,locale:a,parentIsLocalized:o,rawSort:l,selectFields:c,sort:d,tableName:u})=>{let h=[],A=e.tables[u]?.createdAt;d||(d=A?"-createdAt":"-id"),"string"==typeof d&&(d=[d]);let p="-id";for(let f of(A&&(p="-createdAt"),d.includes(p)||d.includes(p.replace("-",""))||d.push(p),d)){let d,A;"-"===f[0]?(d=f.substring(1),A="desc"):(d=f,A="asc");try{let{columnName:p,table:f}=D({adapter:e,collectionPath:d,fields:n,joins:s,locale:a,parentIsLocalized:o,pathSegments:d.replace(/__/g,".").split("."),selectFields:c,tableName:u,value:d});if(f?.[p]){let e="asc"===A?t.asc:t.desc;l&&(e=()=>l),h.push({column:i&&u===r(f)?i[p]:f[p],order:e}),c[p]=f[p]}}catch(e){}}return h};var R=n,L=i,F=a,M=e.i(820874),O=o,U=e.i(88665),P=e.i(799028),$=e.i(306e3);function j(e){return/^[\w-]+$/.test(e)}function H({adapter:e,aliasTable:t,context:i,fields:r,joins:n,locale:s,parentIsLocalized:a,selectFields:o,selectLocale:l,tableName:c,where:d}){let u=[];for(let h of d)if("object"==typeof h){let d=J({adapter:e,aliasTable:t,context:i,fields:r,joins:n,locale:s,parentIsLocalized:a,selectFields:o,selectLocale:l,tableName:c,where:h});d&&Object.keys(d).length>0&&u.push(d)}return u}var q=o;function z(e){return Array.isArray(e)?e:e.split(",")}var V=c,u=u;let G={number:"number",serial:"number",text:"text",uuid:"text"},Y=({adapter:e,collection:t})=>t.customIDType??G[e.idType],W=({adapter:e,columns:t,field:i,isUUID:r,operator:n,relationOrPath:s,val:a})=>{let o,l=n,c=a;if(!(0,V.fieldAffectsData)(i))return{operator:l,value:c};if(w(a))return{operator:l,value:a.value};if(("relationship"===i.type||"upload"===i.type)&&!s.endsWith("relationTo")&&Array.isArray(c)){let t=[];c.forEach(i=>{"uuid"!==e.idType&&"string"==typeof i?t.push(i,parseInt(i)):"string"==typeof i?t.push(i):t.push(i,String(i))}),c=t}if("checkbox"===i.type&&"string"==typeof a&&("true"===a.toLowerCase()&&(c=!0),"false"===a.toLowerCase()&&(c=!1)),["all","in","not_in"].includes(l)&&("string"==typeof c?(c=z(c),"number"===i.type&&(c=c.map(e=>parseFloat(e)))):"number"==typeof c&&(c=[c]),!Array.isArray(c)))return null;"number"===i.type&&"string"==typeof c&&Number.isNaN(c=Number(a))&&(c=null),r&&"string"==typeof c&&!(0,u.default)(a)&&(c=null);let d=e=>{if("string"==typeof e){if("null"===e||""===e)return null;let t=new Date(e);return Number.isNaN(t.getTime())?void 0:t.toISOString()}return"number"==typeof e?new Date(e).toISOString():e instanceof Date?e.toISOString():e};if("date"===i.type&&"exists"!==l)if(Array.isArray(c))c=c.map(d).filter(e=>void 0!==e);else{let e=d(a);if(void 0===e)return{operator:l,value:void 0};c=e}if("relationship"===i.type||"upload"===i.type){if("null"===a)c=null;else if(null!==c&&"boolean"!=typeof c){let r;if("string"==typeof i.relationTo)r=Y({adapter:e,collection:e.payload.collections[i.relationTo]});else{if(h(a)){if("equals"!==l)throw new q.APIError(`Only 'equals' operator is supported for polymorphic relationship object notation. Given - ${l}`);return(r=Y({adapter:e,collection:e.payload.collections[a.relationTo]}),w(a.value))?{operator:l,value:a.value.value}:{operator:l,value:"number"===r?Number(a.value):String(a.value)}}o=t.map(({idType:e,rawColumn:t})=>{let i;if(Array.isArray(a))i=a.map(t=>{let i;if("number"===e){if(Number.isNaN(i=Number(t)))return null}else{if("uuid"===e&&!(0,u.default)(t))return null;i=String(t)}return i}).filter(Boolean);else if("number"===e){if(Number.isNaN(i=Number(a)))return null}else i=String(a);return{rawColumn:t,value:i}}).filter(Boolean)}Array.isArray(c)?c=c.map(e=>"number"===r?Number(e):"text"===r?String(e):e):("number"===r&&(c=Number(a)),"text"===r&&(c=String(a)))}}if("hasMany"in i&&i.hasMany&&"contains"===l&&("relationship"===i.type||"upload"===i.type||"select"===i.type)&&(l="equals"),"near"===l&&"point"===i.type&&"string"==typeof c){let[e,t,i,r]=c.split(",");c=[Number(e),Number(t),Number(i),Number(r)]}return"contains"===l&&(Array.isArray(c)&&"hasMany"in i&&i.hasMany&&["number","text"].includes(i.type)?c=c.map(e=>`%${e}%`):Array.isArray(c)||(c=`%${c}%`)),"exists"===l&&(l=(c="true"===a||!0===a)?"exists":"isNull"),{columns:o,operator:l,value:c}};function J({adapter:e,aliasTable:t,context:i,fields:n,joins:s,locale:a,parentIsLocalized:o,selectFields:l,selectLocale:c,tableName:d,where:u}){let h,A=[];if("object"==typeof u&&Object.keys(u).length>0){for(let p of Object.keys(u))if(p){let f,g=u[p];if("and"===p.toLowerCase()?f=R.and:"or"===p.toLowerCase()&&(f=R.or),Array.isArray(g)){let r=H({adapter:e,aliasTable:t,context:i,fields:n,joins:s,locale:a,parentIsLocalized:o,selectFields:l,selectLocale:c,tableName:d,where:g});r.length>0&&(h=f(...r))}else{let h=u[p];if("object"==typeof h){for(let f of Object.keys(h))if(P.validOperatorSet.has(f)){let h=u[p][f],{columnName:g,columns:m,constraints:y,field:b,getNotNullColumnByValue:C,pathSegments:w,rawColumn:I,table:v}=D({adapter:e,aliasTable:t,collectionPath:p,fields:n,joins:s,locale:a,parentIsLocalized:o,pathSegments:p.replace(/__/g,".").split("."),selectFields:l,selectLocale:c,tableName:d,value:h}),B=I||(t&&d===r(v)?t[g]:v[g]);if(h===E){l._selected=B;break}if(y.forEach(({columnName:t,table:i,value:r})=>{"string"==typeof r&&r.indexOf("%")>-1?A.push(e.operators.like(i[t],r)):A.push(e.operators.equals(i[t],r))}),(["json","richText"].includes(b.type)||"blocks"===b.type&&e.blocksAsJSON)&&Array.isArray(w)&&w.length>1){if("postgres"===e.name){let t=e.createJSONQuery({column:I||v[g],operator:f,pathSegments:w,value:h});A.push(F.sql.raw(t));break}let t=w.slice(1);if(t.unshift(v[g].name),"richText"===b.type){let i=0===s.length?d:s[s.length-1].table[Object.getOwnPropertySymbols(s[s.length-1].table)[0]],r=e.createJSONQuery({operator:f,pathSegments:t,table:i,treatAsArray:["children"],treatRootAsArray:!0,value:h});A.push(F.sql.raw(r));break}let i=e.convertPathToJSONTraversal(w),r={contains:{operator:"like",wildcard:"%"},equals:{operator:"=",wildcard:""},exists:{operator:!0===h?"is not null":"is null",wildcard:""},in:{operator:"in",wildcard:""},like:{operator:"like",wildcard:"%"},not_equals:{operator:"<>",wildcard:""},not_in:{operator:"not in",wildcard:""},not_like:{operator:"not like",wildcard:"%"}},n=h;n="sqlite"===e.name&&"equals"===f&&("number"==typeof h||"boolean"==typeof h)?h:["in","not_in"].includes(f)&&Array.isArray(h)?`(${h.map(e=>`${(0,$.escapeSQLValue)(e)}`).join(",")})`:`'${r[f].wildcard}${(0,$.escapeSQLValue)(h)}${r[f].wildcard}'`,"exists"===f&&(n="");let a=`${v[g].name}${i}`;"sqlite"===e.name&&"not_like"===f&&(a=`COALESCE(${v[g].name}${i}, '')`);let o=`${a} ${r[f].operator} ${n}`;A.push(F.sql.raw(o));break}if(C){let e=C(h);if(e)A.push((0,R.isNotNull)(v[e]));else throw new U.QueryError([{path:p}]);break}if("like"===f&&("number"===b.type||"relationship"===b.type||"upload"===b.type||"PgUUID"===v[g].columnType)&&(f="equals"),"like"===f){A.push((0,R.and)(...h.split(" ").map(t=>e.operators.like(v[g],`%${t}%`))));break}let Q=W({adapter:e,columns:m,field:b,isUUID:v?.[g]instanceof M.PgUUID,operator:f,relationOrPath:p,val:h});if(null===Q)break;let{columns:x,operator:S,value:k}=Q;if(x){if(!x.length)break;let t=R.or;if(null===k&&["equals","not_equals"].includes(f)){"equals"===f&&(t=R.and),A.push(t(...x.map(({rawColumn:e})=>"equals"===f?(0,R.isNull)(e):(0,R.isNotNull)(e))));break}["not_equals","not_in"].includes(f)&&(t=R.and),A.push(t(...x.map(({rawColumn:t,value:i})=>e.operators[S](t,i))));break}if("not_equals"===S&&null!==k){A.push((0,R.or)((0,R.isNull)(B),(0,R.ne)(B,k)));break}if(("relationship"===b.type||"upload"===b.type)&&Array.isArray(k)&&"not_in"===f){A.push(F.sql`(${(0,R.notInArray)(v[g],k)} OR
|
||
${v[g]}
|
||
IS
|
||
NULL)`);break}if("equals"===f&&null===k){A.push((0,R.isNull)(B));break}if("not_equals"===f&&null===k){A.push((0,R.isNotNull)(B));break}if("point"===b.type&&"postgres"===e.name){switch(f){case"intersects":A.push(F.sql`ST_Intersects(${v[g]}, ST_GeomFromGeoJSON(${JSON.stringify(k)}))`);break;case"near":{let[e,t,r,n]=k,s=[];"number"!=typeof r||Number.isNaN(r)||s.push(F.sql`ST_DWithin(${v[g]}::geography, ST_SetSRID(ST_MakePoint(${e}, ${t}), 4326)::geography, ${r})`),"number"!=typeof n||Number.isNaN(n)||s.push(F.sql`ST_Distance(${v[g]}::geography, ST_SetSRID(ST_MakePoint(${e}, ${t}), 4326)::geography) >= ${n}`),s.length&&(i.sort=p,i.rawSort=F.sql`${v[g]} <-> ST_SetSRID(ST_MakePoint(${e}, ${t}), 4326)`,A.push((0,R.and)(...s)));break}case"within":A.push(F.sql`ST_Within(${v[g]}, ST_GeomFromGeoJSON(${JSON.stringify(k)}))`)}break}let T=[],N=k;if("in"===f&&Array.isArray(k)&&k.some(e=>null===e)&&(T.push((0,R.isNull)(B)),N=k.filter(e=>null!==e)),"contains"===f&&Array.isArray(k)&&"hasMany"in b&&b.hasMany&&["number","select","text"].includes(b.type)){T.push(...k.map(t=>e.operators[S](B,t)));let t=T.length>0?(0,R.or)(...T):void 0;t&&A.push(t);break}let _=e.operators[S](B,N);if(e.limitedBoundParameters&&("in"===f||"not_in"===f)&&"id"===p&&Array.isArray(k)){let e=!1;for(let t of k)if("number"!=typeof t&&null!==t){if("string"==typeof t)if(j(t))continue;else{e=!0;break}e=!0;break}if(e)throw new O.APIError(`Invalid ID value in ${JSON.stringify(k)}`);A.push(F.sql.raw(`"${(0,L.getTableName)(B.table)}"."${B.name}" ${"in"===f?"IN":"NOT IN"} (${k.map(e=>null===e?"NULL":"number"==typeof e?e:`'${e}'`).join(",")})`));break}T.length&&(T.push(_),_=(0,R.or)(...T)),A.push(_)}}}}}return A.length>0&&(h=h?(0,R.and)(h,...A):(0,R.and)(...A)),1!==A.length||h||([h]=A),h}let K=function({adapter:e,aliasTable:t,fields:i,joins:r=[],locale:n,parentIsLocalized:s,selectLocale:a,sort:o,tableName:l,where:c}){let d,u={id:e.tables[l].id},h={sort:o};c&&Object.keys(c).length>0&&(d=J({adapter:e,aliasTable:t,context:h,fields:i,joins:r,locale:n,parentIsLocalized:s,selectFields:u,selectLocale:a,tableName:l,where:c}));let A=_({adapter:e,aliasTable:t,fields:i,joins:r,locale:n,parentIsLocalized:s,rawSort:h.rawSort,selectFields:u,sort:h.sort,tableName:l});return{joins:r,orderBy:A,selectFields:u,where:d}};e.s(["buildQuery",0,K],326421)},444316,890546,e=>{"use strict";function t(e){e.lastWriteTimestamp=Date.now()}function i(e){return!!e.primaryDrizzle&&!!e.lastWriteTimestamp&&Date.now()-e.lastWriteTimestamp<e.readReplicasAfterWriteInterval}e.s(["markWrite",()=>t,"shouldReadFromPrimary",()=>i],890546);let r=async(e,t)=>t?.transactionID?e.sessions[await t.transactionID]?.db||e.drizzle:i(e)?e.primaryDrizzle:e.drizzle;e.s(["getTransaction",0,r],444316)},276654,e=>{"use strict";var t=e.i(477426),i=e.i(326421),r=e.i(444316);let n=async function({collection:e,locale:n,req:s,where:a}){let o=this.payload.collections[e].config,l=this.tableNameMap.get((0,t.default)(o.slug)),{joins:c,where:d}=(0,i.buildQuery)({adapter:this,fields:o.flattenedFields,locale:n,tableName:l,where:a}),u=await (0,r.getTransaction)(this,s);return{totalDocs:await this.countDistinct({db:u,joins:c,tableName:l,where:d})}};e.s(["count",0,n])},146194,e=>{"use strict";var t=e.i(201803),i=e.i(477426),r=e.i(326421),n=e.i(444316);let s=async function({global:e,locale:s,req:a,where:o}){let l=this.payload.globals.config.find(({slug:t})=>t===e),c=this.tableNameMap.get(`_${(0,i.default)(l.slug)}${this.versionsSuffix}`),d=(0,t.buildVersionGlobalFields)(this.payload.config,l,!0),{joins:u,where:h}=(0,r.buildQuery)({adapter:this,fields:d,locale:s,tableName:c,where:o}),A=await (0,n.getTransaction)(this,a);return{totalDocs:await this.countDistinct({db:A,joins:u,tableName:c,where:h})}};e.s(["countGlobalVersions",0,s])},49332,e=>{"use strict";var t=e.i(391033),i=e.i(477426),r=e.i(326421),n=e.i(444316);let s=async function({collection:e,locale:s,req:a,where:o}){let l=this.payload.collections[e].config,c=this.tableNameMap.get(`_${(0,i.default)(l.slug)}${this.versionsSuffix}`),d=(0,t.buildVersionCollectionFields)(this.payload.config,l,!0),{joins:u,where:h}=(0,r.buildQuery)({adapter:this,fields:d,locale:s,tableName:c,where:o}),A=await (0,n.getTransaction)(this,a);return{totalDocs:await this.countDistinct({db:A,joins:u,tableName:c,where:h})}};e.s(["countVersions",0,s])},501040,e=>{"use strict";var t=e.i(586210),i=e.i(990866),r=e.i(65054);function n(e){return r.sql`count(${e||r.sql.raw("*")})`.mapWith(Number)}function s(e){return r.sql`max(${e})`.mapWith((0,i.is)(e,t.Column)?e:String)}function a(e){return r.sql`min(${e})`.mapWith((0,i.is)(e,t.Column)?e:String)}e.s(["count",()=>n,"max",()=>s,"min",()=>a])},476560,e=>{"use strict";var t=e.i(226836);let i={and:t.and,contains:t.ilike,equals:t.eq,exists:t.isNotNull,greater_than:t.gt,greater_than_equal:t.gte,in:t.inArray,isNull:t.isNull,less_than:t.lt,less_than_equal:t.lte,like:t.ilike,not_equals:t.ne,not_like:t.notIlike,not_in:t.notInArray,or:t.or};e.s(["operatorMap",0,i])},999110,e=>{"use strict";let t=({field:e,path:t,tableName:i})=>e.dbName&&t.length>63?`_${i}`:t;e.s(["getArrayRelationName",0,t])},359991,e=>{"use strict";var t=e.i(700859);let i=/^\w+$/,r=e=>{if(!i.test(e))throw new t.APIError("Invalid path segment. Only alphanumeric characters and underscores are permitted.",400);return e};e.s(["sanitizePathSegment",0,r])},699409,276092,e=>{"use strict";var t=e.i(553095),i=e.i(226836),r=e.i(878719),n=e.i(501040),s=e.i(959694),a=e.i(65054),o=e.i(212827),l=e.i(391033),c=e.i(617997),d=e.i(783334),u=e.i(79579),h=e.i(186725),A=e.i(974605),p=e.i(477426),f=e.i(326421),g=e.i(791106),m=e.i(476560),y=e.i(999110),b=e.i(154136),E=e.i(689978),C=e.i(59489),w=e.i(359991),I=e.i(207976);let v=(e,t)=>{for(let i in e)if(["AND","OR"].includes(i.toUpperCase())){if(Array.isArray(e[i]))for(let r of e[i])v(r,t)}else t.push({path:i.split(".").join("_"),ref:e})},B=(e,t)=>{for(let r in e)if(["AND","OR"].includes(r.toUpperCase())){if(Array.isArray(e[r])){let n="AND"===r.toUpperCase()?i.and:i.or,s=[];for(let i of e[r])s.push(B(i,t));return n(...s)}}else{let i=Object.keys(e[r])[0],n=e[r][i];if("$raw"===i){if("string"!=typeof n)return;return a.sql.raw(n)}if("exists"===i&&!1===n&&(i="isNull"),!(i in m.operatorMap))return;let s=r.split(".").map(e=>(0,w.sanitizePathSegment)(e)).join("_");return m.operatorMap[i](a.sql.raw(`"${t}"."${s}"`),n)}},Q=({_locales:e,adapter:t,collectionSlug:m,currentArgs:w,currentTableName:x,depth:S,draftsEnabled:k,fields:T,forceWithFields:N,joinQuery:D={},joins:_,locale:R,parentIsLocalized:L=!1,path:F,select:M,selectAllOnCurrentLevel:O=!1,selectMode:U,tablePath:P,topLevelArgs:$,topLevelTableName:j,versions:H,withTabledFields:q})=>(T.forEach(T=>{if((0,h.fieldIsVirtual)(T))return;let z=(0,h.fieldShouldBeLocalized)({field:T,parentIsLocalized:L});switch(S>0&&("upload"===T.type||"relationship"===T.type)&&!T.hasMany&&"string"==typeof T.relationTo&&(z?e.with[`${F}${T.name}`]=!0:w.with[`${F}${T.name}`]=!0),T.type){case"array":{let e=!!O||M?.[T.name];if(M&&("include"===U&&void 0===e||"exclude"===U&&!1===e))break;let i={columns:"object"==typeof e?{id:!0,_order:!0}:{_parentID:!1},orderBy:({_order:e},{asc:t})=>[t(e)],with:{}},r=t.tableNameMap.get(`${x}_${P}${(0,p.default)(T.name)}`);"object"==typeof e&&(t.tables[r]._locale&&(i.columns._locale=!0),t.tables[r]._uuid&&(i.columns._uuid=!0));let n=`${r}${t.localesSuffix}`;t.tables[n]&&(i.with._locales={columns:"object"==typeof e?{_locale:!0}:{id:!1,_parentID:!1},with:{}});let s=(0,y.getArrayRelationName)({field:T,path:`${F}${T.name}`,tableName:r});w.with[s]=i,Q({_locales:i.with._locales,adapter:t,currentArgs:i,currentTableName:r,depth:S,draftsEnabled:k,fields:T.flattenedFields,forceWithFields:N,joinQuery:D,locale:R,parentIsLocalized:L||T.localized,path:"",select:"object"==typeof e?e:void 0,selectMode:U,tablePath:"",topLevelArgs:$,topLevelTableName:j,withTabledFields:q}),"object"==typeof e&&i.with._locales&&1===Object.keys(i.with._locales).length&&delete i.with._locales;break}case"blocks":{let i=!!O||M?.[T.name];if(M&&("include"===U&&!i||"exclude"===U&&!1===i))break;if(t.blocksAsJSON){if(M||O){let i=`${F}${T.name}`;(z||L)&&e?e.columns[i]=!0:t.tables[x]?.[i]&&(w.columns[i]=!0)}break}(T.blockReferences??T.blocks).forEach(e=>{let r,n="string"==typeof e?t.payload.blocks[e]:e,s=`_blocks_${n.slug}${!n[I.InternalBlockTableNameIndex]?"":`_${n[I.InternalBlockTableNameIndex]}`}`,a=U;if("include"===U&&!0===i&&(r=!0),"object"==typeof i&&("object"==typeof i[n.slug]?r=i[n.slug]:"include"===U&&void 0===i[n.slug]||"exclude"===U&&!1===i[n.slug]?(r={},a="include"):"include"===U&&i[n.slug]&&(r=!0)),!$[s]){let e={columns:"object"==typeof r?{id:!0,_order:!0,_path:!0}:{_parentID:!1},orderBy:({_order:e},{asc:t})=>[t(e)],with:{}},i=(0,I.resolveBlockTableName)(n,t.tableNameMap.get(`${j}_blocks_${(0,p.default)(n.slug)}`));"object"==typeof r&&(t.tables[i]._locale&&(e.columns._locale=!0),t.tables[i]._uuid&&(e.columns._uuid=!0)),t.tables[`${i}${t.localesSuffix}`]&&(e.with._locales={with:{}},"object"==typeof r&&(e.with._locales.columns={_locale:!0})),$.with[s]=e,Q({_locales:e.with._locales,adapter:t,currentArgs:e,currentTableName:i,depth:S,draftsEnabled:k,fields:n.flattenedFields,forceWithFields:!0===r,joinQuery:D,locale:R,parentIsLocalized:L||T.localized,path:"",select:"object"==typeof r?r:void 0,selectMode:a,tablePath:"",topLevelArgs:$,topLevelTableName:j,withTabledFields:q}),"object"==typeof r&&e.with._locales&&1===Object.keys(e.with._locales.columns).length&&delete e.with._locales}});break}case"group":case"tab":{let i=M?.[T.name];if(!1===i)break;Q({_locales:e,adapter:t,collectionSlug:m,currentArgs:w,currentTableName:x,depth:S,draftsEnabled:k,fields:T.flattenedFields,forceWithFields:N,joinQuery:D,joins:_,locale:R,parentIsLocalized:L||T.localized,path:`${F}${T.name}_`,select:"object"==typeof i?i:void 0,selectAllOnCurrentLevel:O||!0===i||"exclude"===U&&void 0===i,selectMode:U,tablePath:`${P}${(0,p.default)(T.name)}_`,topLevelArgs:$,topLevelTableName:j,versions:H,withTabledFields:q});break}case"join":{if(!1===D||M&&"include"===U&&!M[T.name]||"exclude"===U&&!1===M[T.name])break;let e=`${F.replaceAll("_",".")}${T.name}`;if(!1===D[e])break;let{count:h=!1,limit:y=T.defaultLimit??10,page:I,sort:Q=T.defaultSort,where:S}=D[e]||{},N=y;0!==N&&(N+=1);let _=`${F.replaceAll(".","_")}${T.name}`,O=t.drizzle;if(Array.isArray(T.collection)){let e=null,o=T.on.split(".").join("_");if(Array.isArray(Q))throw Error("Not implemented");let l=Q;l||(l=T.collection.some(e=>t.payload.collections[e].config.fields.some(e=>"date"===e.type&&"createdAt"===e.name))?"-createdAt":"id");let c=l.startsWith("-")?r.desc:r.asc,u=(l=l.replace("-","")).split(".").join("_"),A=[];for(let r of(S&&v(S,A),T.collection)){let n=t.tableNameMap.get((0,p.default)(r)),l=t.tables[n],c=l[u],h={id:t.tables[n].id,parent:a.sql`${t.tables[n][o]}`.as(o),relationTo:a.sql`${r}`.as("relationTo"),sortPath:a.sql`${c||null}`.as("sortPath")},f=[];for(let{path:e,ref:i}of A){let o=t.payload.collections[r].config,c=(0,d.getFieldByPath)({fields:o.flattenedFields,path:e});if(c&&"select"===c.field.type&&c.field.hasMany){let n=t.tableNameMap.get(`${(0,p.default)(r)}_${(0,p.default)(e)}`),o=(0,s.getTableName)(l);t.schemaName&&(n=`"${t.schemaName}"."${n}"`,o=`"${t.schemaName}"."${o}"`),"postgres"===t.name?h[e]=a.sql.raw(`(select jsonb_agg(${n}.value) from ${n} where ${n}.parent_id = ${o}.id)`).as(e):h[e]=a.sql.raw(`(select json_group_array(${n}.value) from ${n} where ${n}.parent_id = ${o}.id)`).as(e);let d=i[e],u=Object.keys(d)[0],A=Object.values(d)[0],f=t.createJSONQuery({column:`"${e}"`,operator:u,pathSegments:[c.field.name],table:o,value:A});i[e]={$raw:f}}else t.tables[n][e]?h[e]=a.sql`${t.tables[n][e]}`.as(e):"relationTo"!==e&&("deletedAt"===e&&"postgres"===t.name?h[e]=a.sql`null::timestamp with time zone`.as(e):h[e]=a.sql`null`.as(e))}let g=O.select(h).from(t.tables[n]);f.length&&(g=g.where((0,i.and)(...f))),e=null===e?g:e.unionAll(g)}let f=`${_}_subquery`,g=(0,i.eq)(a.sql.raw(`"${x}"."id"`),a.sql.raw(`"${f}"."${o}"`));S&&Object.keys(S).length>0&&(g=(0,i.and)(g,B(S,f))),h&&(w.extras[`${_}_count`]=a.sql`${O.select({count:(0,n.count)()}).from(a.sql`${e.as(f)}`).where(g)}`.as(`${_}_count`)),e=e.orderBy(c(a.sql`"sortPath"`));let m=`${_}_sorted`,y=a.sql.empty();if(N&&(y=a.sql` LIMIT ${N}`),I&&0!==N){let e=(I-1)*N;e>0&&(y=a.sql`${y} OFFSET ${e}`)}let b=a.sql.raw(`"${m}"."${o}" = "${x}"."id"`);if(S&&Object.keys(S).length>0){let e=B(S,m);b=a.sql`${b} AND ${e}`}w.extras[_]=a.sql`(
|
||
SELECT ${(0,E.jsonAggBuildObject)(t,{id:a.sql.raw(`"${f}"."id"`),relationTo:a.sql.raw(`"${f}"."relationTo"`)})}
|
||
FROM (
|
||
SELECT * FROM ${a.sql`${e.as(m)}`}
|
||
WHERE ${b}${y}
|
||
) AS ${a.sql.raw(`"${f}"`)}
|
||
)`.as(_)}else{let e,i=(H||k)&&(0,A.hasDraftsEnabled)(t.payload.collections[T.collection].config),r=i?(0,l.buildVersionCollectionFields)(t.payload.config,t.payload.collections[T.collection].config,!0):t.payload.collections[T.collection].config.flattenedFields,s=t.tableNameMap.get(i?`_${(0,p.default)(T.collection)}${t.versionsSuffix}`:(0,p.default)(T.collection)),d=[],y=H?t.tables[x].parent:t.tables[x].id,v=a.sql.raw(`"${(0,b.getNameFromDrizzleTable)(y.table)}"."${y.name}"`);e=Array.isArray(T.targetField.relationTo)?{[T.on]:{equals:{relationTo:m,value:(0,C.rawConstraint)(v)}}}:{[T.on]:{equals:(0,C.rawConstraint)(v)}},S&&Object.keys(S).length&&(e={and:[e,S]}),i&&(e=(0,c.combineQueries)((0,o.appendVersionToQueryKey)(e),{latest:{equals:!0}}));let B=`${F.replaceAll(".","_")}${T.name}`,D=`${B}_alias`,{newAliasTable:_}=(0,g.getTableAlias)({adapter:t,tableName:s}),{orderBy:M,selectFields:U,where:P}=(0,f.buildQuery)({adapter:t,aliasTable:_,fields:r,joins:d,locale:R,parentIsLocalized:L,selectLocale:!0,sort:i?(0,u.getQueryDraftsSort)({collectionConfig:t.payload.collections[T.collection].config,sort:Q}):Q,tableName:s,where:e});for(let e in U){let t=U[e];t.table&&(0,b.getNameFromDrizzleTable)(t.table)===s&&(delete U[e],U[e=e.split(".").pop()]=_[e])}i&&(U.parent=_.parent);let $=O.select(U).from(_).where(P).orderBy(()=>M.map(({column:e,order:t})=>t(e))).$dynamic();if(d.forEach(({type:e,condition:t,table:i})=>{$=$[e??"leftJoin"](i,t)}),I&&0!==N){let e=(I-1)*N-1;e>0&&($=$.offset(e))}0!==N&&($=$.limit(N));let j=$.as(D);if(h){let e=O.select(U).from(_).where(P).$dynamic();d.forEach(({type:t,condition:i,table:r})=>{e=e[t??"leftJoin"](r,i)}),w.extras[`${B}_count`]=a.sql`${O.select({count:(0,n.count)()}).from(a.sql`${e.as(`${D}_count_subquery`)}`)}`.as(`${D}_count`)}w.extras[B]=a.sql`${O.select({result:(0,E.jsonAggBuildObject)(t,{id:a.sql.raw(`"${D}".${i?"parent_id":"id"}`),...U._locale&&{locale:a.sql.raw(`"${D}".${U._locale.name}`)}})}).from(a.sql`${j}`)}`.as(D)}break}case"point":{if("sqlite"===t.name)break;let i=z?e:w;i.columns||(i.columns={}),i.extras||(i.extras={});let r=`${F}${T.name}`;i.columns[r]=!1;let n=!1;M||O?(O||"include"===U&&M[T.name]||"exclude"===U&&void 0===M[T.name])&&(n=!0):n=!0;let s=(0,h.fieldShouldBeLocalized)({field:T,parentIsLocalized:L})?`${x}${t.localesSuffix}`:x;n&&(i.extras[r]=a.sql.raw(`ST_AsGeoJSON("${t.tables[s][r].name}")::jsonb`).as(r));break}case"select":if(M&&!O&&("include"===U&&!M[T.name]||"exclude"===U&&!1===M[T.name]))break;if(T.hasMany){let e={columns:{id:!1,order:!1,parent:!1},orderBy:({order:e},{asc:t})=>[t(e)]};w.with[`${F}${T.name}`]=e;break}if(M||O){let i=`${F}${T.name}`;(z||L)&&e?e.columns[i]=!0:t.tables[x]?.[i]&&(w.columns[i]=!0)}break;default:if(N&&(("relationship"===T.type||"upload"===T.type)&&(T.hasMany||Array.isArray(T.relationTo))&&(q.rels=!0),"number"===T.type&&T.hasMany&&(q.numbers=!0),"text"===T.type&&T.hasMany&&(q.texts=!0)),!M&&!O)break;if(O||"include"===U&&M[T.name]||"exclude"===U&&void 0===M[T.name]){let i=`${F}${T.name}`;(z||L)&&e?e.columns[i]=!0:t.tables[x]?.[i]&&(w.columns[i]=!0),!q.rels&&("relationship"===T.type||"upload"===T.type)&&(T.hasMany||Array.isArray(T.relationTo))&&(q.rels=!0),!q.numbers&&"number"===T.type&&T.hasMany&&(q.numbers=!0),!q.texts&&"text"===T.type&&T.hasMany&&(q.texts=!0)}}}),$),x=({adapter:e,collectionSlug:i,depth:r,draftsEnabled:n,fields:s,joinQuery:a,joins:o=[],locale:l,select:c,tableName:d,versions:u})=>{let h={extras:{},with:{}};c&&(h.columns={id:!0});let A={columns:c?{_locale:!0}:{id:!1,_parentID:!1},extras:{},with:{}},p=c?{}:{numbers:!0,rels:!0,texts:!0};for(let f of(Q({_locales:A,adapter:e,collectionSlug:i,currentArgs:h,currentTableName:d,depth:r,draftsEnabled:n,fields:s,joinQuery:a,joins:o,locale:l,path:"",select:c,selectMode:c?(0,t.getSelectMode)(c):void 0,tablePath:"",topLevelArgs:h,topLevelTableName:d,versions:u,withTabledFields:p}),e.tables[`${d}_texts`]&&p.texts&&(h.with._texts={columns:{id:!1,parent:!1},orderBy:({order:e},{asc:t})=>[t(e)]}),e.tables[`${d}_numbers`]&&p.numbers&&(h.with._numbers={columns:{id:!1,parent:!1},orderBy:({order:e},{asc:t})=>[t(e)]}),e.tables[`${d}${e.relationshipsSuffix}`]&&p.rels&&(h.with._rels={columns:{id:!1,parent:!1},orderBy:({order:e},{asc:t})=>[t(e)]}),e.tables[`${d}${e.localesSuffix}`]&&(!c||Object.keys(A.columns).length>1)&&(h.with._locales=A),Object.keys(h)))Object.keys(h[f]).length||delete h[f];return h};e.s(["buildFindManyArgs",0,x],699409);let S=e=>{let t={};return Object.entries(e).forEach(([i,r])=>{if(i.startsWith("_blocks_")&&Array.isArray(r)){let n=i.replace("_blocks_",""),s=n.split("_");2===s.length&&Number.isInteger(Number(s[1]))&&(n=s[0]),r.forEach(e=>{"_path"in e&&(e._path in t||(t[e._path]=[]),e.blockType=n,t[e._path].push(e),delete e._path)}),delete e[i]}}),Object.entries(t).reduce((e,[t,i])=>(e[t]=i.sort((e,t)=>"number"==typeof e._order&&"number"==typeof t._order?e._order-t._order:0),e),{}),t},k=e=>{let t={};return Array.isArray(e)&&(t=e.reduce((e,t)=>{let i={...t};return delete i.path,e[t.path]||(e[t.path]=[]),e[t.path].push(t),e},{})),t};var T=h,N=p,D=y,_=I;let R=({field:e,locale:t,numberRows:i,ref:r,withinArrayOrBlockLocale:n})=>{let s;s=n?i.reduce((e,{locale:t,number:i})=>(t===n&&("string"==typeof i&&(i=Number(i)),e.push(i)),e),[]):i.map(({number:e})=>("string"==typeof e&&(e=Number(e)),e)),t?r[e.name][t]=s:r[e.name]=s},L=({field:e,locale:t,ref:i,textRows:r,withinArrayOrBlockLocale:n})=>{let s;s=n?r.reduce((e,{locale:t,text:i})=>(t===n&&e.push(i),e),[]):r.map(({text:e})=>e),t?i[e.name][t]=s:i[e.name]=s},F=({field:e,locale:t,ref:i,relations:r,withinArrayOrBlockLocale:n})=>{let s;if("hasMany"in e&&!1!==e.hasMany){let t=[];r.forEach(i=>{let r=!0;if(n&&(r=i.locale===n),Array.isArray(e.relationTo)){let e=Object.entries(i).find(([e,t])=>null!==t&&!["id","locale","order","parent","path"].includes(e)&&r);if(e){let i=e[0].replace("ID","");t.push({relationTo:i,value:e[1]})}}else{let n=i[`${e.relationTo}ID`];n&&r&&t.push(n)}}),s=t}else{let t=r[0];if(n&&(t=r.find(e=>e.locale===n)),t&&Array.isArray(e.relationTo)){let e=Object.entries(t).find(([e,t])=>null!==t&&!["id","locale","order","parent","path"].includes(e));e&&(s={relationTo:e[0].replace("ID",""),value:e[1]})}}t?i[e.name][t]=s:i[e.name]=s},M=({adapter:e,blocks:t,config:i,currentTableName:r,dataRef:n,deletions:s,fieldPrefix:a,fields:o,joinQuery:l,numbers:c,parentIsLocalized:d,path:u,relationships:h,table:A,tablePath:p,texts:f,topLevelTableName:g,withinArrayOrBlockLocale:m})=>{let y=u?`${u}.`:u,b=e.payload.config.localization&&e.payload.config.localization.localeCodes,E=o.reduce((n,o)=>{if((0,T.fieldIsVirtual)(o))return n;let u=`${a||""}${o.name}`,E=A[u],C={},w=[];a&&s.push(()=>delete A[u]);let I=(0,T.fieldShouldBeLocalized)({field:o,parentIsLocalized:d});if("array"===o.type){let a=e.tableNameMap.get(`${r}_${p}${(0,N.default)(o.name)}`);return Array.isArray(E=A[(0,D.getArrayRelationName)({field:o,path:u,tableName:a})])&&(I?n[o.name]=E.reduce((r,n)=>{if("string"==typeof n._locale){r[n._locale]||(r[n._locale]=[]);let l=n._locale,u={};delete n._locale,n._uuid&&(n.id=n._uuid,delete n._uuid);let A=M({adapter:e,blocks:t,config:i,currentTableName:a,dataRef:u,deletions:s,fieldPrefix:"",fields:o.flattenedFields,numbers:c,parentIsLocalized:d||o.localized,path:`${y}${o.name}.${n._order-1}`,relationships:h,table:n,tablePath:"",texts:f,topLevelTableName:g,withinArrayOrBlockLocale:l});"_order"in A&&delete A._order,r[l].push(A)}return r},{}):n[o.name]=E.reduce((r,n,l)=>(n._uuid&&(n.id=n._uuid,delete n._uuid),"_order"in n&&delete n._order,(!m||m&&m===n._locale)&&(n._locale&&delete n._locale,r.push(M({adapter:e,blocks:t,config:i,currentTableName:a,dataRef:n,deletions:s,fieldPrefix:"",fields:o.flattenedFields,numbers:c,parentIsLocalized:d||o.localized,path:`${y}${o.name}.${l}`,relationships:h,table:n,tablePath:"",texts:f,topLevelTableName:g,withinArrayOrBlockLocale:m}))),r),[])),n}if("blocks"===o.type&&!e.blocksAsJSON){let r=`${y}${o.name}`,a=t[r];if(Array.isArray(a))if(I)n[o.name]={},a.forEach(e=>{e._uuid&&(e.id=e._uuid,delete e._uuid),"string"==typeof e._locale&&(n[o.name][e._locale]||(n[o.name][e._locale]=[]),n[o.name][e._locale].push(e),delete e._locale)}),Object.entries(n[o.name]).forEach(([a,l])=>{n[o.name][a]=l.map(n=>{let l=e.payload.blocks[n.blockType]??(o.blockReferences??o.blocks).find(e=>"string"!=typeof e&&e.slug===n.blockType),u=(0,_.resolveBlockTableName)(l,e.tableNameMap.get(`${g}_blocks_${(0,N.default)(l.slug)}`));if(l){let A=M({adapter:e,blocks:t,config:i,currentTableName:u,dataRef:n,deletions:s,fieldPrefix:"",fields:l.flattenedFields,numbers:c,parentIsLocalized:d||o.localized,path:`${r}.${n._order-1}`,relationships:h,table:n,tablePath:"",texts:f,topLevelTableName:g,withinArrayOrBlockLocale:a});return delete A._order,A}return{}})});else{if(m&&i.localization)for(let e of i.localization.localeCodes){let t=0;for(let i=0;i<a.length;i++){let r=a[i];r._locale===e&&(r._index=t,t++)}}n[o.name]=a.reduce((n,a,l)=>{if(delete a._order,a._uuid&&(a.id=a._uuid,delete a._uuid),"string"!=typeof a.blockType)return n;let u=e.payload.blocks[a.blockType]??(o.blockReferences??o.blocks).find(e=>"string"!=typeof e&&e.slug===a.blockType);if(u){if(!m||m&&m===a._locale){a._locale&&delete a._locale,"number"==typeof a._index&&(l=a._index,delete a._index);let A=(0,_.resolveBlockTableName)(u,e.tableNameMap.get(`${g}_blocks_${(0,N.default)(u.slug)}`));n.push(M({adapter:e,blocks:t,config:i,currentTableName:A,dataRef:a,deletions:s,fieldPrefix:"",fields:u.flattenedFields,numbers:c,parentIsLocalized:d||o.localized,path:`${r}.${l}`,relationships:h,table:a,tablePath:"",texts:f,topLevelTableName:g,withinArrayOrBlockLocale:m}))}}else n.push({});return n},[])}return n}if(("relationship"===o.type||"upload"===o.type)&&(Array.isArray(o.relationTo)||o.hasMany)){let e=h[`${y}${o.name}`];if(!e)return"hasMany"in o&&o.hasMany&&(I&&i.localization&&i.localization.locales?n[o.name]={[i.localization.defaultLocale]:[]}:n[o.name]=[]),n;if(I){n[o.name]={};let t={};e.forEach(e=>{"string"==typeof e.locale&&(t[e.locale]||(t[e.locale]=[]),t[e.locale].push(e))}),Object.entries(t).forEach(([e,t])=>{F({field:o,locale:e,ref:n,relations:t})})}else F({field:o,ref:n,relations:e,withinArrayOrBlockLocale:m});return n}if("join"===o.type){let t,{count:i,limit:r=o.defaultLimit??10}=l?.[`${a.replaceAll("_",".")}${o.name}`]||{};if("string"==typeof E&&(E=JSON.parse(E)),Array.isArray(E))if(I&&e.payload.config.localization)Object.keys(t=E.reduce((e,t)=>("string"==typeof t.locale&&e[t.locale].docs.push(t.id),e),e.payload.config.localization.localeCodes.reduce((e,t)=>(e[t]={docs:[],hasNextPage:!1},e),{}))).forEach(e=>{t[e].hasNextPage=t[e].docs.length>r,t[e].docs=t[e].docs.slice(0,r)});else{let e=0!==r&&E.length>r;t={docs:(e?E.slice(0,r):E).map(({id:e,relationTo:t})=>t?{relationTo:t,value:e}:{id:e}),hasNextPage:e}}if(i){let e=`${u}_count`;if(void 0!==A[e]){let i=Number(A[e]);Number.isNaN(i)&&(i=0),t.totalDocs=i}}return n[o.name]=t,n}if("text"===o.type&&o?.hasMany){let e=f[`${y}${o.name}`];if(!e)return n[o.name]=I&&b?Object.fromEntries(b.map(e=>[e,[]])):[],n;if(I){n[o.name]={};let t={};e.forEach(e=>{"string"==typeof e.locale&&(t[e.locale]||(t[e.locale]=[]),t[e.locale].push(e))}),Object.entries(t).forEach(([e,t])=>{L({field:o,locale:e,ref:n,textRows:t})})}else L({field:o,ref:n,textRows:e,withinArrayOrBlockLocale:m});return n}if("number"===o.type&&o.hasMany){let e=c[`${y}${o.name}`];if(!e)return n[o.name]=I&&b?Object.fromEntries(b.map(e=>[e,[]])):[],n;if(I){n[o.name]={};let t={};e.forEach(e=>{"string"==typeof e.locale&&(t[e.locale]||(t[e.locale]=[]),t[e.locale].push(e))}),Object.entries(t).forEach(([e,t])=>{R({field:o,locale:e,numberRows:t,ref:n})})}else R({field:o,numberRows:e,ref:n,withinArrayOrBlockLocale:m});return n}if("select"===o.type&&o.hasMany){if(Array.isArray(E))if(I)n[o.name]=E.reduce((e,t)=>("string"==typeof t.locale&&(e[t.locale]||(e[t.locale]=[]),e[t.locale].push(t.value)),e),{});else{let e=E;m&&(e=e.filter(({locale:e})=>e===m)),n[o.name]=e.map(({value:e})=>e)}return n}return I&&Array.isArray(A._locales)?(!A._locales.length&&b&&b.forEach(e=>A._locales.push({_locale:e})),A._locales.forEach(e=>{w.push({ref:C,table:{...A,...e}})})):w.push({ref:n,table:A}),w.forEach(({ref:u,table:A})=>{let b=A[`${a||""}${o.name}`],E=A?._locale,C=b;switch(o.type){case"date":"string"==typeof b&&(C=new Date(b).toISOString());break;case"group":case"tab":{let n=`${a||""}${o.name}_`,b={},E=A._locale,C=I&&E?E:o.name;I&&E&&delete A._locale,u[C]=M({adapter:e,blocks:t,config:i,currentTableName:r,dataRef:b,deletions:s,fieldPrefix:n,fields:o.flattenedFields,joinQuery:l,numbers:c,parentIsLocalized:d||o.localized,path:`${y}${o.name}`,relationships:h,table:A,tablePath:`${p}${(0,N.default)(o.name)}_`,texts:f,topLevelTableName:g,withinArrayOrBlockLocale:E||m});return}case"number":"string"==typeof b&&(C=Number.parseFloat(b));break;case"point":"string"==typeof b&&(C=JSON.parse(b));break;case"relationship":case"upload":C&&"string"==typeof o.relationTo&&"number"===e.payload.collections[o.relationTo].customIDType&&(C=Number(C));break;case"text":"string"==typeof b&&(C=String(b))}"string"==typeof E?u[E]=C:n[o.name]=C}),Object.keys(C).length>0&&(n[o.name]=C),n},n);return Array.isArray(A._locales)&&s.push(()=>delete A._locales),E},O=({adapter:e,config:t,data:i,fields:r,joinQuery:n,parentIsLocalized:s,tableName:a})=>{let o={},l={},c={};"_rels"in i&&(o=k(i._rels),delete i._rels),"_texts"in i&&(l=k(i._texts),delete i._texts),"_numbers"in i&&(c=k(i._numbers),delete i._numbers);let d=S(i),u=[],h=M({adapter:e,blocks:d,config:t,currentTableName:a,dataRef:{id:i.id},deletions:u,fieldPrefix:"",fields:r,joinQuery:n,numbers:c,parentIsLocalized:s,path:"",relationships:o,table:i,tablePath:"",texts:l,topLevelTableName:a});return u.forEach(e=>e()),h};e.s(["transform",0,O],276092)},852091,871563,e=>{"use strict";var t=e.i(226836),i=e.i(878719),r=e.i(699409),n=e.i(276092),s=e.i(65054),a=e.i(700859),o=e.i(186725),l=e.i(477426);function c(e){return Array.isArray(e)}var d=e.i(207976),u=o;let h=({adapter:e,arrayTableName:t,baseTableName:i,blocks:r,blocksToDelete:n,data:s,field:a,locale:o,numbers:l,numbersToDelete:d,parentIsLocalized:h,path:A,relationships:p,relationshipsToDelete:f,selects:g,texts:m,textsToDelete:y,withinArrayOrBlockLocale:b})=>{let E=[],C=e.tables[t]._uuid;return c(s)&&s.forEach((s,c)=>{let I={arrays:{},arraysToPush:{},locales:{},row:{_order:c+1}};C&&(I.row._uuid=s.id,delete s.id),o&&(I.locales[o]={_locale:o}),(0,u.fieldShouldBeLocalized)({field:a,parentIsLocalized:h})&&o&&(I.row._locale=o),b&&(I.row._locale=b),w({adapter:e,arrays:I.arrays,arraysToPush:I.arraysToPush,baseTableName:i,blocks:r,blocksToDelete:n,columnPrefix:"",data:s,fieldPrefix:"",fields:a.flattenedFields,insideArrayOrBlock:!0,locales:I.locales,numbers:l,numbersToDelete:d,parentIsLocalized:h||a.localized,parentTableName:t,path:`${A||""}${a.name}.${c}.`,relationships:p,relationshipsToAppend:[],relationshipsToDelete:f,row:I.row,selects:g,texts:m,textsToDelete:y,withinArrayOrBlockLocale:b}),E.push(I)}),E};var A=o,p=l,f=d;let g=({adapter:e,baseTableName:t,blocks:i,blocksToDelete:r,data:n,field:s,locale:a,numbers:o,numbersToDelete:l,parentIsLocalized:c,path:d,relationships:u,relationshipsToDelete:h,selects:g,texts:m,textsToDelete:y,withinArrayOrBlockLocale:b})=>{n.forEach((n,E)=>{if("string"!=typeof n.blockType)return;let C=e.payload.blocks[n.blockType]??(s.blockReferences??s.blocks).find(e=>"string"!=typeof e&&e.slug===n.blockType);if(!C)return;let I=(0,p.default)(n.blockType),v={arrays:{},arraysToPush:{},locales:{},row:{_order:E+1,_path:`${d}${s.name}`}};(0,A.fieldShouldBeLocalized)({field:s,parentIsLocalized:c})&&a&&(v.row._locale=a),b&&(v.row._locale=b);let B=(0,f.resolveBlockTableName)(C,e.tableNameMap.get(`${t}_blocks_${I}`));i[B]||(i[B]=[]),e.tables[B]._uuid&&(v.row._uuid=n.id,delete n.id),w({adapter:e,arrays:v.arrays,arraysToPush:v.arraysToPush,baseTableName:t,blocks:i,blocksToDelete:r,columnPrefix:"",data:n,fieldPrefix:"",fields:C.flattenedFields,insideArrayOrBlock:!0,locales:v.locales,numbers:o,numbersToDelete:l,parentIsLocalized:c||s.localized,parentTableName:B,path:`${d||""}${s.name}.${E}.`,relationships:u,relationshipsToAppend:[],relationshipsToDelete:h,row:v.row,selects:g,texts:m,textsToDelete:y,withinArrayOrBlockLocale:b}),i[B].push(v)})},m=({baseRow:e,data:t,numbers:i})=>{t.forEach((t,r)=>{i.push({...e,number:t,order:r+1})})};var y=o;let b=({baseRow:e,data:t,field:i,relationships:r})=>{(Array.isArray(t)?t:[t]).forEach((t,n)=>{if(t){let s={...e};"hasMany"in i&&i.hasMany&&(s.order=n+1),Array.isArray(i.relationTo)&&(0,y.valueIsValueWithRelation)(t)?(s[`${t.relationTo}ID`]=t.value,r.push(s)):"string"==typeof i.relationTo&&(s[`${i.relationTo}ID`]=t,t&&r.push(s))}})},E=({id:e,data:t,locale:i})=>{let r=[];return c(t)&&t.forEach((t,n)=>{let s={order:n+1,parent:e,value:t};i&&(s.locale=i),r.push(s)}),r},C=({baseRow:e,data:t,texts:i})=>{t.forEach((t,r)=>{i.push({...e,order:r+1,text:t})})},w=({adapter:e,arrays:t,arraysToPush:i,baseTableName:r,blocks:n,blocksToDelete:u,columnPrefix:A,data:p,enableAtomicWrites:f,existingLocales:y,fieldPrefix:I,fields:v,forcedLocale:B,insideArrayOrBlock:Q=!1,locales:x,numbers:S,numbersToDelete:k,parentIsLocalized:T,parentTableName:N,path:D,relationships:_,relationshipsToAppend:R,relationshipsToDelete:L,row:F,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:P})=>{let $=!1;F._uuid&&(p._uuid=F._uuid),v.forEach(v=>{let j,H="",q="";if((0,o.fieldIsVirtual)(v))return;void 0!==p[v.name]&&($=!0),H=`${A||""}${(0,l.default)(v.name)}`,q=`${I||""}${v.name}`,j=p[v.name];let z=(0,o.fieldShouldBeLocalized)({field:v,parentIsLocalized:T});if("array"===v.type){let s=e.tableNameMap.get(`${N}_${H}`);if(z){let a=p[v.name];"object"==typeof a&&null!==a&&Object.entries(a).forEach(([a,o])=>{let l=o,c=!1;if(o&&"object"==typeof o&&"$push"in o&&(l=o.$push,c=!0,Array.isArray(l)||(l=[l])),Array.isArray(l)){let o=h({adapter:e,arrayTableName:s,baseTableName:r,blocks:n,blocksToDelete:u,data:l,field:v,locale:a,numbers:S,numbersToDelete:k,parentIsLocalized:T||v.localized,path:D,relationships:_,relationshipsToDelete:L,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:a});c?(i[s]||(i[s]=[]),i[s]=i[s].concat(o)):(t[s]||(t[s]=[]),t[s]=t[s].concat(o))}})}else{let a=p[v.name],o=!1;"object"==typeof a&&"$push"in a&&(a=Array.isArray(a.$push)?a.$push:[a.$push],o=!0);let l=h({adapter:e,arrayTableName:s,baseTableName:r,blocks:n,blocksToDelete:u,data:a,field:v,numbers:S,numbersToDelete:k,parentIsLocalized:T||v.localized,path:D,relationships:_,relationshipsToDelete:L,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:P});o?(i[s]||(i[s]=[]),i[s]=i[s].concat(l)):(t[s]||(t[s]=[]),t[s]=t[s].concat(l))}return}if("blocks"===v.type&&!e.blocksAsJSON){(v.blockReferences??v.blocks).forEach(t=>{let i="string"==typeof t?e.payload.config.blocks.find(e=>e.slug===t):t;u.add((0,d.resolveBlockTableName)(i,e.tableNameMap.get(`${r}_blocks_${(0,l.default)(i.slug)}`)))}),z?"object"==typeof p[v.name]&&null!==p[v.name]&&Object.entries(p[v.name]).forEach(([t,i])=>{Array.isArray(i)&&g({adapter:e,baseTableName:r,blocks:n,blocksToDelete:u,data:i,field:v,locale:t,numbers:S,numbersToDelete:k,parentIsLocalized:T||v.localized,path:D,relationships:_,relationshipsToDelete:L,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:t})}):c(j)&&g({adapter:e,baseTableName:r,blocks:n,blocksToDelete:u,data:j,field:v,numbers:S,numbersToDelete:k,parentIsLocalized:T||v.localized,path:D,relationships:_,relationshipsToDelete:L,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:P});return}if("group"===v.type||"tab"===v.type){if("object"==typeof p[v.name]&&null!==p[v.name])if(z)Object.entries(p[v.name]).forEach(([s,a])=>{a._uuid=p.id||p._uuid,w({adapter:e,arrays:t,arraysToPush:i,baseTableName:r,blocks:n,blocksToDelete:u,columnPrefix:`${H}_`,data:a,enableAtomicWrites:f,existingLocales:y,fieldPrefix:`${q}_`,fields:v.flattenedFields,forcedLocale:s,insideArrayOrBlock:Q,locales:x,numbers:S,numbersToDelete:k,parentIsLocalized:T||v.localized,parentTableName:N,path:`${D||""}${v.name}.`,relationships:_,relationshipsToAppend:R,relationshipsToDelete:L,row:F,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:s})});else{let s=p[v.name];s._uuid=p.id||p._uuid,w({adapter:e,arrays:t,arraysToPush:i,baseTableName:r,blocks:n,blocksToDelete:u,columnPrefix:`${H}_`,data:s,enableAtomicWrites:f,existingLocales:y,fieldPrefix:`${q}_`,fields:v.flattenedFields,forcedLocale:B,insideArrayOrBlock:Q,locales:x,numbers:S,numbersToDelete:k,parentIsLocalized:T||v.localized,parentTableName:N,path:`${D||""}${v.name}.`,relationships:_,relationshipsToAppend:R,relationshipsToDelete:L,row:F,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:P})}return}if("relationship"===v.type||"upload"===v.type){let e=`${D||""}${v.name}`;if(j&&"object"==typeof j&&"hasMany"in v&&v.hasMany&&("$push"in j||v.localized&&Object.values(j).some(e=>e&&"object"==typeof e&&"$push"in e))){if(v.localized){let t=!1;Object.entries(j).forEach(([i,r])=>{if(r&&"object"==typeof r&&"$push"in r){t=!0;let n=r.$push;(Array.isArray(n)?n:[n]).forEach(t=>{let r={locale:i,path:e,value:t};Array.isArray(v.relationTo)&&t&&"object"==typeof t&&"relationTo"in t?(r.relationTo=t.relationTo,r.value=t.value):"string"==typeof v.relationTo&&(r.relationTo=v.relationTo,r.value=t),R.push(r)})}})}else(Array.isArray(j.$push)?j.$push:[j.$push]).forEach(t=>{let i={locale:z?P:void 0,path:e,value:t};Array.isArray(v.relationTo)&&t&&"object"==typeof t&&"relationTo"in t&&"value"in t?(i.relationTo=t.relationTo,i.value=t.value):"string"==typeof v.relationTo&&(i.relationTo=v.relationTo,i.value=t),R.push(i)});return}if(j&&"object"==typeof j&&"hasMany"in v&&v.hasMany&&("$remove"in j||v.localized&&Object.values(j).some(e=>e&&"object"==typeof e&&"$remove"in e))){if(v.localized){let t=!1;Object.entries(j).forEach(([i,r])=>{if(r&&"object"==typeof r&&"$remove"in r){t=!0;let n=r.$remove;(Array.isArray(n)?n:[n]).forEach(t=>{let r={itemToRemove:t,locale:i,path:e};"string"==typeof v.relationTo&&(r.relationTo=v.relationTo),L.push(r)})}})}else(Array.isArray(j.$remove)?j.$remove:[j.$remove]).forEach(t=>{let i={itemToRemove:t,locale:z?P:void 0,path:e};"string"==typeof v.relationTo&&(i.relationTo=v.relationTo),L.push(i)});return}if(z&&(Array.isArray(v.relationTo)||"hasMany"in v&&v.hasMany)){"object"==typeof j&&Object.entries(j).forEach(([t,i])=>{null===i?L.push({locale:t,path:e}):b({baseRow:{locale:t,path:e},data:i,field:v,relationships:_})});return}if(Array.isArray(v.relationTo)||"hasMany"in v&&v.hasMany)return null===j||Array.isArray(j)&&0===j.length?void L.push({path:e}):void b({baseRow:{locale:P,path:e},data:j,field:v,relationships:_});!z&&j&&"object"==typeof j&&"id"in j&&j?.id?j=j.id:z&&"object"==typeof j&&Object.entries(j).forEach(([e,t])=>{"object"==typeof t?t&&"id"in t&&t?.id&&(j[e]=t.id):j[e]=t})}if("text"===v.type&&v.hasMany){let e=`${D||""}${v.name}`;if(z)"object"==typeof j&&Object.entries(j).forEach(([t,i])=>{if(Array.isArray(i)){if(!i.length)return void U.push({locale:t,path:e});C({baseRow:{locale:t,path:e},data:i,texts:O})}});else if(Array.isArray(j)){if(!j.length)return void U.push({locale:P,path:e});C({baseRow:{locale:P,path:e},data:j,texts:O})}return}if("number"===v.type&&v.hasMany){let e=`${D||""}${v.name}`;if(z)"object"==typeof j&&Object.entries(j).forEach(([t,i])=>{if(Array.isArray(i)){if(!i.length)return void k.push({locale:t,path:e});m({baseRow:{locale:t,path:e},data:i,numbers:S})}});else if(Array.isArray(j)){if(!j.length)return void k.push({locale:P,path:e});m({baseRow:{locale:P,path:e},data:j,numbers:S})}return}if("select"===v.type&&v.hasMany){let t=e.tableNameMap.get(`${N}_${H}`);if(M[t]||(M[t]=[]),z)"object"==typeof p[v.name]&&null!==p[v.name]&&Object.entries(p[v.name]).forEach(([e,i])=>{if(Array.isArray(i)){let r=E({id:Q?p._uuid||p.id:void 0,data:i,locale:e});M[t]=M[t].concat(r)}});else if(Array.isArray(p[v.name])){let e=E({id:Q?p._uuid||p.id:void 0,data:p[v.name],locale:P});M[t]=M[t].concat(e)}return}let V=[];if(z)"object"==typeof j&&null!==j&&Object.entries(j).forEach(([e,t])=>{x[e]||(x[e]={}),V.push({localeKey:e,ref:x,value:t})});else{let e=F;B&&(x[B]||(x[B]={}),e=x[B]),V.push({ref:e,value:j})}V.forEach(({localeKey:t,ref:i,value:r})=>{let n=r;if("date"===v.type)if("updatedAt"===q&&null===n)return;else"updatedAt"===q&&void 0===n?n=new Date().toISOString():"number"!=typeof r||Number.isNaN(r)?r instanceof Date&&(n=r.toISOString()):n=new Date(r).toISOString();if(void 0!==r&&(r&&"point"===v.type&&"sqlite"!==e.name&&(n=s.sql`ST_GeomFromGeoJSON(${JSON.stringify(r)})`),"text"===v.type&&r&&"string"!=typeof r&&(n=JSON.stringify(r)),"number"===v.type&&r&&"object"==typeof r&&"$inc"in r&&"number"==typeof r.$inc)){if(!f)throw new a.APIError("The passed data must not contain any nested fields for atomic writes");n=s.sql.raw(`${H} + ${r.$inc}`)}void 0!==n&&(t?i[t][q]=n:i[q]=n)})}),$||Object.keys(p).forEach(s=>{if(s.includes(".")){let a=s.indexOf("."),o=s.substring(0,a),l=s.substring(a+1);p[o]||(p[o]={}),p[o][l]=p[s],delete p[s],w({adapter:e,arrays:t,arraysToPush:i,baseTableName:r,blocks:n,blocksToDelete:u,columnPrefix:A,data:p,enableAtomicWrites:f,existingLocales:y,fieldPrefix:I,fields:v,forcedLocale:B,insideArrayOrBlock:Q,locales:x,numbers:S,numbersToDelete:k,parentIsLocalized:T,parentTableName:N,path:D,relationships:_,relationshipsToAppend:R,relationshipsToDelete:L,row:F,selects:M,texts:O,textsToDelete:U,withinArrayOrBlockLocale:P})}})},I=({adapter:e,data:t,enableAtomicWrites:i,fields:r,parentIsLocalized:n,path:s="",tableName:a})=>{let o={arrays:{},arraysToPush:{},blocks:{},blocksToDelete:new Set,locales:{},numbers:[],numbersToDelete:[],relationships:[],relationshipsToAppend:[],relationshipsToDelete:[],row:{},selects:{},texts:[],textsToDelete:[]};return w({adapter:e,arrays:o.arrays,arraysToPush:o.arraysToPush,baseTableName:a,blocks:o.blocks,blocksToDelete:o.blocksToDelete,columnPrefix:"",data:t,enableAtomicWrites:i,fieldPrefix:"",fields:r,locales:o.locales,numbers:o.numbers,numbersToDelete:o.numbersToDelete,parentIsLocalized:n,parentTableName:a,path:s,relationships:o.relationships,relationshipsToAppend:o.relationshipsToAppend,relationshipsToDelete:o.relationshipsToDelete,row:o.row,selects:o.selects,texts:o.texts,textsToDelete:o.textsToDelete}),o};var v=e.i(890546),B=t;let Q=async({adapter:e,db:t,parentID:i,tableName:r})=>{let n=e.tables[r],s=[(0,B.eq)(n._parentID,i)];await e.deleteWhere({db:t,tableName:r,where:(0,B.and)(...s)})};var x=t;let S=async({adapter:e,db:t,localeColumnName:i="_locale",parentColumnName:r="_parentID",parentID:n,pathColumnName:s="_path",rows:a,tableName:o})=>{let l=new Set,c=new Set,d=e.tables[o];if(a.forEach(e=>{let t=e[s],r=e[i];"string"==typeof t&&("string"==typeof r?l.add(t):c.add(t))}),l.size>0){let i=[(0,x.eq)(d[r],n)];s&&i.push((0,x.inArray)(d[s],Array.from(l))),await e.deleteWhere({db:t,tableName:o,where:(0,x.and)(...i)})}if(c.size>0){let i=[(0,x.eq)(d[r],n)];s&&i.push((0,x.inArray)(d[s],Array.from(c))),await e.deleteWhere({db:t,tableName:o,where:(0,x.and)(...i)})}};var k=e.i(546712);let T=({id:e,adapter:t,collectionSlug:i,error:r,globalSlug:n,req:s,tableName:a})=>{let o=r;if("object"==typeof r&&null!==r&&"cause"in r&&(o=r.cause),o?.code==="23505"||o?.code==="SQLITE_CONSTRAINT_UNIQUE"){let r=null;if("23505"===o.code){if(t.fieldConstraints?.[a]?.[o.constraint])r=t.fieldConstraints[a][o.constraint];else{let e=`${a}_`;if(o.constraint?.includes(e)){let i=o.constraint.replace(e,"");i&&t.fieldConstraints[a]?.[i]&&(r=t.fieldConstraints[a][i])}}if(!r&&o.detail){let e=/Key \(([^)]+)\)=\(([^)]+)\)/,t=o.detail.match(e);t&&t[1]&&(r=t[1])}}else if("SQLITE_CONSTRAINT_UNIQUE"===o.code){let e=/UNIQUE constraint failed: ([^.]+)\.([^.]+)/,i=o.message?.match(e);i&&i[2]&&(t.fieldConstraints[a]&&(r=t.fieldConstraints[a][`${i[2]}_idx`]),r||(r=i[2]))}throw new k.ValidationError({id:e,collection:i,errors:[{message:s?.t?s.t("error:valueMustBeUnique"):"Value must be unique",path:r}],global:n,req:s},s?.t)}throw r},N=async({adapter:e,arrays:t,db:i,parentRows:r,uuidMap:n={}})=>{let s={};for(let[a,o]of(t.forEach((e,t)=>{e&&0!==Object.keys(e).length&&Object.entries(e).forEach(([e,i])=>{s[e]||(s[e]={arrays:[],locales:[],rows:[]});let n=r[t].id;i.forEach(t=>{Object.keys(t.arrays).length>0&&s[e].arrays.push(t.arrays),t.row._parentID=n,s[e].rows.push(t.row),Object.entries(t.locales).forEach(([i,r])=>{r._parentID=t.row.id,r._locale=i,s[e].locales.push(r),t.row.id||(r._getParentID=e=>{let{id:i}=e.find(e=>e._uuid===t.row._uuid);return i})})})})}),Object.entries(s))){let t;o.rows.length>0&&(t=await e.insert({db:i,tableName:a,values:o.rows})).forEach(e=>{"string"==typeof e._uuid&&("string"==typeof e.id||"number"==typeof e.id)&&(n[e._uuid]=e.id)}),e.tables[`${a}${e.localesSuffix}`]&&o.locales.length>0&&(o.locales[0]._parentID||(o.locales=o.locales.map(e=>("function"==typeof e._getParentID&&(e._parentID=e._getParentID(t),delete e._getParentID),e))),await e.insert({db:i,tableName:`${a}${e.localesSuffix}`,values:o.locales})),o.arrays.length>0&&await N({adapter:e,arrays:o.arrays,db:i,parentRows:t})}},D=({data:e,fields:t})=>{let i=!1;for(let r in e){let n=e[r],s=t.find(e=>e.name===r);if(s){if(i=!0,"blocks"===s.type||("text"===s.type||"relationship"===s.type||"upload"===s.type||"select"===s.type||"number"===s.type)&&s.hasMany||("relationship"===s.type||"upload"===s.type)&&Array.isArray(s.relationTo)||s.localized)return!1;if("array"===s.type){if("object"==typeof n&&"$push"in n&&n.$push)return D({data:Array.isArray(n.$push)?n.$push?.[0]:n.$push,fields:s.flattenedFields});return!1}if(("relationship"===s.type||"upload"===s.type)&&s.hasMany&&"object"==typeof n&&("$push"in n||"$remove"in n)||("group"===s.type||"tab"===s.type)&&n&&"object"==typeof n&&!D({data:n,fields:s.flattenedFields}))return!1}}if(!i){for(let i in e)if(i.includes(".")){let r=i.indexOf(".");return D({data:{[i.substring(0,r)]:{[i.substring(r+1)]:e[i]}},fields:t})}}return!0};e.s(["shouldUseOptimizedUpsertRow",0,D],871563);let _=async({id:e,adapter:s,collectionSlug:a,data:o,db:l,fields:c,globalSlug:d,ignoreResult:u,customID:h,joinQuery:A,operation:p,path:f="",req:g,select:m,tableName:y,upsertTarget:b,where:E})=>{"create"!==p||o.createdAt||(o.createdAt=new Date().toISOString()),(0,v.markWrite)(s);let C={id:e};if(e&&D({data:o,fields:c}))try{let i=I({adapter:s,data:o,enableAtomicWrites:!0,fields:c,tableName:y}),{row:a}=i,{arraysToPush:d}=i,h=l;d&&Object.keys(d)?.length&&await N({adapter:s,arrays:[d],db:l,parentRows:[C],uuidMap:{}}),(void 0===a.updatedAt||null===a.updatedAt)&&delete a.updatedAt;let A=a&&Object.keys(a)?.length;if(u)return A&&await h.update(s.tables[y]).set(a).where((0,t.eq)(s.tables[y].id,e)),"idOnly"===u?{id:e}:null;let p=(0,r.buildFindManyArgs)({adapter:s,depth:0,fields:c,joinQuery:!1,select:m,tableName:y}),f=Object.keys(p).length,g=Object.keys(p.columns||{}).length>0;if(!A){p.where=(0,t.eq)(s.tables[y].id,C.id);let e=await l.query[y].findFirst(p);return(0,n.transform)({adapter:s,config:s.payload.config,data:e,fields:c,joinQuery:!1,tableName:y})}if(0===f||g){let i={};if(g)for(let[e,t]of Object.entries(p.columns))t&&(i[e]=s.tables[y][e]);let r=await h.update(s.tables[y]).set(a).where((0,t.eq)(s.tables[y].id,e)).returning(Object.keys(i).length?i:void 0);return(0,n.transform)({adapter:s,config:s.payload.config,data:r[0],fields:c,joinQuery:!1,tableName:y})}await h.update(s.tables[y]).set(a).where((0,t.eq)(s.tables[y].id,e)),p.where=(0,t.eq)(s.tables[y].id,C.id);let b=await l.query[y].findFirst(p);return(0,n.transform)({adapter:s,config:s.payload.config,data:b,fields:c,joinQuery:!1,tableName:y})}catch(t){T({id:e,adapter:s,collectionSlug:a,error:t,globalSlug:d,req:g,tableName:y})}let w=I({adapter:s,data:o,enableAtomicWrites:!1,fields:c,path:f,tableName:y});h&&(w.row.id=h);try{if("update"===p){let t=b||s.tables[y].id,i=Object.keys(w.row);i.length>0&&!i.every(e=>"updatedAt"===e||"createdAt"===e)?e?(w.row.id=e,[C]=await s.insert({db:l,onConflictDoUpdate:{set:w.row,target:t},tableName:y,values:w.row})):[C]=await s.insert({db:l,onConflictDoUpdate:{set:w.row,target:t,where:E},tableName:y,values:w.row}):C={id:e}}else s.allowIDOnCreate&&o.id&&(w.row.id=o.id),[C]=await s.insert({db:l,tableName:y,values:w.row});let r=[],n=[],a=[],c=[],d={},u={};if(Object.keys(w.locales).length>0&&Object.entries(w.locales).forEach(([e,t])=>{t._parentID=C.id,t._locale=e,r.push(t)}),w.relationships.length>0&&w.relationships.forEach(e=>{e.parent=C.id,n.push(e)}),w.texts.length>0&&w.texts.forEach(e=>{e.parent=C.id,a.push(e)}),w.numbers.length>0&&w.numbers.forEach(e=>{e.parent=C.id,c.push(e)}),Object.keys(w.selects).length>0&&Object.entries(w.selects).forEach(([e,t])=>{u[e]=[],t.forEach(t=>{void 0===t.parent&&(t.parent=C.id),u[e].push(t)})}),Object.keys(w.blocks).forEach(e=>{w.blocks[e].forEach(t=>{t.row._parentID=C.id,d[e]||(d[e]=[]),t.row.uuid&&delete t.row.uuid,d[e].push(t)})}),r.length>0){let e=`${y}${s.localesSuffix}`,i=s.tables[`${y}${s.localesSuffix}`];"update"===p&&await s.deleteWhere({db:l,tableName:e,where:(0,t.eq)(i._parentID,C.id)}),await s.insert({db:l,tableName:e,values:r})}let h=`${y}${s.relationshipsSuffix}`;if("update"===p){let e=w.relationshipsToDelete.filter(e=>!("itemToRemove"in e));await S({adapter:s,db:l,localeColumnName:"locale",parentColumnName:"parent",parentID:C.id,pathColumnName:"path",rows:[...n,...e],tableName:h})}if(n.length>0&&await s.insert({db:l,tableName:h,values:n}),w.relationshipsToAppend.length>0){let r=w.relationshipsToAppend.map(t=>{let i={parent:e||C.id,path:t.path},r=s.rawTables[h];return t.locale&&r&&r.columns.locale&&(i.locale=t.locale),t.relationTo&&(i[`${t.relationTo}ID`]=t.value),i});if(r.length>0){let n=s.tables[h];if(n){if(0===r.length)return;let a=r.map(e=>{let i=[(0,t.eq)(n.parent,e.parent),(0,t.eq)(n.path,e.path)];for(let[r,s]of(void 0!==e.locale&&n.locale?i.push((0,t.eq)(n.locale,e.locale)):n.locale&&i.push((0,t.isNull)(n.locale)),Object.entries(e)))if(r.endsWith("ID")&&null!=s){let e=n[r];e&&"object"==typeof e&&i.push((0,t.eq)(e,s))}return(0,t.and)(...i)}),o=[],c=0;a.length>0&&(o=await l.select().from(n).where((0,t.or)(...a)));let d=e||C.id,u=await l.select({maxOrder:n.order}).from(n).where((0,t.eq)(n.parent,d)).orderBy((0,i.desc)(n.order)).limit(1);u.length>0&&u[0].maxOrder&&(c=u[0].maxOrder),r.forEach((e,t)=>{e.order=c+t+1});let A=r.filter(e=>!o.some(t=>{let i=t.parent===e.parent&&t.path===e.path;for(let r of(void 0!==e.locale&&(i=i&&t.locale===e.locale),Object.keys(e)))r.endsWith("ID")&&(i=i&&t[r]===e[r]);return i}));A.length>0&&await s.insert({db:l,tableName:h,values:A})}}}if(w.relationshipsToDelete.some(e=>"itemToRemove"in e)){let i=s.tables[h];if(i){for(let r of w.relationshipsToDelete)if("itemToRemove"in r&&r.itemToRemove){let n=r.itemToRemove,a=e||C.id,o=[(0,t.eq)(i.parent,a),(0,t.eq)(i.path,r.path)];if(s.rawTables[h]?.columns.locale&&(r.locale?o.push((0,t.eq)(i.locale,r.locale)):o.push((0,t.isNull)(i.locale))),"object"==typeof n&&"relationTo"in n){let e=`${n.relationTo}ID`;i[e]&&o.push((0,t.eq)(i[e],n.value))}else if(r.relationTo){let e=`${r.relationTo}ID`;i[e]&&o.push((0,t.eq)(i[e],n))}await s.deleteWhere({db:l,tableName:h,where:(0,t.and)(...o)})}}}let A=`${y}_texts`;"update"===p&&await S({adapter:s,db:l,localeColumnName:"locale",parentColumnName:"parent",parentID:C.id,pathColumnName:"path",rows:[...a,...w.textsToDelete],tableName:A}),a.length>0&&await s.insert({db:l,tableName:A,values:a});let f=`${y}_numbers`;"update"===p&&await S({adapter:s,db:l,localeColumnName:"locale",parentColumnName:"parent",parentID:C.id,pathColumnName:"path",rows:[...c,...w.numbersToDelete],tableName:f}),c.length>0&&await s.insert({db:l,tableName:f,values:c});let g={};if("update"===p)for(let e of w.blocksToDelete){let i=s.tables[e];await s.deleteWhere({db:l,tableName:e,where:(0,t.eq)(i._parentID,C.id)})}let m={};for(let[e,t]of Object.entries(d)){g[e]=await s.insert({db:l,tableName:e,values:t.map(({row:e})=>e)}),g[e].forEach((e,i)=>{t[i].row=e,"string"==typeof e._uuid&&("string"==typeof e.id||"number"==typeof e.id)&&(m[e._uuid]=e.id)});let i=[],r=t.reduce((e,t,r)=>(Object.entries(t.locales).length>0&&Object.entries(t.locales).forEach(([n,s])=>{Object.keys(s).length>0&&(s._parentID=t.row.id,s._locale=n,e.push(s),i.push(r))}),e),[]);r.length>0&&await s.insert({db:l,tableName:`${e}${s.localesSuffix}`,values:r}),await N({adapter:s,arrays:t.map(({arrays:e})=>e),db:l,parentRows:g[e],uuidMap:m})}if("update"===p)for(let e of Object.keys(w.arrays))await Q({adapter:s,db:l,parentID:C.id,tableName:e});for(let[e,i]of(await N({adapter:s,arrays:[w.arrays,w.arraysToPush],db:l,parentRows:[C,C],uuidMap:m}),Object.entries(u))){let r=s.tables[e];"update"===p&&await s.deleteWhere({db:l,tableName:e,where:(0,t.eq)(r.parent,C.id)}),Object.keys(m).length>0&&i.forEach(e=>{e.parent in m&&(e.parent=m[e.parent])}),i.length&&await s.insert({db:l,tableName:e,values:i})}}catch(t){T({id:e,adapter:s,collectionSlug:a,error:t,globalSlug:d,req:g,tableName:y})}if("idOnly"===u)return{id:C.id};if(u)return o;let B=(0,r.buildFindManyArgs)({adapter:s,depth:0,fields:c,joinQuery:!1,select:m,tableName:y});B.where=(0,t.eq)(s.tables[y].id,C.id);let x=await l.query[y].findFirst(B);return(0,n.transform)({adapter:s,config:s.payload.config,data:x,fields:c,joinQuery:!1,tableName:y})};e.s(["upsertRow",0,_],852091)},970117,e=>{"use strict";let t=(e,t)=>e.primaryDrizzle&&t===e.drizzle?e.primaryDrizzle:t;e.s(["getPrimaryDb",0,t])},965322,e=>{"use strict";var t=e.i(477426),i=e.i(852091),r=e.i(970117),n=e.i(444316);let s=async function({collection:e,customID:s,data:a,req:o,returning:l,select:c}){let d=this.payload.collections[e].config,u=this.tableNameMap.get((0,t.default)(d.slug)),h=(0,r.getPrimaryDb)(this,await (0,n.getTransaction)(this,o)),A=await (0,i.upsertRow)({adapter:this,collectionSlug:e,customID:s,data:a,db:h,fields:d.flattenedFields,ignoreResult:!1===l,operation:"create",req:o,select:c,tableName:u});return!1===l?null:A};e.s(["create",0,s])},857179,e=>{"use strict";var t=e.i(522734),i=e.i(814747);e.i(700859);var r=e.i(391033),n=e.i(201803),s=e.i(248615),a=e.i(766859),o=i,l=e.i(876474);let c=["payload.config.js","payload.config.ts"],d=()=>{let e=(0,a.getTsconfig)(),t=e.config,i=o.default.dirname(e.path);try{let r=o.default.resolve(i,t.compilerOptions.baseUrl||""),n=t.compilerOptions?.rootDir||o.default.resolve(process.cwd(),"src"),s=t.compilerOptions?.outDir||o.default.resolve(process.cwd(),"dist"),a=t.compilerOptions?.paths?.["@payload-config"]?.[0];return a&&(a=o.default.resolve(r,a)),{configPath:a,outPath:s,rootPath:r,srcPath:n,tsConfigPath:e.path}}catch(e){return console.error(`Error parsing tsconfig.json: ${e}`),{rootPath:process.cwd()}}},u=()=>{if(process.env.PAYLOAD_CONFIG_PATH)return o.default.isAbsolute(process.env.PAYLOAD_CONFIG_PATH)?process.env.PAYLOAD_CONFIG_PATH:o.default.resolve(process.cwd(),process.env.PAYLOAD_CONFIG_PATH);let{configPath:e,outPath:t,rootPath:i,srcPath:r}=d();if(e&&(".js"===o.default.extname(e)||".ts"===o.default.extname(e)))return e;for(let n of[e,t,r,i]){if(!n)continue;let e=(0,l.findUpSync)({dir:n,fileNames:c});if(e)return e}{let e=(0,l.findUpSync)({dir:o.default.resolve(process.cwd(),"dist"),fileNames:["payload.config.js"]});if(e)return e}throw Error('Error: cannot find Payload config. Please create a configuration file located at the root of your current working directory called "payload.config.js" or "payload.config.ts".')};var h=e.i(186725),A=e.i(444316);let p=100,f=".payload-blocks-migration",g=(e,r,n)=>{let s=i.default.join(r,`entities-batch-${n}.json`);(0,t.writeFileSync)(s,JSON.stringify(e,null,2),"utf-8")},m=async(e,{silenceLogs:t=!1}={})=>{let i=process.stdout.write;t&&(process.stdout.write=()=>!0);let r=e(),n=setInterval(()=>process.stdin.emit("keypress","\n",{name:"return",ctrl:!1}),25),s=await r;return t&&(process.stdout.write=i),clearInterval(n),s},y=e=>{for(let t of e.flattenedFields)if("blocks"===t.type||"flattenedFields"in t&&y({flattenedFields:t.flattenedFields}))return!0;return!1},b=({config:e,data:t,fields:i,parentAccessor:r,parentIsLocalized:n})=>{let s=[];for(let a of i)switch(a.type){case"array":{let i=t[a.name];if(!Array.isArray(i))continue;if(e.localization&&(0,h.fieldShouldBeLocalized)({field:a,parentIsLocalized:n})){s.push(...b({config:e,data:i,fields:e.localization.localeCodes.map(e=>({...a,name:e,localized:!1})),parentAccessor:[...r,a.name],parentIsLocalized:!0}));continue}for(let[t,o]of i.entries())s.push(...b({config:e,data:o,fields:a.flattenedFields,parentAccessor:[...r,a.name,t],parentIsLocalized:n}));break}case"blocks":s.push({data:t[a.name],fieldAccessor:[...r,a.name]});break;case"group":case"tab":if(e.localization&&(0,h.fieldShouldBeLocalized)({field:a,parentIsLocalized:n})){s.push(...b({config:e,data:t[a.name],fields:e.localization.localeCodes.map(e=>({...a,name:e,localized:!1})),parentAccessor:[...r,a.name],parentIsLocalized:!0}));continue}s.push(...b({config:e,data:t[a.name],fields:a.flattenedFields,parentAccessor:[...r,a.name],parentIsLocalized:n}));break;default:continue}return s};class E{adapter;sanitizeStatements;executeMethod;batchSize;tempFolderPath;constructor(e,t,r,n){this.adapter=e,this.sanitizeStatements=t,this.executeMethod=r,this.batchSize=n||p,this.tempFolderPath=i.default.resolve(this.adapter.migrationDir,f)}ensureTempFolder(){(0,t.existsSync)(this.tempFolderPath)||(0,t.mkdirSync)(this.tempFolderPath,{recursive:!0})}*fetchEntitiesFromJsonBatches(){if((0,t.existsSync)(this.tempFolderPath))for(let e of(0,t.readdirSync)(this.tempFolderPath).filter(e=>e.startsWith("entities-batch-")&&e.endsWith(".json")).sort((e,t)=>parseInt(e.match(/\d+/)?.[0]||"0",10)-parseInt(t.match(/\d+/)?.[0]||"0",10))){let r=i.default.join(this.tempFolderPath,e),n=JSON.parse((0,t.readFileSync)(r,"utf-8"));yield n}}async migrateEntities(e,t){this.adapter.blocksAsJSON=!0,this.resetSchema(),await this.adapter.init(),await this.adapter.connect(),await this.syncTransactionDrizzleInstance(t);let i=e.length,r=0;for(let n of e){switch(n.type){case"collection":await this.adapter.updateOne({collection:n.slug,data:n.originalData,joins:!1,req:t,where:{id:{equals:n.id}}});break;case"collectionVersion":await this.adapter.updateVersion({id:n.id,collection:n.slug,req:t,versionData:n.originalData});break;case"global":await this.adapter.updateGlobal({slug:n.slug,data:n.originalData,req:t});break;case"globalVersion":await this.adapter.updateGlobalVersion({id:n.id,global:n.slug,req:t,versionData:n.originalData})}(++r%this.batchSize==0||r===i)&&this.adapter.payload.logger.info(`Migrated ${r}/${i} entities (${Math.round(r/i*100)}%)`)}}resetSchema(){this.adapter.schema={},this.adapter.tables={},this.adapter.indexes=new Set,this.adapter.foreignKeys=new Set,this.adapter.relations={},this.adapter.rawTables={},this.adapter.rawRelations={},this.adapter.tableNameMap=new Map,this.adapter.enums={}}async syncTransactionDrizzleInstance(e){let t=await (0,A.getTransaction)(this.adapter,e);t._=this.adapter.drizzle._,t.schema=this.adapter.drizzle._,t.session.schema=this.adapter.drizzle.session.schema}cleanupTempFolder(){(0,t.rmSync)(this.tempFolderPath,{force:!0,recursive:!0}),this.adapter.payload.logger.info(`Cleaned up temp folder at ${this.tempFolderPath}`)}async collectAndSaveEntitiesToBatches(e,t){let i=t?.batchSize??this.batchSize;this.cleanupTempFolder(),this.ensureTempFolder(),this.adapter.blocksAsJSON=!1,this.resetSchema(),await this.adapter.init(),await this.adapter.connect();let s=0;for(let e of this.adapter.payload.config.collections.filter(y)){let{totalDocs:t}=await this.adapter.count({collection:e.slug});if(s+=t,e.versions){let{totalDocs:t}=await this.adapter.countVersions({collection:e.slug});s+=t}}for(let e of this.adapter.payload.config.globals.filter(y))if(s+=1,e.versions){let{totalDocs:t}=await this.adapter.countGlobalVersions({global:e.slug});s+=t}this.adapter.payload.logger.info(`Found ${s} total entities to collect and save to batches`);let a=0,o=[],l=0,c=()=>{if(o.length>0){g(o,this.tempFolderPath,a);let e=s>0?Math.round(l/s*100):0;this.adapter.payload.logger.info(`Saved batch ${a} with ${o.length} entities (${l}/${s} - ${e}%)`),a++,o=[]}},d=e=>{o.push(e),l++,o.length>=i&&c()};for(let e of this.adapter.payload.config.collections.filter(y)){let t=1,n=!0;for(;n;){let{docs:r,hasNextPage:s}=await this.adapter.find({collection:e.slug,limit:i,page:t});for(let t of r)d({id:t.id,slug:e.slug,type:"collection",blocks:b({config:this.adapter.payload.config,data:t,fields:e.flattenedFields,parentAccessor:[],parentIsLocalized:!1}),originalData:t});this.adapter.payload.logger.info(`Collected ${r.length} entries from ${e.slug} (page ${t})`),n=s,t++}if(e.versions){let t=1,n=!0;for(;n;){let{docs:s,hasNextPage:a}=await this.adapter.findVersions({collection:e.slug,limit:i,page:t});for(let t of s)d({id:t.id,slug:e.slug,type:"collectionVersion",blocks:b({config:this.adapter.payload.config,data:t,fields:(0,r.buildVersionCollectionFields)(this.adapter.payload.config,e,!0),parentAccessor:[],parentIsLocalized:!1}),originalData:t});this.adapter.payload.logger.info(`Collected ${s.length} versions from ${e.slug} (page ${t})`),n=a,t++}}}for(let e of this.adapter.payload.config.globals.filter(y)){let t=await this.adapter.findGlobal({slug:e.slug});if(d({slug:e.slug,type:"global",blocks:b({config:this.adapter.payload.config,data:t,fields:e.flattenedFields,parentAccessor:[],parentIsLocalized:!1}),originalData:t}),this.adapter.payload.logger.info(`Collected global ${e.slug}`),e.versions){let t=1,r=!0;for(;r;){let{docs:s,hasNextPage:a}=await this.adapter.findGlobalVersions({global:e.slug,limit:i,page:t});for(let t of s)d({id:t.id,slug:e.slug,type:"globalVersion",blocks:b({config:this.adapter.payload.config,data:t,fields:(0,n.buildVersionGlobalFields)(this.adapter.payload.config,e,!0),parentAccessor:[],parentIsLocalized:!1}),originalData:t});this.adapter.payload.logger.info(`Collected ${s.length} versions from global ${e.slug} (page ${t})`),r=a,t++}}}c(),this.adapter.payload.logger.info(`Collected total of ${l} entities across ${a} batches`)}async getMigrationStatements(){let{generateDrizzleJson:e,generateMigration:i}=this.adapter.requireDrizzleKit(),r=await e(this.adapter.schema);this.adapter.blocksAsJSON=!0,this.resetSchema(),await this.adapter.init();let n=await e(this.adapter.schema);this.adapter.blocksAsJSON=!1,this.resetSchema(),await this.adapter.init();let s=await m(()=>i(r,n),{silenceLogs:!0}),a=`await db.${this.executeMethod}(sql\``;return{statements:this.sanitizeStatements({sqlExecute:a,statements:s}),writeDrizzleSnapshot(e){(0,t.writeFileSync)(`${e}.json`,JSON.stringify(n,null,2))}}}async migrateEntitiesFromTempFolder(e,t){let i=t?.clearBatches??!0,r=0,n=!1;for(let t of this.fetchEntitiesFromJsonBatches())n=!0,r+=t.length,this.adapter.payload.logger.info(`Migrating batch with ${t.length} entities (total: ${r})`),await this.migrateEntities(t,e);n?(this.adapter.payload.logger.info(`Completed migration of ${r} entities from temp folder`),i?this.cleanupTempFolder():this.adapter.payload.logger.info(`Temp folder preserved at ${this.tempFolderPath} (clearBatches: false)`)):this.adapter.payload.logger.warn("No entities found in temp folder to migrate")}setTempFolder(e){this.tempFolderPath=e}async updatePayloadConfigFile(){let e;try{e=u()}catch{this.adapter.payload.logger.info('updatePayloadConfigFile failed - could not find the payload config. Please set the blocksAsJSON DB adapter property manually to "true"');return}let i=(0,t.readFileSync)(e,"utf-8"),r=await (0,s.dynamicImport)("typescript"),n=r.createSourceFile(e,i,r.ScriptTarget.ESNext),a=!1,o=r.transform(n,[e=>t=>{let i=e.factory,n=t=>{if(r.isPropertyAssignment(t)&&r.isIdentifier(t.name)&&"db"===t.name.text&&r.isCallExpression(t.initializer)&&t.initializer.arguments.length>0&&r.isObjectLiteralExpression(t.initializer.arguments[0])){let e=t.initializer,n=t.initializer.arguments[0],s=n.properties.filter(e=>!r.isPropertyAssignment(e)||!(r.isIdentifier(e.name)&&"blocksAsJSON"===e.name.text)),o=i.createPropertyAssignment("blocksAsJSON",i.createTrue());a=!0;let l=i.updateObjectLiteralExpression(n,[...s,o]),c=i.updateCallExpression(e,e.expression,e.typeArguments,[l]);return i.updatePropertyAssignment(t,t.name,c)}return r.visitEachChild(t,n,e)};return r.visitNode(t,n)}]);if(!a)return void this.adapter.payload.logger.info("No changes made to payload config. Set blocksAsJSON to true manually.");let l=r.createPrinter({newLine:r.NewLineKind.LineFeed}).printFile(o.transformed[0]);try{let e=await (0,s.dynamicImport)("prettier"),t=await e.resolveConfigFile(),i=t?await e.resolveConfig(t):{};l=await e.format(l,{...i,parser:"typescript"})}catch(e){this.adapter.payload.logger.error({err:e,msg:"Could not format payload config with Prettier"})}(0,t.writeFileSync)(e,l,"utf-8"),this.adapter.payload.logger.info(`Updated ${e} with blocksAsJSON: true`)}}let C=({adapter:e,executeMethod:t,sanitizeStatements:i})=>new E(e,i,t);e.s(["createBlocksToJsonMigrator",0,C],857179)},918432,e=>{"use strict";var t=e.i(477426),i=e.i(852091),r=e.i(444316);async function n({slug:e,data:n,req:s,returning:a}){let o=this.payload.globals.config.find(t=>t.slug===e),l=this.tableNameMap.get((0,t.default)(o.slug));n.createdAt=new Date().toISOString();let c=await (0,r.getTransaction)(this,s),d=await (0,i.upsertRow)({adapter:this,data:n,db:c,fields:o.flattenedFields,globalSlug:e,ignoreResult:!1===a,operation:"create",req:s,tableName:l});return!1===a?null:(d.globalType=e,d)}e.s(["createGlobal",()=>n])},128598,e=>{"use strict";var t=e.i(65054),i=e.i(201803),r=e.i(974605),n=e.i(477426),s=e.i(852091),a=e.i(444316);async function o({autosave:e,createdAt:o,globalSlug:l,publishedLocale:c,req:d,returning:u,select:h,snapshot:A,updatedAt:p,versionData:f}){let g=this.payload.globals.config.find(({slug:e})=>e===l),m=this.tableNameMap.get(`_${(0,n.default)(g.slug)}${this.versionsSuffix}`),y=await (0,a.getTransaction)(this,d),b=await (0,s.upsertRow)({adapter:this,data:{autosave:e,createdAt:o,latest:!0,publishedLocale:c,snapshot:A,updatedAt:p,version:f},db:y,fields:(0,i.buildVersionGlobalFields)(this.payload.config,g,!0),globalSlug:l,ignoreResult:!1===u&&"idOnly",operation:"create",req:d,select:h,tableName:m}),E=this.tables[m];return((0,r.hasDraftsEnabled)(g)&&await this.execute({db:y,sql:t.sql`
|
||
UPDATE ${E}
|
||
SET latest = false
|
||
WHERE ${E.id} != ${b.id};
|
||
`}),!1===u)?null:b}e.s(["createGlobalVersion",()=>o])},113739,__turbopack_context__=>{"use strict";var __TURBOPACK__imported__module__522734__=__turbopack_context__.i(522734),__TURBOPACK__imported__module__924868__=__turbopack_context__.i(924868),__TURBOPACK__imported__module__814747__=__turbopack_context__.i(814747);let sanitizeObjectKey=e=>/^[a-z_$][\w$]*$/i.test(e)?e:`'${e}'`,accessProperty=(e,t)=>{let i=sanitizeObjectKey(t);return i.startsWith("'")?`${e}[${i}]`:`${e}.${t}`},createSchemaGenerator=({columnToCodeConverter,corePackageSuffix,defaultOutputFile,enumImport,schemaImport,tableImport})=>async function generateSchema({log=!0,outputFile=defaultOutputFile,prettify=!0}={}){let importDeclarations={},tableDeclarations=[],enumDeclarations=[],relationsDeclarations=[],addImport=(e,t)=>{importDeclarations[e]||(importDeclarations[e]=new Set),importDeclarations[e].add(t)},corePackage=`${this.packageName}/drizzle/${corePackageSuffix}`,schemaDeclaration=null;this.schemaName&&(addImport(corePackage,schemaImport),schemaDeclaration=`export const db_schema = ${schemaImport}('${this.schemaName}')`);let enumFn=this.schemaName?"db_schema.enum":enumImport,enumsList=[],addEnum=(e,t)=>{enumsList.some(t=>t===e)||(enumsList.push(e),enumDeclarations.push(`export const ${e} = ${enumFn}('${e}', [${t.map(e=>`'${e}'`).join(", ")}])`))};this.payload.config.localization&&enumImport&&addEnum("enum__locales",this.payload.config.localization.localeCodes);let tableFn=this.schemaName?"db_schema.table":tableImport;this.schemaName||addImport(corePackage,tableImport),addImport(corePackage,"index"),addImport(corePackage,"uniqueIndex"),addImport(corePackage,"foreignKey"),addImport(`${this.packageName}/drizzle`,"sql"),addImport(`${this.packageName}/drizzle`,"relations");let fkGraph={};for(let tableName in this.rawTables){fkGraph[tableName]=new Set;let table=this.rawTables[tableName];for(let colKey in table.columns){let col=table.columns[colKey];col.reference&&col.reference.table!==tableName&&fkGraph[tableName].add(col.reference.table)}}let canReach=(e,t,i)=>{if(e===t)return!0;if(i.has(e))return!1;for(let r of(i.add(e),fkGraph[e]??[]))if(canReach(r,t,i))return!0;return!1},circularEdges=new Set;for(let tableA in fkGraph)for(let tableB of fkGraph[tableA])canReach(tableB,tableA,new Set)&&circularEdges.add(`${tableA}:${tableB}`);for(let tableName in this.rawTables){let table=this.rawTables[tableName],extrasDeclarations=[];if(table.indexes)for(let key in table.indexes){let index=table.indexes[key],indexDeclaration=`${index.unique?"uniqueIndex":"index"}('${index.name}')`;indexDeclaration+=`.on(${"string"==typeof index.on?`${accessProperty("columns",index.on)}`:`${index.on.map(e=>`${accessProperty("columns",e)}`).join(", ")}`}),`,extrasDeclarations.push(indexDeclaration)}if(table.foreignKeys)for(let key in table.foreignKeys){let foreignKey=table.foreignKeys[key],foreignKeyDeclaration=`foreignKey({
|
||
columns: [${foreignKey.columns.map(e=>`columns['${e}']`).join(", ")}],
|
||
foreignColumns: [${foreignKey.foreignColumns.map(e=>`${accessProperty(e.table,e.name)}`).join(", ")}],
|
||
name: '${foreignKey.name}'
|
||
})`;foreignKey.onDelete&&(foreignKeyDeclaration+=`.onDelete('${foreignKey.onDelete}')`),foreignKey.onUpdate&&(foreignKeyDeclaration+=`.onUpdate('${foreignKey.onDelete}')`),foreignKeyDeclaration+=",",extrasDeclarations.push(foreignKeyDeclaration)}let tableCode=`
|
||
export const ${tableName} = ${tableFn}('${tableName}', {
|
||
${Object.entries(table.columns).map(([e,t])=>` ${sanitizeObjectKey(e)}: ${columnToCodeConverter({adapter:this,addEnum,addImport,circularEdges,column:t,locales:this.payload.config.localization?this.payload.config.localization.localeCodes:void 0,tableKey:tableName})},`).join("\n")}
|
||
}${extrasDeclarations.length?`, (columns) => [
|
||
${extrasDeclarations.join(" ")}
|
||
]`:""}
|
||
)
|
||
`;tableDeclarations.push(tableCode)}for(let tableName in this.rawRelations){let relations=this.rawRelations[tableName],properties=[];for(let key in relations){let declaration,relation=relations[key];declaration="one"===relation.type?`${sanitizeObjectKey(key)}: one(${relation.to}, {
|
||
${relation.fields.some(e=>e.table!==tableName)?"// @ts-expect-error Drizzle TypeScript bug for ONE relationships with a field in different table":""}
|
||
fields: [${relation.fields.map(e=>`${accessProperty(e.table,e.name)}`).join(", ")}],
|
||
references: [${relation.references.map(e=>`${accessProperty(relation.to,e)}`).join(", ")}],
|
||
${relation.relationName?`relationName: '${relation.relationName}',`:""}
|
||
}),`:`${sanitizeObjectKey(key)}: many(${relation.to}, {
|
||
${relation.relationName?`relationName: '${relation.relationName}',`:""}
|
||
}),`,properties.push(declaration)}let args=[];Object.values(relations).some(e=>"one"===e.type)&&args.push("one"),Object.values(relations).some(e=>"many"===e.type)&&args.push("many");let arg=args.length?`{ ${args.join(", ")} }`:"",declaration=`export const relations_${tableName} = relations(${tableName}, (${arg}) => ({
|
||
${properties.join("\n ")}
|
||
}))`;relationsDeclarations.push(declaration)}enumDeclarations.length&&!this.schemaName&&addImport(corePackage,enumImport);let importDeclarationsSanitized=[];for(let moduleName in importDeclarations){let moduleImports=importDeclarations[moduleName];importDeclarationsSanitized.push(`import { ${Array.from(moduleImports).join(", ")} } from '${moduleName}'`)}let schemaType=`
|
||
type DatabaseSchema = {
|
||
${[this.schemaName?"db_schema":null,...enumsList,...Object.keys(this.rawTables),...Object.keys(this.rawRelations).map(e=>`relations_${e}`)].filter(Boolean).map(e=>`${e}: typeof ${e}`).join("\n ")}
|
||
}
|
||
`,finalDeclaration=`
|
||
declare module '${this.packageName}' {
|
||
export interface GeneratedDatabaseSchema {
|
||
schema: DatabaseSchema
|
||
}
|
||
}
|
||
`,warning=`
|
||
/* tslint:disable */
|
||
/* eslint-disable */
|
||
/**
|
||
* This file was automatically generated by Payload.
|
||
* DO NOT MODIFY IT BY HAND. Instead, modify your source Payload config,
|
||
* and re-run \`payload generate:db-schema\` to regenerate this file.
|
||
*/
|
||
`,importTypes=`import type {} from '${this.packageName}'`,code=[warning,importTypes,...importDeclarationsSanitized,schemaDeclaration,...enumDeclarations,...tableDeclarations,...relationsDeclarations,schemaType,finalDeclaration].filter(Boolean).join("\n");if(!outputFile){let cwd=process.cwd(),srcDir=__TURBOPACK__imported__module__814747__.default.resolve(cwd,"src");outputFile=(0,__TURBOPACK__imported__module__522734__.existsSync)(srcDir)?__TURBOPACK__imported__module__814747__.default.resolve(srcDir,"payload-generated-schema.ts"):__TURBOPACK__imported__module__814747__.default.resolve(cwd,"payload-generated-schema.ts")}if(prettify)try{let prettier=await eval('import("prettier")'),configPath=await prettier.resolveConfigFile(),config=configPath?await prettier.resolveConfig(configPath):{};code=await prettier.format(code,{...config,parser:"typescript"})}catch{}await (0,__TURBOPACK__imported__module__924868__.writeFile)(outputFile,code,"utf-8"),log&&this.payload.logger.info(`Written ${outputFile}`)};__turbopack_context__.s(["createSchemaGenerator",0,createSchemaGenerator])},230553,e=>{"use strict";var t=e.i(65054),i=e.i(391033),r=e.i(974605),n=e.i(477426),s=e.i(852091),a=e.i(444316);async function o({autosave:e,collectionSlug:o,createdAt:l,parent:c,publishedLocale:d,req:u,returning:h,select:A,snapshot:p,updatedAt:f,versionData:g}){let m=this.payload.collections[o].config;m.versions.drafts&&"object"==typeof A&&(A.updatedAt=!0);let y=(0,n.default)(m.slug),b=this.tableNameMap.get(`_${y}${this.versionsSuffix}`),E={...g};E.id&&delete E.id;let C={autosave:e,createdAt:l,latest:!0,parent:c,publishedLocale:d,snapshot:p,updatedAt:f,version:E},w=await (0,a.getTransaction)(this,u),I=await (0,s.upsertRow)({adapter:this,collectionSlug:o,data:C,db:w,fields:(0,i.buildVersionCollectionFields)(this.payload.config,m,!0),ignoreResult:!1===h?"idOnly":void 0,operation:"create",req:u,select:A,tableName:b}),v=this.tables[b];return((0,r.hasDraftsEnabled)(m)&&await this.execute({db:w,sql:t.sql`
|
||
UPDATE ${v}
|
||
SET latest = false
|
||
WHERE ${v.id} != ${I.id}
|
||
AND ${v.parent} = ${c}
|
||
AND ${v.updatedAt} < ${I.updatedAt||f}
|
||
`}),!1===h)?null:I}e.s(["createVersion",()=>o])},499504,e=>{"use strict";let t=({adapter:e,db:t,forceRun:i,hasAggregates:r,joins:n,query:s=({query:e})=>e,selectFields:a,tableName:o,where:l})=>{if(i||Object.keys(n).length>0){let i,c=e.tables[o],d=r?t.select:t.selectDistinct;return i=(d=d.bind(t))(a).from(c).$dynamic(),l&&(i=i.where(l)),n.forEach(({type:e,condition:t,table:r})=>{i=i[e??"leftJoin"](r,t)}),r&&"_selected"in a&&(i=i.groupBy(a._selected)),s({query:i})}};e.s(["selectDistinct",0,t])},8080,e=>{"use strict";var t=e.i(878719),i=e.i(226836),r=e.i(501040),n=e.i(326421),s=e.i(499504),a=e.i(276092),o=e.i(154136),l=e.i(444316),c=e.i(699409);let d=async function({adapter:e,collectionSlug:d,draftsEnabled:u,fields:h,joins:A,limit:p,locale:f,page:g=1,pagination:m,req:y,select:b,sort:E,tableName:C,versions:w,where:I}){let v,B,Q,x,S,k,T,N=p,D=(g-1)*N;0===N&&(m=!1,N=void 0);let{joins:_,orderBy:R,selectFields:L,where:F}=(0,n.buildQuery)({adapter:e,fields:h,locale:f,sort:E,tableName:C,where:I}),M={},O=(0,c.buildFindManyArgs)({adapter:e,collectionSlug:d,depth:0,draftsEnabled:u,fields:h,joinQuery:A,joins:_,locale:f,select:b,tableName:C,versions:w});if(R)for(let e in L){let t=L[e];t&&!t.primary&&(R.some(e=>e.column.name===t.name&&(0,o.getNameFromDrizzleTable)(e.column.table)===(0,o.getNameFromDrizzleTable)(t.table))||delete L[e])}let U=await (0,l.getTransaction)(e,y),P=new Set(_.filter(e=>e.isOneToMany).map(e=>(0,o.getNameFromDrizzleTable)(e.table)));if(P.size>0&&R?.some(({column:e})=>P.has((0,o.getNameFromDrizzleTable)(e.table)))){let i=e.tables[C],n=U.select({id:i.id}).from(i).$dynamic();F&&(n=n.where(F)),_.forEach(({type:e,condition:t,table:i})=>{n=n[e??"leftJoin"](i,t)}),n=(n=n.groupBy(i.id)).orderBy(()=>R.map(({column:e,order:i})=>P.has((0,o.getNameFromDrizzleTable)(e.table))?i===t.asc?(0,t.asc)((0,r.min)(e)):(0,t.desc)((0,r.max)(e)):i(e))),T=await n.offset(D).limit(N)}else T=await (0,s.selectDistinct)({adapter:e,db:U,joins:_,query:({query:e})=>(R&&(e=e.orderBy(()=>R.map(({column:e,order:t})=>t(e)))),e.offset(D).limit(N)),selectFields:L,tableName:C,where:F});if(T)if(0===T.length)return{docs:[],hasNextPage:!1,hasPrevPage:!1,limit:N,nextPage:null,page:1,pagingCounter:0,prevPage:null,totalDocs:0,totalPages:0};else T.forEach(({id:e},t)=>{M[e]=t}),k=Object.keys(M),O.where=(0,i.inArray)(e.tables[C].id,k);else O.limit=N,O.offset=D,O.orderBy=()=>R.map(({column:e,order:t})=>t(e)),F&&(O.where=F);let $=U.query[C].findMany(O);!1!==m&&(!k||k?.length<=N)&&(v=await e.countDistinct({db:U,joins:_,tableName:C,where:F}),B="number"==typeof N&&0!==N?Math.ceil(v/N):1,Q=g>1,x=B>g,S=(g-1)*N+1);let j=await $;return Object.keys(M).length>0&&j.sort((e,t)=>M[e.id]-M[t.id]),!1!==m&&v||(v=j.length,B=1,S=1,Q=!1,x=!1),{docs:j.map(t=>(0,a.transform)({adapter:e,config:e.payload.config,data:t,fields:h,joinQuery:A,tableName:C})),hasNextPage:x,hasPrevPage:Q,limit:p,nextPage:x?g+1:null,page:g,pagingCounter:S,prevPage:Q?g-1:null,totalDocs:v,totalPages:B}};e.s(["findMany",0,d])},154910,e=>{"use strict";var t=e.i(226836),i=e.i(477426),r=e.i(8080),n=e.i(326421),s=e.i(444316),a=e.i(890546);let o=async function({collection:e,req:o,where:l}){let c=this.payload.collections[e].config,d=this.tableNameMap.get((0,i.default)(c.slug)),u=this.tables[d],{joins:h,where:A}=(0,n.buildQuery)({adapter:this,fields:c.flattenedFields,locale:o?.locale,tableName:d,where:l}),p=A;if(h?.length){let e=await (0,r.findMany)({adapter:this,fields:c.flattenedFields,joins:!1,limit:0,locale:o?.locale,page:1,pagination:!1,req:o,select:{id:!0},tableName:d,where:l});p=(0,t.inArray)(u.id,e.docs.map(e=>e.id))}let f=await (0,s.getTransaction)(this,o);await this.deleteWhere({db:f,tableName:d,where:p}),(0,a.markWrite)(this)};e.s(["deleteMany",0,o])},285759,e=>{"use strict";var t=e.i(226836),i=e.i(477426),r=e.i(699409),n=e.i(326421),s=e.i(499504),a=e.i(276092),o=e.i(444316),l=e.i(890546);let c=async function({collection:e,req:c,returning:d,select:u,where:h}){let A,p=this.payload.collections[e].config,f=this.tableNameMap.get((0,i.default)(p.slug)),{joins:g,selectFields:m,where:y}=(0,n.buildQuery)({adapter:this,fields:p.flattenedFields,locale:c?.locale,tableName:f,where:h}),b=await (0,o.getTransaction)(this,c),E=await (0,s.selectDistinct)({adapter:this,db:b,joins:g,query:({query:e})=>e.limit(1),selectFields:m,tableName:f,where:y});if(E?.[0]?.id)A=await b.query[f].findFirst({where:(0,t.eq)(this.tables[f].id,E[0].id)});else{let e=(0,r.buildFindManyArgs)({adapter:this,depth:0,fields:p.flattenedFields,joinQuery:!1,select:u,tableName:f});e.where=y,A=await b.query[f].findFirst(e)}if(!A)return null;let C=!1===d?null:(0,a.transform)({adapter:this,config:this.payload.config,data:A,fields:p.flattenedFields,joinQuery:!1,tableName:f});return await this.deleteWhere({db:b,tableName:f,where:(0,t.eq)(this.tables[f].id,A.id)}),(0,l.markWrite)(this),C};e.s(["deleteOne",0,c])},927804,e=>{"use strict";var t=e.i(226836),i=e.i(700859),r=e.i(391033),n=e.i(201803),s=e.i(477426),a=e.i(8080),o=e.i(444316),l=e.i(890546);let c=async function({collection:e,globalSlug:c,locale:d,req:u,where:h}){let A,p;if(c){let e=this.payload.globals.config.find(({slug:e})=>e===c);A=this.tableNameMap.get(`_${(0,s.default)(c)}${this.versionsSuffix}`),p=(0,n.buildVersionGlobalFields)(this.payload.config,e,!0)}else if(e){let t=this.payload.collections[e].config;A=this.tableNameMap.get(`_${(0,s.default)(t.slug)}${this.versionsSuffix}`),p=(0,r.buildVersionCollectionFields)(this.payload.config,t,!0)}else throw new i.APIError("Either collection or globalSlug must be passed.");let{docs:f}=await (0,a.findMany)({adapter:this,fields:p,joins:!1,limit:0,locale:d,page:1,pagination:!1,req:u,tableName:A,where:h}),g=[];if(f.forEach(e=>{g.push(e.id)}),g.length>0){let e=await (0,o.getTransaction)(this,u);await this.deleteWhere({db:e,tableName:A,where:(0,t.inArray)(this.tables[A].id,g)}),(0,l.markWrite)(this)}return f};e.s(["deleteVersions",0,c])},612847,e=>{"use strict";let t=async function(){this.enums&&(this.enums={}),this.schema={},this.tables={},this.relations={},this.fieldConstraints={},this.drizzle=void 0,this.initializing=new Promise((e,t)=>{this.resolveInitializing=e,this.rejectInitializing=t})};e.s(["destroy",0,t])},453055,e=>{"use strict";var t=e.i(477426),i=e.i(8080);let r=async function({collection:e,draftsEnabled:r,joins:n,limit:s,locale:a,page:o=1,pagination:l,req:c,select:d,sort:u,where:h}){let A=this.payload.collections[e].config,p=null!=u?u:A.defaultSort,f=this.tableNameMap.get((0,t.default)(A.slug));return(0,i.findMany)({adapter:this,collectionSlug:A.slug,draftsEnabled:r,fields:A.flattenedFields,joins:n,limit:s,locale:a,page:o,pagination:l,req:c,select:d,sort:p,tableName:f,where:h})};e.s(["find",0,r])},656456,e=>{"use strict";var t=e.i(501040),i=e.i(65054),r=e.i(783334),n=e.i(477426),s=e.i(326421),a=e.i(499504),o=e.i(444316),l=e.i(59489);let c=(e,i,r)=>0===e.length||e[0].column===i._selected?null:r.length>0?e[0].column:(0,t.max)(e[0]?.column).as("_order"),d=async function(e){let t=this.payload.collections[e.collection].config,d=e.page||1,u=e.limit?(d-1)*e.limit:void 0,h=this.tableNameMap.get((0,n.default)(t.slug)),{joins:A,orderBy:p,selectFields:f,where:g}=(0,s.buildQuery)({adapter:this,fields:t.flattenedFields,locale:e.locale,sort:e.sort??e.field,tableName:h,where:{and:[e.where??{},{[e.field]:{equals:l.DistinctSymbol}}]}});p.pop();let m=await (0,o.getTransaction)(this,e.req),y=c(p,f,A),b=await (0,a.selectDistinct)({adapter:this,db:m,forceRun:!0,hasAggregates:!!y&&!A.length,joins:A,query:({query:t})=>(t=y&&p.length>0&&!A.length?t.orderBy(p[0].order(i.sql`_order`)):t.orderBy(()=>p.map(({column:e,order:t})=>t(e))),e.limit&&(u&&(t=t.offset(u)),t=t.limit(e.limit)),t),selectFields:{_selected:f._selected,...y?{_order:y}:{}},tableName:h,where:g}),E=(0,r.getFieldByPath)({config:this.payload.config,fields:t.flattenedFields,includeRelationships:!0,path:e.field})?.field;if(E&&"relationTo"in E&&Array.isArray(E.relationTo))for(let e of b){let t=JSON.parse(e._selected),i=Object.keys(t).find(e=>!!t[e]),r=t[i];r?e._selected={relationTo:i,value:r}:e._selected=null}let C=b.map(t=>({[e.field]:t._selected}));if(e.limit){let t=await this.countDistinct({column:f._selected,db:m,joins:A,tableName:h,where:g}),i=Math.ceil(t/e.limit),r=d>1,n=i>d,s=(d-1)*e.limit+1;return{hasNextPage:n,hasPrevPage:r,limit:e.limit,nextPage:n?d+1:null,page:d,pagingCounter:s,prevPage:r?d-1:null,totalDocs:t,totalPages:i,values:C}}return{hasNextPage:!1,hasPrevPage:!1,limit:0,page:1,pagingCounter:1,totalDocs:C.length,totalPages:1,values:C}};e.s(["findDistinct",0,d])},948123,e=>{"use strict";var t=e.i(477426),i=e.i(8080);let r=async function({slug:e,locale:r,req:n,select:s,where:a}){let o=this.payload.globals.config.find(t=>t.slug===e),l=this.tableNameMap.get((0,t.default)(o.slug)),{docs:[c]}=await (0,i.findMany)({adapter:this,fields:o.flattenedFields,limit:1,locale:r,pagination:!1,req:n,select:s,tableName:l,where:a});return c?(c.globalType=e,c):{}};e.s(["findGlobal",0,r])},631909,e=>{"use strict";var t=e.i(201803),i=e.i(477426),r=e.i(8080);let n=async function({global:e,limit:n,locale:s,page:a,pagination:o,req:l,select:c,sort:d,where:u}){let h=this.payload.globals.config.find(({slug:t})=>t===e),A=null!=d?d:"-createdAt",p=this.tableNameMap.get(`_${(0,i.default)(h.slug)}${this.versionsSuffix}`),f=(0,t.buildVersionGlobalFields)(this.payload.config,h,!0);return(0,r.findMany)({adapter:this,fields:f,limit:n,locale:s,page:a,pagination:o,req:l,select:c,sort:A,tableName:p,where:u})};e.s(["findGlobalVersions",0,n])},556356,e=>{"use strict";var t=e.i(477426),i=e.i(8080);async function r({collection:e,draftsEnabled:r,joins:n,locale:s,req:a,select:o,where:l}){let c=this.payload.collections[e].config,d=this.tableNameMap.get((0,t.default)(c.slug)),{docs:u}=await (0,i.findMany)({adapter:this,collectionSlug:e,draftsEnabled:r,fields:c.flattenedFields,joins:n,limit:1,locale:s,page:1,pagination:!1,req:a,select:o,sort:void 0,tableName:d,where:l});return u?.[0]||null}e.s(["findOne",()=>r])},582265,e=>{"use strict";var t=e.i(391033),i=e.i(477426),r=e.i(8080);let n=async function({collection:e,limit:n,locale:s,page:a,pagination:o,req:l,select:c,sort:d,where:u}){let h=this.payload.collections[e].config,A=null!=d?d:h.defaultSort,p=this.tableNameMap.get(`_${(0,i.default)(h.slug)}${this.versionsSuffix}`),f=(0,t.buildVersionCollectionFields)(this.payload.config,h,!0);return(0,r.findMany)({adapter:this,fields:f,joins:!1,limit:n,locale:s,page:a,pagination:o,req:l,select:c,sort:A,tableName:p,where:u})};e.s(["findVersions",0,n])},252054,e=>{"use strict";var t=e.i(522734),i=e.i(814747),r=e.i(248615);let n=async({payload:e})=>t.default.existsSync(e.db.migrationDir)?(e.logger.info({msg:`Reading migration files from ${e.db.migrationDir}`}),Promise.all(t.default.readdirSync(e.db.migrationDir).sort().filter(e=>(e.endsWith(".ts")||e.endsWith(".js"))&&"index.js"!==e&&"index.ts"!==e).map(t=>i.default.resolve(e.db.migrationDir,t)).map(async e=>{let t=await (0,r.dynamicImport)(e),n="default"in t?t.default:t;return{name:i.default.basename(e).split(".")[0],down:n.down,up:n.up}}))):(e.logger.error({msg:`No migration directory found at ${e.db.migrationDir}`}),[]);e.s(["readMigrationFiles",0,n])},883832,e=>{"use strict";let t=async(e,t)=>{let i;if("postgres"===e.name){let t=e.schemaName?`"${e.schemaName}".`:"";i=`SELECT to_regclass('${t}"payload_migrations"') AS exists;`}"sqlite"===e.name&&(i=`
|
||
SELECT CASE
|
||
WHEN COUNT(*) > 0 THEN 1
|
||
ELSE 0
|
||
END AS 'exists'
|
||
FROM sqlite_master
|
||
WHERE type = 'table'
|
||
AND name = 'payload_migrations';`);let[r]=(await e.execute({drizzle:t??e.drizzle,raw:i})).rows;return r&&"object"==typeof r&&"exists"in r&&!!r.exists};e.s(["migrationTableExists",0,t])},112288,e=>{"use strict";let t=(e,t)=>{let i=`${t}`;return e instanceof Error&&(i+=` ${e.message}.`,"hint"in e&&"string"==typeof e.hint&&(i+=` ${e.hint}.`)),i};e.s(["parseError",0,t])},435555,e=>{"use strict";var t=e.i(452968),i=e.i(680110),r=e.i(311462),n=e.i(893961),s=e.i(252054),a=e.i(822730),o=e.i(444316),l=e.i(883832),c=e.i(112288);let d=async function(e){let{payload:t}=this,i=e?.migrations||await (0,s.readMigrationFiles)({payload:t});if(!i.length)return void t.logger.info({msg:"No migrations to run."});"createExtensions"in this&&"function"==typeof this.createExtensions&&await this.createExtensions();let r=0,n=[];if(await (0,l.migrationTableExists)(this)){if({docs:n}=await t.find({collection:"payload-migrations",limit:0,sort:"-name"}),n.find(e=>-1===e.batch)){let{confirm:e}=await (0,a.default)({name:"confirm",type:"confirm",initial:!1,message:"It looks like you've run Payload in dev mode, meaning you've dynamically pushed changes to your database.\n\nIf you'd like to run migrations, data loss will occur. Would you like to proceed?"},{onCancel:()=>{process.exit(0)}});e||process.exit(0),n=n.filter(e=>-1!==e.batch)}Number(n?.[0]?.batch)>0&&(r=Number(n[0]?.batch))}let o=r+1;for(let e of i)n.find(t=>t.name===e.name)||await u(t,e,o)};async function u(e,s,a){let l=Date.now(),d=await (0,i.createLocalReq)({},e);e.logger.info({msg:`Migrating: ${s.name}`});try{await (0,r.initTransaction)(d);let i=await (0,o.getTransaction)(e.db,d);await s.up({db:i,payload:e,req:d}),e.logger.info({msg:`Migrated: ${s.name} (${Date.now()-l}ms)`}),await e.create({collection:"payload-migrations",data:{name:s.name,batch:a},req:d}),await (0,t.commitTransaction)(d)}catch(t){await (0,n.killTransaction)(d),e.logger.error({err:t,msg:(0,c.parseError)(t,`Error running migration ${s.name}`)}),process.exit(1)}}e.s(["migrate",0,d])},159493,e=>{"use strict";async function t({payload:e}){let t=(await e.find({collection:"payload-migrations",limit:0,sort:["-batch","-name"],where:{batch:{not_equals:-1}}})).docs,i=Number(t?.[0]?.batch)||0;return{existingMigrations:t,latestBatch:i}}e.s(["getMigrations",()=>t])},635691,e=>{"use strict";var t=e.i(452968),i=e.i(680110),r=e.i(159493),n=e.i(311462),s=e.i(893961),a=e.i(252054),o=e.i(444316),l=e.i(883832),c=e.i(112288);async function d(){let{payload:e}=this,d=await (0,a.readMigrationFiles)({payload:e}),{existingMigrations:u,latestBatch:h}=await (0,r.getMigrations)({payload:e});if(!u?.length)return void e.logger.info({msg:"No migrations to rollback."});for(let r of(e.logger.info({msg:`Rolling back batch ${h} consisting of ${u.length} migration(s).`}),u.filter(({batch:e})=>e===h))){let a=d.find(e=>e.name===r.name);if(!a)throw Error(`Migration ${r.name} not found locally.`);let u=Date.now(),h=await (0,i.createLocalReq)({},e);try{e.logger.info({msg:`Migrating down: ${a.name}`}),await (0,n.initTransaction)(h);let i=await (0,o.getTransaction)(this,h);await a.down({db:i,payload:e,req:h}),e.logger.info({msg:`Migrated down: ${a.name} (${Date.now()-u}ms)`}),await (0,l.migrationTableExists)(this,i)&&await e.delete({id:r.id,collection:"payload-migrations",req:h}),await (0,t.commitTransaction)(h)}catch(t){await (0,s.killTransaction)(h),e.logger.error({err:t,msg:(0,c.parseError)(t,`Error migrating down ${a.name}. Rolling back.`)}),process.exit(1)}}}e.s(["migrateDown",()=>d])},703879,e=>{"use strict";var t=e.i(452968),i=e.i(680110),r=e.i(311462),n=e.i(893961),s=e.i(252054),a=e.i(822730),o=e.i(444316),l=e.i(112288);async function c({forceAcceptWarning:e=!1}){let{payload:c}=this;if(!1===e){let{confirm:e}=await (0,a.default)({name:"confirm",type:"confirm",initial:!1,message:"WARNING: This will drop your database and run all migrations. Are you sure you want to proceed?"},{onCancel:()=>{process.exit(0)}});e||process.exit(0)}c.logger.info({msg:"Dropping database."}),await this.dropDatabase({adapter:this});let d=await (0,s.readMigrationFiles)({payload:c});c.logger.debug({msg:`Found ${d.length} migration files.`});let u=await (0,i.createLocalReq)({},c);for(let e of("createExtensions"in this&&"function"==typeof this.createExtensions&&await this.createExtensions(),d)){c.logger.info({msg:`Migrating: ${e.name}`});try{let i=Date.now();await (0,r.initTransaction)(u);let n=await (0,o.getTransaction)(this,u);await e.up({db:n,payload:c,req:u}),await c.create({collection:"payload-migrations",data:{name:e.name,batch:1},req:u}),await (0,t.commitTransaction)(u),c.logger.info({msg:`Migrated: ${e.name} (${Date.now()-i}ms)`})}catch(t){await (0,n.killTransaction)(u),c.logger.error({err:t,msg:(0,l.parseError)(t,`Error running migration ${e.name}. Rolling back`)}),process.exit(1)}}}e.s(["migrateFresh",()=>c])},79329,e=>{"use strict";var t=e.i(452968),i=e.i(680110),r=e.i(159493),n=e.i(311462),s=e.i(893961),a=e.i(252054),o=e.i(444316),l=e.i(883832),c=e.i(112288);async function d(){let{payload:e}=this,d=await (0,a.readMigrationFiles)({payload:e}),{existingMigrations:u,latestBatch:h}=await (0,r.getMigrations)({payload:e});if(!u?.length)return void e.logger.info({msg:"No migrations to rollback."});e.logger.info({msg:`Rolling back batch ${h} consisting of ${u.length} migration(s).`});let A=await (0,i.createLocalReq)({},e);for(let i of(u.reverse(),u))try{let r=d.find(e=>e.name===i.name);if(!r)throw Error(`Migration ${i.name} not found locally.`);e.logger.info({msg:`Migrating down: ${i.name}`});let s=Date.now();await (0,n.initTransaction)(A);let a=await (0,o.getTransaction)(this,A);await r.down({db:a,payload:e,req:A}),e.logger.info({msg:`Migrated down: ${i.name} (${Date.now()-s}ms)`}),await (0,l.migrationTableExists)(this,a)&&await e.delete({collection:"payload-migrations",req:A,where:{name:{equals:i.name}}}),await (0,t.commitTransaction)(A)}catch(t){await (0,s.killTransaction)(A),e.logger.error({err:t,msg:(0,c.parseError)(t,`Error running migration ${i.name}. Rolling back.`)}),process.exit(1)}for(let i of d){e.logger.info({msg:`Migrating: ${i.name}`});try{let r=Date.now();await (0,n.initTransaction)(A),await i.up({payload:e,req:A}),await e.create({collection:"payload-migrations",data:{name:i.name,executed:!0},req:A}),await (0,t.commitTransaction)(A),e.logger.info({msg:`Migrated: ${i.name} (${Date.now()-r}ms)`})}catch(t){await (0,s.killTransaction)(A),e.logger.error({err:t,msg:(0,c.parseError)(t,`Error running migration ${i.name}. Rolling back.`)}),process.exit(1)}}}e.s(["migrateRefresh",()=>d])},419511,e=>{"use strict";var t=e.i(452968),i=e.i(680110),r=e.i(159493),n=e.i(311462),s=e.i(893961),a=e.i(252054),o=e.i(444316),l=e.i(883832);async function c(){let{payload:e}=this,c=await (0,a.readMigrationFiles)({payload:e}),{existingMigrations:d}=await (0,r.getMigrations)({payload:e});if(!d?.length)return void e.logger.info({msg:"No migrations to reset."});let u=await (0,i.createLocalReq)({},e);for(let i of(d.reverse(),d)){let r=c.find(e=>e.name===i.name);try{if(!r)throw Error(`Migration ${i.name} not found locally.`);let s=Date.now();e.logger.info({msg:`Migrating down: ${r.name}`}),await (0,n.initTransaction)(u);let a=await (0,o.getTransaction)(this,u);await r.down({db:a,payload:e,req:u}),e.logger.info({msg:`Migrated down: ${r.name} (${Date.now()-s}ms)`}),await (0,l.migrationTableExists)(this,a)&&await e.delete({id:i.id,collection:"payload-migrations",req:u}),await (0,t.commitTransaction)(u)}catch(i){let t=`Error running migration ${r.name}.`;i instanceof Error&&(t+=` ${i.message}`),await (0,s.killTransaction)(u),e.logger.error({err:i,msg:t}),process.exit(1)}}if(await (0,l.migrationTableExists)(this))try{await e.delete({collection:"payload-migrations",where:{batch:{equals:-1}}})}catch(t){e.logger.error({err:t,msg:"Error deleting dev migration"})}}e.s(["migrateReset",()=>c])},18477,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_COLOR_MAP=void 0,i.DEFAULT_COLOR_MAP={red:"\x1b[31m",green:"\x1b[32m",yellow:"\x1b[33m",blue:"\x1b[34m",magenta:"\x1b[35m",cyan:"\x1b[36m",white:"\x1b[37m",white_bold:"\x1b[01m",reset:"\x1b[0m"};class r{constructor(e=i.DEFAULT_COLOR_MAP){this.text="",this.colorMap=e}addCharsWithColor(e,t){let i=this.colorMap[e];this.text+=void 0!==i?`${i}${t}${this.colorMap.reset}`:t}renderConsole(){return this.text}}i.default=r},985459,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.DEFAULT_HEADER_ALIGNMENT=i.DEFAULT_ROW_ALIGNMENT=i.DEFAULT_HEADER_FONT_COLOR=i.DEFAULT_ROW_FONT_COLOR=i.COLORS=i.ALIGNMENTS=i.DEFAULT_TABLE_STYLE=i.DEFAULT_ROW_SEPARATOR=i.DEFAULT_COLUMN_LEN=void 0,i.DEFAULT_COLUMN_LEN=20,i.DEFAULT_ROW_SEPARATOR=!1,i.DEFAULT_TABLE_STYLE={headerTop:{left:"┌",mid:"┬",right:"┐",other:"─"},headerBottom:{left:"├",mid:"┼",right:"┤",other:"─"},tableBottom:{left:"└",mid:"┴",right:"┘",other:"─"},vertical:"│",rowSeparator:{left:"├",mid:"┼",right:"┤",other:"─"}},i.ALIGNMENTS=["right","left","center"],i.COLORS=["red","green","yellow","white","blue","magenta","cyan","white_bold","reset"],i.DEFAULT_ROW_FONT_COLOR="white",i.DEFAULT_HEADER_FONT_COLOR="white_bold",i.DEFAULT_ROW_ALIGNMENT="right",i.DEFAULT_HEADER_ALIGNMENT="center"},603501,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.rawColumnToInternalColumn=i.objIfExists=void 0;let r=e.r(985459);i.objIfExists=(e,t)=>t?{[e]:t}:{};let n=e=>{var t;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:null!=(t=e.title)?t:e.name},(0,i.objIfExists)("color",e.color)),(0,i.objIfExists)("maxLen",e.maxLen)),(0,i.objIfExists)("minLen",e.minLen)),{alignment:e.alignment||r.DEFAULT_ROW_ALIGNMENT})};i.rawColumnToInternalColumn=n},762762,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=[{first:768,last:879},{first:1155,last:1158},{first:1160,last:1161},{first:1425,last:1469},{first:1471,last:1471},{first:1473,last:1474},{first:1476,last:1477},{first:1479,last:1479},{first:1536,last:1539},{first:1552,last:1557},{first:1611,last:1630},{first:1648,last:1648},{first:1750,last:1764},{first:1767,last:1768},{first:1770,last:1773},{first:1807,last:1807},{first:1809,last:1809},{first:1840,last:1866},{first:1958,last:1968},{first:2027,last:2035},{first:2305,last:2306},{first:2364,last:2364},{first:2369,last:2376},{first:2381,last:2381},{first:2385,last:2388},{first:2402,last:2403},{first:2433,last:2433},{first:2492,last:2492},{first:2497,last:2500},{first:2509,last:2509},{first:2530,last:2531},{first:2561,last:2562},{first:2620,last:2620},{first:2625,last:2626},{first:2631,last:2632},{first:2635,last:2637},{first:2672,last:2673},{first:2689,last:2690},{first:2748,last:2748},{first:2753,last:2757},{first:2759,last:2760},{first:2765,last:2765},{first:2786,last:2787},{first:2817,last:2817},{first:2876,last:2876},{first:2879,last:2879},{first:2881,last:2883},{first:2893,last:2893},{first:2902,last:2902},{first:2946,last:2946},{first:3008,last:3008},{first:3021,last:3021},{first:3134,last:3136},{first:3142,last:3144},{first:3146,last:3149},{first:3157,last:3158},{first:3260,last:3260},{first:3263,last:3263},{first:3270,last:3270},{first:3276,last:3277},{first:3298,last:3299},{first:3393,last:3395},{first:3405,last:3405},{first:3530,last:3530},{first:3538,last:3540},{first:3542,last:3542},{first:3633,last:3633},{first:3636,last:3642},{first:3655,last:3662},{first:3761,last:3761},{first:3764,last:3769},{first:3771,last:3772},{first:3784,last:3789},{first:3864,last:3865},{first:3893,last:3893},{first:3895,last:3895},{first:3897,last:3897},{first:3953,last:3966},{first:3968,last:3972},{first:3974,last:3975},{first:3984,last:3991},{first:3993,last:4028},{first:4038,last:4038},{first:4141,last:4144},{first:4146,last:4146},{first:4150,last:4151},{first:4153,last:4153},{first:4184,last:4185},{first:4448,last:4607},{first:4959,last:4959},{first:5906,last:5908},{first:5938,last:5940},{first:5970,last:5971},{first:6002,last:6003},{first:6068,last:6069},{first:6071,last:6077},{first:6086,last:6086},{first:6089,last:6099},{first:6109,last:6109},{first:6155,last:6157},{first:6313,last:6313},{first:6432,last:6434},{first:6439,last:6440},{first:6450,last:6450},{first:6457,last:6459},{first:6679,last:6680},{first:6912,last:6915},{first:6964,last:6964},{first:6966,last:6970},{first:6972,last:6972},{first:6978,last:6978},{first:7019,last:7027},{first:7616,last:7626},{first:7678,last:7679},{first:8203,last:8207},{first:8234,last:8238},{first:8288,last:8291},{first:8298,last:8303},{first:8400,last:8431},{first:12330,last:12335},{first:12441,last:12442},{first:43014,last:43014},{first:43019,last:43019},{first:43045,last:43046},{first:64286,last:64286},{first:65024,last:65039},{first:65056,last:65059},{first:65279,last:65279},{first:65529,last:65531},{first:68097,last:68099},{first:68101,last:68102},{first:68108,last:68111},{first:68152,last:68154},{first:68159,last:68159},{first:119143,last:119145},{first:119155,last:119170},{first:119173,last:119179},{first:119210,last:119213},{first:119362,last:119364},{first:917505,last:917505},{first:917536,last:917631},{first:917760,last:917999}]},364857,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.default=(e,t,i)=>{let r,n=0,s=i;if(e<t[0].first||e>t[s].last)return 0;for(;s>=n;)if(e>t[r=Math.floor((n+s)/2)].last)n=r+1;else{if(!(e<t[r].first))return 1;s=r-1}return 0}},630305,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let n=r(e.r(762762)),s=r(e.r(364857));i.default=e=>0===e?0:e<32||e>=127&&e<160?-1:(0,s.default)(e,n.default,n.default.length-1)?0:1+Number(e>=4352&&(e<=4447||9001===e||9002===e||e>=11904&&e<=42191&&12351!==e||e>=44032&&e<=55203||e>=63744&&e<=64255||e>=65040&&e<=65049||e>=65072&&e<=65135||e>=65280&&e<=65376||e>=65504&&e<=65510||e>=131072&&e<=196605||e>=196608&&e<=262141))},557964,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let n=r(e.r(630305));i.default=e=>{let t=0;for(let i=0;i<e.length;i++){let r=e.charCodeAt(i),s=(0,n.default)(r);if(s<0)return -1;t+=s}return t}},909939,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.wcswidth=i.wcwidth=void 0,i.wcswidth=r(e.r(557964)).default,i.wcwidth=r(e.r(630305)).default},151108,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.findWidthInConsole=i.stripAnsi=void 0;let r=e.r(909939),n=/\x1b\[\d{1,3}(;\d{1,3})*m/g;i.stripAnsi=e=>e.replace(n,"");let s=(e,t)=>{let n=0;return e=(0,i.stripAnsi)(e),t&&Object.entries(t).forEach(([t,i])=>{let r=RegExp(t,"g");n+=(e.match(r)||[]).length*i,e=e.replace(t,"")}),n+=(0,r.wcswidth)(e)};i.findWidthInConsole=s},664193,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.biggestWordInSentence=i.textWithPadding=i.splitTextIntoTextsOfMinLen=void 0;let r=e.r(151108);i.splitTextIntoTextsOfMinLen=(e,t,i)=>{let n=[];return e.split(/[\n\r]/).forEach(e=>{let s=e.split(" "),a=[],o=0;s.forEach(e=>{let s=(0,r.findWidthInConsole)(e,i);o+s<=t?(o+=s+1,a.push(e)):(a.length>0&&n.push(a.join(" ")),a=[e],o=s+1)}),n.push(a.join(" "))}),n};let n=(e,t,n,s)=>{let a=(0,r.findWidthInConsole)(e,s),o=Math.floor((n-a)/2),l=n-o-a;if(n<a){let r=(0,i.splitTextIntoTextsOfMinLen)(e,n);return 1===r.length?e:r.map(e=>(0,i.textWithPadding)(e,t,n,s)).join("\n")}switch(t){case"left":return e.concat(" ".repeat(n-a));case"center":return" ".repeat(o).concat(e).concat(" ".repeat(l));default:return" ".repeat(n-a).concat(e)}};i.textWithPadding=n,i.biggestWordInSentence=(e,t)=>e.split(" ").reduce((e,i)=>Math.max(e,(0,r.findWidthInConsole)(i,t)),0)},425773,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.getWidthLimitedColumnsArray=i.createHeaderAsRow=i.renderTableHorizontalBorders=i.findLenOfColumn=i.createRow=i.createColumFromComputedColumn=i.createColumFromOnlyName=i.createTableHorizontalBorders=i.convertRawRowOptionsToStandard=i.cellText=void 0;let r=e.r(603501),n=e.r(151108),s=e.r(664193),a=e.r(985459),o=(e,t)=>Math.max(e,t);i.cellText=e=>null==e?"":`${e}`,i.convertRawRowOptionsToStandard=e=>{if(e)return{color:e.color,separator:e.separator||a.DEFAULT_ROW_SEPARATOR}},i.createTableHorizontalBorders=({left:e,mid:t,right:i,other:r},n)=>{let s=e;return n.forEach(e=>{s+=r.repeat(e+2),s+=t}),s=s.slice(0,-t.length)+i},i.createColumFromOnlyName=e=>({name:e,title:e}),i.createColumFromComputedColumn=e=>{var t;return Object.assign(Object.assign(Object.assign(Object.assign({name:e.name,title:null!=(t=e.title)?t:e.name},(0,r.objIfExists)("color",e.color)),(0,r.objIfExists)("maxLen",e.maxLen)),(0,r.objIfExists)("minLen",e.minLen)),{alignment:e.alignment||a.DEFAULT_ROW_ALIGNMENT})},i.createRow=(e,t,i)=>({color:e,separator:i,text:t});let l=(e,t,r)=>{let a=e.name,l=e.title,c=o(0,(null==e?void 0:e.minLen)||0);return e.maxLen?(c=o(c,o(e.maxLen,(0,s.biggestWordInSentence)(l,r))),c=t.reduce((e,t)=>o(e,(0,s.biggestWordInSentence)((0,i.cellText)(t.text[a]),r)),c)):(c=o(c,(0,n.findWidthInConsole)(l,r)),t.forEach(e=>{c=o(c,(0,n.findWidthInConsole)((0,i.cellText)(e.text[a]),r))}),c)};i.findLenOfColumn=l;let c=(e,t)=>(0,i.createTableHorizontalBorders)(e,t);i.renderTableHorizontalBorders=c,i.createHeaderAsRow=(e,t)=>{let i=e(a.DEFAULT_HEADER_FONT_COLOR,{},!1);return t.forEach(e=>{i.text[e.name]=e.title}),i};let d=(e,t,r)=>{let n={};return e.forEach(e=>{n[e.name]=(0,s.splitTextIntoTextsOfMinLen)((0,i.cellText)(t.text[e.name]),e.length||a.DEFAULT_COLUMN_LEN,r)}),n};i.getWidthLimitedColumnsArray=d},158763,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),i.preProcessRows=i.preProcessColumns=void 0;let r=e.r(425773),n=e=>{e.computedColumns.length&&e.computedColumns.forEach(t=>{e.addColumn(t),e.rows.forEach(e=>{e.text[t.name]=t.function(e.text)})})},s=e=>{e.enabledColumns.length&&(e.columns=e.columns.filter(t=>e.enabledColumns.includes(t.name)))},a=e=>{e.disabledColumns.length&&(e.columns=e.columns.filter(t=>!e.disabledColumns.includes(t.name)))},o=e=>{e.columns.forEach(t=>{t.length=(0,r.findLenOfColumn)(t,e.rows,e.charLength)})};i.preProcessColumns=e=>{n(e),a(e),s(e),o(e)},i.preProcessRows=e=>{let t=e.rows.filter(t=>e.filterFunction(t.text)).sort((t,i)=>e.sortFunction(t.text,i.text));e.rows=t}},176914,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.printSimpleTable=i.renderSimpleTable=i.renderTable=void 0;let n=r(e.r(18477)),s=e.r(664193),a=e.r(985459),o=e.r(425773),l=r(e.r(347825)),c=e.r(158763),d=(e,t,i,r,l,c,d,u)=>{let h=new n.default(d);return h.addCharsWithColor("",e.vertical),t.forEach(t=>{let n=i<r[t.name].length?(0,o.cellText)(r[t.name][i]):"";h.addCharsWithColor(a.DEFAULT_ROW_FONT_COLOR," "),h.addCharsWithColor(l&&a.DEFAULT_HEADER_FONT_COLOR||t.color||c.color,(0,s.textWithPadding)(n,t.alignment||a.DEFAULT_ROW_ALIGNMENT,t.length||a.DEFAULT_COLUMN_LEN,u)),h.addCharsWithColor("",` ${e.vertical}`)}),h.renderConsole()},u=(e,t,i,r,n,s)=>{let a=(0,o.getWidthLimitedColumnsArray)(t,i,s),l=Object.values(a).reduce((e,t)=>Math.max(e,t.length),0),c=[];for(let o=0;o<l;o+=1){let l=d(e,t,o,a,n,i,r,s);c.push(l)}return c},h=(e,t)=>{let i=[];return i.concat(u(e.tableStyle,e.columns,t,e.colorMap,void 0,e.charLength))},A=e=>{let t=[];if(void 0===e.title)return t;let i=()=>{let t=(e,t)=>e+t+2+1;return e.columns.map(e=>e.length||a.DEFAULT_COLUMN_LEN).reduce(t,1)},r=(0,s.textWithPadding)(e.title,a.DEFAULT_HEADER_ALIGNMENT,i()),o=new n.default(e.colorMap);return o.addCharsWithColor(a.DEFAULT_HEADER_FONT_COLOR,r),t.push(o.renderConsole()),t},p=e=>{let t=[];t.push((0,o.renderTableHorizontalBorders)(e.tableStyle.headerTop,e.columns.map(e=>e.length||a.DEFAULT_COLUMN_LEN)));let i=(0,o.createHeaderAsRow)(o.createRow,e.columns);return(t=t.concat(u(e.tableStyle,e.columns,i,e.colorMap,!0))).push((0,o.renderTableHorizontalBorders)(e.tableStyle.headerBottom,e.columns.map(e=>e.length||a.DEFAULT_COLUMN_LEN))),t},f=e=>{let t=[];return t.push((0,o.renderTableHorizontalBorders)(e.tableStyle.tableBottom,e.columns.map(e=>e.length||a.DEFAULT_COLUMN_LEN))),t},g=(e,t)=>{let i=[],r=e.rows.length-1;return e.rows.indexOf(t)!==r&&t.separator&&i.push((0,o.renderTableHorizontalBorders)(e.tableStyle.rowSeparator,e.columns.map(e=>e.length||a.DEFAULT_COLUMN_LEN))),i};i.renderTable=e=>{(0,c.preProcessColumns)(e),(0,c.preProcessRows)(e);let t=[];return A(e).forEach(e=>t.push(e)),p(e).forEach(e=>t.push(e)),e.rows.forEach(i=>{h(e,i).forEach(e=>t.push(e)),g(e,i).forEach(e=>t.push(e))}),f(e).forEach(e=>t.push(e)),t.join("\n")};let m=e=>{let t=new l.default;return t.addRows(e),(0,i.renderTable)(t)};i.renderSimpleTable=m;let y=e=>{console.log((0,i.renderSimpleTable)(e))};i.printSimpleTable=y},347825,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0});let r=e.r(18477),n=e.r(985459),s=e.r(425773),a=e.r(603501),o=e.r(176914),l=()=>0,c=()=>!0;class d{initSimple(e){this.columns=e.map(e=>({name:e,title:e,alignment:n.DEFAULT_ROW_ALIGNMENT}))}initDetailed(e){var t;this.title=(null==e?void 0:e.title)||this.title,this.tableStyle=(null==e?void 0:e.style)||this.tableStyle,this.sortFunction=(null==e?void 0:e.sort)||this.sortFunction,this.filterFunction=(null==e?void 0:e.filter)||this.filterFunction,this.enabledColumns=(null==e?void 0:e.enabledColumns)||this.enabledColumns,this.disabledColumns=(null==e?void 0:e.disabledColumns)||this.disabledColumns,this.computedColumns=(null==e?void 0:e.computedColumns)||this.computedColumns,this.columns=(null==(t=null==e?void 0:e.columns)?void 0:t.map(a.rawColumnToInternalColumn))||this.columns,this.rowSeparator=(null==e?void 0:e.rowSeparator)||this.rowSeparator,this.charLength=(null==e?void 0:e.charLength)||this.charLength,(null==e?void 0:e.shouldDisableColors)?this.colorMap={}:(null==e?void 0:e.colorMap)&&(this.colorMap=Object.assign(Object.assign({},this.colorMap),e.colorMap)),void 0!==e.rows&&this.addRows(e.rows)}constructor(e){this.rows=[],this.columns=[],this.title=void 0,this.tableStyle=n.DEFAULT_TABLE_STYLE,this.filterFunction=c,this.sortFunction=l,this.enabledColumns=[],this.disabledColumns=[],this.computedColumns=[],this.rowSeparator=n.DEFAULT_ROW_SEPARATOR,this.colorMap=r.DEFAULT_COLOR_MAP,this.charLength={},e instanceof Array?this.initSimple(e):"object"==typeof e&&this.initDetailed(e)}createColumnFromRow(e){let t=this.columns.map(e=>e.name);Object.keys(e).forEach(e=>{t.includes(e)||this.columns.push((0,s.createColumFromOnlyName)(e))})}addColumn(e){"string"==typeof e?this.columns.push((0,s.createColumFromOnlyName)(e)):this.columns.push((0,s.createColumFromComputedColumn)(e))}addColumns(e){e.forEach(e=>{this.addColumn(e)})}addRow(e,t){this.createColumnFromRow(e),this.rows.push((0,s.createRow)((null==t?void 0:t.color)||n.DEFAULT_ROW_FONT_COLOR,e,(null==t?void 0:t.separator)!==void 0?null==t?void 0:t.separator:this.rowSeparator))}addRows(e,t){e.forEach(e=>{this.addRow(e,t)})}renderTable(){return(0,o.renderTable)(this)}}i.default=d},503128,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0});let n=r(e.r(347825)),s=e.r(425773);class a{constructor(e){this.table=new n.default(e)}addColumn(e){return this.table.addColumn(e),this}addColumns(e){return this.table.addColumns(e),this}addRow(e,t){return this.table.addRow(e,(0,s.convertRawRowOptionsToStandard)(t)),this}addRows(e,t){return this.table.addRows(e,(0,s.convertRawRowOptionsToStandard)(t)),this}printTable(){console.log(this.table.renderTable())}render(){return this.table.renderTable()}}i.default=a},491401,(e,t,i)=>{"use strict";var r=e.e&&e.e.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(i,"__esModule",{value:!0}),i.renderTable=i.printTable=i.Table=void 0,i.Table=r(e.r(503128)).default;let n=e.r(176914);Object.defineProperty(i,"printTable",{enumerable:!0,get:function(){return n.printSimpleTable}}),Object.defineProperty(i,"renderTable",{enumerable:!0,get:function(){return n.renderSimpleTable}})},273914,e=>{"use strict";var t=e.i(491401),i=e.i(159493),r=e.i(252054),n=e.i(883832);async function s(){let{payload:e}=this,s=await (0,r.readMigrationFiles)({payload:e});e.logger.debug({msg:`Found ${s.length} migration files.`});let a=[];if(await (0,n.migrationTableExists)(this)&&({existingMigrations:a}=await (0,i.getMigrations)({payload:e})),!s.length)return void e.logger.info({msg:"No migrations found."});let o=s.map(e=>{let t=a.find(t=>t.name===e.name);return{Name:e.name,Batch:t?.batch,Ran:t?"Yes":"No"}}),l=new t.Table;o.forEach(e=>{l.addRow(e,{color:"Yes"===e.Ran?"green":"red"})}),l.printTable()}e.s(["migrateStatus",()=>s])},761586,e=>{"use strict";var t=e.i(391033),i=e.i(617997),r=e.i(477426),n=e.i(8080);let s=async function({collection:e,joins:s,limit:a,locale:o,page:l=1,pagination:c,req:d,select:u,sort:h,where:A}){let p=this.payload.collections[e].config,f=this.tableNameMap.get(`_${(0,r.default)(p.slug)}${this.versionsSuffix}`),g=(0,t.buildVersionCollectionFields)(this.payload.config,p,!0),m=(0,i.combineQueries)({latest:{equals:!0}},A),y=await (0,n.findMany)({adapter:this,collectionSlug:e,fields:g,joins:s,limit:a,locale:o,page:l,pagination:c,req:d,select:u,sort:h,tableName:f,versions:!0,where:m});return{...y,docs:y.docs.map(e=>e={id:e.parent,...e.version})}};e.s(["queryDrafts",0,s])},572845,e=>{"use strict";let t=async function(e=""){let t=e instanceof Promise?await e:e;if(!this.sessions[t])return;let i=this.sessions[t];delete this.sessions[t],await i.reject()};e.s(["rollbackTransaction",0,t])},51342,e=>{"use strict";var t=e.i(477426),i=e.i(852091),r=e.i(444316);async function n({slug:e,data:n,req:s,returning:a,select:o}){let l=this.payload.globals.config.find(t=>t.slug===e),c=this.tableNameMap.get((0,t.default)(l.slug)),d=await (0,r.getTransaction)(this,s),u=await d.query[c].findFirst({}),h=await (0,i.upsertRow)({...u?{id:u.id,operation:"update"}:{operation:"create"},adapter:this,data:n,db:d,fields:l.flattenedFields,globalSlug:e,ignoreResult:!1===a,req:s,select:o,tableName:c});return!1===a?null:(h.globalType=e,h)}e.s(["updateGlobal",()=>n])},424953,e=>{"use strict";var t=e.i(201803),i=e.i(477426),r=e.i(326421),n=e.i(852091),s=e.i(444316);async function a({id:e,global:a,locale:o,req:l,returning:c,select:d,versionData:u,where:h}){let A=this.payload.globals.config.find(({slug:e})=>e===a),p=h||{id:{equals:e}},f=this.tableNameMap.get(`_${(0,i.default)(A.slug)}${this.versionsSuffix}`),g=(0,t.buildVersionGlobalFields)(this.payload.config,A,!0),{where:m}=(0,r.buildQuery)({adapter:this,fields:g,locale:o,tableName:f,where:p}),y=await (0,s.getTransaction)(this,l),b=await (0,n.upsertRow)({id:e,adapter:this,data:u,db:y,fields:g,globalSlug:a,ignoreResult:!1===c,operation:"update",req:l,select:d,tableName:f,where:m});return!1===c?null:b}e.s(["updateGlobalVersion",()=>a])},932826,e=>{"use strict";var t=e.i(477426),i=e.i(8080),r=e.i(852091),n=e.i(871563),s=e.i(970117),a=e.i(444316);let o=async function({id:e,data:o,limit:l,req:c,returning:d,sort:u,where:h}){o?.log?.length||o.log&&"object"==typeof o.log&&"$push"in o.log||delete o.log;let A=e?{id:{equals:e}}:h,p=e?1:l,f=this.payload.collections["payload-jobs"].config,g=this.tableNameMap.get((0,t.default)(f.slug)),m=null!=u?u:f.defaultSort,y=(0,n.shouldUseOptimizedUpsertRow)({data:o,fields:f.flattenedFields});if(y&&e){let t=(0,s.getPrimaryDb)(this,await (0,a.getTransaction)(this,c)),i=await (0,r.upsertRow)({id:e,adapter:this,collectionSlug:"payload-jobs",data:o,db:t,fields:f.flattenedFields,ignoreResult:!1===d,operation:"update",req:c,tableName:g});return!1===d?null:[i]}let b=await (0,i.findMany)({adapter:this,collectionSlug:"payload-jobs",fields:f.flattenedFields,limit:e?1:p,pagination:!1,req:c,sort:m,tableName:g,where:A});if(!b.docs.length)return[];let E=await (0,a.getTransaction)(this,c),C=[];for(let e of b.docs){let t=y?o:{...e,...o},i=await (0,r.upsertRow)({id:e.id,adapter:this,collectionSlug:"payload-jobs",data:t,db:E,fields:f.flattenedFields,ignoreResult:!1===d,operation:"update",req:c,tableName:g});C.push(i)}return!1===d?null:C};e.s(["updateJobs",0,o])},347688,e=>{"use strict";var t=e.i(477426),i=e.i(326421),r=e.i(499504),n=e.i(852091),s=e.i(970117),a=e.i(444316);let o=async function({collection:e,data:o,joins:l,limit:c,locale:d,req:u,returning:h,select:A,sort:p,where:f}){let g=this.payload.collections[e].config,m=this.tableNameMap.get((0,t.default)(g.slug)),y=null!=p?p:g.defaultSort,{joins:b,orderBy:E,selectFields:C,where:w}=(0,i.buildQuery)({adapter:this,fields:g.flattenedFields,locale:d,sort:y,tableName:m,where:f}),I=(0,s.getPrimaryDb)(this,await (0,a.getTransaction)(this,u)),v=[],B=await (0,r.selectDistinct)({adapter:this,db:I,joins:b,query:({query:e})=>E?e.orderBy(()=>E.map(({column:e,order:t})=>t(e))):e,selectFields:C,tableName:m,where:w});if(B?.[0]?.id)v=B?.map(e=>e.id);else if(f&&!b.length){let e=I,t=this.tables[m],i=e.select({id:t.id}).from(t).where(w).$dynamic();"number"==typeof c&&c>0&&(i=i.limit(c)),E&&(i=i.orderBy(()=>E.map(({column:e,order:t})=>t(e))));let r=await i;v=r?.map(e=>e.id)}if(!v.length)return[];let Q=[];for(let t of v){let i=await (0,n.upsertRow)({id:t,adapter:this,collectionSlug:e,data:o,db:I,fields:g.flattenedFields,ignoreResult:!1===h,joinQuery:l,operation:"update",req:u,select:A,tableName:m});Q.push(i)}return!1===h?null:Q};e.s(["updateMany",0,o])},706060,e=>{"use strict";var t=e.i(477426),i=e.i(326421),r=e.i(499504),n=e.i(852091),s=e.i(970117),a=e.i(444316);let o=async function({id:e,collection:o,data:l,joins:c,locale:d,options:u={upsert:!1},req:h,returning:A,select:p,where:f}){let g=this.payload.collections[o].config,m=this.tableNameMap.get((0,t.default)(g.slug)),y=e,b=(0,s.getPrimaryDb)(this,await (0,a.getTransaction)(this,h));if(!y){let{joins:e,selectFields:t,where:n}=(0,i.buildQuery)({adapter:this,fields:g.flattenedFields,locale:d,tableName:m,where:f}),s=await (0,r.selectDistinct)({adapter:this,db:b,joins:e,query:({query:e})=>e.limit(1),selectFields:t,tableName:m,where:n});if(s?.[0]?.id)y=s?.[0]?.id;else if(f&&!e.length){let e=this.tables[m],t=await b.select({id:e.id}).from(e).where(n).limit(1);y=t?.[0]?.id}}if(!y&&!u.upsert)return null;let E=await (0,n.upsertRow)({id:y,adapter:this,collectionSlug:o,data:l,db:b,fields:g.flattenedFields,ignoreResult:!1===A,joinQuery:c,operation:"update",req:h,select:p,tableName:m});return!1===A?null:E};e.s(["updateOne",0,o])},697108,e=>{"use strict";var t=e.i(391033),i=e.i(477426),r=e.i(326421),n=e.i(852091),s=e.i(444316);async function a({id:e,collection:a,locale:o,req:l,returning:c,select:d,versionData:u,where:h}){let A=this.payload.collections[a].config,p=h||{id:{equals:e}},f=this.tableNameMap.get(`_${(0,i.default)(A.slug)}${this.versionsSuffix}`),g=(0,t.buildVersionCollectionFields)(this.payload.config,A,!0),{where:m}=(0,r.buildQuery)({adapter:this,fields:g,locale:o,tableName:f,where:p}),y=await (0,s.getTransaction)(this,l),b=await (0,n.upsertRow)({id:e,adapter:this,collectionSlug:a,data:u,db:y,fields:g,ignoreResult:!1===c,joinQuery:!1,operation:"update",req:l,select:d,tableName:f,where:m});return!1===c?null:b}e.s(["updateVersion",()=>a])},294319,e=>{"use strict";let t=async function({collection:e,data:t,joins:i,locale:r,req:n,returning:s,select:a,where:o}){return this.updateOne({collection:e,data:t,joins:i,locale:r,options:{upsert:!0},req:n,returning:s,select:a,where:o})};e.s(["upsert",0,t])},29980,e=>{"use strict";let t=({adapter:e,addEnum:t,addImport:i,circularEdges:r,column:n,tableKey:s})=>{let a=n.type;"geometry"===n.type?(a="geometryColumn",i(e.packageName,a)):"enum"===n.type?"locale"in n?a="enum__locales":(t(n.enumName,n.options),a=n.enumName):i(`${e.packageName}/drizzle/pg-core`,a);let o=[];switch(n.type){case"bit":case"halfvec":case"sparsevec":case"vector":n.dimensions&&o.push(`dimensions: ${n.dimensions}`);break;case"numeric":o.push("mode: 'number'");break;case"timestamp":o.push(`mode: '${n.mode}'`),n.withTimezone&&o.push("withTimezone: true"),"number"==typeof n.precision&&o.push(`precision: ${n.precision}`)}let l="";o.length&&(l=`, {${o.join(",")}}`);let c=`${a}('${n.name}'${l})`;if("timestamp"===n.type&&n.defaultNow&&(c=`${c}.defaultNow()`),"uuid"===n.type&&n.defaultRandom&&(c=`${c}.defaultRandom()`),n.notNull&&(c=`${c}.notNull()`),n.primaryKey&&(c=`${c}.primaryKey()`),void 0!==n.default){let e=n.default;"geometry"===n.type?e=`sql\`${n.default}\``:"jsonb"===n.type?e=`sql\`'${JSON.stringify(n.default)}'::jsonb\``:"numeric"===n.type?e=`${n.default}`:"string"==typeof n.default&&(e=`${JSON.stringify(n.default)}`),c=`${c}.default(${e})`}if(n.reference){let t="()";(n.reference.table===s||r?.has(`${s}:${n.reference.table}`))&&(i(`${e.packageName}/drizzle/pg-core`,"type AnyPgColumn"),t=`${t}: AnyPgColumn`),t=`${t} => ${n.reference.table}.${n.reference.name}`,c=`${c}.references(${t}, {
|
||
${n.reference.onDelete?`onDelete: '${n.reference.onDelete}'`:""}
|
||
})`}return c};e.s(["columnToCodeConverter",0,t])},697291,e=>{"use strict";var t=e.i(501040),i=e.i(65054);let r=async function({column:e,db:r,joins:n,tableName:s,where:a}){if(0===n.length){let n=await r.select({count:e?(0,t.count)(i.sql`DISTINCT ${e}`):(0,t.count)()}).from(this.tables[s]).where(a);return Number(n?.[0]?.count??0)}let o=r.select({count:i.sql`COUNT(1) OVER()`}).from(this.tables[s]).where(a).groupBy(e||this.tables[s].id).limit(1).$dynamic();n.forEach(({type:e,condition:t,table:i})=>{o=o[e??"leftJoin"](i,t)});let l=await o;return Number(l?.[0]?.count??0)};e.s(["countDistinct",0,r])},465548,e=>{"use strict";let t=({connectionString:e,database:t})=>{let i=new URL(e),r=new URL(i);return r.pathname=`/${t}`,r.toString()},i=async function(i={}){let r=this.poolOptions?.connectionString??process.env.POSTGRES_URL??process.env.DATABASE_URL,n={},s=i.name,a=this.schemaName||"public";r?(s||(s=new URL(r).pathname.slice(1)),n.connectionString=t({connectionString:r,database:"postgres"})):(s||(s=this.poolOptions.database),n={...this.poolOptions,database:"postgres"});let o=await e.A(399743).then(e=>e.default),l=new o.Client(n);try{if(await l.connect(),await l.query(`CREATE DATABASE "${s}"`),this.payload.logger.info(`Created database "${s}"`),"public"!==a){let e={};r?e.connectionString=t({connectionString:r,database:s}):e={...this.poolOptions,database:s};let i=new o.Client(e);try{await i.connect(),await i.query(`CREATE SCHEMA ${a}`),this.payload.logger.info(`Created schema "${s}.${a}"`)}catch(e){this.payload.logger.error({err:e,msg:`Error: failed to create schema "${s}.${a}". Details: ${e.message}`})}finally{await i.end()}}return!0}catch(e){return this.payload.logger.error({err:e,msg:`Error: failed to create database ${s}. Details: ${e.message}`}),!1}finally{await l.end()}};e.s(["createDatabase",0,i])},326736,e=>{"use strict";let t=async function(){for(let e in this.extensions)if(this.extensions[e])try{await this.drizzle.execute(`CREATE EXTENSION IF NOT EXISTS "${e}"`)}catch(t){this.payload.logger.error({err:t,msg:`Failed to create extension ${e}`})}};e.s(["createExtensions",0,t])},653288,e=>{"use strict";var t=e.i(700859),i=e.i(306e3),r=e.i(359991);let n={contains:"~",equals:"==",in:"in",like:"like_regex",not_equals:"!=",not_in:"in",not_like:"!like_regex"},s=(e,r)=>{if(null===e)return"NULL";if("number"==typeof e||"boolean"==typeof e)return`${e}`;if("string"!=typeof e)throw Error("Invalid value type");if(!i.SAFE_STRING_REGEX.test(e))throw new t.APIError(`${e} is not allowed as a JSON query value`,400);let n=e.replace(/\\/g,"\\\\").replace(/"/g,'\\"'),s=["like","not_like"].includes(r??"")?"(?i)":"";return`"${s}${n}"`},a=({column:e,operator:t,pathSegments:i,value:o})=>{let l="object"==typeof e?e.name:e,c=i.slice(1).map(e=>`${(0,r.sanitizePathSegment)(e)}[*]`).join("."),d=1===i.length?"$[*]":`$.${c}`,u="";if(["in","not_in"].includes(t)&&Array.isArray(o))u="(",o.forEach((r,n)=>{u=`${u}${a({column:e,operator:"in"===t?"equals":"not_equals",pathSegments:i,value:r})}${n===o.length-1?"":` ${"in"===t?"OR":"AND"} `}`}),u=`${u})`;else if("exists"===t)u=`${!1===o?"NOT ":""}jsonb_path_exists(${l}, '${d}')`;else if(["not_like"].includes(t)){let e=n[t];u=`NOT jsonb_path_exists(${l}, '${d} ? (@ ${e.substring(1)} ${s(o,t)})')`}else u=`jsonb_path_exists(${l}, '${d} ? (@ ${n[t]} ${s(o,t)})')`;return u};e.s(["createJSONQuery",0,a])},677892,e=>{"use strict";let t={id:"00000000-0000-0000-0000-000000000000",_meta:{columns:{},schemas:{},tables:{}},dialect:"postgresql",enums:{},policies:{},prevId:"00000000-0000-0000-0000-00000000000",roles:{},schemas:{},sequences:{},tables:{},version:"7",views:{}};e.s(["defaultDrizzleSnapshot",0,t])},203676,e=>{"use strict";let t=async function({db:e,tableName:t,where:i}){let r=this.tables[t];await e.delete(r).where(i)};e.s(["deleteWhere",0,t])},744105,e=>{"use strict";let t=async function({adapter:e}){await e.execute({drizzle:e.drizzle,raw:`drop schema if exists ${this.schemaName||"public"} cascade;
|
||
create schema ${this.schemaName||"public"};`})};e.s(["dropDatabase",0,t])},758404,e=>{"use strict";var t=e.i(65054);let i=function({db:e,drizzle:i,raw:r,sql:n}){let s=e??i;return r?s.execute(t.sql.raw(r)):s.execute(t.sql`${n}`)};e.s(["execute",0,i])},564115,e=>{"use strict";var t=e.i(586210),i=e.i(990866),r=e.i(65054),n=e.i(489508),s=e.i(959694),a=e.i(509331);function o(e,n,a){let o={},l=e.reduce((e,{path:l,field:c},d)=>{let u;u=(0,i.is)(c,t.Column)?c:(0,i.is)(c,r.SQL)?c.decoder:c.sql.decoder;let h=e;for(let[e,r]of l.entries())if(e<l.length-1)r in h||(h[r]={}),h=h[r];else{let e=n[d],A=h[r]=null===e?null:u.mapFromDriverValue(e);if(a&&(0,i.is)(c,t.Column)&&2===l.length){let e=l[0];e in o?"string"==typeof o[e]&&o[e]!==(0,s.getTableName)(c.table)&&(o[e]=!1):o[e]=null===A&&(0,s.getTableName)(c.table)}}return e},{});if(a&&Object.keys(o).length>0)for(let[e,t]of Object.entries(o))"string"!=typeof t||a[t]||(l[e]=null);return l}function l(e,n){return Object.entries(e).reduce((e,[a,o])=>{if("string"!=typeof a)return e;let c=n?[...n,a]:[a];return(0,i.is)(o,t.Column)||(0,i.is)(o,r.SQL)||(0,i.is)(o,r.SQL.Aliased)?e.push({path:c,field:o}):(0,i.is)(o,s.Table)?e.push(...l(o[s.Table.Symbol.Columns],c)):e.push(...l(o,c)),e},[])}function c(e,t){let i=Object.keys(e),r=Object.keys(t);if(i.length!==r.length)return!1;for(let[e,t]of i.entries())if(t!==r[e])return!1;return!0}function d(e,n){let a=Object.entries(n).filter(([,e])=>void 0!==e).map(([n,a])=>(0,i.is)(a,r.SQL)||(0,i.is)(a,t.Column)?[n,a]:[n,new r.Param(a,e[s.Table.Symbol.Columns][n])]);if(0===a.length)throw Error("No values to set");return Object.fromEntries(a)}function u(e,t){for(let i of t)for(let t of Object.getOwnPropertyNames(i.prototype))"constructor"!==t&&Object.defineProperty(e.prototype,t,Object.getOwnPropertyDescriptor(i.prototype,t)||Object.create(null))}function h(e){return e[s.Table.Symbol.Columns]}function A(e){return(0,i.is)(e,n.Subquery)?e._.alias:(0,i.is)(e,r.View)?e[a.ViewBaseConfig].name:(0,i.is)(e,r.SQL)?void 0:e[s.Table.Symbol.IsAlias]?e[s.Table.Symbol.Name]:e[s.Table.Symbol.BaseName]}function p(e,t){return{name:"string"==typeof e&&e.length>0?e:"",config:"object"==typeof e?e:t}}function f(e){if("object"!=typeof e||null===e||"Object"!==e.constructor.name)return!1;if("logger"in e){let t=typeof e.logger;return"boolean"===t||"object"===t&&"function"==typeof e.logger.logQuery||"undefined"===t}if("schema"in e){let t=typeof e.schema;return"object"===t||"undefined"===t}if("casing"in e){let t=typeof e.casing;return"string"===t||"undefined"===t}if("mode"in e)return"default"===e.mode&&"planetscale"===e.mode&&void 0===e.mode;if("connection"in e){let t=typeof e.connection;return"string"===t||"object"===t||"undefined"===t}if("client"in e){let t=typeof e.client;return"object"===t||"function"===t||"undefined"===t}return 0===Object.keys(e).length}"u"<typeof TextDecoder||new TextDecoder,e.s(["applyMixins",()=>u,"getColumnNameAndConfig",()=>p,"getTableColumns",()=>h,"getTableLikeName",()=>A,"haveSameKeys",()=>c,"isConfig",()=>f,"mapResultRow",()=>o,"mapUpdateSet",()=>d,"orderSelectedFields",()=>l])},146794,153845,895958,607579,431010,500583,744785,453639,30514,809909,978334,425444,900560,554826,216933,238969,794290,394114,e=>{"use strict";var t=e.i(990866),i=e.i(959694),r=t,n=e.i(564115),s=e.i(635536),a=t,o=s;class l extends o.PgColumnBuilder{static [a.entityKind]="PgIntColumnBaseBuilder";generatedAlwaysAsIdentity(e){if(e){let{name:t,...i}=e;this.config.generatedIdentity={type:"always",sequenceName:t,sequenceOptions:i}}else this.config.generatedIdentity={type:"always"};return this.config.hasDefault=!0,this.config.notNull=!0,this}generatedByDefaultAsIdentity(e){if(e){let{name:t,...i}=e;this.config.generatedIdentity={type:"byDefault",sequenceName:t,sequenceOptions:i}}else this.config.generatedIdentity={type:"byDefault"};return this.config.hasDefault=!0,this.config.notNull=!0,this}}class c extends l{static [r.entityKind]="PgBigInt53Builder";constructor(e){super(e,"number","PgBigInt53")}build(e){return new d(e,this.config)}}class d extends s.PgColumn{static [r.entityKind]="PgBigInt53";getSQLType(){return"bigint"}mapFromDriverValue(e){return"number"==typeof e?e:Number(e)}}class u extends l{static [r.entityKind]="PgBigInt64Builder";constructor(e){super(e,"bigint","PgBigInt64")}build(e){return new h(e,this.config)}}class h extends s.PgColumn{static [r.entityKind]="PgBigInt64";getSQLType(){return"bigint"}mapFromDriverValue(e){return BigInt(e)}}function A(e,t){let{name:i,config:r}=(0,n.getColumnNameAndConfig)(e,t);return"number"===r.mode?new c(i):new u(i)}var p=t,f=n,g=s;class m extends g.PgColumnBuilder{static [p.entityKind]="PgBigSerial53Builder";constructor(e){super(e,"number","PgBigSerial53"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new y(e,this.config)}}class y extends g.PgColumn{static [p.entityKind]="PgBigSerial53";getSQLType(){return"bigserial"}mapFromDriverValue(e){return"number"==typeof e?e:Number(e)}}class b extends g.PgColumnBuilder{static [p.entityKind]="PgBigSerial64Builder";constructor(e){super(e,"bigint","PgBigSerial64"),this.config.hasDefault=!0}build(e){return new E(e,this.config)}}class E extends g.PgColumn{static [p.entityKind]="PgBigSerial64";getSQLType(){return"bigserial"}mapFromDriverValue(e){return BigInt(e)}}function C(e,t){let{name:i,config:r}=(0,f.getColumnNameAndConfig)(e,t);return"number"===r.mode?new m(i):new b(i)}var w=t,I=s;class v extends I.PgColumnBuilder{static [w.entityKind]="PgBooleanBuilder";constructor(e){super(e,"boolean","PgBoolean")}build(e){return new B(e,this.config)}}class B extends I.PgColumn{static [w.entityKind]="PgBoolean";getSQLType(){return"boolean"}}function Q(e){return new v(e??"")}e.s(["boolean",()=>Q],153845);var x=t,S=n,k=s;class T extends k.PgColumnBuilder{static [x.entityKind]="PgCharBuilder";constructor(e,t){super(e,"string","PgChar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new N(e,this.config)}}class N extends k.PgColumn{static [x.entityKind]="PgChar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return void 0===this.length?"char":`char(${this.length})`}}function D(e,t={}){let{name:i,config:r}=(0,S.getColumnNameAndConfig)(e,t);return new T(i,r)}var _=t,R=s;class L extends R.PgColumnBuilder{static [_.entityKind]="PgCidrBuilder";constructor(e){super(e,"string","PgCidr")}build(e){return new F(e,this.config)}}class F extends R.PgColumn{static [_.entityKind]="PgCidr";getSQLType(){return"cidr"}}function M(e){return new L(e??"")}var O=t,U=n,P=s;class $ extends P.PgColumnBuilder{static [O.entityKind]="PgCustomColumnBuilder";constructor(e,t,i){super(e,"custom","PgCustomColumn"),this.config.fieldConfig=t,this.config.customTypeParams=i}build(e){return new j(e,this.config)}}class j extends P.PgColumn{static [O.entityKind]="PgCustomColumn";sqlName;mapTo;mapFrom;constructor(e,t){super(e,t),this.sqlName=t.customTypeParams.dataType(t.fieldConfig),this.mapTo=t.customTypeParams.toDriver,this.mapFrom=t.customTypeParams.fromDriver}getSQLType(){return this.sqlName}mapFromDriverValue(e){return"function"==typeof this.mapFrom?this.mapFrom(e):e}mapToDriverValue(e){return"function"==typeof this.mapTo?this.mapTo(e):e}}function H(e){return(t,i)=>{let{name:r,config:n}=(0,U.getColumnNameAndConfig)(t,i);return new $(r,n,e)}}e.s(["customType",()=>H],895958);var q=t,z=n,V=s,G=t,Y=e.i(65054),W=s;class J extends W.PgColumnBuilder{static [G.entityKind]="PgDateColumnBaseBuilder";defaultNow(){return this.default(Y.sql`now()`)}}class K extends J{static [q.entityKind]="PgDateBuilder";constructor(e){super(e,"date","PgDate")}build(e){return new Z(e,this.config)}}class Z extends V.PgColumn{static [q.entityKind]="PgDate";getSQLType(){return"date"}mapFromDriverValue(e){return new Date(e)}mapToDriverValue(e){return e.toISOString()}}class X extends J{static [q.entityKind]="PgDateStringBuilder";constructor(e){super(e,"string","PgDateString")}build(e){return new ee(e,this.config)}}class ee extends V.PgColumn{static [q.entityKind]="PgDateString";getSQLType(){return"date"}}function et(e,t){let{name:i,config:r}=(0,z.getColumnNameAndConfig)(e,t);return r?.mode==="date"?new K(i):new X(i)}e.s(["PgDate",()=>Z,"PgDateString",()=>ee,"date",()=>et],607579);var ei=t,er=s;class en extends er.PgColumnBuilder{static [ei.entityKind]="PgDoublePrecisionBuilder";constructor(e){super(e,"number","PgDoublePrecision")}build(e){return new es(e,this.config)}}class es extends er.PgColumn{static [ei.entityKind]="PgDoublePrecision";getSQLType(){return"double precision"}mapFromDriverValue(e){return"string"==typeof e?Number.parseFloat(e):e}}function ea(e){return new en(e??"")}var eo=t,el=s;class ec extends el.PgColumnBuilder{static [eo.entityKind]="PgInetBuilder";constructor(e){super(e,"string","PgInet")}build(e){return new ed(e,this.config)}}class ed extends el.PgColumn{static [eo.entityKind]="PgInet";getSQLType(){return"inet"}}function eu(e){return new ec(e??"")}var eh=t,eA=s;class ep extends l{static [eh.entityKind]="PgIntegerBuilder";constructor(e){super(e,"number","PgInteger")}build(e){return new ef(e,this.config)}}class ef extends eA.PgColumn{static [eh.entityKind]="PgInteger";getSQLType(){return"integer"}mapFromDriverValue(e){return"string"==typeof e?Number.parseInt(e):e}}function eg(e){return new ep(e??"")}e.s(["integer",()=>eg],431010);var em=t,ey=n,eb=s;class eE extends eb.PgColumnBuilder{static [em.entityKind]="PgIntervalBuilder";constructor(e,t){super(e,"string","PgInterval"),this.config.intervalConfig=t}build(e){return new eC(e,this.config)}}class eC extends eb.PgColumn{static [em.entityKind]="PgInterval";fields=this.config.intervalConfig.fields;precision=this.config.intervalConfig.precision;getSQLType(){let e=this.fields?` ${this.fields}`:"",t=this.precision?`(${this.precision})`:"";return`interval${e}${t}`}}function ew(e,t={}){let{name:i,config:r}=(0,ey.getColumnNameAndConfig)(e,t);return new eE(i,r)}var eI=t,ev=s;class eB extends ev.PgColumnBuilder{static [eI.entityKind]="PgJsonBuilder";constructor(e){super(e,"json","PgJson")}build(e){return new eQ(e,this.config)}}class eQ extends ev.PgColumn{static [eI.entityKind]="PgJson";constructor(e,t){super(e,t)}getSQLType(){return"json"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}}function ex(e){return new eB(e??"")}e.s(["PgJson",()=>eQ,"json",()=>ex],500583);var eS=t,ek=s;class eT extends ek.PgColumnBuilder{static [eS.entityKind]="PgJsonbBuilder";constructor(e){super(e,"json","PgJsonb")}build(e){return new eN(e,this.config)}}class eN extends ek.PgColumn{static [eS.entityKind]="PgJsonb";constructor(e,t){super(e,t)}getSQLType(){return"jsonb"}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){if("string"==typeof e)try{return JSON.parse(e)}catch{}return e}}function eD(e){return new eT(e??"")}e.s(["PgJsonb",()=>eN,"jsonb",()=>eD],744785);var e_=t,eR=n,eL=s;class eF extends eL.PgColumnBuilder{static [e_.entityKind]="PgLineBuilder";constructor(e){super(e,"array","PgLine")}build(e){return new eM(e,this.config)}}class eM extends eL.PgColumn{static [e_.entityKind]="PgLine";getSQLType(){return"line"}mapFromDriverValue(e){let[t,i,r]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(i),Number.parseFloat(r)]}mapToDriverValue(e){return`{${e[0]},${e[1]},${e[2]}}`}}class eO extends eL.PgColumnBuilder{static [e_.entityKind]="PgLineABCBuilder";constructor(e){super(e,"json","PgLineABC")}build(e){return new eU(e,this.config)}}class eU extends eL.PgColumn{static [e_.entityKind]="PgLineABC";getSQLType(){return"line"}mapFromDriverValue(e){let[t,i,r]=e.slice(1,-1).split(",");return{a:Number.parseFloat(t),b:Number.parseFloat(i),c:Number.parseFloat(r)}}mapToDriverValue(e){return`{${e.a},${e.b},${e.c}}`}}function eP(e,t){let{name:i,config:r}=(0,eR.getColumnNameAndConfig)(e,t);return r?.mode&&"tuple"!==r.mode?new eO(i):new eF(i)}var e$=t,ej=s;class eH extends ej.PgColumnBuilder{static [e$.entityKind]="PgMacaddrBuilder";constructor(e){super(e,"string","PgMacaddr")}build(e){return new eq(e,this.config)}}class eq extends ej.PgColumn{static [e$.entityKind]="PgMacaddr";getSQLType(){return"macaddr"}}function ez(e){return new eH(e??"")}var eV=t,eG=s;class eY extends eG.PgColumnBuilder{static [eV.entityKind]="PgMacaddr8Builder";constructor(e){super(e,"string","PgMacaddr8")}build(e){return new eW(e,this.config)}}class eW extends eG.PgColumn{static [eV.entityKind]="PgMacaddr8";getSQLType(){return"macaddr8"}}function eJ(e){return new eY(e??"")}var eK=t,eZ=n,eX=s;class e0 extends eX.PgColumnBuilder{static [eK.entityKind]="PgNumericBuilder";constructor(e,t,i){super(e,"string","PgNumeric"),this.config.precision=t,this.config.scale=i}build(e){return new e1(e,this.config)}}class e1 extends eX.PgColumn{static [eK.entityKind]="PgNumeric";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return"string"==typeof e?e:String(e)}getSQLType(){return void 0!==this.precision&&void 0!==this.scale?`numeric(${this.precision}, ${this.scale})`:void 0===this.precision?"numeric":`numeric(${this.precision})`}}class e2 extends eX.PgColumnBuilder{static [eK.entityKind]="PgNumericNumberBuilder";constructor(e,t,i){super(e,"number","PgNumericNumber"),this.config.precision=t,this.config.scale=i}build(e){return new e4(e,this.config)}}class e4 extends eX.PgColumn{static [eK.entityKind]="PgNumericNumber";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue(e){return"number"==typeof e?e:Number(e)}mapToDriverValue=String;getSQLType(){return void 0!==this.precision&&void 0!==this.scale?`numeric(${this.precision}, ${this.scale})`:void 0===this.precision?"numeric":`numeric(${this.precision})`}}class e5 extends eX.PgColumnBuilder{static [eK.entityKind]="PgNumericBigIntBuilder";constructor(e,t,i){super(e,"bigint","PgNumericBigInt"),this.config.precision=t,this.config.scale=i}build(e){return new e3(e,this.config)}}class e3 extends eX.PgColumn{static [eK.entityKind]="PgNumericBigInt";precision;scale;constructor(e,t){super(e,t),this.precision=t.precision,this.scale=t.scale}mapFromDriverValue=BigInt;mapToDriverValue=String;getSQLType(){return void 0!==this.precision&&void 0!==this.scale?`numeric(${this.precision}, ${this.scale})`:void 0===this.precision?"numeric":`numeric(${this.precision})`}}function e8(e,t){let{name:i,config:r}=(0,eZ.getColumnNameAndConfig)(e,t),n=r?.mode;return"number"===n?new e2(i,r?.precision,r?.scale):"bigint"===n?new e5(i,r?.precision,r?.scale):new e0(i,r?.precision,r?.scale)}e.s(["PgNumeric",()=>e1,"numeric",()=>e8],453639);var e9=t,e6=n,e7=s;class te extends e7.PgColumnBuilder{static [e9.entityKind]="PgPointTupleBuilder";constructor(e){super(e,"array","PgPointTuple")}build(e){return new tt(e,this.config)}}class tt extends e7.PgColumn{static [e9.entityKind]="PgPointTuple";getSQLType(){return"point"}mapFromDriverValue(e){if("string"==typeof e){let[t,i]=e.slice(1,-1).split(",");return[Number.parseFloat(t),Number.parseFloat(i)]}return[e.x,e.y]}mapToDriverValue(e){return`(${e[0]},${e[1]})`}}class ti extends e7.PgColumnBuilder{static [e9.entityKind]="PgPointObjectBuilder";constructor(e){super(e,"json","PgPointObject")}build(e){return new tr(e,this.config)}}class tr extends e7.PgColumn{static [e9.entityKind]="PgPointObject";getSQLType(){return"point"}mapFromDriverValue(e){if("string"==typeof e){let[t,i]=e.slice(1,-1).split(",");return{x:Number.parseFloat(t),y:Number.parseFloat(i)}}return e}mapToDriverValue(e){return`(${e.x},${e.y})`}}function tn(e,t){let{name:i,config:r}=(0,e6.getColumnNameAndConfig)(e,t);return r?.mode&&"tuple"!==r.mode?new ti(i):new te(i)}var ts=t,ta=n,to=s;function tl(e){let t=[];for(let i=0;i<e.length;i+=2)t.push(Number.parseInt(e.slice(i,i+2),16));return new Uint8Array(t)}function tc(e,t){let i=new DataView(new ArrayBuffer(8));for(let r=0;r<8;r++)i.setUint8(r,e[t+r]);return i.getFloat64(0,!0)}function td(e){let t,i=tl(e),r=0,n=i[0];r+=1;let s=new DataView(i.buffer),a=s.getUint32(r,1===n);if(r+=4,0x20000000&a&&(t=s.getUint32(r,1===n),r+=4),(65535&a)==1){let e=tc(i,r),t=tc(i,r+=8);return r+=8,[e,t]}throw Error("Unsupported geometry type")}e.s(["parseEWKB",()=>td],30514);class tu extends to.PgColumnBuilder{static [ts.entityKind]="PgGeometryBuilder";constructor(e){super(e,"array","PgGeometry")}build(e){return new th(e,this.config)}}class th extends to.PgColumn{static [ts.entityKind]="PgGeometry";getSQLType(){return"geometry(point)"}mapFromDriverValue(e){return td(e)}mapToDriverValue(e){return`point(${e[0]} ${e[1]})`}}class tA extends to.PgColumnBuilder{static [ts.entityKind]="PgGeometryObjectBuilder";constructor(e){super(e,"json","PgGeometryObject")}build(e){return new tp(e,this.config)}}class tp extends to.PgColumn{static [ts.entityKind]="PgGeometryObject";getSQLType(){return"geometry(point)"}mapFromDriverValue(e){let t=td(e);return{x:t[0],y:t[1]}}mapToDriverValue(e){return`point(${e.x} ${e.y})`}}function tf(e,t){let{name:i,config:r}=(0,ta.getColumnNameAndConfig)(e,t);return r?.mode&&"tuple"!==r.mode?new tA(i):new tu(i)}var tg=t,tm=s;class ty extends tm.PgColumnBuilder{static [tg.entityKind]="PgRealBuilder";constructor(e,t){super(e,"number","PgReal"),this.config.length=t}build(e){return new tb(e,this.config)}}class tb extends tm.PgColumn{static [tg.entityKind]="PgReal";constructor(e,t){super(e,t)}getSQLType(){return"real"}mapFromDriverValue=e=>"string"==typeof e?Number.parseFloat(e):e}function tE(e){return new ty(e??"")}var tC=t,tw=s;class tI extends tw.PgColumnBuilder{static [tC.entityKind]="PgSerialBuilder";constructor(e){super(e,"number","PgSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new tv(e,this.config)}}class tv extends tw.PgColumn{static [tC.entityKind]="PgSerial";getSQLType(){return"serial"}}function tB(e){return new tI(e??"")}e.s(["serial",()=>tB],809909);var tQ=t,tx=s;class tS extends l{static [tQ.entityKind]="PgSmallIntBuilder";constructor(e){super(e,"number","PgSmallInt")}build(e){return new tk(e,this.config)}}class tk extends tx.PgColumn{static [tQ.entityKind]="PgSmallInt";getSQLType(){return"smallint"}mapFromDriverValue=e=>"string"==typeof e?Number(e):e}function tT(e){return new tS(e??"")}var tN=t,tD=s;class t_ extends tD.PgColumnBuilder{static [tN.entityKind]="PgSmallSerialBuilder";constructor(e){super(e,"number","PgSmallSerial"),this.config.hasDefault=!0,this.config.notNull=!0}build(e){return new tR(e,this.config)}}class tR extends tD.PgColumn{static [tN.entityKind]="PgSmallSerial";getSQLType(){return"smallserial"}}function tL(e){return new t_(e??"")}var tF=t,tM=n,tO=s;class tU extends tO.PgColumnBuilder{static [tF.entityKind]="PgTextBuilder";constructor(e,t){super(e,"string","PgText"),this.config.enumValues=t.enum}build(e){return new tP(e,this.config)}}class tP extends tO.PgColumn{static [tF.entityKind]="PgText";enumValues=this.config.enumValues;getSQLType(){return"text"}}function t$(e,t={}){let{name:i,config:r}=(0,tM.getColumnNameAndConfig)(e,t);return new tU(i,r)}e.s(["text",()=>t$],978334);var tj=t,tH=n,tq=s;class tz extends J{constructor(e,t,i){super(e,"string","PgTime"),this.withTimezone=t,this.precision=i,this.config.withTimezone=t,this.config.precision=i}static [tj.entityKind]="PgTimeBuilder";build(e){return new tV(e,this.config)}}class tV extends tq.PgColumn{static [tj.entityKind]="PgTime";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=void 0===this.precision?"":`(${this.precision})`;return`time${e}${this.withTimezone?" with time zone":""}`}}function tG(e,t={}){let{name:i,config:r}=(0,tH.getColumnNameAndConfig)(e,t);return new tz(i,r.withTimezone??!1,r.precision)}e.s(["PgTime",()=>tV,"time",()=>tG],425444);var tY=t,tW=n,tJ=s;class tK extends J{static [tY.entityKind]="PgTimestampBuilder";constructor(e,t,i){super(e,"date","PgTimestamp"),this.config.withTimezone=t,this.config.precision=i}build(e){return new tZ(e,this.config)}}class tZ extends tJ.PgColumn{static [tY.entityKind]="PgTimestamp";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=void 0===this.precision?"":` (${this.precision})`;return`timestamp${e}${this.withTimezone?" with time zone":""}`}mapFromDriverValue=e=>new Date(this.withTimezone?e:e+"+0000");mapToDriverValue=e=>e.toISOString()}class tX extends J{static [tY.entityKind]="PgTimestampStringBuilder";constructor(e,t,i){super(e,"string","PgTimestampString"),this.config.withTimezone=t,this.config.precision=i}build(e){return new t0(e,this.config)}}class t0 extends tJ.PgColumn{static [tY.entityKind]="PgTimestampString";withTimezone;precision;constructor(e,t){super(e,t),this.withTimezone=t.withTimezone,this.precision=t.precision}getSQLType(){let e=void 0===this.precision?"":`(${this.precision})`;return`timestamp${e}${this.withTimezone?" with time zone":""}`}}function t1(e,t={}){let{name:i,config:r}=(0,tW.getColumnNameAndConfig)(e,t);return r?.mode==="string"?new tX(i,r.withTimezone??!1,r.precision):new tK(i,r?.withTimezone??!1,r?.precision)}e.s(["PgTimestamp",()=>tZ,"PgTimestampString",()=>t0,"timestamp",()=>t1],900560);var t2=e.i(820874),t4=t,t5=n,t3=s;class t8 extends t3.PgColumnBuilder{static [t4.entityKind]="PgVarcharBuilder";constructor(e,t){super(e,"string","PgVarchar"),this.config.length=t.length,this.config.enumValues=t.enum}build(e){return new t9(e,this.config)}}class t9 extends t3.PgColumn{static [t4.entityKind]="PgVarchar";length=this.config.length;enumValues=this.config.enumValues;getSQLType(){return void 0===this.length?"varchar":`varchar(${this.length})`}}function t6(e,t={}){let{name:i,config:r}=(0,t5.getColumnNameAndConfig)(e,t);return new t8(i,r)}e.s(["varchar",()=>t6],554826);var t7=t,ie=n,it=s;class ii extends it.PgColumnBuilder{static [t7.entityKind]="PgBinaryVectorBuilder";constructor(e,t){super(e,"string","PgBinaryVector"),this.config.dimensions=t.dimensions}build(e){return new ir(e,this.config)}}class ir extends it.PgColumn{static [t7.entityKind]="PgBinaryVector";dimensions=this.config.dimensions;getSQLType(){return`bit(${this.dimensions})`}}function is(e,t){let{name:i,config:r}=(0,ie.getColumnNameAndConfig)(e,t);return new ii(i,r)}e.s(["bit",()=>is],216933);var ia=t,io=n,il=s;class ic extends il.PgColumnBuilder{static [ia.entityKind]="PgHalfVectorBuilder";constructor(e,t){super(e,"array","PgHalfVector"),this.config.dimensions=t.dimensions}build(e){return new id(e,this.config)}}class id extends il.PgColumn{static [ia.entityKind]="PgHalfVector";dimensions=this.config.dimensions;getSQLType(){return`halfvec(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(e=>Number.parseFloat(e))}}function iu(e,t){let{name:i,config:r}=(0,io.getColumnNameAndConfig)(e,t);return new ic(i,r)}e.s(["halfvec",()=>iu],238969);var ih=t,iA=n,ip=s;class ig extends ip.PgColumnBuilder{static [ih.entityKind]="PgSparseVectorBuilder";constructor(e,t){super(e,"string","PgSparseVector"),this.config.dimensions=t.dimensions}build(e){return new im(e,this.config)}}class im extends ip.PgColumn{static [ih.entityKind]="PgSparseVector";dimensions=this.config.dimensions;getSQLType(){return`sparsevec(${this.dimensions})`}}function iy(e,t){let{name:i,config:r}=(0,iA.getColumnNameAndConfig)(e,t);return new ig(i,r)}e.s(["sparsevec",()=>iy],794290);var ib=t,iE=n,iC=s;class iw extends iC.PgColumnBuilder{static [ib.entityKind]="PgVectorBuilder";constructor(e,t){super(e,"array","PgVector"),this.config.dimensions=t.dimensions}build(e){return new iI(e,this.config)}}class iI extends iC.PgColumn{static [ib.entityKind]="PgVector";dimensions=this.config.dimensions;getSQLType(){return`vector(${this.dimensions})`}mapToDriverValue(e){return JSON.stringify(e)}mapFromDriverValue(e){return e.slice(1,-1).split(",").map(e=>Number.parseFloat(e))}}function iv(e,t){let{name:i,config:r}=(0,iE.getColumnNameAndConfig)(e,t);return new iw(i,r)}function iB(){return{bigint:A,bigserial:C,boolean:Q,char:D,cidr:M,customType:H,date:et,doublePrecision:ea,inet:eu,integer:eg,interval:ew,json:ex,jsonb:eD,line:eP,macaddr:ez,macaddr8:eJ,numeric:e8,point:tn,geometry:tf,real:tE,serial:tB,smallint:tT,smallserial:tL,text:t$,time:tG,timestamp:t1,uuid:t2.uuid,varchar:t6,bit:is,halfvec:iu,sparsevec:iy,vector:iv}}e.s(["vector",()=>iv],394114);let iQ=Symbol.for("drizzle:PgInlineForeignKeys"),ix=Symbol.for("drizzle:EnableRLS");class iS extends i.Table{static [t.entityKind]="PgTable";static Symbol=Object.assign({},i.Table.Symbol,{InlineForeignKeys:iQ,EnableRLS:ix});[iQ]=[];[ix]=!1;[i.Table.Symbol.ExtraConfigBuilder]=void 0;[i.Table.Symbol.ExtraConfigColumns]={}}function ik(e,t,r,n,s=e){let a=new iS(e,n,s),o="function"==typeof t?t(iB()):t,l=Object.fromEntries(Object.entries(o).map(([e,t])=>{let i=t;i.setName(e);let r=i.build(a);return a[iQ].push(...i.buildForeignKeys(r,a)),[e,r]})),c=Object.fromEntries(Object.entries(o).map(([e,t])=>{let i=t;return i.setName(e),[e,i.buildExtraConfigColumn(a)]})),d=Object.assign(a,l);return d[i.Table.Symbol.Columns]=l,d[i.Table.Symbol.ExtraConfigColumns]=c,r&&(d[iS.Symbol.ExtraConfigBuilder]=r),Object.assign(d,{enableRLS:()=>(d[iS.Symbol.EnableRLS]=!0,d)})}let iT=(e,t,i)=>ik(e,t,i,void 0);e.s(["PgTable",()=>iS,"pgTable",()=>iT,"pgTableWithSchema",()=>ik],146794)},44679,254552,e=>{"use strict";var t=e.i(959694),i=e.i(586210),r=e.i(990866),n=r,s=e.i(146794);class a{static [n.entityKind]="PgPrimaryKeyBuilder";columns;name;constructor(e,t){this.columns=e,this.name=t}build(e){return new o(e,this.columns,this.name)}}class o{constructor(e,t,i){this.table=e,this.columns=t,this.name=i}static [n.entityKind]="PgPrimaryKey";columns;name;getName(){return this.name??`${this.table[s.PgTable.Symbol.Name]}_${this.columns.map(e=>e.name).join("_")}_pk`}}e.s(["PrimaryKeyBuilder",()=>a],254552);var l=e.i(226836),c=e.i(878719),d=e.i(65054);class u{constructor(e,i,r){this.sourceTable=e,this.referencedTable=i,this.relationName=r,this.referencedTableName=i[t.Table.Symbol.Name]}static [r.entityKind]="Relation";referencedTableName;fieldName}class h{constructor(e,t){this.table=e,this.config=t}static [r.entityKind]="Relations"}class A extends u{constructor(e,t,i,r){super(e,t,i?.relationName),this.config=i,this.isNullable=r}static [r.entityKind]="One";withFieldName(e){let t=new A(this.sourceTable,this.referencedTable,this.config,this.isNullable);return t.fieldName=e,t}}class p extends u{constructor(e,t,i){super(e,t,i?.relationName),this.config=i}static [r.entityKind]="Many";withFieldName(e){let t=new p(this.sourceTable,this.referencedTable,this.config);return t.fieldName=e,t}}function f(){return{and:l.and,between:l.between,eq:l.eq,exists:l.exists,gt:l.gt,gte:l.gte,ilike:l.ilike,inArray:l.inArray,isNull:l.isNull,isNotNull:l.isNotNull,like:l.like,lt:l.lt,lte:l.lte,ne:l.ne,not:l.not,notBetween:l.notBetween,notExists:l.notExists,notLike:l.notLike,notIlike:l.notIlike,notInArray:l.notInArray,or:l.or,sql:d.sql}}function g(){return{sql:d.sql,asc:c.asc,desc:c.desc}}function m(e,i){1===Object.keys(e).length&&"default"in e&&!(0,r.is)(e.default,t.Table)&&(e=e.default);let n={},s={},o={};for(let[l,c]of Object.entries(e))if((0,r.is)(c,t.Table)){let e=(0,t.getTableUniqueName)(c),i=s[e];for(let r of(n[e]=l,o[l]={tsName:l,dbName:c[t.Table.Symbol.Name],schema:c[t.Table.Symbol.Schema],columns:c[t.Table.Symbol.Columns],relations:i?.relations??{},primaryKey:i?.primaryKey??[]},Object.values(c[t.Table.Symbol.Columns])))r.primary&&o[l].primaryKey.push(r);let d=c[t.Table.Symbol.ExtraConfigBuilder]?.(c[t.Table.Symbol.ExtraConfigColumns]);if(d)for(let e of Object.values(d))(0,r.is)(e,a)&&o[l].primaryKey.push(...e.columns)}else if((0,r.is)(c,h)){let e,r=(0,t.getTableUniqueName)(c.table),a=n[r];for(let[t,n]of Object.entries(c.config(i(c.table))))if(a){let i=o[a];i.relations[t]=n,e&&i.primaryKey.push(...e)}else r in s||(s[r]={relations:{},primaryKey:e}),s[r].relations[t]=n}return{tables:o,tableNamesMap:n}}function y(e,t){return new h(e,e=>Object.fromEntries(Object.entries(t(e)).map(([e,t])=>[e,t.withFieldName(e)])))}function b(e){return function(t,i){return new A(e,t,i,i?.fields.reduce((e,t)=>e&&t.notNull,!0)??!1)}}function E(e){return function(t,i){return new p(e,t,i)}}function C(e,i,n){if((0,r.is)(n,A)&&n.config)return{fields:n.config.fields,references:n.config.references};let s=i[(0,t.getTableUniqueName)(n.referencedTable)];if(!s)throw Error(`Table "${n.referencedTable[t.Table.Symbol.Name]}" not found in schema`);let a=e[s];if(!a)throw Error(`Table "${s}" not found in schema`);let o=n.sourceTable,l=i[(0,t.getTableUniqueName)(o)];if(!l)throw Error(`Table "${o[t.Table.Symbol.Name]}" not found in schema`);let c=[];for(let e of Object.values(a.relations))(n.relationName&&n!==e&&e.relationName===n.relationName||!n.relationName&&e.referencedTable===n.sourceTable)&&c.push(e);if(c.length>1)throw n.relationName?Error(`There are multiple relations with name "${n.relationName}" in table "${s}"`):Error(`There are multiple relations between "${s}" and "${n.sourceTable[t.Table.Symbol.Name]}". Please specify relation name`);if(c[0]&&(0,r.is)(c[0],A)&&c[0].config)return{fields:c[0].config.references,references:c[0].config.fields};throw Error(`There is not enough information to infer relation "${l}.${n.fieldName}"`)}function w(e){return{one:b(e),many:E(e)}}function I(e,t,n,s,a=e=>e){let o={};for(let[l,c]of s.entries())if(c.isJson){let i=t.relations[c.tsKey],s=n[l],d="string"==typeof s?JSON.parse(s):s;o[c.tsKey]=(0,r.is)(i,A)?d&&I(e,e[c.relationTableTsKey],d,c.selection,a):d.map(t=>I(e,e[c.relationTableTsKey],t,c.selection,a))}else{let e,t=a(n[l]),s=c.field;e=(0,r.is)(s,i.Column)?s:(0,r.is)(s,d.SQL)?s.decoder:s.sql.decoder,o[c.tsKey]=null===t?null:e.mapFromDriverValue(t)}return o}e.s(["Many",()=>p,"One",()=>A,"createTableRelationsHelpers",()=>w,"extractTablesRelationalConfig",()=>m,"getOperators",()=>f,"getOrderByOperators",()=>g,"mapRelationalRow",()=>I,"normalizeRelation",()=>C,"relations",()=>y],44679)},750672,e=>{"use strict";var t=e.i(65054),i=e.i(990866),r=e.i(635536);class n{constructor(e,t){this.unique=e,this.name=t}static [i.entityKind]="PgIndexBuilderOn";on(...e){return new s(e.map(e=>{if((0,i.is)(e,t.SQL))return e;let n=new r.IndexedColumn(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=JSON.parse(JSON.stringify(e.defaultConfig)),n}),this.unique,!1,this.name)}onOnly(...e){return new s(e.map(e=>{if((0,i.is)(e,t.SQL))return e;let n=new r.IndexedColumn(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=e.defaultConfig,n}),this.unique,!0,this.name)}using(e,...n){return new s(n.map(e=>{if((0,i.is)(e,t.SQL))return e;let n=new r.IndexedColumn(e.name,!!e.keyAsName,e.columnType,e.indexConfig);return e.indexConfig=JSON.parse(JSON.stringify(e.defaultConfig)),n}),this.unique,!0,this.name,e)}}class s{static [i.entityKind]="PgIndexBuilder";config;constructor(e,t,i,r,n="btree"){this.config={name:r,columns:e,unique:t,only:i,method:n}}concurrently(){return this.config.concurrently=!0,this}with(e){return this.config.with=e,this}where(e){return this.config.where=e,this}build(e){return new a(this.config,e)}}class a{static [i.entityKind]="PgIndex";config;constructor(e,t){this.config={...e,table:t}}}function o(e){return new n(!1,e)}function l(e){return new n(!0,e)}e.s(["IndexBuilder",()=>s,"index",()=>o,"uniqueIndex",()=>l])},699449,e=>{"use strict";var t=e.i(44679);let i=({adapter:e})=>{for(let i in e.rawRelations){let r=e.rawRelations[i];e.relations[`relations_${i}`]=(0,t.relations)(e.tables[i],({many:t,one:i})=>{let n={};for(let s in r){let a=r[s];"one"===a.type?n[s]=i(e.tables[a.to],{fields:a.fields.map(t=>e.tables[t.table][t.name]),references:a.references.map(t=>e.tables[a.to][t]),relationName:a.relationName}):e.tables[a.to]&&(n[s]=t(e.tables[a.to],{relationName:a.relationName}))}return n})}};var r=e.i(391033);let n=({indexes:e})=>e.map(e=>({fields:e.fields.map(({field:e,localizedPath:t,path:i,pathHasLocalized:r})=>({field:e,localizedPath:`version.${t}`,path:`version.${i}`,pathHasLocalized:r})),unique:!1}));var s=e.i(201803),a=e.i(974605),o=e.i(477426),l=e.i(700859),c=o;let d=({adapter:e,config:{name:t,slug:i},config:r,parentTableName:n,prefix:s="",target:a="dbName",throwValidationError:o=!1,versions:d=!1,versionsCustomName:u=!1})=>{let h,A=r[a],p=`${s}${(0,c.default)(t??i)}`;d&&(p=`_${p}${e.versionsSuffix}`),A||"enumName"!==a||(A=r.dbName),A&&(h="function"==typeof A?A({tableName:n}):A,u&&(h=`_${h}${e.versionsSuffix}`));let f=h||p;if(e.tableNameMap.set(p,f),!o)return f;if(f.length>63)throw new l.APIError(`Exceeded max identifier length for table or enum name of 63 characters. Invalid name: ${f}.
|
||
Tip: You can use the dbName property to reduce the table name length.
|
||
`);return f},u=({name:e,adapter:t,appendSuffix:i=!0,number:r=0})=>{let n=`${e}${r?`_${r}`:""}${i?"_idx":""}`;if(n.length>60){let t=`${r?`_${r}`:""}${i?"_idx":""}`;n=`${e.slice(0,60-t.length)}${t}`}return t.indexes.has(n)||n in t.rawTables?u({name:e,adapter:t,appendSuffix:i,number:r+1}):(t.indexes.add(n),n)};var h=e.i(267522),A=o;let p=({name:e,adapter:t,number:i=0})=>{let r=`${e}${i?`_${i}`:""}_fk`;if(r.length>60){let t=`${i?`_${i}`:""}_fk`;r=`${e.slice(0,60-t.length)}${t}`}return t.foreignKeys.has(r)?p({name:e,adapter:t,number:i+1}):(t.foreignKeys.add(r),r)};var f=h,g=e.i(186725),m=o,y=e.i(999110),b=g;let E=({fields:e,parentIsLocalized:t})=>e.some(e=>"array"!==e.type&&(!!((0,b.fieldAffectsData)(e)&&(0,b.fieldShouldBeLocalized)({field:e,parentIsLocalized:t}))||((0,b.fieldHasSubFields)(e)?E({fields:e.fields,parentIsLocalized:t||"localized"in e&&e.localized}):"tabs"===e.type&&e.tabs.some(e=>E({fields:e.fields,parentIsLocalized:t||e.localized})))));var C=e.i(207976);let w=e=>e.map(e=>"name"in e&&"id"===e.name?{...e,name:"_uuid"}:e),I=(e,t)=>void 0===t.defaultValue||"function"==typeof t.defaultValue?e:{...e,default:t.defaultValue},v=({adapter:e,blocksTableNameMap:t,columnPrefix:i,columns:r,disableNotNull:n,disableRelsTableUnique:s,disableUnique:a=!1,fieldPrefix:o,fields:l,forceLocalized:c,indexes:h,localesColumns:A,localesIndexes:p,newTableName:b,parentIsLocalized:Q,parentTableName:x,relationships:S,relationsToBuild:k,rootRelationsToBuild:T,rootTableIDColType:N,rootTableName:D,setColumnID:_,uniqueRelationships:R,versions:L,withinLocalizedArrayOrBlock:F})=>{let M=!0,O=!1,U=!1,P=!1,$=!1,j=!1,H=!1,q="integer",z=r.id;return z&&["numeric","text","uuid","varchar"].includes(z.type)&&(q=z.type),l.forEach(l=>{if("name"in l&&"id"===l.name||(0,g.fieldIsVirtual)(l))return;let z=r,V=h,G=`${i||""}${"_"===l.name[0]?"_":""}${(0,m.default)(l.name)}`,Y=`${o?.replace(".","_")||""}${l.name}`,W=(0,g.fieldShouldBeLocalized)({field:l,parentIsLocalized:Q});if(e.payload.config.localization&&(W||c)&&"array"!==l.type&&("blocks"!==l.type||e.blocksAsJSON)&&("hasMany"in l&&!0!==l.hasMany||!("hasMany"in l))&&(O=!0,z=A,V=p),(l.unique||l.index||["relationship","upload"].includes(l.type))&&!["array","blocks","group"].includes(l.type)&&!("hasMany"in l&&!0===l.hasMany)&&!("relationTo"in l&&Array.isArray(l.relationTo))){let t=!0!==a&&l.unique;if(t){let t=`${o||""}${l.name}`;e.fieldConstraints?.[D]||(e.fieldConstraints[D]={}),e.fieldConstraints[D][`${G}_idx`]=t}let i=u({name:`${b}_${G}`,adapter:e});V[i]={name:i,on:W?[Y,"_locale"]:Y,unique:t}}switch(l.type){case"array":{let i=!!l.admin?.condition||n,r=d({adapter:e,config:l,parentTableName:b,prefix:`${b}_`,throwValidationError:M,versionsCustomName:L}),s={_order:{name:"_order",type:"integer",notNull:!0},_parentID:{name:"_parent_id",type:q,notNull:!0}},o={_orderIdx:{name:`${r}_order_idx`,on:["_order"]},_parentIDIdx:{name:`${r}_parent_id_idx`,on:"_parentID"}},u={_parentIDFk:{name:`${r}_parent_id_fk`,columns:["_parentID"],foreignColumns:[{name:"id",table:x}],onDelete:"cascade"}},h=!!(W&&e.payload.config.localization)||F||c;h&&(s._locale={name:"_locale",type:"enum",locale:!0,notNull:!0},o._localeIdx={name:`${r}_locale_idx`,on:"_locale"});let{hasLocalizedManyNumberField:A,hasLocalizedManyTextField:p,hasLocalizedRelationshipField:f,hasManyNumberField:g,hasManyTextField:m,relationsToBuild:C}=B({adapter:e,baseColumns:s,baseForeignKeys:u,baseIndexes:o,blocksTableNameMap:t,disableNotNull:i,disableRelsTableUnique:!0,disableUnique:a,fields:a?w(l.flattenedFields):l.flattenedFields,parentIsLocalized:Q||l.localized,rootRelationships:S,rootRelationsToBuild:T,rootTableIDColType:N,rootTableName:D,rootUniqueRelationships:R,setColumnID:_,tableName:r,versions:L,withinLocalizedArrayOrBlock:h});A&&(H=A),f&&(U=f),p&&($=p),m&&(!P||"index"===m)&&(P=m),g&&(!j||"index"===g)&&(j=g);let I=(0,y.getArrayRelationName)({field:l,path:Y,tableName:r});k.set(I,{type:"many",localized:!1,target:r});let v={_parentID:{type:"one",fields:[{name:"_parentID",table:r}],references:["id"],relationName:I,to:x}};E({fields:l.fields,parentIsLocalized:Q||l.localized})&&(v._locales={type:"many",relationName:"_locales",to:`${r}${e.localesSuffix}`}),C.forEach(({type:t,localized:i,target:n},s)=>{if("one"===t){let t=i?`${r}${e.localesSuffix}`:r;v[s]={type:"one",fields:[{name:s,table:t}],references:["id"],relationName:s,to:n}}"many"===t&&(v[s]={type:"many",relationName:s,to:n})}),e.rawRelations[r]=v;break}case"blocks":{if(e.blocksAsJSON){z[Y]=I({name:G,type:"jsonb"},l);break}let i=!!l.admin?.condition||n;(l.blockReferences??l.blocks).forEach(r=>{let n="string"==typeof r?e.payload.blocks[r]:r,s=d({adapter:e,config:n,parentTableName:D,prefix:`${D}_blocks_`,throwValidationError:M,versionsCustomName:L});void 0===t[s]?t[s]=1:e.rawTables[s]&&(0,C.validateExistingBlockIsIdentical)({block:n,localized:l.localized,rootTableName:D,table:e.rawTables[s],tableLocales:e.rawTables[`${s}${e.localesSuffix}`]})||(t[s]++,(0,C.setInternalBlockIndex)(n,t[s]),s=`${s}_${t[s]}`);let o=`_blocks_${n.slug}`;if(void 0!==n[C.InternalBlockTableNameIndex]&&(o=`_blocks_${n.slug}_${n[C.InternalBlockTableNameIndex]}`),!e.rawTables[s]){let r={_order:{name:"_order",type:"integer",notNull:!0},_parentID:{name:"_parent_id",type:N,notNull:!0},_path:{name:"_path",type:"text",notNull:!0}},d={_orderIdx:{name:`${s}_order_idx`,on:"_order"},_parentIDIdx:{name:`${s}_parent_id_idx`,on:["_parentID"]},_pathIdx:{name:`${s}_path_idx`,on:"_path"}},u={_parentIdFk:{name:`${s}_parent_id_fk`,columns:["_parentID"],foreignColumns:[{name:"id",table:D}],onDelete:"cascade"}},h=!!(W&&e.payload.config.localization)||F||c;h&&(r._locale={name:"_locale",type:"enum",locale:!0,notNull:!0},d._localeIdx={name:`${s}_locale_idx`,on:"_locale"});let{hasLocalizedManyNumberField:A,hasLocalizedManyTextField:p,hasLocalizedRelationshipField:f,hasManyNumberField:g,hasManyTextField:m,relationsToBuild:y}=B({adapter:e,baseColumns:r,baseForeignKeys:u,baseIndexes:d,blocksTableNameMap:t,disableNotNull:i,disableRelsTableUnique:!0,disableUnique:a,fields:a?w(n.flattenedFields):n.flattenedFields,parentIsLocalized:Q||l.localized,rootRelationships:S,rootRelationsToBuild:T,rootTableIDColType:N,rootTableName:D,rootUniqueRelationships:R,setColumnID:_,tableName:s,versions:L,withinLocalizedArrayOrBlock:h});A&&(H=A),f&&(U=f),p&&($=p),m&&(!P||"index"===m)&&(P=m),g&&(!j||"index"===g)&&(j=g);let b={_parentID:{type:"one",fields:[{name:"_parentID",table:s}],references:["id"],relationName:o,to:D}};E({fields:n.fields,parentIsLocalized:Q||l.localized})&&(b._locales={type:"many",relationName:"_locales",to:`${s}${e.localesSuffix}`}),y.forEach(({type:t,localized:i,target:r},n)=>{if("one"===t){let t=i?`${s}${e.localesSuffix}`:s;b[n]={type:"one",fields:[{name:n,table:t}],references:["id"],relationName:n,to:r}}"many"===t&&(b[n]={type:"many",relationName:n,to:r})}),e.rawRelations[s]=b}T.set(o,{type:"many",localized:!1,target:s})});break}case"checkbox":z[Y]=I({name:G,type:"boolean"},l);break;case"code":case"email":case"textarea":z[Y]=I({name:G,type:"varchar"},l);break;case"date":z[Y]=I({name:G,type:"timestamp",mode:"string",precision:3,withTimezone:!0},l);break;case"group":case"tab":{let{hasLocalizedField:i,hasLocalizedManyNumberField:s,hasLocalizedManyTextField:o,hasLocalizedRelationshipField:d,hasManyNumberField:u,hasManyTextField:f}=v({adapter:e,blocksTableNameMap:t,columnPrefix:`${G}_`,columns:r,disableNotNull:!!l.admin?.condition||n,disableUnique:a,fieldPrefix:`${Y}.`,fields:l.flattenedFields,forceLocalized:W||!!c,indexes:h,localesColumns:A,localesIndexes:p,newTableName:`${x}_${G}`,parentIsLocalized:Q||l.localized,parentTableName:x,relationships:S,relationsToBuild:k,rootRelationsToBuild:T,rootTableIDColType:N,rootTableName:D,setColumnID:_,uniqueRelationships:R,versions:L,withinLocalizedArrayOrBlock:F||W});i&&(O=!0),d&&(U=!0),f&&(P=!0),o&&($=!0),u&&(j=!0),s&&(H=!0);break}case"json":case"richText":z[Y]=I({name:G,type:"jsonb"},l);break;case"number":if(l.hasMany){if((W&&e.payload.config.localization||F||c)&&(H=!0),l.index?j="index":j||(j=!0),l.unique)throw new f.InvalidConfiguration("Unique is not supported in Postgres for hasMany number fields.")}else z[Y]=I({name:G,type:"numeric"},l);break;case"point":z[Y]=I({name:G,type:"geometry"},l);break;case"radio":case"select":{let i=d({adapter:e,config:l,parentTableName:b,prefix:`enum_${b}_`,target:"enumName",throwValidationError:M}),r=l.options.map(e=>(0,g.optionIsObject)(e)?e.value:e);if("select"===l.type&&l.hasMany){let i=d({adapter:e,config:l,parentTableName:b,prefix:`${b}_`,throwValidationError:M,versionsCustomName:L}),s={order:{name:"order",type:"integer",notNull:!0},parent:{name:"parent_id",type:q,notNull:!0},value:{name:"value",type:"enum",enumName:d({adapter:e,config:l,parentTableName:b,prefix:`enum_${b}_`,target:"enumName",throwValidationError:M}),options:r}},o={orderIdx:{name:`${i}_order_idx`,on:"order"},parentIdx:{name:`${i}_parent_idx`,on:"parent"}},u={parentFk:{name:`${i}_parent_fk`,columns:["parent"],foreignColumns:[{name:"id",table:x}],onDelete:"cascade"}};(W&&e.payload.config.localization||F||c)&&(s.locale={name:"locale",type:"enum",locale:!0,notNull:!0},o.localeIdx={name:`${i}_locale_idx`,on:"locale"}),l.index&&(o.value={name:`${i}_value_idx`,on:"value"}),B({adapter:e,baseColumns:s,baseForeignKeys:u,baseIndexes:o,blocksTableNameMap:t,disableNotNull:n,disableUnique:a,fields:[],parentIsLocalized:Q||l.localized,rootTableName:D,setColumnID:_,tableName:i,versions:L}),k.set(Y,{type:"many",localized:!1,target:i}),e.rawRelations[i]={parent:{type:"one",fields:[{name:"parent",table:i}],references:["id"],relationName:Y,to:x}}}else z[Y]=I({name:G,type:"enum",enumName:i,options:r},l);break}case"relationship":case"upload":if(Array.isArray(l.relationTo))l.relationTo.forEach(e=>{S.add(e),!l.unique||a||s||R.add(e)});else if(l.hasMany)S.add(l.relationTo),!l.unique||a||s||R.add(l.relationTo);else{let t=e.payload.collections[l.relationTo].config,i=e.tableNameMap.get((0,m.default)(l.relationTo)),r="uuid"===e.idType?"uuid":"integer",s=t.fields.find(e=>(0,g.fieldAffectsData)(e)&&"id"===e.name);s?.type==="number"&&(r="numeric"),s?.type==="text"&&(r="varchar"),z[Y]={name:`${G}_id`,type:r,reference:{name:"id",onDelete:"set null",table:i}},k.set(Y,{type:"one",localized:e.payload.config.localization&&(W||c),target:i}),n||!l.required||l.admin?.condition||(z[Y].notNull=!0);break}(W&&e.payload.config.localization||F)&&(U=!0);break;case"text":if(l.hasMany){if((W&&e.payload.config.localization||F||c)&&($=!0),l.index?P="index":P||(P=!0),l.unique)throw new f.InvalidConfiguration("Unique is not supported in Postgres for hasMany text fields.")}else z[Y]=I({name:G,type:"varchar"},l)}let J=l.admin&&l.admin.condition;!n&&z[Y]&&"required"in l&&l.required&&!J&&(z[Y].notNull=!0)}),{hasLocalizedField:O,hasLocalizedManyNumberField:H,hasLocalizedManyTextField:$,hasLocalizedRelationshipField:U,hasManyNumberField:j,hasManyTextField:P}},B=({adapter:e,baseColumns:t={},baseForeignKeys:i={},baseIndexes:r={},blocksTableNameMap:n,compoundIndexes:s,disableNotNull:a,disableRelsTableUnique:o=!1,disableUnique:l=!1,fields:c,parentIsLocalized:f,rootRelationships:g,rootRelationsToBuild:m,rootTableIDColType:y,rootTableName:b,rootUniqueRelationships:E,setColumnID:C,tableName:w,timestamps:I,versions:B,withinLocalizedArrayOrBlock:Q})=>{let x,S,k,T,N=!b,D=b||w,_=t,R=r,L={},F={},M=g||new Set,O=E||new Set,U=new Map,P=C({adapter:e,columns:_,fields:c}),{hasLocalizedField:$,hasLocalizedManyNumberField:j,hasLocalizedManyTextField:H,hasLocalizedRelationshipField:q,hasManyNumberField:z,hasManyTextField:V}=v({adapter:e,blocksTableNameMap:n,columns:_,disableNotNull:a,disableRelsTableUnique:o,disableUnique:l,fields:c,indexes:R,localesColumns:L,localesIndexes:F,newTableName:w,parentIsLocalized:f,parentTableName:w,relationships:M,relationsToBuild:U,rootRelationsToBuild:m||U,rootTableIDColType:y||P,rootTableName:D,setColumnID:C,uniqueRelationships:O,versions:B,withinLocalizedArrayOrBlock:Q}),G=new Map,Y=new Map;U.forEach(({type:e,localized:t,relationName:i,target:r},n)=>{(t?G:Y).set(n,{type:e,relationName:i,target:r})}),I&&(_.createdAt={name:"created_at",type:"timestamp",defaultNow:!0,mode:"string",notNull:!0,precision:3,withTimezone:!0},_.updatedAt={name:"updated_at",type:"timestamp",defaultNow:!0,mode:"string",notNull:!0,precision:3,withTimezone:!0});let W={name:w,columns:_,foreignKeys:i,indexes:R};if(e.rawTables[w]=W,$||G.size){let t=`${w}${e.localesSuffix}`;e.rawTables[t]=x,L.id={name:"id",type:"serial",primaryKey:!0},L._locale={name:"_locale",type:"enum",locale:!0,notNull:!0},L._parentID={name:"_parent_id",type:P,notNull:!0},F._localeParent={name:u({name:`${t}_locale_parent_id_unique`,adapter:e,appendSuffix:!1}),on:["_locale","_parentID"],unique:!0},x={name:t,columns:L,foreignKeys:{_parentIdFk:{name:p({name:`${t}_parent_id`,adapter:e}),columns:["_parentID"],foreignColumns:[{name:"id",table:w}],onDelete:"cascade"}},indexes:F},e.rawTables[t]=x;let i={_parentID:{type:"one",fields:[{name:"_parentID",table:t}],references:["id"],relationName:"_locales",to:w}};G.forEach(({type:e,target:r},n)=>{"one"===e&&(i[n]={type:"one",fields:[{name:n,table:t}],references:["id"],relationName:n,to:r}),"many"===e&&(i[n]={type:"many",relationName:n,to:r})}),e.rawRelations[t]=i}if(s)for(let t of s){let i=null,r=[],n=()=>i?x:W;for(let{path:e,pathHasLocalized:s}of t.fields){if(null===i&&(i=s),i!==s)throw new h.InvalidConfiguration(`Compound indexes within localized and non localized fields are not supported in SQL. Expected ${e} to be ${i?"non":""} localized.`);let t=e.replaceAll(".","_");if(!n().columns[t])throw new h.InvalidConfiguration(`Column ${t} for compound index on ${e} was not found in the ${n().name} table.`);r.push(t)}i&&r.push("_locale");let s=r.join("_");s.length>63&&(s="compound_index");let a=u({name:s,adapter:e});n().indexes[a]={name:a,on:r,unique:!l&&t.unique}}if(N){if(V){let t=`${D}_texts`;e.rawTables[t]=S;let i={id:{name:"id",type:"serial",primaryKey:!0},order:{name:"order",type:"integer",notNull:!0},parent:{name:"parent_id",type:P,notNull:!0},path:{name:"path",type:"varchar",notNull:!0},text:{name:"text",type:"varchar"}};H&&(i.locale={name:"locale",type:"enum",locale:!0});let r={orderParentIdx:{name:u({name:`${t}_order_parent`,adapter:e,appendSuffix:!1}),on:["order","parent"]}};"index"===V&&(r.text_idx={name:u({name:`${t}_text`,adapter:e}),on:"text"}),H&&(r.localeParent={name:u({name:`${t}_locale_parent`,adapter:e,appendSuffix:!1}),on:["locale","parent"]}),S={name:t,columns:i,foreignKeys:{parentFk:{name:p({name:`${t}_parent`,adapter:e}),columns:["parent"],foreignColumns:[{name:"id",table:w}],onDelete:"cascade"}},indexes:r},e.rawTables[t]=S,e.rawRelations[t]={parent:{type:"one",fields:[{name:"parent",table:t}],references:["id"],relationName:"_texts",to:w}}}if(z){let t=`${D}_numbers`;e.rawTables[t]=k;let i={id:{name:"id",type:"serial",primaryKey:!0},number:{name:"number",type:"numeric"},order:{name:"order",type:"integer",notNull:!0},parent:{name:"parent_id",type:P,notNull:!0},path:{name:"path",type:"varchar",notNull:!0}};j&&(i.locale={name:"locale",type:"enum",locale:!0});let r={orderParentIdx:{name:u({name:`${t}_order_parent`,adapter:e}),on:["order","parent"]}};"index"===z&&(r.numberIdx={name:u({name:`${t}_number`,adapter:e}),on:"number"}),j&&(r.localeParent={name:u({name:`${t}_locale_parent`,adapter:e,appendSuffix:!1}),on:["locale","parent"]}),k={name:t,columns:i,foreignKeys:{parentFk:{name:p({name:`${t}_parent`,adapter:e}),columns:["parent"],foreignColumns:[{name:"id",table:w}],onDelete:"cascade"}},indexes:r},e.rawTables[t]=k,e.rawRelations[t]={parent:{type:"one",fields:[{name:"parent",table:t}],references:["id"],relationName:"_numbers",to:w}}}if(M.size){let t={id:{name:"id",type:"serial",primaryKey:!0},order:{name:"order",type:"integer"},parent:{name:"parent_id",type:P,notNull:!0},path:{name:"path",type:"varchar",notNull:!0}};q&&(t.locale={name:"locale",type:"enum",locale:!0});let i=`${w}${e.relationshipsSuffix}`,r={order:{name:u({name:`${i}_order`,adapter:e}),on:"order"},parentIdx:{name:u({name:`${i}_parent`,adapter:e}),on:"parent"},pathIdx:{name:u({name:`${i}_path`,adapter:e}),on:"path"}};q&&(r.localeIdx={name:u({name:`${i}_locale`,adapter:e}),on:"locale"});let n={parentFk:{name:p({name:`${i}_parent`,adapter:e}),columns:["parent"],foreignColumns:[{name:"id",table:w}],onDelete:"cascade"}};M.forEach(s=>{let a=e.payload.collections[s].config,o=d({adapter:e,config:a,throwValidationError:!0}),c="uuid"===e.idType?"uuid":"integer",h=e.payload.collections[a.slug]?.customIDType;"number"===h&&(c="numeric"),"text"===h&&(c="varchar");let f=`${s}ID`;t[f]={name:`${o}_id`,type:c},n[`${s}IdFk`]={name:p({name:`${i}_${(0,A.default)(s)}`,adapter:e}),columns:[f],foreignColumns:[{name:"id",table:o}],onDelete:"cascade"};let g=[f],m=!l&&O.has(s);m&&g.push("path"),q&&g.push("locale");let y=u({name:`${i}_${o}_id`,adapter:e});r[y]={name:y,on:g,unique:m}}),T={name:i,columns:t,foreignKeys:n,indexes:r},e.rawTables[i]=T;let s={parent:{type:"one",fields:[{name:"parent",table:i}],references:["id"],relationName:"_rels",to:w}};M.forEach(t=>{let r=d({adapter:e,config:e.payload.collections[t].config,throwValidationError:!0}),n=`${t}ID`;s[n]={type:"one",fields:[{name:n,table:i}],references:["id"],relationName:t,to:r}}),e.rawRelations[i]=s}}let J={};return Y.forEach(({type:e,relationName:t,target:i},r)=>{"one"===e&&(J[r]={type:"one",fields:[{name:r,table:w}],references:["id"],relationName:r,to:i}),"many"===e&&(J[r]={type:"many",relationName:t||r,to:i})}),$&&(J._locales={type:"many",relationName:"_locales",to:x.name}),N&&S&&(J._texts={type:"many",relationName:"_texts",to:S.name}),N&&k&&(J._numbers={type:"many",relationName:"_numbers",to:k.name}),M.size&&T&&(J._rels={type:"many",relationName:"_rels",to:T.name}),e.rawRelations[w]=J,{hasLocalizedManyNumberField:j,hasLocalizedManyTextField:H,hasLocalizedRelationshipField:q,hasManyNumberField:z,hasManyTextField:V,relationsToBuild:U}},Q=({adapter:e,setColumnID:t})=>{e.indexes=new Set,e.foreignKeys=new Set,e.payload.config.collections.forEach(t=>{d({adapter:e,config:t}),t.versions&&d({adapter:e,config:t,versions:!0,versionsCustomName:!0})}),e.payload.config.collections.forEach(i=>{let s=e.tableNameMap.get((0,o.default)(i.slug)),a=e.payload.config,l={};if(i.upload.filenameCompoundIndex&&(l.filename_compound_index={name:u({name:`${s}_filename_compound`,adapter:e}),on:i.upload.filenameCompoundIndex.map(e=>e),unique:!0}),B({adapter:e,baseIndexes:l,blocksTableNameMap:{},compoundIndexes:i.sanitizedIndexes,disableNotNull:!!i?.versions?.drafts,disableUnique:!1,fields:i.flattenedFields,parentIsLocalized:!1,setColumnID:t,tableName:s,timestamps:i.timestamps,versions:!1}),i.versions){let s=e.tableNameMap.get(`_${(0,o.default)(i.slug)}${e.versionsSuffix}`),l=(0,r.buildVersionCollectionFields)(a,i,!0);B({adapter:e,blocksTableNameMap:{},compoundIndexes:n({indexes:i.sanitizedIndexes}),disableNotNull:!!i.versions?.drafts,disableUnique:!0,fields:l,parentIsLocalized:!1,setColumnID:t,tableName:s,timestamps:!0,versions:!0})}}),e.payload.config.globals.forEach(i=>{let r=d({adapter:e,config:i});if(B({adapter:e,blocksTableNameMap:{},disableNotNull:(0,a.hasDraftsEnabled)(i),disableUnique:!1,fields:i.flattenedFields,parentIsLocalized:!1,setColumnID:t,tableName:r,timestamps:!1,versions:!1}),i.versions){let r=d({adapter:e,config:i,versions:!0,versionsCustomName:!0}),n=e.payload.config,a=(0,s.buildVersionGlobalFields)(n,i,!0);B({adapter:e,blocksTableNameMap:{},disableNotNull:!!i.versions?.drafts,disableUnique:!0,fields:a,parentIsLocalized:!1,setColumnID:t,tableName:r,timestamps:!0,versions:!0})}})};var x=e.i(959694),S=l;let{Symbol:k}=x.Table,T=({columns:e,extraConfig:t,table:i})=>{let r=Object.getOwnPropertySymbols(i).find(e=>e.description?.includes("InlineForeignKeys"));if(!r)throw new S.APIError("Error when finding InlineForeignKeys Symbol",500);if(e)for(let[t,n]of Object.entries(e)){let e=n.build(i);i[t]=e,i[r].push(...n.buildForeignKeys(e,i)),i[k.Columns][t]=e,i[k.ExtraConfigColumns][t]="buildExtraConfigColumn"in n?n.buildExtraConfigColumn(i):e}if(t){let e=i[k.ExtraConfigBuilder];i[k.ExtraConfigBuilder]=i=>({...e(i),...t(i)})}},N=async({type:e,adapter:t})=>{for(let i of t[e]){let e=await i({adapter:t,extendTable:T,schema:{enums:t.enums,relations:t.relations,tables:t.tables}});e.enums&&(t.enums=e.enums),t.tables=e.tables,t.relations=e.relations}};var D=e.i(216933),_=e.i(153845),R=e.i(581996),L=e.i(238969),F=e.i(750672),M=e.i(431010),O=e.i(744785),U=e.i(453639),P=e.i(809909),$=e.i(794290),j=e.i(978334),H=e.i(900560),q=e.i(820874),z=e.i(554826),V=e.i(394114),G=e.i(895958),Y=e.i(30514);let W=e=>(0,G.customType)({dataType:()=>"geometry(Point)",fromDriver:e=>(0,Y.parseEWKB)(e),toDriver:e=>`SRID=4326;point(${e[0]} ${e[1]})`})(e),J={boolean:_.boolean,geometry:W,integer:M.integer,jsonb:O.jsonb,numeric:U.numeric,serial:P.serial,text:j.text,uuid:q.uuid,varchar:z.varchar},K=({adapter:e,rawTable:t})=>{let i={};for(let[r,n]of Object.entries(t.columns)){switch(n.type){case"bit":{let e=(0,D.bit)(n.name,{dimensions:n.dimensions});i[r]=e;break}case"enum":"locale"in n?i[r]=e.enums.enum__locales(n.name):(e.enums[n.enumName]=e.pgSchema.enum(n.enumName,n.options),i[r]=e.enums[n.enumName](n.name));break;case"halfvec":{let e=(0,L.halfvec)(n.name,{dimensions:n.dimensions});i[r]=e;break}case"numeric":i[r]=(0,U.numeric)(n.name,{mode:"number"});break;case"sparsevec":{let e=(0,$.sparsevec)(n.name,{dimensions:n.dimensions});i[r]=e;break}case"timestamp":{let e=(0,H.timestamp)(n.name,{mode:n.mode,precision:n.precision,withTimezone:n.withTimezone});n.defaultNow&&(e=e.defaultNow()),i[r]=e;break}case"uuid":{let e=(0,q.uuid)(n.name);n.defaultRandom&&(e=e.defaultRandom()),i[r]=e;break}case"vector":{let e=(0,V.vector)(n.name,{dimensions:n.dimensions});i[r]=e;break}default:i[r]=J[n.type](n.name)}if(n.reference&&i[r].references(()=>e.tables[n.reference.table][n.reference.name],{onDelete:n.reference.onDelete}),n.primaryKey&&i[r].primaryKey(),n.notNull&&i[r].notNull(),void 0!==n.default){let e=n.default;"geometry"===n.type&&Array.isArray(n.default)&&(e=`SRID=4326;POINT(${n.default[0]} ${n.default[1]})`),i[r].default(e)}"geometry"!==n.type||e.extensions.postgis||(e.extensions.postgis=!0)}let r=i=>{let r={};if(t.indexes)for(let[e,n]of Object.entries(t.indexes)){let t=F.index;n.unique&&(t=F.uniqueIndex),Array.isArray(n.on)?n.on.length&&(r[e]=t(n.name).on(...n.on.map(e=>i[e]))):r[e]=t(n.name).on(i[n.on])}if(t.foreignKeys)for(let[n,s]of Object.entries(t.foreignKeys)){let t=(0,R.foreignKey)({name:s.name,columns:s.columns.map(e=>i[e]),foreignColumns:s.foreignColumns.map(t=>e.tables[t.table][t.name])});s.onDelete&&(t=t.onDelete(s.onDelete)),s.onUpdate&&(t=t.onDelete(s.onUpdate)),r[n]=t}return r};e.tables[t.name]=e.pgSchema.table(t.name,i,r)},Z=({adapter:e,columns:t,fields:i})=>{let r=i.find(e=>"id"===e.name);if(r){if("number"===r.type)return t.id={name:"id",type:"numeric",primaryKey:!0},"numeric";if("text"===r.type)return t.id={name:"id",type:"varchar",primaryKey:!0},"varchar"}return"uuid"===e.idType?(t.id={name:"id",type:"uuid",defaultRandom:!0,primaryKey:!0},"uuid"):(t.id={name:"id",type:"serial",primaryKey:!0},"integer")},X=async function(){for(let e in this.rawRelations={},this.rawTables={},Q({adapter:this,setColumnID:Z}),await N({type:"beforeSchemaInit",adapter:this}),this.payload.config.localization&&(this.enums.enum__locales=this.pgSchema.enum("_locales",this.payload.config.localization.locales.map(({code:e})=>e))),this.rawTables)K({adapter:this,rawTable:this.rawTables[e]});i({adapter:this}),await N({type:"afterSchemaInit",adapter:this}),this.schema={pgSchema:this.pgSchema,...this.tables,...this.relations,...this.enums}};e.s(["init",0,X],699449)},452566,e=>{"use strict";let t=async function({db:e,onConflictDoUpdate:t,tableName:i,values:r}){let n=this.tables[i];return t?await e.insert(n).values(r).onConflictDoUpdate(t).returning():await e.insert(n).values(r).returning()};e.s(["insert",0,t])},231117,e=>{"use strict";var t=e.i(362562);let i={get url(){return`file://${e.P("node_modules/.pnpm/@payloadcms+drizzle@3.81.0_@opentelemetry+api@1.9.1_@types+pg@8.10.2_payload@3.81.0_gra_ae940f003f2191211e9220c04aa1c075/node_modules/@payloadcms/drizzle/dist/postgres/requireDrizzleKit.js")}`}};(0,t.createRequire)(i.url);let r=()=>{let{generateDrizzleJson:t,generateMigration:i,pushSchema:r,upPgSnapshot:n}=e.r(746337);return{generateDrizzleJson:t,generateMigration:i,pushSchema:r,upSnapshot:n}};e.s(["requireDrizzleKit",0,r])},715845,864664,381819,e=>{"use strict";var t=e.i(303812),i=e.i(990866),r=e.i(959694);function n(e){return(e.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).map(e=>e.toLowerCase()).join("_")}function s(e){return(e.replace(/['\u2019]/g,"").match(/[\da-z]+|[A-Z]+(?![a-z])|[A-Z][\da-z]+/g)??[]).reduce((e,t,i)=>e+(0===i?t.toLowerCase():`${t[0].toUpperCase()}${t.slice(1)}`),"")}function a(e){return e}class o{static [i.entityKind]="CasingCache";cache={};cachedTables={};convert;constructor(e){this.convert="snake_case"===e?n:"camelCase"===e?s:a}getColumnCasing(e){if(!e.keyAsName)return e.name;let t=e.table[r.Table.Symbol.Schema]??"public",i=e.table[r.Table.Symbol.OriginalName],n=`${t}.${i}.${e.name}`;return this.cache[n]||this.cacheTable(e.table),this.cache[n]}cacheTable(e){let t=e[r.Table.Symbol.Schema]??"public",i=e[r.Table.Symbol.OriginalName],n=`${t}.${i}`;if(!this.cachedTables[n]){for(let t of Object.values(e[r.Table.Symbol.Columns])){let e=`${n}.${t.name}`;this.cache[e]=this.convert(t.name)}this.cachedTables[n]=!0}}clearCache(){this.cache={},this.cachedTables={}}}var l=e.i(586210),c=i,d=i;class u extends Error{static [d.entityKind]="DrizzleError";constructor({message:e,cause:t}){super(e),this.name="DrizzleError",this.cause=t}}class h extends Error{constructor(e,t,i){super(`Failed query: ${e}
|
||
params: ${t}`),this.query=e,this.params=t,this.cause=i,Error.captureStackTrace(this,h),i&&(this.cause=i)}}class A extends u{static [d.entityKind]="TransactionRollbackError";constructor(){super({message:"Rollback"})}}e.s(["DrizzleError",()=>u,"DrizzleQueryError",()=>h,"TransactionRollbackError",()=>A],864664);var p=e.i(635536),f=e.i(607579),g=e.i(500583),m=e.i(744785),y=e.i(453639),b=e.i(425444),E=e.i(900560),C=e.i(820874),w=e.i(146794),I=e.i(44679),v=e.i(226836),B=e.i(65054),Q=e.i(489508),x=r,S=e.i(564115),k=e.i(509331),T=i,N=B;class D extends N.View{static [T.entityKind]="PgViewBase"}e.s(["PgViewBase",()=>D],381819);class _{static [c.entityKind]="PgDialect";casing;constructor(e){this.casing=new o(e?.casing)}async migrate(e,t,i){let r="string"==typeof i?"__drizzle_migrations":i.migrationsTable??"__drizzle_migrations",n="string"==typeof i?"drizzle":i.migrationsSchema??"drizzle",s=B.sql`
|
||
CREATE TABLE IF NOT EXISTS ${B.sql.identifier(n)}.${B.sql.identifier(r)} (
|
||
id SERIAL PRIMARY KEY,
|
||
hash text NOT NULL,
|
||
created_at bigint
|
||
)
|
||
`;await t.execute(B.sql`CREATE SCHEMA IF NOT EXISTS ${B.sql.identifier(n)}`),await t.execute(s);let a=(await t.all(B.sql`select id, hash, created_at from ${B.sql.identifier(n)}.${B.sql.identifier(r)} order by created_at desc limit 1`))[0];await t.transaction(async t=>{for await(let i of e)if(!a||Number(a.created_at)<i.folderMillis){for(let e of i.sql)await t.execute(B.sql.raw(e));await t.execute(B.sql`insert into ${B.sql.identifier(n)}.${B.sql.identifier(r)} ("hash", "created_at") values(${i.hash}, ${i.folderMillis})`)}})}escapeName(e){return`"${e}"`}escapeParam(e){return`$${e+1}`}escapeString(e){return`'${e.replace(/'/g,"''")}'`}buildWithCTE(e){if(!e?.length)return;let t=[B.sql`with `];for(let[i,r]of e.entries())t.push(B.sql`${B.sql.identifier(r._.alias)} as (${r._.sql})`),i<e.length-1&&t.push(B.sql`, `);return t.push(B.sql` `),B.sql.join(t)}buildDeleteQuery({table:e,where:t,returning:i,withList:r}){let n=this.buildWithCTE(r),s=i?B.sql` returning ${this.buildSelection(i,{isSingleTable:!0})}`:void 0,a=t?B.sql` where ${t}`:void 0;return B.sql`${n}delete from ${e}${a}${s}`}buildUpdateSet(e,t){let i=e[x.Table.Symbol.Columns],r=Object.keys(i).filter(e=>void 0!==t[e]||i[e]?.onUpdateFn!==void 0),n=r.length;return B.sql.join(r.flatMap((e,r)=>{let s=i[e],a=t[e]??B.sql.param(s.onUpdateFn(),s),o=B.sql`${B.sql.identifier(this.casing.getColumnCasing(s))} = ${a}`;return r<n-1?[o,B.sql.raw(", ")]:[o]}))}buildUpdateQuery({table:e,set:t,where:i,returning:r,withList:n,from:s,joins:a}){let o=this.buildWithCTE(n),l=e[w.PgTable.Symbol.Name],c=e[w.PgTable.Symbol.Schema],d=e[w.PgTable.Symbol.OriginalName],u=l===d?void 0:l,h=B.sql`${c?B.sql`${B.sql.identifier(c)}.`:void 0}${B.sql.identifier(d)}${u&&B.sql` ${B.sql.identifier(u)}`}`,A=this.buildUpdateSet(e,t),p=s&&B.sql.join([B.sql.raw(" from "),this.buildFromTable(s)]),f=this.buildJoins(a),g=r?B.sql` returning ${this.buildSelection(r,{isSingleTable:!s})}`:void 0,m=i?B.sql` where ${i}`:void 0;return B.sql`${o}update ${h} set ${A}${p}${f}${m}${g}`}buildSelection(e,{isSingleTable:t=!1}={}){let i=e.length,r=e.flatMap(({field:e},r)=>{let n=[];if((0,c.is)(e,B.SQL.Aliased)&&e.isSelectionField)n.push(B.sql.identifier(e.fieldAlias));else if((0,c.is)(e,B.SQL.Aliased)||(0,c.is)(e,B.SQL)){let i=(0,c.is)(e,B.SQL.Aliased)?e.sql:e;t?n.push(new B.SQL(i.queryChunks.map(e=>(0,c.is)(e,p.PgColumn)?B.sql.identifier(this.casing.getColumnCasing(e)):e))):n.push(i),(0,c.is)(e,B.SQL.Aliased)&&n.push(B.sql` as ${B.sql.identifier(e.fieldAlias)}`)}else(0,c.is)(e,l.Column)&&(t?n.push(B.sql.identifier(this.casing.getColumnCasing(e))):n.push(e));return r<i-1&&n.push(B.sql`, `),n});return B.sql.join(r)}buildJoins(e){if(!e||0===e.length)return;let t=[];for(let[i,r]of e.entries()){0===i&&t.push(B.sql` `);let n=r.table,s=r.lateral?B.sql` lateral`:void 0,a=r.on?B.sql` on ${r.on}`:void 0;if((0,c.is)(n,w.PgTable)){let e=n[w.PgTable.Symbol.Name],i=n[w.PgTable.Symbol.Schema],o=n[w.PgTable.Symbol.OriginalName],l=e===o?void 0:r.alias;t.push(B.sql`${B.sql.raw(r.joinType)} join${s} ${i?B.sql`${B.sql.identifier(i)}.`:void 0}${B.sql.identifier(o)}${l&&B.sql` ${B.sql.identifier(l)}`}${a}`)}else if((0,c.is)(n,B.View)){let e=n[k.ViewBaseConfig].name,i=n[k.ViewBaseConfig].schema,o=n[k.ViewBaseConfig].originalName,l=e===o?void 0:r.alias;t.push(B.sql`${B.sql.raw(r.joinType)} join${s} ${i?B.sql`${B.sql.identifier(i)}.`:void 0}${B.sql.identifier(o)}${l&&B.sql` ${B.sql.identifier(l)}`}${a}`)}else t.push(B.sql`${B.sql.raw(r.joinType)} join${s} ${n}${a}`);i<e.length-1&&t.push(B.sql` `)}return B.sql.join(t)}buildFromTable(e){if((0,c.is)(e,x.Table)&&e[x.Table.Symbol.IsAlias]){let t=B.sql`${B.sql.identifier(e[x.Table.Symbol.OriginalName])}`;return e[x.Table.Symbol.Schema]&&(t=B.sql`${B.sql.identifier(e[x.Table.Symbol.Schema])}.${t}`),B.sql`${t} ${B.sql.identifier(e[x.Table.Symbol.Name])}`}return e}buildSelectQuery({withList:e,fields:t,fieldsFlat:i,where:r,having:n,table:s,joins:a,orderBy:o,groupBy:d,limit:u,offset:h,lockingClause:A,distinct:p,setOperators:f}){let g,m,y,b=i??(0,S.orderSelectedFields)(t);for(let e of b){let t;if((0,c.is)(e.field,l.Column)&&(0,x.getTableName)(e.field.table)!==((0,c.is)(s,Q.Subquery)?s._.alias:(0,c.is)(s,D)?s[k.ViewBaseConfig].name:(0,c.is)(s,B.SQL)?void 0:(0,x.getTableName)(s))&&(t=e.field.table,!a?.some(({alias:e})=>e===(t[x.Table.Symbol.IsAlias]?(0,x.getTableName)(t):t[x.Table.Symbol.BaseName])))){let t=(0,x.getTableName)(e.field.table);throw Error(`Your "${e.path.join("->")}" field references a column "${t}"."${e.field.name}", but the table "${t}" is not part of the query! Did you forget to join it?`)}}let E=!a||0===a.length,C=this.buildWithCTE(e);p&&(g=!0===p?B.sql` distinct`:B.sql` distinct on (${B.sql.join(p.on,B.sql`, `)})`);let w=this.buildSelection(b,{isSingleTable:E}),I=this.buildFromTable(s),v=this.buildJoins(a),T=r?B.sql` where ${r}`:void 0,N=n?B.sql` having ${n}`:void 0;o&&o.length>0&&(m=B.sql` order by ${B.sql.join(o,B.sql`, `)}`),d&&d.length>0&&(y=B.sql` group by ${B.sql.join(d,B.sql`, `)}`);let _="object"==typeof u||"number"==typeof u&&u>=0?B.sql` limit ${u}`:void 0,R=h?B.sql` offset ${h}`:void 0,L=B.sql.empty();if(A){let e=B.sql` for ${B.sql.raw(A.strength)}`;A.config.of&&e.append(B.sql` of ${B.sql.join(Array.isArray(A.config.of)?A.config.of:[A.config.of],B.sql`, `)}`),A.config.noWait?e.append(B.sql` nowait`):A.config.skipLocked&&e.append(B.sql` skip locked`),L.append(e)}let F=B.sql`${C}select${g} ${w} from ${I}${v}${T}${y}${N}${m}${_}${R}${L}`;return f.length>0?this.buildSetOperations(F,f):F}buildSetOperations(e,t){let[i,...r]=t;if(!i)throw Error("Cannot pass undefined values to any set operator");return 0===r.length?this.buildSetOperationQuery({leftSelect:e,setOperator:i}):this.buildSetOperations(this.buildSetOperationQuery({leftSelect:e,setOperator:i}),r)}buildSetOperationQuery({leftSelect:e,setOperator:{type:t,isAll:i,rightSelect:r,limit:n,orderBy:s,offset:a}}){let o,l=B.sql`(${e.getSQL()}) `,d=B.sql`(${r.getSQL()})`;if(s&&s.length>0){let e=[];for(let t of s)if((0,c.is)(t,p.PgColumn))e.push(B.sql.identifier(t.name));else if((0,c.is)(t,B.SQL)){for(let e=0;e<t.queryChunks.length;e++){let i=t.queryChunks[e];(0,c.is)(i,p.PgColumn)&&(t.queryChunks[e]=B.sql.identifier(i.name))}e.push(B.sql`${t}`)}else e.push(B.sql`${t}`);o=B.sql` order by ${B.sql.join(e,B.sql`, `)} `}let u="object"==typeof n||"number"==typeof n&&n>=0?B.sql` limit ${n}`:void 0,h=B.sql.raw(`${t} ${i?"all ":""}`),A=a?B.sql` offset ${a}`:void 0;return B.sql`${l}${h}${d}${o}${u}${A}`}buildInsertQuery({table:e,values:t,onConflict:i,returning:r,withList:n,select:s,overridingSystemValue_:a}){let o=[],l=Object.entries(e[x.Table.Symbol.Columns]).filter(([e,t])=>!t.shouldDisableInsert()),d=l.map(([,e])=>B.sql.identifier(this.casing.getColumnCasing(e)));if(s){let e=t;(0,c.is)(e,B.SQL)?o.push(e):o.push(e.getSQL())}else{let e=t;for(let[t,i]of(o.push(B.sql.raw("values ")),e.entries())){let r=[];for(let[e,t]of l){let n=i[e];if(void 0===n||(0,c.is)(n,B.Param)&&void 0===n.value)if(void 0!==t.defaultFn){let e=t.defaultFn(),i=(0,c.is)(e,B.SQL)?e:B.sql.param(e,t);r.push(i)}else if(t.default||void 0===t.onUpdateFn)r.push(B.sql`default`);else{let e=t.onUpdateFn(),i=(0,c.is)(e,B.SQL)?e:B.sql.param(e,t);r.push(i)}else r.push(n)}o.push(r),t<e.length-1&&o.push(B.sql`, `)}}let u=this.buildWithCTE(n),h=B.sql.join(o),A=r?B.sql` returning ${this.buildSelection(r,{isSingleTable:!0})}`:void 0,p=i?B.sql` on conflict ${i}`:void 0,f=!0===a?B.sql`overriding system value `:void 0;return B.sql`${u}insert into ${e} ${d} ${f}${h}${p}${A}`}buildRefreshMaterializedViewQuery({view:e,concurrently:t,withNoData:i}){let r=t?B.sql` concurrently`:void 0,n=i?B.sql` with no data`:void 0;return B.sql`refresh materialized view${r} ${e}${n}`}prepareTyping(e){if((0,c.is)(e,m.PgJsonb)||(0,c.is)(e,g.PgJson))return"json";if((0,c.is)(e,y.PgNumeric))return"decimal";if((0,c.is)(e,b.PgTime))return"time";if((0,c.is)(e,E.PgTimestamp)||(0,c.is)(e,E.PgTimestampString))return"timestamp";if((0,c.is)(e,f.PgDate)||(0,c.is)(e,f.PgDateString))return"date";else if((0,c.is)(e,C.PgUUID))return"uuid";else return"none"}sqlToQuery(e,t){return e.toQuery({casing:this.casing,escapeName:this.escapeName,escapeParam:this.escapeParam,escapeString:this.escapeString,prepareTyping:this.prepareTyping,invokeSource:t})}buildRelationalQueryWithoutPK({fullSchema:e,schema:i,tableNamesMap:r,table:n,tableConfig:s,queryConfig:a,tableAlias:o,nestedQueryRelation:d,joinOn:h}){let A,p=[],f,g,m=[],y,b=[];if(!0===a)p=Object.entries(s.columns).map(([e,i])=>({dbKey:i.name,tsKey:e,field:(0,t.aliasedTableColumn)(i,o),relationTableTsKey:void 0,isJson:!1,selection:[]}));else{let n=Object.fromEntries(Object.entries(s.columns).map(([e,i])=>[e,(0,t.aliasedTableColumn)(i,o)]));if(a.where){let e="function"==typeof a.where?a.where(n,(0,I.getOperators)()):a.where;y=e&&(0,t.mapColumnsInSQLToAlias)(e,o)}let d=[],u=[];if(a.columns){let e=!1;for(let[t,i]of Object.entries(a.columns))void 0!==i&&t in s.columns&&(e||!0!==i||(e=!0),u.push(t));u.length>0&&(u=e?u.filter(e=>a.columns?.[e]===!0):Object.keys(s.columns).filter(e=>!u.includes(e)))}else u=Object.keys(s.columns);for(let e of u){let t=s.columns[e];d.push({tsKey:e,value:t})}let h=[];if(a.with&&(h=Object.entries(a.with).filter(e=>!!e[1]).map(([e,t])=>({tsKey:e,queryConfig:t,relation:s.relations[e]}))),a.extras)for(let[e,i]of Object.entries("function"==typeof a.extras?a.extras(n,{sql:B.sql}):a.extras))d.push({tsKey:e,value:(0,t.mapColumnsInAliasedSQLToAlias)(i,o)});for(let{tsKey:e,value:i}of d)p.push({dbKey:(0,c.is)(i,B.SQL.Aliased)?i.fieldAlias:s.columns[e].name,tsKey:e,field:(0,c.is)(i,l.Column)?(0,t.aliasedTableColumn)(i,o):i,relationTableTsKey:void 0,isJson:!1,selection:[]});let A="function"==typeof a.orderBy?a.orderBy(n,(0,I.getOrderByOperators)()):a.orderBy??[];for(let{tsKey:n,queryConfig:s,relation:d}of(Array.isArray(A)||(A=[A]),m=A.map(e=>(0,c.is)(e,l.Column)?(0,t.aliasedTableColumn)(e,o):(0,t.mapColumnsInSQLToAlias)(e,o)),f=a.limit,g=a.offset,h)){let a=(0,I.normalizeRelation)(i,r,d),l=r[(0,x.getTableUniqueName)(d.referencedTable)],u=`${o}_${n}`,h=(0,v.and)(...a.fields.map((e,i)=>(0,v.eq)((0,t.aliasedTableColumn)(a.references[i],u),(0,t.aliasedTableColumn)(e,o)))),A=this.buildRelationalQueryWithoutPK({fullSchema:e,schema:i,tableNamesMap:r,table:e[l],tableConfig:i[l],queryConfig:(0,c.is)(d,I.One)?!0===s?{limit:1}:{...s,limit:1}:s,tableAlias:u,joinOn:h,nestedQueryRelation:d}),f=B.sql`${B.sql.identifier(u)}.${B.sql.identifier("data")}`.as(n);b.push({on:B.sql`true`,table:new Q.Subquery(A.sql,{},u),alias:u,joinType:"left",lateral:!0}),p.push({dbKey:n,tsKey:n,field:f,relationTableTsKey:l,isJson:!0,selection:A.selection})}}if(0===p.length)throw new u({message:`No fields selected for table "${s.tsName}" ("${o}")`});if(y=(0,v.and)(h,y),d){let e=B.sql`json_build_array(${B.sql.join(p.map(({field:e,tsKey:t,isJson:i})=>i?B.sql`${B.sql.identifier(`${o}_${t}`)}.${B.sql.identifier("data")}`:(0,c.is)(e,B.SQL.Aliased)?e.sql:e),B.sql`, `)})`;(0,c.is)(d,I.Many)&&(e=B.sql`coalesce(json_agg(${e}${m.length>0?B.sql` order by ${B.sql.join(m,B.sql`, `)}`:void 0}), '[]'::json)`);let i=[{dbKey:"data",tsKey:"data",field:e.as("data"),isJson:!0,relationTableTsKey:s.tsName,selection:p}];void 0!==f||void 0!==g||m.length>0?(A=this.buildSelectQuery({table:(0,t.aliasedTable)(n,o),fields:{},fieldsFlat:[{path:[],field:B.sql.raw("*")}],where:y,limit:f,offset:g,orderBy:m,setOperators:[]}),y=void 0,f=void 0,g=void 0,m=[]):A=(0,t.aliasedTable)(n,o),A=this.buildSelectQuery({table:(0,c.is)(A,w.PgTable)?A:new Q.Subquery(A,{},o),fields:{},fieldsFlat:i.map(({field:e})=>({path:[],field:(0,c.is)(e,l.Column)?(0,t.aliasedTableColumn)(e,o):e})),joins:b,where:y,limit:f,offset:g,orderBy:m,setOperators:[]})}else A=this.buildSelectQuery({table:(0,t.aliasedTable)(n,o),fields:{},fieldsFlat:p.map(({field:e})=>({path:[],field:(0,c.is)(e,l.Column)?(0,t.aliasedTableColumn)(e,o):e})),joins:b,where:y,limit:f,offset:g,orderBy:m,setOperators:[]});return{tableTsKey:s.tsName,sql:A,selection:p}}}e.s(["PgDialect",()=>_],715845)},325765,888916,586344,853758,710804,722908,e=>{"use strict";e.s(["PgMaterializedViewConfig",()=>en,"pgMaterializedViewWithSchema",()=>eo,"pgViewWithSchema",()=>ea],325765);var t=e.i(990866),i=e.i(303812),r=e.i(586210),n=t,s=e.i(65054),a=e.i(489508),o=e.i(509331);class l{static [n.entityKind]="SelectionProxyHandler";config;constructor(e){this.config={...e}}get(e,t){if("_"===t)return{...e._,selectedFields:new Proxy(e._.selectedFields,this)};if(t===o.ViewBaseConfig)return{...e[o.ViewBaseConfig],selectedFields:new Proxy(e[o.ViewBaseConfig].selectedFields,this)};if("symbol"==typeof t)return e[t];let c=((0,n.is)(e,a.Subquery)?e._.selectedFields:(0,n.is)(e,s.View)?e[o.ViewBaseConfig].selectedFields:e)[t];if((0,n.is)(c,s.SQL.Aliased)){if("sql"===this.config.sqlAliasedBehavior&&!c.isSelectionField)return c.sql;let e=c.clone();return e.isSelectionField=!0,e}if((0,n.is)(c,s.SQL)){if("sql"===this.config.sqlBehavior)return c;throw Error(`You tried to reference "${t}" field from a subquery, which is a raw SQL field, but it doesn't have an alias declared. Please add an alias to the field using ".as('alias')" method.`)}return(0,n.is)(c,r.Column)?this.config.alias?new Proxy(c,new i.ColumnAliasProxyHandler(new Proxy(c.table,new i.TableAliasProxyHandler(this.config.alias,this.config.replaceOriginalName??!1)))):c:"object"!=typeof c||null===c?c:new Proxy(c,new l(this.config))}}e.s(["SelectionProxyHandler",()=>l],888916);var c=e.i(564115);e.s(["QueryBuilder",()=>Y],722908);var d=t,u=e.i(715845),h=a;e.s(["PgSelectBuilder",()=>M],710804);var A=t,p=e.i(381819),f=t;class g{static [f.entityKind]="TypedQueryBuilder";getSelectedFields(){return this._.selectedFields}}var m=t;class y{static [m.entityKind]="QueryPromise";[Symbol.toStringTag]="QueryPromise";catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}then(e,t){return this.execute().then(e,t)}}e.s(["QueryPromise",()=>y],586344);var b=s,E=a,C=e.i(959694),w=e.i(309402),I=c,v=o;e.s(["extractUsedTable",()=>F],853758);var B=t,Q=e.i(146794),x=s,S=a,k=C,T=t;class N{constructor(e,t){this.name=e,this.value=t}static [T.entityKind]="PgCheckBuilder";brand;build(e){return new D(e,this)}}class D{constructor(e,t){this.table=e,this.name=t.name,this.value=t.value}static [T.entityKind]="PgCheck";name;value}e.i(581996),e.i(750672);var _=t;class R{constructor(e,t){this.name=e,t&&(this.as=t.as,this.for=t.for,this.to=t.to,this.using=t.using,this.withCheck=t.withCheck)}static [_.entityKind]="PgPolicy";as;for;to;using;withCheck;_linkedTable;link(e){return this._linkedTable=e,this}}e.i(254552),e.i(756974);let L=Symbol.for("drizzle:PgViewConfig");function F(e){return(0,B.is)(e,Q.PgTable)?[e[k.Schema]?`${e[k.Schema]}.${e[k.Table.Symbol.BaseName]}`:e[k.Table.Symbol.BaseName]]:(0,B.is)(e,S.Subquery)?e._.usedTables??[]:(0,B.is)(e,x.SQL)?e.usedTables??[]:[]}class M{static [A.entityKind]="PgSelectBuilder";fields;session;dialect;withList=[];distinct;constructor(e){this.fields=e.fields,this.session=e.session,this.dialect=e.dialect,e.withList&&(this.withList=e.withList),this.distinct=e.distinct}authToken;setToken(e){return this.authToken=e,this}from(e){let t,i=!!this.fields,r=e;return t=this.fields?this.fields:(0,A.is)(r,E.Subquery)?Object.fromEntries(Object.keys(r._.selectedFields).map(e=>[e,r[e]])):(0,A.is)(r,p.PgViewBase)?r[v.ViewBaseConfig].selectedFields:(0,A.is)(r,b.SQL)?{}:(0,I.getTableColumns)(r),new U({table:r,fields:t,isPartialSelect:i,session:this.session,dialect:this.dialect,withList:this.withList,distinct:this.distinct}).setToken(this.authToken)}}class O extends g{static [A.entityKind]="PgSelectQueryBuilder";_;config;joinsNotNullableMap;tableName;isPartialSelect;session;dialect;cacheConfig=void 0;usedTables=new Set;constructor({table:e,fields:t,isPartialSelect:i,session:r,dialect:n,withList:s,distinct:a}){for(const o of(super(),this.config={withList:s,table:e,fields:{...t},distinct:a,setOperators:[]},this.isPartialSelect=i,this.session=r,this.dialect=n,this._={selectedFields:t,config:this.config},this.tableName=(0,I.getTableLikeName)(e),this.joinsNotNullableMap="string"==typeof this.tableName?{[this.tableName]:!0}:{},F(e)))this.usedTables.add(o)}getUsedTables(){return[...this.usedTables]}createJoin(e,t){return(i,r)=>{let n=this.tableName,s=(0,I.getTableLikeName)(i);for(let e of F(i))this.usedTables.add(e);if("string"==typeof s&&this.config.joins?.some(e=>e.alias===s))throw Error(`Alias "${s}" is already used in this query`);if(!this.isPartialSelect&&(1===Object.keys(this.joinsNotNullableMap).length&&"string"==typeof n&&(this.config.fields={[n]:this.config.fields}),"string"==typeof s&&!(0,A.is)(i,b.SQL))){let e=(0,A.is)(i,E.Subquery)?i._.selectedFields:(0,A.is)(i,b.View)?i[v.ViewBaseConfig].selectedFields:i[C.Table.Symbol.Columns];this.config.fields[s]=e}if("function"==typeof r&&(r=r(new Proxy(this.config.fields,new l({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.joins||(this.config.joins=[]),this.config.joins.push({on:r,table:i,joinType:e,alias:s,lateral:t}),"string"==typeof s)switch(e){case"left":this.joinsNotNullableMap[s]=!1;break;case"right":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[s]=!0;break;case"cross":case"inner":this.joinsNotNullableMap[s]=!0;break;case"full":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[s]=!1}return this}}leftJoin=this.createJoin("left",!1);leftJoinLateral=this.createJoin("left",!0);rightJoin=this.createJoin("right",!1);innerJoin=this.createJoin("inner",!1);innerJoinLateral=this.createJoin("inner",!0);fullJoin=this.createJoin("full",!1);crossJoin=this.createJoin("cross",!1);crossJoinLateral=this.createJoin("cross",!0);createSetOperator(e,t){return i=>{let r="function"==typeof i?i($()):i;if(!(0,I.haveSameKeys)(this.getSelectedFields(),r.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return this.config.setOperators.push({type:e,isAll:t,rightSelect:r}),this}}union=this.createSetOperator("union",!1);unionAll=this.createSetOperator("union",!0);intersect=this.createSetOperator("intersect",!1);intersectAll=this.createSetOperator("intersect",!0);except=this.createSetOperator("except",!1);exceptAll=this.createSetOperator("except",!0);addSetOperators(e){return this.config.setOperators.push(...e),this}where(e){return"function"==typeof e&&(e=e(new Proxy(this.config.fields,new l({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.where=e,this}having(e){return"function"==typeof e&&(e=e(new Proxy(this.config.fields,new l({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))),this.config.having=e,this}groupBy(...e){if("function"==typeof e[0]){let t=e[0](new Proxy(this.config.fields,new l({sqlAliasedBehavior:"alias",sqlBehavior:"sql"})));this.config.groupBy=Array.isArray(t)?t:[t]}else this.config.groupBy=e;return this}orderBy(...e){if("function"==typeof e[0]){let t=e[0](new Proxy(this.config.fields,new l({sqlAliasedBehavior:"alias",sqlBehavior:"sql"}))),i=Array.isArray(t)?t:[t];this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=i:this.config.orderBy=i}else{let t=e;this.config.setOperators.length>0?this.config.setOperators.at(-1).orderBy=t:this.config.orderBy=t}return this}limit(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).limit=e:this.config.limit=e,this}offset(e){return this.config.setOperators.length>0?this.config.setOperators.at(-1).offset=e:this.config.offset=e,this}for(e,t={}){return this.config.lockingClause={strength:e,config:t},this}getSQL(){return this.dialect.buildSelectQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}as(e){let t=[];if(t.push(...F(this.config.table)),this.config.joins)for(let e of this.config.joins)t.push(...F(e.table));return new Proxy(new E.Subquery(this.getSQL(),this.config.fields,e,!1,[...new Set(t)]),new l({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}getSelectedFields(){return new Proxy(this.config.fields,new l({alias:this.tableName,sqlAliasedBehavior:"alias",sqlBehavior:"error"}))}$dynamic(){return this}$withCache(e){return this.cacheConfig=void 0===e?{config:{},enable:!0,autoInvalidate:!0}:!1===e?{enable:!1}:{enable:!0,autoInvalidate:!0,...e},this}}class U extends O{static [A.entityKind]="PgSelect";_prepare(e){let{session:t,config:i,dialect:r,joinsNotNullableMap:n,authToken:s,cacheConfig:a,usedTables:o}=this;if(!t)throw Error("Cannot execute a query on a query builder. Please use a database instance instead.");let{fields:l}=i;return w.tracer.startActiveSpan("drizzle.prepareQuery",()=>{let i=(0,I.orderSelectedFields)(l),c=t.prepareQuery(r.sqlToQuery(this.getSQL()),i,e,!0,void 0,{type:"select",tables:[...o]},a);return c.joinsNotNullableMap=n,c.setToken(s)})}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>w.tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken))}function P(e,t){return(i,r,...n)=>{let s=[r,...n].map(i=>({type:e,isAll:t,rightSelect:i}));for(let e of s)if(!(0,I.haveSameKeys)(i.getSelectedFields(),e.rightSelect.getSelectedFields()))throw Error("Set operator error (union / intersect / except): selected fields are not the same or are in a different order");return i.addSetOperators(s)}}(0,I.applyMixins)(U,[y]);let $=()=>({union:j,unionAll:H,intersect:q,intersectAll:z,except:V,exceptAll:G}),j=P("union",!1),H=P("union",!0),q=P("intersect",!1),z=P("intersect",!0),V=P("except",!1),G=P("except",!0);class Y{static [d.entityKind]="PgQueryBuilder";dialect;dialectConfig;constructor(e){this.dialect=(0,d.is)(e,u.PgDialect)?e:void 0,this.dialectConfig=(0,d.is)(e,u.PgDialect)?void 0:e}$with=(e,t)=>{let i=this;return{as:r=>("function"==typeof r&&(r=r(i)),new Proxy(new h.WithSubquery(r.getSQL(),t??("getSelectedFields"in r?r.getSelectedFields()??{}:{}),e,!0),new l({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}};with(...e){let t=this;return{select:function(i){return new M({fields:i??void 0,session:void 0,dialect:t.getDialect(),withList:e})},selectDistinct:function(e){return new M({fields:e??void 0,session:void 0,dialect:t.getDialect(),distinct:!0})},selectDistinctOn:function(e,i){return new M({fields:i??void 0,session:void 0,dialect:t.getDialect(),distinct:{on:e}})}}}select(e){return new M({fields:e??void 0,session:void 0,dialect:this.getDialect()})}selectDistinct(e){return new M({fields:e??void 0,session:void 0,dialect:this.getDialect(),distinct:!0})}selectDistinctOn(e,t){return new M({fields:t??void 0,session:void 0,dialect:this.getDialect(),distinct:{on:e}})}getDialect(){return this.dialect||(this.dialect=new u.PgDialect(this.dialectConfig)),this.dialect}}var W=Q,J=p;class K{constructor(e,t){this.name=e,this.schema=t}static [t.entityKind]="PgDefaultViewBuilderCore";config={};with(e){return this.config.with=e,this}}class Z extends K{static [t.entityKind]="PgViewBuilder";as(e){"function"==typeof e&&(e=e(new Y));let t=new l({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}),i=new Proxy(e.getSelectedFields(),t);return new Proxy(new er({pgConfig:this.config,config:{name:this.name,schema:this.schema,selectedFields:i,query:e.getSQL().inlineParams()}}),t)}}class X extends K{static [t.entityKind]="PgManualViewBuilder";columns;constructor(e,t,i){super(e,i),this.columns=(0,c.getTableColumns)((0,W.pgTable)(e,t))}existing(){return new Proxy(new er({pgConfig:void 0,config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:void 0}}),new l({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}as(e){return new Proxy(new er({pgConfig:this.config,config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:e.inlineParams()}}),new l({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}}class ee{constructor(e,t){this.name=e,this.schema=t}static [t.entityKind]="PgMaterializedViewBuilderCore";config={};using(e){return this.config.using=e,this}with(e){return this.config.with=e,this}tablespace(e){return this.config.tablespace=e,this}withNoData(){return this.config.withNoData=!0,this}}class et extends ee{static [t.entityKind]="PgMaterializedViewBuilder";as(e){"function"==typeof e&&(e=e(new Y));let t=new l({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}),i=new Proxy(e.getSelectedFields(),t);return new Proxy(new es({pgConfig:{with:this.config.with,using:this.config.using,tablespace:this.config.tablespace,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:i,query:e.getSQL().inlineParams()}}),t)}}class ei extends ee{static [t.entityKind]="PgManualMaterializedViewBuilder";columns;constructor(e,t,i){super(e,i),this.columns=(0,c.getTableColumns)((0,W.pgTable)(e,t))}existing(){return new Proxy(new es({pgConfig:{tablespace:this.config.tablespace,using:this.config.using,with:this.config.with,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:void 0}}),new l({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}as(e){return new Proxy(new es({pgConfig:{tablespace:this.config.tablespace,using:this.config.using,with:this.config.with,withNoData:this.config.withNoData},config:{name:this.name,schema:this.schema,selectedFields:this.columns,query:e.inlineParams()}}),new l({alias:this.name,sqlBehavior:"error",sqlAliasedBehavior:"alias",replaceOriginalName:!0}))}}class er extends J.PgViewBase{static [t.entityKind]="PgView";[L];constructor({pgConfig:e,config:t}){super(t),e&&(this[L]={with:e.with})}}let en=Symbol.for("drizzle:PgMaterializedViewConfig");class es extends J.PgViewBase{static [t.entityKind]="PgMaterializedView";[en];constructor({pgConfig:e,config:t}){super(t),this[en]={with:e?.with,using:e?.using,tablespace:e?.tablespace,withNoData:e?.withNoData}}}function ea(e,t,i){return t?new X(e,t,i):new Z(e,i)}function eo(e,t,i){return t?new ei(e,t,i):new et(e,i)}},111292,e=>{"use strict";var t=e.i(990866),i=e.i(65054),r=e.i(509840),n=t;class s{constructor(e,t,i){this.seqName=e,this.seqOptions=t,this.schema=i}static [n.entityKind]="PgSequence"}function a(e,t,i){return new s(e,t,i)}var o=e.i(146794),l=e.i(325765);class c{constructor(e){this.schemaName=e}static [t.entityKind]="PgSchema";table=(e,t,i)=>(0,o.pgTableWithSchema)(e,t,i,this.schemaName);view=(e,t)=>(0,l.pgViewWithSchema)(e,t,this.schemaName);materializedView=(e,t)=>(0,l.pgMaterializedViewWithSchema)(e,t,this.schemaName);enum(e,t){return Array.isArray(t)?(0,r.pgEnumWithSchema)(e,[...t],this.schemaName):(0,r.pgEnumObjectWithSchema)(e,t,this.schemaName)}sequence=(e,t)=>a(e,t,this.schemaName);getSQL(){return new i.SQL([i.sql.identifier(this.schemaName)])}shouldOmitSQLParens(){return!0}}function d(e){if("public"===e)throw Error("You can't specify 'public' as schema name. Postgres is using public schema by default. If you want to use 'public' schema, just use pgTable() instead of creating a schema");return new c(e)}e.s(["pgSchema",()=>d],111292)},344676,e=>{"use strict";var t=e.i(381692);let i=async function({id:e,data:i,limit:r,req:n,returning:s,where:a}){let o=[],l=(e?[await this.findOne({collection:t.jobsCollectionSlug,req:n,where:{id:{equals:e}}})]:(await this.find({collection:t.jobsCollectionSlug,limit:r,pagination:!1,req:n,where:a})).docs).filter(Boolean);if(!l)return null;for(let e of l){let r={...e,...i},a=await this.updateOne({id:e.id,collection:t.jobsCollectionSlug,data:r,req:n,returning:s});o.push(a)}return o};var r=e.i(522734),n=e.i(407631);let s=`
|
||
import {
|
||
MigrateUpArgs,
|
||
MigrateDownArgs,
|
||
} from "@payloadcms/db-mongodb";
|
||
|
||
export async function up({ payload, req }: MigrateUpArgs): Promise<void> {
|
||
// Migration code
|
||
};
|
||
|
||
export async function down({ payload, req }: MigrateDownArgs): Promise<void> {
|
||
// Migration code
|
||
};
|
||
`,a=function({migrationName:e,payload:t}){let i=t.db.migrationDir;r.default.existsSync(i)||r.default.mkdirSync(i);let[a,o]=new Date().toISOString().split("T"),l=a.replace(/\D/g,""),c=o.split(".")[0].replace(/\D/g,""),d=`${l}_${c}`,u=e.replace(/\W/g,"_"),h=`${d}_${u}.ts`,A=`${i}/${h}`;r.default.writeFileSync(A,s),(0,n.writeMigrationIndex)({migrationsDir:t.db.migrationDir}),t.logger.info({msg:`Migration created at ${A}`})};var o=e.i(452968),l=e.i(680110),c=e.i(311462),d=e.i(893961),u=e.i(159493),h=e.i(252054);let A=async function(e){let{payload:t}=this,i=e?.migrations||await (0,h.readMigrationFiles)({payload:t}),{existingMigrations:r,latestBatch:n}=await (0,u.getMigrations)({payload:t}),s=n+1;for(let e of i){if(r.find(t=>t.name===e.name))continue;let i=Date.now(),n=await (0,l.createLocalReq)({},t);t.logger.info({msg:`Migrating: ${e.name}`});try{await (0,c.initTransaction)(n);let r=t.db.sessions?.[await n.transactionID];await e.up({payload:t,req:n,session:r}),t.logger.info({msg:`Migrated: ${e.name} (${Date.now()-i}ms)`}),await t.create({collection:"payload-migrations",data:{name:e.name,batch:s},req:n}),await (0,o.commitTransaction)(n)}catch(i){throw await (0,d.killTransaction)(n),t.logger.error({err:i,msg:`Error running migration ${e.name}`}),i}}};var p=o,f=l,g=c,m=d,y=u,b=h;async function E(){let{payload:e}=this,t=await (0,b.readMigrationFiles)({payload:e}),{existingMigrations:i,latestBatch:r}=await (0,y.getMigrations)({payload:e});if(!i?.length)return void e.logger.info({msg:"No migrations to rollback."});for(let n of(e.logger.info({msg:`Rolling back batch ${r} consisting of ${i.length} migration(s).`}),i.filter(({batch:e})=>e===r))){let i=t.find(e=>e.name===n.name);if(!i)throw Error(`Migration ${n.name} not found locally.`);let r=Date.now(),s=await (0,f.createLocalReq)({},e);try{e.logger.info({msg:`Migrating down: ${i.name}`}),await (0,g.initTransaction)(s);let t=e.db.sessions?.[await s.transactionID];await i.down({payload:e,req:s,session:t}),e.logger.info({msg:`Migrated down: ${i.name} (${Date.now()-r}ms)`}),await e.delete({id:n.id,collection:"payload-migrations",req:s}),await (0,p.commitTransaction)(s)}catch(t){await (0,m.killTransaction)(s),e.logger.error({err:t,msg:`Error running migration ${i.name}`}),process.exit(1)}}}var C=o,w=l,I=c,v=d,B=u,Q=h;async function x(){let{payload:e}=this,t=await (0,Q.readMigrationFiles)({payload:e}),{existingMigrations:i}=await (0,B.getMigrations)({payload:e}),r=await (0,w.createLocalReq)({},e);if(i?.length)for(let n of(e.logger.info({msg:`Rolling back all ${i.length} migration(s).`}),i.reverse(),i))try{let i=t.find(e=>e.name===n.name);if(!i)throw Error(`Migration ${n.name} not found locally.`);e.logger.info({msg:`Migrating down: ${n.name}`});let s=Date.now();await (0,I.initTransaction)(r);let a=e.db.sessions?.[await r.transactionID];await i.down({payload:e,req:r,session:a}),e.logger.info({msg:`Migrated down: ${n.name} (${Date.now()-s}ms)`}),await e.delete({collection:"payload-migrations",req:r,where:{name:{equals:n.name}}})}catch(i){await (0,v.killTransaction)(r);let t=`Error running migration ${n.name}. Rolling back.`;i instanceof Error&&(t+=` ${i.message}`),e.logger.error({err:i,msg:t}),process.exit(1)}else e.logger.info({msg:"No migrations to rollback."});for(let i of t){e.logger.info({msg:`Migrating: ${i.name}`});try{let t=Date.now();await (0,I.initTransaction)(r),await i.up({payload:e,req:r}),await e.create({collection:"payload-migrations",data:{name:i.name,executed:!0},req:r}),await (0,C.commitTransaction)(r),e.logger.info({msg:`Migrated: ${i.name} (${Date.now()-t}ms)`})}catch(n){await (0,v.killTransaction)(r);let t=`Error running migration ${i.name}. Rolling back.`;n instanceof Error&&(t+=` ${n.message}`),e.logger.error({err:n,msg:t}),process.exit(1)}}}var S=o,k=l,T=c,N=d,D=u,_=h;async function R(){let{payload:e}=this,t=await (0,_.readMigrationFiles)({payload:e}),{existingMigrations:i}=await (0,D.getMigrations)({payload:e});if(!i?.length)return void e.logger.info({msg:"No migrations to reset."});let r=await (0,k.createLocalReq)({},e);for(let n of(t.reverse(),t)){let t=i.find(e=>e.name===n.name);if(t){e.logger.info({msg:`Migrating down: ${n.name}`});try{let i=Date.now();await (0,T.initTransaction)(r);let s=e.db.sessions?.[await r.transactionID];await n.down({payload:e,req:r,session:s}),await e.delete({collection:"payload-migrations",req:r,where:{id:{equals:t.id}}}),await (0,S.commitTransaction)(r),e.logger.info({msg:`Migrated down: ${n.name} (${Date.now()-i}ms)`})}catch(t){throw await (0,N.killTransaction)(r),e.logger.error({err:t,msg:`Error running migration ${n.name}`}),t}}}try{await e.delete({collection:"payload-migrations",where:{batch:{equals:-1}}})}catch(t){e.logger.error({err:t,msg:"Error deleting dev migration"})}}var L=e.i(491401),F=u,M=h;async function O(){let{payload:e}=this,t=await (0,M.readMigrationFiles)({payload:e});e.logger.debug({msg:`Found ${t.length} migration files.`});let{existingMigrations:i}=await (0,F.getMigrations)({payload:e});if(!t.length)return void e.logger.info({msg:"No migrations found."});let r=t.map(e=>{let t=i.find(t=>t.name===e.name);return{Name:e.name,Batch:t?.batch,Ran:t?"Yes":"No"}}),n=new L.Table;r.forEach(e=>{n.addRow(e,{color:"Yes"===e.Ran?"green":"red"})}),n.printTable()}let U=()=>Promise.resolve(null),P=()=>Promise.resolve(null),$=()=>Promise.resolve(null);function j(e){return{beginTransaction:U,commitTransaction:$,createMigration:a,migrate:A,migrateDown:E,migrateFresh:()=>Promise.resolve(null),migrateRefresh:x,migrateReset:R,migrateStatus:O,rollbackTransaction:P,updateJobs:i,...e,migrationDir:e.migrationDir||"migrations",bulkOperationsSingleTransaction:e.bulkOperationsSingleTransaction??!1}}e.s(["createDatabaseAdapter",()=>j],344676)},223508,e=>{"use strict";function t(){let e=Promise.resolve(null);return()=>e}e.s(["defaultBeginTransaction",()=>t])},147858,e=>{"use strict";var t=e.i(522734),i=e.i(814747);let r=e=>{let r=process.cwd(),n=i.default.resolve(r,"src/migrations"),s=i.default.resolve(r,"dist/migrations"),a=i.default.resolve(r,"migrations");return e||(t.default.existsSync(n)?n:t.default.existsSync(s)?s:t.default.existsSync(a)?a:t.default.existsSync(i.default.resolve(r,"src"))?n:a)};e.s(["findMigrationDir",0,r])},585195,e=>{"use strict";var t=e.i(990866);class i{static [t.entityKind]="ConsoleLogWriter";write(e){console.log(e)}}class r{static [t.entityKind]="DefaultLogger";writer;constructor(e){this.writer=e?.writer??new i}logQuery(e,t){let i=t.map(e=>{try{return JSON.stringify(e)}catch{return String(e)}}),r=i.length?` -- params: [${i.join(", ")}]`:"";this.writer.write(`Query: ${e}${r}`)}}class n{static [t.entityKind]="NoopLogger";logQuery(){}}e.s(["DefaultLogger",()=>r,"NoopLogger",()=>n])},210986,e=>{"use strict";var t=e.i(990866),i=t,r=e.i(586344),n=e.i(888916),s=e.i(959694),a=e.i(309402),o=e.i(564115),l=e.i(853758);class c extends r.QueryPromise{constructor(e,t,i,r){super(),this.session=t,this.dialect=i,this.config={table:e,withList:r}}static [i.entityKind]="PgDelete";config;cacheConfig;where(e){return this.config.where=e,this}returning(e=this.config.table[s.Table.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=(0,o.orderSelectedFields)(e),this}getSQL(){return this.dialect.buildDeleteQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return a.tracer.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"delete",tables:(0,l.extractUsedTable)(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>a.tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new n.SelectionProxyHandler({alias:(0,s.getTableName)(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}var d=t,u=r,h=n,A=e.i(65054),p=s,f=a,g=o,m=l,y=e.i(722908);class b{constructor(e,t,i,r,n){this.table=e,this.session=t,this.dialect=i,this.withList=r,this.overridingSystemValue_=n}static [d.entityKind]="PgInsertBuilder";authToken;setToken(e){return this.authToken=e,this}overridingSystemValue(){return this.overridingSystemValue_=!0,this}values(e){if(0===(e=Array.isArray(e)?e:[e]).length)throw Error("values() must be called with at least one value");let t=e.map(e=>{let t={},i=this.table[p.Table.Symbol.Columns];for(let r of Object.keys(e)){let n=e[r];t[r]=(0,d.is)(n,A.SQL)?n:new A.Param(n,i[r])}return t});return new E(this.table,t,this.session,this.dialect,this.withList,!1,this.overridingSystemValue_).setToken(this.authToken)}select(e){let t="function"==typeof e?e(new y.QueryBuilder):e;if(!(0,d.is)(t,A.SQL)&&!(0,g.haveSameKeys)(this.table[p.Columns],t._.selectedFields))throw Error("Insert select error: selected fields are not the same or are in a different order compared to the table definition");return new E(this.table,t,this.session,this.dialect,this.withList,!0)}}class E extends u.QueryPromise{constructor(e,t,i,r,n,s,a){super(),this.session=i,this.dialect=r,this.config={table:e,values:t,withList:n,select:s,overridingSystemValue_:a}}static [d.entityKind]="PgInsert";config;cacheConfig;returning(e=this.config.table[p.Table.Symbol.Columns]){return this.config.returningFields=e,this.config.returning=(0,g.orderSelectedFields)(e),this}onConflictDoNothing(e={}){if(void 0===e.target)this.config.onConflict=A.sql`do nothing`;else{let t="";t=Array.isArray(e.target)?e.target.map(e=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(e))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target));let i=e.where?A.sql` where ${e.where}`:void 0;this.config.onConflict=A.sql`(${A.sql.raw(t)})${i} do nothing`}return this}onConflictDoUpdate(e){if(e.where&&(e.targetWhere||e.setWhere))throw Error('You cannot use both "where" and "targetWhere"/"setWhere" at the same time - "where" is deprecated, use "targetWhere" or "setWhere" instead.');let t=e.where?A.sql` where ${e.where}`:void 0,i=e.targetWhere?A.sql` where ${e.targetWhere}`:void 0,r=e.setWhere?A.sql` where ${e.setWhere}`:void 0,n=this.dialect.buildUpdateSet(this.config.table,(0,g.mapUpdateSet)(this.config.table,e.set)),s="";return s=Array.isArray(e.target)?e.target.map(e=>this.dialect.escapeName(this.dialect.casing.getColumnCasing(e))).join(","):this.dialect.escapeName(this.dialect.casing.getColumnCasing(e.target)),this.config.onConflict=A.sql`(${A.sql.raw(s)})${i} do update set ${n}${t}${r}`,this}getSQL(){return this.dialect.buildInsertQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return f.tracer.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"insert",tables:(0,m.extractUsedTable)(this.config.table)},this.cacheConfig))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>f.tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken));getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new h.SelectionProxyHandler({alias:(0,p.getTableName)(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}var C=e.i(710804),w=t,I=e.i(146794),v=r,B=n,Q=A,x=e.i(489508),S=s,k=o,T=e.i(509331),N=l;class D{constructor(e,t,i,r){this.table=e,this.session=t,this.dialect=i,this.withList=r}static [w.entityKind]="PgUpdateBuilder";authToken;setToken(e){return this.authToken=e,this}set(e){return new _(this.table,(0,k.mapUpdateSet)(this.table,e),this.session,this.dialect,this.withList).setToken(this.authToken)}}class _ extends v.QueryPromise{constructor(e,t,i,r,n){super(),this.session=i,this.dialect=r,this.config={set:t,table:e,withList:n,joins:[]},this.tableName=(0,k.getTableLikeName)(e),this.joinsNotNullableMap="string"==typeof this.tableName?{[this.tableName]:!0}:{}}static [w.entityKind]="PgUpdate";config;tableName;joinsNotNullableMap;cacheConfig;from(e){let t=e,i=(0,k.getTableLikeName)(t);return"string"==typeof i&&(this.joinsNotNullableMap[i]=!0),this.config.from=t,this}getTableLikeFields(e){return(0,w.is)(e,I.PgTable)?e[S.Table.Symbol.Columns]:(0,w.is)(e,x.Subquery)?e._.selectedFields:e[T.ViewBaseConfig].selectedFields}createJoin(e){return(t,i)=>{let r=(0,k.getTableLikeName)(t);if("string"==typeof r&&this.config.joins.some(e=>e.alias===r))throw Error(`Alias "${r}" is already used in this query`);if("function"==typeof i){let e=this.config.from&&!(0,w.is)(this.config.from,Q.SQL)?this.getTableLikeFields(this.config.from):void 0;i=i(new Proxy(this.config.table[S.Table.Symbol.Columns],new B.SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})),e&&new Proxy(e,new B.SelectionProxyHandler({sqlAliasedBehavior:"sql",sqlBehavior:"sql"})))}if(this.config.joins.push({on:i,table:t,joinType:e,alias:r}),"string"==typeof r)switch(e){case"left":this.joinsNotNullableMap[r]=!1;break;case"right":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[r]=!0;break;case"inner":this.joinsNotNullableMap[r]=!0;break;case"full":this.joinsNotNullableMap=Object.fromEntries(Object.entries(this.joinsNotNullableMap).map(([e])=>[e,!1])),this.joinsNotNullableMap[r]=!1}return this}}leftJoin=this.createJoin("left");rightJoin=this.createJoin("right");innerJoin=this.createJoin("inner");fullJoin=this.createJoin("full");where(e){return this.config.where=e,this}returning(e){if(!e&&(e=Object.assign({},this.config.table[S.Table.Symbol.Columns]),this.config.from)){let t=(0,k.getTableLikeName)(this.config.from);if("string"==typeof t&&this.config.from&&!(0,w.is)(this.config.from,Q.SQL)){let i=this.getTableLikeFields(this.config.from);e[t]=i}for(let t of this.config.joins){let i=(0,k.getTableLikeName)(t.table);if("string"==typeof i&&!(0,w.is)(t.table,Q.SQL)){let r=this.getTableLikeFields(t.table);e[i]=r}}}return this.config.returningFields=e,this.config.returning=(0,k.orderSelectedFields)(e),this}getSQL(){return this.dialect.buildUpdateQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){let t=this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),this.config.returning,e,!0,void 0,{type:"insert",tables:(0,N.extractUsedTable)(this.config.table)},this.cacheConfig);return t.joinsNotNullableMap=this.joinsNotNullableMap,t}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>this._prepare().execute(e,this.authToken);getSelectedFields(){return this.config.returningFields?new Proxy(this.config.returningFields,new B.SelectionProxyHandler({alias:(0,S.getTableName)(this.config.table),sqlAliasedBehavior:"alias",sqlBehavior:"error"})):void 0}$dynamic(){return this}}var R=y,L=n,F=A,M=x,O=t,U=A;class P extends U.SQL{constructor(e){super(P.buildEmbeddedCount(e.source,e.filters).queryChunks),this.params=e,this.mapWith(Number),this.session=e.session,this.sql=P.buildCount(e.source,e.filters)}sql;token;static [O.entityKind]="PgCountBuilder";[Symbol.toStringTag]="PgCountBuilder";session;static buildEmbeddedCount(e,t){return U.sql`(select count(*) from ${e}${U.sql.raw(" where ").if(t)}${t})`}static buildCount(e,t){return U.sql`select count(*) as count from ${e}${U.sql.raw(" where ").if(t)}${t};`}setToken(e){return this.token=e,this}then(e,t){return Promise.resolve(this.session.count(this.sql,this.token)).then(e,t)}catch(e){return this.then(void 0,e)}finally(e){return this.then(t=>(e?.(),t),t=>{throw e?.(),t})}}var $=t,j=r,H=e.i(44679),q=a;class z{constructor(e,t,i,r,n,s,a){this.fullSchema=e,this.schema=t,this.tableNamesMap=i,this.table=r,this.tableConfig=n,this.dialect=s,this.session=a}static [$.entityKind]="PgRelationalQueryBuilder";findMany(e){return new V(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e||{},"many")}findFirst(e){return new V(this.fullSchema,this.schema,this.tableNamesMap,this.table,this.tableConfig,this.dialect,this.session,e?{...e,limit:1}:{limit:1},"first")}}class V extends j.QueryPromise{constructor(e,t,i,r,n,s,a,o,l){super(),this.fullSchema=e,this.schema=t,this.tableNamesMap=i,this.table=r,this.tableConfig=n,this.dialect=s,this.session=a,this.config=o,this.mode=l}static [$.entityKind]="PgRelationalQuery";_prepare(e){return q.tracer.startActiveSpan("drizzle.prepareQuery",()=>{let{query:t,builtQuery:i}=this._toSQL();return this.session.prepareQuery(i,void 0,e,!0,(e,i)=>{let r=e.map(e=>(0,H.mapRelationalRow)(this.schema,this.tableConfig,e,t.selection,i));return"first"===this.mode?r[0]:r})})}prepare(e){return this._prepare(e)}_getQuery(){return this.dialect.buildRelationalQueryWithoutPK({fullSchema:this.fullSchema,schema:this.schema,tableNamesMap:this.tableNamesMap,table:this.table,tableConfig:this.tableConfig,queryConfig:this.config,tableAlias:this.tableConfig.tsName})}getSQL(){return this._getQuery().sql}_toSQL(){let e=this._getQuery(),t=this.dialect.sqlToQuery(e.sql);return{query:e,builtQuery:t}}toSQL(){return this._toSQL().builtQuery}authToken;setToken(e){return this.authToken=e,this}execute(){return q.tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(void 0,this.authToken))}}var G=t,Y=r;class W extends Y.QueryPromise{constructor(e,t,i,r){super(),this.execute=e,this.sql=t,this.query=i,this.mapBatchResult=r}static [G.entityKind]="PgRaw";getSQL(){return this.sql}getQuery(){return this.query}mapResult(e,t){return t?this.mapBatchResult(e):e}_prepare(){return this}isResponseInArrayMode(){return!1}}var J=t,K=r,Z=a;class X extends K.QueryPromise{constructor(e,t,i){super(),this.session=t,this.dialect=i,this.config={view:e}}static [J.entityKind]="PgRefreshMaterializedView";config;concurrently(){if(void 0!==this.config.withNoData)throw Error("Cannot use concurrently and withNoData together");return this.config.concurrently=!0,this}withNoData(){if(void 0!==this.config.concurrently)throw Error("Cannot use concurrently and withNoData together");return this.config.withNoData=!0,this}getSQL(){return this.dialect.buildRefreshMaterializedViewQuery(this.config)}toSQL(){let{typings:e,...t}=this.dialect.sqlToQuery(this.getSQL());return t}_prepare(e){return Z.tracer.startActiveSpan("drizzle.prepareQuery",()=>this.session.prepareQuery(this.dialect.sqlToQuery(this.getSQL()),void 0,e,!0))}prepare(e){return this._prepare(e)}authToken;setToken(e){return this.authToken=e,this}execute=e=>Z.tracer.startActiveSpan("drizzle.operation",()=>this._prepare().execute(e,this.authToken))}class ee{constructor(e,t,i){if(this.dialect=e,this.session=t,this._=i?{schema:i.schema,fullSchema:i.fullSchema,tableNamesMap:i.tableNamesMap,session:t}:{schema:void 0,fullSchema:{},tableNamesMap:{},session:t},this.query={},this._.schema)for(const[r,n]of Object.entries(this._.schema))this.query[r]=new z(i.fullSchema,this._.schema,this._.tableNamesMap,i.fullSchema[r],n,e,t);this.$cache={invalidate:async e=>{}}}static [t.entityKind]="PgDatabase";query;$with=(e,t)=>{let i=this;return{as:r=>("function"==typeof r&&(r=r(new R.QueryBuilder(i.dialect))),new Proxy(new M.WithSubquery(r.getSQL(),t??("getSelectedFields"in r?r.getSelectedFields()??{}:{}),e,!0),new L.SelectionProxyHandler({alias:e,sqlAliasedBehavior:"alias",sqlBehavior:"error"})))}};$count(e,t){return new P({source:e,filters:t,session:this.session})}$cache;with(...e){let t=this;return{select:function(i){return new C.PgSelectBuilder({fields:i??void 0,session:t.session,dialect:t.dialect,withList:e})},selectDistinct:function(i){return new C.PgSelectBuilder({fields:i??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:!0})},selectDistinctOn:function(i,r){return new C.PgSelectBuilder({fields:r??void 0,session:t.session,dialect:t.dialect,withList:e,distinct:{on:i}})},update:function(i){return new D(i,t.session,t.dialect,e)},insert:function(i){return new b(i,t.session,t.dialect,e)},delete:function(i){return new c(i,t.session,t.dialect,e)}}}select(e){return new C.PgSelectBuilder({fields:e??void 0,session:this.session,dialect:this.dialect})}selectDistinct(e){return new C.PgSelectBuilder({fields:e??void 0,session:this.session,dialect:this.dialect,distinct:!0})}selectDistinctOn(e,t){return new C.PgSelectBuilder({fields:t??void 0,session:this.session,dialect:this.dialect,distinct:{on:e}})}update(e){return new D(e,this.session,this.dialect)}insert(e){return new b(e,this.session,this.dialect)}delete(e){return new c(e,this.session,this.dialect)}refreshMaterializedView(e){return new X(e,this.session,this.dialect)}authToken;execute(e){let t="string"==typeof e?F.sql.raw(e):e.getSQL(),i=this.dialect.sqlToQuery(t),r=this.session.prepareQuery(i,void 0,void 0,!1);return new W(()=>r.execute(void 0,this.authToken),t,i,e=>r.mapResult(e,!0))}transaction(e,t){return this.session.transaction(e,t)}}let et=(e,t,i=()=>t[Math.floor(Math.random()*t.length)])=>{let r=(...e)=>i(t).select(...e),n=(...e)=>i(t).selectDistinct(...e),s=(...e)=>i(t).selectDistinctOn(...e),a=(...e)=>i(t).$count(...e),o=(...e)=>i(t).with(...e),l=e=>i(t).$with(e),c=(...t)=>e.update(...t),d=(...t)=>e.insert(...t),u=(...t)=>e.delete(...t),h=(...t)=>e.execute(...t),A=(...t)=>e.transaction(...t),p=(...t)=>e.refreshMaterializedView(...t);return{...e,update:c,insert:d,delete:u,execute:h,transaction:A,refreshMaterializedView:p,$primary:e,$replicas:t,select:r,selectDistinct:n,selectDistinctOn:s,$count:a,$with:l,with:o,get query(){return i(t).query}}};e.s(["PgDatabase",()=>ee,"withReplicas",()=>et],210986)},6813,e=>{"use strict";var t=e.i(990866);class i{static [t.entityKind]="Cache"}class r extends i{strategy(){return"all"}static [t.entityKind]="NoopCache";async get(e){}async put(e,t,i,r){}async onMutate(e){}}async function n(e,t){let i=`${e}-${JSON.stringify(t)}`,r=new TextEncoder().encode(i);return[...new Uint8Array(await crypto.subtle.digest("SHA-256",r))].map(e=>e.toString(16).padStart(2,"0")).join("")}e.s(["NoopCache",()=>r,"hashQuery",()=>n])},398647,e=>{"use strict";var t=e.i(6813),i=e.i(990866),r=e.i(864664),n=e.i(65054),s=e.i(309402),a=e.i(210986);class o{constructor(e,t,i,r){this.query=e,this.cache=t,this.queryMetadata=i,this.cacheConfig=r,t&&"all"===t.strategy()&&void 0===r&&(this.cacheConfig={enable:!0,autoInvalidate:!0}),this.cacheConfig?.enable||(this.cacheConfig=void 0)}authToken;getQuery(){return this.query}mapResult(e,t){return e}setToken(e){return this.authToken=e,this}static [i.entityKind]="PgPreparedQuery";joinsNotNullableMap;async queryWithCache(e,n,s){if(void 0===this.cache||(0,i.is)(this.cache,t.NoopCache)||void 0===this.queryMetadata||this.cacheConfig&&!this.cacheConfig.enable)try{return await s()}catch(t){throw new r.DrizzleQueryError(e,n,t)}if(("insert"===this.queryMetadata.type||"update"===this.queryMetadata.type||"delete"===this.queryMetadata.type)&&this.queryMetadata.tables.length>0)try{let[e]=await Promise.all([s(),this.cache.onMutate({tables:this.queryMetadata.tables})]);return e}catch(t){throw new r.DrizzleQueryError(e,n,t)}if(!this.cacheConfig)try{return await s()}catch(t){throw new r.DrizzleQueryError(e,n,t)}if("select"===this.queryMetadata.type){let i=await this.cache.get(this.cacheConfig.tag??await (0,t.hashQuery)(e,n),this.queryMetadata.tables,void 0!==this.cacheConfig.tag,this.cacheConfig.autoInvalidate);if(void 0===i){let i;try{i=await s()}catch(t){throw new r.DrizzleQueryError(e,n,t)}return await this.cache.put(this.cacheConfig.tag??await (0,t.hashQuery)(e,n),i,this.cacheConfig.autoInvalidate?this.queryMetadata.tables:[],void 0!==this.cacheConfig.tag,this.cacheConfig.config),i}return i}try{return await s()}catch(t){throw new r.DrizzleQueryError(e,n,t)}}}class l{constructor(e){this.dialect=e}static [i.entityKind]="PgSession";execute(e,t){return s.tracer.startActiveSpan("drizzle.operation",()=>s.tracer.startActiveSpan("drizzle.prepareQuery",()=>this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1)).setToken(t).execute(void 0,t))}all(e){return this.prepareQuery(this.dialect.sqlToQuery(e),void 0,void 0,!1).all()}async count(e,t){return Number((await this.execute(e,t))[0].count)}}class c extends a.PgDatabase{constructor(e,t,i,r=0){super(e,t,i),this.schema=i,this.nestedIndex=r}static [i.entityKind]="PgTransaction";rollback(){throw new r.TransactionRollbackError}getTransactionConfigSQL(e){let t=[];return e.isolationLevel&&t.push(`isolation level ${e.isolationLevel}`),e.accessMode&&t.push(e.accessMode),"boolean"==typeof e.deferrable&&t.push(e.deferrable?"deferrable":"not deferrable"),n.sql.raw(t.join(" "))}setTransaction(e){return this.session.execute(n.sql`set transaction ${this.getTransactionConfigSQL(e)}`)}}e.s(["PgPreparedQuery",()=>o,"PgSession",()=>l,"PgTransaction",()=>c])},201520,e=>e.a(async(t,i)=>{try{var r=e.i(365969),n=e.i(6813),s=e.i(990866),a=e.i(585195),o=e.i(398647),l=e.i(65054),c=e.i(309402),d=e.i(564115),u=t([r]);[r]=u.then?(await u)():u;let{Pool:h,types:A}=r.default;class p extends o.PgPreparedQuery{constructor(e,t,i,r,n,s,a,o,l,c,d){super({sql:t,params:i},n,s,a),this.client=e,this.queryString=t,this.params=i,this.logger=r,this.fields=o,this._isResponseInArrayMode=c,this.customResultMapper=d,this.rawQueryConfig={name:l,text:t,types:{getTypeParser:(e,t)=>e===A.builtins.TIMESTAMPTZ||e===A.builtins.TIMESTAMP||e===A.builtins.DATE||e===A.builtins.INTERVAL||1231===e||1115===e||1185===e||1187===e||1182===e?e=>e:A.getTypeParser(e,t)}},this.queryConfig={name:l,text:t,rowMode:"array",types:{getTypeParser:(e,t)=>e===A.builtins.TIMESTAMPTZ||e===A.builtins.TIMESTAMP||e===A.builtins.DATE||e===A.builtins.INTERVAL||1231===e||1115===e||1185===e||1187===e||1182===e?e=>e:A.getTypeParser(e,t)}}}static [s.entityKind]="NodePgPreparedQuery";rawQueryConfig;queryConfig;async execute(e={}){return c.tracer.startActiveSpan("drizzle.execute",async()=>{let t=(0,l.fillPlaceholders)(this.params,e);this.logger.logQuery(this.rawQueryConfig.text,t);let{fields:i,rawQueryConfig:r,client:n,queryConfig:s,joinsNotNullableMap:a,customResultMapper:o}=this;if(!i&&!o)return c.tracer.startActiveSpan("drizzle.driver.execute",async e=>(e?.setAttributes({"drizzle.query.name":r.name,"drizzle.query.text":r.text,"drizzle.query.params":JSON.stringify(t)}),this.queryWithCache(r.text,t,async()=>await n.query(r,t))));let u=await c.tracer.startActiveSpan("drizzle.driver.execute",e=>(e?.setAttributes({"drizzle.query.name":s.name,"drizzle.query.text":s.text,"drizzle.query.params":JSON.stringify(t)}),this.queryWithCache(s.text,t,async()=>await n.query(s,t))));return c.tracer.startActiveSpan("drizzle.mapResponse",()=>o?o(u.rows):u.rows.map(e=>(0,d.mapResultRow)(i,e,a)))})}all(e={}){return c.tracer.startActiveSpan("drizzle.execute",()=>{let t=(0,l.fillPlaceholders)(this.params,e);return this.logger.logQuery(this.rawQueryConfig.text,t),c.tracer.startActiveSpan("drizzle.driver.execute",e=>(e?.setAttributes({"drizzle.query.name":this.rawQueryConfig.name,"drizzle.query.text":this.rawQueryConfig.text,"drizzle.query.params":JSON.stringify(t)}),this.queryWithCache(this.rawQueryConfig.text,t,async()=>this.client.query(this.rawQueryConfig,t)).then(e=>e.rows)))})}isResponseInArrayMode(){return this._isResponseInArrayMode}}class f extends o.PgSession{constructor(e,t,i,r={}){super(t),this.client=e,this.schema=i,this.options=r,this.logger=r.logger??new a.NoopLogger,this.cache=r.cache??new n.NoopCache}static [s.entityKind]="NodePgSession";logger;cache;prepareQuery(e,t,i,r,n,s,a){return new p(this.client,e.sql,e.params,this.logger,this.cache,s,a,t,i,r,n)}async transaction(e,t){let i=this.client instanceof h?new f(await this.client.connect(),this.dialect,this.schema,this.options):this,r=new g(this.dialect,i,this.schema);await r.execute(l.sql`begin${t?l.sql` ${r.getTransactionConfigSQL(t)}`:void 0}`);try{let t=await e(r);return await r.execute(l.sql`commit`),t}catch(e){throw await r.execute(l.sql`rollback`),e}finally{this.client instanceof h&&i.client.release()}}async count(e){let t=await this.execute(e);return Number(t.rows[0].count)}}class g extends o.PgTransaction{static [s.entityKind]="NodePgTransaction";async transaction(e){let t=`sp${this.nestedIndex+1}`,i=new g(this.dialect,this.session,this.schema,this.nestedIndex+1);await i.execute(l.sql.raw(`savepoint ${t}`));try{let r=await e(i);return await i.execute(l.sql.raw(`release savepoint ${t}`)),r}catch(e){throw await i.execute(l.sql.raw(`rollback to savepoint ${t}`)),e}}}e.s(["NodePgSession",()=>f]),i()}catch(e){i(e)}},!1),330261,e=>e.a(async(t,i)=>{try{var r=e.i(365969),n=e.i(990866),s=e.i(585195),a=e.i(210986),o=e.i(715845),l=e.i(44679),c=e.i(564115),d=e.i(201520),u=t([r,d]);[r,d]=u.then?(await u)():u;class p{constructor(e,t,i={}){this.client=e,this.dialect=t,this.options=i}static [n.entityKind]="NodePgDriver";createSession(e){return new d.NodePgSession(this.client,this.dialect,e,{logger:this.options.logger,cache:this.options.cache})}}class f extends a.PgDatabase{static [n.entityKind]="NodePgDatabase"}function h(e,t={}){let i,r,n=new o.PgDialect({casing:t.casing});if(!0===t.logger?i=new s.DefaultLogger:!1!==t.logger&&(i=t.logger),t.schema){let e=(0,l.extractTablesRelationalConfig)(t.schema,l.createTableRelationsHelpers);r={fullSchema:t.schema,schema:e.tables,tableNamesMap:e.tableNamesMap}}let a=new p(e,n,{logger:i,cache:t.cache}).createSession(r),c=new f(n,a,r);return c.$client=e,c.$cache=t.cache,c.$cache&&(c.$cache.invalidate=t.cache?.onMutate),c}function A(...e){if("string"==typeof e[0]){let t=new r.default.Pool({connectionString:e[0]});return h(t,e[1])}if((0,c.isConfig)(e[0])){let{connection:t,client:i,...n}=e[0];if(i)return h(i,n);let s=new r.default.Pool("string"==typeof t?{connectionString:t}:t);return h(s,n)}return h(e[0],e[1])}(e=>{e.mock=function(e){return h({},e)}})(A||(A={})),e.s(["drizzle",()=>A]),i()}catch(e){i(e)}},!1),522308,e=>e.a(async(t,i)=>{try{var r=e.i(330261),n=e.i(210986),s=t([r]);[r]=s.then?(await s)():s;let a=async function({adapter:e,pool:t,reconnect:i=!1}){let r;if(i)try{r=await t.connect()}catch(i){setTimeout(()=>{e.payload.logger.info("Reconnecting to postgres"),a({adapter:e,pool:t,reconnect:!0})},1e3)}else r=await t.connect();r&&r.prependListener("error",i=>{try{"ECONNRESET"===i.code&&a({adapter:e,pool:t,reconnect:!0})}catch(e){}})},o=async function(e={hotReload:!1}){let{hotReload:t}=e;try{this.pool||(this.pool=new this.pg.Pool(this.poolOptions),await a({adapter:this,pool:this.pool}));let e=this.logger||!1;if(this.drizzle=(0,r.drizzle)({client:this.pool,logger:e,schema:this.schema}),this.readReplicaOptions){this.primaryDrizzle=this.drizzle;let t=this.readReplicaOptions.map(t=>{let i={...this.poolOptions,connectionString:t},n=new this.pg.Pool(i);return a({adapter:this,pool:n}),(0,r.drizzle)({client:n,logger:e,schema:this.schema})}),i=(0,n.withReplicas)(this.drizzle,t);this.drizzle=i}t||"true"!==process.env.PAYLOAD_DROP_DATABASE||(this.payload.logger.info(`---- DROPPING TABLES SCHEMA(${this.schemaName||"public"}) ----`),await this.dropDatabase({adapter:this}),this.payload.logger.info("---- DROPPED TABLES ----"))}catch(i){let t=i instanceof Error?i:Error(String(i));if(t.message?.match(/database .* does not exist/i)&&!this.disableCreateDatabase){if(this.payload.logger.info(`${t.message.charAt(0).toUpperCase()+t.message.slice(1)}, creating...`),await this.createDatabase()&&this.connect)return void await this.connect(e)}else this.payload.logger.error({err:t,msg:`Error: cannot connect to Postgres. Details: ${t.message}`});throw"function"==typeof this.rejectInitializing&&this.rejectInitializing(),Error(`Error: cannot connect to Postgres: ${t.message}`)}await this.createExtensions(),"function"==typeof this.resolveInitializing&&this.resolveInitializing(),this.prodMigrations&&await this.migrate({migrations:this.prodMigrations})};e.s(["connect",0,o]),i()}catch(e){i(e)}},!1),143613,e=>e.a(async(t,i)=>{try{var r=e.i(398613),n=e.i(94102),s=e.i(692453),a=e.i(276654),o=e.i(146194),l=e.i(49332),c=e.i(965322),d=e.i(857179),u=e.i(918432),h=e.i(128598),A=e.i(113739),p=e.i(230553),f=e.i(154910),g=e.i(285759),m=e.i(927804),y=e.i(612847),b=e.i(453055),E=e.i(656456),C=e.i(948123),w=e.i(631909),I=e.i(556356),v=e.i(582265),B=e.i(435555),Q=e.i(635691),x=e.i(703879),S=e.i(79329),k=e.i(419511),T=e.i(273914),N=e.i(476560),D=e.i(761586),_=e.i(572845),R=e.i(51342),L=e.i(424953),F=e.i(932826),M=e.i(347688),O=e.i(706060),U=e.i(697108),P=e.i(294319),$=e.i(29980),j=e.i(697291),H=e.i(465548),q=e.i(326736),z=e.i(653288),V=e.i(677892),G=e.i(203676),Y=e.i(744105),W=e.i(758404),J=e.i(699449),K=e.i(452566),Z=e.i(231117),X=e.i(509840),ee=e.i(111292),et=e.i(146794),ei=e.i(344676),er=e.i(223508),en=e.i(147858),es=e.i(365969),ea=e.i(792509),eo=e.i(522308),el=t([es,eo]);[es,eo]=el.then?(await el)():el;let ed={get url(){return`file://${e.P("node_modules/.pnpm/@payloadcms+db-postgres@3.81.0_@opentelemetry+api@1.9.1_payload@3.81.0_graphql@16.13.2_typescript@5.9.3_/node_modules/@payloadcms/db-postgres/dist/index.js")}`}},eu=(0,ea.fileURLToPath)(ed.url);function ec(e){let t=e.idType||"serial",i="serial"===t?"number":"text",ea=e.allowIDOnCreate??!1;function el({payload:el}){let ec,ed,eh,eA=(0,en.findMigrationDir)(e.migrationDir),ep=new Promise((e,t)=>{ec=e,ed=t});eh=e.schemaName?(0,ee.pgSchema)(e.schemaName):{enum:X.pgEnum,table:et.pgTable};let ef=(e.extensions??[]).reduce((e,t)=>(e[t]=!0,e),{}),eg=({sqlExecute:e,statements:t})=>`${e}
|
||
${t.join("\n")}\`)`,em="execute",ey=(0,ei.createDatabaseAdapter)({name:"postgres",afterSchemaInit:e.afterSchemaInit??[],allowIDOnCreate:ea,beforeSchemaInit:e.beforeSchemaInit??[],blocksAsJSON:e.blocksAsJSON??!1,createDatabase:H.createDatabase,createExtensions:q.createExtensions,createMigration:(0,n.buildCreateMigration)({executeMethod:em,filename:eu,sanitizeStatements:eg}),defaultDrizzleSnapshot:V.defaultDrizzleSnapshot,disableCreateDatabase:e.disableCreateDatabase??!1,drizzle:void 0,enums:{},extensions:ef,features:{json:!0},fieldConstraints:{},findDistinct:E.findDistinct,generateSchema:(0,A.createSchemaGenerator)({columnToCodeConverter:$.columnToCodeConverter,corePackageSuffix:"pg-core",defaultOutputFile:e.generateSchemaOutputFile,enumImport:"pgEnum",schemaImport:"pgSchema",tableImport:"pgTable"}),idType:t,initializing:ep,localesSuffix:e.localesSuffix||"_locales",logger:e.logger,operators:N.operatorMap,pg:e.pg||es.default,pgSchema:eh,pool:void 0,poolOptions:e.pool,prodMigrations:e.prodMigrations,push:e.push,readReplicaOptions:e.readReplicas,readReplicasAfterWriteInterval:e.readReplicasAfterWriteInterval??2e3,relations:{},relationshipsSuffix:e.relationshipsSuffix||"_rels",schema:{},schemaName:e.schemaName,sessions:{},tableNameMap:new Map,tables:{},tablesFilter:e.tablesFilter,transactionOptions:e.transactionOptions||void 0,versionsSuffix:e.versionsSuffix||"_v",beginTransaction:!1===e.transactionOptions?(0,er.defaultBeginTransaction)():r.beginTransaction,commitTransaction:s.commitTransaction,connect:eo.connect,count:a.count,countDistinct:j.countDistinct,countGlobalVersions:o.countGlobalVersions,countVersions:l.countVersions,create:c.create,createGlobal:u.createGlobal,createGlobalVersion:h.createGlobalVersion,createJSONQuery:z.createJSONQuery,createVersion:p.createVersion,defaultIDType:i,deleteMany:f.deleteMany,deleteOne:g.deleteOne,deleteVersions:m.deleteVersions,deleteWhere:G.deleteWhere,destroy:y.destroy,dropDatabase:Y.dropDatabase,execute:W.execute,find:b.find,findGlobal:C.findGlobal,findGlobalVersions:w.findGlobalVersions,findOne:I.findOne,findVersions:v.findVersions,foreignKeys:new Set,indexes:new Set,init:J.init,insert:K.insert,migrate:B.migrate,migrateDown:Q.migrateDown,migrateFresh:x.migrateFresh,migrateRefresh:S.migrateRefresh,migrateReset:k.migrateReset,migrateStatus:T.migrateStatus,migrationDir:eA,packageName:"@payloadcms/db-postgres",payload:el,queryDrafts:D.queryDrafts,rawRelations:{},rawTables:{},updateJobs:F.updateJobs,rejectInitializing:ed,requireDrizzleKit:Z.requireDrizzleKit,resolveInitializing:ec,rollbackTransaction:_.rollbackTransaction,updateGlobal:R.updateGlobal,updateGlobalVersion:L.updateGlobalVersion,updateMany:M.updateMany,updateOne:O.updateOne,updateVersion:U.updateVersion,upsert:P.upsert});return ey.blocksToJsonMigrator=(0,d.createBlocksToJsonMigrator)({adapter:ey,executeMethod:em,sanitizeStatements:eg}),ey}return{name:"postgres",allowIDOnCreate:ea,defaultIDType:i,init:el}}e.s(["postgresAdapter",()=>ec]),i()}catch(e){i(e)}},!1),696754,(e,t,i)=>{"use strict";var r=/["'&<>]/;t.exports=function e(e){var t,i=""+e,n=r.exec(i);if(!n)return i;var s="",a=0,o=0;for(a=n.index;a<i.length;a++){switch(i.charCodeAt(a)){case 34:t=""";break;case 38:t="&";break;case 39:t="'";break;case 60:t="<";break;case 62:t=">";break;default:continue}o!==a&&(s+=i.substring(o,a)),o=a+1,s+=t}return o!==a?s+i.substring(o,a):s}},191193,56466,372036,704890,549471,796468,83611,108381,824980,136101,e=>{"use strict";let t,i;var r=e.i(883999);e.s(["afterReadTraverseFields",()=>r.traverseFields],191193),e.s(["fieldsToJSONSchema",()=>h,"withNullableJSONSchemaType",()=>d],56466);var n=e.i(674921),s=e.i(186725);let a=e=>"string"==typeof e?e:e.value,o=(e,t)=>{if(!e&&!t)return!0;if(!e||!t||e.length!==t.length)return!1;let i=new Set(e.map(a)),r=new Set(t.map(a));if(i.size!==r.size)return!1;for(let e of i)if(!r.has(e))return!1;return!0},l=e=>{if(e?.admin&&e?.admin?.condition)return!1;let t="required"in e&&!0===e.required;return!!(0,s.fieldAffectsData)(e)&&!!t||"fields"in e&&"array"!==e.type&&e.flattenedFields.some(e=>l(e))};function c(e){return e.map(e=>"object"==typeof e&&"value"in e?e.value:e)}function d(e,t){let i=[e];return t?e:(i.push("null"),i)}function u({entity:e,i18n:t}){let i;return e?.admin?.description&&("string"==typeof e?.admin?.description?i=e?.admin?.description:"object"==typeof e?.admin?.description?e?.admin?.description?.en?i=e?.admin?.description?.en:e?.admin?.description?.[t.language]&&(i=e?.admin?.description?.[t.language]):e?.admin?.description),i}function h(e,t,i,r,a,A={}){let p=new Set;return{properties:Object.fromEntries(t.reduce((f,g,m)=>{let y,b=(0,s.fieldAffectsData)(g)&&l(g),E=u({entity:g,i18n:a}),C={};switch(E&&(C.description=E),g.type){case"array":y={...C,type:d("array",b),items:{type:"object",additionalProperties:!1,...h(e,g.flattenedFields,i,r,a,A)}},g.interfaceName&&(i.set(g.interfaceName,y),y={$ref:`#/definitions/${g.interfaceName}`});break;case"blocks":{let t=!!(g.blockReferences?g.blockReferences.length:g.blocks.length);y={...C,type:d("array",b),items:t?{oneOf:(g.blockReferences??g.blocks).map(t=>{if("string"==typeof t){let e=r?.blocks?.find(e=>e.slug===t);if(!e)return{};if(!A.forceInlineBlocks)return{$ref:`#/definitions/${e.interfaceName??e.slug}`};t=e}let n=h(e,t.flattenedFields,i,r,a,A),s={type:"object",additionalProperties:!1,properties:{...n.properties,blockType:{const:t.slug}},required:["blockType",...n.required]};return!A.forceInlineBlocks&&t.interfaceName?(i.set(t.interfaceName,s),{$ref:`#/definitions/${t.interfaceName}`}):s})}:{}};break}case"checkbox":y={...C,type:d("boolean",b)};break;case"code":case"date":case"email":case"textarea":y={...C,type:d("string",b)};break;case"group":(0,s.fieldAffectsData)(g)&&(y={...C,type:"object",additionalProperties:!1,...h(e,g.flattenedFields,i,r,a,A)},g.interfaceName&&(i.set(g.interfaceName,y),y={$ref:`#/definitions/${g.interfaceName}`}));break;case"join":{let t;t=Array.isArray(g.collection)?{oneOf:g.collection.map(t=>({type:"object",additionalProperties:!1,properties:{relationTo:{const:t},value:{oneOf:[{type:e[t]},{$ref:`#/definitions/${t}`}]}},required:["collectionSlug","value"]}))}:{oneOf:[{type:e[g.collection]},{$ref:`#/definitions/${g.collection}`}]},y={...C,type:"object",additionalProperties:!1,properties:{docs:{type:"array",items:t},hasNextPage:{type:"boolean"},totalDocs:{type:"number"}}};break}case"json":y=g.jsonSchema?.schema||{...C,type:["object","array","string","number","boolean","null"]};break;case"number":y=!0===g.hasMany?{...C,type:d("array",b),items:{type:"number"}}:{...C,type:d("number",b)};break;case"point":y={...C,type:d("array",b),items:[{type:"number"},{type:"number"}],maxItems:2,minItems:2};break;case"radio":y={...C,type:d("string",b),enum:c(g.options)},g.interfaceName&&(i.set(g.interfaceName,y),y={$ref:`#/definitions/${g.interfaceName}`});break;case"relationship":case"upload":y=Array.isArray(g.relationTo)?g.hasMany?{...C,type:d("array",b),items:{oneOf:g.relationTo.map(t=>({type:"object",additionalProperties:!1,properties:{relationTo:{const:t},value:{oneOf:[{type:e[t]},{$ref:`#/definitions/${t}`}]}},required:["value","relationTo"]}))}}:{...C,oneOf:g.relationTo.map(t=>({type:d("object",b),additionalProperties:!1,properties:{relationTo:{const:t},value:{oneOf:[{type:e[t]},{$ref:`#/definitions/${t}`}]}},required:["value","relationTo"]}))}:g.hasMany?{...C,type:d("array",b),items:{oneOf:[{type:e[g.relationTo]},{$ref:`#/definitions/${g.relationTo}`}]}}:{...C,oneOf:[{type:d(e[g.relationTo],b)},{$ref:`#/definitions/${g.relationTo}`}]};break;case"richText":if(!g?.editor)throw new n.MissingEditorProp(g);if("function"==typeof g.editor)throw Error("Attempted to access unsanitized rich text editor.");y=g.editor.outputSchema?{...C,...g.editor.outputSchema({collectionIDFieldTypes:e,config:r,field:g,i18n:a,interfaceNameDefinitions:i,isRequired:b})}:{...C,type:d("array",b),items:{type:"object"}};break;case"select":{let e=c(g.options),n=t?.[m-1],s=n?.type==="date"&&n.timezone&&g.name.includes("_tz"),a=s&&r&&o(g.options,r.admin?.timezones?.supportedTimezones);s&&a?y={$ref:"#/definitions/supportedTimezones"}:(g.hasMany?(y={...C,type:d("array",b),items:{type:"string"}},e?.length&&(y.items.enum=e)):(y={...C,type:d("string",b)},e?.length&&(y.enum=e)),g.interfaceName&&(i.set(g.interfaceName,y),y={$ref:`#/definitions/${g.interfaceName}`}));break}case"tab":y={...C,type:"object",additionalProperties:!1,...h(e,g.flattenedFields,i,r,a,A)},g.interfaceName&&(i.set(g.interfaceName,y),y={$ref:`#/definitions/${g.interfaceName}`});break;case"text":y=!0===g.hasMany?{...C,type:d("array",b),items:{type:"string"}}:{...C,type:d("string",b)}}if("typescriptSchema"in g&&g?.typescriptSchema?.length)for(let e of g.typescriptSchema)y=e({jsonSchema:y});return y&&(0,s.fieldAffectsData)(g)&&(b&&!1!==y.required&&p.add(g.name),f.set(g.name,y)),f},new Map)),required:Array.from(p)}}let A=({dependencies:e,dependenciesPriority:t,dependenciesSoft:i,feature:r,key:n})=>s=>{let a={dependencies:e,dependenciesPriority:t,dependenciesSoft:i,key:n,serverFeatureProps:s};if("function"==typeof r)a.feature=async({config:e,featureProviderMap:t,isRoot:i,parentIsLocalized:n,resolvedFeatures:a,unSanitizedEditorConfig:o})=>{let l=await r({config:e,featureProviderMap:t,isRoot:i,parentIsLocalized:n,props:s,resolvedFeatures:a,unSanitizedEditorConfig:o});return null===l.sanitizedServerFeatureProps&&(l.sanitizedServerFeatureProps=s),l};else{let e={...r};e.sanitizedServerFeatureProps=s,a.feature=e}return a};function p(e,...t){let i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let i of(r.append("code",e),t))r.append("v",i);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function f(e,...t){let i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let i of(r.append("code",e),t))r.append("v",i);i.search=r.toString(),console.warn(`Minified Lexical warning #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}e.s(["createServerFeature",0,A],372036);let g=!1,m=null,y=!1,b=!1,E=!(!g||!("InputEvent"in window)||m)&&"getTargetRanges"in new window.InputEvent("input"),C=g&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),w=g&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!window.MSStream,I=g&&/Android/.test(navigator.userAgent),v=g&&/^(?=.*Chrome).*/i.test(navigator.userAgent),B=g&&I&&v,Q=g&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent)&&y&&!v,x=0,S=1,k=2,T=128,N=1,D=2,_=3,R=4,L=5,F=6,M="",O="\n\n",U=M,P="֑-߿יִ-﷽ﹰ-ﻼ",$="A-Za-zÀ-ÖØ-öø-ʸ̀-ࠀ-Ⰰ-︀--",j=(RegExp("^[^"+$+"]*["+P+"]"),RegExp("^[^"+P+"]*["+$+"]"),{bold:1,capitalize:1024,code:16,highlight:T,italic:2,lowercase:256,strikethrough:4,subscript:32,superscript:64,underline:8,uppercase:512}),H={directionless:1,unmergeable:2},q={center:2,end:6,justify:4,left:1,right:3,start:5},z={[D]:"center",[F]:"end",[R]:"justify",[N]:"left",[_]:"right",[L]:"start"},V={normal:0,segmented:2,token:1},G={[x]:"normal",[k]:"segmented",[S]:"token"},Y="$config";function W(e,t,i,r,n,s){let a=e.getFirstChild();for(;null!==a;){let e=a.__key;a.__parent===t&&(rK(a)&&W(a,e,i,r,n,s),i.has(e)||s.delete(e),n.push(e)),a=a.getNextSibling()}}let J=!1,K=0;function Z(e){K=e.timeStamp}function X(e,t,i){let r="BR"===e.nodeName,n=t.__lexicalLineBreak;return n&&(e===n||r&&e.previousSibling===n)||r&&void 0!==nF(e,i)}function ee(e,t,i){let r=sf(so(i)),n=null,s=null;null!==r&&r.anchorNode===e&&(n=r.anchorOffset,s=r.focusOffset);let a=e.nodeValue;null!==a&&nY(t,a,n,s,!1)}function et(e,t,i){if(i5(e)){let t=e.anchor.getNode();if(t.is(i)&&e.format!==t.getFormat())return!1}return nv(t)&&i.isAttached()}function ei(e,t,i,r){for(let n=e;n&&!sN(n);n=st(n)){let e=nF(n,t);if(void 0!==e){let t=nR(e,i);if(t)return r0(t)||!sy(n)?void 0:[n,t]}else if(n===r)return[r,n$(i)]}}function er(e,t,i){J=!0;let r=performance.now()-K>100;try{rG(e,()=>{let n=ru()||function(e){return e.getEditorState().read(()=>{let e=ru();return null!==e?e.clone():null})}(e),s=new Map,a=e.getRootElement(),o=e._editorState,l=e._blockCursorElement,c=!1,d="";for(let i=0;i<t.length;i++){let d=t[i],u=d.type,h=d.target,A=ei(h,e,o,a);if(!A)continue;let[p,f]=A;if("characterData"===u)r&&iY(f)&&nv(h)&&et(n,h,f)&&ee(h,f,e);else if("childList"===u){c=!0;let t=d.addedNodes;for(let i=0;i<t.length;i++){let r=t[i],n=nL(r),s=r.parentNode;null==s||r===l||null!==n||X(r,s,e)||s.removeChild(r)}let i=d.removedNodes,r=i.length;if(r>0){let t=0;for(let n=0;n<r;n++){let r=i[n];(X(r,h,e)||l===r)&&(h.appendChild(r),t++)}r!==t&&s.set(p,f)}}}if(s.size>0)for(let[t,i]of s)i.reconcileObservedMutation(t,e);let u=i.takeRecords();if(u.length>0){for(let t=0;t<u.length;t++){let i=u[t],r=i.addedNodes,n=i.target;for(let t=0;t<r.length;t++){let i=r[t],s=i.parentNode;null==s||"BR"!==i.nodeName||X(i,n,e)||s.removeChild(i)}}i.takeRecords()}null!==n&&(c&&nj(n),b&&n6(e)&&n.insertRawText(d))})}finally{J=!1}}function en(e){let t=e._observer;null!==t&&er(e,t.takeRecords(),t)}function es(e){!function(e){0===K&&so(e).addEventListener("textInput",Z,!0)}(e),e._observer=new MutationObserver((t,i)=>{er(e,t,i)})}class ea{key;parse;unparse;isEqual;defaultValue;constructor(e,t){this.key=e,this.parse=t.parse.bind(t),this.unparse=(t.unparse||ef).bind(t),this.isEqual=(t.isEqual||Object.is).bind(t),this.defaultValue=this.parse(void 0)}}function eo(e,t){return new ea(e,t)}function el(e,t,i="latest"){let r=("latest"===i?e.getLatest():e).__state;return r?r.getValue(t):t.defaultValue}function ec(e,t,i){let r;if(rN(),"function"==typeof i){let n=e.getLatest(),s=el(n,t);if(r=i(s),t.isEqual(s,r))return n}else r=i;let n=e.getWritable();return eh(n).updateFromKnown(t,r),n}function ed(e){let t=new Map,i=new Set;for(let r="function"==typeof e?e:e.replace;r.prototype&&void 0!==r.prototype.getType;r=Object.getPrototypeOf(r)){let{ownNodeConfig:e}=s_(r);if(e&&e.stateConfigs)for(let r of e.stateConfigs){let e;"stateConfig"in r?(e=r.stateConfig,r.flat&&i.add(e.key)):e=r,t.set(e.key,e)}}return{flatKeys:i,sharedConfigMap:t}}class eu{node;knownState;unknownState;sharedNodeState;size;constructor(e,t,i,r=new Map,n){this.node=e,this.sharedNodeState=t,this.unknownState=i,this.knownState=r;const{sharedConfigMap:s}=this.sharedNodeState,a=void 0!==n?n:function(e,t,i){let r=i.size;if(t)for(let n in t){let t=e.get(n);t&&i.has(t)||r++}return r}(s,i,r);this.size=a}getValue(e){let t=this.knownState.get(e);if(void 0!==t)return t;this.sharedNodeState.sharedConfigMap.set(e.key,e);let i=e.defaultValue;if(this.unknownState&&e.key in this.unknownState){let t=this.unknownState[e.key];void 0!==t&&(i=e.parse(t)),this.updateFromKnown(e,i)}return i}getInternalState(){return[this.unknownState,this.knownState]}toJSON(){let e={...this.unknownState},t={};for(let[t,i]of this.knownState)t.isEqual(i,t.defaultValue)?delete e[t.key]:e[t.key]=t.unparse(i);for(let i of this.sharedNodeState.flatKeys)i in e&&(t[i]=e[i],delete e[i]);return ep(e)&&(t.$=e),t}getWritable(e){if(this.node===e)return this;let{sharedNodeState:t,unknownState:i}=this,r=new Map(this.knownState);return new eu(e,t,function(e,t,i){let r;if(i)for(let[n,s]of Object.entries(i)){let i=e.get(n);i?t.has(i)||t.set(i,i.parse(s)):(r=r||{})[n]=s}return r}(t.sharedConfigMap,r,i),r,this.size)}updateFromKnown(e,t){let i=e.key;this.sharedNodeState.sharedConfigMap.set(i,e);let{knownState:r,unknownState:n}=this;r.has(e)||n&&i in n||(n&&(delete n[i],this.unknownState=ep(n)),this.size++),r.set(e,t)}updateFromUnknown(e,t){let i=this.sharedNodeState.sharedConfigMap.get(e);i?this.updateFromKnown(i,i.parse(t)):(this.unknownState=this.unknownState||{},e in this.unknownState||this.size++,this.unknownState[e]=t)}updateFromJSON(e){let{knownState:t}=this;for(let e of t.keys())t.set(e,e.defaultValue);if(this.size=t.size,this.unknownState=void 0,e)for(let[t,i]of Object.entries(e))this.updateFromUnknown(t,i)}}function eh(e){let t=e.getWritable(),i=t.__state?t.__state.getWritable(t):new eu(t,eA(t));return t.__state=i,i}function eA(e){return e.__state?e.__state.sharedNodeState:nA(sv(),e.getType()).sharedNodeState}function ep(e){if(e)for(let t in e)return e}function ef(e){return e}function eg(e,t,i){for(let[r,n]of t.knownState){if(e.has(r.key))continue;e.add(r.key);let t=i?i.getValue(r):r.defaultValue;if(t!==n&&!r.isEqual(t,n))return!0}return!1}function em(e,t,i){let{unknownState:r}=t,n=i?i.unknownState:void 0;if(r){for(let[t,i]of Object.entries(r))if(!e.has(t)&&(e.add(t),i!==(n?n[t]:void 0)))return!0}return!1}function ey(e,t){let i=e.__state;return i&&i.node===e?i.getWritable(t):i}function eb(e,t){let i=e.__mode,r=e.__format,n=e.__style,s=t.__mode,a=t.__format,o=t.__style,l=e.__state,c=t.__state;return(null===i||i===s)&&(null===r||r===a)&&(null===n||n===o)&&(null===e.__state||l===c||function(e,t){if(e===t)return!0;if(e&&t&&e.size!==t.size)return!1;let i=new Set;return!(e&&eg(i,e,t)||t&&eg(i,t,e)||e&&em(i,e,t)||t&&em(i,t,e))}(l,c))}function eE(e,t){let i=e.mergeWithSibling(t),r=rR()._normalizedNodes;return r.add(e.__key),r.add(t.__key),i}function eC(e){let t,i,r=e;if(""!==r.__text||!r.isSimpleText()||r.isUnmergeable()){for(;null!==(t=r.getPreviousSibling())&&iY(t)&&t.isSimpleText()&&!t.isUnmergeable();){if(""!==t.__text){eb(t,r)&&(r=eE(t,r));break}t.remove()}for(;null!==(i=r.getNextSibling())&&iY(i)&&i.isSimpleText()&&!i.isUnmergeable();){if(""!==i.__text){eb(r,i)&&(r=eE(r,i));break}i.remove()}}else r.remove()}function ew(e){return eI(e.anchor),eI(e.focus),e}function eI(e){for(;"element"===e.type;){let t,i,r=e.getNode(),n=e.offset;if(n===r.getChildrenSize()?(t=r.getChildAtIndex(n-1),i=!0):(t=r.getChildAtIndex(n),i=!1),iY(t)){e.set(t.__key,i?t.getTextContentSize():0,"text",!0);break}if(!rK(t))break;e.set(t.__key,i?t.getChildrenSize():0,"element",!0)}}let ev,eB,eQ,ex,eS,ek,eT,eN,eD,e_,eR="",eL=null,eF=null,eM=!1,eO=!1;function eU(e,t){let i=eT.get(e);if(null!==t){let i=e4(e);i.parentNode===t&&t.removeChild(i)}if(eN.has(e)||eB._keyToDOMMap.delete(e),rK(i)){let e=eK(i,eT);eP(e,0,e.length-1,null)}void 0!==i&&n3(e_,eQ,ex,i,"destroyed")}function eP(e,t,i,r){for(let n=t;n<=i;++n){let t=e[n];void 0!==t&&eU(t,r)}}function e$(e,t){e.setProperty("text-align",t)}let ej="40px";function eH(e,t){let i=ev.theme.indent;if("string"==typeof i){let r=e.classList.contains(i);t>0&&!r?e.classList.add(i):t<1&&r&&e.classList.remove(i)}if(0===t)return void e.style.setProperty("padding-inline-start","");let r=getComputedStyle(eB._rootElement||e).getPropertyValue("--lexical-indent-base-value")||ej;e.style.setProperty("padding-inline-start",`calc(${t} * ${r})`)}function eq(e,t){let i=e.style;0===t?e$(i,""):1===t?e$(i,"left"):2===t?e$(i,"center"):3===t?e$(i,"right"):4===t?e$(i,"justify"):5===t?e$(i,"start"):6===t&&e$(i,"end")}function ez(e,t){let i=function(e){let t=e.__dir;if(null!==t)return t;if(r2(e))return null;let i=e.getParentOrThrow();return r2(i)&&null===i.__dir?"auto":null}(t);null!==i?e.dir=i:e.removeAttribute("dir")}function eV(e,t){let i=eN.get(e);void 0===i&&p(60);let r=i.createDOM(ev,eB);if(function(e,t,i){let r=i._keyToDOMMap;(function(e,t,i){e[`__lexicalKey_${t._key}`]=i})(t,i,e),r.set(e,t)}(e,r,eB),iY(i)?r.setAttribute("data-lexical-text","true"):r0(i)&&r.setAttribute("data-lexical-decorator","true"),rK(i)){let e=i.__indent,t=i.__size;if(ez(r,i),0!==e&&eH(r,e),0!==t){let e=t-1;eG(eK(i,eN),i,0,e,i.getDOMSlot(r))}let n=i.__format;0!==n&&eq(r,n),i.isInline()||eW(null,i,r)}else{let t=i.getTextContent();if(r0(i)){let t=i.decorate(eB,ev);null!==t&&eX(e,t),r.contentEditable="false"}eR+=t}return null!==t&&t.insertChild(r),n3(e_,eQ,ex,i,"created"),r}function eG(e,t,i,r,n){let s=eR;eR="";let a=i;for(;a<=r;++a){eV(e[a],n);let t=eN.get(e[a]);null!==t&&iY(t)?null===eL&&(eL=t.getFormat(),eF=t.getStyle()):rK(t)&&a<r&&!t.isInline()&&(eR+=O)}n.element.__lexicalTextContent=eR,eR=s+eR}function eY(e,t){if(e){let i=e.__last;if(i){let e=t.get(i);if(e)return iT(e)?"line-break":r0(e)&&e.isInline()?"decorator":null}return"empty"}return null}function eW(e,t,i){let r=eY(e,eT),n=eY(t,eN);r!==n&&t.getDOMSlot(i).setManagedLineBreak(n)}function eJ(e,t,i){var r;eL=null,eF=null,function(e,t,i){let r=eR,n=e.__size,s=t.__size;eR="";let a=i.element;if(1===n&&1===s){let i=e.__first,r=t.__first;if(i===r)eZ(i,a);else{let e=e4(i),t=eV(r,null);try{a.replaceChild(t,e)}catch(n){if("object"==typeof n&&null!=n)throw Error(`${n.toString()} Parent: ${a.tagName}, new child: {tag: ${t.tagName} key: ${r}}, old child: {tag: ${e.tagName}, key: ${i}}.`);throw n}eU(i,null)}let n=eN.get(r);iY(n)&&null===eL&&(eL=n.getFormat(),eF=n.getStyle())}else{let r=eK(e,eT),o=eK(t,eN);if(r.length!==n&&p(227),o.length!==s&&p(228),0===n)0!==s&&eG(o,0,0,s-1,i);else if(0===s){if(0!==n){let e=null==i.after&&null==i.before&&null==i.element.__lexicalLineBreak;eP(r,0,n-1,e?null:a),e&&(a.textContent="")}}else!function(e,t,i,r,n,s){let a=r-1,o=n-1,l,c,d=s.getFirstChild(),u=0,h=0;for(;u<=a&&h<=o;){let e=t[u],r=i[h];if(e===r)d=e0(eZ(r,s.element)),u++,h++;else{if(void 0===c&&(c=e1(i,h)),void 0===l)l=e1(t,u);else if(!l.has(e)){u++;continue}if(!c.has(e)){d=e0(e4(e)),eU(e,s.element),u++,l.delete(e);continue}if(l.has(r)){let e=se(eB,r);e!==d&&s.withBefore(d).insertChild(e),d=e0(eZ(r,s.element)),u++,h++}else eV(r,s.withBefore(d)),h++}let n=eN.get(r);null!==n&&iY(n)?null===eL&&(eL=n.getFormat(),eF=n.getStyle()):rK(n)&&h<=o&&!n.isInline()&&(eR+=O)}let A=u>a,p=h>o;if(A&&!p){let e=i[o+1],t=void 0===e?null:eB.getElementByKey(e);eG(i,0,h,o,s.withBefore(t))}else p&&!A&&eP(t,u,a,s.element)}(0,r,o,n,s,i)}a.__lexicalTextContent=eR,eR=r+eR}(e,t,t.getDOMSlot(i)),r=t,null==eL||eL===r.__textFormat||eO||r.setTextFormat(eL),function(e){null==eF||eF===e.__textStyle||eO||e.setTextStyle(eF)}(t)}function eK(e,t){let i=[],r=e.__first;for(;null!==r;){let e=t.get(r);void 0===e&&p(101),i.push(r),r=e.__next}return i}function eZ(e,t){let i=eT.get(e),r=eN.get(e);void 0!==i&&void 0!==r||p(61);let n=eM||ek.has(e)||eS.has(e),s=se(eB,e);if(i===r&&!n){let e;if(rK(i)){let t=s.__lexicalTextContent;"string"==typeof t?e=t:s.__lexicalTextContent=e=i.getTextContent()}else e=i.getTextContent();return eR+=e,s}if(i!==r&&n&&n3(e_,eQ,ex,r,"updated"),r.updateDOM(i,s,ev)){let i=eV(e,null);return null===t&&p(62),t.replaceChild(i,s),eU(e,null),i}if(rK(i)){rK(r)||p(334,e);let t=r.__indent;(eM||t!==i.__indent)&&eH(s,t);let a=r.__format;if((eM||a!==i.__format)&&eq(s,a),n)eJ(i,r,s),r2(r)||r.isInline()||eW(i,r,s);else{let e,t=s.__lexicalTextContent;"string"==typeof t?e=t:s.__lexicalTextContent=e=i.getTextContent(),eR+=e}if((eM||r.__dir!==i.__dir)&&(ez(s,r),r2(r)&&!eM))for(let e of r.getChildren())rK(e)&&ez(se(eB,e.getKey()),e)}else{let t=r.getTextContent();if(r0(r)){let t=r.decorate(eB,ev);null!==t&&eX(e,t)}eR+=t}if(!eO&&r2(r)&&r.__cachedText!==eR){let e=r.getWritable();e.__cachedText=eR,r=e}return s}function eX(e,t){let i=eB._pendingDecorators,r=eB._decorators;if(null===i){if(r[e]===t)return;i=nO(eB)}i[e]=t}function e0(e){let t=e.nextSibling;return null!==t&&t===eB._blockCursorElement&&(t=t.nextSibling),t}function e1(e,t){let i=new Set;for(let r=t;r<e.length;r++)i.add(e[r]);return i}function e2(e,t,i,r,n,s){eR="",eM=2===r,eB=i,ev=i._config,eQ=i._nodes,ex=eB._listeners.mutation,eS=n,ek=s,eT=e._nodeMap,eN=t._nodeMap,eO=t._readOnly,eD=new Map(i._keyToDOMMap);let a=new Map;return e_=a,eZ("root",null),eB=void 0,eQ=void 0,eS=void 0,ek=void 0,eT=void 0,eN=void 0,ev=void 0,eD=void 0,e_=void 0,a}function e4(e){let t=eD.get(e);return void 0===t&&p(75,e),t}function e5(e){return{type:e}}let e3=e5("SELECTION_CHANGE_COMMAND"),e8=e5("SELECTION_INSERT_CLIPBOARD_NODES_COMMAND"),e9=e5("CLICK_COMMAND"),e6=e5("BEFORE_INPUT_COMMAND"),e7=e5("INPUT_COMMAND"),te=e5("COMPOSITION_START_COMMAND"),tt=e5("COMPOSITION_END_COMMAND"),ti=e5("DELETE_CHARACTER_COMMAND"),tr=e5("INSERT_LINE_BREAK_COMMAND"),tn=e5("INSERT_PARAGRAPH_COMMAND"),ts=e5("CONTROLLED_TEXT_INSERTION_COMMAND"),ta=e5("PASTE_COMMAND"),to=e5("REMOVE_TEXT_COMMAND"),tl=e5("DELETE_WORD_COMMAND"),tc=e5("DELETE_LINE_COMMAND"),td=e5("FORMAT_TEXT_COMMAND"),tu=e5("UNDO_COMMAND"),th=e5("REDO_COMMAND"),tA=e5("KEYDOWN_COMMAND"),tp=e5("KEY_ARROW_RIGHT_COMMAND"),tf=e5("MOVE_TO_END"),tg=e5("KEY_ARROW_LEFT_COMMAND"),tm=e5("MOVE_TO_START"),ty=e5("KEY_ARROW_UP_COMMAND"),tb=e5("KEY_ARROW_DOWN_COMMAND"),tE=e5("KEY_ENTER_COMMAND"),tC=e5("KEY_SPACE_COMMAND"),tw=e5("KEY_BACKSPACE_COMMAND"),tI=e5("KEY_ESCAPE_COMMAND"),tv=e5("KEY_DELETE_COMMAND"),tB=e5("KEY_TAB_COMMAND"),tQ=e5("INSERT_TAB_COMMAND"),tx=e5("INDENT_CONTENT_COMMAND"),tS=e5("OUTDENT_CONTENT_COMMAND"),tk=e5("DROP_COMMAND"),tT=e5("FORMAT_ELEMENT_COMMAND"),tN=e5("DRAGSTART_COMMAND"),tD=e5("DRAGOVER_COMMAND"),t_=e5("DRAGEND_COMMAND"),tR=e5("COPY_COMMAND"),tL=e5("CUT_COMMAND"),tF=e5("SELECT_ALL_COMMAND"),tM=e5("CLEAR_EDITOR_COMMAND"),tO=(e5("CLEAR_HISTORY_COMMAND"),e5("CAN_REDO_COMMAND"),e5("CAN_UNDO_COMMAND"),e5("FOCUS_COMMAND")),tU=e5("BLUR_COMMAND"),tP=e5("KEY_MODIFIER_COMMAND"),t$=Object.freeze({}),tj=[["keydown",function(e,t){tH=e.timeStamp,tq=e.key,t.isComposing()||n7(t,tA,e)}],["pointerdown",function(e,t){let i=e.target,r=e.pointerType;sb(i)&&"touch"!==r&&"pen"!==r&&0===e.button&&rG(t,()=>{ng(i)||(tJ=!0)})}],["compositionstart",function(e,t){n7(t,te,e)}],["compositionend",function(e,t){n7(t,tt,e)}],["input",function(e,t){e.stopPropagation(),rG(t,()=>{t.dispatchCommand(e7,e)},{event:e}),tV=null}],["click",function(e,t){rG(t,()=>{ru(),sf(so(t)),rh(),n7(t,e9,e)})}],["cut",t$],["copy",t$],["dragstart",t$],["dragover",t$],["dragend",t$],["paste",t$],["focus",t$],["blur",t$],["drop",t$]];E&&tj.push(["beforeinput",(e,t)=>(function(e,t){let i=e.inputType;"deleteCompositionText"===i||b&&n6(t)||"insertCompositionText"!==i&&n7(t,e6,e)})(e,t)]);let tH=0,tq=null,tz=0,tV=null,tG=new WeakMap,tY=new WeakMap,tW=!1,tJ=!1,tK=!1,tZ=!1,tX=!1,t0="",t1=null,t2=[0,"",0,"root",0];function t4(e,t,i,r,n){let s=e.anchor,a=e.focus,o=s.getNode(),l=rR(),c=sf(so(l)),d=null,u=s.key,h=l.getElementByKey(u),A=i.length;return u!==a.key||!iY(o)||(!n&&(!E||tz<r+50)||o.isDirty()&&A<2||nq(i))&&s.offset!==a.offset&&!o.isComposing()||nI(o)||o.isDirty()&&A>1||(n||!E)&&null!==h&&!o.isComposing()&&d!==nQ(h)||null!==c&&null!==t&&(!t.collapsed||t.startContainer!==c.anchorNode||t.startOffset!==c.anchorOffset)||!o.isComposing()&&(o.getFormat()!==e.format||o.getStyle()!==e.style)||function(e,t){if(t.isSegmented())return!0;if(!e.isCollapsed())return!1;let i=e.anchor.offset,r=t.getParentOrThrow(),n=nw(t);return 0===i?!t.canInsertTextBefore()||!r.canInsertTextBefore()&&!t.isComposing()||n||function(e){let t=e.getPreviousSibling();return(iY(t)||rK(t)&&t.isInline())&&!t.canInsertTextAfter()}(t):i===t.getTextContentSize()&&(!t.canInsertTextAfter()||!r.canInsertTextAfter()&&!t.isComposing()||n)}(e,o)}function t5(e,t){return nv(e)&&null!==e.nodeValue&&0!==t&&t!==e.nodeValue.length}function t3(e,t,i){let{anchorNode:r,anchorOffset:n,focusNode:s,focusOffset:a}=e;tW&&(tW=!1,t5(r,n)&&t5(s,a)&&!t1)||rG(t,()=>{if(!i)return void nj(null);if(!ny(t,r,s))return;let o=ru();if(t1&&i5(o)&&o.isCollapsed()){let e=o.anchor,t=t1.anchor;(e.key===t.key&&e.offset===t.offset+1||1===e.offset&&t.getNode().is(e.getNode().getPreviousSibling()))&&nj(o=t1.clone())}if(t1=null,i5(o)){let i=o.anchor,r=i.getNode();if(o.isCollapsed()){"Range"===e.type&&e.anchorNode===e.focusNode&&(o.dirty=!0);let n=so(t).event,s=n?n.timeStamp:performance.now(),[a,l,c,d,u]=t2,h=nP(),A=!1===t.isComposing()&&""===h.getTextContent();if(s<u+200&&i.offset===c&&i.key===d)t8(o,a,l);else if("text"===i.type)iY(r)||p(141),t9(o,r);else if("element"===i.type&&!A){rK(r)||p(259);let e=i.getNode();e.isEmpty()?function(e,t){t8(e,t.getTextFormat(),t.getTextStyle())}(o,e):t8(o,0,"")}}else{let e=i.key,t=o.focus.key,r=o.getNodes(),s=r.length,l=o.isBackward(),c=l?a:n,d=l?n:a,u=l?t:e,h=l?e:t,A=2047,p=!1;for(let e=0;e<s;e++){let t=r[e],i=t.getTextContentSize();if(iY(t)&&0!==i&&(0!==e||t.__key!==u||c!==i)&&(e!==s-1||t.__key!==h||0!==d)&&(p=!0,0==(A&=t.getFormat())))break}o.format=p?A:0}}n7(t,e3,void 0)})}function t8(e,t,i){e.format===t&&e.style===i||(e.format=t,e.style=i,e.dirty=!0)}function t9(e,t){t8(e,t.getFormat(),t.getStyle())}function t6(e){if(!e.getTargetRanges)return null;let t=e.getTargetRanges();return 0===t.length?null:t[0]}function t7(e){var t;let i=e.inputType,r=t6(e),n=rR(),s=ru();if("deleteContentBackward"===i){if(null===s){let e=rh();if(!i5(e))return!0;nj(e.clone())}if(i5(s)){let i=s.anchor.key===s.focus.key;if(t=e.timeStamp,"MediaLast"===tq&&t<tH+30&&n.isComposing()&&i){if(nD(null),tH=0,setTimeout(()=>{rG(n,()=>{nD(null)})},30),i5(s)){let e=s.anchor.getNode();e.markDirty(),iY(e)||p(142),t9(s,e)}}else{nD(null),e.preventDefault();let t=s.anchor.getNode(),r=t.getTextContent(),a=t.canInsertTextAfter(),o=0===s.anchor.offset&&s.focus.offset===r.length,l=B&&i&&!o&&a;if(l&&s.isCollapsed()&&(l=!r0(n9(s.anchor,!0))),!l){n7(n,ti,!0);let e=ru();B&&i5(e)&&e.isCollapsed()&&(t1=e,setTimeout(()=>t1=null))}}return!0}}if(!i5(s))return!0;let a=e.data;null!==tV&&nG(!1,n,tV),s.dirty&&null===tV||!s.isCollapsed()||r2(s.anchor.getNode())||null===r||s.applyDOMRange(r),tV=null;let o=s.anchor,l=s.focus,c=o.getNode(),d=l.getNode();if("insertText"===i||"insertTranspose"===i){if("\n"===a)e.preventDefault(),n7(n,tr,!1);else if(a===O)e.preventDefault(),n7(n,tn,void 0);else if(null==a&&e.dataTransfer){let t=e.dataTransfer.getData("text/plain");e.preventDefault(),s.insertRawText(t)}else null!=a&&t4(s,r,a,e.timeStamp,!0)?(e.preventDefault(),n7(n,ts,a)):tV=a;return tz=e.timeStamp,!0}switch(e.preventDefault(),i){case"insertFromYank":case"insertFromDrop":case"insertReplacementText":n7(n,ts,e);break;case"insertFromComposition":nD(null),n7(n,ts,e);break;case"insertLineBreak":nD(null),n7(n,tr,!1);break;case"insertParagraph":nD(null),tK&&!w?(tK=!1,n7(n,tr,!1)):n7(n,tn,void 0);break;case"insertFromPaste":case"insertFromPasteAsQuotation":n7(n,ta,e);break;case"deleteByComposition":(function(e,t){return e!==t||rK(e)||rK(t)||!nw(e)||!nw(t)})(c,d)&&n7(n,to,e);break;case"deleteByDrag":case"deleteByCut":n7(n,to,e);break;case"deleteContent":n7(n,ti,!1);break;case"deleteWordBackward":n7(n,tl,!0);break;case"deleteWordForward":n7(n,tl,!1);break;case"deleteHardLineBackward":case"deleteSoftLineBackward":n7(n,tc,!0);break;case"deleteContentForward":case"deleteHardLineForward":case"deleteSoftLineForward":n7(n,tc,!1);break;case"formatStrikeThrough":n7(n,td,"strikethrough");break;case"formatBold":n7(n,td,"bold");break;case"formatItalic":n7(n,td,"italic");break;case"formatUnderline":n7(n,td,"underline");break;case"historyUndo":n7(n,tu,void 0);break;case"historyRedo":n7(n,th,void 0)}return!0}function ie(e){if(sy(e.target)&&ng(e.target))return!0;let t=rR(),i=ru(),r=e.data,n=t6(e);return null!=r&&i5(i)&&t4(i,n,r,e.timeStamp,!1)?(tZ&&(ir(t,r),tZ=!1),i.anchor.getNode(),sf(so(t)),!0):(nG(!1,t,null!==r?r:void 0),tZ&&(ir(t,r||void 0),tZ=!1),function(){rN(),en(rR())}(),!0)}function it(e){let t=rR(),i=ru();if(i5(i)&&!t.isComposing()){let r=i.anchor,n=i.anchor.getNode();nD(r.key),sr(iB),(e.timeStamp<tH+30||"element"===r.type||!i.isCollapsed()||n.getFormat()!==i.format||iY(n)&&n.getStyle()!==i.style)&&n7(t,ts,U)}return!0}function ii(e){return ir(rR(),e.data),sr(iQ),!0}function ir(e,t){let i=e._compositionKey;if(nD(null),null!==i&&null!=t){if(""===t){let t=nR(i),r=nQ(e.getElementByKey(i));if(null!==r&&null!==r.nodeValue&&iY(t)){let i=sf(so(e)),n=null,s=null;null!==i&&i.anchorNode===r&&(n=i.anchorOffset,s=i.focusOffset),nY(t,r.nodeValue,n,s,!0)}return}if("\n"===t[t.length-1]){let t=ru();if(i5(t)||i8(t)){if(i5(t)){let e=t.focus;t.anchor.set(e.key,e.offset,e.type)}return void n7(e,tE,null)}}}nG(!0,e,t)}function is(e){let t=rR();if(null==e.key)return!0;if(tX){if(n1(e))return rG(t,()=>{ir(t,t0)}),tX=!1,t0="",!0;tX=!1,t0=""}if(function(e){return nZ(e,"ArrowRight",{shiftKey:"any"})}(e))n7(t,tp,e);else if(function(e){return nZ(e,"ArrowRight",nX)}(e))n7(t,tf,e);else if(function(e){return nZ(e,"ArrowLeft",{shiftKey:"any"})}(e))n7(t,tg,e);else if(function(e){return nZ(e,"ArrowLeft",nX)}(e))n7(t,tm,e);else if(function(e){return nZ(e,"ArrowUp",{altKey:"any",shiftKey:"any"})}(e))n7(t,ty,e);else if(function(e){return nZ(e,"ArrowDown",{altKey:"any",shiftKey:"any"})}(e))n7(t,tb,e);else if(function(e){return nZ(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any",shiftKey:!0})}(e))tK=!0,n7(t,tE,e);else if(function(e){return" "===e.key}(e))n7(t,tC,e);else if(function(e){return y&&nZ(e,"o",{ctrlKey:!0})}(e))e.preventDefault(),tK=!0,n7(t,tr,!0);else if(function(e){return nZ(e,"Enter",{altKey:"any",ctrlKey:"any",metaKey:"any"})}(e))tK=!1,n7(t,tE,e);else if(function(e){return nZ(e,"Backspace",{shiftKey:"any"})||y&&nZ(e,"h",{ctrlKey:!0})}(e))n1(e)?n7(t,tw,e):(e.preventDefault(),n7(t,ti,!0));else if(function(e){return"Escape"===e.key}(e))n7(t,tI,e);else if(function(e){return nZ(e,"Delete",{})||y&&nZ(e,"d",{ctrlKey:!0})}(e))!function(e){return"Delete"===e.key}(e)?(e.preventDefault(),n7(t,ti,!1)):n7(t,tv,e);else if(function(e){return nZ(e,"Backspace",n0)}(e))e.preventDefault(),n7(t,tl,!0);else if(function(e){return nZ(e,"Delete",n0)}(e))e.preventDefault(),n7(t,tl,!1);else if(function(e){return y&&nZ(e,"Backspace",{metaKey:!0})}(e))e.preventDefault(),n7(t,tc,!0);else if(function(e){return y&&(nZ(e,"Delete",{metaKey:!0})||nZ(e,"k",{ctrlKey:!0}))}(e))e.preventDefault(),n7(t,tc,!1);else if(function(e){return nZ(e,"b",nX)}(e))e.preventDefault(),n7(t,td,"bold");else if(function(e){return nZ(e,"u",nX)}(e))e.preventDefault(),n7(t,td,"underline");else if(function(e){return nZ(e,"i",nX)}(e))e.preventDefault(),n7(t,td,"italic");else if(function(e){return nZ(e,"Tab",{shiftKey:"any"})}(e))n7(t,tB,e);else if(function(e){return nZ(e,"z",nX)}(e))e.preventDefault(),n7(t,tu,void 0);else if(function(e){return nZ(e,"y",{ctrlKey:!0})||nZ(e,"z",{ctrlKey:!0,shiftKey:!0})}(e))e.preventDefault(),n7(t,th,void 0);else{let i=t._editorState._selection;null===i||i5(i)?n2(e)&&(e.preventDefault(),n7(t,tF,e)):function(e){return nZ(e,"c",nX)}(e)?(e.preventDefault(),n7(t,tR,e)):function(e){return nZ(e,"x",nX)}(e)?(e.preventDefault(),n7(t,tL,e)):n2(e)&&(e.preventDefault(),n7(t,tF,e))}return function(e){return e.ctrlKey||e.shiftKey||e.altKey||e.metaKey}(e)&&t.dispatchCommand(tP,e),!0}function ia(e){let t=e.__lexicalEventHandles;return void 0===t&&(e.__lexicalEventHandles=t=[]),t}let io=new Map;function il(e){let t=sg(e.target);if(null===t)return;let i=nE(t.anchorNode);if(null===i)return;tJ&&(tJ=!1,rG(i,()=>{let r=rh(),n=t.anchorNode;(sy(n)||nv(n))&&nj(rd(r,t,i,e))}));let r=nz(i),n=r[r.length-1],s=n._key,a=io.get(s),o=a||n;o!==i&&t3(t,o,!1),t3(t,i,!0),i!==n?io.set(s,i):a&&io.delete(s)}function ic(e){e._lexicalHandled=!0}function id(e){return!0===e._lexicalHandled}let iu=()=>{};function ih(e){let t=tG.get(e);if(void 0===t)return void iu();let i=tY.get(t);if(void 0===i)return void iu();let r=i-1;r>=0||p(164),tG.delete(e),tY.set(t,r),0===r&&t.removeEventListener("selectionchange",il);let n=nC(e);nb(n)?(!function(e){if(null!==e._parentEditor){let t=nz(e),i=t[t.length-1]._key;io.get(i)===e&&io.delete(i)}else io.delete(e._key)}(n),e.__lexicalEditor=null):n&&p(198);let s=ia(e);for(let e=0;e<s.length;e++)s[e]();e.__lexicalEventHandles=[]}function iA(e,t,i){rN();let r=e.__key,n=e.getParent();if(null===n)return;let s=function(e){let t=ru();if(!i5(t)||!rK(e))return t;let{anchor:i,focus:r}=t,n=i.getNode(),s=r.getNode();return ss(n,e)&&i.set(e.__key,0,"element"),ss(s,e)&&r.set(e.__key,0,"element"),t}(e),a=!1;if(i5(s)&&t){let t=s.anchor,i=s.focus;t.key===r&&(rf(t,e,n,e.getPreviousSibling(),e.getNextSibling()),a=!0),i.key===r&&(rf(i,e,n,e.getPreviousSibling(),e.getNextSibling()),a=!0)}else i8(s)&&t&&e.isSelected()&&e.selectPrevious();if(i5(s)&&t&&!a){let t=e.getIndexWithinParent();nT(e),rA(s,n,t,-1)}else nT(e);i||sl(n)||n.canBeEmpty()||!n.isEmpty()||iA(n,t),t&&s&&r2(n)&&n.isEmpty()&&n.selectEnd()}function ip(e){return e}let ig=Symbol.for("ephemeral");function im(e){return e[ig]||!1}class iy{__type;__key;__parent;__prev;__next;__state;static getType(){let{ownNodeType:e}=s_(this);return void 0===e&&p(64,this.name),e}static clone(e){p(65,this.name)}$config(){return{}}config(e,t){let i=t.extends||Object.getPrototypeOf(this.constructor);return Object.assign(t,{extends:i,type:e}),{[e]:t}}afterCloneFrom(e){this.__key===e.__key?(this.__parent=e.__parent,this.__next=e.__next,this.__prev=e.__prev,this.__state=e.__state):e.__state&&(this.__state=e.__state.getWritable(this))}static importDOM;constructor(e){this.__type=this.constructor.getType(),this.__parent=null,this.__prev=null,this.__next=null,Object.defineProperty(this,"__state",{configurable:!0,enumerable:!1,value:void 0,writable:!0}),nk(this,e)}getType(){return this.__type}isInline(){p(137,this.constructor.name)}isAttached(){let e=this.__key;for(;null!==e;){if("root"===e)return!0;let t=nR(e);if(null===t)break;e=t.__parent}return!1}isSelected(e){let t=e||ru();if(null==t)return!1;let i=t.getNodes().some(e=>e.__key===this.__key);if(iY(this))return i;if(i5(t)&&"element"===t.anchor.type&&"element"===t.focus.type){if(t.isCollapsed())return!1;let e=this.getParent();if(r0(this)&&this.isInline()&&e){let i=t.isBackward()?t.focus:t.anchor;if(e.is(i.getNode())&&i.offset===e.getChildrenSize()&&this.is(e.getLastChild()))return!1}}return i}getKey(){return this.__key}getIndexWithinParent(){let e=this.getParent();if(null===e)return -1;let t=e.getFirstChild(),i=0;for(;null!==t;){if(this.is(t))return i;i++,t=t.getNextSibling()}return -1}getParent(){let e=this.getLatest().__parent;return null===e?null:nR(e)}getParentOrThrow(){let e=this.getParent();return null===e&&p(66,this.__key),e}getTopLevelElement(){let e=this;for(;null!==e;){let t=e.getParent();if(sl(t))return rK(e)||e===this&&r0(e)||p(194),e;e=t}return null}getTopLevelElementOrThrow(){let e=this.getTopLevelElement();return null===e&&p(67,this.__key),e}getParents(){let e=[],t=this.getParent();for(;null!==t;)e.push(t),t=t.getParent();return e}getParentKeys(){let e=[],t=this.getParent();for(;null!==t;)e.push(t.__key),t=t.getParent();return e}getPreviousSibling(){let e=this.getLatest().__prev;return null===e?null:nR(e)}getPreviousSiblings(){let e=[],t=this.getParent();if(null===t)return e;let i=t.getFirstChild();for(;null!==i&&!i.is(this);)e.push(i),i=i.getNextSibling();return e}getNextSibling(){let e=this.getLatest().__next;return null===e?null:nR(e)}getNextSiblings(){let e=[],t=this.getNextSibling();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getCommonAncestor(e){let t=rK(this)?this:this.getParent(),i=rK(e)?e:e.getParent(),r=t&&i?ar(t,i):null;return r?r.commonAncestor:null}is(e){return null!=e&&this.__key===e.__key}isBefore(e){let t=ar(this,e);return null!==t&&("descendant"===t.type||("branch"===t.type?-1===ae(t):("same"!==t.type&&"ancestor"!==t.type&&p(279),!1)))}isParentOf(e){let t=ar(this,e);return null!==t&&"ancestor"===t.type}getNodesBetween(e){let t=this.isBefore(e),i=[],r=new Set,n=this;for(;null!==n;){let s=n.__key;if(r.has(s)||(r.add(s),i.push(n)),n===e)break;let a=rK(n)?t?n.getFirstChild():n.getLastChild():null;if(null!==a){n=a;continue}let o=t?n.getNextSibling():n.getPreviousSibling();if(null!==o){n=o;continue}let l=n.getParentOrThrow();if(r.has(l.__key)||i.push(l),l===e)break;let c=null,d=l;do{if(null===d&&p(68),c=t?d.getNextSibling():d.getPreviousSibling(),null===(d=d.getParent()))break;null!==c||r.has(d.__key)||i.push(d)}while(null===c)n=c}return t||i.reverse(),i}isDirty(){let e=rR()._dirtyLeaves;return null!==e&&e.has(this.__key)}getLatest(){if(im(this))return this;let e=nR(this.__key);return null===e&&p(113),e}getWritable(){if(im(this))return this;rN();let e=r_(),t=rR(),i=e._nodeMap,r=this.__key,n=this.getLatest(),s=t._cloneNotNeeded,a=ru();if(null!==a&&a.setCachedNodes(null),s.has(r))return nN(n),n;let o=sS(n);return s.add(r),nN(o),i.set(r,o),o}getTextContent(){return""}getTextContentSize(){return this.getTextContent().length}createDOM(e,t){p(70)}updateDOM(e,t,i){p(71)}exportDOM(e){return{element:this.createDOM(e._config,e)}}exportJSON(){let e=this.__state?this.__state.toJSON():void 0;return{type:this.__type,version:1,...e}}static importJSON(e){p(18,this.name)}updateFromJSON(e){return function(e,t){let i=e.getWritable(),r=t.$,n=r;for(let e of eA(i).flatKeys)e in t&&(void 0!==n&&n!==r||(n={...r}),n[e]=t[e]);return(i.__state||n)&&eh(e).updateFromJSON(n),i}(this,e)}static transform(){return null}remove(e){iA(this,!0,e)}replace(e,t){rN();let i=ru();null!==i&&(i=i.clone()),su(this,e);let r=this.getLatest(),n=this.__key,s=e.__key,a=e.getWritable(),o=this.getParentOrThrow().getWritable(),l=o.__size;nT(a);let c=r.getPreviousSibling(),d=r.getNextSibling(),u=r.__prev,h=r.__next,A=r.__parent;if((iA(r,!1,!0),null===c)?o.__first=s:c.getWritable().__next=s,(a.__prev=u,null===d)?o.__last=s:d.getWritable().__prev=s,a.__next=h,a.__parent=A,o.__size=l,t&&(rK(this)&&rK(a)||p(139),this.getChildren().forEach(e=>{a.append(e)})),i5(i)){nj(i);let e=i.anchor,t=i.focus;e.key===n&&i2(e,a),t.key===n&&i2(t,a)}return n_()===n&&nD(s),a}insertAfter(e,t=!0){rN(),su(this,e);let i=this.getWritable(),r=e.getWritable(),n=r.getParent(),s=ru(),a=!1,o=!1;if(null!==n){let t=e.getIndexWithinParent();if(nT(r),i5(s)){let e=n.__key,i=s.anchor,r=s.focus;a="element"===i.type&&i.key===e&&i.offset===t+1,o="element"===r.type&&r.key===e&&r.offset===t+1}}let l=this.getNextSibling(),c=this.getParentOrThrow().getWritable(),d=r.__key,u=i.__next;if(null===l?c.__last=d:l.getWritable().__prev=d,c.__size++,i.__next=d,r.__next=u,r.__prev=i.__key,r.__parent=i.__parent,t&&i5(s)){let e=this.getIndexWithinParent();rA(s,c,e+1);let t=c.__key;a&&s.anchor.set(t,e+2,"element"),o&&s.focus.set(t,e+2,"element")}return e}insertBefore(e,t=!0){rN(),su(this,e);let i=this.getWritable(),r=e.getWritable(),n=r.__key;nT(r);let s=this.getPreviousSibling(),a=this.getParentOrThrow().getWritable(),o=i.__prev,l=this.getIndexWithinParent();null===s?a.__first=n:s.getWritable().__next=n,a.__size++,i.__prev=n,r.__prev=o,r.__next=i.__key,r.__parent=i.__parent;let c=ru();return t&&i5(c)&&rA(c,this.getParentOrThrow(),l),e}isParentRequired(){return!1}createParentElementNode(){return nt()}selectStart(){return this.selectPrevious()}selectEnd(){return this.selectNext(0,0)}selectPrevious(e,t){rN();let i=this.getPreviousSibling(),r=this.getParentOrThrow();if(null===i)return r.select(0,0);if(rK(i))return i.select();if(!iY(i)){let e=i.getIndexWithinParent()+1;return r.select(e,e)}return i.select(e,t)}selectNext(e,t){rN();let i=this.getNextSibling(),r=this.getParentOrThrow();if(null===i)return r.select();if(rK(i))return i.select(0,0);if(!iY(i)){let e=i.getIndexWithinParent();return r.select(e,e)}return i.select(e,t)}markDirty(){this.getWritable()}reconcileObservedMutation(e,t){this.markDirty()}}let ib="history-merge",iE="paste",iC="collaboration",iw="skip-scroll-into-view",iI="skip-dom-selection",iv="skip-selection-focus",iB="composition-start",iQ="composition-end";class ix extends iy{static getType(){return"linebreak"}static clone(e){return new ix(e.__key)}constructor(e){super(e)}getTextContent(){return"\n"}createDOM(){return document.createElement("br")}updateDOM(){return!1}isInline(){return!0}static importDOM(){return{br:e=>(function(e){let t=e.parentElement;if(null!==t&&sw(t)){let i=t.firstChild;if(i===e||i.nextSibling===e&&iN(i)){let i=t.lastChild;if(i===e||i.previousSibling===e&&iN(i))return!0}}return!1})(e)||function(e){let t=e.parentElement;if(null!==t&&sw(t)){let i=t.firstChild;if(i===e||i.nextSibling===e&&iN(i))return!1;let r=t.lastChild;if(r===e||r.previousSibling===e&&iN(r))return!0}return!1}(e)?null:{conversion:iS,priority:0}}}static importJSON(e){return ik().updateFromJSON(e)}}function iS(e){return{node:ik()}}function ik(){return sd(new ix)}function iT(e){return e instanceof ix}function iN(e){return nv(e)&&/^( |\t|\r?\n)+$/.test(e.textContent||"")}function iD(e,t){return 16&t?"code":t&T?"mark":32&t?"sub":64&t?"sup":null}function i_(e,t){return 1&t?"strong":2&t?"em":"span"}function iR(e,t,i,r,n){let s=r.classList,a=n5(n,"base");void 0!==a&&s.add(...a);let o=!1,l=8&t&&4&t;for(let e in void 0!==(a=n5(n,"underlineStrikethrough"))&&(8&i&&4&i?(o=!0,l||s.add(...a)):l&&s.remove(...a)),j){let r=j[e];if(void 0!==(a=n5(n,e)))if(i&r){if(o&&("underline"===e||"strikethrough"===e)){t&r&&s.remove(...a);continue}(0==(t&r)||l&&"underline"===e||"strikethrough"===e)&&s.add(...a)}else t&r&&s.remove(...a)}}function iL(e,t,i){let r=t.firstChild,n=i.isComposing(),s=e+(n?M:"");if(null==r)t.textContent=s;else{let e=r.nodeValue;if(e!==s)if(n||b){let[t,i,n]=function(e,t){let i=e.length,r=t.length,n=0,s=0;for(;n<i&&n<r&&e[n]===t[n];)n++;for(;s+n<i&&s+n<r&&e[i-s-1]===t[r-s-1];)s++;return[n,i-n-s,t.slice(n,r-s)]}(e,s);0!==i&&r.deleteData(t,i),r.insertData(t,n)}else r.nodeValue=s}}function iF(e,t,i,r,n,s){iL(n,e,t);let a=s.theme.text;void 0!==a&&iR(0,0,r,e,a)}function iM(e,t){let i=document.createElement(t);return i.appendChild(e),i}class iO extends iy{__text;__format;__style;__mode;__detail;static getType(){return"text"}static clone(e){return new iO(e.__text,e.__key)}afterCloneFrom(e){super.afterCloneFrom(e),this.__text=e.__text,this.__format=e.__format,this.__style=e.__style,this.__mode=e.__mode,this.__detail=e.__detail}constructor(e="",t){super(t),this.__text=e,this.__format=0,this.__style="",this.__mode=0,this.__detail=0}getFormat(){return this.getLatest().__format}getDetail(){return this.getLatest().__detail}getMode(){return G[this.getLatest().__mode]}getStyle(){return this.getLatest().__style}isToken(){return 1===this.getLatest().__mode}isComposing(){return this.__key===n_()}isSegmented(){return 2===this.getLatest().__mode}isDirectionless(){return!!(1&this.getLatest().__detail)}isUnmergeable(){return!!(2&this.getLatest().__detail)}hasFormat(e){let t=j[e];return 0!=(this.getFormat()&t)}isSimpleText(){return"text"===this.__type&&0===this.__mode}getTextContent(){return this.getLatest().__text}getFormatFlags(e,t){return nx(this.getLatest().__format,e,t)}canHaveFormat(){return!0}isInline(){return!0}createDOM(e,t){let i=this.__format,r=iD(0,i),n=i_(0,i),s=null===r?n:r,a=document.createElement(s),o=a;this.hasFormat("code")&&a.setAttribute("spellcheck","false"),null!==r&&(o=document.createElement(n),a.appendChild(o)),iF(o,this,0,i,this.__text,e);let l=this.__style;return""!==l&&(a.style.cssText=l),a}updateDOM(e,t,i){let r=this.__text,n=e.__format,s=this.__format,a=iD(0,n),o=iD(0,s),l=i_(0,n),c=i_(0,s);if((null===a?l:a)!==(null===o?c:o))return!0;if(a===o&&l!==c){let e=t.firstChild;null==e&&p(48);let n=document.createElement(c);return iF(n,this,0,s,r,i),t.replaceChild(n,e),!1}let d=t;null!==o&&null!==a&&null==(d=t.firstChild)&&p(49),iL(r,d,this);let u=i.theme.text;void 0!==u&&n!==s&&iR(0,n,s,d,u);let h=e.__style,A=this.__style;return h!==A&&(t.style.cssText=A),!1}static importDOM(){return{"#text":()=>({conversion:iH,priority:0}),b:()=>({conversion:iP,priority:0}),code:()=>({conversion:iV,priority:0}),em:()=>({conversion:iV,priority:0}),i:()=>({conversion:iV,priority:0}),mark:()=>({conversion:iV,priority:0}),s:()=>({conversion:iV,priority:0}),span:()=>({conversion:iU,priority:0}),strong:()=>({conversion:iV,priority:0}),sub:()=>({conversion:iV,priority:0}),sup:()=>({conversion:iV,priority:0}),u:()=>({conversion:iV,priority:0})}}static importJSON(e){return iG().updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTextContent(e.text).setFormat(e.format).setDetail(e.detail).setMode(e.mode).setStyle(e.style)}exportDOM(e){let{element:t}=super.exportDOM(e);return sy(t)||p(132),t.style.whiteSpace="pre-wrap",this.hasFormat("lowercase")?t.style.textTransform="lowercase":this.hasFormat("uppercase")?t.style.textTransform="uppercase":this.hasFormat("capitalize")&&(t.style.textTransform="capitalize"),this.hasFormat("bold")&&(t=iM(t,"b")),this.hasFormat("italic")&&(t=iM(t,"i")),this.hasFormat("strikethrough")&&(t=iM(t,"s")),this.hasFormat("underline")&&(t=iM(t,"u")),{element:t}}exportJSON(){return{detail:this.getDetail(),format:this.getFormat(),mode:this.getMode(),style:this.getStyle(),text:this.getTextContent(),...super.exportJSON()}}selectionTransform(e,t){}setFormat(e){let t=this.getWritable();return t.__format="string"==typeof e?j[e]:e,t}setDetail(e){let t=this.getWritable();return t.__detail="string"==typeof e?H[e]:e,t}setStyle(e){let t=this.getWritable();return t.__style=e,t}toggleFormat(e){let t=nx(this.getFormat(),e,null);return this.setFormat(t)}toggleDirectionless(){let e=this.getWritable();return e.__detail^=1,e}toggleUnmergeable(){let e=this.getWritable();return e.__detail^=2,e}setMode(e){let t=V[e];if(this.__mode===t)return this;let i=this.getWritable();return i.__mode=t,i}setTextContent(e){if(this.__text===e)return this;let t=this.getWritable();return t.__text=e,t}select(e,t){rN();let i=e,r=t,n=ru(),s=this.getTextContent(),a=this.__key;if("string"==typeof s){let e=s.length;void 0===i&&(i=e),void 0===r&&(r=e)}else i=0,r=0;if(!i5(n))return ro(a,i,a,r,"text","text");{let e=n_();e!==n.anchor.key&&e!==n.focus.key||nD(a),n.setTextNodeRange(this,i,this,r)}return n}selectStart(){return this.select(0,0)}selectEnd(){let e=this.getTextContentSize();return this.select(e,e)}spliceText(e,t,i,r){let n=this.getWritable(),s=n.__text,a=i.length,o=e;o<0&&(o=a+o)<0&&(o=0);let l=ru();if(r&&i5(l)){let t=e+a;l.setTextNodeRange(n,t,n,t)}return n.__text=s.slice(0,o)+i+s.slice(o+t),n}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}splitText(...e){let t;rN();let i=this.getLatest(),r=i.getTextContent();if(""===r)return[];let n=i.__key,s=n_(),a=r.length;e.sort((e,t)=>e-t),e.push(a);let o=[],l=e.length;for(let t=0,i=0;t<a&&i<=l;i++){let n=e[i];n>t&&(o.push(r.slice(t,n)),t=n)}let c=o.length;if(1===c)return[i];let d=o[0],u=i.getParent(),h=i.getFormat(),A=i.getStyle(),p=i.__detail,f=!1,g=null,m=null,y=ru();if(i5(y)){let[e,t]=y.isBackward()?[y.focus,y.anchor]:[y.anchor,y.focus];"text"===e.type&&e.key===n&&(g=e),"text"===t.type&&t.key===n&&(m=t)}i.isSegmented()?((t=iG(d)).__format=h,t.__style=A,t.__detail=p,t.__state=ey(i,t),f=!0):t=i.setTextContent(d);let b=[t];for(let e=1;e<c;e++){let t=iG(o[e]);t.__format=h,t.__style=A,t.__detail=p,t.__state=ey(i,t);let r=t.__key;s===n&&nD(r),b.push(t)}let E=g?g.offset:null,C=m?m.offset:null,w=0;for(let e of b){if(!g&&!m)break;let t=w+e.getTextContentSize();if(null!==g&&null!==E&&E<=t&&E>=w&&(g.set(e.getKey(),E-w,"text"),E<t&&(g=null)),null!==m&&null!==C&&C<=t&&C>=w){m.set(e.getKey(),C-w,"text");break}w=t}if(null!==u){!function(e){let t=e.getPreviousSibling(),i=e.getNextSibling();null!==t&&nN(t),null!==i&&nN(i)}(this);let e=u.getWritable(),t=this.getIndexWithinParent();f?(e.splice(t,0,b),this.remove()):e.splice(t,1,b),i5(y)&&rA(y,u,t,c-1)}return b}mergeWithSibling(e){let t=e===this.getPreviousSibling();t||e===this.getNextSibling()||p(50);let i=this.__key,r=e.__key,n=this.__text,s=n.length;n_()===r&&nD(i);let a=ru();if(i5(a)){let n=a.anchor,o=a.focus;null!==n&&n.key===r&&rg(n,t,i,e,s),null!==o&&o.key===r&&rg(o,t,i,e,s)}let o=e.__text,l=t?o+n:n+o;this.setTextContent(l);let c=this.getWritable();return e.remove(),c}isTextEntity(){return!1}}function iU(e){return{forChild:iW(e.style),node:null}}function iP(e){let t=e,i="normal"===t.style.fontWeight;return{forChild:iW(t.style,i?void 0:"bold"),node:null}}let i$=new WeakMap;function ij(e){if(!sy(e))return!1;if("PRE"===e.nodeName)return!0;let t=e.style.whiteSpace;return"string"==typeof t&&t.startsWith("pre")}function iH(e){let t=e;null===e.parentElement&&p(129);let i=t.textContent||"";if(null!==function(e){let t,i=e.parentNode,r=[e];for(;null!==i&&void 0===(t=i$.get(i))&&!ij(i);)r.push(i),i=i.parentNode;let n=void 0===t?i:t;for(let e=0;e<r.length;e++)i$.set(r[e],n);return n}(t)){let e=i.split(/(\r?\n|\t)/),t=[],r=e.length;for(let i=0;i<r;i++){let r=e[i];"\n"===r||"\r\n"===r?t.push(ik()):" "===r?t.push(iK()):""!==r&&t.push(iG(r))}return{node:t}}if(""===(i=i.replace(/\r/g,"").replace(/[ \t\n]+/g," ")))return{node:null};if(" "===i[0]){let e=t,r=!0;for(;null!==e&&null!==(e=iq(e,!1));){let t=e.textContent||"";if(t.length>0){/[ \t\n]$/.test(t)&&(i=i.slice(1)),r=!1;break}}r&&(i=i.slice(1))}if(" "===i[i.length-1]){let e=t,r=!0;for(;null!==e&&null!==(e=iq(e,!0));)if((e.textContent||"").replace(/^( |\t|\r?\n)+/,"").length>0){r=!1;break}r&&(i=i.slice(0,i.length-1))}return""===i?{node:null}:{node:iG(i)}}function iq(e,t){let i=e;for(;;){let e;for(;null===(e=t?i.nextSibling:i.previousSibling);){let e=i.parentElement;if(null===e)return null;i=e}if(sy(i=e)){let e=i.style.display;if(""===e&&!sC(i)||""!==e&&!e.startsWith("inline"))return null}let r=i;for(;null!==(r=t?i.firstChild:i.lastChild);)i=r;if(nv(i))return i;if("BR"===i.nodeName)return null}}let iz={code:"code",em:"italic",i:"italic",mark:"highlight",s:"strikethrough",strong:"bold",sub:"subscript",sup:"superscript",u:"underline"};function iV(e){let t=iz[e.nodeName.toLowerCase()];return void 0===t?{node:null}:{forChild:iW(e.style,t),node:null}}function iG(e=""){return sd(new iO(e))}function iY(e){return e instanceof iO}function iW(e,t){let i=e.fontWeight,r=e.textDecoration.split(" "),n="700"===i||"bold"===i,s=r.includes("line-through"),a="italic"===e.fontStyle,o=r.includes("underline"),l=e.verticalAlign;return e=>(iY(e)&&(n&&!e.hasFormat("bold")&&e.toggleFormat("bold"),s&&!e.hasFormat("strikethrough")&&e.toggleFormat("strikethrough"),a&&!e.hasFormat("italic")&&e.toggleFormat("italic"),o&&!e.hasFormat("underline")&&e.toggleFormat("underline"),"sub"!==l||e.hasFormat("subscript")||e.toggleFormat("subscript"),"super"!==l||e.hasFormat("superscript")||e.toggleFormat("superscript"),t&&!e.hasFormat(t)&&e.toggleFormat(t)),e)}class iJ extends iO{static getType(){return"tab"}static clone(e){return new iJ(e.__key)}constructor(e){super(" ",e),this.__detail=2}static importDOM(){return null}createDOM(e){let t=super.createDOM(e),i=n5(e.theme,"tab");return void 0!==i&&t.classList.add(...i),t}static importJSON(e){return iK().updateFromJSON(e)}setTextContent(e){return" "!==e&&""!==e&&f(126),super.setTextContent(" ")}spliceText(e,t,i,r){return""===i&&0===t||" "===i&&1===t||p(286),this}setDetail(e){return 2!==e&&p(127),this}setMode(e){return"normal"!==e&&p(128),this}canInsertTextBefore(){return!1}canInsertTextAfter(){return!1}}function iK(){return sd(new iJ)}function iZ(e){return e instanceof iJ}class iX{key;offset;type;_selection;constructor(e,t,i){this._selection=null,this.key=e,this.offset=t,this.type=i}is(e){return this.key===e.key&&this.offset===e.offset&&this.type===e.type}isBefore(e){return this.key===e.key?this.offset<e.offset:0>s7(aA(an(this,"next")),aA(an(e,"next")))}getNode(){let e=nR(this.key);return null===e&&p(20),e}set(e,t,i,r){let n=this._selection,s=this.key;r&&this.key===e&&this.offset===t&&this.type===i||(this.key=e,this.offset=t,this.type=i,rT()||(n_()===s&&nD(e),null!==n&&(n.setCachedNodes(null),n.dirty=!0)))}}function i0(e,t,i){return new iX(e,t,i)}function i1(e,t){let i=t.__key,r=e.offset,n="element";if(iY(t)){n="text";let e=t.getTextContentSize();r>e&&(r=e)}else if(!rK(t)){let e=t.getNextSibling();if(iY(e))i=e.__key,r=0,n="text";else{let e=t.getParent();e&&(i=e.__key,r=t.getIndexWithinParent()+1)}}e.set(i,r,n)}function i2(e,t){if(rK(t)){let i=t.getLastDescendant();rK(i)||iY(i)?i1(e,i):i1(e,t)}else i1(e,t)}class i4{_nodes;_cachedNodes;dirty;constructor(e){this._cachedNodes=null,this._nodes=e,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){if(!i8(e))return!1;let t=this._nodes,i=e._nodes;return t.size===i.size&&Array.from(t).every(e=>i.has(e))}isCollapsed(){return!1}isBackward(){return!1}getStartEndPoints(){return null}add(e){this.dirty=!0,this._nodes.add(e),this._cachedNodes=null}delete(e){this.dirty=!0,this._nodes.delete(e),this._cachedNodes=null}clear(){this.dirty=!0,this._nodes.clear(),this._cachedNodes=null}has(e){return this._nodes.has(e)}clone(){return new i4(new Set(this._nodes))}extract(){return this.getNodes()}insertRawText(e){}insertText(){}insertNodes(e){let t,i=this.getNodes(),r=i.length,n=i[r-1];if(iY(n))t=n.select();else{let e=n.getIndexWithinParent()+1;t=n.getParentOrThrow().select(e,e)}t.insertNodes(e);for(let e=0;e<r;e++)i[e].remove()}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=this._nodes,i=[];for(let e of t){let t=nR(e);null!==t&&i.push(t)}return rT()||(this._cachedNodes=i),i}getTextContent(){let e=this.getNodes(),t="";for(let i=0;i<e.length;i++)t+=e[i].getTextContent();return t}deleteNodes(){let e=this.getNodes();if((ru()||rh())===this&&e[0]){let t=sJ(e[0],"next");aa(s9(t,t))}for(let t of e)t.remove()}}function i5(e){return e instanceof i3}class i3{format;style;anchor;focus;_cachedNodes;dirty;constructor(e,t,i,r){this.anchor=e,this.focus=t,e._selection=this,t._selection=this,this._cachedNodes=null,this.format=i,this.style=r,this.dirty=!1}getCachedNodes(){return this._cachedNodes}setCachedNodes(e){this._cachedNodes=e}is(e){return!!i5(e)&&this.anchor.is(e.anchor)&&this.focus.is(e.focus)&&this.format===e.format&&this.style===e.style}isCollapsed(){return this.anchor.is(this.focus)}getNodes(){let e=this._cachedNodes;if(null!==e)return e;let t=function(e){let t=[],[i,r]=e.getTextSlices();i&&t.push(i.caret.origin);let n=new Set,s=new Set;for(let i of e)if(sV(i)){let{origin:e}=i;0===t.length?n.add(e):(s.add(e),t.push(e))}else{let{origin:e}=i;rK(e)&&s.has(e)||t.push(e)}if(r&&t.push(r.caret.origin),sz(e.focus)&&rK(e.focus.origin)&&null===e.focus.getNodeAtCaret())for(let i=s0(e.focus.origin,"previous");sV(i)&&n.has(i.origin)&&!i.origin.isEmpty()&&i.origin.is(t[t.length-1]);i=s2(i))n.delete(i.origin),t.pop();for(;t.length>1;){let e=t[t.length-1];if(!rK(e)||s.has(e)||e.isEmpty()||n.has(e))break;t.pop()}if(0===t.length&&e.isCollapsed()){let i=aA(e.anchor),r=aA(e.anchor.getFlipped()),n=e=>sq(e)?e.origin:e.getNodeAtCaret(),s=n(i)||n(r)||(e.anchor.getNodeAtCaret()?i.origin:r.origin);t.push(s)}return t}(ag(al(this),"next"));return rT()||(this._cachedNodes=t),t}setTextNodeRange(e,t,i,r){this.anchor.set(e.__key,t,"text"),this.focus.set(i.__key,r,"text")}getTextContent(){let e=this.getNodes();if(0===e.length)return"";let t=e[0],i=e[e.length-1],r=this.anchor,n=this.focus,s=r.isBefore(n),[a,o]=i6(this),l="",c=!0;for(let d=0;d<e.length;d++){let u=e[d];if(rK(u)&&!u.isInline())c||(l+="\n"),c=!u.isEmpty();else if(c=!1,iY(u)){let e=u.getTextContent();u===t?u===i?"element"===r.type&&"element"===n.type&&n.offset!==r.offset||(e=a<o?e.slice(a,o):e.slice(o,a)):e=s?e.slice(a):e.slice(o):u===i&&(e=s?e.slice(0,o):e.slice(0,a)),l+=e}else!r0(u)&&!iT(u)||u===i&&this.isCollapsed()||(l+=u.getTextContent())}return l}applyDOMRange(e){let t=rR(),i=t.getEditorState()._selection,r=rs(e.startContainer,e.startOffset,e.endContainer,e.endOffset,t,i);if(null===r)return;let[n,s]=r;this.anchor.set(n.key,n.offset,n.type,!0),this.focus.set(s.key,s.offset,s.type,!0),ew(this)}clone(){let e=this.anchor,t=this.focus;return new i3(i0(e.key,e.offset,e.type),i0(t.key,t.offset,t.type),this.format,this.style)}toggleFormat(e){this.format=nx(this.format,e,null),this.dirty=!0}setFormat(e){this.format=e,this.dirty=!0}setStyle(e){this.style=e,this.dirty=!0}hasFormat(e){let t=j[e];return 0!=(this.format&t)}insertRawText(e){let t=e.split(/(\r?\n|\t)/),i=[],r=t.length;for(let e=0;e<r;e++){let r=t[e];"\n"===r||"\r\n"===r?i.push(ik()):" "===r?i.push(iK()):i.push(iG(r))}this.insertNodes(i)}insertText(e){let t=this.anchor,i=this.focus,r=this.format,n=this.style,s=t,a=i;!this.isCollapsed()&&i.isBefore(t)&&(s=i,a=t),"element"===s.type&&function(e,t,i,r){let n=e.getNode(),s=n.getChildAtIndex(e.offset),a=iG();if(a.setFormat(i),a.setStyle(r),ni(s))s.splice(0,0,[a]);else{let e=r2(n)?nt().append(a):a;null===s?n.append(e):s.insertBefore(e)}e.is(t)&&t.set(a.__key,0,"text"),e.set(a.__key,0,"text")}(s,a,r,n),"element"===a.type&&as(a,aA(an(a,"next")));let o=s.offset,l=a.offset,c=this.getNodes(),d=c.length,u=c[0];iY(u)||p(26);let h=u.getTextContent().length,A=u.getParentOrThrow(),f=c[d-1];if(1===d&&"element"===a.type&&(l=h,a.set(s.key,l,"text")),this.isCollapsed()&&o===h&&(nI(u)||!u.canInsertTextAfter()||!A.canInsertTextAfter()&&null===u.getNextSibling())){let t=u.getNextSibling();if(iY(t)&&t.canInsertTextBefore()&&!nI(t)||((t=iG()).setFormat(r),t.setStyle(n),A.canInsertTextAfter()?u.insertAfter(t):A.insertAfter(t)),t.select(0,0),u=t,""!==e)return void this.insertText(e)}else if(this.isCollapsed()&&0===o&&(nI(u)||!u.canInsertTextBefore()||!A.canInsertTextBefore()&&null===u.getPreviousSibling())){let t=u.getPreviousSibling();if(iY(t)&&!nI(t)||((t=iG()).setFormat(r),A.canInsertTextBefore()?u.insertBefore(t):A.insertBefore(t)),t.select(),u=t,""!==e)return void this.insertText(e)}else if(u.isSegmented()&&o!==h){let e=iG(u.getTextContent());e.setFormat(r),u.replace(e),u=e}else if(!this.isCollapsed()&&""!==e){let t=f.getParent();if(!A.canInsertTextBefore()||!A.canInsertTextAfter()||rK(t)&&(!t.canInsertTextBefore()||!t.canInsertTextAfter()))return this.insertText(""),rn(this.anchor,this.focus),void this.insertText(e)}if(1===d){if(nw(u)){let t=iG(e);return t.select(),void u.replace(t)}let t=u.getFormat(),i=u.getStyle();if(o!==l||t===r&&i===n){if(iZ(u)){let t=iG(e);return t.setFormat(r),t.setStyle(n),t.select(),void u.replace(t)}}else{if(""!==u.getTextContent()){let t=iG(e);if(t.setFormat(r),t.setStyle(n),t.select(),0===o)u.insertBefore(t,!1);else{let[e]=u.splitText(o);e.insertAfter(t,!1)}return void(t.isComposing()&&"text"===this.anchor.type&&(this.anchor.offset-=e.length))}u.setFormat(r),u.setStyle(n)}let s=l-o;""===(u=u.spliceText(o,s,e,!0)).getTextContent()?u.remove():"text"===this.anchor.type&&(this.format=t,this.style=i,u.isComposing()&&(this.anchor.offset-=e.length))}else{let t=new Set([...u.getParentKeys(),...f.getParentKeys()]),i=rK(u)?u:u.getParentOrThrow(),r=rK(f)?f:f.getParentOrThrow(),n=f;if(!i.is(r)&&r.isInline())do n=r,r=r.getParentOrThrow();while(r.isInline())if("text"===a.type&&(0!==l||""===f.getTextContent())||"element"===a.type&&f.getIndexWithinParent()<l)if(iY(f)&&!nw(f)&&l!==f.getTextContentSize()){if(f.isSegmented()){let e=iG(f.getTextContent());f.replace(e),f=e}r2(a.getNode())||"text"!==a.type||(f=f.spliceText(0,l,"")),t.add(f.__key)}else{let e=f.getParentOrThrow();e.canBeEmpty()||1!==e.getChildrenSize()?f.remove():e.remove()}else t.add(f.__key);let s=r.getChildren(),A=new Set(c),p=i.is(r),g=i.isInline()&&null===u.getNextSibling()?i:u;for(let e=s.length-1;e>=0;e--){let t=s[e];if(t.is(u)||rK(t)&&t.isParentOf(u))break;t.isAttached()&&(!A.has(t)||t.is(n)?p||g.insertAfter(t,!1):t.remove())}if(!p){let e=r,i=null;for(;null!==e;){let r=e.getChildren(),n=r.length;(0===n||r[n-1].is(i))&&(t.delete(e.__key),i=e),e=e.getParent()}}if(nw(u))if(o===h)u.select();else{let t=iG(e);t.select(),u.replace(t)}else""===(u=u.spliceText(o,h-o,e,!0)).getTextContent()?u.remove():"text"===this.anchor.type&&(this.format=u.getFormat(),this.style=u.getStyle(),u.isComposing()&&(this.anchor.offset-=e.length));for(let e=1;e<d;e++){let i=c[e],r=i.__key;t.has(r)||i.remove()}}}removeText(){let e=ru()===this;ao(this,ah(al(this))),e&&ru()!==this&&nj(this)}formatText(e,t=null){if(this.isCollapsed())return this.toggleFormat(e),void nD(null);let i=this.getNodes(),r=[];for(let e of i)iY(e)&&r.push(e);let n=t=>{i.forEach(i=>{if(rK(i)){let r=i.getFormatFlags(e,t);i.setTextFormat(r)}})},s=r.length;if(0===s)return this.toggleFormat(e),nD(null),void n(t);let a=this.anchor,o=this.focus,l=this.isBackward(),c=l?o:a,d=l?a:o,u=0,h=r[0],A="element"===c.type?0:c.offset;if("text"===c.type&&A===h.getTextContentSize()&&(u=1,h=r[1],A=0),null==h)return;let p=h.getFormatFlags(e,t);n(p);let f=s-1,g=r[f],m="text"===d.type?d.offset:g.getTextContentSize();if(h.is(g)){if(A===m)return;if(nI(h)||0===A&&m===h.getTextContentSize())h.setFormat(p);else{let e=h.splitText(A,m),t=0===A?e[0]:e[1];t.setFormat(p),"text"===c.type&&c.set(t.__key,0,"text"),"text"===d.type&&d.set(t.__key,m-A,"text")}return void(this.format=p)}0===A||nI(h)||([,h]=h.splitText(A),A=0),h.setFormat(p);let y=g.getFormatFlags(e,p);m>0&&(m===g.getTextContentSize()||nI(g)||([g]=g.splitText(m)),g.setFormat(y));for(let t=u+1;t<f;t++){let i=r[t],n=i.getFormatFlags(e,y);i.setFormat(n)}"text"===c.type&&c.set(h.__key,A,"text"),"text"===d.type&&d.set(g.__key,m,"text"),this.format=p|y}insertNodes(e){var t;if(0===e.length)return;if(this.isCollapsed()||this.removeText(),"root"===this.anchor.key){this.insertParagraph();let t=ru();return i5(t)||p(134),t.insertNodes(e)}let i=(this.isBackward()?this.focus:this.anchor).getNode(),r=sL(i,sI),n=e[e.length-1];if(rK(r)&&"__language"in r){if("__language"in e[0])this.insertText(e[0].getTextContent());else{let t=rC(this);r.splice(t,0,e),n.selectEnd()}return}if(!e.some(e=>(rK(e)||r0(e))&&!e.isInline())){rK(r)||p(211,i.constructor.name,i.getType());let t=rC(this);return r.splice(t,0,e),void n.selectEnd()}let s=function(e){let t=nt(),i=null;for(let r=0;r<e.length;r++){let n=e[r],s=iT(n);if(s||r0(n)&&n.isInline()||rK(n)&&n.isInline()||iY(n)||n.isParentRequired()){if(null===i&&(i=n.createParentElementNode(),t.append(i),s))continue;null!==i&&i.append(n)}else t.append(n),i=null}return t}(e),a=s.getLastDescendant(),o=s.getChildren(),l=rK(r)&&r.isEmpty()?null:this.insertParagraph(),c=o[o.length-1],d=o[0];rK(t=d)&&sI(t)&&!t.isEmpty()&&rK(r)&&(!r.isEmpty()||r.canMergeWhenEmpty())&&(rK(r)||p(211,i.constructor.name,i.getType()),r.append(...d.getChildren()),d=o[1]),d&&(null===r&&p(212,i.constructor.name,i.getType()),function(e,t){let i=t.getParentOrThrow().getLastChild(),r=t,n=[t];for(;r!==i;)r.getNextSibling()||p(140),n.push(r=r.getNextSibling());let s=e;for(let e of n)s=s.insertAfter(e)}(r,d));let u=sL(a,sI);l&&rK(u)&&(l.canMergeWhenEmpty()||sI(c))&&(u.append(...l.getChildren()),l.remove()),rK(r)&&r.isEmpty()&&r.remove(),a.selectEnd();let h=rK(r)?r.getLastChild():null;iT(h)&&u!==r&&h.remove()}insertParagraph(){if("root"===this.anchor.key){let e=nt();return nP().splice(this.anchor.offset,0,[e]),e.select(),e}let e=rC(this),t=sL(this.anchor.getNode(),sI);rK(t)||p(213);let i=t.getChildAtIndex(e),r=i?[i,...i.getNextSiblings()]:[],n=t.insertNewAfter(this,!1);return n?(n.append(...r),n.selectStart(),n):null}insertLineBreak(e){let t=ik();if(this.insertNodes([t]),e){let e=t.getParentOrThrow(),i=t.getIndexWithinParent();e.select(i,i)}}extract(){let e=[...this.getNodes()],t=e.length,i=e[0],r=e[t-1],[n,s]=i6(this),a=this.isBackward(),[o,l]=a?[this.focus,this.anchor]:[this.anchor,this.focus],[c,d]=a?[s,n]:[n,s];if(0===t)return[];if(1===t){if(iY(i)&&!this.isCollapsed()){let e=i.splitText(c,d),t=0===c?e[0]:e[1];return t?(o.set(t.getKey(),0,"text"),l.set(t.getKey(),t.getTextContentSize(),"text"),[t]):[]}return[i]}if(iY(i)&&(c===i.getTextContentSize()?e.shift():0!==c&&([,i]=i.splitText(c),e[0]=i,o.set(i.getKey(),0,"text"))),iY(r)){let t=r.getTextContent().length;0===d?e.pop():d!==t&&([r]=r.splitText(d),e[e.length-1]=r,l.set(r.getKey(),r.getTextContentSize(),"text"))}return e}modify(e,t,i){rI(this,e,t,i)||sf(so(rR()))}forwardDeletion(e,t,i){if(!i&&("element"===e.type&&rK(t)&&e.offset===t.getChildrenSize()||"text"===e.type&&e.offset===t.getTextContentSize())){let e=t.getParent(),i=t.getNextSibling()||(null===e?null:e.getNextSibling());if(rK(i)&&i.isShadowRoot())return!0}return!1}deleteCharacter(e){let t=this.isCollapsed();if(this.isCollapsed()){let t=this.anchor,i=t.getNode();if(this.forwardDeletion(t,i,e))return;let r=s3(an(t,e?"previous":"next"));if(r.getTextSlices().every(e=>null===e||0===e.distance)){let e={type:"initial"};for(let t of r.iterNodeCarets("shadowRoot"))if(sV(t))if(t.origin.isInline());else{if(t.origin.isShadowRoot()){if("merge-block"===e.type)break;if(rK(r.anchor.origin)&&r.anchor.origin.isEmpty()){let e=aA(t);ao(this,s9(e,e)),r.anchor.origin.remove()}return}"merge-next-block"!==e.type&&"merge-block"!==e.type||(e={block:e.block,caret:t,type:"merge-block"})}else{if("merge-block"===e.type)break;if(sz(t)){if(rK(t.origin)){if(t.origin.isInline()){if(!t.origin.isParentOf(r.anchor.origin))break}else e={block:t.origin,type:"merge-next-block"};continue}if(r0(t.origin)){if(t.origin.isIsolated());else if("merge-next-block"===e.type&&(t.origin.isKeyboardSelectable()||!t.origin.isInline())&&rK(r.anchor.origin)&&r.anchor.origin.isEmpty()){r.anchor.origin.remove();let e=rc();e.add(t.origin.getKey()),nj(e)}else t.origin.remove();return}break}}if("merge-block"===e.type){let{caret:t,block:i}=e;return ao(this,s9(!t.origin.isEmpty()&&i.isEmpty()?ac(sJ(i,t.direction)):r.anchor,t)),this.removeText()}}let n=this.focus;if(this.modify("extend",e,"character"),this.isCollapsed()){if(e&&0===t.offset&&i7(this,t.getNode()))return}else{let r="text"===n.type?n.getNode():null;if(i="text"===t.type?t.getNode():null,null!==r&&r.isSegmented()){let t=n.offset,s=r.getTextContentSize();if(r.is(i)||e&&t!==s||!e&&0!==t)return void rt(r,e,t)}else if(null!==i&&i.isSegmented()){let n=t.offset,s=i.getTextContentSize();if(i.is(r)||e&&0!==n||!e&&n!==s)return void rt(i,e,n)}!function(e,t){let i=e.anchor,r=e.focus,n=i.getNode();if(n===r.getNode()&&"text"===i.type&&"text"===r.type){let e=i.offset,s=r.offset,a=e<s,o=a?e:s,l=a?s:e,c=l-1;o!==c&&function(e){return!(nq(e)||re(e))}(n.getTextContent().slice(o,l))&&(t?r.set(r.key,c,r.type):i.set(i.key,c,i.type))}}(this,e)}}if(this.removeText(),e&&!t&&this.isCollapsed()&&"element"===this.anchor.type&&0===this.anchor.offset){let e=this.anchor.getNode();e.isEmpty()&&r2(e.getParent())&&null===e.getPreviousSibling()&&i7(this,e)}}deleteLine(e){this.isCollapsed()&&this.modify("extend",e,"lineboundary"),this.isCollapsed()?this.deleteCharacter(e):this.removeText()}deleteWord(e){if(this.isCollapsed()){let t=this.anchor,i=t.getNode();if(this.forwardDeletion(t,i,e))return;this.modify("extend",e,"word")}this.removeText()}isBackward(){return this.focus.isBefore(this.anchor)}getStartEndPoints(){return[this.anchor,this.focus]}}function i8(e){return e instanceof i4}function i9(e){let t=e.offset;if("text"===e.type)return t;let i=e.getNode();return t===i.getChildrenSize()?i.getTextContent().length:0}function i6(e){let t=e.getStartEndPoints();if(null===t)return[0,0];let[i,r]=t;return"element"===i.type&&"element"===r.type&&i.key===r.key&&i.offset===r.offset?[0,0]:[i9(i),i9(r)]}function i7(e,t){for(let i=t;i;i=i.getParent()){if(rK(i)){if(i.collapseAtStart(e))return!0;if(sl(i))break}if(i.getPreviousSibling())break}return!1}let re=(()=>{try{let e=RegExp("\\p{Emoji}","u"),t=e.test.bind(e);if(t("❤️")&&t("#️⃣")&&t("👍"))return t}catch(e){}return()=>!1})();function rt(e,t,i){let r=e,n=r.getTextContent().split(/(?=\s)/g),s=n.length,a=0,o=0;for(let e=0;e<s;e++){let r=e===s-1;if(o=a,a+=n[e].length,t&&a===i||a>i||r){n.splice(e,1),r&&(o=void 0);break}}let l=n.join("").trim();""===l?r.remove():(r.setTextContent(l),r.select(o,o))}function ri(e,t,i,r){let n,s=t;if(sy(e)){let a=!1,o=e.childNodes,l=o.length,c=r._blockCursorElement;s===l&&(a=!0,s=l-1);let d=o[s],u=!1;if(d===c)d=o[s+1],u=!0;else if(null!==c){let i=c.parentNode;e===i&&t>Array.prototype.indexOf.call(i.children,c)&&s--}if(iY(n=nH(d)))s=sZ(n,a?"next":"previous");else{let o=nH(e);if(null===o)return null;if(rK(o)){let l=r.getElementByKey(o.getKey());null===l&&p(214);let c=o.getDOMSlot(l);[o,s]=c.resolveChildIndex(o,l,e,t),rK(o)||p(215),a&&s>=o.getChildrenSize()&&(s=Math.max(0,o.getChildrenSize()-1));let d=o.getChildAtIndex(s);if(rK(d)&&function(e,t,i){let r=e.getParent();return null===i||null===r||!r.canBeEmpty()||r!==i.getNode()}(d,0,i)){let e=a?d.getLastDescendant():d.getFirstDescendant();o=null===e||rK(d=e)?d:d.getParentOrThrow(),s=0}iY(d)?(n=d,o=null,s=sZ(d,a?"next":"previous")):d!==o&&a&&!u&&(rK(o)||p(216),s=Math.min(o.getChildrenSize(),s+1))}else{let i=o.getIndexWithinParent();s=0===t&&r0(o)&&nH(e)===o?i:i+1,o=o.getParentOrThrow()}if(rK(o))return i0(o.__key,s,"element")}}else n=nH(e);return iY(n)?i0(n.__key,sZ(n,s,"clamp"),"text"):null}function rr(e,t,i){let r=e.offset,n=e.getNode();if(0===r){let r=n.getPreviousSibling(),s=n.getParent();if(t){if((i||!t)&&null===r&&rK(s)&&s.isInline()){let t=s.getPreviousSibling();iY(t)&&e.set(t.__key,t.getTextContent().length,"text")}}else rK(r)&&!i&&r.isInline()?e.set(r.__key,r.getChildrenSize(),"element"):iY(r)&&e.set(r.__key,r.getTextContent().length,"text")}else if(r===n.getTextContent().length){let r=n.getNextSibling(),s=n.getParent();if(t&&rK(r)&&r.isInline())e.set(r.__key,0,"element");else if((i||t)&&null===r&&rK(s)&&s.isInline()&&!s.canInsertTextAfter()){let t=s.getNextSibling();iY(t)&&e.set(t.__key,0,"text")}}}function rn(e,t,i){if("text"===e.type&&"text"===t.type){let i=e.isBefore(t),r=e.is(t);rr(e,i,r),rr(t,!i,r),r&&t.set(e.key,e.offset,e.type)}}function rs(e,t,i,r,n,s){if(null===e||null===i||!ny(n,e,i))return null;let a=ri(e,t,i5(s)?s.anchor:null,n);if(null===a)return null;let o=ri(i,r,i5(s)?s.focus:null,n);if(null===o)return null;if("element"===a.type&&"element"===o.type){let t=nH(e),r=nH(i);if(r0(t)&&r0(r))return null}return rn(a,o),[a,o]}function ra(e){return rK(e)&&!e.isInline()}function ro(e,t,i,r,n,s){let a=r_(),o=new i3(i0(e,t,n),i0(i,r,s),0,"");return o.dirty=!0,a._selection=o,o}function rl(){return new i3(i0("root",0,"element"),i0("root",0,"element"),0,"")}function rc(){return new i4(new Set)}function rd(e,t,i,r){let n,s,a,o,l=i._window;if(null===l)return null;let c=r||l.event,d=c?c.type:void 0,u="selectionchange"===d,h=!J&&(u||"beforeinput"===d||"compositionstart"===d||"compositionend"===d||"click"===d&&c&&3===c.detail||"drop"===d||void 0===d);if(i5(e)&&!h)return e.clone();if(null===t)return null;if(n=t.anchorNode,s=t.focusNode,a=t.anchorOffset,o=t.focusOffset,(u||void 0===d)&&i5(e)&&!ny(i,n,s))return e.clone();let A=rs(n,a,s,o,i,e);if(null===A)return null;let[p,f]=A,g=0,m="";if(i5(e)){let t=e.anchor;if(p.key===t.key)g=e.format,m=e.style;else{let e=p.getNode();iY(e)?(g=e.getFormat(),m=e.getStyle()):rK(e)&&(g=e.getTextFormat(),m=e.getTextStyle())}}return new i3(p,f,g,m)}function ru(){return r_()._selection}function rh(){return rR()._editorState._selection}function rA(e,t,i,r=1){let n=e.anchor,s=e.focus,a=n.getNode(),o=s.getNode();if(!t.is(a)&&!t.is(o))return;let l=t.__key;if(e.isCollapsed()){let t=n.offset;if(i<=t&&r>0||i<t&&r<0){let i=Math.max(0,t+r);n.set(l,i,"element"),s.set(l,i,"element"),rp(e)}}else{let a=e.isBackward(),o=a?s:n,c=o.getNode(),d=a?n:s,u=d.getNode();if(t.is(c)){let e=o.offset;(i<=e&&r>0||i<e&&r<0)&&o.set(l,Math.max(0,e+r),"element")}if(t.is(u)){let e=d.offset;(i<=e&&r>0||i<e&&r<0)&&d.set(l,Math.max(0,e+r),"element")}}rp(e)}function rp(e){let t=e.anchor,i=t.offset,r=e.focus,n=r.offset,s=t.getNode(),a=r.getNode();if(e.isCollapsed()){if(!rK(s))return;let e=s.getChildrenSize(),n=i>=e,a=n?s.getChildAtIndex(e-1):s.getChildAtIndex(i);if(iY(a)){let e=0;n&&(e=a.getTextContentSize()),t.set(a.__key,e,"text"),r.set(a.__key,e,"text")}return}if(rK(s)){let e=s.getChildrenSize(),r=i>=e,n=r?s.getChildAtIndex(e-1):s.getChildAtIndex(i);if(iY(n)){let e=0;r&&(e=n.getTextContentSize()),t.set(n.__key,e,"text")}}if(rK(a)){let e=a.getChildrenSize(),t=n>=e,i=t?a.getChildAtIndex(e-1):a.getChildAtIndex(n);if(iY(i)){let e=0;t&&(e=i.getTextContentSize()),r.set(i.__key,e,"text")}}}function rf(e,t,i,r,n){let s=null,a=0,o=null;null!==r?(s=r.__key,iY(r)?(a=r.getTextContentSize(),o="text"):rK(r)&&(a=r.getChildrenSize(),o="element")):null!==n&&(s=n.__key,iY(n)?o="text":rK(n)&&(o="element")),null!==s&&null!==o?e.set(s,a,o):(-1===(a=t.getIndexWithinParent())&&(a=i.getChildrenSize()),e.set(i.__key,a,"element"))}function rg(e,t,i,r,n){"text"===e.type?e.set(i,e.offset+(t?0:n),"text"):e.offset>r.getIndexWithinParent()&&e.set(e.key,e.offset-1,"element")}function rm(e,t,i,r,n){try{e.setBaseAndExtent(t,i,r,n)}catch(e){}}function ry(e,t,i){let r=se(e,t.getKey());if(rK(t)){let e=t.getDOMSlot(r);return[e.element,i+e.getFirstChildOffset()]}return[r,i]}function rb(e,t,i,r,n,s,a){let o=r.anchorNode,l=r.focusNode,c=r.anchorOffset,d=r.focusOffset,u=document.activeElement;if(n.has(iC)&&u!==s||null!==u&&nm(u))return;if(!i5(t))return void(null!==e&&ny(i,o,l)&&r.removeAllRanges());let h=t.anchor,A=t.focus,p=h.getNode(),f=A.getNode(),[g,m]=ry(i,p,h.offset),[y,E]=ry(i,f,A.offset),C=t.format,w=t.style,I=t.isCollapsed(),v=g,B=y,Q=!1;if("text"===h.type?(v=nQ(g),Q=p.getFormat()!==C||p.getStyle()!==w):i5(e)&&"text"===e.anchor.type&&(Q=!0),"text"===A.type&&(B=nQ(y)),null!==v&&null!==B&&(I&&(null===e||Q||i5(e)&&(e.format!==C||e.style!==w))&&(t2=[C,w,m,h.key,performance.now()]),c!==m||d!==E||o!==v||l!==B||"Range"===r.type&&I||(null!==u&&s.contains(u)||n.has(iv)||s.focus({preventScroll:!0}),"element"===h.type))){if(rm(r,v,m,B,E),!b||!t.isCollapsed()||null===s||n.has(iv)||null!==document.activeElement&&s.contains(document.activeElement)||s.focus({preventScroll:!0}),!n.has(iw)&&t.isCollapsed()&&null!==s&&s===document.activeElement){let e=i5(t)&&"element"===t.anchor.type?v.childNodes[m]||null:r.rangeCount>0?r.getRangeAt(0):null;if(null!==e){let t;if(e instanceof Text){let i=document.createRange();i.selectNode(e),t=i.getBoundingClientRect()}else t=e.getBoundingClientRect();!function(e,t,i){let r=si(i),n=sa(r);if(null===r||null===n)return;let{top:s,bottom:a}=t,o=0,l=0,c=i;for(;null!==c;){let t=c===r.body;if(t)o=0,l=so(e).innerHeight;else{let e=c.getBoundingClientRect();o=e.top,l=e.bottom}let i=0;if(s<o?i=-(o-s):a>l&&(i=a-l),0!==i)if(t)n.scrollBy(0,i);else{let e=c.scrollTop;c.scrollTop+=i;let t=c.scrollTop-e;s-=t,a-=t}if(t)break;c=st(c)}}(i,t,s)}}tW=!0}}function rE(e){let t=ru()||rh();null===t&&(t=nP().selectEnd()),t.insertNodes(e)}function rC(e){let t=e;e.isCollapsed()||t.removeText();let i=ru();i5(i)&&(t=i),i5(t)||p(161);let r=t.anchor,n=r.getNode(),s=r.offset;for(;!sI(n);){let e=n;if([n,s]=rw(n,s),e.is(n))break}return s}function rw(e,t){let i=e.getParent();if(!i){let e=nt();return nP().append(e),e.select(),[nP(),0]}if(iY(e)){let r=e.splitText(t);if(0===r.length)return[i,e.getIndexWithinParent()];let n=+(0!==t);return[i,r[0].getIndexWithinParent()+n]}if(!rK(e)||0===t)return[i,e.getIndexWithinParent()];let r=e.getChildAtIndex(t);if(r){let i=new i3(i0(e.__key,t,"element"),i0(e.__key,t,"element"),0,""),n=e.insertNewAfter(i);n&&n.append(r,...r.getNextSiblings())}return[i,e.getIndexWithinParent()+1]}function rI(e,t,i,r,n="decorators-and-blocks"){if("move"===t&&"character"===r&&!e.isCollapsed()){let[t,r]=i===e.isBackward()?[e.focus,e.anchor]:[e.anchor,e.focus];return r.set(t.key,t.offset,t.type),!0}let s=an(e.focus,i?"previous":"next"),a="lineboundary"===r,o="move"===t,l=s,c="decorators-and-blocks"===n;if(!ap(l)){for(let e of l){c=!1;let{origin:t}=e;if(!r0(t)||t.isIsolated()||(l=e,!a||!t.isInline()))break}if(c)for(let e of s3(s).iterNodeCarets("extend"===t?"shadowRoot":"root")){if(sV(e))e.origin.isInline()||(l=e);else{if(rK(e.origin))continue;r0(e.origin)&&!e.origin.isInline()&&(l=e)}break}}if(l===s)return!1;if(o&&!a&&r0(l.origin)&&l.origin.isKeyboardSelectable()){let e=rc();return e.add(l.origin.getKey()),nj(e),!0}return l=aA(l),o&&as(e.anchor,l),as(e.focus,l),c||!a}let rv=null,rB=null,rQ=!1,rx=!1,rS=0,rk={characterData:!0,childList:!0,subtree:!0};function rT(){return rQ||null!==rv&&rv._readOnly}function rN(){rQ&&p(13)}function rD(){rS>99&&p(14)}function r_(){return null===rv&&p(195,rL()),rv}function rR(){return null===rB&&p(196,rL()),rB}function rL(){let e=0,t=new Set,i=nc.version,r=` Detected on the page: ${e} compatible editor(s) with version ${i}`;return t.size&&(r+=` and incompatible editors with versions ${Array.from(t).join(", ")}`),r}function rF(){return rB}function rM(e,t,i){let r=t.__type,n=nA(e,r),s=i.get(r);void 0===s&&(s=Array.from(n.transforms),i.set(r,s));let a=s.length;for(let e=0;e<a&&(s[e](t),t.isAttached());e++);}function rO(e,t){return void 0!==e&&e.__key!==t&&e.isAttached()}function rU(e,t){if(!t)return;let i=e._updateTags,r=t;for(let e of(Array.isArray(t)||(r=[t]),r))i.add(e)}function rP(e){return r$(e,rR()._nodes)}function r$(e,t){let i=e.type,r=t.get(i);void 0===r&&p(17,i);let n=r.klass;e.type!==n.getType()&&p(18,n.name);let s=n.importJSON(e),a=e.children;if(rK(s)&&Array.isArray(a))for(let e=0;e<a.length;e++){let i=r$(a[e],t);s.append(i)}return s}function rj(e,t,i){let r=rv,n=rQ,s=rB;rv=t,rQ=!0,rB=e;try{return i()}finally{rv=r,rQ=n,rB=s}}function rH(e,t){let i=e._pendingEditorState,r=e._rootElement,n=e._headless||null===r;if(null===i)return;let s=e._editorState,a=s._selection,o=i._selection,l=0!==e._dirtyType,c=rv,d=rQ,u=rB,h=e._updating,A=e._observer,p=null;if(e._pendingEditorState=null,e._editorState=i,!n&&l&&null!==A){rB=e,rv=i,rQ=!1,e._updating=!0;try{let t=e._dirtyType,r=e._dirtyElements,n=e._dirtyLeaves;A.disconnect(),p=e2(s,i,e,t,r,n)}catch(t){if(t instanceof Error&&e._onError(t),rx)throw t;return na(e,null,r,i),es(e),e._dirtyType=2,rx=!0,rH(e,s),void(rx=!1)}finally{A.observe(r,rk),e._updating=h,rv=c,rQ=d,rB=u}}i._readOnly||(i._readOnly=!0);let f=e._dirtyLeaves,g=e._dirtyElements,m=e._normalizedNodes,y=e._updateTags,b=e._deferred;l&&(e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements=new Map,e._normalizedNodes=new Set,e._updateTags=new Set),function(e,t){let i,r=e._decorators,n=e._pendingDecorators||r,s=t._nodeMap;for(i in n)s.has(i)||(n===r&&(n=nO(e)),delete n[i])}(e,i);let E=n?null:sf(so(e));if(e._editable&&null!==E&&(l||null===o||o.dirty||!o.is(a))&&null!==r&&!y.has(iI)){rB=e,rv=i;try{if(null!==A&&A.disconnect(),l||null===o||o.dirty){let t=e._blockCursorElement;null!==t&&sp(t,e,r),rb(a,o,e,E,y,r)}!function(e,t,i){let r=e._blockCursorElement;if(i5(i)&&i.isCollapsed()&&"element"===i.anchor.type&&t.contains(document.activeElement)){let n=i.anchor,s=n.getNode(),a=n.offset,o=!1,l=null;if(a===s.getChildrenSize())sA(s.getChildAtIndex(a-1))&&(o=!0);else{let t=s.getChildAtIndex(a);if(null!==t&&sA(t)){let i=t.getPreviousSibling();(null===i||sA(i))&&(o=!0,l=e.getElementByKey(t.__key))}}if(o){let i=e.getElementByKey(s.__key);return null===r&&(e._blockCursorElement=r=function(e){let t=e.theme,i=document.createElement("div");i.contentEditable="false",i.setAttribute("data-lexical-cursor","true");let r=t.blockCursor;return void 0!==r&&("string"==typeof r&&(r=t.blockCursor=aB(r)),void 0!==r&&i.classList.add(...r)),i}(e._config)),t.style.caretColor="transparent",null===l?i.appendChild(r):i.insertBefore(r,l)}}null!==r&&sp(r,e,t)}(e,r,o)}finally{null!==A&&A.observe(r,rk),rB=u,rv=c}}null!==p&&function(e,t,i,r,n){let s=Array.from(e._listeners.mutation),a=s.length;for(let e=0;e<a;e++){let[a,o]=s[e];for(let e of o){let s=t.get(e);void 0!==s&&a(s,{dirtyLeaves:r,prevEditorState:n,updateTags:i})}}}(e,p,y,f,s),i5(o)||null===o||null!==a&&a.is(o)||e.dispatchCommand(e3,void 0);let C=e._pendingDecorators;null!==C&&(e._decorators=C,e._pendingDecorators=null,rq("decorator",e,!0,C)),function(e,t,i){let r=nU(t),n=nU(i);r!==n&&rq("textcontent",e,!0,n)}(e,t||s,i),rq("update",e,!0,{dirtyElements:g,dirtyLeaves:f,editorState:i,mutatedNodes:p,normalizedNodes:m,prevEditorState:t||s,tags:y}),function(e,t){if(e._deferred=[],0!==t.length){let i=e._updating;e._updating=!0;try{for(let e=0;e<t.length;e++)t[e]()}finally{e._updating=i}}}(e,b),function(e){let t=e._updates;if(0!==t.length){let i=t.shift();if(i){let[t,r]=i;rV(e,t,r)}}}(e)}function rq(e,t,i,...r){let n=t._updating;t._updating=i;try{let i=Array.from(t._listeners[e]);for(let e=0;e<i.length;e++)i[e].apply(null,r)}finally{t._updating=n}}function rz(e,t){let i=e._updates,r=t||!1;for(;0!==i.length;){let t=i.shift();if(t){let i,[n,s]=t,a=e._pendingEditorState;void 0!==s&&(i=s.onUpdate,s.skipTransforms&&(r=!0),s.discrete&&(null===a&&p(191),a._flushSync=!0),i&&e._deferred.push(i),rU(e,s.tag)),null==a?rV(e,n,s):n()}}return r}function rV(e,t,i){let r=e._updateTags,n,s=!1,a=!1;void 0!==i&&(n=i.onUpdate,rU(e,i.tag),s=i.skipTransforms||!1,a=i.discrete||!1),n&&e._deferred.push(n);let o=e._editorState,l=e._pendingEditorState,c=!1;(null===l||l._readOnly)&&(l=e._pendingEditorState=r4(l||o),c=!0),l._flushSync=a;let d=rv,u=rQ,h=rB,A=e._updating;rv=l,rQ=!1,e._updating=!0,rB=e;let f=e._headless||null===e.getRootElement();nu(null);try{c&&(f?null!==o._selection&&(l._selection=o._selection.clone()):l._selection=function(e,t){let i=e.getEditorState()._selection,r=sf(so(e));return i5(i)||null==i?rd(i,r,e,t):i.clone()}(e,i&&i.event||null));let r=e._compositionKey;t(),s=rz(e,s),function(e,t){let i=t.getEditorState()._selection,r=e._selection;if(i5(r)){let e,t=r.anchor,n=r.focus;if("text"===t.type&&(e=t.getNode()).selectionTransform(i,r),"text"===n.type){let t=n.getNode();e!==t&&t.selectionTransform(i,r)}}}(l,e),0!==e._dirtyType&&(s?function(e,t){let i=t._dirtyLeaves,r=e._nodeMap;for(let e of i){let t=r.get(e);iY(t)&&t.isAttached()&&t.isSimpleText()&&!t.isUnmergeable()&&eC(t)}}(l,e):function(e,t){let i=t._dirtyLeaves,r=t._dirtyElements,n=e._nodeMap,s=n_(),a=new Map,o=i,l=o.size,c=r,d=c.size;for(;l>0||d>0;){if(l>0){for(let e of(t._dirtyLeaves=new Set,o)){let r=n.get(e);iY(r)&&r.isAttached()&&r.isSimpleText()&&!r.isUnmergeable()&&eC(r),void 0!==r&&rO(r,s)&&rM(t,r,a),i.add(e)}if((l=(o=t._dirtyLeaves).size)>0){rS++;continue}}for(let e of(t._dirtyLeaves=new Set,t._dirtyElements=new Map,c.delete("root")&&c.set("root",!0),c)){let i=e[0],o=e[1];if(r.set(i,o),!o)continue;let l=n.get(i);void 0!==l&&rO(l,s)&&rM(t,l,a)}l=(o=t._dirtyLeaves).size,d=(c=t._dirtyElements).size,rS++}t._dirtyLeaves=i,t._dirtyElements=r}(l,e),rz(e),function(e,t,i,r){let n=e._nodeMap,s=t._nodeMap,a=[];for(let[e]of r){let t=s.get(e);void 0!==t&&(t.isAttached()||(rK(t)&&W(t,e,n,s,a,r),n.has(e)||r.delete(e),a.push(e)))}for(let e of a)s.delete(e);for(let e of i){let t=s.get(e);void 0===t||t.isAttached()||(n.has(e)||i.delete(e),s.delete(e))}}(o,l,e._dirtyLeaves,e._dirtyElements)),r!==e._compositionKey&&(l._flushSync=!0);let n=l._selection;if(i5(n)){let e=l._nodeMap,t=n.anchor.key,i=n.focus.key;void 0!==e.get(t)&&void 0!==e.get(i)||p(19)}else i8(n)&&0===n._nodes.size&&(l._selection=null)}catch(t){return t instanceof Error&&e._onError(t),e._pendingEditorState=o,e._dirtyType=2,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),void rH(e)}finally{rv=d,rQ=u,rB=h,e._updating=A,rS=0}0!==e._dirtyType||e._deferred.length>0||function(e,t){let i=t.getEditorState()._selection,r=e._selection;if(null!==r){if(r.dirty||!r.is(i))return!0}else if(null!==i)return!0;return!1}(l,e)?l._flushSync?(l._flushSync=!1,rH(e)):c&&nf(()=>{rH(e)}):(l._flushSync=!1,c&&(r.clear(),e._deferred=[],e._pendingEditorState=null))}function rG(e,t,i){rB===e&&void 0===i?t():rV(e,t,i)}class rY{element;before;after;constructor(e,t,i){this.element=e,this.before=t||null,this.after=i||null}withBefore(e){return new rY(this.element,e,this.after)}withAfter(e){return new rY(this.element,this.before,e)}withElement(e){return this.element===e?this:new rY(e,this.before,this.after)}insertChild(e){let t=this.before||this.getManagedLineBreak();return null!==t&&t.parentElement!==this.element&&p(222),this.element.insertBefore(e,t),this}removeChild(e){return e.parentElement!==this.element&&p(223),this.element.removeChild(e),this}replaceChild(e,t){return t.parentElement!==this.element&&p(224),this.element.replaceChild(e,t),this}getFirstChild(){let e=this.after?this.after.nextSibling:this.element.firstChild;return e===this.before||e===this.getManagedLineBreak()?null:e}getManagedLineBreak(){return this.element.__lexicalLineBreak||null}setManagedLineBreak(e){if(null===e)this.removeManagedLineBreak();else{let t="decorator"===e&&(Q||w||C);this.insertManagedLineBreak(t)}}removeManagedLineBreak(){let e=this.getManagedLineBreak();if(e){let t=this.element,i="IMG"===e.nodeName?e.nextSibling:null;i&&t.removeChild(i),t.removeChild(e),t.__lexicalLineBreak=void 0}}insertManagedLineBreak(e){let t=this.getManagedLineBreak();if(t){if(e===("IMG"===t.nodeName))return;this.removeManagedLineBreak()}let i=this.element,r=this.before,n=document.createElement("br");if(i.insertBefore(n,r),e){let e=document.createElement("img");e.setAttribute("data-lexical-linebreak","true"),e.style.cssText="display: inline !important; border: 0px !important; margin: 0px !important;",e.alt="",i.insertBefore(e,n),i.__lexicalLineBreak=e}else i.__lexicalLineBreak=n}getFirstChildOffset(){let e=0;for(let t=this.after;null!==t;t=t.previousSibling)e++;return e}resolveChildIndex(e,t,i,r){if(i===this.element){let t=this.getFirstChildOffset();return[e,Math.min(t+e.getChildrenSize(),Math.max(t,r))]}let n=rW(t,i);n.push(r);let s=rW(t,this.element),a=e.getIndexWithinParent();for(let e=0;e<s.length;e++){let t=n[e],i=s[e];if(void 0===t||t<i)break;if(t>i){a+=1;break}}return[e.getParentOrThrow(),a]}}function rW(e,t){let i=[],r=t;for(;r!==e&&null!==r;r=r.parentNode){let e=0;for(let t=r.previousSibling;null!==t;t=t.previousSibling)e++;i.push(e)}return r!==e&&p(225),i.reverse()}class rJ extends iy{__first;__last;__size;__format;__style;__indent;__dir;__textFormat;__textStyle;constructor(e){super(e),this.__first=null,this.__last=null,this.__size=0,this.__format=0,this.__style="",this.__indent=0,this.__dir=null,this.__textFormat=0,this.__textStyle=""}afterCloneFrom(e){super.afterCloneFrom(e),this.__key===e.__key&&(this.__first=e.__first,this.__last=e.__last,this.__size=e.__size),this.__indent=e.__indent,this.__format=e.__format,this.__style=e.__style,this.__dir=e.__dir,this.__textFormat=e.__textFormat,this.__textStyle=e.__textStyle}getFormat(){return this.getLatest().__format}getFormatType(){return z[this.getFormat()]||""}getStyle(){return this.getLatest().__style}getIndent(){return this.getLatest().__indent}getChildren(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t),t=t.getNextSibling();return e}getChildrenKeys(){let e=[],t=this.getFirstChild();for(;null!==t;)e.push(t.__key),t=t.getNextSibling();return e}getChildrenSize(){return this.getLatest().__size}isEmpty(){return 0===this.getChildrenSize()}isDirty(){let e=rR()._dirtyElements;return null!==e&&e.has(this.__key)}isLastChild(){let e=this.getLatest(),t=this.getParentOrThrow().getLastChild();return null!==t&&t.is(e)}getAllTextNodes(){let e=[],t=this.getFirstChild();for(;null!==t;){if(iY(t)&&e.push(t),rK(t)){let i=t.getAllTextNodes();e.push(...i)}t=t.getNextSibling()}return e}getFirstDescendant(){let e=this.getFirstChild();for(;rK(e);){let t=e.getFirstChild();if(null===t)break;e=t}return e}getLastDescendant(){let e=this.getLastChild();for(;rK(e);){let t=e.getLastChild();if(null===t)break;e=t}return e}getDescendantByIndex(e){let t=this.getChildren(),i=t.length;if(e>=i){let e=t[i-1];return rK(e)&&e.getLastDescendant()||e||null}let r=t[e];return rK(r)&&r.getFirstDescendant()||r||null}getFirstChild(){let e=this.getLatest().__first;return null===e?null:nR(e)}getFirstChildOrThrow(){let e=this.getFirstChild();return null===e&&p(45,this.__key),e}getLastChild(){let e=this.getLatest().__last;return null===e?null:nR(e)}getLastChildOrThrow(){let e=this.getLastChild();return null===e&&p(96,this.__key),e}getChildAtIndex(e){let t,i,r=this.getChildrenSize();if(e<r/2){for(t=this.getFirstChild(),i=0;null!==t&&i<=e;){if(i===e)return t;t=t.getNextSibling(),i++}return null}for(t=this.getLastChild(),i=r-1;null!==t&&i>=e;){if(i===e)return t;t=t.getPreviousSibling(),i--}return null}getTextContent(){let e="",t=this.getChildren(),i=t.length;for(let r=0;r<i;r++){let n=t[r];e+=n.getTextContent(),rK(n)&&r!==i-1&&!n.isInline()&&(e+=O)}return e}getTextContentSize(){let e=0,t=this.getChildren(),i=t.length;for(let r=0;r<i;r++){let n=t[r];e+=n.getTextContentSize(),rK(n)&&r!==i-1&&!n.isInline()&&(e+=2)}return e}getDirection(){return this.getLatest().__dir}getTextFormat(){return this.getLatest().__textFormat}hasFormat(e){if(""!==e){let t=q[e];return 0!=(this.getFormat()&t)}return!1}hasTextFormat(e){let t=j[e];return 0!=(this.getTextFormat()&t)}getFormatFlags(e,t){return nx(this.getLatest().__textFormat,e,t)}getTextStyle(){return this.getLatest().__textStyle}select(e,t){rN();let i=ru(),r=e,n=t,s=this.getChildrenSize();if(!this.canBeEmpty()){if(0===e&&0===t){let e=this.getFirstChild();if(iY(e)||rK(e))return e.select(0,0)}else if((void 0===e||e===s)&&(void 0===t||t===s)){let e=this.getLastChild();if(iY(e)||rK(e))return e.select()}}void 0===r&&(r=s),void 0===n&&(n=s);let a=this.__key;return i5(i)?(i.anchor.set(a,r,"element"),i.focus.set(a,n,"element"),i.dirty=!0,i):ro(a,r,a,n,"element","element")}selectStart(){let e=this.getFirstDescendant();return e?e.selectStart():this.select()}selectEnd(){let e=this.getLastDescendant();return e?e.selectEnd():this.select()}clear(){let e=this.getWritable();return this.getChildren().forEach(e=>e.remove()),e}append(...e){return this.splice(this.getChildrenSize(),0,e)}setDirection(e){let t=this.getWritable();return t.__dir=e,t}setFormat(e){return this.getWritable().__format=""!==e?q[e]:0,this}setStyle(e){return this.getWritable().__style=e||"",this}setTextFormat(e){let t=this.getWritable();return t.__textFormat=e,t}setTextStyle(e){let t=this.getWritable();return t.__textStyle=e,t}setIndent(e){return this.getWritable().__indent=e,this}splice(e,t,i){im(this)&&p(324,this.__key,this.__type);let r=this.getChildrenSize(),n=this.getWritable();e+t<=r||p(226,String(e),String(t),String(r));let s=n.__key,a=[],o=[],l=this.getChildAtIndex(e+t),c=null,d=r-t+i.length;if(0!==e)if(e===r)c=this.getLastChild();else{let t=this.getChildAtIndex(e);null!==t&&(c=t.getPreviousSibling())}if(t>0){let e=null===c?this.getFirstChild():c.getNextSibling();for(let i=0;i<t;i++){null===e&&p(100);let t=e.getNextSibling(),i=e.__key;nT(e.getWritable()),o.push(i),e=t}}let u=c;for(let e of i){null!==u&&e.is(u)&&(c=u=u.getPreviousSibling());let t=e.getWritable();t.__parent===s&&d--,nT(t);let i=e.__key;if(null===u)n.__first=i,t.__prev=null;else{let e=u.getWritable();e.__next=i,t.__prev=e.__key}e.__key===s&&p(76),t.__parent=s,a.push(i),u=e}if(e+t===r)null!==u&&(u.getWritable().__next=null,n.__last=u.__key);else if(null!==l){let e=l.getWritable();if(null!==u){let t=u.getWritable();e.__prev=u.__key,t.__next=l.__key}else e.__prev=null}if(n.__size=d,o.length){let e=ru();if(i5(e)){let t=new Set(o),i=new Set(a),{anchor:r,focus:n}=e;rZ(r,t,i)&&rf(r,r.getNode(),this,c,l),rZ(n,t,i)&&rf(n,n.getNode(),this,c,l),0!==d||this.canBeEmpty()||sl(this)||this.remove()}}return n}getDOMSlot(e){return new rY(e)}exportDOM(e){let{element:t}=super.exportDOM(e);if(sy(t)){let e=this.getIndent();e>0&&(t.style.paddingInlineStart=40*e+"px");let i=this.getDirection();i&&(t.dir=i)}return{element:t}}exportJSON(){let e={children:[],direction:this.getDirection(),format:this.getFormatType(),indent:this.getIndent(),...super.exportJSON()},t=this.getTextFormat(),i=this.getTextStyle();return 0===t&&""===i||sl(this)||this.getChildren().some(iY)||(0!==t&&(e.textFormat=t),""!==i&&(e.textStyle=i)),e}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format).setIndent(e.indent).setDirection(e.direction).setTextFormat(e.textFormat||0).setTextStyle(e.textStyle||"")}insertNewAfter(e,t){return null}canIndent(){return!0}collapseAtStart(e){return!1}excludeFromCopy(e){return!1}canReplaceWith(e){return!0}canInsertAfter(e){return!0}canBeEmpty(){return!0}canInsertTextBefore(){return!0}canInsertTextAfter(){return!0}isInline(){return!1}isShadowRoot(){return!1}canMergeWith(e){return!1}extractWithChild(e,t,i){return!1}canMergeWhenEmpty(){return!1}reconcileObservedMutation(e,t){let i=this.getDOMSlot(e),r=i.getFirstChild();for(let e=this.getFirstChild();e;e=e.getNextSibling()){let n=t.getElementByKey(e.getKey());null!==n&&(null==r?(i.insertChild(n),r=n):r!==n&&i.replaceChild(n,r),r=r.nextSibling)}}}function rK(e){return e instanceof rJ}function rZ(e,t,i){let r=e.getNode();for(;r;){let e=r.__key;if(t.has(e)&&!i.has(e))return!0;r=r.getParent()}return!1}class rX extends iy{decorate(e,t){return null}isIsolated(){return!1}isInline(){return!0}isKeyboardSelectable(){return!0}}function r0(e){return e instanceof rX}class r1 extends rJ{__cachedText;static getType(){return"root"}static clone(){return new r1}constructor(){super("root"),this.__cachedText=null}getTopLevelElementOrThrow(){p(51)}getTextContent(){let e=this.__cachedText;return(rT()||0===rR()._dirtyType)&&null!==e?e:super.getTextContent()}remove(){p(52)}replace(e){p(53)}insertBefore(e){p(54)}insertAfter(e){p(55)}updateDOM(e,t){return!1}splice(e,t,i){for(let e of i)rK(e)||r0(e)||p(282);return super.splice(e,t,i)}static importJSON(e){return nP().updateFromJSON(e)}collapseAtStart(){return!0}}function r2(e){return e instanceof r1}function r4(e){return new r9(new Map(e._nodeMap))}function r5(){return new r9(new Map([["root",new r1]]))}function r3(e){let t=e.exportJSON(),i=e.constructor;if(t.type!==i.getType()&&p(130,i.name),rK(e)){let r=t.children;Array.isArray(r)||p(59,i.name);let n=e.getChildren();for(let e=0;e<n.length;e++){let t=r3(n[e]);r.push(t)}}return t}function r8(e){return e instanceof r9}class r9{_nodeMap;_selection;_flushSync;_readOnly;constructor(e,t){this._nodeMap=e,this._selection=t||null,this._flushSync=!1,this._readOnly=!1}isEmpty(){return 1===this._nodeMap.size&&null===this._selection}read(e,t){return rj(t&&t.editor||null,this,e)}clone(e){let t=new r9(this._nodeMap,void 0===e?this._selection:e);return t._readOnly=!0,t}toJSON(){return rj(null,this,()=>({root:r3(nP())}))}}class r6 extends rJ{static getType(){return"artificial"}createDOM(e){return document.createElement("div")}}class r7 extends rJ{static getType(){return"paragraph"}static clone(e){return new r7(e.__key)}createDOM(e){let t=document.createElement("p"),i=n5(e.theme,"paragraph");return void 0!==i&&t.classList.add(...i),t}updateDOM(e,t,i){return!1}static importDOM(){return{p:e=>({conversion:ne,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(sy(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e)}return{element:t}}static importJSON(e){return nt().updateFromJSON(e)}exportJSON(){let e=super.exportJSON();if(void 0===e.textFormat||void 0===e.textStyle){let t=this.getChildren().find(iY);t?(e.textFormat=t.getFormat(),e.textStyle=t.getStyle()):(e.textFormat=this.getTextFormat(),e.textStyle=this.getTextStyle())}return e}insertNewAfter(e,t){let i=nt();i.setTextFormat(e.format),i.setTextStyle(e.style);let r=this.getDirection();return i.setDirection(r),i.setFormat(this.getFormatType()),i.setStyle(this.getStyle()),this.insertAfter(i,t),i}collapseAtStart(){let e=this.getChildren();if(0===e.length||iY(e[0])&&""===e[0].getTextContent().trim()){if(null!==this.getNextSibling())return this.selectNext(),this.remove(),!0;if(null!==this.getPreviousSibling())return this.selectPrevious(),this.remove(),!0}return!1}}function ne(e){let t=nt();if(e.style&&(t.setFormat(e.style.textAlign),sT(e,t)),""===t.getFormatType()){let i=e.getAttribute("align");i&&i&&i in q&&t.setFormat(i)}return{node:t}}function nt(){return sd(new r7)}function ni(e){return e instanceof r7}let nr=0,nn=1,ns=4;function na(e,t,i,r){let n=e._keyToDOMMap;n.clear(),e._editorState=r5(),e._pendingEditorState=r,e._compositionKey=null,e._dirtyType=0,e._cloneNotNeeded.clear(),e._dirtyLeaves=new Set,e._dirtyElements.clear(),e._normalizedNodes=new Set,e._updateTags=new Set,e._updates=[],e._blockCursorElement=null;let s=e._observer;null!==s&&(s.disconnect(),e._observer=null),null!==t&&(t.textContent=""),null!==i&&(i.textContent="",n.set("root",i))}function no(e){let t=new Set,i=new Set,r=e;for(;r;){let{ownNodeConfig:e}=s_(r),n=r.transform;if(!i.has(n)){i.add(n);let e=r.transform();e&&t.add(e)}if(e){let i=e.$transform;i&&t.add(i),r=e.extends}else{let e=Object.getPrototypeOf(r);r=e.prototype instanceof iy&&e!==iy?e:void 0}}return t}function nl(e){let t,i=e||{},r=rF(),n=i.theme||{},s=void 0===e?r:i.parentEditor||null,a=i.disableEvents||!1,o=r5(),l=i.namespace||(null!==s?s._config.namespace:nV()),c=i.editorState,d=[r1,iO,ix,iJ,r7,r6,...i.nodes||[]],{onError:u,html:h}=i,A=void 0===i.editable||i.editable;if(void 0===e&&null!==r)t=r._nodes;else{t=new Map;for(let e=0;e<d.length;e++){let i=d[e],r=null,n=null;if("function"!=typeof i){let e=i;i=e.replace,r=e.with,n=e.withKlass||null}s_(i);let s=i.getType(),a=no(i);t.set(s,{exportDOM:h&&h.export?h.export.get(i):void 0,klass:i,replace:r,replaceWithKlass:n,sharedNodeState:ed(d[e]),transforms:a})}}let p=new nc(o,s,t,{disableEvents:a,namespace:l,theme:n},u||console.error,function(e,t){let i=new Map,r=new Set,n=e=>{Object.keys(e).forEach(t=>{let r=i.get(t);void 0===r&&(r=[],i.set(t,r)),r.push(e[t])})};return e.forEach(e=>{let t=e.klass.importDOM;if(null==t||r.has(t))return;r.add(t);let i=t.call(e.klass);null!==i&&n(i)}),t&&n(t),i}(t,h?h.import:void 0),A,e);return void 0!==c&&(p._pendingEditorState=c,p._dirtyType=2),function(e){e.registerCommand(e6,t7,nr),e.registerCommand(e7,ie,nr),e.registerCommand(te,it,nr),e.registerCommand(tt,ii,nr),e.registerCommand(tA,is,nr)}(p),p}class nc{static version;_headless;_parentEditor;_rootElement;_editorState;_pendingEditorState;_compositionKey;_deferred;_keyToDOMMap;_updates;_updating;_listeners;_commands;_nodes;_decorators;_pendingDecorators;_config;_dirtyType;_cloneNotNeeded;_dirtyLeaves;_dirtyElements;_normalizedNodes;_updateTags;_observer;_key;_onError;_htmlConversions;_window;_editable;_blockCursorElement;_createEditorArgs;constructor(e,t,i,r,n,s,a,o){this._createEditorArgs=o,this._parentEditor=t,this._rootElement=null,this._editorState=e,this._pendingEditorState=null,this._compositionKey=null,this._deferred=[],this._keyToDOMMap=new Map,this._updates=[],this._updating=!1,this._listeners={decorator:new Set,editable:new Set,mutation:new Map,root:new Set,textcontent:new Set,update:new Set},this._commands=new Map,this._config=r,this._nodes=i,this._decorators={},this._pendingDecorators=null,this._dirtyType=0,this._cloneNotNeeded=new Set,this._dirtyLeaves=new Set,this._dirtyElements=new Map,this._normalizedNodes=new Set,this._updateTags=new Set,this._observer=null,this._key=nV(),this._onError=n,this._htmlConversions=s,this._editable=a,this._headless=null!==t&&t._headless,this._window=null,this._blockCursorElement=null}isComposing(){return null!=this._compositionKey}registerUpdateListener(e){let t=this._listeners.update;return t.add(e),()=>{t.delete(e)}}registerEditableListener(e){let t=this._listeners.editable;return t.add(e),()=>{t.delete(e)}}registerDecoratorListener(e){let t=this._listeners.decorator;return t.add(e),()=>{t.delete(e)}}registerTextContentListener(e){let t=this._listeners.textcontent;return t.add(e),()=>{t.delete(e)}}registerRootListener(e){let t=this._listeners.root;return e(this._rootElement,null),t.add(e),()=>{e(null,this._rootElement),t.delete(e)}}registerCommand(e,t,i){void 0===i&&p(35);let r=this._commands;r.has(e)||r.set(e,[new Set,new Set,new Set,new Set,new Set]);let n=r.get(e);void 0===n&&p(36,String(e));let s=n[i];return s.add(t),()=>{s.delete(t),n.every(e=>0===e.size)&&r.delete(e)}}registerMutationListener(e,t,i){let r=this.resolveRegisteredNodeAfterReplacements(this.getRegisteredNode(e)).klass,n=this._listeners.mutation,s=n.get(t);void 0===s&&(s=new Set,n.set(t,s)),s.add(r);let a=i&&i.skipInitialization;return void 0!==a&&a||this.initializeMutationListener(t,r),()=>{s.delete(r),0===s.size&&n.delete(t)}}getRegisteredNode(e){let t=this._nodes.get(e.getType());return void 0===t&&p(37,e.name),t}resolveRegisteredNodeAfterReplacements(e){for(;e.replaceWithKlass;)e=this.getRegisteredNode(e.replaceWithKlass);return e}initializeMutationListener(e,t){let i=this._editorState,r=sx(i).get(t.getType());if(!r)return;let n=new Map;for(let e of r.keys())n.set(e,"created");n.size>0&&e(n,{dirtyLeaves:new Set,prevEditorState:i,updateTags:new Set(["registerMutationListener"])})}registerNodeTransformToKlass(e,t){let i=this.getRegisteredNode(e);return i.transforms.add(t),i}registerNodeTransform(e,t){let i=this.registerNodeTransformToKlass(e,t),r=[i],n=i.replaceWithKlass;if(null!=n){let e=this.registerNodeTransformToKlass(n,t);r.push(e)}return function(e,t){let i=sx(e.getEditorState()),r=[];for(let e of t){let t=i.get(e);t&&r.push(t)}0!==r.length&&e.update(()=>{for(let e of r)for(let t of e.keys()){let e=nR(t);e&&e.markDirty()}},null===e._pendingEditorState?{tag:ib}:void 0)}(this,r.map(e=>e.klass.getType())),()=>{r.forEach(e=>e.transforms.delete(t))}}hasNode(e){return this._nodes.has(e.getType())}hasNodes(e){return e.every(this.hasNode.bind(this))}dispatchCommand(e,t){return n7(this,e,t)}getDecorators(){return this._decorators}getRootElement(){return this._rootElement}getKey(){return this._key}setRootElement(e){let t=this._rootElement;if(e!==t){let i=n5(this._config.theme,"root"),r=this._pendingEditorState||this._editorState;if(this._rootElement=e,na(this,t,e,r),null!==t&&(this._config.disableEvents||ih(t),null!=i&&t.classList.remove(...i)),null!==e){let t=sa(e),r=e.style;r.userSelect="text",r.whiteSpace="pre-wrap",r.wordBreak="break-word",e.setAttribute("data-lexical-editor","true"),this._window=t,this._dirtyType=2,es(this),this._updateTags.add(ib),rH(this),this._config.disableEvents||function(e,t){let i=e.ownerDocument;tG.set(e,i);let r=tY.get(i)??0;r<1&&i.addEventListener("selectionchange",il),tY.set(i,r+1),e.__lexicalEditor=t;let n=ia(e);for(let i=0;i<tj.length;i++){let[r,s]=tj[i],a="function"==typeof s?e=>{id(e)||(ic(e),(t.isEditable()||"click"===r)&&s(e,t))}:e=>{if(id(e))return;ic(e);let i=t.isEditable();switch(r){case"cut":return i&&n7(t,tL,e);case"copy":return n7(t,tR,e);case"paste":return i&&n7(t,ta,e);case"dragstart":return i&&n7(t,tN,e);case"dragover":return i&&n7(t,tD,e);case"dragend":return i&&n7(t,t_,e);case"focus":return i&&n7(t,tO,e);case"blur":return i&&n7(t,tU,e);case"drop":return i&&n7(t,tk,e)}};e.addEventListener(r,a),n.push(()=>{e.removeEventListener(r,a)})}}(e,this),null!=i&&e.classList.add(...i)}else this._window=null,this._updateTags.add(ib),rH(this);rq("root",this,!1,e,t)}}getElementByKey(e){return this._keyToDOMMap.get(e)||null}getEditorState(){return this._editorState}setEditorState(e,t){e.isEmpty()&&p(38);let i=e;i._readOnly&&((i=r4(e))._selection=e._selection?e._selection.clone():null),en(this);let r=this._pendingEditorState,n=this._updateTags,s=void 0!==t?t.tag:null;null===r||r.isEmpty()||(null!=s&&n.add(s),rH(this)),this._pendingEditorState=i,this._dirtyType=2,this._dirtyElements.set("root",!1),this._compositionKey=null,null!=s&&n.add(s),this._updating||rH(this)}parseEditorState(e,t){return function(e,t,i){let r=r5(),n=rv,s=rQ,a=rB,o=t._dirtyElements,l=t._dirtyLeaves,c=t._cloneNotNeeded,d=t._dirtyType;t._dirtyElements=new Map,t._dirtyLeaves=new Set,t._cloneNotNeeded=new Set,t._dirtyType=0,rv=r,rQ=!1,rB=t,nu(null);try{let n=t._nodes;r$(e.root,n),i&&i(),r._readOnly=!0}catch(e){e instanceof Error&&t._onError(e)}finally{t._dirtyElements=o,t._dirtyLeaves=l,t._cloneNotNeeded=c,t._dirtyType=d,rv=n,rQ=s,rB=a}return r}("string"==typeof e?JSON.parse(e):e,this,t)}read(e){return rH(this),this.getEditorState().read(e,{editor:this})}update(e,t){!function(e,t,i){e._updating?e._updates.push([t,i]):rV(e,t,i)}(this,e,t)}focus(e,t={}){let i=this._rootElement;null!==i&&(i.setAttribute("autocapitalize","off"),rG(this,()=>{let r=ru(),n=nP();null!==r?r.dirty||nj(r.clone()):0!==n.getChildrenSize()&&("rootStart"===t.defaultSelection?n.selectStart():n.selectEnd()),sr("focus"),sn(()=>{i.removeAttribute("autocapitalize"),e&&e()})}),null===this._pendingEditorState&&i.removeAttribute("autocapitalize"))}blur(){let e=this._rootElement;null!==e&&e.blur();let t=sf(this._window);null!==t&&t.removeAllRanges()}isEditable(){return this._editable}setEditable(e){this._editable!==e&&(this._editable=e,rq("editable",this,!0,e))}toJSON(){return{editorState:this._editorState.toJSON()}}}nc.version="0.41.0+prod.esm";let nd=null;function nu(e){nd=e}let nh=1;function nA(e,t){let i=np(e,t);return void 0===i&&p(30,t),i}function np(e,t){return e._nodes.get(t)}let nf="function"==typeof queueMicrotask?queueMicrotask:e=>{Promise.resolve().then(e)};function ng(e){return r0(nM(e))}function nm(e){let t=document.activeElement;if(!sy(t))return!1;let i=t.nodeName;return r0(nM(e))&&("INPUT"===i||"TEXTAREA"===i||"true"===t.contentEditable&&null==nC(t))}function ny(e,t,i){let r=e.getRootElement();try{return null!==r&&r.contains(t)&&r.contains(i)&&null!==t&&!nm(t)&&nE(t)===e}catch(e){return!1}}function nb(e){return e instanceof nc}function nE(e){let t=e;for(;null!=t;){let e=nC(t);if(nb(e))return e;t=st(t)}return null}function nC(e){return e?e.__lexicalEditor:null}function nw(e){return iZ(e)||e.isToken()}function nI(e){return nw(e)||e.isSegmented()}function nv(e){return sb(e)&&3===e.nodeType}function nB(e){return sb(e)&&9===e.nodeType}function nQ(e){let t=e;for(;null!=t;){if(nv(t))return t;t=t.firstChild}return null}function nx(e,t,i){let r=j[t];if(null!==i&&(e&r)==(i&r))return e;let n=e^r;return"subscript"===t?n&=~j.superscript:"superscript"===t?n&=~j.subscript:"lowercase"===t?(n&=~j.uppercase,n&=~j.capitalize):"uppercase"===t?(n&=~j.lowercase,n&=~j.capitalize):"capitalize"===t&&(n&=~j.lowercase,n&=~j.uppercase),n}function nS(e){return iY(e)||iT(e)||r0(e)}function nk(e,t){let i=function(){let e=nd;return nd=null,e}();if(null!=(t=t||i&&i.__key))return void(e.__key=t);rN(),rD();let r=rR(),n=r_(),s=""+nh++;n._nodeMap.set(s,e),rK(e)?r._dirtyElements.set(s,!0):r._dirtyLeaves.add(s),r._cloneNotNeeded.add(s),r._dirtyType=1,e.__key=s}function nT(e){let t=e.getParent();if(null!==t){let i=e.getWritable(),r=t.getWritable(),n=e.getPreviousSibling(),s=e.getNextSibling(),a=null!==s?s.__key:null,o=null!==n?n.__key:null,l=null!==n?n.getWritable():null,c=null!==s?s.getWritable():null;null===n&&(r.__first=a),null===s&&(r.__last=o),null!==l&&(l.__next=a),null!==c&&(c.__prev=o),i.__prev=null,i.__next=null,i.__parent=null,r.__size--}}function nN(e){rD(),im(e)&&p(323,e.__key,e.__type);let t=e.getLatest(),i=t.__parent,r=r_(),n=rR(),s=r._nodeMap,a=n._dirtyElements;null!==i&&function(e,t,i){let r=e;for(;null!==r;){if(i.has(r))return;let e=t.get(r);if(void 0===e)break;i.set(r,!1),r=e.__parent}}(i,s,a);let o=t.__key;n._dirtyType=1,rK(e)?a.set(o,!0):n._dirtyLeaves.add(o)}function nD(e){rN();let t=rR(),i=t._compositionKey;if(e!==i){if(t._compositionKey=e,null!==i){let e=nR(i);null!==e&&e.getWritable()}if(null!==e){let t=nR(e);null!==t&&t.getWritable()}}}function n_(){return rT()?null:rR()._compositionKey}function nR(e,t){let i=(t||r_())._nodeMap.get(e);return void 0===i?null:i}function nL(e,t){let i=nF(e,rR());return void 0!==i?nR(i,t):null}function nF(e,t){return e[`__lexicalKey_${t._key}`]}function nM(e,t){let i=e;for(;null!=i;){let e=nL(i,t);if(null!==e)return e;i=st(i)}return null}function nO(e){let t=Object.assign({},e._decorators);return e._pendingDecorators=t,t}function nU(e){return e.read(()=>nP().getTextContent())}function nP(){return n$(r_())}function n$(e){return e._nodeMap.get("root")}function nj(e){rN();let t=r_();null!==e&&(e.dirty=!0,e.setCachedNodes(null)),t._selection=e}function nH(e){let t=rR(),i=function(e,t){let i=e;for(;null!=i;){let e=nF(i,t);if(void 0!==e)return e;i=st(i)}return null}(e,t);return null===i?e===t.getRootElement()?nR("root"):null:nR(i)}function nq(e){return/[\uD800-\uDBFF][\uDC00-\uDFFF]/g.test(e)}function nz(e){let t=[],i=e;for(;null!==i;)t.push(i),i=i._parentEditor;return t}function nV(){return Math.random().toString(36).replace(/[^a-z]+/g,"").substring(0,5)}function nG(e,t,i){sf(so(t))}function nY(e,t,i,r,n){let s=e;if(s.isAttached()&&(n||!s.isDirty())){let a=s.isComposing(),o=t;if((a||n)&&(t.endsWith(M)&&(o=t.slice(0,-M.length)),n)){let e,t=U;for(;-1!==(e=o.indexOf(t));)o=o.slice(0,e)+o.slice(e+t.length),null!==i&&i>e&&(i=Math.max(e,i-t.length)),null!==r&&r>e&&(r=Math.max(e,r-t.length))}let l=s.getTextContent();if(n||o!==l){if(""===o){if(nD(null),C||w||Q)s.remove();else{let e=rR();setTimeout(()=>{e.update(()=>{s.isAttached()&&s.remove()})},20)}return}let t=s.getParent(),n=rh(),l=s.getTextContentSize(),c=n_(),d=s.getKey();if(s.isToken()||null!==c&&d===c&&!a||i5(n)&&(null!==t&&!t.canInsertTextBefore()&&0===n.anchor.offset||n.anchor.key===e.__key&&0===n.anchor.offset&&!s.canInsertTextBefore()&&!a||n.focus.key===e.__key&&n.focus.offset===l&&!s.canInsertTextAfter()&&!a))return void s.markDirty();let u=ru();if(!i5(u)||null===i||null===r)return void nW(s,o,u);if(u.setTextNodeRange(s,i,s,r),s.isSegmented()){let e=iG(s.getTextContent());s.replace(e),s=e}nW(s,o,u)}}}function nW(e,t,i){if(e.setTextContent(t),i5(i)){let t=e.getKey();for(let r of["anchor","focus"]){let n=i[r];"text"===n.type&&n.key===t&&(n.offset=sZ(e,n.offset,"clamp"))}}}function nJ(e,t,i){let r=t[i]||!1;return"any"===r||r===e[i]}function nK(e,t){return nJ(e,t,"altKey")&&nJ(e,t,"ctrlKey")&&nJ(e,t,"shiftKey")&&nJ(e,t,"metaKey")}function nZ(e,t,i){if(!nK(e,i))return!1;if(e.key.toLowerCase()===t.toLowerCase())return!0;if(t.length>1||1===e.key.length&&127>=e.key.charCodeAt(0))return!1;let r="Key"+t.toUpperCase();return e.code===r}let nX={ctrlKey:!y,metaKey:y},n0={altKey:y,ctrlKey:!y};function n1(e){return"Backspace"===e.key}function n2(e){return nZ(e,"a",nX)}function n4(e){let t=nP();if(i5(e)){let t=e.anchor,i=e.focus,r=t.getNode().getTopLevelElementOrThrow().getParentOrThrow();return t.set(r.getKey(),0,"element"),i.set(r.getKey(),r.getChildrenSize(),"element"),ew(e),e}{let e=t.select(0,t.getChildrenSize());return nj(ew(e)),e}}function n5(e,t){void 0===e.__lexicalClassNameCache&&(e.__lexicalClassNameCache={});let i=e.__lexicalClassNameCache,r=i[t];if(void 0!==r)return r;let n=e[t];if("string"==typeof n){let e=aB(n);return i[t]=e,e}return n}function n3(e,t,i,r,n){if(0===i.size)return;let s=r.__type,a=r.__key,o=t.get(s);void 0===o&&p(33,s);let l=o.klass,c=e.get(l);void 0===c&&(c=new Map,e.set(l,c));let d=c.get(a),u="destroyed"===d&&"created"===n;(void 0===d||u)&&c.set(a,u?"updated":n)}function n8(e,t,i){let r=e.getParent(),n=i,s=e;return null!==r&&(t&&0===i?(n=s.getIndexWithinParent(),s=r):t||i!==s.getChildrenSize()||(n=s.getIndexWithinParent()+1,s=r)),s.getChildAtIndex(t?n-1:n)}function n9(e,t){let i=e.offset;if("element"===e.type)return n8(e.getNode(),t,i);{let r=e.getNode();if(t&&0===i||!t&&i===r.getTextContentSize()){let e=t?r.getPreviousSibling():r.getNextSibling();return null===e?n8(r.getParentOrThrow(),t,r.getIndexWithinParent()+ +!t):e}}return null}function n6(e){let t=so(e).event,i=t&&t.inputType;return"insertFromPaste"===i||"insertFromPasteAsQuotation"===i}function n7(e,t,i){return function(e,t,i){let r=nz(e);for(let n=4;n>=0;n--)for(let s=0;s<r.length;s++){let a=r[s],o=a._commands.get(t);if(void 0!==o){let t=o[n];if(void 0!==t){let r=Array.from(t),n=r.length,s=!1;if(rG(a,()=>{for(let t=0;t<n;t++)if(r[t](i,e))return void(s=!0)}),s)return s}}}return!1}(e,t,i)}function se(e,t){let i=e._keyToDOMMap.get(t);return void 0===i&&p(75,t),i}function st(e){let t=e.assignedSlot||e.parentElement;return sE(t)?t.host:t}function si(e){return nB(e)?e:sy(e)?e.ownerDocument:null}function sr(e){rN(),rR()._updateTags.add(e)}function sn(e){rN(),rR()._deferred.push(e)}function ss(e,t){let i=e.getParent();for(;null!==i;){if(i.is(t))return!0;i=i.getParent()}return!1}function sa(e){let t=si(e);return t?t.defaultView:null}function so(e){let t=e._window;return null===t&&p(78),t}function sl(e){return r2(e)||rK(e)&&e.isShadowRoot()}function sc(e){let t=e.constructor.clone(e);return nk(t,null),t.afterCloneFrom(e),t}function sd(e){let t=rR(),i=e.getType(),r=np(t,i);void 0===r&&p(200,e.constructor.name,i);let{replace:n,replaceWithKlass:s}=r;if(null!==n){let t=n(e),r=t.constructor;return null!==s?t instanceof s||p(201,s.name,s.getType(),r.name,r.getType(),e.constructor.name,i):t instanceof e.constructor&&r!==e.constructor||p(202,r.name,r.getType(),e.constructor.name,i),t.__key===e.__key&&p(203,e.constructor.name,i,r.name,r.getType()),t}return e}function su(e,t){!r2(e.getParent())||rK(t)||r0(t)||p(99)}function sh(e){let t=nR(e);return null===t&&p(63,e),t}function sA(e){return(r0(e)||rK(e)&&!e.canBeEmpty())&&!e.isInline()}function sp(e,t,i){i.style.removeProperty("caret-color"),t._blockCursorElement=null;let r=e.parentElement;null!==r&&r.removeChild(e)}function sf(e){return null}function sg(e){let t=sa(e);return t?t.getSelection():null}function sm(e){return sy(e)&&"A"===e.tagName}function sy(e){return sb(e)&&1===e.nodeType}function sb(e){return"object"==typeof e&&null!==e&&"nodeType"in e&&"number"==typeof e.nodeType}function sE(e){return sb(e)&&11===e.nodeType}function sC(e){let t=RegExp(/^(a|abbr|acronym|b|cite|code|del|em|i|ins|kbd|label|mark|output|q|ruby|s|samp|span|strong|sub|sup|time|u|tt|var|#text)$/,"i");return null!==e.nodeName.match(t)}function sw(e){let t=RegExp(/^(address|article|aside|blockquote|canvas|dd|div|dl|dt|fieldset|figcaption|figure|footer|form|h1|h2|h3|h4|h5|h6|header|hr|li|main|nav|noscript|ol|p|pre|section|table|td|tfoot|ul|video)$/,"i");return null!==e.nodeName.match(t)}function sI(e){if(r0(e)&&!e.isInline())return!0;if(!rK(e)||sl(e))return!1;let t=e.getFirstChild(),i=null===t||iT(t)||iY(t)||t.isInline();return!e.isInline()&&!1!==e.canBeEmpty()&&i}function sv(){return rR()}let sB=new WeakMap,sQ=new Map;function sx(e){if(!e._readOnly&&e.isEmpty())return sQ;e._readOnly||p(192);let t=sB.get(e);return t||(t=function(e){let t=new Map;for(let[i,r]of e._nodeMap){let e=r.__type,n=t.get(e);n||(n=new Map,t.set(e,n)),n.set(i,r)}return t}(e),sB.set(e,t)),t}function sS(e){let t=e.constructor.clone(e);return t.afterCloneFrom(e),t}function sk(e){var t;return(t=sS(e))[ig]=!0,t}function sT(e,t){let i=Math.round((parseInt(e.style.paddingInlineStart,10)||0)/40);t.setIndent(i)}function sN(e){return!0===e.__lexicalUnmanaged}function sD(e,t){return function(e,t){return Object.prototype.hasOwnProperty.call(e,t)}(e,t)&&e[t]!==iy[t]}function s_(e){let t=Y in e.prototype?e.prototype[Y]():void 0,i=function(e){if(!(e===iy||e.prototype instanceof iy)){let t="<unknown>",i="<unknown>";try{t=e.getType()}catch(e){}try{nc.version&&(i=JSON.parse(nc.version))}catch(e){}p(290,e.name,t,i)}return e===rX||e===rJ||e===iy}(e),r=!i&&sD(e,"getType")?e.getType():void 0,n,s=r;if(t)if(r)n=t[r];else for(let[e,i]of Object.entries(t))s=e,n=i;if(!i&&s&&(sD(e,"getType")||(e.getType=()=>s),sD(e,"clone")||(e.clone=t=>(nu(t),new e)),sD(e,"importJSON")||(e.importJSON=n&&n.$importJSON||(t=>(new e).updateFromJSON(t))),!sD(e,"importDOM")&&n)){let{importDOM:t}=n;t&&(e.importDOM=()=>t)}return{ownNodeConfig:n,ownNodeType:s}}function sR(e){let t=sv();return rN(),new(t.resolveRegisteredNodeAfterReplacements(t.getRegisteredNode(e))).klass}let sL=(e,t)=>{let i=e;for(;null!=i&&!r2(i);){if(t(i))return i;i=i.getParent()}return null},sF={next:"previous",previous:"next"};class sM{origin;constructor(e){this.origin=e}[Symbol.iterator](){return s6({hasNext:sz,initial:this.getAdjacentCaret(),map:e=>e,step:e=>e.getAdjacentCaret()})}getAdjacentCaret(){return sJ(this.getNodeAtCaret(),this.direction)}getSiblingCaret(){return sJ(this.origin,this.direction)}remove(){let e=this.getNodeAtCaret();return e&&e.remove(),this}replaceOrInsert(e,t){let i=this.getNodeAtCaret();return e.is(this.origin)||e.is(i)||(null===i?this.insert(e):i.replace(e,t)),this}splice(e,t,i="next"){let r=i===this.direction?t:Array.from(t).reverse(),n=this,s=this.getParentAtCaret(),a=new Map;for(let t=n.getAdjacentCaret();null!==t&&a.size<e;t=t.getAdjacentCaret()){let e=t.origin.getWritable();a.set(e.getKey(),e)}for(let e of r){if(a.size>0){let t=n.getNodeAtCaret();if(t)if(a.delete(t.getKey()),a.delete(e.getKey()),t.is(e)||n.origin.is(e));else{let i=e.getParent();i&&i.is(s)&&e.remove(),t.replace(e)}else null===t&&p(263,Array.from(a).join(" "))}else n.insert(e);n=sJ(e,this.direction)}for(let e of a.values())e.remove();return this}}class sO extends sM{type="child";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:s0(e,this.direction)}getParentCaret(e="root"){return sJ(s$(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=sP(this.direction);return sJ(this.getNodeAtCaret(),e)||s0(this.origin,e)}getParentAtCaret(){return this.origin}getChildCaret(){return this}isSameNodeCaret(e){return e instanceof sO&&this.direction===e.direction&&this.origin.is(e.origin)}isSamePointCaret(e){return this.isSameNodeCaret(e)}}let sU={root:r2,shadowRoot:sl};function sP(e){return sF[e]}function s$(e,t="root"){return sU[t](e)?null:e}class sj extends sM{type="sibling";getLatest(){let e=this.origin.getLatest();return e===this.origin?this:sJ(e,this.direction)}getSiblingCaret(){return this}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return rK(this.origin)?s0(this.origin,this.direction):null}getParentCaret(e="root"){return sJ(s$(this.getParentAtCaret(),e),this.direction)}getFlipped(){let e=sP(this.direction);return sJ(this.getNodeAtCaret(),e)||s0(this.origin.getParentOrThrow(),e)}isSamePointCaret(e){return e instanceof sj&&this.direction===e.direction&&this.origin.is(e.origin)}isSameNodeCaret(e){return(e instanceof sj||e instanceof sH)&&this.direction===e.direction&&this.origin.is(e.origin)}}class sH extends sM{type="text";offset;constructor(e,t){super(e),this.offset=t}getLatest(){let e=this.origin.getLatest();return e===this.origin?this:sK(e,this.direction,this.offset)}getParentAtCaret(){return this.origin.getParent()}getChildCaret(){return null}getParentCaret(e="root"){return sJ(s$(this.getParentAtCaret(),e),this.direction)}getFlipped(){return sK(this.origin,sP(this.direction),this.offset)}isSamePointCaret(e){return e instanceof sH&&this.direction===e.direction&&this.origin.is(e.origin)&&this.offset===e.offset}isSameNodeCaret(e){return(e instanceof sj||e instanceof sH)&&this.direction===e.direction&&this.origin.is(e.origin)}getSiblingCaret(){return sJ(this.origin,this.direction)}}function sq(e){return e instanceof sH}function sz(e){return e instanceof sj}function sV(e){return e instanceof sO}let sG={next:class extends sH{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends sH{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},sY={next:class extends sj{direction="next";getNodeAtCaret(){return this.origin.getNextSibling()}insert(e){return this.origin.insertAfter(e),this}},previous:class extends sj{direction="previous";getNodeAtCaret(){return this.origin.getPreviousSibling()}insert(e){return this.origin.insertBefore(e),this}}},sW={next:class extends sO{direction="next";getNodeAtCaret(){return this.origin.getFirstChild()}insert(e){return this.origin.splice(0,0,[e]),this}},previous:class extends sO{direction="previous";getNodeAtCaret(){return this.origin.getLastChild()}insert(e){return this.origin.splice(this.origin.getChildrenSize(),0,[e]),this}}};function sJ(e,t){return e?new sY[t](e):null}function sK(e,t,i){return e?new sG[t](e,sZ(e,i)):null}function sZ(e,t,i="error"){let r=e.getTextContentSize(),n="next"===t?r:"previous"===t?0:t;return(n<0||n>r)&&("clamp"!==i&&f(284,String(t),String(r),e.getKey()),n=n<0?0:r),n}function sX(e,t){return new s5(e,t)}function s0(e,t){return rK(e)?new sW[t](e):null}function s1(e){return e&&e.getChildCaret()||e}function s2(e){return e&&s1(e.getAdjacentCaret())}class s4{type="node-caret-range";direction;anchor;focus;constructor(e,t,i){this.anchor=e,this.focus=t,this.direction=i}getLatest(){let e=this.anchor.getLatest(),t=this.focus.getLatest();return e===this.anchor&&t===this.focus?this:new s4(e,t,this.direction)}isCollapsed(){return this.anchor.isSamePointCaret(this.focus)}getTextSlices(){let e=e=>{let t=this[e].getLatest();return sq(t)?function(e,t){let{direction:i,origin:r}=e;return sX(e,sZ(r,"focus"===t?sP(i):i)-e.offset)}(t,e):null},t=e("anchor"),i=e("focus");if(t&&i){let{caret:e}=t,{caret:r}=i;if(e.isSameNodeCaret(r))return[sX(e,r.offset-e.offset),null]}return[t,i]}iterNodeCarets(e="root"){let t=sq(this.anchor)?this.anchor.getSiblingCaret():this.anchor.getLatest(),i=this.focus.getLatest(),r=sq(i),n=t=>t.isSameNodeCaret(i)?null:s2(t)||t.getParentCaret(e);return s6({hasNext:e=>null!==e&&!(r&&i.isSameNodeCaret(e)),initial:t.isSameNodeCaret(i)?null:n(t),map:e=>e,step:n})}[Symbol.iterator](){return this.iterNodeCarets("root")}}class s5{type="slice";caret;distance;constructor(e,t){this.caret=e,this.distance=t}getSliceIndices(){let{distance:e,caret:{offset:t}}=this,i=t+e;return i<t?[i,t]:[t,i]}getTextContent(){let[e,t]=this.getSliceIndices();return this.caret.origin.getTextContent().slice(e,t)}getTextContentSize(){return Math.abs(this.distance)}removeTextSlice(){let{caret:{origin:e,direction:t}}=this,[i,r]=this.getSliceIndices(),n=e.getTextContent();return sK(e.setTextContent(n.slice(0,i)+n.slice(r)),t,i)}}function s3(e){return s9(e,sJ(nP(),e.direction))}function s8(e){return s9(e,e)}function s9(e,t){return e.direction!==t.direction&&p(265),new s4(e,t,e.direction)}function s6(e){let{initial:t,hasNext:i,step:r,map:n}=e,s=t;return{[Symbol.iterator](){return this},next(){if(!i(s))return{done:!0,value:void 0};let e={done:!1,value:n(s)};return s=r(s),e}}}function s7(e,t){let i=ar(e.origin,t.origin);switch(null===i&&p(275,e.origin.getKey(),t.origin.getKey()),i.type){case"same":{let i="text"===e.type,r="text"===t.type;return i&&r?function(e,t){return Math.sign(e-t)}(e.offset,t.offset):e.type===t.type?0:i?-1:r?1:"child"===e.type?-1:1}case"ancestor":return"child"===e.type?-1:1;case"descendant":return"child"===t.type?1:-1;case"branch":return ae(i)}}function ae(e){let{a:t,b:i}=e,r=t.__key,n=i.__key,s=t,a=i;for(;s&&a;s=s.getNextSibling(),a=a.getNextSibling()){if(s.__key===n)return -1;if(a.__key===r)return 1}return null===s?1:-1}function at(e,t){return t.is(e)}function ai(e){return rK(e)?[e.getLatest(),null]:[e.getParent(),e.getLatest()]}function ar(e,t){if(e.is(t))return{commonAncestor:e,type:"same"};let i=new Map;for(let[t,r]=ai(e);t;r=t,t=t.getParent())i.set(t,r);for(let[r,n]=ai(t);r;n=r,r=r.getParent()){let s=i.get(r);if(void 0!==s)return null===s?(at(e,r)||p(276),{commonAncestor:r,type:"ancestor"}):null===n?(at(t,r)||p(277),{commonAncestor:r,type:"descendant"}):((rK(s)||at(e,s))&&(rK(n)||at(t,n))&&r.is(s.getParent())&&r.is(n.getParent())||p(278),{a:s,b:n,commonAncestor:r,type:"branch"})}return null}function an(e,t){let{type:i,key:r,offset:n}=e,s=sh(e.key);return"text"===i?(iY(s)||p(266,s.getType(),r),sK(s,t,n)):(rK(s)||p(267,s.getType(),r),am(s,e.offset,t))}function as(e,t){let{origin:i,direction:r}=t,n="next"===r;sq(t)?e.set(i.getKey(),t.offset,"text"):sz(t)?iY(i)?e.set(i.getKey(),sZ(i,r),"text"):e.set(i.getParentOrThrow().getKey(),i.getIndexWithinParent()+ +!!n,"element"):(sV(t)&&rK(i)||p(268),e.set(i.getKey(),n?0:i.getChildrenSize(),"element"))}function aa(e){let t=ru(),i=i5(t)?t:rl();return ao(i,e),nj(i),i}function ao(e,t){as(e.anchor,t.anchor),as(e.focus,t.focus)}function al(e){let{anchor:t,focus:i}=e,r=an(t,"next"),n=an(i,"next"),s=0>=s7(r,n)?"next":"previous";return s9(af(r,s),af(n,s))}function ac(e){let{direction:t,origin:i}=e,r=sJ(i,sP(t)).getNodeAtCaret();return r?sJ(r,t):s0(i.getParentOrThrow(),t)}function ad(e,t="root"){let i=[e];for(let r=sV(e)?e.getParentCaret(t):e.getSiblingCaret();null!==r;r=r.getParentCaret(t))i.push(ac(r));return i}function au(e){return!!e&&e.origin.isAttached()}function ah(e,t="removeEmptySlices"){let i,r;if(e.isCollapsed())return e;let n="root",s="next",a=t,o=ag(e,s),l=ad(o.anchor,n),c=ad(o.focus.getFlipped(),n),d=new Set,u=[];for(let e of o.iterNodeCarets(n))if(sV(e))d.add(e.origin.getKey());else if(sz(e)){let{origin:t}=e;rK(t)&&!d.has(t.getKey())||u.push(t)}for(let e of u)e.remove();for(let e of o.getTextSlices()){if(!e)continue;let{origin:t}=e.caret,i=t.getTextContentSize(),r=ac(sJ(t,s)),n=t.getMode();if(Math.abs(e.distance)===i&&"removeEmptySlices"===a||"token"===n&&0!==e.distance)r.remove();else if(0!==e.distance){a="removeEmptySlices";let t=e.removeTextSlice(),i=e.caret.origin;if("segmented"===n){let e=t.origin,i=iG(e.getTextContent()).setStyle(e.getStyle()).setFormat(e.getFormat());r.replaceOrInsert(i),t=sK(i,s,t.offset)}i.is(l[0].origin)&&(l[0]=t),i.is(c[0].origin)&&(c[0]=t.getFlipped())}}for(let e of l)if(au(e)){i=aA(e);break}for(let e of c)if(au(e)){r=aA(e);break}let h=function(e,t,i){let r;if(!e||!t)return null;let n=e.getParentAtCaret(),s=t.getParentAtCaret();if(!n||!s)return null;let a=n.getParents().reverse();a.push(n);let o=s.getParents().reverse();o.push(s);let l=Math.min(a.length,o.length);for(r=0;r<l&&a[r]===o[r];r++);let c=(e,t)=>{let i;for(let n=r;n<e.length;n++){let r=e[n];if(sl(r))return;!i&&t(r)&&(i=r)}return i},d=c(a,sI),u=d&&c(o,e=>i.has(e.getKey())&&sI(e));return d&&u?[d,u]:null}(i,r,d);if(h){let[e,t]=h;s0(e,"previous").splice(0,t.getChildren());let i=t.getParent();for(t.remove(!0);i&&i.isEmpty();){let e=i;i=i.getParent(),e.remove(!0)}}let A=[i,r,...l,...c].find(au);if(A)return s8(af(aA(A),e.direction));p(269,JSON.stringify(l.map(e=>e.origin.__key)))}function aA(e){let t=function(e){let t=e;for(;sV(t);){let e=s2(t);if(!sV(e))break;t=e}return t}(e.getLatest()),{direction:i}=t;if(iY(t.origin))return sq(t)?t:sK(t.origin,i,i);let r=t.getAdjacentCaret();return sz(r)&&iY(r.origin)?sK(r.origin,i,sP(i)):t}function ap(e){return sq(e)&&e.offset!==sZ(e.origin,e.direction)}function af(e,t){return e.direction===t?e:e.getFlipped()}function ag(e,t){return e.direction===t?e:s9(af(e.focus,t),af(e.anchor,t))}function am(e,t,i){let r=s0(e,"next");for(let e=0;e<t;e++){let e=r.getAdjacentCaret();if(null===e)break;r=e}return af(r,i)}function ay(e,t="root"){let i=0,r=e,n=s2(r);for(;null===n;){if(i--,!(n=r.getParentCaret(t)))return null;n=s2(r=n)}return n&&[n,i]}function ab(e){let{origin:t,offset:i,direction:r}=e;if(i===sZ(t,r))return e.getSiblingCaret();if(i===sZ(t,sP(r)))return ac(e.getSiblingCaret());let[n]=t.splitText(i);return iY(n)||p(281),af(sJ(n,"next"),r)}function aE(e,t){return!0}function aC(e,{$copyElementNode:t=sc,$splitTextPointCaretNext:i=ab,rootMode:r="shadowRoot",$shouldSplit:n=aE}={}){if(sq(e))return i(e);let s=e.getParentCaret(r);if(s){let{origin:i}=s;if(sV(e)&&(!i.canBeEmpty()||!n(i,"first")))return ac(s);let r=function(e){let t=[];for(let i=e.getAdjacentCaret();i;i=i.getAdjacentCaret())t.push(i.origin);return t}(e);(r.length>0||i.canBeEmpty()&&n(i,"last"))&&s.insert(t(i).splice(0,0,r))}return s}function aw(e){return e}function aI(e){return e}function av(e,t){if(!t||e===t)return e;for(let i in t)if(e[i]!==t[i])return{...e,...t};return e}function aB(...e){let t=[];for(let i of e)if(i&&"string"==typeof i)for(let[e]of i.matchAll(/\S+/g))t.push(e);return t}function aQ(e,...t){let i=aB(...t);i.length>0&&e.classList.add(...i)}function ax(e,...t){let i=aB(...t);i.length>0&&e.classList.remove(...i)}function aS(...e){return()=>{for(let t=e.length-1;t>=0;t--)e[t]();e.length=0}}e.s(["$addUpdateTag",()=>sr,"$applyNodeReplacement",()=>sd,"$caretFromPoint",()=>an,"$caretRangeFromSelection",()=>al,"$cloneWithProperties",()=>sS,"$cloneWithPropertiesEphemeral",()=>sk,"$create",()=>sR,"$createLineBreakNode",()=>ik,"$createNodeSelection",()=>rc,"$createParagraphNode",()=>nt,"$createRangeSelection",()=>rl,"$createTabNode",()=>iK,"$createTextNode",()=>iG,"$extendCaretToRange",()=>s3,"$findMatchingParent",()=>sL,"$getAdjacentChildCaret",()=>s2,"$getAdjacentNode",()=>n9,"$getAdjacentSiblingOrParentSiblingCaret",()=>ay,"$getCaretInDirection",()=>af,"$getCaretRange",()=>s9,"$getCharacterOffsets",()=>i6,"$getChildCaret",()=>s0,"$getChildCaretOrSelf",()=>s1,"$getCollapsedCaretRange",()=>s8,"$getEditor",()=>sv,"$getNearestNodeFromDOMNode",()=>nM,"$getNodeByKey",()=>nR,"$getNodeFromDOMNode",()=>nL,"$getPreviousSelection",()=>rh,"$getRoot",()=>nP,"$getSelection",()=>ru,"$getSiblingCaret",()=>sJ,"$getState",()=>el,"$hasAncestor",()=>ss,"$insertNodes",()=>rE,"$isBlockElementNode",()=>ra,"$isChildCaret",()=>sV,"$isDecoratorNode",()=>r0,"$isEditorState",()=>r8,"$isElementNode",()=>rK,"$isExtendableTextPointCaret",()=>ap,"$isLeafNode",()=>nS,"$isLineBreakNode",()=>iT,"$isNodeSelection",()=>i8,"$isParagraphNode",()=>ni,"$isRangeSelection",()=>i5,"$isRootNode",()=>r2,"$isRootOrShadowRoot",()=>sl,"$isSiblingCaret",()=>sz,"$isTextNode",()=>iY,"$isTextPointCaret",()=>sq,"$isTokenOrSegmented",()=>nI,"$normalizeCaret",()=>aA,"$normalizeSelection__EXPERIMENTAL",()=>ew,"$parseSerializedNode",()=>rP,"$rewindSiblingCaret",()=>ac,"$selectAll",()=>n4,"$setPointFromCaret",()=>as,"$setSelection",()=>nj,"$setSelectionFromCaretRange",()=>aa,"$setState",()=>ec,"$splitAtPointCaretNext",()=>aC,"ArtificialNode__DO_NOT_USE",()=>r6,"CLEAR_EDITOR_COMMAND",()=>tM,"CLICK_COMMAND",()=>e9,"COMMAND_PRIORITY_CRITICAL",()=>ns,"COMMAND_PRIORITY_EDITOR",()=>nr,"COMMAND_PRIORITY_LOW",()=>nn,"CONTROLLED_TEXT_INSERTION_COMMAND",()=>ts,"COPY_COMMAND",()=>tR,"CUT_COMMAND",()=>tL,"DELETE_CHARACTER_COMMAND",()=>ti,"DELETE_LINE_COMMAND",()=>tc,"DELETE_WORD_COMMAND",()=>tl,"DRAGOVER_COMMAND",()=>tD,"DRAGSTART_COMMAND",()=>tN,"DROP_COMMAND",()=>tk,"DecoratorNode",()=>rX,"ElementNode",()=>rJ,"FORMAT_ELEMENT_COMMAND",()=>tT,"FORMAT_TEXT_COMMAND",()=>td,"HISTORY_MERGE_TAG",()=>ib,"INDENT_CONTENT_COMMAND",()=>tx,"INSERT_LINE_BREAK_COMMAND",()=>tr,"INSERT_PARAGRAPH_COMMAND",()=>tn,"INSERT_TAB_COMMAND",()=>tQ,"INTERNAL_$isBlock",()=>sI,"KEY_ARROW_DOWN_COMMAND",()=>tb,"KEY_ARROW_LEFT_COMMAND",()=>tg,"KEY_ARROW_RIGHT_COMMAND",()=>tp,"KEY_ARROW_UP_COMMAND",()=>ty,"KEY_BACKSPACE_COMMAND",()=>tw,"KEY_DELETE_COMMAND",()=>tv,"KEY_ENTER_COMMAND",()=>tE,"KEY_ESCAPE_COMMAND",()=>tI,"KEY_SPACE_COMMAND",()=>tC,"KEY_TAB_COMMAND",()=>tB,"LineBreakNode",()=>ix,"OUTDENT_CONTENT_COMMAND",()=>tS,"PASTE_COMMAND",()=>ta,"PASTE_TAG",()=>iE,"ParagraphNode",()=>r7,"REMOVE_TEXT_COMMAND",()=>to,"RootNode",()=>r1,"SELECTION_INSERT_CLIPBOARD_NODES_COMMAND",()=>e8,"SELECT_ALL_COMMAND",()=>tF,"SKIP_DOM_SELECTION_TAG",()=>iI,"SKIP_SELECTION_FOCUS_TAG",()=>iv,"TEXT_TYPE_TO_FORMAT",()=>j,"TabNode",()=>iJ,"TextNode",()=>iO,"addClassNamesToElement",()=>aQ,"buildImportMap",()=>ip,"createCommand",()=>e5,"createEditor",()=>nl,"createState",()=>eo,"defineExtension",()=>aw,"getDOMSelection",()=>sf,"getDOMTextNode",()=>nQ,"getNearestEditorFromDOMNode",()=>nE,"getRegisteredNode",()=>np,"isBlockDomNode",()=>sw,"isDOMDocumentNode",()=>nB,"isDOMNode",()=>sb,"isDocumentFragment",()=>sE,"isHTMLAnchorElement",()=>sm,"isHTMLElement",()=>sy,"isInlineDomNode",()=>sC,"isSelectionCapturedInDecoratorInput",()=>nm,"isSelectionWithinEditor",()=>ny,"makeStepwiseIterator",()=>s6,"mergeRegister",()=>aS,"normalizeClassNames",()=>aB,"removeClassNamesFromElement",()=>ax,"safeCast",()=>aI,"setNodeIndentFromDOM",()=>sT,"shallowMergeConfig",()=>av,"toggleTextFormatType",()=>nx],704890);let ak=new Map;function aT(e){let t={};if(!e)return t;for(let i of e.split(";"))if(""!==i){let[e,r]=i.split(/:([^]+)/);e&&r&&(t[e.trim()]=r.trim())}return t}function aN(e){let t=ak.get(e);return void 0===t&&(t=aT(e),ak.set(e,t)),t}function aD(e){let t=sv().getElementByKey(e.getKey());if(null===t)return null;let i=t.ownerDocument.defaultView;return null===i?null:i.getComputedStyle(t)}function a_(e){return aD(r2(e)?e:e.getParentOrThrow())}function aR(e){let t=a_(e);return null!==t&&"rtl"===t.direction}function aL(e,t,i="self"){let r=e.getStartEndPoints();if(t.isSelected(e)&&!nI(t)&&null!==r){let[n,s]=r,a=e.isBackward(),o=n.getNode(),l=s.getNode(),c=t.is(o),d=t.is(l);if(c||d){let[r,n]=i6(e),s=o.is(l),c=t.is(a?l:o),d=t.is(a?o:l),u,h=0;s?(h=r>n?n:r,u=r>n?r:n):c?(h=a?n:r,u=void 0):d&&(h=0,u=a?r:n);let A=t.__text.slice(h,u);A!==t.__text&&("clone"===i&&(t=sk(t)),t.__text=A)}}return t}function aF(e){let t=e.getStyle(),i=aT(t);ak.set(t,i)}function aM(e){let t=aO(e);return null!==t&&"vertical-rl"===t.writingMode}function aO(e){let t=e.anchor.getNode();return rK(t)?aD(t):a_(t)}function aU(e,t){let i=aM(e)?!t:t;a$(e)&&(i=!i);let r=an(e.focus,i?"previous":"next");if(ap(r))return!1;for(let e of s3(r)){if(sV(e))return!e.origin.isInline();if(!rK(e.origin)){if(r0(e.origin))return!0;break}}return!1}function aP(e,t,i,r){e.modify(t?"extend":"move",i,r)}function a$(e){let t=aO(e);return null!==t&&"rtl"===t.direction}function aj(e,t,i){let r,n=a$(e);r=aM(e)||n?!i:i,aP(e,t,r,"character")}function aH(e,t){let i=nB(t)?t.body.childNodes:t.childNodes,r=[],n=[];for(let t of i)if(!aV.has(t.nodeName)){let i=aG(t,e,n,!1);null!==i&&(r=r.concat(i))}return function(e){for(let t of e)t.getNextSibling()instanceof r6&&t.insertAfter(ik());for(let t of e){for(let e of t.getChildren())t.insertBefore(e);t.remove()}}(n),r}function aq(t,i){if("u"<typeof document||void 0===e.g.window)throw Error("To use $generateHtmlFromNodes in headless mode please initialize a headless browser implementation such as JSDom before calling this function.");let r=document.createElement("div"),n=nP().getChildren();for(let e=0;e<n.length;e++)az(t,n[e],r,i);return r.innerHTML}function az(e,t,i,r=null){let n=null===r||t.isSelected(r),s=rK(t)&&t.excludeFromCopy("html"),a=t;null!==r&&iY(t)&&(a=aL(r,t,"clone"));let o=rK(a)?a.getChildren():[],l=np(e,a.getType()),{element:c,after:d}=l&&void 0!==l.exportDOM?l.exportDOM(e,a):a.exportDOM(e);if(!c)return!1;let u=document.createDocumentFragment();for(let i=0;i<o.length;i++){let s=o[i],a=az(e,s,u,r);!n&&rK(t)&&a&&t.extractWithChild(s,r,"html")&&(n=!0)}if(n&&!s){if((sy(c)||sE(c))&&c.append(u),i.append(c),d){let e=d.call(a,c);e&&(sE(c)?c.replaceChildren(e):c.replaceWith(e))}}else i.append(u);return n}let aV=new Set(["STYLE","SCRIPT"]);function aG(e,t,i,r,n=new Map,s){let a=[];if(aV.has(e.nodeName))return a;let o=null,l=function(e,t){let{nodeName:i}=e,r=t._htmlConversions.get(i.toLowerCase()),n=null;if(void 0!==r)for(let t of r){let i=t(e);null!==i&&(null===n||(n.priority||0)<=(i.priority||0))&&(n=i)}return null!==n?n.conversion:null}(e,t),c=l?l(e):null,d=null;if(null!==c){d=c.after;let t=c.node;if(null!==(o=Array.isArray(t)?t[t.length-1]:t)){for(let[,e]of n)if(!(o=e(o,s)))break;o&&a.push(...Array.isArray(t)?t:[o])}null!=c.forChild&&n.set(e.nodeName,c.forChild)}let u=e.childNodes,h=[],A=(null==o||!sl(o))&&(null!=o&&ra(o)||r);for(let e=0;e<u.length;e++)h.push(...aG(u[e],t,i,A,new Map(n),o));return null!=d&&(h=d(h)),sw(e)&&(h=aY(e,h,A?()=>{let e=new r6;return i.push(e),e}:nt)),null==o?h.length>0?a=a.concat(h):sw(e)&&function(e){return null!=e.nextSibling&&null!=e.previousSibling&&sC(e.nextSibling)&&sC(e.previousSibling)}(e)&&(a=a.concat(ik())):rK(o)&&o.append(...h),a}function aY(e,t,i){let r=e.style.textAlign,n=[],s=[];for(let e=0;e<t.length;e++){let a=t[e];if(ra(a))r&&!a.getFormat()&&a.setFormat(r),n.push(a);else if(s.push(a),e===t.length-1||e<t.length-1&&ra(t[e+1])){let e=i();e.setFormat(r),e.append(...s),n.push(e),s=[]}}return n}function aW(e,...t){let i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let i of(r.append("code",e),t))r.append("v",i);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}let aJ=!1,aK=null,aZ=!1;aJ&&"InputEvent"in window&&!aK&&new window.InputEvent("input"),aJ&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),aJ&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,aJ&&/Android/.test(navigator.userAgent),aJ&&/^(?=.*Chrome).*/i.test(navigator.userAgent),aJ&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent);let aX=aJ;function a0(e,t){let i=e;for(;null!=i;){if(i instanceof t)return i;i=i.getParent()}return null}function a1(e){let t=sL(e,e=>rK(e)&&!e.isInline());return rK(t)||aW(4,e.__key),t}function a2(e,t){return null!==e&&Object.getPrototypeOf(e).constructor.name===t.name}function a4(e){let t=ru();if(!i5(t))return!1;let i=new Set,r=t.getNodes();for(let t=0;t<r.length;t++){let n=r[t],s=n.getKey();if(i.has(s))continue;let a=sL(n,e=>rK(e)&&!e.isInline());if(null===a)continue;let o=a.getKey();a.canIndent()&&!i.has(o)&&(i.add(o),e(a))}return i.size>0}let a5=!(aZ||!aX)&&void 0;function a3(e,t=!1){let i=1;if(function(){if(void 0===a5){let e=document.createElement("div");e.style.cssText="position: absolute; opacity: 0; width: 100px; left: -1000px;",document.body.appendChild(e);let t=e.getBoundingClientRect();e.style.setProperty("zoom","2"),a5=e.getBoundingClientRect().width===t.width,document.body.removeChild(e)}return a5}()||t)for(;e;)i*=Number(window.getComputedStyle(e).getPropertyValue("zoom")),e=e.parentElement;return i}function a8(e,...t){let i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let i of(r.append("code",e),t))r.append("v",i);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function a9(e,t,i){let r=e.getData("application/x-lexical-editor");if(r)try{let e=JSON.parse(r);if(e.namespace===i._config.namespace&&Array.isArray(e.nodes))return a6(i,ot(e.nodes),t)}catch(e){console.error(e)}let n=e.getData("text/html"),s=e.getData("text/plain");if(n&&s!==n)try{let e=(new DOMParser).parseFromString(function(e){return window.trustedTypes&&window.trustedTypes.createPolicy?window.trustedTypes.createPolicy("lexical",{createHTML:e=>e}).createHTML(e):e}(n),"text/html");return a6(i,aH(i,e),t)}catch(e){console.error(e)}let a=s||e.getData("text/uri-list");if(null!=a)if(i5(t)){let e=a.split(/(\r?\n|\t)/);""===e[e.length-1]&&e.pop();for(let t=0;t<e.length;t++){let i=ru();if(i5(i)){let r=e[t];"\n"===r||"\r\n"===r?i.insertParagraph():" "===r?i.insertNodes([iK()]):i.insertText(r)}}}else t.insertRawText(a)}function a6(e,t,i){e.dispatchCommand(e8,{nodes:t,selection:i})||(i.insertNodes(t),function(e){if(i5(e)&&e.isCollapsed()){let t=e.anchor,i=null,r=an(t,"previous");if(r)if(sq(r))i=r.origin;else for(let e of s9(r,s0(nP(),"next").getFlipped())){if(iY(e.origin)){i=e.origin;break}if(rK(e.origin)&&!e.origin.isInline())break}if(i&&iY(i)){let t=i.getFormat(),r=i.getStyle();e.format===t&&e.style===r||(e.format=t,e.style=r,e.dirty=!0)}}}(i))}function a7(e,t,i,r=[]){let n=null===t||i.isSelected(t),s=rK(i)&&i.excludeFromCopy("html"),a=i;null!==t&&iY(a)&&(a=aL(t,a,"clone"));let o=rK(a)?a.getChildren():[],l=function(e){let t=e.exportJSON(),i=e.constructor;return t.type!==i.getType()&&a8(58,i.name),rK(e)&&(Array.isArray(t.children)||a8(59,i.name)),t}(a);iY(a)&&0===a.getTextContentSize()&&(n=!1);for(let r=0;r<o.length;r++){let s=o[r],a=a7(e,t,s,l.children);!n&&rK(i)&&a&&i.extractWithChild(s,t,"clone")&&(n=!0)}if(n&&!s)r.push(l);else if(Array.isArray(l.children))for(let e=0;e<l.children.length;e++){let t=l.children[e];r.push(t)}return n}function oe(e,t){let i=[],r=nP().getChildren();for(let n=0;n<r.length;n++)a7(e,t,r[n],i);return{namespace:e._config.namespace,nodes:i}}function ot(e){let t=[];for(let i=0;i<e.length;i++){let r=rP(e[i]);iY(r)&&aF(r),t.push(r)}return t}let oi=null;async function or(e,t,i){if(null!==oi)return!1;if(null!==t)return new Promise((r,n)=>{e.update(()=>{r(on(e,t,i))})});let r=e.getRootElement(),n=e._window||window,s=n.document,a=sf(n);if(null===r||null===a)return!1;let o=s.createElement("span");o.style.cssText="position: fixed; top: -1000px;",o.append(s.createTextNode("#")),r.append(o);let l=new Range;return l.setStart(o,0),l.setEnd(o,1),a.removeAllRanges(),a.addRange(l),new Promise((t,r)=>{let a=e.registerCommand(tR,r=>(a2(r,ClipboardEvent)&&(a(),null!==oi&&(n.clearTimeout(oi),oi=null),t(on(e,r,i))),!0),ns);oi=n.setTimeout(()=>{a(),oi=null,t(!1)},50),s.execCommand("copy"),o.remove()})}function on(e,t,i){if(void 0===i){let t=sf(e._window),r=ru();if(!r||r.isCollapsed()||!t)return!1;let n=t.anchorNode,s=t.focusNode;if(null!==n&&null!==s&&!ny(e,n,s))return!1;i=oa(r)}t.preventDefault();let r=t.clipboardData;return null!==r&&(oo(r,i),!0)}let os=[["text/html",function(e,t=ru()){return null==t&&a8(166),i5(t)&&t.isCollapsed()||0===t.getNodes().length?"":aq(e,t)}],["application/x-lexical-editor",function(e,t=ru()){return null==t&&a8(166),i5(t)&&t.isCollapsed()||0===t.getNodes().length?null:JSON.stringify(oe(e,t))}]];function oa(e=ru()){let t={"text/plain":e?e.getTextContent():""};if(e){let i=sv();for(let[r,n]of os){let s=n(i,e);null!==s&&(t[r]=s)}}return t}function oo(e,t){for(let[i]of os)void 0===t[i]&&e.setData(i,"");for(let i in t){let r=t[i];void 0!==r&&e.setData(i,r)}}let ol=Symbol.for("preact-signals");function oc(){if(oh>1)return void oh--;let e,t=!1;for(;void 0!==i;){let r=i;for(i=void 0,oA++;void 0!==r;){let i=r.o;if(r.o=void 0,r.f&=-3,!(8&r.f)&&oy(r))try{r.c()}catch(i){t||(e=i,t=!0)}r=i}}if(oA=0,oh--,t)throw e}function od(e){if(oh>0)return e();oh++;try{return e()}finally{oc()}}function ou(e){let i=t;t=void 0;try{return e()}finally{t=i}}let oh=0,oA=0,op=0;function of(e){if(void 0===t)return;let i=e.n;return void 0===i||i.t!==t?(i={i:0,S:e,p:t.s,n:void 0,t:t,e:void 0,x:void 0,r:i},void 0!==t.s&&(t.s.n=i),t.s=i,e.n=i,32&t.f&&e.S(i),i):-1===i.i?(i.i=0,void 0!==i.n&&(i.n.p=i.p,void 0!==i.p&&(i.p.n=i.n),i.p=t.s,i.n=void 0,t.s.n=i,t.s=i),i):void 0}function og(e,t){this.v=e,this.i=0,this.n=void 0,this.t=void 0,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function om(e,t){return new og(e,t)}function oy(e){for(let t=e.s;void 0!==t;t=t.n)if(t.S.i!==t.i||!t.S.h()||t.S.i!==t.i)return!0;return!1}function ob(e){for(let t=e.s;void 0!==t;t=t.n){let i=t.S.n;if(void 0!==i&&(t.r=i),t.S.n=t,t.i=-1,void 0===t.n){e.s=t;break}}}function oE(e){let t,i=e.s;for(;void 0!==i;){let e=i.p;-1===i.i?(i.S.U(i),void 0!==e&&(e.n=i.n),void 0!==i.n&&(i.n.p=e)):t=i,i.S.n=i.r,void 0!==i.r&&(i.r=void 0),i=e}e.s=t}function oC(e,t){og.call(this,void 0),this.x=e,this.s=void 0,this.g=op-1,this.f=4,this.W=null==t?void 0:t.watched,this.Z=null==t?void 0:t.unwatched,this.name=null==t?void 0:t.name}function ow(e,t){return new oC(e,t)}function oI(e){let i=e.u;if(e.u=void 0,"function"==typeof i){oh++;let r=t;t=void 0;try{i()}catch(t){throw e.f&=-2,e.f|=8,ov(e),t}finally{t=r,oc()}}}function ov(e){for(let t=e.s;void 0!==t;t=t.n)t.S.U(t);e.x=void 0,e.s=void 0,oI(e)}function oB(e){if(t!==this)throw Error("Out-of-order effect");oE(this),t=e,this.f&=-2,8&this.f&&ov(this),oc()}function oQ(e,t){this.x=e,this.u=void 0,this.s=void 0,this.o=void 0,this.f=32,this.name=null==t?void 0:t.name}function ox(e,t){let i=new oQ(e,t);try{i.c()}catch(e){throw i.d(),e}let r=i.d.bind(i);return r[Symbol.dispose]=r,r}function oS(e,t={}){let i={};for(let r in e){let n=t[r],s=om(void 0===n?e[r]:n);i[r]=s}return i}function ok(){let e=nP(),t=ru(),i=nt();e.clear(),e.append(i),null!==t&&i.select(),i5(t)&&(t.format=0)}function oT(e,t=ok){return e.registerCommand(tM,i=>(e.update(t),!0),nr)}og.prototype.brand=ol,og.prototype.h=function(){return!0},og.prototype.S=function(e){let t=this.t;t!==e&&void 0===e.e&&(e.x=t,this.t=e,void 0!==t?t.e=e:ou(()=>{var e;null==(e=this.W)||e.call(this)}))},og.prototype.U=function(e){if(void 0!==this.t){let t=e.e,i=e.x;void 0!==t&&(t.x=i,e.e=void 0),void 0!==i&&(i.e=t,e.x=void 0),e===this.t&&(this.t=i,void 0===i&&ou(()=>{var e;null==(e=this.Z)||e.call(this)}))}},og.prototype.subscribe=function(e){return ox(()=>{let i=this.value,r=t;t=void 0;try{e(i)}finally{t=r}},{name:"sub"})},og.prototype.valueOf=function(){return this.value},og.prototype.toString=function(){return this.value+""},og.prototype.toJSON=function(){return this.value},og.prototype.peek=function(){let e=t;t=void 0;try{return this.value}finally{t=e}},Object.defineProperty(og.prototype,"value",{get(){let e=of(this);return void 0!==e&&(e.i=this.i),this.v},set(e){if(e!==this.v){if(oA>100)throw Error("Cycle detected");this.v=e,this.i++,op++,oh++;try{for(let e=this.t;void 0!==e;e=e.x)e.t.N()}finally{oc()}}}}),oC.prototype=new og,oC.prototype.h=function(){if(this.f&=-3,1&this.f)return!1;if(32==(36&this.f)||(this.f&=-5,this.g===op))return!0;if(this.g=op,this.f|=1,this.i>0&&!oy(this))return this.f&=-2,!0;let e=t;try{ob(this),t=this;let e=this.x();(16&this.f||this.v!==e||0===this.i)&&(this.v=e,this.f&=-17,this.i++)}catch(e){this.v=e,this.f|=16,this.i++}return t=e,oE(this),this.f&=-2,!0},oC.prototype.S=function(e){if(void 0===this.t){this.f|=36;for(let e=this.s;void 0!==e;e=e.n)e.S.S(e)}og.prototype.S.call(this,e)},oC.prototype.U=function(e){if(void 0!==this.t&&(og.prototype.U.call(this,e),void 0===this.t)){this.f&=-33;for(let e=this.s;void 0!==e;e=e.n)e.S.U(e)}},oC.prototype.N=function(){if(!(2&this.f)){this.f|=6;for(let e=this.t;void 0!==e;e=e.x)e.t.N()}},Object.defineProperty(oC.prototype,"value",{get(){if(1&this.f)throw Error("Cycle detected");let e=of(this);if(this.h(),void 0!==e&&(e.i=this.i),16&this.f)throw this.v;return this.v}}),oQ.prototype.c=function(){let e=this.S();try{if(8&this.f||void 0===this.x)return;let e=this.x();"function"==typeof e&&(this.u=e)}finally{e()}},oQ.prototype.S=function(){if(1&this.f)throw Error("Cycle detected");this.f|=1,this.f&=-9,oI(this),ob(this),oh++;let e=t;return t=this,oB.bind(this,e)},oQ.prototype.N=function(){2&this.f||(this.f|=2,this.o=i,i=this)},oQ.prototype.d=function(){this.f|=8,1&this.f||ov(this)},oQ.prototype.dispose=function(){this.d()},aw({build:(e,t,i)=>oS(t),config:aI({defaultSelection:"rootEnd",disabled:!1}),name:"@lexical/extension/AutoFocus",register(e,t,i){let r=i.getOutput();return ox(()=>r.disabled.value?void 0:e.registerRootListener(t=>{e.focus(()=>{let e=document.activeElement;null===t||null!==e&&t.contains(e)||t.focus({preventScroll:!0})},{defaultSelection:r.defaultSelection.peek()})}))}}),aw({build:(e,t,i)=>oS(t),config:aI({$onClear:ok}),name:"@lexical/extension/ClearEditor",register(e,t,i){let{$onClear:r}=i.getOutput();return ox(()=>oT(e,r.value))}});let oN=eo("format",{parse:e=>"number"==typeof e?e:0});class oD extends rX{$config(){return this.config("decorator-text",{extends:rX,stateConfigs:[{flat:!0,stateConfig:oN}]})}getFormat(){return el(this,oN)}getFormatFlags(e,t){return nx(this.getFormat(),e,t)}hasFormat(e){let t=j[e];return 0!=(this.getFormat()&t)}setFormat(e){return ec(this,oN,e)}toggleFormat(e){let t=nx(this.getFormat(),e,null);return this.setFormat(t)}isInline(){return!0}createDOM(){return document.createElement("span")}updateDOM(){return!1}}function o_(e){return e instanceof oD}function oR(e,t){let i;return om(e(),{unwatched(){i&&(i(),i=void 0)},watched(){this.value=e(),i=t(this)}})}aw({name:"@lexical/extension/DecoratorText",nodes:()=>[oD],register:(e,t,i)=>e.registerCommand(td,e=>{let t=ru();if(i8(t)||i5(t))for(let i of t.getNodes())o_(i)&&i.toggleFormat(e);return!1},nn)});let oL=aw({build:e=>oR(()=>e.getEditorState(),t=>e.registerUpdateListener(e=>{t.value=e.editorState})),name:"@lexical/extension/EditorState"}),oF={tag:ib};function oM(){let e=nP();e.isEmpty()&&e.append(nt())}aw({config:aI({setOptions:oF,updateOptions:oF}),init:({$initialEditorState:e=oM})=>({$initialEditorState:e,initialized:!1}),afterRegistration(e,{updateOptions:t,setOptions:i},r){let n=r.getInitResult();if(!n.initialized){n.initialized=!0;let{$initialEditorState:r}=n;if(r8(r))e.setEditorState(r,i);else if("function"==typeof r)e.update(()=>{r(e)},t);else if(r&&("string"==typeof r||"object"==typeof r)){let t=e.parseEditorState(r);e.setEditorState(t,i)}}return()=>{}},name:"@lexical/extension/InitialState",nodes:[r1,iO,ix,iJ,r7]}),Symbol.for("@lexical/extension/LexicalBuilder");let oO=new Set,oU=aw({build(e,t,i){let r=i.getDependency(oL).output,n=om({watchedNodeKeys:new Map}),s=oR(()=>{},()=>ox(()=>{let e=s.peek(),{watchedNodeKeys:t}=n.value,i,a=!1;r.value.read(()=>{if(ru())for(let[r,n]of t.entries()){if(0===n.size){t.delete(r);continue}let s=nR(r),o=s&&s.isSelected()||!1;a=a||o!==(!!e&&e.has(r)),o&&(i=i||new Set).add(r)}}),!a&&i&&e&&i.size===e.size||(s.value=i)}));return{watchNodeKey:function(e){let t=ow(()=>(s.value||oO).has(e)),{watchedNodeKeys:i}=n.peek(),r=i.get(e),a=void 0!==r;return(r=r||new Set).add(t),a||(i.set(e,r),n.value={watchedNodeKeys:i}),t}}},dependencies:[oL],name:"@lexical/extension/NodeSelection"});e5("INSERT_HORIZONTAL_RULE_COMMAND");class oP extends rX{static getType(){return"horizontalrule"}static clone(e){return new oP(e.__key)}static importJSON(e){return oj().updateFromJSON(e)}static importDOM(){return{hr:()=>({conversion:o$,priority:0})}}exportDOM(){return{element:document.createElement("hr")}}createDOM(e){let t=document.createElement("hr");return aQ(t,e.theme.hr),t}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}}function o$(){return{node:oj()}}function oj(){return sR(oP)}function oH(e){return e instanceof oP}function oq(e){return e.canBeEmpty()}function oz(e,t,i=oq){return aS(e.registerCommand(tB,t=>{let i=ru();if(!i5(i))return!1;t.preventDefault();let r=!function(e){if(e.getNodes().filter(e=>ra(e)&&e.canIndent()).length>0)return!0;let t=e.anchor,i=e.focus,r=i.isBefore(t)?i:t,n=a1(r.getNode());if(n.canIndent()){let e=n.getKey(),t=rl();if(t.anchor.set(e,0,"element"),t.focus.set(e,0,"element"),(t=ew(t)).anchor.is(r))return!0}return!1}(i)?tQ:t.shiftKey?tS:tx;return e.dispatchCommand(r,void 0)},nr),e.registerCommand(tx,()=>{let e="number"==typeof t?t:t?t.peek():null;if(!i5(ru()))return!1;let r="function"==typeof i?i:i.peek();return a4(t=>{if(r(t)){let i=t.getIndent()+1;(!e||i<e)&&t.setIndent(i)}})},ns))}function oV(e){let t=window.location.origin,i=i=>{if(i.origin!==t)return;let r=e.getRootElement();if(document.activeElement!==r)return;let n=i.data;if("string"==typeof n){let t;try{t=JSON.parse(n)}catch(e){return}if(t&&"nuanria_messaging"===t.protocol&&"request"===t.type){let r=t.payload;if(r&&"makeChanges"===r.functionId){let t=r.args;if(t){let[r,n,s,a,o]=t;e.update(()=>{let e=ru();if(i5(e)){let t=e.anchor,l=t.getNode(),c=0,d=0;if(iY(l)&&r>=0&&n>=0&&(c=r,d=r+n,e.setTextNodeRange(l,c,l,d)),c===d&&""===s||(e.insertRawText(s),l=t.getNode()),iY(l)){c=a,d=a+o;let t=l.getTextContentSize();c=c>t?t:c,d=d>t?t:d,e.setTextNodeRange(l,c,l,d)}i.stopImmediatePropagation()}})}}}}};return window.addEventListener("message",i,!0),()=>{window.removeEventListener("message",i,!0)}}aw({dependencies:[oL,oU],name:"@lexical/extension/HorizontalRule",nodes:()=>[oP],register(e,t,i){let{watchNodeKey:r}=i.getDependency(oU).output,n=om({nodeSelections:new Map}),s=e._config.theme.hrSelected??"selected";return aS(e.registerCommand(e9,e=>{if(sb(e.target)){let t=nL(e.target);if(oH(t))return function(e,t=!1){let i,r=ru(),n=e.isSelected(),s=e.getKey();t&&i8(r)?i=r:nj(i=rc()),n?i.delete(s):i.add(s)}(t,e.shiftKey),!0}return!1},nn),e.registerMutationListener(oP,(t,i)=>{od(()=>{let i=!1,{nodeSelections:s}=n.peek();for(let[n,a]of t.entries())if("destroyed"===a)s.delete(n),i=!0;else{let t=s.get(n),a=e.getElementByKey(n);t?t.domNode.value=a:(i=!0,s.set(n,{domNode:om(a),selectedSignal:r(n)}))}i&&(n.value={nodeSelections:s})})}),ox(()=>{let e=[];for(let{domNode:t,selectedSignal:i}of n.value.nodeSelections.values())e.push(ox(()=>{let e=t.value;e&&(i.value?aQ(e,s):ax(e,s))}));return aS(...e)}))}}),aw({build:(e,t,i)=>oS(t),config:aI({$canIndent:oq,disabled:!1,maxIndent:null}),name:"@lexical/extension/TabIndentation",register(e,t,i){let{disabled:r,maxIndent:n,$canIndent:s}=i.getOutput();return ox(()=>{if(!r.value)return oz(e,n,s)})}});let oG=aw({build:(e,t,i)=>oS(t),config:aI({disabled:!0}),name:"@lexical/dragon",register:(e,t,i)=>ox(()=>i.getOutput().disabled.value?void 0:oV(e))});function oY(e,t){if(void 0!==document.caretRangeFromPoint){let i=document.caretRangeFromPoint(e,t);return null===i?null:{node:i.startContainer,offset:i.startOffset}}if("undefined"!==document.caretPositionFromPoint){let i=document.caretPositionFromPoint(e,t);return null===i?null:{node:i.offsetNode,offset:i.offset}}return null}let oW=!1,oJ=null,oK=(oW&&/Version\/[\d.]+.*Safari/.test(navigator.userAgent),oW&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&window.MSStream,oW&&/^(?=.*Chrome).*/i.test(navigator.userAgent),oW&&/AppleWebKit\/[\d.]+/.test(navigator.userAgent),e5("DRAG_DROP_PASTE_FILE"));class oZ extends rJ{static getType(){return"quote"}static clone(e){return new oZ(e.__key)}createDOM(e){let t=document.createElement("blockquote");return aQ(t,e.theme.quote),t}updateDOM(e,t){return!1}static importDOM(){return{blockquote:e=>({conversion:o5,priority:0})}}exportDOM(e){let{element:t}=super.exportDOM(e);if(sy(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e);let i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return oX().updateFromJSON(e)}insertNewAfter(e,t){let i=nt(),r=this.getDirection();return i.setDirection(r),this.insertAfter(i,t),i}collapseAtStart(){let e=nt();return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}canMergeWhenEmpty(){return!0}}function oX(){return sd(new oZ)}function o0(e){return e instanceof oZ}class o1 extends rJ{__tag;static getType(){return"heading"}static clone(e){return new o1(e.__tag,e.__key)}constructor(e,t){super(t),this.__tag=e}getTag(){return this.__tag}setTag(e){let t=this.getWritable();return this.__tag=e,t}createDOM(e){let t=this.__tag,i=document.createElement(t),r=e.theme.heading;return void 0!==r&&aQ(i,r[t]),i}updateDOM(e,t,i){return e.__tag!==this.__tag}static importDOM(){return{h1:e=>({conversion:o4,priority:0}),h2:e=>({conversion:o4,priority:0}),h3:e=>({conversion:o4,priority:0}),h4:e=>({conversion:o4,priority:0}),h5:e=>({conversion:o4,priority:0}),h6:e=>({conversion:o4,priority:0}),p:e=>{let t=e.firstChild;return null!==t&&o2(t)?{conversion:()=>({node:null}),priority:3}:null},span:e=>o2(e)?{conversion:e=>({node:o3("h1")}),priority:3}:null}}exportDOM(e){let{element:t}=super.exportDOM(e);if(sy(t)){this.isEmpty()&&t.append(document.createElement("br"));let e=this.getFormatType();e&&(t.style.textAlign=e);let i=this.getDirection();i&&(t.dir=i)}return{element:t}}static importJSON(e){return o3(e.tag).updateFromJSON(e)}updateFromJSON(e){return super.updateFromJSON(e).setTag(e.tag)}exportJSON(){return{...super.exportJSON(),tag:this.getTag()}}insertNewAfter(e,t=!0){let i=e?e.anchor.offset:0,r=this.getLastDescendant(),n=r&&(!e||e.anchor.key!==r.getKey()||i!==r.getTextContentSize())&&e?o3(this.getTag()):nt(),s=this.getDirection();if(n.setDirection(s),this.insertAfter(n,t),0===i&&!this.isEmpty()&&e){let e=nt();e.select(),this.replace(e,!0)}return n}collapseAtStart(){let e=this.isEmpty()?nt():o3(this.getTag());return this.getChildren().forEach(t=>e.append(t)),this.replace(e),!0}extractWithChild(){return!0}}function o2(e){return"span"===e.nodeName.toLowerCase()&&"26pt"===e.style.fontSize}function o4(e){let t=e.nodeName.toLowerCase(),i=null;return"h1"!==t&&"h2"!==t&&"h3"!==t&&"h4"!==t&&"h5"!==t&&"h6"!==t||(i=o3(t),null!==e.style&&(sT(e,i),i.setFormat(e.style.textAlign))),{node:i}}function o5(e){let t=oX();return null!==e.style&&(t.setFormat(e.style.textAlign),sT(e,t)),{node:t}}function o3(e="h1"){return sd(new o1(e))}function o8(e){return e instanceof o1}function o9(e){let t=null;if(a2(e,DragEvent)?t=e.dataTransfer:a2(e,ClipboardEvent)&&(t=e.clipboardData),null===t)return[!1,[],!1];let i=t.types,r=i.includes("Files"),n=i.includes("text/html")||i.includes("text/plain");return[r,Array.from(t.files),n]}function o6(e){return r0(nM(e))}function o7(e){for(let t of["lowercase","uppercase","capitalize"])e.hasFormat(t)&&e.toggleFormat(t)}function le(e){return e}aw({conflictsWith:["@lexical/plain-text"],dependencies:[oG],name:"@lexical/rich-text",nodes:()=>[o1,oZ],register:function(e){return aS(e.registerCommand(e9,e=>{let t=ru();return!!i8(t)&&(t.clear(),!0)},nr),e.registerCommand(ti,e=>{let t=ru();return i5(t)?(t.deleteCharacter(e),!0):!!i8(t)&&(t.deleteNodes(),!0)},nr),e.registerCommand(tl,e=>{let t=ru();return!!i5(t)&&(t.deleteWord(e),!0)},nr),e.registerCommand(tc,e=>{let t=ru();return!!i5(t)&&(t.deleteLine(e),!0)},nr),e.registerCommand(ts,t=>{let i=ru();if("string"==typeof t)null!==i&&i.insertText(t);else{if(null===i)return!1;let r=t.dataTransfer;if(null!=r)a9(r,i,e);else if(i5(i)){let e=t.data;return e&&i.insertText(e),!0}}return!0},nr),e.registerCommand(to,()=>{let e=ru();return!!i5(e)&&(e.removeText(),!0)},nr),e.registerCommand(td,e=>{let t=ru();return!!i5(t)&&(t.formatText(e),!0)},nr),e.registerCommand(tT,e=>{let t=ru();if(!i5(t)&&!i8(t))return!1;for(let i of t.getNodes()){let t=sL(i,e=>rK(e)&&!e.isInline());null!==t&&t.setFormat(e)}return!0},nr),e.registerCommand(tr,e=>{let t=ru();return!!i5(t)&&(t.insertLineBreak(e),!0)},nr),e.registerCommand(tn,()=>{let e=ru();return!!i5(e)&&(e.insertParagraph(),!0)},nr),e.registerCommand(tQ,()=>{let e=iK(),t=ru();return i5(t)&&(e.setFormat(t.format),e.setStyle(t.style)),rE([e]),!0},nr),e.registerCommand(tx,()=>a4(e=>{let t=e.getIndent();e.setIndent(t+1)}),nr),e.registerCommand(tS,()=>a4(e=>{let t=e.getIndent();t>0&&e.setIndent(Math.max(0,t-1))}),nr),e.registerCommand(ty,e=>{let t=ru();if(i8(t)){let i=t.getNodes();if(i.length>0)return e.preventDefault(),i[0].selectPrevious(),!0}else if(i5(t)){let i=n9(t.focus,!0);if(!e.shiftKey&&r0(i)&&!i.isIsolated()&&!i.isInline())return i.selectPrevious(),e.preventDefault(),!0}return!1},nr),e.registerCommand(tb,e=>{let t=ru();if(i8(t)){let i=t.getNodes();if(i.length>0)return e.preventDefault(),i[0].selectNext(0,0),!0}else if(i5(t)){if(function(e){let t=e.focus;return"root"===t.key&&t.offset===nP().getChildrenSize()}(t))return e.preventDefault(),!0;let i=n9(t.focus,!1);if(!e.shiftKey&&r0(i)&&!i.isIsolated()&&!i.isInline())return i.selectNext(),e.preventDefault(),!0}return!1},nr),e.registerCommand(tg,e=>{let t=ru();if(i8(t)){let i=t.getNodes();if(i.length>0)return e.preventDefault(),aR(i[0])?i[0].selectNext(0,0):i[0].selectPrevious(),!0}if(!i5(t))return!1;if(aU(t,!0)){let i=e.shiftKey;return e.preventDefault(),aj(t,i,!0),!0}return!1},nr),e.registerCommand(tp,e=>{let t=ru();if(i8(t)){let i=t.getNodes();if(i.length>0)return e.preventDefault(),aR(i[0])?i[0].selectPrevious():i[0].selectNext(0,0),!0}if(!i5(t))return!1;let i=e.shiftKey;return!!aU(t,!1)&&(e.preventDefault(),aj(t,i,!1),!0)},nr),e.registerCommand(tw,t=>{if(o6(t.target))return!1;let i=ru();if(i5(i)){if(function(e){if(!e.isCollapsed())return!1;let{anchor:t}=e;if(0!==t.offset)return!1;let i=t.getNode();if(r2(i))return!1;let r=a1(i);return r.getIndent()>0&&(r.is(i)||i.is(r.getFirstDescendant()))}(i))return t.preventDefault(),e.dispatchCommand(tS,void 0)}else if(!i8(i))return!1;return t.preventDefault(),e.dispatchCommand(ti,!0)},nr),e.registerCommand(tv,t=>{if(o6(t.target))return!1;let i=ru();return!(!i5(i)&&!i8(i))&&(t.preventDefault(),e.dispatchCommand(ti,!1))},nr),e.registerCommand(tE,t=>{let i=ru();return!!i5(i)&&((o7(i),null!==t&&(t.preventDefault(),t.shiftKey))?e.dispatchCommand(tr,!1):e.dispatchCommand(tn,void 0))},nr),e.registerCommand(tI,()=>!!i5(ru())&&(e.blur(),!0),nr),e.registerCommand(tk,t=>{let[,i]=o9(t);if(i.length>0){let r=oY(t.clientX,t.clientY);if(null!==r){let{offset:t,node:n}=r,s=nM(n);if(null!==s){let e=rl();if(iY(s))e.anchor.set(s.getKey(),t,"text"),e.focus.set(s.getKey(),t,"text");else{let t=s.getParentOrThrow().getKey(),i=s.getIndexWithinParent()+1;e.anchor.set(t,i,"element"),e.focus.set(t,i,"element")}nj(ew(e))}e.dispatchCommand(oK,i)}return t.preventDefault(),!0}return!!i5(ru())},nr),e.registerCommand(tN,e=>{let[t]=o9(e),i=ru();return!(t&&!i5(i))},nr),e.registerCommand(tD,e=>{let[t]=o9(e),i=ru();if(t&&!i5(i))return!1;let r=oY(e.clientX,e.clientY);return null!==r&&r0(nM(r.node))&&e.preventDefault(),!0},nr),e.registerCommand(tF,()=>(n4(),!0),nr),e.registerCommand(tR,t=>(or(e,a2(t,ClipboardEvent)?t:null),!0),nr),e.registerCommand(tL,t=>((async function(e,t){await or(t,a2(e,ClipboardEvent)?e:null),t.update(()=>{let e=ru();i5(e)?e.removeText():i8(e)&&e.getNodes().forEach(e=>e.remove())})})(t,e),!0),nr),e.registerCommand(ta,t=>{let[,i,r]=o9(t);return i.length>0&&!r?(e.dispatchCommand(oK,i),!0):!(sb(t.target)&&nm(t.target))&&null!==ru()&&(function(e,t){e.preventDefault(),t.update(()=>{let i=ru(),r=a2(e,InputEvent)||a2(e,KeyboardEvent)?null:e.clipboardData;null!=r&&null!==i&&a9(r,i,t)},{tag:iE})}(t,e),!0)},nr),e.registerCommand(tC,e=>{let t=ru();return i5(t)&&o7(t),!1},nr),e.registerCommand(tB,e=>{let t=ru();return i5(t)&&o7(t),!1},nr))}}),e.s(["$createHeadingNode",()=>o3,"$createQuoteNode",()=>oX,"$isHeadingNode",()=>o8,"$isQuoteNode",()=>o0,"HeadingNode",()=>o1,"QuoteNode",()=>oZ],549471),e.s(["createNode",()=>le],796468);var r=r;let lt=({context:e,currentDepth:t=0,data:i,depth:n,draft:s,fieldPromises:a,fields:o,findMany:l,flattenLocales:c,overrideAccess:d=!1,parentIsLocalized:u,populationPromises:h,req:A,showHiddenFields:p,siblingDoc:f})=>{(0,r.traverseFields)({collection:null,context:e,currentDepth:t,depth:n,doc:i,draft:s,fallbackLocale:A.fallbackLocale,fieldPromises:a,fields:o,findMany:l,flattenLocales:c,global:null,locale:A.locale,overrideAccess:d,parentIndexPath:"",parentIsLocalized:u,parentPath:"",parentSchemaPath:"",populationPromises:h,req:A,showHiddenFields:p,siblingDoc:f,triggerHooks:!1})};e.s(["recursivelyPopulateFieldsForGraphQL",0,lt],83611);var li=e.i(735412),lr=e.i(744237),ln=e.i(813449),ls=s;let la=async({id:e,data:t,field:i,locale:r,req:n,select:s,selectMode:a,siblingData:o,user:l})=>{if((0,ln.stripUnselectedFields)({field:i,select:s,selectMode:a,siblingDoc:o})){if((0,ls.fieldAffectsData)(i)&&void 0===o[i.name]&&void 0!==i.defaultValue)try{o[i.name]=await (0,lr.getDefaultValue)({defaultValue:i.defaultValue,locale:r,req:n,user:l,value:o[i.name]})}catch(e){n.payload.logger.error({err:e,msg:`Error calculating default value for field: ${i.name}`})}switch(i.type){case"array":{let c=o[i.name];if(Array.isArray(c)){let o=[],d=s?.[i.name];c.forEach(s=>{o.push(lo({id:e,data:t,fields:i.fields,locale:r,req:n,select:"object"==typeof d?d:void 0,selectMode:a,siblingData:s,user:l}))}),await Promise.all(o)}break}case"blocks":{let c=o[i.name];if(Array.isArray(c)){let o=[];c.forEach(c=>{let d=c.blockType,u=n.payload.blocks[d]??(i.blockReferences??i.blocks).find(e=>"string"!=typeof e&&e.slug===d),{blockSelect:h,blockSelectMode:A}=(0,li.getBlockSelect)({block:u,select:s?.[i.name],selectMode:a});u&&(c.blockType=d,o.push(lo({id:e,data:t,fields:u.fields,locale:r,req:n,select:"object"==typeof h?h:void 0,selectMode:A,siblingData:c,user:l})))}),await Promise.all(o)}break}case"collapsible":case"row":await lo({id:e,data:t,fields:i.fields,locale:r,req:n,select:s,selectMode:a,siblingData:o,user:l});break;case"group":if((0,ls.fieldAffectsData)(i)){"object"!=typeof o[i.name]&&(o[i.name]={});let c=o[i.name],d=s?.[i.name];await lo({id:e,data:t,fields:i.fields,locale:r,req:n,select:"object"==typeof d?d:void 0,selectMode:a,siblingData:c,user:l})}else await lo({id:e,data:t,fields:i.fields,locale:r,req:n,select:s,selectMode:a,siblingData:o,user:l});break;case"tab":{let c,d;(0,ls.tabHasName)(i)?("object"!=typeof o[i.name]&&(o[i.name]={}),c=o[i.name],"object"==typeof s?.[i.name]&&(d=s?.[i.name])):(c=o,d=s),await lo({id:e,data:t,fields:i.fields,locale:r,req:n,select:d,selectMode:a,siblingData:c,user:l});break}case"tabs":await lo({id:e,data:t,fields:i.tabs.map(e=>({...e,type:"tab"})),locale:r,req:n,select:s,selectMode:a,siblingData:o,user:l})}}},lo=async({id:e,data:t,fields:i,locale:r,req:n,select:s,selectMode:a,siblingData:o,user:l})=>{let c=[];i.forEach(i=>{c.push(la({id:e,data:t,field:i,locale:r,req:n,select:s,selectMode:a,siblingData:o,user:l}))}),await Promise.all(c)},ll=async({id:e,data:t,fields:i,locale:r,req:n,select:s,selectMode:a,user:o})=>(await lo({id:e,data:t,fields:i,locale:r,req:n,select:s,selectMode:a,siblingData:t,user:o}),t);var lc=ln,ld=e.i(951020),lu=e.i(743977),lh=li,lA=ln,lp=e.i(350261),lf=e.i(7651),lg=s;let lm=async(e,t)=>{let{relationTo:i}=t,r=Array.isArray(i)?i:[i],n={};return void 0!==e&&await Promise.all(r.map(async i=>{n[i]="function"==typeof e?await e({...t,relationTo:i}):e,!0===n[i]&&(n[i]={}),!1===n[i]&&(n[i]={id:{exists:!1}})})),n};function ly({collapsedPrefs:e,field:t,previousRow:i,row:r}){return i&&"collapsed"in i?i.collapsed??!1:void 0!==e?e.includes(r.id):t.admin.initCollapsed}let lb="default"in lu.default?lu.default.default:lu.default,lE=async e=>{let{id:t,addErrorPathToParent:i,anyParentLocalized:r=!1,blockData:n,clientFieldSchemaMap:s,collectionSlug:a,data:o,field:l,fieldSchemaMap:c,filter:d,forceFullValue:u=!1,fullData:h,includeSchema:A=!1,indexPath:p,mockRSCs:f,omitParents:g=!1,operation:m,parentPath:y,parentPermissions:b,parentSchemaPath:E,passesCondition:C,path:w,preferences:I,previousFormState:v,readOnly:B,renderAllFields:Q,renderFieldFn:x,req:S,schemaPath:k,select:T,selectMode:N,skipConditionChecks:D=!1,skipValidation:_=!1,state:R}=e;!e.clientFieldSchemaMap&&e.renderFieldFn&&console.warn("clientFieldSchemaMap is not passed to addFieldStatePromise - this will reduce performance");let L=!0,F={},M=v?.[w]?.lastRenderedPath;M&&(F.lastRenderedPath=M);let O=!Q&&!v?.[w];if(O&&(F.addedByServer=!0),!1===C&&(F.passesCondition=!1),A&&(F.fieldSchema=l),(0,lg.fieldAffectsData)(l)&&!(0,lg.fieldIsHiddenOrDisabled)(l)&&"tab"!==l.type){let p=!0===(L=!0===b?b:(0,lf.deepCopyObjectSimple)(b?.[l.name]))||(0,lf.deepCopyObjectSimple)(L?.read);if(!(p="function"!=typeof l?.access?.read||await l.access.read({id:t,blockData:n,data:h,req:S,siblingData:o})))return;let y="validate"in l?l.validate:void 0,E=!0;if("function"==typeof y&&!_&&C){let e;if("json"===l.type&&"string"==typeof o[l.name])try{JSON.parse(o[l.name])}catch(t){e=t}try{E=await y(o?.[l.name],{...l,id:t,blockData:n,collectionSlug:a,data:h,event:"onChange",jsonError:e,operation:m,preferences:I,previousValue:v?.[w]?.initialValue,req:S,siblingData:o})}catch(e){E=`Error validating field at path: ${w}`,S.payload.logger.error({err:e,msg:E})}}let M=e=>{"function"==typeof i&&i(e),F.errorPaths||(F.errorPaths=[]),F.errorPaths.includes(e)||(F.errorPaths.push(e),F.valid=!1)};switch("string"==typeof E&&(F.errorMessage=E,F.valid=!1,M(w)),l.type){case"array":{let i=Array.isArray(o[l.name])?o[l.name]:[],p=T?.[l.name],{promises:y,rows:b}=i.reduce((i,o,y)=>{let b=w+"."+y;if(o.id=o?.id||new lb().toHexString(),!g&&(!d||d(e))){let e=b+".id";R[e]={initialValue:o.id,value:o.id},A&&(R[e].fieldSchema=l.fields.find(e=>(0,lg.fieldIsID)(e)))}i.promises.push(lC({id:t,addErrorPathToParent:M,anyParentLocalized:l.localized||r,blockData:n,clientFieldSchemaMap:s,collectionSlug:a,data:o,fields:l.fields,fieldSchemaMap:c,filter:d,forceFullValue:u,fullData:h,includeSchema:A,mockRSCs:f,omitParents:g,operation:m,parentIndexPath:"",parentPassesCondition:C,parentPath:b,parentSchemaPath:k,permissions:!0===L?L:L?.fields||{},preferences:I,previousFormState:v,readOnly:B,renderAllFields:Q,renderFieldFn:x,req:S,select:"object"==typeof p?p:void 0,selectMode:N,skipConditionChecks:D,skipValidation:_,state:R})),i.rows||(i.rows=[]);let E=(v?.[w]?.rows||[]).find(e=>e.id===o.id),T={id:o.id,isLoading:!1};return E?.lastRenderedPath&&(T.lastRenderedPath=E.lastRenderedPath),E||(T.addedByServer=!0),ly({collapsedPrefs:I?.fields?.[w]?.collapsed,field:l,previousRow:E,row:o})&&(T.collapsed=!0),i.rows.push(T),i},{promises:[],rows:[]});await Promise.all(y),b&&(F.rows=b),null!==o[l.name]&&(F.value=u?i:i.length,F.initialValue=u?i:i.length,i.length>0&&(F.disableFormData=!0)),!g&&(!d||d(e))&&(R[w]=F);break}case"blocks":{let i=Array.isArray(o[l.name])?o[l.name]:[],n=null;l.filterOptions&&(F.blocksFilterOptions=(n=await (0,lp.validateBlocksFilterOptions)({id:t,data:h,filterOptions:l.filterOptions,req:S,siblingData:o,value:o[l.name]})).allowedBlockSlugs);let{promises:p,rowMetadata:y}=i.reduce((i,o,p)=>{let y=o.blockType,E=S.payload.blocks[y]??(l.blockReferences??l.blocks).find(e=>"string"!=typeof e&&e.slug===y);if(!E)throw Error(`Block with type "${o.blockType}" was found in block data, but no block with that type is defined in the config for field with schema path ${k}.`);let{blockSelect:U,blockSelectMode:P}=(0,lh.getBlockSelect)({block:E,select:T?.[l.name],selectMode:N}),$=w+"."+p;if(E){if(o.id=o?.id||new lb().toHexString(),!g&&(!d||d(e))){let e=$+".id";R[e]={initialValue:o.id,value:o.id},n?.invalidBlockSlugs?.length&&n.invalidBlockSlugs.includes(o.blockType)&&(R[e].errorMessage=S.t("validation:invalidBlock",{block:o.blockType}),R[e].valid=!1,M(e),F.errorPaths=F.errorPaths.filter(e=>e!==w)),A&&(R[e].fieldSchema=A?E.fields.find(e=>(0,lg.fieldIsID)(e)):void 0);let t=$+".blockType";R[t]={initialValue:o.blockType,value:o.blockType},O&&(R[t].addedByServer=O),A&&(R[t].fieldSchema=E.fields.find(e=>"name"in e&&"blockType"===e.name));let i=$+".blockName";R[i]={},o.blockName&&(R[i].initialValue=o.blockName,R[i].value=o.blockName),A&&(R[i].fieldSchema=E.fields.find(e=>"name"in e&&"blockName"===e.name))}i.promises.push(lC({id:t,addErrorPathToParent:M,anyParentLocalized:l.localized||r,blockData:o,clientFieldSchemaMap:s,collectionSlug:a,data:o,fields:E.fields,fieldSchemaMap:c,filter:d,forceFullValue:u,fullData:h,includeSchema:A,mockRSCs:f,omitParents:g,operation:m,parentIndexPath:"",parentPassesCondition:C,parentPath:$,parentSchemaPath:k+"."+E.slug,permissions:!0===L?L:b?.[l.name]?.blocks?.[E.slug]===!0||b?.[l.name]?.blocks?.[E.slug]?.fields||{},preferences:I,previousFormState:v,readOnly:B,renderAllFields:Q,renderFieldFn:x,req:S,select:"object"==typeof U?U:void 0,selectMode:P,skipConditionChecks:D,skipValidation:_,state:R}));let p=(v?.[w]?.rows||[]).find(e=>e.id===o.id),y={id:o.id,blockType:o.blockType,isLoading:!1};p?.lastRenderedPath&&(y.lastRenderedPath=p.lastRenderedPath),i.rowMetadata.push(y),ly({collapsedPrefs:I?.fields?.[w]?.collapsed,field:l,previousRow:p,row:o})&&(i.rowMetadata[i.rowMetadata.length-1].collapsed=!0)}return i},{promises:[],rowMetadata:[]});await Promise.all(p),null===o[l.name]?(F.value=null,F.initialValue=null):(F.value=u?i:i.length,F.initialValue=u?i:i.length,i.length>0&&(F.disableFormData=!0)),F.rows=y,!g&&(!d||d(e))&&(R[w]=F);break}case"group":{(!d||d(e))&&(F.disableFormData=!0,R[w]=F);let i=T?.[l.name];await lC({id:t,addErrorPathToParent:M,anyParentLocalized:l.localized||r,blockData:n,clientFieldSchemaMap:s,collectionSlug:a,data:o?.[l.name]||{},fields:l.fields,fieldSchemaMap:c,filter:d,forceFullValue:u,fullData:h,includeSchema:A,mockRSCs:f,omitParents:g,operation:m,parentIndexPath:"",parentPassesCondition:C,parentPath:w,parentSchemaPath:k,permissions:"boolean"==typeof L?L:L?.fields,preferences:I,previousFormState:v,readOnly:B,renderAllFields:Q,renderFieldFn:x,req:S,select:"object"==typeof i?i:void 0,selectMode:N,skipConditionChecks:D,skipValidation:_,state:R});break}case"relationship":case"upload":if(l.filterOptions&&("object"==typeof l.filterOptions&&("string"==typeof l.relationTo?F.filterOptions={[l.relationTo]:l.filterOptions}:F.filterOptions=l.relationTo.reduce((e,t)=>(e[t]=l.filterOptions,e),{})),"function"==typeof l.filterOptions&&(F.filterOptions=await lm(l.filterOptions,{id:t,blockData:n,data:h,relationTo:l.relationTo,req:S,siblingData:o,user:S.user}))),l.hasMany){let e=Array.isArray(o[l.name])?o[l.name].map(e=>Array.isArray(l.relationTo)?{relationTo:e.relationTo,value:e.value&&"object"==typeof e.value?e.value?.id:e.value}:"object"==typeof e&&null!==e?e.id:e):void 0;F.value=e,F.initialValue=e}else if(Array.isArray(l.relationTo)){if(o[l.name]&&"object"==typeof o[l.name]&&"relationTo"in o[l.name]&&"value"in o[l.name]){let e="object"==typeof o[l.name]?.value&&o[l.name]?.value&&"id"in o[l.name].value?o[l.name].value.id:o[l.name].value,t={relationTo:o[l.name]?.relationTo,value:e};F.value=t,F.initialValue=t}}else{let e=o[l.name]&&"object"==typeof o[l.name]&&"id"in o[l.name]?o[l.name].id:o[l.name];F.value=e,F.initialValue=e}(!d||d(e))&&(R[w]=F);break;case"select":"function"==typeof l.filterOptions&&(F.selectFilterOptions=l.filterOptions({data:h,options:l.options,req:S,siblingData:o})),void 0!==o[l.name]&&(F.value=o[l.name],F.initialValue=o[l.name]),(!d||d(e))&&(R[w]=F);break;default:void 0!==o[l.name]&&(F.value=o[l.name],F.initialValue=o[l.name]),(!d||d(e))&&(R[w]=F)}}else if((0,lg.fieldHasSubFields)(l)&&!(0,lg.fieldAffectsData)(l))(!d||d(e))&&(R[w]={disableFormData:!0},!1===C&&(R[w].passesCondition=!1)),await lC({id:t,mockRSCs:f,select:T,selectMode:N,addErrorPathToParent:i,anyParentLocalized:(0,lg.fieldIsLocalized)(l)||r,blockData:n,clientFieldSchemaMap:s,collectionSlug:a,data:o,fields:l.fields,fieldSchemaMap:c,filter:d,forceFullValue:u,fullData:h,includeSchema:A,omitParents:g,operation:m,parentIndexPath:p,parentPassesCondition:C,parentPath:w,parentSchemaPath:k,permissions:b,preferences:I,previousFormState:v,readOnly:B,renderAllFields:Q,renderFieldFn:x,req:S,skipConditionChecks:D,skipValidation:_,state:R});else if("tab"===l.type){let e,y,E=(0,lg.tabHasName)(l),L={...l,type:"tab"};if(E){if(!(0,lA.stripUnselectedFields)({field:L,select:T,selectMode:N,siblingDoc:o?.[l.name]||{}}))return;if(!0===b)y=!0;else{let e=b?.[l.name];y=!0===e||e?.fields}"object"==typeof T?.[l.name]&&(e=T?.[l.name])}else y=b,e=T;let F=w?w.split("."):[],M=C;return C&&"function"==typeof l.admin?.condition&&(M=l.admin.condition(h,o,{blockData:n,operation:m,path:F,user:S.user})),l?.id&&(R[l.id]={passesCondition:M}),lC({id:t,addErrorPathToParent:i,anyParentLocalized:l.localized||r,blockData:n,clientFieldSchemaMap:s,collectionSlug:a,data:E?o?.[l.name]||{}:o,fields:l.fields,fieldSchemaMap:c,filter:d,forceFullValue:u,fullData:h,includeSchema:A,mockRSCs:f,omitParents:g,operation:m,parentIndexPath:p,parentPassesCondition:M,parentPath:w,parentSchemaPath:k,permissions:y,preferences:I,previousFormState:v,readOnly:B,renderAllFields:Q,renderFieldFn:x,req:S,select:e,selectMode:N,skipConditionChecks:D,skipValidation:_,state:R})}else{if("tabs"===l.type)return lC({id:t,addErrorPathToParent:i,anyParentLocalized:(0,lg.fieldIsLocalized)(l)||r,blockData:n,clientFieldSchemaMap:s,collectionSlug:a,data:o,fields:l.tabs.map(e=>({...e,type:"tab"})),fieldSchemaMap:c,filter:d,forceFullValue:u,fullData:h,includeSchema:A,omitParents:g,operation:m,parentIndexPath:p,parentPassesCondition:C,parentPath:w,parentSchemaPath:k,permissions:b,preferences:I,previousFormState:v,renderAllFields:Q,renderFieldFn:x,req:S,select:T,selectMode:N,skipConditionChecks:D,skipValidation:_,state:R});"ui"===l.type&&(!d||d(e))&&(R[w]=F,R[w].disableFormData=!0)}if(x&&!(0,lg.fieldIsHiddenOrDisabled)(l)){let e=c.get(k);if(!e&&!f)if(k.endsWith(".blockType"))return;else throw Error(`Field config not found for ${k}`);if(!R[w])return;O&&(R[w].addedByServer=O),x({id:t,clientFieldSchemaMap:s,collectionSlug:a,data:h,fieldConfig:e,fieldSchemaMap:c,fieldState:R[w],formState:R,indexPath:p,lastRenderedPath:M,mockRSCs:f,operation:m,parentPath:y,parentSchemaPath:E,path:w,permissions:L,preferences:I,previousFieldState:v?.[w],readOnly:B,renderAllFields:Q,req:S,schemaPath:k,siblingData:o})}},lC=async({id:e,addErrorPathToParent:t,anyParentLocalized:i=!1,blockData:r,clientFieldSchemaMap:n,collectionSlug:s,data:a,fields:o,fieldSchemaMap:l,filter:c,forceFullValue:d=!1,fullData:u,includeSchema:h=!1,mockRSCs:A,omitParents:p=!1,operation:f,parentIndexPath:g,parentPassesCondition:m=!0,parentPath:y,parentSchemaPath:b,permissions:E,preferences:C,previousFormState:w,readOnly:I,renderAllFields:v,renderFieldFn:B,req:Q,select:x,selectMode:S,skipConditionChecks:k=!1,skipValidation:T=!1,state:N={}})=>{let D=[];o.forEach((o,_)=>{let R=!0,{indexPath:L,path:F,schemaPath:M}=(0,ld.getFieldPaths)({field:o,index:_,parentIndexPath:g,parentPath:y,parentSchemaPath:b});if("id"!==F&&!(0,lc.stripUnselectedFields)({field:o,select:x,selectMode:S,siblingDoc:a}))return;let O=F?F.split("."):[];if(!k)try{R=!!((!o?.admin?.condition||o.admin.condition(u||{},a||{},{blockData:r,operation:f,path:O,user:Q.user}))&&m)}catch(e){R=!1,Q.payload.logger.error({err:e,msg:`Error evaluating field condition at path: ${F}`})}D.push(lE({id:e,addErrorPathToParent:t,anyParentLocalized:i,blockData:r,clientFieldSchemaMap:n,collectionSlug:s,data:a,field:o,fieldIndex:_,fieldSchemaMap:l,filter:c,forceFullValue:d,fullData:u,includeSchema:h,indexPath:L,mockRSCs:A,omitParents:p,operation:f,parentIndexPath:g,parentPath:y,parentPermissions:E,parentSchemaPath:b,passesCondition:R,path:F,preferences:C,previousFormState:w,readOnly:I,renderAllFields:v,renderFieldFn:B,req:Q,schemaPath:M,select:x,selectMode:S,skipConditionChecks:k,skipValidation:T,state:N}))}),await Promise.all(D)},lw=async({id:e,clientFieldSchemaMap:t,collectionSlug:i,data:r={},documentData:n,fields:s,fieldSchemaMap:a,initialBlockData:o,mockRSCs:l,operation:c,permissions:d,preferences:u,previousFormState:h,readOnly:A,renderAllFields:p,renderFieldFn:f,req:g,schemaPath:m,select:y,selectMode:b,skipValidation:E})=>{if(!t&&f&&console.warn("clientFieldSchemaMap is not passed to fieldSchemasToFormState - this will reduce performance"),s&&s.length){let C={},w={...r};await ll({id:e,data:w,fields:s,locale:g.locale,req:g,select:y,selectMode:b,siblingData:w,user:g.user});let I=w;return n&&(I=n),await lC({id:e,addErrorPathToParent:null,blockData:o,clientFieldSchemaMap:t,collectionSlug:i,data:w,fields:s,fieldSchemaMap:a,fullData:I,mockRSCs:l,operation:c,parentIndexPath:"",parentPassesCondition:!0,parentPath:"",parentSchemaPath:m,permissions:d,preferences:u,previousFormState:h,readOnly:A,renderAllFields:p,renderFieldFn:f,req:g,select:y,selectMode:b,skipValidation:E,state:C}),C}return{}};function lI(e,...t){let i=new URL("https://lexical.dev/docs/error"),r=new URLSearchParams;for(let i of(r.append("code",e),t))r.append("v",i);throw i.search=r.toString(),Error(`Minified Lexical error #${e}; visit ${i.toString()} for the full message or use the non-minified dev environment for full errors and additional helpful warnings.`)}function lv(e){let t=1,i=e.getParent();for(;null!=i;){if(lH(i)){let e=i.getParent();if(lJ(e)){t++,i=e.getParent();continue}lI(40)}break}return t}function lB(e){let t=e.getParent();lJ(t)||lI(40);let i=t;for(;null!==i;)lJ(i=i.getParent())&&(t=i);return t}function lQ(e){let t=[],i=e.getChildren().filter(lH);for(let e=0;e<i.length;e++){let r=i[e],n=r.getFirstChild();lJ(n)?t=t.concat(lQ(n)):t.push(r)}return t}function lx(e){return lH(e)&&lJ(e.getFirstChild())}function lS(e){return lj().append(e)}function lk(e,t){return lH(e)&&(0===t.length||1===t.length&&e.is(t[0])&&0===e.getChildrenSize())}function lT(e){let t=ru();if(null!==t){let i=t.getNodes();if(i5(t)){let r=t.getStartEndPoints();null===r&&lI(143);let[n]=r,s=n.getNode(),a=s.getParent();if(sl(s)){let e=s.getFirstChild();if(e)i=e.selectStart().getNodes();else{let e=nt();s.append(e),i=e.select().getNodes()}}else if(lk(s,i)){let t=lW(e);if(sl(a)){s.replace(t);let e=lj();rK(s)&&(e.setFormat(s.getFormatType()),e.setIndent(s.getIndent())),t.append(e)}else if(lH(s)){let e=s.getParentOrThrow();lN(t,e.getChildren()),e.replace(t)}return}}let r=new Set;for(let t=0;t<i.length;t++){let n=i[t];if(rK(n)&&n.isEmpty()&&!lH(n)&&!r.has(n.getKey())){lD(n,e);continue}let s=nS(n)?n.getParent():lH(n)&&n.isEmpty()?n:null;for(;null!=s;){let t=s.getKey();if(lJ(s)){if(!r.has(t)){let i=lW(e);lN(i,s.getChildren()),s.replace(i),r.add(t)}break}{let i=s.getParent();if(sl(i)&&!r.has(t)){r.add(t),lD(s,e);break}s=i}}}}}function lN(e,t){e.splice(e.getChildrenSize(),0,t)}function lD(e,t){let i;if(lJ(e))return e;let r=e.getPreviousSibling(),n=e.getNextSibling(),s=lj();if(lN(s,e.getChildren()),lJ(r)&&t===r.getListType())r.append(s),lJ(n)&&t===n.getListType()&&(lN(r,n.getChildren()),n.remove()),i=r;else if(lJ(n)&&t===n.getListType())n.getFirstChildOrThrow().insertBefore(s),i=n;else{let r=lW(t);r.append(s),e.replace(r),i=r}s.setFormat(e.getFormatType()),s.setIndent(e.getIndent());let a=ru();return i5(a)&&(i.getKey()===a.anchor.key&&a.anchor.set(s.getKey(),a.anchor.offset,"element"),i.getKey()===a.focus.key&&a.focus.set(s.getKey(),a.focus.offset,"element")),e.remove(),i}function l_(e,t){let i=e.getLastChild(),r=t.getFirstChild();i&&r&&lx(i)&&lx(r)&&(l_(i.getFirstChild(),r.getFirstChild()),r.remove());let n=t.getChildren();n.length>0&&e.append(...n),t.remove()}function lR(){let e=ru();if(i5(e)){let t=new Set,i=e.getNodes(),r=e.anchor.getNode();if(lk(r,i))t.add(lB(r));else for(let e=0;e<i.length;e++){let r=i[e];if(nS(r)){let e=a0(r,lU);null!=e&&t.add(lB(e))}}for(let i of t){let t=i;for(let r of lQ(i)){let i=nt().setTextStyle(e.style).setTextFormat(e.format);lN(i,r.getChildren()),t.insertAfter(i),t=i,r.__key===e.anchor.key&&as(e.anchor,aA(s0(i,"next"))),r.__key===e.focus.key&&as(e.focus,aA(s0(i,"next"))),r.remove()}i.remove()}}}function lL(e){let t="check"!==e.getListType(),i=e.getStart();for(let r of e.getChildren())lH(r)&&(r.getValue()!==i&&r.setValue(i),t&&null!=r.getLatest().__checked&&r.setChecked(void 0),lJ(r.getFirstChild())||i++)}function lF(e){let t=new Set;if(lx(e)||t.has(e.getKey()))return;let i=e.getParent(),r=e.getNextSibling(),n=e.getPreviousSibling();if(lx(r)&&lx(n)){let i=n.getFirstChild();if(lJ(i)){i.append(e);let n=r.getFirstChild();lJ(n)&&(lN(i,n.getChildren()),r.remove(),t.add(r.getKey()))}}else if(lx(r)){let t=r.getFirstChild();if(lJ(t)){let i=t.getFirstChild();null!==i&&i.insertBefore(e)}}else if(lx(n)){let t=n.getFirstChild();lJ(t)&&t.append(e)}else if(lJ(i)){let t=lj().setTextFormat(e.getTextFormat()).setTextStyle(e.getTextStyle()),s=lW(i.getListType()).setTextFormat(i.getTextFormat()).setTextStyle(i.getTextStyle());t.append(s),s.append(e),n?n.insertAfter(t):r?r.insertBefore(t):i.append(t)}}function lM(e){if(lx(e))return;let t=e.getParent(),i=t?t.getParent():void 0;if(lJ(i?i.getParent():void 0)&&lH(i)&&lJ(t)){let r=t?t.getFirstChild():void 0,n=t?t.getLastChild():void 0;if(e.is(r))i.insertBefore(e),t.isEmpty()&&i.remove();else if(e.is(n))i.insertAfter(e),t.isEmpty()&&i.remove();else{let r=t.getListType(),n=lj(),s=lW(r);n.append(s),e.getPreviousSiblings().forEach(e=>s.append(e));let a=lj(),o=lW(r);a.append(o),lN(o,e.getNextSiblings()),i.insertBefore(n),i.insertAfter(a),i.replace(e)}}}function lO(e=!1){let t,i=ru();if(!i5(i)||!i.isCollapsed())return!1;let r=i.anchor.getNode(),n=null;if(lH(r)&&0===r.getChildrenSize())n=r;else if(iY(r)){let e=r.getParent();lH(e)&&e.getChildren().every(e=>iY(e)&&""===e.getTextContent().trim())&&(n=e)}if(null===n)return!1;let s=lB(n),a=n.getParent();lJ(a)||lI(40);let o=a.getParent();if(sl(o))t=nt(),s.insertAfter(t);else{if(!lH(o))return!1;t=lj(),o.insertAfter(t)}t.setTextStyle(i.style).setTextFormat(i.format).select();let l=n.getNextSiblings();if(l.length>0){let i=e?function(e,t){return e.getStart()+t.getIndexWithinParent()}(a,n):1,r=lW(a.getListType(),i);if(lH(t)){let e=lj();e.append(r),t.insertAfter(e)}else t.insertAfter(r);r.append(...l)}return function(e){let t=e;for(;null==t.getNextSibling()&&null==t.getPreviousSibling();){let e=t.getParent();if(null==e||!lH(e)&&!lJ(e))break;t=e}t.remove()}(n),!0}e.s(["fieldSchemasToFormState",0,lw],108381);class lU extends rJ{__value;__checked;$config(){return this.config("listitem",{$transform:e=>{if(null==e.__checked)return;let t=e.getParent();lJ(t)&&"check"!==t.getListType()&&null!=e.getChecked()&&e.setChecked(void 0)},extends:rJ,importDOM:ip({li:()=>({conversion:lP,priority:0})})})}constructor(e=1,t,i){super(i),this.__value=void 0===e?1:e,this.__checked=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__value=e.__value,this.__checked=e.__checked}createDOM(e){let t=document.createElement("li");return this.updateListItemDOM(null,t,e),t}updateListItemDOM(e,t,i){!function(e,t,i){let r=t.getParent();!lJ(r)||"check"!==r.getListType()||lJ(t.getFirstChild())?(e.removeAttribute("role"),e.removeAttribute("tabIndex"),e.removeAttribute("aria-checked")):(e.setAttribute("role","checkbox"),e.setAttribute("tabIndex","-1"),i&&t.__checked===i.__checked||e.setAttribute("aria-checked",t.getChecked()?"true":"false"))}(t,this,e),t.value=this.__value,function(e,t,i){let r,n=[],s=[],a=t.list,o=a?a.listitem:void 0;if(a&&a.nested&&(r=a.nested.listitem),void 0!==o&&n.push(...aB(o)),a){let e=i.getParent(),t=lJ(e)&&"check"===e.getListType(),r=i.getChecked();t&&!r||s.push(a.listitemUnchecked),t&&r||s.push(a.listitemChecked),t&&n.push(r?a.listitemChecked:a.listitemUnchecked)}if(void 0!==r){let e=aB(r);i.getChildren().some(e=>lJ(e))?n.push(...e):s.push(...e)}s.length>0&&ax(e,...s),n.length>0&&aQ(e,...n)}(t,i.theme,this);let r=e?e.__style:"",n=this.__style;r!==n&&(""===n?t.removeAttribute("style"):t.style.cssText=n),function(e,t,i){let r=aN(t.__textStyle);for(let t in r)e.style.setProperty(`--listitem-marker-${t}`,r[t]);if(i)for(let t in aN(i.__textStyle))t in r||e.style.removeProperty(`--listitem-marker-${t}`)}(t,this,e)}updateDOM(e,t,i){let r=t;return this.updateListItemDOM(e,r,i),!1}updateFromJSON(e){return super.updateFromJSON(e).setValue(e.value).setChecked(e.checked)}exportDOM(e){let t=this.createDOM(e._config),i=this.getFormatType();i&&(t.style.textAlign=i);let r=this.getDirection();return r&&(t.dir=r),{element:t}}exportJSON(){return{...super.exportJSON(),checked:this.getChecked(),value:this.getValue()}}append(...e){for(let t=0;t<e.length;t++){let i=e[t];if(rK(i)&&this.canMergeWith(i)){let e=i.getChildren();this.append(...e),i.remove()}else super.append(i)}return this}replace(e,t){if(lH(e))return super.replace(e);this.setIndent(0);let i=this.getParentOrThrow();if(!lJ(i))return e;if(i.__first===this.getKey())i.insertBefore(e);else if(i.__last===this.getKey())i.insertAfter(e);else{let t=lW(i.getListType()),r=this.getNextSibling();for(;r;){let e=r;r=r.getNextSibling(),t.append(e)}i.insertAfter(e),e.insertAfter(t)}return t&&(rK(e)||lI(139),this.getChildren().forEach(t=>{e.append(t)})),this.remove(),0===i.getChildrenSize()&&i.remove(),e}insertAfter(e,t=!0){let i=this.getParentOrThrow();if(lJ(i)||lI(39),lH(e))return super.insertAfter(e,t);let r=this.getNextSiblings();if(i.insertAfter(e,t),0!==r.length){let n=lW(i.getListType());r.forEach(e=>n.append(e)),e.insertAfter(n,t)}return e}remove(e){let t=this.getPreviousSibling(),i=this.getNextSibling();super.remove(e),t&&i&&lx(t)&&lx(i)&&(l_(t.getFirstChild(),i.getFirstChild()),i.remove())}insertNewAfter(e,t=!0){let i=lj().updateFromJSON(this.exportJSON()).setChecked(!this.getChecked()&&void 0);return this.insertAfter(i,t),i}collapseAtStart(e){let t=nt();this.getChildren().forEach(e=>t.append(e));let i=this.getParentOrThrow(),r=i.getParentOrThrow(),n=lH(r);if(1===i.getChildrenSize())if(n)i.remove(),r.select();else{i.insertBefore(t),i.remove();let r=e.anchor,n=e.focus,s=t.getKey();"element"===r.type&&r.getNode().is(this)&&r.set(s,r.offset,"element"),"element"===n.type&&n.getNode().is(this)&&n.set(s,n.offset,"element")}else i.insertBefore(t),this.remove();return!0}getValue(){return this.getLatest().__value}setValue(e){let t=this.getWritable();return t.__value=e,t}getChecked(){let e,t=this.getLatest(),i=this.getParent();return lJ(i)&&(e=i.getListType()),"check"===e?!!t.__checked:void 0}setChecked(e){let t=this.getWritable();return t.__checked=e,t}toggleChecked(){let e=this.getWritable();return e.setChecked(!e.__checked)}getIndent(){let e=this.getParent();if(null===e||!this.isAttached())return this.getLatest().__indent;let t=e.getParentOrThrow(),i=0;for(;lH(t);)t=t.getParentOrThrow().getParentOrThrow(),i++;return i}setIndent(e){"number"!=typeof e&&lI(117),(e=Math.floor(e))>=0||lI(199);let t=this.getIndent();for(;t!==e;)t<e?(lF(this),t++):(lM(this),t--);return this}canInsertAfter(e){return lH(e)}canReplaceWith(e){return lH(e)}canMergeWith(e){return lH(e)||ni(e)}extractWithChild(e,t){if(!i5(t))return!1;let i=t.anchor.getNode(),r=t.focus.getNode();return this.isParentOf(i)&&this.isParentOf(r)&&this.getTextContent().length===t.getTextContent().length}isParentRequired(){return!0}createParentElementNode(){return lW("bullet")}canMergeWhenEmpty(){return!0}}function lP(e){if(e.classList.contains("task-list-item")){for(let t of e.children)if("INPUT"===t.tagName)return l$(t)}if(e.classList.contains("joplin-checkbox")){for(let t of e.children)if(t.classList.contains("checkbox-wrapper")&&t.children.length>0&&"INPUT"===t.children[0].tagName)return l$(t.children[0])}let t=e.getAttribute("aria-checked");return{node:lj("true"===t||"false"!==t&&void 0)}}function l$(e){return"checkbox"!==e.getAttribute("type")?{node:null}:{node:lj(e.hasAttribute("checked"))}}function lj(e){return sd(new lU(void 0,e))}function lH(e){return e instanceof lU}class lq extends rJ{__tag;__start;__listType;$config(){return this.config("list",{$transform:e=>{!function(e){let t=e.getNextSibling();lJ(t)&&e.getListType()===t.getListType()&&l_(e,t)}(e),lL(e)},extends:rJ,importDOM:ip({ol:()=>({conversion:lG,priority:0}),ul:()=>({conversion:lG,priority:0})})})}constructor(e="number",t=1,i){super(i);const r=lY[e]||e;this.__listType=r,this.__tag="number"===r?"ol":"ul",this.__start=t}afterCloneFrom(e){super.afterCloneFrom(e),this.__listType=e.__listType,this.__tag=e.__tag,this.__start=e.__start}getTag(){return this.getLatest().__tag}setListType(e){let t=this.getWritable();return t.__listType=e,t.__tag="number"===e?"ol":"ul",t}getListType(){return this.getLatest().__listType}getStart(){return this.getLatest().__start}setStart(e){let t=this.getWritable();return t.__start=e,t}createDOM(e,t){let i=this.__tag,r=document.createElement(i);return 1!==this.__start&&r.setAttribute("start",String(this.__start)),r.__lexicalListType=this.__listType,lz(r,e.theme,this),r}updateDOM(e,t,i){return e.__tag!==this.__tag||e.__listType!==this.__listType||(lz(t,i.theme,this),e.__start!==this.__start&&t.setAttribute("start",String(this.__start)),!1)}updateFromJSON(e){return super.updateFromJSON(e).setListType(e.listType).setStart(e.start)}exportDOM(e){let t=this.createDOM(e._config,e);return sy(t)&&(1!==this.__start&&t.setAttribute("start",String(this.__start)),"check"===this.__listType&&t.setAttribute("__lexicalListType","check")),{element:t}}exportJSON(){return{...super.exportJSON(),listType:this.getListType(),start:this.getStart(),tag:this.getTag()}}canBeEmpty(){return!1}canIndent(){return!1}splice(e,t,i){let r=i;for(let e=0;e<i.length;e++){let t=i[e];lH(t)||(r===i&&(r=[...i]),r[e]=lj().append(!rK(t)||lJ(t)||t.isInline()?t:iG(t.getTextContent())))}return super.splice(e,t,r)}extractWithChild(e){return lH(e)}}function lz(e,t,i){let r=[],n=[],s=t.list;if(void 0!==s){let e,t=s[`${i.__tag}Depth`]||[],a=lv(i)-1,o=a%t.length,l=t[o],c=s[i.__tag],d=s.nested,u=s.checklist;if(void 0!==d&&d.list&&(e=d.list),void 0!==c&&r.push(c),void 0!==u&&"check"===i.__listType&&r.push(u),void 0!==l){r.push(...aB(l));for(let e=0;e<t.length;e++)e!==o&&n.push(i.__tag+e)}if(void 0!==e){let t=aB(e);a>1?r.push(...t):n.push(...t)}}n.length>0&&ax(e,...n),r.length>0&&aQ(e,...r)}function lV(e){let t=[];for(let i=0;i<e.length;i++){let r=e[i];if(lH(r)){t.push(r);let e=r.getChildren();e.length>1&&e.forEach(e=>{lJ(e)&&t.push(lS(e))})}else t.push(lS(r))}return t}function lG(e){let t=e.nodeName.toLowerCase(),i=null;return"ol"===t?i=lW("number",e.start):"ul"===t&&(i=!function(e){if("check"===e.getAttribute("__lexicallisttype")||e.classList.contains("contains-task-list")||"1"===e.getAttribute("data-is-checklist"))return!0;for(let t of e.childNodes)if(sy(t)&&t.hasAttribute("aria-checked"))return!0;return!1}(e)?lW("bullet"):lW("check")),{after:lV,node:i}}let lY={ol:"number",ul:"bullet"};function lW(e="number",t=1){return sd(new lq(e,t))}function lJ(e){return e instanceof lq}let lK=e5("INSERT_CHECK_LIST_COMMAND");function lZ(e,t){let i=t&&t.disableTakeFocusOnClick||!1,r=e=>{!function(e,t){lX(e,()=>{if(sy(e.target)){let i=e.target,r=nE(i);null!=r&&r.isEditable()&&r.update(()=>{let e=nM(i);lH(e)&&(t?(sr(iv),sr(iI)):i.focus(),e.toggleChecked())})}})}(e,i)},n=e=>{!function(e,t){lX(e,()=>{e.preventDefault(),t&&e.stopPropagation()})}(e,i)};return aS(e.registerCommand(lK,()=>(lT("check"),!0),nn),e.registerCommand(tb,t=>l1(t,e,!1),nn),e.registerCommand(ty,t=>l1(t,e,!0),nn),e.registerCommand(tI,()=>{if(null!=l0()){let t=e.getRootElement();return null!=t&&t.focus(),!0}return!1},nn),e.registerCommand(tC,t=>{let i=l0();return!(null==i||!e.isEditable())&&(e.update(()=>{let e=nM(i);lH(e)&&(t.preventDefault(),e.toggleChecked())}),!0)},nn),e.registerCommand(tg,t=>e.getEditorState().read(()=>{let i=ru();if(i5(i)&&i.isCollapsed()){let{anchor:r}=i,n="element"===r.type;if(n||0===r.offset){let i=r.getNode(),s=sL(i,e=>rK(e)&&!e.isInline());if(lH(s)){let r=s.getParent();if(lJ(r)&&"check"===r.getListType()&&(n||s.getFirstDescendant()===i)){let i=e.getElementByKey(s.__key);if(null!=i&&document.activeElement!==i)return i.focus(),t.preventDefault(),!0}}}}return!1}),nn),e.registerRootListener((e,t)=>{null!==e&&(e.addEventListener("click",r),e.addEventListener("pointerdown",n,{capture:!0}),e.addEventListener("mousedown",n,{capture:!0}),e.addEventListener("touchstart",n,{capture:!0,passive:!1})),null!==t&&(t.removeEventListener("click",r),t.removeEventListener("pointerdown",n,{capture:!0}),t.removeEventListener("mousedown",n,{capture:!0}),t.removeEventListener("touchstart",n,{capture:!0}))}))}function lX(e,t){let i=e.target;if(!sy(i))return;let r=i.firstChild;if(sy(r)&&("UL"===r.tagName||"OL"===r.tagName))return;let n=i.parentNode;if(!n||"check"!==n.__lexicalListType)return;let s=null,a=null;if("clientX"in e)s=e.clientX;else if("touches"in e){let t=e.touches;t.length>0&&(s=t[0].clientX,a="touch")}if(null==s)return;let o=i.getBoundingClientRect(),l=s/a3(i),c=parseFloat((window.getComputedStyle?window.getComputedStyle(i,"::before"):{width:"0px"}).width),d=32*("touch"===a||"touch"===e.pointerType);("rtl"===i.dir?l<o.right+d&&l>o.right-c-d:l>o.left-d&&l<o.left+c+d)&&t()}function l0(){let e=document.activeElement;return sy(e)&&"LI"===e.tagName&&null!=e.parentNode&&"check"===e.parentNode.__lexicalListType?e:null}function l1(e,t,i){let r=l0();return null!=r&&t.update(()=>{let n=nM(r);if(!lH(n))return;let s=function(e,t){let i=t?e.getPreviousSibling():e.getNextSibling(),r=e;for(;null==i&&lH(r);)null!=(r=r.getParentOrThrow().getParent())&&(i=t?r.getPreviousSibling():r.getNextSibling());for(;lH(i);){let e=t?i.getLastChild():i.getFirstChild();if(!lJ(e))return i;i=t?e.getLastChild():e.getFirstChild()}return null}(n,i);if(null!=s){s.selectStart();let i=t.getElementByKey(s.__key);null!=i&&(e.preventDefault(),setTimeout(()=>{i.focus()},0))}}),!1}let l2=e5("UPDATE_LIST_START_COMMAND"),l4=e5("INSERT_UNORDERED_LIST_COMMAND"),l5=e5("INSERT_ORDERED_LIST_COMMAND"),l3=e5("REMOVE_LIST_COMMAND");function l8(e,t){return aS(e.registerCommand(l5,()=>(lT("number"),!0),nn),e.registerCommand(l2,e=>{let{listNodeKey:t,newStart:i}=e,r=nR(t);return!!lJ(r)&&("number"===r.getListType()&&(r.setStart(i),lL(r)),!0)},nn),e.registerCommand(l4,()=>(lT("bullet"),!0),nn),e.registerCommand(l3,()=>(lR(),!0),nn),e.registerCommand(tn,()=>lO(!!(t&&t.restoreNumbering)),nn),e.registerNodeTransform(lU,e=>{let t=e.getFirstChild();if(t){if(iY(t)){let i=t.getStyle(),r=t.getFormat();e.getTextStyle()!==i&&e.setTextStyle(i),e.getTextFormat()!==r&&e.setTextFormat(r)}}else{let t=ru();i5(t)&&(t.style!==e.getTextStyle()||t.format!==e.getTextFormat())&&t.isCollapsed()&&e.is(t.anchor.getNode())&&e.setTextStyle(t.style).setTextFormat(t.format)}}),e.registerNodeTransform(iO,e=>{let t=e.getParent();if(lH(t)&&e.is(t.getFirstChild())){let i=e.getStyle(),r=e.getFormat();i===t.getTextStyle()&&r===t.getTextFormat()||t.setTextStyle(i).setTextFormat(r)}}))}function l9(e){let t=e=>{let t=e.getParent();if(lJ(e.getFirstChild())||!lJ(t))return;let i=sL(e,e=>lH(e)&&lJ(e.getParent())&&lH(e.getPreviousSibling()));if(null===i&&e.getIndent()>0)e.setIndent(0);else if(lH(i)){let r=i.getPreviousSibling();if(lH(r)){let i=(function(e){let t=e,i=t.getFirstChild();for(;lJ(i);){let e=i.getLastChild();if(!lH(e))break;i=(t=e).getFirstChild()}return t})(r).getParent();if(lJ(i)){let r=lv(i);r+1<lv(t)&&e.setIndent(r)}}}};return e.registerNodeTransform(lq,e=>{let i=[e];for(;i.length>0;){let e=i.shift();if(lJ(e)){for(let r of e.getChildren())if(lH(r)){t(r);let e=r.getFirstChild();lJ(e)&&i.push(e)}}}})}let l6=aw({build:(e,t,i)=>oS(t),config:aI({hasStrictIndent:!1,shouldPreserveNumbering:!1}),name:"@lexical/list/List",nodes:()=>[lq,lU],register(e,t,i){let r=i.getOutput();return aS(ox(()=>l8(e,{restoreNumbering:r.shouldPreserveNumbering.value})),ox(()=>r.hasStrictIndent.value?l9(e):void 0))}});aw({config:aI({disableTakeFocusOnClick:!1}),dependencies:[l6],name:"@lexical/list/CheckList",register:lZ}),e.s(["$createListItemNode",()=>lj,"$createListNode",()=>lW,"$isListItemNode",()=>lH,"$isListNode",()=>lJ,"ListItemNode",()=>lU,"ListNode",()=>lq],824980);class l7 extends rX{__format;constructor(e,t){super(t),this.__format=e||""}exportJSON(){return{...super.exportJSON(),format:this.__format||""}}updateFromJSON(e){return super.updateFromJSON(e).setFormat(e.format||"")}canIndent(){return!1}createDOM(){return document.createElement("div")}updateDOM(){return!1}setFormat(e){let t=this.getWritable();return t.__format=e,t}isInline(){return!1}}e.s(["DecoratorBlockNode",()=>l7],136101)},133415,e=>{"use strict";function t(e,t){return null!=e&&Object.prototype.hasOwnProperty.call(e,t)}let i=["Cell","Description","Field","Filter"];function r({addToImportMap:e,baseDir:n,config:s,fields:a,importMap:o,imports:l}){for(let c of a){if("fields"in c)r({addToImportMap:e,baseDir:n,config:s,fields:c.fields,importMap:o,imports:l});else if("blocks"===c.type)r({addToImportMap:e,baseDir:n,config:s,fields:c.blocks.filter(e=>"string"!=typeof e),importMap:o,imports:l});else if("tabs"===c.type)r({addToImportMap:e,baseDir:n,config:s,fields:c.tabs,importMap:o,imports:l});else if("richText"===c.type)c?.editor&&"object"==typeof c.editor&&c.editor.generateImportMap&&"function"==typeof c.editor.generateImportMap&&c.editor.generateImportMap({addToImportMap:e,baseDir:n,config:s,importMap:o,imports:l});else if("ui"===c.type&&c?.admin?.components)for(let t in c.admin.components)t in i||e(c.admin.components[t]);t(c?.admin,"jsx")&&e(c.admin.jsx),t(c?.admin?.components,"Label")&&e(c.admin.components.Label),t(c?.admin?.components,"Block")&&e(c.admin.components.Block),t(c?.admin?.components,"Cell")&&e(c?.admin?.components?.Cell),t(c?.admin?.components,"Description")&&e(c?.admin?.components?.Description),t(c?.admin?.components,"Field")&&e(c?.admin?.components?.Field),t(c?.admin?.components,"Filter")&&e(c?.admin?.components?.Filter),t(c?.admin?.components,"Error")&&e(c?.admin?.components?.Error),t(c?.admin?.components,"afterInput")&&e(c?.admin?.components?.afterInput),t(c?.admin?.components,"beforeInput")&&e(c?.admin?.components?.beforeInput),t(c?.admin?.components,"RowLabel")&&e(c?.admin?.components?.RowLabel),t(c?.admin?.components,"Diff")&&e(c?.admin?.components?.Diff)}}e.s(["genImportMapIterateFields",()=>r])},560765,e=>{"use strict";var t=e.i(747016),t=t,i=e.i(191193),r=e.i(875798),r=r,n=e.i(494663),n=n,s=e.i(542327),a=e.i(56466);let o={ar:{placeholder:"ابدأ بالكتابة، أو اضغط على '/' للأوامر ...",slashMenuBasicGroupLabel:"أساسي",slashMenuListGroupLabel:"قوائم",toolbarItemsActive:"{{count}} نشط"},az:{placeholder:"Yazmağa başlayın və ya əmrlər üçün '/' düyməsini basın...",slashMenuBasicGroupLabel:"Əsas",slashMenuListGroupLabel:"Siyahılar",toolbarItemsActive:"{{count}} aktiv"},bg:{placeholder:"Започнете да пишете или натиснете '/' за команди...",slashMenuBasicGroupLabel:"Основен",slashMenuListGroupLabel:"Списъци",toolbarItemsActive:"{{count}} активни"},cs:{placeholder:"Začněte psát nebo stiskněte '/' pro příkazy...",slashMenuBasicGroupLabel:"Základní",slashMenuListGroupLabel:"Seznamy",toolbarItemsActive:"{{count}} aktivní"},da:{placeholder:"Begynd at skrive, eller tryk på '/' for kommandoer...",slashMenuBasicGroupLabel:"Grundlæggende",slashMenuListGroupLabel:"Lister",toolbarItemsActive:"{{count}} aktive"},de:{placeholder:"Beginne zu tippen oder drücke '/' für Befehle...",slashMenuBasicGroupLabel:"Basis",slashMenuListGroupLabel:"Listen",toolbarItemsActive:"{{count}} aktiv"},en:{placeholder:"Start typing, or press '/' for commands...",slashMenuBasicGroupLabel:"Basic",slashMenuListGroupLabel:"Lists",toolbarItemsActive:"{{count}} active"},es:{placeholder:"Comience a escribir, o presione '/' para comandos...",slashMenuBasicGroupLabel:"Básico",slashMenuListGroupLabel:"Listas",toolbarItemsActive:"{{count}} activo"},et:{placeholder:"Alusta kirjutamist või vajuta '/' käskude jaoks...",slashMenuBasicGroupLabel:"Põhiline",slashMenuListGroupLabel:"Loendid",toolbarItemsActive:"{{count}} aktiivne"},fa:{placeholder:"شروع به تایپ کنید، یا برای دستورات '/' را فشار دهید ...",slashMenuBasicGroupLabel:"پایه",slashMenuListGroupLabel:"لیست ها",toolbarItemsActive:"{{count}} فعال"},fr:{placeholder:"Commencez à taper, ou appuyez sur '/' pour les commandes...",slashMenuBasicGroupLabel:"De base",slashMenuListGroupLabel:"Listes",toolbarItemsActive:"{{count}} actif"},he:{placeholder:"התחיל להקליד, או לחץ על '/' עבור פקודות ...",slashMenuBasicGroupLabel:"בסיסי",slashMenuListGroupLabel:"רשימות",toolbarItemsActive:"{{count}} פעיל"},hr:{placeholder:"Počnite tipkati, ili pritisnite '/' za naredbe...",slashMenuBasicGroupLabel:"Osnovno",slashMenuListGroupLabel:"Popisi",toolbarItemsActive:"{{count}} aktivno"},hu:{placeholder:"Kezdje el gépelni, vagy nyomja meg a '/' billentyűt a parancsokhoz...",slashMenuBasicGroupLabel:"Alapvető",slashMenuListGroupLabel:"Listák",toolbarItemsActive:"{{count}} aktív"},is:{placeholder:"Byrjaðu að skrifa eða sláðu inn '/' fyrir skipanir...",slashMenuBasicGroupLabel:"Grunnur",slashMenuListGroupLabel:"Listar",toolbarItemsActive:"{{count}} virk"},it:{placeholder:"Inizia a digitare, oppure premi '/' per i comandi...",slashMenuBasicGroupLabel:"Base",slashMenuListGroupLabel:"Elenchi",toolbarItemsActive:"{{count}} attivo"},ja:{placeholder:"入力を開始するか、コマンドのために'/'を押してください…",slashMenuBasicGroupLabel:"基本的な",slashMenuListGroupLabel:"リスト",toolbarItemsActive:"{{count}} アクティブ"},ko:{placeholder:"타이핑을 시작하거나, 명령어를 입력하려면 '/'를 누르세요...",slashMenuBasicGroupLabel:"기본적인",slashMenuListGroupLabel:"목록",toolbarItemsActive:"{{count}} 활성화된"},my:{placeholder:"Mula menaip, atau tekan '/' untuk arahan...",slashMenuBasicGroupLabel:"အခြေခံ",slashMenuListGroupLabel:"Senarai",toolbarItemsActive:"{{count}} aktif"},nb:{placeholder:"Begynn å skrive, eller trykk '/' for kommandoer...",slashMenuBasicGroupLabel:"Grunnleggende",slashMenuListGroupLabel:"Lister",toolbarItemsActive:"{{count}} aktiv"},nl:{placeholder:"Begin met typen, of druk op '/' voor opdrachten...",slashMenuBasicGroupLabel:"Basis",slashMenuListGroupLabel:"Lijsten",toolbarItemsActive:"{{count}} actief"},pl:{placeholder:"Rozpocznij pisanie lub naciśnij '/' dla poleceń...",slashMenuBasicGroupLabel:"Podstawowy",slashMenuListGroupLabel:"Listy",toolbarItemsActive:"{{count}} aktywny"},pt:{placeholder:"Comece a digitar, ou pressione '/' para comandos...",slashMenuBasicGroupLabel:"Básico",slashMenuListGroupLabel:"Listas",toolbarItemsActive:"{{count}} ativo"},ro:{placeholder:"Începeți să tastați sau apăsați '/' pentru comenzi...",slashMenuBasicGroupLabel:"De bază",slashMenuListGroupLabel:"Liste",toolbarItemsActive:"{{count}} activ"},rs:{placeholder:"Почните да куцате, или притисните '/' за команде...",slashMenuBasicGroupLabel:"Основно",slashMenuListGroupLabel:"Листе",toolbarItemsActive:"{{count}} активно"},"rs-latin":{placeholder:"Počnite da kucate, ili pritisnite '/' za komande...",slashMenuBasicGroupLabel:"Osnovno",slashMenuListGroupLabel:"Liste",toolbarItemsActive:"{{count}} aktivan"},ru:{placeholder:"Начните печатать или нажмите '/' для команд...",slashMenuBasicGroupLabel:"Базовый",slashMenuListGroupLabel:"Списки",toolbarItemsActive:"{{count}} активных"},sk:{placeholder:"Začnite písať alebo stlačte '/' pre príkazy...",slashMenuBasicGroupLabel:"Základný",slashMenuListGroupLabel:"Zoznamy",toolbarItemsActive:"{{count}} aktívne"},sl:{placeholder:'Začnite tipkati ali pritisnite "/" za ukaze...',slashMenuBasicGroupLabel:"Osnovno",slashMenuListGroupLabel:"Seznami",toolbarItemsActive:"{{count}} aktivno"},sv:{placeholder:"Börja skriva, eller tryck på '/' för kommandon...",slashMenuBasicGroupLabel:"Grundläggande",slashMenuListGroupLabel:"Listor",toolbarItemsActive:"{{count}} aktiv"},ta:{placeholder:"எழுதத் தொடங்கவும், அல்லது கட்டளைகளுக்கு '/' அழுத்தவும்...",slashMenuBasicGroupLabel:"அடிப்படை",slashMenuListGroupLabel:"பட்டியல்கள்",toolbarItemsActive:"{{count}} செயலில் உள்ளது"},th:{placeholder:"เริ่มพิมพ์หรือกด '/' สำหรับคำสั่ง...",slashMenuBasicGroupLabel:"พื้นฐาน",slashMenuListGroupLabel:"รายการ",toolbarItemsActive:"{{count}} ที่ใช้งานอยู่"},tr:{placeholder:"Yazmaya başlayın veya komutlar için '/' tuşuna basın...",slashMenuBasicGroupLabel:"Temel",slashMenuListGroupLabel:"Listeler",toolbarItemsActive:"{{count}} aktif"},uk:{placeholder:"Почніть друкувати, або натисніть '/' для команд...",slashMenuBasicGroupLabel:"Базовий",slashMenuListGroupLabel:"Списки",toolbarItemsActive:"{{count}} активний"},vi:{placeholder:"Bắt đầu gõ, hoặc nhấn '/' để gọi lệnh...",slashMenuBasicGroupLabel:"Cơ bản",slashMenuListGroupLabel:"Danh sách",toolbarItemsActive:"{{count}} đang hoạt động"},zh:{placeholder:"开始输入,或按'/'进行命令...",slashMenuBasicGroupLabel:"基础",slashMenuListGroupLabel:"列表",toolbarItemsActive:"{{count}} 活跃"},"zh-TW":{placeholder:"開始輸入,或按'/'以使用命令...",slashMenuBasicGroupLabel:"基本的",slashMenuListGroupLabel:"清單",toolbarItemsActive:"{{count}} 活躍中"}};var l=e.i(372036);let c={ar:{alignCenterLabel:"محاذاة في الوسط",alignJustifyLabel:"محاذاة التبرير",alignLeftLabel:"محاذاة إلى اليسار",alignRightLabel:"محاذاة إلى اليمين"},az:{alignCenterLabel:"Mərkəzə Düzəlt",alignJustifyLabel:"Düzəldin Səsləndirin",alignLeftLabel:"Sola Doğru Hizalama",alignRightLabel:"Sağa Doğru Hizalama"},bg:{alignCenterLabel:"Центрирай",alignJustifyLabel:"Подравняване по двата края",alignLeftLabel:"Подравняване отляво",alignRightLabel:"Подравняване вдясно"},cs:{alignCenterLabel:"Zarovnat na střed",alignJustifyLabel:"Zarovnat do bloku",alignLeftLabel:"Zarovnat vlevo",alignRightLabel:"Zarovnat vpravo"},da:{alignCenterLabel:"Centrer teksten",alignJustifyLabel:"Justér til begge sider",alignLeftLabel:"Justér til venstre",alignRightLabel:"Juster til højre"},de:{alignCenterLabel:"Zentrieren",alignJustifyLabel:"Blocksatz",alignLeftLabel:"Linksbündig",alignRightLabel:"Rechtsbündig"},en:{alignCenterLabel:"Align Center",alignJustifyLabel:"Align Justify",alignLeftLabel:"Align Left",alignRightLabel:"Align Right"},es:{alignCenterLabel:"Alinear al centro",alignJustifyLabel:"Alinear Justificar",alignLeftLabel:"Alinear a la izquierda",alignRightLabel:"Alinear a la derecha"},et:{alignCenterLabel:"Keskjoondus",alignJustifyLabel:"Rööpjoondus",alignLeftLabel:"Vasakjoondus",alignRightLabel:"Paremjoondus"},fa:{alignCenterLabel:"تراز در مرکز",alignJustifyLabel:"تراز کردن از دو طرف",alignLeftLabel:"چپ تراز",alignRightLabel:"راست چین"},fr:{alignCenterLabel:"Aligner au centre",alignJustifyLabel:"Aligner Justifier",alignLeftLabel:"Aligner à gauche",alignRightLabel:"Aligner à droite"},he:{alignCenterLabel:"ממורכז",alignJustifyLabel:"יישור דו-צדדי",alignLeftLabel:"הסב לשמאל",alignRightLabel:"יישור לימין"},hr:{alignCenterLabel:"Poravnaj središnje",alignJustifyLabel:"Poravnaj opravdaj",alignLeftLabel:"Poravnaj lijevo",alignRightLabel:"Poravnaj desno"},hu:{alignCenterLabel:"Középre igazítás",alignJustifyLabel:"Igazítás Sorkizárás",alignLeftLabel:"Igazítás balra",alignRightLabel:"Igazítás jobbra"},is:{alignCenterLabel:"Miðju jöfnun",alignJustifyLabel:"Samræmd jöfnun",alignLeftLabel:"Vinstri jöfnun",alignRightLabel:"Hægri jöfnun"},it:{alignCenterLabel:"Allinea al centro",alignJustifyLabel:"Allinea Giustifica",alignLeftLabel:"Allinea a sinistra",alignRightLabel:"Allinea a destra"},ja:{alignCenterLabel:"中央揃え",alignJustifyLabel:"両端揃え",alignLeftLabel:"左揃え",alignRightLabel:"右揃え"},ko:{alignCenterLabel:"중앙 정렬",alignJustifyLabel:"정렬 맞춤",alignLeftLabel:"왼쪽 정렬",alignRightLabel:"오른쪽 정렬"},my:{alignCenterLabel:"Pusat Selaras",alignJustifyLabel:"Penjajaran Justify",alignLeftLabel:"ဘယ်ဘက်ဦးတည်ခြင်း",alignRightLabel:"Penjajaran Kanan"},nb:{alignCenterLabel:"Sentrer tekst",alignJustifyLabel:"Juster linje",alignLeftLabel:"Juster til venstre",alignRightLabel:"Juster til høyre"},nl:{alignCenterLabel:"Centreer uitlijnen",alignJustifyLabel:"Uitlijnen Rechtvaardigen",alignLeftLabel:"Links uitlijnen",alignRightLabel:"Rechts uitlijnen"},pl:{alignCenterLabel:"Wyśrodkuj",alignJustifyLabel:"Wyjustuj wyrównanie",alignLeftLabel:"Wyrównaj do lewej",alignRightLabel:"Wyrównaj do prawej"},pt:{alignCenterLabel:"Alinhar ao Centro",alignJustifyLabel:"Alinhar Justificar",alignLeftLabel:"Alinhar à Esquerda",alignRightLabel:"Alinhar à Direita"},ro:{alignCenterLabel:"Aliniați Centrul",alignJustifyLabel:"Aliniaza Justifica",alignLeftLabel:"Aliniați la stânga",alignRightLabel:"Aliniați la dreapta"},rs:{alignCenterLabel:"Поравнај по средини",alignJustifyLabel:"Поравнај обострано",alignLeftLabel:"Поравнај лево",alignRightLabel:"Поравнај десно"},"rs-latin":{alignCenterLabel:"Poravnaj po sredini",alignJustifyLabel:"Poravnaj obostrano",alignLeftLabel:"Poravnaj levo",alignRightLabel:"Poravnaj desno"},ru:{alignCenterLabel:"Выровнять по центру",alignJustifyLabel:"Выровнять по ширине",alignLeftLabel:"Выровнять по левому краю",alignRightLabel:"Выровнять по правому краю"},sk:{alignCenterLabel:"Vycentrovať",alignJustifyLabel:"Zarovnať do bloku",alignLeftLabel:"Zarovnať doľava",alignRightLabel:"Zarovnať doprava"},sl:{alignCenterLabel:"Poravnaj na sredino",alignJustifyLabel:"Poravnaj Obojestransko",alignLeftLabel:"Poravnaj na levo",alignRightLabel:"Poravnaj na desno"},sv:{alignCenterLabel:"Centrera",alignJustifyLabel:"Justera Justify",alignLeftLabel:"Justera till vänster",alignRightLabel:"Justera till höger"},ta:{alignCenterLabel:"மையத்தில் ஒழுங்குபடுத்து",alignJustifyLabel:"இருபுறமும் ஒழுங்குபடுத்து",alignLeftLabel:"இடப்புறத்தில் ஒழுங்குபடுத்து",alignRightLabel:"வலப்புறத்தில் ஒழுங்குபடுத்து"},th:{alignCenterLabel:"จัดแนวกึ่งกลาง",alignJustifyLabel:"จัดแนวตรง",alignLeftLabel:"จัดชิดซ้าย",alignRightLabel:"จัดชิดขวา"},tr:{alignCenterLabel:"Ortaya Hizala",alignJustifyLabel:"Hizala Yasla",alignLeftLabel:"Sola Hizala",alignRightLabel:"Sağa Hizala"},uk:{alignCenterLabel:"Вирівняти по центру",alignJustifyLabel:"Вирівняти за шириною",alignLeftLabel:"Вирівняти по лівому краю",alignRightLabel:"Вирівняти по правому краю"},vi:{alignCenterLabel:"Căn giữa",alignJustifyLabel:"Căn đều",alignLeftLabel:"Căn lề trái",alignRightLabel:"Căn phải"},zh:{alignCenterLabel:"居中对齐",alignJustifyLabel:"对齐调整",alignLeftLabel:"向左对齐",alignRightLabel:"向右对齐"},"zh-TW":{alignCenterLabel:"對齊中心",alignJustifyLabel:"對齊並排列",alignLeftLabel:"向左對齊",alignRightLabel:"向右對齊"}},d=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#AlignFeatureClient",i18n:c},key:"align"});var u=e.i(549471),h=l;async function A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l}){let c=e.find(e=>e.nodeTypes.includes("unknown"));return(await Promise.all(n.map(async(n,d)=>{let u=e.find(e=>e.nodeTypes.includes(n.type));try{if(!u){if(c)return await c.converter({childIndex:d,converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l});return"<span>unknown node</span>"}return await u.converter({childIndex:d,converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})}catch(e){return console.error("Error converting lexical node to HTML:",e,"node:",n),""}}))).join("")||""}var p=e.i(796468),f=u;let g={type:"element",dependencies:[f.QuoteNode],export:(e,t)=>{if(!(0,f.$isQuoteNode)(e))return null;let i=t(e).split("\n"),r=[];for(let e of i)r.push("> "+e);return r.join("\n")},regExp:/^>\s/,replace:(e,t,i,r)=>{if(r){let i=e.getPreviousSibling();if((0,f.$isQuoteNode)(i)){i.splice(i.getChildrenSize(),0,[...t]),i.select(0,0),e.remove();return}}let n=(0,f.$createQuoteNode)();n.append(...t),e.replace(n),n.select(0,0)}},m={ar:{label:"اقتباس"},az:{label:"Blokkvota"},bg:{label:"Цитат"},cs:{label:"Citace"},da:{label:"Blokering"},de:{label:"Blockzitat"},en:{label:"Blockquote"},es:{label:"Cita en bloque"},et:{label:"Tsitaat"},fa:{label:"نقل قول بلوکی"},fr:{label:"Citation"},he:{label:"בלוק ציטוט"},hr:{label:"Blok citat"},hu:{label:"Idézetblokk"},is:{label:"Tilvitnun"},it:{label:"Citazione"},ja:{label:"ブロッククォート"},ko:{label:"인용구"},my:{label:"ဒေါင်းချီးခြင်း"},nb:{label:"Blokksitat"},nl:{label:"Citaat"},pl:{label:"Cytat blokowy"},pt:{label:"Citação em bloco"},ro:{label:"Citat"},rs:{label:"Блок цитата"},"rs-latin":{label:"Blok citata"},ru:{label:"Цитата"},sk:{label:"Citát"},sl:{label:"Citat"},sv:{label:"Blockcitat"},ta:{label:"கட்டமைப்பு மேற்கோள்"},th:{label:"ข้อความอ้างอิง"},tr:{label:"Alıntı"},uk:{label:"Блокцитата"},vi:{label:"Trích dẫn"},zh:{label:"引用区块"},"zh-TW":{label:"引用塊"}},y=(0,h.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#BlockquoteFeatureClient",clientFeatureProps:null,i18n:m,markdownTransformers:[g],nodes:[(0,p.createNode)({converters:{html:{converter:async({converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})=>{let c=await A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n.children,overrideAccess:s,parent:{...n,parent:a},req:o,showHiddenFields:l}),d=[n.format?`text-align: ${n.format};`:"",n.indent>0?`padding-inline-start: ${40*n.indent}px;`:""].filter(Boolean).join(" ");return`<blockquote${d?` style='${d}'`:""}>${c}</blockquote>`},nodeTypes:[u.QuoteNode.getType()]}},node:u.QuoteNode})]},key:"blockquote"}),b={type:"text-format",format:["bold","italic"],tag:"***"},E={type:"text-format",format:["bold","italic"],intraword:!1,tag:"___"},C={type:"text-format",format:["bold"],tag:"**"},w={type:"text-format",format:["bold"],intraword:!1,tag:"__"},I=(0,l.createServerFeature)({dependenciesSoft:["italic"],feature:({featureProviderMap:e})=>{let t=[C,w];return e.get("italic")&&t.push(E,b),{ClientFeature:"@payloadcms/richtext-lexical/client#BoldFeatureClient",markdownTransformers:t}},key:"bold"}),v={type:"text-format",format:["code"],tag:"`"},B=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#InlineCodeFeatureClient",markdownTransformers:[v]},key:"inlineCode"}),Q={type:"text-format",format:["italic"],tag:"*"},x={type:"text-format",format:["italic"],intraword:!1,tag:"_"},S=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#ItalicFeatureClient",markdownTransformers:[Q,x]},key:"italic"}),k={type:"text-format",format:["strikethrough"],tag:"~~"},T=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#StrikethroughFeatureClient",markdownTransformers:[k]},key:"strikethrough"}),N=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#SubscriptFeatureClient"},key:"subscript"}),D=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#SuperscriptFeatureClient"},key:"superscript"}),_=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#UnderlineFeatureClient"},key:"underline"});var R=u,L=p,F=u;let M=e=>(t,i,r)=>{let n=e(r);n&&(n.append(...i),t.replace(n),n.select(0,0))},O=e=>{let t=e.map(e=>Number(e.slice(1))),i=RegExp(`^(${t.map(e=>`#{${e}}`).join("|")})\\s`);return{type:"element",dependencies:[F.HeadingNode],export:(e,t)=>{if(!(0,F.$isHeadingNode)(e))return null;let i=Number(e.getTag().slice(1));return"#".repeat(i)+" "+t(e)},regExp:i,replace:M(e=>{let t="h"+e[1]?.length;return(0,F.$createHeadingNode)(t)})}},U={ar:{label:"العنوان {{headingLevel}}"},az:{label:"Başlıq {{headingLevel}}"},bg:{label:"Заглавие {{headingLevel}}"},cs:{label:"Nadpis {{headingLevel}}"},da:{label:"Overskrift {{headingLevel}}"},de:{label:"Überschrift {{headingLevel}}"},en:{label:"Heading {{headingLevel}}"},es:{label:"Encabezado {{headingLevel}}"},et:{label:"Pealkiri {{headingLevel}}"},fa:{label:"[SKIPPED]"},fr:{label:"En-tête {{headingLevel}}"},he:{label:"כותרת {{רמת כותרת}}"},hr:{label:"Naslov {{headingLevel}}"},hu:{label:"Címsor {{headingLevel}}"},is:{label:"Fyrirsögn {{headingLevel}}"},it:{label:"Intestazione {{headingLevel}}"},ja:{label:"見出し{{headingLevel}}"},ko:{label:"제목 {{headingLevel}}"},my:{label:"[SURAT]\n\nKepala {{headingLevel}}"},nb:{label:"Overskrift {{headingLevel}}"},nl:{label:"Kop {{headingLevel}}"},pl:{label:"Nagłówek {{headingLevel}}"},pt:{label:"Cabeçalho {{headingLevel}}"},ro:{label:"Titlu {{headingLevel}}"},rs:{label:"Наслов {{headingLevel}}"},"rs-latin":{label:"Naslov {{headingLevel}}"},ru:{label:"Заголовок {{headingLevel}}"},sk:{label:"Nadpis {{headingLevel}}"},sl:{label:"Naslov {{headingLevel}}"},sv:{label:"Rubrik {{headingLevel}}"},ta:{label:"தலைப்பு {{headingLevel}}"},th:{label:"หัวข้อ {{headingLevel}}"},tr:{label:"Başlık {{headingLevel}}"},uk:{label:"Заголовок {{headingLevel}}"},vi:{label:"Tiêu đề {{headingLevel}}"},zh:{label:"标题 {{headingLevel}}"},"zh-TW":{label:"標題 {{headingLevel}}"}},P=(0,l.createServerFeature)({feature:({props:e})=>{e||(e={});let{enabledHeadingSizes:t=["h1","h2","h3","h4","h5","h6"]}=e;return t.sort(),{ClientFeature:"@payloadcms/richtext-lexical/client#HeadingFeatureClient",clientFeatureProps:e,i18n:U,markdownTransformers:t.length>0?[O(t)]:[],nodes:[(0,L.createNode)({converters:{html:{converter:async({converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})=>{let c=await A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n.children,overrideAccess:s,parent:{...n,parent:a},req:o,showHiddenFields:l}),d=[n.format?`text-align: ${n.format};`:"",n.indent>0?`padding-inline-start: ${40*n.indent}px;`:""].filter(Boolean).join(" ");return`<${n?.tag}${d?` style='${d}'`:""}>${c}</${n?.tag}>`},nodeTypes:[R.HeadingNode.getType()]}},node:R.HeadingNode})],sanitizedServerFeatureProps:e}},key:"heading"});var $=l,j=p;let H={ar:{label:"القاعدة الأفقية"},az:{label:"Üfüqi Xətt"},bg:{label:"Хоризонтална линия"},cs:{label:"Vodorovný pravítko"},da:{label:"Horisontal Regel"},de:{label:"Trennlinie"},en:{label:"Horizontal Rule"},es:{label:"Regla Horizontal"},et:{label:"Horisontaalne reegel"},fa:{label:"قاعده افقی"},fr:{label:"Règle horizontale"},he:{label:"קו אופקי"},hr:{label:"Vodoravna linija"},hu:{label:"Vízszintes vonal"},is:{label:"Lárétt lína"},it:{label:"Regola Orizzontale"},ja:{label:"水平線"},ko:{label:"수평 규칙"},my:{label:"Peraturan Mendatar"},nb:{label:"Horisontal Regel"},nl:{label:"Horizontale Regel"},pl:{label:"Pozioma Linia"},pt:{label:"Regra Horizontal"},ro:{label:"Linie orizontală"},rs:{label:"Хоризонтална линија"},"rs-latin":{label:"Horizontalna linija"},ru:{label:"Горизонтальная линия"},sk:{label:"Vodorovná čiara"},sl:{label:"Vodoravna črta"},sv:{label:"Horisontell linje"},ta:{label:"குறுக்கு வரி"},th:{label:"เส้นขอบแนวนอน"},tr:{label:"Yatay Çizgi"},uk:{label:"Горизонтальна лінія"},vi:{label:"Quy tắc ngang"},zh:{label:"水平线"},"zh-TW":{label:"水平線"}};var q=e.i(704890);(0,q.createCommand)("INSERT_HORIZONTAL_RULE_COMMAND");class z extends q.DecoratorNode{static clone(e){return new this(e.__key)}static getType(){return"horizontalrule"}static importDOM(){return{hr:()=>({conversion:V,priority:0})}}static importJSON(e){return G()}createDOM(e){let t=document.createElement("hr");return(0,q.addClassNamesToElement)(t,e.theme.hr),t}decorate(){return null}exportDOM(){return{element:document.createElement("hr")}}exportJSON(){return{type:"horizontalrule",version:1}}getTextContent(){return"\n"}isInline(){return!1}updateDOM(){return!1}}function V(){return{node:G()}}function G(){return(0,q.$applyNodeReplacement)(new z)}function Y(e){return e instanceof z}let W={type:"element",dependencies:[z],export:(e,t)=>Y(e)?"---":null,regExp:/^---\s*$/,replace:e=>{let t=G();t&&e.replace(t)}},J=(0,$.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#HorizontalRuleFeatureClient",i18n:H,markdownTransformers:[W],nodes:[(0,j.createNode)({converters:{html:{converter:()=>"<hr/>",nodeTypes:[z.getType()]}},node:z})]},key:"horizontalRule"}),K={ar:{decreaseLabel:"تقليل المسافة البادئة",increaseLabel:"زيادة المسافة البادئة"},az:{decreaseLabel:"İntervalı Azaltın",increaseLabel:"Girintiyi Artırın"},bg:{decreaseLabel:"Намали отстоянието",increaseLabel:"Увеличете отстоянието"},cs:{decreaseLabel:"Zmenšit odsazení",increaseLabel:"Zvětšit odsazení"},da:{decreaseLabel:"Reducer Indrykning",increaseLabel:"Forøg indrykning"},de:{decreaseLabel:"Einzug verkleinern",increaseLabel:"Einzug erhöhen"},en:{decreaseLabel:"Decrease Indent",increaseLabel:"Increase Indent"},es:{decreaseLabel:"Disminuir Sangría",increaseLabel:"Aumentar Sangría"},et:{decreaseLabel:"Taande vähendamine",increaseLabel:"Taande suurendamine"},fa:{decreaseLabel:"کاهش تورفتگی",increaseLabel:"افزایش تورفتگی"},fr:{decreaseLabel:"Diminuer l'indentation",increaseLabel:"Augmenter l'indentation"},he:{decreaseLabel:"הקטן הזחה",increaseLabel:"הגדל כניסה"},hr:{decreaseLabel:"Smanji uvlačenje",increaseLabel:"Povećaj uvlačenje"},hu:{decreaseLabel:"Csökkentse a behúzást",increaseLabel:"Behúzás növelése"},is:{decreaseLabel:"Minnka inndrátt",increaseLabel:"Auka inndrátt"},it:{decreaseLabel:"Diminuisci rientro",increaseLabel:"Aumenta Rientro"},ja:{decreaseLabel:"インデントを減らす",increaseLabel:"インデントを増やす"},ko:{decreaseLabel:"들여쓰기 줄이기",increaseLabel:"들여쓰기 늘리기"},my:{decreaseLabel:"Kurangkan Inden",increaseLabel:"Tingkatkan Inden"},nb:{decreaseLabel:"Reduser innrykk",increaseLabel:"Øke innrykk"},nl:{decreaseLabel:"Verminder Inspringing",increaseLabel:"Inspring verhogen"},pl:{decreaseLabel:"Zmniejsz wcięcie",increaseLabel:"Zwiększ wcięcie"},pt:{decreaseLabel:"Diminuir recuo",increaseLabel:"Aumentar Indentação"},ro:{decreaseLabel:"Reducere indentare",increaseLabel:"Crește indentarea"},rs:{decreaseLabel:"Смањи увлачење",increaseLabel:"Повећај увлачење"},"rs-latin":{decreaseLabel:"Smanji uvlačenje",increaseLabel:"Povećaj uvlačenje"},ru:{decreaseLabel:"Уменьшить отступ",increaseLabel:"Увеличить отступ"},sk:{decreaseLabel:"Znížiť odsadenie",increaseLabel:"Zväčšiť odsadenie"},sl:{decreaseLabel:"Zmanjšaj zamik",increaseLabel:"Povečaj zamik"},sv:{decreaseLabel:"Minska indrag",increaseLabel:"Öka indrag"},ta:{decreaseLabel:"இடதுபுறச் செருகலை குறைக்கவும்",increaseLabel:"இடதுபுறச் செருகலை அதிகரிக்கவும்"},th:{decreaseLabel:"ลดการเยื้อง",increaseLabel:"เพิ่มการเยื้อง"},tr:{decreaseLabel:"Girintiyi Azalt",increaseLabel:"Girintiyi Artır"},uk:{decreaseLabel:"Зменшити відступ",increaseLabel:"Збільшити відступ"},vi:{decreaseLabel:"Giảm lề",increaseLabel:"Tăng lề"},zh:{decreaseLabel:"减少缩进",increaseLabel:"增加缩进"},"zh-TW":{decreaseLabel:"減少縮排",increaseLabel:"增加縮排"}},Z=(0,l.createServerFeature)({feature:({props:e})=>({ClientFeature:"@payloadcms/richtext-lexical/client#IndentFeatureClient",clientFeatureProps:e,i18n:K}),key:"indent"});var X=e.i(696754),ee=e.i(277412),et=l,ei=p,er=q,en=q,es=e.i(743977);let ea=new Set(["http:","https:","mailto:","sms:","tel:"]);class eo extends en.ElementNode{__fields;__id;constructor({id:e,fields:t={linkType:"custom",newTab:!1},key:i}){super(i),this.__fields=t,this.__id=e}static clone(e){return new this({id:e.__id,fields:e.__fields,key:e.__key})}static getType(){return"link"}static importDOM(){return{a:e=>({conversion:el,priority:1})}}static importJSON(e){let t=ec({}).updateFromJSON(e);return 1===e.version&&"object"==typeof e.fields?.doc?.value&&e.fields?.doc?.value?.id&&(e.fields.doc.value=e.fields.doc.value.id,e.version=2),2!==e.version||e.id||(e.id=new es.default.default().toHexString(),e.version=3),t}canBeEmpty(){return!1}canInsertTextAfter(){return!1}canInsertTextBefore(){return!1}createDOM(e){let t=document.createElement("a");return this.__fields?.linkType==="custom"&&(t.href=this.sanitizeUrl(this.__fields.url??"")),this.__fields?.newTab&&(t.target="_blank"),this.__fields?.newTab===!0&&this.__fields?.linkType==="custom"&&(t.rel=eu(t.rel,"add","noopener")),(0,en.addClassNamesToElement)(t,e.theme.link),t}exportJSON(){let e=this.getFields();e?.linkType==="internal"?delete e.url:e?.linkType==="custom"&&delete e.doc;let t={...super.exportJSON(),type:"link",fields:e,version:3},i=this.getID();return i&&(t.id=i),t}extractWithChild(e,t,i){if(!(0,en.$isRangeSelection)(t))return!1;let r=t.anchor.getNode(),n=t.focus.getNode();return this.isParentOf(r)&&this.isParentOf(n)&&t.getTextContent().length>0}getFields(){return this.getLatest().__fields}getID(){return this.getLatest().__id}insertNewAfter(e,t=!0){let i=this.getParentOrThrow().insertNewAfter(e,t);if((0,en.$isElementNode)(i)){let e=ec({fields:this.__fields});return i.append(e),e}return null}isInline(){return!0}sanitizeUrl(e){try{let t=new URL(e);if(!ea.has(t.protocol))return"about:blank"}catch(e){return"https://"}return e}setFields(e){let t=this.getWritable();return t.__fields=e,t}setID(e){let t=this.getWritable();return t.__id=e,t}updateDOM(e,t,i){let r=this.__fields?.url,n=this.__fields?.newTab;return null!=r&&r!==e.__fields?.url&&this.__fields?.linkType==="custom"&&(t.href=r),this.__fields?.linkType==="internal"&&e.__fields?.linkType==="custom"&&t.removeAttribute("href"),null==t.rel&&(t.rel=""),n!==e.__fields?.newTab&&(n?(t.target="_blank",this.__fields?.linkType==="custom"&&(t.rel=eu(t.rel,"add","noopener"))):(t.removeAttribute("target"),t.rel=eu(t.rel,"remove","noopener"))),!1}updateFromJSON(e){return super.updateFromJSON(e).setFields(e.fields).setID(e.id)}}function el(e){let t=null;if((0,en.isHTMLAnchorElement)(e)){let i=e.textContent;null!==i&&""!==i&&(t=ec({id:new es.default.default().toHexString(),fields:{doc:null,linkType:"custom",newTab:"_blank"===e.getAttribute("target"),url:e.getAttribute("href")??""}}))}return{node:t}}function ec({id:e,fields:t}){return(0,en.$applyNodeReplacement)(new eo({id:e??new es.default.default().toHexString(),fields:t}))}function ed(e){return e instanceof eo}function eu(e,t,i){let r,n=`${e}`;if("add"===t){if(n.includes(i)){let e=RegExp(i,"g");n=n.replace(e,"").trim()}r=0===(n=n.trim()).length?`${i}`:`${n} ${i}`}else{let e=RegExp(i,"g");r=n.replace(e,"").trim()}return r}(0,en.createCommand)("TOGGLE_LINK_COMMAND");let eh={type:"text-match",dependencies:[eo],export:(e,t)=>{if(!ed(e))return null;let i=e,{url:r}=i.getFields(),n=t(i);return`[${n}](${r})`},importRegExp:/(?<!!)\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)/,regExp:/(?<!!)\[([^[]+)\]\(([^()\s]+)(?:\s"((?:[^"]*\\")*[^"]*)"\s*)?\)$/,replace:(e,t)=>{let[,i,r]=t,n=ec({fields:{doc:null,linkType:"custom",newTab:!1,url:r}}),s=(0,er.$createTextNode)(i);return s.setFormat(e.getFormat()),n.append(s),e.replace(n),s},trigger:")"};var eA=q;class ep extends eo{static clone(e){return new this({id:"",fields:e.__fields,key:e.__key})}static getType(){return"autolink"}static importDOM(){return null}static importJSON(e){let t=ef({}).updateFromJSON(e);return 1===e.version&&"object"==typeof e.fields?.doc?.value&&e.fields?.doc?.value?.id&&(e.fields.doc.value=e.fields.doc.value.id,e.version=2),t}exportJSON(){let e=super.exportJSON();return{type:"autolink",children:e.children,direction:e.direction,fields:e.fields,format:e.format,indent:e.indent,version:2}}insertNewAfter(e,t=!0){let i=this.getParentOrThrow().insertNewAfter(e,t);if((0,eA.$isElementNode)(i)){let e=ef({fields:this.__fields});return i.append(e),e}return null}updateFromJSON(e){return super.updateFromJSON(e).setFields(e.fields)}}function ef({fields:e}){return(0,eA.$applyNodeReplacement)(new ep({id:"",fields:e}))}var eg=e.i(83611);let em=e=>({context:t,currentDepth:i,depth:r,draft:n,editorPopulationPromises:s,field:a,fieldPromises:o,findMany:l,flattenLocales:c,node:d,overrideAccess:u,parentIsLocalized:h,populationPromises:A,req:p,showHiddenFields:f})=>{e.fields?.length&&Array.isArray(e.fields)&&(0,eg.recursivelyPopulateFieldsForGraphQL)({context:t,currentDepth:i,data:d.fields,depth:r,draft:n,editorPopulationPromises:s,fieldPromises:o,fields:e.fields,findMany:l,flattenLocales:c,overrideAccess:u,parentIsLocalized:h||a.localized||!1,populationPromises:A,req:p,showHiddenFields:f,siblingDoc:d.fields})},ey={ar:{label:"رابط",loadingWithEllipsis:"جار التحميل..."},az:{label:"Keçid",loadingWithEllipsis:"Yüklənir..."},bg:{label:"Връзка",loadingWithEllipsis:"Зарежда се..."},cs:{label:"Odkaz",loadingWithEllipsis:"Načítání..."},da:{label:"Link",loadingWithEllipsis:"Indlæser..."},de:{label:"Verknüpfung",loadingWithEllipsis:"Laden..."},en:{label:"Link",loadingWithEllipsis:"Loading..."},es:{label:"Enlace",loadingWithEllipsis:"Cargando..."},et:{label:"Link",loadingWithEllipsis:"Laadimine..."},fa:{label:"پیوند",loadingWithEllipsis:"در حال بارگذاری..."},fr:{label:"Lien",loadingWithEllipsis:"Chargement..."},he:{label:"קישור",loadingWithEllipsis:"טוען..."},hr:{label:"Poveznica",loadingWithEllipsis:"Učitavanje..."},hu:{label:"Hivatkozás",loadingWithEllipsis:"Betöltés..."},is:{label:"Hlekkur",loadingWithEllipsis:"Hleð..."},it:{label:"Collegamento",loadingWithEllipsis:"Caricamento..."},ja:{label:"リンク",loadingWithEllipsis:"読み込み中..."},ko:{label:"링크",loadingWithEllipsis:"로딩 중..."},my:{label:"လင့်",loadingWithEllipsis:"ဖွင့်နေသည်..."},nb:{label:"Lenke",loadingWithEllipsis:"Laster..."},nl:{label:"Link",loadingWithEllipsis:"Laden..."},pl:{label:"Łącze",loadingWithEllipsis:"Ładowanie..."},pt:{label:"Ligação",loadingWithEllipsis:"Carregando..."},ro:{label:"Legătură",loadingWithEllipsis:"Se încarcă..."},rs:{label:"Веза",loadingWithEllipsis:"Учитавање..."},"rs-latin":{label:"Veza",loadingWithEllipsis:"Učitavanje..."},ru:{label:"Ссылка",loadingWithEllipsis:"Загрузка..."},sk:{label:"Odkaz",loadingWithEllipsis:"Načítava sa..."},sl:{label:"Povezava",loadingWithEllipsis:"Nalaganje..."},sv:{label:"Länk",loadingWithEllipsis:"Laddar..."},ta:{label:"இணைப்பு",loadingWithEllipsis:"போர்த்துவருகிறது..."},th:{label:"ลิงค์",loadingWithEllipsis:"กำลังโหลด..."},tr:{label:"Bağlantı",loadingWithEllipsis:"Yükleniyor..."},uk:{label:"Посилання",loadingWithEllipsis:"Завантаження..."},vi:{label:"Liên kết",loadingWithEllipsis:"Đang tải..."},zh:{label:"链接",loadingWithEllipsis:"加载中..."},"zh-TW":{label:"連結",loadingWithEllipsis:"載入中..."}},eb=/^(?:[a-zA-Z][a-zA-Z\d+.-]*:(?:\/\/)?(?:[-;:&=+$,\w]+@)?[A-Za-z\d]+(?:\.[A-Za-z\d]+)+|www\.[A-Za-z\d]+(?:\.[A-Za-z\d]+)+|(?:tel|mailto):[\w+.-]+)(?:\/[+~%/\w-]*)?(?:\?[-;&=%\w]*)?(?:#\w+)?$/,eE=/^(?:\/[\w\-./]*(?:\?[-;&=%\w]*)?(?:#[\w-]+)?|#[\w\-]+)$/;function eC(e){return!!e&&!e.includes(" ")}function ew(e){if(!e||e.includes(" ")||/^[a-z][a-z\d+.-]*:\/[^/]/i.test(e))return!1;if("https://"===e||eb.test(e)||eE.test(e))return!0;try{let t=new URL(e);if(["ftp:","http:","https:"].includes(t.protocol)&&!t.hostname.includes("."))return!1;return!0}catch{}return!1}let eI=(e,t,i,r)=>{let n;n=t||(i?e.collections.filter(({slug:e})=>!i.includes(e)).map(({slug:e})=>e):e.collections.filter(({admin:{enableRichTextLink:e,hidden:t}})=>("function"==typeof t||!t)&&e).map(({slug:e})=>e));let s=[{name:"text",type:"text",label:({t:e})=>e("fields:textToDisplay"),required:!0},{name:"linkType",type:"radio",admin:{description:({t:e})=>e("fields:chooseBetweenCustomTextOrDocument")},defaultValue:"custom",label:({t:e})=>e("fields:linkType"),options:[{label:({t:e})=>e("fields:customURL"),value:"custom"}],required:!0},{name:"url",type:"text",hooks:{beforeChange:[({value:e})=>{if(e)return ew(e)?e:encodeURIComponent(e)}]},label:({t:e})=>e("fields:enterURL"),required:!0,validate:(e,t)=>{if(t?.siblingData?.linkType!=="internal"&&!eC(e))return"Invalid URL"}}];return n?.length&&(s[1].options.push({label:({t:e})=>e("fields:internalLink"),value:"internal"}),s[2].admin={condition:(e,t)=>"internal"!==t.linkType},s.push({name:"doc",admin:{condition:(e,t)=>"internal"===t.linkType},type:"relationship",filterOptions:t||i?null:async({relationTo:t,req:i,user:r})=>{let n=e.collections.find(({slug:e})=>e===t)?.admin,s=n?.hidden;if("function"==typeof s&&s({user:r}))return!1;let a=n?.baseFilter??n?.baseListFilter;return await a?.({limit:0,page:1,req:i,sort:"id"})??!0},label:({t:e})=>e("fields:chooseDocumentToLink"),maxDepth:r,relationTo:n,required:!0})),s.push({name:"newTab",type:"checkbox",label:({t:e})=>e("fields:openInNewTab")}),s};function ev(e,t,i,r,n){let s=eI(t,i,r,n);return"function"==typeof e?e({config:t,defaultFields:s}):Array.isArray(e)?e:s}var eB=e.i(108381);let eQ=(e,t)=>async({node:e,validation:{options:{id:i,collectionSlug:r,data:n,operation:s,preferences:a,req:o}}})=>{let l=await (0,eB.fieldSchemasToFormState)({id:i,collectionSlug:r,data:e.fields,documentData:n,fields:t,fieldSchemaMap:void 0,initialBlockData:e.fields,operation:"create"===s||"update"===s?s:"update",permissions:{},preferences:a,renderAllFields:!1,req:o,schemaPath:""}),c=new Set;for(let e in l){let t=l[e];if(t?.errorPaths?.length)for(let e of t.errorPaths)c.add(e)}let d=Array.from(c);return!d.length||"The following fields are invalid: "+d.join(", ")},ex=(0,et.createServerFeature)({feature:async({config:e,isRoot:t,parentIsLocalized:i,props:r})=>{r||(r={});let n=e.collections.map(e=>e.slug)||[],s=ev(r.fields?r.fields:null,e,r.enabledCollections,r.disabledCollections,r.maxDepth),a=await (0,ee.sanitizeFields)({config:e,fields:s,parentIsLocalized:i,requireFieldLevelRichTextEditor:t,validRelationships:n});r.fields=a;let o=a.filter(e=>!("name"in e)||"text"!==e.name),l=null,c=null;for(let e of a)"name"in e&&"linkType"===e.name&&(l=e),"name"in e&&"url"===e.name&&(c=e);return{ClientFeature:"@payloadcms/richtext-lexical/client#LinkFeatureClient",clientFeatureProps:{defaultLinkType:l?"defaultValue"in l&&"string"==typeof l.defaultValue?l.defaultValue:"custom":void 0,defaultLinkURL:c?"defaultValue"in c&&"string"==typeof c.defaultValue?c.defaultValue:"https://":void 0,disableAutoLinks:r.disableAutoLinks,disabledCollections:r.disabledCollections,enabledCollections:r.enabledCollections},generateSchemaMap:()=>{if(!a||!Array.isArray(a)||0===a.length)return null;let e=new Map;return e.set("fields",{fields:a}),e},i18n:ey,markdownTransformers:[eh],nodes:[r?.disableAutoLinks===!0?null:(0,ei.createNode)({converters:{html:{converter:async({converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})=>{let c=await A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n.children,overrideAccess:s,parent:{...n,parent:a},req:o,showHiddenFields:l}),d=n.fields.url??"";return"internal"===n.fields.linkType&&(d="object"!=typeof n.fields.doc?.value?String(n.fields.doc?.value):String(n.fields.doc?.value?.id)),`<a href="${d}"${n.fields.newTab?' rel="noopener noreferrer" target="_blank"':""}>${c}</a>`},nodeTypes:[ep.getType()]}},node:ep,validations:[eQ(r,o)]}),(0,ei.createNode)({converters:{html:{converter:async({converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})=>{let c=await A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n.children,overrideAccess:s,parent:{...n,parent:a},req:o,showHiddenFields:l}),d="custom"===n.fields.linkType?(0,X.default)(n.fields.url):n.fields.doc?.value;return`<a href="${d}"${n.fields.newTab?' rel="noopener noreferrer" target="_blank"':""}>${c}</a>`},nodeTypes:[eo.getType()]}},getSubFields:()=>o,getSubFieldsData:({node:e})=>e?.fields,graphQLPopulationPromises:[em(r)],node:eo,validations:[eQ(r,o)]})].filter(Boolean),sanitizedServerFeatureProps:r}},key:"link"});var eS=e.i(824980),ek=l,eT=p,eN=eS,eD=e.i(256085);let e_={converter:async({converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})=>{let c=await A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n.children,overrideAccess:s,parent:{...n,parent:a},req:o,showHiddenFields:l});return`<${n?.tag} class="list-${n?.listType}">${c}</${n?.tag}>`},nodeTypes:[eN.ListNode.getType()]},eR={converter:async({converters:e,currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,parent:a,req:o,showHiddenFields:l})=>{let c=n.children.some(e=>"list"===e.type),d=await A({converters:e,currentDepth:t,depth:i,draft:r,lexicalNodes:n.children,overrideAccess:s,parent:{...n,parent:a},req:o,showHiddenFields:l});if(!("listType"in a)||a?.listType!=="check")return`<li ${c?'class="nestedListItem" ':""}value=${n?.value}>${d}</li>`;{let e=(0,eD.v4)();return`<li aria-checked=${n.checked?"true":"false"} class="${"list-item-checkbox"+(n.checked?" list-item-checkbox-checked":" list-item-checkbox-unchecked")+(c?" nestedListItem":"")}"
|
||
role="checkbox"
|
||
tabIndex=-1
|
||
value=${n?.value}
|
||
>
|
||
${c?d:`
|
||
<input type="checkbox" id="${e}"${n.checked?" checked":""}>
|
||
<label for="${e}">${d}</label><br>
|
||
`}
|
||
|
||
|
||
</li>`}},nodeTypes:[eN.ListItemNode.getType()]};function eL(e,t){return"ordered"===e?!t.has("unorderedList"):"checklist"===e&&!t.has("unorderedList")&&!t.has("orderedList")}var eF=eS,eM=eS;let eO=4,eU=e=>(t,i,r)=>{let n=t.getPreviousSibling(),s=t.getNextSibling(),a=(0,eM.$createListItemNode)("check"===e?"x"===r[3]:void 0);if((0,eM.$isListNode)(s)&&s.getListType()===e){let e=s.getFirstChild();null!==e?e.insertBefore(a):s.append(a),t.remove()}else if((0,eM.$isListNode)(n)&&n.getListType()===e)n.append(a),t.remove();else{let i=(0,eM.$createListNode)(e,"number"===e?Number(r[2]):void 0);i.append(a),t.replace(i)}a.append(...i),a.select(0,0);let o=Math.floor(r[1].length/eO);o&&a.setIndent(o)},eP=(e,t,i)=>{let r=[],n=e.getChildren(),s=0;for(let a of n)if((0,eM.$isListItemNode)(a)){if(1===a.getChildrenSize()){let e=a.getFirstChild();if((0,eM.$isListNode)(e)){r.push(eP(e,t,i+1));continue}}let n=" ".repeat(i*eO),o=e.getListType(),l="number"===o?`${e.getStart()+s}. `:"check"===o?`- [${a.getChecked()?"x":" "}] `:"- ";r.push(n+l+t(a)),s++}return r.join("\n")},e$={type:"element",dependencies:[eF.ListNode,eF.ListItemNode],export:(e,t)=>(0,eF.$isListNode)(e)?eP(e,t,0):null,regExp:/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,replace:eU("check")},ej={ar:{label:"قائمة التحقق"},az:{label:"Yoxlama Siyahısı"},bg:{label:"Списък за проверка"},cs:{label:"Seznam kontrol"},da:{label:"Tjekliste"},de:{label:"Checkliste"},en:{label:"Check List"},es:{label:"Lista de comprobación"},et:{label:""},fa:{label:"لیست بررسی"},fr:{label:"Liste de contrôle"},he:{label:"רשימת בדיקה"},hr:{label:"Kontrolni popis"},hu:{label:"Ellenőrzőlista"},is:{label:"Gátlisti"},it:{label:"Lista di controllo"},ja:{label:"チェックリスト"},ko:{label:"체크 리스트"},my:{label:"Senarai Semak"},nb:{label:"Sjekkliste"},nl:{label:"Checklist"},pl:{label:"Lista kontrolna"},pt:{label:"Lista de Verificação"},ro:{label:"Listă de verificare"},rs:{label:"Контролна листа"},"rs-latin":{label:"Kontrolna lista"},ru:{label:"Список Проверки"},sk:{label:"Kontrolný zoznam"},sl:{label:"Nimekiri"},sv:{label:"Kontrollista"},ta:{label:"சரிபார்ப்பு பட்டியல்"},th:{label:"รายการตรวจสอบ"},tr:{label:"Kontrol Listesi"},uk:{label:"Список перевірки"},vi:{label:"Danh sách kiểm tra"},zh:{label:"检查清单"},"zh-TW":{label:"檢查清單"}},eH=(0,ek.createServerFeature)({feature:({featureProviderMap:e})=>({ClientFeature:"@payloadcms/richtext-lexical/client#ChecklistFeatureClient",i18n:ej,markdownTransformers:[e$],nodes:eL("checklist",e)?[(0,eT.createNode)({converters:{html:e_},node:eS.ListNode}),(0,eT.createNode)({converters:{html:eR},node:eS.ListItemNode})]:[]}),key:"checklist"});var eq=eS,ez=l,eV=p,eG=eS;let eY={type:"element",dependencies:[eG.ListNode,eG.ListItemNode],export:(e,t)=>(0,eG.$isListNode)(e)?eP(e,t,0):null,regExp:/^(\s*)(\d+)\.\s/,replace:eU("number")},eW={ar:{label:"قائمة مرتبة"},az:{label:"Sıralı Siyahı"},bg:{label:"Подреден списък"},cs:{label:"Seřazený seznam"},da:{label:"Ordnet Liste"},de:{label:"Geordnete Liste"},en:{label:"Ordered List"},es:{label:"Lista ordenada"},et:{label:"Sorteeritud loend"},fa:{label:"لیست مرتب شده"},fr:{label:"Liste ordonnée"},he:{label:"רשימה ממוינת"},hr:{label:"Naručeni popis"},hu:{label:"Rendelt lista"},is:{label:"Raðaður listi"},it:{label:"Elenco ordinato"},ja:{label:"順序付きリスト"},ko:{label:"주문된 목록"},my:{label:"စီစဉ်ထားသော စာရင်း"},nb:{label:"Ordnet Liste"},nl:{label:"Geordende Lijst"},pl:{label:"Uporządkowana lista"},pt:{label:"Lista Ordenada"},ro:{label:"Lista ordonată"},rs:{label:"Уређена листа"},"rs-latin":{label:"Uređena lista"},ru:{label:"Упорядоченный список"},sk:{label:"Zoradený zoznam"},sl:{label:"Urejen seznam"},sv:{label:"Ordnad Lista"},ta:{label:"வரிசைப்படுத்தப்பட்ட பட்டியல்"},th:{label:"รายการที่ถูกจัดลำดับ"},tr:{label:"Sıralı Liste"},uk:{label:"Впорядкований список"},vi:{label:"Danh sách đã sắp xếp"},zh:{label:"有序列表"},"zh-TW":{label:"有序列表"}},eJ=(0,ez.createServerFeature)({feature:({featureProviderMap:e})=>({ClientFeature:"@payloadcms/richtext-lexical/client#OrderedListFeatureClient",i18n:eW,markdownTransformers:[eY],nodes:eL("ordered",e)?[(0,eV.createNode)({converters:{html:e_},node:eq.ListNode}),(0,eV.createNode)({converters:{html:eR},node:eq.ListItemNode})]:[]}),key:"orderedList"});var eK=eS,eZ=l,eX=p,e0=eS;let e1={type:"element",dependencies:[e0.ListNode,e0.ListItemNode],export:(e,t)=>(0,e0.$isListNode)(e)?eP(e,t,0):null,regExp:/^(\s*)[-*+]\s/,replace:eU("bullet")},e2={ar:{label:"قائمة غير مرتبة"},az:{label:"Sırasız Siyahı"},bg:{label:"Неподреден списък"},cs:{label:"Neuspořádaný seznam"},da:{label:"Usorteret Liste"},de:{label:"Ungeordnete Liste"},en:{label:"Unordered List"},es:{label:"Lista desordenada"},et:{label:"Sorteerimata loend"},fa:{label:"لیست بدون ترتیب"},fr:{label:"Liste non ordonnée"},he:{label:"רשימה לא מסודרת"},hr:{label:"Neuređeni popis"},hu:{label:"Rendezetlen lista"},is:{label:"Óraðaður listi"},it:{label:"Elenco non ordinato"},ja:{label:"順不同リスト"},ko:{label:"비정렬 목록"},my:{label:"Senarai Tidak Tertib"},nb:{label:"Usortert liste"},nl:{label:"Ongeordende lijst"},pl:{label:"Nieuporządkowana lista"},pt:{label:"Lista Não Ordenada"},ro:{label:"Listă neordonată"},rs:{label:"Неуређена листа"},"rs-latin":{label:"Neuređena lista"},ru:{label:"Несортированный список"},sk:{label:"Neusporiadaný zoznam"},sl:{label:"Neurejen seznam"},sv:{label:"Oordnad lista"},ta:{label:"வரிசைப்படுத்தப்படாத பட்டியல்"},th:{label:"รายการที่ไม่ได้เรียงลำดับ"},tr:{label:"Sırasız Liste"},uk:{label:"Невпорядкований список"},vi:{label:"Danh sách không theo thứ tự"},zh:{label:"无序列表"},"zh-TW":{label:"無順序列表"}},e4=(0,eZ.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#UnorderedListFeatureClient",i18n:e2,markdownTransformers:[e1],nodes:[(0,eX.createNode)({converters:{html:e_},node:eK.ListNode}),(0,eX.createNode)({converters:{html:eR},node:eK.ListItemNode})]},key:"unorderedList"}),e5={ar:{label:"فقرة",label2:"نص عادي"},az:{label:"Paraqraf",label2:"Normal Mətn"},bg:{label:"Параграф",label2:"Нормален текст"},cs:{label:"Odstavec",label2:"Normální text"},da:{label:"Afsnit",label2:"Normal tekst"},de:{label:"Paragraph",label2:"Normaler Text"},en:{label:"Paragraph",label2:"Normal Text"},es:{label:"Párrafo",label2:"Texto normal"},et:{label:"Paragrahv",label2:"Tavaline tekst"},fa:{label:"پاراگراف",label2:"متن عادی"},fr:{label:"Paragraphe",label2:"Texte normal"},he:{label:"פסקה",label2:"טקסט רגיל"},hr:{label:"Odlomak",label2:"Normalan tekst"},hu:{label:"Bekezdés",label2:"Normál szöveg"},is:{label:"Málsgrein",label2:"Venjulegur texti"},it:{label:"Paragrafo",label2:"Testo normale"},ja:{label:"段落",label2:"通常のテキスト"},ko:{label:"문단",label2:"일반 텍스트"},my:{label:"Perenggan",label2:"ပုံမှန်စာသား"},nb:{label:"Avsnitt",label2:"Normal tekst"},nl:{label:"Paragraaf",label2:"Normale tekst"},pl:{label:"Akapit",label2:"Normalny tekst"},pt:{label:"Parágrafo",label2:"Texto Normal"},ro:{label:"Paragraf",label2:"Text normal"},rs:{label:"Параграф",label2:"Oбичан текст"},"rs-latin":{label:"Paragraf",label2:"Običan tekst"},ru:{label:"Параграф",label2:"Нормальный текст"},sk:{label:"Odsek",label2:"Normálny text"},sl:{label:"Odstavek",label2:"Navaden besedilo"},sv:{label:"Stycke",label2:"Normal Text"},ta:{label:"பத்தி",label2:"சாதாரண உரை"},th:{label:"ย่อหน้า",label2:"ข้อความธรรมดา"},tr:{label:"Paragraf",label2:"Normal Metin"},uk:{label:"Абзац",label2:"Звичайний текст"},vi:{label:"Đoạn văn",label2:"Văn bản bình thường"},zh:{label:"段落",label2:"正常文本"},"zh-TW":{label:"段落",label2:"正常文本"}},e3=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#ParagraphFeatureClient",clientFeatureProps:null,i18n:e5},key:"paragraph"});var e8=e.i(271607);let e9=async({id:e,collectionSlug:t,currentDepth:i,data:r,depth:n,draft:s,key:a,overrideAccess:o,req:l,select:c,showHiddenFields:d})=>{if(!(n&&i<=n))return;let u=r,h=await l.payloadDataLoader?.load((0,e8.createDataloaderCacheKey)({collectionSlug:t,currentDepth:i+1,depth:n,docID:e,draft:s,fallbackLocale:l.fallbackLocale,locale:l.locale,overrideAccess:o,select:c,showHiddenFields:d,transactionID:l.transactionID}));h?u[a]=h:u[a]=null};var e6=l,e7=p;let te=e=>({currentDepth:t,depth:i,draft:r,node:n,overrideAccess:s,populationPromises:a,req:o,showHiddenFields:l})=>{if(n?.value){let c=n?.value?.id||n?.value,d=o.payload.collections[n?.relationTo];if(d){let u=e?.maxDepth!==void 0&&e?.maxDepth<i?e?.maxDepth:i;a.push(e9({id:c,collectionSlug:d.config.slug,currentDepth:t,data:n,depth:u,draft:r,key:"value",overrideAccess:s,req:o,showHiddenFields:l}))}}},tt={ar:{label:"العلاقة"},az:{label:"Münasibət"},bg:{label:"Връзка"},cs:{label:"Vztah"},da:{label:"Forhold"},de:{label:"Beziehung"},en:{label:"Relationship"},es:{label:"Relación"},et:{label:"Seos"},fa:{label:"روابط"},fr:{label:"Relation"},he:{label:"יחסים"},hr:{label:"Odnos"},hu:{label:"Kapcsolat"},is:{label:"Tengingar"},it:{label:"Relazione"},ja:{label:"関係性"},ko:{label:"관계"},my:{label:"Hubungan"},nb:{label:"Forhold"},nl:{label:"Relatie"},pl:{label:"Relacja"},pt:{label:"Relacionamento"},ro:{label:"Relație"},rs:{label:"Релација"},"rs-latin":{label:"Relacija"},ru:{label:"Отношения"},sk:{label:"Vzťah"},sl:{label:"Odnos"},sv:{label:"Relation"},ta:{label:"உறவு"},th:{label:"ความสัมพันธ์"},tr:{label:"İlişki"},uk:{label:"Стосунки"},vi:{label:"Mối quan hệ"},zh:{label:"关系"},"zh-TW":{label:"關係"}};var ti=e.i(136101),tr=q;function tn(e){let t=e.getAttribute("data-lexical-relationship-id"),i=e.getAttribute("data-lexical-relationship-relationTo");return null!=t&&null!=i?{node:ta({relationTo:i,value:t})}:null}class ts extends ti.DecoratorBlockNode{__data;constructor({data:e,format:t,key:i}){super(t,i),this.__data=e}static clone(e){return new this({data:e.__data,format:e.__format,key:e.__key})}static getType(){return"relationship"}static importDOM(){return{div:e=>e.hasAttribute("data-lexical-relationship-relationTo")&&e.hasAttribute("data-lexical-relationship-id")?{conversion:tn,priority:2}:null}}static importJSON(e){1===e.version&&e?.value?.id&&(e.value=e.value.id);let t=ta({relationTo:e.relationTo,value:e.value});return t.setFormat(e.format),t}static isInline(){return!1}createDOM(e){let t=document.createElement("div");return(0,tr.addClassNamesToElement)(t,e?.theme?.relationship),t}decorate(e,t){return null}exportDOM(){let e=document.createElement("div");e.setAttribute("data-lexical-relationship-id",String("object"==typeof this.__data?.value?this.__data?.value?.id:this.__data?.value)),e.setAttribute("data-lexical-relationship-relationTo",this.__data?.relationTo);let t=document.createTextNode(this.getTextContent());return e.append(t),{element:e}}exportJSON(){return{...super.exportJSON(),...this.getData(),type:"relationship",version:2}}getData(){return this.getLatest().__data}getTextContent(){return`${this.__data?.relationTo} relation to ${"object"==typeof this.__data?.value?this.__data?.value?.id:this.__data?.value}`}setData(e){this.getWritable().__data=e}}function ta(e){return(0,tr.$applyNodeReplacement)(new ts({data:e}))}let to=(0,e6.createServerFeature)({feature:({props:e})=>{let{maxDepth:t,...i}=e??{};return{ClientFeature:"@payloadcms/richtext-lexical/client#RelationshipFeatureClient",clientFeatureProps:i,i18n:tt,nodes:[(0,e7.createNode)({graphQLPopulationPromises:[te(e)],hooks:{afterRead:[({currentDepth:e,depth:i,draft:r,node:n,overrideAccess:s,populateArg:a,populationPromises:o,req:l,showHiddenFields:c})=>{if(!n?.value)return n;let d=l.payload.collections[n?.relationTo];if(!d)return n;let u=n?.value?.id||n?.value,h=void 0!==t&&t<i?t:i;return o.push(e9({id:u,collectionSlug:d.config.slug,currentDepth:e,data:n,depth:h,draft:r,key:"value",overrideAccess:s,req:l,select:a?.[d.config.slug]??d.config.defaultPopulate,showHiddenFields:c})),n}]},node:ts})]}},key:"relationship"}),tl=(0,l.createServerFeature)({feature:{ClientFeature:"@payloadcms/richtext-lexical/client#InlineToolbarFeatureClient"},key:"toolbarInline"});var tc=ee,td=l,tu=p,th=eg;let tA=e=>({context:t,currentDepth:i,depth:r,draft:n,editorPopulationPromises:s,field:a,fieldPromises:o,findMany:l,flattenLocales:c,node:d,overrideAccess:u,parentIsLocalized:h,populationPromises:A,req:p,showHiddenFields:f})=>{if(d?.value){let g=p.payload.collections[d?.relationTo];if(g){let m=d?.value?.id||d?.value,y=e?.maxDepth!==void 0&&e?.maxDepth<r?e?.maxDepth:r;A.push(e9({id:m,collectionSlug:g.config.slug,currentDepth:i,data:d,depth:y,draft:n,key:"value",overrideAccess:u,req:p,showHiddenFields:f}));let b=e?.collections?.[d?.relationTo]?.fields;if(Array.isArray(b)){if(!b?.length)return;(0,th.recursivelyPopulateFieldsForGraphQL)({context:t,currentDepth:i,data:d.fields||{},depth:r,parentIsLocalized:h||a.localized||!1,draft:n,editorPopulationPromises:s,fieldPromises:o,fields:b,findMany:l,flattenLocales:c,overrideAccess:u,populationPromises:A,req:p,showHiddenFields:f,siblingDoc:d.fields||{}})}}}},tp={ar:{label:"تحميل"},az:{label:"Yükləyin"},bg:{label:"Качване"},cs:{label:"Nahrát"},da:{label:"Upload"},de:{label:"Datei"},en:{label:"Upload"},es:{label:"Subir"},et:{label:"Lae üles"},fa:{label:"بارگذاری"},fr:{label:"Télécharger"},he:{label:"העלה"},hr:{label:"Prenesi"},hu:{label:"Feltöltés"},is:{label:"Hlaða upp"},it:{label:"Carica"},ja:{label:"アップロード"},ko:{label:"업로드"},my:{label:"တင်ပြီး"},nb:{label:"Last opp"},nl:{label:"Uploaden"},pl:{label:"Prześlij"},pt:{label:"Carregar"},ro:{label:"Încarcă"},rs:{label:"Отпреми"},"rs-latin":{label:"Otpremi"},ru:{label:"Загрузить"},sk:{label:"Nahrať"},sl:{label:"Naloži"},sv:{label:"Ladda upp"},ta:{label:"பதிவேற்றம்"},th:{label:"อัปโหลด"},tr:{label:"Yükle"},uk:{label:"Завантажити"},vi:{label:"Tải lên"},zh:{label:"上传"},"zh-TW":{label:"上傳"}};var tf=ti,tg=q,tm=es,ty=es;function tb(e,t){if(e.hasAttribute("data-lexical-pending-upload-form-id")){let i=e.getAttribute("data-lexical-pending-upload-form-id");if(null!=i)return{node:t({data:{pending:{formID:i,src:e.getAttribute("src")||""}}})}}if(e.hasAttribute("data-lexical-upload-relation-to")&&e.hasAttribute("data-lexical-upload-id")){let i=e.getAttribute("data-lexical-upload-id"),r=e.getAttribute("data-lexical-upload-relation-to");if(null!=i&&null!=r)return{node:t({data:{fields:{},relationTo:r,value:i}})}}return{node:t({data:{pending:{formID:new ty.default.default().toHexString(),src:e.getAttribute("src")||""}}})}}class tE extends tf.DecoratorBlockNode{__data;constructor({data:e,format:t,key:i}){super(t,i),this.__data=e}static clone(e){return new this({data:e.__data,format:e.__format,key:e.__key})}static getType(){return"upload"}static importDOM(){return{img:e=>({conversion:e=>tb(e,tC),priority:0})}}static importJSON(e){1===e.version&&e?.value?.id&&(e.value=e.value.id),2!==e.version||e?.id||(e.id=new tm.default.default().toHexString(),e.version=3);let t=tC({data:{id:e.id,fields:e.fields,pending:e.pending,relationTo:e.relationTo,value:e.value}});return t.setFormat(e.format),t}static isInline(){return!1}createDOM(e){let t=document.createElement("div");return(0,tg.addClassNamesToElement)(t,e?.theme?.upload),t}decorate(){return null}exportDOM(){let e=document.createElement("img"),t=this.__data;return t.pending?(e.setAttribute("data-lexical-pending-upload-form-id",String(t?.pending?.formID)),e.setAttribute("src",t?.pending?.src||"")):(e.setAttribute("data-lexical-upload-id",String(t?.value)),e.setAttribute("data-lexical-upload-relation-to",t?.relationTo)),{element:e}}exportJSON(){return{...super.exportJSON(),...this.getData(),type:"upload",version:3}}getData(){return this.getLatest().__data}setData(e){this.getWritable().__data=e}updateDOM(){return!1}}function tC({data:e}){return e?.id||(e.id=new tm.default.default().toHexString()),(0,tg.$applyNodeReplacement)(new tE({data:e}))}function tw(e){return e instanceof tE}let tI={type:"element",dependencies:[tE],export:e=>{if(!tw(e))return null;let t=e.getData(),i=t?.value;if(i&&"object"==typeof i&&"url"in i){let e=i.url,r=t.fields?.alt||i.alt||i.filename||"";if(i.mimeType&&!i.mimeType.startsWith("image")){let t=i.filename||e;return`[${t}](${e})`}return``}let r="object"==typeof i?i?.id:i;return`![${t.relationTo}:${r}]()`},regExp:/!\[([^\]:]+):([^\]]+)\]\(\)/,replace:(e,t,i,r)=>{if(!r||!i[1]||!i[2])return!1;let n=i[1],s=i[2],a=tC({data:{fields:{},relationTo:n,value:/^\d+$/.test(s)?Number(s):s}});return e.replace(a),!0}};var tv=eB,tB=e.i(747846);let tQ=e=>async({node:t,validation:{options:{id:i,data:r,operation:n,preferences:s,req:a,req:{payload:o,t:l}}}})=>{let c=o.collections[t.relationTo]?.customIDType||o.db.defaultIDType,d=t?.value?.id||t?.value;if(!(0,tB.isValidID)(d,c))return l("validation:validUploadID");if(!e?.collections||0===Object.keys(e?.collections).length)return!0;let u=e?.collections[t.relationTo];if(!u?.fields?.length)return!0;let h=await (0,tv.fieldSchemasToFormState)({id:i,collectionSlug:t.relationTo,data:t?.fields??{},documentData:r,fields:u.fields,fieldSchemaMap:void 0,initialBlockData:t?.fields??{},operation:"create"===n||"update"===n?n:"update",permissions:{},preferences:s,renderAllFields:!1,req:a,schemaPath:""}),A=new Set;for(let e in h){let t=h[e];if(t?.errorPaths?.length)for(let e of t.errorPaths)A.add(e)}let p=Array.from(A);return!p.length||"The following fields are invalid: "+p.join(", ")};function tx(e,t){return e?.startsWith("http")?e:(t?.config?.serverURL||"")+e}let tS=(0,td.createServerFeature)({feature:async({config:e,isRoot:t,parentIsLocalized:i,props:r})=>{r||(r={collections:{}});let n={collections:{}};if(r.disabledCollections&&(n.disabledCollections=r.disabledCollections),r.enabledCollections&&(n.enabledCollections=r.enabledCollections),r.collections)for(let e in r.collections)n.collections[e]={hasExtraFields:r.collections[e].fields.length>=1};let s=e.collections.map(e=>e.slug)||[];for(let n in r.collections){let a=r.collections[n];a.fields?.length&&(a.fields=await (0,tc.sanitizeFields)({config:e,fields:a.fields,parentIsLocalized:i,requireFieldLevelRichTextEditor:t,validRelationships:s}))}return{ClientFeature:"@payloadcms/richtext-lexical/client#UploadFeatureClient",clientFeatureProps:n,generateSchemaMap:({props:e})=>{if(!e?.collections)return null;let t=new Map;for(let i in e.collections){let r=e.collections[i];r.fields?.length&&t.set(i,{fields:r.fields})}return t},i18n:tp,markdownTransformers:[tI],nodes:[(0,tu.createNode)({converters:{html:{converter:async({currentDepth:e,depth:t,draft:i,node:r,overrideAccess:n,req:s,showHiddenFields:a})=>{let o=r?.value?.id||r?.value;if(!s?.payload)return`<img src="${o}" />`;{let l={};try{await e9({id:o,collectionSlug:r.relationTo,currentDepth:e,data:l,depth:t,draft:i,key:"value",overrideAccess:n,req:s,showHiddenFields:a})}catch(e){return console.error("Lexical upload node HTML converter: error fetching upload file",e,"Node:",r),"<img />"}let c=tx(l?.value?.url??"",s?.payload),d=r.fields?.alt||l?.value?.alt||"";if(!l?.value?.mimeType?.startsWith("image"))return`<a href="${c}" rel="noopener noreferrer">${l.value?.filename}</a>`;if(!l?.value?.sizes||!Object.keys(l?.value?.sizes).length)return`<img src="${c}" alt="${d}" width="${l?.value?.width}" height="${l?.value?.height}"/>`;let u="<picture>";for(let e in l.value?.sizes){let t=l.value.sizes[e];if(!t.width||!t.height||!t.mimeType||!t.filesize||!t.filename||!t.url)continue;let i=tx(t?.url,s?.payload);u+=`<source srcset="${i}" media="(max-width: ${t.width}px)" type="${t.mimeType}">`}return u+`<img src="${c}" alt="${d}" width="${l.value?.width}" height="${l.value?.height}"></picture>`}},nodeTypes:[tE.getType()]}},getSubFields:({node:e,req:t})=>{if(!e){let e=[];for(let t in r?.collections){let i=r.collections[t].fields;e=e.concat(i)}return e}if(t?t.payload.collections[e?.relationTo]:null){let t=r?.collections?.[e?.relationTo]?.fields;if(Array.isArray(t))return t?.length?t:null}return null},getSubFieldsData:({node:e})=>e?.fields,graphQLPopulationPromises:[tA(r)],hooks:{afterRead:[({currentDepth:e,depth:t,draft:i,node:n,overrideAccess:s,populateArg:a,populationPromises:o,req:l,showHiddenFields:c})=>{if(!n?.value)return n;let d=l.payload.collections[n?.relationTo];if(!d)return n;let u=n?.value?.id||n?.value,h=r?.maxDepth!==void 0&&r?.maxDepth<t?r?.maxDepth:t;return o.push(e9({id:u,collectionSlug:d.config.slug,currentDepth:e,data:n,depth:h,draft:i,key:"value",overrideAccess:s,req:l,select:a?.[d.config.slug]??d.config.defaultPopulate,showHiddenFields:c})),n}]},node:tE,validations:[tQ(r)]})],sanitizedServerFeatureProps:r}},key:"upload"}),tk={namespace:"lexical",theme:{block:"LexicalEditorTheme__block",blockCursor:"LexicalEditorTheme__blockCursor",characterLimit:"LexicalEditorTheme__characterLimit",code:"LexicalEditorTheme__code",inlineBlock:"LexicalEditorTheme__inlineBlock",heading:{h1:"LexicalEditorTheme__h1",h2:"LexicalEditorTheme__h2",h3:"LexicalEditorTheme__h3",h4:"LexicalEditorTheme__h4",h5:"LexicalEditorTheme__h5",h6:"LexicalEditorTheme__h6"},hr:"LexicalEditorTheme__hr",hrSelected:"LexicalEditorTheme__hrSelected",indent:"LexicalEditorTheme__indent",link:"LexicalEditorTheme__link",list:{checklist:"LexicalEditorTheme__checklist",listitem:"LexicalEditorTheme__listItem",listitemChecked:"LexicalEditorTheme__listItemChecked",listitemUnchecked:"LexicalEditorTheme__listItemUnchecked",nested:{listitem:"LexicalEditorTheme__nestedListItem"},olDepth:["LexicalEditorTheme__ol1","LexicalEditorTheme__ol2","LexicalEditorTheme__ol3","LexicalEditorTheme__ol4","LexicalEditorTheme__ol5"],ul:"LexicalEditorTheme__ul"},ltr:"LexicalEditorTheme__ltr",mark:"LexicalEditorTheme__mark",markOverlap:"LexicalEditorTheme__markOverlap",paragraph:"LexicalEditorTheme__paragraph",placeholder:"LexicalEditorTheme__placeholder",quote:"LexicalEditorTheme__quote",relationship:"LexicalEditorTheme__relationship",rtl:"LexicalEditorTheme__rtl",tab:"LexicalEditorTheme__tabNode",table:"LexicalEditorTheme__table",tableAddColumns:"LexicalEditorTheme__tableAddColumns",tableAddRows:"LexicalEditorTheme__tableAddRows",tableAlignment:{center:"LexicalEditorTheme__tableAlignmentCenter",right:"LexicalEditorTheme__tableAlignmentRight"},tableCell:"LexicalEditorTheme__tableCell",tableCellActionButton:"LexicalEditorTheme__tableCellActionButton",tableCellActionButtonContainer:"LexicalEditorTheme__tableCellActionButtonContainer",tableCellHeader:"LexicalEditorTheme__tableCellHeader",tableCellResizer:"LexicalEditorTheme__tableCellResizer",tableCellSelected:"LexicalEditorTheme__tableCellSelected",tableFrozenColumn:"LexicalEditorTheme__tableFrozenColumn",tableRowStriping:"LexicalEditorTheme__tableRowStriping",tableScrollableWrapper:"LexicalEditorTheme__tableScrollableWrapper",tableSelected:"LexicalEditorTheme__tableSelected",tableSelection:"LexicalEditorTheme__tableSelection",text:{bold:"LexicalEditorTheme__textBold",code:"LexicalEditorTheme__textCode",italic:"LexicalEditorTheme__textItalic",strikethrough:"LexicalEditorTheme__textStrikethrough",subscript:"LexicalEditorTheme__textSubscript",superscript:"LexicalEditorTheme__textSuperscript",underline:"LexicalEditorTheme__textUnderline",underlineStrikethrough:"LexicalEditorTheme__textUnderlineStrikethrough"},upload:"LexicalEditorTheme__upload"}},tT=[I(),S(),_(),T(),N(),D(),B(),e3(),P(),d(),Z(),e4(),eJ(),eH(),ex(),to(),y(),tS(),J(),tl()],tN={features:tT,lexical:tk};function tD({callback:e,nodes:t}){for(let i of t)e(i),"children"in i&&Array.isArray(i?.children)&&i?.children?.length&&tD({callback:e,nodes:i.children})}let t_=({context:e,currentDepth:t,depth:i,draft:r,editorPopulationPromises:n,field:s,fieldPromises:a,findMany:o,flattenLocales:l,overrideAccess:c,parentIsLocalized:d,populationPromises:u,req:h,showHiddenFields:A,siblingDoc:p})=>{i&&t<=i&&tD({callback:f=>{let g=n?.get(f.type);if(g)for(let m of g)m({context:e,currentDepth:t,depth:i,draft:r,editorPopulationPromises:n,field:s,fieldPromises:a,findMany:o,flattenLocales:l,node:f,overrideAccess:c,parentIsLocalized:d,populationPromises:u,req:h,showHiddenFields:A,siblingDoc:p})},nodes:p[s?.name]?.root?.children??[]})};function tR(e){let t={};for(let i of e)t[i.key]={dependencies:i.dependencies||[],dependenciesPriority:i.dependenciesPriority||[],dependenciesSoft:i.dependenciesSoft||[],featureProvider:i};return t}function tL(e){let t=tR(e),i={},r=[];for(let e in t)i[e]||tF(t,e,i,r);return r.reverse()}function tF(e,t,i,r,n=[]){if(!e[t])throw Error(`Feature key ${t} is not present in the dependency graph.`);if(n.includes(t))throw Error(`Circular dependency detected: ${n.join(" -> ")} -> ${t}`);if(!i[t]){for(let s of(i[t]=!0,n.push(t),e[t].dependenciesPriority))i[s]||tF(e,s,i,r,n);for(let s of e[t].dependencies)i[s]||e[t].dependenciesPriority.includes(s)||tF(e,s,i,r,n);for(let s of e[t].dependenciesSoft)!e[s]||i[s]||e[t].dependenciesPriority.includes(s)||e[t].dependencies.includes(s)||tF(e,s,i,r,n);r.push(e[t].featureProvider),n.pop()}}function tM(e){return tL(e)}async function tO({config:e,isRoot:t,parentIsLocalized:i,unSanitizedEditorConfig:r}){r.features=r.features.reverse().filter((e,t,i)=>i.findIndex(t=>t.key===e.key)===t).reverse(),r.features=tM(r.features);let n=new Map(r.features.map(e=>[e.key,e])),s=new Map,a=0;for(let o of r.features){if(!o.key)throw Error("A Feature you've added does not have a key. Please add a key to the feature. This is used to uniquely identify the feature.");if(o.dependencies?.length){for(let e of o.dependencies)if(!r.features.find(t=>t.key===e))throw Error(`Feature ${o.key} has a dependency ${e} which does not exist.`)}if(o.dependenciesPriority?.length){for(let e of o.dependenciesPriority)if(!s.get(e)){if(r.features.find(t=>t.key===e))throw Error(`Feature ${o.key} has a priority dependency ${e} which is not loaded before it.`);throw Error(`Feature ${o.key} has a priority dependency ${e} which does not exist.`)}}let l="function"==typeof o.feature?await o.feature({config:e,featureProviderMap:n,isRoot:t,parentIsLocalized:i,resolvedFeatures:s,unSanitizedEditorConfig:r}):o.feature;l.key=o.key,l.order=a,l.dependencies=o.dependencies,l.dependenciesPriority=o.dependenciesPriority,l.dependenciesSoft=o.dependenciesSoft,s.set(o.key,l),a++}return s}let tU=e=>{let t={converters:{html:[]},enabledFeatures:[],generatedTypes:{modifyOutputSchemas:[]},getSubFields:new Map,getSubFieldsData:new Map,graphQLPopulationPromises:new Map,hooks:{afterChange:[],afterRead:[],beforeChange:[],beforeValidate:[]},i18n:{},markdownTransformers:[],nodeHooks:{afterChange:new Map,afterRead:new Map,beforeChange:new Map,beforeValidate:new Map},nodes:[],validations:new Map};return e?.size&&e.forEach(e=>{if(e?.generatedTypes?.modifyOutputSchema&&t.generatedTypes.modifyOutputSchemas.push(e.generatedTypes.modifyOutputSchema),e?.hooks?.beforeValidate?.length&&(t.hooks.beforeValidate=t.hooks.beforeValidate?.concat(e.hooks.beforeValidate)),e?.hooks?.beforeChange?.length&&(t.hooks.beforeChange=t.hooks.beforeChange?.concat(e.hooks.beforeChange)),e?.hooks?.afterRead?.length&&(t.hooks.afterRead=t.hooks.afterRead?.concat(e.hooks.afterRead)),e?.hooks?.afterChange?.length&&(t.hooks.afterChange=t.hooks.afterChange?.concat(e.hooks.afterChange)),e?.i18n)for(let i in e.i18n)t.i18n[i]||(t.i18n[i]={lexical:{}}),t.i18n[i].lexical[e.key]=e.i18n[i];if(e.nodes?.length){for(let i of e.nodes)t.nodes.push(i);e.nodes.forEach(e=>{let i="with"in e.node?e.node.replace.getType():e.node.getType();e?.graphQLPopulationPromises?.length&&t.graphQLPopulationPromises.set(i,e.graphQLPopulationPromises),e?.validations?.length&&t.validations.set(i,e.validations),e?.converters?.html&&t.converters.html.push(e.converters.html),e?.hooks?.afterChange&&t.nodeHooks?.afterChange?.set(i,e.hooks.afterChange),e?.hooks?.afterRead&&t.nodeHooks?.afterRead?.set(i,e.hooks.afterRead),e?.hooks?.beforeChange&&t.nodeHooks?.beforeChange?.set(i,e.hooks.beforeChange),e?.hooks?.beforeValidate&&t.nodeHooks?.beforeValidate?.set(i,e.hooks.beforeValidate),e?.getSubFields&&t.getSubFields?.set(i,e.getSubFields),e?.getSubFieldsData&&t.getSubFieldsData?.set(i,e.getSubFieldsData)})}if(e.markdownTransformers?.length)for(let i of e.markdownTransformers)"function"==typeof i?t.markdownTransformers.push(i({allNodes:t.nodes,allTransformers:t.markdownTransformers})):t.markdownTransformers.push(i);t.enabledFeatures.push(e.key)}),t};async function tP(e,t,i){let r=await tO({config:t,parentIsLocalized:i,unSanitizedEditorConfig:e});return{features:tU(r),lexical:e.lexical,resolvedFeatureMap:r}}let t$=e.g._payload_lexical_defaultSanitizedServerEditorConfig;t$||(t$=e.g._payload_lexical_defaultSanitizedServerEditorConfig=null);let tj=async t=>{let{config:i,parentIsLocalized:r}=t;return t$?await t$:(t$=tP(tN,i,r),e.g.payload_lexical_defaultSanitizedServerEditorConfig=t$,t$=await t$,e.g.payload_lexical_defaultSanitizedServerEditorConfig=t$,t$)},tH=async e=>{let t=[];if(e.features&&"function"==typeof e.features){let i=e.config.editor,r=[];"object"==typeof i&&"features"in i&&(r=i.features),t=e.features({defaultFeatures:tT,rootFeatures:r})}else t=e.features;t||(t=tT);let i=e.lexical??tN.lexical,r=await tO({config:e.config,isRoot:e.isRoot??!1,parentIsLocalized:e.parentIsLocalized??!1,unSanitizedEditorConfig:{features:t,lexical:i}});return{features:t,resolvedFeatureMap:r,sanitizedConfig:{features:tU(r),lexical:e.lexical,resolvedFeatureMap:r}}};var tq=e.i(133415);let tz=e=>({addToImportMap:t,baseDir:i,config:r,importMap:n,imports:s})=>{for(let a of(t("@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell"),t("@payloadcms/richtext-lexical/rsc#RscEntryLexicalField"),t("@payloadcms/richtext-lexical/rsc#LexicalDiffComponent"),e.resolvedFeatureMap.values()))if("componentImports"in a&&("function"==typeof a.componentImports?a.componentImports({addToImportMap:t,baseDir:i,config:r,importMap:n,imports:s}):Array.isArray(a.componentImports)?t(a.componentImports):"object"==typeof a.componentImports&&t(Object.values(a.componentImports))),t(a.ClientFeature),a.nodes?.length)for(let e of a.nodes){if("function"!=typeof e?.getSubFields)continue;let a=e.getSubFields({});a?.length&&(0,tq.genImportMapIterateFields)({addToImportMap:t,baseDir:i,config:r,fields:a,importMap:n,imports:s})}};var tV=e.i(674921),tG=e.i(186725),tY=e.i(951020);let tW=({config:e,fields:t,i18n:i,parentIndexPath:r,parentSchemaPath:n,schemaMap:s})=>{for(let[a,o]of t.entries()){let{indexPath:t,schemaPath:l}=(0,tY.getFieldPaths)({field:o,index:a,parentIndexPath:r,parentSchemaPath:n});switch(s.set(l,o),o.type){case"array":tW({config:e,fields:o.fields,i18n:i,parentIndexPath:"",parentSchemaPath:l,schemaMap:s});break;case"blocks":(o.blockReferences??o.blocks).map(t=>{let r="string"==typeof t?e.blocks.find(e=>e.slug===t):t,n=`${l}.${r.slug}`;s.set(n,r),tW({config:e,fields:r.fields,i18n:i,parentIndexPath:"",parentSchemaPath:l+"."+r.slug,schemaMap:s})});break;case"collapsible":case"row":tW({config:e,fields:o.fields,i18n:i,parentIndexPath:t,parentSchemaPath:l,schemaMap:s});break;case"group":(0,tG.fieldAffectsData)(o)?tW({config:e,fields:o.fields,i18n:i,parentIndexPath:"",parentSchemaPath:l,schemaMap:s}):tW({config:e,fields:o.fields,i18n:i,parentIndexPath:t,parentSchemaPath:l,schemaMap:s});break;case"richText":if(!o?.editor)throw new tV.MissingEditorProp(o);if("function"==typeof o.editor)throw Error("Attempted to access unsanitized rich text editor.");"function"==typeof o.editor.generateSchemaMap&&o.editor.generateSchemaMap({config:e,field:o,i18n:i,schemaMap:s,schemaPath:l});break;case"tab":{let r=(0,tG.tabHasName)(o);tW({config:e,fields:o.fields,i18n:i,parentIndexPath:r?"":t,parentSchemaPath:l,schemaMap:s});break}case"tabs":tW({config:e,fields:o.tabs.map(e=>({...e,type:"tab"})),i18n:i,parentIndexPath:t,parentSchemaPath:l,schemaMap:s})}}},tJ=e=>({config:t,field:i,i18n:r,schemaMap:n,schemaPath:s})=>{for(let[a,o]of e.resolvedFeatureMap.entries()){if(!("generateSchemaMap"in o)||"function"!=typeof o.generateSchemaMap)continue;let e=o.generateSchemaMap({config:t,field:i,i18n:r,props:o.sanitizedServerFeatureProps,schemaMap:n,schemaPath:s});if(e)for(let[i,o]of e.entries())"fields"in o&&tW({config:t,fields:o.fields,i18n:r,parentIndexPath:"",parentSchemaPath:`${s}.lexical_internal_feature.${a}.${i}`,schemaMap:n}),n.set(`${s}.lexical_internal_feature.${a}.${i}`,o)}return n},tK=({flattenedNodes:e,nodeIDMap:t,nodes:i})=>{if(i?.length)for(let r of i)e&&e.push(r),t&&(r&&"id"in r&&r.id?t[r.id]=r:"fields"in r&&"object"==typeof r.fields&&r.fields&&"id"in r.fields&&r?.fields?.id&&(t[r.fields.id]=r)),"children"in r&&Array.isArray(r?.children)&&r?.children?.length&&tK({flattenedNodes:e,nodeIDMap:t,nodes:r.children})};function tZ(e){let t=!!e?.root?.children?.length,i=!1;if(e?.root?.children?.length===1&&e?.root?.children[0]?.type==="paragraph"){let t=e?.root?.children[0];if(t?.children&&t?.children?.length!==0){if(t?.children?.length===1){let e=t?.children[0];e?.type!=="text"||e?.text?.length||(i=!0)}}else i=!0}return!!t&&!i}async function tX({nodes:e,nodeValidations:t,validation:i}){for(let r of e){let e=t.get(r.type);if(e)for(let n of e){let e=await n({node:r,nodeValidations:t,validation:i});if(!0!==e)return`${r.type} node failed to validate: ${e}`}if("children"in r&&r?.children){let e=await tX({nodes:r.children,nodeValidations:t,validation:i});if(!0!==e)return e}}return!0}let t0=({editorConfig:e})=>async(t,i)=>{let{req:{t:r},required:n}=i;if(n&&!1===tZ(t))return r("validation:required");let s=t?.root?.children;return!(s&&Array.isArray(s)&&s?.length)||await tX({nodes:s,nodeValidations:e.features.validations,validation:{options:i,value:t}})};function t1(e){return async({config:l,isRoot:c,parentIsLocalized:d})=>{let u,h,A=[];if(e&&(e.features||e.lexical)){let t=await tH({config:l,features:e?.features,isRoot:c,lexical:e?.lexical,parentIsLocalized:d});h=t.sanitizedConfig,A=t.features,u=t.resolvedFeatureMap}else h=await tj({config:l,parentIsLocalized:d}),A=tT,u=h.resolvedFeatureMap;let p=h.features.i18n;for(let e in o){let t=e;((p[t]??={}).lexical??={}).general=o[t]??{}}return l.i18n.translations=(0,s.deepMergeSimple)(l.i18n.translations,p),{CellComponent:"@payloadcms/richtext-lexical/rsc#RscEntryLexicalCell",DiffComponent:"@payloadcms/richtext-lexical/rsc#LexicalDiffComponent",editorConfig:h,features:A,FieldComponent:{path:"@payloadcms/richtext-lexical/rsc#RscEntryLexicalField",serverProps:{admin:e?.admin}},generateImportMap:tz({resolvedFeatureMap:u}),generateSchemaMap:tJ({resolvedFeatureMap:u}),graphQLPopulationPromises({context:e,currentDepth:t,depth:i,draft:r,field:n,fieldPromises:s,findMany:a,flattenLocales:o,overrideAccess:l,parentIsLocalized:c,populationPromises:d,req:u,showHiddenFields:A,siblingDoc:p}){h?.features?.graphQLPopulationPromises?.size&&t_({context:e,currentDepth:t??0,depth:i,draft:r,editorPopulationPromises:h.features.graphQLPopulationPromises,field:n,fieldPromises:s,findMany:a,flattenLocales:o,overrideAccess:l,parentIsLocalized:c,populationPromises:d,req:u,showHiddenFields:A,siblingDoc:p})},hooks:{afterChange:[async e=>{let{collection:i,context:r,data:n,field:s,global:a,indexPath:o,operation:l,originalDoc:c,parentIsLocalized:d,path:u,previousDoc:A,previousValue:p,req:f,schemaPath:g}=e,{value:m}=e;if(h?.features?.hooks?.afterChange?.length)for(let t of h.features.hooks.afterChange)m=await t(e);if(!h.features.nodeHooks?.afterChange?.size&&!h.features.getSubFields?.size)return m;let y=r,b={},E={},C=y?.internal?.richText?.[u.join(".")]?.originalNodeIDMap;if(!C||!Object.keys(C).length||!m)return m;for(let[e,r]of(tK({nodeIDMap:b,nodes:m?.root?.children??[]}),tK({nodeIDMap:E,nodes:p?.root?.children??[]}),Object.entries(b))){let p=h.features.nodeHooks?.afterChange,m=p?.get(r.type);if(m)for(let t of m){if(!C[e]){console.warn("(afterChange) No original node found for node with id",e,"node:",r,"path",u.join("."));continue}r=await t({context:y,node:r,operation:l,originalNode:C[e],parentRichTextFieldPath:u,parentRichTextFieldSchemaPath:g,previousNode:E[e],req:f})}let b=h.features.getSubFields?.get(r.type),w=h.features.getSubFieldsData?.get(r.type);if(b&&w){let h=b({node:r,req:f}),p=w({node:r,req:f})??{},m=w({node:C[e],req:f})??{},I=w({node:E[e],req:f})??{};h?.length&&await (0,t.traverseFields)({blockData:p,collection:i,context:y,data:n??{},doc:c,fields:h,global:a,operation:l,parentIndexPath:o.join("-"),parentIsLocalized:d||s.localized||!1,parentPath:u.join("."),parentSchemaPath:g.join("."),previousDoc:A,previousSiblingDoc:{...I},req:f,siblingData:p||{},siblingDoc:{...m}})}}return m}],afterRead:[async e=>{let{collection:t,context:r,currentDepth:n,depth:s,draft:a,fallbackLocale:o,field:l,fieldPromises:c,findMany:d,flattenLocales:u,global:A,indexPath:p,locale:f,originalDoc:g,overrideAccess:m,parentIsLocalized:y,path:b,populate:E,populationPromises:C,req:w,schemaPath:I,showHiddenFields:v,triggerAccessControl:B,triggerHooks:Q}=e,{value:x}=e;if(h?.features?.hooks?.afterRead?.length)for(let t of h.features.hooks.afterRead)x=await t(e);if(!h.features.nodeHooks?.afterRead?.size&&!h.features.getSubFields?.size)return x;let S=[];for(let e of(tK({flattenedNodes:S,nodes:x?.root?.children??[]}),S)){let x=h.features.nodeHooks?.afterRead,S=x?.get(e.type);if(S)for(let t of S)e=await t({context:r,currentDepth:n,depth:s,draft:a,fallbackLocale:o,fieldPromises:c,findMany:d,flattenLocales:u,locale:f,node:e,overrideAccess:m,parentRichTextFieldPath:b,parentRichTextFieldSchemaPath:I,populateArg:E,populationPromises:C,req:w,showHiddenFields:v,triggerAccessControl:B,triggerHooks:Q});let k=h.features.getSubFields?.get(e.type),T=h.features.getSubFieldsData?.get(e.type);if(k&&T){let h=k({node:e,req:w}),x=T({node:e,req:w})??{};h?.length&&(0,i.afterReadTraverseFields)({blockData:x,collection:t,context:r,currentDepth:n,depth:s,doc:g,draft:a,fallbackLocale:o,fieldPromises:c,fields:h,findMany:d,flattenLocales:u,global:A,locale:f,overrideAccess:m,parentIndexPath:p.join("-"),parentIsLocalized:y||l.localized||!1,parentPath:b.join("."),parentSchemaPath:I.join("."),populate:E,populationPromises:C,req:w,showHiddenFields:v,siblingDoc:x,triggerAccessControl:B,triggerHooks:Q})}}return x}],beforeChange:[async e=>{let{collection:t,context:i,data:n,docWithLocales:s,errors:a,field:o,fieldLabelPath:l,global:c,indexPath:d,mergeLocaleActions:u,operation:A,originalDoc:p,overrideAccess:f,parentIsLocalized:g,path:m,previousValue:y,req:b,schemaPath:E,siblingData:C,siblingDocWithLocales:w,skipValidation:I}=e,{value:v}=e;if(h?.features?.hooks?.beforeChange?.length)for(let t of h.features.hooks.beforeChange)v=await t(e);if(!h.features.nodeHooks?.beforeChange?.size&&!h.features.getSubFields?.size)return v;let B=i,Q={},x=B?.internal?.richText?.[m.join(".")]?.originalNodeIDMap;if(!x||!Object.keys(x).length||!v)return v;let S={},k={};for(let[e,i]of(tK({nodeIDMap:Q,nodes:v?.root?.children??[]}),tK({nodeIDMap:S,nodes:y?.root?.children??[]}),o.name&&w?.[o.name]&&tK({nodeIDMap:k,nodes:w[o.name]?.root?.children??[]}),Object.entries(Q))){let y=h.features.nodeHooks?.beforeChange,C=y?.get(i.type);if(C)for(let t of C){if(!x[e]){console.warn("(beforeChange) No original node found for node with id",e,"node:",i,"path",m.join("."));continue}i=await t({context:B,errors:a,mergeLocaleActions:u,node:i,operation:A,originalNode:x[e],originalNodeWithLocales:k[e],parentRichTextFieldPath:m,parentRichTextFieldSchemaPath:E,previousNode:S[e],req:b,skipValidation:I})}let w=h.features.getSubFields?.get(i.type),v=h.features.getSubFieldsData?.get(i.type);if(w&&v){let h=w({node:i,req:b}),y=v({node:i,req:b})??{},C=v({node:k[e],req:b})??{},Q=v({node:S[e],req:b})??{};h?.length&&await (0,r.traverseFields)({id:e,blockData:y,collection:t,context:B,data:n??{},doc:p??{},docWithLocales:s??{},errors:a,fieldLabelPath:l,fields:h,global:c,mergeLocaleActions:u,operation:A,overrideAccess:f,parentIndexPath:d.join("-"),parentIsLocalized:g||o.localized||!1,parentPath:m.join("."),parentSchemaPath:E.join("."),req:b,siblingData:y,siblingDoc:Q,siblingDocWithLocales:C??{},skipValidation:I})}}let T={},N=C[o.name];return tK({nodeIDMap:T,nodes:N?.root?.children??[]}),B.internal||(B.internal={}),B.internal.richText||(B.internal.richText={}),B.internal.richText[m.join(".")]={originalNodeIDMap:T},v}],beforeValidate:[async e=>{let{collection:t,context:i,data:r,field:s,global:a,indexPath:o,operation:l,originalDoc:c,overrideAccess:d,parentIsLocalized:u,path:A,previousValue:p,req:f,schemaPath:g}=e,{value:m}=e;if(h?.features?.hooks?.beforeValidate?.length)for(let t of h.features.hooks.beforeValidate)m=await t(e);if(!h.features.nodeHooks?.beforeValidate?.size&&!h.features.nodeHooks?.afterChange?.size&&!h.features.nodeHooks?.beforeChange?.size&&!h.features.getSubFields?.size)return m;let y={};if(tK({nodeIDMap:y,nodes:p?.root?.children??[]}),i.internal||(i.internal={}),i.internal.richText||(i.internal.richText={}),i.internal.richText[A.join(".")]={originalNodeIDMap:y},!h.features.nodeHooks?.beforeValidate?.size)return m;let b={};for(let[e,p]of(tK({nodeIDMap:b,nodes:m?.root?.children??[]}),Object.entries(b))){let m=h.features.nodeHooks.beforeValidate,b=m?.get(p.type);if(b)for(let t of b){if(!y[e]){console.warn("(beforeValidate) No original node found for node with id",e,"node:",p,"path",A.join("."));continue}p=await t({context:i,node:p,operation:l,originalNode:y[e],overrideAccess:d,parentRichTextFieldPath:A,parentRichTextFieldSchemaPath:g,req:f})}let E=h.features.getSubFields?.get(p.type),C=h.features.getSubFieldsData?.get(p.type);if(E&&C){let h=E({node:p,req:f}),m=C({node:p,req:f})??{},b=C({node:y[e],req:f})??{};h?.length&&await (0,n.traverseFields)({id:e,blockData:m,collection:t,context:i,data:r,doc:c,fields:h,global:a,operation:l,overrideAccess:d,parentIndexPath:o.join("-"),parentIsLocalized:u||s.localized||!1,parentPath:A.join("."),parentSchemaPath:g.join("."),req:f,siblingData:m,siblingDoc:b})}}return m}]},outputSchema:({collectionIDFieldTypes:e,config:t,field:i,i18n:r,interfaceNameDefinitions:n,isRequired:s})=>{let o={type:(0,a.withNullableJSONSchemaType)("object",s),properties:{root:{type:"object",additionalProperties:!1,properties:{type:{type:"string"},children:{type:"array",items:{type:"object",additionalProperties:!0,properties:{type:{type:"string",tsType:"any"},version:{type:"integer"}},required:["type","version"]}},direction:{oneOf:[{enum:["ltr","rtl"]},{type:"null"}]},format:{type:"string",enum:["left","start","center","right","end","justify",""]},indent:{type:"integer"},version:{type:"integer"}},required:["children","direction","format","indent","type","version"]}},required:["root"]};for(let a of h.features.generatedTypes.modifyOutputSchemas)o=a({collectionIDFieldTypes:e,config:t,currentSchema:o,field:i,i18n:r,interfaceNameDefinitions:n,isRequired:s});return o},validate:t0({editorConfig:h})}}}e.s(["lexicalEditor",()=>t1],560765)},313958,(e,t,i)=>{"use strict";let r=e.r(792509),n=1800;class s{constructor(e){this.options=e||{},this.cookies=[]}set(e,t){let i,s=r.parse(t||""),a=this.parse(e);return a.domain?(i=a.domain.replace(/^\./,""),(s.hostname.length<i.length||("."+s.hostname).substr(-i.length+1)!=="."+i)&&(a.domain=s.hostname)):a.domain=s.hostname,a.path||(a.path=this.getPath(s.pathname)),a.expires||(a.expires=new Date(Date.now()+1e3*(Number(this.options.sessionTimeout||n)||n))),this.add(a)}get(e){return this.list(e).map(e=>e.name+"="+e.value).join("; ")}list(e){let t,i,r=[];for(t=this.cookies.length-1;t>=0;t--){if(i=this.cookies[t],this.isExpired(i)){this.cookies.splice(t,t);continue}this.match(i,e)&&r.unshift(i)}return r}parse(e){let t={};return(e||"").toString().split(";").forEach(e=>{let i,r=e.split("="),n=r.shift().trim().toLowerCase(),s=r.join("=").trim();if(n)switch(n){case"expires":"Invalid Date"!==(s=new Date(s)).toString()&&(t.expires=s);break;case"path":t.path=s;break;case"domain":(i=s.toLowerCase()).length&&"."!==i.charAt(0)&&(i="."+i),t.domain=i;break;case"max-age":t.expires=new Date(Date.now()+1e3*(Number(s)||0));break;case"secure":t.secure=!0;break;case"httponly":t.httponly=!0;break;default:t.name||(t.name=n,t.value=s)}}),t}match(e,t){let i=r.parse(t||"");return(i.hostname===e.domain||"."===e.domain.charAt(0)&&("."+i.hostname).substr(-e.domain.length)===e.domain)&&this.getPath(i.pathname).substr(0,e.path.length)===e.path&&(!e.secure||"https:"===i.protocol)}add(e){let t,i;if(!e||!e.name)return!1;for(t=0,i=this.cookies.length;t<i;t++)if(this.compare(this.cookies[t],e)){if(this.isExpired(e))return this.cookies.splice(t,1),!1;return this.cookies[t]=e,!0}return this.isExpired(e)||this.cookies.push(e),!0}compare(e,t){return e.name===t.name&&e.path===t.path&&e.domain===t.domain&&e.secure===t.secure&&e.httponly==e.httponly}isExpired(e){return e.expires&&e.expires<new Date||!e.value}getPath(e){let t=(e||"/").split("/");return t.pop(),"/"!==(t=t.join("/").trim()).charAt(0)&&(t="/"+t),"/"!==t.substr(-1)&&(t+="/"),t}}t.exports=s},373248,(e,t,i)=>{"use strict";let r=e.r(921517),n=e.r(524836),s=e.r(792509),a=e.r(406461),o=e.r(688947).PassThrough,l=e.r(313958),c=e.r(282799),d=e.r(504446),u=5;function h(e,t){let i,A,p;(t=t||{}).fetchRes=t.fetchRes||new o,t.cookies=t.cookies||new l,t.redirects=t.redirects||0,t.maxRedirects=isNaN(t.maxRedirects)?u:t.maxRedirects,t.cookie&&([].concat(t.cookie||[]).forEach(i=>{t.cookies.set(i,e)}),t.cookie=!1);let f=t.fetchRes,g=s.parse(e),m=(t.method||"").toString().trim().toUpperCase()||"GET",y=!1,b="https:"===g.protocol?n:r,E={"accept-encoding":"gzip,deflate","user-agent":"nodemailer/"+c.version};if(Object.keys(t.headers||{}).forEach(e=>{E[e.toLowerCase().trim()]=t.headers[e]}),t.userAgent&&(E["user-agent"]=t.userAgent),g.auth&&(E.Authorization="Basic "+Buffer.from(g.auth).toString("base64")),(i=t.cookies.get(e))&&(E.cookie=i),t.body){if(!1!==t.contentType&&(E["Content-Type"]=t.contentType||"application/x-www-form-urlencoded"),"function"==typeof t.body.pipe)E["Transfer-Encoding"]="chunked",(A=t.body).on("error",t=>{y||(y=!0,t.type="FETCH",t.sourceUrl=e,f.emit("error",t))});else{if(t.body instanceof Buffer)A=t.body;else if("object"==typeof t.body)try{A=Buffer.from(Object.keys(t.body).map(e=>{let i=t.body[e].toString().trim();return encodeURIComponent(e)+"="+encodeURIComponent(i)}).join("&"))}catch(t){if(y)return;y=!0,t.type="FETCH",t.sourceUrl=e,f.emit("error",t);return}else A=Buffer.from(t.body.toString().trim());E["Content-Type"]=t.contentType||"application/x-www-form-urlencoded",E["Content-Length"]=A.length}m=(t.method||"").toString().trim().toUpperCase()||"POST"}let C={method:m,host:g.hostname,path:g.path,port:g.port?g.port:"https:"===g.protocol?443:80,headers:E,rejectUnauthorized:!1,agent:!1};t.tls&&Object.keys(t.tls).forEach(e=>{C[e]=t.tls[e]}),"https:"!==g.protocol||!g.hostname||g.hostname===C.host||d.isIP(g.hostname)||C.servername||(C.servername=g.hostname);try{p=b.request(C)}catch(t){return y=!0,setImmediate(()=>{t.type="FETCH",t.sourceUrl=e,f.emit("error",t)}),f}return t.timeout&&p.setTimeout(t.timeout,()=>{if(y)return;y=!0,p.abort();let t=Error("Request Timeout");t.type="FETCH",t.sourceUrl=e,f.emit("error",t)}),p.on("error",t=>{y||(y=!0,t.type="FETCH",t.sourceUrl=e,f.emit("error",t))}),p.on("response",i=>{let r;if(!y){switch(i.headers["content-encoding"]){case"gzip":case"deflate":r=a.createUnzip()}if(i.headers["set-cookie"]&&[].concat(i.headers["set-cookie"]||[]).forEach(i=>{t.cookies.set(i,e)}),[301,302,303,307,308].includes(i.statusCode)&&i.headers.location){if(t.redirects++,t.redirects>t.maxRedirects){y=!0;let t=Error("Maximum redirect count exceeded");t.type="FETCH",t.sourceUrl=e,f.emit("error",t),p.abort();return}return t.method="GET",t.body=!1,h(s.resolve(e,i.headers.location),t)}if(f.statusCode=i.statusCode,f.headers=i.headers,i.statusCode>=300&&!t.allowErrorResponse){y=!0;let t=Error("Invalid status code "+i.statusCode);t.type="FETCH",t.sourceUrl=e,f.emit("error",t),p.abort();return}i.on("error",t=>{y||(y=!0,t.type="FETCH",t.sourceUrl=e,f.emit("error",t),p.abort())}),r?(i.pipe(r).pipe(f),r.on("error",t=>{y||(y=!0,t.type="FETCH",t.sourceUrl=e,f.emit("error",t),p.abort())})):i.pipe(f)}}),setImmediate(()=>{if(A)try{if("function"==typeof A.pipe)return A.pipe(p);p.write(A)}catch(t){y=!0,t.type="FETCH",t.sourceUrl=e,f.emit("error",t);return}p.end()}),f}t.exports=function(e,t){return h(e,t)},t.exports.Cookies=l},345693,(e,t,i)=>{"use strict";let r,n=e.r(792509),s=e.r(224361),a=e.r(522734),o=e.r(373248),l=e.r(679594),c=e.r(504446),d=e.r(446786),u=3e5,h=3e4,A=1e3,p=0;t.exports._lastCacheCleanup=()=>p,t.exports._resetCacheCleanup=()=>{p=0};try{r=d.networkInterfaces()}catch(e){}t.exports.networkInterfaces=r;let f=(e,i)=>{let r=t.exports.networkInterfaces;return!r||Object.keys(r).map(e=>r[e]).reduce((e,t)=>e.concat(t),[]).filter(e=>!e.internal||i).filter(t=>t.family==="IPv"+e||t.family===e).length>0},g=(e,t,i,r)=>{if(!f(e,(i=i||{}).allowInternalNetworkInterfaces))return r(null,[]);(l.Resolver?new l.Resolver(i):l)["resolve"+e](t,(e,t)=>{if(e){switch(e.code){case l.NODATA:case l.NOTFOUND:case l.NOTIMP:case l.SERVFAIL:case l.CONNREFUSED:case l.REFUSED:case"EAI_AGAIN":return r(null,[])}return r(e)}return r(null,Array.isArray(t)?t:[].concat(t||[]))})},m=t.exports.dnsCache=new Map,y=(e,t)=>e?Object.assign({servername:e.servername,host:e.addresses&&e.addresses.length?1===e.addresses.length?e.addresses[0]:e.addresses[Math.floor(Math.random()*e.addresses.length)]:null},t||{}):Object.assign({},t||{});function b(e,t){let i=!1,r=[],n=0;e.on("error",e=>{i||(i=!0,t(e))}),e.on("readable",()=>{let t;for(;null!==(t=e.read());)r.push(t),n+=t.length}),e.on("end",()=>{let e;if(!i){i=!0;try{e=Buffer.concat(r,n)}catch(e){return t(e)}t(null,e)}})}function E(e){let t=0,i=new Map;e.forEach(e=>{e.length>t&&(t=e.length)}),e.forEach(e=>{let r=e.toUpperCase();r.length<t&&(r+=" ".repeat(t-r.length)),i.set(e,r)});let r=(e,t,r,...n)=>{let a="";t&&("server"===t.tnx?a="S: ":"client"===t.tnx&&(a="C: "),t.sid&&(a="["+t.sid+"] "+a),t.cid&&(a="[#"+t.cid+"] "+a)),(r=s.format(r,...n)).split(/\r?\n/).forEach(t=>{console.log("[%s] %s %s",new Date().toISOString().substr(0,19).replace(/T/," "),i.get(e),a+t)})},n={};return e.forEach(e=>{n[e]=r.bind(null,e)}),n}t.exports.resolveHostname=(e,t)=>{let i;if(!(e=e||{}).host&&e.servername&&(e.host=e.servername),!e.host||c.isIP(e.host))return t(null,y({addresses:[e.host],servername:e.servername||!1},{cached:!1}));if(m.has(e.host)){i=m.get(e.host);let r=Date.now();if(r-p>h){for(let[e,t]of(p=r,m.entries()))t.expires&&t.expires<r&&m.delete(e);if(m.size>A){let e=Math.floor(.1*A);Array.from(m.keys()).slice(0,e).forEach(e=>m.delete(e))}}if(!i.expires||i.expires>=r)return t(null,y(i.value,{cached:!0}))}g(4,e.host,e,(r,n)=>{if(r)return i?(m.set(e.host,{value:i.value,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(i.value,{cached:!0,error:r}))):t(r);if(n&&n.length){let i={addresses:n,servername:e.servername||e.host};return m.set(e.host,{value:i,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(i,{cached:!1}))}g(6,e.host,e,(r,n)=>{if(r)return i?(m.set(e.host,{value:i.value,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(i.value,{cached:!0,error:r}))):t(r);if(n&&n.length){let i={addresses:n,servername:e.servername||e.host};return m.set(e.host,{value:i,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(i,{cached:!1}))}try{l.lookup(e.host,{all:!0},(r,n)=>{if(r)return i?(m.set(e.host,{value:i.value,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(i.value,{cached:!0,error:r}))):t(r);let s=!!n&&n.filter(e=>f(e.family)).map(e=>e.address).shift();if(n&&n.length&&!s&&console.warn(`Failed to resolve IPv${n[0].family} addresses with current network`),!s&&i)return t(null,y(i.value,{cached:!0}));let a={addresses:s?[s]:[e.host],servername:e.servername||e.host};return m.set(e.host,{value:a,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(a,{cached:!1}))})}catch(n){if(i)return m.set(e.host,{value:i.value,expires:Date.now()+(e.dnsTtl||u)}),t(null,y(i.value,{cached:!0,error:r}));return t(r)}})})},t.exports.parseConnectionUrl=e=>{e=e||"";let t={};return[n.parse(e,!0)].forEach(e=>{let i;switch(e.protocol){case"smtp:":t.secure=!1;break;case"smtps:":t.secure=!0;break;case"direct:":t.direct=!0}!isNaN(e.port)&&Number(e.port)&&(t.port=Number(e.port)),e.hostname&&(t.host=e.hostname),e.auth&&(i=e.auth.split(":"),t.auth||(t.auth={}),t.auth.user=i.shift(),t.auth.pass=i.join(":")),Object.keys(e.query||{}).forEach(i=>{let r=t,n=i,s=e.query[i];switch(!isNaN(s)&&(s=Number(s)),s){case"true":s=!0;break;case"false":s=!1}if(0===i.indexOf("tls."))n=i.substr(4),t.tls||(t.tls={}),r=t.tls;else if(i.indexOf(".")>=0)return;n in r||(r[n]=s)})}),t},t.exports._logFunc=(e,t,i,r,n,...s)=>{let a={};Object.keys(i||{}).forEach(e=>{"level"!==e&&(a[e]=i[e])}),Object.keys(r||{}).forEach(e=>{"level"!==e&&(a[e]=r[e])}),e[t](a,n,...s)},t.exports.getLogger=(e,i)=>{let r={},n=["trace","debug","info","warn","error","fatal"];if(!(e=e||{}).logger)return n.forEach(e=>{r[e]=()=>!1}),r;let s=e.logger;return!0===e.logger&&(s=E(n)),n.forEach(e=>{r[e]=(r,n,...a)=>{t.exports._logFunc(s,e,i,r,n,...a)}}),r},t.exports.callbackPromise=(e,t)=>function(){let i=Array.from(arguments),r=i.shift();r?t(r):e(...i)},t.exports.parseDataURI=e=>{let t,i;if("string"!=typeof e||!e.startsWith("data:"))return null;let r=e.indexOf(",");if(-1===r)return null;let n=e.substring(r+1),s=e.substring(5,r).split(";");if(s.length>0){let e=s[s.length-1].toLowerCase().trim();["base64","utf8","utf-8"].includes(e)&&-1===e.indexOf("=")&&(t=e,s.pop())}let a=s.length>0?s.shift():"application/octet-stream",o={};for(let e=0;e<s.length;e++){let t=s[e],i=t.indexOf("=");if(i>0){let e=t.substring(0,i).trim(),r=t.substring(i+1).trim();e&&(o[e]=r)}}try{if("base64"===t)i=Buffer.from(n,"base64");else try{i=Buffer.from(decodeURIComponent(n))}catch(e){i=Buffer.from(n)}}catch(e){i=Buffer.alloc(0)}return{data:i,encoding:t||null,contentType:a||"application/octet-stream",params:o}},t.exports.resolveContent=(e,i,r)=>{let n;r||(n=new Promise((e,i)=>{r=t.exports.callbackPromise(e,i)}));let s=e&&e[i]&&e[i].content||e[i],l=("object"==typeof e[i]&&e[i].encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");if(!s)return r(null,s);if("object"==typeof s){if("function"==typeof s.pipe)return b(s,(t,n)=>{if(t)return r(t);e[i].content?e[i].content=n:e[i]=n,r(null,n)});else if(/^https?:\/\//i.test(s.path||s.href))return b(o(s.path||s.href),r);else if(/^data:/i.test(s.path||s.href)){let e=t.exports.parseDataURI(s.path||s.href);return e&&e.data?r(null,e.data):r(null,Buffer.from(0))}else if(s.path)return b(a.createReadStream(s.path),r)}return"string"!=typeof e[i].content||["utf8","usascii","ascii"].includes(l)||(s=Buffer.from(e[i].content,l)),setImmediate(()=>r(null,s)),n},t.exports.assign=function(){let e=Array.from(arguments),t=e.shift()||{};return e.forEach(e=>{Object.keys(e||{}).forEach(i=>{["tls","auth"].includes(i)&&e[i]&&"object"==typeof e[i]?(t[i]||(t[i]={}),Object.keys(e[i]).forEach(r=>{t[i][r]=e[i][r]})):t[i]=e[i]})}),t},t.exports.encodeXText=e=>{if(!/[^\x21-\x2A\x2C-\x3C\x3E-\x7E]/.test(e))return e;let t=Buffer.from(e),i="";for(let e=0,r=t.length;e<r;e++){let r=t[e];r<33||r>126||43===r||61===r?i+="+"+(r<16?"0":"")+r.toString(16).toUpperCase():i+=String.fromCharCode(r)}return i}},574898,(e,t,i)=>{"use strict";let r=e.r(814747),n="application/octet-stream",s="bin",a=new Map([["application/acad","dwg"],["application/applixware","aw"],["application/arj","arj"],["application/atom+xml","xml"],["application/atomcat+xml","atomcat"],["application/atomsvc+xml","atomsvc"],["application/base64",["mm","mme"]],["application/binhex","hqx"],["application/binhex4","hqx"],["application/book",["book","boo"]],["application/ccxml+xml,","ccxml"],["application/cdf","cdf"],["application/cdmi-capability","cdmia"],["application/cdmi-container","cdmic"],["application/cdmi-domain","cdmid"],["application/cdmi-object","cdmio"],["application/cdmi-queue","cdmiq"],["application/clariscad","ccad"],["application/commonground","dp"],["application/cu-seeme","cu"],["application/davmount+xml","davmount"],["application/drafting","drw"],["application/dsptype","tsp"],["application/dssc+der","dssc"],["application/dssc+xml","xdssc"],["application/dxf","dxf"],["application/ecmascript",["js","es"]],["application/emma+xml","emma"],["application/envoy","evy"],["application/epub+zip","epub"],["application/excel",["xls","xl","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/exi","exi"],["application/font-tdpfr","pfr"],["application/fractals","fif"],["application/freeloader","frl"],["application/futuresplash","spl"],["application/geo+json","geojson"],["application/gnutar","tgz"],["application/groupwise","vew"],["application/hlp","hlp"],["application/hta","hta"],["application/hyperstudio","stk"],["application/i-deas","unv"],["application/iges",["iges","igs"]],["application/inf","inf"],["application/internet-property-stream","acx"],["application/ipfix","ipfix"],["application/java","class"],["application/java-archive","jar"],["application/java-byte-code","class"],["application/java-serialized-object","ser"],["application/java-vm","class"],["application/javascript","js"],["application/json","json"],["application/lha","lha"],["application/lzx","lzx"],["application/mac-binary","bin"],["application/mac-binhex","hqx"],["application/mac-binhex40","hqx"],["application/mac-compactpro","cpt"],["application/macbinary","bin"],["application/mads+xml","mads"],["application/marc","mrc"],["application/marcxml+xml","mrcx"],["application/mathematica","ma"],["application/mathml+xml","mathml"],["application/mbedlet","mbd"],["application/mbox","mbox"],["application/mcad","mcd"],["application/mediaservercontrol+xml","mscml"],["application/metalink4+xml","meta4"],["application/mets+xml","mets"],["application/mime","aps"],["application/mods+xml","mods"],["application/mp21","m21"],["application/mp4","mp4"],["application/mspowerpoint",["ppt","pot","pps","ppz"]],["application/msword",["doc","dot","w6w","wiz","word"]],["application/mswrite","wri"],["application/mxf","mxf"],["application/netmc","mcp"],["application/octet-stream",["*"]],["application/oda","oda"],["application/oebps-package+xml","opf"],["application/ogg","ogx"],["application/olescript","axs"],["application/onenote","onetoc"],["application/patch-ops-error+xml","xer"],["application/pdf","pdf"],["application/pgp-encrypted","asc"],["application/pgp-signature","pgp"],["application/pics-rules","prf"],["application/pkcs-12","p12"],["application/pkcs-crl","crl"],["application/pkcs10","p10"],["application/pkcs7-mime",["p7c","p7m"]],["application/pkcs7-signature","p7s"],["application/pkcs8","p8"],["application/pkix-attr-cert","ac"],["application/pkix-cert",["cer","crt"]],["application/pkix-crl","crl"],["application/pkix-pkipath","pkipath"],["application/pkixcmp","pki"],["application/plain","text"],["application/pls+xml","pls"],["application/postscript",["ps","ai","eps"]],["application/powerpoint","ppt"],["application/pro_eng",["part","prt"]],["application/prs.cww","cww"],["application/pskc+xml","pskcxml"],["application/rdf+xml","rdf"],["application/reginfo+xml","rif"],["application/relax-ng-compact-syntax","rnc"],["application/resource-lists+xml","rl"],["application/resource-lists-diff+xml","rld"],["application/ringing-tones","rng"],["application/rls-services+xml","rs"],["application/rsd+xml","rsd"],["application/rss+xml","xml"],["application/rtf",["rtf","rtx"]],["application/sbml+xml","sbml"],["application/scvp-cv-request","scq"],["application/scvp-cv-response","scs"],["application/scvp-vp-request","spq"],["application/scvp-vp-response","spp"],["application/sdp","sdp"],["application/sea","sea"],["application/set","set"],["application/set-payment-initiation","setpay"],["application/set-registration-initiation","setreg"],["application/shf+xml","shf"],["application/sla","stl"],["application/smil",["smi","smil"]],["application/smil+xml","smi"],["application/solids","sol"],["application/sounder","sdr"],["application/sparql-query","rq"],["application/sparql-results+xml","srx"],["application/srgs","gram"],["application/srgs+xml","grxml"],["application/sru+xml","sru"],["application/ssml+xml","ssml"],["application/step",["step","stp"]],["application/streamingmedia","ssm"],["application/tei+xml","tei"],["application/thraud+xml","tfi"],["application/timestamped-data","tsd"],["application/toolbook","tbk"],["application/vda","vda"],["application/vnd.3gpp.pic-bw-large","plb"],["application/vnd.3gpp.pic-bw-small","psb"],["application/vnd.3gpp.pic-bw-var","pvb"],["application/vnd.3gpp2.tcap","tcap"],["application/vnd.3m.post-it-notes","pwn"],["application/vnd.accpac.simply.aso","aso"],["application/vnd.accpac.simply.imp","imp"],["application/vnd.acucobol","acu"],["application/vnd.acucorp","atc"],["application/vnd.adobe.air-application-installer-package+zip","air"],["application/vnd.adobe.fxp","fxp"],["application/vnd.adobe.xdp+xml","xdp"],["application/vnd.adobe.xfdf","xfdf"],["application/vnd.ahead.space","ahead"],["application/vnd.airzip.filesecure.azf","azf"],["application/vnd.airzip.filesecure.azs","azs"],["application/vnd.amazon.ebook","azw"],["application/vnd.americandynamics.acc","acc"],["application/vnd.amiga.ami","ami"],["application/vnd.android.package-archive","apk"],["application/vnd.anser-web-certificate-issue-initiation","cii"],["application/vnd.anser-web-funds-transfer-initiation","fti"],["application/vnd.antix.game-component","atx"],["application/vnd.apple.installer+xml","mpkg"],["application/vnd.apple.mpegurl","m3u8"],["application/vnd.aristanetworks.swi","swi"],["application/vnd.audiograph","aep"],["application/vnd.blueice.multipass","mpm"],["application/vnd.bmi","bmi"],["application/vnd.businessobjects","rep"],["application/vnd.chemdraw+xml","cdxml"],["application/vnd.chipnuts.karaoke-mmd","mmd"],["application/vnd.cinderella","cdy"],["application/vnd.claymore","cla"],["application/vnd.cloanto.rp9","rp9"],["application/vnd.clonk.c4group","c4g"],["application/vnd.cluetrust.cartomobile-config","c11amc"],["application/vnd.cluetrust.cartomobile-config-pkg","c11amz"],["application/vnd.commonspace","csp"],["application/vnd.contact.cmsg","cdbcmsg"],["application/vnd.cosmocaller","cmc"],["application/vnd.crick.clicker","clkx"],["application/vnd.crick.clicker.keyboard","clkk"],["application/vnd.crick.clicker.palette","clkp"],["application/vnd.crick.clicker.template","clkt"],["application/vnd.crick.clicker.wordbank","clkw"],["application/vnd.criticaltools.wbs+xml","wbs"],["application/vnd.ctc-posml","pml"],["application/vnd.cups-ppd","ppd"],["application/vnd.curl.car","car"],["application/vnd.curl.pcurl","pcurl"],["application/vnd.data-vision.rdz","rdz"],["application/vnd.denovo.fcselayout-link","fe_launch"],["application/vnd.dna","dna"],["application/vnd.dolby.mlp","mlp"],["application/vnd.dpgraph","dpg"],["application/vnd.dreamfactory","dfac"],["application/vnd.dvb.ait","ait"],["application/vnd.dvb.service","svc"],["application/vnd.dynageo","geo"],["application/vnd.ecowin.chart","mag"],["application/vnd.enliven","nml"],["application/vnd.epson.esf","esf"],["application/vnd.epson.msf","msf"],["application/vnd.epson.quickanime","qam"],["application/vnd.epson.salt","slt"],["application/vnd.epson.ssf","ssf"],["application/vnd.eszigno3+xml","es3"],["application/vnd.ezpix-album","ez2"],["application/vnd.ezpix-package","ez3"],["application/vnd.fdf","fdf"],["application/vnd.fdsn.seed","seed"],["application/vnd.flographit","gph"],["application/vnd.fluxtime.clip","ftc"],["application/vnd.framemaker","fm"],["application/vnd.frogans.fnc","fnc"],["application/vnd.frogans.ltf","ltf"],["application/vnd.fsc.weblaunch","fsc"],["application/vnd.fujitsu.oasys","oas"],["application/vnd.fujitsu.oasys2","oa2"],["application/vnd.fujitsu.oasys3","oa3"],["application/vnd.fujitsu.oasysgp","fg5"],["application/vnd.fujitsu.oasysprs","bh2"],["application/vnd.fujixerox.ddd","ddd"],["application/vnd.fujixerox.docuworks","xdw"],["application/vnd.fujixerox.docuworks.binder","xbd"],["application/vnd.fuzzysheet","fzs"],["application/vnd.genomatix.tuxedo","txd"],["application/vnd.geogebra.file","ggb"],["application/vnd.geogebra.tool","ggt"],["application/vnd.geometry-explorer","gex"],["application/vnd.geonext","gxt"],["application/vnd.geoplan","g2w"],["application/vnd.geospace","g3w"],["application/vnd.gmx","gmx"],["application/vnd.google-earth.kml+xml","kml"],["application/vnd.google-earth.kmz","kmz"],["application/vnd.grafeq","gqf"],["application/vnd.groove-account","gac"],["application/vnd.groove-help","ghf"],["application/vnd.groove-identity-message","gim"],["application/vnd.groove-injector","grv"],["application/vnd.groove-tool-message","gtm"],["application/vnd.groove-tool-template","tpl"],["application/vnd.groove-vcard","vcg"],["application/vnd.hal+xml","hal"],["application/vnd.handheld-entertainment+xml","zmm"],["application/vnd.hbci","hbci"],["application/vnd.hhe.lesson-player","les"],["application/vnd.hp-hpgl",["hgl","hpg","hpgl"]],["application/vnd.hp-hpid","hpid"],["application/vnd.hp-hps","hps"],["application/vnd.hp-jlyt","jlt"],["application/vnd.hp-pcl","pcl"],["application/vnd.hp-pclxl","pclxl"],["application/vnd.hydrostatix.sof-data","sfd-hdstx"],["application/vnd.hzn-3d-crossword","x3d"],["application/vnd.ibm.minipay","mpy"],["application/vnd.ibm.modcap","afp"],["application/vnd.ibm.rights-management","irm"],["application/vnd.ibm.secure-container","sc"],["application/vnd.iccprofile","icc"],["application/vnd.igloader","igl"],["application/vnd.immervision-ivp","ivp"],["application/vnd.immervision-ivu","ivu"],["application/vnd.insors.igm","igm"],["application/vnd.intercon.formnet","xpw"],["application/vnd.intergeo","i2g"],["application/vnd.intu.qbo","qbo"],["application/vnd.intu.qfx","qfx"],["application/vnd.ipunplugged.rcprofile","rcprofile"],["application/vnd.irepository.package+xml","irp"],["application/vnd.is-xpr","xpr"],["application/vnd.isac.fcs","fcs"],["application/vnd.jam","jam"],["application/vnd.jcp.javame.midlet-rms","rms"],["application/vnd.jisp","jisp"],["application/vnd.joost.joda-archive","joda"],["application/vnd.kahootz","ktz"],["application/vnd.kde.karbon","karbon"],["application/vnd.kde.kchart","chrt"],["application/vnd.kde.kformula","kfo"],["application/vnd.kde.kivio","flw"],["application/vnd.kde.kontour","kon"],["application/vnd.kde.kpresenter","kpr"],["application/vnd.kde.kspread","ksp"],["application/vnd.kde.kword","kwd"],["application/vnd.kenameaapp","htke"],["application/vnd.kidspiration","kia"],["application/vnd.kinar","kne"],["application/vnd.koan","skp"],["application/vnd.kodak-descriptor","sse"],["application/vnd.las.las+xml","lasxml"],["application/vnd.llamagraphics.life-balance.desktop","lbd"],["application/vnd.llamagraphics.life-balance.exchange+xml","lbe"],["application/vnd.lotus-1-2-3","123"],["application/vnd.lotus-approach","apr"],["application/vnd.lotus-freelance","pre"],["application/vnd.lotus-notes","nsf"],["application/vnd.lotus-organizer","org"],["application/vnd.lotus-screencam","scm"],["application/vnd.lotus-wordpro","lwp"],["application/vnd.macports.portpkg","portpkg"],["application/vnd.mcd","mcd"],["application/vnd.medcalcdata","mc1"],["application/vnd.mediastation.cdkey","cdkey"],["application/vnd.mfer","mwf"],["application/vnd.mfmp","mfm"],["application/vnd.micrografx.flo","flo"],["application/vnd.micrografx.igx","igx"],["application/vnd.mif","mif"],["application/vnd.mobius.daf","daf"],["application/vnd.mobius.dis","dis"],["application/vnd.mobius.mbk","mbk"],["application/vnd.mobius.mqy","mqy"],["application/vnd.mobius.msl","msl"],["application/vnd.mobius.plc","plc"],["application/vnd.mobius.txf","txf"],["application/vnd.mophun.application","mpn"],["application/vnd.mophun.certificate","mpc"],["application/vnd.mozilla.xul+xml","xul"],["application/vnd.ms-artgalry","cil"],["application/vnd.ms-cab-compressed","cab"],["application/vnd.ms-excel",["xls","xla","xlc","xlm","xlt","xlw","xlb","xll"]],["application/vnd.ms-excel.addin.macroenabled.12","xlam"],["application/vnd.ms-excel.sheet.binary.macroenabled.12","xlsb"],["application/vnd.ms-excel.sheet.macroenabled.12","xlsm"],["application/vnd.ms-excel.template.macroenabled.12","xltm"],["application/vnd.ms-fontobject","eot"],["application/vnd.ms-htmlhelp","chm"],["application/vnd.ms-ims","ims"],["application/vnd.ms-lrm","lrm"],["application/vnd.ms-officetheme","thmx"],["application/vnd.ms-outlook","msg"],["application/vnd.ms-pki.certstore","sst"],["application/vnd.ms-pki.pko","pko"],["application/vnd.ms-pki.seccat","cat"],["application/vnd.ms-pki.stl","stl"],["application/vnd.ms-pkicertstore","sst"],["application/vnd.ms-pkiseccat","cat"],["application/vnd.ms-pkistl","stl"],["application/vnd.ms-powerpoint",["ppt","pot","pps","ppa","pwz"]],["application/vnd.ms-powerpoint.addin.macroenabled.12","ppam"],["application/vnd.ms-powerpoint.presentation.macroenabled.12","pptm"],["application/vnd.ms-powerpoint.slide.macroenabled.12","sldm"],["application/vnd.ms-powerpoint.slideshow.macroenabled.12","ppsm"],["application/vnd.ms-powerpoint.template.macroenabled.12","potm"],["application/vnd.ms-project","mpp"],["application/vnd.ms-word.document.macroenabled.12","docm"],["application/vnd.ms-word.template.macroenabled.12","dotm"],["application/vnd.ms-works",["wks","wcm","wdb","wps"]],["application/vnd.ms-wpl","wpl"],["application/vnd.ms-xpsdocument","xps"],["application/vnd.mseq","mseq"],["application/vnd.musician","mus"],["application/vnd.muvee.style","msty"],["application/vnd.neurolanguage.nlu","nlu"],["application/vnd.noblenet-directory","nnd"],["application/vnd.noblenet-sealer","nns"],["application/vnd.noblenet-web","nnw"],["application/vnd.nokia.configuration-message","ncm"],["application/vnd.nokia.n-gage.data","ngdat"],["application/vnd.nokia.n-gage.symbian.install","n-gage"],["application/vnd.nokia.radio-preset","rpst"],["application/vnd.nokia.radio-presets","rpss"],["application/vnd.nokia.ringing-tone","rng"],["application/vnd.novadigm.edm","edm"],["application/vnd.novadigm.edx","edx"],["application/vnd.novadigm.ext","ext"],["application/vnd.oasis.opendocument.chart","odc"],["application/vnd.oasis.opendocument.chart-template","otc"],["application/vnd.oasis.opendocument.database","odb"],["application/vnd.oasis.opendocument.formula","odf"],["application/vnd.oasis.opendocument.formula-template","odft"],["application/vnd.oasis.opendocument.graphics","odg"],["application/vnd.oasis.opendocument.graphics-template","otg"],["application/vnd.oasis.opendocument.image","odi"],["application/vnd.oasis.opendocument.image-template","oti"],["application/vnd.oasis.opendocument.presentation","odp"],["application/vnd.oasis.opendocument.presentation-template","otp"],["application/vnd.oasis.opendocument.spreadsheet","ods"],["application/vnd.oasis.opendocument.spreadsheet-template","ots"],["application/vnd.oasis.opendocument.text","odt"],["application/vnd.oasis.opendocument.text-master","odm"],["application/vnd.oasis.opendocument.text-template","ott"],["application/vnd.oasis.opendocument.text-web","oth"],["application/vnd.olpc-sugar","xo"],["application/vnd.oma.dd2+xml","dd2"],["application/vnd.openofficeorg.extension","oxt"],["application/vnd.openxmlformats-officedocument.presentationml.presentation","pptx"],["application/vnd.openxmlformats-officedocument.presentationml.slide","sldx"],["application/vnd.openxmlformats-officedocument.presentationml.slideshow","ppsx"],["application/vnd.openxmlformats-officedocument.presentationml.template","potx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","xlsx"],["application/vnd.openxmlformats-officedocument.spreadsheetml.template","xltx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.document","docx"],["application/vnd.openxmlformats-officedocument.wordprocessingml.template","dotx"],["application/vnd.osgeo.mapguide.package","mgp"],["application/vnd.osgi.dp","dp"],["application/vnd.palm","pdb"],["application/vnd.pawaafile","paw"],["application/vnd.pg.format","str"],["application/vnd.pg.osasli","ei6"],["application/vnd.picsel","efif"],["application/vnd.pmi.widget","wg"],["application/vnd.pocketlearn","plf"],["application/vnd.powerbuilder6","pbd"],["application/vnd.previewsystems.box","box"],["application/vnd.proteus.magazine","mgz"],["application/vnd.publishare-delta-tree","qps"],["application/vnd.pvi.ptid1","ptid"],["application/vnd.quark.quarkxpress","qxd"],["application/vnd.realvnc.bed","bed"],["application/vnd.recordare.musicxml","mxl"],["application/vnd.recordare.musicxml+xml","musicxml"],["application/vnd.rig.cryptonote","cryptonote"],["application/vnd.rim.cod","cod"],["application/vnd.rn-realmedia","rm"],["application/vnd.rn-realplayer","rnx"],["application/vnd.route66.link66+xml","link66"],["application/vnd.sailingtracker.track","st"],["application/vnd.seemail","see"],["application/vnd.sema","sema"],["application/vnd.semd","semd"],["application/vnd.semf","semf"],["application/vnd.shana.informed.formdata","ifm"],["application/vnd.shana.informed.formtemplate","itp"],["application/vnd.shana.informed.interchange","iif"],["application/vnd.shana.informed.package","ipk"],["application/vnd.simtech-mindmapper","twd"],["application/vnd.smaf","mmf"],["application/vnd.smart.teacher","teacher"],["application/vnd.solent.sdkm+xml","sdkm"],["application/vnd.spotfire.dxp","dxp"],["application/vnd.spotfire.sfs","sfs"],["application/vnd.stardivision.calc","sdc"],["application/vnd.stardivision.draw","sda"],["application/vnd.stardivision.impress","sdd"],["application/vnd.stardivision.math","smf"],["application/vnd.stardivision.writer","sdw"],["application/vnd.stardivision.writer-global","sgl"],["application/vnd.stepmania.stepchart","sm"],["application/vnd.sun.xml.calc","sxc"],["application/vnd.sun.xml.calc.template","stc"],["application/vnd.sun.xml.draw","sxd"],["application/vnd.sun.xml.draw.template","std"],["application/vnd.sun.xml.impress","sxi"],["application/vnd.sun.xml.impress.template","sti"],["application/vnd.sun.xml.math","sxm"],["application/vnd.sun.xml.writer","sxw"],["application/vnd.sun.xml.writer.global","sxg"],["application/vnd.sun.xml.writer.template","stw"],["application/vnd.sus-calendar","sus"],["application/vnd.svd","svd"],["application/vnd.symbian.install","sis"],["application/vnd.syncml+xml","xsm"],["application/vnd.syncml.dm+wbxml","bdm"],["application/vnd.syncml.dm+xml","xdm"],["application/vnd.tao.intent-module-archive","tao"],["application/vnd.tmobile-livetv","tmo"],["application/vnd.trid.tpt","tpt"],["application/vnd.triscape.mxs","mxs"],["application/vnd.trueapp","tra"],["application/vnd.ufdl","ufd"],["application/vnd.uiq.theme","utz"],["application/vnd.umajin","umj"],["application/vnd.unity","unityweb"],["application/vnd.uoml+xml","uoml"],["application/vnd.vcx","vcx"],["application/vnd.visio","vsd"],["application/vnd.visionary","vis"],["application/vnd.vsf","vsf"],["application/vnd.wap.wbxml","wbxml"],["application/vnd.wap.wmlc","wmlc"],["application/vnd.wap.wmlscriptc","wmlsc"],["application/vnd.webturbo","wtb"],["application/vnd.wolfram.player","nbp"],["application/vnd.wordperfect","wpd"],["application/vnd.wqd","wqd"],["application/vnd.wt.stf","stf"],["application/vnd.xara",["web","xar"]],["application/vnd.xfdl","xfdl"],["application/vnd.yamaha.hv-dic","hvd"],["application/vnd.yamaha.hv-script","hvs"],["application/vnd.yamaha.hv-voice","hvp"],["application/vnd.yamaha.openscoreformat","osf"],["application/vnd.yamaha.openscoreformat.osfpvg+xml","osfpvg"],["application/vnd.yamaha.smaf-audio","saf"],["application/vnd.yamaha.smaf-phrase","spf"],["application/vnd.yellowriver-custom-menu","cmp"],["application/vnd.zul","zir"],["application/vnd.zzazz.deck+xml","zaz"],["application/vocaltec-media-desc","vmd"],["application/vocaltec-media-file","vmf"],["application/voicexml+xml","vxml"],["application/widget","wgt"],["application/winhlp","hlp"],["application/wordperfect",["wp","wp5","wp6","wpd"]],["application/wordperfect6.0",["w60","wp5"]],["application/wordperfect6.1","w61"],["application/wsdl+xml","wsdl"],["application/wspolicy+xml","wspolicy"],["application/x-123","wk1"],["application/x-7z-compressed","7z"],["application/x-abiword","abw"],["application/x-ace-compressed","ace"],["application/x-aim","aim"],["application/x-authorware-bin","aab"],["application/x-authorware-map","aam"],["application/x-authorware-seg","aas"],["application/x-bcpio","bcpio"],["application/x-binary","bin"],["application/x-binhex40","hqx"],["application/x-bittorrent","torrent"],["application/x-bsh",["bsh","sh","shar"]],["application/x-bytecode.elisp","elc"],["application/x-bytecode.python","pyc"],["application/x-bzip","bz"],["application/x-bzip2",["boz","bz2"]],["application/x-cdf","cdf"],["application/x-cdlink","vcd"],["application/x-chat",["cha","chat"]],["application/x-chess-pgn","pgn"],["application/x-cmu-raster","ras"],["application/x-cocoa","cco"],["application/x-compactpro","cpt"],["application/x-compress","z"],["application/x-compressed",["tgz","gz","z","zip"]],["application/x-conference","nsc"],["application/x-cpio","cpio"],["application/x-cpt","cpt"],["application/x-csh","csh"],["application/x-debian-package","deb"],["application/x-deepv","deepv"],["application/x-director",["dir","dcr","dxr"]],["application/x-doom","wad"],["application/x-dtbncx+xml","ncx"],["application/x-dtbook+xml","dtb"],["application/x-dtbresource+xml","res"],["application/x-dvi","dvi"],["application/x-elc","elc"],["application/x-envoy",["env","evy"]],["application/x-esrehber","es"],["application/x-excel",["xls","xla","xlb","xlc","xld","xlk","xll","xlm","xlt","xlv","xlw"]],["application/x-font-bdf","bdf"],["application/x-font-ghostscript","gsf"],["application/x-font-linux-psf","psf"],["application/x-font-otf","otf"],["application/x-font-pcf","pcf"],["application/x-font-snf","snf"],["application/x-font-ttf","ttf"],["application/x-font-type1","pfa"],["application/x-font-woff","woff"],["application/x-frame","mif"],["application/x-freelance","pre"],["application/x-futuresplash","spl"],["application/x-gnumeric","gnumeric"],["application/x-gsp","gsp"],["application/x-gss","gss"],["application/x-gtar","gtar"],["application/x-gzip",["gz","gzip"]],["application/x-hdf","hdf"],["application/x-helpfile",["help","hlp"]],["application/x-httpd-imap","imap"],["application/x-ima","ima"],["application/x-internet-signup",["ins","isp"]],["application/x-internett-signup","ins"],["application/x-inventor","iv"],["application/x-ip2","ip"],["application/x-iphone","iii"],["application/x-java-class","class"],["application/x-java-commerce","jcm"],["application/x-java-jnlp-file","jnlp"],["application/x-javascript","js"],["application/x-koan",["skd","skm","skp","skt"]],["application/x-ksh","ksh"],["application/x-latex",["latex","ltx"]],["application/x-lha","lha"],["application/x-lisp","lsp"],["application/x-livescreen","ivy"],["application/x-lotus","wq1"],["application/x-lotusscreencam","scm"],["application/x-lzh","lzh"],["application/x-lzx","lzx"],["application/x-mac-binhex40","hqx"],["application/x-macbinary","bin"],["application/x-magic-cap-package-1.0","mc$"],["application/x-mathcad","mcd"],["application/x-meme","mm"],["application/x-midi",["mid","midi"]],["application/x-mif","mif"],["application/x-mix-transfer","nix"],["application/x-mobipocket-ebook","prc"],["application/x-mplayer2","asx"],["application/x-ms-application","application"],["application/x-ms-wmd","wmd"],["application/x-ms-wmz","wmz"],["application/x-ms-xbap","xbap"],["application/x-msaccess","mdb"],["application/x-msbinder","obd"],["application/x-mscardfile","crd"],["application/x-msclip","clp"],["application/x-msdownload",["exe","dll"]],["application/x-msexcel",["xls","xla","xlw"]],["application/x-msmediaview",["mvb","m13","m14"]],["application/x-msmetafile","wmf"],["application/x-msmoney","mny"],["application/x-mspowerpoint","ppt"],["application/x-mspublisher","pub"],["application/x-msschedule","scd"],["application/x-msterminal","trm"],["application/x-mswrite","wri"],["application/x-navi-animation","ani"],["application/x-navidoc","nvd"],["application/x-navimap","map"],["application/x-navistyle","stl"],["application/x-netcdf",["cdf","nc"]],["application/x-newton-compatible-pkg","pkg"],["application/x-nokia-9000-communicator-add-on-software","aos"],["application/x-omc","omc"],["application/x-omcdatamaker","omcd"],["application/x-omcregerator","omcr"],["application/x-pagemaker",["pm4","pm5"]],["application/x-pcl","pcl"],["application/x-perfmon",["pma","pmc","pml","pmr","pmw"]],["application/x-pixclscript","plx"],["application/x-pkcs10","p10"],["application/x-pkcs12",["p12","pfx"]],["application/x-pkcs7-certificates",["p7b","spc"]],["application/x-pkcs7-certreqresp","p7r"],["application/x-pkcs7-mime",["p7m","p7c"]],["application/x-pkcs7-signature",["p7s","p7a"]],["application/x-pointplus","css"],["application/x-portable-anymap","pnm"],["application/x-project",["mpc","mpt","mpv","mpx"]],["application/x-qpro","wb1"],["application/x-rar-compressed","rar"],["application/x-rtf","rtf"],["application/x-sdp","sdp"],["application/x-sea","sea"],["application/x-seelogo","sl"],["application/x-sh","sh"],["application/x-shar",["shar","sh"]],["application/x-shockwave-flash","swf"],["application/x-silverlight-app","xap"],["application/x-sit","sit"],["application/x-sprite",["spr","sprite"]],["application/x-stuffit","sit"],["application/x-stuffitx","sitx"],["application/x-sv4cpio","sv4cpio"],["application/x-sv4crc","sv4crc"],["application/x-tar","tar"],["application/x-tbook",["sbk","tbk"]],["application/x-tcl","tcl"],["application/x-tex","tex"],["application/x-tex-tfm","tfm"],["application/x-texinfo",["texi","texinfo"]],["application/x-troff",["roff","t","tr"]],["application/x-troff-man","man"],["application/x-troff-me","me"],["application/x-troff-ms","ms"],["application/x-troff-msvideo","avi"],["application/x-ustar","ustar"],["application/x-visio",["vsd","vst","vsw"]],["application/x-vnd.audioexplosion.mzz","mzz"],["application/x-vnd.ls-xpix","xpix"],["application/x-vrml","vrml"],["application/x-wais-source",["src","wsrc"]],["application/x-winhelp","hlp"],["application/x-wintalk","wtk"],["application/x-world",["wrl","svr"]],["application/x-wpwin","wpd"],["application/x-wri","wri"],["application/x-x509-ca-cert",["cer","crt","der"]],["application/x-x509-user-cert","crt"],["application/x-xfig","fig"],["application/x-xpinstall","xpi"],["application/x-zip-compressed","zip"],["application/xcap-diff+xml","xdf"],["application/xenc+xml","xenc"],["application/xhtml+xml","xhtml"],["application/xml","xml"],["application/xml-dtd","dtd"],["application/xop+xml","xop"],["application/xslt+xml","xslt"],["application/xspf+xml","xspf"],["application/xv+xml","mxml"],["application/yang","yang"],["application/yin+xml","yin"],["application/ynd.ms-pkipko","pko"],["application/zip","zip"],["audio/adpcm","adp"],["audio/aiff",["aiff","aif","aifc"]],["audio/basic",["snd","au"]],["audio/it","it"],["audio/make",["funk","my","pfunk"]],["audio/make.my.funk","pfunk"],["audio/mid",["mid","rmi"]],["audio/midi",["midi","kar","mid"]],["audio/mod","mod"],["audio/mp4","mp4a"],["audio/mpeg",["mpga","mp3","m2a","mp2","mpa","mpg"]],["audio/mpeg3","mp3"],["audio/nspaudio",["la","lma"]],["audio/ogg","oga"],["audio/s3m","s3m"],["audio/tsp-audio","tsi"],["audio/tsplayer","tsp"],["audio/vnd.dece.audio","uva"],["audio/vnd.digital-winds","eol"],["audio/vnd.dra","dra"],["audio/vnd.dts","dts"],["audio/vnd.dts.hd","dtshd"],["audio/vnd.lucent.voice","lvp"],["audio/vnd.ms-playready.media.pya","pya"],["audio/vnd.nuera.ecelp4800","ecelp4800"],["audio/vnd.nuera.ecelp7470","ecelp7470"],["audio/vnd.nuera.ecelp9600","ecelp9600"],["audio/vnd.qcelp","qcp"],["audio/vnd.rip","rip"],["audio/voc","voc"],["audio/voxware","vox"],["audio/wav","wav"],["audio/webm","weba"],["audio/x-aac","aac"],["audio/x-adpcm","snd"],["audio/x-aiff",["aiff","aif","aifc"]],["audio/x-au","au"],["audio/x-gsm",["gsd","gsm"]],["audio/x-jam","jam"],["audio/x-liveaudio","lam"],["audio/x-mid",["mid","midi"]],["audio/x-midi",["midi","mid"]],["audio/x-mod","mod"],["audio/x-mpeg","mp2"],["audio/x-mpeg-3","mp3"],["audio/x-mpegurl","m3u"],["audio/x-mpequrl","m3u"],["audio/x-ms-wax","wax"],["audio/x-ms-wma","wma"],["audio/x-nspaudio",["la","lma"]],["audio/x-pn-realaudio",["ra","ram","rm","rmm","rmp"]],["audio/x-pn-realaudio-plugin",["ra","rmp","rpm"]],["audio/x-psid","sid"],["audio/x-realaudio","ra"],["audio/x-twinvq","vqf"],["audio/x-twinvq-plugin",["vqe","vql"]],["audio/x-vnd.audioexplosion.mjuicemediafile","mjf"],["audio/x-voc","voc"],["audio/x-wav","wav"],["audio/xm","xm"],["chemical/x-cdx","cdx"],["chemical/x-cif","cif"],["chemical/x-cmdf","cmdf"],["chemical/x-cml","cml"],["chemical/x-csml","csml"],["chemical/x-pdb",["pdb","xyz"]],["chemical/x-xyz","xyz"],["drawing/x-dwf","dwf"],["i-world/i-vrml","ivr"],["image/bmp",["bmp","bm"]],["image/cgm","cgm"],["image/cis-cod","cod"],["image/cmu-raster",["ras","rast"]],["image/fif","fif"],["image/florian",["flo","turbot"]],["image/g3fax","g3"],["image/gif","gif"],["image/ief",["ief","iefs"]],["image/jpeg",["jpeg","jpe","jpg","jfif","jfif-tbnl"]],["image/jutvision","jut"],["image/ktx","ktx"],["image/naplps",["nap","naplps"]],["image/pict",["pic","pict"]],["image/pipeg","jfif"],["image/pjpeg",["jfif","jpe","jpeg","jpg"]],["image/png",["png","x-png"]],["image/prs.btif","btif"],["image/svg+xml","svg"],["image/tiff",["tif","tiff"]],["image/vasa","mcf"],["image/vnd.adobe.photoshop","psd"],["image/vnd.dece.graphic","uvi"],["image/vnd.djvu","djvu"],["image/vnd.dvb.subtitle","sub"],["image/vnd.dwg",["dwg","dxf","svf"]],["image/vnd.dxf","dxf"],["image/vnd.fastbidsheet","fbs"],["image/vnd.fpx","fpx"],["image/vnd.fst","fst"],["image/vnd.fujixerox.edmics-mmr","mmr"],["image/vnd.fujixerox.edmics-rlc","rlc"],["image/vnd.ms-modi","mdi"],["image/vnd.net-fpx",["fpx","npx"]],["image/vnd.rn-realflash","rf"],["image/vnd.rn-realpix","rp"],["image/vnd.wap.wbmp","wbmp"],["image/vnd.xiff","xif"],["image/webp","webp"],["image/x-cmu-raster","ras"],["image/x-cmx","cmx"],["image/x-dwg",["dwg","dxf","svf"]],["image/x-freehand","fh"],["image/x-icon","ico"],["image/x-jg","art"],["image/x-jps","jps"],["image/x-niff",["niff","nif"]],["image/x-pcx","pcx"],["image/x-pict",["pct","pic"]],["image/x-portable-anymap","pnm"],["image/x-portable-bitmap","pbm"],["image/x-portable-graymap","pgm"],["image/x-portable-greymap","pgm"],["image/x-portable-pixmap","ppm"],["image/x-quicktime",["qif","qti","qtif"]],["image/x-rgb","rgb"],["image/x-tiff",["tif","tiff"]],["image/x-windows-bmp","bmp"],["image/x-xbitmap","xbm"],["image/x-xbm","xbm"],["image/x-xpixmap",["xpm","pm"]],["image/x-xwd","xwd"],["image/x-xwindowdump","xwd"],["image/xbm","xbm"],["image/xpm","xpm"],["message/rfc822",["eml","mht","mhtml","nws","mime"]],["model/iges",["iges","igs"]],["model/mesh","msh"],["model/vnd.collada+xml","dae"],["model/vnd.dwf","dwf"],["model/vnd.gdl","gdl"],["model/vnd.gtw","gtw"],["model/vnd.mts","mts"],["model/vnd.vtu","vtu"],["model/vrml",["vrml","wrl","wrz"]],["model/x-pov","pov"],["multipart/x-gzip","gzip"],["multipart/x-ustar","ustar"],["multipart/x-zip","zip"],["music/crescendo",["mid","midi"]],["music/x-karaoke","kar"],["paleovu/x-pv","pvu"],["text/asp","asp"],["text/calendar","ics"],["text/css","css"],["text/csv","csv"],["text/ecmascript","js"],["text/h323","323"],["text/html",["html","htm","stm","acgi","htmls","htx","shtml"]],["text/iuls","uls"],["text/javascript","js"],["text/mcf","mcf"],["text/n3","n3"],["text/pascal","pas"],["text/plain",["txt","bas","c","h","c++","cc","com","conf","cxx","def","f","f90","for","g","hh","idc","jav","java","list","log","lst","m","mar","pl","sdml","text"]],["text/plain-bas","par"],["text/prs.lines.tag","dsc"],["text/richtext",["rtx","rt","rtf"]],["text/scriplet","wsc"],["text/scriptlet","sct"],["text/sgml",["sgm","sgml"]],["text/tab-separated-values","tsv"],["text/troff","t"],["text/turtle","ttl"],["text/uri-list",["uni","unis","uri","uris"]],["text/vnd.abc","abc"],["text/vnd.curl","curl"],["text/vnd.curl.dcurl","dcurl"],["text/vnd.curl.mcurl","mcurl"],["text/vnd.curl.scurl","scurl"],["text/vnd.fly","fly"],["text/vnd.fmi.flexstor","flx"],["text/vnd.graphviz","gv"],["text/vnd.in3d.3dml","3dml"],["text/vnd.in3d.spot","spot"],["text/vnd.rn-realtext","rt"],["text/vnd.sun.j2me.app-descriptor","jad"],["text/vnd.wap.wml","wml"],["text/vnd.wap.wmlscript","wmls"],["text/webviewhtml","htt"],["text/x-asm",["asm","s"]],["text/x-audiosoft-intra","aip"],["text/x-c",["c","cc","cpp"]],["text/x-component","htc"],["text/x-fortran",["for","f","f77","f90"]],["text/x-h",["h","hh"]],["text/x-java-source",["java","jav"]],["text/x-java-source,java","java"],["text/x-la-asf","lsx"],["text/x-m","m"],["text/x-pascal","p"],["text/x-script","hlb"],["text/x-script.csh","csh"],["text/x-script.elisp","el"],["text/x-script.guile","scm"],["text/x-script.ksh","ksh"],["text/x-script.lisp","lsp"],["text/x-script.perl","pl"],["text/x-script.perl-module","pm"],["text/x-script.phyton","py"],["text/x-script.rexx","rexx"],["text/x-script.scheme","scm"],["text/x-script.sh","sh"],["text/x-script.tcl","tcl"],["text/x-script.tcsh","tcsh"],["text/x-script.zsh","zsh"],["text/x-server-parsed-html",["shtml","ssi"]],["text/x-setext","etx"],["text/x-sgml",["sgm","sgml"]],["text/x-speech",["spc","talk"]],["text/x-uil","uil"],["text/x-uuencode",["uu","uue"]],["text/x-vcalendar","vcs"],["text/x-vcard","vcf"],["text/xml","xml"],["video/3gpp","3gp"],["video/3gpp2","3g2"],["video/animaflex","afl"],["video/avi","avi"],["video/avs-video","avs"],["video/dl","dl"],["video/fli","fli"],["video/gl","gl"],["video/h261","h261"],["video/h263","h263"],["video/h264","h264"],["video/jpeg","jpgv"],["video/jpm","jpm"],["video/mj2","mj2"],["video/mp4","mp4"],["video/mpeg",["mpeg","mp2","mpa","mpe","mpg","mpv2","m1v","m2v","mp3"]],["video/msvideo","avi"],["video/ogg","ogv"],["video/quicktime",["mov","qt","moov"]],["video/vdo","vdo"],["video/vivo",["viv","vivo"]],["video/vnd.dece.hd","uvh"],["video/vnd.dece.mobile","uvm"],["video/vnd.dece.pd","uvp"],["video/vnd.dece.sd","uvs"],["video/vnd.dece.video","uvv"],["video/vnd.fvt","fvt"],["video/vnd.mpegurl","mxu"],["video/vnd.ms-playready.media.pyv","pyv"],["video/vnd.rn-realvideo","rv"],["video/vnd.uvvu.mp4","uvu"],["video/vnd.vivo",["viv","vivo"]],["video/vosaic","vos"],["video/webm","webm"],["video/x-amt-demorun","xdr"],["video/x-amt-showrun","xsr"],["video/x-atomic3d-feature","fmf"],["video/x-dl","dl"],["video/x-dv",["dif","dv"]],["video/x-f4v","f4v"],["video/x-fli","fli"],["video/x-flv","flv"],["video/x-gl","gl"],["video/x-isvideo","isu"],["video/x-la-asf",["lsf","lsx"]],["video/x-m4v","m4v"],["video/x-motion-jpeg","mjpg"],["video/x-mpeg",["mp3","mp2"]],["video/x-mpeq2a","mp2"],["video/x-ms-asf",["asf","asr","asx"]],["video/x-ms-asf-plugin","asx"],["video/x-ms-wm","wm"],["video/x-ms-wmv","wmv"],["video/x-ms-wmx","wmx"],["video/x-ms-wvx","wvx"],["video/x-msvideo","avi"],["video/x-qtc","qtc"],["video/x-scm","scm"],["video/x-sgi-movie",["movie","mv"]],["windows/metafile","wmf"],["www/mime","mime"],["x-conference/x-cooltalk","ice"],["x-music/x-midi",["mid","midi"]],["x-world/x-3dmf",["3dm","3dmf","qd3","qd3d"]],["x-world/x-svr","svr"],["x-world/x-vrml",["flr","vrml","wrl","wrz","xaf","xof"]],["x-world/x-vrt","vrt"],["xgl/drawing","xgz"],["xgl/movie","xmz"]]),o=new Map([["123","application/vnd.lotus-1-2-3"],["323","text/h323"],["*","application/octet-stream"],["3dm","x-world/x-3dmf"],["3dmf","x-world/x-3dmf"],["3dml","text/vnd.in3d.3dml"],["3g2","video/3gpp2"],["3gp","video/3gpp"],["7z","application/x-7z-compressed"],["a","application/octet-stream"],["aab","application/x-authorware-bin"],["aac","audio/x-aac"],["aam","application/x-authorware-map"],["aas","application/x-authorware-seg"],["abc","text/vnd.abc"],["abw","application/x-abiword"],["ac","application/pkix-attr-cert"],["acc","application/vnd.americandynamics.acc"],["ace","application/x-ace-compressed"],["acgi","text/html"],["acu","application/vnd.acucobol"],["acx","application/internet-property-stream"],["adp","audio/adpcm"],["aep","application/vnd.audiograph"],["afl","video/animaflex"],["afp","application/vnd.ibm.modcap"],["ahead","application/vnd.ahead.space"],["ai","application/postscript"],["aif",["audio/aiff","audio/x-aiff"]],["aifc",["audio/aiff","audio/x-aiff"]],["aiff",["audio/aiff","audio/x-aiff"]],["aim","application/x-aim"],["aip","text/x-audiosoft-intra"],["air","application/vnd.adobe.air-application-installer-package+zip"],["ait","application/vnd.dvb.ait"],["ami","application/vnd.amiga.ami"],["ani","application/x-navi-animation"],["aos","application/x-nokia-9000-communicator-add-on-software"],["apk","application/vnd.android.package-archive"],["application","application/x-ms-application"],["apr","application/vnd.lotus-approach"],["aps","application/mime"],["arc","application/octet-stream"],["arj",["application/arj","application/octet-stream"]],["art","image/x-jg"],["asf","video/x-ms-asf"],["asm","text/x-asm"],["aso","application/vnd.accpac.simply.aso"],["asp","text/asp"],["asr","video/x-ms-asf"],["asx",["video/x-ms-asf","application/x-mplayer2","video/x-ms-asf-plugin"]],["atc","application/vnd.acucorp"],["atomcat","application/atomcat+xml"],["atomsvc","application/atomsvc+xml"],["atx","application/vnd.antix.game-component"],["au",["audio/basic","audio/x-au"]],["avi",["video/avi","video/msvideo","application/x-troff-msvideo","video/x-msvideo"]],["avs","video/avs-video"],["aw","application/applixware"],["axs","application/olescript"],["azf","application/vnd.airzip.filesecure.azf"],["azs","application/vnd.airzip.filesecure.azs"],["azw","application/vnd.amazon.ebook"],["bas","text/plain"],["bcpio","application/x-bcpio"],["bdf","application/x-font-bdf"],["bdm","application/vnd.syncml.dm+wbxml"],["bed","application/vnd.realvnc.bed"],["bh2","application/vnd.fujitsu.oasysprs"],["bin",["application/octet-stream","application/mac-binary","application/macbinary","application/x-macbinary","application/x-binary"]],["bm","image/bmp"],["bmi","application/vnd.bmi"],["bmp",["image/bmp","image/x-windows-bmp"]],["boo","application/book"],["book","application/book"],["box","application/vnd.previewsystems.box"],["boz","application/x-bzip2"],["bsh","application/x-bsh"],["btif","image/prs.btif"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["c",["text/plain","text/x-c"]],["c++","text/plain"],["c11amc","application/vnd.cluetrust.cartomobile-config"],["c11amz","application/vnd.cluetrust.cartomobile-config-pkg"],["c4g","application/vnd.clonk.c4group"],["cab","application/vnd.ms-cab-compressed"],["car","application/vnd.curl.car"],["cat",["application/vnd.ms-pkiseccat","application/vnd.ms-pki.seccat"]],["cc",["text/plain","text/x-c"]],["ccad","application/clariscad"],["cco","application/x-cocoa"],["ccxml","application/ccxml+xml,"],["cdbcmsg","application/vnd.contact.cmsg"],["cdf",["application/cdf","application/x-cdf","application/x-netcdf"]],["cdkey","application/vnd.mediastation.cdkey"],["cdmia","application/cdmi-capability"],["cdmic","application/cdmi-container"],["cdmid","application/cdmi-domain"],["cdmio","application/cdmi-object"],["cdmiq","application/cdmi-queue"],["cdx","chemical/x-cdx"],["cdxml","application/vnd.chemdraw+xml"],["cdy","application/vnd.cinderella"],["cer",["application/pkix-cert","application/x-x509-ca-cert"]],["cgm","image/cgm"],["cha","application/x-chat"],["chat","application/x-chat"],["chm","application/vnd.ms-htmlhelp"],["chrt","application/vnd.kde.kchart"],["cif","chemical/x-cif"],["cii","application/vnd.anser-web-certificate-issue-initiation"],["cil","application/vnd.ms-artgalry"],["cla","application/vnd.claymore"],["class",["application/octet-stream","application/java","application/java-byte-code","application/java-vm","application/x-java-class"]],["clkk","application/vnd.crick.clicker.keyboard"],["clkp","application/vnd.crick.clicker.palette"],["clkt","application/vnd.crick.clicker.template"],["clkw","application/vnd.crick.clicker.wordbank"],["clkx","application/vnd.crick.clicker"],["clp","application/x-msclip"],["cmc","application/vnd.cosmocaller"],["cmdf","chemical/x-cmdf"],["cml","chemical/x-cml"],["cmp","application/vnd.yellowriver-custom-menu"],["cmx","image/x-cmx"],["cod",["image/cis-cod","application/vnd.rim.cod"]],["com",["application/octet-stream","text/plain"]],["conf","text/plain"],["cpio","application/x-cpio"],["cpp","text/x-c"],["cpt",["application/mac-compactpro","application/x-compactpro","application/x-cpt"]],["crd","application/x-mscardfile"],["crl",["application/pkix-crl","application/pkcs-crl"]],["crt",["application/pkix-cert","application/x-x509-user-cert","application/x-x509-ca-cert"]],["cryptonote","application/vnd.rig.cryptonote"],["csh",["text/x-script.csh","application/x-csh"]],["csml","chemical/x-csml"],["csp","application/vnd.commonspace"],["css",["text/css","application/x-pointplus"]],["csv","text/csv"],["cu","application/cu-seeme"],["curl","text/vnd.curl"],["cww","application/prs.cww"],["cxx","text/plain"],["dae","model/vnd.collada+xml"],["daf","application/vnd.mobius.daf"],["davmount","application/davmount+xml"],["dcr","application/x-director"],["dcurl","text/vnd.curl.dcurl"],["dd2","application/vnd.oma.dd2+xml"],["ddd","application/vnd.fujixerox.ddd"],["deb","application/x-debian-package"],["deepv","application/x-deepv"],["def","text/plain"],["der","application/x-x509-ca-cert"],["dfac","application/vnd.dreamfactory"],["dif","video/x-dv"],["dir","application/x-director"],["dis","application/vnd.mobius.dis"],["djvu","image/vnd.djvu"],["dl",["video/dl","video/x-dl"]],["dll","application/x-msdownload"],["dms","application/octet-stream"],["dna","application/vnd.dna"],["doc","application/msword"],["docm","application/vnd.ms-word.document.macroenabled.12"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["dot","application/msword"],["dotm","application/vnd.ms-word.template.macroenabled.12"],["dotx","application/vnd.openxmlformats-officedocument.wordprocessingml.template"],["dp",["application/commonground","application/vnd.osgi.dp"]],["dpg","application/vnd.dpgraph"],["dra","audio/vnd.dra"],["drw","application/drafting"],["dsc","text/prs.lines.tag"],["dssc","application/dssc+der"],["dtb","application/x-dtbook+xml"],["dtd","application/xml-dtd"],["dts","audio/vnd.dts"],["dtshd","audio/vnd.dts.hd"],["dump","application/octet-stream"],["dv","video/x-dv"],["dvi","application/x-dvi"],["dwf",["model/vnd.dwf","drawing/x-dwf"]],["dwg",["application/acad","image/vnd.dwg","image/x-dwg"]],["dxf",["application/dxf","image/vnd.dwg","image/vnd.dxf","image/x-dwg"]],["dxp","application/vnd.spotfire.dxp"],["dxr","application/x-director"],["ecelp4800","audio/vnd.nuera.ecelp4800"],["ecelp7470","audio/vnd.nuera.ecelp7470"],["ecelp9600","audio/vnd.nuera.ecelp9600"],["edm","application/vnd.novadigm.edm"],["edx","application/vnd.novadigm.edx"],["efif","application/vnd.picsel"],["ei6","application/vnd.pg.osasli"],["el","text/x-script.elisp"],["elc",["application/x-elc","application/x-bytecode.elisp"]],["eml","message/rfc822"],["emma","application/emma+xml"],["env","application/x-envoy"],["eol","audio/vnd.digital-winds"],["eot","application/vnd.ms-fontobject"],["eps","application/postscript"],["epub","application/epub+zip"],["es",["application/ecmascript","application/x-esrehber"]],["es3","application/vnd.eszigno3+xml"],["esf","application/vnd.epson.esf"],["etx","text/x-setext"],["evy",["application/envoy","application/x-envoy"]],["exe",["application/octet-stream","application/x-msdownload"]],["exi","application/exi"],["ext","application/vnd.novadigm.ext"],["ez2","application/vnd.ezpix-album"],["ez3","application/vnd.ezpix-package"],["f",["text/plain","text/x-fortran"]],["f4v","video/x-f4v"],["f77","text/x-fortran"],["f90",["text/plain","text/x-fortran"]],["fbs","image/vnd.fastbidsheet"],["fcs","application/vnd.isac.fcs"],["fdf","application/vnd.fdf"],["fe_launch","application/vnd.denovo.fcselayout-link"],["fg5","application/vnd.fujitsu.oasysgp"],["fh","image/x-freehand"],["fif",["application/fractals","image/fif"]],["fig","application/x-xfig"],["fli",["video/fli","video/x-fli"]],["flo",["image/florian","application/vnd.micrografx.flo"]],["flr","x-world/x-vrml"],["flv","video/x-flv"],["flw","application/vnd.kde.kivio"],["flx","text/vnd.fmi.flexstor"],["fly","text/vnd.fly"],["fm","application/vnd.framemaker"],["fmf","video/x-atomic3d-feature"],["fnc","application/vnd.frogans.fnc"],["for",["text/plain","text/x-fortran"]],["fpx",["image/vnd.fpx","image/vnd.net-fpx"]],["frl","application/freeloader"],["fsc","application/vnd.fsc.weblaunch"],["fst","image/vnd.fst"],["ftc","application/vnd.fluxtime.clip"],["fti","application/vnd.anser-web-funds-transfer-initiation"],["funk","audio/make"],["fvt","video/vnd.fvt"],["fxp","application/vnd.adobe.fxp"],["fzs","application/vnd.fuzzysheet"],["g","text/plain"],["g2w","application/vnd.geoplan"],["g3","image/g3fax"],["g3w","application/vnd.geospace"],["gac","application/vnd.groove-account"],["gdl","model/vnd.gdl"],["geo","application/vnd.dynageo"],["geojson","application/geo+json"],["gex","application/vnd.geometry-explorer"],["ggb","application/vnd.geogebra.file"],["ggt","application/vnd.geogebra.tool"],["ghf","application/vnd.groove-help"],["gif","image/gif"],["gim","application/vnd.groove-identity-message"],["gl",["video/gl","video/x-gl"]],["gmx","application/vnd.gmx"],["gnumeric","application/x-gnumeric"],["gph","application/vnd.flographit"],["gqf","application/vnd.grafeq"],["gram","application/srgs"],["grv","application/vnd.groove-injector"],["grxml","application/srgs+xml"],["gsd","audio/x-gsm"],["gsf","application/x-font-ghostscript"],["gsm","audio/x-gsm"],["gsp","application/x-gsp"],["gss","application/x-gss"],["gtar","application/x-gtar"],["gtm","application/vnd.groove-tool-message"],["gtw","model/vnd.gtw"],["gv","text/vnd.graphviz"],["gxt","application/vnd.geonext"],["gz",["application/x-gzip","application/x-compressed"]],["gzip",["multipart/x-gzip","application/x-gzip"]],["h",["text/plain","text/x-h"]],["h261","video/h261"],["h263","video/h263"],["h264","video/h264"],["hal","application/vnd.hal+xml"],["hbci","application/vnd.hbci"],["hdf","application/x-hdf"],["help","application/x-helpfile"],["hgl","application/vnd.hp-hpgl"],["hh",["text/plain","text/x-h"]],["hlb","text/x-script"],["hlp",["application/winhlp","application/hlp","application/x-helpfile","application/x-winhelp"]],["hpg","application/vnd.hp-hpgl"],["hpgl","application/vnd.hp-hpgl"],["hpid","application/vnd.hp-hpid"],["hps","application/vnd.hp-hps"],["hqx",["application/mac-binhex40","application/binhex","application/binhex4","application/mac-binhex","application/x-binhex40","application/x-mac-binhex40"]],["hta","application/hta"],["htc","text/x-component"],["htke","application/vnd.kenameaapp"],["htm","text/html"],["html","text/html"],["htmls","text/html"],["htt","text/webviewhtml"],["htx","text/html"],["hvd","application/vnd.yamaha.hv-dic"],["hvp","application/vnd.yamaha.hv-voice"],["hvs","application/vnd.yamaha.hv-script"],["i2g","application/vnd.intergeo"],["icc","application/vnd.iccprofile"],["ice","x-conference/x-cooltalk"],["ico","image/x-icon"],["ics","text/calendar"],["idc","text/plain"],["ief","image/ief"],["iefs","image/ief"],["ifm","application/vnd.shana.informed.formdata"],["iges",["application/iges","model/iges"]],["igl","application/vnd.igloader"],["igm","application/vnd.insors.igm"],["igs",["application/iges","model/iges"]],["igx","application/vnd.micrografx.igx"],["iif","application/vnd.shana.informed.interchange"],["iii","application/x-iphone"],["ima","application/x-ima"],["imap","application/x-httpd-imap"],["imp","application/vnd.accpac.simply.imp"],["ims","application/vnd.ms-ims"],["inf","application/inf"],["ins",["application/x-internet-signup","application/x-internett-signup"]],["ip","application/x-ip2"],["ipfix","application/ipfix"],["ipk","application/vnd.shana.informed.package"],["irm","application/vnd.ibm.rights-management"],["irp","application/vnd.irepository.package+xml"],["isp","application/x-internet-signup"],["isu","video/x-isvideo"],["it","audio/it"],["itp","application/vnd.shana.informed.formtemplate"],["iv","application/x-inventor"],["ivp","application/vnd.immervision-ivp"],["ivr","i-world/i-vrml"],["ivu","application/vnd.immervision-ivu"],["ivy","application/x-livescreen"],["jad","text/vnd.sun.j2me.app-descriptor"],["jam",["application/vnd.jam","audio/x-jam"]],["jar","application/java-archive"],["jav",["text/plain","text/x-java-source"]],["java",["text/plain","text/x-java-source,java","text/x-java-source"]],["jcm","application/x-java-commerce"],["jfif",["image/pipeg","image/jpeg","image/pjpeg"]],["jfif-tbnl","image/jpeg"],["jisp","application/vnd.jisp"],["jlt","application/vnd.hp-jlyt"],["jnlp","application/x-java-jnlp-file"],["joda","application/vnd.joost.joda-archive"],["jpe",["image/jpeg","image/pjpeg"]],["jpeg",["image/jpeg","image/pjpeg"]],["jpg",["image/jpeg","image/pjpeg"]],["jpgv","video/jpeg"],["jpm","video/jpm"],["jps","image/x-jps"],["js",["application/javascript","application/ecmascript","text/javascript","text/ecmascript","application/x-javascript"]],["json","application/json"],["jut","image/jutvision"],["kar",["audio/midi","music/x-karaoke"]],["karbon","application/vnd.kde.karbon"],["kfo","application/vnd.kde.kformula"],["kia","application/vnd.kidspiration"],["kml","application/vnd.google-earth.kml+xml"],["kmz","application/vnd.google-earth.kmz"],["kne","application/vnd.kinar"],["kon","application/vnd.kde.kontour"],["kpr","application/vnd.kde.kpresenter"],["ksh",["application/x-ksh","text/x-script.ksh"]],["ksp","application/vnd.kde.kspread"],["ktx","image/ktx"],["ktz","application/vnd.kahootz"],["kwd","application/vnd.kde.kword"],["la",["audio/nspaudio","audio/x-nspaudio"]],["lam","audio/x-liveaudio"],["lasxml","application/vnd.las.las+xml"],["latex","application/x-latex"],["lbd","application/vnd.llamagraphics.life-balance.desktop"],["lbe","application/vnd.llamagraphics.life-balance.exchange+xml"],["les","application/vnd.hhe.lesson-player"],["lha",["application/octet-stream","application/lha","application/x-lha"]],["lhx","application/octet-stream"],["link66","application/vnd.route66.link66+xml"],["list","text/plain"],["lma",["audio/nspaudio","audio/x-nspaudio"]],["log","text/plain"],["lrm","application/vnd.ms-lrm"],["lsf","video/x-la-asf"],["lsp",["application/x-lisp","text/x-script.lisp"]],["lst","text/plain"],["lsx",["video/x-la-asf","text/x-la-asf"]],["ltf","application/vnd.frogans.ltf"],["ltx","application/x-latex"],["lvp","audio/vnd.lucent.voice"],["lwp","application/vnd.lotus-wordpro"],["lzh",["application/octet-stream","application/x-lzh"]],["lzx",["application/lzx","application/octet-stream","application/x-lzx"]],["m",["text/plain","text/x-m"]],["m13","application/x-msmediaview"],["m14","application/x-msmediaview"],["m1v","video/mpeg"],["m21","application/mp21"],["m2a","audio/mpeg"],["m2v","video/mpeg"],["m3u",["audio/x-mpegurl","audio/x-mpequrl"]],["m3u8","application/vnd.apple.mpegurl"],["m4v","video/x-m4v"],["ma","application/mathematica"],["mads","application/mads+xml"],["mag","application/vnd.ecowin.chart"],["man","application/x-troff-man"],["map","application/x-navimap"],["mar","text/plain"],["mathml","application/mathml+xml"],["mbd","application/mbedlet"],["mbk","application/vnd.mobius.mbk"],["mbox","application/mbox"],["mc$","application/x-magic-cap-package-1.0"],["mc1","application/vnd.medcalcdata"],["mcd",["application/mcad","application/vnd.mcd","application/x-mathcad"]],["mcf",["image/vasa","text/mcf"]],["mcp","application/netmc"],["mcurl","text/vnd.curl.mcurl"],["mdb","application/x-msaccess"],["mdi","image/vnd.ms-modi"],["me","application/x-troff-me"],["meta4","application/metalink4+xml"],["mets","application/mets+xml"],["mfm","application/vnd.mfmp"],["mgp","application/vnd.osgeo.mapguide.package"],["mgz","application/vnd.proteus.magazine"],["mht","message/rfc822"],["mhtml","message/rfc822"],["mid",["audio/mid","audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["midi",["audio/midi","music/crescendo","x-music/x-midi","audio/x-midi","application/x-midi","audio/x-mid"]],["mif",["application/vnd.mif","application/x-mif","application/x-frame"]],["mime",["message/rfc822","www/mime"]],["mj2","video/mj2"],["mjf","audio/x-vnd.audioexplosion.mjuicemediafile"],["mjpg","video/x-motion-jpeg"],["mlp","application/vnd.dolby.mlp"],["mm",["application/base64","application/x-meme"]],["mmd","application/vnd.chipnuts.karaoke-mmd"],["mme","application/base64"],["mmf","application/vnd.smaf"],["mmr","image/vnd.fujixerox.edmics-mmr"],["mny","application/x-msmoney"],["mod",["audio/mod","audio/x-mod"]],["mods","application/mods+xml"],["moov","video/quicktime"],["mov","video/quicktime"],["movie","video/x-sgi-movie"],["mp2",["video/mpeg","audio/mpeg","video/x-mpeg","audio/x-mpeg","video/x-mpeq2a"]],["mp3",["audio/mpeg","audio/mpeg3","video/mpeg","audio/x-mpeg-3","video/x-mpeg"]],["mp4",["video/mp4","application/mp4"]],["mp4a","audio/mp4"],["mpa",["video/mpeg","audio/mpeg"]],["mpc",["application/vnd.mophun.certificate","application/x-project"]],["mpe","video/mpeg"],["mpeg","video/mpeg"],["mpg",["video/mpeg","audio/mpeg"]],["mpga","audio/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["mpm","application/vnd.blueice.multipass"],["mpn","application/vnd.mophun.application"],["mpp","application/vnd.ms-project"],["mpt","application/x-project"],["mpv","application/x-project"],["mpv2","video/mpeg"],["mpx","application/x-project"],["mpy","application/vnd.ibm.minipay"],["mqy","application/vnd.mobius.mqy"],["mrc","application/marc"],["mrcx","application/marcxml+xml"],["ms","application/x-troff-ms"],["mscml","application/mediaservercontrol+xml"],["mseq","application/vnd.mseq"],["msf","application/vnd.epson.msf"],["msg","application/vnd.ms-outlook"],["msh","model/mesh"],["msl","application/vnd.mobius.msl"],["msty","application/vnd.muvee.style"],["mts","model/vnd.mts"],["mus","application/vnd.musician"],["musicxml","application/vnd.recordare.musicxml+xml"],["mv","video/x-sgi-movie"],["mvb","application/x-msmediaview"],["mwf","application/vnd.mfer"],["mxf","application/mxf"],["mxl","application/vnd.recordare.musicxml"],["mxml","application/xv+xml"],["mxs","application/vnd.triscape.mxs"],["mxu","video/vnd.mpegurl"],["my","audio/make"],["mzz","application/x-vnd.audioexplosion.mzz"],["n-gage","application/vnd.nokia.n-gage.symbian.install"],["n3","text/n3"],["nap","image/naplps"],["naplps","image/naplps"],["nbp","application/vnd.wolfram.player"],["nc","application/x-netcdf"],["ncm","application/vnd.nokia.configuration-message"],["ncx","application/x-dtbncx+xml"],["ngdat","application/vnd.nokia.n-gage.data"],["nif","image/x-niff"],["niff","image/x-niff"],["nix","application/x-mix-transfer"],["nlu","application/vnd.neurolanguage.nlu"],["nml","application/vnd.enliven"],["nnd","application/vnd.noblenet-directory"],["nns","application/vnd.noblenet-sealer"],["nnw","application/vnd.noblenet-web"],["npx","image/vnd.net-fpx"],["nsc","application/x-conference"],["nsf","application/vnd.lotus-notes"],["nvd","application/x-navidoc"],["nws","message/rfc822"],["o","application/octet-stream"],["oa2","application/vnd.fujitsu.oasys2"],["oa3","application/vnd.fujitsu.oasys3"],["oas","application/vnd.fujitsu.oasys"],["obd","application/x-msbinder"],["oda","application/oda"],["odb","application/vnd.oasis.opendocument.database"],["odc","application/vnd.oasis.opendocument.chart"],["odf","application/vnd.oasis.opendocument.formula"],["odft","application/vnd.oasis.opendocument.formula-template"],["odg","application/vnd.oasis.opendocument.graphics"],["odi","application/vnd.oasis.opendocument.image"],["odm","application/vnd.oasis.opendocument.text-master"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["omc","application/x-omc"],["omcd","application/x-omcdatamaker"],["omcr","application/x-omcregerator"],["onetoc","application/onenote"],["opf","application/oebps-package+xml"],["org","application/vnd.lotus-organizer"],["osf","application/vnd.yamaha.openscoreformat"],["osfpvg","application/vnd.yamaha.openscoreformat.osfpvg+xml"],["otc","application/vnd.oasis.opendocument.chart-template"],["otf","application/x-font-otf"],["otg","application/vnd.oasis.opendocument.graphics-template"],["oth","application/vnd.oasis.opendocument.text-web"],["oti","application/vnd.oasis.opendocument.image-template"],["otp","application/vnd.oasis.opendocument.presentation-template"],["ots","application/vnd.oasis.opendocument.spreadsheet-template"],["ott","application/vnd.oasis.opendocument.text-template"],["oxt","application/vnd.openofficeorg.extension"],["p","text/x-pascal"],["p10",["application/pkcs10","application/x-pkcs10"]],["p12",["application/pkcs-12","application/x-pkcs12"]],["p7a","application/x-pkcs7-signature"],["p7b","application/x-pkcs7-certificates"],["p7c",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7m",["application/pkcs7-mime","application/x-pkcs7-mime"]],["p7r","application/x-pkcs7-certreqresp"],["p7s",["application/pkcs7-signature","application/x-pkcs7-signature"]],["p8","application/pkcs8"],["par","text/plain-bas"],["part","application/pro_eng"],["pas","text/pascal"],["paw","application/vnd.pawaafile"],["pbd","application/vnd.powerbuilder6"],["pbm","image/x-portable-bitmap"],["pcf","application/x-font-pcf"],["pcl",["application/vnd.hp-pcl","application/x-pcl"]],["pclxl","application/vnd.hp-pclxl"],["pct","image/x-pict"],["pcurl","application/vnd.curl.pcurl"],["pcx","image/x-pcx"],["pdb",["application/vnd.palm","chemical/x-pdb"]],["pdf","application/pdf"],["pfa","application/x-font-type1"],["pfr","application/font-tdpfr"],["pfunk",["audio/make","audio/make.my.funk"]],["pfx","application/x-pkcs12"],["pgm",["image/x-portable-graymap","image/x-portable-greymap"]],["pgn","application/x-chess-pgn"],["pgp","application/pgp-signature"],["pic",["image/pict","image/x-pict"]],["pict","image/pict"],["pkg","application/x-newton-compatible-pkg"],["pki","application/pkixcmp"],["pkipath","application/pkix-pkipath"],["pko",["application/ynd.ms-pkipko","application/vnd.ms-pki.pko"]],["pl",["text/plain","text/x-script.perl"]],["plb","application/vnd.3gpp.pic-bw-large"],["plc","application/vnd.mobius.plc"],["plf","application/vnd.pocketlearn"],["pls","application/pls+xml"],["plx","application/x-pixclscript"],["pm",["text/x-script.perl-module","image/x-xpixmap"]],["pm4","application/x-pagemaker"],["pm5","application/x-pagemaker"],["pma","application/x-perfmon"],["pmc","application/x-perfmon"],["pml",["application/vnd.ctc-posml","application/x-perfmon"]],["pmr","application/x-perfmon"],["pmw","application/x-perfmon"],["png","image/png"],["pnm",["application/x-portable-anymap","image/x-portable-anymap"]],["portpkg","application/vnd.macports.portpkg"],["pot",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["potm","application/vnd.ms-powerpoint.template.macroenabled.12"],["potx","application/vnd.openxmlformats-officedocument.presentationml.template"],["pov","model/x-pov"],["ppa","application/vnd.ms-powerpoint"],["ppam","application/vnd.ms-powerpoint.addin.macroenabled.12"],["ppd","application/vnd.cups-ppd"],["ppm","image/x-portable-pixmap"],["pps",["application/vnd.ms-powerpoint","application/mspowerpoint"]],["ppsm","application/vnd.ms-powerpoint.slideshow.macroenabled.12"],["ppsx","application/vnd.openxmlformats-officedocument.presentationml.slideshow"],["ppt",["application/vnd.ms-powerpoint","application/mspowerpoint","application/powerpoint","application/x-mspowerpoint"]],["pptm","application/vnd.ms-powerpoint.presentation.macroenabled.12"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["ppz","application/mspowerpoint"],["prc","application/x-mobipocket-ebook"],["pre",["application/vnd.lotus-freelance","application/x-freelance"]],["prf","application/pics-rules"],["prt","application/pro_eng"],["ps","application/postscript"],["psb","application/vnd.3gpp.pic-bw-small"],["psd",["application/octet-stream","image/vnd.adobe.photoshop"]],["psf","application/x-font-linux-psf"],["pskcxml","application/pskc+xml"],["ptid","application/vnd.pvi.ptid1"],["pub","application/x-mspublisher"],["pvb","application/vnd.3gpp.pic-bw-var"],["pvu","paleovu/x-pv"],["pwn","application/vnd.3m.post-it-notes"],["pwz","application/vnd.ms-powerpoint"],["py","text/x-script.phyton"],["pya","audio/vnd.ms-playready.media.pya"],["pyc","application/x-bytecode.python"],["pyv","video/vnd.ms-playready.media.pyv"],["qam","application/vnd.epson.quickanime"],["qbo","application/vnd.intu.qbo"],["qcp","audio/vnd.qcelp"],["qd3","x-world/x-3dmf"],["qd3d","x-world/x-3dmf"],["qfx","application/vnd.intu.qfx"],["qif","image/x-quicktime"],["qps","application/vnd.publishare-delta-tree"],["qt","video/quicktime"],["qtc","video/x-qtc"],["qti","image/x-quicktime"],["qtif","image/x-quicktime"],["qxd","application/vnd.quark.quarkxpress"],["ra",["audio/x-realaudio","audio/x-pn-realaudio","audio/x-pn-realaudio-plugin"]],["ram","audio/x-pn-realaudio"],["rar","application/x-rar-compressed"],["ras",["image/cmu-raster","application/x-cmu-raster","image/x-cmu-raster"]],["rast","image/cmu-raster"],["rcprofile","application/vnd.ipunplugged.rcprofile"],["rdf","application/rdf+xml"],["rdz","application/vnd.data-vision.rdz"],["rep","application/vnd.businessobjects"],["res","application/x-dtbresource+xml"],["rexx","text/x-script.rexx"],["rf","image/vnd.rn-realflash"],["rgb","image/x-rgb"],["rif","application/reginfo+xml"],["rip","audio/vnd.rip"],["rl","application/resource-lists+xml"],["rlc","image/vnd.fujixerox.edmics-rlc"],["rld","application/resource-lists-diff+xml"],["rm",["application/vnd.rn-realmedia","audio/x-pn-realaudio"]],["rmi","audio/mid"],["rmm","audio/x-pn-realaudio"],["rmp",["audio/x-pn-realaudio-plugin","audio/x-pn-realaudio"]],["rms","application/vnd.jcp.javame.midlet-rms"],["rnc","application/relax-ng-compact-syntax"],["rng",["application/ringing-tones","application/vnd.nokia.ringing-tone"]],["rnx","application/vnd.rn-realplayer"],["roff","application/x-troff"],["rp","image/vnd.rn-realpix"],["rp9","application/vnd.cloanto.rp9"],["rpm","audio/x-pn-realaudio-plugin"],["rpss","application/vnd.nokia.radio-presets"],["rpst","application/vnd.nokia.radio-preset"],["rq","application/sparql-query"],["rs","application/rls-services+xml"],["rsd","application/rsd+xml"],["rt",["text/richtext","text/vnd.rn-realtext"]],["rtf",["application/rtf","text/richtext","application/x-rtf"]],["rtx",["text/richtext","application/rtf"]],["rv","video/vnd.rn-realvideo"],["s","text/x-asm"],["s3m","audio/s3m"],["saf","application/vnd.yamaha.smaf-audio"],["saveme","application/octet-stream"],["sbk","application/x-tbook"],["sbml","application/sbml+xml"],["sc","application/vnd.ibm.secure-container"],["scd","application/x-msschedule"],["scm",["application/vnd.lotus-screencam","video/x-scm","text/x-script.guile","application/x-lotusscreencam","text/x-script.scheme"]],["scq","application/scvp-cv-request"],["scs","application/scvp-cv-response"],["sct","text/scriptlet"],["scurl","text/vnd.curl.scurl"],["sda","application/vnd.stardivision.draw"],["sdc","application/vnd.stardivision.calc"],["sdd","application/vnd.stardivision.impress"],["sdkm","application/vnd.solent.sdkm+xml"],["sdml","text/plain"],["sdp",["application/sdp","application/x-sdp"]],["sdr","application/sounder"],["sdw","application/vnd.stardivision.writer"],["sea",["application/sea","application/x-sea"]],["see","application/vnd.seemail"],["seed","application/vnd.fdsn.seed"],["sema","application/vnd.sema"],["semd","application/vnd.semd"],["semf","application/vnd.semf"],["ser","application/java-serialized-object"],["set","application/set"],["setpay","application/set-payment-initiation"],["setreg","application/set-registration-initiation"],["sfd-hdstx","application/vnd.hydrostatix.sof-data"],["sfs","application/vnd.spotfire.sfs"],["sgl","application/vnd.stardivision.writer-global"],["sgm",["text/sgml","text/x-sgml"]],["sgml",["text/sgml","text/x-sgml"]],["sh",["application/x-shar","application/x-bsh","application/x-sh","text/x-script.sh"]],["shar",["application/x-bsh","application/x-shar"]],["shf","application/shf+xml"],["shtml",["text/html","text/x-server-parsed-html"]],["sid","audio/x-psid"],["sis","application/vnd.symbian.install"],["sit",["application/x-stuffit","application/x-sit"]],["sitx","application/x-stuffitx"],["skd","application/x-koan"],["skm","application/x-koan"],["skp",["application/vnd.koan","application/x-koan"]],["skt","application/x-koan"],["sl","application/x-seelogo"],["sldm","application/vnd.ms-powerpoint.slide.macroenabled.12"],["sldx","application/vnd.openxmlformats-officedocument.presentationml.slide"],["slt","application/vnd.epson.salt"],["sm","application/vnd.stepmania.stepchart"],["smf","application/vnd.stardivision.math"],["smi",["application/smil","application/smil+xml"]],["smil","application/smil"],["snd",["audio/basic","audio/x-adpcm"]],["snf","application/x-font-snf"],["sol","application/solids"],["spc",["text/x-speech","application/x-pkcs7-certificates"]],["spf","application/vnd.yamaha.smaf-phrase"],["spl",["application/futuresplash","application/x-futuresplash"]],["spot","text/vnd.in3d.spot"],["spp","application/scvp-vp-response"],["spq","application/scvp-vp-request"],["spr","application/x-sprite"],["sprite","application/x-sprite"],["src","application/x-wais-source"],["sru","application/sru+xml"],["srx","application/sparql-results+xml"],["sse","application/vnd.kodak-descriptor"],["ssf","application/vnd.epson.ssf"],["ssi","text/x-server-parsed-html"],["ssm","application/streamingmedia"],["ssml","application/ssml+xml"],["sst",["application/vnd.ms-pkicertstore","application/vnd.ms-pki.certstore"]],["st","application/vnd.sailingtracker.track"],["stc","application/vnd.sun.xml.calc.template"],["std","application/vnd.sun.xml.draw.template"],["step","application/step"],["stf","application/vnd.wt.stf"],["sti","application/vnd.sun.xml.impress.template"],["stk","application/hyperstudio"],["stl",["application/vnd.ms-pkistl","application/sla","application/vnd.ms-pki.stl","application/x-navistyle"]],["stm","text/html"],["stp","application/step"],["str","application/vnd.pg.format"],["stw","application/vnd.sun.xml.writer.template"],["sub","image/vnd.dvb.subtitle"],["sus","application/vnd.sus-calendar"],["sv4cpio","application/x-sv4cpio"],["sv4crc","application/x-sv4crc"],["svc","application/vnd.dvb.service"],["svd","application/vnd.svd"],["svf",["image/vnd.dwg","image/x-dwg"]],["svg","image/svg+xml"],["svr",["x-world/x-svr","application/x-world"]],["swf","application/x-shockwave-flash"],["swi","application/vnd.aristanetworks.swi"],["sxc","application/vnd.sun.xml.calc"],["sxd","application/vnd.sun.xml.draw"],["sxg","application/vnd.sun.xml.writer.global"],["sxi","application/vnd.sun.xml.impress"],["sxm","application/vnd.sun.xml.math"],["sxw","application/vnd.sun.xml.writer"],["t",["text/troff","application/x-troff"]],["talk","text/x-speech"],["tao","application/vnd.tao.intent-module-archive"],["tar","application/x-tar"],["tbk",["application/toolbook","application/x-tbook"]],["tcap","application/vnd.3gpp2.tcap"],["tcl",["text/x-script.tcl","application/x-tcl"]],["tcsh","text/x-script.tcsh"],["teacher","application/vnd.smart.teacher"],["tei","application/tei+xml"],["tex","application/x-tex"],["texi","application/x-texinfo"],["texinfo","application/x-texinfo"],["text",["application/plain","text/plain"]],["tfi","application/thraud+xml"],["tfm","application/x-tex-tfm"],["tgz",["application/gnutar","application/x-compressed"]],["thmx","application/vnd.ms-officetheme"],["tif",["image/tiff","image/x-tiff"]],["tiff",["image/tiff","image/x-tiff"]],["tmo","application/vnd.tmobile-livetv"],["torrent","application/x-bittorrent"],["tpl","application/vnd.groove-tool-template"],["tpt","application/vnd.trid.tpt"],["tr","application/x-troff"],["tra","application/vnd.trueapp"],["trm","application/x-msterminal"],["tsd","application/timestamped-data"],["tsi","audio/tsp-audio"],["tsp",["application/dsptype","audio/tsplayer"]],["tsv","text/tab-separated-values"],["ttf","application/x-font-ttf"],["ttl","text/turtle"],["turbot","image/florian"],["twd","application/vnd.simtech-mindmapper"],["txd","application/vnd.genomatix.tuxedo"],["txf","application/vnd.mobius.txf"],["txt","text/plain"],["ufd","application/vnd.ufdl"],["uil","text/x-uil"],["uls","text/iuls"],["umj","application/vnd.umajin"],["uni","text/uri-list"],["unis","text/uri-list"],["unityweb","application/vnd.unity"],["unv","application/i-deas"],["uoml","application/vnd.uoml+xml"],["uri","text/uri-list"],["uris","text/uri-list"],["ustar",["application/x-ustar","multipart/x-ustar"]],["utz","application/vnd.uiq.theme"],["uu",["application/octet-stream","text/x-uuencode"]],["uue","text/x-uuencode"],["uva","audio/vnd.dece.audio"],["uvh","video/vnd.dece.hd"],["uvi","image/vnd.dece.graphic"],["uvm","video/vnd.dece.mobile"],["uvp","video/vnd.dece.pd"],["uvs","video/vnd.dece.sd"],["uvu","video/vnd.uvvu.mp4"],["uvv","video/vnd.dece.video"],["vcd","application/x-cdlink"],["vcf","text/x-vcard"],["vcg","application/vnd.groove-vcard"],["vcs","text/x-vcalendar"],["vcx","application/vnd.vcx"],["vda","application/vda"],["vdo","video/vdo"],["vew","application/groupwise"],["vis","application/vnd.visionary"],["viv",["video/vivo","video/vnd.vivo"]],["vivo",["video/vivo","video/vnd.vivo"]],["vmd","application/vocaltec-media-desc"],["vmf","application/vocaltec-media-file"],["voc",["audio/voc","audio/x-voc"]],["vos","video/vosaic"],["vox","audio/voxware"],["vqe","audio/x-twinvq-plugin"],["vqf","audio/x-twinvq"],["vql","audio/x-twinvq-plugin"],["vrml",["model/vrml","x-world/x-vrml","application/x-vrml"]],["vrt","x-world/x-vrt"],["vsd",["application/vnd.visio","application/x-visio"]],["vsf","application/vnd.vsf"],["vst","application/x-visio"],["vsw","application/x-visio"],["vtu","model/vnd.vtu"],["vxml","application/voicexml+xml"],["w60","application/wordperfect6.0"],["w61","application/wordperfect6.1"],["w6w","application/msword"],["wad","application/x-doom"],["wav",["audio/wav","audio/x-wav"]],["wax","audio/x-ms-wax"],["wb1","application/x-qpro"],["wbmp","image/vnd.wap.wbmp"],["wbs","application/vnd.criticaltools.wbs+xml"],["wbxml","application/vnd.wap.wbxml"],["wcm","application/vnd.ms-works"],["wdb","application/vnd.ms-works"],["web","application/vnd.xara"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["wg","application/vnd.pmi.widget"],["wgt","application/widget"],["wiz","application/msword"],["wk1","application/x-123"],["wks","application/vnd.ms-works"],["wm","video/x-ms-wm"],["wma","audio/x-ms-wma"],["wmd","application/x-ms-wmd"],["wmf",["windows/metafile","application/x-msmetafile"]],["wml","text/vnd.wap.wml"],["wmlc","application/vnd.wap.wmlc"],["wmls","text/vnd.wap.wmlscript"],["wmlsc","application/vnd.wap.wmlscriptc"],["wmv","video/x-ms-wmv"],["wmx","video/x-ms-wmx"],["wmz","application/x-ms-wmz"],["woff","application/x-font-woff"],["word","application/msword"],["wp","application/wordperfect"],["wp5",["application/wordperfect","application/wordperfect6.0"]],["wp6","application/wordperfect"],["wpd",["application/wordperfect","application/vnd.wordperfect","application/x-wpwin"]],["wpl","application/vnd.ms-wpl"],["wps","application/vnd.ms-works"],["wq1","application/x-lotus"],["wqd","application/vnd.wqd"],["wri",["application/mswrite","application/x-wri","application/x-mswrite"]],["wrl",["model/vrml","x-world/x-vrml","application/x-world"]],["wrz",["model/vrml","x-world/x-vrml"]],["wsc","text/scriplet"],["wsdl","application/wsdl+xml"],["wspolicy","application/wspolicy+xml"],["wsrc","application/x-wais-source"],["wtb","application/vnd.webturbo"],["wtk","application/x-wintalk"],["wvx","video/x-ms-wvx"],["x-png","image/png"],["x3d","application/vnd.hzn-3d-crossword"],["xaf","x-world/x-vrml"],["xap","application/x-silverlight-app"],["xar","application/vnd.xara"],["xbap","application/x-ms-xbap"],["xbd","application/vnd.fujixerox.docuworks.binder"],["xbm",["image/xbm","image/x-xbm","image/x-xbitmap"]],["xdf","application/xcap-diff+xml"],["xdm","application/vnd.syncml.dm+xml"],["xdp","application/vnd.adobe.xdp+xml"],["xdr","video/x-amt-demorun"],["xdssc","application/dssc+xml"],["xdw","application/vnd.fujixerox.docuworks"],["xenc","application/xenc+xml"],["xer","application/patch-ops-error+xml"],["xfdf","application/vnd.adobe.xfdf"],["xfdl","application/vnd.xfdl"],["xgz","xgl/drawing"],["xhtml","application/xhtml+xml"],["xif","image/vnd.xiff"],["xl","application/excel"],["xla",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlam","application/vnd.ms-excel.addin.macroenabled.12"],["xlb",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlc",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xld",["application/excel","application/x-excel"]],["xlk",["application/excel","application/x-excel"]],["xll",["application/excel","application/vnd.ms-excel","application/x-excel"]],["xlm",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xls",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xlsb","application/vnd.ms-excel.sheet.binary.macroenabled.12"],["xlsm","application/vnd.ms-excel.sheet.macroenabled.12"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xlt",["application/vnd.ms-excel","application/excel","application/x-excel"]],["xltm","application/vnd.ms-excel.template.macroenabled.12"],["xltx","application/vnd.openxmlformats-officedocument.spreadsheetml.template"],["xlv",["application/excel","application/x-excel"]],["xlw",["application/vnd.ms-excel","application/excel","application/x-msexcel","application/x-excel"]],["xm","audio/xm"],["xml",["application/xml","text/xml","application/atom+xml","application/rss+xml"]],["xmz","xgl/movie"],["xo","application/vnd.olpc-sugar"],["xof","x-world/x-vrml"],["xop","application/xop+xml"],["xpi","application/x-xpinstall"],["xpix","application/x-vnd.ls-xpix"],["xpm",["image/xpm","image/x-xpixmap"]],["xpr","application/vnd.is-xpr"],["xps","application/vnd.ms-xpsdocument"],["xpw","application/vnd.intercon.formnet"],["xslt","application/xslt+xml"],["xsm","application/vnd.syncml+xml"],["xspf","application/xspf+xml"],["xsr","video/x-amt-showrun"],["xul","application/vnd.mozilla.xul+xml"],["xwd",["image/x-xwd","image/x-xwindowdump"]],["xyz",["chemical/x-xyz","chemical/x-pdb"]],["yang","application/yang"],["yin","application/yin+xml"],["z",["application/x-compressed","application/x-compress"]],["zaz","application/vnd.zzazz.deck+xml"],["zip",["application/zip","multipart/x-zip","application/x-zip-compressed","application/x-compressed"]],["zir","application/vnd.zul"],["zmm","application/vnd.handheld-entertainment+xml"],["zoo","application/octet-stream"],["zsh","text/x-script.zsh"]]);t.exports={detectMimeType(e){if(!e)return n;let t=r.parse(e),i=(t.ext.substr(1)||t.name||"").split("?").shift().trim().toLowerCase(),s=n;return(o.has(i)&&(s=o.get(i)),Array.isArray(s))?s[0]:s},detectExtension(e){if(!e)return s;let t=(e||"").toLowerCase().trim().split("/"),i=t.shift().trim(),r=t.join("/").trim();if(a.has(i+"/"+r)){let e=a.get(i+"/"+r);return Array.isArray(e)?e[0]:e}return"text"===i?"txt":"bin"}}},720854,(e,t,i)=>{"use strict";let r=0x7fffffff,n=36,s=1,a=26,o=38,l=700,c=72,d=128,u="-",h=/^xn--/,A=/[^\0-\x7F]/,p=/[\x2E\u3002\uFF0E\uFF61]/g,f={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},g=35,m=Math.floor,y=String.fromCharCode;function b(e){throw RangeError(f[e])}function E(e,t){let i=[],r=e.length;for(;r--;)i[r]=t(e[r]);return i}function C(e,t){let i=e.split("@"),r="";return i.length>1&&(r=i[0]+"@",e=i[1]),r+E((e=e.replace(p,".")).split("."),t).join(".")}function w(e){let t=[],i=0,r=e.length;for(;i<r;){let n=e.charCodeAt(i++);if(n>=55296&&n<=56319&&i<r){let r=e.charCodeAt(i++);(64512&r)==56320?t.push(((1023&n)<<10)+(1023&r)+65536):(t.push(n),i--)}else t.push(n)}return t}let I=function(e){return e>=48&&e<58?26+(e-48):e>=65&&e<91?e-65:e>=97&&e<123?e-97:n},v=function(e,t){return e+22+75*(e<26)-((0!=t)<<5)},B=function(e,t,i){let r=0;for(e=i?m(e/l):e>>1,e+=m(e/t);e>g*a>>1;r+=n)e=m(e/g);return m(r+(g+1)*e/(e+o))},Q=function(e){let t=[],i=e.length,o=0,l=d,h=c,A=e.lastIndexOf(u);A<0&&(A=0);for(let i=0;i<A;++i)e.charCodeAt(i)>=128&&b("not-basic"),t.push(e.charCodeAt(i));for(let c=A>0?A+1:0;c<i;){let d=o;for(let t=1,l=n;;l+=n){c>=i&&b("invalid-input");let d=I(e.charCodeAt(c++));d>=n&&b("invalid-input"),d>m((r-o)/t)&&b("overflow"),o+=d*t;let u=l<=h?s:l>=h+a?a:l-h;if(d<u)break;let A=n-u;t>m(r/A)&&b("overflow"),t*=A}let u=t.length+1;h=B(o-d,u,0==d),m(o/u)>r-l&&b("overflow"),l+=m(o/u),o%=u,t.splice(o++,0,l)}return String.fromCodePoint(...t)},x=function(e){let t=[],i=(e=w(e)).length,o=d,l=0,h=c;for(let i of e)i<128&&t.push(y(i));let A=t.length,p=A;for(A&&t.push(u);p<i;){let i=r;for(let t of e)t>=o&&t<i&&(i=t);let c=p+1;for(let d of(i-o>m((r-l)/c)&&b("overflow"),l+=(i-o)*c,o=i,e))if(d<o&&++l>r&&b("overflow"),d===o){let e=l;for(let i=n;;i+=n){let r=i<=h?s:i>=h+a?a:i-h;if(e<r)break;let o=e-r,l=n-r;t.push(y(v(r+o%l,0))),e=m(o/l)}t.push(y(v(e,0))),h=B(l,c,p===A),l=0,++p}++l,++o}return t.join("")},S=function(e){return C(e,function(e){return h.test(e)?Q(e.slice(4).toLowerCase()):e})},k=function(e){return C(e,function(e){return A.test(e)?"xn--"+x(e):e})};t.exports={version:"2.3.1",ucs2:{decode:w,encode:e=>String.fromCodePoint(...e)},decode:Q,encode:x,toASCII:k,toUnicode:S}},63741,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;function n(e){return"string"==typeof e&&(e=Buffer.from(e,"utf-8")),e.toString("base64")}function s(e,t){if(e=(e||"").toString(),t=t||76,e.length<=t)return e;let i=[],r=0,n=1024*t;for(;r<e.length;){let s=e.substr(r,n).replace(RegExp(".{"+t+"}","g"),"$&\r\n");i.push(s),r+=n}return i.join("")}class a extends r{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this._remainingBytes=!1,this.inputBytes=0,this.outputBytes=0}_transform(e,t,i){if("buffer"!==t&&(e=Buffer.from(e,t)),!e||!e.length)return setImmediate(i);this.inputBytes+=e.length,this._remainingBytes&&this._remainingBytes.length&&(e=Buffer.concat([this._remainingBytes,e],this._remainingBytes.length+e.length),this._remainingBytes=!1),e.length%3?(this._remainingBytes=e.slice(e.length-e.length%3),e=e.slice(0,e.length-e.length%3)):this._remainingBytes=!1;let r=this._curLine+n(e);if(this.options.lineLength){let e=(r=s(r,this.options.lineLength)).lastIndexOf("\n");e<0?(this._curLine=r,r=""):(this._curLine=r.substring(e+1),(r=r.substring(0,e+1))&&!r.endsWith("\r\n")&&(r+="\r\n"))}else this._curLine="";r&&(this.outputBytes+=r.length,this.push(Buffer.from(r,"ascii"))),setImmediate(i)}_flush(e){this._remainingBytes&&this._remainingBytes.length&&(this._curLine+=n(this._remainingBytes)),this._curLine&&(this.outputBytes+=this._curLine.length,this.push(Buffer.from(this._curLine,"ascii")),this._curLine=""),e()}}t.exports={encode:n,wrap:s,Encoder:a}},998976,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;function n(e){let t;"string"==typeof e&&(e=Buffer.from(e,"utf-8"));let i=[[9],[10],[13],[32,60],[62,126]],r="";for(let n=0,s=e.length;n<s;n++){if(a(t=e[n],i)&&(32!==t&&9!==t||n!==s-1&&10!==e[n+1]&&13!==e[n+1])){r+=String.fromCharCode(t);continue}r+="="+(t<16?"0":"")+t.toString(16).toUpperCase()}return r}function s(e,t){let i,r,n;if(e=(e||"").toString(),t=t||76,e.length<=t)return e;let s=0,a=e.length,o=Math.floor(t/3),l="";for(;s<a;){if(i=(n=e.substr(s,t)).match(/\r\n/)){l+=n=n.substr(0,i.index+i[0].length),s+=n.length;continue}if("\n"===n.substr(-1)){l+=n,s+=n.length;continue}if(i=n.substr(-o).match(/\n.*?$/)){l+=n=n.substr(0,n.length-(i[0].length-1)),s+=n.length;continue}if(n.length>t-o&&(i=n.substr(-o).match(/[ \t.,!?][^ \t.,!?]*$/)))n=n.substr(0,n.length-(i[0].length-1));else if(n.match(/[=][\da-f]{0,2}$/i))for((i=n.match(/[=][\da-f]{0,1}$/i))&&(n=n.substr(0,n.length-i[0].length));n.length>3&&n.length<a-s&&!n.match(/^(?:=[\da-f]{2}){1,4}$/i)&&(i=n.match(/[=][\da-f]{2}$/gi))&&!((r=parseInt(i[0].substr(1,2),16))<128)&&(n=n.substr(0,n.length-3),!(r>=192)););s+n.length<a&&"\n"!==n.substr(-1)?(n.length===t&&n.match(/[=][\da-f]{2}$/i)?n=n.substr(0,n.length-3):n.length===t&&(n=n.substr(0,n.length-1)),s+=n.length,n+="=\r\n"):s+=n.length,l+=n}return l}function a(e,t){for(let i=t.length-1;i>=0;i--)if(t[i].length&&(1===t[i].length&&e===t[i][0]||2===t[i].length&&e>=t[i][0]&&e<=t[i][1]))return!0;return!1}class o extends r{constructor(e){super(),this.options=e||{},!1!==this.options.lineLength&&(this.options.lineLength=this.options.lineLength||76),this._curLine="",this.inputBytes=0,this.outputBytes=0}_transform(e,t,i){let r;if("buffer"!==t&&(e=Buffer.from(e,t)),!e||!e.length)return i();this.inputBytes+=e.length,this.options.lineLength?(r=(r=s(r=this._curLine+n(e),this.options.lineLength)).replace(/(^|\n)([^\n]*)$/,(e,t,i)=>(this._curLine=i,t)))&&(this.outputBytes+=r.length,this.push(r)):(r=n(e),this.outputBytes+=r.length,this.push(r,"ascii")),i()}_flush(e){this._curLine&&(this.outputBytes+=this._curLine.length,this.push(this._curLine,"ascii")),e()}}t.exports={encode:n,wrap:s,Encoder:o}},474855,(e,t,i)=>{"use strict";let r=e.r(63741),n=e.r(998976),s=e.r(574898);t.exports={isPlainText(e,t){let i=t?/[\x00-\x08\x0b\x0c\x0e-\x1f"\u0080-\uFFFF]/:/[\x00-\x08\x0b\x0c\x0e-\x1f\u0080-\uFFFF]/;return!("string"!=typeof e||i.test(e))},hasLongerLines:(e,t)=>e.length>131072||RegExp("^.{"+(t+1)+",}","m").test(e),encodeWord(e,t,i){let s;t=(t||"Q").toString().toUpperCase().trim().charAt(0);let a="UTF-8";if((i=i||0)&&i>7+a.length&&(i-=7+a.length),"Q"===t?s=n.encode(e).replace(/[^a-z0-9!*+\-/=]/gi,e=>{let t=e.charCodeAt(0).toString(16).toUpperCase();return" "===e?"_":"="+(1===t.length?"0"+t:t)}):"B"===t&&(s="string"==typeof e?e:r.encode(e),i=i?Math.max(3,(i-i%4)/4*3):0),i&&("B"!==t?s:r.encode(e)).length>i)if("Q"===t)s=this.splitMimeEncodedString(s,i).join("?= =?"+a+"?"+t+"?");else{let e=[],n="";for(let t=0,a=s.length;t<a;t++){let o=s.charAt(t);/[\ud83c\ud83d\ud83e]/.test(o)&&t<a-1&&(o+=s.charAt(++t)),Buffer.byteLength(n+o)<=i||0===t?n+=o:(e.push(r.encode(n)),n=o)}n&&e.push(r.encode(n)),s=e.length>1?e.join("?= =?"+a+"?"+t+"?"):e.join("")}else"B"===t&&(s=r.encode(e));return"=?"+a+"?"+t+"?"+s+("?="===s.substr(-2)?"":"?=")},encodeWords(e,t,i,r){i=i||0;let n=e.match(/(?:^|\s)([^\s]*["\u0080-\uFFFF])/);if(!n)return e;if(r)return this.encodeWord(e,t,i);let s=e.match(/(["\u0080-\uFFFF][^\s]*)[^"\u0080-\uFFFF]*$/);if(!s)return e;let a=n.index+(n[0].match(/[^\s]/)||{index:0}).index,o=s.index+(s[1]||"").length;return(a?e.substr(0,a):"")+this.encodeWord(e.substring(a,o),t||"Q",i)+(o<e.length?e.substr(o):"")},buildHeaderValue(e){let t=[];return Object.keys(e.params||{}).forEach(i=>{let r=e.params[i];!this.isPlainText(r,!0)||r.length>=75?this.buildHeaderParam(i,r,50).forEach(e=>{/[\s"\\;:/=(),<>@[\]?]|^[-']|'$/.test(e.value)&&"*"!==e.key.substr(-1)?t.push(e.key+"="+JSON.stringify(e.value)):t.push(e.key+"="+e.value)}):/[\s'"\\;:/=(),<>@[\]?]|^-/.test(r)?t.push(i+"="+JSON.stringify(r)):t.push(i+"="+r)}),e.value+(t.length?"; "+t.join("; "):"")},buildHeaderParam(e,t,i){let r,n,s,a,o,l,c=[],d="string"==typeof t?t:(t||"").toString(),u=0;if(i=i||50,this.isPlainText(t,!0)){if(d.length<=i)return[{key:e,value:d}];(d=d.replace(RegExp(".{"+i+"}","g"),e=>(c.push({line:e}),"")))&&c.push({line:d})}else{if(/[\uD800-\uDBFF]/.test(d)){for(o=0,r=[],l=d.length;o<l;o++)(s=(n=d.charAt(o)).charCodeAt(0))>=55296&&s<=56319&&o<l-1?(n+=d.charAt(o+1),r.push(n),o++):r.push(n);d=r}a="utf-8''";let e=!0;for(o=0,u=0,l=d.length;o<l;o++){if(n=d[o],e)n=this.safeEncodeURIComponent(n);else if((n=" "===n?n:this.safeEncodeURIComponent(n))!==d[o])if((this.safeEncodeURIComponent(a)+n).length>=i)c.push({line:a,encoded:e}),a="",u=o-1;else{e=!0,o=u,a="";continue}(a+n).length>=i?(c.push({line:a,encoded:e}),a=n=" "===d[o]?" ":this.safeEncodeURIComponent(d[o]),n===d[o]?(e=!1,u=o-1):e=!0):a+=n}a&&c.push({line:a,encoded:e})}return c.map((t,i)=>({key:e+"*"+i+(t.encoded?"*":""),value:t.line}))},parseHeaderValue(e){let t,i={value:!1,params:{}},r=!1,n="",s="value",a=!1,o=!1;for(let l=0,c=e.length;l<c;l++)if(t=e.charAt(l),"key"===s){if("="===t){r=n.trim().toLowerCase(),s="value",n="";continue}n+=t}else{if(o)n+=t;else if("\\"===t){o=!0;continue}else a&&t===a?a=!1:a||'"'!==t?a||";"!==t?n+=t:(!1===r?i.value=n.trim():i.params[r]=n.trim(),s="key",n=""):a=t;o=!1}return"value"===s?!1===r?i.value=n.trim():i.params[r]=n.trim():n.trim()&&(i.params[n.trim().toLowerCase()]=""),Object.keys(i.params).forEach(e=>{let t,r,n,s;(n=e.match(/(\*(\d+)|\*(\d+)\*|\*)$/))&&(t=e.substr(0,n.index),r=Number(n[2]||n[3])||0,i.params[t]&&"object"==typeof i.params[t]||(i.params[t]={charset:!1,values:[]}),s=i.params[e],0===r&&"*"===n[0].substr(-1)&&(n=s.match(/^([^']*)'[^']*'(.*)$/))&&(i.params[t].charset=n[1]||"iso-8859-1",s=n[2]),i.params[t].values[r]=s,delete i.params[e])}),Object.keys(i.params).forEach(e=>{let t;i.params[e]&&Array.isArray(i.params[e].values)&&(t=i.params[e].values.map(e=>e||"").join(""),i.params[e].charset?i.params[e]="=?"+i.params[e].charset+"?Q?"+t.replace(/[=?_\s]/g,e=>{let t=e.charCodeAt(0).toString(16);return" "===e?"_":"%"+(t.length<2?"0":"")+t}).replace(/%/g,"=")+"?=":i.params[e]=t)}),i},detectExtension:e=>s.detectExtension(e),detectMimeType:e=>s.detectMimeType(e),foldLines(e,t,i){e=(e||"").toString(),t=t||76;let r=0,n=e.length,s="",a,o;for(;r<n;){if((a=e.substr(r,t)).length<t){s+=a;break}if(o=a.match(/^[^\n\r]*(\r?\n|\r)/)){s+=a=o[0],r+=a.length;continue}(o=a.match(/(\s+)[^\s]*$/))&&o[0].length-(i?(o[1]||"").length:0)<a.length?a=a.substr(0,a.length-(o[0].length-(i?(o[1]||"").length:0))):(o=e.substr(r+a.length).match(/^[^\s]+(\s*)/))&&(a+=o[0].substr(0,o[0].length-(i?0:(o[1]||"").length))),s+=a,(r+=a.length)<n&&(s+="\r\n")}return s},splitMimeEncodedString:(e,t)=>{let i,r,n,s,a=[];for(t=Math.max(t||0,12);e.length;){for((r=(i=e.substr(0,t)).match(/[=][0-9A-F]?$/i))&&(i=i.substr(0,r.index)),s=!1;!s;)s=!0,(r=e.substr(i.length).match(/^[=]([0-9A-F]{2})/i))&&(n=parseInt(r[1],16))<194&&n>127&&(i=i.substr(0,i.length-3),s=!1);i.length&&a.push(i),e=e.substr(i.length)}return a},encodeURICharComponent:e=>{let t="",i=e.charCodeAt(0).toString(16).toUpperCase();if(i.length%2&&(i="0"+i),i.length>2)for(let e=0,r=i.length/2;e<r;e++)t+="%"+i.substr(e,2);else t+="%"+i;return t},safeEncodeURIComponent(e){e=(e||"").toString();try{e=encodeURIComponent(e)}catch(t){return e.replace(/[^\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]+/g,"")}return e.replace(/[\x00-\x1F *'()<>@,;:\\"[\]?=\u007F-\uFFFF]/g,e=>this.encodeURICharComponent(e))}}},659953,(e,t,i)=>{"use strict";function r(e,t){let i,r,n,s=!1,o="text",l=[],c={address:[],comment:[],group:[],text:[],textWasQuoted:[]},d=!1;for(r=0,n=e.length;r<n;r++){let t=e[r],i=r?e[r-1]:null;if("operator"===t.type)switch(t.value){case"<":o="address",d=!1;break;case"(":o="comment",d=!1;break;case":":o="group",s=!0,d=!1;break;case'"':d=!d,o="text";break;default:o="text",d=!1}else t.value&&("address"===o&&(t.value=t.value.replace(/^[^<]*<\s*/,"")),i&&i.noBreak&&c[o].length?(c[o][c[o].length-1]+=t.value,"text"===o&&d&&(c.textWasQuoted[c.textWasQuoted.length-1]=!0)):(c[o].push(t.value),"text"===o&&c.textWasQuoted.push(d)))}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),s){c.text=c.text.join(" ");let e=[];c.group.length&&a(c.group.join(","),{_depth:t+1}).forEach(t=>{t.group?e=e.concat(t.group):e.push(t)}),l.push({name:c.text||i&&i.name,group:e})}else{if(!c.address.length&&c.text.length){for(r=c.text.length-1;r>=0;r--)if(!c.textWasQuoted[r]&&c.text[r].match(/^[^@\s]+@[^@\s]+$/)){c.address=c.text.splice(r,1),c.textWasQuoted.splice(r,1);break}let e=function(e){return c.address.length?e:(c.address=[e.trim()]," ")};if(!c.address.length)for(r=c.text.length-1;r>=0&&(c.textWasQuoted[r]||(c.text[r]=c.text[r].replace(/\s*\b[^@\s]+@[^\s]+\b\s*/,e).trim(),!c.address.length));r--);}if(!c.text.length&&c.comment.length&&(c.text=c.comment,c.comment=[]),c.address.length>1&&(c.text=c.text.concat(c.address.splice(1))),c.text=c.text.join(" "),c.address=c.address.join(" "),!c.address&&s)return[];(i={address:c.address||c.text||"",name:c.text||c.address||""}).address===i.name&&((i.address||"").match(/@/)?i.name="":i.address=""),l.push(i)}return l}class n{constructor(e){this.str=(e||"").toString(),this.operatorCurrent="",this.operatorExpecting="",this.node=null,this.escaped=!1,this.list=[],this.operators={'"':'"',"(":")","<":">",",":"",":":";",";":""}}tokenize(){let e=[];for(let e=0,t=this.str.length;e<t;e++){let i=this.str.charAt(e),r=e<t-1?this.str.charAt(e+1):null;this.checkChar(i,r)}return this.list.forEach(t=>{t.value=(t.value||"").toString().trim(),t.value&&e.push(t)}),e}checkChar(e,t){if(this.escaped);else if(e===this.operatorExpecting){this.node={type:"operator",value:e},t&&![" "," ","\r","\n",",",";"].includes(t)&&(this.node.noBreak=!0),this.list.push(this.node),this.node=null,this.operatorExpecting="",this.escaped=!1;return}else if(!this.operatorExpecting&&e in this.operators){this.node={type:"operator",value:e},this.list.push(this.node),this.node=null,this.operatorExpecting=this.operators[e],this.escaped=!1;return}else if(['"',"'"].includes(this.operatorExpecting)&&"\\"===e){this.escaped=!0;return}this.node||(this.node={type:"text",value:""},this.list.push(this.node)),"\n"===e&&(e=" "),(e.charCodeAt(0)>=33||[" "," "].includes(e))&&(this.node.value+=e),this.escaped=!1}}let s=50;function a(e,t){let i=(t=t||{})._depth||0;if(i>s)return[];let a=new n(e).tokenize(),o=[],l=[],c=[];if(a.forEach(e=>{"operator"===e.type&&(","===e.value||";"===e.value)?(l.length&&o.push(l),l=[]):l.push(e)}),l.length&&o.push(l),o.forEach(e=>{(e=r(e,i)).length&&(c=c.concat(e))}),t.flatten){let e=[],t=i=>{i.forEach(i=>{if(i.group)return t(i.group);e.push(i)})};return t(c),e}return c}t.exports=a},348758,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;class n extends r{constructor(){super(),this.lastByte=!1}_transform(e,t,i){e.length&&(this.lastByte=e[e.length-1]),this.push(e),i()}_flush(e){return 10===this.lastByte||(13===this.lastByte?this.push(Buffer.from("\n")):this.push(Buffer.from("\r\n"))),e()}}t.exports=n},73676,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;class n extends r{constructor(e){super(e),this.options=e||{},this.lastByte=!1}_transform(e,t,i){let r,n=0;for(let t=0,i=e.length;t<i;t++)10===e[t]&&(t&&13!==e[t-1]||!t&&13!==this.lastByte)&&(t>n&&(r=e.slice(n,t),this.push(r)),this.push(Buffer.from("\r\n")),n=t+1);n&&n<e.length?(r=e.slice(n),this.push(r)):n||this.push(e),this.lastByte=e[e.length-1],i()}}t.exports=n},414006,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;class n extends r{constructor(e){super(e),this.options=e||{}}_transform(e,t,i){let r,n=0;for(let t=0,i=e.length;t<i;t++)13===e[t]&&(r=e.slice(n,t),n=t+1,this.push(r));n&&n<e.length?(r=e.slice(n),this.push(r)):n||this.push(e),i()}}t.exports=n},847229,(e,t,i)=>{"use strict";let r=e.r(254799),n=e.r(522734),s=e.r(720854),a=e.r(688947).PassThrough,o=e.r(345693),l=e.r(474855),c=e.r(998976),d=e.r(63741),u=e.r(659953),h=e.r(373248),A=e.r(348758),p=e.r(73676),f=e.r(414006);class g{constructor(e,t){this.nodeCounter=0,t=t||{},this.baseBoundary=t.baseBoundary||r.randomBytes(8).toString("hex"),this.boundaryPrefix=t.boundaryPrefix||"--_NmP",this.disableFileAccess=!!t.disableFileAccess,this.disableUrlAccess=!!t.disableUrlAccess,this.normalizeHeaderKey=t.normalizeHeaderKey,this.date=new Date,this.rootNode=t.rootNode||this,this.keepBcc=!!t.keepBcc,t.filename&&(this.filename=t.filename,e||(e=l.detectMimeType(this.filename.split(".").pop()))),this.textEncoding=(t.textEncoding||"").toString().trim().charAt(0).toUpperCase(),this.parentNode=t.parentNode,this.hostname=t.hostname,this.newline=t.newline,this.childNodes=[],this._nodeId=++this.rootNode.nodeCounter,this._headers=[],this._isPlainText=!1,this._hasLongLines=!1,this._envelope=!1,this._raw=!1,this._transforms=[],this._processFuncs=[],e&&this.setHeader("Content-Type",e)}createChild(e,t){t||"object"!=typeof e||(t=e,e=void 0);let i=new g(e,t);return this.appendChild(i),i}appendChild(e){return e.rootNode!==this.rootNode&&(e.rootNode=this.rootNode,e._nodeId=++this.rootNode.nodeCounter),e.parentNode=this,this.childNodes.push(e),e}replace(e){return e===this?this:(this.parentNode.childNodes.forEach((t,i)=>{t===this&&(e.rootNode=this.rootNode,e.parentNode=this.parentNode,e._nodeId=this._nodeId,this.rootNode=this,this.parentNode=void 0,e.parentNode.childNodes[i]=e)}),e)}remove(){if(!this.parentNode)return this;for(let e=this.parentNode.childNodes.length-1;e>=0;e--)if(this.parentNode.childNodes[e]===this)return this.parentNode.childNodes.splice(e,1),this.parentNode=void 0,this.rootNode=this,this}setHeader(e,t){let i=!1,r;if(!t&&e&&"object"==typeof e)return e.key&&"value"in e?this.setHeader(e.key,e.value):Array.isArray(e)?e.forEach(e=>{this.setHeader(e.key,e.value)}):Object.keys(e).forEach(t=>{this.setHeader(t,e[t])}),this;r={key:e=this._normalizeHeaderKey(e),value:t};for(let t=0,n=this._headers.length;t<n;t++)this._headers[t].key===e&&(i?(this._headers.splice(t,1),t--,n--):(this._headers[t]=r,i=!0));return i||this._headers.push(r),this}addHeader(e,t){return!t&&e&&"object"==typeof e?e.key&&e.value?this.addHeader(e.key,e.value):Array.isArray(e)?e.forEach(e=>{this.addHeader(e.key,e.value)}):Object.keys(e).forEach(t=>{this.addHeader(t,e[t])}):Array.isArray(t)?t.forEach(t=>{this.addHeader(e,t)}):this._headers.push({key:this._normalizeHeaderKey(e),value:t}),this}getHeader(e){e=this._normalizeHeaderKey(e);for(let t=0,i=this._headers.length;t<i;t++)if(this._headers[t].key===e)return this._headers[t].value}setContent(e){return this.content=e,"function"==typeof this.content.pipe?(this._contentErrorHandler=e=>{this.content.removeListener("error",this._contentErrorHandler),this.content=e},this.content.once("error",this._contentErrorHandler)):"string"==typeof this.content&&(this._isPlainText=l.isPlainText(this.content),this._isPlainText&&l.hasLongerLines(this.content,76)&&(this._hasLongLines=!0)),this}build(e){let t;e||(t=new Promise((t,i)=>{e=o.callbackPromise(t,i)}));let i=this.createReadStream(),r=[],n=0,s=!1;return i.on("readable",()=>{let e;for(;null!==(e=i.read());)r.push(e),n+=e.length}),i.once("error",t=>{if(!s)return s=!0,e(t)}),i.once("end",t=>{if(!s)return s=!0,t&&t.length&&(r.push(t),n+=t.length),e(null,Buffer.concat(r,n))}),t}getTransferEncoding(){let e=!1,t=(this.getHeader("Content-Type")||"").toString().toLowerCase().trim();return this.content&&((e=(this.getHeader("Content-Transfer-Encoding")||"").toString().toLowerCase().trim())&&["base64","quoted-printable"].includes(e)||(/^text\//i.test(t)?e=this._isPlainText&&!this._hasLongLines?"7bit":"string"==typeof this.content||this.content instanceof Buffer?"Q"===this._getTextEncoding(this.content)?"quoted-printable":"base64":"B"===this.textEncoding?"base64":"quoted-printable":/^(multipart|message)\//i.test(t)||(e=e||"base64"))),e}buildHeaders(){let e=this.getTransferEncoding(),t=[];if(e&&this.setHeader("Content-Transfer-Encoding",e),this.filename&&!this.getHeader("Content-Disposition")&&this.setHeader("Content-Disposition","attachment"),this.rootNode===this){this.getHeader("Date")||this.setHeader("Date",this.date.toUTCString().replace(/GMT/,"+0000")),this.messageId(),this.getHeader("MIME-Version")||this.setHeader("MIME-Version","1.0");for(let e=this._headers.length-2;e>=0;e--){let t=this._headers[e];"Content-Type"===t.key&&(this._headers.splice(e,1),this._headers.push(t))}}return this._headers.forEach(e=>{let i,r,n=e.key,s=e.value,a={},o=["From","Sender","To","Cc","Bcc","Reply-To","Date","References"];if(!s||"object"!=typeof s||o.includes(n)||(Object.keys(s).forEach(e=>{"value"!==e&&(a[e]=s[e])}),(s=(s.value||"").toString()).trim())){if(a.prepared)return void(a.foldLines?t.push(l.foldLines(n+": "+s)):t.push(n+": "+s));switch(e.key){case"Content-Disposition":i=l.parseHeaderValue(s),this.filename&&(i.params.filename=this.filename),s=l.buildHeaderValue(i);break;case"Content-Type":i=l.parseHeaderValue(s),this._handleContentType(i),i.value.match(/^text\/plain\b/)&&"string"==typeof this.content&&/[\u0080-\uFFFF]/.test(this.content)&&(i.params.charset="utf-8"),s=l.buildHeaderValue(i),this.filename&&(((r=this._encodeWords(this.filename))!==this.filename||/[\s'"\\;:/=(),<>@[\]?]|^-/.test(r))&&(r='"'+r+'"'),s+="; name="+r);break;case"Bcc":if(!this.keepBcc)return}if(((s=this._encodeHeaderValue(n,s))||"").toString().trim()){if("function"==typeof this.normalizeHeaderKey){let e=this.normalizeHeaderKey(n,s);e&&"string"==typeof e&&e.length&&(n=e)}t.push(l.foldLines(n+": "+s,76))}}}),t.join("\r\n")}createReadStream(e){let t,i=new a(e=e||{}),r=i;this.stream(i,e,e=>{e?r.emit("error",e):i.end()});for(let e=0,i=this._transforms.length;e<i;e++)t="function"==typeof this._transforms[e]?this._transforms[e]():this._transforms[e],r.once("error",e=>{t.emit("error",e)}),r=r.pipe(t);t=new A,r.once("error",e=>{t.emit("error",e)}),r=r.pipe(t);for(let e=0,i=this._processFuncs.length;e<i;e++)r=(t=this._processFuncs[e])(r);if(this.newline){let e=["win","windows","dos","\r\n"].includes(this.newline.toString().toLowerCase())?new p:new f,t=r.pipe(e);return r.on("error",e=>t.emit("error",e)),t}return r}transform(e){this._transforms.push(e)}processFunc(e){this._processFuncs.push(e)}stream(e,t,i){let r,n,s=this.getTransferEncoding(),a=!1,o=e=>{a||(a=!0,i(e))},l=()=>{let i=0,r=()=>{if(i>=this.childNodes.length)return e.write("\r\n--"+this.boundary+"--\r\n"),o();let n=this.childNodes[i++];e.write((i>1?"\r\n":"")+"--"+this.boundary+"\r\n"),n.stream(e,t,e=>{if(e)return o(e);setImmediate(r)})};if(!this.multipart)return o();setImmediate(r)},u=()=>{if(!this.content)return setImmediate(l);{if("[object Error]"===Object.prototype.toString.call(this.content))return o(this.content);"function"==typeof this.content.pipe&&(this.content.removeListener("error",this._contentErrorHandler),this._contentErrorHandler=e=>o(e),this.content.once("error",this._contentErrorHandler));let i=()=>{["quoted-printable","base64"].includes(s)?((r=new("base64"===s?d:c).Encoder(t)).pipe(e,{end:!1}),r.once("end",l),r.once("error",e=>o(e)),(n=this._getStream(this.content)).pipe(r)):((n=this._getStream(this.content)).pipe(e,{end:!1}),n.once("end",l)),n.once("error",e=>o(e))};if(this.content._resolve){let e=[],t=0,r=!1,n=this._getStream(this.content);n.on("error",e=>{r||(r=!0,o(e))}),n.on("readable",()=>{let i;for(;null!==(i=n.read());)e.push(i),t+=i.length}),n.on("end",()=>{r||(r=!0,this.content._resolve=!1,this.content._resolvedValue=Buffer.concat(e,t),setImmediate(i))})}else setImmediate(i);return}};this._raw?setImmediate(()=>{if("[object Error]"===Object.prototype.toString.call(this._raw))return o(this._raw);"function"==typeof this._raw.pipe&&this._raw.removeListener("error",this._contentErrorHandler);let t=this._getStream(this._raw);t.pipe(e,{end:!1}),t.on("error",t=>e.emit("error",t)),t.on("end",l)}):(e.write(this.buildHeaders()+"\r\n\r\n"),setImmediate(u))}setEnvelope(e){let t;this._envelope={from:!1,to:[]},e.from&&(t=[],this._convertAddresses(this._parseAddresses(e.from),t),(t=t.filter(e=>e&&e.address)).length&&t[0]&&(this._envelope.from=t[0].address)),["to","cc","bcc"].forEach(t=>{e[t]&&this._convertAddresses(this._parseAddresses(e[t]),this._envelope.to)}),this._envelope.to=this._envelope.to.map(e=>e.address).filter(e=>e);let i=["to","cc","bcc","from"];return Object.keys(e).forEach(t=>{i.includes(t)||(this._envelope[t]=e[t])}),this}getAddresses(){let e={};return this._headers.forEach(t=>{let i=t.key.toLowerCase();["from","sender","reply-to","to","cc","bcc"].includes(i)&&(Array.isArray(e[i])||(e[i]=[]),this._convertAddresses(this._parseAddresses(t.value),e[i]))}),e}getEnvelope(){if(this._envelope)return this._envelope;let e={from:!1,to:[]};return this._headers.forEach(t=>{let i=[];"From"===t.key||!e.from&&["Reply-To","Sender"].includes(t.key)?(this._convertAddresses(this._parseAddresses(t.value),i),i.length&&i[0]&&(e.from=i[0].address)):["To","Cc","Bcc"].includes(t.key)&&this._convertAddresses(this._parseAddresses(t.value),e.to)}),e.to=e.to.map(e=>e.address),e}messageId(){let e=this.getHeader("Message-ID");return e||(e=this._generateMessageId(),this.setHeader("Message-ID",e)),e}setRaw(e){return this._raw=e,this._raw&&"function"==typeof this._raw.pipe&&(this._contentErrorHandler=e=>{this._raw.removeListener("error",this._contentErrorHandler),this._raw=e},this._raw.once("error",this._contentErrorHandler)),this}_getStream(e){let t;return e._resolvedValue?(t=new a,setImmediate(()=>{try{t.end(e._resolvedValue)}catch(e){t.emit("error",e)}}),t):"function"==typeof e.pipe?e:e&&"string"==typeof e.path&&!e.href?this.disableFileAccess?(t=new a,setImmediate(()=>t.emit("error",Error("File access rejected for "+e.path))),t):n.createReadStream(e.path):e&&"string"==typeof e.href?this.disableUrlAccess?(t=new a,setImmediate(()=>t.emit("error",Error("Url access rejected for "+e.href))),t):h(e.href,{headers:e.httpHeaders}):(t=new a,setImmediate(()=>{try{t.end(e||"")}catch(e){t.emit("error",e)}}),t)}_parseAddresses(e){return[].concat.apply([],[].concat(e).map(e=>e&&e.address?(e.address=this._normalizeAddress(e.address),e.name=e.name||"",[e]):u(e)))}_normalizeHeaderKey(e){return e=(e||"").toString().replace(/\r?\n|\r/g," ").trim().toLowerCase().replace(/^X-SMTPAPI$|^(MIME|DKIM|ARC|BIMI)\b|^[a-z]|-(SPF|FBL|ID|MD5)$|-[a-z]/gi,e=>e.toUpperCase()).replace(/^Content-Features$/i,"Content-features")}_handleContentType(e){this.contentType=e.value.trim().toLowerCase(),this.multipart=!!/^multipart\//i.test(this.contentType)&&this.contentType.substr(this.contentType.indexOf("/")+1),this.multipart?this.boundary=e.params.boundary=e.params.boundary||this.boundary||this._generateBoundary():this.boundary=!1}_generateBoundary(){return this.rootNode.boundaryPrefix+"-"+this.rootNode.baseBoundary+"-Part_"+this._nodeId}_encodeHeaderValue(e,t){switch(e=this._normalizeHeaderKey(e)){case"From":case"Sender":case"To":case"Cc":case"Bcc":case"Reply-To":return this._convertAddresses(this._parseAddresses(t));case"Message-ID":case"In-Reply-To":case"Content-Id":return"<"!==(t=(t||"").toString().replace(/\r?\n|\r/g," ")).charAt(0)&&(t="<"+t),">"!==t.charAt(t.length-1)&&(t+=">"),t;case"References":return(t=[].concat.apply([],[].concat(t||"").map(e=>(e=(e||"").toString().replace(/\r?\n|\r/g," ").trim()).replace(/<[^>]*>/g,e=>e.replace(/\s/g,"")).split(/\s+/))).map(e=>("<"!==e.charAt(0)&&(e="<"+e),">"!==e.charAt(e.length-1)&&(e+=">"),e))).join(" ").trim();case"Date":if("[object Date]"===Object.prototype.toString.call(t))return t.toUTCString().replace(/GMT/,"+0000");return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t);case"Content-Type":case"Content-Disposition":return(t||"").toString().replace(/\r?\n|\r/g," ");default:return t=(t||"").toString().replace(/\r?\n|\r/g," "),this._encodeWords(t)}}_convertAddresses(e,t){let i=[];return t=t||[],[].concat(e||[]).forEach(e=>{if(e.address)e.address=this._normalizeAddress(e.address),e.name?e.name&&i.push(`${this._encodeAddressName(e.name)} <${e.address}>`):i.push(e.address.indexOf(" ")>=0?`<${e.address}>`:`${e.address}`),e.address&&!t.filter(t=>t.address===e.address).length&&t.push(e);else if(e.group){let r=(e.group.length?this._convertAddresses(e.group,t):"").trim();i.push(`${this._encodeAddressName(e.name)}:${r};`)}}),i.join(", ")}_normalizeAddress(e){let t,i=(e=(e||"").toString().replace(/[\x00-\x1F<>]+/g," ").trim()).lastIndexOf("@");if(i<0)return e;let r=e.substr(0,i),n=e.substr(i+1);try{t=s.toASCII(n.toLowerCase())}catch(e){}return r.indexOf(" ")>=0&&('"'!==r.charAt(0)&&(r='"'+r),'"'!==r.substr(-1)&&(r+='"')),`${r}@${t}`}_encodeAddressName(e){if(!/^[\w ]*$/.test(e))if(/^[\x20-\x7e]*$/.test(e))return'"'+e.replace(/([\\"])/g,"\\$1")+'"';else return l.encodeWord(e,this._getTextEncoding(e),52);return e}_encodeWords(e){return l.encodeWords(e,this._getTextEncoding(e),52,!0)}_getTextEncoding(e){e=(e||"").toString();let t=this.textEncoding;return t||(t=(e.match(/[\x00-\x08\x0B\x0C\x0E-\x1F\u0080-\uFFFF]/g)||[]).length<(e.match(/[a-z]/gi)||[]).length?"Q":"B"),t}_generateMessageId(){return"<"+[2,2,2,6].reduce((e,t)=>e+"-"+r.randomBytes(t).toString("hex"),r.randomBytes(4).toString("hex"))+"@"+(this.getEnvelope().from||this.hostname||"localhost").split("@").pop()+">"}}t.exports=g},369588,(e,t,i)=>{"use strict";let r=e.r(847229),n=e.r(474855),s=e.r(345693).parseDataURI;class a{constructor(e){this.mail=e||{},this.message=!1}compile(){return this._alternatives=this.getAlternatives(),this._htmlNode=this._alternatives.filter(e=>/^text\/html\b/i.test(e.contentType)).pop(),this._attachments=this.getAttachments(!!this._htmlNode),this._useRelated=!!(this._htmlNode&&this._attachments.related.length),this._useAlternative=this._alternatives.length>1,this._useMixed=this._attachments.attached.length>1||this._alternatives.length&&1===this._attachments.attached.length,this.mail.raw?this.message=new r("message/rfc822",{newline:this.mail.newline}).setRaw(this.mail.raw):this._useMixed?this.message=this._createMixed():this._useAlternative?this.message=this._createAlternative():this._useRelated?this.message=this._createRelated():this.message=this._createContentNode(!1,[].concat(this._alternatives||[]).concat(this._attachments.attached||[]).shift()||{contentType:"text/plain",content:""}),this.mail.headers&&this.message.addHeader(this.mail.headers),["from","sender","to","cc","bcc","reply-to","in-reply-to","references","subject","message-id","date"].forEach(e=>{let t=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase());this.mail[t]&&this.message.setHeader(e,this.mail[t])}),this.mail.envelope&&this.message.setEnvelope(this.mail.envelope),this.message.messageId(),this.message}getAttachments(e){let t,i,r=[].concat(this.mail.attachments||[]).map((e,t)=>{let i,r;/^data:/i.test(e.path||e.href)&&(e=this._processDataUrl(e));let s=e.contentType||n.detectMimeType(e.filename||e.path||e.href||"bin"),a=/^image\//i.test(s),o=/^message\//i.test(s);return i={contentType:s,contentDisposition:e.contentDisposition||(o||a&&e.cid?"inline":"attachment"),contentTransferEncoding:r="contentTransferEncoding"in e?e.contentTransferEncoding:o?"8bit":"base64"},e.filename?i.filename=e.filename:!o&&!1!==e.filename&&(i.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(t+1),0>i.filename.indexOf(".")&&(i.filename+="."+n.detectExtension(i.contentType))),/^https?:\/\//i.test(e.path)&&(e.href=e.path,e.path=void 0),e.cid&&(i.cid=e.cid),e.raw?i.raw=e.raw:e.path?i.content={path:e.path}:e.href?i.content={href:e.href,httpHeaders:e.httpHeaders}:i.content=e.content||"",e.encoding&&(i.encoding=e.encoding),e.headers&&(i.headers=e.headers),i});return(this.mail.icalEvent&&(t="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},i={},Object.keys(t).forEach(e=>{i[e]=t[e]}),i.contentType="application/ics",i.headers||(i.headers={}),i.filename=i.filename||"invite.ics",i.headers["Content-Disposition"]="attachment",i.headers["Content-Transfer-Encoding"]="base64"),e)?{attached:r.filter(e=>!e.cid).concat(i||[]),related:r.filter(e=>!!e.cid)}:{attached:r.concat(i||[]),related:[]}}getAlternatives(){let e=[],t,i,r,s,a,o;return this.mail.text&&((t="object"==typeof this.mail.text&&(this.mail.text.content||this.mail.text.path||this.mail.text.href||this.mail.text.raw)?this.mail.text:{content:this.mail.text}).contentType="text/plain; charset=utf-8"),this.mail.watchHtml&&((r="object"==typeof this.mail.watchHtml&&(this.mail.watchHtml.content||this.mail.watchHtml.path||this.mail.watchHtml.href||this.mail.watchHtml.raw)?this.mail.watchHtml:{content:this.mail.watchHtml}).contentType="text/watch-html; charset=utf-8"),this.mail.amp&&((s="object"==typeof this.mail.amp&&(this.mail.amp.content||this.mail.amp.path||this.mail.amp.href||this.mail.amp.raw)?this.mail.amp:{content:this.mail.amp}).contentType="text/x-amp-html; charset=utf-8"),this.mail.icalEvent&&(a="object"==typeof this.mail.icalEvent&&(this.mail.icalEvent.content||this.mail.icalEvent.path||this.mail.icalEvent.href||this.mail.icalEvent.raw)?this.mail.icalEvent:{content:this.mail.icalEvent},o={},Object.keys(a).forEach(e=>{o[e]=a[e]}),o.content&&"object"==typeof o.content&&(o.content._resolve=!0),o.filename=!1,o.contentType="text/calendar; charset=utf-8; method="+(o.method||"PUBLISH").toString().trim().toUpperCase(),o.headers||(o.headers={})),this.mail.html&&((i="object"==typeof this.mail.html&&(this.mail.html.content||this.mail.html.path||this.mail.html.href||this.mail.html.raw)?this.mail.html:{content:this.mail.html}).contentType="text/html; charset=utf-8"),[].concat(t||[]).concat(r||[]).concat(s||[]).concat(i||[]).concat(o||[]).concat(this.mail.alternatives||[]).forEach(t=>{let i;/^data:/i.test(t.path||t.href)&&(t=this._processDataUrl(t)),i={contentType:t.contentType||n.detectMimeType(t.filename||t.path||t.href||"txt"),contentTransferEncoding:t.contentTransferEncoding},t.filename&&(i.filename=t.filename),/^https?:\/\//i.test(t.path)&&(t.href=t.path,t.path=void 0),t.raw?i.raw=t.raw:t.path?i.content={path:t.path}:t.href?i.content={href:t.href}:i.content=t.content||"",t.encoding&&(i.encoding=t.encoding),t.headers&&(i.headers=t.headers),e.push(i)}),e}_createMixed(e){let t;return t=e?e.createChild("multipart/mixed",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r("multipart/mixed",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._useAlternative?this._createAlternative(t):this._useRelated&&this._createRelated(t),[].concat(!this._useAlternative&&this._alternatives||[]).concat(this._attachments.attached||[]).forEach(e=>{this._useRelated&&e===this._htmlNode||this._createContentNode(t,e)}),t}_createAlternative(e){let t;return t=e?e.createChild("multipart/alternative",{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r("multipart/alternative",{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._alternatives.forEach(e=>{this._useRelated&&this._htmlNode===e?this._createRelated(t):this._createContentNode(t,e)}),t}_createRelated(e){let t;return t=e?e.createChild('multipart/related; type="text/html"',{disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r('multipart/related; type="text/html"',{baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),this._createContentNode(t,this._htmlNode),this._attachments.related.forEach(e=>this._createContentNode(t,e)),t}_createContentNode(e,t){let i;(t=t||{}).content=t.content||"";let n=(t.encoding||"utf8").toString().toLowerCase().replace(/[-_\s]/g,"");return i=e?e.createChild(t.contentType,{filename:t.filename,textEncoding:this.mail.textEncoding,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}):new r(t.contentType,{filename:t.filename,baseBoundary:this.mail.baseBoundary,textEncoding:this.mail.textEncoding,boundaryPrefix:this.mail.boundaryPrefix,disableUrlAccess:this.mail.disableUrlAccess,disableFileAccess:this.mail.disableFileAccess,normalizeHeaderKey:this.mail.normalizeHeaderKey,newline:this.mail.newline}),t.headers&&i.addHeader(t.headers),t.cid&&i.setHeader("Content-Id","<"+t.cid.replace(/[<>]/g,"")+">"),t.contentTransferEncoding?i.setHeader("Content-Transfer-Encoding",t.contentTransferEncoding):this.mail.encoding&&/^text\//i.test(t.contentType)&&i.setHeader("Content-Transfer-Encoding",this.mail.encoding),(!/^text\//i.test(t.contentType)||t.contentDisposition)&&i.setHeader("Content-Disposition",t.contentDisposition||(t.cid&&/^image\//i.test(t.contentType)?"inline":"attachment")),"string"!=typeof t.content||["utf8","usascii","ascii"].includes(n)||(t.content=Buffer.from(t.content,n)),t.raw?i.setRaw(t.raw):i.setContent(t.content),i}_processDataUrl(e){let t,i=e.path||e.href;if(!i||"string"!=typeof i||!i.startsWith("data:"))return e;if(i.length>0x3200000){let t="application/octet-stream",r=i.indexOf(",");if(r>0&&r<200){let e=i.substring(5,r).split(";");e[0]&&e[0].includes("/")&&(t=e[0].trim())}return Object.assign({},e,{path:!1,href:!1,content:Buffer.alloc(0),contentType:e.contentType||t})}try{t=s(i)}catch(t){return e}return t&&(e.content=t.data,e.contentType=e.contentType||t.contentType,"path"in e&&(e.path=!1),"href"in e&&(e.href=!1)),e}}t.exports=a},271857,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;class n extends r{constructor(e){super(e),this.lastBytes=Buffer.alloc(4),this.headersParsed=!1,this.headerBytes=0,this.headerChunks=[],this.rawHeaders=!1,this.bodySize=0}updateLastBytes(e){let t=this.lastBytes.length,i=Math.min(e.length,t);for(let e=0,r=t-i;e<r;e++)this.lastBytes[e]=this.lastBytes[e+i];for(let r=1;r<=i;r++)this.lastBytes[t-r]=e[e.length-r]}checkHeaders(e){if(this.headersParsed)return!0;let t=this.lastBytes.length,i=0;this.curLinePos=0;for(let r=0,n=this.lastBytes.length+e.length;r<n;r++){let n;if(10===(n=r<t?this.lastBytes[r]:e[r-t])&&r){let n=r-1<t?this.lastBytes[r-1]:e[r-1-t],s=r>1&&(r-2<t?this.lastBytes[r-2]:e[r-2-t]);if(10===n||13===n&&10===s){this.headersParsed=!0,i=r-t+1,this.headerBytes+=i;break}}}if(this.headersParsed){if(this.headerChunks.push(e.slice(0,i)),this.rawHeaders=Buffer.concat(this.headerChunks,this.headerBytes),this.headerChunks=null,this.emit("headers",this.parseHeaders()),e.length-1>i){let t=e.slice(i);this.bodySize+=t.length,setImmediate(()=>this.push(t))}return!1}return this.headerBytes+=e.length,this.headerChunks.push(e),this.updateLastBytes(e),!1}_transform(e,t,i){let r;if(!e||!e.length)return i();"string"==typeof e&&(e=Buffer.from(e,t));try{r=this.checkHeaders(e)}catch(e){return i(e)}r&&(this.bodySize+=e.length,this.push(e)),setImmediate(i)}_flush(e){if(this.headerChunks){let e=Buffer.concat(this.headerChunks,this.headerBytes);this.bodySize+=e.length,this.push(e),this.headerChunks=null}e()}parseHeaders(){let e=(this.rawHeaders||"").toString().split(/\r?\n/);for(let t=e.length-1;t>0;t--)/^\s/.test(e[t])&&(e[t-1]+="\n"+e[t],e.splice(t,1));return e.filter(e=>e.trim()).map(e=>({key:e.substr(0,e.indexOf(":")).trim().toLowerCase(),line:e}))}}t.exports=n},109473,(e,t,i)=>{"use strict";let r=e.r(688947).Transform,n=e.r(254799);class s extends r{constructor(e){super(),e=e||{},this.chunkBuffer=[],this.chunkBufferLen=0,this.bodyHash=n.createHash(e.hashAlgo||"sha1"),this.remainder="",this.byteLength=0,this.debug=e.debug,this._debugBody=!!e.debug&&[]}updateHash(e){let t,i="",r="file";for(let t=e.length-1;t>=0;t--){let n=e[t];if("file"===r&&(10===n||13===n));else if("file"===r&&(9===n||32===n))r="line";else if("line"===r&&(9===n||32===n));else if(("file"===r||"line"===r)&&(r="body",t===e.length-1))break;if(0===t){if("file"===r&&(!this.remainder||/[\r\n]$/.test(this.remainder))||"line"===r&&(!this.remainder||/[ \t]$/.test(this.remainder))){this.remainder+=e.toString("binary");return}else if("line"===r||"file"===r){i=e.toString("binary"),e=!1;break}}if("body"===r){i=e.slice(t+1).toString("binary"),e=e.slice(0,t+1);break}}let n=!!this.remainder;if(e&&!n){for(let t=0,i=e.length;t<i;t++)if(t&&10===e[t]&&13!==e[t-1]){n=!0;break}else if(t&&13===e[t]&&32===e[t-1]){n=!0;break}else if(t&&32===e[t]&&32===e[t-1]){n=!0;break}else if(9===e[t]){n=!0;break}}n?(t=this.remainder+(e?e.toString("binary"):""),this.remainder=i,t=t.replace(/\r?\n/g,"\n").replace(/[ \t]*$/gm,"").replace(/[ \t]+/gm," ").replace(/\n/g,"\r\n"),e=Buffer.from(t,"binary")):i&&(this.remainder=i),this.debug&&this._debugBody.push(e),this.bodyHash.update(e)}_transform(e,t,i){if(!e||!e.length)return i();"string"==typeof e&&(e=Buffer.from(e,t)),this.updateHash(e),this.byteLength+=e.length,this.push(e),i()}_flush(e){/[\r\n]$/.test(this.remainder)&&this.byteLength>2&&this.bodyHash.update(Buffer.from("\r\n")),this.byteLength||this.push(Buffer.from("\r\n")),this.emit("hash",this.bodyHash.digest("base64"),!!this.debug&&Buffer.concat(this._debugBody)),e()}}t.exports=s},591434,(e,t,i)=>{"use strict";let r=e.r(720854),n=e.r(474855),s=e.r(254799);function a(e,t,i,s,a){let o=["v=1","a=rsa-"+s,"c=relaxed/relaxed","d="+r.toASCII(e),"q=dns/txt","s="+t,"bh="+a,"h="+i].join("; ");return n.foldLines("DKIM-Signature: "+o,76)+";\r\n b="}function o(e,t,i){let r=new Set,n=new Set,s=new Map;(i||"").toLowerCase().split(":").forEach(e=>{n.add(e.trim())}),(t||"").toLowerCase().split(":").filter(e=>!n.has(e.trim())).forEach(e=>{r.add(e.trim())});for(let t=e.length-1;t>=0;t--){let i=e[t];r.has(i.key)&&!s.has(i.key)&&s.set(i.key,l(i.line))}let a=[],o=[];return r.forEach(e=>{s.has(e)&&(o.push(e),a.push(e+":"+s.get(e)))}),{headers:a.join("\r\n")+"\r\n",fieldNames:o.join(":")}}function l(e){return e.substr(e.indexOf(":")+1).replace(/\r?\n/g,"").replace(/\s+/g," ").trim()}t.exports=(e,t,i,r)=>{let n,c,d="From:Sender:Reply-To:Subject:Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive",u=o(e,(r=r||{}).headerFieldNames||d,r.skipFields),h=a(r.domainName,r.keySelector,u.fieldNames,t,i);u.headers+="dkim-signature:"+l(h),(n=s.createSign(("rsa-"+t).toUpperCase())).update(u.headers);try{c=n.sign(r.privateKey,"base64")}catch(e){return!1}return h+c.replace(/(^.{73}|.{75}(?!\r?\n|\r))/g,"$&\r\n ").trim()},t.exports.relaxedHeaders=o},276178,(e,t,i)=>{"use strict";let r=e.r(271857),n=e.r(109473),s=e.r(591434),a=e.r(688947).PassThrough,o=e.r(522734),l=e.r(814747),c=e.r(254799),d="sha256",u=2097152;class h{constructor(e,t,i,r){this.options=e||{},this.keys=t,this.cacheTreshold=Number(this.options.cacheTreshold)||u,this.hashAlgo=this.options.hashAlgo||d,this.cacheDir=this.options.cacheDir||!1,this.chunks=[],this.chunklen=0,this.readPos=0,this.cachePath=!!this.cacheDir&&l.join(this.cacheDir,"message."+Date.now()+"-"+c.randomBytes(14).toString("hex")),this.cache=!1,this.headers=!1,this.bodyHash=!1,this.parser=!1,this.relaxedBody=!1,this.input=i,this.output=r,this.output.usingCache=!1,this.hasErrored=!1,this.input.on("error",e=>{this.hasErrored=!0,this.cleanup(),r.emit("error",e)})}cleanup(){this.cache&&this.cachePath&&o.unlink(this.cachePath,()=>!1)}createReadCache(){this.cache=o.createReadStream(this.cachePath),this.cache.once("error",e=>{this.cleanup(),this.output.emit("error",e)}),this.cache.once("close",()=>{this.cleanup()}),this.cache.pipe(this.output)}sendNextChunk(){if(this.hasErrored)return;if(this.readPos>=this.chunks.length)return this.cache?this.createReadCache():this.output.end();let e=this.chunks[this.readPos++];if(!1===this.output.write(e))return this.output.once("drain",()=>{this.sendNextChunk()});setImmediate(()=>this.sendNextChunk())}sendSignedOutput(){let e=0,t=()=>{if(e>=this.keys.length)return this.output.write(this.parser.rawHeaders),setImmediate(()=>this.sendNextChunk());let i=this.keys[e++],r=s(this.headers,this.hashAlgo,this.bodyHash,{domainName:i.domainName,keySelector:i.keySelector,privateKey:i.privateKey,headerFieldNames:this.options.headerFieldNames,skipFields:this.options.skipFields});return r&&this.output.write(Buffer.from(r+"\r\n")),setImmediate(t)};if(this.bodyHash&&this.headers)return t();this.output.write(this.parser.rawHeaders),this.sendNextChunk()}createWriteCache(){this.output.usingCache=!0,this.cache=o.createWriteStream(this.cachePath),this.cache.once("error",e=>{this.cleanup(),this.relaxedBody.unpipe(this.cache),this.relaxedBody.on("readable",()=>{for(;null!==this.relaxedBody.read(););}),this.hasErrored=!0,this.output.emit("error",e)}),this.cache.once("close",()=>{this.sendSignedOutput()}),this.relaxedBody.removeAllListeners("readable"),this.relaxedBody.pipe(this.cache)}signStream(){this.parser=new r,this.relaxedBody=new n({hashAlgo:this.hashAlgo}),this.parser.on("headers",e=>{this.headers=e}),this.relaxedBody.on("hash",e=>{this.bodyHash=e}),this.relaxedBody.on("readable",()=>{let e;if(!this.cache){for(;null!==(e=this.relaxedBody.read());)if(this.chunks.push(e),this.chunklen+=e.length,this.chunklen>=this.cacheTreshold&&this.cachePath)return this.createWriteCache()}}),this.relaxedBody.on("end",()=>{this.cache||this.sendSignedOutput()}),this.parser.pipe(this.relaxedBody),setImmediate(()=>this.input.pipe(this.parser))}}class A{constructor(e){this.options=e||{},this.keys=[].concat(this.options.keys||{domainName:e.domainName,keySelector:e.keySelector,privateKey:e.privateKey})}sign(e,t){let i=new a,r=e,n=!1;Buffer.isBuffer(e)?(n=e,r=new a):"string"==typeof e&&(n=Buffer.from(e),r=new a);let s=this.options;t&&Object.keys(t).length&&(s={},Object.keys(this.options||{}).forEach(e=>{s[e]=this.options[e]}),Object.keys(t||{}).forEach(e=>{e in s||(s[e]=t[e])}));let o=new h(s,this.keys,r,i);return setImmediate(()=>{o.signStream(),n&&setImmediate(()=>{r.end(n)})}),i}}t.exports=A},996775,(e,t,i)=>{"use strict";let r=e.r(504446),n=e.r(755004),s=e.r(792509);function a(e,t,i,o){let l,c,d,u=s.parse(e);l={host:u.hostname,port:Number(u.port)?Number(u.port):"https:"===u.protocol?443:80},"https:"===u.protocol?(l.rejectUnauthorized=!1,c=n.connect.bind(n)):c=r.connect.bind(r);let h=!1,A=e=>{if(!h){h=!0;try{d.destroy()}catch(e){}o(e)}},p=()=>{let e=Error("Proxy socket timed out");e.code="ETIMEDOUT",A(e)};(d=c(l,()=>{if(h)return;let e={Host:i+":"+t,Connection:"close"};u.auth&&(e["Proxy-Authorization"]="Basic "+Buffer.from(u.auth).toString("base64")),d.write("CONNECT "+i+":"+t+" HTTP/1.1\r\n"+Object.keys(e).map(t=>t+": "+e[t]).join("\r\n")+"\r\n\r\n");let r="",n=e=>{let t,i;if(!h&&(r+=e.toString("binary"),t=r.match(/\r\n\r\n/))){if(d.removeListener("data",n),i=r.substr(t.index+t[0].length),r=r.substr(0,t.index),i&&d.unshift(Buffer.from(i,"binary")),h=!0,!(t=r.match(/^HTTP\/\d+\.\d+ (\d+)/i))||"2"!==(t[1]||"").charAt(0)){try{d.destroy()}catch(e){}return o(Error("Invalid response from proxy"+(t&&": "+t[1]||"")))}return d.removeListener("error",A),d.removeListener("timeout",p),d.setTimeout(0),o(null,d)}};d.on("data",n)})).setTimeout(a.timeout||3e4),d.on("timeout",p),d.once("error",A)}t.exports=a},127158,(e,t,i)=>{"use strict";let r=e.r(345693),n=e.r(847229),s=e.r(474855);class a{constructor(e,t){this.mailer=e,this.data={},this.message=null,t=t||{};let i=e.options||{},r=e._defaults||{};Object.keys(t).forEach(e=>{this.data[e]=t[e]}),this.data.headers=this.data.headers||{},Object.keys(r).forEach(e=>{e in this.data?"headers"===e&&Object.keys(r.headers).forEach(e=>{e in this.data.headers||(this.data.headers[e]=r.headers[e])}):this.data[e]=r[e]}),["disableFileAccess","disableUrlAccess","normalizeHeaderKey"].forEach(e=>{e in i&&(this.data[e]=i[e])})}resolveContent(...e){return r.resolveContent(...e)}resolveAll(e){let t=[[this.data,"html"],[this.data,"text"],[this.data,"watchHtml"],[this.data,"amp"],[this.data,"icalEvent"]];this.data.alternatives&&this.data.alternatives.length&&this.data.alternatives.forEach((e,i)=>{t.push([this.data.alternatives,i])}),this.data.attachments&&this.data.attachments.length&&this.data.attachments.forEach((e,i)=>{!e.filename&&(e.filename=(e.path||e.href||"").split("/").pop().split("?").shift()||"attachment-"+(i+1),0>e.filename.indexOf(".")&&(e.filename+="."+s.detectExtension(e.contentType))),e.contentType||(e.contentType=s.detectMimeType(e.filename||e.path||e.href||"bin")),t.push([this.data.attachments,i])});let i=new n;["from","to","cc","bcc","sender","replyTo"].forEach(e=>{let t;this.message?t=[].concat(i._parseAddresses(this.message.getHeader("replyTo"===e?"reply-to":e))||[]):this.data[e]&&(t=[].concat(i._parseAddresses(this.data[e])||[])),t&&t.length?this.data[e]=t:e in this.data&&(this.data[e]=null)}),["from","sender"].forEach(e=>{this.data[e]&&(this.data[e]=this.data[e].shift())});let a=0,o=()=>{if(a>=t.length)return e(null,this.data);let i=t[a++];if(!i[0]||!i[0][i[1]])return o();r.resolveContent(...i,(t,r)=>{if(t)return e(t);let n={content:r};i[0][i[1]]&&"object"==typeof i[0][i[1]]&&!Buffer.isBuffer(i[0][i[1]])&&Object.keys(i[0][i[1]]).forEach(e=>{e in n||["content","path","href","raw"].includes(e)||(n[e]=i[0][i[1]][e])}),i[0][i[1]]=n,o()})};setImmediate(()=>o())}normalize(e){let t=this.data.envelope||this.message.getEnvelope(),i=this.message.messageId();this.resolveAll((r,n)=>r?e(r):(n.envelope=t,n.messageId=i,["html","text","watchHtml","amp"].forEach(e=>{n[e]&&n[e].content&&("string"==typeof n[e].content?n[e]=n[e].content:Buffer.isBuffer(n[e].content)&&(n[e]=n[e].content.toString()))}),n.icalEvent&&Buffer.isBuffer(n.icalEvent.content)&&(n.icalEvent.content=n.icalEvent.content.toString("base64"),n.icalEvent.encoding="base64"),n.alternatives&&n.alternatives.length&&n.alternatives.forEach(e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")}),n.attachments&&n.attachments.length&&n.attachments.forEach(e=>{e&&e.content&&Buffer.isBuffer(e.content)&&(e.content=e.content.toString("base64"),e.encoding="base64")}),n.normalizedHeaders={},Object.keys(n.headers||{}).forEach(e=>{let t=[].concat(n.headers[e]||[]).shift();(t=t&&t.value||t)&&(["references","in-reply-to","message-id","content-id"].includes(e)&&(t=this.message._encodeHeaderValue(e,t)),n.normalizedHeaders[e]=t)}),n.list&&"object"==typeof n.list&&this._getListHeaders(n.list).forEach(e=>{n.normalizedHeaders[e.key]=e.value.map(e=>e&&e.value||e).join(", ")}),n.references&&(n.normalizedHeaders.references=this.message._encodeHeaderValue("references",n.references)),n.inReplyTo&&(n.normalizedHeaders["in-reply-to"]=this.message._encodeHeaderValue("in-reply-to",n.inReplyTo)),e(null,n)))}setMailerHeader(){this.message&&this.data.xMailer&&this.message.setHeader("X-Mailer",this.data.xMailer)}setPriorityHeaders(){if(this.message&&this.data.priority)switch((this.data.priority||"").toString().toLowerCase()){case"high":this.message.setHeader("X-Priority","1 (Highest)"),this.message.setHeader("X-MSMail-Priority","High"),this.message.setHeader("Importance","High");break;case"low":this.message.setHeader("X-Priority","5 (Lowest)"),this.message.setHeader("X-MSMail-Priority","Low"),this.message.setHeader("Importance","Low")}}setListHeaders(){this.message&&this.data.list&&"object"==typeof this.data.list&&this.data.list&&"object"==typeof this.data.list&&this._getListHeaders(this.data.list).forEach(e=>{e.value.forEach(t=>{this.message.addHeader(e.key,t)})})}_getListHeaders(e){return Object.keys(e).map(t=>({key:"list-"+t.toLowerCase().trim(),value:[].concat(e[t]||[]).map(e=>({prepared:!0,foldLines:!0,value:[].concat(e||[]).map(e=>{if("string"==typeof e&&(e={url:e}),e&&e.url){if("id"===t.toLowerCase().trim()){let t=e.comment||"";return t=s.isPlainText(t)?'"'+t+'"':s.encodeWord(t),(e.comment?t+" ":"")+this._formatListUrl(e.url).replace(/^<[^:]+\/{,2}/,"")}let i=e.comment||"";return s.isPlainText(i)||(i=s.encodeWord(i)),this._formatListUrl(e.url)+(e.comment?" ("+i+")":"")}return""}).filter(e=>e).join(", ")}))}))}_formatListUrl(e){return(e=e.replace(/[\s<]+|[\s>]+/g,""),/^(https?|mailto|ftp):/.test(e))?"<"+e+">":/^[^@]+@[^@]+$/.test(e)?"<mailto:"+e+">":"<http://"+e+">"}}t.exports=a},135821,(e,t,i)=>{"use strict";let r=e.r(427699),n=e.r(345693),s=e.r(574898),a=e.r(369588),o=e.r(276178),l=e.r(996775),c=e.r(224361),d=e.r(792509),u=e.r(282799),h=e.r(127158),A=e.r(504446),p=e.r(679594),f=e.r(254799);class g extends r{constructor(e,t,i){super(),this.options=t||{},this._defaults=i||{},this._defaultPlugins={compile:[(...e)=>this._convertDataImages(...e)],stream:[]},this._userPlugins={compile:[],stream:[]},this.meta=new Map,this.dkim=!!this.options.dkim&&new o(this.options.dkim),this.transporter=e,this.transporter.mailer=this,this.logger=n.getLogger(this.options,{component:this.options.component||"mail"}),this.logger.debug({tnx:"create"},"Creating transport: %s",this.getVersionString()),"function"==typeof this.transporter.on&&(this.transporter.on("log",e=>{this.logger.debug({tnx:"transport"},"%s: %s",e.type,e.message)}),this.transporter.on("error",e=>{this.logger.error({err:e,tnx:"transport"},"Transport Error: %s",e.message),this.emit("error",e)}),this.transporter.on("idle",(...e)=>{this.emit("idle",...e)}),this.transporter.on("clear",(...e)=>{this.emit("clear",...e)})),["close","isIdle","verify"].forEach(e=>{this[e]=(...t)=>"function"==typeof this.transporter[e]?("verify"===e&&"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1),this.transporter[e](...t)):(this.logger.warn({tnx:"transport",methodName:e},"Non existing method %s called for transport",e),!1)}),this.options.proxy&&"string"==typeof this.options.proxy&&this.setupProxy(this.options.proxy)}use(e,t){return e=(e||"").toString(),this._userPlugins.hasOwnProperty(e)?this._userPlugins[e].push(t):this._userPlugins[e]=[t],this}sendMail(e,t=null){let i;t||(i=new Promise((e,i)=>{t=n.callbackPromise(e,i)})),"function"==typeof this.getSocket&&(this.transporter.getSocket=this.getSocket,this.getSocket=!1);let r=new h(this,e);return this.logger.debug({tnx:"transport",name:this.transporter.name,version:this.transporter.version,action:"send"},"Sending mail using %s/%s",this.transporter.name,this.transporter.version),this._processPlugins("compile",r,e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"compile"},"PluginCompile Error: %s",e.message),t(e);r.message=new a(r.data).compile(),r.setMailerHeader(),r.setPriorityHeaders(),r.setListHeaders(),this._processPlugins("stream",r,e=>{if(e)return this.logger.error({err:e,tnx:"plugin",action:"stream"},"PluginStream Error: %s",e.message),t(e);(r.data.dkim||this.dkim)&&r.message.processFunc(e=>{let t=r.data.dkim?new o(r.data.dkim):this.dkim;return this.logger.debug({tnx:"DKIM",messageId:r.message.messageId(),dkimDomains:t.keys.map(e=>e.keySelector+"."+e.domainName).join(", ")},"Signing outgoing message with %s keys",t.keys.length),t.sign(e,r.data._dkim)}),this.transporter.send(r,(...e)=>{e[0]&&this.logger.error({err:e[0],tnx:"transport",action:"send"},"Send Error: %s",e[0].message),t(...e)})})}),i}getVersionString(){return c.format("%s (%s; +%s; %s/%s)",u.name,u.version,u.homepage,this.transporter.name,this.transporter.version)}_processPlugins(e,t,i){if(e=(e||"").toString(),!this._userPlugins.hasOwnProperty(e))return i();let r=this._userPlugins[e]||[],n=this._defaultPlugins[e]||[];if(r.length&&this.logger.debug({tnx:"transaction",pluginCount:r.length,step:e},"Using %s plugins for %s",r.length,e),r.length+n.length===0)return i();let s=0,a="default",o=()=>{let e="default"===a?n:r;if(s>=e.length)if("default"!==a||!r.length)return i();else a="user",s=0,e=r;(0,e[s++])(t,e=>{if(e)return i(e);o()})};o()}setupProxy(e){let t=d.parse(e);this.getSocket=(e,i)=>{let r=t.protocol.replace(/:$/,"").toLowerCase();if(this.meta.has("proxy_handler_"+r))return this.meta.get("proxy_handler_"+r)(t,e,i);switch(r){case"http":case"https":l(t.href,e.port,e.host,(e,t)=>e?i(e):i(null,{connection:t}));return;case"socks":case"socks5":case"socks4":case"socks4a":{if(!this.meta.has("proxy_socks_module"))return i(Error("Socks module not loaded"));let r=r=>{let n=!!this.meta.get("proxy_socks_module").SocksClient,s=n?this.meta.get("proxy_socks_module").SocksClient:this.meta.get("proxy_socks_module"),a=Number(t.protocol.replace(/\D/g,""))||5,o={proxy:{ipaddress:r,port:Number(t.port),type:a},[n?"destination":"target"]:{host:e.host,port:e.port},command:"connect"};if(t.auth){let e=decodeURIComponent(t.auth.split(":").shift()),i=decodeURIComponent(t.auth.split(":").pop());n?(o.proxy.userId=e,o.proxy.password=i):4===a?o.userid=e:o.authentication={username:e,password:i}}s.createConnection(o,(e,t)=>e?i(e):i(null,{connection:t.socket||t}))};if(A.isIP(t.hostname))return r(t.hostname);return p.resolve(t.hostname,(e,t)=>{if(e)return i(e);r(Array.isArray(t)?t[0]:t)})}}i(Error("Unknown proxy configuration"))}}_convertDataImages(e,t){if(!this.options.attachDataUrls&&!e.data.attachDataUrls||!e.data.html)return t();e.resolveContent(e.data,"html",(i,r)=>{if(i)return t(i);let n=0;r=(r||"").toString().replace(/(<img\b[^<>]{0,1024} src\s{0,20}=[\s"']{0,20})(data:([^;]+);[^"'>\s]+)/gi,(t,i,r,a)=>{let o=f.randomBytes(10).toString("hex")+"@localhost";return e.data.attachments||(e.data.attachments=[]),Array.isArray(e.data.attachments)||(e.data.attachments=[].concat(e.data.attachments||[])),e.data.attachments.push({path:r,cid:o,filename:"image-"+ ++n+"."+s.detectExtension(a)}),i+"cid:"+o}),e.data.html=r,t()})}set(e,t){return this.meta.set(e,t)}get(e){return this.meta.get(e)}}t.exports=g},181980,(e,t,i)=>{"use strict";let r=e.r(688947).Transform;class n extends r{constructor(e){super(e),this.options=e||{},this._curLine="",this.inByteCount=0,this.outByteCount=0,this.lastByte=!1}_transform(e,t,i){let r,n=[],s=0,a,o,l=0;if(!e||!e.length)return i();for("string"==typeof e&&(e=Buffer.from(e)),this.inByteCount+=e.length,a=0,o=e.length;a<o;a++)46===e[a]?(!a||10!==e[a-1])&&(a||this.lastByte&&10!==this.lastByte)||(r=e.slice(l,a+1),n.push(r),n.push(Buffer.from(".")),s+=r.length+1,l=a+1):10===e[a]&&(a&&13!==e[a-1]||!a&&13!==this.lastByte)&&(a>l?(r=e.slice(l,a),n.push(r),s+=r.length+2):s+=2,n.push(Buffer.from("\r\n")),l=a+1);s?(l<e.length&&(r=e.slice(l),n.push(r),s+=r.length),this.outByteCount+=s,this.push(Buffer.concat(n,s))):(this.outByteCount+=e.length,this.push(e)),this.lastByte=e[e.length-1],i()}_flush(e){let t;t=10===this.lastByte?Buffer.from(".\r\n"):13===this.lastByte?Buffer.from("\n.\r\n"):Buffer.from("\r\n.\r\n"),this.outByteCount+=t.length,this.push(t),e()}}t.exports=n},210364,(e,t,i)=>{"use strict";let r=e.r(282799),n=e.r(427699).EventEmitter,s=e.r(504446),a=e.r(755004),o=e.r(446786),l=e.r(254799),c=e.r(181980),d=e.r(688947).PassThrough,u=e.r(345693),h=12e4,A=6e5,p=3e4,f=3e4;class g extends n{constructor(e){super(e),this.id=l.randomBytes(8).toString("base64").replace(/\W/g,""),this.stage="init",this.options=e||{},this.secureConnection=!!this.options.secure,this.alreadySecured=!!this.options.secured,this.port=Number(this.options.port)||(this.secureConnection?465:587),this.host=this.options.host||"localhost",this.servername=this.options.servername?this.options.servername:!s.isIP(this.host)&&this.host,this.allowInternalNetworkInterfaces=this.options.allowInternalNetworkInterfaces||!1,void 0===this.options.secure&&465===this.port&&(this.secureConnection=!0),this.name=this.options.name||this._getHostname(),this.logger=u.getLogger(this.options,{component:this.options.component||"smtp-connection",sid:this.id}),this.customAuth=new Map,Object.keys(this.options.customAuth||{}).forEach(e=>{let t=(e||"").toString().trim().toUpperCase();t&&this.customAuth.set(t,this.options.customAuth[e])}),this.version=r.version,this.authenticated=!1,this.destroyed=!1,this.secure=!!this.secureConnection,this._remainder="",this._responseQueue=[],this.lastServerResponse=!1,this._socket=!1,this._supportedAuth=[],this.allowsAuth=!1,this._envelope=!1,this._supportedExtensions=[],this._maxAllowedSize=0,this._responseActions=[],this._recipientQueue=[],this._greetingTimeout=!1,this._connectionTimeout=!1,this._destroyed=!1,this._closing=!1,this._onSocketData=e=>this._onData(e),this._onSocketError=e=>this._onError(e,"ESOCKET",!1,"CONN"),this._onSocketClose=()=>this._onClose(),this._onSocketEnd=()=>this._onEnd(),this._onSocketTimeout=()=>this._onTimeout()}connect(e){if("function"==typeof e){this.once("connect",()=>{this.logger.debug({tnx:"smtp"},"SMTP handshake finished"),e()});let t=this._isDestroyedMessage("connect");if(t)return e(this._formatError(t,"ECONNECTION",!1,"CONN"))}let t={port:this.port,host:this.host,allowInternalNetworkInterfaces:this.allowInternalNetworkInterfaces,timeout:this.options.dnsTimeout||f};this.options.localAddress&&(t.localAddress=this.options.localAddress);let i=()=>{this._connectionTimeout=setTimeout(()=>{this._onError("Connection timeout","ETIMEDOUT",!1,"CONN")},this.options.connectionTimeout||h),this._socket.on("error",this._onSocketError)};if(this.options.connection){this._socket=this.options.connection,i(),this.secureConnection&&!this.alreadySecured?setImmediate(()=>this._upgradeConnection(e=>{e?this._onError(Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"CONN"):this._onConnect()})):setImmediate(()=>this._onConnect());return}return this.options.socket?(this._socket=this.options.socket,u.resolveHostname(t,(e,r)=>{if(e)return setImmediate(()=>this._onError(e,"EDNS",!1,"CONN"));this.logger.debug({tnx:"dns",source:t.host,resolved:r.host,cached:!!r.cached},"Resolved %s as %s [cache %s]",t.host,r.host,r.cached?"hit":"miss"),Object.keys(r).forEach(e=>{"_"!==e.charAt(0)&&r[e]&&(t[e]=r[e])});try{this._socket.connect(this.port,this.host,()=>{this._socket.setKeepAlive(!0),this._onConnect()}),i()}catch(e){return setImmediate(()=>this._onError(e,"ECONNECTION",!1,"CONN"))}})):this.secureConnection?(this.options.tls&&Object.keys(this.options.tls).forEach(e=>{t[e]=this.options.tls[e]}),this.servername&&!t.servername&&(t.servername=this.servername),u.resolveHostname(t,(e,r)=>{if(e)return setImmediate(()=>this._onError(e,"EDNS",!1,"CONN"));this.logger.debug({tnx:"dns",source:t.host,resolved:r.host,cached:!!r.cached},"Resolved %s as %s [cache %s]",t.host,r.host,r.cached?"hit":"miss"),Object.keys(r).forEach(e=>{"_"!==e.charAt(0)&&r[e]&&(t[e]=r[e])});try{this._socket=a.connect(t,()=>{this._socket.setKeepAlive(!0),this._onConnect()}),i()}catch(e){return setImmediate(()=>this._onError(e,"ECONNECTION",!1,"CONN"))}})):u.resolveHostname(t,(e,r)=>{if(e)return setImmediate(()=>this._onError(e,"EDNS",!1,"CONN"));this.logger.debug({tnx:"dns",source:t.host,resolved:r.host,cached:!!r.cached},"Resolved %s as %s [cache %s]",t.host,r.host,r.cached?"hit":"miss"),Object.keys(r).forEach(e=>{"_"!==e.charAt(0)&&r[e]&&(t[e]=r[e])});try{this._socket=s.connect(t,()=>{this._socket.setKeepAlive(!0),this._onConnect()}),i()}catch(e){return setImmediate(()=>this._onError(e,"ECONNECTION",!1,"CONN"))}})}quit(){this._sendCommand("QUIT"),this._responseActions.push(this.close)}close(){if(clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._responseActions=[],this._closing)return;this._closing=!0;let e="end";"init"===this.stage&&(e="destroy"),this.logger.debug({tnx:"smtp"},'Closing connection to the server using "%s"',e);let t=this._socket&&this._socket.socket||this._socket;if(t&&!t.destroyed)try{t[e]()}catch(e){}this._destroy()}login(e,t){let i=this._isDestroyedMessage("login");if(i)return t(this._formatError(i,"ECONNECTION",!1,"API"));if(this._auth=e||{},this._authMethod=(this._auth.method||"").toString().trim().toUpperCase()||!1,this._authMethod||!this._auth.oauth2||this._auth.credentials?this._authMethod&&("XOAUTH2"!==this._authMethod||this._auth.oauth2)||(this._authMethod=(this._supportedAuth[0]||"PLAIN").toUpperCase().trim()):this._authMethod="XOAUTH2","XOAUTH2"!==this._authMethod&&(!this._auth.credentials||!this._auth.credentials.user||!this._auth.credentials.pass))if(!(this._auth.user&&this._auth.pass||this.customAuth.has(this._authMethod)))return t(this._formatError('Missing credentials for "'+this._authMethod+'"',"EAUTH",!1,"API"));else this._auth.credentials={user:this._auth.user,pass:this._auth.pass,options:this._auth.options};if(this.customAuth.has(this._authMethod)){let e,i=this.customAuth.get(this._authMethod),r=!1,n=()=>{r||(r=!0,this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0))},s=i=>{r||(r=!0,t(this._formatError(i,"EAUTH",e,"AUTH "+this._authMethod)))},a=i({auth:this._auth,method:this._authMethod,extensions:[].concat(this._supportedExtensions),authMethods:[].concat(this._supportedAuth),maxAllowedSize:this._maxAllowedSize||!1,sendCommand:(t,i)=>{let r;return i||(r=new Promise((e,t)=>{i=u.callbackPromise(e,t)})),this._responseActions.push(r=>{e=r;let n=r.match(/^(\d+)(?:\s(\d+\.\d+\.\d+))?\s/),s={command:t,response:r};n?(s.status=Number(n[1])||0,n[2]&&(s.code=n[2]),s.text=r.substr(n[0].length)):(s.text=r,s.status=0),i(null,s)}),setImmediate(()=>this._sendCommand(t)),r},resolve:n,reject:s});a&&"function"==typeof a.catch&&a.then(n).catch(s);return}switch(this._authMethod){case"XOAUTH2":this._handleXOauth2Token(!1,t);return;case"LOGIN":this._responseActions.push(e=>{this._actionAUTH_LOGIN_USER(e,t)}),this._sendCommand("AUTH LOGIN");return;case"PLAIN":this._responseActions.push(e=>{this._actionAUTHComplete(e,t)}),this._sendCommand("AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0"+this._auth.credentials.pass,"utf-8").toString("base64"),"AUTH PLAIN "+Buffer.from("\0"+this._auth.credentials.user+"\0/* secret */","utf-8").toString("base64"));return;case"CRAM-MD5":this._responseActions.push(e=>{this._actionAUTH_CRAM_MD5(e,t)}),this._sendCommand("AUTH CRAM-MD5");return}return t(this._formatError('Unknown authentication method "'+this._authMethod+'"',"EAUTH",!1,"API"))}send(e,t,i){if(!t)return i(this._formatError("Empty message","EMESSAGE",!1,"API"));let r=this._isDestroyedMessage("send message");if(r)return i(this._formatError(r,"ECONNECTION",!1,"API"));if(this._maxAllowedSize&&e.size>this._maxAllowedSize)return setImmediate(()=>{i(this._formatError("Message size larger than allowed "+this._maxAllowedSize,"EMESSAGE",!1,"MAIL FROM"))});let n=!1,s=function(){n||(n=!0,i(...arguments))};"function"==typeof t.on&&t.on("error",e=>s(this._formatError(e,"ESTREAM",!1,"API")));let a=Date.now();this._setEnvelope(e,(e,i)=>{if(e){let i=new d;return"function"==typeof t.pipe?t.pipe(i):(i.write(t),i.end()),s(e)}let r=Date.now(),n=this._createSendStream((e,t)=>e?s(e):(i.envelopeTime=r-a,i.messageTime=Date.now()-r,i.messageSize=n.outByteCount,i.response=t,s(null,i)));"function"==typeof t.pipe?t.pipe(n):(n.write(t),n.end())})}reset(e){this._sendCommand("RSET"),this._responseActions.push(t=>"2"!==t.charAt(0)?e(this._formatError("Could not reset session state. response="+t,"EPROTOCOL",t,"RSET")):(this._envelope=!1,e(null,!0)))}_onConnect(){(clearTimeout(this._connectionTimeout),this.logger.info({tnx:"network",localAddress:this._socket.localAddress,localPort:this._socket.localPort,remoteAddress:this._socket.remoteAddress,remotePort:this._socket.remotePort},"%s established to %s:%s",this.secure?"Secure connection":"Connection",this._socket.remoteAddress,this._socket.remotePort),this._destroyed)?this.close():(this.stage="connected",this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout),this._socket.removeListener("close",this._onSocketClose),this._socket.removeListener("end",this._onSocketEnd),this._socket.on("data",this._onSocketData),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||A),this._socket.on("timeout",this._onSocketTimeout),this._greetingTimeout=setTimeout(()=>{this._socket&&!this._destroyed&&this._responseActions[0]===this._actionGreeting&&this._onError("Greeting never received","ETIMEDOUT",!1,"CONN")},this.options.greetingTimeout||p),this._responseActions.push(this._actionGreeting),this._socket.resume())}_onData(e){let t;if(this._destroyed||!e||!e.length)return;let i=(e||"").toString("binary"),r=(this._remainder+i).split(/\r?\n/);this._remainder=r.pop();for(let e=0,i=r.length;e<i;e++){if(this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))){this._responseQueue[this._responseQueue.length-1]+="\n"+r[e];continue}this._responseQueue.push(r[e])}this._responseQueue.length&&(t=this._responseQueue[this._responseQueue.length-1],/^\d+-/.test(t.split("\n").pop()))||this._processResponse()}_onError(e,t,i,r){clearTimeout(this._connectionTimeout),clearTimeout(this._greetingTimeout),this._destroyed||(e=this._formatError(e,t,i,r),this.logger.error(i,e.message),this.emit("error",e),this.close())}_formatError(e,t,i,r){let n;n=/Error\]$/i.test(Object.prototype.toString.call(e))?e:Error(e),t&&"Error"!==t&&(n.code=t),i&&(n.response=i,n.message+=": "+i);let s="string"==typeof i&&Number((i.match(/^\d+/)||[])[0])||!1;return s&&(n.responseCode=s),r&&(n.command=r),n}_onClose(){let e=!1;return(this._remainder&&this._remainder.trim()&&((this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},this._remainder.replace(/\r?\n$/,"")),this.lastServerResponse=e=this._remainder.trim()),this.logger.info({tnx:"network"},"Connection closed"),this.upgrading&&!this._destroyed)?this._onError(Error("Connection closed unexpectedly"),"ETLS",e,"CONN"):![this._actionGreeting,this.close].includes(this._responseActions[0])&&!this._destroyed||/^[45]\d{2}\b/.test(e)?this._onError(Error("Connection closed unexpectedly"),"ECONNECTION",e,"CONN"):void this._destroy()}_onEnd(){this._socket&&!this._socket.destroyed&&this._socket.destroy()}_onTimeout(){return this._onError(Error("Timeout"),"ETIMEDOUT",!1,"CONN")}_destroy(){this._destroyed||(this._destroyed=!0,this.emit("end"))}_upgradeConnection(e){this._socket.removeListener("data",this._onSocketData),this._socket.removeListener("timeout",this._onSocketTimeout);let t=this._socket,i={socket:this._socket,host:this.host};Object.keys(this.options.tls||{}).forEach(e=>{i[e]=this.options.tls[e]}),this.servername&&!i.servername&&(i.servername=this.servername),this.upgrading=!0;try{this._socket=a.connect(i,()=>(this.secure=!0,this.upgrading=!1,this._socket.on("data",this._onSocketData),t.removeListener("close",this._onSocketClose),t.removeListener("end",this._onSocketEnd),e(null,!0)))}catch(t){return e(t)}this._socket.on("error",this._onSocketError),this._socket.once("close",this._onSocketClose),this._socket.once("end",this._onSocketEnd),this._socket.setTimeout(this.options.socketTimeout||A),this._socket.on("timeout",this._onSocketTimeout),t.resume()}_processResponse(){if(!this._responseQueue.length)return!1;let e=this.lastServerResponse=(this._responseQueue.shift()||"").toString();if(/^\d+-/.test(e.split("\n").pop()))return;(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"server"},e.replace(/\r?\n$/,"")),e.trim()||setImmediate(()=>this._processResponse());let t=this._responseActions.shift();if("function"!=typeof t)return this._onError(Error("Unexpected Response"),"EPROTOCOL",e,"CONN");t.call(this,e),setImmediate(()=>this._processResponse())}_sendCommand(e,t){if(!this._destroyed){if(this._socket.destroyed)return this.close();(this.options.debug||this.options.transactionLog)&&this.logger.debug({tnx:"client"},(t||e||"").toString().replace(/\r?\n$/,"")),this._socket.write(Buffer.from(e+"\r\n","utf-8"))}}_setEnvelope(e,t){let i=[],r=!1;if(this._envelope=e||{},this._envelope.from=(this._envelope.from&&this._envelope.from.address||this._envelope.from||"").toString().trim(),this._envelope.to=[].concat(this._envelope.to||[]).map(e=>(e&&e.address||e||"").toString().trim()),!this._envelope.to.length)return t(this._formatError("No recipients defined","EENVELOPE",!1,"API"));if(this._envelope.from&&/[\r\n<>]/.test(this._envelope.from))return t(this._formatError("Invalid sender "+JSON.stringify(this._envelope.from),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.from)&&(r=!0);for(let e=0,i=this._envelope.to.length;e<i;e++){if(!this._envelope.to[e]||/[\r\n<>]/.test(this._envelope.to[e]))return t(this._formatError("Invalid recipient "+JSON.stringify(this._envelope.to[e]),"EENVELOPE",!1,"API"));/[\x80-\uFFFF]/.test(this._envelope.to[e])&&(r=!0)}if(this._envelope.rcptQueue=JSON.parse(JSON.stringify(this._envelope.to||[])),this._envelope.rejected=[],this._envelope.rejectedErrors=[],this._envelope.accepted=[],this._envelope.dsn)try{this._envelope.dsn=this._setDsnEnvelope(this._envelope.dsn)}catch(e){return t(this._formatError("Invalid DSN "+e.message,"EENVELOPE",!1,"API"))}if(this._responseActions.push(e=>{this._actionMAIL(e,t)}),r&&this._supportedExtensions.includes("SMTPUTF8")&&(i.push("SMTPUTF8"),this._usingSmtpUtf8=!0),this._envelope.use8BitMime&&this._supportedExtensions.includes("8BITMIME")&&(i.push("BODY=8BITMIME"),this._using8BitMime=!0),this._envelope.size&&this._supportedExtensions.includes("SIZE")&&i.push("SIZE="+this._envelope.size),this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.ret&&i.push("RET="+u.encodeXText(this._envelope.dsn.ret)),this._envelope.dsn.envid&&i.push("ENVID="+u.encodeXText(this._envelope.dsn.envid))),this._envelope.requireTLSExtensionEnabled){if(!this.secure)return t(this._formatError("REQUIRETLS can only be used over TLS connections (RFC 8689)","EREQUIRETLS",!1,"MAIL FROM"));if(!this._supportedExtensions.includes("REQUIRETLS"))return t(this._formatError("Server does not support REQUIRETLS extension (RFC 8689)","EREQUIRETLS",!1,"MAIL FROM"));i.push("REQUIRETLS")}this._sendCommand("MAIL FROM:<"+this._envelope.from+">"+(i.length?" "+i.join(" "):""))}_setDsnEnvelope(e){let t=(e.ret||e.return||"").toString().toUpperCase()||null;if(t)switch(t){case"HDRS":case"HEADERS":t="HDRS";break;case"FULL":case"BODY":t="FULL"}if(t&&!["FULL","HDRS"].includes(t))throw Error("ret: "+JSON.stringify(t));let i=(e.envid||e.id||"").toString()||null,r=e.notify||null;if(r){"string"==typeof r&&(r=r.split(","));let e=["NEVER","SUCCESS","FAILURE","DELAY"];if((r=r.map(e=>e.trim().toUpperCase())).filter(t=>!e.includes(t)).length||r.length>1&&r.includes("NEVER"))throw Error("notify: "+JSON.stringify(r.join(",")));r=r.join(",")}let n=(e.recipient||e.orcpt||"").toString()||null;return n&&0>n.indexOf(";")&&(n="rfc822;"+n),{ret:t,envid:i,notify:r,orcpt:n}}_getDsnRcptToArgs(){let e=[];return this._envelope.dsn&&this._supportedExtensions.includes("DSN")&&(this._envelope.dsn.notify&&e.push("NOTIFY="+u.encodeXText(this._envelope.dsn.notify)),this._envelope.dsn.orcpt&&e.push("ORCPT="+u.encodeXText(this._envelope.dsn.orcpt))),e.length?" "+e.join(" "):""}_createSendStream(e){let t,i=new c;return this.options.lmtp?this._envelope.accepted.forEach((t,i)=>{let r=i===this._envelope.accepted.length-1;this._responseActions.push(i=>{this._actionLMTPStream(t,r,i,e)})}):this._responseActions.push(t=>{this._actionSMTPStream(t,e)}),i.pipe(this._socket,{end:!1}),this.options.debug&&((t=new d).on("readable",()=>{let e;for(;e=t.read();)this.logger.debug({tnx:"message"},e.toString("binary").replace(/\r?\n$/,""))}),i.pipe(t)),i.once("end",()=>{this.logger.info({tnx:"message",inByteCount:i.inByteCount,outByteCount:i.outByteCount},"<%s bytes encoded mime message (source size %s bytes)>",i.outByteCount,i.inByteCount)}),i}_actionGreeting(e){(clearTimeout(this._greetingTimeout),"220"!==e.substr(0,3))?this._onError(Error("Invalid greeting. response="+e),"EPROTOCOL",e,"CONN"):this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name))}_actionLHLO(e){"2"!==e.charAt(0)?this._onError(Error("Invalid LHLO. response="+e),"EPROTOCOL",e,"LHLO"):this._actionEHLO(e)}_actionEHLO(e){let t;if("421"===e.substr(0,3))return void this._onError(Error("Server terminates connection. response="+e),"ECONNECTION",e,"EHLO");if("2"!==e.charAt(0))return this.options.requireTLS?void this._onError(Error("EHLO failed but HELO does not support required STARTTLS. response="+e),"ECONNECTION",e,"EHLO"):(this._responseActions.push(this._actionHELO),void this._sendCommand("HELO "+this.name));if(this._ehloLines=e.split(/\r?\n/).map(e=>e.replace(/^\d+[ -]/,"").trim()).filter(e=>e).slice(1),!this.secure&&!this.options.ignoreTLS&&(/[ -]STARTTLS\b/im.test(e)||this.options.requireTLS)){this._sendCommand("STARTTLS"),this._responseActions.push(this._actionSTARTTLS);return}/[ -]SMTPUTF8\b/im.test(e)&&this._supportedExtensions.push("SMTPUTF8"),/[ -]DSN\b/im.test(e)&&this._supportedExtensions.push("DSN"),/[ -]8BITMIME\b/im.test(e)&&this._supportedExtensions.push("8BITMIME"),/[ -]REQUIRETLS\b/im.test(e)&&this._supportedExtensions.push("REQUIRETLS"),/[ -]PIPELINING\b/im.test(e)&&this._supportedExtensions.push("PIPELINING"),/[ -]AUTH\b/i.test(e)&&(this.allowsAuth=!0),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)PLAIN/i.test(e)&&this._supportedAuth.push("PLAIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)LOGIN/i.test(e)&&this._supportedAuth.push("LOGIN"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)CRAM-MD5/i.test(e)&&this._supportedAuth.push("CRAM-MD5"),/[ -]AUTH(?:(\s+|=)[^\n]*\s+|\s+|=)XOAUTH2/i.test(e)&&this._supportedAuth.push("XOAUTH2"),(t=e.match(/[ -]SIZE(?:[ \t]+(\d+))?/im))&&(this._supportedExtensions.push("SIZE"),this._maxAllowedSize=Number(t[1])||0),this.emit("connect")}_actionHELO(e){"2"!==e.charAt(0)?this._onError(Error("Invalid HELO. response="+e),"EPROTOCOL",e,"HELO"):(this.allowsAuth=!0,this.emit("connect"))}_actionSTARTTLS(e){if("2"!==e.charAt(0))return this.options.opportunisticTLS?(this.logger.info({tnx:"smtp"},"Failed STARTTLS upgrade, continuing unencrypted"),this.emit("connect")):void this._onError(Error("Error upgrading connection with STARTTLS"),"ETLS",e,"STARTTLS");this._upgradeConnection((e,t)=>{e?this._onError(Error("Error initiating TLS - "+(e.message||e)),"ETLS",!1,"STARTTLS"):(this.logger.info({tnx:"smtp"},"Connection upgraded with STARTTLS"),t?this.options.lmtp?(this._responseActions.push(this._actionLHLO),this._sendCommand("LHLO "+this.name)):(this._responseActions.push(this._actionEHLO),this._sendCommand("EHLO "+this.name)):this.emit("connect"))})}_actionAUTH_LOGIN_USER(e,t){/^334[ -]/.test(e)?(this._responseActions.push(e=>{this._actionAUTH_LOGIN_PASS(e,t)}),this._sendCommand(Buffer.from(this._auth.credentials.user+"","utf-8").toString("base64"))):t(this._formatError('Invalid login sequence while waiting for "334 VXNlcm5hbWU6"',"EAUTH",e,"AUTH LOGIN"))}_actionAUTH_CRAM_MD5(e,t){let i=e.match(/^334\s+(.+)$/),r="";if(!i)return t(this._formatError("Invalid login sequence while waiting for server challenge string","EAUTH",e,"AUTH CRAM-MD5"));r=i[1];let n=Buffer.from(r,"base64").toString("ascii"),s=l.createHmac("md5",this._auth.credentials.pass);s.update(n);let a=this._auth.credentials.user+" "+s.digest("hex");this._responseActions.push(e=>{this._actionAUTH_CRAM_MD5_PASS(e,t)}),this._sendCommand(Buffer.from(a).toString("base64"),Buffer.from(this._auth.credentials.user+" /* secret */").toString("base64"))}_actionAUTH_CRAM_MD5_PASS(e,t){if(!e.match(/^235\s+/))return t(this._formatError('Invalid login sequence while waiting for "235"',"EAUTH",e,"AUTH CRAM-MD5"));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,t(null,!0)}_actionAUTH_LOGIN_PASS(e,t){if(!/^334[ -]/.test(e))return t(this._formatError('Invalid login sequence while waiting for "334 UGFzc3dvcmQ6"',"EAUTH",e,"AUTH LOGIN"));this._responseActions.push(e=>{this._actionAUTHComplete(e,t)}),this._sendCommand(Buffer.from((this._auth.credentials.pass||"").toString(),"utf-8").toString("base64"),Buffer.from("/* secret */","utf-8").toString("base64"))}_actionAUTHComplete(e,t,i){if(i||"function"!=typeof t||(i=t,t=!1),"334"===e.substr(0,3)){this._responseActions.push(e=>{t||"XOAUTH2"!==this._authMethod?this._actionAUTHComplete(e,!0,i):setImmediate(()=>this._handleXOauth2Token(!0,i))}),this._sendCommand("");return}if("2"!==e.charAt(0))return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),i(this._formatError("Invalid login","EAUTH",e,"AUTH "+this._authMethod));this.logger.info({tnx:"smtp",username:this._auth.user,action:"authenticated",method:this._authMethod},"User %s authenticated",JSON.stringify(this._auth.user)),this.authenticated=!0,i(null,!0)}_actionMAIL(e,t){let i,r;if(2!==Number(e.charAt(0)))return i=this._usingSmtpUtf8&&/^550 /.test(e)&&/[\x80-\uFFFF]/.test(this._envelope.from)?"Internationalized mailbox name not allowed":"Mail command failed",t(this._formatError(i,"EENVELOPE",e,"MAIL FROM"));if(!this._envelope.rcptQueue.length)return t(this._formatError("Can't send mail - no recipients defined","EENVELOPE",!1,"API"));if(this._recipientQueue=[],this._supportedExtensions.includes("PIPELINING"))for(;this._envelope.rcptQueue.length;)r=this._envelope.rcptQueue.shift(),this._recipientQueue.push(r),this._responseActions.push(e=>{this._actionRCPT(e,t)}),this._sendCommand("RCPT TO:<"+r+">"+this._getDsnRcptToArgs());else r=this._envelope.rcptQueue.shift(),this._recipientQueue.push(r),this._responseActions.push(e=>{this._actionRCPT(e,t)}),this._sendCommand("RCPT TO:<"+r+">"+this._getDsnRcptToArgs())}_actionRCPT(e,t){let i,r,n=this._recipientQueue.shift();if(2!==Number(e.charAt(0))?(i=this._usingSmtpUtf8&&/^553 /.test(e)&&/[\x80-\uFFFF]/.test(n)?"Internationalized mailbox name not allowed":"Recipient command failed",this._envelope.rejected.push(n),(r=this._formatError(i,"EENVELOPE",e,"RCPT TO")).recipient=n,this._envelope.rejectedErrors.push(r)):this._envelope.accepted.push(n),this._envelope.rcptQueue.length||this._recipientQueue.length)this._envelope.rcptQueue.length&&(n=this._envelope.rcptQueue.shift(),this._recipientQueue.push(n),this._responseActions.push(e=>{this._actionRCPT(e,t)}),this._sendCommand("RCPT TO:<"+n+">"+this._getDsnRcptToArgs()));else{if(!(this._envelope.rejected.length<this._envelope.to.length))return(r=this._formatError("Can't send mail - all recipients were rejected","EENVELOPE",e,"RCPT TO")).rejected=this._envelope.rejected,r.rejectedErrors=this._envelope.rejectedErrors,t(r);this._responseActions.push(e=>{this._actionDATA(e,t)}),this._sendCommand("DATA")}}_actionDATA(e,t){if(!/^[23]/.test(e))return t(this._formatError("Data command failed","EENVELOPE",e,"DATA"));let i={accepted:this._envelope.accepted,rejected:this._envelope.rejected};this._ehloLines&&this._ehloLines.length&&(i.ehlo=this._ehloLines),this._envelope.rejectedErrors.length&&(i.rejectedErrors=this._envelope.rejectedErrors),t(null,i)}_actionSMTPStream(e,t){return 2!==Number(e.charAt(0))?t(this._formatError("Message failed","EMESSAGE",e,"DATA")):t(null,e)}_actionLMTPStream(e,t,i,r){let n;if(2!==Number(i.charAt(0))){(n=this._formatError("Message failed for recipient "+e,"EMESSAGE",i,"DATA")).recipient=e,this._envelope.rejected.push(e),this._envelope.rejectedErrors.push(n);for(let t=0,i=this._envelope.accepted.length;t<i;t++)this._envelope.accepted[t]===e&&this._envelope.accepted.splice(t,1)}if(t)return r(null,i)}_handleXOauth2Token(e,t){this._auth.oauth2.getToken(e,(i,r)=>{if(i)return this.logger.info({tnx:"smtp",username:this._auth.user,action:"authfail",method:this._authMethod},"User %s failed to authenticate",JSON.stringify(this._auth.user)),t(this._formatError(i,"EAUTH",!1,"AUTH XOAUTH2"));this._responseActions.push(i=>{this._actionAUTHComplete(i,e,t)}),this._sendCommand("AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token(r),"AUTH XOAUTH2 "+this._auth.oauth2.buildXOAuth2Token("/* secret */"))})}_isDestroyedMessage(e){if(this._destroyed)return"Cannot "+e+" - smtp connection is already destroyed.";if(this._socket){if(this._socket.destroyed)return"Cannot "+e+" - smtp connection socket is already destroyed.";if(!this._socket.writable)return"Cannot "+e+" - smtp connection socket is already half-closed."}}_getHostname(){let e;try{e=o.hostname()||""}catch(t){e="localhost"}return(!e||0>e.indexOf("."))&&(e="[127.0.0.1]"),e.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)&&(e="["+e+"]"),e}}t.exports=g},390672,(e,t,i)=>{"use strict";let r=e.r(688947).Stream,n=e.r(373248),s=e.r(254799),a=e.r(345693);class o extends r{constructor(e,t){if(super(),this.options=e||{},e&&e.serviceClient){if(!e.privateKey||!e.user)return void setImmediate(()=>this.emit("error",Error('Options "privateKey" and "user" are required for service account!')));let t=Math.min(Math.max(Number(this.options.serviceRequestTimeout)||0,0),3600);this.options.serviceRequestTimeout=t||300}if(this.logger=a.getLogger({logger:t},{component:this.options.component||"OAuth2"}),this.provisionCallback="function"==typeof this.options.provisionCallback&&this.options.provisionCallback,this.options.accessUrl=this.options.accessUrl||"https://accounts.google.com/o/oauth2/token",this.options.customHeaders=this.options.customHeaders||{},this.options.customParams=this.options.customParams||{},this.accessToken=this.options.accessToken||!1,this.options.expires&&Number(this.options.expires))this.expires=this.options.expires;else{let e=Math.max(Number(this.options.timeout)||0,0);this.expires=e&&Date.now()+1e3*e||0}this.renewing=!1,this.renewalQueue=[]}getToken(e,t){if(!e&&this.accessToken&&(!this.expires||this.expires>Date.now()))return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"reuse"},"Reusing existing access token for %s",this.options.user),t(null,this.accessToken);if(!this.provisionCallback&&!this.options.refreshToken&&!this.options.serviceClient)return this.accessToken?(this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"reuse"},"Reusing existing access token (no refresh capability) for %s",this.options.user),t(null,this.accessToken)):(this.logger.error({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Cannot renew access token for %s: No refresh mechanism available",this.options.user),t(Error("Can't create new access token for user")));if(this.renewing)return this.renewalQueue.push({renew:e,callback:t});this.renewing=!0;let i=(e,i)=>{this.renewalQueue.forEach(t=>t.callback(e,i)),this.renewalQueue=[],this.renewing=!1,e?this.logger.error({err:e,tnx:"OAUTH2",user:this.options.user,action:"renew"},"Failed generating new Access Token for %s",this.options.user):this.logger.info({tnx:"OAUTH2",user:this.options.user,action:"renew"},"Generated new Access Token for %s",this.options.user),t(e,i)};this.provisionCallback?this.provisionCallback(this.options.user,!!e,(e,t,r)=>{!e&&t&&(this.accessToken=t,this.expires=r||0),i(e,t)}):this.generateToken(i)}updateToken(e,t){this.accessToken=e,t=Math.max(Number(t)||0,0),this.expires=t&&Date.now()+1e3*t||0,this.emit("token",{user:this.options.user,accessToken:e||"",expires:this.expires})}generateToken(e){let t,i;if(this.options.serviceClient){let r,n=Math.floor(Date.now()/1e3),s={iss:this.options.serviceClient,scope:this.options.scope||"https://mail.google.com/",sub:this.options.user,aud:this.options.accessUrl,iat:n,exp:n+this.options.serviceRequestTimeout};try{r=this.jwtSignRS256(s)}catch(t){return e(Error("Can't generate token. Check your auth options"))}t={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:r},i={grant_type:"urn:ietf:params:oauth:grant-type:jwt-bearer",assertion:s}}else{if(!this.options.refreshToken)return e(Error("Can't create new access token for user"));t={client_id:this.options.clientId||"",client_secret:this.options.clientSecret||"",refresh_token:this.options.refreshToken,grant_type:"refresh_token"},i={client_id:this.options.clientId||"",client_secret:(this.options.clientSecret||"").substr(0,6)+"...",refresh_token:(this.options.refreshToken||"").substr(0,6)+"...",grant_type:"refresh_token"}}Object.keys(this.options.customParams).forEach(e=>{t[e]=this.options.customParams[e],i[e]=this.options.customParams[e]}),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"generate"},"Requesting token using: %s",JSON.stringify(i)),this.postRequest(this.options.accessUrl,t,this.options,(t,i)=>{let r;if(t)return e(t);try{r=JSON.parse(i.toString())}catch(t){return e(t)}if(!r||"object"!=typeof r)return this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",(i||"").toString()),e(Error("Invalid authentication response"));let n={};if(Object.keys(r).forEach(e=>{"access_token"!==e?n[e]=r[e]:n[e]=(r[e]||"").toString().substr(0,6)+"..."}),this.logger.debug({tnx:"OAUTH2",user:this.options.user,action:"post"},"Response: %s",JSON.stringify(n)),r.error){let t=r.error;return r.error_description&&(t+=": "+r.error_description),r.error_uri&&(t+=" ("+r.error_uri+")"),e(Error(t))}return r.access_token?(this.updateToken(r.access_token,r.expires_in),e(null,this.accessToken)):e(Error("No access token"))})}buildXOAuth2Token(e){let t=["user="+(this.options.user||""),"auth=Bearer "+(e||this.accessToken),"",""];return Buffer.from(t.join("\x01"),"utf-8").toString("base64")}postRequest(e,t,i,r){let s=!1,a=[],o=0,l=n(e,{method:"post",headers:i.customHeaders,body:t,allowErrorResponse:!0});l.on("readable",()=>{let e;for(;null!==(e=l.read());)a.push(e),o+=e.length}),l.once("error",e=>{if(!s)return s=!0,r(e)}),l.once("end",()=>{if(!s)return s=!0,r(null,Buffer.concat(a,o))})}toBase64URL(e){return"string"==typeof e&&(e=Buffer.from(e)),e.toString("base64").replace(/[=]+/g,"").replace(/\+/g,"-").replace(/\//g,"_")}jwtSignRS256(e){e=['{"alg":"RS256","typ":"JWT"}',JSON.stringify(e)].map(e=>this.toBase64URL(e)).join(".");let t=s.createSign("RSA-SHA256").update(e).sign(this.options.privateKey);return e+"."+this.toBase64URL(t)}}t.exports=o},604950,(e,t,i)=>{"use strict";let r=e.r(210364),n=e.r(345693).assign,s=e.r(390672),a=e.r(427699);class o extends a{constructor(e){if(super(),this.pool=e,this.options=e.options,this.logger=this.pool.logger,this.options.auth)switch((this.options.auth.type||"").toString().toUpperCase()){case"OAUTH2":{let e=new s(this.options.auth,this.logger);e.provisionCallback=this.pool.mailer&&this.pool.mailer.get("oauth2_provision_cb")||e.provisionCallback,this.auth={type:"OAUTH2",user:this.options.auth.user,oauth2:e,method:"XOAUTH2"},e.on("token",e=>this.pool.mailer.emit("token",e)),e.on("error",e=>this.emit("error",e));break}default:if(!this.options.auth.user&&!this.options.auth.pass)break;this.auth={type:(this.options.auth.type||"").toString().toUpperCase()||"LOGIN",user:this.options.auth.user,credentials:{user:this.options.auth.user||"",pass:this.options.auth.pass,options:this.options.auth.options},method:(this.options.auth.method||"").trim().toUpperCase()||this.options.authMethod||!1}}this._connection=!1,this._connected=!1,this.messages=0,this.available=!0}connect(e){this.pool.getSocket(this.options,(t,i)=>{if(t)return e(t);let s=!1,a=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:a.host||"",destPort:a.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,a.host||"",a.port||""),a=n(!1,a),Object.keys(i).forEach(e=>{a[e]=i[e]})),this.connection=new r(a),this.connection.once("error",t=>{if(this.emit("error",t),!s)return s=!0,e(t)}),this.connection.once("end",()=>{if(this.close(),s)return;s=!0;let t=setTimeout(()=>{if(s)return;let t=Error("Unexpected socket close");this.connection&&this.connection._socket&&this.connection._socket.upgrading&&(t.code="ETLS"),e(t)},1e3);try{t.unref()}catch(e){}}),this.connection.connect(()=>{if(!s)if(!this.auth||!this.connection.allowsAuth&&!a.forceAuth)return s=!0,this._connected=!0,e(null,!0);else this.connection.login(this.auth,t=>{if(!s){if(s=!0,t)return this.connection.close(),this.emit("error",t),e(t);this._connected=!0,e(null,!0)}})})})}send(e,t){if(!this._connected)return this.connect(i=>i?t(i):this.send(e,t));let i=e.message.getEnvelope(),r=e.message.messageId(),n=[].concat(i.to||[]);n.length>3&&n.push("...and "+n.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:r,cid:this.id},"Sending message %s using #%s to <%s>",r,this.id,n.join(", ")),e.data.dsn&&(i.dsn=e.data.dsn),e.data.requireTLSExtensionEnabled&&(i.requireTLSExtensionEnabled=e.data.requireTLSExtensionEnabled),this.connection.send(i,e.message.createReadStream(),(e,n)=>{if(this.messages++,e)return this.connection.close(),this.emit("error",e),t(e);n.envelope={from:i.from,to:i.to},n.messageId=r,setImmediate(()=>{let e;this.messages>=this.options.maxMessages?((e=Error("Resource exhausted")).code="EMAXLIMIT",this.connection.close(),this.emit("error",e)):this.pool._checkRateLimit(()=>{this.available=!0,this.emit("available")})}),t(null,n)})}close(){this._connected=!1,this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.connection&&this.connection.close(),this.emit("close")}}t.exports=o},2845,(e,t,i)=>{"use strict";let r=e.r(769355),n={};function s(e){return e.replace(/[^a-zA-Z0-9.-]/g,"").toLowerCase()}function a(e){let t=["domains","aliases"],i={};return Object.keys(e).forEach(r=>{0>t.indexOf(r)&&(i[r]=e[r])}),i}Object.keys(r).forEach(e=>{let t=r[e];n[s(e)]=a(t),[].concat(t.aliases||[]).forEach(e=>{n[s(e)]=a(t)}),[].concat(t.domains||[]).forEach(e=>{n[s(e)]=a(t)})}),t.exports=function(e){return n[e=s(e.split("@").pop())]||!1}},620365,(e,t,i)=>{"use strict";let r=e.r(427699),n=e.r(604950),s=e.r(210364),a=e.r(2845),o=e.r(345693),l=e.r(282799);class c extends r{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let i=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=o.parseConnectionUrl(e.url),i=i||t.service),this.options=o.assign(!1,e,t,i&&a(i)),this.options.maxConnections=this.options.maxConnections||5,this.options.maxMessages=this.options.maxMessages||100,this.logger=o.getLogger(this.options,{component:this.options.component||"smtp-pool"});let r=new s(this.options);this.name="SMTP (pool)",this.version=l.version+"[client:"+r.version+"]",this._rateLimit={counter:0,timeout:null,waiting:[],checkpoint:!1,delta:Number(this.options.rateDelta)||1e3,limit:Number(this.options.rateLimit)||0},this._closed=!1,this._queue=[],this._connections=[],this._connectionCounter=0,this.idling=!0,setImmediate(()=>{this.idling&&this.emit("idle")})}getSocket(e,t){return setImmediate(()=>t(null,!1))}send(e,t){return!this._closed&&(this._queue.push({mail:e,requeueAttempts:0,callback:t}),this.idling&&this._queue.length>=this.options.maxConnections&&(this.idling=!1),setImmediate(()=>this._processMessages()),!0)}close(){let e,t=this._connections.length;if(this._closed=!0,clearTimeout(this._rateLimit.timeout),!t&&!this._queue.length)return;for(let i=t-1;i>=0;i--)this._connections[i]&&this._connections[i].available&&((e=this._connections[i]).close(),this.logger.info({tnx:"connection",cid:e.id,action:"removed"},"Connection #%s removed",e.id));if(t&&!this._connections.length&&this.logger.debug({tnx:"connection"},"All connections removed"),!this._queue.length)return;let i=()=>{if(!this._queue.length)return void this.logger.debug({tnx:"connection"},"Pending queue entries cleared");let t=this._queue.shift();if(t&&"function"==typeof t.callback)try{t.callback(Error("Connection pool was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}setImmediate(i)};setImmediate(i)}_processMessages(){let e,t,i;if(this._closed)return;if(!this._queue.length){this.idling||(this.idling=!0,this.emit("idle"));return}for(t=0,i=this._connections.length;t<i;t++)if(this._connections[t].available){e=this._connections[t];break}if(!e&&this._connections.length<this.options.maxConnections&&(e=this._createConnection()),!e){this.idling=!1;return}!this.idling&&this._queue.length<this.options.maxConnections&&(this.idling=!0,this.emit("idle"));let r=e.queueEntry=this._queue.shift();r.messageId=(e.queueEntry.mail.message.getHeader("message-id")||"").replace(/[<>\s]/g,""),e.available=!1,this.logger.debug({tnx:"pool",cid:e.id,messageId:r.messageId,action:"assign"},"Assigned message <%s> to #%s (%s)",r.messageId,e.id,e.messages+1),this._rateLimit.limit&&(this._rateLimit.counter++,this._rateLimit.checkpoint||(this._rateLimit.checkpoint=Date.now())),e.send(r.mail,(t,i)=>{if(r===e.queueEntry){try{r.callback(t,i)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}})}_createConnection(){let e=new n(this);return e.id=++this._connectionCounter,this.logger.info({tnx:"pool",cid:e.id,action:"conection"},"Created new pool resource #%s",e.id),e.on("available",()=>{this.logger.debug({tnx:"connection",cid:e.id,action:"available"},"Connection #%s became available",e.id),this._closed?this.close():this._processMessages()}),e.once("error",t=>{if("EMAXLIMIT"!==t.code?this.logger.error({err:t,tnx:"pool",cid:e.id},"Pool Error for #%s: %s",e.id,t.message):this.logger.debug({tnx:"pool",cid:e.id,action:"maxlimit"},"Max messages limit exchausted for #%s",e.id),e.queueEntry){try{e.queueEntry.callback(t)}catch(t){this.logger.error({err:t,tnx:"callback",cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}this._removeConnection(e),this._continueProcessing()}),e.once("close",()=>{this.logger.info({tnx:"connection",cid:e.id,action:"closed"},"Connection #%s was closed",e.id),this._removeConnection(e),e.queueEntry?setTimeout(()=>{e.queueEntry&&(this._shouldRequeuOnConnectionClose(e.queueEntry)?this._requeueEntryOnConnectionClose(e):this._failDeliveryOnConnectionClose(e)),this._continueProcessing()},50):(this._closed||!this.idling||this._connections.length||this.emit("clear"),this._continueProcessing())}),this._connections.push(e),e}_shouldRequeuOnConnectionClose(e){return void 0===this.options.maxRequeues||this.options.maxRequeues<0||e.requeueAttempts<this.options.maxRequeues}_failDeliveryOnConnectionClose(e){if(e.queueEntry&&e.queueEntry.callback){try{e.queueEntry.callback(Error("Reached maximum number of retries after connection was closed"))}catch(t){this.logger.error({err:t,tnx:"callback",messageId:e.queueEntry.messageId,cid:e.id},"Callback error for #%s: %s",e.id,t.message)}e.queueEntry=!1}}_requeueEntryOnConnectionClose(e){e.queueEntry.requeueAttempts=e.queueEntry.requeueAttempts+1,this.logger.debug({tnx:"pool",cid:e.id,messageId:e.queueEntry.messageId,action:"requeue"},"Re-queued message <%s> for #%s. Attempt: #%s",e.queueEntry.messageId,e.id,e.queueEntry.requeueAttempts),this._queue.unshift(e.queueEntry),e.queueEntry=!1}_continueProcessing(){this._closed?this.close():setTimeout(()=>this._processMessages(),100)}_removeConnection(e){let t=this._connections.indexOf(e);-1!==t&&this._connections.splice(t,1)}_checkRateLimit(e){if(!this._rateLimit.limit)return e();let t=Date.now();return this._rateLimit.counter<this._rateLimit.limit?e():(this._rateLimit.waiting.push(e),this._rateLimit.checkpoint<=t-this._rateLimit.delta)?this._clearRateLimit():void(!this._rateLimit.timeout&&(this._rateLimit.timeout=setTimeout(()=>this._clearRateLimit(),this._rateLimit.delta-(t-this._rateLimit.checkpoint)),this._rateLimit.checkpoint=t))}_clearRateLimit(){for(clearTimeout(this._rateLimit.timeout),this._rateLimit.timeout=null,this._rateLimit.counter=0,this._rateLimit.checkpoint=!1;this._rateLimit.waiting.length;)setImmediate(this._rateLimit.waiting.shift())}isIdle(){return this.idling}verify(e){let t;e||(t=new Promise((t,i)=>{e=o.callbackPromise(t,i)}));let i=new n(this).auth;return this.getSocket(this.options,(t,r)=>{if(t)return e(t);let n=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:n.host||"",destPort:n.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,n.host||"",n.port||""),n=o.assign(!1,n),Object.keys(r).forEach(e=>{n[e]=r[e]}));let a=new s(n),l=!1;a.once("error",t=>{if(!l)return l=!0,a.close(),e(t)}),a.once("end",()=>{if(!l)return l=!0,e(Error("Connection closed"))});let c=()=>{if(!l)return l=!0,a.quit(),e(null,!0)};a.connect(()=>{if(!l)if(i&&(a.allowsAuth||n.forceAuth))a.login(i,t=>{if(!l){if(t)return l=!0,a.close(),e(t);c()}});else if(!i&&a.allowsAuth&&n.forceAuth){let t=Error("Authentication info was not provided");return t.code="NoAuth",l=!0,a.close(),e(t)}else c()})}),t}}t.exports=c},913931,(e,t,i)=>{"use strict";let r=e.r(427699),n=e.r(210364),s=e.r(2845),a=e.r(345693),o=e.r(390672),l=e.r(282799);class c extends r{constructor(e){let t;super(),"string"==typeof(e=e||{})&&(e={url:e});let i=e.service;"function"==typeof e.getSocket&&(this.getSocket=e.getSocket),e.url&&(t=a.parseConnectionUrl(e.url),i=i||t.service),this.options=a.assign(!1,e,t,i&&s(i)),this.logger=a.getLogger(this.options,{component:this.options.component||"smtp-transport"});let r=new n(this.options);this.name="SMTP",this.version=l.version+"[client:"+r.version+"]",this.options.auth&&(this.auth=this.getAuth({}))}getSocket(e,t){return setImmediate(()=>t(null,!1))}getAuth(e){if(!e)return this.auth;let t=!1,i={};if(this.options.auth&&"object"==typeof this.options.auth&&Object.keys(this.options.auth).forEach(e=>{t=!0,i[e]=this.options.auth[e]}),e&&"object"==typeof e&&Object.keys(e).forEach(r=>{t=!0,i[r]=e[r]}),!t)return!1;if("OAUTH2"!==(i.type||"").toString().toUpperCase())return{type:(i.type||"").toString().toUpperCase()||"LOGIN",user:i.user,credentials:{user:i.user||"",pass:i.pass,options:i.options},method:(i.method||"").trim().toUpperCase()||this.options.authMethod||!1};{if(!i.service&&!i.user)return!1;let e=new o(i,this.logger);return e.provisionCallback=this.mailer&&this.mailer.get("oauth2_provision_cb")||e.provisionCallback,e.on("token",e=>this.mailer.emit("token",e)),e.on("error",e=>this.emit("error",e)),{type:"OAUTH2",user:i.user,oauth2:e,method:"XOAUTH2"}}}send(e,t){this.getSocket(this.options,(i,r)=>{if(i)return t(i);let s=!1,o=this.options;r&&r.connection&&(this.logger.info({tnx:"proxy",remoteAddress:r.connection.remoteAddress,remotePort:r.connection.remotePort,destHost:o.host||"",destPort:o.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",r.connection.remoteAddress,r.connection.remotePort,o.host||"",o.port||""),o=a.assign(!1,o),Object.keys(r).forEach(e=>{o[e]=r[e]}));let l=new n(o);l.once("error",e=>{if(!s)return s=!0,l.close(),t(e)}),l.once("end",()=>{if(s)return;let e=setTimeout(()=>{if(s)return;s=!0;let e=Error("Unexpected socket close");l&&l._socket&&l._socket.upgrading&&(e.code="ETLS"),t(e)},1e3);try{e.unref()}catch(e){}});let c=()=>{let i=e.message.getEnvelope(),r=e.message.messageId(),n=[].concat(i.to||[]);n.length>3&&n.push("...and "+n.splice(2).length+" more"),e.data.dsn&&(i.dsn=e.data.dsn),e.data.requireTLSExtensionEnabled&&(i.requireTLSExtensionEnabled=e.data.requireTLSExtensionEnabled),this.logger.info({tnx:"send",messageId:r},"Sending message %s to <%s>",r,n.join(", ")),l.send(i,e.message.createReadStream(),(e,n)=>{if(s=!0,l.close(),e)return this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",r,e.message),t(e);n.envelope={from:i.from,to:i.to},n.messageId=r;try{return t(null,n)}catch(e){this.logger.error({err:e,tnx:"callback"},"Callback error for %s: %s",r,e.message)}})};l.connect(()=>{if(s)return;let i=this.getAuth(e.data.auth);i&&(l.allowsAuth||o.forceAuth)?l.login(i,e=>{if(i&&i!==this.auth&&i.oauth2&&i.oauth2.removeAllListeners(),!s){if(e)return s=!0,l.close(),t(e);c()}}):c()})})}verify(e){let t;return e||(t=new Promise((t,i)=>{e=a.callbackPromise(t,i)})),this.getSocket(this.options,(t,i)=>{if(t)return e(t);let r=this.options;i&&i.connection&&(this.logger.info({tnx:"proxy",remoteAddress:i.connection.remoteAddress,remotePort:i.connection.remotePort,destHost:r.host||"",destPort:r.port||"",action:"connected"},"Using proxied socket from %s:%s to %s:%s",i.connection.remoteAddress,i.connection.remotePort,r.host||"",r.port||""),r=a.assign(!1,r),Object.keys(i).forEach(e=>{r[e]=i[e]}));let s=new n(r),o=!1;s.once("error",t=>{if(!o)return o=!0,s.close(),e(t)}),s.once("end",()=>{if(!o)return o=!0,e(Error("Connection closed"))});let l=()=>{if(!o)return o=!0,s.quit(),e(null,!0)};s.connect(()=>{if(o)return;let t=this.getAuth({});if(t&&(s.allowsAuth||r.forceAuth))s.login(t,t=>{if(!o){if(t)return o=!0,s.close(),e(t);l()}});else if(!t&&s.allowsAuth&&r.forceAuth){let t=Error("Authentication info was not provided");return t.code="NoAuth",o=!0,s.close(),e(t)}else l()})}),t}close(){this.auth&&this.auth.oauth2&&this.auth.oauth2.removeAllListeners(),this.emit("close")}}t.exports=c},45653,(e,t,i)=>{"use strict";let r=e.r(233405).spawn,n=e.r(282799),s=e.r(345693);class a{constructor(e){e=e||{},this._spawn=r,this.options=e||{},this.name="Sendmail",this.version=n.version,this.path="sendmail",this.args=!1,this.winbreak=!1,this.logger=s.getLogger(this.options,{component:this.options.component||"sendmail"}),e&&("string"==typeof e?this.path=e:"object"==typeof e&&(e.path&&(this.path=e.path),Array.isArray(e.args)&&(this.args=e.args),this.winbreak=["win","windows","dos","\r\n"].includes((e.newline||"").toString().toLowerCase())))}send(e,t){let i,r,n;e.message.keepBcc=!0;let s=e.data.envelope||e.message.getEnvelope(),a=e.message.messageId();if([].concat(s.from||[]).concat(s.to||[]).some(e=>/^-/.test(e)))return t(Error("Can not send mail. Invalid envelope addresses."));i=this.args?["-i"].concat(this.args).concat(s.to):["-i"].concat(s.from?["-f",s.from]:[]).concat(s.to);let o=i=>{if(!n&&(n=!0,"function"==typeof t))if(i)return t(i);else return t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:a,response:"Messages queued for delivery"})};try{r=this._spawn(this.path,i)}catch(e){return this.logger.error({err:e,tnx:"spawn",messageId:a},"Error occurred while spawning sendmail. %s",e.message),o(e)}if(!r)return o(Error("sendmail was not found"));{r.on("error",e=>{this.logger.error({err:e,tnx:"spawn",messageId:a},"Error occurred when sending message %s. %s",a,e.message),o(e)}),r.once("exit",e=>{let t;if(!e)return o();t=127===e?Error("Sendmail command not found, process exited with code "+e):Error("Sendmail exited with code "+e),this.logger.error({err:t,tnx:"stdin",messageId:a},"Error sending message %s to sendmail. %s",a,t.message),o(t)}),r.once("close",o),r.stdin.on("error",e=>{this.logger.error({err:e,tnx:"stdin",messageId:a},"Error occurred when piping message %s to sendmail. %s",a,e.message),o(e)});let t=[].concat(s.to||[]);t.length>3&&t.push("...and "+t.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:a},"Sending message %s to <%s>",a,t.join(", "));let i=e.message.createReadStream();i.once("error",e=>{this.logger.error({err:e,tnx:"stdin",messageId:a},"Error occurred when generating message %s. %s",a,e.message),r.kill("SIGINT"),o(e)}),i.pipe(r.stdin)}}}t.exports=a},248598,(e,t,i)=>{"use strict";let r=e.r(282799),n=e.r(345693);class s{constructor(e){e=e||{},this.options=e||{},this.name="StreamTransport",this.version=r.version,this.logger=n.getLogger(this.options,{component:this.options.component||"stream-transport"}),this.winbreak=["win","windows","dos","\r\n"].includes((e.newline||"").toString().toLowerCase())}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),r=e.message.messageId(),n=[].concat(i.to||[]);n.length>3&&n.push("...and "+n.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:r},"Sending message %s to <%s> using %s line breaks",r,n.join(", "),this.winbreak?"<CR><LF>":"<LF>"),setImmediate(()=>{let i;try{i=e.message.createReadStream()}catch(e){return this.logger.error({err:e,tnx:"send",messageId:r},"Creating send stream failed for %s. %s",r,e.message),t(e)}if(!this.options.buffer)return i.once("error",e=>{this.logger.error({err:e,tnx:"send",messageId:r},"Failed creating message for %s. %s",r,e.message)}),t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:r,message:i});let n=[],s=0;i.on("readable",()=>{let e;for(;null!==(e=i.read());)n.push(e),s+=e.length}),i.once("error",e=>(this.logger.error({err:e,tnx:"send",messageId:r},"Failed creating message for %s. %s",r,e.message),t(e))),i.on("end",()=>t(null,{envelope:e.data.envelope||e.message.getEnvelope(),messageId:r,message:Buffer.concat(n,s)}))})}}t.exports=s},796929,(e,t,i)=>{"use strict";let r=e.r(282799),n=e.r(345693);class s{constructor(e){e=e||{},this.options=e||{},this.name="JSONTransport",this.version=r.version,this.logger=n.getLogger(this.options,{component:this.options.component||"json-transport"})}send(e,t){e.message.keepBcc=!0;let i=e.data.envelope||e.message.getEnvelope(),r=e.message.messageId(),n=[].concat(i.to||[]);n.length>3&&n.push("...and "+n.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:r},"Composing JSON structure of %s to <%s>",r,n.join(", ")),setImmediate(()=>{e.normalize((e,n)=>e?(this.logger.error({err:e,tnx:"send",messageId:r},"Failed building JSON structure for %s. %s",r,e.message),t(e)):(delete n.envelope,delete n.normalizedHeaders,t(null,{envelope:i,messageId:r,message:this.options.skipEncoding?n:JSON.stringify(n)})))})}}t.exports=s},509038,(e,t,i)=>{"use strict";let r=e.r(427699),n=e.r(282799),s=e.r(345693),a=e.r(73676),o=e.r(847229);class l extends r{constructor(e){super(),e=e||{},this.options=e||{},this.ses=this.options.SES,this.name="SESTransport",this.version=n.version,this.logger=s.getLogger(this.options,{component:this.options.component||"ses-transport"})}getRegion(e){return this.ses.sesClient.config&&"function"==typeof this.ses.sesClient.config.region?this.ses.sesClient.config.region().then(t=>e(null,t)).catch(t=>e(t)):e(null,!1)}send(e,t){let i={ts:Date.now(),pending:!0},r=e.message._headers.find(e=>/^from$/i.test(e.key));if(r){let e=new o("text/plain");r=e._convertAddresses(e._parseAddresses(r.value))}let n=e.data.envelope||e.message.getEnvelope(),s=e.message.messageId(),l=[].concat(n.to||[]);l.length>3&&l.push("...and "+l.splice(2).length+" more"),this.logger.info({tnx:"send",messageId:s},"Sending message %s to <%s>",s,l.join(", "));let c=t=>{e.data._dkim||(e.data._dkim={}),e.data._dkim.skipFields&&"string"==typeof e.data._dkim.skipFields?e.data._dkim.skipFields+=":date:message-id":e.data._dkim.skipFields="date:message-id";let i=e.message.createReadStream(),r=i.pipe(new a),n=[],s=0;r.on("readable",()=>{let e;for(;null!==(e=r.read());)n.push(e),s+=e.length}),i.once("error",e=>r.emit("error",e)),r.once("error",e=>{t(e)}),r.once("end",()=>t(null,Buffer.concat(n,s)))};setImmediate(()=>c((a,o)=>{if(a)return this.logger.error({err:a,tnx:"send",messageId:s},"Failed creating message for %s. %s",s,a.message),i.pending=!1,t(a);let l={Content:{Raw:{Data:o}},FromEmailAddress:r||n.from,Destination:{ToAddresses:n.to}};Object.keys(e.data.ses||{}).forEach(t=>{l[t]=e.data.ses[t]}),this.getRegion((e,r)=>{(e||!r)&&(r="us-east-1");let a=new this.ses.SendEmailCommand(l);this.ses.sesClient.send(a).then(e=>{"us-east-1"===r&&(r="email"),i.pending=!0,t(null,{envelope:{from:n.from,to:n.to},messageId:"<"+e.MessageId+(/@/.test(e.MessageId)?"":"@"+r+".amazonses.com")+">",response:e.MessageId,raw:o})}).catch(e=>{this.logger.error({err:e,tnx:"send"},"Send error for %s: %s",s,e.message),i.pending=!1,t(e)})})}))}verify(e){let t;e||(t=new Promise((t,i)=>{e=s.callbackPromise(t,i)}));let i=t=>t&&!["InvalidParameterValue","MessageRejected"].includes(t.code||t.Code||t.name)?e(t):e(null,!0),r={Content:{Raw:{Data:Buffer.from("From: <invalid@invalid>\r\nTo: <invalid@invalid>\r\n Subject: Invalid\r\n\r\nInvalid")}},FromEmailAddress:"invalid@invalid",Destination:{ToAddresses:["invalid@invalid"]}};return this.getRegion((e,t)=>{(e||!t)&&(t="us-east-1");let n=new this.ses.SendEmailCommand(r);this.ses.sesClient.send(n).then(e=>i(null,e)).catch(e=>i(e))}),t}}t.exports=l},641538,(e,t,i)=>{"use strict";let r=e.r(135821),n=e.r(345693),s=e.r(620365),a=e.r(913931),o=e.r(45653),l=e.r(248598),c=e.r(796929),d=e.r(509038),u=e.r(373248),h=e.r(282799),A=(process.env.ETHEREAL_API||"https://api.nodemailer.com").replace(/\/+$/,""),p=(process.env.ETHEREAL_WEB||"https://ethereal.email").replace(/\/+$/,""),f=(process.env.ETHEREAL_API_KEY||"").replace(/\s*/g,"")||null,g=["true","yes","y","1"].includes((process.env.ETHEREAL_CACHE||"yes").toString().trim().toLowerCase()),m=!1;t.exports.createTransport=function(e,t){let i,u;if("object"==typeof e&&"function"!=typeof e.send||"string"==typeof e&&/^(smtps?|direct):/i.test(e))if((u=(i="string"==typeof e?e:e.url)?n.parseConnectionUrl(i):e).pool)e=new s(u);else if(u.sendmail)e=new o(u);else if(u.streamTransport)e=new l(u);else if(u.jsonTransport)e=new c(u);else if(u.SES){if(u.SES.ses&&u.SES.aws){let e=Error("Using legacy SES configuration, expecting @aws-sdk/client-sesv2, see https://nodemailer.com/transports/ses/");throw e.code="LegacyConfig",e}e=new d(u)}else e=new a(u);return new r(e,u,t)},t.exports.createTestAccount=function(e,t){let i;if(t||"function"!=typeof e||(t=e,e=!1),t||(i=new Promise((e,i)=>{t=n.callbackPromise(e,i)})),g&&m)return setImmediate(()=>t(null,m)),i;e=e||A;let r=[],s=0,a={},o={requestor:h.name,version:h.version};f&&(a.Authorization="Bearer "+f);let l=u(e+"/user",{contentType:"application/json",method:"POST",headers:a,body:Buffer.from(JSON.stringify(o))});return l.on("readable",()=>{let e;for(;null!==(e=l.read());)r.push(e),s+=e.length}),l.once("error",e=>t(e)),l.once("end",()=>{let e,i,n=Buffer.concat(r,s);try{e=JSON.parse(n.toString())}catch(e){i=e}return i?t(i):"success"!==e.status||e.error?t(Error(e.error||"Request failed")):void(delete e.status,t(null,m=e))}),i},t.exports.getTestMessageUrl=function(e){if(!e||!e.response)return!1;let t=new Map;return e.response.replace(/\[([^\]]+)\]$/,(e,i)=>{i.replace(/\b([A-Z0-9]+)=([^\s]+)/g,(e,i,r)=>{t.set(i,r)})}),!!(t.has("STATUS")&&t.has("MSGID"))&&(m.web||p)+"/message/"+t.get("MSGID")}},211395,e=>{"use strict";var t=e.i(641538),i=e.i(267522);let r=async e=>{let{defaultFromAddress:t,defaultFromName:i,transport:r}=await n(e);return()=>({name:"nodemailer",defaultFromAddress:t,defaultFromName:i,sendEmail:async e=>await r.sendMail({from:`${i} <${t}>`,...e})})};async function n(e){let r;if(!e){let t=await a(e);if(!t)throw new i.InvalidConfiguration("Unable to create Nodemailer test account.");return{defaultFromAddress:"info@payloadcms.com",defaultFromName:"Payload",transport:t}}return"transport"in e&&e.transport?{transport:r}=e:r="transportOptions"in e&&e.transportOptions?t.default.createTransport(e.transportOptions):await a(e),e.skipVerify||await s(r),{defaultFromAddress:e.defaultFromAddress,defaultFromName:e.defaultFromName,transport:r}}async function s(e){try{await e.verify()}catch(e){console.error({err:e,msg:"Error verifying Nodemailer transport."})}}async function a(e){try{let i=await t.default.createTestAccount(),r={...e||{},auth:{pass:i.pass,user:i.user},fromAddress:e?.defaultFromAddress,fromName:e?.defaultFromName,host:"smtp.ethereal.email",port:587,secure:!1},n=t.default.createTransport(r),{pass:s,user:a,web:o}=i;return console.info("E-mail configured with ethereal.email test account. "),console.info(`Log into mock email provider at ${o}`),console.info(`Mock email account username: ${a}`),console.info(`Mock email account password: ${s}`),n}catch(e){if(e instanceof Error)throw console.error({err:e,msg:"There was a problem setting up the mock email handler"}),new i.InvalidConfiguration(`Unable to create Nodemailer test account. Error: ${e.message}`);throw new i.InvalidConfiguration("Unable to create Nodemailer test account.")}}e.s(["nodemailerAdapter",0,r])},719925,e=>{"use strict";var t=e.i(56466),i=e.i(143647),r=e.i(277412),n=e.i(581848);function s(e,t){return e.map(e=>{if("relationship"===e.type){let i=e,r=i.filterOptions;return i.filterOptions=async e=>{let{relationTo:i,req:s,user:a}=e,o="function"==typeof r?await r(e):r??!0;if(!1===o)return!1;let l=t.collections.find(({slug:e})=>e===i)?.admin,c=l?.hidden;if("function"==typeof c&&c({user:a}))return!1;let d=l?.baseFilter??l?.baseListFilter,u=await d?.({limit:0,page:1,req:s,sort:"id"});return u?!0===o?u:(0,n.combineWhereConstraints)([o,u],"and"):o},i}if("fields"in e&&e.fields)return{...e,fields:s(e.fields,t)};if("tabs"===e.type&&"tabs"in e)return{...e,tabs:e.tabs.map(e=>({...e,fields:s(e.fields,t)}))};if("blocks"===e.type){let i=e.blockReferences??e.blocks??[];return{...e,blocks:i.map(e=>"string"==typeof e?e:{...e,fields:s(e.fields,t)})}}return e})}var a=e.i(372036),o=e.i(796468),l=e.i(83611);let c=e=>({context:t,currentDepth:i,depth:r,draft:n,editorPopulationPromises:s,field:a,fieldPromises:o,findMany:c,flattenLocales:d,node:u,overrideAccess:h,parentIsLocalized:A,populationPromises:p,req:f,showHiddenFields:g})=>{let m=u.fields,y=e.find(e=>e.slug===m.blockType);y&&y?.fields?.length&&m&&(0,l.recursivelyPopulateFieldsForGraphQL)({context:t,currentDepth:i,data:m,depth:r,draft:n,editorPopulationPromises:s,fieldPromises:o,fields:y.fields,findMany:c,flattenLocales:d,overrideAccess:h,parentIsLocalized:A||a.localized||!1,populationPromises:p,req:f,showHiddenFields:g,siblingDoc:m})},d={ar:{inlineBlocks:{create:"أنشئ {{label}}",edit:"تحرير {{label}}",label:"الكتل الداخلية",remove:"إزالة {{label}}"},label:"كتل"},az:{inlineBlocks:{create:"Yarat {{label}}",edit:"{{label}} redaktə et",label:"Sıralı Bloklar",remove:"{{label}} silin"},label:"Bloklar"},bg:{inlineBlocks:{create:"Създайте {{label}}",edit:"Редактирай {{label}}",label:"Вградени блокове",remove:"Премахнете {{label}}"},label:"Блокове"},cs:{inlineBlocks:{create:"Vytvořte {{label}}",edit:"Upravit {{label}}",label:"Inline bloky",remove:"Odstraňte {{label}}"},label:"Bloky"},da:{inlineBlocks:{create:"Opret {{label}}",edit:"Rediger {{label}}",label:"Indlejrede blokke",remove:"Fjern {{label}}"},label:"Blokke"},de:{inlineBlocks:{create:"Erstelle {{label}}",edit:"Bearbeite {{label}}",label:"Inline-Blöcke",remove:"Entferne {{label}}"},label:"Blöcke"},en:{inlineBlocks:{create:"Create {{label}}",edit:"Edit {{label}}",label:"Inline Blocks",remove:"Remove {{label}}"},label:"Blocks"},es:{inlineBlocks:{create:"Crear {{label}}",edit:"Editar {{label}}",label:"Bloques en línea",remove:"Eliminar {{label}}"},label:"Bloques"},et:{inlineBlocks:{create:"Loo {{label}}",edit:"Muuda {{label}}",label:"Sisseehitatud plokid",remove:"Eemalda {{label}}"},label:"Plokk"},fa:{inlineBlocks:{create:"ایجاد {{label}}",edit:"ویرایش {{label}}",label:"بلوکهای درون خطی",remove:"حذف {{label}}"},label:"بلوک ها"},fr:{inlineBlocks:{create:"Créer {{label}}",edit:"Modifier {{label}}",label:"Blocs en ligne",remove:"Supprimer {{label}}"},label:"Blocs"},he:{inlineBlocks:{create:"צור {{label}}",edit:"ערוך {{label}}",label:"בלוקים משורשרים",remove:"הסר {{label}}"},label:"חסימות"},hr:{inlineBlocks:{create:"Stvori {{label}}",edit:"Uredi {{label}}",label:"Unutrašnji blokovi",remove:"Ukloni {{label}}"},label:"Blokovi"},hu:{inlineBlocks:{create:"Hozzon létre {{label}}",edit:"Szerkesztés {{label}}",label:"Beágyazott blokkok",remove:"Távolítsa el a {{label}}"},label:"Blokkok"},is:{inlineBlocks:{create:"Skrá {{label}}",edit:"Breyta {{label}}",label:"Línublokkir",remove:"Fjarlægja {{label}}"},label:"Blokkir"},it:{inlineBlocks:{create:"Crea {{label}}",edit:"Modifica {{label}}",label:"Blocchi in linea",remove:"Rimuovi {{label}}"},label:"Blocchi"},ja:{inlineBlocks:{create:"{{label}}を作成する",edit:"{{label}}を編集する",label:"インラインブロック",remove:"{{label}}を削除します"},label:"ブロック"},ko:{inlineBlocks:{create:"{{label}} 생성하기",edit:"{{label}} 수정하기",label:"인라인 블록",remove:"{{label}} 제거하세요"},label:"블록"},my:{inlineBlocks:{create:"Cipta {{label}}",edit:"Sunting {{label}}",label:"Inline Blocks [SKIPPED]",remove:"Buang {{label}}"},label:"တံတားများ"},nb:{inlineBlocks:{create:"Opprett {{label}}",edit:"Rediger {{label}}",label:"In-line blokker",remove:"Fjern {{label}}"},label:"Blokker"},nl:{inlineBlocks:{create:"Maak {{label}}",edit:"Bewerk {{label}}",label:"Inline Blocks",remove:"Verwijder {{label}}"},label:"Blokken"},pl:{inlineBlocks:{create:"Utwórz {{label}}",edit:"Edytuj {{label}}",label:"Blokowanie w linii",remove:"Usuń {{label}}"},label:"Bloki"},pt:{inlineBlocks:{create:"Crie {{label}}",edit:"Editar {{label}}",label:"Blocos em linha",remove:"Remova {{label}}"},label:"Blocos"},ro:{inlineBlocks:{create:"Creează {{label}}",edit:"Editați {{label}}",label:"Blocuri in linie",remove:"Ștergeți {{label}}"},label:"Blocuri"},rs:{inlineBlocks:{create:"Креирај {{label}}",edit:"Измени {{label}}",label:"Уметнути блокови",remove:"Уклони {{label}}"},label:"Блокови"},"rs-latin":{inlineBlocks:{create:"Kreiraj {{label}}",edit:"Izmeni {{label}}",label:"Umetnuti blokovi",remove:"Ukloni {{label}}"},label:"Blokovi"},ru:{inlineBlocks:{create:"Создать {{label}}",edit:"Изменить {{label}}",label:"Встроенные блоки",remove:"Удалить {{label}}"},label:"Блоки"},sk:{inlineBlocks:{create:"Vytvorte {{label}}",edit:"Upraviť {{label}}",label:"Inline bloky",remove:"Odstráňte {{label}}"},label:"Bloky"},sl:{inlineBlocks:{create:"Ustvari {{label}}",edit:"Uredi {{label}}",label:"Vrstični bloki",remove:"Odstrani {{label}}"},label:"Bloki"},sv:{inlineBlocks:{create:"Skapa {{label}}",edit:"Redigera {{label}}",label:"Inline-blockar",remove:"Ta bort {{label}}"},label:"Block"},ta:{inlineBlocks:{create:"{{label}} உருவாக்கவும்",edit:"{{label}} திருத்தவும்",label:"இன்லைன் தொகுதிகள்",remove:"{{label}} நீக்கவும்"},label:"தொகுதிகள்"},th:{inlineBlocks:{create:"สร้าง {{label}}",edit:"แก้ไข {{label}}",label:"บล็อกแบบอินไลน์",remove:"ลบ {{label}}"},label:"บล็อค"},tr:{inlineBlocks:{create:"{{label}} oluşturun",edit:"{{label}}'i düzenleyin",label:"Satır İçi Bloklar",remove:"{{label}} kaldırın"},label:"Bloklar"},uk:{inlineBlocks:{create:"Створити {{label}}",edit:"Редагувати {{label}}",label:"Вбудовані блоки",remove:"Видалити {{label}}"},label:"Блоки"},vi:{inlineBlocks:{create:"Tạo {{label}}",edit:"Chỉnh sửa {{label}}",label:"Khối nội tuyến",remove:"Xóa {{label}}"},label:"Khối"},zh:{inlineBlocks:{create:"创建{{label}}",edit:"编辑 {{label}}",label:"内联块",remove:"删除{{label}}"},label:"区块"},"zh-TW":{inlineBlocks:{create:"創建 {{label}}",edit:"編輯 {{label}}",label:"內聯區塊",remove:"移除 {{label}}"},label:"區塊"}};var u=e.i(704890);function h({nodes:e}){return e.map(e=>"node"in e?e.node:e)}let A=JSON;if(void 0===p)var p={};let f=p||{};p.JSOX=f,f.version="1.2.121";let g="function"==typeof BigInt,m=-1,y=0,b=1,E=2,C=3,w=4,I=5,v=6,B=7,Q=8,x=9,S=10,k=12,T=13,N=["ab","u8","cu8","s8","u16","s16","u32","s32","u64","s64","f32","f64"],D=null,_=null,R=[ArrayBuffer,Uint8Array,Uint8ClampedArray,Int8Array,Uint16Array,Int16Array,Uint32Array,Int32Array,null,null,Float32Array,Float64Array],L=0,F=1,M=2,O=3,U=5,P=6,$=7,j=8,H=9,q=10,z=11,V=12,G=13,Y=14,W=15,J=16,K=17,Z=18,X=19,ee=20,et=21,ei=22,er=23,en=24,es=25,ea=26,eo=27,el=28,ec=29,ed=30,eu=31,eh=32,eA=0,ep=1,ef=2,eg=3,em=4,ey=5,eb=6,eE={true:!0,false:!1,null:null,NaN:NaN,Infinity:1/0,undefined:void 0};class eC extends Date{constructor(e,t){super(e),this.ns=t||0}}f.DateNS=eC;let ew=[];function eI(){let e=ew.pop();return e||(e={context:eA,current_proto:null,current_class:null,current_class_field:0,arrayType:-1,valueType:y,elements:null}),e}function ev(e){ew.push(e)}f.updateContext=function(){};let eB=[];function eQ(){let e=eB.pop();return e?e.n=0:e={buf:null,n:0},e}function ex(e){eB.push(e)}f.escape=function(e){let t,i="";if(!e)return e;for(t=0;t<e.length;t++)('"'==e[t]||"\\"==e[t]||"`"==e[t]||"'"==e[t])&&(i+="\\"),i+=e[t];return i};let eS=new WeakMap,ek=new Map,eT=new Map,eN=[];f.reset=function e(){eS=new WeakMap,ek=new Map,eT=new Map,eN=[]},f.begin=function(e,t){let i,r={name:null,value_type:y,string:"",contains:null,className:null},n={line:1,col:1},s=0,a=new Map,o=L,l=!0,c=!1,d=!1,u=null,h=null,A,p={first:null,last:null,saved:null,push(e){let t=this.saved;t?(this.saved=t.next,t.node=e,t.next=null,t.prior=this.last):t={node:e,next:null,prior:this.last},this.last?this.last.next=t:this.first=t,this.last=t,this.length++},pop(){let e=this.last;return(this.last=e.prior)||(this.first=null),e.next=this.saved,this.last&&(this.last.next=null),e.next||(e.first=null),this.saved=e,this.length--,e.node},length:0},f=[],D={},_=null,eE=null,ew=0,eB=-1,eS=eA,ek=0,eN=!1,eD=!1,e_=!1,eR=!1,eL=!1,eF={first:null,last:null,saved:null,push(e){let t=this.saved;t?(this.saved=t.next,t.node=e,t.next=null,t.prior=this.last):t={node:e,next:null,prior:this.last},this.last?this.last.next=t:this.first=t,this.last=t},shift(){let e=this.first;return e?((this.first=e.next)||(this.last=null),e.next=this.saved,this.saved=e,e.node):null},unshift(e){let t=this.saved;this.saved=t.next,t.node=e,t.next=this.first,t.prior=null,this.first||(this.last=t),this.first=t}},eM=null,eU=!1,eP=!1,e$=!1,ej=!1,eH=!1,eq=!1,ez=!1,eV=0,eG=0,eY=!1,eW=!1,eJ=!1;function eK(e){throw Error(`${e} at ${s} [${n.line}:${n.col}]`)}return{fromJSOX(e,t,i){if(a.get(e))throw Error("Existing fromJSOX has been registered for prototype");function r(){}if(t||(t=r),t&&!("constructor"in t))throw Error("Please pass a prototype like thing...");a.set(e,{protoCon:t.prototype.constructor,cb:i})},registerFromJSOX(e,t){throw Error("registerFromJSOX is deprecated, please update to use fromJSOX instead:"+e+t.toString())},finalError(){0!==ek&&(1===ek&&eK("Comment began at end of document"),3===ek&&eK("Open comment '/*' is missing close at end of document"),4===ek&&eK("Incomplete '/* *' close at end of document")),eU&&eK("Incomplete string")},value(){this.finalError();let e=u;return u=void 0,e},reset(){o=L,l=!0,eF.last&&(eF.last.next=eF.save),eF.save=eF.first,eF.first=eF.last=null,p.last&&(p.last.next=p.save),p.length=0,p.save=eF.first,p.first=p.last=null,A=void 0,eS=eA,f=[],D={},_=null,eE=null,ew=0,r.value_type=y,r.name=null,r.string="",r.className=null,n.line=1,n.col=1,d=!1,ek=0,eY=!1,eU=!1,e$=!1,ej=!1,eW=!1},usePrototype(e,t){D[e]=t},write(i){let r;if("string"!=typeof i&&void 0!==i&&(i=String(i)),!l)throw Error("Parser is still in an error state, please reset before resuming");for(r=this._write(i,!1);r>0&&("function"==typeof t&&function e(i,r){let n,s,a=i[r];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(s=e(a,n))?a[n]=s:delete a[n]);return t.call(i,r,a)}({"":u},""),u=e(u),!(r<2));r=this._write());},parse(e,t){"string"!=typeof e&&(e=String(e)),this.reset();let i=this._write(e,!0);if(i>0){let e=this.value();if(void 0===e&&i>1)throw Error("Pending value could not complete");return"function"==typeof t?function e(i,r){let n,s,a=i[r];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(s=e(a,n))?a[n]=s:delete a[n]);return t.call(i,r,a)}({"":e},""):e}this.finalError()},_write(e,t){let D,eK,eZ,eX=0;function e0(e,t){throw Error(`${e} '${String.fromCodePoint(t)}' unexpected at ${s} (near '${eZ.substr(s>4?s-4:0,s>4?3:s-1)}[${String.fromCodePoint(t)}]${eZ.substr(s,10)}') [${n.line}:${n.col}]`)}function e1(){r.value_type=y,r.string="",r.contains=null}function e2(){let e=null;switch(r.value_type){case I:if(!(r.string.length>13)&&(13!=r.string.length||!(r[0]>"2"))||eW||eL||eR||eD||(eJ=!0),eJ)if(g)return BigInt(r.string);else throw Error("no builtin BigInt()",0);if(eW){let e=r.string.match(/\.(\d\d\d\d*)/),t=e?e[1]:null;if(!t||t.length<4){let e=new Date(r.string);return isNaN(e.getTime())&&e0("Bad Date format",D),e}{let e=t.substr(3);for(;e.length<6;)e+="0";let i=new eC(r.string,Number(e));return isNaN(i.getTime())&&e0("Bad DateNS format"+i+i.getTime(),D),i}}return(d?-1:1)*Number(r.string);case w:if(r.className){if((e=a.get(r.className))||(e=eT.get(r.className)),e&&e.cb)return r.className=null,e.cb.call(r.string);throw Error("Double string error, no constructor for: new "+r.className+"("+r.string+")")}return r.string;case E:return!0;case C:return!1;case B:case Q:return NaN;case x:return-1/0;case S:return 1/0;case b:return null;case m:case k:return;case v:if(r.className&&((e=a.get(r.className))||(e=eT.get(r.className)),r.className=null,e&&e.cb))return r.contains=e.cb.call(r.contains);return r.contains;case T:if(eB>=0){let e;if(e=r.contains.length?eO(r.contains[0]):eO(r.string),0===eB)return eB=-1,e;{let t=new R[eB](e);return eB=-1,t}}if(-2===eB){let e,t=h,i=r.contains.length;for(e=0;e<i;e++){let n=r.contains[e],s=t[n];if(!s){let n=p.first,a=0;for(;n&&a<i&&a<p.length;){let i=r.contains[a];if(!n.next||i!==n.next.node.name)break;if(n.next)if("number"==typeof i){let e=n.next.node.elements;if(e&&i>=e.length)if(a===p.length-1){console.log("This is actually at the current object so use that",a,r.contains,A),s=A,a++,n=n.next;break}else{if(n.next.next&&i===e.length){s=n.next.next.node.elements,n=n.next,a++,t=s;continue}s=A,a++;break}}else if(i!==n.next.node.name){s=n.next.node.elements[i],e=a;break}else s=n.next.next?n.next.next.node.elements:A;else s=s[i];n=n.next,a++}e=a<i?a-1:a}if("object"==typeof s&&!s)throw Error("Path did not resolve properly:"+r.contains+" at "+n+"("+e+")");t=s}return eB=-3,t}if(r.className&&((e=a.get(r.className))||(e=eT.get(r.className)),r.className=null,e&&e.cb))return e.cb.call(r.contains);return r.contains;default:console.log("Unhandled value conversion.",r)}}function e4(){if(-3==eB){r.value_type===v&&A.push(r.contains),eB=-1;return}r.value_type===k?(A.push(void 0),delete A[A.length-1]):A.push(e2()),e1()}function e5(){if(-3===eB&&r.value_type===T){e1(),eB=-1;return}if(r.value_type===k)return;!r.name&&eE&&(r.name=eE.fields[ew++]);let e=e2();_&&_.protoDef&&_.protoDef.cb?(e=_.protoDef.cb.call(A,r.name,e))&&(A[r.name]=e):A[r.name]=e,e1()}function e3(e){if(o!==L){switch(d&&e0("Negative outside of quotes, being converted to a string (would lose count of leading '-' characters)",e),o){case eu:switch(r.value_type){case E:r.string+="true";break;case C:r.string+="false";break;case b:r.string+="null";break;case S:r.string+="Infinity";break;case x:r.string+="-Infinity",e0("Negative outside of quotes, being converted to a string",e);break;case Q:r.string+="NaN";break;case B:r.string+="-NaN",e0("Negative outside of quotes, being converted to a string",e);break;case m:r.string+="undefined";break;case w:case y:break;default:console.log("Value of type "+r.value_type+" is not restored...")}break;case F:r.string+="t";break;case M:r.string+="tr";break;case O:r.string+="tru";break;case U:r.string+="f";break;case P:r.string+="fa";break;case $:r.string+="fal";break;case j:r.string+="fals";break;case H:r.string+="n";break;case q:r.string+="nu";break;case z:r.string+="nul";break;case V:r.string+="u";break;case G:r.string+="un";break;case Y:r.string+="und";break;case W:r.string+="unde";break;case J:r.string+="undef";break;case K:r.string+="undefi";break;case Z:r.string+="undefin";break;case X:r.string+="undefine";break;case ee:r.string+="N";break;case et:r.string+="Na";break;case ei:r.string+="I";break;case er:r.string+="In";break;case en:r.string+="Inf";break;case es:r.string+="Infi";break;case ea:r.string+="Infin";break;case eo:r.string+="Infini";break;case el:r.string+="Infinit";break;case L:case ec:case ed:break;case eh:e0("String-keyword recovery fail (after whitespace)",e)}r.value_type=w,o<ec&&(o=eu)}else o=eu,r.value_type=w;if(123==e)e6();else if(91==e)e7();else if(44==e);else{if(32==e||13==e||10==e||9==e||65279==e||8232==e||8233==e)return;44==e||125==e||93==e||58==e?e0("Invalid character near identifier",e):r.string+=i}}function e8(e){let t=0;for(;0==t&&s<eZ.length;){i=eZ.charAt(s);let a=eZ.codePointAt(s++);if(a>=65536&&(i+=eZ.charAt(s),s++),n.col++,a==e)e$?(ez?e0("Incomplete hexidecimal sequence",a):eq?e0("Incomplete long unicode sequence",a):eH&&e0("Incomplete unicode sequence",a),ej?(ej=!1,t=1):r.string+=i,e$=!1):t=1;else if(e$){if(eH){if(125==a){r.string+=String.fromCodePoint(eV),eH=!1,eq=!1,e$=!1;continue}eV*=16,a>=48&&a<=57?eV+=a-48:a>=65&&a<=70?eV+=a-65+10:a>=97&&a<=102?eV+=a-97+10:(e0("(escaped character, parsing hex of \\u)",a),t=-1,eH=!1,e$=!1);continue}if(ez||eq){if(0===eG&&123===a){eH=!0;continue}if(eG<2||eq&&eG<4){if(eV*=16,a>=48&&a<=57)eV+=a-48;else if(a>=65&&a<=70)eV+=a-65+10;else if(a>=97&&a<=102)eV+=a-97+10;else{e0(eq?"(escaped character, parsing hex of \\u)":"(escaped character, parsing hex of \\x)",a),t=-1,ez=!1,e$=!1;continue}eG++,eq?4==eG&&(r.string+=String.fromCodePoint(eV),eq=!1,e$=!1):2==eG&&(r.string+=String.fromCodePoint(eV),ez=!1,e$=!1);continue}}switch(a){case 13:ej=!0,n.col=1;continue;case 8232:case 8233:n.col=1;case 10:ej?ej=!1:n.col=1,n.line++;break;case 116:r.string+=" ";break;case 98:r.string+="\b";break;case 110:r.string+="\n";break;case 114:r.string+="\r";break;case 102:r.string+="\f";break;case 118:r.string+="\v";break;case 48:r.string+="\0";break;case 120:ez=!0,eG=0,eV=0;continue;case 117:eq=!0,eG=0,eV=0;continue;default:r.string+=i}e$=!1}else 92===a?e$?(r.string+="\\",e$=!1):(e$=!0,eV=0,eG=0):(ej&&(ej=!1,n.line++,n.col=2),r.string+=i)}return t}function e9(){let e;for(;(e=s)<eZ.length;){i=eZ.charAt(e);let a=eZ.codePointAt(s++);if(a>=256){n.col-=s-e,s=e;break}if(95!=a)if(n.col++,a>=48&&a<=57)e_&&(eL=!0),r.string+=i;else if(45==a||43==a)0!=r.string.length&&(!e_||eR||eL)?(d&&(r.string="-"+r.string,d=!1),r.string+=i,eW=!0):(45!=a||e_||(d=!d),r.string+=i,eR=!0);else if(78==a){if(o==L){eP=!1,o=ee;return}e0("fault while parsing number;",a);break}else if(73==a){if(o==L){eP=!1,o=ei;return}e0("fault while parsing number;",a);break}else if(58==a&&eW)d&&(r.string="-"+r.string,d=!1),r.string+=i,eW=!0;else if(84==a&&eW)d&&(r.string="-"+r.string,d=!1),r.string+=i,eW=!0;else if(90==a&&eW)d&&(r.string="-"+r.string,d=!1),r.string+=i,eW=!0;else if(46==a)if(eD||eN||e_){l=!1,e0("fault while parsing number;",a);break}else r.string+=i,eD=!0;else if(110==a){eJ=!0;break}else if(eN&&(a>=95&&a<=102||a>=65&&a<=70))r.string+=i;else if(120==a||98==a||111==a||88==a||66==a||79==a)if(eN||"0"!=r.string){l=!1,e0("fault while parsing number;",a);break}else eN=!0,r.string+=i;else if(101==a||69==a)if(e_){l=!1,e0("fault while parsing number;",a);break}else r.string+=i,e_=!0;else if(32==a||13==a||10==a||9==a||47==a||35==a||44==a||125==a||93==a||123==a||91==a||34==a||39==a||96==a||58==a){n.col-=s-e,s=e;break}else{t&&(l=!1,e0("fault while parsing number;",a));break}}t||s!=eZ.length?(eP=!1,r.value_type=I,eS==eA&&(eY=!0)):eP=!0}function e6(){let e,t=ef,i=null,n={};if(o>L&&o<ec&&e3(123),e=te(),eS==eA)if(o==ec||o==eu&&(e||r.string.length)){if(e&&e.protoDef&&e.protoDef.protoCon&&(n=new e.protoDef.protoCon),!e||!e.protoDef&&r.string){if(i=f.find(e=>e.name===r.string))c?(i.fields.length=0,t=em):(n=new i.protoCon,t=ey);else{function s(){}f.push(i={name:r.string,protoCon:e&&e.protoDef&&e.protoDef.protoCon||s.constructor,fields:[]}),t=em}c=!1}eE=i,o=L}else o=ec;else if(o==ec||eS===ep||eS===eg||eS==ey)if(o!=L||r.value_type==w){if(e&&e.protoDef)n=new e.protoDef.protoCon;else if(i=f.find(e=>e.name===r.string))t=ey,n={};else{function d(){}a.set(r.string,{protoCon:d.prototype.constructor,cb:null}),n=new d}o=L}else o=L;else if(eS==ef&&o==L)return e0("fault while parsing; getting field name unexpected ",D),l=!1,!1;let u=eI();return r.value_type=v,eS===eA?A=n:eS==ep?r.name=A.length:(eS==eg||eS==ey)&&(!r.name&&eE&&(r.name=eE.fields[ew++]),A[r.name]=n),u.context=eS,u.elements=A,u.name=r.name,u.current_proto=_,u.current_class=eE,u.current_class_field=ew,u.valueType=r.value_type,u.arrayType=eB,u.className=r.className,r.className=null,r.name=null,_=e,eE=i,ew=0,A=n,h||(h=A),p.push(u),e1(),eS=t,!0}function e7(){if(o>L&&o<ec&&e3(91),o==eu&&r.string.length){let e=N.findIndex(e=>e===r.string);o=L,e>=0?(eB=e,r.className=r.string,r.string=null):"ref"===r.string?(r.className=null,eB=-2):a.get(r.string)||eT.get(r.string)?r.className=r.string:e0(`Unknown type '${r.string}' specified for array`,D)}else if(eS==ef||o==ec||o==ed)return e0("Fault while parsing; while getting field name unexpected",D),l=!1,!1;{let e=eI();r.value_type=T;let t=[];if(eS==eA)A=t;else if(eS==ep)-1==eB&&A.push(t),r.name=A.length;else if(eS==eg)if(r.name||(console.log("This says it's resolved......."),eB=-3),_&&_.protoDef)if(_.protoDef.cb){let e=_.protoDef.cb.call(A,r.name,t);void 0!==e&&(t=A[r.name]=e)}else A[r.name]=t;else A[r.name]=t;e.context=eS,e.elements=A,e.name=r.name,e.current_proto=_,e.current_class=eE,e.current_class_field=ew,e.valueType=r.value_type,e.arrayType=-1==eB?-3:eB,e.className=r.className,eB=-1,r.className=null,r.name=null,_=null,eE=null,ew=0,A=t,h||(h=t),p.push(e),e1(),eS=ep}return!0}function te(){let e={protoDef:null,cls:null};return(e.protoDef=a.get(r.string))?r.className||(r.className=r.string,r.string=null):(e.protoDef=eT.get(r.string))&&!r.className&&(r.className=r.string,r.string=null),r.string&&(e.cls=f.find(e=>e.name===r.string),!e.protoDef&&!e.cls),e.protoDef||e.cls?e:null}if(!l)return -1;for(e&&e.length?((eK=eQ()).buf=e,eF.push(eK)):(eP&&(eP=!1,r.value_type=I,eS==eA&&(eY=!0),eX=1),eS!==eA&&e0("Unclosed object at end of stream.",D));l&&(eK=eF.shift());){if(s=eK.n,eZ=eK.buf,eU){let e=e8(eM);e<0?l=!1:e>0&&(eU=!1,l&&(r.value_type=w))}for(eP&&e9();!eY&&l&&s<eZ.length;){if(i=eZ.charAt(s),(D=eZ.codePointAt(s++))>=65536&&(i+=eZ.charAt(s),s++),n.col++,ek){if(1==ek)if(42==D)ek=3;else{if(47!=D)return e0("fault while parsing;",D);ek=2}else 2==ek?(10==D||13==D)&&(ek=0):3==ek?42==D&&(ek=4):ek=3*(47!=D);continue}switch(D){case 35:ek=2;break;case 47:ek=1;break;case 123:e6();break;case 91:e7();break;case 58:if(eS==ey)o=L,r.name=r.string,r.string="",r.value_type=y;else if(eS==ef||eS==em)if(eS==em){if(!Object.keys(A).length){console.log("This is a full object, not a class def...",r.className);let e=()=>{};a.set(p.last.node.current_class.name,{protoCon:e.prototype.constructor,cb:null}),A=new e,eS=eg,r.name=r.string,o=L,r.string="",r.value_type=y,console.log("don't do default;s do a revive...")}}else o!=L&&o!=eu&&o!=ec&&o!=ed&&e3(32),o=L,r.name=r.string,r.string="",eS=eS===ef?eg:eb,r.value_type=y;else eS==eA?(console.log("Override colon found, allow class redefinition",eS),c=!0):(eS==ep?e0("(in array, got colon out of string):parsing fault;",D):eS==eg?e0("String unexpected",D):e0("(outside any object, got colon out of string):parsing fault;",D),l=!1);break;case 125:if(o==eu&&(o=L),eS==em)if(eE){r.string&&eE.fields.push(r.string),e1();let e=p.pop();eS=eA,o=L,r.name=e.name,A=e.elements,eE=e.current_class,ew=e.current_class_field,eB=e.arrayType,r.value_type=e.valueType,r.className=e.className,h=null,ev(e)}else e0("State error; gathering class fields, and lost the class",D);else if(eS==ef||eS==ey){r.value_type!=y&&(eE&&(r.name=eE.fields[ew++]),e5()),r.value_type=v,_&&_.protoDef&&(console.log("SOMETHING SHOULD AHVE BEEN REPLACED HERE??",_),console.log("The other version only revives on init"),A=new _.protoDef.cb(A,void 0,void 0)),r.contains=A,r.string="";let e=p.pop();eS=e.context,r.name=e.name,A=e.elements,eE=e.current_class,_=e.current_proto,ew=e.current_class_field,eB=e.arrayType,r.value_type=e.valueType,r.className=e.className,ev(e),eS==eA&&(eY=!0)}else if(eS==eg){r.value_type===y&&e0("Fault while parsing; unexpected",D),e5(),r.value_type=v,r.contains=A,o=L;let e=p.pop();eS=e.context,r.name=e.name,A=e.elements,_=e.current_proto,eE=e.current_class,ew=e.current_class_field,eB=e.arrayType,r.value_type=e.valueType,r.className=e.className,ev(e),eS==eA&&(eY=!0)}else e0("Fault while parsing; unexpected",D),l=!1;d=!1;break;case 93:if(o>=ed&&(o=L),eS==ep){r.value_type!=y&&e4(),r.contains=A;{let e=p.pop();r.name=e.name,r.className=e.className,eS=e.context,A=e.elements,_=e.current_proto,eE=e.current_class,ew=e.current_class_field,eB=e.arrayType,r.value_type=e.valueType,ev(e)}r.value_type=T,eS==eA&&(eY=!0)}else e0(`bad context ${eS}; fault while parsing`,D),l=!1;d=!1;break;case 44:o<ed&&o!=L&&e3(D),(o==eu||o==ec)&&(o=L),eS==em?eE?(eE.fields.push(r.string),r.string="",o=ec):e0("State error; gathering class fields, and lost the class",D):eS==ef?eE?(r.name=eE.fields[ew++],r.value_type!=y&&(e5(),e1())):(r.string||r.value_type)&&e0("State error; comma in field name and/or lost the class",D):eS==ey?(eE?(-3==eB||r.name||(r.name=eE.fields[ew++]),r.value_type!=y&&(-3!=eB&&e5(),e1())):r.value_type!=y&&(e5(),e1()),r.name=null):eS==ep?(r.value_type==y&&(r.value_type=k),e4(),e1(),o=L):eS==eg&&r.value_type!=y?(eS=ef,r.value_type!=y&&(e5(),e1()),o=L):(l=!1,e0("bad context; excessive commas while parsing;",D)),d=!1;break;default:switch(D){default:if(eS==eA||eS==eg&&o==ec||eS==ef||o==ec||eS==em)switch(D){case 96:case 34:case 39:o==L||o==ec?(r.string.length&&(console.log("IN ARRAY AND FIXING?"),r.className=r.string,r.string=""),e8(D)?r.value_type=w:(eM=D,eU=!0)):e0("fault while parsing; quote not at start of field name",D);break;case 10:n.line++,n.col=1;case 13:case 32:case 8232:case 8233:case 9:case 65279:if(eS===eA&&o===eu){o=L,eS===eA&&(eY=!0);break}if(o===L||o===ed)eS==eA&&r.value_type&&(eY=!0);else if(o===ec){if(eS===eA){o=L,eY=!0;break}r.string.length&&console.log("STEP TO NEXT TOKEN."),o=ed}else l=!1,e0("fault while parsing; whitepsace unexpected",D);break;default:if(o==L&&(D>=48&&D<=57||43==D||46==D||45==D)){eN=!1,e_=!1,eW=!1,eJ=!1,eR=!1,eL=!1,eD=!1,r.string=i,eK.n=s,e9();break}if(o===ed&&(l=!1,e0("fault while parsing; character unexpected",D)),o===L){o=ec,r.value_type=w,r.string+=i;break}if(r.value_type==y)o!==L&&o!==eu&&e3(D);else{if(o===eu||o===ec){r.string+=i;break}if(eS==ef){if(o==ec){r.string+=i;break}e0("Multiple values found in field name",D)}eS==eg&&e0("String unexpected",D)}}else o==L&&(D>=48&&D<=57||43==D||46==D||45==D)?(eN=!1,e_=!1,eW=!1,eJ=!1,eR=!1,eL=!1,eD=!1,r.string=i,eK.n=s,e9()):r.value_type==y?o!=L?e3(D):(o=eu,r.string+=i,r.value_type=w):eS==ef?e0("Multiple values found in field name",D):eS==eg?(r.value_type!=w&&((r.value_type==v||r.value_type==T)&&e0("String unexpected",D),e3(D)),o==ed?te()?r.string=i:e0("String unexpected",D):o==eu?r.string+=i:e0("String unexpected",D)):eS==ep&&(o==ed?(r.className||(r.className=r.string,r.string=""),r.string+=i):o==eu&&(r.string+=i));break;case 96:case 34:case 39:r.string&&(r.className=r.string),r.string="",e8(D)?(r.value_type=w,o=eu):(eM=D,eU=!0);break;case 10:n.line++,n.col=1;case 32:case 9:case 13:case 8232:case 8233:case 65279:if(o==eu){if(eS==eA){o=L,eY=!0;break}else if(eS==eg){o=eh;break}else if(eS==ef){o=ed;break}else if(eS==ep){o=ed;break}}o==L||o==ed||(o==ec?r.string.length&&(o=ed):o<eu&&e3(D));break;case 116:o==L?o=F:o==eo?o=el:e3(D);break;case 114:o==F?o=M:e3(D);break;case 117:o==M?o=O:o==H?o=q:o==L?o=V:e3(D);break;case 101:o==O?(r.value_type=E,o=eu):o==j?(r.value_type=C,o=eu):o==Y?o=W:o==Z?o=X:e3(D);break;case 110:o==L?o=H:o==V?o=G:o==K?o=Z:o==ei?o=er:o==es?o=ea:e3(D);break;case 100:o==G?o=Y:o==X?(r.value_type=m,o=eu):e3(D);break;case 105:o==J?o=K:o==en?o=es:o==ea?o=eo:e3(D);break;case 108:o==q?o=z:o==z?(r.value_type=b,o=eu):o==P?o=$:e3(D);break;case 102:o==L?o=U:o==W?o=J:o==er?o=en:e3(D);break;case 97:o==U?o=P:o==ee?o=et:e3(D);break;case 115:o==$?o=j:e3(D);break;case 73:o==L?o=ei:e3(D);break;case 78:o==L?o=ee:o==et?(r.value_type=d?B:Q,d=!1,o=eu):e3(D);break;case 121:o==el?(r.value_type=d?x:S,d=!1,o=eu):e3(D);break;case 45:o==L?d=!d:e3(D);break;case 43:o!==L&&e3(D)}}if(eY){o==eu&&(o=L);break}}if(s==eZ.length?(ex(eK),eU||eP||eS==ef?eX=0:eS==eA&&(r.value_type!=y||u)&&(eY=!0,eX=1)):(eK.n=s,eF.unshift(eK),eX=2),eY){h=null;break}}return l?(eY&&r.value_type!=y&&(o=L,u=e2(),d=!1,r.string="",r.value_type=y),eY=!1,eX):-1}}};let eD=[Object.freeze(f.begin())],e_=0;function eR(){return this&&this.valueOf()}f.parse=function(e,t){let i,r=e_++;eD.length<=r&&eD.push(Object.freeze(f.begin())),i=eD[r],"string"!=typeof e&&(e=String(e)),i.reset();let n=i._write(e,!0);if(n>0){let e=i.value();if(void 0===e&&n>1)throw Error("Pending value could not complete");return e="function"==typeof t?function e(i,r){let n,s,a=i[r];if(a&&"object"==typeof a)for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(void 0!==(s=e(a,n))?a[n]=s:delete a[n]);return t.call(i,r,a)}({"":e},""):e,e_--,e}i.finalError()},f.defineClass=function(e,t){let i,r=Object.keys(t);for(let e=1;e<r.length;e++){let t,i;(t=r[e-1])>(i=r[e])&&(r[e-1]=i,r[e]=t,e?e-=2:e--)}eN.push(i={name:e,tag:r.toString(),proto:Object.getPrototypeOf(t),fields:Object.keys(t)});for(let e=1;e<i.fields.length;e++)if(i.fields[e]<i.fields[e-1]){let t=i.fields[e-1];i.fields[e-1]=i.fields[e],i.fields[e]=t,e>1&&(e-=2)}i.proto===Object.getPrototypeOf({})&&(i.proto=null)},f.toJSOX=f.registerToJSOX=function(e,t,i){if(t.prototype&&t.prototype===Object.prototype){let r=Object.keys(t).toString();if(ek.get(r))throw Error("Existing toJSOX has been registered for object type");ek.set(r,{external:!0,name:e,cb:i})}else{if(eS.get(t.prototype))throw Error("Existing toJSOX has been registered for prototype");eS.set(t.prototype,{external:!0,name:e||i.constructor.name,cb:i})}},f.fromJSOX=function(e,t,i){function r(){}if(t||(t=r.prototype),eT.get(e))throw Error("Existing fromJSOX has been registered for prototype");if(t&&!("constructor"in t))throw Error("Please pass a prototype like thing...");eT.set(e,{protoCon:t.prototype.constructor,cb:i})},f.registerFromJSOX=function(e,t){throw Error("deprecated; please adjust code to use fromJSOX:"+e+t.toString())},f.addType=function(e,t,i,r){f.toJSOX(e,t,i),f.fromJSOX(e,t,r)},f.registerToFrom=function(e,t){throw Error("registerToFrom deprecated; please use addType:"+e+t.toString())},f.stringifier=function(){let e=[],t='"',i=new WeakMap,r=[],n=[],s=new WeakMap,a=new Map,o=null,l=[],c=!1;function d(e){return"string"==typeof e&&""===e?'""':"number"!=typeof e||isNaN(e)?e.includes("\uFEFF")||e in eE||/[0-9\-]/.test(e[0])||/[\n\r\t #\[\]{}()<>\~!+*/.:,\-"'`]/.test(e)?t+f.escape(e)+t:e:"'"+e.toString()+"'"}eS.get(Object.prototype)||(eS.set(Object.prototype,{external:!1,name:Object.prototype.constructor.name,cb:null}),eS.set(Date.prototype,{external:!1,name:"Date",cb:function(){if(-621672192e5===this.getTime())return"0000-01-01T00:00:00.000Z";let e=-this.getTimezoneOffset(),t=e>=0?"+":"-",i=function(e){let t=Math.floor(Math.abs(e));return(t<10?"0":"")+t},r=function(e){let t=Math.floor(Math.abs(e));return(t<100?"0":"")+(t<10?"0":"")+t};return this.getFullYear()+"-"+i(this.getMonth()+1)+"-"+i(this.getDate())+"T"+i(this.getHours())+":"+i(this.getMinutes())+":"+i(this.getSeconds())+"."+r(this.getMilliseconds())+t+i(e/60)+":"+i(e%60)}}),eS.set(eC.prototype,{external:!1,name:"DateNS",cb:function(){let e=-this.getTimezoneOffset(),t=e>=0?"+":"-",i=function(e){let t=Math.floor(Math.abs(e));return(t<10?"0":"")+t},r=function(e){let t=Math.floor(Math.abs(e));return(t<100?"0":"")+(t<10?"0":"")+t},n=function(e){let t=Math.floor(Math.abs(e));return(t<1e5?"0":"")+(t<1e4?"0":"")+(t<1e3?"0":"")+(t<100?"0":"")+(t<10?"0":"")+t};return this.getFullYear()+"-"+i(this.getMonth()+1)+"-"+i(this.getDate())+"T"+i(this.getHours())+":"+i(this.getMinutes())+":"+i(this.getSeconds())+("."+r(this.getMilliseconds()))+n(this.ns)+t+i(e/60)+":"+i(e%60)}}),eS.set(Boolean.prototype,{external:!1,name:"Boolean",cb:eR}),eS.set(Number.prototype,{external:!1,name:"Number",cb:function(){return isNaN(this)?"NaN":isFinite(this)?String(this):this<0?"-Infinity":"Infinity"}}),eS.set(String.prototype,{external:!1,name:"String",cb:function(){return'"'+f.escape(eR.apply(this))+'"'}}),"function"==typeof BigInt&&eS.set(BigInt.prototype,{external:!1,name:"BigInt",cb:function(){return this+"n"}}),eS.set(ArrayBuffer.prototype,{external:!0,name:"ab",cb:function(){return"["+d(eM(this))+"]"}}),eS.set(Uint8Array.prototype,{external:!0,name:"u8",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Uint8ClampedArray.prototype,{external:!0,name:"uc8",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Int8Array.prototype,{external:!0,name:"s8",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Uint16Array.prototype,{external:!0,name:"u16",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Int16Array.prototype,{external:!0,name:"s16",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Uint32Array.prototype,{external:!0,name:"u32",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Int32Array.prototype,{external:!0,name:"s32",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Float32Array.prototype,{external:!0,name:"f32",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Float64Array.prototype,{external:!0,name:"f64",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(Float64Array.prototype,{external:!0,name:"f64",cb:function(){return"["+d(eM(this.buffer))+"]"}}),eS.set(RegExp.prototype,_={external:!0,name:"regex",cb:function(e,t){return"'"+escape(this.source)+"'"}}),eT.set("regex",{protoCon:RegExp,cb:function(e,t){return new RegExp(this)}}),eS.set(Map.prototype,_={external:!0,name:"map",cb:null}),eT.set("map",{protoCon:Map,cb:function(e,t){return e?void this.set(e,t):this}}),eS.set(Array.prototype,D={external:!1,name:Array.prototype.constructor.name,cb:null}));let u={defineClass(t,i){let r,n=Object.keys(i);for(let e=1;e<n.length;e++){let t,i;(t=n[e-1])>(i=n[e])&&(n[e-1]=i,n[e]=t,e?e-=2:e--)}e.push(r={name:t,tag:n.toString(),proto:Object.getPrototypeOf(i),fields:Object.keys(i)});for(let e=1;e<r.fields.length;e++)if(r.fields[e]<r.fields[e-1]){let t=r.fields[e-1];r.fields[e-1]=r.fields[e],r.fields[e]=t,e>1&&(e-=2)}r.proto===Object.getPrototypeOf({})&&(r.proto=null)},setDefaultObjectToJSOX(e){o=e},isEncoding:e=>!!n.find((t,i)=>t===e&&i<n.length-1),encodeObject(e){return o?o.apply(e,[this]):e},stringify:(e,t,i)=>g(e,t,i),setQuote(e){t=e},registerToJSOX(e,t,i){return this.toJSOX(e,t,i)},toJSOX(e,t,i){if(t.prototype&&t.prototype!==Object.prototype){if(s.get(t.prototype))throw Error("Existing toJSOX has been registered for prototype");s.set(t.prototype,{external:!0,name:e||i.constructor.name,cb:i})}else{let r=Object.keys(t).toString();if(a.get(r))throw Error("Existing toJSOX has been registered for object type");a.set(r,{external:!0,name:e,cb:i})}},get ignoreNonEnumerable(){return c},set ignoreNonEnumerable(val){c=val}};return u;function h(e){if(null===e)return;let t=i.get(e);return t?"ref"+t:void i.set(e,A.stringify(r))}function p(t,i){let r,n,s=Object.getPrototypeOf(t);if(n=e.find(e=>{if(e.proto&&e.proto===s)return!0}))return n;if(e.length||eN.length){if(i)r=(i=i.map(e=>"string"==typeof e?e:void 0)).toString();else{let e=Object.keys(t);for(let t=1;t<e.length;t++){let i,r;(i=e[t-1])>(r=e[t])&&(e[t-1]=r,e[t]=i,t?t-=2:t--)}r=e.toString()}(n=e.find(e=>{if(e.tag===r)return!0}))||(n=eN.find(e=>{if(e.tag===r)return!0}))}return n}function g(t,A,f){let g,m,y,b;if(void 0===t)return"undefined";if(null===t)return;let E=typeof f,C=typeof A;if(g="",m="","number"===E)for(b=0;b<f;b+=1)m+=" ";else"string"===E&&(m=f);if(y=A,A&&"function"!==C&&("object"!==C||"number"!=typeof A.length))throw Error("JSOX.stringify");r.length=0,i=new WeakMap;let w=I("",{"":t});return eN.length=0,w;function I(t,i){var A=g;let f=D.cb,b=_.cb;D.cb=C,_.cb=w;let E=v(t,i);return D.cb=f,_.cb=b,E;function C(){let e=[],t=r.length;for(let i=0;i<this.length;i+=1)r[t]=i,e[i]=I(i,this)||"null";return r.length=t,n.length=t,0===e.length?"[]":g?"[\n"+g+e.join(",\n"+g)+"\n"+A+"]":"["+e.join(",")+"]"}function w(){let e={tmp:null},t="{",i=!0;for(let[n,s]of this){e.tmp=s;let a=r.length;r[a]=n,t+=(i?"":",")+d(n)+":"+I("tmp",e),r.length=a,i=!1}return t+"}"}function v(t,i){let f,b,E,C,w,v,B,Q=r.length,x=!0,S=i[t],k="object"==typeof S;k&&null!==S&&o&&!l.find(e=>e===S)&&(l.push(S),n[Q]=S,x=!1,k="object"==typeof(S=o.apply(S,[u])),l.pop(),n.length=Q,k="object"==typeof S);let T=null!=S&&Object.getPrototypeOf(S),N=T&&(s.get(T)||eS.get(T)||null),D=!N&&null!=S&&(a.get(Object.keys(S).toString())||ek.get(Object.keys(S).toString())||null);"function"==typeof y&&(x=!1,S=y.call(i,t,S));let _=N&&N.cb||D&&D.cb;if(null!=S&&"object"==typeof S&&"function"==typeof _)if(l.find(e=>e===S))E=h(S);else{if("object"==typeof S&&(E=h(S)))return E;l.push(S),n[Q]=S,S=_.call(S,u),x=!1,l.pop(),N&&N.name&&"string"==typeof S&&"-"!==S[0]&&(S[0]<"0"||S[0]>"9")&&'"'!==S[0]&&"'"!==S[0]&&"`"!==S[0]&&"["!==S[0]&&"{"!==S[0]&&(S=" "+S),n.length=Q}else if("object"==typeof S&&(E=h(S)))return E;switch(typeof S){case"bigint":return S+"n";case"string":{S=x?d(S):S;let i="";if(""===t&&(i=e.map(e=>e.name+"{"+e.fields.join(",")+"}").join(g?"\n":"")+eN.map(e=>e.name+"{"+e.fields.join(",")+"}").join(g?"\n":"")+(g?"\n":"")),N&&N.external)return i+N.name+S;if(D&&D.external)return i+D.name+S;return i+S}case"number":case"boolean":case"null":return String(S);case"object":if(E)return"ref"+E;if(!S)return"null";if(g+=m,w=null,v=[],y&&"object"==typeof y){for(f=0,C=y.length,w=p(S,y);f<C;f+=1)"string"==typeof y[f]&&(b=y[f],r[Q]=b,void 0!==(E=I(b,S))&&(w?v.push(E):v.push(d(b)+(g?": ":":")+E)));r.splice(Q,1)}else{w=p(S);let e=[];for(b in S)if((!c||Object.prototype.propertyIsEnumerable.call(S,b))&&Object.prototype.hasOwnProperty.call(S,b)){let t;for(t=0;t<e.length;t++)if(e[t]>b){e.splice(t,0,b);break}t==e.length&&e.push(b)}for(let t=0;t<e.length;t++)b=e[t],Object.prototype.hasOwnProperty.call(S,b)&&(r[Q]=b,void 0!==(E=I(b,S))&&(w?v.push(E):v.push(d(b)+(g?": ":":")+E)));r.splice(Q,1)}B=""===t?(e.map(e=>e.name+"{"+e.fields.join(",")+"}").join(g?"\n":"")||eN.map(e=>e.name+"{"+e.fields.join(",")+"}").join(g?"\n":""))+(g?"\n":""):"",N&&N.external&&(B+=d(N.name));let R=null;return w&&(R=d(w.name)),E=B+(0===v.length?"{}":g?(w?R:"")+"{\n"+g+v.join(",\n"+g)+"\n"+A+"}":(w?R:"")+"{"+v.join(",")+"}"),g=A,E}}}}};let eL="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789$_",eF={"~":-1,"=":-1,$:62,_:63,"+":62,"-":62,".":62,"/":63,",":63};for(let e=0;e<eL.length;e++)eF[eL[e]]=e;function eM(e){let t,i,r,n,s,a="",o=new Uint8Array(e),l=o.byteLength,c=l%3,d=l-c;for(let e=0;e<d;e+=3)t=(0xfc0000&(s=o[e]<<16|o[e+1]<<8|o[e+2]))>>18,i=(258048&s)>>12,r=(4032&s)>>6,n=63&s,a+=eL[t]+eL[i]+eL[r]+eL[n];return 1==c?(t=(252&(s=o[d]))>>2,i=(3&s)<<4,a+=eL[t]+eL[i]+"=="):2==c&&(t=(64512&(s=o[d]<<8|o[d+1]))>>10,i=(1008&s)>>4,r=(15&s)<<2,a+=eL[t]+eL[i]+eL[r]+"="),a}function eO(e){let t,i,r=new ArrayBuffer(t=e.length%4==1?((e.length+3)/4|0)*3-3:e.length%4==2?((e.length+3)/4|0)*3-2:e.length%4==3?((e.length+3)/4|0)*3-1:-1==eF[e[e.length-3]]?((e.length+3)/4|0)*3-3:-1==eF[e[e.length-2]]?((e.length+3)/4|0)*3-2:-1==eF[e[e.length-1]]?((e.length+3)/4|0)*3-1:((e.length+3)/4|0)*3),n=new Uint8Array(r),s=e.length+3>>2;for(i=0;i<s;i++){let t=eF[e[4*i]],r=4*i+1<e.length?eF[e[4*i+1]]:-1,s=r>=0&&4*i+2<e.length?eF[e[4*i+2]]:-1,a=s>=0&&4*i+3<e.length?eF[e[4*i+3]]:-1;r>=0&&(n[3*i+0]=t<<2|r>>4),s>=0&&(n[3*i+1]=r<<4|s>>2&15),a>=0&&(n[3*i+2]=s<<6|63&a)}return r}function eU({propsString:e}){let t={},i="",r=!0;for(let n=0;n<e.length;n++){let s=e[n];if(r)"="===s||" "===s?i&&(" "===s?(t[i]=!0,i=""):r=!1):i+=s;else{let s=eP(e,n);t[i]=s.value,n=s.newIndex,i="",r=!0}}return i&&(t[i]=!0),t}function eP(e,t){let i=e[t];return'"'===i?ej(e,t):"'"===i?ej(e,t,!0):"{"===i?eH(e,t):"["===i?e$(e,t):ez(e,t)}function e$(e,t){let i=1,r="",n=t+1;for(;n<e.length&&i>0;)"["===e[n]?i++:"]"===e[n]&&i--,i>0&&(r+=e[n]),n++;return{newIndex:n,value:f.parse(`[${r}]`)}}function ej(e,t,i=!1){let r="",n=t+1;for(;n<e.length&&(e[n]!==(i?"'":'"')||"\\"===e[n-1]);)r+=e[n],n++;return{newIndex:n,value:r}}function eH(e,t){let i=1,r="",n=t+1;for(;n<e.length&&i>0;)"{"===e[n]?i++:"}"===e[n]&&i--,i>0&&(r+=e[n]),n++;return{newIndex:n,value:eq(r)}}function eq(e){return"{"!==e[0]?f.parse(e):f.parse(e.replace(/(\w+):/g,'"$1":'))}function ez(e,t){let i="",r=t;for(;r<e.length&&" "!==e[r];)i+=e[r],r++;return{newIndex:r-1,value:i}}function eV({props:e}){let t=[];for(let[i,r]of Object.entries(e))"string"==typeof r?t.push(`${i}="${eG(r)}"`):"number"==typeof r?t.push(`${i}={${r}}`):"boolean"==typeof r?r&&t.push(`${i}`):null!==r&&"object"==typeof r&&(Array.isArray(r)?t.push(`${i}={[${r.map(e=>JSON.stringify(e,eY)).join(", ")}]}`):t.push(`${i}={${JSON.stringify(r,eY)}}`));return t.join(" ")}function eG(e){return e.replace(/"/g,""")}function eY(e,t){return"string"==typeof t?t.replace(/'/g,"\\'"):t}Object.freeze(eF),f.stringify=function(e,t,i){return f.stringifier().stringify(e,t,i)},[[0,256,[0xffd9ff,0xff6aff,130048,3670016,0,0xfffff8,0xffffff,8388607]]].map(e=>({firstChar:e[0],lastChar:e[1],bits:e[2]}));var eW=u;function eJ(e){let t=(0,eW.createEditor)(e);return t._headless=!0,["registerDecoratorListener","registerRootListener","registerMutationListener","getRootElement","setRootElement","getElementByKey","focus","blur"].forEach(e=>{t[e]=()=>{throw Error(`${e} is not supported in headless mode`)}}),t}var eK=u,eZ=e.i(824980),eX=e.i(549471),e0=u;let e1={markdownFormatKind:null,regEx:/(?:)/,regExForAutoFormatting:/(?:)/,requiresParagraphStart:!1},e2={...e1,requiresParagraphStart:!0};function e4(e){return(t,i)=>(0,eX.$isHeadingNode)(t)&&t.getTag()==="h"+e?"#".repeat(e)+" "+i(t):null}e4(1),e4(2),e4(3),e4(4),e4(5),e4(6);function e5(e,t){let i={};for(let r of e){let e=t(r);e&&(i[e]?i[e].push(r):i[e]=[r])}return i}function e3(e){let t=e5(e,e=>e.type);return{element:t.element||[],multilineElement:t["multiline-element"]||[],textFormat:t["text-format"]||[],textMatch:t["text-match"]||[]}}let e8=/[!-/:-@[-`{-~\s]/,e9=/^\s{0,3}$/;function e6(e){if(!(0,e0.$isParagraphNode)(e))return!1;let t=e.getFirstChild();return null==t||1===e.getChildrenSize()&&(0,e0.$isTextNode)(t)&&e9.test(t.getTextContent())}function e7(e,t=!1){let i=e3(e),r=[...i.multilineElement,...i.element],n=!t,s=i.textFormat.filter(e=>1===e.format.length).sort((e,t)=>e.format.includes("code")&&!t.format.includes("code")?1:!e.format.includes("code")&&t.format.includes("code")?-1:0);return e=>{let t=[],a=(e||(0,eK.$getRoot)()).getChildren();return a.forEach((e,o)=>{let l=te(e,r,s,i.textMatch);null!=l&&t.push(n&&o>0&&!e6(e)&&!e6(a[o-1])?"\n".concat(l):l)}),t.join("\n")}}function te(e,t,i,r){for(let n of t){if(!n.export)continue;let t=n.export(e,e=>tt(e,i,r));if(null!=t)return t}return(0,eK.$isElementNode)(e)?tt(e,i,r):(0,eK.$isDecoratorNode)(e)?e.getTextContent():null}function tt(e,t,i,r,n){let s=[],a=e.getChildren();r||(r=[]),n||(n=[]);t:for(let e of a){for(let a of i){if(!a.export)continue;let o=a.export(e,e=>tt(e,t,i,r,[...n,...r]),(e,i)=>ti(e,i,t,r,n));if(null!=o){s.push(o);continue t}}(0,eK.$isLineBreakNode)(e)?s.push("\n"):(0,eK.$isTextNode)(e)?s.push(ti(e,e.getTextContent(),t,r,n)):(0,eK.$isElementNode)(e)?s.push(tt(e,t,i,r,n)):(0,eK.$isDecoratorNode)(e)&&s.push(e.getTextContent())}return s.join("")}function ti(e,t,i,r,n){let s=t.trim(),a=s;e.hasFormat("code")||(a=a.replace(/([*_`~\\])/g,"\\$1"));let o="",l="",c="",d=tr(e,!0),u=tr(e,!1),h=new Set;for(let t of i){let i=t.format[0],n=t.tag;tn(e,i)&&!h.has(i)&&(h.add(i),tn(d,i)&&r.find(e=>e.tag===n)||(r.push({format:i,tag:n}),o+=n))}for(let t=0;t<r.length;t++){let i=r[t],s=tn(e,i.format),a=tn(u,i.format);if(s&&a)continue;let o=[...r];for(;o.length>t;){let e=o.pop();n&&e&&n.find(t=>t.tag===e.tag)||(e&&"string"==typeof e.tag&&(s?a||(c+=e.tag):l+=e.tag),r.pop())}break}return a=o+a+c,l+t.replace(s,()=>a)}function tr(e,t){let i=t?e.getPreviousSibling():e.getNextSibling();if(!i){let r=e.getParentOrThrow();r.isInline()&&(i=t?r.getPreviousSibling():r.getNextSibling())}for(;i;){if((0,eK.$isElementNode)(i)){if(!i.isInline())break;let e=t?i.getLastDescendant():i.getFirstDescendant();if((0,eK.$isTextNode)(e))return e;i=t?i.getPreviousSibling():i.getNextSibling()}if((0,eK.$isTextNode)(i))return i;if(!(0,eK.$isElementNode)(i))break}return null}function tn(e,t){return(0,eK.$isTextNode)(e)&&e.hasFormat(t)}var ts=eZ,ta=eX,to=u,tl=u;function tc(e,t){let i=td(e.getTextContent(),t);if(!i)return null;let r=i.index||0,n=r+i[0].length,s=t.transformersByTag[i[1]];return{endIndex:n,match:i,startIndex:r,transformer:s}}function td(e,t){let i=e.match(t.openTagsRegExp);if(null==i)return null;for(let r of i){let i=r.replace(/^\s/,""),n=t.fullMatchRegExpByTag[i];if(null==n)continue;let s=e.match(n),a=t.transformersByTag[i];if(null!=s&&null!=a){if(!1!==a.intraword)return s;let{index:t=0}=s,i=e[t-1],r=e[t+s[0].length];if((!i||e8.test(i))&&(!r||e8.test(r)))return s}}return null}function tu(e,t,i,r,n){let s,a,o,l=e.getTextContent();if(n[0]===l?o=e:0===t?[o,s]=e.splitText(i):[a,o,s]=e.splitText(t,i),o.setTextContent(n[2]),r)for(let e of r.format)o.hasFormat(e)||o.toggleFormat(e);return{nodeAfter:s,nodeBefore:a,transformedNode:o}}function th(e,t){let i,r,n,s,a=e;for(let e of t){if(!e.replace||!e.importRegExp)continue;let t=a.getTextContent().match(e.importRegExp);if(!t)continue;let o=t.index||0,l=e.getEndIndex?e.getEndIndex(a,t):o+t[0].length;!1!==l&&(void 0===i||void 0===r||o<i&&l>r)&&(i=o,r=l,n=e,s=t)}return void 0===i||void 0===r||void 0===n||void 0===s?null:{endIndex:r,match:s,startIndex:i,transformer:n}}function tA(e,t,i,r,n){let s,a,o;return(0===t?[o,s]=e.splitText(i):[a,o,s]=e.splitText(t,i),r.replace)?{nodeAfter:s,nodeBefore:a,transformedNode:(o?r.replace(o,n):void 0)||void 0}:null}function tp(e,t,i){let r=tc(e,t),n=th(e,i);if(r&&n&&(r.startIndex<=n.startIndex&&r.endIndex>=n.endIndex?n=null:r=null),r){let n=tu(e,r.startIndex,r.endIndex,r.transformer,r.match);n.nodeAfter&&(0,tl.$isTextNode)(n.nodeAfter)&&!n.nodeAfter.hasFormat("code")&&tp(n.nodeAfter,t,i),n.nodeBefore&&(0,tl.$isTextNode)(n.nodeBefore)&&!n.nodeBefore.hasFormat("code")&&tp(n.nodeBefore,t,i),n.transformedNode&&(0,tl.$isTextNode)(n.transformedNode)&&!n.transformedNode.hasFormat("code")&&tp(n.transformedNode,t,i)}else if(n){let r=tA(e,n.startIndex,n.endIndex,n.transformer,n.match);if(!r)return;r.nodeAfter&&(0,tl.$isTextNode)(r.nodeAfter)&&!r.nodeAfter.hasFormat("code")&&tp(r.nodeAfter,t,i),r.nodeBefore&&(0,tl.$isTextNode)(r.nodeBefore)&&!r.nodeBefore.hasFormat("code")&&tp(r.nodeBefore,t,i),r.transformedNode&&(0,tl.$isTextNode)(r.transformedNode)&&!r.transformedNode.hasFormat("code")&&tp(r.transformedNode,t,i)}let s=e.getTextContent().replace(/\\([*_`~])/g,"$1");e.setTextContent(s)}function tf(e,t=!1){let i=e3(e),r=ty(i.textFormat);return(e,n)=>{let s=e.split("\n"),a=s.length,o=n||(0,to.$getRoot)();o.clear();for(let e=0;e<a;e++){let t=s[e],[n,a]=tg(s,e,i.multilineElement,o);if(n){e=a;continue}tm(t,o,i.element,r,i.textMatch)}for(let e of o.getChildren())!t&&e6(e)&&o.getChildrenSize()>1&&e.remove();null!==(0,to.$getSelection)()&&o.selectStart()}}function tg(e,t,i,r){for(let n of i){let{handleImportAfterStartMatch:i,regExpEnd:s,regExpStart:a,replace:o}=n,l=e[t]?.match(a);if(!l)continue;if(i){let s=i({lines:e,rootNode:r,startLineIndex:t,startMatch:l,transformer:n});if(null===s)continue;if(s)return s}let c="object"==typeof s&&"regExp"in s?s.regExp:s,d=s&&"object"==typeof s&&"optional"in s?s.optional:!s,u=t,h=e.length;for(;u<h;){let i=c?e[u]?.match(c):null;if(!i&&(!d||d&&u<h-1)||i&&t===u&&i.index===l.index){u++;continue}let n=[];if(i&&t===u)n.push(e[t].slice(l[0].length,-i[0].length));else for(let r=t;r<=u;r++){let s=e[r];if(r===t){let e=s.slice(l[0].length);n.push(e)}else if(r===u&&i){let e=s.slice(0,-i[0].length);n.push(e)}else n.push(s)}if(!1!==o(r,null,l,i,n,!0))return[!0,u];break}}return[!1,t]}function tm(e,t,i,r,n){let s=(0,to.$createTextNode)(e),a=(0,to.$createParagraphNode)();for(let{regExp:r,replace:n}of(a.append(s),t.append(a),i)){let t=e.match(r);if(t&&(s.setTextContent(e.slice(t[0].length)),!1!==n(a,[s],t,!0)))break}if(tp(s,r,n),a.isAttached()&&e.length>0){let e=a.getPreviousSibling();if((0,to.$isParagraphNode)(e)||(0,ta.$isQuoteNode)(e)||(0,ts.$isListNode)(e)){let t=e;if((0,ts.$isListNode)(e)){let i=e.getLastDescendant();t=null==i?null:(0,to.$findMatchingParent)(i,ts.$isListItemNode)}null!=t&&t.getTextContentSize()>0&&(t.splice(t.getChildrenSize(),0,[(0,to.$createLineBreakNode)(),...a.getChildren()]),a.remove())}}}function ty(e){let t={},i={},r=[],n="(?<![\\\\])";for(let n of e){let{tag:e}=n;t[e]=n;let s=e.replace(/([*^+])/g,"\\$1");r.push(s),1===e.length?i[e]=RegExp(`(?<![\\\\${s}])(${s})((\\\\${s})?.*?[^${s}\\s](\\\\${s})?)((?<!\\\\)|(?<=\\\\\\\\))(${s})(?![\\\\${s}])`):i[e]=RegExp(`(?<!\\\\)(${s})((\\\\${s})?.*?[^\\s](\\\\${s})?)((?<!\\\\)|(?<=\\\\\\\\))(${s})(?!\\\\)`)}return{fullMatchRegExpByTag:i,openTagsRegExp:RegExp(`${n}(${r.join("|")})`,"g"),transformersByTag:t}}var tb=eZ,tE=eX,tC=u;let tw=/^[\t ]*$/,tI=/^(\s*)(\d+)\.\s/,tv=/^(\s*)[-*+]\s/,tB=/^(\s*)(?:-\s)?\s?(\[(\s|x)?\])\s/i,tQ=/^(#{1,6})\s/,tx=/^>\s/,tS=/^[ \t]*(\\`\\`\\`|```)(\w+)?/,tk=/[ \t]*(\\`\\`\\`|```)$/,tT=/^[ \t]*```[^`]+(?:(?:`{1,2}|`{4,})[^`]+)*```(?:[^`]|$)/,tN=/^\|(.+)\|\s?$/,tD=/^(\| ?:?-*:? ?)+\|\s?$/,t_=/^[ \t]*<[a-z_][\w-]*(?:\s[^<>]*)?\/?>/i,tR=/^[ \t]*<\/[a-z_][\w-]*\s*>/i,tL=e=>(t,i,r)=>{let n=e(r);n.append(...i),t.replace(n),n.select(0,0)},tF=4;function tM(e){let t=e.match(/\t/g),i=e.match(/ /g),r=0;return t&&(r+=t.length),i&&(r+=Math.floor(i.length/tF)),r}let tO=e=>(t,i,r)=>{let n=t.getPreviousSibling(),s=t.getNextSibling(),a=(0,tb.$createListItemNode)("check"===e?"x"===r[3]:void 0);if((0,tb.$isListNode)(s)&&s.getListType()===e){let e=s.getFirstChild();null!==e?e.insertBefore(a):s.append(a),t.remove()}else if((0,tb.$isListNode)(n)&&n.getListType()===e)n.append(a),t.remove();else{let i=(0,tb.$createListNode)(e,"number"===e?Number(r[2]):void 0);i.append(a),t.replace(i)}a.append(...i),a.select(0,0);let o=tM(r[1]);o&&a.setIndent(o)},tU=(e,t,i)=>{let r=[],n=e.getChildren(),s=0;for(let a of n)if((0,tb.$isListItemNode)(a)){if(1===a.getChildrenSize()){let e=a.getFirstChild();if((0,tb.$isListNode)(e)){r.push(tU(e,t,i+1));continue}}let n=" ".repeat(i*tF),o=e.getListType(),l="number"===o?`${e.getStart()+s}. `:"check"===o?`- [${a.getChecked()?"x":" "}] `:"- ";r.push(n+l+t(a)),s++}return r.join("\n")},tP={type:"element",dependencies:[tE.HeadingNode],export:(e,t)=>{if(!(0,tE.$isHeadingNode)(e))return null;let i=Number(e.getTag().slice(1));return"#".repeat(i)+" "+t(e)},regExp:tQ,replace:tL(e=>{let t="h"+e[1].length;return(0,tE.$createHeadingNode)(t)})},t$={type:"element",dependencies:[tE.QuoteNode],export:(e,t)=>{if(!(0,tE.$isQuoteNode)(e))return null;let i=t(e).split("\n"),r=[];for(let e of i)r.push("> "+e);return r.join("\n")},regExp:tx,replace:(e,t,i,r)=>{if(r){let i=e.getPreviousSibling();if((0,tE.$isQuoteNode)(i)){i.splice(i.getChildrenSize(),0,[(0,tC.$createLineBreakNode)(),...t]),i.select(0,0),e.remove();return}}let n=(0,tE.$createQuoteNode)();n.append(...t),e.replace(n),n.select(0,0)}},tj={type:"element",dependencies:[tb.ListNode,tb.ListItemNode],export:(e,t)=>(0,tb.$isListNode)(e)?tU(e,t,0):null,regExp:tv,replace:tO("bullet")};function tH(e,t){let i=e.split("\n"),r=!1,n=[],s=0;for(let e=0;e<i.length;e++){let a=i[e],o=n[n.length-1];if(tT.test(a)){n.push(a);continue}if(tk.test(a)){0===s&&(r=!0),1===s&&(r=!1),s>0&&s--,n.push(a);continue}if(tS.test(a)){r=!0,s++,n.push(a);continue}if(r){n.push(a);continue}tw.test(a)||tw.test(o)||!o||tQ.test(o)||tQ.test(a)||tx.test(a)||tI.test(a)||tv.test(a)||tB.test(a)||tN.test(a)||tD.test(a)||!t||t_.test(a)||tR.test(a)||t_.test(o)||tR.test(o)||tk.test(o)?n.push(a):n[n.length-1]=o+" "+a.trim()}return n.join("\n")}tb.ListNode,tb.ListItemNode,tO("check");let tq=[tP,t$,tj,{type:"element",dependencies:[tb.ListNode,tb.ListItemNode],export:(e,t)=>(0,tb.$isListNode)(e)?tU(e,t,0):null,regExp:tI,replace:tO("number")},{type:"text-format",format:["code"],tag:"`"},{type:"text-format",format:["bold","italic"],tag:"***"},{type:"text-format",format:["bold","italic"],intraword:!1,tag:"___"},{type:"text-format",format:["bold"],tag:"**"},{type:"text-format",format:["bold"],intraword:!1,tag:"__"},{type:"text-format",format:["highlight"],tag:"=="},{type:"text-format",format:["italic"],tag:"*"},{type:"text-format",format:["italic"],intraword:!1,tag:"_"},{type:"text-format",format:["strikethrough"],tag:"~~"}];function tz(e,t=tq,i,r=!1,n=!0){let s=r?e:tH(e,n);return tf(t,r)(s,i)}function tV(e=tq,t,i=!1){return e7(e,i)(t)}function tG(e,t){return({editorState:i})=>{let r=eJ({nodes:e});try{r.setEditorState(r.parseEditorState(i))}catch(e){console.error("getLexicalToMarkdown: ERROR parsing editor state",e)}let n="";return r.getEditorState().read(()=>{n=tV(t)}),n}}function tY(e,t){return({markdown:i})=>{let r=eJ({nodes:e});return r.update(()=>{tz(i,t)},{discrete:!0}),r.getEditorState().toJSON()}}var tW=e.i(136101),tJ=u,tK=e.i(743977);class tZ extends tW.DecoratorBlockNode{__cacheBuster;__fields;constructor({cacheBuster:e,fields:t,format:i,key:r}){super(i,r),this.__fields=t,this.__cacheBuster=e||0}static clone(e){return new this({cacheBuster:e.__cacheBuster,fields:e.__fields,format:e.__format,key:e.__key})}static getType(){return"block"}static importDOM(){return{}}static importJSON(e){1===e.version&&(e={...e,fields:{...e.fields.data},version:2});let t=tX(e.fields);return t.setFormat(e.format),t}static isInline(){return!1}createDOM(e){let t=document.createElement("div");return(0,tJ.addClassNamesToElement)(t,e?.theme?.block),t}decorate(e,t){return null}exportDOM(){let e=document.createElement("div"),t=document.createTextNode(this.getTextContent());return e.append(t),{element:e}}exportJSON(){return{...super.exportJSON(),type:"block",fields:this.getFields(),version:2}}getCacheBuster(){return this.getLatest().__cacheBuster}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}setFields(e,t){let i=this.getWritable();i.__fields=e,!t&&i.__cacheBuster++}}function tX(e){return(0,tJ.$applyNodeReplacement)(new tZ({fields:{...e,id:e?.id||new tK.default.default().toHexString()}}))}function t0(e){return e instanceof tZ}var t1=u,t2=tK;class t4 extends t1.DecoratorNode{__cacheBuster;__fields;constructor({cacheBuster:e,fields:t,key:i}){super(i),this.__fields=t,this.__cacheBuster=e||0}static clone(e){return new this({cacheBuster:e.__cacheBuster,fields:e.__fields,key:e.__key})}static getType(){return"inlineBlock"}static importDOM(){return{}}static importJSON(e){return t5(e.fields)}static isInline(){return!1}canIndent(){return!0}createDOM(e){let t=document.createElement("span");return(0,t1.addClassNamesToElement)(t,e?.theme?.inlineBlock),t}decorate(e,t){return null}exportDOM(){let e=document.createElement("span");e.classList.add("inline-block-container");let t=document.createTextNode(this.getTextContent());return e.append(t),{element:e}}exportJSON(){return{type:"inlineBlock",fields:this.getFields(),version:1}}getCacheBuster(){return this.getLatest().__cacheBuster}getFields(){return this.getLatest().__fields}getTextContent(){return"Block Field"}isInline(){return!0}setFields(e,t){let i=this.getWritable();i.__fields=e,!t&&i.__cacheBuster++}updateDOM(){return!1}}function t5(e){return(0,t1.$applyNodeReplacement)(new t4({fields:{...e,id:e?.id||new t2.default.default().toHexString()}}))}function t3(e){return e instanceof t4}function t8({isEndOptional:e,lines:t,regexpEndRegex:i,startLineIndex:r,startMatch:n,trimChildren:s}){let a="",o="",l=t.slice(r),c=!1,d=0,u=0,h=null,A=!1,p=0,f=l[0].slice(0,n.index),g=0,m=r;t:for(let[r,f]of l.entries()){let y=s?f.trim():f,b=0;if(s)for(let e=0;e<f.length;e++)if(" "===f[e])b++;else break;let E=0;for(0===r&&(E=(n.index??0)+n[0].length-b);E<y.length;){let e=y[E],t=y[E+1];if(c){if("`"===e&&p++,p%2==0)if("<"===e&&"/"===t){if(--d<0){"\n"===o[o.length-1]&&(o=o.slice(0,-1)),m=r;for(let e=E;e<y.length;e++)if(">"===y[e]){g=e+1;break}break t}}else if("/"===e&&">"===t){if(--d<0){"\n"===o[o.length-1]&&(o=o.slice(0,-1)),m=r,g=E+2;break t}}else"<"===e&&"/"!==t&&d++;o+=e}else{if("{"!==e||h?"}"!==e||h?'"'!==e&&"'"!==e||h?e===h&&(h=null):h=e:u--:u++,"/"!==e||">"!==t||0!==u||h){if(">"===e&&0===u&&!h){c=!0,E++;continue}}else{A=!0,m=r,g=E+2;break t}a+=e}E++}if(c?o?.length>0&&r>0&&(o+="\n"):a+="\n",i&&d<0){let e=y.match(i);if(e?.index!==void 0){m=r,g=e.index+e[0].length-1;break}}if(r===l.length-1&&!e&&!A)throw Error("End match not found for lines "+t.join("\n")+"\n\n. Start match: "+JSON.stringify(n))}return{afterEndLine:l[m].trim().slice(g),beforeStartLine:f,content:o,endLineIndex:r+m,endlineLastCharIndex:g,propsString:a}}function t9(e){let t=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),i=`<${t}`,r=`</${t}`,n="\\s*",s=">",a=`${i}(?=\\s|>|$)`;return{regExpEnd:RegExp(`${r}${n}${s}`,"i"),regExpStart:RegExp(a,"i")}}let t6=({blocks:e,inlineBlocks:t})=>{if(!e?.length&&!t?.length)return[];let i=[];if(e?.length)for(let t of e){let e=t7(t,!1);e&&(i=i.concat(e))}if(t?.length)for(let e of t){let t=t7(e,!0);t&&(i=i.concat(t))}return i};function t7(e,t){if(!e.jsx)return null;let i=t9(e.slug),r=[];return t?r.push(({allNodes:t,allTransformers:r})=>({type:"text-match",dependencies:[t4],export:i=>{if(!t3(i)||i.getFields()?.blockType?.toLowerCase()!==e.slug.toLowerCase())return null;let n=i.getFields(),s=tG(h({nodes:t}),r),a=e.jsx.export({fields:n,lexicalToMarkdown:s});if(!1===a)return null;if("string"==typeof a)return a;let o=a.props&&Object.keys(a.props)?.length>0,l=a.props??{};return a?.children?.length?`<${n.blockType}${o?" "+eV({props:l}):""}>${a.children}</${n.blockType}>`:`<${n.blockType}${o?" "+eV({props:l}):""}/>`},getEndIndex:(e,t)=>{let{endlineLastCharIndex:r}=t8({isEndOptional:!1,lines:[e.getTextContent()],regexpEndRegex:i.regExpEnd,startLineIndex:0,startMatch:t,trimChildren:!1});return r},importRegExp:e.jsx?.customStartRegex??i.regExpStart,regExp:/___ignoreignoreignore___/g,replace(n,s){let{content:a,propsString:o}=t8({isEndOptional:!1,lines:[n.getTextContent()],regexpEndRegex:i.regExpEnd,startLineIndex:0,startMatch:{...s,index:0},trimChildren:!1});if(!e?.jsx?.import)return;let l=tY(h({nodes:t}),r),c=e.jsx.import({children:a,closeMatch:null,htmlToLexical:null,markdownToLexical:l,openMatch:s,props:o?eU({propsString:o}):{}});if(!1===c)return;let d=t5({blockType:e.slug,...c});n.replace(d)}})):r.push(({allNodes:t,allTransformers:r})=>({dependencies:[tZ],export:i=>{if(!t0(i)||i.getFields()?.blockType?.toLowerCase()!==e.slug.toLowerCase())return null;let n=i.getFields(),s=tG(h({nodes:t}),r),a=e.jsx.export({fields:n,lexicalToMarkdown:s});if(!1===a)return null;if("string"==typeof a)return a;let o=a.props&&Object.keys(a.props)?.length>0,l=a.props??{};if(a?.children?.length){let t=a.children,i="";if(t.includes("\n"))for(let r of t.split("\n")){let t="";e?.jsx?.doNotTrimChildren||""===r||(t=" "),t+=r+"\n",i+=t}else i=(e?.jsx?.doNotTrimChildren?"":" ")+t+"\n";return`<${n.blockType}${o?" "+eV({props:l}):""}>
|
||
${i}</${n.blockType}>`}return`<${n.blockType}${o?" "+eV({props:l}):""}/>`},handleImportAfterStartMatch:e.jsx?.customEndRegex?void 0:({lines:i,rootNode:n,startLineIndex:s,startMatch:a,transformer:o})=>{let l="object"==typeof o.regExpEnd&&"regExp"in o.regExpEnd?o.regExpEnd.regExp:o.regExpEnd,{afterEndLine:c,beforeStartLine:d,content:A,endLineIndex:p,propsString:f}=t8({isEndOptional:o.regExpEnd&&"object"==typeof o.regExpEnd&&"optional"in o.regExpEnd?o.regExpEnd.optional:!o.regExpEnd,lines:i,regexpEndRegex:l,startLineIndex:s,startMatch:a,trimChildren:!1}),g="";if(e?.jsx?.doNotTrimChildren)g=A.endsWith("\n")?A.slice(0,-1):A;else if(A.includes("\n")){let e=A.split("\n"),t=0;for(let i of e){if(t++,i.startsWith(" "))g+=i.slice(2);else if(""===i)g+=i;else{g=A.endsWith("\n")?A.slice(0,-1):A;break}g+=t===e.length?"":"\n"}}else g=(A.startsWith(" ")?A.slice(2):A)+"\n";if(!e?.jsx?.import)return[!1,s];let m=tY(h({nodes:t}),r),y=e.jsx.import({children:g,closeMatch:null,htmlToLexical:null,markdownToLexical:m,openMatch:a,props:f?eU({propsString:f}):{}});if(!1===y)return[!1,s];let b=tX({blockType:e.slug,...y});if(b){let e=null,t=null;if(d?.length){e=m({markdown:d})?.root?.children??[];let t=e?.[0];t&&n.append((0,u.$parseSerializedNode)(t))}if(n.append(b),c?.length){t=m({markdown:c})?.root?.children;let e=n.getChildren()[n.getChildren().length-1],i=(0,u.$parseSerializedNode)(t[0])?.getChildren();if(i?.length)for(let t of i)e.append(t)}}return[!0,p]},regExpEnd:e.jsx?.customEndRegex??i.regExpEnd,regExpStart:e.jsx?.customStartRegex??i.regExpStart,type:"multiline-element",replace:(i,n,s,a,o)=>{if(e?.jsx?.import){if(!o){let e="";if(n)for(let t of n)e+=t.getTextContent();o=[e]}let l="";l=e?.jsx?.doNotTrimChildren?o.join("\n"):o.join("\n").trim();let c=s[1]?.trim(),d=tY(h({nodes:t}),r),u=e.jsx.import({children:l,closeMatch:a,htmlToLexical:null,markdownToLexical:d,openMatch:s,props:c?eU({propsString:c}):{}});if(!1===u)return!1;let A=tX({blockType:e.slug,...u});return void(A&&i.append(A))}return!1}})),r}var ie=e.i(108381);let it=e=>async({node:t,validation:i})=>{let r=t.fields??{},{options:{id:n,collectionSlug:s,data:a,operation:o,preferences:l,req:c}}=i,d=e.find(e=>e.slug===r.blockType);if(!d)return`Block ${r.blockType} not found`;let u=await (0,ie.fieldSchemasToFormState)({id:n,collectionSlug:s,data:r,documentData:a,fields:d.fields,fieldSchemaMap:void 0,initialBlockData:r,operation:"create"===o||"update"===o?o:"update",permissions:{},preferences:l,renderAllFields:!1,req:c,schemaPath:""}),h=new Set;for(let e in u){let t=u[e];if(t?.errorPaths?.length)for(let e of t.errorPaths)h.add(e)}let A=Array.from(h);return!A.length||"The following fields are invalid: "+A.join(", ")},ii=(0,a.createServerFeature)({feature:async({config:e,isRoot:n,parentIsLocalized:a,props:l})=>{let u=e.collections.map(e=>e.slug)||[],h=await (0,r.sanitizeFields)({config:e,fields:[{name:"lexical_blocks",type:"blocks",blockReferences:l.blocks??[],blocks:[]},{name:"lexical_inline_blocks",type:"blocks",blockReferences:l.inlineBlocks??[],blocks:[]}],parentIsLocalized:a,requireFieldLevelRichTextEditor:n,validRelationships:u}),A=[];for(let t of h[0].blockReferences??h[0].blocks){let i="string"==typeof t?e?.blocks?.find(e=>e.slug===t):t;if(!i)throw Error(`Block not found for slug: ${"string"==typeof t?t:t?.slug}`);A.push({...i,fields:s(i.fields,e)})}let p=[];for(let t of h[1].blockReferences??h[1].blocks){let i="string"==typeof t?e?.blocks?.find(e=>e.slug===t):t;if(!i)throw Error(`Block not found for slug: ${"string"==typeof t?t:t?.slug}`);p.push({...i,fields:s(i.fields,e)})}return{ClientFeature:"@payloadcms/richtext-lexical/client#BlocksFeatureClient",generatedTypes:{modifyOutputSchema:({collectionIDFieldTypes:e,config:r,currentSchema:n,field:s,i18n:a,interfaceNameDefinitions:o})=>{if(!A?.length&&!p?.length)return n;let l=[];return A?.length&&l.push({name:s?.name+"_lexical_blocks",type:"blocks",blocks:A.map(e=>({...e,flattenedFields:(0,i.flattenAllFields)({fields:e.fields})}))}),p?.length&&l.push({name:s?.name+"_lexical_inline_blocks",type:"blocks",blocks:p.map(e=>({...e,flattenedFields:(0,i.flattenAllFields)({fields:e.fields})}))}),l.length&&(0,t.fieldsToJSONSchema)(e,l,o,r,a),n}},generateSchemaMap:({config:e})=>{let t=new Map;if(A?.length)for(let e of A){let i=[...e.fields];e?.admin?.components&&i.unshift({name:"_components",type:"ui",admin:{components:{Block:e.admin?.components?.Block,BlockLabel:e.admin?.components?.Label}}}),t.set(`lexical_blocks.${e.slug}.fields`,{fields:i}),t.set(`lexical_blocks.${e.slug}`,{name:`lexical_blocks_${e.slug}`,type:"blocks",blocks:[e]})}if(p?.length)for(let e of p){let i=[...e.fields];e?.admin?.components&&i.unshift({name:"_components",type:"ui",admin:{components:{Block:e.admin?.components?.Block,BlockLabel:e.admin?.components?.Label}}}),t.set(`lexical_inline_blocks.${e.slug}.fields`,{fields:i}),t.set(`lexical_inline_blocks.${e.slug}`,{name:`lexical_inline_blocks_${e.slug}`,type:"blocks",blocks:[e]})}return t},i18n:d,markdownTransformers:t6({blocks:A,inlineBlocks:p}),nodes:[(0,o.createNode)({getSubFields:({node:e})=>{if(!e)return A?.length?[{name:"lexical_blocks",type:"blocks",blocks:A}]:[];let t=e.fields.blockType,i=A?.find(e=>e.slug===t);return i?.fields},getSubFieldsData:({node:e})=>e?.fields,graphQLPopulationPromises:[c(A)],node:tZ,validations:[it(A)]}),(0,o.createNode)({getSubFields:({node:e})=>{if(!e)return p?.length?[{name:"lexical_inline_blocks",type:"blocks",blocks:p}]:[];let t=e.fields.blockType,i=p?.find(e=>e.slug===t);return i?.fields},getSubFieldsData:({node:e})=>e?.fields,graphQLPopulationPromises:[c(p)],node:t4,validations:[it(p)]})],sanitizedServerFeatureProps:l}},key:"blocks"});e.s(["BlocksFeature",0,ii],719925)},921720,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/blog/AnimatedImage.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blog/AnimatedImage.tsx <module evaluation>","default")},595386,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/blog/AnimatedImage.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blog/AnimatedImage.tsx","default")},813623,e=>{"use strict";e.i(921720);var t=e.i(595386);e.n(t)},406813,e=>{"use strict";let t={slug:"animatedImage",render:e.i(813623).default,fields:[{name:"src",type:"text",required:!0},{name:"alt",type:"text",required:!0},{name:"width",type:"number"},{name:"height",type:"number"}]};e.s(["AnimatedImage",0,t])},999994,e=>{"use strict";var t=e.i(530702);let i=(e,t)=>{let i=Array(e.length+t.length);for(let t=0;t<e.length;t++)i[t]=e[t];for(let r=0;r<t.length;r++)i[e.length+r]=t[r];return i},r=(e,t)=>({classGroupId:e,validator:t}),n=(e=new Map,t=null,i)=>({nextPart:e,validators:t,classGroupId:i}),s="-",a=[],o="arbitrary..",l=e=>{let t=u(e),{conflictingClassGroups:r,conflictingClassGroupModifiers:n}=e;return{getClassGroupId:e=>{if(e.startsWith("[")&&e.endsWith("]"))return d(e);let i=e.split(s),r=+(""===i[0]&&i.length>1);return c(i,r,t)},getConflictingClassGroupIds:(e,t)=>{if(t){let t=n[e],s=r[e];return t?s?i(s,t):t:s||a}return r[e]||a}}},c=(e,t,i)=>{if(0==e.length-t)return i.classGroupId;let r=e[t],n=i.nextPart.get(r);if(n){let i=c(e,t+1,n);if(i)return i}let a=i.validators;if(null===a)return;let o=0===t?e.join(s):e.slice(t).join(s),l=a.length;for(let e=0;e<l;e++){let t=a[e];if(t.validator(o))return t.classGroupId}},d=e=>-1===e.slice(1,-1).indexOf(":")?void 0:(()=>{let t=e.slice(1,-1),i=t.indexOf(":"),r=t.slice(0,i);return r?o+r:void 0})(),u=e=>{let{theme:t,classGroups:i}=e;return h(i,t)},h=(e,t)=>{let i=n();for(let r in e)A(e[r],i,r,t);return i},A=(e,t,i,r)=>{let n=e.length;for(let s=0;s<n;s++)p(e[s],t,i,r)},p=(e,t,i,r)=>{"string"==typeof e?f(e,t,i):"function"==typeof e?g(e,t,i,r):m(e,t,i,r)},f=(e,t,i)=>{(""===e?t:y(t,e)).classGroupId=i},g=(e,t,i,n)=>{b(e)?A(e(n),t,i,n):(null===t.validators&&(t.validators=[]),t.validators.push(r(i,e)))},m=(e,t,i,r)=>{let n=Object.entries(e),s=n.length;for(let e=0;e<s;e++){let[s,a]=n[e];A(a,y(t,s),i,r)}},y=(e,t)=>{let i=e,r=t.split(s),a=r.length;for(let e=0;e<a;e++){let t=r[e],s=i.nextPart.get(t);s||(s=n(),i.nextPart.set(t,s)),i=s}return i},b=e=>"isThemeGetter"in e&&!0===e.isThemeGetter,E=e=>{if(e<1)return{get:()=>void 0,set:()=>{}};let t=0,i=Object.create(null),r=Object.create(null),n=(n,s)=>{i[n]=s,++t>e&&(t=0,r=i,i=Object.create(null))};return{get(e){let t=i[e];return void 0!==t?t:void 0!==(t=r[e])?(n(e,t),t):void 0},set(e,t){e in i?i[e]=t:n(e,t)}}},C="!",w=":",I=[],v=(e,t,i,r,n)=>({modifiers:e,hasImportantModifier:t,baseClassName:i,maybePostfixModifierPosition:r,isExternal:n}),B=e=>{let{prefix:t,experimentalParseClassName:i}=e,r=e=>{let t,i=[],r=0,n=0,s=0,a=e.length;for(let o=0;o<a;o++){let a=e[o];if(0===r&&0===n){if(a===w){i.push(e.slice(s,o)),s=o+1;continue}if("/"===a){t=o;continue}}"["===a?r++:"]"===a?r--:"("===a?n++:")"===a&&n--}let o=0===i.length?e:e.slice(s),l=o,c=!1;return o.endsWith(C)?(l=o.slice(0,-1),c=!0):o.startsWith(C)&&(l=o.slice(1),c=!0),v(i,c,l,t&&t>s?t-s:void 0)};if(t){let e=t+w,i=r;r=t=>t.startsWith(e)?i(t.slice(e.length)):v(I,!1,t,void 0,!0)}if(i){let e=r;r=t=>i({className:t,parseClassName:e})}return r},Q=e=>{let t=new Map;return e.orderSensitiveModifiers.forEach((e,i)=>{t.set(e,1e6+i)}),e=>{let i=[],r=[];for(let n=0;n<e.length;n++){let s=e[n],a="["===s[0],o=t.has(s);a||o?(r.length>0&&(r.sort(),i.push(...r),r=[]),i.push(s)):r.push(s)}return r.length>0&&(r.sort(),i.push(...r)),i}},x=e=>({cache:E(e.cacheSize),parseClassName:B(e),sortModifiers:Q(e),...l(e)}),S=/\s+/,k=(e,t)=>{let{parseClassName:i,getClassGroupId:r,getConflictingClassGroupIds:n,sortModifiers:s}=t,a=[],o=e.trim().split(S),l="";for(let e=o.length-1;e>=0;e-=1){let t=o[e],{isExternal:c,modifiers:d,hasImportantModifier:u,baseClassName:h,maybePostfixModifierPosition:A}=i(t);if(c){l=t+(l.length>0?" "+l:l);continue}let p=!!A,f=r(p?h.substring(0,A):h);if(!f){if(!p||!(f=r(h))){l=t+(l.length>0?" "+l:l);continue}p=!1}let g=0===d.length?"":1===d.length?d[0]:s(d).join(":"),m=u?g+C:g,y=m+f;if(a.indexOf(y)>-1)continue;a.push(y);let b=n(f,p);for(let e=0;e<b.length;++e){let t=b[e];a.push(m+t)}l=t+(l.length>0?" "+l:l)}return l},T=(...e)=>{let t,i,r=0,n="";for(;r<e.length;)(t=e[r++])&&(i=N(t))&&(n&&(n+=" "),n+=i);return n},N=e=>{let t;if("string"==typeof e)return e;let i="";for(let r=0;r<e.length;r++)e[r]&&(t=N(e[r]))&&(i&&(i+=" "),i+=t);return i},D=[],_=e=>{let t=t=>t[e]||D;return t.isThemeGetter=!0,t},R=/^\[(?:(\w[\w-]*):)?(.+)\]$/i,L=/^\((?:(\w[\w-]*):)?(.+)\)$/i,F=/^\d+(?:\.\d+)?\/\d+(?:\.\d+)?$/,M=/^(\d+(\.\d+)?)?(xs|sm|md|lg|xl)$/,O=/\d+(%|px|r?em|[sdl]?v([hwib]|min|max)|pt|pc|in|cm|mm|cap|ch|ex|r?lh|cq(w|h|i|b|min|max))|\b(calc|min|max|clamp)\(.+\)|^0$/,U=/^(rgba?|hsla?|hwb|(ok)?(lab|lch)|color-mix)\(.+\)$/,P=/^(inset_)?-?((\d+)?\.?(\d+)[a-z]+|0)_-?((\d+)?\.?(\d+)[a-z]+|0)/,$=/^(url|image|image-set|cross-fade|element|(repeating-)?(linear|radial|conic)-gradient)\(.+\)$/,j=e=>F.test(e),H=e=>!!e&&!Number.isNaN(Number(e)),q=e=>!!e&&Number.isInteger(Number(e)),z=e=>e.endsWith("%")&&H(e.slice(0,-1)),V=e=>M.test(e),G=()=>!0,Y=e=>O.test(e)&&!U.test(e),W=()=>!1,J=e=>P.test(e),K=e=>$.test(e),Z=e=>!ee(e)&&!el(e),X=e=>eg(e,eE,W),ee=e=>R.test(e),et=e=>eg(e,eC,Y),ei=e=>eg(e,ew,H),er=e=>eg(e,ev,G),en=e=>eg(e,eI,W),es=e=>eg(e,ey,W),ea=e=>eg(e,eb,K),eo=e=>eg(e,eB,J),el=e=>L.test(e),ec=e=>em(e,eC),ed=e=>em(e,eI),eu=e=>em(e,ey),eh=e=>em(e,eE),eA=e=>em(e,eb),ep=e=>em(e,eB,!0),ef=e=>em(e,ev,!0),eg=(e,t,i)=>{let r=R.exec(e);return!!r&&(r[1]?t(r[1]):i(r[2]))},em=(e,t,i=!1)=>{let r=L.exec(e);return!!r&&(r[1]?t(r[1]):i)},ey=e=>"position"===e||"percentage"===e,eb=e=>"image"===e||"url"===e,eE=e=>"length"===e||"size"===e||"bg-size"===e,eC=e=>"length"===e,ew=e=>"number"===e,eI=e=>"family-name"===e,ev=e=>"number"===e||"weight"===e,eB=e=>"shadow"===e,eQ=((e,...t)=>{let i,r,n,s,a=e=>{let t=r(e);if(t)return t;let s=k(e,i);return n(e,s),s};return s=o=>(r=(i=x(t.reduce((e,t)=>t(e),e()))).cache.get,n=i.cache.set,s=a,a(o)),(...e)=>s(T(...e))})(()=>{let e=_("color"),t=_("font"),i=_("text"),r=_("font-weight"),n=_("tracking"),s=_("leading"),a=_("breakpoint"),o=_("container"),l=_("spacing"),c=_("radius"),d=_("shadow"),u=_("inset-shadow"),h=_("text-shadow"),A=_("drop-shadow"),p=_("blur"),f=_("perspective"),g=_("aspect"),m=_("ease"),y=_("animate"),b=()=>["auto","avoid","all","avoid-page","page","left","right","column"],E=()=>["center","top","bottom","left","right","top-left","left-top","top-right","right-top","bottom-right","right-bottom","bottom-left","left-bottom"],C=()=>[...E(),el,ee],w=()=>["auto","hidden","clip","visible","scroll"],I=()=>["auto","contain","none"],v=()=>[el,ee,l],B=()=>[j,"full","auto",...v()],Q=()=>[q,"none","subgrid",el,ee],x=()=>["auto",{span:["full",q,el,ee]},q,el,ee],S=()=>[q,"auto",el,ee],k=()=>["auto","min","max","fr",el,ee],T=()=>["start","end","center","between","around","evenly","stretch","baseline","center-safe","end-safe"],N=()=>["start","end","center","stretch","center-safe","end-safe"],D=()=>["auto",...v()],R=()=>[j,"auto","full","dvw","dvh","lvw","lvh","svw","svh","min","max","fit",...v()],L=()=>[j,"screen","full","dvw","lvw","svw","min","max","fit",...v()],F=()=>[j,"screen","full","lh","dvh","lvh","svh","min","max","fit",...v()],M=()=>[e,el,ee],O=()=>[...E(),eu,es,{position:[el,ee]}],U=()=>["no-repeat",{repeat:["","x","y","space","round"]}],P=()=>["auto","cover","contain",eh,X,{size:[el,ee]}],$=()=>[z,ec,et],Y=()=>["","none","full",c,el,ee],W=()=>["",H,ec,et],J=()=>["solid","dashed","dotted","double"],K=()=>["normal","multiply","screen","overlay","darken","lighten","color-dodge","color-burn","hard-light","soft-light","difference","exclusion","hue","saturation","color","luminosity"],eg=()=>[H,z,eu,es],em=()=>["","none",p,el,ee],ey=()=>["none",H,el,ee],eb=()=>["none",H,el,ee],eE=()=>[H,el,ee],eC=()=>[j,"full",...v()];return{cacheSize:500,theme:{animate:["spin","ping","pulse","bounce"],aspect:["video"],blur:[V],breakpoint:[V],color:[G],container:[V],"drop-shadow":[V],ease:["in","out","in-out"],font:[Z],"font-weight":["thin","extralight","light","normal","medium","semibold","bold","extrabold","black"],"inset-shadow":[V],leading:["none","tight","snug","normal","relaxed","loose"],perspective:["dramatic","near","normal","midrange","distant","none"],radius:[V],shadow:[V],spacing:["px",H],text:[V],"text-shadow":[V],tracking:["tighter","tight","normal","wide","wider","widest"]},classGroups:{aspect:[{aspect:["auto","square",j,ee,el,g]}],container:["container"],columns:[{columns:[H,ee,el,o]}],"break-after":[{"break-after":b()}],"break-before":[{"break-before":b()}],"break-inside":[{"break-inside":["auto","avoid","avoid-page","avoid-column"]}],"box-decoration":[{"box-decoration":["slice","clone"]}],box:[{box:["border","content"]}],display:["block","inline-block","inline","flex","inline-flex","table","inline-table","table-caption","table-cell","table-column","table-column-group","table-footer-group","table-header-group","table-row-group","table-row","flow-root","grid","inline-grid","contents","list-item","hidden"],sr:["sr-only","not-sr-only"],float:[{float:["right","left","none","start","end"]}],clear:[{clear:["left","right","both","none","start","end"]}],isolation:["isolate","isolation-auto"],"object-fit":[{object:["contain","cover","fill","none","scale-down"]}],"object-position":[{object:C()}],overflow:[{overflow:w()}],"overflow-x":[{"overflow-x":w()}],"overflow-y":[{"overflow-y":w()}],overscroll:[{overscroll:I()}],"overscroll-x":[{"overscroll-x":I()}],"overscroll-y":[{"overscroll-y":I()}],position:["static","fixed","absolute","relative","sticky"],inset:[{inset:B()}],"inset-x":[{"inset-x":B()}],"inset-y":[{"inset-y":B()}],start:[{"inset-s":B(),start:B()}],end:[{"inset-e":B(),end:B()}],"inset-bs":[{"inset-bs":B()}],"inset-be":[{"inset-be":B()}],top:[{top:B()}],right:[{right:B()}],bottom:[{bottom:B()}],left:[{left:B()}],visibility:["visible","invisible","collapse"],z:[{z:[q,"auto",el,ee]}],basis:[{basis:[j,"full","auto",o,...v()]}],"flex-direction":[{flex:["row","row-reverse","col","col-reverse"]}],"flex-wrap":[{flex:["nowrap","wrap","wrap-reverse"]}],flex:[{flex:[H,j,"auto","initial","none",ee]}],grow:[{grow:["",H,el,ee]}],shrink:[{shrink:["",H,el,ee]}],order:[{order:[q,"first","last","none",el,ee]}],"grid-cols":[{"grid-cols":Q()}],"col-start-end":[{col:x()}],"col-start":[{"col-start":S()}],"col-end":[{"col-end":S()}],"grid-rows":[{"grid-rows":Q()}],"row-start-end":[{row:x()}],"row-start":[{"row-start":S()}],"row-end":[{"row-end":S()}],"grid-flow":[{"grid-flow":["row","col","dense","row-dense","col-dense"]}],"auto-cols":[{"auto-cols":k()}],"auto-rows":[{"auto-rows":k()}],gap:[{gap:v()}],"gap-x":[{"gap-x":v()}],"gap-y":[{"gap-y":v()}],"justify-content":[{justify:[...T(),"normal"]}],"justify-items":[{"justify-items":[...N(),"normal"]}],"justify-self":[{"justify-self":["auto",...N()]}],"align-content":[{content:["normal",...T()]}],"align-items":[{items:[...N(),{baseline:["","last"]}]}],"align-self":[{self:["auto",...N(),{baseline:["","last"]}]}],"place-content":[{"place-content":T()}],"place-items":[{"place-items":[...N(),"baseline"]}],"place-self":[{"place-self":["auto",...N()]}],p:[{p:v()}],px:[{px:v()}],py:[{py:v()}],ps:[{ps:v()}],pe:[{pe:v()}],pbs:[{pbs:v()}],pbe:[{pbe:v()}],pt:[{pt:v()}],pr:[{pr:v()}],pb:[{pb:v()}],pl:[{pl:v()}],m:[{m:D()}],mx:[{mx:D()}],my:[{my:D()}],ms:[{ms:D()}],me:[{me:D()}],mbs:[{mbs:D()}],mbe:[{mbe:D()}],mt:[{mt:D()}],mr:[{mr:D()}],mb:[{mb:D()}],ml:[{ml:D()}],"space-x":[{"space-x":v()}],"space-x-reverse":["space-x-reverse"],"space-y":[{"space-y":v()}],"space-y-reverse":["space-y-reverse"],size:[{size:R()}],"inline-size":[{inline:["auto",...L()]}],"min-inline-size":[{"min-inline":["auto",...L()]}],"max-inline-size":[{"max-inline":["none",...L()]}],"block-size":[{block:["auto",...F()]}],"min-block-size":[{"min-block":["auto",...F()]}],"max-block-size":[{"max-block":["none",...F()]}],w:[{w:[o,"screen",...R()]}],"min-w":[{"min-w":[o,"screen","none",...R()]}],"max-w":[{"max-w":[o,"screen","none","prose",{screen:[a]},...R()]}],h:[{h:["screen","lh",...R()]}],"min-h":[{"min-h":["screen","lh","none",...R()]}],"max-h":[{"max-h":["screen","lh",...R()]}],"font-size":[{text:["base",i,ec,et]}],"font-smoothing":["antialiased","subpixel-antialiased"],"font-style":["italic","not-italic"],"font-weight":[{font:[r,ef,er]}],"font-stretch":[{"font-stretch":["ultra-condensed","extra-condensed","condensed","semi-condensed","normal","semi-expanded","expanded","extra-expanded","ultra-expanded",z,ee]}],"font-family":[{font:[ed,en,t]}],"font-features":[{"font-features":[ee]}],"fvn-normal":["normal-nums"],"fvn-ordinal":["ordinal"],"fvn-slashed-zero":["slashed-zero"],"fvn-figure":["lining-nums","oldstyle-nums"],"fvn-spacing":["proportional-nums","tabular-nums"],"fvn-fraction":["diagonal-fractions","stacked-fractions"],tracking:[{tracking:[n,el,ee]}],"line-clamp":[{"line-clamp":[H,"none",el,ei]}],leading:[{leading:[s,...v()]}],"list-image":[{"list-image":["none",el,ee]}],"list-style-position":[{list:["inside","outside"]}],"list-style-type":[{list:["disc","decimal","none",el,ee]}],"text-alignment":[{text:["left","center","right","justify","start","end"]}],"placeholder-color":[{placeholder:M()}],"text-color":[{text:M()}],"text-decoration":["underline","overline","line-through","no-underline"],"text-decoration-style":[{decoration:[...J(),"wavy"]}],"text-decoration-thickness":[{decoration:[H,"from-font","auto",el,et]}],"text-decoration-color":[{decoration:M()}],"underline-offset":[{"underline-offset":[H,"auto",el,ee]}],"text-transform":["uppercase","lowercase","capitalize","normal-case"],"text-overflow":["truncate","text-ellipsis","text-clip"],"text-wrap":[{text:["wrap","nowrap","balance","pretty"]}],indent:[{indent:v()}],"vertical-align":[{align:["baseline","top","middle","bottom","text-top","text-bottom","sub","super",el,ee]}],whitespace:[{whitespace:["normal","nowrap","pre","pre-line","pre-wrap","break-spaces"]}],break:[{break:["normal","words","all","keep"]}],wrap:[{wrap:["break-word","anywhere","normal"]}],hyphens:[{hyphens:["none","manual","auto"]}],content:[{content:["none",el,ee]}],"bg-attachment":[{bg:["fixed","local","scroll"]}],"bg-clip":[{"bg-clip":["border","padding","content","text"]}],"bg-origin":[{"bg-origin":["border","padding","content"]}],"bg-position":[{bg:O()}],"bg-repeat":[{bg:U()}],"bg-size":[{bg:P()}],"bg-image":[{bg:["none",{linear:[{to:["t","tr","r","br","b","bl","l","tl"]},q,el,ee],radial:["",el,ee],conic:[q,el,ee]},eA,ea]}],"bg-color":[{bg:M()}],"gradient-from-pos":[{from:$()}],"gradient-via-pos":[{via:$()}],"gradient-to-pos":[{to:$()}],"gradient-from":[{from:M()}],"gradient-via":[{via:M()}],"gradient-to":[{to:M()}],rounded:[{rounded:Y()}],"rounded-s":[{"rounded-s":Y()}],"rounded-e":[{"rounded-e":Y()}],"rounded-t":[{"rounded-t":Y()}],"rounded-r":[{"rounded-r":Y()}],"rounded-b":[{"rounded-b":Y()}],"rounded-l":[{"rounded-l":Y()}],"rounded-ss":[{"rounded-ss":Y()}],"rounded-se":[{"rounded-se":Y()}],"rounded-ee":[{"rounded-ee":Y()}],"rounded-es":[{"rounded-es":Y()}],"rounded-tl":[{"rounded-tl":Y()}],"rounded-tr":[{"rounded-tr":Y()}],"rounded-br":[{"rounded-br":Y()}],"rounded-bl":[{"rounded-bl":Y()}],"border-w":[{border:W()}],"border-w-x":[{"border-x":W()}],"border-w-y":[{"border-y":W()}],"border-w-s":[{"border-s":W()}],"border-w-e":[{"border-e":W()}],"border-w-bs":[{"border-bs":W()}],"border-w-be":[{"border-be":W()}],"border-w-t":[{"border-t":W()}],"border-w-r":[{"border-r":W()}],"border-w-b":[{"border-b":W()}],"border-w-l":[{"border-l":W()}],"divide-x":[{"divide-x":W()}],"divide-x-reverse":["divide-x-reverse"],"divide-y":[{"divide-y":W()}],"divide-y-reverse":["divide-y-reverse"],"border-style":[{border:[...J(),"hidden","none"]}],"divide-style":[{divide:[...J(),"hidden","none"]}],"border-color":[{border:M()}],"border-color-x":[{"border-x":M()}],"border-color-y":[{"border-y":M()}],"border-color-s":[{"border-s":M()}],"border-color-e":[{"border-e":M()}],"border-color-bs":[{"border-bs":M()}],"border-color-be":[{"border-be":M()}],"border-color-t":[{"border-t":M()}],"border-color-r":[{"border-r":M()}],"border-color-b":[{"border-b":M()}],"border-color-l":[{"border-l":M()}],"divide-color":[{divide:M()}],"outline-style":[{outline:[...J(),"none","hidden"]}],"outline-offset":[{"outline-offset":[H,el,ee]}],"outline-w":[{outline:["",H,ec,et]}],"outline-color":[{outline:M()}],shadow:[{shadow:["","none",d,ep,eo]}],"shadow-color":[{shadow:M()}],"inset-shadow":[{"inset-shadow":["none",u,ep,eo]}],"inset-shadow-color":[{"inset-shadow":M()}],"ring-w":[{ring:W()}],"ring-w-inset":["ring-inset"],"ring-color":[{ring:M()}],"ring-offset-w":[{"ring-offset":[H,et]}],"ring-offset-color":[{"ring-offset":M()}],"inset-ring-w":[{"inset-ring":W()}],"inset-ring-color":[{"inset-ring":M()}],"text-shadow":[{"text-shadow":["none",h,ep,eo]}],"text-shadow-color":[{"text-shadow":M()}],opacity:[{opacity:[H,el,ee]}],"mix-blend":[{"mix-blend":[...K(),"plus-darker","plus-lighter"]}],"bg-blend":[{"bg-blend":K()}],"mask-clip":[{"mask-clip":["border","padding","content","fill","stroke","view"]},"mask-no-clip"],"mask-composite":[{mask:["add","subtract","intersect","exclude"]}],"mask-image-linear-pos":[{"mask-linear":[H]}],"mask-image-linear-from-pos":[{"mask-linear-from":eg()}],"mask-image-linear-to-pos":[{"mask-linear-to":eg()}],"mask-image-linear-from-color":[{"mask-linear-from":M()}],"mask-image-linear-to-color":[{"mask-linear-to":M()}],"mask-image-t-from-pos":[{"mask-t-from":eg()}],"mask-image-t-to-pos":[{"mask-t-to":eg()}],"mask-image-t-from-color":[{"mask-t-from":M()}],"mask-image-t-to-color":[{"mask-t-to":M()}],"mask-image-r-from-pos":[{"mask-r-from":eg()}],"mask-image-r-to-pos":[{"mask-r-to":eg()}],"mask-image-r-from-color":[{"mask-r-from":M()}],"mask-image-r-to-color":[{"mask-r-to":M()}],"mask-image-b-from-pos":[{"mask-b-from":eg()}],"mask-image-b-to-pos":[{"mask-b-to":eg()}],"mask-image-b-from-color":[{"mask-b-from":M()}],"mask-image-b-to-color":[{"mask-b-to":M()}],"mask-image-l-from-pos":[{"mask-l-from":eg()}],"mask-image-l-to-pos":[{"mask-l-to":eg()}],"mask-image-l-from-color":[{"mask-l-from":M()}],"mask-image-l-to-color":[{"mask-l-to":M()}],"mask-image-x-from-pos":[{"mask-x-from":eg()}],"mask-image-x-to-pos":[{"mask-x-to":eg()}],"mask-image-x-from-color":[{"mask-x-from":M()}],"mask-image-x-to-color":[{"mask-x-to":M()}],"mask-image-y-from-pos":[{"mask-y-from":eg()}],"mask-image-y-to-pos":[{"mask-y-to":eg()}],"mask-image-y-from-color":[{"mask-y-from":M()}],"mask-image-y-to-color":[{"mask-y-to":M()}],"mask-image-radial":[{"mask-radial":[el,ee]}],"mask-image-radial-from-pos":[{"mask-radial-from":eg()}],"mask-image-radial-to-pos":[{"mask-radial-to":eg()}],"mask-image-radial-from-color":[{"mask-radial-from":M()}],"mask-image-radial-to-color":[{"mask-radial-to":M()}],"mask-image-radial-shape":[{"mask-radial":["circle","ellipse"]}],"mask-image-radial-size":[{"mask-radial":[{closest:["side","corner"],farthest:["side","corner"]}]}],"mask-image-radial-pos":[{"mask-radial-at":E()}],"mask-image-conic-pos":[{"mask-conic":[H]}],"mask-image-conic-from-pos":[{"mask-conic-from":eg()}],"mask-image-conic-to-pos":[{"mask-conic-to":eg()}],"mask-image-conic-from-color":[{"mask-conic-from":M()}],"mask-image-conic-to-color":[{"mask-conic-to":M()}],"mask-mode":[{mask:["alpha","luminance","match"]}],"mask-origin":[{"mask-origin":["border","padding","content","fill","stroke","view"]}],"mask-position":[{mask:O()}],"mask-repeat":[{mask:U()}],"mask-size":[{mask:P()}],"mask-type":[{"mask-type":["alpha","luminance"]}],"mask-image":[{mask:["none",el,ee]}],filter:[{filter:["","none",el,ee]}],blur:[{blur:em()}],brightness:[{brightness:[H,el,ee]}],contrast:[{contrast:[H,el,ee]}],"drop-shadow":[{"drop-shadow":["","none",A,ep,eo]}],"drop-shadow-color":[{"drop-shadow":M()}],grayscale:[{grayscale:["",H,el,ee]}],"hue-rotate":[{"hue-rotate":[H,el,ee]}],invert:[{invert:["",H,el,ee]}],saturate:[{saturate:[H,el,ee]}],sepia:[{sepia:["",H,el,ee]}],"backdrop-filter":[{"backdrop-filter":["","none",el,ee]}],"backdrop-blur":[{"backdrop-blur":em()}],"backdrop-brightness":[{"backdrop-brightness":[H,el,ee]}],"backdrop-contrast":[{"backdrop-contrast":[H,el,ee]}],"backdrop-grayscale":[{"backdrop-grayscale":["",H,el,ee]}],"backdrop-hue-rotate":[{"backdrop-hue-rotate":[H,el,ee]}],"backdrop-invert":[{"backdrop-invert":["",H,el,ee]}],"backdrop-opacity":[{"backdrop-opacity":[H,el,ee]}],"backdrop-saturate":[{"backdrop-saturate":[H,el,ee]}],"backdrop-sepia":[{"backdrop-sepia":["",H,el,ee]}],"border-collapse":[{border:["collapse","separate"]}],"border-spacing":[{"border-spacing":v()}],"border-spacing-x":[{"border-spacing-x":v()}],"border-spacing-y":[{"border-spacing-y":v()}],"table-layout":[{table:["auto","fixed"]}],caption:[{caption:["top","bottom"]}],transition:[{transition:["","all","colors","opacity","shadow","transform","none",el,ee]}],"transition-behavior":[{transition:["normal","discrete"]}],duration:[{duration:[H,"initial",el,ee]}],ease:[{ease:["linear","initial",m,el,ee]}],delay:[{delay:[H,el,ee]}],animate:[{animate:["none",y,el,ee]}],backface:[{backface:["hidden","visible"]}],perspective:[{perspective:[f,el,ee]}],"perspective-origin":[{"perspective-origin":C()}],rotate:[{rotate:ey()}],"rotate-x":[{"rotate-x":ey()}],"rotate-y":[{"rotate-y":ey()}],"rotate-z":[{"rotate-z":ey()}],scale:[{scale:eb()}],"scale-x":[{"scale-x":eb()}],"scale-y":[{"scale-y":eb()}],"scale-z":[{"scale-z":eb()}],"scale-3d":["scale-3d"],skew:[{skew:eE()}],"skew-x":[{"skew-x":eE()}],"skew-y":[{"skew-y":eE()}],transform:[{transform:[el,ee,"","none","gpu","cpu"]}],"transform-origin":[{origin:C()}],"transform-style":[{transform:["3d","flat"]}],translate:[{translate:eC()}],"translate-x":[{"translate-x":eC()}],"translate-y":[{"translate-y":eC()}],"translate-z":[{"translate-z":eC()}],"translate-none":["translate-none"],accent:[{accent:M()}],appearance:[{appearance:["none","auto"]}],"caret-color":[{caret:M()}],"color-scheme":[{scheme:["normal","dark","light","light-dark","only-dark","only-light"]}],cursor:[{cursor:["auto","default","pointer","wait","text","move","help","not-allowed","none","context-menu","progress","cell","crosshair","vertical-text","alias","copy","no-drop","grab","grabbing","all-scroll","col-resize","row-resize","n-resize","e-resize","s-resize","w-resize","ne-resize","nw-resize","se-resize","sw-resize","ew-resize","ns-resize","nesw-resize","nwse-resize","zoom-in","zoom-out",el,ee]}],"field-sizing":[{"field-sizing":["fixed","content"]}],"pointer-events":[{"pointer-events":["auto","none"]}],resize:[{resize:["none","","y","x"]}],"scroll-behavior":[{scroll:["auto","smooth"]}],"scroll-m":[{"scroll-m":v()}],"scroll-mx":[{"scroll-mx":v()}],"scroll-my":[{"scroll-my":v()}],"scroll-ms":[{"scroll-ms":v()}],"scroll-me":[{"scroll-me":v()}],"scroll-mbs":[{"scroll-mbs":v()}],"scroll-mbe":[{"scroll-mbe":v()}],"scroll-mt":[{"scroll-mt":v()}],"scroll-mr":[{"scroll-mr":v()}],"scroll-mb":[{"scroll-mb":v()}],"scroll-ml":[{"scroll-ml":v()}],"scroll-p":[{"scroll-p":v()}],"scroll-px":[{"scroll-px":v()}],"scroll-py":[{"scroll-py":v()}],"scroll-ps":[{"scroll-ps":v()}],"scroll-pe":[{"scroll-pe":v()}],"scroll-pbs":[{"scroll-pbs":v()}],"scroll-pbe":[{"scroll-pbe":v()}],"scroll-pt":[{"scroll-pt":v()}],"scroll-pr":[{"scroll-pr":v()}],"scroll-pb":[{"scroll-pb":v()}],"scroll-pl":[{"scroll-pl":v()}],"snap-align":[{snap:["start","end","center","align-none"]}],"snap-stop":[{snap:["normal","always"]}],"snap-type":[{snap:["none","x","y","both"]}],"snap-strictness":[{snap:["mandatory","proximity"]}],touch:[{touch:["auto","none","manipulation"]}],"touch-x":[{"touch-pan":["x","left","right"]}],"touch-y":[{"touch-pan":["y","up","down"]}],"touch-pz":["touch-pinch-zoom"],select:[{select:["none","text","all","auto"]}],"will-change":[{"will-change":["auto","scroll","contents","transform",el,ee]}],fill:[{fill:["none",...M()]}],"stroke-w":[{stroke:[H,ec,et,ei]}],stroke:[{stroke:["none",...M()]}],"forced-color-adjust":[{"forced-color-adjust":["auto","none"]}]},conflictingClassGroups:{overflow:["overflow-x","overflow-y"],overscroll:["overscroll-x","overscroll-y"],inset:["inset-x","inset-y","inset-bs","inset-be","start","end","top","right","bottom","left"],"inset-x":["right","left"],"inset-y":["top","bottom"],flex:["basis","grow","shrink"],gap:["gap-x","gap-y"],p:["px","py","ps","pe","pbs","pbe","pt","pr","pb","pl"],px:["pr","pl"],py:["pt","pb"],m:["mx","my","ms","me","mbs","mbe","mt","mr","mb","ml"],mx:["mr","ml"],my:["mt","mb"],size:["w","h"],"font-size":["leading"],"fvn-normal":["fvn-ordinal","fvn-slashed-zero","fvn-figure","fvn-spacing","fvn-fraction"],"fvn-ordinal":["fvn-normal"],"fvn-slashed-zero":["fvn-normal"],"fvn-figure":["fvn-normal"],"fvn-spacing":["fvn-normal"],"fvn-fraction":["fvn-normal"],"line-clamp":["display","overflow"],rounded:["rounded-s","rounded-e","rounded-t","rounded-r","rounded-b","rounded-l","rounded-ss","rounded-se","rounded-ee","rounded-es","rounded-tl","rounded-tr","rounded-br","rounded-bl"],"rounded-s":["rounded-ss","rounded-es"],"rounded-e":["rounded-se","rounded-ee"],"rounded-t":["rounded-tl","rounded-tr"],"rounded-r":["rounded-tr","rounded-br"],"rounded-b":["rounded-br","rounded-bl"],"rounded-l":["rounded-tl","rounded-bl"],"border-spacing":["border-spacing-x","border-spacing-y"],"border-w":["border-w-x","border-w-y","border-w-s","border-w-e","border-w-bs","border-w-be","border-w-t","border-w-r","border-w-b","border-w-l"],"border-w-x":["border-w-r","border-w-l"],"border-w-y":["border-w-t","border-w-b"],"border-color":["border-color-x","border-color-y","border-color-s","border-color-e","border-color-bs","border-color-be","border-color-t","border-color-r","border-color-b","border-color-l"],"border-color-x":["border-color-r","border-color-l"],"border-color-y":["border-color-t","border-color-b"],translate:["translate-x","translate-y","translate-none"],"translate-none":["translate","translate-x","translate-y","translate-z"],"scroll-m":["scroll-mx","scroll-my","scroll-ms","scroll-me","scroll-mbs","scroll-mbe","scroll-mt","scroll-mr","scroll-mb","scroll-ml"],"scroll-mx":["scroll-mr","scroll-ml"],"scroll-my":["scroll-mt","scroll-mb"],"scroll-p":["scroll-px","scroll-py","scroll-ps","scroll-pe","scroll-pbs","scroll-pbe","scroll-pt","scroll-pr","scroll-pb","scroll-pl"],"scroll-px":["scroll-pr","scroll-pl"],"scroll-py":["scroll-pt","scroll-pb"],touch:["touch-x","touch-y","touch-pz"],"touch-x":["touch"],"touch-y":["touch"],"touch-pz":["touch"]},conflictingClassGroupModifiers:{"font-size":["leading"]},orderSensitiveModifiers:["*","**","after","backdrop","before","details-content","file","first-letter","first-line","marker","placeholder","selection"]}});function ex(...e){return eQ((0,t.clsx)(e))}e.s(["cn",()=>ex],999994)},44865,e=>{"use strict";var t=e.i(198526),i=e.i(999994);let r={info:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M18 10a8 8 0 11-16 0 8 8 0 0116 0zm-7-4a1 1 0 11-2 0 1 1 0 012 0zM9 9a1 1 0 000 2v3a1 1 0 001 1h1a1 1 0 100-2v-3a1 1 0 00-1-1H9z",clipRule:"evenodd"})}),warning:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M8.257 3.099c.765-1.36 2.722-1.36 3.486 0l5.58 9.92c.75 1.334-.213 2.98-1.742 2.98H4.42c-1.53 0-2.493-1.646-1.743-2.98l5.58-9.92zM11 13a1 1 0 11-2 0 1 1 0 012 0zm-1-8a1 1 0 00-1 1v3a1 1 0 002 0V6a1 1 0 00-1-1z",clipRule:"evenodd"})}),success:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})}),tip:(0,t.jsx)("svg",{className:"w-6 h-6",fill:"currentColor",viewBox:"0 0 20 20",children:(0,t.jsx)("path",{d:"M9.049 2.927c.3-.921 1.603-.921 1.902 0l1.07 3.292a1 1 0 00.95.69h3.462c.969 0 1.371 1.24.588 1.81l-2.8 2.034a1 1 0 00-.364 1.118l1.07 3.292c.3.921-.755 1.688-1.54 1.118l-2.8-2.034a1 1 0 00-1.175 0l-2.8 2.034c-.784.57-1.838-.197-1.539-1.118l1.07-3.292a1 1 0 00-.364-1.118L2.98 8.72c-.783-.57-.38-1.81.588-1.81h3.461a1 1 0 00.951-.69l1.07-3.292z"})})},n={info:"bg-blue-50 border-blue-200 text-blue-900",warning:"bg-yellow-50 border-yellow-200 text-yellow-900",success:"bg-green-50 border-green-200 text-green-900",tip:"bg-purple-50 border-purple-200 text-purple-900"},s={info:"text-blue-500",warning:"text-yellow-500",success:"text-green-500",tip:"text-purple-500"};function a({type:e="info",title:a,children:o,className:l}){return(0,t.jsx)("div",{className:(0,i.cn)("my-8 p-6 rounded-xl border-2",n[e],l),children:(0,t.jsxs)("div",{className:"flex gap-4",children:[(0,t.jsx)("div",{className:(0,i.cn)("flex-shrink-0",s[e]),children:r[e]}),(0,t.jsxs)("div",{className:"flex-1",children:[a&&(0,t.jsx)("h4",{className:"font-bold text-base md:text-lg mb-2",children:a}),(0,t.jsx)("div",{className:"prose prose-sm md:prose-base max-w-none",children:o})]})]})})}e.s(["Callout",()=>a])},589489,e=>{"use strict";var t=e.i(44865),i=e.i(560765);let r={slug:"callout",render:t.Callout,fields:[{name:"type",type:"select",options:["info","warning","important","tip","caution"],defaultValue:"info"},{name:"content",type:"richText",editor:(0,i.lexicalEditor)({}),required:!0}]};e.s(["Callout",0,r])},558184,e=>{"use strict";let t={slug:"categoryGrid",interfaceName:"CategoryGridBlock",fields:[{name:"categories",type:"array",required:!0,minRows:1,fields:[{name:"title",type:"text",required:!0},{name:"description",type:"textarea",required:!1},{name:"image",type:"upload",relationTo:"media",required:!1},{name:"icon",type:"upload",relationTo:"media",required:!1},{name:"href",type:"text",required:!0},{name:"ctaLabel",type:"text",required:!1}]}]};e.s(["CategoryGrid",0,t])},526157,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"warnOnce",{enumerable:!0,get:function(){return r}});let r=e=>{}},270592,(e,t,i)=>{"use strict";function r(){return!1}function n(){return r(),""}Object.defineProperty(i,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(i,{getDeploymentId:function(){return r},getDeploymentIdQueryOrEmptyString:function(){return n}})},159865,(e,t,i)=>{"use strict";function r({widthInt:e,heightInt:t,blurWidth:i,blurHeight:r,blurDataURL:n,objectFit:s}){let a=20,o=i?40*i:e,l=r?40*r:t,c=o&&l?`viewBox='0 0 ${o} ${l}'`:"",d=c?"none":"contain"===s?"xMidYMid":"cover"===s?"xMidYMid slice":"none";return`%3Csvg xmlns='http://www.w3.org/2000/svg' ${c}%3E%3Cfilter id='b' color-interpolation-filters='sRGB'%3E%3CfeGaussianBlur stdDeviation='${a}'/%3E%3CfeColorMatrix values='1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 100 -1' result='s'/%3E%3CfeFlood x='0' y='0' width='100%25' height='100%25'/%3E%3CfeComposite operator='out' in='s'/%3E%3CfeComposite in2='SourceGraphic'/%3E%3CfeGaussianBlur stdDeviation='${a}'/%3E%3C/filter%3E%3Cimage width='100%25' height='100%25' x='0' y='0' preserveAspectRatio='${d}' style='filter: url(%23b);' href='${n}'/%3E%3C/svg%3E`}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImageBlurSvg",{enumerable:!0,get:function(){return r}})},257165,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(i,{VALID_LOADERS:function(){return r},imageConfigDefault:function(){return n}});let r=["default","imgix","cloudinary","akamai","custom"],n={deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],path:"/_next/image",loader:"default",loaderFile:"",domains:[],disableStaticImages:!1,minimumCacheTTL:14400,formats:["image/webp"],maximumRedirects:3,maximumResponseBody:5e7,dangerouslyAllowLocalIP:!1,dangerouslyAllowSVG:!1,contentSecurityPolicy:"script-src 'none'; frame-src 'none'; sandbox;",contentDispositionType:"attachment",localPatterns:void 0,remotePatterns:[],qualities:[75],unoptimized:!1}},81653,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"getImgProps",{enumerable:!0,get:function(){return A}}),e.r(526157);let r=e.r(270592),n=e.r(159865),s=e.r(257165),a=["-moz-initial","fill","none","scale-down",void 0];function o(e){return void 0!==e.default}function l(e){return void 0!==e.src}function c(e){return!!e&&"object"==typeof e&&(o(e)||l(e))}function d(e){return void 0===e?e:"number"==typeof e?Number.isFinite(e)?e:NaN:"string"==typeof e&&/^[0-9]+$/.test(e)?parseInt(e,10):NaN}function u({deviceSizes:e,allSizes:t},i,r){if(r){let i=/(^|\s)(1?\d?\d)vw/g,n=[];for(let e;e=i.exec(r);)n.push(parseInt(e[2]));if(n.length){let i=.01*Math.min(...n);return{widths:t.filter(t=>t>=e[0]*i),kind:"w"}}return{widths:t,kind:"w"}}return"number"!=typeof i?{widths:e,kind:"w"}:{widths:[...new Set([i,2*i].map(e=>t.find(t=>t>=e)||t[t.length-1]))],kind:"x"}}function h({config:e,src:t,unoptimized:i,width:n,quality:s,sizes:a,loader:o}){if(i){let e=(0,r.getDeploymentId)();if(t.startsWith("/")&&!t.startsWith("//")&&e){let i=t.includes("?")?"&":"?";t=`${t}${i}dpl=${e}`}return{src:t,srcSet:void 0,sizes:void 0}}let{widths:l,kind:c}=u(e,n,a),d=l.length-1;return{sizes:a||"w"!==c?a:"100vw",srcSet:l.map((i,r)=>`${o({config:e,src:t,quality:s,width:i})} ${"w"===c?i:r+1}${c}`).join(", "),src:o({config:e,src:t,quality:s,width:l[d]})}}function A({src:e,sizes:t,unoptimized:i=!1,priority:r=!1,preload:l=!1,loading:u,className:A,quality:p,width:f,height:g,fill:m=!1,style:y,overrideSrc:b,onLoad:E,onLoadingComplete:C,placeholder:w="empty",blurDataURL:I,fetchPriority:v,decoding:B="async",layout:Q,objectFit:x,objectPosition:S,lazyBoundary:k,lazyRoot:T,...N},D){let _,R,L,{imgConf:F,showAltText:M,blurComplete:O,defaultLoader:U}=D,P=F||s.imageConfigDefault;if("allSizes"in P)_=P;else{let e=[...P.deviceSizes,...P.imageSizes].sort((e,t)=>e-t),t=P.deviceSizes.sort((e,t)=>e-t),i=P.qualities?.sort((e,t)=>e-t);_={...P,allSizes:e,deviceSizes:t,qualities:i}}if(void 0===U)throw Object.defineProperty(Error("images.loaderFile detected but the file is missing default export.\nRead more: https://nextjs.org/docs/messages/invalid-images-config"),"__NEXT_ERROR_CODE",{value:"E163",enumerable:!1,configurable:!0});let $=N.loader||U;delete N.loader,delete N.srcSet;let j="__next_img_default"in $;if(j){if("custom"===_.loader)throw Object.defineProperty(Error(`Image with src "${e}" is missing "loader" prop.
|
||
Read more: https://nextjs.org/docs/messages/next-image-missing-loader`),"__NEXT_ERROR_CODE",{value:"E252",enumerable:!1,configurable:!0})}else{let e=$;$=t=>{let{config:i,...r}=t;return e(r)}}if(Q){"fill"===Q&&(m=!0);let e={responsive:"100vw",fill:"100vw"},i={intrinsic:{maxWidth:"100%",height:"auto"},responsive:{width:"100%",height:"auto"}}[Q];i&&(y={...y,...i});let r=e[Q];r&&!t&&(t=r)}let H="",q=d(f),z=d(g);if(c(e)){let t=o(e)?e.default:e;if(!t.src)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include src. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E460",enumerable:!1,configurable:!0});if(!t.height||!t.width)throw Object.defineProperty(Error(`An object should only be passed to the image component src parameter if it comes from a static image import. It must include height and width. Received ${JSON.stringify(t)}`),"__NEXT_ERROR_CODE",{value:"E48",enumerable:!1,configurable:!0});if(R=t.blurWidth,L=t.blurHeight,I=I||t.blurDataURL,H=t.src,!m)if(q||z){if(q&&!z){let e=q/t.width;z=Math.round(t.height*e)}else if(!q&&z){let e=z/t.height;q=Math.round(t.width*e)}}else q=t.width,z=t.height}let V=!r&&!l&&("lazy"===u||void 0===u);(!(e="string"==typeof e?e:H)||e.startsWith("data:")||e.startsWith("blob:"))&&(i=!0,V=!1),_.unoptimized&&(i=!0),j&&!_.dangerouslyAllowSVG&&e.split("?",1)[0].endsWith(".svg")&&(i=!0);let G=d(p),Y=Object.assign(m?{position:"absolute",height:"100%",width:"100%",left:0,top:0,right:0,bottom:0,objectFit:x,objectPosition:S}:{},M?{}:{color:"transparent"},y),W=O||"empty"===w?null:"blur"===w?`url("data:image/svg+xml;charset=utf-8,${(0,n.getImageBlurSvg)({widthInt:q,heightInt:z,blurWidth:R,blurHeight:L,blurDataURL:I||"",objectFit:Y.objectFit})}")`:`url("${w}")`,J=a.includes(Y.objectFit)?"fill"===Y.objectFit?"100% 100%":"cover":Y.objectFit,K=W?{backgroundSize:J,backgroundPosition:Y.objectPosition||"50% 50%",backgroundRepeat:"no-repeat",backgroundImage:W}:{},Z=h({config:_,src:e,unoptimized:i,width:q,quality:G,sizes:t,loader:$}),X=V?"lazy":u;return{props:{...N,loading:X,fetchPriority:v,width:q,height:z,decoding:B,className:A,style:{...Y,...K},sizes:Z.sizes,srcSet:Z.srcSet,src:b||Z.src},meta:{unoptimized:i,preload:l||r,placeholder:w,fill:m}}}},280989,(e,t,i)=>{let{createClientModuleProxy:r}=e.r(626481);e.n(r("[project]/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/client/image-component.js <module evaluation>"))},614130,(e,t,i)=>{let{createClientModuleProxy:r}=e.r(626481);e.n(r("[project]/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/client/image-component.js"))},465588,e=>{"use strict";e.i(280989);var t=e.i(614130);e.n(t)},55779,(e,t,i)=>{"use strict";function r(e,t){let i=e||75;return t?.qualities?.length?t.qualities.reduce((e,t)=>Math.abs(t-i)<Math.abs(e-i)?t:e,0):i}Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"findClosestQuality",{enumerable:!0,get:function(){return r}})},638800,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),Object.defineProperty(i,"default",{enumerable:!0,get:function(){return a}});let r=e.r(55779),n=e.r(270592);function s({config:e,src:t,width:i,quality:s}){if(t.startsWith("/")&&t.includes("?")&&e.localPatterns?.length===1&&"**"===e.localPatterns[0].pathname&&""===e.localPatterns[0].search)throw Object.defineProperty(Error(`Image with src "${t}" is using a query string which is not configured in images.localPatterns.
|
||
Read more: https://nextjs.org/docs/messages/next-image-unconfigured-localpatterns`),"__NEXT_ERROR_CODE",{value:"E871",enumerable:!1,configurable:!0});let a=(0,r.findClosestQuality)(s,e),o=(0,n.getDeploymentId)();return`${e.path}?url=${encodeURIComponent(t)}&w=${i}&q=${a}${t.startsWith("/")&&o?`&dpl=${o}`:""}`}s.__next_img_default=!0;let a=s},52068,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(i,{default:function(){return l},getImageProps:function(){return o}});let r=e.r(166740),n=e.r(81653),s=e.r(465588),a=r._(e.r(638800));function o(e){let{props:t}=(0,n.getImgProps)(e,{defaultLoader:a.default,imgConf:{deviceSizes:[640,750,828,1080,1200,1920,2048,3840],imageSizes:[32,48,64,96,128,256,384],qualities:[25,50,75,100],path:"/_next/image",loader:"default",dangerouslyAllowSVG:!1,unoptimized:!1}});for(let[e,i]of Object.entries(t))void 0===i&&delete t[e];return{props:t}}let l=s.Image},641090,(e,t,i)=>{t.exports=e.r(52068)},398885,e=>{"use strict";var t=e.i(560765),i=e.i(198526),r=e.i(641090);let n={slug:"chatBubble",render:function({author:e="KLZ Team",avatar:t="/uploads/2024/11/cropped-favicon-3-192x192.png",role:n="Assistant",children:s,align:a="left"}){let o="right"===a;return(0,i.jsxs)("div",{className:`flex w-full gap-4 my-10 ${o?"flex-row-reverse":"flex-row"}`,children:[(0,i.jsx)("div",{className:"flex-shrink-0 flex flex-col items-center gap-1",children:(0,i.jsxs)("div",{className:"w-10 h-10 rounded-full overflow-hidden border border-neutral-200 shadow-sm relative",children:[(0,i.jsx)("div",{className:"w-full h-full bg-neutral-100 flex items-center justify-center text-xs font-bold text-neutral-400",children:e.charAt(0)}),t&&(0,i.jsx)(r.default,{src:t,alt:e,fill:!0,className:"object-cover"})]})}),(0,i.jsxs)("div",{className:`flex flex-col max-w-[85%] ${o?"items-end":"items-start"}`,children:[(0,i.jsxs)("div",{className:"flex items-baseline gap-2 mb-1",children:[(0,i.jsx)("span",{className:"text-sm md:text-base font-bold text-text-primary",children:e}),n&&(0,i.jsx)("span",{className:"text-xs md:text-sm text-text-secondary",children:n})]}),(0,i.jsxs)("div",{className:`
|
||
relative px-8 py-6 rounded-3xl shadow-sm border transition-all duration-300 hover:shadow-md
|
||
${o?"bg-neutral-dark text-white rounded-tr-none border-neutral-dark":"bg-white text-text-primary rounded-tl-none border-neutral-200"}
|
||
`,children:[(0,i.jsx)("div",{className:`prose prose-base md:prose-lg max-w-none ${o?"prose-invert":""}`,children:s}),(0,i.jsx)("div",{className:`absolute top-4 ${o?"left-4":"right-4"} w-1.5 h-1.5 rounded-full ${o?"bg-primary":"bg-primary/30"}`})]})]})]})},fields:[{name:"author",type:"text",defaultValue:"KLZ Team"},{name:"avatar",type:"text"},{name:"role",type:"text",defaultValue:"Assistant"},{name:"align",type:"select",options:["left","right"],defaultValue:"left"},{name:"content",type:"richText",editor:(0,t.lexicalEditor)({}),required:!0}]};e.s(["ChatBubble",0,n],398885)},522058,e=>{"use strict";var t=e.i(198526);let i={slug:"comparisonGrid",render:function({title:e,leftLabel:i,rightLabel:r,items:n}){return(0,t.jsxs)("div",{className:"my-16 not-prose",children:[e&&(0,t.jsx)("h3",{className:"text-2xl font-bold text-text-primary mb-8",children:e}),(0,t.jsxs)("div",{className:"border border-neutral-200 rounded-3xl overflow-hidden shadow-sm bg-white",children:[(0,t.jsxs)("div",{className:"grid grid-cols-3 bg-neutral-50 border-b border-neutral-200",children:[(0,t.jsx)("div",{className:"p-4 md:p-6"}),(0,t.jsx)("div",{className:"p-4 md:p-6 text-center font-bold text-primary uppercase tracking-widest border-l border-neutral-200 text-xs md:text-sm",children:i}),(0,t.jsx)("div",{className:"p-4 md:p-6 text-center font-bold text-primary uppercase tracking-widest border-l border-neutral-200 text-xs md:text-sm",children:r})]}),n.map((e,i)=>(0,t.jsxs)("div",{className:"grid grid-cols-3 border-b border-neutral-200 last:border-0 hover:bg-neutral-50 transition-colors group",children:[(0,t.jsx)("div",{className:"p-4 md:p-6 font-bold text-text-primary flex items-center text-sm md:text-base",children:e.label}),(0,t.jsx)("div",{className:"p-4 md:p-6 text-center text-text-secondary border-l border-neutral-200 flex items-center justify-center group-hover:text-text-primary transition-colors text-sm md:text-base",children:e.leftValue}),(0,t.jsx)("div",{className:"p-4 md:p-6 text-center text-text-secondary border-l border-neutral-200 flex items-center justify-center group-hover:text-text-primary transition-colors text-sm md:text-base",children:e.rightValue})]},i))]})]})},fields:[{name:"title",label:"Main Heading",type:"text",required:!0},{name:"leftLabel",type:"text",required:!0},{name:"rightLabel",type:"text",required:!0},{name:"items",type:"array",required:!0,minRows:1,fields:[{name:"label",label:"Row Label",type:"text",required:!0},{name:"leftValue",type:"text",required:!0},{name:"rightValue",type:"text",required:!0}]}]};e.s(["ComparisonGrid",0,i],522058)},530356,e=>{"use strict";e.s(["ContactSection",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call ContactSection() from the server but ContactSection is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/ContactSection.tsx <module evaluation>","ContactSection")},226061,e=>{"use strict";e.s(["ContactSection",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call ContactSection() from the server but ContactSection is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/ContactSection.tsx","ContactSection")},881332,e=>{"use strict";e.i(530356);var t=e.i(226061);e.n(t)},154370,e=>{"use strict";let t={slug:"contactSection",interfaceName:"ContactSectionBlock",render:e.i(881332).ContactSection,fields:[{name:"showForm",type:"checkbox",defaultValue:!0,label:"Show Contact Form"},{name:"showMap",type:"checkbox",defaultValue:!0,label:"Show Map"},{name:"showHours",type:"checkbox",defaultValue:!0,label:"Show Opening Hours"}]};e.s(["ContactSection",0,t])},870391,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/Reveal.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/Reveal.tsx <module evaluation>","default")},270212,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/Reveal.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/Reveal.tsx","default")},151880,e=>{"use strict";e.i(870391);var t=e.i(270212);e.n(t)},653261,(e,t,i)=>{"use strict";function r(e){if("function"!=typeof WeakMap)return null;var t=new WeakMap,i=new WeakMap;return(r=function(e){return e?i:t})(e)}i._=function(e,t){if(!t&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var i=r(t);if(i&&i.has(e))return i.get(e);var n={__proto__:null},s=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if("default"!==a&&Object.prototype.hasOwnProperty.call(e,a)){var o=s?Object.getOwnPropertyDescriptor(e,a):null;o&&(o.get||o.set)?Object.defineProperty(n,a,o):n[a]=e[a]}return n.default=e,i&&i.set(e,n),n}},68663,(e,t,i)=>{let{createClientModuleProxy:r}=e.r(626481);e.n(r("[project]/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/client/app-dir/link.js <module evaluation>"))},990187,(e,t,i)=>{let{createClientModuleProxy:r}=e.r(626481);e.n(r("[project]/node_modules/.pnpm/next@16.1.6_@babel+core@7.29.0_@opentelemetry+api@1.9.1_react-dom@19.2.4_react@19.2.4__react@19.2.4_sass@1.98.0/node_modules/next/dist/client/app-dir/link.js"))},202277,e=>{"use strict";e.i(68663);var t=e.i(990187);e.n(t)},428131,(e,t,i)=>{"use strict";Object.defineProperty(i,"__esModule",{value:!0}),function(e,t){for(var i in t)Object.defineProperty(e,i,{enumerable:!0,get:t[i]})}(i,{default:function(){return a},useLinkStatus:function(){return s.useLinkStatus}});let r=e.r(653261),n=e.r(198526),s=r._(e.r(202277));function a(e){let t=e.legacyBehavior,i="string"==typeof e.children||"number"==typeof e.children||"string"==typeof e.children?.type,r=e.children?.type?.$$typeof===Symbol.for("react.client.reference");return!t||i||r||(e.children?.type?.$$typeof===Symbol.for("react.lazy")?console.error("Using a Lazy Component as a direct child of `<Link legacyBehavior>` from a Server Component is not supported. If you need legacyBehavior, wrap your Lazy Component in a Client Component that renders the Link's `<a>` tag."):console.error("Using a Server Component as a direct child of `<Link legacyBehavior>` is not supported. If you need legacyBehavior, wrap your Server Component in a Client Component that renders the Link's `<a>` tag.")),(0,n.jsx)(s.default,{...e})}("function"==typeof i.default||"object"==typeof i.default&&null!==i.default)&&void 0===i.default.__esModule&&(Object.defineProperty(i.default,"__esModule",{value:!0}),Object.assign(i.default,i),t.exports=i.default)},199196,e=>{"use strict";var t=e.i(198526),i=e.i(999994);function r({className:e,children:r,...n}){return(0,t.jsx)("section",{className:(0,i.cn)("py-16 md:py-28 lg:py-36 overflow-hidden content-visibility-auto",e),...n,children:r})}e.s(["Section",()=>r])},663935,e=>{"use strict";var t=e.i(198526),i=e.i(999994);function r({className:e,children:r,...n}){return(0,t.jsx)("div",{className:(0,i.cn)("container mx-auto px-4 md:px-12 lg:px-16 max-w-7xl",e),...n,children:r})}e.s(["Container",()=>r])},125762,e=>{"use strict";var t=e.i(198526),i=e.i(999994);function r({level:e=2,children:r,className:n,subtitle:s,align:a="left"}){let o=`h${e}`,l={1:"text-2xl md:text-4xl lg:text-5xl font-bold leading-[1.1] tracking-tight",2:"text-xl md:text-3xl lg:text-4xl font-bold leading-[1.2] tracking-tight",3:"text-lg md:text-2xl lg:text-3xl font-bold leading-[1.3] tracking-tight",4:"text-lg md:text-xl lg:text-2xl font-bold leading-[1.4]",5:"text-base md:text-lg font-bold leading-[1.5]",6:"text-base md:text-lg font-semibold leading-[1.6]"},c={left:"text-left",center:"text-center mx-auto",right:"text-right"};return(0,t.jsxs)("div",{className:(0,i.cn)("mb-6 md:mb-12 text-primary",c[a],n),children:[s&&(0,t.jsx)("span",{className:"inline-block text-accent font-bold tracking-widest uppercase text-xs md:text-sm mb-3 md:mb-4 animate-fade-in",children:s}),(0,t.jsx)(o,{className:(0,i.cn)(l[e]),children:r})]})}e.s(["Heading",()=>r])},268578,911006,652661,e=>{"use strict";var t=e.i(999994),i=e.i(198526),r=e.i(428131),n=t;function s({className:e,variant:t="primary",size:s="md",href:a,...o}){let l="inline-flex items-center justify-center whitespace-nowrap rounded-full font-semibold transition-all duration-500 ease-out focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary focus-visible:ring-offset-2 disabled:opacity-50 disabled:pointer-events-none active:scale-95 hover:-translate-y-1 hover:scale-[1.02] relative overflow-hidden group/btn isolate",c={primary:"bg-primary text-white shadow-md hover:shadow-primary/30 hover:shadow-2xl",secondary:"bg-secondary text-white shadow-md hover:shadow-secondary/30 hover:shadow-2xl",accent:"bg-accent text-primary-dark shadow-md hover:shadow-accent/30 hover:shadow-2xl",saturated:"bg-saturated text-white shadow-md hover:shadow-primary/30 hover:shadow-2xl",outline:"border-2 border-primary bg-transparent text-primary hover:text-white hover:shadow-primary/20 hover:shadow-xl",ghost:"text-primary hover:shadow-lg",white:"bg-white text-primary shadow-md hover:shadow-primary/30 hover:shadow-2xl hover:text-white",destructive:"bg-destructive text-destructive-foreground shadow-md hover:shadow-destructive/30 hover:shadow-2xl"},d={sm:"h-9 px-4 text-sm md:text-base",md:"h-11 px-6 text-base md:text-lg",lg:"h-14 px-5 md:px-8 text-base md:text-lg",xl:"h-16 px-6 md:px-10 text-lg md:text-xl"},u=(0,n.cn)(l,c[t],d[s],e),h={primary:"bg-primary-dark",secondary:"bg-secondary-light",accent:"bg-accent-dark",saturated:"bg-primary",outline:"bg-primary",ghost:"bg-primary-light/10",white:"bg-primary-light",destructive:"bg-destructive/90"},A=(0,i.jsxs)(i.Fragment,{children:[(0,i.jsx)("span",{className:(0,n.cn)("relative z-10 flex items-center justify-center gap-2 transition-colors duration-500","white"===t?"group-hover/btn:text-primary-dark":""),children:o.children}),(0,i.jsx)("span",{className:(0,n.cn)("absolute inset-0 translate-y-[101%] group-hover/btn:translate-y-0 transition-transform duration-500 ease-out",h[t])})]});return a?(0,i.jsx)(r.default,{href:a,className:u,children:A}):(0,i.jsx)("button",{className:u,...o,children:A})}e.s(["Button",()=>s],911006),e.i(199196),e.i(663935),e.i(125762);var a=i,o=t;function l({children:e,className:t,variant:i="primary"}){let r={primary:"bg-primary-light text-primary",accent:"bg-accent-light text-accent-dark",neutral:"bg-neutral-medium text-text-secondary",saturated:"bg-saturated text-white"};return(0,a.jsx)("span",{className:(0,o.cn)("inline-flex items-center px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wider",r[i],t),children:e})}e.s(["Badge",()=>l],652661),e.i(44865),e.s([],268578)},482021,e=>{"use strict";var t=e.i(198526),i=e.i(641090),r=e.i(151880);e.i(268578);var n=e.i(652661),s=e.i(663935),a=e.i(125762);let o={slug:"heroSection",interfaceName:"HeroSectionBlock",render:e=>{let{title:o,badge:l,subtitle:c,backgroundImage:d,alignment:u,ctaLabel:h,ctaHref:A}=e,p=d?.sizes?.card?.url||d?.url;return(0,t.jsx)(r.default,{children:(0,t.jsxs)("section",{className:`relative min-h-[50vh] md:min-h-[70vh] flex items-center pt-32 pb-20 md:pt-40 md:pb-32 overflow-hidden bg-primary-dark ${"center"===u?"justify-center text-center":""}`,children:[p&&(0,t.jsxs)("div",{className:"absolute inset-0 z-0",children:[(0,t.jsx)(i.default,{src:p,alt:o||"Hero Background",fill:!0,className:"object-cover opacity-30 md:opacity-40",style:{objectPosition:`${d?.focalX??50}% ${d?.focalY??50}%`},sizes:"100vw",priority:!0}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-b from-primary-dark/80 via-primary-dark/40 to-primary-dark/80"})]}),(0,t.jsx)(s.Container,{className:`relative z-10 ${"center"===u?"max-w-5xl":""}`,children:(0,t.jsxs)("div",{className:`max-w-4xl ${"center"===u?"mx-auto":""}`,children:[l&&(0,t.jsx)(n.Badge,{variant:"saturated",className:"mb-4 md:mb-8 shadow-lg",children:l}),(0,t.jsx)(a.Heading,{level:1,className:"text-white mb-4 md:mb-8",children:o}),c&&(0,t.jsx)("p",{className:"text-lg md:text-2xl text-white/70 font-medium leading-relaxed max-w-2xl",children:c}),h&&A&&(0,t.jsx)("div",{className:"mt-8",children:(0,t.jsxs)("a",{href:A,className:"inline-flex items-center px-8 py-4 bg-accent text-primary-dark font-bold rounded-full hover:bg-white transition-all duration-300 group",children:[h,(0,t.jsx)("span",{className:"ml-3 transition-transform group-hover:translate-x-2",children:"→"})]})})]})})]})})},fields:[{name:"badge",type:"text",required:!1},{name:"title",type:"text",required:!0},{name:"subtitle",type:"textarea",required:!1},{name:"backgroundImage",type:"upload",relationTo:"media",required:!1},{name:"ctaLabel",type:"text",required:!1},{name:"ctaHref",type:"text",required:!1},{name:"alignment",type:"select",defaultValue:"left",options:[{label:"Left",value:"left"},{label:"Center",value:"center"}]}]};e.s(["HeroSection",0,o],482021)},754378,e=>{"use strict";let t={slug:"highlightBox",fields:[{name:"type",type:"select",options:["info","warning","success","error","neutral"],defaultValue:"neutral"},{name:"content",type:"richText",editor:(0,e.i(560765).lexicalEditor)({}),required:!0}]};e.s(["HighlightBox",0,t])},455980,e=>{"use strict";let t={slug:"imageGallery",interfaceName:"ImageGalleryBlock",fields:[{name:"images",type:"array",required:!0,minRows:1,fields:[{name:"image",type:"upload",relationTo:"media",required:!0},{name:"alt",type:"text",required:!1}]}]};e.s(["ImageGallery",0,t])},418910,e=>{"use strict";let t={slug:"manifestoGrid",interfaceName:"ManifestoGridBlock",fields:[{name:"title",type:"text",required:!1},{name:"subtitle",type:"text",required:!1},{name:"tagline",type:"textarea",required:!1},{name:"items",type:"array",required:!0,minRows:1,fields:[{name:"title",type:"text",required:!0},{name:"description",type:"textarea",required:!0}]}]};e.s(["ManifestoGrid",0,t])},766613,e=>{"use strict";let t={slug:"powerCTA",fields:[{name:"locale",type:"text",required:!0}]};e.s(["PowerCTA",0,t])},987117,e=>{"use strict";var t=e.i(560765),i=e.i(198526);let r={slug:"productTabs",interfaceName:"ProductTabsBlock",render:function({children:e,technicalData:t,sidebar:r}){return(0,i.jsxs)("div",{className:"space-y-24",children:[(0,i.jsxs)("div",{className:"flex flex-col lg:flex-row gap-12 items-start",children:[(0,i.jsxs)("div",{className:"flex-1 min-w-0",children:[r&&(0,i.jsx)("div",{className:"lg:hidden mb-12",children:r}),(0,i.jsx)("div",{className:"max-w-none",children:e})]}),r&&(0,i.jsx)("div",{className:"hidden lg:block sticky top-32 w-[350px] xl:w-[400px] flex-shrink-0",children:r})]}),t&&(0,i.jsxs)("div",{className:"pt-24 border-t-2 border-neutral-dark/5",children:[(0,i.jsxs)("div",{className:"mb-16",children:[(0,i.jsx)("h2",{className:"text-3xl md:text-4xl font-black text-primary tracking-tighter uppercase mb-4",children:"Technical Specifications"}),(0,i.jsx)("div",{className:"h-1.5 w-24 bg-accent rounded-full"})]}),(0,i.jsx)("div",{className:"not-prose",children:t})]})]})},fields:[{name:"technicalItems",type:"array",fields:[{name:"label",type:"text",required:!0},{name:"value",type:"text",required:!0},{name:"unit",type:"text"}]},{name:"voltageTables",type:"array",fields:[{name:"voltageLabel",type:"text",required:!0},{name:"metaItems",type:"array",fields:[{name:"label",type:"text",required:!0},{name:"value",type:"text",required:!0},{name:"unit",type:"text"}]},{name:"columns",type:"array",fields:[{name:"key",type:"text",required:!0},{name:"label",type:"text",required:!0}]},{name:"rows",type:"array",fields:[{name:"configuration",type:"text",required:!0},{name:"cells",type:"array",fields:[{name:"value",type:"text"}]}]}]},{name:"content",type:"richText",editor:(0,t.lexicalEditor)({features:({defaultFeatures:e})=>[...e]})}]};e.s(["ProductTabs",0,r],987117)},48873,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/blog/SplitHeading.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blog/SplitHeading.tsx <module evaluation>","default")},474670,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/blog/SplitHeading.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blog/SplitHeading.tsx","default")},883001,e=>{"use strict";e.i(48873);var t=e.i(474670);e.n(t)},959035,e=>{"use strict";let t={slug:"splitHeading",interfaceName:"SplitHeadingBlock",render:e.i(883001).default,fields:[{name:"title",type:"text",required:!0},{name:"id",type:"text"},{name:"level",type:"select",options:["h1","h2","h3","h4","h5","h6"],defaultValue:"h2"}]};e.s(["SplitHeading",0,t])},802148,e=>{"use strict";var t=e.i(198526);let i={slug:"stats",interfaceName:"StatsBlock",render:function({stats:e}){return(0,t.jsx)("div",{className:"my-16 grid grid-cols-1 md:grid-cols-3 border border-neutral-200 rounded-2xl overflow-hidden shadow-sm",children:e.map((i,r)=>(0,t.jsxs)("div",{className:`p-8 flex flex-col items-center text-center transition-all duration-500 hover:bg-neutral-50 group ${r!==e.length-1?"border-b md:border-b-0 md:border-r border-neutral-200":""}`,children:[i.icon&&(0,t.jsx)("div",{className:"text-primary mb-4 transform transition-transform group-hover:scale-110 duration-500",children:i.icon}),(0,t.jsx)("div",{className:"text-5xl font-bold text-text-primary mb-3 tracking-tight",children:i.value}),(0,t.jsx)("div",{className:"text-xs font-bold text-text-secondary uppercase tracking-[0.2em]",children:i.label}),(0,t.jsx)("div",{className:"w-8 h-[2px] bg-primary/20 mt-6 transition-all group-hover:w-16 group-hover:bg-primary duration-500"})]},r))})},fields:[{name:"stats",type:"array",required:!0,fields:[{name:"value",type:"text",required:!0},{name:"label",type:"text",required:!0}]}]};e.s(["Stats",0,i],802148)},640359,e=>{"use strict";var t=e.i(198526);let i={slug:"stickyNarrative",render:function({title:e,items:i}){return(0,t.jsxs)("div",{className:"my-24 grid grid-cols-1 lg:grid-cols-12 gap-12 lg:gap-20 items-start not-prose",children:[(0,t.jsxs)("div",{className:"lg:col-span-4 lg:sticky lg:top-32",children:[(0,t.jsx)("h3",{className:"text-2xl md:text-3xl font-bold text-primary leading-tight",children:e}),(0,t.jsx)("div",{className:"w-16 h-1.5 bg-accent mt-8 rounded-full"})]}),(0,t.jsx)("div",{className:"lg:col-span-8 space-y-12 md:space-y-16",children:i.map((e,i)=>(0,t.jsxs)("div",{className:"group border-b border-neutral-200 pb-12 last:border-0 last:pb-0",children:[(0,t.jsx)("h4",{className:"text-xl md:text-2xl font-bold text-text-primary mb-4 group-hover:text-primary transition-colors",children:e.title}),(0,t.jsx)("div",{className:"text-lg text-text-secondary leading-relaxed",children:e.content})]},i))})]})},fields:[{name:"title",label:"Main Heading",type:"text",required:!0},{name:"items",type:"array",required:!0,minRows:1,fields:[{name:"title",type:"text",required:!0},{name:"content",type:"textarea",required:!0}]}]};e.s(["StickyNarrative",0,i],640359)},908089,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/analytics/TrackedLink.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/analytics/TrackedLink.tsx <module evaluation>","default")},734412,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/analytics/TrackedLink.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/analytics/TrackedLink.tsx","default")},380202,e=>{"use strict";e.i(908089);var t=e.i(734412);e.n(t)},263112,e=>{"use strict";var t=e.i(198526),i=e.i(641090),r=e.i(151880);e.i(268578);var n=e.i(652661),s=e.i(125762),a=e.i(380202);let o={slug:"teamProfile",interfaceName:"TeamProfileBlock",render:e=>{let{name:o,role:l,image:c,quote:d,description:u,linkedinUrl:h,linkedinLabel:A,colorScheme:p,layout:f}=e,g=c?.sizes?.card?.url||c?.url,m="dark"===p,y="imageRight"===f;return(0,t.jsx)("article",{className:"relative bg-white overflow-hidden",children:(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row",children:[(0,t.jsx)(r.default,{className:`w-full lg:w-1/2 p-6 md:p-24 lg:p-32 flex flex-col justify-center relative ${y?"order-2 lg:order-1":"order-2"} ${m?"bg-primary-dark text-white":"bg-neutral-light text-saturated"}`,children:(0,t.jsxs)("div",{className:"relative z-10",children:[(0,t.jsx)(n.Badge,{variant:m?"accent":"saturated",className:"mb-4 md:mb-8",children:l}),(0,t.jsx)(s.Heading,{level:2,className:`${m?"text-white":"text-saturated"} mb-6 md:mb-10 text-3xl md:text-5xl`,children:o}),d&&(0,t.jsxs)("div",{className:"relative mb-6 md:mb-12",children:[(0,t.jsx)("div",{className:`absolute -left-4 md:-left-8 top-0 bottom-0 w-1 md:w-1.5 ${m?"bg-accent":"bg-saturated"} rounded-full`}),(0,t.jsx)("p",{className:`text-lg md:text-2xl font-bold italic leading-relaxed pl-5 md:pl-8 ${m?"text-white/90":"text-text-secondary"}`,children:d})]}),u&&(0,t.jsx)("p",{className:`text-base md:text-xl leading-relaxed mb-6 md:mb-12 max-w-xl ${m?"text-white/70":"text-text-secondary"}`,children:u}),h&&(0,t.jsxs)(a.default,{href:h,className:`inline-flex items-center px-8 py-4 font-bold rounded-full transition-all duration-300 group ${m?"bg-accent text-primary-dark hover:bg-white":"bg-saturated text-white hover:bg-primary"}`,eventProperties:{type:"social_linkedin",person:o,location:"team_page"},children:[A||"LinkedIn",(0,t.jsx)("span",{className:"ml-3 transition-transform group-hover:translate-x-2",children:"→"})]})]})}),(0,t.jsx)(r.default,{className:`w-full lg:w-1/2 relative min-h-[400px] md:min-h-[600px] lg:min-h-screen overflow-hidden ${y?"order-1 lg:order-2":"order-1"}`,children:g&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)(i.default,{src:g,alt:o,fill:!0,className:"object-cover scale-105 hover:scale-100 transition-transform duration-1000",style:{objectPosition:`${c?.focalX??50}% ${c?.focalY??50}%`},sizes:"(max-width: 1024px) 100vw, 50vw"}),(0,t.jsx)("div",{className:`absolute inset-0 ${m?"bg-gradient-to-t from-primary-dark/60 lg:bg-gradient-to-r lg:from-primary-dark/20 to-transparent":"bg-gradient-to-t from-white/60 lg:bg-gradient-to-l lg:from-primary-dark/20 to-transparent"}`})]})})]})})},fields:[{name:"name",type:"text",required:!0},{name:"role",type:"text",required:!0},{name:"quote",type:"textarea",required:!1},{name:"description",type:"textarea",required:!1},{name:"image",type:"upload",relationTo:"media",required:!1},{name:"linkedinUrl",type:"text",required:!1},{name:"linkedinLabel",type:"text",required:!1},{name:"layout",type:"select",defaultValue:"imageRight",options:[{label:"Image Right",value:"imageRight"},{label:"Image Left",value:"imageLeft"}]},{name:"colorScheme",type:"select",defaultValue:"dark",options:[{label:"Dark",value:"dark"},{label:"Light",value:"light"}]}]};e.s(["TeamProfile",0,o],263112)},246310,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/Scribble.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/Scribble.tsx <module evaluation>","default")},516315,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/Scribble.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/Scribble.tsx","default")},216072,e=>{"use strict";e.i(246310);var t=e.i(516315);e.n(t)},710347,e=>{"use strict";var t=e.i(198526),i=e.i(216072);function r(e){if(!e)return{original:"",isList:!1,parts:[],displayValue:""};let t=String(e).trim(),i=[];if(t.includes(" / "))i=t.split(" / ").map(e=>e.trim());else if(t.includes(" /"))i=t.split(" /").map(e=>e.trim());else if(t.includes("/ "))i=t.split("/ ").map(e=>e.trim());else if(t.split("/").length>2){let e=t.split("/");e.length>3&&(i=e.map(e=>e.trim()))}if(0===i.length&&t.includes(", ")&&(i=t.split(", ").map(e=>e.trim())),(i=i.filter(Boolean)).length>2){let e="",r=i[0],n=i[i.length-1],s=0;for(;s<r.length&&r.charAt(s)===n.charAt(s);)s++;if((e=r.substring(0,s)).length>4){let r=[];for(let t=0;t<i.length;t++)if(0===t)r.push(i[t]);else{let n=i[t].substring(e.length).trim();n&&r.push(n)}let n=r[0]+" / -"+r.slice(1).join(" / -");return{original:t,isList:!1,parts:[n],displayValue:n}}return{original:t,isList:!0,parts:i,displayValue:i.join(", ")}}return{original:t,isList:!1,parts:[t],displayValue:t}}let n={slug:"technicalGrid",render:function({title:e,items:n}){return(0,t.jsxs)("div",{className:"my-16 not-prose",children:[e&&(0,t.jsx)("h3",{className:"text-2xl font-bold text-text-primary mb-8 flex items-center gap-4 relative",children:(0,t.jsxs)("span",{className:"relative inline-block",children:[e,(0,t.jsx)(i.default,{variant:"underline",className:"absolute -bottom-2 left-0 w-full h-3 text-accent/40"})]})}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-6",children:n.map((e,i)=>{let n=r(e.value);return(0,t.jsxs)("div",{className:"bg-white p-8 rounded-2xl border border-neutral-200 shadow-sm hover:shadow-md transition-all duration-300 group relative overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-16 h-16 bg-primary/5 -mr-8 -mt-8 rotate-45 transition-transform group-hover:scale-110"}),(0,t.jsx)("span",{className:"block text-xs font-bold text-primary uppercase tracking-[0.2em] mb-3 opacity-70",children:e.label}),(0,t.jsx)("div",{className:"text-lg text-text-secondary leading-relaxed group-hover:text-text-primary transition-colors",children:n.isList?(0,t.jsx)("div",{className:"flex flex-wrap gap-2 mt-2",children:n.parts.map((e,i)=>(0,t.jsx)("span",{className:"inline-block px-3 py-1 bg-neutral-light border border-neutral-dark/10 rounded-lg text-xs font-bold text-primary shadow-sm group-hover:border-accent/40 transition-colors",children:e},i))}):e.value})]},i)})})]})},fields:[{name:"title",label:"Main Heading",type:"text"},{name:"items",type:"array",required:!0,minRows:1,fields:[{name:"label",type:"text",required:!0},{name:"value",type:"text",required:!0}]}]};e.s(["TechnicalGrid",0,n],710347)},861079,e=>{"use strict";var t=e.i(198526),i=e.i(641090),r=e.i(428131);let n={slug:"visualLinkPreview",render:function({url:e,title:n,summary:s,image:a}){let o=(()=>{try{return new URL(e).hostname}catch{return e}})();return(0,t.jsx)(r.default,{href:e,target:"_blank",rel:"noopener noreferrer",className:"block my-12 no-underline group",children:(0,t.jsxs)("div",{className:"flex flex-col md:flex-row border border-neutral-200 rounded-2xl overflow-hidden bg-white transition-all duration-500 hover:shadow-2xl hover:border-primary/20 hover:-translate-y-1 group",children:[(0,t.jsxs)("div",{className:"relative w-full md:w-64 h-48 md:h-auto flex-shrink-0 bg-neutral-50 overflow-hidden",children:[a?(0,t.jsx)(i.default,{src:a.split("?")[0],alt:n,fill:!0,unoptimized:!0,className:"object-cover transition-transform duration-700 group-hover:scale-110"}):(0,t.jsx)("div",{className:"w-full h-full flex items-center justify-center bg-primary/5",children:(0,t.jsx)("svg",{className:"w-12 h-12 text-primary/20",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:1.5,d:"M13.828 10.172a4 4 0 00-5.656 0l-4 4a4 4 0 105.656 5.656l1.102-1.101m-.758-4.899a4 4 0 005.656 0l4-4a4 4 0 00-5.656-5.656l-1.1 1.1"})})}),(0,t.jsx)("div",{className:"absolute inset-0 bg-primary/10 opacity-0 group-hover:opacity-100 transition-opacity duration-500 pointer-events-none"})]}),(0,t.jsxs)("div",{className:"p-8 flex flex-col justify-center relative",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-12 h-12 bg-primary/5 -mr-6 -mt-6 rotate-45 transition-transform group-hover:scale-110"}),(0,t.jsxs)("div",{className:"flex items-center gap-2 mb-3",children:[(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-primary/80 bg-primary/10 px-2 py-0.5 rounded",children:"External Link"}),(0,t.jsx)("span",{className:"text-[10px] font-bold uppercase tracking-[0.2em] text-text-secondary/80",children:o})]}),(0,t.jsx)("h3",{className:"text-xl font-bold text-text-primary mb-3 group-hover:text-primary transition-colors line-clamp-2 leading-tight",children:n}),(0,t.jsx)("p",{className:"text-text-secondary text-base line-clamp-2 leading-relaxed mb-4",children:s}),(0,t.jsxs)("div",{className:"flex items-center gap-2 text-primary font-bold text-xs uppercase tracking-widest",children:[(0,t.jsx)("span",{children:"Read more"}),(0,t.jsx)("svg",{className:"w-4 h-4 transition-transform group-hover:translate-x-1",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M17 8l4 4m0 0l-4 4m4-4H3"})})]})]})]})})},fields:[{name:"title",type:"text",required:!0},{name:"description",type:"textarea"},{name:"href",type:"text",required:!0},{name:"image",type:"upload",relationTo:"media"},{name:"tag",type:"text"}]};e.s(["VisualLinkPreview",0,n],861079)},346113,e=>{"use strict";e.s(["PDFDownloadBlock",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call PDFDownloadBlock() from the server but PDFDownloadBlock is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/PDFDownloadBlock.tsx <module evaluation>","PDFDownloadBlock")},905067,e=>{"use strict";e.s(["PDFDownloadBlock",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call PDFDownloadBlock() from the server but PDFDownloadBlock is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/PDFDownloadBlock.tsx","PDFDownloadBlock")},866005,e=>{"use strict";e.i(346113);var t=e.i(905067);e.n(t)},8304,e=>{"use strict";let t={slug:"pdfDownload",render:e.i(866005).PDFDownloadBlock,labels:{singular:"PDF Download",plural:"PDF Downloads"},admin:{},fields:[{name:"label",type:"text",label:"Button Beschriftung",required:!0,localized:!0,defaultValue:"Als PDF herunterladen"},{name:"style",type:"select",defaultValue:"primary",options:[{label:"Primary",value:"primary"},{label:"Secondary",value:"secondary"},{label:"Outline",value:"outline"}]}]};e.s(["PDFDownload",0,t])},402281,(e,t,i)=>{"use strict";let r=["nodebuffer","arraybuffer","fragments"],n="u">typeof Blob;n&&r.push("blob"),t.exports={BINARY_TYPES:r,CLOSE_TIMEOUT:3e4,EMPTY_BUFFER:Buffer.alloc(0),GUID:"258EAFA5-E914-47DA-95CA-C5AB0DC85B11",hasBlob:n,kForOnEventAttribute:Symbol("kIsForOnEventAttribute"),kListener:Symbol("kListener"),kStatusCode:Symbol("status-code"),kWebSocket:Symbol("websocket"),NOOP:()=>{}}},484234,(e,t,i)=>{"use strict";let{EMPTY_BUFFER:r}=e.r(402281),n=Buffer[Symbol.species];function s(e,t,i,r,n){for(let s=0;s<n;s++)i[r+s]=e[s]^t[3&s]}function a(e,t){for(let i=0;i<e.length;i++)e[i]^=t[3&i]}function o(e){let t;return(o.readOnly=!0,Buffer.isBuffer(e))?e:(e instanceof ArrayBuffer?t=new n(e):ArrayBuffer.isView(e)?t=new n(e.buffer,e.byteOffset,e.byteLength):(t=Buffer.from(e),o.readOnly=!1),t)}if(t.exports={concat:function(e,t){if(0===e.length)return r;if(1===e.length)return e[0];let i=Buffer.allocUnsafe(t),s=0;for(let t=0;t<e.length;t++){let r=e[t];i.set(r,s),s+=r.length}return s<t?new n(i.buffer,i.byteOffset,s):i},mask:s,toArrayBuffer:function(e){return e.length===e.buffer.byteLength?e.buffer:e.buffer.slice(e.byteOffset,e.byteOffset+e.length)},toBuffer:o,unmask:a},!process.env.WS_NO_BUFFER_UTIL)try{let e=(()=>{let e=Error("Cannot find module 'bufferutil'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.mask=function(t,i,r,n,a){a<48?s(t,i,r,n,a):e.mask(t,i,r,n,a)},t.exports.unmask=function(t,i){t.length<32?a(t,i):e.unmask(t,i)}}catch(e){}},533955,(e,t,i)=>{"use strict";let r=Symbol("kDone"),n=Symbol("kRun");class s{constructor(e){this[r]=()=>{this.pending--,this[n]()},this.concurrency=e||1/0,this.jobs=[],this.pending=0}add(e){this.jobs.push(e),this[n]()}[n](){if(this.pending!==this.concurrency&&this.jobs.length){let e=this.jobs.shift();this.pending++,e(this[r])}}}t.exports=s},656939,(e,t,i)=>{"use strict";let r,n=e.r(406461),s=e.r(484234),a=e.r(533955),{kStatusCode:o}=e.r(402281),l=Buffer[Symbol.species],c=Buffer.from([0,0,255,255]),d=Symbol("permessage-deflate"),u=Symbol("total-length"),h=Symbol("callback"),A=Symbol("buffers"),p=Symbol("error");class f{constructor(e){this._options=e||{},this._threshold=void 0!==this._options.threshold?this._options.threshold:1024,this._maxPayload=0|this._options.maxPayload,this._isServer=!!this._options.isServer,this._deflate=null,this._inflate=null,this.params=null,r||(r=new a(void 0!==this._options.concurrencyLimit?this._options.concurrencyLimit:10))}static get extensionName(){return"permessage-deflate"}offer(){let e={};return this._options.serverNoContextTakeover&&(e.server_no_context_takeover=!0),this._options.clientNoContextTakeover&&(e.client_no_context_takeover=!0),this._options.serverMaxWindowBits&&(e.server_max_window_bits=this._options.serverMaxWindowBits),this._options.clientMaxWindowBits?e.client_max_window_bits=this._options.clientMaxWindowBits:null==this._options.clientMaxWindowBits&&(e.client_max_window_bits=!0),e}accept(e){return e=this.normalizeParams(e),this.params=this._isServer?this.acceptAsServer(e):this.acceptAsClient(e),this.params}cleanup(){if(this._inflate&&(this._inflate.close(),this._inflate=null),this._deflate){let e=this._deflate[h];this._deflate.close(),this._deflate=null,e&&e(Error("The deflate stream was closed while data was being processed"))}}acceptAsServer(e){let t=this._options,i=e.find(e=>(!1!==t.serverNoContextTakeover||!e.server_no_context_takeover)&&(!e.server_max_window_bits||!1!==t.serverMaxWindowBits&&("number"!=typeof t.serverMaxWindowBits||!(t.serverMaxWindowBits>e.server_max_window_bits)))&&("number"!=typeof t.clientMaxWindowBits||!!e.client_max_window_bits));if(!i)throw Error("None of the extension offers can be accepted");return t.serverNoContextTakeover&&(i.server_no_context_takeover=!0),t.clientNoContextTakeover&&(i.client_no_context_takeover=!0),"number"==typeof t.serverMaxWindowBits&&(i.server_max_window_bits=t.serverMaxWindowBits),"number"==typeof t.clientMaxWindowBits?i.client_max_window_bits=t.clientMaxWindowBits:(!0===i.client_max_window_bits||!1===t.clientMaxWindowBits)&&delete i.client_max_window_bits,i}acceptAsClient(e){let t=e[0];if(!1===this._options.clientNoContextTakeover&&t.client_no_context_takeover)throw Error('Unexpected parameter "client_no_context_takeover"');if(t.client_max_window_bits){if(!1===this._options.clientMaxWindowBits||"number"==typeof this._options.clientMaxWindowBits&&t.client_max_window_bits>this._options.clientMaxWindowBits)throw Error('Unexpected or invalid parameter "client_max_window_bits"')}else"number"==typeof this._options.clientMaxWindowBits&&(t.client_max_window_bits=this._options.clientMaxWindowBits);return t}normalizeParams(e){return e.forEach(e=>{Object.keys(e).forEach(t=>{let i=e[t];if(i.length>1)throw Error(`Parameter "${t}" must have only a single value`);if(i=i[0],"client_max_window_bits"===t){if(!0!==i){let e=+i;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${i}`);i=e}else if(!this._isServer)throw TypeError(`Invalid value for parameter "${t}": ${i}`)}else if("server_max_window_bits"===t){let e=+i;if(!Number.isInteger(e)||e<8||e>15)throw TypeError(`Invalid value for parameter "${t}": ${i}`);i=e}else if("client_no_context_takeover"===t||"server_no_context_takeover"===t){if(!0!==i)throw TypeError(`Invalid value for parameter "${t}": ${i}`)}else throw Error(`Unknown parameter "${t}"`);e[t]=i})}),e}decompress(e,t,i){r.add(r=>{this._decompress(e,t,(e,t)=>{r(),i(e,t)})})}compress(e,t,i){r.add(r=>{this._compress(e,t,(e,t)=>{r(),i(e,t)})})}_decompress(e,t,i){let r=this._isServer?"client":"server";if(!this._inflate){let e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._inflate=n.createInflateRaw({...this._options.zlibInflateOptions,windowBits:t}),this._inflate[d]=this,this._inflate[u]=0,this._inflate[A]=[],this._inflate.on("error",y),this._inflate.on("data",m)}this._inflate[h]=i,this._inflate.write(e),t&&this._inflate.write(c),this._inflate.flush(()=>{let e=this._inflate[p];if(e){this._inflate.close(),this._inflate=null,i(e);return}let n=s.concat(this._inflate[A],this._inflate[u]);this._inflate._readableState.endEmitted?(this._inflate.close(),this._inflate=null):(this._inflate[u]=0,this._inflate[A]=[],t&&this.params[`${r}_no_context_takeover`]&&this._inflate.reset()),i(null,n)})}_compress(e,t,i){let r=this._isServer?"server":"client";if(!this._deflate){let e=`${r}_max_window_bits`,t="number"!=typeof this.params[e]?n.Z_DEFAULT_WINDOWBITS:this.params[e];this._deflate=n.createDeflateRaw({...this._options.zlibDeflateOptions,windowBits:t}),this._deflate[u]=0,this._deflate[A]=[],this._deflate.on("data",g)}this._deflate[h]=i,this._deflate.write(e),this._deflate.flush(n.Z_SYNC_FLUSH,()=>{if(!this._deflate)return;let e=s.concat(this._deflate[A],this._deflate[u]);t&&(e=new l(e.buffer,e.byteOffset,e.length-4)),this._deflate[h]=null,this._deflate[u]=0,this._deflate[A]=[],t&&this.params[`${r}_no_context_takeover`]&&this._deflate.reset(),i(null,e)})}}function g(e){this[A].push(e),this[u]+=e.length}function m(e){(this[u]+=e.length,this[d]._maxPayload<1||this[u]<=this[d]._maxPayload)?this[A].push(e):(this[p]=RangeError("Max payload size exceeded"),this[p].code="WS_ERR_UNSUPPORTED_MESSAGE_LENGTH",this[p][o]=1009,this.removeListener("data",m),this.reset())}function y(e){(this[d]._inflate=null,this[p])?this[h](this[p]):(e[o]=1007,this[h](e))}t.exports=f},919039,(e,t,i)=>{"use strict";let{isUtf8:r}=e.r(500874),{hasBlob:n}=e.r(402281);function s(e){let t=e.length,i=0;for(;i<t;)if((128&e[i])==0)i++;else if((224&e[i])==192){if(i+1===t||(192&e[i+1])!=128||(254&e[i])==192)return!1;i+=2}else if((240&e[i])==224){if(i+2>=t||(192&e[i+1])!=128||(192&e[i+2])!=128||224===e[i]&&(224&e[i+1])==128||237===e[i]&&(224&e[i+1])==160)return!1;i+=3}else{if((248&e[i])!=240||i+3>=t||(192&e[i+1])!=128||(192&e[i+2])!=128||(192&e[i+3])!=128||240===e[i]&&(240&e[i+1])==128||244===e[i]&&e[i+1]>143||e[i]>244)return!1;i+=4}return!0}if(t.exports={isBlob:function(e){return n&&"object"==typeof e&&"function"==typeof e.arrayBuffer&&"string"==typeof e.type&&"function"==typeof e.stream&&("Blob"===e[Symbol.toStringTag]||"File"===e[Symbol.toStringTag])},isValidStatusCode:function(e){return e>=1e3&&e<=1014&&1004!==e&&1005!==e&&1006!==e||e>=3e3&&e<=4999},isValidUTF8:s,tokenChars:[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,1,1,1,1,1,0,0,1,1,0,1,1,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,0,1,0]},r)t.exports.isValidUTF8=function(e){return e.length<24?s(e):r(e)};else if(!process.env.WS_NO_UTF_8_VALIDATE)try{let e=(()=>{let e=Error("Cannot find module 'utf-8-validate'");throw e.code="MODULE_NOT_FOUND",e})();t.exports.isValidUTF8=function(t){return t.length<32?s(t):e(t)}}catch(e){}},300462,(e,t,i)=>{"use strict";let{Writable:r}=e.r(688947),n=e.r(656939),{BINARY_TYPES:s,EMPTY_BUFFER:a,kStatusCode:o,kWebSocket:l}=e.r(402281),{concat:c,toArrayBuffer:d,unmask:u}=e.r(484234),{isValidStatusCode:h,isValidUTF8:A}=e.r(919039),p=Buffer[Symbol.species],f=0,g=1,m=2,y=3,b=4,E=5,C=6;class w extends r{constructor(e={}){super(),this._allowSynchronousEvents=void 0===e.allowSynchronousEvents||e.allowSynchronousEvents,this._binaryType=e.binaryType||s[0],this._extensions=e.extensions||{},this._isServer=!!e.isServer,this._maxPayload=0|e.maxPayload,this._skipUTF8Validation=!!e.skipUTF8Validation,this[l]=void 0,this._bufferedBytes=0,this._buffers=[],this._compressed=!1,this._payloadLength=0,this._mask=void 0,this._fragmented=0,this._masked=!1,this._fin=!1,this._opcode=0,this._totalPayloadLength=0,this._messageLength=0,this._fragments=[],this._errored=!1,this._loop=!1,this._state=f}_write(e,t,i){if(8===this._opcode&&this._state==f)return i();this._bufferedBytes+=e.length,this._buffers.push(e),this.startLoop(i)}consume(e){if(this._bufferedBytes-=e,e===this._buffers[0].length)return this._buffers.shift();if(e<this._buffers[0].length){let t=this._buffers[0];return this._buffers[0]=new p(t.buffer,t.byteOffset+e,t.length-e),new p(t.buffer,t.byteOffset,e)}let t=Buffer.allocUnsafe(e);do{let i=this._buffers[0],r=t.length-e;e>=i.length?t.set(this._buffers.shift(),r):(t.set(new Uint8Array(i.buffer,i.byteOffset,e),r),this._buffers[0]=new p(i.buffer,i.byteOffset+e,i.length-e)),e-=i.length}while(e>0)return t}startLoop(e){this._loop=!0;do switch(this._state){case f:this.getInfo(e);break;case g:this.getPayloadLength16(e);break;case m:this.getPayloadLength64(e);break;case y:this.getMask();break;case b:this.getData(e);break;case E:case C:this._loop=!1;return}while(this._loop)this._errored||e()}getInfo(e){if(this._bufferedBytes<2){this._loop=!1;return}let t=this.consume(2);if((48&t[0])!=0)return void e(this.createError(RangeError,"RSV2 and RSV3 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_2_3"));let i=(64&t[0])==64;if(i&&!this._extensions[n.extensionName])return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._fin=(128&t[0])==128,this._opcode=15&t[0],this._payloadLength=127&t[1],0===this._opcode){if(i)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(!this._fragmented)return void e(this.createError(RangeError,"invalid opcode 0",!0,1002,"WS_ERR_INVALID_OPCODE"));this._opcode=this._fragmented}else if(1===this._opcode||2===this._opcode){if(this._fragmented)return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));this._compressed=i}else{if(!(this._opcode>7)||!(this._opcode<11))return void e(this.createError(RangeError,`invalid opcode ${this._opcode}`,!0,1002,"WS_ERR_INVALID_OPCODE"));if(!this._fin)return void e(this.createError(RangeError,"FIN must be set",!0,1002,"WS_ERR_EXPECTED_FIN"));if(i)return void e(this.createError(RangeError,"RSV1 must be clear",!0,1002,"WS_ERR_UNEXPECTED_RSV_1"));if(this._payloadLength>125||8===this._opcode&&1===this._payloadLength)return void e(this.createError(RangeError,`invalid payload length ${this._payloadLength}`,!0,1002,"WS_ERR_INVALID_CONTROL_PAYLOAD_LENGTH"))}if(this._fin||this._fragmented||(this._fragmented=this._opcode),this._masked=(128&t[1])==128,this._isServer){if(!this._masked)return void e(this.createError(RangeError,"MASK must be set",!0,1002,"WS_ERR_EXPECTED_MASK"))}else if(this._masked)return void e(this.createError(RangeError,"MASK must be clear",!0,1002,"WS_ERR_UNEXPECTED_MASK"));126===this._payloadLength?this._state=g:127===this._payloadLength?this._state=m:this.haveLength(e)}getPayloadLength16(e){if(this._bufferedBytes<2){this._loop=!1;return}this._payloadLength=this.consume(2).readUInt16BE(0),this.haveLength(e)}getPayloadLength64(e){if(this._bufferedBytes<8){this._loop=!1;return}let t=this.consume(8),i=t.readUInt32BE(0);i>2097151?e(this.createError(RangeError,"Unsupported WebSocket frame: payload length > 2^53 - 1",!1,1009,"WS_ERR_UNSUPPORTED_DATA_PAYLOAD_LENGTH")):(this._payloadLength=0x100000000*i+t.readUInt32BE(4),this.haveLength(e))}haveLength(e){this._payloadLength&&this._opcode<8&&(this._totalPayloadLength+=this._payloadLength,this._totalPayloadLength>this._maxPayload&&this._maxPayload>0)?e(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH")):this._masked?this._state=y:this._state=b}getMask(){if(this._bufferedBytes<4){this._loop=!1;return}this._mask=this.consume(4),this._state=b}getData(e){let t=a;if(this._payloadLength){if(this._bufferedBytes<this._payloadLength){this._loop=!1;return}t=this.consume(this._payloadLength),this._masked&&(this._mask[0]|this._mask[1]|this._mask[2]|this._mask[3])!=0&&u(t,this._mask)}if(this._opcode>7)return void this.controlMessage(t,e);if(this._compressed){this._state=E,this.decompress(t,e);return}t.length&&(this._messageLength=this._totalPayloadLength,this._fragments.push(t)),this.dataMessage(e)}decompress(e,t){this._extensions[n.extensionName].decompress(e,this._fin,(e,i)=>{if(e)return t(e);if(i.length){if(this._messageLength+=i.length,this._messageLength>this._maxPayload&&this._maxPayload>0)return void t(this.createError(RangeError,"Max payload size exceeded",!1,1009,"WS_ERR_UNSUPPORTED_MESSAGE_LENGTH"));this._fragments.push(i)}this.dataMessage(t),this._state===f&&this.startLoop(t)})}dataMessage(e){if(!this._fin){this._state=f;return}let t=this._messageLength,i=this._fragments;if(this._totalPayloadLength=0,this._messageLength=0,this._fragmented=0,this._fragments=[],2===this._opcode){let r;r="nodebuffer"===this._binaryType?c(i,t):"arraybuffer"===this._binaryType?d(c(i,t)):"blob"===this._binaryType?new Blob(i):i,this._allowSynchronousEvents?(this.emit("message",r,!0),this._state=f):(this._state=C,setImmediate(()=>{this.emit("message",r,!0),this._state=f,this.startLoop(e)}))}else{let r=c(i,t);if(!this._skipUTF8Validation&&!A(r))return void e(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._state===E||this._allowSynchronousEvents?(this.emit("message",r,!1),this._state=f):(this._state=C,setImmediate(()=>{this.emit("message",r,!1),this._state=f,this.startLoop(e)}))}}controlMessage(e,t){if(8===this._opcode){if(0===e.length)this._loop=!1,this.emit("conclude",1005,a),this.end();else{let i=e.readUInt16BE(0);if(!h(i))return void t(this.createError(RangeError,`invalid status code ${i}`,!0,1002,"WS_ERR_INVALID_CLOSE_CODE"));let r=new p(e.buffer,e.byteOffset+2,e.length-2);if(!this._skipUTF8Validation&&!A(r))return void t(this.createError(Error,"invalid UTF-8 sequence",!0,1007,"WS_ERR_INVALID_UTF8"));this._loop=!1,this.emit("conclude",i,r),this.end()}this._state=f;return}this._allowSynchronousEvents?(this.emit(9===this._opcode?"ping":"pong",e),this._state=f):(this._state=C,setImmediate(()=>{this.emit(9===this._opcode?"ping":"pong",e),this._state=f,this.startLoop(t)}))}createError(e,t,i,r,n){this._loop=!1,this._errored=!0;let s=new e(i?`Invalid WebSocket frame: ${t}`:t);return Error.captureStackTrace(s,this.createError),s.code=n,s[o]=r,s}}t.exports=w},245494,(e,t,i)=>{"use strict";let r,{Duplex:n}=e.r(688947),{randomFillSync:s}=e.r(254799),a=e.r(656939),{EMPTY_BUFFER:o,kWebSocket:l,NOOP:c}=e.r(402281),{isBlob:d,isValidStatusCode:u}=e.r(919039),{mask:h,toBuffer:A}=e.r(484234),p=Symbol("kByteLength"),f=Buffer.alloc(4),g=8192,m=8192,y=0,b=1,E=2;class C{constructor(e,t,i){this._extensions=t||{},i&&(this._generateMask=i,this._maskBuffer=Buffer.alloc(4)),this._socket=e,this._firstFragment=!0,this._compress=!1,this._bufferedBytes=0,this._queue=[],this._state=y,this.onerror=c,this[l]=void 0}static frame(e,t){let i,n,a=!1,o=2,l=!1;t.mask&&(i=t.maskBuffer||f,t.generateMask?t.generateMask(i):(m===g&&(void 0===r&&(r=Buffer.alloc(g)),s(r,0,g),m=0),i[0]=r[m++],i[1]=r[m++],i[2]=r[m++],i[3]=r[m++]),l=(i[0]|i[1]|i[2]|i[3])==0,o=6),"string"==typeof e?n=(!t.mask||l)&&void 0!==t[p]?t[p]:(e=Buffer.from(e)).length:(n=e.length,a=t.mask&&t.readOnly&&!l);let c=n;n>=65536?(o+=8,c=127):n>125&&(o+=2,c=126);let d=Buffer.allocUnsafe(a?n+o:o);return(d[0]=t.fin?128|t.opcode:t.opcode,t.rsv1&&(d[0]|=64),d[1]=c,126===c?d.writeUInt16BE(n,2):127===c&&(d[2]=d[3]=0,d.writeUIntBE(n,4,6)),t.mask)?(d[1]|=128,d[o-4]=i[0],d[o-3]=i[1],d[o-2]=i[2],d[o-1]=i[3],l)?[d,e]:a?(h(e,i,d,o,n),[d]):(h(e,i,e,0,n),[d,e]):[d,e]}close(e,t,i,r){let n;if(void 0===e)n=o;else if("number"==typeof e&&u(e))if(void 0!==t&&t.length){let i=Buffer.byteLength(t);if(i>123)throw RangeError("The message must not be greater than 123 bytes");(n=Buffer.allocUnsafe(2+i)).writeUInt16BE(e,0),"string"==typeof t?n.write(t,2):n.set(t,2)}else(n=Buffer.allocUnsafe(2)).writeUInt16BE(e,0);else throw TypeError("First argument must be a valid error code number");let s={[p]:n.length,fin:!0,generateMask:this._generateMask,mask:i,maskBuffer:this._maskBuffer,opcode:8,readOnly:!1,rsv1:!1};this._state!==y?this.enqueue([this.dispatch,n,!1,s,r]):this.sendFrame(C.frame(n,s),r)}ping(e,t,i){let r,n;if("string"==typeof e?(r=Buffer.byteLength(e),n=!1):d(e)?(r=e.size,n=!1):(r=(e=A(e)).length,n=A.readOnly),r>125)throw RangeError("The data size must not be greater than 125 bytes");let s={[p]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:9,readOnly:n,rsv1:!1};d(e)?this._state!==y?this.enqueue([this.getBlobData,e,!1,s,i]):this.getBlobData(e,!1,s,i):this._state!==y?this.enqueue([this.dispatch,e,!1,s,i]):this.sendFrame(C.frame(e,s),i)}pong(e,t,i){let r,n;if("string"==typeof e?(r=Buffer.byteLength(e),n=!1):d(e)?(r=e.size,n=!1):(r=(e=A(e)).length,n=A.readOnly),r>125)throw RangeError("The data size must not be greater than 125 bytes");let s={[p]:r,fin:!0,generateMask:this._generateMask,mask:t,maskBuffer:this._maskBuffer,opcode:10,readOnly:n,rsv1:!1};d(e)?this._state!==y?this.enqueue([this.getBlobData,e,!1,s,i]):this.getBlobData(e,!1,s,i):this._state!==y?this.enqueue([this.dispatch,e,!1,s,i]):this.sendFrame(C.frame(e,s),i)}send(e,t,i){let r,n,s=this._extensions[a.extensionName],o=t.binary?2:1,l=t.compress;"string"==typeof e?(r=Buffer.byteLength(e),n=!1):d(e)?(r=e.size,n=!1):(r=(e=A(e)).length,n=A.readOnly),this._firstFragment?(this._firstFragment=!1,l&&s&&s.params[s._isServer?"server_no_context_takeover":"client_no_context_takeover"]&&(l=r>=s._threshold),this._compress=l):(l=!1,o=0),t.fin&&(this._firstFragment=!0);let c={[p]:r,fin:t.fin,generateMask:this._generateMask,mask:t.mask,maskBuffer:this._maskBuffer,opcode:o,readOnly:n,rsv1:l};d(e)?this._state!==y?this.enqueue([this.getBlobData,e,this._compress,c,i]):this.getBlobData(e,this._compress,c,i):this._state!==y?this.enqueue([this.dispatch,e,this._compress,c,i]):this.dispatch(e,this._compress,c,i)}getBlobData(e,t,i,r){this._bufferedBytes+=i[p],this._state=E,e.arrayBuffer().then(e=>{if(this._socket.destroyed){let e=Error("The socket was closed while the blob was being read");process.nextTick(w,this,e,r);return}this._bufferedBytes-=i[p];let n=A(e);t?this.dispatch(n,t,i,r):(this._state=y,this.sendFrame(C.frame(n,i),r),this.dequeue())}).catch(e=>{process.nextTick(I,this,e,r)})}dispatch(e,t,i,r){if(!t)return void this.sendFrame(C.frame(e,i),r);let n=this._extensions[a.extensionName];this._bufferedBytes+=i[p],this._state=b,n.compress(e,i.fin,(e,t)=>{this._socket.destroyed?w(this,Error("The socket was closed while data was being compressed"),r):(this._bufferedBytes-=i[p],this._state=y,i.readOnly=!1,this.sendFrame(C.frame(t,i),r),this.dequeue())})}dequeue(){for(;this._state===y&&this._queue.length;){let e=this._queue.shift();this._bufferedBytes-=e[3][p],Reflect.apply(e[0],this,e.slice(1))}}enqueue(e){this._bufferedBytes+=e[3][p],this._queue.push(e)}sendFrame(e,t){2===e.length?(this._socket.cork(),this._socket.write(e[0]),this._socket.write(e[1],t),this._socket.uncork()):this._socket.write(e[0],t)}}function w(e,t,i){"function"==typeof i&&i(t);for(let i=0;i<e._queue.length;i++){let r=e._queue[i],n=r[r.length-1];"function"==typeof n&&n(t)}}function I(e,t,i){w(e,t,i),e.onerror(t)}t.exports=C},493574,(e,t,i)=>{"use strict";let{kForOnEventAttribute:r,kListener:n}=e.r(402281),s=Symbol("kCode"),a=Symbol("kData"),o=Symbol("kError"),l=Symbol("kMessage"),c=Symbol("kReason"),d=Symbol("kTarget"),u=Symbol("kType"),h=Symbol("kWasClean");class A{constructor(e){this[d]=null,this[u]=e}get target(){return this[d]}get type(){return this[u]}}Object.defineProperty(A.prototype,"target",{enumerable:!0}),Object.defineProperty(A.prototype,"type",{enumerable:!0});class p extends A{constructor(e,t={}){super(e),this[s]=void 0===t.code?0:t.code,this[c]=void 0===t.reason?"":t.reason,this[h]=void 0!==t.wasClean&&t.wasClean}get code(){return this[s]}get reason(){return this[c]}get wasClean(){return this[h]}}Object.defineProperty(p.prototype,"code",{enumerable:!0}),Object.defineProperty(p.prototype,"reason",{enumerable:!0}),Object.defineProperty(p.prototype,"wasClean",{enumerable:!0});class f extends A{constructor(e,t={}){super(e),this[o]=void 0===t.error?null:t.error,this[l]=void 0===t.message?"":t.message}get error(){return this[o]}get message(){return this[l]}}Object.defineProperty(f.prototype,"error",{enumerable:!0}),Object.defineProperty(f.prototype,"message",{enumerable:!0});class g extends A{constructor(e,t={}){super(e),this[a]=void 0===t.data?null:t.data}get data(){return this[a]}}Object.defineProperty(g.prototype,"data",{enumerable:!0});let m={addEventListener(e,t,i={}){let s;for(let s of this.listeners(e))if(!i[r]&&s[n]===t&&!s[r])return;if("message"===e)s=function(e,i){let r=new g("message",{data:i?e:e.toString()});r[d]=this,y(t,this,r)};else if("close"===e)s=function(e,i){let r=new p("close",{code:e,reason:i.toString(),wasClean:this._closeFrameReceived&&this._closeFrameSent});r[d]=this,y(t,this,r)};else if("error"===e)s=function(e){let i=new f("error",{error:e,message:e.message});i[d]=this,y(t,this,i)};else{if("open"!==e)return;s=function(){let e=new A("open");e[d]=this,y(t,this,e)}}s[r]=!!i[r],s[n]=t,i.once?this.once(e,s):this.on(e,s)},removeEventListener(e,t){for(let i of this.listeners(e))if(i[n]===t&&!i[r]){this.removeListener(e,i);break}}};function y(e,t,i){"object"==typeof e&&e.handleEvent?e.handleEvent.call(e,i):e.call(t,i)}t.exports={CloseEvent:p,ErrorEvent:f,Event:A,EventTarget:m,MessageEvent:g}},498369,(e,t,i)=>{"use strict";let{tokenChars:r}=e.r(919039);function n(e,t,i){void 0===e[t]?e[t]=[i]:e[t].push(i)}t.exports={format:function(e){return Object.keys(e).map(t=>{let i=e[t];return Array.isArray(i)||(i=[i]),i.map(e=>[t].concat(Object.keys(e).map(t=>{let i=e[t];return Array.isArray(i)||(i=[i]),i.map(e=>!0===e?t:`${t}=${e}`).join("; ")})).join("; ")).join(", ")}).join(", ")},parse:function(e){let t,i,s=Object.create(null),a=Object.create(null),o=!1,l=!1,c=!1,d=-1,u=-1,h=-1,A=0;for(;A<e.length;A++)if(u=e.charCodeAt(A),void 0===t)if(-1===h&&1===r[u])-1===d&&(d=A);else if(0!==A&&(32===u||9===u))-1===h&&-1!==d&&(h=A);else if(59===u||44===u){if(-1===d)throw SyntaxError(`Unexpected character at index ${A}`);-1===h&&(h=A);let i=e.slice(d,h);44===u?(n(s,i,a),a=Object.create(null)):t=i,d=h=-1}else throw SyntaxError(`Unexpected character at index ${A}`);else if(void 0===i)if(-1===h&&1===r[u])-1===d&&(d=A);else if(32===u||9===u)-1===h&&-1!==d&&(h=A);else if(59===u||44===u){if(-1===d)throw SyntaxError(`Unexpected character at index ${A}`);-1===h&&(h=A),n(a,e.slice(d,h),!0),44===u&&(n(s,t,a),a=Object.create(null),t=void 0),d=h=-1}else if(61===u&&-1!==d&&-1===h)i=e.slice(d,A),d=h=-1;else throw SyntaxError(`Unexpected character at index ${A}`);else if(l){if(1!==r[u])throw SyntaxError(`Unexpected character at index ${A}`);-1===d?d=A:o||(o=!0),l=!1}else if(c)if(1===r[u])-1===d&&(d=A);else if(34===u&&-1!==d)c=!1,h=A;else if(92===u)l=!0;else throw SyntaxError(`Unexpected character at index ${A}`);else if(34===u&&61===e.charCodeAt(A-1))c=!0;else if(-1===h&&1===r[u])-1===d&&(d=A);else if(-1!==d&&(32===u||9===u))-1===h&&(h=A);else if(59===u||44===u){if(-1===d)throw SyntaxError(`Unexpected character at index ${A}`);-1===h&&(h=A);let r=e.slice(d,h);o&&(r=r.replace(/\\/g,""),o=!1),n(a,i,r),44===u&&(n(s,t,a),a=Object.create(null),t=void 0),i=void 0,d=h=-1}else throw SyntaxError(`Unexpected character at index ${A}`);if(-1===d||c||32===u||9===u)throw SyntaxError("Unexpected end of input");-1===h&&(h=A);let p=e.slice(d,h);return void 0===t?n(s,p,a):(void 0===i?n(a,p,!0):o?n(a,i,p.replace(/\\/g,"")):n(a,i,p),n(s,t,a)),s}}},279696,(e,t,i)=>{"use strict";let r=e.r(427699),n=e.r(524836),s=e.r(921517),a=e.r(504446),o=e.r(755004),{randomBytes:l,createHash:c}=e.r(254799),{Duplex:d,Readable:u}=e.r(688947),{URL:h}=e.r(792509),A=e.r(656939),p=e.r(300462),f=e.r(245494),{isBlob:g}=e.r(919039),{BINARY_TYPES:m,CLOSE_TIMEOUT:y,EMPTY_BUFFER:b,GUID:E,kForOnEventAttribute:C,kListener:w,kStatusCode:I,kWebSocket:v,NOOP:B}=e.r(402281),{EventTarget:{addEventListener:Q,removeEventListener:x}}=e.r(493574),{format:S,parse:k}=e.r(498369),{toBuffer:T}=e.r(484234),N=Symbol("kAborted"),D=[8,13],_=["CONNECTING","OPEN","CLOSING","CLOSED"],R=/^[!#$%&'*+\-.0-9A-Z^_`|a-z~]+$/;class L extends r{constructor(e,t,i){super(),this._binaryType=m[0],this._closeCode=1006,this._closeFrameReceived=!1,this._closeFrameSent=!1,this._closeMessage=b,this._closeTimer=null,this._errorEmitted=!1,this._extensions={},this._paused=!1,this._protocol="",this._readyState=L.CONNECTING,this._receiver=null,this._sender=null,this._socket=null,null!==e?(this._bufferedAmount=0,this._isServer=!1,this._redirects=0,void 0===t?t=[]:Array.isArray(t)||("object"==typeof t&&null!==t?(i=t,t=[]):t=[t]),F(this,e,t,i)):(this._autoPong=i.autoPong,this._closeTimeout=i.closeTimeout,this._isServer=!0)}get binaryType(){return this._binaryType}set binaryType(e){m.includes(e)&&(this._binaryType=e,this._receiver&&(this._receiver._binaryType=e))}get bufferedAmount(){return this._socket?this._socket._writableState.length+this._sender._bufferedBytes:this._bufferedAmount}get extensions(){return Object.keys(this._extensions).join()}get isPaused(){return this._paused}get onclose(){return null}get onerror(){return null}get onopen(){return null}get onmessage(){return null}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}setSocket(e,t,i){let r=new p({allowSynchronousEvents:i.allowSynchronousEvents,binaryType:this.binaryType,extensions:this._extensions,isServer:this._isServer,maxPayload:i.maxPayload,skipUTF8Validation:i.skipUTF8Validation}),n=new f(e,this._extensions,i.generateMask);this._receiver=r,this._sender=n,this._socket=e,r[v]=this,n[v]=this,e[v]=this,r.on("conclude",j),r.on("drain",H),r.on("error",q),r.on("message",V),r.on("ping",G),r.on("pong",Y),n.onerror=J,e.setTimeout&&e.setTimeout(0),e.setNoDelay&&e.setNoDelay(),t.length>0&&e.unshift(t),e.on("close",Z),e.on("data",X),e.on("end",ee),e.on("error",et),this._readyState=L.OPEN,this.emit("open")}emitClose(){if(!this._socket){this._readyState=L.CLOSED,this.emit("close",this._closeCode,this._closeMessage);return}this._extensions[A.extensionName]&&this._extensions[A.extensionName].cleanup(),this._receiver.removeAllListeners(),this._readyState=L.CLOSED,this.emit("close",this._closeCode,this._closeMessage)}close(e,t){if(this.readyState!==L.CLOSED){if(this.readyState===L.CONNECTING){let e="WebSocket was closed before the connection was established";P(this,this._req,e);return}if(this.readyState===L.CLOSING){this._closeFrameSent&&(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end();return}this._readyState=L.CLOSING,this._sender.close(e,t,!this._isServer,e=>{!e&&(this._closeFrameSent=!0,(this._closeFrameReceived||this._receiver._writableState.errorEmitted)&&this._socket.end())}),K(this)}}pause(){this.readyState!==L.CONNECTING&&this.readyState!==L.CLOSED&&(this._paused=!0,this._socket.pause())}ping(e,t,i){if(this.readyState===L.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(i=e,e=t=void 0):"function"==typeof t&&(i=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==L.OPEN)?$(this,e,i):(void 0===t&&(t=!this._isServer),this._sender.ping(e||b,t,i))}pong(e,t,i){if(this.readyState===L.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");("function"==typeof e?(i=e,e=t=void 0):"function"==typeof t&&(i=t,t=void 0),"number"==typeof e&&(e=e.toString()),this.readyState!==L.OPEN)?$(this,e,i):(void 0===t&&(t=!this._isServer),this._sender.pong(e||b,t,i))}resume(){this.readyState!==L.CONNECTING&&this.readyState!==L.CLOSED&&(this._paused=!1,this._receiver._writableState.needDrain||this._socket.resume())}send(e,t,i){if(this.readyState===L.CONNECTING)throw Error("WebSocket is not open: readyState 0 (CONNECTING)");if("function"==typeof t&&(i=t,t={}),"number"==typeof e&&(e=e.toString()),this.readyState!==L.OPEN)return void $(this,e,i);let r={binary:"string"!=typeof e,mask:!this._isServer,compress:!0,fin:!0,...t};this._extensions[A.extensionName]||(r.compress=!1),this._sender.send(e||b,r,i)}terminate(){if(this.readyState!==L.CLOSED){if(this.readyState===L.CONNECTING){let e="WebSocket was closed before the connection was established";P(this,this._req,e);return}this._socket&&(this._readyState=L.CLOSING,this._socket.destroy())}}}function F(e,t,i,r){let a,o,d,u,p={allowSynchronousEvents:!0,autoPong:!0,closeTimeout:y,protocolVersion:D[1],maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!0,followRedirects:!1,maxRedirects:10,...r,socketPath:void 0,hostname:void 0,protocol:void 0,timeout:void 0,method:"GET",host:void 0,path:void 0,port:void 0};if(e._autoPong=p.autoPong,e._closeTimeout=p.closeTimeout,!D.includes(p.protocolVersion))throw RangeError(`Unsupported protocol version: ${p.protocolVersion} (supported versions: ${D.join(", ")})`);if(t instanceof h)a=t;else try{a=new h(t)}catch{throw SyntaxError(`Invalid URL: ${t}`)}"http:"===a.protocol?a.protocol="ws:":"https:"===a.protocol&&(a.protocol="wss:"),e._url=a.href;let f="wss:"===a.protocol,g="ws+unix:"===a.protocol;if("ws:"===a.protocol||f||g?g&&!a.pathname?o="The URL's pathname is empty":a.hash&&(o="The URL contains a fragment identifier"):o='The URL\'s protocol must be one of "ws:", "wss:", "http:", "https:", or "ws+unix:"',o){let t=SyntaxError(o);if(0!==e._redirects)return void M(e,t);throw t}let m=f?443:80,b=l(16).toString("base64"),C=f?n.request:s.request,w=new Set;if(p.createConnection=p.createConnection||(f?U:O),p.defaultPort=p.defaultPort||m,p.port=a.port||m,p.host=a.hostname.startsWith("[")?a.hostname.slice(1,-1):a.hostname,p.headers={...p.headers,"Sec-WebSocket-Version":p.protocolVersion,"Sec-WebSocket-Key":b,Connection:"Upgrade",Upgrade:"websocket"},p.path=a.pathname+a.search,p.timeout=p.handshakeTimeout,p.perMessageDeflate&&(d=new A({...p.perMessageDeflate,isServer:!1,maxPayload:p.maxPayload}),p.headers["Sec-WebSocket-Extensions"]=S({[A.extensionName]:d.offer()})),i.length){for(let e of i){if("string"!=typeof e||!R.test(e)||w.has(e))throw SyntaxError("An invalid or duplicated subprotocol was specified");w.add(e)}p.headers["Sec-WebSocket-Protocol"]=i.join(",")}if(p.origin&&(p.protocolVersion<13?p.headers["Sec-WebSocket-Origin"]=p.origin:p.headers.Origin=p.origin),(a.username||a.password)&&(p.auth=`${a.username}:${a.password}`),g){let e=p.path.split(":");p.socketPath=e[0],p.path=e[1]}if(p.followRedirects){if(0===e._redirects){e._originalIpc=g,e._originalSecure=f,e._originalHostOrSocketPath=g?p.socketPath:a.host;let t=r&&r.headers;if(r={...r,headers:{}},t)for(let[e,i]of Object.entries(t))r.headers[e.toLowerCase()]=i}else if(0===e.listenerCount("redirect")){let t=g?!!e._originalIpc&&p.socketPath===e._originalHostOrSocketPath:!e._originalIpc&&a.host===e._originalHostOrSocketPath;t&&(!e._originalSecure||f)||(delete p.headers.authorization,delete p.headers.cookie,t||delete p.headers.host,p.auth=void 0)}p.auth&&!r.headers.authorization&&(r.headers.authorization="Basic "+Buffer.from(p.auth).toString("base64")),u=e._req=C(p),e._redirects&&e.emit("redirect",e.url,u)}else u=e._req=C(p);p.timeout&&u.on("timeout",()=>{P(e,u,"Opening handshake has timed out")}),u.on("error",t=>{null===u||u[N]||(u=e._req=null,M(e,t))}),u.on("response",n=>{let s=n.headers.location,a=n.statusCode;if(s&&p.followRedirects&&a>=300&&a<400){let n;if(++e._redirects>p.maxRedirects)return void P(e,u,"Maximum redirects exceeded");u.abort();try{n=new h(s,t)}catch(t){M(e,SyntaxError(`Invalid URL: ${s}`));return}F(e,n,i,r)}else e.emit("unexpected-response",u,n)||P(e,u,`Unexpected server response: ${n.statusCode}`)}),u.on("upgrade",(t,i,r)=>{let n;if(e.emit("upgrade",t),e.readyState!==L.CONNECTING)return;u=e._req=null;let s=t.headers.upgrade;if(void 0===s||"websocket"!==s.toLowerCase())return void P(e,i,"Invalid Upgrade header");let a=c("sha1").update(b+E).digest("base64");if(t.headers["sec-websocket-accept"]!==a)return void P(e,i,"Invalid Sec-WebSocket-Accept header");let o=t.headers["sec-websocket-protocol"];if(void 0!==o?w.size?w.has(o)||(n="Server sent an invalid subprotocol"):n="Server sent a subprotocol but none was requested":w.size&&(n="Server sent no subprotocol"),n)return void P(e,i,n);o&&(e._protocol=o);let l=t.headers["sec-websocket-extensions"];if(void 0!==l){let t;if(!d)return void P(e,i,"Server sent a Sec-WebSocket-Extensions header but no extension was requested");try{t=k(l)}catch(t){P(e,i,"Invalid Sec-WebSocket-Extensions header");return}let r=Object.keys(t);if(1!==r.length||r[0]!==A.extensionName)return void P(e,i,"Server indicated an extension that was not requested");try{d.accept(t[A.extensionName])}catch(t){P(e,i,"Invalid Sec-WebSocket-Extensions header");return}e._extensions[A.extensionName]=d}e.setSocket(i,r,{allowSynchronousEvents:p.allowSynchronousEvents,generateMask:p.generateMask,maxPayload:p.maxPayload,skipUTF8Validation:p.skipUTF8Validation})}),p.finishRequest?p.finishRequest(u,e):u.end()}function M(e,t){e._readyState=L.CLOSING,e._errorEmitted=!0,e.emit("error",t),e.emitClose()}function O(e){return e.path=e.socketPath,a.connect(e)}function U(e){return e.path=void 0,e.servername||""===e.servername||(e.servername=a.isIP(e.host)?"":e.host),o.connect(e)}function P(e,t,i){e._readyState=L.CLOSING;let r=Error(i);Error.captureStackTrace(r,P),t.setHeader?(t[N]=!0,t.abort(),t.socket&&!t.socket.destroyed&&t.socket.destroy(),process.nextTick(M,e,r)):(t.destroy(r),t.once("error",e.emit.bind(e,"error")),t.once("close",e.emitClose.bind(e)))}function $(e,t,i){if(t){let i=g(t)?t.size:T(t).length;e._socket?e._sender._bufferedBytes+=i:e._bufferedAmount+=i}if(i){let t=Error(`WebSocket is not open: readyState ${e.readyState} (${_[e.readyState]})`);process.nextTick(i,t)}}function j(e,t){let i=this[v];i._closeFrameReceived=!0,i._closeMessage=t,i._closeCode=e,void 0!==i._socket[v]&&(i._socket.removeListener("data",X),process.nextTick(W,i._socket),1005===e?i.close():i.close(e,t))}function H(){let e=this[v];e.isPaused||e._socket.resume()}function q(e){let t=this[v];void 0!==t._socket[v]&&(t._socket.removeListener("data",X),process.nextTick(W,t._socket),t.close(e[I])),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e))}function z(){this[v].emitClose()}function V(e,t){this[v].emit("message",e,t)}function G(e){let t=this[v];t._autoPong&&t.pong(e,!this._isServer,B),t.emit("ping",e)}function Y(e){this[v].emit("pong",e)}function W(e){e.resume()}function J(e){let t=this[v];t.readyState!==L.CLOSED&&(t.readyState===L.OPEN&&(t._readyState=L.CLOSING,K(t)),this._socket.end(),t._errorEmitted||(t._errorEmitted=!0,t.emit("error",e)))}function K(e){e._closeTimer=setTimeout(e._socket.destroy.bind(e._socket),e._closeTimeout)}function Z(){let e=this[v];if(this.removeListener("close",Z),this.removeListener("data",X),this.removeListener("end",ee),e._readyState=L.CLOSING,!this._readableState.endEmitted&&!e._closeFrameReceived&&!e._receiver._writableState.errorEmitted&&0!==this._readableState.length){let t=this.read(this._readableState.length);e._receiver.write(t)}e._receiver.end(),this[v]=void 0,clearTimeout(e._closeTimer),e._receiver._writableState.finished||e._receiver._writableState.errorEmitted?e.emitClose():(e._receiver.on("error",z),e._receiver.on("finish",z))}function X(e){this[v]._receiver.write(e)||this.pause()}function ee(){let e=this[v];e._readyState=L.CLOSING,e._receiver.end(),this.end()}function et(){let e=this[v];this.removeListener("error",et),this.on("error",B),e&&(e._readyState=L.CLOSING,this.destroy())}Object.defineProperty(L,"CONNECTING",{enumerable:!0,value:_.indexOf("CONNECTING")}),Object.defineProperty(L.prototype,"CONNECTING",{enumerable:!0,value:_.indexOf("CONNECTING")}),Object.defineProperty(L,"OPEN",{enumerable:!0,value:_.indexOf("OPEN")}),Object.defineProperty(L.prototype,"OPEN",{enumerable:!0,value:_.indexOf("OPEN")}),Object.defineProperty(L,"CLOSING",{enumerable:!0,value:_.indexOf("CLOSING")}),Object.defineProperty(L.prototype,"CLOSING",{enumerable:!0,value:_.indexOf("CLOSING")}),Object.defineProperty(L,"CLOSED",{enumerable:!0,value:_.indexOf("CLOSED")}),Object.defineProperty(L.prototype,"CLOSED",{enumerable:!0,value:_.indexOf("CLOSED")}),["binaryType","bufferedAmount","extensions","isPaused","protocol","readyState","url"].forEach(e=>{Object.defineProperty(L.prototype,e,{enumerable:!0})}),["open","error","close","message"].forEach(e=>{Object.defineProperty(L.prototype,`on${e}`,{enumerable:!0,get(){for(let t of this.listeners(e))if(t[C])return t[w];return null},set(t){for(let t of this.listeners(e))if(t[C]){this.removeListener(e,t);break}"function"==typeof t&&this.addEventListener(e,t,{[C]:!0})}})}),L.prototype.addEventListener=Q,L.prototype.removeEventListener=x,t.exports=L},596803,(e,t,i)=>{"use strict";e.r(279696);let{Duplex:r}=e.r(688947);function n(e){e.emit("close")}function s(){!this.destroyed&&this._writableState.finished&&this.destroy()}function a(e){this.removeListener("error",a),this.destroy(),0===this.listenerCount("error")&&this.emit("error",e)}t.exports=function(e,t){let i=!0,o=new r({...t,autoDestroy:!1,emitClose:!1,objectMode:!1,writableObjectMode:!1});return e.on("message",function(t,i){let r=!i&&o._readableState.objectMode?t.toString():t;o.push(r)||e.pause()}),e.once("error",function(e){o.destroyed||(i=!1,o.destroy(e))}),e.once("close",function(){o.destroyed||o.push(null)}),o._destroy=function(t,r){if(e.readyState===e.CLOSED){r(t),process.nextTick(n,o);return}let s=!1;e.once("error",function(e){s=!0,r(e)}),e.once("close",function(){s||r(t),process.nextTick(n,o)}),i&&e.terminate()},o._final=function(t){e.readyState===e.CONNECTING?e.once("open",function(){o._final(t)}):null!==e._socket&&(e._socket._writableState.finished?(t(),o._readableState.endEmitted&&o.destroy()):(e._socket.once("finish",function(){t()}),e.close()))},o._read=function(){e.isPaused&&e.resume()},o._write=function(t,i,r){e.readyState===e.CONNECTING?e.once("open",function(){o._write(t,i,r)}):e.send(t,r)},o.on("end",s),o.on("error",a),o}},513355,(e,t,i)=>{"use strict";let{tokenChars:r}=e.r(919039);t.exports={parse:function(e){let t=new Set,i=-1,n=-1,s=0;for(;s<e.length;s++){let a=e.charCodeAt(s);if(-1===n&&1===r[a])-1===i&&(i=s);else if(0!==s&&(32===a||9===a))-1===n&&-1!==i&&(n=s);else if(44===a){if(-1===i)throw SyntaxError(`Unexpected character at index ${s}`);-1===n&&(n=s);let r=e.slice(i,n);if(t.has(r))throw SyntaxError(`The "${r}" subprotocol is duplicated`);t.add(r),i=n=-1}else throw SyntaxError(`Unexpected character at index ${s}`)}if(-1===i||-1!==n)throw SyntaxError("Unexpected end of input");let a=e.slice(i,s);if(t.has(a))throw SyntaxError(`The "${a}" subprotocol is duplicated`);return t.add(a),t}}},215697,(e,t,i)=>{"use strict";let r=e.r(427699),n=e.r(921517),{Duplex:s}=e.r(688947),{createHash:a}=e.r(254799),o=e.r(498369),l=e.r(656939),c=e.r(513355),d=e.r(279696),{CLOSE_TIMEOUT:u,GUID:h,kWebSocket:A}=e.r(402281),p=/^[+/0-9A-Za-z]{22}==$/,f=0,g=1,m=2;class y extends r{constructor(e,t){if(super(),null==(e={allowSynchronousEvents:!0,autoPong:!0,maxPayload:0x6400000,skipUTF8Validation:!1,perMessageDeflate:!1,handleProtocols:null,clientTracking:!0,closeTimeout:u,verifyClient:null,noServer:!1,backlog:null,server:null,host:null,path:null,port:null,WebSocket:d,...e}).port&&!e.server&&!e.noServer||null!=e.port&&(e.server||e.noServer)||e.server&&e.noServer)throw TypeError('One and only one of the "port", "server", or "noServer" options must be specified');if(null!=e.port?(this._server=n.createServer((e,t)=>{let i=n.STATUS_CODES[426];t.writeHead(426,{"Content-Length":i.length,"Content-Type":"text/plain"}),t.end(i)}),this._server.listen(e.port,e.host,e.backlog,t)):e.server&&(this._server=e.server),this._server){const e=this.emit.bind(this,"connection");this._removeListeners=b(this._server,{listening:this.emit.bind(this,"listening"),error:this.emit.bind(this,"error"),upgrade:(t,i,r)=>{this.handleUpgrade(t,i,r,e)}})}!0===e.perMessageDeflate&&(e.perMessageDeflate={}),e.clientTracking&&(this.clients=new Set,this._shouldEmitClose=!1),this.options=e,this._state=f}address(){if(this.options.noServer)throw Error('The server is operating in "noServer" mode');return this._server?this._server.address():null}close(e){if(this._state===m){e&&this.once("close",()=>{e(Error("The server is not running"))}),process.nextTick(E,this);return}if(e&&this.once("close",e),this._state!==g)if(this._state=g,this.options.noServer||this.options.server)this._server&&(this._removeListeners(),this._removeListeners=this._server=null),this.clients&&this.clients.size?this._shouldEmitClose=!0:process.nextTick(E,this);else{let e=this._server;this._removeListeners(),this._removeListeners=this._server=null,e.close(()=>{E(this)})}}shouldHandle(e){if(this.options.path){let t=e.url.indexOf("?");if((-1!==t?e.url.slice(0,t):e.url)!==this.options.path)return!1}return!0}handleUpgrade(e,t,i,r){t.on("error",C);let n=e.headers["sec-websocket-key"],s=e.headers.upgrade,a=+e.headers["sec-websocket-version"];if("GET"!==e.method)return void I(this,e,t,405,"Invalid HTTP method");if(void 0===s||"websocket"!==s.toLowerCase())return void I(this,e,t,400,"Invalid Upgrade header");if(void 0===n||!p.test(n))return void I(this,e,t,400,"Missing or invalid Sec-WebSocket-Key header");if(13!==a&&8!==a)return void I(this,e,t,400,"Missing or invalid Sec-WebSocket-Version header",{"Sec-WebSocket-Version":"13, 8"});if(!this.shouldHandle(e))return void w(t,400);let d=e.headers["sec-websocket-protocol"],u=new Set;if(void 0!==d)try{u=c.parse(d)}catch(i){I(this,e,t,400,"Invalid Sec-WebSocket-Protocol header");return}let h=e.headers["sec-websocket-extensions"],A={};if(this.options.perMessageDeflate&&void 0!==h){let i=new l({...this.options.perMessageDeflate,isServer:!0,maxPayload:this.options.maxPayload});try{let e=o.parse(h);e[l.extensionName]&&(i.accept(e[l.extensionName]),A[l.extensionName]=i)}catch(i){I(this,e,t,400,"Invalid or unacceptable Sec-WebSocket-Extensions header");return}}if(this.options.verifyClient){let s={origin:e.headers[`${8===a?"sec-websocket-origin":"origin"}`],secure:!!(e.socket.authorized||e.socket.encrypted),req:e};if(2===this.options.verifyClient.length)return void this.options.verifyClient(s,(s,a,o,l)=>{if(!s)return w(t,a||401,o,l);this.completeUpgrade(A,n,u,e,t,i,r)});if(!this.options.verifyClient(s))return w(t,401)}this.completeUpgrade(A,n,u,e,t,i,r)}completeUpgrade(e,t,i,r,n,s,c){if(!n.readable||!n.writable)return n.destroy();if(n[A])throw Error("server.handleUpgrade() was called more than once with the same socket, possibly due to a misconfiguration");if(this._state>f)return w(n,503);let d=a("sha1").update(t+h).digest("base64"),u=["HTTP/1.1 101 Switching Protocols","Upgrade: websocket","Connection: Upgrade",`Sec-WebSocket-Accept: ${d}`],p=new this.options.WebSocket(null,void 0,this.options);if(i.size){let e=this.options.handleProtocols?this.options.handleProtocols(i,r):i.values().next().value;e&&(u.push(`Sec-WebSocket-Protocol: ${e}`),p._protocol=e)}if(e[l.extensionName]){let t=e[l.extensionName].params,i=o.format({[l.extensionName]:[t]});u.push(`Sec-WebSocket-Extensions: ${i}`),p._extensions=e}this.emit("headers",u,r),n.write(u.concat("\r\n").join("\r\n")),n.removeListener("error",C),p.setSocket(n,s,{allowSynchronousEvents:this.options.allowSynchronousEvents,maxPayload:this.options.maxPayload,skipUTF8Validation:this.options.skipUTF8Validation}),this.clients&&(this.clients.add(p),p.on("close",()=>{this.clients.delete(p),this._shouldEmitClose&&!this.clients.size&&process.nextTick(E,this)})),c(p,r)}}function b(e,t){for(let i of Object.keys(t))e.on(i,t[i]);return function(){for(let i of Object.keys(t))e.removeListener(i,t[i])}}function E(e){e._state=m,e.emit("close")}function C(){this.destroy()}function w(e,t,i,r){i=i||n.STATUS_CODES[t],r={Connection:"close","Content-Type":"text/html","Content-Length":Buffer.byteLength(i),...r},e.once("finish",e.destroy),e.end(`HTTP/1.1 ${t} ${n.STATUS_CODES[t]}\r
|
||
`+Object.keys(r).map(e=>`${e}: ${r[e]}`).join("\r\n")+"\r\n\r\n"+i)}function I(e,t,i,r,n,s){if(e.listenerCount("wsClientError")){let r=Error(n);Error.captureStackTrace(r,I),e.emit("wsClientError",r,i,t)}else w(i,r,n,s)}t.exports=y},638626,392822,384463,132527,111281,e=>{"use strict";var t=e.i(233405),i=e.i(254799),r=e.i(857764),n=e.i(814747);e.i(596803),e.i(498369),e.i(656939),e.i(300462),e.i(245494),e.i(513355);var s=e.i(279696);e.i(215697),s.default;var a=e.i(700859),o=e.i(680110),l=e.i(947753);async function c(e,t){let{collection:i,data:r,disableEmail:n,expiration:s,overrideAccess:c=!0}=t,d=e.collections[i];if(!d)throw new a.APIError(`The collection with slug ${String(i)} can't be found. Forgot Password Operation.`);return(0,l.forgotPasswordOperation)({collection:d,data:r,disableEmail:n,expiration:s,overrideAccess:c,req:await (0,o.createLocalReq)(t,e)})}var d=a,u=o,h=e.i(96038);async function A(e,t){let{collection:i,data:r,depth:n,overrideAccess:s=!0,showHiddenFields:a}=t,o=e.collections[i];if(!o)throw new d.APIError(`The collection with slug ${String(i)} can't be found. Login Operation.`);let l={collection:o,data:r,depth:n,overrideAccess:s,req:await (0,u.createLocalReq)(t,e),showHiddenFields:a},c=await (0,h.loginOperation)(l);return o.config.auth.removeTokenFromResponses&&delete c.token,c}var p=a,f=o,g=e.i(416190);async function m(e,t){let{collection:i,data:r,overrideAccess:n}=t,s=e.collections[i];if(!s)throw new p.APIError(`The collection with slug ${String(i)} can't be found. Reset Password Operation.`);let a=await (0,g.resetPasswordOperation)({collection:s,data:r,overrideAccess:n,req:await (0,f.createLocalReq)(t,e)});return s.config.auth.removeTokenFromResponses&&delete a.token,a}var y=a,b=o,E=e.i(494310);async function C(e,t){let{collection:i,data:r,overrideAccess:n=!0}=t,s=e.collections[i];if(!s)throw new y.APIError(`The collection with slug ${String(i)} can't be found. Unlock Operation.`);return(0,E.unlockOperation)({collection:s,data:r,overrideAccess:n,req:await (0,b.createLocalReq)(t,e)})}var w=a,I=o,v=e.i(682896);async function B(e,t){let{collection:i,token:r}=t,n=e.collections[i];if(!n)throw new w.APIError(`The collection with slug ${String(i)} can't be found. Verify Email Operation.`);return(0,v.verifyEmailOperation)({collection:n,req:await (0,I.createLocalReq)(t,e),token:r})}var Q=a,x=o,S=e.i(837209);async function k(e,t){let{collection:i,disableErrors:r,overrideAccess:n=!0,trash:s=!1,where:a}=t,o=e.collections[i];if(!o)throw new Q.APIError(`The collection with slug ${String(i)} can't be found. Count Operation.`);return(0,S.countOperation)({collection:o,disableErrors:r,overrideAccess:n,req:await (0,x.createLocalReq)(t,e),trash:s,where:a})}var T=a,N=e.i(7651),D=e.i(429653),_=o,R=e.i(15487);async function L(e,t){let{collection:i,data:r,depth:n,disableTransaction:s,disableVerificationEmail:a,draft:o,duplicateFromID:l,file:c,filePath:d,overrideAccess:u=!0,overwriteExistingFiles:h=!1,populate:A,publishAllLocales:p,select:f,showHiddenFields:g}=t,m=e.collections[i];if(!m)throw new T.APIError(`The collection with slug ${String(i)} can't be found. Create Operation.`);let y=await (0,_.createLocalReq)(t,e);return y.file=c??await (0,D.getFileByPath)(d),(0,R.createOperation)({collection:m,data:(0,N.deepCopyObjectSimple)(r),depth:n,disableTransaction:s,disableVerificationEmail:a,draft:o,duplicateFromID:l,overrideAccess:u,overwriteExistingFiles:h,populate:A,publishAllLocales:p,req:y,select:f,showHiddenFields:g})}var F=a,M=o,O=e.i(64183),U=e.i(283078);async function P(e,t){let{id:i,collection:r,depth:n,disableTransaction:s,overrideAccess:a=!0,overrideLock:o,populate:l,select:c,showHiddenFields:d,trash:u=!1,where:h}=t,A=e.collections[r];if(!A)throw new F.APIError(`The collection with slug ${String(r)} can't be found. Delete Operation.`);let p={id:i,collection:A,depth:n,disableTransaction:s,overrideAccess:a,overrideLock:o,populate:l,req:await (0,M.createLocalReq)(t,e),select:c,showHiddenFields:d,trash:u,where:h};return t.id?(0,U.deleteByIDOperation)(p):(0,O.deleteOperation)(p)}var $=a,j=o,H=e.i(723310);async function q(e,t){let{id:i,collection:r,data:n,depth:s,disableTransaction:a,draft:o,overrideAccess:l=!0,populate:c,select:d,selectedLocales:u,showHiddenFields:h}=t,A=e.collections[r];if(!A)throw new $.APIError(`The collection with slug ${String(r)} can't be found. Duplicate Operation.`);if(!0===A.config.disableDuplicate)throw new $.APIError(`The collection with slug ${String(r)} cannot be duplicated.`,400);let p=await (0,j.createLocalReq)(t,e);return(0,H.duplicateOperation)({id:i,collection:A,data:n,depth:s,disableTransaction:a,draft:o,overrideAccess:l,populate:c,req:p,select:d,selectedLocales:u,showHiddenFields:h})}var z=a,V=o,G=e.i(990569);async function Y(e,t){let{collection:i,currentDepth:r,depth:n,disableErrors:s,draft:a=!1,includeLockStatus:o,joins:l,limit:c,overrideAccess:d=!0,page:u,pagination:h=!0,populate:A,select:p,showHiddenFields:f,sort:g,trash:m=!1,where:y}=t,b=e.collections[i];if(!b)throw new z.APIError(`The collection with slug ${String(i)} can't be found. Find Operation.`);return(0,G.findOperation)({collection:b,currentDepth:r,depth:n,disableErrors:s,draft:a,includeLockStatus:o,joins:l,limit:c,overrideAccess:d,page:u,pagination:h,populate:A,req:await (0,V.createLocalReq)(t,e),select:p,showHiddenFields:f,sort:g,trash:m,where:y})}var W=a,J=o,K=e.i(921065);async function Z(e,t){let{id:i,collection:r,currentDepth:n,data:s,depth:a,disableErrors:o=!1,draft:l=!1,flattenLocales:c,includeLockStatus:d,joins:u,overrideAccess:h=!0,populate:A,select:p,showHiddenFields:f,trash:g=!1}=t,m=e.collections[r];if(!m)throw new W.APIError(`The collection with slug ${String(r)} can't be found. Find By ID Operation.`);return(0,K.findByIDOperation)({id:i,collection:m,currentDepth:n,data:s,depth:a,disableErrors:o,draft:l,flattenLocales:c,includeLockStatus:d,joins:u,overrideAccess:h,populate:A,req:await (0,J.createLocalReq)(t,e),select:p,showHiddenFields:f,trash:g})}var X=a,ee=o;e.i(10188);var et=e.i(792367),et=et,ei=e.i(42625),er=e.i(617997),en=e.i(451038),es=e.i(90602),ea=a,eo=e.i(295694),el=e.i(285547),ec=e.i(516808),ed=e.i(783334),eu=e.i(893961),eh=e.i(252016),eA=e.i(668473);let ep=async e=>{let t=e;try{let e,{collection:{config:i},disableErrors:r,overrideAccess:n,populate:s,showHiddenFields:a=!1,trash:o=!1,where:l}=t=await (0,eA.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"readDistinct",overrideAccess:t.overrideAccess}),c=t.req,{locale:d,payload:u}=c;if(!n&&(e=await (0,ei.executeAccess)({disableErrors:r,req:c},i.access.read),!1===e))return{hasNextPage:!1,hasPrevPage:!1,limit:t.limit||0,nextPage:null,page:1,pagingCounter:1,prevPage:null,totalDocs:0,totalPages:0,values:[]};let h=(0,er.combineQueries)(l,e);(0,es.sanitizeWhereQuery)({fields:i.flattenedFields,payload:u,where:h}),h=(0,ec.appendNonTrashedFilter)({enableTrash:i.trash,trash:o,where:h}),await (0,en.validateQueryPaths)({collectionConfig:i,overrideAccess:n,req:c,where:l??{}});let A=(0,ed.getFieldByPath)({config:u.config,fields:i.flattenedFields,includeRelationships:!0,path:t.field});if(!A)throw new ea.APIError(`Field ${t.field} was not found in the collection ${i.slug}`,et.b.BAD_REQUEST);if(A.field.hidden&&!a||A.field.access?.read&&!await A.field.access.read({req:c}))throw new eo.Forbidden(c.t);if("virtual"in A.field&&A.field.virtual){if("string"!=typeof A.field.virtual)throw new ea.APIError("Cannot findDistinct by a virtual field that isn't linked to a relationship field.");let e="",h=i.flattenedFields,p=A.field.virtual.split(".");for(let t of A.field.virtual.split(".")){e=`${e}${t}`,p.shift();let i=h.find(e=>e.name===t);if(("relationship"===i.type||"upload"===i.type)&&"string"==typeof i.relationTo)break;"flattenedFields"in i&&(h=i.flattenedFields)}let f=`${e}.${p.join(".")}`,g=await u.findDistinct({collection:i.slug,depth:t.depth,disableErrors:r,field:f,limit:t.limit,locale:d,overrideAccess:n,page:t.page,populate:s,req:c,showHiddenFields:a,sort:t.sort,trash:o,where:l});for(let e of g.values)e[t.field]=e[f],delete e[f];return g}let p=await u.db.findDistinct({collection:i.slug,field:t.field,limit:t.limit,locale:d,page:t.page,req:c,sort:t.sort,where:h});if(("relationship"===A.field.type||"upload"===A.field.type)&&t.depth){let e=[],i={...A.field};for(let r of(A.field.hasMany&&(i.hasMany=!1),p.values))e.push((0,el.relationshipPopulationPromise)({currentDepth:0,depth:t.depth,draft:!1,fallbackLocale:c.fallbackLocale||null,field:i,locale:c.locale||null,overrideAccess:t.overrideAccess??!0,parentIsLocalized:!1,populate:s,req:c,showHiddenFields:!1,siblingDoc:r}));await Promise.all(e)}return p=await (0,eh.buildAfterOperation)({args:t,collection:i,operation:"findDistinct",overrideAccess:n,result:p})}catch(e){throw await (0,eu.killTransaction)(t.req),e}};async function ef(e,t){let{collection:i,depth:r=0,disableErrors:n,field:s,limit:a,overrideAccess:o=!0,page:l,populate:c,showHiddenFields:d,sort:u,trash:h=!1,where:A}=t,p=e.collections[i];if(!p)throw new X.APIError(`The collection with slug ${String(i)} can't be found. Find Operation.`);return ep({collection:p,depth:r,disableErrors:n,field:s,limit:a,overrideAccess:o,page:l,populate:c,req:await (0,ee.createLocalReq)(t,e),showHiddenFields:d,sort:u,trash:h,where:A})}var eg=a,em=o,ey=e.i(919915);async function eb(e,t){let{id:i,collection:r,depth:n,disableErrors:s=!1,overrideAccess:a=!0,populate:o,select:l,showHiddenFields:c,trash:d=!1}=t,u=e.collections[r];if(!u)throw new eg.APIError(`The collection with slug ${String(r)} can't be found. Find Version By ID Operation.`);return(0,ey.findVersionByIDOperation)({id:i,collection:u,depth:n,disableErrors:s,overrideAccess:a,populate:o,req:await (0,em.createLocalReq)(t,e),select:l,showHiddenFields:c,trash:d})}var eE=a,eC=o,ew=e.i(322929);async function eI(e,t){let{collection:i,depth:r,limit:n,overrideAccess:s=!0,page:a,pagination:o=!0,populate:l,select:c,showHiddenFields:d,sort:u,trash:h=!1,where:A}=t,p=e.collections[i];if(!p)throw new eE.APIError(`The collection with slug ${String(i)} can't be found. Find Versions Operation.`);return(0,ew.findVersionsOperation)({collection:p,depth:r,limit:n,overrideAccess:s,page:a,pagination:o,populate:l,req:await (0,eC.createLocalReq)(t,e),select:c,showHiddenFields:d,sort:u,trash:h,where:A})}var ev=a,eB=o,eQ=e.i(713278);async function ex(e,t){let{id:i,collection:r,depth:n,overrideAccess:s=!0,populate:a,select:o,showHiddenFields:l}=t,c=e.collections[r];if(!c)throw new ev.APIError(`The collection with slug ${String(r)} can't be found. Restore Version Operation.`);let d={id:i,collection:c,depth:n,overrideAccess:s,payload:e,populate:a,req:await (0,eB.createLocalReq)(t,e),select:o,showHiddenFields:l};return(0,eQ.restoreVersionOperation)(d)}var eS=a,ek=D,eT=o,eN=e.i(360918),eD=e.i(565058);async function e_(e,t){let{id:i,autosave:r,collection:n,data:s,depth:a,disableTransaction:o,draft:l,file:c,filePath:d,limit:u,overrideAccess:h=!0,overrideLock:A,overwriteExistingFiles:p=!1,populate:f,publishAllLocales:g,publishSpecificLocale:m,select:y,showHiddenFields:b,sort:E,trash:C=!1,unpublishAllLocales:w,where:I}=t,v=e.collections[n];if(!v)throw new eS.APIError(`The collection with slug ${String(n)} can't be found. Update Operation.`);let B=await (0,eT.createLocalReq)(t,e);B.file=c??await (0,ek.getFileByPath)(d);let Q={id:i,autosave:r,collection:v,data:s,depth:a,disableTransaction:o,draft:l,limit:u,overrideAccess:h,overrideLock:A,overwriteExistingFiles:p,payload:e,populate:f,publishAllLocales:g,publishSpecificLocale:m,req:B,select:y,showHiddenFields:b,sort:E,trash:C,unpublishAllLocales:w,where:I};return t.id?(0,eD.updateByIDOperation)(Q):(0,eN.updateOperation)(Q)}var eR=a,eL=o,eF=ei,eM=er,eO=en,eU=e.i(201803),eP=eu;let e$=async e=>{try{let t,{disableErrors:i,global:r,overrideAccess:n,where:s}=e,a=e.req,{payload:o}=a;if(r.hooks?.beforeOperation?.length)for(let t of r.hooks.beforeOperation)e=await t({args:e,context:a.context,global:r,operation:"countVersions",overrideAccess:n,req:a})||e;if(!n&&(t=await (0,eF.executeAccess)({disableErrors:i,req:a},r.access.readVersions),!1===t))return{totalDocs:0};let l=(0,eM.combineQueries)(s,t),c=(0,eU.buildVersionGlobalFields)(o.config,r,!0);return await (0,eO.validateQueryPaths)({globalConfig:r,overrideAccess:n,req:a,versionFields:c,where:s}),await o.db.countGlobalVersions({global:r.slug,req:a,where:l})}catch(t){throw await (0,eP.killTransaction)(e.req),t}};async function ej(e,t){let{disableErrors:i,global:r,overrideAccess:n=!0,where:s}=t,a=e.globals.config.find(({slug:e})=>e===r);if(!a)throw new eR.APIError(`The global with slug ${String(r)} can't be found. Count Global Versions Operation.`);return e$({disableErrors:i,global:a,overrideAccess:n,req:await (0,eL.createLocalReq)(t,e),where:s})}var eH=a,eq=o,ez=e.i(397903);async function eV(e,t){let{slug:i,data:r,depth:n,draft:s=!1,flattenLocales:a,includeLockStatus:o,overrideAccess:l=!0,populate:c,select:d,showHiddenFields:u}=t,h=e.globals.config.find(e=>e.slug===i);if(!h)throw new eH.APIError(`The global with slug ${String(i)} can't be found.`);return(0,ez.findOneOperation)({slug:i,data:r,depth:n,draft:s,flattenLocales:a,globalConfig:h,includeLockStatus:o,overrideAccess:l,populate:c,req:await (0,eq.createLocalReq)(t,e),select:d,showHiddenFields:u})}var eG=a,eY=o,eW=e.i(215010);async function eJ(e,t){let{id:i,slug:r,depth:n,disableErrors:s=!1,overrideAccess:a=!0,populate:o,select:l,showHiddenFields:c}=t,d=e.globals.config.find(e=>e.slug===r);if(!d)throw new eG.APIError(`The global with slug ${String(r)} can't be found.`);return(0,eW.findVersionByIDOperation)({id:i,depth:n,disableErrors:s,globalConfig:d,overrideAccess:a,populate:o,req:await (0,eY.createLocalReq)(t,e),select:l,showHiddenFields:c})}var eK=a,eZ=o,eX=e.i(826948);async function e0(e,t){let{slug:i,depth:r,limit:n,overrideAccess:s=!0,page:a,pagination:o=!0,populate:l,select:c,showHiddenFields:d,sort:u,where:h}=t,A=e.globals.config.find(e=>e.slug===i);if(!A)throw new eK.APIError(`The global with slug ${String(i)} can't be found.`);return(0,eX.findVersionsOperation)({depth:r,globalConfig:A,limit:n,overrideAccess:s,page:a,pagination:o,populate:l,req:await (0,eZ.createLocalReq)(t,e),select:c,showHiddenFields:d,sort:u,where:h})}var e1=a,e2=o,e4=e.i(885923);async function e5(e,t){let{id:i,slug:r,depth:n,overrideAccess:s=!0,populate:a,showHiddenFields:o}=t,l=e.globals.config.find(e=>e.slug===r);if(!l)throw new e1.APIError(`The global with slug ${String(r)} can't be found.`);return(0,e4.restoreVersionOperation)({id:i,depth:n,globalConfig:l,overrideAccess:s,populate:a,req:await (0,e2.createLocalReq)(t,e),showHiddenFields:o})}var e3=a,e8=N,e9=o,e6=e.i(964530);async function e7(e,t){let{slug:i,data:r,depth:n,draft:s,overrideAccess:a=!0,overrideLock:o,populate:l,publishAllLocales:c,publishSpecificLocale:d,select:u,showHiddenFields:h,unpublishAllLocales:A}=t,p=e.globals.config.find(e=>e.slug===i);if(!p)throw new e3.APIError(`The global with slug ${String(i)} can't be found.`);return(0,e6.updateOperation)({slug:i,data:(0,e8.deepCopyObjectSimple)(r),depth:n,draft:s,globalConfig:p,overrideAccess:a,overrideLock:o,populate:l,publishAllLocales:c,publishSpecificLocale:d,req:await (0,e9.createLocalReq)(t,e),select:u,showHiddenFields:h,unpublishAllLocales:A})}var te=e.i(479573),tt=i;let ti="aes-256-ctr";function tr(e){let t=tt.default.randomBytes(16),i=this.secret,r=tt.default.createCipheriv(ti,i,t),n=r.update(e,"utf8","hex")+r.final("hex"),s=t.toString("hex");return`${s}${n}`}function tn(e){let t=e.slice(0,32),i=e.slice(32),r=this.secret,n=tt.default.createDecipheriv(ti,r,Buffer.from(t,"hex"));return n.update(i,"hex","utf8")+n.final("utf8")}var ts=o,ta=eu;let to=({err:e,payload:t})=>{let i="error";if(e&&"object"==typeof e&&"name"in e&&"string"==typeof e.name&&void 0!==t.config.loggingLevels[e.name]&&(i=t.config.loggingLevels[e.name]),i){let r={};"info"===i?r.msg="object"==typeof e&&"message"in e?e.message:"Error":r.err=e,t.logger[i](r)}};e.s(["logError",0,to],392822);let tl=(e,t)=>{let i=new Headers(t);return e.forEach((e,t)=>{i.append(t,e)}),i};e.s(["mergeHeaders",0,tl],384463);let tc=async e=>{let t={user:null};if(!e.payload.authStrategies?.length)return t;for(let i of e.payload.authStrategies){e.strategyName=i.name,e.isGraphQL=!!e.isGraphQL,e.canSetHeaders=!!e.canSetHeaders;try{let r=await i.authenticate(e);r.responseHeaders&&(r.responseHeaders=tl(t.responseHeaders||new Headers,r.responseHeaders||new Headers)),t=r}catch(t){to({err:t,payload:e.payload})}if(t.user)break}return t};e.s(["executeAuthStrategies",0,tc],132527);var td=e.i(684442);let tu=async e=>{let{canSetHeaders:t,headers:i}=e,r=e.req,{payload:n}=r;try{let{responseHeaders:e,user:s}=await tc({canSetHeaders:t,headers:i,payload:n});return r.user=s,r.responseHeaders=e,{permissions:await (0,td.getAccessResults)({req:r}),responseHeaders:e,user:s}}catch(e){throw await (0,ta.killTransaction)(r),e}},th=async(e,t)=>{let{headers:i,req:r}=t;return await tu({canSetHeaders:!!t.canSetHeaders,headers:i,req:await (0,ts.createLocalReq)({req:r},e)})};var tA=i;let tp=e=>async({headers:t,isGraphQL:i=!1,payload:r})=>{let n=t.get("Authorization");if(n?.startsWith(`${e.slug} API-Key `)){let t=n.replace(`${e.slug} API-Key `,""),s=[{apiKeyIndex:{equals:tA.default.createHmac("sha1",r.secret).update(t).digest("hex")}},{apiKeyIndex:{equals:tA.default.createHmac("sha256",r.secret).update(t).digest("hex")}}];try{let t={};e.auth?.verify?t.and=[{or:s},{_verified:{not_equals:!1}}]:t.or=s;let n=await r.find({collection:e.slug,depth:i?0:e.auth.depth,limit:1,overrideAccess:!0,pagination:!1,where:t});if(n.docs&&n.docs.length>0){let t=n.docs[0];return t.collection=e.slug,t._strategy="api-key",{user:t}}}catch(e){}}return{user:null}};var tf=e.i(250488),tg=e.i(666680),tm=e.i(812057),ty=e.i(275388),tb=e.i(153118),tE=e.i(237278),tC=e.i(747582);let tw=(0,tm.promisify)(tg.verify),tI=async(e,t,i,r)=>{let n=(0,tC.default)(e,t,"verify");if(e.startsWith("HS")){let t=await (0,tE.default)(e,n,r),s=i;try{return tg.timingSafeEqual(s,t)}catch{return!1}}let s=(0,ty.default)(e),a=(0,tb.default)(e,n);try{return await tw(s,r,a,i)}catch{return!1}};var tv=e.i(195420),tB=e.i(378541),tQ=e.i(78201),tx=e.i(392826),tS=e.i(259470),tk=e.i(323428);let tT=(e,t)=>{if(void 0!==t&&(!Array.isArray(t)||t.some(e=>"string"!=typeof e)))throw TypeError(`"${e}" option must be an array of strings`);if(t)return new Set(t)};var tN=e.i(698844),tD=tf,t_=tg;let tR=e=>e.d?(0,t_.createPrivateKey)({format:"jwk",key:e}):(0,t_.createPublicKey)({format:"jwk",key:e});var tL=tv,tF=tx;async function tM(e,t){if(!(0,tF.default)(e))throw TypeError("JWK must be an object");switch(t||=e.alg,e.kty){case"oct":if("string"!=typeof e.k||!e.k)throw TypeError('missing "k" (Key Value) Parameter value');return(0,tD.decode)(e.k);case"RSA":if("oth"in e&&void 0!==e.oth)throw new tL.JOSENotSupported('RSA JWK "oth" (Other Primes Info) Parameter value is not supported');case"EC":case"OKP":return tR({...e,alg:t});default:throw new tL.JOSENotSupported('Unsupported "kty" (Key Type) Parameter value')}}async function tO(e,t,i){let r,n;if(!(0,tx.default)(e))throw new tv.JWSInvalid("Flattened JWS must be an object");if(void 0===e.protected&&void 0===e.header)throw new tv.JWSInvalid('Flattened JWS must have either of the "protected" or "header" members');if(void 0!==e.protected&&"string"!=typeof e.protected)throw new tv.JWSInvalid("JWS Protected Header incorrect type");if(void 0===e.payload)throw new tv.JWSInvalid("JWS Payload missing");if("string"!=typeof e.signature)throw new tv.JWSInvalid("JWS Signature missing or incorrect type");if(void 0!==e.header&&!(0,tx.default)(e.header))throw new tv.JWSInvalid("JWS Unprotected Header incorrect type");let s={};if(e.protected)try{let t=(0,tf.decode)(e.protected);s=JSON.parse(tB.decoder.decode(t))}catch{throw new tv.JWSInvalid("JWS Protected Header is invalid")}if(!(0,tQ.default)(s,e.header))throw new tv.JWSInvalid("JWS Protected and JWS Unprotected Header Parameter names must be disjoint");let a={...s,...e.header},o=(0,tk.default)(tv.JWSInvalid,new Map([["b64",!0]]),i?.crit,s,a),l=!0;if(o.has("b64")&&"boolean"!=typeof(l=s.b64))throw new tv.JWSInvalid('The "b64" (base64url-encode payload) Header Parameter must be a boolean');let{alg:c}=a;if("string"!=typeof c||!c)throw new tv.JWSInvalid('JWS "alg" (Algorithm) Header Parameter missing or invalid');let d=i&&tT("algorithms",i.algorithms);if(d&&!d.has(c))throw new tv.JOSEAlgNotAllowed('"alg" (Algorithm) Header Parameter value not allowed');if(l){if("string"!=typeof e.payload)throw new tv.JWSInvalid("JWS Payload must be a string")}else if("string"!=typeof e.payload&&!(e.payload instanceof Uint8Array))throw new tv.JWSInvalid("JWS Payload must be a string or an Uint8Array instance");let u=!1;"function"==typeof t?(t=await t(s,e),u=!0,(0,tS.checkKeyTypeWithJwk)(c,t,"verify"),(0,tN.isJWK)(t)&&(t=await tM(t,c))):(0,tS.checkKeyTypeWithJwk)(c,t,"verify");let h=(0,tB.concat)(tB.encoder.encode(e.protected??""),tB.encoder.encode("."),"string"==typeof e.payload?tB.encoder.encode(e.payload):e.payload);try{r=(0,tf.decode)(e.signature)}catch{throw new tv.JWSInvalid("Failed to base64url decode the signature")}if(!await tI(c,t,r,h))throw new tv.JWSSignatureVerificationFailed;if(l)try{n=(0,tf.decode)(e.payload)}catch{throw new tv.JWSInvalid("Failed to base64url decode the payload")}else n="string"==typeof e.payload?tB.encoder.encode(e.payload):e.payload;let A={payload:n};return(void 0!==e.protected&&(A.protectedHeader=s),void 0!==e.header&&(A.unprotectedHeader=e.header),u)?{...A,key:t}:A}var tU=tv,tP=tB;async function t$(e,t,i){if(e instanceof Uint8Array&&(e=tP.decoder.decode(e)),"string"!=typeof e)throw new tU.JWSInvalid("Compact JWS must be a string or Uint8Array");let{0:r,1:n,2:s,length:a}=e.split(".");if(3!==a)throw new tU.JWSInvalid("Invalid Compact JWS");let o=await tO({payload:n,protected:r,signature:s},t,i),l={payload:o.payload,protectedHeader:o.protectedHeader};return"function"==typeof t?{...l,key:o.key}:l}var tj=tv,tH=tB,tq=e.i(908993),tz=e.i(273475),tV=tx;let tG=e=>e.toLowerCase().replace(/^application\//,""),tY=(e,t)=>"string"==typeof e?t.includes(e):!!Array.isArray(e)&&t.some(Set.prototype.has.bind(new Set(e))),tW=(e,t,i={})=>{let r,n;try{r=JSON.parse(tH.decoder.decode(t))}catch{}if(!(0,tV.default)(r))throw new tj.JWTInvalid("JWT Claims Set must be a top-level JSON object");let{typ:s}=i;if(s&&("string"!=typeof e.typ||tG(e.typ)!==tG(s)))throw new tj.JWTClaimValidationFailed('unexpected "typ" JWT header value',r,"typ","check_failed");let{requiredClaims:a=[],issuer:o,subject:l,audience:c,maxTokenAge:d}=i,u=[...a];for(let e of(void 0!==d&&u.push("iat"),void 0!==c&&u.push("aud"),void 0!==l&&u.push("sub"),void 0!==o&&u.push("iss"),new Set(u.reverse())))if(!(e in r))throw new tj.JWTClaimValidationFailed(`missing required "${e}" claim`,r,e,"missing");if(o&&!(Array.isArray(o)?o:[o]).includes(r.iss))throw new tj.JWTClaimValidationFailed('unexpected "iss" claim value',r,"iss","check_failed");if(l&&r.sub!==l)throw new tj.JWTClaimValidationFailed('unexpected "sub" claim value',r,"sub","check_failed");if(c&&!tY(r.aud,"string"==typeof c?[c]:c))throw new tj.JWTClaimValidationFailed('unexpected "aud" claim value',r,"aud","check_failed");switch(typeof i.clockTolerance){case"string":n=(0,tz.default)(i.clockTolerance);break;case"number":n=i.clockTolerance;break;case"undefined":n=0;break;default:throw TypeError("Invalid clockTolerance option type")}let{currentDate:h}=i,A=(0,tq.default)(h||new Date);if((void 0!==r.iat||d)&&"number"!=typeof r.iat)throw new tj.JWTClaimValidationFailed('"iat" claim must be a number',r,"iat","invalid");if(void 0!==r.nbf){if("number"!=typeof r.nbf)throw new tj.JWTClaimValidationFailed('"nbf" claim must be a number',r,"nbf","invalid");if(r.nbf>A+n)throw new tj.JWTClaimValidationFailed('"nbf" claim timestamp check failed',r,"nbf","check_failed")}if(void 0!==r.exp){if("number"!=typeof r.exp)throw new tj.JWTClaimValidationFailed('"exp" claim must be a number',r,"exp","invalid");if(r.exp<=A-n)throw new tj.JWTExpired('"exp" claim timestamp check failed',r,"exp","check_failed")}if(d){let e=A-r.iat;if(e-n>("number"==typeof d?d:(0,tz.default)(d)))throw new tj.JWTExpired('"iat" claim timestamp check failed (too far in the past)',r,"iat","check_failed");if(e<0-n)throw new tj.JWTClaimValidationFailed('"iat" claim timestamp check failed (it should be in the past)',r,"iat","check_failed")}return r};var tJ=tv;async function tK(e,t,i){let r=await t$(e,t,i);if(r.protectedHeader.crit?.includes("b64")&&!1===r.protectedHeader.b64)throw new tJ.JWTInvalid("JWTs MUST NOT use unencoded payload");let n={payload:tW(r.protectedHeader,r.payload,i),protectedHeader:r.protectedHeader};return"function"==typeof t?{...n,key:r.key}:n}var tZ=e.i(762823);async function tX({isGraphQL:e,payload:t,strategyName:i="local-jwt"}){if("object"!=typeof t?.config?.admin?.autoLogin||t.config.admin?.autoLogin.prefillOnly||!t?.config?.admin?.autoLogin||!t.config.admin?.autoLogin.email&&!t.config.admin?.autoLogin.username)return{user:null};let r=t.collections[t.config.admin.user],n={or:[]};t.config.admin?.autoLogin.email?n.or?.push({email:{equals:t.config.admin?.autoLogin.email}}):t.config.admin?.autoLogin.username&&n.or?.push({username:{equals:t.config.admin?.autoLogin.username}});let s=(await t.find({collection:r.config.slug,depth:e?0:r.config.auth.depth,limit:1,pagination:!1,where:n})).docs[0];return s?(s.collection=r.config.slug,s._strategy=i,{user:s}):{user:null}}let t0=async({headers:e,isGraphQL:t=!1,payload:i,strategyName:r="local-jwt"})=>{try{let n=(0,tZ.extractJWT)({headers:e,payload:i});if(!n){if("true"!==e.get("DisableAutologin"))return await tX({isGraphQL:t,payload:i,strategyName:r});return{user:null}}let s=new TextEncoder().encode(i.secret),{payload:a}=await tK(n,s),o=i.collections[a.collection],l=await i.findByID({id:a.id,collection:a.collection,depth:t?0:o.config.auth.depth});if(l&&(!o.config.auth.verify||l._verified)){if(o.config.auth.useSessions){if(!(l.sessions||[]).find(({id:e})=>e===a.sid)||!a.sid)return{user:null};l._sid=a.sid}return l.collection=o.config.slug,l._strategy=r,{user:l}}if("true"!==e.get("DisableAutologin"))return await tX({isGraphQL:t,payload:i,strategyName:r});return{user:null}}catch(n){if("true"!==e.get("DisableAutologin"))return await tX({isGraphQL:t,payload:i,strategyName:r});return{user:null}}};var t1=e.i(924868),t2=e.i(59639),t4=e.i(133415);function t5({addToImportMap:e,baseDir:t,collections:i,config:r,importMap:n,imports:s}){for(let a of i){if((0,t4.genImportMapIterateFields)({addToImportMap:e,baseDir:t,config:r,fields:a.fields,importMap:n,imports:s}),e(a.admin?.components?.afterList),e(a.admin?.components?.listMenuItems),e(a.admin?.components?.afterListTable),e(a.admin?.components?.beforeList),e(a.admin?.components?.beforeListTable),e(a.admin?.components?.Description),e(a.admin?.components?.edit?.beforeDocumentControls),e(a.admin?.components?.edit?.editMenuItems),e(a.admin?.components?.edit?.PreviewButton),e(a.admin?.components?.edit?.PublishButton),e(a.admin?.components?.edit?.SaveButton),e(a.admin?.components?.edit?.SaveDraftButton),e(a.admin?.components?.edit?.Status),e(a.admin?.components?.edit?.UnpublishButton),e(a.admin?.components?.edit?.Upload),a.upload?.admin?.components?.controls&&e(a.upload?.admin?.components?.controls),a.admin?.components?.views?.edit)for(let t of Object.values(a.admin?.components?.views?.edit))"Component"in t&&e(t?.Component),"actions"in t&&e(t?.actions),"tab"in t&&(e(t?.tab?.Component),e(t?.tab?.Pill));e(a.admin?.components?.views?.list?.Component),e(a.admin?.components?.views?.list?.actions)}}var t3=t4,t8=t4;function t9({addToImportMap:e,baseDir:t,config:i,globals:r,importMap:n,imports:s}){for(let a of r)if((0,t8.genImportMapIterateFields)({addToImportMap:e,baseDir:t,config:i,fields:a.fields,importMap:n,imports:s}),e(a.admin?.components?.elements?.beforeDocumentControls),e(a.admin?.components?.elements?.Description),e(a.admin?.components?.elements?.PreviewButton),e(a.admin?.components?.elements?.PublishButton),e(a.admin?.components?.elements?.SaveButton),e(a.admin?.components?.elements?.SaveDraftButton),e(a.admin?.components?.elements?.Status),e(a.admin?.components?.elements?.UnpublishButton),a.admin?.components?.views?.edit)for(let t of Object.values(a.admin?.components?.views?.edit))"Component"in t&&e(t?.Component),"actions"in t&&e(t?.actions),"tab"in t&&(e(t?.tab?.Component),e(t?.tab?.Pill))}function t6({addToImportMap:e,baseDir:t,config:i,importMap:r,imports:n}){if(t5({addToImportMap:e,baseDir:t,collections:i.collections,config:i,importMap:r,imports:n}),t9({addToImportMap:e,baseDir:t,config:i,globals:i.globals,importMap:r,imports:n}),i?.blocks){let s=Object.values(i.blocks);s?.length&&(0,t3.genImportMapIterateFields)({addToImportMap:e,baseDir:t,config:i,fields:s,importMap:r,imports:n})}if("object"==typeof i.admin?.avatar&&e(i.admin?.avatar?.Component),e(i.admin?.components?.Nav),e(i.admin?.components?.header),e(i.admin?.components?.logout?.Button),e(i.admin?.components?.settingsMenu),e(i.admin?.components?.graphics?.Icon),e(i.admin?.components?.graphics?.Logo),e(i.admin?.components?.actions),e(i.admin?.components?.afterDashboard),e(i.admin?.components?.afterLogin),e(i.admin?.components?.afterNav),e(i.admin?.components?.afterNavLinks),e(i.admin?.components?.beforeDashboard),e(i.admin?.components?.beforeLogin),e(i.admin?.components?.beforeNav),e(i.admin?.components?.beforeNavLinks),e(i.admin?.components?.providers),i.admin?.components?.views&&Object.keys(i.admin?.components?.views)?.length)for(let t in i.admin?.components?.views){let r=i.admin?.components?.views[t];e(r?.Component)}if(i.admin?.dashboard?.widgets?.length)for(let s of i.admin.dashboard.widgets)e(s.Component),s.fields?.length&&(0,t3.genImportMapIterateFields)({addToImportMap:e,baseDir:t,config:i,fields:s.fields,importMap:r,imports:n});if(i?.admin?.importMap?.generators?.length)for(let s of i.admin.importMap.generators)s({addToImportMap:e,baseDir:t,config:i,importMap:r,imports:n});if(i?.admin?.dependencies)for(let t of Object.values(i.admin.dependencies))e(t.path)}var t7=i,ie=n;function it(e){let t,i;if(!e)return null;let r="string"==typeof e?e:e.path;return r.includes("#")?[t,i]=r.split("#",2):(t=r,i="default"),"object"==typeof e&&e.exportName&&(i=e.exportName),{exportName:i,path:t}}function ii(e,t){let i=e.replace(/\\/g,"/"),r=t.replace(/\\/g,"/");if(i.startsWith("./")){let e=r.startsWith("./")?r.substring(2):r;return`${i}${e}`}return ie.default.posix.join(i,r)}function ir({importMap:e,importMapToBaseDirPath:t,imports:i,payloadComponent:r}){if(!r)return null;let{exportName:n,path:s}=it(r);if(e[s+"#"+n])return null;let a=n+"_"+t7.default.createHash("md5").update(s).digest("hex");if(e[s+"#"+n]=a,!(s.startsWith(".")||s.startsWith("/")))return i[a]={path:s,specifier:n},{path:s,specifier:n};{let e=ii(t,s);return i[a]={path:e,specifier:n},{path:e,specifier:n}}}e.s(["parsePayloadComponent",()=>it],111281);var is=n;function ia({baseDir:e,importMapPath:t}){let i=is.default.dirname(t),r=is.default.relative(i,e).replace(/\\/g,"/");return r?r.startsWith(".")||r.startsWith("/")||(r=`./${r}`):r="./",r.endsWith("/")||(r+="/"),r}var io=t1,il=n;async function ic(e){try{return await io.default.access(e),!0}catch{return!1}}async function id({adminRoute:e="/admin",importMapFile:t,rootDir:i}){let r;if(t?.length){if(!await ic(t))try{await io.default.writeFile(t,"",{flag:"wx"})}catch(e){return Error(`Could not find the import map file at ${t}${e instanceof Error&&e?.message?`: ${e.message}`:""}`)}r=t}else{let t=il.default.resolve(i,`app/(payload)${e}/`),n=il.default.resolve(i,`src/app/(payload)${e}/`);if(t&&await ic(t))r=il.default.resolve(t,"importMap.js"),await ic(r)||await io.default.writeFile(r,"",{flag:"wx"});else{if(!(n&&await ic(n)))return Error(`Could not find Payload import map folder. Looked in ${t} and ${n}`);r=il.default.resolve(n,"importMap.js"),await ic(r)||await io.default.writeFile(r,"",{flag:"wx"})}}return r}async function iu(e,t){let i=t?.log??!0;i&&console.log("Generating import map");let r={},n={},s=t2.default.env.ROOT_DIR??t2.default.cwd(),a=e.admin.importMap.baseDir??t2.default.cwd(),o=await id({adminRoute:e.routes.admin,importMapFile:e?.admin?.importMap?.importMapFile,rootDir:s});if(o instanceof Error)if(t?.ignoreResolveError)return;else throw o;let l=ia({baseDir:a,importMapPath:o});t6({addToImportMap:e=>{if(e){if("object"!=typeof e&&"string"!=typeof e)throw console.error(e),Error("addToImportMap > Payload component must be an object or a string");if(Array.isArray(e))for(let t of e)ir({importMap:r,importMapToBaseDirPath:l,imports:n,payloadComponent:t});else ir({importMap:r,importMapToBaseDirPath:l,imports:n,payloadComponent:e})}},baseDir:e.admin.importMap.baseDir,config:e,importMap:r,imports:n}),await ih({componentMap:r,force:t?.force,importMap:n,importMapFilePath:o,log:i})}async function ih({componentMap:e,force:t,importMap:i,importMapFilePath:r,log:n}){let s=[];for(let[e,{path:t,specifier:r}]of Object.entries(i))s.push(`import { ${r} as ${e} } from '${t}'`);let a=[];for(let[t,i]of Object.entries(e))a.push(` "${t}": ${i}`);let o=`${s.join("\n")}
|
||
|
||
export const importMap = {
|
||
${a.join(",\n")}
|
||
}
|
||
`;if(!t){let e=await t1.default.readFile(r,"utf-8");if(e?.trim()===o?.trim()){n&&console.log("No new imports found, skipping writing import map");return}}n&&console.log("Writing import map to",r),await t1.default.writeFile(r,o)}var iA=a,ip=o,ig=ei,im=er,iy=en,ib=es,iE=e.i(391033),iC=eu,iw=eh,iI=eA;let iv=async e=>{let t=e;try{let e,i,{collection:{config:r},disableErrors:n,overrideAccess:s,req:a,where:o}=t=await (0,iI.buildBeforeOperation)({args:t,collection:t.collection.config,operation:"countVersions",overrideAccess:t.overrideAccess}),{locale:l,payload:c}=a;if(!s&&(e=await (0,ig.executeAccess)({disableErrors:n,req:a},r.access.readVersions),!1===e))return{totalDocs:0};let d=(0,im.combineQueries)(o,e),u=(0,iE.buildVersionCollectionFields)(c.config,r,!0);return(0,ib.sanitizeWhereQuery)({fields:u,payload:c,where:d}),await (0,iy.validateQueryPaths)({collectionConfig:r,overrideAccess:s,req:a,versionFields:u,where:o}),i=await c.db.countVersions({collection:r.slug,locale:l,req:a,where:d}),i=await (0,iw.buildAfterOperation)({args:t,collection:r,operation:"countVersions",overrideAccess:s,result:i})}catch(e){throw await (0,iC.killTransaction)(t.req),e}};async function iB(e,t){let{collection:i,disableErrors:r,overrideAccess:n=!0,where:s}=t,a=e.collections[i];if(!a)throw new iA.APIError(`The collection with slug ${String(i)} can't be found. Count Versions Operation.`);return iv({collection:a,disableErrors:r,overrideAccess:n,req:await (0,ip.createLocalReq)(t,e),where:s})}let iQ="info@payloadcms.com",ix="Payload",iS=e=>{let t;return"string"==typeof e.to?t=e.to:Array.isArray(e.to)?t=e.to.map(e=>"string"==typeof e?e:e.address?e.address:"").join(", "):e.to?.address&&(t=e.to.address),t},ik=({payload:e})=>({name:"console",defaultFromAddress:iQ,defaultFromName:ix,sendEmail:async t=>{let i=iS(t),r=`Email attempted without being configured. To: '${i}', Subject: '${t.subject}'`;return e.logger.info({msg:r}),Promise.resolve()}});var iT=e.i(186725),iN=o,iD=eo,i_=e.i(381692),iR=e.i(172527),iL=e.i(523174),iF=e.i(279339);let iM=e=>({handleSchedules:async t=>{let i=t?.req??await (0,iN.createLocalReq)({},e);return await (0,iR.handleSchedules)({allQueues:t?.allQueues,queue:t?.queue,req:i})},queue:async t=>{let i,r=t?.overrideAccess!==!1,n=t.req??await (0,iN.createLocalReq)({},e);if(!r){let t=e.config.jobs?.access?.queue??(()=>!0);if(!await t({req:n}))throw new iD.Forbidden(n.t)}if(t.queue)i=t.queue;else if(t.workflow){let r=e.config.jobs?.workflows?.find(({slug:e})=>e===t.workflow);r?.queue&&(i=r.queue)}let s={input:t.input};if(i&&(s.queue=i),t.waitUntil&&(s.waitUntil=t.waitUntil?.toISOString()),t.workflow&&(s.workflowSlug=t.workflow),t.task&&(s.taskSlug=t.task),t.meta&&(s.meta=t.meta),e.config.jobs?.enableConcurrencyControl){let r=null,a=!1,o=i||"default";if(t.workflow){let i=e.config.jobs?.workflows?.find(({slug:e})=>e===t.workflow);if(i?.concurrency){let e=i.concurrency;"function"==typeof e?r=e({input:t.input,queue:o}):(r=e.key({input:t.input,queue:o}),a=e.supersedes??!1)}}else if(t.task){let i=e.config.jobs?.tasks?.find(({slug:e})=>e===t.task);if(i?.concurrency){let e=i.concurrency;"function"==typeof e?r=e({input:t.input,queue:o}):(r=e.key({input:t.input,queue:o}),a=e.supersedes??!1)}}r&&(s.concurrencyKey=r,a&&(e.config.jobs.runHooks?await e.delete({collection:i_.jobsCollectionSlug,depth:0,disableTransaction:!0,where:{and:[{concurrencyKey:{equals:r}},{processing:{equals:!1}},{completedAt:{exists:!1}}]}}):await e.db.deleteMany({collection:i_.jobsCollectionSlug,req:n,where:{and:[{concurrencyKey:{equals:r}},{processing:{equals:!1}},{completedAt:{exists:!1}}]}})))}return e?.config?.jobs?.depth||e?.config?.jobs?.runHooks?await e.create({collection:i_.jobsCollectionSlug,data:s,depth:e.config.jobs.depth??0,overrideAccess:r,req:n}):(0,i_.jobAfterRead)({config:e.config,doc:await e.db.create({collection:i_.jobsCollectionSlug,data:s,req:n})})},run:async t=>{let i=t?.req??await (0,iN.createLocalReq)({},e);return await (0,iL.runJobs)({allQueues:t?.allQueues,limit:t?.limit,overrideAccess:t?.overrideAccess!==!1,processingOrder:t?.processingOrder,queue:t?.queue,req:i,sequential:t?.sequential,silent:t?.silent,where:t?.where})},runByID:async t=>{let i=t.req??await (0,iN.createLocalReq)({},e);return await (0,iL.runJobs)({id:t.id,overrideAccess:!1!==t.overrideAccess,req:i,silent:t.silent})},cancel:async t=>{let i=t.req??await (0,iN.createLocalReq)({},e);if(!1===t.overrideAccess){let t=e.config.jobs?.access?.cancel??(()=>!0);if(!await t({req:i}))throw new iD.Forbidden(i.t)}let r=[t.where,{completedAt:{exists:!1}},{hasError:{not_equals:!0}}];t.queue&&r.push({queue:{equals:t.queue}}),await (0,iF.updateJobs)({data:{completedAt:null,error:{cancelled:!0},hasError:!0,processing:!1,waitUntil:null},depth:0,disableTransaction:!0,req:i,returning:!1,where:{and:r}})},cancelByID:async t=>{let i=t.req??await (0,iN.createLocalReq)({},e);if(!1===t.overrideAccess){let t=e.config.jobs?.access?.cancel??(()=>!0);if(!await t({req:i}))throw new iD.Forbidden(i.t)}await (0,iF.updateJob)({id:t.id,data:{completedAt:null,error:{cancelled:!0},hasError:!0,processing:!1,waitUntil:null},depth:0,disableTransaction:!0,req:i,returning:!1})}});var iO=e.i(416995),iU=e.i(839875);function iP(){return"phase-production-build"===process.env.NEXT_PHASE||"build"===process.env.npm_lifecycle_event}var i$=e.i(906678),ij=e.i(823178);let iH={colorize:!0,ignore:"pid,hostname",translateTime:"SYS:HH:MM:ss"},iq=(0,ij.build)({...iH,destination:1,sync:!0}),iz=(0,ij.build)(iH),iV=(e="payload",t)=>{if(!t)return(0,i$.pino)(iz);if("sync"===t)return(0,i$.pino)(iq);if(!("options"in t))return t;{let{destination:i,options:r}=t;return r.name||(r.name=e),r.enabled||(r.enabled="true"!==process.env.DISABLE_LOGGING),(0,i$.pino)(r,i)}};var iG=e.i(117993);let iY=e=>{(0,iG.sendEvent)({event:{type:"server-init"},payload:e})};var iW=e.i(142262);let iJ={get url(){return`file://${e.P("node_modules/.pnpm/payload@3.81.0_graphql@16.13.2_typescript@5.9.3/node_modules/payload/dist/index.js")}`}},iK=(0,r.fileURLToPath)(iJ.url),iZ=n.default.dirname(iK);class iX{auth=async e=>th(this,e);authStrategies;blocks={};collections={};config;count=async e=>k(this,e);countGlobalVersions=async e=>ej(this,e);countVersions=async e=>iB(this,e);create=async e=>L(this,e);crons=[];db;decrypt=tn;destroy=async()=>{if(this.crons.length){let e=this.crons.splice(0,this.crons.length);await Promise.all(e.map(e=>e.stop()))}this.db?.destroy&&"function"==typeof this.db.destroy&&await this.db.destroy()};duplicate=async e=>q(this,e);email;encrypt=tr;extensions;find=async e=>Y(this,e);findByID=async e=>Z(this,e);findDistinct=async e=>ef(this,e);findGlobal=async e=>eV(this,e);findGlobalVersionByID=async e=>eJ(this,e);findGlobalVersions=async e=>e0(this,e);findVersionByID=async e=>eb(this,e);findVersions=async e=>eI(this,e);forgotPassword=async e=>c(this,e);getAdminURL=()=>(0,iU.formatAdminURL)({adminRoute:this.config.routes.admin,path:"",serverURL:this.config.serverURL});getAPIURL=()=>(0,iU.formatAdminURL)({apiRoute:this.config.routes.api,path:"",serverURL:this.config.serverURL});globals;importMap;jobs=iM(this);kv;logger;login=async e=>A(this,e);resetPassword=async e=>m(this,e);restoreGlobalVersion=async e=>e5(this,e);restoreVersion=async e=>ex(this,e);schema;secret;sendEmail;types;unlock=async e=>C(this,e);updateGlobal=async e=>e7(this,e);validationRules;verifyEmail=async e=>B(this,e);versions={};async _initializeCrons(){if(this.config.jobs.enabled&&this.config.jobs.autoRun&&!iP()){let e="* * * * *",t=10,i="function"==typeof this.config.jobs.autoRun?await this.config.jobs.autoRun(this):this.config.jobs.autoRun;await Promise.all(i.map(i=>{let r=new te.Cron(i.cron??e,async()=>{if(iO._internal_jobSystemGlobals.shouldAutoSchedule&&!i.disableScheduling&&this.config.jobs.scheduling&&await this.jobs.handleSchedules({allQueues:i.allQueues,queue:i.queue}),iO._internal_jobSystemGlobals.shouldAutoRun){if("function"==typeof this.config.jobs.shouldAutoRun&&!await this.config.jobs.shouldAutoRun(this))return void r.stop();await this.jobs.run({allQueues:i.allQueues,limit:i.limit??t,queue:i.queue,silent:i.silent})}},{protect:!0});this.crons.push(r)}))}}async bin({args:e,cwd:i,log:r}){return new Promise((s,a)=>{let o=(0,t.spawn)("node",[n.default.resolve(iZ,"../bin.js"),...e],{cwd:i,stdio:r||void 0===r?"inherit":"ignore"});o.on("exit",e=>{s({code:e})}),o.on("error",e=>{a(e)})})}delete(e){return P(this,e)}async init(e){if(this.importMap=e.importMap,!e?.config)throw Error("Error: the payload config is required to initialize payload.");if(this.config=await e.config,this.logger=iV("payload",this.config.logger),!this.config.secret)throw Error("Error: missing secret key. A secret key is needed to secure Payload.");for(let e of(this.secret=i.default.createHash("sha256").update(this.config.secret).digest("hex").slice(0,32),this.globals={config:this.config.globals},this.config.collections)){let t,i=({field:e})=>!!["array","blocks","group"].includes(e.type)||"tab"===e.type&&"name"in e||((0,iT.fieldAffectsData)(e)&&"id"===e.name?(t=e.type,!0):void 0);(0,iW.traverseFields)({callback:i,config:this.config,fields:e.fields,parentIsLocalized:!1}),this.collections[e.slug]={config:e,customIDType:t}}if(this.blocks=this.config.blocks.reduce((e,t)=>(e[t.slug]=t,e),{}),this.db=this.config.db.init({payload:this}),this.db.payload=this,this.kv=this.config.kv.init({payload:this}),this.db?.init&&await this.db.init(),!e.disableDBConnect&&this.db.connect&&await this.db.connect(),this.config.email instanceof Promise){let e=await this.config.email;this.email=e({payload:this})}else this.config.email?this.email=this.config.email({payload:this}):("phase-production-build"!==process.env.NEXT_PHASE&&this.logger.warn("No email adapter provided. Email will be written to console. More info at https://payloadcms.com/docs/email/overview."),this.email=ik({payload:this}));if(!this.config.sharp&&this.config.collections.some(e=>e.upload.imageSizes||e.upload.formatOptions)&&this.logger.warn("Image resizing is enabled for one or more collections, but sharp not installed. Please install 'sharp' and pass into the config."),process.env.VERCEL){let e=this.config.collections.filter(e=>e.upload&&void 0===e.upload.adapter);if(e.length){let t=e.map(e=>e.slug).join(", ");this.logger.warn(`Collections with uploads enabled require a storage adapter when deploying to Vercel. Collection(s) without storage adapters: ${t}. See https://payloadcms.com/docs/upload/storage-adapters for more info.`)}}this.sendEmail=this.email.sendEmail,iY(this);let t=!1;this.authStrategies=this.config.collections.reduce((e,i)=>(i?.auth&&(i.auth.strategies.length>0&&e.push(...i.auth.strategies),i.auth?.useAPIKey&&e.push({name:`${i.slug}-api-key`,authenticate:tp(i)}),i.auth.disableLocalStrategy||t||(t=!0)),e),[]),t&&this.authStrategies.push({name:"local-jwt",authenticate:t0});try{e.disableOnInit||("function"==typeof e.onInit&&await e.onInit(this),"function"==typeof this.config.onInit&&await this.config.onInit(this))}catch(e){throw this.logger.error({err:e},"Error running onInit function"),e}return e.cron&&await this._initializeCrons(),this}update(e){return e_(this,e)}}new iX;let i0=async(t,i,r,n)=>{"function"==typeof i.db.destroy&&await i.db.destroy(),i.config=t,i.collections=t.collections.reduce((e,t)=>(e[t.slug]={config:t,customIDType:i.collections[t.slug]?.customIDType},e),{}),i.blocks=t.blocks.reduce((e,t)=>(e[t.slug]=t,e),{}),i.globals={config:t.globals},!1!==t.typescript.autoGenerate&&i.bin({args:["generate:types"],log:!1}),!0!==r&&t.admin?.importMap?.autoGenerate!==!1&&await iu(t,{ignoreResolveError:!0,log:!0}),i.db?.init&&await i.db.init(),!n?.disableDBConnect&&i.db.connect&&await i.db.connect({hotReload:!0}),e.g._payload_clientConfigs={},e.g._payload_schemaMap=null,e.g._payload_clientSchemaMap=null,e.g._payload_doNotCacheClientConfig=!0,e.g._payload_doNotCacheSchemaMap=!0,e.g._payload_doNotCacheClientSchemaMap=!0},i1=e.g._payload;i1||(i1=e.g._payload=new Map);let i2=async e=>{if(!e?.config)throw Error("Error: the payload config is required for getPayload to work.");let t=!1,i=i1.get(e.key??"default");if(i?t=!0:(i={initializedCrons:!!e.cron,payload:null,promise:null,reload:!1,ws:null},i1.set(e.key??"default",i)),t&&(e.disableOnInit=!0),i.payload){if(e.cron&&!i.initializedCrons&&(i.initializedCrons=!0,await i.payload._initializeCrons()),!0===i.reload){let t;i.reload=new Promise(e=>t=e);let r=await e.config;await i0(r,i.payload,!1,e),t(),i.reload=!1}return i.reload instanceof Promise&&await i.reload,e?.importMap&&(i.payload.importMap=e.importMap),i.payload}try{i.promise||(i.promise=new iX().init(e)),i.payload=await i.promise}catch(e){throw i.promise=null,e.payloadInitError=!0,e}return e?.importMap&&(i.payload.importMap=e.importMap),i.payload};e.s(["getPayload",0,i2],638626)},341249,e=>{"use strict";e.s(["TeamGrid",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call TeamGrid() from the server but TeamGrid is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/TeamGrid.tsx <module evaluation>","TeamGrid")},281911,e=>{"use strict";e.s(["TeamGrid",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call TeamGrid() from the server but TeamGrid is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/TeamGrid.tsx","TeamGrid")},722916,e=>{"use strict";e.i(341249);var t=e.i(281911);e.n(t)},468564,e=>e.a(async(t,i)=>{try{e.s(["TeamGridBlock",()=>l]);var r=e.i(198526),n=e.i(638626),s=e.i(621990),a=e.i(722916),o=t([s]);[s]=o.then?(await o)():o;let l=async e=>{let{title:t,subtitle:i,filterBranch:o}=e,l=await (0,n.getPayload)({config:s.default}),c={collection:"team",limit:100,depth:1};o&&"all"!==o&&(c.where={branch:{equals:o}});let{docs:d}=await l.find(c),u=d.map(e=>({id:e.id,name:e.name,position:e.position,email:e.email,phone:e.phone,image:e.image,branch:e.branch}));return(0,r.jsx)("div",{className:"team-grid-block",children:(0,r.jsx)(a.TeamGrid,{members:u})})};i()}catch(e){i(e)}},!1),181198,e=>e.a(async(t,i)=>{try{e.s(["TeamGrid",()=>s]);var r=e.i(468564),n=t([r]);[r]=n.then?(await n)():n;let s={slug:"teamGrid",interfaceName:"TeamGridBlock",render:r.TeamGridBlock,fields:[{name:"title",type:"text",localized:!0,defaultValue:"Ihre Ansprechpartner"},{name:"subtitle",type:"text",localized:!0,defaultValue:"Sprechen Sie direkt mit unseren Experten für Ihr regionales Projekt."},{name:"filterBranch",type:"select",options:[{label:"All",value:"all"},{label:"E-TIB GmbH",value:"e-tib"},{label:"Bohrtechnik",value:"bohr"},{label:"Ingenieurgesellschaft",value:"ing"}],defaultValue:"all"}]};i()}catch(e){i(e)}},!1),739798,e=>e.a(async(t,i)=>{try{e.s(["JobListingBlock",()=>l]);var r=e.i(198526),n=e.i(638626),s=e.i(621990),a=e.i(428131),o=t([s]);[s]=o.then?(await o)():o;let l=async e=>{let{title:t,showFairs:i}=e,o=await (0,n.getPayload)({config:s.default}),{docs:l}=await o.find({collection:"jobs",limit:100});return(0,r.jsx)("div",{className:"py-12 md:py-24",children:(0,r.jsxs)("div",{className:"container max-w-4xl mx-auto",children:[i&&(0,r.jsxs)("div",{className:"bg-neutral-dark rounded-3xl p-8 md:p-12 mb-16 text-white overflow-hidden relative group",children:[(0,r.jsx)("div",{className:"absolute top-0 right-0 w-64 h-64 bg-primary/20 blur-3xl -translate-y-1/2 translate-x-1/2"}),(0,r.jsxs)("h3",{className:"font-heading font-bold text-3xl mb-8 relative z-10 flex items-center gap-3",children:[(0,r.jsx)("span",{className:"w-8 h-1 bg-primary"}),"Nächste Messetermine 2026"]}),(0,r.jsx)("ul",{className:"space-y-6 relative z-10",children:[{name:"Intersolar München",date:"19. - 21. Juni 2026",type:"Energie-Messe"},{name:"Windenergietage Linstow",date:"04. - 06. November 2026",type:"Fachkongress"},{name:"Kabelwerkstatt Wiesbaden",date:"02. - 03. Dezember 2026",type:"Fachmesse"}].map(e=>(0,r.jsxs)("li",{className:"flex flex-col md:flex-row md:items-center justify-between border-b border-white/10 pb-6 group/item hover:bg-white/5 transition-colors p-4 -m-4 rounded-xl",children:[(0,r.jsxs)("div",{children:[(0,r.jsx)("span",{className:"text-primary-light font-bold text-sm uppercase tracking-widest block mb-1",children:e.type}),(0,r.jsx)("span",{className:"font-heading font-bold text-2xl",children:e.name})]}),(0,r.jsx)("div",{className:"mt-2 md:mt-0 text-right",children:(0,r.jsx)("span",{className:"text-white/60 font-medium block",children:e.date})})]},e.name))})]}),(0,r.jsxs)("div",{className:"mb-12",children:[(0,r.jsx)("h2",{className:"font-heading font-extrabold text-4xl text-neutral-dark mb-8",children:t||"Aktuelle Stellenangebote"}),l.length>0?(0,r.jsx)("div",{className:"grid gap-6",children:l.map(e=>(0,r.jsxs)(a.default,{href:`/karriere/${e.slug}`,className:"group bg-white border border-neutral-100 p-8 rounded-2xl shadow-sm hover:shadow-xl hover:border-primary/20 transition-all flex flex-col md:flex-row md:items-center justify-between gap-6",children:[(0,r.jsxs)("div",{children:[(0,r.jsxs)("div",{className:"flex items-center gap-3 mb-2",children:[(0,r.jsx)("span",{className:"px-3 py-1 bg-primary/10 text-primary text-xs font-bold rounded-full uppercase",children:e.type}),(0,r.jsx)("span",{className:"text-text-secondary text-sm font-medium",children:e.department})]}),(0,r.jsx)("h4",{className:"font-heading font-bold text-2xl text-neutral-dark group-hover:text-primary transition-colors",children:e.title}),(0,r.jsx)("p",{className:"text-text-secondary mt-1",children:e.location})]}),(0,r.jsxs)("div",{className:"flex items-center text-primary font-bold group-hover:translate-x-2 transition-transform",children:["Details ansehen",(0,r.jsxs)("svg",{xmlns:"http://www.w3.org/2000/svg",className:"w-5 h-5 ml-2",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,r.jsx)("line",{x1:"5",y1:"12",x2:"19",y2:"12"}),(0,r.jsx)("polyline",{points:"12 5 19 12 12 19"})]})]})]},e.id))}):(0,r.jsxs)("div",{className:"bg-neutral-50 border border-neutral-100 rounded-2xl p-12 text-center",children:[(0,r.jsx)("p",{className:"text-text-secondary text-lg",children:"Aktuell sind alle Positionen besetzt. Senden Sie uns gerne eine Initiativbewerbung!"}),(0,r.jsx)(a.default,{href:"/kontakt",className:"inline-block mt-6 text-primary font-bold hover:underline",children:"Jetzt Kontakt aufnehmen"})]})]})]})})};i()}catch(e){i(e)}},!1),802186,e=>e.a(async(t,i)=>{try{e.s(["JobListingBlock",()=>s]);var r=e.i(739798),n=t([r]);[r]=n.then?(await n)():n;let s={slug:"jobListing",interfaceName:"JobListingBlock",render:r.JobListingBlock,fields:[{name:"title",type:"text",localized:!0,defaultValue:"Aktuelle Stellenangebote"},{name:"showFairs",type:"checkbox",defaultValue:!0,label:"Nächste Messetermine anzeigen"}]};i()}catch(e){i(e)}},!1),512961,e=>{"use strict";e.s(["CompanyTimeline",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call CompanyTimeline() from the server but CompanyTimeline is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/CompanyTimeline.tsx <module evaluation>","CompanyTimeline")},4129,e=>{"use strict";e.s(["CompanyTimeline",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call CompanyTimeline() from the server but CompanyTimeline is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/CompanyTimeline.tsx","CompanyTimeline")},548939,e=>{"use strict";e.i(512961);var t=e.i(4129);e.n(t)},441522,e=>{"use strict";let t={slug:"companyTimeline",interfaceName:"CompanyTimelineBlock",render:e.i(548939).CompanyTimeline,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0}]};e.s(["CompanyTimelineBlock",0,t])},797107,e=>{"use strict";var t=e.i(198526),i=e.i(380202);let r={slug:"supportCTA",interfaceName:"SupportCTABlock",render:e=>{let{title:r,description:n,buttonLabel:s,buttonHref:a}=e;return(0,t.jsxs)("div",{className:"mt-24 p-8 md:p-12 bg-primary-dark rounded-3xl text-white shadow-2xl relative overflow-hidden group animate-slight-fade-in-from-bottom",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-64 h-full bg-accent/5 -skew-x-12 translate-x-1/2 transition-transform group-hover:translate-x-1/3"}),(0,t.jsxs)("div",{className:"relative z-10 max-w-2xl",children:[(0,t.jsx)("h3",{className:"text-2xl md:text-3xl font-bold mb-4",children:r}),(0,t.jsx)("p",{className:"text-lg text-white/70 mb-8",children:n}),(0,t.jsxs)(i.default,{href:a,className:"inline-flex items-center px-8 py-4 bg-accent text-primary-dark font-bold rounded-full hover:bg-white transition-all duration-300 group/link",eventProperties:{location:"block_support_cta"},children:[s,(0,t.jsx)("span",{className:"ml-2 transition-transform group-hover/link:translate-x-1",children:"→"})]})]})]})},fields:[{name:"title",type:"text",required:!0},{name:"description",type:"textarea",required:!0},{name:"buttonLabel",type:"text",required:!0},{name:"buttonHref",type:"text",required:!0}]};e.s(["SupportCTA",0,r],797107)},601471,e=>{"use strict";e.s(["HeroVideo",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call HeroVideo() from the server but HeroVideo is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/HeroVideo.tsx <module evaluation>","HeroVideo")},678238,e=>{"use strict";e.s(["HeroVideo",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call HeroVideo() from the server but HeroVideo is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/HeroVideo.tsx","HeroVideo")},519583,e=>{"use strict";e.i(601471);var t=e.i(678238);e.n(t)},225291,e=>{"use strict";e.s(["SubCompanyTiles",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call SubCompanyTiles() from the server but SubCompanyTiles is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/SubCompanyTiles.tsx <module evaluation>","SubCompanyTiles")},12817,e=>{"use strict";e.s(["SubCompanyTiles",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call SubCompanyTiles() from the server but SubCompanyTiles is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/SubCompanyTiles.tsx","SubCompanyTiles")},738520,e=>{"use strict";e.i(225291);var t=e.i(12817);e.n(t)},505560,e=>{"use strict";e.s(["CompetenceBentoGrid",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call CompetenceBentoGrid() from the server but CompetenceBentoGrid is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/CompetenceBentoGrid.tsx <module evaluation>","CompetenceBentoGrid")},141401,e=>{"use strict";e.s(["CompetenceBentoGrid",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call CompetenceBentoGrid() from the server but CompetenceBentoGrid is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/CompetenceBentoGrid.tsx","CompetenceBentoGrid")},456286,e=>{"use strict";e.i(505560);var t=e.i(141401);e.n(t)},643787,e=>{"use strict";e.s(["ReferencesSlider",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call ReferencesSlider() from the server but ReferencesSlider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/ReferencesSlider.tsx <module evaluation>","ReferencesSlider")},152385,e=>{"use strict";e.s(["ReferencesSlider",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call ReferencesSlider() from the server but ReferencesSlider is on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/blocks/ReferencesSlider.tsx","ReferencesSlider")},170968,e=>{"use strict";e.i(643787);var t=e.i(152385);e.n(t)},934238,104904,e=>{"use strict";var t=e.i(536883),i=e.i(662777),r=e.i(796617)["use".trim()];function n(e){return function(e,t){try{return r(t)}catch(t){throw t instanceof TypeError&&t.message.includes("Cannot read properties of null (reading 'use')")?Error(`\`${e}\` is not callable within an async component. Please refer to https://next-intl.dev/docs/environments/server-client-components#async-components`,{cause:t}):t}}(e,(0,i.default)())}function s(...[e]){let i=n("useTranslations");return(0,t.default)(i,e)}e.s(["default",()=>n],104904),e.s(["useTranslations",()=>s],934238)},104993,e=>{"use strict";var t=e.i(104904);function i(){return(0,t.default)("useLocale").locale}e.s(["useLocale",()=>i],104993)},598706,e=>{"use strict";var t=e.i(198526),i=e.i(428131),r=e.i(641090),n=e.i(934238),s=e.i(104993);e.i(268578);var a=e.i(199196);function o({data:e}){let o=(0,n.useTranslations)("Products"),l=(0,s.useLocale)(),c="de"===l?"produkte":"products",d=[{title:o("categories.lowVoltage.title"),desc:o("categories.lowVoltage.description"),img:"/uploads/2024/11/low-voltage-category.webp",icon:"/uploads/2024/11/Low-Voltage.svg",href:`/${l}/${c}/${"de"===l?"niederspannungskabel":"low-voltage-cables"}`},{title:o("categories.mediumVoltage.title"),desc:o("categories.mediumVoltage.description"),img:"/uploads/2024/11/medium-voltage-category.webp",icon:"/uploads/2024/11/Medium-Voltage.svg",href:`/${l}/${c}/${"de"===l?"mittelspannungskabel":"medium-voltage-cables"}`},{title:o("categories.highVoltage.title"),desc:o("categories.highVoltage.description"),img:"/uploads/2024/11/high-voltage-category.webp",icon:"/uploads/2024/11/High-Voltage.svg",href:`/${l}/${c}/${"de"===l?"hochspannungskabel":"high-voltage-cables"}`},{title:o("categories.solar.title"),desc:o("categories.solar.description"),img:"/uploads/2024/11/solar-category.webp",icon:"/uploads/2024/11/Solar.svg",href:`/${l}/${c}/${"de"===l?"solarkabel":"solar-cables"}`}];return(0,t.jsxs)(a.Section,{className:"bg-neutral-light py-0 md:py-0 lg:py-0 -mt-px",children:[(e?.title||o.has("title"))&&(0,t.jsx)("h2",{className:"sr-only",children:e?.title?(0,t.jsx)("span",{dangerouslySetInnerHTML:{__html:e.title}}):o.rich("title",{green:e=>(0,t.jsx)("span",{children:e})})}),(0,t.jsx)("div",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4",children:d.map((e,n)=>(0,t.jsxs)(i.default,{href:e.href,className:"group block relative h-[400px] md:h-[500px] lg:h-[650px] overflow-hidden border-b md:border-b-0 md:border-r border-white/10 last:border-0",children:[(0,t.jsx)(r.default,{src:e.img,alt:e.title,fill:!0,className:"object-cover transition-transform duration-1000 group-hover:scale-110",sizes:"(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 24vw"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-primary-dark/40 group-hover:bg-primary-dark/60 transition-all duration-500"}),(0,t.jsxs)("div",{className:"absolute inset-0 p-8 md:p-10 flex flex-col justify-end text-white",children:[(0,t.jsxs)("div",{className:"mb-4 md:mb-6 transform transition-all duration-500 group-hover:-translate-y-4",children:[(0,t.jsx)("div",{className:"w-12 h-12 md:w-16 md:h-16 bg-white/10 backdrop-blur-md rounded-xl flex items-center justify-center mb-4 md:mb-6 border border-white/20",children:(0,t.jsx)(r.default,{src:e.icon,alt:"",width:40,height:40,className:"w-8 h-8 md:w-10 md:h-10 brightness-0 invert"})}),(0,t.jsx)("h3",{className:"text-xl md:text-2xl font-bold mb-2 md:mb-4 leading-tight",children:e.title}),(0,t.jsx)("p",{className:"text-white/80 text-sm md:text-base line-clamp-3 opacity-100 md:opacity-0 group-hover:opacity-100 transition-all duration-500 max-h-24 md:max-h-0 group-hover:max-h-32",children:e.desc})]}),(0,t.jsxs)("div",{className:"flex items-center text-accent font-bold tracking-wider uppercase text-xs md:text-xs opacity-100 md:opacity-0 group-hover:opacity-100 transition-all duration-500 delay-100",children:[o("exploreCategory")," ",(0,t.jsx)("span",{className:"ml-2 transition-transform group-hover:translate-x-2",children:"→"})]})]})]},n))})]})}e.s(["default",()=>o])},16885,e=>{"use strict";var t=e.i(198526),i=e.i(934238);e.i(268578);var r=e.i(199196),n=e.i(663935),s=e.i(125762);function a({data:e}){let a=(0,i.useTranslations)("Home.whatWeDo"),o=e?.items?.length?e.items:[0,1,2,3].map(e=>({title:a(`items.${e}.title`),description:a(`items.${e}.description`)}));return(0,t.jsx)(r.Section,{className:"bg-white",children:(0,t.jsx)(n.Container,{children:(0,t.jsxs)("div",{className:"sticky-narrative-container",children:[(0,t.jsx)("div",{className:"sticky-narrative-sidebar",children:(0,t.jsxs)("div",{className:"lg:sticky lg:top-32",children:[(0,t.jsx)(s.Heading,{level:2,subtitle:e?.expertiseLabel||a("expertise"),className:"text-primary-dark",children:e?.title||a("title")}),(0,t.jsx)("p",{className:"text-base md:text-lg text-text-secondary leading-relaxed",children:e?.subtitle||a("subtitle")}),(0,t.jsx)("div",{className:"mt-8 md:mt-12 p-6 md:p-8 bg-saturated/10 rounded-2xl border border-saturated/10",children:(0,t.jsxs)("p",{className:"text-saturated font-bold text-base md:text-base italic",children:['"',e?.quote||a("quote"),'"']})})]})}),(0,t.jsx)("div",{className:"sticky-narrative-content grid grid-cols-1 md:grid-cols-2 gap-x-8 md:gap-x-12 gap-y-12 md:gap-y-20",children:o.map((e,i)=>(0,t.jsxs)("div",{className:"group",children:[(0,t.jsxs)("div",{className:"flex items-center gap-4 mb-4 md:mb-6",children:[(0,t.jsx)("span",{className:"flex items-center justify-center w-10 h-10 md:w-12 md:h-12 rounded-full bg-saturated text-white font-bold text-base md:text-lg shadow-lg shadow-saturated/20 group-hover:scale-110 transition-transform",children:i+1}),(0,t.jsx)("div",{className:"h-px flex-grow bg-neutral-medium"})]}),(0,t.jsx)("h3",{className:"text-lg md:text-xl font-bold mb-3 md:mb-4 text-primary-dark group-hover:text-accent-dark transition-colors",children:e.title}),(0,t.jsx)("p",{className:"text-text-secondary text-base md:text-base leading-relaxed",children:e.description})]},i))})]})})})}e.s(["default",()=>a])},544340,e=>e.a(async(t,i)=>{try{e.s(["getAllPosts",()=>l,"getAllPostsMetadata",()=>c,"getPostBySlug",()=>o]);var r=e.i(638626),n=e.i(621990),s=e.i(872507),a=t([n]);async function o(e,t){try{let i=await (0,r.getPayload)({config:n.default}),{docs:a}=await i.find({collection:"posts",where:{slug:{equals:e},...!s.config.showDrafts?{_status:{equals:"published"}}:{}},locale:t,draft:s.config.showDrafts,limit:1});if(!a||0===a.length){let{docs:r}=await i.find({collection:"posts",where:{slug:{equals:e},...!s.config.showDrafts?{_status:{equals:"published"}}:{}},locale:"all",draft:s.config.showDrafts,limit:1});if(r&&r.length>0){let{docs:e}=await i.find({collection:"posts",where:{id:{equals:r[0].id}},locale:t,draft:s.config.showDrafts,limit:1});a=e}}if(!a||0===a.length)return null;let o=a[0];return{slug:o.slug,frontmatter:{title:o.title,date:o.date,excerpt:o.excerpt||"",category:o.category||"",featuredImage:"object"==typeof o.featuredImage&&null!==o.featuredImage?o.featuredImage.url||o.featuredImage.sizes?.card?.url:null,focalX:"object"==typeof o.featuredImage&&null!==o.featuredImage?o.featuredImage.focalX:50,focalY:"object"==typeof o.featuredImage&&null!==o.featuredImage?o.featuredImage.focalY:50,public:"published"===o._status},content:o.content}}catch(t){return console.error(`[Payload] getPostBySlug failed for ${e}:`,t),null}}async function l(e){try{let t=await (0,r.getPayload)({config:n.default}),{docs:i}=await t.find({collection:"posts",where:{...!s.config.showDrafts?{_status:{equals:"published"}}:{}},locale:e,sort:"-date",draft:s.config.showDrafts,limit:100});return console.log(`[Payload] getAllPosts for ${e}: Found ${i.length} docs`),i.map(e=>({slug:e.slug,frontmatter:{title:e.title,date:e.date,excerpt:e.excerpt||"",category:e.category||"",featuredImage:"object"==typeof e.featuredImage&&null!==e.featuredImage?e.featuredImage.url||e.featuredImage.sizes?.card?.url:null,focalX:"object"==typeof e.featuredImage&&null!==e.featuredImage?e.featuredImage.focalX:50,focalY:"object"==typeof e.featuredImage&&null!==e.featuredImage?e.featuredImage.focalY:50},content:e.content})).filter(e=>!!e.frontmatter.featuredImage)}catch(t){return console.error(`[Payload] getAllPosts failed for ${e}:`,t),[]}}async function c(e){return(await l(e)).map(e=>({slug:e.slug,frontmatter:e.frontmatter}))}[n]=a.then?(await a)():a,i()}catch(e){i(e)}},!1),398334,e=>e.a(async(t,i)=>{try{e.s(["default",()=>h]);var r=e.i(198526),n=e.i(641090),s=e.i(428131),a=e.i(544340),o=e.i(477077);e.i(268578);var l=e.i(199196),c=e.i(663935),d=e.i(125762),u=t([a]);async function h({locale:e,data:t}){let i=await (0,o.getTranslations)("Blog"),u=(await (0,a.getAllPosts)(e)).slice(0,4);if(0===u.length)return null;let h=t?.title||i("allArticles"),A=t?.subtitle||i("latestNews");return(0,r.jsxs)(l.Section,{className:"bg-neutral-light py-0 md:py-0 lg:py-0",children:[(0,r.jsx)(c.Container,{className:"py-12 md:py-16",children:(0,r.jsxs)("div",{className:"flex flex-col md:flex-row items-start md:items-end justify-between gap-6",children:[(0,r.jsx)(d.Heading,{level:2,subtitle:A,className:"mb-0 text-primary",children:h}),(0,r.jsxs)(s.default,{href:`/${e}/blog`,className:"group flex items-center text-primary font-bold text-base md:text-lg touch-target",children:[h,(0,r.jsx)("span",{className:"ml-2 transition-transform group-hover:translate-x-2",children:"→"})]})]})}),(0,r.jsx)("ul",{className:"grid grid-cols-1 md:grid-cols-2 lg:grid-cols-4 m-0 p-0 list-none",children:u.map((t,a)=>(0,r.jsx)("li",{className:"block",children:(0,r.jsxs)(s.default,{href:`/${e}/blog/${t.slug}`,className:"group block relative h-[400px] md:h-[500px] lg:h-[650px] overflow-hidden border-b md:border-b-0 md:border-r border-white/10 last:border-0 focus:outline-none",children:[t.frontmatter.featuredImage&&(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(n.default,{src:t.frontmatter.featuredImage.split("?")[0],alt:t.frontmatter.title,fill:!0,className:"object-cover transition-transform duration-1000 group-hover:scale-110",style:{objectPosition:`${t.frontmatter.focalX??50}% ${t.frontmatter.focalY??50}%`},sizes:"(max-width: 768px) 100vw, (max-width: 1024px) 50vw, 25vw",loading:"lazy"}),(0,r.jsx)("div",{className:"absolute inset-0 bg-primary-dark/40 group-hover:bg-primary-dark/60 transition-all duration-500"})]}),(0,r.jsxs)("div",{className:"absolute inset-0 p-8 md:p-10 flex flex-col justify-end text-white",children:[(0,r.jsxs)("div",{className:"mb-4 md:mb-6 transform transition-all duration-500 group-hover:-translate-y-4",children:[(0,r.jsxs)("div",{className:"flex flex-wrap items-center gap-2 mb-4",children:[t.frontmatter.category&&(0,r.jsx)("span",{className:"px-3 py-1 bg-accent text-primary-dark rounded-full text-[10px] md:text-xs font-bold uppercase tracking-wider shadow-sm",children:t.frontmatter.category}),(0,r.jsx)("time",{dateTime:t.frontmatter.date,suppressHydrationWarning:!0,className:"px-3 py-1 text-white/80 text-[10px] md:text-xs font-bold uppercase tracking-widest border border-white/20 rounded-full bg-white/10 backdrop-blur-md",children:new Date(t.frontmatter.date).toLocaleDateString(["en","de"].includes(e)?e:"de",{year:"numeric",month:"short",day:"numeric"})}),(new Date(t.frontmatter.date)>new Date||!1===t.frontmatter.public)&&(0,r.jsx)("span",{className:"px-2 py-0.5 border border-white/40 text-white/90 rounded uppercase tracking-widest text-[10px] md:text-xs font-bold bg-neutral-dark/40 shadow-sm",children:"Draft Preview"})]}),(0,r.jsx)("h3",{className:"text-xl md:text-2xl font-bold mb-2 md:mb-4 leading-tight drop-shadow-md",children:t.frontmatter.title})]}),(0,r.jsxs)("div",{className:"flex items-center text-accent font-bold tracking-wider uppercase text-xs md:text-xs opacity-100 md:opacity-0 group-hover:opacity-100 transition-all duration-500 delay-100",children:[i("readMore")," ",(0,r.jsx)("span",{className:"ml-2 transition-transform group-hover:translate-x-2",children:"→"})]})]})]})},`${t.slug}-${a}`))})]})}[a]=u.then?(await u)():u,i()}catch(e){i(e)}},!1),554629,e=>{"use strict";var t=e.i(198526),i=e.i(641090),r=e.i(934238);e.i(268578);var n=e.i(199196),s=e.i(663935),a=e.i(125762);function o({data:e}){let o=(0,r.useTranslations)("Home.experience");return(0,t.jsxs)(n.Section,{className:"relative py-32 md:py-48 overflow-hidden text-white",children:[(0,t.jsxs)("div",{className:"absolute inset-0 z-0",children:[(0,t.jsx)(i.default,{src:"/uploads/2024/12/1694273920124-copy-2.webp",alt:e?.subtitle||o("subtitle"),fill:!0,className:"object-cover object-center scale-105 animate-slow-zoom",sizes:"100vw",quality:100}),(0,t.jsx)("div",{className:"absolute inset-0 bg-primary/80 mix-blend-multiply"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-r from-primary via-primary/40 to-transparent"})]}),(0,t.jsx)(s.Container,{className:"relative z-10",children:(0,t.jsxs)("div",{className:"max-w-3xl",children:[(0,t.jsx)(a.Heading,{level:2,subtitle:e?.subtitle||o("subtitle"),className:"text-white",children:(0,t.jsx)("span",{className:"text-white",children:e?.title||o("title")})}),(0,t.jsxs)("div",{className:"space-y-8 text-lg md:text-xl text-white/90 leading-relaxed font-medium",children:[(0,t.jsx)("p",{className:"border-l-4 border-accent pl-8 py-2 bg-white/5 backdrop-blur-sm rounded-r-xl",children:e?.paragraph1||o("p1")}),(0,t.jsx)("p",{className:"pl-9",children:e?.paragraph2||o("p2")})]}),(0,t.jsxs)("dl",{className:"mt-16 grid grid-cols-1 md:grid-cols-2 gap-12",children:[(0,t.jsxs)("div",{className:"animate-fade-in",children:[(0,t.jsx)("dt",{className:"text-2xl md:text-3xl font-extrabold text-accent mb-4",children:e?.badge1||o("certifiedQuality")}),(0,t.jsx)("dd",{className:"text-base md:text-lg font-bold uppercase tracking-widest text-white/60",children:e?.badge1Text||o("vdeApproved")})]}),(0,t.jsxs)("div",{className:"animate-fade-in",style:{animationDelay:"100ms"},children:[(0,t.jsx)("dt",{className:"text-2xl md:text-3xl font-extrabold text-accent mb-4",children:e?.badge2||o("fullSpectrum")}),(0,t.jsx)("dd",{className:"text-base md:text-lg font-bold uppercase tracking-widest text-white/60",children:e?.badge2Text||o("solutionsRange")})]})]})]})})]})}e.s(["default",()=>o])},194673,e=>{"use strict";var t=e.i(198526),i=e.i(934238);e.i(268578);var r=e.i(199196),n=e.i(663935),s=e.i(125762);function a({data:e}){let a=(0,i.useTranslations)("Home.whyChooseUs"),o=e?.features?.length?e.features.map(e=>e.feature):[0,1,2,3].map(e=>a(`features.${e}`)),l=e?.items?.length?e.items:[0,1,2,3].map(e=>({title:a(`items.${e}.title`),description:a(`items.${e}.description`)}));return(0,t.jsx)(r.Section,{className:"bg-neutral-light",children:(0,t.jsx)(n.Container,{children:(0,t.jsxs)("div",{className:"grid grid-cols-1 lg:grid-cols-12 gap-16 lg:gap-24",children:[(0,t.jsx)("div",{className:"lg:col-span-4 order-1 lg:order-2",children:(0,t.jsxs)("div",{className:"sticky top-32",children:[(0,t.jsx)(s.Heading,{level:2,subtitle:e?.tagline||a("whyKlz"),className:"text-primary-dark",children:e?.title||a("title")}),(0,t.jsx)("p",{className:"text-base md:text-lg text-text-secondary leading-relaxed",children:e?.subtitle||a("subtitle")}),(0,t.jsx)("ul",{className:"mt-12 space-y-6 list-none p-0",children:o.map((e,i)=>(0,t.jsxs)("li",{className:"flex items-center gap-4",children:[(0,t.jsx)("div",{className:"flex-shrink-0 w-6 h-6 rounded-full bg-accent flex items-center justify-center",children:(0,t.jsx)("svg",{className:"w-4 h-4 text-primary-dark",fill:"none",stroke:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:(0,t.jsx)("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:3,d:"M5 13l4 4L19 7"})})}),(0,t.jsx)("span",{className:"font-bold text-primary-dark text-base md:text-base",children:e})]},i))})]})}),(0,t.jsx)("ul",{className:"lg:col-span-8 grid grid-cols-1 md:grid-cols-2 gap-8 order-2 lg:order-1 list-none p-0 m-0",children:l.map((e,i)=>(0,t.jsxs)("li",{className:"p-10 bg-white rounded-3xl border border-neutral-medium hover:border-accent transition-all duration-500 hover:shadow-xl group",children:[(0,t.jsx)("div",{className:"w-14 h-14 bg-saturated/10 rounded-2xl flex items-center justify-center mb-8 group-hover:bg-accent transition-colors duration-500",children:(0,t.jsxs)("span",{className:"text-white font-bold text-lg group-hover:text-primary-dark",children:["0",i+1]})}),(0,t.jsx)("h3",{className:"text-xl font-bold mb-4 text-primary-dark",children:e.title}),(0,t.jsx)("p",{className:"text-text-secondary text-base md:text-base leading-relaxed",children:e.description})]},i))})]})})})}e.s(["default",()=>a])},581041,e=>{"use strict";var t=e.i(198526),i=e.i(641090),r=e.i(934238),n=e.i(104993);e.i(268578);var s=e.i(199196),a=e.i(663935),o=e.i(911006),l=e.i(125762);function c({data:e}){let c=(0,r.useTranslations)("Home.meetTheTeam");(0,r.useTranslations)("Team");let d=(0,n.useLocale)();return(0,t.jsxs)(s.Section,{className:"relative py-32 md:py-48 overflow-hidden",children:[(0,t.jsxs)("div",{className:"absolute inset-0 z-0",children:[(0,t.jsx)(i.default,{src:"/uploads/2024/12/DSC08036-Large.webp",alt:e?.subtitle||c("subtitle"),fill:!0,className:"object-cover scale-105 animate-slow-zoom",sizes:"100vw",quality:100}),(0,t.jsx)("div",{className:"absolute inset-0 bg-primary/70 mix-blend-multiply"}),(0,t.jsx)("div",{className:"absolute inset-0 bg-gradient-to-t from-primary via-primary/20 to-transparent"})]}),(0,t.jsx)(a.Container,{className:"relative z-10",children:(0,t.jsxs)("div",{className:"max-w-3xl text-white animate-slide-up",children:[(0,t.jsx)(l.Heading,{level:2,subtitle:e?.subtitle||c("subtitle"),className:"text-white mb-8",children:(0,t.jsx)("span",{className:"text-white",children:e?.title||c("title")})}),(0,t.jsxs)("div",{className:"relative mb-12",children:[(0,t.jsx)("div",{className:"absolute -left-8 top-0 bottom-0 w-1 bg-accent rounded-full"}),(0,t.jsxs)("p",{className:"text-xl md:text-2xl leading-relaxed font-medium italic text-white/90 pl-8",children:['"',e?.description||c("description"),'"']})]}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-8 items-center",children:[(0,t.jsxs)(o.Button,{href:`/${d}/team`,variant:"accent",size:"xl",className:"group",children:[e?.ctaLabel||c("cta"),(0,t.jsx)("span",{className:"ml-3 transition-transform group-hover:translate-x-2",children:"→"})]}),(0,t.jsxs)("div",{className:"flex items-center gap-4",children:[(0,t.jsxs)("div",{className:"flex -space-x-4",children:[(0,t.jsx)("div",{className:"w-14 h-14 rounded-full border-4 border-primary overflow-hidden relative",children:(0,t.jsx)(i.default,{src:"/uploads/2024/12/DSC07768-Large.webp",alt:"Team E-TIB",fill:!0,className:"object-cover"})}),(0,t.jsx)("div",{className:"w-14 h-14 rounded-full border-4 border-primary overflow-hidden relative",children:(0,t.jsx)(i.default,{src:"/uploads/2024/12/DSC07963-Large.webp",alt:"Experten",fill:!0,className:"object-cover"})})]}),(0,t.jsx)("span",{className:"text-white/60 font-bold text-xs md:text-sm uppercase tracking-widest",children:e?.networkLabel||c("andNetwork")})]})]})]})})]})}e.s(["default",()=>c])},868194,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/home/GallerySection.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/home/GallerySection.tsx <module evaluation>","default")},70025,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/home/GallerySection.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/home/GallerySection.tsx","default")},132398,e=>{"use strict";e.i(868194);var t=e.i(70025);e.n(t)},372422,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/home/VideoSection.tsx <module evaluation> from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/home/VideoSection.tsx <module evaluation>","default")},386170,e=>{"use strict";e.s(["default",()=>t]);let t=(0,e.i(626481).registerClientReference)(function(){throw Error("Attempted to call the default export of [project]/components/home/VideoSection.tsx from the server, but it's on the client. It's not possible to invoke a client function from the server, it can only be rendered as a Component or passed to props of a Client Component.")},"[project]/components/home/VideoSection.tsx","default")},970605,e=>{"use strict";e.i(372422);var t=e.i(386170);e.n(t)},692118,e=>{"use strict";var t=e.i(198526),i=e.i(934238),r=e.i(104993);e.i(268578);var n=e.i(199196),s=e.i(663935),a=e.i(911006),o=e.i(125762);function l({data:e}){let l=(0,i.useTranslations)("Home.cta"),c=(0,r.useLocale)();return(0,t.jsxs)(n.Section,{className:"bg-primary text-white py-32 relative overflow-hidden",children:[(0,t.jsx)("div",{className:"absolute top-0 right-0 w-1/3 h-full bg-accent/5 -skew-x-12 translate-x-1/2"}),(0,t.jsx)("div",{className:"absolute bottom-0 left-0 w-1/4 h-1/2 bg-primary/10 rounded-full blur-3xl -translate-x-1/2 translate-y-1/2"}),(0,t.jsx)(s.Container,{className:"relative z-10",children:(0,t.jsxs)("div",{className:"flex flex-col lg:flex-row items-center justify-between gap-16",children:[(0,t.jsxs)("div",{className:"max-w-3xl text-center lg:text-left",children:[(0,t.jsx)(o.Heading,{level:2,subtitle:e?.subtitle||l("subtitle"),className:"text-white mb-6",children:(0,t.jsx)("span",{className:"text-white",children:e?.title||l("title")})}),(0,t.jsx)("p",{className:"text-lg md:text-xl text-white/70 leading-relaxed",children:e?.description||l("description")})]}),(0,t.jsx)("div",{className:"flex-shrink-0",children:(0,t.jsxs)(a.Button,{href:`/${c}/contact`,variant:"accent",size:"xl",className:"group px-12",children:[e?.buttonLabel||l("button"),(0,t.jsx)("span",{className:"ml-3 transition-transform group-hover:translate-x-2",children:"→"})]})})]})})]})}e.s(["default",()=>l])},662778,e=>e.a(async(t,i)=>{try{e.s(["homeBlocksArray",()=>T]);var r=e.i(519583),n=e.i(738520),s=e.i(456286),a=e.i(170968),o=e.i(598706),l=e.i(16885),c=e.i(398334),d=e.i(554629),u=e.i(194673),h=e.i(581041),A=e.i(132398),p=e.i(970605),f=e.i(692118),g=t([c]);[c]=g.then?(await g)():g;let m={slug:"homeHero",interfaceName:"HomeHeroBlock",render:r.HeroVideo,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0},{name:"videoUrl",type:"text",admin:{description:"URL to the background mp4 video"}},{name:"posterImage",type:"upload",relationTo:"media"},{name:"ctaLabel",type:"text",localized:!0},{name:"ctaHref",type:"text"},{name:"secondaryCtaLabel",type:"text",localized:!0},{name:"secondaryCtaHref",type:"text"}]},y={slug:"homeSubCompanyTiles",interfaceName:"HomeSubCompanyTilesBlock",render:n.SubCompanyTiles,fields:[{name:"badge",type:"text",localized:!0},{name:"title",type:"text",localized:!0},{name:"companies",type:"array",localized:!0,fields:[{name:"title",type:"text"},{name:"description",type:"textarea"},{name:"icon",type:"text",admin:{description:"SVG path for the icon"}},{name:"backgroundImage",type:"upload",relationTo:"media"}]}]},b={slug:"homeCompetenceBentoGrid",interfaceName:"HomeCompetenceBentoGridBlock",render:s.CompetenceBentoGrid,fields:[{name:"badge",type:"text",localized:!0},{name:"title",type:"text",localized:!0},{name:"ctaLabel",type:"text",localized:!0},{name:"ctaHref",type:"text"},{name:"items",type:"array",localized:!0,fields:[{name:"title",type:"text"},{name:"description",type:"textarea"},{name:"tag",type:"text"},{name:"image",type:"upload",relationTo:"media"},{name:"size",type:"select",options:[{label:"Large (2x2)",value:"large"},{label:"Medium (1x2)",value:"medium"},{label:"Small (1x1)",value:"small"},{label:"Accent (Text only)",value:"accent"}],defaultValue:"small"}]}]},E={slug:"homeReferencesSlider",interfaceName:"HomeReferencesSliderBlock",render:a.ReferencesSlider,fields:[{name:"badge",type:"text",localized:!0},{name:"title",type:"text",localized:!0},{name:"description",type:"textarea",localized:!0},{name:"ctaLabel",type:"text",localized:!0},{name:"ctaHref",type:"text"}]},C={slug:"homeProductCategories",interfaceName:"HomeProductCategoriesBlock",render:o.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0}]},w={slug:"homeWhatWeDo",interfaceName:"HomeWhatWeDoBlock",render:l.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0},{name:"expertiseLabel",type:"text",localized:!0},{name:"quote",type:"textarea",localized:!0},{name:"items",type:"array",localized:!0,fields:[{name:"title",type:"text"},{name:"description",type:"textarea"}]}]},I={slug:"homeRecentPosts",interfaceName:"HomeRecentPostsBlock",render:c.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0}]},v={slug:"homeExperience",interfaceName:"HomeExperienceBlock",render:d.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0},{name:"paragraph1",type:"textarea",localized:!0},{name:"paragraph2",type:"textarea",localized:!0},{name:"badge1",type:"text",localized:!0},{name:"badge1Text",type:"text",localized:!0},{name:"badge2",type:"text",localized:!0},{name:"badge2Text",type:"text",localized:!0}]},B={slug:"homeWhyChooseUs",interfaceName:"HomeWhyChooseUsBlock",render:u.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0},{name:"tagline",type:"text",localized:!0},{name:"features",type:"array",localized:!0,fields:[{name:"feature",type:"text"}]},{name:"items",type:"array",localized:!0,fields:[{name:"title",type:"text"},{name:"description",type:"textarea"}]}]},Q={slug:"homeMeetTheTeam",interfaceName:"HomeMeetTheTeamBlock",render:h.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0},{name:"description",type:"textarea",localized:!0},{name:"ctaLabel",type:"text",localized:!0},{name:"networkLabel",type:"text",localized:!0}]},x={slug:"homeGallery",interfaceName:"HomeGalleryBlock",render:A.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0}]},S={slug:"homeVideo",interfaceName:"HomeVideoBlock",render:p.default,fields:[{name:"title",type:"text",localized:!0}]},k={slug:"homeCTA",interfaceName:"HomeCTABlock",render:f.default,fields:[{name:"title",type:"text",localized:!0},{name:"subtitle",type:"text",localized:!0},{name:"description",type:"textarea",localized:!0},{name:"buttonLabel",type:"text",localized:!0}]},T=[m,y,b,E,C,w,I,v,B,Q,x,S,k];i()}catch(e){i(e)}},!1),865054,e=>e.a(async(t,i)=>{try{e.s(["payloadBlocks",()=>S]);var r=e.i(406813),n=e.i(589489),s=e.i(558184),a=e.i(398885),o=e.i(522058),l=e.i(154370),c=e.i(482021),d=e.i(754378),u=e.i(455980),h=e.i(418910),A=e.i(766613),p=e.i(987117),f=e.i(959035),g=e.i(802148),m=e.i(640359),y=e.i(263112),b=e.i(710347),E=e.i(861079),C=e.i(8304),w=e.i(181198),I=e.i(802186),v=e.i(441522),B=e.i(797107),Q=e.i(662778),x=t([w,I,Q]);[w,I,Q]=x.then?(await x)():x;let S=[...Q.homeBlocksArray,r.AnimatedImage,n.Callout,s.CategoryGrid,a.ChatBubble,o.ComparisonGrid,l.ContactSection,c.HeroSection,d.HighlightBox,u.ImageGallery,h.ManifestoGrid,A.PowerCTA,p.ProductTabs,f.SplitHeading,g.Stats,m.StickyNarrative,y.TeamProfile,b.TechnicalGrid,E.VisualLinkPreview,C.PDFDownload,w.TeamGrid,I.JobListingBlock,v.CompanyTimelineBlock,B.SupportCTA].map(({render:e,...t})=>t);i()}catch(e){i(e)}},!1),739976,e=>{"use strict";let t={slug:"users",admin:{useAsTitle:"email"},auth:!0,fields:[]};e.s(["Users",0,t])},638954,e=>{"use strict";let t={slug:"media",access:{read:()=>!0},admin:{useAsTitle:"filename",defaultColumns:["filename","alt","updatedAt"]},upload:{staticDir:"public/media",adminThumbnail:"thumbnail",imageSizes:[{name:"thumbnail",width:600,height:void 0,position:"centre"},{name:"card",width:768,height:void 0,position:"centre"},{name:"tablet",width:1024,height:void 0,position:"centre"}]},fields:[{name:"alt",type:"text",required:!0},{name:"caption",type:"text"}]};e.s(["Media",0,t])},694582,e=>{"use strict";var t=e.i(560765),i=e.i(719925),r=e.i(640359),n=e.i(522058),s=e.i(861079),a=e.i(710347),o=e.i(754378),l=e.i(406813),c=e.i(398885),d=e.i(766613),u=e.i(589489),h=e.i(802148),A=e.i(959035);let p={slug:"posts",admin:{defaultColumns:["featuredImage","title","date","updatedAt","_status"]},versions:{drafts:!0},access:{read:({req:{user:e}})=>"staging"===process.env.TARGET||!!e||{and:[{_status:{equals:"published"}},{date:{less_than_equal:new Date().toISOString()}}]}},fields:[{name:"title",type:"text",required:!0,localized:!0},{name:"slug",type:"text",required:!0,localized:!0,admin:{position:"sidebar",description:"Unique slug per locale (e.g. same slug can exist in DE and EN)."},hooks:{beforeValidate:[({value:e,data:t})=>e||!t?.title?e:t.title.toLowerCase().replace(/ /g,"-").replace(/[^\w-]+/g,"")]}},{name:"excerpt",type:"text",localized:!0,admin:{description:"A short summary for blog feed cards and SEO."}},{name:"date",type:"date",required:!0,admin:{position:"sidebar",description:"Future dates will schedule the post to publish automatically."},defaultValue:()=>new Date().toISOString()},{name:"featuredImage",type:"upload",relationTo:"media",admin:{position:"sidebar",description:"The primary Hero image used for headers and OpenGraph previews."}},{name:"category",type:"text",localized:!0,admin:{position:"sidebar",description:'Used for tag bucketing (e.g. "Kabel Technologie").'}},{name:"content",type:"richText",localized:!0,editor:(0,t.lexicalEditor)({features:({defaultFeatures:e})=>[...e,(0,i.BlocksFeature)({blocks:[r.StickyNarrative,n.ComparisonGrid,s.VisualLinkPreview,a.TechnicalGrid,o.HighlightBox,l.AnimatedImage,c.ChatBubble,d.PowerCTA,u.Callout,h.Stats,A.SplitHeading]})]})}]};e.s(["Posts",0,p])},833222,e=>{"use strict";let t={slug:"form-submissions",admin:{useAsTitle:"name",defaultColumns:["name","email","type","createdAt"],description:"Captured leads from Contact and Product Quote forms."},access:{read:({req:{user:e}})=>!!e,update:({req:{user:e}})=>!!e,delete:({req:{user:e}})=>!!e,create:()=>!1},fields:[{name:"name",type:"text",required:!0,admin:{readOnly:!0}},{name:"email",type:"email",required:!0,admin:{readOnly:!0}},{name:"type",type:"select",options:[{label:"General Contact",value:"contact"},{label:"Product Quote",value:"product_quote"},{label:"Brochure Download",value:"brochure_download"}],required:!0,admin:{position:"sidebar",readOnly:!0}},{name:"productName",type:"text",admin:{position:"sidebar",readOnly:!0,condition:e=>"product_quote"===e.type,description:"The specific KLZ product the user requested a quote for."}},{name:"message",type:"textarea",required:!0,admin:{readOnly:!0}}]};e.s(["FormSubmissions",0,t])},353712,e=>e.a(async(t,i)=>{try{e.s(["Pages",()=>o]);var r=e.i(560765),n=e.i(719925),s=e.i(865054),a=t([s]);[s]=a.then?(await a)():a;let o={slug:"pages",admin:{useAsTitle:"title",defaultColumns:["title","slug","layout","_status","updatedAt"]},versions:{drafts:!0},access:{read:({req:{user:e}})=>"staging"===process.env.TARGET||!!e||{_status:{equals:"published"}}},fields:[{name:"title",type:"text",required:!0,localized:!0},{name:"slug",type:"text",required:!0,localized:!0,admin:{position:"sidebar",description:'The URL slug for this locale (e.g. "impressum" for DE, "imprint" for EN).'}},{name:"layout",type:"select",defaultValue:"default",options:[{label:"Default (Article)",value:"default"},{label:"Full Bleed (Blocks Only)",value:"fullBleed"}],admin:{position:"sidebar",description:"Full Bleed pages render blocks edge-to-edge without a generic hero wrapper."}},{name:"excerpt",type:"textarea",localized:!0,admin:{position:"sidebar"}},{name:"featuredImage",type:"upload",relationTo:"media",admin:{position:"sidebar"}},{name:"content",type:"richText",localized:!0,editor:(0,r.lexicalEditor)({features:({defaultFeatures:e})=>[...e,(0,n.BlocksFeature)({blocks:s.payloadBlocks})]}),required:!0}]};i()}catch(e){i(e)}},!1),528895,718184,e=>{"use strict";let t=({req:{user:e}})=>!!e;e.s(["authenticated",0,t],528895);let i=()=>!0;e.s(["anyone",0,i],718184)},679287,e=>{"use strict";var t=e.i(528895);let i={slug:"competences",admin:{useAsTitle:"title",defaultColumns:["title","slug","updatedAt"]},access:{read:e.i(718184).anyone,create:t.authenticated,update:t.authenticated,delete:t.authenticated},fields:[{name:"title",type:"text",required:!0},{name:"slug",type:"text",required:!0,admin:{position:"sidebar"}},{name:"excerpt",type:"textarea",required:!0},{name:"description",type:"richText"},{name:"icon",type:"upload",relationTo:"media"}]};e.s(["Competences",0,i])},164556,e=>{"use strict";var t=e.i(528895);let i={slug:"references",admin:{useAsTitle:"title",defaultColumns:["title","category","updatedAt"]},access:{read:e.i(718184).anyone,create:t.authenticated,update:t.authenticated,delete:t.authenticated},fields:[{name:"title",type:"text",required:!0},{name:"slug",type:"text",required:!0,admin:{position:"sidebar"}},{name:"category",type:"select",options:[{label:"Kabelbau",value:"kabelbau"},{label:"Bohrtechnik",value:"bohrtechnik"},{label:"Vermessung",value:"vermessung"},{label:"Planung",value:"planung"}],required:!0},{name:"description",type:"richText"},{name:"image",type:"upload",relationTo:"media"}]};e.s(["References",0,i])},810801,e=>{"use strict";var t=e.i(528895);let i={slug:"team",admin:{useAsTitle:"name",defaultColumns:["name","position","email"]},access:{read:e.i(718184).anyone,create:t.authenticated,update:t.authenticated,delete:t.authenticated},fields:[{name:"name",type:"text",required:!0},{name:"position",type:"text",required:!0},{name:"email",type:"email"},{name:"phone",type:"text"},{name:"image",type:"upload",relationTo:"media"},{name:"branch",type:"select",options:[{label:"E-TIB GmbH",value:"e-tib"},{label:"Ingenieurgesellschaft",value:"ing"},{label:"Bohrtechnik",value:"bohr"},{label:"Verwaltung",value:"verw"}],required:!0}]};e.s(["Team",0,i])},56976,e=>{"use strict";var t=e.i(528895);let i={slug:"jobs",admin:{useAsTitle:"title",defaultColumns:["title","department","type"]},access:{read:e.i(718184).anyone,create:t.authenticated,update:t.authenticated,delete:t.authenticated},fields:[{name:"title",type:"text",required:!0},{name:"slug",type:"text",required:!0,admin:{position:"sidebar"}},{name:"department",type:"text",required:!0},{name:"location",type:"text",defaultValue:"Guben / Bülstedt"},{name:"type",type:"select",options:[{label:"Vollzeit",value:"vollzeit"},{label:"Teilzeit",value:"teilzeit"},{label:"Ausbildung",value:"ausbildung"},{label:"Praktikum",value:"praktikum"}],required:!0,defaultValue:"vollzeit"},{name:"description",type:"richText",required:!0}]};e.s(["Jobs",0,i])},533259,e=>{"use strict";var t=e.i(528895);let i={slug:"settings",access:{read:e.i(718184).anyone,update:t.authenticated},fields:[{type:"tabs",tabs:[{label:"Company Information",fields:[{name:"contactEmail",type:"email",required:!0,defaultValue:"info@e-tib.com"},{name:"contactPhone",type:"text",defaultValue:"+49 15207230518"},{name:"address",type:"textarea",defaultValue:"Gewerbestraße 22\\n03172 Guben"}]},{label:"Navigation",fields:[{name:"mainNav",type:"array",fields:[{name:"label",type:"text",required:!0},{name:"url",type:"text",required:!0}]}]}]}]};e.s(["Settings",0,i])},621990,e=>e.a(async(t,i)=>{try{e.s(["default",()=>Q]);var r=e.i(678721),n=e.i(143613),s=e.i(560765),a=e.i(182221),o=e.i(814747),l=e.i(792509),c=e.i(211395),d=e.i(719925),u=e.i(865054),h=e.i(739976),A=e.i(638954),p=e.i(694582),f=e.i(833222),g=e.i(353712),m=e.i(679287),y=e.i(164556),b=e.i(810801),E=e.i(56976),C=e.i(533259),w=t([n,u,g]);[n,u,g]=w.then?(await w)():w;let I={get url(){return`file://${e.P("payload.config.ts")}`}};a.default.cache(!1);let v=(0,l.fileURLToPath)(I.url),B=o.default.dirname(v),Q=(0,r.buildConfig)({onInit:async e=>{},admin:{user:h.Users.slug,importMap:{baseDir:o.default.resolve(B)},components:{graphics:{Logo:"/src/payload/components/Logo",Icon:"/src/payload/components/Icon"}},meta:{titleSuffix:" – E-TIB",icons:[{rel:"icon",type:"image/x-icon",url:"/favicon.ico"}]}},localization:{locales:[{label:"Deutsch",code:"de"},{label:"English",code:"en"}],defaultLocale:"de",fallback:!0},collections:[h.Users,A.Media,p.Posts,f.FormSubmissions,g.Pages,m.Competences,y.References,b.Team,E.Jobs],globals:[C.Settings],editor:(0,s.lexicalEditor)({features:({defaultFeatures:e})=>[...e,(0,d.BlocksFeature)({blocks:u.payloadBlocks})]}),secret:process.env.PAYLOAD_SECRET||"etib-restoration-secret",typescript:{outputFile:o.default.resolve(B,"payload-types.ts")},db:(0,n.postgresAdapter)({migrationDir:null,pool:{connectionString:process.env.DATABASE_URI||process.env.POSTGRES_URI||`postgresql://${process.env.PAYLOAD_DB_USER||"payload"}:${process.env.PAYLOAD_DB_PASSWORD||"120in09oenaoinsd9iaidon"}@127.0.0.1:54322/${process.env.PAYLOAD_DB_NAME||"payload"}`},push:!1}),email:process.env.MAIL_HOST?(0,c.nodemailerAdapter)({defaultFromAddress:process.env.MAIL_FROM?.replace(/.*<|>.*/g,"")||"postmaster@mg.mintel.me",defaultFromName:process.env.MAIL_FROM?.split("<")[0]?.trim()||"E-TIB",transportOptions:{host:process.env.MAIL_HOST||"smtp.eu.mailgun.org",port:Number(process.env.MAIL_PORT)||587,...process.env.MAIL_USERNAME?{auth:{user:process.env.MAIL_USERNAME,pass:process.env.MAIL_PASSWORD}}:{}}}):void 0,sharp:a.default});i()}catch(e){i(e)}},!1)];
|
||
|
||
//# debugId=d3fdb713-ca50-5974-073b-c13bf434b585
|
||
//# sourceMappingURL=_5fe4e9d6._.js.map |