{ "log": { "version": "1.2", "creator": { "name": "WebInspector", "version": "537.36" }, "pages": [ { "startedDateTime": "2022-11-15T19:45:16.573Z", "id": "page_11", "title": "http://localhost:4000/events", "pageTimings": { "onContentLoad": 64.05000004451722, "onLoad": 75.87499998044223 } } ], "entries": [ { "_initiator": { "type": "other" }, "_priority": "VeryHigh", "_resourceType": "document", "cache": {}, "connection": "18882", "pageref": "page_11", "request": { "method": "GET", "url": "http://localhost:4000/events", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Cache-Control", "value": "max-age=0" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Host", "value": "localhost:4000" }, { "name": "Referer", "value": "http://localhost:4000/events/new" }, { "name": "Sec-Fetch-Dest", "value": "document" }, { "name": "Sec-Fetch-Mode", "value": "navigate" }, { "name": "Sec-Fetch-Site", "value": "same-origin" }, { "name": "Sec-Fetch-User", "value": "?1" }, { "name": "Upgrade-Insecure-Requests", "value": "1" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "sec-ch-ua", "value": "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"" }, { "name": "sec-ch-ua-mobile", "value": "?0" }, { "name": "sec-ch-ua-platform", "value": "\"Linux\"" } ], "queryString": [], "cookies": [ { "name": "_faircart_key", "value": "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4", "path": "/", "domain": "localhost", "expires": "1969-12-31T23:59:59.000Z", "httpOnly": true, "secure": false } ], "headersSize": 846, "bodySize": 0 }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "cache-control", "value": "max-age=0, private, must-revalidate" }, { "name": "content-length", "value": "2163" }, { "name": "content-type", "value": "text/html; charset=utf-8" }, { "name": "cross-origin-window-policy", "value": "deny" }, { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "server", "value": "Cowboy" }, { "name": "x-content-type-options", "value": "nosniff" }, { "name": "x-download-options", "value": "noopen" }, { "name": "x-frame-options", "value": "SAMEORIGIN" }, { "name": "x-permitted-cross-domain-policies", "value": "none" }, { "name": "x-request-id", "value": "FyfZq0bqBQg6_4UAAARl" }, { "name": "x-xss-protection", "value": "1; mode=block" } ], "cookies": [], "content": { "size": 2163, "mimeType": "text/html", "compression": 0, "text": "\n\n \n \n \n \n \nListing Events\n \n \n \n \n
\n
\n \n

FairCart

\n
\n
\n
\n

\n\n

\n

Listing Events

\n\n\n \n \n \n \n \n\n \n \n \n \n\n \n
NameDescriptionCapacity
\n\nNew Event\n
\n \n" }, "redirectURL": "", "headersSize": 420, "bodySize": 2163, "_transferSize": 2583, "_error": null }, "serverIPAddress": "127.0.0.1", "startedDateTime": "2022-11-15T19:45:16.572Z", "time": 47.882999991998076, "timings": { "blocked": 0.715999993801117, "dns": -1, "ssl": -1, "connect": -1, "send": 0.069, "wait": 46.44300001656264, "receive": 0.6549999816343188, "_blocked_queueing": 0.5189999938011169 } }, { "_initiator": { "type": "parser", "url": "http://localhost:4000/events", "lineNumber": 8 }, "_priority": "VeryHigh", "_resourceType": "stylesheet", "cache": {}, "connection": "18882", "pageref": "page_11", "request": { "method": "GET", "url": "http://localhost:4000/assets/app.css", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "text/css,*/*;q=0.1" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Host", "value": "localhost:4000" }, { "name": "If-None-Match", "value": "\"18CAE81\"" }, { "name": "Referer", "value": "http://localhost:4000/events" }, { "name": "Sec-Fetch-Dest", "value": "style" }, { "name": "Sec-Fetch-Mode", "value": "no-cors" }, { "name": "Sec-Fetch-Site", "value": "same-origin" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "sec-ch-ua", "value": "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"" }, { "name": "sec-ch-ua-mobile", "value": "?0" }, { "name": "sec-ch-ua-platform", "value": "\"Linux\"" } ], "queryString": [], "cookies": [ { "name": "_faircart_key", "value": "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4", "path": "/", "domain": "localhost", "expires": "1969-12-31T23:59:59.000Z", "httpOnly": true, "secure": false } ], "headersSize": 679, "bodySize": 0 }, "response": { "status": 304, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "cache-control", "value": "public" }, { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "etag", "value": "\"18CAE81\"" }, { "name": "server", "value": "Cowboy" } ], "cookies": [], "content": { "size": 37193, "mimeType": "text/css", "text": "/* css/phoenix.css */\n*,\n*:after,\n*:before {\n box-sizing: inherit;\n}\nhtml {\n box-sizing: border-box;\n font-size: 62.5%;\n}\nbody {\n color: #000000;\n font-family:\n \"Helvetica Neue\",\n \"Helvetica\",\n \"Arial\",\n sans-serif;\n font-size: 1.6em;\n font-weight: 300;\n letter-spacing: .01em;\n line-height: 1.6;\n}\nblockquote {\n border-left: 0.3rem solid #d1d1d1;\n margin-left: 0;\n margin-right: 0;\n padding: 1rem 1.5rem;\n}\nblockquote *:last-child {\n margin-bottom: 0;\n}\n.button,\nbutton,\ninput[type=button],\ninput[type=reset],\ninput[type=submit] {\n background-color: #0069d9;\n border: 0.1rem solid #0069d9;\n border-radius: .4rem;\n color: #fff;\n cursor: pointer;\n display: inline-block;\n font-size: 1.1rem;\n font-weight: 700;\n height: 3.8rem;\n letter-spacing: .1rem;\n line-height: 3.8rem;\n padding: 0 3.0rem;\n text-align: center;\n text-decoration: none;\n text-transform: uppercase;\n white-space: nowrap;\n}\n.button:focus,\n.button:hover,\nbutton:focus,\nbutton:hover,\ninput[type=button]:focus,\ninput[type=button]:hover,\ninput[type=reset]:focus,\ninput[type=reset]:hover,\ninput[type=submit]:focus,\ninput[type=submit]:hover {\n background-color: #606c76;\n border-color: #606c76;\n color: #fff;\n outline: 0;\n}\n.button[disabled],\nbutton[disabled],\ninput[type=button][disabled],\ninput[type=reset][disabled],\ninput[type=submit][disabled] {\n cursor: default;\n opacity: .5;\n}\n.button[disabled]:focus,\n.button[disabled]:hover,\nbutton[disabled]:focus,\nbutton[disabled]:hover,\ninput[type=button][disabled]:focus,\ninput[type=button][disabled]:hover,\ninput[type=reset][disabled]:focus,\ninput[type=reset][disabled]:hover,\ninput[type=submit][disabled]:focus,\ninput[type=submit][disabled]:hover {\n background-color: #0069d9;\n border-color: #0069d9;\n}\n.button.button-outline,\nbutton.button-outline,\ninput[type=button].button-outline,\ninput[type=reset].button-outline,\ninput[type=submit].button-outline {\n background-color: transparent;\n color: #0069d9;\n}\n.button.button-outline:focus,\n.button.button-outline:hover,\nbutton.button-outline:focus,\nbutton.button-outline:hover,\ninput[type=button].button-outline:focus,\ninput[type=button].button-outline:hover,\ninput[type=reset].button-outline:focus,\ninput[type=reset].button-outline:hover,\ninput[type=submit].button-outline:focus,\ninput[type=submit].button-outline:hover {\n background-color: transparent;\n border-color: #606c76;\n color: #606c76;\n}\n.button.button-outline[disabled]:focus,\n.button.button-outline[disabled]:hover,\nbutton.button-outline[disabled]:focus,\nbutton.button-outline[disabled]:hover,\ninput[type=button].button-outline[disabled]:focus,\ninput[type=button].button-outline[disabled]:hover,\ninput[type=reset].button-outline[disabled]:focus,\ninput[type=reset].button-outline[disabled]:hover,\ninput[type=submit].button-outline[disabled]:focus,\ninput[type=submit].button-outline[disabled]:hover {\n border-color: inherit;\n color: #0069d9;\n}\n.button.button-clear,\nbutton.button-clear,\ninput[type=button].button-clear,\ninput[type=reset].button-clear,\ninput[type=submit].button-clear {\n background-color: transparent;\n border-color: transparent;\n color: #0069d9;\n}\n.button.button-clear:focus,\n.button.button-clear:hover,\nbutton.button-clear:focus,\nbutton.button-clear:hover,\ninput[type=button].button-clear:focus,\ninput[type=button].button-clear:hover,\ninput[type=reset].button-clear:focus,\ninput[type=reset].button-clear:hover,\ninput[type=submit].button-clear:focus,\ninput[type=submit].button-clear:hover {\n background-color: transparent;\n border-color: transparent;\n color: #606c76;\n}\n.button.button-clear[disabled]:focus,\n.button.button-clear[disabled]:hover,\nbutton.button-clear[disabled]:focus,\nbutton.button-clear[disabled]:hover,\ninput[type=button].button-clear[disabled]:focus,\ninput[type=button].button-clear[disabled]:hover,\ninput[type=reset].button-clear[disabled]:focus,\ninput[type=reset].button-clear[disabled]:hover,\ninput[type=submit].button-clear[disabled]:focus,\ninput[type=submit].button-clear[disabled]:hover {\n color: #0069d9;\n}\ncode {\n background: #f4f5f6;\n border-radius: .4rem;\n font-size: 86%;\n margin: 0 .2rem;\n padding: .2rem .5rem;\n white-space: nowrap;\n}\npre {\n background: #f4f5f6;\n border-left: 0.3rem solid #0069d9;\n overflow-y: hidden;\n}\npre > code {\n border-radius: 0;\n display: block;\n padding: 1rem 1.5rem;\n white-space: pre;\n}\nhr {\n border: 0;\n border-top: 0.1rem solid #f4f5f6;\n margin: 3.0rem 0;\n}\ninput[type=color],\ninput[type=date],\ninput[type=datetime],\ninput[type=datetime-local],\ninput[type=email],\ninput[type=month],\ninput[type=number],\ninput[type=password],\ninput[type=search],\ninput[type=tel],\ninput[type=text],\ninput[type=url],\ninput[type=week],\ninput:not([type]),\ntextarea,\nselect {\n -webkit-appearance: none;\n background-color: transparent;\n border: 0.1rem solid #d1d1d1;\n border-radius: .4rem;\n box-shadow: none;\n box-sizing: inherit;\n height: 3.8rem;\n padding: .6rem 1.0rem .7rem;\n width: 100%;\n}\ninput[type=color]:focus,\ninput[type=date]:focus,\ninput[type=datetime]:focus,\ninput[type=datetime-local]:focus,\ninput[type=email]:focus,\ninput[type=month]:focus,\ninput[type=number]:focus,\ninput[type=password]:focus,\ninput[type=search]:focus,\ninput[type=tel]:focus,\ninput[type=text]:focus,\ninput[type=url]:focus,\ninput[type=week]:focus,\ninput:not([type]):focus,\ntextarea:focus,\nselect:focus {\n border-color: #0069d9;\n outline: 0;\n}\nselect {\n background: url('data:image/svg+xml;utf8,') center right no-repeat;\n padding-right: 3.0rem;\n}\nselect:focus {\n background-image: url('data:image/svg+xml;utf8,');\n}\nselect[multiple] {\n background: none;\n height: auto;\n}\ntextarea {\n min-height: 6.5rem;\n}\nlabel,\nlegend {\n display: block;\n font-size: 1.6rem;\n font-weight: 700;\n margin-bottom: .5rem;\n}\nfieldset {\n border-width: 0;\n padding: 0;\n}\ninput[type=checkbox],\ninput[type=radio] {\n display: inline;\n}\n.label-inline {\n display: inline-block;\n font-weight: normal;\n margin-left: .5rem;\n}\n.container {\n margin: 0 auto;\n max-width: 112.0rem;\n padding: 0 2.0rem;\n position: relative;\n width: 100%;\n}\n.row {\n display: flex;\n flex-direction: column;\n padding: 0;\n width: 100%;\n}\n.row.row-no-padding {\n padding: 0;\n}\n.row.row-no-padding > .column {\n padding: 0;\n}\n.row.row-wrap {\n flex-wrap: wrap;\n}\n.row.row-top {\n align-items: flex-start;\n}\n.row.row-bottom {\n align-items: flex-end;\n}\n.row.row-center {\n align-items: center;\n}\n.row.row-stretch {\n align-items: stretch;\n}\n.row.row-baseline {\n align-items: baseline;\n}\n.row .column {\n display: block;\n flex: 1 1 auto;\n margin-left: 0;\n max-width: 100%;\n width: 100%;\n}\n.row .column.column-offset-10 {\n margin-left: 10%;\n}\n.row .column.column-offset-20 {\n margin-left: 20%;\n}\n.row .column.column-offset-25 {\n margin-left: 25%;\n}\n.row .column.column-offset-33,\n.row .column.column-offset-34 {\n margin-left: 33.3333%;\n}\n.row .column.column-offset-40 {\n margin-left: 40%;\n}\n.row .column.column-offset-50 {\n margin-left: 50%;\n}\n.row .column.column-offset-60 {\n margin-left: 60%;\n}\n.row .column.column-offset-66,\n.row .column.column-offset-67 {\n margin-left: 66.6666%;\n}\n.row .column.column-offset-75 {\n margin-left: 75%;\n}\n.row .column.column-offset-80 {\n margin-left: 80%;\n}\n.row .column.column-offset-90 {\n margin-left: 90%;\n}\n.row .column.column-10 {\n flex: 0 0 10%;\n max-width: 10%;\n}\n.row .column.column-20 {\n flex: 0 0 20%;\n max-width: 20%;\n}\n.row .column.column-25 {\n flex: 0 0 25%;\n max-width: 25%;\n}\n.row .column.column-33,\n.row .column.column-34 {\n flex: 0 0 33.3333%;\n max-width: 33.3333%;\n}\n.row .column.column-40 {\n flex: 0 0 40%;\n max-width: 40%;\n}\n.row .column.column-50 {\n flex: 0 0 50%;\n max-width: 50%;\n}\n.row .column.column-60 {\n flex: 0 0 60%;\n max-width: 60%;\n}\n.row .column.column-66,\n.row .column.column-67 {\n flex: 0 0 66.6666%;\n max-width: 66.6666%;\n}\n.row .column.column-75 {\n flex: 0 0 75%;\n max-width: 75%;\n}\n.row .column.column-80 {\n flex: 0 0 80%;\n max-width: 80%;\n}\n.row .column.column-90 {\n flex: 0 0 90%;\n max-width: 90%;\n}\n.row .column .column-top {\n align-self: flex-start;\n}\n.row .column .column-bottom {\n align-self: flex-end;\n}\n.row .column .column-center {\n align-self: center;\n}\n@media (min-width: 40rem) {\n .row {\n flex-direction: row;\n margin-left: -1.0rem;\n width: calc(100% + 2.0rem);\n }\n .row .column {\n margin-bottom: inherit;\n padding: 0 1.0rem;\n }\n}\na {\n color: #0069d9;\n text-decoration: none;\n}\na:focus,\na:hover {\n color: #606c76;\n}\ndl,\nol,\nul {\n list-style: none;\n margin-top: 0;\n padding-left: 0;\n}\ndl dl,\ndl ol,\ndl ul,\nol dl,\nol ol,\nol ul,\nul dl,\nul ol,\nul ul {\n font-size: 90%;\n margin: 1.5rem 0 1.5rem 3.0rem;\n}\nol {\n list-style: decimal inside;\n}\nul {\n list-style: circle inside;\n}\n.button,\nbutton,\ndd,\ndt,\nli {\n margin-bottom: 1.0rem;\n}\nfieldset,\ninput,\nselect,\ntextarea {\n margin-bottom: 1.5rem;\n}\nblockquote,\ndl,\nfigure,\nform,\nol,\np,\npre,\ntable,\nul {\n margin-bottom: 2.5rem;\n}\ntable {\n border-spacing: 0;\n display: block;\n overflow-x: auto;\n text-align: left;\n width: 100%;\n}\ntd,\nth {\n border-bottom: 0.1rem solid #e1e1e1;\n padding: 1.2rem 1.5rem;\n}\ntd:first-child,\nth:first-child {\n padding-left: 0;\n}\ntd:last-child,\nth:last-child {\n padding-right: 0;\n}\n@media (min-width: 40rem) {\n table {\n display: table;\n overflow-x: initial;\n }\n}\nb,\nstrong {\n font-weight: bold;\n}\np {\n margin-top: 0;\n}\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-weight: 300;\n letter-spacing: -.1rem;\n margin-bottom: 2.0rem;\n margin-top: 0;\n}\nh1 {\n font-size: 4.6rem;\n line-height: 1.2;\n}\nh2 {\n font-size: 3.6rem;\n line-height: 1.25;\n}\nh3 {\n font-size: 2.8rem;\n line-height: 1.3;\n}\nh4 {\n font-size: 2.2rem;\n letter-spacing: -.08rem;\n line-height: 1.35;\n}\nh5 {\n font-size: 1.8rem;\n letter-spacing: -.05rem;\n line-height: 1.5;\n}\nh6 {\n font-size: 1.6rem;\n letter-spacing: 0;\n line-height: 1.4;\n}\nimg {\n max-width: 100%;\n}\n.clearfix:after {\n clear: both;\n content: \" \";\n display: table;\n}\n.float-left {\n float: left;\n}\n.float-right {\n float: right;\n}\nh1 {\n font-size: 3.6rem;\n line-height: 1.25;\n}\nh2 {\n font-size: 2.8rem;\n line-height: 1.3;\n}\nh3 {\n font-size: 2.2rem;\n letter-spacing: -.08rem;\n line-height: 1.35;\n}\nh4 {\n font-size: 1.8rem;\n letter-spacing: -.05rem;\n line-height: 1.5;\n}\nh5 {\n font-size: 1.6rem;\n letter-spacing: 0;\n line-height: 1.4;\n}\nh6 {\n font-size: 1.4rem;\n letter-spacing: 0;\n line-height: 1.2;\n}\npre {\n padding: 1em;\n}\n.container {\n margin: 0 auto;\n max-width: 80.0rem;\n padding: 0 2.0rem;\n position: relative;\n width: 100%;\n}\nselect {\n width: auto;\n}\n.phx-hero {\n text-align: center;\n border-bottom: 1px solid #e3e3e3;\n background: #eee;\n border-radius: 6px;\n padding: 3em 3em 1em;\n margin-bottom: 3rem;\n font-weight: 200;\n font-size: 120%;\n}\n.phx-hero input {\n background: #ffffff;\n}\n.phx-logo {\n min-width: 300px;\n margin: 1rem;\n display: block;\n}\n.phx-logo img {\n width: auto;\n display: block;\n}\nheader {\n width: 100%;\n background: #fdfdfd;\n border-bottom: 1px solid #eaeaea;\n margin-bottom: 2rem;\n}\nheader section {\n align-items: center;\n display: flex;\n flex-direction: column;\n justify-content: space-between;\n}\nheader section :first-child {\n order: 2;\n}\nheader section :last-child {\n order: 1;\n}\nheader nav ul,\nheader nav li {\n margin: 0;\n padding: 0;\n display: block;\n text-align: right;\n white-space: nowrap;\n}\nheader nav ul {\n margin: 1rem;\n margin-top: 0;\n}\nheader nav a {\n display: block;\n}\n@media (min-width: 40.0rem) {\n header section {\n flex-direction: row;\n }\n header nav ul {\n margin: 1rem;\n }\n .phx-logo {\n flex-basis: 527px;\n margin: 2rem 1rem;\n }\n}\n\n/* css/app.css */\n.alert {\n padding: 15px;\n margin-bottom: 20px;\n border: 1px solid transparent;\n border-radius: 4px;\n}\n.alert-info {\n color: #31708f;\n background-color: #d9edf7;\n border-color: #bce8f1;\n}\n.alert-warning {\n color: #8a6d3b;\n background-color: #fcf8e3;\n border-color: #faebcc;\n}\n.alert-danger {\n color: #a94442;\n background-color: #f2dede;\n border-color: #ebccd1;\n}\n.alert p {\n margin-bottom: 0;\n}\n.alert:empty {\n display: none;\n}\n.invalid-feedback {\n color: #a94442;\n display: block;\n margin: -1rem 0 2rem;\n}\n.phx-no-feedback.invalid-feedback,\n.phx-no-feedback .invalid-feedback {\n display: none;\n}\n.phx-click-loading {\n opacity: 0.5;\n transition: opacity 1s ease-out;\n}\n.phx-loading {\n cursor: wait;\n}\n.phx-modal {\n opacity: 1 !important;\n position: fixed;\n z-index: 1;\n left: 0;\n top: 0;\n width: 100%;\n height: 100%;\n overflow: auto;\n background-color: rgba(0, 0, 0, 0.4);\n}\n.phx-modal-content {\n background-color: #fefefe;\n margin: 15vh auto;\n padding: 20px;\n border: 1px solid #888;\n width: 80%;\n}\n.phx-modal-close {\n color: #aaa;\n float: right;\n font-size: 28px;\n font-weight: bold;\n}\n.phx-modal-close:hover,\n.phx-modal-close:focus {\n color: black;\n text-decoration: none;\n cursor: pointer;\n}\n.fade-in-scale {\n animation: 0.2s ease-in 0s normal forwards 1 fade-in-scale-keys;\n}\n.fade-out-scale {\n animation: 0.2s ease-out 0s normal forwards 1 fade-out-scale-keys;\n}\n.fade-in {\n animation: 0.2s ease-out 0s normal forwards 1 fade-in-keys;\n}\n.fade-out {\n animation: 0.2s ease-out 0s normal forwards 1 fade-out-keys;\n}\n@keyframes fade-in-scale-keys {\n 0% {\n scale: 0.95;\n opacity: 0;\n }\n 100% {\n scale: 1.0;\n opacity: 1;\n }\n}\n@keyframes fade-out-scale-keys {\n 0% {\n scale: 1.0;\n opacity: 1;\n }\n 100% {\n scale: 0.95;\n opacity: 0;\n }\n}\n@keyframes fade-in-keys {\n 0% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n@keyframes fade-out-keys {\n 0% {\n opacity: 1;\n }\n 100% {\n opacity: 0;\n }\n}\n/*# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vYXNzZXRzL2Nzcy9waG9lbml4LmNzcyIsICIuLi8uLi8uLi9hc3NldHMvY3NzL2FwcC5jc3MiXSwKICAic291cmNlc0NvbnRlbnQiOiBbIi8qIEluY2x1ZGVzIHNvbWUgZGVmYXVsdCBzdHlsZSBmb3IgdGhlIHN0YXJ0ZXIgYXBwbGljYXRpb24uXG4gKiBUaGlzIGNhbiBiZSBzYWZlbHkgZGVsZXRlZCB0byBzdGFydCBmcmVzaC5cbiAqL1xuXG4vKiBNaWxsaWdyYW0gdjEuNC4xIGh0dHBzOi8vbWlsbGlncmFtLmdpdGh1Yi5pb1xuICogQ29weXJpZ2h0IChjKSAyMDIwIENKIFBhdG9pbG8gTGljZW5zZWQgdW5kZXIgdGhlIE1JVCBsaWNlbnNlXG4gKi9cblxuKiwqOmFmdGVyLCo6YmVmb3Jle2JveC1zaXppbmc6aW5oZXJpdH1odG1se2JveC1zaXppbmc6Ym9yZGVyLWJveDtmb250LXNpemU6NjIuNSV9Ym9keXtjb2xvcjojMDAwMDAwO2ZvbnQtZmFtaWx5OidIZWx2ZXRpY2EgTmV1ZScsICdIZWx2ZXRpY2EnLCAnQXJpYWwnLCBzYW5zLXNlcmlmO2ZvbnQtc2l6ZToxLjZlbTtmb250LXdlaWdodDozMDA7bGV0dGVyLXNwYWNpbmc6LjAxZW07bGluZS1oZWlnaHQ6MS42fWJsb2NrcXVvdGV7Ym9yZGVyLWxlZnQ6MC4zcmVtIHNvbGlkICNkMWQxZ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UFBO0FBR0Y7QUFBQTtBQUNPO0FBQWE7QUFBQTtBQUFBO0FBQ1g7QUFBWTtBQUFBO0FBQUE7QUFHckI7QUFBQTtBQUNPO0FBQVk7QUFBQTtBQUFBO0FBQ1Y7QUFBYTtBQUFBO0FBQUE7QUFHdEI7QUFBQTtBQUNPO0FBQUE7QUFBQTtBQUNFO0FBQUE7QUFBQTtBQUdUO0FBQUE7QUFDTztBQUFBO0FBQUE7QUFDRTtBQUFBO0FBQUE7IiwKICAibmFtZXMiOiBbXQp9Cg== */\n" }, "redirectURL": "", "headersSize": 122, "bodySize": 0, "_transferSize": 122, "_error": null }, "serverIPAddress": "127.0.0.1", "startedDateTime": "2022-11-15T19:45:16.626Z", "time": 4.382000071927905, "timings": { "blocked": 1.2679999700933695, "dns": -1, "ssl": -1, "connect": -1, "send": 0.07399999999999995, "wait": 1.8410000524520873, "receive": 1.1990000493824482, "_blocked_queueing": 0.3629999700933695 } }, { "_initiator": { "type": "parser", "url": "http://localhost:4000/events", "lineNumber": 9 }, "_priority": "Low", "_resourceType": "script", "cache": {}, "connection": "18690", "pageref": "page_11", "request": { "method": "GET", "url": "http://localhost:4000/assets/app.js", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "*/*" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Host", "value": "localhost:4000" }, { "name": "If-None-Match", "value": "\"318F12C\"" }, { "name": "Referer", "value": "http://localhost:4000/events" }, { "name": "Sec-Fetch-Dest", "value": "script" }, { "name": "Sec-Fetch-Mode", "value": "no-cors" }, { "name": "Sec-Fetch-Site", "value": "same-origin" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "sec-ch-ua", "value": "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"" }, { "name": "sec-ch-ua-mobile", "value": "?0" }, { "name": "sec-ch-ua-platform", "value": "\"Linux\"" } ], "queryString": [], "cookies": [ { "name": "_faircart_key", "value": "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4", "path": "/", "domain": "localhost", "expires": "1969-12-31T23:59:59.000Z", "httpOnly": true, "secure": false } ], "headersSize": 664, "bodySize": 0 }, "response": { "status": 304, "statusText": "Not Modified", "httpVersion": "HTTP/1.1", "headers": [ { "name": "cache-control", "value": "public" }, { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "etag", "value": "\"318F12C\"" }, { "name": "server", "value": "Cowboy" } ], "cookies": [], "content": { "size": 630426, "mimeType": "text/javascript", "text": "(() => {\n var __create = Object.create;\n var __defProp = Object.defineProperty;\n var __getOwnPropDesc = Object.getOwnPropertyDescriptor;\n var __getOwnPropNames = Object.getOwnPropertyNames;\n var __getOwnPropSymbols = Object.getOwnPropertySymbols;\n var __getProtoOf = Object.getPrototypeOf;\n var __hasOwnProp = Object.prototype.hasOwnProperty;\n var __propIsEnum = Object.prototype.propertyIsEnumerable;\n var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;\n var __spreadValues = (a, b) => {\n for (var prop in b || (b = {}))\n if (__hasOwnProp.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n if (__getOwnPropSymbols)\n for (var prop of __getOwnPropSymbols(b)) {\n if (__propIsEnum.call(b, prop))\n __defNormalProp(a, prop, b[prop]);\n }\n return a;\n };\n var __commonJS = (cb, mod) => function __require() {\n return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;\n };\n var __copyProps = (to, from, except, desc) => {\n if (from && typeof from === \"object\" || typeof from === \"function\") {\n for (let key of __getOwnPropNames(from))\n if (!__hasOwnProp.call(to, key) && key !== except)\n __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });\n }\n return to;\n };\n var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(isNodeMode || !mod || !mod.__esModule ? __defProp(target, \"default\", { value: mod, enumerable: true }) : target, mod));\n\n // vendor/topbar.js\n var require_topbar = __commonJS({\n \"vendor/topbar.js\"(exports, module) {\n (function(window2, document2) {\n \"use strict\";\n (function() {\n var lastTime = 0;\n var vendors = [\"ms\", \"moz\", \"webkit\", \"o\"];\n for (var x = 0; x < vendors.length && !window2.requestAnimationFrame; ++x) {\n window2.requestAnimationFrame = window2[vendors[x] + \"RequestAnimationFrame\"];\n window2.cancelAnimationFrame = window2[vendors[x] + \"CancelAnimationFrame\"] || window2[vendors[x] + \"CancelRequestAnimationFrame\"];\n }\n if (!window2.requestAnimationFrame)\n window2.requestAnimationFrame = function(callback, element) {\n var currTime = new Date().getTime();\n var timeToCall = Math.max(0, 16 - (currTime - lastTime));\n var id = window2.setTimeout(function() {\n callback(currTime + timeToCall);\n }, timeToCall);\n lastTime = currTime + timeToCall;\n return id;\n };\n if (!window2.cancelAnimationFrame)\n window2.cancelAnimationFrame = function(id) {\n clearTimeout(id);\n };\n })();\n var canvas, progressTimerId, fadeTimerId, currentProgress, showing, addEvent = function(elem, type, handler) {\n if (elem.addEventListener)\n elem.addEventListener(type, handler, false);\n else if (elem.attachEvent)\n elem.attachEvent(\"on\" + type, handler);\n else\n elem[\"on\" + type] = handler;\n }, options = {\n autoRun: true,\n barThickness: 3,\n barColors: {\n 0: \"rgba(26, 188, 156, .9)\",\n \".25\": \"rgba(52, 152, 219, .9)\",\n \".50\": \"rgba(241, 196, 15, .9)\",\n \".75\": \"rgba(230, 126, 34, .9)\",\n \"1.0\": \"rgba(211, 84, 0, .9)\"\n },\n shadowBlur: 10,\n shadowColor: \"rgba(0, 0, 0, .6)\",\n className: null\n }, repaint = function() {\n canvas.width = window2.innerWidth;\n canvas.height = options.barThickness * 5;\n var ctx = canvas.getContext(\"2d\");\n ctx.shadowBlur = options.shadowBlur;\n ctx.shadowColor = options.shadowColor;\n var lineGradient = ctx.createLinearGradient(0, 0, canvas.width, 0);\n for (var stop in options.barColors)\n lineGradient.addColorStop(stop, options.barColors[stop]);\n ctx.lineWidth = options.barThickness;\n ctx.beginPath();\n ctx.moveTo(0, options.barThickness / 2);\n ctx.lineTo(Math.ceil(currentProgress * canvas.width), options.barThickness / 2);\n ctx.strokeStyle = lineGradient;\n ctx.stroke();\n }, createCanvas = function() {\n canvas = document2.createElement(\"canvas\");\n var style = canvas.style;\n style.position = \"fixed\";\n style.top = style.left = style.right = style.margin = style.padding = 0;\n style.zIndex = 100001;\n style.display = \"none\";\n if (options.className)\n canvas.classList.add(options.className);\n document2.body.appendChild(canvas);\n addEvent(window2, \"resize\", repaint);\n }, topbar2 = {\n config: function(opts) {\n for (var key in opts)\n if (options.hasOwnProperty(key))\n options[key] = opts[key];\n },\n show: function() {\n if (showing)\n return;\n showing = true;\n if (fadeTimerId !== null)\n window2.cancelAnimationFrame(fadeTimerId);\n if (!canvas)\n createCanvas();\n canvas.style.opacity = 1;\n canvas.style.display = \"block\";\n topbar2.progress(0);\n if (options.autoRun) {\n (function loop() {\n progressTimerId = window2.requestAnimationFrame(loop);\n topbar2.progress(\"+\" + 0.05 * Math.pow(1 - Math.sqrt(currentProgress), 2));\n })();\n }\n },\n progress: function(to) {\n if (typeof to === \"undefined\")\n return currentProgress;\n if (typeof to === \"string\") {\n to = (to.indexOf(\"+\") >= 0 || to.indexOf(\"-\") >= 0 ? currentProgress : 0) + parseFloat(to);\n }\n currentProgress = to > 1 ? 1 : to;\n repaint();\n return currentProgress;\n },\n hide: function() {\n if (!showing)\n return;\n showing = false;\n if (progressTimerId != null) {\n window2.cancelAnimationFrame(progressTimerId);\n progressTimerId = null;\n }\n (function loop() {\n if (topbar2.progress(\"+.1\") >= 1) {\n canvas.style.opacity -= 0.05;\n if (canvas.style.opacity <= 0.05) {\n canvas.style.display = \"none\";\n fadeTimerId = null;\n return;\n }\n }\n fadeTimerId = window2.requestAnimationFrame(loop);\n })();\n }\n };\n if (typeof module === \"object\" && typeof module.exports === \"object\") {\n module.exports = topbar2;\n } else if (typeof define === \"function\" && define.amd) {\n define(function() {\n return topbar2;\n });\n } else {\n this.topbar = topbar2;\n }\n }).call(exports, window, document);\n }\n });\n\n // ../deps/phoenix_html/priv/static/phoenix_html.js\n (function() {\n var PolyfillEvent = eventConstructor();\n function eventConstructor() {\n if (typeof window.CustomEvent === \"function\")\n return window.CustomEvent;\n function CustomEvent2(event, params) {\n params = params || { bubbles: false, cancelable: false, detail: void 0 };\n var evt = document.createEvent(\"CustomEvent\");\n evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);\n return evt;\n }\n CustomEvent2.prototype = window.Event.prototype;\n return CustomEvent2;\n }\n function buildHiddenInput(name, value) {\n var input = document.createElement(\"input\");\n input.type = \"hidden\";\n input.name = name;\n input.value = value;\n return input;\n }\n function handleClick(element, targetModifierKey) {\n var to = element.getAttribute(\"data-to\"), method = buildHiddenInput(\"_method\", element.getAttribute(\"data-method\")), csrf = buildHiddenInput(\"_csrf_token\", element.getAttribute(\"data-csrf\")), form = document.createElement(\"form\"), target = element.getAttribute(\"target\");\n form.method = element.getAttribute(\"data-method\") === \"get\" ? \"get\" : \"post\";\n form.action = to;\n form.style.display = \"hidden\";\n if (target)\n form.target = target;\n else if (targetModifierKey)\n form.target = \"_blank\";\n form.appendChild(csrf);\n form.appendChild(method);\n document.body.appendChild(form);\n form.submit();\n }\n window.addEventListener(\"click\", function(e) {\n var element = e.target;\n if (e.defaultPrevented)\n return;\n while (element && element.getAttribute) {\n var phoenixLinkEvent = new PolyfillEvent(\"phoenix.link.click\", {\n \"bubbles\": true,\n \"cancelable\": true\n });\n if (!element.dispatchEvent(phoenixLinkEvent)) {\n e.preventDefault();\n e.stopImmediatePropagation();\n return false;\n }\n if (element.getAttribute(\"data-method\")) {\n handleClick(element, e.metaKey || e.shiftKey);\n e.preventDefault();\n return false;\n } else {\n element = element.parentNode;\n }\n }\n }, false);\n window.addEventListener(\"phoenix.link.click\", function(e) {\n var message = e.target.getAttribute(\"data-confirm\");\n if (message && !window.confirm(message)) {\n e.preventDefault();\n }\n }, false);\n })();\n\n // ../deps/phoenix/priv/static/phoenix.mjs\n var closure = (value) => {\n if (typeof value === \"function\") {\n return value;\n } else {\n let closure22 = function() {\n return value;\n };\n return closure22;\n }\n };\n var globalSelf = typeof self !== \"undefined\" ? self : null;\n var phxWindow = typeof window !== \"undefined\" ? window : null;\n var global = globalSelf || phxWindow || global;\n var DEFAULT_VSN = \"2.0.0\";\n var SOCKET_STATES = { connecting: 0, open: 1, closing: 2, closed: 3 };\n var DEFAULT_TIMEOUT = 1e4;\n var WS_CLOSE_NORMAL = 1e3;\n var CHANNEL_STATES = {\n closed: \"closed\",\n errored: \"errored\",\n joined: \"joined\",\n joining: \"joining\",\n leaving: \"leaving\"\n };\n var CHANNEL_EVENTS = {\n close: \"phx_close\",\n error: \"phx_error\",\n join: \"phx_join\",\n reply: \"phx_reply\",\n leave: \"phx_leave\"\n };\n var TRANSPORTS = {\n longpoll: \"longpoll\",\n websocket: \"websocket\"\n };\n var XHR_STATES = {\n complete: 4\n };\n var Push = class {\n constructor(channel, event, payload, timeout) {\n this.channel = channel;\n this.event = event;\n this.payload = payload || function() {\n return {};\n };\n this.receivedResp = null;\n this.timeout = timeout;\n this.timeoutTimer = null;\n this.recHooks = [];\n this.sent = false;\n }\n resend(timeout) {\n this.timeout = timeout;\n this.reset();\n this.send();\n }\n send() {\n if (this.hasReceived(\"timeout\")) {\n return;\n }\n this.startTimeout();\n this.sent = true;\n this.channel.socket.push({\n topic: this.channel.topic,\n event: this.event,\n payload: this.payload(),\n ref: this.ref,\n join_ref: this.channel.joinRef()\n });\n }\n receive(status, callback) {\n if (this.hasReceived(status)) {\n callback(this.receivedResp.response);\n }\n this.recHooks.push({ status, callback });\n return this;\n }\n reset() {\n this.cancelRefEvent();\n this.ref = null;\n this.refEvent = null;\n this.receivedResp = null;\n this.sent = false;\n }\n matchReceive({ status, response, _ref }) {\n this.recHooks.filter((h) => h.status === status).forEach((h) => h.callback(response));\n }\n cancelRefEvent() {\n if (!this.refEvent) {\n return;\n }\n this.channel.off(this.refEvent);\n }\n cancelTimeout() {\n clearTimeout(this.timeoutTimer);\n this.timeoutTimer = null;\n }\n startTimeout() {\n if (this.timeoutTimer) {\n this.cancelTimeout();\n }\n this.ref = this.channel.socket.makeRef();\n this.refEvent = this.channel.replyEventName(this.ref);\n this.channel.on(this.refEvent, (payload) => {\n this.cancelRefEvent();\n this.cancelTimeout();\n this.receivedResp = payload;\n this.matchReceive(payload);\n });\n this.timeoutTimer = setTimeout(() => {\n this.trigger(\"timeout\", {});\n }, this.timeout);\n }\n hasReceived(status) {\n return this.receivedResp && this.receivedResp.status === status;\n }\n trigger(status, response) {\n this.channel.trigger(this.refEvent, { status, response });\n }\n };\n var Timer = class {\n constructor(callback, timerCalc) {\n this.callback = callback;\n this.timerCalc = timerCalc;\n this.timer = null;\n this.tries = 0;\n }\n reset() {\n this.tries = 0;\n clearTimeout(this.timer);\n }\n scheduleTimeout() {\n clearTimeout(this.timer);\n this.timer = setTimeout(() => {\n this.tries = this.tries + 1;\n this.callback();\n }, this.timerCalc(this.tries + 1));\n }\n };\n var Channel = class {\n constructor(topic, params, socket) {\n this.state = CHANNEL_STATES.closed;\n this.topic = topic;\n this.params = closure(params || {});\n this.socket = socket;\n this.bindings = [];\n this.bindingRef = 0;\n this.timeout = this.socket.timeout;\n this.joinedOnce = false;\n this.joinPush = new Push(this, CHANNEL_EVENTS.join, this.params, this.timeout);\n this.pushBuffer = [];\n this.stateChangeRefs = [];\n this.rejoinTimer = new Timer(() => {\n if (this.socket.isConnected()) {\n this.rejoin();\n }\n }, this.socket.rejoinAfterMs);\n this.stateChangeRefs.push(this.socket.onError(() => this.rejoinTimer.reset()));\n this.stateChangeRefs.push(this.socket.onOpen(() => {\n this.rejoinTimer.reset();\n if (this.isErrored()) {\n this.rejoin();\n }\n }));\n this.joinPush.receive(\"ok\", () => {\n this.state = CHANNEL_STATES.joined;\n this.rejoinTimer.reset();\n this.pushBuffer.forEach((pushEvent) => pushEvent.send());\n this.pushBuffer = [];\n });\n this.joinPush.receive(\"error\", () => {\n this.state = CHANNEL_STATES.errored;\n if (this.socket.isConnected()) {\n this.rejoinTimer.scheduleTimeout();\n }\n });\n this.onClose(() => {\n this.rejoinTimer.reset();\n if (this.socket.hasLogger())\n this.socket.log(\"channel\", `close ${this.topic} ${this.joinRef()}`);\n this.state = CHANNEL_STATES.closed;\n this.socket.remove(this);\n });\n this.onError((reason) => {\n if (this.socket.hasLogger())\n this.socket.log(\"channel\", `error ${this.topic}`, reason);\n if (this.isJoining()) {\n this.joinPush.reset();\n }\n this.state = CHANNEL_STATES.errored;\n if (this.socket.isConnected()) {\n this.rejoinTimer.scheduleTimeout();\n }\n });\n this.joinPush.receive(\"timeout\", () => {\n if (this.socket.hasLogger())\n this.socket.log(\"channel\", `timeout ${this.topic} (${this.joinRef()})`, this.joinPush.timeout);\n let leavePush = new Push(this, CHANNEL_EVENTS.leave, closure({}), this.timeout);\n leavePush.send();\n this.state = CHANNEL_STATES.errored;\n this.joinPush.reset();\n if (this.socket.isConnected()) {\n this.rejoinTimer.scheduleTimeout();\n }\n });\n this.on(CHANNEL_EVENTS.reply, (payload, ref) => {\n this.trigger(this.replyEventName(ref), payload);\n });\n }\n join(timeout = this.timeout) {\n if (this.joinedOnce) {\n throw new Error(\"tried to join multiple times. 'join' can only be called a single time per channel instance\");\n } else {\n this.timeout = timeout;\n this.joinedOnce = true;\n this.rejoin();\n return this.joinPush;\n }\n }\n onClose(callback) {\n this.on(CHANNEL_EVENTS.close, callback);\n }\n onError(callback) {\n return this.on(CHANNEL_EVENTS.error, (reason) => callback(reason));\n }\n on(event, callback) {\n let ref = this.bindingRef++;\n this.bindings.push({ event, ref, callback });\n return ref;\n }\n off(event, ref) {\n this.bindings = this.bindings.filter((bind) => {\n return !(bind.event === event && (typeof ref === \"undefined\" || ref === bind.ref));\n });\n }\n canPush() {\n return this.socket.isConnected() && this.isJoined();\n }\n push(event, payload, timeout = this.timeout) {\n payload = payload || {};\n if (!this.joinedOnce) {\n throw new Error(`tried to push '${event}' to '${this.topic}' before joining. Use channel.join() before pushing events`);\n }\n let pushEvent = new Push(this, event, function() {\n return payload;\n }, timeout);\n if (this.canPush()) {\n pushEvent.send();\n } else {\n pushEvent.startTimeout();\n this.pushBuffer.push(pushEvent);\n }\n return pushEvent;\n }\n leave(timeout = this.timeout) {\n this.rejoinTimer.reset();\n this.joinPush.cancelTimeout();\n this.state = CHANNEL_STATES.leaving;\n let onClose = () => {\n if (this.socket.hasLogger())\n this.socket.log(\"channel\", `leave ${this.topic}`);\n this.trigger(CHANNEL_EVENTS.close, \"leave\");\n };\n let leavePush = new Push(this, CHANNEL_EVENTS.leave, closure({}), timeout);\n leavePush.receive(\"ok\", () => onClose()).receive(\"timeout\", () => onClose());\n leavePush.send();\n if (!this.canPush()) {\n leavePush.trigger(\"ok\", {});\n }\n return leavePush;\n }\n onMessage(_event, payload, _ref) {\n return payload;\n }\n isMember(topic, event, payload, joinRef) {\n if (this.topic !== topic) {\n return false;\n }\n if (joinRef && joinRef !== this.joinRef()) {\n if (this.socket.hasLogger())\n this.socket.log(\"channel\", \"dropping outdated message\", { topic, event, payload, joinRef });\n return false;\n } else {\n return true;\n }\n }\n joinRef() {\n return this.joinPush.ref;\n }\n rejoin(timeout = this.timeout) {\n if (this.isLeaving()) {\n return;\n }\n this.socket.leaveOpenTopic(this.topic);\n this.state = CHANNEL_STATES.joining;\n this.joinPush.resend(timeout);\n }\n trigger(event, payload, ref, joinRef) {\n let handledPayload = this.onMessage(event, payload, ref, joinRef);\n if (payload && !handledPayload) {\n throw new Error(\"channel onMessage callbacks must return the payload, modified or unmodified\");\n }\n let eventBindings = this.bindings.filter((bind) => bind.event === event);\n for (let i = 0; i < eventBindings.length; i++) {\n let bind = eventBindings[i];\n bind.callback(handledPayload, ref, joinRef || this.joinRef());\n }\n }\n replyEventName(ref) {\n return `chan_reply_${ref}`;\n }\n isClosed() {\n return this.state === CHANNEL_STATES.closed;\n }\n isErrored() {\n return this.state === CHANNEL_STATES.errored;\n }\n isJoined() {\n return this.state === CHANNEL_STATES.joined;\n }\n isJoining() {\n return this.state === CHANNEL_STATES.joining;\n }\n isLeaving() {\n return this.state === CHANNEL_STATES.leaving;\n }\n };\n var Ajax = class {\n static request(method, endPoint, accept, body, timeout, ontimeout, callback) {\n if (global.XDomainRequest) {\n let req = new global.XDomainRequest();\n return this.xdomainRequest(req, method, endPoint, body, timeout, ontimeout, callback);\n } else {\n let req = new global.XMLHttpRequest();\n return this.xhrRequest(req, method, endPoint, accept, body, timeout, ontimeout, callback);\n }\n }\n static xdomainRequest(req, method, endPoint, body, timeout, ontimeout, callback) {\n req.timeout = timeout;\n req.open(method, endPoint);\n req.onload = () => {\n let response = this.parseJSON(req.responseText);\n callback && callback(response);\n };\n if (ontimeout) {\n req.ontimeout = ontimeout;\n }\n req.onprogress = () => {\n };\n req.send(body);\n return req;\n }\n static xhrRequest(req, method, endPoint, accept, body, timeout, ontimeout, callback) {\n req.open(method, endPoint, true);\n req.timeout = timeout;\n req.setRequestHeader(\"Content-Type\", accept);\n req.onerror = () => callback && callback(null);\n req.onreadystatechange = () => {\n if (req.readyState === XHR_STATES.complete && callback) {\n let response = this.parseJSON(req.responseText);\n callback(response);\n }\n };\n if (ontimeout) {\n req.ontimeout = ontimeout;\n }\n req.send(body);\n return req;\n }\n static parseJSON(resp) {\n if (!resp || resp === \"\") {\n return null;\n }\n try {\n return JSON.parse(resp);\n } catch (e) {\n console && console.log(\"failed to parse JSON response\", resp);\n return null;\n }\n }\n static serialize(obj, parentKey) {\n let queryStr = [];\n for (var key in obj) {\n if (!Object.prototype.hasOwnProperty.call(obj, key)) {\n continue;\n }\n let paramKey = parentKey ? `${parentKey}[${key}]` : key;\n let paramVal = obj[key];\n if (typeof paramVal === \"object\") {\n queryStr.push(this.serialize(paramVal, paramKey));\n } else {\n queryStr.push(encodeURIComponent(paramKey) + \"=\" + encodeURIComponent(paramVal));\n }\n }\n return queryStr.join(\"&\");\n }\n static appendParams(url, params) {\n if (Object.keys(params).length === 0) {\n return url;\n }\n let prefix = url.match(/\\?/) ? \"&\" : \"?\";\n return `${url}${prefix}${this.serialize(params)}`;\n }\n };\n var LongPoll = class {\n constructor(endPoint) {\n this.endPoint = null;\n this.token = null;\n this.skipHeartbeat = true;\n this.reqs = /* @__PURE__ */ new Set();\n this.onopen = function() {\n };\n this.onerror = function() {\n };\n this.onmessage = function() {\n };\n this.onclose = function() {\n };\n this.pollEndpoint = this.normalizeEndpoint(endPoint);\n this.readyState = SOCKET_STATES.connecting;\n this.poll();\n }\n normalizeEndpoint(endPoint) {\n return endPoint.replace(\"ws://\", \"http://\").replace(\"wss://\", \"https://\").replace(new RegExp(\"(.*)/\" + TRANSPORTS.websocket), \"$1/\" + TRANSPORTS.longpoll);\n }\n endpointURL() {\n return Ajax.appendParams(this.pollEndpoint, { token: this.token });\n }\n closeAndRetry(code, reason, wasClean) {\n this.close(code, reason, wasClean);\n this.readyState = SOCKET_STATES.connecting;\n }\n ontimeout() {\n this.onerror(\"timeout\");\n this.closeAndRetry(1005, \"timeout\", false);\n }\n isActive() {\n return this.readyState === SOCKET_STATES.open || this.readyState === SOCKET_STATES.connecting;\n }\n poll() {\n this.ajax(\"GET\", null, () => this.ontimeout(), (resp) => {\n if (resp) {\n var { status, token, messages } = resp;\n this.token = token;\n } else {\n status = 0;\n }\n switch (status) {\n case 200:\n messages.forEach((msg) => {\n setTimeout(() => this.onmessage({ data: msg }), 0);\n });\n this.poll();\n break;\n case 204:\n this.poll();\n break;\n case 410:\n this.readyState = SOCKET_STATES.open;\n this.onopen({});\n this.poll();\n break;\n case 403:\n this.onerror(403);\n this.close(1008, \"forbidden\", false);\n break;\n case 0:\n case 500:\n this.onerror(500);\n this.closeAndRetry(1011, \"internal server error\", 500);\n break;\n default:\n throw new Error(`unhandled poll status ${status}`);\n }\n });\n }\n send(body) {\n this.ajax(\"POST\", body, () => this.onerror(\"timeout\"), (resp) => {\n if (!resp || resp.status !== 200) {\n this.onerror(resp && resp.status);\n this.closeAndRetry(1011, \"internal server error\", false);\n }\n });\n }\n close(code, reason, wasClean) {\n for (let req of this.reqs) {\n req.abort();\n }\n this.readyState = SOCKET_STATES.closed;\n let opts = Object.assign({ code: 1e3, reason: void 0, wasClean: true }, { code, reason, wasClean });\n if (typeof CloseEvent !== \"undefined\") {\n this.onclose(new CloseEvent(\"close\", opts));\n } else {\n this.onclose(opts);\n }\n }\n ajax(method, body, onCallerTimeout, callback) {\n let req;\n let ontimeout = () => {\n this.reqs.delete(req);\n onCallerTimeout();\n };\n req = Ajax.request(method, this.endpointURL(), \"application/json\", body, this.timeout, ontimeout, (resp) => {\n this.reqs.delete(req);\n if (this.isActive()) {\n callback(resp);\n }\n });\n this.reqs.add(req);\n }\n };\n var serializer_default = {\n HEADER_LENGTH: 1,\n META_LENGTH: 4,\n KINDS: { push: 0, reply: 1, broadcast: 2 },\n encode(msg, callback) {\n if (msg.payload.constructor === ArrayBuffer) {\n return callback(this.binaryEncode(msg));\n } else {\n let payload = [msg.join_ref, msg.ref, msg.topic, msg.event, msg.payload];\n return callback(JSON.stringify(payload));\n }\n },\n decode(rawPayload, callback) {\n if (rawPayload.constructor === ArrayBuffer) {\n return callback(this.binaryDecode(rawPayload));\n } else {\n let [join_ref, ref, topic, event, payload] = JSON.parse(rawPayload);\n return callback({ join_ref, ref, topic, event, payload });\n }\n },\n binaryEncode(message) {\n let { join_ref, ref, event, topic, payload } = message;\n let metaLength = this.META_LENGTH + join_ref.length + ref.length + topic.length + event.length;\n let header = new ArrayBuffer(this.HEADER_LENGTH + metaLength);\n let view = new DataView(header);\n let offset = 0;\n view.setUint8(offset++, this.KINDS.push);\n view.setUint8(offset++, join_ref.length);\n view.setUint8(offset++, ref.length);\n view.setUint8(offset++, topic.length);\n view.setUint8(offset++, event.length);\n Array.from(join_ref, (char) => view.setUint8(offset++, char.charCodeAt(0)));\n Array.from(ref, (char) => view.setUint8(offset++, char.charCodeAt(0)));\n Array.from(topic, (char) => view.setUint8(offset++, char.charCodeAt(0)));\n Array.from(event, (char) => view.setUint8(offset++, char.charCodeAt(0)));\n var combined = new Uint8Array(header.byteLength + payload.byteLength);\n combined.set(new Uint8Array(header), 0);\n combined.set(new Uint8Array(payload), header.byteLength);\n return combined.buffer;\n },\n binaryDecode(buffer) {\n let view = new DataView(buffer);\n let kind = view.getUint8(0);\n let decoder = new TextDecoder();\n switch (kind) {\n case this.KINDS.push:\n return this.decodePush(buffer, view, decoder);\n case this.KINDS.reply:\n return this.decodeReply(buffer, view, decoder);\n case this.KINDS.broadcast:\n return this.decodeBroadcast(buffer, view, decoder);\n }\n },\n decodePush(buffer, view, decoder) {\n let joinRefSize = view.getUint8(1);\n let topicSize = view.getUint8(2);\n let eventSize = view.getUint8(3);\n let offset = this.HEADER_LENGTH + this.META_LENGTH - 1;\n let joinRef = decoder.decode(buffer.slice(offset, offset + joinRefSize));\n offset = offset + joinRefSize;\n let topic = decoder.decode(buffer.slice(offset, offset + topicSize));\n offset = offset + topicSize;\n let event = decoder.decode(buffer.slice(offset, offset + eventSize));\n offset = offset + eventSize;\n let data = buffer.slice(offset, buffer.byteLength);\n return { join_ref: joinRef, ref: null, topic, event, payload: data };\n },\n decodeReply(buffer, view, decoder) {\n let joinRefSize = view.getUint8(1);\n let refSize = view.getUint8(2);\n let topicSize = view.getUint8(3);\n let eventSize = view.getUint8(4);\n let offset = this.HEADER_LENGTH + this.META_LENGTH;\n let joinRef = decoder.decode(buffer.slice(offset, offset + joinRefSize));\n offset = offset + joinRefSize;\n let ref = decoder.decode(buffer.slice(offset, offset + refSize));\n offset = offset + refSize;\n let topic = decoder.decode(buffer.slice(offset, offset + topicSize));\n offset = offset + topicSize;\n let event = decoder.decode(buffer.slice(offset, offset + eventSize));\n offset = offset + eventSize;\n let data = buffer.slice(offset, buffer.byteLength);\n let payload = { status: event, response: data };\n return { join_ref: joinRef, ref, topic, event: CHANNEL_EVENTS.reply, payload };\n },\n decodeBroadcast(buffer, view, decoder) {\n let topicSize = view.getUint8(1);\n let eventSize = view.getUint8(2);\n let offset = this.HEADER_LENGTH + 2;\n let topic = decoder.decode(buffer.slice(offset, offset + topicSize));\n offset = offset + topicSize;\n let event = decoder.decode(buffer.slice(offset, offset + eventSize));\n offset = offset + eventSize;\n let data = buffer.slice(offset, buffer.byteLength);\n return { join_ref: null, ref: null, topic, event, payload: data };\n }\n };\n var Socket = class {\n constructor(endPoint, opts = {}) {\n this.stateChangeCallbacks = { open: [], close: [], error: [], message: [] };\n this.channels = [];\n this.sendBuffer = [];\n this.ref = 0;\n this.timeout = opts.timeout || DEFAULT_TIMEOUT;\n this.transport = opts.transport || global.WebSocket || LongPoll;\n this.establishedConnections = 0;\n this.defaultEncoder = serializer_default.encode.bind(serializer_default);\n this.defaultDecoder = serializer_default.decode.bind(serializer_default);\n this.closeWasClean = false;\n this.binaryType = opts.binaryType || \"arraybuffer\";\n this.connectClock = 1;\n if (this.transport !== LongPoll) {\n this.encode = opts.encode || this.defaultEncoder;\n this.decode = opts.decode || this.defaultDecoder;\n } else {\n this.encode = this.defaultEncoder;\n this.decode = this.defaultDecoder;\n }\n let awaitingConnectionOnPageShow = null;\n if (phxWindow && phxWindow.addEventListener) {\n phxWindow.addEventListener(\"pagehide\", (_e) => {\n if (this.conn) {\n this.disconnect();\n awaitingConnectionOnPageShow = this.connectClock;\n }\n });\n phxWindow.addEventListener(\"pageshow\", (_e) => {\n if (awaitingConnectionOnPageShow === this.connectClock) {\n awaitingConnectionOnPageShow = null;\n this.connect();\n }\n });\n }\n this.heartbeatIntervalMs = opts.heartbeatIntervalMs || 3e4;\n this.rejoinAfterMs = (tries) => {\n if (opts.rejoinAfterMs) {\n return opts.rejoinAfterMs(tries);\n } else {\n return [1e3, 2e3, 5e3][tries - 1] || 1e4;\n }\n };\n this.reconnectAfterMs = (tries) => {\n if (opts.reconnectAfterMs) {\n return opts.reconnectAfterMs(tries);\n } else {\n return [10, 50, 100, 150, 200, 250, 500, 1e3, 2e3][tries - 1] || 5e3;\n }\n };\n this.logger = opts.logger || null;\n this.longpollerTimeout = opts.longpollerTimeout || 2e4;\n this.params = closure(opts.params || {});\n this.endPoint = `${endPoint}/${TRANSPORTS.websocket}`;\n this.vsn = opts.vsn || DEFAULT_VSN;\n this.heartbeatTimer = null;\n this.pendingHeartbeatRef = null;\n this.reconnectTimer = new Timer(() => {\n this.teardown(() => this.connect());\n }, this.reconnectAfterMs);\n }\n getLongPollTransport() {\n return LongPoll;\n }\n replaceTransport(newTransport) {\n this.connectClock++;\n this.closeWasClean = true;\n this.reconnectTimer.reset();\n this.sendBuffer = [];\n if (this.conn) {\n this.conn.close();\n this.conn = null;\n }\n this.transport = newTransport;\n }\n protocol() {\n return location.protocol.match(/^https/) ? \"wss\" : \"ws\";\n }\n endPointURL() {\n let uri = Ajax.appendParams(Ajax.appendParams(this.endPoint, this.params()), { vsn: this.vsn });\n if (uri.charAt(0) !== \"/\") {\n return uri;\n }\n if (uri.charAt(1) === \"/\") {\n return `${this.protocol()}:${uri}`;\n }\n return `${this.protocol()}://${location.host}${uri}`;\n }\n disconnect(callback, code, reason) {\n this.connectClock++;\n this.closeWasClean = true;\n this.reconnectTimer.reset();\n this.teardown(callback, code, reason);\n }\n connect(params) {\n if (params) {\n console && console.log(\"passing params to connect is deprecated. Instead pass :params to the Socket constructor\");\n this.params = closure(params);\n }\n if (this.conn) {\n return;\n }\n this.connectClock++;\n this.closeWasClean = false;\n this.conn = new this.transport(this.endPointURL());\n this.conn.binaryType = this.binaryType;\n this.conn.timeout = this.longpollerTimeout;\n this.conn.onopen = () => this.onConnOpen();\n this.conn.onerror = (error) => this.onConnError(error);\n this.conn.onmessage = (event) => this.onConnMessage(event);\n this.conn.onclose = (event) => this.onConnClose(event);\n }\n log(kind, msg, data) {\n this.logger(kind, msg, data);\n }\n hasLogger() {\n return this.logger !== null;\n }\n onOpen(callback) {\n let ref = this.makeRef();\n this.stateChangeCallbacks.open.push([ref, callback]);\n return ref;\n }\n onClose(callback) {\n let ref = this.makeRef();\n this.stateChangeCallbacks.close.push([ref, callback]);\n return ref;\n }\n onError(callback) {\n let ref = this.makeRef();\n this.stateChangeCallbacks.error.push([ref, callback]);\n return ref;\n }\n onMessage(callback) {\n let ref = this.makeRef();\n this.stateChangeCallbacks.message.push([ref, callback]);\n return ref;\n }\n ping(callback) {\n if (!this.isConnected()) {\n return false;\n }\n let ref = this.makeRef();\n let startTime = Date.now();\n this.push({ topic: \"phoenix\", event: \"heartbeat\", payload: {}, ref });\n let onMsgRef = this.onMessage((msg) => {\n if (msg.ref === ref) {\n this.off([onMsgRef]);\n callback(Date.now() - startTime);\n }\n });\n return true;\n }\n onConnOpen() {\n if (this.hasLogger())\n this.log(\"transport\", `connected to ${this.endPointURL()}`);\n this.closeWasClean = false;\n this.establishedConnections++;\n this.flushSendBuffer();\n this.reconnectTimer.reset();\n this.resetHeartbeat();\n this.stateChangeCallbacks.open.forEach(([, callback]) => callback());\n }\n heartbeatTimeout() {\n if (this.pendingHeartbeatRef) {\n this.pendingHeartbeatRef = null;\n if (this.hasLogger()) {\n this.log(\"transport\", \"heartbeat timeout. Attempting to re-establish connection\");\n }\n this.abnormalClose(\"heartbeat timeout\");\n }\n }\n resetHeartbeat() {\n if (this.conn && this.conn.skipHeartbeat) {\n return;\n }\n this.pendingHeartbeatRef = null;\n clearTimeout(this.heartbeatTimer);\n setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs);\n }\n teardown(callback, code, reason) {\n if (!this.conn) {\n return callback && callback();\n }\n this.waitForBufferDone(() => {\n if (this.conn) {\n if (code) {\n this.conn.close(code, reason || \"\");\n } else {\n this.conn.close();\n }\n }\n this.waitForSocketClosed(() => {\n if (this.conn) {\n this.conn.onclose = function() {\n };\n this.conn = null;\n }\n callback && callback();\n });\n });\n }\n waitForBufferDone(callback, tries = 1) {\n if (tries === 5 || !this.conn || !this.conn.bufferedAmount) {\n callback();\n return;\n }\n setTimeout(() => {\n this.waitForBufferDone(callback, tries + 1);\n }, 150 * tries);\n }\n waitForSocketClosed(callback, tries = 1) {\n if (tries === 5 || !this.conn || this.conn.readyState === SOCKET_STATES.closed) {\n callback();\n return;\n }\n setTimeout(() => {\n this.waitForSocketClosed(callback, tries + 1);\n }, 150 * tries);\n }\n onConnClose(event) {\n let closeCode = event && event.code;\n if (this.hasLogger())\n this.log(\"transport\", \"close\", event);\n this.triggerChanError();\n clearTimeout(this.heartbeatTimer);\n if (!this.closeWasClean && closeCode !== 1e3) {\n this.reconnectTimer.scheduleTimeout();\n }\n this.stateChangeCallbacks.close.forEach(([, callback]) => callback(event));\n }\n onConnError(error) {\n if (this.hasLogger())\n this.log(\"transport\", error);\n let transportBefore = this.transport;\n let establishedBefore = this.establishedConnections;\n this.stateChangeCallbacks.error.forEach(([, callback]) => {\n callback(error, transportBefore, establishedBefore);\n });\n if (transportBefore === this.transport || establishedBefore > 0) {\n this.triggerChanError();\n }\n }\n triggerChanError() {\n this.channels.forEach((channel) => {\n if (!(channel.isErrored() || channel.isLeaving() || channel.isClosed())) {\n channel.trigger(CHANNEL_EVENTS.error);\n }\n });\n }\n connectionState() {\n switch (this.conn && this.conn.readyState) {\n case SOCKET_STATES.connecting:\n return \"connecting\";\n case SOCKET_STATES.open:\n return \"open\";\n case SOCKET_STATES.closing:\n return \"closing\";\n default:\n return \"closed\";\n }\n }\n isConnected() {\n return this.connectionState() === \"open\";\n }\n remove(channel) {\n this.off(channel.stateChangeRefs);\n this.channels = this.channels.filter((c) => c.joinRef() !== channel.joinRef());\n }\n off(refs) {\n for (let key in this.stateChangeCallbacks) {\n this.stateChangeCallbacks[key] = this.stateChangeCallbacks[key].filter(([ref]) => {\n return refs.indexOf(ref) === -1;\n });\n }\n }\n channel(topic, chanParams = {}) {\n let chan = new Channel(topic, chanParams, this);\n this.channels.push(chan);\n return chan;\n }\n push(data) {\n if (this.hasLogger()) {\n let { topic, event, payload, ref, join_ref } = data;\n this.log(\"push\", `${topic} ${event} (${join_ref}, ${ref})`, payload);\n }\n if (this.isConnected()) {\n this.encode(data, (result) => this.conn.send(result));\n } else {\n this.sendBuffer.push(() => this.encode(data, (result) => this.conn.send(result)));\n }\n }\n makeRef() {\n let newRef = this.ref + 1;\n if (newRef === this.ref) {\n this.ref = 0;\n } else {\n this.ref = newRef;\n }\n return this.ref.toString();\n }\n sendHeartbeat() {\n if (this.pendingHeartbeatRef && !this.isConnected()) {\n return;\n }\n this.pendingHeartbeatRef = this.makeRef();\n this.push({ topic: \"phoenix\", event: \"heartbeat\", payload: {}, ref: this.pendingHeartbeatRef });\n this.heartbeatTimer = setTimeout(() => this.heartbeatTimeout(), this.heartbeatIntervalMs);\n }\n abnormalClose(reason) {\n this.closeWasClean = false;\n if (this.isConnected()) {\n this.conn.close(WS_CLOSE_NORMAL, reason);\n }\n }\n flushSendBuffer() {\n if (this.isConnected() && this.sendBuffer.length > 0) {\n this.sendBuffer.forEach((callback) => callback());\n this.sendBuffer = [];\n }\n }\n onConnMessage(rawMessage) {\n this.decode(rawMessage.data, (msg) => {\n let { topic, event, payload, ref, join_ref } = msg;\n if (ref && ref === this.pendingHeartbeatRef) {\n clearTimeout(this.heartbeatTimer);\n this.pendingHeartbeatRef = null;\n setTimeout(() => this.sendHeartbeat(), this.heartbeatIntervalMs);\n }\n if (this.hasLogger())\n this.log(\"receive\", `${payload.status || \"\"} ${topic} ${event} ${ref && \"(\" + ref + \")\" || \"\"}`, payload);\n for (let i = 0; i < this.channels.length; i++) {\n const channel = this.channels[i];\n if (!channel.isMember(topic, event, payload, join_ref)) {\n continue;\n }\n channel.trigger(event, payload, ref, join_ref);\n }\n for (let i = 0; i < this.stateChangeCallbacks.message.length; i++) {\n let [, callback] = this.stateChangeCallbacks.message[i];\n callback(msg);\n }\n });\n }\n leaveOpenTopic(topic) {\n let dupChannel = this.channels.find((c) => c.topic === topic && (c.isJoined() || c.isJoining()));\n if (dupChannel) {\n if (this.hasLogger())\n this.log(\"transport\", `leaving duplicate topic \"${topic}\"`);\n dupChannel.leave();\n }\n }\n };\n\n // ../deps/phoenix_live_view/priv/static/phoenix_live_view.esm.js\n var CONSECUTIVE_RELOADS = \"consecutive-reloads\";\n var MAX_RELOADS = 10;\n var RELOAD_JITTER_MIN = 5e3;\n var RELOAD_JITTER_MAX = 1e4;\n var FAILSAFE_JITTER = 3e4;\n var PHX_EVENT_CLASSES = [\n \"phx-click-loading\",\n \"phx-change-loading\",\n \"phx-submit-loading\",\n \"phx-keydown-loading\",\n \"phx-keyup-loading\",\n \"phx-blur-loading\",\n \"phx-focus-loading\"\n ];\n var PHX_COMPONENT = \"data-phx-component\";\n var PHX_LIVE_LINK = \"data-phx-link\";\n var PHX_TRACK_STATIC = \"track-static\";\n var PHX_LINK_STATE = \"data-phx-link-state\";\n var PHX_REF = \"data-phx-ref\";\n var PHX_REF_SRC = \"data-phx-ref-src\";\n var PHX_TRACK_UPLOADS = \"track-uploads\";\n var PHX_UPLOAD_REF = \"data-phx-upload-ref\";\n var PHX_PREFLIGHTED_REFS = \"data-phx-preflighted-refs\";\n var PHX_DONE_REFS = \"data-phx-done-refs\";\n var PHX_DROP_TARGET = \"drop-target\";\n var PHX_ACTIVE_ENTRY_REFS = \"data-phx-active-refs\";\n var PHX_LIVE_FILE_UPDATED = \"phx:live-file:updated\";\n var PHX_SKIP = \"data-phx-skip\";\n var PHX_PRUNE = \"data-phx-prune\";\n var PHX_PAGE_LOADING = \"page-loading\";\n var PHX_CONNECTED_CLASS = \"phx-connected\";\n var PHX_DISCONNECTED_CLASS = \"phx-loading\";\n var PHX_NO_FEEDBACK_CLASS = \"phx-no-feedback\";\n var PHX_ERROR_CLASS = \"phx-error\";\n var PHX_PARENT_ID = \"data-phx-parent-id\";\n var PHX_MAIN = \"data-phx-main\";\n var PHX_ROOT_ID = \"data-phx-root-id\";\n var PHX_TRIGGER_ACTION = \"trigger-action\";\n var PHX_FEEDBACK_FOR = \"feedback-for\";\n var PHX_HAS_FOCUSED = \"phx-has-focused\";\n var FOCUSABLE_INPUTS = [\"text\", \"textarea\", \"number\", \"email\", \"password\", \"search\", \"tel\", \"url\", \"date\", \"time\", \"datetime-local\", \"color\", \"range\"];\n var CHECKABLE_INPUTS = [\"checkbox\", \"radio\"];\n var PHX_HAS_SUBMITTED = \"phx-has-submitted\";\n var PHX_SESSION = \"data-phx-session\";\n var PHX_VIEW_SELECTOR = `[${PHX_SESSION}]`;\n var PHX_STICKY = \"data-phx-sticky\";\n var PHX_STATIC = \"data-phx-static\";\n var PHX_READONLY = \"data-phx-readonly\";\n var PHX_DISABLED = \"data-phx-disabled\";\n var PHX_DISABLE_WITH = \"disable-with\";\n var PHX_DISABLE_WITH_RESTORE = \"data-phx-disable-with-restore\";\n var PHX_HOOK = \"hook\";\n var PHX_DEBOUNCE = \"debounce\";\n var PHX_THROTTLE = \"throttle\";\n var PHX_UPDATE = \"update\";\n var PHX_KEY = \"key\";\n var PHX_PRIVATE = \"phxPrivate\";\n var PHX_AUTO_RECOVER = \"auto-recover\";\n var PHX_LV_DEBUG = \"phx:live-socket:debug\";\n var PHX_LV_PROFILE = \"phx:live-socket:profiling\";\n var PHX_LV_LATENCY_SIM = \"phx:live-socket:latency-sim\";\n var PHX_PROGRESS = \"progress\";\n var LOADER_TIMEOUT = 1;\n var BEFORE_UNLOAD_LOADER_TIMEOUT = 200;\n var BINDING_PREFIX = \"phx-\";\n var PUSH_TIMEOUT = 3e4;\n var DEBOUNCE_TRIGGER = \"debounce-trigger\";\n var THROTTLED = \"throttled\";\n var DEBOUNCE_PREV_KEY = \"debounce-prev-key\";\n var DEFAULTS = {\n debounce: 300,\n throttle: 300\n };\n var DYNAMICS = \"d\";\n var STATIC = \"s\";\n var COMPONENTS = \"c\";\n var EVENTS = \"e\";\n var REPLY = \"r\";\n var TITLE = \"t\";\n var TEMPLATES = \"p\";\n var EntryUploader = class {\n constructor(entry, chunkSize, liveSocket2) {\n this.liveSocket = liveSocket2;\n this.entry = entry;\n this.offset = 0;\n this.chunkSize = chunkSize;\n this.chunkTimer = null;\n this.uploadChannel = liveSocket2.channel(`lvu:${entry.ref}`, { token: entry.metadata() });\n }\n error(reason) {\n clearTimeout(this.chunkTimer);\n this.uploadChannel.leave();\n this.entry.error(reason);\n }\n upload() {\n this.uploadChannel.onError((reason) => this.error(reason));\n this.uploadChannel.join().receive(\"ok\", (_data) => this.readNextChunk()).receive(\"error\", (reason) => this.error(reason));\n }\n isDone() {\n return this.offset >= this.entry.file.size;\n }\n readNextChunk() {\n let reader = new window.FileReader();\n let blob = this.entry.file.slice(this.offset, this.chunkSize + this.offset);\n reader.onload = (e) => {\n if (e.target.error === null) {\n this.offset += e.target.result.byteLength;\n this.pushChunk(e.target.result);\n } else {\n return logError(\"Read error: \" + e.target.error);\n }\n };\n reader.readAsArrayBuffer(blob);\n }\n pushChunk(chunk) {\n if (!this.uploadChannel.isJoined()) {\n return;\n }\n this.uploadChannel.push(\"chunk\", chunk).receive(\"ok\", () => {\n this.entry.progress(this.offset / this.entry.file.size * 100);\n if (!this.isDone()) {\n this.chunkTimer = setTimeout(() => this.readNextChunk(), this.liveSocket.getLatencySim() || 0);\n }\n });\n }\n };\n var logError = (msg, obj) => console.error && console.error(msg, obj);\n var isCid = (cid) => {\n let type = typeof cid;\n return type === \"number\" || type === \"string\" && /^(0|[1-9]\\d*)$/.test(cid);\n };\n function detectDuplicateIds() {\n let ids = /* @__PURE__ */ new Set();\n let elems = document.querySelectorAll(\"*[id]\");\n for (let i = 0, len = elems.length; i < len; i++) {\n if (ids.has(elems[i].id)) {\n console.error(`Multiple IDs detected: ${elems[i].id}. Ensure unique element ids.`);\n } else {\n ids.add(elems[i].id);\n }\n }\n }\n var debug = (view, kind, msg, obj) => {\n if (view.liveSocket.isDebugEnabled()) {\n console.log(`${view.id} ${kind}: ${msg} - `, obj);\n }\n };\n var closure2 = (val) => typeof val === \"function\" ? val : function() {\n return val;\n };\n var clone = (obj) => {\n return JSON.parse(JSON.stringify(obj));\n };\n var closestPhxBinding = (el, binding, borderEl) => {\n do {\n if (el.matches(`[${binding}]`)) {\n return el;\n }\n el = el.parentElement || el.parentNode;\n } while (el !== null && el.nodeType === 1 && !(borderEl && borderEl.isSameNode(el) || el.matches(PHX_VIEW_SELECTOR)));\n return null;\n };\n var isObject = (obj) => {\n return obj !== null && typeof obj === \"object\" && !(obj instanceof Array);\n };\n var isEqualObj = (obj1, obj2) => JSON.stringify(obj1) === JSON.stringify(obj2);\n var isEmpty = (obj) => {\n for (let x in obj) {\n return false;\n }\n return true;\n };\n var maybe = (el, callback) => el && callback(el);\n var channelUploader = function(entries, onError, resp, liveSocket2) {\n entries.forEach((entry) => {\n let entryUploader = new EntryUploader(entry, resp.config.chunk_size, liveSocket2);\n entryUploader.upload();\n });\n };\n var Browser = {\n canPushState() {\n return typeof history.pushState !== \"undefined\";\n },\n dropLocal(localStorage, namespace, subkey) {\n return localStorage.removeItem(this.localKey(namespace, subkey));\n },\n updateLocal(localStorage, namespace, subkey, initial, func) {\n let current = this.getLocal(localStorage, namespace, subkey);\n let key = this.localKey(namespace, subkey);\n let newVal = current === null ? initial : func(current);\n localStorage.setItem(key, JSON.stringify(newVal));\n return newVal;\n },\n getLocal(localStorage, namespace, subkey) {\n return JSON.parse(localStorage.getItem(this.localKey(namespace, subkey)));\n },\n updateCurrentState(callback) {\n if (!this.canPushState()) {\n return;\n }\n history.replaceState(callback(history.state || {}), \"\", window.location.href);\n },\n pushState(kind, meta, to) {\n if (this.canPushState()) {\n if (to !== window.location.href) {\n if (meta.type == \"redirect\" && meta.scroll) {\n let currentState = history.state || {};\n currentState.scroll = meta.scroll;\n history.replaceState(currentState, \"\", window.location.href);\n }\n delete meta.scroll;\n history[kind + \"State\"](meta, \"\", to || null);\n let hashEl = this.getHashTargetEl(window.location.hash);\n if (hashEl) {\n hashEl.scrollIntoView();\n } else if (meta.type === \"redirect\") {\n window.scroll(0, 0);\n }\n }\n } else {\n this.redirect(to);\n }\n },\n setCookie(name, value) {\n document.cookie = `${name}=${value}`;\n },\n getCookie(name) {\n return document.cookie.replace(new RegExp(`(?:(?:^|.*;s*)${name}s*=s*([^;]*).*$)|^.*$`), \"$1\");\n },\n redirect(toURL, flash) {\n if (flash) {\n Browser.setCookie(\"__phoenix_flash__\", flash + \"; max-age=60000; path=/\");\n }\n window.location = toURL;\n },\n localKey(namespace, subkey) {\n return `${namespace}-${subkey}`;\n },\n getHashTargetEl(maybeHash) {\n let hash = maybeHash.toString().substring(1);\n if (hash === \"\") {\n return;\n }\n return document.getElementById(hash) || document.querySelector(`a[name=\"${hash}\"]`);\n }\n };\n var browser_default = Browser;\n var DOM = {\n byId(id) {\n return document.getElementById(id) || logError(`no id found for ${id}`);\n },\n removeClass(el, className) {\n el.classList.remove(className);\n if (el.classList.length === 0) {\n el.removeAttribute(\"class\");\n }\n },\n all(node, query, callback) {\n if (!node) {\n return [];\n }\n let array = Array.from(node.querySelectorAll(query));\n return callback ? array.forEach(callback) : array;\n },\n childNodeLength(html) {\n let template = document.createElement(\"template\");\n template.innerHTML = html;\n return template.content.childElementCount;\n },\n isUploadInput(el) {\n return el.type === \"file\" && el.getAttribute(PHX_UPLOAD_REF) !== null;\n },\n findUploadInputs(node) {\n return this.all(node, `input[type=\"file\"][${PHX_UPLOAD_REF}]`);\n },\n findComponentNodeList(node, cid) {\n return this.filterWithinSameLiveView(this.all(node, `[${PHX_COMPONENT}=\"${cid}\"]`), node);\n },\n isPhxDestroyed(node) {\n return node.id && DOM.private(node, \"destroyed\") ? true : false;\n },\n markPhxChildDestroyed(el) {\n if (this.isPhxChild(el)) {\n el.setAttribute(PHX_SESSION, \"\");\n }\n this.putPrivate(el, \"destroyed\", true);\n },\n findPhxChildrenInFragment(html, parentId) {\n let template = document.createElement(\"template\");\n template.innerHTML = html;\n return this.findPhxChildren(template.content, parentId);\n },\n isIgnored(el, phxUpdate) {\n return (el.getAttribute(phxUpdate) || el.getAttribute(\"data-phx-update\")) === \"ignore\";\n },\n isPhxUpdate(el, phxUpdate, updateTypes) {\n return el.getAttribute && updateTypes.indexOf(el.getAttribute(phxUpdate)) >= 0;\n },\n findPhxSticky(el) {\n return this.all(el, `[${PHX_STICKY}]`);\n },\n findPhxChildren(el, parentId) {\n return this.all(el, `${PHX_VIEW_SELECTOR}[${PHX_PARENT_ID}=\"${parentId}\"]`);\n },\n findParentCIDs(node, cids) {\n let initial = new Set(cids);\n return cids.reduce((acc, cid) => {\n let selector = `[${PHX_COMPONENT}=\"${cid}\"] [${PHX_COMPONENT}]`;\n this.filterWithinSameLiveView(this.all(node, selector), node).map((el) => parseInt(el.getAttribute(PHX_COMPONENT))).forEach((childCID) => acc.delete(childCID));\n return acc;\n }, initial);\n },\n filterWithinSameLiveView(nodes, parent) {\n if (parent.querySelector(PHX_VIEW_SELECTOR)) {\n return nodes.filter((el) => this.withinSameLiveView(el, parent));\n } else {\n return nodes;\n }\n },\n withinSameLiveView(node, parent) {\n while (node = node.parentNode) {\n if (node.isSameNode(parent)) {\n return true;\n }\n if (node.getAttribute(PHX_SESSION) !== null) {\n return false;\n }\n }\n },\n private(el, key) {\n return el[PHX_PRIVATE] && el[PHX_PRIVATE][key];\n },\n deletePrivate(el, key) {\n el[PHX_PRIVATE] && delete el[PHX_PRIVATE][key];\n },\n putPrivate(el, key, value) {\n if (!el[PHX_PRIVATE]) {\n el[PHX_PRIVATE] = {};\n }\n el[PHX_PRIVATE][key] = value;\n },\n updatePrivate(el, key, defaultVal, updateFunc) {\n let existing = this.private(el, key);\n if (existing === void 0) {\n this.putPrivate(el, key, updateFunc(defaultVal));\n } else {\n this.putPrivate(el, key, updateFunc(existing));\n }\n },\n copyPrivates(target, source) {\n if (source[PHX_PRIVATE]) {\n target[PHX_PRIVATE] = source[PHX_PRIVATE];\n }\n },\n putTitle(str) {\n let titleEl = document.querySelector(\"title\");\n let { prefix, suffix } = titleEl.dataset;\n document.title = `${prefix || \"\"}${str}${suffix || \"\"}`;\n },\n debounce(el, event, phxDebounce, defaultDebounce, phxThrottle, defaultThrottle, asyncFilter, callback) {\n let debounce = el.getAttribute(phxDebounce);\n let throttle = el.getAttribute(phxThrottle);\n if (debounce === \"\") {\n debounce = defaultDebounce;\n }\n if (throttle === \"\") {\n throttle = defaultThrottle;\n }\n let value = debounce || throttle;\n switch (value) {\n case null:\n return callback();\n case \"blur\":\n if (this.once(el, \"debounce-blur\")) {\n el.addEventListener(\"blur\", () => callback());\n }\n return;\n default:\n let timeout = parseInt(value);\n let trigger = () => throttle ? this.deletePrivate(el, THROTTLED) : callback();\n let currentCycle = this.incCycle(el, DEBOUNCE_TRIGGER, trigger);\n if (isNaN(timeout)) {\n return logError(`invalid throttle/debounce value: ${value}`);\n }\n if (throttle) {\n let newKeyDown = false;\n if (event.type === \"keydown\") {\n let prevKey = this.private(el, DEBOUNCE_PREV_KEY);\n this.putPrivate(el, DEBOUNCE_PREV_KEY, event.key);\n newKeyDown = prevKey !== event.key;\n }\n if (!newKeyDown && this.private(el, THROTTLED)) {\n return false;\n } else {\n callback();\n this.putPrivate(el, THROTTLED, true);\n setTimeout(() => {\n if (asyncFilter()) {\n this.triggerCycle(el, DEBOUNCE_TRIGGER);\n }\n }, timeout);\n }\n } else {\n setTimeout(() => {\n if (asyncFilter()) {\n this.triggerCycle(el, DEBOUNCE_TRIGGER, currentCycle);\n }\n }, timeout);\n }\n let form = el.form;\n if (form && this.once(form, \"bind-debounce\")) {\n form.addEventListener(\"submit\", () => {\n Array.from(new FormData(form).entries(), ([name]) => {\n let input = form.querySelector(`[name=\"${name}\"]`);\n this.incCycle(input, DEBOUNCE_TRIGGER);\n this.deletePrivate(input, THROTTLED);\n });\n });\n }\n if (this.once(el, \"bind-debounce\")) {\n el.addEventListener(\"blur\", () => this.triggerCycle(el, DEBOUNCE_TRIGGER));\n }\n }\n },\n triggerCycle(el, key, currentCycle) {\n let [cycle, trigger] = this.private(el, key);\n if (!currentCycle) {\n currentCycle = cycle;\n }\n if (currentCycle === cycle) {\n this.incCycle(el, key);\n trigger();\n }\n },\n once(el, key) {\n if (this.private(el, key) === true) {\n return false;\n }\n this.putPrivate(el, key, true);\n return true;\n },\n incCycle(el, key, trigger = function() {\n }) {\n let [currentCycle] = this.private(el, key) || [0, trigger];\n currentCycle++;\n this.putPrivate(el, key, [currentCycle, trigger]);\n return currentCycle;\n },\n discardError(container, el, phxFeedbackFor) {\n let field = el.getAttribute && el.getAttribute(phxFeedbackFor);\n let input = field && container.querySelector(`[id=\"${field}\"], [name=\"${field}\"]`);\n if (!input) {\n return;\n }\n if (!(this.private(input, PHX_HAS_FOCUSED) || this.private(input.form, PHX_HAS_SUBMITTED))) {\n el.classList.add(PHX_NO_FEEDBACK_CLASS);\n }\n },\n showError(inputEl, phxFeedbackFor) {\n if (inputEl.id || inputEl.name) {\n this.all(inputEl.form, `[${phxFeedbackFor}=\"${inputEl.id}\"], [${phxFeedbackFor}=\"${inputEl.name}\"]`, (el) => {\n this.removeClass(el, PHX_NO_FEEDBACK_CLASS);\n });\n }\n },\n isPhxChild(node) {\n return node.getAttribute && node.getAttribute(PHX_PARENT_ID);\n },\n isPhxSticky(node) {\n return node.getAttribute && node.getAttribute(PHX_STICKY) !== null;\n },\n firstPhxChild(el) {\n return this.isPhxChild(el) ? el : this.all(el, `[${PHX_PARENT_ID}]`)[0];\n },\n dispatchEvent(target, name, opts = {}) {\n let bubbles = opts.bubbles === void 0 ? true : !!opts.bubbles;\n let eventOpts = { bubbles, cancelable: true, detail: opts.detail || {} };\n let event = name === \"click\" ? new MouseEvent(\"click\", eventOpts) : new CustomEvent(name, eventOpts);\n target.dispatchEvent(event);\n },\n cloneNode(node, html) {\n if (typeof html === \"undefined\") {\n return node.cloneNode(true);\n } else {\n let cloned = node.cloneNode(false);\n cloned.innerHTML = html;\n return cloned;\n }\n },\n mergeAttrs(target, source, opts = {}) {\n let exclude = opts.exclude || [];\n let isIgnored = opts.isIgnored;\n let sourceAttrs = source.attributes;\n for (let i = sourceAttrs.length - 1; i >= 0; i--) {\n let name = sourceAttrs[i].name;\n if (exclude.indexOf(name) < 0) {\n target.setAttribute(name, source.getAttribute(name));\n }\n }\n let targetAttrs = target.attributes;\n for (let i = targetAttrs.length - 1; i >= 0; i--) {\n let name = targetAttrs[i].name;\n if (isIgnored) {\n if (name.startsWith(\"data-\") && !source.hasAttribute(name)) {\n target.removeAttribute(name);\n }\n } else {\n if (!source.hasAttribute(name)) {\n target.removeAttribute(name);\n }\n }\n }\n },\n mergeFocusedInput(target, source) {\n if (!(target instanceof HTMLSelectElement)) {\n DOM.mergeAttrs(target, source, { exclude: [\"value\"] });\n }\n if (source.readOnly) {\n target.setAttribute(\"readonly\", true);\n } else {\n target.removeAttribute(\"readonly\");\n }\n },\n hasSelectionRange(el) {\n return el.setSelectionRange && (el.type === \"text\" || el.type === \"textarea\");\n },\n restoreFocus(focused, selectionStart, selectionEnd) {\n if (!DOM.isTextualInput(focused)) {\n return;\n }\n let wasFocused = focused.matches(\":focus\");\n if (focused.readOnly) {\n focused.blur();\n }\n if (!wasFocused) {\n focused.focus();\n }\n if (this.hasSelectionRange(focused)) {\n focused.setSelectionRange(selectionStart, selectionEnd);\n }\n },\n isFormInput(el) {\n return /^(?:input|select|textarea)$/i.test(el.tagName) && el.type !== \"button\";\n },\n syncAttrsToProps(el) {\n if (el instanceof HTMLInputElement && CHECKABLE_INPUTS.indexOf(el.type.toLocaleLowerCase()) >= 0) {\n el.checked = el.getAttribute(\"checked\") !== null;\n }\n },\n isTextualInput(el) {\n return FOCUSABLE_INPUTS.indexOf(el.type) >= 0;\n },\n isNowTriggerFormExternal(el, phxTriggerExternal) {\n return el.getAttribute && el.getAttribute(phxTriggerExternal) !== null;\n },\n syncPendingRef(fromEl, toEl, disableWith) {\n let ref = fromEl.getAttribute(PHX_REF);\n if (ref === null) {\n return true;\n }\n let refSrc = fromEl.getAttribute(PHX_REF_SRC);\n if (DOM.isFormInput(fromEl) || fromEl.getAttribute(disableWith) !== null) {\n if (DOM.isUploadInput(fromEl)) {\n DOM.mergeAttrs(fromEl, toEl, { isIgnored: true });\n }\n DOM.putPrivate(fromEl, PHX_REF, toEl);\n return false;\n } else {\n PHX_EVENT_CLASSES.forEach((className) => {\n fromEl.classList.contains(className) && toEl.classList.add(className);\n });\n toEl.setAttribute(PHX_REF, ref);\n toEl.setAttribute(PHX_REF_SRC, refSrc);\n return true;\n }\n },\n cleanChildNodes(container, phxUpdate) {\n if (DOM.isPhxUpdate(container, phxUpdate, [\"append\", \"prepend\"])) {\n let toRemove = [];\n container.childNodes.forEach((childNode) => {\n if (!childNode.id) {\n let isEmptyTextNode = childNode.nodeType === Node.TEXT_NODE && childNode.nodeValue.trim() === \"\";\n if (!isEmptyTextNode) {\n logError(`only HTML element tags with an id are allowed inside containers with phx-update.\n\nremoving illegal node: \"${(childNode.outerHTML || childNode.nodeValue).trim()}\"\n\n`);\n }\n toRemove.push(childNode);\n }\n });\n toRemove.forEach((childNode) => childNode.remove());\n }\n },\n replaceRootContainer(container, tagName, attrs) {\n let retainedAttrs = /* @__PURE__ */ new Set([\"id\", PHX_SESSION, PHX_STATIC, PHX_MAIN, PHX_ROOT_ID]);\n if (container.tagName.toLowerCase() === tagName.toLowerCase()) {\n Array.from(container.attributes).filter((attr) => !retainedAttrs.has(attr.name.toLowerCase())).forEach((attr) => container.removeAttribute(attr.name));\n Object.keys(attrs).filter((name) => !retainedAttrs.has(name.toLowerCase())).forEach((attr) => container.setAttribute(attr, attrs[attr]));\n return container;\n } else {\n let newContainer = document.createElement(tagName);\n Object.keys(attrs).forEach((attr) => newContainer.setAttribute(attr, attrs[attr]));\n retainedAttrs.forEach((attr) => newContainer.setAttribute(attr, container.getAttribute(attr)));\n newContainer.innerHTML = container.innerHTML;\n container.replaceWith(newContainer);\n return newContainer;\n }\n },\n getSticky(el, name, defaultVal) {\n let op = (DOM.private(el, \"sticky\") || []).find(([existingName]) => name === existingName);\n if (op) {\n let [_name, _op, stashedResult] = op;\n return stashedResult;\n } else {\n return typeof defaultVal === \"function\" ? defaultVal() : defaultVal;\n }\n },\n deleteSticky(el, name) {\n this.updatePrivate(el, \"sticky\", [], (ops) => {\n return ops.filter(([existingName, _]) => existingName !== name);\n });\n },\n putSticky(el, name, op) {\n let stashedResult = op(el);\n this.updatePrivate(el, \"sticky\", [], (ops) => {\n let existingIndex = ops.findIndex(([existingName]) => name === existingName);\n if (existingIndex >= 0) {\n ops[existingIndex] = [name, op, stashedResult];\n } else {\n ops.push([name, op, stashedResult]);\n }\n return ops;\n });\n },\n applyStickyOperations(el) {\n let ops = DOM.private(el, \"sticky\");\n if (!ops) {\n return;\n }\n ops.forEach(([name, op, _stashed]) => this.putSticky(el, name, op));\n }\n };\n var dom_default = DOM;\n var UploadEntry = class {\n static isActive(fileEl, file) {\n let isNew = file._phxRef === void 0;\n let activeRefs = fileEl.getAttribute(PHX_ACTIVE_ENTRY_REFS).split(\",\");\n let isActive = activeRefs.indexOf(LiveUploader.genFileRef(file)) >= 0;\n return file.size > 0 && (isNew || isActive);\n }\n static isPreflighted(fileEl, file) {\n let preflightedRefs = fileEl.getAttribute(PHX_PREFLIGHTED_REFS).split(\",\");\n let isPreflighted = preflightedRefs.indexOf(LiveUploader.genFileRef(file)) >= 0;\n return isPreflighted && this.isActive(fileEl, file);\n }\n constructor(fileEl, file, view) {\n this.ref = LiveUploader.genFileRef(file);\n this.fileEl = fileEl;\n this.file = file;\n this.view = view;\n this.meta = null;\n this._isCancelled = false;\n this._isDone = false;\n this._progress = 0;\n this._lastProgressSent = -1;\n this._onDone = function() {\n };\n this._onElUpdated = this.onElUpdated.bind(this);\n this.fileEl.addEventListener(PHX_LIVE_FILE_UPDATED, this._onElUpdated);\n }\n metadata() {\n return this.meta;\n }\n progress(progress) {\n this._progress = Math.floor(progress);\n if (this._progress > this._lastProgressSent) {\n if (this._progress >= 100) {\n this._progress = 100;\n this._lastProgressSent = 100;\n this._isDone = true;\n this.view.pushFileProgress(this.fileEl, this.ref, 100, () => {\n LiveUploader.untrackFile(this.fileEl, this.file);\n this._onDone();\n });\n } else {\n this._lastProgressSent = this._progress;\n this.view.pushFileProgress(this.fileEl, this.ref, this._progress);\n }\n }\n }\n cancel() {\n this._isCancelled = true;\n this._isDone = true;\n this._onDone();\n }\n isDone() {\n return this._isDone;\n }\n error(reason = \"failed\") {\n this.view.pushFileProgress(this.fileEl, this.ref, { error: reason });\n LiveUploader.clearFiles(this.fileEl);\n }\n onDone(callback) {\n this._onDone = () => {\n this.fileEl.removeEventListener(PHX_LIVE_FILE_UPDATED, this._onElUpdated);\n callback();\n };\n }\n onElUpdated() {\n let activeRefs = this.fileEl.getAttribute(PHX_ACTIVE_ENTRY_REFS).split(\",\");\n if (activeRefs.indexOf(this.ref) === -1) {\n this.cancel();\n }\n }\n toPreflightPayload() {\n return {\n last_modified: this.file.lastModified,\n name: this.file.name,\n size: this.file.size,\n type: this.file.type,\n ref: this.ref\n };\n }\n uploader(uploaders) {\n if (this.meta.uploader) {\n let callback = uploaders[this.meta.uploader] || logError(`no uploader configured for ${this.meta.uploader}`);\n return { name: this.meta.uploader, callback };\n } else {\n return { name: \"channel\", callback: channelUploader };\n }\n }\n zipPostFlight(resp) {\n this.meta = resp.entries[this.ref];\n if (!this.meta) {\n logError(`no preflight upload response returned with ref ${this.ref}`, { input: this.fileEl, response: resp });\n }\n }\n };\n var liveUploaderFileRef = 0;\n var LiveUploader = class {\n static genFileRef(file) {\n let ref = file._phxRef;\n if (ref !== void 0) {\n return ref;\n } else {\n file._phxRef = (liveUploaderFileRef++).toString();\n return file._phxRef;\n }\n }\n static getEntryDataURL(inputEl, ref, callback) {\n let file = this.activeFiles(inputEl).find((file2) => this.genFileRef(file2) === ref);\n callback(URL.createObjectURL(file));\n }\n static hasUploadsInProgress(formEl) {\n let active = 0;\n dom_default.findUploadInputs(formEl).forEach((input) => {\n if (input.getAttribute(PHX_PREFLIGHTED_REFS) !== input.getAttribute(PHX_DONE_REFS)) {\n active++;\n }\n });\n return active > 0;\n }\n static serializeUploads(inputEl) {\n let files = this.activeFiles(inputEl);\n let fileData = {};\n files.forEach((file) => {\n let entry = { path: inputEl.name };\n let uploadRef = inputEl.getAttribute(PHX_UPLOAD_REF);\n fileData[uploadRef] = fileData[uploadRef] || [];\n entry.ref = this.genFileRef(file);\n entry.name = file.name || entry.ref;\n entry.type = file.type;\n entry.size = file.size;\n fileData[uploadRef].push(entry);\n });\n return fileData;\n }\n static clearFiles(inputEl) {\n inputEl.value = null;\n inputEl.removeAttribute(PHX_UPLOAD_REF);\n dom_default.putPrivate(inputEl, \"files\", []);\n }\n static untrackFile(inputEl, file) {\n dom_default.putPrivate(inputEl, \"files\", dom_default.private(inputEl, \"files\").filter((f) => !Object.is(f, file)));\n }\n static trackFiles(inputEl, files) {\n if (inputEl.getAttribute(\"multiple\") !== null) {\n let newFiles = files.filter((file) => !this.activeFiles(inputEl).find((f) => Object.is(f, file)));\n dom_default.putPrivate(inputEl, \"files\", this.activeFiles(inputEl).concat(newFiles));\n inputEl.value = null;\n } else {\n dom_default.putPrivate(inputEl, \"files\", files);\n }\n }\n static activeFileInputs(formEl) {\n let fileInputs = dom_default.findUploadInputs(formEl);\n return Array.from(fileInputs).filter((el) => el.files && this.activeFiles(el).length > 0);\n }\n static activeFiles(input) {\n return (dom_default.private(input, \"files\") || []).filter((f) => UploadEntry.isActive(input, f));\n }\n static inputsAwaitingPreflight(formEl) {\n let fileInputs = dom_default.findUploadInputs(formEl);\n return Array.from(fileInputs).filter((input) => this.filesAwaitingPreflight(input).length > 0);\n }\n static filesAwaitingPreflight(input) {\n return this.activeFiles(input).filter((f) => !UploadEntry.isPreflighted(input, f));\n }\n constructor(inputEl, view, onComplete) {\n this.view = view;\n this.onComplete = onComplete;\n this._entries = Array.from(LiveUploader.filesAwaitingPreflight(inputEl) || []).map((file) => new UploadEntry(inputEl, file, view));\n this.numEntriesInProgress = this._entries.length;\n }\n entries() {\n return this._entries;\n }\n initAdapterUpload(resp, onError, liveSocket2) {\n this._entries = this._entries.map((entry) => {\n entry.zipPostFlight(resp);\n entry.onDone(() => {\n this.numEntriesInProgress--;\n if (this.numEntriesInProgress === 0) {\n this.onComplete();\n }\n });\n return entry;\n });\n let groupedEntries = this._entries.reduce((acc, entry) => {\n let { name, callback } = entry.uploader(liveSocket2.uploaders);\n acc[name] = acc[name] || { callback, entries: [] };\n acc[name].entries.push(entry);\n return acc;\n }, {});\n for (let name in groupedEntries) {\n let { callback, entries } = groupedEntries[name];\n callback(entries, onError, resp, liveSocket2);\n }\n }\n };\n var Hooks = {\n LiveFileUpload: {\n activeRefs() {\n return this.el.getAttribute(PHX_ACTIVE_ENTRY_REFS);\n },\n preflightedRefs() {\n return this.el.getAttribute(PHX_PREFLIGHTED_REFS);\n },\n mounted() {\n this.preflightedWas = this.preflightedRefs();\n },\n updated() {\n let newPreflights = this.preflightedRefs();\n if (this.preflightedWas !== newPreflights) {\n this.preflightedWas = newPreflights;\n if (newPreflights === \"\") {\n this.__view.cancelSubmit(this.el.form);\n }\n }\n if (this.activeRefs() === \"\") {\n this.el.value = null;\n }\n this.el.dispatchEvent(new CustomEvent(PHX_LIVE_FILE_UPDATED));\n }\n },\n LiveImgPreview: {\n mounted() {\n this.ref = this.el.getAttribute(\"data-phx-entry-ref\");\n this.inputEl = document.getElementById(this.el.getAttribute(PHX_UPLOAD_REF));\n LiveUploader.getEntryDataURL(this.inputEl, this.ref, (url) => {\n this.url = url;\n this.el.src = url;\n });\n },\n destroyed() {\n URL.revokeObjectURL(this.url);\n }\n }\n };\n var hooks_default = Hooks;\n var DOMPostMorphRestorer = class {\n constructor(containerBefore, containerAfter, updateType) {\n let idsBefore = /* @__PURE__ */ new Set();\n let idsAfter = new Set([...containerAfter.children].map((child) => child.id));\n let elementsToModify = [];\n Array.from(containerBefore.children).forEach((child) => {\n if (child.id) {\n idsBefore.add(child.id);\n if (idsAfter.has(child.id)) {\n let previousElementId = child.previousElementSibling && child.previousElementSibling.id;\n elementsToModify.push({ elementId: child.id, previousElementId });\n }\n }\n });\n this.containerId = containerAfter.id;\n this.updateType = updateType;\n this.elementsToModify = elementsToModify;\n this.elementIdsToAdd = [...idsAfter].filter((id) => !idsBefore.has(id));\n }\n perform() {\n let container = dom_default.byId(this.containerId);\n this.elementsToModify.forEach((elementToModify) => {\n if (elementToModify.previousElementId) {\n maybe(document.getElementById(elementToModify.previousElementId), (previousElem) => {\n maybe(document.getElementById(elementToModify.elementId), (elem) => {\n let isInRightPlace = elem.previousElementSibling && elem.previousElementSibling.id == previousElem.id;\n if (!isInRightPlace) {\n previousElem.insertAdjacentElement(\"afterend\", elem);\n }\n });\n });\n } else {\n maybe(document.getElementById(elementToModify.elementId), (elem) => {\n let isInRightPlace = elem.previousElementSibling == null;\n if (!isInRightPlace) {\n container.insertAdjacentElement(\"afterbegin\", elem);\n }\n });\n }\n });\n if (this.updateType == \"prepend\") {\n this.elementIdsToAdd.reverse().forEach((elemId) => {\n maybe(document.getElementById(elemId), (elem) => container.insertAdjacentElement(\"afterbegin\", elem));\n });\n }\n }\n };\n var DOCUMENT_FRAGMENT_NODE = 11;\n function morphAttrs(fromNode, toNode) {\n var toNodeAttrs = toNode.attributes;\n var attr;\n var attrName;\n var attrNamespaceURI;\n var attrValue;\n var fromValue;\n if (toNode.nodeType === DOCUMENT_FRAGMENT_NODE || fromNode.nodeType === DOCUMENT_FRAGMENT_NODE) {\n return;\n }\n for (var i = toNodeAttrs.length - 1; i >= 0; i--) {\n attr = toNodeAttrs[i];\n attrName = attr.name;\n attrNamespaceURI = attr.namespaceURI;\n attrValue = attr.value;\n if (attrNamespaceURI) {\n attrName = attr.localName || attrName;\n fromValue = fromNode.getAttributeNS(attrNamespaceURI, attrName);\n if (fromValue !== attrValue) {\n if (attr.prefix === \"xmlns\") {\n attrName = attr.name;\n }\n fromNode.setAttributeNS(attrNamespaceURI, attrName, attrValue);\n }\n } else {\n fromValue = fromNode.getAttribute(attrName);\n if (fromValue !== attrValue) {\n fromNode.setAttribute(attrName, attrValue);\n }\n }\n }\n var fromNodeAttrs = fromNode.attributes;\n for (var d = fromNodeAttrs.length - 1; d >= 0; d--) {\n attr = fromNodeAttrs[d];\n attrName = attr.name;\n attrNamespaceURI = attr.namespaceURI;\n if (attrNamespaceURI) {\n attrName = attr.localName || attrName;\n if (!toNode.hasAttributeNS(attrNamespaceURI, attrName)) {\n fromNode.removeAttributeNS(attrNamespaceURI, attrName);\n }\n } else {\n if (!toNode.hasAttribute(attrName)) {\n fromNode.removeAttribute(attrName);\n }\n }\n }\n }\n var range;\n var NS_XHTML = \"http://www.w3.org/1999/xhtml\";\n var doc = typeof document === \"undefined\" ? void 0 : document;\n var HAS_TEMPLATE_SUPPORT = !!doc && \"content\" in doc.createElement(\"template\");\n var HAS_RANGE_SUPPORT = !!doc && doc.createRange && \"createContextualFragment\" in doc.createRange();\n function createFragmentFromTemplate(str) {\n var template = doc.createElement(\"template\");\n template.innerHTML = str;\n return template.content.childNodes[0];\n }\n function createFragmentFromRange(str) {\n if (!range) {\n range = doc.createRange();\n range.selectNode(doc.body);\n }\n var fragment = range.createContextualFragment(str);\n return fragment.childNodes[0];\n }\n function createFragmentFromWrap(str) {\n var fragment = doc.createElement(\"body\");\n fragment.innerHTML = str;\n return fragment.childNodes[0];\n }\n function toElement(str) {\n str = str.trim();\n if (HAS_TEMPLATE_SUPPORT) {\n return createFragmentFromTemplate(str);\n } else if (HAS_RANGE_SUPPORT) {\n return createFragmentFromRange(str);\n }\n return createFragmentFromWrap(str);\n }\n function compareNodeNames(fromEl, toEl) {\n var fromNodeName = fromEl.nodeName;\n var toNodeName = toEl.nodeName;\n var fromCodeStart, toCodeStart;\n if (fromNodeName === toNodeName) {\n return true;\n }\n fromCodeStart = fromNodeName.charCodeAt(0);\n toCodeStart = toNodeName.charCodeAt(0);\n if (fromCodeStart <= 90 && toCodeStart >= 97) {\n return fromNodeName === toNodeName.toUpperCase();\n } else if (toCodeStart <= 90 && fromCodeStart >= 97) {\n return toNodeName === fromNodeName.toUpperCase();\n } else {\n return false;\n }\n }\n function createElementNS(name, namespaceURI) {\n return !namespaceURI || namespaceURI === NS_XHTML ? doc.createElement(name) : doc.createElementNS(namespaceURI, name);\n }\n function moveChildren(fromEl, toEl) {\n var curChild = fromEl.firstChild;\n while (curChild) {\n var nextChild = curChild.nextSibling;\n toEl.appendChild(curChild);\n curChild = nextChild;\n }\n return toEl;\n }\n function syncBooleanAttrProp(fromEl, toEl, name) {\n if (fromEl[name] !== toEl[name]) {\n fromEl[name] = toEl[name];\n if (fromEl[name]) {\n fromEl.setAttribute(name, \"\");\n } else {\n fromEl.removeAttribute(name);\n }\n }\n }\n var specialElHandlers = {\n OPTION: function(fromEl, toEl) {\n var parentNode = fromEl.parentNode;\n if (parentNode) {\n var parentName = parentNode.nodeName.toUpperCase();\n if (parentName === \"OPTGROUP\") {\n parentNode = parentNode.parentNode;\n parentName = parentNode && parentNode.nodeName.toUpperCase();\n }\n if (parentName === \"SELECT\" && !parentNode.hasAttribute(\"multiple\")) {\n if (fromEl.hasAttribute(\"selected\") && !toEl.selected) {\n fromEl.setAttribute(\"selected\", \"selected\");\n fromEl.removeAttribute(\"selected\");\n }\n parentNode.selectedIndex = -1;\n }\n }\n syncBooleanAttrProp(fromEl, toEl, \"selected\");\n },\n INPUT: function(fromEl, toEl) {\n syncBooleanAttrProp(fromEl, toEl, \"checked\");\n syncBooleanAttrProp(fromEl, toEl, \"disabled\");\n if (fromEl.value !== toEl.value) {\n fromEl.value = toEl.value;\n }\n if (!toEl.hasAttribute(\"value\")) {\n fromEl.removeAttribute(\"value\");\n }\n },\n TEXTAREA: function(fromEl, toEl) {\n var newValue = toEl.value;\n if (fromEl.value !== newValue) {\n fromEl.value = newValue;\n }\n var firstChild = fromEl.firstChild;\n if (firstChild) {\n var oldValue = firstChild.nodeValue;\n if (oldValue == newValue || !newValue && oldValue == fromEl.placeholder) {\n return;\n }\n firstChild.nodeValue = newValue;\n }\n },\n SELECT: function(fromEl, toEl) {\n if (!toEl.hasAttribute(\"multiple\")) {\n var selectedIndex = -1;\n var i = 0;\n var curChild = fromEl.firstChild;\n var optgroup;\n var nodeName;\n while (curChild) {\n nodeName = curChild.nodeName && curChild.nodeName.toUpperCase();\n if (nodeName === \"OPTGROUP\") {\n optgroup = curChild;\n curChild = optgroup.firstChild;\n } else {\n if (nodeName === \"OPTION\") {\n if (curChild.hasAttribute(\"selected\")) {\n selectedIndex = i;\n break;\n }\n i++;\n }\n curChild = curChild.nextSibling;\n if (!curChild && optgroup) {\n curChild = optgroup.nextSibling;\n optgroup = null;\n }\n }\n }\n fromEl.selectedIndex = selectedIndex;\n }\n }\n };\n var ELEMENT_NODE = 1;\n var DOCUMENT_FRAGMENT_NODE$1 = 11;\n var TEXT_NODE = 3;\n var COMMENT_NODE = 8;\n function noop() {\n }\n function defaultGetNodeKey(node) {\n if (node) {\n return node.getAttribute && node.getAttribute(\"id\") || node.id;\n }\n }\n function morphdomFactory(morphAttrs2) {\n return function morphdom2(fromNode, toNode, options) {\n if (!options) {\n options = {};\n }\n if (typeof toNode === \"string\") {\n if (fromNode.nodeName === \"#document\" || fromNode.nodeName === \"HTML\" || fromNode.nodeName === \"BODY\") {\n var toNodeHtml = toNode;\n toNode = doc.createElement(\"html\");\n toNode.innerHTML = toNodeHtml;\n } else {\n toNode = toElement(toNode);\n }\n }\n var getNodeKey = options.getNodeKey || defaultGetNodeKey;\n var onBeforeNodeAdded = options.onBeforeNodeAdded || noop;\n var onNodeAdded = options.onNodeAdded || noop;\n var onBeforeElUpdated = options.onBeforeElUpdated || noop;\n var onElUpdated = options.onElUpdated || noop;\n var onBeforeNodeDiscarded = options.onBeforeNodeDiscarded || noop;\n var onNodeDiscarded = options.onNodeDiscarded || noop;\n var onBeforeElChildrenUpdated = options.onBeforeElChildrenUpdated || noop;\n var childrenOnly = options.childrenOnly === true;\n var fromNodesLookup = /* @__PURE__ */ Object.create(null);\n var keyedRemovalList = [];\n function addKeyedRemoval(key) {\n keyedRemovalList.push(key);\n }\n function walkDiscardedChildNodes(node, skipKeyedNodes) {\n if (node.nodeType === ELEMENT_NODE) {\n var curChild = node.firstChild;\n while (curChild) {\n var key = void 0;\n if (skipKeyedNodes && (key = getNodeKey(curChild))) {\n addKeyedRemoval(key);\n } else {\n onNodeDiscarded(curChild);\n if (curChild.firstChild) {\n walkDiscardedChildNodes(curChild, skipKeyedNodes);\n }\n }\n curChild = curChild.nextSibling;\n }\n }\n }\n function removeNode(node, parentNode, skipKeyedNodes) {\n if (onBeforeNodeDiscarded(node) === false) {\n return;\n }\n if (parentNode) {\n parentNode.removeChild(node);\n }\n onNodeDiscarded(node);\n walkDiscardedChildNodes(node, skipKeyedNodes);\n }\n function indexTree(node) {\n if (node.nodeType === ELEMENT_NODE || node.nodeType === DOCUMENT_FRAGMENT_NODE$1) {\n var curChild = node.firstChild;\n while (curChild) {\n var key = getNodeKey(curChild);\n if (key) {\n fromNodesLookup[key] = curChild;\n }\n indexTree(curChild);\n curChild = curChild.nextSibling;\n }\n }\n }\n indexTree(fromNode);\n function handleNodeAdded(el) {\n onNodeAdded(el);\n var curChild = el.firstChild;\n while (curChild) {\n var nextSibling = curChild.nextSibling;\n var key = getNodeKey(curChild);\n if (key) {\n var unmatchedFromEl = fromNodesLookup[key];\n if (unmatchedFromEl && compareNodeNames(curChild, unmatchedFromEl)) {\n curChild.parentNode.replaceChild(unmatchedFromEl, curChild);\n morphEl(unmatchedFromEl, curChild);\n } else {\n handleNodeAdded(curChild);\n }\n } else {\n handleNodeAdded(curChild);\n }\n curChild = nextSibling;\n }\n }\n function cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey) {\n while (curFromNodeChild) {\n var fromNextSibling = curFromNodeChild.nextSibling;\n if (curFromNodeKey = getNodeKey(curFromNodeChild)) {\n addKeyedRemoval(curFromNodeKey);\n } else {\n removeNode(curFromNodeChild, fromEl, true);\n }\n curFromNodeChild = fromNextSibling;\n }\n }\n function morphEl(fromEl, toEl, childrenOnly2) {\n var toElKey = getNodeKey(toEl);\n if (toElKey) {\n delete fromNodesLookup[toElKey];\n }\n if (!childrenOnly2) {\n if (onBeforeElUpdated(fromEl, toEl) === false) {\n return;\n }\n morphAttrs2(fromEl, toEl);\n onElUpdated(fromEl);\n if (onBeforeElChildrenUpdated(fromEl, toEl) === false) {\n return;\n }\n }\n if (fromEl.nodeName !== \"TEXTAREA\") {\n morphChildren(fromEl, toEl);\n } else {\n specialElHandlers.TEXTAREA(fromEl, toEl);\n }\n }\n function morphChildren(fromEl, toEl) {\n var curToNodeChild = toEl.firstChild;\n var curFromNodeChild = fromEl.firstChild;\n var curToNodeKey;\n var curFromNodeKey;\n var fromNextSibling;\n var toNextSibling;\n var matchingFromEl;\n outer:\n while (curToNodeChild) {\n toNextSibling = curToNodeChild.nextSibling;\n curToNodeKey = getNodeKey(curToNodeChild);\n while (curFromNodeChild) {\n fromNextSibling = curFromNodeChild.nextSibling;\n if (curToNodeChild.isSameNode && curToNodeChild.isSameNode(curFromNodeChild)) {\n curToNodeChild = toNextSibling;\n curFromNodeChild = fromNextSibling;\n continue outer;\n }\n curFromNodeKey = getNodeKey(curFromNodeChild);\n var curFromNodeType = curFromNodeChild.nodeType;\n var isCompatible = void 0;\n if (curFromNodeType === curToNodeChild.nodeType) {\n if (curFromNodeType === ELEMENT_NODE) {\n if (curToNodeKey) {\n if (curToNodeKey !== curFromNodeKey) {\n if (matchingFromEl = fromNodesLookup[curToNodeKey]) {\n if (fromNextSibling === matchingFromEl) {\n isCompatible = false;\n } else {\n fromEl.insertBefore(matchingFromEl, curFromNodeChild);\n if (curFromNodeKey) {\n addKeyedRemoval(curFromNodeKey);\n } else {\n removeNode(curFromNodeChild, fromEl, true);\n }\n curFromNodeChild = matchingFromEl;\n }\n } else {\n isCompatible = false;\n }\n }\n } else if (curFromNodeKey) {\n isCompatible = false;\n }\n isCompatible = isCompatible !== false && compareNodeNames(curFromNodeChild, curToNodeChild);\n if (isCompatible) {\n morphEl(curFromNodeChild, curToNodeChild);\n }\n } else if (curFromNodeType === TEXT_NODE || curFromNodeType == COMMENT_NODE) {\n isCompatible = true;\n if (curFromNodeChild.nodeValue !== curToNodeChild.nodeValue) {\n curFromNodeChild.nodeValue = curToNodeChild.nodeValue;\n }\n }\n }\n if (isCompatible) {\n curToNodeChild = toNextSibling;\n curFromNodeChild = fromNextSibling;\n continue outer;\n }\n if (curFromNodeKey) {\n addKeyedRemoval(curFromNodeKey);\n } else {\n removeNode(curFromNodeChild, fromEl, true);\n }\n curFromNodeChild = fromNextSibling;\n }\n if (curToNodeKey && (matchingFromEl = fromNodesLookup[curToNodeKey]) && compareNodeNames(matchingFromEl, curToNodeChild)) {\n fromEl.appendChild(matchingFromEl);\n morphEl(matchingFromEl, curToNodeChild);\n } else {\n var onBeforeNodeAddedResult = onBeforeNodeAdded(curToNodeChild);\n if (onBeforeNodeAddedResult !== false) {\n if (onBeforeNodeAddedResult) {\n curToNodeChild = onBeforeNodeAddedResult;\n }\n if (curToNodeChild.actualize) {\n curToNodeChild = curToNodeChild.actualize(fromEl.ownerDocument || doc);\n }\n fromEl.appendChild(curToNodeChild);\n handleNodeAdded(curToNodeChild);\n }\n }\n curToNodeChild = toNextSibling;\n curFromNodeChild = fromNextSibling;\n }\n cleanupFromEl(fromEl, curFromNodeChild, curFromNodeKey);\n var specialElHandler = specialElHandlers[fromEl.nodeName];\n if (specialElHandler) {\n specialElHandler(fromEl, toEl);\n }\n }\n var morphedNode = fromNode;\n var morphedNodeType = morphedNode.nodeType;\n var toNodeType = toNode.nodeType;\n if (!childrenOnly) {\n if (morphedNodeType === ELEMENT_NODE) {\n if (toNodeType === ELEMENT_NODE) {\n if (!compareNodeNames(fromNode, toNode)) {\n onNodeDiscarded(fromNode);\n morphedNode = moveChildren(fromNode, createElementNS(toNode.nodeName, toNode.namespaceURI));\n }\n } else {\n morphedNode = toNode;\n }\n } else if (morphedNodeType === TEXT_NODE || morphedNodeType === COMMENT_NODE) {\n if (toNodeType === morphedNodeType) {\n if (morphedNode.nodeValue !== toNode.nodeValue) {\n morphedNode.nodeValue = toNode.nodeValue;\n }\n return morphedNode;\n } else {\n morphedNode = toNode;\n }\n }\n }\n if (morphedNode === toNode) {\n onNodeDiscarded(fromNode);\n } else {\n if (toNode.isSameNode && toNode.isSameNode(morphedNode)) {\n return;\n }\n morphEl(morphedNode, toNode, childrenOnly);\n if (keyedRemovalList) {\n for (var i = 0, len = keyedRemovalList.length; i < len; i++) {\n var elToRemove = fromNodesLookup[keyedRemovalList[i]];\n if (elToRemove) {\n removeNode(elToRemove, elToRemove.parentNode, false);\n }\n }\n }\n }\n if (!childrenOnly && morphedNode !== fromNode && fromNode.parentNode) {\n if (morphedNode.actualize) {\n morphedNode = morphedNode.actualize(fromNode.ownerDocument || doc);\n }\n fromNode.parentNode.replaceChild(morphedNode, fromNode);\n }\n return morphedNode;\n };\n }\n var morphdom = morphdomFactory(morphAttrs);\n var morphdom_esm_default = morphdom;\n var DOMPatch = class {\n static patchEl(fromEl, toEl, activeElement) {\n morphdom_esm_default(fromEl, toEl, {\n childrenOnly: false,\n onBeforeElUpdated: (fromEl2, toEl2) => {\n if (activeElement && activeElement.isSameNode(fromEl2) && dom_default.isFormInput(fromEl2)) {\n dom_default.mergeFocusedInput(fromEl2, toEl2);\n return false;\n }\n }\n });\n }\n constructor(view, container, id, html, targetCID) {\n this.view = view;\n this.liveSocket = view.liveSocket;\n this.container = container;\n this.id = id;\n this.rootID = view.root.id;\n this.html = html;\n this.targetCID = targetCID;\n this.cidPatch = isCid(this.targetCID);\n this.callbacks = {\n beforeadded: [],\n beforeupdated: [],\n beforephxChildAdded: [],\n afteradded: [],\n afterupdated: [],\n afterdiscarded: [],\n afterphxChildAdded: [],\n aftertransitionsDiscarded: []\n };\n }\n before(kind, callback) {\n this.callbacks[`before${kind}`].push(callback);\n }\n after(kind, callback) {\n this.callbacks[`after${kind}`].push(callback);\n }\n trackBefore(kind, ...args) {\n this.callbacks[`before${kind}`].forEach((callback) => callback(...args));\n }\n trackAfter(kind, ...args) {\n this.callbacks[`after${kind}`].forEach((callback) => callback(...args));\n }\n markPrunableContentForRemoval() {\n dom_default.all(this.container, \"[phx-update=append] > *, [phx-update=prepend] > *\", (el) => {\n el.setAttribute(PHX_PRUNE, \"\");\n });\n }\n perform() {\n let { view, liveSocket: liveSocket2, container, html } = this;\n let targetContainer = this.isCIDPatch() ? this.targetCIDContainer(html) : container;\n if (this.isCIDPatch() && !targetContainer) {\n return;\n }\n let focused = liveSocket2.getActiveElement();\n let { selectionStart, selectionEnd } = focused && dom_default.hasSelectionRange(focused) ? focused : {};\n let phxUpdate = liveSocket2.binding(PHX_UPDATE);\n let phxFeedbackFor = liveSocket2.binding(PHX_FEEDBACK_FOR);\n let disableWith = liveSocket2.binding(PHX_DISABLE_WITH);\n let phxTriggerExternal = liveSocket2.binding(PHX_TRIGGER_ACTION);\n let phxRemove = liveSocket2.binding(\"remove\");\n let added = [];\n let updates = [];\n let appendPrependUpdates = [];\n let pendingRemoves = [];\n let externalFormTriggered = null;\n let diffHTML = liveSocket2.time(\"premorph container prep\", () => {\n return this.buildDiffHTML(container, html, phxUpdate, targetContainer);\n });\n this.trackBefore(\"added\", container);\n this.trackBefore(\"updated\", container, container);\n liveSocket2.time(\"morphdom\", () => {\n morphdom_esm_default(targetContainer, diffHTML, {\n childrenOnly: targetContainer.getAttribute(PHX_COMPONENT) === null,\n getNodeKey: (node) => {\n return dom_default.isPhxDestroyed(node) ? null : node.id;\n },\n onBeforeNodeAdded: (el) => {\n this.trackBefore(\"added\", el);\n return el;\n },\n onNodeAdded: (el) => {\n if (el instanceof HTMLImageElement && el.srcset) {\n el.srcset = el.srcset;\n } else if (el instanceof HTMLVideoElement && el.autoplay) {\n el.play();\n }\n if (dom_default.isNowTriggerFormExternal(el, phxTriggerExternal)) {\n externalFormTriggered = el;\n }\n dom_default.discardError(targetContainer, el, phxFeedbackFor);\n if (dom_default.isPhxChild(el) && view.ownsElement(el) || dom_default.isPhxSticky(el) && view.ownsElement(el.parentNode)) {\n this.trackAfter(\"phxChildAdded\", el);\n }\n added.push(el);\n },\n onNodeDiscarded: (el) => {\n if (dom_default.isPhxChild(el) || dom_default.isPhxSticky(el)) {\n liveSocket2.destroyViewByEl(el);\n }\n this.trackAfter(\"discarded\", el);\n },\n onBeforeNodeDiscarded: (el) => {\n if (el.getAttribute && el.getAttribute(PHX_PRUNE) !== null) {\n return true;\n }\n if (el.parentNode !== null && dom_default.isPhxUpdate(el.parentNode, phxUpdate, [\"append\", \"prepend\"]) && el.id) {\n return false;\n }\n if (el.getAttribute && el.getAttribute(phxRemove)) {\n pendingRemoves.push(el);\n return false;\n }\n if (this.skipCIDSibling(el)) {\n return false;\n }\n return true;\n },\n onElUpdated: (el) => {\n if (dom_default.isNowTriggerFormExternal(el, phxTriggerExternal)) {\n externalFormTriggered = el;\n }\n updates.push(el);\n },\n onBeforeElUpdated: (fromEl, toEl) => {\n dom_default.cleanChildNodes(toEl, phxUpdate);\n if (this.skipCIDSibling(toEl)) {\n return false;\n }\n if (dom_default.isPhxSticky(fromEl)) {\n return false;\n }\n if (dom_default.isIgnored(fromEl, phxUpdate)) {\n this.trackBefore(\"updated\", fromEl, toEl);\n dom_default.mergeAttrs(fromEl, toEl, { isIgnored: true });\n updates.push(fromEl);\n dom_default.applyStickyOperations(fromEl);\n return false;\n }\n if (fromEl.type === \"number\" && (fromEl.validity && fromEl.validity.badInput)) {\n return false;\n }\n if (!dom_default.syncPendingRef(fromEl, toEl, disableWith)) {\n if (dom_default.isUploadInput(fromEl)) {\n this.trackBefore(\"updated\", fromEl, toEl);\n updates.push(fromEl);\n }\n dom_default.applyStickyOperations(fromEl);\n return false;\n }\n if (dom_default.isPhxChild(toEl)) {\n let prevSession = fromEl.getAttribute(PHX_SESSION);\n dom_default.mergeAttrs(fromEl, toEl, { exclude: [PHX_STATIC] });\n if (prevSession !== \"\") {\n fromEl.setAttribute(PHX_SESSION, prevSession);\n }\n fromEl.setAttribute(PHX_ROOT_ID, this.rootID);\n dom_default.applyStickyOperations(fromEl);\n return false;\n }\n dom_default.copyPrivates(toEl, fromEl);\n dom_default.discardError(targetContainer, toEl, phxFeedbackFor);\n let isFocusedFormEl = focused && fromEl.isSameNode(focused) && dom_default.isFormInput(fromEl);\n if (isFocusedFormEl) {\n this.trackBefore(\"updated\", fromEl, toEl);\n dom_default.mergeFocusedInput(fromEl, toEl);\n dom_default.syncAttrsToProps(fromEl);\n updates.push(fromEl);\n dom_default.applyStickyOperations(fromEl);\n return false;\n } else {\n if (dom_default.isPhxUpdate(toEl, phxUpdate, [\"append\", \"prepend\"])) {\n appendPrependUpdates.push(new DOMPostMorphRestorer(fromEl, toEl, toEl.getAttribute(phxUpdate)));\n }\n dom_default.syncAttrsToProps(toEl);\n dom_default.applyStickyOperations(toEl);\n this.trackBefore(\"updated\", fromEl, toEl);\n return true;\n }\n }\n });\n });\n if (liveSocket2.isDebugEnabled()) {\n detectDuplicateIds();\n }\n if (appendPrependUpdates.length > 0) {\n liveSocket2.time(\"post-morph append/prepend restoration\", () => {\n appendPrependUpdates.forEach((update) => update.perform());\n });\n }\n liveSocket2.silenceEvents(() => dom_default.restoreFocus(focused, selectionStart, selectionEnd));\n dom_default.dispatchEvent(document, \"phx:update\");\n added.forEach((el) => this.trackAfter(\"added\", el));\n updates.forEach((el) => this.trackAfter(\"updated\", el));\n if (pendingRemoves.length > 0) {\n liveSocket2.transitionRemoves(pendingRemoves);\n liveSocket2.requestDOMUpdate(() => {\n pendingRemoves.forEach((el) => {\n let child = dom_default.firstPhxChild(el);\n if (child) {\n liveSocket2.destroyViewByEl(child);\n }\n el.remove();\n });\n this.trackAfter(\"transitionsDiscarded\", pendingRemoves);\n });\n }\n if (externalFormTriggered) {\n liveSocket2.disconnect();\n externalFormTriggered.submit();\n }\n return true;\n }\n isCIDPatch() {\n return this.cidPatch;\n }\n skipCIDSibling(el) {\n return el.nodeType === Node.ELEMENT_NODE && el.getAttribute(PHX_SKIP) !== null;\n }\n targetCIDContainer(html) {\n if (!this.isCIDPatch()) {\n return;\n }\n let [first, ...rest] = dom_default.findComponentNodeList(this.container, this.targetCID);\n if (rest.length === 0 && dom_default.childNodeLength(html) === 1) {\n return first;\n } else {\n return first && first.parentNode;\n }\n }\n buildDiffHTML(container, html, phxUpdate, targetContainer) {\n let isCIDPatch = this.isCIDPatch();\n let isCIDWithSingleRoot = isCIDPatch && targetContainer.getAttribute(PHX_COMPONENT) === this.targetCID.toString();\n if (!isCIDPatch || isCIDWithSingleRoot) {\n return html;\n } else {\n let diffContainer = null;\n let template = document.createElement(\"template\");\n diffContainer = dom_default.cloneNode(targetContainer);\n let [firstComponent, ...rest] = dom_default.findComponentNodeList(diffContainer, this.targetCID);\n template.innerHTML = html;\n rest.forEach((el) => el.remove());\n Array.from(diffContainer.childNodes).forEach((child) => {\n if (child.id && child.nodeType === Node.ELEMENT_NODE && child.getAttribute(PHX_COMPONENT) !== this.targetCID.toString()) {\n child.setAttribute(PHX_SKIP, \"\");\n child.innerHTML = \"\";\n }\n });\n Array.from(template.content.childNodes).forEach((el) => diffContainer.insertBefore(el, firstComponent));\n firstComponent.remove();\n return diffContainer.outerHTML;\n }\n }\n };\n var Rendered = class {\n static extract(diff) {\n let { [REPLY]: reply, [EVENTS]: events, [TITLE]: title } = diff;\n delete diff[REPLY];\n delete diff[EVENTS];\n delete diff[TITLE];\n return { diff, title, reply: reply || null, events: events || [] };\n }\n constructor(viewId, rendered) {\n this.viewId = viewId;\n this.rendered = {};\n this.mergeDiff(rendered);\n }\n parentViewId() {\n return this.viewId;\n }\n toString(onlyCids) {\n return this.recursiveToString(this.rendered, this.rendered[COMPONENTS], onlyCids);\n }\n recursiveToString(rendered, components = rendered[COMPONENTS], onlyCids) {\n onlyCids = onlyCids ? new Set(onlyCids) : null;\n let output = { buffer: \"\", components, onlyCids };\n this.toOutputBuffer(rendered, null, output);\n return output.buffer;\n }\n componentCIDs(diff) {\n return Object.keys(diff[COMPONENTS] || {}).map((i) => parseInt(i));\n }\n isComponentOnlyDiff(diff) {\n if (!diff[COMPONENTS]) {\n return false;\n }\n return Object.keys(diff).length === 1;\n }\n getComponent(diff, cid) {\n return diff[COMPONENTS][cid];\n }\n mergeDiff(diff) {\n let newc = diff[COMPONENTS];\n let cache = {};\n delete diff[COMPONENTS];\n this.rendered = this.mutableMerge(this.rendered, diff);\n this.rendered[COMPONENTS] = this.rendered[COMPONENTS] || {};\n if (newc) {\n let oldc = this.rendered[COMPONENTS];\n for (let cid in newc) {\n newc[cid] = this.cachedFindComponent(cid, newc[cid], oldc, newc, cache);\n }\n for (let cid in newc) {\n oldc[cid] = newc[cid];\n }\n diff[COMPONENTS] = newc;\n }\n }\n cachedFindComponent(cid, cdiff, oldc, newc, cache) {\n if (cache[cid]) {\n return cache[cid];\n } else {\n let ndiff, stat, scid = cdiff[STATIC];\n if (isCid(scid)) {\n let tdiff;\n if (scid > 0) {\n tdiff = this.cachedFindComponent(scid, newc[scid], oldc, newc, cache);\n } else {\n tdiff = oldc[-scid];\n }\n stat = tdiff[STATIC];\n ndiff = this.cloneMerge(tdiff, cdiff);\n ndiff[STATIC] = stat;\n } else {\n ndiff = cdiff[STATIC] !== void 0 ? cdiff : this.cloneMerge(oldc[cid] || {}, cdiff);\n }\n cache[cid] = ndiff;\n return ndiff;\n }\n }\n mutableMerge(target, source) {\n if (source[STATIC] !== void 0) {\n return source;\n } else {\n this.doMutableMerge(target, source);\n return target;\n }\n }\n doMutableMerge(target, source) {\n for (let key in source) {\n let val = source[key];\n let targetVal = target[key];\n if (isObject(val) && val[STATIC] === void 0 && isObject(targetVal)) {\n this.doMutableMerge(targetVal, val);\n } else {\n target[key] = val;\n }\n }\n }\n cloneMerge(target, source) {\n let merged = __spreadValues(__spreadValues({}, target), source);\n for (let key in merged) {\n let val = source[key];\n let targetVal = target[key];\n if (isObject(val) && val[STATIC] === void 0 && isObject(targetVal)) {\n merged[key] = this.cloneMerge(targetVal, val);\n }\n }\n return merged;\n }\n componentToString(cid) {\n return this.recursiveCIDToString(this.rendered[COMPONENTS], cid);\n }\n pruneCIDs(cids) {\n cids.forEach((cid) => delete this.rendered[COMPONENTS][cid]);\n }\n get() {\n return this.rendered;\n }\n isNewFingerprint(diff = {}) {\n return !!diff[STATIC];\n }\n templateStatic(part, templates) {\n if (typeof part === \"number\") {\n return templates[part];\n } else {\n return part;\n }\n }\n toOutputBuffer(rendered, templates, output) {\n if (rendered[DYNAMICS]) {\n return this.comprehensionToBuffer(rendered, templates, output);\n }\n let { [STATIC]: statics } = rendered;\n statics = this.templateStatic(statics, templates);\n output.buffer += statics[0];\n for (let i = 1; i < statics.length; i++) {\n this.dynamicToBuffer(rendered[i - 1], templates, output);\n output.buffer += statics[i];\n }\n }\n comprehensionToBuffer(rendered, templates, output) {\n let { [DYNAMICS]: dynamics, [STATIC]: statics } = rendered;\n statics = this.templateStatic(statics, templates);\n let compTemplates = templates || rendered[TEMPLATES];\n for (let d = 0; d < dynamics.length; d++) {\n let dynamic = dynamics[d];\n output.buffer += statics[0];\n for (let i = 1; i < statics.length; i++) {\n this.dynamicToBuffer(dynamic[i - 1], compTemplates, output);\n output.buffer += statics[i];\n }\n }\n }\n dynamicToBuffer(rendered, templates, output) {\n if (typeof rendered === \"number\") {\n output.buffer += this.recursiveCIDToString(output.components, rendered, output.onlyCids);\n } else if (isObject(rendered)) {\n this.toOutputBuffer(rendered, templates, output);\n } else {\n output.buffer += rendered;\n }\n }\n recursiveCIDToString(components, cid, onlyCids) {\n let component = components[cid] || logError(`no component for CID ${cid}`, components);\n let template = document.createElement(\"template\");\n template.innerHTML = this.recursiveToString(component, components, onlyCids);\n let container = template.content;\n let skip = onlyCids && !onlyCids.has(cid);\n let [hasChildNodes, hasChildComponents] = Array.from(container.childNodes).reduce(([hasNodes, hasComponents], child, i) => {\n if (child.nodeType === Node.ELEMENT_NODE) {\n if (child.getAttribute(PHX_COMPONENT)) {\n return [hasNodes, true];\n }\n child.setAttribute(PHX_COMPONENT, cid);\n if (!child.id) {\n child.id = `${this.parentViewId()}-${cid}-${i}`;\n }\n if (skip) {\n child.setAttribute(PHX_SKIP, \"\");\n child.innerHTML = \"\";\n }\n return [true, hasComponents];\n } else {\n if (child.nodeValue.trim() !== \"\") {\n logError(`only HTML element tags are allowed at the root of components.\n\ngot: \"${child.nodeValue.trim()}\"\n\nwithin:\n`, template.innerHTML.trim());\n child.replaceWith(this.createSpan(child.nodeValue, cid));\n return [true, hasComponents];\n } else {\n child.remove();\n return [hasNodes, hasComponents];\n }\n }\n }, [false, false]);\n if (!hasChildNodes && !hasChildComponents) {\n logError(\"expected at least one HTML element tag inside a component, but the component is empty:\\n\", template.innerHTML.trim());\n return this.createSpan(\"\", cid).outerHTML;\n } else if (!hasChildNodes && hasChildComponents) {\n logError(\"expected at least one HTML element tag directly inside a component, but only subcomponents were found. A component must render at least one HTML tag directly inside itself.\", template.innerHTML.trim());\n return template.innerHTML;\n } else {\n return template.innerHTML;\n }\n }\n createSpan(text, cid) {\n let span = document.createElement(\"span\");\n span.innerText = text;\n span.setAttribute(PHX_COMPONENT, cid);\n return span;\n }\n };\n var viewHookID = 1;\n var ViewHook = class {\n static makeID() {\n return viewHookID++;\n }\n static elementID(el) {\n return el.phxHookId;\n }\n constructor(view, el, callbacks) {\n this.__view = view;\n this.liveSocket = view.liveSocket;\n this.__callbacks = callbacks;\n this.__listeners = /* @__PURE__ */ new Set();\n this.__isDisconnected = false;\n this.el = el;\n this.el.phxHookId = this.constructor.makeID();\n for (let key in this.__callbacks) {\n this[key] = this.__callbacks[key];\n }\n }\n __mounted() {\n this.mounted && this.mounted();\n }\n __updated() {\n this.updated && this.updated();\n }\n __beforeUpdate() {\n this.beforeUpdate && this.beforeUpdate();\n }\n __destroyed() {\n this.destroyed && this.destroyed();\n }\n __reconnected() {\n if (this.__isDisconnected) {\n this.__isDisconnected = false;\n this.reconnected && this.reconnected();\n }\n }\n __disconnected() {\n this.__isDisconnected = true;\n this.disconnected && this.disconnected();\n }\n pushEvent(event, payload = {}, onReply = function() {\n }) {\n return this.__view.pushHookEvent(null, event, payload, onReply);\n }\n pushEventTo(phxTarget, event, payload = {}, onReply = function() {\n }) {\n return this.__view.withinTargets(phxTarget, (view, targetCtx) => {\n return view.pushHookEvent(targetCtx, event, payload, onReply);\n });\n }\n handleEvent(event, callback) {\n let callbackRef = (customEvent, bypass) => bypass ? event : callback(customEvent.detail);\n window.addEventListener(`phx:${event}`, callbackRef);\n this.__listeners.add(callbackRef);\n return callbackRef;\n }\n removeHandleEvent(callbackRef) {\n let event = callbackRef(null, true);\n window.removeEventListener(`phx:${event}`, callbackRef);\n this.__listeners.delete(callbackRef);\n }\n upload(name, files) {\n return this.__view.dispatchUploads(name, files);\n }\n uploadTo(phxTarget, name, files) {\n return this.__view.withinTargets(phxTarget, (view) => view.dispatchUploads(name, files));\n }\n __cleanup__() {\n this.__listeners.forEach((callbackRef) => this.removeHandleEvent(callbackRef));\n }\n };\n var JS = {\n exec(eventType, phxEvent, view, sourceEl, defaults) {\n let [defaultKind, defaultArgs] = defaults || [null, {}];\n let commands = phxEvent.charAt(0) === \"[\" ? JSON.parse(phxEvent) : [[defaultKind, defaultArgs]];\n commands.forEach(([kind, args]) => {\n if (kind === defaultKind && defaultArgs.data) {\n args.data = Object.assign(args.data || {}, defaultArgs.data);\n }\n this.filterToEls(sourceEl, args).forEach((el) => {\n this[`exec_${kind}`](eventType, phxEvent, view, sourceEl, el, args);\n });\n });\n },\n isVisible(el) {\n return !!(el.offsetWidth || el.offsetHeight || el.getClientRects().length > 0);\n },\n exec_dispatch(eventType, phxEvent, view, sourceEl, el, { to, event, detail, bubbles }) {\n detail = detail || {};\n detail.dispatcher = sourceEl;\n dom_default.dispatchEvent(el, event, { detail, bubbles });\n },\n exec_push(eventType, phxEvent, view, sourceEl, el, args) {\n if (!view.isConnected()) {\n return;\n }\n let { event, data, target, page_loading, loading, value, dispatcher } = args;\n let pushOpts = { loading, value, target, page_loading: !!page_loading };\n let targetSrc = eventType === \"change\" && dispatcher ? dispatcher : sourceEl;\n let phxTarget = target || targetSrc.getAttribute(view.binding(\"target\")) || targetSrc;\n view.withinTargets(phxTarget, (targetView, targetCtx) => {\n if (eventType === \"change\") {\n let { newCid, _target, callback } = args;\n _target = _target || (sourceEl instanceof HTMLInputElement ? sourceEl.name : void 0);\n if (_target) {\n pushOpts._target = _target;\n }\n targetView.pushInput(sourceEl, targetCtx, newCid, event || phxEvent, pushOpts, callback);\n } else if (eventType === \"submit\") {\n targetView.submitForm(sourceEl, targetCtx, event || phxEvent, pushOpts);\n } else {\n targetView.pushEvent(eventType, sourceEl, targetCtx, event || phxEvent, data, pushOpts);\n }\n });\n },\n exec_add_class(eventType, phxEvent, view, sourceEl, el, { names, transition, time }) {\n this.addOrRemoveClasses(el, names, [], transition, time, view);\n },\n exec_remove_class(eventType, phxEvent, view, sourceEl, el, { names, transition, time }) {\n this.addOrRemoveClasses(el, [], names, transition, time, view);\n },\n exec_transition(eventType, phxEvent, view, sourceEl, el, { time, transition }) {\n let [transition_start, running, transition_end] = transition;\n let onStart = () => this.addOrRemoveClasses(el, transition_start.concat(running), []);\n let onDone = () => this.addOrRemoveClasses(el, transition_end, transition_start.concat(running));\n view.transition(time, onStart, onDone);\n },\n exec_toggle(eventType, phxEvent, view, sourceEl, el, { display, ins, outs, time }) {\n this.toggle(eventType, view, el, display, ins, outs, time);\n },\n exec_show(eventType, phxEvent, view, sourceEl, el, { display, transition, time }) {\n this.show(eventType, view, el, display, transition, time);\n },\n exec_hide(eventType, phxEvent, view, sourceEl, el, { display, transition, time }) {\n this.hide(eventType, view, el, display, transition, time);\n },\n exec_set_attr(eventType, phxEvent, view, sourceEl, el, { attr: [attr, val] }) {\n this.setOrRemoveAttrs(el, [[attr, val]], []);\n },\n exec_remove_attr(eventType, phxEvent, view, sourceEl, el, { attr }) {\n this.setOrRemoveAttrs(el, [], [attr]);\n },\n show(eventType, view, el, display, transition, time) {\n if (!this.isVisible(el)) {\n this.toggle(eventType, view, el, display, transition, null, time);\n }\n },\n hide(eventType, view, el, display, transition, time) {\n if (this.isVisible(el)) {\n this.toggle(eventType, view, el, display, null, transition, time);\n }\n },\n toggle(eventType, view, el, display, ins, outs, time) {\n let [inClasses, inStartClasses, inEndClasses] = ins || [[], [], []];\n let [outClasses, outStartClasses, outEndClasses] = outs || [[], [], []];\n if (inClasses.length > 0 || outClasses.length > 0) {\n if (this.isVisible(el)) {\n let onStart = () => {\n this.addOrRemoveClasses(el, outStartClasses, inClasses.concat(inStartClasses).concat(inEndClasses));\n window.requestAnimationFrame(() => {\n this.addOrRemoveClasses(el, outClasses, []);\n window.requestAnimationFrame(() => this.addOrRemoveClasses(el, outEndClasses, outStartClasses));\n });\n };\n el.dispatchEvent(new Event(\"phx:hide-start\"));\n view.transition(time, onStart, () => {\n this.addOrRemoveClasses(el, [], outClasses.concat(outEndClasses));\n dom_default.putSticky(el, \"toggle\", (currentEl) => currentEl.style.display = \"none\");\n el.dispatchEvent(new Event(\"phx:hide-end\"));\n });\n } else {\n if (eventType === \"remove\") {\n return;\n }\n let onStart = () => {\n this.addOrRemoveClasses(el, inStartClasses, outClasses.concat(outStartClasses).concat(outEndClasses));\n dom_default.putSticky(el, \"toggle\", (currentEl) => currentEl.style.display = display || \"block\");\n window.requestAnimationFrame(() => {\n this.addOrRemoveClasses(el, inClasses, []);\n window.requestAnimationFrame(() => this.addOrRemoveClasses(el, inEndClasses, inStartClasses));\n });\n };\n el.dispatchEvent(new Event(\"phx:show-start\"));\n view.transition(time, onStart, () => {\n this.addOrRemoveClasses(el, [], inClasses.concat(inEndClasses));\n el.dispatchEvent(new Event(\"phx:show-end\"));\n });\n }\n } else {\n if (this.isVisible(el)) {\n window.requestAnimationFrame(() => {\n el.dispatchEvent(new Event(\"phx:hide-start\"));\n dom_default.putSticky(el, \"toggle\", (currentEl) => currentEl.style.display = \"none\");\n el.dispatchEvent(new Event(\"phx:hide-end\"));\n });\n } else {\n window.requestAnimationFrame(() => {\n el.dispatchEvent(new Event(\"phx:show-start\"));\n dom_default.putSticky(el, \"toggle\", (currentEl) => currentEl.style.display = display || \"block\");\n el.dispatchEvent(new Event(\"phx:show-end\"));\n });\n }\n }\n },\n addOrRemoveClasses(el, adds, removes, transition, time, view) {\n let [transition_run, transition_start, transition_end] = transition || [[], [], []];\n if (transition_run.length > 0) {\n let onStart = () => this.addOrRemoveClasses(el, transition_start.concat(transition_run), []);\n let onDone = () => this.addOrRemoveClasses(el, adds.concat(transition_end), removes.concat(transition_run).concat(transition_start));\n return view.transition(time, onStart, onDone);\n }\n window.requestAnimationFrame(() => {\n let [prevAdds, prevRemoves] = dom_default.getSticky(el, \"classes\", [[], []]);\n let keepAdds = adds.filter((name) => prevAdds.indexOf(name) < 0 && !el.classList.contains(name));\n let keepRemoves = removes.filter((name) => prevRemoves.indexOf(name) < 0 && el.classList.contains(name));\n let newAdds = prevAdds.filter((name) => removes.indexOf(name) < 0).concat(keepAdds);\n let newRemoves = prevRemoves.filter((name) => adds.indexOf(name) < 0).concat(keepRemoves);\n dom_default.putSticky(el, \"classes\", (currentEl) => {\n currentEl.classList.remove(...newRemoves);\n currentEl.classList.add(...newAdds);\n return [newAdds, newRemoves];\n });\n });\n },\n setOrRemoveAttrs(el, sets, removes) {\n let [prevSets, prevRemoves] = dom_default.getSticky(el, \"attrs\", [[], []]);\n let alteredAttrs = sets.map(([attr, _val]) => attr).concat(removes);\n let newSets = prevSets.filter(([attr, _val]) => !alteredAttrs.includes(attr)).concat(sets);\n let newRemoves = prevRemoves.filter((attr) => !alteredAttrs.includes(attr)).concat(removes);\n dom_default.putSticky(el, \"attrs\", (currentEl) => {\n newRemoves.forEach((attr) => currentEl.removeAttribute(attr));\n newSets.forEach(([attr, val]) => currentEl.setAttribute(attr, val));\n return [newSets, newRemoves];\n });\n },\n hasAllClasses(el, classes) {\n return classes.every((name) => el.classList.contains(name));\n },\n isToggledOut(el, outClasses) {\n return !this.isVisible(el) || this.hasAllClasses(el, outClasses);\n },\n filterToEls(sourceEl, { to }) {\n return to ? dom_default.all(document, to) : [sourceEl];\n }\n };\n var js_default = JS;\n var serializeForm = (form, meta, onlyNames = []) => {\n let formData = new FormData(form);\n let toRemove = [];\n formData.forEach((val, key, _index) => {\n if (val instanceof File) {\n toRemove.push(key);\n }\n });\n toRemove.forEach((key) => formData.delete(key));\n let params = new URLSearchParams();\n for (let [key, val] of formData.entries()) {\n if (onlyNames.length === 0 || onlyNames.indexOf(key) >= 0) {\n params.append(key, val);\n }\n }\n for (let metaKey in meta) {\n params.append(metaKey, meta[metaKey]);\n }\n return params.toString();\n };\n var View = class {\n constructor(el, liveSocket2, parentView, flash) {\n this.liveSocket = liveSocket2;\n this.flash = flash;\n this.parent = parentView;\n this.root = parentView ? parentView.root : this;\n this.el = el;\n this.id = this.el.id;\n this.ref = 0;\n this.childJoins = 0;\n this.loaderTimer = null;\n this.pendingDiffs = [];\n this.pruningCIDs = [];\n this.redirect = false;\n this.href = null;\n this.joinCount = this.parent ? this.parent.joinCount - 1 : 0;\n this.joinPending = true;\n this.destroyed = false;\n this.joinCallback = function(onDone) {\n onDone && onDone();\n };\n this.stopCallback = function() {\n };\n this.pendingJoinOps = this.parent ? null : [];\n this.viewHooks = {};\n this.uploaders = {};\n this.formSubmits = [];\n this.children = this.parent ? null : {};\n this.root.children[this.id] = {};\n this.channel = this.liveSocket.channel(`lv:${this.id}`, () => {\n return {\n redirect: this.redirect ? this.href : void 0,\n url: this.redirect ? void 0 : this.href || void 0,\n params: this.connectParams(),\n session: this.getSession(),\n static: this.getStatic(),\n flash: this.flash\n };\n });\n this.showLoader(this.liveSocket.loaderTimeout);\n this.bindChannel();\n }\n setHref(href) {\n this.href = href;\n }\n setRedirect(href) {\n this.redirect = true;\n this.href = href;\n }\n isMain() {\n return this.el.getAttribute(PHX_MAIN) !== null;\n }\n connectParams() {\n let params = this.liveSocket.params(this.el);\n let manifest = dom_default.all(document, `[${this.binding(PHX_TRACK_STATIC)}]`).map((node) => node.src || node.href).filter((url) => typeof url === \"string\");\n if (manifest.length > 0) {\n params[\"_track_static\"] = manifest;\n }\n params[\"_mounts\"] = this.joinCount;\n return params;\n }\n isConnected() {\n return this.channel.canPush();\n }\n getSession() {\n return this.el.getAttribute(PHX_SESSION);\n }\n getStatic() {\n let val = this.el.getAttribute(PHX_STATIC);\n return val === \"\" ? null : val;\n }\n destroy(callback = function() {\n }) {\n this.destroyAllChildren();\n this.destroyed = true;\n delete this.root.children[this.id];\n if (this.parent) {\n delete this.root.children[this.parent.id][this.id];\n }\n clearTimeout(this.loaderTimer);\n let onFinished = () => {\n callback();\n for (let id in this.viewHooks) {\n this.destroyHook(this.viewHooks[id]);\n }\n };\n dom_default.markPhxChildDestroyed(this.el);\n this.log(\"destroyed\", () => [\"the child has been removed from the parent\"]);\n this.channel.leave().receive(\"ok\", onFinished).receive(\"error\", onFinished).receive(\"timeout\", onFinished);\n }\n setContainerClasses(...classes) {\n this.el.classList.remove(PHX_CONNECTED_CLASS, PHX_DISCONNECTED_CLASS, PHX_ERROR_CLASS);\n this.el.classList.add(...classes);\n }\n showLoader(timeout) {\n clearTimeout(this.loaderTimer);\n if (timeout) {\n this.loaderTimer = setTimeout(() => this.showLoader(), timeout);\n } else {\n for (let id in this.viewHooks) {\n this.viewHooks[id].__disconnected();\n }\n this.setContainerClasses(PHX_DISCONNECTED_CLASS);\n }\n }\n hideLoader() {\n clearTimeout(this.loaderTimer);\n this.setContainerClasses(PHX_CONNECTED_CLASS);\n }\n triggerReconnected() {\n for (let id in this.viewHooks) {\n this.viewHooks[id].__reconnected();\n }\n }\n log(kind, msgCallback) {\n this.liveSocket.log(this, kind, msgCallback);\n }\n transition(time, onStart, onDone = function() {\n }) {\n this.liveSocket.transition(time, onStart, onDone);\n }\n withinTargets(phxTarget, callback) {\n if (phxTarget instanceof HTMLElement || phxTarget instanceof SVGElement) {\n return this.liveSocket.owner(phxTarget, (view) => callback(view, phxTarget));\n }\n if (isCid(phxTarget)) {\n let targets = dom_default.findComponentNodeList(this.el, phxTarget);\n if (targets.length === 0) {\n logError(`no component found matching phx-target of ${phxTarget}`);\n } else {\n callback(this, parseInt(phxTarget));\n }\n } else {\n let targets = Array.from(document.querySelectorAll(phxTarget));\n if (targets.length === 0) {\n logError(`nothing found matching the phx-target selector \"${phxTarget}\"`);\n }\n targets.forEach((target) => this.liveSocket.owner(target, (view) => callback(view, target)));\n }\n }\n applyDiff(type, rawDiff, callback) {\n this.log(type, () => [\"\", clone(rawDiff)]);\n let { diff, reply, events, title } = Rendered.extract(rawDiff);\n if (title) {\n dom_default.putTitle(title);\n }\n callback({ diff, reply, events });\n return reply;\n }\n onJoin(resp) {\n let { rendered, container } = resp;\n if (container) {\n let [tag, attrs] = container;\n this.el = dom_default.replaceRootContainer(this.el, tag, attrs);\n }\n this.childJoins = 0;\n this.joinPending = true;\n this.flash = null;\n browser_default.dropLocal(this.liveSocket.localStorage, window.location.pathname, CONSECUTIVE_RELOADS);\n this.applyDiff(\"mount\", rendered, ({ diff, events }) => {\n this.rendered = new Rendered(this.id, diff);\n let html = this.renderContainer(null, \"join\");\n this.dropPendingRefs();\n let forms = this.formsForRecovery(html);\n this.joinCount++;\n if (forms.length > 0) {\n forms.forEach(([form, newForm, newCid], i) => {\n this.pushFormRecovery(form, newCid, (resp2) => {\n if (i === forms.length - 1) {\n this.onJoinComplete(resp2, html, events);\n }\n });\n });\n } else {\n this.onJoinComplete(resp, html, events);\n }\n });\n }\n dropPendingRefs() {\n dom_default.all(document, `[${PHX_REF_SRC}=\"${this.id}\"][${PHX_REF}]`, (el) => {\n el.removeAttribute(PHX_REF);\n el.removeAttribute(PHX_REF_SRC);\n });\n }\n onJoinComplete({ live_patch }, html, events) {\n if (this.joinCount > 1 || this.parent && !this.parent.isJoinPending()) {\n return this.applyJoinPatch(live_patch, html, events);\n }\n let newChildren = dom_default.findPhxChildrenInFragment(html, this.id).filter((toEl) => {\n let fromEl = toEl.id && this.el.querySelector(`[id=\"${toEl.id}\"]`);\n let phxStatic = fromEl && fromEl.getAttribute(PHX_STATIC);\n if (phxStatic) {\n toEl.setAttribute(PHX_STATIC, phxStatic);\n }\n return this.joinChild(toEl);\n });\n if (newChildren.length === 0) {\n if (this.parent) {\n this.root.pendingJoinOps.push([this, () => this.applyJoinPatch(live_patch, html, events)]);\n this.parent.ackJoin(this);\n } else {\n this.onAllChildJoinsComplete();\n this.applyJoinPatch(live_patch, html, events);\n }\n } else {\n this.root.pendingJoinOps.push([this, () => this.applyJoinPatch(live_patch, html, events)]);\n }\n }\n attachTrueDocEl() {\n this.el = dom_default.byId(this.id);\n this.el.setAttribute(PHX_ROOT_ID, this.root.id);\n }\n applyJoinPatch(live_patch, html, events) {\n this.attachTrueDocEl();\n let patch = new DOMPatch(this, this.el, this.id, html, null);\n patch.markPrunableContentForRemoval();\n this.performPatch(patch, false);\n this.joinNewChildren();\n dom_default.all(this.el, `[${this.binding(PHX_HOOK)}], [data-phx-${PHX_HOOK}]`, (hookEl) => {\n let hook = this.addHook(hookEl);\n if (hook) {\n hook.__mounted();\n }\n });\n this.joinPending = false;\n this.liveSocket.dispatchEvents(events);\n this.applyPendingUpdates();\n if (live_patch) {\n let { kind, to } = live_patch;\n this.liveSocket.historyPatch(to, kind);\n }\n this.hideLoader();\n if (this.joinCount > 1) {\n this.triggerReconnected();\n }\n this.stopCallback();\n }\n triggerBeforeUpdateHook(fromEl, toEl) {\n this.liveSocket.triggerDOM(\"onBeforeElUpdated\", [fromEl, toEl]);\n let hook = this.getHook(fromEl);\n let isIgnored = hook && dom_default.isIgnored(fromEl, this.binding(PHX_UPDATE));\n if (hook && !fromEl.isEqualNode(toEl) && !(isIgnored && isEqualObj(fromEl.dataset, toEl.dataset))) {\n hook.__beforeUpdate();\n return hook;\n }\n }\n performPatch(patch, pruneCids) {\n let removedEls = [];\n let phxChildrenAdded = false;\n let updatedHookIds = /* @__PURE__ */ new Set();\n patch.after(\"added\", (el) => {\n this.liveSocket.triggerDOM(\"onNodeAdded\", [el]);\n let newHook = this.addHook(el);\n if (newHook) {\n newHook.__mounted();\n }\n });\n patch.after(\"phxChildAdded\", (el) => {\n if (dom_default.isPhxSticky(el)) {\n this.liveSocket.joinRootViews();\n } else {\n phxChildrenAdded = true;\n }\n });\n patch.before(\"updated\", (fromEl, toEl) => {\n let hook = this.triggerBeforeUpdateHook(fromEl, toEl);\n if (hook) {\n updatedHookIds.add(fromEl.id);\n }\n });\n patch.after(\"updated\", (el) => {\n if (updatedHookIds.has(el.id)) {\n this.getHook(el).__updated();\n }\n });\n patch.after(\"discarded\", (el) => {\n if (el.nodeType === Node.ELEMENT_NODE) {\n removedEls.push(el);\n }\n });\n patch.after(\"transitionsDiscarded\", (els) => this.afterElementsRemoved(els, pruneCids));\n patch.perform();\n this.afterElementsRemoved(removedEls, pruneCids);\n return phxChildrenAdded;\n }\n afterElementsRemoved(elements, pruneCids) {\n let destroyedCIDs = [];\n elements.forEach((parent) => {\n let components = dom_default.all(parent, `[${PHX_COMPONENT}]`);\n let hooks = dom_default.all(parent, `[${this.binding(PHX_HOOK)}]`);\n components.concat(parent).forEach((el) => {\n let cid = this.componentID(el);\n if (isCid(cid) && destroyedCIDs.indexOf(cid) === -1) {\n destroyedCIDs.push(cid);\n }\n });\n hooks.concat(parent).forEach((hookEl) => {\n let hook = this.getHook(hookEl);\n hook && this.destroyHook(hook);\n });\n });\n if (pruneCids) {\n this.maybePushComponentsDestroyed(destroyedCIDs);\n }\n }\n joinNewChildren() {\n dom_default.findPhxChildren(this.el, this.id).forEach((el) => this.joinChild(el));\n }\n getChildById(id) {\n return this.root.children[this.id][id];\n }\n getDescendentByEl(el) {\n if (el.id === this.id) {\n return this;\n } else {\n return this.children[el.getAttribute(PHX_PARENT_ID)][el.id];\n }\n }\n destroyDescendent(id) {\n for (let parentId in this.root.children) {\n for (let childId in this.root.children[parentId]) {\n if (childId === id) {\n return this.root.children[parentId][childId].destroy();\n }\n }\n }\n }\n joinChild(el) {\n let child = this.getChildById(el.id);\n if (!child) {\n let view = new View(el, this.liveSocket, this);\n this.root.children[this.id][view.id] = view;\n view.join();\n this.childJoins++;\n return true;\n }\n }\n isJoinPending() {\n return this.joinPending;\n }\n ackJoin(_child) {\n this.childJoins--;\n if (this.childJoins === 0) {\n if (this.parent) {\n this.parent.ackJoin(this);\n } else {\n this.onAllChildJoinsComplete();\n }\n }\n }\n onAllChildJoinsComplete() {\n this.joinCallback(() => {\n this.pendingJoinOps.forEach(([view, op]) => {\n if (!view.isDestroyed()) {\n op();\n }\n });\n this.pendingJoinOps = [];\n });\n }\n update(diff, events) {\n if (this.isJoinPending() || this.liveSocket.hasPendingLink() && !dom_default.isPhxSticky(this.el)) {\n return this.pendingDiffs.push({ diff, events });\n }\n this.rendered.mergeDiff(diff);\n let phxChildrenAdded = false;\n if (this.rendered.isComponentOnlyDiff(diff)) {\n this.liveSocket.time(\"component patch complete\", () => {\n let parentCids = dom_default.findParentCIDs(this.el, this.rendered.componentCIDs(diff));\n parentCids.forEach((parentCID) => {\n if (this.componentPatch(this.rendered.getComponent(diff, parentCID), parentCID)) {\n phxChildrenAdded = true;\n }\n });\n });\n } else if (!isEmpty(diff)) {\n this.liveSocket.time(\"full patch complete\", () => {\n let html = this.renderContainer(diff, \"update\");\n let patch = new DOMPatch(this, this.el, this.id, html, null);\n phxChildrenAdded = this.performPatch(patch, true);\n });\n }\n this.liveSocket.dispatchEvents(events);\n if (phxChildrenAdded) {\n this.joinNewChildren();\n }\n }\n renderContainer(diff, kind) {\n return this.liveSocket.time(`toString diff (${kind})`, () => {\n let tag = this.el.tagName;\n let cids = diff ? this.rendered.componentCIDs(diff).concat(this.pruningCIDs) : null;\n let html = this.rendered.toString(cids);\n return `<${tag}>${html}`;\n });\n }\n componentPatch(diff, cid) {\n if (isEmpty(diff))\n return false;\n let html = this.rendered.componentToString(cid);\n let patch = new DOMPatch(this, this.el, this.id, html, cid);\n let childrenAdded = this.performPatch(patch, true);\n return childrenAdded;\n }\n getHook(el) {\n return this.viewHooks[ViewHook.elementID(el)];\n }\n addHook(el) {\n if (ViewHook.elementID(el) || !el.getAttribute) {\n return;\n }\n let hookName = el.getAttribute(`data-phx-${PHX_HOOK}`) || el.getAttribute(this.binding(PHX_HOOK));\n if (hookName && !this.ownsElement(el)) {\n return;\n }\n let callbacks = this.liveSocket.getHookCallbacks(hookName);\n if (callbacks) {\n if (!el.id) {\n logError(`no DOM ID for hook \"${hookName}\". Hooks require a unique ID on each element.`, el);\n }\n let hook = new ViewHook(this, el, callbacks);\n this.viewHooks[ViewHook.elementID(hook.el)] = hook;\n return hook;\n } else if (hookName !== null) {\n logError(`unknown hook found for \"${hookName}\"`, el);\n }\n }\n destroyHook(hook) {\n hook.__destroyed();\n hook.__cleanup__();\n delete this.viewHooks[ViewHook.elementID(hook.el)];\n }\n applyPendingUpdates() {\n this.pendingDiffs.forEach(({ diff, events }) => this.update(diff, events));\n this.pendingDiffs = [];\n }\n onChannel(event, cb) {\n this.liveSocket.onChannel(this.channel, event, (resp) => {\n if (this.isJoinPending()) {\n this.root.pendingJoinOps.push([this, () => cb(resp)]);\n } else {\n this.liveSocket.requestDOMUpdate(() => cb(resp));\n }\n });\n }\n bindChannel() {\n this.liveSocket.onChannel(this.channel, \"diff\", (rawDiff) => {\n this.liveSocket.requestDOMUpdate(() => {\n this.applyDiff(\"update\", rawDiff, ({ diff, events }) => this.update(diff, events));\n });\n });\n this.onChannel(\"redirect\", ({ to, flash }) => this.onRedirect({ to, flash }));\n this.onChannel(\"live_patch\", (redir) => this.onLivePatch(redir));\n this.onChannel(\"live_redirect\", (redir) => this.onLiveRedirect(redir));\n this.channel.onError((reason) => this.onError(reason));\n this.channel.onClose((reason) => this.onClose(reason));\n }\n destroyAllChildren() {\n for (let id in this.root.children[this.id]) {\n this.getChildById(id).destroy();\n }\n }\n onLiveRedirect(redir) {\n let { to, kind, flash } = redir;\n let url = this.expandURL(to);\n this.liveSocket.historyRedirect(url, kind, flash);\n }\n onLivePatch(redir) {\n let { to, kind } = redir;\n this.href = this.expandURL(to);\n this.liveSocket.historyPatch(to, kind);\n }\n expandURL(to) {\n return to.startsWith(\"/\") ? `${window.location.protocol}//${window.location.host}${to}` : to;\n }\n onRedirect({ to, flash }) {\n this.liveSocket.redirect(to, flash);\n }\n isDestroyed() {\n return this.destroyed;\n }\n join(callback) {\n if (this.isMain()) {\n this.stopCallback = this.liveSocket.withPageLoading({ to: this.href, kind: \"initial\" });\n }\n this.joinCallback = (onDone) => {\n onDone = onDone || function() {\n };\n callback ? callback(this.joinCount, onDone) : onDone();\n };\n this.liveSocket.wrapPush(this, { timeout: false }, () => {\n return this.channel.join().receive(\"ok\", (data) => {\n if (!this.isDestroyed()) {\n this.liveSocket.requestDOMUpdate(() => this.onJoin(data));\n }\n }).receive(\"error\", (resp) => !this.isDestroyed() && this.onJoinError(resp)).receive(\"timeout\", () => !this.isDestroyed() && this.onJoinError({ reason: \"timeout\" }));\n });\n }\n onJoinError(resp) {\n if (resp.reason === \"unauthorized\" || resp.reason === \"stale\") {\n this.log(\"error\", () => [\"unauthorized live_redirect. Falling back to page request\", resp]);\n return this.onRedirect({ to: this.href });\n }\n if (resp.redirect || resp.live_redirect) {\n this.joinPending = false;\n this.channel.leave();\n }\n if (resp.redirect) {\n return this.onRedirect(resp.redirect);\n }\n if (resp.live_redirect) {\n return this.onLiveRedirect(resp.live_redirect);\n }\n this.log(\"error\", () => [\"unable to join\", resp]);\n if (this.liveSocket.isConnected()) {\n this.liveSocket.reloadWithJitter(this);\n }\n }\n onClose(reason) {\n if (this.isDestroyed()) {\n return;\n }\n if (this.liveSocket.hasPendingLink() && reason !== \"leave\") {\n return this.liveSocket.reloadWithJitter(this);\n }\n this.destroyAllChildren();\n this.liveSocket.dropActiveElement(this);\n if (document.activeElement) {\n document.activeElement.blur();\n }\n if (this.liveSocket.isUnloaded()) {\n this.showLoader(BEFORE_UNLOAD_LOADER_TIMEOUT);\n }\n }\n onError(reason) {\n this.onClose(reason);\n if (this.liveSocket.isConnected()) {\n this.log(\"error\", () => [\"view crashed\", reason]);\n }\n if (!this.liveSocket.isUnloaded()) {\n this.displayError();\n }\n }\n displayError() {\n if (this.isMain()) {\n dom_default.dispatchEvent(window, \"phx:page-loading-start\", { detail: { to: this.href, kind: \"error\" } });\n }\n this.showLoader();\n this.setContainerClasses(PHX_DISCONNECTED_CLASS, PHX_ERROR_CLASS);\n }\n pushWithReply(refGenerator, event, payload, onReply = function() {\n }) {\n if (!this.isConnected()) {\n return;\n }\n let [ref, [el], opts] = refGenerator ? refGenerator() : [null, [], {}];\n let onLoadingDone = function() {\n };\n if (opts.page_loading || el && el.getAttribute(this.binding(PHX_PAGE_LOADING)) !== null) {\n onLoadingDone = this.liveSocket.withPageLoading({ kind: \"element\", target: el });\n }\n if (typeof payload.cid !== \"number\") {\n delete payload.cid;\n }\n return this.liveSocket.wrapPush(this, { timeout: true }, () => {\n return this.channel.push(event, payload, PUSH_TIMEOUT).receive(\"ok\", (resp) => {\n if (ref !== null) {\n this.undoRefs(ref);\n }\n let finish = (hookReply) => {\n if (resp.redirect) {\n this.onRedirect(resp.redirect);\n }\n if (resp.live_patch) {\n this.onLivePatch(resp.live_patch);\n }\n if (resp.live_redirect) {\n this.onLiveRedirect(resp.live_redirect);\n }\n onLoadingDone();\n onReply(resp, hookReply);\n };\n if (resp.diff) {\n this.liveSocket.requestDOMUpdate(() => {\n let hookReply = this.applyDiff(\"update\", resp.diff, ({ diff, events }) => {\n this.update(diff, events);\n });\n finish(hookReply);\n });\n } else {\n finish(null);\n }\n });\n });\n }\n undoRefs(ref) {\n dom_default.all(document, `[${PHX_REF_SRC}=\"${this.id}\"][${PHX_REF}=\"${ref}\"]`, (el) => {\n let disabledVal = el.getAttribute(PHX_DISABLED);\n el.removeAttribute(PHX_REF);\n el.removeAttribute(PHX_REF_SRC);\n if (el.getAttribute(PHX_READONLY) !== null) {\n el.readOnly = false;\n el.removeAttribute(PHX_READONLY);\n }\n if (disabledVal !== null) {\n el.disabled = disabledVal === \"true\" ? true : false;\n el.removeAttribute(PHX_DISABLED);\n }\n PHX_EVENT_CLASSES.forEach((className) => dom_default.removeClass(el, className));\n let disableRestore = el.getAttribute(PHX_DISABLE_WITH_RESTORE);\n if (disableRestore !== null) {\n el.innerText = disableRestore;\n el.removeAttribute(PHX_DISABLE_WITH_RESTORE);\n }\n let toEl = dom_default.private(el, PHX_REF);\n if (toEl) {\n let hook = this.triggerBeforeUpdateHook(el, toEl);\n DOMPatch.patchEl(el, toEl, this.liveSocket.getActiveElement());\n if (hook) {\n hook.__updated();\n }\n dom_default.deletePrivate(el, PHX_REF);\n }\n });\n }\n putRef(elements, event, opts = {}) {\n let newRef = this.ref++;\n let disableWith = this.binding(PHX_DISABLE_WITH);\n if (opts.loading) {\n elements = elements.concat(dom_default.all(document, opts.loading));\n }\n elements.forEach((el) => {\n el.classList.add(`phx-${event}-loading`);\n el.setAttribute(PHX_REF, newRef);\n el.setAttribute(PHX_REF_SRC, this.el.id);\n let disableText = el.getAttribute(disableWith);\n if (disableText !== null) {\n if (!el.getAttribute(PHX_DISABLE_WITH_RESTORE)) {\n el.setAttribute(PHX_DISABLE_WITH_RESTORE, el.innerText);\n }\n if (disableText !== \"\") {\n el.innerText = disableText;\n }\n el.setAttribute(\"disabled\", \"\");\n }\n });\n return [newRef, elements, opts];\n }\n componentID(el) {\n let cid = el.getAttribute && el.getAttribute(PHX_COMPONENT);\n return cid ? parseInt(cid) : null;\n }\n targetComponentID(target, targetCtx, opts = {}) {\n if (isCid(targetCtx)) {\n return targetCtx;\n }\n let cidOrSelector = target.getAttribute(this.binding(\"target\"));\n if (isCid(cidOrSelector)) {\n return parseInt(cidOrSelector);\n } else if (targetCtx && (cidOrSelector !== null || opts.target)) {\n return this.closestComponentID(targetCtx);\n } else {\n return null;\n }\n }\n closestComponentID(targetCtx) {\n if (isCid(targetCtx)) {\n return targetCtx;\n } else if (targetCtx) {\n return maybe(targetCtx.closest(`[${PHX_COMPONENT}]`), (el) => this.ownsElement(el) && this.componentID(el));\n } else {\n return null;\n }\n }\n pushHookEvent(targetCtx, event, payload, onReply) {\n if (!this.isConnected()) {\n this.log(\"hook\", () => [\"unable to push hook event. LiveView not connected\", event, payload]);\n return false;\n }\n let [ref, els, opts] = this.putRef([], \"hook\");\n this.pushWithReply(() => [ref, els, opts], \"event\", {\n type: \"hook\",\n event,\n value: payload,\n cid: this.closestComponentID(targetCtx)\n }, (resp, reply) => onReply(reply, ref));\n return ref;\n }\n extractMeta(el, meta, value) {\n let prefix = this.binding(\"value-\");\n for (let i = 0; i < el.attributes.length; i++) {\n if (!meta) {\n meta = {};\n }\n let name = el.attributes[i].name;\n if (name.startsWith(prefix)) {\n meta[name.replace(prefix, \"\")] = el.getAttribute(name);\n }\n }\n if (el.value !== void 0) {\n if (!meta) {\n meta = {};\n }\n meta.value = el.value;\n if (el.tagName === \"INPUT\" && CHECKABLE_INPUTS.indexOf(el.type) >= 0 && !el.checked) {\n delete meta.value;\n }\n }\n if (value) {\n if (!meta) {\n meta = {};\n }\n for (let key in value) {\n meta[key] = value[key];\n }\n }\n return meta;\n }\n pushEvent(type, el, targetCtx, phxEvent, meta, opts = {}) {\n this.pushWithReply(() => this.putRef([el], type, opts), \"event\", {\n type,\n event: phxEvent,\n value: this.extractMeta(el, meta, opts.value),\n cid: this.targetComponentID(el, targetCtx, opts)\n });\n }\n pushFileProgress(fileEl, entryRef, progress, onReply = function() {\n }) {\n this.liveSocket.withinOwners(fileEl.form, (view, targetCtx) => {\n view.pushWithReply(null, \"progress\", {\n event: fileEl.getAttribute(view.binding(PHX_PROGRESS)),\n ref: fileEl.getAttribute(PHX_UPLOAD_REF),\n entry_ref: entryRef,\n progress,\n cid: view.targetComponentID(fileEl.form, targetCtx)\n }, onReply);\n });\n }\n pushInput(inputEl, targetCtx, forceCid, phxEvent, opts, callback) {\n let uploads;\n let cid = isCid(forceCid) ? forceCid : this.targetComponentID(inputEl.form, targetCtx);\n let refGenerator = () => this.putRef([inputEl, inputEl.form], \"change\", opts);\n let formData;\n if (inputEl.getAttribute(this.binding(\"change\"))) {\n formData = serializeForm(inputEl.form, { _target: opts._target }, [inputEl.name]);\n } else {\n formData = serializeForm(inputEl.form, { _target: opts._target });\n }\n if (dom_default.isUploadInput(inputEl) && inputEl.files && inputEl.files.length > 0) {\n LiveUploader.trackFiles(inputEl, Array.from(inputEl.files));\n }\n uploads = LiveUploader.serializeUploads(inputEl);\n let event = {\n type: \"form\",\n event: phxEvent,\n value: formData,\n uploads,\n cid\n };\n this.pushWithReply(refGenerator, \"event\", event, (resp) => {\n dom_default.showError(inputEl, this.liveSocket.binding(PHX_FEEDBACK_FOR));\n if (dom_default.isUploadInput(inputEl) && inputEl.getAttribute(\"data-phx-auto-upload\") !== null) {\n if (LiveUploader.filesAwaitingPreflight(inputEl).length > 0) {\n let [ref, _els] = refGenerator();\n this.uploadFiles(inputEl.form, targetCtx, ref, cid, (_uploads) => {\n callback && callback(resp);\n this.triggerAwaitingSubmit(inputEl.form);\n });\n }\n } else {\n callback && callback(resp);\n }\n });\n }\n triggerAwaitingSubmit(formEl) {\n let awaitingSubmit = this.getScheduledSubmit(formEl);\n if (awaitingSubmit) {\n let [_el, _ref, _opts, callback] = awaitingSubmit;\n this.cancelSubmit(formEl);\n callback();\n }\n }\n getScheduledSubmit(formEl) {\n return this.formSubmits.find(([el, _ref, _opts, _callback]) => el.isSameNode(formEl));\n }\n scheduleSubmit(formEl, ref, opts, callback) {\n if (this.getScheduledSubmit(formEl)) {\n return true;\n }\n this.formSubmits.push([formEl, ref, opts, callback]);\n }\n cancelSubmit(formEl) {\n this.formSubmits = this.formSubmits.filter(([el, ref, _callback]) => {\n if (el.isSameNode(formEl)) {\n this.undoRefs(ref);\n return false;\n } else {\n return true;\n }\n });\n }\n pushFormSubmit(formEl, targetCtx, phxEvent, opts, onReply) {\n let filterIgnored = (el) => {\n let userIgnored = closestPhxBinding(el, `${this.binding(PHX_UPDATE)}=ignore`, el.form);\n return !(userIgnored || closestPhxBinding(el, \"data-phx-update=ignore\", el.form));\n };\n let filterDisables = (el) => {\n return el.hasAttribute(this.binding(PHX_DISABLE_WITH));\n };\n let filterButton = (el) => el.tagName == \"BUTTON\";\n let filterInput = (el) => [\"INPUT\", \"TEXTAREA\", \"SELECT\"].includes(el.tagName);\n let refGenerator = () => {\n let formElements = Array.from(formEl.elements);\n let disables = formElements.filter(filterDisables);\n let buttons = formElements.filter(filterButton).filter(filterIgnored);\n let inputs = formElements.filter(filterInput).filter(filterIgnored);\n buttons.forEach((button) => {\n button.setAttribute(PHX_DISABLED, button.disabled);\n button.disabled = true;\n });\n inputs.forEach((input) => {\n input.setAttribute(PHX_READONLY, input.readOnly);\n input.readOnly = true;\n if (input.files) {\n input.setAttribute(PHX_DISABLED, input.disabled);\n input.disabled = true;\n }\n });\n formEl.setAttribute(this.binding(PHX_PAGE_LOADING), \"\");\n return this.putRef([formEl].concat(disables).concat(buttons).concat(inputs), \"submit\", opts);\n };\n let cid = this.targetComponentID(formEl, targetCtx);\n if (LiveUploader.hasUploadsInProgress(formEl)) {\n let [ref, _els] = refGenerator();\n let push = () => this.pushFormSubmit(formEl, targetCtx, phxEvent, opts, onReply);\n return this.scheduleSubmit(formEl, ref, opts, push);\n } else if (LiveUploader.inputsAwaitingPreflight(formEl).length > 0) {\n let [ref, els] = refGenerator();\n let proxyRefGen = () => [ref, els, opts];\n this.uploadFiles(formEl, targetCtx, ref, cid, (_uploads) => {\n let formData = serializeForm(formEl, {});\n this.pushWithReply(proxyRefGen, \"event\", {\n type: \"form\",\n event: phxEvent,\n value: formData,\n cid\n }, onReply);\n });\n } else {\n let formData = serializeForm(formEl, {});\n this.pushWithReply(refGenerator, \"event\", {\n type: \"form\",\n event: phxEvent,\n value: formData,\n cid\n }, onReply);\n }\n }\n uploadFiles(formEl, targetCtx, ref, cid, onComplete) {\n let joinCountAtUpload = this.joinCount;\n let inputEls = LiveUploader.activeFileInputs(formEl);\n let numFileInputsInProgress = inputEls.length;\n inputEls.forEach((inputEl) => {\n let uploader = new LiveUploader(inputEl, this, () => {\n numFileInputsInProgress--;\n if (numFileInputsInProgress === 0) {\n onComplete();\n }\n });\n this.uploaders[inputEl] = uploader;\n let entries = uploader.entries().map((entry) => entry.toPreflightPayload());\n let payload = {\n ref: inputEl.getAttribute(PHX_UPLOAD_REF),\n entries,\n cid: this.targetComponentID(inputEl.form, targetCtx)\n };\n this.log(\"upload\", () => [\"sending preflight request\", payload]);\n this.pushWithReply(null, \"allow_upload\", payload, (resp) => {\n this.log(\"upload\", () => [\"got preflight response\", resp]);\n if (resp.error) {\n this.undoRefs(ref);\n let [entry_ref, reason] = resp.error;\n this.log(\"upload\", () => [`error for entry ${entry_ref}`, reason]);\n } else {\n let onError = (callback) => {\n this.channel.onError(() => {\n if (this.joinCount === joinCountAtUpload) {\n callback();\n }\n });\n };\n uploader.initAdapterUpload(resp, onError, this.liveSocket);\n }\n });\n });\n }\n dispatchUploads(name, filesOrBlobs) {\n let inputs = dom_default.findUploadInputs(this.el).filter((el) => el.name === name);\n if (inputs.length === 0) {\n logError(`no live file inputs found matching the name \"${name}\"`);\n } else if (inputs.length > 1) {\n logError(`duplicate live file inputs found matching the name \"${name}\"`);\n } else {\n dom_default.dispatchEvent(inputs[0], PHX_TRACK_UPLOADS, { detail: { files: filesOrBlobs } });\n }\n }\n pushFormRecovery(form, newCid, callback) {\n this.liveSocket.withinOwners(form, (view, targetCtx) => {\n let input = form.elements[0];\n let phxEvent = form.getAttribute(this.binding(PHX_AUTO_RECOVER)) || form.getAttribute(this.binding(\"change\"));\n js_default.exec(\"change\", phxEvent, view, input, [\"push\", { _target: input.name, newCid, callback }]);\n });\n }\n pushLinkPatch(href, targetEl, callback) {\n let linkRef = this.liveSocket.setPendingLink(href);\n let refGen = targetEl ? () => this.putRef([targetEl], \"click\") : null;\n let fallback = () => this.liveSocket.redirect(window.location.href);\n let push = this.pushWithReply(refGen, \"live_patch\", { url: href }, (resp) => {\n this.liveSocket.requestDOMUpdate(() => {\n if (resp.link_redirect) {\n this.liveSocket.replaceMain(href, null, callback, linkRef);\n } else {\n if (this.liveSocket.commitPendingLink(linkRef)) {\n this.href = href;\n }\n this.applyPendingUpdates();\n callback && callback(linkRef);\n }\n });\n });\n if (push) {\n push.receive(\"timeout\", fallback);\n } else {\n fallback();\n }\n }\n formsForRecovery(html) {\n if (this.joinCount === 0) {\n return [];\n }\n let phxChange = this.binding(\"change\");\n let template = document.createElement(\"template\");\n template.innerHTML = html;\n return dom_default.all(this.el, `form[${phxChange}]`).filter((form) => form.id && this.ownsElement(form)).filter((form) => form.elements.length > 0).filter((form) => form.getAttribute(this.binding(PHX_AUTO_RECOVER)) !== \"ignore\").map((form) => {\n let newForm = template.content.querySelector(`form[id=\"${form.id}\"][${phxChange}=\"${form.getAttribute(phxChange)}\"]`);\n if (newForm) {\n return [form, newForm, this.targetComponentID(newForm)];\n } else {\n return [form, null, null];\n }\n }).filter(([form, newForm, newCid]) => newForm);\n }\n maybePushComponentsDestroyed(destroyedCIDs) {\n let willDestroyCIDs = destroyedCIDs.filter((cid) => {\n return dom_default.findComponentNodeList(this.el, cid).length === 0;\n });\n if (willDestroyCIDs.length > 0) {\n this.pruningCIDs.push(...willDestroyCIDs);\n this.pushWithReply(null, \"cids_will_destroy\", { cids: willDestroyCIDs }, () => {\n this.pruningCIDs = this.pruningCIDs.filter((cid) => willDestroyCIDs.indexOf(cid) !== -1);\n let completelyDestroyCIDs = willDestroyCIDs.filter((cid) => {\n return dom_default.findComponentNodeList(this.el, cid).length === 0;\n });\n if (completelyDestroyCIDs.length > 0) {\n this.pushWithReply(null, \"cids_destroyed\", { cids: completelyDestroyCIDs }, (resp) => {\n this.rendered.pruneCIDs(resp.cids);\n });\n }\n });\n }\n }\n ownsElement(el) {\n return el.getAttribute(PHX_PARENT_ID) === this.id || maybe(el.closest(PHX_VIEW_SELECTOR), (node) => node.id) === this.id;\n }\n submitForm(form, targetCtx, phxEvent, opts = {}) {\n dom_default.putPrivate(form, PHX_HAS_SUBMITTED, true);\n let phxFeedback = this.liveSocket.binding(PHX_FEEDBACK_FOR);\n let inputs = Array.from(form.elements);\n this.liveSocket.blurActiveElement(this);\n this.pushFormSubmit(form, targetCtx, phxEvent, opts, () => {\n inputs.forEach((input) => dom_default.showError(input, phxFeedback));\n this.liveSocket.restorePreviouslyActiveFocus();\n });\n }\n binding(kind) {\n return this.liveSocket.binding(kind);\n }\n };\n var LiveSocket = class {\n constructor(url, phxSocket, opts = {}) {\n this.unloaded = false;\n if (!phxSocket || phxSocket.constructor.name === \"Object\") {\n throw new Error(`\n a phoenix Socket must be provided as the second argument to the LiveSocket constructor. For example:\n\n import {Socket} from \"phoenix\"\n import {LiveSocket} from \"phoenix_live_view\"\n let liveSocket = new LiveSocket(\"/live\", Socket, {...})\n `);\n }\n this.socket = new phxSocket(url, opts);\n this.bindingPrefix = opts.bindingPrefix || BINDING_PREFIX;\n this.opts = opts;\n this.params = closure2(opts.params || {});\n this.viewLogger = opts.viewLogger;\n this.metadataCallbacks = opts.metadata || {};\n this.defaults = Object.assign(clone(DEFAULTS), opts.defaults || {});\n this.activeElement = null;\n this.prevActive = null;\n this.silenced = false;\n this.main = null;\n this.outgoingMainEl = null;\n this.clickStartedAtTarget = null;\n this.linkRef = 1;\n this.roots = {};\n this.href = window.location.href;\n this.pendingLink = null;\n this.currentLocation = clone(window.location);\n this.hooks = opts.hooks || {};\n this.uploaders = opts.uploaders || {};\n this.loaderTimeout = opts.loaderTimeout || LOADER_TIMEOUT;\n this.reloadWithJitterTimer = null;\n this.maxReloads = opts.maxReloads || MAX_RELOADS;\n this.reloadJitterMin = opts.reloadJitterMin || RELOAD_JITTER_MIN;\n this.reloadJitterMax = opts.reloadJitterMax || RELOAD_JITTER_MAX;\n this.failsafeJitter = opts.failsafeJitter || FAILSAFE_JITTER;\n this.localStorage = opts.localStorage || window.localStorage;\n this.sessionStorage = opts.sessionStorage || window.sessionStorage;\n this.boundTopLevelEvents = false;\n this.domCallbacks = Object.assign({ onNodeAdded: closure2(), onBeforeElUpdated: closure2() }, opts.dom || {});\n this.transitions = new TransitionSet();\n window.addEventListener(\"pagehide\", (_e) => {\n this.unloaded = true;\n });\n this.socket.onOpen(() => {\n if (this.isUnloaded()) {\n window.location.reload();\n }\n });\n }\n isProfileEnabled() {\n return this.sessionStorage.getItem(PHX_LV_PROFILE) === \"true\";\n }\n isDebugEnabled() {\n return this.sessionStorage.getItem(PHX_LV_DEBUG) === \"true\";\n }\n isDebugDisabled() {\n return this.sessionStorage.getItem(PHX_LV_DEBUG) === \"false\";\n }\n enableDebug() {\n this.sessionStorage.setItem(PHX_LV_DEBUG, \"true\");\n }\n enableProfiling() {\n this.sessionStorage.setItem(PHX_LV_PROFILE, \"true\");\n }\n disableDebug() {\n this.sessionStorage.setItem(PHX_LV_DEBUG, \"false\");\n }\n disableProfiling() {\n this.sessionStorage.removeItem(PHX_LV_PROFILE);\n }\n enableLatencySim(upperBoundMs) {\n this.enableDebug();\n console.log(\"latency simulator enabled for the duration of this browser session. Call disableLatencySim() to disable\");\n this.sessionStorage.setItem(PHX_LV_LATENCY_SIM, upperBoundMs);\n }\n disableLatencySim() {\n this.sessionStorage.removeItem(PHX_LV_LATENCY_SIM);\n }\n getLatencySim() {\n let str = this.sessionStorage.getItem(PHX_LV_LATENCY_SIM);\n return str ? parseInt(str) : null;\n }\n getSocket() {\n return this.socket;\n }\n connect() {\n if (window.location.hostname === \"localhost\" && !this.isDebugDisabled()) {\n this.enableDebug();\n }\n let doConnect = () => {\n if (this.joinRootViews()) {\n this.bindTopLevelEvents();\n this.socket.connect();\n } else if (this.main) {\n this.socket.connect();\n }\n };\n if ([\"complete\", \"loaded\", \"interactive\"].indexOf(document.readyState) >= 0) {\n doConnect();\n } else {\n document.addEventListener(\"DOMContentLoaded\", () => doConnect());\n }\n }\n disconnect(callback) {\n clearTimeout(this.reloadWithJitterTimer);\n this.socket.disconnect(callback);\n }\n replaceTransport(transport) {\n clearTimeout(this.reloadWithJitterTimer);\n this.socket.replaceTransport(transport);\n this.connect();\n }\n execJS(el, encodedJS, eventType = null) {\n this.owner(el, (view) => js_default.exec(eventType, encodedJS, view, el));\n }\n triggerDOM(kind, args) {\n this.domCallbacks[kind](...args);\n }\n time(name, func) {\n if (!this.isProfileEnabled() || !console.time) {\n return func();\n }\n console.time(name);\n let result = func();\n console.timeEnd(name);\n return result;\n }\n log(view, kind, msgCallback) {\n if (this.viewLogger) {\n let [msg, obj] = msgCallback();\n this.viewLogger(view, kind, msg, obj);\n } else if (this.isDebugEnabled()) {\n let [msg, obj] = msgCallback();\n debug(view, kind, msg, obj);\n }\n }\n requestDOMUpdate(callback) {\n this.transitions.after(callback);\n }\n transition(time, onStart, onDone = function() {\n }) {\n this.transitions.addTransition(time, onStart, onDone);\n }\n onChannel(channel, event, cb) {\n channel.on(event, (data) => {\n let latency = this.getLatencySim();\n if (!latency) {\n cb(data);\n } else {\n console.log(`simulating ${latency}ms of latency from server to client`);\n setTimeout(() => cb(data), latency);\n }\n });\n }\n wrapPush(view, opts, push) {\n let latency = this.getLatencySim();\n let oldJoinCount = view.joinCount;\n if (!latency) {\n if (this.isConnected() && opts.timeout) {\n return push().receive(\"timeout\", () => {\n if (view.joinCount === oldJoinCount && !view.isDestroyed()) {\n this.reloadWithJitter(view, () => {\n this.log(view, \"timeout\", () => [\"received timeout while communicating with server. Falling back to hard refresh for recovery\"]);\n });\n }\n });\n } else {\n return push();\n }\n }\n console.log(`simulating ${latency}ms of latency from client to server`);\n let fakePush = {\n receives: [],\n receive(kind, cb) {\n this.receives.push([kind, cb]);\n }\n };\n setTimeout(() => {\n if (view.isDestroyed()) {\n return;\n }\n fakePush.receives.reduce((acc, [kind, cb]) => acc.receive(kind, cb), push());\n }, latency);\n return fakePush;\n }\n reloadWithJitter(view, log) {\n clearTimeout(this.reloadWithJitterTimer);\n this.disconnect();\n let minMs = this.reloadJitterMin;\n let maxMs = this.reloadJitterMax;\n let afterMs = Math.floor(Math.random() * (maxMs - minMs + 1)) + minMs;\n let tries = browser_default.updateLocal(this.localStorage, window.location.pathname, CONSECUTIVE_RELOADS, 0, (count) => count + 1);\n if (tries > this.maxReloads) {\n afterMs = this.failsafeJitter;\n }\n this.reloadWithJitterTimer = setTimeout(() => {\n if (view.isDestroyed() || view.isConnected()) {\n return;\n }\n view.destroy();\n log ? log() : this.log(view, \"join\", () => [`encountered ${tries} consecutive reloads`]);\n if (tries > this.maxReloads) {\n this.log(view, \"join\", () => [`exceeded ${this.maxReloads} consecutive reloads. Entering failsafe mode`]);\n }\n if (this.hasPendingLink()) {\n window.location = this.pendingLink;\n } else {\n window.location.reload();\n }\n }, afterMs);\n }\n getHookCallbacks(name) {\n return name && name.startsWith(\"Phoenix.\") ? hooks_default[name.split(\".\")[1]] : this.hooks[name];\n }\n isUnloaded() {\n return this.unloaded;\n }\n isConnected() {\n return this.socket.isConnected();\n }\n getBindingPrefix() {\n return this.bindingPrefix;\n }\n binding(kind) {\n return `${this.getBindingPrefix()}${kind}`;\n }\n channel(topic, params) {\n return this.socket.channel(topic, params);\n }\n joinRootViews() {\n let rootsFound = false;\n dom_default.all(document, `${PHX_VIEW_SELECTOR}:not([${PHX_PARENT_ID}])`, (rootEl) => {\n if (!this.getRootById(rootEl.id)) {\n let view = this.newRootView(rootEl);\n view.setHref(this.getHref());\n view.join();\n if (rootEl.getAttribute(PHX_MAIN)) {\n this.main = view;\n }\n }\n rootsFound = true;\n });\n return rootsFound;\n }\n redirect(to, flash) {\n this.disconnect();\n browser_default.redirect(to, flash);\n }\n replaceMain(href, flash, callback = null, linkRef = this.setPendingLink(href)) {\n this.outgoingMainEl = this.outgoingMainEl || this.main.el;\n let newMainEl = dom_default.cloneNode(this.outgoingMainEl, \"\");\n this.main.showLoader(this.loaderTimeout);\n this.main.destroy();\n this.main = this.newRootView(newMainEl, flash);\n this.main.setRedirect(href);\n this.transitionRemoves();\n this.main.join((joinCount, onDone) => {\n if (joinCount === 1 && this.commitPendingLink(linkRef)) {\n this.requestDOMUpdate(() => {\n dom_default.findPhxSticky(document).forEach((el) => newMainEl.appendChild(el));\n this.outgoingMainEl.replaceWith(newMainEl);\n this.outgoingMainEl = null;\n callback && requestAnimationFrame(callback);\n onDone();\n });\n }\n });\n }\n transitionRemoves(elements) {\n let removeAttr = this.binding(\"remove\");\n elements = elements || dom_default.all(document, `[${removeAttr}]`);\n elements.forEach((el) => {\n if (document.body.contains(el)) {\n this.execJS(el, el.getAttribute(removeAttr), \"remove\");\n }\n });\n }\n isPhxView(el) {\n return el.getAttribute && el.getAttribute(PHX_SESSION) !== null;\n }\n newRootView(el, flash) {\n let view = new View(el, this, null, flash);\n this.roots[view.id] = view;\n return view;\n }\n owner(childEl, callback) {\n let view = maybe(childEl.closest(PHX_VIEW_SELECTOR), (el) => this.getViewByEl(el)) || this.main;\n if (view) {\n callback(view);\n }\n }\n withinOwners(childEl, callback) {\n this.owner(childEl, (view) => callback(view, childEl));\n }\n getViewByEl(el) {\n let rootId = el.getAttribute(PHX_ROOT_ID);\n return maybe(this.getRootById(rootId), (root) => root.getDescendentByEl(el));\n }\n getRootById(id) {\n return this.roots[id];\n }\n destroyAllViews() {\n for (let id in this.roots) {\n this.roots[id].destroy();\n delete this.roots[id];\n }\n this.main = null;\n }\n destroyViewByEl(el) {\n let root = this.getRootById(el.getAttribute(PHX_ROOT_ID));\n if (root && root.id === el.id) {\n root.destroy();\n delete this.roots[root.id];\n } else if (root) {\n root.destroyDescendent(el.id);\n }\n }\n setActiveElement(target) {\n if (this.activeElement === target) {\n return;\n }\n this.activeElement = target;\n let cancel = () => {\n if (target === this.activeElement) {\n this.activeElement = null;\n }\n target.removeEventListener(\"mouseup\", this);\n target.removeEventListener(\"touchend\", this);\n };\n target.addEventListener(\"mouseup\", cancel);\n target.addEventListener(\"touchend\", cancel);\n }\n getActiveElement() {\n if (document.activeElement === document.body) {\n return this.activeElement || document.activeElement;\n } else {\n return document.activeElement || document.body;\n }\n }\n dropActiveElement(view) {\n if (this.prevActive && view.ownsElement(this.prevActive)) {\n this.prevActive = null;\n }\n }\n restorePreviouslyActiveFocus() {\n if (this.prevActive && this.prevActive !== document.body) {\n this.prevActive.focus();\n }\n }\n blurActiveElement() {\n this.prevActive = this.getActiveElement();\n if (this.prevActive !== document.body) {\n this.prevActive.blur();\n }\n }\n bindTopLevelEvents() {\n if (this.boundTopLevelEvents) {\n return;\n }\n this.boundTopLevelEvents = true;\n this.socket.onClose((event) => {\n if (event && event.code === 1e3 && this.main) {\n this.reloadWithJitter(this.main);\n }\n });\n document.body.addEventListener(\"click\", function() {\n });\n window.addEventListener(\"pageshow\", (e) => {\n if (e.persisted) {\n this.getSocket().disconnect();\n this.withPageLoading({ to: window.location.href, kind: \"redirect\" });\n window.location.reload();\n }\n }, true);\n this.bindNav();\n this.bindClicks();\n this.bindForms();\n this.bind({ keyup: \"keyup\", keydown: \"keydown\" }, (e, type, view, targetEl, phxEvent, eventTarget) => {\n let matchKey = targetEl.getAttribute(this.binding(PHX_KEY));\n let pressedKey = e.key && e.key.toLowerCase();\n if (matchKey && matchKey.toLowerCase() !== pressedKey) {\n return;\n }\n let data = __spreadValues({ key: e.key }, this.eventMeta(type, e, targetEl));\n js_default.exec(type, phxEvent, view, targetEl, [\"push\", { data }]);\n });\n this.bind({ blur: \"focusout\", focus: \"focusin\" }, (e, type, view, targetEl, phxEvent, eventTarget) => {\n if (!eventTarget) {\n let data = __spreadValues({ key: e.key }, this.eventMeta(type, e, targetEl));\n js_default.exec(type, phxEvent, view, targetEl, [\"push\", { data }]);\n }\n });\n this.bind({ blur: \"blur\", focus: \"focus\" }, (e, type, view, targetEl, targetCtx, phxEvent, phxTarget) => {\n if (phxTarget === \"window\") {\n let data = this.eventMeta(type, e, targetEl);\n js_default.exec(type, phxEvent, view, targetEl, [\"push\", { data }]);\n }\n });\n window.addEventListener(\"dragover\", (e) => e.preventDefault());\n window.addEventListener(\"drop\", (e) => {\n e.preventDefault();\n let dropTargetId = maybe(closestPhxBinding(e.target, this.binding(PHX_DROP_TARGET)), (trueTarget) => {\n return trueTarget.getAttribute(this.binding(PHX_DROP_TARGET));\n });\n let dropTarget = dropTargetId && document.getElementById(dropTargetId);\n let files = Array.from(e.dataTransfer.files || []);\n if (!dropTarget || dropTarget.disabled || files.length === 0 || !(dropTarget.files instanceof FileList)) {\n return;\n }\n LiveUploader.trackFiles(dropTarget, files);\n dropTarget.dispatchEvent(new Event(\"input\", { bubbles: true }));\n });\n this.on(PHX_TRACK_UPLOADS, (e) => {\n let uploadTarget = e.target;\n if (!dom_default.isUploadInput(uploadTarget)) {\n return;\n }\n let files = Array.from(e.detail.files || []).filter((f) => f instanceof File || f instanceof Blob);\n LiveUploader.trackFiles(uploadTarget, files);\n uploadTarget.dispatchEvent(new Event(\"input\", { bubbles: true }));\n });\n }\n eventMeta(eventName, e, targetEl) {\n let callback = this.metadataCallbacks[eventName];\n return callback ? callback(e, targetEl) : {};\n }\n setPendingLink(href) {\n this.linkRef++;\n this.pendingLink = href;\n return this.linkRef;\n }\n commitPendingLink(linkRef) {\n if (this.linkRef !== linkRef) {\n return false;\n } else {\n this.href = this.pendingLink;\n this.pendingLink = null;\n return true;\n }\n }\n getHref() {\n return this.href;\n }\n hasPendingLink() {\n return !!this.pendingLink;\n }\n bind(events, callback) {\n for (let event in events) {\n let browserEventName = events[event];\n this.on(browserEventName, (e) => {\n let binding = this.binding(event);\n let windowBinding = this.binding(`window-${event}`);\n let targetPhxEvent = e.target.getAttribute && e.target.getAttribute(binding);\n if (targetPhxEvent) {\n this.debounce(e.target, e, browserEventName, () => {\n this.withinOwners(e.target, (view) => {\n callback(e, event, view, e.target, targetPhxEvent, null);\n });\n });\n } else {\n dom_default.all(document, `[${windowBinding}]`, (el) => {\n let phxEvent = el.getAttribute(windowBinding);\n this.debounce(el, e, browserEventName, () => {\n this.withinOwners(el, (view) => {\n callback(e, event, view, el, phxEvent, \"window\");\n });\n });\n });\n }\n });\n }\n }\n bindClicks() {\n window.addEventListener(\"mousedown\", (e) => this.clickStartedAtTarget = e.target);\n this.bindClick(\"click\", \"click\", false);\n this.bindClick(\"mousedown\", \"capture-click\", true);\n }\n bindClick(eventName, bindingName, capture) {\n let click = this.binding(bindingName);\n window.addEventListener(eventName, (e) => {\n let target = null;\n if (capture) {\n target = e.target.matches(`[${click}]`) ? e.target : e.target.querySelector(`[${click}]`);\n } else {\n let clickStartedAtTarget = this.clickStartedAtTarget || e.target;\n target = closestPhxBinding(clickStartedAtTarget, click);\n this.dispatchClickAway(e, clickStartedAtTarget);\n this.clickStartedAtTarget = null;\n }\n let phxEvent = target && target.getAttribute(click);\n if (!phxEvent) {\n return;\n }\n if (target.getAttribute(\"href\") === \"#\") {\n e.preventDefault();\n }\n this.debounce(target, e, \"click\", () => {\n this.withinOwners(target, (view) => {\n js_default.exec(\"click\", phxEvent, view, target, [\"push\", { data: this.eventMeta(\"click\", e, target) }]);\n });\n });\n }, capture);\n }\n dispatchClickAway(e, clickStartedAt) {\n let phxClickAway = this.binding(\"click-away\");\n dom_default.all(document, `[${phxClickAway}]`, (el) => {\n if (!(el.isSameNode(clickStartedAt) || el.contains(clickStartedAt))) {\n this.withinOwners(e.target, (view) => {\n let phxEvent = el.getAttribute(phxClickAway);\n if (js_default.isVisible(el)) {\n js_default.exec(\"click\", phxEvent, view, el, [\"push\", { data: this.eventMeta(\"click\", e, e.target) }]);\n }\n });\n }\n });\n }\n bindNav() {\n if (!browser_default.canPushState()) {\n return;\n }\n if (history.scrollRestoration) {\n history.scrollRestoration = \"manual\";\n }\n let scrollTimer = null;\n window.addEventListener(\"scroll\", (_e) => {\n clearTimeout(scrollTimer);\n scrollTimer = setTimeout(() => {\n browser_default.updateCurrentState((state) => Object.assign(state, { scroll: window.scrollY }));\n }, 100);\n });\n window.addEventListener(\"popstate\", (event) => {\n if (!this.registerNewLocation(window.location)) {\n return;\n }\n let { type, id, root, scroll } = event.state || {};\n let href = window.location.href;\n this.requestDOMUpdate(() => {\n if (this.main.isConnected() && (type === \"patch\" && id === this.main.id)) {\n this.main.pushLinkPatch(href, null);\n } else {\n this.replaceMain(href, null, () => {\n if (root) {\n this.replaceRootHistory();\n }\n if (typeof scroll === \"number\") {\n setTimeout(() => {\n window.scrollTo(0, scroll);\n }, 0);\n }\n });\n }\n });\n }, false);\n window.addEventListener(\"click\", (e) => {\n let target = closestPhxBinding(e.target, PHX_LIVE_LINK);\n let type = target && target.getAttribute(PHX_LIVE_LINK);\n let wantsNewTab = e.metaKey || e.ctrlKey || e.button === 1;\n if (!type || !this.isConnected() || !this.main || wantsNewTab) {\n return;\n }\n let href = target.href;\n let linkState = target.getAttribute(PHX_LINK_STATE);\n e.preventDefault();\n e.stopImmediatePropagation();\n if (this.pendingLink === href) {\n return;\n }\n this.requestDOMUpdate(() => {\n if (type === \"patch\") {\n this.pushHistoryPatch(href, linkState, target);\n } else if (type === \"redirect\") {\n this.historyRedirect(href, linkState);\n } else {\n throw new Error(`expected ${PHX_LIVE_LINK} to be \"patch\" or \"redirect\", got: ${type}`);\n }\n });\n }, false);\n }\n dispatchEvent(event, payload = {}) {\n dom_default.dispatchEvent(window, `phx:${event}`, { detail: payload });\n }\n dispatchEvents(events) {\n events.forEach(([event, payload]) => this.dispatchEvent(event, payload));\n }\n withPageLoading(info, callback) {\n dom_default.dispatchEvent(window, \"phx:page-loading-start\", { detail: info });\n let done = () => dom_default.dispatchEvent(window, \"phx:page-loading-stop\", { detail: info });\n return callback ? callback(done) : done;\n }\n pushHistoryPatch(href, linkState, targetEl) {\n this.withPageLoading({ to: href, kind: \"patch\" }, (done) => {\n this.main.pushLinkPatch(href, targetEl, (linkRef) => {\n this.historyPatch(href, linkState, linkRef);\n done();\n });\n });\n }\n historyPatch(href, linkState, linkRef = this.setPendingLink(href)) {\n if (!this.commitPendingLink(linkRef)) {\n return;\n }\n browser_default.pushState(linkState, { type: \"patch\", id: this.main.id }, href);\n this.registerNewLocation(window.location);\n }\n historyRedirect(href, linkState, flash) {\n let scroll = window.scrollY;\n this.withPageLoading({ to: href, kind: \"redirect\" }, (done) => {\n this.replaceMain(href, flash, () => {\n browser_default.pushState(linkState, { type: \"redirect\", id: this.main.id, scroll }, href);\n this.registerNewLocation(window.location);\n done();\n });\n });\n }\n replaceRootHistory() {\n browser_default.pushState(\"replace\", { root: true, type: \"patch\", id: this.main.id });\n }\n registerNewLocation(newLocation) {\n let { pathname, search } = this.currentLocation;\n if (pathname + search === newLocation.pathname + newLocation.search) {\n return false;\n } else {\n this.currentLocation = clone(newLocation);\n return true;\n }\n }\n bindForms() {\n let iterations = 0;\n this.on(\"submit\", (e) => {\n let phxEvent = e.target.getAttribute(this.binding(\"submit\"));\n if (!phxEvent) {\n return;\n }\n e.preventDefault();\n e.target.disabled = true;\n this.withinOwners(e.target, (view) => {\n js_default.exec(\"submit\", phxEvent, view, e.target, [\"push\", {}]);\n });\n }, false);\n for (let type of [\"change\", \"input\"]) {\n this.on(type, (e) => {\n let phxChange = this.binding(\"change\");\n let input = e.target;\n let inputEvent = input.getAttribute(phxChange);\n let formEvent = input.form && input.form.getAttribute(phxChange);\n let phxEvent = inputEvent || formEvent;\n if (!phxEvent) {\n return;\n }\n if (input.type === \"number\" && input.validity && input.validity.badInput) {\n return;\n }\n let dispatcher = inputEvent ? input : input.form;\n let currentIterations = iterations;\n iterations++;\n let { at, type: lastType } = dom_default.private(input, \"prev-iteration\") || {};\n if (at === currentIterations - 1 && type !== lastType) {\n return;\n }\n dom_default.putPrivate(input, \"prev-iteration\", { at: currentIterations, type });\n this.debounce(input, e, type, () => {\n this.withinOwners(dispatcher, (view) => {\n dom_default.putPrivate(input, PHX_HAS_FOCUSED, true);\n if (!dom_default.isTextualInput(input)) {\n this.setActiveElement(input);\n }\n js_default.exec(\"change\", phxEvent, view, input, [\"push\", { _target: e.target.name, dispatcher }]);\n });\n });\n }, false);\n }\n }\n debounce(el, event, eventType, callback) {\n if (eventType === \"blur\" || eventType === \"focusout\") {\n return callback();\n }\n let phxDebounce = this.binding(PHX_DEBOUNCE);\n let phxThrottle = this.binding(PHX_THROTTLE);\n let defaultDebounce = this.defaults.debounce.toString();\n let defaultThrottle = this.defaults.throttle.toString();\n this.withinOwners(el, (view) => {\n let asyncFilter = () => !view.isDestroyed() && document.body.contains(el);\n dom_default.debounce(el, event, phxDebounce, defaultDebounce, phxThrottle, defaultThrottle, asyncFilter, () => {\n callback();\n });\n });\n }\n silenceEvents(callback) {\n this.silenced = true;\n callback();\n this.silenced = false;\n }\n on(event, callback) {\n window.addEventListener(event, (e) => {\n if (!this.silenced) {\n callback(e);\n }\n });\n }\n };\n var TransitionSet = class {\n constructor() {\n this.transitions = /* @__PURE__ */ new Set();\n this.pendingOps = [];\n this.reset();\n }\n reset() {\n this.transitions.forEach((timer) => {\n cancelTimeout(timer);\n this.transitions.delete(timer);\n });\n this.flushPendingOps();\n }\n after(callback) {\n if (this.size() === 0) {\n callback();\n } else {\n this.pushPendingOp(callback);\n }\n }\n addTransition(time, onStart, onDone) {\n onStart();\n let timer = setTimeout(() => {\n this.transitions.delete(timer);\n onDone();\n if (this.size() === 0) {\n this.flushPendingOps();\n }\n }, time);\n this.transitions.add(timer);\n }\n pushPendingOp(op) {\n this.pendingOps.push(op);\n }\n size() {\n return this.transitions.size;\n }\n flushPendingOps() {\n this.pendingOps.forEach((op) => op());\n this.pendingOps = [];\n }\n };\n\n // js/app.js\n var import_topbar = __toESM(require_topbar());\n var csrfToken = document.querySelector(\"meta[name='csrf-token']\").getAttribute(\"content\");\n var liveSocket = new LiveSocket(\"/live\", Socket, { params: { _csrf_token: csrfToken } });\n import_topbar.default.config({ barColors: { 0: \"#29d\" }, shadowColor: \"rgba(0, 0, 0, .3)\" });\n window.addEventListener(\"phx:page-loading-start\", (info) => import_topbar.default.show());\n window.addEventListener(\"phx:page-loading-stop\", (info) => import_topbar.default.hide());\n liveSocket.connect();\n window.liveSocket = liveSocket;\n})();\n/**\n * @license MIT\n * topbar 1.0.0, 2021-01-06\n * https://buunguyen.github.io/topbar\n * Copyright (c) 2021 Buu Nguyen\n */\n//# sourceMappingURL=data:application/json;base64,ewogICJ2ZXJzaW9uIjogMywKICAic291cmNlcyI6IFsiLi4vLi4vLi4vYXNzZXRzL3ZlbmRvci90b3BiYXIuanMiLCAiLi4vLi4vLi4vZGVwcy9waG9lbml4X2h0bWwvcHJpdi9zdGF0aWMvcGhvZW5peF9odG1sLmpzIiwgIi4uLy4uLy4uL2RlcHMvcGhvZW5peC9hc3NldHMvanMvcGhvZW5peC91dGlscy5qcyIsICIuLi8uLi8uLi9kZXBzL3Bob2VuaXgvYXNzZXRzL2pzL3Bob2VuaXgvY29uc3RhbnRzLmpzIiwgIi4uLy4uLy4uL2RlcHMvcGhvZW5peC9hc3NldHMvanMvcGhvZW5peC9wdXNoLmpzIiwgIi4uLy4uLy4uL2RlcHMvcGhvZW5peC9hc3NldHMvanMvcGhvZW5peC90aW1lci5qcyIsICIuLi8uLi8uLi9kZXBzL3Bob2VuaXgvYXNzZXRzL2pzL3Bob2VuaXgvY2hhbm5lbC5qcyIsICIuLi8uLi8uLi9kZXBzL3Bob2VuaXgvYXNzZXRzL2pzL3Bob2VuaXgvYWpheC5qcyIsICIuLi8uLi8uLi9kZXBzL3Bob2VuaXgvYXNzZXRzL2pzL3Bob2VuaXgvbG9uZ3BvbGwuanMiLCAiLi4vLi4vLi4vZGVwcy9waG9lbml4L2Fzc2V0cy9qcy9waG9lbml4L3ByZXNlbmNlLmpzIiwgIi4uLy4uLy4uL2RlcHMvcGhvZW5peC9hc3NldHMvanMvcGhvZW5peC9zZXJpYWxpemVyLmpzIiwgIi4uLy4uLy4uL2RlcHMvcGhvZW5peC9hc3NldHMvanMvcGhvZW5peC9zb2NrZXQuanMiLCAiLi4vLi4vLi4vZGVwcy9waG9lbml4X2xpdmVfdmlldy9hc3NldHMvanMvcGhv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NzKDApO1xuICAgICAgICBpZiAob3B0aW9ucy5hdXRvUnVuKSB7XG4gICAgICAgICAgKGZ1bmN0aW9uIGxvb3AoKSB7XG4gICAgICAgICAgICBwcm9ncmVzc1RpbWVySWQgPSB3aW5kb3cucmVxdWVzdEFuaW1hdGlvbkZyYW1lKGxvb3ApO1xuICAgICAgICAgICAgdG9wYmFyLnByb2dyZXNzKFxuICAgICAgICAgICAgICBcIitcIiArIDAuMDUgKiBNYXRoLnBvdygxIC0gTWF0aC5zcXJ0KGN1cnJlbnRQcm9ncmVzcyksIDIpXG4gICAgICAgICAgICApO1xuICAgICAgICAgIH0pKCk7XG4gICAgICAgIH1cbiAgICAgIH0sXG4gICAgICBwcm9ncmVzczogZnVuY3Rpb24gKHRvKSB7XG4gICAgICAgIGlmICh0eXBlb2YgdG8gPT09IFwidW5kZWZpbmVkXCIpIHJldHVybiBjdXJyZW50UHJvZ3Jlc3M7XG4gICAgICAgIGlmICh0eXBlb2YgdG8gPT09IFwic3RyaW5nXCIpIHtcbiAgICAgICAgICB0byA9XG4gICAgICAgICAgICAodG8uaW5kZXhPZihcIitcIikgPj0gMCB8fCB0by5pbmRleE9mKFwiLVwiKSA+PSAwXG4gICAgICAgICAgICAgID8gY3VycmVudFByb2dyZXNzXG4gICAgICAgICAgICAgIDogMCkgKyBwYXJzZUZsb2F0KHRvKTtcbiAgICAgICAgfVxuICAgICAgICBjdXJyZW50UHJvZ3Jlc3MgPSB0byA+IDEgPyAxIDogdG87XG4gICAgICAgIHJlcGFpbnQoKTtcbiAgICAgICAgcmV0dXJuIGN1cnJlbnRQcm9ncmVzcztcbiAgICAgIH0sXG4gICAgICBoaWRlOiBmdW5jdGlvbiAoKSB7XG4gICAgICAgIGlmICghc2hvd2luZykgcmV0dXJuO1xuICAgICAgICBzaG93aW5nID0gZmFsc2U7XG4gICAgICAgIGlmIChwcm9ncmVzc1RpbWVySWQgIT0gbnVsbCkge1xuICAgICAgICAgIHdpbmRvdy5jYW5jZWxBbmlt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mFtZSA9PT0gJ09QVEdST1VQJykge1xuICAgICAgICAgICAgICAgICAgICBvcHRncm91cCA9IGN1ckNoaWxkO1xuICAgICAgICAgICAgICAgICAgICBjdXJDaGlsZCA9IG9wdGdyb3VwLmZpcnN0Q2hpbGQ7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG5vZGVOYW1lID09PSAnT1BUSU9OJykge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1ckNoaWxkLmhhc0F0dHJpYnV0ZSgnc2VsZWN0ZWQnKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIHNlbGVjdGVkSW5kZXggPSBpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGJyZWFrO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgaSsrO1xuICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgIGN1ckNoaWxkID0gY3VyQ2hpbGQubmV4dFNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgIGlmICghY3VyQ2hpbGQgJiYgb3B0Z3JvdXApIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1ckNoaWxkID0gb3B0Z3JvdXAubmV4dFNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgICAgICBvcHRncm91cCA9IG51bGw7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGZyb21FbC5zZWxlY3RlZEluZGV4ID0gc2VsZWN0ZWRJbmRleDtcbiAgICAgICAgfVxuICAgIH1cbn07XG5cbnZhciBFTEVNRU5UX05PREUgPSAxO1xudmFyIERPQ1VNRU5UX0ZSQUdNRU5UX05PREUkMSA9IDExO1xudmFyIFRFWFRfTk9ERSA9IDM7XG52YXIgQ09NTUVOVF9OT0RFID0gODtcblxuZnVuY3Rpb24gbm9vcC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2Rlcykge1xuICAgICAgICAgICAgaWYgKG5vZGUubm9kZVR5cGUgPT09IEVMRU1FTlRfTk9ERSkge1xuICAgICAgICAgICAgICAgIHZhciBjdXJDaGlsZCA9IG5vZGUuZmlyc3RDaGlsZDtcbiAgICAgICAgICAgICAgICB3aGlsZSAoY3VyQ2hpbGQpIHtcblxuICAgICAgICAgICAgICAgICAgICB2YXIga2V5ID0gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChza2lwS2V5ZWROb2RlcyAmJiAoa2V5ID0gZ2V0Tm9kZUtleShjdXJDaGlsZCkpKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBJZiB3ZSBhcmUgc2tpcHBpbmcga2V5ZWQgbm9kZXMgdGhlbiB3ZSBhZGQgdGhlIGtleVxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gdG8gYSBsaXN0IHNvIHRoYXQgaXQgY2FuIGJlIGhhbmRsZWQgYXQgdGhlIHZlcnkgZW5kLlxuICAgICAgICAgICAgICAgICAgICAgICAgYWRkS2V5ZWRSZW1vdmFsKGtleSk7XG4gICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBPbmx5IHJlcG9ydCB0aGUgbm9kZSBhcyBkaXNjYXJkZWQgaWYgaXQgaXMgbm90IGtleWVkLiBXZSBkbyB0aGlzIGJlY2F1c2VcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIGF0IHRoZSBlbmQgd2UgbG9vcCB0aHJvdWdoIGFsbCBrZXllZCBlbGVtZW50cyB0aGF0IHdlcmUgdW5tYXRjaGVkXG4gICAgICAgICAgICAgICAgICAgICAgICAvLyBhbmQgdGhlbiBkaXNjYXJkIHRoZW0gaW4gb25lIGZpbmFsIHBhc3MuXG4gICAgICAgICAgICAgICAgICAgICAgICBvbk5vZGVEaXNjYXJkZWQoY3VyQ2hpbGQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1ckNoaWxkLmZpcnN0Q2hpbGQpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB3YWxrRGlzY2FyZGVkQ2hpbGROb2RlcyhjdXJDaGlsZCwgc2tpcEtleWVkTm9kZXMpO1xuICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgY3VyQ2hpbGQgPSBjdXJDaGlsZC5uZXh0U2libGluZztcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICAvKipcbiAgICAgICAgICogUmVtb3ZlcyBhIERPTSBub2RlIG91dCBvZiB0aGUgb3JpZ2luYWwgRE9NXG4gICAgICAgICAqXG4gICAgICAgICAqIEBwYXJhbSAge05vZGV9IG5vZGUgVGhlIG5vZGUgdG8gcmVtb3ZlXG4gICAgICAgICAqIEBwYXJhbSAge05vZGV9IHBhcmVudE5vZGUgVGhlIG5vZGVzIHBhcmVudFxuICAgICAgICAgKiBAcGFyYW0gIHtCb29sZWFufSBza2lwS2V5ZWROb2RlcyBJZiB0cnVlIHRoZW4gZWxlbWVudHMgd2l0aCBrZXlzIHdpbGwgYmUgc2tpcHBlZCBhbmQgbm90IGRpc2NhcmRlZC5cbiAgICAgICAgICogQHJldHVybiB7dW5kZWZpbmVkfVxuICAgICAgICAgKi9cbiAgICAgICAgZnVuY3Rpb24gcmVtb3ZlTm9kZShub2RlLCBwYXJlbnROb2RlLCBza2lwS2V5ZWROb2Rlcykge1xuICAgICAgICAgICAgaWYgKG9uQmVmb3JlTm9kZURpc2NhcmRlZChub2RlKSA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICB9XG5cbiAgICAgICAgICAgIGlmIChwYXJlbnROb2RlKSB7XG4gICAgICAgICAgICAgICAgcGFyZW50Tm9kZS5yZW1vdmVDaGlsZChub2RlKTtcbiAgICAgICAgICAgIH1cblxuICAgICAg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gICAgICAgLy8gICAgIHZhciBub2RlSXRlcmF0b3IgPSBkb2N1bWVudC5jcmVhdGVOb2RlSXRlcmF0b3Iobm9kZSwgTm9kZUZpbHRlci5TSE9XX0VMRU1FTlQpO1xuICAgICAgICAvLyAgICAgdmFyIGVsO1xuICAgICAgICAvLyAgICAgd2hpbGUoKGVsID0gbm9kZUl0ZXJhdG9yLm5leHROb2RlKCkpKSB7XG4gICAgICAgIC8vICAgICAgICAgdmFyIGtleSA9IGdldE5vZGVLZXkoZWwpO1xuICAgICAgICAvLyAgICAgICAgIGlmIChrZXkpIHtcbiAgICAgICAgLy8gICAgICAgICAgICAgZnJvbU5vZGVzTG9va3VwW2tleV0gPSBlbDtcbiAgICAgICAgLy8gICAgICAgICB9XG4gICAgICAgIC8vICAgICB9XG4gICAgICAgIC8vIH1cblxuICAgICAgICBmdW5jdGlvbiBpbmRleFRyZWUobm9kZSkge1xuICAgICAgICAgICAgaWYgKG5vZGUubm9kZVR5cGUgPT09IEVMRU1FTlRfTk9ERSB8fCBub2RlLm5vZGVUeXBlID09PSBET0NVTUVOVF9GUkFHTUVOVF9OT0RFJDEpIHtcbiAgICAgICAgICAgICAgICB2YXIgY3VyQ2hpbGQgPSBub2RlLmZpcnN0Q2hpbGQ7XG4gICAgICAgICAgICAgICAgd2hpbGUgKGN1ckNoaWxkKSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBrZXkgPSBnZXROb2RlS2V5KGN1ckNoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKGtleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgZnJvbU5vZGVzTG9va3VwW2tleV0gPSBjdXJDaGlsZDtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIFdhbGsgcmVjdXJzaXZlbHlcbiAgICAgICAgICAgICAgICAgICAgaW5kZXhUcmVlKGN1ckNoaWxkKTtcblxuICAgICAgICAgICAgICAgICAgICBjdXJDaGlsZCA9IGN1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sZCkpKSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFNpbmNlIHRoZSBub2RlIGlzIGtleWVkIGl0IG1pZ2h0IGJlIG1hdGNoZWQgdXAgbGF0ZXIgc28gd2UgZGVmZXJcbiAgICAgICAgICAgICAgICAgICAgLy8gdGhlIGFjdHVhbCByZW1vdmFsIHRvIGxhdGVyXG4gICAgICAgICAgICAgICAgICAgIGFkZEtleWVkUmVtb3ZhbChjdXJGcm9tTm9kZUtleSk7XG4gICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgLy8gTk9URTogd2Ugc2tpcCBuZXN0ZWQga2V5ZWQgbm9kZXMgZnJvbSBiZWluZyByZW1vdmVkIHNpbmNlIHRoZXJlIGlzXG4gICAgICAgICAgICAgICAgICAgIC8vICAgICAgIHN0aWxsIGEgY2hhbmNlIHRoZXkgd2lsbCBiZSBtYXRjaGVkIHVwIGxhdGVyXG4gICAgICAgICAgICAgICAgICAgIHJlbW92ZU5vZGUoY3VyRnJvbU5vZGVDaGlsZCwgZnJvbUVsLCB0cnVlIC8qIHNraXAga2V5ZWQgbm9kZXMgKi8pO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICBjdXJGcm9tTm9kZUNoaWxkID0gZnJvbU5leHRTaWJsaW5nO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbW9ycGhFbChmcm9tRWwsIHRvRWwsIGNoaWxkcmVuT25seSkge1xuICAgICAgICAgICAgdmFyIHRvRWxLZXkgPSBnZXROb2RlS2V5KHRvRWwpO1xuXG4gICAgICAgICAgICBpZiAodG9FbEtleSkge1xuICAgICAgICAgICAgICAgIC8vIElmIGFuIGVsZW1lbnQgd2l0aCBhbiBJRCBpcyBiZWluZyBtb3JwaGVkIHRoZW4gaXQgd2lsbCBiZSBpbiB0aGUgZmluYWxcbiAgICAgICAgICAgICAgICAvLyBET00gc28gY2xlYXIgaXQgb3V0IG9mIHRoZSBzYXZlZCBlbGVtZW50cyBjb2xsZWN0aW9uXG4gICAgICAgICAgICAgICAgZGVsZXRlIGZyb21Ob2Rlc0xvb2t1cFt0b0VsS2V5XTtcbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKCFjaGlsZHJlbk9ubHkpIHtcbiAgICAgICAgICAgICAgICAvLyBvcHRpb25hbFxuICAgICAgICAgICAgICAgIGlmIChvbkJlZm9yZUVsVXBkYXRlZChmcm9tRWwsIHRvRWwpID09PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgICAgICByZXR1cm47XG4gICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgLy8gdXBkYXRlIGF0dHJpYnV0ZXMgb24gb3JpZ2luYWwgRE9NIGVsZW1lbnQgZmlyc3RcbiAgICAgICAgICAgICAgICBtb3JwaEF0dHJzKGZyb21FbCwgdG9FbCk7XG4gICAgICAgICAgICAgICAgLy8gb3B0aW9uYWxcbiAgICAgICAgICAgICAgICBvbkVsVXBkYXRlZChmcm9tRWwpO1xuXG4gICAgICAgICAgICAgICAgaWYgKG9uQmVmb3JlRWxDaGlsZHJlblVwZGF0ZWQoZnJvbUVsLCB0b0VsKSA9PT0gZmFsc2UpIHtcbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuO1xuICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgaWYgKGZyb21FbC5ub2RlTmFtZSAhPT0gJ1RFWFRBUkVBJykge1xuICAgICAgICAgICAgICBtb3JwaENoaWxkcmVuKGZyb21FbCwgdG9FbCk7XG4gICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICBzcGVjaWFsRWxIYW5kbGVycy5URVhUQVJFQShmcm9tRWwsIHRvRWwpO1xuICAgICAgICAgICAgfVxuICAgICAgICB9XG5cbiAgICAgICAgZnVuY3Rpb24gbW9ycGhDaGlsZHJlbihmcm9tRWwsIHRvRWwpIHtcbiAgICAgICAgICAgI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DaGlsZCA9IGZyb21OZXh0U2libGluZztcbiAgICAgICAgICAgICAgICAgICAgICAgIGNvbnRpbnVlIG91dGVyO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgY3VyRnJvbU5vZGVLZXkgPSBnZXROb2RlS2V5KGN1ckZyb21Ob2RlQ2hpbGQpO1xuXG4gICAgICAgICAgICAgICAgICAgIHZhciBjdXJGcm9tTm9kZVR5cGUgPSBjdXJGcm9tTm9kZUNoaWxkLm5vZGVUeXBlO1xuXG4gICAgICAgICAgICAgICAgICAgIC8vIHRoaXMgbWVhbnMgaWYgdGhlIGN1ckZyb21Ob2RlQ2hpbGQgZG9lc250IGhhdmUgYSBtYXRjaCB3aXRoIHRoZSBjdXJUb05vZGVDaGlsZFxuICAgICAgICAgICAgICAgICAgICB2YXIgaXNDb21wYXRpYmxlID0gdW5kZWZpbmVkO1xuXG4gICAgICAgICAgICAgICAgICAgIGlmIChjdXJGcm9tTm9kZVR5cGUgPT09IGN1clRvTm9kZUNoaWxkLm5vZGVUeXBlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VyRnJvbU5vZGVUeXBlID09PSBFTEVNRU5UX05PREUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBCb3RoIG5vZGVzIGJlaW5nIGNvbXBhcmVkIGFyZSBFbGVtZW50IG5vZGVzXG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VyVG9Ob2RlS2V5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFRoZSB0YXJnZXQgbm9kZSBoYXMgYSBrZXkgc28gd2Ugd2FudCB0byBtYXRjaCBpdCB1cCB3aXRoIHRoZSBjb3JyZWN0IGVsZW1lbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaW4gdGhlIG9yaWdpbmFsIERPTSB0cmVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJUb05vZGVLZXkgIT09IGN1ckZyb21Ob2RlS2V5KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgY3VycmVudCBlbGVtZW50IGluIHRoZSBvcmlnaW5hbCBET00gdHJlZSBkb2VzIG5vdCBoYXZlIGEgbWF0Y2hpbmcga2V5IHNvXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBsZXQncyBjaGVjayBvdXIgbG9va3VwIHRvIHNlZSBpZiB0aGVyZSBpcyBhIG1hdGNoaW5nIGVsZW1lbnQgaW4gdGhlIG9yaWdpbmFsXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBET00gdHJlZVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgaWYgKChtYXRjaGluZ0Zyb21FbCA9IGZyb21Ob2Rlc0xvb2t1cFtjdXJUb05vZGVLZXldKSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChmcm9tTmV4dFNpYmxpbmcgPT09IG1hdGNoaW5nRnJvbUVsKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFNwZWNpYWwgY2FzZSBmb3Igc2luZ2xlIGVsZW1lbnQgcmVtb3ZhbHMuIFRvIGF2b2lkIHJlbW92aW5nIHRoZSBvcmlnaW5hbFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBET00gbm9kZSBvdXQgb2YgdGhlIHRyZWUgKHNpbmNlIHRoYXQgY2FuIGJyZWFrIENTUyB0cmFuc2l0aW9ucywgZXRjLiksXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHdlIHdpbGwgaW5zdGVhZCBkaXNjYXJkIHRoZSBjdXJyZW50IG5vZGUgYW5kIHdhaXQgdW50aWwgdGhlIG5leHRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXRlcmF0aW9uIHRvIHByb3Blcmx5IG1hdGNoIHVwIHRoZSBrZXllZCB0YXJnZXQgZWxlbWVudCB3aXRoIGl0cyBtYXRjaGluZ1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBlbGVtZW50IGluIHRoZSBvcmlnaW5hbCB0cmVlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzQ29tcGF0aWJsZSA9IGZhbHNlO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIFdlIGZvdW5kIGEgbWF0Y2hpbmcga2V5ZWQgZWxlbWVudCBzb21ld2hlcmUgaW4gdGhlIG9yaWdpbmFsIERPTSB0cmVlLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBMZXQncyBtb3ZlIHRoZSBvcmlnaW5hbCBET00gbm9kZSBpbnRvIHRoZSBjdXJyZW50IHBvc2l0aW9uIGFuZCBtb3JwaFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBpdC5cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBOT1RFOiBXZSB1c2UgaW5zZXJ0QmVmb3JlIGluc3RlYWQgb2YgcmVwbGFjZUNoaWxkIGJlY2F1c2Ugd2Ugd2FudCB0byBnbyB0aHJvdWdoXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBgcmVtb3ZlTm9kZSgpYCBmdW5jdGlvbiBmb3IgdGhlIG5vZGUgdGhhdCBpcyBiZWluZyBkaXNjYXJkZWQgc28gdGhhdFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBhbGwgbGlmZWN5Y2xlIGhvb2tzIGFyZSBjb3JyZWN0bHkgaW52b2tlZFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBmcm9tRWwuaW5zZXJ0QmVmb3JlKG1hdGNoaW5nRnJvbUVsLCBjdXJGcm9tTm9kZUNoaWxkKTtcblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBmcm9tTmV4dFNpYmxpbmcgPSBjdXJGcm9tTm9kZUNoaWxkLm5leHRTaWJsaW5nO1xuXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChjdXJGcm9tTm9kZUtleSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2luY2UgdGhlIG5vZGUgaXMga2V5ZWQgaXQgbWlnaHQgYmUgbWF0Y2hlZCB1cCBsYXRlciBzbyB3ZSBkZWZlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGhlIGFjdHVhbCByZW1vdmFsIHRvIGxhdGVyXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBhZGRLZXllZFJlbW92YWwoY3VyRnJvbU5vZGVLZXkpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gTk9URTogd2Ugc2tpcCBuZXN0ZWQga2V5ZWQgbm9kZXMgZnJvbSBiZWluZyByZW1vdmVkIHNpbmNlIHRoZXJlIGlzXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyAgICAgICBzdGlsbCBhIGNoYW5jZSB0aGV5IHdpbGwgYmUgbWF0Y2hlZCB1cCBsYXRlclxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgcmVtb3ZlTm9kZShjdXJGcm9tTm9kZUNoaWxkLCBmcm9tRWwsIHRydWUgLyogc2tpcCBrZXllZCBub2RlcyAqLyk7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJGcm9tTm9kZUNoaWxkID0gbWF0Y2hpbmdGcm9tRWw7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfSBlbHNlIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBUaGUgbm9kZXMgYXJlIG5vdCBjb21wYXRpYmxlIHNpbmNlIHRoZSBcInRvXCIgbm9kZSBoYXMgYSBrZXkgYW5kIHRoZXJlXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gaXMgbm8gbWF0Y2hpbmcga2V5ZWQgbm9kZSBpbiB0aGUgc291cmNlIHRyZWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0NvbXBhdGlibGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VyRnJvbU5vZGVLZXkpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gVGhlIG9yaWdpbmFsIGhhcyBhIGtleVxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0NvbXBhdGlibGUgPSBmYWxzZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpc0NvbXBhdGlibGUgPSBpc0NvbXBhdGlibGUgIT09IGZhbHNlICYmIGNvbXBhcmVOb2RlTmFtZXMoY3VyRnJvbU5vZGVDaGlsZCwgY3VyVG9Ob2RlQ2hpbGQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlmIChpc0NvbXBhdGlibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gV2UgZm91bmQgY29tcGF0aWJsZSBET00gZWxlbWVudHMgc28gdHJhbnNmb3JtXG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIHRoZSBjdXJyZW50IFwiZnJvbVwiIG5vZGUgdG8gbWF0Y2ggdGhlIGN1cnJlbnRcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gdGFyZ2V0IERPTSBub2RlLlxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBNT1JQSFxuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBtb3JwaEVsKGN1ckZyb21Ob2RlQ2hpbGQsIGN1clRvTm9kZUNoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIH0gZWxzZSBpZiAoY3VyRnJvbU5vZGVUeXBlID09PSBURVhUX05PREUgfHwgY3VyRnJvbU5vZGVUeXBlID09IENPTU1FTlRfTk9ERSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIC8vIEJvdGggbm9kZXMgYmVpbmcgY29tcGFyZWQgYXJlIFRleHQgb3IgQ29tbWVudCBub2Rlc1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGlzQ29tcGF0aWJsZSA9IHRydWU7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgLy8gU2ltcGx5IHVwZGF0ZSBub2RlVmFsdWUgb24gdGhlIG9yaWdpbmFsIG5vZGUgdG9cbiAgICAgICAgICAgICAgICAgICAgICAgICAgICAvLyBjaGFuZ2UgdGhlIHRleHQgdmFsdWVcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICBpZiAoY3VyRnJvbU5vZGVDaGlsZC5ub2RlVmFsdWUgIT09IGN1clRvTm9kZUNoaWxkLm5vZGVWYWx1ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICBjdXJGcm9tTm9kZUNoaWxkLm5vZGVWYWx1ZSA9IGN1clRvTm9kZUNoaWxkLm5vZGVWYWx1ZTtcbiAgICAgICAgICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIGlmIChpc0NvbXBhdGlibGUpIHtcbiAgICAgICAgICAgICAgICAgICAgICAgIC8vIEFkdmFuY2UgYm90aCB0aGUgXCJ0b1wiIGNoaWxkIGFuZCB0aGUgXCJmcm9tXCIgY2hpbGQgc2luY2Ugd2UgZm91bmQgYSBtYXRjaFxuICAgICAgICAgICAgICAgICAgICAgICAgLy8gTm90aGluZyBlbHNlIHRvIGRvIGFzIHdlIGFscmVhZHkgcmVjdXJzaXZlbHkgY2FsbGVkIG1vcnBoQ2hpbGRyZW4gYWJvdmVcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1clRvTm9kZUNoaWxkID0gdG9OZXh0U2libGluZztcbiAgICAgICAgICAgICAgICAgICAgICAgIGN1ckZyb21Ob2RlQ2hpbGQgPSBmcm9tTmV4dFNpYmxpbmc7XG4gICAgICAgICAgICAgICAgICAgICAgICBjb250aW51ZSBvdXRlcjtcbiAgICAgICAgICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICAgICAgICAgIC8vIE5vIGNvbXBhdGlibGUgbWF0Y2ggc28gcmVtb3ZlIHRoZSBvbGQgbm9kZSBmcm9tIHRoZSBET00gYW5kIGNvbnRpbnVlIHRyeWluZyB0byBmaW5kIGFcbiAgICAgICAgICAgICAgICAgICAgLy8gbWF0Y2ggaW4gdGhlIG9yaWdpbmFsIERPTS4gSG93ZXZlciwg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gICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIHZhciBvbkJlZm9yZU5vZGVBZGRlZFJlc3VsdCA9IG9uQmVmb3JlTm9kZUFkZGVkKGN1clRvTm9kZUNoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgaWYgKG9uQmVmb3JlTm9kZUFkZGVkUmVzdWx0ICE9PSBmYWxzZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKG9uQmVmb3JlTm9kZUFkZGVkUmVzdWx0KSB7XG4gICAgICAgICAgICAgICAgICAgICAgICAgICAgY3VyVG9Ob2RlQ2hpbGQgPSBvbkJlZm9yZU5vZGVBZGRlZFJlc3VsdDtcbiAgICAgICAgICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgICAgICAgICAgaWYgKGN1clRvTm9kZUNoaWxkLmFjdHVhbGl6ZSkge1xuICAgICAgICAgICAgICAgICAgICAgICAgICAgIGN1clRvTm9kZUNoaWxkID0gY3VyVG9Ob2RlQ2hpbGQuYWN0dWFsaXplKGZyb21FbC5vd25lckRvY3VtZW50IHx8IGRvYyk7XG4gICAgICAgICAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICAgICAgICAgICAgICBmcm9tRWwuYXBwZW5kQ2hpbGQoY3VyVG9Ob2RlQ2hpbGQpO1xuICAgICAgICAgICAgICAgICAgICAgICAgaGFuZGxlTm9kZUFkZGVkKGN1clRvTm9kZUNoaWxkKTtcbiAgICAgICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgICAgIH1cblxuICAgICAgICAgICAgICAgIGN1clRvTm9kZUNoaWxkID0gdG9OZXh0U2libGluZztcbiAgICAgICAgICAgICAgICBjdXJGcm9tTm9kZUNoaWxkID0gZnJvbU5leHRTaWJsaW5nO1xuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICBjbGVhbnVwRnJvbUVsKGZyb21FbCwgY3VyRnJvbU5vZGVDaGlsZCwgY3VyRnJvbU5vZGVLZXkpO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5vZGVOYW1lLCB0b05vZGUubmFtZXNwYWNlVVJJKSk7XG4gICAgICAgICAgICAgICAgICAgIH1cbiAgICAgICAgICAgICAgICB9IGVsc2Uge1xuICAgICAgICAgICAgICAgICAgICAvLyBHb2luZyBmcm9tIGFuIGVsZW1lbnQgbm9kZSB0byBhIHRleHQgbm9kZVxuICAgICAgICAgICAgICAgICAgICBtb3JwaGVkTm9kZSA9IHRvTm9kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9IGVsc2UgaWYgKG1vcnBoZWROb2RlVHlwZSA9PT0gVEVYVF9OT0RFIHx8IG1vcnBoZWROb2RlVHlwZSA9PT0gQ09NTUVOVF9OT0RFKSB7IC8vIFRleHQgb3IgY29tbWVudCBub2RlXG4gICAgICAgICAgICAgICAgaWYgKHRvTm9kZVR5cGUgPT09IG1vcnBoZWROb2RlVHlwZSkge1xuICAgICAgICAgICAgICAgICAgICBpZiAobW9ycGhlZE5vZGUubm9kZVZhbHVlICE9PSB0b05vZGUubm9kZVZhbHVlKSB7XG4gICAgICAgICAgICAgICAgICAgICAgICBtb3JwaGVkTm9kZS5ub2RlVmFsdWUgPSB0b05vZGUubm9kZVZhbHVlO1xuICAgICAgICAgICAgICAgICAgICB9XG5cbiAgICAgICAgICAgICAgICAgICAgcmV0dXJuIG1vcnBoZWROb2RlO1xuICAgICAgICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICAgICAgICAgIC8vIFRleHQgbm9kZSB0byBzb21ldGhpbmcgZWxzZVxuICAgICAgICAgICAgICAgICAgICBtb3JwaGVkTm9kZSA9IHRvTm9kZTtcbiAgICAgICAgICAgICAgICB9XG4gICAgICAgICAgICB9XG4gICAgICAgIH1cblxuICAgICAgICBpZiAobW9ycGhlZE5vZGUgPT09IHRvTm9kZSkge1xuICAgICAgICAgICAgLy8gVGhlIFwidG8gbm9kZVwiIHdhcyBub3QgY29tcGF0aWJsZSB3aXRoIHRoZSBcImZyb20gbm9kZVwiIHNvIHd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ICAgICAgICBpZih0aGlzLnNraXBDSURTaWJsaW5nKGVsKSl7IHJldHVybiBmYWxzZSB9XG4gICAgICAgICAgcmV0dXJuIHRydWVcbiAgICAgICAgfSxcbiAgICAgICAgb25FbFVwZGF0ZWQ6IChlbCkgPT4ge1xuICAgICAgICAgIGlmKERPTS5pc05vd1RyaWdnZXJGb3JtRXh0ZXJuYWwoZWwsIHBoeFRyaWdnZXJFeHRlcm5hbCkpe1xuICAgICAgICAgICAgZXh0ZXJuYWxGb3JtVHJpZ2dlcmVkID0gZWxcbiAgICAgICAgICB9XG4gICAgICAgICAgdXBkYXRlcy5wdXNoKGVsKVxuICAgICAgICB9LFxuICAgICAgICBvbkJlZm9yZUVsVXBkYXRlZDogKGZyb21FbCwgdG9FbCkgPT4ge1xuICAgICAgICAgIERPTS5jbGVhbkNoaWxkTm9kZXModG9FbCwgcGh4VXBkYXRlKVxuICAgICAgICAgIGlmKHRoaXMuc2tpcENJRFNpYmxpbmcodG9FbCkpeyByZXR1cm4gZmFsc2UgfVxuICAgICAgICAgIGlmKERPTS5pc1BoeFN0aWNreShmcm9tRWwpKXsgcmV0dXJuIGZhbHNlIH1cbiAgICAgICAgICBpZihET00uaXNJZ25vcmVkKGZyb21FbCwgcGh4VXBkYXRlKSl7XG4gICAgICAgICAgICB0aGlzLnRyYWNrQmVmb3JlKFwidXBkYXRlZFwiLCBmcm9tRWwsIHRvRWwpXG4gICAgICAgICAgICBET00ubWVyZ2VBdHRycyhmcm9tRWwsIHRvRWwsIHtpc0lnbm9yZWQ6IHRydWV9KVxuICAgICAgICAgICAgdXBkYXRlcy5wdXNoKGZyb21FbClcbiAgICAgICAgICAgIERPTS5hcHBseVN0aWNreU9wZXJhdGlvbnMoZnJvbUVsKVxuICAgICAgICAgICAgcmV0dXJuIGZhbHNlXG4gICAgICAgICAgfVxuICAgICAgICAgIGlmKGZyb21FbC50eXBlID09PSBcIm51bWJlclwiICYmIChmcm9tRWwudmFsaWRpdHkgJiYgZnJvbUVsLnZhbGlkaXR5LmJhZElucHV0KSl7IHJldHVybiBmYWxzZSB9XG4gICAgICAgICAgaWYoIURPTS5zeW5jUGVuZGluZ1JlZihmcm9tRWwsIHRvRWwsIGRpc2FibGVXaXRoKSl7XG4gICAgICAgICAgICBpZihET00uaXNVcGxvYWRJbnB1dChmcm9tRWwpKXtcbiAgICAgICAgICAgICAgdGhpcy50cmFja0JlZm9yZShcInVwZGF0ZWRcIiwgZnJvbUVsLCB0b0VsKVxuICAgICAgICAgICAgICB1cGRhdGVzLnB1c2goZnJvbUVsKVxuICAgICAgICAgICAgfVxuICAgICAgICAgICAgRE9NLmFwcGx5U3RpY2t5T3BlcmF0aW9ucyhmcm9tRWwpXG4gICAgICAgICAgICByZXR1cm4gZmFsc2VcbiAgICAgICAgICB9XG5cbiAgICAgICAgICAvLyBuZXN0ZWQgdmlldyBoYW5kbGluZ1xuICAgICAgICAgIGlmKERPTS5pc1BoeENoaWxkKHRvRWwpKXtcbiAgICAgICAgICAgIGxldCBwcmV2U2Vzc2lvbiA9IGZyb21FbC5nZXRBdHRyaWJ1dGUoUEhYX1NFU1NJT04pXG4gICAgICAgICAgICBET00ubWVyZ2VBdHRycyhmcm9tRWwsIHRvRWwsIHtleGNsdWRlOiBbUEhYX1NUQVRJQ119KVxuICAgICAgICAgICAgaWYocHJldlNlc3Npb24gIT09IFwiXCIpeyBmcm9tRWwuc2V0QXR0cmlidXRlKFBIWF9TRVNTSU9OLCBwcmV2U2Vzc2lvbikgfVxuICAgICAgICAgICAgZnJvbUVsLnNldEF0dHJpYnV0ZShQSFhfUk9PVF9JRCwgdGhpcy5yb290SUQpXG4gICAgICAgICAgICBET00uYXBwbHlTdGlja3lPcGVyYXRpb25zKGZyb21FbClcbiAgICAgICAgICAgIHJldHVybiBmYWxzZVxuICAgICAgICAgIH1cblxuICAgICAgICAgIC8vIGlucHV0IGhhbmRsaW5nXG4gICAgICAgICAgRE9NLmNvcHlQcml2YXRlcyh0b0VsLCBmcm9tRWwpXG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B9XG4gICAgICAgICAgICBvbkxvYWRpbmdEb25lKClcbiAgICAgICAgICAgIG9uUmVwbHkocmVzcCwgaG9va1JlcGx5KVxuICAgICAgICAgIH1cbiAgICAgICAgICBpZihyZXNwLmRpZmYpe1xuICAgICAgICAgICAgdGhpcy5saXZlU29ja2V0LnJlcXVlc3RET01VcGRhdGUoKCkgPT4ge1xuICAgICAgICAgICAgICBsZXQgaG9va1JlcGx5ID0gdGhpcy5hcHBseURpZmYoXCJ1cGRhdGVcIiwgcmVzcC5kaWZmLCAoe2RpZmYsIGV2ZW50c30pID0+IHtcbiAgICAgICAgICAgICAgICB0aGlzLnVwZGF0ZShkaWZmLCBldmVudHMpXG4gICAgICAgICAgICAgIH0pXG4gICAgICAgICAgICAgIGZpbmlzaChob29rUmVwbHkpXG4gICAgICAgICAgICB9KVxuICAgICAgICAgIH0gZWxzZSB7XG4gICAgICAgICAgICBmaW5pc2gobnVsbClcbiAgICAgICAgICB9XG4gICAgICAgIH0pXG4gICAgICB9KVxuICAgIClcbiAgfVxuXG4gIHVuZG9SZWZzKHJlZil7XG4gICAgRE9NLmFsbChkb2N1bWVudCwgYFske1BIWF9SRUZfU1JDfT1cIiR7dGhpcy5pZH1cIl1bJHtQSFhfUkVGfT1cIiR7cmVmfVwiXWAsIGVsID0+IHtcbiAgICAgIGxldCBkaXNhYmxlZFZhbCA9IGVsLmdldEF0dHJpYnV0ZShQSFhfRElTQUJMRUQpXG4gICAgICAvLyByZW1vdmUgcmVmc1xuICAgICAgZWwucmVtb3ZlQXR0cmlidXRlKFBIWF9SRUYpXG4gICAgICBlbC5yZW1vdmVBdHRyaWJ1dGUoUEhYX1JFRl9TUkMpXG4gICAgICAvLyByZXN0b3JlIGlucHV0c1xuICAgICAgaWYoZWwuZ2V0QXR0cmlidXRlKFBIWF9SRUFET05MWSkgIT09IG51bGwpe1xuICAgICAgICBlbC5yZWFkT25seSA9IGZhbHNlXG4gICAgICAgIGVsLnJlbW92ZUF0dHJpYnV0ZShQ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BUyxRQUFPO0FBQ2xDLGNBQUE7QUFDQSxVQUFJLFFBQVEsV0FBVyxNQUFNO0FBQzNCLGFBQUssWUFBWSxPQUFPLEtBQUE7QUFDeEIsZUFBQTtBQUNBLFlBQUcsS0FBSyxLQUFBLE1BQVcsR0FBRTtBQUFFLGVBQUssZ0JBQUE7UUFBQTtNQUFBLEdBQzNCLElBQUE7QUFDSCxXQUFLLFlBQVksSUFBSSxLQUFBO0lBQUE7SUFHdkIsY0FBYyxJQUFHO0FBQUUsV0FBSyxXQUFXLEtBQUssRUFBQTtJQUFBO0lBRXhDLE9BQU07QUFBRSxhQUFPLEtBQUssWUFBWTtJQUFBO0lBRWhDLGtCQUFpQjtBQUNmLFdBQUssV0FBVyxRQUFRLENBQUEsT0FBTSxHQUFBLENBQUE7QUFDOUIsV0FBSyxhQUFhLENBQUE7SUFBQTtFQUFBOzs7QUNqMEJ0QixzQkFBbUI7QUFFbkIsTUFBSSxZQUFZLFNBQVMsY0FBYyx5QkFBeUIsRUFBRSxhQUFhLFNBQVM7QUFDeEYsTUFBSSxhQUFhLElBQUksV0FBVyxTQUFTLFFBQVEsRUFBQyxRQUFRLEVBQUMsYUFBYSxVQUFTLEVBQUMsQ0FBQztBQUduRix3QkFBTyxPQUFPLEVBQUMsV0FBVyxFQUFDLEdBQUcsT0FBTSxHQUFHLGFBQWEsb0JBQW1CLENBQUM7QUFDeEUsU0FBTyxpQkFBaUIsMEJBQTBCLFVBQVEsc0JBQU8sS0FBSyxDQUFDO0FBQ3ZFLFNBQU8saUJBQWlCLHlCQUF5QixVQUFRLHNCQUFPLEtBQUssQ0FBQztBQUd0RSxhQUFXLFFBQVE7QUFNbkIsU0FBTyxhQUFhOyIsCiAgIm5hbWVzIjogW10KfQo=\n" }, "redirectURL": "", "headersSize": 122, "bodySize": 0, "_transferSize": 122, "_error": null }, "serverIPAddress": "127.0.0.1", "startedDateTime": "2022-11-15T19:45:16.626Z", "time": 2.941999933682382, "timings": { "blocked": 1.1920000047907233, "dns": -1, "ssl": -1, "connect": -1, "send": 0.026000000000000023, "wait": 1.2099999731630087, "receive": 0.5139999557286501, "_blocked_queueing": 0.4440000047907233 } }, { "_initiator": { "type": "parser", "url": "http://localhost:4000/events", "lineNumber": 53 }, "_priority": "VeryHigh", "_resourceType": "document", "cache": {}, "connection": "18690", "pageref": "page_11", "request": { "method": "GET", "url": "http://localhost:4000/phoenix/live_reload/frame", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.9" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Host", "value": "localhost:4000" }, { "name": "Referer", "value": "http://localhost:4000/events" }, { "name": "Sec-Fetch-Dest", "value": "iframe" }, { "name": "Sec-Fetch-Mode", "value": "navigate" }, { "name": "Sec-Fetch-Site", "value": "same-origin" }, { "name": "Upgrade-Insecure-Requests", "value": "1" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "sec-ch-ua", "value": "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"" }, { "name": "sec-ch-ua-mobile", "value": "?0" }, { "name": "sec-ch-ua-platform", "value": "\"Linux\"" } ], "queryString": [], "cookies": [ { "name": "_faircart_key", "value": "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4", "path": "/", "domain": "localhost", "expires": "1969-12-31T23:59:59.000Z", "httpOnly": true, "secure": false } ], "headersSize": 813, "bodySize": 0 }, "response": { "status": 200, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "cache-control", "value": "max-age=0, private, must-revalidate" }, { "name": "content-length", "value": "39688" }, { "name": "content-type", "value": "text/html; charset=utf-8" }, { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "server", "value": "Cowboy" } ], "cookies": [], "content": { "size": 39688, "mimeType": "text/html", "compression": 0, "text": "\n\n\n" }, "redirectURL": "", "headersSize": 187, "bodySize": 39688, "_transferSize": 39875, "_error": null }, "serverIPAddress": "127.0.0.1", "startedDateTime": "2022-11-15T19:45:16.630Z", "time": 6.46300008520484, "timings": { "blocked": 0.7799999980404972, "dns": -1, "ssl": -1, "connect": -1, "send": 0.291, "wait": 3.288000015169382, "receive": 2.1040000719949603, "_blocked_queueing": 0.5959999980404973 } }, { "_initiator": { "type": "script", "stack": { "callFrames": [ { "functionName": "connect", "scriptId": "210", "url": "http://localhost:4000/assets/app.js", "lineNumber": 956, "columnNumber": 18 }, { "functionName": "doConnect", "scriptId": "210", "url": "http://localhost:4000/assets/app.js", "lineNumber": 4423, "columnNumber": 22 }, { "functionName": "connect", "scriptId": "210", "url": "http://localhost:4000/assets/app.js", "lineNumber": 4429, "columnNumber": 8 }, { "functionName": "", "scriptId": "210", "url": "http://localhost:4000/assets/app.js", "lineNumber": 5081, "columnNumber": 13 }, { "functionName": "", "scriptId": "210", "url": "http://localhost:4000/assets/app.js", "lineNumber": 5083, "columnNumber": 2 } ] } }, "_priority": null, "_resourceType": "websocket", "_webSocketMessages": [ { "type": "send", "time": 1668541516.687092, "opcode": 1, "data": "[\"4\",\"4\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_join\",{\"url\":\"http://localhost:4000/events\",\"params\":{\"_csrf_token\":\"KlYjAAgdLyA0ZmpmWXouF2McCQodKQBCRbHFYydtz1G50MDvZsLgNkNz\",\"_track_static\":[\"http://localhost:4000/assets/app.css\",\"http://localhost:4000/assets/app.js\"],\"_mounts\":0},\"session\":\"SFMyNTY.g2gDaAJhBXQAAAAIZAACaWRtAAAAFHBoeC1GeWZacTBiX3B2WF9oUVNGZAAMbGl2ZV9zZXNzaW9uaAJkAAdkZWZhdWx0bggAzF0mRJ_ZJxdkAApwYXJlbnRfcGlkZAADbmlsZAAIcm9vdF9waWRkAANuaWxkAAlyb290X3ZpZXdkACJFbGl4aXIuRmFpcmNhcnRXZWIuRXZlbnRMaXZlLkluZGV4ZAAGcm91dGVyZAAZRWxpeGlyLkZhaXJjYXJ0V2ViLlJvdXRlcmQAB3Nlc3Npb250AAAAAGQABHZpZXdkACJFbGl4aXIuRmFpcmNhcnRXZWIuRXZlbnRMaXZlLkluZGV4bgYASgvTfIQBYgABUYA.uTNBvsdrrCSAumjrR4rpPELiUCzbRqBD2rMD78lrV8M\",\"static\":\"SFMyNTY.g2gDaAJhBXQAAAADZAAKYXNzaWduX25ld2pkAAVmbGFzaHQAAAAAZAACaWRtAAAAFHBoeC1GeWZacTBiX3B2WF9oUVNGbgYASgvTfIQBYgABUYA.fqDLlJmQJ0zLbH0JOK9dWrdwZT8V708bXMAk1F4dZ7U\"}]" }, { "type": "receive", "time": 1668541516.692606, "opcode": 1, "data": "[\"4\",\"4\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_reply\",{\"response\":{\"rendered\":{\"0\":\"\",\"1\":\"\",\"2\":{\"0\":\"\",\"1\":\"\",\"2\":\"New Event\",\"s\":[\"

Listing Events

\\n\",\"\\n\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n\",\"\\n \\n
NameDescriptionCapacity
\\n\\n\",\"\"]},\"s\":[\"
\\n

\",\"

\\n\\n

\",\"

\\n\",\"\\n
\"],\"t\":\"Listing Events\"}},\"status\":\"ok\"}]" }, { "type": "send", "time": 1668541528.705797, "opcode": 1, "data": "[\"4\",\"6\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"live_patch\",{\"url\":\"http://localhost:4000/events/new\"}]" }, { "type": "receive", "time": 1668541528.709173, "opcode": 1, "data": "[\"4\",\"6\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_reply\",{\"response\":{\"diff\":{\"2\":{\"0\":{\"0\":{\"0\":\" phx-remove=\\\"[["hide",{"time":200,"to":"#modal","transition":[["fade-out"],[],[]]}],["hide",{"time":200,"to":"#modal-content","transition":[["fade-out-scale"],[],[]]}]]\\\"\",\"1\":\" phx-click-away=\\\"[["dispatch",{"event":"click","to":"#close"}]]\\\"\",\"2\":\" phx-window-keydown=\\\"[["dispatch",{"event":"click","to":"#close"}]]\\\"\",\"3\":{\"0\":\"\",\"s\":[\"\\n \",\"\\n \"]},\"4\":{\"0\":1,\"s\":[\"\\n \",\"\\n \"]},\"s\":[\"
\\n
\\n \",\"\\n\\n \",\"\\n
\\n
\"]},\"s\":[\"\\n \",\"\\n\"]}},\"c\":{\"1\":{\"0\":\"New Event\",\"1\":{\"0\":\" method=\\\"post\\\" id=\\\"event-form\\\" phx-submit=\\\"save\\\" phx-target=\\\"1\\\"\",\"1\":\"\",\"2\":\"\",\"3\":{\"0\":\"\",\"1\":\"\",\"2\":\"\",\"3\":\"\",\"4\":\"\",\"5\":\"\",\"6\":\"\",\"7\":\"\",\"8\":\"\",\"9\":\"\",\"s\":[\"\\n\",\"\\n\",\"\\n\",\"\\n\",\"\\n\",\"\\n\",\"\\n\",\"\\n\",\"\\n\",\"\\n
\\n\",\"\\n
\\n \"]},\"s\":[\"\\n \",\"\\n \",\"\\n \",\"\\n\"]},\"s\":[\"
\\n

\",\"

\\n\\n \",\"\\n
\"]}},\"t\":\"New Event\"}},\"status\":\"ok\"}]" }, { "type": "send", "time": 1668541546.690212, "opcode": 1, "data": "[null,\"7\",\"phoenix\",\"heartbeat\",{}]" }, { "type": "receive", "time": 1668541546.690783, "opcode": 1, "data": "[null,\"7\",\"phoenix\",\"phx_reply\",{\"response\":{},\"status\":\"ok\"}]" }, { "type": "send", "time": 1668541546.824444, "opcode": 1, "data": "[\"4\",\"8\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"event\",{\"type\":\"form\",\"event\":\"save\",\"value\":\"event%5Bname%5D=a+name+of+event&event%5Bdescription%5D=a+description+of+event&event%5Bcapacity%5D=8675309\",\"cid\":1}]" }, { "type": "receive", "time": 1668541546.8368142, "opcode": 1, "data": "[\"4\",\"8\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_reply\",{\"response\":{\"live_redirect\":{\"flash\":\"SFMyNTY.g2gDdAAAAAFtAAAABGluZm9tAAAAGkV2ZW50IGNyZWF0ZWQgc3VjY2Vzc2Z1bGx5bgYAUoHTfIQBYgABUYA.XO7rfHBnPnrOPLWwPj1SZi3xfZCajlhdhDUx05I867E\",\"kind\":\"push\",\"to\":\"/events\"}},\"status\":\"ok\"}]" }, { "type": "send", "time": 1668541546.838535, "opcode": 1, "data": "[\"4\",\"9\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_leave\",{}]" }, { "type": "send", "time": 1668541546.8394032, "opcode": 1, "data": "[\"12\",\"12\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_join\",{\"redirect\":\"http://localhost:4000/events\",\"params\":{\"_csrf_token\":\"KlYjAAgdLyA0ZmpmWXouF2McCQodKQBCRbHFYydtz1G50MDvZsLgNkNz\",\"_track_static\":[\"http://localhost:4000/assets/app.css\",\"http://localhost:4000/assets/app.js\"],\"_mounts\":0},\"session\":\"SFMyNTY.g2gDaAJhBXQAAAAIZAACaWRtAAAAFHBoeC1GeWZacTBiX3B2WF9oUVNGZAAMbGl2ZV9zZXNzaW9uaAJkAAdkZWZhdWx0bggAzF0mRJ_ZJxdkAApwYXJlbnRfcGlkZAADbmlsZAAIcm9vdF9waWRkAANuaWxkAAlyb290X3ZpZXdkACJFbGl4aXIuRmFpcmNhcnRXZWIuRXZlbnRMaXZlLkluZGV4ZAAGcm91dGVyZAAZRWxpeGlyLkZhaXJjYXJ0V2ViLlJvdXRlcmQAB3Nlc3Npb250AAAAAGQABHZpZXdkACJFbGl4aXIuRmFpcmNhcnRXZWIuRXZlbnRMaXZlLkluZGV4bgYASgvTfIQBYgABUYA.uTNBvsdrrCSAumjrR4rpPELiUCzbRqBD2rMD78lrV8M\",\"static\":\"SFMyNTY.g2gDaAJhBXQAAAADZAAKYXNzaWduX25ld2pkAAVmbGFzaHQAAAAAZAACaWRtAAAAFHBoeC1GeWZacTBiX3B2WF9oUVNGbgYASgvTfIQBYgABUYA.fqDLlJmQJ0zLbH0JOK9dWrdwZT8V708bXMAk1F4dZ7U\",\"flash\":\"SFMyNTY.g2gDdAAAAAFtAAAABGluZm9tAAAAGkV2ZW50IGNyZWF0ZWQgc3VjY2Vzc2Z1bGx5bgYAUoHTfIQBYgABUYA.XO7rfHBnPnrOPLWwPj1SZi3xfZCajlhdhDUx05I867E\"}]" }, { "type": "receive", "time": 1668541546.8404121, "opcode": 1, "data": "[\"4\",\"4\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_close\",{}]" }, { "type": "receive", "time": 1668541546.8404992, "opcode": 1, "data": "[\"4\",\"9\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_reply\",{\"response\":{},\"status\":\"ok\"}]" }, { "type": "receive", "time": 1668541546.843584, "opcode": 1, "data": "[\"12\",\"12\",\"lv:phx-FyfZq0b_pvX_hQSF\",\"phx_reply\",{\"response\":{\"container\":[\"div\",{}],\"rendered\":{\"0\":\"Event created successfully\",\"1\":\"\",\"2\":{\"0\":\"\",\"1\":{\"d\":[[\"4\",\"a name of event\",\"a description of event\",\"8675309\",\"Show\",\"Edit\",\"Delete\"]],\"s\":[\"\\n \\n \",\"\\n \",\"\\n \",\"\\n\\n \\n \",\"\\n \",\"\\n \",\"\\n \\n \\n\"]},\"2\":\"New Event\",\"s\":[\"

Listing Events

\\n\",\"\\n\\n \\n \\n \\n \\n \\n\\n \\n \\n \\n \\n\",\"\\n \\n
NameDescriptionCapacity
\\n\\n\",\"\"]},\"s\":[\"
\\n

\",\"

\\n\\n

\",\"

\\n\",\"\\n
\"],\"t\":\"Listing Events\"}},\"status\":\"ok\"}]" } ], "cache": {}, "pageref": "page_11", "request": { "method": "GET", "url": "ws://localhost:4000/live/websocket?_csrf_token=KlYjAAgdLyA0ZmpmWXouF2McCQodKQBCRbHFYydtz1G50MDvZsLgNkNz&_track_static%5B0%5D=http%3A%2F%2Flocalhost%3A4000%2Fassets%2Fapp.css&_track_static%5B1%5D=http%3A%2F%2Flocalhost%3A4000%2Fassets%2Fapp.js&_mounts=0&vsn=2.0.0", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Pragma", "value": "no-cache" }, { "name": "Origin", "value": "http://localhost:4000" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Host", "value": "localhost:4000" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Sec-WebSocket-Key", "value": "14ew10dpuRCN8KZ9Gk97iw==" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "Upgrade", "value": "websocket" }, { "name": "Cache-Control", "value": "no-cache" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Connection", "value": "Upgrade" }, { "name": "Sec-WebSocket-Version", "value": "13" }, { "name": "Sec-WebSocket-Extensions", "value": "permessage-deflate; client_max_window_bits" } ], "queryString": [ { "name": "_csrf_token", "value": "KlYjAAgdLyA0ZmpmWXouF2McCQodKQBCRbHFYydtz1G50MDvZsLgNkNz" }, { "name": "_track_static%5B0%5D", "value": "http%3A%2F%2Flocalhost%3A4000%2Fassets%2Fapp.css" }, { "name": "_track_static%5B1%5D", "value": "http%3A%2F%2Flocalhost%3A4000%2Fassets%2Fapp.js" }, { "name": "_mounts", "value": "0" }, { "name": "vsn", "value": "2.0.0" } ], "cookies": [], "headersSize": 887, "bodySize": 0 }, "response": { "status": 101, "statusText": "Switching Protocols", "httpVersion": "HTTP/1.1", "headers": [ { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "cache-control", "value": "max-age=0, private, must-revalidate" }, { "name": "sec-websocket-accept", "value": "wY3t4p3FIRtHWtmXgipIrQxt42Y=" }, { "name": "server", "value": "Cowboy" }, { "name": "connection", "value": "Upgrade" }, { "name": "upgrade", "value": "websocket" } ], "cookies": [], "content": { "size": 0, "mimeType": "x-unknown", "compression": 234 }, "redirectURL": "", "headersSize": 234, "bodySize": -234, "_transferSize": 0, "_error": null }, "serverIPAddress": "", "startedDateTime": "2022-11-15T19:45:16.644Z", "time": 30199.57999989856, "timings": { "blocked": -1, "dns": -1, "ssl": -1, "connect": -1, "send": 0, "wait": 30199.57999989856, "receive": 0, "_blocked_queueing": -1 } }, { "_initiator": { "type": "other" }, "_priority": "High", "_resourceType": "other", "cache": {}, "connection": "18690", "pageref": "page_11", "request": { "method": "GET", "url": "http://localhost:4000/favicon.ico", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Accept", "value": "image/avif,image/webp,image/apng,image/svg+xml,image/*,*/*;q=0.8" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Connection", "value": "keep-alive" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Host", "value": "localhost:4000" }, { "name": "If-None-Match", "value": "\"695C303\"" }, { "name": "Referer", "value": "http://localhost:4000/events" }, { "name": "Sec-Fetch-Dest", "value": "image" }, { "name": "Sec-Fetch-Mode", "value": "no-cors" }, { "name": "Sec-Fetch-Site", "value": "same-origin" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "sec-ch-ua", "value": "\"Not;A=Brand\";v=\"99\", \"Chromium\";v=\"106\"" }, { "name": "sec-ch-ua-mobile", "value": "?0" }, { "name": "sec-ch-ua-platform", "value": "\"Linux\"" } ], "queryString": [], "cookies": [ { "name": "_faircart_key", "value": "SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4", "path": "/", "domain": "localhost", "expires": "1969-12-31T23:59:59.000Z", "httpOnly": true, "secure": false } ], "headersSize": 722, "bodySize": 0 }, "response": { "status": 304, "statusText": "OK", "httpVersion": "HTTP/1.1", "headers": [ { "name": "cache-control", "value": "public" }, { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "etag", "value": "\"695C303\"" }, { "name": "server", "value": "Cowboy" } ], "cookies": [], "content": { "size": 1258, "mimeType": "image/vnd.microsoft.icon", "text": "iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAAAAXNSR0IArs4c6QAAAAlwSFlzAAALEwAACxMBAJqcGAAABCRpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IlhNUCBDb3JlIDUuNC4wIj4KICAgPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4KICAgICAgPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIKICAgICAgICAgICAgeG1s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iAgIDwvcmRmOlJERj4KPC94OnhtcG1ldGE+CoGHVX4AAABfSURBVHgB7dABDQAAAMKg909tDjeIQGHAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgwYMGDAgAEDBgy8DwxAQAABFkGY6wAAAABJRU5ErkJggg==", "encoding": "base64" }, "redirectURL": "", "headersSize": 122, "bodySize": 0, "_transferSize": 122, "_error": null }, "serverIPAddress": "127.0.0.1", "startedDateTime": "2022-11-15T19:45:16.651Z", "time": 4.889000090770423, "timings": { "blocked": 1.4530000144466757, "dns": -1, "ssl": -1, "connect": -1, "send": 0.08299999999999996, "wait": 1.8999999555051326, "receive": 1.453000120818615, "_blocked_queueing": 0.5370000144466758 } }, { "_initiator": { "type": "script", "stack": { "callFrames": [ { "functionName": "connect", "scriptId": "211", "url": "http://localhost:4000/phoenix/live_reload/frame", "lineNumber": 896, "columnNumber": 18 }, { "functionName": "", "scriptId": "211", "url": "http://localhost:4000/phoenix/live_reload/frame", "lineNumber": 1202, "columnNumber": 7 } ] } }, "_priority": null, "_resourceType": "websocket", "_webSocketMessages": [ { "type": "send", "time": 1668541516.74671, "opcode": 1, "data": "[\"3\",\"3\",\"phoenix:live_reload\",\"phx_join\",{}]" }, { "type": "receive", "time": 1668541516.7475522, "opcode": 1, "data": "[\"3\",\"3\",\"phoenix:live_reload\",\"phx_reply\",{\"response\":{},\"status\":\"ok\"}]" }, { "type": "send", "time": 1668541546.74735, "opcode": 1, "data": "[null,\"4\",\"phoenix\",\"heartbeat\",{}]" }, { "type": "receive", "time": 1668541546.747744, "opcode": 1, "data": "[null,\"4\",\"phoenix\",\"phx_reply\",{\"response\":{},\"status\":\"ok\"}]" } ], "cache": {}, "pageref": "page_11", "request": { "method": "GET", "url": "ws://localhost:4000/phoenix/live_reload/socket/websocket?vsn=2.0.0", "httpVersion": "HTTP/1.1", "headers": [ { "name": "Pragma", "value": "no-cache" }, { "name": "Origin", "value": "http://localhost:4000" }, { "name": "Accept-Encoding", "value": "gzip, deflate, br" }, { "name": "Host", "value": "localhost:4000" }, { "name": "Accept-Language", "value": "en-US,en;q=0.9" }, { "name": "Sec-WebSocket-Key", "value": "V4Bke9nf5kC20H+BWql1Rw==" }, { "name": "User-Agent", "value": "Mozilla/5.0 (X11; Linux aarch64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/106.0.0.0 Safari/537.36" }, { "name": "Upgrade", "value": "websocket" }, { "name": "Cache-Control", "value": "no-cache" }, { "name": "Cookie", "value": "_faircart_key=SFMyNTY.g3QAAAABbQAAAAtfY3NyZl90b2tlbm0AAAAYeDRrRlFkS1ROVy1TaTdqYTlvRW1TQk44.UsrTeRz2Brb4yncpxYfEs265e-kybyASVQ_VWqHNXg4" }, { "name": "Connection", "value": "Upgrade" }, { "name": "Sec-WebSocket-Version", "value": "13" }, { "name": "Sec-WebSocket-Extensions", "value": "permessage-deflate; client_max_window_bits" } ], "queryString": [ { "name": "vsn", "value": "2.0.0" } ], "cookies": [], "headersSize": 691, "bodySize": 0 }, "response": { "status": 101, "statusText": "Switching Protocols", "httpVersion": "HTTP/1.1", "headers": [ { "name": "date", "value": "Tue, 15 Nov 2022 19:45:15 GMT" }, { "name": "cache-control", "value": "max-age=0, private, must-revalidate" }, { "name": "sec-websocket-accept", "value": "K1gJ/rReZ40uNNsb00NRwMcv2gQ=" }, { "name": "server", "value": "Cowboy" }, { "name": "connection", "value": "Upgrade" }, { "name": "upgrade", "value": "websocket" } ], "cookies": [], "content": { "size": 0, "mimeType": "x-unknown", "compression": 234 }, "redirectURL": "", "headersSize": 234, "bodySize": -234, "_transferSize": 0, "_error": null }, "serverIPAddress": "", "startedDateTime": "2022-11-15T19:45:16.696Z", "time": 30050.994999939576, "timings": { "blocked": -1, "dns": -1, "ssl": -1, "connect": -1, "send": 0, "wait": 30050.994999939576, "receive": 0, "_blocked_queueing": -1 } } ] } }