@snippyly/plugin-staging 1.0.872 → 1.0.873

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/snippyly.js +398 -360
  3. package/snippyly.min.js +398 -360
package/snippyly.js CHANGED
@@ -68,7 +68,7 @@ const at=1,lt=2,ct=t=>(...e)=>({_$litDirective$:t,values:e});class dt{constructo
68
68
  * @license
69
69
  * Copyright 2017 Google LLC
70
70
  * SPDX-License-Identifier: BSD-3-Clause
71
- */class ut extends dt{constructor(t){if(super(t),this.it=P,t.type!==lt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===P||null==t)return this.ft=void 0,this.it=t;if(t===D)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ut.directiveName="unsafeHTML",ut.resultType=1;const pt=ct(ut);class vt{}vt.Events={GUEST_MODE_SIGN_IN_DIALOG_SHOWN:"guestModeSignInDialogShown",GUEST_MODE_NAME_DIALOG_SHOWN:"guestModeNameDialogShown",GUEST_MODE_SIGN_IN_BANNER_SHOWN:"guestModeSignInBannerShown",GUEST_MODE_SIGN_IN_BUTTON_CLICKED:"guestModeSignInButtonClicked",PASSWORD_PROTECTED_MODAL_CLOSE_BUTTON_CLICKED:"passwordProtectedModalCloseButtonClicked",PASSWORD_PROTECTED_MODAL_OPEN_BUTTON_CLICKED:"passwordProtectedModalOpenButtonClicked",TOOLBAR_EXPANDED:"toolbarExpanded",TOOLBAR_COLLAPSED:"toolbarCollapsed",TOOLBAR_NOTIFICATION_CLICKED:"toolbarNotificationClicked",GUEST_MODE_SKIP_BUTTON_CLICKED:"guestModeSkipButtonClicked",GUEST_MODE_SIGN_IN_NUDGE_SHOWN:"guestModeSignInNudgeShown",GUEST_MODE_NAME_NUDGE_SHOWN:"guestModeNameNudgeShown",GUEST_MODE_SIGN_IN_CLICKED:"guestModeSignInClicked",GUEST_MODE_PRESENT:"guestModePresent",GUEST_MODE_NAME_ADDED:"guestModeNameAdded",REVIEW_PASSWORD_ADDED:"reviewPasswordAdded",REVIEW_PASSWORD_REJECTED:"reviewPasswordRejected",REVIEW_PASSWORD_ACCEPTED:"reviewPasswordAccepted",PRIVATE_MODE_ENABLED:"privateModeEnabled",PRIVATE_MODE_DISABLED:"privateModeDisabled",VISIBILITY_OPTIONS_ENABLED:"visibilityOptionsEnabled",VISIBILITY_OPTIONS_DISABLED:"visibilityOptionsDisabled",VIEW_PROJECT_CLICKED:"viewProjectClicked",OPEN_MOBILE_CLICKED:"openMobileClicked",EXIT_REVIEW_MODE_CLICKED:"exitReviewModeClicked",SIGNOUT_CLICKED:"signoutClicked",SIGNIN_CLICKED:"signinClicked",SIGN_IN_REQUIRED:"signInRequired",USER_EMAIL_NOT_WHITELISTED:"userEmailNotWhitelisted",DOMAIN_NOT_WHITELISTED:"domainNotWhitelisted",DUPLICATE_SCRIPT_INSTALLED:"duplicateScriptInstalled",TOOLBAR_DISABLED:"toolbarDisabled",INVITE_MODAL_OPENED:"inviteModalOpened",INVITE_SENT:"inviteSent",QUALITY_CHECK_RUN_TOOLBAR_CLICKED:"qualityCheckRunFromToolbarClicked"};const ft="1.0.731",gt="5.0.4",mt="6.0.0-beta.14",wt=["v3ogId1G43AFHehEOewv","rNYzMJd13L27xtfipmSK","aU1MxKP0rca2UXwKi8bl"],yt="sfSidebarV2Enabled",bt="sfUseProxy",Ct=["v3ogId1G43AFHehEOewv"],xt=[],Et="review",kt="feedback",St="sembed",Mt="scommentmode",Tt="sreadonly",_t="sagentcomments",It="spath",At=[{hostSuffix:"cloudfunctions.net",pathPrefix:"/previewproxy"},{hostSuffix:"api.velt.dev",pathPrefix:"/previewproxy"}],Nt="sreviewId",Ot="scommentId",$t="snippyly-user",Lt="st",Dt="_sfut",Pt="_sfgut",Vt="projectVersionKey",Ft="projectVersion",jt="sversion",Rt="sprojectInstall",Ut="sflivedemo",zt="sffigmademo",Bt="sfTourCommentTooltip",Ht="sfUserAdmin",Wt="sfGuestMode",Gt="sfPasswordProtected",Kt="sfQueryParamsComments",Zt="sfUsePageTitleAsLocationName",Jt="sfPasswordIsValid",Yt="sfPrivateMode",qt="organizationPrivate",Qt="sfGuestModeAllowSignIn",Xt="sfGuestUserModelOpened",te="sfGuestUserNameUpdated",ee="sfGuestUserBannerOpened",ie="sfCustomerMetadata",oe="sfContentWarningSidebarOpen",ne="sfNativeScreenshotPermission",se="sfSamlConfig",re="superflow-file-viewer-staging.web.app",ae="superflow-portal-v2-staging.firebaseapp.com/drive",le="app.usesuperflow.com/drive",ce="drive.usesuperflow.com",de=["app.usesuperflow.com","superflow-portal-v2-staging.firebaseapp.com"],he="terminal",ue="suggestion",pe={AGENT:"agent:",AGENT_TYPE_CUSTOM:"agentType:custom"},ve={SPELL_CHECK:"spell-check",BROKEN_LINKS:"broken-links",GRAMMAR_CHECK:"grammar-check"},fe={VELT_ROOT:"velt-root",VELT_PRESENCE:"velt-presence",VELT_CURSOR:"velt-cursor",VELT_COMMENT_TOOL:"velt-comment-tool",VELT_COMMENTS:"velt-comments",SNIPPYLY_TEXT_HIGHLIGHT:"snippyly-text-highlight",VELT_COMMENTS_SIDEBAR_LEGACY:"velt-comments-sidebar",VELT_COMMENTS_SIDEBAR_V2:"velt-comments-sidebar-v2",VELT_HUDDLE:"velt-huddle",VELT_RECORDER_NOTES:"velt-recorder-notes",VELT_RECORDER_CONTROL_PANEL:"velt-recorder-control-panel",VELT_ARROWS:"velt-arrows",VELT_NOTIFICATIONS_HISTORY_PANEL:"velt-notifications-history-panel"},ge={ENABLE_URL_NAVIGATION:"enable-url-navigation",URL_NAVIGATION:"url-navigation",CURRENT_LOCATION_SUFFIX:"current-location-suffix",SIDEBAR_BUTTON_COUNT_TYPE:"sidebar-button-count-type",CUSTOM_ACTIONS:"custom-actions"},me="filter",we={customBranding:{logo:{logoMark:{lightUrl:'\n\t\t\t\t<svg viewBox="0 0 49 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 8C8 3.58172 11.5817 0 16 0V0C20.4183 0 24 3.58172 24 8V16H16C11.5817 16 8 12.4183 8 8V8Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 29C0 22.3726 5.37258 17 12 17H24V29C24 35.6274 18.6274 41 12 41V41C5.37258 41 0 35.6274 0 29V29Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 19C25 12.3726 30.3726 7 37 7V7C43.6274 7 49 12.3726 49 19V19C49 25.6274 43.6274 31 37 31H25V19Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 32H33C37.4183 32 41 35.5817 41 40V40C41 44.4183 37.4183 48 33 48V48C28.5817 48 25 44.4183 25 40V32Z" fill="#0DCF82"/>\n\t\t\t\t</svg>\n\t\t\t\t',darkUrl:'\n\t\t\t\t<svg viewBox="0 0 49 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 8C8 3.58172 11.5817 0 16 0V0C20.4183 0 24 3.58172 24 8V16H16C11.5817 16 8 12.4183 8 8V8Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 29C0 22.3726 5.37258 17 12 17H24V29C24 35.6274 18.6274 41 12 41V41C5.37258 41 0 35.6274 0 29V29Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 19C25 12.3726 30.3726 7 37 7V7C43.6274 7 49 12.3726 49 19V19C49 25.6274 43.6274 31 37 31H25V19Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 32H33C37.4183 32 41 35.5817 41 40V40C41 44.4183 37.4183 48 33 48V48C28.5817 48 25 44.4183 25 40V32Z" fill="#0DCF82"/>\n\t\t\t\t</svg>\n\t\t\t\t'},wordMark:{lightUrl:'\n\t\t\t\t<svg width="257" height="65" viewBox="0 0 257 65" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 16C8 11.5817 11.5817 8 16 8V8C20.4183 8 24 11.5817 24 16V24H16C11.5817 24 8 20.4183 8 16V16Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 37C0 30.3726 5.37258 25 12 25H24V37C24 43.6274 18.6274 49 12 49V49C5.37258 49 0 43.6274 0 37V37Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 27C25 20.3726 30.3726 15 37 15V15C43.6274 15 49 20.3726 49 27V27C49 33.6274 43.6274 39 37 39H25V27Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 40H33C37.4183 40 41 43.5817 41 48V48C41 52.4183 37.4183 56 33 56V56C28.5817 56 25 52.4183 25 48V40Z" fill="#0DCF82"/>\n\t\t\t\t\t<path d="M73.4 46.28C71.4533 46.28 69.6933 45.9467 68.12 45.28C66.5733 44.6133 65.3467 43.6533 64.44 42.4C63.5333 41.1467 63.0667 39.6667 63.04 37.96H69.04C69.12 39.1067 69.52 40.0133 70.24 40.68C70.9867 41.3467 72 41.68 73.28 41.68C74.5867 41.68 75.6133 41.3733 76.36 40.76C77.1067 40.12 77.48 39.2933 77.48 38.28C77.48 37.4533 77.2267 36.7733 76.72 36.24C76.2133 35.7067 75.5733 35.2933 74.8 35C74.0533 34.68 73.0133 34.3333 71.68 33.96C69.8667 33.4267 68.3867 32.9067 67.24 32.4C66.12 31.8667 65.1467 31.08 64.32 30.04C63.52 28.9733 63.12 27.56 63.12 25.8C63.12 24.1467 63.5333 22.7067 64.36 21.48C65.1867 20.2533 66.3467 19.32 67.84 18.68C69.3333 18.0133 71.04 17.68 72.96 17.68C75.84 17.68 78.1733 18.3867 79.96 19.8C81.7733 21.1867 82.7733 23.1333 82.96 25.64H76.8C76.7467 24.68 76.3333 23.8933 75.56 23.28C74.8133 22.64 73.8133 22.32 72.56 22.32C71.4667 22.32 70.5867 22.6 69.92 23.16C69.28 23.72 68.96 24.5333 68.96 25.6C68.96 26.3467 69.2 26.9733 69.68 27.48C70.1867 27.96 70.8 28.36 71.52 28.68C72.2667 28.9733 73.3067 29.32 74.64 29.72C76.4533 30.2533 77.9333 30.7867 79.08 31.32C80.2267 31.8533 81.2133 32.6533 82.04 33.72C82.8667 34.7867 83.28 36.1867 83.28 37.92C83.28 39.4133 82.8933 40.8 82.12 42.08C81.3467 43.36 80.2133 44.3867 78.72 45.16C77.2267 45.9067 75.4533 46.28 73.4 46.28ZM107.855 23.84V46H102.215V43.2C101.495 44.16 100.548 44.92 99.375 45.48C98.2283 46.0133 96.975 46.28 95.615 46.28C93.8817 46.28 92.3483 45.92 91.015 45.2C89.6817 44.4533 88.6283 43.3733 87.855 41.96C87.1083 40.52 86.735 38.8133 86.735 36.84V23.84H92.335V36.04C92.335 37.8 92.775 39.16 93.655 40.12C94.535 41.0533 95.735 41.52 97.255 41.52C98.8017 41.52 100.015 41.0533 100.895 40.12C101.775 39.16 102.215 37.8 102.215 36.04V23.84H107.855ZM116.98 27.04C117.7 26.0267 118.687 25.1867 119.94 24.52C121.22 23.8267 122.674 23.48 124.3 23.48C126.194 23.48 127.9 23.9467 129.42 24.88C130.967 25.8133 132.18 27.1467 133.06 28.88C133.967 30.5867 134.42 32.5733 134.42 34.84C134.42 37.1067 133.967 39.12 133.06 40.88C132.18 42.6133 130.967 43.96 129.42 44.92C127.9 45.88 126.194 46.36 124.3 46.36C122.674 46.36 121.234 46.0267 119.98 45.36C118.754 44.6933 117.754 43.8533 116.98 42.84V56.56H111.38V23.84H116.98V27.04ZM128.7 34.84C128.7 33.5067 128.42 32.36 127.86 31.4C127.327 30.4133 126.607 29.6667 125.7 29.16C124.82 28.6533 123.86 28.4 122.82 28.4C121.807 28.4 120.847 28.6667 119.94 29.2C119.06 29.7067 118.34 30.4533 117.78 31.44C117.247 32.4267 116.98 33.5867 116.98 34.92C116.98 36.2533 117.247 37.4133 117.78 38.4C118.34 39.3867 119.06 40.1467 119.94 40.68C120.847 41.1867 121.807 41.44 122.82 41.44C123.86 41.44 124.82 41.1733 125.7 40.64C126.607 40.1067 127.327 39.3467 127.86 38.36C128.42 37.3733 128.7 36.2 128.7 34.84ZM158.29 34.44C158.29 35.24 158.236 35.96 158.13 36.6H141.93C142.063 38.2 142.623 39.4533 143.61 40.36C144.596 41.2667 145.81 41.72 147.25 41.72C149.33 41.72 150.81 40.8267 151.69 39.04H157.73C157.09 41.1733 155.863 42.9333 154.05 44.32C152.236 45.68 150.01 46.36 147.37 46.36C145.236 46.36 143.316 45.8933 141.61 44.96C139.93 44 138.61 42.6533 137.65 40.92C136.716 39.1867 136.25 37.1867 136.25 34.92C136.25 32.6267 136.716 30.6133 137.65 28.88C138.583 27.1467 139.89 25.8133 141.57 24.88C143.25 23.9467 145.183 23.48 147.37 23.48C149.476 23.48 151.356 23.9333 153.01 24.84C154.69 25.7467 155.983 27.04 156.89 28.72C157.823 30.3733 158.29 32.28 158.29 34.44ZM152.49 32.84C152.463 31.4 151.943 30.2533 150.93 29.4C149.916 28.52 148.676 28.08 147.21 28.08C145.823 28.08 144.65 28.5067 143.69 29.36C142.756 30.1867 142.183 31.3467 141.97 32.84H152.49ZM167.177 27.28C167.897 26.1067 168.831 25.1867 169.977 24.52C171.151 23.8533 172.484 23.52 173.977 23.52V29.4H172.497C170.737 29.4 169.404 29.8133 168.497 30.64C167.617 31.4667 167.177 32.9067 167.177 34.96V46H161.577V23.84H167.177V27.28ZM188.309 28.44H184.429V46H178.749V28.44H176.229V23.84H178.749V22.72C178.749 20 179.522 18 181.069 16.72C182.616 15.44 184.949 14.84 188.069 14.92V19.64C186.709 19.6133 185.762 19.84 185.229 20.32C184.696 20.8 184.429 21.6667 184.429 22.92V23.84H188.309V28.44ZM197.538 16.4V46H191.938V16.4H197.538ZM211.711 46.36C209.578 46.36 207.658 45.8933 205.951 44.96C204.244 44 202.898 42.6533 201.911 40.92C200.951 39.1867 200.471 37.1867 200.471 34.92C200.471 32.6533 200.964 30.6533 201.951 28.92C202.964 27.1867 204.338 25.8533 206.071 24.92C207.804 23.96 209.738 23.48 211.871 23.48C214.004 23.48 215.938 23.96 217.671 24.92C219.404 25.8533 220.764 27.1867 221.751 28.92C222.764 30.6533 223.271 32.6533 223.271 34.92C223.271 37.1867 222.751 39.1867 221.711 40.92C220.698 42.6533 219.311 44 217.551 44.96C215.818 45.8933 213.871 46.36 211.711 46.36ZM211.711 41.48C212.724 41.48 213.671 41.24 214.551 40.76C215.458 40.2533 216.178 39.5067 216.711 38.52C217.244 37.5333 217.511 36.3333 217.511 34.92C217.511 32.8133 216.951 31.2 215.831 30.08C214.738 28.9333 213.391 28.36 211.791 28.36C210.191 28.36 208.844 28.9333 207.751 30.08C206.684 31.2 206.151 32.8133 206.151 34.92C206.151 37.0267 206.671 38.6533 207.711 39.8C208.778 40.92 210.111 41.48 211.711 41.48ZM256.499 23.84L250.019 46H243.979L239.939 30.52L235.899 46H229.819L223.299 23.84H228.979L232.899 40.72L237.139 23.84H243.059L247.219 40.68L251.139 23.84H256.499Z" fill="#141416"/>\n\t\t\t\t</svg>\n\t\t\t\t',darkUrl:'\n\t\t\t\t<svg width="257" height="65" viewBox="0 0 257 65" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 16C8 11.5817 11.5817 8 16 8V8C20.4183 8 24 11.5817 24 16V24H16C11.5817 24 8 20.4183 8 16V16Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 37C0 30.3726 5.37258 25 12 25H24V37C24 43.6274 18.6274 49 12 49V49C5.37258 49 0 43.6274 0 37V37Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 27C25 20.3726 30.3726 15 37 15V15C43.6274 15 49 20.3726 49 27V27C49 33.6274 43.6274 39 37 39H25V27Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 40H33C37.4183 40 41 43.5817 41 48V48C41 52.4183 37.4183 56 33 56V56C28.5817 56 25 52.4183 25 48V40Z" fill="#0DCF82"/>\n\t\t\t\t\t<path d="M73.4 46.28C71.4533 46.28 69.6933 45.9467 68.12 45.28C66.5733 44.6133 65.3467 43.6533 64.44 42.4C63.5333 41.1467 63.0667 39.6667 63.04 37.96H69.04C69.12 39.1067 69.52 40.0133 70.24 40.68C70.9867 41.3467 72 41.68 73.28 41.68C74.5867 41.68 75.6133 41.3733 76.36 40.76C77.1067 40.12 77.48 39.2933 77.48 38.28C77.48 37.4533 77.2267 36.7733 76.72 36.24C76.2133 35.7067 75.5733 35.2933 74.8 35C74.0533 34.68 73.0133 34.3333 71.68 33.96C69.8667 33.4267 68.3867 32.9067 67.24 32.4C66.12 31.8667 65.1467 31.08 64.32 30.04C63.52 28.9733 63.12 27.56 63.12 25.8C63.12 24.1467 63.5333 22.7067 64.36 21.48C65.1867 20.2533 66.3467 19.32 67.84 18.68C69.3333 18.0133 71.04 17.68 72.96 17.68C75.84 17.68 78.1733 18.3867 79.96 19.8C81.7733 21.1867 82.7733 23.1333 82.96 25.64H76.8C76.7467 24.68 76.3333 23.8933 75.56 23.28C74.8133 22.64 73.8133 22.32 72.56 22.32C71.4667 22.32 70.5867 22.6 69.92 23.16C69.28 23.72 68.96 24.5333 68.96 25.6C68.96 26.3467 69.2 26.9733 69.68 27.48C70.1867 27.96 70.8 28.36 71.52 28.68C72.2667 28.9733 73.3067 29.32 74.64 29.72C76.4533 30.2533 77.9333 30.7867 79.08 31.32C80.2267 31.8533 81.2133 32.6533 82.04 33.72C82.8667 34.7867 83.28 36.1867 83.28 37.92C83.28 39.4133 82.8933 40.8 82.12 42.08C81.3467 43.36 80.2133 44.3867 78.72 45.16C77.2267 45.9067 75.4533 46.28 73.4 46.28ZM107.855 23.84V46H102.215V43.2C101.495 44.16 100.548 44.92 99.375 45.48C98.2283 46.0133 96.975 46.28 95.615 46.28C93.8817 46.28 92.3483 45.92 91.015 45.2C89.6817 44.4533 88.6283 43.3733 87.855 41.96C87.1083 40.52 86.735 38.8133 86.735 36.84V23.84H92.335V36.04C92.335 37.8 92.775 39.16 93.655 40.12C94.535 41.0533 95.735 41.52 97.255 41.52C98.8017 41.52 100.015 41.0533 100.895 40.12C101.775 39.16 102.215 37.8 102.215 36.04V23.84H107.855ZM116.98 27.04C117.7 26.0267 118.687 25.1867 119.94 24.52C121.22 23.8267 122.674 23.48 124.3 23.48C126.194 23.48 127.9 23.9467 129.42 24.88C130.967 25.8133 132.18 27.1467 133.06 28.88C133.967 30.5867 134.42 32.5733 134.42 34.84C134.42 37.1067 133.967 39.12 133.06 40.88C132.18 42.6133 130.967 43.96 129.42 44.92C127.9 45.88 126.194 46.36 124.3 46.36C122.674 46.36 121.234 46.0267 119.98 45.36C118.754 44.6933 117.754 43.8533 116.98 42.84V56.56H111.38V23.84H116.98V27.04ZM128.7 34.84C128.7 33.5067 128.42 32.36 127.86 31.4C127.327 30.4133 126.607 29.6667 125.7 29.16C124.82 28.6533 123.86 28.4 122.82 28.4C121.807 28.4 120.847 28.6667 119.94 29.2C119.06 29.7067 118.34 30.4533 117.78 31.44C117.247 32.4267 116.98 33.5867 116.98 34.92C116.98 36.2533 117.247 37.4133 117.78 38.4C118.34 39.3867 119.06 40.1467 119.94 40.68C120.847 41.1867 121.807 41.44 122.82 41.44C123.86 41.44 124.82 41.1733 125.7 40.64C126.607 40.1067 127.327 39.3467 127.86 38.36C128.42 37.3733 128.7 36.2 128.7 34.84ZM158.29 34.44C158.29 35.24 158.236 35.96 158.13 36.6H141.93C142.063 38.2 142.623 39.4533 143.61 40.36C144.596 41.2667 145.81 41.72 147.25 41.72C149.33 41.72 150.81 40.8267 151.69 39.04H157.73C157.09 41.1733 155.863 42.9333 154.05 44.32C152.236 45.68 150.01 46.36 147.37 46.36C145.236 46.36 143.316 45.8933 141.61 44.96C139.93 44 138.61 42.6533 137.65 40.92C136.716 39.1867 136.25 37.1867 136.25 34.92C136.25 32.6267 136.716 30.6133 137.65 28.88C138.583 27.1467 139.89 25.8133 141.57 24.88C143.25 23.9467 145.183 23.48 147.37 23.48C149.476 23.48 151.356 23.9333 153.01 24.84C154.69 25.7467 155.983 27.04 156.89 28.72C157.823 30.3733 158.29 32.28 158.29 34.44ZM152.49 32.84C152.463 31.4 151.943 30.2533 150.93 29.4C149.916 28.52 148.676 28.08 147.21 28.08C145.823 28.08 144.65 28.5067 143.69 29.36C142.756 30.1867 142.183 31.3467 141.97 32.84H152.49ZM167.177 27.28C167.897 26.1067 168.831 25.1867 169.977 24.52C171.151 23.8533 172.484 23.52 173.977 23.52V29.4H172.497C170.737 29.4 169.404 29.8133 168.497 30.64C167.617 31.4667 167.177 32.9067 167.177 34.96V46H161.577V23.84H167.177V27.28ZM188.309 28.44H184.429V46H178.749V28.44H176.229V23.84H178.749V22.72C178.749 20 179.522 18 181.069 16.72C182.616 15.44 184.949 14.84 188.069 14.92V19.64C186.709 19.6133 185.762 19.84 185.229 20.32C184.696 20.8 184.429 21.6667 184.429 22.92V23.84H188.309V28.44ZM197.538 16.4V46H191.938V16.4H197.538ZM211.711 46.36C209.578 46.36 207.658 45.8933 205.951 44.96C204.244 44 202.898 42.6533 201.911 40.92C200.951 39.1867 200.471 37.1867 200.471 34.92C200.471 32.6533 200.964 30.6533 201.951 28.92C202.964 27.1867 204.338 25.8533 206.071 24.92C207.804 23.96 209.738 23.48 211.871 23.48C214.004 23.48 215.938 23.96 217.671 24.92C219.404 25.8533 220.764 27.1867 221.751 28.92C222.764 30.6533 223.271 32.6533 223.271 34.92C223.271 37.1867 222.751 39.1867 221.711 40.92C220.698 42.6533 219.311 44 217.551 44.96C215.818 45.8933 213.871 46.36 211.711 46.36ZM211.711 41.48C212.724 41.48 213.671 41.24 214.551 40.76C215.458 40.2533 216.178 39.5067 216.711 38.52C217.244 37.5333 217.511 36.3333 217.511 34.92C217.511 32.8133 216.951 31.2 215.831 30.08C214.738 28.9333 213.391 28.36 211.791 28.36C210.191 28.36 208.844 28.9333 207.751 30.08C206.684 31.2 206.151 32.8133 206.151 34.92C206.151 37.0267 206.671 38.6533 207.711 39.8C208.778 40.92 210.111 41.48 211.711 41.48ZM256.499 23.84L250.019 46H243.979L239.939 30.52L235.899 46H229.819L223.299 23.84H228.979L232.899 40.72L237.139 23.84H243.059L247.219 40.68L251.139 23.84H256.499Z" fill="white"/>\n\t\t\t\t</svg>\n\t\t\t\t'}}}},ye=[{name:"Peppa Pig",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fpeppa_pig.svg?alt=media&token=a9fc83f7-b347-4868-8d52-0e888f0de73a&_gl=1*jzxghx*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTQ5LjQyLjAuMA.."},{name:"Dazzling Dalmatian",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fdazzling_dalmatian.svg?alt=media&token=5842b24c-7e58-4bb5-96c2-d09aa11f7f9e&_gl=1*11ayw3z*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxOTY4LjExLjAuMA.."},{name:"Rosy Rabbit",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Frosy_rabbit.svg?alt=media&token=4e65a9e3-080d-4416-839d-e761b6b37181&_gl=1*156om5t*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjUzLjYwLjAuMA.."},{name:"Leo the Lion",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fleo_the_lion.svg?alt=media&token=58d1296e-fefd-42ce-80ea-ae2cc830f1a9&_gl=1*1cz8e9q*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTAwLjIwLjAuMA.."},{name:"Ducky Down",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fducky_down.svg?alt=media&token=d67ae889-78c5-46e3-aaa9-3eb511fe90b3&_gl=1*cxyj7o*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxOTkwLjYwLjAuMA.."},{name:"Merry Monkey",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fmerry_monkey.svg?alt=media&token=5bd2f69a-7211-42df-9718-5339c467b2d1&_gl=1*1labjed*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTE3LjMuMC4w"},{name:"Ecstatic Elephant",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fecstatic_elephant.svg?alt=media&token=fbd2ba76-6c3a-47a7-beac-0460a2178b7d&_gl=1*aku3ps*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDA3LjQzLjAuMA.."},{name:"Baby Bear",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fbaby_bear.svg?alt=media&token=71d0c5fb-60aa-4304-adc1-635a83650bde&_gl=1*1dxajmf*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxMjQyLjUyLjAuMA.."},{name:"Freddy Froglet",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Ffreddy_froglet.svg?alt=media&token=e3b2e292-6480-4507-9da3-21a62a1346d4&_gl=1*s4yycs*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDQzLjcuMC4w"},{name:"Powerful Panda",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fpowerful_panda.svg?alt=media&token=07f9d60f-aa14-4a77-ad5b-c48ee76db3f5&_gl=1*7gfuit*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTkzLjYwLjAuMA.."},{name:"Curious Cat",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fcurious_cat.svg?alt=media&token=dccf6824-3b7c-4e4e-8559-40fbb8ff6186&_gl=1*1nwi0ti*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxOTM3LjQyLjAuMA.."},{name:"Playful Penguin",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fplayful_penguin.svg?alt=media&token=c6d1b11a-43a6-4001-ae56-e04fd5a3f965&_gl=1*1xdxvkx*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTYzLjI4LjAuMA.."},{name:"Kind Koala",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fkind_koala.svg?alt=media&token=974396d6-6ccd-4367-8563-b27634849cb5&_gl=1*1w1gbnn*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDgwLjQwLjAuMA.."},{name:"Tommy Tiger",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Ftommy_tiger.svg?alt=media&token=40a95ac7-cc91-4b74-859a-4e2e5964b967&_gl=1*1n0cr0n*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjczLjQwLjAuMA.."},{name:"Wally Walrus",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fwally_walrus.svg?alt=media&token=31e02ef2-c986-4724-b987-dca97f84f81b&_gl=1*y5by2c*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjkxLjIyLjAuMA.."},{name:"Ricky Rhino",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fricky_rhino.svg?alt=media&token=5d9dafe5-f4de-4f8b-94c1-49e01c776611&_gl=1*zyp4n2*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjMxLjIyLjAuMA.."},{name:"Oliver Otter",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Foliver_otter.svg?alt=media&token=5298b869-0903-40b2-a702-224a3e0bcd95&_gl=1*aicppz*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTMxLjYwLjAuMA.."},{name:"Reggie Ratling",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Freggie_ratling.svg?alt=media&token=f37fd4a0-9dbd-403a-bb82-81fdfb63cf88&_gl=1*16lzeql*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjA3LjQ2LjAuMA.."},{name:"Gentle Giraffe",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fgentle_giraffe.svg?alt=media&token=f097ec12-e8ce-4d26-bf32-43e470eb7907&_gl=1*11ctuwz*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDYwLjYwLjAuMA.."},{name:"Fabulous Fox",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Ffabulous_fox.svg?alt=media&token=fe1a4236-af45-427f-a035-1eda417b0682&_gl=1*xyyv1g*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDIxLjI5LjAuMA.."}];var be=Object.freeze({__proto__:null,AGENT_COMMENTS_MODE:_t,AGENT_FIELD_PREFIXES:pe,ANNOTATION_STATUS_TERMINAL:he,ANNOTATION_TYPE_SUGGESTION:ue,ATTRIBUTES:ge,AUTO_COMMENT_MODE:Mt,COMMENT_PRIVATE_MODE_TYPE_ORGANIZATION:qt,DEFAULT_CUSTOMER_METADATA:we,DOCUMENT_TITLE_CHANGE_LISTENER_API_KEYS:wt,DRIVE_NEW_PROD_URL:le,DRIVE_NEW_STAGING_URL:ae,DRIVE_PROD_URL:ce,DRIVE_STAGING_URL:re,EMBED_MODE:St,EXCLUDED_API_KEYS_FROM_LATEST_VERSION:["I9R2VqG45F5AgpIicnht"],FEEDBACK_MODE:kt,FIGMA_DEMO_MODAL:zt,GUEST_USERS:ye,LIVE_DEMO_MODAL:Ut,PREVIEW_LOCATION_PATH:It,PREVIEW_PROXY_HOSTS:At,PROJECT_INSTALL:Rt,PROJECT_VERSION:Ft,PROJECT_VERSION_DEFAULT_KEY:jt,PROJECT_VERSION_KEY:Vt,PROXY_DISABLED_DEFAULT_API_KEYS:Ct,READ_ONLY_MODE:Tt,REVIEW_DOC_ID:Nt,REVIEW_MODE:Et,SCREENSHOT_DISABLED_HOSTS:de,SIDEBAR_BUTTON_COUNT_TYPE_FILTER:me,SIDEBAR_V1_DEFAULT_API_KEYS:xt,SNIPPYLY_COMMENT_ID:Ot,SNIPPYLY_TOKEN:Lt,SNIPPYLY_USER:$t,SUPERFLOW_CONTENT_WARNING_SIDEBAR_OPEN:oe,SUPERFLOW_CUSTOMER_METADATA:ie,SUPERFLOW_DOCUMENT_METADATA:"sfDocumentMetadata",SUPERFLOW_GUEST_MODE:Wt,SUPERFLOW_GUEST_MODE_ALLOW_SIGN_IN:Qt,SUPERFLOW_GUEST_USER_BANNER_OPENED:ee,SUPERFLOW_GUEST_USER_MODEL_OPENED:Xt,SUPERFLOW_GUEST_USER_NAME_MODEL_OPENED:"sfGuestUserNameModelOpened",SUPERFLOW_GUEST_USER_NAME_UPDATED:te,SUPERFLOW_GUEST_USER_TOKEN:Pt,SUPERFLOW_NATIVE_SCREENSHOT_PERMISSION:ne,SUPERFLOW_PASSWORD_IS_VALID:Jt,SUPERFLOW_PASSWORD_PROTECTED:Gt,SUPERFLOW_PRIVATE_MODE:Yt,SUPERFLOW_QUERY_PARAMS_COMMENTS:Kt,SUPERFLOW_SAML_CONFIG:se,SUPERFLOW_SIDEBAR_V2_ENABLED:yt,SUPERFLOW_USER_ADMIN:Ht,SUPERFLOW_USER_TOKEN:Dt,SUPERFLOW_USE_PAGE_TITLE_AS_LOCATION_NAME:Zt,SUPERFLOW_VERSION:ft,SYSTEM_AGENT_IDS:ve,TAGS:fe,TOUR_COMMENT_TOOLTIP:Bt,VELT_PROXY_FLAG:bt,VELT_SDK_DEVELOP_VERSION:gt,VELT_SDK_PROD_VERSION:mt,VELT_SDK_STAGING_VERSION:"3.0.92"});const Ce=!0,xe="https://superflow-portal-v2-staging.firebaseapp.com/",Ee="9dbcd2509e0fa90a5c81f038ce618e3f",ke="6d24f74f12f6fb84c87efa8f791cfb2e",Se="https://us-central1-snipply-sdk-staging.cloudfunctions.net/sa",Me="https://us-central1-snipply-sdk-staging.cloudfunctions.net/superflowtoolbarhandler",Te=function(t){const e=[];let i=0;for(let o=0;o<t.length;o++){let n=t.charCodeAt(o);n<128?e[i++]=n:n<2048?(e[i++]=n>>6|192,e[i++]=63&n|128):55296==(64512&n)&&o+1<t.length&&56320==(64512&t.charCodeAt(o+1))?(n=65536+((1023&n)<<10)+(1023&t.charCodeAt(++o)),e[i++]=n>>18|240,e[i++]=n>>12&63|128,e[i++]=n>>6&63|128,e[i++]=63&n|128):(e[i++]=n>>12|224,e[i++]=n>>6&63|128,e[i++]=63&n|128)}return e},_e={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const i=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,o=[];for(let e=0;e<t.length;e+=3){const n=t[e],s=e+1<t.length,r=s?t[e+1]:0,a=e+2<t.length,l=a?t[e+2]:0,c=n>>2,d=(3&n)<<4|r>>4;let h=(15&r)<<2|l>>6,u=63&l;a||(u=64,s||(h=64)),o.push(i[c],i[d],i[h],i[u])}return o.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Te(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){const e=[];let i=0,o=0;for(;i<t.length;){const n=t[i++];if(n<128)e[o++]=String.fromCharCode(n);else if(n>191&&n<224){const s=t[i++];e[o++]=String.fromCharCode((31&n)<<6|63&s)}else if(n>239&&n<365){const s=((7&n)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536;e[o++]=String.fromCharCode(55296+(s>>10)),e[o++]=String.fromCharCode(56320+(1023&s))}else{const s=t[i++],r=t[i++];e[o++]=String.fromCharCode((15&n)<<12|(63&s)<<6|63&r)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const i=e?this.charToByteMapWebSafe_:this.charToByteMap_,o=[];for(let e=0;e<t.length;){const n=i[t.charAt(e++)],s=e<t.length?i[t.charAt(e)]:0;++e;const r=e<t.length?i[t.charAt(e)]:64;++e;const a=e<t.length?i[t.charAt(e)]:64;if(++e,null==n||null==s||null==r||null==a)throw new Ie;const l=n<<2|s>>4;if(o.push(l),64!==r){const t=s<<4&240|r>>2;if(o.push(t),64!==a){const t=r<<6&192|a;o.push(t)}}}return o},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class Ie extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Ae=function(t){return function(t){const e=Te(t);return _e.encodeByteArray(e,!0)}(t).replace(/\./g,"")},Ne=function(t){try{return _e.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};
71
+ */class ut extends dt{constructor(t){if(super(t),this.it=P,t.type!==lt)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===P||null==t)return this.ft=void 0,this.it=t;if(t===D)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.ft;this.it=t;const e=[t];return e.raw=e,this.ft={_$litType$:this.constructor.resultType,strings:e,values:[]}}}ut.directiveName="unsafeHTML",ut.resultType=1;const pt=ct(ut);class vt{}vt.Events={GUEST_MODE_SIGN_IN_DIALOG_SHOWN:"guestModeSignInDialogShown",GUEST_MODE_NAME_DIALOG_SHOWN:"guestModeNameDialogShown",GUEST_MODE_SIGN_IN_BANNER_SHOWN:"guestModeSignInBannerShown",GUEST_MODE_SIGN_IN_BUTTON_CLICKED:"guestModeSignInButtonClicked",PASSWORD_PROTECTED_MODAL_CLOSE_BUTTON_CLICKED:"passwordProtectedModalCloseButtonClicked",PASSWORD_PROTECTED_MODAL_OPEN_BUTTON_CLICKED:"passwordProtectedModalOpenButtonClicked",TOOLBAR_EXPANDED:"toolbarExpanded",TOOLBAR_COLLAPSED:"toolbarCollapsed",TOOLBAR_NOTIFICATION_CLICKED:"toolbarNotificationClicked",GUEST_MODE_SKIP_BUTTON_CLICKED:"guestModeSkipButtonClicked",GUEST_MODE_SIGN_IN_NUDGE_SHOWN:"guestModeSignInNudgeShown",GUEST_MODE_NAME_NUDGE_SHOWN:"guestModeNameNudgeShown",GUEST_MODE_SIGN_IN_CLICKED:"guestModeSignInClicked",GUEST_MODE_PRESENT:"guestModePresent",GUEST_MODE_NAME_ADDED:"guestModeNameAdded",REVIEW_PASSWORD_ADDED:"reviewPasswordAdded",REVIEW_PASSWORD_REJECTED:"reviewPasswordRejected",REVIEW_PASSWORD_ACCEPTED:"reviewPasswordAccepted",PRIVATE_MODE_ENABLED:"privateModeEnabled",PRIVATE_MODE_DISABLED:"privateModeDisabled",VISIBILITY_OPTIONS_ENABLED:"visibilityOptionsEnabled",VISIBILITY_OPTIONS_DISABLED:"visibilityOptionsDisabled",VIEW_PROJECT_CLICKED:"viewProjectClicked",OPEN_MOBILE_CLICKED:"openMobileClicked",EXIT_REVIEW_MODE_CLICKED:"exitReviewModeClicked",SIGNOUT_CLICKED:"signoutClicked",SIGNIN_CLICKED:"signinClicked",SIGN_IN_REQUIRED:"signInRequired",USER_EMAIL_NOT_WHITELISTED:"userEmailNotWhitelisted",DOMAIN_NOT_WHITELISTED:"domainNotWhitelisted",DUPLICATE_SCRIPT_INSTALLED:"duplicateScriptInstalled",TOOLBAR_DISABLED:"toolbarDisabled",INVITE_MODAL_OPENED:"inviteModalOpened",INVITE_SENT:"inviteSent",QUALITY_CHECK_RUN_TOOLBAR_CLICKED:"qualityCheckRunFromToolbarClicked"};const ft="1.0.732",gt="5.0.4",mt="6.0.0-beta.14",wt=["v3ogId1G43AFHehEOewv","rNYzMJd13L27xtfipmSK","aU1MxKP0rca2UXwKi8bl"],yt="sfSidebarV2Enabled",bt="sfUseProxy",Ct=["v3ogId1G43AFHehEOewv"],xt=[],Et="review",kt="feedback",St="sembed",Mt="scommentmode",Tt="sreadonly",_t="sagentcomments",It="spath",At=[{hostSuffix:"cloudfunctions.net",pathPrefix:"/previewproxy"},{hostSuffix:"api.velt.dev",pathPrefix:"/previewproxy"}],Nt="sreviewId",Ot="scommentId",$t="snippyly-user",Lt="st",Dt="_sfut",Pt="_sfgut",Vt="projectVersionKey",Ft="projectVersion",jt="sversion",Rt="sprojectInstall",Ut="sflivedemo",zt="sffigmademo",Bt="sfTourCommentTooltip",Ht="sfUserAdmin",Wt="sfGuestMode",Gt="sfPasswordProtected",Kt="sfQueryParamsComments",Zt="sfUsePageTitleAsLocationName",Jt="sfPasswordIsValid",Yt="sfPrivateMode",qt="organizationPrivate",Qt="sfGuestModeAllowSignIn",Xt="sfGuestUserModelOpened",te="sfGuestUserNameUpdated",ee="sfGuestUserBannerOpened",ie="sfCustomerMetadata",oe="sfContentWarningSidebarOpen",ne="sfNativeScreenshotPermission",se="sfSamlConfig",re="superflow-file-viewer-staging.web.app",ae="superflow-portal-v2-staging.firebaseapp.com/drive",le="app.usesuperflow.com/drive",ce="drive.usesuperflow.com",de=["app.usesuperflow.com","superflow-portal-v2-staging.firebaseapp.com"],he="terminal",ue="suggestion",pe={AGENT:"agent:",AGENT_TYPE_CUSTOM:"agentType:custom"},ve={SPELL_CHECK:"spell-check",BROKEN_LINKS:"broken-links",GRAMMAR_CHECK:"grammar-check"},fe={VELT_ROOT:"velt-root",VELT_PRESENCE:"velt-presence",VELT_CURSOR:"velt-cursor",VELT_COMMENT_TOOL:"velt-comment-tool",VELT_COMMENTS:"velt-comments",SNIPPYLY_TEXT_HIGHLIGHT:"snippyly-text-highlight",VELT_COMMENTS_SIDEBAR_LEGACY:"velt-comments-sidebar",VELT_COMMENTS_SIDEBAR_V2:"velt-comments-sidebar-v2",VELT_HUDDLE:"velt-huddle",VELT_RECORDER_NOTES:"velt-recorder-notes",VELT_RECORDER_CONTROL_PANEL:"velt-recorder-control-panel",VELT_ARROWS:"velt-arrows",VELT_NOTIFICATIONS_HISTORY_PANEL:"velt-notifications-history-panel"},ge={ENABLE_URL_NAVIGATION:"enable-url-navigation",URL_NAVIGATION:"url-navigation",CURRENT_LOCATION_SUFFIX:"current-location-suffix",SIDEBAR_BUTTON_COUNT_TYPE:"sidebar-button-count-type",CUSTOM_ACTIONS:"custom-actions"},me="filter",we={customBranding:{logo:{logoMark:{lightUrl:'\n\t\t\t\t<svg viewBox="0 0 49 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 8C8 3.58172 11.5817 0 16 0V0C20.4183 0 24 3.58172 24 8V16H16C11.5817 16 8 12.4183 8 8V8Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 29C0 22.3726 5.37258 17 12 17H24V29C24 35.6274 18.6274 41 12 41V41C5.37258 41 0 35.6274 0 29V29Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 19C25 12.3726 30.3726 7 37 7V7C43.6274 7 49 12.3726 49 19V19C49 25.6274 43.6274 31 37 31H25V19Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 32H33C37.4183 32 41 35.5817 41 40V40C41 44.4183 37.4183 48 33 48V48C28.5817 48 25 44.4183 25 40V32Z" fill="#0DCF82"/>\n\t\t\t\t</svg>\n\t\t\t\t',darkUrl:'\n\t\t\t\t<svg viewBox="0 0 49 48" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 8C8 3.58172 11.5817 0 16 0V0C20.4183 0 24 3.58172 24 8V16H16C11.5817 16 8 12.4183 8 8V8Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 29C0 22.3726 5.37258 17 12 17H24V29C24 35.6274 18.6274 41 12 41V41C5.37258 41 0 35.6274 0 29V29Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 19C25 12.3726 30.3726 7 37 7V7C43.6274 7 49 12.3726 49 19V19C49 25.6274 43.6274 31 37 31H25V19Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 32H33C37.4183 32 41 35.5817 41 40V40C41 44.4183 37.4183 48 33 48V48C28.5817 48 25 44.4183 25 40V32Z" fill="#0DCF82"/>\n\t\t\t\t</svg>\n\t\t\t\t'},wordMark:{lightUrl:'\n\t\t\t\t<svg width="257" height="65" viewBox="0 0 257 65" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 16C8 11.5817 11.5817 8 16 8V8C20.4183 8 24 11.5817 24 16V24H16C11.5817 24 8 20.4183 8 16V16Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 37C0 30.3726 5.37258 25 12 25H24V37C24 43.6274 18.6274 49 12 49V49C5.37258 49 0 43.6274 0 37V37Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 27C25 20.3726 30.3726 15 37 15V15C43.6274 15 49 20.3726 49 27V27C49 33.6274 43.6274 39 37 39H25V27Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 40H33C37.4183 40 41 43.5817 41 48V48C41 52.4183 37.4183 56 33 56V56C28.5817 56 25 52.4183 25 48V40Z" fill="#0DCF82"/>\n\t\t\t\t\t<path d="M73.4 46.28C71.4533 46.28 69.6933 45.9467 68.12 45.28C66.5733 44.6133 65.3467 43.6533 64.44 42.4C63.5333 41.1467 63.0667 39.6667 63.04 37.96H69.04C69.12 39.1067 69.52 40.0133 70.24 40.68C70.9867 41.3467 72 41.68 73.28 41.68C74.5867 41.68 75.6133 41.3733 76.36 40.76C77.1067 40.12 77.48 39.2933 77.48 38.28C77.48 37.4533 77.2267 36.7733 76.72 36.24C76.2133 35.7067 75.5733 35.2933 74.8 35C74.0533 34.68 73.0133 34.3333 71.68 33.96C69.8667 33.4267 68.3867 32.9067 67.24 32.4C66.12 31.8667 65.1467 31.08 64.32 30.04C63.52 28.9733 63.12 27.56 63.12 25.8C63.12 24.1467 63.5333 22.7067 64.36 21.48C65.1867 20.2533 66.3467 19.32 67.84 18.68C69.3333 18.0133 71.04 17.68 72.96 17.68C75.84 17.68 78.1733 18.3867 79.96 19.8C81.7733 21.1867 82.7733 23.1333 82.96 25.64H76.8C76.7467 24.68 76.3333 23.8933 75.56 23.28C74.8133 22.64 73.8133 22.32 72.56 22.32C71.4667 22.32 70.5867 22.6 69.92 23.16C69.28 23.72 68.96 24.5333 68.96 25.6C68.96 26.3467 69.2 26.9733 69.68 27.48C70.1867 27.96 70.8 28.36 71.52 28.68C72.2667 28.9733 73.3067 29.32 74.64 29.72C76.4533 30.2533 77.9333 30.7867 79.08 31.32C80.2267 31.8533 81.2133 32.6533 82.04 33.72C82.8667 34.7867 83.28 36.1867 83.28 37.92C83.28 39.4133 82.8933 40.8 82.12 42.08C81.3467 43.36 80.2133 44.3867 78.72 45.16C77.2267 45.9067 75.4533 46.28 73.4 46.28ZM107.855 23.84V46H102.215V43.2C101.495 44.16 100.548 44.92 99.375 45.48C98.2283 46.0133 96.975 46.28 95.615 46.28C93.8817 46.28 92.3483 45.92 91.015 45.2C89.6817 44.4533 88.6283 43.3733 87.855 41.96C87.1083 40.52 86.735 38.8133 86.735 36.84V23.84H92.335V36.04C92.335 37.8 92.775 39.16 93.655 40.12C94.535 41.0533 95.735 41.52 97.255 41.52C98.8017 41.52 100.015 41.0533 100.895 40.12C101.775 39.16 102.215 37.8 102.215 36.04V23.84H107.855ZM116.98 27.04C117.7 26.0267 118.687 25.1867 119.94 24.52C121.22 23.8267 122.674 23.48 124.3 23.48C126.194 23.48 127.9 23.9467 129.42 24.88C130.967 25.8133 132.18 27.1467 133.06 28.88C133.967 30.5867 134.42 32.5733 134.42 34.84C134.42 37.1067 133.967 39.12 133.06 40.88C132.18 42.6133 130.967 43.96 129.42 44.92C127.9 45.88 126.194 46.36 124.3 46.36C122.674 46.36 121.234 46.0267 119.98 45.36C118.754 44.6933 117.754 43.8533 116.98 42.84V56.56H111.38V23.84H116.98V27.04ZM128.7 34.84C128.7 33.5067 128.42 32.36 127.86 31.4C127.327 30.4133 126.607 29.6667 125.7 29.16C124.82 28.6533 123.86 28.4 122.82 28.4C121.807 28.4 120.847 28.6667 119.94 29.2C119.06 29.7067 118.34 30.4533 117.78 31.44C117.247 32.4267 116.98 33.5867 116.98 34.92C116.98 36.2533 117.247 37.4133 117.78 38.4C118.34 39.3867 119.06 40.1467 119.94 40.68C120.847 41.1867 121.807 41.44 122.82 41.44C123.86 41.44 124.82 41.1733 125.7 40.64C126.607 40.1067 127.327 39.3467 127.86 38.36C128.42 37.3733 128.7 36.2 128.7 34.84ZM158.29 34.44C158.29 35.24 158.236 35.96 158.13 36.6H141.93C142.063 38.2 142.623 39.4533 143.61 40.36C144.596 41.2667 145.81 41.72 147.25 41.72C149.33 41.72 150.81 40.8267 151.69 39.04H157.73C157.09 41.1733 155.863 42.9333 154.05 44.32C152.236 45.68 150.01 46.36 147.37 46.36C145.236 46.36 143.316 45.8933 141.61 44.96C139.93 44 138.61 42.6533 137.65 40.92C136.716 39.1867 136.25 37.1867 136.25 34.92C136.25 32.6267 136.716 30.6133 137.65 28.88C138.583 27.1467 139.89 25.8133 141.57 24.88C143.25 23.9467 145.183 23.48 147.37 23.48C149.476 23.48 151.356 23.9333 153.01 24.84C154.69 25.7467 155.983 27.04 156.89 28.72C157.823 30.3733 158.29 32.28 158.29 34.44ZM152.49 32.84C152.463 31.4 151.943 30.2533 150.93 29.4C149.916 28.52 148.676 28.08 147.21 28.08C145.823 28.08 144.65 28.5067 143.69 29.36C142.756 30.1867 142.183 31.3467 141.97 32.84H152.49ZM167.177 27.28C167.897 26.1067 168.831 25.1867 169.977 24.52C171.151 23.8533 172.484 23.52 173.977 23.52V29.4H172.497C170.737 29.4 169.404 29.8133 168.497 30.64C167.617 31.4667 167.177 32.9067 167.177 34.96V46H161.577V23.84H167.177V27.28ZM188.309 28.44H184.429V46H178.749V28.44H176.229V23.84H178.749V22.72C178.749 20 179.522 18 181.069 16.72C182.616 15.44 184.949 14.84 188.069 14.92V19.64C186.709 19.6133 185.762 19.84 185.229 20.32C184.696 20.8 184.429 21.6667 184.429 22.92V23.84H188.309V28.44ZM197.538 16.4V46H191.938V16.4H197.538ZM211.711 46.36C209.578 46.36 207.658 45.8933 205.951 44.96C204.244 44 202.898 42.6533 201.911 40.92C200.951 39.1867 200.471 37.1867 200.471 34.92C200.471 32.6533 200.964 30.6533 201.951 28.92C202.964 27.1867 204.338 25.8533 206.071 24.92C207.804 23.96 209.738 23.48 211.871 23.48C214.004 23.48 215.938 23.96 217.671 24.92C219.404 25.8533 220.764 27.1867 221.751 28.92C222.764 30.6533 223.271 32.6533 223.271 34.92C223.271 37.1867 222.751 39.1867 221.711 40.92C220.698 42.6533 219.311 44 217.551 44.96C215.818 45.8933 213.871 46.36 211.711 46.36ZM211.711 41.48C212.724 41.48 213.671 41.24 214.551 40.76C215.458 40.2533 216.178 39.5067 216.711 38.52C217.244 37.5333 217.511 36.3333 217.511 34.92C217.511 32.8133 216.951 31.2 215.831 30.08C214.738 28.9333 213.391 28.36 211.791 28.36C210.191 28.36 208.844 28.9333 207.751 30.08C206.684 31.2 206.151 32.8133 206.151 34.92C206.151 37.0267 206.671 38.6533 207.711 39.8C208.778 40.92 210.111 41.48 211.711 41.48ZM256.499 23.84L250.019 46H243.979L239.939 30.52L235.899 46H229.819L223.299 23.84H228.979L232.899 40.72L237.139 23.84H243.059L247.219 40.68L251.139 23.84H256.499Z" fill="#141416"/>\n\t\t\t\t</svg>\n\t\t\t\t',darkUrl:'\n\t\t\t\t<svg width="257" height="65" viewBox="0 0 257 65" fill="none" xmlns="http://www.w3.org/2000/svg">\n\t\t\t\t\t<path d="M8 16C8 11.5817 11.5817 8 16 8V8C20.4183 8 24 11.5817 24 16V24H16C11.5817 24 8 20.4183 8 16V16Z" fill="#FFCD2E"/>\n\t\t\t\t\t<path d="M0 37C0 30.3726 5.37258 25 12 25H24V37C24 43.6274 18.6274 49 12 49V49C5.37258 49 0 43.6274 0 37V37Z" fill="#A259FE"/>\n\t\t\t\t\t<path d="M25 27C25 20.3726 30.3726 15 37 15V15C43.6274 15 49 20.3726 49 27V27C49 33.6274 43.6274 39 37 39H25V27Z" fill="#FF7162"/>\n\t\t\t\t\t<path d="M25 40H33C37.4183 40 41 43.5817 41 48V48C41 52.4183 37.4183 56 33 56V56C28.5817 56 25 52.4183 25 48V40Z" fill="#0DCF82"/>\n\t\t\t\t\t<path d="M73.4 46.28C71.4533 46.28 69.6933 45.9467 68.12 45.28C66.5733 44.6133 65.3467 43.6533 64.44 42.4C63.5333 41.1467 63.0667 39.6667 63.04 37.96H69.04C69.12 39.1067 69.52 40.0133 70.24 40.68C70.9867 41.3467 72 41.68 73.28 41.68C74.5867 41.68 75.6133 41.3733 76.36 40.76C77.1067 40.12 77.48 39.2933 77.48 38.28C77.48 37.4533 77.2267 36.7733 76.72 36.24C76.2133 35.7067 75.5733 35.2933 74.8 35C74.0533 34.68 73.0133 34.3333 71.68 33.96C69.8667 33.4267 68.3867 32.9067 67.24 32.4C66.12 31.8667 65.1467 31.08 64.32 30.04C63.52 28.9733 63.12 27.56 63.12 25.8C63.12 24.1467 63.5333 22.7067 64.36 21.48C65.1867 20.2533 66.3467 19.32 67.84 18.68C69.3333 18.0133 71.04 17.68 72.96 17.68C75.84 17.68 78.1733 18.3867 79.96 19.8C81.7733 21.1867 82.7733 23.1333 82.96 25.64H76.8C76.7467 24.68 76.3333 23.8933 75.56 23.28C74.8133 22.64 73.8133 22.32 72.56 22.32C71.4667 22.32 70.5867 22.6 69.92 23.16C69.28 23.72 68.96 24.5333 68.96 25.6C68.96 26.3467 69.2 26.9733 69.68 27.48C70.1867 27.96 70.8 28.36 71.52 28.68C72.2667 28.9733 73.3067 29.32 74.64 29.72C76.4533 30.2533 77.9333 30.7867 79.08 31.32C80.2267 31.8533 81.2133 32.6533 82.04 33.72C82.8667 34.7867 83.28 36.1867 83.28 37.92C83.28 39.4133 82.8933 40.8 82.12 42.08C81.3467 43.36 80.2133 44.3867 78.72 45.16C77.2267 45.9067 75.4533 46.28 73.4 46.28ZM107.855 23.84V46H102.215V43.2C101.495 44.16 100.548 44.92 99.375 45.48C98.2283 46.0133 96.975 46.28 95.615 46.28C93.8817 46.28 92.3483 45.92 91.015 45.2C89.6817 44.4533 88.6283 43.3733 87.855 41.96C87.1083 40.52 86.735 38.8133 86.735 36.84V23.84H92.335V36.04C92.335 37.8 92.775 39.16 93.655 40.12C94.535 41.0533 95.735 41.52 97.255 41.52C98.8017 41.52 100.015 41.0533 100.895 40.12C101.775 39.16 102.215 37.8 102.215 36.04V23.84H107.855ZM116.98 27.04C117.7 26.0267 118.687 25.1867 119.94 24.52C121.22 23.8267 122.674 23.48 124.3 23.48C126.194 23.48 127.9 23.9467 129.42 24.88C130.967 25.8133 132.18 27.1467 133.06 28.88C133.967 30.5867 134.42 32.5733 134.42 34.84C134.42 37.1067 133.967 39.12 133.06 40.88C132.18 42.6133 130.967 43.96 129.42 44.92C127.9 45.88 126.194 46.36 124.3 46.36C122.674 46.36 121.234 46.0267 119.98 45.36C118.754 44.6933 117.754 43.8533 116.98 42.84V56.56H111.38V23.84H116.98V27.04ZM128.7 34.84C128.7 33.5067 128.42 32.36 127.86 31.4C127.327 30.4133 126.607 29.6667 125.7 29.16C124.82 28.6533 123.86 28.4 122.82 28.4C121.807 28.4 120.847 28.6667 119.94 29.2C119.06 29.7067 118.34 30.4533 117.78 31.44C117.247 32.4267 116.98 33.5867 116.98 34.92C116.98 36.2533 117.247 37.4133 117.78 38.4C118.34 39.3867 119.06 40.1467 119.94 40.68C120.847 41.1867 121.807 41.44 122.82 41.44C123.86 41.44 124.82 41.1733 125.7 40.64C126.607 40.1067 127.327 39.3467 127.86 38.36C128.42 37.3733 128.7 36.2 128.7 34.84ZM158.29 34.44C158.29 35.24 158.236 35.96 158.13 36.6H141.93C142.063 38.2 142.623 39.4533 143.61 40.36C144.596 41.2667 145.81 41.72 147.25 41.72C149.33 41.72 150.81 40.8267 151.69 39.04H157.73C157.09 41.1733 155.863 42.9333 154.05 44.32C152.236 45.68 150.01 46.36 147.37 46.36C145.236 46.36 143.316 45.8933 141.61 44.96C139.93 44 138.61 42.6533 137.65 40.92C136.716 39.1867 136.25 37.1867 136.25 34.92C136.25 32.6267 136.716 30.6133 137.65 28.88C138.583 27.1467 139.89 25.8133 141.57 24.88C143.25 23.9467 145.183 23.48 147.37 23.48C149.476 23.48 151.356 23.9333 153.01 24.84C154.69 25.7467 155.983 27.04 156.89 28.72C157.823 30.3733 158.29 32.28 158.29 34.44ZM152.49 32.84C152.463 31.4 151.943 30.2533 150.93 29.4C149.916 28.52 148.676 28.08 147.21 28.08C145.823 28.08 144.65 28.5067 143.69 29.36C142.756 30.1867 142.183 31.3467 141.97 32.84H152.49ZM167.177 27.28C167.897 26.1067 168.831 25.1867 169.977 24.52C171.151 23.8533 172.484 23.52 173.977 23.52V29.4H172.497C170.737 29.4 169.404 29.8133 168.497 30.64C167.617 31.4667 167.177 32.9067 167.177 34.96V46H161.577V23.84H167.177V27.28ZM188.309 28.44H184.429V46H178.749V28.44H176.229V23.84H178.749V22.72C178.749 20 179.522 18 181.069 16.72C182.616 15.44 184.949 14.84 188.069 14.92V19.64C186.709 19.6133 185.762 19.84 185.229 20.32C184.696 20.8 184.429 21.6667 184.429 22.92V23.84H188.309V28.44ZM197.538 16.4V46H191.938V16.4H197.538ZM211.711 46.36C209.578 46.36 207.658 45.8933 205.951 44.96C204.244 44 202.898 42.6533 201.911 40.92C200.951 39.1867 200.471 37.1867 200.471 34.92C200.471 32.6533 200.964 30.6533 201.951 28.92C202.964 27.1867 204.338 25.8533 206.071 24.92C207.804 23.96 209.738 23.48 211.871 23.48C214.004 23.48 215.938 23.96 217.671 24.92C219.404 25.8533 220.764 27.1867 221.751 28.92C222.764 30.6533 223.271 32.6533 223.271 34.92C223.271 37.1867 222.751 39.1867 221.711 40.92C220.698 42.6533 219.311 44 217.551 44.96C215.818 45.8933 213.871 46.36 211.711 46.36ZM211.711 41.48C212.724 41.48 213.671 41.24 214.551 40.76C215.458 40.2533 216.178 39.5067 216.711 38.52C217.244 37.5333 217.511 36.3333 217.511 34.92C217.511 32.8133 216.951 31.2 215.831 30.08C214.738 28.9333 213.391 28.36 211.791 28.36C210.191 28.36 208.844 28.9333 207.751 30.08C206.684 31.2 206.151 32.8133 206.151 34.92C206.151 37.0267 206.671 38.6533 207.711 39.8C208.778 40.92 210.111 41.48 211.711 41.48ZM256.499 23.84L250.019 46H243.979L239.939 30.52L235.899 46H229.819L223.299 23.84H228.979L232.899 40.72L237.139 23.84H243.059L247.219 40.68L251.139 23.84H256.499Z" fill="white"/>\n\t\t\t\t</svg>\n\t\t\t\t'}}}},ye=[{name:"Peppa Pig",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fpeppa_pig.svg?alt=media&token=a9fc83f7-b347-4868-8d52-0e888f0de73a&_gl=1*jzxghx*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTQ5LjQyLjAuMA.."},{name:"Dazzling Dalmatian",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fdazzling_dalmatian.svg?alt=media&token=5842b24c-7e58-4bb5-96c2-d09aa11f7f9e&_gl=1*11ayw3z*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxOTY4LjExLjAuMA.."},{name:"Rosy Rabbit",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Frosy_rabbit.svg?alt=media&token=4e65a9e3-080d-4416-839d-e761b6b37181&_gl=1*156om5t*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjUzLjYwLjAuMA.."},{name:"Leo the Lion",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fleo_the_lion.svg?alt=media&token=58d1296e-fefd-42ce-80ea-ae2cc830f1a9&_gl=1*1cz8e9q*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTAwLjIwLjAuMA.."},{name:"Ducky Down",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fducky_down.svg?alt=media&token=d67ae889-78c5-46e3-aaa9-3eb511fe90b3&_gl=1*cxyj7o*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxOTkwLjYwLjAuMA.."},{name:"Merry Monkey",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fmerry_monkey.svg?alt=media&token=5bd2f69a-7211-42df-9718-5339c467b2d1&_gl=1*1labjed*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTE3LjMuMC4w"},{name:"Ecstatic Elephant",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fecstatic_elephant.svg?alt=media&token=fbd2ba76-6c3a-47a7-beac-0460a2178b7d&_gl=1*aku3ps*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDA3LjQzLjAuMA.."},{name:"Baby Bear",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fbaby_bear.svg?alt=media&token=71d0c5fb-60aa-4304-adc1-635a83650bde&_gl=1*1dxajmf*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxMjQyLjUyLjAuMA.."},{name:"Freddy Froglet",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Ffreddy_froglet.svg?alt=media&token=e3b2e292-6480-4507-9da3-21a62a1346d4&_gl=1*s4yycs*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDQzLjcuMC4w"},{name:"Powerful Panda",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fpowerful_panda.svg?alt=media&token=07f9d60f-aa14-4a77-ad5b-c48ee76db3f5&_gl=1*7gfuit*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTkzLjYwLjAuMA.."},{name:"Curious Cat",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fcurious_cat.svg?alt=media&token=dccf6824-3b7c-4e4e-8559-40fbb8ff6186&_gl=1*1nwi0ti*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQxOTM3LjQyLjAuMA.."},{name:"Playful Penguin",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fplayful_penguin.svg?alt=media&token=c6d1b11a-43a6-4001-ae56-e04fd5a3f965&_gl=1*1xdxvkx*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTYzLjI4LjAuMA.."},{name:"Kind Koala",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fkind_koala.svg?alt=media&token=974396d6-6ccd-4367-8563-b27634849cb5&_gl=1*1w1gbnn*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDgwLjQwLjAuMA.."},{name:"Tommy Tiger",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Ftommy_tiger.svg?alt=media&token=40a95ac7-cc91-4b74-859a-4e2e5964b967&_gl=1*1n0cr0n*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjczLjQwLjAuMA.."},{name:"Wally Walrus",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fwally_walrus.svg?alt=media&token=31e02ef2-c986-4724-b987-dca97f84f81b&_gl=1*y5by2c*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjkxLjIyLjAuMA.."},{name:"Ricky Rhino",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fricky_rhino.svg?alt=media&token=5d9dafe5-f4de-4f8b-94c1-49e01c776611&_gl=1*zyp4n2*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjMxLjIyLjAuMA.."},{name:"Oliver Otter",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Foliver_otter.svg?alt=media&token=5298b869-0903-40b2-a702-224a3e0bcd95&_gl=1*aicppz*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMTMxLjYwLjAuMA.."},{name:"Reggie Ratling",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Freggie_ratling.svg?alt=media&token=f37fd4a0-9dbd-403a-bb82-81fdfb63cf88&_gl=1*16lzeql*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMjA3LjQ2LjAuMA.."},{name:"Gentle Giraffe",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Fgentle_giraffe.svg?alt=media&token=f097ec12-e8ce-4d26-bf32-43e470eb7907&_gl=1*11ctuwz*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDYwLjYwLjAuMA.."},{name:"Fabulous Fox",photoUrl:"https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/avatars%2Ffabulous_fox.svg?alt=media&token=fe1a4236-af45-427f-a035-1eda417b0682&_gl=1*xyyv1g*_ga*NTc3MjEzMjIwLjE2NjEwODkwMDU.*_ga_CW55HF8NVT*MTY5NzE0MTIzNC4zMzMuMS4xNjk3MTQyMDIxLjI5LjAuMA.."}];var be=Object.freeze({__proto__:null,AGENT_COMMENTS_MODE:_t,AGENT_FIELD_PREFIXES:pe,ANNOTATION_STATUS_TERMINAL:he,ANNOTATION_TYPE_SUGGESTION:ue,ATTRIBUTES:ge,AUTO_COMMENT_MODE:Mt,COMMENT_PRIVATE_MODE_TYPE_ORGANIZATION:qt,DEFAULT_CUSTOMER_METADATA:we,DOCUMENT_TITLE_CHANGE_LISTENER_API_KEYS:wt,DRIVE_NEW_PROD_URL:le,DRIVE_NEW_STAGING_URL:ae,DRIVE_PROD_URL:ce,DRIVE_STAGING_URL:re,EMBED_MODE:St,EXCLUDED_API_KEYS_FROM_LATEST_VERSION:["I9R2VqG45F5AgpIicnht"],FEEDBACK_MODE:kt,FIGMA_DEMO_MODAL:zt,GUEST_USERS:ye,LIVE_DEMO_MODAL:Ut,PREVIEW_LOCATION_PATH:It,PREVIEW_PROXY_HOSTS:At,PROJECT_INSTALL:Rt,PROJECT_VERSION:Ft,PROJECT_VERSION_DEFAULT_KEY:jt,PROJECT_VERSION_KEY:Vt,PROXY_DISABLED_DEFAULT_API_KEYS:Ct,READ_ONLY_MODE:Tt,REVIEW_DOC_ID:Nt,REVIEW_MODE:Et,SCREENSHOT_DISABLED_HOSTS:de,SIDEBAR_BUTTON_COUNT_TYPE_FILTER:me,SIDEBAR_V1_DEFAULT_API_KEYS:xt,SNIPPYLY_COMMENT_ID:Ot,SNIPPYLY_TOKEN:Lt,SNIPPYLY_USER:$t,SUPERFLOW_CONTENT_WARNING_SIDEBAR_OPEN:oe,SUPERFLOW_CUSTOMER_METADATA:ie,SUPERFLOW_DOCUMENT_METADATA:"sfDocumentMetadata",SUPERFLOW_GUEST_MODE:Wt,SUPERFLOW_GUEST_MODE_ALLOW_SIGN_IN:Qt,SUPERFLOW_GUEST_USER_BANNER_OPENED:ee,SUPERFLOW_GUEST_USER_MODEL_OPENED:Xt,SUPERFLOW_GUEST_USER_NAME_MODEL_OPENED:"sfGuestUserNameModelOpened",SUPERFLOW_GUEST_USER_NAME_UPDATED:te,SUPERFLOW_GUEST_USER_TOKEN:Pt,SUPERFLOW_NATIVE_SCREENSHOT_PERMISSION:ne,SUPERFLOW_PASSWORD_IS_VALID:Jt,SUPERFLOW_PASSWORD_PROTECTED:Gt,SUPERFLOW_PRIVATE_MODE:Yt,SUPERFLOW_QUERY_PARAMS_COMMENTS:Kt,SUPERFLOW_SAML_CONFIG:se,SUPERFLOW_SIDEBAR_V2_ENABLED:yt,SUPERFLOW_USER_ADMIN:Ht,SUPERFLOW_USER_TOKEN:Dt,SUPERFLOW_USE_PAGE_TITLE_AS_LOCATION_NAME:Zt,SUPERFLOW_VERSION:ft,SYSTEM_AGENT_IDS:ve,TAGS:fe,TOUR_COMMENT_TOOLTIP:Bt,VELT_PROXY_FLAG:bt,VELT_SDK_DEVELOP_VERSION:gt,VELT_SDK_PROD_VERSION:mt,VELT_SDK_STAGING_VERSION:"3.0.92"});const Ce=!0,xe="https://superflow-portal-v2-staging.firebaseapp.com/",Ee="9dbcd2509e0fa90a5c81f038ce618e3f",ke="6d24f74f12f6fb84c87efa8f791cfb2e",Se="https://us-central1-snipply-sdk-staging.cloudfunctions.net/sa",Me="https://us-central1-snipply-sdk-staging.cloudfunctions.net/superflowtoolbarhandler",Te=function(t){const e=[];let i=0;for(let o=0;o<t.length;o++){let n=t.charCodeAt(o);n<128?e[i++]=n:n<2048?(e[i++]=n>>6|192,e[i++]=63&n|128):55296==(64512&n)&&o+1<t.length&&56320==(64512&t.charCodeAt(o+1))?(n=65536+((1023&n)<<10)+(1023&t.charCodeAt(++o)),e[i++]=n>>18|240,e[i++]=n>>12&63|128,e[i++]=n>>6&63|128,e[i++]=63&n|128):(e[i++]=n>>12|224,e[i++]=n>>6&63|128,e[i++]=63&n|128)}return e},_e={byteToCharMap_:null,charToByteMap_:null,byteToCharMapWebSafe_:null,charToByteMapWebSafe_:null,ENCODED_VALS_BASE:"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",get ENCODED_VALS(){return this.ENCODED_VALS_BASE+"+/="},get ENCODED_VALS_WEBSAFE(){return this.ENCODED_VALS_BASE+"-_."},HAS_NATIVE_SUPPORT:"function"==typeof atob,encodeByteArray(t,e){if(!Array.isArray(t))throw Error("encodeByteArray takes an array as a parameter");this.init_();const i=e?this.byteToCharMapWebSafe_:this.byteToCharMap_,o=[];for(let e=0;e<t.length;e+=3){const n=t[e],s=e+1<t.length,r=s?t[e+1]:0,a=e+2<t.length,l=a?t[e+2]:0,c=n>>2,d=(3&n)<<4|r>>4;let h=(15&r)<<2|l>>6,u=63&l;a||(u=64,s||(h=64)),o.push(i[c],i[d],i[h],i[u])}return o.join("")},encodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?btoa(t):this.encodeByteArray(Te(t),e)},decodeString(t,e){return this.HAS_NATIVE_SUPPORT&&!e?atob(t):function(t){const e=[];let i=0,o=0;for(;i<t.length;){const n=t[i++];if(n<128)e[o++]=String.fromCharCode(n);else if(n>191&&n<224){const s=t[i++];e[o++]=String.fromCharCode((31&n)<<6|63&s)}else if(n>239&&n<365){const s=((7&n)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536;e[o++]=String.fromCharCode(55296+(s>>10)),e[o++]=String.fromCharCode(56320+(1023&s))}else{const s=t[i++],r=t[i++];e[o++]=String.fromCharCode((15&n)<<12|(63&s)<<6|63&r)}}return e.join("")}(this.decodeStringToByteArray(t,e))},decodeStringToByteArray(t,e){this.init_();const i=e?this.charToByteMapWebSafe_:this.charToByteMap_,o=[];for(let e=0;e<t.length;){const n=i[t.charAt(e++)],s=e<t.length?i[t.charAt(e)]:0;++e;const r=e<t.length?i[t.charAt(e)]:64;++e;const a=e<t.length?i[t.charAt(e)]:64;if(++e,null==n||null==s||null==r||null==a)throw new Ie;const l=n<<2|s>>4;if(o.push(l),64!==r){const t=s<<4&240|r>>2;if(o.push(t),64!==a){const t=r<<6&192|a;o.push(t)}}}return o},init_(){if(!this.byteToCharMap_){this.byteToCharMap_={},this.charToByteMap_={},this.byteToCharMapWebSafe_={},this.charToByteMapWebSafe_={};for(let t=0;t<this.ENCODED_VALS.length;t++)this.byteToCharMap_[t]=this.ENCODED_VALS.charAt(t),this.charToByteMap_[this.byteToCharMap_[t]]=t,this.byteToCharMapWebSafe_[t]=this.ENCODED_VALS_WEBSAFE.charAt(t),this.charToByteMapWebSafe_[this.byteToCharMapWebSafe_[t]]=t,t>=this.ENCODED_VALS_BASE.length&&(this.charToByteMap_[this.ENCODED_VALS_WEBSAFE.charAt(t)]=t,this.charToByteMapWebSafe_[this.ENCODED_VALS.charAt(t)]=t)}}};class Ie extends Error{constructor(){super(...arguments),this.name="DecodeBase64StringError"}}const Ae=function(t){return function(t){const e=Te(t);return _e.encodeByteArray(e,!0)}(t).replace(/\./g,"")},Ne=function(t){try{return _e.decodeString(t,!0)}catch(t){console.error("base64Decode failed: ",t)}return null};
72
72
  /**
73
73
  * @license
74
74
  * Copyright 2022 Google LLC
@@ -1540,9 +1540,9 @@ function(t,e){const i=oo(t,"auth");if(i.isInitialized()){const t=i.getImmediate(
1540
1540
  * derived from CryptoJS.mode.CTR
1541
1541
  * Jan Hruby jhruby.web@gmail.com
1542
1542
  */
1543
- class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o=this._cipher,{blockSize:n}=o,s=this._iv;let r=this._counter;s&&(this._counter=s.slice(0),r=this._counter,this._iv=void 0),(t=>{const e=t;e[0]=hc(e[0]),0===e[0]&&(e[1]=hc(e[1]))})(r);const a=r.slice(0);o.encryptBlock(a,0);for(let t=0;t<n;t+=1)i[e+t]^=a[t]}},uc.Decryptor=uc.Encryptor;class pc extends Qr{}pc.Encryptor=class extends pc{processBlock(t,e){this._cipher.encryptBlock(t,e)}},pc.Decryptor=class extends pc{processBlock(t,e){this._cipher.decryptBlock(t,e)}};class vc extends Qr{}vc.Encryptor=class extends vc{processBlock(t,e){const i=t,o=this._cipher,{blockSize:n}=o,s=this._iv;let r=this._keystream;s&&(this._keystream=s.slice(0),r=this._keystream,this._iv=void 0),o.encryptBlock(r,0);for(let t=0;t<n;t+=1)i[e+t]^=r[t]}},vc.Decryptor=vc.Encryptor;const fc={pad(t,e){const i=t,o=i.sigBytes,n=4*e,s=n-o%n,r=o+s-1;i.clamp(),i.words[r>>>2]|=s<<24-r%4*8,i.sigBytes+=s},unpad(t){const e=t,i=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=i}},gc={pad(t,e){const i=4*e,o=i-t.sigBytes%i;t.concat(Ir.random(o-1)).concat(Ir.create([o<<24],1))},unpad(t){const e=t,i=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=i}},mc={pad(t,e){const i=t,o=4*e;i.clamp(),i.sigBytes+=o-(t.sigBytes%o||o)},unpad(t){const e=t,i=e.words;for(let t=e.sigBytes-1;t>=0;t-=1)if(i[t>>>2]>>>24-t%4*8&255){e.sigBytes=t+1;break}}},wc={pad(t,e){t.concat(Ir.create([2147483648],1)),mc.pad(t,e)},unpad(t){const e=t;mc.unpad(e),e.sigBytes-=1}},yc={pad(){},unpad(){}},bc={stringify:t=>t.ciphertext.toString(Ar),parse(t){const e=Ar.parse(t);return oa.create({ciphertext:e})}};var Cc={lib:{Base:_r,WordArray:Ir,BufferedBlockAlgorithm:$r,Hasher:Lr,Cipher:Yr,StreamCipher:qr,BlockCipherMode:Qr,BlockCipher:ia,CipherParams:oa,SerializableCipher:sa,PasswordBasedCipher:aa},x64:{Word:Vr,WordArray:Fr},enc:{Hex:Ar,Latin1:Nr,Utf8:Or,Utf16:da,Utf16BE:ca,Utf16LE:ha,Base64:Rr,Base64url:ua},algo:{HMAC:Dr,MD5:Gr,SHA1:va,SHA224:Ta,SHA256:ka,SHA384:Da,SHA512:Oa,SHA3:Wa,RIPEMD160:rl,PBKDF2:cl,EvpKDF:Jr,AES:kl,DES:$l,TripleDES:Dl,Rabbit:Ul,RabbitLegacy:Kl,RC4:Yl,RC4Drop:Ql,Blowfish:rc},mode:{CBC:ta,CFB:cc,CTR:dc,CTRGladman:uc,ECB:pc,OFB:vc},pad:{Pkcs7:ea,AnsiX923:fc,Iso10126:gc,Iso97971:wc,NoPadding:yc,ZeroPadding:mc},format:{OpenSSL:na,Hex:bc},kdf:{OpenSSL:ra},MD5:Kr,HmacMD5:Zr,SHA1:fa,HmacSHA1:ga,SHA224:_a,HmacSHA224:Ia,SHA256:Sa,HmacSHA256:Ma,SHA384:Pa,HmacSHA384:Va,SHA512:$a,HmacSHA512:La,SHA3:Ga,HmacSHA3:Ka,RIPEMD160:al,HmacRIPEMD160:ll,PBKDF2:(t,e,i)=>cl.create(i).compute(t,e),EvpKDF:(t,e,i)=>Jr.create(i).compute(t,e),AES:Sl,DES:Ll,TripleDES:Pl,Rabbit:zl,RabbitLegacy:Zl,RC4:ql,RC4Drop:Xl,Blowfish:ac};const xc=(t,e=0)=>{try{let i=3735928559^e,o=1103547991^e;for(let e,n=0;n<t.length;n++)e=t.charCodeAt(n),i=Math.imul(i^e,2654435761),o=Math.imul(o^e,1597334677);return i=Math.imul(i^i>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),o=Math.imul(o^o>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&o)+(i>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),Gc("Error in cyrb53: ",t),0}},Ec=t=>{try{return"object"!=typeof t?Object.assign({},...Object.keys(t).sort().map((e=>({[e]:t[e]&&"object"==typeof t[e]?Ec(t[e]):t[e]})))):t}catch(e){return t}},kc=t=>{let e;return e=t.includes("http")?new URL(t):new URL("http://"+t),e.hostname.replace("www.","")},Sc=t=>{try{const e=Ec(t);return xc(JSON.stringify(e))}catch(t){return}};function Mc(t){try{const e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e)}catch(t){return e}}catch(t){return console.warn("Error in getLocalStorage: ",t),null}}const Tc=(t,e,i=!1,o="localStorage")=>{try{const n=i?btoa(e):e;"localStorage"===o?localStorage.setItem(t,n):sessionStorage.setItem(t,n)}catch(t){console.warn("Error in setLocalStorage: ",t),Gc("Error in setLocalStorage: ",t)}},_c=(t,e=!1,i="localStorage")=>{try{let o=null;return o="localStorage"===i?localStorage.getItem(t):sessionStorage.getItem(t),o&&e?atob(o):o}catch(t){return console.warn("Error in getLocalStorage: ",t),Gc("Error in getLocalStorage: ",t),null}},Ic=(t,e="localStorage")=>{try{"localStorage"===e?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t),Gc("Error in removeLocalStorageData: ",t)}},Ac=(...t)=>{if(t)switch(t.length){case 1:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1))`;case 2:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1)) calc(${t[1]}rem * var(--velt-base-rem-unit, 1))`;case 3:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1)) calc(${t[1]}rem * var(--velt-base-rem-unit, 1))
1543
+ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o=this._cipher,{blockSize:n}=o,s=this._iv;let r=this._counter;s&&(this._counter=s.slice(0),r=this._counter,this._iv=void 0),(t=>{const e=t;e[0]=hc(e[0]),0===e[0]&&(e[1]=hc(e[1]))})(r);const a=r.slice(0);o.encryptBlock(a,0);for(let t=0;t<n;t+=1)i[e+t]^=a[t]}},uc.Decryptor=uc.Encryptor;class pc extends Qr{}pc.Encryptor=class extends pc{processBlock(t,e){this._cipher.encryptBlock(t,e)}},pc.Decryptor=class extends pc{processBlock(t,e){this._cipher.decryptBlock(t,e)}};class vc extends Qr{}vc.Encryptor=class extends vc{processBlock(t,e){const i=t,o=this._cipher,{blockSize:n}=o,s=this._iv;let r=this._keystream;s&&(this._keystream=s.slice(0),r=this._keystream,this._iv=void 0),o.encryptBlock(r,0);for(let t=0;t<n;t+=1)i[e+t]^=r[t]}},vc.Decryptor=vc.Encryptor;const fc={pad(t,e){const i=t,o=i.sigBytes,n=4*e,s=n-o%n,r=o+s-1;i.clamp(),i.words[r>>>2]|=s<<24-r%4*8,i.sigBytes+=s},unpad(t){const e=t,i=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=i}},gc={pad(t,e){const i=4*e,o=i-t.sigBytes%i;t.concat(Ir.random(o-1)).concat(Ir.create([o<<24],1))},unpad(t){const e=t,i=255&e.words[e.sigBytes-1>>>2];e.sigBytes-=i}},mc={pad(t,e){const i=t,o=4*e;i.clamp(),i.sigBytes+=o-(t.sigBytes%o||o)},unpad(t){const e=t,i=e.words;for(let t=e.sigBytes-1;t>=0;t-=1)if(i[t>>>2]>>>24-t%4*8&255){e.sigBytes=t+1;break}}},wc={pad(t,e){t.concat(Ir.create([2147483648],1)),mc.pad(t,e)},unpad(t){const e=t;mc.unpad(e),e.sigBytes-=1}},yc={pad(){},unpad(){}},bc={stringify:t=>t.ciphertext.toString(Ar),parse(t){const e=Ar.parse(t);return oa.create({ciphertext:e})}};var Cc={lib:{Base:_r,WordArray:Ir,BufferedBlockAlgorithm:$r,Hasher:Lr,Cipher:Yr,StreamCipher:qr,BlockCipherMode:Qr,BlockCipher:ia,CipherParams:oa,SerializableCipher:sa,PasswordBasedCipher:aa},x64:{Word:Vr,WordArray:Fr},enc:{Hex:Ar,Latin1:Nr,Utf8:Or,Utf16:da,Utf16BE:ca,Utf16LE:ha,Base64:Rr,Base64url:ua},algo:{HMAC:Dr,MD5:Gr,SHA1:va,SHA224:Ta,SHA256:ka,SHA384:Da,SHA512:Oa,SHA3:Wa,RIPEMD160:rl,PBKDF2:cl,EvpKDF:Jr,AES:kl,DES:$l,TripleDES:Dl,Rabbit:Ul,RabbitLegacy:Kl,RC4:Yl,RC4Drop:Ql,Blowfish:rc},mode:{CBC:ta,CFB:cc,CTR:dc,CTRGladman:uc,ECB:pc,OFB:vc},pad:{Pkcs7:ea,AnsiX923:fc,Iso10126:gc,Iso97971:wc,NoPadding:yc,ZeroPadding:mc},format:{OpenSSL:na,Hex:bc},kdf:{OpenSSL:ra},MD5:Kr,HmacMD5:Zr,SHA1:fa,HmacSHA1:ga,SHA224:_a,HmacSHA224:Ia,SHA256:Sa,HmacSHA256:Ma,SHA384:Pa,HmacSHA384:Va,SHA512:$a,HmacSHA512:La,SHA3:Ga,HmacSHA3:Ka,RIPEMD160:al,HmacRIPEMD160:ll,PBKDF2:(t,e,i)=>cl.create(i).compute(t,e),EvpKDF:(t,e,i)=>Jr.create(i).compute(t,e),AES:Sl,DES:Ll,TripleDES:Pl,Rabbit:zl,RabbitLegacy:Zl,RC4:ql,RC4Drop:Xl,Blowfish:ac};const xc=(t,e=0)=>{try{let i=3735928559^e,o=1103547991^e;for(let e,n=0;n<t.length;n++)e=t.charCodeAt(n),i=Math.imul(i^e,2654435761),o=Math.imul(o^e,1597334677);return i=Math.imul(i^i>>>16,2246822507)^Math.imul(o^o>>>13,3266489909),o=Math.imul(o^o>>>16,2246822507)^Math.imul(i^i>>>13,3266489909),4294967296*(2097151&o)+(i>>>0)}catch(t){return console.warn("Error in cyrb53: ",t),Zc("Error in cyrb53: ",t),0}},Ec=t=>{try{return"object"!=typeof t?Object.assign({},...Object.keys(t).sort().map((e=>({[e]:t[e]&&"object"==typeof t[e]?Ec(t[e]):t[e]})))):t}catch(e){return t}},kc=t=>{let e;return e=t.includes("http")?new URL(t):new URL("http://"+t),e.hostname.replace("www.","")},Sc=t=>{try{const e=Ec(t);return xc(JSON.stringify(e))}catch(t){return}};function Mc(t){try{const e=localStorage.getItem(t);if(!e)return null;try{return JSON.parse(e)}catch(t){return e}}catch(t){return console.warn("Error in getLocalStorage: ",t),null}}const Tc=(t,e,i=!1,o="localStorage")=>{try{const n=i?btoa(e):e;"localStorage"===o?localStorage.setItem(t,n):sessionStorage.setItem(t,n)}catch(t){console.warn("Error in setLocalStorage: ",t),Zc("Error in setLocalStorage: ",t)}},_c=(t,e=!1,i="localStorage")=>{try{let o=null;return o="localStorage"===i?localStorage.getItem(t):sessionStorage.getItem(t),o&&e?atob(o):o}catch(t){return console.warn("Error in getLocalStorage: ",t),Zc("Error in getLocalStorage: ",t),null}},Ic=(t,e="localStorage")=>{try{"localStorage"===e?localStorage.removeItem(t):sessionStorage.removeItem(t)}catch(t){console.warn("Error in removeLocalStorageData: ",t),Zc("Error in removeLocalStorageData: ",t)}},Ac=(...t)=>{if(t)switch(t.length){case 1:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1))`;case 2:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1)) calc(${t[1]}rem * var(--velt-base-rem-unit, 1))`;case 3:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1)) calc(${t[1]}rem * var(--velt-base-rem-unit, 1))
1544
1544
  calc(${t[2]}rem * var(--velt-base-rem-unit, 1))`;case 4:return a`calc(${t[0]}rem * var(--velt-base-rem-unit, 1)) calc(${t[1]}rem * var(--velt-base-rem-unit, 1))
1545
- calc(${t[2]}rem * var(--velt-base-rem-unit, 1)) calc(${t[3]}rem * var(--velt-base-rem-unit, 1))`}return a`0`},Nc=(t,e,i)=>{try{const o=Cc.enc.Utf8.parse(e),n=Cc.enc.Utf8.parse(i);return Cc.AES.encrypt(Cc.enc.Utf8.parse(t),o,{keySize:32,iv:n,mode:Cc.mode.CBC,padding:Cc.pad.Pkcs7}).toString()}catch(e){return console.warn("Error in encrypt: ",e),Gc("Error in encrypt: ",e),t}},Oc=(t,e,i)=>{try{const o=Cc.enc.Utf8.parse(e),n=Cc.enc.Utf8.parse(i);return Cc.AES.decrypt(t,o,{keySize:32,iv:n,mode:Cc.mode.CBC,padding:Cc.pad.Pkcs7}).toString(Cc.enc.Utf8)}catch(t){return console.warn("Error in decrypt: ",t),Gc("Error in decrypt: ",t),null}},$c=()=>{try{const t=_c(Dt,!0);if(t){const e=Oc(t,Ee,ke);if(e)return JSON.parse(e);console.warn("Error in getUserFromToken: ","Invalid token."),Ic(Dt)}else{const t=_c($t,!0);if(t)return Lc(),JSON.parse(t)}return null}catch(t){return console.warn("Error in getUserFromToken: ",t),Gc("Error in getUserFromToken: ",t),null}},Lc=()=>{try{const t=_c($t,!0);if(t){const e=Nc(t,Ee,ke);Tc(Dt,e,!0)}Ic($t)}catch(t){console.warn("Error in moveSnippylyUserToST: ",t),Gc("Error in moveSnippylyUserToST: ",t)}},Dc=(t=!0,e)=>{try{const i=_c(Pt,!0);if(i){const t=Oc(i,Ee,ke);return t?JSON.parse(t):null}if(t){const t=ye,i=t[Math.floor(Math.random()*t.length)],o=i.name,n=i.photoUrl,s={name:o,email:"guest@usesuperflow.com",userId:Math.floor(1e9*Math.random())+"",photoUrl:n,isGuest:!0,organizationId:e},r=JSON.stringify(s),a=Nc(r,Ee,ke);return Tc(Pt,a,!0),s}return null}catch(t){return console.warn("Error in getGuestUser: ",t),Gc("Error in getGuestUser: ",t),null}},Pc=(t,e)=>{try{return Object.prototype.toString.call(t)===Object.prototype.toString.call(e)&&("[object Object]"===Object.prototype.toString.call(t)||"[object Array]"===Object.prototype.toString.call(t)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every((i=>Pc(t[i],e[i]))):t===e)}catch(t){return console.error("Error in deepCompare: ",t),!1}},Vc=lo({apiKey:"AIzaSyAzcW2n1JhY_zhkXmuFcwe550AkwmYeJ0w",projectId:"snipply-sdk-staging",messagingSenderId:"877538579326",appId:"1:877538579326:web:f793f73f2b7dc770c4992f"}),Fc=function(t=co(),e=Ao){const i=oo(Ke(t),So).getImmediate({identifier:e}),o=(t=>{const e=Le(t);if(!e)return;const i=e.lastIndexOf(":");if(i<=0||i+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const o=parseInt(e.substring(i+1),10);return"["===e[0]?[e.substring(1,i-1),o]:[e.substring(0,i),o]})("functions");return o&&function(t,e,i){!function(t,e,i){t.emulatorOrigin=`http://${e}:${i}`}(Ke(t),e,i)}(i,...o),i}(Vc);let jc,Rc={sourcePlatform:"superflowToolbar"},Uc={};const zc=()=>new Promise(((t,e)=>{const i=Er(Vc).onAuthStateChanged((o=>{i(),o?t(o):e("No user is currently signed in.")}),e)})),Bc=(t={})=>{Rc={...Rc,...t}},Hc=t=>{jc=t},Wc=t=>{var e,i,o,n,s,r,a,l,c,d,h,u;const p={properties:{apiKey:null!==(e=null==Rc?void 0:Rc.apiKey)&&void 0!==e?e:"",name:null!==(i=null==t?void 0:t.name)&&void 0!==i?i:"",firstName:(null==t?void 0:t.name)?null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.split(" ")[0]:"",lastName:(null==t?void 0:t.name)?null===(n=null==t?void 0:t.name)||void 0===n?void 0:n.split(" ")[1]:"",email:null!==(s=null==t?void 0:t.email)&&void 0!==s?s:"",clientUserId:null!==(r=null==t?void 0:t.userId)&&void 0!==r?r:"",snippylyUserId:null!==(a=null==t?void 0:t.userSnippylyId)&&void 0!==a?a:"",groupId:null!==(l=null==t?void 0:t.groupId)&&void 0!==l?l:"",isOwner:"",plan:"",sdkVersion:null!==(c=null==Rc?void 0:Rc.sdkVersion)&&void 0!==c?c:"",sdkType:null!==(d=null==Rc?void 0:Rc.sdkType)&&void 0!==d?d:"",sourcePlatform:null!==(h=null==Rc?void 0:Rc.sourcePlatform)&&void 0!==h?h:"",website:null===(u=null===window||void 0===window?void 0:window.location)||void 0===u?void 0:u.href},context:{userAgent:null===navigator||void 0===navigator?void 0:navigator.userAgent},userId:null==t?void 0:t.userSnippylyId,sf:!0};Zc("identify",p)},Gc=(t,e,i={})=>{const o={error:t,message:(null==e?void 0:e.message)||e||t,...i};Kc("error",o)},Kc=(t,e={},i=!0)=>{try{if(null==jc?void 0:jc.userSnippylyId){e=i?{...Rc,...e}:e,e={...e};const o={userId:null==jc?void 0:jc.userSnippylyId,event:t,properties:e,sf:!0};Zc("track",o)}else console.warn("Untracked event: ",t,e)}catch(t){console.warn("Error in trackEvent: ",t)}},Zc=(t,e)=>{try{Fo(Fc,Se,{timeout:12e5})({type:t,data:e})}catch(t){console.warn("Error in setAnalytics: ",t)}},Jc=async(t,e)=>{try{const i=Fo(Fc,Me,{timeout:12e5});await i({eventType:"checkDomainWhitelisted",apiKey:t,projectId:e})}catch(t){console.warn("Error in checkDomainWhitelisted: ",t)}},Yc=async(t,e,i,o)=>{try{Sr("[Superflow][iam] request",{eventType:"iam",apiKey:t,projectId:e,email:i,userId:o});const n=Fo(Fc,Me,{timeout:12e5}),s=await n({eventType:"iam",apiKey:t,projectId:e,email:i,userId:o});return Sr("[Superflow][iam] response",null==s?void 0:s.data),null==s?void 0:s.data}catch(t){return console.warn("Error in iam: ",t),null}},qc=async(t,e)=>{var i;try{const o=Fo(Fc,Me,{timeout:12e5}),n=await o({eventType:"getProjectConfig",apiKey:t,projectId:e});return null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.data}catch(t){return console.warn("Error in getProjectConfig: ",t),null}},Qc=async(t,e,i)=>{var o;try{const n=Fo(Fc,Me,{timeout:12e5}),s=await n({eventType:"validatePassword",apiKey:t,projectId:e,password:i});return null===(o=null==s?void 0:s.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in validatePassword: ",t),null}},Xc=async(t,e,i)=>{var o;try{const n=Fo(Fc,Me,{timeout:12e5}),s=await n({eventType:"checkToolbarEnabled",apiKey:t,projectId:e,url:i});return null===(o=null==s?void 0:s.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}},td=async t=>{try{const e=Fo(Fc,Me,{timeout:12e5}),i=await e({eventType:"getCustomerMetadata",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getCustomerMetadata: ",t),null}},ed=async t=>{try{const e=Fo(Fc,Me,{timeout:12e5}),i=await e({eventType:"customStatus",subEventType:"getOrgStatuses",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getOrgStatuses: ",t),null}},id=async(t,e,i)=>{var o,n;try{const s=Fo(Fc,Me,{timeout:12e5}),r=await s({eventType:"generateSuperflowAuthToken",apiKey:t,userId:e,userProperties:i});return null===(n=null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.token}catch(t){return console.warn("Error in generateSuperflowAuthToken: ",t),null}},od=async(t,e,i,o,n)=>{try{const s=Fo(Fc,Me,{timeout:12e5}),r=await s({eventType:"userMigration",apiKey:t,projectId:e,oldUser:i,newUser:o,deleteGuestUserFlag:n});return null==r?void 0:r.data}catch(t){return console.warn("Error in usermigration: ",t),null}},nd=t=>Fo(Fc,Me,{timeout:12e5})({eventType:"customLoginEnabled",apiKey:t}),sd=async t=>{var e;try{const i=Fo(Fc,Me,{timeout:12e5}),o=await i({eventType:"saml",samlEventType:"getPublicConfig",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.publicConfig}catch(t){return console.warn("Error in getSamlPublicConfig: ",t),null}},rd=async(t,e)=>{var i;try{const o=await zc();if(!o)throw new Error("User must be authenticated to create admin users");const n=window.Velt?await(null===(i=window.Velt)||void 0===i?void 0:i.getUser()):null,s=(null==o?void 0:o.displayName)||(null==n?void 0:n.name)||(null==n?void 0:n.email)||"",r=Fo(Fc,Me,{timeout:12e5}),a=await r({eventType:"createAdminUser",apiKey:t,users:e,inviterName:s});return null==a?void 0:a.data}catch(t){throw console.warn("Error in createAdminUser: ",t),t}},ad=async(t,e,i)=>{var o;try{const n=await zc();if(!n)throw new Error("User must be authenticated to create project users");const s=window.Velt?await(null===(o=window.Velt)||void 0===o?void 0:o.getUser()):null,r=(null==n?void 0:n.displayName)||(null==s?void 0:s.name)||(null==s?void 0:s.email)||"",a=Fo(Fc,Me,{timeout:12e5}),l=await a({eventType:"createProjectUser",apiKey:t,documentId:e,users:i,inviterName:r});return null==l?void 0:l.data}catch(t){throw console.warn("Error in createProjectUser: ",t),t}},ld=async(t,e,i,o,n)=>{try{const s=Fo(Fc,Me,{timeout:12e5}),r=await s({eventType:"checkDocumentUserAndCreate",apiKey:t,documentId:e,userId:i,name:o,email:n});return null==r?void 0:r.data}catch(t){throw console.warn("Error in checkDocumentUserAndCreate: ",t),t}};var cd;!function(t){t.WorkspaceUserSeats="workspaceUserSeats",t.Storage="storage",t.Agents="agents",t.WorkspacePrivateComments="privateComments"}(cd||(cd={}));const dd=async t=>{var e;try{const i=Fo(Fc,Me,{timeout:12e5}),o=await i({eventType:"getFeatureAccess",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.data}catch(t){return console.warn("Error in getFeatureAccess: ",t),null}},hd=async(t,e,i,o,n)=>{try{const s=Fo(Fc,Me,{timeout:12e5}),r=await s({eventType:"acceptAgentSuggestion",apiKey:t,organizationId:e,documentId:i,annotationId:o,user:n});return null==r?void 0:r.data}catch(t){return console.warn("Error in acceptAgentSuggestion: ",t),Gc("Error in acceptAgentSuggestion: ",t),null}},ud=async(t,e,i,o,n)=>{try{const s=Fo(Fc,Me,{timeout:12e5}),r=await s({eventType:"declineAgentSuggestion",apiKey:t,organizationId:e,documentId:i,annotationId:o,...n?{user:n}:{}});return null==r?void 0:r.data}catch(t){return console.warn("Error in declineAgentSuggestion: ",t),Gc("Error in declineAgentSuggestion: ",t),null}};var pd=Object.freeze({__proto__:null,get BillableMetricTypes(){return cd},acceptAgentSuggestion:hd,checkDocumentUserAndCreate:ld,checkDomainWhitelisted:Jc,checkGuestMode:async(t,e)=>{try{const i=Fo(Fc,Me,{timeout:12e5}),o=await i({eventType:"checkGuestMode",apiKey:t,projectId:e});return null==o?void 0:o.data}catch(t){return console.warn("Error in checkGuestMode: ",t),null}},checkToolbarEnabled:Xc,createAdminUser:rd,createProjectUser:ad,declineAgentSuggestion:ud,detectCustomLoginEnabled:nd,generateSuperflowAuthToken:id,getAgents:async t=>{var e,i,o;try{const n=Fo(Fc,Me,{timeout:12e5}),s=await n({eventType:"getAgents",apiKey:t});return null!==(o=null===(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.data)||void 0===i?void 0:i.agents)&&void 0!==o?o:[]}catch(t){return console.warn("Error in getAgents: ",t),[]}},getAnonymousId:()=>{let t=localStorage.getItem("sAnonymousId");if(!t){const e=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);t=xc(e)+"",localStorage.setItem("sAnonymousId",t)}return t},getCurrentUser:zc,getCurrentUserClaims:async()=>{try{const t=await zc(),e=await(null==t?void 0:t.getIdTokenResult());return(null==e?void 0:e.claims)||{}}catch(t){return console.warn("Error in getCurrentUserClaims: ",t),{}}},getCustomerMetadata:td,getFeatureAccess:dd,getOrgStatuses:ed,getProjectConfig:qc,getSamlPublicConfig:sd,iam:Yc,identifyTraits:t=>{const e=JSON.parse(JSON.stringify(Uc||{}));Uc={...Uc,...t},Pc(e,Uc)||Zc("identify",{properties:Uc})},setDefaultProperties:Bc,setUser:Hc,trackErrorEvent:Gc,trackEvent:Kc,trackIdentifyEvent:Wc,userMigration:od,validatePassword:Qc});navigator.language.split("-")[0];const vd=new Map;vd.set("es",{Comment:"Comentario","Commenting is disabled. Contact admin.":"Los comentarios están deshabilitados. Póngase en contacto con el administrador.","Arrow feature is disabled. Contact admin.":"La función de flecha está desactivada. Póngase en contacto con el administrador.","All Comments":"Todos los comentarios","Signing In":"Iniciando sesión","Sign in again!":"¡Inicia sesión de nuevo!","Sign in to comment":"Inicia sesión para comentar",Superflow:"Superflujo","Sign in to comment on this page.":"Inicia sesión para comentar en esta página.","Join Community":"Únete a la comunidad","Open in Mobile":"Abrir en móvil","Exit Review Mode":"Salir del modo de revisión","Sign in":"Iniciar sesión","Try Superflow using the toolbar below.":"Prueba Superflujo usando la barra de herramientas de abajo.","Get ready to drop your first comment!":"¡Prepárate para dejar tu primer comentario!","But before you do that, you definitely deserve a high five!":"¡Pero antes de eso, definitivamente mereces un choca esos cinco!",Done:"Hecho","Sign in on the toolbar below and add":"Inicia sesión en la barra de herramientas de abajo y añade","comments on the design flaws.":"comentarios sobre los defectos de diseño.","Click to add comments on this page.":"Haz clic para añadir comentarios en esta página.",Ok:"Ok",Arrow:"Flecha","Live Huddle":"Encuentro en vivo",Recording:"Grabación","Open Comments":"Abrir comentarios",Views:"Vistas",Internal:"Interno",External:"Externo",All:"Todos",Upgrade:"Actualizar","You don't have access.":"No tienes acceso.","Reach out to the admin of this project.":"Contacta al administrador de este proyecto.","Your plan has expired! Please upgrade.":"¡Tu plan ha caducado! Por favor, actualiza.","Your plan has expired!":"¡Tu plan ha caducado!","Please contact the admin.":"Por favor, contacta al administrador.",Share:"Compartir","Add comments & recordings on this page.":"Añade comentarios y grabaciones en esta página.","Learn more":"Aprender más","View project":"Ver proyecto","Sign Out":"Cerrar sesión","You’re a SuperFlow installation wizard!":"¡Eres un mago de la instalación de Superflujo!",Next:"Siguiente"}),vd.set("fr",{Comment:"Commentaire","Commenting is disabled. Contact admin.":"Les commentaires sont désactivés. Contactez l'administrateur.","Arrow feature is disabled. Contact admin.":"La fonction flèche est désactivée. Contactez l'administrateur.","All Comments":"Tous les commentaires","Signing In":"Connexion en cours","Sign in again!":"Connectez-vous à nouveau!","Sign in to comment":"Connectez-vous pour commenter",Superflow:"Superflux","Sign in to comment on this page.":"Connectez-vous pour commenter sur cette page.","Join Community":"Rejoindre la communauté","Open in Mobile":"Ouvrir sur mobile","Exit Review Mode":"Quitter le mode de révision","Sign in":"Se connecter","Try Superflow using the toolbar below.":"Essayez Superflux en utilisant la barre d'outils ci-dessous.","Get ready to drop your first comment!":"Préparez-vous à laisser votre premier commentaire!","But before you do that, you definitely deserve a high five!":"Mais avant cela, vous méritez certainement un tope-là!",Done:"Terminé","Sign in on the toolbar below and add":"Connectez-vous sur la barre d'outils ci-dessous et ajoutez","comments on the design flaws.":"des commentaires sur les défauts de conception.","Click to add comments on this page.":"Cliquez pour ajouter des commentaires sur cette page.",Ok:"Ok",Arrow:"Flèche","Live Huddle":"Discussion en direct",Recording:"Enregistrement","Open Comments":"Ouvrir les commentaires",Views:"Vues",Internal:"Interne",External:"Externe",All:"Tous",Upgrade:"Mettre à jour","You don't have access.":"Vous n'avez pas accès.","Reach out to the admin of this project.":"Contactez l'administrateur de ce projet.","Your plan has expired! Please upgrade.":"Votre plan a expiré! Veuillez mettre à jour.","Your plan has expired!":"Votre plan a expiré!","Please contact the admin.":"Veuillez contacter l'administrateur.",Share:"Partager","Add comments & recordings on this page.":"Ajoutez des commentaires et des enregistrements sur cette page.","Learn more":"En savoir plus","View project":"Voir le projet","Sign Out":"Se déconnecter","You’re a SuperFlow installation wizard!":"Vous êtes un sorcier d'installation de Superflux!",Next:"Suivant"}),vd.set("hi",{Comment:"टिप्पणी","Commenting is disabled. Contact admin.":"टिप्पणी करना अक्षम है. व्यवस्थापक से संपर्क करें.","Arrow feature is disabled. Contact admin.":"तीर सुविधा अक्षम है. व्यवस्थापक से संपर्क करें.","All Comments":"सभी टिप्पणियाँ","Signing In":"साइन इन कर रहा है","Sign in again!":"फिर से साइन इन करें!","Sign in to comment":"टिप्पणी करने के लिए साइन इन करें",Superflow:"सुपरफ्लो","Sign in to comment on this page.":"इस पृष्ठ पर टिप्पणी करने के लिए साइन इन करें।","Join Community":"समुदाय में शामिल हों","Open in Mobile":"मोबाइल में खोलें","Exit Review Mode":"समीक्षा मोड से बाहर निकलें","Sign in":"साइन इन करें","Try Superflow using the toolbar below.":"टूलबार का उपयोग करके सुपरफ्लो का प्रयास करें।","Get ready to drop your first comment!":"अपनी पहली टिप्पणी डालने के लिए तैयार हो जाओ!","But before you do that, you definitely deserve a high five!":"लेकिन इससे पहले, आपको निश्चित रूप से एक उच्च पांच मिलता है!",Done:"किया हुआ","Sign in on the toolbar below and add":"टूलबार पर साइन इन करें और जोड़ें","comments on the design flaws.":"डिज़ाइन की खामियों पर टिप्पणियाँ।","Click to add comments on this page.":"इस पृष्ठ पर टिप्पणियाँ जोड़ने के लिए क्लिक करें।",Ok:"ठीक",Arrow:"तीर","Live Huddle":"लाइव हडल",Recording:"रेकॉर्डिंग","Open Comments":"टिप्पणियाँ खोलें",Views:"दृश्य",Internal:"आंतरिक",External:"बाहरी",All:"सब",Upgrade:"अपग्रेड","You don't have access.":"आपके पास पहुंच नहीं है।","Reach out to the admin of this project.":"इस परियोजना के व्यवस्थापक से संपर्क करें।","Your plan has expired! Please upgrade.":"आपकी योजना समाप्त हो गई है! कृपया अपग्रेड करें।","Your plan has expired!":"आपकी योजना समाप्त हो गई है!","Please contact the admin.":"कृपया व्यवस्थापक से संपर्क करें।",Share:"शेयर","Add comments & recordings on this page.":"इस पृष्ठ पर टिप्पणियाँ और रिकॉर्डिंग जोड़ें।","Learn more":"और अधिक जानें","View project":"परियोजना देखें","Sign Out":"साइन आउट","You’re a SuperFlow installation wizard!":"आप एक सुपरफ्लो स्थापना विज़ार्ड हैं!",Next:"आगामी"}),vd.set("it",{Comment:"Commento","Commenting is disabled. Contact admin.":"I commenti sono disabilitati. Contatta l'amministratore.","Arrow feature is disabled. Contact admin.":"La funzione freccia è disabilitata. Contatta l'amministratore.","All Comments":"Tutti i commenti","Signing In":"Accesso in corso","Sign in again!":"Accedi di nuovo!","Sign in to comment":"Accedi per commentare",Superflow:"Superflusso","Sign in to comment on this page.":"Accedi per commentare su questa pagina.","Join Community":"Unisciti alla comunità","Open in Mobile":"Apri su mobile","Exit Review Mode":"Esci dalla modalità di revisione","Sign in":"Accedi","Try Superflow using the toolbar below.":"Prova Superflusso utilizzando la barra degli strumenti qui sotto.","Get ready to drop your first comment!":"Preparati a lasciare il tuo primo commento!","But before you do that, you definitely deserve a high five!":"Ma prima di farlo, meriti sicuramente un cinque in alto!",Done:"Fatto","Sign in on the toolbar below and add":"Accedi alla barra degli strumenti qui sotto e aggiungi","comments on the design flaws.":"commenti sui difetti di progettazione.","Click to add comments on this page.":"Clicca per aggiungere commenti su questa pagina.",Ok:"Ok",Arrow:"Freccia","Live Huddle":"Riunione dal vivo",Recording:"Registrazione","Open Comments":"Apri commenti",Views:"Visualizzazioni",Internal:"Interno",External:"Esterno",All:"Tutti",Upgrade:"Aggiorna","You don't have access.":"Non hai accesso.","Reach out to the admin of this project.":"Contatta l'amministratore di questo progetto.","Your plan has expired! Please upgrade.":"Il tuo piano è scaduto! Si prega di aggiornare.","Your plan has expired!":"Il tuo piano è scaduto!","Please contact the admin.":"Si prega di contattare l'amministratore.",Share:"Condividi","Add comments & recordings on this page.":"Aggiungi commenti e registrazioni su questa pagina.","Learn more":"Scopri di più","View project":"Visualizza progetto","Sign Out":"Disconnetti","You’re a SuperFlow installation wizard!":"Sei un mago dell'installazione di Superflusso!",Next:"Avanti"}),vd.set("ru",{Comment:"Комментарий","Commenting is disabled. Contact admin.":"Комментирование отключено. Свяжитесь с админом.","Arrow feature is disabled. Contact admin.":"Функция стрелки отключена. Свяжитесь с администратором.","All Comments":"Все комментарии","Signing In":"Вход в систему","Sign in again!":"Войдите снова!","Sign in to comment":"Войдите, чтобы оставить комментарий",Superflow:"Суперпоток","Sign in to comment on this page.":"Войдите, чтобы оставить комментарий на этой странице.","Join Community":"Присоединиться к сообществу","Open in Mobile":"Открыть на мобильном","Exit Review Mode":"Выйти из режима обзора","Sign in":"Войти","Try Superflow using the toolbar below.":"Попробуйте Суперпоток, используя панель инструментов ниже.","Get ready to drop your first comment!":"Приготовьтесь оставить свой первый комментарий!","But before you do that, you definitely deserve a high five!":"Но перед этим вы определенно заслуживаете пять!",Done:"Сделано","Sign in on the toolbar below and add":"Войдите на панели инструментов ниже и добавьте","comments on the design flaws.":"комментарии об ошибках в дизайне.","Click to add comments on this page.":"Нажмите, чтобы добавить комментарии на этой странице.",Ok:"Ок",Arrow:"Стрелка","Live Huddle":"Прямой сбор",Recording:"Запись","Open Comments":"Открыть комментарии",Views:"Просмотры",Internal:"Внутренний",External:"Внешний",All:"Все",Upgrade:"Обновить","You don't have access.":"У вас нет доступа.","Reach out to the admin of this project.":"Обратитесь к администратору этого проекта.","Your plan has expired! Please upgrade.":"Ваш план истек! Пожалуйста, обновите.","Your plan has expired!":"Ваш план истек!","Please contact the admin.":"Пожалуйста, свяжитесь с администратором.",Share:"Поделиться","Add comments & recordings on this page.":"Добавьте комментарии и записи на этой странице.","Learn more":"Узнать больше","View project":"Посмотреть проект","Sign Out":"Выйти","You’re a SuperFlow installation wizard!":"Вы волшебник установки Суперпотока!",Next:"Далее"}),vd.set("uk",{Comment:"Коментар","Commenting is disabled. Contact admin.":"Коментування вимкнено. Зв'язатися з адміном.","Arrow feature is disabled. Contact admin.":"Функція стрілки вимкнена. Зв'язатися з адміном.","All Comments":"Всі коментарі","Signing In":"Увійти в систему","Sign in again!":"Увійдіть знову!","Sign in to comment":"Увійдіть, щоб залишити коментар",Superflow:"Суперпотік","Sign in to comment on this page.":"Увійдіть, щоб залишити коментар на цій сторінці.","Join Community":"Приєднатися до спільноти","Open in Mobile":"Відкрити на мобільному","Exit Review Mode":"Вийти з режиму огляду","Sign in":"Увійти","Try Superflow using the toolbar below.":"Спробуйте Суперпотік, використовуючи панель інструментів нижче.","Get ready to drop your first comment!":"Приготуйтеся залишити свій перший коментар!","But before you do that, you definitely deserve a high five!":"Але перед тим, як ви це зробите, ви точно заслуговуєте на високу п'ятірку!",Done:"Готово","Sign in on the toolbar below and add":"Увійдіть в панель інструментів нижче і додайте","comments on the design flaws.":"коментарі про помилки в дизайні.","Click to add comments on this page.":"Натисніть, щоб додати коментарі на цій сторінці.",Ok:"Добре",Arrow:"Стрілка","Live Huddle":"Пряма група",Recording:"Запис","Open Comments":"Відкрити коментарі",Views:"Перегляди",Internal:"Внутрішній",External:"Зовнішній",All:"Все",Upgrade:"Оновити","You don't have access.":"У вас немає доступу.","Reach out to the admin of this project.":"Зверніться до адміністратора цього проекту.","Your plan has expired! Please upgrade.":"Термін дії вашого плану закінчився! Будь ласка, оновіть.","Your plan has expired!":"Термін дії вашого плану закінчився!","Please contact the admin.":"Будь ласка, зв'яжіться з адміністратором.",Share:"Поділитися","Add comments & recordings on this page.":"Додайте коментарі та записи на цій сторінці.","Learn more":"Дізнатися більше","View project":"Переглянути проект","Sign Out":"Вийти","You’re a SuperFlow installation wizard!":"Ви чарівник встановлення Суперпотоку!",Next:"Далі"});const fd=t=>{try{return t}catch(e){return t}},gd=a`
1545
+ calc(${t[2]}rem * var(--velt-base-rem-unit, 1)) calc(${t[3]}rem * var(--velt-base-rem-unit, 1))`}return a`0`},Nc=(t,e,i)=>{try{const o=Cc.enc.Utf8.parse(e),n=Cc.enc.Utf8.parse(i);return Cc.AES.encrypt(Cc.enc.Utf8.parse(t),o,{keySize:32,iv:n,mode:Cc.mode.CBC,padding:Cc.pad.Pkcs7}).toString()}catch(e){return console.warn("Error in encrypt: ",e),Zc("Error in encrypt: ",e),t}},Oc=(t,e,i)=>{try{const o=Cc.enc.Utf8.parse(e),n=Cc.enc.Utf8.parse(i);return Cc.AES.decrypt(t,o,{keySize:32,iv:n,mode:Cc.mode.CBC,padding:Cc.pad.Pkcs7}).toString(Cc.enc.Utf8)}catch(t){return console.warn("Error in decrypt: ",t),Zc("Error in decrypt: ",t),null}},$c=()=>{try{const t=_c(Dt,!0);if(t){const e=Oc(t,Ee,ke);if(e)return JSON.parse(e);console.warn("Error in getUserFromToken: ","Invalid token."),Ic(Dt)}else{const t=_c($t,!0);if(t)return Lc(),JSON.parse(t)}return null}catch(t){return console.warn("Error in getUserFromToken: ",t),Zc("Error in getUserFromToken: ",t),null}},Lc=()=>{try{const t=_c($t,!0);if(t){const e=Nc(t,Ee,ke);Tc(Dt,e,!0)}Ic($t)}catch(t){console.warn("Error in moveSnippylyUserToST: ",t),Zc("Error in moveSnippylyUserToST: ",t)}},Dc=(t=!0,e)=>{try{const i=_c(Pt,!0);if(i){const t=Oc(i,Ee,ke);return t?JSON.parse(t):null}if(t){const t=ye,i=t[Math.floor(Math.random()*t.length)],o=i.name,n=i.photoUrl,s={name:o,email:"guest@usesuperflow.com",userId:Math.floor(1e9*Math.random())+"",photoUrl:n,isGuest:!0,organizationId:e},r=JSON.stringify(s),a=Nc(r,Ee,ke);return Tc(Pt,a,!0),s}return null}catch(t){return console.warn("Error in getGuestUser: ",t),Zc("Error in getGuestUser: ",t),null}},Pc=(t,e)=>{try{return Object.prototype.toString.call(t)===Object.prototype.toString.call(e)&&("[object Object]"===Object.prototype.toString.call(t)||"[object Array]"===Object.prototype.toString.call(t)?Object.keys(t).length===Object.keys(e).length&&Object.keys(t).every((i=>Pc(t[i],e[i]))):t===e)}catch(t){return console.error("Error in deepCompare: ",t),!1}},Vc=["area","arrow","audioHuddle","cursor","huddle","liveStateSync","presence","tag","recorder","comment"],Fc=(t,e)=>{try{return!e&&!(t=>{var e;try{return!t||"not-found"!==t.status&&("error"===t.status||!1!==(null===(e=t.config)||void 0===e?void 0:e.isValidProject))}catch(t){return!0}})(t)}catch(t){return!1}},jc=lo({apiKey:"AIzaSyAzcW2n1JhY_zhkXmuFcwe550AkwmYeJ0w",projectId:"snipply-sdk-staging",messagingSenderId:"877538579326",appId:"1:877538579326:web:f793f73f2b7dc770c4992f"}),Rc=function(t=co(),e=Ao){const i=oo(Ke(t),So).getImmediate({identifier:e}),o=(t=>{const e=Le(t);if(!e)return;const i=e.lastIndexOf(":");if(i<=0||i+1===e.length)throw new Error(`Invalid host ${e} with no separate hostname and port!`);const o=parseInt(e.substring(i+1),10);return"["===e[0]?[e.substring(1,i-1),o]:[e.substring(0,i),o]})("functions");return o&&function(t,e,i){!function(t,e,i){t.emulatorOrigin=`http://${e}:${i}`}(Ke(t),e,i)}(i,...o),i}(jc);let Uc,zc={sourcePlatform:"superflowToolbar"},Bc={};const Hc=()=>new Promise(((t,e)=>{const i=Er(jc).onAuthStateChanged((o=>{i(),o?t(o):e("No user is currently signed in.")}),e)})),Wc=(t={})=>{zc={...zc,...t}},Gc=t=>{Uc=t},Kc=t=>{var e,i,o,n,s,r,a,l,c,d,h,u;const p={properties:{apiKey:null!==(e=null==zc?void 0:zc.apiKey)&&void 0!==e?e:"",name:null!==(i=null==t?void 0:t.name)&&void 0!==i?i:"",firstName:(null==t?void 0:t.name)?null===(o=null==t?void 0:t.name)||void 0===o?void 0:o.split(" ")[0]:"",lastName:(null==t?void 0:t.name)?null===(n=null==t?void 0:t.name)||void 0===n?void 0:n.split(" ")[1]:"",email:null!==(s=null==t?void 0:t.email)&&void 0!==s?s:"",clientUserId:null!==(r=null==t?void 0:t.userId)&&void 0!==r?r:"",snippylyUserId:null!==(a=null==t?void 0:t.userSnippylyId)&&void 0!==a?a:"",groupId:null!==(l=null==t?void 0:t.groupId)&&void 0!==l?l:"",isOwner:"",plan:"",sdkVersion:null!==(c=null==zc?void 0:zc.sdkVersion)&&void 0!==c?c:"",sdkType:null!==(d=null==zc?void 0:zc.sdkType)&&void 0!==d?d:"",sourcePlatform:null!==(h=null==zc?void 0:zc.sourcePlatform)&&void 0!==h?h:"",website:null===(u=null===window||void 0===window?void 0:window.location)||void 0===u?void 0:u.href},context:{userAgent:null===navigator||void 0===navigator?void 0:navigator.userAgent},userId:null==t?void 0:t.userSnippylyId,sf:!0};Yc("identify",p)},Zc=(t,e,i={})=>{const o={error:t,message:(null==e?void 0:e.message)||e||t,...i};Jc("error",o)},Jc=(t,e={},i=!0)=>{try{if(null==Uc?void 0:Uc.userSnippylyId){e=i?{...zc,...e}:e,e={...e};const o={userId:null==Uc?void 0:Uc.userSnippylyId,event:t,properties:e,sf:!0};Yc("track",o)}else console.warn("Untracked event: ",t,e)}catch(t){console.warn("Error in trackEvent: ",t)}},Yc=(t,e)=>{try{Fo(Rc,Se,{timeout:12e5})({type:t,data:e})}catch(t){console.warn("Error in setAnalytics: ",t)}},qc=async(t,e)=>{try{const i=Fo(Rc,Me,{timeout:12e5});await i({eventType:"checkDomainWhitelisted",apiKey:t,projectId:e})}catch(t){console.warn("Error in checkDomainWhitelisted: ",t)}},Qc=async(t,e,i,o)=>{try{Sr("[Superflow][iam] request",{eventType:"iam",apiKey:t,projectId:e,email:i,userId:o});const n=Fo(Rc,Me,{timeout:12e5}),s=await n({eventType:"iam",apiKey:t,projectId:e,email:i,userId:o});return Sr("[Superflow][iam] response",null==s?void 0:s.data),null==s?void 0:s.data}catch(t){return console.warn("Error in iam: ",t),null}},Xc=async(t,e)=>{var i;try{const o=Fo(Rc,Me,{timeout:12e5}),n=await o({eventType:"getProjectConfig",apiKey:t,projectId:e});return{status:"ok",config:null===(i=null==n?void 0:n.data)||void 0===i?void 0:i.data}}catch(t){return(t=>{try{const e="string"==typeof(null==t?void 0:t.code)?t.code.toLowerCase():"";return"functions/not-found"===e||"not-found"===e}catch(t){return!1}})(t)?(console.warn("getProjectConfig: project document not found for projectId: ",e),{status:"not-found"}):(console.warn("Error in getProjectConfig: ",t),{status:"error"})}},td=async(t,e,i)=>{var o;try{const n=Fo(Rc,Me,{timeout:12e5}),s=await n({eventType:"validatePassword",apiKey:t,projectId:e,password:i});return null===(o=null==s?void 0:s.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in validatePassword: ",t),null}},ed=async(t,e,i)=>{var o;try{const n=Fo(Rc,Me,{timeout:12e5}),s=await n({eventType:"checkToolbarEnabled",apiKey:t,projectId:e,url:i});return null===(o=null==s?void 0:s.data)||void 0===o?void 0:o.data}catch(t){return console.warn("Error in checkToolbarEnabled: ",t),null}},id=async t=>{try{const e=Fo(Rc,Me,{timeout:12e5}),i=await e({eventType:"getCustomerMetadata",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getCustomerMetadata: ",t),null}},od=async t=>{try{const e=Fo(Rc,Me,{timeout:12e5}),i=await e({eventType:"customStatus",subEventType:"getOrgStatuses",apiKey:t});return null==i?void 0:i.data}catch(t){return console.warn("Error in getOrgStatuses: ",t),null}},nd=async(t,e,i)=>{var o,n;try{const s=Fo(Rc,Me,{timeout:12e5}),r=await s({eventType:"generateSuperflowAuthToken",apiKey:t,userId:e,userProperties:i});return null===(n=null===(o=null==r?void 0:r.data)||void 0===o?void 0:o.data)||void 0===n?void 0:n.token}catch(t){return console.warn("Error in generateSuperflowAuthToken: ",t),null}},sd=async(t,e,i,o,n)=>{try{const s=Fo(Rc,Me,{timeout:12e5}),r=await s({eventType:"userMigration",apiKey:t,projectId:e,oldUser:i,newUser:o,deleteGuestUserFlag:n});return null==r?void 0:r.data}catch(t){return console.warn("Error in usermigration: ",t),null}},rd=t=>Fo(Rc,Me,{timeout:12e5})({eventType:"customLoginEnabled",apiKey:t}),ad=async t=>{var e;try{const i=Fo(Rc,Me,{timeout:12e5}),o=await i({eventType:"saml",samlEventType:"getPublicConfig",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.publicConfig}catch(t){return console.warn("Error in getSamlPublicConfig: ",t),null}},ld=async(t,e)=>{var i;try{const o=await Hc();if(!o)throw new Error("User must be authenticated to create admin users");const n=window.Velt?await(null===(i=window.Velt)||void 0===i?void 0:i.getUser()):null,s=(null==o?void 0:o.displayName)||(null==n?void 0:n.name)||(null==n?void 0:n.email)||"",r=Fo(Rc,Me,{timeout:12e5}),a=await r({eventType:"createAdminUser",apiKey:t,users:e,inviterName:s});return null==a?void 0:a.data}catch(t){throw console.warn("Error in createAdminUser: ",t),t}},cd=async(t,e,i)=>{var o;try{const n=await Hc();if(!n)throw new Error("User must be authenticated to create project users");const s=window.Velt?await(null===(o=window.Velt)||void 0===o?void 0:o.getUser()):null,r=(null==n?void 0:n.displayName)||(null==s?void 0:s.name)||(null==s?void 0:s.email)||"",a=Fo(Rc,Me,{timeout:12e5}),l=await a({eventType:"createProjectUser",apiKey:t,documentId:e,users:i,inviterName:r});return null==l?void 0:l.data}catch(t){throw console.warn("Error in createProjectUser: ",t),t}},dd=async(t,e,i,o,n)=>{try{const s=Fo(Rc,Me,{timeout:12e5}),r=await s({eventType:"checkDocumentUserAndCreate",apiKey:t,documentId:e,userId:i,name:o,email:n});return null==r?void 0:r.data}catch(t){throw console.warn("Error in checkDocumentUserAndCreate: ",t),t}};var hd;!function(t){t.WorkspaceUserSeats="workspaceUserSeats",t.Storage="storage",t.Agents="agents",t.WorkspacePrivateComments="privateComments"}(hd||(hd={}));const ud=async t=>{var e;try{const i=Fo(Rc,Me,{timeout:12e5}),o=await i({eventType:"getFeatureAccess",apiKey:t});return null===(e=null==o?void 0:o.data)||void 0===e?void 0:e.data}catch(t){return console.warn("Error in getFeatureAccess: ",t),null}},pd=async(t,e,i,o,n)=>{try{const s=Fo(Rc,Me,{timeout:12e5}),r=await s({eventType:"acceptAgentSuggestion",apiKey:t,organizationId:e,documentId:i,annotationId:o,user:n});return null==r?void 0:r.data}catch(t){return console.warn("Error in acceptAgentSuggestion: ",t),Zc("Error in acceptAgentSuggestion: ",t),null}},vd=async(t,e,i,o,n)=>{try{const s=Fo(Rc,Me,{timeout:12e5}),r=await s({eventType:"declineAgentSuggestion",apiKey:t,organizationId:e,documentId:i,annotationId:o,...n?{user:n}:{}});return null==r?void 0:r.data}catch(t){return console.warn("Error in declineAgentSuggestion: ",t),Zc("Error in declineAgentSuggestion: ",t),null}};var fd=Object.freeze({__proto__:null,get BillableMetricTypes(){return hd},acceptAgentSuggestion:pd,checkDocumentUserAndCreate:dd,checkDomainWhitelisted:qc,checkGuestMode:async(t,e)=>{try{const i=Fo(Rc,Me,{timeout:12e5}),o=await i({eventType:"checkGuestMode",apiKey:t,projectId:e});return null==o?void 0:o.data}catch(t){return console.warn("Error in checkGuestMode: ",t),null}},checkToolbarEnabled:ed,createAdminUser:ld,createProjectUser:cd,declineAgentSuggestion:vd,detectCustomLoginEnabled:rd,generateSuperflowAuthToken:nd,getAgents:async t=>{var e,i,o;try{const n=Fo(Rc,Me,{timeout:12e5}),s=await n({eventType:"getAgents",apiKey:t});return null!==(o=null===(i=null===(e=null==s?void 0:s.data)||void 0===e?void 0:e.data)||void 0===i?void 0:i.agents)&&void 0!==o?o:[]}catch(t){return console.warn("Error in getAgents: ",t),[]}},getAnonymousId:()=>{let t=localStorage.getItem("sAnonymousId");if(!t){const e=Math.random().toString(36).substring(2,15)+Math.random().toString(36).substring(2,15);t=xc(e)+"",localStorage.setItem("sAnonymousId",t)}return t},getCurrentUser:Hc,getCurrentUserClaims:async()=>{try{const t=await Hc(),e=await(null==t?void 0:t.getIdTokenResult());return(null==e?void 0:e.claims)||{}}catch(t){return console.warn("Error in getCurrentUserClaims: ",t),{}}},getCustomerMetadata:id,getFeatureAccess:ud,getOrgStatuses:od,getProjectConfig:Xc,getSamlPublicConfig:ad,iam:Qc,identifyTraits:t=>{const e=JSON.parse(JSON.stringify(Bc||{}));Bc={...Bc,...t},Pc(e,Bc)||Yc("identify",{properties:Bc})},setDefaultProperties:Wc,setUser:Gc,trackErrorEvent:Zc,trackEvent:Jc,trackIdentifyEvent:Kc,userMigration:sd,validatePassword:td});navigator.language.split("-")[0];const gd=new Map;gd.set("es",{Comment:"Comentario","Commenting is disabled. Contact admin.":"Los comentarios están deshabilitados. Póngase en contacto con el administrador.","Arrow feature is disabled. Contact admin.":"La función de flecha está desactivada. Póngase en contacto con el administrador.","All Comments":"Todos los comentarios","Signing In":"Iniciando sesión","Sign in again!":"¡Inicia sesión de nuevo!","Sign in to comment":"Inicia sesión para comentar",Superflow:"Superflujo","Sign in to comment on this page.":"Inicia sesión para comentar en esta página.","Join Community":"Únete a la comunidad","Open in Mobile":"Abrir en móvil","Exit Review Mode":"Salir del modo de revisión","Sign in":"Iniciar sesión","Try Superflow using the toolbar below.":"Prueba Superflujo usando la barra de herramientas de abajo.","Get ready to drop your first comment!":"¡Prepárate para dejar tu primer comentario!","But before you do that, you definitely deserve a high five!":"¡Pero antes de eso, definitivamente mereces un choca esos cinco!",Done:"Hecho","Sign in on the toolbar below and add":"Inicia sesión en la barra de herramientas de abajo y añade","comments on the design flaws.":"comentarios sobre los defectos de diseño.","Click to add comments on this page.":"Haz clic para añadir comentarios en esta página.",Ok:"Ok",Arrow:"Flecha","Live Huddle":"Encuentro en vivo",Recording:"Grabación","Open Comments":"Abrir comentarios",Views:"Vistas",Internal:"Interno",External:"Externo",All:"Todos",Upgrade:"Actualizar","You don't have access.":"No tienes acceso.","Reach out to the admin of this project.":"Contacta al administrador de este proyecto.","Your plan has expired! Please upgrade.":"¡Tu plan ha caducado! Por favor, actualiza.","Your plan has expired!":"¡Tu plan ha caducado!","Please contact the admin.":"Por favor, contacta al administrador.",Share:"Compartir","Add comments & recordings on this page.":"Añade comentarios y grabaciones en esta página.","Learn more":"Aprender más","View project":"Ver proyecto","Sign Out":"Cerrar sesión","You’re a SuperFlow installation wizard!":"¡Eres un mago de la instalación de Superflujo!",Next:"Siguiente","This workspace is over its plan limits. Comments are paused until the plan is updated.":"Este espacio de trabajo ha superado los límites de su plan. Los comentarios están pausados hasta que se actualice el plan.","Ask your workspace admin to update the plan.":"Pide al administrador de tu espacio de trabajo que actualice el plan.","Limit Reached":"Límite alcanzado","Project not found":"Proyecto no encontrado","This project no longer exists in Superflow. It may have been deleted.":"Este proyecto ya no existe en Superflow. Es posible que haya sido eliminado.","Open Superflow":"Abrir Superflow"}),gd.set("fr",{Comment:"Commentaire","Commenting is disabled. Contact admin.":"Les commentaires sont désactivés. Contactez l'administrateur.","Arrow feature is disabled. Contact admin.":"La fonction flèche est désactivée. Contactez l'administrateur.","All Comments":"Tous les commentaires","Signing In":"Connexion en cours","Sign in again!":"Connectez-vous à nouveau!","Sign in to comment":"Connectez-vous pour commenter",Superflow:"Superflux","Sign in to comment on this page.":"Connectez-vous pour commenter sur cette page.","Join Community":"Rejoindre la communauté","Open in Mobile":"Ouvrir sur mobile","Exit Review Mode":"Quitter le mode de révision","Sign in":"Se connecter","Try Superflow using the toolbar below.":"Essayez Superflux en utilisant la barre d'outils ci-dessous.","Get ready to drop your first comment!":"Préparez-vous à laisser votre premier commentaire!","But before you do that, you definitely deserve a high five!":"Mais avant cela, vous méritez certainement un tope-là!",Done:"Terminé","Sign in on the toolbar below and add":"Connectez-vous sur la barre d'outils ci-dessous et ajoutez","comments on the design flaws.":"des commentaires sur les défauts de conception.","Click to add comments on this page.":"Cliquez pour ajouter des commentaires sur cette page.",Ok:"Ok",Arrow:"Flèche","Live Huddle":"Discussion en direct",Recording:"Enregistrement","Open Comments":"Ouvrir les commentaires",Views:"Vues",Internal:"Interne",External:"Externe",All:"Tous",Upgrade:"Mettre à jour","You don't have access.":"Vous n'avez pas accès.","Reach out to the admin of this project.":"Contactez l'administrateur de ce projet.","Your plan has expired! Please upgrade.":"Votre plan a expiré! Veuillez mettre à jour.","Your plan has expired!":"Votre plan a expiré!","Please contact the admin.":"Veuillez contacter l'administrateur.",Share:"Partager","Add comments & recordings on this page.":"Ajoutez des commentaires et des enregistrements sur cette page.","Learn more":"En savoir plus","View project":"Voir le projet","Sign Out":"Se déconnecter","You’re a SuperFlow installation wizard!":"Vous êtes un sorcier d'installation de Superflux!",Next:"Suivant","This workspace is over its plan limits. Comments are paused until the plan is updated.":"Cet espace de travail dépasse les limites de son forfait. Les commentaires sont suspendus jusqu'à la mise à jour du forfait.","Ask your workspace admin to update the plan.":"Demandez à l'administrateur de votre espace de travail de mettre à jour le forfait.","Limit Reached":"Limite atteinte","Project not found":"Projet introuvable","This project no longer exists in Superflow. It may have been deleted.":"Ce projet n'existe plus dans Superflow. Il a peut-être été supprimé.","Open Superflow":"Ouvrir Superflow"}),gd.set("hi",{Comment:"टिप्पणी","Commenting is disabled. Contact admin.":"टिप्पणी करना अक्षम है. व्यवस्थापक से संपर्क करें.","Arrow feature is disabled. Contact admin.":"तीर सुविधा अक्षम है. व्यवस्थापक से संपर्क करें.","All Comments":"सभी टिप्पणियाँ","Signing In":"साइन इन कर रहा है","Sign in again!":"फिर से साइन इन करें!","Sign in to comment":"टिप्पणी करने के लिए साइन इन करें",Superflow:"सुपरफ्लो","Sign in to comment on this page.":"इस पृष्ठ पर टिप्पणी करने के लिए साइन इन करें।","Join Community":"समुदाय में शामिल हों","Open in Mobile":"मोबाइल में खोलें","Exit Review Mode":"समीक्षा मोड से बाहर निकलें","Sign in":"साइन इन करें","Try Superflow using the toolbar below.":"टूलबार का उपयोग करके सुपरफ्लो का प्रयास करें।","Get ready to drop your first comment!":"अपनी पहली टिप्पणी डालने के लिए तैयार हो जाओ!","But before you do that, you definitely deserve a high five!":"लेकिन इससे पहले, आपको निश्चित रूप से एक उच्च पांच मिलता है!",Done:"किया हुआ","Sign in on the toolbar below and add":"टूलबार पर साइन इन करें और जोड़ें","comments on the design flaws.":"डिज़ाइन की खामियों पर टिप्पणियाँ।","Click to add comments on this page.":"इस पृष्ठ पर टिप्पणियाँ जोड़ने के लिए क्लिक करें।",Ok:"ठीक",Arrow:"तीर","Live Huddle":"लाइव हडल",Recording:"रेकॉर्डिंग","Open Comments":"टिप्पणियाँ खोलें",Views:"दृश्य",Internal:"आंतरिक",External:"बाहरी",All:"सब",Upgrade:"अपग्रेड","You don't have access.":"आपके पास पहुंच नहीं है।","Reach out to the admin of this project.":"इस परियोजना के व्यवस्थापक से संपर्क करें।","Your plan has expired! Please upgrade.":"आपकी योजना समाप्त हो गई है! कृपया अपग्रेड करें।","Your plan has expired!":"आपकी योजना समाप्त हो गई है!","Please contact the admin.":"कृपया व्यवस्थापक से संपर्क करें।",Share:"शेयर","Add comments & recordings on this page.":"इस पृष्ठ पर टिप्पणियाँ और रिकॉर्डिंग जोड़ें।","Learn more":"और अधिक जानें","View project":"परियोजना देखें","Sign Out":"साइन आउट","You’re a SuperFlow installation wizard!":"आप एक सुपरफ्लो स्थापना विज़ार्ड हैं!",Next:"आगामी","This workspace is over its plan limits. Comments are paused until the plan is updated.":"यह वर्कस्पेस अपनी योजना की सीमा से अधिक हो गया है। योजना अपडेट होने तक टिप्पणियाँ रोक दी गई हैं।","Ask your workspace admin to update the plan.":"अपने वर्कस्पेस व्यवस्थापक से योजना अपडेट करने के लिए कहें।","Limit Reached":"सीमा समाप्त","Project not found":"प्रोजेक्ट नहीं मिला","This project no longer exists in Superflow. It may have been deleted.":"यह प्रोजेक्ट अब Superflow में मौजूद नहीं है। इसे हटा दिया गया हो सकता है।","Open Superflow":"Superflow खोलें"}),gd.set("it",{Comment:"Commento","Commenting is disabled. Contact admin.":"I commenti sono disabilitati. Contatta l'amministratore.","Arrow feature is disabled. Contact admin.":"La funzione freccia è disabilitata. Contatta l'amministratore.","All Comments":"Tutti i commenti","Signing In":"Accesso in corso","Sign in again!":"Accedi di nuovo!","Sign in to comment":"Accedi per commentare",Superflow:"Superflusso","Sign in to comment on this page.":"Accedi per commentare su questa pagina.","Join Community":"Unisciti alla comunità","Open in Mobile":"Apri su mobile","Exit Review Mode":"Esci dalla modalità di revisione","Sign in":"Accedi","Try Superflow using the toolbar below.":"Prova Superflusso utilizzando la barra degli strumenti qui sotto.","Get ready to drop your first comment!":"Preparati a lasciare il tuo primo commento!","But before you do that, you definitely deserve a high five!":"Ma prima di farlo, meriti sicuramente un cinque in alto!",Done:"Fatto","Sign in on the toolbar below and add":"Accedi alla barra degli strumenti qui sotto e aggiungi","comments on the design flaws.":"commenti sui difetti di progettazione.","Click to add comments on this page.":"Clicca per aggiungere commenti su questa pagina.",Ok:"Ok",Arrow:"Freccia","Live Huddle":"Riunione dal vivo",Recording:"Registrazione","Open Comments":"Apri commenti",Views:"Visualizzazioni",Internal:"Interno",External:"Esterno",All:"Tutti",Upgrade:"Aggiorna","You don't have access.":"Non hai accesso.","Reach out to the admin of this project.":"Contatta l'amministratore di questo progetto.","Your plan has expired! Please upgrade.":"Il tuo piano è scaduto! Si prega di aggiornare.","Your plan has expired!":"Il tuo piano è scaduto!","Please contact the admin.":"Si prega di contattare l'amministratore.",Share:"Condividi","Add comments & recordings on this page.":"Aggiungi commenti e registrazioni su questa pagina.","Learn more":"Scopri di più","View project":"Visualizza progetto","Sign Out":"Disconnetti","You’re a SuperFlow installation wizard!":"Sei un mago dell'installazione di Superflusso!",Next:"Avanti","This workspace is over its plan limits. Comments are paused until the plan is updated.":"Questo spazio di lavoro ha superato i limiti del suo piano. I commenti sono sospesi finché il piano non viene aggiornato.","Ask your workspace admin to update the plan.":"Chiedi all'amministratore del tuo spazio di lavoro di aggiornare il piano.","Limit Reached":"Limite raggiunto","Project not found":"Progetto non trovato","This project no longer exists in Superflow. It may have been deleted.":"Questo progetto non esiste più in Superflow. Potrebbe essere stato eliminato.","Open Superflow":"Apri Superflow"}),gd.set("ru",{Comment:"Комментарий","Commenting is disabled. Contact admin.":"Комментирование отключено. Свяжитесь с админом.","Arrow feature is disabled. Contact admin.":"Функция стрелки отключена. Свяжитесь с администратором.","All Comments":"Все комментарии","Signing In":"Вход в систему","Sign in again!":"Войдите снова!","Sign in to comment":"Войдите, чтобы оставить комментарий",Superflow:"Суперпоток","Sign in to comment on this page.":"Войдите, чтобы оставить комментарий на этой странице.","Join Community":"Присоединиться к сообществу","Open in Mobile":"Открыть на мобильном","Exit Review Mode":"Выйти из режима обзора","Sign in":"Войти","Try Superflow using the toolbar below.":"Попробуйте Суперпоток, используя панель инструментов ниже.","Get ready to drop your first comment!":"Приготовьтесь оставить свой первый комментарий!","But before you do that, you definitely deserve a high five!":"Но перед этим вы определенно заслуживаете пять!",Done:"Сделано","Sign in on the toolbar below and add":"Войдите на панели инструментов ниже и добавьте","comments on the design flaws.":"комментарии об ошибках в дизайне.","Click to add comments on this page.":"Нажмите, чтобы добавить комментарии на этой странице.",Ok:"Ок",Arrow:"Стрелка","Live Huddle":"Прямой сбор",Recording:"Запись","Open Comments":"Открыть комментарии",Views:"Просмотры",Internal:"Внутренний",External:"Внешний",All:"Все",Upgrade:"Обновить","You don't have access.":"У вас нет доступа.","Reach out to the admin of this project.":"Обратитесь к администратору этого проекта.","Your plan has expired! Please upgrade.":"Ваш план истек! Пожалуйста, обновите.","Your plan has expired!":"Ваш план истек!","Please contact the admin.":"Пожалуйста, свяжитесь с администратором.",Share:"Поделиться","Add comments & recordings on this page.":"Добавьте комментарии и записи на этой странице.","Learn more":"Узнать больше","View project":"Посмотреть проект","Sign Out":"Выйти","You’re a SuperFlow installation wizard!":"Вы волшебник установки Суперпотока!",Next:"Далее","This workspace is over its plan limits. Comments are paused until the plan is updated.":"Это рабочее пространство превысило лимиты тарифа. Комментарии приостановлены до обновления тарифа.","Ask your workspace admin to update the plan.":"Попросите администратора рабочего пространства обновить тариф.","Limit Reached":"Лимит исчерпан","Project not found":"Проект не найден","This project no longer exists in Superflow. It may have been deleted.":"Этот проект больше не существует в Superflow. Возможно, он был удалён.","Open Superflow":"Открыть Superflow"}),gd.set("uk",{Comment:"Коментар","Commenting is disabled. Contact admin.":"Коментування вимкнено. Зв'язатися з адміном.","Arrow feature is disabled. Contact admin.":"Функція стрілки вимкнена. Зв'язатися з адміном.","All Comments":"Всі коментарі","Signing In":"Увійти в систему","Sign in again!":"Увійдіть знову!","Sign in to comment":"Увійдіть, щоб залишити коментар",Superflow:"Суперпотік","Sign in to comment on this page.":"Увійдіть, щоб залишити коментар на цій сторінці.","Join Community":"Приєднатися до спільноти","Open in Mobile":"Відкрити на мобільному","Exit Review Mode":"Вийти з режиму огляду","Sign in":"Увійти","Try Superflow using the toolbar below.":"Спробуйте Суперпотік, використовуючи панель інструментів нижче.","Get ready to drop your first comment!":"Приготуйтеся залишити свій перший коментар!","But before you do that, you definitely deserve a high five!":"Але перед тим, як ви це зробите, ви точно заслуговуєте на високу п'ятірку!",Done:"Готово","Sign in on the toolbar below and add":"Увійдіть в панель інструментів нижче і додайте","comments on the design flaws.":"коментарі про помилки в дизайні.","Click to add comments on this page.":"Натисніть, щоб додати коментарі на цій сторінці.",Ok:"Добре",Arrow:"Стрілка","Live Huddle":"Пряма група",Recording:"Запис","Open Comments":"Відкрити коментарі",Views:"Перегляди",Internal:"Внутрішній",External:"Зовнішній",All:"Все",Upgrade:"Оновити","You don't have access.":"У вас немає доступу.","Reach out to the admin of this project.":"Зверніться до адміністратора цього проекту.","Your plan has expired! Please upgrade.":"Термін дії вашого плану закінчився! Будь ласка, оновіть.","Your plan has expired!":"Термін дії вашого плану закінчився!","Please contact the admin.":"Будь ласка, зв'яжіться з адміністратором.",Share:"Поділитися","Add comments & recordings on this page.":"Додайте коментарі та записи на цій сторінці.","Learn more":"Дізнатися більше","View project":"Переглянути проект","Sign Out":"Вийти","You’re a SuperFlow installation wizard!":"Ви чарівник встановлення Суперпотоку!",Next:"Далі","This workspace is over its plan limits. Comments are paused until the plan is updated.":"Цей робочий простір перевищив ліміти тарифу. Коментарі призупинено до оновлення тарифу.","Ask your workspace admin to update the plan.":"Попросіть адміністратора робочого простору оновити тариф.","Limit Reached":"Ліміт вичерпано","Project not found":"Проєкт не знайдено","This project no longer exists in Superflow. It may have been deleted.":"Цей проєкт більше не існує в Superflow. Можливо, його було видалено.","Open Superflow":"Відкрити Superflow"});const md=t=>{try{return t}catch(e){return t}},wd=a`
1546
1546
 
1547
1547
  .wrap {
1548
1548
  padding: 32px;
@@ -2003,7 +2003,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
2003
2003
  align-self: end;
2004
2004
  cursor: pointer;
2005
2005
  }
2006
- `,md=a`
2006
+ `,yd=a`
2007
2007
  @import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');
2008
2008
 
2009
2009
  * {
@@ -3467,7 +3467,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
3467
3467
  display: none;
3468
3468
  }
3469
3469
  }
3470
- `,wd=a`
3470
+ `,bd=a`
3471
3471
  :host {
3472
3472
  display: flex;
3473
3473
  justify-content: center;
@@ -3982,7 +3982,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
3982
3982
  padding: var(--superflow-spacing-lg, 20px);
3983
3983
  }
3984
3984
  }
3985
- `;var yd,bd=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.Admin="Admin",t.Commenter="Commenter"}(yd||(yd={}));let Cd=class extends X{constructor(){super(...arguments),this.apiKey="",this.documentId="",this.disableInvite=!1,this.hasInviteAccess=!0,this.userSeatsExhausted=!1,this.userType=yd.Admin,this.showCheckIcon=!1,this.contactListIsHovered=!1,this.invalidEmail=!1,this.isEmailValid=!1,this.inviting=!1,this.searchingUsers=!1,this.emailInput="",this.emailTags=[],this.editingTag=null,this.editingInput="",this.duplicateEmail="",this.filteredContacts=[],this.searchDebounceTimer=null,this.handleOutsideClick=t=>{try{t.target===this&&this.close()}catch(t){console.error("Error in handleOutsideClick:",t)}}}connectedCallback(){try{super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.userSeatsExhausted&&this.userType===yd.Admin&&(this.userType=yd.Commenter)}catch(t){console.error("Error in connectedCallback:",t)}}willUpdate(t){t.has("userSeatsExhausted")&&this.userSeatsExhausted&&this.userType===yd.Admin&&(this.userType=yd.Commenter)}disconnectedCallback(){try{super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer)}catch(t){console.error("Error in disconnectedCallback:",t)}}close(){try{this.dispatchEvent(new CustomEvent("superflow-invite-modal-close",{bubbles:!0,composed:!0}))}catch(t){console.error("Error in close:",t)}}validateEmail(t){try{const e=t.replace(/,/g,"").toLowerCase().trim();if(this.emailTags.some((t=>t.email===e)))return this.duplicateEmail=e,!1;if(this.duplicateEmail="",e.includes(" "))return!1;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}catch(t){return console.error("Error in validateEmail:",t),!1}}async searchUser(t=""){try{if(this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),!t.trim())return this.filteredContacts=[],void(this.searchingUsers=!1);this.filteredContacts=[],this.searchingUsers=!1}catch(t){console.error("Error in searchUser:",t),this.searchingUsers=!1}}handleEmailChange(t){try{const e=t.target;this.emailInput=e.value,this.isEmailValid=this.validateEmail(e.value),this.searchUser(e.value)}catch(t){console.error("Error in handleEmailChange:",t)}}handleKeyUp(t){try{if(!this.emailInput)return this.invalidEmail=!1,void(this.isEmailValid=!1);if("Backspace"===t.code)return void(this.invalidEmail=!1);if("Enter"!==t.code&&"Comma"!==t.code)return;const e=this.emailInput.replace(/,/g,"").trim();if(!e)return;this.validateEmail(e)?(this.addEmailTag(e),this.emailInput="",this.invalidEmail=!1):(this.invalidEmail=!0,setTimeout((()=>{this.invalidEmail=!1}),1500))}catch(t){console.error("Error in handleKeyUp:",t)}}handlePaste(t){var e,i;try{t.preventDefault();const o=((null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text"))||"").split(/[,\n|;]/).map((t=>t.trim())).filter((t=>t.length>0));let n=!1;o.forEach((t=>{this.emailTags.some((e=>e.email===t))?(this.duplicateEmail=t,this.emailInput=t,n=!0):this.validateEmail(t)?this.addEmailTag(t):(n=!0,this.emailInput=t)})),n&&(this.invalidEmail=!0,setTimeout((()=>{this.invalidEmail=!1}),1500)),null===(i=this.mainInput)||void 0===i||i.focus()}catch(t){console.error("Error in handlePaste:",t)}}addEmailTag(t){var e;try{if(!t)return;if(!this.validateEmail(t))return void(this.invalidEmail=!this.duplicateEmail);this.emailTags=[...this.emailTags,{name:"",email:t.toLowerCase().trim(),type:this.userType}],this.invalidEmail=!1,this.duplicateEmail="",this.emailInput="",this.contactListIsHovered=!1,null===(e=this.mainInput)||void 0===e||e.focus()}catch(t){console.error("Error in addEmailTag:",t)}}removeTag(t,e){var i;try{e.stopPropagation(),this.emailTags=this.emailTags.filter((e=>e.email!==t.email)),0===this.emailTags.length&&(this.isEmailValid=!1),null===(i=this.mainInput)||void 0===i||i.focus()}catch(e){console.error("Error in removeTag:",e)}}startEditingTag(t,e){try{e.stopPropagation(),this.editingTag=t,this.editingInput=t.email,setTimeout((()=>{var t;null===(t=this.editInput)||void 0===t||t.focus()}),100)}catch(e){console.error("Error in startEditingTag:",e)}}handleEditKeyUp(t){try{if("Enter"!==t.code&&"Escape"!==t.code)return;"Enter"===t.code&&this.editingInput&&this.validateEmail(this.editingInput)?this.updateEmailTag():this.cancelEmailTagEdit()}catch(t){console.error("Error in handleEditKeyUp:",t)}}updateEmailTag(){try{if(!this.editingTag||!this.validateEmail(this.editingInput))return void this.cancelEmailTagEdit();const t=this.emailTags.findIndex((t=>{var e;return t.email===(null===(e=this.editingTag)||void 0===e?void 0:e.email)}));if(-1===t)return void this.cancelEmailTagEdit();this.emailTags=[...this.emailTags.slice(0,t),{...this.editingTag,email:this.editingInput.toLowerCase().trim(),type:this.userType},...this.emailTags.slice(t+1)],this.cancelEmailTagEdit()}catch(t){console.error("Error in updateEmailTag:",t)}}cancelEmailTagEdit(){var t;try{this.editingTag=null,this.editingInput="",null===(t=this.mainInput)||void 0===t||t.focus()}catch(t){console.error("Error in cancelEmailTagEdit:",t)}}async copyReviewLink(){try{let t=window.location.href;const e=new URL(t);e.searchParams.has("review")&&"true"===e.searchParams.get("review")||(e.searchParams.set("review","true"),t=e.toString()),await navigator.clipboard.writeText(t),this.showCheckIcon=!0,setTimeout((()=>{this.showCheckIcon=!1}),2e3)}catch(t){console.error("Error copying review link:",t)}}setUserType(t){try{this.userType=t,this.emailTags=this.emailTags.map((t=>({...t,type:this.userType})))}catch(t){console.error("Error in setUserType:",t)}}async sendInvites(){try{if(this.disableInvite)return void this.dispatchEvent(new CustomEvent("superflow-invite-modal-invite-clicked",{detail:this.emailTags.map((t=>({email:t.email,type:t.type}))),bubbles:!0,composed:!0}));if(""!==this.emailInput.trim()&&this.isEmailValid&&(this.emailTags=[...this.emailTags,{name:"",email:this.emailInput.toLowerCase().trim(),type:this.userType}]),this.emailInput="",this.inviting=!0,this.userType===yd.Commenter)await this.addCommenter();else{if(this.userType!==yd.Admin)throw new Error("No User Type Selected");await this.addAdmin()}this.inviting=!1,this.close()}catch(t){console.error("Error sending invites:",t),this.inviting=!1}}async addAdmin(){try{if(0===this.emailTags.length)throw new Error("No email tags");const t=this.emailTags.map((t=>({email:t.email})));if(!await rd(this.apiKey,t))throw new Error("Failed to add admin users");this.dispatchEvent(new CustomEvent("superflow-invite-modal-invite-success",{detail:{users:t,type:"admin"},bubbles:!0,composed:!0}))}catch(t){throw console.error("Error adding admin:",t),t}}async addCommenter(){try{if(!this.emailTags.length)throw new Error("No email tags");const t=this.emailTags.map((t=>({email:t.email})));if(!await ad(this.apiKey,this.documentId,t))throw new Error("Failed to add commenter users");this.dispatchEvent(new CustomEvent("superflow-invite-modal-invite-success",{detail:{users:t,type:"commenter"},bubbles:!0,composed:!0}))}catch(t){throw console.error("Error adding commenter:",t),t}}upgradeToInvite(){try{this.dispatchEvent(new CustomEvent("superflow-invite-modal-upgrade-clicked",{bubbles:!0,composed:!0}))}catch(t){console.error("Error in upgradeToInvite:",t)}}render(){var t;const e=this.emailInput.length>0&&(this.mainInput===(null===(t=this.shadowRoot)||void 0===t?void 0:t.activeElement)||this.contactListIsHovered);return L`
3985
+ `;var Cd,xd=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};!function(t){t.Admin="Admin",t.Commenter="Commenter"}(Cd||(Cd={}));let Ed=class extends X{constructor(){super(...arguments),this.apiKey="",this.documentId="",this.disableInvite=!1,this.hasInviteAccess=!0,this.userSeatsExhausted=!1,this.userType=Cd.Admin,this.showCheckIcon=!1,this.contactListIsHovered=!1,this.invalidEmail=!1,this.isEmailValid=!1,this.inviting=!1,this.searchingUsers=!1,this.emailInput="",this.emailTags=[],this.editingTag=null,this.editingInput="",this.duplicateEmail="",this.filteredContacts=[],this.searchDebounceTimer=null,this.handleOutsideClick=t=>{try{t.target===this&&this.close()}catch(t){console.error("Error in handleOutsideClick:",t)}}}connectedCallback(){try{super.connectedCallback(),document.addEventListener("click",this.handleOutsideClick),this.userSeatsExhausted&&this.userType===Cd.Admin&&(this.userType=Cd.Commenter)}catch(t){console.error("Error in connectedCallback:",t)}}willUpdate(t){t.has("userSeatsExhausted")&&this.userSeatsExhausted&&this.userType===Cd.Admin&&(this.userType=Cd.Commenter)}disconnectedCallback(){try{super.disconnectedCallback(),document.removeEventListener("click",this.handleOutsideClick),this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer)}catch(t){console.error("Error in disconnectedCallback:",t)}}close(){try{this.dispatchEvent(new CustomEvent("superflow-invite-modal-close",{bubbles:!0,composed:!0}))}catch(t){console.error("Error in close:",t)}}validateEmail(t){try{const e=t.replace(/,/g,"").toLowerCase().trim();if(this.emailTags.some((t=>t.email===e)))return this.duplicateEmail=e,!1;if(this.duplicateEmail="",e.includes(" "))return!1;return/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e)}catch(t){return console.error("Error in validateEmail:",t),!1}}async searchUser(t=""){try{if(this.searchDebounceTimer&&clearTimeout(this.searchDebounceTimer),!t.trim())return this.filteredContacts=[],void(this.searchingUsers=!1);this.filteredContacts=[],this.searchingUsers=!1}catch(t){console.error("Error in searchUser:",t),this.searchingUsers=!1}}handleEmailChange(t){try{const e=t.target;this.emailInput=e.value,this.isEmailValid=this.validateEmail(e.value),this.searchUser(e.value)}catch(t){console.error("Error in handleEmailChange:",t)}}handleKeyUp(t){try{if(!this.emailInput)return this.invalidEmail=!1,void(this.isEmailValid=!1);if("Backspace"===t.code)return void(this.invalidEmail=!1);if("Enter"!==t.code&&"Comma"!==t.code)return;const e=this.emailInput.replace(/,/g,"").trim();if(!e)return;this.validateEmail(e)?(this.addEmailTag(e),this.emailInput="",this.invalidEmail=!1):(this.invalidEmail=!0,setTimeout((()=>{this.invalidEmail=!1}),1500))}catch(t){console.error("Error in handleKeyUp:",t)}}handlePaste(t){var e,i;try{t.preventDefault();const o=((null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text"))||"").split(/[,\n|;]/).map((t=>t.trim())).filter((t=>t.length>0));let n=!1;o.forEach((t=>{this.emailTags.some((e=>e.email===t))?(this.duplicateEmail=t,this.emailInput=t,n=!0):this.validateEmail(t)?this.addEmailTag(t):(n=!0,this.emailInput=t)})),n&&(this.invalidEmail=!0,setTimeout((()=>{this.invalidEmail=!1}),1500)),null===(i=this.mainInput)||void 0===i||i.focus()}catch(t){console.error("Error in handlePaste:",t)}}addEmailTag(t){var e;try{if(!t)return;if(!this.validateEmail(t))return void(this.invalidEmail=!this.duplicateEmail);this.emailTags=[...this.emailTags,{name:"",email:t.toLowerCase().trim(),type:this.userType}],this.invalidEmail=!1,this.duplicateEmail="",this.emailInput="",this.contactListIsHovered=!1,null===(e=this.mainInput)||void 0===e||e.focus()}catch(t){console.error("Error in addEmailTag:",t)}}removeTag(t,e){var i;try{e.stopPropagation(),this.emailTags=this.emailTags.filter((e=>e.email!==t.email)),0===this.emailTags.length&&(this.isEmailValid=!1),null===(i=this.mainInput)||void 0===i||i.focus()}catch(e){console.error("Error in removeTag:",e)}}startEditingTag(t,e){try{e.stopPropagation(),this.editingTag=t,this.editingInput=t.email,setTimeout((()=>{var t;null===(t=this.editInput)||void 0===t||t.focus()}),100)}catch(e){console.error("Error in startEditingTag:",e)}}handleEditKeyUp(t){try{if("Enter"!==t.code&&"Escape"!==t.code)return;"Enter"===t.code&&this.editingInput&&this.validateEmail(this.editingInput)?this.updateEmailTag():this.cancelEmailTagEdit()}catch(t){console.error("Error in handleEditKeyUp:",t)}}updateEmailTag(){try{if(!this.editingTag||!this.validateEmail(this.editingInput))return void this.cancelEmailTagEdit();const t=this.emailTags.findIndex((t=>{var e;return t.email===(null===(e=this.editingTag)||void 0===e?void 0:e.email)}));if(-1===t)return void this.cancelEmailTagEdit();this.emailTags=[...this.emailTags.slice(0,t),{...this.editingTag,email:this.editingInput.toLowerCase().trim(),type:this.userType},...this.emailTags.slice(t+1)],this.cancelEmailTagEdit()}catch(t){console.error("Error in updateEmailTag:",t)}}cancelEmailTagEdit(){var t;try{this.editingTag=null,this.editingInput="",null===(t=this.mainInput)||void 0===t||t.focus()}catch(t){console.error("Error in cancelEmailTagEdit:",t)}}async copyReviewLink(){try{let t=window.location.href;const e=new URL(t);e.searchParams.has("review")&&"true"===e.searchParams.get("review")||(e.searchParams.set("review","true"),t=e.toString()),await navigator.clipboard.writeText(t),this.showCheckIcon=!0,setTimeout((()=>{this.showCheckIcon=!1}),2e3)}catch(t){console.error("Error copying review link:",t)}}setUserType(t){try{this.userType=t,this.emailTags=this.emailTags.map((t=>({...t,type:this.userType})))}catch(t){console.error("Error in setUserType:",t)}}async sendInvites(){try{if(this.disableInvite)return void this.dispatchEvent(new CustomEvent("superflow-invite-modal-invite-clicked",{detail:this.emailTags.map((t=>({email:t.email,type:t.type}))),bubbles:!0,composed:!0}));if(""!==this.emailInput.trim()&&this.isEmailValid&&(this.emailTags=[...this.emailTags,{name:"",email:this.emailInput.toLowerCase().trim(),type:this.userType}]),this.emailInput="",this.inviting=!0,this.userType===Cd.Commenter)await this.addCommenter();else{if(this.userType!==Cd.Admin)throw new Error("No User Type Selected");await this.addAdmin()}this.inviting=!1,this.close()}catch(t){console.error("Error sending invites:",t),this.inviting=!1}}async addAdmin(){try{if(0===this.emailTags.length)throw new Error("No email tags");const t=this.emailTags.map((t=>({email:t.email})));if(!await ld(this.apiKey,t))throw new Error("Failed to add admin users");this.dispatchEvent(new CustomEvent("superflow-invite-modal-invite-success",{detail:{users:t,type:"admin"},bubbles:!0,composed:!0}))}catch(t){throw console.error("Error adding admin:",t),t}}async addCommenter(){try{if(!this.emailTags.length)throw new Error("No email tags");const t=this.emailTags.map((t=>({email:t.email})));if(!await cd(this.apiKey,this.documentId,t))throw new Error("Failed to add commenter users");this.dispatchEvent(new CustomEvent("superflow-invite-modal-invite-success",{detail:{users:t,type:"commenter"},bubbles:!0,composed:!0}))}catch(t){throw console.error("Error adding commenter:",t),t}}upgradeToInvite(){try{this.dispatchEvent(new CustomEvent("superflow-invite-modal-upgrade-clicked",{bubbles:!0,composed:!0}))}catch(t){console.error("Error in upgradeToInvite:",t)}}render(){var t;const e=this.emailInput.length>0&&(this.mainInput===(null===(t=this.shadowRoot)||void 0===t?void 0:t.activeElement)||this.contactListIsHovered);return L`
3986
3986
  <div class="share-modal">
3987
3987
  <div class="share-modal-content">
3988
3988
  <div class="share-modal-header ${ht({locked:!this.hasInviteAccess})}">
@@ -3999,7 +3999,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
3999
3999
  d="M8 11v-4a4 4 0 1 1 8 0v4" />
4000
4000
  </svg>
4001
4001
  `}
4002
- <h2>${fd("Invite Users")}</h2>
4002
+ <h2>${md("Invite Users")}</h2>
4003
4003
  </div>
4004
4004
  ${this.hasInviteAccess?"":L`
4005
4005
  <p class="share-modal-header-description">Upgrade to invite more users</p>
@@ -4100,8 +4100,8 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
4100
4100
  .value=${this.userType}
4101
4101
  @change=${t=>this.setUserType(t.target.value)}
4102
4102
  >
4103
- ${this.userSeatsExhausted?"":L`<option value="${yd.Admin}">Admin</option>`}
4104
- <option value="${yd.Commenter}">Guest</option>
4103
+ ${this.userSeatsExhausted?"":L`<option value="${Cd.Admin}">Admin</option>`}
4104
+ <option value="${Cd.Commenter}">Guest</option>
4105
4105
  </select>
4106
4106
  </div>
4107
4107
  </div>
@@ -4153,7 +4153,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
4153
4153
  </div>
4154
4154
  </div>
4155
4155
  </div>
4156
- `}};Cd.styles=wd,bd([ot({type:String})],Cd.prototype,"apiKey",void 0),bd([ot({type:String})],Cd.prototype,"documentId",void 0),bd([ot({type:Boolean})],Cd.prototype,"disableInvite",void 0),bd([ot({type:Boolean})],Cd.prototype,"hasInviteAccess",void 0),bd([ot({type:Boolean})],Cd.prototype,"userSeatsExhausted",void 0),bd([nt()],Cd.prototype,"userType",void 0),bd([nt()],Cd.prototype,"showCheckIcon",void 0),bd([nt()],Cd.prototype,"contactListIsHovered",void 0),bd([nt()],Cd.prototype,"invalidEmail",void 0),bd([nt()],Cd.prototype,"isEmailValid",void 0),bd([nt()],Cd.prototype,"inviting",void 0),bd([nt()],Cd.prototype,"searchingUsers",void 0),bd([nt()],Cd.prototype,"emailInput",void 0),bd([nt()],Cd.prototype,"emailTags",void 0),bd([nt()],Cd.prototype,"editingTag",void 0),bd([nt()],Cd.prototype,"editingInput",void 0),bd([nt()],Cd.prototype,"duplicateEmail",void 0),bd([nt()],Cd.prototype,"filteredContacts",void 0),bd([st("#mainInput")],Cd.prototype,"mainInput",void 0),bd([st("#editInput")],Cd.prototype,"editInput",void 0),Cd=bd([et("superflow-invite-modal")],Cd);const xd=a`
4156
+ `}};Ed.styles=bd,xd([ot({type:String})],Ed.prototype,"apiKey",void 0),xd([ot({type:String})],Ed.prototype,"documentId",void 0),xd([ot({type:Boolean})],Ed.prototype,"disableInvite",void 0),xd([ot({type:Boolean})],Ed.prototype,"hasInviteAccess",void 0),xd([ot({type:Boolean})],Ed.prototype,"userSeatsExhausted",void 0),xd([nt()],Ed.prototype,"userType",void 0),xd([nt()],Ed.prototype,"showCheckIcon",void 0),xd([nt()],Ed.prototype,"contactListIsHovered",void 0),xd([nt()],Ed.prototype,"invalidEmail",void 0),xd([nt()],Ed.prototype,"isEmailValid",void 0),xd([nt()],Ed.prototype,"inviting",void 0),xd([nt()],Ed.prototype,"searchingUsers",void 0),xd([nt()],Ed.prototype,"emailInput",void 0),xd([nt()],Ed.prototype,"emailTags",void 0),xd([nt()],Ed.prototype,"editingTag",void 0),xd([nt()],Ed.prototype,"editingInput",void 0),xd([nt()],Ed.prototype,"duplicateEmail",void 0),xd([nt()],Ed.prototype,"filteredContacts",void 0),xd([st("#mainInput")],Ed.prototype,"mainInput",void 0),xd([st("#editInput")],Ed.prototype,"editInput",void 0),Ed=xd([et("superflow-invite-modal")],Ed);const kd=a`
4157
4157
  :host {
4158
4158
  display: block;
4159
4159
  font-family: 'Poppins', sans-serif;
@@ -4595,7 +4595,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
4595
4595
  .cws-list::-webkit-scrollbar-thumb:hover {
4596
4596
  background: #9CA3AF;
4597
4597
  }
4598
- `;var Ed=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};let kd=class extends X{constructor(){super(...arguments),this.agentGroups=[],this.currentPageUrl="",this.openAccordions=new Set,this.currentView="agents",this.selectedAgentId="",this.getSelectedAgentGroup=()=>{var t;try{return null===(t=this.agentGroups)||void 0===t?void 0:t.find((t=>(null==t?void 0:t.agentId)===this.selectedAgentId))}catch(t){return void console.warn("Error in getSelectedAgentGroup: ",t)}},this.onAgentClick=t=>{try{this.selectedAgentId=t,this.currentView="agent-detail",this.autoOpenCurrentPageAccordion(t)}catch(t){console.warn("Error in onAgentClick: ",t)}},this.autoOpenCurrentPageAccordion=t=>{var e;try{const i=null===(e=this.agentGroups)||void 0===e?void 0:e.find((e=>(null==e?void 0:e.agentId)===t));if(!i)return;const o=this.groupWarningsByPage(i.warnings),n=null==o?void 0:o.find((t=>null==t?void 0:t.isCurrentPage));this.openAccordions=new Set,(null==n?void 0:n.pageUrl)&&this.openAccordions.add(n.pageUrl)}catch(t){console.warn("Error in autoOpenCurrentPageAccordion: ",t)}},this.onBackClick=()=>{try{this.currentView="agents",this.selectedAgentId=""}catch(t){console.warn("Error in onBackClick: ",t)}},this.onWarningRowClick=t=>{var e;try{const i=null===(e=null==t?void 0:t.annotations)||void 0===e?void 0:e[0];if(!i)return;this.dispatchEvent(new CustomEvent("content-warning-item-click",{bubbles:!0,composed:!0,detail:{annotation:i}}))}catch(t){console.warn("Error in onWarningRowClick: ",t)}},this.onAddAllSuggestions=t=>{try{this.dispatchEvent(new CustomEvent("content-warning-sidebar-add-all",{bubbles:!0,composed:!0,detail:{agentId:t}}))}catch(t){console.warn("Error in onAddAllSuggestions: ",t)}},this.onCloseClick=()=>{try{this.dispatchEvent(new CustomEvent("content-warning-sidebar-close",{bubbles:!0,composed:!0}))}catch(t){console.warn("Error in onCloseClick: ",t)}},this.normalizeUrlForGrouping=t=>{try{if(!t)return"";const e="false"!==localStorage.getItem("sfNormalizeParams");let i=t;if(null==t?void 0:t.startsWith("/"))e&&(i=t.split("?")[0].split("#")[0]);else{const o=new URL(t);i=e?(null==o?void 0:o.pathname)||"/":(null==o?void 0:o.pathname)+((null==o?void 0:o.search)||"")+((null==o?void 0:o.hash)||"")}return(null==i?void 0:i.startsWith("/"))?i.substring(1):i}catch{const e=t||"";return(null==e?void 0:e.startsWith("/"))?e.substring(1):e}},this.groupWarningsByPage=t=>{var e,i,o,n,s,r;try{const a=new Map;for(const l of t){if(!(null===(e=null==l?void 0:l.pageUrls)||void 0===e?void 0:e.length)){const t="__unknown__";a.has(t)||a.set(t,{displayUrl:"__unknown__",warnings:[]}),null===(o=null===(i=a.get(t))||void 0===i?void 0:i.warnings)||void 0===o||o.push(l);continue}const t=new Map;for(const e of l.pageUrls){const i=this.normalizeUrlForGrouping(e);t.has(i)||t.set(i,e)}for(const[e,i]of t){const t=(null===(n=l.annotations)||void 0===n?void 0:n.filter((t=>{var i,o,n;const s=(null===(i=null==t?void 0:t.pageInfo)||void 0===i?void 0:i.url)||(null===(o=null==t?void 0:t.location)||void 0===o?void 0:o.url)||(null===(n=null==t?void 0:t.agent)||void 0===n?void 0:n.url)||"";return this.normalizeUrlForGrouping(s)===e})))||[];if(0===t.length)continue;const o={...l,occurrences:t.length,annotations:t};a.has(e)||a.set(e,{displayUrl:i,warnings:[]}),null===(r=null===(s=a.get(e))||void 0===s?void 0:s.warnings)||void 0===r||r.push(o)}}const l=[],c=this.normalizeUrlForGrouping(this.currentPageUrl);for(const[t,{displayUrl:e,warnings:i}]of a){const o="__unknown__"===t?"Unknown":t;l.push({pageUrl:e,pagePath:o,isCurrentPage:t===c&&"__unknown__"!==t,warnings:i})}return l.sort(((t,e)=>{var i;return(null==t?void 0:t.isCurrentPage)?-1:(null==e?void 0:e.isCurrentPage)?1:null===(i=null==t?void 0:t.pagePath)||void 0===i?void 0:i.localeCompare(null==e?void 0:e.pagePath)})),l}catch(t){return console.warn("Error in groupWarningsByPage: ",t),[]}},this.toggleAccordion=t=>{try{const e=new Set(this.openAccordions);e.has(t)?e.delete(t):e.add(t),this.openAccordions=e}catch(t){console.warn("Error in toggleAccordion: ",t)}},this.renderWarningIcon=()=>{try{return L`
4598
+ `;var Sd=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};let Md=class extends X{constructor(){super(...arguments),this.agentGroups=[],this.currentPageUrl="",this.openAccordions=new Set,this.currentView="agents",this.selectedAgentId="",this.getSelectedAgentGroup=()=>{var t;try{return null===(t=this.agentGroups)||void 0===t?void 0:t.find((t=>(null==t?void 0:t.agentId)===this.selectedAgentId))}catch(t){return void console.warn("Error in getSelectedAgentGroup: ",t)}},this.onAgentClick=t=>{try{this.selectedAgentId=t,this.currentView="agent-detail",this.autoOpenCurrentPageAccordion(t)}catch(t){console.warn("Error in onAgentClick: ",t)}},this.autoOpenCurrentPageAccordion=t=>{var e;try{const i=null===(e=this.agentGroups)||void 0===e?void 0:e.find((e=>(null==e?void 0:e.agentId)===t));if(!i)return;const o=this.groupWarningsByPage(i.warnings),n=null==o?void 0:o.find((t=>null==t?void 0:t.isCurrentPage));this.openAccordions=new Set,(null==n?void 0:n.pageUrl)&&this.openAccordions.add(n.pageUrl)}catch(t){console.warn("Error in autoOpenCurrentPageAccordion: ",t)}},this.onBackClick=()=>{try{this.currentView="agents",this.selectedAgentId=""}catch(t){console.warn("Error in onBackClick: ",t)}},this.onWarningRowClick=t=>{var e;try{const i=null===(e=null==t?void 0:t.annotations)||void 0===e?void 0:e[0];if(!i)return;this.dispatchEvent(new CustomEvent("content-warning-item-click",{bubbles:!0,composed:!0,detail:{annotation:i}}))}catch(t){console.warn("Error in onWarningRowClick: ",t)}},this.onAddAllSuggestions=t=>{try{this.dispatchEvent(new CustomEvent("content-warning-sidebar-add-all",{bubbles:!0,composed:!0,detail:{agentId:t}}))}catch(t){console.warn("Error in onAddAllSuggestions: ",t)}},this.onCloseClick=()=>{try{this.dispatchEvent(new CustomEvent("content-warning-sidebar-close",{bubbles:!0,composed:!0}))}catch(t){console.warn("Error in onCloseClick: ",t)}},this.normalizeUrlForGrouping=t=>{try{if(!t)return"";const e="false"!==localStorage.getItem("sfNormalizeParams");let i=t;if(null==t?void 0:t.startsWith("/"))e&&(i=t.split("?")[0].split("#")[0]);else{const o=new URL(t);i=e?(null==o?void 0:o.pathname)||"/":(null==o?void 0:o.pathname)+((null==o?void 0:o.search)||"")+((null==o?void 0:o.hash)||"")}return(null==i?void 0:i.startsWith("/"))?i.substring(1):i}catch{const e=t||"";return(null==e?void 0:e.startsWith("/"))?e.substring(1):e}},this.groupWarningsByPage=t=>{var e,i,o,n,s,r;try{const a=new Map;for(const l of t){if(!(null===(e=null==l?void 0:l.pageUrls)||void 0===e?void 0:e.length)){const t="__unknown__";a.has(t)||a.set(t,{displayUrl:"__unknown__",warnings:[]}),null===(o=null===(i=a.get(t))||void 0===i?void 0:i.warnings)||void 0===o||o.push(l);continue}const t=new Map;for(const e of l.pageUrls){const i=this.normalizeUrlForGrouping(e);t.has(i)||t.set(i,e)}for(const[e,i]of t){const t=(null===(n=l.annotations)||void 0===n?void 0:n.filter((t=>{var i,o,n;const s=(null===(i=null==t?void 0:t.pageInfo)||void 0===i?void 0:i.url)||(null===(o=null==t?void 0:t.location)||void 0===o?void 0:o.url)||(null===(n=null==t?void 0:t.agent)||void 0===n?void 0:n.url)||"";return this.normalizeUrlForGrouping(s)===e})))||[];if(0===t.length)continue;const o={...l,occurrences:t.length,annotations:t};a.has(e)||a.set(e,{displayUrl:i,warnings:[]}),null===(r=null===(s=a.get(e))||void 0===s?void 0:s.warnings)||void 0===r||r.push(o)}}const l=[],c=this.normalizeUrlForGrouping(this.currentPageUrl);for(const[t,{displayUrl:e,warnings:i}]of a){const o="__unknown__"===t?"Unknown":t;l.push({pageUrl:e,pagePath:o,isCurrentPage:t===c&&"__unknown__"!==t,warnings:i})}return l.sort(((t,e)=>{var i;return(null==t?void 0:t.isCurrentPage)?-1:(null==e?void 0:e.isCurrentPage)?1:null===(i=null==t?void 0:t.pagePath)||void 0===i?void 0:i.localeCompare(null==e?void 0:e.pagePath)})),l}catch(t){return console.warn("Error in groupWarningsByPage: ",t),[]}},this.toggleAccordion=t=>{try{const e=new Set(this.openAccordions);e.has(t)?e.delete(t):e.add(t),this.openAccordions=e}catch(t){console.warn("Error in toggleAccordion: ",t)}},this.renderWarningIcon=()=>{try{return L`
4599
4599
  <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4600
4600
  <path d="M12.0003 10.2329V13.8332M12.0003 16.5334H12.0093M10.5268 5.36441L3.23087 17.546C3.08046 17.8064 3.00087 18.1017 3.00001 18.4025C2.99915 18.7033 3.07705 18.999 3.22596 19.2604C3.37487 19.5217 3.5896 19.7395 3.8488 19.8921C4.108 20.0446 4.40263 20.1267 4.70338 20.1301H19.2971C19.5978 20.1266 19.8922 20.0445 20.1513 19.892C20.4104 19.7395 20.625 19.5218 20.7739 19.2606C20.9228 18.9994 21.0007 18.7038 21 18.4032C20.9992 18.1025 20.9198 17.8073 20.7697 17.5469L13.4737 5.36351C13.3202 5.11015 13.1039 4.90064 12.8458 4.75524C12.5877 4.60984 12.2965 4.53345 12.0003 4.53345C11.704 4.53345 11.4128 4.60984 11.1547 4.75524C10.8966 4.90064 10.6803 5.11015 10.5268 5.36351V5.36441Z" stroke="#E69422" stroke-width="1.80014" stroke-linecap="round" stroke-linejoin="round"/>
4601
4601
  </svg>
@@ -4715,7 +4715,11 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
4715
4715
  <div class="cws-panel">
4716
4716
  ${"agents"===this.currentView?this.renderAgentsView():this.renderAgentDetailView()}
4717
4717
  </div>
4718
- `}catch(t){return console.warn("Error in render: ",t),L``}}};kd.styles=xd,Ed([ot({type:Array})],kd.prototype,"agentGroups",void 0),Ed([ot({type:String})],kd.prototype,"currentPageUrl",void 0),Ed([nt()],kd.prototype,"openAccordions",void 0),Ed([nt()],kd.prototype,"currentView",void 0),Ed([nt()],kd.prototype,"selectedAgentId",void 0),kd=Ed([et("content-warning-sidebar")],kd);function Sd(){try{return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("sfScreenShotDebug")}catch{return!1}}function Md(t){return new Promise((e=>{let i=Math.max(1,t);const o=()=>{i-=1,i<=0?e():requestAnimationFrame(o)};requestAnimationFrame(o)}))}function Td(t,e,i=600){const o=t.requestVideoFrameCallback;return"function"!=typeof o?Md(e+2):new Promise((n=>{let s=Math.max(1,e),r=!1;const a=()=>{r||(r=!0,clearTimeout(l),n())},l=setTimeout(a,Math.max(0,i)),c=()=>{r||(s-=1,s<=0?a():o.call(t,c))};o.call(t,c)}))}function _d(t,e,i,o,n){const s=Math.max(0,Math.round(e)),r=Math.max(0,Math.round(i)),a=Math.max(1,Math.min(Math.round(o),t.width-s)),l=Math.max(1,Math.min(Math.round(n),t.height-r)),c=document.createElement("canvas");c.width=a,c.height=l;const d=c.getContext("2d");if(!d)throw new Error("canvas-crop-failed");return d.drawImage(t,s,r,a,l,0,0,a,l),c}function Id(t,e){const i=Math.max(t.width,t.height);if(i<=e)return{canvas:t,ratio:1};const o=e/i,n=Math.max(1,Math.round(t.width*o)),s=Math.max(1,Math.round(t.height*o)),r=document.createElement("canvas");r.width=n,r.height=s;const a=r.getContext("2d");return a?(a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.drawImage(t,0,0,n,s),{canvas:r,ratio:o}):{canvas:t,ratio:1}}function Ad(t,e,i){return new Promise((o=>{t.toBlob((t=>o(t)),e,i)}))}async function Nd(t,e=.9){const i=await Ad(t,"image/webp",e);if(i&&"image/webp"===i.type)return{blob:i,type:i.type};const o=await Ad(t,"image/png");if(o)return{blob:o,type:"image/png"};throw new Error("canvas-encode-failed")}const Od=["superflow-toolbar","snippyly-plugin","velt-shadow-dom-internal","snippyly-comment-pin-portal","snippyly-comment-pin","snippyly-area-pin-portal","velt-comment-pin-portal","velt-comment-pin","velt-area-pin-portal","snippyly-recorder-control-panel-internal","snippyly-live-state-sync-overlay",".comment-annotation-number","velt-comments","velt-comments-sidebar","velt-comments-sidebar-v2","velt-comment-tool","velt-cursor","velt-presence","velt-huddle","velt-arrows","velt-areas","velt-recorder-notes","velt-recorder-control-panel","velt-notifications-history-panel","velt-rewriter","velt-toast-popup","velt-root"],$d=["snippyly-text-highlight","snippyly-comment-text-portal","snippyly-comment-text","velt-comment-text-portal","velt-comment-text"],Ld="sf-capture-hide-widgets",Dd="data-sf-capture-keep";let Pd=null,Vd=null,Fd=[],jd=new WeakSet,Rd=null;function Ud(...t){Sd()&&"undefined"!=typeof console&&console.log("[sf-capture][exclude]",...t)}const zd=new Set(Od.map((t=>t.toLowerCase())));function Bd(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Hd(t){const e=Bd(t);return[`snippyly-comment-pin-portal[id="${e}"]`,`velt-comment-pin-portal[id="${e}"]`,`velt-comment-pin-portal[data-velt-id="${e}"]`,`snippyly-area-pin-portal[id="${e}"]`,`velt-area-pin-portal[id="${e}"]`,`velt-area-pin-portal[data-velt-id="${e}"]`,`snippyly-text-highlight[data-velt-id="${e}"]`,`velt-text-highlight[data-velt-id="${e}"]`].join(", ")}function Wd(t){if(!t)return!1;const e=Bd(t);return!!document.querySelector(`snippyly-comment-pin-portal[id="${e}"] snippyly-comment-pin, velt-comment-pin-portal[id="${e}"] velt-comment-pin, velt-comment-pin-portal[data-velt-id="${e}"] velt-comment-pin`)||(!!document.querySelector(`snippyly-text-highlight[data-velt-id="${e}"], velt-text-highlight[data-velt-id="${e}"]`)||!!document.querySelector(`snippyly-area-pin-portal[id="${e}"], velt-area-pin-portal[id="${e}"], velt-area-pin-portal[data-velt-id="${e}"]`))}function Gd(t){const e=Array.from(document.querySelectorAll(Hd(t)));for(const t of e){(i=t).setAttribute(Dd,""),i.querySelectorAll("*").forEach((t=>t.setAttribute(Dd,"")));let e=t.parentElement;for(;e;)e.setAttribute(Dd,""),e=e.parentElement}var i;return e}function Kd(t,e){if(!Sd()||!t||"undefined"==typeof document)return;const i=t=>{const e=t.getBoundingClientRect();return[Math.round(e.x),Math.round(e.y),Math.round(e.width),Math.round(e.height)]},o=document.getElementById(Ld),n=document.querySelector(Hd(t));if(Ud(`[${e}] hideStyle=${!!o} keptHost=${!!n}`+(n?` keep=${n.hasAttribute(Dd)} display=${getComputedStyle(n).display}`:"")),n){Ud(`[${e}] kept host subtree:`,Array.from(n.querySelectorAll("*")).map((t=>{const e=t.shadowRoot;return{tag:t.tagName.toLowerCase(),keep:t.hasAttribute(Dd),display:getComputedStyle(t).display,vis:getComputedStyle(t).visibility,rect:i(t),painted:t.getClientRects().length>0,shadowKids:e?e.childElementCount:-1}})))}const s=Array.from(document.querySelectorAll("velt-shadow-dom-internal")).map((t=>({keep:t.hasAttribute(Dd),display:getComputedStyle(t).display,rect:i(t)}))).filter((t=>"none"!==t.display));Ud(`[${e}] visible <velt-shadow-dom-internal>: ${s.length}`,s);const r=Bd(t),a="snippyly-comment-pin, velt-comment-pin",l=document.querySelector(`snippyly-area-pin-portal[id="${r}"], velt-area-pin-portal[id="${r}"], velt-area-pin-portal[data-velt-id="${r}"]`);if(l){const o=e=>{const i=e.closest("snippyly-area-pin-portal, velt-area-pin-portal");if(i){const e=i.getAttribute("id")||i.getAttribute("data-velt-id")||"";return`area#${e.slice(0,6)}${e===t?"(FOCUSED)":""}`}const o=e.parentElement;return o?o.tagName.toLowerCase():"(detached)"},n=Array.from(document.querySelectorAll(".line")),s=Array.from(document.querySelectorAll(a));Ud(`[${e}] AREA focus: portal kept=${l.hasAttribute(Dd)} display=${getComputedStyle(l).display} rect=${JSON.stringify(i(l))} innerLines=${l.querySelectorAll(".line").length} innerPins=${l.querySelectorAll(a).length}`),Ud(`[${e}] AREA .line owners (total ${n.length}):`,Array.from(new Set(n.map(o)))),Ud(`[${e}] AREA <comment-pin> owners (total ${s.length}):`,s.map((t=>({owner:o(t),keep:t.hasAttribute(Dd),display:getComputedStyle(t).display,painted:t.getClientRects().length>0}))))}}function Zd(){document.querySelectorAll('[style*="cursor"]').forEach((t=>{const e=t.style.getPropertyValue("cursor");if(!e)return;if(jd.has(t))return void("none"!==e&&t.style.setProperty("cursor","none","important"));if("none"===e)return;const i=t.style.getPropertyPriority("cursor");Fd.push({el:t,value:e,priority:i,isPin:e.includes("url(")&&"important"===i}),jd.add(t),t.style.setProperty("cursor","none","important")})),Ud(`neutralized inline cursor(s): tracked=${Fd.length}`)}function Jd(t){Yd();let e=!1;if(t){const o=Gd(t);e=o.length>0,function(t,e){if(Sd()){Ud("keepAnnotationId =",JSON.stringify(t));for(const t of["snippyly-comment-pin-portal","velt-comment-pin-portal","snippyly-area-pin-portal","velt-area-pin-portal","snippyly-comment-text-portal","velt-comment-text-portal","snippyly-text-highlight","velt-text-highlight","velt-comment-text"]){const e=Array.from(document.querySelectorAll(t));Ud(`candidates <${t}>: ${e.length}`,e.map((t=>({id:t.getAttribute("id"),"data-velt-id":t.getAttribute("data-velt-id")}))))}Ud(`matched kept host(s): ${e.length}`),e.forEach(((t,e)=>{const i=[t.tagName.toLowerCase()];let o=t.parentElement;for(;o;){const t=o.tagName.toLowerCase();i.push(zd.has(t)?`${t}(EXCLUDED-ANCESTOR)`:t),o=o.parentElement}Ud(` match[${e}] chain (self -> root):`,i.join(" > "))})),0===e.length&&Ud("No host matched the annotationId — the marker will be hidden. Compare the annotationId above against the candidate id / data-velt-id values.")}}(t,o),e&&(i=t)&&"undefined"!=typeof MutationObserver&&(Vd=i,Pd=new MutationObserver((()=>{Vd&&Gd(Vd)})),Pd.observe(document.documentElement,{childList:!0,subtree:!0}))}var i;const o=t=>e?`${t}:not([${Dd}])`:t,n=`${Od.map(o).join(",\n")} { display: none !important; }`,s=`${$d.map(o).join(",\n")} { display: contents !important; color: inherit !important; -webkit-text-fill-color: inherit !important; background-color: transparent !important; border-bottom-color: transparent !important; text-decoration: none !important; box-shadow: none !important; }`,r=document.createElement("style");r.id=Ld,r.textContent=`${n}\n${s}\n* { cursor: none !important; }`,document.head.appendChild(r),Zd(),"undefined"!=typeof MutationObserver&&(Rd=new MutationObserver((()=>Zd())),Rd.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["style"]})),Ud(`injected hide stylesheet (keptAny=${e}, hide=${Od.length}, neutralize=${$d.length})`)}function Yd(){var t;null===(t=document.getElementById(Ld))||void 0===t||t.remove(),Rd&&(Rd.disconnect(),Rd=null),Fd.forEach((({el:t,value:e,priority:i,isPin:o})=>{o?t.style.removeProperty("cursor"):t.style.setProperty("cursor",e,i)})),Fd=[],jd=new WeakSet,Pd&&(Pd.disconnect(),Pd=null),Vd=null,document.querySelectorAll(`[${Dd}]`).forEach((t=>t.removeAttribute(Dd)))}function qd(){var t;const e=null===(t=navigator.userAgentData)||void 0===t?void 0:t.brands;if(e&&e.length)return e.some((t=>/Chromium|Google Chrome|Microsoft Edge/i.test(t.brand)));const i=navigator.userAgent;return/Chrome|Chromium|Edg\//.test(i)&&!/Firefox|FxiOS/.test(i)}function Qd(){return!("undefined"==typeof navigator||!navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.getDisplayMedia)&&(qd()||function(){const t=navigator.userAgent;return/Safari/.test(t)&&/Apple/.test(navigator.vendor||"")&&!/Chrome|Chromium|CriOS|Edg\/|FxiOS|Android/.test(t)}())}class Xd{constructor(){this.name="native",this.stream=null,this.video=null,this.surface=void 0,this.cropEl=null,this.lastDebug=null,this.initPromise=null,this.onEnded=null}isSupported(){return"undefined"!=typeof navigator&&!!navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia}getCapability(){return qd()?"tab-region":"screen-crop"}isActive(){return!!this.stream&&!!this.video}getSurface(){return this.surface}getDebugInfo(){return this.lastDebug}async init(){if(!this.isSupported())throw new Error("native-not-supported");if(!this.isActive())return this.initPromise||(this.initPromise=this.runInit().finally((()=>{this.initPromise=null}))),this.initPromise}async runInit(){var t;const e=this.getCapability(),i="tab-region"===e?{video:{displaySurface:"browser"},preferCurrentTab:!0,selfBrowserSurface:"include",audio:!1}:{video:!0,audio:!1};let o;try{o=await navigator.mediaDevices.getDisplayMedia(i)}catch(t){throw t&&"object"==typeof t&&(t.sfNativeExpected=!0),t}let n=null;try{const i=o.getVideoTracks()[0];if(!i)throw new Error("native-no-video-track");if(this.surface=i.getSettings().displaySurface,"tab-region"===e){if("browser"!==this.surface){const e=null!==(t=this.surface)&&void 0!==t?t:"screen";throw new Error(`Shared a ${e}; re-init and pick "This tab".`)}await this.applyViewportCrop(i)}if(i.addEventListener("ended",(()=>this.handleEnded())),n=document.createElement("video"),n.srcObject=o,n.muted=!0,n.setAttribute("playsinline",""),n.style.cssText="position:fixed;left:-99999px;top:0;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(n),await n.play(),"ended"===i.readyState)throw new Error("native-share-ended-during-init");this.stream=o,this.video=n}catch(t){throw o.getTracks().forEach((t=>t.stop())),n&&(n.srcObject=null,n.remove()),this.removeCropEl(),this.surface=void 0,t}}async capture(t={}){if(!this.stream||!this.video)throw new Error("capture-not-initialized");const e=t.focusAnnotationId;Sd()&&"undefined"!=typeof console&&console.log("[sf-capture][native] capture(): focusAnnotationId =",JSON.stringify(e));const i=performance.now(),o=this.video;return"tab-region"===this.getCapability()?this.captureTabRegion(o,i,e):this.captureScreenCrop(o,i,e)}async captureTabRegion(t,e,i){if("browser"!==this.surface)throw new Error("not-sharing-this-tab");const{canvas:o,page:n,frameW:s,frameH:r}=await this.grabFullFrame(t,i);let a=o;const l=n.viewportW*n.dpr;if(l>0&&s>1.5*l)throw new Error("frame-larger-than-viewport");const c=s/n.viewportW,d=Math.min(s,Math.round(n.viewportW*c)),h=Math.round(n.viewportH*c),u=a.height>h+2||a.width>d+2;u&&(a=_d(a,0,0,d,h)),this.lastDebug={capability:"tab-region",surface:this.surface,cropApplied:!!this.cropEl,frameW:s,frameH:r,viewportW:n.viewportW,viewportH:n.viewportH,dpr:n.dpr,cssToFrame:c,croppedW:a.width,croppedH:a.height,clampedHeight:u},this.logDebug();const p=Id(a,2560);a=p.canvas;const{blob:v,type:f}=await Nd(a,.9),g=performance.now()-e;return{blob:v,width:a.width,height:a.height,mode:this.name,durationMs:g,page:n,scope:"viewport",blobType:f,markerMapping:{scaleX:c*p.ratio,scaleY:c*p.ratio,originXCss:n.scrollX,originYCss:n.scrollY}}}async captureScreenCrop(t,e,i){const{canvas:o,page:n,frameW:s,frameH:r}=await this.grabFullFrame(t,i),a=this.computeScreenCrop(s,r);let l=_d(o,a.cropX,a.cropY,a.cropW,a.cropH);const c=a.scale;this.lastDebug={capability:"screen-crop",surface:this.surface,cropApplied:!1,frameW:s,frameH:r,viewportW:n.viewportW,viewportH:n.viewportH,dpr:n.dpr,cssToFrame:c,croppedW:l.width,croppedH:l.height,clampedHeight:!0,screenCrop:a},this.logDebug();const d=Id(l,2560);l=d.canvas;const{blob:h,type:u}=await Nd(l,.9),p=performance.now()-e;return{blob:h,width:l.width,height:l.height,mode:this.name,durationMs:p,page:n,scope:"viewport",blobType:u,markerMapping:{scaleX:c*d.ratio,scaleY:c*d.ratio,originXCss:n.scrollX,originYCss:n.scrollY}}}computeScreenCrop(t,e){const i=window.innerWidth,o=window.innerHeight,n=Math.max(0,window.outerHeight-window.innerHeight),s="window"===this.surface,r=s?window.outerWidth:window.screen.width,a=s?window.screenX:0,l=s?window.screenY:0,c=r>0?t/r:1,d=window.screenX-a,h=window.screenY+n-l;let u=Math.round(d*c),p=Math.round(h*c),v=Math.round(i*c),f=Math.round(o*c);return u=Math.max(0,Math.min(u,t-1)),p=Math.max(0,Math.min(p,e-1)),v=Math.max(1,Math.min(v,t-u)),f=Math.max(1,Math.min(f,e-p)),{cropX:u,cropY:p,cropW:v,cropH:f,scale:c,chromeTopCss:n,surfaceWidthCss:r}}async grabFullFrame(t,e){e&&await function(t,e=1200){return!t||Wd(t)?Promise.resolve(!!t&&Wd(t)):new Promise((i=>{let o=!1;const n=e=>{o||(o=!0,clearTimeout(r),s.disconnect(),Ud(`waitForAnnotationHost(${JSON.stringify(t)}) -> ${e?"found":"timeout"}`),i(e))},s=new MutationObserver((()=>{Wd(t)&&n(!0)}));s.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["id","data-velt-id"]});const r=setTimeout((()=>n(!1)),Math.max(0,e))}))}(e),Jd(e),Kd(e,"post-hide");try{await Md(2),await Td(t,3),await Td(t,1);const i=function(){const t=document.documentElement;return{scrollX:window.scrollX,scrollY:window.scrollY,viewportW:t.clientWidth,viewportH:t.clientHeight,dpr:window.devicePixelRatio||1}}(),o=t.videoWidth,n=t.videoHeight;if(!o||!n)throw new Error("capture-no-frame");const s=document.createElement("canvas");s.width=o,s.height=n;const r=s.getContext("2d");if(!r)throw new Error("canvas-2d-unavailable");return Kd(e,"pre-draw"),r.drawImage(t,0,0),{canvas:s,page:i,frameW:o,frameH:n}}finally{Yd()}}logDebug(){Sd()&&"undefined"!=typeof console&&console.info("[sf-capture][native]",this.lastDebug)}dispose(){this.stream&&this.stream.getTracks().forEach((t=>t.stop())),this.video&&(this.video.srcObject=null,this.video.remove()),this.removeCropEl(),this.stream=null,this.video=null,this.surface=void 0}handleEnded(){var t;this.removeCropEl(),this.stream=null,this.video&&(this.video.srcObject=null,this.video.remove()),this.video=null,this.surface=void 0,null===(t=this.onEnded)||void 0===t||t.call(this)}async applyViewportCrop(t){const e=window.CropTarget,i=t;if(e&&"function"==typeof i.cropTo)try{const t=document.createElement("div");t.setAttribute("data-sf-capture-viewport",""),t.style.cssText="position:fixed;inset:0;pointer-events:none;opacity:0;z-index:-1;margin:0;",document.body.appendChild(t),this.cropEl=t;const o=await e.fromElement(t);await i.cropTo(o)}catch{this.removeCropEl()}}removeCropEl(){var t;null===(t=this.cropEl)||void 0===t||t.remove(),this.cropEl=null}}var th=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class eh extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this.showTourCommentTooltip=!1,this.firstCommentNudge=!1,this.allFeatureDisabled=!1,this.allFeatureRestricted=!1,this.guestMode=!1,this._expanded=!0,this.loading=!0,this._isPlanExpired=null,this.showOnboardingModal=!0,this.embedMode=!1,this.readOnlyMode=!1,this.autoCommentModeRequested=!1,this.autoCommentModeArmedOnce=!1,this.agentCommentsModeRequested=!1,this.previewLocationPath="",this.showLiveDemoModal=!1,this.showFigmaDemoModal=!1,this.showGuestModeSignInModal=!1,this.defaultGuestModeSignInModalConfig={title:"Sign in to notify your team",description:"Notify your team about your latest comments.",closeOnClickOutside:!1,showLeaveCommentButton:!0},this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig)),this.showGuestModeNameModal=!1,this.guestModeSignInBannerVisible=!1,this.guestUserNameInput="",this.guestUserModelOpened=!1,this.guestUserNameUpdated=!1,this.guestUserNameUpdateLoading=!1,this.staging=Ce,this._autoLocation=!0,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this._isUserGlobalContact=!1,this.showQrCode=!1,this.customLoginEnabledLocally=null,this.customLoginEnabled=null,this.exitReviewModeCalled=!1,this.addCommentCount=0,this._privateCommentModeEnabled=!1,this.superflowToolbarMoved=!1,this._darkMode=!1,this.allowGuestModeSignIn=!0,this._queryParamsComments=!1,this._usePageTitleAsLocationName=!1,this.toolbarEnabled=!1,this.toolbarEnabledApiCalled=!1,this.passwordProtected=!1,this.isPasswordValid=!1,this.password="",this.validatingPasswordLoading=!1,this.showPasswordProtectedModal=!1,this.showInvalidPassword=!1,this.skipGuestNameModal=!1,this._totalViews={},this.totalViewsCount=0,this.inviteUrl="",this.showModalOnceCommentIsModeIsOff=!1,this.showInviteModal=!1,this.featureAccess=null,this.hasAgentAccess=!1,this.hasPrivateCommentsAccess=!1,this.isPrivateCommentsEnabledOnWorkspace=!1,this.visibilityOptionsEnabled=!1,this.hasContentWarnings=!1,this.contentWarningsCount=0,this.showContentWarningSidebar=!1,this.showAgentCommentsInSidebar=!1,this.veltProxyToggleVisible=!1,this.nativeScreenshotEnabled=!1,this.nativeScreenshotDenied=!1,this.capturingScreenshot=!1,this.nativeCapture=new Xd,this.screenshotChain=Promise.resolve(),this.pendingScreenshotCount=0,this.nativeScreenshotEnabling=!1,this.addCommentAnnotationSubscribedEl=void 0,this.isSettingSidebarData=!1,this.agentGroups=[],this.agentNameMap=new Map,this.agentNamesFetched=!1,this.spellingSuggestionPagePathMap=new Map,this.grammarSuggestionPagePathMap=new Map,this.processingAnnotationIds=new Set,this.subscriptions=[],this.onApiKeyChange=()=>{try{this.apiKey&&(null===window||void 0===window?void 0:window.onSuperflowLoad)&&"function"==typeof window.onSuperflowLoad&&window.onSuperflowLoad()}catch(t){console.warn("Error in onApiKeyChange: ",t),Gc("Error in onApiKeyChange: ",t)}},this.checkCustomLoginEnabled=async()=>{var t;try{const e=await nd(this.apiKey);this.customLoginEnabled=!!(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.customLoginEnabled),this.customLoginEnabled&&this.loginWithCustomUser()}catch(t){this.customLoginEnabled=!1,console.warn("Error in checkCustomLoginEnabled: ",t),Gc("Error in checkCustomLoginEnabled: ",t)}},this.isRunningUnderPreviewProxy=(t=document.location)=>{try{const e=(null==t?void 0:t.hostname)||"",i=(null==t?void 0:t.pathname)||"";return At.some((({hostSuffix:t,pathPrefix:o})=>(e===t||e.endsWith(`.${t}`))&&i.startsWith(o)))}catch(t){return console.warn("Error in isRunningUnderPreviewProxy: ",t),!1}},this.previewProxyReadOnlyGuardInstalled=!1,this.previewProxyReadOnlyStyleObserver=null,this.previewProxyReadOnlySweepScheduled=!1,this.isPreviewProxyReadOnlyViewer=()=>{try{return this.isRunningUnderPreviewProxy()&&"Admin"!==this.snippylyUserRole}catch(t){return console.warn("Error in isPreviewProxyReadOnlyViewer: ",t),!1}},this.isSuggestionActionEventPath=t=>{try{return(t||[]).some((t=>{const e="string"==typeof(null==t?void 0:t.tagName)?t.tagName.toLowerCase():"";if(e.startsWith("velt-comment-dialog-suggestion-action")||e.startsWith("velt-comment-dialog-legacy-suggestion-action"))return!0;const i=null==t?void 0:t.classList;return!!(null==i?void 0:i.contains)&&(i.contains("sf-accept-btn")||i.contains("sf-reject-btn")||i.contains("velt-suggestion-actions"))}))}catch(t){return console.warn("Error in isSuggestionActionEventPath: ",t),!1}},this.setupPreviewProxySuggestionReadOnlyGuard=()=>{try{if(this.previewProxyReadOnlyGuardInstalled)return;this.previewProxyReadOnlyGuardInstalled=!0,document.addEventListener("click",(t=>{try{if(!this.isPreviewProxyReadOnlyViewer())return;const e="function"==typeof t.composedPath?t.composedPath():[];this.isSuggestionActionEventPath(e)&&(t.stopImmediatePropagation(),t.preventDefault(),console.warn("[CWS Toolbar] Suggestion accept/reject is read-only for preview viewers. Click ignored."))}catch(t){console.warn("Error in preview-proxy read-only click guard: ",t)}}),{capture:!0})}catch(t){console.warn("Error in setupPreviewProxySuggestionReadOnlyGuard: ",t),Gc("Error in setupPreviewProxySuggestionReadOnlyGuard: ",t)}},this.applyPreviewProxyReadOnlyStyles=()=>{try{if(!this.isPreviewProxyReadOnlyViewer())return void this.removePreviewProxyReadOnlyStyles();this.sweepPreviewProxyReadOnlyStyles(),this.previewProxyReadOnlyStyleObserver||(this.previewProxyReadOnlyStyleObserver=new MutationObserver((()=>{try{if(this.previewProxyReadOnlySweepScheduled)return;this.previewProxyReadOnlySweepScheduled=!0,requestAnimationFrame((()=>{this.previewProxyReadOnlySweepScheduled=!1,this.isPreviewProxyReadOnlyViewer()&&this.sweepPreviewProxyReadOnlyStyles()}))}catch(t){console.warn("Error in preview-proxy read-only style observer: ",t)}})),this.previewProxyReadOnlyStyleObserver.observe(document.body,{childList:!0,subtree:!0}))}catch(t){console.warn("Error in applyPreviewProxyReadOnlyStyles: ",t),Gc("Error in applyPreviewProxyReadOnlyStyles: ",t)}},this.sweepPreviewProxyReadOnlyStyles=()=>{try{this.injectPreviewProxyReadOnlyStyle(document.head);const t=e=>{e.querySelectorAll("*").forEach((e=>{var i,o;const n=(null===(o=null===(i=e.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i))||"";if(!n.startsWith("velt-")&&!n.startsWith("snippyly-"))return;const s=e.shadowRoot;s&&(this.injectPreviewProxyReadOnlyStyle(s),t(s))}))};t(document.body)}catch(t){console.warn("Error in sweepPreviewProxyReadOnlyStyles: ",t)}},this.injectPreviewProxyReadOnlyStyle=t=>{try{if(t.querySelector(`style[${eh.PREVIEW_READONLY_STYLE_ATTR}]`))return;const e=document.createElement("style");e.setAttribute(eh.PREVIEW_READONLY_STYLE_ATTR,"true"),e.textContent=eh.PREVIEW_READONLY_CSS,t.appendChild(e)}catch(t){console.warn("Error in injectPreviewProxyReadOnlyStyle: ",t)}},this.removePreviewProxyReadOnlyStyles=()=>{try{this.previewProxyReadOnlyStyleObserver&&(this.previewProxyReadOnlyStyleObserver.disconnect(),this.previewProxyReadOnlyStyleObserver=null);const t=`style[${eh.PREVIEW_READONLY_STYLE_ATTR}]`;document.querySelectorAll(t).forEach((t=>t.remove()));const e=i=>{i.querySelectorAll("*").forEach((i=>{const o=i.shadowRoot;o&&(o.querySelectorAll(t).forEach((t=>t.remove())),e(o))}))};e(document.body)}catch(t){console.warn("Error in removePreviewProxyReadOnlyStyles: ",t)}},this.loginWithCustomUser=()=>{try{this.customLoginEnabled?(Ic(Dt),this.loadPlugin&&this.documentId&&this.identifySnippyly()):console.warn("Identify call not allowed.")}catch(t){console.warn("Error in loginWithCustomUser: ",t),Gc("Error in loginWithCustomUser: ",t)}},this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t),Gc("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t),Gc("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t),Gc("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};const e=history.replaceState;history.replaceState=function(){const t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t),Gc("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{try{this.setInviteUrl();const t=new URL(document.location),e=t.searchParams;e.has(Ot)&&Tc(Et,"true",!1);let i=!1;for(const t of[St,Mt,Tt,_t])e.has(t)&&("true"===e.get(t)?Tc(t,"true",!1,"sessionStorage"):Ic(t,"sessionStorage"),e.delete(t),i=!0);this.embedMode="true"===_c(St,!1,"sessionStorage"),this.readOnlyMode="true"===_c(Tt,!1,"sessionStorage"),this.autoCommentModeRequested=!this.readOnlyMode&&"true"===_c(Mt,!1,"sessionStorage"),this.agentCommentsModeRequested="true"===_c(_t,!1,"sessionStorage");const o=e.get(It);if(o&&(Tc(It,o,!1,"sessionStorage"),e.delete(It),i=!0),this.previewLocationPath=_c(It,!1,"sessionStorage")||"",i&&window.history.replaceState({},document.title,t.href),(null==e?void 0:e.has(Rt))&&!_c(Rt)?this.showOnboardingModal=!0:this.showOnboardingModal=!1,null==e?void 0:e.has(Ut))if(_c(Ut,!1,"sessionStorage")){this.showLiveDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Ut),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showLiveDemoModal=!0;else this.showLiveDemoModal=!1;if(null==e?void 0:e.has(zt))if(_c(zt,!1)){this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(zt),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showFigmaDemoModal=!0;else this.showFigmaDemoModal=!1;if(e.has(Lt)||e.has("snippyly_google_token")){if(e.has(Lt)){const t=decodeURIComponent(e.get(Lt)),i=Oc(t,Ee,ke),o=i&&JSON.parse(i);if(o){const t={};t.userId=o.uid,t.name=o.displayName,t.email=o.email,t.photoUrl=null==o?void 0:o.photoURL;const e=JSON.stringify(t),i=Nc(e,Ee,ke);Tc(Dt,i,!0),Ic(Ht)}}else if(e.has("snippyly_google_token")){const t=JSON.parse(atob(e.get("snippyly_google_token"))),i={};i.userId=t.uid,i.name=t.displayName,i.email=t.email,i.photoUrl=null==t?void 0:t.photoURL,Tc($t,JSON.stringify(i),!0)}e.delete(Lt),e.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}e.has(Et)?(Tc(Et,"true",!1),Ic(kt),e.delete(Et),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(kt)||_c(Et,!1)&&this.loadPluginUI(),e.has(kt)?(Tc(kt,"true",!1),Ic(Et),e.delete(kt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(Et)||_c(kt,!1)&&this.loadPluginUI(),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t),Gc("Error in checkUrl: ",t)}},this.setInviteUrl=()=>{try{const t=new URL(document.location);t.searchParams.has(Et)||t.searchParams.set(Et,"true"),this.inviteUrl=t.toString()}catch(t){console.warn("Error in setInviteUrl: ",t),Gc("Error in setInviteUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&Tc(Ft,this.projectVersion,!1,"sessionStorage")}else{const t=new URL(document.location).searchParams;(t.has(Et)||t.has(kt))&&t.has(jt)&&(Tc(Vt,jt,!1,"sessionStorage"),this.projectVersion=t.get(jt),this.projectVersion&&Tc(Ft,this.projectVersion,!1,"sessionStorage"))}}catch(t){console.warn("Error in detectVersion: ",t),Gc("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||_c(Vt,!1,"sessionStorage"),e=this.projectVersion||_c(Ft,!1,"sessionStorage");if(t&&e){const i=new URL(document.location),o=i.searchParams;o.get(t)||(o.set(t,e),window.history.replaceState({},document.title,i.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t),Gc("Error in setVersionInUrl: ",t)}},this.loadPluginUI=async()=>{var t,e,i,o,n,s,r,a;try{if(!this.apiKey)return;if(!this.projectId)return;if(this.loadPlugin)return this.generateLocation(),this.setLocation(),this.setPreviewLocationFromPath(),void setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}),this.setPreviewLocationFromPath())}}),4e3);if(this.toolbarEnabledApiCalled||await this.detectToolbarEnabled(),!this.toolbarEnabled)return;wt.includes(this.apiKey)&&this.listenToDocumentTitleChange();const l=$c();l&&!(null==l?void 0:l.isAnonymous)&&(this.loading=!0);try{this.customerMetadata=await this.getCustomerMetadata()}catch(t){console.warn("Error in getCustomerMetadata: ",t),Gc("Error in getCustomerMetadata: ",t)}if(Mc(Jt)&&(this.isPasswordValid=Mc(Jt)),this.projectConfig=await qc(this.apiKey,this.projectId),this.guestMode=!!(null===(t=this.projectConfig)||void 0===t?void 0:t.guestMode)||this.guestMode,this.allowGuestModeSignIn=!!(null===(i=null===(e=this.projectConfig)||void 0===e?void 0:e.guestModeConfig)||void 0===i?void 0:i.allowSignIn),this.queryParamsComments=!!(null===(o=this.projectConfig)||void 0===o?void 0:o.queryParamsComments),this.usePageTitleAsLocationName=!!(null===(n=this.projectConfig)||void 0===n?void 0:n.usePageTitleAsLocationName),(null===(s=this.projectConfig)||void 0===s?void 0:s.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.passwordProtected=!!(null===(a=null===(r=this.projectConfig)||void 0===r?void 0:r.passwordProtected)||void 0===a?void 0:a.enabled),Tc(Wt,this.guestMode+"",!0),Tc(Qt,this.allowGuestModeSignIn+"",!0),Tc(Gt,this.passwordProtected+"",!0),Tc(Kt,this.queryParamsComments+"",!0),Tc(Zt,this.usePageTitleAsLocationName+"",!0),this.loadPlugin=!0,!document.querySelector(fe.VELT_COMMENTS)){const t=document.createElement(fe.VELT_COMMENTS);t.setAttribute("filter-comments-on-dom","true"),t.setAttribute("shadow-dom","true"),null==t||t.addEventListener("onSignIn",(()=>{this.loginWithGoogle()})),null==t||t.addEventListener("onUpgrade",(()=>{this.onUpgradePlanClick()})),t.addEventListener("onCommentAdd",(()=>{this.addCommentCount++})),t.addEventListener("onCommentUpdate",(t=>{var e,i;(null===(e=this.snippylyUser)||void 0===e?void 0:e.isGuest)&&"newlyAdded"===(null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.type)&&(this.addCommentCount>=2&&(this.showModalOnceCommentIsModeIsOff=!0),this.addCommentCount>=5&&!this.showModalOnceCommentIsModeIsOff&&(this.showModalOnceCommentIsModeIsOff=!0))})),window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_CURSOR)){const t=document.createElement(fe.VELT_CURSOR);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_HUDDLE)){const t=document.createElement(fe.VELT_HUDDLE);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_RECORDER_NOTES)){const t=document.createElement(fe.VELT_RECORDER_NOTES);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_RECORDER_CONTROL_PANEL)){const t=document.createElement(fe.VELT_RECORDER_CONTROL_PANEL);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_ARROWS)){const t=document.createElement(fe.VELT_ARROWS);window.document.body.appendChild(t)}try{const t=new URL(document.location),e=t.searchParams;let i=!1;e.has("wireframe")&&"true"===e.get("wireframe")&&(sessionStorage.setItem("velt-wireframe","true"),e.delete("wireframe"),i=!0),e.get("velt-version")&&(sessionStorage.setItem("velt-version",e.get("velt-version")),e.delete("velt-version"),i=!0),e.get("velt-env")&&(sessionStorage.setItem("velt-env",e.get("velt-env")),e.delete("velt-env"),i=!0),i&&window.history.replaceState({},document.title,t.href)}catch(t){}this.initializeSnippyly()}catch(t){this.loading=!1,console.warn("Error in loadPluginUI: ",t),Gc("Error in loadPluginUI: ",t)}},this.listenToDocumentTitleChange=()=>{try{this.documentTitleChangeInterval||(this.documentTitleChangeInterval=setInterval((()=>{var t,e,i;const o="true"===sessionStorage.getItem("debugDocumentTitleChange");if(o&&(console.log("*** listenToDocumentTitleChange ***"),console.log("usePageTitleAsLocationName: ",this.usePageTitleAsLocationName)),this.usePageTitleAsLocationName){const n=document.title;o&&(console.log("location name: ",null===(t=this.location)||void 0===t?void 0:t.locationName),console.log("title: ",n),console.log("changed: ",(null===(e=this.location)||void 0===e?void 0:e.locationName)!==n)),(null===(i=this.location)||void 0===i?void 0:i.locationName)!==n&&(o&&console.log("%c triggering location update!","color: green; font-weight: bold;"),this.generateLocation(),this.setLocation({forceSetLocation:!0}),this.setPreviewLocationFromPath())}}),2e3))}catch(t){Gc("Error in listenToDocumentTitleChange: ",t)}},this.initializeSnippyly=async()=>{var t,e,o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y,b,C,x,E,k,S,M;try{let T=this.staging?gt:mt;this.veltVersion&&(T=this.veltVersion);let _=this.staging,I=!1;if((null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-version"))&&(T=sessionStorage.getItem("velt-version")),null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-env")){"staging"===sessionStorage.getItem("velt-env")&&(_=!1,I=!0)}this.apiKey;this.veltProxyToggleVisible=!1;const A=void 0;if(await i(this.apiKey,{options:{develop:_,staging:I,version:T,velt:!0,proxyDomain:"https://cdn.velt.dev"},...A?{proxyConfig:A}:{}}),!window.Velt)return;if(this.autoTranslation&&(null===Velt||void 0===Velt?void 0:Velt.enableAutoTranslation)&&(null===Velt||void 0===Velt||Velt.enableAutoTranslation()),this.mountCommentSidebar(),Velt){null===Velt||void 0===Velt||Velt.sf(!0);try{window.dispatchEvent(new CustomEvent("onVeltLoad",{detail:{Velt}})),(null===window||void 0===window?void 0:window.onSnippylyLoad)&&(null===window||void 0===window||window.onSnippylyLoad(Velt))}catch(t){}document.body.style.setProperty("--velt-default-font-family","'Poppins', sans-serif"),(()=>{try{if(!document.getElementById("superflowFontLink3")){const t=document.createElement("link");t.rel="stylesheet",t.href="https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/fonts%2Fpoppins%2Fpoppins.css?alt=media&token=5f31a0f2-5f67-4974-bf56-78ae655f2b68",t.id="superflowFontLink3",document.head.appendChild(t)}}catch(t){console.warn("Error in loadPoppinsFont: ",t),Gc("Error in loadPoppinsFont: ",t)}})()}if(Velt&&(Bc({sdkVersion:null===Velt||void 0===Velt?void 0:Velt.version,sdkType:"client"}),console.log(`Velt Version: ${(null===Velt||void 0===Velt?void 0:Velt.version)||"unknown"}`),console.log(`Superflow Toolbar Version: ${ft}`)),this.generateDocumentId(),(null===Velt||void 0===Velt?void 0:Velt.on)&&"function"==typeof(null===Velt||void 0===Velt?void 0:Velt.on)){const e=$c(),i="true"===sessionStorage.getItem("debugUserUpdateEvent");this.previousVeltUserId=null!==(t=null==e?void 0:e.userId)&&void 0!==t?t:"default",i&&console.log("[Superflow Debug] Initialized previousVeltUserId:",this.previousVeltUserId),Velt.on("userUpdate").subscribe((async t=>{if(i&&console.log("User from event: UserUpdate",t),t){const e=t.userId;i&&console.log("[Superflow Debug] userUpdate event fired:",{previousVeltUserId:this.previousVeltUserId,currentUserId:e,userChanged:this.previousVeltUserId!==e}),this.previousVeltUserId!==e&&(i&&console.log("[Superflow Debug] User changed, calling setDocumentAndLocation"),await this.setDocumentAndLocation()),this.previousVeltUserId=e}})),i&&console.log("[Superflow Debug] Performing initial setDocumentAndLocation"),await this.setDocumentAndLocation()}else await this.setDocumentAndLocation();if(setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}),this.setPreviewLocationFromPath())}}),4e3),this.commentElement=null===Velt||void 0===Velt?void 0:Velt.getCommentElement(),this.contactElement=null===Velt||void 0===Velt?void 0:Velt.getContactElement(),this.rewriterElement=null===Velt||void 0===Velt?void 0:Velt.getRewriterElement(),this.presenceElement=null===Velt||void 0===Velt?void 0:Velt.getPresenceElement(),this.commentElement){this.readOnlyMode?"function"==typeof this.commentElement.enableTextComments&&this.commentElement.enableTextComments(!1):this.commentElement.enableTextComments(!0),this.customLoginEnabledLocally||this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachments(!0),(null===(e=this.commentElement)||void 0===e?void 0:e.showScreenSizeInfo)&&this.commentElement.showScreenSizeInfo(!0),(null===(o=this.commentElement)||void 0===o?void 0:o.enableDeviceInfo)&&this.commentElement.enableDeviceInfo(!0),this.commentElement.enableCommentIndex(!0),this.commentElement.onCommentModeChange&&this.commentElement.onCommentModeChange().subscribe((t=>{if(t&&this.readOnlyMode)return this.disableCommentMode(),void(this.addCommentMode=!1);this.addCommentMode=t,t&&this.autoCommentModeRequested&&(this.autoCommentModeArmedOnce=!0,this.firstCommentNudge&&(this.firstCommentNudge=!1,this.showTourCommentTooltip=!1),Tc(Bt,"true")),t&&this.promptNativeScreenshotForCommentMode(),this.addCommentMode||this.showModalOnceCommentIsModeIsOff&&(this.addCommentCount>=2&&!_c(Xt)&&(this.allowGuestModeSignIn?this.openGuestModeSignInModal():this.openGuestModeNameModel(),Tc(Xt,"true"),this.showModalOnceCommentIsModeIsOff=!1),this.addCommentCount>=5&&!this.showGuestModeSignInModal&&!_c(ee,!1,"sessionStorage")&&(this.showGuestModeSignInBanner(),Tc(ee,"true",!1,"sessionStorage"),this.showModalOnceCommentIsModeIsOff=!1))})),(null===(n=this.commentElement)||void 0===n?void 0:n.enableOrphanComments)&&this.commentElement.enableOrphanComments(),!this.readOnlyMode&&(null===(s=this.commentElement)||void 0===s?void 0:s.enablePersistentCommentMode)&&this.commentElement.enablePersistentCommentMode(),this.readOnlyMode||this.showFirstCommentNudge(),(null===(r=this.commentElement)||void 0===r?void 0:r.enableGhostComments)&&this.commentElement.enableGhostComments();const t=null===window||void 0===window?void 0:window.SUPERFLOW_CUSTOM_STATUSES;t&&"object"==typeof t&&(null===(a=this.commentElement)||void 0===a?void 0:a.setCustomStatus)&&this.commentElement.setCustomStatus(t),(null===(l=this.commentElement)||void 0===l?void 0:l.enableMinimap)&&!this.embedMode&&this.commentElement.enableMinimap(),(null===(c=this.commentElement)||void 0===c?void 0:c.setDStrategy)&&(null===(d=this.commentElement)||void 0===d||d.setDStrategy("dynamicId")),(null===(h=this.commentElement)||void 0===h?void 0:h.enableSidebarButtonOnCommentDialog)&&this.commentElement.enableSidebarButtonOnCommentDialog(),(null===(u=this.commentElement)||void 0===u?void 0:u.enableHotkey)&&this.commentElement.enableHotkey(),(null===(p=this.commentElement)||void 0===p?void 0:p.enableDeviceIndicatorOnCommentPins)&&this.commentElement.enableDeviceIndicatorOnCommentPins(),this.applyScreenshotSetting(),this.ensureAddCommentAnnotationSubscription(),(null===(g=null===(f=null===(v=this.customerMetadata)||void 0===v?void 0:v.superflow)||void 0===f?void 0:f.advancedFeatures)||void 0===g?void 0:g.hasCustomStatus)&&this.setCustomStatuses(),this.setQueryParamsCommentsInSdk(),this.checkToEnableUpgradeButton(),this.setupSidebarAgentCommentFilter(),this.setupVeltButtonClickListener(),this.maybeApplyVisibilityOptionsToCommentElement()}this.applyStorageFeatureAccess(),this.selectionElement=Velt.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.rewriterElement&&(null===(m=this.rewriterElement)||void 0===m||m.enableRewriter()),this.presenceElement&&(null===(w=this.presenceElement)||void 0===w?void 0:w.enableFlockMode)&&(null===(y=this.presenceElement)||void 0===y||y.enableFlockMode(!0)),(null===Velt||void 0===Velt?void 0:Velt.getDocElement)&&(this.docElement=Velt.getDocElement()),null===(E=(null===(b=this.docElement)||void 0===b?void 0:b.getDocumentMetadata)?null===(C=this.docElement)||void 0===C?void 0:C.getDocumentMetadata():null===(x=null===Velt||void 0===Velt?void 0:Velt.docService)||void 0===x?void 0:x.getDocumentMetadata$())||void 0===E||E.subscribe((t=>{var e,i;const o=(null===(e=null==t?void 0:t.superflow)||void 0===e?void 0:e.versions)?Object.values(null===(i=null==t?void 0:t.superflow)||void 0===i?void 0:i.versions):[],n=new URL(document.location).searchParams.get("version");if(n){const t=o.find((t=>t.id===n));t&&(this.version={id:t.id,name:t.versionName||t.id},this.setLocation())}})),(null===Velt||void 0===Velt?void 0:Velt.getViewsElement)&&(this.viewsElement=Velt.getViewsElement()),(null===(k=this.viewsElement)||void 0===k?void 0:k.getUniqueViewsByUser)&&(null===(M=null===(S=this.viewsElement)||void 0===S?void 0:S.getUniqueViewsByUser())||void 0===M||M.subscribe((t=>{this.totalViews=t}))),this.identifySnippyly()}catch(t){this.loading=!1,console.warn("Error in initializeSnippyly: ",t),Gc("Error in initializeSnippyly: ",t)}},this.generateDocumentId=()=>{try{this.documentId=xc(kc(window.location.origin))+"",this.projectId&&(this.documentId=this.projectId+""),this.serverDocumentId=(t=this.documentId+"")?`${xc(t)}`:void 0}catch(t){console.warn("Error in generateDocumentId: ",t),Gc("Error in generateDocumentId: ",t)}var t},this.setDocumentAndLocation=async()=>{try{this.generateDocumentId(),this.previousLocation=null,await(null===Velt||void 0===Velt?void 0:Velt.setDocumentId(this.documentId+"")),Bc({documentId:this.serverDocumentId,clientDocumentId:this.documentId}),this.generateLocation(),this.setLocation(),this.setPreviewLocationFromPath()}catch(t){console.warn("Error in setDocumentAndLocation: ",t),Gc("Error in setDocumentAndLocation: ",t)}},this.setPreviewLocationFromPath=()=>{try{if(!this.agentCommentsModeRequested||!this.previewLocationPath)return;if(!window.Velt||!(null===Velt||void 0===Velt?void 0:Velt.setLocation))return;const t={url:this.previewLocationPath},e=Sc(JSON.parse(JSON.stringify(t)));e&&(t.id=`${e}`),this.location=t,null===Velt||void 0===Velt||Velt.setLocation(JSON.parse(JSON.stringify(t))),Bc({clientLocation:t}),this.previousLocation=JSON.parse(JSON.stringify(t)),this.onVeltLocationChange()}catch(t){console.warn("Error in setPreviewLocationFromPath: ",t),Gc("Error in setPreviewLocationFromPath: ",t)}},this.checkToEnableUpgradeButton=()=>{var t,e;try{this.isPlanExpired&&this.isUserGlobalContact?(null===(t=this.commentElement)||void 0===t?void 0:t.enableUpgradeButton)&&this.commentElement.enableUpgradeButton():(null===(e=this.commentElement)||void 0===e?void 0:e.disableUpgradeButton)&&this.commentElement.disableUpgradeButton()}catch(t){console.warn("Error in checkToEnableUpgradeButton: ",t),Gc("Error in checkToEnableUpgradeButton: ",t)}},this.getCustomerMetadata=async()=>{try{const t=await td(this.apiKey);return(t=>{try{const e=t?JSON.stringify(t):"false";Tc(ie,e)}catch(t){console.warn("Error in setCustomerMetadataToStorage: ",t),Gc("Error in setCustomerMetadataToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getCustomerMetadata: ",t),Gc("Error in getCustomerMetadata: ",t);const e=(()=>{try{const t=_c(ie);return t?"false"===t?JSON.parse(JSON.stringify(we)):JSON.parse(t):null}catch(t){return console.warn("Error in getCustomerMetadataFromStorage: ",t),Gc("Error in getCustomerMetadataFromStorage: ",t),null}})();if(e)return e}},this.setCustomStatuses=async()=>{var t;try{const e=await ed(this.apiKey);if((null==e?void 0:e.success)&&(null==e?void 0:e.data)){const i=Object.values(e.data),o=this.sortCustomStatuses(i);o.length>0&&(null===(t=this.commentElement)||void 0===t?void 0:t.setCustomStatus)&&this.commentElement.setCustomStatus(o)}}catch(t){console.warn("Error in setCustomStatuses: ",t),Gc("Error in setCustomStatuses: ",t)}},this.sortCustomStatuses=t=>{try{const e=[...t].sort(((t,e)=>("number"==typeof t.order?t.order:Number.MAX_SAFE_INTEGER)-("number"==typeof e.order?e.order:Number.MAX_SAFE_INTEGER)));return e}catch(e){return console.warn("Error in sortCustomStatuses: ",e),Gc("Error in sortCustomStatuses: ",e),t}},this.getSamlConfig=async()=>{try{const t=await sd(this.apiKey);return(t=>{try{if(t){const e=JSON.stringify(t);Tc(se,e,!0)}}catch(t){console.warn("Error in setSamlConfigToStorage: ",t),Gc("Error in setSamlConfigToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getSamlConfig: ",t),Gc("Error in getSamlConfig: ",t);const e=(()=>{try{const t=_c(se,!0);return t?JSON.parse(t):null}catch(t){return console.warn("Error in getSamlConfigFromStorage: ",t),Gc("Error in getSamlConfigFromStorage: ",t),null}})();if(e)return e}},this.setLogos=()=>{var t,e,i,o,n,s,r,a,l,c,d,h;try{let u="light";this.privateCommentModeEnabled&&(u="dark");const p=null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.customBranding)||void 0===i?void 0:i.logoMark,v=null===(s=null===(n=null===(o=null==be?void 0:we)||void 0===o?void 0:o.customBranding)||void 0===n?void 0:n.logo)||void 0===s?void 0:s.logoMark,f=null===(l=null===(a=null===(r=this.customerMetadata)||void 0===r?void 0:r.superflow)||void 0===a?void 0:a.customBranding)||void 0===l?void 0:l.wordMark,g=null===(h=null===(d=null===(c=null==be?void 0:we)||void 0===c?void 0:c.customBranding)||void 0===d?void 0:d.logo)||void 0===h?void 0:h.wordMark;switch(u){case"light":this.logoMark=(null==p?void 0:p.lightUrl)||(null==p?void 0:p.darkUrl)||(null==v?void 0:v.lightUrl),this.wordMark=(null==f?void 0:f.lightUrl)||(null==f?void 0:f.darkUrl)||(null==g?void 0:g.lightUrl);break;case"dark":this.logoMark=(null==p?void 0:p.darkUrl)||(null==p?void 0:p.lightUrl)||(null==v?void 0:v.darkUrl),this.wordMark=(null==f?void 0:f.darkUrl)||(null==f?void 0:f.lightUrl)||(null==g?void 0:g.darkUrl)}}catch(t){console.warn("Error in setLogos: ",t),Gc("Error in setLogos: ",t)}},this.getLogoMark=()=>{var t;try{return(null===(t=this.logoMark)||void 0===t?void 0:t.includes("<svg"))?L`
4718
+ `}catch(t){return console.warn("Error in render: ",t),L``}}};Md.styles=kd,Sd([ot({type:Array})],Md.prototype,"agentGroups",void 0),Sd([ot({type:String})],Md.prototype,"currentPageUrl",void 0),Sd([nt()],Md.prototype,"openAccordions",void 0),Sd([nt()],Md.prototype,"currentView",void 0),Sd([nt()],Md.prototype,"selectedAgentId",void 0),Md=Sd([et("content-warning-sidebar")],Md);function Td(){try{return"undefined"!=typeof localStorage&&"true"===localStorage.getItem("sfScreenShotDebug")}catch{return!1}}function _d(t){return new Promise((e=>{let i=Math.max(1,t);const o=()=>{i-=1,i<=0?e():requestAnimationFrame(o)};requestAnimationFrame(o)}))}function Id(t,e,i=600){const o=t.requestVideoFrameCallback;return"function"!=typeof o?_d(e+2):new Promise((n=>{let s=Math.max(1,e),r=!1;const a=()=>{r||(r=!0,clearTimeout(l),n())},l=setTimeout(a,Math.max(0,i)),c=()=>{r||(s-=1,s<=0?a():o.call(t,c))};o.call(t,c)}))}function Ad(t,e,i,o,n){const s=Math.max(0,Math.round(e)),r=Math.max(0,Math.round(i)),a=Math.max(1,Math.min(Math.round(o),t.width-s)),l=Math.max(1,Math.min(Math.round(n),t.height-r)),c=document.createElement("canvas");c.width=a,c.height=l;const d=c.getContext("2d");if(!d)throw new Error("canvas-crop-failed");return d.drawImage(t,s,r,a,l,0,0,a,l),c}function Nd(t,e){const i=Math.max(t.width,t.height);if(i<=e)return{canvas:t,ratio:1};const o=e/i,n=Math.max(1,Math.round(t.width*o)),s=Math.max(1,Math.round(t.height*o)),r=document.createElement("canvas");r.width=n,r.height=s;const a=r.getContext("2d");return a?(a.imageSmoothingEnabled=!0,a.imageSmoothingQuality="high",a.drawImage(t,0,0,n,s),{canvas:r,ratio:o}):{canvas:t,ratio:1}}function Od(t,e,i){return new Promise((o=>{t.toBlob((t=>o(t)),e,i)}))}async function $d(t,e=.9){const i=await Od(t,"image/webp",e);if(i&&"image/webp"===i.type)return{blob:i,type:i.type};const o=await Od(t,"image/png");if(o)return{blob:o,type:"image/png"};throw new Error("canvas-encode-failed")}const Ld=["superflow-toolbar","snippyly-plugin","velt-shadow-dom-internal","snippyly-comment-pin-portal","snippyly-comment-pin","snippyly-area-pin-portal","velt-comment-pin-portal","velt-comment-pin","velt-area-pin-portal","snippyly-recorder-control-panel-internal","snippyly-live-state-sync-overlay",".comment-annotation-number","velt-comments","velt-comments-sidebar","velt-comments-sidebar-v2","velt-comment-tool","velt-cursor","velt-presence","velt-huddle","velt-arrows","velt-areas","velt-recorder-notes","velt-recorder-control-panel","velt-notifications-history-panel","velt-rewriter","velt-toast-popup","velt-root"],Dd=["snippyly-text-highlight","snippyly-comment-text-portal","snippyly-comment-text","velt-comment-text-portal","velt-comment-text"],Pd="sf-capture-hide-widgets",Vd="data-sf-capture-keep";let Fd=null,jd=null,Rd=[],Ud=new WeakSet,zd=null;function Bd(...t){Td()&&"undefined"!=typeof console&&console.log("[sf-capture][exclude]",...t)}const Hd=new Set(Ld.map((t=>t.toLowerCase())));function Wd(t){return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"')}function Gd(t){const e=Wd(t);return[`snippyly-comment-pin-portal[id="${e}"]`,`velt-comment-pin-portal[id="${e}"]`,`velt-comment-pin-portal[data-velt-id="${e}"]`,`snippyly-area-pin-portal[id="${e}"]`,`velt-area-pin-portal[id="${e}"]`,`velt-area-pin-portal[data-velt-id="${e}"]`,`snippyly-text-highlight[data-velt-id="${e}"]`,`velt-text-highlight[data-velt-id="${e}"]`].join(", ")}function Kd(t){if(!t)return!1;const e=Wd(t);return!!document.querySelector(`snippyly-comment-pin-portal[id="${e}"] snippyly-comment-pin, velt-comment-pin-portal[id="${e}"] velt-comment-pin, velt-comment-pin-portal[data-velt-id="${e}"] velt-comment-pin`)||(!!document.querySelector(`snippyly-text-highlight[data-velt-id="${e}"], velt-text-highlight[data-velt-id="${e}"]`)||!!document.querySelector(`snippyly-area-pin-portal[id="${e}"], velt-area-pin-portal[id="${e}"], velt-area-pin-portal[data-velt-id="${e}"]`))}function Zd(t){const e=Array.from(document.querySelectorAll(Gd(t)));for(const t of e){(i=t).setAttribute(Vd,""),i.querySelectorAll("*").forEach((t=>t.setAttribute(Vd,"")));let e=t.parentElement;for(;e;)e.setAttribute(Vd,""),e=e.parentElement}var i;return e}function Jd(t,e){if(!Td()||!t||"undefined"==typeof document)return;const i=t=>{const e=t.getBoundingClientRect();return[Math.round(e.x),Math.round(e.y),Math.round(e.width),Math.round(e.height)]},o=document.getElementById(Pd),n=document.querySelector(Gd(t));if(Bd(`[${e}] hideStyle=${!!o} keptHost=${!!n}`+(n?` keep=${n.hasAttribute(Vd)} display=${getComputedStyle(n).display}`:"")),n){Bd(`[${e}] kept host subtree:`,Array.from(n.querySelectorAll("*")).map((t=>{const e=t.shadowRoot;return{tag:t.tagName.toLowerCase(),keep:t.hasAttribute(Vd),display:getComputedStyle(t).display,vis:getComputedStyle(t).visibility,rect:i(t),painted:t.getClientRects().length>0,shadowKids:e?e.childElementCount:-1}})))}const s=Array.from(document.querySelectorAll("velt-shadow-dom-internal")).map((t=>({keep:t.hasAttribute(Vd),display:getComputedStyle(t).display,rect:i(t)}))).filter((t=>"none"!==t.display));Bd(`[${e}] visible <velt-shadow-dom-internal>: ${s.length}`,s);const r=Wd(t),a="snippyly-comment-pin, velt-comment-pin",l=document.querySelector(`snippyly-area-pin-portal[id="${r}"], velt-area-pin-portal[id="${r}"], velt-area-pin-portal[data-velt-id="${r}"]`);if(l){const o=e=>{const i=e.closest("snippyly-area-pin-portal, velt-area-pin-portal");if(i){const e=i.getAttribute("id")||i.getAttribute("data-velt-id")||"";return`area#${e.slice(0,6)}${e===t?"(FOCUSED)":""}`}const o=e.parentElement;return o?o.tagName.toLowerCase():"(detached)"},n=Array.from(document.querySelectorAll(".line")),s=Array.from(document.querySelectorAll(a));Bd(`[${e}] AREA focus: portal kept=${l.hasAttribute(Vd)} display=${getComputedStyle(l).display} rect=${JSON.stringify(i(l))} innerLines=${l.querySelectorAll(".line").length} innerPins=${l.querySelectorAll(a).length}`),Bd(`[${e}] AREA .line owners (total ${n.length}):`,Array.from(new Set(n.map(o)))),Bd(`[${e}] AREA <comment-pin> owners (total ${s.length}):`,s.map((t=>({owner:o(t),keep:t.hasAttribute(Vd),display:getComputedStyle(t).display,painted:t.getClientRects().length>0}))))}}function Yd(){document.querySelectorAll('[style*="cursor"]').forEach((t=>{const e=t.style.getPropertyValue("cursor");if(!e)return;if(Ud.has(t))return void("none"!==e&&t.style.setProperty("cursor","none","important"));if("none"===e)return;const i=t.style.getPropertyPriority("cursor");Rd.push({el:t,value:e,priority:i,isPin:e.includes("url(")&&"important"===i}),Ud.add(t),t.style.setProperty("cursor","none","important")})),Bd(`neutralized inline cursor(s): tracked=${Rd.length}`)}function qd(t){Qd();let e=!1;if(t){const o=Zd(t);e=o.length>0,function(t,e){if(Td()){Bd("keepAnnotationId =",JSON.stringify(t));for(const t of["snippyly-comment-pin-portal","velt-comment-pin-portal","snippyly-area-pin-portal","velt-area-pin-portal","snippyly-comment-text-portal","velt-comment-text-portal","snippyly-text-highlight","velt-text-highlight","velt-comment-text"]){const e=Array.from(document.querySelectorAll(t));Bd(`candidates <${t}>: ${e.length}`,e.map((t=>({id:t.getAttribute("id"),"data-velt-id":t.getAttribute("data-velt-id")}))))}Bd(`matched kept host(s): ${e.length}`),e.forEach(((t,e)=>{const i=[t.tagName.toLowerCase()];let o=t.parentElement;for(;o;){const t=o.tagName.toLowerCase();i.push(Hd.has(t)?`${t}(EXCLUDED-ANCESTOR)`:t),o=o.parentElement}Bd(` match[${e}] chain (self -> root):`,i.join(" > "))})),0===e.length&&Bd("No host matched the annotationId — the marker will be hidden. Compare the annotationId above against the candidate id / data-velt-id values.")}}(t,o),e&&(i=t)&&"undefined"!=typeof MutationObserver&&(jd=i,Fd=new MutationObserver((()=>{jd&&Zd(jd)})),Fd.observe(document.documentElement,{childList:!0,subtree:!0}))}var i;const o=t=>e?`${t}:not([${Vd}])`:t,n=`${Ld.map(o).join(",\n")} { display: none !important; }`,s=`${Dd.map(o).join(",\n")} { display: contents !important; color: inherit !important; -webkit-text-fill-color: inherit !important; background-color: transparent !important; border-bottom-color: transparent !important; text-decoration: none !important; box-shadow: none !important; }`,r=document.createElement("style");r.id=Pd,r.textContent=`${n}\n${s}\n* { cursor: none !important; }`,document.head.appendChild(r),Yd(),"undefined"!=typeof MutationObserver&&(zd=new MutationObserver((()=>Yd())),zd.observe(document.documentElement,{attributes:!0,subtree:!0,attributeFilter:["style"]})),Bd(`injected hide stylesheet (keptAny=${e}, hide=${Ld.length}, neutralize=${Dd.length})`)}function Qd(){var t;null===(t=document.getElementById(Pd))||void 0===t||t.remove(),zd&&(zd.disconnect(),zd=null),Rd.forEach((({el:t,value:e,priority:i,isPin:o})=>{o?t.style.removeProperty("cursor"):t.style.setProperty("cursor",e,i)})),Rd=[],Ud=new WeakSet,Fd&&(Fd.disconnect(),Fd=null),jd=null,document.querySelectorAll(`[${Vd}]`).forEach((t=>t.removeAttribute(Vd)))}function Xd(){var t;const e=null===(t=navigator.userAgentData)||void 0===t?void 0:t.brands;if(e&&e.length)return e.some((t=>/Chromium|Google Chrome|Microsoft Edge/i.test(t.brand)));const i=navigator.userAgent;return/Chrome|Chromium|Edg\//.test(i)&&!/Firefox|FxiOS/.test(i)}function th(){return!("undefined"==typeof navigator||!navigator.mediaDevices||"function"!=typeof navigator.mediaDevices.getDisplayMedia)&&(Xd()||function(){const t=navigator.userAgent;return/Safari/.test(t)&&/Apple/.test(navigator.vendor||"")&&!/Chrome|Chromium|CriOS|Edg\/|FxiOS|Android/.test(t)}())}class eh{constructor(){this.name="native",this.stream=null,this.video=null,this.surface=void 0,this.cropEl=null,this.lastDebug=null,this.initPromise=null,this.onEnded=null}isSupported(){return"undefined"!=typeof navigator&&!!navigator.mediaDevices&&"function"==typeof navigator.mediaDevices.getDisplayMedia}getCapability(){return Xd()?"tab-region":"screen-crop"}isActive(){return!!this.stream&&!!this.video}getSurface(){return this.surface}getDebugInfo(){return this.lastDebug}async init(){if(!this.isSupported())throw new Error("native-not-supported");if(!this.isActive())return this.initPromise||(this.initPromise=this.runInit().finally((()=>{this.initPromise=null}))),this.initPromise}async runInit(){var t;const e=this.getCapability(),i="tab-region"===e?{video:{displaySurface:"browser"},preferCurrentTab:!0,selfBrowserSurface:"include",audio:!1}:{video:!0,audio:!1};let o;try{o=await navigator.mediaDevices.getDisplayMedia(i)}catch(t){throw t&&"object"==typeof t&&(t.sfNativeExpected=!0),t}let n=null;try{const i=o.getVideoTracks()[0];if(!i)throw new Error("native-no-video-track");if(this.surface=i.getSettings().displaySurface,"tab-region"===e){if("browser"!==this.surface){const e=null!==(t=this.surface)&&void 0!==t?t:"screen";throw new Error(`Shared a ${e}; re-init and pick "This tab".`)}await this.applyViewportCrop(i)}if(i.addEventListener("ended",(()=>this.handleEnded())),n=document.createElement("video"),n.srcObject=o,n.muted=!0,n.setAttribute("playsinline",""),n.style.cssText="position:fixed;left:-99999px;top:0;width:1px;height:1px;opacity:0;pointer-events:none;",document.body.appendChild(n),await n.play(),"ended"===i.readyState)throw new Error("native-share-ended-during-init");this.stream=o,this.video=n}catch(t){throw o.getTracks().forEach((t=>t.stop())),n&&(n.srcObject=null,n.remove()),this.removeCropEl(),this.surface=void 0,t}}async capture(t={}){if(!this.stream||!this.video)throw new Error("capture-not-initialized");const e=t.focusAnnotationId;Td()&&"undefined"!=typeof console&&console.log("[sf-capture][native] capture(): focusAnnotationId =",JSON.stringify(e));const i=performance.now(),o=this.video;return"tab-region"===this.getCapability()?this.captureTabRegion(o,i,e):this.captureScreenCrop(o,i,e)}async captureTabRegion(t,e,i){if("browser"!==this.surface)throw new Error("not-sharing-this-tab");const{canvas:o,page:n,frameW:s,frameH:r}=await this.grabFullFrame(t,i);let a=o;const l=n.viewportW*n.dpr;if(l>0&&s>1.5*l)throw new Error("frame-larger-than-viewport");const c=s/n.viewportW,d=Math.min(s,Math.round(n.viewportW*c)),h=Math.round(n.viewportH*c),u=a.height>h+2||a.width>d+2;u&&(a=Ad(a,0,0,d,h)),this.lastDebug={capability:"tab-region",surface:this.surface,cropApplied:!!this.cropEl,frameW:s,frameH:r,viewportW:n.viewportW,viewportH:n.viewportH,dpr:n.dpr,cssToFrame:c,croppedW:a.width,croppedH:a.height,clampedHeight:u},this.logDebug();const p=Nd(a,2560);a=p.canvas;const{blob:v,type:f}=await $d(a,.9),g=performance.now()-e;return{blob:v,width:a.width,height:a.height,mode:this.name,durationMs:g,page:n,scope:"viewport",blobType:f,markerMapping:{scaleX:c*p.ratio,scaleY:c*p.ratio,originXCss:n.scrollX,originYCss:n.scrollY}}}async captureScreenCrop(t,e,i){const{canvas:o,page:n,frameW:s,frameH:r}=await this.grabFullFrame(t,i),a=this.computeScreenCrop(s,r);let l=Ad(o,a.cropX,a.cropY,a.cropW,a.cropH);const c=a.scale;this.lastDebug={capability:"screen-crop",surface:this.surface,cropApplied:!1,frameW:s,frameH:r,viewportW:n.viewportW,viewportH:n.viewportH,dpr:n.dpr,cssToFrame:c,croppedW:l.width,croppedH:l.height,clampedHeight:!0,screenCrop:a},this.logDebug();const d=Nd(l,2560);l=d.canvas;const{blob:h,type:u}=await $d(l,.9),p=performance.now()-e;return{blob:h,width:l.width,height:l.height,mode:this.name,durationMs:p,page:n,scope:"viewport",blobType:u,markerMapping:{scaleX:c*d.ratio,scaleY:c*d.ratio,originXCss:n.scrollX,originYCss:n.scrollY}}}computeScreenCrop(t,e){const i=window.innerWidth,o=window.innerHeight,n=Math.max(0,window.outerHeight-window.innerHeight),s="window"===this.surface,r=s?window.outerWidth:window.screen.width,a=s?window.screenX:0,l=s?window.screenY:0,c=r>0?t/r:1,d=window.screenX-a,h=window.screenY+n-l;let u=Math.round(d*c),p=Math.round(h*c),v=Math.round(i*c),f=Math.round(o*c);return u=Math.max(0,Math.min(u,t-1)),p=Math.max(0,Math.min(p,e-1)),v=Math.max(1,Math.min(v,t-u)),f=Math.max(1,Math.min(f,e-p)),{cropX:u,cropY:p,cropW:v,cropH:f,scale:c,chromeTopCss:n,surfaceWidthCss:r}}async grabFullFrame(t,e){e&&await function(t,e=1200){return!t||Kd(t)?Promise.resolve(!!t&&Kd(t)):new Promise((i=>{let o=!1;const n=e=>{o||(o=!0,clearTimeout(r),s.disconnect(),Bd(`waitForAnnotationHost(${JSON.stringify(t)}) -> ${e?"found":"timeout"}`),i(e))},s=new MutationObserver((()=>{Kd(t)&&n(!0)}));s.observe(document.documentElement,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["id","data-velt-id"]});const r=setTimeout((()=>n(!1)),Math.max(0,e))}))}(e),qd(e),Jd(e,"post-hide");try{await _d(2),await Id(t,3),await Id(t,1);const i=function(){const t=document.documentElement;return{scrollX:window.scrollX,scrollY:window.scrollY,viewportW:t.clientWidth,viewportH:t.clientHeight,dpr:window.devicePixelRatio||1}}(),o=t.videoWidth,n=t.videoHeight;if(!o||!n)throw new Error("capture-no-frame");const s=document.createElement("canvas");s.width=o,s.height=n;const r=s.getContext("2d");if(!r)throw new Error("canvas-2d-unavailable");return Jd(e,"pre-draw"),r.drawImage(t,0,0),{canvas:s,page:i,frameW:o,frameH:n}}finally{Qd()}}logDebug(){Td()&&"undefined"!=typeof console&&console.info("[sf-capture][native]",this.lastDebug)}dispose(){this.stream&&this.stream.getTracks().forEach((t=>t.stop())),this.video&&(this.video.srcObject=null,this.video.remove()),this.removeCropEl(),this.stream=null,this.video=null,this.surface=void 0}handleEnded(){var t;this.removeCropEl(),this.stream=null,this.video&&(this.video.srcObject=null,this.video.remove()),this.video=null,this.surface=void 0,null===(t=this.onEnded)||void 0===t||t.call(this)}async applyViewportCrop(t){const e=window.CropTarget,i=t;if(e&&"function"==typeof i.cropTo)try{const t=document.createElement("div");t.setAttribute("data-sf-capture-viewport",""),t.style.cssText="position:fixed;inset:0;pointer-events:none;opacity:0;z-index:-1;margin:0;",document.body.appendChild(t),this.cropEl=t;const o=await e.fromElement(t);await i.cropTo(o)}catch{this.removeCropEl()}}removeCropEl(){var t;null===(t=this.cropEl)||void 0===t||t.remove(),this.cropEl=null}}var ih=function(t,e,i,o){for(var n,s=arguments.length,r=s<3?e:null===o?o=Object.getOwnPropertyDescriptor(e,i):o,a=t.length-1;a>=0;a--)(n=t[a])&&(r=(s<3?n(r):s>3?n(e,i,r):n(e,i))||r);return s>3&&r&&Object.defineProperty(e,i,r),r};class oh extends X{constructor(){super(),this._loadPlugin=!1,this.comments=[],this.addCommentMode=!1,this.showTourCommentTooltip=!1,this.firstCommentNudge=!1,this.allFeatureDisabled=!1,this.planLimitLocked=!1,this.projectDeleted=!1,this.allFeatureRestricted=!1,this.guestMode=!1,this._expanded=!0,this.loading=!0,this._isPlanExpired=null,this.showOnboardingModal=!0,this.embedMode=!1,this.readOnlyMode=!1,this.autoCommentModeRequested=!1,this.autoCommentModeArmedOnce=!1,this.agentCommentsModeRequested=!1,this.previewLocationPath="",this.showLiveDemoModal=!1,this.showFigmaDemoModal=!1,this.showGuestModeSignInModal=!1,this.defaultGuestModeSignInModalConfig={title:"Sign in to notify your team",description:"Notify your team about your latest comments.",closeOnClickOutside:!1,showLeaveCommentButton:!0},this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig)),this.showGuestModeNameModal=!1,this.guestModeSignInBannerVisible=!1,this.guestUserNameInput="",this.guestUserModelOpened=!1,this.guestUserNameUpdated=!1,this.guestUserNameUpdateLoading=!1,this.staging=Ce,this._autoLocation=!0,this.copyLinkTooltip="Copy Link",this.invalidApiKey=!1,this._isUserGlobalContact=!1,this.showQrCode=!1,this.customLoginEnabledLocally=null,this.customLoginEnabled=null,this.exitReviewModeCalled=!1,this.addCommentCount=0,this._privateCommentModeEnabled=!1,this.superflowToolbarMoved=!1,this._darkMode=!1,this.allowGuestModeSignIn=!0,this._queryParamsComments=!1,this._usePageTitleAsLocationName=!1,this.toolbarEnabled=!1,this.toolbarEnabledApiCalled=!1,this.passwordProtected=!1,this.isPasswordValid=!1,this.password="",this.validatingPasswordLoading=!1,this.showPasswordProtectedModal=!1,this.showInvalidPassword=!1,this.skipGuestNameModal=!1,this._totalViews={},this.totalViewsCount=0,this.inviteUrl="",this.showModalOnceCommentIsModeIsOff=!1,this.showInviteModal=!1,this.featureAccess=null,this.hasAgentAccess=!1,this.hasPrivateCommentsAccess=!1,this.isPrivateCommentsEnabledOnWorkspace=!1,this.visibilityOptionsEnabled=!1,this.hasContentWarnings=!1,this.contentWarningsCount=0,this.showContentWarningSidebar=!1,this.showAgentCommentsInSidebar=!1,this.veltProxyToggleVisible=!1,this.nativeScreenshotEnabled=!1,this.nativeScreenshotDenied=!1,this.capturingScreenshot=!1,this.nativeCapture=new eh,this.screenshotChain=Promise.resolve(),this.pendingScreenshotCount=0,this.nativeScreenshotEnabling=!1,this.addCommentAnnotationSubscribedEl=void 0,this.isSettingSidebarData=!1,this.agentGroups=[],this.agentNameMap=new Map,this.agentNamesFetched=!1,this.spellingSuggestionPagePathMap=new Map,this.grammarSuggestionPagePathMap=new Map,this.processingAnnotationIds=new Set,this.subscriptions=[],this.onApiKeyChange=()=>{try{this.apiKey&&(null===window||void 0===window?void 0:window.onSuperflowLoad)&&"function"==typeof window.onSuperflowLoad&&window.onSuperflowLoad()}catch(t){console.warn("Error in onApiKeyChange: ",t),Zc("Error in onApiKeyChange: ",t)}},this.checkCustomLoginEnabled=async()=>{var t;try{const e=await rd(this.apiKey);this.customLoginEnabled=!!(null===(t=null==e?void 0:e.data)||void 0===t?void 0:t.customLoginEnabled),this.customLoginEnabled&&this.loginWithCustomUser()}catch(t){this.customLoginEnabled=!1,console.warn("Error in checkCustomLoginEnabled: ",t),Zc("Error in checkCustomLoginEnabled: ",t)}},this.isRunningUnderPreviewProxy=(t=document.location)=>{try{const e=(null==t?void 0:t.hostname)||"",i=(null==t?void 0:t.pathname)||"";return At.some((({hostSuffix:t,pathPrefix:o})=>(e===t||e.endsWith(`.${t}`))&&i.startsWith(o)))}catch(t){return console.warn("Error in isRunningUnderPreviewProxy: ",t),!1}},this.previewProxyReadOnlyGuardInstalled=!1,this.previewProxyReadOnlyStyleObserver=null,this.previewProxyReadOnlySweepScheduled=!1,this.isPreviewProxyReadOnlyViewer=()=>{try{return this.isRunningUnderPreviewProxy()&&"Admin"!==this.snippylyUserRole}catch(t){return console.warn("Error in isPreviewProxyReadOnlyViewer: ",t),!1}},this.isSuggestionActionEventPath=t=>{try{return(t||[]).some((t=>{const e="string"==typeof(null==t?void 0:t.tagName)?t.tagName.toLowerCase():"";if(e.startsWith("velt-comment-dialog-suggestion-action")||e.startsWith("velt-comment-dialog-legacy-suggestion-action"))return!0;const i=null==t?void 0:t.classList;return!!(null==i?void 0:i.contains)&&(i.contains("sf-accept-btn")||i.contains("sf-reject-btn")||i.contains("velt-suggestion-actions"))}))}catch(t){return console.warn("Error in isSuggestionActionEventPath: ",t),!1}},this.setupPreviewProxySuggestionReadOnlyGuard=()=>{try{if(this.previewProxyReadOnlyGuardInstalled)return;this.previewProxyReadOnlyGuardInstalled=!0,document.addEventListener("click",(t=>{try{if(!this.isPreviewProxyReadOnlyViewer())return;const e="function"==typeof t.composedPath?t.composedPath():[];this.isSuggestionActionEventPath(e)&&(t.stopImmediatePropagation(),t.preventDefault(),console.warn("[CWS Toolbar] Suggestion accept/reject is read-only for preview viewers. Click ignored."))}catch(t){console.warn("Error in preview-proxy read-only click guard: ",t)}}),{capture:!0})}catch(t){console.warn("Error in setupPreviewProxySuggestionReadOnlyGuard: ",t),Zc("Error in setupPreviewProxySuggestionReadOnlyGuard: ",t)}},this.applyPreviewProxyReadOnlyStyles=()=>{try{if(!this.isPreviewProxyReadOnlyViewer())return void this.removePreviewProxyReadOnlyStyles();this.sweepPreviewProxyReadOnlyStyles(),this.previewProxyReadOnlyStyleObserver||(this.previewProxyReadOnlyStyleObserver=new MutationObserver((()=>{try{if(this.previewProxyReadOnlySweepScheduled)return;this.previewProxyReadOnlySweepScheduled=!0,requestAnimationFrame((()=>{this.previewProxyReadOnlySweepScheduled=!1,this.isPreviewProxyReadOnlyViewer()&&this.sweepPreviewProxyReadOnlyStyles()}))}catch(t){console.warn("Error in preview-proxy read-only style observer: ",t)}})),this.previewProxyReadOnlyStyleObserver.observe(document.body,{childList:!0,subtree:!0}))}catch(t){console.warn("Error in applyPreviewProxyReadOnlyStyles: ",t),Zc("Error in applyPreviewProxyReadOnlyStyles: ",t)}},this.sweepPreviewProxyReadOnlyStyles=()=>{try{this.injectPreviewProxyReadOnlyStyle(document.head);const t=e=>{e.querySelectorAll("*").forEach((e=>{var i,o;const n=(null===(o=null===(i=e.tagName)||void 0===i?void 0:i.toLowerCase)||void 0===o?void 0:o.call(i))||"";if(!n.startsWith("velt-")&&!n.startsWith("snippyly-"))return;const s=e.shadowRoot;s&&(this.injectPreviewProxyReadOnlyStyle(s),t(s))}))};t(document.body)}catch(t){console.warn("Error in sweepPreviewProxyReadOnlyStyles: ",t)}},this.injectPreviewProxyReadOnlyStyle=t=>{try{if(t.querySelector(`style[${oh.PREVIEW_READONLY_STYLE_ATTR}]`))return;const e=document.createElement("style");e.setAttribute(oh.PREVIEW_READONLY_STYLE_ATTR,"true"),e.textContent=oh.PREVIEW_READONLY_CSS,t.appendChild(e)}catch(t){console.warn("Error in injectPreviewProxyReadOnlyStyle: ",t)}},this.removePreviewProxyReadOnlyStyles=()=>{try{this.previewProxyReadOnlyStyleObserver&&(this.previewProxyReadOnlyStyleObserver.disconnect(),this.previewProxyReadOnlyStyleObserver=null);const t=`style[${oh.PREVIEW_READONLY_STYLE_ATTR}]`;document.querySelectorAll(t).forEach((t=>t.remove()));const e=i=>{i.querySelectorAll("*").forEach((i=>{const o=i.shadowRoot;o&&(o.querySelectorAll(t).forEach((t=>t.remove())),e(o))}))};e(document.body)}catch(t){console.warn("Error in removePreviewProxyReadOnlyStyles: ",t)}},this.isDriveOrPreviewHost=(t=document.location.toString(),e=document.location)=>{try{return t.includes(ce)||t.includes(re)||t.includes(ae)||t.includes(le)||this.isRunningUnderPreviewProxy(e)}catch(t){return console.warn("Error in isDriveOrPreviewHost: ",t),!1}},this.loginWithCustomUser=()=>{try{this.customLoginEnabled?(Ic(Dt),this.loadPlugin&&this.documentId&&this.identifySnippyly()):console.warn("Identify call not allowed.")}catch(t){console.warn("Error in loginWithCustomUser: ",t),Zc("Error in loginWithCustomUser: ",t)}},this.addWindowClickEventListener=()=>{try{this.windowClickEventListener||(this.windowClickEventListener=()=>{this.menuOpenedId&&(this.menuOpenedId=void 0)},window.addEventListener("click",this.windowClickEventListener))}catch(t){console.warn("Error in addWindowClickEventListener: ",t),Zc("Error in addWindowClickEventListener: ",t)}},this.removeWindowClickEventListener=()=>{try{window.removeEventListener("click",this.windowClickEventListener),this.windowClickEventListener=void 0}catch(t){console.warn("Error in removeWindowClickEventListener: ",t),Zc("Error in removeWindowClickEventListener: ",t)}},this.setWindowEventListner=()=>{try{window.addEventListener("locationchange",(()=>{this.checkUrl()}))}catch(t){console.warn("Error in setWindowEventListner: ",t),Zc("Error in setWindowEventListner: ",t)}},this.urlChangeListener=()=>{try{const t=history.pushState;history.pushState=function(){const e=t.apply(this,arguments);return window.dispatchEvent(new Event("pushstate")),window.dispatchEvent(new Event("locationchange")),e};const e=history.replaceState;history.replaceState=function(){const t=e.apply(this,arguments);return window.dispatchEvent(new Event("replacestate")),window.dispatchEvent(new Event("locationchange")),t},window.addEventListener("popstate",(()=>{window.dispatchEvent(new Event("locationchange"))}))}catch(t){console.warn("Error in urlChangeListener: ",t),Zc("Error in urlChangeListener: ",t)}},this.checkUrl=()=>{try{this.setInviteUrl();const t=new URL(document.location),e=t.searchParams;e.has(Ot)&&Tc(Et,"true",!1);let i=!1;for(const t of[St,Mt,Tt,_t])e.has(t)&&("true"===e.get(t)?Tc(t,"true",!1,"sessionStorage"):Ic(t,"sessionStorage"),e.delete(t),i=!0);this.embedMode="true"===_c(St,!1,"sessionStorage"),this.readOnlyMode="true"===_c(Tt,!1,"sessionStorage"),this.autoCommentModeRequested=!this.readOnlyMode&&"true"===_c(Mt,!1,"sessionStorage"),this.agentCommentsModeRequested="true"===_c(_t,!1,"sessionStorage");const o=e.get(It);if(o&&(Tc(It,o,!1,"sessionStorage"),e.delete(It),i=!0),this.previewLocationPath=_c(It,!1,"sessionStorage")||"",i&&window.history.replaceState({},document.title,t.href),(null==e?void 0:e.has(Rt))&&!_c(Rt)?this.showOnboardingModal=!0:this.showOnboardingModal=!1,null==e?void 0:e.has(Ut))if(_c(Ut,!1,"sessionStorage")){this.showLiveDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(Ut),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showLiveDemoModal=!0;else this.showLiveDemoModal=!1;if(null==e?void 0:e.has(zt))if(_c(zt,!1)){this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(zt),window.history.replaceState({},null===document||void 0===document?void 0:document.title,t.toString())}else this.showFigmaDemoModal=!0;else this.showFigmaDemoModal=!1;if(e.has(Lt)||e.has("snippyly_google_token")){if(e.has(Lt)){const t=decodeURIComponent(e.get(Lt)),i=Oc(t,Ee,ke),o=i&&JSON.parse(i);if(o){const t={};t.userId=o.uid,t.name=o.displayName,t.email=o.email,t.photoUrl=null==o?void 0:o.photoURL;const e=JSON.stringify(t),i=Nc(e,Ee,ke);Tc(Dt,i,!0),Ic(Ht)}}else if(e.has("snippyly_google_token")){const t=JSON.parse(atob(e.get("snippyly_google_token"))),i={};i.userId=t.uid,i.name=t.displayName,i.email=t.email,i.photoUrl=null==t?void 0:t.photoURL,Tc($t,JSON.stringify(i),!0)}e.delete(Lt),e.delete("snippyly_google_token"),window.history.replaceState({},document.title,t.href)}e.has(Et)?(Tc(Et,"true",!1),Ic(kt),e.delete(Et),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(kt)||_c(Et,!1)&&this.loadPluginUI(),e.has(kt)?(Tc(kt,"true",!1),Ic(Et),e.delete(kt),window.history.replaceState({},document.title,t.href),this.loadPluginUI()):e.has(Et)||_c(kt,!1)&&this.loadPluginUI(),this.setVersionInUrl()}catch(t){console.warn("Error in checkUrl: ",t),Zc("Error in checkUrl: ",t)}},this.setInviteUrl=()=>{try{const t=new URL(document.location);t.searchParams.has(Et)||t.searchParams.set(Et,"true"),this.inviteUrl=t.toString()}catch(t){console.warn("Error in setInviteUrl: ",t),Zc("Error in setInviteUrl: ",t)}},this.detectVersion=()=>{try{if(this.projectVersionKey){const t=new URL(document.location).searchParams;if(t.get(this.projectVersionKey))this.projectVersion=t.get(this.projectVersionKey);else if(window.snippylyInitialLoadUrl){const t=new URL(window.snippylyInitialLoadUrl).searchParams;t.get(this.projectVersionKey)&&(this.projectVersion=t.get(this.projectVersionKey))}this.projectVersion&&Tc(Ft,this.projectVersion,!1,"sessionStorage")}else{const t=new URL(document.location).searchParams;(t.has(Et)||t.has(kt))&&t.has(jt)&&(Tc(Vt,jt,!1,"sessionStorage"),this.projectVersion=t.get(jt),this.projectVersion&&Tc(Ft,this.projectVersion,!1,"sessionStorage"))}}catch(t){console.warn("Error in detectVersion: ",t),Zc("Error in detectVersion: ",t)}},this.setVersionInUrl=()=>{try{const t=this.projectVersionKey||_c(Vt,!1,"sessionStorage"),e=this.projectVersion||_c(Ft,!1,"sessionStorage");if(t&&e){const i=new URL(document.location),o=i.searchParams;o.get(t)||(o.set(t,e),window.history.replaceState({},document.title,i.href))}}catch(t){console.warn("Error in setVersionInUrl: ",t),Zc("Error in setVersionInUrl: ",t)}},this.loadPluginUI=async()=>{var t,e,i,o,n,s,r,a;try{if(!this.apiKey)return;if(!this.projectId)return;if(this.loadPlugin)return this.generateLocation(),this.setLocation(),this.setPreviewLocationFromPath(),void setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}),this.setPreviewLocationFromPath())}}),4e3);if(this.toolbarEnabledApiCalled||await this.detectToolbarEnabled(),!this.toolbarEnabled)return;wt.includes(this.apiKey)&&this.listenToDocumentTitleChange();const l=$c();l&&!(null==l?void 0:l.isAnonymous)&&(this.loading=!0);try{this.customerMetadata=await this.getCustomerMetadata()}catch(t){console.warn("Error in getCustomerMetadata: ",t),Zc("Error in getCustomerMetadata: ",t)}Mc(Jt)&&(this.isPasswordValid=Mc(Jt));const c=await Xc(this.apiKey,this.projectId);"error"===c.status&&console.warn("getProjectConfig failed for projectId (treating project as valid): ",this.projectId),this.projectDeleted=Fc(c,this.isDriveOrPreviewHost()),this.projectConfig="ok"===c.status?c.config:null,this.guestMode=!!(null===(t=this.projectConfig)||void 0===t?void 0:t.guestMode)||this.guestMode,this.allowGuestModeSignIn=!!(null===(i=null===(e=this.projectConfig)||void 0===e?void 0:e.guestModeConfig)||void 0===i?void 0:i.allowSignIn),this.queryParamsComments=!!(null===(o=this.projectConfig)||void 0===o?void 0:o.queryParamsComments),this.usePageTitleAsLocationName=!!(null===(n=this.projectConfig)||void 0===n?void 0:n.usePageTitleAsLocationName),(null===(s=this.projectConfig)||void 0===s?void 0:s.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.passwordProtected=!!(null===(a=null===(r=this.projectConfig)||void 0===r?void 0:r.passwordProtected)||void 0===a?void 0:a.enabled),Tc(Wt,this.guestMode+"",!0),Tc(Qt,this.allowGuestModeSignIn+"",!0),Tc(Gt,this.passwordProtected+"",!0),Tc(Kt,this.queryParamsComments+"",!0),Tc(Zt,this.usePageTitleAsLocationName+"",!0),this.loadPlugin=!0,this.projectDeleted||this.mountVeltCollaborationElements();try{const t=new URL(document.location),e=t.searchParams;let i=!1;e.has("wireframe")&&"true"===e.get("wireframe")&&(sessionStorage.setItem("velt-wireframe","true"),e.delete("wireframe"),i=!0),e.get("velt-version")&&(sessionStorage.setItem("velt-version",e.get("velt-version")),e.delete("velt-version"),i=!0),e.get("velt-env")&&(sessionStorage.setItem("velt-env",e.get("velt-env")),e.delete("velt-env"),i=!0),i&&window.history.replaceState({},document.title,t.href)}catch(t){}this.initializeSnippyly()}catch(t){this.loading=!1,console.warn("Error in loadPluginUI: ",t),Zc("Error in loadPluginUI: ",t)}},this.listenToDocumentTitleChange=()=>{try{this.documentTitleChangeInterval||(this.documentTitleChangeInterval=setInterval((()=>{var t,e,i;const o="true"===sessionStorage.getItem("debugDocumentTitleChange");if(o&&(console.log("*** listenToDocumentTitleChange ***"),console.log("usePageTitleAsLocationName: ",this.usePageTitleAsLocationName)),this.usePageTitleAsLocationName){const n=document.title;o&&(console.log("location name: ",null===(t=this.location)||void 0===t?void 0:t.locationName),console.log("title: ",n),console.log("changed: ",(null===(e=this.location)||void 0===e?void 0:e.locationName)!==n)),(null===(i=this.location)||void 0===i?void 0:i.locationName)!==n&&(o&&console.log("%c triggering location update!","color: green; font-weight: bold;"),this.generateLocation(),this.setLocation({forceSetLocation:!0}),this.setPreviewLocationFromPath())}}),2e3))}catch(t){Zc("Error in listenToDocumentTitleChange: ",t)}},this.initializeSnippyly=async()=>{var t,e,o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y,b,C,x,E,k,S,M;try{let T=this.staging?gt:mt;this.veltVersion&&(T=this.veltVersion);let _=this.staging,I=!1;if((null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-version"))&&(T=sessionStorage.getItem("velt-version")),null===sessionStorage||void 0===sessionStorage?void 0:sessionStorage.getItem("velt-env")){"staging"===sessionStorage.getItem("velt-env")&&(_=!1,I=!0)}this.apiKey;this.veltProxyToggleVisible=!1;const A=void 0;if(await i(this.apiKey,{options:{develop:_,staging:I,version:T,velt:!0,proxyDomain:"https://cdn.velt.dev"},...A?{proxyConfig:A}:{}}),!window.Velt)return;if(this.autoTranslation&&(null===Velt||void 0===Velt?void 0:Velt.enableAutoTranslation)&&(null===Velt||void 0===Velt||Velt.enableAutoTranslation()),this.projectDeleted||this.mountCommentSidebar(),Velt){null===Velt||void 0===Velt||Velt.sf(!0);try{window.dispatchEvent(new CustomEvent("onVeltLoad",{detail:{Velt}})),(null===window||void 0===window?void 0:window.onSnippylyLoad)&&(null===window||void 0===window||window.onSnippylyLoad(Velt))}catch(t){}document.body.style.setProperty("--velt-default-font-family","'Poppins', sans-serif"),(()=>{try{if(!document.getElementById("superflowFontLink3")){const t=document.createElement("link");t.rel="stylesheet",t.href="https://firebasestorage.googleapis.com/v0/b/snippyly-sdk-external/o/fonts%2Fpoppins%2Fpoppins.css?alt=media&token=5f31a0f2-5f67-4974-bf56-78ae655f2b68",t.id="superflowFontLink3",document.head.appendChild(t)}}catch(t){console.warn("Error in loadPoppinsFont: ",t),Zc("Error in loadPoppinsFont: ",t)}})()}if(Velt&&(Wc({sdkVersion:null===Velt||void 0===Velt?void 0:Velt.version,sdkType:"client"}),console.log(`Velt Version: ${(null===Velt||void 0===Velt?void 0:Velt.version)||"unknown"}`),console.log(`Superflow Toolbar Version: ${ft}`)),this.generateDocumentId(),(null===Velt||void 0===Velt?void 0:Velt.on)&&"function"==typeof(null===Velt||void 0===Velt?void 0:Velt.on)){const e=$c(),i="true"===sessionStorage.getItem("debugUserUpdateEvent");this.previousVeltUserId=null!==(t=null==e?void 0:e.userId)&&void 0!==t?t:"default",i&&console.log("[Superflow Debug] Initialized previousVeltUserId:",this.previousVeltUserId),Velt.on("userUpdate").subscribe((async t=>{if(i&&console.log("User from event: UserUpdate",t),t){const e=t.userId;i&&console.log("[Superflow Debug] userUpdate event fired:",{previousVeltUserId:this.previousVeltUserId,currentUserId:e,userChanged:this.previousVeltUserId!==e}),this.previousVeltUserId!==e&&(i&&console.log("[Superflow Debug] User changed, calling setDocumentAndLocation"),await this.setDocumentAndLocation()),this.previousVeltUserId=e}})),i&&console.log("[Superflow Debug] Performing initial setDocumentAndLocation"),await this.setDocumentAndLocation()}else await this.setDocumentAndLocation();if(setTimeout((()=>{var t;if(this.usePageTitleAsLocationName){const e=document.title;(null===(t=this.location)||void 0===t?void 0:t.locationName)!==e&&(this.generateLocation(),this.setLocation({forceSetLocation:!0}),this.setPreviewLocationFromPath())}}),4e3),this.commentElement=null===Velt||void 0===Velt?void 0:Velt.getCommentElement(),this.contactElement=null===Velt||void 0===Velt?void 0:Velt.getContactElement(),this.rewriterElement=null===Velt||void 0===Velt?void 0:Velt.getRewriterElement(),this.presenceElement=null===Velt||void 0===Velt?void 0:Velt.getPresenceElement(),this.commentElement){this.readOnlyMode?"function"==typeof this.commentElement.enableTextComments&&this.commentElement.enableTextComments(!1):this.commentElement.enableTextComments(!0),this.customLoginEnabledLocally||this.commentElement.enableSignInButton(!0),this.commentElement.enableAttachments(!0),(null===(e=this.commentElement)||void 0===e?void 0:e.showScreenSizeInfo)&&this.commentElement.showScreenSizeInfo(!0),(null===(o=this.commentElement)||void 0===o?void 0:o.enableDeviceInfo)&&this.commentElement.enableDeviceInfo(!0),this.commentElement.enableCommentIndex(!0),this.commentElement.onCommentModeChange&&this.commentElement.onCommentModeChange().subscribe((t=>{if(t&&this.readOnlyMode)return this.disableCommentMode(),void(this.addCommentMode=!1);this.addCommentMode=t,t&&this.autoCommentModeRequested&&(this.autoCommentModeArmedOnce=!0,this.firstCommentNudge&&(this.firstCommentNudge=!1,this.showTourCommentTooltip=!1),Tc(Bt,"true")),t&&this.promptNativeScreenshotForCommentMode(),this.addCommentMode||this.showModalOnceCommentIsModeIsOff&&(this.addCommentCount>=2&&!_c(Xt)&&(this.allowGuestModeSignIn?this.openGuestModeSignInModal():this.openGuestModeNameModel(),Tc(Xt,"true"),this.showModalOnceCommentIsModeIsOff=!1),this.addCommentCount>=5&&!this.showGuestModeSignInModal&&!_c(ee,!1,"sessionStorage")&&(this.showGuestModeSignInBanner(),Tc(ee,"true",!1,"sessionStorage"),this.showModalOnceCommentIsModeIsOff=!1))})),(null===(n=this.commentElement)||void 0===n?void 0:n.enableOrphanComments)&&this.commentElement.enableOrphanComments(),!this.readOnlyMode&&(null===(s=this.commentElement)||void 0===s?void 0:s.enablePersistentCommentMode)&&this.commentElement.enablePersistentCommentMode(),this.readOnlyMode||this.showFirstCommentNudge(),(null===(r=this.commentElement)||void 0===r?void 0:r.enableGhostComments)&&this.commentElement.enableGhostComments();const t=null===window||void 0===window?void 0:window.SUPERFLOW_CUSTOM_STATUSES;t&&"object"==typeof t&&(null===(a=this.commentElement)||void 0===a?void 0:a.setCustomStatus)&&this.commentElement.setCustomStatus(t),(null===(l=this.commentElement)||void 0===l?void 0:l.enableMinimap)&&!this.embedMode&&this.commentElement.enableMinimap(),(null===(c=this.commentElement)||void 0===c?void 0:c.setDStrategy)&&(null===(d=this.commentElement)||void 0===d||d.setDStrategy("dynamicId")),(null===(h=this.commentElement)||void 0===h?void 0:h.enableSidebarButtonOnCommentDialog)&&this.commentElement.enableSidebarButtonOnCommentDialog(),(null===(u=this.commentElement)||void 0===u?void 0:u.enableHotkey)&&this.commentElement.enableHotkey(),(null===(p=this.commentElement)||void 0===p?void 0:p.enableDeviceIndicatorOnCommentPins)&&this.commentElement.enableDeviceIndicatorOnCommentPins(),this.applyScreenshotSetting(),this.ensureAddCommentAnnotationSubscription(),(null===(g=null===(f=null===(v=this.customerMetadata)||void 0===v?void 0:v.superflow)||void 0===f?void 0:f.advancedFeatures)||void 0===g?void 0:g.hasCustomStatus)&&this.setCustomStatuses(),this.setQueryParamsCommentsInSdk(),this.checkToEnableUpgradeButton(),this.setupSidebarAgentCommentFilter(),this.setupVeltButtonClickListener(),this.maybeApplyVisibilityOptionsToCommentElement()}this.applyStorageFeatureAccess(),this.selectionElement=Velt.getSelectionElement(),this.selectionElement&&this.selectionElement.enableLiveSelection(!0),this.rewriterElement&&(null===(m=this.rewriterElement)||void 0===m||m.enableRewriter()),this.presenceElement&&(null===(w=this.presenceElement)||void 0===w?void 0:w.enableFlockMode)&&(null===(y=this.presenceElement)||void 0===y||y.enableFlockMode(!0)),(null===Velt||void 0===Velt?void 0:Velt.getDocElement)&&(this.docElement=Velt.getDocElement()),null===(E=(null===(b=this.docElement)||void 0===b?void 0:b.getDocumentMetadata)?null===(C=this.docElement)||void 0===C?void 0:C.getDocumentMetadata():null===(x=null===Velt||void 0===Velt?void 0:Velt.docService)||void 0===x?void 0:x.getDocumentMetadata$())||void 0===E||E.subscribe((t=>{var e,i;const o=(null===(e=null==t?void 0:t.superflow)||void 0===e?void 0:e.versions)?Object.values(null===(i=null==t?void 0:t.superflow)||void 0===i?void 0:i.versions):[],n=new URL(document.location).searchParams.get("version");if(n){const t=o.find((t=>t.id===n));t&&(this.version={id:t.id,name:t.versionName||t.id},this.setLocation())}})),(null===Velt||void 0===Velt?void 0:Velt.getViewsElement)&&(this.viewsElement=Velt.getViewsElement()),(null===(k=this.viewsElement)||void 0===k?void 0:k.getUniqueViewsByUser)&&(null===(M=null===(S=this.viewsElement)||void 0===S?void 0:S.getUniqueViewsByUser())||void 0===M||M.subscribe((t=>{this.totalViews=t}))),this.identifySnippyly()}catch(t){this.loading=!1,console.warn("Error in initializeSnippyly: ",t),Zc("Error in initializeSnippyly: ",t)}},this.generateDocumentId=()=>{try{this.documentId=xc(kc(window.location.origin))+"",this.projectId&&(this.documentId=this.projectId+""),this.serverDocumentId=(t=this.documentId+"")?`${xc(t)}`:void 0}catch(t){console.warn("Error in generateDocumentId: ",t),Zc("Error in generateDocumentId: ",t)}var t},this.setDocumentAndLocation=async()=>{try{if(this.projectDeleted)return void console.warn("setDocumentAndLocation skipped: project no longer exists");this.generateDocumentId(),this.previousLocation=null,await(null===Velt||void 0===Velt?void 0:Velt.setDocumentId(this.documentId+"")),Wc({documentId:this.serverDocumentId,clientDocumentId:this.documentId}),this.generateLocation(),this.setLocation(),this.setPreviewLocationFromPath()}catch(t){console.warn("Error in setDocumentAndLocation: ",t),Zc("Error in setDocumentAndLocation: ",t)}},this.setPreviewLocationFromPath=()=>{try{if(!this.agentCommentsModeRequested||!this.previewLocationPath)return;if(!window.Velt||!(null===Velt||void 0===Velt?void 0:Velt.setLocation))return;const t={url:this.previewLocationPath},e=Sc(JSON.parse(JSON.stringify(t)));e&&(t.id=`${e}`),this.location=t,null===Velt||void 0===Velt||Velt.setLocation(JSON.parse(JSON.stringify(t))),Wc({clientLocation:t}),this.previousLocation=JSON.parse(JSON.stringify(t)),this.onVeltLocationChange()}catch(t){console.warn("Error in setPreviewLocationFromPath: ",t),Zc("Error in setPreviewLocationFromPath: ",t)}},this.checkToEnableUpgradeButton=()=>{var t,e;try{this.isPlanExpired&&this.isUserGlobalContact?(null===(t=this.commentElement)||void 0===t?void 0:t.enableUpgradeButton)&&this.commentElement.enableUpgradeButton():(null===(e=this.commentElement)||void 0===e?void 0:e.disableUpgradeButton)&&this.commentElement.disableUpgradeButton()}catch(t){console.warn("Error in checkToEnableUpgradeButton: ",t),Zc("Error in checkToEnableUpgradeButton: ",t)}},this.getCustomerMetadata=async()=>{try{const t=await id(this.apiKey);return(t=>{try{const e=t?JSON.stringify(t):"false";Tc(ie,e)}catch(t){console.warn("Error in setCustomerMetadataToStorage: ",t),Zc("Error in setCustomerMetadataToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getCustomerMetadata: ",t),Zc("Error in getCustomerMetadata: ",t);const e=(()=>{try{const t=_c(ie);return t?"false"===t?JSON.parse(JSON.stringify(we)):JSON.parse(t):null}catch(t){return console.warn("Error in getCustomerMetadataFromStorage: ",t),Zc("Error in getCustomerMetadataFromStorage: ",t),null}})();if(e)return e}},this.setCustomStatuses=async()=>{var t;try{const e=await od(this.apiKey);if((null==e?void 0:e.success)&&(null==e?void 0:e.data)){const i=Object.values(e.data),o=this.sortCustomStatuses(i);o.length>0&&(null===(t=this.commentElement)||void 0===t?void 0:t.setCustomStatus)&&this.commentElement.setCustomStatus(o)}}catch(t){console.warn("Error in setCustomStatuses: ",t),Zc("Error in setCustomStatuses: ",t)}},this.sortCustomStatuses=t=>{try{const e=[...t].sort(((t,e)=>("number"==typeof t.order?t.order:Number.MAX_SAFE_INTEGER)-("number"==typeof e.order?e.order:Number.MAX_SAFE_INTEGER)));return e}catch(e){return console.warn("Error in sortCustomStatuses: ",e),Zc("Error in sortCustomStatuses: ",e),t}},this.getSamlConfig=async()=>{try{const t=await ad(this.apiKey);return(t=>{try{if(t){const e=JSON.stringify(t);Tc(se,e,!0)}}catch(t){console.warn("Error in setSamlConfigToStorage: ",t),Zc("Error in setSamlConfigToStorage: ",t)}})(t),t}catch(t){console.warn("Error in getSamlConfig: ",t),Zc("Error in getSamlConfig: ",t);const e=(()=>{try{const t=_c(se,!0);return t?JSON.parse(t):null}catch(t){return console.warn("Error in getSamlConfigFromStorage: ",t),Zc("Error in getSamlConfigFromStorage: ",t),null}})();if(e)return e}},this.setLogos=()=>{var t,e,i,o,n,s,r,a,l,c,d,h;try{let u="light";this.privateCommentModeEnabled&&(u="dark");const p=null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.customBranding)||void 0===i?void 0:i.logoMark,v=null===(s=null===(n=null===(o=null==be?void 0:we)||void 0===o?void 0:o.customBranding)||void 0===n?void 0:n.logo)||void 0===s?void 0:s.logoMark,f=null===(l=null===(a=null===(r=this.customerMetadata)||void 0===r?void 0:r.superflow)||void 0===a?void 0:a.customBranding)||void 0===l?void 0:l.wordMark,g=null===(h=null===(d=null===(c=null==be?void 0:we)||void 0===c?void 0:c.customBranding)||void 0===d?void 0:d.logo)||void 0===h?void 0:h.wordMark;switch(u){case"light":this.logoMark=(null==p?void 0:p.lightUrl)||(null==p?void 0:p.darkUrl)||(null==v?void 0:v.lightUrl),this.wordMark=(null==f?void 0:f.lightUrl)||(null==f?void 0:f.darkUrl)||(null==g?void 0:g.lightUrl);break;case"dark":this.logoMark=(null==p?void 0:p.darkUrl)||(null==p?void 0:p.lightUrl)||(null==v?void 0:v.darkUrl),this.wordMark=(null==f?void 0:f.darkUrl)||(null==f?void 0:f.lightUrl)||(null==g?void 0:g.darkUrl)}}catch(t){console.warn("Error in setLogos: ",t),Zc("Error in setLogos: ",t)}},this.getAlertIcon=()=>L`
4719
+ <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4720
+ <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
4721
+ </svg>
4722
+ `,this.getLogoMark=()=>{var t;try{return(null===(t=this.logoMark)||void 0===t?void 0:t.includes("<svg"))?L`
4719
4723
  ${pt(this.logoMark)}
4720
4724
  `:L`
4721
4725
  <img src=${this.logoMark} />
@@ -4723,275 +4727,22 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
4723
4727
  ${pt(this.wordMark)}
4724
4728
  `:L`
4725
4729
  <img src=${this.wordMark} />
4726
- `}catch(t){return console.warn("Error in getWordMark: ",t),L``}},this.generateLocation=()=>{try{if(this.autoLocation){const t=new URL(document.location).searchParams,e=new URL(document.location);e.searchParams.delete(Et),e.searchParams.delete(kt),e.searchParams.delete(Nt),e.searchParams.delete(Ot),e.searchParams.delete(Rt),e.searchParams.delete(Ut);const i=t.get(jt)||this.projectVersion;this.queryParamsComments||(e.search="");let o=(t=>{try{return t.replace(/#.*$/,"")}catch(e){return console.warn("Error in removeHashFromUrl: ",e),Gc("Error in removeHashFromUrl: ",e),t}})(e.href);this.projectId&&(o=null==o?void 0:o.replace(window.location.origin,"")),this.location={url:o,version:i}}}catch(t){console.warn("Error in generateLocation: ",t),Gc("Error in generateLocation: ",t)}},this.setLocation=t=>{var e,i,o,n;try{if(this.autoLocation&&window.Velt&&(null===Velt||void 0===Velt?void 0:Velt.setLocation)){if(this.version?(this.location||(this.location={}),this.location.version=this.version):this.location&&delete this.location.version,!(null==t?void 0:t.forceSetLocation)&&this.previousLocation&&(null===(e=this.previousLocation)||void 0===e?void 0:e.url)===(null===(i=this.location)||void 0===i?void 0:i.url)&&(null===(o=this.previousLocation)||void 0===o?void 0:o.version)===(null===(n=this.location)||void 0===n?void 0:n.version))return;const s=Sc(JSON.parse(JSON.stringify(this.location)));if(s?this.location.id=`${s}`:delete this.location.id,this.usePageTitleAsLocationName){const t=document.title;t&&(this.location.locationName=t)}null===Velt||void 0===Velt||Velt.setLocation(JSON.parse(JSON.stringify(this.location))),Bc({clientLocation:this.location}),this.previousLocation=JSON.parse(JSON.stringify(this.location)),this.onVeltLocationChange()}}catch(t){console.warn("Error in setLocation: ",t),Gc("Error in setLocation: ",t)}},this.onVeltLocationChange=()=>{try{window.dispatchEvent(new CustomEvent("veltLocationChange",{detail:this.location}))}catch(t){console.warn("Error in onVeltLocationChange: ",t),Gc("Error in onVeltLocationChange: ",t)}},this.identifySnippyly=async()=>{var t,e,i,o;let n="",s="";try{this.invalidApiKey=!1;let o,r={name:"Default User",email:"default@usesuperflow.com",userId:"default",isAnonymous:!0,organizationId:this.apiKey};o=this.customLoginEnabled&&this.providedUser?this.providedUser:$c(),Sr("[Superflow][identify] resolved user (pre-iam)",{source:this.customLoginEnabled&&this.providedUser?"providedUser":"token",email:null==o?void 0:o.email,userId:null==o?void 0:o.userId,name:null==o?void 0:o.name,isAnonymous:null==o?void 0:o.isAnonymous});const a=await this.getSamlConfig(),l=new URL(document.location);if(l.searchParams.has(Lt)&&l.searchParams.delete(Lt),a&&(this.signInUrl=`${xe}saml/${a.slug}/login?redirect_url=${encodeURIComponent(null==l?void 0:l.toString())}&source=sf`,window.Superflow.signInUrl=this.signInUrl),(null==o?void 0:o.email)&&(r=o),r.isAnonymous)delete r.groupId;else{const t=Velt.getDocumentId()||this.serverDocumentId;t&&(r.groupId=t+"")}if(this.customLoginEnabledLocally||(null===(t=null==r?void 0:r.contacts)||void 0===t?void 0:t.length)&&(r.contacts=[]),n=null==r?void 0:r.email,s=null==r?void 0:r.userId,(null==r?void 0:r.isAnonymous)&&this.projectId&&this.guestMode){const t=Dc(!0,this.apiKey);t&&(r=JSON.parse(JSON.stringify(t)))}(null==r?void 0:r.isAnonymous)||(this.loading=!0);const c={};(null==r?void 0:r.groupId)&&(c.groupId=null==r?void 0:r.groupId),r.organizationId=this.apiKey;const d=await Yc(this.apiKey,this.projectId||"",null==r?void 0:r.email,null==r?void 0:r.userId),h=null==d?void 0:d.isAdmin;this.snippylyUserRole=h?"Admin":"Commenter",this.applyPreviewProxyReadOnlyStyles(),Sr("[Superflow][identify] iamResponse",d,{isAdminUser:h,snippylyUserRole:this.snippylyUserRole,email:null==r?void 0:r.email,userId:null==r?void 0:r.userId});const u=!(this.customLoginEnabled&&this.providedUser),p=((t,e)=>!(!e||(null==t?void 0:t.isAnonymous)||(null==t?void 0:t.isGuest)||!(null==t?void 0:t.userId)))(r,u),v=p&&((t,e)=>{try{if(!t||!e)return!1;const i=!!e.name&&e.name!==t.name,o=!!e.photoUrl&&e.photoUrl!==t.photoUrl;return Sr("[Superflow][identity] hasProfileChanged",{nameChanged:i,photoChanged:o,localName:t.name,savedName:e.name,localPhotoUrl:t.photoUrl,savedPhotoUrl:e.photoUrl}),i||o}catch(t){return console.warn("Error in hasProfileChanged: ",t),Gc("Error in hasProfileChanged: ",t),!1}})(r,d);if(Sr("[Superflow][identify] enrichment gate",{cameFromToken:u,willEnrichIdentity:p,profileChanged:v,forceReset:v,isAnonymous:null==r?void 0:r.isAnonymous,isGuest:null==r?void 0:r.isGuest,userId:null==r?void 0:r.userId,nameBefore:null==r?void 0:r.name}),p&&(r=((t,e)=>t&&e?{...t,name:e.name||t.name,photoUrl:e.photoUrl||t.photoUrl}:t)(r,d),Sr("[Superflow][identify] enriched user",{nameAfter:null==r?void 0:r.name,photoUrl:null==r?void 0:r.photoUrl})),h&&(c.isAdmin=h,h&&this.allFeatureDisabled&&(this.allFeatureDisabled=!1)),this.restoreContentWarningSidebarState(),(null==r?void 0:r.userId)&&!(null==r?void 0:r.isGuest)&&!(null==r?void 0:r.isAnonymous)&&this.documentId)try{await ld(this.apiKey,this.documentId,r.userId,r.name,r.email)}catch(t){Gc("checkDocumentUserAndCreateError",t)}Sr("[Superflow][identify] setVeltAuthProvider options",{forceReset:v,profileChanged:v,userName:null==r?void 0:r.name,userId:null==r?void 0:r.userId});const[f]=await Promise.all([Velt.setVeltAuthProvider({user:r,options:{throwError:!0,forceReset:v},retryConfig:{retryCount:3,retryDelay:1e3},generateToken:async()=>await id(this.apiKey,null==r?void 0:r.userId,c),onError:t=>{console.log("Error signing to velt - ",t),this.invalidApiKey=!0}}),this.fetchAndApplyFeatureAccess()]);if(this.hasAgentAccess&&this.insertShadowDOM(),this.invalidApiKey)throw"Invalid Api Key - Domain Not Whitelisted";p&&((t=>{try{const e={userId:null==t?void 0:t.userId,name:null==t?void 0:t.name,email:null==t?void 0:t.email,photoUrl:null==t?void 0:t.photoUrl},i=Nc(JSON.stringify(e),Ee,ke);Tc(Dt,i,!0)}catch(t){console.warn("Error in saveUserToken: ",t),Gc("Error in saveUserToken: ",t)}})(r),Sr("[Superflow][identify] token rewritten post-signin, re-read",{persistedName:null===(e=$c())||void 0===e?void 0:e.name})),Sr("[Superflow][identify] velt auth response",{name:null==f?void 0:f.name,email:null==f?void 0:f.email,userId:null==f?void 0:f.userId,userSnippylyId:null==f?void 0:f.userSnippylyId,tokenUserProperties:c}),Hc(JSON.parse(JSON.stringify(f||{}))),(null==r?void 0:r.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(r)),Sr("[Superflow][identify] this.snippylyUser (rendered) name",null===(i=this.snippylyUser)||void 0===i?void 0:i.name));const g=JSON.parse(JSON.stringify(f||{}));if((null==g?void 0:g.userSnippylyId)&&!(null==g?void 0:g.isGuest)&&this.checkToMigrateGuestUser(g),Velt.getUserRole$().subscribe((t=>{var e;t&&(this.loading=!1,null===(e=this.commentElement)||void 0===e||e.enablePriority())})),this.contactListSubscription=Velt.getContactElement().getContactList().subscribe((t=>{var e;this.loading=!1,(null===(e=null==t?void 0:t.organizationUsers)||void 0===e?void 0:e.length)>0&&(this.checkPrivateCommentModeFromStorage(),this.contactListSubscription&&(this.contactListSubscription.unsubscribe(),this.contactListSubscription=null))})),(null===Velt||void 0===Velt?void 0:Velt.isPlanExpired$)&&(null===Velt||void 0===Velt||Velt.isPlanExpired$().subscribe((t=>{this.isPlanExpired=t}),(t=>{this.isPlanExpired=!1,console.warn("Error in isPlanExpired$: ",t),Gc("Error in isPlanExpired$: ",t)}))),null===Velt||void 0===Velt?void 0:Velt.on){let t;null===Velt||void 0===Velt||Velt.on("initUpdate").subscribe((e=>{"setDocumentsSuccess"===e.event&&(t&&(t.unsubscribe(),t=null),t=null===Velt||void 0===Velt?void 0:Velt.getDocumentMetadata().subscribe((async t=>{if(t){const e=await qc(this.apiKey,null==t?void 0:t.clientDocumentId);this.setProjectConfigVariables(e)}}),(t=>{console.warn("Error in getDocumentMetadata: ",t),Gc("Error in getDocumentMetadata: ",t)})))}))}Bc({clientUserId:null==r?void 0:r.userId});try{Wc(r)}catch(t){console.warn("Error in trackIdentifyEvent: ",t)}this.getComments(),this.checkGlobalUserContact(),this.showFirstCommentNudge(),setTimeout((()=>{_c(Bt)||this.autoCommentModeArmedOnce||(this.showTourCommentTooltip=!0)}),2e3)}catch(t){if(this.loading=!1,this.signInError=!0,t&&"string"==typeof t&&(null===(o=null==t?void 0:t.toLowerCase())||void 0===o?void 0:o.includes("invalid"))){this.invalidApiKey=!0,Kc(vt.Events.DOMAIN_NOT_WHITELISTED),this.projectId&&Jc(this.apiKey,this.projectId);if(new URL(document.location).searchParams.has(Rt))this.isSigningInUserAdmin=!0;else if(_c(Ht))this.isSigningInUserAdmin="true"===_c(Ht,!0);else{const t=await Yc(this.apiKey,this.projectId||"",n,s);this.isSigningInUserAdmin=!!(null==t?void 0:t.isAdmin),Tc(Ht,this.isSigningInUserAdmin+"",!0)}}console.warn("Error in identifySnippyly: ",t),Gc("Error in identifySnippyly: ",t)}},this.fetchAndApplyFeatureAccess=async()=>{var t,e;try{this.featureAccess=await dd(this.apiKey),this.applyStorageFeatureAccess();const i=null===(t=this.featureAccess)||void 0===t?void 0:t[cd.Agents];this.hasAgentAccess=!0===(null==i?void 0:i.hasAccess);const o=null===(e=this.featureAccess)||void 0===e?void 0:e[cd.WorkspacePrivateComments];this.hasPrivateCommentsAccess=!0===(null==o?void 0:o.hasAccess),this.isPrivateCommentsEnabledOnWorkspace=!0===(null==o?void 0:o.isPrivateCommentsEnabled),!this.canShowPrivateCommentToggle&&this.privateCommentModeEnabled&&(this.disablePrivateCommentModeOnCommentElement(),this.privateCommentModeEnabled=!1,Tc(Yt,"false")),this.maybeApplyVisibilityOptionsToCommentElement()}catch(t){console.warn("Error in fetchAndApplyFeatureAccess: ",t),Gc("Error in fetchAndApplyFeatureAccess: ",t)}},this.insertShadowDOM=()=>{try{if(document.querySelector("velt-wireframe"))return;const t=document.querySelector("velt-comments");t&&t.setAttribute("shadow-dom","true");const e=document.querySelector(`${fe.VELT_COMMENTS_SIDEBAR_LEGACY}, ${fe.VELT_COMMENTS_SIDEBAR_V2}`);e&&e.setAttribute("shadow-dom","true")}catch(t){console.warn("Error in insertShadowDOM: ",t),Gc("Error in insertShadowDOM: ",t)}},this.applyStorageFeatureAccess=()=>{try{if(!this.featureAccess||!this.commentElement)return;const t=this.featureAccess[cd.Storage];(null==t?void 0:t.hasUsageExhausted)&&(this.commentElement.disableAttachments(),this.commentElement.setRecordings("none"))}catch(t){Gc("Error in applyStorageFeatureAccess: ",t)}},this.checkToMigrateGuestUser=async t=>{try{const e=Dc(!1,this.apiKey);e&&(await od(this.apiKey,this.projectId||"",e,t,!0),Ic(Pt))}catch(t){console.warn("Error in checkToMigrationGuestUser: ",t),Gc("Error in checkToMigrationGuestUser: ",t)}},this.getComments=()=>{try{this.commentElement&&this.commentSubscription&&this.commentSubscription.unsubscribe()}catch(t){console.warn("Error in getComments: ",t),Gc("Error in getComments: ",t)}},this.handleCommentSelection=t=>{var e,i,o,n,s,r,a,l,c,d;try{if(!1===(null==t?void 0:t.selected))return void(null===(e=null===Velt||void 0===Velt?void 0:Velt.setUiState)||void 0===e||e.call(Velt,{showButtons:!1}));const h=null==t?void 0:t.annotation;if(!h||!this.isAgentAnnotation(h))return void(null===(i=null===Velt||void 0===Velt?void 0:Velt.setUiState)||void 0===i||i.call(Velt,{showButtons:!1}));const u=null===(n=null===(o=null==h?void 0:h.agent)||void 0===o?void 0:o.result)||void 0===n?void 0:n.incorrectWord,p=(null===(s=null==h?void 0:h.pageInfo)||void 0===s?void 0:s.path)||(null===(r=null==h?void 0:h.location)||void 0===r?void 0:r.path)||(null===(a=null==h?void 0:h.agent)||void 0===a?void 0:a.path);if(!u||!p)return void(null===(l=null===Velt||void 0===Velt?void 0:Velt.setUiState)||void 0===l||l.call(Velt,{showButtons:!1}));const v=this.normalizePagePath(p),f=u,g=null===(d=null===(c=null==h?void 0:h.agent)||void 0===c?void 0:c.result)||void 0===d?void 0:d.type;let m,w="";"grammar"===g?(m=this.grammarSuggestionPagePathMap,w="grammar"):(m=this.spellingSuggestionPagePathMap,w="spelling");const y=null==m?void 0:m.get(f);((null==y?void 0:y.get(v))||0)<=1?Velt.setUiState({showButtons:!1,warningType:w}):Velt.setUiState({showButtons:!0,warningType:w})}catch(t){console.warn("Error in handleCommentSelection: ",t),Gc("Error in handleCommentSelection: ",t)}},this.processAgentComments=t=>{var e,i,o;try{const n=Array.isArray(t)?t:[];n.length&&!this.agentNamesFetched&&this.apiKey&&this.fetchAgentNames();const s=n.filter((t=>{var e;const i=(null===(e=null==t?void 0:t.status)||void 0===e?void 0:e.type)===he;return this.isAgentAnnotation(t)&&!i}));if(this.sidebarV2Enabled&&!this.showAgentCommentsInSidebar&&0===s.length&&this.agentGroups.length>0)return;if(0===s.length)return this.hasContentWarnings=!1,this.contentWarningsCount=0,this.agentGroups=[],this.spellingSuggestionPagePathMap=new Map,void(this.grammarSuggestionPagePathMap=new Map);const r=new Map;for(const t of s){const i=this.extractAgentId((null===(e=null==t?void 0:t.agent)||void 0===e?void 0:e.agentFields)||[]);if(!i)continue;const o=r.get(i);o?o.push(t):r.set(i,[t])}const a=[],l=new Map,c=new Map;for(const[t,e]of r){const n=this.isCustomAgent((null===(o=null===(i=e[0])||void 0===i?void 0:i.agent)||void 0===o?void 0:o.agentFields)||[]),s=this.resolveAgentDisplayName(t),{warnings:r,warningCount:d}=this.buildAgentWarnings(t,e,l,c);a.push({agentId:t,agentName:s,isCustom:n,warningCount:d,warnings:r,annotations:e})}a.sort(((t,e)=>e.warningCount-t.warningCount)),this.agentGroups=a;const d=a.reduce(((t,e)=>t+e.warningCount),0);this.contentWarningsCount=d,this.hasContentWarnings=d>0,this.spellingSuggestionPagePathMap=l,this.grammarSuggestionPagePathMap=c}catch(t){console.warn("Error in processAgentComments: ",t),Gc("Error in processAgentComments: ",t)}},this.extractAgentId=t=>{try{if(!Array.isArray(t)||0===t.length)return null;for(const e of t)if(null==e?void 0:e.startsWith(pe.AGENT))return e.substring(pe.AGENT.length);return null}catch(t){return console.warn("Error in extractAgentId: ",t),null}},this.isCustomAgent=t=>{try{return!!Array.isArray(t)&&t.includes(pe.AGENT_TYPE_CUSTOM)}catch(t){return console.warn("Error in isCustomAgent: ",t),!1}},this.resolveAgentDisplayName=t=>{var e,i;try{return null!==(i=null===(e=this.agentNameMap)||void 0===e?void 0:e.get(t))&&void 0!==i?i:"Unknown Agent"}catch(t){return console.warn("Error in resolveAgentDisplayName: ",t),"Unknown Agent"}},this.fetchAgentNames=async()=>{var t,e,i;try{this.agentNamesFetched=!0;const{getAgents:o}=await Promise.resolve().then((function(){return pd})),n=await o(this.apiKey),s=new Map;for(const i of n){const o=null!==(t=null==i?void 0:i.id)&&void 0!==t?t:"",n=null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"";o&&n&&s.set(o,n)}if(this.agentNameMap=s,(null===(i=this.agentGroups)||void 0===i?void 0:i.length)>0){const t=this.agentGroups.map((t=>({...t,agentName:this.resolveAgentDisplayName(t.agentId)})));this.agentGroups=t}}catch(t){this.agentNamesFetched=!1,console.warn("Error in fetchAgentNames: ",t)}},this.buildAgentWarnings=(t,e,i,o)=>{try{return t===ve.BROKEN_LINKS?this.buildBrokenLinkWarnings(e):t===ve.SPELL_CHECK||t===ve.GRAMMAR_CHECK?this.buildSpellCheckWarnings(e,i,o):this.buildGenericWarnings(e)}catch(t){return console.warn("Error in buildAgentWarnings: ",t),{warnings:[],warningCount:0}}},this.buildBrokenLinkWarnings=t=>{var e,i,o,n,s,r,a,l,c,d,h,u,p;try{const v=new Map;for(const f of t){const t=(null===(e=null==f?void 0:f.pageInfo)||void 0===e?void 0:e.url)||(null===(i=null==f?void 0:f.location)||void 0===i?void 0:i.url)||(null===(o=null==f?void 0:f.agent)||void 0===o?void 0:o.url)||"",g=(null===(n=null==f?void 0:f.agent)||void 0===n?void 0:n.reason)||{},m=g.url||(null===(s=null==f?void 0:f.targetTextRange)||void 0===s?void 0:s.text)||(null===(a=null===(r=null==f?void 0:f.agent)||void 0===r?void 0:r.result)||void 0===a?void 0:a.url)||(null===(c=null===(l=null==f?void 0:f.agent)||void 0===l?void 0:l.result)||void 0===c?void 0:c.link)||t,w=g.issue||g.description||(null===(h=null===(d=null==f?void 0:f.agent)||void 0===d?void 0:d.result)||void 0===h?void 0:h.statusCode)||(null===(p=null===(u=null==f?void 0:f.agent)||void 0===u?void 0:u.result)||void 0===p?void 0:p.status)||"",y=(null==m?void 0:m.toLowerCase())||"";if(v.has(y)){const e=v.get(y);e.occurrences+=1,t&&!e.pageUrls.includes(t)&&e.pageUrls.push(t),e.annotations.push(f)}else v.set(y,{primaryText:m||"",secondaryText:String(w),occurrences:1,pageUrls:t?[t]:[],annotations:[f]})}const f=Array.from(v.values());return{warnings:f,warningCount:f.length}}catch(t){return console.warn("Error in buildBrokenLinkWarnings: ",t),{warnings:[],warningCount:0}}},this.buildSpellCheckWarnings=(t,e,i)=>{var o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y,b,C;try{const x=new Map;for(const E of t){const t=(null===(o=null==E?void 0:E.pageInfo)||void 0===o?void 0:o.url)||(null===(n=null==E?void 0:E.location)||void 0===n?void 0:n.url)||(null===(s=null==E?void 0:E.agent)||void 0===s?void 0:s.url)||"",k=(null===(r=null==E?void 0:E.pageInfo)||void 0===r?void 0:r.path)||(null===(a=null==E?void 0:E.location)||void 0===a?void 0:a.path)||(null===(l=null==E?void 0:E.agent)||void 0===l?void 0:l.path)||"",S=this.normalizePagePath(k),M=null!==(d=null!==(c=null==E?void 0:E.comments)&&void 0!==c?c:null==E?void 0:E.commentData)&&void 0!==d?d:[],T=null!==(p=null===(u=null===(h=null==M?void 0:M[0])||void 0===h?void 0:h.commentText)||void 0===u?void 0:u.trim())&&void 0!==p?p:"",_=(null===(f=null===(v=null==E?void 0:E.agent)||void 0===v?void 0:v.result)||void 0===f?void 0:f.incorrectWord)||(null===(g=null==E?void 0:E.targetElement)||void 0===g?void 0:g.targetText)||T||"",I=(null===(w=null===(m=null==E?void 0:E.agent)||void 0===m?void 0:m.result)||void 0===w?void 0:w.suggestions)||[],A=Array.isArray(I)?I[0]||"":I||"",N=null===(b=null===(y=null==E?void 0:E.agent)||void 0===y?void 0:y.result)||void 0===b?void 0:b.type,O=_||"";_||console.warn("[CWS] Spell check annotation missing incorrectWord. agent.result:",null===(C=null==E?void 0:E.agent)||void 0===C?void 0:C.result,"targetElement:",null==E?void 0:E.targetElement,"comments:",M);const $="grammar"===N?i:e;$.has(O)||$.set(O,new Map);const L=$.get(O),D=L.get(S)||0;if(L.set(S,D+1),x.has(O)){const e=x.get(O);e.occurrences+=1,t&&!e.pageUrls.includes(t)&&e.pageUrls.push(t),e.annotations.push(E)}else x.set(O,{primaryText:_||"",secondaryText:A||"",occurrences:1,pageUrls:t?[t]:[],annotations:[E]})}const E=Array.from(x.values());return{warnings:E,warningCount:E.length}}catch(t){return console.warn("Error in buildSpellCheckWarnings: ",t),{warnings:[],warningCount:0}}},this.buildGenericWarnings=t=>{var e,i,o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y,b;try{const C=new Map;for(const x of t){const t=(null===(e=null==x?void 0:x.pageInfo)||void 0===e?void 0:e.url)||(null===(i=null==x?void 0:x.location)||void 0===i?void 0:i.url)||(null===(o=null==x?void 0:x.agent)||void 0===o?void 0:o.url)||"",E=null!==(s=null!==(n=null==x?void 0:x.comments)&&void 0!==n?n:null==x?void 0:x.commentData)&&void 0!==s?s:[],k=null==E?void 0:E[0],S=null!==(p=null!==(d=null!==(a=null===(r=null==k?void 0:k.commentText)||void 0===r?void 0:r.trim())&&void 0!==a?a:null===(c=null===(l=null==x?void 0:x.agent)||void 0===l?void 0:l.result)||void 0===c?void 0:c.incorrectWord)&&void 0!==d?d:null===(u=null===(h=null==x?void 0:x.targetElement)||void 0===h?void 0:h.targetText)||void 0===u?void 0:u.trim())&&void 0!==p?p:"",M=null!==(b=null!==(m=null===(g=null===(f=null===(v=null==x?void 0:x.agent)||void 0===v?void 0:v.result)||void 0===f?void 0:f.suggestions)||void 0===g?void 0:g[0])&&void 0!==m?m:null===(y=null===(w=null==x?void 0:x.agent)||void 0===w?void 0:w.result)||void 0===y?void 0:y.suggestion)&&void 0!==b?b:"",T=S||(null==x?void 0:x.annotationId)||(null==x?void 0:x.id)||"";if(C.has(T)){const e=C.get(T);e.occurrences+=1,t&&!e.pageUrls.includes(t)&&e.pageUrls.push(t),e.annotations.push(x)}else C.set(T,{primaryText:S||"No text",secondaryText:M||"",occurrences:1,pageUrls:t?[t]:[],annotations:[x]})}const x=Array.from(C.values());return{warnings:x,warningCount:x.length}}catch(t){return console.warn("Error in buildGenericWarnings: ",t),{warnings:[],warningCount:0}}},this.normalizePagePath=t=>{try{return t?(null==t?void 0:t.startsWith("/"))?t.substring(1):t:""}catch(e){return console.warn("Error in normalizePagePath: ",e),t||""}},this.setQueryParamsCommentsInSdk=()=>{var t,e,i,o,n;try{const s="true"===sessionStorage.getItem("debugQueryParamsComments");s&&console.log("setQueryParamsCommentsInSdk commentElement",this.commentElement),this.commentElement&&(s&&console.log("setQueryParamsCommentsInSdk queryParamsComments",this.queryParamsComments),this.queryParamsComments&&(null===(t=this.commentElement)||void 0===t?void 0:t.enableQueryParamsComments)?(s&&console.log("enableQueryParamsComments this.commentElement?.enableQueryParamsComments",null===(e=this.commentElement)||void 0===e?void 0:e.enableQueryParamsComments),null===(i=this.commentElement)||void 0===i||i.enableQueryParamsComments()):!this.queryParamsComments&&(null===(o=this.commentElement)||void 0===o?void 0:o.disableQueryParamsComments)&&(s&&console.log("disableQueryParamsComments"),null===(n=this.commentElement)||void 0===n||n.disableQueryParamsComments()))}catch(t){console.warn("Error in setQueryParamsCommentsInSdk: ",t),Gc("Error in setQueryParamsCommentsInSdk: ",t)}},this.checkGlobalUserContact=()=>{try{this.contactElement&&this.contactElement.isUserGlobalContact().subscribe((t=>{this.isUserGlobalContact=t}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t),Gc("Error in checkGlobalUserContact: ",t)}},this.setProjectConfigVariables=t=>{var e,i,o,n;try{const s="Admin"===this.snippylyUserRole;this.allFeatureDisabled=!s&&(null!==(e=null==t?void 0:t.disabled)&&void 0!==e&&e),this.allFeatureRestricted=null!==(i=null==t?void 0:t.restricted)&&void 0!==i&&i,this.guestMode=null!==(o=null==t?void 0:t.guestMode)&&void 0!==o&&o,this.allowGuestModeSignIn=!!(null===(n=null==t?void 0:t.guestModeConfig)||void 0===n?void 0:n.allowSignIn),(null==t?void 0:t.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.guestMode&&Kc(vt.Events.GUEST_MODE_PRESENT),this.passwordProtected=!1,this.queryParamsComments=!!(null==t?void 0:t.queryParamsComments),this.usePageTitleAsLocationName=!!(null==t?void 0:t.usePageTitleAsLocationName),Velt&&(t&&this.passwordProtected&&!this.isPasswordValid?Velt.disableFeatures(["area","arrow","audioHuddle","cursor","huddle","liveStateSync","presence","tag","recorder","comment"]):Velt.disableFeatures([])),Tc(Wt,this.guestMode+"",!0),Tc(Qt,this.allowGuestModeSignIn+"",!0),Tc(Gt,this.passwordProtected+"",!0),Tc(Kt,this.queryParamsComments+"",!0),Tc(Zt,this.usePageTitleAsLocationName+"",!0)}catch(t){console.warn("Error in setProjectConfigVariables: ",t),Gc("Error in setProjectConfigVariables: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded,this.expanded?Kc(vt.Events.TOOLBAR_EXPANDED):Kc(vt.Events.TOOLBAR_COLLAPSED)}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t),Gc("Error in toggleSnippylyPluginToolbar: ",t)}},this.enablePrivateCommentModeOnCommentElement=()=>{try{if(!this.commentElement||"function"!=typeof this.commentElement.enablePrivateMode)return;this.commentElement.enablePrivateMode({type:qt})}catch(t){console.warn("Error in enablePrivateCommentModeOnCommentElement: ",t),Gc("Error in enablePrivateCommentModeOnCommentElement: ",t)}},this.disablePrivateCommentModeOnCommentElement=()=>{try{if(!this.commentElement||"function"!=typeof this.commentElement.disablePrivateMode)return;this.commentElement.disablePrivateMode()}catch(t){console.warn("Error in disablePrivateCommentModeOnCommentElement: ",t),Gc("Error in disablePrivateCommentModeOnCommentElement: ",t)}},this.enableVisibilityOptionsOnCommentElement=()=>{try{if(this.visibilityOptionsEnabled)return;if(!this.commentElement||"function"!=typeof this.commentElement.enableVisibilityOptions)return;this.commentElement.enableVisibilityOptions(),this.visibilityOptionsEnabled=!0,Kc(vt.Events.VISIBILITY_OPTIONS_ENABLED)}catch(t){console.warn("Error in enableVisibilityOptionsOnCommentElement: ",t),Gc("Error in enableVisibilityOptionsOnCommentElement: ",t)}},this.disableVisibilityOptionsOnCommentElement=()=>{try{if(!this.visibilityOptionsEnabled)return;if(!this.commentElement||"function"!=typeof this.commentElement.disableVisibilityOptions)return void(this.visibilityOptionsEnabled=!1);this.commentElement.disableVisibilityOptions(),this.visibilityOptionsEnabled=!1,Kc(vt.Events.VISIBILITY_OPTIONS_DISABLED)}catch(t){console.warn("Error in disableVisibilityOptionsOnCommentElement: ",t),Gc("Error in disableVisibilityOptionsOnCommentElement: ",t)}},this.maybeApplyVisibilityOptionsToCommentElement=()=>{"Admin"===this.snippylyUserRole&&this.canShowPrivateCommentToggle?this.enableVisibilityOptionsOnCommentElement():this.disableVisibilityOptionsOnCommentElement()},this.togglePrivateCommentMode=()=>{try{this.commentElement&&(this.privateCommentModeEnabled?(this.disablePrivateCommentModeOnCommentElement(),this.privateCommentModeEnabled=!1,Kc(vt.Events.PRIVATE_MODE_DISABLED)):(this.enablePrivateCommentModeOnCommentElement(),this.privateCommentModeEnabled=!0,Kc(vt.Events.PRIVATE_MODE_ENABLED)),Tc(Yt,this.privateCommentModeEnabled.toString()))}catch(t){console.warn("Error in togglePrivateCommentMode: ",t),Gc("Error in togglePrivateCommentMode: ",t)}},this.checkPrivateCommentModeFromStorage=()=>{try{!this.allFeatureDisabled&&"Admin"===this.snippylyUserRole&&this.canShowPrivateCommentToggle&&_c(Yt)&&(this.privateCommentModeEnabled="true"===_c(Yt),this.privateCommentModeEnabled&&this.enablePrivateCommentModeOnCommentElement())}catch(t){console.warn("Error in checkPrivateCommentModeFromStorage: ",t),Gc("Error in checkPrivateCommentModeFromStorage: ",t)}},this.loginWithGoogle=()=>{try{if(Kc(vt.Events.SIGNIN_CLICKED),this.loading||this.customLoginEnabledLocally)return;const t=this.buildSignInUrlWithParams(this.signInUrl||"");window.open(t,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t),Gc("Error in loginWithGoogle: ",t)}},this.buildSignInUrlWithParams=t=>{try{const e=new URL(t);return this.apiKey&&e.searchParams.set("apiKey",this.apiKey),this.projectId&&e.searchParams.set("projectId",this.projectId),e.toString()}catch(e){return console.warn("Error in buildSignInUrlWithParams: ",e),Gc("Error in buildSignInUrlWithParams: ",e),t}},this.getQRCode=async()=>{try{const t=new URL(window.location.href);null==t||t.searchParams.set("review","true");const e=null==t?void 0:t.toString();if(e){const t=Nc(e,Ee,ke),i=await fetch(`https://us-central1-snipply-sdk-staging.cloudfunctions.net/getqrcode?text=${encodeURIComponent(t)}`),o=await i.json();(null==o?void 0:o.qrcode)&&(this.qrCode=null==o?void 0:o.qrcode)}}catch(t){console.warn("Error in getQRCode: ",t),Gc("Error in getQRCode: ",t)}},this.toggleQRCodeVisibility=async()=>{try{Kc(vt.Events.OPEN_MOBILE_CLICKED),this.showQrCode=!this.showQrCode,this.showQrCode&&!this.qrCode&&await this.getQRCode()}catch(t){console.warn("Error in toggleQRCodeVisibility: ",t),Gc("Error in toggleQRCodeVisibility: ",t)}},this.onUserInviteToolClick=()=>{var t;(null===(t=this.snippylyUser)||void 0===t?void 0:t.isGuest)?(this.guestModeSignInModalConfig.title="Sign in to invite others.",this.guestModeSignInModalConfig.description="Invite team members to comment on this project.",this.guestModeSignInModalConfig.showLeaveCommentButton=!1,this.guestModeSignInModalConfig.closeOnClickOutside=!0,this.openGuestModeSignInModal()):this.openInviteModal()},this.openInviteModal=()=>{this.showInviteModal=!0,Kc(vt.Events.INVITE_MODAL_OPENED)},this.closeInviteModal=()=>{this.showInviteModal=!1},this.onInviteSuccess=()=>{this.closeInviteModal(),Kc(vt.Events.INVITE_SENT)},this.removeSnippyly=async()=>{try{Kc(vt.Events.EXIT_REVIEW_MODE_CLICKED),this.exitReviewModeCalled=!0,Ic(Et),Ic(kt),Ic(Nt),Ic(Vt,"sessionStorage"),Ic(Ft,"sessionStorage");const t=new URL(document.location),e=t.searchParams;e.delete(Nt),e.delete(Et),e.delete(Ot),e.delete(kt),this.projectVersionKey&&e.delete(this.projectVersionKey),e.delete(jt),e.delete(Rt),e.delete(Ut),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t),Gc("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{Kc(vt.Events.SIGNOUT_CLICKED),this.subscriptions.forEach((t=>{t&&t.unsubscribe&&(null==t||t.unsubscribe())})),this.contactListSubscription&&(this.contactListSubscription.unsubscribe(),this.contactListSubscription=null),await Velt.signOutUser(),Ic($t),Ic(Dt),Ic(Ht),Ic(Yt),this.snippylyUser=void 0,window.open(this.signOutUrl,"_self")}catch(t){console.warn("Error in signOutUser: ",t),Gc("Error in signOutUser: ",t)}},this.toggleMenu=(t,e)=>{try{t.stopPropagation(),this.menuOpenedId===e?this.menuOpenedId=void 0:this.menuOpenedId=e}catch(t){console.warn("Error in toggleMenu: ",t),Gc("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t),Gc("Error in copyLink: ",t)}},this.goToAdminPortal=()=>{try{let t=`${xe}`;Velt&&(null===Velt||void 0===Velt?void 0:Velt.getDocumentId)&&this.serverDocumentId&&(t=`${xe}/dashboard/project/comment/${this.apiKey}/${this.serverDocumentId}`),Kc(vt.Events.VIEW_PROJECT_CLICKED),window.open(t,"_blank")}catch(t){console.warn("Error in goToAdminPortal: ",t),Gc("Error in goToAdminPortal: ",t)}},this.goToAdminPortalDashboard=()=>{try{let t=`${xe}`;Velt&&(null===Velt||void 0===Velt?void 0:Velt.getDocumentId)&&this.serverDocumentId&&(t=`${xe}/dashboard`),window.open(t,"_blank")}catch(t){console.warn("Error in goToAdminPortalDashboard: ",t),Gc("Error in goToAdminPortalDashboard: ",t)}},this.joinCommunity=()=>{try{window.open("https://join.slack.com/t/superflowusers/shared_invite/zt-1q3jzsddt-NEb~uu9RXscLfxOIDGQXJw","_blank")}catch(t){console.warn("Error in joinCommunity: ",t),Gc("Error in joinCommunity: ",t)}},this.onboardingNextClick=()=>{try{this.showOnboardingModal=!1,Tc(Rt,"true");const t=new URL(document.location);t.searchParams.delete(Rt),window.history.replaceState({},document.title,t.href)}catch(t){console.warn("Error in onboardingNextClick: ",t),Gc("Error in onboardingNextClick: ",t)}},this.onLiveDemoModalNextClick=()=>{try{this.showLiveDemoModal=!1,Tc(Ut,"true",!1,"sessionStorage");const t=new URL(document.location);t.searchParams.delete(Ut),window.history.replaceState({},document.title,t.href)}catch(t){console.warn("Error in onLiveDemoModalNextClick: ",t),Gc("Error in onLiveDemoModalNextClick: ",t)}},this.onFigmaDemoModalNextClick=()=>{try{this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(zt),window.history.replaceState({},document.title,t.href)}catch(t){console.warn("Error in onFigmaDemoModalNextClick: ",t),Gc("Error in onFigmaDemoModalNextClick: ",t)}},this.onUpgradePlanClick=()=>{try{window.open("https://superflow-portal-v2-staging.firebaseapp.com/settings/billing","_blank")}catch(t){console.warn("Error in onUpgradePlanClick: ",t),Gc("Error in onUpgradePlanClick: ",t)}},this.onTourCommentTooltipClick=()=>{try{this.showTourCommentTooltip=!1,Tc(Bt,"true"),this.firstCommentNudge&&(this.firstCommentNudge=!1,this.autoCommentModeArmedOnce=!0)}catch(t){console.warn("Error in onTourCommentTooltipClick: ",t),Gc("Error in onTourCommentTooltipClick: ",t)}},this.onGuestModeChipSignInButtonClick=()=>{try{Kc(vt.Events.GUEST_MODE_SIGN_IN_BUTTON_CLICKED),this.loginWithGoogle()}catch(t){console.warn("Error in onGuestModeChipSignInButtonClick: ",t),Gc("Error in onGuestModeChipSignInButtonClick: ",t)}},this.openGuestModeSignInModal=()=>{try{this.showGuestModeSignInModal=!0,Kc(vt.Events.GUEST_MODE_SIGN_IN_DIALOG_SHOWN)}catch(t){console.warn("Error in openGuestModeSignInModal: ",t),Gc("Error in openGuestModeSignInModal: ",t)}},this.closeGuestModeSignInModal=()=>{try{this.showGuestModeSignInModal=!1,this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig))}catch(t){console.warn("Error in closeGuestModeSignInModal: ",t),Gc("Error in closeGuestModeSignInModal: ",t)}},this.onGuestModeSignInModalSignInButtonClick=()=>{try{Kc(vt.Events.GUEST_MODE_SIGN_IN_BUTTON_CLICKED),this.loginWithGoogle()}catch(t){console.warn("Error in onGuestModeSignInModalSignInButtonClick: ",t),Gc("Error in onGuestModeSignInModalSignInButtonClick: ",t)}},this.openGuestModeNameModel=t=>{try{t&&(t.stopPropagation(),t.preventDefault()),this.skipGuestNameModal||(this.showGuestModeNameModal=!0,Kc(vt.Events.GUEST_MODE_NAME_NUDGE_SHOWN))}catch(t){console.warn("Error in openGuestModeNameModel: ",t),Gc("Error in openGuestModeNameModel: ",t)}},this.closeGuestModeNameModel=()=>{try{this.showGuestModeNameModal=!1}catch(t){console.warn("Error in closeGuestModeNameModel: ",t),Gc("Error in closeGuestModeNameModel: ",t)}},this.onGuestModeNameModalSkipButtonClick=()=>{try{Kc(vt.Events.GUEST_MODE_SKIP_BUTTON_CLICKED),this.showGuestModeNameModal=!1}catch(t){console.warn("Error in onGuestModeNameModalSkipButtonClick: ",t),Gc("Error in onGuestModeNameModalSkipButtonClick: ",t)}},this.onPasswordProtectedModalCloseButtonClick=()=>{try{Kc(vt.Events.PASSWORD_PROTECTED_MODAL_CLOSE_BUTTON_CLICKED),this.showPasswordProtectedModal=!1,this.password="",this.showInvalidPassword=!1}catch(t){console.warn("Error in onPasswordProtectedModalCloseButtonClick: ",t),Gc("Error in onPasswordProtectedModalCloseButtonClick: ",t)}},this.onPasswordProtectedModalOpenButtonClick=()=>{try{Kc(vt.Events.PASSWORD_PROTECTED_MODAL_OPEN_BUTTON_CLICKED),this.showPasswordProtectedModal=!0}catch(t){console.warn("Error in onPasswordProtectedModalOpenButtonClick: ",t),Gc("Error in onPasswordProtectedModalOpenButtonClick: ",t)}},this.showGuestModeSignInBanner=()=>{try{this.guestModeSignInBannerVisible=!0,Kc(vt.Events.GUEST_MODE_SIGN_IN_NUDGE_SHOWN)}catch(t){console.warn("Error in showGuestModeSignInBanner: ",t),Gc("Error in showGuestModeSignInBanner: ",t)}},this.hideGuestModeSignInBanner=()=>{try{this.guestModeSignInBannerVisible=!1}catch(t){console.warn("Error in hideGuestModeSignInBanner: ",t),Gc("Error in hideGuestModeSignInBanner: ",t)}},this.onGuestModeBannerSignInButtonClick=()=>{try{Kc(vt.Events.GUEST_MODE_SIGN_IN_CLICKED),this.loginWithGoogle()}catch(t){console.warn("Error in onGuestModeBannerSignInButtonClick: ",t),Gc("Error in onGuestModeBannerSignInButtonClick: ",t)}},this.updateGuestUserName=async()=>{var t;try{if(!(null===(t=this.guestUserNameInput)||void 0===t?void 0:t.trim()))return;if(this.guestUserNameUpdateLoading)return;const e=Dc(!0,this.apiKey);if(e){const t=JSON.parse(JSON.stringify(e));e.name=this.guestUserNameInput,e.photoUrl=null,this.guestUserNameUpdateLoading=!0,(t=>{try{const e=JSON.stringify(t),i=Nc(e,Ee,ke);Tc(Pt,i,!0)}catch(t){console.warn("Error in updateGuestUser: ",t),Gc("Error in updateGuestUser: ",t)}})(e),await Velt.identify(e),this.snippylyUser=JSON.parse(JSON.stringify(e)),await od(this.apiKey,this.projectId||"",t,e),this.showGuestModeNameModal=!1,this.guestUserNameUpdated=!0,this.guestUserNameUpdateLoading=!1,Tc(te,"true"),Kc(vt.Events.GUEST_MODE_NAME_ADDED,{oldName:null==t?void 0:t.name,newName:null==e?void 0:e.name})}this.closeGuestModeNameModel()}catch(t){console.warn("Error in updateGuestUserName: ",t),Gc("Error in updateGuestUserName: ",t)}},this.submitPassword=async()=>{var t;try{if(Kc(vt.Events.REVIEW_PASSWORD_ADDED),!(null===(t=this.password)||void 0===t?void 0:t.trim()))return;if(this.validatingPasswordLoading)return;this.validatingPasswordLoading=!0,this.isPasswordValid=await Qc(this.apiKey,this.projectId,this.password),function(t,e){try{const i="object"==typeof e?JSON.stringify(e):e;localStorage.setItem(t,i)}catch(t){console.warn("Error in setLocalStorage: ",t)}}(Jt,this.isPasswordValid),this.isPasswordValid?(this.password="",this.onPasswordProtectedModalCloseButtonClick(),this.showInvalidPassword=!1,Velt&&Velt.disableFeatures([]),Kc(vt.Events.REVIEW_PASSWORD_ACCEPTED)):(this.showInvalidPassword=!0,Kc(vt.Events.REVIEW_PASSWORD_REJECTED)),this.validatingPasswordLoading=!1}catch(t){console.warn("Error in submitPassword: ",t),Gc("Error in submitPassword: ",t)}},this.updateUserName=async()=>{var t;try{if(!(null===(t=this.guestUserNameInput)||void 0===t?void 0:t.trim()))return;if(this.guestUserNameUpdateLoading)return;this.guestUserNameUpdateLoading=!0;const e=JSON.parse(JSON.stringify(this.snippylyUser)),i=JSON.parse(JSON.stringify(this.snippylyUser));i.name=this.guestUserNameInput,await od(this.apiKey,this.projectId||"",e,i),await Velt.updateUser(i),this.snippylyUser=JSON.parse(JSON.stringify(i));const o=$c();o.name=i.name;const n=JSON.stringify(o),s=Nc(n,Ee,ke);Tc(Dt,s,!0),this.guestUserNameUpdateLoading=!1,this.guestUserNameInput="",this.closeGuestModeNameModel()}catch(t){console.warn("Error in updateUserName: ",t),Gc("Error in updateUserName: ",t)}},this.isAgentAnnotation=t=>{var e;try{const i=null!==this.extractAgentId((null===(e=null==t?void 0:t.agent)||void 0===e?void 0:e.agentFields)||[]),o=(null==t?void 0:t.type)===ue,n=(null==t?void 0:t.commentType)===ue;return i||o||n}catch(t){return console.warn("Error in isAgentAnnotation: ",t),!1}},this.getSidebarGroupExpansionMap=()=>{var t,e,i,o,n;try{const s=document.querySelector(fe.VELT_COMMENTS_SIDEBAR_LEGACY),r=null===(n=null===(o=null===(i=null===(e=null===(t=null==s?void 0:s._ngElementStrategy)||void 0===t?void 0:t.componentRef)||void 0===e?void 0:e.instance)||void 0===i?void 0:i.componentConfigSignal)||void 0===o?void 0:o.call(i))||void 0===n?void 0:n.virtualScrollData;if(!Array.isArray(r))return;const a=new Map;return r.forEach((t=>{var e,i;if("group"!==(null==t?void 0:t.type))return;const o=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.displayName,n=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.isExpanded;"string"==typeof o&&"boolean"==typeof n&&a.set(o,n)})),a}catch(t){return void console.warn("Error in getSidebarGroupExpansionMap: ",t)}},this.filterAgentCommentsFromSidebar=(t,e)=>{try{if(this.isSettingSidebarData)return;if(!t||!this.commentElement)return;const i=t.commentAnnotations;if(!Array.isArray(i))return;if(this.processAgentComments(i),this.sidebarV2Enabled)return;if(this.showAgentCommentsInSidebar)return;const o=Array.isArray(null==t?void 0:t.systemFilteredAnnotations)?t.systemFilteredAnnotations:[],n=new Set(o.map((t=>(null==t?void 0:t.annotationId)||(null==t?void 0:t.id))).filter((t=>Boolean(t)))),s=[];i.forEach((t=>{if(this.isAgentAnnotation(t))return;const e=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id);e&&n.has(e)&&s.push(t)}));const r=new Map;s.forEach((t=>{var e,i,o,n;const s=(null===(e=null==t?void 0:t.pageInfo)||void 0===e?void 0:e.path)||(null===(i=null==t?void 0:t.pageInfo)||void 0===i?void 0:i.url)||(null===(o=null==t?void 0:t.location)||void 0===o?void 0:o.path)||"/";r.has(s)||r.set(s,[]),null===(n=r.get(s))||void 0===n||n.push(t)}));const a=[],l=new URL(window.location.href).pathname,c="/"+this.normalizePagePath(l);r.forEach(((t,i)=>{const o=null==e?void 0:e.get(i);a.push({groupId:i,groupName:i,isExpanded:"boolean"==typeof o?o:i===c,annotations:t})})),this.isSettingSidebarData=!0,this.commentElement.setCommentSidebarData(a,{grouping:!0}),this.isSettingSidebarData=!1}catch(t){this.isSettingSidebarData=!1,console.warn("Error in filterAgentCommentsFromSidebar: ",t),Gc("Error in filterAgentCommentsFromSidebar: ",t)}},this.mountCommentSidebar=()=>{const t=this.sidebarV2Enabled,e=t?fe.VELT_COMMENTS_SIDEBAR_V2:fe.VELT_COMMENTS_SIDEBAR_LEGACY,i=t?fe.VELT_COMMENTS_SIDEBAR_LEGACY:fe.VELT_COMMENTS_SIDEBAR_V2;if(document.querySelectorAll(i).forEach((t=>t.remove())),!document.querySelector(e)){const i=document.createElement(e);i.setAttribute("shadow-dom","true"),i.setAttribute(t?ge.URL_NAVIGATION:ge.ENABLE_URL_NAVIGATION,"true"),i.setAttribute(ge.CURRENT_LOCATION_SUFFIX,"true"),e===fe.VELT_COMMENTS_SIDEBAR_LEGACY&&(i.setAttribute(ge.SIDEBAR_BUTTON_COUNT_TYPE,me),i.setAttribute(ge.CUSTOM_ACTIONS,"true")),window.document.body.appendChild(i)}},this.setCommentSidebarVisibility=t=>{var e,i,o,n,s,r,a,l;try{if(t===this.showAgentCommentsInSidebar)return;if(this.sidebarV2Enabled)return t?null===(i=null===(e=this.commentElement)||void 0===e?void 0:e.disableFilterCommentsOnDom)||void 0===i||i.call(e):null===(n=null===(o=this.commentElement)||void 0===o?void 0:o.enableFilterCommentsOnDom)||void 0===n||n.call(o),void(this.showAgentCommentsInSidebar=t);const c=document.querySelector(fe.VELT_COMMENTS_SIDEBAR_LEGACY);if(!c)return;t?(c.removeAttribute(ge.SIDEBAR_BUTTON_COUNT_TYPE),c.removeAttribute(ge.CUSTOM_ACTIONS),null===(r=null===(s=this.commentElement)||void 0===s?void 0:s.disableFilterCommentsOnDom)||void 0===r||r.call(s)):(c.setAttribute(ge.SIDEBAR_BUTTON_COUNT_TYPE,me),c.setAttribute(ge.CUSTOM_ACTIONS,"true"),null===(l=null===(a=this.commentElement)||void 0===a?void 0:a.enableFilterCommentsOnDom)||void 0===l||l.call(a)),this.showAgentCommentsInSidebar=t}catch(t){console.warn("Error in setCommentSidebarVisibility: ",t),Gc("Error in setCommentSidebarVisibility: ",t)}},this.toggleCommentSidebarVisibility=()=>{try{this.setCommentSidebarVisibility(!this.showAgentCommentsInSidebar),this.menuOpenedId=void 0}catch(t){console.warn("Error in toggleCommentSidebarVisibility: ",t),Gc("Error in toggleCommentSidebarVisibility: ",t)}},this.toggleSidebarV2=()=>{try{Tc(yt,this.sidebarV2Enabled?"false":"true",!1,"sessionStorage"),window.location.reload()}catch(t){console.warn("Error in toggleSidebarV2: ",t),Gc("Error in toggleSidebarV2: ",t)}},this.toggleVeltProxy=()=>{try{if(!this.veltProxyToggleVisible)return;t=!this.veltProxyEnabled,Tc(bt,t?"true":"false"),window.location.reload()}catch(t){console.warn("Error in toggleVeltProxy: ",t),Gc("Error in toggleVeltProxy: ",t)}var t},this.isScreenshotDisabledHost=()=>{try{return de.includes(window.location.hostname)}catch{return!1}},this.getScreenshotMode=()=>{var t,e,i;return"local"===(null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.advancedFeatures)||void 0===i?void 0:i.screenshotMode)?"local":"basic"},this.logCaptureTrigger=(...t)=>{Sd()&&"undefined"!=typeof console&&console.warn("[sf-capture][trigger]",...t)},this.ensureAddCommentAnnotationSubscription=()=>{var t,e,i;this.commentElement&&"function"==typeof this.commentElement.on?this.addCommentAnnotationSubscription&&this.addCommentAnnotationSubscribedEl===this.commentElement?this.logCaptureTrigger("addCommentAnnotation subscription already attached"):(this.addCommentAnnotationSubscription&&(null===(i=(e=this.addCommentAnnotationSubscription).unsubscribe)||void 0===i||i.call(e),this.addCommentAnnotationSubscription=void 0,this.logCaptureTrigger("addCommentAnnotation re-subscribing: comment element changed")),this.addCommentAnnotationSubscription=this.commentElement.on("addCommentAnnotation").subscribe((t=>this.onAddCommentAnnotation(t))),this.addCommentAnnotationSubscribedEl=this.commentElement,this.logCaptureTrigger("addCommentAnnotation subscription attached")):this.logCaptureTrigger("addCommentAnnotation subscription NOT attached: commentElement.on unavailable",{hasCommentElement:!!this.commentElement,hasOn:"function"==typeof(null===(t=this.commentElement)||void 0===t?void 0:t.on)})},this.applyScreenshotSetting=()=>{var t,e,i,o,n,s,r,a,l,c,d,h,u;if(this.commentElement)return this.isScreenshotDisabledHost()?(null===(e=(t=this.commentElement).disableScreenshot)||void 0===e||e.call(t),void(this.nativeScreenshotEnabled&&(this.nativeScreenshotEnabled=!1,this.nativeCapture.dispose()))):void(this.nativeScreenshotEnabled?null===(o=(i=this.commentElement).disableScreenshot)||void 0===o||o.call(i):(null===(r=null===(s=null===(n=this.customerMetadata)||void 0===n?void 0:n.superflow)||void 0===s?void 0:s.advancedFeatures)||void 0===r?void 0:r.takeScreenshotOnComments)?"local"!==this.getScreenshotMode()?null===(u=(h=this.commentElement).enableScreenshot)||void 0===u||u.call(h):null===(d=(c=this.commentElement).disableScreenshot)||void 0===d||d.call(c):null===(l=(a=this.commentElement).disableScreenshot)||void 0===l||l.call(a))},this.canUseNativeScreenshot=()=>{var t,e,i;return!this.isScreenshotDisabledHost()&&(Qd()&&"local"===this.getScreenshotMode()&&!!(null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.advancedFeatures)||void 0===i?void 0:i.takeScreenshotOnComments))},this.getNativeScreenshotPermission=()=>{const t=_c(ne,!1,"sessionStorage");return"granted"===t||"denied"===t?t:null},this.setNativeScreenshotPermission=t=>{Tc(ne,t,!1,"sessionStorage"),this.nativeScreenshotDenied="denied"===t},this.clearNativeScreenshotPermission=()=>{Ic(ne,"sessionStorage"),this.nativeScreenshotDenied=!1},this.promptNativeScreenshotForCommentMode=()=>{this.nativeScreenshotEnabled||this.nativeScreenshotEnabling||!this.canUseNativeScreenshot()||(this.logCaptureTrigger("commentMode enter: requesting screen share"),this.enableNativeScreenshot())},this.toggleNativeScreenshot=async()=>{try{if(!this.canUseNativeScreenshot())return;this.nativeScreenshotEnabled?(this.disableNativeScreenshot(),this.setNativeScreenshotPermission("denied")):(this.clearNativeScreenshotPermission(),await this.enableNativeScreenshot()),this.menuOpenedId=void 0}catch(t){console.warn("Error in toggleNativeScreenshot: ",t),Gc("Error in toggleNativeScreenshot: ",t)}},this.enableNativeScreenshot=()=>(this.nativeScreenshotEnabling&&this.nativeScreenshotEnablingPromise||(this.nativeScreenshotEnabling=!0,this.nativeScreenshotEnablingPromise=this.performEnableNativeScreenshot()),this.nativeScreenshotEnablingPromise),this.performEnableNativeScreenshot=async()=>{var t,e;try{if(await this.nativeCapture.init(),!this.nativeCapture.isActive())return this.nativeScreenshotEnabled=!1,void this.nativeCapture.dispose();this.nativeScreenshotEnabled=!0,this.setNativeScreenshotPermission("granted"),null===(e=null===(t=this.commentElement)||void 0===t?void 0:t.disableScreenshot)||void 0===e||e.call(t),this.ensureAddCommentAnnotationSubscription()}catch(t){this.nativeScreenshotEnabled=!1,this.nativeCapture.dispose(),!function(t){var e;const i=t,o=null!==(e=null==i?void 0:i.message)&&void 0!==e?e:"";return!0===(null==i?void 0:i.sfNativeExpected)||"native-share-ended-during-init"===o||"native-not-supported"===o}(t)?console.warn("Native screenshot enable failed/cancelled: ",t):(this.setNativeScreenshotPermission("denied"),Sd()&&"undefined"!=typeof console&&console.info("[sf-capture][native] enable skipped (expected):",t))}finally{this.nativeScreenshotEnabling=!1,this.nativeScreenshotEnablingPromise=void 0}},this.disableNativeScreenshot=()=>{try{this.nativeScreenshotEnabled=!1,this.nativeCapture.dispose(),this.restoreSdkScreenshot()}catch(t){console.warn("Error in disableNativeScreenshot: ",t),Gc("Error in disableNativeScreenshot: ",t)}},this.handleNativeScreenshotStreamEnded=()=>{try{const t=this.nativeScreenshotEnabled;if(this.nativeScreenshotEnabled=!1,!t)return;this.setNativeScreenshotPermission("denied"),this.restoreSdkScreenshot(),this.requestUpdate()}catch(t){console.warn("Error in handleNativeScreenshotStreamEnded: ",t),Gc("Error in handleNativeScreenshotStreamEnded: ",t)}},this.restoreSdkScreenshot=()=>{var t,e,i,o,n;this.isScreenshotDisabledHost()||"basic"===this.getScreenshotMode()&&(null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.advancedFeatures)||void 0===i?void 0:i.takeScreenshotOnComments)&&(null===(n=null===(o=this.commentElement)||void 0===o?void 0:o.enableScreenshot)||void 0===n||n.call(o))},this.onAddCommentAnnotation=async t=>{var e,i,o,n,s,r,a,l,c;try{if(this.logCaptureTrigger("addCommentAnnotation event",{nativeScreenshotEnabled:this.nativeScreenshotEnabled,captureActive:this.nativeCapture.isActive(),dataKeys:t?Object.keys(t):null,commentAnnotationKeys:(null==t?void 0:t.commentAnnotation)?Object.keys(t.commentAnnotation):null}),!this.nativeScreenshotEnabled&&!this.canUseNativeScreenshot())return void this.logCaptureTrigger("skip: native screenshot unavailable");if(!this.nativeScreenshotEnabled){const t=this.nativeScreenshotEnabling&&!!this.nativeScreenshotEnablingPromise;if(!t&&null!==this.getNativeScreenshotPermission())return void this.logCaptureTrigger("skip: native screenshot not enabled (share decision recorded, no prompt in flight)");if(this.logCaptureTrigger(t?"comment add: share prompt already in flight, awaiting its outcome":"comment add: share never requested this session, prompting"),await this.enableNativeScreenshot(),!this.nativeScreenshotEnabled)return void this.logCaptureTrigger("skip: screen share not granted")}const d=null!==(o=null!==(e=null==t?void 0:t.annotationId)&&void 0!==e?e:null===(i=null==t?void 0:t.commentAnnotation)||void 0===i?void 0:i.annotationId)&&void 0!==o?o:null==t?void 0:t.id,h=null!==(l=null!==(a=null!==(s=null===(n=null==t?void 0:t.commentAnnotation)||void 0===n?void 0:n.comments)&&void 0!==s?s:null===(r=null==t?void 0:t.commentAnnotation)||void 0===r?void 0:r.commentData)&&void 0!==a?a:null==t?void 0:t.comments)&&void 0!==l?l:null==t?void 0:t.commentData,u=null===(c=null==h?void 0:h[0])||void 0===c?void 0:c.commentId;if(!d||!u)return void this.logCaptureTrigger("skip: missing ids",{annotationId:d,commentId:u,data:t});this.captureAndAttachScreenshot(d,u)}catch(t){console.warn("Error in onAddCommentAnnotation: ",t),Gc("Error in onAddCommentAnnotation: ",t)}},this.captureAndAttachScreenshot=(t,e)=>this.nativeCapture.isActive()?(this.pendingScreenshotCount+=1,this.capturingScreenshot=!0,this.screenshotChain=this.screenshotChain.catch((()=>{})).then((()=>this.runCaptureAndAttach(t,e))).finally((()=>{this.pendingScreenshotCount=Math.max(0,this.pendingScreenshotCount-1),0===this.pendingScreenshotCount&&(this.capturingScreenshot=!1)})),this.screenshotChain):(this.logCaptureTrigger("skip: native capture not active",{annotationId:t,commentId:e}),Promise.resolve()),this.runCaptureAndAttach=async(t,e)=>{var i,o,n,s;try{this.logCaptureTrigger("capture start",{annotationId:t,commentId:e});const r=await this.nativeCapture.capture({focusAnnotationId:t}),a="image/webp"===r.blobType?"webp":"png",l=new File([r.blob],`screenshot-${t}.${a}`,{type:r.blobType}),c=await(null===(o=null===(i=this.commentElement)||void 0===i?void 0:i.addAttachment)||void 0===o?void 0:o.call(i,{annotationId:t,commentId:e,files:[l]}));if(c&&Array.isArray(c)&&c.length>0&&(null===(n=c[0])||void 0===n?void 0:n.valid)){const i=null===(s=c[0])||void 0===s?void 0:s.attachment;await this.commentElement.updateComment({annotationId:t,comment:{commentId:e,attachments:[i]},merge:!0}),this.logCaptureTrigger("capture attached",{annotationId:t,commentId:e})}else console.warn("Invalid screenshot file")}catch(t){console.warn("Native screenshot capture/attach failed: ",t),Gc("Native screenshot capture/attach failed: ",t)}},this.setupSidebarAgentCommentFilter=()=>{var t,e,i,o;try{if(!this.commentElement)return;if("function"==typeof this.commentElement.on&&(this.commentElement.on("commentSidebarDataInit").subscribe((t=>{this.filterAgentCommentsFromSidebar(t)})),this.commentElement.on("commentSidebarDataUpdate").subscribe((t=>{const e=this.getSidebarGroupExpansionMap();this.filterAgentCommentsFromSidebar(t,e)}))),this.setupAgentWarningsHydration(),this.agentCommentsModeRequested)return this.setCommentSidebarVisibility(!0),void(this.showAgentCommentsInSidebar||(null===(e=null===(t=this.commentElement)||void 0===t?void 0:t.disableFilterCommentsOnDom)||void 0===e||e.call(t),this.showAgentCommentsInSidebar=!0));this.sidebarV2Enabled&&(null===(o=null===(i=this.commentElement)||void 0===i?void 0:i.enableFilterCommentsOnDom)||void 0===o||o.call(i))}catch(t){console.warn("Error in setupSidebarAgentCommentFilter: ",t),Gc("Error in setupSidebarAgentCommentFilter: ",t)}},this.setupAgentWarningsHydration=()=>{try{if(!this.commentElement||"function"!=typeof this.commentElement.getAllCommentAnnotations||!this.documentId)return;const t=this.commentElement.getAllCommentAnnotations(this.documentId+"");if(!t||"function"!=typeof t.subscribe)return;const e=t.subscribe((t=>{try{if(!this.sidebarV2Enabled&&!this.showAgentCommentsInSidebar)return;this.processAgentComments(Array.isArray(t)?t:[])}catch(t){console.warn("Error in agent-warnings hydration subscription: ",t),Gc("Error in agent-warnings hydration subscription: ",t)}}));this.subscriptions.push(e)}catch(t){console.warn("Error in setupAgentWarningsHydration: ",t),Gc("Error in setupAgentWarningsHydration: ",t)}},this.getContentWarningsDisplayCount=()=>{try{return this.contentWarningsCount>99?"99+":`${this.contentWarningsCount}`}catch(t){return console.warn("Error in getContentWarningsDisplayCount: ",t),"0"}},this.onContentWarningsButtonClick=()=>{try{this.showContentWarningSidebar=!this.showContentWarningSidebar}catch(t){console.warn("Error in onContentWarningsButtonClick: ",t),Gc("Error in onContentWarningsButtonClick: ",t)}},this.onContentWarningSidebarClose=()=>{try{this.showContentWarningSidebar=!1}catch(t){console.warn("Error in onContentWarningSidebarClose: ",t)}},this.restoreContentWarningSidebarState=()=>{try{const t="true"===_c(oe,!1,"sessionStorage"),e=new URL(window.location.href).searchParams.has(Ot);if(!t)return;if(!e)return;if(this.allFeatureDisabled||"Admin"!==this.snippylyUserRole)return;this.showContentWarningSidebar=!0}catch(t){console.warn("Error in restoreContentWarningSidebarState: ",t),Gc("Error in restoreContentWarningSidebarState: ",t)}},this.navigateTo=t=>{try{window.location.href=t}catch(t){console.warn("Error in navigateTo: ",t),Gc("Error in navigateTo: ",t)}},this.onContentWarningSidebarAddAll=()=>{},this.onContentWarningItemClick=t=>{var e,i,o;try{const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.annotation;if(!(null==n?void 0:n.annotationId)&&!(null==n?void 0:n.id))return;const s=(null==n?void 0:n.annotationId)||(null==n?void 0:n.id),r=null===(i=null==n?void 0:n.pageInfo)||void 0===i?void 0:i.url;if(r&&!this.isCurrentPageUrl(r)){const t=new URL(r);return t.searchParams.set(Ot,s),this.showContentWarningSidebar&&Tc(oe,"true",!1,"sessionStorage"),void this.navigateTo(t.toString())}(null===(o=this.commentElement)||void 0===o?void 0:o.selectCommentByAnnotationId)&&this.commentElement.selectCommentByAnnotationId(s),setTimeout((()=>{var t;(null===(t=this.commentElement)||void 0===t?void 0:t.scrollToCommentByAnnotationId)&&this.commentElement.scrollToCommentByAnnotationId(s)}),150)}catch(t){console.warn("Error in onContentWarningItemClick: ",t),Gc("Error in onContentWarningItemClick: ",t)}},this.isCurrentPageUrl=t=>{try{const e=new URL(t).pathname;return e===window.location.pathname}catch{return!1}},this.setupVeltButtonClickListener=()=>{try{if(!(null===Velt||void 0===Velt?void 0:Velt.on))return void console.warn("[CWS Toolbar] Velt.on not available for button click listener");Velt.on("veltButtonClick").subscribe((t=>{var e;try{if(!t)return;const i=null===(e=null==t?void 0:t.buttonContext)||void 0===e?void 0:e.clickedButtonId,o=null==t?void 0:t.commentAnnotation,n=(null==o?void 0:o.annotationId)||(null==o?void 0:o.id),s="accept-suggestion"===i||"reject-suggestion"===i;if(s&&n&&this.processingAnnotationIds.has(n))return;if(s&&this.isRunningUnderPreviewProxy()&&"Admin"!==this.snippylyUserRole)return void console.warn("[CWS Toolbar] Only admins can accept or reject suggestions. Ignoring under the preview proxy:",i);"prev-suggestion"===i?this.navigateSuggestion(o,"prev"):"next-suggestion"===i?this.navigateSuggestion(o,"next"):"accept-suggestion"===i?this.handleAcceptSuggestion(o):"reject-suggestion"===i&&this.handleDeclineSuggestion(o)}catch(t){console.warn("Error in veltButtonClick handler: ",t)}})),this.commentElement.onCommentSelectionChange().subscribe((t=>{this.handleCommentSelection(t)}))}catch(t){console.warn("Error in setupVeltButtonClickListener: ",t),Gc("Error in setupVeltButtonClickListener: ",t)}},this.navigateSuggestion=(t,e)=>{var i,o,n,s,r;try{if(!t)return void console.warn("[CWS Toolbar] No annotation provided for navigation");const a=null===(o=null===(i=null==t?void 0:t.agent)||void 0===i?void 0:i.result)||void 0===o?void 0:o.incorrectWord;if(!a)return void console.warn("[CWS Toolbar] No incorrectWord found on annotation");const l=this.findMatchingWarning(a);if(!l)return void console.warn("[CWS Toolbar] No matching warning found for word:",a);const c=null===(n=null==t?void 0:t.pageInfo)||void 0===n?void 0:n.path,d=this.normalizePagePath(c),h=null===(s=null==l?void 0:l.annotations)||void 0===s?void 0:s.filter((t=>{var e;const i=null===(e=null==t?void 0:t.pageInfo)||void 0===e?void 0:e.path;return this.normalizePagePath(i)===d}));if(!(null==h?void 0:h.length)||h.length<=1)return;const u=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id),p=h.findIndex((t=>((null==t?void 0:t.annotationId)||(null==t?void 0:t.id))===u));if(-1===p)return void console.warn("[CWS Toolbar] Current annotation not found in warning group");let v;v="next"===e?(p+1)%h.length:(p-1+h.length)%h.length;const f=h[v],g=(null==f?void 0:f.annotationId)||(null==f?void 0:f.id);g&&((null===(r=this.commentElement)||void 0===r?void 0:r.selectCommentByAnnotationId)&&this.commentElement.selectCommentByAnnotationId(g),setTimeout((()=>{var t;(null===(t=this.commentElement)||void 0===t?void 0:t.scrollToCommentByAnnotationId)&&this.commentElement.scrollToCommentByAnnotationId(g)}),150))}catch(t){console.warn("Error in navigateSuggestion: ",t),Gc("Error in navigateSuggestion: ",t)}},this.findMatchingWarning=t=>{var e;try{for(const i of this.agentGroups){const o=null===(e=null==i?void 0:i.warnings)||void 0===e?void 0:e.find((e=>(null==e?void 0:e.primaryText)===t));if(o)return o}return null}catch(t){return console.warn("Error in findMatchingWarning: ",t),null}},this.removeAnnotationFromWarnings=t=>{var e,i,o;try{if(!t)return;const n=e=>{var i,o,n,s;for(const r of e){const e=null===(i=null==r?void 0:r.annotations)||void 0===i?void 0:i.find((e=>((null==e?void 0:e.annotationId)||(null==e?void 0:e.id))===t));if(e){const t="grammar"===(null===(n=null===(o=null==e?void 0:e.agent)||void 0===o?void 0:o.result)||void 0===n?void 0:n.type)?this.grammarSuggestionPagePathMap:this.spellingSuggestionPagePathMap,i=(null==r?void 0:r.primaryText)||"",a=null===(s=null==e?void 0:e.pageInfo)||void 0===s?void 0:s.path,l=this.normalizePagePath(a);if(i&&l&&t.has(i)){const e=t.get(i),o=e.get(l)||0;o>1?e.set(l,o-1):(e.delete(l),0===e.size&&t.delete(i))}return}}};for(const t of this.agentGroups)(null==t?void 0:t.agentId)!==ve.SPELL_CHECK&&(null==t?void 0:t.agentId)!==ve.GRAMMAR_CHECK||n(t.warnings);const s=null!==(o=null===(i=null===(e=this.agentGroups)||void 0===e?void 0:e.map((e=>{var i,o,n,s,r;const a=null!==(n=null===(o=null===(i=null==e?void 0:e.warnings)||void 0===i?void 0:i.map((e=>{var i;const o=null===(i=null==e?void 0:e.annotations)||void 0===i?void 0:i.filter((e=>((null==e?void 0:e.annotationId)||(null==e?void 0:e.id))!==t));return o&&0!==o.length?{...e,annotations:o,occurrences:o.length}:null})))||void 0===o?void 0:o.filter((t=>null!==t)))&&void 0!==n?n:[],l=null!==(r=null===(s=null==e?void 0:e.annotations)||void 0===s?void 0:s.filter((e=>((null==e?void 0:e.annotationId)||(null==e?void 0:e.id))!==t)))&&void 0!==r?r:[];return 0===a.length?null:{...e,warnings:a,warningCount:a.length,annotations:l}})))||void 0===i?void 0:i.filter((t=>null!==t)))&&void 0!==o?o:[];this.agentGroups=s;const r=s.reduce(((t,e)=>t+e.warningCount),0);this.contentWarningsCount=r,this.hasContentWarnings=r>0}catch(t){console.warn("Error in removeAnnotationFromWarnings: ",t)}},this.setSuggestionButtonsLoading=(t,e,i)=>{try{const o=i||document.querySelector(".velt-comment-dialog.selected");if(!o)return;const n=o.querySelector(".sf-accept-btn"),s=o.querySelector(".sf-reject-btn");if(e){const e="accept"===t?n:s,i="accept"===t?s:n;null==e||e.classList.add("sf-btn-loading"),null==i||i.classList.add("sf-btn-disabled")}else null==n||n.classList.remove("sf-btn-loading","sf-btn-disabled"),null==s||s.classList.remove("sf-btn-loading","sf-btn-disabled")}catch(t){console.warn("Error in setSuggestionButtonsLoading: ",t)}},this.handleAcceptSuggestion=async t=>{var e,i,o;try{const n=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id);if(!n)return void console.warn("[CWS Toolbar] handleAcceptSuggestion: No annotationId found",t);if(this.processingAnnotationIds.has(n))return;const s=(null===(e=this.snippylyUser)||void 0===e?void 0:e.userId)||(null===(i=this.snippylyUser)||void 0===i?void 0:i.uid),r=(null===(o=this.snippylyUser)||void 0===o?void 0:o.email)||"";if(!s)return void console.warn("[CWS Toolbar] handleAcceptSuggestion: No user available");if(!this.documentId)return void console.warn("[CWS Toolbar] handleAcceptSuggestion: No documentId available");this.processingAnnotationIds.add(n);const a=document.querySelector(".velt-comment-dialog.selected");this.setSuggestionButtonsLoading("accept",!0,a);try{await hd(this.apiKey,this.apiKey,this.documentId+"",n,{userId:s,email:r}),this.removeAnnotationFromWarnings(n)}finally{this.processingAnnotationIds.delete(n),this.setSuggestionButtonsLoading("accept",!1,a)}}catch(t){console.warn("Error in handleAcceptSuggestion: ",t),Gc("Error in handleAcceptSuggestion: ",t)}},this.handleDeclineSuggestion=async t=>{var e,i,o;try{const n=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id);if(!n)return void console.warn("[CWS Toolbar] handleDeclineSuggestion: No annotationId found",t);if(this.processingAnnotationIds.has(n))return;if(!this.documentId)return void console.warn("[CWS Toolbar] handleDeclineSuggestion: No documentId available");this.processingAnnotationIds.add(n);const s=document.querySelector(".velt-comment-dialog.selected");this.setSuggestionButtonsLoading("reject",!0,s);const r=(null===(e=this.snippylyUser)||void 0===e?void 0:e.userId)||(null===(i=this.snippylyUser)||void 0===i?void 0:i.uid),a=(null===(o=this.snippylyUser)||void 0===o?void 0:o.email)||"";try{await ud(this.apiKey,this.apiKey,this.documentId+"",n,r?{userId:r,email:a}:void 0),this.removeAnnotationFromWarnings(n)}finally{this.processingAnnotationIds.delete(n),this.setSuggestionButtonsLoading("reject",!1,s)}}catch(t){console.warn("Error in handleDeclineSuggestion: ",t),Gc("Error in handleDeclineSuggestion: ",t)}},this.showFirstCommentNudge=()=>{try{if(!this.autoCommentModeRequested||this.autoCommentModeArmedOnce||this.addCommentMode)return;this.firstCommentNudge=!0,this.showTourCommentTooltip=!0}catch(t){console.warn("Error in showFirstCommentNudge: ",t),Gc("Error in showFirstCommentNudge: ",t)}},this.disableCommentMode=()=>{var t;try{(null===(t=this.commentElement)||void 0===t?void 0:t.disableCommentMode)&&this.commentElement.disableCommentMode()}catch(t){console.warn("Error in disableAddCommentMode: ",t),Gc("Error in disableAddCommentMode: ",t)}},this.disableCommentModeButton=()=>{try{return this.addCommentMode?L`
4730
+ `}catch(t){return console.warn("Error in getWordMark: ",t),L``}},this.generateLocation=()=>{try{if(this.autoLocation){const t=new URL(document.location).searchParams,e=new URL(document.location);e.searchParams.delete(Et),e.searchParams.delete(kt),e.searchParams.delete(Nt),e.searchParams.delete(Ot),e.searchParams.delete(Rt),e.searchParams.delete(Ut);const i=t.get(jt)||this.projectVersion;this.queryParamsComments||(e.search="");let o=(t=>{try{return t.replace(/#.*$/,"")}catch(e){return console.warn("Error in removeHashFromUrl: ",e),Zc("Error in removeHashFromUrl: ",e),t}})(e.href);this.projectId&&(o=null==o?void 0:o.replace(window.location.origin,"")),this.location={url:o,version:i}}}catch(t){console.warn("Error in generateLocation: ",t),Zc("Error in generateLocation: ",t)}},this.setLocation=t=>{var e,i,o,n;try{if(this.autoLocation&&window.Velt&&(null===Velt||void 0===Velt?void 0:Velt.setLocation)){if(this.version?(this.location||(this.location={}),this.location.version=this.version):this.location&&delete this.location.version,!(null==t?void 0:t.forceSetLocation)&&this.previousLocation&&(null===(e=this.previousLocation)||void 0===e?void 0:e.url)===(null===(i=this.location)||void 0===i?void 0:i.url)&&(null===(o=this.previousLocation)||void 0===o?void 0:o.version)===(null===(n=this.location)||void 0===n?void 0:n.version))return;const s=Sc(JSON.parse(JSON.stringify(this.location)));if(s?this.location.id=`${s}`:delete this.location.id,this.usePageTitleAsLocationName){const t=document.title;t&&(this.location.locationName=t)}null===Velt||void 0===Velt||Velt.setLocation(JSON.parse(JSON.stringify(this.location))),Wc({clientLocation:this.location}),this.previousLocation=JSON.parse(JSON.stringify(this.location)),this.onVeltLocationChange()}}catch(t){console.warn("Error in setLocation: ",t),Zc("Error in setLocation: ",t)}},this.onVeltLocationChange=()=>{try{window.dispatchEvent(new CustomEvent("veltLocationChange",{detail:this.location}))}catch(t){console.warn("Error in onVeltLocationChange: ",t),Zc("Error in onVeltLocationChange: ",t)}},this.identifySnippyly=async()=>{var t,e,i,o;let n="",s="";try{this.invalidApiKey=!1;let o,r={name:"Default User",email:"default@usesuperflow.com",userId:"default",isAnonymous:!0,organizationId:this.apiKey};o=this.customLoginEnabled&&this.providedUser?this.providedUser:$c(),Sr("[Superflow][identify] resolved user (pre-iam)",{source:this.customLoginEnabled&&this.providedUser?"providedUser":"token",email:null==o?void 0:o.email,userId:null==o?void 0:o.userId,name:null==o?void 0:o.name,isAnonymous:null==o?void 0:o.isAnonymous});const a=await this.getSamlConfig(),l=new URL(document.location);if(l.searchParams.has(Lt)&&l.searchParams.delete(Lt),a&&(this.signInUrl=`${xe}saml/${a.slug}/login?redirect_url=${encodeURIComponent(null==l?void 0:l.toString())}&source=sf`,window.Superflow.signInUrl=this.signInUrl),(null==o?void 0:o.email)&&(r=o),r.isAnonymous)delete r.groupId;else{const t=Velt.getDocumentId()||this.serverDocumentId;t&&(r.groupId=t+"")}if(this.customLoginEnabledLocally||(null===(t=null==r?void 0:r.contacts)||void 0===t?void 0:t.length)&&(r.contacts=[]),n=null==r?void 0:r.email,s=null==r?void 0:r.userId,(null==r?void 0:r.isAnonymous)&&this.projectId&&this.guestMode){const t=Dc(!0,this.apiKey);t&&(r=JSON.parse(JSON.stringify(t)))}(null==r?void 0:r.isAnonymous)||(this.loading=!0);const c={};(null==r?void 0:r.groupId)&&(c.groupId=null==r?void 0:r.groupId),r.organizationId=this.apiKey;const d=await Qc(this.apiKey,this.projectId||"",null==r?void 0:r.email,null==r?void 0:r.userId),h=null==d?void 0:d.isAdmin;this.snippylyUserRole=h?"Admin":"Commenter",this.applyPreviewProxyReadOnlyStyles(),Sr("[Superflow][identify] iamResponse",d,{isAdminUser:h,snippylyUserRole:this.snippylyUserRole,email:null==r?void 0:r.email,userId:null==r?void 0:r.userId});const u=!(this.customLoginEnabled&&this.providedUser),p=((t,e)=>!(!e||(null==t?void 0:t.isAnonymous)||(null==t?void 0:t.isGuest)||!(null==t?void 0:t.userId)))(r,u),v=p&&((t,e)=>{try{if(!t||!e)return!1;const i=!!e.name&&e.name!==t.name,o=!!e.photoUrl&&e.photoUrl!==t.photoUrl;return Sr("[Superflow][identity] hasProfileChanged",{nameChanged:i,photoChanged:o,localName:t.name,savedName:e.name,localPhotoUrl:t.photoUrl,savedPhotoUrl:e.photoUrl}),i||o}catch(t){return console.warn("Error in hasProfileChanged: ",t),Zc("Error in hasProfileChanged: ",t),!1}})(r,d);if(Sr("[Superflow][identify] enrichment gate",{cameFromToken:u,willEnrichIdentity:p,profileChanged:v,forceReset:v,isAnonymous:null==r?void 0:r.isAnonymous,isGuest:null==r?void 0:r.isGuest,userId:null==r?void 0:r.userId,nameBefore:null==r?void 0:r.name}),p&&(r=((t,e)=>t&&e?{...t,name:e.name||t.name,photoUrl:e.photoUrl||t.photoUrl}:t)(r,d),Sr("[Superflow][identify] enriched user",{nameAfter:null==r?void 0:r.name,photoUrl:null==r?void 0:r.photoUrl})),h&&(c.isAdmin=h,h&&this.allFeatureDisabled&&(this.allFeatureDisabled=!1)),this.restoreContentWarningSidebarState(),!this.projectDeleted&&(null==r?void 0:r.userId)&&!(null==r?void 0:r.isGuest)&&!(null==r?void 0:r.isAnonymous)&&this.documentId)try{await dd(this.apiKey,this.documentId,r.userId,r.name,r.email)}catch(t){Zc("checkDocumentUserAndCreateError",t)}Sr("[Superflow][identify] setVeltAuthProvider options",{forceReset:v,profileChanged:v,userName:null==r?void 0:r.name,userId:null==r?void 0:r.userId});const[f]=await Promise.all([Velt.setVeltAuthProvider({user:r,options:{throwError:!0,forceReset:v},retryConfig:{retryCount:3,retryDelay:1e3},generateToken:async()=>await nd(this.apiKey,null==r?void 0:r.userId,c),onError:t=>{console.log("Error signing to velt - ",t),this.invalidApiKey=!0}}),this.fetchAndApplyFeatureAccess()]);if(this.hasAgentAccess&&this.insertShadowDOM(),this.invalidApiKey)throw"Invalid Api Key - Domain Not Whitelisted";p&&((t=>{try{const e={userId:null==t?void 0:t.userId,name:null==t?void 0:t.name,email:null==t?void 0:t.email,photoUrl:null==t?void 0:t.photoUrl},i=Nc(JSON.stringify(e),Ee,ke);Tc(Dt,i,!0)}catch(t){console.warn("Error in saveUserToken: ",t),Zc("Error in saveUserToken: ",t)}})(r),Sr("[Superflow][identify] token rewritten post-signin, re-read",{persistedName:null===(e=$c())||void 0===e?void 0:e.name})),Sr("[Superflow][identify] velt auth response",{name:null==f?void 0:f.name,email:null==f?void 0:f.email,userId:null==f?void 0:f.userId,userSnippylyId:null==f?void 0:f.userSnippylyId,tokenUserProperties:c}),Gc(JSON.parse(JSON.stringify(f||{}))),(null==r?void 0:r.isAnonymous)||(this.snippylyUser=JSON.parse(JSON.stringify(r)),Sr("[Superflow][identify] this.snippylyUser (rendered) name",null===(i=this.snippylyUser)||void 0===i?void 0:i.name));const g=JSON.parse(JSON.stringify(f||{}));if((null==g?void 0:g.userSnippylyId)&&!(null==g?void 0:g.isGuest)&&this.checkToMigrateGuestUser(g),Velt.getUserRole$().subscribe((t=>{var e;t&&(this.loading=!1,null===(e=this.commentElement)||void 0===e||e.enablePriority())})),this.contactListSubscription=Velt.getContactElement().getContactList().subscribe((t=>{var e;this.loading=!1,(null===(e=null==t?void 0:t.organizationUsers)||void 0===e?void 0:e.length)>0&&(this.checkPrivateCommentModeFromStorage(),this.contactListSubscription&&(this.contactListSubscription.unsubscribe(),this.contactListSubscription=null))})),(null===Velt||void 0===Velt?void 0:Velt.isPlanExpired$)&&(null===Velt||void 0===Velt||Velt.isPlanExpired$().subscribe((t=>{this.isPlanExpired=t}),(t=>{this.isPlanExpired=!1,console.warn("Error in isPlanExpired$: ",t),Zc("Error in isPlanExpired$: ",t)}))),null===Velt||void 0===Velt?void 0:Velt.on){let t;null===Velt||void 0===Velt||Velt.on("initUpdate").subscribe((e=>{"setDocumentsSuccess"===e.event&&(t&&(t.unsubscribe(),t=null),t=null===Velt||void 0===Velt?void 0:Velt.getDocumentMetadata().subscribe((async t=>{if(t){const e=await Xc(this.apiKey,null==t?void 0:t.clientDocumentId);Fc(e,this.isDriveOrPreviewHost())&&(this.projectDeleted=!0),this.setProjectConfigVariables("ok"===e.status?e.config:null),await this.fetchAndApplyFeatureAccess()}}),(t=>{console.warn("Error in getDocumentMetadata: ",t),Zc("Error in getDocumentMetadata: ",t)})))}))}Wc({clientUserId:null==r?void 0:r.userId});try{Kc(r)}catch(t){console.warn("Error in trackIdentifyEvent: ",t)}this.getComments(),this.checkGlobalUserContact(),this.showFirstCommentNudge(),setTimeout((()=>{_c(Bt)||this.autoCommentModeArmedOnce||(this.showTourCommentTooltip=!0)}),2e3)}catch(t){if(this.loading=!1,this.signInError=!0,t&&"string"==typeof t&&(null===(o=null==t?void 0:t.toLowerCase())||void 0===o?void 0:o.includes("invalid"))){this.invalidApiKey=!0,Jc(vt.Events.DOMAIN_NOT_WHITELISTED),this.projectId&&qc(this.apiKey,this.projectId);if(new URL(document.location).searchParams.has(Rt))this.isSigningInUserAdmin=!0;else if(_c(Ht))this.isSigningInUserAdmin="true"===_c(Ht,!0);else{const t=await Qc(this.apiKey,this.projectId||"",n,s);this.isSigningInUserAdmin=!!(null==t?void 0:t.isAdmin),Tc(Ht,this.isSigningInUserAdmin+"",!0)}}console.warn("Error in identifySnippyly: ",t),Zc("Error in identifySnippyly: ",t)}},this.fetchAndApplyFeatureAccess=async()=>{var t,e;try{this.featureAccess=await ud(this.apiKey),this.planLimitLocked=(t=>{var e;try{return!0===(null===(e=null==t?void 0:t.planStatus)||void 0===e?void 0:e.isOverPlanLimits)}catch(t){return!1}})(this.featureAccess),this.applyVeltFeatureGates(),this.applyStorageFeatureAccess();const i=null===(t=this.featureAccess)||void 0===t?void 0:t[hd.Agents];this.hasAgentAccess=!0===(null==i?void 0:i.hasAccess);const o=null===(e=this.featureAccess)||void 0===e?void 0:e[hd.WorkspacePrivateComments];this.hasPrivateCommentsAccess=!0===(null==o?void 0:o.hasAccess),this.isPrivateCommentsEnabledOnWorkspace=!0===(null==o?void 0:o.isPrivateCommentsEnabled),!this.canShowPrivateCommentToggle&&this.privateCommentModeEnabled&&(this.disablePrivateCommentModeOnCommentElement(),this.privateCommentModeEnabled=!1,Tc(Yt,"false")),this.maybeApplyVisibilityOptionsToCommentElement()}catch(t){console.warn("Error in fetchAndApplyFeatureAccess: ",t),Zc("Error in fetchAndApplyFeatureAccess: ",t)}},this.insertShadowDOM=()=>{try{if(document.querySelector("velt-wireframe"))return;const t=document.querySelector("velt-comments");t&&t.setAttribute("shadow-dom","true");const e=document.querySelector(`${fe.VELT_COMMENTS_SIDEBAR_LEGACY}, ${fe.VELT_COMMENTS_SIDEBAR_V2}`);e&&e.setAttribute("shadow-dom","true")}catch(t){console.warn("Error in insertShadowDOM: ",t),Zc("Error in insertShadowDOM: ",t)}},this.applyStorageFeatureAccess=()=>{try{if(!this.featureAccess||!this.commentElement)return;const t=this.featureAccess[hd.Storage];(null==t?void 0:t.hasUsageExhausted)&&(this.commentElement.disableAttachments(),this.commentElement.setRecordings("none"))}catch(t){Zc("Error in applyStorageFeatureAccess: ",t)}},this.checkToMigrateGuestUser=async t=>{try{const e=Dc(!1,this.apiKey);e&&(await sd(this.apiKey,this.projectId||"",e,t,!0),Ic(Pt))}catch(t){console.warn("Error in checkToMigrationGuestUser: ",t),Zc("Error in checkToMigrationGuestUser: ",t)}},this.getComments=()=>{try{this.commentElement&&this.commentSubscription&&this.commentSubscription.unsubscribe()}catch(t){console.warn("Error in getComments: ",t),Zc("Error in getComments: ",t)}},this.handleCommentSelection=t=>{var e,i,o,n,s,r,a,l,c,d;try{if(!1===(null==t?void 0:t.selected))return void(null===(e=null===Velt||void 0===Velt?void 0:Velt.setUiState)||void 0===e||e.call(Velt,{showButtons:!1}));const h=null==t?void 0:t.annotation;if(!h||!this.isAgentAnnotation(h))return void(null===(i=null===Velt||void 0===Velt?void 0:Velt.setUiState)||void 0===i||i.call(Velt,{showButtons:!1}));const u=null===(n=null===(o=null==h?void 0:h.agent)||void 0===o?void 0:o.result)||void 0===n?void 0:n.incorrectWord,p=(null===(s=null==h?void 0:h.pageInfo)||void 0===s?void 0:s.path)||(null===(r=null==h?void 0:h.location)||void 0===r?void 0:r.path)||(null===(a=null==h?void 0:h.agent)||void 0===a?void 0:a.path);if(!u||!p)return void(null===(l=null===Velt||void 0===Velt?void 0:Velt.setUiState)||void 0===l||l.call(Velt,{showButtons:!1}));const v=this.normalizePagePath(p),f=u,g=null===(d=null===(c=null==h?void 0:h.agent)||void 0===c?void 0:c.result)||void 0===d?void 0:d.type;let m,w="";"grammar"===g?(m=this.grammarSuggestionPagePathMap,w="grammar"):(m=this.spellingSuggestionPagePathMap,w="spelling");const y=null==m?void 0:m.get(f);((null==y?void 0:y.get(v))||0)<=1?Velt.setUiState({showButtons:!1,warningType:w}):Velt.setUiState({showButtons:!0,warningType:w})}catch(t){console.warn("Error in handleCommentSelection: ",t),Zc("Error in handleCommentSelection: ",t)}},this.processAgentComments=t=>{var e,i,o;try{const n=Array.isArray(t)?t:[];n.length&&!this.agentNamesFetched&&this.apiKey&&this.fetchAgentNames();const s=n.filter((t=>{var e;const i=(null===(e=null==t?void 0:t.status)||void 0===e?void 0:e.type)===he;return this.isAgentAnnotation(t)&&!i}));if(this.sidebarV2Enabled&&!this.showAgentCommentsInSidebar&&0===s.length&&this.agentGroups.length>0)return;if(0===s.length)return this.hasContentWarnings=!1,this.contentWarningsCount=0,this.agentGroups=[],this.spellingSuggestionPagePathMap=new Map,void(this.grammarSuggestionPagePathMap=new Map);const r=new Map;for(const t of s){const i=this.extractAgentId((null===(e=null==t?void 0:t.agent)||void 0===e?void 0:e.agentFields)||[]);if(!i)continue;const o=r.get(i);o?o.push(t):r.set(i,[t])}const a=[],l=new Map,c=new Map;for(const[t,e]of r){const n=this.isCustomAgent((null===(o=null===(i=e[0])||void 0===i?void 0:i.agent)||void 0===o?void 0:o.agentFields)||[]),s=this.resolveAgentDisplayName(t),{warnings:r,warningCount:d}=this.buildAgentWarnings(t,e,l,c);a.push({agentId:t,agentName:s,isCustom:n,warningCount:d,warnings:r,annotations:e})}a.sort(((t,e)=>e.warningCount-t.warningCount)),this.agentGroups=a;const d=a.reduce(((t,e)=>t+e.warningCount),0);this.contentWarningsCount=d,this.hasContentWarnings=d>0,this.spellingSuggestionPagePathMap=l,this.grammarSuggestionPagePathMap=c}catch(t){console.warn("Error in processAgentComments: ",t),Zc("Error in processAgentComments: ",t)}},this.extractAgentId=t=>{try{if(!Array.isArray(t)||0===t.length)return null;for(const e of t)if(null==e?void 0:e.startsWith(pe.AGENT))return e.substring(pe.AGENT.length);return null}catch(t){return console.warn("Error in extractAgentId: ",t),null}},this.isCustomAgent=t=>{try{return!!Array.isArray(t)&&t.includes(pe.AGENT_TYPE_CUSTOM)}catch(t){return console.warn("Error in isCustomAgent: ",t),!1}},this.resolveAgentDisplayName=t=>{var e,i;try{return null!==(i=null===(e=this.agentNameMap)||void 0===e?void 0:e.get(t))&&void 0!==i?i:"Unknown Agent"}catch(t){return console.warn("Error in resolveAgentDisplayName: ",t),"Unknown Agent"}},this.fetchAgentNames=async()=>{var t,e,i;try{this.agentNamesFetched=!0;const{getAgents:o}=await Promise.resolve().then((function(){return fd})),n=await o(this.apiKey),s=new Map;for(const i of n){const o=null!==(t=null==i?void 0:i.id)&&void 0!==t?t:"",n=null!==(e=null==i?void 0:i.name)&&void 0!==e?e:"";o&&n&&s.set(o,n)}if(this.agentNameMap=s,(null===(i=this.agentGroups)||void 0===i?void 0:i.length)>0){const t=this.agentGroups.map((t=>({...t,agentName:this.resolveAgentDisplayName(t.agentId)})));this.agentGroups=t}}catch(t){this.agentNamesFetched=!1,console.warn("Error in fetchAgentNames: ",t)}},this.buildAgentWarnings=(t,e,i,o)=>{try{return t===ve.BROKEN_LINKS?this.buildBrokenLinkWarnings(e):t===ve.SPELL_CHECK||t===ve.GRAMMAR_CHECK?this.buildSpellCheckWarnings(e,i,o):this.buildGenericWarnings(e)}catch(t){return console.warn("Error in buildAgentWarnings: ",t),{warnings:[],warningCount:0}}},this.buildBrokenLinkWarnings=t=>{var e,i,o,n,s,r,a,l,c,d,h,u,p;try{const v=new Map;for(const f of t){const t=(null===(e=null==f?void 0:f.pageInfo)||void 0===e?void 0:e.url)||(null===(i=null==f?void 0:f.location)||void 0===i?void 0:i.url)||(null===(o=null==f?void 0:f.agent)||void 0===o?void 0:o.url)||"",g=(null===(n=null==f?void 0:f.agent)||void 0===n?void 0:n.reason)||{},m=g.url||(null===(s=null==f?void 0:f.targetTextRange)||void 0===s?void 0:s.text)||(null===(a=null===(r=null==f?void 0:f.agent)||void 0===r?void 0:r.result)||void 0===a?void 0:a.url)||(null===(c=null===(l=null==f?void 0:f.agent)||void 0===l?void 0:l.result)||void 0===c?void 0:c.link)||t,w=g.issue||g.description||(null===(h=null===(d=null==f?void 0:f.agent)||void 0===d?void 0:d.result)||void 0===h?void 0:h.statusCode)||(null===(p=null===(u=null==f?void 0:f.agent)||void 0===u?void 0:u.result)||void 0===p?void 0:p.status)||"",y=(null==m?void 0:m.toLowerCase())||"";if(v.has(y)){const e=v.get(y);e.occurrences+=1,t&&!e.pageUrls.includes(t)&&e.pageUrls.push(t),e.annotations.push(f)}else v.set(y,{primaryText:m||"",secondaryText:String(w),occurrences:1,pageUrls:t?[t]:[],annotations:[f]})}const f=Array.from(v.values());return{warnings:f,warningCount:f.length}}catch(t){return console.warn("Error in buildBrokenLinkWarnings: ",t),{warnings:[],warningCount:0}}},this.buildSpellCheckWarnings=(t,e,i)=>{var o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y,b,C;try{const x=new Map;for(const E of t){const t=(null===(o=null==E?void 0:E.pageInfo)||void 0===o?void 0:o.url)||(null===(n=null==E?void 0:E.location)||void 0===n?void 0:n.url)||(null===(s=null==E?void 0:E.agent)||void 0===s?void 0:s.url)||"",k=(null===(r=null==E?void 0:E.pageInfo)||void 0===r?void 0:r.path)||(null===(a=null==E?void 0:E.location)||void 0===a?void 0:a.path)||(null===(l=null==E?void 0:E.agent)||void 0===l?void 0:l.path)||"",S=this.normalizePagePath(k),M=null!==(d=null!==(c=null==E?void 0:E.comments)&&void 0!==c?c:null==E?void 0:E.commentData)&&void 0!==d?d:[],T=null!==(p=null===(u=null===(h=null==M?void 0:M[0])||void 0===h?void 0:h.commentText)||void 0===u?void 0:u.trim())&&void 0!==p?p:"",_=(null===(f=null===(v=null==E?void 0:E.agent)||void 0===v?void 0:v.result)||void 0===f?void 0:f.incorrectWord)||(null===(g=null==E?void 0:E.targetElement)||void 0===g?void 0:g.targetText)||T||"",I=(null===(w=null===(m=null==E?void 0:E.agent)||void 0===m?void 0:m.result)||void 0===w?void 0:w.suggestions)||[],A=Array.isArray(I)?I[0]||"":I||"",N=null===(b=null===(y=null==E?void 0:E.agent)||void 0===y?void 0:y.result)||void 0===b?void 0:b.type,O=_||"";_||console.warn("[CWS] Spell check annotation missing incorrectWord. agent.result:",null===(C=null==E?void 0:E.agent)||void 0===C?void 0:C.result,"targetElement:",null==E?void 0:E.targetElement,"comments:",M);const $="grammar"===N?i:e;$.has(O)||$.set(O,new Map);const L=$.get(O),D=L.get(S)||0;if(L.set(S,D+1),x.has(O)){const e=x.get(O);e.occurrences+=1,t&&!e.pageUrls.includes(t)&&e.pageUrls.push(t),e.annotations.push(E)}else x.set(O,{primaryText:_||"",secondaryText:A||"",occurrences:1,pageUrls:t?[t]:[],annotations:[E]})}const E=Array.from(x.values());return{warnings:E,warningCount:E.length}}catch(t){return console.warn("Error in buildSpellCheckWarnings: ",t),{warnings:[],warningCount:0}}},this.buildGenericWarnings=t=>{var e,i,o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y,b;try{const C=new Map;for(const x of t){const t=(null===(e=null==x?void 0:x.pageInfo)||void 0===e?void 0:e.url)||(null===(i=null==x?void 0:x.location)||void 0===i?void 0:i.url)||(null===(o=null==x?void 0:x.agent)||void 0===o?void 0:o.url)||"",E=null!==(s=null!==(n=null==x?void 0:x.comments)&&void 0!==n?n:null==x?void 0:x.commentData)&&void 0!==s?s:[],k=null==E?void 0:E[0],S=null!==(p=null!==(d=null!==(a=null===(r=null==k?void 0:k.commentText)||void 0===r?void 0:r.trim())&&void 0!==a?a:null===(c=null===(l=null==x?void 0:x.agent)||void 0===l?void 0:l.result)||void 0===c?void 0:c.incorrectWord)&&void 0!==d?d:null===(u=null===(h=null==x?void 0:x.targetElement)||void 0===h?void 0:h.targetText)||void 0===u?void 0:u.trim())&&void 0!==p?p:"",M=null!==(b=null!==(m=null===(g=null===(f=null===(v=null==x?void 0:x.agent)||void 0===v?void 0:v.result)||void 0===f?void 0:f.suggestions)||void 0===g?void 0:g[0])&&void 0!==m?m:null===(y=null===(w=null==x?void 0:x.agent)||void 0===w?void 0:w.result)||void 0===y?void 0:y.suggestion)&&void 0!==b?b:"",T=S||(null==x?void 0:x.annotationId)||(null==x?void 0:x.id)||"";if(C.has(T)){const e=C.get(T);e.occurrences+=1,t&&!e.pageUrls.includes(t)&&e.pageUrls.push(t),e.annotations.push(x)}else C.set(T,{primaryText:S||"No text",secondaryText:M||"",occurrences:1,pageUrls:t?[t]:[],annotations:[x]})}const x=Array.from(C.values());return{warnings:x,warningCount:x.length}}catch(t){return console.warn("Error in buildGenericWarnings: ",t),{warnings:[],warningCount:0}}},this.normalizePagePath=t=>{try{return t?(null==t?void 0:t.startsWith("/"))?t.substring(1):t:""}catch(e){return console.warn("Error in normalizePagePath: ",e),t||""}},this.setQueryParamsCommentsInSdk=()=>{var t,e,i,o,n;try{const s="true"===sessionStorage.getItem("debugQueryParamsComments");s&&console.log("setQueryParamsCommentsInSdk commentElement",this.commentElement),this.commentElement&&(s&&console.log("setQueryParamsCommentsInSdk queryParamsComments",this.queryParamsComments),this.queryParamsComments&&(null===(t=this.commentElement)||void 0===t?void 0:t.enableQueryParamsComments)?(s&&console.log("enableQueryParamsComments this.commentElement?.enableQueryParamsComments",null===(e=this.commentElement)||void 0===e?void 0:e.enableQueryParamsComments),null===(i=this.commentElement)||void 0===i||i.enableQueryParamsComments()):!this.queryParamsComments&&(null===(o=this.commentElement)||void 0===o?void 0:o.disableQueryParamsComments)&&(s&&console.log("disableQueryParamsComments"),null===(n=this.commentElement)||void 0===n||n.disableQueryParamsComments()))}catch(t){console.warn("Error in setQueryParamsCommentsInSdk: ",t),Zc("Error in setQueryParamsCommentsInSdk: ",t)}},this.checkGlobalUserContact=()=>{try{this.contactElement&&this.contactElement.isUserGlobalContact().subscribe((t=>{this.isUserGlobalContact=t}))}catch(t){console.warn("Error in checkGlobalUserContact: ",t),Zc("Error in checkGlobalUserContact: ",t)}},this.applyVeltFeatureGates=()=>{try{if(!window.Velt||"function"!=typeof(null===Velt||void 0===Velt?void 0:Velt.disableFeatures))return;Velt.disableFeatures((t=>{try{return(null==t?void 0:t.passwordGateActive)||(null==t?void 0:t.planLimitLocked)||(null==t?void 0:t.planExpired)||(null==t?void 0:t.projectDeleted)?[...Vc]:[]}catch(t){return[]}})({passwordGateActive:this.passwordProtected&&!this.isPasswordValid,planLimitLocked:this.planLimitLocked,planExpired:!0===this.isPlanExpired,projectDeleted:this.projectDeleted}))}catch(t){console.warn("Error in applyVeltFeatureGates: ",t),Zc("Error in applyVeltFeatureGates: ",t)}},this.setProjectConfigVariables=t=>{var e,i,o,n;try{const s="Admin"===this.snippylyUserRole;this.allFeatureDisabled=!s&&(null!==(e=null==t?void 0:t.disabled)&&void 0!==e&&e),this.allFeatureRestricted=null!==(i=null==t?void 0:t.restricted)&&void 0!==i&&i,this.guestMode=null!==(o=null==t?void 0:t.guestMode)&&void 0!==o&&o,this.allowGuestModeSignIn=!!(null===(n=null==t?void 0:t.guestModeConfig)||void 0===n?void 0:n.allowSignIn),(null==t?void 0:t.guestModeConfig)||(this.allowGuestModeSignIn=!0),this.guestMode&&Jc(vt.Events.GUEST_MODE_PRESENT),this.passwordProtected=!1,this.queryParamsComments=!!(null==t?void 0:t.queryParamsComments),this.usePageTitleAsLocationName=!!(null==t?void 0:t.usePageTitleAsLocationName),this.applyVeltFeatureGates(),Tc(Wt,this.guestMode+"",!0),Tc(Qt,this.allowGuestModeSignIn+"",!0),Tc(Gt,this.passwordProtected+"",!0),Tc(Kt,this.queryParamsComments+"",!0),Tc(Zt,this.usePageTitleAsLocationName+"",!0)}catch(t){console.warn("Error in setProjectConfigVariables: ",t),Zc("Error in setProjectConfigVariables: ",t)}},this.toggleSnippylyPluginToolbar=()=>{try{this.expanded=!this.expanded,this.expanded?Jc(vt.Events.TOOLBAR_EXPANDED):Jc(vt.Events.TOOLBAR_COLLAPSED)}catch(t){console.warn("Error in toggleSnippylyPluginToolbar: ",t),Zc("Error in toggleSnippylyPluginToolbar: ",t)}},this.enablePrivateCommentModeOnCommentElement=()=>{try{if(!this.commentElement||"function"!=typeof this.commentElement.enablePrivateMode)return;this.commentElement.enablePrivateMode({type:qt})}catch(t){console.warn("Error in enablePrivateCommentModeOnCommentElement: ",t),Zc("Error in enablePrivateCommentModeOnCommentElement: ",t)}},this.disablePrivateCommentModeOnCommentElement=()=>{try{if(!this.commentElement||"function"!=typeof this.commentElement.disablePrivateMode)return;this.commentElement.disablePrivateMode()}catch(t){console.warn("Error in disablePrivateCommentModeOnCommentElement: ",t),Zc("Error in disablePrivateCommentModeOnCommentElement: ",t)}},this.enableVisibilityOptionsOnCommentElement=()=>{try{if(this.visibilityOptionsEnabled)return;if(!this.commentElement||"function"!=typeof this.commentElement.enableVisibilityOptions)return;this.commentElement.enableVisibilityOptions(),this.visibilityOptionsEnabled=!0,Jc(vt.Events.VISIBILITY_OPTIONS_ENABLED)}catch(t){console.warn("Error in enableVisibilityOptionsOnCommentElement: ",t),Zc("Error in enableVisibilityOptionsOnCommentElement: ",t)}},this.disableVisibilityOptionsOnCommentElement=()=>{try{if(!this.visibilityOptionsEnabled)return;if(!this.commentElement||"function"!=typeof this.commentElement.disableVisibilityOptions)return void(this.visibilityOptionsEnabled=!1);this.commentElement.disableVisibilityOptions(),this.visibilityOptionsEnabled=!1,Jc(vt.Events.VISIBILITY_OPTIONS_DISABLED)}catch(t){console.warn("Error in disableVisibilityOptionsOnCommentElement: ",t),Zc("Error in disableVisibilityOptionsOnCommentElement: ",t)}},this.maybeApplyVisibilityOptionsToCommentElement=()=>{"Admin"===this.snippylyUserRole&&this.canShowPrivateCommentToggle?this.enableVisibilityOptionsOnCommentElement():this.disableVisibilityOptionsOnCommentElement()},this.togglePrivateCommentMode=()=>{try{this.commentElement&&(this.privateCommentModeEnabled?(this.disablePrivateCommentModeOnCommentElement(),this.privateCommentModeEnabled=!1,Jc(vt.Events.PRIVATE_MODE_DISABLED)):(this.enablePrivateCommentModeOnCommentElement(),this.privateCommentModeEnabled=!0,Jc(vt.Events.PRIVATE_MODE_ENABLED)),Tc(Yt,this.privateCommentModeEnabled.toString()))}catch(t){console.warn("Error in togglePrivateCommentMode: ",t),Zc("Error in togglePrivateCommentMode: ",t)}},this.checkPrivateCommentModeFromStorage=()=>{try{!this.allFeatureDisabled&&"Admin"===this.snippylyUserRole&&this.canShowPrivateCommentToggle&&_c(Yt)&&(this.privateCommentModeEnabled="true"===_c(Yt),this.privateCommentModeEnabled&&this.enablePrivateCommentModeOnCommentElement())}catch(t){console.warn("Error in checkPrivateCommentModeFromStorage: ",t),Zc("Error in checkPrivateCommentModeFromStorage: ",t)}},this.loginWithGoogle=()=>{try{if(Jc(vt.Events.SIGNIN_CLICKED),this.loading||this.customLoginEnabledLocally)return;const t=this.buildSignInUrlWithParams(this.signInUrl||"");window.open(t,"_self")}catch(t){console.warn("Error in loginWithGoogle: ",t),Zc("Error in loginWithGoogle: ",t)}},this.buildSignInUrlWithParams=t=>{try{const e=new URL(t);return this.apiKey&&e.searchParams.set("apiKey",this.apiKey),this.projectId&&e.searchParams.set("projectId",this.projectId),e.toString()}catch(e){return console.warn("Error in buildSignInUrlWithParams: ",e),Zc("Error in buildSignInUrlWithParams: ",e),t}},this.getQRCode=async()=>{try{const t=new URL(window.location.href);null==t||t.searchParams.set("review","true");const e=null==t?void 0:t.toString();if(e){const t=Nc(e,Ee,ke),i=await fetch(`https://us-central1-snipply-sdk-staging.cloudfunctions.net/getqrcode?text=${encodeURIComponent(t)}`),o=await i.json();(null==o?void 0:o.qrcode)&&(this.qrCode=null==o?void 0:o.qrcode)}}catch(t){console.warn("Error in getQRCode: ",t),Zc("Error in getQRCode: ",t)}},this.toggleQRCodeVisibility=async()=>{try{Jc(vt.Events.OPEN_MOBILE_CLICKED),this.showQrCode=!this.showQrCode,this.showQrCode&&!this.qrCode&&await this.getQRCode()}catch(t){console.warn("Error in toggleQRCodeVisibility: ",t),Zc("Error in toggleQRCodeVisibility: ",t)}},this.onUserInviteToolClick=()=>{var t;(null===(t=this.snippylyUser)||void 0===t?void 0:t.isGuest)?(this.guestModeSignInModalConfig.title="Sign in to invite others.",this.guestModeSignInModalConfig.description="Invite team members to comment on this project.",this.guestModeSignInModalConfig.showLeaveCommentButton=!1,this.guestModeSignInModalConfig.closeOnClickOutside=!0,this.openGuestModeSignInModal()):this.openInviteModal()},this.openInviteModal=()=>{this.showInviteModal=!0,Jc(vt.Events.INVITE_MODAL_OPENED)},this.closeInviteModal=()=>{this.showInviteModal=!1},this.onInviteSuccess=()=>{this.closeInviteModal(),Jc(vt.Events.INVITE_SENT)},this.removeSnippyly=async()=>{try{Jc(vt.Events.EXIT_REVIEW_MODE_CLICKED),this.exitReviewModeCalled=!0,Ic(Et),Ic(kt),Ic(Nt),Ic(Vt,"sessionStorage"),Ic(Ft,"sessionStorage");const t=new URL(document.location),e=t.searchParams;e.delete(Nt),e.delete(Et),e.delete(Ot),e.delete(kt),this.projectVersionKey&&e.delete(this.projectVersionKey),e.delete(jt),e.delete(Rt),e.delete(Ut),this.projectVersion=void 0,this.projectVersionKey=void 0,delete window.snippylyInitialLoadUrl,window.history.replaceState({},document.title,t.href),window.location.reload()}catch(t){console.warn("Error in removeSnippyly: ",t),Zc("Error in removeSnippyly: ",t)}},this.signOutUser=async()=>{try{Jc(vt.Events.SIGNOUT_CLICKED),this.subscriptions.forEach((t=>{t&&t.unsubscribe&&(null==t||t.unsubscribe())})),this.contactListSubscription&&(this.contactListSubscription.unsubscribe(),this.contactListSubscription=null),await Velt.signOutUser(),Ic($t),Ic(Dt),Ic(Ht),Ic(Yt),this.snippylyUser=void 0,window.open(this.signOutUrl,"_self")}catch(t){console.warn("Error in signOutUser: ",t),Zc("Error in signOutUser: ",t)}},this.toggleMenu=(t,e)=>{try{t.stopPropagation(),this.menuOpenedId===e?this.menuOpenedId=void 0:this.menuOpenedId=e}catch(t){console.warn("Error in toggleMenu: ",t),Zc("Error in toggleMenu: ",t)}},this.copyLink=()=>{try{navigator.clipboard.writeText(window.location.href),this.copyLinkTooltip="Link copied!",setTimeout((()=>{this.copyLinkTooltip="Copy Link"}),2e3)}catch(t){console.warn("Error in copyLink: ",t),Zc("Error in copyLink: ",t)}},this.goToAdminPortal=()=>{try{let t=`${xe}`;Velt&&(null===Velt||void 0===Velt?void 0:Velt.getDocumentId)&&this.serverDocumentId&&(t=`${xe}/dashboard/project/comment/${this.apiKey}/${this.serverDocumentId}`),Jc(vt.Events.VIEW_PROJECT_CLICKED),window.open(t,"_blank")}catch(t){console.warn("Error in goToAdminPortal: ",t),Zc("Error in goToAdminPortal: ",t)}},this.goToAdminPortalDashboard=()=>{try{let t=`${xe}`;Velt&&(null===Velt||void 0===Velt?void 0:Velt.getDocumentId)&&this.serverDocumentId&&(t=`${xe}/dashboard`),window.open(t,"_blank")}catch(t){console.warn("Error in goToAdminPortalDashboard: ",t),Zc("Error in goToAdminPortalDashboard: ",t)}},this.joinCommunity=()=>{try{window.open("https://join.slack.com/t/superflowusers/shared_invite/zt-1q3jzsddt-NEb~uu9RXscLfxOIDGQXJw","_blank")}catch(t){console.warn("Error in joinCommunity: ",t),Zc("Error in joinCommunity: ",t)}},this.onboardingNextClick=()=>{try{this.showOnboardingModal=!1,Tc(Rt,"true");const t=new URL(document.location);t.searchParams.delete(Rt),window.history.replaceState({},document.title,t.href)}catch(t){console.warn("Error in onboardingNextClick: ",t),Zc("Error in onboardingNextClick: ",t)}},this.onLiveDemoModalNextClick=()=>{try{this.showLiveDemoModal=!1,Tc(Ut,"true",!1,"sessionStorage");const t=new URL(document.location);t.searchParams.delete(Ut),window.history.replaceState({},document.title,t.href)}catch(t){console.warn("Error in onLiveDemoModalNextClick: ",t),Zc("Error in onLiveDemoModalNextClick: ",t)}},this.onFigmaDemoModalNextClick=()=>{try{this.showFigmaDemoModal=!1;const t=new URL(document.location);t.searchParams.delete(zt),window.history.replaceState({},document.title,t.href)}catch(t){console.warn("Error in onFigmaDemoModalNextClick: ",t),Zc("Error in onFigmaDemoModalNextClick: ",t)}},this.onUpgradePlanClick=()=>{try{window.open("https://superflow-portal-v2-staging.firebaseapp.com/settings/billing","_blank")}catch(t){console.warn("Error in onUpgradePlanClick: ",t),Zc("Error in onUpgradePlanClick: ",t)}},this.onTourCommentTooltipClick=()=>{try{this.showTourCommentTooltip=!1,Tc(Bt,"true"),this.firstCommentNudge&&(this.firstCommentNudge=!1,this.autoCommentModeArmedOnce=!0)}catch(t){console.warn("Error in onTourCommentTooltipClick: ",t),Zc("Error in onTourCommentTooltipClick: ",t)}},this.onGuestModeChipSignInButtonClick=()=>{try{Jc(vt.Events.GUEST_MODE_SIGN_IN_BUTTON_CLICKED),this.loginWithGoogle()}catch(t){console.warn("Error in onGuestModeChipSignInButtonClick: ",t),Zc("Error in onGuestModeChipSignInButtonClick: ",t)}},this.openGuestModeSignInModal=()=>{try{this.showGuestModeSignInModal=!0,Jc(vt.Events.GUEST_MODE_SIGN_IN_DIALOG_SHOWN)}catch(t){console.warn("Error in openGuestModeSignInModal: ",t),Zc("Error in openGuestModeSignInModal: ",t)}},this.closeGuestModeSignInModal=()=>{try{this.showGuestModeSignInModal=!1,this.guestModeSignInModalConfig=JSON.parse(JSON.stringify(this.defaultGuestModeSignInModalConfig))}catch(t){console.warn("Error in closeGuestModeSignInModal: ",t),Zc("Error in closeGuestModeSignInModal: ",t)}},this.onGuestModeSignInModalSignInButtonClick=()=>{try{Jc(vt.Events.GUEST_MODE_SIGN_IN_BUTTON_CLICKED),this.loginWithGoogle()}catch(t){console.warn("Error in onGuestModeSignInModalSignInButtonClick: ",t),Zc("Error in onGuestModeSignInModalSignInButtonClick: ",t)}},this.openGuestModeNameModel=t=>{try{t&&(t.stopPropagation(),t.preventDefault()),this.skipGuestNameModal||(this.showGuestModeNameModal=!0,Jc(vt.Events.GUEST_MODE_NAME_NUDGE_SHOWN))}catch(t){console.warn("Error in openGuestModeNameModel: ",t),Zc("Error in openGuestModeNameModel: ",t)}},this.closeGuestModeNameModel=()=>{try{this.showGuestModeNameModal=!1}catch(t){console.warn("Error in closeGuestModeNameModel: ",t),Zc("Error in closeGuestModeNameModel: ",t)}},this.onGuestModeNameModalSkipButtonClick=()=>{try{Jc(vt.Events.GUEST_MODE_SKIP_BUTTON_CLICKED),this.showGuestModeNameModal=!1}catch(t){console.warn("Error in onGuestModeNameModalSkipButtonClick: ",t),Zc("Error in onGuestModeNameModalSkipButtonClick: ",t)}},this.onPasswordProtectedModalCloseButtonClick=()=>{try{Jc(vt.Events.PASSWORD_PROTECTED_MODAL_CLOSE_BUTTON_CLICKED),this.showPasswordProtectedModal=!1,this.password="",this.showInvalidPassword=!1}catch(t){console.warn("Error in onPasswordProtectedModalCloseButtonClick: ",t),Zc("Error in onPasswordProtectedModalCloseButtonClick: ",t)}},this.onPasswordProtectedModalOpenButtonClick=()=>{try{Jc(vt.Events.PASSWORD_PROTECTED_MODAL_OPEN_BUTTON_CLICKED),this.showPasswordProtectedModal=!0}catch(t){console.warn("Error in onPasswordProtectedModalOpenButtonClick: ",t),Zc("Error in onPasswordProtectedModalOpenButtonClick: ",t)}},this.showGuestModeSignInBanner=()=>{try{this.guestModeSignInBannerVisible=!0,Jc(vt.Events.GUEST_MODE_SIGN_IN_NUDGE_SHOWN)}catch(t){console.warn("Error in showGuestModeSignInBanner: ",t),Zc("Error in showGuestModeSignInBanner: ",t)}},this.hideGuestModeSignInBanner=()=>{try{this.guestModeSignInBannerVisible=!1}catch(t){console.warn("Error in hideGuestModeSignInBanner: ",t),Zc("Error in hideGuestModeSignInBanner: ",t)}},this.onGuestModeBannerSignInButtonClick=()=>{try{Jc(vt.Events.GUEST_MODE_SIGN_IN_CLICKED),this.loginWithGoogle()}catch(t){console.warn("Error in onGuestModeBannerSignInButtonClick: ",t),Zc("Error in onGuestModeBannerSignInButtonClick: ",t)}},this.updateGuestUserName=async()=>{var t;try{if(!(null===(t=this.guestUserNameInput)||void 0===t?void 0:t.trim()))return;if(this.guestUserNameUpdateLoading)return;const e=Dc(!0,this.apiKey);if(e){const t=JSON.parse(JSON.stringify(e));e.name=this.guestUserNameInput,e.photoUrl=null,this.guestUserNameUpdateLoading=!0,(t=>{try{const e=JSON.stringify(t),i=Nc(e,Ee,ke);Tc(Pt,i,!0)}catch(t){console.warn("Error in updateGuestUser: ",t),Zc("Error in updateGuestUser: ",t)}})(e),await Velt.identify(e),this.snippylyUser=JSON.parse(JSON.stringify(e)),await sd(this.apiKey,this.projectId||"",t,e),this.showGuestModeNameModal=!1,this.guestUserNameUpdated=!0,this.guestUserNameUpdateLoading=!1,Tc(te,"true"),Jc(vt.Events.GUEST_MODE_NAME_ADDED,{oldName:null==t?void 0:t.name,newName:null==e?void 0:e.name})}this.closeGuestModeNameModel()}catch(t){console.warn("Error in updateGuestUserName: ",t),Zc("Error in updateGuestUserName: ",t)}},this.submitPassword=async()=>{var t;try{if(Jc(vt.Events.REVIEW_PASSWORD_ADDED),!(null===(t=this.password)||void 0===t?void 0:t.trim()))return;if(this.validatingPasswordLoading)return;this.validatingPasswordLoading=!0,this.isPasswordValid=await td(this.apiKey,this.projectId,this.password),function(t,e){try{const i="object"==typeof e?JSON.stringify(e):e;localStorage.setItem(t,i)}catch(t){console.warn("Error in setLocalStorage: ",t)}}(Jt,this.isPasswordValid),this.isPasswordValid?(this.password="",this.onPasswordProtectedModalCloseButtonClick(),this.showInvalidPassword=!1,this.applyVeltFeatureGates(),Jc(vt.Events.REVIEW_PASSWORD_ACCEPTED)):(this.showInvalidPassword=!0,Jc(vt.Events.REVIEW_PASSWORD_REJECTED)),this.validatingPasswordLoading=!1}catch(t){console.warn("Error in submitPassword: ",t),Zc("Error in submitPassword: ",t)}},this.updateUserName=async()=>{var t;try{if(!(null===(t=this.guestUserNameInput)||void 0===t?void 0:t.trim()))return;if(this.guestUserNameUpdateLoading)return;this.guestUserNameUpdateLoading=!0;const e=JSON.parse(JSON.stringify(this.snippylyUser)),i=JSON.parse(JSON.stringify(this.snippylyUser));i.name=this.guestUserNameInput,await sd(this.apiKey,this.projectId||"",e,i),await Velt.updateUser(i),this.snippylyUser=JSON.parse(JSON.stringify(i));const o=$c();o.name=i.name;const n=JSON.stringify(o),s=Nc(n,Ee,ke);Tc(Dt,s,!0),this.guestUserNameUpdateLoading=!1,this.guestUserNameInput="",this.closeGuestModeNameModel()}catch(t){console.warn("Error in updateUserName: ",t),Zc("Error in updateUserName: ",t)}},this.isAgentAnnotation=t=>{var e;try{const i=null!==this.extractAgentId((null===(e=null==t?void 0:t.agent)||void 0===e?void 0:e.agentFields)||[]),o=(null==t?void 0:t.type)===ue,n=(null==t?void 0:t.commentType)===ue;return i||o||n}catch(t){return console.warn("Error in isAgentAnnotation: ",t),!1}},this.getSidebarGroupExpansionMap=()=>{var t,e,i,o,n;try{const s=document.querySelector(fe.VELT_COMMENTS_SIDEBAR_LEGACY),r=null===(n=null===(o=null===(i=null===(e=null===(t=null==s?void 0:s._ngElementStrategy)||void 0===t?void 0:t.componentRef)||void 0===e?void 0:e.instance)||void 0===i?void 0:i.componentConfigSignal)||void 0===o?void 0:o.call(i))||void 0===n?void 0:n.virtualScrollData;if(!Array.isArray(r))return;const a=new Map;return r.forEach((t=>{var e,i;if("group"!==(null==t?void 0:t.type))return;const o=null===(e=null==t?void 0:t.data)||void 0===e?void 0:e.displayName,n=null===(i=null==t?void 0:t.data)||void 0===i?void 0:i.isExpanded;"string"==typeof o&&"boolean"==typeof n&&a.set(o,n)})),a}catch(t){return void console.warn("Error in getSidebarGroupExpansionMap: ",t)}},this.filterAgentCommentsFromSidebar=(t,e)=>{try{if(this.isSettingSidebarData)return;if(!t||!this.commentElement)return;const i=t.commentAnnotations;if(!Array.isArray(i))return;if(this.processAgentComments(i),this.sidebarV2Enabled)return;if(this.showAgentCommentsInSidebar)return;const o=Array.isArray(null==t?void 0:t.systemFilteredAnnotations)?t.systemFilteredAnnotations:[],n=new Set(o.map((t=>(null==t?void 0:t.annotationId)||(null==t?void 0:t.id))).filter((t=>Boolean(t)))),s=[];i.forEach((t=>{if(this.isAgentAnnotation(t))return;const e=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id);e&&n.has(e)&&s.push(t)}));const r=new Map;s.forEach((t=>{var e,i,o,n;const s=(null===(e=null==t?void 0:t.pageInfo)||void 0===e?void 0:e.path)||(null===(i=null==t?void 0:t.pageInfo)||void 0===i?void 0:i.url)||(null===(o=null==t?void 0:t.location)||void 0===o?void 0:o.path)||"/";r.has(s)||r.set(s,[]),null===(n=r.get(s))||void 0===n||n.push(t)}));const a=[],l=new URL(window.location.href).pathname,c="/"+this.normalizePagePath(l);r.forEach(((t,i)=>{const o=null==e?void 0:e.get(i);a.push({groupId:i,groupName:i,isExpanded:"boolean"==typeof o?o:i===c,annotations:t})})),this.isSettingSidebarData=!0,this.commentElement.setCommentSidebarData(a,{grouping:!0}),this.isSettingSidebarData=!1}catch(t){this.isSettingSidebarData=!1,console.warn("Error in filterAgentCommentsFromSidebar: ",t),Zc("Error in filterAgentCommentsFromSidebar: ",t)}},this.mountVeltCollaborationElements=()=>{if(!document.querySelector(fe.VELT_COMMENTS)){const t=document.createElement(fe.VELT_COMMENTS);t.setAttribute("filter-comments-on-dom","true"),t.setAttribute("shadow-dom","true"),null==t||t.addEventListener("onSignIn",(()=>{this.loginWithGoogle()})),null==t||t.addEventListener("onUpgrade",(()=>{this.onUpgradePlanClick()})),t.addEventListener("onCommentAdd",(()=>{this.addCommentCount++})),t.addEventListener("onCommentUpdate",(t=>{var e,i;(null===(e=this.snippylyUser)||void 0===e?void 0:e.isGuest)&&"newlyAdded"===(null===(i=null==t?void 0:t.detail)||void 0===i?void 0:i.type)&&(this.addCommentCount>=2&&(this.showModalOnceCommentIsModeIsOff=!0),this.addCommentCount>=5&&!this.showModalOnceCommentIsModeIsOff&&(this.showModalOnceCommentIsModeIsOff=!0))})),window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_CURSOR)){const t=document.createElement(fe.VELT_CURSOR);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_HUDDLE)){const t=document.createElement(fe.VELT_HUDDLE);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_RECORDER_NOTES)){const t=document.createElement(fe.VELT_RECORDER_NOTES);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_RECORDER_CONTROL_PANEL)){const t=document.createElement(fe.VELT_RECORDER_CONTROL_PANEL);window.document.body.appendChild(t)}if(!document.querySelector(fe.VELT_ARROWS)){const t=document.createElement(fe.VELT_ARROWS);window.document.body.appendChild(t)}},this.mountCommentSidebar=()=>{const t=this.sidebarV2Enabled,e=t?fe.VELT_COMMENTS_SIDEBAR_V2:fe.VELT_COMMENTS_SIDEBAR_LEGACY,i=t?fe.VELT_COMMENTS_SIDEBAR_LEGACY:fe.VELT_COMMENTS_SIDEBAR_V2;if(document.querySelectorAll(i).forEach((t=>t.remove())),!document.querySelector(e)){const i=document.createElement(e);i.setAttribute("shadow-dom","true"),i.setAttribute(t?ge.URL_NAVIGATION:ge.ENABLE_URL_NAVIGATION,"true"),i.setAttribute(ge.CURRENT_LOCATION_SUFFIX,"true"),e===fe.VELT_COMMENTS_SIDEBAR_LEGACY&&(i.setAttribute(ge.SIDEBAR_BUTTON_COUNT_TYPE,me),i.setAttribute(ge.CUSTOM_ACTIONS,"true")),window.document.body.appendChild(i)}},this.setCommentSidebarVisibility=t=>{var e,i,o,n,s,r,a,l;try{if(t===this.showAgentCommentsInSidebar)return;if(this.sidebarV2Enabled)return t?null===(i=null===(e=this.commentElement)||void 0===e?void 0:e.disableFilterCommentsOnDom)||void 0===i||i.call(e):null===(n=null===(o=this.commentElement)||void 0===o?void 0:o.enableFilterCommentsOnDom)||void 0===n||n.call(o),void(this.showAgentCommentsInSidebar=t);const c=document.querySelector(fe.VELT_COMMENTS_SIDEBAR_LEGACY);if(!c)return;t?(c.removeAttribute(ge.SIDEBAR_BUTTON_COUNT_TYPE),c.removeAttribute(ge.CUSTOM_ACTIONS),null===(r=null===(s=this.commentElement)||void 0===s?void 0:s.disableFilterCommentsOnDom)||void 0===r||r.call(s)):(c.setAttribute(ge.SIDEBAR_BUTTON_COUNT_TYPE,me),c.setAttribute(ge.CUSTOM_ACTIONS,"true"),null===(l=null===(a=this.commentElement)||void 0===a?void 0:a.enableFilterCommentsOnDom)||void 0===l||l.call(a)),this.showAgentCommentsInSidebar=t}catch(t){console.warn("Error in setCommentSidebarVisibility: ",t),Zc("Error in setCommentSidebarVisibility: ",t)}},this.toggleCommentSidebarVisibility=()=>{try{this.setCommentSidebarVisibility(!this.showAgentCommentsInSidebar),this.menuOpenedId=void 0}catch(t){console.warn("Error in toggleCommentSidebarVisibility: ",t),Zc("Error in toggleCommentSidebarVisibility: ",t)}},this.toggleSidebarV2=()=>{try{Tc(yt,this.sidebarV2Enabled?"false":"true",!1,"sessionStorage"),window.location.reload()}catch(t){console.warn("Error in toggleSidebarV2: ",t),Zc("Error in toggleSidebarV2: ",t)}},this.toggleVeltProxy=()=>{try{if(!this.veltProxyToggleVisible)return;t=!this.veltProxyEnabled,Tc(bt,t?"true":"false"),window.location.reload()}catch(t){console.warn("Error in toggleVeltProxy: ",t),Zc("Error in toggleVeltProxy: ",t)}var t},this.isScreenshotDisabledHost=()=>{try{return de.includes(window.location.hostname)}catch{return!1}},this.getScreenshotMode=()=>{var t,e,i;return"local"===(null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.advancedFeatures)||void 0===i?void 0:i.screenshotMode)?"local":"basic"},this.logCaptureTrigger=(...t)=>{Td()&&"undefined"!=typeof console&&console.warn("[sf-capture][trigger]",...t)},this.ensureAddCommentAnnotationSubscription=()=>{var t,e,i;this.commentElement&&"function"==typeof this.commentElement.on?this.addCommentAnnotationSubscription&&this.addCommentAnnotationSubscribedEl===this.commentElement?this.logCaptureTrigger("addCommentAnnotation subscription already attached"):(this.addCommentAnnotationSubscription&&(null===(i=(e=this.addCommentAnnotationSubscription).unsubscribe)||void 0===i||i.call(e),this.addCommentAnnotationSubscription=void 0,this.logCaptureTrigger("addCommentAnnotation re-subscribing: comment element changed")),this.addCommentAnnotationSubscription=this.commentElement.on("addCommentAnnotation").subscribe((t=>this.onAddCommentAnnotation(t))),this.addCommentAnnotationSubscribedEl=this.commentElement,this.logCaptureTrigger("addCommentAnnotation subscription attached")):this.logCaptureTrigger("addCommentAnnotation subscription NOT attached: commentElement.on unavailable",{hasCommentElement:!!this.commentElement,hasOn:"function"==typeof(null===(t=this.commentElement)||void 0===t?void 0:t.on)})},this.applyScreenshotSetting=()=>{var t,e,i,o,n,s,r,a,l,c,d,h,u;if(this.commentElement)return this.isScreenshotDisabledHost()?(null===(e=(t=this.commentElement).disableScreenshot)||void 0===e||e.call(t),void(this.nativeScreenshotEnabled&&(this.nativeScreenshotEnabled=!1,this.nativeCapture.dispose()))):void(this.nativeScreenshotEnabled?null===(o=(i=this.commentElement).disableScreenshot)||void 0===o||o.call(i):(null===(r=null===(s=null===(n=this.customerMetadata)||void 0===n?void 0:n.superflow)||void 0===s?void 0:s.advancedFeatures)||void 0===r?void 0:r.takeScreenshotOnComments)?"local"!==this.getScreenshotMode()?null===(u=(h=this.commentElement).enableScreenshot)||void 0===u||u.call(h):null===(d=(c=this.commentElement).disableScreenshot)||void 0===d||d.call(c):null===(l=(a=this.commentElement).disableScreenshot)||void 0===l||l.call(a))},this.canUseNativeScreenshot=()=>{var t,e,i;return!this.isScreenshotDisabledHost()&&(th()&&"local"===this.getScreenshotMode()&&!!(null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.advancedFeatures)||void 0===i?void 0:i.takeScreenshotOnComments))},this.getNativeScreenshotPermission=()=>{const t=_c(ne,!1,"sessionStorage");return"granted"===t||"denied"===t?t:null},this.setNativeScreenshotPermission=t=>{Tc(ne,t,!1,"sessionStorage"),this.nativeScreenshotDenied="denied"===t},this.clearNativeScreenshotPermission=()=>{Ic(ne,"sessionStorage"),this.nativeScreenshotDenied=!1},this.promptNativeScreenshotForCommentMode=()=>{this.nativeScreenshotEnabled||this.nativeScreenshotEnabling||!this.canUseNativeScreenshot()||(this.logCaptureTrigger("commentMode enter: requesting screen share"),this.enableNativeScreenshot())},this.toggleNativeScreenshot=async()=>{try{if(!this.canUseNativeScreenshot())return;this.nativeScreenshotEnabled?(this.disableNativeScreenshot(),this.setNativeScreenshotPermission("denied")):(this.clearNativeScreenshotPermission(),await this.enableNativeScreenshot()),this.menuOpenedId=void 0}catch(t){console.warn("Error in toggleNativeScreenshot: ",t),Zc("Error in toggleNativeScreenshot: ",t)}},this.enableNativeScreenshot=()=>(this.nativeScreenshotEnabling&&this.nativeScreenshotEnablingPromise||(this.nativeScreenshotEnabling=!0,this.nativeScreenshotEnablingPromise=this.performEnableNativeScreenshot()),this.nativeScreenshotEnablingPromise),this.performEnableNativeScreenshot=async()=>{var t,e;try{if(await this.nativeCapture.init(),!this.nativeCapture.isActive())return this.nativeScreenshotEnabled=!1,void this.nativeCapture.dispose();this.nativeScreenshotEnabled=!0,this.setNativeScreenshotPermission("granted"),null===(e=null===(t=this.commentElement)||void 0===t?void 0:t.disableScreenshot)||void 0===e||e.call(t),this.ensureAddCommentAnnotationSubscription()}catch(t){this.nativeScreenshotEnabled=!1,this.nativeCapture.dispose(),!function(t){var e;const i=t,o=null!==(e=null==i?void 0:i.message)&&void 0!==e?e:"";return!0===(null==i?void 0:i.sfNativeExpected)||"native-share-ended-during-init"===o||"native-not-supported"===o}(t)?console.warn("Native screenshot enable failed/cancelled: ",t):(this.setNativeScreenshotPermission("denied"),Td()&&"undefined"!=typeof console&&console.info("[sf-capture][native] enable skipped (expected):",t))}finally{this.nativeScreenshotEnabling=!1,this.nativeScreenshotEnablingPromise=void 0}},this.disableNativeScreenshot=()=>{try{this.nativeScreenshotEnabled=!1,this.nativeCapture.dispose(),this.restoreSdkScreenshot()}catch(t){console.warn("Error in disableNativeScreenshot: ",t),Zc("Error in disableNativeScreenshot: ",t)}},this.handleNativeScreenshotStreamEnded=()=>{try{const t=this.nativeScreenshotEnabled;if(this.nativeScreenshotEnabled=!1,!t)return;this.setNativeScreenshotPermission("denied"),this.restoreSdkScreenshot(),this.requestUpdate()}catch(t){console.warn("Error in handleNativeScreenshotStreamEnded: ",t),Zc("Error in handleNativeScreenshotStreamEnded: ",t)}},this.restoreSdkScreenshot=()=>{var t,e,i,o,n;this.isScreenshotDisabledHost()||"basic"===this.getScreenshotMode()&&(null===(i=null===(e=null===(t=this.customerMetadata)||void 0===t?void 0:t.superflow)||void 0===e?void 0:e.advancedFeatures)||void 0===i?void 0:i.takeScreenshotOnComments)&&(null===(n=null===(o=this.commentElement)||void 0===o?void 0:o.enableScreenshot)||void 0===n||n.call(o))},this.onAddCommentAnnotation=async t=>{var e,i,o,n,s,r,a,l,c;try{if(this.logCaptureTrigger("addCommentAnnotation event",{nativeScreenshotEnabled:this.nativeScreenshotEnabled,captureActive:this.nativeCapture.isActive(),dataKeys:t?Object.keys(t):null,commentAnnotationKeys:(null==t?void 0:t.commentAnnotation)?Object.keys(t.commentAnnotation):null}),!this.nativeScreenshotEnabled&&!this.canUseNativeScreenshot())return void this.logCaptureTrigger("skip: native screenshot unavailable");if(!this.nativeScreenshotEnabled){const t=this.nativeScreenshotEnabling&&!!this.nativeScreenshotEnablingPromise;if(!t&&null!==this.getNativeScreenshotPermission())return void this.logCaptureTrigger("skip: native screenshot not enabled (share decision recorded, no prompt in flight)");if(this.logCaptureTrigger(t?"comment add: share prompt already in flight, awaiting its outcome":"comment add: share never requested this session, prompting"),await this.enableNativeScreenshot(),!this.nativeScreenshotEnabled)return void this.logCaptureTrigger("skip: screen share not granted")}const d=null!==(o=null!==(e=null==t?void 0:t.annotationId)&&void 0!==e?e:null===(i=null==t?void 0:t.commentAnnotation)||void 0===i?void 0:i.annotationId)&&void 0!==o?o:null==t?void 0:t.id,h=null!==(l=null!==(a=null!==(s=null===(n=null==t?void 0:t.commentAnnotation)||void 0===n?void 0:n.comments)&&void 0!==s?s:null===(r=null==t?void 0:t.commentAnnotation)||void 0===r?void 0:r.commentData)&&void 0!==a?a:null==t?void 0:t.comments)&&void 0!==l?l:null==t?void 0:t.commentData,u=null===(c=null==h?void 0:h[0])||void 0===c?void 0:c.commentId;if(!d||!u)return void this.logCaptureTrigger("skip: missing ids",{annotationId:d,commentId:u,data:t});this.captureAndAttachScreenshot(d,u)}catch(t){console.warn("Error in onAddCommentAnnotation: ",t),Zc("Error in onAddCommentAnnotation: ",t)}},this.captureAndAttachScreenshot=(t,e)=>this.nativeCapture.isActive()?(this.pendingScreenshotCount+=1,this.capturingScreenshot=!0,this.screenshotChain=this.screenshotChain.catch((()=>{})).then((()=>this.runCaptureAndAttach(t,e))).finally((()=>{this.pendingScreenshotCount=Math.max(0,this.pendingScreenshotCount-1),0===this.pendingScreenshotCount&&(this.capturingScreenshot=!1)})),this.screenshotChain):(this.logCaptureTrigger("skip: native capture not active",{annotationId:t,commentId:e}),Promise.resolve()),this.runCaptureAndAttach=async(t,e)=>{var i,o,n,s;try{this.logCaptureTrigger("capture start",{annotationId:t,commentId:e});const r=await this.nativeCapture.capture({focusAnnotationId:t}),a="image/webp"===r.blobType?"webp":"png",l=new File([r.blob],`screenshot-${t}.${a}`,{type:r.blobType}),c=await(null===(o=null===(i=this.commentElement)||void 0===i?void 0:i.addAttachment)||void 0===o?void 0:o.call(i,{annotationId:t,commentId:e,files:[l]}));if(c&&Array.isArray(c)&&c.length>0&&(null===(n=c[0])||void 0===n?void 0:n.valid)){const i=null===(s=c[0])||void 0===s?void 0:s.attachment;await this.commentElement.updateComment({annotationId:t,comment:{commentId:e,attachments:[i]},merge:!0}),this.logCaptureTrigger("capture attached",{annotationId:t,commentId:e})}else console.warn("Invalid screenshot file")}catch(t){console.warn("Native screenshot capture/attach failed: ",t),Zc("Native screenshot capture/attach failed: ",t)}},this.setupSidebarAgentCommentFilter=()=>{var t,e,i,o;try{if(!this.commentElement)return;if("function"==typeof this.commentElement.on&&(this.commentElement.on("commentSidebarDataInit").subscribe((t=>{this.filterAgentCommentsFromSidebar(t)})),this.commentElement.on("commentSidebarDataUpdate").subscribe((t=>{const e=this.getSidebarGroupExpansionMap();this.filterAgentCommentsFromSidebar(t,e)}))),this.setupAgentWarningsHydration(),this.agentCommentsModeRequested)return this.setCommentSidebarVisibility(!0),void(this.showAgentCommentsInSidebar||(null===(e=null===(t=this.commentElement)||void 0===t?void 0:t.disableFilterCommentsOnDom)||void 0===e||e.call(t),this.showAgentCommentsInSidebar=!0));this.sidebarV2Enabled&&(null===(o=null===(i=this.commentElement)||void 0===i?void 0:i.enableFilterCommentsOnDom)||void 0===o||o.call(i))}catch(t){console.warn("Error in setupSidebarAgentCommentFilter: ",t),Zc("Error in setupSidebarAgentCommentFilter: ",t)}},this.setupAgentWarningsHydration=()=>{try{if(!this.commentElement||"function"!=typeof this.commentElement.getAllCommentAnnotations||!this.documentId)return;const t=this.commentElement.getAllCommentAnnotations(this.documentId+"");if(!t||"function"!=typeof t.subscribe)return;const e=t.subscribe((t=>{try{if(!this.sidebarV2Enabled&&!this.showAgentCommentsInSidebar)return;this.processAgentComments(Array.isArray(t)?t:[])}catch(t){console.warn("Error in agent-warnings hydration subscription: ",t),Zc("Error in agent-warnings hydration subscription: ",t)}}));this.subscriptions.push(e)}catch(t){console.warn("Error in setupAgentWarningsHydration: ",t),Zc("Error in setupAgentWarningsHydration: ",t)}},this.getContentWarningsDisplayCount=()=>{try{return this.contentWarningsCount>99?"99+":`${this.contentWarningsCount}`}catch(t){return console.warn("Error in getContentWarningsDisplayCount: ",t),"0"}},this.onContentWarningsButtonClick=()=>{try{this.showContentWarningSidebar=!this.showContentWarningSidebar}catch(t){console.warn("Error in onContentWarningsButtonClick: ",t),Zc("Error in onContentWarningsButtonClick: ",t)}},this.onContentWarningSidebarClose=()=>{try{this.showContentWarningSidebar=!1}catch(t){console.warn("Error in onContentWarningSidebarClose: ",t)}},this.restoreContentWarningSidebarState=()=>{try{const t="true"===_c(oe,!1,"sessionStorage"),e=new URL(window.location.href).searchParams.has(Ot);if(!t)return;if(!e)return;if(this.allFeatureDisabled||"Admin"!==this.snippylyUserRole)return;this.showContentWarningSidebar=!0}catch(t){console.warn("Error in restoreContentWarningSidebarState: ",t),Zc("Error in restoreContentWarningSidebarState: ",t)}},this.navigateTo=t=>{try{window.location.href=t}catch(t){console.warn("Error in navigateTo: ",t),Zc("Error in navigateTo: ",t)}},this.onContentWarningSidebarAddAll=()=>{},this.onContentWarningItemClick=t=>{var e,i,o;try{const n=null===(e=null==t?void 0:t.detail)||void 0===e?void 0:e.annotation;if(!(null==n?void 0:n.annotationId)&&!(null==n?void 0:n.id))return;const s=(null==n?void 0:n.annotationId)||(null==n?void 0:n.id),r=null===(i=null==n?void 0:n.pageInfo)||void 0===i?void 0:i.url;if(r&&!this.isCurrentPageUrl(r)){const t=new URL(r);return t.searchParams.set(Ot,s),this.showContentWarningSidebar&&Tc(oe,"true",!1,"sessionStorage"),void this.navigateTo(t.toString())}(null===(o=this.commentElement)||void 0===o?void 0:o.selectCommentByAnnotationId)&&this.commentElement.selectCommentByAnnotationId(s),setTimeout((()=>{var t;(null===(t=this.commentElement)||void 0===t?void 0:t.scrollToCommentByAnnotationId)&&this.commentElement.scrollToCommentByAnnotationId(s)}),150)}catch(t){console.warn("Error in onContentWarningItemClick: ",t),Zc("Error in onContentWarningItemClick: ",t)}},this.isCurrentPageUrl=t=>{try{const e=new URL(t).pathname;return e===window.location.pathname}catch{return!1}},this.setupVeltButtonClickListener=()=>{try{if(!(null===Velt||void 0===Velt?void 0:Velt.on))return void console.warn("[CWS Toolbar] Velt.on not available for button click listener");Velt.on("veltButtonClick").subscribe((t=>{var e;try{if(!t)return;const i=null===(e=null==t?void 0:t.buttonContext)||void 0===e?void 0:e.clickedButtonId,o=null==t?void 0:t.commentAnnotation,n=(null==o?void 0:o.annotationId)||(null==o?void 0:o.id),s="accept-suggestion"===i||"reject-suggestion"===i;if(s&&n&&this.processingAnnotationIds.has(n))return;if(s&&this.isRunningUnderPreviewProxy()&&"Admin"!==this.snippylyUserRole)return void console.warn("[CWS Toolbar] Only admins can accept or reject suggestions. Ignoring under the preview proxy:",i);"prev-suggestion"===i?this.navigateSuggestion(o,"prev"):"next-suggestion"===i?this.navigateSuggestion(o,"next"):"accept-suggestion"===i?this.handleAcceptSuggestion(o):"reject-suggestion"===i&&this.handleDeclineSuggestion(o)}catch(t){console.warn("Error in veltButtonClick handler: ",t)}})),this.commentElement.onCommentSelectionChange().subscribe((t=>{this.handleCommentSelection(t)}))}catch(t){console.warn("Error in setupVeltButtonClickListener: ",t),Zc("Error in setupVeltButtonClickListener: ",t)}},this.navigateSuggestion=(t,e)=>{var i,o,n,s,r;try{if(!t)return void console.warn("[CWS Toolbar] No annotation provided for navigation");const a=null===(o=null===(i=null==t?void 0:t.agent)||void 0===i?void 0:i.result)||void 0===o?void 0:o.incorrectWord;if(!a)return void console.warn("[CWS Toolbar] No incorrectWord found on annotation");const l=this.findMatchingWarning(a);if(!l)return void console.warn("[CWS Toolbar] No matching warning found for word:",a);const c=null===(n=null==t?void 0:t.pageInfo)||void 0===n?void 0:n.path,d=this.normalizePagePath(c),h=null===(s=null==l?void 0:l.annotations)||void 0===s?void 0:s.filter((t=>{var e;const i=null===(e=null==t?void 0:t.pageInfo)||void 0===e?void 0:e.path;return this.normalizePagePath(i)===d}));if(!(null==h?void 0:h.length)||h.length<=1)return;const u=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id),p=h.findIndex((t=>((null==t?void 0:t.annotationId)||(null==t?void 0:t.id))===u));if(-1===p)return void console.warn("[CWS Toolbar] Current annotation not found in warning group");let v;v="next"===e?(p+1)%h.length:(p-1+h.length)%h.length;const f=h[v],g=(null==f?void 0:f.annotationId)||(null==f?void 0:f.id);g&&((null===(r=this.commentElement)||void 0===r?void 0:r.selectCommentByAnnotationId)&&this.commentElement.selectCommentByAnnotationId(g),setTimeout((()=>{var t;(null===(t=this.commentElement)||void 0===t?void 0:t.scrollToCommentByAnnotationId)&&this.commentElement.scrollToCommentByAnnotationId(g)}),150))}catch(t){console.warn("Error in navigateSuggestion: ",t),Zc("Error in navigateSuggestion: ",t)}},this.findMatchingWarning=t=>{var e;try{for(const i of this.agentGroups){const o=null===(e=null==i?void 0:i.warnings)||void 0===e?void 0:e.find((e=>(null==e?void 0:e.primaryText)===t));if(o)return o}return null}catch(t){return console.warn("Error in findMatchingWarning: ",t),null}},this.removeAnnotationFromWarnings=t=>{var e,i,o;try{if(!t)return;const n=e=>{var i,o,n,s;for(const r of e){const e=null===(i=null==r?void 0:r.annotations)||void 0===i?void 0:i.find((e=>((null==e?void 0:e.annotationId)||(null==e?void 0:e.id))===t));if(e){const t="grammar"===(null===(n=null===(o=null==e?void 0:e.agent)||void 0===o?void 0:o.result)||void 0===n?void 0:n.type)?this.grammarSuggestionPagePathMap:this.spellingSuggestionPagePathMap,i=(null==r?void 0:r.primaryText)||"",a=null===(s=null==e?void 0:e.pageInfo)||void 0===s?void 0:s.path,l=this.normalizePagePath(a);if(i&&l&&t.has(i)){const e=t.get(i),o=e.get(l)||0;o>1?e.set(l,o-1):(e.delete(l),0===e.size&&t.delete(i))}return}}};for(const t of this.agentGroups)(null==t?void 0:t.agentId)!==ve.SPELL_CHECK&&(null==t?void 0:t.agentId)!==ve.GRAMMAR_CHECK||n(t.warnings);const s=null!==(o=null===(i=null===(e=this.agentGroups)||void 0===e?void 0:e.map((e=>{var i,o,n,s,r;const a=null!==(n=null===(o=null===(i=null==e?void 0:e.warnings)||void 0===i?void 0:i.map((e=>{var i;const o=null===(i=null==e?void 0:e.annotations)||void 0===i?void 0:i.filter((e=>((null==e?void 0:e.annotationId)||(null==e?void 0:e.id))!==t));return o&&0!==o.length?{...e,annotations:o,occurrences:o.length}:null})))||void 0===o?void 0:o.filter((t=>null!==t)))&&void 0!==n?n:[],l=null!==(r=null===(s=null==e?void 0:e.annotations)||void 0===s?void 0:s.filter((e=>((null==e?void 0:e.annotationId)||(null==e?void 0:e.id))!==t)))&&void 0!==r?r:[];return 0===a.length?null:{...e,warnings:a,warningCount:a.length,annotations:l}})))||void 0===i?void 0:i.filter((t=>null!==t)))&&void 0!==o?o:[];this.agentGroups=s;const r=s.reduce(((t,e)=>t+e.warningCount),0);this.contentWarningsCount=r,this.hasContentWarnings=r>0}catch(t){console.warn("Error in removeAnnotationFromWarnings: ",t)}},this.setSuggestionButtonsLoading=(t,e,i)=>{try{const o=i||document.querySelector(".velt-comment-dialog.selected");if(!o)return;const n=o.querySelector(".sf-accept-btn"),s=o.querySelector(".sf-reject-btn");if(e){const e="accept"===t?n:s,i="accept"===t?s:n;null==e||e.classList.add("sf-btn-loading"),null==i||i.classList.add("sf-btn-disabled")}else null==n||n.classList.remove("sf-btn-loading","sf-btn-disabled"),null==s||s.classList.remove("sf-btn-loading","sf-btn-disabled")}catch(t){console.warn("Error in setSuggestionButtonsLoading: ",t)}},this.handleAcceptSuggestion=async t=>{var e,i,o;try{const n=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id);if(!n)return void console.warn("[CWS Toolbar] handleAcceptSuggestion: No annotationId found",t);if(this.processingAnnotationIds.has(n))return;const s=(null===(e=this.snippylyUser)||void 0===e?void 0:e.userId)||(null===(i=this.snippylyUser)||void 0===i?void 0:i.uid),r=(null===(o=this.snippylyUser)||void 0===o?void 0:o.email)||"";if(!s)return void console.warn("[CWS Toolbar] handleAcceptSuggestion: No user available");if(!this.documentId)return void console.warn("[CWS Toolbar] handleAcceptSuggestion: No documentId available");this.processingAnnotationIds.add(n);const a=document.querySelector(".velt-comment-dialog.selected");this.setSuggestionButtonsLoading("accept",!0,a);try{await pd(this.apiKey,this.apiKey,this.documentId+"",n,{userId:s,email:r}),this.removeAnnotationFromWarnings(n)}finally{this.processingAnnotationIds.delete(n),this.setSuggestionButtonsLoading("accept",!1,a)}}catch(t){console.warn("Error in handleAcceptSuggestion: ",t),Zc("Error in handleAcceptSuggestion: ",t)}},this.handleDeclineSuggestion=async t=>{var e,i,o;try{const n=(null==t?void 0:t.annotationId)||(null==t?void 0:t.id);if(!n)return void console.warn("[CWS Toolbar] handleDeclineSuggestion: No annotationId found",t);if(this.processingAnnotationIds.has(n))return;if(!this.documentId)return void console.warn("[CWS Toolbar] handleDeclineSuggestion: No documentId available");this.processingAnnotationIds.add(n);const s=document.querySelector(".velt-comment-dialog.selected");this.setSuggestionButtonsLoading("reject",!0,s);const r=(null===(e=this.snippylyUser)||void 0===e?void 0:e.userId)||(null===(i=this.snippylyUser)||void 0===i?void 0:i.uid),a=(null===(o=this.snippylyUser)||void 0===o?void 0:o.email)||"";try{await vd(this.apiKey,this.apiKey,this.documentId+"",n,r?{userId:r,email:a}:void 0),this.removeAnnotationFromWarnings(n)}finally{this.processingAnnotationIds.delete(n),this.setSuggestionButtonsLoading("reject",!1,s)}}catch(t){console.warn("Error in handleDeclineSuggestion: ",t),Zc("Error in handleDeclineSuggestion: ",t)}},this.showFirstCommentNudge=()=>{try{if(!this.autoCommentModeRequested||this.autoCommentModeArmedOnce||this.addCommentMode)return;this.firstCommentNudge=!0,this.showTourCommentTooltip=!0}catch(t){console.warn("Error in showFirstCommentNudge: ",t),Zc("Error in showFirstCommentNudge: ",t)}},this.disableCommentMode=()=>{var t;try{(null===(t=this.commentElement)||void 0===t?void 0:t.disableCommentMode)&&this.commentElement.disableCommentMode()}catch(t){console.warn("Error in disableAddCommentMode: ",t),Zc("Error in disableAddCommentMode: ",t)}},this.disableCommentModeButton=()=>{try{return this.addCommentMode?L`
4727
4731
  <div class="disable-add-comment-button" @click=${()=>this.disableCommentMode()}>
4728
4732
  <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4729
4733
  <path fill-rule="evenodd" clip-rule="evenodd" d="M3.52861 3.52858C3.78896 3.26823 4.21107 3.26823 4.47141 3.52858L8.00001 7.05717L11.5286 3.52858C11.789 3.26823 12.2111 3.26823 12.4714 3.52858C12.7318 3.78892 12.7318 4.21103 12.4714 4.47138L8.94282 7.99998L12.4714 11.5286C12.7318 11.7889 12.7318 12.211 12.4714 12.4714C12.2111 12.7317 11.789 12.7317 11.5286 12.4714L8.00001 8.94279L4.47141 12.4714C4.21107 12.7317 3.78896 12.7317 3.52861 12.4714C3.26826 12.211 3.26826 11.7889 3.52861 11.5286L7.0572 7.99998L3.52861 4.47138C3.26826 4.21103 3.26826 3.78892 3.52861 3.52858Z" fill="#FAFBFF"/>
4730
4734
  </svg>
4731
4735
  </div>
4732
- `:L``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Gc("Error in disableAddCommentModeButton: ",t),L``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=gd.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=md.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Gc("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;try{const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");if(!e)return;requestAnimationFrame((()=>{var t;try{const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,s]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],r=parseInt(n)-i;e.style.transform=`translate(${r||0}px, ${s||0}px)`}catch(t){console.warn("Error in checkToolbarPosition Request Animation Frame",t)}}))}catch(t){console.warn("Error in checkToolbarPosition",t)}},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.toolbarMouseMove=t=>{var e;try{if(t.stopPropagation(),this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<32)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}}catch(t){console.warn("Error in toolbarMouseMove",t)}},this.toolbarMouseDown=t=>{var e;try{const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}}catch(t){console.warn("Error in toolbarMouseDown",t)}},this.toolbarMouseUp=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseUp",t)}},this.toolbarMouseLeave=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseLeave",t)}},localStorage.setItem("sfToolbarVersion",ft),this.guestUserNameUpdated=!!_c(te);const t=new URL(document.location);t.searchParams.has(Lt)&&t.searchParams.delete(Lt),this.signInUrl=`${xe}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${xe}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,Ic(Dt),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),this.nativeCapture.onEnded=()=>this.handleNativeScreenshotStreamEnded(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Gc("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,s,r,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(s=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===s||s.setProperty("transform","none","important"),null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),Bc({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Tc(Vt,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Gc("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}get sidebarV2Enabled(){return function(t){const e=!!t&&xt.includes(t);try{const t=sessionStorage.getItem(yt);if("true"===t)return!0;if("false"===t)return!1}catch{}return!e}(this.apiKey)}get canToggleSidebarVersion(){return!0}get veltProxyEnabled(){return function(t){const e=!!t&&Ct.includes(t);try{const t=null===localStorage||void 0===localStorage?void 0:localStorage.getItem(bt);if("true"===t)return!0;if("false"===t)return!1}catch(t){}return!e}(this.apiKey)}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=xc(kc(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",this.nativeScreenshotDenied="denied"===_c(ne,!1,"sessionStorage"),this.ensureAddCommentAnnotationSubscription(),this.setupPreviewProxySuggestionReadOnlyGuard(),this.applyPreviewProxyReadOnlyStyles(),setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='\n body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }\n ',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Kc(vt.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}updated(t){try{if(super.updated(t),t.has("showContentWarningSidebar")){this.setCommentSidebarVisibility(this.showContentWarningSidebar);const e=t.get("showContentWarningSidebar");this.showContentWarningSidebar?Tc(oe,"true",!1,"sessionStorage"):!0===e&&Ic(oe,"sessionStorage")}}catch(t){console.warn("Error in updated: ",t)}}disconnectedCallback(){try{super.disconnectedCallback(),queueMicrotask((()=>{var t,e;try{if(this.isConnected)return void this.logCaptureTrigger("disconnect teardown skipped: element moved, not removed");this.logCaptureTrigger("disconnect teardown: element removed, releasing stream + subscription"),this.nativeCapture.dispose(),this.nativeScreenshotEnabled=!1,this.capturingScreenshot=!1,this.pendingScreenshotCount=0,this.restoreSdkScreenshot(),null===(e=null===(t=this.addCommentAnnotationSubscription)||void 0===t?void 0:t.unsubscribe)||void 0===e||e.call(t),this.addCommentAnnotationSubscription=void 0,this.addCommentAnnotationSubscribedEl=void 0,this.removePreviewProxyReadOnlyStyles()}catch(t){console.warn("Error in disconnectedCallback teardown: ",t)}}))}catch(t){console.warn("Error in disconnectedCallback: ",t)}}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString(),e=this.isRunningUnderPreviewProxy();t.includes(ce)||t.includes(re)||t.includes(ae)||t.includes(le)||e?this.toolbarEnabled=!0:this.toolbarEnabled=await Xc(this.apiKey,this.projectId,t),this.toolbarEnabled||Kc(vt.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Gc("Error in detectToolbarEnabled: ",t)}}get canShowPrivateCommentToggle(){return this.hasPrivateCommentsAccess&&this.isPrivateCommentsEnabledOnWorkspace}render(){var t,e,i,o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y;return this.loadPlugin&&this.toolbarEnabled?!this.snippylyUser||this.loading||null===this.isPlanExpired?L`
4733
- <div class="snippyly-plugin-container" part="superflow-toolbar-container">
4734
- <div class="toolbar" id="smallToolbar"
4735
- style="cursor: default; top: ${this._dragY}px; left: ${this._dragX}px;">
4736
- <!-- <div class="toolbar-section">
4737
- <svg class="toolbar-icon-arrow" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
4738
- <path fill-rule="evenodd" clip-rule="evenodd"
4739
- d="M14.1607 12.4941C13.8353 12.8195 13.8353 13.3472 14.1607 13.6726L16.4882 16L14.1607 18.3274C13.8353 18.6528 13.8353 19.1805 14.1607 19.5059C14.4862 19.8314 15.0138 19.8314 15.3393 19.5059L18.2559 16.5893C18.5814 16.2638 18.5814 15.7362 18.2559 15.4107L15.3393 12.4941C15.0138 12.1686 14.4862 12.1686 14.1607 12.4941Z" />
4740
- </svg>
4741
- </div> -->
4742
- <div class="toolbar-section">
4743
- <div class="toolbar-logo">
4744
- ${this.getLogoMark()}
4745
- </div>
4746
- </div>
4747
- <div class="toolbar-section">
4748
- <div class="toolbar-divider"></div>
4749
- </div>
4750
- ${this.snippylyUserRole&&!this.allFeatureDisabled?L`
4751
- <div class="toolbar-section comment-viewmode-section ${ht({"d-none":!this.expanded})}">
4752
- <div class="toolbar-actions1 ${ht({"d-none":!this.commentElement})}">
4753
- <div class="tooltip">
4754
- <div class="tooltiptext">${fd("All Comments")}</div>
4755
- <velt-sidebar-button sidebar-button-count-type="filter" shadow-dom="false"></velt-sidebar-button>
4756
- </div>
4757
- </div>
4758
- <div class="toolbar-section ${ht({"d-none":!this.commentElement})}">
4759
- <div class="toolbar-divider"></div>
4760
- </div>
4761
- </div>
4762
- `:null}
4763
- ${!this.customLoginEnabledLocally||this.loading?L`
4764
- <div class="toolbar-section ${this.invalidApiKey?"d-none":""}" @click=${()=>this.loginWithGoogle()}>
4765
- <a class="toolbar-button sign-in-button ${ht({loading:this.loading})}">
4766
- ${this.loading?L`
4767
- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
4768
- <g transform="rotate(0 50 50)">
4769
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4770
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate>
4771
- </rect>
4772
- </g><g transform="rotate(30 50 50)">
4773
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4774
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
4775
- </rect>
4776
- </g><g transform="rotate(60 50 50)">
4777
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4778
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate>
4779
- </rect>
4780
- </g><g transform="rotate(90 50 50)">
4781
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4782
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
4783
- </rect>
4784
- </g><g transform="rotate(120 50 50)">
4785
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4786
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate>
4787
- </rect>
4788
- </g><g transform="rotate(150 50 50)">
4789
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4790
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate>
4791
- </rect>
4792
- </g><g transform="rotate(180 50 50)">
4793
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4794
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate>
4795
- </rect>
4796
- </g><g transform="rotate(210 50 50)">
4797
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4798
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
4799
- </rect>
4800
- </g><g transform="rotate(240 50 50)">
4801
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4802
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate>
4803
- </rect>
4804
- </g><g transform="rotate(270 50 50)">
4805
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4806
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
4807
- </rect>
4808
- </g><g transform="rotate(300 50 50)">
4809
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4810
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate>
4811
- </rect>
4812
- </g><g transform="rotate(330 50 50)">
4813
- <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
4814
- <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
4815
- </rect>
4816
- </g>
4817
- </svg>
4818
- ${this.guestMode,""}
4819
- `:L`${this.signInError?L`
4820
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4821
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.64754 5.99921C8.27961 6.01309 7.97008 5.72609 7.95619 5.35816C7.92488 4.5287 7.8809 3.92331 7.83766 3.48926C7.79508 3.06179 7.53702 2.8046 7.1773 2.76063C6.75313 2.70878 6.15477 2.66634 5.33367 2.66634C4.51254 2.66634 3.91418 2.70878 3.49002 2.76063C3.13048 2.80458 2.87229 3.06189 2.8297 3.48946C2.74944 4.29515 2.667 5.68713 2.667 7.99968C2.667 10.3122 2.74944 11.7042 2.8297 12.5099C2.87229 12.9375 3.13048 13.1948 3.49002 13.2387C3.91418 13.2906 4.51254 13.333 5.33367 13.333C6.15477 13.333 6.75313 13.2906 7.1773 13.2387C7.53702 13.1947 7.79508 12.9376 7.83766 12.5101C7.8809 12.076 7.92488 11.4706 7.95619 10.6412C7.97008 10.2733 8.27961 9.98626 8.64754 10.0001C9.01546 10.014 9.30247 10.3236 9.28858 10.6915C9.25644 11.5428 9.21087 12.1761 9.16443 12.6423C9.06679 13.6224 8.38345 14.4345 7.33908 14.5622C6.85294 14.6216 6.19979 14.6663 5.33367 14.6663C4.46752 14.6663 3.81436 14.6216 3.32822 14.5622C2.28377 14.4345 1.60055 13.622 1.50293 12.6421C1.41698 11.7792 1.33367 10.3407 1.33367 7.99968C1.33367 5.65866 1.41698 4.22013 1.50293 3.35729C1.60055 2.37738 2.28377 1.56483 3.32822 1.43715C3.81436 1.37772 4.46752 1.33301 5.33367 1.33301C6.19979 1.33301 6.85294 1.37772 7.33908 1.43714C8.38345 1.56481 9.06679 2.37697 9.16443 3.35709C9.21087 3.8233 9.25644 4.45651 9.28858 5.30786C9.30247 5.67579 9.01546 5.98532 8.64754 5.99921Z" fill="white"/>
4822
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1966 6.13807C10.9362 5.87772 10.9362 5.45561 11.1966 5.19526C11.4569 4.93491 11.879 4.93491 12.1394 5.19526L14.4727 7.5286C14.7331 7.78894 14.7331 8.21105 14.4727 8.4714L12.1394 10.8047C11.879 11.0651 11.4569 11.0651 11.1966 10.8047C10.9362 10.5444 10.9362 10.1223 11.1966 9.86193L12.3918 8.66667H6.0013C5.63311 8.66667 5.33463 8.36819 5.33463 8C5.33463 7.63181 5.63311 7.33333 6.0013 7.33333L12.3918 7.33333L11.1966 6.13807Z" fill="white"/>
4823
- </svg>
4824
- <span>${fd("Sign in again!")}</span>
4825
- `:L`
4826
- <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4827
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.64754 5.99921C8.27961 6.01309 7.97008 5.72609 7.95619 5.35816C7.92488 4.5287 7.8809 3.92331 7.83766 3.48926C7.79508 3.06179 7.53702 2.8046 7.1773 2.76063C6.75313 2.70878 6.15477 2.66634 5.33367 2.66634C4.51254 2.66634 3.91418 2.70878 3.49002 2.76063C3.13048 2.80458 2.87229 3.06189 2.8297 3.48946C2.74944 4.29515 2.667 5.68713 2.667 7.99968C2.667 10.3122 2.74944 11.7042 2.8297 12.5099C2.87229 12.9375 3.13048 13.1948 3.49002 13.2387C3.91418 13.2906 4.51254 13.333 5.33367 13.333C6.15477 13.333 6.75313 13.2906 7.1773 13.2387C7.53702 13.1947 7.79508 12.9376 7.83766 12.5101C7.8809 12.076 7.92488 11.4706 7.95619 10.6412C7.97008 10.2733 8.27961 9.98626 8.64754 10.0001C9.01546 10.014 9.30247 10.3236 9.28858 10.6915C9.25644 11.5428 9.21087 12.1761 9.16443 12.6423C9.06679 13.6224 8.38345 14.4345 7.33908 14.5622C6.85294 14.6216 6.19979 14.6663 5.33367 14.6663C4.46752 14.6663 3.81436 14.6216 3.32822 14.5622C2.28377 14.4345 1.60055 13.622 1.50293 12.6421C1.41698 11.7792 1.33367 10.3407 1.33367 7.99968C1.33367 5.65866 1.41698 4.22013 1.50293 3.35729C1.60055 2.37738 2.28377 1.56483 3.32822 1.43715C3.81436 1.37772 4.46752 1.33301 5.33367 1.33301C6.19979 1.33301 6.85294 1.37772 7.33908 1.43714C8.38345 1.56481 9.06679 2.37697 9.16443 3.35709C9.21087 3.8233 9.25644 4.45651 9.28858 5.30786C9.30247 5.67579 9.01546 5.98532 8.64754 5.99921Z" fill="white"/>
4828
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1966 6.13807C10.9362 5.87772 10.9362 5.45561 11.1966 5.19526C11.4569 4.93491 11.879 4.93491 12.1394 5.19526L14.4727 7.5286C14.7331 7.78894 14.7331 8.21105 14.4727 8.4714L12.1394 10.8047C11.879 11.0651 11.4569 11.0651 11.1966 10.8047C10.9362 10.5444 10.9362 10.1223 11.1966 9.86193L12.3918 8.66667H6.0013C5.63311 8.66667 5.33463 8.36819 5.33463 8C5.33463 7.63181 5.63311 7.33333 6.0013 7.33333L12.3918 7.33333L11.1966 6.13807Z" fill="white"/>
4829
- </svg>
4830
- <span>${fd("Sign in to comment")}</span>
4831
- `}`}
4832
- </a>
4833
- </div>
4834
- ${this.invalidApiKey?L`
4835
- <div class="toolbar-section">
4836
- <div class="tooltip">
4837
- <div class="tooltiptext">
4838
- ${this.isSigningInUserAdmin?L`Current URL not added to Superflow <br/> Project. Please add this URL.`:L`Current URL not added to Superflow <br/> Project. Please contact admin.`}
4839
- </div>
4840
- <div class="s-alert-btn danger">
4841
- <div class='error-container'>
4842
- <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4843
- <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
4844
- </svg>
4845
- <div class="error-message">Error</div>
4846
- </div>
4847
- ${this.isSigningInUserAdmin?L`
4848
- <div class="s-cta-btn" @click=${()=>this.goToAdminPortalDashboard()}>
4849
- Add URL
4850
- </div>
4851
- `:null}
4852
- </div>
4853
- </div>
4854
- </div>
4855
- `:null}
4856
- <div class="toolbar-section">
4857
- <div class="toolbar-divider"></div>
4858
- </div>`:null}
4859
- <div class="toolbar-section s-more-menu dropdown">
4860
- <div class="dropdown-content">
4861
- <div class="menu-point header disable-hover">
4862
- <div class="toolbar-logo">
4863
- ${this.getWordMark()}
4864
- </div>
4865
- </div>
4866
- <div class="menu-point-wrap">
4867
- ${fd("Sign in to comment on this page.")}
4868
- <a href="https://www.usesuperflow.com/features" target="_blank">
4869
- ${fd("Learn more")}
4870
- <svg width="14" height="14" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
4871
- <path d="M4.30881 1.72602C3.67106 1.86293 3.11953 2.1682 2.64215 2.64149C2.29011 2.99745 2.05915 3.34183 1.89878 3.76037C1.66018 4.37857 1.668 4.08911 1.668 10.0007C1.668 15.9122 1.66018 15.6228 1.89878 16.241C2.29385 17.2699 3.29164 18.0876 4.38704 18.291C4.70779 18.3496 15.2947 18.3496 15.6154 18.291C16.2297 18.1775 16.9494 17.7942 17.3838 17.3481C17.8221 16.8942 18.1506 16.284 18.2797 15.6736C18.3227 15.4702 18.3345 14.8051 18.3345 12.2973V9.17907H17.5129H16.6913V12.1017C16.6913 13.7957 16.6756 15.126 16.6522 15.259C16.5348 15.975 15.9753 16.5343 15.2593 16.6517C14.9503 16.7025 5.05201 16.7025 4.74282 16.6517C4.03857 16.5382 3.48296 15.9944 3.34997 15.2862C3.29912 15.0085 3.29521 5.06326 3.34997 4.74251C3.46731 4.02653 4.02684 3.467 4.74282 3.34966C4.87582 3.32619 6.20609 3.31054 7.90013 3.31054H10.8226V2.48895V1.66735L7.68482 1.67126C5.25184 1.67126 4.48891 1.68691 4.30881 1.72602Z" fill="#4C5366"/>
4872
- <path d="M12.5058 2.48917V3.31077H14.0004H15.4988L13.3548 5.45481L11.2148 7.59477L11.7939 8.17385C12.1108 8.49069 12.3887 8.74902 12.4082 8.74902C12.4317 8.74902 13.4019 7.79443 14.5679 6.62845L16.6924 4.50413V6.0026V7.49715H17.514H18.3352V4.58253V1.66791H15.4206H12.5058V2.48917Z" fill="#4C5366"/>
4873
- </svg>
4874
- </a>
4875
- </div>
4876
- <hr />
4877
- <div class="menu-point" @click=${()=>this.toggleQRCodeVisibility()}>
4878
- <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
4879
- <path d="M5.25 12.75V12.7575M5.25 5.25V5.2575M12.75 5.25V5.2575M12.75 10.5H10.5V12.75M15 10.5V10.5075M10.5 15H12.75M12.75 12.75H15V15M3 3.75C3 3.55109 3.07902 3.36032 3.21967 3.21967C3.36032 3.07902 3.55109 3 3.75 3H6.75C6.94891 3 7.13968 3.07902 7.28033 3.21967C7.42098 3.36032 7.5 3.55109 7.5 3.75V6.75C7.5 6.94891 7.42098 7.13968 7.28033 7.28033C7.13968 7.42098 6.94891 7.5 6.75 7.5H3.75C3.55109 7.5 3.36032 7.42098 3.21967 7.28033C3.07902 7.13968 3 6.94891 3 6.75V3.75ZM10.5 3.75C10.5 3.55109 10.579 3.36032 10.7197 3.21967C10.8603 3.07902 11.0511 3 11.25 3H14.25C14.4489 3 14.6397 3.07902 14.7803 3.21967C14.921 3.36032 15 3.55109 15 3.75V6.75C15 6.94891 14.921 7.13968 14.7803 7.28033C14.6397 7.42098 14.4489 7.5 14.25 7.5H11.25C11.0511 7.5 10.8603 7.42098 10.7197 7.28033C10.579 7.13968 10.5 6.94891 10.5 6.75V3.75ZM3 11.25C3 11.0511 3.07902 10.8603 3.21967 10.7197C3.36032 10.579 3.55109 10.5 3.75 10.5H6.75C6.94891 10.5 7.13968 10.579 7.28033 10.7197C7.42098 10.8603 7.5 11.0511 7.5 11.25V14.25C7.5 14.4489 7.42098 14.6397 7.28033 14.7803C7.13968 14.921 6.94891 15 6.75 15H3.75C3.55109 15 3.36032 14.921 3.21967 14.7803C3.07902 14.6397 3 14.4489 3 14.25V11.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
4880
- </svg>
4881
-
4882
- <p>${fd("Open in Mobile")}</p>
4883
- </div>
4884
- ${this.canToggleSidebarVersion?L`
4885
- <div class="menu-point" @click=${()=>this.toggleSidebarV2()}>
4886
- <input
4887
- type="checkbox"
4888
- .checked=${this.sidebarV2Enabled}
4889
- @click=${t=>t.stopPropagation()}
4890
- @change=${()=>this.toggleSidebarV2()}
4891
- />
4892
- <p>${fd("Try V2 Sidebar (beta)")}</p>
4893
- </div>
4894
- `:""}
4895
- <div class="menu-point" @click=${()=>this.toggleCommentSidebarVisibility()}>
4896
- <input
4897
- type="checkbox"
4898
- .checked=${this.showAgentCommentsInSidebar}
4899
- @click=${t=>t.stopPropagation()}
4900
- @change=${()=>this.toggleCommentSidebarVisibility()}
4901
- />
4902
- <p>${fd("Show Agent Comments in Sidebar & Page")}</p>
4903
- </div>
4904
- ${this.veltProxyToggleVisible?L`
4905
- <div class="menu-point tooltip velt-proxy-menu-point" @click=${()=>this.toggleVeltProxy()}>
4906
- <input
4907
- type="checkbox"
4908
- .checked=${this.veltProxyEnabled}
4909
- @click=${t=>t.stopPropagation()}
4910
- @change=${()=>this.toggleVeltProxy()}
4911
- />
4912
- <p>${fd("Use Secure Proxy")}</p>
4913
- <div class="tooltiptext velt-proxy-tooltiptext">
4914
- <span>${fd("Routes Superflow's backend traffic through Superflow-owned domains.")}</span>
4915
- <span>${fd("Turn this off if your network blocks them. Reloads the page.")}</span>
4916
- </div>
4917
- </div>
4918
- `:""}
4919
- <div class="menu-point" @click=${()=>this.removeSnippyly()}>
4920
- <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4921
- <path fill-rule="evenodd" clip-rule="evenodd" d="M12 4C10.0478 4 8.24816 4.161 6.80371 4.35177C5.50372 4.52346 4.52346 5.50372 4.35177 6.80371C4.16101 8.24816 4 10.0478 4 12C4 13.9522 4.161 15.7518 4.35177 17.1963C4.52346 18.4963 5.50372 19.4765 6.80371 19.6482C8.24816 19.839 10.0478 20 12 20C13.9522 20 15.7518 19.839 17.1963 19.6482C18.4963 19.4765 19.4765 18.4963 19.6482 17.1963C19.839 15.7518 20 13.9522 20 12C20 10.0478 19.839 8.24816 19.6482 6.80371C19.4765 5.50372 18.4963 4.52346 17.1963 4.35177C15.7518 4.16101 13.9522 4 12 4ZM6.54184 2.36899C4.34504 2.65912 2.65912 4.34504 2.36899 6.54184C2.16953 8.05208 2 9.94127 2 12C2 14.0587 2.16953 15.9479 2.36899 17.4582C2.65912 19.655 4.34504 21.3409 6.54184 21.631C8.05208 21.8305 9.94127 22 12 22C14.0587 22 15.9479 21.8305 17.4582 21.631C19.655 21.3409 21.3409 19.655 21.631 17.4582C21.8305 15.9479 22 14.0587 22 12C22 9.94127 21.8305 8.05208 21.631 6.54184C21.3409 4.34504 19.655 2.65912 17.4582 2.36899C15.9479 2.16953 14.0587 2 12 2C9.94127 2 8.05208 2.16953 6.54184 2.36899Z" fill="#777E91"/>
4922
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z" fill="#777E91"/>
4923
- </svg>
4924
-
4925
- <p>${fd("Exit Review Mode")}</p>
4926
- </div>
4927
- ${!this.customLoginEnabledLocally&&this.allowGuestModeSignIn?L`
4928
- <div class="menu-point" @click=${()=>this.loginWithGoogle()}>
4929
- <svg width="20" height="20" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
4930
- <path fill-rule="evenodd" clip-rule="evenodd" d="M8.64754 5.99921C8.27961 6.01309 7.97008 5.72609 7.95619 5.35816C7.92488 4.5287 7.8809 3.92331 7.83766 3.48926C7.79508 3.06179 7.53702 2.8046 7.1773 2.76063C6.75313 2.70878 6.15477 2.66634 5.33367 2.66634C4.51254 2.66634 3.91418 2.70878 3.49002 2.76063C3.13048 2.80458 2.87229 3.06189 2.8297 3.48946C2.74944 4.29515 2.667 5.68713 2.667 7.99968C2.667 10.3122 2.74944 11.7042 2.8297 12.5099C2.87229 12.9375 3.13048 13.1948 3.49002 13.2387C3.91418 13.2906 4.51254 13.333 5.33367 13.333C6.15477 13.333 6.75313 13.2906 7.1773 13.2387C7.53702 13.1947 7.79508 12.9376 7.83766 12.5101C7.8809 12.076 7.92488 11.4706 7.95619 10.6412C7.97008 10.2733 8.27961 9.98626 8.64754 10.0001C9.01546 10.014 9.30247 10.3236 9.28858 10.6915C9.25644 11.5428 9.21087 12.1761 9.16443 12.6423C9.06679 13.6224 8.38345 14.4345 7.33908 14.5622C6.85294 14.6216 6.19979 14.6663 5.33367 14.6663C4.46752 14.6663 3.81436 14.6216 3.32822 14.5622C2.28377 14.4345 1.60055 13.622 1.50293 12.6421C1.41698 11.7792 1.33367 10.3407 1.33367 7.99968C1.33367 5.65866 1.41698 4.22013 1.50293 3.35729C1.60055 2.37738 2.28377 1.56483 3.32822 1.43715C3.81436 1.37772 4.46752 1.33301 5.33367 1.33301C6.19979 1.33301 6.85294 1.37772 7.33908 1.43714C8.38345 1.56481 9.06679 2.37697 9.16443 3.35709C9.21087 3.8233 9.25644 4.45651 9.28858 5.30786C9.30247 5.67579 9.01546 5.98532 8.64754 5.99921Z" fill="#777E91"/>
4931
- <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1966 6.13807C10.9362 5.87772 10.9362 5.45561 11.1966 5.19526C11.4569 4.93491 11.879 4.93491 12.1394 5.19526L14.4727 7.5286C14.7331 7.78894 14.7331 8.21105 14.4727 8.4714L12.1394 10.8047C11.879 11.0651 11.4569 11.0651 11.1966 10.8047C10.9362 10.5444 10.9362 10.1223 11.1966 9.86193L12.3918 8.66667H6.0013C5.63311 8.66667 5.33463 8.36819 5.33463 8C5.33463 7.63181 5.63311 7.33333 6.0013 7.33333L12.3918 7.33333L11.1966 6.13807Z" fill="#777E91"/>
4932
- </svg>
4933
- <p>${fd("Sign in")}</p>
4934
- </div>
4935
- `:null}
4936
- </div>
4937
- <svg
4938
- class="toolbar-icon"
4939
- viewBox="0 0 32 32"
4940
- fill="none"
4941
- xmlns="http://www.w3.org/2000/svg"
4942
- >
4943
- <path
4944
- d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z"
4945
- />
4946
- </svg>
4947
- </div>
4948
- </div>
4949
- ${this.showQrCode&&this.qrCode?L`
4950
- <div class="qrcode-container">
4951
- <img class="qrcode" src=${this.qrCode} />
4952
- <button class="qrcode-container-close-btn" @click=${()=>this.toggleQRCodeVisibility()}>x</button>
4953
- </div>
4954
- `:null}
4955
- </div>
4956
- ${this.showLiveDemoModal?L`
4957
- <div class="snippyly-plugin-modal-container" @click=${()=>this.onLiveDemoModalNextClick()}>
4958
- <div class="s-modal" @click=${t=>null==t?void 0:t.stopPropagation()}>
4959
- <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
4960
- <div class="s-modal-text">
4961
- <h1>${fd("Try Superflow using the toolbar below.")}</h1>
4962
- <p>
4963
- ${fd("Get ready to drop your first comment!")} <br/>
4964
- ${fd("But before you do that, you definitely deserve a high five!")}
4965
- </p>
4966
- </div>
4967
- <div class="s-button s-primary" @click=${()=>this.onLiveDemoModalNextClick()}>${fd("Done")}</div>
4968
- </div>
4969
- </div>
4970
- `:L``}
4971
- ${this.showFigmaDemoModal?L`
4972
- <div class="snippyly-plugin-modal-container" @click=${()=>this.onFigmaDemoModalNextClick()}>
4973
- <div class="s-modal" @click=${t=>null==t?void 0:t.stopPropagation()}>
4974
- <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
4975
- <div class="s-modal-text">
4976
- <h1>
4977
- ${fd("Sign in on the toolbar below and add")}<br/>
4978
- ${fd("comments on the design flaws.")}
4979
- </h1>
4980
- </div>
4981
- <div class="s-button s-primary" @click=${()=>this.onFigmaDemoModalNextClick()}>${fd("Done")}</div>
4982
- </div>
4983
- </div>
4984
- `:L``}
4985
- `:L`
4736
+ `:L``}catch(t){return console.warn("Error in disableAddCommentModeButton: ",t),Zc("Error in disableAddCommentModeButton: ",t),L``}},this.addStyles=()=>{var t,e;try{const i=document.createElement("style");i.textContent=wd.cssText,null===(t=this.shadowRoot)||void 0===t||t.appendChild(i);const o=document.createElement("style");o.textContent=yd.cssText,null===(e=this.shadowRoot)||void 0===e||e.appendChild(o)}catch(t){console.warn("Error in addStyles: ",t),Zc("Error in addStyles: ",t)}},this.checkToolbarPosition=()=>{var t;try{const e=null===(t=this.shadowRoot)||void 0===t?void 0:t.querySelector(".snippyly-plugin-container");if(!e)return;requestAnimationFrame((()=>{var t;try{const{x:i}=e.getBoundingClientRect();if(i>=0)return;const o=e.style.transform,[n,s]=(null===(t=o.match(/translate\(([-\d.]+)px,\s*([-\d.]+)px\)/))||void 0===t?void 0:t.slice(1))||[],r=parseInt(n)-i;e.style.transform=`translate(${r||0}px, ${s||0}px)`}catch(t){console.warn("Error in checkToolbarPosition Request Animation Frame",t)}}))}catch(t){console.warn("Error in checkToolbarPosition",t)}},this._dragX=0,this._dragY=0,this._isDragging=!1,this._startX=0,this._startY=0,this.toolbarMouseMove=t=>{var e;try{if(t.stopPropagation(),this._isDragging){let i,o;const n=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(n){if(i=t.clientX-this._startX,o=t.clientY-this._startY,i>20||o>40)return;if(window.innerWidth-n.getBoundingClientRect().width-Math.abs(i)<32)return;if(window.innerHeight-n.getBoundingClientRect().height-Math.abs(o)<n.getBoundingClientRect().height)return;n.style.transform=`translate(${i}px, ${o}px)`}}}catch(t){console.warn("Error in toolbarMouseMove",t)}},this.toolbarMouseDown=t=>{var e;try{const i=null===(e=this.shadowRoot)||void 0===e?void 0:e.querySelector(".snippyly-plugin-container");if(i){this._isDragging=!0;const e=window.getComputedStyle(i),o=new WebKitCSSMatrix(e.transform);this._startX=t.clientX-o.m41,this._startY=t.clientY-o.m42}}catch(t){console.warn("Error in toolbarMouseDown",t)}},this.toolbarMouseUp=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseUp",t)}},this.toolbarMouseLeave=t=>{try{t&&(this._isDragging=!1)}catch(t){console.warn("Error in toolbarMouseLeave",t)}},localStorage.setItem("sfToolbarVersion",ft),this.guestUserNameUpdated=!!_c(te);const t=new URL(document.location);t.searchParams.has(Lt)&&t.searchParams.delete(Lt),this.signInUrl=`${xe}/signin?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,this.signOutUrl=`${xe}/signout?redirect_url=${encodeURIComponent(null==t?void 0:t.toString())}&source=sf`,window.Superflow={enableCustomLogin:async()=>{this.customLoginEnabledLocally=!0,Ic(Dt),await this.checkCustomLoginEnabled()},identify:async t=>{this.providedUser=t,this.customLoginEnabled&&this.loginWithCustomUser()},signInUrl:this.signInUrl,signOutUrl:this.signOutUrl,openGuestModeSignInModal:t=>{this.skipGuestNameModal=t,this.openGuestModeSignInModal()},onPasswordProtectedModalOpenButtonClick:()=>{this.onPasswordProtectedModalOpenButtonClick()}};try{this.detectVersion(),this.setWindowEventListner(),this.urlChangeListener(),this.checkUrl(),this.nativeCapture.onEnded=()=>this.handleNativeScreenshotStreamEnded(),console.log("*** Staging Mode ON! ***")}catch(t){console.warn("Error in constructor: ",t),Zc("Error in constructor: ",t)}}get loadPlugin(){return this._loadPlugin}set loadPlugin(t){var e,i,o,n,s,r,a,l,c,d;this._loadPlugin=t,this.loadPlugin?(this.classList.add("visible"),null===(i=null===(e=null===document||void 0===document?void 0:document.body)||void 0===e?void 0:e.style)||void 0===i||i.setProperty("transform","none","important"),null===(s=null===(n=null===(o=null===document||void 0===document?void 0:document.body)||void 0===o?void 0:o.parentElement)||void 0===n?void 0:n.style)||void 0===s||s.setProperty("transform","none","important"),null===(a=null===(r=null===document||void 0===document?void 0:document.body)||void 0===r?void 0:r.style)||void 0===a||a.setProperty("perspective","none","important"),null===(d=null===(c=null===(l=null===document||void 0===document?void 0:document.body)||void 0===l?void 0:l.parentElement)||void 0===c?void 0:c.style)||void 0===d||d.setProperty("perspective","none","important")):this.classList.remove("visible")}get expanded(){return this._expanded}set expanded(t){this._expanded=t,this.expanded?this.classList.add("expanded"):this.classList.remove("expanded")}get isPlanExpired(){return this._isPlanExpired}set isPlanExpired(t){this._isPlanExpired=t,this.checkToEnableUpgradeButton(),this.applyVeltFeatureGates()}get apiKey(){return this._apiKey}set apiKey(t){this._apiKey=t,this.onApiKeyChange(),Wc({apiKey:this.apiKey}),this.checkUrl()}get projectId(){return this._projectId}set projectId(t){this._projectId=t,this.checkUrl()}get projectVersionKey(){return this._projectVersionKey}set projectVersionKey(t){try{this._projectVersionKey=t,this.projectVersionKey&&Tc(Vt,this.projectVersionKey,!1,"sessionStorage"),this.exitReviewModeCalled||this.detectVersion()}catch(t){console.warn("Error in set projectVersionKey: ",t),Zc("Error in set projectVersionKey: ",t)}}get autoLocation(){return this._autoLocation}set autoLocation(t){this._autoLocation="true"===t||!0===t}get menuOpenedId(){return this._menuOpenedId}set menuOpenedId(t){this._menuOpenedId=t,this.menuOpenedId?this.addWindowClickEventListener():this.removeWindowClickEventListener()}get isUserGlobalContact(){return this._isUserGlobalContact}set isUserGlobalContact(t){this._isUserGlobalContact=t,this.checkToEnableUpgradeButton()}get privateCommentModeEnabled(){return this._privateCommentModeEnabled}set privateCommentModeEnabled(t){this._privateCommentModeEnabled=t,this.darkMode=!!this.privateCommentModeEnabled}get customerMetadata(){return this._customerMetadata}set customerMetadata(t){this._customerMetadata=t,this.setLogos()}get documentMetadata(){return this._documentMetadata}set documentMetadata(t){this._documentMetadata=t}get darkMode(){return this._darkMode}set darkMode(t){this._darkMode=t,this.setLogos()}get queryParamsComments(){return this._queryParamsComments}set queryParamsComments(t){this._queryParamsComments=t,this.setQueryParamsCommentsInSdk()}get usePageTitleAsLocationName(){return this._usePageTitleAsLocationName}set usePageTitleAsLocationName(t){this._usePageTitleAsLocationName=t}get totalViews(){return this._totalViews}set totalViews(t){this._totalViews=t,this.totalViewsCount=Object.keys(this.totalViews||{}).length}get sidebarV2Enabled(){return function(t){const e=!!t&&xt.includes(t);try{const t=sessionStorage.getItem(yt);if("true"===t)return!0;if("false"===t)return!1}catch{}return!e}(this.apiKey)}get canToggleSidebarVersion(){return!0}get veltProxyEnabled(){return function(t){const e=!!t&&Ct.includes(t);try{const t=null===localStorage||void 0===localStorage?void 0:localStorage.getItem(bt);if("true"===t)return!0;if("false"===t)return!1}catch(t){}return!e}(this.apiKey)}connectedCallback(){super.connectedCallback(),this.getAttribute("apiKey")&&!this.getAttribute("projectId")&&(this.projectId=xc(kc(window.location.origin))+""),this.expanded=!0,this.setAttribute("data-velt-comment-disabled","true"),this.style.zIndex="2147483647",this.nativeScreenshotDenied="denied"===_c(ne,!1,"sessionStorage"),this.ensureAddCommentAnnotationSubscription(),this.setupPreviewProxySuggestionReadOnlyGuard(),this.applyPreviewProxyReadOnlyStyles(),setTimeout((()=>{if(!this.superflowToolbarMoved){this.superflowToolbarMoved=!0,document.body.appendChild(this);const t=document.querySelector(".cdk-overlay-container");t&&document.body.appendChild(t)}}),5e3);const t=document.createElement("style");t.innerHTML='\n body[data-velt-ongoing-recording="screen"] superflow-toolbar { display: none !important; }\n ',document.head.appendChild(t),this.addStyles(),setTimeout((()=>{const t=document.querySelectorAll('script[src*="snippyly.min.js"]');(null==t?void 0:t.length)>1&&(console.warn("Multiple superflow scripts installed."),Jc(vt.Events.DUPLICATE_SCRIPT_INSTALLED))}),1e3)}updated(t){try{if(super.updated(t),t.has("showContentWarningSidebar")){this.setCommentSidebarVisibility(this.showContentWarningSidebar);const e=t.get("showContentWarningSidebar");this.showContentWarningSidebar?Tc(oe,"true",!1,"sessionStorage"):!0===e&&Ic(oe,"sessionStorage")}}catch(t){console.warn("Error in updated: ",t)}}disconnectedCallback(){try{super.disconnectedCallback(),queueMicrotask((()=>{var t,e;try{if(this.isConnected)return void this.logCaptureTrigger("disconnect teardown skipped: element moved, not removed");this.logCaptureTrigger("disconnect teardown: element removed, releasing stream + subscription"),this.nativeCapture.dispose(),this.nativeScreenshotEnabled=!1,this.capturingScreenshot=!1,this.pendingScreenshotCount=0,this.restoreSdkScreenshot(),null===(e=null===(t=this.addCommentAnnotationSubscription)||void 0===t?void 0:t.unsubscribe)||void 0===e||e.call(t),this.addCommentAnnotationSubscription=void 0,this.addCommentAnnotationSubscribedEl=void 0,this.removePreviewProxyReadOnlyStyles()}catch(t){console.warn("Error in disconnectedCallback teardown: ",t)}}))}catch(t){console.warn("Error in disconnectedCallback: ",t)}}async detectToolbarEnabled(){try{if(this.projectId&&this.apiKey){this.toolbarEnabledApiCalled=!0;const t=document.location.toString();this.isDriveOrPreviewHost(t)?this.toolbarEnabled=!0:this.toolbarEnabled=await ed(this.apiKey,this.projectId,t),this.toolbarEnabled||Jc(vt.Events.TOOLBAR_DISABLED)}}catch(t){console.warn("Error in detectToolbarEnabled: ",t),Zc("Error in detectToolbarEnabled: ",t)}}get canShowPrivateCommentToggle(){return this.hasPrivateCommentsAccess&&this.isPrivateCommentsEnabledOnWorkspace}render(){var t,e,i,o,n,s,r,a,l,c,d,h,u,p,v,f,g,m,w,y;return this.loadPlugin&&this.toolbarEnabled?this.projectDeleted||this.snippylyUser&&!this.loading&&null!==this.isPlanExpired?L`
4986
4737
  <div class="snippyly-plugin-container" part="superflow-toolbar-container">
4987
4738
  ${this.disableCommentModeButton()}
4988
4739
  ${this.capturingScreenshot?L`<div class="sf-screenshot-capturing-banner">
4989
4740
  <span class="sf-screenshot-capturing-spinner"></span>
4990
- ${fd("Capturing screenshot…")}
4741
+ ${md("Capturing screenshot…")}
4991
4742
  </div>`:null}
4992
4743
  ${!this.capturingScreenshot&&this.nativeScreenshotDenied&&!this.nativeScreenshotEnabled&&this.canUseNativeScreenshot()?L`<div class="sf-screenshot-denied-banner">
4993
4744
  <span class="sf-screenshot-denied-icon">!</span>
4994
- ${fd("Screenshots off — enable via the ⋯ menu")}
4745
+ ${md("Screenshots off — enable via the ⋯ menu")}
4995
4746
  </div>`:null}
4996
4747
  <div class="toolbar ${ht({expanded:this.expanded,"add-comment-mode":this.addCommentMode,"private-comment-mode":!!this.privateCommentModeEnabled})}" @resize=${this.checkToolbarPosition()}
4997
4748
  @mousemove=${t=>this.toolbarMouseMove(t)}
@@ -5009,7 +4760,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5009
4760
  </div>
5010
4761
 
5011
4762
  ${!(null===(t=this.snippylyUser)||void 0===t?void 0:t.isGuest)&&!(null===(e=this.snippylyUser)||void 0===e?void 0:e.name)||(null===(i=this.snippylyUser)||void 0===i?void 0:i.isGuest)&&!this.guestUserNameUpdated?L`
5012
- <div class="toolbar-section snippyly-logo ${ht({"d-xs-none":this.expanded,"d-none":this.addCommentMode})}" @click=${()=>{Kc(vt.Events.TOOLBAR_NOTIFICATION_CLICKED),this.openGuestModeNameModel()}}>
4763
+ <div class="toolbar-section snippyly-logo ${ht({"d-xs-none":this.expanded,"d-none":this.addCommentMode})}" @click=${()=>{Jc(vt.Events.TOOLBAR_NOTIFICATION_CLICKED),this.openGuestModeNameModel()}}>
5013
4764
 
5014
4765
  <div class="notification-container">
5015
4766
  <div class="notification">
@@ -5031,7 +4782,77 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5031
4782
 
5032
4783
  <!-- Below features should only be allowed if user role is available -->
5033
4784
 
5034
- ${this.snippylyUserRole&&!this.isPlanExpired&&!this.allFeatureDisabled&&(!this.passwordProtected||this.passwordProtected&&this.isPasswordValid)?L`
4785
+ ${!this.snippylyUserRole||this.isPlanExpired||this.planLimitLocked||this.projectDeleted||this.allFeatureDisabled||!(!this.passwordProtected||this.passwordProtected&&this.isPasswordValid)?L`
4786
+ ${this.isPlanExpired?L`
4787
+ <div class="tooltip">
4788
+ <div class="tooltiptext">
4789
+ ${this.isUserGlobalContact?L`Your current plan has <br/> expired, please renew <br/> plan to continue.`:L`Your current plan has expired, <br/> please contact admin.`}
4790
+ </div>
4791
+ <div class="s-alert-btn">
4792
+ <div class='error-container'>
4793
+ <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4794
+ <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
4795
+ </svg>
4796
+ <div class="error-message">Expired</div>
4797
+ </div>
4798
+ ${this.isUserGlobalContact?L`
4799
+ <div class="s-cta-btn" @click=${()=>this.onUpgradePlanClick()}>
4800
+ Renew Plan
4801
+ </div>
4802
+ `:null}
4803
+ </div>
4804
+ </div>
4805
+ `:null}
4806
+ ${this.projectDeleted?L`
4807
+ <div class="tooltip">
4808
+ <div class="tooltiptext">
4809
+ ${md("This project no longer exists in Superflow. It may have been deleted.")}
4810
+ </div>
4811
+ <div class="s-alert-btn danger">
4812
+ <div class='error-container'>
4813
+ ${this.getAlertIcon()}
4814
+ <div class="error-message">${md("Project not found")}</div>
4815
+ </div>
4816
+ <div class="s-cta-btn" @click=${()=>this.goToAdminPortalDashboard()}>
4817
+ ${md("Open Superflow")}
4818
+ </div>
4819
+ </div>
4820
+ </div>
4821
+ `:null}
4822
+ ${!this.planLimitLocked||this.projectDeleted||this.isPlanExpired?null:L`
4823
+ <div class="tooltip">
4824
+ <div class="tooltiptext">
4825
+ ${this.isUserGlobalContact?md("This workspace is over its plan limits. Comments are paused until the plan is updated."):md("Ask your workspace admin to update the plan.")}
4826
+ </div>
4827
+ <div class="s-alert-btn danger">
4828
+ <div class='error-container'>
4829
+ ${this.getAlertIcon()}
4830
+ <div class="error-message">${md("Limit Reached")}</div>
4831
+ </div>
4832
+ ${this.isUserGlobalContact?L`
4833
+ <div class="s-cta-btn" @click=${()=>this.onUpgradePlanClick()}>
4834
+ ${md("Upgrade")}
4835
+ </div>
4836
+ `:null}
4837
+ </div>
4838
+ </div>
4839
+ `}
4840
+ ${this.snippylyUserRole||this.projectDeleted||this.planLimitLocked?null:L`
4841
+ <div class="tooltip ${ht({"d-none":!this.expanded||this.addCommentMode})}">
4842
+ <div class="tooltiptext">
4843
+ ${this.snippylyUserRole?null:L`${md("You don't have access to this project.")} <br/> ${md("Please contact admin.")}`}
4844
+ </div>
4845
+ <div class="s-alert-btn">
4846
+ <div class='error-container'>
4847
+ <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4848
+ <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
4849
+ </svg>
4850
+ <div class="error-message">Request Access</div>
4851
+ </div>
4852
+ </div>
4853
+ </div>
4854
+ `}
4855
+ `:L`
5035
4856
  <!-- divider -->
5036
4857
  <div class="toolbar-section d-xs-none ${ht({"d-none":!this.expanded||this.addCommentMode})}">
5037
4858
  <div class="toolbar-divider"></div>
@@ -5082,11 +4903,11 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5082
4903
  </div>
5083
4904
  </div>`:null}
5084
4905
  <div class="action tooltip comment-tool-container">
5085
- <div class="tooltiptext">${this.readOnlyMode?fd("Open your site in a new tab to add comments"):this.allFeatureDisabled?fd("Commenting is disabled. Contact admin."):fd("Comment (C)")}</div>
4906
+ <div class="tooltiptext">${this.readOnlyMode?md("Open your site in a new tab to add comments"):this.allFeatureDisabled?md("Commenting is disabled. Contact admin."):md("Comment (C)")}</div>
5086
4907
  ${this.allFeatureDisabled||this.readOnlyMode||!this.showTourCommentTooltip?null:L`
5087
4908
  <div class="tour-tooltiptext" @click=${()=>this.onTourCommentTooltipClick()}>
5088
- <div class="tour-tooltip-content">${fd(this.firstCommentNudge?"Add your first comment":"Click to add comments on this page.")}</div>
5089
- <button class="tour-tooltip-action" @click=${()=>this.onTourCommentTooltipClick()}>${fd("Ok")}</button>
4909
+ <div class="tour-tooltip-content">${md(this.firstCommentNudge?"Add your first comment":"Click to add comments on this page.")}</div>
4910
+ <button class="tour-tooltip-action" @click=${()=>this.onTourCommentTooltipClick()}>${md("Ok")}</button>
5090
4911
  </div>
5091
4912
  `}
5092
4913
  ${this.allFeatureDisabled||this.readOnlyMode?L`
@@ -5104,7 +4925,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5104
4925
  `}
5105
4926
  </div>
5106
4927
  <div class="action tooltip ${ht({"d-none":this.addCommentMode})}">
5107
- <div class="tooltiptext">${this.allFeatureDisabled?fd("Arrow feature is disabled. Contact admin."):fd("Arrow")}</div>
4928
+ <div class="tooltiptext">${this.allFeatureDisabled?md("Arrow feature is disabled. Contact admin."):md("Arrow")}</div>
5108
4929
  ${this.allFeatureDisabled?L`
5109
4930
  <div class="custom-tool">
5110
4931
  <div class="action">
@@ -5122,12 +4943,12 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5122
4943
  `}
5123
4944
  </div>
5124
4945
  <div class="tooltip cursor-pointer hide-huddle-tool ${ht({"d-none":this.addCommentMode})}">
5125
- <div class="tooltiptext">${fd("Live Huddle")}</div>
4946
+ <div class="tooltiptext">${md("Live Huddle")}</div>
5126
4947
  <velt-huddle-tool type="all"></velt-huddle-tool>
5127
4948
  </div>
5128
4949
  ${this.staging&&!this.addCommentMode?L`
5129
4950
  <div class="tooltip cursor-pointer">
5130
- <div class="tooltiptext">${fd("Recording")}</div>
4951
+ <div class="tooltiptext">${md("Recording")}</div>
5131
4952
  <velt-recorder-tool type="all"></velt-recorder-tool>
5132
4953
  </div>
5133
4954
  `:null}
@@ -5143,65 +4964,29 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5143
4964
  <div class="toolbar-section comment-viewmode-section ${ht({"d-none":!this.expanded||this.addCommentMode})}">
5144
4965
  <div class="toolbar-actions1">
5145
4966
  <div class="tooltip">
5146
- <div class="tooltiptext">${fd("Open Comments")}</div>
4967
+ <div class="tooltiptext">${md("Open Comments")}</div>
5147
4968
  <velt-sidebar-button shadow-dom="false"></velt-sidebar-button>
5148
4969
  </div>
5149
4970
  ${this.allFeatureDisabled||"Admin"!==this.snippylyUserRole?null:L`
5150
4971
  ${this.hasAgentAccess?L`
5151
4972
  <div class="tooltip">
5152
- <div class="tooltiptext">${fd("Agent Comments")}</div>
4973
+ <div class="tooltiptext">${md("Agent Comments")}</div>
5153
4974
  <div class="content-warnings-button ${ht({"has-warnings":this.hasContentWarnings})}" @click=${()=>this.onContentWarningsButtonClick()}>
5154
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5155
- <path d="M12.0003 10.2329V13.8332M12.0003 16.5334H12.0093M10.5268 5.36441L3.23087 17.546C3.08046 17.8064 3.00087 18.1017 3.00001 18.4025C2.99915 18.7033 3.07705 18.999 3.22596 19.2604C3.37487 19.5217 3.5896 19.7395 3.8488 19.8921C4.108 20.0446 4.40263 20.1267 4.70338 20.1301H19.2971C19.5978 20.1266 19.8922 20.0445 20.1513 19.892C20.4104 19.7395 20.625 19.5218 20.7739 19.2606C20.9228 18.9994 21.0007 18.7038 21 18.4032C20.9992 18.1025 20.9198 17.8073 20.7697 17.5469L13.4737 5.36351C13.3202 5.11015 13.1039 4.90064 12.8458 4.75524C12.5877 4.60984 12.2965 4.53345 12.0003 4.53345C11.704 4.53345 11.4128 4.60984 11.1547 4.75524C10.8966 4.90064 10.6803 5.11015 10.5268 5.36351V5.36441Z" stroke="currentColor" stroke-width="1.80014" stroke-linecap="round" stroke-linejoin="round"/>
5156
- </svg>
5157
- ${this.hasContentWarnings?L`<span class="content-warnings-count">${this.getContentWarningsDisplayCount()}</span>`:null}
5158
- </div>
5159
- </div>
5160
- `:null}
5161
- `}
5162
- </div>
5163
- </div>
5164
-
5165
- <!-- divider -->
5166
- <div class="toolbar-section ${ht({"d-none":!this.expanded||this.addCommentMode})}">
5167
- <div class="toolbar-divider"></div>
5168
- </div>`:L`
5169
- ${this.isPlanExpired?L`
5170
- <div class="tooltip">
5171
- <div class="tooltiptext">
5172
- ${this.isUserGlobalContact?L`Your current plan has <br/> expired, please renew <br/> plan to continue.`:L`Your current plan has expired, <br/> please contact admin.`}
5173
- </div>
5174
- <div class="s-alert-btn">
5175
- <div class='error-container'>
5176
- <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5177
- <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
5178
- </svg>
5179
- <div class="error-message">Expired</div>
5180
- </div>
5181
- ${this.isUserGlobalContact?L`
5182
- <div class="s-cta-btn" @click=${()=>this.onUpgradePlanClick()}>
5183
- Renew Plan
5184
- </div>
5185
- `:null}
4975
+ <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
4976
+ <path d="M12.0003 10.2329V13.8332M12.0003 16.5334H12.0093M10.5268 5.36441L3.23087 17.546C3.08046 17.8064 3.00087 18.1017 3.00001 18.4025C2.99915 18.7033 3.07705 18.999 3.22596 19.2604C3.37487 19.5217 3.5896 19.7395 3.8488 19.8921C4.108 20.0446 4.40263 20.1267 4.70338 20.1301H19.2971C19.5978 20.1266 19.8922 20.0445 20.1513 19.892C20.4104 19.7395 20.625 19.5218 20.7739 19.2606C20.9228 18.9994 21.0007 18.7038 21 18.4032C20.9992 18.1025 20.9198 17.8073 20.7697 17.5469L13.4737 5.36351C13.3202 5.11015 13.1039 4.90064 12.8458 4.75524C12.5877 4.60984 12.2965 4.53345 12.0003 4.53345C11.704 4.53345 11.4128 4.60984 11.1547 4.75524C10.8966 4.90064 10.6803 5.11015 10.5268 5.36351V5.36441Z" stroke="currentColor" stroke-width="1.80014" stroke-linecap="round" stroke-linejoin="round"/>
4977
+ </svg>
4978
+ ${this.hasContentWarnings?L`<span class="content-warnings-count">${this.getContentWarningsDisplayCount()}</span>`:null}
5186
4979
  </div>
5187
4980
  </div>
5188
4981
  `:null}
5189
- ${this.snippylyUserRole?null:L`
5190
- <div class="tooltip ${ht({"d-none":!this.expanded||this.addCommentMode})}">
5191
- <div class="tooltiptext">
5192
- ${this.snippylyUserRole?null:L`${fd("You don't have access to this project.")} <br/> ${fd("Please contact admin.")}`}
5193
- </div>
5194
- <div class="s-alert-btn">
5195
- <div class='error-container'>
5196
- <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5197
- <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
5198
- </svg>
5199
- <div class="error-message">Request Access</div>
5200
- </div>
5201
- </div>
5202
- </div>
5203
- `}
5204
- `}
4982
+ `}
4983
+ </div>
4984
+ </div>
4985
+
4986
+ <!-- divider -->
4987
+ <div class="toolbar-section ${ht({"d-none":!this.expanded||this.addCommentMode})}">
4988
+ <div class="toolbar-divider"></div>
4989
+ </div>`}
5205
4990
 
5206
4991
  ${this.allFeatureDisabled?L`
5207
4992
  <div class="s-alert-btn">
@@ -5235,7 +5020,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5235
5020
  <div class="toolbar-actions2">
5236
5021
  ${this.isPlanExpired?null:L`
5237
5022
  <div class="action tooltip cursor-pointer d-sm-none user-invite-tool-container" @click=${()=>this.onUserInviteToolClick()}>
5238
- <div class="tooltiptext">${fd("Share")}</div>
5023
+ <div class="tooltiptext">${md("Share")}</div>
5239
5024
  <svg width="20" height="20" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5240
5025
  <path d="M7.25016 8.91671L12.7502 6.08337M7.25016 11.0834L12.7502 13.9167M2.5 10C2.5 10.663 2.76339 11.2989 3.23223 11.7678C3.70107 12.2366 4.33696 12.5 5 12.5C5.66304 12.5 6.29893 12.2366 6.76777 11.7678C7.23661 11.2989 7.5 10.663 7.5 10C7.5 9.33696 7.23661 8.70107 6.76777 8.23223C6.29893 7.76339 5.66304 7.5 5 7.5C4.33696 7.5 3.70107 7.76339 3.23223 8.23223C2.76339 8.70107 2.5 9.33696 2.5 10ZM12.5 5C12.5 5.66304 12.7634 6.29893 13.2322 6.76777C13.7011 7.23661 14.337 7.5 15 7.5C15.663 7.5 16.2989 7.23661 16.7678 6.76777C17.2366 6.29893 17.5 5.66304 17.5 5C17.5 4.33696 17.2366 3.70107 16.7678 3.23223C16.2989 2.76339 15.663 2.5 15 2.5C14.337 2.5 13.7011 2.76339 13.2322 3.23223C12.7634 3.70107 12.5 4.33696 12.5 5ZM12.5 15C12.5 15.663 12.7634 16.2989 13.2322 16.7678C13.7011 17.2366 14.337 17.5 15 17.5C15.663 17.5 16.2989 17.2366 16.7678 16.7678C17.2366 16.2989 17.5 15.663 17.5 15C17.5 14.337 17.2366 13.7011 16.7678 13.2322C16.2989 12.7634 15.663 12.5 15 12.5C14.337 12.5 13.7011 12.7634 13.2322 13.2322C12.7634 13.7011 12.5 14.337 12.5 15Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5241
5026
  </svg>
@@ -5243,7 +5028,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5243
5028
  `}
5244
5029
  ${(null===(o=this.snippylyUser)||void 0===o?void 0:o.isGuest)&&this.allowGuestModeSignIn?L`
5245
5030
  <div class="s-guest-user-sign-in-button" @click=${()=>this.loginWithGoogle()}>
5246
- <p>${fd("Sign in")}</p>
5031
+ <p>${md("Sign in")}</p>
5247
5032
  </div>
5248
5033
  `:L`
5249
5034
  <div class="action">
@@ -5262,7 +5047,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5262
5047
  ${this.getLogoMark()}
5263
5048
  </div>
5264
5049
  <a href="https://www.usesuperflow.com/features?ref=toolbar" target="_blank">
5265
- ${fd("Powered by Superflow")}
5050
+ ${md("Powered by Superflow")}
5266
5051
  </a>
5267
5052
  </div>
5268
5053
  <hr />
@@ -5271,7 +5056,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5271
5056
  <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
5272
5057
  <path d="M12.75 5.25L5.25 12.75M12.75 5.25H6M12.75 5.25V12" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5273
5058
  </svg>
5274
- <p>${fd("View project")}</p>
5059
+ <p>${md("View project")}</p>
5275
5060
  </div>
5276
5061
  <hr />
5277
5062
  `:L``}
@@ -5286,7 +5071,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5286
5071
  d="M15.75 9C13.95 12 11.7 13.5 9 13.5C6.3 13.5 4.05 12 2.25 9C4.05 6 6.3 4.5 9 4.5C11.7 4.5 13.95 6 15.75 9Z"
5287
5072
  stroke="#777E91" stroke-width="1.25" stroke-linecap="round" stroke-linejoin="round" />
5288
5073
  </svg>
5289
- <p>${fd(this.totalViewsCount+" Total Views")}</p>
5074
+ <p>${md(this.totalViewsCount+" Total Views")}</p>
5290
5075
  </div>
5291
5076
  </velt-view-analytics>
5292
5077
  `:L``}
@@ -5306,7 +5091,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5306
5091
  <path d="M5.25 12.75V12.7575M5.25 5.25V5.2575M12.75 5.25V5.2575M12.75 10.5H10.5V12.75M15 10.5V10.5075M10.5 15H12.75M12.75 12.75H15V15M3 3.75C3 3.55109 3.07902 3.36032 3.21967 3.21967C3.36032 3.07902 3.55109 3 3.75 3H6.75C6.94891 3 7.13968 3.07902 7.28033 3.21967C7.42098 3.36032 7.5 3.55109 7.5 3.75V6.75C7.5 6.94891 7.42098 7.13968 7.28033 7.28033C7.13968 7.42098 6.94891 7.5 6.75 7.5H3.75C3.55109 7.5 3.36032 7.42098 3.21967 7.28033C3.07902 7.13968 3 6.94891 3 6.75V3.75ZM10.5 3.75C10.5 3.55109 10.579 3.36032 10.7197 3.21967C10.8603 3.07902 11.0511 3 11.25 3H14.25C14.4489 3 14.6397 3.07902 14.7803 3.21967C14.921 3.36032 15 3.55109 15 3.75V6.75C15 6.94891 14.921 7.13968 14.7803 7.28033C14.6397 7.42098 14.4489 7.5 14.25 7.5H11.25C11.0511 7.5 10.8603 7.42098 10.7197 7.28033C10.579 7.13968 10.5 6.94891 10.5 6.75V3.75ZM3 11.25C3 11.0511 3.07902 10.8603 3.21967 10.7197C3.36032 10.579 3.55109 10.5 3.75 10.5H6.75C6.94891 10.5 7.13968 10.579 7.28033 10.7197C7.42098 10.8603 7.5 11.0511 7.5 11.25V14.25C7.5 14.4489 7.42098 14.6397 7.28033 14.7803C7.13968 14.921 6.94891 15 6.75 15H3.75C3.55109 15 3.36032 14.921 3.21967 14.7803C3.07902 14.6397 3 14.4489 3 14.25V11.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5307
5092
  </svg>
5308
5093
 
5309
- <p>${fd("Open in Mobile")}</p>
5094
+ <p>${md("Open in Mobile")}</p>
5310
5095
  </div>
5311
5096
  ${this.canToggleSidebarVersion?L`
5312
5097
  <div class="menu-point" @click=${()=>this.toggleSidebarV2()}>
@@ -5316,7 +5101,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5316
5101
  @click=${t=>t.stopPropagation()}
5317
5102
  @change=${()=>this.toggleSidebarV2()}
5318
5103
  />
5319
- <p>${fd("Try V2 Sidebar (beta)")}</p>
5104
+ <p>${md("Try V2 Sidebar (beta)")}</p>
5320
5105
  </div>
5321
5106
  `:""}
5322
5107
  <div class="menu-point" @click=${()=>this.toggleCommentSidebarVisibility()}>
@@ -5326,7 +5111,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5326
5111
  @click=${t=>t.stopPropagation()}
5327
5112
  @change=${()=>this.toggleCommentSidebarVisibility()}
5328
5113
  />
5329
- <p>${fd("Show Agent Comments in Sidebar & Page")}</p>
5114
+ <p>${md("Show Agent Comments in Sidebar & Page")}</p>
5330
5115
  </div>
5331
5116
  ${this.canUseNativeScreenshot()?L`
5332
5117
  <div class="menu-point tooltip native-screenshot-menu-point" @click=${()=>this.toggleNativeScreenshot()}>
@@ -5336,10 +5121,10 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5336
5121
  @click=${t=>t.stopPropagation()}
5337
5122
  @change=${()=>this.toggleNativeScreenshot()}
5338
5123
  />
5339
- <p>${fd("Use Local Screenshot")}</p>
5124
+ <p>${md("Use Local Screenshot")}</p>
5340
5125
  <div class="tooltiptext native-screenshot-tooltiptext">
5341
- <span>${fd("Useful for capturing pages that are gated behind a login.")}</span>
5342
- <span>${fd("Uses your browser's screen sharing permission to take the screenshot.")}</span>
5126
+ <span>${md("Useful for capturing pages that are gated behind a login.")}</span>
5127
+ <span>${md("Uses your browser's screen sharing permission to take the screenshot.")}</span>
5343
5128
  </div>
5344
5129
  </div>
5345
5130
  `:""}
@@ -5351,10 +5136,10 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5351
5136
  @click=${t=>t.stopPropagation()}
5352
5137
  @change=${()=>this.toggleVeltProxy()}
5353
5138
  />
5354
- <p>${fd("Use Secure Proxy")}</p>
5139
+ <p>${md("Use Secure Proxy")}</p>
5355
5140
  <div class="tooltiptext velt-proxy-tooltiptext">
5356
- <span>${fd("Routes Superflow's backend traffic through Superflow-owned domains.")}</span>
5357
- <span>${fd("Turn this off if your network blocks them. Reloads the page.")}</span>
5141
+ <span>${md("Routes Superflow's backend traffic through Superflow-owned domains.")}</span>
5142
+ <span>${md("Turn this off if your network blocks them. Reloads the page.")}</span>
5358
5143
  </div>
5359
5144
  </div>
5360
5145
  `:""}
@@ -5364,7 +5149,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5364
5149
  <path fill-rule="evenodd" clip-rule="evenodd" d="M8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z" fill="#777E91"/>
5365
5150
  </svg>
5366
5151
 
5367
- <p>${fd("Exit Review Mode")}</p>
5152
+ <p>${md("Exit Review Mode")}</p>
5368
5153
  </div>
5369
5154
  ${this.customLoginEnabledLocally||(null===(h=this.snippylyUser)||void 0===h?void 0:h.isGuest)?null:L`
5370
5155
  <div class="menu-point" @click=${()=>this.signOutUser()}>
@@ -5372,7 +5157,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5372
5157
  <path fill-rule="evenodd" clip-rule="evenodd" d="M8.27201 11.9903C8.68593 11.9746 9.03414 12.2975 9.04977 12.7114C9.085 13.6446 9.13447 14.3257 9.18312 14.814C9.23103 15.2949 9.52134 15.5842 9.92603 15.6337C10.4032 15.692 11.0764 15.7397 12.0001 15.7397C12.9239 15.7397 13.597 15.692 14.0742 15.6337C14.4787 15.5842 14.7692 15.2947 14.8171 14.8137C14.9074 13.9073 15.0001 12.3414 15.0001 9.73975C15.0001 7.13813 14.9074 5.57215 14.8171 4.66575C14.7692 4.18474 14.4787 3.89527 14.0742 3.84582C13.597 3.78749 12.9239 3.73974 12.0001 3.73974C11.0764 3.73974 10.4032 3.78748 9.92602 3.84582C9.52134 3.89529 9.23103 4.18463 9.18312 4.66552C9.13447 5.15383 9.085 5.8349 9.04977 6.76804C9.03414 7.18196 8.68593 7.50484 8.27201 7.48921C7.85809 7.47359 7.53521 7.12537 7.55084 6.71145C7.58699 5.75368 7.63826 5.04132 7.69051 4.51683C7.80035 3.4142 8.5691 2.50052 9.74402 2.3569C10.2909 2.29004 11.0257 2.23974 12.0001 2.23974C12.9745 2.23974 13.7093 2.29005 14.2562 2.35691C15.4312 2.50055 16.1999 3.41466 16.3097 4.51706C16.4064 5.48776 16.5001 7.1061 16.5001 9.73975C16.5001 12.3734 16.4064 13.9917 16.3097 14.9624C16.1999 16.0648 15.4313 16.9789 14.2562 17.1226C13.7093 17.1894 12.9745 17.2397 12.0001 17.2397C11.0257 17.2397 10.2909 17.1894 9.74402 17.1226C8.56911 16.979 7.80035 16.0653 7.69051 14.9627C7.63826 14.4382 7.58699 13.7258 7.55084 12.768C7.53521 12.3541 7.85809 12.0059 8.27201 11.9903Z" fill="#FF7162"/>
5373
5158
  <path fill-rule="evenodd" clip-rule="evenodd" d="M5.40533 11.8344C5.69822 12.1273 5.69822 12.6022 5.40533 12.8951C5.11244 13.188 4.63756 13.188 4.34467 12.8951L1.71967 10.2701C1.42678 9.97718 1.42678 9.50231 1.71967 9.20942L4.34467 6.58442C4.63756 6.29152 5.11244 6.29152 5.40533 6.58442C5.69822 6.87731 5.69822 7.35218 5.40533 7.64508L4.06066 8.98975H11.25C11.6642 8.98975 12 9.32553 12 9.73975C12 10.154 11.6642 10.4897 11.25 10.4897L4.06066 10.4897L5.40533 11.8344Z" fill="#FF7162"/>
5374
5159
  </svg>
5375
- <p>${fd("Sign Out")}</p>
5160
+ <p>${md("Sign Out")}</p>
5376
5161
  </div>
5377
5162
  `}
5378
5163
  </div>
@@ -5402,13 +5187,13 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5402
5187
  <div class="s-modal" @click=${t=>null==t?void 0:t.stopPropagation()}>
5403
5188
  <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
5404
5189
  <div class="s-modal-text">
5405
- <h1>${fd("You’re a SuperFlow installation wizard!")}</h1>
5190
+ <h1>${md("You’re a SuperFlow installation wizard!")}</h1>
5406
5191
  <p>
5407
- ${fd("Get ready to drop your first comment!")} <br/>
5408
- ${fd("But before you do that, you definitely deserve a high five!")}
5192
+ ${md("Get ready to drop your first comment!")} <br/>
5193
+ ${md("But before you do that, you definitely deserve a high five!")}
5409
5194
  </p>
5410
5195
  </div>
5411
- <div class="s-button s-primary" @click=${()=>this.onboardingNextClick()}>${fd("Next")}</div>
5196
+ <div class="s-button s-primary" @click=${()=>this.onboardingNextClick()}>${md("Next")}</div>
5412
5197
  </div>
5413
5198
  </div>
5414
5199
  `:L``}
@@ -5417,13 +5202,13 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5417
5202
  <div class="s-modal" @click=${t=>null==t?void 0:t.stopPropagation()}>
5418
5203
  <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
5419
5204
  <div class="s-modal-text">
5420
- <h1>${fd("Try Superflow using the toolbar below.")}</h1>
5205
+ <h1>${md("Try Superflow using the toolbar below.")}</h1>
5421
5206
  <p>
5422
- ${fd("Get ready to drop your first comment!")} <br/>
5423
- ${fd("But before you do that, you definitely deserve a high five!")}
5207
+ ${md("Get ready to drop your first comment!")} <br/>
5208
+ ${md("But before you do that, you definitely deserve a high five!")}
5424
5209
  </p>
5425
5210
  </div>
5426
- <div class="s-button s-primary" @click=${()=>this.onLiveDemoModalNextClick()}>${fd("Done")}</div>
5211
+ <div class="s-button s-primary" @click=${()=>this.onLiveDemoModalNextClick()}>${md("Done")}</div>
5427
5212
  </div>
5428
5213
  </div>
5429
5214
  `:L``}
@@ -5433,11 +5218,11 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5433
5218
  <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
5434
5219
  <div class="s-modal-text">
5435
5220
  <h1>
5436
- ${fd("Sign in on the toolbar below and add")}<br/>
5437
- ${fd("comments on the design flaws.")}
5221
+ ${md("Sign in on the toolbar below and add")}<br/>
5222
+ ${md("comments on the design flaws.")}
5438
5223
  </h1>
5439
5224
  </div>
5440
- <div class="s-button s-primary" @click=${()=>this.onFigmaDemoModalNextClick()}>${fd("Done")}</div>
5225
+ <div class="s-button s-primary" @click=${()=>this.onFigmaDemoModalNextClick()}>${md("Done")}</div>
5441
5226
  </div>
5442
5227
  </div>
5443
5228
  `:L``}
@@ -5507,7 +5292,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5507
5292
  </g>
5508
5293
  </svg>
5509
5294
  `:null}
5510
- ${this.guestUserNameUpdateLoading?"":fd("Save")}
5295
+ ${this.guestUserNameUpdateLoading?"":md("Save")}
5511
5296
  </div>
5512
5297
  <div class="s-modal-link-text" @click=${()=>this.onGuestModeNameModalSkipButtonClick()}>Skip</div>
5513
5298
  </div>
@@ -5528,7 +5313,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5528
5313
  </div>
5529
5314
  <div class="s-modal-title">${null===(v=this.guestModeSignInModalConfig)||void 0===v?void 0:v.title}</div>
5530
5315
  <div class="s-modal-subtitle">${null===(f=this.guestModeSignInModalConfig)||void 0===f?void 0:f.description}</div>
5531
- <div class="s-button s-primary s-signin-button" @click=${()=>this.onGuestModeSignInModalSignInButtonClick()}>${fd("Sign in")}</div>
5316
+ <div class="s-button s-primary s-signin-button" @click=${()=>this.onGuestModeSignInModalSignInButtonClick()}>${md("Sign in")}</div>
5532
5317
  ${this.guestModeSignInModalConfig.showLeaveCommentButton?L`
5533
5318
  <div class="s-modal-link-text" @click=${t=>{this.closeGuestModeSignInModal(),this.openGuestModeNameModel(t)}}>Leave Comment Anonymously</div>
5534
5319
  `:L``}
@@ -5539,7 +5324,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5539
5324
  <div class="s-guest-mode-banner">
5540
5325
  <span>Notify your team about your comments by signing in.</span>
5541
5326
  <div class="s-guest-mode-banner-actions">
5542
- <button @click=${()=>this.onGuestModeBannerSignInButtonClick()}>${fd("Sign in")}</button>
5327
+ <button @click=${()=>this.onGuestModeBannerSignInButtonClick()}>${md("Sign in")}</button>
5543
5328
  <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="cursor-pointer" viewBox="0 0 16 16" @click=${()=>this.hideGuestModeSignInBanner()}>
5544
5329
  <path d="M2.146 2.854a.5.5 0 1 1 .708-.708L8 7.293l5.146-5.147a.5.5 0 0 1 .708.708L8.707 8l5.147 5.146a.5.5 0 0 1-.708.708L8 8.707l-5.146 5.147a.5.5 0 0 1-.708-.708L7.293 8 2.146 2.854Z"/>
5545
5330
  </svg>
@@ -5626,7 +5411,7 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5626
5411
  </g>
5627
5412
  </svg>
5628
5413
  `:null}
5629
- ${this.validatingPasswordLoading?"":fd("Submit")}
5414
+ ${this.validatingPasswordLoading?"":md("Submit")}
5630
5415
  </div>
5631
5416
  </div>
5632
5417
  ${this.showInvalidPassword?L`
@@ -5669,9 +5454,262 @@ class uc extends Qr{}uc.Encryptor=class extends uc{processBlock(t,e){const i=t,o
5669
5454
  .documentId=${this.documentId}
5670
5455
  .hasInviteAccess=${!0}
5671
5456
  .disableInvite=${!(this.snippylyUser&&!(null===(m=this.snippylyUser)||void 0===m?void 0:m.isGuest))}
5672
- .userSeatsExhausted=${!!(null===(y=null===(w=this.featureAccess)||void 0===w?void 0:w[cd.WorkspaceUserSeats])||void 0===y?void 0:y.hasUsageExhausted)}
5457
+ .userSeatsExhausted=${!!(null===(y=null===(w=this.featureAccess)||void 0===w?void 0:w[hd.WorkspaceUserSeats])||void 0===y?void 0:y.hasUsageExhausted)}
5673
5458
  @superflow-invite-modal-close=${this.closeInviteModal}
5674
5459
  @superflow-invite-modal-invite-success=${this.onInviteSuccess}
5675
5460
  ></superflow-invite-modal>
5676
5461
  `:""}
5677
- `:L``}}eh.PREVIEW_READONLY_CSS="\n velt-comment-dialog-suggestion-actions,\n velt-comment-dialog-suggestion-actions-internal,\n velt-comment-dialog-suggestion-action-accept,\n velt-comment-dialog-suggestion-action-accept-internal,\n velt-comment-dialog-suggestion-action-reject,\n velt-comment-dialog-suggestion-action-reject-internal,\n velt-comment-dialog-legacy-suggestion-action,\n velt-comment-dialog-legacy-suggestion-action-accept,\n velt-comment-dialog-legacy-suggestion-action-reject,\n .velt-suggestion-actions,\n .sf-accept-btn,\n .sf-reject-btn {\n display: none !important;\n }\n ",eh.PREVIEW_READONLY_STYLE_ATTR="data-sf-preview-readonly",eh.styles=[gd,md],th([nt()],eh.prototype,"loadPlugin",null),th([nt()],eh.prototype,"comments",void 0),th([nt()],eh.prototype,"commentElement",void 0),th([nt()],eh.prototype,"contactElement",void 0),th([nt()],eh.prototype,"rewriterElement",void 0),th([nt()],eh.prototype,"presenceElement",void 0),th([nt()],eh.prototype,"commentSubscription",void 0),th([nt()],eh.prototype,"selectionElement",void 0),th([nt()],eh.prototype,"viewsElement",void 0),th([nt()],eh.prototype,"docElement",void 0),th([nt()],eh.prototype,"addCommentMode",void 0),th([nt()],eh.prototype,"showTourCommentTooltip",void 0),th([nt()],eh.prototype,"firstCommentNudge",void 0),th([nt()],eh.prototype,"allFeatureDisabled",void 0),th([nt()],eh.prototype,"allFeatureRestricted",void 0),th([nt()],eh.prototype,"guestMode",void 0),th([nt()],eh.prototype,"_expanded",void 0),th([nt()],eh.prototype,"loading",void 0),th([nt()],eh.prototype,"signInError",void 0),th([nt()],eh.prototype,"snippylyUser",void 0),th([nt()],eh.prototype,"snippylyUserRole",void 0),th([nt()],eh.prototype,"_isPlanExpired",void 0),th([nt()],eh.prototype,"showOnboardingModal",void 0),th([nt()],eh.prototype,"embedMode",void 0),th([nt()],eh.prototype,"readOnlyMode",void 0),th([nt()],eh.prototype,"showLiveDemoModal",void 0),th([nt()],eh.prototype,"showFigmaDemoModal",void 0),th([nt()],eh.prototype,"showGuestModeSignInModal",void 0),th([nt()],eh.prototype,"guestModeSignInModalConfig",void 0),th([nt()],eh.prototype,"showGuestModeNameModal",void 0),th([nt()],eh.prototype,"guestModeSignInBannerVisible",void 0),th([nt()],eh.prototype,"guestUserNameInput",void 0),th([nt()],eh.prototype,"guestUserModelOpened",void 0),th([nt()],eh.prototype,"guestUserNameUpdated",void 0),th([nt()],eh.prototype,"guestUserNameUpdateLoading",void 0),th([ot()],eh.prototype,"apiKey",null),th([ot()],eh.prototype,"projectId",null),th([nt()],eh.prototype,"staging",void 0),th([ot()],eh.prototype,"projectVersionKey",null),th([nt()],eh.prototype,"projectVersion",void 0),th([nt()],eh.prototype,"version",void 0),th([ot()],eh.prototype,"veltVersion",void 0),th([ot()],eh.prototype,"autoLocation",null),th([nt()],eh.prototype,"_menuOpenedId",void 0),th([nt()],eh.prototype,"copyLinkTooltip",void 0),th([nt()],eh.prototype,"invalidApiKey",void 0),th([nt()],eh.prototype,"documentId",void 0),th([nt()],eh.prototype,"serverDocumentId",void 0),th([nt()],eh.prototype,"_isUserGlobalContact",void 0),th([nt()],eh.prototype,"location",void 0),th([nt()],eh.prototype,"qrCode",void 0),th([nt()],eh.prototype,"showQrCode",void 0),th([nt()],eh.prototype,"customLoginEnabledLocally",void 0),th([ot()],eh.prototype,"customLoginEnabled",void 0),th([nt()],eh.prototype,"providedUser",void 0),th([nt()],eh.prototype,"autoTranslation",void 0),th([nt()],eh.prototype,"addCommentCount",void 0),th([nt()],eh.prototype,"isSigningInUserAdmin",void 0),th([nt()],eh.prototype,"_privateCommentModeEnabled",void 0),th([nt()],eh.prototype,"superflowToolbarMoved",void 0),th([nt()],eh.prototype,"_customerMetadata",void 0),th([nt()],eh.prototype,"logoMark",void 0),th([nt()],eh.prototype,"wordMark",void 0),th([nt()],eh.prototype,"_darkMode",void 0),th([nt()],eh.prototype,"projectConfig",void 0),th([nt()],eh.prototype,"allowGuestModeSignIn",void 0),th([nt()],eh.prototype,"_queryParamsComments",void 0),th([nt()],eh.prototype,"_usePageTitleAsLocationName",void 0),th([nt()],eh.prototype,"toolbarEnabled",void 0),th([nt()],eh.prototype,"toolbarEnabledApiCalled",void 0),th([nt()],eh.prototype,"passwordProtected",void 0),th([nt()],eh.prototype,"isPasswordValid",void 0),th([nt()],eh.prototype,"password",void 0),th([nt()],eh.prototype,"validatingPasswordLoading",void 0),th([nt()],eh.prototype,"showPasswordProtectedModal",void 0),th([nt()],eh.prototype,"showInvalidPassword",void 0),th([nt()],eh.prototype,"skipGuestNameModal",void 0),th([nt()],eh.prototype,"_totalViews",void 0),th([nt()],eh.prototype,"totalViewsCount",void 0),th([nt()],eh.prototype,"inviteUrl",void 0),th([nt()],eh.prototype,"showModalOnceCommentIsModeIsOff",void 0),th([nt()],eh.prototype,"showInviteModal",void 0),th([nt()],eh.prototype,"featureAccess",void 0),th([nt()],eh.prototype,"hasAgentAccess",void 0),th([nt()],eh.prototype,"hasPrivateCommentsAccess",void 0),th([nt()],eh.prototype,"isPrivateCommentsEnabledOnWorkspace",void 0),th([nt()],eh.prototype,"hasContentWarnings",void 0),th([nt()],eh.prototype,"contentWarningsCount",void 0),th([nt()],eh.prototype,"showContentWarningSidebar",void 0),th([nt()],eh.prototype,"showAgentCommentsInSidebar",void 0),th([nt()],eh.prototype,"veltProxyToggleVisible",void 0),th([nt()],eh.prototype,"nativeScreenshotEnabled",void 0),th([nt()],eh.prototype,"nativeScreenshotDenied",void 0),th([nt()],eh.prototype,"capturingScreenshot",void 0),th([nt()],eh.prototype,"agentGroups",void 0),th([nt()],eh.prototype,"spellingSuggestionPagePathMap",void 0),th([nt()],eh.prototype,"grammarSuggestionPagePathMap",void 0),(t=>{if(customElements.get("superflow-toolbar")||customElements.get("snippyly-plugin"))return;const e={allow:["sdkUrl","windowVariables","snippylyPlugin"],loaders:{windowVariables:()=>{const t=null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_API_KEY;return{valid:!!t,type:"windowVariables",apiKey:t,staging:!!(null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_STAGING),projectVersionKey:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_PROJECT_VERSION_KEY,projectId:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_PROJECT_ID,autoLocation:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_AUTO_LOCATION,veltVersion:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_VELT_VERSION}},snippylyPlugin:()=>{const t=document.querySelector("snippyly-plugin");if(!t)return;const e=t.getAttribute("apiKey"),i=!!t.getAttribute("staging"),o=t.getAttribute("projectVersionKey"),n=t.getAttribute("projectId"),s=t.getAttribute("autoLocation"),r=t.getAttribute("veltVersion");return null==t||t.remove(),{valid:!!e,type:"snippylyPlugin",apiKey:e,staging:i,projectVersionKey:o,projectId:n,autoLocation:s,veltVersion:r}},sdkUrl:()=>{const t=document.getElementById("superflowToolbarScript");if(!t)return;const e=null==t?void 0:t.src,i=new URL(e).searchParams,o=i.has("apiKey")?i.get("apiKey"):void 0;return{valid:!!o,type:"sdkUrl",apiKey:o,staging:void 0,projectVersionKey:void 0,projectId:i.has("projectId")?i.get("projectId"):void 0,autoLocation:i.has("autoLocation")?i.get("autoLocation"):void 0,veltVersion:i.has("veltVersion")?i.get("veltVersion"):void 0}}},load:()=>{for(let t=0;t<e.allow.length;t++){const i=e.allow[t],o=e.loaders[i]();if(o&&o.valid)return o}}},i=()=>{try{const i=e.load();if(customElements.define("superflow-toolbar",t),i&&i.valid){(()=>{try{document.querySelectorAll("superflow-toolbar").forEach((t=>{t.remove()})),document.querySelectorAll("snippyly-plugin").forEach((t=>{t.remove()}))}catch(t){console.warn("Error in removeSuperflowToolbarTag: ",t)}})();const t={};return t.apiKey=i.apiKey,i.staging&&(t.staging="true"),i.projectVersionKey&&(t.projectVersionKey=i.projectVersionKey),i.projectId&&(t.projectId=i.projectId),(null==i?void 0:i.autoLocation)&&(t.autoLocation=i.autoLocation),(null==i?void 0:i.veltVersion)&&(t.veltVersion=i.veltVersion),void((t={})=>{try{const e=document.createElement("superflow-toolbar");Object.keys(t||{}).forEach((i=>{e.setAttribute(i,t[i])})),document.body.appendChild(e)}catch(t){console.warn("Error in loadSuperflowToolbarTag: ",t)}})(t)}}catch(t){console.warn("Error in initSuperflow: ",t)}};(null===document||void 0===document?void 0:document.body)?i():null===document||void 0===document||document.addEventListener("DOMContentLoaded",(()=>{i()}))})(eh);class ih extends X{}customElements.get("snippyly-plugin")||customElements.define("snippyly-plugin",ih);export{ih as SnippylyPlugin,eh as SuperflowToolbar};
5462
+ `:L`
5463
+ <div class="snippyly-plugin-container" part="superflow-toolbar-container">
5464
+ <div class="toolbar" id="smallToolbar"
5465
+ style="cursor: default; top: ${this._dragY}px; left: ${this._dragX}px;">
5466
+ <!-- <div class="toolbar-section">
5467
+ <svg class="toolbar-icon-arrow" viewBox="0 0 32 32" fill="none" xmlns="http://www.w3.org/2000/svg">
5468
+ <path fill-rule="evenodd" clip-rule="evenodd"
5469
+ d="M14.1607 12.4941C13.8353 12.8195 13.8353 13.3472 14.1607 13.6726L16.4882 16L14.1607 18.3274C13.8353 18.6528 13.8353 19.1805 14.1607 19.5059C14.4862 19.8314 15.0138 19.8314 15.3393 19.5059L18.2559 16.5893C18.5814 16.2638 18.5814 15.7362 18.2559 15.4107L15.3393 12.4941C15.0138 12.1686 14.4862 12.1686 14.1607 12.4941Z" />
5470
+ </svg>
5471
+ </div> -->
5472
+ <div class="toolbar-section">
5473
+ <div class="toolbar-logo">
5474
+ ${this.getLogoMark()}
5475
+ </div>
5476
+ </div>
5477
+ <div class="toolbar-section">
5478
+ <div class="toolbar-divider"></div>
5479
+ </div>
5480
+ ${this.snippylyUserRole&&!this.allFeatureDisabled?L`
5481
+ <div class="toolbar-section comment-viewmode-section ${ht({"d-none":!this.expanded})}">
5482
+ <div class="toolbar-actions1 ${ht({"d-none":!this.commentElement})}">
5483
+ <div class="tooltip">
5484
+ <div class="tooltiptext">${md("All Comments")}</div>
5485
+ <velt-sidebar-button sidebar-button-count-type="filter" shadow-dom="false"></velt-sidebar-button>
5486
+ </div>
5487
+ </div>
5488
+ <div class="toolbar-section ${ht({"d-none":!this.commentElement})}">
5489
+ <div class="toolbar-divider"></div>
5490
+ </div>
5491
+ </div>
5492
+ `:null}
5493
+ ${!this.customLoginEnabledLocally||this.loading?L`
5494
+ <div class="toolbar-section ${this.invalidApiKey?"d-none":""}" @click=${()=>this.loginWithGoogle()}>
5495
+ <a class="toolbar-button sign-in-button ${ht({loading:this.loading})}">
5496
+ ${this.loading?L`
5497
+ <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="16px" height="16px" viewBox="0 0 100 100" preserveAspectRatio="xMidYMid">
5498
+ <g transform="rotate(0 50 50)">
5499
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5500
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.9166666666666666s" repeatCount="indefinite"></animate>
5501
+ </rect>
5502
+ </g><g transform="rotate(30 50 50)">
5503
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5504
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.8333333333333334s" repeatCount="indefinite"></animate>
5505
+ </rect>
5506
+ </g><g transform="rotate(60 50 50)">
5507
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5508
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.75s" repeatCount="indefinite"></animate>
5509
+ </rect>
5510
+ </g><g transform="rotate(90 50 50)">
5511
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5512
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.6666666666666666s" repeatCount="indefinite"></animate>
5513
+ </rect>
5514
+ </g><g transform="rotate(120 50 50)">
5515
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5516
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5833333333333334s" repeatCount="indefinite"></animate>
5517
+ </rect>
5518
+ </g><g transform="rotate(150 50 50)">
5519
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5520
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.5s" repeatCount="indefinite"></animate>
5521
+ </rect>
5522
+ </g><g transform="rotate(180 50 50)">
5523
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5524
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.4166666666666667s" repeatCount="indefinite"></animate>
5525
+ </rect>
5526
+ </g><g transform="rotate(210 50 50)">
5527
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5528
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.3333333333333333s" repeatCount="indefinite"></animate>
5529
+ </rect>
5530
+ </g><g transform="rotate(240 50 50)">
5531
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5532
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.25s" repeatCount="indefinite"></animate>
5533
+ </rect>
5534
+ </g><g transform="rotate(270 50 50)">
5535
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5536
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.16666666666666666s" repeatCount="indefinite"></animate>
5537
+ </rect>
5538
+ </g><g transform="rotate(300 50 50)">
5539
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5540
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="-0.08333333333333333s" repeatCount="indefinite"></animate>
5541
+ </rect>
5542
+ </g><g transform="rotate(330 50 50)">
5543
+ <rect x="47" y="6" rx="3" ry="12" width="6" height="24" fill="white">
5544
+ <animate attributeName="opacity" values="1;0" keyTimes="0;1" dur="1s" begin="0s" repeatCount="indefinite"></animate>
5545
+ </rect>
5546
+ </g>
5547
+ </svg>
5548
+ ${this.guestMode,""}
5549
+ `:L`${this.signInError?L`
5550
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
5551
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.64754 5.99921C8.27961 6.01309 7.97008 5.72609 7.95619 5.35816C7.92488 4.5287 7.8809 3.92331 7.83766 3.48926C7.79508 3.06179 7.53702 2.8046 7.1773 2.76063C6.75313 2.70878 6.15477 2.66634 5.33367 2.66634C4.51254 2.66634 3.91418 2.70878 3.49002 2.76063C3.13048 2.80458 2.87229 3.06189 2.8297 3.48946C2.74944 4.29515 2.667 5.68713 2.667 7.99968C2.667 10.3122 2.74944 11.7042 2.8297 12.5099C2.87229 12.9375 3.13048 13.1948 3.49002 13.2387C3.91418 13.2906 4.51254 13.333 5.33367 13.333C6.15477 13.333 6.75313 13.2906 7.1773 13.2387C7.53702 13.1947 7.79508 12.9376 7.83766 12.5101C7.8809 12.076 7.92488 11.4706 7.95619 10.6412C7.97008 10.2733 8.27961 9.98626 8.64754 10.0001C9.01546 10.014 9.30247 10.3236 9.28858 10.6915C9.25644 11.5428 9.21087 12.1761 9.16443 12.6423C9.06679 13.6224 8.38345 14.4345 7.33908 14.5622C6.85294 14.6216 6.19979 14.6663 5.33367 14.6663C4.46752 14.6663 3.81436 14.6216 3.32822 14.5622C2.28377 14.4345 1.60055 13.622 1.50293 12.6421C1.41698 11.7792 1.33367 10.3407 1.33367 7.99968C1.33367 5.65866 1.41698 4.22013 1.50293 3.35729C1.60055 2.37738 2.28377 1.56483 3.32822 1.43715C3.81436 1.37772 4.46752 1.33301 5.33367 1.33301C6.19979 1.33301 6.85294 1.37772 7.33908 1.43714C8.38345 1.56481 9.06679 2.37697 9.16443 3.35709C9.21087 3.8233 9.25644 4.45651 9.28858 5.30786C9.30247 5.67579 9.01546 5.98532 8.64754 5.99921Z" fill="white"/>
5552
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1966 6.13807C10.9362 5.87772 10.9362 5.45561 11.1966 5.19526C11.4569 4.93491 11.879 4.93491 12.1394 5.19526L14.4727 7.5286C14.7331 7.78894 14.7331 8.21105 14.4727 8.4714L12.1394 10.8047C11.879 11.0651 11.4569 11.0651 11.1966 10.8047C10.9362 10.5444 10.9362 10.1223 11.1966 9.86193L12.3918 8.66667H6.0013C5.63311 8.66667 5.33463 8.36819 5.33463 8C5.33463 7.63181 5.63311 7.33333 6.0013 7.33333L12.3918 7.33333L11.1966 6.13807Z" fill="white"/>
5553
+ </svg>
5554
+ <span>${md("Sign in again!")}</span>
5555
+ `:L`
5556
+ <svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
5557
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.64754 5.99921C8.27961 6.01309 7.97008 5.72609 7.95619 5.35816C7.92488 4.5287 7.8809 3.92331 7.83766 3.48926C7.79508 3.06179 7.53702 2.8046 7.1773 2.76063C6.75313 2.70878 6.15477 2.66634 5.33367 2.66634C4.51254 2.66634 3.91418 2.70878 3.49002 2.76063C3.13048 2.80458 2.87229 3.06189 2.8297 3.48946C2.74944 4.29515 2.667 5.68713 2.667 7.99968C2.667 10.3122 2.74944 11.7042 2.8297 12.5099C2.87229 12.9375 3.13048 13.1948 3.49002 13.2387C3.91418 13.2906 4.51254 13.333 5.33367 13.333C6.15477 13.333 6.75313 13.2906 7.1773 13.2387C7.53702 13.1947 7.79508 12.9376 7.83766 12.5101C7.8809 12.076 7.92488 11.4706 7.95619 10.6412C7.97008 10.2733 8.27961 9.98626 8.64754 10.0001C9.01546 10.014 9.30247 10.3236 9.28858 10.6915C9.25644 11.5428 9.21087 12.1761 9.16443 12.6423C9.06679 13.6224 8.38345 14.4345 7.33908 14.5622C6.85294 14.6216 6.19979 14.6663 5.33367 14.6663C4.46752 14.6663 3.81436 14.6216 3.32822 14.5622C2.28377 14.4345 1.60055 13.622 1.50293 12.6421C1.41698 11.7792 1.33367 10.3407 1.33367 7.99968C1.33367 5.65866 1.41698 4.22013 1.50293 3.35729C1.60055 2.37738 2.28377 1.56483 3.32822 1.43715C3.81436 1.37772 4.46752 1.33301 5.33367 1.33301C6.19979 1.33301 6.85294 1.37772 7.33908 1.43714C8.38345 1.56481 9.06679 2.37697 9.16443 3.35709C9.21087 3.8233 9.25644 4.45651 9.28858 5.30786C9.30247 5.67579 9.01546 5.98532 8.64754 5.99921Z" fill="white"/>
5558
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1966 6.13807C10.9362 5.87772 10.9362 5.45561 11.1966 5.19526C11.4569 4.93491 11.879 4.93491 12.1394 5.19526L14.4727 7.5286C14.7331 7.78894 14.7331 8.21105 14.4727 8.4714L12.1394 10.8047C11.879 11.0651 11.4569 11.0651 11.1966 10.8047C10.9362 10.5444 10.9362 10.1223 11.1966 9.86193L12.3918 8.66667H6.0013C5.63311 8.66667 5.33463 8.36819 5.33463 8C5.33463 7.63181 5.63311 7.33333 6.0013 7.33333L12.3918 7.33333L11.1966 6.13807Z" fill="white"/>
5559
+ </svg>
5560
+ <span>${md("Sign in to comment")}</span>
5561
+ `}`}
5562
+ </a>
5563
+ </div>
5564
+ ${this.invalidApiKey?L`
5565
+ <div class="toolbar-section">
5566
+ <div class="tooltip">
5567
+ <div class="tooltiptext">
5568
+ ${this.isSigningInUserAdmin?L`Current URL not added to Superflow <br/> Project. Please add this URL.`:L`Current URL not added to Superflow <br/> Project. Please contact admin.`}
5569
+ </div>
5570
+ <div class="s-alert-btn danger">
5571
+ <div class='error-container'>
5572
+ <svg class="error-icon" width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5573
+ <path d="M12 3C10.22 3 8.47991 3.52784 6.99987 4.51677C5.51983 5.50571 4.36628 6.91131 3.68509 8.55585C3.0039 10.2004 2.82567 12.01 3.17294 13.7558C3.5202 15.5016 4.37737 17.1053 5.63604 18.364C6.89471 19.6226 8.49836 20.4798 10.2442 20.8271C11.99 21.1743 13.7996 20.9961 15.4442 20.3149C17.0887 19.6337 18.4943 18.4802 19.4832 17.0001C20.4722 15.5201 21 13.78 21 12C20.9975 9.61382 20.0485 7.3261 18.3612 5.63882C16.6739 3.95154 14.3862 3.00252 12 3ZM12 19.6154C10.4938 19.6154 9.02146 19.1687 7.76912 18.332C6.51678 17.4952 5.5407 16.3058 4.96431 14.9143C4.38792 13.5227 4.23711 11.9916 4.53095 10.5143C4.82479 9.03707 5.55008 7.68014 6.61511 6.61511C7.68014 5.55008 9.03708 4.82478 10.5143 4.53094C11.9916 4.2371 13.5228 4.38791 14.9143 4.9643C16.3058 5.54069 17.4952 6.51677 18.332 7.76912C19.1688 9.02146 19.6154 10.4938 19.6154 12C19.6131 14.019 18.81 15.9547 17.3824 17.3824C15.9547 18.81 14.019 19.6131 12 19.6154ZM11.3077 12.6923V7.84615C11.3077 7.66254 11.3806 7.48645 11.5105 7.35662C11.6403 7.22678 11.8164 7.15385 12 7.15385C12.1836 7.15385 12.3597 7.22678 12.4895 7.35662C12.6194 7.48645 12.6923 7.66254 12.6923 7.84615V12.6923C12.6923 12.8759 12.6194 13.052 12.4895 13.1818C12.3597 13.3117 12.1836 13.3846 12 13.3846C11.8164 13.3846 11.6403 13.3117 11.5105 13.1818C11.3806 13.052 11.3077 12.8759 11.3077 12.6923ZM13.0385 15.8077C13.0385 16.0131 12.9776 16.2139 12.8635 16.3846C12.7493 16.5554 12.5872 16.6885 12.3974 16.7671C12.2076 16.8457 11.9988 16.8663 11.7974 16.8262C11.596 16.7861 11.4109 16.6872 11.2657 16.542C11.1205 16.3968 11.0216 16.2117 10.9815 16.0103C10.9414 15.8088 10.962 15.6 11.0406 15.4103C11.1192 15.2205 11.2523 15.0583 11.4231 14.9442C11.5938 14.8301 11.7946 14.7692 12 14.7692C12.2754 14.7692 12.5396 14.8786 12.7343 15.0734C12.9291 15.2681 13.0385 15.5323 13.0385 15.8077Z" fill="currentColor"/>
5574
+ </svg>
5575
+ <div class="error-message">Error</div>
5576
+ </div>
5577
+ ${this.isSigningInUserAdmin?L`
5578
+ <div class="s-cta-btn" @click=${()=>this.goToAdminPortalDashboard()}>
5579
+ Add URL
5580
+ </div>
5581
+ `:null}
5582
+ </div>
5583
+ </div>
5584
+ </div>
5585
+ `:null}
5586
+ <div class="toolbar-section">
5587
+ <div class="toolbar-divider"></div>
5588
+ </div>`:null}
5589
+ <div class="toolbar-section s-more-menu dropdown">
5590
+ <div class="dropdown-content">
5591
+ <div class="menu-point header disable-hover">
5592
+ <div class="toolbar-logo">
5593
+ ${this.getWordMark()}
5594
+ </div>
5595
+ </div>
5596
+ <div class="menu-point-wrap">
5597
+ ${md("Sign in to comment on this page.")}
5598
+ <a href="https://www.usesuperflow.com/features" target="_blank">
5599
+ ${md("Learn more")}
5600
+ <svg width="14" height="14" viewBox="0 0 20 20" fill="none" xmlns="http://www.w3.org/2000/svg">
5601
+ <path d="M4.30881 1.72602C3.67106 1.86293 3.11953 2.1682 2.64215 2.64149C2.29011 2.99745 2.05915 3.34183 1.89878 3.76037C1.66018 4.37857 1.668 4.08911 1.668 10.0007C1.668 15.9122 1.66018 15.6228 1.89878 16.241C2.29385 17.2699 3.29164 18.0876 4.38704 18.291C4.70779 18.3496 15.2947 18.3496 15.6154 18.291C16.2297 18.1775 16.9494 17.7942 17.3838 17.3481C17.8221 16.8942 18.1506 16.284 18.2797 15.6736C18.3227 15.4702 18.3345 14.8051 18.3345 12.2973V9.17907H17.5129H16.6913V12.1017C16.6913 13.7957 16.6756 15.126 16.6522 15.259C16.5348 15.975 15.9753 16.5343 15.2593 16.6517C14.9503 16.7025 5.05201 16.7025 4.74282 16.6517C4.03857 16.5382 3.48296 15.9944 3.34997 15.2862C3.29912 15.0085 3.29521 5.06326 3.34997 4.74251C3.46731 4.02653 4.02684 3.467 4.74282 3.34966C4.87582 3.32619 6.20609 3.31054 7.90013 3.31054H10.8226V2.48895V1.66735L7.68482 1.67126C5.25184 1.67126 4.48891 1.68691 4.30881 1.72602Z" fill="#4C5366"/>
5602
+ <path d="M12.5058 2.48917V3.31077H14.0004H15.4988L13.3548 5.45481L11.2148 7.59477L11.7939 8.17385C12.1108 8.49069 12.3887 8.74902 12.4082 8.74902C12.4317 8.74902 13.4019 7.79443 14.5679 6.62845L16.6924 4.50413V6.0026V7.49715H17.514H18.3352V4.58253V1.66791H15.4206H12.5058V2.48917Z" fill="#4C5366"/>
5603
+ </svg>
5604
+ </a>
5605
+ </div>
5606
+ <hr />
5607
+ <div class="menu-point" @click=${()=>this.toggleQRCodeVisibility()}>
5608
+ <svg width="18" height="18" viewBox="0 0 18 18" fill="none" xmlns="http://www.w3.org/2000/svg">
5609
+ <path d="M5.25 12.75V12.7575M5.25 5.25V5.2575M12.75 5.25V5.2575M12.75 10.5H10.5V12.75M15 10.5V10.5075M10.5 15H12.75M12.75 12.75H15V15M3 3.75C3 3.55109 3.07902 3.36032 3.21967 3.21967C3.36032 3.07902 3.55109 3 3.75 3H6.75C6.94891 3 7.13968 3.07902 7.28033 3.21967C7.42098 3.36032 7.5 3.55109 7.5 3.75V6.75C7.5 6.94891 7.42098 7.13968 7.28033 7.28033C7.13968 7.42098 6.94891 7.5 6.75 7.5H3.75C3.55109 7.5 3.36032 7.42098 3.21967 7.28033C3.07902 7.13968 3 6.94891 3 6.75V3.75ZM10.5 3.75C10.5 3.55109 10.579 3.36032 10.7197 3.21967C10.8603 3.07902 11.0511 3 11.25 3H14.25C14.4489 3 14.6397 3.07902 14.7803 3.21967C14.921 3.36032 15 3.55109 15 3.75V6.75C15 6.94891 14.921 7.13968 14.7803 7.28033C14.6397 7.42098 14.4489 7.5 14.25 7.5H11.25C11.0511 7.5 10.8603 7.42098 10.7197 7.28033C10.579 7.13968 10.5 6.94891 10.5 6.75V3.75ZM3 11.25C3 11.0511 3.07902 10.8603 3.21967 10.7197C3.36032 10.579 3.55109 10.5 3.75 10.5H6.75C6.94891 10.5 7.13968 10.579 7.28033 10.7197C7.42098 10.8603 7.5 11.0511 7.5 11.25V14.25C7.5 14.4489 7.42098 14.6397 7.28033 14.7803C7.13968 14.921 6.94891 15 6.75 15H3.75C3.55109 15 3.36032 14.921 3.21967 14.7803C3.07902 14.6397 3 14.4489 3 14.25V11.25Z" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/>
5610
+ </svg>
5611
+
5612
+ <p>${md("Open in Mobile")}</p>
5613
+ </div>
5614
+ ${this.canToggleSidebarVersion?L`
5615
+ <div class="menu-point" @click=${()=>this.toggleSidebarV2()}>
5616
+ <input
5617
+ type="checkbox"
5618
+ .checked=${this.sidebarV2Enabled}
5619
+ @click=${t=>t.stopPropagation()}
5620
+ @change=${()=>this.toggleSidebarV2()}
5621
+ />
5622
+ <p>${md("Try V2 Sidebar (beta)")}</p>
5623
+ </div>
5624
+ `:""}
5625
+ <div class="menu-point" @click=${()=>this.toggleCommentSidebarVisibility()}>
5626
+ <input
5627
+ type="checkbox"
5628
+ .checked=${this.showAgentCommentsInSidebar}
5629
+ @click=${t=>t.stopPropagation()}
5630
+ @change=${()=>this.toggleCommentSidebarVisibility()}
5631
+ />
5632
+ <p>${md("Show Agent Comments in Sidebar & Page")}</p>
5633
+ </div>
5634
+ ${this.veltProxyToggleVisible?L`
5635
+ <div class="menu-point tooltip velt-proxy-menu-point" @click=${()=>this.toggleVeltProxy()}>
5636
+ <input
5637
+ type="checkbox"
5638
+ .checked=${this.veltProxyEnabled}
5639
+ @click=${t=>t.stopPropagation()}
5640
+ @change=${()=>this.toggleVeltProxy()}
5641
+ />
5642
+ <p>${md("Use Secure Proxy")}</p>
5643
+ <div class="tooltiptext velt-proxy-tooltiptext">
5644
+ <span>${md("Routes Superflow's backend traffic through Superflow-owned domains.")}</span>
5645
+ <span>${md("Turn this off if your network blocks them. Reloads the page.")}</span>
5646
+ </div>
5647
+ </div>
5648
+ `:""}
5649
+ <div class="menu-point" @click=${()=>this.removeSnippyly()}>
5650
+ <svg width="20" height="20" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
5651
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M12 4C10.0478 4 8.24816 4.161 6.80371 4.35177C5.50372 4.52346 4.52346 5.50372 4.35177 6.80371C4.16101 8.24816 4 10.0478 4 12C4 13.9522 4.161 15.7518 4.35177 17.1963C4.52346 18.4963 5.50372 19.4765 6.80371 19.6482C8.24816 19.839 10.0478 20 12 20C13.9522 20 15.7518 19.839 17.1963 19.6482C18.4963 19.4765 19.4765 18.4963 19.6482 17.1963C19.839 15.7518 20 13.9522 20 12C20 10.0478 19.839 8.24816 19.6482 6.80371C19.4765 5.50372 18.4963 4.52346 17.1963 4.35177C15.7518 4.16101 13.9522 4 12 4ZM6.54184 2.36899C4.34504 2.65912 2.65912 4.34504 2.36899 6.54184C2.16953 8.05208 2 9.94127 2 12C2 14.0587 2.16953 15.9479 2.36899 17.4582C2.65912 19.655 4.34504 21.3409 6.54184 21.631C8.05208 21.8305 9.94127 22 12 22C14.0587 22 15.9479 21.8305 17.4582 21.631C19.655 21.3409 21.3409 19.655 21.631 17.4582C21.8305 15.9479 22 14.0587 22 12C22 9.94127 21.8305 8.05208 21.631 6.54184C21.3409 4.34504 19.655 2.65912 17.4582 2.36899C15.9479 2.16953 14.0587 2 12 2C9.94127 2 8.05208 2.16953 6.54184 2.36899Z" fill="#777E91"/>
5652
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.29289 8.29289C8.68342 7.90237 9.31658 7.90237 9.70711 8.29289L12 10.5858L14.2929 8.29289C14.6834 7.90237 15.3166 7.90237 15.7071 8.29289C16.0976 8.68342 16.0976 9.31658 15.7071 9.70711L13.4142 12L15.7071 14.2929C16.0976 14.6834 16.0976 15.3166 15.7071 15.7071C15.3166 16.0976 14.6834 16.0976 14.2929 15.7071L12 13.4142L9.70711 15.7071C9.31658 16.0976 8.68342 16.0976 8.29289 15.7071C7.90237 15.3166 7.90237 14.6834 8.29289 14.2929L10.5858 12L8.29289 9.70711C7.90237 9.31658 7.90237 8.68342 8.29289 8.29289Z" fill="#777E91"/>
5653
+ </svg>
5654
+
5655
+ <p>${md("Exit Review Mode")}</p>
5656
+ </div>
5657
+ ${!this.customLoginEnabledLocally&&this.allowGuestModeSignIn?L`
5658
+ <div class="menu-point" @click=${()=>this.loginWithGoogle()}>
5659
+ <svg width="20" height="20" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
5660
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M8.64754 5.99921C8.27961 6.01309 7.97008 5.72609 7.95619 5.35816C7.92488 4.5287 7.8809 3.92331 7.83766 3.48926C7.79508 3.06179 7.53702 2.8046 7.1773 2.76063C6.75313 2.70878 6.15477 2.66634 5.33367 2.66634C4.51254 2.66634 3.91418 2.70878 3.49002 2.76063C3.13048 2.80458 2.87229 3.06189 2.8297 3.48946C2.74944 4.29515 2.667 5.68713 2.667 7.99968C2.667 10.3122 2.74944 11.7042 2.8297 12.5099C2.87229 12.9375 3.13048 13.1948 3.49002 13.2387C3.91418 13.2906 4.51254 13.333 5.33367 13.333C6.15477 13.333 6.75313 13.2906 7.1773 13.2387C7.53702 13.1947 7.79508 12.9376 7.83766 12.5101C7.8809 12.076 7.92488 11.4706 7.95619 10.6412C7.97008 10.2733 8.27961 9.98626 8.64754 10.0001C9.01546 10.014 9.30247 10.3236 9.28858 10.6915C9.25644 11.5428 9.21087 12.1761 9.16443 12.6423C9.06679 13.6224 8.38345 14.4345 7.33908 14.5622C6.85294 14.6216 6.19979 14.6663 5.33367 14.6663C4.46752 14.6663 3.81436 14.6216 3.32822 14.5622C2.28377 14.4345 1.60055 13.622 1.50293 12.6421C1.41698 11.7792 1.33367 10.3407 1.33367 7.99968C1.33367 5.65866 1.41698 4.22013 1.50293 3.35729C1.60055 2.37738 2.28377 1.56483 3.32822 1.43715C3.81436 1.37772 4.46752 1.33301 5.33367 1.33301C6.19979 1.33301 6.85294 1.37772 7.33908 1.43714C8.38345 1.56481 9.06679 2.37697 9.16443 3.35709C9.21087 3.8233 9.25644 4.45651 9.28858 5.30786C9.30247 5.67579 9.01546 5.98532 8.64754 5.99921Z" fill="#777E91"/>
5661
+ <path fill-rule="evenodd" clip-rule="evenodd" d="M11.1966 6.13807C10.9362 5.87772 10.9362 5.45561 11.1966 5.19526C11.4569 4.93491 11.879 4.93491 12.1394 5.19526L14.4727 7.5286C14.7331 7.78894 14.7331 8.21105 14.4727 8.4714L12.1394 10.8047C11.879 11.0651 11.4569 11.0651 11.1966 10.8047C10.9362 10.5444 10.9362 10.1223 11.1966 9.86193L12.3918 8.66667H6.0013C5.63311 8.66667 5.33463 8.36819 5.33463 8C5.33463 7.63181 5.63311 7.33333 6.0013 7.33333L12.3918 7.33333L11.1966 6.13807Z" fill="#777E91"/>
5662
+ </svg>
5663
+ <p>${md("Sign in")}</p>
5664
+ </div>
5665
+ `:null}
5666
+ </div>
5667
+ <svg
5668
+ class="toolbar-icon"
5669
+ viewBox="0 0 32 32"
5670
+ fill="none"
5671
+ xmlns="http://www.w3.org/2000/svg"
5672
+ >
5673
+ <path
5674
+ d="M14 23C14 24.1 14.9 25 16 25C17.1 25 18 24.1 18 23C18 21.9 17.1 21 16 21C14.9 21 14 21.9 14 23ZM14 9C14 10.1 14.9 11 16 11C17.1 11 18 10.1 18 9C18 7.9 17.1 7 16 7C14.9 7 14 7.9 14 9ZM14 16C14 17.1 14.9 18 16 18C17.1 18 18 17.1 18 16C18 14.9 17.1 14 16 14C14.9 14 14 14.9 14 16Z"
5675
+ />
5676
+ </svg>
5677
+ </div>
5678
+ </div>
5679
+ ${this.showQrCode&&this.qrCode?L`
5680
+ <div class="qrcode-container">
5681
+ <img class="qrcode" src=${this.qrCode} />
5682
+ <button class="qrcode-container-close-btn" @click=${()=>this.toggleQRCodeVisibility()}>x</button>
5683
+ </div>
5684
+ `:null}
5685
+ </div>
5686
+ ${this.showLiveDemoModal?L`
5687
+ <div class="snippyly-plugin-modal-container" @click=${()=>this.onLiveDemoModalNextClick()}>
5688
+ <div class="s-modal" @click=${t=>null==t?void 0:t.stopPropagation()}>
5689
+ <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
5690
+ <div class="s-modal-text">
5691
+ <h1>${md("Try Superflow using the toolbar below.")}</h1>
5692
+ <p>
5693
+ ${md("Get ready to drop your first comment!")} <br/>
5694
+ ${md("But before you do that, you definitely deserve a high five!")}
5695
+ </p>
5696
+ </div>
5697
+ <div class="s-button s-primary" @click=${()=>this.onLiveDemoModalNextClick()}>${md("Done")}</div>
5698
+ </div>
5699
+ </div>
5700
+ `:L``}
5701
+ ${this.showFigmaDemoModal?L`
5702
+ <div class="snippyly-plugin-modal-container" @click=${()=>this.onFigmaDemoModalNextClick()}>
5703
+ <div class="s-modal" @click=${t=>null==t?void 0:t.stopPropagation()}>
5704
+ <img src="https://app.usesuperflow.com/assets/party-emoji.svg" />
5705
+ <div class="s-modal-text">
5706
+ <h1>
5707
+ ${md("Sign in on the toolbar below and add")}<br/>
5708
+ ${md("comments on the design flaws.")}
5709
+ </h1>
5710
+ </div>
5711
+ <div class="s-button s-primary" @click=${()=>this.onFigmaDemoModalNextClick()}>${md("Done")}</div>
5712
+ </div>
5713
+ </div>
5714
+ `:L``}
5715
+ `:L``}}oh.PREVIEW_READONLY_CSS="\n velt-comment-dialog-suggestion-actions,\n velt-comment-dialog-suggestion-actions-internal,\n velt-comment-dialog-suggestion-action-accept,\n velt-comment-dialog-suggestion-action-accept-internal,\n velt-comment-dialog-suggestion-action-reject,\n velt-comment-dialog-suggestion-action-reject-internal,\n velt-comment-dialog-legacy-suggestion-action,\n velt-comment-dialog-legacy-suggestion-action-accept,\n velt-comment-dialog-legacy-suggestion-action-reject,\n .velt-suggestion-actions,\n .sf-accept-btn,\n .sf-reject-btn {\n display: none !important;\n }\n ",oh.PREVIEW_READONLY_STYLE_ATTR="data-sf-preview-readonly",oh.styles=[wd,yd],ih([nt()],oh.prototype,"loadPlugin",null),ih([nt()],oh.prototype,"comments",void 0),ih([nt()],oh.prototype,"commentElement",void 0),ih([nt()],oh.prototype,"contactElement",void 0),ih([nt()],oh.prototype,"rewriterElement",void 0),ih([nt()],oh.prototype,"presenceElement",void 0),ih([nt()],oh.prototype,"commentSubscription",void 0),ih([nt()],oh.prototype,"selectionElement",void 0),ih([nt()],oh.prototype,"viewsElement",void 0),ih([nt()],oh.prototype,"docElement",void 0),ih([nt()],oh.prototype,"addCommentMode",void 0),ih([nt()],oh.prototype,"showTourCommentTooltip",void 0),ih([nt()],oh.prototype,"firstCommentNudge",void 0),ih([nt()],oh.prototype,"allFeatureDisabled",void 0),ih([nt()],oh.prototype,"planLimitLocked",void 0),ih([nt()],oh.prototype,"projectDeleted",void 0),ih([nt()],oh.prototype,"allFeatureRestricted",void 0),ih([nt()],oh.prototype,"guestMode",void 0),ih([nt()],oh.prototype,"_expanded",void 0),ih([nt()],oh.prototype,"loading",void 0),ih([nt()],oh.prototype,"signInError",void 0),ih([nt()],oh.prototype,"snippylyUser",void 0),ih([nt()],oh.prototype,"snippylyUserRole",void 0),ih([nt()],oh.prototype,"_isPlanExpired",void 0),ih([nt()],oh.prototype,"showOnboardingModal",void 0),ih([nt()],oh.prototype,"embedMode",void 0),ih([nt()],oh.prototype,"readOnlyMode",void 0),ih([nt()],oh.prototype,"showLiveDemoModal",void 0),ih([nt()],oh.prototype,"showFigmaDemoModal",void 0),ih([nt()],oh.prototype,"showGuestModeSignInModal",void 0),ih([nt()],oh.prototype,"guestModeSignInModalConfig",void 0),ih([nt()],oh.prototype,"showGuestModeNameModal",void 0),ih([nt()],oh.prototype,"guestModeSignInBannerVisible",void 0),ih([nt()],oh.prototype,"guestUserNameInput",void 0),ih([nt()],oh.prototype,"guestUserModelOpened",void 0),ih([nt()],oh.prototype,"guestUserNameUpdated",void 0),ih([nt()],oh.prototype,"guestUserNameUpdateLoading",void 0),ih([ot()],oh.prototype,"apiKey",null),ih([ot()],oh.prototype,"projectId",null),ih([nt()],oh.prototype,"staging",void 0),ih([ot()],oh.prototype,"projectVersionKey",null),ih([nt()],oh.prototype,"projectVersion",void 0),ih([nt()],oh.prototype,"version",void 0),ih([ot()],oh.prototype,"veltVersion",void 0),ih([ot()],oh.prototype,"autoLocation",null),ih([nt()],oh.prototype,"_menuOpenedId",void 0),ih([nt()],oh.prototype,"copyLinkTooltip",void 0),ih([nt()],oh.prototype,"invalidApiKey",void 0),ih([nt()],oh.prototype,"documentId",void 0),ih([nt()],oh.prototype,"serverDocumentId",void 0),ih([nt()],oh.prototype,"_isUserGlobalContact",void 0),ih([nt()],oh.prototype,"location",void 0),ih([nt()],oh.prototype,"qrCode",void 0),ih([nt()],oh.prototype,"showQrCode",void 0),ih([nt()],oh.prototype,"customLoginEnabledLocally",void 0),ih([ot()],oh.prototype,"customLoginEnabled",void 0),ih([nt()],oh.prototype,"providedUser",void 0),ih([nt()],oh.prototype,"autoTranslation",void 0),ih([nt()],oh.prototype,"addCommentCount",void 0),ih([nt()],oh.prototype,"isSigningInUserAdmin",void 0),ih([nt()],oh.prototype,"_privateCommentModeEnabled",void 0),ih([nt()],oh.prototype,"superflowToolbarMoved",void 0),ih([nt()],oh.prototype,"_customerMetadata",void 0),ih([nt()],oh.prototype,"logoMark",void 0),ih([nt()],oh.prototype,"wordMark",void 0),ih([nt()],oh.prototype,"_darkMode",void 0),ih([nt()],oh.prototype,"projectConfig",void 0),ih([nt()],oh.prototype,"allowGuestModeSignIn",void 0),ih([nt()],oh.prototype,"_queryParamsComments",void 0),ih([nt()],oh.prototype,"_usePageTitleAsLocationName",void 0),ih([nt()],oh.prototype,"toolbarEnabled",void 0),ih([nt()],oh.prototype,"toolbarEnabledApiCalled",void 0),ih([nt()],oh.prototype,"passwordProtected",void 0),ih([nt()],oh.prototype,"isPasswordValid",void 0),ih([nt()],oh.prototype,"password",void 0),ih([nt()],oh.prototype,"validatingPasswordLoading",void 0),ih([nt()],oh.prototype,"showPasswordProtectedModal",void 0),ih([nt()],oh.prototype,"showInvalidPassword",void 0),ih([nt()],oh.prototype,"skipGuestNameModal",void 0),ih([nt()],oh.prototype,"_totalViews",void 0),ih([nt()],oh.prototype,"totalViewsCount",void 0),ih([nt()],oh.prototype,"inviteUrl",void 0),ih([nt()],oh.prototype,"showModalOnceCommentIsModeIsOff",void 0),ih([nt()],oh.prototype,"showInviteModal",void 0),ih([nt()],oh.prototype,"featureAccess",void 0),ih([nt()],oh.prototype,"hasAgentAccess",void 0),ih([nt()],oh.prototype,"hasPrivateCommentsAccess",void 0),ih([nt()],oh.prototype,"isPrivateCommentsEnabledOnWorkspace",void 0),ih([nt()],oh.prototype,"hasContentWarnings",void 0),ih([nt()],oh.prototype,"contentWarningsCount",void 0),ih([nt()],oh.prototype,"showContentWarningSidebar",void 0),ih([nt()],oh.prototype,"showAgentCommentsInSidebar",void 0),ih([nt()],oh.prototype,"veltProxyToggleVisible",void 0),ih([nt()],oh.prototype,"nativeScreenshotEnabled",void 0),ih([nt()],oh.prototype,"nativeScreenshotDenied",void 0),ih([nt()],oh.prototype,"capturingScreenshot",void 0),ih([nt()],oh.prototype,"agentGroups",void 0),ih([nt()],oh.prototype,"spellingSuggestionPagePathMap",void 0),ih([nt()],oh.prototype,"grammarSuggestionPagePathMap",void 0),(t=>{if(customElements.get("superflow-toolbar")||customElements.get("snippyly-plugin"))return;const e={allow:["sdkUrl","windowVariables","snippylyPlugin"],loaders:{windowVariables:()=>{const t=null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_API_KEY;return{valid:!!t,type:"windowVariables",apiKey:t,staging:!!(null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_STAGING),projectVersionKey:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_PROJECT_VERSION_KEY,projectId:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_PROJECT_ID,autoLocation:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_AUTO_LOCATION,veltVersion:null===window||void 0===window?void 0:window.SUPERFLOW_TOOLBAR_VELT_VERSION}},snippylyPlugin:()=>{const t=document.querySelector("snippyly-plugin");if(!t)return;const e=t.getAttribute("apiKey"),i=!!t.getAttribute("staging"),o=t.getAttribute("projectVersionKey"),n=t.getAttribute("projectId"),s=t.getAttribute("autoLocation"),r=t.getAttribute("veltVersion");return null==t||t.remove(),{valid:!!e,type:"snippylyPlugin",apiKey:e,staging:i,projectVersionKey:o,projectId:n,autoLocation:s,veltVersion:r}},sdkUrl:()=>{const t=document.getElementById("superflowToolbarScript");if(!t)return;const e=null==t?void 0:t.src,i=new URL(e).searchParams,o=i.has("apiKey")?i.get("apiKey"):void 0;return{valid:!!o,type:"sdkUrl",apiKey:o,staging:void 0,projectVersionKey:void 0,projectId:i.has("projectId")?i.get("projectId"):void 0,autoLocation:i.has("autoLocation")?i.get("autoLocation"):void 0,veltVersion:i.has("veltVersion")?i.get("veltVersion"):void 0}}},load:()=>{for(let t=0;t<e.allow.length;t++){const i=e.allow[t],o=e.loaders[i]();if(o&&o.valid)return o}}},i=()=>{try{const i=e.load();if(customElements.define("superflow-toolbar",t),i&&i.valid){(()=>{try{document.querySelectorAll("superflow-toolbar").forEach((t=>{t.remove()})),document.querySelectorAll("snippyly-plugin").forEach((t=>{t.remove()}))}catch(t){console.warn("Error in removeSuperflowToolbarTag: ",t)}})();const t={};return t.apiKey=i.apiKey,i.staging&&(t.staging="true"),i.projectVersionKey&&(t.projectVersionKey=i.projectVersionKey),i.projectId&&(t.projectId=i.projectId),(null==i?void 0:i.autoLocation)&&(t.autoLocation=i.autoLocation),(null==i?void 0:i.veltVersion)&&(t.veltVersion=i.veltVersion),void((t={})=>{try{const e=document.createElement("superflow-toolbar");Object.keys(t||{}).forEach((i=>{e.setAttribute(i,t[i])})),document.body.appendChild(e)}catch(t){console.warn("Error in loadSuperflowToolbarTag: ",t)}})(t)}}catch(t){console.warn("Error in initSuperflow: ",t)}};(null===document||void 0===document?void 0:document.body)?i():null===document||void 0===document||document.addEventListener("DOMContentLoaded",(()=>{i()}))})(oh);class nh extends X{}customElements.get("snippyly-plugin")||customElements.define("snippyly-plugin",nh);export{nh as SnippylyPlugin,oh as SuperflowToolbar};