actionagent 1.8.1 → 1.9.0
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.
- checksums.yaml +4 -4
- data/app/assets/builds/action_agent.css +1 -1
- data/app/assets/builds/action_agent.js +76 -73
- data/app/assets/builds/action_agent_recorder.js +78 -0
- data/app/assets/builds/action_agent_replay.js +226 -0
- data/app/controllers/action_agent/api/agent_runs_controller.rb +3 -1
- data/app/controllers/action_agent/api/agents_controller.rb +1 -0
- data/app/controllers/action_agent/api/api_keys_controller.rb +12 -2
- data/app/controllers/action_agent/api/base_controller.rb +63 -2
- data/app/controllers/action_agent/api/claude_logins_controller.rb +93 -0
- data/app/controllers/action_agent/api/code_sessions_controller.rb +53 -6
- data/app/controllers/action_agent/api/dashboard_assistant_controller.rb +2 -2
- data/app/controllers/action_agent/api/draft_pull_requests_controller.rb +248 -0
- data/app/controllers/action_agent/api/evaluation_fixes_controller.rb +27 -0
- data/app/controllers/action_agent/api/evaluations_controller.rb +9 -4
- data/app/controllers/action_agent/api/explorations_controller.rb +213 -0
- data/app/controllers/action_agent/api/github_app_manifests_controller.rb +125 -0
- data/app/controllers/action_agent/api/github_connections_controller.rb +40 -2
- data/app/controllers/action_agent/api/github_installations_controller.rb +280 -0
- data/app/controllers/action_agent/api/input_requests_controller.rb +77 -0
- data/app/controllers/action_agent/api/mcp_controller.rb +46 -12
- data/app/controllers/action_agent/api/members_controller.rb +36 -0
- data/app/controllers/action_agent/api/project_explorations_controller.rb +80 -0
- data/app/controllers/action_agent/api/project_install_pull_requests_controller.rb +305 -0
- data/app/controllers/action_agent/api/project_secrets_controller.rb +96 -0
- data/app/controllers/action_agent/api/project_setup_controller.rb +151 -0
- data/app/controllers/action_agent/api/project_sign_ins_controller.rb +112 -0
- data/app/controllers/action_agent/api/projects_controller.rb +512 -0
- data/app/controllers/action_agent/api/provider_keys_controller.rb +176 -24
- data/app/controllers/action_agent/api/provider_models_controller.rb +37 -15
- data/app/controllers/action_agent/api/recording_event_ingest_controller.rb +67 -0
- data/app/controllers/action_agent/api/sandbox_browser_tickets_controller.rb +50 -0
- data/app/controllers/action_agent/api/sandbox_browsers_controller.rb +65 -0
- data/app/controllers/action_agent/api/sandboxes_controller.rb +140 -8
- data/app/controllers/action_agent/api/scenario_catalog_entries_controller.rb +188 -0
- data/app/controllers/action_agent/api/scenario_catalogs_controller.rb +302 -0
- data/app/controllers/action_agent/api/session_recordings_controller.rb +165 -34
- data/app/controllers/action_agent/api/sessions_controller.rb +111 -0
- data/app/controllers/action_agent/api/telemetry_keys_controller.rb +21 -0
- data/app/controllers/action_agent/dashboard_controller.rb +17 -6
- data/app/controllers/action_agent/session_player_controller.rb +58 -0
- data/app/controllers/concerns/action_agent/api/agent_serialization.rb +1 -0
- data/app/controllers/concerns/action_agent/api/mcp_dashboard_tools.rb +623 -18
- data/app/controllers/concerns/action_agent/api/project_browser.rb +46 -0
- data/app/controllers/concerns/action_agent/api/project_secret_authorization.rb +57 -0
- data/app/jobs/action_agent/agent_execution_job.rb +9 -39
- data/app/jobs/action_agent/agent_resume_job.rb +84 -0
- data/app/jobs/action_agent/code_session_job.rb +26 -2
- data/app/jobs/action_agent/draft_pull_request_job.rb +43 -0
- data/app/jobs/action_agent/exploration_job.rb +80 -0
- data/app/jobs/action_agent/input_request_expiry_job.rb +22 -0
- data/app/jobs/action_agent/project_evaluation_job.rb +59 -0
- data/app/jobs/action_agent/project_setup_job.rb +21 -0
- data/app/jobs/action_agent/sandbox_cleanup_job.rb +20 -3
- data/app/jobs/action_agent/sandbox_provision_job.rb +77 -10
- data/app/jobs/action_agent/sandbox_run_job.rb +9 -37
- data/app/jobs/action_agent/verify_evaluation_fix_job.rb +37 -0
- data/app/models/action_agent/agent.rb +39 -26
- data/app/models/action_agent/agent_run.rb +134 -23
- data/app/models/action_agent/agent_template.rb +35 -1
- data/app/models/action_agent/api_key.rb +14 -0
- data/app/models/action_agent/catalog_scenario.rb +75 -0
- data/app/models/action_agent/code_session.rb +16 -4
- data/app/models/action_agent/draft_pull_request.rb +131 -0
- data/app/models/action_agent/evaluation.rb +84 -0
- data/app/models/action_agent/exploration.rb +847 -0
- data/app/models/action_agent/github_installation.rb +159 -0
- data/app/models/action_agent/input_request.rb +291 -0
- data/app/models/action_agent/project.rb +789 -0
- data/app/models/action_agent/project_secret.rb +339 -0
- data/app/models/action_agent/provider_key.rb +200 -3
- data/app/models/action_agent/recording_event.rb +145 -0
- data/app/models/action_agent/recording_snapshot.rb +7 -7
- data/app/models/action_agent/sandbox_session.rb +297 -14
- data/app/models/action_agent/scenario_catalog.rb +172 -0
- data/app/models/action_agent/scenario_product.rb +57 -0
- data/app/models/action_agent/scenario_set.rb +138 -0
- data/app/models/action_agent/session_recording.rb +121 -14
- data/app/models/action_agent/telemetry_trace.rb +74 -19
- data/app/models/concerns/action_agent/ownable.rb +84 -13
- data/app/serializers/action_agent/input_request_serializer.rb +47 -0
- data/app/serializers/action_agent/scenario_catalog_serializer.rb +23 -0
- data/app/serializers/action_agent/session_summary_serializer.rb +146 -0
- data/app/services/action_agent/agent_execution_service.rb +450 -72
- data/app/services/action_agent/agent_sync.rb +5 -2
- data/app/services/action_agent/agent_tool_roster.rb +19 -4
- data/app/services/action_agent/agent_toolbox.rb +215 -9
- data/app/services/action_agent/browser_live_ticket.rb +78 -0
- data/app/services/action_agent/browser_sidecar.rb +213 -0
- data/app/services/action_agent/browser_sign_in.rb +163 -0
- data/app/services/action_agent/browser_tool_redaction.rb +92 -0
- data/app/services/action_agent/claude_code_auth.rb +70 -4
- data/app/services/action_agent/dashboard_assistant_service.rb +24 -10
- data/app/services/action_agent/draft_pull_request_publisher.rb +719 -0
- data/app/services/action_agent/evaluation_fix.rb +101 -0
- data/app/services/action_agent/evaluation_fix_comparison.rb +66 -0
- data/app/services/action_agent/evaluation_runner_service.rb +4 -5
- data/app/services/action_agent/evaluation_standing.rb +15 -8
- data/app/services/action_agent/explorer_execution_service.rb +517 -0
- data/app/services/action_agent/github_client.rb +405 -64
- data/app/services/action_agent/live_updates.rb +31 -0
- data/app/services/action_agent/local_sandbox_backend.rb +1218 -83
- data/app/services/action_agent/local_sandbox_claude_login.rb +151 -0
- data/app/services/action_agent/mcp_client.rb +6 -2
- data/app/services/action_agent/mcp_recording_middleware.rb +104 -145
- data/app/services/action_agent/mcp_tool_dispatcher.rb +36 -13
- data/app/services/action_agent/mock_sandbox_backend.rb +3 -1
- data/app/services/action_agent/playwright_mcp_client.rb +7 -0
- data/app/services/action_agent/project_boot_fix.rb +309 -0
- data/app/services/action_agent/project_capabilities.rb +200 -0
- data/app/services/action_agent/project_install_pull_request.rb +225 -0
- data/app/services/action_agent/project_preflight.rb +178 -0
- data/app/services/action_agent/project_secret_discovery.rb +142 -0
- data/app/services/action_agent/project_setup.rb +429 -0
- data/app/services/action_agent/provider_credentials.rb +102 -0
- data/app/services/action_agent/recording_event_ingest.rb +181 -0
- data/app/services/action_agent/runtime_tool_roster.rb +52 -0
- data/app/services/action_agent/sample_data/conference_ticket.rb +516 -0
- data/app/services/action_agent/sandbox_boot_spec.rb +558 -0
- data/app/services/action_agent/sandbox_browser.rb +299 -0
- data/app/services/action_agent/sandbox_browser_driver.rb +85 -0
- data/app/services/action_agent/sandbox_credential_paths.rb +26 -0
- data/app/services/action_agent/sandbox_mail.rb +103 -0
- data/app/services/action_agent/sandbox_manifest.rb +166 -13
- data/app/services/action_agent/sandbox_orchestrator.rb +276 -22
- data/app/services/action_agent/sandbox_patch.rb +253 -0
- data/app/services/action_agent/scenario_catalog_import.rb +255 -0
- data/app/services/action_agent/scenario_catalog_repository_import.rb +81 -0
- data/app/services/action_agent/scenario_evaluation_runner.rb +119 -16
- data/app/services/action_agent/secret_scrubber.rb +33 -4
- data/app/services/action_agent/session_index.rb +270 -0
- data/app/services/action_agent/session_recording_service.rb +11 -0
- data/app/services/action_agent/session_timeline.rb +505 -0
- data/app/views/action_agent/github_app_manifests/created.html.erb +55 -0
- data/app/views/action_agent/session_player/show.html.erb +19 -0
- data/config/routes.rb +152 -1
- data/lib/action_agent/claude_login_process.rb +107 -0
- data/lib/action_agent/engine.rb +55 -5
- data/lib/action_agent/secret_requests.rb +80 -0
- data/lib/action_agent/version.rb +1 -1
- data/lib/action_agent.rb +507 -22
- data/lib/generators/action_agent/install_generator.rb +37 -0
- data/lib/generators/action_agent/templates/action_agent.rb.erb +158 -0
- data/lib/generators/action_agent/templates/migrations/015_add_provider_key_scope.rb.erb +72 -0
- data/lib/generators/action_agent/templates/migrations/016_create_active_agent_input_requests.rb.erb +85 -0
- data/lib/generators/action_agent/templates/migrations/017_create_active_agent_recording_events.rb.erb +57 -0
- data/lib/generators/action_agent/templates/migrations/018_add_browser_to_active_agent_sandbox_sessions.rb.erb +25 -0
- data/lib/generators/action_agent/templates/migrations/019_create_active_agent_projects.rb.erb +79 -0
- data/lib/generators/action_agent/templates/migrations/020_add_github_app_installations.rb.erb +62 -0
- data/lib/generators/action_agent/templates/migrations/021_create_active_agent_explorations.rb.erb +63 -0
- data/lib/generators/action_agent/templates/migrations/023_create_active_agent_draft_pull_requests.rb.erb +75 -0
- data/lib/generators/action_agent/templates/migrations/024_add_kind_to_active_agent_project_secrets.rb.erb +14 -0
- data/lib/generators/action_agent/templates/migrations/025_create_active_agent_scenario_catalogs.rb.erb +110 -0
- data/lib/generators/action_agent/templates/migrations/026_add_evaluation_fixes_to_code_sessions.rb.erb +21 -0
- data/lib/tasks/action_agent.rake +33 -0
- data/lib/tasks/browser.rake +22 -0
- data/lib/tasks/sandbox.rake +1 -1
- data/lib/tasks/scenario_catalogs.rake +71 -0
- metadata +96 -2
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
(()=>{var sn=Object.defineProperty,nn=(e,t,r)=>t in e?sn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,T=(e,t,r)=>nn(e,typeof t!="symbol"?t+"":t,r),Vr,on=Object.defineProperty,an=(e,t,r)=>t in e?on(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Gr=(e,t,r)=>an(e,typeof t!="symbol"?t+"":t,r),z=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(z||{});Date.now().toString();function ln(e){return e.nodeType===e.ELEMENT_NODE}var Le=class{constructor(){Gr(this,"idNodeMap",new Map),Gr(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let s=this.nodeMetaMap.get(o);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function ws(){return new Le}function un(e){return e.toLowerCase()}function cn(e,t){return!e||!t||e.type!==t.type?!1:e.type===z.Document?e.compatMode===t.compatMode:e.type===z.DocumentType?e.name===t.name&&e.publicId===t.publicId&&e.systemId===t.systemId:e.type===z.Comment||e.type===z.Text||e.type===z.CDATA?e.textContent===t.textContent:e.type===z.Element?e.tagName===t.tagName&&JSON.stringify(e.attributes)===JSON.stringify(t.attributes)&&e.isSVG===t.isSVG&&e.needBlock===t.needBlock:!1}function hn(e,t){let r;try{r=new URL(e,t??window.location.href)}catch{return null}let o=/\.([0-9a-z]+)(?:$)/i,s=r.pathname.match(o);return s?.[1]??null}var fn=/(max|min)-device-(width|height)/,Yr=new RegExp(fn.source,"g"),pn={postcssPlugin:"postcss-custom-selectors",prepare(){return{postcssPlugin:"postcss-custom-selectors",AtRule:function(e){e.params.match(Yr)&&(e.params=e.params.replace(Yr,"$1-$2"))}}}},dn={postcssPlugin:"postcss-hover-classes",prepare:function(){let e=[];return{Rule:function(t){e.indexOf(t)===-1&&(e.push(t),t.selectors.forEach(function(r){r.includes(":hover")&&(t.selector+=`,
|
|
2
|
+
`+r.replace(/:hover/g,".\\:hover"))}))}}}};function mn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function gn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),r}var Ae={exports:{}},Hr;function yn(){if(Hr)return Ae.exports;Hr=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return Ae.exports=t(),Ae.exports.createColors=t,Ae.exports}var wn={},vn=Object.freeze(Object.defineProperty({__proto__:null,default:wn},Symbol.toStringTag,{value:"Module"})),Q=gn(vn),at,Jr;function Ar(){if(Jr)return at;Jr=1;let e=yn(),t=Q;class r extends Error{constructor(s,u,n,a,h,c){super(s),this.name="CssSyntaxError",this.reason=s,h&&(this.file=h),a&&(this.source=a),c&&(this.plugin=c),typeof u<"u"&&typeof n<"u"&&(typeof u=="number"?(this.line=u,this.column=n):(this.line=u.line,this.column=u.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let u=this.source;s==null&&(s=e.isColorSupported),t&&s&&(u=t(u));let n=u.split(/\r?\n/),a=Math.max(this.line-3,0),h=Math.min(this.line+2,n.length),c=String(h).length,i,p;if(s){let{bold:l,gray:f,red:m}=e.createColors(!0);i=d=>l(m(d)),p=d=>f(d)}else i=p=l=>l;return n.slice(a,h).map((l,f)=>{let m=a+1+f,d=" "+(" "+m).slice(-c)+" | ";if(m===this.line){let g=p(d.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+p(d)+l+`
|
|
3
|
+
`+g+i("^")}return" "+p(d)+l}).join(`
|
|
4
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
5
|
+
|
|
6
|
+
`+s+`
|
|
7
|
+
`),this.name+": "+this.message+s}}return at=r,r.default=r,at}var Oe={},Qr;function Or(){return Qr||(Qr=1,Oe.isClean=Symbol("isClean"),Oe.my=Symbol("my")),Oe}var lt,Xr;function vs(){if(Xr)return lt;Xr=1;let e={after:`
|
|
8
|
+
`,beforeClose:`
|
|
9
|
+
`,beforeComment:`
|
|
10
|
+
`,beforeDecl:`
|
|
11
|
+
`,beforeOpen:" ",beforeRule:`
|
|
12
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(o){return o[0].toUpperCase()+o.slice(1)}class r{constructor(s){this.builder=s}atrule(s,u){let n="@"+s.name,a=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?n+=s.raws.afterName:a&&(n+=" "),s.nodes)this.block(s,n+a);else{let h=(s.raws.between||"")+(u?";":"");this.builder(n+a+h,s)}}beforeAfter(s,u){let n;s.type==="decl"?n=this.raw(s,null,"beforeDecl"):s.type==="comment"?n=this.raw(s,null,"beforeComment"):u==="before"?n=this.raw(s,null,"beforeRule"):n=this.raw(s,null,"beforeClose");let a=s.parent,h=0;for(;a&&a.type!=="root";)h+=1,a=a.parent;if(n.includes(`
|
|
13
|
+
`)){let c=this.raw(s,null,"indent");if(c.length)for(let i=0;i<h;i++)n+=c}return n}block(s,u){let n=this.raw(s,"between","beforeOpen");this.builder(u+n+"{",s,"start");let a;s.nodes&&s.nodes.length?(this.body(s),a=this.raw(s,"after")):a=this.raw(s,"after","emptyBody"),a&&this.builder(a),this.builder("}",s,"end")}body(s){let u=s.nodes.length-1;for(;u>0&&s.nodes[u].type==="comment";)u-=1;let n=this.raw(s,"semicolon");for(let a=0;a<s.nodes.length;a++){let h=s.nodes[a],c=this.raw(h,"before");c&&this.builder(c),this.stringify(h,u!==a||n)}}comment(s){let u=this.raw(s,"left","commentLeft"),n=this.raw(s,"right","commentRight");this.builder("/*"+u+s.text+n+"*/",s)}decl(s,u){let n=this.raw(s,"between","colon"),a=s.prop+n+this.rawValue(s,"value");s.important&&(a+=s.raws.important||" !important"),u&&(a+=";"),this.builder(a,s)}document(s){this.body(s)}raw(s,u,n){let a;if(n||(n=u),u&&(a=s.raws[u],typeof a<"u"))return a;let h=s.parent;if(n==="before"&&(!h||h.type==="root"&&h.first===s||h&&h.type==="document"))return"";if(!h)return e[n];let c=s.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[n]<"u")return c.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(s,n);{let i="raw"+t(n);this[i]?a=this[i](c,s):c.walk(p=>{if(a=p.raws[u],typeof a<"u")return!1})}return typeof a>"u"&&(a=e[n]),c.rawCache[n]=a,a}rawBeforeClose(s){let u;return s.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return u=n.raws.after,u.includes(`
|
|
14
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawBeforeComment(s,u){let n;return s.walkComments(a=>{if(typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
|
|
15
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(u,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(s,u){let n;return s.walkDecls(a=>{if(typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
|
|
16
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(u,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(s){let u;return s.walk(n=>{if(n.type!=="decl"&&(u=n.raws.between,typeof u<"u"))return!1}),u}rawBeforeRule(s){let u;return s.walk(n=>{if(n.nodes&&(n.parent!==s||s.first!==n)&&typeof n.raws.before<"u")return u=n.raws.before,u.includes(`
|
|
17
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawColon(s){let u;return s.walkDecls(n=>{if(typeof n.raws.between<"u")return u=n.raws.between.replace(/[^\s:]/g,""),!1}),u}rawEmptyBody(s){let u;return s.walk(n=>{if(n.nodes&&n.nodes.length===0&&(u=n.raws.after,typeof u<"u"))return!1}),u}rawIndent(s){if(s.raws.indent)return s.raws.indent;let u;return s.walk(n=>{let a=n.parent;if(a&&a!==s&&a.parent&&a.parent===s&&typeof n.raws.before<"u"){let h=n.raws.before.split(`
|
|
18
|
+
`);return u=h[h.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(s){let u;return s.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(u=n.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(s,u){let n=s[u],a=s.raws[u];return a&&a.value===n?a.raw:n}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,u){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,u)}}return lt=r,r.default=r,lt}var ut,Zr;function Ve(){if(Zr)return ut;Zr=1;let e=vs();function t(r,o){new e(o).stringify(r)}return ut=t,t.default=t,ut}var ct,Kr;function Ge(){if(Kr)return ct;Kr=1;let{isClean:e,my:t}=Or(),r=Ar(),o=vs(),s=Ve();function u(a,h){let c=new a.constructor;for(let i in a){if(!Object.prototype.hasOwnProperty.call(a,i)||i==="proxyCache")continue;let p=a[i],l=typeof p;i==="parent"&&l==="object"?h&&(c[i]=h):i==="source"?c[i]=p:Array.isArray(p)?c[i]=p.map(f=>u(f,c)):(l==="object"&&p!==null&&(p=u(p)),c[i]=p)}return c}class n{constructor(h={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in h)if(c==="nodes"){this.nodes=[];for(let i of h[c])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[c]=h[c]}addToError(h){if(h.postcssNode=this,h.stack&&this.source&&/\n\s{4}at /.test(h.stack)){let c=this.source;h.stack=h.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return h}after(h){return this.parent.insertAfter(this,h),this}assign(h={}){for(let c in h)this[c]=h[c];return this}before(h){return this.parent.insertBefore(this,h),this}cleanRaws(h){delete this.raws.before,delete this.raws.after,h||delete this.raws.between}clone(h={}){let c=u(this);for(let i in h)c[i]=h[i];return c}cloneAfter(h={}){let c=this.clone(h);return this.parent.insertAfter(this,c),c}cloneBefore(h={}){let c=this.clone(h);return this.parent.insertBefore(this,c),c}error(h,c={}){if(this.source){let{end:i,start:p}=this.rangeBy(c);return this.source.input.error(h,{column:p.column,line:p.line},{column:i.column,line:i.line},c)}return new r(h)}getProxyProcessor(){return{get(h,c){return c==="proxyOf"?h:c==="root"?()=>h.root().toProxy():h[c]},set(h,c,i){return h[c]===i||(h[c]=i,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&h.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let h=this;for(;h=h.parent;)h[e]=!1}}next(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h+1]}positionBy(h,c){let i=this.source.start;if(h.index)i=this.positionInside(h.index,c);else if(h.word){c=this.toString();let p=c.indexOf(h.word);p!==-1&&(i=this.positionInside(p,c))}return i}positionInside(h,c){let i=c||this.toString(),p=this.source.start.column,l=this.source.start.line;for(let f=0;f<h;f++)i[f]===`
|
|
19
|
+
`?(p=1,l+=1):p+=1;return{column:p,line:l}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h){let c={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(h.word){let p=this.toString(),l=p.indexOf(h.word);l!==-1&&(c=this.positionInside(l,p),i=this.positionInside(l+h.word.length,p))}else h.start?c={column:h.start.column,line:h.start.line}:h.index&&(c=this.positionInside(h.index)),h.end?i={column:h.end.column,line:h.end.line}:typeof h.endIndex=="number"?i=this.positionInside(h.endIndex):h.index&&(i=this.positionInside(h.index+1));return(i.line<c.line||i.line===c.line&&i.column<=c.column)&&(i={column:c.column+1,line:c.line}),{end:i,start:c}}raw(h,c){return new o().raw(this,h,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let c=this,i=!1;for(let p of h)p===this?i=!0:i?(this.parent.insertAfter(c,p),c=p):this.parent.insertBefore(c,p);i||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,c){let i={},p=c==null;c=c||new Map;let l=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))i[f]=m.map(d=>typeof d=="object"&&d.toJSON?d.toJSON(null,c):d);else if(typeof m=="object"&&m.toJSON)i[f]=m.toJSON(null,c);else if(f==="source"){let d=c.get(m.input);d==null&&(d=l,c.set(m.input,l),l++),i[f]={end:m.end,inputId:d,start:m.start}}else i[f]=m}return p&&(i.inputs=[...c.keys()].map(f=>f.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=s){h.stringify&&(h=h.stringify);let c="";return h(this,i=>{c+=i}),c}warn(h,c,i){let p={node:this};for(let l in i)p[l]=i[l];return h.warn(c,p)}get proxyOf(){return this}}return ct=n,n.default=n,ct}var ht,ei;function Ye(){if(ei)return ht;ei=1;let e=Ge();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return ht=t,t.default=t,ht}var ft,ti;function bn(){if(ti)return ft;ti=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return ft={nanoid:(o=21)=>{let s="",u=o;for(;u--;)s+=e[Math.random()*64|0];return s},customAlphabet:(o,s=21)=>(u=s)=>{let n="",a=u;for(;a--;)n+=o[Math.random()*o.length|0];return n}},ft}var pt,ri;function bs(){if(ri)return pt;ri=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Q,{existsSync:r,readFileSync:o}=Q,{dirname:s,join:u}=Q;function n(h){return Buffer?Buffer.from(h,"base64").toString():window.atob(h)}class a{constructor(c,i){if(i.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let p=i.map?i.map.prev:void 0,l=this.loadMap(i.from,p);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let i=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(l.test(c)||f.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(i.test(c)||p.test(c))return n(c.substr(RegExp.lastMatch.length));let m=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let i=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let p=c.lastIndexOf(i.pop()),l=c.indexOf("*/",p);p>-1&&l>-1&&(this.annotation=this.getAnnotationURL(c.substring(p,l)))}loadFile(c){if(this.root=s(c),r(c))return this.mapFile=c,o(c,"utf-8").toString().trim()}loadMap(c,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let p=i(c);if(p){let l=this.loadFile(p);if(!l)throw new Error("Unable to load previous source map: "+p.toString());return l}}else{if(i instanceof e)return t.fromSourceMap(i).toString();if(i instanceof t)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return c&&(p=u(s(c),p)),this.loadFile(p)}}}startWith(c,i){return c?c.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return pt=a,a.default=a,pt}var dt,ii;function He(){if(ii)return dt;ii=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Q,{fileURLToPath:r,pathToFileURL:o}=Q,{isAbsolute:s,resolve:u}=Q,{nanoid:n}=bn(),a=Q,h=Ar(),c=bs(),i=Symbol("fromOffsetCache"),p=!!(e&&t),l=!!(u&&s);class f{constructor(d,g={}){if(d===null||typeof d>"u"||typeof d=="object"&&!d.toString)throw new Error(`PostCSS received ${d} instead of CSS string`);if(this.css=d.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!l||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=u(g.from)),l&&p){let y=new c(this.css,g);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+n(6)+">"),this.map&&(this.map.file=this.from)}error(d,g,y,w={}){let S,x,v;if(g&&typeof g=="object"){let E=g,R=y;if(typeof E.offset=="number"){let A=this.fromOffset(E.offset);g=A.line,y=A.col}else g=E.line,y=E.column;if(typeof R.offset=="number"){let A=this.fromOffset(R.offset);x=A.line,v=A.col}else x=R.line,v=R.column}else if(!y){let E=this.fromOffset(g);g=E.line,y=E.col}let b=this.origin(g,y,x,v);return b?S=new h(d,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,w.plugin):S=new h(d,x===void 0?g:{column:y,line:g},x===void 0?y:{column:v,line:x},this.css,this.file,w.plugin),S.input={column:y,endColumn:v,endLine:x,line:g,source:this.css},this.file&&(o&&(S.input.url=o(this.file).toString()),S.input.file=this.file),S}fromOffset(d){let g,y;if(this[i])y=this[i];else{let S=this.css.split(`
|
|
20
|
+
`);y=new Array(S.length);let x=0;for(let v=0,b=S.length;v<b;v++)y[v]=x,x+=S[v].length+1;this[i]=y}g=y[y.length-1];let w=0;if(d>=g)w=y.length-1;else{let S=y.length-2,x;for(;w<S;)if(x=w+(S-w>>1),d<y[x])S=x-1;else if(d>=y[x+1])w=x+1;else{w=x;break}}return{col:d-y[w]+1,line:w+1}}mapResolve(d){return/^\w+:\/\//.test(d)?d:u(this.map.consumer().sourceRoot||this.map.root||".",d)}origin(d,g,y,w){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:d});if(!x.source)return!1;let v;typeof y=="number"&&(v=S.originalPositionFor({column:w,line:y}));let b;s(x.source)?b=o(x.source):b=new URL(x.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:x.column,endColumn:v&&v.column,endLine:v&&v.line,line:x.line,url:b.toString()};if(b.protocol==="file:")if(r)E.file=r(b);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(E.source=R),E}toJSON(){let d={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(d[g]=this[g]);return this.map&&(d.map={...this.map},d.map.consumerCache&&(d.map.consumerCache=void 0)),d}get from(){return this.file||this.id}}return dt=f,f.default=f,a&&a.registerInput&&a.registerInput(f),dt}var mt,si;function Ss(){if(si)return mt;si=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=Q,{dirname:r,relative:o,resolve:s,sep:u}=Q,{pathToFileURL:n}=Q,a=He(),h=!!(e&&t),c=!!(r&&s&&o&&u);class i{constructor(l,f,m,d){this.stringify=l,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=d,this.originalCSS=d,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let f=`
|
|
21
|
+
`;this.css.includes(`\r
|
|
22
|
+
`)&&(f=`\r
|
|
23
|
+
`),this.css+=f+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let f=this.toUrl(this.path(l.file)),m=l.root||r(l.file),d;this.mapOpts.sourcesContent===!1?(d=new e(l.text),d.sourcesContent&&(d.sourcesContent=null)):d=l.consumer(),this.map.applySourceMap(d,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let f=this.root.nodes.length-1;f>=0;f--)l=this.root.nodes[f],l.type==="comment"&&l.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&h&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,f=>{l+=f}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=t.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,f=1,m="<no source>",d={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(w,S,x)=>{if(this.css+=w,S&&x!=="end"&&(d.generated.line=l,d.generated.column=f-1,S.source&&S.source.start?(d.source=this.sourcePath(S),d.original.line=S.source.start.line,d.original.column=S.source.start.column-1,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,this.map.addMapping(d))),g=w.match(/\n/g),g?(l+=g.length,y=w.lastIndexOf(`
|
|
24
|
+
`),f=w.length-y):f+=w.length,S&&x!=="start"){let v=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==v.last||v.raws.semicolon)&&(S.source&&S.source.end?(d.source=this.sourcePath(S),d.original.line=S.source.end.line,d.original.column=S.source.end.column-1,d.generated.line=l,d.generated.column=f-2,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,d.generated.line=l,d.generated.column=f-1,this.map.addMapping(d)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let f=this.memoizedPaths.get(l);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let d=o(m,l);return this.memoizedPaths.set(l,d),d}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let f=l.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let l=new a(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!l[m]){l[m]=!0;let d=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(d,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let f=this.memoizedFileURLs.get(l);if(f)return f;if(n){let m=n(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let f=this.memoizedURLs.get(l);if(f)return f;u==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return mt=i,mt}var gt,ni;function Je(){if(ni)return gt;ni=1;let e=Ge();class t extends e{constructor(o){super(o),this.type="comment"}}return gt=t,t.default=t,gt}var yt,oi;function ue(){if(oi)return yt;oi=1;let{isClean:e,my:t}=Or(),r=Ye(),o=Je(),s=Ge(),u,n,a,h;function c(l){return l.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function i(l){if(l[e]=!1,l.proxyOf.nodes)for(let f of l.proxyOf.nodes)i(f)}class p extends s{append(...f){for(let m of f){let d=this.normalize(m,this.last);for(let g of d)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),d,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(d=this.indexes[m],g=f(this.proxyOf.nodes[d],d),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...d)=>f[m](...d.map(g=>typeof g=="function"?(y,w)=>g(y.toProxy(),w):g)):m==="every"||m==="some"?d=>f[m]((g,...y)=>d(g.toProxy(),...y)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(d=>d.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,d){return f[m]===d||(f[m]=d,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let d=this.index(f),g=this.normalize(m,this.proxyOf.nodes[d]).reverse();d=this.index(f);for(let w of g)this.proxyOf.nodes.splice(d+1,0,w);let y;for(let w in this.indexes)y=this.indexes[w],d<y&&(this.indexes[w]=y+g.length);return this.markDirty(),this}insertBefore(f,m){let d=this.index(f),g=d===0?"prepend":!1,y=this.normalize(m,this.proxyOf.nodes[d],g).reverse();d=this.index(f);for(let S of y)this.proxyOf.nodes.splice(d,0,S);let w;for(let S in this.indexes)w=this.indexes[S],d<=w&&(this.indexes[S]=w+y.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(u(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new n(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new o(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||p.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let d=this.normalize(m,this.first,"prepend").reverse();for(let g of d)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+d.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let d in this.indexes)m=this.indexes[d],m>=f&&(this.indexes[d]=m-1);return this.markDirty(),this}replaceValues(f,m,d){return d||(d=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,d))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,d)=>{let g;try{g=f(m,d)}catch(y){throw m.addToError(y)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((d,g)=>{if(d.type==="atrule"&&f.test(d.name))return m(d,g)}):this.walk((d,g)=>{if(d.type==="atrule"&&d.name===f)return m(d,g)}):(m=f,this.walk((d,g)=>{if(d.type==="atrule")return m(d,g)}))}walkComments(f){return this.walk((m,d)=>{if(m.type==="comment")return f(m,d)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((d,g)=>{if(d.type==="decl"&&f.test(d.prop))return m(d,g)}):this.walk((d,g)=>{if(d.type==="decl"&&d.prop===f)return m(d,g)}):(m=f,this.walk((d,g)=>{if(d.type==="decl")return m(d,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((d,g)=>{if(d.type==="rule"&&f.test(d.selector))return m(d,g)}):this.walk((d,g)=>{if(d.type==="rule"&&d.selector===f)return m(d,g)}):(m=f,this.walk((d,g)=>{if(d.type==="rule")return m(d,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return p.registerParse=l=>{u=l},p.registerRule=l=>{n=l},p.registerAtRule=l=>{a=l},p.registerRoot=l=>{h=l},yt=p,p.default=p,p.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,n.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,o.prototype):l.type==="root"&&Object.setPrototypeOf(l,h.prototype),l[t]=!0,l.nodes&&l.nodes.forEach(f=>{p.rebuild(f)})},yt}var wt,ai;function Dr(){if(ai)return wt;ai=1;let e=ue(),t,r;class o extends e{constructor(u){super({type:"document",...u}),this.nodes||(this.nodes=[])}toResult(u={}){return new t(new r,this,u).stringify()}}return o.registerLazyResult=s=>{t=s},o.registerProcessor=s=>{r=s},wt=o,o.default=o,wt}var vt,li;function xs(){if(li)return vt;li=1;let e={};return vt=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},vt}var bt,ui;function Es(){if(ui)return bt;ui=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let s=o.node.rangeBy(o);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in o)this[s]=o[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return bt=e,e.default=e,bt}var St,ci;function Tr(){if(ci)return St;ci=1;let e=Es();class t{constructor(o,s,u){this.processor=o,this.messages=[],this.root=s,this.opts=u,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let u=new e(o,s);return this.messages.push(u),u}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return St=t,t.default=t,St}var xt,hi;function Sn(){if(hi)return xt;hi=1;let e=39,t=34,r=92,o=47,s=10,u=32,n=12,a=9,h=13,c=91,i=93,p=40,l=41,f=123,m=125,d=59,g=42,y=58,w=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return xt=function(R,A={}){let M=R.css.valueOf(),k=A.ignoreErrors,D,C,ne,ee,H,P,j,re,W,F,ve=M.length,N=0,oe=[],te=[];function it(){return N}function ae(V){throw R.error("Unclosed "+V,N)}function st(){return te.length===0&&N>=ve}function nt(V){if(te.length)return te.pop();if(N>=ve)return;let le=V?V.ignoreUnclosed:!1;switch(D=M.charCodeAt(N),D){case s:case u:case a:case h:case n:{C=N;do C+=1,D=M.charCodeAt(C);while(D===u||D===s||D===a||D===h||D===n);F=["space",M.slice(N,C)],N=C-1;break}case c:case i:case f:case m:case y:case d:case l:{let be=String.fromCharCode(D);F=[be,be,N];break}case p:{if(re=oe.length?oe.pop()[1]:"",W=M.charCodeAt(N+1),re==="url"&&W!==e&&W!==t&&W!==u&&W!==s&&W!==a&&W!==n&&W!==h){C=N;do{if(P=!1,C=M.indexOf(")",C+1),C===-1)if(k||le){C=N;break}else ae("bracket");for(j=C;M.charCodeAt(j-1)===r;)j-=1,P=!P}while(P);F=["brackets",M.slice(N,C+1),N,C],N=C}else C=M.indexOf(")",N+1),ee=M.slice(N,C+1),C===-1||v.test(ee)?F=["(","(",N]:(F=["brackets",ee,N,C],N=C);break}case e:case t:{ne=D===e?"'":'"',C=N;do{if(P=!1,C=M.indexOf(ne,C+1),C===-1)if(k||le){C=N+1;break}else ae("string");for(j=C;M.charCodeAt(j-1)===r;)j-=1,P=!P}while(P);F=["string",M.slice(N,C+1),N,C],N=C;break}case w:{S.lastIndex=N+1,S.test(M),S.lastIndex===0?C=M.length-1:C=S.lastIndex-2,F=["at-word",M.slice(N,C+1),N,C],N=C;break}case r:{for(C=N,H=!0;M.charCodeAt(C+1)===r;)C+=1,H=!H;if(D=M.charCodeAt(C+1),H&&D!==o&&D!==u&&D!==s&&D!==a&&D!==h&&D!==n&&(C+=1,b.test(M.charAt(C)))){for(;b.test(M.charAt(C+1));)C+=1;M.charCodeAt(C+1)===u&&(C+=1)}F=["word",M.slice(N,C+1),N,C],N=C;break}default:{D===o&&M.charCodeAt(N+1)===g?(C=M.indexOf("*/",N+2)+1,C===0&&(k||le?C=M.length:ae("comment")),F=["comment",M.slice(N,C+1),N,C],N=C):(x.lastIndex=N+1,x.test(M),x.lastIndex===0?C=M.length-1:C=x.lastIndex-2,F=["word",M.slice(N,C+1),N,C],oe.push(F),N=C);break}}return N++,F}function ot(V){te.push(V)}return{back:ot,endOfFile:st,nextToken:nt,position:it}},xt}var Et,fi;function _r(){if(fi)return Et;fi=1;let e=ue();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Et=t,t.default=t,e.registerAtRule(t),Et}var Ct,pi;function Re(){if(pi)return Ct;pi=1;let e=ue(),t,r;class o extends e{constructor(u){super(u),this.type="root",this.nodes||(this.nodes=[])}normalize(u,n,a){let h=super.normalize(u);if(n){if(a==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let c of h)c.raws.before=n.raws.before}return h}removeChild(u,n){let a=this.index(u);return!n&&a===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[a].raws.before),super.removeChild(u)}toResult(u={}){return new t(new r,this,u).stringify()}}return o.registerLazyResult=s=>{t=s},o.registerProcessor=s=>{r=s},Ct=o,o.default=o,e.registerRoot(o),Ct}var Rt,di;function Cs(){if(di)return Rt;di=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
25
|
+
`," "];return e.split(t,r)},split(t,r,o){let s=[],u="",n=!1,a=0,h=!1,c="",i=!1;for(let p of t)i?i=!1:p==="\\"?i=!0:h?p===c&&(h=!1):p==='"'||p==="'"?(h=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&r.includes(p)&&(n=!0),n?(u!==""&&s.push(u.trim()),u="",n=!1):u+=p;return(o||u!=="")&&s.push(u.trim()),s}};return Rt=e,e.default=e,Rt}var Mt,mi;function Pr(){if(mi)return Mt;mi=1;let e=ue(),t=Cs();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let u=this.selector?this.selector.match(/,\s*/):null,n=u?u[0]:","+this.raw("between","beforeOpen");this.selector=s.join(n)}}return Mt=r,r.default=r,e.registerRule(r),Mt}var Nt,gi;function xn(){if(gi)return Nt;gi=1;let e=Ye(),t=Sn(),r=Je(),o=_r(),s=Re(),u=Pr(),n={empty:!0,space:!0};function a(c){for(let i=c.length-1;i>=0;i--){let p=c[i],l=p[3]||p[2];if(l)return l}}class h{constructor(i){this.input=i,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let p=new o;p.name=i[1].slice(1),p.name===""&&this.unnamedAtrule(p,i),this.init(p,i[2]);let l,f,m,d=!1,g=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),l=i[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){p.source.end=this.getPosition(i[2]),p.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(y.length>0){for(m=y.length-1,f=y[m];f&&f[0]==="space";)f=y[--m];f&&(p.source.end=this.getPosition(f[3]||f[2]),p.source.end.offset++)}this.end(i);break}else y.push(i);else y.push(i);if(this.tokenizer.endOfFile()){d=!0;break}}p.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(p.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(p,"params",y),d&&(i=y[y.length-1],p.source.end=this.getPosition(i[3]||i[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),g&&(p.nodes=[],this.current=p)}checkMissedSemicolon(i){let p=this.colon(i);if(p===!1)return;let l=0,f;for(let m=p-1;m>=0&&(f=i[m],!(f[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(i){let p=0,l,f,m;for(let[d,g]of i.entries()){if(l=g,f=l[0],f==="("&&(p+=1),f===")"&&(p-=1),p===0&&f===":")if(!m)this.doubleColon(l);else{if(m[0]==="word"&&m[1]==="progid")continue;return d}m=l}return!1}comment(i){let p=new r;this.init(p,i[2]),p.source.end=this.getPosition(i[3]||i[2]),p.source.end.offset++;let l=i[1].slice(2,-2);if(/^\s*$/.test(l))p.text="",p.raws.left=l,p.raws.right="";else{let f=l.match(/^(\s*)([^]*\S)(\s*)$/);p.text=f[2],p.raws.left=f[1],p.raws.right=f[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,p){let l=new e;this.init(l,i[0][2]);let f=i[i.length-1];for(f[0]===";"&&(this.semicolon=!0,i.pop()),l.source.end=this.getPosition(f[3]||f[2]||a(i)),l.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),l.raws.before+=i.shift()[1];for(l.source.start=this.getPosition(i[0][2]),l.prop="";i.length;){let w=i[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=i.shift()[1]}l.raws.between="";let m;for(;i.length;)if(m=i.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let d=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)d.push(i.shift());this.precheckMissedSemicolon(i);for(let w=i.length-1;w>=0;w--){if(m=i[w],m[1].toLowerCase()==="!important"){l.important=!0;let S=this.stringFrom(i,w);S=this.spacesFromEnd(i)+S,S!==" !important"&&(l.raws.important=S);break}else if(m[1].toLowerCase()==="important"){let S=i.slice(0),x="";for(let v=w;v>0;v--){let b=S[v][0];if(x.trim().indexOf("!")===0&&b!=="space")break;x=S.pop()[1]+x}x.trim().indexOf("!")===0&&(l.important=!0,l.raws.important=x,i=S)}if(m[0]!=="space"&&m[0]!=="comment")break}i.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=d.map(w=>w[1]).join(""),d=[]),this.raw(l,"value",d.concat(i),p),l.value.includes(":")&&!p&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let p=new u;this.init(p,i[2]),p.selector="",p.raws.between="",this.current=p}end(i){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(i){if(this.spaces+=i[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let p=this.input.fromOffset(i);return{column:p.col,line:p.line,offset:i}}init(i,p){this.current.push(i),i.source={input:this.input,start:this.getPosition(p)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let p=!1,l=null,f=!1,m=null,d=[],g=i[1].startsWith("--"),y=[],w=i;for(;w;){if(l=w[0],y.push(w),l==="("||l==="[")m||(m=w),d.push(l==="("?")":"]");else if(g&&f&&l==="{")m||(m=w),d.push("}");else if(d.length===0)if(l===";")if(f){this.decl(y,g);return}else break;else if(l==="{"){this.rule(y);return}else if(l==="}"){this.tokenizer.back(y.pop()),p=!0;break}else l===":"&&(f=!0);else l===d[d.length-1]&&(d.pop(),d.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(p=!0),d.length>0&&this.unclosedBracket(m),p&&f){if(!g)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,p,l,f){let m,d,g=l.length,y="",w=!0,S,x;for(let v=0;v<g;v+=1)m=l[v],d=m[0],d==="space"&&v===g-1&&!f?w=!1:d==="comment"?(x=l[v-1]?l[v-1][0]:"empty",S=l[v+1]?l[v+1][0]:"empty",!n[x]&&!n[S]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let v=l.reduce((b,E)=>b+E[1],"");i.raws[p]={raw:v,value:y}}i[p]=y}rule(i){i.pop();let p=new u;this.init(p,i[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(p,"selector",i),this.current=p}spacesAndCommentsFromEnd(i){let p,l="";for(;i.length&&(p=i[i.length-1][0],!(p!=="space"&&p!=="comment"));)l=i.pop()[1]+l;return l}spacesAndCommentsFromStart(i){let p,l="";for(;i.length&&(p=i[0][0],!(p!=="space"&&p!=="comment"));)l+=i.shift()[1];return l}spacesFromEnd(i){let p,l="";for(;i.length&&(p=i[i.length-1][0],p==="space");)l=i.pop()[1]+l;return l}stringFrom(i,p){let l="";for(let f=p;f<i.length;f++)l+=i[f][1];return i.splice(p,i.length-p),l}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return Nt=h,Nt}var At,yi;function Ir(){if(yi)return At;yi=1;let e=ue(),t=xn(),r=He();function o(s,u){let n=new r(s,u),a=new t(n);try{a.parse()}catch(h){throw h}return a.root}return At=o,o.default=o,e.registerParse(o),At}var Ot,wi;function Rs(){if(wi)return Ot;wi=1;let{isClean:e,my:t}=Or(),r=Ss(),o=Ve(),s=ue(),u=Dr(),n=xs(),a=Tr(),h=Ir(),c=Re(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(x){return typeof x=="object"&&typeof x.then=="function"}function d(x){let v=!1,b=i[x.type];return x.type==="decl"?v=x.prop.toLowerCase():x.type==="atrule"&&(v=x.name.toLowerCase()),v&&x.append?[b,b+"-"+v,f,b+"Exit",b+"Exit-"+v]:v?[b,b+"-"+v,b+"Exit",b+"Exit-"+v]:x.append?[b,f,b+"Exit"]:[b,b+"Exit"]}function g(x){let v;return x.type==="document"?v=["Document",f,"DocumentExit"]:x.type==="root"?v=["Root",f,"RootExit"]:v=d(x),{eventIndex:0,events:v,iterator:0,node:x,visitorIndex:0,visitors:[]}}function y(x){return x[e]=!1,x.nodes&&x.nodes.forEach(v=>y(v)),x}let w={};class S{constructor(v,b,E){this.stringified=!1,this.processed=!1;let R;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))R=y(b);else if(b instanceof S||b instanceof a)R=y(b.root),b.map&&(typeof E.map>"u"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=b.map);else{let A=h;E.syntax&&(A=E.syntax.parse),E.parser&&(A=E.parser),A.parse&&(A=A.parse);try{R=A(b,E)}catch(M){this.processed=!0,this.error=M}R&&!R[t]&&s.rebuild(R)}this.result=new a(v,R,E),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,b){let E=this.result.lastPlugin;try{b&&b.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(b,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([b,R])};for(let b of this.plugins)if(typeof b=="object")for(let E in b){if(!p[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[E])if(typeof b[E]=="object")for(let R in b[E])R==="*"?v(b,E,b[E][R]):v(b,E+"-"+R.toLowerCase(),b[E][R]);else typeof b[E]=="function"&&v(b,E,b[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let b=this.plugins[v],E=this.runOnRoot(b);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];){v[e]=!0;let b=[g(v)];for(;b.length>0;){let E=this.visitTick(b);if(m(E))try{await E}catch(R){let A=b[b.length-1].node;throw this.handleError(R,A)}}}if(this.listeners.OnceExit)for(let[b,E]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(v.type==="document"){let R=v.nodes.map(A=>E(A,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(b[0])?Promise.all(b):b}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,b=o;v.syntax&&(b=v.syntax.stringify),v.stringifier&&(b=v.stringifier),b.stringify&&(b=b.stringify);let R=new r(b,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let b=this.runOnRoot(v);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];)v[e]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let b of v.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,b){return this.async().then(v,b)}toString(){return this.css}visitSync(v,b){for(let[E,R]of v){this.result.lastPlugin=E;let A;try{A=R(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(A))throw this.getAsyncError()}}visitTick(v){let b=v[v.length-1],{node:E,visitors:R}=b;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&b.visitorIndex<R.length){let[M,k]=R[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===R.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return k(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(b.iterator!==0){let M=b.iterator,k;for(;k=E.nodes[E.indexes[M]];)if(E.indexes[M]+=1,!k[e]){k[e]=!0,v.push(g(k));return}b.iterator=0,delete E.indexes[M]}let A=b.events;for(;b.eventIndex<A.length;){let M=A[b.eventIndex];if(b.eventIndex+=1,M===f){E.nodes&&E.nodes.length&&(E[e]=!0,b.iterator=E.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}v.pop()}walkSync(v){v[e]=!0;let b=d(v);for(let E of b)if(E===f)v.nodes&&v.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=x=>{w=x},Ot=S,S.default=S,c.registerLazyResult(S),u.registerLazyResult(S),Ot}var Dt,vi;function En(){if(vi)return Dt;vi=1;let e=Ss(),t=Ve(),r=xs(),o=Ir(),s=Tr();class u{constructor(a,h,c){h=h.toString(),this.stringified=!1,this._processor=a,this._css=h,this._opts=c,this._map=void 0;let i,p=t;this.result=new s(this._processor,i,this._opts),this.result.css=h;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let f=new e(p,i,this._opts,h);if(f.isMap()){let[m,d]=f.generate();m&&(this.result.css=m),d&&(this.result.map=d)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(a){return this.async().catch(a)}finally(a){return this.async().then(a,a)}sync(){if(this.error)throw this.error;return this.result}then(a,h){return this.async().then(a,h)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let a,h=o;try{a=h(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=a,a}get[Symbol.toStringTag](){return"NoWorkResult"}}return Dt=u,u.default=u,Dt}var Tt,bi;function Cn(){if(bi)return Tt;bi=1;let e=En(),t=Rs(),r=Dr(),o=Re();class s{constructor(n=[]){this.version="8.4.38",this.plugins=this.normalize(n)}normalize(n){let a=[];for(let h of n)if(h.postcss===!0?h=h():h.postcss&&(h=h.postcss),typeof h=="object"&&Array.isArray(h.plugins))a=a.concat(h.plugins);else if(typeof h=="object"&&h.postcssPlugin)a.push(h);else if(typeof h=="function")a.push(h);else if(!(typeof h=="object"&&(h.parse||h.stringify)))throw new Error(h+" is not a PostCSS plugin");return a}process(n,a={}){return!this.plugins.length&&!a.parser&&!a.stringifier&&!a.syntax?new e(this,n,a):new t(this,n,a)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}}return Tt=s,s.default=s,o.registerProcessor(s),r.registerProcessor(s),Tt}var _t,Si;function Rn(){if(Si)return _t;Si=1;let e=Ye(),t=bs(),r=Je(),o=_r(),s=He(),u=Re(),n=Pr();function a(h,c){if(Array.isArray(h))return h.map(l=>a(l));let{inputs:i,...p}=h;if(i){c=[];for(let l of i){let f={...l,__proto__:s.prototype};f.map&&(f.map={...f.map,__proto__:t.prototype}),c.push(f)}}if(p.nodes&&(p.nodes=h.nodes.map(l=>a(l,c))),p.source){let{inputId:l,...f}=p.source;p.source=f,l!=null&&(p.source.input=c[l])}if(p.type==="root")return new u(p);if(p.type==="decl")return new e(p);if(p.type==="rule")return new n(p);if(p.type==="comment")return new r(p);if(p.type==="atrule")return new o(p);throw new Error("Unknown node type: "+h.type)}return _t=a,a.default=a,_t}var Pt,xi;function Mn(){if(xi)return Pt;xi=1;let e=Ar(),t=Ye(),r=Rs(),o=ue(),s=Cn(),u=Ve(),n=Rn(),a=Dr(),h=Es(),c=Je(),i=_r(),p=Tr(),l=He(),f=Ir(),m=Cs(),d=Pr(),g=Re(),y=Ge();function w(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new s(S)}return w.plugin=function(x,v){let b=!1;function E(...A){console&&console.warn&&!b&&(b=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
26
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
27
|
+
https://www.w3ctech.com/topic/2226`));let M=v(...A);return M.postcssPlugin=x,M.postcssVersion=new s().version,M}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(A,M,k){return w([E(k)]).process(A,M)},E},w.stringify=u,w.parse=f,w.fromJSON=n,w.list=m,w.comment=S=>new c(S),w.atRule=S=>new i(S),w.decl=S=>new t(S),w.rule=S=>new d(S),w.root=S=>new g(S),w.document=S=>new a(S),w.CssSyntaxError=e,w.Declaration=t,w.Container=o,w.Processor=s,w.Document=a,w.Comment=c,w.Warning=h,w.AtRule=i,w.Result=p,w.Input=l,w.Rule=d,w.Root=g,w.Node=y,r.registerPostcss(w),Pt=w,w.default=w,Pt}var Nn=Mn(),U=mn(Nn);U.stringify;U.fromJSON;U.plugin;U.parse;U.list;U.document;U.comment;U.atRule;U.rule;U.decl;U.root;U.CssSyntaxError;U.Declaration;U.Container;U.Processor;U.Document;U.Comment;U.Warning;U.AtRule;U.Result;U.Input;U.Rule;U.Root;U.Node;var Ei={script:"noscript",altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"};function An(e){let t=Ei[e.tagName]?Ei[e.tagName]:e.tagName;return t==="link"&&e.attributes._cssText&&(t="style"),t}function Qe(e,t){let r=t?.stylesWithHoverClass.get(e);if(r)return r;let o=e;try{o=U([pn,dn]).process(e).css}catch(s){console.warn("Failed to adapt css for replay",s)}return t?.stylesWithHoverClass.set(e,o),o}function Ci(){return{stylesWithHoverClass:new Map}}var On="rrweb-snapshot.rebuild() cannot rebuild into an unprotected browser document. Use rebuildIntoSandboxedIframe() or set UNSAFE_allowUnprotectedRebuild: true only when you accept the script-execution risk.",Ri="rrweb-snapshot.createSandboxedIframe() requires root to be connected to a document before creating a sandboxed iframe.",Ms=new WeakSet;function Dn(e){if(!e||e.tagName!=="IFRAME"||!("sandbox"in e))return!1;let t=Array.from(e.sandbox);return t.length===1&&t[0]==="allow-same-origin"}function Tn(e){if(e.UNSAFE_allowUnprotectedRebuild)return;let t=e.doc.defaultView;if(t&&!(Ms.has(e.doc)&&Dn(t.frameElement)))throw new Error(On)}function _n(e,t,r,o){let s=[];for(let c of e.childNodes)c.type===z.Text&&s.push(c);let u=t.split("/* rr_split */");for(;u.length>1&&u.length>s.length;)u.splice(-2,2,u.slice(-2).join(""));let n="";r&&(n=Qe(u.join(""),o));let a=0,h=-1;for(let c=0;c<s.length&&c!==u.length;c++){let i=s[c],p=u[c],l=c<u.length-1?u[c+1]:null;if(r&&l){let f=a,m=l.length;m=Math.min(m,30);let d=!1;for(;m>2;m--){let g=l.substring(0,m),y=n.substring(a).indexOf(g);if(d=y!==-1,d){f+=y;break}}d||(f+=p.length),p=n.substring(a,f),a=f}else r&&(p=n.substring(a));h!==-1&&(p=p.substring(h)),l&&(h!==-1||p.endsWith("0p")&&l.startsWith("x"))&&(h=l.indexOf("}"),h!==-1&&(h+=1,p+=l.substring(0,h))),i.textContent=p}}function Pn(e,t,r,o){let{doc:s,hackCss:u,cache:n}=o;e.childNodes.length?_n(e,r,u,n):(u&&(r=Qe(r,n)),t.appendChild(s.createTextNode(r)))}function In(e,t){var r;let{doc:o,hackCss:s,cache:u}=t;switch(e.type){case z.Document:return o.implementation.createDocument(null,"",null);case z.DocumentType:return o.implementation.createDocumentType(e.name||"html",e.publicId,e.systemId);case z.Element:{let n=An(e),a;e.isSVG?a=o.createElementNS("http://www.w3.org/2000/svg",n):(e.isCustom&&((r=o.defaultView)!=null&&r.customElements)&&!o.defaultView.customElements.get(e.tagName)&&o.defaultView.customElements.define(e.tagName,class extends o.defaultView.HTMLElement{}),a=o.createElement(n));let h={};for(let c in e.attributes){if(!Object.prototype.hasOwnProperty.call(e.attributes,c))continue;let i=e.attributes[c];if(!(n==="option"&&c==="selected"&&i===!1)&&i!==null){if(i===!0&&(i=""),c.startsWith("rr_")){h[c]=i;continue}if(typeof i=="string"){if(n==="style"&&c==="_cssText"){Pn(e,a,i,t);continue}else if(n==="textarea"&&c==="value"){a.appendChild(o.createTextNode(i)),e.childNodes=[];continue}}try{if(e.isSVG&&c==="xlink:href")a.setAttributeNS("http://www.w3.org/1999/xlink",c,i.toString());else if(c==="onload"||c==="onclick"||c.substring(0,7)==="onmouse")a.setAttribute("_"+c,i.toString());else if(n==="meta"&&e.attributes["http-equiv"]==="Content-Security-Policy"&&c==="content"){a.setAttribute("csp-content",i.toString());continue}else n==="link"&&(e.attributes.rel==="preload"&&e.attributes.as==="script"||e.attributes.rel==="modulepreload")||n==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&hn(e.attributes.href)==="js"||(n==="img"&&e.attributes.srcset&&e.attributes.rr_dataURL?a.setAttribute("rrweb-original-srcset",e.attributes.srcset):a.setAttribute(c,i.toString()))}catch{}}}for(let c in h){let i=h[c];if(n==="canvas"&&c==="rr_dataURL"){let p=o.createElement("img");p.onload=()=>{let l=a.getContext("2d");l&&l.drawImage(p,0,0,p.width,p.height)},p.src=i.toString(),a.RRNodeType&&(a.rr_dataURL=i.toString())}else if(n==="img"&&c==="rr_dataURL"){let p=a;p.currentSrc.startsWith("data:")||(p.setAttribute("rrweb-original-src",e.attributes.src),p.src=i.toString())}if(c==="rr_width")a.style.setProperty("width",i.toString());else if(c==="rr_height")a.style.setProperty("height",i.toString());else if(c==="rr_mediaCurrentTime"&&typeof i=="number")a.currentTime=i;else if(c==="rr_mediaState")switch(i){case"played":a.play().catch(p=>console.warn("media playback error",p));break;case"paused":a.pause();break}else c==="rr_mediaPlaybackRate"&&typeof i=="number"?a.playbackRate=i:c==="rr_mediaMuted"&&typeof i=="boolean"?a.muted=i:c==="rr_mediaLoop"&&typeof i=="boolean"?a.loop=i:c==="rr_mediaVolume"&&typeof i=="number"?a.volume=i:c==="rr_open_mode"&&a.setAttribute("rr_open_mode",i)}if(e.isShadowHost)if(!a.shadowRoot)a.attachShadow({mode:"open"});else for(;a.shadowRoot.firstChild;)a.shadowRoot.removeChild(a.shadowRoot.firstChild);return(n==="input"||n==="textarea")&&a.setAttribute("autocomplete","off"),a}case z.Text:return e.isStyle&&s?o.createTextNode(Qe(e.textContent,u)):o.createTextNode(e.textContent);case z.CDATA:return o.createCDATASection(e.textContent);case z.Comment:return o.createComment(e.textContent);default:return null}}function Ce(e,t){let{doc:r,mirror:o,skipChild:s=!1,hackCss:u=!0,afterAppend:n,cache:a}=t;if(o.has(e.id)){let c=o.getNode(e.id),i=o.getMeta(c);if(cn(i,e))return o.getNode(e.id)}let h=In(e,{doc:r,hackCss:u,cache:a});if(!h)return null;if(e.rootId&&o.getNode(e.rootId)!==r&&o.replace(e.rootId,r),e.type===z.Document&&(r.close(),r.open(),e.compatMode==="BackCompat"&&e.childNodes&&e.childNodes[0].type!==z.DocumentType&&(e.childNodes[0].type===z.Element&&"xmlns"in e.childNodes[0].attributes&&e.childNodes[0].attributes.xmlns==="http://www.w3.org/1999/xhtml"?r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'):r.write('<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">')),h=r),o.add(h,e),(e.type===z.Document||e.type===z.Element)&&!s)for(let c of e.childNodes){let i=Ce(c,{doc:r,mirror:o,skipChild:!1,hackCss:u,afterAppend:n,cache:a});if(!i){console.warn("Failed to rebuild",c);continue}if(c.isShadow&&ln(h)&&h.shadowRoot)h.shadowRoot.appendChild(i);else if(e.type===z.Document&&c.type==z.Element){let p=i,l=null;p.childNodes.forEach(f=>{f.nodeName==="BODY"&&(l=f)}),l?(p.removeChild(l),h.appendChild(i),p.appendChild(l)):h.appendChild(i)}else h.appendChild(i);n&&n(i,c.id)}return h}function Ln(e,t){function r(o){t(o)}for(let o of e.getIds())e.has(o)&&r(e.getNode(o))}function kn(e,t){let r=t.getMeta(e);if(r?.type!==z.Element)return;let o=e;for(let s in r.attributes){if(!(Object.prototype.hasOwnProperty.call(r.attributes,s)&&s.startsWith("rr_")))continue;let u=r.attributes[s];s==="rr_scrollLeft"&&(o.scrollLeft=u),s==="rr_scrollTop"&&(o.scrollTop=u)}}function Fn(e,t){Tn(t);let{doc:r,onVisit:o,hackCss:s=!0,afterAppend:u,cache:n,mirror:a=new Le}=t,h=Ce(e,{doc:r,mirror:a,skipChild:!1,hackCss:s,afterAppend:u,cache:n});return Ln(a,c=>{o&&o(c),kn(c,a)}),h}function Un(e){var t;if(!e.root.isConnected)throw new Error(Ri);let r=e.root.ownerDocument.createElement("iframe");for(let[s,u]of Object.entries(e.iframeAttributes||{}))s!=="sandbox"&&r.setAttribute(s,u);r.setAttribute("sandbox","allow-same-origin"),e.root.appendChild(r);let o=r.contentDocument;if(!o||!r.contentWindow)throw(t=r.parentNode)==null||t.removeChild(r),new Error(Ri);return Ms.add(o),r}var Bn=Object.defineProperty,$n=(e,t,r)=>t in e?Bn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,O=(e,t,r)=>$n(e,typeof t!="symbol"?t+"":t,r),zn=Object.defineProperty,Wn=(e,t,r)=>t in e?zn(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Mi=(e,t,r)=>Wn(e,typeof t!="symbol"?t+"":t,r);Date.now().toString();var qn=class{constructor(){Mi(this,"idNodeMap",new Map),Mi(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let s=this.nodeMetaMap.get(o);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function jn(){return new qn}function Vn(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function Gn(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var r=function o(){return this instanceof o?Reflect.construct(t,arguments,this.constructor):t.apply(this,arguments)};r.prototype=t.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(e).forEach(function(o){var s=Object.getOwnPropertyDescriptor(e,o);Object.defineProperty(r,o,s.get?s:{enumerable:!0,get:function(){return e[o]}})}),r}var De={exports:{}},Ni;function Yn(){if(Ni)return De.exports;Ni=1;var e=String,t=function(){return{isColorSupported:!1,reset:e,bold:e,dim:e,italic:e,underline:e,inverse:e,hidden:e,strikethrough:e,black:e,red:e,green:e,yellow:e,blue:e,magenta:e,cyan:e,white:e,gray:e,bgBlack:e,bgRed:e,bgGreen:e,bgYellow:e,bgBlue:e,bgMagenta:e,bgCyan:e,bgWhite:e}};return De.exports=t(),De.exports.createColors=t,De.exports}var Hn={},Jn=Object.freeze(Object.defineProperty({__proto__:null,default:Hn},Symbol.toStringTag,{value:"Module"})),X=Gn(Jn),It,Ai;function Lr(){if(Ai)return It;Ai=1;let e=Yn(),t=X;class r extends Error{constructor(s,u,n,a,h,c){super(s),this.name="CssSyntaxError",this.reason=s,h&&(this.file=h),a&&(this.source=a),c&&(this.plugin=c),typeof u<"u"&&typeof n<"u"&&(typeof u=="number"?(this.line=u,this.column=n):(this.line=u.line,this.column=u.column,this.endLine=n.line,this.endColumn=n.column)),this.setMessage(),Error.captureStackTrace&&Error.captureStackTrace(this,r)}setMessage(){this.message=this.plugin?this.plugin+": ":"",this.message+=this.file?this.file:"<css input>",typeof this.line<"u"&&(this.message+=":"+this.line+":"+this.column),this.message+=": "+this.reason}showSourceCode(s){if(!this.source)return"";let u=this.source;s==null&&(s=e.isColorSupported),t&&s&&(u=t(u));let n=u.split(/\r?\n/),a=Math.max(this.line-3,0),h=Math.min(this.line+2,n.length),c=String(h).length,i,p;if(s){let{bold:l,gray:f,red:m}=e.createColors(!0);i=d=>l(m(d)),p=d=>f(d)}else i=p=l=>l;return n.slice(a,h).map((l,f)=>{let m=a+1+f,d=" "+(" "+m).slice(-c)+" | ";if(m===this.line){let g=p(d.replace(/\d/g," "))+l.slice(0,this.column-1).replace(/[^\t]/g," ");return i(">")+p(d)+l+`
|
|
28
|
+
`+g+i("^")}return" "+p(d)+l}).join(`
|
|
29
|
+
`)}toString(){let s=this.showSourceCode();return s&&(s=`
|
|
30
|
+
|
|
31
|
+
`+s+`
|
|
32
|
+
`),this.name+": "+this.message+s}}return It=r,r.default=r,It}var Te={},Oi;function kr(){return Oi||(Oi=1,Te.isClean=Symbol("isClean"),Te.my=Symbol("my")),Te}var Lt,Di;function Ns(){if(Di)return Lt;Di=1;let e={after:`
|
|
33
|
+
`,beforeClose:`
|
|
34
|
+
`,beforeComment:`
|
|
35
|
+
`,beforeDecl:`
|
|
36
|
+
`,beforeOpen:" ",beforeRule:`
|
|
37
|
+
`,colon:": ",commentLeft:" ",commentRight:" ",emptyBody:"",indent:" ",semicolon:!1};function t(o){return o[0].toUpperCase()+o.slice(1)}class r{constructor(s){this.builder=s}atrule(s,u){let n="@"+s.name,a=s.params?this.rawValue(s,"params"):"";if(typeof s.raws.afterName<"u"?n+=s.raws.afterName:a&&(n+=" "),s.nodes)this.block(s,n+a);else{let h=(s.raws.between||"")+(u?";":"");this.builder(n+a+h,s)}}beforeAfter(s,u){let n;s.type==="decl"?n=this.raw(s,null,"beforeDecl"):s.type==="comment"?n=this.raw(s,null,"beforeComment"):u==="before"?n=this.raw(s,null,"beforeRule"):n=this.raw(s,null,"beforeClose");let a=s.parent,h=0;for(;a&&a.type!=="root";)h+=1,a=a.parent;if(n.includes(`
|
|
38
|
+
`)){let c=this.raw(s,null,"indent");if(c.length)for(let i=0;i<h;i++)n+=c}return n}block(s,u){let n=this.raw(s,"between","beforeOpen");this.builder(u+n+"{",s,"start");let a;s.nodes&&s.nodes.length?(this.body(s),a=this.raw(s,"after")):a=this.raw(s,"after","emptyBody"),a&&this.builder(a),this.builder("}",s,"end")}body(s){let u=s.nodes.length-1;for(;u>0&&s.nodes[u].type==="comment";)u-=1;let n=this.raw(s,"semicolon");for(let a=0;a<s.nodes.length;a++){let h=s.nodes[a],c=this.raw(h,"before");c&&this.builder(c),this.stringify(h,u!==a||n)}}comment(s){let u=this.raw(s,"left","commentLeft"),n=this.raw(s,"right","commentRight");this.builder("/*"+u+s.text+n+"*/",s)}decl(s,u){let n=this.raw(s,"between","colon"),a=s.prop+n+this.rawValue(s,"value");s.important&&(a+=s.raws.important||" !important"),u&&(a+=";"),this.builder(a,s)}document(s){this.body(s)}raw(s,u,n){let a;if(n||(n=u),u&&(a=s.raws[u],typeof a<"u"))return a;let h=s.parent;if(n==="before"&&(!h||h.type==="root"&&h.first===s||h&&h.type==="document"))return"";if(!h)return e[n];let c=s.root();if(c.rawCache||(c.rawCache={}),typeof c.rawCache[n]<"u")return c.rawCache[n];if(n==="before"||n==="after")return this.beforeAfter(s,n);{let i="raw"+t(n);this[i]?a=this[i](c,s):c.walk(p=>{if(a=p.raws[u],typeof a<"u")return!1})}return typeof a>"u"&&(a=e[n]),c.rawCache[n]=a,a}rawBeforeClose(s){let u;return s.walk(n=>{if(n.nodes&&n.nodes.length>0&&typeof n.raws.after<"u")return u=n.raws.after,u.includes(`
|
|
39
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawBeforeComment(s,u){let n;return s.walkComments(a=>{if(typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
|
|
40
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(u,null,"beforeDecl"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeDecl(s,u){let n;return s.walkDecls(a=>{if(typeof a.raws.before<"u")return n=a.raws.before,n.includes(`
|
|
41
|
+
`)&&(n=n.replace(/[^\n]+$/,"")),!1}),typeof n>"u"?n=this.raw(u,null,"beforeRule"):n&&(n=n.replace(/\S/g,"")),n}rawBeforeOpen(s){let u;return s.walk(n=>{if(n.type!=="decl"&&(u=n.raws.between,typeof u<"u"))return!1}),u}rawBeforeRule(s){let u;return s.walk(n=>{if(n.nodes&&(n.parent!==s||s.first!==n)&&typeof n.raws.before<"u")return u=n.raws.before,u.includes(`
|
|
42
|
+
`)&&(u=u.replace(/[^\n]+$/,"")),!1}),u&&(u=u.replace(/\S/g,"")),u}rawColon(s){let u;return s.walkDecls(n=>{if(typeof n.raws.between<"u")return u=n.raws.between.replace(/[^\s:]/g,""),!1}),u}rawEmptyBody(s){let u;return s.walk(n=>{if(n.nodes&&n.nodes.length===0&&(u=n.raws.after,typeof u<"u"))return!1}),u}rawIndent(s){if(s.raws.indent)return s.raws.indent;let u;return s.walk(n=>{let a=n.parent;if(a&&a!==s&&a.parent&&a.parent===s&&typeof n.raws.before<"u"){let h=n.raws.before.split(`
|
|
43
|
+
`);return u=h[h.length-1],u=u.replace(/\S/g,""),!1}}),u}rawSemicolon(s){let u;return s.walk(n=>{if(n.nodes&&n.nodes.length&&n.last.type==="decl"&&(u=n.raws.semicolon,typeof u<"u"))return!1}),u}rawValue(s,u){let n=s[u],a=s.raws[u];return a&&a.value===n?a.raw:n}root(s){this.body(s),s.raws.after&&this.builder(s.raws.after)}rule(s){this.block(s,this.rawValue(s,"selector")),s.raws.ownSemicolon&&this.builder(s.raws.ownSemicolon,s,"end")}stringify(s,u){if(!this[s.type])throw new Error("Unknown AST node type "+s.type+". Maybe you need to change PostCSS stringifier.");this[s.type](s,u)}}return Lt=r,r.default=r,Lt}var kt,Ti;function Xe(){if(Ti)return kt;Ti=1;let e=Ns();function t(r,o){new e(o).stringify(r)}return kt=t,t.default=t,kt}var Ft,_i;function Ze(){if(_i)return Ft;_i=1;let{isClean:e,my:t}=kr(),r=Lr(),o=Ns(),s=Xe();function u(a,h){let c=new a.constructor;for(let i in a){if(!Object.prototype.hasOwnProperty.call(a,i)||i==="proxyCache")continue;let p=a[i],l=typeof p;i==="parent"&&l==="object"?h&&(c[i]=h):i==="source"?c[i]=p:Array.isArray(p)?c[i]=p.map(f=>u(f,c)):(l==="object"&&p!==null&&(p=u(p)),c[i]=p)}return c}class n{constructor(h={}){this.raws={},this[e]=!1,this[t]=!0;for(let c in h)if(c==="nodes"){this.nodes=[];for(let i of h[c])typeof i.clone=="function"?this.append(i.clone()):this.append(i)}else this[c]=h[c]}addToError(h){if(h.postcssNode=this,h.stack&&this.source&&/\n\s{4}at /.test(h.stack)){let c=this.source;h.stack=h.stack.replace(/\n\s{4}at /,`$&${c.input.from}:${c.start.line}:${c.start.column}$&`)}return h}after(h){return this.parent.insertAfter(this,h),this}assign(h={}){for(let c in h)this[c]=h[c];return this}before(h){return this.parent.insertBefore(this,h),this}cleanRaws(h){delete this.raws.before,delete this.raws.after,h||delete this.raws.between}clone(h={}){let c=u(this);for(let i in h)c[i]=h[i];return c}cloneAfter(h={}){let c=this.clone(h);return this.parent.insertAfter(this,c),c}cloneBefore(h={}){let c=this.clone(h);return this.parent.insertBefore(this,c),c}error(h,c={}){if(this.source){let{end:i,start:p}=this.rangeBy(c);return this.source.input.error(h,{column:p.column,line:p.line},{column:i.column,line:i.line},c)}return new r(h)}getProxyProcessor(){return{get(h,c){return c==="proxyOf"?h:c==="root"?()=>h.root().toProxy():h[c]},set(h,c,i){return h[c]===i||(h[c]=i,(c==="prop"||c==="value"||c==="name"||c==="params"||c==="important"||c==="text")&&h.markDirty()),!0}}}markDirty(){if(this[e]){this[e]=!1;let h=this;for(;h=h.parent;)h[e]=!1}}next(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h+1]}positionBy(h,c){let i=this.source.start;if(h.index)i=this.positionInside(h.index,c);else if(h.word){c=this.toString();let p=c.indexOf(h.word);p!==-1&&(i=this.positionInside(p,c))}return i}positionInside(h,c){let i=c||this.toString(),p=this.source.start.column,l=this.source.start.line;for(let f=0;f<h;f++)i[f]===`
|
|
44
|
+
`?(p=1,l+=1):p+=1;return{column:p,line:l}}prev(){if(!this.parent)return;let h=this.parent.index(this);return this.parent.nodes[h-1]}rangeBy(h){let c={column:this.source.start.column,line:this.source.start.line},i=this.source.end?{column:this.source.end.column+1,line:this.source.end.line}:{column:c.column+1,line:c.line};if(h.word){let p=this.toString(),l=p.indexOf(h.word);l!==-1&&(c=this.positionInside(l,p),i=this.positionInside(l+h.word.length,p))}else h.start?c={column:h.start.column,line:h.start.line}:h.index&&(c=this.positionInside(h.index)),h.end?i={column:h.end.column,line:h.end.line}:typeof h.endIndex=="number"?i=this.positionInside(h.endIndex):h.index&&(i=this.positionInside(h.index+1));return(i.line<c.line||i.line===c.line&&i.column<=c.column)&&(i={column:c.column+1,line:c.line}),{end:i,start:c}}raw(h,c){return new o().raw(this,h,c)}remove(){return this.parent&&this.parent.removeChild(this),this.parent=void 0,this}replaceWith(...h){if(this.parent){let c=this,i=!1;for(let p of h)p===this?i=!0:i?(this.parent.insertAfter(c,p),c=p):this.parent.insertBefore(c,p);i||this.remove()}return this}root(){let h=this;for(;h.parent&&h.parent.type!=="document";)h=h.parent;return h}toJSON(h,c){let i={},p=c==null;c=c||new Map;let l=0;for(let f in this){if(!Object.prototype.hasOwnProperty.call(this,f)||f==="parent"||f==="proxyCache")continue;let m=this[f];if(Array.isArray(m))i[f]=m.map(d=>typeof d=="object"&&d.toJSON?d.toJSON(null,c):d);else if(typeof m=="object"&&m.toJSON)i[f]=m.toJSON(null,c);else if(f==="source"){let d=c.get(m.input);d==null&&(d=l,c.set(m.input,l),l++),i[f]={end:m.end,inputId:d,start:m.start}}else i[f]=m}return p&&(i.inputs=[...c.keys()].map(f=>f.toJSON())),i}toProxy(){return this.proxyCache||(this.proxyCache=new Proxy(this,this.getProxyProcessor())),this.proxyCache}toString(h=s){h.stringify&&(h=h.stringify);let c="";return h(this,i=>{c+=i}),c}warn(h,c,i){let p={node:this};for(let l in i)p[l]=i[l];return h.warn(c,p)}get proxyOf(){return this}}return Ft=n,n.default=n,Ft}var Ut,Pi;function Ke(){if(Pi)return Ut;Pi=1;let e=Ze();class t extends e{constructor(o){o&&typeof o.value<"u"&&typeof o.value!="string"&&(o={...o,value:String(o.value)}),super(o),this.type="decl"}get variable(){return this.prop.startsWith("--")||this.prop[0]==="$"}}return Ut=t,t.default=t,Ut}var Bt,Ii;function Qn(){if(Ii)return Bt;Ii=1;let e="useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";return Bt={nanoid:(o=21)=>{let s="",u=o;for(;u--;)s+=e[Math.random()*64|0];return s},customAlphabet:(o,s=21)=>(u=s)=>{let n="",a=u;for(;a--;)n+=o[Math.random()*o.length|0];return n}},Bt}var $t,Li;function As(){if(Li)return $t;Li=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=X,{existsSync:r,readFileSync:o}=X,{dirname:s,join:u}=X;function n(h){return Buffer?Buffer.from(h,"base64").toString():window.atob(h)}class a{constructor(c,i){if(i.map===!1)return;this.loadAnnotation(c),this.inline=this.startWith(this.annotation,"data:");let p=i.map?i.map.prev:void 0,l=this.loadMap(i.from,p);!this.mapFile&&i.from&&(this.mapFile=i.from),this.mapFile&&(this.root=s(this.mapFile)),l&&(this.text=l)}consumer(){return this.consumerCache||(this.consumerCache=new e(this.text)),this.consumerCache}decodeInline(c){let i=/^data:application\/json;charset=utf-?8;base64,/,p=/^data:application\/json;base64,/,l=/^data:application\/json;charset=utf-?8,/,f=/^data:application\/json,/;if(l.test(c)||f.test(c))return decodeURIComponent(c.substr(RegExp.lastMatch.length));if(i.test(c)||p.test(c))return n(c.substr(RegExp.lastMatch.length));let m=c.match(/data:application\/json;([^,]+),/)[1];throw new Error("Unsupported source map encoding "+m)}getAnnotationURL(c){return c.replace(/^\/\*\s*# sourceMappingURL=/,"").trim()}isMap(c){return typeof c!="object"?!1:typeof c.mappings=="string"||typeof c._mappings=="string"||Array.isArray(c.sections)}loadAnnotation(c){let i=c.match(/\/\*\s*# sourceMappingURL=/gm);if(!i)return;let p=c.lastIndexOf(i.pop()),l=c.indexOf("*/",p);p>-1&&l>-1&&(this.annotation=this.getAnnotationURL(c.substring(p,l)))}loadFile(c){if(this.root=s(c),r(c))return this.mapFile=c,o(c,"utf-8").toString().trim()}loadMap(c,i){if(i===!1)return!1;if(i){if(typeof i=="string")return i;if(typeof i=="function"){let p=i(c);if(p){let l=this.loadFile(p);if(!l)throw new Error("Unable to load previous source map: "+p.toString());return l}}else{if(i instanceof e)return t.fromSourceMap(i).toString();if(i instanceof t)return i.toString();if(this.isMap(i))return JSON.stringify(i);throw new Error("Unsupported previous source map format: "+i.toString())}}else{if(this.inline)return this.decodeInline(this.annotation);if(this.annotation){let p=this.annotation;return c&&(p=u(s(c),p)),this.loadFile(p)}}}startWith(c,i){return c?c.substr(0,i.length)===i:!1}withContent(){return!!(this.consumer().sourcesContent&&this.consumer().sourcesContent.length>0)}}return $t=a,a.default=a,$t}var zt,ki;function et(){if(ki)return zt;ki=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=X,{fileURLToPath:r,pathToFileURL:o}=X,{isAbsolute:s,resolve:u}=X,{nanoid:n}=Qn(),a=X,h=Lr(),c=As(),i=Symbol("fromOffsetCache"),p=!!(e&&t),l=!!(u&&s);class f{constructor(d,g={}){if(d===null||typeof d>"u"||typeof d=="object"&&!d.toString)throw new Error(`PostCSS received ${d} instead of CSS string`);if(this.css=d.toString(),this.css[0]==="\uFEFF"||this.css[0]==="\uFFFE"?(this.hasBOM=!0,this.css=this.css.slice(1)):this.hasBOM=!1,g.from&&(!l||/^\w+:\/\//.test(g.from)||s(g.from)?this.file=g.from:this.file=u(g.from)),l&&p){let y=new c(this.css,g);if(y.text){this.map=y;let w=y.consumer().file;!this.file&&w&&(this.file=this.mapResolve(w))}}this.file||(this.id="<input css "+n(6)+">"),this.map&&(this.map.file=this.from)}error(d,g,y,w={}){let S,x,v;if(g&&typeof g=="object"){let E=g,R=y;if(typeof E.offset=="number"){let A=this.fromOffset(E.offset);g=A.line,y=A.col}else g=E.line,y=E.column;if(typeof R.offset=="number"){let A=this.fromOffset(R.offset);x=A.line,v=A.col}else x=R.line,v=R.column}else if(!y){let E=this.fromOffset(g);g=E.line,y=E.col}let b=this.origin(g,y,x,v);return b?S=new h(d,b.endLine===void 0?b.line:{column:b.column,line:b.line},b.endLine===void 0?b.column:{column:b.endColumn,line:b.endLine},b.source,b.file,w.plugin):S=new h(d,x===void 0?g:{column:y,line:g},x===void 0?y:{column:v,line:x},this.css,this.file,w.plugin),S.input={column:y,endColumn:v,endLine:x,line:g,source:this.css},this.file&&(o&&(S.input.url=o(this.file).toString()),S.input.file=this.file),S}fromOffset(d){let g,y;if(this[i])y=this[i];else{let S=this.css.split(`
|
|
45
|
+
`);y=new Array(S.length);let x=0;for(let v=0,b=S.length;v<b;v++)y[v]=x,x+=S[v].length+1;this[i]=y}g=y[y.length-1];let w=0;if(d>=g)w=y.length-1;else{let S=y.length-2,x;for(;w<S;)if(x=w+(S-w>>1),d<y[x])S=x-1;else if(d>=y[x+1])w=x+1;else{w=x;break}}return{col:d-y[w]+1,line:w+1}}mapResolve(d){return/^\w+:\/\//.test(d)?d:u(this.map.consumer().sourceRoot||this.map.root||".",d)}origin(d,g,y,w){if(!this.map)return!1;let S=this.map.consumer(),x=S.originalPositionFor({column:g,line:d});if(!x.source)return!1;let v;typeof y=="number"&&(v=S.originalPositionFor({column:w,line:y}));let b;s(x.source)?b=o(x.source):b=new URL(x.source,this.map.consumer().sourceRoot||o(this.map.mapFile));let E={column:x.column,endColumn:v&&v.column,endLine:v&&v.line,line:x.line,url:b.toString()};if(b.protocol==="file:")if(r)E.file=r(b);else throw new Error("file: protocol is not available in this PostCSS build");let R=S.sourceContentFor(x.source);return R&&(E.source=R),E}toJSON(){let d={};for(let g of["hasBOM","css","file","id"])this[g]!=null&&(d[g]=this[g]);return this.map&&(d.map={...this.map},d.map.consumerCache&&(d.map.consumerCache=void 0)),d}get from(){return this.file||this.id}}return zt=f,f.default=f,a&&a.registerInput&&a.registerInput(f),zt}var Wt,Fi;function Os(){if(Fi)return Wt;Fi=1;let{SourceMapConsumer:e,SourceMapGenerator:t}=X,{dirname:r,relative:o,resolve:s,sep:u}=X,{pathToFileURL:n}=X,a=et(),h=!!(e&&t),c=!!(r&&s&&o&&u);class i{constructor(l,f,m,d){this.stringify=l,this.mapOpts=m.map||{},this.root=f,this.opts=m,this.css=d,this.originalCSS=d,this.usesFileUrls=!this.mapOpts.from&&this.mapOpts.absolute,this.memoizedFileURLs=new Map,this.memoizedPaths=new Map,this.memoizedURLs=new Map}addAnnotation(){let l;this.isInline()?l="data:application/json;base64,"+this.toBase64(this.map.toString()):typeof this.mapOpts.annotation=="string"?l=this.mapOpts.annotation:typeof this.mapOpts.annotation=="function"?l=this.mapOpts.annotation(this.opts.to,this.root):l=this.outputFile()+".map";let f=`
|
|
46
|
+
`;this.css.includes(`\r
|
|
47
|
+
`)&&(f=`\r
|
|
48
|
+
`),this.css+=f+"/*# sourceMappingURL="+l+" */"}applyPrevMaps(){for(let l of this.previous()){let f=this.toUrl(this.path(l.file)),m=l.root||r(l.file),d;this.mapOpts.sourcesContent===!1?(d=new e(l.text),d.sourcesContent&&(d.sourcesContent=null)):d=l.consumer(),this.map.applySourceMap(d,f,this.toUrl(this.path(m)))}}clearAnnotation(){if(this.mapOpts.annotation!==!1)if(this.root){let l;for(let f=this.root.nodes.length-1;f>=0;f--)l=this.root.nodes[f],l.type==="comment"&&l.text.indexOf("# sourceMappingURL=")===0&&this.root.removeChild(f)}else this.css&&(this.css=this.css.replace(/\n*?\/\*#[\S\s]*?\*\/$/gm,""))}generate(){if(this.clearAnnotation(),c&&h&&this.isMap())return this.generateMap();{let l="";return this.stringify(this.root,f=>{l+=f}),[l]}}generateMap(){if(this.root)this.generateString();else if(this.previous().length===1){let l=this.previous()[0].consumer();l.file=this.outputFile(),this.map=t.fromSourceMap(l,{ignoreInvalidMapping:!0})}else this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0}),this.map.addMapping({generated:{column:0,line:1},original:{column:0,line:1},source:this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>"});return this.isSourcesContent()&&this.setSourcesContent(),this.root&&this.previous().length>0&&this.applyPrevMaps(),this.isAnnotation()&&this.addAnnotation(),this.isInline()?[this.css]:[this.css,this.map]}generateString(){this.css="",this.map=new t({file:this.outputFile(),ignoreInvalidMapping:!0});let l=1,f=1,m="<no source>",d={generated:{column:0,line:0},original:{column:0,line:0},source:""},g,y;this.stringify(this.root,(w,S,x)=>{if(this.css+=w,S&&x!=="end"&&(d.generated.line=l,d.generated.column=f-1,S.source&&S.source.start?(d.source=this.sourcePath(S),d.original.line=S.source.start.line,d.original.column=S.source.start.column-1,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,this.map.addMapping(d))),g=w.match(/\n/g),g?(l+=g.length,y=w.lastIndexOf(`
|
|
49
|
+
`),f=w.length-y):f+=w.length,S&&x!=="start"){let v=S.parent||{raws:{}};(!(S.type==="decl"||S.type==="atrule"&&!S.nodes)||S!==v.last||v.raws.semicolon)&&(S.source&&S.source.end?(d.source=this.sourcePath(S),d.original.line=S.source.end.line,d.original.column=S.source.end.column-1,d.generated.line=l,d.generated.column=f-2,this.map.addMapping(d)):(d.source=m,d.original.line=1,d.original.column=0,d.generated.line=l,d.generated.column=f-1,this.map.addMapping(d)))}})}isAnnotation(){return this.isInline()?!0:typeof this.mapOpts.annotation<"u"?this.mapOpts.annotation:this.previous().length?this.previous().some(l=>l.annotation):!0}isInline(){if(typeof this.mapOpts.inline<"u")return this.mapOpts.inline;let l=this.mapOpts.annotation;return typeof l<"u"&&l!==!0?!1:this.previous().length?this.previous().some(f=>f.inline):!0}isMap(){return typeof this.opts.map<"u"?!!this.opts.map:this.previous().length>0}isSourcesContent(){return typeof this.mapOpts.sourcesContent<"u"?this.mapOpts.sourcesContent:this.previous().length?this.previous().some(l=>l.withContent()):!0}outputFile(){return this.opts.to?this.path(this.opts.to):this.opts.from?this.path(this.opts.from):"to.css"}path(l){if(this.mapOpts.absolute||l.charCodeAt(0)===60||/^\w+:\/\//.test(l))return l;let f=this.memoizedPaths.get(l);if(f)return f;let m=this.opts.to?r(this.opts.to):".";typeof this.mapOpts.annotation=="string"&&(m=r(s(m,this.mapOpts.annotation)));let d=o(m,l);return this.memoizedPaths.set(l,d),d}previous(){if(!this.previousMaps)if(this.previousMaps=[],this.root)this.root.walk(l=>{if(l.source&&l.source.input.map){let f=l.source.input.map;this.previousMaps.includes(f)||this.previousMaps.push(f)}});else{let l=new a(this.originalCSS,this.opts);l.map&&this.previousMaps.push(l.map)}return this.previousMaps}setSourcesContent(){let l={};if(this.root)this.root.walk(f=>{if(f.source){let m=f.source.input.from;if(m&&!l[m]){l[m]=!0;let d=this.usesFileUrls?this.toFileUrl(m):this.toUrl(this.path(m));this.map.setSourceContent(d,f.source.input.css)}}});else if(this.css){let f=this.opts.from?this.toUrl(this.path(this.opts.from)):"<no source>";this.map.setSourceContent(f,this.css)}}sourcePath(l){return this.mapOpts.from?this.toUrl(this.mapOpts.from):this.usesFileUrls?this.toFileUrl(l.source.input.from):this.toUrl(this.path(l.source.input.from))}toBase64(l){return Buffer?Buffer.from(l).toString("base64"):window.btoa(unescape(encodeURIComponent(l)))}toFileUrl(l){let f=this.memoizedFileURLs.get(l);if(f)return f;if(n){let m=n(l).toString();return this.memoizedFileURLs.set(l,m),m}else throw new Error("`map.absolute` option is not available in this PostCSS build")}toUrl(l){let f=this.memoizedURLs.get(l);if(f)return f;u==="\\"&&(l=l.replace(/\\/g,"/"));let m=encodeURI(l).replace(/[#?]/g,encodeURIComponent);return this.memoizedURLs.set(l,m),m}}return Wt=i,Wt}var qt,Ui;function tt(){if(Ui)return qt;Ui=1;let e=Ze();class t extends e{constructor(o){super(o),this.type="comment"}}return qt=t,t.default=t,qt}var jt,Bi;function ce(){if(Bi)return jt;Bi=1;let{isClean:e,my:t}=kr(),r=Ke(),o=tt(),s=Ze(),u,n,a,h;function c(l){return l.map(f=>(f.nodes&&(f.nodes=c(f.nodes)),delete f.source,f))}function i(l){if(l[e]=!1,l.proxyOf.nodes)for(let f of l.proxyOf.nodes)i(f)}class p extends s{append(...f){for(let m of f){let d=this.normalize(m,this.last);for(let g of d)this.proxyOf.nodes.push(g)}return this.markDirty(),this}cleanRaws(f){if(super.cleanRaws(f),this.nodes)for(let m of this.nodes)m.cleanRaws(f)}each(f){if(!this.proxyOf.nodes)return;let m=this.getIterator(),d,g;for(;this.indexes[m]<this.proxyOf.nodes.length&&(d=this.indexes[m],g=f(this.proxyOf.nodes[d],d),g!==!1);)this.indexes[m]+=1;return delete this.indexes[m],g}every(f){return this.nodes.every(f)}getIterator(){this.lastEach||(this.lastEach=0),this.indexes||(this.indexes={}),this.lastEach+=1;let f=this.lastEach;return this.indexes[f]=0,f}getProxyProcessor(){return{get(f,m){return m==="proxyOf"?f:f[m]?m==="each"||typeof m=="string"&&m.startsWith("walk")?(...d)=>f[m](...d.map(g=>typeof g=="function"?(y,w)=>g(y.toProxy(),w):g)):m==="every"||m==="some"?d=>f[m]((g,...y)=>d(g.toProxy(),...y)):m==="root"?()=>f.root().toProxy():m==="nodes"?f.nodes.map(d=>d.toProxy()):m==="first"||m==="last"?f[m].toProxy():f[m]:f[m]},set(f,m,d){return f[m]===d||(f[m]=d,(m==="name"||m==="params"||m==="selector")&&f.markDirty()),!0}}}index(f){return typeof f=="number"?f:(f.proxyOf&&(f=f.proxyOf),this.proxyOf.nodes.indexOf(f))}insertAfter(f,m){let d=this.index(f),g=this.normalize(m,this.proxyOf.nodes[d]).reverse();d=this.index(f);for(let w of g)this.proxyOf.nodes.splice(d+1,0,w);let y;for(let w in this.indexes)y=this.indexes[w],d<y&&(this.indexes[w]=y+g.length);return this.markDirty(),this}insertBefore(f,m){let d=this.index(f),g=d===0?"prepend":!1,y=this.normalize(m,this.proxyOf.nodes[d],g).reverse();d=this.index(f);for(let S of y)this.proxyOf.nodes.splice(d,0,S);let w;for(let S in this.indexes)w=this.indexes[S],d<=w&&(this.indexes[S]=w+y.length);return this.markDirty(),this}normalize(f,m){if(typeof f=="string")f=c(u(f).nodes);else if(typeof f>"u")f=[];else if(Array.isArray(f)){f=f.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type==="root"&&this.type!=="document"){f=f.nodes.slice(0);for(let g of f)g.parent&&g.parent.removeChild(g,"ignore")}else if(f.type)f=[f];else if(f.prop){if(typeof f.value>"u")throw new Error("Value field is missed in node creation");typeof f.value!="string"&&(f.value=String(f.value)),f=[new r(f)]}else if(f.selector)f=[new n(f)];else if(f.name)f=[new a(f)];else if(f.text)f=[new o(f)];else throw new Error("Unknown node type in node creation");return f.map(g=>(g[t]||p.rebuild(g),g=g.proxyOf,g.parent&&g.parent.removeChild(g),g[e]&&i(g),typeof g.raws.before>"u"&&m&&typeof m.raws.before<"u"&&(g.raws.before=m.raws.before.replace(/\S/g,"")),g.parent=this.proxyOf,g))}prepend(...f){f=f.reverse();for(let m of f){let d=this.normalize(m,this.first,"prepend").reverse();for(let g of d)this.proxyOf.nodes.unshift(g);for(let g in this.indexes)this.indexes[g]=this.indexes[g]+d.length}return this.markDirty(),this}push(f){return f.parent=this,this.proxyOf.nodes.push(f),this}removeAll(){for(let f of this.proxyOf.nodes)f.parent=void 0;return this.proxyOf.nodes=[],this.markDirty(),this}removeChild(f){f=this.index(f),this.proxyOf.nodes[f].parent=void 0,this.proxyOf.nodes.splice(f,1);let m;for(let d in this.indexes)m=this.indexes[d],m>=f&&(this.indexes[d]=m-1);return this.markDirty(),this}replaceValues(f,m,d){return d||(d=m,m={}),this.walkDecls(g=>{m.props&&!m.props.includes(g.prop)||m.fast&&!g.value.includes(m.fast)||(g.value=g.value.replace(f,d))}),this.markDirty(),this}some(f){return this.nodes.some(f)}walk(f){return this.each((m,d)=>{let g;try{g=f(m,d)}catch(y){throw m.addToError(y)}return g!==!1&&m.walk&&(g=m.walk(f)),g})}walkAtRules(f,m){return m?f instanceof RegExp?this.walk((d,g)=>{if(d.type==="atrule"&&f.test(d.name))return m(d,g)}):this.walk((d,g)=>{if(d.type==="atrule"&&d.name===f)return m(d,g)}):(m=f,this.walk((d,g)=>{if(d.type==="atrule")return m(d,g)}))}walkComments(f){return this.walk((m,d)=>{if(m.type==="comment")return f(m,d)})}walkDecls(f,m){return m?f instanceof RegExp?this.walk((d,g)=>{if(d.type==="decl"&&f.test(d.prop))return m(d,g)}):this.walk((d,g)=>{if(d.type==="decl"&&d.prop===f)return m(d,g)}):(m=f,this.walk((d,g)=>{if(d.type==="decl")return m(d,g)}))}walkRules(f,m){return m?f instanceof RegExp?this.walk((d,g)=>{if(d.type==="rule"&&f.test(d.selector))return m(d,g)}):this.walk((d,g)=>{if(d.type==="rule"&&d.selector===f)return m(d,g)}):(m=f,this.walk((d,g)=>{if(d.type==="rule")return m(d,g)}))}get first(){if(this.proxyOf.nodes)return this.proxyOf.nodes[0]}get last(){if(this.proxyOf.nodes)return this.proxyOf.nodes[this.proxyOf.nodes.length-1]}}return p.registerParse=l=>{u=l},p.registerRule=l=>{n=l},p.registerAtRule=l=>{a=l},p.registerRoot=l=>{h=l},jt=p,p.default=p,p.rebuild=l=>{l.type==="atrule"?Object.setPrototypeOf(l,a.prototype):l.type==="rule"?Object.setPrototypeOf(l,n.prototype):l.type==="decl"?Object.setPrototypeOf(l,r.prototype):l.type==="comment"?Object.setPrototypeOf(l,o.prototype):l.type==="root"&&Object.setPrototypeOf(l,h.prototype),l[t]=!0,l.nodes&&l.nodes.forEach(f=>{p.rebuild(f)})},jt}var Vt,$i;function Fr(){if($i)return Vt;$i=1;let e=ce(),t,r;class o extends e{constructor(u){super({type:"document",...u}),this.nodes||(this.nodes=[])}toResult(u={}){return new t(new r,this,u).stringify()}}return o.registerLazyResult=s=>{t=s},o.registerProcessor=s=>{r=s},Vt=o,o.default=o,Vt}var Gt,zi;function Ds(){if(zi)return Gt;zi=1;let e={};return Gt=function(r){e[r]||(e[r]=!0,typeof console<"u"&&console.warn&&console.warn(r))},Gt}var Yt,Wi;function Ts(){if(Wi)return Yt;Wi=1;class e{constructor(r,o={}){if(this.type="warning",this.text=r,o.node&&o.node.source){let s=o.node.rangeBy(o);this.line=s.start.line,this.column=s.start.column,this.endLine=s.end.line,this.endColumn=s.end.column}for(let s in o)this[s]=o[s]}toString(){return this.node?this.node.error(this.text,{index:this.index,plugin:this.plugin,word:this.word}).message:this.plugin?this.plugin+": "+this.text:this.text}}return Yt=e,e.default=e,Yt}var Ht,qi;function Ur(){if(qi)return Ht;qi=1;let e=Ts();class t{constructor(o,s,u){this.processor=o,this.messages=[],this.root=s,this.opts=u,this.css=void 0,this.map=void 0}toString(){return this.css}warn(o,s={}){s.plugin||this.lastPlugin&&this.lastPlugin.postcssPlugin&&(s.plugin=this.lastPlugin.postcssPlugin);let u=new e(o,s);return this.messages.push(u),u}warnings(){return this.messages.filter(o=>o.type==="warning")}get content(){return this.css}}return Ht=t,t.default=t,Ht}var Jt,ji;function Xn(){if(ji)return Jt;ji=1;let e=39,t=34,r=92,o=47,s=10,u=32,n=12,a=9,h=13,c=91,i=93,p=40,l=41,f=123,m=125,d=59,g=42,y=58,w=64,S=/[\t\n\f\r "#'()/;[\\\]{}]/g,x=/[\t\n\f\r !"#'():;@[\\\]{}]|\/(?=\*)/g,v=/.[\r\n"'(/\\]/,b=/[\da-f]/i;return Jt=function(R,A={}){let M=R.css.valueOf(),k=A.ignoreErrors,D,C,ne,ee,H,P,j,re,W,F,ve=M.length,N=0,oe=[],te=[];function it(){return N}function ae(V){throw R.error("Unclosed "+V,N)}function st(){return te.length===0&&N>=ve}function nt(V){if(te.length)return te.pop();if(N>=ve)return;let le=V?V.ignoreUnclosed:!1;switch(D=M.charCodeAt(N),D){case s:case u:case a:case h:case n:{C=N;do C+=1,D=M.charCodeAt(C);while(D===u||D===s||D===a||D===h||D===n);F=["space",M.slice(N,C)],N=C-1;break}case c:case i:case f:case m:case y:case d:case l:{let be=String.fromCharCode(D);F=[be,be,N];break}case p:{if(re=oe.length?oe.pop()[1]:"",W=M.charCodeAt(N+1),re==="url"&&W!==e&&W!==t&&W!==u&&W!==s&&W!==a&&W!==n&&W!==h){C=N;do{if(P=!1,C=M.indexOf(")",C+1),C===-1)if(k||le){C=N;break}else ae("bracket");for(j=C;M.charCodeAt(j-1)===r;)j-=1,P=!P}while(P);F=["brackets",M.slice(N,C+1),N,C],N=C}else C=M.indexOf(")",N+1),ee=M.slice(N,C+1),C===-1||v.test(ee)?F=["(","(",N]:(F=["brackets",ee,N,C],N=C);break}case e:case t:{ne=D===e?"'":'"',C=N;do{if(P=!1,C=M.indexOf(ne,C+1),C===-1)if(k||le){C=N+1;break}else ae("string");for(j=C;M.charCodeAt(j-1)===r;)j-=1,P=!P}while(P);F=["string",M.slice(N,C+1),N,C],N=C;break}case w:{S.lastIndex=N+1,S.test(M),S.lastIndex===0?C=M.length-1:C=S.lastIndex-2,F=["at-word",M.slice(N,C+1),N,C],N=C;break}case r:{for(C=N,H=!0;M.charCodeAt(C+1)===r;)C+=1,H=!H;if(D=M.charCodeAt(C+1),H&&D!==o&&D!==u&&D!==s&&D!==a&&D!==h&&D!==n&&(C+=1,b.test(M.charAt(C)))){for(;b.test(M.charAt(C+1));)C+=1;M.charCodeAt(C+1)===u&&(C+=1)}F=["word",M.slice(N,C+1),N,C],N=C;break}default:{D===o&&M.charCodeAt(N+1)===g?(C=M.indexOf("*/",N+2)+1,C===0&&(k||le?C=M.length:ae("comment")),F=["comment",M.slice(N,C+1),N,C],N=C):(x.lastIndex=N+1,x.test(M),x.lastIndex===0?C=M.length-1:C=x.lastIndex-2,F=["word",M.slice(N,C+1),N,C],oe.push(F),N=C);break}}return N++,F}function ot(V){te.push(V)}return{back:ot,endOfFile:st,nextToken:nt,position:it}},Jt}var Qt,Vi;function Br(){if(Vi)return Qt;Vi=1;let e=ce();class t extends e{constructor(o){super(o),this.type="atrule"}append(...o){return this.proxyOf.nodes||(this.nodes=[]),super.append(...o)}prepend(...o){return this.proxyOf.nodes||(this.nodes=[]),super.prepend(...o)}}return Qt=t,t.default=t,e.registerAtRule(t),Qt}var Xt,Gi;function Me(){if(Gi)return Xt;Gi=1;let e=ce(),t,r;class o extends e{constructor(u){super(u),this.type="root",this.nodes||(this.nodes=[])}normalize(u,n,a){let h=super.normalize(u);if(n){if(a==="prepend")this.nodes.length>1?n.raws.before=this.nodes[1].raws.before:delete n.raws.before;else if(this.first!==n)for(let c of h)c.raws.before=n.raws.before}return h}removeChild(u,n){let a=this.index(u);return!n&&a===0&&this.nodes.length>1&&(this.nodes[1].raws.before=this.nodes[a].raws.before),super.removeChild(u)}toResult(u={}){return new t(new r,this,u).stringify()}}return o.registerLazyResult=s=>{t=s},o.registerProcessor=s=>{r=s},Xt=o,o.default=o,e.registerRoot(o),Xt}var Zt,Yi;function _s(){if(Yi)return Zt;Yi=1;let e={comma(t){return e.split(t,[","],!0)},space(t){let r=[" ",`
|
|
50
|
+
`," "];return e.split(t,r)},split(t,r,o){let s=[],u="",n=!1,a=0,h=!1,c="",i=!1;for(let p of t)i?i=!1:p==="\\"?i=!0:h?p===c&&(h=!1):p==='"'||p==="'"?(h=!0,c=p):p==="("?a+=1:p===")"?a>0&&(a-=1):a===0&&r.includes(p)&&(n=!0),n?(u!==""&&s.push(u.trim()),u="",n=!1):u+=p;return(o||u!=="")&&s.push(u.trim()),s}};return Zt=e,e.default=e,Zt}var Kt,Hi;function $r(){if(Hi)return Kt;Hi=1;let e=ce(),t=_s();class r extends e{constructor(s){super(s),this.type="rule",this.nodes||(this.nodes=[])}get selectors(){return t.comma(this.selector)}set selectors(s){let u=this.selector?this.selector.match(/,\s*/):null,n=u?u[0]:","+this.raw("between","beforeOpen");this.selector=s.join(n)}}return Kt=r,r.default=r,e.registerRule(r),Kt}var er,Ji;function Zn(){if(Ji)return er;Ji=1;let e=Ke(),t=Xn(),r=tt(),o=Br(),s=Me(),u=$r(),n={empty:!0,space:!0};function a(c){for(let i=c.length-1;i>=0;i--){let p=c[i],l=p[3]||p[2];if(l)return l}}class h{constructor(i){this.input=i,this.root=new s,this.current=this.root,this.spaces="",this.semicolon=!1,this.createTokenizer(),this.root.source={input:i,start:{column:1,line:1,offset:0}}}atrule(i){let p=new o;p.name=i[1].slice(1),p.name===""&&this.unnamedAtrule(p,i),this.init(p,i[2]);let l,f,m,d=!1,g=!1,y=[],w=[];for(;!this.tokenizer.endOfFile();){if(i=this.tokenizer.nextToken(),l=i[0],l==="("||l==="["?w.push(l==="("?")":"]"):l==="{"&&w.length>0?w.push("}"):l===w[w.length-1]&&w.pop(),w.length===0)if(l===";"){p.source.end=this.getPosition(i[2]),p.source.end.offset++,this.semicolon=!0;break}else if(l==="{"){g=!0;break}else if(l==="}"){if(y.length>0){for(m=y.length-1,f=y[m];f&&f[0]==="space";)f=y[--m];f&&(p.source.end=this.getPosition(f[3]||f[2]),p.source.end.offset++)}this.end(i);break}else y.push(i);else y.push(i);if(this.tokenizer.endOfFile()){d=!0;break}}p.raws.between=this.spacesAndCommentsFromEnd(y),y.length?(p.raws.afterName=this.spacesAndCommentsFromStart(y),this.raw(p,"params",y),d&&(i=y[y.length-1],p.source.end=this.getPosition(i[3]||i[2]),p.source.end.offset++,this.spaces=p.raws.between,p.raws.between="")):(p.raws.afterName="",p.params=""),g&&(p.nodes=[],this.current=p)}checkMissedSemicolon(i){let p=this.colon(i);if(p===!1)return;let l=0,f;for(let m=p-1;m>=0&&(f=i[m],!(f[0]!=="space"&&(l+=1,l===2)));m--);throw this.input.error("Missed semicolon",f[0]==="word"?f[3]+1:f[2])}colon(i){let p=0,l,f,m;for(let[d,g]of i.entries()){if(l=g,f=l[0],f==="("&&(p+=1),f===")"&&(p-=1),p===0&&f===":")if(!m)this.doubleColon(l);else{if(m[0]==="word"&&m[1]==="progid")continue;return d}m=l}return!1}comment(i){let p=new r;this.init(p,i[2]),p.source.end=this.getPosition(i[3]||i[2]),p.source.end.offset++;let l=i[1].slice(2,-2);if(/^\s*$/.test(l))p.text="",p.raws.left=l,p.raws.right="";else{let f=l.match(/^(\s*)([^]*\S)(\s*)$/);p.text=f[2],p.raws.left=f[1],p.raws.right=f[3]}}createTokenizer(){this.tokenizer=t(this.input)}decl(i,p){let l=new e;this.init(l,i[0][2]);let f=i[i.length-1];for(f[0]===";"&&(this.semicolon=!0,i.pop()),l.source.end=this.getPosition(f[3]||f[2]||a(i)),l.source.end.offset++;i[0][0]!=="word";)i.length===1&&this.unknownWord(i),l.raws.before+=i.shift()[1];for(l.source.start=this.getPosition(i[0][2]),l.prop="";i.length;){let w=i[0][0];if(w===":"||w==="space"||w==="comment")break;l.prop+=i.shift()[1]}l.raws.between="";let m;for(;i.length;)if(m=i.shift(),m[0]===":"){l.raws.between+=m[1];break}else m[0]==="word"&&/\w/.test(m[1])&&this.unknownWord([m]),l.raws.between+=m[1];(l.prop[0]==="_"||l.prop[0]==="*")&&(l.raws.before+=l.prop[0],l.prop=l.prop.slice(1));let d=[],g;for(;i.length&&(g=i[0][0],!(g!=="space"&&g!=="comment"));)d.push(i.shift());this.precheckMissedSemicolon(i);for(let w=i.length-1;w>=0;w--){if(m=i[w],m[1].toLowerCase()==="!important"){l.important=!0;let S=this.stringFrom(i,w);S=this.spacesFromEnd(i)+S,S!==" !important"&&(l.raws.important=S);break}else if(m[1].toLowerCase()==="important"){let S=i.slice(0),x="";for(let v=w;v>0;v--){let b=S[v][0];if(x.trim().indexOf("!")===0&&b!=="space")break;x=S.pop()[1]+x}x.trim().indexOf("!")===0&&(l.important=!0,l.raws.important=x,i=S)}if(m[0]!=="space"&&m[0]!=="comment")break}i.some(w=>w[0]!=="space"&&w[0]!=="comment")&&(l.raws.between+=d.map(w=>w[1]).join(""),d=[]),this.raw(l,"value",d.concat(i),p),l.value.includes(":")&&!p&&this.checkMissedSemicolon(i)}doubleColon(i){throw this.input.error("Double colon",{offset:i[2]},{offset:i[2]+i[1].length})}emptyRule(i){let p=new u;this.init(p,i[2]),p.selector="",p.raws.between="",this.current=p}end(i){this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.semicolon=!1,this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.spaces="",this.current.parent?(this.current.source.end=this.getPosition(i[2]),this.current.source.end.offset++,this.current=this.current.parent):this.unexpectedClose(i)}endFile(){this.current.parent&&this.unclosedBlock(),this.current.nodes&&this.current.nodes.length&&(this.current.raws.semicolon=this.semicolon),this.current.raws.after=(this.current.raws.after||"")+this.spaces,this.root.source.end=this.getPosition(this.tokenizer.position())}freeSemicolon(i){if(this.spaces+=i[1],this.current.nodes){let p=this.current.nodes[this.current.nodes.length-1];p&&p.type==="rule"&&!p.raws.ownSemicolon&&(p.raws.ownSemicolon=this.spaces,this.spaces="")}}getPosition(i){let p=this.input.fromOffset(i);return{column:p.col,line:p.line,offset:i}}init(i,p){this.current.push(i),i.source={input:this.input,start:this.getPosition(p)},i.raws.before=this.spaces,this.spaces="",i.type!=="comment"&&(this.semicolon=!1)}other(i){let p=!1,l=null,f=!1,m=null,d=[],g=i[1].startsWith("--"),y=[],w=i;for(;w;){if(l=w[0],y.push(w),l==="("||l==="[")m||(m=w),d.push(l==="("?")":"]");else if(g&&f&&l==="{")m||(m=w),d.push("}");else if(d.length===0)if(l===";")if(f){this.decl(y,g);return}else break;else if(l==="{"){this.rule(y);return}else if(l==="}"){this.tokenizer.back(y.pop()),p=!0;break}else l===":"&&(f=!0);else l===d[d.length-1]&&(d.pop(),d.length===0&&(m=null));w=this.tokenizer.nextToken()}if(this.tokenizer.endOfFile()&&(p=!0),d.length>0&&this.unclosedBracket(m),p&&f){if(!g)for(;y.length&&(w=y[y.length-1][0],!(w!=="space"&&w!=="comment"));)this.tokenizer.back(y.pop());this.decl(y,g)}else this.unknownWord(y)}parse(){let i;for(;!this.tokenizer.endOfFile();)switch(i=this.tokenizer.nextToken(),i[0]){case"space":this.spaces+=i[1];break;case";":this.freeSemicolon(i);break;case"}":this.end(i);break;case"comment":this.comment(i);break;case"at-word":this.atrule(i);break;case"{":this.emptyRule(i);break;default:this.other(i);break}this.endFile()}precheckMissedSemicolon(){}raw(i,p,l,f){let m,d,g=l.length,y="",w=!0,S,x;for(let v=0;v<g;v+=1)m=l[v],d=m[0],d==="space"&&v===g-1&&!f?w=!1:d==="comment"?(x=l[v-1]?l[v-1][0]:"empty",S=l[v+1]?l[v+1][0]:"empty",!n[x]&&!n[S]?y.slice(-1)===","?w=!1:y+=m[1]:w=!1):y+=m[1];if(!w){let v=l.reduce((b,E)=>b+E[1],"");i.raws[p]={raw:v,value:y}}i[p]=y}rule(i){i.pop();let p=new u;this.init(p,i[0][2]),p.raws.between=this.spacesAndCommentsFromEnd(i),this.raw(p,"selector",i),this.current=p}spacesAndCommentsFromEnd(i){let p,l="";for(;i.length&&(p=i[i.length-1][0],!(p!=="space"&&p!=="comment"));)l=i.pop()[1]+l;return l}spacesAndCommentsFromStart(i){let p,l="";for(;i.length&&(p=i[0][0],!(p!=="space"&&p!=="comment"));)l+=i.shift()[1];return l}spacesFromEnd(i){let p,l="";for(;i.length&&(p=i[i.length-1][0],p==="space");)l=i.pop()[1]+l;return l}stringFrom(i,p){let l="";for(let f=p;f<i.length;f++)l+=i[f][1];return i.splice(p,i.length-p),l}unclosedBlock(){let i=this.current.source.start;throw this.input.error("Unclosed block",i.line,i.column)}unclosedBracket(i){throw this.input.error("Unclosed bracket",{offset:i[2]},{offset:i[2]+1})}unexpectedClose(i){throw this.input.error("Unexpected }",{offset:i[2]},{offset:i[2]+1})}unknownWord(i){throw this.input.error("Unknown word",{offset:i[0][2]},{offset:i[0][2]+i[0][1].length})}unnamedAtrule(i,p){throw this.input.error("At-rule without name",{offset:p[2]},{offset:p[2]+p[1].length})}}return er=h,er}var tr,Qi;function zr(){if(Qi)return tr;Qi=1;let e=ce(),t=Zn(),r=et();function o(s,u){let n=new r(s,u),a=new t(n);try{a.parse()}catch(h){throw h}return a.root}return tr=o,o.default=o,e.registerParse(o),tr}var rr,Xi;function Ps(){if(Xi)return rr;Xi=1;let{isClean:e,my:t}=kr(),r=Os(),o=Xe(),s=ce(),u=Fr(),n=Ds(),a=Ur(),h=zr(),c=Me(),i={atrule:"AtRule",comment:"Comment",decl:"Declaration",document:"Document",root:"Root",rule:"Rule"},p={AtRule:!0,AtRuleExit:!0,Comment:!0,CommentExit:!0,Declaration:!0,DeclarationExit:!0,Document:!0,DocumentExit:!0,Once:!0,OnceExit:!0,postcssPlugin:!0,prepare:!0,Root:!0,RootExit:!0,Rule:!0,RuleExit:!0},l={Once:!0,postcssPlugin:!0,prepare:!0},f=0;function m(x){return typeof x=="object"&&typeof x.then=="function"}function d(x){let v=!1,b=i[x.type];return x.type==="decl"?v=x.prop.toLowerCase():x.type==="atrule"&&(v=x.name.toLowerCase()),v&&x.append?[b,b+"-"+v,f,b+"Exit",b+"Exit-"+v]:v?[b,b+"-"+v,b+"Exit",b+"Exit-"+v]:x.append?[b,f,b+"Exit"]:[b,b+"Exit"]}function g(x){let v;return x.type==="document"?v=["Document",f,"DocumentExit"]:x.type==="root"?v=["Root",f,"RootExit"]:v=d(x),{eventIndex:0,events:v,iterator:0,node:x,visitorIndex:0,visitors:[]}}function y(x){return x[e]=!1,x.nodes&&x.nodes.forEach(v=>y(v)),x}let w={};class S{constructor(v,b,E){this.stringified=!1,this.processed=!1;let R;if(typeof b=="object"&&b!==null&&(b.type==="root"||b.type==="document"))R=y(b);else if(b instanceof S||b instanceof a)R=y(b.root),b.map&&(typeof E.map>"u"&&(E.map={}),E.map.inline||(E.map.inline=!1),E.map.prev=b.map);else{let A=h;E.syntax&&(A=E.syntax.parse),E.parser&&(A=E.parser),A.parse&&(A=A.parse);try{R=A(b,E)}catch(M){this.processed=!0,this.error=M}R&&!R[t]&&s.rebuild(R)}this.result=new a(v,R,E),this.helpers={...w,postcss:w,result:this.result},this.plugins=this.processor.plugins.map(A=>typeof A=="object"&&A.prepare?{...A,...A.prepare(this.result)}:A)}async(){return this.error?Promise.reject(this.error):this.processed?Promise.resolve(this.result):(this.processing||(this.processing=this.runAsync()),this.processing)}catch(v){return this.async().catch(v)}finally(v){return this.async().then(v,v)}getAsyncError(){throw new Error("Use process(css).then(cb) to work with async plugins")}handleError(v,b){let E=this.result.lastPlugin;try{b&&b.addToError(v),this.error=v,v.name==="CssSyntaxError"&&!v.plugin?(v.plugin=E.postcssPlugin,v.setMessage()):E.postcssVersion}catch(R){console&&console.error&&console.error(R)}return v}prepareVisitors(){this.listeners={};let v=(b,E,R)=>{this.listeners[E]||(this.listeners[E]=[]),this.listeners[E].push([b,R])};for(let b of this.plugins)if(typeof b=="object")for(let E in b){if(!p[E]&&/^[A-Z]/.test(E))throw new Error(`Unknown event ${E} in ${b.postcssPlugin}. Try to update PostCSS (${this.processor.version} now).`);if(!l[E])if(typeof b[E]=="object")for(let R in b[E])R==="*"?v(b,E,b[E][R]):v(b,E+"-"+R.toLowerCase(),b[E][R]);else typeof b[E]=="function"&&v(b,E,b[E])}this.hasListener=Object.keys(this.listeners).length>0}async runAsync(){this.plugin=0;for(let v=0;v<this.plugins.length;v++){let b=this.plugins[v],E=this.runOnRoot(b);if(m(E))try{await E}catch(R){throw this.handleError(R)}}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];){v[e]=!0;let b=[g(v)];for(;b.length>0;){let E=this.visitTick(b);if(m(E))try{await E}catch(R){let A=b[b.length-1].node;throw this.handleError(R,A)}}}if(this.listeners.OnceExit)for(let[b,E]of this.listeners.OnceExit){this.result.lastPlugin=b;try{if(v.type==="document"){let R=v.nodes.map(A=>E(A,this.helpers));await Promise.all(R)}else await E(v,this.helpers)}catch(R){throw this.handleError(R)}}}return this.processed=!0,this.stringify()}runOnRoot(v){this.result.lastPlugin=v;try{if(typeof v=="object"&&v.Once){if(this.result.root.type==="document"){let b=this.result.root.nodes.map(E=>v.Once(E,this.helpers));return m(b[0])?Promise.all(b):b}return v.Once(this.result.root,this.helpers)}else if(typeof v=="function")return v(this.result.root,this.result)}catch(b){throw this.handleError(b)}}stringify(){if(this.error)throw this.error;if(this.stringified)return this.result;this.stringified=!0,this.sync();let v=this.result.opts,b=o;v.syntax&&(b=v.syntax.stringify),v.stringifier&&(b=v.stringifier),b.stringify&&(b=b.stringify);let R=new r(b,this.result.root,this.result.opts).generate();return this.result.css=R[0],this.result.map=R[1],this.result}sync(){if(this.error)throw this.error;if(this.processed)return this.result;if(this.processed=!0,this.processing)throw this.getAsyncError();for(let v of this.plugins){let b=this.runOnRoot(v);if(m(b))throw this.getAsyncError()}if(this.prepareVisitors(),this.hasListener){let v=this.result.root;for(;!v[e];)v[e]=!0,this.walkSync(v);if(this.listeners.OnceExit)if(v.type==="document")for(let b of v.nodes)this.visitSync(this.listeners.OnceExit,b);else this.visitSync(this.listeners.OnceExit,v)}return this.result}then(v,b){return this.async().then(v,b)}toString(){return this.css}visitSync(v,b){for(let[E,R]of v){this.result.lastPlugin=E;let A;try{A=R(b,this.helpers)}catch(M){throw this.handleError(M,b.proxyOf)}if(b.type!=="root"&&b.type!=="document"&&!b.parent)return!0;if(m(A))throw this.getAsyncError()}}visitTick(v){let b=v[v.length-1],{node:E,visitors:R}=b;if(E.type!=="root"&&E.type!=="document"&&!E.parent){v.pop();return}if(R.length>0&&b.visitorIndex<R.length){let[M,k]=R[b.visitorIndex];b.visitorIndex+=1,b.visitorIndex===R.length&&(b.visitors=[],b.visitorIndex=0),this.result.lastPlugin=M;try{return k(E.toProxy(),this.helpers)}catch(D){throw this.handleError(D,E)}}if(b.iterator!==0){let M=b.iterator,k;for(;k=E.nodes[E.indexes[M]];)if(E.indexes[M]+=1,!k[e]){k[e]=!0,v.push(g(k));return}b.iterator=0,delete E.indexes[M]}let A=b.events;for(;b.eventIndex<A.length;){let M=A[b.eventIndex];if(b.eventIndex+=1,M===f){E.nodes&&E.nodes.length&&(E[e]=!0,b.iterator=E.getIterator());return}else if(this.listeners[M]){b.visitors=this.listeners[M];return}}v.pop()}walkSync(v){v[e]=!0;let b=d(v);for(let E of b)if(E===f)v.nodes&&v.each(R=>{R[e]||this.walkSync(R)});else{let R=this.listeners[E];if(R&&this.visitSync(R,v.toProxy()))return}}warnings(){return this.sync().warnings()}get content(){return this.stringify().content}get css(){return this.stringify().css}get map(){return this.stringify().map}get messages(){return this.sync().messages}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){return this.sync().root}get[Symbol.toStringTag](){return"LazyResult"}}return S.registerPostcss=x=>{w=x},rr=S,S.default=S,c.registerLazyResult(S),u.registerLazyResult(S),rr}var ir,Zi;function Kn(){if(Zi)return ir;Zi=1;let e=Os(),t=Xe(),r=Ds(),o=zr(),s=Ur();class u{constructor(a,h,c){h=h.toString(),this.stringified=!1,this._processor=a,this._css=h,this._opts=c,this._map=void 0;let i,p=t;this.result=new s(this._processor,i,this._opts),this.result.css=h;let l=this;Object.defineProperty(this.result,"root",{get(){return l.root}});let f=new e(p,i,this._opts,h);if(f.isMap()){let[m,d]=f.generate();m&&(this.result.css=m),d&&(this.result.map=d)}else f.clearAnnotation(),this.result.css=f.css}async(){return this.error?Promise.reject(this.error):Promise.resolve(this.result)}catch(a){return this.async().catch(a)}finally(a){return this.async().then(a,a)}sync(){if(this.error)throw this.error;return this.result}then(a,h){return this.async().then(a,h)}toString(){return this._css}warnings(){return[]}get content(){return this.result.css}get css(){return this.result.css}get map(){return this.result.map}get messages(){return[]}get opts(){return this.result.opts}get processor(){return this.result.processor}get root(){if(this._root)return this._root;let a,h=o;try{a=h(this._css,this._opts)}catch(c){this.error=c}if(this.error)throw this.error;return this._root=a,a}get[Symbol.toStringTag](){return"NoWorkResult"}}return ir=u,u.default=u,ir}var sr,Ki;function eo(){if(Ki)return sr;Ki=1;let e=Kn(),t=Ps(),r=Fr(),o=Me();class s{constructor(n=[]){this.version="8.4.38",this.plugins=this.normalize(n)}normalize(n){let a=[];for(let h of n)if(h.postcss===!0?h=h():h.postcss&&(h=h.postcss),typeof h=="object"&&Array.isArray(h.plugins))a=a.concat(h.plugins);else if(typeof h=="object"&&h.postcssPlugin)a.push(h);else if(typeof h=="function")a.push(h);else if(!(typeof h=="object"&&(h.parse||h.stringify)))throw new Error(h+" is not a PostCSS plugin");return a}process(n,a={}){return!this.plugins.length&&!a.parser&&!a.stringifier&&!a.syntax?new e(this,n,a):new t(this,n,a)}use(n){return this.plugins=this.plugins.concat(this.normalize([n])),this}}return sr=s,s.default=s,o.registerProcessor(s),r.registerProcessor(s),sr}var nr,es;function to(){if(es)return nr;es=1;let e=Ke(),t=As(),r=tt(),o=Br(),s=et(),u=Me(),n=$r();function a(h,c){if(Array.isArray(h))return h.map(l=>a(l));let{inputs:i,...p}=h;if(i){c=[];for(let l of i){let f={...l,__proto__:s.prototype};f.map&&(f.map={...f.map,__proto__:t.prototype}),c.push(f)}}if(p.nodes&&(p.nodes=h.nodes.map(l=>a(l,c))),p.source){let{inputId:l,...f}=p.source;p.source=f,l!=null&&(p.source.input=c[l])}if(p.type==="root")return new u(p);if(p.type==="decl")return new e(p);if(p.type==="rule")return new n(p);if(p.type==="comment")return new r(p);if(p.type==="atrule")return new o(p);throw new Error("Unknown node type: "+h.type)}return nr=a,a.default=a,nr}var or,ts;function ro(){if(ts)return or;ts=1;let e=Lr(),t=Ke(),r=Ps(),o=ce(),s=eo(),u=Xe(),n=to(),a=Fr(),h=Ts(),c=tt(),i=Br(),p=Ur(),l=et(),f=zr(),m=_s(),d=$r(),g=Me(),y=Ze();function w(...S){return S.length===1&&Array.isArray(S[0])&&(S=S[0]),new s(S)}return w.plugin=function(x,v){let b=!1;function E(...A){console&&console.warn&&!b&&(b=!0,console.warn(x+`: postcss.plugin was deprecated. Migration guide:
|
|
51
|
+
https://evilmartians.com/chronicles/postcss-8-plugin-migration`),process.env.LANG&&process.env.LANG.startsWith("cn")&&console.warn(x+`: \u91CC\u9762 postcss.plugin \u88AB\u5F03\u7528. \u8FC1\u79FB\u6307\u5357:
|
|
52
|
+
https://www.w3ctech.com/topic/2226`));let M=v(...A);return M.postcssPlugin=x,M.postcssVersion=new s().version,M}let R;return Object.defineProperty(E,"postcss",{get(){return R||(R=E()),R}}),E.process=function(A,M,k){return w([E(k)]).process(A,M)},E},w.stringify=u,w.parse=f,w.fromJSON=n,w.list=m,w.comment=S=>new c(S),w.atRule=S=>new i(S),w.decl=S=>new t(S),w.rule=S=>new d(S),w.root=S=>new g(S),w.document=S=>new a(S),w.CssSyntaxError=e,w.Declaration=t,w.Container=o,w.Processor=s,w.Document=a,w.Comment=c,w.Warning=h,w.AtRule=i,w.Result=p,w.Input=l,w.Rule=d,w.Root=g,w.Node=y,r.registerPostcss(w),or=w,w.default=w,or}var io=ro(),B=Vn(io);B.stringify;B.fromJSON;B.plugin;B.parse;B.list;B.document;B.comment;B.atRule;B.rule;B.decl;B.root;B.CssSyntaxError;B.Declaration;B.Container;B.Processor;B.Document;B.Comment;B.Warning;B.AtRule;B.Result;B.Input;B.Rule;B.Root;B.Node;var _=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(_||{});function so(e){let t={},r=/;(?![^(]*\))/g,o=/:(.+)/,s=/\/\*.*?\*\//g;return e.replace(s,"").split(r).forEach(function(u){if(u){let n=u.split(o);n.length>1&&(t[fr(n[0].trim())]=n[1].trim())}}),t}function rs(e){let t=[];for(let r in e){let o=e[r];if(typeof o!="string")continue;let s=lo(r);t.push(`${s}: ${o};`)}return t.join(" ")}var no=/-([a-z])/g,oo=/^--[a-zA-Z0-9-]+$/,fr=e=>oo.test(e)?e:e.replace(no,(t,r)=>r?r.toUpperCase():""),ao=/\B([A-Z])/g,lo=e=>e.replace(ao,"-$1").toLowerCase(),Z=class e{constructor(...t){O(this,"parentElement",null),O(this,"parentNode",null),O(this,"ownerDocument"),O(this,"firstChild",null),O(this,"lastChild",null),O(this,"previousSibling",null),O(this,"nextSibling",null),O(this,"ELEMENT_NODE",1),O(this,"TEXT_NODE",3),O(this,"nodeType"),O(this,"nodeName"),O(this,"RRNodeType")}get childNodes(){let t=[],r=this.firstChild;for(;r;)t.push(r),r=r.nextSibling;return t}contains(t){if(t instanceof e){if(t.ownerDocument!==this.ownerDocument)return!1;if(t===this)return!0}else return!1;for(;t.parentNode;){if(t.parentNode===this)return!0;t=t.parentNode}return!1}appendChild(t){throw new Error("RRDomException: Failed to execute 'appendChild' on 'RRNode': This RRNode type does not support this method.")}insertBefore(t,r){throw new Error("RRDomException: Failed to execute 'insertBefore' on 'RRNode': This RRNode type does not support this method.")}removeChild(t){throw new Error("RRDomException: Failed to execute 'removeChild' on 'RRNode': This RRNode type does not support this method.")}toString(){return"RRNode"}},pr=class e extends Z{constructor(...t){super(t),O(this,"nodeType",9),O(this,"nodeName","#document"),O(this,"compatMode","CSS1Compat"),O(this,"RRNodeType",_.Document),O(this,"textContent",null),this.ownerDocument=this}get documentElement(){return this.childNodes.find(t=>t.RRNodeType===_.Element&&t.tagName==="HTML")||null}get body(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===_.Element&&r.tagName==="BODY"))||null}get head(){var t;return((t=this.documentElement)==null?void 0:t.childNodes.find(r=>r.RRNodeType===_.Element&&r.tagName==="HEAD"))||null}get implementation(){return this}get firstElementChild(){return this.documentElement}appendChild(t){let r=t.RRNodeType;if((r===_.Element||r===_.DocumentType)&&this.childNodes.some(s=>s.RRNodeType===r))throw new Error(`RRDomException: Failed to execute 'appendChild' on 'RRNode': Only one ${r===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let o=Wr(this,t);return o.parentElement=null,o}insertBefore(t,r){let o=t.RRNodeType;if((o===_.Element||o===_.DocumentType)&&this.childNodes.some(u=>u.RRNodeType===o))throw new Error(`RRDomException: Failed to execute 'insertBefore' on 'RRNode': Only one ${o===_.Element?"RRElement":"RRDoctype"} on RRDocument allowed.`);let s=Is(this,t,r);return s.parentElement=null,s}removeChild(t){return Ls(this,t)}open(){this.firstChild=null,this.lastChild=null}close(){}write(t){let r;if(t==='<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">'?r="-//W3C//DTD XHTML 1.0 Transitional//EN":t==='<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" "">'&&(r="-//W3C//DTD HTML 4.0 Transitional//EN"),r){let o=this.createDocumentType("html",r,"");this.open(),this.appendChild(o)}}createDocument(t,r,o){return new e}createDocumentType(t,r,o){let s=new ke(t,r,o);return s.ownerDocument=this,s}createElement(t){let r=new me(t);return r.ownerDocument=this,r}createElementNS(t,r){return this.createElement(r)}createTextNode(t){let r=new Fe(t);return r.ownerDocument=this,r}createComment(t){let r=new Ue(t);return r.ownerDocument=this,r}createCDATASection(t){let r=new Be(t);return r.ownerDocument=this,r}toString(){return"RRDocument"}},ke=class extends Z{constructor(t,r,o){super(),O(this,"nodeType",10),O(this,"RRNodeType",_.DocumentType),O(this,"name"),O(this,"publicId"),O(this,"systemId"),O(this,"textContent",null),this.name=t,this.publicId=r,this.systemId=o,this.nodeName=t}toString(){return"RRDocumentType"}},me=class extends Z{constructor(t){super(),O(this,"nodeType",1),O(this,"RRNodeType",_.Element),O(this,"tagName"),O(this,"attributes",{}),O(this,"shadowRoot",null),O(this,"scrollLeft"),O(this,"scrollTop"),this.tagName=t.toUpperCase(),this.nodeName=t.toUpperCase()}get textContent(){let t="";return this.childNodes.forEach(r=>t+=r.textContent),t}set textContent(t){this.firstChild=null,this.lastChild=null,this.appendChild(this.ownerDocument.createTextNode(t))}get classList(){return new gr(this.attributes.class,t=>{this.attributes.class=t})}get id(){return this.attributes.id||""}get className(){return this.attributes.class||""}get style(){let t=this.attributes.style?so(this.attributes.style):{},r=/\B([A-Z])/g;return t.setProperty=(o,s,u)=>{if(r.test(o))return;let n=fr(o);s?t[n]=s:delete t[n],u==="important"&&(t[n]+=" !important"),this.attributes.style=rs(t)},t.removeProperty=o=>{if(r.test(o))return"";let s=fr(o),u=t[s]||"";return delete t[s],this.attributes.style=rs(t),u},t}getAttribute(t){return this.attributes[t]===void 0?null:this.attributes[t]}setAttribute(t,r){this.attributes[t]=r}setAttributeNS(t,r,o){this.setAttribute(r,o)}removeAttribute(t){delete this.attributes[t]}appendChild(t){return Wr(this,t)}insertBefore(t,r){return Is(this,t,r)}removeChild(t){return Ls(this,t)}attachShadow(t){let r=this.ownerDocument.createElement("SHADOWROOT");return this.shadowRoot=r,r}dispatchEvent(t){return!0}toString(){let t="";for(let r in this.attributes)t+=`${r}="${this.attributes[r]}" `;return`${this.tagName} ${t}`}},dr=class extends me{constructor(){super(...arguments),O(this,"currentTime"),O(this,"volume"),O(this,"paused"),O(this,"muted"),O(this,"playbackRate"),O(this,"loop")}attachShadow(t){throw new Error("RRDomException: Failed to execute 'attachShadow' on 'RRElement': This RRElement does not support attachShadow")}play(){this.paused=!1}pause(){this.paused=!0}},mr=class extends me{constructor(){super(...arguments),O(this,"tagName","DIALOG"),O(this,"nodeName","DIALOG")}get isModal(){return this.getAttribute("rr_open_mode")==="modal"}get open(){return this.getAttribute("open")!==null}close(){this.removeAttribute("open"),this.removeAttribute("rr_open_mode")}show(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","non-modal")}showModal(){this.setAttribute("open",""),this.setAttribute("rr_open_mode","modal")}},Fe=class extends Z{constructor(t){super(),O(this,"nodeType",3),O(this,"nodeName","#text"),O(this,"RRNodeType",_.Text),O(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRText text=${JSON.stringify(this.data)}`}},Ue=class extends Z{constructor(t){super(),O(this,"nodeType",8),O(this,"nodeName","#comment"),O(this,"RRNodeType",_.Comment),O(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRComment text=${JSON.stringify(this.data)}`}},Be=class extends Z{constructor(t){super(),O(this,"nodeName","#cdata-section"),O(this,"nodeType",4),O(this,"RRNodeType",_.CDATA),O(this,"data"),this.data=t}get textContent(){return this.data}set textContent(t){this.data=t}toString(){return`RRCDATASection data=${JSON.stringify(this.data)}`}},gr=class{constructor(t,r){if(O(this,"onChange"),O(this,"classes",[]),O(this,"add",(...o)=>{for(let s of o){let u=String(s);this.classes.indexOf(u)>=0||this.classes.push(u)}this.onChange&&this.onChange(this.classes.join(" "))}),O(this,"remove",(...o)=>{this.classes=this.classes.filter(s=>o.indexOf(s)===-1),this.onChange&&this.onChange(this.classes.join(" "))}),t){let o=t.trim().split(/\s+/);this.classes.push(...o)}this.onChange=r}};function Wr(e,t){return t.parentNode&&t.parentNode.removeChild(t),e.lastChild?(e.lastChild.nextSibling=t,t.previousSibling=e.lastChild):(e.firstChild=t,t.previousSibling=null),e.lastChild=t,t.nextSibling=null,t.parentNode=e,t.parentElement=e,t.ownerDocument=e.ownerDocument,t}function Is(e,t,r){if(!r)return Wr(e,t);if(r.parentNode!==e)throw new Error("Failed to execute 'insertBefore' on 'RRNode': The RRNode before which the new node is to be inserted is not a child of this RRNode.");return t===r||(t.parentNode&&t.parentNode.removeChild(t),t.previousSibling=r.previousSibling,r.previousSibling=t,t.nextSibling=r,t.previousSibling?t.previousSibling.nextSibling=t:e.firstChild=t,t.parentElement=e,t.parentNode=e,t.ownerDocument=e.ownerDocument),t}function Ls(e,t){if(t.parentNode!==e)throw new Error("Failed to execute 'removeChild' on 'RRNode': The RRNode to be removed is not a child of this RRNode.");return t.previousSibling?t.previousSibling.nextSibling=t.nextSibling:e.firstChild=t.nextSibling,t.nextSibling?t.nextSibling.previousSibling=t.previousSibling:e.lastChild=t.previousSibling,t.previousSibling=null,t.nextSibling=null,t.parentElement=null,t.parentNode=null,t}var G=(e=>(e[e.PLACEHOLDER=0]="PLACEHOLDER",e[e.ELEMENT_NODE=1]="ELEMENT_NODE",e[e.ATTRIBUTE_NODE=2]="ATTRIBUTE_NODE",e[e.TEXT_NODE=3]="TEXT_NODE",e[e.CDATA_SECTION_NODE=4]="CDATA_SECTION_NODE",e[e.ENTITY_REFERENCE_NODE=5]="ENTITY_REFERENCE_NODE",e[e.ENTITY_NODE=6]="ENTITY_NODE",e[e.PROCESSING_INSTRUCTION_NODE=7]="PROCESSING_INSTRUCTION_NODE",e[e.COMMENT_NODE=8]="COMMENT_NODE",e[e.DOCUMENT_NODE=9]="DOCUMENT_NODE",e[e.DOCUMENT_TYPE_NODE=10]="DOCUMENT_TYPE_NODE",e[e.DOCUMENT_FRAGMENT_NODE=11]="DOCUMENT_FRAGMENT_NODE",e))(G||{}),yr={svg:"http://www.w3.org/2000/svg","xlink:href":"http://www.w3.org/1999/xlink",xmlns:"http://www.w3.org/2000/xmlns/"},uo={altglyph:"altGlyph",altglyphdef:"altGlyphDef",altglyphitem:"altGlyphItem",animatecolor:"animateColor",animatemotion:"animateMotion",animatetransform:"animateTransform",clippath:"clipPath",feblend:"feBlend",fecolormatrix:"feColorMatrix",fecomponenttransfer:"feComponentTransfer",fecomposite:"feComposite",feconvolvematrix:"feConvolveMatrix",fediffuselighting:"feDiffuseLighting",fedisplacementmap:"feDisplacementMap",fedistantlight:"feDistantLight",fedropshadow:"feDropShadow",feflood:"feFlood",fefunca:"feFuncA",fefuncb:"feFuncB",fefuncg:"feFuncG",fefuncr:"feFuncR",fegaussianblur:"feGaussianBlur",feimage:"feImage",femerge:"feMerge",femergenode:"feMergeNode",femorphology:"feMorphology",feoffset:"feOffset",fepointlight:"fePointLight",fespecularlighting:"feSpecularLighting",fespotlight:"feSpotLight",fetile:"feTile",feturbulence:"feTurbulence",foreignobject:"foreignObject",glyphref:"glyphRef",lineargradient:"linearGradient",radialgradient:"radialGradient"},K=null;function $e(e,t,r,o=t.mirror||t.ownerDocument.mirror){e=co(e,t,r,o),ks(e,t,r,o),ho(e,t,r)}function co(e,t,r,o){var s;if(r.afterAppend&&!K&&(K=new WeakSet,setTimeout(()=>{K=null},0)),!qr(e,t)){let u=ze(t,r.mirror,o);(s=e.parentNode)==null||s.replaceChild(u,e),e=u}switch(t.RRNodeType){case _.Document:{if(!he(e,t,r.mirror,o)){let u=o.getMeta(t);u&&(r.mirror.removeNodeFromMap(e),e.close(),e.open(),r.mirror.add(e,u),K?.add(e))}break}case _.Element:{let u=e,n=t;switch(n.tagName){case"IFRAME":{let a=e.contentDocument;if(!a)break;$e(a,t.contentDocument,r,o);break}}n.shadowRoot&&(u.shadowRoot||u.attachShadow({mode:"open"}),ks(u.shadowRoot,n.shadowRoot,r,o)),fo(u,n,o);break}}return e}function ho(e,t,r){var o;switch(t.RRNodeType){case _.Document:{let s=t.scrollData;s&&r.applyScroll(s,!0);break}case _.Element:{let s=e,u=t;switch(u.scrollData&&r.applyScroll(u.scrollData,!0),u.inputData&&r.applyInput(u.inputData),u.tagName){case"AUDIO":case"VIDEO":{let n=e,a=u;a.paused!==void 0&&(a.paused?n.pause():n.play()),a.muted!==void 0&&(n.muted=a.muted),a.volume!==void 0&&(n.volume=a.volume),a.currentTime!==void 0&&(n.currentTime=a.currentTime),a.playbackRate!==void 0&&(n.playbackRate=a.playbackRate),a.loop!==void 0&&(n.loop=a.loop);break}case"CANVAS":{let n=t;if(n.rr_dataURL!==null){let a=document.createElement("img");a.onload=()=>{let h=s.getContext("2d");h&&h.drawImage(a,0,0,a.width,a.height)},a.src=n.rr_dataURL}n.canvasMutations.forEach(a=>r.applyCanvas(a.event,a.mutation,e));break}case"STYLE":{let n=s.sheet;n&&t.rules.forEach(a=>r.applyStyleSheetMutation(a,n));break}case"DIALOG":{let n=s,a=u,h=n.open,c=n.matches("dialog:modal"),i=a.open,p=a.isModal,l=c!==p,f=h!==i;if((l||h&&f)&&n.close(),i&&(f||l))try{p?n.showModal():n.show()}catch(m){console.warn(m)}break}}break}case _.Text:case _.Comment:case _.CDATA:{e.textContent!==t.data&&(e.textContent=t.data);break}}K?.has(e)&&(K.delete(e),(o=r.afterAppend)==null||o.call(r,e,r.mirror.getId(e)))}function fo(e,t,r){let o=e.attributes,s=t.attributes;for(let u in s){let n=s[u],a=r.getMeta(t);if(a?.isSVG&&yr[u])e.setAttributeNS(yr[u],u,n);else if(t.tagName==="CANVAS"&&u==="rr_dataURL"){let h=document.createElement("img");h.src=n,h.onload=()=>{let c=e.getContext("2d");c&&c.drawImage(h,0,0,h.width,h.height)}}else{if(t.tagName==="IFRAME"&&u==="srcdoc")continue;try{e.setAttribute(u,n)}catch(h){console.warn(h)}}}for(let{name:u}of Array.from(o))u in s||e.removeAttribute(u);t.scrollLeft&&(e.scrollLeft=t.scrollLeft),t.scrollTop&&(e.scrollTop=t.scrollTop)}function ks(e,t,r,o){let s=Array.from(e.childNodes),u=t.childNodes;if(s.length===0&&u.length===0)return;let n=0,a=s.length-1,h=0,c=u.length-1,i=s[n],p=s[a],l=u[h],f=u[c],m,d;for(;n<=a&&h<=c;)if(i===void 0)i=s[++n];else if(p===void 0)p=s[--a];else if(he(i,l,r.mirror,o))i=s[++n],l=u[++h];else if(he(p,f,r.mirror,o))p=s[--a],f=u[--c];else if(he(i,f,r.mirror,o)){try{e.insertBefore(i,p.nextSibling)}catch(w){console.warn(w)}i=s[++n],f=u[--c]}else if(he(p,l,r.mirror,o)){try{e.insertBefore(p,i)}catch(w){console.warn(w)}p=s[--a],l=u[++h]}else{if(!m){m={};for(let S=n;S<=a;S++){let x=s[S];x&&r.mirror.hasNode(x)&&(m[r.mirror.getId(x)]=S)}}d=m[o.getId(l)];let w=s[d];if(d!==void 0&&w&&he(w,l,r.mirror,o)){try{e.insertBefore(w,i)}catch(S){console.warn(S)}s[d]=void 0}else{let S=ze(l,r.mirror,o);e.nodeName==="#document"&&i&&(S.nodeType===S.DOCUMENT_TYPE_NODE&&i.nodeType===i.DOCUMENT_TYPE_NODE||S.nodeType===S.ELEMENT_NODE&&i.nodeType===i.ELEMENT_NODE)&&(e.removeChild(i),r.mirror.removeNodeFromMap(i),i=s[++n]);try{e.insertBefore(S,i||null)}catch(x){console.warn(x)}}l=u[++h]}if(n>a){let w=u[c+1],S=null;for(w&&(S=r.mirror.getNode(o.getId(w)));h<=c;++h){let x=ze(u[h],r.mirror,o);try{e.insertBefore(x,S)}catch(v){console.warn(v)}}}else if(h>c)for(;n<=a;n++){let w=s[n];if(!(!w||w.parentNode!==e))try{e.removeChild(w),r.mirror.removeNodeFromMap(w)}catch(S){console.warn(S)}}let g=e.firstChild,y=t.firstChild;for(;g!==null&&y!==null;)$e(g,y,r,o),g=g.nextSibling,y=y.nextSibling}function ze(e,t,r){let o=r.getId(e),s=r.getMeta(e),u=null;if(o>-1&&(u=t.getNode(o)),u!==null&&qr(u,e))return u;switch(e.RRNodeType){case _.Document:u=new Document;break;case _.DocumentType:u=document.implementation.createDocumentType(e.name,e.publicId,e.systemId);break;case _.Element:{let n=e.tagName.toLowerCase();n=uo[n]||n,s&&"isSVG"in s&&s?.isSVG?u=document.createElementNS(yr.svg,n):u=document.createElement(e.tagName);break}case _.Text:u=document.createTextNode(e.data);break;case _.Comment:u=document.createComment(e.data);break;case _.CDATA:u=document.createCDATASection(e.data);break}s&&t.add(u,{...s});try{K?.add(u)}catch{}return u}function qr(e,t){return e.nodeType!==t.nodeType?!1:e.nodeType!==e.ELEMENT_NODE||e.tagName.toUpperCase()===t.tagName}function he(e,t,r,o){let s=r.getId(e),u=o.getId(t);return s===-1||s!==u?!1:qr(e,t)}var ge=class e extends pr{constructor(t){super(),O(this,"UNSERIALIZED_STARTING_ID",-2),O(this,"_unserializedId",this.UNSERIALIZED_STARTING_ID),O(this,"mirror",bo()),O(this,"scrollData",null),t&&(this.mirror=t)}get unserializedId(){return this._unserializedId--}createDocument(t,r,o){return new e}createDocumentType(t,r,o){let s=new po(t,r,o);return s.ownerDocument=this,s}createElement(t){let r=t.toUpperCase(),o;switch(r){case"AUDIO":case"VIDEO":o=new wr(r);break;case"IFRAME":o=new xr(r,this.mirror);break;case"CANVAS":o=new br(r);break;case"STYLE":o=new Sr(r);break;case"DIALOG":o=new vr(r);break;default:o=new ye(r);break}return o.ownerDocument=this,o}createComment(t){let r=new go(t);return r.ownerDocument=this,r}createCDATASection(t){let r=new yo(t);return r.ownerDocument=this,r}createTextNode(t){let r=new mo(t);return r.ownerDocument=this,r}destroyTree(){this.firstChild=null,this.lastChild=null,this.mirror.reset()}open(){super.open(),this._unserializedId=this.UNSERIALIZED_STARTING_ID}},po=ke,ye=class extends me{constructor(){super(...arguments),O(this,"inputData",null),O(this,"scrollData",null)}},wr=class extends dr{},vr=class extends mr{},br=class extends ye{constructor(){super(...arguments),O(this,"rr_dataURL",null),O(this,"canvasMutations",[])}getContext(){return null}},Sr=class extends ye{constructor(){super(...arguments),O(this,"rules",[])}},xr=class extends ye{constructor(t,r){super(t),O(this,"contentDocument",new ge),this.contentDocument.mirror=r}},mo=Fe,go=Ue,yo=Be;function wo(e){return e instanceof HTMLFormElement?"FORM":e.tagName.toUpperCase()}function Fs(e,t,r,o){let s;switch(e.nodeType){case G.DOCUMENT_NODE:o&&o.nodeName==="IFRAME"?s=o.contentDocument:(s=t,s.compatMode=e.compatMode);break;case G.DOCUMENT_TYPE_NODE:{let n=e;s=t.createDocumentType(n.name,n.publicId,n.systemId);break}case G.ELEMENT_NODE:{let n=e,a=wo(n);s=t.createElement(a);let h=s;for(let{name:c,value:i}of Array.from(n.attributes))h.attributes[c]=i;n.scrollLeft&&(h.scrollLeft=n.scrollLeft),n.scrollTop&&(h.scrollTop=n.scrollTop);break}case G.TEXT_NODE:s=t.createTextNode(e.textContent||"");break;case G.CDATA_SECTION_NODE:s=t.createCDATASection(e.data);break;case G.COMMENT_NODE:s=t.createComment(e.textContent||"");break;case G.DOCUMENT_FRAGMENT_NODE:s=o.attachShadow({mode:"open"});break;default:return null}let u=r.getMeta(e);return t instanceof ge&&(u||(u=Us(s,t.unserializedId),r.add(e,u)),t.mirror.add(s,{...u})),s}function vo(e,t=jn(),r=new ge){function o(s,u){let n=Fs(s,r,t,u);if(n!==null)if(u?.nodeName!=="IFRAME"&&s.nodeType!==G.DOCUMENT_FRAGMENT_NODE&&(u?.appendChild(n),n.parentNode=u,n.parentElement=u),s.nodeName==="IFRAME"){let a=s.contentDocument;a&&o(a,n)}else(s.nodeType===G.DOCUMENT_NODE||s.nodeType===G.ELEMENT_NODE||s.nodeType===G.DOCUMENT_FRAGMENT_NODE)&&(s.nodeType===G.ELEMENT_NODE&&s.shadowRoot&&o(s.shadowRoot,n),s.childNodes.forEach(a=>o(a,n)))}return o(e,null),r}function bo(){return new Er}var Er=class{constructor(){O(this,"idNodeMap",new Map),O(this,"nodeMetaMap",new WeakMap)}getId(t){var r;return t?((r=this.getMeta(t))==null?void 0:r.id)??-1:-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){let r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(o=>this.removeNodeFromMap(o))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){let o=r.id;this.idNodeMap.set(o,t),this.nodeMetaMap.set(t,r)}replace(t,r){let o=this.getNode(t);if(o){let s=this.nodeMetaMap.get(o);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}};function Us(e,t){switch(e.RRNodeType){case _.Document:return{id:t,type:e.RRNodeType,childNodes:[]};case _.DocumentType:{let r=e;return{id:t,type:e.RRNodeType,name:r.name,publicId:r.publicId,systemId:r.systemId}}case _.Element:return{id:t,type:e.RRNodeType,tagName:e.tagName.toLowerCase(),attributes:{},childNodes:[]};case _.Text:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case _.Comment:return{id:t,type:e.RRNodeType,textContent:e.textContent||""};case _.CDATA:return{id:t,type:e.RRNodeType,textContent:""}}}var is={Node:["childNodes","parentNode","parentElement","textContent","ownerDocument","firstChild","lastChild","nextSibling","previousSibling"],ShadowRoot:["host","styleSheets"],Element:["shadowRoot","querySelector","querySelectorAll"],MutationObserver:[]},ss={Node:["contains","getRootNode"],ShadowRoot:["getSelection"],Element:[],MutationObserver:["constructor"]},_e={},Bs={},So=()=>!!globalThis.Zone;function jr(e){if(_e[e])return _e[e];let t=globalThis[e],r=t.prototype,o=e in is?is[e]:void 0,s=!!(o&&o.every(a=>{var h,c;return!!((c=(h=Object.getOwnPropertyDescriptor(r,a))==null?void 0:h.get)!=null&&c.toString().includes("[native code]"))})),u=e in ss?ss[e]:void 0,n=!!(u&&u.every(a=>{var h;return typeof r[a]=="function"&&((h=r[a])==null?void 0:h.toString().includes("[native code]"))}));if(s&&n&&!So())return _e[e]=t.prototype,t.prototype;try{let a=document.createElement("iframe");a.style.display="none",document.body.appendChild(a);let h=a.contentWindow;if(!h)return t.prototype;let c=h[e].prototype;if(!c)return a.remove(),r;let i=navigator.userAgent;return i.includes("Safari")&&!i.includes("Chrome")?(a.classList.add("rr-block"),a.setAttribute("__rrwebUntaintedMutationObserver",""),Bs[e]=()=>a.remove()):a.remove(),_e[e]=c}catch{return r}}var ar={};function Y(e,t,r){var o,s;let u=(o=ar[e])==null?void 0:o[r];if(u)return u.call(t);let n=jr(e),a=(s=Object.getOwnPropertyDescriptor(n,r))==null?void 0:s.get;return a?((ar[e]||(ar[e]={}))[r]=a,a.call(t)):t[r]}var lr={};function $s(e,t,r){let o=`${e}.${String(r)}`;if(lr[o])return lr[o].bind(t);let u=jr(e)[r];return typeof u!="function"?t[r]:(lr[o]=u,u.bind(t))}function xo(e){return Y("Node",e,"ownerDocument")}function Eo(e){return Y("Node",e,"childNodes")}function Co(e){return Y("Node",e,"parentNode")}function Ro(e){return Y("Node",e,"parentElement")}function Mo(e){return Y("Node",e,"textContent")}function No(e){return Y("Node",e,"firstChild")}function Ao(e){return Y("Node",e,"lastChild")}function Oo(e){return Y("Node",e,"nextSibling")}function Do(e){return Y("Node",e,"previousSibling")}function To(e,t){return $s("Node",e,"contains")(t)}function _o(e){return $s("Node",e,"getRootNode")()}function Po(e){return!e||!("host"in e)?null:Y("ShadowRoot",e,"host")}function Io(e){return e.styleSheets}function Lo(e){return!e||!("shadowRoot"in e)?null:Y("Element",e,"shadowRoot")}function ko(e,t){return Y("Element",e,"querySelector")(t)}function Fo(e,t){return Y("Element",e,"querySelectorAll")(t)}function Uo(){return[jr("MutationObserver").constructor,Bs.MutationObserver??(()=>{})]}var zs=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(zs=()=>new Date().getTime());function Bo(e,t,r){try{if(!(t in e))return()=>{};let o=e[t],s=r(o);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:o}})),e[t]=s,()=>{e[t]=o}}catch{return()=>{}}}var $o={ownerDocument:xo,childNodes:Eo,parentNode:Co,parentElement:Ro,textContent:Mo,firstChild:No,lastChild:Ao,nextSibling:Oo,previousSibling:Do,contains:To,getRootNode:_o,host:Po,styleSheets:Io,shadowRoot:Lo,querySelector:ko,querySelectorAll:Fo,nowTimestamp:zs,mutationObserverCtor:Uo,patch:Bo},fe=`Please stop import mirror directly. Instead of that,\r
|
|
53
|
+
now you can use replayer.getMirror() to access the mirror instance of a replayer,\r
|
|
54
|
+
or you can use record.mirror to access the mirror instance during recording.`,ns={map:{},getId(){return console.error(fe),-1},getNode(){return console.error(fe),null},removeNodeFromMap(){console.error(fe)},has(){return console.error(fe),!1},reset(){console.error(fe)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(ns=new Proxy(ns,{get(e,t,r){return t==="map"&&console.error(fe),Reflect.get(e,t,r)}}));function zo(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach)}function Wo(e){let t={},r=(s,u)=>{let n={value:s,parent:u,children:[]};return t[s.node.id]=n,n},o=[];for(let s of e){let{nextId:u,parentId:n}=s;if(u&&u in t){let a=t[u];if(a.parent){let h=a.parent.children.indexOf(a);a.parent.children.splice(h,0,r(s,a.parent))}else{let h=o.indexOf(a);o.splice(h,0,r(s,null))}continue}if(n in t){let a=t[n];a.children.push(r(s,a));continue}o.push(r(s,null))}return o}function Ws(e,t){t(e.value);for(let r=e.children.length-1;r>=0;r--)Ws(e.children[r],t)}function ur(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function qs(e,t){var r,o;let s=(o=(r=e.ownerDocument)==null?void 0:r.defaultView)==null?void 0:o.frameElement;if(!s||s===t)return{x:0,y:0,relativeScale:1,absoluteScale:1};let u=s.getBoundingClientRect(),n=qs(s,t),a=u.height/s.clientHeight;return{x:u.x*n.relativeScale+n.x,y:u.y*n.relativeScale+n.y,relativeScale:a,absoluteScale:n.absoluteScale*a}}function Pe(e){return e?e instanceof Z&&"shadowRoot"in e?!!e.shadowRoot:!!$o.shadowRoot(e):!1}function xe(e,t){let r=e?.[t[0]];return r?t.length===1?r:xe(r.cssRules,t.slice(1)):null}function os(e){let t=[...e],r=t.pop();return{positions:t,index:r}}function qo(e){let t=new Set,r=[];for(let o=e.length;o--;){let s=e[o];t.has(s.id)||(r.push(s),t.add(s.id))}return r}var Cr=class{constructor(){T(this,"id",1),T(this,"styleIDMap",new WeakMap),T(this,"idStyleMap",new Map)}getId(t){return this.styleIDMap.get(t)??-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let o;return r===void 0?o=this.id++:o=r,this.styleIDMap.set(t,o),this.idStyleMap.set(o,t),o}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}},$=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e[e.Asset=7]="Asset",e))($||{}),L=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(L||{}),q=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(q||{}),We=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(We||{}),Rr=(e=>(e[e.Play=0]="Play",e[e.Pause=1]="Pause",e[e.Seeked=2]="Seeked",e[e.VolumeChange=3]="VolumeChange",e[e.RateChange=4]="RateChange",e))(Rr||{}),I=(e=>(e.Start="start",e.Pause="pause",e.Resume="resume",e.Resize="resize",e.Finish="finish",e.FullsnapshotRebuilded="fullsnapshot-rebuilded",e.LoadStylesheetStart="load-stylesheet-start",e.LoadStylesheetEnd="load-stylesheet-end",e.SkipStart="skip-start",e.SkipEnd="skip-end",e.MouseInteraction="mouse-interaction",e.EventCast="event-cast",e.CustomEvent="custom-event",e.Flush="flush",e.StateChange="state-change",e.PlayBack="play-back",e.Destroy="destroy",e))(I||{}),ie=(e=>(e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment",e))(ie||{}),as="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ee=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(Se=0;Se<as.length;Se++)Ee[as.charCodeAt(Se)]=Se;var Se,jo=function(e){var t=e.length*.75,r=e.length,o,s=0,u,n,a,h;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);var c=new ArrayBuffer(t),i=new Uint8Array(c);for(o=0;o<r;o+=4)u=Ee[e.charCodeAt(o)],n=Ee[e.charCodeAt(o+1)],a=Ee[e.charCodeAt(o+2)],h=Ee[e.charCodeAt(o+3)],i[s++]=u<<2|n>>4,i[s++]=(n&15)<<4|a>>2,i[s++]=(a&3)<<6|h&63;return c},Vo=`(function() {
|
|
55
|
+
"use strict";
|
|
56
|
+
var chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
|
|
57
|
+
var lookup = typeof Uint8Array === "undefined" ? [] : new Uint8Array(256);
|
|
58
|
+
for (var i = 0; i < chars.length; i++) {
|
|
59
|
+
lookup[chars.charCodeAt(i)] = i;
|
|
60
|
+
}
|
|
61
|
+
var encode = function(arraybuffer) {
|
|
62
|
+
var bytes = new Uint8Array(arraybuffer), i2, len = bytes.length, base64 = "";
|
|
63
|
+
for (i2 = 0; i2 < len; i2 += 3) {
|
|
64
|
+
base64 += chars[bytes[i2] >> 2];
|
|
65
|
+
base64 += chars[(bytes[i2] & 3) << 4 | bytes[i2 + 1] >> 4];
|
|
66
|
+
base64 += chars[(bytes[i2 + 1] & 15) << 2 | bytes[i2 + 2] >> 6];
|
|
67
|
+
base64 += chars[bytes[i2 + 2] & 63];
|
|
68
|
+
}
|
|
69
|
+
if (len % 3 === 2) {
|
|
70
|
+
base64 = base64.substring(0, base64.length - 1) + "=";
|
|
71
|
+
} else if (len % 3 === 1) {
|
|
72
|
+
base64 = base64.substring(0, base64.length - 2) + "==";
|
|
73
|
+
}
|
|
74
|
+
return base64;
|
|
75
|
+
};
|
|
76
|
+
const lastBlobMap = /* @__PURE__ */ new Map();
|
|
77
|
+
const transparentBlobMap = /* @__PURE__ */ new Map();
|
|
78
|
+
async function getTransparentBlobFor(width, height, dataURLOptions) {
|
|
79
|
+
const id = \`\${width}-\${height}\`;
|
|
80
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
81
|
+
if (transparentBlobMap.has(id)) return transparentBlobMap.get(id);
|
|
82
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
83
|
+
offscreen.getContext("2d");
|
|
84
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
85
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
86
|
+
const base64 = encode(arrayBuffer);
|
|
87
|
+
transparentBlobMap.set(id, base64);
|
|
88
|
+
return base64;
|
|
89
|
+
} else {
|
|
90
|
+
return "";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
const worker = self;
|
|
94
|
+
worker.onmessage = async function(e) {
|
|
95
|
+
if ("OffscreenCanvas" in globalThis) {
|
|
96
|
+
const { id, bitmap, width, height, dataURLOptions } = e.data;
|
|
97
|
+
const transparentBase64 = getTransparentBlobFor(
|
|
98
|
+
width,
|
|
99
|
+
height,
|
|
100
|
+
dataURLOptions
|
|
101
|
+
);
|
|
102
|
+
const offscreen = new OffscreenCanvas(width, height);
|
|
103
|
+
const ctx = offscreen.getContext("2d");
|
|
104
|
+
ctx.drawImage(bitmap, 0, 0);
|
|
105
|
+
bitmap.close();
|
|
106
|
+
const blob = await offscreen.convertToBlob(dataURLOptions);
|
|
107
|
+
const type = blob.type;
|
|
108
|
+
const arrayBuffer = await blob.arrayBuffer();
|
|
109
|
+
const base64 = encode(arrayBuffer);
|
|
110
|
+
if (!lastBlobMap.has(id) && await transparentBase64 === base64) {
|
|
111
|
+
lastBlobMap.set(id, base64);
|
|
112
|
+
return worker.postMessage({ id });
|
|
113
|
+
}
|
|
114
|
+
if (lastBlobMap.get(id) === base64) return worker.postMessage({ id });
|
|
115
|
+
worker.postMessage({
|
|
116
|
+
id,
|
|
117
|
+
type,
|
|
118
|
+
base64,
|
|
119
|
+
width,
|
|
120
|
+
height
|
|
121
|
+
});
|
|
122
|
+
lastBlobMap.set(id, base64);
|
|
123
|
+
} else {
|
|
124
|
+
return worker.postMessage({ id: e.data.id });
|
|
125
|
+
}
|
|
126
|
+
};
|
|
127
|
+
})();
|
|
128
|
+
//# sourceMappingURL=image-bitmap-data-url-worker-IJpC7g_b.js.map
|
|
129
|
+
`;typeof self<"u"&&self.Blob&&new Blob([Vo],{type:"text/javascript;charset=utf-8"});try{if(Array.from([1],e=>e*2)[0]!==2){let e=document.createElement("iframe");document.body.appendChild(e),Array.from=((Vr=e.contentWindow)==null?void 0:Vr.Array.from)||Array.from,document.body.removeChild(e)}}catch(e){console.debug("Unable to override Array.from",e)}ws();function Go(e){return{all:e=e||new Map,on:function(t,r){var o=e.get(t);o?o.push(r):e.set(t,[r])},off:function(t,r){var o=e.get(t);o&&(r?o.splice(o.indexOf(r)>>>0,1):e.set(t,[]))},emit:function(t,r){var o=e.get(t);o&&o.slice().map(function(s){s(r)}),(o=e.get("*"))&&o.slice().map(function(s){s(t,r)})}}}function Yo(e=window,t=document){if("scrollBehavior"in t.documentElement.style&&e.__forceSmoothScrollPolyfill__!==!0)return;let r=e.HTMLElement||e.Element,o=468,s={scroll:e.scroll||e.scrollTo,scrollBy:e.scrollBy,elementScroll:r.prototype.scroll||h,scrollIntoView:r.prototype.scrollIntoView},u=e.performance&&e.performance.now?e.performance.now.bind(e.performance):Date.now;function n(y){let w=["MSIE ","Trident/","Edge/"];return new RegExp(w.join("|")).test(y)}let a=n(e.navigator.userAgent)?1:0;function h(y,w){this.scrollLeft=y,this.scrollTop=w}function c(y){return .5*(1-Math.cos(Math.PI*y))}function i(y){if(y===null||typeof y!="object"||y.behavior===void 0||y.behavior==="auto"||y.behavior==="instant")return!0;if(typeof y=="object"&&y.behavior==="smooth")return!1;throw new TypeError("behavior member of ScrollOptions "+y.behavior+" is not a valid value for enumeration ScrollBehavior.")}function p(y,w){if(w==="Y")return y.clientHeight+a<y.scrollHeight;if(w==="X")return y.clientWidth+a<y.scrollWidth}function l(y,w){let S=e.getComputedStyle(y,null)["overflow"+w];return S==="auto"||S==="scroll"}function f(y){let w=p(y,"Y")&&l(y,"Y"),S=p(y,"X")&&l(y,"X");return w||S}function m(y){for(;y!==t.body&&f(y)===!1;)y=y.parentNode||y.host;return y}function d(y){let w=u(),S,x,v,b=(w-y.startTime)/o;b=b>1?1:b,S=c(b),x=y.startX+(y.x-y.startX)*S,v=y.startY+(y.y-y.startY)*S,y.method.call(y.scrollable,x,v),(x!==y.x||v!==y.y)&&e.requestAnimationFrame(d.bind(e,y))}function g(y,w,S){let x,v,b,E,R=u();y===t.body?(x=e,v=e.scrollX||e.pageXOffset,b=e.scrollY||e.pageYOffset,E=s.scroll):(x=y,v=y.scrollLeft,b=y.scrollTop,E=h),d({scrollable:x,method:E,startTime:R,startX:v,startY:b,x:w,y:S})}e.scroll=e.scrollTo=function(){if(arguments[0]!==void 0){if(i(arguments[0])===!0){s.scroll.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:e.scrollY||e.pageYOffset);return}g.call(e,t.body,arguments[0].left!==void 0?~~arguments[0].left:e.scrollX||e.pageXOffset,arguments[0].top!==void 0?~~arguments[0].top:e.scrollY||e.pageYOffset)}},e.scrollBy=function(){if(arguments[0]!==void 0){if(i(arguments[0])){s.scrollBy.call(e,arguments[0].left!==void 0?arguments[0].left:typeof arguments[0]!="object"?arguments[0]:0,arguments[0].top!==void 0?arguments[0].top:arguments[1]!==void 0?arguments[1]:0);return}g.call(e,t.body,~~arguments[0].left+(e.scrollX||e.pageXOffset),~~arguments[0].top+(e.scrollY||e.pageYOffset))}},r.prototype.scroll=r.prototype.scrollTo=function(){if(arguments[0]===void 0)return;if(i(arguments[0])===!0){if(typeof arguments[0]=="number"&&arguments[1]===void 0)throw new SyntaxError("Value could not be converted");s.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left:typeof arguments[0]!="object"?~~arguments[0]:this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top:arguments[1]!==void 0?~~arguments[1]:this.scrollTop);return}let y=arguments[0].left,w=arguments[0].top;g.call(this,this,typeof y>"u"?this.scrollLeft:~~y,typeof w>"u"?this.scrollTop:~~w)},r.prototype.scrollBy=function(){if(arguments[0]!==void 0){if(i(arguments[0])===!0){s.elementScroll.call(this,arguments[0].left!==void 0?~~arguments[0].left+this.scrollLeft:~~arguments[0]+this.scrollLeft,arguments[0].top!==void 0?~~arguments[0].top+this.scrollTop:~~arguments[1]+this.scrollTop);return}this.scroll({left:~~arguments[0].left+this.scrollLeft,top:~~arguments[0].top+this.scrollTop,behavior:arguments[0].behavior})}},r.prototype.scrollIntoView=function(){if(i(arguments[0])===!0){s.scrollIntoView.call(this,arguments[0]===void 0?!0:arguments[0]);return}let y=m(this),w=y.getBoundingClientRect(),S=this.getBoundingClientRect();y!==t.body?(g.call(this,y,y.scrollLeft+S.left-w.left,y.scrollTop+S.top-w.top),e.getComputedStyle(y).position!=="fixed"&&e.scrollBy({left:w.left,top:w.top,behavior:"smooth"})):e.scrollBy({left:S.left,top:S.top,behavior:"smooth"})}}var Mr=class{constructor(t=[],r){T(this,"timeOffset",0),T(this,"speed"),T(this,"actions"),T(this,"raf",null),T(this,"lastTimestamp"),this.actions=t,this.speed=r.speed}addAction(t){let r=this.raf===!0;if(!this.actions.length||this.actions[this.actions.length-1].delay<=t.delay)this.actions.push(t);else{let o=this.findActionIndex(t);this.actions.splice(o,0,t)}r&&(this.raf=requestAnimationFrame(this.rafCheck.bind(this)))}start(){this.timeOffset=0,this.lastTimestamp=performance.now(),this.raf=requestAnimationFrame(this.rafCheck.bind(this))}updateLiveTime(){this.raf===!0&&this.rafCheck()}rafCheck(){let t=performance.now();for(this.timeOffset+=(t-this.lastTimestamp)*this.speed,this.lastTimestamp=t;this.actions.length;){let r=this.actions[0];if(this.timeOffset>=r.delay)this.actions.shift(),r.doAction();else break}this.actions.length>0?this.raf=requestAnimationFrame(this.rafCheck.bind(this)):this.raf=!0}clear(){this.raf&&(this.raf!==!0&&cancelAnimationFrame(this.raf),this.raf=null),this.actions.length=0}setSpeed(t){this.speed=t}isActive(){return this.raf!==null}findActionIndex(t){let r=0,o=this.actions.length-1;for(;r<=o;){let s=Math.floor((r+o)/2);if(this.actions[s].delay<t.delay)r=s+1;else if(this.actions[s].delay>t.delay)o=s-1;else return s+1}return r}};function ls(e,t){if(e.type===$.IncrementalSnapshot&&e.data.source===L.MouseMove&&e.data.positions&&e.data.positions.length){let r=e.data.positions[0].timeOffset,o=e.timestamp+r;return e.delay=o-t,o-t}return e.delay=e.timestamp-t,e.delay}function us(e,t){var r=typeof Symbol=="function"&&e[Symbol.iterator];if(!r)return e;var o,s,u=r.call(e),n=[];try{for(;(t===void 0||t-- >0)&&!(o=u.next()).done;)n.push(o.value)}catch(a){s={error:a}}finally{try{o&&!o.done&&(r=u.return)&&r.call(u)}finally{if(s)throw s.error}}return n}var de;(function(e){e[e.NotStarted=0]="NotStarted",e[e.Running=1]="Running",e[e.Stopped=2]="Stopped"})(de||(de={}));var js={type:"xstate.init"};function cr(e){return e===void 0?[]:[].concat(e)}function pe(e){return{type:"xstate.assign",assignment:e}}function cs(e,t){return typeof(e=typeof e=="string"&&t&&t[e]?t[e]:e)=="string"?{type:e}:typeof e=="function"?{type:e.name,exec:e}:e}function qe(e){return function(t){return e===t}}function Vs(e){return typeof e=="string"?{type:e}:e}function hs(e,t){return{value:e,context:t,actions:[],changed:!1,matches:qe(e)}}function fs(e,t,r){var o=t,s=!1;return[e.filter(function(u){if(u.type==="xstate.assign"){s=!0;var n=Object.assign({},o);return typeof u.assignment=="function"?n=u.assignment(o,r):Object.keys(u.assignment).forEach(function(a){n[a]=typeof u.assignment[a]=="function"?u.assignment[a](o,r):u.assignment[a]}),o=n,!1}return!0}),o,s]}function Gs(e,t){t===void 0&&(t={});var r=us(fs(cr(e.states[e.initial].entry).map(function(n){return cs(n,t.actions)}),e.context,js),2),o=r[0],s=r[1],u={config:e,_options:t,initialState:{value:e.initial,actions:o,context:s,matches:qe(e.initial)},transition:function(n,a){var h,c,i=typeof n=="string"?{value:n,context:e.context}:n,p=i.value,l=i.context,f=Vs(a),m=e.states[p];if(m.on){var d=cr(m.on[f.type]);try{for(var g=(function(P){var j=typeof Symbol=="function"&&Symbol.iterator,re=j&&P[j],W=0;if(re)return re.call(P);if(P&&typeof P.length=="number")return{next:function(){return P&&W>=P.length&&(P=void 0),{value:P&&P[W++],done:!P}}};throw new TypeError(j?"Object is not iterable.":"Symbol.iterator is not defined.")})(d),y=g.next();!y.done;y=g.next()){var w=y.value;if(w===void 0)return hs(p,l);var S=typeof w=="string"?{target:w}:w,x=S.target,v=S.actions,b=v===void 0?[]:v,E=S.cond,R=E===void 0?function(){return!0}:E,A=x===void 0,M=x??p,k=e.states[M];if(R(l,f)){var D=us(fs((A?cr(b):[].concat(m.exit,b,k.entry).filter(function(P){return P})).map(function(P){return cs(P,u._options.actions)}),l,f),3),C=D[0],ne=D[1],ee=D[2],H=x??p;return{value:H,context:ne,actions:C,changed:x!==p||C.length>0||ee,matches:qe(H)}}}}catch(P){h={error:P}}finally{try{y&&!y.done&&(c=g.return)&&c.call(g)}finally{if(h)throw h.error}}}return hs(p,l)}};return u}var ps=function(e,t){return e.actions.forEach(function(r){var o=r.exec;return o&&o(e.context,t)})};function Ys(e){var t=e.initialState,r=de.NotStarted,o=new Set,s={_machine:e,send:function(u){r===de.Running&&(t=e.transition(t,u),ps(t,Vs(u)),o.forEach(function(n){return n(t)}))},subscribe:function(u){return o.add(u),u(t),{unsubscribe:function(){return o.delete(u)}}},start:function(u){if(u){var n=typeof u=="object"?u:{context:e.config.context,value:u};t={value:n.value,actions:[],context:n.context,matches:qe(n.value)}}return r=de.Running,ps(t,js),s},stop:function(){return r=de.Stopped,o.clear(),s},get state(){return t},get status(){return r}};return s}function Ho(e,t){for(let r=e.length-1;r>=0;r--){let o=e[r];if(o.type===$.Meta&&o.timestamp<=t)return e.slice(r)}return e}function Jo(e,{getCastFn:t,applyEventsSynchronously:r,emitter:o}){let s=Gs({id:"player",context:e,initial:"paused",states:{playing:{on:{PAUSE:{target:"paused",actions:["pause"]},CAST_EVENT:{target:"playing",actions:"castEvent"},END:{target:"paused",actions:["resetLastPlayedEvent","pause"]},ADD_EVENT:{target:"playing",actions:["addEvent"]}}},paused:{on:{PLAY:{target:"playing",actions:["recordTimeOffset","play"]},CAST_EVENT:{target:"paused",actions:"castEvent"},TO_LIVE:{target:"live",actions:["startLive"]},ADD_EVENT:{target:"paused",actions:["addEvent"]}}},live:{on:{ADD_EVENT:{target:"live",actions:["addEvent"]},CAST_EVENT:{target:"live",actions:["castEvent"]}}}}},{actions:{castEvent:pe({lastPlayedEvent:(u,n)=>n.type==="CAST_EVENT"?n.payload.event:u.lastPlayedEvent}),recordTimeOffset:pe((u,n)=>{let a=u.timeOffset;return"payload"in n&&"timeOffset"in n.payload&&(a=n.payload.timeOffset),{...u,timeOffset:a,baselineTime:u.events[0].timestamp+a}}),play(u){var n;let{timer:a,events:h,baselineTime:c,lastPlayedEvent:i}=u;a.clear();for(let m of h)ls(m,c);let p=Ho(h,c),l=i?.timestamp;i?.type===$.IncrementalSnapshot&&i.data.source===L.MouseMove&&(l=i.timestamp+((n=i.data.positions[0])==null?void 0:n.timeOffset)),c<(l||0)&&o.emit(I.PlayBack);let f=new Array;for(let m of p)if(!(l&&l<c&&(m.timestamp<=l||m===i)))if(m.timestamp<c)f.push(m);else{let d=t(m,!1);a.addAction({doAction:()=>{d()},delay:m.delay})}r(f),o.emit(I.Flush),a.start()},pause(u){u.timer.clear()},resetLastPlayedEvent:pe(u=>({...u,lastPlayedEvent:null})),startLive:pe({baselineTime:(u,n)=>(u.timer.start(),n.type==="TO_LIVE"&&n.payload.baselineTime?n.payload.baselineTime:Date.now())}),addEvent:pe((u,n)=>{let{baselineTime:a,timer:h,events:c}=u;if(n.type==="ADD_EVENT"){let{event:i}=n.payload;ls(i,a);let p=c.length-1;if(!c[p]||c[p].timestamp<=i.timestamp)c.push(i);else{let m=-1,d=0;for(;d<=p;){let g=Math.floor((d+p)/2);c[g].timestamp<=i.timestamp?d=g+1:p=g-1}m===-1&&(m=d),c.splice(m,0,i)}let l=i.timestamp<a,f=t(i,l);l?f():h.isActive()&&h.addAction({doAction:()=>{f()},delay:i.delay})}return{...u,events:c}})}});return Ys(s)}function Qo(e){let t=Gs({id:"speed",context:e,initial:"normal",states:{normal:{on:{FAST_FORWARD:{target:"skipping",actions:["recordSpeed","setSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}},skipping:{on:{BACK_TO_NORMAL:{target:"normal",actions:["restoreSpeed"]},SET_SPEED:{target:"normal",actions:["setSpeed"]}}}}},{actions:{setSpeed:(r,o)=>{"payload"in o&&r.timer.setSpeed(o.payload.speed)},recordSpeed:pe({normalSpeed:r=>r.timer.speed}),restoreSpeed:r=>{r.timer.setSpeed(r.normalSpeed)}}});return Ys(t)}var Xo=e=>[`.${e} { background: currentColor }`,"noscript { display: none !important; }"],ds=new Map;function Hs(e,t){let r=ds.get(e);return r||(r=new Map,ds.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}function se(e,t,r){return async o=>{if(o&&typeof o=="object"&&"rr_type"in o)if(r&&(r.isUnchanged=!1),o.rr_type==="ImageBitmap"&&"args"in o){let s=await se(e,t,r)(o.args);return await createImageBitmap.apply(null,s)}else if("index"in o){if(r||t===null)return o;let{rr_type:s,index:u}=o;return Hs(t,s)[u]}else if("args"in o){let{rr_type:s,args:u}=o,n=window[s];return new n(...await Promise.all(u.map(se(e,t,r))))}else{if("base64"in o)return jo(o.base64);if("src"in o){let s=e.get(o.src);if(s)return s;{let u=new Image;return u.src=o.src,e.set(o.src,u),u}}else if("data"in o&&o.rr_type==="Blob"){let s=await Promise.all(o.data.map(se(e,t,r)));return new Blob(s,{type:o.type})}}else if(Array.isArray(o))return await Promise.all(o.map(se(e,t,r)));return o}}function Zo(e,t){try{return t===We.WebGL?e.getContext("webgl")||e.getContext("experimental-webgl"):e.getContext("webgl2")}catch{return null}}var Ko=["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject"];function ea(e,t){if(!t?.constructor)return;let{name:r}=t.constructor;if(!Ko.includes(r))return;let o=Hs(e,r);o.includes(t)||o.push(t)}async function ta({mutation:e,target:t,type:r,imageMap:o,errorHandler:s}){try{let u=Zo(t,r);if(!u)return;if(e.setter){u[e.property]=e.args[0];return}let n=u[e.property],a=await Promise.all(e.args.map(se(o,u))),h=n.apply(u,a);ea(u,h);let c=!1}catch(u){s(e,u)}}async function ra({event:e,mutations:t,target:r,imageMap:o,errorHandler:s}){let u=r.getContext("2d");if(!u){s(t[0],new Error("Canvas context is null"));return}let n=t.map(async h=>Promise.all(h.args.map(se(o,u))));(await Promise.all(n)).forEach((h,c)=>{let i=t[c];try{if(i.setter){u[i.property]=i.args[0];return}let p=u[i.property];i.property==="drawImage"&&typeof i.args[0]=="string"?(o.get(e),p.apply(u,i.args)):p.apply(u,h)}catch(p){s(i,p)}})}async function ms({event:e,mutation:t,target:r,imageMap:o,canvasEventMap:s,errorHandler:u}){try{let n=s.get(e)||t,a="commands"in n?n.commands:[n];if([We.WebGL,We.WebGL2].includes(t.type)){for(let h=0;h<a.length;h++){let c=a[h];await ta({mutation:c,type:t.type,target:r,imageMap:o,errorHandler:u})}return}await ra({event:e,mutations:a,target:r,imageMap:o,errorHandler:u})}catch(n){u(t,n)}}var Nr=class{constructor(t){T(this,"mediaMap",new Map),T(this,"warn"),T(this,"service"),T(this,"speedService"),T(this,"emitter"),T(this,"getCurrentTime"),T(this,"metadataCallbackMap",new Map),this.warn=t.warn,this.service=t.service,this.speedService=t.speedService,this.emitter=t.emitter,this.getCurrentTime=t.getCurrentTime,this.emitter.on(I.Start,this.start.bind(this)),this.emitter.on(I.SkipStart,this.start.bind(this)),this.emitter.on(I.Pause,this.pause.bind(this)),this.emitter.on(I.Finish,this.pause.bind(this)),this.speedService.subscribe(()=>{this.syncAllMediaElements()})}syncAllMediaElements(t={pause:!1}){this.mediaMap.forEach((r,o)=>{this.syncTargetWithState(o),t.pause&&o.pause()})}start(){this.syncAllMediaElements()}pause(){this.syncAllMediaElements({pause:!0})}seekTo({time:t,target:r,mediaState:o}){if(o.isPlaying){let u=(t-o.lastInteractionTimeOffset)/1e3*o.playbackRate,n="duration"in r&&r.duration;if(Number.isNaN(n)){this.waitForMetadata(r);return}let a=o.currentTimeAtLastInteraction+u;r.loop&&n!==!1&&(a=a%n),r.currentTime=a}else r.pause(),r.currentTime=o.currentTimeAtLastInteraction}waitForMetadata(t){if(this.metadataCallbackMap.has(t)||!("addEventListener"in t))return;let r=()=>{this.metadataCallbackMap.delete(t);let o=this.mediaMap.get(t);o&&this.seekTo({time:this.getCurrentTime(),target:t,mediaState:o})};this.metadataCallbackMap.set(t,r),t.addEventListener("loadedmetadata",r,{once:!0})}getMediaStateFromMutation({target:t,timeOffset:r,mutation:o}){let s=this.mediaMap.get(t),{type:u,playbackRate:n,currentTime:a,muted:h,volume:c,loop:i}=o;return{isPlaying:u===Rr.Play||u!==Rr.Pause&&(s?.isPlaying||t.getAttribute("autoplay")!==null),currentTimeAtLastInteraction:a??s?.currentTimeAtLastInteraction??0,lastInteractionTimeOffset:r,playbackRate:n??s?.playbackRate??1,volume:c??s?.volume??1,muted:h??s?.muted??t.getAttribute("muted")===null,loop:i??s?.loop??t.getAttribute("loop")===null}}syncTargetWithState(t){let r=this.mediaMap.get(t);if(!r)return;let{muted:o,loop:s,volume:u,isPlaying:n}=r,a=this.service.state.matches("paused"),h=r.playbackRate*this.speedService.state.context.timer.speed;try{this.seekTo({time:this.getCurrentTime(),target:t,mediaState:r}),t.volume!==u&&(t.volume=u),t.muted=o,t.loop=s,t.playbackRate!==h&&(t.playbackRate=h),n&&!a?t.play():t.pause()}catch(c){this.warn(`Failed to replay media interactions: ${c.message||c}`)}}addMediaElements(t,r,o){if(!["AUDIO","VIDEO"].includes(t.nodeName))return;let s=t,u=o.getMeta(s);if(!u||!("attributes"in u))return;let n=this.service.state.matches("paused"),a=u.attributes,h=!1;a.rr_mediaState?h=a.rr_mediaState==="played":h=s.getAttribute("autoplay")!==null,h&&n&&s.pause();let c=1;typeof a.rr_mediaPlaybackRate=="number"&&(c=a.rr_mediaPlaybackRate);let i=!1;typeof a.rr_mediaMuted=="boolean"?i=a.rr_mediaMuted:i=s.getAttribute("muted")!==null;let p=!1;typeof a.rr_mediaLoop=="boolean"?p=a.rr_mediaLoop:p=s.getAttribute("loop")!==null;let l=1;typeof a.rr_mediaVolume=="number"&&(l=a.rr_mediaVolume);let f=0;typeof a.rr_mediaCurrentTime=="number"&&(f=a.rr_mediaCurrentTime),this.mediaMap.set(s,{isPlaying:h,currentTimeAtLastInteraction:f,lastInteractionTimeOffset:r,playbackRate:c,volume:l,muted:i,loop:p}),this.syncTargetWithState(s)}mediaMutation({target:t,timeOffset:r,mutation:o}){this.mediaMap.set(t,this.getMediaStateFromMutation({target:t,timeOffset:r,mutation:o})),this.syncTargetWithState(t)}isSupportedMediaElement(t){return["AUDIO","VIDEO"].includes(t.nodeName)}reset(){this.mediaMap.clear()}};function Ie(e,t){if(e.nodeName!=="DIALOG"||e instanceof Z)return;let r=e,o=r.open,s=o&&r.matches("dialog:modal"),u=r.getAttribute("rr_open_mode"),n=typeof t?.attributes.open=="string"||typeof r.getAttribute("open")=="string",a=u==="modal";if(!(o&&!(s&&u==="non-modal"||!s&&a))){if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}o&&r.close(),n&&(a?r.showModal():r.show())}}function ia(e,t){if(e.nodeName!=="DIALOG"||e instanceof Z)return;let r=e;if(!r.isConnected){console.warn("dialog is not attached to the dom",r);return}t.attributes.open===null&&(r.removeAttribute("open"),r.removeAttribute("rr_open_mode"))}var sa=5*1e3,na=Go,gs="[replayer]",hr={duration:500,lineCap:"round",lineWidth:3,strokeStyle:"red"};function ys(e){return e.type==$.IncrementalSnapshot&&(e.data.source==L.TouchMove||e.data.source==L.MouseInteraction&&e.data.type==q.TouchStart)}var je=class{constructor(t,r){if(T(this,"wrapper"),T(this,"iframe"),T(this,"UNSAFE_replayCanvas",!1),T(this,"service"),T(this,"speedService"),T(this,"config"),T(this,"usingVirtualDom",!1),T(this,"virtualDom",new ge),T(this,"mouse"),T(this,"mouseTail",null),T(this,"tailPositions",[]),T(this,"emitter",na()),T(this,"nextUserInteractionEvent"),T(this,"legacy_missingNodeRetryMap",{}),T(this,"cache",Ci()),T(this,"imageMap",new Map),T(this,"canvasEventMap",new Map),T(this,"mirror",ws()),T(this,"styleMirror",new Cr),T(this,"mediaManager"),T(this,"firstFullSnapshot",null),T(this,"newDocumentQueue",[]),T(this,"mousePos",null),T(this,"touchActive",null),T(this,"lastMouseDownEvent",null),T(this,"lastHoveredRootNode"),T(this,"lastSelectionData",null),T(this,"constructedStyleMutations",[]),T(this,"adoptedStyleSheets",[]),T(this,"handleResize",a=>{this.iframe.style.display="inherit";for(let h of[this.mouseTail,this.iframe])h&&(h.setAttribute("width",String(a.width)),h.setAttribute("height",String(a.height)))}),T(this,"applyEventsSynchronously",a=>{for(let h of a){switch(h.type){case $.DomContentLoaded:case $.Load:continue;case $.FullSnapshot:case $.Meta:case $.Plugin:case $.IncrementalSnapshot:break}this.getCastFn(h,!0)()}}),T(this,"getCastFn",(a,h=!1)=>{let c;switch(a.type){case $.DomContentLoaded:case $.Load:break;case $.Custom:c=()=>{this.emitter.emit(I.CustomEvent,a)};break;case $.Meta:c=()=>this.emitter.emit(I.Resize,{width:a.data.width,height:a.data.height});break;case $.FullSnapshot:c=()=>{var p;if(this.firstFullSnapshot){if(this.firstFullSnapshot===a){this.firstFullSnapshot=!0;return}}else this.firstFullSnapshot=!0;this.mediaManager.reset(),this.styleMirror.reset(),this.rebuildFullSnapshot(a,h),(p=this.iframe.contentWindow)==null||p.scrollTo(a.data.initialOffset)};break;case $.IncrementalSnapshot:c=()=>{if(this.applyIncremental(a,h),!h&&(a===this.nextUserInteractionEvent&&(this.nextUserInteractionEvent=null,this.backToNormal()),this.config.skipInactive&&!this.nextUserInteractionEvent)){for(let p of this.service.state.context.events)if(!(p.timestamp<=a.timestamp)&&this.isUserInteraction(p)){p.delay-a.delay>this.config.inactivePeriodThreshold*this.speedService.state.context.timer.speed&&(this.nextUserInteractionEvent=p);break}if(this.nextUserInteractionEvent){let p=this.nextUserInteractionEvent.delay-a.delay,l={speed:Math.min(Math.round(p/sa),this.config.maxSpeed)};this.speedService.send({type:"FAST_FORWARD",payload:l}),this.emitter.emit(I.SkipStart,l)}}};break}return()=>{c&&c();for(let l of this.config.plugins||[])l.handler&&l.handler(a,h,{replayer:this});this.service.send({type:"CAST_EVENT",payload:{event:a}});let p=this.service.state.context.events.length-1;if(!this.config.liveMode&&a===this.service.state.context.events[p]){let l=()=>{p<this.service.state.context.events.length-1||(this.backToNormal(),this.service.send("END"),this.emitter.emit(I.Finish))},f=50;a.type===$.IncrementalSnapshot&&a.data.source===L.MouseMove&&a.data.positions.length&&(f+=Math.max(0,-a.data.positions[0].timeOffset)),setTimeout(l,f)}this.emitter.emit(I.EventCast,a)}}),!r?.liveMode&&t.length<2)throw new Error("Replayer need at least 2 events.");let o={speed:1,maxSpeed:360,root:document.body,loadTimeout:0,skipInactive:!1,inactivePeriodThreshold:10*1e3,showWarning:!0,showDebug:!1,blockClass:"rr-block",liveMode:!1,insertStyleRules:[],triggerFocus:!0,UNSAFE_replayCanvas:!1,pauseAnimation:!0,mouseTail:hr,useVirtualDom:!0,logger:console};this.config=Object.assign({},o,r),this.handleResize=this.handleResize.bind(this),this.getCastFn=this.getCastFn.bind(this),this.applyEventsSynchronously=this.applyEventsSynchronously.bind(this),this.emitter.on(I.Resize,this.handleResize),this.setupDom();for(let a of this.config.plugins||[])a.getMirror&&a.getMirror({nodeMirror:this.mirror});this.emitter.on(I.Flush,()=>{if(this.usingVirtualDom){let a={mirror:this.mirror,applyCanvas:(h,c,i)=>{ms({event:h,mutation:c,target:i,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})},applyInput:this.applyInput.bind(this),applyScroll:this.applyScroll.bind(this),applyStyleSheetMutation:(h,c)=>{h.source===L.StyleSheetRule?this.applyStyleSheetRule(h,c):h.source===L.StyleDeclaration&&this.applyStyleDeclaration(h,c)},afterAppend:(h,c)=>{for(let i of this.config.plugins||[])i.onBuild&&i.onBuild(h,{id:c,replayer:this})}};if(this.iframe.contentDocument)try{$e(this.iframe.contentDocument,this.virtualDom,a,this.virtualDom.mirror)}catch(h){this.warn(h)}if(this.virtualDom.destroyTree(),this.usingVirtualDom=!1,Object.keys(this.legacy_missingNodeRetryMap).length)for(let h in this.legacy_missingNodeRetryMap)try{let c=this.legacy_missingNodeRetryMap[h],i=ze(c.node,this.mirror,this.virtualDom.mirror);$e(i,c.node,a,this.virtualDom.mirror),c.node=i}catch(c){this.warn(c)}this.constructedStyleMutations.forEach(h=>{this.applyStyleSheetMutation(h)}),this.constructedStyleMutations=[],this.adoptedStyleSheets.forEach(h=>{this.applyAdoptedStyleSheet(h)}),this.adoptedStyleSheets=[]}if(this.mousePos&&(this.moveAndHover(this.mousePos.x,this.mousePos.y,this.mousePos.id,!0,this.mousePos.debugData),this.mousePos=null),this.touchActive===!0?this.mouse.classList.add("touch-active"):this.touchActive===!1&&this.mouse.classList.remove("touch-active"),this.touchActive=null,this.lastMouseDownEvent){let[a,h]=this.lastMouseDownEvent;a.dispatchEvent(h)}this.lastMouseDownEvent=null,this.lastSelectionData&&(this.applySelection(this.lastSelectionData),this.lastSelectionData=null)}),this.emitter.on(I.PlayBack,()=>{this.firstFullSnapshot=null,this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset()});let s=new Mr([],{speed:this.config.speed});this.service=Jo({events:t.map(a=>r&&r.unpackFn?r.unpackFn(a):a).sort((a,h)=>a.timestamp-h.timestamp),timer:s,timeOffset:0,baselineTime:0,lastPlayedEvent:null},{getCastFn:this.getCastFn,applyEventsSynchronously:this.applyEventsSynchronously,emitter:this.emitter}),this.service.start(),this.service.subscribe(a=>{this.emitter.emit(I.StateChange,{player:a})}),this.speedService=Qo({normalSpeed:-1,timer:s}),this.speedService.start(),this.speedService.subscribe(a=>{this.emitter.emit(I.StateChange,{speed:a})}),this.mediaManager=new Nr({warn:this.warn.bind(this),service:this.service,speedService:this.speedService,emitter:this.emitter,getCurrentTime:this.getCurrentTime.bind(this)});let u=this.service.state.context.events.find(a=>a.type===$.Meta),n=this.service.state.context.events.find(a=>a.type===$.FullSnapshot);if(u){let{width:a,height:h}=u.data;setTimeout(()=>{this.emitter.emit(I.Resize,{width:a,height:h})},0)}n&&setTimeout(()=>{var a;this.firstFullSnapshot||(this.firstFullSnapshot=n,this.rebuildFullSnapshot(n),(a=this.iframe.contentWindow)==null||a.scrollTo(n.data.initialOffset))},1),this.service.state.context.events.find(ys)&&this.mouse.classList.add("touch-device")}get timer(){return this.service.state.context.timer}on(t,r){return this.emitter.on(t,r),this}off(t,r){return this.emitter.off(t,r),this}setConfig(t){Object.keys(t).forEach(r=>{t[r],this.config[r]=t[r]}),this.config.skipInactive||this.backToNormal(),typeof t.speed<"u"&&this.speedService.send({type:"SET_SPEED",payload:{speed:t.speed}}),typeof t.mouseTail<"u"&&(t.mouseTail===!1?this.mouseTail&&(this.mouseTail.style.display="none"):(this.mouseTail||(this.mouseTail=document.createElement("canvas"),this.mouseTail.width=Number.parseFloat(this.iframe.width),this.mouseTail.height=Number.parseFloat(this.iframe.height),this.mouseTail.classList.add("replayer-mouse-tail"),this.wrapper.insertBefore(this.mouseTail,this.iframe)),this.mouseTail.style.display="inherit"))}getMetaData(){let t=this.service.state.context.events[0],r=this.service.state.context.events[this.service.state.context.events.length-1];return{startTime:t.timestamp,endTime:r.timestamp,totalTime:r.timestamp-t.timestamp}}getCurrentTime(){return this.config.liveMode&&this.timer.updateLiveTime(),this.timer.timeOffset+this.getTimeOffset()}getTimeOffset(){let{baselineTime:t,events:r}=this.service.state.context;return t-r[0].timestamp}getMirror(){return this.mirror}play(t=0){var r,o;this.service.state.matches("paused")?this.service.send({type:"PLAY",payload:{timeOffset:t}}):(this.service.send({type:"PAUSE"}),this.service.send({type:"PLAY",payload:{timeOffset:t}})),(o=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||o.classList.remove("rrweb-paused"),this.emitter.emit(I.Start)}pause(t){var r,o;t===void 0&&this.service.state.matches("playing")&&this.service.send({type:"PAUSE"}),typeof t=="number"&&(this.play(t),this.service.send({type:"PAUSE"})),(o=(r=this.iframe.contentDocument)==null?void 0:r.getElementsByTagName("html")[0])==null||o.classList.add("rrweb-paused"),this.emitter.emit(I.Pause)}resume(t=0){this.warn("The 'resume' was deprecated in 1.0. Please use 'play' method which has the same interface."),this.play(t),this.emitter.emit(I.Resume)}destroy(){this.pause(),this.mirror.reset(),this.styleMirror.reset(),this.mediaManager.reset(),this.config.root.removeChild(this.wrapper),this.emitter.emit(I.Destroy)}startLive(t){this.service.send({type:"TO_LIVE",payload:{baselineTime:t}})}addEvent(t){let r=this.config.unpackFn?this.config.unpackFn(t):t;ys(r)&&this.mouse.classList.add("touch-device"),Promise.resolve().then(()=>this.service.send({type:"ADD_EVENT",payload:{event:r}}))}enableInteract(){this.iframe.setAttribute("scrolling","auto"),this.iframe.style.pointerEvents="auto"}disableInteract(){this.iframe.setAttribute("scrolling","no"),this.iframe.style.pointerEvents="none"}resetCache(){this.cache=Ci()}setupDom(){this.wrapper=document.createElement("div"),this.wrapper.classList.add("replayer-wrapper"),this.config.root.appendChild(this.wrapper),this.mouse=document.createElement("div"),this.mouse.classList.add("replayer-mouse"),this.wrapper.appendChild(this.mouse),this.config.mouseTail!==!1&&(this.mouseTail=document.createElement("canvas"),this.mouseTail.classList.add("replayer-mouse-tail"),this.mouseTail.style.display="inherit",this.wrapper.appendChild(this.mouseTail)),this.config.UNSAFE_replayCanvas?(this.iframe=document.createElement("iframe"),this.iframe.setAttribute("sandbox","allow-same-origin allow-scripts"),this.wrapper.appendChild(this.iframe),this.UNSAFE_replayCanvas=!0):(this.iframe=Un({root:this.wrapper}),this.UNSAFE_replayCanvas=!1),this.iframe.style.display="none",this.disableInteract(),this.iframe.contentWindow&&this.iframe.contentDocument&&(Yo(this.iframe.contentWindow,this.iframe.contentDocument),zo(this.iframe.contentWindow))}rebuildFullSnapshot(t,r=!1){if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");Object.keys(this.legacy_missingNodeRetryMap).length&&this.warn("Found unresolved missing node map",this.legacy_missingNodeRetryMap),this.legacy_missingNodeRetryMap={};let o=[],s=new Set,u=(h,c)=>{if(h.nodeName==="DIALOG"&&s.add(h),this.collectIframeAndAttachDocument(o,h),this.mediaManager.isSupportedMediaElement(h)){let{events:i}=this.service.state.context;this.mediaManager.addMediaElements(h,t.timestamp-i[0].timestamp,this.mirror)}for(let i of this.config.plugins||[])i.onBuild&&i.onBuild(h,{id:c,replayer:this})};this.usingVirtualDom&&(this.virtualDom.destroyTree(),this.usingVirtualDom=!1),this.mirror.reset(),Fn(t.data.node,{doc:this.iframe.contentDocument,afterAppend:u,cache:this.cache,mirror:this.mirror,UNSAFE_allowUnprotectedRebuild:this.UNSAFE_replayCanvas}),u(this.iframe.contentDocument,t.data.node.id);for(let{mutationInQueue:h,builtNode:c}of o)this.attachDocumentToIframe(h,c),this.newDocumentQueue=this.newDocumentQueue.filter(i=>i!==h);let{documentElement:n,head:a}=this.iframe.contentDocument;this.insertStyleRules(n,a),s.forEach(h=>Ie(h)),this.service.state.matches("playing")||this.iframe.contentDocument.getElementsByTagName("html")[0].classList.add("rrweb-paused"),this.emitter.emit(I.FullsnapshotRebuilded,t),r||this.waitForStylesheetLoad(),this.config.UNSAFE_replayCanvas&&this.preloadAllImages()}insertStyleRules(t,r){var o;let s=Xo(this.config.blockClass).concat(this.config.insertStyleRules);if(this.config.pauseAnimation&&s.push("html.rrweb-paused *, html.rrweb-paused *:before, html.rrweb-paused *:after { animation-play-state: paused !important; }"),!!s.length)if(this.usingVirtualDom){let u=this.virtualDom.createElement("style");this.virtualDom.mirror.add(u,Us(u,this.virtualDom.unserializedId)),t.insertBefore(u,r),u.rules.push({source:L.StyleSheetRule,adds:s.map((n,a)=>({rule:n,index:a}))})}else{let u=document.createElement("style");t.insertBefore(u,r);for(let n=0;n<s.length;n++)(o=u.sheet)==null||o.insertRule(s[n],n)}}attachDocumentToIframe(t,r){let o=this.usingVirtualDom?this.virtualDom.mirror:this.mirror,s=[],u=new Set,n=(a,h)=>{a.nodeName==="DIALOG"&&u.add(a),this.collectIframeAndAttachDocument(s,a);let c=o.getMeta(a);if(c?.type===ie.Element&&c?.tagName.toUpperCase()==="HTML"){let{documentElement:i,head:p}=r.contentDocument;this.insertStyleRules(i,p)}if(!this.usingVirtualDom)for(let i of this.config.plugins||[])i.onBuild&&i.onBuild(a,{id:h,replayer:this})};Ce(t.node,{doc:r.contentDocument,mirror:o,hackCss:!0,skipChild:!1,afterAppend:n,cache:this.cache}),n(r.contentDocument,t.node.id);for(let{mutationInQueue:a,builtNode:h}of s)this.attachDocumentToIframe(a,h),this.newDocumentQueue=this.newDocumentQueue.filter(c=>c!==a);u.forEach(a=>Ie(a))}collectIframeAndAttachDocument(t,r){if(ur(r,this.mirror)){let o=this.newDocumentQueue.find(s=>s.parentId===this.mirror.getId(r));o&&t.push({mutationInQueue:o,builtNode:r})}}waitForStylesheetLoad(){var t;let r=(t=this.iframe.contentDocument)==null?void 0:t.head;if(r){let o=new Set,s,u=this.service.state,n=()=>{u=this.service.state};this.emitter.on(I.Start,n),this.emitter.on(I.Pause,n);let a=()=>{this.emitter.off(I.Start,n),this.emitter.off(I.Pause,n)};r.querySelectorAll('link[rel="stylesheet"]').forEach(h=>{h.sheet||(o.add(h),h.addEventListener("load",()=>{o.delete(h),o.size===0&&s!==-1&&(u.matches("playing")&&this.play(this.getCurrentTime()),this.emitter.emit(I.LoadStylesheetEnd),s&&clearTimeout(s),a())}))}),o.size>0&&(this.service.send({type:"PAUSE"}),this.emitter.emit(I.LoadStylesheetStart),s=setTimeout(()=>{u.matches("playing")&&this.play(this.getCurrentTime()),s=-1,a()},this.config.loadTimeout))}}async preloadAllImages(){let t=[];for(let r of this.service.state.context.events)r.type===$.IncrementalSnapshot&&r.data.source===L.CanvasMutation&&(t.push(this.deserializeAndPreloadCanvasEvents(r.data,r)),("commands"in r.data?r.data.commands:[r.data]).forEach(s=>{this.preloadImages(s,r)}));return Promise.all(t)}preloadImages(t,r){if(t.property==="drawImage"&&typeof t.args[0]=="string"&&!this.imageMap.has(r)){let o=document.createElement("canvas"),s=o.getContext("2d"),u=s?.createImageData(o.width,o.height);s?.putImageData(u,0,0)}}async deserializeAndPreloadCanvasEvents(t,r){if(!this.canvasEventMap.has(r)){let o={isUnchanged:!0};if("commands"in t){let s=await Promise.all(t.commands.map(async u=>{let n=await Promise.all(u.args.map(se(this.imageMap,null,o)));return{...u,args:n}}));o.isUnchanged===!1&&this.canvasEventMap.set(r,{...t,commands:s})}else{let s=await Promise.all(t.args.map(se(this.imageMap,null,o)));o.isUnchanged===!1&&this.canvasEventMap.set(r,{...t,args:s})}}}applyIncremental(t,r){var o,s,u;let{data:n}=t;switch(n.source){case L.Mutation:{try{this.applyMutation(n,r)}catch(a){this.warn(`Exception in mutation ${a.message||a}`,n)}break}case L.Drag:case L.TouchMove:case L.MouseMove:if(r){let a=n.positions[n.positions.length-1];this.mousePos={x:a.x,y:a.y,id:a.id,debugData:n}}else n.positions.forEach(a=>{let h={doAction:()=>{this.moveAndHover(a.x,a.y,a.id,r,n)},delay:a.timeOffset+t.timestamp-this.service.state.context.baselineTime};this.timer.addAction(h)}),this.timer.addAction({doAction(){},delay:t.delay-((o=n.positions[0])==null?void 0:o.timeOffset)});break;case L.MouseInteraction:{if(n.id===-1)break;let a=new Event(un(q[n.type])),h=this.mirror.getNode(n.id);if(!h)return this.debugNodeNotFound(n,n.id);this.emitter.emit(I.MouseInteraction,{type:n.type,target:h});let{triggerFocus:c}=this.config;switch(n.type){case q.Blur:"blur"in h&&h.blur();break;case q.Focus:c&&h.focus&&h.focus({preventScroll:!0});break;case q.Click:case q.TouchStart:case q.TouchEnd:case q.MouseDown:case q.MouseUp:r?(n.type===q.TouchStart?this.touchActive=!0:n.type===q.TouchEnd&&(this.touchActive=!1),n.type===q.MouseDown?this.lastMouseDownEvent=[h,a]:n.type===q.MouseUp&&(this.lastMouseDownEvent=null),this.mousePos={x:n.x||0,y:n.y||0,id:n.id,debugData:n}):(n.type===q.TouchStart&&(this.tailPositions.length=0),this.moveAndHover(n.x||0,n.y||0,n.id,r,n),n.type===q.Click?(this.mouse.classList.remove("active"),this.mouse.offsetWidth,this.mouse.classList.add("active")):n.type===q.TouchStart?(this.mouse.offsetWidth,this.mouse.classList.add("touch-active")):n.type===q.TouchEnd?this.mouse.classList.remove("touch-active"):h.dispatchEvent(a));break;case q.TouchCancel:r?this.touchActive=!1:this.mouse.classList.remove("touch-active");break;default:h.dispatchEvent(a)}break}case L.Scroll:{if(n.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.scrollData=n;break}this.applyScroll(n,r);break}case L.ViewportResize:this.emitter.emit(I.Resize,{width:n.width,height:n.height});break;case L.Input:{if(n.id===-1)break;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.inputData=n;break}this.applyInput(n);break}case L.MediaInteraction:{let a=this.usingVirtualDom?this.virtualDom.mirror.getNode(n.id):this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);let h=a,{events:c}=this.service.state.context;this.mediaManager.mediaMutation({target:h,timeOffset:t.timestamp-c[0].timestamp,mutation:n});break}case L.StyleSheetRule:case L.StyleDeclaration:{this.usingVirtualDom?n.styleId?this.constructedStyleMutations.push(n):n.id&&((s=this.virtualDom.mirror.getNode(n.id))==null||s.rules.push(n)):this.applyStyleSheetMutation(n);break}case L.CanvasMutation:{if(!this.config.UNSAFE_replayCanvas)return;if(this.usingVirtualDom){let a=this.virtualDom.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);a.canvasMutations.push({event:t,mutation:n})}else{let a=this.mirror.getNode(n.id);if(!a)return this.debugNodeNotFound(n,n.id);ms({event:t,mutation:n,target:a,imageMap:this.imageMap,canvasEventMap:this.canvasEventMap,errorHandler:this.warnCanvasMutationFailed.bind(this)})}break}case L.Font:{try{let a=new FontFace(n.family,n.buffer?new Uint8Array(JSON.parse(n.fontSource)):n.fontSource,n.descriptors);(u=this.iframe.contentDocument)==null||u.fonts.add(a)}catch(a){this.warn(a)}break}case L.Selection:{if(r){this.lastSelectionData=n;break}this.applySelection(n);break}case L.AdoptedStyleSheet:{this.usingVirtualDom?this.adoptedStyleSheets.push(n):this.applyAdoptedStyleSheet(n);break}}}applyMutation(t,r){if(this.config.useVirtualDom&&!this.usingVirtualDom&&r&&(this.usingVirtualDom=!0,vo(this.iframe.contentDocument,this.mirror,this.virtualDom),Object.keys(this.legacy_missingNodeRetryMap).length))for(let c in this.legacy_missingNodeRetryMap)try{let i=this.legacy_missingNodeRetryMap[c],p=Fs(i.node,this.virtualDom,this.mirror);p&&(i.node=p)}catch(i){this.warn(i)}let o=this.usingVirtualDom?this.virtualDom.mirror:this.mirror;t.removes=t.removes.filter(c=>o.getNode(c.id)?!0:(this.warnNodeNotFound(t,c.id),!1)),t.removes.forEach(c=>{var i;let p=o.getNode(c.id);if(!p)return;let l=o.getNode(c.parentId);if(!l)return this.warnNodeNotFound(t,c.parentId);if(c.isShadow&&Pe(l)&&(l=l.shadowRoot),o.removeNodeFromMap(p),l)try{l.removeChild(p),this.usingVirtualDom&&p.nodeName==="#text"&&l.nodeName==="STYLE"&&((i=l.rules)==null?void 0:i.length)>0&&(l.rules=[])}catch(f){if(f instanceof DOMException)this.warn("parent could not remove child in mutation",l,p,t);else throw f}});let s={...this.legacy_missingNodeRetryMap},u=[],n=c=>{let i=null;return c.nextId&&(i=o.getNode(c.nextId)),c.nextId!==null&&c.nextId!==void 0&&c.nextId!==-1&&!i},a=c=>{var i,p;if(!this.iframe.contentDocument)return this.warn("Looks like your replayer has been destroyed.");let l=o.getNode(c.parentId);if(!l)return c.node.type===ie.Document?this.newDocumentQueue.push(c):u.push(c);c.node.isShadow&&(Pe(l)||l.attachShadow({mode:"open"}),l=l.shadowRoot);let f=null,m=null;if(c.previousId&&(f=o.getNode(c.previousId)),c.nextId&&(m=o.getNode(c.nextId)),n(c))return u.push(c);if(c.node.rootId&&!o.getNode(c.node.rootId))return;let d=c.node.rootId?o.getNode(c.node.rootId):this.usingVirtualDom?this.virtualDom:this.iframe.contentDocument;if(ur(l,o)){this.attachDocumentToIframe(c,l);return}let g=(S,x)=>{if(!this.usingVirtualDom){Ie(S);for(let v of this.config.plugins||[])v.onBuild&&v.onBuild(S,{id:x,replayer:this})}},y=Ce(c.node,{doc:d,mirror:o,skipChild:!0,hackCss:!0,cache:this.cache,afterAppend:g});if(c.previousId===-1||c.nextId===-1){s[c.node.id]={node:y,mutation:c};return}let w=o.getMeta(l);if(w&&w.type===ie.Element&&c.node.type===ie.Text){let S=Array.isArray(l.childNodes)?l.childNodes:Array.from(l.childNodes);if(w.tagName==="textarea")for(let x of S)x.nodeType===l.TEXT_NODE&&l.removeChild(x);else if(w.tagName==="style"&&S.length===1)for(let x of S)x.nodeType===l.TEXT_NODE&&!o.hasNode(x)&&(y.textContent=x.textContent,l.removeChild(x))}else if(w?.type===ie.Document){let S=l;c.node.type===ie.DocumentType&&((i=S.childNodes[0])==null?void 0:i.nodeType)===Node.DOCUMENT_TYPE_NODE&&S.removeChild(S.childNodes[0]),y.nodeName==="HTML"&&S.documentElement&&S.removeChild(S.documentElement)}if(f&&f.nextSibling&&f.nextSibling.parentNode?l.insertBefore(y,f.nextSibling):m&&m.parentNode?l.contains(m)?l.insertBefore(y,m):l.insertBefore(y,null):l.appendChild(y),g(y,c.node.id),this.usingVirtualDom&&y.nodeName==="#text"&&l.nodeName==="STYLE"&&((p=l.rules)==null?void 0:p.length)>0&&(l.rules=[]),ur(y,this.mirror)){let S=this.mirror.getId(y),x=this.newDocumentQueue.find(v=>v.parentId===S);x&&(this.attachDocumentToIframe(x,y),this.newDocumentQueue=this.newDocumentQueue.filter(v=>v!==x))}(c.previousId||c.nextId)&&this.legacy_resolveMissingNode(s,l,y,c)};t.adds.forEach(c=>{a(c)});let h=Date.now();for(;u.length;){let c=Wo(u);if(u.length=0,Date.now()-h>500){this.warn("Timeout in the loop, please check the resolve tree data:",c);break}for(let i of c)o.getNode(i.value.parentId)?Ws(i,l=>{a(l)}):this.debug("Drop resolve tree since there is no parent for the root node.",i)}Object.keys(s).length&&Object.assign(this.legacy_missingNodeRetryMap,s),qo(t.texts).forEach(c=>{var i;let p=o.getNode(c.id);if(!p)return t.removes.find(f=>f.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);let l=p.parentElement;if(c.value&&l&&l.tagName==="STYLE"?p.textContent=Qe(c.value,this.cache):p.textContent=c.value,this.usingVirtualDom){let f=p.parentNode;((i=f?.rules)==null?void 0:i.length)>0&&(f.rules=[])}}),t.attributes.forEach(c=>{var i;let p=o.getNode(c.id);if(!p)return t.removes.find(l=>l.id===c.id)?void 0:this.warnNodeNotFound(t,c.id);for(let l in c.attributes)if(typeof l=="string"){let f=c.attributes[l];if(f===null)p.removeAttribute(l),l==="open"&&ia(p,c);else if(typeof f=="string")try{if(l==="_cssText"&&(p.nodeName==="LINK"||p.nodeName==="STYLE"))try{let m=o.getMeta(p),d=Ce({...m,attributes:{...m.attributes,...c.attributes}},{doc:p.ownerDocument,mirror:o,skipChild:!0,hackCss:!0,cache:this.cache});Object.assign(m.attributes,c.attributes);let g=p.nextSibling,y=p.parentNode;if(d&&y){y.removeChild(p),y.insertBefore(d,g),o.replace(c.id,d);break}}catch{}if(l==="value"&&p.nodeName==="TEXTAREA"){let m=p;m.childNodes.forEach(g=>m.removeChild(g));let d=(i=p.ownerDocument)==null?void 0:i.createTextNode(f);d&&m.appendChild(d)}else p.setAttribute(l,f);l==="rr_open_mode"&&p.nodeName==="DIALOG"&&Ie(p,c)}catch(m){this.warn("An error occurred may due to the checkout feature.",m)}else if(l==="style"){let m=f,d=p;for(let g in m)if(m[g]===!1)d.style.removeProperty(g);else if(m[g]instanceof Array){let y=m[g];d.style.setProperty(g,y[0],y[1])}else{let y=m[g];d.style.setProperty(g,y)}}}})}applyScroll(t,r){var o,s;let u=this.mirror.getNode(t.id);if(!u)return this.debugNodeNotFound(t,t.id);let n=this.mirror.getMeta(u);if(u===this.iframe.contentDocument)(o=this.iframe.contentWindow)==null||o.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else if(n?.type===ie.Document)(s=u.defaultView)==null||s.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"});else try{u.scrollTo({top:t.y,left:t.x,behavior:r?"auto":"smooth"})}catch{}}applyInput(t){let r=this.mirror.getNode(t.id);if(!r)return this.debugNodeNotFound(t,t.id);try{r.checked=t.isChecked,r.value=t.text}catch{}}applySelection(t){try{let r=new Set,o=t.ranges.map(({start:s,startOffset:u,end:n,endOffset:a})=>{let h=this.mirror.getNode(s),c=this.mirror.getNode(n);if(!h||!c)return;let i=new Range;i.setStart(h,u),i.setEnd(c,a);let p=h.ownerDocument,l=p?.getSelection();return l&&r.add(l),{range:i,selection:l}});r.forEach(s=>s.removeAllRanges()),o.forEach(s=>{var u;return s&&((u=s.selection)==null?void 0:u.addRange(s.range))})}catch{}}applyStyleSheetMutation(t){var r;let o=null;t.styleId?o=this.styleMirror.getStyle(t.styleId):t.id&&(o=((r=this.mirror.getNode(t.id))==null?void 0:r.sheet)||null),o&&(t.source===L.StyleSheetRule?this.applyStyleSheetRule(t,o):t.source===L.StyleDeclaration&&this.applyStyleDeclaration(t,o))}applyStyleSheetRule(t,r){var o,s,u,n;if((o=t.adds)==null||o.forEach(({rule:a,index:h})=>{try{if(Array.isArray(h)){let{positions:c,index:i}=os(h),p=xe(r.cssRules,c);p?.insertRule(a,i)}else{let c=h===void 0?void 0:Math.min(h,r.cssRules.length);r?.insertRule(a,c)}}catch{}}),(s=t.removes)==null||s.forEach(({index:a})=>{try{if(Array.isArray(a)){let{positions:h,index:c}=os(a),i=xe(r.cssRules,h);i?.deleteRule(c||0)}else r?.deleteRule(a)}catch{}}),typeof t.replace=="string")try{(u=r.replace)==null||u.call(r,t.replace)}catch{}if(typeof t.replaceSync=="string")try{(n=r.replaceSync)==null||n.call(r,t.replaceSync)}catch{}}applyStyleDeclaration(t,r){if(t.set){let o=xe(r.rules,t.index);o?.style&&o.style.setProperty(t.set.property,t.set.value,t.set.priority)}if(t.remove){let o=xe(r.rules,t.index);o?.style&&o.style.removeProperty(t.remove.property)}}applyAdoptedStyleSheet(t){var r;let o=this.mirror.getNode(t.id);if(!o)return;(r=t.styles)==null||r.forEach(a=>{var h;let c=null,i=null;if(Pe(o)?i=((h=o.ownerDocument)==null?void 0:h.defaultView)||null:o.nodeName==="#document"&&(i=o.defaultView),!!i)try{c=new i.CSSStyleSheet,this.styleMirror.add(c,a.styleId),this.applyStyleSheetRule({source:L.StyleSheetRule,adds:a.rules},c)}catch{}});let s=10,u=0,n=(a,h)=>{let c=h.map(i=>this.styleMirror.getStyle(i)).filter(i=>i!==null);Pe(a)?a.shadowRoot.adoptedStyleSheets=c:a.nodeName==="#document"&&(a.adoptedStyleSheets=c),c.length!==h.length&&u<s&&(setTimeout(()=>n(a,h),0+100*u),u++)};n(o,t.styleIds)}legacy_resolveMissingNode(t,r,o,s){let{previousId:u,nextId:n}=s,a=u&&t[u],h=n&&t[n];if(a){let{node:c,mutation:i}=a;r.insertBefore(c,o),delete t[i.node.id],delete this.legacy_missingNodeRetryMap[i.node.id],(i.previousId||i.nextId)&&this.legacy_resolveMissingNode(t,r,c,i)}if(h){let{node:c,mutation:i}=h;r.insertBefore(c,o.nextSibling),delete t[i.node.id],delete this.legacy_missingNodeRetryMap[i.node.id],(i.previousId||i.nextId)&&this.legacy_resolveMissingNode(t,r,c,i)}}moveAndHover(t,r,o,s,u){let n=this.mirror.getNode(o);if(!n)return this.debugNodeNotFound(u,o);let a=qs(n,this.iframe),h=t*a.absoluteScale+a.x,c=r*a.absoluteScale+a.y;this.mouse.style.left=`${h}px`,this.mouse.style.top=`${c}px`,s||this.drawMouseTail({x:h,y:c}),this.hoverElements(n)}drawMouseTail(t){if(!this.mouseTail)return;let{lineCap:r,lineWidth:o,strokeStyle:s,duration:u}=this.config.mouseTail===!0?hr:Object.assign({},hr,this.config.mouseTail),n=()=>{if(!this.mouseTail)return;let a=this.mouseTail.getContext("2d");!a||!this.tailPositions.length||(a.clearRect(0,0,this.mouseTail.width,this.mouseTail.height),a.beginPath(),a.lineWidth=o,a.lineCap=r,a.strokeStyle=s,a.moveTo(this.tailPositions[0].x,this.tailPositions[0].y),this.tailPositions.forEach(h=>a.lineTo(h.x,h.y)),a.stroke())};this.tailPositions.push(t),n(),setTimeout(()=>{this.tailPositions=this.tailPositions.filter(a=>a!==t),n()},u/this.speedService.state.context.timer.speed)}hoverElements(t){var r;(r=this.lastHoveredRootNode||this.iframe.contentDocument)==null||r.querySelectorAll(".\\:hover").forEach(s=>{s.classList.remove(":hover")}),this.lastHoveredRootNode=t.getRootNode();let o=t;for(;o;)o.classList&&o.classList.add(":hover"),o=o.parentElement}isUserInteraction(t){return t.type!==$.IncrementalSnapshot?!1:t.data.source>L.Mutation&&t.data.source<=L.Input}backToNormal(){this.nextUserInteractionEvent=null,!this.speedService.state.matches("normal")&&(this.speedService.send({type:"BACK_TO_NORMAL"}),this.emitter.emit(I.SkipEnd,{speed:this.speedService.state.context.normalSpeed}))}warnNodeNotFound(t,r){this.warn(`Node with id '${r}' not found. `,t)}warnCanvasMutationFailed(t,r){this.warn("Has error on canvas update",r,"canvas mutation:",t)}debugNodeNotFound(t,r){this.debug(`Node with id '${r}' not found. `,t)}warn(...t){this.config.showWarning&&this.config.logger.warn(gs,...t)}debug(...t){this.config.showDebug&&this.config.logger.log(gs,...t)}};var Js=`.replayer-wrapper {
|
|
130
|
+
position: relative;
|
|
131
|
+
}
|
|
132
|
+
.replayer-mouse {
|
|
133
|
+
position: absolute;
|
|
134
|
+
width: 20px;
|
|
135
|
+
height: 20px;
|
|
136
|
+
transition: left 0.05s linear, top 0.05s linear;
|
|
137
|
+
background-size: contain;
|
|
138
|
+
background-position: center center;
|
|
139
|
+
background-repeat: no-repeat;
|
|
140
|
+
background-image: url('data:image/svg+xml;base64,PHN2ZyBoZWlnaHQ9JzMwMHB4JyB3aWR0aD0nMzAwcHgnICBmaWxsPSIjMDAwMDAwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIGRhdGEtbmFtZT0iTGF5ZXIgMSIgdmlld0JveD0iMCAwIDUwIDUwIiB4PSIwcHgiIHk9IjBweCI+PHRpdGxlPkRlc2lnbl90bnA8L3RpdGxlPjxwYXRoIGQ9Ik00OC43MSw0Mi45MUwzNC4wOCwyOC4yOSw0NC4zMywxOEExLDEsMCwwLDAsNDQsMTYuMzlMMi4zNSwxLjA2QTEsMSwwLDAsMCwxLjA2LDIuMzVMMTYuMzksNDRhMSwxLDAsMCwwLDEuNjUuMzZMMjguMjksMzQuMDgsNDIuOTEsNDguNzFhMSwxLDAsMCwwLDEuNDEsMGw0LjM4LTQuMzhBMSwxLDAsMCwwLDQ4LjcxLDQyLjkxWm0tNS4wOSwzLjY3TDI5LDMyYTEsMSwwLDAsMC0xLjQxLDBsLTkuODUsOS44NUwzLjY5LDMuNjlsMzguMTIsMTRMMzIsMjcuNThBMSwxLDAsMCwwLDMyLDI5TDQ2LjU5LDQzLjYyWiI+PC9wYXRoPjwvc3ZnPg==');
|
|
141
|
+
border-color: transparent; /* otherwise we transition from black when .touch-device class is added */
|
|
142
|
+
}
|
|
143
|
+
.replayer-mouse::after {
|
|
144
|
+
content: '';
|
|
145
|
+
display: inline-block;
|
|
146
|
+
width: 20px;
|
|
147
|
+
height: 20px;
|
|
148
|
+
background: rgb(73, 80, 246);
|
|
149
|
+
border-radius: 100%;
|
|
150
|
+
transform: translate(-50%, -50%);
|
|
151
|
+
opacity: 0.3;
|
|
152
|
+
}
|
|
153
|
+
.replayer-mouse.active::after {
|
|
154
|
+
animation: click 0.2s ease-in-out 1;
|
|
155
|
+
}
|
|
156
|
+
.replayer-mouse.touch-device {
|
|
157
|
+
background-image: none; /* there's no passive cursor on touch-only screens */
|
|
158
|
+
width: 70px;
|
|
159
|
+
height: 70px;
|
|
160
|
+
border-width: 4px;
|
|
161
|
+
border-style: solid;
|
|
162
|
+
border-radius: 100%;
|
|
163
|
+
margin-left: -37px;
|
|
164
|
+
margin-top: -37px;
|
|
165
|
+
border-color: rgba(73, 80, 246, 0);
|
|
166
|
+
transition: left 0s linear, top 0s linear, border-color 0.2s ease-in-out;
|
|
167
|
+
}
|
|
168
|
+
.replayer-mouse.touch-device.touch-active {
|
|
169
|
+
border-color: rgba(73, 80, 246, 1);
|
|
170
|
+
transition: left 0.25s linear, top 0.25s linear, border-color 0.2s ease-in-out;
|
|
171
|
+
}
|
|
172
|
+
.replayer-mouse.touch-device::after {
|
|
173
|
+
opacity: 0; /* there's no passive cursor on touch-only screens */
|
|
174
|
+
}
|
|
175
|
+
.replayer-mouse.touch-device.active::after {
|
|
176
|
+
animation: touch-click 0.2s ease-in-out 1;
|
|
177
|
+
}
|
|
178
|
+
.replayer-mouse-tail {
|
|
179
|
+
position: absolute;
|
|
180
|
+
pointer-events: none;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
@keyframes click {
|
|
184
|
+
0% {
|
|
185
|
+
opacity: 0.3;
|
|
186
|
+
width: 20px;
|
|
187
|
+
height: 20px;
|
|
188
|
+
}
|
|
189
|
+
50% {
|
|
190
|
+
opacity: 0.5;
|
|
191
|
+
width: 10px;
|
|
192
|
+
height: 10px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
@keyframes touch-click {
|
|
197
|
+
0% {
|
|
198
|
+
opacity: 0;
|
|
199
|
+
width: 20px;
|
|
200
|
+
height: 20px;
|
|
201
|
+
}
|
|
202
|
+
50% {
|
|
203
|
+
opacity: 0.5;
|
|
204
|
+
width: 10px;
|
|
205
|
+
height: 10px;
|
|
206
|
+
}
|
|
207
|
+
}
|
|
208
|
+
`;var Qs="action-agent-session-player";function Xs(e,t={}){return{...t,channel:Qs,type:e}}function Zs(e,t,r){return!!e&&t!=null&&e.source===t&&e.origin===r&&e.data?.channel===Qs&&typeof e.data.type=="string"}function Ks(e,t){let r=Number(e?.width),o=Number(e?.height);return r>0&&o>0&&t?.width>0&&t?.height>0?Math.min(1,t.width/r,t.height/o):1}function en(e){return Math.max(0,Number(e)||0)+1}var Ne=document.getElementById("session-player"),J=null,we=null;function rt(e,t){window.parent.postMessage(Xs(e,t),window.location.origin)}function tn(){let e=Ne.querySelector(".replayer-wrapper");if(!e||!we)return;let t=Ks(we,{width:window.innerWidth,height:window.innerHeight});e.style.transformOrigin="top left",e.style.transform=`scale(${t})`,Ne.style.width=`${Math.floor(we.width*t)}px`,Ne.style.height=`${Math.floor(we.height*t)}px`}function aa(e,t){J&&J.destroy(),Ne.replaceChildren(),we=null,J=new je(e,{root:Ne,showWarning:!1,showDebug:!1,mouseTail:!1,skipInactive:!1,triggerFocus:!1,UNSAFE_replayCanvas:!1}),J.on("resize",s=>{we=s,tn()}),J.on("finish",()=>rt("finished")),J.pause(0);let{startTime:r,endTime:o}=J.getMetaData();rt("loaded",{startTime:r,endTime:o,token:t})}var la={load:({events:e,token:t})=>aa(e,t),append:({events:e})=>e.forEach(t=>J?.addEvent(t)),seek:({offset:e,playing:t})=>{J&&(t?J.play(e):J.pause(en(e)))},speed:({speed:e})=>J?.setConfig({speed:e})},rn=document.createElement("style");rn.textContent=Js;document.head.appendChild(rn);window.addEventListener("resize",tn);window.addEventListener("message",e=>{if(!Zs(e,window.parent,window.location.origin))return;let t=la[e.data.type];if(t)try{t(e.data)}catch(r){rt("error",{message:r?.message||String(r)})}});rt("ready");})();
|
|
209
|
+
/*! Bundled license information:
|
|
210
|
+
|
|
211
|
+
@rrweb/replay/dist/replay.js:
|
|
212
|
+
(*! *****************************************************************************
|
|
213
|
+
Copyright (c) Microsoft Corporation.
|
|
214
|
+
|
|
215
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
216
|
+
purpose with or without fee is hereby granted.
|
|
217
|
+
|
|
218
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
219
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
220
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
221
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
222
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
223
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
224
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
225
|
+
***************************************************************************** *)
|
|
226
|
+
*/
|